@clickview/library-editor 1.29.0-rc.2 → 1.29.0-rc.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- (self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[1364],{44391:function(e,t,n){"use strict";n.d(t,{K:function(){return g}});var o=n(31647),r=n(11306),i=n(48088),l=n(48090),s=n(26457),a=n(15564),c=n.n(a);function u(e){return u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},u(e)}function 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,(void 0,r=function(e,t){if("object"!==u(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!==u(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(o.key),"symbol"===u(r)?r:String(r)),o)}var r}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){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&&f(e,t)}(y,e);var t,n,o,r,a=(o=y,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=h(o);if(r){var n=h(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===u(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function y(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,y),a.call(this,e)}return t=y,(n=[{key:"name",get:function(){return"TagItemComponent"}},{key:"tagName",get:function(){return this.options.behavior===s.Dm.Link?"a":"span"}},{key:"className",get:function(){var e="".concat(this.options.orientation===s.zM.Vertical?"":" d-inline-flex"),t="".concat(this.isSaving()?" saving":""),n="".concat(this.options.behavior===s.Dm.Disabled?" ".concat("dE3WC"):""),o="".concat(this.options.behavior===s.Dm.Filter?" cursor-pointer":"");return"badge-pill tag py-1 px-2 my-1 mr-1".concat(o).concat(e).concat(t).concat(n)}},{key:"template",get:function(){return c()}},{key:"elements",get:function(){return{close:".close"}}},{key:"appLinks",get:function(){return this.options.behavior!==s.Dm.Link?{}:{"[this]":{application:l.OV.SEARCH,action:l.eX.Search.HOME,params:{tag:this.model.get("name")}}}}},{key:"defaults",get:function(){return{behavior:s.Dm.Link,orientation:s.zM.Flex}}},{key:"events",value:function(){return this.options.removeEvent?{"click @ui.close":"onRemoveTag"}:{click:"onClickTag"}}},{key:"initialize",value:function(){this.options.behavior===s.Dm.Edit&&this.listenTo(this.model,"change",this.render)}},{key:"isSaving",value:function(){if(this.options.behavior!==s.Dm.Filter){var e=this.model.pick("id","name","remove"),t=e.id,n=e.name;return!!e.remove||!t||!n}}},{key:"onRemoveTag",value:function(e){if(e.stopPropagation(),!this.isSaving())return this.model.set("remove",!0),i.Radio.channel(this.options.channelName).trigger(this.options.removeEvent,this.model),!1}},{key:"onClickTag",value:function(){this.options.behavior!==s.Dm.Filter||this.options.removeEvent||i.Radio.channel(this.options.channelName).trigger(this.options.clickEvent,this.model)}},{key:"viewOptions",value:function(){return{removable:this.options.removeEvent}}},{key:"onRender",value:function(){this.resetClassName()}}])&&p(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),y}(o.Q.Component);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 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,(void 0,r=function(e,t){if("object"!==d(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!==d(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(o.key),"symbol"===d(r)?r:String(r)),o)}var r}function b(e,t){return b=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},b(e,t)}function v(e){return v=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},v(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&&b(e,t)}(c,e);var t,n,i,l,a=(i=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=v(i);if(l){var n=v(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===d(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(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.options.behavior!==s.Dm.Edit||this.options.removeEvent||o.Q.ErrorHelper.throw(new r.H("removeEvent is required to edit tags."))}},{key:"name",get:function(){return"TagComponentCollection"}},{key:"defaults",get:function(){return{orientation:s.zM.Flex}}},{key:"className",get:function(){var e="".concat(this.options.orientation===s.zM.Vertical?" d-flex align-items-start flex-column":"");return"tags".concat(e)}},{key:"childViewOptions",get:function(){return{channelName:this.options.channelName,behavior:this.options.behavior,orientation:this.options.orientation,removeEvent:this.options.removeEvent,clickEvent:this.options.clickEvent}}},{key:"childView",get:function(){return y}}])&&m(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),c}(o.Q.ComponentCollection)},71641:function(e,t,n){"use strict";n.d(t,{w:function(){return u}});var o=n(39479),r=n(31647),i=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 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,(void 0,r=function(e,t){if("object"!==l(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!==l(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(o.key),"symbol"===l(r)?r:String(r)),o)}var r}function a(e,t){return a=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},a(e,t)}function c(e){return c=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},c(e)}var u=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)}(f,e);var t,n,r,u,p=(r=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=c(r);if(u){var n=c(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(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)}(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:"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}),f}(r.Q.ComponentCollection)},66882:function(e,t,n){"use strict";n.d(t,{R:function(){return V}});var o=n(31647),r=n(57857),i=n(70065),l=n(52076),s=n(63791),a=n(39479),c=n(56210),u=n(37106),p=n.n(u),f={actions:"VXWM3",svgContainer:"etJKo",moreSvgContainer:"kwNUa",actionName:"gbBGB",disabled:"Ykm_2",iconButton:"xqFbC"};function h(e){return h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},h(e)}function y(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}function d(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}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,(void 0,r=function(e,t){if("object"!==h(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!==h(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(o.key),"symbol"===h(r)?r:String(r)),o)}var r}function b(e,t,n){return t&&m(e.prototype,t),n&&m(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function v(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&g(e,t)}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){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=k(e);if(t){var r=k(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return function(e,t){if(t&&("object"===h(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,n)}}function k(e){return k=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},k(e)}var O=function(e){v(n,e);var t=w(n);function n(e){return d(this,n),t.call(this,e)}return b(n,[{key:"name",get:function(){return"VideoActionItemComponent"}},{key:"template",get:function(){return p()}},{key:"tagName",get:function(){return"a"}},{key:"attributes",get:function(){if(!this.model.get("href"))return{}}},{key:"className",get:function(){var e="cursor-pointer";return this.options.showLabel?e+=" ".concat(f.iconButton," btn btn-outline-dark ml-2"):e+=" d-inline-block px-1 no-decoration",this.model.get("isDisabled")&&(e+=" ".concat(f.disabled)),e}},{key:"events",value:function(){return{click:"onClick"}}},{key:"behaviors",get:function(){var e=(!this.options.showLabel||this.options.model.get("isDisabled"))&&this.options.model.get("tooltipText");if(e)return[{behaviorClass:c.H,title:e}]}},{key:"appLinks",get:function(){return!this.model.get("appLink")||this.model.get("isDisabled")?{}:{"[this]":this.model.get("appLink")}}},{key:"onClick",value:function(){this.logAction()}},{key:"logAction",value:function(){var e,t,n=this.model.get("appLink");if(a.isObject(n)){var o=(e=n.args,t=1,function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var o,r,i,l,s=[],a=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;a=!1}else for(;!(a=(o=i.call(n)).done)&&(s.push(o.value),s.length!==t);a=!0);}catch(e){c=!0,r=e}finally{try{if(!a&&null!=n.return&&(l=n.return(),Object(l)!==l))return}finally{if(c)throw r}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return y(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)?y(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())[0];l.k.logUserAction({id:o},this.model.get("analyticsOptions"))}}},{key:"viewOptions",value:function(){return{styles:f,showLabel:this.options.showLabel,additionalClassName:this.model.get("isDisabled")?"disabled":"cursor-pointer"}}}]),n}(o.Q.Component),E=function(e){v(n,e);var t=w(n);function n(e){return d(this,n),t.call(this,e)}return b(n,[{key:"name",get:function(){return"VideoActionsComponentCollection"}},{key:"childView",get:function(){return O}},{key:"childViewOptions",get:function(){return{showLabel:this.options.showActionLabels}}}]),n}(o.Q.ComponentCollection),S=n(71641),P=n(48090),j=n(61843),C=n(264),T=n(89707),_=n(26457),x=n(59168),R=n.n(x);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 o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,(void 0,r=function(e,t){if("object"!==D(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!==D(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(o.key),"symbol"===D(r)?r:String(r)),o)}var r}function A(e,t){return A=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},A(e,t)}function N(e){return N=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},N(e)}var V=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)}(p,e);var t,n,a,c,u=(a=p,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=N(a);if(c){var n=N(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===D(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(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),u.call(this,e)}return t=p,(n=[{key:"name",get:function(){return"VideoActionsComponent"}},{key:"template",get:function(){return R()}},{key:"lang",get:function(){return"shared.videoActions"}},{key:"className",get:function(){return f.actions}},{key:"channelName",get:function(){return"".concat(this.name).concat(this.cid)}},{key:"elements",get:function(){return{dropdownToggle:".ui-dropdown-toggle",moreActions:".more-actions-region"}}},{key:"regions",value:function(){return{actions:{el:".actions-region"},moreActions:{el:"@ui.moreActions",replaceElement:!1}}}},{key:"events",value:function(){return{click:"onClick","click @ui.dropdownToggle":"onClickMore","click @ui.moreActions":"onClickMore"}}},{key:"onClick",value:function(e){e.stopPropagation()}},{key:"onClickMore",value:function(){this.renderMoreActions(),this.getUI("dropdownToggle").dropdown("toggle")}},{key:"getActions",value:function(){return new o.Q.Collection([{title:r.T.getPhrase(this.lang,"share"),svg:s.Nj.getSvg(s.vn.Share2),isDisabled:!j.BK.canShareVideo(this.model,this.options.application),tooltipText:j.BK.canShareVideo(this.model,this.options.application)?r.T.getPhrase(this.lang,"share"):j.BK.getSharePermissionsMessage(this.model,this.options.application),appLink:C.g.hasLite?{application:this.options.application,action:P.eX.Shared.SHARE,args:[this.model.get("id")],params:{entityType:"video"}}:{application:this.options.application,action:P.eX.Shared.SHARE_VIDEO,args:[this.model.get("id")]},analyticsOptions:l.k.mergeOptions(this.options.analyticsOptions,{actionType:i.UserAction.Share,eventVersion:i.EventVersion.V3})},{title:r.T.getPhrase(this.lang,"edit"),svg:j.BK.canEditVideo(this.model)?s.Nj.getSvg(s.vn.Edit):s.Nj.getSvg(s.vn.EditClickView),tooltipText:this.getEditTooltip(),appLink:{application:P.OV.LIBRARY_EDITOR,action:P.eX.LibraryEditor.EDIT_VIDEO,args:[this.model.get("id")]},analyticsOptions:l.k.mergeOptions(this.options.analyticsOptions,{actionType:i.UserAction.Edit,workflowPhase:i.WorkflowPhase.Start})}])}},{key:"getEditTooltip",value:function(){return j.BK.canEditVideo(this.model)?r.T.getPhrase(this.lang,"edit"):j.M2.isExchangeVideo(this.model)?r.T.getPhrase(this.lang,"linkedToExchange"):r.T.getPhrase(this.lang,"linkedToCv")}},{key:"getFolderSourceId",value:function(){return this.options.collectionSource===_.x_.Folder?this.options.collectionIdentifier.id:this.model.get("categories").first().get("id")}},{key:"getMoreActions",value:function(){var e=[];this.options.collectionIdentifier&&e.push({title:r.T.getPhrase(this.lang,"move"),appLink:{application:this.options.application,action:P.eX.Shared.MOVE_VIDEOS,args:[this.model.get("id").toString(),this.getFolderSourceId()]},analyticsOptions:l.k.mergeOptions(this.options.analyticsOptions,{actionType:i.UserAction.Move,descriptor:i.OperationDescriptor.Single,workflowPhase:i.WorkflowPhase.Start})}),e.push({title:r.T.getPhrase(this.lang,"manageAccess"),appLink:{application:this.options.application,action:P.eX.Shared.MANAGE_VIDEO_ACCESS,args:[this.model.get("id").toString()]},analyticsOptions:l.k.mergeOptions(this.options.analyticsOptions,{actionType:i.UserAction.SetAccess,workflowPhase:i.WorkflowPhase.Start})}),this.options.application===P.OV.CONTENT_UPDATES&&this.options.customerHasCustomLibrary&&e.push({title:r.T.getPhrase(this.lang,"addToLibrary"),appLink:{application:this.options.application,action:P.eX.ContentUpdates.ADD_TO_LIBRARY,args:[this.model.get("id").toString()]}});var t="videos/".concat(this.model.get("id"));if(e.push({title:r.T.getPhrase(this.lang,"openInStaffView"),href:T.k.getMainProductUrl(this.options.config,t,t),external:!0,icon:s.Nj.getSvg(s.vn.NewWindow),analyticsOptions:l.k.mergeOptions(this.options.analyticsOptions,{actionType:i.UserAction.Click,descriptor:i.ClickDescriptor.OpenInStaffView})}),this.options.application!==P.OV.CONTENT_UPDATES){var n=j.BK.canDownloadVideo(this.model);e.push({title:r.T.getPhrase(this.lang,"download"),disabled:!n,classes:n?"":"".concat(f.disabled),tooltip:n?null:{title:r.T.getPhrase(this.lang,"cannotDownload"),placement:"left"},analyticsOptions:l.k.mergeOptions(this.options.analyticsOptions,{actionType:i.UserAction.Download}),appLink:n?{application:this.options.application,action:P.eX.Shared.DOWNLOAD_VIDEO,args:[this.model.id.toString()]}:null})}return this.options.customerHasExchange&&j.BK.canAddToExchange(this.model)&&!C.g.hasLite&&e.push({title:r.T.getPhrase(this.lang,"addToExchange"),appLink:{application:this.options.application,action:P.eX.LibraryEditor.ADD_TO_EXCHANGE,args:[this.model.get("id").toString()]}}),this.options.customerHasLocalCache&&e.push({title:r.T.getPhrase(this.lang,"localCache"),appLink:{application:this.options.application,action:P.eX.Shared.DOWNLOAD_TO_LOCAL_CACHE,args:[this.model.id.toString()]},analyticsOptions:l.k.mergeOptions(this.options.analyticsOptions,{actionType:i.UserAction.AddToLocalCache})}),this.options.collectionIdentifier&&e.push({title:r.T.getPhrase(this.lang,"remove"),appLink:{application:this.options.application,action:P.eX.Shared.DELETE_VIDEOS,args:[this.getFolderSourceId(),this.model.get("id").toString()],params:{routeToFolderOnDelete:this.options.routeToFolderOnDelete}},classes:"text-danger",analyticsOptions:l.k.mergeOptions(this.options.analyticsOptions,{actionType:i.UserAction.Delete,descriptor:i.OperationDescriptor.Single,workflowPhase:i.WorkflowPhase.Start})}),new o.Q.Collection(e)}},{key:"renderActions",value:function(){this.showChildView("actions",new E({collection:this.getActions(),showActionLabels:this.options.showActionLabels}))}},{key:"renderMoreActions",value:function(){this.moreActionsRendered||(this.moreActionsRendered=!0,this.showChildView("moreActions",new S.w({displayOptions:{alignment:"right"},channelName:this.channelName,collection:this.getMoreActions(),childOptions:{isDisabled:function(){return this.model.get("disabled")},getTooltip:function(){return this.options.model.get("tooltip")}},analyticsHelper:l.k})))}},{key:"viewOptions",value:function(){return{styles:f,moreSvg:s.Nj.getSvg(s.vn.More),showLabel:this.options.showActionLabels}}},{key:"onRender",value:function(){this.moreActionsRendered=!1,this.renderActions()}}])&&L(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),p}(o.Q.Component)},23130:function(e,t,n){"use strict";n.d(t,{Z:function(){return v},t:function(){return r}});var o,r,i=n(31647),l=n(61843),s=n(57857),a=n(58040),c=n.n(a),u={columnNames:"hkjBy",descriptionWrapper:"vGCSU",description:"lM8Hu",ellipsis:"zcKZV",showMoreEllipsis:"mUQy_",singleEllipsis:"sLOGz",showEllipsis:"Dn0yN",hideEllipsis:"Y0fDv",open:"JcPWW",truncateSmall:"FgeiQ",truncateLarge:"x5Rgi"};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 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,m(o.key),o)}}function h(e,t){return h=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},h(e,t)}function y(e){return y=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},y(e)}function d(e,t,n){return(t=m(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function m(e){var t=function(e,t){if("object"!==p(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!==p(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===p(t)?t:String(t)}!function(e){e.Small="sm",e.Large="lg"}(r||(r={}));var b=(d(o={},r.Small,3),d(o,r.Large,5),o),v=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&&h(e,t)}(m,e);var t,n,o,i,a=(o=m,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=y(o);if(i){var n=y(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===p(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(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=a.call(this,e)).showingMore=!1,t}return t=m,(n=[{key:"name",get:function(){return"VideoDescriptionComponent"}},{key:"template",get:function(){return c()}},{key:"lang",get:function(){return"shared.videoDescription"}},{key:"defaults",get:function(){return{size:"sm"}}},{key:"elements",get:function(){return{description:".description-element",ellipsis:this.options.allowExpand?".".concat(u.showMoreEllipsis):".".concat(u.singleEllipsis)}}},{key:"events",value:function(){return d({},"click .".concat(u.showMoreEllipsis),"onClickShowMore")}},{key:"onClickShowMore",value:function(e){e.preventDefault(),this.showingMore?this.showLessDescription():this.showMoreDescription()}},{key:"getDescription",value:function(){return this.options.linkify?l.m$.linkifyText(this.model.get("description")):this.options.highlighter?l.m$.wordsHighlighter(l.m$.escapeExpression(this.model.get("description")),this.model.get("_matchedWords")):void 0}},{key:"getDescriptionElements",value:function(){return{descriptionTextEl:this.getUI("description"),ellipsisEl:this.getUI("ellipsis")}}},{key:"showMoreDescription",value:function(){var e=this.getDescriptionElements(),t=e.descriptionTextEl,n=e.ellipsisEl;t.removeClass(u.truncateLarge).addClass(u.open),n.text(s.T.getPhrase(this.lang,"showLess")),this.showingMore=!0}},{key:"showLessDescription",value:function(){var e,t=this.getDescriptionElements(),n=t.descriptionTextEl,o=t.ellipsisEl;this.options.size===r.Small&&(e="truncateSmall"),this.options.size===r.Large&&(e="truncateLarge"),n.addClass(u[e]),o.text(this.options.allowExpand?"... ".concat(s.T.getPhrase(this.lang,"showMore")):"...").removeClass(u.hideEllipsis).addClass(u.showEllipsis),this.showingMore=!1}},{key:"truncateDescription",value:function(){if(this.options.truncate){var e=this.getDescriptionElements().descriptionTextEl,t=b[this.options.size];e.height()<=21*t||this.showLessDescription()}}},{key:"viewOptions",value:function(){return{styles:u,truncate:this.options.truncate,expandable:this.options.allowExpand,description:this.getDescription()}}},{key:"onAttach",value:function(){this.truncateDescription()}}])&&f(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),m}(i.Q.Component)},37570:function(e,t,n){"use strict";n.d(t,{O:function(){return y}});var o=n(31647),r=n(63791),i=n(61843),l=n(48090),s={svgContainer:"kKrQJ",series:"zJvxj"},a=n(19021),c=n.n(a);function u(e){return u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},u(e)}function 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,(void 0,r=function(e,t){if("object"!==u(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!==u(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(o.key),"symbol"===u(r)?r:String(r)),o)}var r}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){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&&f(e,t)}(d,e);var t,n,o,a,y=(o=d,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=h(o);if(a){var n=h(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===u(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function d(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,d),y.call(this,e)}return t=d,(n=[{key:"defaults",get:function(){return{styleUppercase:!0}}},{key:"name",get:function(){return"VideoItemSeriesComponent"}},{key:"template",get:function(){return c()}},{key:"appLinks",get:function(){return this.options.seriesUrl?{}:{".series-applink":{application:l.OV.LIBRARY_EDITOR,action:l.eX.LibraryEditor.SERIES,args:[this.model.series.get("id")]}}}},{key:"padNumber",value:function(e){if(!e)return null;var t=e.toString(),n=2;if(t.length>=n)return t;for(n-=t.length;n>0;)t="0"+t,n--;return t}},{key:"getSeriesName",value:function(){var e=i.m$.escapeExpression(this.model.series.get("name"));return this.options.highlight?i.m$.wordsHighlighter(e,this.model.get("_matchedWords")):e}},{key:"viewOptions",value:function(){return{styles:s,seasonNumber:this.padNumber(this.model.season&&this.model.season.get("number")),episodeNumber:this.padNumber(this.model.get("episodeNumber")),seriesName:this.getSeriesName(),seriesUrl:this.options.seriesUrl,externalSvg:r.Nj.getSvg(r.vn.NewWindow),styleUppercase:this.options.styleUppercase}}},{key:"onBeforeRender",value:function(){return this.model.series&&!!this.model.series.get("id")}}])&&p(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),d}(o.Q.Component)},7427:function(e,t,n){"use strict";n.d(t,{V:function(){return y}});var o=n(31647),r=n(48090),i=n(61843),l=n(25205),s=n.n(l),a={sourceLabel:"TczXY"};function c(e){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},c(e)}function u(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,p(o.key),o)}}function p(e){var t=function(e,t){if("object"!==c(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!==c(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===c(t)?t:String(t)}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){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&&f(e,t)}(d,e);var t,n,o,l,y=(o=d,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=h(o);if(l){var n=h(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===c(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)}(this,e)});function d(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,d),y.call(this,e)}return t=d,(n=[{key:"name",get:function(){return"VideoSourcesMetadataComponent"}},{key:"template",get:function(){return s()}},{key:"lang",get:function(){return"shared.videoSourcesMetadata"}},{key:"defaults",get:function(){return{showFolder:!1,highlight:!1}}},{key:"appLinks",get:function(){var e;return this.options.showFolder&&(null===(e=this.folders)||void 0===e?void 0:e.length)?this.folders.reduce((function(e,t){return e[".applink-folder-".concat(t.get("id"))]={application:r.OV.LIBRARY_EDITOR,action:r.eX.LibraryEditor.FOLDER,args:[t.get("id")]},e}),{}):{}}},{key:"events",value:function(){var e,t,n,o=Object.keys(this.appLinks),r=(e={},n="onClick",(t=p(t="click .".concat(a.sourceLabel)))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e);return o.forEach((function(e){r["click ".concat(e)]="onClick"})),r}},{key:"onClick",value:function(e){e.stopPropagation()}},{key:"getFolderLinks",value:function(){var e,t=this;if(null===(e=this.folders)||void 0===e?void 0:e.length){var n={};return this.folders.forEach((function(e){var o=t.options.highlight?i.m$.wordsHighlighter(i.m$.escapeExpression(e.get("name")),t.model.get("_matchedWords")):i.m$.escapeExpression(e.get("name"));n[e.get("id")]=o})),Object.keys(n).map((function(e){return'<a class="info-link applink-folder-'.concat(e,'">').concat(n[e],"</a>")})).join(", ")}}},{key:"getCustomLibraryFolders",value:function(){var e;if(!(null===(e=this.model)||void 0===e?void 0:e.categories)||!this.options.libraries)return[];var t=this.options.libraries.reduce((function(e,t){return e[t.id]=!0,e}),{});return this.model.categories.filter((function(e){var n=e.libraries.first().get("id");return t[n]}))}},{key:"onBeforeRender",value:function(){var e;return this.folders||(this.folders=this.getCustomLibraryFolders()),this.options.showFolder&&!!(null===(e=this.folders)||void 0===e?void 0:e.length)}},{key:"viewOptions",value:function(){return{styles:a,folderCount:this.folders.length,folders:this.options.showFolder&&this.getFolderLinks(),hideLabel:this.options.hideLabel}}}])&&u(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),d}(o.Q.Component)},61356:function(e,t,n){"use strict";n.d(t,{c:function(){return O}});var o=n(39479),r=n(48088),i=n(31647),l=n(70065),s=n(52076),a=n(88483),c=n(2772),u=n(10101),p=n(61843),f=n(48090),h=n(89167),y=n(37339),d=n.n(y),m=n(264),b=n(42672);function v(e){return v="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},v(e)}function g(e,t){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,(void 0,r=function(e,t){if("object"!==v(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!==v(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(o.key),"symbol"===v(r)?r:String(r)),o)}var r}function w(e,t){return w=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},w(e,t)}function k(e){return k=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},k(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&&w(e,t)}(E,e);var t,n,i,y,O=(i=E,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=k(i);if(y){var n=k(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===v(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)}(this,e)});function E(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,E),(t=O.call(this,e))._viewKeyRequested=!1,t}return t=E,(n=[{key:"initialize",value:function(){this.bindListeners()}},{key:"name",get:function(){return"VideoPreviewComponent"}},{key:"template",get:function(){return d()}},{key:"instanceChannelName",get:function(){return p.N0.generateUniqueChannelName(this)}},{key:"defaults",get:function(){return{captureAnalytics:!0}}},{key:"behaviors",get:function(){var e=this;return[{behaviorClass:u.Im,selector:".lazy-img",callback:function(){r.Radio.channel(e.instanceChannelName).trigger("show:play:icon")},minBrowserSupportVersion:f.v9}]}},{key:"regions",value:function(){return{player:{el:".video-player-region",replaceElement:!1},thumbnail:{el:".thumbnail-region",replaceElement:!0}}}},{key:"events",value:function(){return{click:"onClick"}}},{key:"bindListeners",value:function(){this.options.channelName&&this.listenTo(this.options.channelName,"update:chapter:time",this.onUpdateWebplayer)}},{key:"onUpdateWebplayer",value:function(e){return m.g.hasLite?this.playerViewKey?this.player?void this.seekToChapter(e):(this.listenToOnce(this.options.channelName,"player:loaded",o.bind(this.seekToChapter,this,e)),void this.renderVideoPreview()):(this.listenToOnce(this.options.channelName,"player:loaded",o.bind(this.seekToChapter,this,e)),void this.requestViewKey()):this.webPlayer?void this.seekToChapter(e):(this.listenToOnce(this.options.channelName,"webplayer:loaded",o.bind(this.seekToChapter,this,e)),void this.renderVideoPreview())}},{key:"seekToChapter",value:function(e){this.player?this.player.currentTime(e):this.webPlayer.seekTo(e)}},{key:"requestViewKey",value:function(){var e=this;this.playerViewKey||this._viewKeyRequested||(this._viewKeyRequested=!0,this.options.createViewKey(this.model.get("id"),(function(t){e.playerViewKey=t,e.renderVideoPreview()})))}},{key:"onClick",value:function(){this.model.get("id")&&(m.g.hasLite?this.requestViewKey():this.webPlayer||this.renderVideoPreview())}},{key:"renderThumbnail",value:function(){this.showChildView("thumbnail",new c.Z({model:this.model,thumbnailOptions:{size:a.h2.Medium},playIcon:!0,lazyload:!0,channelName:this.instanceChannelName}))}},{key:"renderVideoPreview",value:function(){if(this.playerViewKey)return this.player=new b.l({model:this.playerViewKey,playerApiUrl:this.options.playerApiUrl,channelName:this.options.channelName}),void this.showChildView("player",this.player);this.webPlayer=new h.Q({model:this.model,webPlayerUrl:this.options.webPlayerUrl,parentChannelName:this.options.channelName,autoplay:!0,analyticsOptions:s.k.mergeOptions(this.options.analyticsOptions,{entity:l.EntityType.Video}),captureAnalytics:this.options.captureAnalytics,currentUser:this.options.currentUser}),this.showChildView("player",this.webPlayer)}},{key:"onRender",value:function(){this.playerViewKey?this.renderVideoPreview():this.renderThumbnail()}}])&&g(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),E}(i.Q.Component)},15564:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({1:function(e,t,n,o,r){return'<span class="close cursor-pointer" aria-hidden="true">&times;</span>\n'},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,r){e.propertyIsEnumerable;var i,l,s=null!=t?t:e.nullContext||{},a=e.hooks.helperMissing,c="function",u=e.escapeExpression;return'<span class="clamp-1" title="'+u(typeof(l=null!=(l=n.name||(null!=t?t.name:t))?l:a)===c?l.call(s,{name:"name",hash:{},data:r}):l)+'">'+u(typeof(l=null!=(l=n.name||(null!=t?t.name:t))?l:a)===c?l.call(s,{name:"name",hash:{},data:r}):l)+"</span>\n"+(null!=(i=n.if.call(s,null!=(i=null!=t?t.options:t)?i.removable:i,{name:"if",hash:{},fn:e.program(1,r,0),inverse:e.noop,data:r}))?i:"")},useData:!0})},37106: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("function"==typeof(i=null!=(i=n.title||(null!=t?t.title:t))?i:e.hooks.helperMissing)?i.call(null!=t?t:e.nullContext||{},{name:"title",hash:{},data:r}):i)},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,r){e.propertyIsEnumerable;var i,l,s=e.lambda,a=e.escapeExpression,c=null!=t?t:e.nullContext||{};return' <span class="d-inline-block align-middle '+a(s(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.svgContainer:i,t))+" "+a(s(null!=(i=null!=t?t.options:t)?i.additionalClassName:i,t))+'">'+(null!=(i="function"==typeof(l=null!=(l=n.svg||(null!=t?t.svg:t))?l:e.hooks.helperMissing)?l.call(c,{name:"svg",hash:{},data:r}):l)?i:"")+"</span>\n"+(null!=(i=n.if.call(c,null!=(i=null!=t?t.options:t)?i.showLabel:i,{name:"if",hash:{},fn:e.program(1,r,0),inverse:e.noop,data:r}))?i:"")},useData:!0})},59168:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({1:function(e,t,n,o,r){return"btn btn-outline-dark px-0 ml-2"},3: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.moreSvgContainer:i,t))},5: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.svgContainer:i,t))+" align-middle"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,r){e.propertyIsEnumerable;var i,l=null!=t?t:e.nullContext||{};return'<div class="actions-region d-inline-block"></div><span class="position-relative d-inline-block dropdown">\n <span\n data-toggle="dropdown"\n aria-haspopup="true"\n aria-expanded="false"\n class="'+(null!=(i=n.if.call(l,null!=(i=null!=t?t.options:t)?i.showLabel:i,{name:"if",hash:{},fn:e.program(1,r,0),inverse:e.noop,data:r}))?i:"")+' ui-dropdown-toggle"\n >\n <span class="ui-more d-inline-block '+(null!=(i=n.if.call(l,null!=(i=null!=t?t.options:t)?i.showLabel:i,{name:"if",hash:{},fn:e.program(3,r,0),inverse:e.program(5,r,0),data:r}))?i:"")+' cursor-pointer">'+(null!=(i=e.lambda(null!=(i=null!=t?t.options:t)?i.moreSvg:i,t))?i:"")+'</span>\n </span>\n <div class="more-actions-region"></div>\n</span>\n'},useData:!0})},58040: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=e.lambda,s=e.escapeExpression;return' <div class="'+s(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.descriptionWrapper:i,t))+'">\n <p class="description-element '+s(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.description:i,t))+'">'+(null!=(i=n.if.call(null!=t?t:e.nullContext||{},null!=(i=null!=t?t.options:t)?i.expandable:i,{name:"if",hash:{},fn:e.program(2,r,0),inverse:e.program(4,r,0),data:r}))?i:"")+"</p>\n </div>\n"},2:function(e,t,n,o,r){e.propertyIsEnumerable;var i,l=e.lambda,s=e.escapeExpression;return(null!=(i=l(null!=(i=null!=t?t.options:t)?i.description:i,t))?i:"")+'<span class="'+s(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.showMoreEllipsis:i,t))+" "+s(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.hideEllipsis:i,t))+'">... '+s((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"showMore",{name:"lang",hash:{},data:r}))+"</span>"},4:function(e,t,n,o,r){e.propertyIsEnumerable;var i,l=e.lambda,s=e.escapeExpression;return(null!=(i=l(null!=(i=null!=t?t.options:t)?i.description:i,t))?i:"")+'<span class="'+s(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.singleEllipsis:i,t))+" "+s(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.hideEllipsis:i,t))+'">...</span>'},6:function(e,t,n,o,r){e.propertyIsEnumerable;var i,l=e.lambda;return' <p class="'+e.escapeExpression(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.description:i,t))+'">'+(null!=(i=l(null!=(i=null!=t?t.options:t)?i.description:i,t))?i:"")+"</p>\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.truncate:i,{name:"if",hash:{},fn:e.program(1,r,0),inverse:e.program(6,r,0),data:r}))?i:""},useData:!0})},19021: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.series:i,t))},3:function(e,t,n,o,r){var i;return e.propertyIsEnumerable,'href="'+e.escapeExpression(e.lambda(null!=(i=null!=t?t.options:t)?i.seriesUrl:i,t))+'" target="_blank"'},5: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.seasonNumber:i,{name:"if",hash:{},fn:e.program(6,r,0),inverse:e.noop,data:r}))?i:"")+" E"+e.escapeExpression(e.lambda(null!=(i=null!=t?t.options:t)?i.episodeNumber:i,t))+"\n"},6:function(e,t,n,o,r){var i;return e.propertyIsEnumerable,"&nbsp;S"+e.escapeExpression(e.lambda(null!=(i=null!=t?t.options:t)?i.seasonNumber:i,t))+" &bull;"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,r){e.propertyIsEnumerable;var i,l=null!=t?t:e.nullContext||{};return'<a class="series-applink text-reset '+(null!=(i=n.if.call(l,null!=(i=null!=t?t.options:t)?i.styleUppercase:i,{name:"if",hash:{},fn:e.program(1,r,0),inverse:e.noop,data:r}))?i:"")+'" '+(null!=(i=n.if.call(l,null!=(i=null!=t?t.options:t)?i.seriesUrl:i,{name:"if",hash:{},fn:e.program(3,r,0),inverse:e.noop,data:r}))?i:"")+">\n "+(null!=(i=e.lambda(null!=(i=null!=t?t.options:t)?i.seriesName:i,t))?i:"")+(null!=(i=n.if.call(l,null!=(i=null!=t?t.options:t)?i.episodeNumber:i,{name:"if",hash:{},fn:e.program(5,r,0),inverse:e.noop,data:r}))?i:"")+"</a>"},useData:!0})},25205: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=e.escapeExpression;return'<span class="'+l(e.lambda(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.sourceLabel:i,t))+'">'+l((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"folder",{name:"lang",hash:{smartCount:null!=(i=null!=t?t.options:t)?i.folderCount:i},data:r}))+"</span>\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,r){var i;return e.propertyIsEnumerable,(null!=(i=n.unless.call(null!=t?t:e.nullContext||{},null!=(i=null!=t?t.options:t)?i.hideLabel:i,{name:"unless",hash:{},fn:e.program(1,r,0),inverse:e.noop,data:r}))?i:"")+(null!=(i=e.lambda(null!=(i=null!=t?t.options:t)?i.folders:i,t))?i:"")},useData:!0})},37339:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({1:function(e,t,n,o,r){return"cursor-pointer "},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,r){var i;return e.propertyIsEnumerable,'<div class="video-player-region '+(null!=(i=n.if.call(null!=t?t:e.nullContext||{},null!=t?t.id:t,{name:"if",hash:{},fn:e.program(1,r,0),inverse:e.noop,data:r}))?i:"")+'responsize-img">\n <div class="thumbnail-region"></div>\n</div>'},useData:!0})}}]);
1
+ (self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[1364],{44391:function(e,t,n){"use strict";n.d(t,{K:function(){return g}});var o=n(31647),r=n(11306),i=n(48088),l=n(48090),s=n(26457),a=n(15564),c=n.n(a);function u(e){return u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},u(e)}function 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,(void 0,r=function(e,t){if("object"!==u(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!==u(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(o.key),"symbol"===u(r)?r:String(r)),o)}var r}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){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&&f(e,t)}(y,e);var t,n,o,r,a=(o=y,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=h(o);if(r){var n=h(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===u(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function y(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,y),a.call(this,e)}return t=y,(n=[{key:"name",get:function(){return"TagItemComponent"}},{key:"tagName",get:function(){return this.options.behavior===s.Dm.Link?"a":"span"}},{key:"className",get:function(){var e="".concat(this.options.orientation===s.zM.Vertical?"":" d-inline-flex"),t="".concat(this.isSaving()?" saving":""),n="".concat(this.options.behavior===s.Dm.Disabled?" ".concat("dE3WC"):""),o="".concat(this.options.behavior===s.Dm.Filter?" cursor-pointer":"");return"badge-pill tag py-1 px-2 my-1 mr-1".concat(o).concat(e).concat(t).concat(n)}},{key:"template",get:function(){return c()}},{key:"elements",get:function(){return{close:".close"}}},{key:"appLinks",get:function(){return this.options.behavior!==s.Dm.Link?{}:{"[this]":{application:l.OV.SEARCH,action:l.eX.Search.HOME,params:{tag:this.model.get("name")}}}}},{key:"defaults",get:function(){return{behavior:s.Dm.Link,orientation:s.zM.Flex}}},{key:"events",value:function(){return this.options.removeEvent?{"click @ui.close":"onRemoveTag"}:{click:"onClickTag"}}},{key:"initialize",value:function(){this.options.behavior===s.Dm.Edit&&this.listenTo(this.model,"change",this.render)}},{key:"isSaving",value:function(){if(this.options.behavior!==s.Dm.Filter){var e=this.model.pick("id","name","remove"),t=e.id,n=e.name;return!!e.remove||!t||!n}}},{key:"onRemoveTag",value:function(e){if(e.stopPropagation(),!this.isSaving())return this.model.set("remove",!0),i.Radio.channel(this.options.channelName).trigger(this.options.removeEvent,this.model),!1}},{key:"onClickTag",value:function(){this.options.behavior!==s.Dm.Filter||this.options.removeEvent||i.Radio.channel(this.options.channelName).trigger(this.options.clickEvent,this.model)}},{key:"viewOptions",value:function(){return{removable:this.options.removeEvent}}},{key:"onRender",value:function(){this.resetClassName()}}])&&p(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),y}(o.Q.Component);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 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,(void 0,r=function(e,t){if("object"!==d(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!==d(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(o.key),"symbol"===d(r)?r:String(r)),o)}var r}function b(e,t){return b=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},b(e,t)}function v(e){return v=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},v(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&&b(e,t)}(c,e);var t,n,i,l,a=(i=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=v(i);if(l){var n=v(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===d(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(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.options.behavior!==s.Dm.Edit||this.options.removeEvent||o.Q.ErrorHelper.throw(new r.H("removeEvent is required to edit tags."))}},{key:"name",get:function(){return"TagComponentCollection"}},{key:"defaults",get:function(){return{orientation:s.zM.Flex}}},{key:"className",get:function(){var e="".concat(this.options.orientation===s.zM.Vertical?" d-flex align-items-start flex-column":"");return"tags".concat(e)}},{key:"childViewOptions",get:function(){return{channelName:this.options.channelName,behavior:this.options.behavior,orientation:this.options.orientation,removeEvent:this.options.removeEvent,clickEvent:this.options.clickEvent}}},{key:"childView",get:function(){return y}}])&&m(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),c}(o.Q.ComponentCollection)},71641:function(e,t,n){"use strict";n.d(t,{w:function(){return u}});var o=n(39479),r=n(31647),i=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 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,(void 0,r=function(e,t){if("object"!==l(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!==l(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(o.key),"symbol"===l(r)?r:String(r)),o)}var r}function a(e,t){return a=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},a(e,t)}function c(e){return c=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},c(e)}var u=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)}(f,e);var t,n,r,u,p=(r=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=c(r);if(u){var n=c(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(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)}(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:"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}),f}(r.Q.ComponentCollection)},66882:function(e,t,n){"use strict";n.d(t,{R:function(){return V}});var o=n(31647),r=n(57857),i=n(70065),l=n(52076),s=n(63791),a=n(39479),c=n(56210),u=n(37106),p=n.n(u),f={actions:"VXWM3",svgContainer:"etJKo",moreSvgContainer:"kwNUa",actionName:"gbBGB",disabled:"Ykm_2",iconButton:"xqFbC"};function h(e){return h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},h(e)}function y(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}function d(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}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,(void 0,r=function(e,t){if("object"!==h(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!==h(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(o.key),"symbol"===h(r)?r:String(r)),o)}var r}function b(e,t,n){return t&&m(e.prototype,t),n&&m(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function v(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&g(e,t)}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){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=k(e);if(t){var r=k(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return function(e,t){if(t&&("object"===h(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,n)}}function k(e){return k=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},k(e)}var O=function(e){v(n,e);var t=w(n);function n(e){return d(this,n),t.call(this,e)}return b(n,[{key:"name",get:function(){return"VideoActionItemComponent"}},{key:"template",get:function(){return p()}},{key:"tagName",get:function(){return"a"}},{key:"attributes",get:function(){if(!this.model.get("href"))return{}}},{key:"className",get:function(){var e="cursor-pointer";return this.options.showLabel?e+=" ".concat(f.iconButton," btn btn-outline-dark ml-2"):e+=" d-inline-block px-1 no-decoration",this.model.get("isDisabled")&&(e+=" ".concat(f.disabled)),e}},{key:"events",value:function(){return{click:"onClick"}}},{key:"behaviors",get:function(){var e=(!this.options.showLabel||this.options.model.get("isDisabled"))&&this.options.model.get("tooltipText");if(e)return[{behaviorClass:c.H,title:e}]}},{key:"appLinks",get:function(){return!this.model.get("appLink")||this.model.get("isDisabled")?{}:{"[this]":this.model.get("appLink")}}},{key:"onClick",value:function(){this.logAction()}},{key:"logAction",value:function(){var e,t,n=this.model.get("appLink");if(a.isObject(n)){var o=(e=n.args,t=1,function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var o,r,i,l,s=[],a=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;a=!1}else for(;!(a=(o=i.call(n)).done)&&(s.push(o.value),s.length!==t);a=!0);}catch(e){c=!0,r=e}finally{try{if(!a&&null!=n.return&&(l=n.return(),Object(l)!==l))return}finally{if(c)throw r}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return y(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)?y(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())[0];l.k.logUserAction({id:o},this.model.get("analyticsOptions"))}}},{key:"viewOptions",value:function(){return{styles:f,showLabel:this.options.showLabel,additionalClassName:this.model.get("isDisabled")?"disabled":"cursor-pointer"}}}]),n}(o.Q.Component),E=function(e){v(n,e);var t=w(n);function n(e){return d(this,n),t.call(this,e)}return b(n,[{key:"name",get:function(){return"VideoActionsComponentCollection"}},{key:"childView",get:function(){return O}},{key:"childViewOptions",get:function(){return{showLabel:this.options.showActionLabels}}}]),n}(o.Q.ComponentCollection),S=n(71641),P=n(48090),j=n(61843),C=n(264),T=n(89707),_=n(26457),x=n(59168),R=n.n(x);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 o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,(void 0,r=function(e,t){if("object"!==D(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!==D(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(o.key),"symbol"===D(r)?r:String(r)),o)}var r}function A(e,t){return A=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},A(e,t)}function N(e){return N=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},N(e)}var V=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)}(p,e);var t,n,a,c,u=(a=p,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=N(a);if(c){var n=N(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===D(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(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),u.call(this,e)}return t=p,(n=[{key:"name",get:function(){return"VideoActionsComponent"}},{key:"template",get:function(){return R()}},{key:"lang",get:function(){return"shared.videoActions"}},{key:"className",get:function(){return f.actions}},{key:"channelName",get:function(){return"".concat(this.name).concat(this.cid)}},{key:"elements",get:function(){return{dropdownToggle:".ui-dropdown-toggle",moreActions:".more-actions-region"}}},{key:"regions",value:function(){return{actions:{el:".actions-region"},moreActions:{el:"@ui.moreActions",replaceElement:!1}}}},{key:"events",value:function(){return{click:"onClick","click @ui.dropdownToggle":"onClickMore","click @ui.moreActions":"onClickMore"}}},{key:"onClick",value:function(e){e.stopPropagation()}},{key:"onClickMore",value:function(){this.renderMoreActions(),this.getUI("dropdownToggle").dropdown("toggle")}},{key:"getActions",value:function(){return new o.Q.Collection([{title:r.T.getPhrase(this.lang,"share"),svg:s.Nj.getSvg(s.vn.Share2),isDisabled:!j.BK.canShareVideo(this.model,this.options.application),tooltipText:j.BK.canShareVideo(this.model,this.options.application)?r.T.getPhrase(this.lang,"share"):j.BK.getSharePermissionsMessage(this.model,this.options.application),appLink:C.g.hasLite?{application:this.options.application,action:P.eX.Shared.SHARE,args:[this.model.get("id")],params:{entityType:"video"}}:{application:this.options.application,action:P.eX.Shared.SHARE_VIDEO,args:[this.model.get("id")]},analyticsOptions:l.k.mergeOptions(this.options.analyticsOptions,{actionType:i.UserAction.Share,eventVersion:i.EventVersion.V3})},{title:r.T.getPhrase(this.lang,"edit"),svg:j.BK.canEditVideo(this.model)?s.Nj.getSvg(s.vn.Edit):s.Nj.getSvg(s.vn.EditClickView),tooltipText:this.getEditTooltip(),appLink:{application:P.OV.LIBRARY_EDITOR,action:P.eX.LibraryEditor.EDIT_VIDEO,args:[this.model.get("id")]},analyticsOptions:l.k.mergeOptions(this.options.analyticsOptions,{actionType:i.UserAction.Edit,workflowPhase:i.WorkflowPhase.Start})}])}},{key:"getEditTooltip",value:function(){return j.BK.canEditVideo(this.model)?r.T.getPhrase(this.lang,"edit"):j.M2.isExchangeVideo(this.model)?r.T.getPhrase(this.lang,"linkedToExchange"):r.T.getPhrase(this.lang,"linkedToCv")}},{key:"getFolderSourceId",value:function(){return this.options.collectionSource===_.x_.Folder?this.options.collectionIdentifier.id:this.model.get("categories").first().get("id")}},{key:"getMoreActions",value:function(){var e=[];this.options.collectionIdentifier&&e.push({title:r.T.getPhrase(this.lang,"move"),appLink:{application:this.options.application,action:P.eX.Shared.MOVE_VIDEOS,args:[this.model.get("id").toString(),this.getFolderSourceId()]},analyticsOptions:l.k.mergeOptions(this.options.analyticsOptions,{actionType:i.UserAction.Move,descriptor:i.OperationDescriptor.Single,workflowPhase:i.WorkflowPhase.Start})}),e.push({title:r.T.getPhrase(this.lang,"manageAccess"),appLink:{application:this.options.application,action:P.eX.Shared.MANAGE_VIDEO_ACCESS,args:[this.model.get("id").toString()]},analyticsOptions:l.k.mergeOptions(this.options.analyticsOptions,{actionType:i.UserAction.SetAccess,workflowPhase:i.WorkflowPhase.Start})}),this.options.application===P.OV.CONTENT_UPDATES&&this.options.customerHasCustomLibrary&&e.push({title:r.T.getPhrase(this.lang,"addToLibrary"),appLink:{application:this.options.application,action:P.eX.ContentUpdates.ADD_TO_LIBRARY,args:[this.model.get("id").toString()]}});var t="videos/".concat(this.model.get("id"));if(e.push({title:r.T.getPhrase(this.lang,"openInStaffView"),href:T.k.getMainProductUrl(this.options.config,t,t),external:!0,icon:s.Nj.getSvg(s.vn.NewWindow),analyticsOptions:l.k.mergeOptions(this.options.analyticsOptions,{actionType:i.UserAction.Click,descriptor:i.ClickDescriptor.OpenInStaffView})}),this.options.application!==P.OV.CONTENT_UPDATES){var n=j.BK.canDownloadVideo(this.model);e.push({title:r.T.getPhrase(this.lang,"download"),disabled:!n,classes:n?"":"".concat(f.disabled),tooltip:n?null:{title:r.T.getPhrase(this.lang,"cannotDownload"),placement:"left"},analyticsOptions:l.k.mergeOptions(this.options.analyticsOptions,{actionType:i.UserAction.Download}),appLink:n?{application:this.options.application,action:P.eX.Shared.DOWNLOAD_VIDEO,args:[this.model.id.toString()]}:null})}return this.options.customerHasExchange&&j.BK.canAddToExchange(this.model)&&!C.g.hasLite&&e.push({title:r.T.getPhrase(this.lang,"addToExchange"),appLink:{application:this.options.application,action:P.eX.LibraryEditor.ADD_TO_EXCHANGE,args:[this.model.get("id").toString()]}}),this.options.customerHasLocalCache&&e.push({title:r.T.getPhrase(this.lang,"localCache"),appLink:{application:this.options.application,action:P.eX.Shared.DOWNLOAD_TO_LOCAL_CACHE,args:[this.model.id.toString()]},analyticsOptions:l.k.mergeOptions(this.options.analyticsOptions,{actionType:i.UserAction.AddToLocalCache})}),this.options.collectionIdentifier&&e.push({title:r.T.getPhrase(this.lang,"remove"),appLink:{application:this.options.application,action:P.eX.Shared.DELETE_VIDEOS,args:[this.getFolderSourceId(),this.model.get("id").toString()],params:{routeToFolderOnDelete:this.options.routeToFolderOnDelete}},classes:"text-danger",analyticsOptions:l.k.mergeOptions(this.options.analyticsOptions,{actionType:i.UserAction.Delete,descriptor:i.OperationDescriptor.Single,workflowPhase:i.WorkflowPhase.Start})}),new o.Q.Collection(e)}},{key:"renderActions",value:function(){this.showChildView("actions",new E({collection:this.getActions(),showActionLabels:this.options.showActionLabels}))}},{key:"renderMoreActions",value:function(){this.moreActionsRendered||(this.moreActionsRendered=!0,this.showChildView("moreActions",new S.w({displayOptions:{alignment:"right"},channelName:this.channelName,collection:this.getMoreActions(),childOptions:{isDisabled:function(){return this.model.get("disabled")},getTooltip:function(){return this.options.model.get("tooltip")}},analyticsHelper:l.k})))}},{key:"viewOptions",value:function(){return{styles:f,moreSvg:s.Nj.getSvg(s.vn.More),showLabel:this.options.showActionLabels}}},{key:"onRender",value:function(){this.moreActionsRendered=!1,this.renderActions()}}])&&L(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),p}(o.Q.Component)},23130:function(e,t,n){"use strict";n.d(t,{Z:function(){return v},t:function(){return r}});var o,r,i=n(31647),l=n(61843),s=n(57857),a=n(58040),c=n.n(a),u={columnNames:"hkjBy",descriptionWrapper:"vGCSU",description:"lM8Hu",ellipsis:"zcKZV",showMoreEllipsis:"mUQy_",singleEllipsis:"sLOGz",showEllipsis:"Dn0yN",hideEllipsis:"Y0fDv",open:"JcPWW",truncateSmall:"FgeiQ",truncateLarge:"x5Rgi"};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 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,m(o.key),o)}}function h(e,t){return h=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},h(e,t)}function y(e){return y=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},y(e)}function d(e,t,n){return(t=m(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function m(e){var t=function(e,t){if("object"!==p(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!==p(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===p(t)?t:String(t)}!function(e){e.Small="sm",e.Large="lg"}(r||(r={}));var b=(d(o={},r.Small,3),d(o,r.Large,5),o),v=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&&h(e,t)}(m,e);var t,n,o,i,a=(o=m,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=y(o);if(i){var n=y(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===p(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(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=a.call(this,e)).showingMore=!1,t}return t=m,(n=[{key:"name",get:function(){return"VideoDescriptionComponent"}},{key:"template",get:function(){return c()}},{key:"lang",get:function(){return"shared.videoDescription"}},{key:"defaults",get:function(){return{size:"sm"}}},{key:"elements",get:function(){return{description:".description-element",ellipsis:this.options.allowExpand?".".concat(u.showMoreEllipsis):".".concat(u.singleEllipsis)}}},{key:"events",value:function(){return d({},"click .".concat(u.showMoreEllipsis),"onClickShowMore")}},{key:"onClickShowMore",value:function(e){e.preventDefault(),this.showingMore?this.showLessDescription():this.showMoreDescription()}},{key:"getDescription",value:function(){return this.options.linkify?l.m$.linkifyText(this.model.get("description")):this.options.highlighter?l.m$.wordsHighlighter(l.m$.escapeExpression(this.model.get("description")),this.model.get("_matchedWords")):void 0}},{key:"getDescriptionElements",value:function(){return{descriptionTextEl:this.getUI("description"),ellipsisEl:this.getUI("ellipsis")}}},{key:"showMoreDescription",value:function(){var e=this.getDescriptionElements(),t=e.descriptionTextEl,n=e.ellipsisEl;t.removeClass(u.truncateLarge).addClass(u.open),n.text(s.T.getPhrase(this.lang,"showLess")),this.showingMore=!0}},{key:"showLessDescription",value:function(){var e,t=this.getDescriptionElements(),n=t.descriptionTextEl,o=t.ellipsisEl;this.options.size===r.Small&&(e="truncateSmall"),this.options.size===r.Large&&(e="truncateLarge"),n.addClass(u[e]),o.text(this.options.allowExpand?"... ".concat(s.T.getPhrase(this.lang,"showMore")):"...").removeClass(u.hideEllipsis).addClass(u.showEllipsis),this.showingMore=!1}},{key:"truncateDescription",value:function(){if(this.options.truncate){var e=this.getDescriptionElements().descriptionTextEl,t=b[this.options.size];e.height()<=21*t||this.showLessDescription()}}},{key:"viewOptions",value:function(){return{styles:u,truncate:this.options.truncate,expandable:this.options.allowExpand,description:this.getDescription()}}},{key:"onAttach",value:function(){this.truncateDescription()}}])&&f(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),m}(i.Q.Component)},37570:function(e,t,n){"use strict";n.d(t,{O:function(){return y}});var o=n(31647),r=n(63791),i=n(61843),l=n(48090),s={svgContainer:"kKrQJ",series:"zJvxj"},a=n(19021),c=n.n(a);function u(e){return u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},u(e)}function 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,(void 0,r=function(e,t){if("object"!==u(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!==u(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(o.key),"symbol"===u(r)?r:String(r)),o)}var r}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){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&&f(e,t)}(d,e);var t,n,o,a,y=(o=d,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=h(o);if(a){var n=h(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===u(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function d(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,d),y.call(this,e)}return t=d,(n=[{key:"defaults",get:function(){return{styleUppercase:!0}}},{key:"name",get:function(){return"VideoItemSeriesComponent"}},{key:"template",get:function(){return c()}},{key:"appLinks",get:function(){return this.options.seriesUrl?{}:{".series-applink":{application:l.OV.LIBRARY_EDITOR,action:l.eX.LibraryEditor.SERIES,args:[this.model.series.get("id")]}}}},{key:"padNumber",value:function(e){if(!e)return null;var t=e.toString(),n=2;if(t.length>=n)return t;for(n-=t.length;n>0;)t="0"+t,n--;return t}},{key:"getSeriesName",value:function(){var e=i.m$.escapeExpression(this.model.series.get("name"));return this.options.highlight?i.m$.wordsHighlighter(e,this.model.get("_matchedWords")):e}},{key:"viewOptions",value:function(){return{styles:s,seasonNumber:this.padNumber(this.model.season&&this.model.season.get("number")),episodeNumber:this.padNumber(this.model.get("episodeNumber")),seriesName:this.getSeriesName(),seriesUrl:this.options.seriesUrl,externalSvg:r.Nj.getSvg(r.vn.NewWindow),styleUppercase:this.options.styleUppercase}}},{key:"onBeforeRender",value:function(){return this.model.series&&!!this.model.series.get("id")}}])&&p(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),d}(o.Q.Component)},7427:function(e,t,n){"use strict";n.d(t,{V:function(){return y}});var o=n(31647),r=n(48090),i=n(61843),l=n(25205),s=n.n(l),a={sourceLabel:"TczXY"};function c(e){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},c(e)}function u(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,p(o.key),o)}}function p(e){var t=function(e,t){if("object"!==c(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!==c(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===c(t)?t:String(t)}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){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&&f(e,t)}(d,e);var t,n,o,l,y=(o=d,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=h(o);if(l){var n=h(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===c(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)}(this,e)});function d(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,d),y.call(this,e)}return t=d,(n=[{key:"name",get:function(){return"VideoSourcesMetadataComponent"}},{key:"template",get:function(){return s()}},{key:"lang",get:function(){return"shared.videoSourcesMetadata"}},{key:"defaults",get:function(){return{showFolder:!1,highlight:!1}}},{key:"appLinks",get:function(){var e;return this.options.showFolder&&(null===(e=this.folders)||void 0===e?void 0:e.length)?this.folders.reduce((function(e,t){return e[".applink-folder-".concat(t.get("id"))]={application:r.OV.LIBRARY_EDITOR,action:r.eX.LibraryEditor.FOLDER,args:[t.get("id")]},e}),{}):{}}},{key:"events",value:function(){var e,t,n,o=Object.keys(this.appLinks),r=(e={},n="onClick",(t=p(t="click .".concat(a.sourceLabel)))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e);return o.forEach((function(e){r["click ".concat(e)]="onClick"})),r}},{key:"onClick",value:function(e){e.stopPropagation()}},{key:"getFolderLinks",value:function(){var e,t=this;if(null===(e=this.folders)||void 0===e?void 0:e.length){var n={};return this.folders.forEach((function(e){var o=t.options.highlight?i.m$.wordsHighlighter(i.m$.escapeExpression(e.get("name")),t.model.get("_matchedWords")):i.m$.escapeExpression(e.get("name"));n[e.get("id")]=o})),Object.keys(n).map((function(e){return'<a class="info-link applink-folder-'.concat(e,'">').concat(n[e],"</a>")})).join(", ")}}},{key:"getCustomLibraryFolders",value:function(){var e;if(!(null===(e=this.model)||void 0===e?void 0:e.categories)||!this.options.libraries)return[];var t=this.options.libraries.reduce((function(e,t){return e[t.id]=!0,e}),{});return this.model.categories.filter((function(e){var n=e.libraries.first().get("id");return t[n]}))}},{key:"onBeforeRender",value:function(){var e;return this.folders||(this.folders=this.getCustomLibraryFolders()),this.options.showFolder&&!!(null===(e=this.folders)||void 0===e?void 0:e.length)}},{key:"viewOptions",value:function(){return{styles:a,folderCount:this.folders.length,folders:this.options.showFolder&&this.getFolderLinks(),hideLabel:this.options.hideLabel}}}])&&u(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),d}(o.Q.Component)},61356:function(e,t,n){"use strict";n.d(t,{c:function(){return O}});var o=n(39479),r=n(48088),i=n(31647),l=n(70065),s=n(52076),a=n(88483),c=n(2772),u=n(10101),p=n(61843),f=n(48090),h=n(89167),y=n(37339),d=n.n(y),m=n(264),b=n(227);function v(e){return v="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},v(e)}function g(e,t){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,(void 0,r=function(e,t){if("object"!==v(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!==v(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(o.key),"symbol"===v(r)?r:String(r)),o)}var r}function w(e,t){return w=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},w(e,t)}function k(e){return k=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},k(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&&w(e,t)}(E,e);var t,n,i,y,O=(i=E,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=k(i);if(y){var n=k(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===v(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)}(this,e)});function E(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,E),(t=O.call(this,e))._viewKeyRequested=!1,t}return t=E,(n=[{key:"initialize",value:function(){this.bindListeners()}},{key:"name",get:function(){return"VideoPreviewComponent"}},{key:"template",get:function(){return d()}},{key:"instanceChannelName",get:function(){return p.N0.generateUniqueChannelName(this)}},{key:"defaults",get:function(){return{captureAnalytics:!0}}},{key:"behaviors",get:function(){var e=this;return[{behaviorClass:u.Im,selector:".lazy-img",callback:function(){r.Radio.channel(e.instanceChannelName).trigger("show:play:icon")},minBrowserSupportVersion:f.v9}]}},{key:"regions",value:function(){return{player:{el:".video-player-region",replaceElement:!1},thumbnail:{el:".thumbnail-region",replaceElement:!0}}}},{key:"events",value:function(){return{click:"onClick"}}},{key:"bindListeners",value:function(){this.options.channelName&&this.listenTo(this.options.channelName,"update:chapter:time",this.onUpdateWebplayer)}},{key:"onUpdateWebplayer",value:function(e){return m.g.hasLite?this.playerViewKey?this.player?void this.seekToChapter(e):(this.listenToOnce(this.options.channelName,"player:loaded",o.bind(this.seekToChapter,this,e)),void this.renderVideoPreview()):(this.listenToOnce(this.options.channelName,"player:loaded",o.bind(this.seekToChapter,this,e)),void this.requestViewKey()):this.webPlayer?void this.seekToChapter(e):(this.listenToOnce(this.options.channelName,"webplayer:loaded",o.bind(this.seekToChapter,this,e)),void this.renderVideoPreview())}},{key:"seekToChapter",value:function(e){this.player?this.player.currentTime(e):this.webPlayer.seekTo(e)}},{key:"requestViewKey",value:function(){var e=this;this.playerViewKey||this._viewKeyRequested||(this._viewKeyRequested=!0,this.options.createViewKey(this.model.get("id"),(function(t){e.playerViewKey=t,e.renderVideoPreview()})))}},{key:"onClick",value:function(){this.model.get("id")&&(m.g.hasLite?this.requestViewKey():this.webPlayer||this.renderVideoPreview())}},{key:"renderThumbnail",value:function(){this.showChildView("thumbnail",new c.Z({model:this.model,thumbnailOptions:{size:a.h2.Medium},playIcon:!0,lazyload:!0,channelName:this.instanceChannelName}))}},{key:"renderVideoPreview",value:function(){if(this.playerViewKey)return this.player=new b.l({model:this.playerViewKey,playerApiUrl:this.options.playerApiUrl,channelName:this.options.channelName}),void this.showChildView("player",this.player);this.webPlayer=new h.Q({model:this.model,webPlayerUrl:this.options.webPlayerUrl,parentChannelName:this.options.channelName,autoplay:!0,analyticsOptions:s.k.mergeOptions(this.options.analyticsOptions,{entity:l.EntityType.Video}),captureAnalytics:this.options.captureAnalytics,currentUser:this.options.currentUser}),this.showChildView("player",this.webPlayer)}},{key:"onRender",value:function(){this.playerViewKey?this.renderVideoPreview():this.renderThumbnail()}}])&&g(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),E}(i.Q.Component)},15564:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({1:function(e,t,n,o,r){return'<span class="close cursor-pointer" aria-hidden="true">&times;</span>\n'},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,r){e.propertyIsEnumerable;var i,l,s=null!=t?t:e.nullContext||{},a=e.hooks.helperMissing,c="function",u=e.escapeExpression;return'<span class="clamp-1" title="'+u(typeof(l=null!=(l=n.name||(null!=t?t.name:t))?l:a)===c?l.call(s,{name:"name",hash:{},data:r}):l)+'">'+u(typeof(l=null!=(l=n.name||(null!=t?t.name:t))?l:a)===c?l.call(s,{name:"name",hash:{},data:r}):l)+"</span>\n"+(null!=(i=n.if.call(s,null!=(i=null!=t?t.options:t)?i.removable:i,{name:"if",hash:{},fn:e.program(1,r,0),inverse:e.noop,data:r}))?i:"")},useData:!0})},37106: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("function"==typeof(i=null!=(i=n.title||(null!=t?t.title:t))?i:e.hooks.helperMissing)?i.call(null!=t?t:e.nullContext||{},{name:"title",hash:{},data:r}):i)},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,r){e.propertyIsEnumerable;var i,l,s=e.lambda,a=e.escapeExpression,c=null!=t?t:e.nullContext||{};return' <span class="d-inline-block align-middle '+a(s(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.svgContainer:i,t))+" "+a(s(null!=(i=null!=t?t.options:t)?i.additionalClassName:i,t))+'">'+(null!=(i="function"==typeof(l=null!=(l=n.svg||(null!=t?t.svg:t))?l:e.hooks.helperMissing)?l.call(c,{name:"svg",hash:{},data:r}):l)?i:"")+"</span>\n"+(null!=(i=n.if.call(c,null!=(i=null!=t?t.options:t)?i.showLabel:i,{name:"if",hash:{},fn:e.program(1,r,0),inverse:e.noop,data:r}))?i:"")},useData:!0})},59168:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({1:function(e,t,n,o,r){return"btn btn-outline-dark px-0 ml-2"},3: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.moreSvgContainer:i,t))},5: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.svgContainer:i,t))+" align-middle"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,r){e.propertyIsEnumerable;var i,l=null!=t?t:e.nullContext||{};return'<div class="actions-region d-inline-block"></div><span class="position-relative d-inline-block dropdown">\n <span\n data-toggle="dropdown"\n aria-haspopup="true"\n aria-expanded="false"\n class="'+(null!=(i=n.if.call(l,null!=(i=null!=t?t.options:t)?i.showLabel:i,{name:"if",hash:{},fn:e.program(1,r,0),inverse:e.noop,data:r}))?i:"")+' ui-dropdown-toggle"\n >\n <span class="ui-more d-inline-block '+(null!=(i=n.if.call(l,null!=(i=null!=t?t.options:t)?i.showLabel:i,{name:"if",hash:{},fn:e.program(3,r,0),inverse:e.program(5,r,0),data:r}))?i:"")+' cursor-pointer">'+(null!=(i=e.lambda(null!=(i=null!=t?t.options:t)?i.moreSvg:i,t))?i:"")+'</span>\n </span>\n <div class="more-actions-region"></div>\n</span>\n'},useData:!0})},58040: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=e.lambda,s=e.escapeExpression;return' <div class="'+s(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.descriptionWrapper:i,t))+'">\n <p class="description-element '+s(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.description:i,t))+'">'+(null!=(i=n.if.call(null!=t?t:e.nullContext||{},null!=(i=null!=t?t.options:t)?i.expandable:i,{name:"if",hash:{},fn:e.program(2,r,0),inverse:e.program(4,r,0),data:r}))?i:"")+"</p>\n </div>\n"},2:function(e,t,n,o,r){e.propertyIsEnumerable;var i,l=e.lambda,s=e.escapeExpression;return(null!=(i=l(null!=(i=null!=t?t.options:t)?i.description:i,t))?i:"")+'<span class="'+s(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.showMoreEllipsis:i,t))+" "+s(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.hideEllipsis:i,t))+'">... '+s((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"showMore",{name:"lang",hash:{},data:r}))+"</span>"},4:function(e,t,n,o,r){e.propertyIsEnumerable;var i,l=e.lambda,s=e.escapeExpression;return(null!=(i=l(null!=(i=null!=t?t.options:t)?i.description:i,t))?i:"")+'<span class="'+s(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.singleEllipsis:i,t))+" "+s(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.hideEllipsis:i,t))+'">...</span>'},6:function(e,t,n,o,r){e.propertyIsEnumerable;var i,l=e.lambda;return' <p class="'+e.escapeExpression(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.description:i,t))+'">'+(null!=(i=l(null!=(i=null!=t?t.options:t)?i.description:i,t))?i:"")+"</p>\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.truncate:i,{name:"if",hash:{},fn:e.program(1,r,0),inverse:e.program(6,r,0),data:r}))?i:""},useData:!0})},19021: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.series:i,t))},3:function(e,t,n,o,r){var i;return e.propertyIsEnumerable,'href="'+e.escapeExpression(e.lambda(null!=(i=null!=t?t.options:t)?i.seriesUrl:i,t))+'" target="_blank"'},5: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.seasonNumber:i,{name:"if",hash:{},fn:e.program(6,r,0),inverse:e.noop,data:r}))?i:"")+" E"+e.escapeExpression(e.lambda(null!=(i=null!=t?t.options:t)?i.episodeNumber:i,t))+"\n"},6:function(e,t,n,o,r){var i;return e.propertyIsEnumerable,"&nbsp;S"+e.escapeExpression(e.lambda(null!=(i=null!=t?t.options:t)?i.seasonNumber:i,t))+" &bull;"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,r){e.propertyIsEnumerable;var i,l=null!=t?t:e.nullContext||{};return'<a class="series-applink text-reset '+(null!=(i=n.if.call(l,null!=(i=null!=t?t.options:t)?i.styleUppercase:i,{name:"if",hash:{},fn:e.program(1,r,0),inverse:e.noop,data:r}))?i:"")+'" '+(null!=(i=n.if.call(l,null!=(i=null!=t?t.options:t)?i.seriesUrl:i,{name:"if",hash:{},fn:e.program(3,r,0),inverse:e.noop,data:r}))?i:"")+">\n "+(null!=(i=e.lambda(null!=(i=null!=t?t.options:t)?i.seriesName:i,t))?i:"")+(null!=(i=n.if.call(l,null!=(i=null!=t?t.options:t)?i.episodeNumber:i,{name:"if",hash:{},fn:e.program(5,r,0),inverse:e.noop,data:r}))?i:"")+"</a>"},useData:!0})},25205: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=e.escapeExpression;return'<span class="'+l(e.lambda(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.sourceLabel:i,t))+'">'+l((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"folder",{name:"lang",hash:{smartCount:null!=(i=null!=t?t.options:t)?i.folderCount:i},data:r}))+"</span>\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,r){var i;return e.propertyIsEnumerable,(null!=(i=n.unless.call(null!=t?t:e.nullContext||{},null!=(i=null!=t?t.options:t)?i.hideLabel:i,{name:"unless",hash:{},fn:e.program(1,r,0),inverse:e.noop,data:r}))?i:"")+(null!=(i=e.lambda(null!=(i=null!=t?t.options:t)?i.folders:i,t))?i:"")},useData:!0})},37339:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({1:function(e,t,n,o,r){return"cursor-pointer "},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,r){var i;return e.propertyIsEnumerable,'<div class="video-player-region '+(null!=(i=n.if.call(null!=t?t:e.nullContext||{},null!=t?t.id:t,{name:"if",hash:{},fn:e.program(1,r,0),inverse:e.noop,data:r}))?i:"")+'responsize-img">\n <div class="thumbnail-region"></div>\n</div>'},useData:!0})}}]);
@@ -0,0 +1,2 @@
1
+ /*! For license information please see 1601-5195376e97.chunk.js.LICENSE.txt */
2
+ (self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[1601],{70680:function(e,t,n){"use strict";n.d(t,{r:function(){return y}});var r=n(31647),i=n(88172),o=n(61843),a=n(57857),s=n(26457),c=n(40622),l=n(97781),u=n.n(l);function h(e){return h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},h(e)}function p(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,(void 0,i=function(e,t){if("object"!==h(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==h(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key),"symbol"===h(i)?i:String(i)),r)}var i}function f(e,t){return f=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},f(e,t)}function d(e){return d=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},d(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&&f(e,t)}(m,e);var t,n,l,y,v=(l=m,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=d(l);if(y){var n=d(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===h(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(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),v.call(this,e)}return t=m,(n=[{key:"initialize",value:function(){this.spinnerModel=new r.Q.Model({showSpinner:this.isProcessing()}),this.listenTo(this.options.channelName,c.LibraryEditorActions.MergeChapters,this.onClickMergeChapters)}},{key:"name",get:function(){return"ConcatenateRequestComponent"}},{key:"template",get:function(){return u()}},{key:"lang",get:function(){return"libraryEditor.concatenateRequest"}},{key:"className",get:function(){return"mt-3"}},{key:"regions",value:function(){return{button:{el:".btn-region",replaceElement:!0}}}},{key:"onClickMergeChapters",value:function(){this.spinnerModel.set(i.ZV.ShowSpinner,!0),this.render()}},{key:"isProcessing",value:function(){return!(!this.model||!this.model.get("status")||this.model.get("status")!==s.Um.New&&this.model.get("status")!==s.Um.Concatenating)}},{key:"renderButton",value:function(){var e={chapters:a.T.getPhrase(this.lang,"mergeChapters"),subtitles:a.T.getPhrase(this.lang,"mergeChapters"),clickViewSubtitles:a.T.getPhrase(this.lang,"enabledCustomSubtitles")},t=new i.Py({buttonText:e[this.options.type],extraButtonClass:"btn-dark ".concat("XKFne"),model:this.spinnerModel,spinnerOptions:{size:o.Ey.Small,type:o.dR.Light,extraClasses:"mx-auto"},channelName:this.options.channelName,saveEvent:c.LibraryEditorActions.MergeChapters});this.showChildView("button",t)}},{key:"viewOptions",value:function(){var e={chapters:{heading:a.T.getPhrase(this.lang,"chaptersHeading"),line1:a.T.getPhrase(this.lang,"chaptersInfo1"),line2:a.T.getPhrase(this.lang,"chaptersInfo2")},subtitles:{heading:a.T.getPhrase(this.lang,"subtitlesHeading"),line1:a.T.getPhrase(this.lang,"subtitlesInfo1"),line2:a.T.getPhrase(this.lang,"subtitlesInfo2")},clickViewSubtitles:{heading:a.T.getPhrase(this.lang,"cvSubtitlesHeading"),line1:a.T.getPhrase(this.lang,"cvSubtitlesInfo1"),line2:a.T.getPhrase(this.lang,"cvSubtitlesInfo2")}};return{progress:this.model&&this.model.get("progress")&&a.T.getPhrase(this.lang,"progress",{progress:this.model.get("progress")}),componentOptions:e[this.options.type],processing:this.spinnerModel.get(i.ZV.ShowSpinner),failed:this.model&&this.model.get("status")&&this.model.get("status")===s.Um.ConcatenationFailed}}},{key:"onRender",value:function(){this.renderButton()}}])&&p(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),m}(r.Q.Component)},21053:function(e,t,n){"use strict";n.d(t,{W:function(){return v}});var r=n(48088),i=n(31647),o={svgContainer:"mtegw"},a=n(43791),s=n.n(a),c=n(48090),l=n(35630),u=n(57085),h=n(57857);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 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,(void 0,i=function(e,t){if("object"!==p(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==p(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key),"symbol"===p(i)?i:String(i)),r)}var i}function d(e,t){return d=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},d(e,t)}function y(e){return y=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},y(e)}var v=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&&d(e,t)}(m,e);var t,n,i,a,v=(i=m,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=y(i);if(a){var n=y(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===p(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(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),v.call(this,e)}return t=m,(n=[{key:"name",get:function(){return"EditVideoTabsComponent"}},{key:"className",get:function(){return"bg-white"}},{key:"regions",value:function(){return{tabs:{el:".tabs-region",replaceElement:!0},breadcrumbs:{el:".breadcrumbs-region",replaceElement:!0}}}},{key:"lang",get:function(){return"libraryEditor.editVideoTabs"}},{key:"template",get:function(){return s()}},{key:"viewOptions",value:function(){return{styles:o}}},{key:"onSave",value:function(){r.Radio.channel(c.OV.LIBRARY_EDITOR).trigger(c.eX.LibraryEditor.SAVE_VIDEO)}},{key:"getLocationBreadcrumb",value:function(){switch(this.options.context){case"edit":return{name:h.T.getPhrase(this.lang,"videoDetails")};case"chapters":return{name:h.T.getPhrase(this.lang,"chapters")};case"resources":return{name:h.T.getPhrase(this.lang,"resources")}}}},{key:"onRender",value:function(){this.showChildView("tabs",new l.n({tabs:this.options.tabs,activeTab:this.options.activeTab})),this.showChildView("breadcrumbs",new u.n({folder:this.options.folder,libraries:this.options.libraries,video:this.model,customBreadcrumbs:[this.getLocationBreadcrumb()],enableLastItemAppLink:!1}))}}])&&f(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),m}(i.Q.Component)},16704:function(e,t,n){"use strict";n.r(t),n.d(t,{EditChaptersView:function(){return q}});var r=n(39479),i=n(31647),o=n(21679),a=n(57857),s=n(99748),c=n(59054),l=n(99952),u=n(74749),h=n(61843),p=n(48090),f=n(48404),d=n(29457),y=n(70065),v=n(52076),m=n(89167),g=n(13156),b=n(19226),w=n(227),C=n(264),E=n(21053),k=n(70680),P=n(45114),T=n(70693),O=n(56906),S=n(40622),L=n(7190),_=n(26457),x=n(61159),R=n.n(x),j=n(95061);function V(e){return V="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},V(e)}function I(){I=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,r=Object.defineProperty||function(e,t,n){e[t]=n.value},i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function c(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,n){return e[t]=n}}function l(e,t,n,i){var o=t&&t.prototype instanceof p?t:p,a=Object.create(o.prototype),s=new T(i||[]);return r(a,"_invoke",{value:C(e,n,s)}),a}function u(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=l;var h={};function p(){}function f(){}function d(){}var y={};c(y,o,(function(){return this}));var v=Object.getPrototypeOf,m=v&&v(v(O([])));m&&m!==t&&n.call(m,o)&&(y=m);var g=d.prototype=p.prototype=Object.create(y);function b(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function w(e,t){function i(r,o,a,s){var c=u(e[r],e,o);if("throw"!==c.type){var l=c.arg,h=l.value;return h&&"object"==V(h)&&n.call(h,"__await")?t.resolve(h.__await).then((function(e){i("next",e,a,s)}),(function(e){i("throw",e,a,s)})):t.resolve(h).then((function(e){l.value=e,a(l)}),(function(e){return i("throw",e,a,s)}))}s(c.arg)}var o;r(this,"_invoke",{value:function(e,n){function r(){return new t((function(t,r){i(e,n,t,r)}))}return o=o?o.then(r,r):r()}})}function C(e,t,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return{value:void 0,done:!0}}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=E(a,n);if(s){if(s===h)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var c=u(e,t,n);if("normal"===c.type){if(r=n.done?"completed":"suspendedYield",c.arg===h)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(r="completed",n.method="throw",n.arg=c.arg)}}}function E(e,t){var n=t.method,r=e.iterator[n];if(void 0===r)return t.delegate=null,"throw"===n&&e.iterator.return&&(t.method="return",t.arg=void 0,E(e,t),"throw"===t.method)||"return"!==n&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+n+"' method")),h;var i=u(r,e.iterator,t.arg);if("throw"===i.type)return t.method="throw",t.arg=i.arg,t.delegate=null,h;var o=i.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,h):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,h)}function k(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function P(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(k,this),this.reset(!0)}function O(e){if(e||""===e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,i=function t(){for(;++r<e.length;)if(n.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return i.next=i}}throw new TypeError(V(e)+" is not iterable")}return f.prototype=d,r(g,"constructor",{value:d,configurable:!0}),r(d,"constructor",{value:f,configurable:!0}),f.displayName=c(d,s,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,d):(e.__proto__=d,c(e,s,"GeneratorFunction")),e.prototype=Object.create(g),e},e.awrap=function(e){return{__await:e}},b(w.prototype),c(w.prototype,a,(function(){return this})),e.AsyncIterator=w,e.async=function(t,n,r,i,o){void 0===o&&(o=Promise);var a=new w(l(t,n,r,i),o);return e.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},b(g),c(g,s,"Generator"),c(g,o,(function(){return this})),c(g,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},e.values=O,T.prototype={constructor:T,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(P),!e)for(var t in this)"t"===t.charAt(0)&&n.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(n,r){return a.type="throw",a.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),c=n.call(o,"finallyLoc");if(s&&c){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,h):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),h},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),P(n),h}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;P(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:O(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),h}},e}function D(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 A(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,(void 0,i=function(e,t){if("object"!==V(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==V(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key),"symbol"===V(i)?i:String(i)),r)}var i}function N(e,t){return N=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},N(e,t)}function U(e){return U=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},U(e)}var q=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)}(B,e);var t,n,x,q,M=(x=B,q=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(x);if(q){var n=U(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===V(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)}(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=M.call(this,e))._viewKeyRequested=!1,t}return t=B,(n=[{key:"initialize",value:function(){this.bindListeners(),this.initializeDataServices(),h.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 R()}},{key:"regions",value:function(){return{tabs:{el:".tab-region",partialLoading:d.LP.EditVideoTabs},webplayer:{replaceElement:!0,el:".webplayer-region",partialLoading:d.LP.WebPlayer},addChapter:{replaceElement:!0,el:".add-chapter-region",partialLoading:d.LP.EditVideoChaptersForm},chapterList:{replaceElement:!0,el:".chapter-list-region",partialLoading:d.LP.EditVideoChapterList}}}},{key:"bindListeners",value:function(){this.listenTo(p.Vk.VIDEO,"".concat(p.M_.VIDEOS,":").concat(this.options.videoId,":sync"),this.render),this.listenTo(p.Vk.VIDEO,"".concat(p.M_.VIDEOS,":").concat(this.options.videoId,":error"),this.onVideoDataError),this.listenTo(p.Vk.VIDEO,"".concat(p.M_.VIDEO_HAS_PHYSICAL_CHAPTERS,":").concat(this.options.videoId,":sync"),this.render),this.listenTo(p.Vk.CHAPTER,"".concat(p.M_.CONCATENATE_STATUS,":").concat(this.options.videoId,":error"),this.onConcatenateDataError),this.listenTo(this.channelName,S.LibraryEditorActions.CreateChapter,this.onCreateChapter),this.listenTo(this.channelName,S.LibraryEditorActions.UpdateChapter,this.onUpdateChapter),this.listenTo(this.channelName,S.LibraryEditorActions.DeleteChapter,this.onDeleteChapter),this.listenTo(this.channelName,S.LibraryEditorActions.UpdateChapterTime,this.onTimeInputUpdate),this.listenTo(this.channelName,S.LibraryEditorActions.SeekToChapter,this.onSeekToChapter),this.listenTo(this.channelName,S.LibraryEditorActions.MergeChapters,this.onMergeChapters)}},{key:"initializeDataServices",value:function(){this.videoDataService=o.u.getInstance(p.Or.Video,this),this.chapterDataService=o.u.getInstance(p.Or.Chapter,this),this.playerDataService=o.u.getInstance(p.Or.Player,this)}},{key:"onVideoDataError",value:function(e){switch(e.type){case s.h.NotFound:i.Q.ErrorHelper.throw(new O.l1);break;case s.h.Forbidden:i.Q.ErrorHelper.throw(new O.aV)}}},{key:"onConcatenateDataError",value:function(e){e.type===s.h.NotFound&&(this.concatenateRequestNotFound=!0,this.render())}},{key:"updateChapters",value:function(){var e=this;if(C.g.hasLite){var t=this.chapters.toJSON().reverse().reduce((function(t,n){var r,i=t[t.length-1];return[].concat(function(e){if(Array.isArray(e))return D(e)}(r=t)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(r)||function(e,t){if(e){if("string"==typeof e)return D(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)?D(e,t):void 0}}(r)||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.")}(),[{timestamp:n.startTime,endTimestamp:(null==i?void 0:i.timestamp)||e.player.duration(),name:n.name}])}),[]).reverse();this.player.setChapters(t)}}},{key:"onCreateChapter",value:function(e){0===this.chapters.length&&0!==e.startTime&&this.createChapter({name:a.T.getPhrase(this.lang,"intro"),startTime:0}),this.createChapter(e)}},{key:"createChapter",value:function(e){var t=this,n=new u.W(e);this.chapters.add(n),n.set("loading",!0),this.chapterDataService.createChapter(this.model.get("id"),e.name,e.startTime,(function(e){n.set(e.toJSON(),{silent:!0}),n.set("loading",!1),t.chapters.sort(),t.renderChapterForm(),t.updateChapters(),t.logAction(e,y.UserAction.Create)}))}},{key:"onUpdateChapter",value:function(e){var t=this,n=this.chapters.find((function(t){return t.get("id")===e.id}));n.set("loading",!0);var r=g.J.updatedChaptersAlert(this.model.get("name"));this.chapterDataService.updateChapter(n.id,e.name,e.startTime,(function(e){n.set(e.toJSON(),{silent:!0}),n.set("loading",!1),t.chapters.sort(),t.updateChapters(),t.logAction(e,y.UserAction.Edit)}),r)}},{key:"onDeleteChapter",value:function(e){var t=this;e.set("loading",!0),this.chapterDataService.deleteChapter(e.id,(function(){t.logAction(e,y.UserAction.Delete),t.chapters.remove(e),t.updateChapters()}))}},{key:"onMergeChapters",value:function(){var e=this;this.chapterDataService.addConcatenateRequest(this.options.videoId,(function(){e.pollConcatenation()}))}},{key:"onTimeInputUpdate",value:function(e){e>=0&&e<=h.X4.millisecondsToSeconds(this.model.get("duration"))&&(this.player?this.player.currentTime(e):this.webPlayer.seekTo(e))}},{key:"logAction",value:function(e,t){var n=Object.assign({videoId:this.model.get("id")},e.pick("id","name","startTime"));v.k.logUserAction(n,{actionType:t,entity:y.EntityType.Chapter,location:y.LocationContext.EditVideoChapters})}},{key:"onSeekToChapter",value:function(e){return t=this,n=void 0,r=void 0,i=I().mark((function t(){var n,r;return I().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(e<0)){t.next=2;break}return t.abrupt("return");case 2:if(!this.player){t.next=9;break}return t.next=5,this.player.getChapters();case 5:return n=t.sent,r=n[e],this.player.currentTime(r.timestamp),t.abrupt("return");case 9:this.webPlayer.seekToChapter(e);case 10:case"end":return t.stop()}}),t,this)})),new(r||(r=Promise))((function(e,o){function a(e){try{c(i.next(e))}catch(e){o(e)}}function s(e){try{c(i.throw(e))}catch(e){o(e)}}function c(t){var n;t.done?e(t.value):(n=t.value,n instanceof r?n:new r((function(e){e(n)}))).then(a,s)}c((i=i.apply(t,n||[])).next())}));var t,n,r,i}},{key:"startPollingConcatenation",value:function(){if(this.concatenateRequest){var e=[_.Um.SingleFile,_.Um.ConcatenationFailed];r.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")!==_.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 T.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 P.L({model:new u.W,collection:this.chapters,creating:!0,duration:this.model.get("duration"),channelName:this.channelName,playerViewModelKey:"".concat(p._2.NAME,"-").concat(this.model.get("id"))}))}},{key:"renderConcatenationRequest",value:function(){this.isRendered()&&this.showChildView("addChapter",new k.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=h.BK.canEditVideo(this.model);this.showChildView("tabs",new E.W({model:this.model,tabs:h.Si.getEditVideoTabs(this.options.videoId,e),activeTab:".edit-chapters-applink",context:"chapters",folder:this.folder,libraries:this.libraries}))}},{key:"renderWebPlayer",value:function(){if(this.playerViewKey)return this.player=new w.l({model:this.playerViewKey,playerApiUrl:this.config.get("playerApiUrl"),channelName:this.channelName,inactivityTimeout:0}),void this.showChildView("webplayer",this.player);this.webPlayer=new m.Q({model:this.model,webPlayerUrl:this.config.get("webPlayerUrl"),captureAnalytics:!1,currentUser:this.currentUser}),this.showChildView("webplayer",this.webPlayer)}},{key:"mapPhysicalChapters",value:function(){var e=this;this.renderPartialLoading("chapterList");var t=function(t){e.chapters=new l.q(L.$k.mapPhysicalChapters(t)),e.renderChapterList()};this.player?this.player.getChapters().then(t):this.webPlayer.query("getChapters",t)}},{key:"redirectToVideoDetails",value:function(){i.Q.AppLinkHelper.trigger({application:p.OV.LIBRARY_EDITOR,action:p.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(!h.BK.canEditVideo(this.model))return void this.redirectToVideoDetails();this.chapters=this.model.chapters,this.folder=this.model.categories.first(),C.g.hasLite&&!this._viewKeyRequested&&(this._viewKeyRequested=!0,this.playerDataService.createViewKey(this.model.get("id"),c.f.MasterObject,(function(t){e.playerViewKey=t,e.render()})))}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||C.g.hasLite&&!this.playerViewKey||this.hasPhysicalChapters.get("value")&&!this.concatenateRequest&&!this.concatenateRequestNotFound)}},{key:"requiredResources",get:function(){return{config:f.p.config,currentUser:b.K.currentUser,libraries:j.T.libraries}}},{key:"onBeforeRender",value:function(){return this.fetchData(),this.shouldRender()}},{key:"onRender",value:function(){this.renderTabs(),this.renderWebPlayer(),this.renderEditComponents(),this.startPollingConcatenation()}}])&&A(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),B}(i.Q.View)},97781: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,null!=(o=n.if.call(null!=t?t:e.nullContext||{},null!=(o=null!=t?t.options:t)?o.progress:o,{name:"if",hash:{},fn:e.program(2,i,0),inverse:e.noop,data:i}))?o:""},2:function(e,t,n,r,i){e.propertyIsEnumerable;var o,a=e.escapeExpression;return' <span class="m-3 text-muted">'+a(e.lambda(null!=(o=null!=t?t.options:t)?o.progress:o,t))+'</span>\n <p class="pt-2">'+a((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"processing",{name:"lang",hash:{},data:i}))+"</p>\n"},4:function(e,t,n,r,i){var o;return e.propertyIsEnumerable,null!=(o=n.if.call(null!=t?t:e.nullContext||{},null!=(o=null!=t?t.options:t)?o.failed:o,{name:"if",hash:{},fn:e.program(5,i,0),inverse:e.noop,data:i}))?o:""},5:function(e,t,n,r,i){return e.propertyIsEnumerable,'<p class="pt-2 text-danger">'+e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"failed",{name:"lang",hash:{},data:i}))+"</p>\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,i){e.propertyIsEnumerable;var o,a=e.lambda,s=e.escapeExpression;return"<h4>"+s(a(null!=(o=null!=(o=null!=t?t.options:t)?o.componentOptions:o)?o.heading:o,t))+"</h4>\n<p>"+s(a(null!=(o=null!=(o=null!=t?t.options:t)?o.componentOptions:o)?o.line1:o,t))+"</p>\n<p>"+s(a(null!=(o=null!=(o=null!=t?t.options:t)?o.componentOptions:o)?o.line2:o,t))+'</p>\n<div class="btn-region"></div>\n'+(null!=(o=n.if.call(null!=t?t:e.nullContext||{},null!=(o=null!=t?t.options:t)?o.processing:o,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.program(4,i,0),data:i}))?o:"")},useData:!0})},43791: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){var o;return e.propertyIsEnumerable,'<h1 class="h3">\n '+e.escapeExpression("function"==typeof(o=null!=(o=n.name||(null!=t?t.name:t))?o:e.hooks.helperMissing)?o.call(null!=t?t:e.nullContext||{},{name:"name",hash:{},data:i}):o)+'\n</h2>\n<div class="breadcrumbs-region"></div>\n<div class="tabs-region pl-2"></div>'},useData:!0})},61159: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){return'<div class="tab-region w-100"></div>\n<div class="row">\n <div class="col-6 pt-3">\n <div class="webplayer-region"></div>\n <div class="add-chapter-region"></div>\n </div>\n <div class="col-6 mb-2 pt-3">\n <div class="chapter-list-region"></div>\n </div>\n</div>'},useData:!0})}}]);