@clickview/library-editor 1.6.1-rc.0 → 1.6.1-rc.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (28) hide show
  1. package/dist/bundles.json +2 -2
  2. package/dist/css/{3803-library-editor-d59bd7ca13.chunk.css → 3803-library-editor-c08c7cc096.chunk.css} +1 -1
  3. package/dist/css/{9383-library-editor-f3332b60f5.chunk.css → 9383-library-editor-d5cab29692.chunk.css} +1 -1
  4. package/dist/css/{library-editor-app-011417eae4.css → library-editor-app-832d87bac8.css} +1 -1
  5. package/dist/en.json +1 -1
  6. package/dist/scripts/2733-104ca5267c.chunk.js +1 -0
  7. package/dist/scripts/3427-4bb7be4830.chunk.js +1 -0
  8. package/dist/scripts/3803-34b97d5577.chunk.js +1 -0
  9. package/dist/scripts/{409-8f0171be19.chunk.js → 409-2eb71d2fb9.chunk.js} +1 -1
  10. package/dist/scripts/4353-83e8384e6a.chunk.js +1 -0
  11. package/dist/scripts/5047-ce9d715ba6.chunk.js +1 -0
  12. package/dist/scripts/7173-a5e749e591.chunk.js +1 -0
  13. package/dist/scripts/8343-6cd7f8bc0c.chunk.js +1 -0
  14. package/dist/scripts/8947-152b36ebd5.chunk.js +1 -0
  15. package/dist/scripts/9383-bb6ad888b4.chunk.js +1 -0
  16. package/dist/scripts/bundle-4f288ff336.min.js +2 -0
  17. package/package.json +1 -1
  18. package/dist/scripts/2733-12d5618933.chunk.js +0 -1
  19. package/dist/scripts/3122-2994bbc040.chunk.js +0 -1
  20. package/dist/scripts/3427-4824860784.chunk.js +0 -1
  21. package/dist/scripts/3803-3be21d0c1c.chunk.js +0 -1
  22. package/dist/scripts/4353-aea4f383f2.chunk.js +0 -1
  23. package/dist/scripts/5047-1e64f11a19.chunk.js +0 -1
  24. package/dist/scripts/8343-3686ad13bf.chunk.js +0 -1
  25. package/dist/scripts/8726-fd10d5f1f3.chunk.js +0 -1
  26. package/dist/scripts/9383-5cb6aa9ccd.chunk.js +0 -1
  27. package/dist/scripts/bundle-975342b553.min.js +0 -2
  28. /package/dist/scripts/{bundle-975342b553.min.js.LICENSE.txt → bundle-4f288ff336.min.js.LICENSE.txt} +0 -0
