@clickview/lite 0.0.4 → 0.0.5-dev.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.
@@ -14,7 +14,9 @@ export declare class DefaultApplication extends Core.Application {
14
14
  static get router(): typeof DefaultAppRouter;
15
15
  index(): void;
16
16
  playVideo(id: string): void;
17
+ playSharedVideo(shortCode: string): void;
17
18
  myUploads(params: HashObject): void;
19
+ favoriteVideos(params: HashObject): void;
18
20
  series(id: string, params: HashObject): void;
19
21
  catchAllRoutes(): void;
20
22
  notFound(): void;
@@ -17,6 +17,7 @@ export declare class PlaylistsApplication extends Core.Application {
17
17
  newPlaylist(): void;
18
18
  editPlaylist(id: string): void;
19
19
  deletePlaylist(id: string): void;
20
+ addToPlaylist(videoId: string): void;
20
21
  removeVideoFromPlaylist(videoId: string, playlistId: string): void;
21
22
  protected onShowAlert(options?: ObjectHash): void;
22
23
  }
package/dist/bundle.js CHANGED
@@ -1 +1 @@
1
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("React"),require("@clickview/shared"),require("@clickview/common"),require("@clickview/playlists"),require("ReactCustomScrollbars"),require("Backbone"),require("ReactRedux"),require("Handlebars")):"function"==typeof define&&define.amd?define(["React","@clickview/shared","@clickview/common","@clickview/playlists","ReactCustomScrollbars","Backbone","ReactRedux","Handlebars"],t):"object"==typeof exports?exports["@clickview/lite"]=t(require("React"),require("@clickview/shared"),require("@clickview/common"),require("@clickview/playlists"),require("ReactCustomScrollbars"),require("Backbone"),require("ReactRedux"),require("Handlebars")):e["@clickview/lite"]=t(e.React,e["@clickview/shared"],e["@clickview/common"],e["@clickview/playlists"],e.ReactCustomScrollbars,e.Backbone,e.ReactRedux,e.Handlebars)}(window,(function(e,t,n,a,r,o,i,c){return function(e){var t={};function n(a){if(t[a])return t[a].exports;var r=t[a]={i:a,l:!1,exports:{}};return e[a].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,a){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:a})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var a=Object.create(null);if(n.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(a,r,function(t){return e[t]}.bind(null,r));return a},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=18)}([function(t,n){t.exports=e},function(e,n){e.exports=t},function(e,t){e.exports=n},function(e,t){e.exports=a},function(e,t,n){e.exports={nav:"_3RLQ9",logoContainer:"UIlc9",searchBar:"_2E7RQ",actionButtons:"_2HygL",avatar:"_2OoYm",notifications:"_2b7ER",hamburger:"_2BRko",searchBarContainer:"oX-Ph"}},function(e,t,n){e.exports={content:"_1SX2l",collapsedNavContent:"_3LJFz",openNavContent:"_34Pt4",hiddenNavContent:"_1gZ0J",mask:"mE2Dq"}},function(e,t,n){e.exports={leftNav:"_3jVyN",iconPlaceholder:"_1ud9G",leftNavAnchor:"_3A_-8",leftNavText:"_3qbRh",leftNavCollapsed:"_2idO9"}},function(e,t){e.exports=r},function(e,t){e.exports=o},function(e,t,n){e.exports={fixed:"_3C4_W",inline:"_2voRI"}},function(e,t){e.exports=i},function(e,t,n){var a=n(17);e.exports=(a.default||a).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,a,r){return'<div class="layout-region position-relative"></div>'},useData:!0})},function(e){e.exports=JSON.parse("{}")},function(e){e.exports=JSON.parse("{}")},function(e){e.exports=JSON.parse("{}")},function(e){e.exports=JSON.parse("{}")},function(e,t,n){},function(e,t){e.exports=c},function(e,t,n){"use strict";n.r(t);n(12),n(13),n(14),n(15),n(16);var a=n(3),r={Default:{HOME:"index",MY_UPLOADS:"my:uploads",SERIES:"series"},Playlists:{HOME:a.Actions.Playlists.HOME,PLAYLIST:a.Actions.Playlists.PLAYLIST,NEW_PLAYLIST:a.Actions.Playlists.NEW_PLAYLIST,EDIT_PLAYLIST:a.Actions.Playlists.EDIT_PLAYLIST,DELETE_PLAYLIST:a.Actions.Playlists.DELETE_PLAYLIST,REMOVE_VIDEO_FROM_PLAYLIST:a.Actions.Playlists.REMOVE_VIDEO_FROM_PLAYLIST}},o={DEFAULT:"default:application",PLAYLISTS:"lite:playlists:application"},i={CONTENT:"content",POPUP:"popup",ALERT:"alert"},c={TEACHER_LAYOUT:"TeacherLayout"},l=Object.assign(Object.assign({},{VIDEO:"series,season,rating,producers,distributors,resources,tags,productionCompanies,directors,links,thumbnail"}),{VIDEO_COLLECTION:"{orderbydesc:timestamp,page:1,limit:25}thumbnail,tags,rating,series,season"}),u=n(0),s=n(2),p=n(1),f=n(10),m={url:"api/currentUser",key:"currentuser"},d={url:"/api/config",key:"config"},y=function(e){return"/api/domain/v2/objects/".concat(e,"?query=").concat(l.VIDEO)},h=function(e){return"api/domain/v2/objects/8961024/videos?query=".concat(l.VIDEO_COLLECTION).concat(function(e){return e?"&cursor=".concat(e):""}(e))},v=function(e){return{url:y(e),key:"videos:".concat(e)}},b=function(e){return{url:h(e),key:"workspace:".concat(e)}};var g=function(e){return"/api/domain/v2/objects/".concat(e)},E=function(e,t){return"/api/domain/v2/objects/".concat(e,"/videos?query=").concat(l.VIDEO_COLLECTION).concat(function(e){return e?"&cursor=".concat(e):""}(t))},L=function(e){return"/api/domain/v1/subjects/".concat(e,"/path")},S=function(e){return{url:g(e),key:"series:".concat(e)}},w=function(e,t){return{url:E(e,t),key:"series:".concat(e,":videos:").concat(t)}},P=function(e){if(e)return{url:L(e),key:"series:".concat(e,":breadcrumbs")}};var N=n(4),O=n.n(N);function k(){return u.createElement("svg",{viewBox:"0 0 434 71"},u.createElement("g",null,u.createElement("path",{fill:"#000000",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"}),u.createElement("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"})))}function C(e){var t=e.user&&e.user.avatar;return u.createElement("div",{className:"mx-2"},u.createElement("span",{className:O.a.avatar,style:{backgroundImage:"url('".concat(t,"')")}}," "))}function A(){return u.createElement("div",{className:"ml-2"},u.createElement("span",{className:O.a.notifications}," "))}function T(e){var t=s.Flight.useBasicFetch(m);return u.createElement("nav",{className:"navbar navbar-expanded sticky-top ".concat(O.a.nav," justify-content-start")},e.showLeftNavToggle&&u.createElement(p.SvgContainer,{svgName:p.cvSvgLibrary.Handle,className:O.a.hamburger,onClick:e.toggleLeftNav}),u.createElement("a",{className:"navbar-brand text-hide align-top ".concat(O.a.logoContainer," d-inline-block'"),href:"/"},u.createElement(k,null)),u.createElement("div",{className:"container search-bar-region ".concat(O.a.searchBarContainer)}),u.createElement("div",{className:"d-flex align-items-center pr-1 position-absolute ".concat(O.a.actionButtons)},u.createElement(p.IconButton,{svgName:p.cvSvgLibrary.Upload,className:"btn btn-secondary"},"Upload a video"),u.createElement(A,null),u.createElement(C,{user:t.data})))}var F,_=n(7),D=n.n(_),R=n(6),j=n.n(R);!function(e){e[e.Open=0]="Open",e[e.Collapsed=1]="Collapsed",e[e.Hidden=2]="Hidden"}(F||(F={}));var x=function(e){return u.createElement(p.AppLink,{className:"".concat(j.a.leftNavAnchor," d-block my-3"),appLink:e.appLink},u.createElement("span",{className:"".concat(j.a.iconPlaceholder)}),u.createElement("span",{className:"".concat(j.a.leftNavText)},e.name))};function I(e){if(e.navState===F.Hidden)return u.createElement(u.Fragment,null);var t=e.navState===F.Collapsed,n=s.LanguageService.encloseNamespace("shared.leftNav");return u.createElement("nav",{className:"".concat(j.a.leftNav," ").concat(t?j.a.leftNavCollapsed:"")},u.createElement(_.Scrollbars,{height:"100%"},u.createElement(x,{name:n("home"),appLink:{application:o.DEFAULT,action:r.Default.HOME}}),u.createElement(x,{name:n("myPlaylists"),appLink:{application:o.PLAYLISTS,action:r.Playlists.HOME}}),u.createElement(x,{name:n("myUploads"),appLink:{application:o.DEFAULT,action:r.Default.MY_UPLOADS}}),u.createElement(x,{name:n("following")}),u.createElement(x,{name:n("favouritedVideos")}),!t&&u.createElement(u.Fragment,null,u.createElement("hr",null),u.createElement(x,{name:n("watchHistory")}),u.createElement(x,{name:n("myClassrooms")}))))}function U(e){var t="".concat(e.webPlayerHost,"home/ev?vid=").concat(e.id);return u.createElement("div",{className:"embed-responsive embed-responsive-16by9 ".concat(e.className)},u.createElement("iframe",{src:t,className:"embed-responsive-item",allowFullScreen:!0,allow:"autoplay; fullscreen"}))}function V(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],a=!0,r=!1,o=void 0;try{for(var i,c=e[Symbol.iterator]();!(a=(i=c.next()).done)&&(n.push(i.value),!t||n.length!==t);a=!0);}catch(e){r=!0,o=e}finally{try{a||null==c.return||c.return()}finally{if(r)throw o}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}var M=u.createContext(void 0);function B(e){var t=e.children,n=s.Flight.useBasicFetch(d),a=V(u.useState(null),2),r=a[0],o=a[1],i=V(u.useState(null),2),c=i[0],l=i[1],p={webPlayerUrl:n.data?n.data.webPlayerUrl:"",id:r,setId:o,position:c,setPosition:l};return u.createElement(M.Provider,{value:p},t)}var Y=n(9),H=n.n(Y);function q(){var e=u.useContext(M),t=e.id,n=e.webPlayerUrl,a=e.position;if(!t)return u.createElement(u.Fragment,null);var r={},o=H.a.fixed;return a&&(o=H.a.inline,r=a),u.createElement("div",{style:r,className:o},u.createElement(U,{id:t,webPlayerHost:n}))}function z(e){var t=e.video;return t.resources&&t.resources.data&&t.resources.data.length?u.createElement("div",{className:e.className},u.createElement("h2",{className:"h4"},"Resources"),t.resources.data.map((function(e,t){return u.createElement("div",{key:t},e.name)}))):u.createElement(u.Fragment,null)}function Q(e){var t=e.tags,n=e.className;return t&&t.data&&t.data.length?u.createElement("div",{className:n},"Tags: ",t.data.map((function(e,t){return u.createElement("span",{className:"badge mr-1 p-1 badge-light",key:t},e.name)}))):u.createElement(u.Fragment,null)}function J(e){var t=e.label,n=e.items,a=e.className;if(!(n&&n.data&&n.data.length))return u.createElement(u.Fragment,null);var r=n.data.map((function(e){return e.name})).join(", ");return u.createElement("div",{className:a},t,": ",r)}function W(e){var t=e.video,n=t.tags,a=t.rating,r=t.productionYear,o=t.productionCompanies,i=t.distributors,c=a&&a.code;return u.createElement(u.Fragment,null,u.createElement("h2",{className:"h4"},"Details"),u.createElement("div",{className:"row no-gutters"},u.createElement("div",{className:"col-3"},c&&u.createElement("div",{className:"pb-2"},"Rating: ",c),r&&u.createElement("div",{className:"pb-2"},"Production Year: ",r)),u.createElement("div",{className:"col-9"},u.createElement(J,{label:"Production Companies",items:o,className:"pb-2"}),u.createElement(J,{label:"Distributors",items:i,className:"pb-2"}),u.createElement(Q,{tags:n,className:"pb-2"}))))}function X(e){var t=e.description;return t?u.createElement(u.Fragment,null,u.createElement("h2",{className:"h4"},"Description"),u.createElement("p",null,t)):u.createElement(u.Fragment,null)}function G(e){var t=e.video;return u.createElement("div",{className:"rounded border px-3"},u.createElement(D.a,{autoHeight:!0,autoHeightMax:250},u.createElement("div",{className:"py-3"},u.createElement(W,{video:t}),u.createElement(X,{description:t.description}))))}function K(e){return function(t){var n=u.useCallback(t,[]);u.useEffect((function(){return window.addEventListener(e,n),function(){return window.removeEventListener(e,n)}}),[])}}var Z=K("scroll"),$=K("resize");function ee(e){var t=e.video,n=t.rating,a=t.productionYear;return u.createElement("div",null,n&&u.createElement("span",{className:"badge badge-light p-1 mr-1"},n.code),a&&u.createElement("span",{className:"badge badge-light p-1 mr-1"},a))}function te(){return u.createElement("div",{className:"mt-3"},u.createElement(p.IconButton,{svgName:p.cvSvgLibrary.Plus,className:"btn btn-outline-secondary mr-2"},"Create interactive video"),u.createElement(p.IconButton,{svgName:p.cvSvgLibrary.Plus,className:"btn btn-outline-secondary mr-2"},"Create clip"),u.createElement(p.IconButton,{svgName:p.cvSvgLibrary.More,className:"btn btn-light float-right ml-2"},"More"),u.createElement(p.IconButton,{svgName:p.cvSvgLibrary.Share,className:"btn btn-light float-right ml-2"},"Share"),u.createElement(p.IconButton,{svgName:p.cvSvgLibrary.AddToPlaylists,className:"btn btn-light float-right ml-2"},"Add to Playlist"),u.createElement(p.IconButton,{svgName:p.cvSvgLibrary.Plus,className:"btn btn-light float-right ml-2"},"Favourite"))}function ne(e){var t=e.video,n={application:o.DEFAULT,action:r.Default.SERIES,args:[t.series.id]};return u.createElement("h1",{className:"h3"},u.createElement(p.SeriesLink,{video:t,appLink:n}),t.name)}function ae(e){var t=u.useContext(M),n=t.setPosition,a=t.setId,i=s.Flight.useBasicFetch(v(e.id)),c=u.useRef(null),l=u.useCallback((function(e){e&&(c.current=e,f())}),[]),f=u.useMemo((function(){return s.FunctionHelper.debounce(function(e,t){return function(){if(e.current){var n=e.current.getBoundingClientRect(),a=window.pageXOffset||document.documentElement.scrollLeft,r=window.pageYOffset||document.documentElement.scrollTop;n.top<-n.height?t(null):t({top:r+n.top,left:a+n.left,width:n.width})}}}(c,n),100)}),[]);return Z(f),$(f),u.useEffect((function(){return function(){return n(null)}}),[]),i.data?(a(i.data.id),u.createElement(u.Fragment,null,u.createElement("div",{className:"d-flex justify-content-between"},u.createElement(p.BackButton,{appLink:{application:o.DEFAULT,action:r.Default.HOME},backToName:"Home"}),u.createElement("button",{className:"btn btn-light"},"Classroom mode")),u.createElement("div",{className:"embed-responsive embed-responsive-16by9 my-3",ref:l}),u.createElement(ne,{video:i.data}),u.createElement(ee,{video:i.data}),u.createElement(te,null),u.createElement("hr",null),u.createElement(G,{video:i.data}),u.createElement(z,{video:i.data,className:"mt-3"}))):u.createElement(u.Fragment,null)}function re(e,t){switch(t){case p.VideoAction.AddToPlaylist:case p.VideoAction.Share:return{application:o.DEFAULT,action:"index"}}}var oe=function(e){return{application:null,action:null,args:[e.id]}},ie=function(e){return{application:null,action:null,args:[e.id]}};function ce(e){var t=s.Flight.useBasicFetch(d),n=s.Flight.useBasicFetch(b(e.cursor));return t.data&&n.data?u.createElement(p.VideoActionsContext.Provider,{value:{getActionAppLink:re}},u.createElement(p.BannerHeader,{heading:s.LanguageService.getPhrase("shared.myUploads","header"),banner:null,imageCdnUrl:t.data.imageCdnUrl,actions:[{label:s.LanguageService.getPhrase("shared.myUploads","share"),appLink:{application:o.DEFAULT,action:"index"},svgName:p.cvSvgLibrary.Share,className:"btn btn-light",button:!0},{label:s.LanguageService.getPhrase("shared.myUploads","edit"),appLink:{application:o.DEFAULT,action:"index"},svgName:p.cvSvgLibrary.Edit,className:"btn btn-light",button:!0}]}),u.createElement("div",null,u.createElement("p",{className:"pt-3"},u.createElement(p.Text,{namespace:"shared.myUploads",phrase:"description"})),u.createElement(p.VideoList,{videos:n.data.data,cursors:n.data.pagination.cursors,getVideoAppLink:oe,getSeriesAppLink:ie}))):u.createElement(u.Fragment,null)}function le(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}var ue=s.LanguageService.encloseNamespace("shared.series"),se=function(e){return{application:null,action:null,args:[e.id]}},pe=function(e){return{application:null,action:null,args:[e.id]}},fe=function(e){return{application:o.DEFAULT,action:r.Default.SERIES,args:[e.id]}};function me(e){var t=s.Flight.useBasicFetch(d),n=s.Flight.useBasicFetch(S(e.id)),a=s.Flight.useBasicFetch(w(e.id,e.cursor)),i=[n.data];if(e.classificationId){var c=s.Flight.useBasicFetch(P(e.classificationId));c.data&&i.unshift.apply(i,le(c.data))}if(!a.data||!t.data)return u.createElement(u.Fragment,null);var l=ue("series",{seriesName:n.data.name});return u.createElement(u.Fragment,null,u.createElement(p.BannerHeader,{heading:l,banner:null,imageCdnUrl:t.data.imageCdnUrl,backButtonAppLink:{application:o.DEFAULT,action:r.Default.HOME},backButtonText:"Home",actions:[{label:s.LanguageService.getPhrase("shared.series","share"),appLink:{application:o.DEFAULT,action:"index"},svgName:p.cvSvgLibrary.Share,className:"btn btn-light mr-2",button:!0},{label:s.LanguageService.getPhrase("shared.series","follow"),appLink:{application:o.DEFAULT,action:"index"},svgName:p.cvSvgLibrary.Edit,className:"btn btn-light",button:!0}]}),u.createElement("div",null,u.createElement("div",{className:"border-bottom py-3 mb-3"},e.classificationId&&i.length<2?u.createElement(p.PartialBreadcrumbs,null):u.createElement(p.Breadcrumbs,{currentItem:n.data,type:p.BreadcrumbType.Static,getItemAppLink:se,data:i,rootItem:{label:ue("dashboard"),appLink:{application:o.DEFAULT,action:r.Default.HOME}}}),n.data.description&&u.createElement("p",{className:"pt-3"},n.data.description)),a.data?a.isFetching?u.createElement(p.PartialVideoList,null):u.createElement(p.VideoList,{videos:a.data.data,cursors:a.data.pagination.cursors,getVideoAppLink:pe,getSeriesAppLink:fe}):u.createElement(u.Fragment,null,"Empty State")))}var de=n(5),ye=n.n(de);function he(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],a=!0,r=!1,o=void 0;try{for(var i,c=e[Symbol.iterator]();!(a=(i=c.next()).done)&&(n.push(i.value),!t||n.length!==t);a=!0);}catch(e){r=!0,o=e}finally{try{a||null==c.return||c.return()}finally{if(r)throw o}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}var ve=function(e){var t=e.showNav,n=e.contentChild,a=e.popupChild,r=e.alertChild,o=he(u.useState(!1),2),i=o[0],c=o[1],l=Object(p.useMediaQuery)(p.MediaQueryStrings.XS),s=Object(p.useMediaQuery)(p.MediaQueryStrings.SM),f=Object(p.useMediaQuery)(p.MediaQueryStrings.XLG);u.useEffect((function(){c(!f)}),[f]);var m=function(e,t,n){return t?{state:e?F.Hidden:F.Open,showMask:!e,contentClass:ye.a.hiddenNavContent}:n?{state:e?F.Collapsed:F.Open,showMask:!e,contentClass:ye.a.collapsedNavContent}:{state:e?F.Collapsed:F.Open,showMask:!1,contentClass:e?ye.a.collapsedNavContent:ye.a.openNavContent}}(i,l,s);return u.createElement(u.Fragment,null,u.createElement(T,{toggleLeftNav:function(){c(!i)},showLeftNavToggle:t}),t&&u.createElement(I,{navState:m.state}),u.createElement("div",{className:"".concat(ye.a.content," ").concat(m.contentClass)},u.createElement("div",{className:"container"},n)),a,r,m.showMask&&u.createElement("div",{className:"modal-backdrop show ".concat(ye.a.mask)}),u.createElement(q,null))};function be(e){return u.createElement(f.Provider,{store:e.store},u.createElement(B,null,u.createElement(ve,Object.assign({},e))))}var ge=n(11),Ee=n.n(ge);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})(e)}function Se(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}function we(e,t){return!t||"object"!==Le(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Pe(e,t,n){return(Pe="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var a=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Ne(e)););return e}(e,t);if(a){var r=Object.getOwnPropertyDescriptor(a,t);return r.get?r.get.call(n):r.value}})(e,t,n||e)}function Ne(e){return(Ne=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Oe(e,t){return(Oe=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var ke=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=we(this,Ne(t).call(this,e))).childComponents={},n}var n,a,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}}),t&&Oe(e,t)}(t,e),n=t,r=[{key:"getCacheKey",value:function(e){return"".concat(c.TEACHER_LAYOUT,":").concat(e.showNav)}}],(a=[{key:"regions",value:function(){return{layout:{el:".layout-region",replaceEl:!0},"search-bar":{el:".search-bar-region",replaceEl:!0}}}},{key:"getChildComponents",value:function(){return{showNav:this.options.showNav,contentChild:this.childComponents[i.CONTENT],popupChild:this.childComponents[i.POPUP],alertChild:this.childComponents[i.ALERT],store:this.options.store}}},{key:"getSearchModel",value:function(){return s.ViewModelService.get("search",{ctor:p.Query})}},{key:"unsetRegion",value:function(e){delete this.childComponents[e],this.renderLayout()}},{key:"closePopup",value:function(){this.unsetRegion(i.POPUP)}},{key:"showChildView",value:function(e,t){this.childComponents[e]=t,this.renderLayout()}},{key:"renderLayout",value:function(){Pe(Ne(t.prototype),"showChildView",this).call(this,"layout",u.createElement(be,Object.assign({},this.getChildComponents()))),this.renderSearchBar()}},{key:"renderSearchBar",value:function(){Pe(Ne(t.prototype),"showChildView",this).call(this,"search-bar",new p.SearchBarView({model:this.getSearchModel()}))}},{key:"title",get:function(){return!1}},{key:"name",get:function(){return"TeacherLayoutView"}},{key:"template",get:function(){return Ee.a}}])&&Se(n.prototype,a),r&&Se(n,r),t}(s.ReactLayoutView);function Ce(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}var Ae=function(e,t){return{url:"/api/domain/v2/objects/".concat(e,"?query=").concat(p.SharedWithStatements.SERIES),key:"series:".concat(e),success:t}},Te=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.store=t.store}var t,n,a;return t=e,(n=[{key:"getSeries",value:function(e,t){var n=Ae(e,(function(e){return t&&t(new s.Core.Model(e))})),a=s.Flight.getResponse(this.store.getState(),n.key);return a.shouldFetch&&s.Flight.fetch(this.store.dispatch,n),a.data&&new s.Core.Model(a.data)}},{key:"name",get:function(){return p.SharedDataServices.SERIES}},{key:"channelName",get:function(){return p.SharedDataChannels.SERIES}}])&&Ce(t.prototype,n),a&&Ce(t,a),e}(),Fe=n(8);function _e(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}var De=function(e){return{url:"/api/domain/v2/me/libraries?type=customlibrary&type=unpublishedcustomlibrary",key:"libraries",success:e,normalize:!1}},Re=function(e,t){return{url:"/api/domain/v2/objects/".concat(e,"?query=").concat(p.SharedWithStatements.FOLDER),key:"folder:".concat(e),success:t}},je=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.store=t.store}var t,n,a;return t=e,(n=[{key:"getLibraries",value:function(e){var t=this,n=De((function(n){Fe.Radio.channel(t.channelName).trigger("libraries:sync",n),e&&e(new s.Core.Collection(n))})),a=s.Flight.getResponse(this.store.getState(),n.key);return a.shouldFetch&&s.Flight.fetch(this.store.dispatch,n),a.data&&new s.Core.Collection(a.data.map((function(e){return e.data})))}},{key:"getFolder",value:function(e,t){var n=Re(e,(function(e){return t&&t(new s.Core.Model(e))})),a=s.Flight.getResponse(this.store.getState(),n.key);return a.shouldFetch&&s.Flight.fetch(this.store.dispatch,n),a.data&&new s.Core.Model(a.data)}},{key:"name",get:function(){return p.SharedDataServices.LIBRARY}},{key:"channelName",get:function(){return"library:data:service"}}])&&_e(t.prototype,n),a&&_e(t,a),e}();function xe(){return u.createElement("div",{style:{height:"3000px"}},u.createElement("h1",null,"Hello World"),u.createElement(p.AppLink,{appLink:{application:o.DEFAULT,action:"play:video",args:["9122777"]}},"Play page 1"),u.createElement(p.AppLink,{appLink:{application:o.DEFAULT,action:"play:video",args:["3713435"]}},"Play page 2"))}function Ie(){return u.createElement(u.Fragment,null,u.createElement("h1",null,"Not Found"))}function Ue(e){return(Ue="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ve(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Me(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}function Be(e,t,n){return t&&Me(e.prototype,t),n&&Me(e,n),e}function Ye(e,t){return!t||"object"!==Ue(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function He(e){return(He=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function qe(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ze(e,t)}function ze(e,t){return(ze=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var Qe=function(e){function t(){return Ve(this,t),Ye(this,He(t).apply(this,arguments))}return qe(t,e),Be(t,[{key:"channelName",get:function(){return o.DEFAULT}},{key:"appRoutes",get:function(){return{"":"index","videos/:id":"playVideo","my-uploads":"myUploads","series/:id":"series","*path":"catchAllRoutes"}}},{key:"appLinks",get:function(){return["notFound"]}}]),t}(s.Core.AppRouter),Je=function(e){function t(){return Ve(this,t),Ye(this,He(t).apply(this,arguments))}return qe(t,e),Be(t,[{key:"index",value:function(){this.layout.showChildView(i.CONTENT,u.createElement(xe,null))}},{key:"playVideo",value:function(e){this.layout.showChildView(i.CONTENT,u.createElement(ae,{id:e}))}},{key:"myUploads",value:function(e){this.layout.showChildView(i.CONTENT,u.createElement(ce,{cursor:e.cursor}))}},{key:"series",value:function(e,t){this.layout.showChildView(i.CONTENT,u.createElement(me,{id:e,cursor:t.cursor}))}},{key:"catchAllRoutes",value:function(){this.layout.showChildView(i.CONTENT,u.createElement(Ie,null))}},{key:"notFound",value:function(){this.layout.showChildView(i.CONTENT,u.createElement(Ie,null))}},{key:"name",get:function(){return"Default Application"}},{key:"layoutOptions",get:function(){return{name:c.TEACHER_LAYOUT,options:{showNav:!0}}}},{key:"channelName",get:function(){return o.DEFAULT}}],[{key:"router",get:function(){return Qe}}]),t}(s.Core.Application);function We(e){return(We="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Xe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ge(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}function Ke(e,t,n){return t&&Ge(e.prototype,t),n&&Ge(e,n),e}function Ze(e,t){return!t||"object"!==We(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function $e(e){return($e=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function et(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&tt(e,t)}function tt(e,t){return(tt=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var nt=function(e){function t(){return Xe(this,t),Ze(this,$e(t).apply(this,arguments))}return et(t,e),Ke(t,[{key:"channelName",get:function(){return o.PLAYLISTS}},{key:"appRoutes",get:function(){return{"playlists(/)":"index","playlists/:id(/)":"playlist"}}},{key:"appLinks",get:function(){return["newPlaylist","editPlaylist","deletePlaylist","removeVideoFromPlaylist"]}}]),t}(s.Core.AppRouter),at=function(e){function t(){return Xe(this,t),Ze(this,$e(t).apply(this,arguments))}return et(t,e),Ke(t,[{key:"index",value:function(){this.layout.showChildView(i.CONTENT,u.createElement(a.PlaylistsContextProvider,null,u.createElement(a.PlaylistsView,{getPlaylistAppLink:function(e){return{application:o.PLAYLISTS,action:r.Playlists.PLAYLIST,args:[e.id]}}})))}},{key:"playlist",value:function(e){this.layout.showChildView(i.CONTENT,u.createElement(a.PlaylistView,{playlistId:e,application:o.PLAYLISTS,getVideoAppLink:function(e){return{application:o.DEFAULT,action:"play:video",args:[e.id]}},getSeriesAppLink:function(e){return{application:o.PLAYLISTS,action:r.Playlists.HOME}},allowEdit:!0}))}},{key:"newPlaylist",value:function(){var e=this;this.layout.showChildView(i.POPUP,u.createElement(a.NewPlaylistView,{application:o.PLAYLISTS,closePopup:function(){return e.layout.closePopup()}}))}},{key:"editPlaylist",value:function(e){var t=this;this.layout.showChildView(i.POPUP,u.createElement(a.EditPlaylistView,{playlistId:e,closePopup:function(){return t.layout.closePopup()}}))}},{key:"deletePlaylist",value:function(e){var t=this;this.layout.showChildView(i.POPUP,u.createElement(a.DeletePlaylistView,{playlistId:e,routeToOnDelete:{application:o.PLAYLISTS,action:r.Playlists.HOME},closePopup:function(){return t.layout.closePopup()}}))}},{key:"removeVideoFromPlaylist",value:function(e,t){var n=this;this.layout.showChildView(i.POPUP,u.createElement(a.RemoveVideoFromPlaylistView,{videoId:e,playlistId:t,closePopup:function(){return n.layout.closePopup()}}))}},{key:"onShowAlert",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.collection,n=t?t.toJSON():[],a=function(e){return Fe.Radio.channel(s.CommonChannels.ALERT).trigger("remove:alert",e)};this.layout.showChildView(i.ALERT,u.createElement(p.AlertList,{alerts:n,removeAlert:a}))}},{key:"name",get:function(){return"Playlists Application"}},{key:"layoutOptions",get:function(){return{name:c.TEACHER_LAYOUT,options:{showNav:!0}}}},{key:"channelName",get:function(){return o.PLAYLISTS}}],[{key:"router",get:function(){return nt}}]),t}(s.Core.Application);function rt(e){return(rt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ot(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function it(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}function ct(e,t){return!t||"object"!==rt(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function lt(e){return(lt=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function ut(e,t){return(ut=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var st=function(e){function t(){return ot(this,t),ct(this,lt(t).apply(this,arguments))}var n,a,i;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}}),t&&ut(e,t)}(t,e),n=t,(a=[{key:"appLinks",get:function(){return{searchResults:{application:o.DEFAULT,action:r.Default.MY_UPLOADS,args:[1]},series:{application:o.DEFAULT,action:r.Default.MY_UPLOADS,args:[1]},videoDetails:{application:o.DEFAULT,action:r.Default.MY_UPLOADS,args:[1]},tagSearch:{application:o.DEFAULT,action:r.Default.MY_UPLOADS,args:[1]},topic:{application:o.DEFAULT,action:r.Default.MY_UPLOADS,args:[1]}}}}])&&it(n.prototype,a),i&&it(n,i),t}(p.BaseSearchAppVariables);n.d(t,"Actions",(function(){return r})),n.d(t,"AppChannels",(function(){return o})),n.d(t,"LayoutRegions",(function(){return i})),n.d(t,"Layouts",(function(){return c})),n.d(t,"WithStatements",(function(){return l})),n.d(t,"TeacherLayoutView",(function(){return ke})),n.d(t,"FlightSeriesDataService",(function(){return Te})),n.d(t,"FlightLibraryDataService",(function(){return je})),n.d(t,"DefaultApplication",(function(){return Je})),n.d(t,"PlaylistsApplication",(function(){return at})),n.d(t,"SearchAppVariables",(function(){return st}))}])}));
1
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("React"),require("@clickview/shared"),require("@clickview/common"),require("@clickview/playlists"),require("@clickview/dashboard"),require("ReactRedux"),require("ReactCustomScrollbars"),require("Backbone"),require("Handlebars"),require("ReactBootstrap")):"function"==typeof define&&define.amd?define(["React","@clickview/shared","@clickview/common","@clickview/playlists","@clickview/dashboard","ReactRedux","ReactCustomScrollbars","Backbone","Handlebars","ReactBootstrap"],t):"object"==typeof exports?exports["@clickview/lite"]=t(require("React"),require("@clickview/shared"),require("@clickview/common"),require("@clickview/playlists"),require("@clickview/dashboard"),require("ReactRedux"),require("ReactCustomScrollbars"),require("Backbone"),require("Handlebars"),require("ReactBootstrap")):e["@clickview/lite"]=t(e.React,e["@clickview/shared"],e["@clickview/common"],e["@clickview/playlists"],e["@clickview/dashboard"],e.ReactRedux,e.ReactCustomScrollbars,e.Backbone,e.Handlebars,e.ReactBootstrap)}(window,(function(e,t,n,r,a,o,i,c,l,u){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var a=t[r]={i:r,l:!1,exports:{}};return e[r].call(a.exports,a,a.exports,n),a.l=!0,a.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)n.d(r,a,function(t){return e[t]}.bind(null,a));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=27)}([function(t,n){t.exports=e},function(e,n){e.exports=t},function(e,t){e.exports=n},function(e,t){e.exports=r},function(e,t){e.exports=a},function(e,t,n){e.exports={content:"_1SX2l",collapsedNavContent:"_3LJFz",openNavContent:"_34Pt4",hiddenNavContent:"_1gZ0J",mask:"mE2Dq",fixedBottomRightContainer:"Sgmex"}},function(e,t,n){e.exports={avatar:"_3g8JZ",iconPlaceholder:"_2hr_4"}},function(e,t,n){e.exports={nav:"_3RLQ9",logoContainer:"UIlc9",searchBar:"_2E7RQ",actionButtons:"_2HygL",hamburger:"_2BRko",searchBarContainer:"oX-Ph"}},function(e,t,n){e.exports={leftNav:"_3jVyN",iconPlaceholder:"_1ud9G",leftNavAnchor:"_3A_-8",leftNavText:"_3qbRh",leftNavCollapsed:"_2idO9"}},function(e,t,n){e.exports={fixed:"_3C4_W",inline:"_2voRI",closeSvg:"_2RiDj",buttons:"ZbN3s",flippedIcon:"_3nkTw"}},function(e,t){e.exports=o},function(e,t){e.exports=i},function(e,t){e.exports=c},function(e,t){e.exports=l},function(e,t){e.exports=u},function(e,t,n){var r=n(13);e.exports=(r.default||r).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,r,a){return'<div class="layout-region position-relative"></div>'},useData:!0})},function(e,t,n){var r=n(13);e.exports=(r.default||r).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,r,a){return'<div class="layout-region"></div>'},useData:!0})},function(e,t,n){e.exports={embeddedPlayer:"_3kXb6"}},function(e){e.exports=JSON.parse("{}")},function(e){e.exports=JSON.parse("{}")},function(e){e.exports=JSON.parse("{}")},function(e){e.exports=JSON.parse("{}")},function(e){e.exports=JSON.parse("{}")},function(e){e.exports=JSON.parse("{}")},function(e){e.exports=JSON.parse("{}")},function(e){e.exports=JSON.parse("{}")},function(e,t,n){},function(e,t,n){"use strict";n.r(t);n(18),n(19),n(20),n(21),n(22),n(23),n(24),n(25),n(26);var r=n(3),a=n(4),o={Default:{HOME:"index",MY_UPLOADS:"my:uploads",SERIES:"series",PLAY_VIDEO:"play:video",FAVORITE_VIDEOS:"favorite:videos"},Playlists:{HOME:r.Actions.Playlists.HOME,PLAYLIST:r.Actions.Playlists.PLAYLIST,NEW_PLAYLIST:r.Actions.Playlists.NEW_PLAYLIST,EDIT_PLAYLIST:r.Actions.Playlists.EDIT_PLAYLIST,DELETE_PLAYLIST:r.Actions.Playlists.DELETE_PLAYLIST,ADD_TO_PLAYLIST:r.Actions.Playlists.ADD_TO_PLAYLIST,REMOVE_VIDEO_FROM_PLAYLIST:r.Actions.Playlists.REMOVE_VIDEO_FROM_PLAYLIST},Dashboard:{HOME:a.Actions.Dashboard.HOME,DASHBOARD:a.Actions.Dashboard.DASHBOARD,VIDEO:a.Actions.Dashboard.VIDEO},Classifications:{CLASSIFICATION:a.Actions.Classifications.CLASSIFICATION,PLAYLIST:a.Actions.Classifications.PLAYLIST,VIDEO:a.Actions.Classifications.VIDEO,SERIES:a.Actions.Classifications.SERIES},Notifications:{HOME:"index"}},i={DEFAULT:"default:application",PLAYLISTS:"lite:playlists:application",DASHBOARD:"lite:dashboard:application",SUBJECT:"lite:subject:application",EMBED:"embed:application",NOTIFICATIONS:"notifications:application"},c={CONTENT:"content",POPUP:"popup",ALERT:"alert"},l={TEACHER_LAYOUT:"TeacherLayout",EMBED_LAYOUT:"EmbedLayout"},u=Object.assign(Object.assign({},{VIDEO:"series,season,rating,producers,distributors,resources,tags,productionCompanies,directors,links,thumbnail"}),{VIDEO_COLLECTION:"{orderbydesc:timestamp,page:1,limit:25}thumbnail,tags,rating,series,season"}),s=n(0),p=n(2),f=n(10),d=n(1),m={url:"api/currentUser",key:"currentuser"},y={url:"/api/config",key:"config"},h=function(e){return"/api/domain/v2/objects/".concat(e,"?query=").concat(u.VIDEO)},v=function(e){return"api/domain/v2/objects/8961024/videos?query=".concat(u.VIDEO_COLLECTION).concat(O(e))},b=function(e){return"/api/domain/v2/objects/9160822/videos?query=".concat(u.VIDEO_COLLECTION).concat(O(e))},g=function(e){return{url:h(e),key:"videos:".concat(e)}},E=function(e){return{url:v(e),key:"workspace:".concat(e)}},w=function(e){return{url:b(e),key:"favorite:videos:".concat(e)}};function O(e){return e?"&cursor=".concat(e):""}var S=function(e){return"/api/domain/v2/objects/".concat(e)},L=function(e,t){return"/api/domain/v2/objects/".concat(e,"/videos?query=").concat(u.VIDEO_COLLECTION).concat(function(e){return e?"&cursor=".concat(e):""}(t))},P=function(e){return"/api/domain/v1/subjects/".concat(e,"/path")},k=function(e){return{url:S(e),key:"series:".concat(e)}},N=function(e,t){return{url:L(e,t),key:"series:".concat(e,":videos:").concat(t)}},A=function(e){if(e)return{url:P(e),key:"series:".concat(e,":breadcrumbs")}};function C(e,t){switch(t){case d.VideoAction.AddToPlaylist:return{application:i.PLAYLISTS,action:o.Playlists.ADD_TO_PLAYLIST,args:[e.id]};case d.VideoAction.Share:return{application:i.DEFAULT,action:"index"}}}var T=function(e){return{application:null,action:null,args:[e.id]}},_=function(e){return{application:null,action:null,args:[e.id]}};function D(e){var t=p.Flight.useBasicFetch(y),n=p.Flight.useBasicFetch(w(e.cursor));return s.createElement(d.VideoActionsContext.Provider,{value:{getActionAppLink:C}},!!t.data&&s.createElement(d.BannerHeader,{heading:p.LanguageService.getPhrase("shared.favoriteVideos","header"),banner:null,imageCdnUrl:t.data.imageCdnUrl}),!!n.data&&s.createElement(d.VideoList,{videos:n.data.data,cursors:n.data.pagination.cursors,getVideoAppLink:T,getSeriesAppLink:_}))}function j(e){var t="".concat(e.webPlayerHost,"home/ev?vid=").concat(e.id);return s.createElement("div",{className:"embed-responsive ".concat(e.className?e.className:"")},s.createElement("iframe",{src:t,className:"embed-responsive-item",allowFullScreen:!0,allow:"autoplay; fullscreen"}))}function x(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],r=!0,a=!1,o=void 0;try{for(var i,c=e[Symbol.iterator]();!(r=(i=c.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){a=!0,o=e}finally{try{r||null==c.return||c.return()}finally{if(a)throw o}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}var V=s.createContext(void 0);function R(e){var t=e.children,n=p.Flight.useBasicFetch(y),r=x(s.useState(null),2),a=r[0],o=r[1],i=x(s.useState(null),2),c=i[0],l=i[1],u=x(s.useState(!1),2),f=u[0],d=u[1],m={webPlayerUrl:n.data?n.data.webPlayerUrl:"",video:a,setVideo:o,viewportPosition:c,setViewportPosition:l,isOnPlayPage:f,setIsOnPlayPage:d};return s.createElement(V.Provider,{value:m},t)}var F=n(9),I=n.n(F);function U(e){return{application:i.DEFAULT,action:o.Default.PLAY_VIDEO,args:[e]}}function B(e){var t,n=e.video;return s.createElement("h2",{className:"mb-0 h6"},!!n.series&&s.createElement(d.SeriesLink,{video:n,appLink:(t=n.series.id,{application:i.DEFAULT,action:o.Default.SERIES,args:[t]})}),s.createElement(d.AppLink,{appLink:U(n.id)},n.name))}function M(){var e=s.useContext(V),t=e.video,n=e.webPlayerUrl,r=e.viewportPosition,a=e.setVideo,o=e.isOnPlayPage;if(!t)return s.createElement(s.Fragment,null);var i={},c=I.a.fixed;return r&&(c=I.a.inline,i=r),r||(c+=" shadow"),s.createElement("div",{style:i,className:"".concat(c)},s.createElement(j,{id:t.id,webPlayerHost:n,className:"embed-responsive-16by9",key:t.id}),!r&&s.createElement("div",{className:"p-2 bg-white d-flex justify-content-between align-items-center"},s.createElement(B,{video:t}),s.createElement("span",{className:"".concat(I.a.buttons," flex-shrink-1")},s.createElement("span",{className:"cursor-pointer ml-1 float-right",role:"button",tabIndex:0,onClick:function(){return a(null)}},s.createElement(d.SvgContainer,{svgName:d.cvSvgLibrary.Close})),s.createElement(d.AppLink,{appLink:U(t.id)},!o&&s.createElement(d.SvgContainer,{svgName:d.cvSvgLibrary.NewWindow,className:"".concat(I.a.flippedIcon," d-inline-block svg-container float-right")})))))}function H(e){var t=e.video;return t.resources&&t.resources.data&&t.resources.data.length?s.createElement("div",{className:e.className},s.createElement("h2",{className:"h4"},"Resources"),t.resources.data.map((function(e,t){return s.createElement("div",{key:t},e.name)}))):s.createElement(s.Fragment,null)}var Y=n(11),q=n.n(Y);function J(e){var t=e.tags,n=e.className;return t&&t.data&&t.data.length?s.createElement("div",{className:n},s.createElement(d.Text,{phrase:"tags"})," ",t.data.map((function(e,t){return s.createElement("span",{className:"badge mr-1 p-1 badge-light",key:t},e.name)}))):s.createElement(s.Fragment,null)}function z(e){var t=e.label,n=e.items,r=e.className;if(!(n&&n.data&&n.data.length))return s.createElement(s.Fragment,null);var a=n.data.map((function(e){return e.name})).join(", ");return s.createElement("div",{className:r},t,": ",a)}function W(e){var t=e.video,n=t.tags,r=t.rating,a=t.productionYear,o=t.productionCompanies,i=t.distributors,c=r&&r.code;return s.createElement(s.Fragment,null,s.createElement("h2",{className:"h4"},s.createElement(d.Text,{phrase:"details"})),s.createElement("div",{className:"row no-gutters"},s.createElement("div",{className:"col-3"},c&&s.createElement("div",{className:"pb-2"},s.createElement(d.Text,{phrase:"rating",options:{code:c}})),a&&s.createElement("div",{className:"pb-2"},s.createElement(d.Text,{phrase:"productionYear",options:{year:a}}))),s.createElement("div",{className:"col-9"},s.createElement(z,{label:p.LanguageService.getPhrase("shared.videoDetails","productionCompanies"),items:o,className:"pb-2"}),s.createElement(z,{label:p.LanguageService.getPhrase("shared.videoDetails","distributors"),items:i,className:"pb-2"}),s.createElement(J,{tags:n,className:"pb-2"}))))}function Q(e){var t=e.description;return t?s.createElement(s.Fragment,null,s.createElement("h2",{className:"h4"},s.createElement(d.Text,{phrase:"description"})),s.createElement("p",null,t)):s.createElement(s.Fragment,null)}function X(e){var t=e.video;return s.createElement(d.LanguageNamespaceContext.Provider,{value:"shared.videoDetails"},s.createElement("div",{className:"rounded border px-3"},s.createElement(q.a,{autoHeight:!0,autoHeightMax:250},s.createElement("div",{className:"py-3"},s.createElement(W,{video:t}),s.createElement(Q,{description:t.description})))))}function Z(e){return function(t){var n=s.useCallback(t,[]);s.useEffect((function(){return window.addEventListener(e,n),function(){return window.removeEventListener(e,n)}}),[])}}var G=Z("scroll"),K=Z("resize");function $(e){var t=e.video,n={application:i.DEFAULT,action:o.Default.SERIES,args:t.series?[t.series.id]:[]};return s.createElement("h1",{className:"h3"},!!t.series&&s.createElement(d.SeriesLink,{video:t,appLink:n}),t.name)}function ee(e){var t=e.video,n=t.rating,r=t.productionYear;return s.createElement("div",null,n&&s.createElement("span",{className:"badge badge-light p-1 mr-1"},n.code),r&&s.createElement("span",{className:"badge badge-light p-1 mr-1"},r))}function te(){var e="btn btn-light float-right ml-2";return s.createElement(d.LanguageNamespaceContext.Provider,{value:"shared.playPage"},s.createElement("div",{className:"mt-3"},s.createElement(d.IconButton,{svgName:d.cvSvgLibrary.Plus,className:"btn btn-outline-secondary mr-2"},s.createElement(d.Text,{phrase:"createInteractive"})),s.createElement(d.IconButton,{svgName:d.cvSvgLibrary.Plus,className:"btn btn-outline-secondary mr-2"},s.createElement(d.Text,{phrase:"createClip"})),s.createElement(d.IconButton,{svgName:d.cvSvgLibrary.More,className:e},s.createElement(d.Text,{phrase:"more"})),s.createElement(d.IconButton,{svgName:d.cvSvgLibrary.Share,className:e},s.createElement(d.Text,{phrase:"share"})),s.createElement(d.IconButton,{svgName:d.cvSvgLibrary.AddToPlaylists,className:e},s.createElement(d.Text,{phrase:"addToPlaylist"})),s.createElement(d.IconButton,{svgName:d.cvSvgLibrary.Plus,className:e},s.createElement(d.Text,{phrase:"favourite"}))))}var ne=function(e){return{application:i.DEFAULT,action:o.Default.PLAY_VIDEO,args:[e.id]}},re=function(e){return{application:i.DEFAULT,action:o.Default.SERIES,args:[e.id]}};function ae(e){var t=e.video,n=e.relatedVideos,r=s.useContext(V),a=r.setViewportPosition,c=r.setIsOnPlayPage,l=s.useRef(null),u=s.useCallback((function(e){e&&(l.current=e,f())}),[]),f=s.useMemo((function(){return p.FunctionHelper.throttle(function(e,t){return function(){if(e.current){var n=e.current.getBoundingClientRect(),r=window.pageXOffset||document.documentElement.scrollLeft,a=window.pageYOffset||document.documentElement.scrollTop;n.top<-n.height?t(null):t({top:a+n.top,left:r+n.left,width:n.width})}}}(l,a),100,{leading:!0,trailing:!0})}),[]);return G(f),K(f),s.useEffect((function(){return c(!0),function(){a(null),c(!1)}}),[]),s.createElement(d.VideoActionsContext.Provider,{value:{getActionAppLink:C}},s.createElement("div",{className:"d-flex justify-content-between"},s.createElement(d.BackButton,{appLink:{application:i.DEFAULT,action:o.Default.HOME},backToName:"Home"}),s.createElement("button",{className:"btn btn-light"},s.createElement(d.Text,{namespace:"shared.playPage",phrase:"classroomMode"}))),s.createElement("div",{className:"embed-responsive embed-responsive-16by9 my-3",ref:u}),s.createElement($,{video:t}),s.createElement(ee,{video:t}),s.createElement(te,null),s.createElement("hr",null),s.createElement(X,{video:t}),s.createElement(H,{video:t,className:"mt-3"}),!!n&&s.createElement(s.Fragment,null,s.createElement("h2",{className:"h4 mt-3"},s.createElement(d.Text,{namespace:"shared.playPage",phrase:"relatedVideos"})),s.createElement(d.VideoList,{videos:n,getSeriesAppLink:re,getVideoAppLink:ne})))}var oe=n(14),ie=n(6),ce=n.n(ie);function le(e){var t=e.user;if(!t)return s.createElement(oe.Button,{variant:"primary",className:"mx-2 px-2"},"Log in");var n=t.avatar,r=t.displayName,a=t.customerName;return s.createElement(d.LanguageNamespaceContext.Provider,{value:"shared.userOptions"},s.createElement("div",{className:"cursor-pointer mx-2 px-2 position-relative","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false"},s.createElement("span",{className:ce.a.avatar,style:{backgroundImage:"url('".concat(n,"')")}}," "),s.createElement("nav",{className:"dropdown-menu dropdown-arrow dropdown-menu-right ".concat(ce.a.dropdownMenu)},s.createElement("div",{className:"dropdown-item"},s.createElement("div",{className:"m-0"},s.createElement("strong",null,r)),s.createElement("div",{className:"m-0 text-muted"},a)),s.createElement(d.AppLink,{className:"dropdown-item",appLink:null},s.createElement("span",{className:"".concat(ce.a.iconPlaceholder," d-inline-block mr-2 align-middle")}),s.createElement(d.Text,{phrase:"myProfile"})),s.createElement(d.AppLink,{className:"dropdown-item",appLink:null},s.createElement("span",{className:"".concat(ce.a.iconPlaceholder," d-inline-block mr-2 align-middle")}),s.createElement(d.Text,{phrase:"myPreferences"})),s.createElement(d.AppLink,{className:"dropdown-item",appLink:null},s.createElement("span",{className:"".concat(ce.a.iconPlaceholder," d-inline-block mr-2 align-middle")}),s.createElement(d.Text,{phrase:"signOut"})))))}var ue=n(7),se=n.n(ue);function pe(){return s.createElement("svg",{viewBox:"0 0 434 71"},s.createElement("g",null,s.createElement("path",{fill:"#000000",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"}),s.createElement("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"})))}function fe(e){var t=p.Flight.useBasicFetch(m);return s.createElement("nav",{className:"navbar navbar-expanded sticky-top ".concat(se.a.nav," justify-content-start")},e.showLeftNavToggle&&s.createElement(d.SvgContainer,{svgName:d.cvSvgLibrary.Handle,className:se.a.hamburger,onClick:e.toggleLeftNav}),s.createElement("a",{className:"navbar-brand text-hide align-top ".concat(se.a.logoContainer," d-inline-block'"),href:"/"},s.createElement(pe,null)),s.createElement(Te,{className:"container ".concat(se.a.searchBarContainer),view:function(){return new d.SearchBarView({model:p.ViewModelService.get("search",{ctor:d.Query})})}}),s.createElement("div",{className:"d-flex align-items-center pr-1 position-absolute ".concat(se.a.actionButtons)},!!t.data&&s.createElement(d.IconButton,{svgName:d.cvSvgLibrary.Upload,className:"btn btn-secondary"},"Upload a video"),s.createElement(Te,{view:function(){return new d.NotificationHeaderView},className:"ml-2 pl-2"}),s.createElement(le,{user:t.data})))}var de,me=n(8),ye=n.n(me);!function(e){e[e.Open=0]="Open",e[e.Collapsed=1]="Collapsed",e[e.Hidden=2]="Hidden"}(de||(de={}));var he=function(e){return s.createElement(d.AppLink,{className:"".concat(ye.a.leftNavAnchor," d-block my-3"),appLink:e.appLink},s.createElement("span",{className:"".concat(ye.a.iconPlaceholder)}),s.createElement("span",{className:"".concat(ye.a.leftNavText)},e.name))};function ve(e){if(e.navState===de.Hidden)return s.createElement(s.Fragment,null);var t=e.navState===de.Collapsed,n=p.LanguageService.encloseNamespace("shared.leftNav");return s.createElement("nav",{className:"".concat(ye.a.leftNav," ").concat(t?ye.a.leftNavCollapsed:"")},s.createElement(Y.Scrollbars,{height:"100%"},s.createElement(he,{name:n("home"),appLink:{application:i.DEFAULT,action:o.Default.HOME}}),s.createElement(he,{name:n("myPlaylists"),appLink:{application:i.PLAYLISTS,action:o.Playlists.HOME}}),s.createElement(he,{name:n("myUploads"),appLink:{application:i.DEFAULT,action:o.Default.MY_UPLOADS}}),s.createElement(he,{name:n("following")}),s.createElement(he,{name:n("favouritedVideos"),appLink:{application:i.DEFAULT,action:o.Default.FAVORITE_VIDEOS}}),!t&&s.createElement(s.Fragment,null,s.createElement("hr",null),s.createElement(he,{name:n("watchHistory")}),s.createElement(he,{name:n("myClassrooms")}))))}function be(e){var t=s.useContext(V).setVideo,n=p.Flight.useBasicFetch(g(e.id)),r=p.Flight.useBasicFetch(w(null));return s.useEffect((function(){t(n.data)}),[!!n.data]),n.data?s.createElement(ae,{video:n.data,relatedVideos:r.data?r.data.data:null}):s.createElement(s.Fragment,null)}var ge=function(e){return{application:null,action:null,args:[e.id]}},Ee=function(e){return{application:null,action:null,args:[e.id]}};function we(e){var t=p.Flight.useBasicFetch(y),n=p.Flight.useBasicFetch(E(e.cursor));return t.data&&n.data?s.createElement(d.VideoActionsContext.Provider,{value:{getActionAppLink:C}},s.createElement(d.BannerHeader,{heading:p.LanguageService.getPhrase("shared.myUploads","header"),banner:null,imageCdnUrl:t.data.imageCdnUrl,actions:[{label:p.LanguageService.getPhrase("shared.myUploads","share"),appLink:{application:i.DEFAULT,action:"index"},svgName:d.cvSvgLibrary.Share,className:"btn btn-light",button:!0},{label:p.LanguageService.getPhrase("shared.myUploads","edit"),appLink:{application:i.DEFAULT,action:"index"},svgName:d.cvSvgLibrary.Edit,className:"btn btn-light",button:!0}]}),s.createElement("div",null,s.createElement("p",{className:"pt-3"},s.createElement(d.Text,{namespace:"shared.myUploads",phrase:"description"})),s.createElement(d.VideoList,{videos:n.data.data,cursors:n.data.pagination.cursors,getVideoAppLink:ge,getSeriesAppLink:Ee}))):s.createElement(s.Fragment,null)}function Oe(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}var Se=p.LanguageService.encloseNamespace("shared.series"),Le=function(e){return{application:null,action:null,args:[e.id]}},Pe=function(e){return{application:null,action:null,args:[e.id]}},ke=function(e){return{application:i.DEFAULT,action:o.Default.SERIES,args:[e.id]}};function Ne(e){var t=p.Flight.useBasicFetch(y),n=p.Flight.useBasicFetch(k(e.id)),r=p.Flight.useBasicFetch(N(e.id,e.cursor)),a=[n.data];if(e.classificationId){var c=p.Flight.useBasicFetch(A(e.classificationId));c.data&&a.unshift.apply(a,Oe(c.data))}if(!r.data||!t.data)return s.createElement(s.Fragment,null);var l=Se("series",{seriesName:n.data.name});return s.createElement(s.Fragment,null,s.createElement(d.BannerHeader,{heading:l,banner:null,imageCdnUrl:t.data.imageCdnUrl,backButtonAppLink:{application:i.DEFAULT,action:o.Default.HOME},backButtonText:"Home",actions:[{label:p.LanguageService.getPhrase("shared.series","share"),appLink:{application:i.DEFAULT,action:"index"},svgName:d.cvSvgLibrary.Share,className:"btn btn-light mr-2",button:!0},{label:p.LanguageService.getPhrase("shared.series","follow"),appLink:{application:i.DEFAULT,action:"index"},svgName:d.cvSvgLibrary.Edit,className:"btn btn-light",button:!0}]}),s.createElement("div",null,s.createElement("div",{className:"border-bottom py-3 mb-3"},e.classificationId&&a.length<2?s.createElement(d.PartialBreadcrumbs,null):s.createElement(d.Breadcrumbs,{currentItem:n.data,type:d.BreadcrumbType.Static,getItemAppLink:Le,data:a,rootItem:{label:Se("dashboard"),appLink:{application:i.DEFAULT,action:o.Default.HOME}}}),n.data.description&&s.createElement("p",{className:"pt-3"},n.data.description)),r.data?r.isFetching?s.createElement(d.PartialVideoList,null):s.createElement(d.VideoList,{videos:r.data.data,cursors:r.data.pagination.cursors,getVideoAppLink:Pe,getSeriesAppLink:ke}):s.createElement(s.Fragment,null,"Empty State")))}var Ae=function(e){return{url:"/api/domain/v2/share/".concat(e,"?query=").concat(u.VIDEO),key:"shared:resource:".concat(e)}};function Ce(e){var t=s.useContext(V).setVideo,n=p.Flight.useBasicFetch(Ae(e.shortCode)),r=p.Flight.useBasicFetch(w(null));return s.useEffect((function(){n.data&&t(n.data)}),[!!n.data]),n.data?s.createElement(ae,{video:n.data,relatedVideos:r.data?r.data.data:null}):s.createElement(s.Fragment,null)}function Te(e){var t=e.view,n=e.className,r=void 0===n?"":n,a=s.useMemo(t||function(){return null},[t]),o=Object(p.useRenderBackboneView)(a,[a]);return t?s.createElement("div",{ref:o,className:r}):s.createElement(s.Fragment,null)}var _e=n(5),De=n.n(_e);function je(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],r=!0,a=!1,o=void 0;try{for(var i,c=e[Symbol.iterator]();!(r=(i=c.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){a=!0,o=e}finally{try{r||null==c.return||c.return()}finally{if(a)throw o}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}var xe=function(e){var t=e.showNav,n=e.contentChild,r=e.popupChild,a=e.alertChild,o=s.useContext(V).viewportPosition,i=je(s.useState(!1),2),c=i[0],l=i[1],u=Object(d.useMediaQuery)(d.MediaQueryStrings.XS),p=Object(d.useMediaQuery)(d.MediaQueryStrings.SM),f=Object(d.useMediaQuery)(d.MediaQueryStrings.XLG);s.useEffect((function(){l(!f)}),[f]);var m=function(e,t,n){return t?{state:e?de.Hidden:de.Open,showMask:!e,contentClass:De.a.hiddenNavContent}:n?{state:e?de.Collapsed:de.Open,showMask:!e,contentClass:De.a.collapsedNavContent}:{state:e?de.Collapsed:de.Open,showMask:!1,contentClass:e?De.a.collapsedNavContent:De.a.openNavContent}}(c,u,p),y="d-flex flex-column align-items-end",h="";return o?h=De.a.fixedBottomRightContainer:y+=" ".concat(De.a.fixedBottomRightContainer),s.createElement(s.Fragment,null,s.createElement(fe,{toggleLeftNav:function(){l(!c)},showLeftNavToggle:t}),t&&s.createElement(ve,{navState:m.state}),s.createElement("div",{className:"".concat(De.a.content," ").concat(m.contentClass)},s.createElement("div",{className:"container"},n)),r,m.showMask&&s.createElement("div",{className:"modal-backdrop show ".concat(De.a.mask)}),s.createElement("div",{className:y},!!a&&s.createElement("div",{className:h},a),s.createElement(M,null)))};function Ve(e){return s.createElement(f.Provider,{store:e.store},s.createElement(R,null,s.createElement(xe,Object.assign({},e))))}var Re=n(15),Fe=n.n(Re);function Ie(e){return(Ie="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ue(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Be(e,t){return!t||"object"!==Ie(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Me(e,t,n){return(Me="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=He(e)););return e}(e,t);if(r){var a=Object.getOwnPropertyDescriptor(r,t);return a.get?a.get.call(n):a.value}})(e,t,n||e)}function He(e){return(He=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Ye(e,t){return(Ye=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var qe=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=Be(this,He(t).call(this,e))).childComponents={},n}var n,r,a;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}}),t&&Ye(e,t)}(t,e),n=t,a=[{key:"getCacheKey",value:function(e){return"".concat(l.TEACHER_LAYOUT,":").concat(e.showNav)}}],(r=[{key:"regions",value:function(){return{layout:{el:".layout-region",replaceEl:!0}}}},{key:"getChildComponents",value:function(){return{showNav:this.options.showNav,contentChild:this.childComponents[c.CONTENT],popupChild:this.childComponents[c.POPUP],alertChild:this.childComponents[c.ALERT],store:this.options.store}}},{key:"unsetRegion",value:function(e){delete this.childComponents[e],this.renderLayout()}},{key:"closePopup",value:function(){this.unsetRegion(c.POPUP)}},{key:"showChildView",value:function(e,t){this.childComponents[e]=t,this.renderLayout()}},{key:"renderLayout",value:function(){Me(He(t.prototype),"showChildView",this).call(this,"layout",s.createElement(Ve,Object.assign({},this.getChildComponents())))}},{key:"title",get:function(){return!1}},{key:"name",get:function(){return"TeacherLayoutView"}},{key:"template",get:function(){return Fe.a}}])&&Ue(n.prototype,r),a&&Ue(n,a),t}(p.ReactLayoutView);function Je(e){var t=e.contentChild;return s.createElement(s.Fragment,null,t)}function ze(e){var t=e.store;return s.createElement(f.Provider,{store:t},s.createElement(Je,Object.assign({},e)))}var We=n(16),Qe=n.n(We);function Xe(e){return(Xe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ze(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}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,r.key,r)}}function Ke(e,t){return!t||"object"!==Xe(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function $e(e,t,n){return($e="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=et(e)););return e}(e,t);if(r){var a=Object.getOwnPropertyDescriptor(r,t);return a.get?a.get.call(n):a.value}})(e,t,n||e)}function et(e){return(et=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function tt(e,t){return(tt=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var nt=function(e){function t(){var e;return Ze(this,t),(e=Ke(this,et(t).apply(this,arguments))).childComponents={},e}var n,r,a;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}}),t&&tt(e,t)}(t,e),n=t,a=[{key:"getCacheKey",value:function(){return l.EMBED_LAYOUT}}],(r=[{key:"regions",value:function(){return{layout:{el:".layout-region",replaceEl:!0}}}},{key:"getChildComponents",value:function(){return{contentChild:this.childComponents[c.CONTENT],store:this.options.store}}},{key:"unsetRegion",value:function(e){delete this.childComponents[e],this.renderLayout()}},{key:"closePopup",value:function(){this.unsetRegion(c.POPUP)}},{key:"showChildView",value:function(e,t){this.childComponents[e]=t,this.renderLayout()}},{key:"renderLayout",value:function(){$e(et(t.prototype),"showChildView",this).call(this,"layout",s.createElement(ze,Object.assign({},this.getChildComponents())))}},{key:"title",get:function(){return!1}},{key:"name",get:function(){return"EmbedLayoutView"}},{key:"template",get:function(){return Qe.a}}])&&Ge(n.prototype,r),a&&Ge(n,a),t}(p.ReactLayoutView);function rt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var at=function(e,t){return{url:"/api/domain/v2/objects/".concat(e,"?query=").concat(d.SharedWithStatements.SERIES),key:"series:".concat(e),success:t}},ot=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.store=t.store}var t,n,r;return t=e,(n=[{key:"getSeries",value:function(e,t){var n=at(e,(function(e){return t&&t(new p.Core.Model(e))})),r=p.Flight.getResponse(this.store.getState(),n.key);return r.shouldFetch&&p.Flight.fetch(this.store.dispatch,n),r.data&&new p.Core.Model(r.data)}},{key:"name",get:function(){return d.SharedDataServices.SERIES}},{key:"channelName",get:function(){return d.SharedDataChannels.SERIES}}])&&rt(t.prototype,n),r&&rt(t,r),e}(),it=n(12);function ct(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var lt=function(e){return{url:"/api/domain/v2/me/libraries?type=customlibrary&type=unpublishedcustomlibrary",key:"libraries",success:e,normalize:!1}},ut=function(e,t){return{url:"/api/domain/v2/objects/".concat(e,"?query=").concat(d.SharedWithStatements.FOLDER),key:"folder:".concat(e),success:t}},st=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.store=t.store}var t,n,r;return t=e,(n=[{key:"getLibraries",value:function(e){var t=this,n=lt((function(n){it.Radio.channel(t.channelName).trigger("libraries:sync",n),e&&e(new p.Core.Collection(n))})),r=p.Flight.getResponse(this.store.getState(),n.key);return r.shouldFetch&&p.Flight.fetch(this.store.dispatch,n),r.data&&new p.Core.Collection(r.data.map((function(e){return e.data})))}},{key:"getFolder",value:function(e,t){var n=ut(e,(function(e){return t&&t(new p.Core.Model(e))})),r=p.Flight.getResponse(this.store.getState(),n.key);return r.shouldFetch&&p.Flight.fetch(this.store.dispatch,n),r.data&&new p.Core.Model(r.data)}},{key:"name",get:function(){return d.SharedDataServices.LIBRARY}},{key:"channelName",get:function(){return"library:data:service"}}])&&ct(t.prototype,n),r&&ct(t,r),e}();function pt(){return s.createElement("div",{style:{height:"3000px"}},s.createElement("h1",null,"Hello World"),s.createElement(d.AppLink,{appLink:{application:i.DEFAULT,action:"play:video",args:["9122777"]}},"Play page 1"),s.createElement(d.AppLink,{appLink:{application:i.DEFAULT,action:"play:video",args:["3713435"]}},"Play page 2"))}function ft(){return s.createElement(s.Fragment,null,s.createElement("h1",null,"Not Found"))}function dt(e){return(dt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function mt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function yt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ht(e,t,n){return t&&yt(e.prototype,t),n&&yt(e,n),e}function vt(e,t){return!t||"object"!==dt(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function bt(e){return(bt=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function gt(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Et(e,t)}function Et(e,t){return(Et=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var wt=function(e){function t(){return mt(this,t),vt(this,bt(t).apply(this,arguments))}return gt(t,e),ht(t,[{key:"channelName",get:function(){return i.DEFAULT}},{key:"appRoutes",get:function(){return{"":"index","videos/:id(/)":"playVideo","my-uploads(/)":"myUploads","series/:id(/)":"series","share/:shortCode(/)":"playSharedVideo","favourited-videos(/)":"favoriteVideos","*path":"catchAllRoutes"}}},{key:"appLinks",get:function(){return["notFound"]}}]),t}(p.Core.AppRouter),Ot=function(e){function t(){return mt(this,t),vt(this,bt(t).apply(this,arguments))}return gt(t,e),ht(t,[{key:"index",value:function(){this.layout.showChildView(c.CONTENT,s.createElement(pt,null))}},{key:"playVideo",value:function(e){this.layout.showChildView(c.CONTENT,s.createElement(be,{id:e}))}},{key:"playSharedVideo",value:function(e){this.layout.showChildView(c.CONTENT,s.createElement(Ce,{shortCode:e}))}},{key:"myUploads",value:function(e){this.layout.showChildView(c.CONTENT,s.createElement(we,{cursor:e.cursor}))}},{key:"favoriteVideos",value:function(e){this.layout.showChildView(c.CONTENT,s.createElement(D,{cursor:e.cursor}))}},{key:"series",value:function(e,t){this.layout.showChildView(c.CONTENT,s.createElement(Ne,{id:e,cursor:t.cursor}))}},{key:"catchAllRoutes",value:function(){this.layout.showChildView(c.CONTENT,s.createElement(ft,null))}},{key:"notFound",value:function(){this.layout.showChildView(c.CONTENT,s.createElement(ft,null))}},{key:"name",get:function(){return"Default Application"}},{key:"layoutOptions",get:function(){return{name:l.TEACHER_LAYOUT,options:{showNav:!0}}}},{key:"channelName",get:function(){return i.DEFAULT}}],[{key:"router",get:function(){return wt}}]),t}(p.Core.Application);function St(e){return(St="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Lt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Pt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function kt(e,t,n){return t&&Pt(e.prototype,t),n&&Pt(e,n),e}function Nt(e,t){return!t||"object"!==St(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function At(e){return(At=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Ct(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Tt(e,t)}function Tt(e,t){return(Tt=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var _t=function(e){function t(){return Lt(this,t),Nt(this,At(t).apply(this,arguments))}return Ct(t,e),kt(t,[{key:"channelName",get:function(){return i.PLAYLISTS}},{key:"appRoutes",get:function(){return{"playlists(/)":"index","playlists/:id(/)":"playlist"}}},{key:"appLinks",get:function(){return["newPlaylist","editPlaylist","deletePlaylist","addToPlaylist","removeVideoFromPlaylist"]}}]),t}(p.Core.AppRouter),Dt=function(e){function t(){return Lt(this,t),Nt(this,At(t).apply(this,arguments))}return Ct(t,e),kt(t,[{key:"index",value:function(){this.layout.showChildView(c.CONTENT,s.createElement(r.PlaylistsContextProvider,null,s.createElement(r.PlaylistsView,{getPlaylistAppLink:function(e){return{application:i.PLAYLISTS,action:o.Playlists.PLAYLIST,args:[e.id]}}})))}},{key:"playlist",value:function(e){this.layout.showChildView(c.CONTENT,s.createElement(r.PlaylistView,{playlistId:e,application:i.PLAYLISTS,getVideoAppLink:function(e){return{application:i.DEFAULT,action:o.Default.PLAY_VIDEO,args:[e.id]}},getSeriesAppLink:function(e){return{application:i.PLAYLISTS,action:o.Playlists.HOME}},allowEdit:!0}))}},{key:"newPlaylist",value:function(){var e=this;this.layout.showChildView(c.POPUP,s.createElement(r.NewPlaylistView,{application:i.PLAYLISTS,closePopup:function(){return e.layout.closePopup()}}))}},{key:"editPlaylist",value:function(e){var t=this;this.layout.showChildView(c.POPUP,s.createElement(r.EditPlaylistView,{playlistId:e,closePopup:function(){return t.layout.closePopup()}}))}},{key:"deletePlaylist",value:function(e){var t=this;this.layout.showChildView(c.POPUP,s.createElement(r.DeletePlaylistView,{playlistId:e,routeToOnDelete:{application:i.PLAYLISTS,action:o.Playlists.HOME},closePopup:function(){return t.layout.closePopup()}}))}},{key:"addToPlaylist",value:function(e){var t=this;this.layout.showChildView(c.POPUP,s.createElement(r.AddToPlaylistView,{videoId:e,closePopup:function(){return t.layout.closePopup()}}))}},{key:"removeVideoFromPlaylist",value:function(e,t){var n=this;this.layout.showChildView(c.POPUP,s.createElement(r.RemoveVideoFromPlaylistView,{videoId:e,playlistId:t,closePopup:function(){return n.layout.closePopup()}}))}},{key:"onShowAlert",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.collection,n=t?t.toJSON():[],r=function(e){return it.Radio.channel(p.CommonChannels.ALERT).trigger("remove:alert",e)};this.layout.showChildView(c.ALERT,s.createElement(d.AlertList,{alerts:n,removeAlert:r}))}},{key:"name",get:function(){return"Playlists Application"}},{key:"layoutOptions",get:function(){return{name:l.TEACHER_LAYOUT,options:{showNav:!0}}}},{key:"channelName",get:function(){return i.PLAYLISTS}}],[{key:"router",get:function(){return _t}}]),t}(p.Core.Application),jt=n(17),xt=n.n(jt);function Vt(e){var t=p.Flight.useBasicFetch(g(e.id)),n=p.Flight.useBasicFetch(y);return s.useEffect((function(){return document.body.classList.add("overflow-hidden"),function(){return document.body.classList.remove("overflow-hidden")}}),[]),t.data&&n.data?s.createElement(j,{id:t.data.id,webPlayerHost:n.data.webPlayerUrl,className:xt.a.embeddedPlayer}):s.createElement(s.Fragment,null)}function Rt(e){return(Rt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ft(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}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,r.key,r)}}function Ut(e,t,n){return t&&It(e.prototype,t),n&&It(e,n),e}function Bt(e,t){return!t||"object"!==Rt(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Mt(e){return(Mt=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Ht(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Yt(e,t)}function Yt(e,t){return(Yt=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var qt=function(e){function t(){return Ft(this,t),Bt(this,Mt(t).apply(this,arguments))}return Ht(t,e),Ut(t,[{key:"channelName",get:function(){return i.EMBED}},{key:"appRoutes",get:function(){return{"share/embed/:shortcode":"embedVideo"}}}]),t}(p.Core.AppRouter),Jt=function(e){function t(){return Ft(this,t),Bt(this,Mt(t).apply(this,arguments))}return Ht(t,e),Ut(t,[{key:"embedVideo",value:function(e){this.layout.showChildView(c.CONTENT,s.createElement(Vt,{id:e}))}},{key:"name",get:function(){return"Embed Application"}},{key:"layoutOptions",get:function(){return{name:l.EMBED_LAYOUT}}},{key:"channelName",get:function(){return i.EMBED}}],[{key:"router",get:function(){return qt}}]),t}(p.Core.Application);function zt(e){return(zt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Wt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Qt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Xt(e,t,n){return t&&Qt(e.prototype,t),n&&Qt(e,n),e}function Zt(e,t){return!t||"object"!==zt(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Gt(e){return(Gt=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Kt(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&$t(e,t)}function $t(e,t){return($t=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var en=function(e){function t(){return Wt(this,t),Zt(this,Gt(t).apply(this,arguments))}return Kt(t,e),Xt(t,[{key:"channelName",get:function(){return i.DASHBOARD}},{key:"appRoutes",get:function(){return{"dashboard/:id(/:name/)":"dashboard","videos/:id":"video","(/)":"index"}}}]),t}(p.Core.AppRouter),tn=function(e){function t(){return Wt(this,t),Zt(this,Gt(t).apply(this,arguments))}return Kt(t,e),Xt(t,[{key:"index",value:function(){this.layout.showChildView(c.CONTENT,s.createElement(a.DashboardView,{type:"primary",appChannels:this.appChannels}))}},{key:"name",get:function(){return"Dashboard Application"}},{key:"channelName",get:function(){return i.DASHBOARD}},{key:"layoutOptions",get:function(){return{name:l.TEACHER_LAYOUT,options:{showNav:!0}}}},{key:"appChannels",get:function(){return{dashboard:i.DASHBOARD,subject:i.SUBJECT}}}],[{key:"router",get:function(){return en}}]),t}(p.Core.Application);function nn(e){return(nn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function rn(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function an(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function on(e,t,n){return t&&an(e.prototype,t),n&&an(e,n),e}function cn(e,t){return!t||"object"!==nn(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function ln(e){return(ln=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function un(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&sn(e,t)}function sn(e,t){return(sn=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var pn=function(e){function t(){return rn(this,t),cn(this,ln(t).apply(this,arguments))}return un(t,e),on(t,[{key:"channelName",get:function(){return i.SUBJECT}},{key:"appRoutes",get:function(){return{"subjects/:id/playlists/:playlistId(/)":"playlist","subjects/:id(/)":"classification","series/:id":"series"}}}]),t}(p.Core.AppRouter),fn=function(e){function t(){return rn(this,t),cn(this,ln(t).apply(this,arguments))}return un(t,e),on(t,[{key:"classification",value:function(e){this.layout.showChildView(d.LayoutRegions.CONTENT,s.createElement(a.ClassificationView,{key:e,classificationId:e,appChannels:this.appChannels}))}},{key:"playlist",value:function(e,t){this.layout.showChildView(d.LayoutRegions.CONTENT,s.createElement(r.PlaylistView,{playlistId:t,application:i.PLAYLISTS,getVideoAppLink:function(e){return{application:i.DEFAULT,action:o.Default.PLAY_VIDEO,args:[e.id]}},getSeriesAppLink:function(e){return{application:"",action:""}},allowEdit:!0}))}},{key:"onShowAlert",value:function(){arguments.length>0&&void 0!==arguments[0]&&arguments[0]}},{key:"name",get:function(){return"Subject Application"}},{key:"channelName",get:function(){return i.SUBJECT}},{key:"layoutOptions",get:function(){return{name:l.TEACHER_LAYOUT,options:{showNav:!0}}}},{key:"appChannels",get:function(){return{dashboard:i.DASHBOARD,subject:i.SUBJECT}}}],[{key:"router",get:function(){return pn}}]),t}(p.Core.Application);function dn(e){return(dn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function mn(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function yn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function hn(e,t){return!t||"object"!==dn(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function vn(e){return(vn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function bn(e,t){return(bn=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var gn=function(e){function t(){return mn(this,t),hn(this,vn(t).apply(this,arguments))}var n,r,a;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}}),t&&bn(e,t)}(t,e),n=t,(r=[{key:"appLinks",get:function(){return{searchResults:{application:i.DEFAULT,action:o.Default.MY_UPLOADS,args:[1]},series:{application:i.DEFAULT,action:o.Default.MY_UPLOADS},videoDetails:{application:i.DEFAULT,action:o.Default.MY_UPLOADS,args:[1]},tagSearch:{application:i.DEFAULT,action:o.Default.MY_UPLOADS,args:[1]},topic:{application:i.DEFAULT,action:o.Default.MY_UPLOADS,args:[1]}}}}])&&yn(n.prototype,r),a&&yn(n,a),t}(d.BaseSearchAppVariables);function En(e){return(En="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function wn(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function On(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Sn(e,t,n){return t&&On(e.prototype,t),n&&On(e,n),e}function Ln(e,t){return!t||"object"!==En(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Pn(e){return(Pn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function kn(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Nn(e,t)}function Nn(e,t){return(Nn=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var An=function(e){function t(){return wn(this,t),Ln(this,Pn(t).apply(this,arguments))}return kn(t,e),Sn(t,[{key:"channelName",get:function(){return i.NOTIFICATIONS}},{key:"appRoutes",get:function(){return{"notifications(/)":"index"}}}]),t}(p.Core.AppRouter),Cn=function(e){function t(){return wn(this,t),Ln(this,Pn(t).apply(this,arguments))}return kn(t,e),Sn(t,[{key:"index",value:function(e){this.layout.showChildView(d.LayoutRegions.CONTENT,s.createElement(Te,{view:function(){return new d.NotificationsView({params:e})}}))}},{key:"name",get:function(){return"Notifications Application"}},{key:"layoutOptions",get:function(){return{name:l.TEACHER_LAYOUT,options:{showNav:!0}}}},{key:"channelName",get:function(){return i.NOTIFICATIONS}}],[{key:"router",get:function(){return An}}]),t}(p.Core.Application);function Tn(e){return(Tn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Dn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function jn(e,t){return!t||"object"!==Tn(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function xn(e){return(xn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Vn(e,t){return(Vn=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var Rn=function(e){function t(){return _n(this,t),jn(this,xn(t).apply(this,arguments))}var n,r,a;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}}),t&&Vn(e,t)}(t,e),n=t,(r=[{key:"appLinks",get:function(){return{videoDetails:{application:i.DEFAULT,action:o.Default.PLAY_VIDEO},notifications:{application:i.NOTIFICATIONS,action:o.Notifications.HOME},pastReleases:{application:i.DEFAULT,action:o.Default.HOME},awaitingReview:{application:i.DEFAULT,action:o.Default.HOME},editStaffRequest:{application:i.DEFAULT,action:o.Default.HOME}}}},{key:"notificationTypesWithAppLinks",get:function(){return[d.NotificationType.VideoReviewReminder,d.NotificationType.VideoReviewAddedToLibrary,d.NotificationType.CustomLibraryVideoAvailable,d.NotificationType.WorkspaceVideoAvailable,d.NotificationType.ExchangeVideoAvailable]}},{key:"notificationsEmptyStateUrl",get:function(){return""}},{key:"bellIconColor",get:function(){return"dark"}}])&&Dn(n.prototype,r),a&&Dn(n,a),t}(d.BaseNotificationsAppVariables);n.d(t,"Actions",(function(){return o})),n.d(t,"AppChannels",(function(){return i})),n.d(t,"LayoutRegions",(function(){return c})),n.d(t,"Layouts",(function(){return l})),n.d(t,"WithStatements",(function(){return u})),n.d(t,"TeacherLayoutView",(function(){return qe})),n.d(t,"EmbedLayoutView",(function(){return nt})),n.d(t,"FlightSeriesDataService",(function(){return ot})),n.d(t,"FlightLibraryDataService",(function(){return st})),n.d(t,"DefaultApplication",(function(){return Ot})),n.d(t,"PlaylistsApplication",(function(){return Dt})),n.d(t,"EmbedApplication",(function(){return Jt})),n.d(t,"DashboardApplication",(function(){return tn})),n.d(t,"SubjectApplication",(function(){return fn})),n.d(t,"SearchAppVariables",(function(){return gn})),n.d(t,"NotificationsApplication",(function(){return Cn})),n.d(t,"NotificationsAppVariables",(function(){return Rn}))}])}));
package/dist/en.json CHANGED
@@ -1 +1 @@
1
- {"shared":{"notFound":{"title":"Page not found"},"leftNav":{"home":"Home","myPlaylists":"My Playlists","myUploads":"My Uploads","following":"Following","favouritedVideos":"Favourited Videos","myClassrooms":"My Classrooms","watchHistory":"Watch History"},"myUploads":{"header":"My Uploads","description":"Here we store all the videos that you upload on to ClickView!","share":"Share","edit":"Edit"},"series":{"dashboard":"Dashboard","series":"Series: %{seriesName}","share":"Share","follow":"Follow"}}}
1
+ {"shared":{"playPage":{"classroomMode":"Classroom Mode","createInteractive":"Create interactive video","createClip":"Create clip","more":"More","share":"Share","addToPlaylist":"Add to Playlist","favourite":"Favourite","relatedVideos":"Related Videos"},"userOptions":{"myProfile":"My Profile","myPreferences":"My Preferences","signOut":"Sign Out"},"videoDetails":{"details":"Details","rating":"Rating: %{code}","productionYear":"Production Year: %{year}","productionCompanies":"Production Companies","distributors":"Distributors","tags":"Tags:","description":"Description"},"notFound":{"title":"Page not found"},"favoriteVideos":{"header":"Favourited Videos"},"leftNav":{"home":"Home","myPlaylists":"My Playlists","myUploads":"My Uploads","following":"Following","favouritedVideos":"Favourited Videos","myClassrooms":"My Classrooms","watchHistory":"Watch History"},"myUploads":{"header":"My Uploads","description":"Here we store all the videos that you upload on to ClickView!","share":"Share","edit":"Edit"},"series":{"dashboard":"Dashboard","series":"Series: %{seriesName}","share":"Share","follow":"Follow"}}}
package/dist/index.d.ts CHANGED
@@ -1,4 +1,8 @@
1
+ import './shared/components/play-page/play-page.lang.json';
2
+ import './shared/components/user-options/user-options.lang.json';
3
+ import './shared/components/video-details/video-details.lang.json';
1
4
  import './shared/errors/not-found/not-found.lang.json';
5
+ import './shared/views/favorite-videos/favorite-videos-view.lang.json';
2
6
  import './shared/views/left-nav/left-nav-view.lang.json';
3
7
  import './shared/views/my-uploads/my-uploads-view.lang.json';
4
8
  import './shared/views/series/series-view.lang.json';
@@ -11,4 +15,9 @@ export * from './shared/layouts';
11
15
  export * from './shared/services';
12
16
  export * from './apps/default/LiteDefaultApplication';
13
17
  export * from './apps/playlists/LitePlaylistsApplication';
18
+ export * from './apps/embed/LiteEmbedApplication';
19
+ export * from './apps/dashboard/LiteDashboardApplication';
20
+ export * from './apps/subjects/LiteSubjectApplication';
14
21
  export * from './apps/search/constants/SearchAppVariables';
22
+ export * from './apps/notifications/LiteNotificationsApplication';
23
+ export * from './apps/notifications/constants/NotificationsAppVariables';
package/dist/lite-app.css CHANGED
@@ -1,10 +1,14 @@
1
1
  body{background-color:#fff}
2
2
 
3
- ._3RLQ9{background-color:#fff;border-bottom:1px solid #eaeaea;z-index:1002}.UIlc9{min-width:12rem;width:13.75rem;height:2.92062rem}._2E7RQ{padding-right:18.75rem}._2HygL{right:0}._2OoYm{border-radius:50%;background-color:#51ADA3;display:inline-block;width:2.1875rem;height:2.1875rem;text-align:center;line-height:2.1875rem;background-size:cover;background-position:top center}._2b7ER{border-radius:50%;display:inline-block;background-color:#eaeaea;width:2.1875rem;height:2.1875rem;text-align:center;line-height:2.1875rem;background-size:cover;background-position:top center}._2BRko{color:#eaeaea;height:1.25rem;width:1.25rem;margin-right:1.25rem;cursor:pointer;display:inline-block}._2BRko svg{width:100% !important;height:100% !important}.oX-Ph{border:2px solid #eaeaea;max-width:40rem;margin-right:40rem;border-radius:3px;padding:0}
3
+ ._3C4_W{width:25rem}._2voRI{position:absolute}._2RiDj{width:2.1875rem;height:2.1875rem;display:inline-block}.ZbN3s{min-width:3.4rem}._3nkTw{-webkit-transform:scaleX(-1);transform:scaleX(-1)}
4
+
5
+ ._3g8JZ{border-radius:50%;background-color:#51ADA3;display:inline-block;width:2.1875rem;height:2.1875rem;text-align:center;line-height:2.1875rem;background-size:cover;background-position:top center}._2hr_4{border-radius:50%;background-color:#eaeaea;width:2.1875rem;height:2.1875rem}
6
+
7
+ ._3RLQ9{background-color:#fff;border-bottom:1px solid #eaeaea;z-index:1002}.UIlc9{min-width:12rem;width:13.75rem;height:2.92062rem}._2E7RQ{padding-right:18.75rem}._2HygL{right:0}._2BRko{color:#eaeaea;height:1.25rem;width:1.25rem;margin-right:1.25rem;cursor:pointer;display:inline-block}._2BRko svg{width:100% !important;height:100% !important}.oX-Ph{border:2px solid #eaeaea;max-width:40rem;margin-right:40rem;border-radius:3px;padding:0}
4
8
 
5
9
  ._3jVyN{top:4.25rem;bottom:0;position:fixed;width:15rem;background-color:#fff;border-right:1px solid #eaeaea;z-index:1001}._1ud9G{border-radius:50%;background-color:#eaeaea;width:3rem;height:3rem;position:absolute;left:1.25rem;display:inline-block}._3A_-8{position:relative;min-height:3rem}._3qbRh{padding-left:5.5rem;position:absolute;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%);display:inline-block}._2idO9{width:5.5rem}._2idO9 ._1ud9G{position:relative;left:auto;margin:0 1.25rem}._2idO9 ._3qbRh{position:relative;padding-left:0;text-align:center;top:auto;-webkit-transform:none;transform:none;display:block}
6
10
 
7
- ._3C4_W{display:inline-block;position:fixed;bottom:0;right:1.25rem;width:350px}._2voRI{position:absolute}
11
+ ._1SX2l{padding-top:1.25rem}._3LJFz{padding-left:5.5rem}._34Pt4{padding-left:15rem}._1gZ0J{padding-left:0}.mE2Dq{z-index:1000}.Sgmex{position:fixed;right:1.25rem;bottom:0}
8
12
 
9
- ._1SX2l{padding-top:1.25rem}._3LJFz{padding-left:5.5rem}._34Pt4{padding-left:15rem}._1gZ0J{padding-left:0}.mE2Dq{z-index:1000}
13
+ ._3kXb6{position:fixed;top:0;left:0;right:0;bottom:0}
10
14
 
@@ -2,3 +2,5 @@ export * from './web-player/WebPlayer';
2
2
  export * from './floating-player/FloatingPlayer';
3
3
  export * from './resources/Resources';
4
4
  export * from './video-details/VideoDetails';
5
+ export * from './play-page/PlayPage';
6
+ export * from './user-options/UserOptions';
@@ -1,9 +1,5 @@
1
1
  import * as React from 'react';
2
2
  import { Video } from '@clickview/shared';
3
- interface VideoDetailsProps {
4
- video: Video;
5
- }
6
- export declare function VideoDetails(props: VideoDetailsProps): React.ReactElement;
7
3
  interface DetailsPaneProps {
8
4
  video: Video;
9
5
  }
@@ -3,6 +3,8 @@ export declare const Actions: {
3
3
  HOME: string;
4
4
  MY_UPLOADS: string;
5
5
  SERIES: string;
6
+ PLAY_VIDEO: string;
7
+ FAVORITE_VIDEOS: string;
6
8
  };
7
9
  Playlists: {
8
10
  HOME: string;
@@ -10,6 +12,21 @@ export declare const Actions: {
10
12
  NEW_PLAYLIST: string;
11
13
  EDIT_PLAYLIST: string;
12
14
  DELETE_PLAYLIST: string;
15
+ ADD_TO_PLAYLIST: string;
13
16
  REMOVE_VIDEO_FROM_PLAYLIST: string;
14
17
  };
18
+ Dashboard: {
19
+ HOME: string;
20
+ DASHBOARD: string;
21
+ VIDEO: string;
22
+ };
23
+ Classifications: {
24
+ CLASSIFICATION: string;
25
+ PLAYLIST: string;
26
+ VIDEO: string;
27
+ SERIES: string;
28
+ };
29
+ Notifications: {
30
+ HOME: string;
31
+ };
15
32
  };
@@ -1,3 +1,4 @@
1
1
  export declare const Layouts: {
2
2
  TEACHER_LAYOUT: string;
3
+ EMBED_LAYOUT: string;
3
4
  };
@@ -1,4 +1,8 @@
1
1
  export declare const AppChannels: {
2
2
  DEFAULT: string;
3
3
  PLAYLISTS: string;
4
+ DASHBOARD: string;
5
+ SUBJECT: string;
6
+ EMBED: string;
7
+ NOTIFICATIONS: string;
4
8
  };
@@ -1,4 +1,5 @@
1
1
  import * as React from 'react';
2
+ import { Video } from '@clickview/shared';
2
3
  export interface PlayerPosition {
3
4
  top: number;
4
5
  left: number;
@@ -6,10 +7,25 @@ export interface PlayerPosition {
6
7
  }
7
8
  interface PlayerContextProps {
8
9
  webPlayerUrl: string;
9
- id?: string;
10
- setId: (id: string) => void;
11
- position: PlayerPosition;
12
- setPosition: (position: PlayerPosition) => void;
10
+ /**
11
+ * Video that the player is currently plaing
12
+ */
13
+ video?: Video;
14
+ setVideo: (video: Video) => void;
15
+ /**
16
+ * Position of the video player when we're on a play page
17
+ * no position means we're floating on the bottom right of the screen
18
+ */
19
+ viewportPosition: PlayerPosition;
20
+ setViewportPosition: (position: PlayerPosition) => void;
21
+ /**
22
+ * Tells the floating player to not render when it has
23
+ * as video but no position. This prevents
24
+ * a bug where the floating player flashes briefly when the
25
+ * PlayView has set a video but not yet set a position
26
+ */
27
+ isOnPlayPage: boolean;
28
+ setIsOnPlayPage: (isOnPlayPage: boolean) => void;
13
29
  }
14
30
  export declare const PlayerContext: React.Context<PlayerContextProps>;
15
31
  export declare function PlayerContextProvider(props: React.PropsWithChildren<{}>): React.ReactElement;
@@ -2,4 +2,5 @@ import { Flight } from '@clickview/common';
2
2
  export declare const VideoRequests: {
3
3
  video(id: string): Flight.Request;
4
4
  workspace(cursor: string): Flight.Request;
5
+ favoriteVideos(cursor: string): Flight.Request;
5
6
  };
@@ -1 +1,2 @@
1
1
  export * from './teacher-layout/TeacherLayoutView';
2
+ export * from './embed-layout/EmbedLayoutView';
@@ -1,11 +1,11 @@
1
1
  import * as React from 'react';
2
2
  import { Store } from 'redux';
3
- export interface LayoutComponentProps {
3
+ export interface TeacherLayoutComponentProps {
4
4
  showNav: boolean;
5
5
  contentChild?: React.ReactNode;
6
6
  popupChild?: React.ReactNode;
7
7
  alertChild?: React.ReactNode;
8
8
  store: Store;
9
9
  }
10
- declare function WrapLayoutWithProviders(props: LayoutComponentProps): React.ReactElement;
10
+ declare function WrapLayoutWithProviders(props: TeacherLayoutComponentProps): React.ReactElement;
11
11
  export { WrapLayoutWithProviders as TeacherLayoutComponent };
@@ -16,10 +16,8 @@ export declare class TeacherLayoutView extends ReactLayoutView {
16
16
  static getCacheKey(options: TeacherLayoutViewOptions): string;
17
17
  regions(): ObjectHash;
18
18
  private getChildComponents;
19
- private getSearchModel;
20
19
  protected unsetRegion(region: string): void;
21
20
  closePopup(): void;
22
21
  showChildView(region: string, component: React.ReactElement): void;
23
22
  renderLayout(): void;
24
- private renderSearchBar;
25
23
  }
@@ -1,5 +1,8 @@
1
+ export * from './favorite-videos/FavoriteVideosView';
1
2
  export * from './header/HeaderView';
2
3
  export * from './left-nav/LeftNavView';
3
4
  export * from './play/PlayView';
4
5
  export * from './my-uploads/MyUploadsView';
5
6
  export * from './series/SeriesView';
7
+ export * from './play-shared/PlaySharedView';
8
+ export * from './backbone-wrapper/BackboneWrapperView';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clickview/lite",
3
- "version": "0.0.4",
3
+ "version": "0.0.5-dev.0",
4
4
  "description": "ClickView Lite",
5
5
  "main": "dist/bundle.js",
6
6
  "types": "dist/index.d.ts",
@@ -20,13 +20,13 @@
20
20
  "author": "Joshua Taylor, Shale Kuzmanovski, Matt Trengrove, Michael McDonnell",
21
21
  "license": "ISC",
22
22
  "devDependencies": {
23
- "@clickview/tooling": "0.0.12",
23
+ "@clickview/tooling": "0.0.13-dev.1",
24
24
  "@types/react-custom-scrollbars": "4.0.6"
25
25
  },
26
26
  "dependencies": {
27
- "@clickview/common": "1.0.3",
28
- "@clickview/playlists": "1.0.3",
29
- "@clickview/shared": "1.0.3",
27
+ "@clickview/common": "1.0.4-dev.0",
28
+ "@clickview/playlists": "1.0.4-dev.0",
29
+ "@clickview/shared": "1.0.4-dev.0",
30
30
  "@clickview/styles": "1.0.2",
31
31
  "react-custom-scrollbars": "4.2.1"
32
32
  },