@clickview/library-editor 1.65.0-rc.1 → 1.65.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.
@@ -1,2 +0,0 @@
1
- /*! For license information please see 4796-55c8713f23.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 s}});var r=n(32735),o=n(53808),i=n(31647),a=n(52076),u=n(77105),c=n(39396),l={iconButton:"aGxoe",iconWithText:"_cjiV",svg:"q6vwS",iconOnly:"T1CzO",iconBorder:"lBPNt"};function s(e){var t="".concat(e.className," ").concat(l.iconButton);r.Children.toArray(e.children).length?t+=" ".concat(l.iconWithText):e.showBorder||e.customSize||(t+=" ".concat(l.iconOnly)),e.showBorder&&(t+=" ".concat(l.iconBorder," btn btn-outline-dark me-2")),e.disabled&&(t+=" disabled");var n=r.createElement(c.x,{svgName:e.svgName,className:"svg-container ".concat(l.svg),size:e.svgSize});return e.appLink||e.href?e.href?r.createElement("a",{className:t,href:e.href,onClick:function(t){t.preventDefault(),e.analyticsData&&e.analyticsOptions&&a.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(u.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("button",{type:"button",className:t,"aria-label":e.ariaLabel,onClick:function(t){e.analyticsData&&e.analyticsOptions&&a.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),u={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"}},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"}}},PresentationIds:{DEFAULT:1,DEFAULT_CURRICULUM:10,AU_PRIMARY:18,AU_SECONDARY:9,AU_TERTIARY:81,US_ELEMENTARY:13,US_MIDDLE:14,US_HIGH:15,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",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"]}},c=n(13034),l=n(88311),s=n(76044),f=n(51614),p="onboarding:persona",y="onboarding:had:job:title";function d(e,t){return e?"".concat(e,":").concat(t):t}function h(e,t){var n=f.SG.get(t),r=d(e,t);return null!==n&&(f.SG.remove(t),f.SG.set(r,n)),f.SG.get(r)}function v(e,t,n){f.SG.set(d(e,t),n)}var b=function(e,t){var n=s.l.getPersonaFromJobTitle(t);v(e,p,n||"teacher")};function m(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 g,w={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,f=e.appLinks,y=e.masterUser,d=e.customer,v=e.currentUser,m=e.hasPermissions,g=h(null==v?void 0:v.id,p);!g&&t&&b(null==v?void 0:v.id,t),g&&g!==s.l.getPersonaFromJobTitle(t)&&b(null==v?void 0:v.id,t);var O={jobTitle:t,hasPlaylist:u,masterUser:y,customer:d,presentations:r||[],curriculums:o||[],preferredPresentation:i,preferredSubjects:a,instanceRegion:null==v?void 0:v.instanceRegion,hasPermissions:m,userSettings:n},P=w.getCurrentScreen(c,f),S=Object.values(B),j={},C=null,_=null,k=0,T=0,E=!0;return S.forEach(function(e){var t;if(e.predicate(O)){_||(_=e.id);var r=l.x.get(n,e.setting);r||(E=!1),P||r||(P=e.id),k++,j[e.id]={isComplete:r,next:null,previous:C,number:k,includeInProgressBar:!1},e.includeInProgressBar(O)&&(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}}),P||E||(P=_),{screens:j,currentScreen:P,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 m(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)?m(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(c.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,c,l;return(null==e?void 0:e.dateCreated)>=function(e,t){var n="2024-03-26";return e.some(function(e){return e.id.toString()===u.PresentationIds.AU_TERTIARY.toString()||e.id.toString()===u.PresentationIds.UK_TERTIARY.toString()})?"2024-11-28":o.O.isBefore(null==t?void 0:t.dateCreated,n)?"2024-12-11":n}(r,t)||!!w.hasNonBdmTrial(n)&&(c=null==e?void 0:e.id,l=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 h(c,y)&&v(c,y,!!l),!h(c,y))}},O=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"}(g||(g={}));var P,S=n(36357);!function(e){e.Root="root"}(P||(P={}));var j,C=n(66016);!function(e){e.Subject="Subject",e.CurriculumAudience="CurriculumAudience",e.CurriculumSubject="CurriculumSubject",e.CurriculumArea="CurriculumArea",e.CurriculumLeaf="CurriculumLeaf",e.CurriculumMetadata="CurriculumMetadata"}(j||(j={}));var _,k=n(16045),T=n(89603),E=n(7754),R=i.T.encloseNamespace("subjects.utils"),I={isPresentation:function(e){return"learningLevel"in e},isTopicClassification:function(e){return(null==e?void 0:e.type)===j.Subject},getMappedPresentationLevel:function(e){return"string"==typeof e?g[e]:e},getMappedPresentationBackgroundColourClass:function(e){switch(I.getMappedPresentationLevel(e)){case g.Level_1:return"bg-indigo";case g.Level_3:return"bg-blue";case g.Level_4:return"bg-navy";default:case g.Level_2:return"bg-green"}},getMappedPresentationBackgroundColourCode:function(e){switch(I.getMappedPresentationLevel(e)){case g.Level_1:return"#7A76E8";case g.Level_3:return"#38A2E8";case g.Level_4:return"#1B2D71";default:case g.Level_2:return"#5DC786"}},getPresentationLevelImage:function(e,t){switch(I.getMappedPresentationLevel(e)){case g.Level_1:if("topic-banner"===t)return u.Images.Level_1.TOPIC_BANNER;if("new-release-banner"===t)return u.Images.Level_1.NEW_RELEASES_BANNER;if("cover"===t)return u.Images.Level_1.TOPIC_COVER;if("tall-poster"===t)return u.Images.Level_1.TOPIC_TALL_POSTER;case g.Level_2:if("topic-banner"===t)return u.Images.Level_2.TOPIC_BANNER;if("new-release-banner"===t)return u.Images.Level_2.NEW_RELEASES_BANNER;if("cover"===t)return u.Images.Level_2.TOPIC_COVER;if("tall-poster"===t)return u.Images.Level_2.TOPIC_TALL_POSTER;default:case g.Level_3:if("topic-banner"===t)return u.Images.Level_3.TOPIC_BANNER;if("new-release-banner"===t)return u.Images.Level_3.NEW_RELEASES_BANNER;if("cover"===t)return u.Images.Level_3.TOPIC_COVER;if("tall-poster"===t)return u.Images.Level_3.TOPIC_TALL_POSTER;case g.Level_4:if("topic-banner"===t)return u.Images.Level_4.TOPIC_BANNER;if("cover"===t)return u.Images.Level_4.TOPIC_COVER}},getExploreAllTopicsTitle:function(e,t){return t<C._.MULTI_PRESENTATION_THRESHOLD?R("exploreAllTopicsHeading"):R("exploreAllTopicsDynamicHeading",{presentationName:e})},getExploreAllTopicsBreadcrumb:function(e,t){return t<C._.MULTI_PRESENTATION_THRESHOLD?R("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(P.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 I.isTopLevelTopic(e)?t===E.ku.Classification?"new-releases":"all-topics":t===E.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())===u.PresentationIds.AU_TERTIARY.toString()||(null==e?void 0:e.toString())===u.PresentationIds.UK_TERTIARY.toString()},isNewZealandTopic:function(e){return(null==e?void 0:e.toString())===u.PresentationIds.NZ_PRIMARY.toString()||(null==e?void 0:e.toString())===u.PresentationIds.NZ_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===T.Q.Curation&&e.name===k.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 g[null==r?void 0:r.learningLevel]-g[null==o?void 0:o.learningLevel]}},L=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"]}}}'),x={CreatePlaylist:function(e){return!(e.hasPlaylist||e.preferredPresentation&&!L[e.preferredPresentation.id])}},M=i.T.encloseNamespace("onboarding.constants"),B={"welcome-video":{id:"welcome-video",getPageTitle:function(){return M("welcomeVideoPageTitle")},predicate:function(e){return!!w.shouldRedirectToOnboarding(e.masterUser,e.customer,e.hasPermissions,e.presentations)&&e.instanceRegion===O.b.US},setting:S.E.HasCompletedOnboardingStepWelcomeVideo,analyticsLocation:a.LZ.OnboardingWelcomeVideoScreen,includeInProgressBar:function(){return!1},getWidgetHeading:function(){return M("selectRoleHeading")},getWidgetDescription:function(){return M("selectRoleMessage")}},"select-role":{id:"select-role",getPageTitle:function(){return M("selectRolePageTitle")},predicate:function(e){var t,n;return!w.hasNonBdmTrial(e.hasPermissions)||!e.jobTitle||!!(null===(n=null===(t=e.userSettings)||void 0===t?void 0:t[S.E.HasCompletedOnboardingStepSelectRole])||void 0===n?void 0:n.value)},setting:S.E.HasCompletedOnboardingStepSelectRole,analyticsLocation:a.LZ.OnboardingSelectRoleScreen,includeInProgressBar:function(){return!0},getWidgetHeading:function(){return M("selectRoleHeading")},getWidgetDescription:function(){return M("selectRoleMessage")}},"usage-intention":{id:"usage-intention",getPageTitle:function(){return M("usageIntentionPageTitle")},predicate:function(){return!0},setting:S.E.HasCompletedOnboardingStepUsageIntention,analyticsLocation:a.LZ.OnboardingUsageIntentionScreen,includeInProgressBar:function(){return!0},getWidgetHeading:function(){return M("usageIntentionHeading")},getWidgetDescription:function(){return M("usageIntentionMessage")}},"subjects-summary":{id:"subjects-summary",getPageTitle:function(){return M("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[S.E.HasCompletedOnboardingStepSubjects])||void 0===r?void 0:r.value)||(null===(i=null===(o=e.userSettings)||void 0===o?void 0:o[S.E.HasCompletedOnboardingStepSelectCurriculum])||void 0===i?void 0:i.value)||(null===(u=null===(a=e.userSettings)||void 0===a?void 0:a[S.E.HasCompletedOnboardingStepSchoolLevel])||void 0===u?void 0:u.value))},setting:S.E.HasCompletedOnboardingStepSubjectsSummary,analyticsLocation:a.LZ.OnboardingSubjectsSummaryScreen,includeInProgressBar:function(){return!0},getWidgetHeading:function(){return M("subjectsHeading")},getWidgetDescription:function(){return M("subjectsMessage")},branches:["school-level","subjects","select-curriculum"]},"school-level":{id:"school-level",getPageTitle:function(){return M("schoolLevelPageTitle")},predicate:function(e){var t,n;return!(B["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 I.getMappedPresentationLevel(e.learningLevel)===g.Level_4})))},setting:S.E.HasCompletedOnboardingStepSchoolLevel,analyticsLocation:a.LZ.OnboardingSchoolLevelScreen,includeInProgressBar:function(e){return!B["subjects-summary"].predicate(e)},getWidgetHeading:function(e){return M(e?"schoolLevelHeadingKdm":"schoolLevelHeading")},getWidgetDescription:function(e){return M(e?"schoolLevelMessageKdm":"schoolLevelMessage")}},"select-curriculum":{id:"select-curriculum",getPageTitle:function(){return M("selectCurriculumPageTitle")},predicate:function(e){var t;return!(B["subjects-summary"].predicate(e)||(null===(t=e.curriculums)||void 0===t?void 0:t.length)<2)},setting:S.E.HasCompletedOnboardingStepSelectCurriculum,analyticsLocation:a.LZ.OnboardingSelectCurriculumScreen,includeInProgressBar:function(e){return!B["subjects-summary"].predicate(e)},getWidgetHeading:function(){return M("selectCurriculumHeading")},getWidgetDescription:function(){return M("selectCurriculumMessage")}},subjects:{id:"subjects",getPageTitle:function(){return M("subjectsPageTitle")},predicate:function(e){return!B["subjects-summary"].predicate(e)},setting:S.E.HasCompletedOnboardingStepSubjects,analyticsLocation:a.LZ.OnboardingSubjectsScreen,includeInProgressBar:function(e){return!B["subjects-summary"].predicate(e)},getWidgetHeading:function(e){return M(e?"subjectsHeadingKdm":"subjectsHeading")},getWidgetDescription:function(){return M("subjectsMessage")}},"select-videos":{id:"select-videos",getPageTitle:function(){return M("selectVideosPageTitle")},predicate:x.CreatePlaylist,setting:S.E.HasCompletedOnboardingStepSelectVideos,analyticsLocation:a.LZ.OnboardingSelectVideosScreen,includeInProgressBar:function(){return!0},getWidgetHeading:function(){return M("selectVideosHeading")},getWidgetDescription:function(e){return M(e?"selectVideosMessageKdm":"selectVideosMessage")}},"create-playlist":{id:"create-playlist",getPageTitle:function(){return M("createPlaylistPageTitle")},predicate:x.CreatePlaylist,setting:S.E.HasCompletedOnboardingStepCreatePlaylist,analyticsLocation:a.LZ.OnboardingCreatePlaylistScreen,includeInProgressBar:function(){return!0},getWidgetHeading:function(){return M("createPlaylistHeading")},getWidgetDescription:function(){return M("createPlaylistMessage")}}},A=n(40484),D=n(67391),N=n(33125),Z=(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===E.ku.Discover?"discover:presentation:".concat(e.presentationId):e.targetType===E.ku.Classification?"classification:".concat(e.classificationId):e.targetType===E.ku.ClassificationDirectory?"classification:".concat(e.classificationId,":directory"):e.targetType===E.ku.ClassificationCurriculum?"classification:".concat(e.classificationId,":curriculum"):e.targetType===E.ku.MoviesAndTv?"moviesAndTv:presentation:".concat(e.presentationId):e.targetType===E.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===E.ku.Discover?Z.getDashboardTarget({targetType:E.ku.Discover,presentationId:t}):r===E.ku.MoviesAndTv?Z.getDashboardTarget({targetType:E.ku.MoviesAndTv,presentationId:t}):r===E.ku.Company?Z.getDashboardTarget({targetType:E.ku.Company,presentationId:t,companyId:n}):r===E.ku.Classification?Z.getDashboardTarget({targetType:E.ku.Classification,classificationId:o}):r===E.ku.ClassificationDirectory?Z.getDashboardTarget({targetType:E.ku.ClassificationDirectory,classificationId:o}):r===E.ku.ClassificationCurriculum?Z.getDashboardTarget({targetType:E.ku.ClassificationCurriculum,classificationId:o}):void 0},getDashboardTargetInfo:function(e){var t,n=Z.getDashboardTargetType(e),r=null===(t=null==e?void 0:e.target)||void 0===t?void 0:t.split(":");return n===E.ku.Discover?{targetType:E.ku.Discover,presentationId:r[2]}:n===E.ku.Classification?{targetType:E.ku.Classification,classificationId:r[1]}:n===E.ku.ClassificationDirectory?{targetType:E.ku.ClassificationDirectory,classificationId:r[1]}:n===E.ku.ClassificationCurriculum?{targetType:E.ku.ClassificationCurriculum,classificationId:r[1]}:n===E.ku.MoviesAndTv?{targetType:E.ku.MoviesAndTv,presentationId:r[2]}:n===E.ku.Company?{targetType:E.ku.Company,companyId:r[1],presentationId:r[3]}:null},getDashboardTargetType:function(e){return(null==e?void 0:e.target)?e.target.startsWith("discover")?E.ku.Discover:e.target.startsWith("classification")?e.target.endsWith("directory")?E.ku.ClassificationDirectory:e.target.endsWith("curriculum")?E.ku.ClassificationCurriculum:E.ku.Classification:e.target.startsWith("moviesAndTv")?E.ku.MoviesAndTv:e.target.startsWith("company")?E.ku.Company:null:null},isType:function(e,t){return Z.getDashboardTargetType(e)===t},isCuratedDashboard:function(e){var t=e,n=Z.getDashboardTargetType(t);return n===E.ku.Discover||n===E.ku.Classification||n===E.ku.ClassificationDirectory||n===E.ku.ClassificationCurriculum||n===E.ku.MoviesAndTv||n===E.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===N.z.ClassificationCurriculumMedia&&(i.curriculumPresentationId=o),Object.assign(Object.assign({},i),U[e].getCustomParams(t,n))},isSystemGeneratedDashboard:function(e){var t=new Set([N.z.ClassificationFeaturedVideo,N.z.ClassificationPinnedVideos,N.z.ClassificationPlaylists,N.z.ClassificationSeries]);return null==e?void 0:e.some(function(e){return t.has(e.widgetId)})},isClassificationDashboard:function(e){return[E.ku.Classification,E.ku.ClassificationDirectory,E.ku.ClassificationCurriculum].includes(null==e?void 0:e.targetType)}});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,n){return(t=function(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+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function V(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=(F(F(F(F(F(F(F(F(F(F(_={},N.z.CuratedMedia,{getCustomParams:function(){return{}}}),N.z.PlaylistMedia,{getCustomParams:function(){return{}}}),N.z.SeriesMedia,{getCustomParams:function(e){switch(e){case D.f.ThumbnailFixedListMediaLarge:return{limit:2};case D.f.ThumbnailHeroMedia:case D.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))}}),N.z.ClassificationMedia,{getCustomParams:function(){return{}}}),N.z.LatestReleasedVideos,{getCustomParams:function(){return Z.getLatestReleasedTimeRange()}}),N.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)}}),N.z.CompanyLatestReleasedVideo,{getCustomParams:function(){return{}}}),N.z.CompanyVideos,{getCustomParams:function(){return{}}}),N.z.ClassificationLatestReleasedVideo,{getCustomParams:function(){return{}}}),N.z.ClassificationLatestReleasedVideosV2,{getCustomParams:function(){return{limit:12}},minContent:4}),F(F(F(F(F(F(F(F(F(F(_,N.z.SeasonalClassificationMedia,{getCustomParams:function(){return{limit:12}},minContent:4}),N.z.CompanyClassificationVideos,{getCustomParams:function(){return{}},minContent:4}),N.z.TrendingClassificationsMedia,{getCustomParams:function(){return{limit:12}},minContent:4}),N.z.CuratedClassifications,{getCustomParams:function(){return{}}}),N.z.TrendingClassifications,{getCustomParams:function(){return{limit:6}},minContent:3}),N.z.Classifications,{getCustomParams:function(e,t){if(t===E.ku.Discover){if(e===D.f.EditableCoverFixedPillListSmall)return{canBePreferred:!0,isFollowing:!0};if([D.f.PosterSlidingListSmall,D.f.CoverFixedPillListXSmall].includes(e))return{canBePreferred:!0}}return{}}}),N.z.ClassificationLatestReleasedVideos,{getCustomParams:function(){return Z.getLatestReleasedTimeRange()}}),N.z.SpecialEventClassifications,{getCustomParams:function(){return{from:o.O.format(new Date,"YYYY-MM-DD")}}}),N.z.LatestReleasedClassifications,{getCustomParams:function(){return{limit:6}},minContent:3}),N.z.CuratedSeries,{getCustomParams:function(){return{}}}),F(F(F(F(F(F(F(F(F(F(_,N.z.CuratedPlaylists,{getCustomParams:function(){return{}}}),N.z.Blurb,{getCustomParams:function(){return{}}}),N.z.DynamicBlurb,{getCustomParams:function(e){return e===D.f.OnboardingSteps?{customerSetting:[S.E.HasNewOnboarding],userSettings:[].concat((t=Object.values(B).map(function(e){return e.setting}),function(e){if(Array.isArray(e))return V(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 V(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)?V(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.")}()),[S.E.HasCompletedOnboardingV2,S.E.HasExitedOnboarding])}:{};var t}}),N.z.AuthorReviewer,{getCustomParams:function(){return{}}}),N.z.Faq,{getCustomParams:function(){return{}}}),N.z.CuratedCompanies,{getCustomParams:function(){return{}}}),N.z.Ratings,{getCustomParams:function(){return{}}}),N.z.Presentations,{getCustomParams:function(){return{}}}),N.z.UpcomingLivestreams,{getCustomParams:function(){return{from:o.O.format(new Date,"YYYY-MM-DD")}}}),N.z.CuratedMultimedia,{getCustomParams:function(){return{}}}),F(F(F(F(F(F(F(F(F(F(_,N.z.ClassificationPlaylists,{getCustomParams:function(){return{}}}),N.z.ClassificationSeries,{getCustomParams:function(){return{}}}),N.z.ClassificationFeaturedVideo,{getCustomParams:function(){return{}}}),N.z.ClassificationPinnedVideos,{getCustomParams:function(){return{}}}),N.z.ClassificationDashboardExternalMedia,{getCustomParams:function(){return{}}}),N.z.ClassificationDashboardMedia,{getCustomParams:function(){return{}}}),N.z.SearchRelevantTopics,{getCustomParams:function(){return{}},getCollectionAppLink:function(e){return e.searchHome({focus:[N.z.SearchRelevantTopics],type:[A.ZE.Classification]})}}),N.z.SearchCompanies,{getCustomParams:function(){return{}},getCollectionAppLink:function(e){return e.searchHome({focus:[N.z.SearchCompanies],type:[A.ZE.Company]})}}),N.z.SearchSeries,{getCustomParams:function(){return{}},getCollectionAppLink:function(e){return e.searchHome({focus:[N.z.SearchSeries],type:[A.ZE.Series]})}}),N.z.SearchPlaylists,{getCustomParams:function(){return{}},getCollectionAppLink:function(e){return e.searchHome({focus:[N.z.SearchPlaylists],type:[A.ZE.Playlist]})}}),F(F(F(F(F(F(F(F(F(F(_,N.z.SearchMyVideosFolder,{getCustomParams:function(){return{}},getCollectionAppLink:function(e){return e.searchHome({focus:[N.z.SearchMyVideosFolder],source:[A.fi.MyVideos]})}}),N.z.SearchMySchoolLibraryFolder,{getCustomParams:function(){return{}},getCollectionAppLink:function(e){return e.searchHome({focus:[N.z.SearchMySchoolLibraryFolder],source:[A.fi.School]})}}),N.z.SearchMyVideos,{getCustomParams:function(){return{}},getCollectionAppLink:function(e){return e.searchHome({focus:[N.z.SearchMyVideos],source:[A.fi.MyVideos]})}}),N.z.SearchMySchoolLibraryVideos,{getCustomParams:function(){return{}},getCollectionAppLink:function(e){return e.searchHome({focus:[N.z.SearchMySchoolLibraryVideos],source:[A.fi.School]})}}),N.z.SearchExchangeArchive,{getCustomParams:function(){return{}},getCollectionAppLink:function(e){return e.searchHome({focus:[N.z.SearchExchangeArchive],source:[A.fi.ExchangeArchive]})}}),N.z.SearchRelatedResults,{getCustomParams:function(){return{}}}),N.z.SearchTopResults,{getCustomParams:function(){return{}}}),N.z.ClassificationCurriculumMedia,{getCustomParams:function(){return{}}}),N.z.SearchTags,{getCustomParams:function(){return{}}}),N.z.SearchCurriculumCode,{getCustomParams:function(){return{}}}),F(_,N.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 h},L:function(){return v}});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 h(){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],h=s[1],v=r.useRef(null);r.useEffect(function(){i.t.isEqual(e,c)||l(e)},[e]);var b=o.q.throttle(function(){y(v,c),t.current&&h(!0)},c.delay,{leading:!1}),m=function(){o.q.isFunction(b.cancel)&&b.cancel(),d(v,c),t.current&&h(!1)};return r.useLayoutEffect(function(){var e=v.current;if(e)return e.addEventListener("mouseenter",b),e.addEventListener("mouseleave",m),function(){e.removeEventListener("mouseenter",b),e.removeEventListener("mouseleave",m)}},[v.current,c]),[v,p]}function v(e){var t=u(r.useState(e),2),n=t[0],a=t[1],c=r.useRef(Object.assign({},p)),f=r.useRef(!1),h=r.useRef(0),v=r.useRef(null),b=u(r.useState(!1),2),m=b[0],g=b[1];function w(){h.current&&(window.clearTimeout(h.current),h.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(v,n),g(!0)},r=n.delay||l,h.current||(h.current=window.setTimeout(t,r))}}function S(){w(),d(v,n),f.current=!1,g(!1)}return r.useEffect(function(){i.t.isEqual(e,n)||a(e)},[e]),r.useLayoutEffect(function(){if(v.current){var e=o.q.throttle(P,25,{leading:!1});return v.current.addEventListener("mouseenter",O),v.current.addEventListener("mousemove",e),v.current.addEventListener("mouseleave",S),function(){v.current&&(v.current.removeEventListener("mouseenter",O),v.current.removeEventListener("mousemove",e),v.current.removeEventListener("mouseleave",S))}}},[v.current,n]),[v,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 h}});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(7754),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 h={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(h.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 h}});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 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=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",h="_cvwp:fsc",v="_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,B(r.key),r)}}function B(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 A(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(A=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,A()?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),U=n.n(V),H={webPlayerContainer:"SlCu8",webPlayer:"NlTKl",svgContainer:"hFe3U"},G=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 U()}},{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(h,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(v,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(h),this.eventsApi.off(f),this.eventsApi.off(u),this.eventsApi.off(c),this.eventsApi.off(l),this.eventsApi.off(d),this.eventsApi.off(v))}},{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||G("html").addClass("player-fullscreen")}},{key:"cancelFs",value:function(e){e||G("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 h(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 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 h(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 h(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))},56336:function(e,t,n){"use strict";n.d(t,{r:function(){return Xp}}),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){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}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,c(r.key),r)}}function u(e,t,n){return t&&a(e.prototype,t),n&&a(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}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+""}function l(e,t,n){return t=y(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,s()?Reflect.construct(t,n||[],y(e).constructor):t.apply(e,n))}function s(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(s=function(){return!!e})()}function f(e,t,n,r){var o=p(y(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof o?function(e){return o.apply(n,e)}:o}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&&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 v=function(e){function t(e,n){return i(this,t),l(this,t,[e,n])}return d(t,e),u(t,[{key:"handleClick",value:function(e){var n=this;f(t,"handleClick",this,3)([e]),this.requestAnimationFrame(function(){n.options_.item.showCollapsibleMenu()})}},{key:"createEl",value:function(e,n,o){if(!this.options_.item)return f(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=f(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")),b=function(e){function t(e,n){var r;return i(this,t),(r=l(this,t,[e,n])).controlText("Settings"),r}return d(t,e),u(t,[{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small cv-cog-menu-button ".concat(f(t,"buildWrapperCSSClass",this,3)([]))}},{key:"buildCSSClass",value:function(){return"cv-cog-button ".concat(f(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()}),f(t,"pressButton",this,3)([]))}},{key:"createItems",value:function(){for(var e,t=this,n=[],r=0;r<this.options_.items.length;r++){var o=this.options_.items[r];o.isCollabsible&&o.showInCollabsibleMenu()&&o.isCollapsed&&n.push(new v(this.player_,{item:o}))}return(null===(e=this.additionalItems)||void 0===e?void 0:e.length)&&this.additionalItems.forEach(function(e){var r,o=new e.ctor(t.player_,Object.assign(Object.assign({},t.options_),null!==(r=e.options)&&void 0!==r?r:{}));n.splice(e.index,0,o)}),n}},{key:"update",value:function(){f(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"));r.Z.registerComponent("cogButton",b);var m=n(12424);function g(e){return g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},g(e)}function w(){return w="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=k(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}},w.apply(null,arguments)}function O(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function P(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,j(r.key),r)}}function S(e,t,n){return t&&P(e.prototype,t),n&&P(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function j(e){var t=function(e){if("object"!=g(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=g(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==g(t)?t:t+""}function C(e,t,n){return t=k(t),function(e,t){if(t&&("object"==g(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,_()?Reflect.construct(t,n||[],k(e).constructor):t.apply(e,n))}function _(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(_=function(){return!!e})()}function k(e){return k=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},k(e)}function T(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&E(e,t)}function E(e,t){return E=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},E(e,t)}var R=r.Z.getComponent("MenuItem"),I=r.Z.getComponent("MenuButton"),L=["large","medium","small"],x=function(e){function t(e,n){return O(this,t),C(this,t,[e,n])}return T(t,e),S(t,[{key:"handleClick",value:function(){this.player_.textTrackSettings.setSizeSetting(this.options_.value)}}])}(R),M=function(e){function t(e,n){var r;return O(this,t),(r=C(this,t,[e,n])).alwaysCollapsed=!0,r.isCollapsed=!1,r.isCollabsible=!0,r.player_.ready(function(){r.update()}),r}return T(t,e),S(t,[{key:"createItems",value:function(){var e=this,t=this.player_.textTrackSettings;if(t){var n=t.getSizeSetting(),r=[new m.Z(this.player_,{label:"Caption Text Size",onClickBack:function(){e.requestAnimationFrame(function(){e.player_.getChild("collapserator").getChild("subsCapsButton").pressButton()})}})];return L.map(function(t){r.push(new x(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=w(k(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(){I.prototype.handleClick.apply(this)}}])}(I);r.Z.registerComponent("SubtitleSizeButton",M);var B=n(94878),A=n(29206);function D(e){return D="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},D(e)}function N(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"!=D(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=D(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==D(t)?t:t+""}function z(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(z=function(){return!!e})()}function F(e){return F=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},F(e)}function V(e,t){return V=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},V(e,t)}var U=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=F(t),function(e,t){if(t&&("object"==D(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,z()?Reflect.construct(t,n||[],F(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&&V(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)}}])&&N(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(r.Z.getComponent("MenuItem"));function H(e){return H="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},H(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,q(r.key),r)}}function q(e){var t=function(e){if("object"!=H(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=H(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==H(t)?t:t+""}function W(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(W=function(){return!!e})()}function Y(e,t,n,r){var o=K(J(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof o?function(e){return o.apply(n,e)}:o}function K(){return K="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=J(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}},K.apply(null,arguments)}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=r.Z.getComponent("MenuButton"),$=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=J(t),function(e,t){if(t&&("object"==H(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,W()?Reflect.construct(t,n||[],J(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&&Q(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 A.Z(this.player_,{menuButton:this,search:this.search})],r=0;r<t.cues.length;r++){var o=t.cues[r];n.push(new U(this.player_,{cue:o,label:o.text,selected:!1,multiSelectable:!1}))}var i=new A.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(Y(t,"buildWrapperCSSClass",this,3)([]))}},{key:"update",value:function(){Y(t,"update",this,3)([]),this.player_.trigger("resizemenus")}},{key:"pressButton",value:function(){Y(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(){X.prototype.handleClick.apply(this)}}])&&G(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(X);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(){return te="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=ce(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}},te.apply(null,arguments)}function ne(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function re(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,ie(r.key),r)}}function oe(e,t,n){return t&&re(e.prototype,t),n&&re(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function ie(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 ae(e,t,n){return t=ce(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,ue()?Reflect.construct(t,n||[],ce(e).constructor):t.apply(e,n))}function ue(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(ue=function(){return!!e})()}function ce(e){return ce=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ce(e)}function le(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&&se(e,t)}function se(e,t){return se=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},se(e,t)}r.Z.registerComponent("subtitleSearchButton",$);var fe=r.Z.getComponent("MenuItem"),pe=r.Z.getComponent("MenuButton"),ye=[{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"}],de=function(e){function t(e,n){return ne(this,t),ae(this,t,[e,n])}return le(t,e),oe(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">&uArr;</span> / \n <span class="cv-keyboard-button">Shift</span> +\n <span class="cv-keyboard-button cv-single-key">&dArr;</span>';case"mute":return'<span class="cv-keyboard-button cv-single-key">m</span>';case"fullscreen":return'<span class="cv-keyboard-button cv-single-key">f</span>';case"exit-fullscreen":return'<span class="cv-keyboard-button cv-single-key">esc</span>';case"theatre-mode":return'<span class="cv-keyboard-button cv-single-key">t</span>'}return""}}])}(fe),he=function(e){function t(){var e;return ne(this,t),(e=ae(this,t,arguments)).alwaysCollapsed=!0,e.isCollapsed=!1,e.isCollabsible=!0,e}return le(t,e),oe(t,[{key:"createItems",value:function(){var e=this,t=[];return t.push(new m.Z(this.player_,{label:"Keyboard shortcuts"})),ye.forEach(function(n){t.push(new de(e.player_,n))}),t}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small cv-keyboard-shortcuts ".concat((e=t,n=this,"function"==typeof(r=te(ce(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(){pe.prototype.handleClick.apply(this)}}])}(pe);function ve(e){return ve="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},ve(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,me(r.key),r)}}function me(e){var t=function(e){if("object"!=ve(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=ve(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ve(t)?t:t+""}function ge(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(ge=function(){return!!e})()}function we(e,t,n,r){var o=Oe(Pe(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof o?function(e){return o.apply(n,e)}:o}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=Pe(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 Pe(e){return Pe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Pe(e)}function Se(e,t){return Se=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Se(e,t)}r.Z.registerComponent("KeyboardShortcutsButton",he);var je="cv-collapsed",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=Pe(t),function(e,t){if(t&&("object"==ve(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,ge()?Reflect.construct(t,n||[],Pe(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&&Se(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(je)):(n.isCollapsed=!1,n.removeClass(je)))}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(we(t,"buildCSSClass",this,3)([]))}},{key:"createEl",value:function(e,n,r){return we(t,"createEl",this,3)([e,Object.assign(Object.assign({},n),{className:this.buildCSSClass()}),r])}}])&&be(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(r.Z.getComponent("Component"));r.Z.registerComponent("collapserator",Ce);var _e=["playToggle","volumePanel","customControlSpacer","playbackRateMenuButton","chaptersButton","qualityButton","keyboardShortcutsButton","subsCapsButton","whiteboardModeButton","subtitleSizeButton","subtitleSearchButton","fullscreenToggle"],ke=n(51614),Te=n(8942),Ee=n(70065),Re=n(35490),Ie=n(28716);function Le(e){return Le="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},Le(e)}function xe(){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 Me(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]())):(Me(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,Me(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return c.prototype=l,Me(f,"constructor",l),Me(l,"constructor",c),c.displayName="GeneratorFunction",Me(l,o,"GeneratorFunction"),Me(f),Me(f,o,"Generator"),Me(f,r,function(){return this}),Me(f,"toString",function(){return"[object Generator]"}),(xe=function(){return{w:i,m:p}})()}function Me(e,t,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}Me=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){Me(e,t,function(e){return this._invoke(t,n,e)})};i("next",0),i("throw",1),i("return",2)}},Me(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,Ae(r.key),r)}}function Ae(e){var t=function(e){if("object"!=Le(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Le(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Le(t)?t:t+""}var De,Ne=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);ke.SG.cacheExists(e)||(this.collectionApiClient.log({type:Ee.Vw.WebPlayerStream,actionContext:this.getActionContext(),data:this.getAnalyticsData(),eventVersion:Ee.eq.V3}),ke.SG&&ke.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:Ee.Vw.StreamProgress,actionContext:t.getActionContext(),data:Object.assign(Object.assign({},n),{progress:e}),eventVersion:Ee.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||Ee.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===Ee.py.Interactive?e.interactive={id:+this.options.mediaId}:t===Ee.py.Clip&&(e.clip={id:+this.options.mediaId}),e}},{key:"initialize",value:function(){this.setupCollectionApiClient(),Ie.Y.lockWindowSession(),this.options.player.one("dispose",function(){return Ie.Y.unlockWindowSession()})}},{key:"setupCollectionApiClient",value:function(){var e=this;this.collectionApiClient=new Te.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:Re.k.shouldLog,formatData:Re.k.formatData})}},{key:"getCurrentUser",value:function(){return e=this,t=void 0,n=void 0,r=xe().m(function e(){return xe().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?Ee.MC.Embedded:void 0,workflowPhase:void 0}}},{key:"getEntityType",value:function(){switch(this.options.mediaType){case"MasterVideo":return Ee.py.Video;case"MasterInteractive":return Ee.py.Interactive;case"MasterClip":return Ee.py.Clip}}},{key:"getLocationContext",value:function(){switch(this.options.playerType){case"player":return Ee.LZ.Player;case"interactive-player":return Ee.LZ.InteractivePlayer;case"create-clip-player":return Ee.LZ.CreateClipPlayer}}}])&&Be(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}(),Ze=n(61380),ze=n(19389),Fe=n.n(ze);function Ve(e){return Ve="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},Ve(e)}function Ue(e,t,n){return(t=function(e){var t=function(e){if("object"!=Ve(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Ve(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ve(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function He(e){e.paused()?e.play():e.pause()}function Ge(e,t){e.currentTime(e.currentTime()+t)}function qe(e,t){e.volume(e.volume()+t)}var We,Ye=(Ue(Ue(Ue(Ue(Ue(Ue(Ue(Ue(Ue(Ue(De={},"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",He),"space",He),"t",function(e){var t=e.theatreModePlugin().getTheatreMode();e.theatreModePlugin().toggleTheatreMode(!t,{shouldLog:!0})}),"left",function(e){return Ge(e,-5)}),"right",function(e){return Ge(e,5)}),"j",function(e){return Ge(e,-10)}),"l",function(e){return Ge(e,10)}),"up",function(e){return qe(e,.05)}),Ue(De,"down",function(e){return qe(e,-.05)})),Ke=n(61876);!function(e){e.PhysicallyChapteredVideo="physically-chaptered-video"}(We||(We={}));var Je=n(29573);function Qe(e){return Qe="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},Qe(e)}function Xe(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,$e(r.key),r)}}function $e(e){var t=function(e){if("object"!=Qe(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Qe(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Qe(t)?t:t+""}function et(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(et=function(){return!!e})()}function tt(){return tt="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=nt(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}},tt.apply(null,arguments)}function nt(e){return nt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},nt(e)}function rt(e,t){return rt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},rt(e,t)}n(26259);var ot=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=nt(t),function(e,t){if(t&&("object"==Qe(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,et()?Reflect.construct(t,n||[],nt(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&&rt(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=tt(nt(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&&Xe(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(r.Z.getPlugin("plugin"));r.Z.registerPlugin("configureMenuDimensionsPlugin",ot);var it=n(69140);function at(e){return at="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},at(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,ct(r.key),r)}}function ct(e){var t=function(e){if("object"!=at(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=at(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==at(t)?t:t+""}function lt(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(lt=function(){return!!e})()}function st(){return st="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=ft(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}},st.apply(null,arguments)}function ft(e){return ft=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ft(e)}function pt(e,t){return pt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},pt(e,t)}var yt=r.Z.getPlugin("plugin"),dt="cvplayer-volume",ht="cvplayer-mute",vt=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=ft(t),function(e,t){if(t&&("object"==at(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,lt()?Reflect.construct(t,n||[],ft(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&&pt(e,t)}(t,e),n=t,r=[{key:"initialize",value:function(){this.player.options_.mobile?this.removeVolumeControl():it.S.hasLocalStorage()&&(this.saveVolumeState=this.saveVolumeState.bind(this),this.player.on("volumechange",this.saveVolumeState),this.applyUserPreferences())}},{key:"applyUserPreferences",value:function(){var e=it.S.get(dt),t=it.S.get(ht);e&&this.player.volume(+e),t&&this.player.muted("true"===t)}},{key:"saveVolumeState",value:function(){this.enabled&&(it.S.set(dt,this.player.volume().toString()),it.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=st(ft(1&3?e.prototype:e),"dispose",n))?function(e){return r.apply(n,e)}:r)([])}}],r&&ut(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(yt);function bt(e){return bt="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},bt(e)}function mt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,gt(r.key),r)}}function gt(e){var t=function(e){if("object"!=bt(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=bt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==bt(t)?t:t+""}function wt(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(wt=function(){return!!e})()}function Ot(e){return Ot=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ot(e)}function Pt(e,t){return Pt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Pt(e,t)}r.Z.registerPlugin("persistVolumePlugin",vt);var St=r.Z.getPlugin("plugin"),jt="cvplayer-playback-rate",Ct=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=Ot(t),function(e,t){if(t&&("object"==bt(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||[],Ot(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&&Pt(e,t)}(t,e),n=t,(r=[{key:"initialize",value:function(){var e,t=this;if(it.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=+it.S.get(jt);(null===(e=this.player.options_.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();it.S.set(jt,t),null===(e=this.options.analyticsService)||void 0===e||e.logUserAction({rate:t},{actionType:Ee.Vw.Select,workflowPhase:Ee.eu.Complete,descriptor:Ee.UX.ChangeSpeed,entity:Ee.py.PlaybackSpeed,eventVersion:Ee.eq.V3})}}])&&mt(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(St);function _t(e){return _t="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},_t(e)}function kt(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,Tt(r.key),r)}}function Tt(e){var t=function(e){if("object"!=_t(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=_t(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==_t(t)?t:t+""}function Et(e,t){if(t&&("object"==_t(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 Rt(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Rt=function(){return!!e})()}function It(e){return It=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},It(e)}function Lt(e,t){return Lt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Lt(e,t)}r.Z.registerPlugin("persistPlaybackRatePlugin",Ct);var xt=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=It(o=t),(n=Et(r,Rt()?Reflect.construct(o,i||[],It(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):Et(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&&Lt(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}}])&&kt(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(r.Z.getPlugin("plugin"));r.Z.registerPlugin("fullscreenOnRotatePlugin",xt);var Mt="\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 At(e){return At="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},At(e)}function Dt(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,Nt(r.key),r)}}function Nt(e){var t=function(e){if("object"!=At(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=At(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==At(t)?t:t+""}function Zt(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Zt=function(){return!!e})()}function zt(e){return zt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},zt(e)}function Ft(e,t){return Ft=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Ft(e,t)}var Vt=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=zt(t),function(e,t){if(t&&("object"==At(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||[],zt(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&&Ft(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:Mt,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()}}])&&Dt(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(r.Z.getComponent("Button"));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 Ht(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,Gt(r.key),r)}}function Gt(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 qt(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(qt=function(){return!!e})()}function Wt(e){return Wt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Wt(e)}function Yt(e,t){return Yt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Yt(e,t)}Vt.prototype.controlText_="Open in ClickView",r.Z.registerComponent("OpenExternallyButton",Vt);var Kt=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=Wt(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,qt()?Reflect.construct(t,n||[],Wt(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&&Yt(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)}}])&&Ht(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(r.Z.getPlugin("plugin"));function Jt(e){return Jt="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},Jt(e)}function Qt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Xt(r.key),r)}}function Xt(e){var t=function(e){if("object"!=Jt(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Jt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Jt(t)?t:t+""}function $t(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return($t=function(){return!!e})()}function en(e,t,n,r){var o=tn(nn(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof o?function(e){return o.apply(n,e)}:o}function tn(){return tn="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=nn(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}},tn.apply(null,arguments)}function nn(e){return nn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},nn(e)}function rn(e,t){return rn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},rn(e,t)}r.Z.registerPlugin("openExternallyPlugin",Kt);var on=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=nn(t),function(e,t){if(t&&("object"==Jt(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,$t()?Reflect.construct(t,n||[],nn(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&&rn(e,t)}(t,e),n=t,(r=[{key:"buildCSSClass",value:function(){return"cv-touch-control-ui ".concat(en(t,"buildCSSClass",this,3)([]))}},{key:"createEl",value:function(e,n,r){return en(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=""}}])&&Qt(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(r.Z.getComponent("component"));function an(e){return an="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},an(e)}function un(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,cn(r.key),r)}}function cn(e){var t=function(e){if("object"!=an(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=an(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==an(t)?t:t+""}function ln(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(ln=function(){return!!e})()}function sn(){return sn="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=fn(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}},sn.apply(null,arguments)}function fn(e){return fn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},fn(e)}function pn(e,t){return pn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},pn(e,t)}r.Z.registerComponent("TouchControls",on);var yn=r.Z.getPlugin("plugin"),dn=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=fn(t),function(e,t){if(t&&("object"==an(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,ln()?Reflect.construct(t,n||[],fn(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&&pn(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=sn(fn(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&&un(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(yn);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 vn(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,bn(r.key),r)}}function bn(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",dn);var mn=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)}}])&&vn(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 wn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,On(r.key),r)}}function On(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 Pn(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Pn=function(){return!!e})()}function Sn(e){return Sn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Sn(e)}function jn(e,t){return jn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},jn(e,t)}var Cn=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=Sn(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,Pn()?Reflect.construct(t,n||[],Sn(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&&jn(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.playbackRate(),a=this.player.hasStarted();return this.player.src({src:n.url,type:n.mimeType}),this.player.one("loadedmetadata",function(){t.player.playbackRate(i),t.player.currentTime()!==r&&t.player.currentTime(r),o&&t.player.play(),a&&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 mn(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&&wn(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(r.Z.getPlugin("plugin"));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 kn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Tn(r.key),r)}}function Tn(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+""}r.Z.registerPlugin("progressiveFiles",Cn);var En=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&&kn(e.prototype,null),t&&kn(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}();function Rn(e){return Rn="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},Rn(e)}function In(){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 Ln(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]())):(Ln(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,Ln(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return c.prototype=l,Ln(f,"constructor",l),Ln(l,"constructor",c),c.displayName="GeneratorFunction",Ln(l,o,"GeneratorFunction"),Ln(f),Ln(f,o,"Generator"),Ln(f,r,function(){return this}),Ln(f,"toString",function(){return"[object Generator]"}),(In=function(){return{w:i,m:p}})()}function Ln(e,t,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}Ln=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){Ln(e,t,function(e){return this._invoke(t,n,e)})};i("next",0),i("throw",1),i("return",2)}},Ln(e,t,n,r)}function xn(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"!=Rn(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Rn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Rn(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=In().m(function e(){var t,n,r,o;return In().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}}])&&xn(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}();function An(e){return An="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},An(e)}function Dn(){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 Nn(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]())):(Nn(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,Nn(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return c.prototype=l,Nn(f,"constructor",l),Nn(l,"constructor",c),c.displayName="GeneratorFunction",Nn(l,o,"GeneratorFunction"),Nn(f),Nn(f,o,"Generator"),Nn(f,r,function(){return this}),Nn(f,"toString",function(){return"[object Generator]"}),(Dn=function(){return{w:i,m:p}})()}function Nn(e,t,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}Nn=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){Nn(e,t,function(e){return this._invoke(t,n,e)})};i("next",0),i("throw",1),i("return",2)}},Nn(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,zn(r.key),r)}}function zn(e){var t=function(e){if("object"!=An(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=An(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==An(t)?t:t+""}var Fn=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=Dn().m(function n(){var r;return Dn().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 Vn(e){return Vn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Vn(e)}function Un(){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 Hn(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]())):(Hn(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,Hn(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return c.prototype=l,Hn(f,"constructor",l),Hn(l,"constructor",c),c.displayName="GeneratorFunction",Hn(l,o,"GeneratorFunction"),Hn(f),Hn(f,o,"Generator"),Hn(f,r,function(){return this}),Hn(f,"toString",function(){return"[object Generator]"}),(Un=function(){return{w:i,m:p}})()}function Hn(e,t,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}Hn=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){Hn(e,t,function(e){return this._invoke(t,n,e)})};i("next",0),i("throw",1),i("return",2)}},Hn(e,t,n,r)}function Gn(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,qn(r.key),r)}}function qn(e){var t=function(e){if("object"!=Vn(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Vn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Vn(t)?t:t+""}function Wn(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Wn=function(){return!!e})()}function Yn(){return Yn="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Kn(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}},Yn.apply(null,arguments)}function Kn(e){return Kn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Kn(e)}function Jn(e,t){return Jn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Jn(e,t)}r.Z.use("*",function(e){return new Fn(e)});var Qn='<?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>',Xn=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=Kn(t),function(e,t){if(t&&("object"==Vn(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Wn()?Reflect.construct(t,n||[],Kn(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&&Jn(e,t)}(t,e),n=t,r=[{key:"createEl",value:function(){return(e=t,n=this,"function"==typeof(r=Yn(Kn(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(Qn,"</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=Un().m(function e(){return Un().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&&Gn(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(r.Z.getComponent("Component"));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 er(){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 tr(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]())):(tr(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,tr(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return c.prototype=l,tr(f,"constructor",l),tr(l,"constructor",c),c.displayName="GeneratorFunction",tr(l,o,"GeneratorFunction"),tr(f),tr(f,o,"Generator"),tr(f,r,function(){return this}),tr(f,"toString",function(){return"[object Generator]"}),(er=function(){return{w:i,m:p}})()}function tr(e,t,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}tr=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){tr(e,t,function(e){return this._invoke(t,n,e)})};i("next",0),i("throw",1),i("return",2)}},tr(e,t,n,r)}function nr(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,rr(r.key),r)}}function rr(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 or(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(or=function(){return!!e})()}function ir(){return ir="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=ar(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}},ir.apply(null,arguments)}function ar(e){return ar=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ar(e)}function ur(e,t){return ur=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ur(e,t)}r.Z.registerComponent("localCacheIndicator",Xn);var cr=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())})},lr=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=ar(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,or()?Reflect.construct(t,n||[],ar(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&&ur(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=ir(ar(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 cr(this,void 0,void 0,er().m(function e(){var t;return er().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 cr(this,void 0,void 0,er().m(function e(){var t,n,r,o=this;return er().w(function(e){for(;;)switch(e.n){case 0:return t=[],n=function(e){return cr(o,void 0,void 0,er().m(function n(){return er().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),En.enableProfileOrNextBest(this.player.qualityLevels(),e.playbackProfile),t=!0),t||this.player.src(this.player.src())}}],o&&nr(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(r.Z.getPlugin("plugin"));function sr(e){return sr="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},sr(e)}function fr(){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 pr(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]())):(pr(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,pr(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return c.prototype=l,pr(f,"constructor",l),pr(l,"constructor",c),c.displayName="GeneratorFunction",pr(l,o,"GeneratorFunction"),pr(f),pr(f,o,"Generator"),pr(f,r,function(){return this}),pr(f,"toString",function(){return"[object Generator]"}),(fr=function(){return{w:i,m:p}})()}function pr(e,t,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}pr=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){pr(e,t,function(e){return this._invoke(t,n,e)})};i("next",0),i("throw",1),i("return",2)}},pr(e,t,n,r)}function yr(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,dr(r.key),r)}}function dr(e){var t=function(e){if("object"!=sr(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=sr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==sr(t)?t:t+""}function hr(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(hr=function(){return!!e})()}function vr(){return vr="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=br(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}},vr.apply(null,arguments)}function br(e){return br=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},br(e)}function mr(e,t){return mr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},mr(e,t)}r.Z.registerPlugin("localCache",lr);var gr=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())})},wr=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=br(t),function(e,t){if(t&&("object"==sr(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||[],br(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&&mr(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=vr(br(1&3?e.prototype:e),"dispose",n))?function(e){return r.apply(n,e)}:r)([])}},{key:"onError",value:function(){return gr(this,void 0,void 0,fr().m(function e(){var t,n=this;return fr().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 gr(this,void 0,void 0,fr().m(function e(){var t,n;return fr().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 gr(this,void 0,void 0,fr().m(function t(){var n,r,o,i,a=this;return fr().w(function(t){for(;;)switch(t.n){case 0:return n=this.player.currentTime(),r=!this.player.paused(),o=this.player.playbackRate(),i=function(){a.player.playbackRate(o),a.player.currentTime(n),r&&a.player.play(),a.player.error(null)},this.player.one("loadedmetadata",i),t.n=1,e();case 1:if(!t.v){t.n=2;break}return t.a(2);case 2:this.player.off("loadedmetadata",i);case 3:return t.a(2)}},t,this)}))}}],o&&yr(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(r.Z.getPlugin("plugin"));function Or(e){return Or="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},Or(e)}function Pr(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,Sr(r.key),r)}}function Sr(e){var t=function(e){if("object"!=Or(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Or(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Or(t)?t:t+""}function jr(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(jr=function(){return!!e})()}function Cr(e){return Cr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Cr(e)}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("handleNetworkErrors",wr);var kr=r.Z.getPlugin("plugin"),Tr="cvplayer-show-subtitles",Er="cvplayer-selected-language",Rr="cvplayer-subtitle-size",Ir=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=Cr(t),function(e,t){if(t&&("object"==Or(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||[],Cr(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&&_r(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(Tr);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(Rr);r||(r=this.options.subtitleSize),this.player.options_.mobile&&(r="medium"),r&&this.player.textTrackSettings.setSizeSetting(r)}},{key:"safeGet",value:function(e){if(it.S.hasLocalStorage())return it.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("showing"===o.mode)return it.S.set(Tr,"true"),it.S.set(Er,o.language),void(null===(e=this.options.analyticsService)||void 0===e||e.logUserAction({language:o.language},{actionType:Ee.Vw.Select,entity:Ee.py.Subtitle,workflowPhase:Ee.eu.Complete,descriptor:Ee.DL.On}))}it.S.set(Tr,"false"),it.S.remove(Er),null===(t=this.options.analyticsService)||void 0===t||t.logUserAction({language:""},{actionType:Ee.Vw.Select,entity:Ee.py.Subtitle,workflowPhase:Ee.eu.Complete,descriptor:Ee.DL.Off,eventVersion:Ee.eq.V3})}},{key:"bindEventListeners",value:function(){var e=this;it.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();it.S.set(Rr,e)}},{key:"guessWhichTrack",value:function(){for(var e,t,n=this.safeGet(Er)||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],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++)e[t].mode="hidden"}},{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)}}])&&Pr(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(kr);function Lr(e){return Lr="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},Lr(e)}function xr(){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 Mr(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]())):(Mr(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,Mr(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return c.prototype=l,Mr(f,"constructor",l),Mr(l,"constructor",c),c.displayName="GeneratorFunction",Mr(l,o,"GeneratorFunction"),Mr(f),Mr(f,o,"Generator"),Mr(f,r,function(){return this}),Mr(f,"toString",function(){return"[object Generator]"}),(xr=function(){return{w:i,m:p}})()}function Mr(e,t,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}Mr=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){Mr(e,t,function(e){return this._invoke(t,n,e)})};i("next",0),i("throw",1),i("return",2)}},Mr(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,Ar(r.key),r)}}function Ar(e){var t=function(e){if("object"!=Lr(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Lr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Lr(t)?t:t+""}function Dr(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Dr=function(){return!!e})()}function Nr(e){return Nr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Nr(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",Ir);var zr=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())})},Fr=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=Nr(t),function(e,t){if(t&&("object"==Lr(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,Dr()?Reflect.construct(t,n||[],Nr(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 zr(this,void 0,void 0,xr().m(function e(){var t,n,r,o,i=this;return xr().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"),it.S.hasLocalStorage()&&(r=it.S.get(this.getStorageKey(!!t)))&&(n=r),o=this.player.qualityLevels(),(null==t?void 0:t.playbackProfile)||En.enableProfileOrNextBest(o,n),it.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 zr(this,void 0,void 0,xr().m(function t(){var n,r,o;return xr().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],it.S.set(this.getStorageKey(n),o.id),null===(e=this.options.analyticsService)||void 0===e||e.logUserAction({quality:o.id},{actionType:Ee.Vw.Select,workflowPhase:Ee.eu.Complete,descriptor:Ee.UX.ChangeResolution,entity:Ee.py.Resolution,eventVersion:Ee.eq.V3});case 2:return t.a(2)}},t,this)}))}},{key:"isLocalCacheActive",value:function(){return zr(this,void 0,void 0,xr().m(function e(){return xr().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 Vr(e){return Vr="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},Vr(e)}function Ur(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 Hr(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Gr(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,Wr(r.key),r)}}function qr(e,t,n){return t&&Gr(e.prototype,t),n&&Gr(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Wr(e){var t=function(e){if("object"!=Vr(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Vr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Vr(t)?t:t+""}function Yr(e,t,n){return t=Jr(t),function(e,t){if(t&&("object"==Vr(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,Kr()?Reflect.construct(t,n||[],Jr(e).constructor):t.apply(e,n))}function Kr(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Kr=function(){return!!e})()}function Jr(e){return Jr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Jr(e)}function Qr(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&&Xr(e,t)}function Xr(e,t){return Xr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Xr(e,t)}r.Z.registerPlugin("persistQualitySettingsPlugin",Fr);var $r=r.Z.getComponent("Component"),eo=function(e){function t(e,n){return Hr(this,t),Yr(this,t,[e,n])}return Qr(t,e),qr(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+"%"}}])}($r),to=function(e){function t(){var e;return Hr(this,t),(e=Yr(this,t,arguments)).events_=[],e}return Qr(t,e),qr(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 eo(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 Ur(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 Ur(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)?Ur(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"})}}])}($r);function no(e){return no="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},no(e)}function ro(e,t,n){return(t=io(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function oo(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,io(r.key),r)}}function io(e){var t=function(e){if("object"!=no(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=no(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==no(t)?t:t+""}function ao(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(ao=function(){return!!e})()}function uo(e){return uo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},uo(e)}function co(e,t){return co=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},co(e,t)}var lo=r.Z.getPlugin("plugin"),so="play",fo="playing",po="pause",yo="seekstart",ho="ended",vo="pausedseek",bo=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=uo(t),function(e,t){if(t&&("object"==no(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,ao()?Reflect.construct(t,n||[],uo(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&&co(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=ro(ro(ro(ro(ro(ro({},so,function(){return e.onPlay()}),po,function(){return e.onPause()}),"timeupdate",function(){return e.onTimeUpdate()}),"seeking",function(){return e.onSeeking()}),ho,function(){return e.onEnded()}),fo,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 to(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(so)}},{key:"onPause",value:function(){var e=this;this.isSeeking||(this.pauseTimeout=window.setTimeout(function(){e.isPlaying=!1,e.logEvent(po),delete e.pauseTimeout},50))}},{key:"onTimeUpdate",value:function(){this.shouldLogPlayOnTimeUpdate&&(this.shouldLogPlayOnTimeUpdate=!1,this.logEvent(so)),this.isPlaying&&!this.isSeeking&&this.logEvent(fo)}},{key:"onSeeking",value:function(){this.pauseTimeout&&(this.latestTime=this.previousLatestTime,window.clearTimeout(this.pauseTimeout),delete this.pauseTimeout),this.isPlaying||this.logEvent(vo),!this.isSeeking&&this.isPlaying&&(this.isSeeking=!0,this.logEvent(yo))}},{key:"onEnded",value:function(){this.hasEnded=!0,this.logEvent(ho)}},{key:"onPlaying",value:function(){this.isSeeking=!1,this.isPlaying=!0}},{key:"logEvent",value:function(e){if(this.player){var t=this.player.currentTime();e===yo&&(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===fo||e===so)}},{key:"shouldSaveCarriedOverTime",value:function(e){return e===fo||e===po}},{key:"shouldClearCarriedOverTime",value:function(e){return e===ho||e===vo}},{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===fo&&this.eventBuffer.length>0||(this.shouldSaveCarriedOverTime(o.type)&&(this.lastPlayingTime=o.time),r.end=o,n.push(r),r={}):(this.shouldUseCarriedOverTime(o.type)&&(o.time=this.lastPlayingTime,delete this.lastPlayingTime),r.start=o)}this.eventBuffer=[],n.length&&this.validateEvents(n)&&(this.options.onFlush(n),null===(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&&oo(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(lo);function mo(e){return mo="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},mo(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,wo(r.key),r)}}function wo(e){var t=function(e){if("object"!=mo(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=mo(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==mo(t)?t:t+""}function Oo(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Oo=function(){return!!e})()}function Po(e){return Po=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Po(e)}function So(e,t){return So=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},So(e,t)}r.Z.registerPlugin("progressReporterPlugin",bo);var jo=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=Po(t),function(e,t){if(t&&("object"==mo(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,Oo()?Reflect.construct(t,n||[],Po(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&&So(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"},{})}}])&&go(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(r.Z.getComponent("Component")),Co=["top","left","right","bottom"],_o={top:"Top",left:"Left",right:"Right",bottom:"Bottom"};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 To(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Eo(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Io(r.key),r)}}function Ro(e,t,n){return t&&Eo(e.prototype,t),n&&Eo(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Io(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 Lo(e,t,n){return t=Bo(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||[],Bo(e).constructor):t.apply(e,n))}function xo(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(xo=function(){return!!e})()}function Mo(){return Mo="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}},Mo.apply(null,arguments)}function Bo(e){return Bo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Bo(e)}function Ao(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&&Do(e,t)}function Do(e,t){return Do=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Do(e,t)}var No=r.Z.getComponent("Component"),Zo=function(e){function t(e,n){var r;return To(this,t),(r=Lo(this,t,[e,n])).bindEventListeners(),r}return Ao(t,e),Ro(t,[{key:"createEl",value:function(){return(e=t,n=this,"function"==typeof(r=Mo(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)})}}])}(No),zo=function(e){function t(e,n){var r;return To(this,t),(r=Lo(this,t,[e,n])).addChildren(),r}return Ao(t,e),Ro(t,[{key:"addChildren",value:function(){var e=this;Co.forEach(function(t){e.addChild(new Zo(e.player_,{side:t}))})}}])}(No);function Fo(e){return Fo="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},Fo(e)}function Vo(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Uo(r.key),r)}}function Uo(e){var t=function(e){if("object"!=Fo(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Fo(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Fo(t)?t:t+""}function Ho(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Ho=function(){return!!e})()}function Go(e){return Go=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Go(e)}function qo(e,t){return qo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},qo(e,t)}var Wo=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=Go(t),function(e,t){if(t&&("object"==Fo(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,Ho()?Reflect.construct(t,n||[],Go(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&&qo(e,t)}(t,e),n=t,(r=[{key:"handleClick",value:function(){this.player_.whiteboardModePlugin().setWhiteboardMode(this.options_.side)}}])&&Vo(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(r.Z.getComponent("MenuItem"));function Yo(e){return Yo="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},Yo(e)}function Ko(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,Jo(r.key),r)}}function Jo(e){var t=function(e){if("object"!=Yo(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Yo(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Yo(t)?t:t+""}function Qo(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Qo=function(){return!!e})()}function Xo(){return Xo="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=$o(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}},Xo.apply(null,arguments)}function $o(e){return $o=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},$o(e)}function ei(e,t){return ei=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ei(e,t)}var ti=r.Z.getComponent("MenuButton"),ni=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=$o(t),function(e,t){if(t&&("object"==Yo(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,Qo()?Reflect.construct(t,n||[],$o(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&&ei(e,t)}(t,e),n=t,r=[{key:"createItems",value:function(){var e=this,t=this.player_.whiteboardModePlugin().side,n=[new m.Z(this.player_,{label:"Video Controls"})];return Co.forEach(function(r){n.push(new Wo(e.player_,{side:r,label:_o[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=Xo($o(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 _o[e]}},{key:"showInCollabsibleMenu",value:function(){return!!this.player_.whiteboardModePlugin().isEnabled()&&this.player_.isFullscreen()}},{key:"showCollapsibleMenu",value:function(){ti.prototype.handleClick.apply(this)}}],r&&Ko(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(ti);function ri(e){return ri="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},ri(e)}function oi(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,ii(r.key),r)}}function ii(e){var t=function(e){if("object"!=ri(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=ri(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ri(t)?t:t+""}function ai(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(ai=function(){return!!e})()}function ui(e){return ui=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ui(e)}function ci(e,t){return ci=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ci(e,t)}var li="cv-whiteboard-side",si=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=ui(t),function(e,t){if(t&&("object"==ri(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,ai()?Reflect.construct(t,n||[],ui(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&&ci(e,t)}(t,e),n=t,o=[{key:"initialize",value:function(){if(!this.player.options_.mobile){if(it.S.hasLocalStorage()){var e=it.S.get(li);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 jo(this.player),this.button=new ni(this.player),r.addChild(this.dragHandle),r.addChild(this.button),this.player.trigger("cv-updatecog");var o=function(){n.player.isFullscreen()&&r.el().setAttribute("draggable","true")},i=function(){n.player.isFullscreen()&&r.el().setAttribute("draggable","false")},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 zo(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(),it.S.hasLocalStorage()&&it.S.set(li,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&&oi(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(r.Z.getPlugin("plugin"));function fi(e){return fi="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},fi(e)}function pi(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,yi(r.key),r)}}function yi(e){var t=function(e){if("object"!=fi(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=fi(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==fi(t)?t:t+""}function di(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(di=function(){return!!e})()}function hi(e){return hi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},hi(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.registerPlugin("whiteboardModePlugin",si);var bi=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"==fi(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,di()?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&&vi(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}})}}])&&pi(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(r.Z.getPlugin("plugin"));function mi(e){return mi="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},mi(e)}function gi(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,wi(r.key),r)}}function wi(e){var t=function(e){if("object"!=mi(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=mi(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==mi(t)?t:t+""}function Oi(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Oi=function(){return!!e})()}function Pi(e){return Pi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Pi(e)}function Si(e,t){return Si=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Si(e,t)}r.Z.registerPlugin("deferMenusPlugin",bi),n(56728);var ji=r.Z.getComponent("Button"),Ci="cv-muted",_i=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=Pi(t),function(e,t){if(t&&("object"==mi(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,Oi()?Reflect.construct(t,n||[],Pi(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&&Si(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(Ci):this.removeClass(Ci)}},{key:"buildCSSClass",value:function(){return"cv-mute-button cv-muted"}}])&&gi(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(ji);function ki(e){return ki="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},ki(e)}function Ti(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,Ei(r.key),r)}}function Ei(e){var t=function(e){if("object"!=ki(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=ki(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ki(t)?t:t+""}function Ri(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Ri=function(){return!!e})()}function Ii(){return Ii="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Li(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}},Ii.apply(null,arguments)}function Li(e){return Li=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Li(e)}function xi(e,t){return xi=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},xi(e,t)}r.Z.registerComponent("muteButton",_i),_i.prototype.controlText_="Mute";var Mi,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=Li(t),function(e,t){if(t&&("object"==ki(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,Ri()?Reflect.construct(t,n||[],Li(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&&xi(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=Ii(Li(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&&Ti(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(r.Z.getComponent("Component"));function Ai(e){return Ai="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},Ai(e)}function Di(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,Ni(r.key),r)}}function Ni(e){var t=function(e){if("object"!=Ai(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Ai(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ai(t)?t:t+""}function Zi(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Zi=function(){return!!e})()}function zi(e){return zi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},zi(e)}function Fi(e,t){return Fi=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Fi(e,t)}r.Z.registerComponent("playerOverlay",Bi),function(e){e.Default="play",e.Hover="hover"}(Mi||(Mi={}));var Vi=r.Z.getPlugin("plugin"),Ui="cv-preview-mode",Hi=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=zi(t),function(e,t){if(t&&("object"==Ai(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||[],zi(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&&Fi(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===Mi.Hover)return this.buttonAdded||this.addButtons(t),this.player.addClass(Ui),this.enableSubtites(),this.mute(),this.removeActivityTimeout(),void this.player.trigger("resize");n===Mi.Hover&&(this.player.removeClass(Ui),this.disableSubtitles(),this.unmute(),this.restoreActivityTimeout(),this.player.trigger("resize"))}},{key:"addButtons",value:function(e){var t=new _i(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}}])&&Di(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Vi);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 qi(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Wi(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Ki(r.key),r)}}function Yi(e,t,n){return t&&Wi(e.prototype,t),n&&Wi(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Ki(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 Ji(e,t,n){return t=Xi(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,Qi()?Reflect.construct(t,n||[],Xi(e).constructor):t.apply(e,n))}function Qi(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Qi=function(){return!!e})()}function Xi(e){return Xi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Xi(e)}function $i(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&&ea(e,t)}function ea(e,t){return ea=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ea(e,t)}r.Z.registerPlugin("playerModePlugin",Hi);var ta=r.Z.getComponent("Component"),na=r.Z.getComponent("ClickableComponent"),ra=function(e){function t(){return qi(this,t),Ji(this,t,arguments)}return $i(t,e),Yi(t,[{key:"createEl",value:function(){return ta.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>")})}}])}(ta),oa=function(e){function t(e,n){var r;return qi(this,t),(r=Ji(this,t,[e,n])).isFavourited=n.isFavourited,r.renderIcon(),r.update(),r}return $i(t,e),Yi(t,[{key:"renderIcon",value:function(){this.icon&&this.removeChild(this.icon),this.icon=new ra(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=ta.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)}}])}(na);function ia(e){return ia="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},ia(e)}function aa(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"!=ia(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=ia(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ia(t)?t:t+""}function ca(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(ca=function(){return!!e})()}function la(e){return la=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},la(e)}function sa(e,t){return sa=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},sa(e,t)}oa.prototype.controlText_="Favourite";var fa=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"==ia(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,ca()?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&&sa(e,t)}(t,e),n=t,(r=[{key:"setFavourite",value:function(e,t){if(!this.initialized){var n=new oa(this.player,{isFavourited:e,onClick:t});this.player.addChild(n),this.initialized=!0}}}])&&aa(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(r.Z.getPlugin("plugin"));function pa(e){return pa="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},pa(e)}function ya(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"!=pa(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=pa(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==pa(t)?t:t+""}function ha(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(ha=function(){return!!e})()}function va(e,t,n,r){var o=ba(ma(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof o?function(e){return o.apply(n,e)}:o}function ba(){return ba="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=ma(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}},ba.apply(null,arguments)}function ma(e){return ma=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ma(e)}function ga(e,t){return ga=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ga(e,t)}r.Z.registerPlugin("favouritePlugin",fa),n(95027);var wa=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=ma(t),function(e,t){if(t&&("object"==pa(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||[],ma(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&&ga(e,t)}(t,e),n=t,(o=[{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=va(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),va(t,"dispose",this,3)([])}}])&&ya(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(r.Z.getComponent("MenuItem"));function Oa(e){return Oa="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},Oa(e)}function Pa(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,Sa(r.key),r)}}function Sa(e){var t=function(e){if("object"!=Oa(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Oa(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Oa(t)?t:t+""}function ja(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(ja=function(){return!!e})()}function Ca(){return Ca="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=_a(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}},Ca.apply(null,arguments)}function _a(e){return _a=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},_a(e)}function ka(e,t){return ka=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ka(e,t)}r.Z.registerComponent("LoopVideoMenuItem",wa);var Ta=r.Z.getPlugin("plugin"),Ea=(r.Z.getComponent("MenuItem"),r.Z.getComponent("LoopVideoMenuItem")),Ra=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=_a(t),function(e,t){if(t&&("object"==Oa(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,ja()?Reflect.construct(t,n||[],_a(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&&ka(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({index:0,ctor:Ea,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=Ca(_a(1&3?e.prototype:e),"dispose",n))?function(e){return r.apply(n,e)}:r)([])}}],r&&Pa(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Ta);function Ia(e){return Ia="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},Ia(e)}function La(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,xa(r.key),r)}}function xa(e){var t=function(e){if("object"!=Ia(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Ia(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ia(t)?t:t+""}function Ma(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Ma=function(){return!!e})()}function Ba(e){return Ba=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ba(e)}function Aa(e,t){return Aa=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Aa(e,t)}r.Z.registerPlugin("loopVideoPlugin",Ra),n(46620);var Da="cv-active-button",Na=r.Z.getComponent("Menu"),Za=r.Z.getComponent("Component"),za=r.Z.getComponent("MenuButton"),Fa=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"==Ia(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,Ma()?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&&Aa(e,t)}(t,e),n=t,(o=[{key:"createMenu",value:function(){var e,t=new Na(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 Za(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}}])&&La(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(za),Va=za.prototype.pressButton;za.prototype.pressButton=function(){Va.call(this),this.inactivityTimeout=this.player_.cache_.inactivityTimeout,this.player_.cache_.inactivityTimeout=0,this.player_.options_.inactivityTimeout=0};var Ua=za.prototype.unpressButton;function Ha(e){return Ha="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},Ha(e)}function Ga(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,qa(r.key),r)}}function qa(e){var t=function(e){if("object"!=Ha(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Ha(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ha(t)?t:t+""}function Wa(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Wa=function(){return!!e})()}function Ya(e,t,n,r){var o=Ka(Ja(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof o?function(e){return o.apply(n,e)}:o}function Ka(){return Ka="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Ja(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}},Ka.apply(null,arguments)}function Ja(e){return Ja=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ja(e)}function Qa(e,t){return Qa=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Qa(e,t)}za.prototype.unpressButton=function(){Ua.call(this),this.player_.cache_.inactivityTimeout=this.inactivityTimeout,this.player_.options_.inactivityTimeout=this.inactivityTimeout,this.player_.reportUserActivity()},za.prototype.setActive=function(e){e?this.addClass(Da):this.removeClass(Da)},r.Z.registerComponent("MenuButton",Fa);var Xa=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=Ja(t),function(e,t){if(t&&("object"==Ha(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,Wa()?Reflect.construct(t,n||[],Ja(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&&Qa(e,t)}(t,e),n=t,(r=[{key:"buildCSSClass",value:function(){return"cv-time-wrapper ".concat(Ya(t,"buildCSSClass",this,3)([]))}},{key:"createEl",value:function(e,n,r){return Ya(t,"createEl",this,3)([e,Object.assign(Object.assign({},n),{className:this.buildCSSClass()}),r])}}])&&Ga(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(r.Z.getComponent("Component"));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 eu(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,tu(r.key),r)}}function tu(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 nu(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(nu=function(){return!!e})()}function ru(e){return ru=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ru(e)}function ou(e,t){return ou=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ou(e,t)}Xa.prototype.options_={children:["currentTimeDisplay","remainingTimeDisplay"]},r.Z.registerComponent("TimeWrapper",Xa);var iu=r.Z.getComponent("SeekBar"),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=ru(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,nu()?Reflect.construct(t,n||[],ru(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&&ou(e,t)}(t,e),n=t,(r=[{key:"handleMouseDown",value:function(e){var t=this.player_.preventScrubbingPlugin();t.isEnabled&&this.getMouseTime(e)>t.furthestVisitedTime||(iu.prototype.handleMouseDown.call(this,e),this.player_.addClass("cv-disable-play-pause-feedback"))}},{key:"handleMouseMove",value:function(e){iu.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;iu.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(iu.prototype.calculateDistance.call(this,e).x,0,1)*this.player_.duration()}}])&&eu(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(iu);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)}r.Z.registerComponent("SeekBar",au);var hu=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=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,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&&du(e,t)}(t,e),n=t,(r=[{key:"buildCSSClass",value:function(){return"cv-chapter-bar-load-progress ".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:"update",value:function(e){this.el_.style.width=100*e+"%"}}])&&cu(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(r.Z.getComponent("Component"));function vu(e){return vu="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},vu(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,mu(r.key),r)}}function mu(e){var t=function(e){if("object"!=vu(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=vu(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==vu(t)?t:t+""}function gu(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(gu=function(){return!!e})()}function wu(e,t,n,r){var o=Ou(Pu(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof o?function(e){return o.apply(n,e)}:o}function Ou(){return Ou="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Pu(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}},Ou.apply(null,arguments)}function Pu(e){return Pu=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Pu(e)}function Su(e,t){return Su=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Su(e,t)}var ju=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=Pu(t),function(e,t){if(t&&("object"==vu(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,gu()?Reflect.construct(t,n||[],Pu(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&&Su(e,t)}(t,e),n=t,(r=[{key:"buildCSSClass",value:function(){return"cv-chapter-bar-play-progress ".concat(wu(t,"buildCSSClass",this,3)([]))}},{key:"createEl",value:function(e,n,r){return wu(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+"%"}}])&&bu(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(r.Z.getComponent("Component"));function Cu(e){return Cu="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},Cu(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,ku(r.key),r)}}function ku(e){var t=function(e){if("object"!=Cu(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Cu(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Cu(t)?t:t+""}function Tu(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Tu=function(){return!!e})()}function Eu(e,t,n,r){var o=Ru(Iu(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=Iu(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 Iu(e){return Iu=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Iu(e)}function Lu(e,t){return Lu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Lu(e,t)}var xu=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=Iu(t),function(e,t){if(t&&("object"==Cu(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||[],Iu(e).constructor):t.apply(e,n))}(this,t,[e,n])).playProgress=new ju(r.player_),r.addChild(r.playProgress),r.loadProgress=new hu(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&&Lu(e,t)}(t,e),n=t,(r=[{key:"buildCSSClass",value:function(){return"cv-chapter-bar-item ".concat(Eu(t,"buildCSSClass",this,3)([]))}},{key:"createEl",value:function(e,n,r){return Eu(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)}}])&&_u(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(r.Z.getComponent("Component")),Mu=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 Au(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Du(r.key),r)}}function Du(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 Nu(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Nu=function(){return!!e})()}function Zu(e,t,n,r){var o=zu(Fu(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof o?function(e){return o.apply(n,e)}:o}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=Fu(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 Fu(e){return Fu=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Fu(e)}function Vu(e,t){return Vu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Vu(e,t)}var Uu=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=Fu(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,Nu()?Reflect.construct(t,n||[],Fu(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&&Vu(e,t)}(t,e),n=t,(r=[{key:"buildCSSClass",value:function(){return"cv-chapter-bar-items ".concat(Zu(t,"buildCSSClass",this,3)([]))}},{key:"createEl",value:function(e,n,r){return Zu(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,Mu.b)(e.player_))})}}])&&Au(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(r.Z.getComponent("Component"));function Hu(e){return Hu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Hu(e)}function Gu(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,qu(r.key),r)}}function qu(e){var t=function(e){if("object"!=Hu(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Hu(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Hu(t)?t:t+""}function Wu(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Wu=function(){return!!e})()}function Yu(e,t,n,r){var o=Ku(Ju(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof o?function(e){return o.apply(n,e)}:o}function Ku(){return Ku="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Ju(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}},Ku.apply(null,arguments)}function Ju(e){return Ju=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ju(e)}function Qu(e,t){return Qu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Qu(e,t)}var Xu=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=Ju(t),function(e,t){if(t&&("object"==Hu(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Wu()?Reflect.construct(t,n||[],Ju(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&&Qu(e,t)}(t,e),n=t,(o=[{key:"dispose",value:function(){this.player_.off("durationchange",this.onDurationChange),this.player_.off("progress",this.updateBuffered),Yu(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=Yu(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 Uu(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 xu(this.player_,{startTime:a,endTime:u});if(r.addChild(l),c&&u===c)break}else r.addChild(new xu(this.player_,{startTime:0,endTime:this.player_.duration()||3600}));this.chapterBarItems&&this.removeChild(this.chapterBarItems),this.chapterBarItems=r,this.addChild(this.chapterBarItems)}}])&&Gu(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(r.Z.getComponent("SeekBar"));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 ec(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,tc(r.key),r)}}function tc(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 nc(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(nc=function(){return!!e})()}function rc(){return rc="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=oc(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}},rc.apply(null,arguments)}function oc(e){return oc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},oc(e)}function ic(e,t){return ic=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ic(e,t)}Xu.prototype.options_={children:["playProgressBar"],barName:"playProgressBar"},r.Z.browser.IS_IOS||r.Z.browser.IS_ANDROID||Xu.prototype.options_.children.splice(1,0,"mouseTimeDisplay"),r.Z.registerComponent("ChapterSeekBar",Xu);var ac=r.Z.getComponent("ProgressControl"),uc="seekBar",cc=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=oc(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,nc()?Reflect.construct(t,n||[],oc(e).constructor):t.apply(e,n))}(this,t,arguments)).seekBarName_=uc,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&&ic(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())===uc.toLowerCase()&&(e=this.seekBarName_),(n=t,r=this,"function"==typeof(o=rc(oc(1&3?n.prototype:n),"getChild",r))?function(e){return o.apply(r,e)}:o)([e]);var n,r,o}}],r&&ec(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(ac);cc.prototype.options_={children:[]},r.Z.registerComponent("ProgressControl",cc);var lc=n(28788),sc=n(30708);function fc(e){return fc="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},fc(e)}function pc(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,yc(r.key),r)}}function yc(e){var t=function(e){if("object"!=fc(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=fc(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==fc(t)?t:t+""}function dc(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(dc=function(){return!!e})()}function hc(){return hc="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=vc(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}},hc.apply(null,arguments)}function vc(e){return vc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},vc(e)}function bc(e,t){return bc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},bc(e,t)}var mc=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=vc(t),function(e,t){if(t&&("object"==fc(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,dc()?Reflect.construct(t,n||[],vc(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&&bc(e,t)}(t,e),n=t,o=[{key:"createEl",value:function(){var e,n,o,i=(e=t,n=this,"function"==typeof(o=hc(vc(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,sc.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&&pc(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(r.Z.getComponent("TimeTooltip"));function gc(e){return gc="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},gc(e)}function wc(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,Oc(r.key),r)}}function Oc(e){var t=function(e){if("object"!=gc(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=gc(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==gc(t)?t:t+""}function Pc(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Pc=function(){return!!e})()}function Sc(){return Sc="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=jc(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}},Sc.apply(null,arguments)}function jc(e){return jc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},jc(e)}function Cc(e,t){return Cc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Cc(e,t)}r.Z.registerComponent("TimeTooltip",mc);var _c=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=jc(t),function(e,t){if(t&&("object"==gc(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||[],jc(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&&Cc(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=Sc(jc(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&&wc(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(r.Z.getComponent("Component"));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){return Ic=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ic(e)}function Lc(e,t){return Lc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Lc(e,t)}_c.prototype.options_={scaleFactor:1},r.Z.registerComponent("ThumbnailDisplay",_c);var xc=r.Z.getComponent("MouseTimeDisplay"),Mc="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=Ic(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||[],Ic(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&&Lc(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(lc.Hx),c=!1;a.isEnabled&&(c=i>a.furthestVisitedTime),c?(n.hide(),u.show(),(0,Bt.Ds)(u.hide,lc.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(Mc)}},{key:"removeForceShow",value:function(){this.removeClass(Mc)}}])&&Tc(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(xc);function Ac(e){return Ac="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},Ac(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"!=Ac(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Ac(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ac(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)}Bc.prototype.options_={children:["ThumbnailDisplay","TimeTooltip"]},r.Z.registerComponent("MouseTimeDisplay",Bc);var Uc=r.Z.getComponent("ChaptersTrackMenuItem"),Hc=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=Fc(t),function(e,t){if(t&&("object"==Ac(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,[e,n])).nonIconControl=!1,r.thumbnailDisplay=new _c(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&&Vc(e,t)}(t,e),n=t,r=[{key:"update",value:function(){this.player_&&Uc.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=zc(Fc(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,sc.m)(this.options_.cue.startTime,e),")</p>")+"</span>"}}],r&&Dc(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Uc);function Gc(e){return Gc="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},Gc(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"!=Gc(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Gc(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Gc(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,t,n,r){var o=Jc(Qc(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof o?function(e){return o.apply(n,e)}:o}function Jc(){return Jc="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Qc(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}},Jc.apply(null,arguments)}function Qc(e){return Qc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Qc(e)}function Xc(e,t){return Xc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Xc(e,t)}var $c=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=Qc(t),function(e,t){if(t&&("object"==Gc(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||[],Qc(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&&Xc(e,t)}(t,e),n=t,(r=[{key:"buildCSSClass",value:function(){return"cv-chapters-button ".concat(Kc(t,"buildCSSClass",this,3)([]))}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-big ".concat(Kc(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 Hc(this.player_,{track:this.track_,cue:o});e.push(i)}return e}},{key:"setTrack",value:function(e){var n=this;if(Kc(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){Kc(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)}}])&&qc(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(r.Z.getComponent("ChaptersButton"));function el(e){return el="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},el(e)}function tl(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,nl(r.key),r)}}function nl(e){var t=function(e){if("object"!=el(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=el(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==el(t)?t:t+""}function rl(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(rl=function(){return!!e})()}function ol(){return ol="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=il(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}},ol.apply(null,arguments)}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("ChaptersButton",$c);var ul=r.Z.getComponent("OffTextTrackMenuItem"),cl=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),n.track={player:e,kind:n.kind,kinds:n.kinds,default:!1,mode:"hidden"},n.kinds||(n.kinds=[n.kind]),n.label?n.track.label=n.label:n.track.label=n.kinds.join(" and ")+" off",n.selectable=!0,n.multiSelectable=!1,function(e,t,n){return t=il(t),function(e,t){if(t&&("object"==el(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,rl()?Reflect.construct(t,n||[],il(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&&al(e,t)}(t,e),n=t,r=[{key:"handleClick",value:function(e){ul.prototype.handleClick.call(this,e);for(var t=this.player_.textTracks(),n=0;n<t.length;n++){var r=t[n];"subtitles"===r.kind&&(r.mode="hidden")}this.player_.trigger("cv:languageselected")}},{key:"createEl",value:function(e,n,r){return(o=t,i=this,"function"==typeof(a=ol(il(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&&tl(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)}r.Z.registerComponent("OffTextTrackMenuItem",cl);var hl=r.Z.getComponent("TextTrackButton"),vl=r.Z.getComponent("TextTrackMenuItem"),bl=r.Z.getComponent("OffTextTrackMenuItem"),ml=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=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,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&&dl(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]:vl;this.label_&&(e="".concat(this.label_," off")),t.push(new bl(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&&sl(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(hl);r.Z.registerComponent("TextTrackButton",ml);var gl=n(61173);function wl(e){return wl="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},wl(e)}function Ol(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Pl(r.key),r)}}function Pl(e){var t=function(e){if("object"!=wl(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=wl(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==wl(t)?t:t+""}function Sl(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Sl=function(){return!!e})()}function jl(e){return jl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},jl(e)}function Cl(e,t){return Cl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Cl(e,t)}var _l=r.Z.getComponent("SubsCapsMenuItem"),kl=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=jl(t),function(e,t){if(t&&("object"==wl(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,Sl()?Reflect.construct(t,n||[],jl(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&&Cl(e,t)}(t,e),n=t,(r=[{key:"handleClick",value:function(e){_l.prototype.handleClick.call(this,e);for(var t=this.player_.textTracks(),n=0;n<t.length;n++){var r=t[n];"subtitles"===r.kind&&"disabled"===r.mode&&(r.mode="hidden")}this.player_.trigger("cv:languageselected")}}])&&Ol(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(_l);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 El(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 Il(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Il=function(){return!!e})()}function Ll(e){return Ll=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ll(e)}function xl(e,t){return xl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},xl(e,t)}var Ml=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=Ll(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,Il()?Reflect.construct(t,n||[],Ll(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&&xl(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()})}}])&&El(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(r.Z.getComponent("TextTrackMenuItem"));function Bl(e){return Bl="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},Bl(e)}function Al(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,Dl(r.key),r)}}function Dl(e){var t=function(e){if("object"!=Bl(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Bl(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Bl(t)?t:t+""}function Nl(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Nl=function(){return!!e})()}function Zl(e){return Zl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Zl(e)}function zl(e,t){return zl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},zl(e,t)}var Fl=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=Zl(t),function(e,t){if(t&&("object"==Bl(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,Nl()?Reflect.construct(t,n||[],Zl(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&&zl(e,t)}(t,e),n=t,(r=[{key:"handleClick",value:function(){var e=this;this.requestAnimationFrame(function(){e.player_.getChild("collapserator").getChild("subtitleSizeButton").showCollapsibleMenu()})}}])&&Al(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(r.Z.getComponent("TextTrackMenuItem"));function Vl(e){return Vl="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},Vl(e)}function Ul(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,Hl(r.key),r)}}function Hl(e){var t=function(e){if("object"!=Vl(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Vl(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Vl(t)?t:t+""}function Gl(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Gl=function(){return!!e})()}function ql(e){return ql=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ql(e)}function Wl(e,t){return Wl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Wl(e,t)}var Yl=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=ql(t),function(e,t){if(t&&("object"==Vl(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||[],ql(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&&Wl(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<gl.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}}])&&Ul(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(r.Z.getComponent("TextTrackMenuItem"));function Kl(e){return Kl="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},Kl(e)}function Jl(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,Ql(r.key),r)}}function Ql(e){var t=function(e){if("object"!=Kl(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Kl(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Kl(t)?t:t+""}function Xl(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Xl=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=es(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 es(e){return es=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},es(e)}function ts(e,t){return ts=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ts(e,t)}r.Z.registerComponent("ToggleTranscriptMenuItem",Yl);var ns=r.Z.getComponent("TextTrackButton"),rs=r.Z.getComponent("SubsCapsButton"),os=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=es(t),function(e,t){if(t&&("object"==Kl(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,Xl()?Reflect.construct(t,n||[],es(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&&ts(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=$l(es(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&&window.innerWidth>=gl.E&&e.push(new Yl(this.player_)),this.player_.options_.allowTranscript||e.push(new Ml(this.player_)),e.push(new Fl(this.player_)),this.hideThreshold_=this.hideThreshold_+2}return this.player().trigger("resizemenus"),ns.prototype.createItems.call(this,e,kl)}},{key:"onSelectedLanguageChange",value:function(){for(var e=this.player_.textTracks(),t=0;t<e.length;t++)if("showing"===e[t].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(){rs.prototype.handleClick.apply(this)}}],r&&Jl(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(rs);function is(e){return is="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},is(e)}function as(){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 us(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]())):(us(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,us(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return c.prototype=l,us(f,"constructor",l),us(l,"constructor",c),c.displayName="GeneratorFunction",us(l,o,"GeneratorFunction"),us(f),us(f,o,"Generator"),us(f,r,function(){return this}),us(f,"toString",function(){return"[object Generator]"}),(as=function(){return{w:i,m:p}})()}function us(e,t,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}us=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){us(e,t,function(e){return this._invoke(t,n,e)})};i("next",0),i("throw",1),i("return",2)}},us(e,t,n,r)}function cs(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"!=is(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=is(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==is(t)?t:t+""}function ss(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(ss=function(){return!!e})()}function fs(e){return fs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},fs(e)}function ps(e,t){return ps=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ps(e,t)}r.Z.registerComponent("SubsCapsButton",os);var ys="<span class='vjs-local-cache-indicator-icon' title='Streaming from ClickView Local Cache'>".concat(Qn,"</span>"),ds=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=fs(t),function(e,t){if(t&&("object"==is(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||[],fs(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&&ps(e,t)}(t,e),n=t,(r=[{key:"handleLocalCacheChange",value:function(){return e=this,t=void 0,n=void 0,r=as().m(function e(){var t,n;return as().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+ys);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)}}}])&&cs(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(r.Z.getComponent("MenuItem"));function hs(e){return hs="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},hs(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,bs(r.key),r)}}function bs(e){var t=function(e){if("object"!=hs(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=hs(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==hs(t)?t:t+""}function ms(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(ms=function(){return!!e})()}function gs(e,t,n,r){var o=ws(Os(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof o?function(e){return o.apply(n,e)}:o}function ws(){return ws="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Os(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}},ws.apply(null,arguments)}function Os(e){return Os=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Os(e)}function Ps(e,t){return Ps=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Ps(e,t)}var Ss={144:"144p (Preview)",240:"240p",360:"360p",480:"480p",720:"720p",1080:"1080p"},js=r.Z.getComponent("MenuButton"),Cs=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=Os(t),function(e,t){if(t&&("object"==hs(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,ms()?Reflect.construct(t,n||[],Os(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&&Ps(e,t)}(t,e),n=t,(r=[{key:"buildCSSClass",value:function(){return"cv-quality-button ".concat(gs(t,"buildCSSClass",this,3)([]))}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small vjs-quality-button cv-has-left-icons ".concat(gs(t,"buildWrapperCSSClass",this,3)([]))}},{key:"createItems",value:function(){var e=[],t=this.player_.qualityLevels();e.push(new m.Z(this.player_,{label:"Quality"}));for(var n=0;n<t.length;n++){var r=t[n];if(r){var o=Ss[r.id];o&&e.push(new ds(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?Ss[t.id]:""}},{key:"showInCollabsibleMenu",value:function(){return!!this.player_.qualityLevels().length}},{key:"showCollapsibleMenu",value:function(){js.prototype.handleClick.apply(this)}}])&&vs(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(js);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 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,Ts(r.key),r)}}function Ts(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 Es(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Es=function(){return!!e})()}function Rs(){return Rs="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Is(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}},Rs.apply(null,arguments)}function Is(e){return Is=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Is(e)}function Ls(e,t){return Ls=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Ls(e,t)}r.Z.registerComponent("QualityButton",Cs);var xs=r.Z.getComponent("Menu"),Ms=r.Z.getComponent("MenuButton"),Bs=r.Z.getComponent("PlaybackRateMenuItem"),As=r.Z.getComponent("PlaybackRateMenuButton"),Ds=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=Is(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,Es()?Reflect.construct(t,n||[],Is(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&&Ls(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=Ms.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=Rs(Is(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 xs(this.player(),{menuButton:this});e.addItem(new m.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=Ms.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=As.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&&ks(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(As);function Ns(e){return Ns="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},Ns(e)}function Zs(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,zs(r.key),r)}}function zs(e){var t=function(e){if("object"!=Ns(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Ns(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ns(t)?t:t+""}function Fs(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Fs=function(){return!!e})()}function Vs(e){return Vs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Vs(e)}function Us(e,t){return Us=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Us(e,t)}r.Z.registerComponent("PlaybackRateMenuButton",Ds);var Hs=r.Z.getComponent("TextTrackSettings"),Gs={backgroundColor:"#000",backgroundOpacity:"1",color:"#FFF",edgeStyle:void 0,fontFamily:"proportionalSansSerif",fontPercent:1,textOpacity:"1",windowColor:"#000",windowOpacity:"0"},qs={small:Gs,medium:Object.assign(Object.assign({},Gs),{fontPercent:1.5}),large:Object.assign(Object.assign({},Gs),{fontPercent:2})},Ws=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=Vs(t),function(e,t){if(t&&("object"==Ns(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||[],Vs(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&&Us(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 qs[this.size_]?qs[this.size_]:Gs}}])&&Zs(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Hs);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,t,n,r){var o=$s(ef(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=ef(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 ef(e){return ef=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ef(e)}function tf(e,t){return tf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},tf(e,t)}r.Z.registerComponent("TextTrackSettings",Ws);var nf=window.navigator&&window.navigator.userAgent||"",rf=(/iPod/i.test(nf),/Android/i.test(nf),r.Z.getComponent("Player")),of=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=ef(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||[],ef(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&&tf(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 Xs(t,"currentTime",this,3)([e]);this.callback_(function(){r.unlock(),r.currentTime(e)})}},{key:"play",value:function(){var e=this;if(!this.callback_)return Xs(t,"play",this,3)([]);this.callback_(function(){e.unlock(),e.play()})}},{key:"createEl",value:function(){var e=this,n=Xs(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=Xs(t,"addChild",this,3)([e,n,r]),i=o.el();return i&&this.videoContainer.appendChild(i),o}},{key:"updateStyleEl_",value:function(){if(rf.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()===Mi.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;rf.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&&Ks(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(rf);function af(e){return af="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},af(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,cf(r.key),r)}}function cf(e){var t=function(e){if("object"!=af(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=af(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==af(t)?t:t+""}function lf(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(lf=function(){return!!e})()}function sf(e){return sf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},sf(e)}function ff(e,t){return ff=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ff(e,t)}of.prototype.options_=Object.assign(Object.assign({},rf.prototype.options_),{setMaxHeight:!0}),r.Z.registerComponent("player",of);var pf=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=sf(t),function(e,t){if(t&&("object"==af(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,lf()?Reflect.construct(t,n||[],sf(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&&ff(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"})}}])&&uf(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(r.Z.getComponent("Component"));function yf(e){return yf="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},yf(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,hf(r.key),r)}}function hf(e){var t=function(e){if("object"!=yf(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=yf(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==yf(t)?t:t+""}function vf(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(vf=function(){return!!e})()}function bf(e){return bf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},bf(e)}function mf(e,t){return mf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},mf(e,t)}r.Z.registerComponent("PlayPauseFeedback",pf);var gf=r.Z.getComponent("PlayToggle"),wf="Play (space)",Of=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=bf(t),function(e,t){if(t&&("object"==yf(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||[],bf(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&&mf(e,t)}(t,e),n=t,(r=[{key:"handlePlay",value:function(){gf.prototype.handlePlay.call(this),this.controlText("Pause (space)")}},{key:"handlePause",value:function(){gf.prototype.handlePause.call(this),this.controlText(wf)}},{key:"handleClick",value:function(e){var t=this;gf.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)}}])&&df(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(gf);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 Sf(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,jf(r.key),r)}}function jf(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 Cf(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Cf=function(){return!!e})()}function _f(e){return _f=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},_f(e)}function kf(e,t){return kf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},kf(e,t)}r.Z.registerComponent("PlayToggle",Of),Of.prototype.controlText_=wf;var Tf=r.Z.getComponent("TextTrackDisplay"),Ef=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"==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,Cf()?Reflect.construct(t,n||[],_f(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&&kf(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){Tf.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"}}}}}])&&Sf(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Tf);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 If(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Lf(r.key),r)}}function Lf(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 xf(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(xf=function(){return!!e})()}function Mf(e){return Mf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Mf(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",Ef);var Af=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=Mf(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,xf()?Reflect.construct(t,n||[],Mf(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>'})}}])&&If(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(r.Z.getComponent("Component"));function Df(e){return Df="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},Df(e)}function Nf(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,Zf(r.key),r)}}function Zf(e){var t=function(e){if("object"!=Df(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Df(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Df(t)?t:t+""}function zf(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(zf=function(){return!!e})()}function Ff(e,t,n,r){var o=Vf(Uf(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof o?function(e){return o.apply(n,e)}:o}function Vf(){return Vf="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Uf(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}},Vf.apply(null,arguments)}function Uf(e){return Uf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Uf(e)}function Hf(e,t){return Hf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Hf(e,t)}r.Z.registerComponent("ControlBarGradient",Af);var Gf=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=Uf(t),function(e,t){if(t&&("object"==Df(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,zf()?Reflect.construct(t,n||[],Uf(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&&Hf(e,t)}(t,e),n=t,(r=[{key:"createEl",value:function(){var e=this.options_.title;if(!this.options_.seriesName)return Ff(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,Ff(t,"createEl",this,3)(["h1",{innerHTML:e}])):(e="<div class='cv-splash-series'>".concat(this.options_.seriesName.toUpperCase(),"</div>")+e,Ff(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}}])&&Nf(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(r.Z.getComponent("Component"));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 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,Yf(r.key),r)}}function Yf(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 Kf(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Kf=function(){return!!e})()}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=Qf(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 Qf(e){return Qf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Qf(e)}function Xf(e,t){return Xf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Xf(e,t)}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=Qf(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,Kf()?Reflect.construct(t,n||[],Qf(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&&Xf(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=Jf(Qf(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&&Wf(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(r.Z.getComponent("Component"));function ep(e){return ep="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},ep(e)}function tp(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,np(r.key),r)}}function np(e){var t=function(e){if("object"!=ep(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=ep(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ep(t)?t:t+""}function rp(e,t){if(t&&("object"==ep(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 op(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(op=function(){return!!e})()}function ip(e){return ip=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ip(e)}function ap(e,t){return ap=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ap(e,t)}var up=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=ip(i=t),r=rp(o,op()?Reflect.construct(i,a||[],ip(o).constructor):i.apply(o,a)),n.embed?(r.addChild(new Gf(e,n)),r.addChild(new $f(e,n)),r):rp(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&&ap(e,t)}(t,e),n=t,(o=[{key:"createEl",value:function(){return r.Z.dom.createEl("div",{className:"cv-splash-metadata"})}}])&&tp(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(r.Z.getComponent("Component"));function cp(e){return cp="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},cp(e)}function lp(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,sp(r.key),r)}}function sp(e){var t=function(e){if("object"!=cp(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=cp(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==cp(t)?t:t+""}function fp(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(fp=function(){return!!e})()}function pp(e){return pp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},pp(e)}function yp(e,t){return yp=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},yp(e,t)}var dp=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=pp(t),function(e,t){if(t&&("object"==cp(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,fp()?Reflect.construct(t,n||[],pp(e).constructor):t.apply(e,n))}(this,t,[e,n])).addChild(new up(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&&yp(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(Mt,"</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}}])&&lp(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(r.Z.getComponent("posterImage"));function hp(e){return hp="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},hp(e)}function vp(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,bp(r.key),r)}}function bp(e){var t=function(e){if("object"!=hp(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=hp(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==hp(t)?t:t+""}function mp(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(mp=function(){return!!e})()}function gp(e){return gp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},gp(e)}function wp(e,t){return wp=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},wp(e,t)}r.Z.registerComponent("posterImage",dp);var Op=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=gp(t),function(e,t){if(t&&("object"==hp(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,mp()?Reflect.construct(t,n||[],gp(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&&wp(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 '})}}])&&vp(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(r.Z.getComponent("ErrorDisplay"));function Pp(e){return Pp="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},Pp(e)}function Sp(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,jp(r.key),r)}}function jp(e){var t=function(e){if("object"!=Pp(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Pp(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Pp(t)?t:t+""}function Cp(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Cp=function(){return!!e})()}function _p(e){return _p=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},_p(e)}function kp(e,t){return kp=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},kp(e,t)}r.Z.registerComponent("ErrorDisplay",Op);var Tp=r.Z.getComponent("FullscreenToggle"),Ep="Fullscreen (f)",Rp=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=_p(t),function(e,t){if(t&&("object"==Pp(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,Cp()?Reflect.construct(t,n||[],_p(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&&kp(e,t)}(t,e),n=t,(r=[{key:"handleFullscreenChange",value:function(){Tp.prototype.handleFullscreenChange.call(this),this.controlText(Ep)}}])&&Sp(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Tp);function Ip(e){return Ip="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},Ip(e)}function Lp(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,xp(r.key),r)}}function xp(e){var t=function(e){if("object"!=Ip(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Ip(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ip(t)?t:t+""}function Mp(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Mp=function(){return!!e})()}function Bp(e){return Bp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Bp(e)}function Ap(e,t){return Ap=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Ap(e,t)}r.Z.registerComponent("FullscreenToggle",Rp),Rp.prototype.controlText_=Ep;var Dp=r.Z.getComponent("MuteToggle"),Np="Mute (m)",Zp=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"==Ip(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,Mp()?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&&Ap(e,t)}(t,e),n=t,(r=[{key:"updateControlText_",value:function(){var e=this.player_.muted()||0===this.player_.volume()?"Unmute (m)":Np;this.controlText_!==e&&this.controlText(e)}}])&&Lp(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Dp);r.Z.registerComponent("MuteToggle",Zp),Zp.prototype.controlText_=Np;var zp=n(87013),Fp=n(88483);function Vp(e){return Vp="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},Vp(e)}function Up(){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 Hp(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]())):(Hp(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,Hp(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return c.prototype=l,Hp(f,"constructor",l),Hp(l,"constructor",c),c.displayName="GeneratorFunction",Hp(l,o,"GeneratorFunction"),Hp(f),Hp(f,o,"Generator"),Hp(f,r,function(){return this}),Hp(f,"toString",function(){return"[object Generator]"}),(Up=function(){return{w:i,m:p}})()}function Hp(e,t,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}Hp=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){Hp(e,t,function(e){return this._invoke(t,n,e)})};i("next",0),i("throw",1),i("return",2)}},Hp(e,t,n,r)}function Gp(e){return function(e){if(Array.isArray(e))return qp(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 qp(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)?qp(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 qp(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 Wp(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,Yp(r.key),r)}}function Yp(e){var t=function(e){if("object"!=Vp(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Vp(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Vp(t)?t:t+""}var Kp,Jp=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())})},Qp=r.Z.getComponent("Player"),Xp=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.player.loopVideoPlugin({allowLoop:this.options.allowLoop}),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=Qp.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(Gp(t),[{name:"collapserator",children:_e.filter(function(t){return!("fullscreenToggle"===t&&!e.options.allowFullscreen)})},"playPauseFeedback","controlBarGradient"]),userActions:{hotkeys:function(t){return function(e,t,n){if(!(e.ctrlKey||e.metaKey||e.altKey||e.shiftKey)){var r=Fe()(e);if(("t"!==r||n.allowTheatreMode)&&("f"!==r||n.allowFullscreen)&&Ye[r]){Ye[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 Jp(this,void 0,void 0,Up().m(function e(){var t,n,r=this;return Up().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")),Gp(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 Jp(this,void 0,void 0,Up().m(function i(){var a,u,c,l=this;return Up().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);t.track.isClickViewProduced=e.isClickViewProduced,B.O.sanitizeTrack(t.track,l.player),B.O.activeTextTrack(t.track)}}),a.posterUrl&&this.player.poster(zp.j.createUrl(a.posterUrl,{size:Fp.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 Ke.M&&(null===(t=e.response)||void 0===t?void 0:t.type)===We.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 Jp(this,void 0,void 0,Up().m(function e(){var t;return Up().w(function(e){for(;;)switch(e.n){case 0:if(!(Kp||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(Kp=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);Kp?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 Ne({player:this.player,collectionApiUrls:Kp.collectionApi.urls,collectionApiClientId:Kp.collectionApi.clientId,productVersion:"1.35.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||Je.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(void 0===e){if("showing"===r.mode)return r.label}else r.label===e?r.mode="showing":r.mode="hidden"}}},{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"}}])&&Wp(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}();Xp.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(56336),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,h(r.key),r)}}function h(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 v(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(v=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,v()?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 B(e,t){return B=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},B(e,t)}o.Z.registerComponent("PictureInPictureToggle",_);var A=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&&B(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 A(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 U=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 U;function G(e){return G="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},G(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"!=G(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=G(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==G(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"==G(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(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"),he="cvplayer-points-of-interest",ve=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(he)&&(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(he,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({index:0,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",ve),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 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 Ae(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"!=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 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 Ue=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"==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,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}}])&&Ae(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 Ge(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 Ue(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&&Ge(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(o.Z.getPlugin("plugin"));o.Z.registerPlugin("rangeIndicatorPlugin",Qe),n(95027);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})}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:"addTranscript",value:function(e){return $e.O.getTrack(this.player,"metadata","transcript",e)?null:this.player.addTextTrack("metadata","transcript",e)}},{key:"useCurrentTranscript",value:function(e,t){return $e.O.useMetadataTracks(this.player,"transcript",e,t)}}])&&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 h(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(h=function(){return!!e})()}function v(e){return v=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},v(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=v(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,h()?Reflect.construct(t,n||[],v(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)},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"),h="cv-prevent-scrubbing-tooltip-show",v="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(h),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(v),window.requestAnimationFrame(function(){e.removeClass(v)})),this.player_.userActive(!1),this.removeClass(h),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])).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}},{key:"disable",value:function(){this.player.off("timeupdate",this.onTimeUpdate),this.getProgressControl().removeChild(this.getPreventScrubbingTooltip()),this.isEnabled=!1}},{key:"getProgressControl",value:function(){return this.player.controlBar.getChild("progressControl")}},{key:"onTimeUpdate",value:function(){var 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)",h="Default view (t)",v="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(h):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(v),this.button.updateControlText(d),this.button.setActive(!0)):(null===(t=this.button)||void 0===t||t.removeClass(v),this.button.updateControlText(h),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)},61173:function(e,t,n){"use strict";n.d(t,{E:function(){return ve}});var r=n(76032),o=n(70065),i=n(32735),a=(n(51614),n(16951)),u=n(83983),c=n.n(u),l=n(11306),s=n(31647),f=n(6697),p=n(47416),y={ALLOWED_TAGS:["i","b","u","ruby","rt"]},d="en-US",h=new Map,v={getLanguagesOptions:function(e){if(!e)return[];var t=e.filter(function(e){return!e.customer});return t.map(function(e){return{label:f.y.getEnglishName(e,t),value:e.language,id:e.id}}).sort(function(e,t){var n=e.value.includes(m)?1:0;return(t.value.includes(m)?1:0)-n})},transformVtt:function(e){if(!e)return[];var t=[],n=new(c().WebVTT.Parser)(window,c().WebVTT.StringDecoder()),r=[];return n.oncue=function(e){r.push(e)},n.onparsingerror=function(e){t.push(e)},n.parse(e),n.flush(),t.length>0&&s.Q.Ry.throw(new l.H("Failed to parse vtt, ".concat(t.map(function(e){return e.message})))),r},createTextTrackList:function(e,t){var n=document.createElement("video"),r=n.addTextTrack("subtitles",t?p.S.getEnglishName(t):"English",t||d);return e.forEach(function(e){r.addCue(e)}),n.textTracks},attachCuesToPlayer:function(e,t,n){var r;if(t){var o=null===(r=null==e?void 0:e.addTranscript)||void 0===r?void 0:r.call(e,n||d),i=v.transformVtt(t);return null==i||i.forEach(function(e){null==o||o.addCue(e)}),o}},transformVttToTextTrackList:function(e,t,n){var r="".concat(n,"-").concat(t);if(h.has(r))return h.get(r);if(!e)return null;var o=v.transformVtt(e),i=v.createTextTrackList(o,t);return h.set(r,i),i},sanitizeCueText:function(e){return(0,a.sanitize)(e,y)}},b="transcript-selected-language",m="en";function g(e){var t,n;return(null===(t=e.find(function(e){return e.language.includes(m)}))||void 0===t?void 0:t.language)||(null===(n=e[0])||void 0===n?void 0:n.language)}var w=n(94878),O=n(42648),P=n(6620),S=n(19442),j=n(40221);function C(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 _(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)?_(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 _(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 k=/\n/g;var T=n(57857),E=n(52076),R=n(58424),I=n(39396),L=n(21326),x=n(85475);function M(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 B=T.T.encloseNamespace("shared.copyContentIconButton");function A(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 M(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)?M(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(L.u,{title:B(o?"copied":"copy"),spanHack:!0,spanHackClassName:e.tooltipClassName||""},i.createElement(R.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(I.x,{svgName:x.vn.Copy,size:I.S.Small})))}var D=n(32557),N=n(27866),Z={timePoint:"VOCS4",wide:"ewc3a",item:"sbTZM",inPlayer:"ZSsXf"};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}function F(e){var t,n,r=e.currentTimePoint===e.timePoint,a=(t=(0,D.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 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.")}()),u=a[0],c=a[1];return i.createElement("div",Object.assign({},e.isAuthenticated&&{role:"button"},{className:"d-flex p-2 align-items-center cursor-pointer rounded text-dark ".concat(e.inPlayer?Z.inPlayer:""," ").concat(e.isAuthenticated?"cursor-pointer":""," ").concat(Z.item," ").concat(r?"bg-gray-100":""),id:e.timePoint.toString(),onClick:function(){e.onClick(),E.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("div",{className:"d-flex flex-column align-items-center"},i.createElement("div",{className:"bg-light-blue text-info rounded-pill d-inline py-1 text-center ".concat(Z.timePoint," ").concat(e.wideTimeTag?Z.wide:""," ").concat(r?"bg-white":"")},N.T.ToDisplayDuration(1e3*e.timePoint))),i.createElement("div",{className:"".concat(Z.transcript," ms-3 w-100")},e.nodes.map(function(t,n){var r=v.sanitizeCueText(t.text);return null===t.searchResultIndex?i.createElement("span",{key:n,dangerouslySetInnerHTML:{__html:r}}):i.createElement("mark",{className:"".concat(Z.mark," ").concat(t.searchResultIndex===e.currentSearchResultIndex?"bg-orange":"bg-yellow"),key:n,dangerouslySetInnerHTML:{__html:r}})})),i.createElement(A,{copyableContent:e.transcript,visible:c,onClick:function(){E.k.logUserAction(Object.assign(Object.assign({},e.analyticsData),{cueIndex:e.cueIndex}),Object.assign(Object.assign({},e.analyticsOptions),{actionType:o.Vw.Copy}))}}))}function V(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("div",{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("div",{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,o.get(a)+1,". ",l)),i.createElement(F,{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}))})))}n(40194),n(68003);var U=n(53808),H=n(95544);function G(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 q=T.T.encloseNamespace("playPage.transcriptSearchBar");function W(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 G(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)?G(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){E.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(U.q.debounce(function(e){return l(e)},500),[]);function f(){E.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(){E.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 h(e){c("focus"===e)}return i.createElement("div",{className:(0,H.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(I.x,{svgName:x.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:q("searchPlaceholder"),ref:r,onKeyDown:function(e){"Enter"===e.key&&(e.preventDefault(),e.shiftKey?p():f())},onFocus:function(){return h("focus")},onBlur:function(){return h("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(R.L,{"aria-label":q("previousResult"),onClick:function(){return d({keepFocus:!1})},onKeyDown:function(e){"Enter"!==e.key&&" "!==e.key||d({keepFocus:!0})}},i.createElement(I.x,{svgName:x.vn.ChevronUp})),i.createElement(R.L,{"aria-label":q("nextResult"),onClick:function(){return y({keepFocus:!1})},onKeyDown:function(e){"Enter"!==e.key&&" "!==e.key||y({keepFocus:!0})}},i.createElement(I.x,{svgName:x.vn.ChevronDown})),i.createElement(R.L,{"aria-label":q("clearSearch"),onClick:function(){var t;l(""),null===(t=r.current)||void 0===t||t.focus(),e.onSearch("")}},i.createElement(I.x,{svgName:x.vn.Close}))))}n(66703);var Y,K,J=n(2491),Q=(n(45344),n(87268));n(19650),(K=Y||(Y={})).Resources="resources",K.Interactives="interactives",K.Video="video",K.Clips="clips",K.CurriculumLinks="curriculum-links",K.VideoDetails="video-details",K.RelatedVideos="related-videos",K.ClippedFrom="clipped-from",K.Transcript="transcript",T.T.encloseNamespace("shared.playPageTranscription");var X=n(42539),$={languageSelect:"rHbhp",inputWithoutHighlight:"nJvbl"};function ee(){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 te(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]())):(te(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,te(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return c.prototype=l,te(f,"constructor",l),te(l,"constructor",c),c.displayName="GeneratorFunction",te(l,o,"GeneratorFunction"),te(f),te(f,o,"Generator"),te(f,r,function(){return this}),te(f,"toString",function(){return"[object Generator]"}),(ee=function(){return{w:i,m:p}})()}function te(e,t,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}te=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){te(e,t,function(e){return this._invoke(t,n,e)})};i("next",0),i("throw",1),i("return",2)}},te(e,t,n,r)}function ne(e){var t,n,r=null===(t=e.languageOptions[0])||void 0===t?void 0:t.label,a=e.track.src,u=(0,J.Z)();return i.createElement("div",{className:"d-flex px-1 mb-3"},i.createElement(W,{query:e.searchQuery,currentSearchResultIndex:e.currentSearchResultIndex,onSearch:e.onSearch,totalSearchResults:e.totalSearchResults,jumpToSearchResult:e.jumpToSearchResult,analyticsData:e.analyticsData,analyticsOptions:e.analyticsOptions}),i.createElement(L.u,{spanHack:!0,title:e.languageOptions.length>1?"":"Only available in ".concat(r)},i.createElement(X.Z,null,i.createElement(X.Z.Toggle,{className:"text-dark ".concat($.languageSelect),id:"language-select",disabled:(null===(n=e.languageOptions)||void 0===n?void 0:n.length)<=1,variant:"outline-dark"},i.createElement(I.x,{svgName:x.vn.Globe})),i.createElement(X.Z.Menu,{className:$.menu,"aria-labelledby":"language-select"},e.languageOptions.map(function(t,n){return i.createElement(X.Z.Item,{key:n,onClick:function(){var n;null===(n=e.onChangeLanguage)||void 0===n||n.call(e,t.value),E.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(S.h,{svgName:x.vn.Download,onClick:function(){return t=this,n=void 0,r=void 0,i=ee().m(function t(){return ee().w(function(t){for(;;)switch(t.n){case 0:return E.k.logUserAction(e.analyticsData,Object.assign(Object.assign({},e.analyticsOptions),{actionType:o.Vw.Download})),t.p=1,t.n=2,Q.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 re=n(89722),oe=n(69140);function ie(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 ae(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)?ae(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 ae(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 ue(e){var t=oe.S.get(b)||g(e.allTracks),n=i.useState(function(){return e.allTracks.find(function(e){return e.language===t})||e.allTracks.find(function(t){return t.language===g(e.allTracks)})}),r=ie(n,2),a=r[0],u=r[1],c=ie(i.useState(t),2),l=c[0],s=c[1],f=ie(i.useState(-1),2),p=f[0],y=f[1],d=ie(i.useState(!0),2),h=d[0],v=d[1],m=ie(i.useState([]),2),w=m[0],_=m[1],T=i.useMemo(function(){return Array.from((null==a?void 0:a.cues)||[])},[l]),E={videoId:e.playbackObject.videoId,videoName:e.playbackObject.title,language:l},R={location:o.LZ.Player,entity:o.py.Transcript},I=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===j.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:T,setCurrentCueIndex:y,hasStarted:I});var L=i.useRef(),M=(0,P.MG)({count:w.length,getScrollElement:function(){var e;return null===(e=L.current)||void 0===e?void 0:e.view},estimateSize:function(){return 40},enabled:w.length>0}),B=M.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,h,M),N=function(e){var t=e.cuesToDisplay,n=e.resetHighlightedCues,r=e.setHighlightedCues,o=e.scrollToCue,a=C(i.useState(""),2),u=a[0],c=a[1],l=C(i.useState(null),2),s=l[0],f=l[1],p=C(i.useState(0),2),y=p[0],d=p[1],h=C(i.useTransition(),2)[1];return{isSearching:null!==s,searchQuery:u,onSearch:function(e){c(e),0!==y&&d(0),h(function(){!function(e){if(!e.length)return f(null),void n();var i=new RegExp(e.replace(k," "),"gi"),a=[],u=0,c=t.map(function(e,t){var n=e.text,r=n.replace(k," ").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:T,resetHighlightedCues:Q,setHighlightedCues:_,scrollToCue:A}),Z=N.isSearching,z=N.searchQuery,F=N.totalSearchResults,U=N.jumpToSearchResult,H=N.onSearch,G=N.currentSearchResultIndex,q=N.resetSearchResults,W=e.player.paused(),Y=ie((0,D.X)(),2),K=Y[0],J=Y[1];function Q(){_(T.map(function(e){return Object.assign(e,{nodes:[{text:e.text,searchResultIndex:null}]})}))}return i.useEffect(function(){v(!J&&!Z&&I&&!W)},[J,Z,I,W]),i.useEffect(function(){Q()},[T]),a&&T.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(S.h,{svgName:x.vn.Close,onClick:function(){e.toggleTranscript(!1)},ariaLabel:"Close transcript"})),i.createElement(ne,{selectedLanguage:l,languageOptions:e.languageOptions,onChangeLanguage:function(t){u(e.allTracks.find(function(e){return e.language===t})),s(t),oe.S.set(b,t),q()},track:a,onSearch:H,searchQuery:z,currentSearchResultIndex:G,totalSearchResults:F,jumpToSearchResult:U,analyticsData:E,analyticsOptions:R}),i.createElement("div",{className:"cv-transcript-list-wrapper text-dark"},i.createElement(O.ZP,{ref:L},i.createElement(V,{timepoint:T[p],onClickTranscriptionItem:function(t){var n;null===(n=e.setStartTime)||void 0===n||n.call(e,t.startTime)},cuesToDisplay:w,chapters:e.chapters,currentSearchResultIndex:G,inPlayer:!0,virtualizer:M,items:B,analyticsOptions:R,analyticsData:E,isAuthenticated:!1})))):i.createElement(i.Fragment,null)}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(){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=ye(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 ye(e){return ye=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ye(e)}function de(e,t){return de=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},de(e,t)}r.Z.registerComponent("Transcript",(0,re.Z)(function(e,t){return i.createElement(ue,Object.assign({player:e},t))}));var he=r.Z.getPlugin("plugin"),ve=992,be=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=ye(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||[],ye(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&&de(e,t)}(t,e),n=t,r=[{key:"bindListeners",value:function(){var e=this;this.onResize=this.onResize.bind(this),w.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=pe(ye(1&3?e.prototype:e),"dispose",n))?function(e){return r.apply(n,e)}:r)([])}},{key:"initialize",value:function(){w.O.useSubtitles(this.player,this.onTrackLoaded.bind(this)),w.O.useChapters(this.player,this.onChaptersLoaded.bind(this))}},{key:"onChaptersLoaded",value:function(e){this.chapterTrack=e}},{key:"onTrackLoaded",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:e.label,value:e.language}}).sort(function(e,t){var n=e.value.includes(m)?1:0;return(t.value.includes(m)?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<ve?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&&le(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(he);r.Z.registerPlugin("viewTranscriptPlugin",be)},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&&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 v=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}}])}(v);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)})}},activeTextTrack:function(e){"disabled"===e.mode&&"subtitles"===e.kind&&(e.mode="hidden")}}},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(){}}]);