@@ -1 +1 @@
1
- (self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[409],{16704:function(e,t,i){"use strict";i.r(t),i.d(t,{EditChaptersView:function(){return _}});var n=i(39479),r=i(31647),a=i(21679),o=i(57857),s=i(99748),c=i(99952),h=i(74749),l=i(61843),d=i(30305),u=i(48404),p=i(17422),f=i(70065),y=i(52076),v=i(89167),C=i(13156),g=i(21053),m=i(70680),b=i(45114),k=i(70693),w=i(56906),E=i(40622),T=i(7190),S=i(61159),P=i.n(S),D=i(26457),V=i(9484);function R(e){return R="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},R(e)}function L(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function O(e,t){return O=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},O(e,t)}function A(e,t){if(t&&("object"===R(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function I(e){return I=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},I(e)}var _=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&O(e,t)}(N,e);var t,i,S,R,_=(S=N,R=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=I(S);if(R){var i=I(this).constructor;e=Reflect.construct(t,arguments,i)}else e=t.apply(this,arguments);return A(this,e)});function N(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,N),_.call(this,e)}return t=N,(i=[{key:"initialize",value:function(){this.bindListeners(),this.initializeDataServices(),l.Si.initBackButton()}},{key:"name",get:function(){return"EditVideoChaptersView"}},{key:"title",get:function(){return!!this.model&&this.model.get("name")}},{key:"lang",get:function(){return"libraryEditor.editChapters"}},{key:"channelName",get:function(){return"".concat(this.name).concat(this.cid)}},{key:"className",get:function(){return"bg-white p-3 rounded"}},{key:"template",get:function(){return P()}},{key:"regions",value:function(){return{tabs:{el:".tab-region",partialLoading:p.LP.EditVideoTabs},webplayer:{replaceElement:!0,el:".webplayer-region",partialLoading:p.LP.WebPlayer},addChapter:{replaceElement:!0,el:".add-chapter-region",partialLoading:p.LP.EditVideoChaptersForm},chapterList:{replaceElement:!0,el:".chapter-list-region",partialLoading:p.LP.EditVideoChapterList}}}},{key:"bindListeners",value:function(){this.listenTo(d.Vk.VIDEO,"".concat(d.M_.VIDEOS,":").concat(this.options.videoId,":sync"),this.render),this.listenTo(d.Vk.VIDEO,"".concat(d.M_.VIDEOS,":").concat(this.options.videoId,":error"),this.onVideoDataError),this.listenTo(d.Vk.VIDEO,"".concat(d.M_.VIDEO_HAS_PHYSICAL_CHAPTERS,":").concat(this.options.videoId,":sync"),this.render),this.listenTo(d.Vk.CHAPTER,"".concat(d.M_.CONCATENATE_STATUS,":").concat(this.options.videoId,":error"),this.onConcatenateDataError),this.listenTo(this.channelName,E.LibraryEditorActions.CreateChapter,this.onCreateChapter),this.listenTo(this.channelName,E.LibraryEditorActions.UpdateChapter,this.onUpdateChapter),this.listenTo(this.channelName,E.LibraryEditorActions.DeleteChapter,this.onDeleteChapter),this.listenTo(this.channelName,E.LibraryEditorActions.UpdateChapterTime,this.onTimeInputUpdate),this.listenTo(this.channelName,E.LibraryEditorActions.SeekToChapter,this.onSeekToChapter),this.listenTo(this.channelName,E.LibraryEditorActions.MergeChapters,this.onMergeChapters)}},{key:"initializeDataServices",value:function(){this.videoDataService=a.u.getInstance(d.Or.Video,this),this.chapterDataService=a.u.getInstance(d.Or.Chapter,this)}},{key:"onVideoDataError",value:function(e){switch(e.type){case s.h.NotFound:r.Q.ErrorHelper.throw(new w.l1);break;case s.h.Forbidden:r.Q.ErrorHelper.throw(new w.aV)}}},{key:"onConcatenateDataError",value:function(e){e.type===s.h.NotFound&&(this.concatenateRequestNotFound=!0,this.render())}},{key:"onCreateChapter",value:function(e){0===this.chapters.length&&0!==e.startTime&&this.createChapter({name:o.T.getPhrase(this.lang,"intro"),startTime:0}),this.createChapter(e)}},{key:"createChapter",value:function(e){var t=this,i=new h.W(e);this.chapters.add(i),i.set("loading",!0),this.chapterDataService.createChapter(this.model.get("id"),e.name,e.startTime,(function(e){i.set(e.toJSON(),{silent:!0}),i.set("loading",!1),t.chapters.sort(),t.renderChapterForm(),t.logAction(e,f.UserAction.Create)}))}},{key:"onUpdateChapter",value:function(e){var t=this,i=this.chapters.find((function(t){return t.get("id")===e.id}));i.set("loading",!0);var n=C.J.updatedChaptersAlert(this.model.get("name"));this.chapterDataService.updateChapter(i.id,e.name,e.startTime,(function(e){i.set(e.toJSON(),{silent:!0}),i.set("loading",!1),t.chapters.sort(),t.logAction(e,f.UserAction.Edit)}),n)}},{key:"onDeleteChapter",value:function(e){var t=this;e.set("loading",!0),this.chapterDataService.deleteChapter(e.id,(function(){t.logAction(e,f.UserAction.Delete),t.chapters.remove(e)}))}},{key:"onMergeChapters",value:function(){var e=this;this.chapterDataService.addConcatenateRequest(this.options.videoId,(function(){e.pollConcatenation()}))}},{key:"onTimeInputUpdate",value:function(e){e>=0&&e<=l.X4.millisecondsToSeconds(this.model.get("duration"))&&this.player.seekTo(e)}},{key:"logAction",value:function(e,t){var i=Object.assign({videoId:this.model.get("id")},e.pick("id","name","startTime"));y.k.logUserAction(i,{actionType:t,entity:f.EntityType.Chapter,location:f.LocationContext.EditVideoChapters})}},{key:"onSeekToChapter",value:function(e){e<0||this.player.seekToChapter(e)}},{key:"startPollingConcatenation",value:function(){if(this.concatenateRequest){var e=[D.Um.SingleFile,D.Um.ConcatenationFailed];n.contains(e,this.concatenateRequest.get("status"))||this.pollConcatenation()}}},{key:"pollConcatenation",value:function(){var e=this;this.isDestroyed()||this.chapterDataService.getConcatenateRequest(this.options.videoId,(function(t){if(e.concatenateRequest=t,e.concatenateRequest.get("status")!==D.Um.SingleFile)return setTimeout((function(){return e.pollConcatenation()}),5e3),void e.renderConcatenationRequest();e.videoDataService.clearPhysicialChaptersCache(),e.render()}))}},{key:"renderChapterList",value:function(){this.showChildView("chapterList",new k.Q({collection:this.chapters,duration:this.model.get("duration"),channelName:this.channelName,showActions:!this.hasPhysicalChapters.get("value"),editable:!this.hasPhysicalChapters.get("value"),showHeader:!0}))}},{key:"renderChapterForm",value:function(){this.showChildView("addChapter",new b.L({model:new h.W,collection:this.chapters,creating:!0,duration:this.model.get("duration"),channelName:this.channelName,playerViewModelKey:"".concat(d._2.NAME,"-").concat(this.model.get("id"))}))}},{key:"renderConcatenationRequest",value:function(){this.isRendered()&&this.showChildView("addChapter",new m.r({type:"chapters",channelName:this.channelName,model:this.concatenateRequest}))}},{key:"renderEditComponents",value:function(){if(this.hasPhysicalChapters.get("value"))return this.renderConcatenationRequest(),void this.mapPhysicalChapters();this.renderChapterForm(),this.renderChapterList()}},{key:"renderTabs",value:function(){this.showChildView("tabs",new g.W({tabs:l.Si.getEditVideoTabs(this.options.videoId),activeTab:".edit-chapters-applink",goBackTab:l.Si.getBackButton(this.options.videoId)}))}},{key:"renderWebPlayer",value:function(){this.player=new v.Q({model:this.model,webPlayerUrl:this.config.get("webPlayerUrl"),captureAnalytics:!1,currentUser:this.currentUser}),this.showChildView("webplayer",this.player)}},{key:"mapPhysicalChapters",value:function(){var e=this;this.renderPartialLoading("chapterList"),this.player.query("getChapters",(function(t){e.chapters=new c.q(T.$k.mapPhysicalChapters(t)),e.renderChapterList()}))}},{key:"redirectToVideoDetails",value:function(){r.Q.AppLinkHelper.trigger({application:d.OV.LIBRARY_EDITOR,action:d.eX.LibraryEditor.VIDEO_DETAILS,args:[this.model.get("id")]},{replace:!0})}},{key:"fetchData",value:function(){var e=this;if(this.model=this.videoDataService.getVideo(this.options.videoId),this.model){if(!l.BK.canEditVideo(this.model))return void this.redirectToVideoDetails();this.chapters=this.model.chapters}this.hasPhysicalChapters=this.videoDataService.hasPhysicalChapters(this.options.videoId),this.hasPhysicalChapters&&this.hasPhysicalChapters.get("value")&&!this.getConcatenateRequestSent&&(this.chapterDataService.getConcatenateRequest(this.options.videoId,(function(t){e.concatenateRequest=t,e.render()})),this.getConcatenateRequestSent=!0)}},{key:"shouldRender",value:function(){return!(!this.model||!this.hasPhysicalChapters||this.hasPhysicalChapters.get("value")&&!this.concatenateRequest&&!this.concatenateRequestNotFound)}},{key:"requiredResources",get:function(){return{config:u.p.config,currentUser:V.K.currentUser}}},{key:"onBeforeRender",value:function(){return this.fetchData(),this.shouldRender()}},{key:"onRender",value:function(){this.renderTabs(),this.renderWebPlayer(),this.renderEditComponents(),this.startPollingConcatenation()}}])&&L(t.prototype,i),Object.defineProperty(t,"prototype",{writable:!1}),N}(r.Q.View)},61159:function(e,t,i){var n=i(32227);e.exports=(n.default||n).template({compiler:[8,">= 4.3.0"],main:function(e,t,i,n,r){return'<div class="tab-region w-100"></div>\r\n<div class="row">\r\n <div class="col-6 pt-3">\r\n <div class="webplayer-region"></div>\r\n <div class="add-chapter-region"></div>\r\n </div>\r\n <div class="col-6 mb-2 pt-3">\r\n <div class="chapter-list-region"></div>\r\n </div>\r\n</div>'},useData:!0})}}]);
1
+ (self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[409],{16704:function(e,t,i){"use strict";i.r(t),i.d(t,{EditChaptersView:function(){return _}});var n=i(39479),r=i(31647),a=i(21679),o=i(57857),s=i(99748),c=i(99952),h=i(74749),l=i(61843),d=i(30305),u=i(48404),p=i(17422),f=i(70065),y=i(52076),v=i(89167),C=i(13156),g=i(21053),m=i(70680),b=i(45114),k=i(70693),w=i(56906),E=i(40622),T=i(7190),S=i(61159),P=i.n(S),D=i(26457),V=i(9484);function R(e){return R="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},R(e)}function L(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function O(e,t){return O=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},O(e,t)}function A(e,t){if(t&&("object"===R(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function I(e){return I=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},I(e)}var _=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&O(e,t)}(N,e);var t,i,S,R,_=(S=N,R=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=I(S);if(R){var i=I(this).constructor;e=Reflect.construct(t,arguments,i)}else e=t.apply(this,arguments);return A(this,e)});function N(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,N),_.call(this,e)}return t=N,(i=[{key:"initialize",value:function(){this.bindListeners(),this.initializeDataServices(),l.Si.initBackButton()}},{key:"name",get:function(){return"EditVideoChaptersView"}},{key:"title",get:function(){return!!this.model&&this.model.get("name")}},{key:"lang",get:function(){return"libraryEditor.editChapters"}},{key:"channelName",get:function(){return"".concat(this.name).concat(this.cid)}},{key:"className",get:function(){return"bg-white p-3 rounded"}},{key:"template",get:function(){return P()}},{key:"regions",value:function(){return{tabs:{el:".tab-region",partialLoading:p.LP.EditVideoTabs},webplayer:{replaceElement:!0,el:".webplayer-region",partialLoading:p.LP.WebPlayer},addChapter:{replaceElement:!0,el:".add-chapter-region",partialLoading:p.LP.EditVideoChaptersForm},chapterList:{replaceElement:!0,el:".chapter-list-region",partialLoading:p.LP.EditVideoChapterList}}}},{key:"bindListeners",value:function(){this.listenTo(d.Vk.VIDEO,"".concat(d.M_.VIDEOS,":").concat(this.options.videoId,":sync"),this.render),this.listenTo(d.Vk.VIDEO,"".concat(d.M_.VIDEOS,":").concat(this.options.videoId,":error"),this.onVideoDataError),this.listenTo(d.Vk.VIDEO,"".concat(d.M_.VIDEO_HAS_PHYSICAL_CHAPTERS,":").concat(this.options.videoId,":sync"),this.render),this.listenTo(d.Vk.CHAPTER,"".concat(d.M_.CONCATENATE_STATUS,":").concat(this.options.videoId,":error"),this.onConcatenateDataError),this.listenTo(this.channelName,E.LibraryEditorActions.CreateChapter,this.onCreateChapter),this.listenTo(this.channelName,E.LibraryEditorActions.UpdateChapter,this.onUpdateChapter),this.listenTo(this.channelName,E.LibraryEditorActions.DeleteChapter,this.onDeleteChapter),this.listenTo(this.channelName,E.LibraryEditorActions.UpdateChapterTime,this.onTimeInputUpdate),this.listenTo(this.channelName,E.LibraryEditorActions.SeekToChapter,this.onSeekToChapter),this.listenTo(this.channelName,E.LibraryEditorActions.MergeChapters,this.onMergeChapters)}},{key:"initializeDataServices",value:function(){this.videoDataService=a.u.getInstance(d.Or.Video,this),this.chapterDataService=a.u.getInstance(d.Or.Chapter,this)}},{key:"onVideoDataError",value:function(e){switch(e.type){case s.h.NotFound:r.Q.ErrorHelper.throw(new w.l1);break;case s.h.Forbidden:r.Q.ErrorHelper.throw(new w.aV)}}},{key:"onConcatenateDataError",value:function(e){e.type===s.h.NotFound&&(this.concatenateRequestNotFound=!0,this.render())}},{key:"onCreateChapter",value:function(e){0===this.chapters.length&&0!==e.startTime&&this.createChapter({name:o.T.getPhrase(this.lang,"intro"),startTime:0}),this.createChapter(e)}},{key:"createChapter",value:function(e){var t=this,i=new h.W(e);this.chapters.add(i),i.set("loading",!0),this.chapterDataService.createChapter(this.model.get("id"),e.name,e.startTime,(function(e){i.set(e.toJSON(),{silent:!0}),i.set("loading",!1),t.chapters.sort(),t.renderChapterForm(),t.logAction(e,f.UserAction.Create)}))}},{key:"onUpdateChapter",value:function(e){var t=this,i=this.chapters.find((function(t){return t.get("id")===e.id}));i.set("loading",!0);var n=C.J.updatedChaptersAlert(this.model.get("name"));this.chapterDataService.updateChapter(i.id,e.name,e.startTime,(function(e){i.set(e.toJSON(),{silent:!0}),i.set("loading",!1),t.chapters.sort(),t.logAction(e,f.UserAction.Edit)}),n)}},{key:"onDeleteChapter",value:function(e){var t=this;e.set("loading",!0),this.chapterDataService.deleteChapter(e.id,(function(){t.logAction(e,f.UserAction.Delete),t.chapters.remove(e)}))}},{key:"onMergeChapters",value:function(){var e=this;this.chapterDataService.addConcatenateRequest(this.options.videoId,(function(){e.pollConcatenation()}))}},{key:"onTimeInputUpdate",value:function(e){e>=0&&e<=l.X4.millisecondsToSeconds(this.model.get("duration"))&&this.player.seekTo(e)}},{key:"logAction",value:function(e,t){var i=Object.assign({videoId:this.model.get("id")},e.pick("id","name","startTime"));y.k.logUserAction(i,{actionType:t,entity:f.EntityType.Chapter,location:f.LocationContext.EditVideoChapters})}},{key:"onSeekToChapter",value:function(e){e<0||this.player.seekToChapter(e)}},{key:"startPollingConcatenation",value:function(){if(this.concatenateRequest){var e=[D.Um.SingleFile,D.Um.ConcatenationFailed];n.contains(e,this.concatenateRequest.get("status"))||this.pollConcatenation()}}},{key:"pollConcatenation",value:function(){var e=this;this.isDestroyed()||this.chapterDataService.getConcatenateRequest(this.options.videoId,(function(t){if(e.concatenateRequest=t,e.concatenateRequest.get("status")!==D.Um.SingleFile)return setTimeout((function(){return e.pollConcatenation()}),5e3),void e.renderConcatenationRequest();e.videoDataService.clearPhysicialChaptersCache(),e.render()}))}},{key:"renderChapterList",value:function(){this.showChildView("chapterList",new k.Q({collection:this.chapters,duration:this.model.get("duration"),channelName:this.channelName,showActions:!this.hasPhysicalChapters.get("value"),editable:!this.hasPhysicalChapters.get("value"),showHeader:!0}))}},{key:"renderChapterForm",value:function(){this.showChildView("addChapter",new b.L({model:new h.W,collection:this.chapters,creating:!0,duration:this.model.get("duration"),channelName:this.channelName,playerViewModelKey:"".concat(d._2.NAME,"-").concat(this.model.get("id"))}))}},{key:"renderConcatenationRequest",value:function(){this.isRendered()&&this.showChildView("addChapter",new m.r({type:"chapters",channelName:this.channelName,model:this.concatenateRequest}))}},{key:"renderEditComponents",value:function(){if(this.hasPhysicalChapters.get("value"))return this.renderConcatenationRequest(),void this.mapPhysicalChapters();this.renderChapterForm(),this.renderChapterList()}},{key:"renderTabs",value:function(){var e=l.BK.canEditVideo(this.model);this.showChildView("tabs",new g.W({tabs:l.Si.getEditVideoTabs(this.options.videoId,e),activeTab:".edit-chapters-applink",goBackTab:l.Si.getBackButton(this.options.videoId)}))}},{key:"renderWebPlayer",value:function(){this.player=new v.Q({model:this.model,webPlayerUrl:this.config.get("webPlayerUrl"),captureAnalytics:!1,currentUser:this.currentUser}),this.showChildView("webplayer",this.player)}},{key:"mapPhysicalChapters",value:function(){var e=this;this.renderPartialLoading("chapterList"),this.player.query("getChapters",(function(t){e.chapters=new c.q(T.$k.mapPhysicalChapters(t)),e.renderChapterList()}))}},{key:"redirectToVideoDetails",value:function(){r.Q.AppLinkHelper.trigger({application:d.OV.LIBRARY_EDITOR,action:d.eX.LibraryEditor.VIDEO_DETAILS,args:[this.model.get("id")]},{replace:!0})}},{key:"fetchData",value:function(){var e=this;if(this.model=this.videoDataService.getVideo(this.options.videoId),this.model){if(!l.BK.canEditVideo(this.model))return void this.redirectToVideoDetails();this.chapters=this.model.chapters}this.hasPhysicalChapters=this.videoDataService.hasPhysicalChapters(this.options.videoId),this.hasPhysicalChapters&&this.hasPhysicalChapters.get("value")&&!this.getConcatenateRequestSent&&(this.chapterDataService.getConcatenateRequest(this.options.videoId,(function(t){e.concatenateRequest=t,e.render()})),this.getConcatenateRequestSent=!0)}},{key:"shouldRender",value:function(){return!(!this.model||!this.hasPhysicalChapters||this.hasPhysicalChapters.get("value")&&!this.concatenateRequest&&!this.concatenateRequestNotFound)}},{key:"requiredResources",get:function(){return{config:u.p.config,currentUser:V.K.currentUser}}},{key:"onBeforeRender",value:function(){return this.fetchData(),this.shouldRender()}},{key:"onRender",value:function(){this.renderTabs(),this.renderWebPlayer(),this.renderEditComponents(),this.startPollingConcatenation()}}])&&L(t.prototype,i),Object.defineProperty(t,"prototype",{writable:!1}),N}(r.Q.View)},61159:function(e,t,i){var n=i(32227);e.exports=(n.default||n).template({compiler:[8,">= 4.3.0"],main:function(e,t,i,n,r){return'<div class="tab-region w-100"></div>\r\n<div class="row">\r\n <div class="col-6 pt-3">\r\n <div class="webplayer-region"></div>\r\n <div class="add-chapter-region"></div>\r\n </div>\r\n <div class="col-6 mb-2 pt-3">\r\n <div class="chapter-list-region"></div>\r\n </div>\r\n</div>'},useData:!0})}}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[4353],{18068:function(e,t,n){"use strict";n.r(t),n.d(t,{SuggestAnEditView:function(){return ee}});var o=n(39479),r=n(57857),i=n(31647),a=n(21679),s=n(99249),l=n(70065),c=n(52076),u=n(61843);function d(e){return d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},d(e)}function p(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function f(e,t){return f=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},f(e,t)}function h(e,t){if(t&&("object"===d(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function y(e){return y=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},y(e)}var g=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&f(e,t)}(i,e);var t,n,o,r=(n=i,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=y(n);if(o){var r=y(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return h(this,e)});function i(){return p(this,i),r.apply(this,arguments)}return t=i,Object.defineProperty(t,"prototype",{writable:!1}),t}(i.Q.Model),m=n(13102),b=n(67670),v=n(9484),w=n(48404),S=n(30305),O=n(83665),k=n(26357),T=n(88172),M=n(10101),P=n(75459),E=n(8371),C=n(48088),j=n(33192),R=n(17422),V=n(48726),x=n(40622),_=n(7190),N=n(19098),I=n.n(N),D={metadataValue:"mvVSS"};function B(e){return B="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},B(e)}function L(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function A(e,t){return A=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},A(e,t)}function U(e,t){if(t&&("object"===B(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function F(e){return F=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},F(e)}var H,K=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&A(e,t)}(l,e);var t,n,o,a,s=(o=l,a=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=F(o);if(a){var n=F(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return U(this,e)});function l(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l),s.call(this,e)}return t=l,(n=[{key:"name",get:function(){return"SuggestEditComponent"}},{key:"template",get:function(){return I()}},{key:"tagName",get:function(){return"form"}},{key:"className",get:function(){return"mt-3"}},{key:"lang",get:function(){return"libraryEditor.suggestEdit"}},{key:"regions",value:function(){return{ratingSelect:{el:".rating-select-region",replaceElement:!0}}}},{key:"bindings",get:function(){return{"[name=suggestion]":{observe:"suggestion",setOptions:{validate:!0}},"[name=reason]":{observe:"reason",setOptions:{validate:!0}}}}},{key:"elements",get:function(){return{ratingValidation:".rating-form-feedback"}}},{key:"getMetadataValue",value:function(){return this.options.metadataType===x.MetadataType.BroadcastDate?this.options.metadataValue?j(this.options.metadataValue).format(R.K4.FULL_YEAR):r.T.getPhrase(this.lang,"noMetadataValue"):this.options.metadataValue instanceof i.Q.Collection?this.options.metadataValue.length?this.options.metadataValue.map((function(e){return e.get("name")})).join(", "):r.T.getPhrase(this.lang,"noMetadataValue"):this.options.metadataValue||r.T.getPhrase(this.lang,"noMetadataValue")}},{key:"getSuggestionPlaceholder",value:function(){return this.options.metadataType===x.MetadataType.Other?r.T.getPhrase(this.lang,"otherSuggestionPlaceholder"):r.T.getPhrase(this.lang,"suggestionPlaceholder",{metadataType:_.uB.translateMetadataName(this.options.metadataType).toLowerCase()})}},{key:"renderRatingSelect",value:function(){this.options.ratingValidationMessage?this.getUI("ratingValidation").text(this.options.ratingValidationMessage).attr("style","display: block;"):this.getUI("ratingValidation").hide(),this.options.metadataType===x.MetadataType.Rating&&this.showChildView("ratingSelect",new V.R({model:this.options.currentRating,collection:this.options.ratings,parentChannelName:this.options.channelName,hideHeaderText:!0,hideRemove:!0}))}},{key:"viewOptions",value:function(){return{styles:D,metadataValue:this.getMetadataValue(),useRatingSelect:this.options.metadataType===x.MetadataType.Rating,isOtherType:this.options.metadataType===x.MetadataType.Other,metadataType:_.uB.translateMetadataName(this.options.metadataType).toLowerCase(),suggestionPlaceholder:this.getSuggestionPlaceholder()}}},{key:"onRender",value:function(){this.renderRatingSelect(),this.stickit(),C.Validation.bind(this)}},{key:"onDestroy",value:function(){this.unstickit(),C.Validation.unbind(this)}}])&&L(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),l}(i.Q.Component);!function(e){e[e.Email=0]="Email"}(H||(H={}));var Q=n(60519),Z=n(68249),z=Object.assign(Object.assign({},Q.c),{createSuggestEditNotification:function(e){return{_type:Z.k.SuggestEdit,groupId:e.groupId,receiverId:0,instanceRegion:e.instanceRegion,countryCode:e.countryCode,channels:[H.Email],data:{video:e.video,user:e.user,property:e.property,suggestion:e.suggestion,reason:e.reason,currentValue:e.currentValue}}}}),$=n(34651),q=n.n($);function G(e){return G="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},G(e)}function J(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function W(e,t){return W=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},W(e,t)}function Y(e,t){if(t&&("object"===G(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function X(e){return X=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},X(e)}var ee=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&W(e,t)}(f,e);var t,n,i,d,p=(i=f,d=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=X(i);if(d){var n=X(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return Y(this,e)});function f(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,f),p.call(this,e)}return t=f,(n=[{key:"initialize",value:function(){this.getViewModel(),this.videoDataService=a.u.getInstance(S.Or.Video,this),this.ratingsDataService=a.u.getInstance(S.Or.Ratings,this),this.notificationDataService=a.u.getInstance(S.Or.Notifications,this),this.selectedMetadata=new g,this.bindListeners()}},{key:"name",get:function(){return"SuggestAnEditView"}},{key:"template",get:function(){return q()}},{key:"tagName",get:function(){return"form"}},{key:"className",get:function(){return"form-group"}},{key:"lang",get:function(){return"libraryEditor.suggestAnEdit"}},{key:"title",get:function(){return r.T.getPhrase(this.lang,"title")}},{key:"channelName",get:function(){return u.N0.generateUniqueChannelName(this)}},{key:"viewModelName",get:function(){return"".concat(this.name,":").concat(this.options.videoId)}},{key:"regions",value:function(){return{dropdown:{el:".metadata-dropdown-region",replaceElement:!1},suggestEdit:{el:".suggest-edit-region",replaceElement:!0}}}},{key:"behaviors",get:function(){var e=this;return[{behaviorClass:M.Yw,title:r.T.getPhrase(this.lang,"heading"),spinnerButtonOptions:{model:this.spinnerModel=new b.v,channelName:this.channelName,buttonText:r.T.getPhrase(this.lang,"submit"),onClick:function(){return e.onSubmit()}}}]}},{key:"requiredResources",get:function(){return{config:w.p.config,currentUser:v.K.currentUser}}},{key:"bindListeners",value:function(){this.listenTo(this.channelName,"select:option:selected",this.onMetadataSelect),this.listenTo(this.channelName,"select:rating",this.onSelectRating),this.listenTo(S.Vk.VIDEO,"".concat(S.M_.VIDEOS,":").concat(this.options.videoId,":sync"),this.render),this.listenTo(S.Vk.NOTIFICATIONS,"".concat(S.M_.SUGGEST_EDIT,":error"),this.onError)}},{key:"onSubmit",value:function(){var e=this;if(this.validateForm()){this.spinnerModel.set(T.ZV.ShowSpinner,!0);var t=this.selectedMetadata.get("metadataType")===x.MetadataType.Rating?this.viewModel.get("ratingSuggestion"):this.viewModel.get("suggestion"),n=this.config.get("suggestEditMetadataGroupId"),o=z.createSuggestEditNotification({groupId:n,instanceRegion:this.currentUser.get("instanceRegion"),countryCode:this.currentUser.get("countryCode"),video:this.model.toJSON(),user:this.currentUser.toJSON(),property:this.selectedMetadata.get("metadataType").toLowerCase(),suggestion:t,reason:this.viewModel.get("reason"),currentValue:this.selectedMetadata.get("metadataValue")});this.notificationDataService.suggestEdit(o,(function(){e.triggerMethod("hide"),e.spinnerModel.set(T.ZV.ShowSpinner,!1),e.spinnerModel.set(T.ZV.Disabled,!0)})),this.logAction(),this.viewModel.clear()}}},{key:"onError",value:function(){this.spinnerModel.set(T.ZV.ShowSpinner,!1)}},{key:"onMetadataSelect",value:function(e){this.selectMetadata(e),this.renderSuggestEdit()}},{key:"onSelectRating",value:function(e){this.viewModel.set("ratingSuggestion",e.get("name")),this.renderSuggestEdit()}},{key:"selectMetadata",value:function(e){this.spinnerModel.set(T.ZV.Disabled,!1),u.yV.setSelected(e.get("id"),this.metadataCollection),this.selectedMetadata.set({metadataType:e.get("name"),metadataValue:e.get("name")!==x.MetadataType.Other?this.model.get(e.get("property")):null}),e.get("name")!==x.MetadataType.Rating&&this.viewModel.set("ratingSuggestion","")}},{key:"getMetadataCollection",value:function(){var e=Object.keys(x.MetadataTypes).map((function(e){return x.MetadataTypes[e]}));return this.currentUser.get("instanceRegion")===E.b.US&&(e=e.filter((function(e){return e.name!==x.MetadataType.Channel&&e.name!==x.MetadataType.BroadcastDate}))),new O.L(e)}},{key:"getMetadataByType",value:function(e){return this.metadataCollection.findWhere({name:e})}},{key:"getViewModel",value:function(){this.viewModel=s.r.get(this.viewModelName),this.viewModel.addValidation(_.xs)}},{key:"validateForm",value:function(){this.renderSuggestEdit(),this.viewModel.validate();var e=this.viewModel.toJSON(),t=e.reason,n=e.suggestion;return!(this.getRatingValidationMessage()||this.selectedMetadata.get("metadataType")!==x.MetadataType.Rating&&!n||!t)}},{key:"getRatingValidationMessage",value:function(){if(this.selectedMetadata.get("metadataType")!==x.MetadataType.Rating)return"";var e=this.selectedMetadata.get("metadataValue"),t=this.viewModel.get("ratingSuggestion");return t?e===t?_.nf.original():"":_.nf.empty()}},{key:"checkPreselection",value:function(){if(!this.selectedMetadata.get("metadataType")&&this.options.metadata&&this.dataFetched()){var e=this.getMetadataByType(this.options.metadata);this.selectMetadata(e)}}},{key:"logAction",value:function(){var e=u.M2.getSourceTypes(this.model);e=o.filter(e,(function(e){return e!==P.r.CustomLibrary}));var t={videoSourceTypes:o.sortBy(o.unique(e),(function(e){return e})).join(","),videoId:this.model.get("id"),metadataProperty:this.selectedMetadata.get("metadataType"),metadataPropertyValue:this.selectedMetadata.get("metadataValue"),suggestion:this.viewModel.get("suggestion"),reason:this.viewModel.get("reason")};c.k.logUserAction(t,{descriptor:l.SuggestionDescriptor.Edit,location:l.LocationContext.Popup,actionType:l.UserAction.Suggest,entity:l.EntityType.Video})}},{key:"dataFetched",value:function(){return!!this.model&&!!this.ratingCollection}},{key:"renderMetadataDropdown",value:function(){this.showChildView("dropdown",new k.H({collection:_.uB.translateMetadataCollectionNames(this.metadataCollection),channelName:this.channelName,childOptions:{titleProperty:"name",eventName:"select:option:click"},placeholderText:this.selectedMetadata.get("metadataType")||r.T.getPhrase(this.lang,"dropdownPlaceholder"),analyticsHelper:c.k}))}},{key:"renderSuggestEdit",value:function(){this.selectedMetadata.get("metadataType")&&this.showChildView("suggestEdit",new K({model:this.viewModel,channelName:this.channelName,ratings:this.ratingCollection,currentRating:this.viewModel.get("ratingSuggestion")?new m.i(this.ratingCollection.findWhere({name:this.viewModel.get("ratingSuggestion")})):null,metadataType:this.selectedMetadata.get("metadataType"),metadataValue:this.selectedMetadata.get("metadataValue"),ratingValidationMessage:this.getRatingValidationMessage()}))}},{key:"onBeforeRender",value:function(){this.dataFetched()||(this.model=this.videoDataService.getVideo(this.options.videoId),this.ratingCollection=this.ratingsDataService.getAllRatings()),this.checkPreselection(),this.metadataCollection||(this.metadataCollection=this.getMetadataCollection())}},{key:"viewOptions",value:function(){return{dataFetched:this.dataFetched(),spinnerEl:u.Kp.getSpinner({size:u.Ey.Large,extraClasses:"mx-auto"})}}},{key:"onRender",value:function(){this.dataFetched()&&(this.renderMetadataDropdown(),this.renderSuggestEdit())}}])&&J(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),f}(i.Q.View)},71641:function(e,t,n){"use strict";n.d(t,{w:function(){return d}});var o=n(39479),r=n(31647),i=n(55142);function a(e){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(e)}function s(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function l(e,t){return l=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},l(e,t)}function c(e,t){if(t&&("object"===a(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function u(e){return u=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},u(e)}var d=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&l(e,t)}(p,e);var t,n,r,a,d=(r=p,a=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=u(r);if(a){var n=u(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return c(this,e)});function p(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,p),d.call(this,e)}return t=p,n=[{key:"name",get:function(){return"DropdownCollectionComponent"}},{key:"className",get:function(){return"dropdown-menu items-viewpart ".concat(this.getExtraClasses(this.options.displayOptions))}},{key:"attributes",get:function(){return{"aria-labelledby":"dropdownSelector"}}},{key:"initialize",value:function(){this.listenTo(this.options.channelName,"center:dropdown",this.centerSelectedItem)}},{key:"childView",get:function(){return i.N}},{key:"childViewOptions",get:function(){var e={channelName:this.options.channelName,analyticsHelper:this.options.analyticsHelper};return o.extend(e,this.options.childOptions)}},{key:"getExtraClasses",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.alignment,n=void 0===t?"left":t,o=e.extraClasses,r="dropdown-menu-".concat(n);return o&&(r="".concat(r," ").concat(o)),r}},{key:"centerSelectedItem",value:function(){var e=this.$el.find(".active");if(e.length){var t=this.$el.scrollTop()+e.position().top,n=.5*this.$el.height()+.5*e.height();this.$el.scrollTop(t-n)}}}],n&&s(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),p}(r.Q.ComponentCollection)},26357:function(e,t,n){"use strict";n.d(t,{H:function(){return g}});var o=n(39479),r=n(48088),i=n(31647),a=n(71641),s=n(61843),l=n(46635),c=n.n(l),u={dropdownMenu:"oKdKI",selectButton:"fTeoW",disabled:"gZbQ4"};function d(e){return d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},d(e)}function p(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function f(e,t){return f=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},f(e,t)}function h(e,t){if(t&&("object"===d(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function y(e){return y=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},y(e)}var g=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&f(e,t)}(g,e);var t,n,i,l,d=(i=g,l=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=y(i);if(l){var n=y(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return h(this,e)});function g(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,g),(t=d.call(this,e)).selectSearch="",t.sameCharIndex=1,t.optionStep=1,t}return t=g,n=[{key:"initialize",value:function(){this.setModel(),this.bindListeners()}},{key:"name",get:function(){return"SelectComponent"}},{key:"template",get:function(){return c()}},{key:"regions",value:function(){return{dropdown:{el:".dropdown-region",replaceElement:!0}}}},{key:"events",value:function(){return{keydown:"onKeydown","shown.bs.dropdown":"onShowDropdown"}}},{key:"defaults",get:function(){return{displayProperty:"name"}}},{key:"elements",get:function(){return{dropdownToggle:".dropdown-toggle"}}},{key:"bindListeners",value:function(){this.listenTo(this.options.channelName,this.options.childOptions.eventName,this.onSelect)}},{key:"onShowDropdown",value:function(){r.Radio.channel(this.options.channelName).trigger("center:dropdown")}},{key:"onKeydown",value:function(e){38===e.keyCode||40===e.keyCode?this.onArrowKeyDown(e):13===e.keyCode?this.render():this.onType(e),r.Radio.channel(this.options.channelName).trigger("center:dropdown")}},{key:"onArrowKeyDown",value:function(e){s.yV.getSelected(this.collection)?this.optionStep=1:this.optionStep=0;var t=this.getNextModel(e.keyCode);for(t||(s.yV.deselectAll(this.collection),t=this.getNextModel(e.keyCode));this.isDisabled(t);)this.optionStep++,t=this.getNextModel(e.keyCode);this.onSelect(t)}},{key:"onType",value:function(e){if(1===e.key.toString().length){var t=this.getModelMatch(e);t&&this.onSelect(t),this.runTimer()}}},{key:"onSelect",value:function(e){this.isDisabled(e)||(s.yV.setSelected(e.get("id"),this.collection),this.setModel(),this.getUI("dropdownToggle").text(this.getButtonText()),r.Radio.channel(this.options.channelName).trigger("select:option:selected",e))}},{key:"setModel",value:function(){this.model=s.yV.getSelected(this.collection)}},{key:"getNextModel",value:function(e){var t,n=s.yV.getSelected(this.collection)||this.collection.first(),o=this.collection.indexOf(n);return(t=38===e?this.collection.at(o-this.optionStep):this.collection.at(o+this.optionStep))||(s.yV.deselectAll(this.collection),t=this.collection.first(),this.optionStep=0),t}},{key:"getModelMatch",value:function(e){var t,n=this;return 1===this.selectSearch.length&&this.selectSearch===e.key?t=this.handleSameCharIndex(e.key):(this.selectSearch+=e.key,this.sameCharIndex=1),t||(t=o.find(this.collection.models,(function(e){return e.get(n.options.displayProperty).toLowerCase().slice(0,n.selectSearch.length).includes(n.selectSearch.toLowerCase())}))),t}},{key:"handleSameCharIndex",value:function(e){var t=this,n=o.filter(this.collection.models,(function(n){return n.get(t.options.displayProperty).toLowerCase().slice(0,1)===e}));if(n.length>1){var r=n[this.sameCharIndex];return r||(r=o.first(n),this.sameCharIndex=0),this.sameCharIndex++,r}return o.first(n)}},{key:"runTimer",value:function(){var e=this;this.scopedTimerIndex&&clearTimeout(this.scopedTimerIndex),this.scopedTimerIndex=window.setTimeout((function(){e.selectSearch=""}),500)}},{key:"isDisabled",value:function(e){var t;if(e.get("divider"))return!0;if(!o.isFunction(this.options.childOptions.isDisabled))return!1;for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return(t=this.options.childOptions.isDisabled).call.apply(t,[this,e].concat(r))}},{key:"getButtonText",value:function(){if(this.options.disabled)return this.options.noOptionsText;var e=s.yV.getSelected(this.collection);return e&&e.get(this.options.displayProperty)||this.options.placeholderText}},{key:"viewOptions",value:function(){return{styles:u,inputName:this.options.inputName,disabled:this.options.disabled,placeholderText:this.getButtonText()}}},{key:"onRender",value:function(){this.showChildView("dropdown",new a.w({collection:this.collection,channelName:this.options.channelName,childOptions:o.extend(this.options.childOptions),displayOptions:{extraClasses:"w-100 ".concat(u.dropdownMenu)},analyticsHelper:this.options.analyticsHelper}))}}],n&&p(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),g}(i.Q.Component)},67670:function(e,t,n){"use strict";n.d(t,{v:function(){return d}});var o=n(31647),r=n(88172);function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function l(e,t){return l=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},l(e,t)}function c(e,t){if(t&&("object"===i(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function u(e){return u=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},u(e)}var d=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&l(e,t)}(p,e);var t,n,o,i,d=(o=p,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=u(o);if(i){var n=u(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return c(this,e)});function p(){return a(this,p),d.apply(this,arguments)}return t=p,(n=[{key:"defaults",value:function(){return e={},!0,(t=r.ZV.Disabled)in e?Object.defineProperty(e,t,{value:true,enumerable:!0,configurable:!0,writable:!0}):e[t]=true,e;var e,t}}])&&s(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),p}(o.Q.Model)},19098:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({1:function(e,t,n,o,r){e.propertyIsEnumerable;var i,a=e.escapeExpression,s=e.lambda;return'<p class="font-weight-bold mb-0">'+a((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"currentType",{name:"lang",hash:{metadataType:null!=(i=null!=t?t.options:t)?i.metadataType:i},data:r}))+'</p>\r\n<p class="mb-3 '+a(s(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.metadataValue:i,t))+'">'+(null!=(i=s(null!=(i=null!=t?t.options:t)?i.metadataValue:i,t))?i:"")+"</p>\r\n"},3:function(e,t,n,o,r){var i;return e.propertyIsEnumerable,' <textarea\r\n id="suggest-edit"\r\n placeholder="'+e.escapeExpression(e.lambda(null!=(i=null!=t?t.options:t)?i.suggestionPlaceholder:i,t))+'"\r\n class="form-control"\r\n name="suggestion"\r\n ></textarea>\r\n <div class="form-feedback"></div>\r\n'},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,r){e.propertyIsEnumerable;var i,a=null!=t?t:e.nullContext||{},s=e.hooks.helperMissing,l=e.escapeExpression;return(null!=(i=n.unless.call(a,null!=(i=null!=t?t.options:t)?i.isOtherType:i,{name:"unless",hash:{},fn:e.program(1,r,0),inverse:e.noop,data:r}))?i:"")+'\r\n<div class="dropdown-divider"></div>\r\n\r\n<div class="form-group">\r\n <label for="suggest-edit" class="font-weight-bold">'+l((n.lang||t&&t.lang||s).call(a,"suggestionSubheading",{name:"lang",hash:{},data:r}))+'</label>\r\n <div class="rating-select-region"></div>\r\n <div class="rating-form-feedback invalid-feedback"></div>\r\n'+(null!=(i=n.unless.call(a,null!=(i=null!=t?t.options:t)?i.useRatingSelect:i,{name:"unless",hash:{},fn:e.program(3,r,0),inverse:e.noop,data:r}))?i:"")+'</div>\r\n\r\n<div class="form-group">\r\n <label for="reason-for-edit" class="font-weight-bold">'+l((n.lang||t&&t.lang||s).call(a,"reasoningSubheading",{name:"lang",hash:{},data:r}))+'</label>\r\n <textarea\r\n id="reason-for-edit"\r\n placeholder="'+l((n.lang||t&&t.lang||s).call(a,"reasoningPlaceholder",{name:"lang",hash:{},data:r}))+'"\r\n class="form-control"\r\n name="reason"\r\n ></textarea>\r\n <div class="form-feedback"></div>\r\n</div>'},useData:!0})},34651:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({1:function(e,t,n,o,r){e.propertyIsEnumerable;var i=null!=t?t:e.nullContext||{},a=e.hooks.helperMissing,s=e.escapeExpression;return"<p>"+s((n.lang||t&&t.lang||a).call(i,"guidelines",{name:"lang",hash:{},data:r}))+'</p>\r\n<p class="font-weight-bold mb-1">'+s((n.lang||t&&t.lang||a).call(i,"dropdownHeading",{name:"lang",hash:{},data:r}))+'</p>\r\n<div class="metadata-dropdown-region position-relative"></div>\r\n<div class="suggest-edit-region"></div>\r\n'},3:function(e,t,n,o,r){var i;return e.propertyIsEnumerable,(null!=(i=e.lambda(null!=(i=null!=t?t.options:t)?i.spinnerEl:i,t))?i:"")+"\r\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,r){var i;return e.propertyIsEnumerable,null!=(i=n.if.call(null!=t?t:e.nullContext||{},null!=(i=null!=t?t.options:t)?i.dataFetched:i,{name:"if",hash:{},fn:e.program(1,r,0),inverse:e.program(3,r,0),data:r}))?i:""},useData:!0})},46635:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({1:function(e,t,n,o,r){var i;return e.propertyIsEnumerable,e.escapeExpression(e.lambda(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.disabled:i,t))},3:function(e,t,n,o,r){return" disabled"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,r){e.propertyIsEnumerable;var i,a=e.lambda,s=e.escapeExpression,l=null!=t?t:e.nullContext||{};return'<button \r\n class="dropdown-toggle form-control btn-block text-left position-relative '+s(a(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.selectButton:i,t))+" "+(null!=(i=n.if.call(l,null!=(i=null!=t?t.options:t)?i.disabled:i,{name:"if",hash:{},fn:e.program(1,r,0),inverse:e.noop,data:r}))?i:"")+'" \r\n type="button" \r\n id="dropdownMenuButton" \r\n data-toggle="dropdown" \r\n aria-haspopup="true" \r\n aria-expanded="false"\r\n '+(null!=(i=n.if.call(l,null!=(i=null!=t?t.options:t)?i.disabled:i,{name:"if",hash:{},fn:e.program(3,r,0),inverse:e.noop,data:r}))?i:"")+' \r\n name="'+s(a(null!=(i=null!=t?t.options:t)?i.inputName:i,t))+'"\r\n >\r\n '+s(a(null!=(i=null!=t?t.options:t)?i.placeholderText:i,t))+'\r\n</button>\r\n<div class="dropdown-region"></div>\r\n<div class="form-feedback"></div>'},useData:!0})}}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[5047],{59054:function(e,t,n){"use strict";var r;n.d(t,{f:function(){return r}}),function(e){e.Share="share",e.MasterObject="masterobject"}(r||(r={}))},79641:function(e,t,n){"use strict";n.r(t),n.d(t,{VideoDetailsView:function(){return Be}});var r,o=n(39479),i=n.n(o),c=n(31647);!function(e){e.AU="content-ap-southeast-1",e.NZ="content-ap-southeast-2",e.UK="content-eu-west-1",e.SCOT="content-eu-west-2",e.US="content-na-central-1",e.GLOBAL="content-global"}(r||(r={}));var s=n(8371),l=n(30305),a=n(70065),u=n(6681),f=n(56210),p=n(61843),d=n(66882),h={svgContainer:"qOHRG"},y=n(86745),b=n.n(y);function m(e){return m="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},m(e)}function v(e,t){for(var n=0;n<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 g(e,t){return g=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},g(e,t)}function w(e,t){if(t&&("object"===m(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function O(e){return O=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},O(e)}var k=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&g(e,t)}(s,e);var t,n,r,i,c=(r=s,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=O(r);if(i){var n=O(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return w(this,e)});function s(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),c.call(this,e)}return t=s,(n=[{key:"name",get:function(){return"VideoHeaderComponent"}},{key:"template",get:function(){return b()}},{key:"className",get:function(){return"d-flex align-items-center justify-content-between p-3 w-100"}},{key:"behaviors",get:function(){return[{behaviorClass:f.H,selector:".".concat(h.svgContainer)}]}},{key:"regions",value:function(){return{actions:{el:".video-actions-region",replaceElement:!1}}}},{key:"viewOptions",value:function(){return{styles:h,lockSvg:u.Nj.getSvg(u.vn.Lock),hasRestriction:!o.isUndefined(this.model.get("restrictions")),restrictionMessage:p.S9.getRestrictionTooltipMessage(this.model)}}},{key:"onRender",value:function(){this.showChildView("actions",new d.R({model:this.model,showActionLabels:!0,application:l.OV.LIBRARY_EDITOR,customerHasLocalCache:this.options.customerHasLocalCache,customerHasExchange:this.options.customerHasExchange,collectionIdentifier:this.options.collectionIdentifier,routeToFolderOnDelete:!0,analyticsOptions:{entity:a.EntityType.Video,location:a.LocationContext.VideoDetailsHeader,descriptor:a.OperationDescriptor.Single},config:this.options.config}))}}])&&v(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),s}(c.Q.Component),E=n(77605),C=n(51184),j=n(7427),S=n(9484),R=n(45837),P=n(44391),_=n(70042),I=n(26457),x=n(17349),T=n.n(x),V={interactive:"N1mrU"};function D(e){return D="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},D(e)}function L(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function B(e,t){return B=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},B(e,t)}function A(e,t){if(t&&("object"===D(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function U(e){return U=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},U(e)}var M=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&B(e,t)}(c,e);var t,n,r,o,i=(r=c,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=U(r);if(o){var n=U(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return A(this,e)});function c(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c),i.call(this,e)}return t=c,(n=[{key:"initialize",value:function(){this.isClickViewContent=this.model&&!p.BK.canEditVideo(this.model)}},{key:"name",get:function(){return"VideoSidebarInfoComponent"}},{key:"lang",get:function(){return"libraryEditor.videoSidebarInfo"}},{key:"className",get:function(){return"py-3 h-100"}},{key:"template",get:function(){return T()}},{key:"regions",value:function(){return{preview:{el:".video-preview-region",replaceElement:!0},folders:{el:".folders-region",replaceElement:!0},tags:{el:".tags-region",replaceElement:!0}}}},{key:"requiredResources",get:function(){return{currentUser:S.K.currentUser}}},{key:"renderVideoPreview",value:function(){this.showChildView("preview",new C.c({model:this.model,webPlayerUrl:this.options.webPlayerUrl,channelName:this.options.channelName,analyticsOptions:{location:a.LocationContext.VideoDetails},currentUser:this.options.currentUser,createViewKey:this.options.createViewKey,playerApiUrl:this.options.playerApiUrl}))}},{key:"renderTags",value:function(){this.model.get("tags")&&this.model.get("tags").length&&this.showChildView("tags",new P.K({collection:this.model.get("tags"),orientation:I.zM.Flex,behavior:I.Dm.Link}))}},{key:"renderFolders",value:function(){this.model.get("categories")&&this.model.get("categories").length&&this.showChildView("folders",new j.V({model:this.model,libraries:this.options.libraries,showFolder:!0,hideLabel:!0}))}},{key:"viewOptions",value:function(){return{styles:V,interactive:_.u.isInteractive(this.model),duration:p.T.ToDisplayDuration(this.model.get("duration")),folders:this.model.categories&&this.model.categories.length,multipleFolders:this.model.categories.length>1,tags:this.model.get("tags")&&this.model.get("tags").length,isClickViewContent:this.isClickViewContent,hasCustomerTags:this.isClickViewContent&&p.BK.filterObjectsByOwnerType(this.model.tags,R.N.Customer,this.options.currentUser.get("customerId")).length}}},{key:"onRender",value:function(){this.renderVideoPreview(),this.renderTags(),this.renderFolders()}}])&&L(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),c}(c.Q.Component),N=n(70693),F=n(68708),H=n(63122),K=n(57085),Q=n(23130),J=n(10386),q=n.n(J),z=n(90118),X=n.n(z),Y={columnNames:"Hs0Sh"};function Z(e){return Z="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Z(e)}function W(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function G(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function $(e,t,n){return t&&G(e.prototype,t),n&&G(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function ee(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&te(e,t)}function te(e,t){return te=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},te(e,t)}function ne(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=oe(e);if(t){var o=oe(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return re(this,n)}}function re(e,t){if(t&&("object"===Z(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function oe(e){return oe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},oe(e)}var ie=function(e){ee(n,e);var t=ne(n);function n(){return W(this,n),t.apply(this,arguments)}return $(n,[{key:"name",get:function(){return"FieldComponent"}},{key:"template",get:function(){return q()}},{key:"className",get:function(){return"row mb-0"}},{key:"regions",value:function(){return{description:{el:".description-region",replaceElement:!0}}}},{key:"viewOptions",value:function(){return{styles:Y}}},{key:"renderDescription",value:function(){this.model.get("value")&&this.showChildView("description",new Q.Z({model:new c.Q.Model({description:this.model.get("value")}),linkify:!0,size:Q.t.Large,truncate:!0,allowExpand:!0}))}},{key:"onRender",value:function(){this.renderDescription()}}]),n}(c.Q.Component),ce=function(e){ee(n,e);var t=ne(n);function n(){return W(this,n),t.apply(this,arguments)}return $(n,[{key:"name",get:function(){return"FieldsComponentCollection"}},{key:"childView",get:function(){return ie}}]),n}(c.Q.ComponentCollection),se=function(e){ee(n,e);var t=ne(n);function n(){return W(this,n),t.apply(this,arguments)}return $(n,[{key:"name",get:function(){return"FieldsComponent"}},{key:"template",get:function(){return X()}},{key:"className",get:function(){return"py-3 border-top"}},{key:"regions",value:function(){return{fields:{el:".fields-region",replaceElement:!0}}}},{key:"onRender",value:function(){this.showChildView("fields",new ce({collection:this.collection}))}}]),n}(c.Q.Component),le=n(21251),ae=n(21679),ue=n(33800),fe=n(48404),pe=n(17422),de=n(75535),he=n(99748),ye=n(53854),be=n(95061),me=n(3059),ve=n(57857),ge=n(26835),we=n.n(ge),Oe={licenseContainer:"eHMZ_",license:"I0iMx",era:"qgIXx"};function ke(e){return ke="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ke(e)}function Ee(e,t){for(var n=0;n<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 Ce(e,t){return Ce=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Ce(e,t)}function je(e,t){if(t&&("object"===ke(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Se(e){return Se=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Se(e)}var Re=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ce(e,t)}(s,e);var t,n,o,i,c=(o=s,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Se(o);if(i){var n=Se(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return je(this,e)});function s(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),c.call(this,e)}return t=s,(n=[{key:"name",get:function(){return"ScreenrightsDisclaimerComponent"}},{key:"template",get:function(){return we()}},{key:"lang",get:function(){return"shared.screenrightsDisclaimer"}},{key:"className",get:function(){return"py-3 border-top"}},{key:"getLogoClass",value:function(){return p.mU.isInContentRegion(this.options.contentRegion,r.UK)?Oe.era:""}},{key:"getLicenseText",value:function(){switch(this.options.contentRegion){case r.UK:return ve.T.getPhrase(this.lang,"era");case r.AU:return ve.T.getPhrase(this.lang,"copyrightAct");case r.NZ:default:return""}}},{key:"viewOptions",value:function(){var e=p.mU.isInContentRegion(this.options.contentRegion,r.AU);return{styles:Oe,logoClass:this.getLogoClass(),labelText:e?ve.T.getPhrase(this.lang,"labelAu"):"",licenseText:this.getLicenseText()}}}])&&Ee(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),s}(c.Q.Component),Pe=n(91865),_e=n.n(Pe),Ie=n(59054);function xe(e){return xe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},xe(e)}function Te(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ve(e,t){return Ve=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Ve(e,t)}function De(e,t){if(t&&("object"===xe(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Le(e){return Le=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Le(e)}var Be=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ve(e,t)}(f,e);var t,n,o,a,u=(o=f,a=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Le(o);if(a){var n=Le(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return De(this,e)});function f(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,f),u.call(this,e)}return t=f,n=[{key:"initialize",value:function(){this.bindListeners(),this.videoDataService=ae.u.getInstance(ue.O.Video,this),this.videoMixinService=ae.u.getInstance(ue.K.VideoMixin,this),this.localCacheDataService=ae.u.getInstance(ue.O.LocalCache,this),this.playerDataService=ae.u.getInstance(ue.O.Player,this),this.createViewKey=this.createViewKey.bind(this)}},{key:"bindListeners",value:function(){this.listenTo(l.Vk.VIDEO,"".concat(le.M.VIDEOS,":").concat(this.options.videoId,":sync"),this.render),this.listenTo(l.Vk.VIDEO,"".concat(le.M.VIDEOS,":").concat(this.options.videoId,":error"),this.onError),this.listenTo(l.Vk.VIDEO,"".concat(le.M.RESTRICTED_OBJECTS,":").concat(this.options.videoId,":sync"),this.render),this.listenTo(l.Vk.VIDEO,"cache:cleared",this.render),this.listenTo(l.Vk.LIBRARY,"libraries:sync",this.render),this.listenTo(l.Vk.RESTRICTED_VIDEO,"".concat(le.M.UPDATE_VIDEO_RESTRICTION,":sync"),this.updateRestriction),this.listenTo(l.Vk.RESTRICTED_VIDEO,"".concat(le.M.RESTRICTED_OBJECTS,":").concat(this.options.videoId,":sync"),this.render),this.listenTo(l.Vk.LOCAL_CACHE,"".concat(le.M.LOCAL_CACHE_DEVICES,":sync"),this.render),this.listenTo(l.Vk.LOCAL_CACHE,"".concat(le.M.LOCAL_CACHE_DEVICES,":error"),this.onError)}},{key:"name",get:function(){return"VideoDetailsView"}},{key:"title",get:function(){return this.video&&this.video.get("name")}},{key:"channelName",get:function(){return"".concat(this.name).concat(this.cid)}},{key:"template",get:function(){return _e()}},{key:"className",get:function(){return"container-fluid h-100 bg-white rounded"}},{key:"onError",value:function(e){switch(e.type){case he.h.NotFound:c.Q.ErrorHelper.throw(new de.l);break;case he.h.Forbidden:c.Q.ErrorHelper.throw(new ye.a)}}},{key:"regions",value:function(){return{breadcrumbs:{el:".breadcrumbs-region",replaceElement:!1},header:{replaceElement:!0,el:".video-header-region",partialLoading:pe.LP.VideoHeader},main:{replaceElement:!0,el:".main-video-information-region",partialLoading:pe.LP.VideoSidebarInfo},basic:{replaceElement:!1,el:".basic-video-information-region",partialLoading:pe.LP.VideoBasicInfo},chapters:{replaceElement:!0,el:".video-chapters-region"},resources:{replaceElement:!0,el:".video-resources-region"},fields:{replaceElement:!0,el:".fields-region"},links:{replaceElement:!0,el:".video-links-region"},screenrightsDisclaimer:{replaceElement:!0,el:".screenright-disclaimer-region"}}}},{key:"updateRestriction",value:function(){this.videoMixinService.getAndMixinVideoRestriction(this.video)}},{key:"showLicense",value:function(){return!(!this.video||p.mU.isInContentRegion(this.currentUser.get("contentRegion"),r.NZ)||(!this.video.get("channel")||!this.video.get("channel").get("id"))&&!this.video.get("dateBroadcast"))}},{key:"createViewKey",value:function(e,t){this.playerDataService.createViewKey(e,Ie.f.MasterObject,t)}},{key:"getCustomLibraryFolders",value:function(){var e;if(!(null===(e=this.video)||void 0===e?void 0:e.categories)||!this.libraries)return[];var t=this.libraries.reduce((function(e,t){return e[t.id]=!0,e}),{});return this.video.categories.filter((function(e){var n=e.libraries.first().get("id");return t[n]}))}},{key:"renderBreadcrumbs",value:function(){this.folder&&this.showChildView("breadcrumbs",new K.n({folder:this.folder,libraries:this.libraries,enableLastItemAppLink:!0}))}},{key:"renderVideoHeader",value:function(){this.showChildView("header",new k({model:this.video,customerHasLocalCache:p.o8.customerHasLocalCache(this.devices,this.currentUser.get("customerId")),customerHasExchange:this.exchanges.any(),collectionIdentifier:this.folder&&new me.F7(this.folder.id,p.x$.GetCurrentSortType()),config:this.config}))}},{key:"renderSidebarInfo",value:function(){this.showChildView("main",new M({model:this.video,webPlayerUrl:this.config.get("webPlayerUrl"),channelName:this.channelName,currentUser:this.currentUser,createViewKey:this.createViewKey,playerApiUrl:this.config.get("playerApiUrl"),libraries:this.libraries}))}},{key:"renderBasicInfo",value:function(){this.video&&this.showChildView("basic",new H.S({model:this.video,showHeading:!0,config:this.config,hideBroadcastInfo:this.currentUser.get("instanceRegion")===s.b.US}))}},{key:"renderFields",value:function(){this.video.fields&&this.video.fields.length&&this.currentUser.get("instanceRegion")!==s.b.US&&this.showChildView("fields",new se({collection:this.video.fields}))}},{key:"renderChapters",value:function(){var e=this.video.chapters;e&&e.length>0&&this.showChildView("chapters",new N.Q({channelName:this.channelName,collection:this.video.chapters}))}},{key:"renderResources",value:function(){var e=this.video.resources;e&&e.length>0&&this.showChildView("resources",new E.c({model:this.video}))}},{key:"renderLinks",value:function(){var e=this.video.links;e&&e.length&&this.showChildView("links",new F.c({model:this.video,headingText:"Links"}))}},{key:"renderScreenrightsDisclaimer",value:function(){this.showLicense()&&this.showChildView("screenrightsDisclaimer",new Re({contentRegion:this.currentUser.get("contentRegion")}))}},{key:"requiredResources",get:function(){return{config:fe.p.config,currentUser:S.K.currentUser,libraries:be.T.libraries,exchanges:be.T.exchanges}}},{key:"onBeforeRender",value:function(){return this.video=this.videoDataService.getVideo(this.options.videoId),this.video&&(this.folder=i().first(this.getCustomLibraryFolders())),this.devices=this.localCacheDataService.getDevices(this.currentUser.get("customerId")),!!this.video}},{key:"viewOptions",value:function(){if(this.video){var e=this.video,t=e.chapters,n=e.resources,r=e.fields,o=e.links;return{hasFolder:!!this.folder,hasChapters:t&&t.length,hasResources:n&&n.length,hasFields:r&&r.length,hasLinks:o&&o.length,showScreenrightsDisclaimer:this.showLicense()}}}},{key:"onRender",value:function(){this.renderBreadcrumbs(),this.renderVideoHeader(),this.renderSidebarInfo(),this.renderBasicInfo(),this.renderFields(),this.renderChapters(),this.renderResources(),this.renderLinks(),this.renderScreenrightsDisclaimer()}}],n&&Te(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),f}(c.Q.View)},57085:function(e,t,n){"use strict";n.d(t,{n:function(){return S}});var r=n(31647),o=n(93933),i=n.n(o),c=n(86363),s=n.n(c);function l(e){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},l(e)}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function f(e,t,n){return t&&u(e.prototype,t),n&&u(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function p(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&d(e,t)}function d(e,t){return d=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},d(e,t)}function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=b(e);if(t){var o=b(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return y(this,n)}}function y(e,t){if(t&&("object"===l(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function b(e){return b=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},b(e)}var m=function(e){p(n,e);var t=h(n);function n(){return a(this,n),t.apply(this,arguments)}return f(n,[{key:"name",get:function(){return"BreadcrumbItemComponent"}},{key:"template",get:function(){return s()}},{key:"tagName",get:function(){return"li"}},{key:"className",get:function(){var e="breadcrumb-item";return this.model.get("active")&&(e+=" active"),e}},{key:"attributes",get:function(){return this.model.get("active")?{"aria-current":"page"}:{}}},{key:"appLinks",get:function(){return this.model.get("active")?{}:{a:this.model.get("appLink")}}},{key:"viewOptions",value:function(){return{isActive:this.model.get("active")}}}]),n}(r.Q.Component),v=function(e){p(n,e);var t=h(n);function n(){return a(this,n),t.apply(this,arguments)}return f(n,[{key:"name",get:function(){return"BreadcrumbComponentCollection"}},{key:"tagName",get:function(){return"ol"}},{key:"className",get:function(){return"breadcrumb m-0 p-0"}},{key:"childView",get:function(){return m}}]),n}(r.Q.ComponentCollection),g=n(22557),w=n(30305);function O(e){return O="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},O(e)}function k(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function E(e,t){return E=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},E(e,t)}function C(e,t){if(t&&("object"===O(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function j(e){return j=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},j(e)}var S=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&E(e,t)}(l,e);var t,n,o,c,s=(o=l,c=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=j(o);if(c){var n=j(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return C(this,e)});function l(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l),s.call(this,e)}return t=l,(n=[{key:"initialize",value:function(){this.getBreadcrumbs()}},{key:"name",get:function(){return"BreadcrumbsComponent"}},{key:"template",get:function(){return i()}},{key:"className",get:function(){return"d-inline-block"}},{key:"regions",value:function(){return{breadcrumbs:".breadcrumbs-region"}}},{key:"getBreadcrumbs",value:function(){this.breadcrumbCollection=new r.Q.Collection;var e,t=this.options.folder;do{if(e=g.P.getParent(t.id,this.options.libraries),this.breadcrumbCollection.add(this.getBreadcrumb(t,!!e),{at:0}),!e)break;t=e}while(e);this.options.video&&this.breadcrumbCollection.add({name:this.options.video.get("name"),appLink:{application:w.OV.LIBRARY_EDITOR,action:w.eX.LibraryEditor.VIDEO_DETAILS,args:[this.options.video.id]}}),this.breadcrumbCollection.length&&this.breadcrumbCollection.last().set("active",!this.options.enableLastItemAppLink)}},{key:"getBreadcrumb",value:function(e,t){var n=t?w.eX.LibraryEditor.FOLDER:w.eX.LibraryEditor.LIBRARY;return{name:e.get("name"),appLink:{application:w.OV.LIBRARY_EDITOR,action:n,args:[e.id]}}}},{key:"onRender",value:function(){var e=new v({collection:this.breadcrumbCollection});this.showChildView("breadcrumbs",e)}}])&&k(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),l}(r.Q.Component)},3059:function(e,t,n){"use strict";n.d(t,{KX:function(){return R},IJ:function(){return y},xw:function(){return O},F7:function(){return r.F}});var r=n(1091),o=n(39479),i=n(33303),c=n(30305),s=n(44937),l=n(39090);function a(e){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(e)}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function f(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function p(e,t){return p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},p(e,t)}function d(e,t){if(t&&("object"===a(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function h(e){return h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},h(e)}var y=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&p(e,t)}(y,e);var t,n,r,i,a=(r=y,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=h(r);if(i){var n=h(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return d(this,e)});function y(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,y),(t=a.call(this,{collectionPrefix:"".concat(c.M_.RECENT_VIDEOS,":collection"),cursor:e.cursor,sort:e.sort})).setAdditionalData(e),t}return t=y,(n=[{key:"setAdditionalData",value:function(e){var t=e.libraryIds,n=e.dateQueryString,r=e.subjects;t&&(this.libraryIds=t),r&&(o.isArray(r)&&r.length&&(this.subjects=r),o.isArray(r)||(this.subjects=[r]));var i=o.findWhere(l.US,{queryString:n})||l.U1;this.dateOption=new s.Wx(i)}},{key:"toString",value:function(){var e,t=this.subjects&&this.subjects.length&&this.subjects.map((function(e){return escape(e.get("name"))}))||[];return[this.collectionPrefix,this.libraryIds,this.dateOption.get("from"),this.dateOption.get("to")].concat((e=t,function(e){if(Array.isArray(e))return u(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return u(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?u(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),[this.cursor]).filter(Boolean).join(":")}},{key:"toParams",value:function(){var e={};return this.libraryIds&&(e.libraryIds=this.libraryIds),this.dateOption&&(e.from=this.dateOption.get("from"),e.to=this.dateOption.get("to")),this.subjects&&(e.subjectIds=o.flatten(this.subjects.map((function(e){return e.get("subjectIds")})))),this.cursor&&(e.cursor=this.cursor),e}}])&&f(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),y}(i.J);function b(e){return b="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},b(e)}function m(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function v(e,t){return v=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},v(e,t)}function g(e,t){if(t&&("object"===b(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function w(e){return w=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},w(e)}var O=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&v(e,t)}(u,e);var t,n,r,i,a=(r=u,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=w(r);if(i){var n=w(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return g(this,e)});function u(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,u),(t=a.call(this,{collectionPrefix:"".concat(c.M_.RECENT_SUBJECTS,":collection"),sort:e.sort})).setAdditionalData(e),t}return t=u,(n=[{key:"setAdditionalData",value:function(e){var t=e.libraryIds,n=e.dateQueryString;t&&(this.libraryIds=t);var r=o.findWhere(l.US,{queryString:n})||l.U1;this.dateOption=new s.Wx(r)}},{key:"toString",value:function(){return[this.collectionPrefix,this.libraryIds,this.dateOption.get("from"),this.dateOption.get("to")].filter(Boolean).join(":")}},{key:"toParams",value:function(){var e={};return this.libraryIds&&(e.libraryIds=this.libraryIds),this.dateOption&&(e.from=this.dateOption.get("from"),e.to=this.dateOption.get("to")),e}}])&&m(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),u}(i.J);function k(e){return k="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},k(e)}function E(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function C(e,t){return C=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},C(e,t)}function j(e,t){if(t&&("object"===k(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function S(e){return S=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},S(e)}var R=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&C(e,t)}(i,e);var t,n,r,o=(n=i,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=S(n);if(r){var o=S(this).constructor;e=Reflect.construct(t,arguments,o)}else e=t.apply(this,arguments);return j(this,e)});function i(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return E(this,i),o.call(this,{collectionPrefix:c.M_.FOLDERS,id:e,sort:t,cursor:n})}return t=i,Object.defineProperty(t,"prototype",{writable:!1}),t}(i.J)},86745:function(e,t,n){var r=n(32227);e.exports=(r.default||r).template({1:function(e,t,n,r,o){e.propertyIsEnumerable;var i,c=e.lambda,s=e.escapeExpression;return' <span class="d-inline-block ml-2 '+s(c(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.svgContainer:i,t))+'" title="'+s(c(null!=(i=null!=t?t.options:t)?i.restrictionMessage:i,t))+'">'+(null!=(i=c(null!=(i=null!=t?t.options:t)?i.lockSvg:i,t))?i:"")+"</span>\r\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){e.propertyIsEnumerable;var i,c,s=null!=t?t:e.nullContext||{};return'<div class="d-inline-flex align-items-center">\r\n <h4 class="d-inline-block mb-0">'+e.escapeExpression("function"==typeof(c=null!=(c=n.name||(null!=t?t.name:t))?c:e.hooks.helperMissing)?c.call(s,{name:"name",hash:{},data:o}):c)+"</h4>\r\n"+(null!=(i=n.if.call(s,null!=(i=null!=t?t.options:t)?i.hasRestriction:i,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o}))?i:"")+'</div>\r\n<div class="video-actions-region d-inline-block"></div>'},useData:!0})},17349:function(e,t,n){var r=n(32227);e.exports=(r.default||r).template({1:function(e,t,n,r,o){e.propertyIsEnumerable;var i,c=e.escapeExpression;return' <span class="badge p-1 '+c(e.lambda(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.interactive:i,t))+'">'+c((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"interactive",{name:"lang",hash:{},data:o}))+"</span>\r\n"},3:function(e,t,n,r,o){var i;return e.propertyIsEnumerable,' <div class="mt-3">\r\n <h5>'+e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"folders",{name:"lang",hash:{smartCount:null!=(i=null!=t?t.options:t)?i.folders:i},data:o}))+'</h5>\r\n <div class="folders-region"></div>\r\n </div>\r\n'},5:function(e,t,n,r,o){return e.propertyIsEnumerable,' <div class="mt-3">\r\n <h5>'+e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"tags",{name:"lang",hash:{},data:o}))+'</h5>\r\n <div class="tags-region"></div>\r\n </div>\r\n'},7:function(e,t,n,r,o){e.propertyIsEnumerable;var i,c=e.escapeExpression;return' <div class="mt-3">\r\n <h5>'+c((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"curriculumLinks",{name:"lang",hash:{},data:o}))+"</h5>\r\n <p>"+c(e.lambda(null!=(i=null!=t?t.options:t)?i.links:i,t))+"</p>\r\n </div>\r\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){e.propertyIsEnumerable;var i,c=null!=t?t:e.nullContext||{};return'<div class="border-right h-100 pl-2 pr-3">\r\n <div class="video-preview-region"></div>\r\n <div class="mt-3">\r\n'+(null!=(i=n.if.call(c,null!=(i=null!=t?t.options:t)?i.interactive:i,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o}))?i:"")+" </div>\r\n\r\n"+(null!=(i=n.if.call(c,null!=(i=null!=t?t.options:t)?i.folders:i,{name:"if",hash:{},fn:e.program(3,o,0),inverse:e.noop,data:o}))?i:"")+"\r\n"+(null!=(i=n.if.call(c,null!=(i=null!=t?t.options:t)?i.tags:i,{name:"if",hash:{},fn:e.program(5,o,0),inverse:e.noop,data:o}))?i:"")+"\r\n"+(null!=(i=n.if.call(c,null!=(i=null!=t?t.options:t)?i.links:i,{name:"if",hash:{},fn:e.program(7,o,0),inverse:e.noop,data:o}))?i:"")+"</div>"},useData:!0})},91865:function(e,t,n){var r=n(32227);e.exports=(r.default||r).template({1:function(e,t,n,r,o){return'<div class="row pl-3 pt-3 pr-3">\r\n <div class="breadcrumbs-region"></div>\r\n</div>\r\n'},3:function(e,t,n,r,o){return' <div class="fields-region"></div>\r\n'},5:function(e,t,n,r,o){return' <div class="video-chapters-region"></div>\r\n'},7:function(e,t,n,r,o){return' <div class="video-resources-region"></div>\r\n'},9:function(e,t,n,r,o){return' <div class="video-links-region"></div>\r\n'},11:function(e,t,n,r,o){return' <div class="screenright-disclaimer-region"></div>\r\n'},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){e.propertyIsEnumerable;var i,c=null!=t?t:e.nullContext||{};return(null!=(i=n.if.call(c,null!=(i=null!=t?t.options:t)?i.hasFolder:i,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o}))?i:"")+'<div class="row border-bottom">\r\n <div class="video-header-region"></div>\r\n</div>\r\n<div class="row">\r\n <div class="col-4">\r\n <div class="main-video-information-region"></div>\r\n </div>\r\n <div class="col-8">\r\n <div class="basic-video-information-region py-3 pr-2"></div>\r\n'+(null!=(i=n.if.call(c,null!=(i=null!=t?t.options:t)?i.hasFields:i,{name:"if",hash:{},fn:e.program(3,o,0),inverse:e.noop,data:o}))?i:"")+(null!=(i=n.if.call(c,null!=(i=null!=t?t.options:t)?i.hasChapters:i,{name:"if",hash:{},fn:e.program(5,o,0),inverse:e.noop,data:o}))?i:"")+(null!=(i=n.if.call(c,null!=(i=null!=t?t.options:t)?i.hasResources:i,{name:"if",hash:{},fn:e.program(7,o,0),inverse:e.noop,data:o}))?i:"")+(null!=(i=n.if.call(c,null!=(i=null!=t?t.options:t)?i.hasLinks:i,{name:"if",hash:{},fn:e.program(9,o,0),inverse:e.noop,data:o}))?i:"")+(null!=(i=n.if.call(c,null!=(i=null!=t?t.options:t)?i.showScreenrightsDisclaimer:i,{name:"if",hash:{},fn:e.program(11,o,0),inverse:e.noop,data:o}))?i:"")+" </div>\r\n</div>"},useData:!0})},86363:function(e,t,n){var r=n(32227);e.exports=(r.default||r).template({1:function(e,t,n,r,o){var i;return e.propertyIsEnumerable,'<span class="font-weight-bolder">'+e.escapeExpression("function"==typeof(i=null!=(i=n.name||(null!=t?t.name:t))?i:e.hooks.helperMissing)?i.call(null!=t?t:e.nullContext||{},{name:"name",hash:{},data:o}):i)+"</span>\r\n"},3:function(e,t,n,r,o){var i;return e.propertyIsEnumerable,"<a>"+e.escapeExpression("function"==typeof(i=null!=(i=n.name||(null!=t?t.name:t))?i:e.hooks.helperMissing)?i.call(null!=t?t:e.nullContext||{},{name:"name",hash:{},data:o}):i)+"</a>\r\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var i;return e.propertyIsEnumerable,null!=(i=n.if.call(null!=t?t:e.nullContext||{},null!=(i=null!=t?t.options:t)?i.isActive:i,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.program(3,o,0),data:o}))?i:""},useData:!0})},93933:function(e,t,n){var r=n(32227);e.exports=(r.default||r).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){return'<nav class="breadcrumbs-region" aria-label="breadcrumb"></nav>'},useData:!0})},10386:function(e,t,n){var r=n(32227);e.exports=(r.default||r).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){e.propertyIsEnumerable;var i,c,s=e.escapeExpression;return'<div class="col-3 '+s(e.lambda(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.columnNames:i,t))+'">'+s("function"==typeof(c=null!=(c=n.name||(null!=t?t.name:t))?c:e.hooks.helperMissing)?c.call(null!=t?t:e.nullContext||{},{name:"name",hash:{},data:o}):c)+'</div>\r\n<div class="col-9">\r\n <div class="description-region"></div>\r\n</div>'},useData:!0})},90118:function(e,t,n){var r=n(32227);e.exports=(r.default||r).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){return'<h5 class="mb-0">Extra Information</h5>\r\n<div class="text-muted mb-3">This information is only visible to admins and will not be searchable</div>\r\n<div class="fields-region"></div>'},useData:!0})},26835:function(e,t,n){var r=n(32227);e.exports=(r.default||r).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){e.propertyIsEnumerable;var i,c=e.lambda,s=e.escapeExpression;return'<div class="d-inline-block '+s(c(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.licenseContainer:i,t))+'">\r\n <div class="'+s(c(null!=(i=null!=t?t.options:t)?i.logoClass:i,t))+'">'+s(c(null!=(i=null!=t?t.options:t)?i.labelText:i,t))+'</div>\r\n <p class="'+s(c(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.license:i,t))+' bg-white p-2 border box-shadow">\r\n '+(null!=(i=c(null!=(i=null!=t?t.options:t)?i.licenseText:i,t))?i:"")+"\r\n </p>\r\n</div>"},useData:!0})}}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[7173],{8371:function(n,e,l){"use strict";var t;l.d(e,{b:function(){return t}}),function(n){n.AU="cv-ap-southeast-1",n.NZ="cv-ap-southeast-2",n.UK="cv-eu-west-1",n.US="cv-na-west-1"}(t||(t={}))},63122:function(n,e,l){"use strict";l.d(e,{S:function(){return k}});var t=l(39479),a=l(33192),r=l(31647),o=l(56210),s=l(17422),i=l(23130),u=l(37570),c=l(89707),p=l(7190),d={columnNames:"knYPJ",seriesContainer:"nBq4d",icon:"F9VfV",citationValues:"igMNQ"},h=l(95982),m=l.n(h),f=l(57857);function g(n){return g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},g(n)}function v(n,e){for(var l=0;l<e.length;l++){var t=e[l];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(n,t.key,t)}}function y(n,e){return y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,e){return n.__proto__=e,n},y(n,e)}function b(n,e){if(e&&("object"===g(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(n){if(void 0===n)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}(n)}function C(n){return C=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},C(n)}var k=function(n){!function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),e&&y(n,e)}(k,n);var e,l,r,h,g=(r=k,h=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}(),function(){var n,e=C(r);if(h){var l=C(this).constructor;n=Reflect.construct(e,arguments,l)}else n=e.apply(this,arguments);return b(this,n)});function k(n){return function(n,e){if(!(n instanceof e))throw new TypeError("Cannot call a class as a function")}(this,k),g.call(this,n)}return e=k,(l=[{key:"name",get:function(){return"VideoBasicInfoComponent"}},{key:"template",get:function(){return m()}},{key:"lang",get:function(){return"shared.videoBasicInfo"}},{key:"defaults",get:function(){return{truncateDescription:!0}}},{key:"behaviors",get:function(){return[{behaviorClass:o.H,selector:".tool-tip"}]}},{key:"regions",value:function(){return{description:{el:".description-region",replaceElement:!0,partialLoading:s.LP.VideoBasicInfo},series:{el:".series-region",replaceElement:!0}}}},{key:"getBroadcastDate",value:function(){return this.model.get("dateBroadcast")?a(this.model.get("dateBroadcast")).format(s.K4.FULL_YEAR):""}},{key:"getSeriesUrl",value:function(){if(this.options.externalSeriesLink&&this.model.series){var n="series/".concat(this.model.series.id);return c.k.getMainProductUrl(this.options.config,n,n)}}},{key:"renderSeries",value:function(){this.model.series&&this.model.series.get("name")&&this.showChildView("series",new u.O({model:this.model,highlight:!1,seriesUrl:this.getSeriesUrl(),styleUppercase:!1}))}},{key:"renderDescription",value:function(){if(this.model&&this.model.get("description")){var n=new i.Z({model:this.model,linkify:!0,size:i.t.Large,truncate:this.options.truncateDescription,allowExpand:!0});this.showChildView("description",n)}}},{key:"getSubtitleLanguage",value:function(){var n=this;return this.model.subtitles&&this.model.get("subtitles").length?t.uniq(this.model.get("subtitles").map((function(e){var l,t=e.get("language"),a=CVLanguages.getFullEnglishName(t);return(null===(l=e.get("metadata"))||void 0===l?void 0:l.autoGenerated)?f.T.getPhrase(n.lang,"autoGenerated",{name:a}):a}))).join(", "):""}},{key:"getCitationHeading",value:function(n,e,l){return this.model.get(n)?this.model.get(n).length>1?l:e:""}},{key:"getCitationHeadings",value:function(){return{productionCompaniesText:this.getCitationHeading(s.Zn.ProductionCompany,"Production Company","Production Companies"),producersText:this.getCitationHeading(s.Zn.Producer,"Producer","Producers"),disributorsText:this.getCitationHeading(s.Zn.Distributor,"Distributor","Distributors"),directorsText:this.getCitationHeading(s.Zn.Director,"Director","Directors")}}},{key:"viewOptions",value:function(){return Object.assign({styles:d,ratingClass:this.model.rating&&p.uB.mapRatingToClass(this.model.rating.get("value")),broadcastDate:this.getBroadcastDate(),showHeading:this.options.showHeading,subtitles:this.getSubtitleLanguage(),hideBroadcastInfo:this.options.hideBroadcastInfo},this.getCitationHeadings())}},{key:"onRender",value:function(){this.renderSeries(),this.renderDescription()}}])&&v(e.prototype,l),Object.defineProperty(e,"prototype",{writable:!1}),k}(r.Q.Component)},95982:function(n,e,l){var t=l(32227);n.exports=(t.default||t).template({1:function(n,e,l,t,a){return n.propertyIsEnumerable,'<div class="position-relative">\r\n <h5 class="d-inline-block">'+n.escapeExpression((l.lang||e&&e.lang||n.hooks.helperMissing).call(null!=e?e:n.nullContext||{},"basicInfo",{name:"lang",hash:{},data:a}))+"</h5>\r\n</div>\r\n"},3:function(n,e,l,t,a){n.propertyIsEnumerable;var r,o,s=n.escapeExpression,i=null!=e?e:n.nullContext||{},u=n.hooks.helperMissing;return' <div class="col-3 '+s(n.lambda(null!=(r=null!=(r=null!=e?e.options:e)?r.styles:r)?r.columnNames:r,e))+'">'+s((l.lang||e&&e.lang||u).call(i,"videoTitle",{name:"lang",hash:{},data:a}))+'</div>\r\n <p class="col-9">'+s("function"==typeof(o=null!=(o=l.name||(null!=e?e.name:e))?o:u)?o.call(i,{name:"name",hash:{},data:a}):o)+"</p>\r\n"},5:function(n,e,l,t,a){n.propertyIsEnumerable;var r,o=n.lambda,s=n.escapeExpression;return' <div class="col-3 '+s(o(null!=(r=null!=(r=null!=e?e.options:e)?r.styles:r)?r.columnNames:r,e))+'">'+s((l.lang||e&&e.lang||n.hooks.helperMissing).call(null!=e?e:n.nullContext||{},"series",{name:"lang",hash:{},data:a}))+'</div>\r\n <div class="col-9 '+s(o(null!=(r=null!=(r=null!=e?e.options:e)?r.styles:r)?r.seriesContainer:r,e))+'"><div class="series-region"></div></div>\r\n'},7:function(n,e,l,t,a){n.propertyIsEnumerable;var r,o=n.lambda,s=n.escapeExpression;return' <div class="col-3 '+s(o(null!=(r=null!=(r=null!=e?e.options:e)?r.styles:r)?r.columnNames:r,e))+'">'+s((l.lang||e&&e.lang||n.hooks.helperMissing).call(null!=e?e:n.nullContext||{},"rating",{name:"lang",hash:{},data:a}))+'</div>\r\n <p class="col-9"><span class="p-1 badge text-white tool-tip '+s(o(null!=(r=null!=e?e.options:e)?r.ratingClass:r,e))+" "+s(o(null!=(r=null!=(r=null!=e?e.options:e)?r.styles:r)?r.rating:r,e))+'" title="'+s(o(null!=(r=null!=e?e.rating:e)?r.name:r,e))+'">'+s(o(null!=(r=null!=e?e.rating:e)?r.code:r,e))+"</span></p>\r\n"},9:function(n,e,l,t,a){n.propertyIsEnumerable;var r,o=n.escapeExpression;return' <div class="col-3 '+o(n.lambda(null!=(r=null!=(r=null!=e?e.options:e)?r.styles:r)?r.columnNames:r,e))+'">'+o((l.lang||e&&e.lang||n.hooks.helperMissing).call(null!=e?e:n.nullContext||{},"description",{name:"lang",hash:{},data:a}))+'</div>\r\n <div class="col-9">\r\n <div class="description-region"></div>\r\n </div>\r\n'},11:function(n,e,l,t,a){n.propertyIsEnumerable;var r,o,s=n.escapeExpression,i=null!=e?e:n.nullContext||{},u=n.hooks.helperMissing;return' <div class="col-3 '+s(n.lambda(null!=(r=null!=(r=null!=e?e.options:e)?r.styles:r)?r.columnNames:r,e))+'">'+s((l.lang||e&&e.lang||u).call(i,"productionYear",{name:"lang",hash:{},data:a}))+'</div>\r\n <p class="col-9">'+s("function"==typeof(o=null!=(o=l.productionYear||(null!=e?e.productionYear:e))?o:u)?o.call(i,{name:"productionYear",hash:{},data:a}):o)+"</p>\r\n"},13:function(n,e,l,t,a){n.propertyIsEnumerable;var r,o=n.lambda,s=n.escapeExpression,i=null!=e?e:n.nullContext||{};return' <div class="col-3 '+s(o(null!=(r=null!=(r=null!=e?e.options:e)?r.styles:r)?r.columnNames:r,e))+'">'+s((l.lang||e&&e.lang||n.hooks.helperMissing).call(i,"producers",{name:"lang",hash:{},data:a}))+'</div>\r\n <div class="col-9 '+s(o(null!=(r=null!=(r=null!=e?e.options:e)?r.styles:r)?r.citationValues:r,e))+'">\r\n <p>\r\n'+(null!=(r=l.each.call(i,null!=e?e.producers:e,{name:"each",hash:{},fn:n.program(14,a,0),inverse:n.noop,data:a}))?r:"")+" </p>\r\n </div>\r\n"},14:function(n,e,l,t,a){var r;return n.propertyIsEnumerable," <span>"+n.escapeExpression("function"==typeof(r=null!=(r=l.name||(null!=e?e.name:e))?r:n.hooks.helperMissing)?r.call(null!=e?e:n.nullContext||{},{name:"name",hash:{},data:a}):r)+"</span>\r\n"},16:function(n,e,l,t,a){n.propertyIsEnumerable;var r,o=n.lambda,s=n.escapeExpression,i=null!=e?e:n.nullContext||{};return' <div class="col-3 '+s(o(null!=(r=null!=(r=null!=e?e.options:e)?r.styles:r)?r.columnNames:r,e))+'">'+s((l.lang||e&&e.lang||n.hooks.helperMissing).call(i,"directors",{name:"lang",hash:{},data:a}))+'</div>\r\n <div class="col-9 '+s(o(null!=(r=null!=(r=null!=e?e.options:e)?r.styles:r)?r.citationValues:r,e))+'">\r\n <p>\r\n'+(null!=(r=l.each.call(i,null!=e?e.directors:e,{name:"each",hash:{},fn:n.program(14,a,0),inverse:n.noop,data:a}))?r:"")+" </p>\r\n </div>\r\n"},18:function(n,e,l,t,a){n.propertyIsEnumerable;var r,o=n.lambda,s=n.escapeExpression,i=null!=e?e:n.nullContext||{};return' <div class="col-3 '+s(o(null!=(r=null!=(r=null!=e?e.options:e)?r.styles:r)?r.columnNames:r,e))+'">'+s((l.lang||e&&e.lang||n.hooks.helperMissing).call(i,"productionCompanies",{name:"lang",hash:{},data:a}))+'</div>\r\n <div class="col-9 '+s(o(null!=(r=null!=(r=null!=e?e.options:e)?r.styles:r)?r.citationValues:r,e))+'">\r\n <p>\r\n'+(null!=(r=l.each.call(i,null!=e?e.productionCompanies:e,{name:"each",hash:{},fn:n.program(14,a,0),inverse:n.noop,data:a}))?r:"")+" </p>\r\n </div>\r\n"},20:function(n,e,l,t,a){n.propertyIsEnumerable;var r,o=n.lambda,s=n.escapeExpression,i=null!=e?e:n.nullContext||{};return' <div class="col-3 '+s(o(null!=(r=null!=(r=null!=e?e.options:e)?r.styles:r)?r.columnNames:r,e))+'">'+s((l.lang||e&&e.lang||n.hooks.helperMissing).call(i,"distributors",{name:"lang",hash:{},data:a}))+'</div>\r\n <div class="col-9 '+s(o(null!=(r=null!=(r=null!=e?e.options:e)?r.styles:r)?r.citationValues:r,e))+'">\r\n <p>\r\n'+(null!=(r=l.each.call(i,null!=e?e.distributors:e,{name:"each",hash:{},fn:n.program(14,a,0),inverse:n.noop,data:a}))?r:"")+" </p>\r\n </div>\r\n"},22:function(n,e,l,t,a){n.propertyIsEnumerable;var r,o=null!=e?e:n.nullContext||{};return" "+(null!=(r=l.if.call(o,null!=(r=null!=e?e.channel:e)?r.name:r,{name:"if",hash:{},fn:n.program(23,a,0),inverse:n.noop,data:a}))?r:"")+"\r\n\r\n"+(null!=(r=l.if.call(o,null!=(r=null!=e?e.options:e)?r.broadcastDate:r,{name:"if",hash:{},fn:n.program(26,a,0),inverse:n.noop,data:a}))?r:"")},23:function(n,e,l,t,a){var r;return n.propertyIsEnumerable,null!=(r=l.if.call(null!=e?e:n.nullContext||{},null!=e?e.channel:e,{name:"if",hash:{},fn:n.program(24,a,0),inverse:n.noop,data:a}))?r:""},24:function(n,e,l,t,a){n.propertyIsEnumerable;var r,o=n.lambda,s=n.escapeExpression;return'\r\n <div class="col-3 '+s(o(null!=(r=null!=(r=null!=e?e.options:e)?r.styles:r)?r.columnNames:r,e))+'">'+s((l.lang||e&&e.lang||n.hooks.helperMissing).call(null!=e?e:n.nullContext||{},"channel",{name:"lang",hash:{},data:a}))+'</div>\r\n <p class="col-9">'+s(o(null!=(r=null!=e?e.channel:e)?r.name:r,e))+"</p>\r\n "},26:function(n,e,l,t,a){n.propertyIsEnumerable;var r,o=n.lambda,s=n.escapeExpression;return' <div class="col-3 '+s(o(null!=(r=null!=(r=null!=e?e.options:e)?r.styles:r)?r.columnNames:r,e))+'">'+s((l.lang||e&&e.lang||n.hooks.helperMissing).call(null!=e?e:n.nullContext||{},"broadcastDate",{name:"lang",hash:{},data:a}))+'</div>\r\n <p class="col-9">'+s(o(null!=(r=null!=e?e.options:e)?r.broadcastDate:r,e))+"</p>\r\n"},28:function(n,e,l,t,a){n.propertyIsEnumerable;var r,o=n.lambda,s=n.escapeExpression;return' <div class="col-3 '+s(o(null!=(r=null!=(r=null!=e?e.options:e)?r.styles:r)?r.columnNames:r,e))+'">'+s((l.lang||e&&e.lang||n.hooks.helperMissing).call(null!=e?e:n.nullContext||{},"subtitles",{name:"lang",hash:{},data:a}))+'</div>\r\n <p class="col-9">'+s(o(null!=(r=null!=e?e.options:e)?r.subtitles:r,e))+"</p>\r\n"},compiler:[8,">= 4.3.0"],main:function(n,e,l,t,a){n.propertyIsEnumerable;var r,o=null!=e?e:n.nullContext||{};return(null!=(r=l.if.call(o,null!=(r=null!=e?e.options:e)?r.showHeading:r,{name:"if",hash:{},fn:n.program(1,a,0),inverse:n.noop,data:a}))?r:"")+'<div class="row mb-0">\r\n'+(null!=(r=l.if.call(o,null!=e?e.name:e,{name:"if",hash:{},fn:n.program(3,a,0),inverse:n.noop,data:a}))?r:"")+"\r\n"+(null!=(r=l.if.call(o,null!=(r=null!=e?e.series:e)?r.name:r,{name:"if",hash:{},fn:n.program(5,a,0),inverse:n.noop,data:a}))?r:"")+"\r\n"+(null!=(r=l.if.call(o,null!=(r=null!=e?e.rating:e)?r.code:r,{name:"if",hash:{},fn:n.program(7,a,0),inverse:n.noop,data:a}))?r:"")+"\r\n"+(null!=(r=l.if.call(o,null!=e?e.description:e,{name:"if",hash:{},fn:n.program(9,a,0),inverse:n.noop,data:a}))?r:"")+"\r\n"+(null!=(r=l.if.call(o,null!=e?e.productionYear:e,{name:"if",hash:{},fn:n.program(11,a,0),inverse:n.noop,data:a}))?r:"")+"\r\n"+(null!=(r=l.if.call(o,null!=(r=null!=e?e.producers:e)?r.length:r,{name:"if",hash:{},fn:n.program(13,a,0),inverse:n.noop,data:a}))?r:"")+"\r\n"+(null!=(r=l.if.call(o,null!=(r=null!=e?e.directors:e)?r.length:r,{name:"if",hash:{},fn:n.program(16,a,0),inverse:n.noop,data:a}))?r:"")+"\r\n"+(null!=(r=l.if.call(o,null!=(r=null!=e?e.productionCompanies:e)?r.length:r,{name:"if",hash:{},fn:n.program(18,a,0),inverse:n.noop,data:a}))?r:"")+"\r\n"+(null!=(r=l.if.call(o,null!=(r=null!=e?e.distributors:e)?r.length:r,{name:"if",hash:{},fn:n.program(20,a,0),inverse:n.noop,data:a}))?r:"")+"\r\n"+(null!=(r=l.unless.call(o,null!=(r=null!=e?e.options:e)?r.hideBroadcastInfo:r,{name:"unless",hash:{},fn:n.program(22,a,0),inverse:n.noop,data:a}))?r:"")+"\r\n"+(null!=(r=l.if.call(o,null!=(r=null!=e?e.options:e)?r.subtitles:r,{name:"if",hash:{},fn:n.program(28,a,0),inverse:n.noop,data:a}))?r:"")+"</div>"},useData:!0})}}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[8343],{96417:function(e,t,n){"use strict";n.d(t,{s:function(){return o},p:function(){return s}});var r=n(57857),i="staffRequests.utils",o={destinationLibrary:function(e){if(!e||!e.id)return r.T.getPhrase(i,"selectLibrary")},destinationFolder:function(e){if(!e||!e.id)return r.T.getPhrase(i,"selectFolder")}},s={message:[{required:!0,msg:function(){return r.T.getPhrase("staffRequests.utils","provideMessage")}}]}},17126:function(e,t,n){"use strict";n.r(t),n.d(t,{StaffRequestsView:function(){return ve}});var r=n(48088),i=n(21679),o=n(57857),s=n(31647),l=n(50028),a=n(51632),c=n(29536),u=n(56371),f=n(30305),d=n(48404),p=n(9484),h=n(17422),y=n(43097),m=n(33192),g=n(23478),v=n.n(g);function b(e){return b="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},b(e)}function S(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function w(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function R(e,t,n){return t&&w(e.prototype,t),n&&w(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function k(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&q(e,t)}function q(e,t){return q=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},q(e,t)}function E(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=O(e);if(t){var i=O(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return C(this,n)}}function C(e,t){if(t&&("object"===b(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function O(e){return O=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},O(e)}var T=function(e){k(n,e);var t=E(n);function n(e){return S(this,n),t.call(this,e)}return R(n,[{key:"name",get:function(){return"StaffRequestItemComponent"}},{key:"template",get:function(){return v()}},{key:"lang",get:function(){return"staffRequests.staffRequestItem"}},{key:"className",get:function(){var e="p-3 border-bottom cursor-pointer ".concat("bhDh_");return this.isSelected()&&(e+=" ".concat("Mwkkb")),e}},{key:"events",value:function(){return{click:"onClick"}}},{key:"isSelected",value:function(){return this.options.selectedRequestId&&this.model.get("id").toString()===this.options.selectedRequestId.toString()}},{key:"onClick",value:function(){s.Q.AppLinkHelper.trigger({application:f.OV.STAFF_REQUESTS,action:f.eX.StaffRequests.EDIT_REQUEST,args:[this.model.get("id")]})}},{key:"viewOptions",value:function(){return{dateRequested:m.parseZone(this.model.get("dateCreated")).local().fromNow(),isSelected:this.isSelected(),firstName:this.model.user.get("name"),lastName:this.model.user.get("surname")}}}]),n}(s.Q.Component),L=function(e){k(n,e);var t=E(n);function n(e){return S(this,n),t.call(this,e)}return R(n,[{key:"name",get:function(){return"StaffRequestListComponent"}},{key:"className",get:function(){return"zc6Jm"}},{key:"childView",get:function(){return T}},{key:"childViewOptions",get:function(){return{selectedRequestId:this.options.selectedRequestId,currentUser:this.options.currentUser}}}]),n}(s.Q.ComponentCollection),_=n(61843),P=n(70065),F=n(88483),I=n(63122),j=n(51184),N=n(70042),U=n(99249),A=n(52076),M=n(22557),D=n(60103),V=n(20072),x=n(36935),Q=n(96417),B=n(79665),H={actions:"fONDA",source:"jgNKp",button:"YExjW"},X=n(93566),K=n.n(X);function J(e){return J="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},J(e)}function z(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function W(e,t){return W=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},W(e,t)}function Y(e,t){if(t&&("object"===J(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Z(e){return Z=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Z(e)}var G=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&W(e,t)}(a,e);var t,n,i,o,l=(i=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Z(i);if(o){var n=Z(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return Y(this,e)});function a(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),l.call(this,e)}return t=a,(n=[{key:"initialize",value:function(){this.bindListeners(),this.getViewModel();var e=this.viewModel.destinationLibrary&&this.viewModel.destinationLibrary.get("id"),t=e&&this.collection.get(e);this.folderCollection=t?t.children:new D.I,M.P.setSelected(this.folderTreeKey,this.viewModel.destinationFolder,this.folderCollection)}},{key:"name",get:function(){return"StaffRequestActionsComponent"}},{key:"template",get:function(){return K()}},{key:"lang",get:function(){return"staffRequests.staffRequestActions"}},{key:"folderTreeKey",get:function(){return"staff:requests:folder:select"}},{key:"className",get:function(){return"p-3 border-bottom ".concat(H.actions)}},{key:"channelName",get:function(){return"".concat(this.name).concat(this.cid)}},{key:"viewModelName",get:function(){return"".concat(this.name,":").concat(this.model.get("id"))}},{key:"regions",value:function(){return{librarySelect:{el:".library-select-region",replaceElement:!0},folderSelect:{el:".folder-select-region",replaceElement:!0}}}},{key:"events",value:function(){return{"click .approve":"onClickApprove","click .reject":"onClickReject"}}},{key:"bindListeners",value:function(){var e=this;this.listenTo(this.channelName,"library:selected",this.onLibrarySelected),this.listenTo(this.channelName,"folder:selected",this.onFolderSelected),this.listenTo(this.channelName,"create:folder:clicked",this.onClickCreateFolder),this.listenTo(this.options.staffRequestsChannel,"select:folder",(function(t){e.onFolderSelected(t),e.render()}))}},{key:"getViewModel",value:function(){var e={},t=this.collection.get(this.model.destinationLibrary);t&&(e.destinationLibrary=t.toJSON());var n=M.P.getModelFromCollection(this.model.destinationFolder.get("id"),this.collection);n&&(e.destinationFolder=n.toJSON()),this.viewModel=U.r.get(this.viewModelName,e,{ctor:x.U}),this.viewModel.addValidation(Q.s);var r=this.viewModel.get("destinationFolder");r&&(r.collection=n.collection)}},{key:"onLibrarySelected",value:function(e){this.viewModel.set("destinationLibrary",e.toJSON()),this.viewModel.unset("destinationFolder"),this.viewModel.set("destinationFolder",{}),M.P.deselectAll(this.folderTreeKey,this.folderCollection),this.folderCollection=e.get("children"),this.renderFolderSelect()}},{key:"onFolderSelected",value:function(e){this.viewModel.set("destinationFolder",e.toJSON()),this.viewModel.get("destinationFolder").collection=e.collection,M.P.setSelected(this.folderTreeKey,e,this.folderCollection)}},{key:"onClickApprove",value:function(){var e=this.model.get("id"),t=this.viewModel.destinationLibrary.get("id"),n=this.viewModel.destinationFolder.get("id");e&&t&&n&&(s.Q.AppLinkHelper.trigger({application:f.OV.STAFF_REQUESTS,action:f.eX.StaffRequests.APPROVE_REQUEST,args:[e,t,n]}),this.logStaffRequestAction(P.UserAction.Approve))}},{key:"onClickReject",value:function(){s.Q.AppLinkHelper.trigger({application:f.OV.STAFF_REQUESTS,action:f.eX.StaffRequests.REJECT_REQUEST,args:[this.model.get("id")]}),this.logStaffRequestAction(P.UserAction.Reject)}},{key:"onClickCreateFolder",value:function(){s.Q.AppLinkHelper.trigger({application:f.OV.STAFF_REQUESTS,action:f.eX.Shared.NEW_FOLDER,args:[this.viewModel.destinationLibrary.get("id")]}),this.logCreateFolderAction()}},{key:"logStaffRequestAction",value:function(e){var t={location:P.LocationContext.StaffRequestDetails,actionType:e,entity:P.EntityType.StaffRequest,workflowPhase:P.WorkflowPhase.Start},n={id:this.model.get("id"),videoId:this.model.get("video")&&this.model.get("video").get("id"),requestingUserId:this.model.get("user")&&this.model.get("user").get("id"),sourceLibraryId:this.model.get("sourceLibrary")&&this.model.get("sourceLibrary").get("id"),sourceFolderId:this.model.get("sourceFolder")&&this.model.get("sourceFolder").get("id"),destinationLibraryId:this.viewModel.destinationLibrary.get("id"),destinationFolderId:this.viewModel.destinationFolder.get("id")};A.k.logUserAction(n,t)}},{key:"logCreateFolderAction",value:function(){var e={location:P.LocationContext.StaffRequestDetails,actionType:P.UserAction.Create,entity:P.EntityType.Folder,workflowPhase:P.WorkflowPhase.Start},t={libraryId:this.viewModel.destinationLibrary.get("id")};A.k.logUserAction(t,e)}},{key:"renderLibrarySelect",value:function(){this.collection.length<2||this.showChildView("librarySelect",new B.A({collection:this.collection,channelName:this.channelName,currentLibraryId:this.viewModel.destinationLibrary&&this.viewModel.destinationLibrary.get("id"),inputName:"destinationLibrary",placeholderText:this.viewModel.destinationLibrary&&this.viewModel.destinationLibrary.get("name"),disabledLibraryIds:this.options.disabledLibraryIds}))}},{key:"renderFolderSelect",value:function(){this.showChildView("folderSelect",new V.Y({collection:this.folderCollection,channelName:this.channelName,folderTreeKey:this.folderTreeKey,canCreateNew:!0}))}},{key:"viewOptions",value:function(){return{styles:H,sourceLibraryName:N.u.mapSourceToDisplayName(this.model.sourceLibrary),sourceClass:"".concat(H.source," ").concat(N.u.mapSourceToClass(this.model.sourceLibrary.get("type"))),showLibrarySelect:this.collection&&this.collection.length>1}}},{key:"onRender",value:function(){this.renderLibrarySelect(),this.renderFolderSelect(),r.Validation.bind(this,{model:this.viewModel})}}])&&z(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(s.Q.Component),$=n(30639),ee=n.n($),te={avatar:"X2btX",message:"O0vox",interactive:"u4gzP"},ne=n(8371);function re(e){return re="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},re(e)}function ie(e,t){for(var n=0;n<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 oe(e,t){return oe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},oe(e,t)}function se(e,t){if(t&&("object"===re(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function le(e){return le=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},le(e)}var ae=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&oe(e,t)}(s,e);var t,n,r,i,o=(r=s,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=le(r);if(i){var n=le(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return se(this,e)});function s(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),o.call(this,e)}return t=s,(n=[{key:"name",get:function(){return"StaffRequestDetailsComponent"}},{key:"template",get:function(){return ee()}},{key:"lang",get:function(){return"staffRequests.staffRequestDetails"}},{key:"regions",value:function(){return{actions:{el:".request-action-region",replaceElement:!0},preview:{el:".video-preview-region",replaceElement:!1},info:{el:".video-info-region",replaceElement:!1}}}},{key:"getAvatarUrl",value:function(){var e=this.collection&&this.collection.first(),t=e&&e.user&&e.user.avatar;if(t&&t.get("url"))return t.get("url");var n="".concat(this.options.config.get("imageCdnUrl"),"/v1/profile-images?initials=").concat(this.getInitials());return _.jw.createUrl(n,{size:F.h2.Small})}},{key:"getInitials",value:function(){var e=this.collection&&this.collection.first();if(e&&e.user){var t=e.user.get("name"),n=e.user.get("surname");return"".concat(t&&t.trim()[0]).concat(n&&n.trim()[0])}}},{key:"renderActions",value:function(){this.showChildView("actions",new G({model:this.model,collection:this.options.libraryCollection,disabledLibraryIds:this.options.disabledLibraryIds,staffRequestsChannel:this.options.channelName}))}},{key:"renderVideoPreview",value:function(){this.showChildView("preview",new j.c({model:this.model.video,webPlayerUrl:this.options.config.get("webPlayerUrl"),analyticsOptions:{location:P.LocationContext.VideoRequest},currentUser:this.options.currentUser}))}},{key:"renderVideoInfo",value:function(){this.showChildView("info",new I.S({model:this.model.video,config:this.options.config,externalSeriesLink:!0,hideBroadcastInfo:this.options.currentUser.get("instanceRegion")===ne.b.US}))}},{key:"viewOptions",value:function(){return{styles:te,avatarUrl:this.getAvatarUrl(),message:this.collection&&this.collection.length&&this.collection.first().toJSON(),interactive:N.u.isInteractive(this.model.video),firstName:this.model.user.get("name"),lastName:this.model.user.get("surname")}}},{key:"onRender",value:function(){this.renderActions(),this.renderVideoPreview(),this.renderVideoInfo()}}])&&ie(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),s}(s.Q.Component),ce=n(95061),ue=n(21811),fe=n.n(ue),de={requestList:"QuZ0B",requestDetails:"keZrR"};function pe(e){return pe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},pe(e)}function he(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ye(e,t){return ye=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ye(e,t)}function me(e,t){if(t&&("object"===pe(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function ge(e){return ge=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ge(e)}var ve=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ye(e,t)}(b,e);var t,n,m,g,v=(m=b,g=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=ge(m);if(g){var n=ge(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return me(this,e)});function b(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,b),(t=v.call(this,e)).unavailableLibraryIds=[],t}return t=b,(n=[{key:"initialize",value:function(){this.staffRequestDataService=i.u.getInstance(f.Or.StaffRequests,this),this.videoDataService=i.u.getInstance(f.Or.Video,this),this.options.referrer===a.f.Notification&&this.staffRequestDataService.clearRequestCache(),this.bindListeners()}},{key:"name",get:function(){return"StaffRequestsView"}},{key:"lang",get:function(){return"staffRequests.staffRequests"}},{key:"title",get:function(){return o.T.getPhrase(this.lang,"title")}},{key:"template",get:function(){return fe()}},{key:"className",get:function(){return"bg-white rounded"}},{key:"channelName",get:function(){return"".concat(this.name).concat(this.cid)}},{key:"regions",value:function(){return{requestList:{el:".request-list-region",partialLoading:h.LP.StaffRequestList,replaceElement:!1},requestDetails:{el:".request-details-region",partialLoading:h.LP.StaffRequestDetails,replaceElement:!1},emptyState:{el:".empty-region",replaceElement:!0}}}},{key:"behaviors",get:function(){var e=this;return[{behaviorClass:u.o,collectionName:"staffRequestCollection",region:"emptyState",type:h.ub.StaffRequests,shouldRender:c.r.isCollectionEmpty.bind(null,this,"staffRequestCollection"),componentOptions:{description:function(){return e.getEmptyStateDescription()},emptyState:function(){return o.T.getPhrase(e.lang,"emptyStateHeading")}},emptyStateComponents:f.aW}]}},{key:"bindListeners",value:function(){if(this.listenTo(f.Vk.LIBRARY,"folder:created",this.onFolderCreated),this.options.requestId){this.listenTo(f.Vk.STAFF_REQUEST,"cache:cleared",this.render);var e="".concat(f.M_.STAFF_REQUEST_BY_ID,":").concat(this.options.requestId);this.listenTo(f.Vk.STAFF_REQUEST,"".concat(e,":sync"),this.render),this.listenTo(f.Vk.STAFF_REQUEST,"".concat(e,":error"),this.onError),this.listenTo(f.Vk.STAFF_REQUEST,"".concat(f.M_.STAFF_REQUESTS,":invalidate"),this.onUpdate);var t="".concat(f.M_.STAFF_REQUEST_MESSAGES,":").concat(this.options.requestId);this.listenTo(f.Vk.STAFF_REQUEST,"".concat(t,":sync"),this.render),this.listenTo(f.Vk.STAFF_REQUEST,"".concat(t,":error"),this.onError)}}},{key:"onUpdate",value:function(){this.staffRequestCollection=null,this.render()}},{key:"fetchData",value:function(){var e=this;if(this.staffRequestCollection||this.staffRequestDataService.getStaffRequests((function(t){e.staffRequestCollection=t,e.onRequestsSync()})),this.options.requestId&&(this.model=this.staffRequestDataService.getStaffRequest(this.options.requestId),this.staffRequestMessageCollection=this.staffRequestDataService.getMessages(this.options.requestId),this.libraryCollection&&this.libraryCollection.length>1&&this.model&&!this.unavailableLibraryIds.length)){var t=this.model.get("video");this.videoDataService.getLibraries(t.get("id"),(function(t){e.unavailableLibraryIds=t.map((function(e){return e.get("id")+""})),e.render()}))}}},{key:"onRequestsSync",value:function(){var e;this.options.requestId&&(e=this.staffRequestCollection.get(this.options.requestId)),!e&&this.staffRequestCollection.first()?(e=this.staffRequestCollection.first(),s.Q.AppLinkHelper.trigger({application:f.OV.STAFF_REQUESTS,action:f.eX.StaffRequests.EDIT_REQUEST,args:[e.id]},{replace:!0})):this.render()}},{key:"onError",value:function(){this.redirectToHome()}},{key:"onFolderCreated",value:function(e){r.Radio.channel(this.channelName).trigger("select:folder",e),this.render()}},{key:"redirectToHome",value:function(){s.Q.AppLinkHelper.trigger({application:f.OV.STAFF_REQUESTS,action:f.eX.StaffRequests.HOME})}},{key:"getEmptyStateDescription",value:function(){return this.libraryCollection?!this.libraryCollection.length||this.libraryCollection.every((function(e){return e.get("status")!==l.X.Published}))?o.T.getPhrase(this.lang,"emptyStateNoLibraries"):o.T.getPhrase(this.lang,"emptyStateDescription"):""}},{key:"renderRequestList",value:function(){this.staffRequestCollection?this.showChildView("requestList",new L({collection:this.staffRequestCollection,selectedRequestId:this.options.requestId,currentUser:this.currentUser})):this.renderPartialLoading("requestList")}},{key:"renderRequestDetails",value:function(){var e=!!this.libraryCollection,t=e&&!!this.model&&!!this.staffRequestMessageCollection;!this.options.requestId&&!e||this.options.requestId&&!t?this.renderPartialLoading("requestDetails"):this.options.requestId&&this.showChildView("requestDetails",new ae({model:this.model,collection:this.staffRequestMessageCollection,libraryCollection:this.libraryCollection,disabledLibraryIds:this.unavailableLibraryIds,config:this.config,channelName:this.channelName,currentUser:this.currentUser}))}},{key:"viewOptions",value:function(){return{styles:de}}},{key:"requiredResources",get:function(){return{config:d.p.config,libraryCollection:ce.T.libraries,currentUser:p.K.currentUser}}},{key:"onBeforeRender",value:function(){return this.fetchData(),!this.model||this.model.get("status")===y.C.Pending||(this.redirectToHome(),!1)}},{key:"onRender",value:function(){this.renderRequestList(),this.renderRequestDetails()}}])&&he(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),b}(s.Q.View)},93566:function(e,t,n){var r=n(32227);e.exports=(r.default||r).template({1:function(e,t,n,r,i){var o;return e.propertyIsEnumerable," <span>"+e.escapeExpression(e.lambda(null!=(o=null!=t?t.sourceFolder:t)?o.name:o,t))+"</span>\r\n"},3:function(e,t,n,r,i){return' <div class="form-group m-0 pb-2">\r\n <div class="library-select-region"></div>\r\n </div> \r\n'},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,i){e.propertyIsEnumerable;var o,s=null!=t?t:e.nullContext||{},l=e.hooks.helperMissing,a=e.escapeExpression,c=e.lambda;return'<div class="row align-items-center py-2">\r\n <div class="col-3"><strong>'+a((n.lang||t&&t.lang||l).call(s,"source",{name:"lang",hash:{},data:i}))+'</strong></div>\r\n <div class="col-5">\r\n <span class="badge p-1 mr-1 '+a(c(null!=(o=null!=t?t.options:t)?o.sourceClass:o,t))+'">'+a(c(null!=(o=null!=t?t.options:t)?o.sourceLibraryName:o,t))+"</span>\r\n"+(null!=(o=n.if.call(s,null!=(o=null!=t?t.sourceFolder:t)?o.name:o,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?o:"")+' </div>\r\n <div class="col-4 text-right">\r\n <button class="btn btn-dark mr-2 '+a(c(null!=(o=null!=(o=null!=t?t.options:t)?o.styles:o)?o.button:o,t))+' approve" type="button">'+a((n.lang||t&&t.lang||l).call(s,"approve",{name:"lang",hash:{},data:i}))+'</button>\r\n <button class="btn btn-outline-dark '+a(c(null!=(o=null!=(o=null!=t?t.options:t)?o.styles:o)?o.button:o,t))+' reject" type="button">'+a((n.lang||t&&t.lang||l).call(s,"reject",{name:"lang",hash:{},data:i}))+'</button>\r\n </div>\r\n</div>\r\n<div class="row align-items-center py-2">\r\n <div class="col-3"><strong>'+a((n.lang||t&&t.lang||l).call(s,"moveVideo",{name:"lang",hash:{},data:i}))+'</strong></div>\r\n <div class="col-5">\r\n'+(null!=(o=n.if.call(s,null!=(o=null!=t?t.options:t)?o.showLibrarySelect:o,{name:"if",hash:{},fn:e.program(3,i,0),inverse:e.noop,data:i}))?o:"")+' <div class="form-group m-0">\r\n <div class="folder-select-region"></div>\r\n </div> \r\n </div>\r\n</div>'},useData:!0})},30639:function(e,t,n){var r=n(32227);e.exports=(r.default||r).template({1:function(e,t,n,r,i){e.propertyIsEnumerable;var o,s=e.lambda,l=e.escapeExpression;return'<div class="border-bottom">\r\n <div class="d-inline-block mr-2 '+l(s(null!=(o=null!=(o=null!=t?t.options:t)?o.styles:o)?o.avatar:o,t))+'" style="background-image: url(\''+l(s(null!=(o=null!=t?t.options:t)?o.avatarUrl:o,t))+'\')">\r\n &nbsp\r\n </div>\r\n <div class="d-inline-block">\r\n <p>'+(null!=(o=(n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"requestNote",{name:"lang",hash:{lastName:null!=(o=null!=t?t.options:t)?o.lastName:o,firstName:null!=(o=null!=t?t.options:t)?o.firstName:o},data:i}))?o:"")+'</p>\r\n <p class="pl-2 '+l(s(null!=(o=null!=(o=null!=t?t.options:t)?o.styles:o)?o.message:o,t))+'">'+l(s(null!=(o=null!=(o=null!=t?t.options:t)?o.message:o)?o.message:o,t))+"</p>\r\n </div> \r\n</div>\r\n"},3:function(e,t,n,r,i){e.propertyIsEnumerable;var o,s=e.escapeExpression;return'<span class="badge p-1 '+s(e.lambda(null!=(o=null!=(o=null!=t?t.options:t)?o.styles:o)?o.interactive:o,t))+'">'+s((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"interactive",{name:"lang",hash:{},data:i}))+"</span>\r\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,i){e.propertyIsEnumerable;var o,s=null!=t?t:e.nullContext||{};return'<div class="request-action-region"></div>\r\n<div class="p-3">\r\n'+(null!=(o=n.if.call(s,null!=(o=null!=t?t.options:t)?o.message:o,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?o:"")+'<div class="video-preview-region responsize-img col-7 pt-3 pb-2 px-0">\r\n <img class="img-fluid cursor-pointer" src="'+e.escapeExpression(e.lambda(null!=(o=null!=(o=null!=t?t.video:t)?o.thumbnail:o)?o.url:o,t))+'"/>\r\n</div>\r\n'+(null!=(o=n.if.call(s,null!=(o=null!=t?t.options:t)?o.interactive:o,{name:"if",hash:{},fn:e.program(3,i,0),inverse:e.noop,data:i}))?o:"")+'<div class="video-info-region py-1"></div>\r\n</div>'},useData:!0})},23478:function(e,t,n){var r=n(32227);e.exports=(r.default||r).template({1:function(e,t,n,r,i){return" text-muted"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,i){e.propertyIsEnumerable;var o,s,l=e.lambda,a=e.escapeExpression,c=null!=t?t:e.nullContext||{},u=e.hooks.helperMissing;return'<h6 class="mb-1">'+a(l(null!=(o=null!=t?t.video:t)?o.name:o,t))+'</h6>\r\n<p class="m-0">'+a((n.lang||t&&t.lang||u).call(c,"request",{name:"lang",hash:{lastName:null!=(o=null!=t?t.options:t)?o.lastName:o,firstName:null!=(o=null!=t?t.options:t)?o.firstName:o},data:i}))+'</p>\r\n<time class="m-0'+(null!=(o=n.unless.call(c,null!=(o=null!=t?t.options:t)?o.isSelected:o,{name:"unless",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?o:"")+'" datetime='+a("function"==typeof(s=null!=(s=n.dateCreated||(null!=t?t.dateCreated:t))?s:u)?s.call(c,{name:"dateCreated",hash:{},data:i}):s)+">"+a(l(null!=(o=null!=t?t.options:t)?o.dateRequested:o,t))+"</time"},useData:!0})},21811:function(e,t,n){var r=n(32227);e.exports=(r.default||r).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,r,i){e.propertyIsEnumerable;var o,s=e.escapeExpression,l=e.lambda;return'<div class="border-bottom">\r\n <h1 class="h3 p-3 m-0">'+s((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"staffRequests",{name:"lang",hash:{},data:i}))+'</h1>\r\n</div>\r\n<div class="request-list-region border-right d-inline-block '+s(l(null!=(o=null!=(o=null!=t?t.options:t)?o.styles:o)?o.requestList:o,t))+'"></div><div class="request-details-region border-left d-inline-block '+s(l(null!=(o=null!=(o=null!=t?t.options:t)?o.styles:o)?o.requestDetails:o,t))+'"></div>\r\n<div class="empty-region"></div>'},useData:!0})}}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[8947],{8371:function(e,t,n){"use strict";var o;n.d(t,{b:function(){return o}}),function(e){e.AU="cv-ap-southeast-1",e.NZ="cv-ap-southeast-2",e.UK="cv-eu-west-1",e.US="cv-na-west-1"}(o||(o={}))},48726:function(e,t,n){"use strict";n.d(t,{R:function(){return B}});var o=n(39479),r=n(48088),i=n(31647),l=n(56210),a=n(2214),u=n(50226),c=n.n(u),s={selectRating:"c7657",removeRating:"CETrw",disabled:"GZBl3",disabledSelected:"rDW1U"};function f(e){return f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},f(e)}function p(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function y(e,t){return y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},y(e,t)}function d(e,t){if(t&&("object"===f(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function h(e){return h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},h(e)}var b=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&y(e,t)}(u,e);var t,n,o,i,a=(o=u,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=h(o);if(i){var n=h(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return d(this,e)});function u(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,u),a.call(this,e)}return t=u,(n=[{key:"name",get:function(){return"SelectRatingItemComponent"}},{key:"template",get:function(){return c()}},{key:"tagName",get:function(){return"li"}},{key:"attributes",get:function(){return{title:this.options.editable?this.model.get("name"):""}}},{key:"className",get:function(){var e="cursor-pointer btn";return this.options.editable?e+=this.model.get("selected")?" btn-dark":" btn-outline-dark":e+=" ".concat(s.disabled," ")+(this.model.get("selected")?s.disabledSelected:""),e}},{key:"events",value:function(){return{click:"onClick"}}},{key:"behaviors",get:function(){var e=this.options.editable?this.options.model.get("name"):"";return[{behaviorClass:l.H,title:e}]}},{key:"onClick",value:function(){this.options.editable&&r.Radio.channel(this.options.channelName).trigger("select:rating",this.model)}},{key:"onRender",value:function(){this.resetClassName()}}])&&p(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),u}(i.Q.Component);function g(e){return g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},g(e)}function m(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function v(e,t){return v=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},v(e,t)}function w(e,t){if(t&&("object"===g(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function k(e){return k=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},k(e)}var R=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&v(e,t)}(l,e);var t,n,o,r,i=(o=l,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=k(o);if(r){var n=k(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return w(this,e)});function l(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l),i.call(this,e)}return t=l,(n=[{key:"name",get:function(){return"SelectRatingCollectionComponent"}},{key:"tagName",get:function(){return"ul"}},{key:"className",get:function(){return"rating-group btn-group p-0 m-0"}},{key:"childView",get:function(){return b}},{key:"childViewOptions",get:function(){return{channelName:this.options.channelName,currentRatingId:this.options.currentRatingId,editable:this.options.editable}}}])&&m(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),l}(i.Q.ComponentCollection),O=n(61843),C=n(57857),j=n(30305),S=n(40622),_=n(61057),E=n.n(_),x=n(45092);function P(e){return P="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},P(e)}function T(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function N(e,t){return N=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},N(e,t)}function D(e,t){if(t&&("object"===P(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function I(e){return I=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},I(e)}var B=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&N(e,t)}(f,e);var t,n,i,u,c=(i=f,u=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=I(i);if(u){var n=I(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return D(this,e)});function f(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,f),c.call(this,e)}return t=f,(n=[{key:"name",get:function(){return"SelectRatingComponent"}},{key:"channelName",get:function(){return"".concat(this.name).concat(this.cid)}},{key:"lang",get:function(){return"shared.selectRating"}},{key:"events",value:function(){return{"click .remove-rating":"onRemoveRating"}}},{key:"regions",value:function(){return{ratings:{el:".ratings-region",replaceElement:!0}}}},{key:"template",get:function(){return E()}},{key:"behaviors",get:function(){return[{behaviorClass:l.H,selector:".remove-rating",title:C.T.getPhrase(this.lang,"removeTooltip")}]}},{key:"appLinks",get:function(){return{".suggest-rating":{application:j.OV.LIBRARY_EDITOR,action:j.eX.LibraryEditor.SUGGEST_AN_EDIT,args:[this.options.videoId],params:{metadata:S.MetadataType.Rating}}}}},{key:"defaults",get:function(){return{editable:!0}}},{key:"initialize",value:function(){this.setViewCollection(),this.setCurrentRating(this.model),this.bindListeners()}},{key:"bindListeners",value:function(){this.listenTo(this.channelName,"select:rating",this.onRatingSelected)}},{key:"setCurrentRating",value:function(e){O.hD.setRating(e,this.viewCollection)}},{key:"onRatingSelected",value:function(e){this.setCurrentRating(e);var t=O.yV.getSelected(this.viewCollection);this.updateRating(t)}},{key:"onRemoveRating",value:function(e){e.preventDefault(),this.$(".remove-rating").tooltip("dispose"),this.setCurrentRating(null);var t=this.collection.findWhere({value:0});return this.updateRating(t),!1}},{key:"updateRating",value:function(e){r.Radio.channel(this.options.parentChannelName).trigger("select:rating",e),this.render()}},{key:"setViewCollection",value:function(){var e=o.filter(this.collection.toJSON(),(function(e){return 0!==e.value}));return this.viewCollection=new a.N(e)}},{key:"viewOptions",value:function(){var e=O.yV.getSelected(this.viewCollection);return{styles:o.extend(x.Z,s),showRemove:!this.options.hideRemove&&e&&this.options.editable,editable:this.options.editable,hideHeaderText:this.options.hideHeaderText}}},{key:"renderRatingCollectionComponent",value:function(){this.showChildView("ratings",new R({collection:this.viewCollection,channelName:this.channelName,editable:this.options.editable}))}},{key:"onRender",value:function(){this.renderRatingCollectionComponent()}}])&&T(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),f}(i.Q.Component)},61057:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({1:function(e,t,n,o,r){e.propertyIsEnumerable;var i,l=null!=t?t:e.nullContext||{};return' <label class="'+(null!=(i=n.unless.call(l,null!=(i=null!=t?t.options:t)?i.editable:i,{name:"unless",hash:{},fn:e.program(2,r,0),inverse:e.noop,data:r}))?i:"")+'">'+e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(l,"rating",{name:"lang",hash:{},data:r}))+"</label>\r\n "+(null!=(i=n.unless.call(l,null!=(i=null!=t?t.options:t)?i.editable:i,{name:"unless",hash:{},fn:e.program(4,r,0),inverse:e.noop,data:r}))?i:"")+"\r\n"},2:function(e,t,n,o,r){return"d-inline-block"},4:function(e,t,n,o,r){e.propertyIsEnumerable;var i,l=e.escapeExpression;return'<span class="'+l(e.lambda(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.suggestEdit:i,t))+'">- <a class="suggest-rating">'+l((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"suggestEdit",{name:"lang",hash:{},data:r}))+"</a></span><br>"},6:function(e,t,n,o,r){e.propertyIsEnumerable;var i,l=e.escapeExpression;return'<span class="text-muted mx-2 remove-rating '+l(e.lambda(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.removeRating:i,t))+'">'+l((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"remove",{name:"lang",hash:{},data:r}))+"</span>"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,r){e.propertyIsEnumerable;var i,l=e.lambda,a=e.escapeExpression,u=null!=t?t:e.nullContext||{};return'<div class="edit-rating form-group '+a(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.selectRating:i,t))+" "+a(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.rating:i,t))+'">\r\n'+(null!=(i=n.unless.call(u,null!=(i=null!=t?t.options:t)?i.hideHeaderText:i,{name:"unless",hash:{},fn:e.program(1,r,0),inverse:e.noop,data:r}))?i:"")+' <div>\r\n <div class="ratings-region" name="rating"></div>\r\n '+(null!=(i=n.if.call(u,null!=(i=null!=t?t.options:t)?i.showRemove:i,{name:"if",hash:{},fn:e.program(6,r,0),inverse:e.noop,data:r}))?i:"")+'\r\n <div class="form-feedback"></div>\r\n </div>\r\n</div>'},useData:!0})},50226:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,o,r){var i;return e.propertyIsEnumerable,"\r\n"+e.escapeExpression("function"==typeof(i=null!=(i=n.code||(null!=t?t.code:t))?i:e.hooks.helperMissing)?i.call(null!=t?t:e.nullContext||{},{name:"code",hash:{},data:r}):i)},useData:!0})},45092:function(e,t){"use strict";t.Z={requiredStar:"BEwab",disabled:"N9ljx",formGroup:"dj5U0",suggestEdit:"DYJhs",programTitle:"HokbM",description:"Rg7xy",seriesTitle:"dgLz_",broadcastDate:"Wfedn",channel:"xGyC8",rating:"WIpKi",productionYear:"MHLLN",distributors:"TQxQ2",productionCompanies:"T9n2B",directors:"iFUiE",producers:"w4lSY",episodeNumber:"FkpUz",seasonNumber:"HDpHM",icon:"S2rQf",infoSvgContainer:"s96rB"}}}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[9383],{80732:function(e,t,n){"use strict";n.r(t),n.d(t,{UploadVideosView:function(){return at}});var o=n(39479),i=n(48088),r=n(31647),l=n(99249),a=n(21679),s=n(57857),c=n(21186),u=n(25417),d=n(36357),f=n(8371),p=n(35250),h=n.n(p),y=n(88410),m=n(57769),g=n(61843),v=n(88172),b=n(42494),w=n.n(b);function k(e){return k="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},k(e)}function S(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function O(e,t){return O=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},O(e,t)}function C(e,t){if(t&&("object"===k(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function P(e){return P=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},P(e)}var N=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&O(e,t)}(c,e);var t,n,o,r,a=(o=c,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=P(o);if(r){var n=P(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return C(this,e)});function c(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c),a.call(this,e)}return t=c,(n=[{key:"initialize",value:function(){this.model=l.r.get("upload:progress:".concat(y.AJ.Video)),this.listenTo(this.model,"change:done",this.render),this.listenTo(this.channelName,"continue",this.onClickContinue),this.listenTo(this.options.uploadChannelName,"start:spinner",this.startSpinner)}},{key:"name",get:function(){return"UploadActionsComponent"}},{key:"lang",get:function(){return"upload.uploadActions"}},{key:"template",get:function(){return w()}},{key:"className",get:function(){return"clearfix my-3"}},{key:"channelName",get:function(){return"".concat(this.name).concat(this.cid)}},{key:"regions",value:function(){return{finishButton:{el:".finish-button-region",replaceElement:!0}}}},{key:"behaviors",get:function(){return[{behaviorClass:m.Z,buttonSelector:".add-more-videos",channelName:this.options.uploadChannelName,acceptMultiple:!0,mimeType:"video/*"}]}},{key:"startSpinner",value:function(){i.Radio.channel(this.channelName).trigger(v.I3.ShowSpinner)}},{key:"onClickContinue",value:function(){this.model.get("done")&&i.Radio.channel(this.options.uploadChannelName).trigger("continue")}},{key:"onRender",value:function(){this.showChildView("finishButton",new v.Py({channelName:this.channelName,disabled:!this.model.get("done"),saveEvent:"continue",extraButtonClass:"btn-dark float-right ml-3",buttonText:s.T.getPhrase(this.lang,"finish"),spinnerOptions:{size:g.Ey.Small,type:g.dR.Light,extraClasses:"mx-auto"},tooltip:{title:this.model.get("done")?"":s.T.getPhrase(this.lang,"stillUploading")}}))}}])&&S(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),c}(r.Q.Component),T=n(33192),x=n(39995),j=n(88483),E=n(71192),I=n(37382),R=n(15180),_=n(95168),D=n(39155),A=(n(14611),n(33015),n(90680)),V=n(60602),L=n(20072),M=n(52076),U=n(22557),F=n(75459),B=n(26357),K=n(21893),Q=n.n(K);function z(e){return z="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},z(e)}function H(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function J(e,t){return J=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},J(e,t)}function q(e,t){if(t&&("object"===z(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function W(e){return W=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},W(e)}var Y=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&J(e,t)}(c,e);var t,n,r,l,a=(r=c,l=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=W(r);if(l){var n=W(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return q(this,e)});function c(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c),a.call(this,e)}return t=c,(n=[{key:"initialize",value:function(){this.prepareData(),this.bindListeners()}},{key:"lang",get:function(){return"libraryEditor.folderSelect"}},{key:"prepareData",value:function(){var e=this.options.library?this.options.library.collection:this.collection;this.collection=U.P.flatten(e),g.yV.setSelected(this.options.currentFolderId,this.collection),this.options.canCreateFolder&&this.collection.add({name:s.T.getPhrase(this.lang,"createNew"),eventName:"create:folder"})}},{key:"bindListeners",value:function(){var e=this;this.listenTo(this.channelName,"create:folder",this.onClickCreateFolder),this.listenTo(this.channelName,"select:option:selected",(function(t){i.Radio.channel(e.options.channelName).trigger("folder:selected",t)}))}},{key:"channelName",get:function(){return"".concat(this.name).concat(this.cid)}},{key:"folderTreeKey",get:function(){return"folderselect:".concat(this.cid)}},{key:"name",get:function(){return"FolderSelectView"}},{key:"className",get:function(){return"position-relative"}},{key:"template",get:function(){return Q()}},{key:"regions",value:function(){return{dropdown:{el:".dropdown-menu-region",replaceElement:!0}}}},{key:"onClickCreateFolder",value:function(){i.Radio.channel(this.options.channelName).trigger("create:folder:clicked")}},{key:"generatePrefix",value:function(){var e=this.model.get("depth");if(!o.isNumber(e)||this.model.get("hidePrefix"))return"";for(var t="",n=0;n<e;n++)t+="&nbsp;&nbsp;";return e&&(t+="- "),t}},{key:"getIsOptionDisabledFn",value:function(){var e=this.options.disableLibraries,t=this.options.disabledFolderIds;return function(n){var i=n||this.model;return!(!e||i.get("type")!==F.r.CustomLibrary)||!(!t||!o.contains(t,i.get("id").toString()))}}},{key:"onRender",value:function(){this.showChildView("dropdown",new B.H({collection:this.collection,channelName:this.channelName,childOptions:{titleProperty:"name",eventName:"select:option:click",prefixHandler:this.generatePrefix,currentSelectedMessage:this.options.currentSelectedMessage||s.T.getPhrase(this.lang,"current"),isDisabled:this.getIsOptionDisabledFn()},placeholderText:this.options.placeholderText||s.T.getPhrase(this.lang,"placeholder"),noOptionsText:s.T.getPhrase(this.lang,"noFolders"),inputName:this.options.inputName,disabled:0===this.collection.length||this.options.disabled,analyticsHelper:M.k}))}}])&&H(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),c}(r.Q.Component),X={requiredStar:"BykcP"},Z=n(76370),G=n.n(Z);function ee(e){return ee="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ee(e)}function te(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function ne(e,t){return ne=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ne(e,t)}function oe(e,t){if(t&&("object"===ee(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function ie(e){return ie=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ie(e)}var re=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ne(e,t)}(a,e);var t,n,o,r,l=(o=a,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=ie(o);if(r){var n=ie(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return oe(this,e)});function a(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),l.call(this,e)}return t=a,(n=[{key:"initialize",value:function(){var e=this;this.librariesWithoutFolders=new A.q,this.collection.each((function(t){return e.librariesWithoutFolders.add(t.toFlatJSON())})),this.listenTo(this.libraryChannelName,"folder:selected",this.onLibrarySelected),this.listenTo(this.channelName,"folder:selected new:folder:selected",this.onFolderSelected),this.listenTo(this.channelName,"create:folder:clicked",this.onCreateFolderClicked),!this.hasMultipleLibraries()&&this.librariesWithoutFolders.first()&&this.model.set("libraryId",this.librariesWithoutFolders.first().get("id"));var t=this.collection.get(this.model.get("libraryId"));if(t){var n=g.PU.getSelected(this.folderTreeKey,t.children);this.options.preselectedFolderId&&!n&&this.onFolderSelected(this.options.preselectedFolderId)}}},{key:"name",get:function(){return"UploadFolderSelectComponent"}},{key:"template",get:function(){return G()}},{key:"lang",get:function(){return"upload.uploadFolderSelect"}},{key:"folderTreeKey",get:function(){return"folder:tree:".concat(this.model.cid)}},{key:"regions",value:function(){return{librarySelect:".library-select-region",folderSelect:".folder-select-region"}}},{key:"hasMultipleLibraries",value:function(){return this.librariesWithoutFolders.length>1}},{key:"libraryChannelName",get:function(){return"".concat(this.channelName,":").concat(this.options.selectId,":libraries")}},{key:"channelName",get:function(){return"".concat(this.name).concat(this.cid).concat(this.options.selectId)}},{key:"onLibrarySelected",value:function(e){this.model.set("libraryId",e.get("id")),this.model.unset("folderId"),this.render()}},{key:"onFolderSelected",value:function(e){var t=e;e instanceof V.g&&(t=e.get("id")),this.model.set("folderId",t);var n=this.collection.get(this.model.get("libraryId")).children;g.PU.setSelected(this.folderTreeKey,t,n),this.model.validate()}},{key:"onCreateFolderClicked",value:function(){i.Radio.channel(this.options.channelName).trigger("show:new:folder",this.model.get("libraryId"),this.channelName)}},{key:"renderLibrarySelect",value:function(){if(this.hasMultipleLibraries()){var e=new Y({collection:this.librariesWithoutFolders,channelName:this.libraryChannelName,placeholderText:s.T.getPhrase(this.lang,"selectLibraryPlaceholder"),currentFolderId:this.model.get("libraryId"),currentSelectedMessage:s.T.getPhrase(this.lang,"currentLibrary"),inputName:"libraryId",canCreateFolder:!1});this.showChildView("librarySelect",e)}}},{key:"renderFolderSelect",value:function(){var e=this.model.get("libraryId");if(e){var t=this.collection.get(e);this.showChildView("folderSelect",new L.Y({collection:t.children,channelName:this.channelName,folderTreeKey:this.folderTreeKey,canCreateNew:!0,name:"folderId"}))}}},{key:"viewOptions",value:function(){return{styles:X,hasMultipleLibraries:this.hasMultipleLibraries(),requiredFields:this.options.requiredFields}}},{key:"onRender",value:function(){this.renderLibrarySelect(),this.renderFolderSelect()}}])&&te(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(r.Q.Component),le=n(11453),ae=n.n(le);function se(e){return se="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},se(e)}function ce(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ue(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function de(e,t){return de=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},de(e,t)}function fe(e,t){if(t&&("object"===se(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function pe(e){return pe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},pe(e)}var he=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&de(e,t)}(l,e);var t,n,o,i,r=(o=l,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=pe(o);if(i){var n=pe(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return fe(this,e)});function l(){return ce(this,l),r.apply(this,arguments)}return t=l,(n=[{key:"initialize",value:function(){this.listenTo(this.model,"change:progress",this.update)}},{key:"name",get:function(){return"UploadProgressComponent"}},{key:"template",get:function(){return ae()}},{key:"className",get:function(){return"progress my-3"}},{key:"elements",get:function(){return{progressBar:".progress-bar"}}},{key:"update",value:function(){var e=this.model.get("progress"),t=this.getUI("progressBar");t&&t.get(0)&&$(t.get(0)).css("width","".concat(e,"%"))}}])&&ue(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),l}(r.Q.Component),ye=n(63105),me=n.n(ye),ge=n(47381),ve=n.n(ge),be=n(61778),we=n.n(be),ke={title:"melld"},Se=n(42633),Oe=n.n(Se);function Ce(e){return Ce="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ce(e)}function Pe(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function Ne(e,t){return Ne=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Ne(e,t)}function Te(e,t){if(t&&("object"===Ce(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function xe(e){return xe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},xe(e)}var je=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ne(e,t)}(l,e);var t,n,o,i,r=(o=l,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=xe(o);if(i){var n=xe(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return Te(this,e)});function l(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l),r.call(this,e)}return t=l,(n=[{key:"name",get:function(){return"UploadVideoOptionsComponent"}},{key:"template",get:function(){return Oe()}},{key:"lang",get:function(){return"upload.uploadVideoOptions"}},{key:"tagName",get:function(){return"form"}},{key:"className",get:function(){return"border-top pt-3"}},{key:"events",value:function(){return{"click .toggle-option":"onToggleAutoCaptioning"}}},{key:"onToggleAutoCaptioning",value:function(e){e.stopPropagation(),this.model.set("autoCaption",!this.model.get("autoCaption")),this.render()}},{key:"viewOptions",value:function(){return{isSelected:this.model.get("autoCaption")}}}])&&Pe(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),l}(r.Q.Component),Ee=n(264);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},Ie(e)}function Re(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function De(e,t,n){return t&&_e(e.prototype,t),n&&_e(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Ae(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ve(e,t)}function Ve(e,t){return Ve=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Ve(e,t)}function Le(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Ue(e);if(t){var i=Ue(this).constructor;n=Reflect.construct(o,arguments,i)}else n=o.apply(this,arguments);return Me(this,n)}}function Me(e,t){if(t&&("object"===Ie(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Ue(e){return Ue=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ue(e)}var Fe=function(e){Ae(n,e);var t=Le(n);function n(){return Re(this,n),t.apply(this,arguments)}return De(n,[{key:"initialize",value:function(){this.listenTo(this.model,"change:name",this.render)}},{key:"name",get:function(){return"UploadTitleComponent"}},{key:"template",get:function(){return ve()}},{key:"tagName",get:function(){return"h3"}},{key:"className",get:function(){return"mb-0 border-bottom p-3 ".concat(ke.title)}},{key:"viewOptions",value:function(){return{name:this.model.get("name")||this.model.get("fileName")}}}]),n}(r.Q.Component),Be=function(e){Ae(n,e);var t=Le(n);function n(){return Re(this,n),t.apply(this,arguments)}return De(n,[{key:"initialize",value:function(){this.listenTo(this.model,"change:progress",this.render)}},{key:"name",get:function(){return"TextProgressComponent"}},{key:"template",get:function(){return we()}},{key:"lang",get:function(){return"upload.uploadVideo"}},{key:"className",get:function(){return" text-muted"}},{key:"tagName",get:function(){return"p"}},{key:"viewOptions",value:function(){return{percentage:Math.round(this.model.get("progress")||0)}}}]),n}(r.Q.Component),Ke=function(e){Ae(n,e);var t=Le(n);function n(e){return Re(this,n),t.call(this,e)}return De(n,[{key:"initialize",value:function(){this.viewModel=l.r.get("upload:".concat(this.model.get("id")),{name:this.model.get("name"),fileName:this.model.get("name"),showAdvanced:this.options.openAdvancedMetadata,rating:this.options.ratings.findWhere({value:0}),folderId:this.options.folderId,libraryId:this.options.libraryId,timeInitialized:T(),autoCaption:!1},{ctor:E.n}),this.viewModel.addValidation(D.I),this.listenTo(this.channelName,"select:rating",o.partial(this.onAssociationSelected,o,"rating")),this.listenTo(this.channelName,"select:channel",o.partial(this.onAssociationSelected,o,"channel")),this.listenTo(this.channelName,"add:producers",this.onSelectProducer),this.listenTo(this.channelName,"add:distributors",this.onSelectDistributor),this.listenTo(this.channelName,"add:productionCompanies",this.onSelectProductionCompany),this.listenTo(this.channelName,"add:directors",this.onSelectDirector),this.listenTo(this.channelName,"select:series",this.onSelectSeries),this.listenTo(this.channelName,"add:season",this.onSelectSeason),this.listenTo(this.options.uploadChannelName,"invalid:".concat(this.model.get("id")),this.scrollTo)}},{key:"name",get:function(){return"UploadVideoComponent"}},{key:"template",get:function(){return me()}},{key:"className",get:function(){return"bg-white mb-3 rounded"}},{key:"lang",get:function(){return"upload.uploadVideo"}},{key:"events",value:function(){return{"click .add-advanced-metadata":"onClickAddAdvancedMetadata","click .cancel-upload":"onClickCancelUpload"}}},{key:"channelName",get:function(){return"".concat(this.name).concat(this.cid)}},{key:"regions",value:function(){return{progress:{el:".upload-progress-region",replaceElement:!0},thumbnail:{el:".thumbnail-region",replaceElement:!0},uploadTitle:{el:".upload-title-region",replaceElement:!0},folderSelect:{el:".folder-select-region",replaceElement:!0},textProgress:{el:".text-progress-region",replaceElement:!0},videoDetails:{el:".video-details-region",replaceElement:!0},productionInfo:{el:".production-info-region",replaceElement:!0},advancedDetails:{el:".additional-info-region",replaceElement:!0},uploadOptions:{el:".video-options-region",replaceElement:!0}}}},{key:"onClickAddAdvancedMetadata",value:function(){this.viewModel.set("showAdvanced",!this.viewModel.get("showAdvanced")),this.render()}},{key:"onClickCancelUpload",value:function(){var e=this,t={title:s.T.getPhrase(this.lang,"cancelHeading"),text:s.T.getPhrase(this.lang,"cancelBody",{videoTitle:this.model.get("name")}),buttons:[{text:s.T.getPhrase(this.lang,"yes"),className:"btn btn-dark",success:!0},{text:s.T.getPhrase(this.lang,"no"),className:"btn btn-link",close:!0}],channelName:this.channelName};new g.Mr(t).render().done((function(){i.Radio.channel(e.options.uploadChannelName).trigger("cancel:upload",e.model.get("id"))}))}},{key:"onAssociationSelected",value:function(e,t){var n=this.viewModel.get(t);if(n instanceof r.Q.Collection){var i=n.filter((function(t){return!t.id||t.name===e.name}));o.each(i,(function(e){return n.remove(e)})),this.viewModel.get(t).add(e)}else this.viewModel.set(t,e)}},{key:"onSelectSeries",value:function(e){var t=this,n=i.Radio.channel(this.options.uploadChannelName);e.id?n.trigger("get:series",e.id,(function(e){t.onAssociationSelected(e.toJSON(),"series"),t.renderAdvancedVideoDetails()})):e.name&&n.trigger("create:series",e.name,(function(e){t.onAssociationSelected(e.toJSON(),"series"),t.renderAdvancedVideoDetails()}))}},{key:"onSelectSeason",value:function(e){var t=this;if(o.isNull(e))return this.viewModel.get("season").clear({silent:!0}),g.yV.deselectAll(this.viewModel.get("series.seasons")),this.onAssociationSelected(null,"season"),void this.renderAdvancedVideoDetails();if(e.id)return g.yV.setSelected(e.id,this.viewModel.get("series.seasons")),this.onAssociationSelected(e,"season"),void this.renderAdvancedVideoDetails();if(e.number){var n=this.viewModel.get("series.id");i.Radio.channel(this.options.uploadChannelName).trigger("create:season",e,n,(function(e){t.viewModel.get("series.seasons").add(e.toJSON()),g.yV.setSelected(e.id,t.viewModel.get("series.seasons")),t.onAssociationSelected(e.toJSON(),"season"),t.renderAdvancedVideoDetails()}))}}},{key:"onSelectDistributor",value:function(e){var t=this;e.id?this.onAssociationSelected(e,"distributors"):e.name&&i.Radio.channel(this.options.uploadChannelName).trigger("create:company",e.name,(function(e){t.onAssociationSelected(e.toJSON(),"distributors")}))}},{key:"onSelectProductionCompany",value:function(e){var t=this;e.id?this.onAssociationSelected(e,"productionCompanies"):e.name&&i.Radio.channel(this.options.uploadChannelName).trigger("create:company",e.name,(function(e){t.onAssociationSelected(e.toJSON(),"productionCompanies")}))}},{key:"onSelectDirector",value:function(e){var t=this;e.id?this.onAssociationSelected(e,"directors"):e.name&&i.Radio.channel(this.options.uploadChannelName).trigger("create:person",e.name,(function(e){t.onAssociationSelected(e.toJSON(),"directors")}))}},{key:"onSelectProducer",value:function(e){var t=this;e.id?this.onAssociationSelected(e,"producers"):e.name&&i.Radio.channel(this.options.uploadChannelName).trigger("create:person",e.name,(function(e){t.onAssociationSelected(e.toJSON(),"producers")}))}},{key:"getRequiredFields",value:function(){return{uploadDestination:!0}}},{key:"renderTitle",value:function(){var e=new Fe({model:this.viewModel});this.showChildView("uploadTitle",e)}},{key:"renderThumbnail",value:function(){var e=new x.Z({model:this.viewModel,thumbnailOptions:{size:j.h2.Medium}});this.showChildView("thumbnail",e)}},{key:"renderProgress",value:function(){var e=new he({model:this.model});this.showChildView("progress",e);var t=new Be({model:this.model});this.showChildView("textProgress",t)}},{key:"renderBasicVideoDetails",value:function(){var e=new I.J({model:this.viewModel,channelName:this.channelName,ratings:this.options.ratings,requiredFields:this.getRequiredFields(),editable:!0});this.showChildView("videoDetails",e)}},{key:"renderFolderSelect",value:function(){var e=new re({collection:this.options.libraries,selectId:this.model.get("id"),model:this.viewModel,channelName:this.options.uploadChannelName,requiredFields:this.getRequiredFields(),preselectedFolderId:this.options.folderId});this.showChildView("folderSelect",e)}},{key:"renderAdvancedVideoDetails",value:function(){if(this.viewModel.get("showAdvanced")){if(!Ee.g.hasLite){var e=new R.a({channelName:this.channelName,model:this.viewModel,libraries:this.options.libraries,hostedLibraries:this.options.hostedLibraries,editable:!0,hideBroadcastInfo:this.options.hideBroadcastInfo}),t=new _.O({channelName:this.channelName,model:this.viewModel,editable:!0});this.showChildView("advancedDetails",e),this.showChildView("productionInfo",t)}this.options.allowAutoCaptioning&&this.showChildView("uploadOptions",new je({model:this.viewModel}))}}},{key:"scrollTo",value:function(){$("html,body").animate({scrollTop:this.$el.offset().top},250)}},{key:"viewOptions",value:function(){return Object.assign({styles:ke,showExpand:this.options.allowAutoCaptioning||!Ee.g.hasLite},this.viewModel.toJSON())}},{key:"onRender",value:function(){this.renderTitle(),this.renderThumbnail(),this.renderProgress(),this.renderBasicVideoDetails(),this.renderFolderSelect(),this.renderAdvancedVideoDetails(),i.Validation.bind(this,{model:this.viewModel})}},{key:"onDestroy",value:function(){i.Validation.unbind(this)}}]),n}(r.Q.Component);function Qe(e){return Qe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Qe(e)}function ze(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function He(e,t){return He=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},He(e,t)}function Je(e,t){if(t&&("object"===Qe(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function qe(e){return qe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},qe(e)}var We=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&He(e,t)}(l,e);var t,n,o,i,r=(o=l,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=qe(o);if(i){var n=qe(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return Je(this,e)});function l(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l),r.call(this,e)}return t=l,(n=[{key:"name",get:function(){return"UploadVideoComponentCollection"}},{key:"childView",get:function(){return Ke}},{key:"childViewOptions",get:function(){return{ratings:this.options.ratings,libraries:this.options.libraries,hostedLibraries:this.options.hostedLibraries,uploadChannelName:this.options.uploadChannelName,folderId:this.options.folderId,libraryId:this.options.libraryId,allowAutoCaptioning:this.options.allowAutoCaptioning,hideBroadcastInfo:this.options.hideBroadcastInfo,openAdvancedMetadata:this.collection.length<=1}}}])&&ze(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),l}(r.Q.ComponentCollection),$e=n(30305),Ye=n(48404),Xe=n(9484),Ze=n(95061),Ge=n(70065),et=n(81937),tt=n(5854);function nt(e){return nt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},nt(e)}function ot(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function it(e,t){return it=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},it(e,t)}function rt(e,t){if(t&&("object"===nt(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function lt(e){return lt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},lt(e)}var at=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&it(e,t)}(v,e);var t,n,p,y,m=(p=v,y=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=lt(p);if(y){var n=lt(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return rt(this,e)});function v(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,v),m.call(this,e)}return t=v,(n=[{key:"initialize",value:function(){this.initServices(),this.initDataListeners(),this.initComponentListeners(),this.initCollectionListeners(),this.initShellListeners()}},{key:"name",get:function(){return"UploadVideosView"}},{key:"title",get:function(){return s.T.getPhrase(this.lang,"title")}},{key:"lang",get:function(){return"upload.uploadVideos"}},{key:"template",get:function(){return h()}},{key:"regions",value:function(){return{topActions:{el:".top-actions-region",replaceElement:!0},bottomActions:{el:".bottom-actions-region",replaceElement:!0},videos:{el:".videos-region",replaceElement:!0}}}},{key:"channelName",get:function(){return"".concat(this.name).concat(this.cid)}},{key:"initServices",value:function(){this.videoDataService=a.u.getInstance($e.Or.Video,this),this.libraryDataService=a.u.getInstance($e.Or.Library,this),this.videoUploadService=a.u.getInstance($e.K9.VideoUpload,this),this.videoUploadDataService=a.u.getInstance($e.Or.VideoUpload,this),this.seriesDataService=a.u.getInstance($e.Or.Series,this),this.ratingsDataService=a.u.getInstance($e.Or.Ratings,this),this.companyDataService=a.u.getInstance($e.Or.Company,this),this.personDataService=a.u.getInstance($e.Or.Person,this),this.alertService=a.u.getInstance($e.K9.Alerts,this),this.navLockService=a.u.getInstance($e.K9.NavLock,this),this.settingsDataService=a.u.getInstance($e.Or.Settings,this)}},{key:"initDataListeners",value:function(){this.listenTo($e.Vk.RATINGS,"".concat($e.M_.RATINGS,":sync"),this.render),this.listenTo($e.Vk.LIBRARY,"hosted:libraries:sync",this.render),this.listenTo($e.Vk.LIBRARY,"folder:created",this.onFolderCreated)}},{key:"initComponentListeners",value:function(){this.listenTo(this.channelName,"continue",this.onClickContinue),this.listenTo(this.channelName,"cancel:upload",this.cancelUpload),this.listenTo(this.channelName,et.S.FILES_SELECTED,this.onFilesSelected),this.listenTo(this.channelName,"show:new:folder",this.onClickNewFolder),this.listenTo(this.channelName,"get:series",this.onSelectSeries),this.listenTo(this.channelName,"create:series",this.onCreateSeries),this.listenTo(this.channelName,"create:season",this.onCreateSeason),this.listenTo(this.channelName,"create:company",this.onCreateCompany),this.listenTo(this.channelName,"create:person",this.onCreatePerson)}},{key:"initCollectionListeners",value:function(){var e=this.videoUploadService.getCollection();this.listenTo(e,"remove",this.onCollectionChange)}},{key:"initShellListeners",value:function(){this.listenTo(u.G.SHELL,r.Q.EventNames.NAV_UNLOCKED_BY_USER,this.onNavigateAway)}},{key:"cancelUpload",value:function(e){this.logCancelAction(e),this.videoUploadService.cancelUpload(e)}},{key:"onNavigateAway",value:function(){this.logCancelAction(),this.videoUploadService.cancelAllUploads()}},{key:"onCollectionChange",value:function(e,t){t.length||(this.navLockService.unlock(),r.Q.AppLinkHelper.trigger({application:$e.OV.UPLOAD,action:$e.eX.Upload.FILE_SELECTION}))}},{key:"onSelectSeries",value:function(e,t){this.seriesDataService.getSeries(e,t)}},{key:"onCreateSeries",value:function(e,t){this.seriesDataService.createSeries(e,t)}},{key:"onCreateSeason",value:function(e,t,n){this.seriesDataService.createSeason(e,t,n)}},{key:"onCreateCompany",value:function(e,t){this.companyDataService.createCompany(e,t)}},{key:"onCreatePerson",value:function(e,t){this.personDataService.createPerson(e,t)}},{key:"onClickContinue",value:function(){var e,t=this,n=i.Radio.channel(this.channelName),o=this.videoUploadService.getCollection(),u=!0;if(o.each((function(t){var n=l.r.get("upload:".concat(t.get("id")),null,{ctor:E.n});n.validate();var o=n.isValid();!1!==o||e||(e=t.id),u=u&&o})),e&&n.trigger("invalid:".concat(e)),u){n.trigger("start:spinner");var d=[];o.each((function(e){var n=e.get("file"),i=l.r.get("upload:".concat(e.get("id")),null,{ctor:E.n});if(tt.S.hasExpired(i,t.config.get("uploadSessionExpiryTime")))return t.alertService.createAlert({heading:s.T.getPhrase(t.lang,"uploadErrorHeading"),message:s.T.getPhrase(t.lang,"uploadErrorBody",{videoName:i.get("name")}),type:c.NK.Fail}),void o.remove(e);i.set("fileId",n.cvUpload.fileId),i.set("fileSize",n.size),d.push(i)})),this.videoUploadDataService.completeVideoUploads(this.currentUser.get("id"),this.currentUser.get("customerId"),d,(function(){t.navLockService.unlock(),a.u.getInstance($e.K9.PendingItems).forceFetchPendingItems(),a.u.releaseInstance($e.K9.PendingItems),r.Q.AppLinkHelper.trigger({application:$e.OV.UPLOAD,action:d.length?$e.eX.Upload.UPLOAD_COMPLETE:$e.eX.Upload.FILE_SELECTION}),t.logFinishAction(d),t.videoDataService.clearVideoCache()}))}}},{key:"onFilesSelected",value:function(e,t){this.videoUploadService.addFiles(e),this.logStartAction(e,t)}},{key:"onClickNewFolder",value:function(e,t){this.setFolderChannel=t,this.navLockService.unlock(),r.Q.AppLinkHelper.trigger({application:$e.OV.UPLOAD,action:$e.eX.Shared.NEW_FOLDER,args:[e]}),this.lockNav()}},{key:"onFolderCreated",value:function(e){this.setFolderChannel&&(i.Radio.channel(this.setFolderChannel).trigger("new:folder:selected",e),this.render())}},{key:"logStartAction",value:function(e,t){var n=M.k.mergeOptions(this.options.analyticsOptions,{workflowPhase:Ge.WorkflowPhase.Start,descriptor:M.k.mapInteractionType(t)});M.k.logUserAction(e,n)}},{key:"logCancelAction",value:function(e){var t=this.videoUploadService.getCollection();if(t.length){var n=e?t.get(e):t,o=M.k.mergeOptions(this.options.analyticsOptions,{workflowPhase:Ge.WorkflowPhase.Discard,descriptor:e?Ge.OperationDescriptor.Single:Ge.OperationDescriptor.All});M.k.logUserAction(n.toJSON(),o)}}},{key:"logFinishAction",value:function(e){if(e.length){var t=o.map(e,(function(e){return e.toJSON()})),n=M.k.mergeOptions(this.options.analyticsOptions,{workflowPhase:Ge.WorkflowPhase.Complete});M.k.logUserAction(t,n)}}},{key:"fetchData",value:function(){this.ratings=this.ratingsDataService.getAllRatings(),this.hostedLibraries=this.libraryDataService.getLibraries(),this.autoCaptioning=this.settingsDataService.getSetting(this.currentUser.get("customerId"),d.E.AutoCaptioning)}},{key:"renderUploadActions",value:function(){this.showChildView("topActions",new N({uploadChannelName:this.channelName})),this.showChildView("bottomActions",new N({uploadChannelName:this.channelName}))}},{key:"renderVideos",value:function(){var e={collection:this.videoUploadService.getCollection(),ratings:this.ratings,libraries:this.libraries,hostedLibraries:this.hostedLibraries,uploadChannelName:this.channelName,allowAutoCaptioning:this.autoCaptioning.get("value"),hideBroadcastInfo:this.currentUser.get("instanceRegion")===f.b.US};if(this.options.folderId){var t=g.PU.getLibrary(this.options.folderId,this.libraries);t&&(e.folderId=this.options.folderId,e.libraryId=t.get("id"))}var n=new We(e);this.showChildView("videos",n)}},{key:"lockNav",value:function(){this.navLockService.lock({title:s.T.getPhrase(this.lang,"navLockHeading"),text:s.T.getPhrase(this.lang,"navLockBody")})}},{key:"requiredResources",get:function(){return{currentUser:Xe.K.currentUser,libraries:Ze.T.libraries,config:Ye.p.config}}},{key:"onBeforeRender",value:function(){return this.fetchData(),!!this.ratings&&!!this.hostedLibraries&&!!this.autoCaptioning}},{key:"onRender",value:function(){this.lockNav(),this.renderUploadActions(),this.renderVideos()}}])&&ot(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),v}(r.Q.View)},71641:function(e,t,n){"use strict";n.d(t,{w:function(){return d}});var o=n(39479),i=n(31647),r=n(55142);function l(e){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},l(e)}function a(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function s(e,t){return s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},s(e,t)}function c(e,t){if(t&&("object"===l(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function u(e){return u=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},u(e)}var d=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&s(e,t)}(f,e);var t,n,i,l,d=(i=f,l=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=u(i);if(l){var n=u(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return c(this,e)});function f(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,f),d.call(this,e)}return t=f,n=[{key:"name",get:function(){return"DropdownCollectionComponent"}},{key:"className",get:function(){return"dropdown-menu items-viewpart ".concat(this.getExtraClasses(this.options.displayOptions))}},{key:"attributes",get:function(){return{"aria-labelledby":"dropdownSelector"}}},{key:"initialize",value:function(){this.listenTo(this.options.channelName,"center:dropdown",this.centerSelectedItem)}},{key:"childView",get:function(){return r.N}},{key:"childViewOptions",get:function(){var e={channelName:this.options.channelName,analyticsHelper:this.options.analyticsHelper};return o.extend(e,this.options.childOptions)}},{key:"getExtraClasses",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.alignment,n=void 0===t?"left":t,o=e.extraClasses,i="dropdown-menu-".concat(n);return o&&(i="".concat(i," ").concat(o)),i}},{key:"centerSelectedItem",value:function(){var e=this.$el.find(".active");if(e.length){var t=this.$el.scrollTop()+e.position().top,n=.5*this.$el.height()+.5*e.height();this.$el.scrollTop(t-n)}}}],n&&a(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),f}(i.Q.ComponentCollection)},26357:function(e,t,n){"use strict";n.d(t,{H:function(){return m}});var o=n(39479),i=n(48088),r=n(31647),l=n(71641),a=n(61843),s=n(46635),c=n.n(s),u={dropdownMenu:"oKdKI",selectButton:"fTeoW",disabled:"gZbQ4"};function d(e){return d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},d(e)}function f(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function p(e,t){return p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},p(e,t)}function h(e,t){if(t&&("object"===d(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function y(e){return y=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},y(e)}var m=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&p(e,t)}(m,e);var t,n,r,s,d=(r=m,s=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=y(r);if(s){var n=y(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return h(this,e)});function m(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,m),(t=d.call(this,e)).selectSearch="",t.sameCharIndex=1,t.optionStep=1,t}return t=m,n=[{key:"initialize",value:function(){this.setModel(),this.bindListeners()}},{key:"name",get:function(){return"SelectComponent"}},{key:"template",get:function(){return c()}},{key:"regions",value:function(){return{dropdown:{el:".dropdown-region",replaceElement:!0}}}},{key:"events",value:function(){return{keydown:"onKeydown","shown.bs.dropdown":"onShowDropdown"}}},{key:"defaults",get:function(){return{displayProperty:"name"}}},{key:"elements",get:function(){return{dropdownToggle:".dropdown-toggle"}}},{key:"bindListeners",value:function(){this.listenTo(this.options.channelName,this.options.childOptions.eventName,this.onSelect)}},{key:"onShowDropdown",value:function(){i.Radio.channel(this.options.channelName).trigger("center:dropdown")}},{key:"onKeydown",value:function(e){38===e.keyCode||40===e.keyCode?this.onArrowKeyDown(e):13===e.keyCode?this.render():this.onType(e),i.Radio.channel(this.options.channelName).trigger("center:dropdown")}},{key:"onArrowKeyDown",value:function(e){a.yV.getSelected(this.collection)?this.optionStep=1:this.optionStep=0;var t=this.getNextModel(e.keyCode);for(t||(a.yV.deselectAll(this.collection),t=this.getNextModel(e.keyCode));this.isDisabled(t);)this.optionStep++,t=this.getNextModel(e.keyCode);this.onSelect(t)}},{key:"onType",value:function(e){if(1===e.key.toString().length){var t=this.getModelMatch(e);t&&this.onSelect(t),this.runTimer()}}},{key:"onSelect",value:function(e){this.isDisabled(e)||(a.yV.setSelected(e.get("id"),this.collection),this.setModel(),this.getUI("dropdownToggle").text(this.getButtonText()),i.Radio.channel(this.options.channelName).trigger("select:option:selected",e))}},{key:"setModel",value:function(){this.model=a.yV.getSelected(this.collection)}},{key:"getNextModel",value:function(e){var t,n=a.yV.getSelected(this.collection)||this.collection.first(),o=this.collection.indexOf(n);return(t=38===e?this.collection.at(o-this.optionStep):this.collection.at(o+this.optionStep))||(a.yV.deselectAll(this.collection),t=this.collection.first(),this.optionStep=0),t}},{key:"getModelMatch",value:function(e){var t,n=this;return 1===this.selectSearch.length&&this.selectSearch===e.key?t=this.handleSameCharIndex(e.key):(this.selectSearch+=e.key,this.sameCharIndex=1),t||(t=o.find(this.collection.models,(function(e){return e.get(n.options.displayProperty).toLowerCase().slice(0,n.selectSearch.length).includes(n.selectSearch.toLowerCase())}))),t}},{key:"handleSameCharIndex",value:function(e){var t=this,n=o.filter(this.collection.models,(function(n){return n.get(t.options.displayProperty).toLowerCase().slice(0,1)===e}));if(n.length>1){var i=n[this.sameCharIndex];return i||(i=o.first(n),this.sameCharIndex=0),this.sameCharIndex++,i}return o.first(n)}},{key:"runTimer",value:function(){var e=this;this.scopedTimerIndex&&clearTimeout(this.scopedTimerIndex),this.scopedTimerIndex=window.setTimeout((function(){e.selectSearch=""}),500)}},{key:"isDisabled",value:function(e){var t;if(e.get("divider"))return!0;if(!o.isFunction(this.options.childOptions.isDisabled))return!1;for(var n=arguments.length,i=new Array(n>1?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];return(t=this.options.childOptions.isDisabled).call.apply(t,[this,e].concat(i))}},{key:"getButtonText",value:function(){if(this.options.disabled)return this.options.noOptionsText;var e=a.yV.getSelected(this.collection);return e&&e.get(this.options.displayProperty)||this.options.placeholderText}},{key:"viewOptions",value:function(){return{styles:u,inputName:this.options.inputName,disabled:this.options.disabled,placeholderText:this.getButtonText()}}},{key:"onRender",value:function(){this.showChildView("dropdown",new l.w({collection:this.collection,channelName:this.options.channelName,childOptions:o.extend(this.options.childOptions),displayOptions:{extraClasses:"w-100 ".concat(u.dropdownMenu)},analyticsHelper:this.options.analyticsHelper}))}}],n&&f(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),m}(r.Q.Component)},20072:function(e,t,n){"use strict";n.d(t,{Y:function(){return m}});var o=n(48088),i=n(31647),r=n(57857),l=n(50299),a=n(61843),s=n(68979),c=n.n(s),u={selectBtn:"tZUtI",list:"MxlSt",selector:"qHvbU",customItem:"aJzJB"};function d(e){return d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},d(e)}function f(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function p(e,t){return p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},p(e,t)}function h(e,t){if(t&&("object"===d(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function y(e){return y=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},y(e)}var m=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&p(e,t)}(m,e);var t,n,i,s,d=(i=m,s=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=y(i);if(s){var n=y(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return h(this,e)});function m(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,m),d.call(this,e)}return t=m,(n=[{key:"initialize",value:function(){this.listenTo(this.options.channelName,"folder:selected new:folder:selected",this.setButtonText),this.listenTo(this.options.channelName,"re:render:selector",this.renderSelector),this.disabledIds=this.options.disabledIds&&this.options.disabledIds.reduce((function(e,t){return Object.assign(Object.assign({},e),function(e,t,n){return t in e?Object.defineProperty(e,t,{value:true,enumerable:!0,configurable:!0,writable:!0}):e[t]=true,e}({},t))}),{})}},{key:"name",get:function(){return"TreeDropdownComponent"}},{key:"template",get:function(){return c()}},{key:"className",get:function(){return"position-relative"}},{key:"lang",get:function(){return"libraryEditor.treeDropdown"}},{key:"regions",value:function(){return{selector:{el:".selector-region",replaceElement:!1}}}},{key:"events",value:function(){return{"click .create-new":"onClickCreateNew"}}},{key:"defaults",get:function(){return{disabledIds:[]}}},{key:"elements",get:function(){return{button:".button-text"}}},{key:"onClickCreateNew",value:function(e){e.preventDefault(),o.Radio.channel(this.options.channelName).trigger("create:folder:clicked")}},{key:"setButtonText",value:function(e,t){if(e&&!t){var n=e.get("name");this.getUI("button").text(n)}else{var o=a.PU.getSelected(this.options.folderTreeKey,this.collection),i=o?o.get("name"):r.T.getPhrase(this.lang,"button");this.getUI("button").text(i)}}},{key:"renderSelector",value:function(){this.showChildView("selector",new l.J({styles:u,collection:this.collection,channelName:this.options.channelName,childrenProperty:"children",folderTreeId:this.options.folderTreeKey,extraClass:u.list,extraClasses:u.list,isSelector:!0,disabledIds:this.disabledIds||{}}))}},{key:"viewOptions",value:function(){return{styles:u,name:this.options.name||this.options.channelName,buttonText:this.buttonText,canCreateNew:this.options.canCreateNew}}},{key:"onRender",value:function(){this.setButtonText(),this.renderSelector()}}])&&f(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),m}(i.Q.Component)},21893:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){return'<div class="dropdown-menu-region"></div>'},useData:!0})},42494:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){return e.propertyIsEnumerable,'<div class="finish-button-region"></div>\r\n<button class="btn btn-outline-dark float-right add-more-videos">'+e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"addMore",{name:"lang",hash:{},data:i}))+"</button>"},useData:!0})},76370:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({1:function(e,t,n,o,i){var r;return e.propertyIsEnumerable,'<span class="'+e.escapeExpression(e.lambda(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.requiredStar:r,t))+'">*</span>'},3:function(e,t,n,o,i){return' <div class="library-select-region form-group col-6"></div>\r\n'},5:function(e,t,n,o,i){return"col-6"},7:function(e,t,n,o,i){return"col-12"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){e.propertyIsEnumerable;var r,l=null!=t?t:e.nullContext||{};return"<h5>"+e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(l,"uploadDestination",{name:"lang",hash:{},data:i}))+(null!=(r=n.if.call(l,null!=(r=null!=(r=null!=t?t.options:t)?r.requiredFields:r)?r.uploadDestination:r,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?r:"")+'</h5>\r\n <div class="container-fluid px-0">\r\n <div class="row">\r\n'+(null!=(r=n.if.call(l,null!=(r=null!=t?t.options:t)?r.hasMultipleLibraries:r,{name:"if",hash:{},fn:e.program(3,i,0),inverse:e.noop,data:i}))?r:"")+' <div class="folder-select-region form-group '+(null!=(r=n.if.call(l,null!=(r=null!=t?t.options:t)?r.hasMultipleLibraries:r,{name:"if",hash:{},fn:e.program(5,i,0),inverse:e.program(7,i,0),data:i}))?r:"")+'"></div>\r\n </div>\r\n </div>\r\n</div>'},useData:!0})},11453:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){e.propertyIsEnumerable;var r,l=null!=t?t:e.nullContext||{},a=e.hooks.helperMissing,s="function",c=e.escapeExpression;return'<div class="progress-bar bg-info" style="width: '+c(typeof(r=null!=(r=n.progress||(null!=t?t.progress:t))?r:a)===s?r.call(l,{name:"progress",hash:{},data:i}):r)+'%" aria-valuenow="'+c(typeof(r=null!=(r=n.progress||(null!=t?t.progress:t))?r:a)===s?r.call(l,{name:"progress",hash:{},data:i}):r)+'" aria-valuemin="0" aria-valuemax="100"></div>'},useData:!0})},42633:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({1:function(e,t,n,o,i){return" on"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){e.propertyIsEnumerable;var r,l=null!=t?t:e.nullContext||{},a=e.hooks.helperMissing,s=e.escapeExpression;return"<h5>"+s((n.lang||t&&t.lang||a).call(l,"heading",{name:"lang",hash:{},data:i}))+'</h5>\r\n<div class="container-fluid">\r\n <div class="row">\r\n <div class="form-group col-6 p-0">\r\n <div class="d-block">\r\n <label>'+s((n.lang||t&&t.lang||a).call(l,"autoCaptioningHeading",{name:"lang",hash:{},data:i}))+'</label>\r\n <div class="custom-toggle toggle-option float-right'+(null!=(r=n.if.call(l,null!=(r=null!=t?t.options:t)?r.isSelected:r,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?r:"")+'"><span class="handle"></span></div>\r\n </div>\r\n <p class=\'mb-0 mr-5\'>'+s((n.lang||t&&t.lang||a).call(l,"autoCaptioningInfo",{name:"lang",hash:{},data:i}))+"</p>\r\n </div>\r\n </div>\r\n</div>\r\n \r\n"},useData:!0})},61778:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){var r;return e.propertyIsEnumerable,e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"uploading",{name:"lang",hash:{percentage:null!=(r=null!=t?t.options:t)?r.percentage:r},data:i}))},useData:!0})},47381:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){var r;return e.propertyIsEnumerable,e.escapeExpression(e.lambda(null!=(r=null!=t?t.options:t)?r.name:r,t))},useData:!0})},63105:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({1:function(e,t,n,o,i){var r;return e.propertyIsEnumerable,'<div class="p-2 text-center border-top">\r\n <button class="add-advanced-metadata btn btn-link">'+(null!=(r=n.if.call(null!=t?t:e.nullContext||{},null!=(r=null!=t?t.options:t)?r.showAdvanced:r,{name:"if",hash:{},fn:e.program(2,i,0),inverse:e.program(4,i,0),data:i}))?r:"")+"</a>\r\n</div>\r\n"},2:function(e,t,n,o,i){return e.propertyIsEnumerable,e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"hideMetadata",{name:"lang",hash:{},data:i}))},4:function(e,t,n,o,i){return e.propertyIsEnumerable,e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"addMetadata",{name:"lang",hash:{},data:i}))},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){e.propertyIsEnumerable;var r,l,a=e.escapeExpression,s=null!=t?t:e.nullContext||{},c=e.hooks.helperMissing;return'<div class="upload-title-region"></div>\r\n<div class="container-fluid">\r\n <div class="row">\r\n <div class="col-4 p-3">\r\n <div class="thumbnail-region"></div>\r\n <div class="upload-progress-region"></div>\r\n <div class="my-3">\r\n <h5 class="'+a(e.lambda(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.title:r,t))+'">'+a("function"==typeof(l=null!=(l=n.name||(null!=t?t.name:t))?l:c)?l.call(s,{name:"name",hash:{},data:i}):l)+'</h5>\r\n <div class="text-progress-region"></div>\r\n <button class="btn btn-outline-dark cancel-upload">'+a((n.lang||t&&t.lang||c).call(s,"cancel",{name:"lang",hash:{},data:i}))+'</button>\r\n </div>\r\n\r\n </div>\r\n <div class="col-8 py-3 pr-3">\r\n <div class="video-details-region"></div>\r\n <div class="folder-select-region"></div>\r\n <div class="additional-info-region"></div>\r\n <div class="production-info-region"></div>\r\n <div class="video-options-region"></div>\r\n </div>\r\n </div>\r\n</div>\r\n'+(null!=(r=n.if.call(s,null!=(r=null!=t?t.options:t)?r.showExpand:r,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?r:"")},useData:!0})},35250:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){return'<div class="top-actions-region"></div>\r\n<div class="videos-region"></div>\r\n<div class="bottom-actions-region"></div>'},useData:!0})},46635:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({1:function(e,t,n,o,i){var r;return e.propertyIsEnumerable,e.escapeExpression(e.lambda(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.disabled:r,t))},3:function(e,t,n,o,i){return" disabled"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){e.propertyIsEnumerable;var r,l=e.lambda,a=e.escapeExpression,s=null!=t?t:e.nullContext||{};return'<button \r\n class="dropdown-toggle form-control btn-block text-left position-relative '+a(l(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.selectButton:r,t))+" "+(null!=(r=n.if.call(s,null!=(r=null!=t?t.options:t)?r.disabled:r,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?r:"")+'" \r\n type="button" \r\n id="dropdownMenuButton" \r\n data-toggle="dropdown" \r\n aria-haspopup="true" \r\n aria-expanded="false"\r\n '+(null!=(r=n.if.call(s,null!=(r=null!=t?t.options:t)?r.disabled:r,{name:"if",hash:{},fn:e.program(3,i,0),inverse:e.noop,data:i}))?r:"")+' \r\n name="'+a(l(null!=(r=null!=t?t.options:t)?r.inputName:r,t))+'"\r\n >\r\n '+a(l(null!=(r=null!=t?t.options:t)?r.placeholderText:r,t))+'\r\n</button>\r\n<div class="dropdown-region"></div>\r\n<div class="form-feedback"></div>'},useData:!0})},68979:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({1:function(e,t,n,o,i){e.propertyIsEnumerable;var r,l=e.escapeExpression;return' <button class="create-new btn font-weight-bold rounded-0 w-100 text-left '+l(e.lambda(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.customItem:r,t))+'">'+l((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"createNew",{name:"lang",hash:{},data:i}))+"</button>\r\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){e.propertyIsEnumerable;var r,l=e.lambda,a=e.escapeExpression;return'<button\r\n class="'+a(l(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.selectBtn:r,t))+' custom-select form-control"\r\n data-toggle="dropdown"\r\n aria-haspopup="true"\r\n aria-expanded="false"\r\n name='+a(l(null!=(r=null!=t?t.options:t)?r.name:r,t))+'\r\n>\r\n <span class="d-block text-truncate button-text">\r\n '+a(l(null!=(r=null!=t?t.options:t)?r.buttonText:r,t))+'\r\n </span>\r\n</button>\r\n<div class="dropdown-menu '+a(l(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.selector:r,t))+'">\r\n <div class="selector-region"></div>\r\n'+(null!=(r=n.if.call(null!=t?t:e.nullContext||{},null!=(r=null!=t?t.options:t)?r.canCreateNew:r,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?r:"")+'</div>\r\n<div class="form-feedback"></div>'},useData:!0})}}]);