@clickview/library-editor 1.54.0 → 1.54.1-dev.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundles.json +3 -3
- package/dist/css/{826-library-editor-2797c4568f.chunk.css → 4001-library-editor-da87291909.chunk.css} +3 -2
- package/dist/css/{library-editor-app-cade5e4b6a.css → library-editor-app-08d619de95.css} +2 -2
- package/dist/languages/en.json +1 -1
- package/dist/scripts/101-1aa755b98b.chunk.js +1 -0
- package/dist/scripts/{1010-37e7c83417.chunk.js → 1010-2c4e71bac2.chunk.js} +1 -1
- package/dist/scripts/{1086-7632f7b45b.chunk.js → 1086-d0efa1a0ca.chunk.js} +1 -1
- package/dist/scripts/1216-9d2e314558.chunk.js +1 -0
- package/dist/scripts/{1269-02d8d91784.chunk.js → 1269-ec70091b19.chunk.js} +1 -1
- package/dist/scripts/{1409-79be9fc25d.chunk.js → 1409-f3fea6c3c3.chunk.js} +1 -1
- package/dist/scripts/1537-2945b91924.chunk.js +1 -0
- package/dist/scripts/{1703-4d41a9e919.chunk.js → 1703-0e6940a3c0.chunk.js} +1 -1
- package/dist/scripts/{1832-305c691701.chunk.js → 1832-9fd96d5efe.chunk.js} +1 -1
- package/dist/scripts/{1876-33e86bc26f.chunk.js → 1876-fc815ba31e.chunk.js} +1 -1
- package/dist/scripts/1973-074d4e72c2.chunk.js +1 -0
- package/dist/scripts/209-f9e52775b1.chunk.js +1 -0
- package/dist/scripts/{243-526e36736c.chunk.js → 243-d27b3c7903.chunk.js} +1 -1
- package/dist/scripts/2516-0290fc7712.chunk.js +1 -0
- package/dist/scripts/{259-e1c3eb98ce.chunk.js → 259-d6a4aa6694.chunk.js} +1 -1
- package/dist/scripts/{2601-f14eacbf73.chunk.js → 2601-d42245cb40.chunk.js} +1 -1
- package/dist/scripts/2639-efe1222211.chunk.js +2 -0
- package/dist/scripts/2639-efe1222211.chunk.js.LICENSE.txt +8 -0
- package/dist/scripts/{2644-60bdfc1c95.chunk.js → 2644-cadc6531d6.chunk.js} +1 -1
- package/dist/scripts/2648-61a84bc983.chunk.js +1 -0
- package/dist/scripts/{2692-1ddd87476e.chunk.js → 2692-b7dff9da8a.chunk.js} +1 -1
- package/dist/scripts/{2803-fbb9d2439d.chunk.js → 2803-026f3af7cb.chunk.js} +1 -1
- package/dist/scripts/{2888-c2c8b859cd.chunk.js → 2888-a406bcd564.chunk.js} +1 -1
- package/dist/scripts/2955-521e238d27.chunk.js +1 -0
- package/dist/scripts/299-32a1391000.chunk.js +1 -0
- package/dist/scripts/{2998-aae0ec14de.chunk.js → 2998-a3c3a1e950.chunk.js} +1 -1
- package/dist/scripts/{3400-ebc91cde7a.chunk.js → 3400-326dc33968.chunk.js} +1 -1
- package/dist/scripts/{35-278014f3ca.chunk.js → 35-d04a61537f.chunk.js} +1 -1
- package/dist/scripts/{3551-17275d533c.chunk.js → 3551-97ac416527.chunk.js} +1 -1
- package/dist/scripts/{3639-c5cc04c72d.chunk.js → 3639-171b53e474.chunk.js} +1 -1
- package/dist/scripts/3746-9f89d2e526.chunk.js +1 -0
- package/dist/scripts/376-4d9e8d5305.chunk.js +1 -0
- package/dist/scripts/{3763-47619f0e54.chunk.js → 3763-21a9bc8c81.chunk.js} +1 -1
- package/dist/scripts/3969-14f58e46c8.chunk.js +1 -0
- package/dist/scripts/4001-5f16bcaff3.chunk.js +2 -0
- package/dist/scripts/4024-e76b07c207.chunk.js +1 -0
- package/dist/scripts/{4201-ffd35af9cb.chunk.js → 4201-9f363cadea.chunk.js} +1 -1
- package/dist/scripts/{4245-9262674448.chunk.js → 4245-3680566469.chunk.js} +1 -1
- package/dist/scripts/{8727-30dadf014c.chunk.js → 4506-e3e16c1c39.chunk.js} +1 -1
- package/dist/scripts/4523-e918636e67.chunk.js +1 -0
- package/dist/scripts/{4591-78600e384c.chunk.js → 4591-84bc2f21f0.chunk.js} +1 -1
- package/dist/scripts/471-9ae0a7d088.chunk.js +2 -0
- package/dist/scripts/{4860-6001ab4e2a.chunk.js → 4860-7e9c7b578f.chunk.js} +1 -1
- package/dist/scripts/4984-e55e0bfa17.chunk.js +1 -0
- package/dist/scripts/514-9e42f33112.chunk.js +2 -0
- package/dist/scripts/514-9e42f33112.chunk.js.LICENSE.txt +6 -0
- package/dist/scripts/{5173-d333602893.chunk.js → 5173-6fe93f90b8.chunk.js} +1 -1
- package/dist/scripts/{5286-b5a0097954.chunk.js → 5286-c55bd5882c.chunk.js} +1 -1
- package/dist/scripts/535-96be75b325.chunk.js +1 -0
- package/dist/scripts/{5412-e2505df3a4.chunk.js → 5412-abf3c7ab24.chunk.js} +1 -1
- package/dist/scripts/{5418-f84d0ff359.chunk.js → 5418-4cf3592f6a.chunk.js} +1 -1
- package/dist/scripts/{5424-65be3c657c.chunk.js → 5424-fb9af4cac5.chunk.js} +1 -1
- package/dist/scripts/5524-83e92242a1.chunk.js +1 -0
- package/dist/scripts/5698-74d4a95cab.chunk.js +1 -0
- package/dist/scripts/{5707-41459498e9.chunk.js → 5707-2455798bbe.chunk.js} +1 -1
- package/dist/scripts/{5747-f28298b80d.chunk.js → 5747-dc100fe944.chunk.js} +1 -1
- package/dist/scripts/5850-21711256a9.chunk.js +1 -0
- package/dist/scripts/5891-1f548b9c62.chunk.js +1 -0
- package/dist/scripts/{6093-e19df1d1fa.chunk.js → 6093-c4d7d99258.chunk.js} +1 -1
- package/dist/scripts/61-35a4e0dd3d.chunk.js +2 -0
- package/dist/scripts/{6352-d267f9afea.chunk.js → 6352-9f5498c43f.chunk.js} +1 -1
- package/dist/scripts/6637-3078ed12bc.chunk.js +1 -0
- package/dist/scripts/6725-52d65e0d02.chunk.js +2 -0
- package/dist/scripts/{6732-85afd02f41.chunk.js → 6732-0223b7e084.chunk.js} +1 -1
- package/dist/scripts/{6774-a002ac7253.chunk.js → 6774-7d16e3a1b2.chunk.js} +1 -1
- package/dist/scripts/{6788-dc6b522995.chunk.js → 6788-1baf5483df.chunk.js} +1 -1
- package/dist/scripts/6963-2e5edf04ac.chunk.js +1 -0
- package/dist/scripts/{7053-00950d18ae.chunk.js → 7053-5f6f2bf8ee.chunk.js} +1 -1
- package/dist/scripts/7071-9ae15d6979.chunk.js +1 -0
- package/dist/scripts/7153-11798dda90.chunk.js +1 -0
- package/dist/scripts/{7190-2b40df1e89.chunk.js → 7190-b143292308.chunk.js} +1 -1
- package/dist/scripts/7295-c5ccbfe2be.chunk.js +1 -0
- package/dist/scripts/{7376-e3bf3a94f9.chunk.js → 7376-e476873e22.chunk.js} +1 -1
- package/dist/scripts/{7408-49b32d5829.chunk.js → 7408-eb04403233.chunk.js} +1 -1
- package/dist/scripts/7416-bafece2a3d.chunk.js +1 -0
- package/dist/scripts/7827-53c10fe9d7.chunk.js +1 -0
- package/dist/scripts/8080-540165cb5c.chunk.js +1 -0
- package/dist/scripts/8113-eb9901344c.chunk.js +1 -0
- package/dist/scripts/{8213-6c873c853e.chunk.js → 8213-4d11becb33.chunk.js} +1 -1
- package/dist/scripts/{8362-267efdac61.chunk.js → 8362-2712404025.chunk.js} +1 -1
- package/dist/scripts/8542-7dbc2fa676.chunk.js +1 -0
- package/dist/scripts/8591-920b0560e4.chunk.js +1 -0
- package/dist/scripts/{8726-2d0bc64637.chunk.js → 8726-10013d1e22.chunk.js} +1 -1
- package/dist/scripts/8757-8ba60a3c5f.chunk.js +2 -0
- package/dist/scripts/8757-8ba60a3c5f.chunk.js.LICENSE.txt +44 -0
- package/dist/scripts/{8762-be126e413d.chunk.js → 8762-0c818e61d0.chunk.js} +1 -1
- package/dist/scripts/{8906-2ae58fb990.chunk.js → 8906-3052c24e98.chunk.js} +1 -1
- package/dist/scripts/{8952-27f5ea4a16.chunk.js → 8952-5dfd08cdc7.chunk.js} +2 -2
- package/dist/scripts/9077-fd1d054d31.chunk.js +1 -0
- package/dist/scripts/9134-8845590ece.chunk.js +1 -0
- package/dist/scripts/{9357-e71ea6a34d.chunk.js → 9357-04700677af.chunk.js} +1 -1
- package/dist/scripts/9369-cacc5f30e5.chunk.js +2 -0
- package/dist/scripts/9383-26ce3e3847.chunk.js +1 -0
- package/dist/scripts/{9695-636ea0ef64.chunk.js → 9695-8b46921478.chunk.js} +1 -1
- package/dist/scripts/{9927-7a935c955d.chunk.js → 9927-1a5a65a341.chunk.js} +1 -1
- package/dist/scripts/bundle-5d010f1f12.min.js +2 -0
- package/dist/scripts/bundle-5d010f1f12.min.js.LICENSE.txt +133 -0
- package/dist/scripts/{polyfills-5ce436cbbe.min.js → polyfills-e4d8584da7.min.js} +1 -1
- package/package.json +4 -4
- package/dist/scripts/101-c8fa0bf8c0.chunk.js +0 -1
- package/dist/scripts/112-4f413f94c0.chunk.js +0 -1
- package/dist/scripts/1216-83f6fbc7be.chunk.js +0 -1
- package/dist/scripts/152-808e046b1f.chunk.js +0 -2
- package/dist/scripts/1973-7a1768228d.chunk.js +0 -1
- package/dist/scripts/2417-e85abc4005.chunk.js +0 -1
- package/dist/scripts/2482-ded3090c15.chunk.js +0 -1
- package/dist/scripts/2648-0a58c0fc05.chunk.js +0 -1
- package/dist/scripts/2802-d428814c29.chunk.js +0 -2
- package/dist/scripts/2802-d428814c29.chunk.js.LICENSE.txt +0 -8
- package/dist/scripts/299-e59ef1fc4f.chunk.js +0 -1
- package/dist/scripts/343-4f77983932.chunk.js +0 -1
- package/dist/scripts/3746-1fd61fe062.chunk.js +0 -1
- package/dist/scripts/376-0ae51da38f.chunk.js +0 -1
- package/dist/scripts/3969-c636ff3159.chunk.js +0 -1
- package/dist/scripts/4024-8372510247.chunk.js +0 -1
- package/dist/scripts/4523-e244d0dae2.chunk.js +0 -1
- package/dist/scripts/5046-7f741b88da.chunk.js +0 -1
- package/dist/scripts/514-eeb95eba47.chunk.js +0 -1
- package/dist/scripts/535-b26597b4d0.chunk.js +0 -1
- package/dist/scripts/5524-04583b6e40.chunk.js +0 -1
- package/dist/scripts/5850-996ea58208.chunk.js +0 -1
- package/dist/scripts/5891-bf6bb58afe.chunk.js +0 -1
- package/dist/scripts/61-29f179811f.chunk.js +0 -2
- package/dist/scripts/6532-48f3f080f5.chunk.js +0 -2
- package/dist/scripts/6963-68cce4d38c.chunk.js +0 -1
- package/dist/scripts/7002-48057608dc.chunk.js +0 -1
- package/dist/scripts/7071-78d0b6c0cb.chunk.js +0 -1
- package/dist/scripts/708-4faf09f1e5.chunk.js +0 -1
- package/dist/scripts/7153-b581d35045.chunk.js +0 -1
- package/dist/scripts/7295-5a82c36f28.chunk.js +0 -1
- package/dist/scripts/7827-ef0d617862.chunk.js +0 -1
- package/dist/scripts/8113-d678e76098.chunk.js +0 -1
- package/dist/scripts/8234-d793dd9bda.chunk.js +0 -1
- package/dist/scripts/826-c6d1a46e45.chunk.js +0 -2
- package/dist/scripts/8542-475ab8438e.chunk.js +0 -1
- package/dist/scripts/8591-149f4a2b62.chunk.js +0 -1
- package/dist/scripts/9369-f43ee314be.chunk.js +0 -2
- package/dist/scripts/9383-2c77c78fe8.chunk.js +0 -1
- package/dist/scripts/bundle-8f42183790.min.js +0 -2
- package/dist/scripts/bundle-8f42183790.min.js.LICENSE.txt +0 -1
- package/typings/libs/CVEvents.d.ts +0 -13
- package/typings/libs/CVLanguages.d.ts +0 -24
- package/typings/libs/LazyLoad.d.ts +0 -30
- package/typings/libs/LazyLoad.ts +0 -27
- package/typings/libs/cookiesjs.d.ts +0 -24
- /package/dist/css/{2417-library-editor-46f8e6e95b.chunk.css → 1537-library-editor-46f8e6e95b.chunk.css} +0 -0
- /package/dist/css/{2482-library-editor-1b6dc45d45.chunk.css → 209-library-editor-1b6dc45d45.chunk.css} +0 -0
- /package/dist/css/{343-library-editor-d2f704c6a5.chunk.css → 2955-library-editor-d2f704c6a5.chunk.css} +0 -0
- /package/dist/css/{112-library-editor-6a2d152d7d.chunk.css → 6637-library-editor-6a2d152d7d.chunk.css} +0 -0
- /package/dist/css/{152-library-editor-01b4461ff1.chunk.css → 6725-library-editor-01b4461ff1.chunk.css} +0 -0
- /package/dist/css/{708-library-editor-7ffe353138.chunk.css → 8080-library-editor-7ffe353138.chunk.css} +0 -0
- /package/dist/css/{5046-library-editor-765ea88cb0.chunk.css → 9077-library-editor-765ea88cb0.chunk.css} +0 -0
- /package/dist/css/{8234-library-editor-5a1c6fc3b4.chunk.css → 9134-library-editor-5a1c6fc3b4.chunk.css} +0 -0
- /package/dist/scripts/{61-29f179811f.chunk.js.LICENSE.txt → 4001-5f16bcaff3.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{6532-48f3f080f5.chunk.js.LICENSE.txt → 471-9ae0a7d088.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{546-40961bc779.chunk.js → 546-2cf4378b0c.chunk.js} +0 -0
- /package/dist/scripts/{826-c6d1a46e45.chunk.js.LICENSE.txt → 61-35a4e0dd3d.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{152-808e046b1f.chunk.js.LICENSE.txt → 6725-52d65e0d02.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{8952-27f5ea4a16.chunk.js.LICENSE.txt → 8952-5dfd08cdc7.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{9369-f43ee314be.chunk.js.LICENSE.txt → 9369-cacc5f30e5.chunk.js.LICENSE.txt} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[2601],{21053:function(e,t,n){"use strict";n.d(t,{W:function(){return b}});var o=n(48088),i=n(57857),r=n(31647),a=n(57085),s=n(35630),l=n(57098),u=n(43791),c=n.n(u),d={svgContainer:"mtegw"};function f(e){return f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},f(e)}function h(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,p(o.key),o)}}function p(e){var t=function(e){if("object"!=f(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=f(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==f(t)?t:t+""}function v(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(v=function(){return!!e})()}function m(e){return m=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},m(e)}function y(e,t){return y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},y(e,t)}var b=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=m(t),function(e,t){if(t&&("object"==f(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,v()?Reflect.construct(t,n||[],m(e).constructor):t.apply(e,n))}(this,t,[e])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&y(e,t)}(t,e),n=t,(r=[{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 c()}},{key:"viewOptions",value:function(){return{styles:d}}},{key:"onSave",value:function(){o.Radio.channel(l.OV.LIBRARY_EDITOR).trigger(l.eX.LibraryEditor.SAVE_VIDEO)}},{key:"getLocationBreadcrumb",value:function(){switch(this.options.context){case"edit":return{name:i.T.getPhrase(this.lang,"videoDetails")};case"chapters":return{name:i.T.getPhrase(this.lang,"chapters")};case"resources":return{name:i.T.getPhrase(this.lang,"resources")}}}},{key:"onRender",value:function(){this.showChildView("tabs",new s.n({tabs:this.options.tabs,activeTab:this.options.activeTab})),this.showChildView("breadcrumbs",new a.n({folder:this.options.folder,libraries:this.options.libraries,video:this.model,customBreadcrumbs:[this.getLocationBreadcrumb()],enableLastItemAppLink:!1}))}}])&&h(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(r.Q.wA)},74250:function(e,t,n){"use strict";n.d(t,{z:function(){return g}});var o=n(48088),i=n(57857),r=n(31647),a=n(88172),s=n(93569),l=n(40622),u=n(99724),c=n.n(u),d={saveButton:"G_FDK",undo:"dcV70"};function f(e){return f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},f(e)}function h(e,t,n){return(t=v(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,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,v(o.key),o)}}function v(e){var t=function(e){if("object"!=f(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=f(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==f(t)?t:t+""}function m(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(m=function(){return!!e})()}function y(e){return y=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},y(e)}function b(e,t){return b=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},b(e,t)}var g=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=y(t),function(e,t){if(t&&("object"==f(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,m()?Reflect.construct(t,n||[],y(e).constructor):t.apply(e,n))}(this,t,[e])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&b(e,t)}(t,e),n=t,u=[{key:"name",get:function(){return"SaveComponent"}},{key:"template",get:function(){return c()}},{key:"className",get:function(){return"save-component ".concat(this.options.extraClasses)}},{key:"lang",get:function(){return"libraryEditor.save"}},{key:"getParentChannel",value:function(){return o.Radio.channel(this.options.channelName)}},{key:"getSaveChannelName",value:function(){return"".concat(this.name,":").concat(this.cid)}},{key:"regions",value:function(){return{save:{el:".save-region",replaceElement:!0}}}},{key:"events",value:function(){return{"click .undo":"onUndo"}}},{key:"initialize",value:function(){this.model||(this.model=new r.Q.Hn(h(h({},a.ZV.ShowSpinner,this.options.showSpinner),a.ZV.Disabled,this.options.isDisabled)));var e=this.options.channelName;this.listenTo(e,l.NT.DisableSave,this.onDisableSave),this.listenTo(e,l.NT.EnableSave,this.onEnableSave),this.listenTo(e,l.NT.CancelSave,this.onCancelSave);var t=o.Radio.channel(this.getSaveChannelName());this.listenTo(t,l.NT.Save,this.onSave),this.options.allowUndo&&(this.options.hasChanges&&this.model.set("showUndo",!0),this.listenTo(this.model,"change:showUndo",this.render))}},{key:"onCancelSave",value:function(){this.model.set(a.ZV.ShowSpinner,!1)}},{key:"onEnableSave",value:function(){this.model.set(a.ZV.Disabled,!1),this.options.allowUndo&&this.model.set("showUndo",!0)}},{key:"onDisableSave",value:function(){this.model.get(a.ZV.ShowSpinner)&&this.model.set(a.ZV.ShowSpinner,!1,{silent:!0}),this.model.set(a.ZV.Disabled,!0),this.options.allowUndo&&this.model.set("showUndo",!1)}},{key:"onUndo",value:function(e){e.stopPropagation(),this.getParentChannel().trigger(l.NT.Undo)}},{key:"onSave",value:function(){this.model.set(a.ZV.ShowSpinner,!0),this.getParentChannel().trigger(l.NT.Save)}},{key:"viewOptions",value:function(){return{allowUndo:this.options.allowUndo&&this.model.get("showUndo"),styles:d}}},{key:"renderSaveButton",value:function(){var e=new a.Py({saveEvent:l.NT.Save,channelName:this.getSaveChannelName(),model:this.model,buttonText:i.T.getPhrase(this.lang,"save"),extraButtonClass:"btn-dark ".concat(d.saveButton),spinnerOptions:{size:s.Ey.Small,type:s.dR.Light,extraClasses:"mx-auto"}});this.showChildView("save",e)}},{key:"onRender",value:function(){this.renderSaveButton()}}],u&&p(n.prototype,u),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,u}(r.Q.wA)},44391:function(e,t,n){"use strict";n.d(t,{K:function(){return T}});var o=n(11306),i=n(31647),r=n(48088),a=n(57098),s=n(25887),l=n(15564),u=n.n(l);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 d(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,f(o.key),o)}}function f(e){var t=function(e){if("object"!=c(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=c(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==c(t)?t:t+""}function h(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(h=function(){return!!e})()}function p(e){return p=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},p(e)}function v(e,t){return v=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},v(e,t)}var m=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=p(t),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)}(e,h()?Reflect.construct(t,n||[],p(e).constructor):t.apply(e,n))}(this,t,[e])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&v(e,t)}(t,e),n=t,o=[{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"rounded-pill tag py-1 px-2 flex-shrink-0 ".concat(o).concat(e).concat(t).concat(n)}},{key:"template",get:function(){return u()}},{key:"elements",get:function(){return{close:".btn-close"}}},{key:"appLinks",get:function(){return this.options.behavior!==s.Dm.Link?{}:{"[this]":{application:a.OV.SEARCH,action:a.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),r.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||r.Radio.channel(this.options.channelName).trigger(this.options.clickEvent,this.model)}},{key:"getTrimmedName",value:function(){var e=this.model.get("name");return e.length>36?"".concat(e.substring(0,36),"..."):e}},{key:"viewOptions",value:function(){return{removable:this.options.removeEvent,trimmedName:this.getTrimmedName()}}},{key:"onRender",value:function(){this.resetClassName()}}],o&&d(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(i.Q.wA);function y(e){return y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},y(e)}function b(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,g(o.key),o)}}function g(e){var t=function(e){if("object"!=y(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=y(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==y(t)?t:t+""}function w(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(w=function(){return!!e})()}function k(e){return k=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},k(e)}function S(e,t){return S=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},S(e,t)}var T=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=k(t),function(e,t){if(t&&("object"==y(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,w()?Reflect.construct(t,n||[],k(e).constructor):t.apply(e,n))}(this,t,[e])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&S(e,t)}(t,e),n=t,(r=[{key:"initialize",value:function(){this.options.behavior!==s.Dm.Edit||this.options.removeEvent||i.Q.Ry.throw(new o.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":"d-flex flex-wrap gap-1");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 m}}])&&b(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(i.Q.$W)},25887:function(e,t,n){"use strict";var o,i,r;n.d(t,{Dm:function(){return o},zM:function(){return i},x_:function(){return r}}),function(e){e[e.Link=1]="Link",e[e.Edit=2]="Edit",e[e.Disabled=3]="Disabled",e[e.Filter=4]="Filter"}(o||(o={})),function(e){e[e.Flex=1]="Flex",e[e.Vertical=2]="Vertical"}(i||(i={})),function(e){e[e.Folder=0]="Folder",e[e.Series=1]="Series"}(r||(r={}))},18974:function(e,t,n){"use strict";n.r(t),n.d(t,{EditVideoView:function(){return ot}});var o=n(48088),i=n(39479),r=n(25417),a=n(99748),s=n(11306),l=n(21679),u=n(57857),c=n(99249),d=n(31647),f=n(52076),h=n(70065),p=n(8371),v=n(13156),m=n(29625),y=n(57098),b=n(29457),g=n(68619),w=n(85847),k=n(19226),S=n(93569),T=n(45837),O=n(24184),E=n(72998),C=n(95168),P=n(44106),j=n.n(P),N=n(99844),D=n(72891),x=n.n(D);function M(e){return M="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},M(e)}function _(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,V(o.key),o)}}function V(e){var t=function(e){if("object"!=M(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=M(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==M(t)?t:t+""}function R(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(R=function(){return!!e})()}function I(e){return I=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},I(e)}function B(e,t){return B=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},B(e,t)}var U=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=I(t),function(e,t){if(t&&("object"==M(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,R()?Reflect.construct(t,n||[],I(e).constructor):t.apply(e,n))}(this,t,[e])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&B(e,t)}(t,e),n=t,(i=[{key:"initialize",value:function(){var e=this;this.listenTo(this.model,"change",(function(){return e.options.viewModel.validate()}))}},{key:"template",get:function(){return x()}},{key:"name",get:function(){return"ExtraInfoItemComponent"}},{key:"regions",value:function(){return{textArea:{el:".text-area-region",replaceElement:!0}}}},{key:"bindings",get:function(){return{"[name=value]":{observe:"value",setOptions:{validate:!0}}}}},{key:"onRender",value:function(){this.showChildView("textArea",new N.F({name:"value",class:"form-control",placeholder:this.model.get("placeholder"),id:"admin-notes"})),this.stickit(),o.Validation.bind(this)}},{key:"onDestroy",value:function(){this.unstickit(),o.Validation.unbind(this)}}])&&_(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,i}(d.Q.wA);function L(e){return L="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},L(e)}function A(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function 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,Q(o.key),o)}}function z(e,t,n){return t&&F(e.prototype,t),n&&F(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Q(e){var t=function(e){if("object"!=L(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=L(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==L(t)?t:t+""}function J(e,t,n){return t=H(t),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)}(e,Z()?Reflect.construct(t,n||[],H(e).constructor):t.apply(e,n))}function Z(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Z=function(){return!!e})()}function H(e){return H=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},H(e)}function K(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&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)}var W=function(e){function t(e){return A(this,t),J(this,t,[e])}return K(t,e),z(t,[{key:"name",get:function(){return"ExtraInfoComponentCollection"}},{key:"childView",get:function(){return U}},{key:"childViewOptions",get:function(){return{viewModel:this.options.viewModel}}}])}(d.Q.$W),Y=function(e){function t(e){return A(this,t),J(this,t,[e])}return K(t,e),z(t,[{key:"name",get:function(){return"ExtraInfoComponent"}},{key:"template",get:function(){return j()}},{key:"className",get:function(){return"border-top pt-3"}},{key:"regions",value:function(){return{fields:{el:".fields-region",replaceElement:!0}}}},{key:"onRender",value:function(){this.showChildView("fields",new W({collection:this.model.fields,viewModel:this.model}))}}])}(d.Q.wA),q=n(88483),X=n(2772),$=n(10101),ee=n(86272),te=n.n(ee);function ne(e){return ne="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ne(e)}function oe(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,ie(o.key),o)}}function ie(e){var t=function(e){if("object"!=ne(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=ne(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ne(t)?t:t+""}function re(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(re=function(){return!!e})()}function ae(e){return ae=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ae(e)}function se(e,t){return se=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},se(e,t)}var le=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=ae(t),function(e,t){if(t&&("object"==ne(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,re()?Reflect.construct(t,n||[],ae(e).constructor):t.apply(e,n))}(this,t,[e])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&se(e,t)}(t,e),n=t,(o=[{key:"initialize",value:function(){this.viewModel=c.r.get("image:storage")}},{key:"name",get:function(){return"EditThumbnailComponent"}},{key:"lang",get:function(){return"libraryEditor.editThumbnail"}},{key:"template",get:function(){return te()}},{key:"behaviors",get:function(){var e=this;return[{behaviorClass:$.YR,channelName:this.options.channelName,buttonSelector:".upload-thumbnail",imageType:b.__.Thumbnails,appLink:{application:y.OV.LIBRARY_EDITOR,action:y.eX.LibraryEditor.UPLOAD_THUMBNAIL,args:[this.options.model.id]},saveImage:function(t){return e.viewModel.set({dataUrl:t})}}]}},{key:"defaults",get:function(){return{editable:!0}}},{key:"regions",value:function(){return{thumbnail:{el:".thumbnail-region",replaceElement:!0}}}},{key:"viewOptions",value:function(){return{editable:this.options.editable,dimensions:y.nq[b.__.Thumbnails]}}},{key:"onRender",value:function(){this.showChildView("thumbnail",new X.Z({model:this.model,thumbnailOptions:{size:q.h2.Medium}}))}}])&&oe(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(d.Q.wA),ue=n(74250),ce=n(17391),de=n(36022),fe=n(3974),he=n(44391),pe=n(25887),ve=n(30992),me=n.n(ve);function ye(e){return ye="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ye(e)}function be(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,ge(o.key),o)}}function ge(e){var t=function(e){if("object"!=ye(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=ye(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ye(t)?t:t+""}function we(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(we=function(){return!!e})()}function ke(e){return ke=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ke(e)}function Se(e,t){return Se=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Se(e,t)}var Te=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=ke(t),function(e,t){if(t&&("object"==ye(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,we()?Reflect.construct(t,n||[],ke(e).constructor):t.apply(e,n))}(this,t,[e])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Se(e,t)}(t,e),n=t,(o=[{key:"name",get:function(){return"TagsComponent"}},{key:"template",get:function(){return me()}},{key:"lang",get:function(){return"libraryEditor.tags"}},{key:"defaults",get:function(){return{headerText:u.T.getPhrase(this.lang,"heading"),orientation:pe.zM.Flex}}},{key:"regions",value:function(){return{tagList:{el:".tag-list-region",replaceElement:!0},tagSelector:{el:".tag-selector-region",replaceElement:!0}}}},{key:"initialize",value:function(){this.options.behavior!==pe.Dm.Edit||this.options.parentId||d.Q.Ry.throw(new s.H("parentId is required to edit tags."))}},{key:"getTypeaheadConfigs",value:function(){var e=fe.M.getTypeaheadConfig(),t=fe.M.getBloodhoundConfig(),n={newType:y.n8.TagsRaw},o={newType:y.n8.TagsRaw,footerTemplate:ce.J.getConfirmSelectionTemplate()};return[{name:y.n8.TagsRaw,typeaheadConfig:e,bloodhoundConfig:t,options:{hideEmptyResults:!0}},{name:"add-new",typeaheadConfig:e,bloodhoundConfig:t,options:n},{name:"empty-suggestion",typeaheadConfig:e,bloodhoundConfig:t,options:o}]}},{key:"viewOptions",value:function(){var e;return this.showEmptyStateText()&&(e=this.options.emptyStateText),{headerText:this.options.headerText,editable:this.options.behavior===pe.Dm.Edit,emptyStateText:e}}},{key:"showEmptyStateText",value:function(){return this.options.behavior!==pe.Dm.Edit&&!this.collection.length&&!!this.options.emptyStateText}},{key:"renderTagSelector",value:function(){this.options.behavior===pe.Dm.Edit&&this.showChildView("tagSelector",new de.M({model:this.model,parentChannelName:this.options.channelName,inputId:"tag-select",selectEvent:"add:tag",typeaheadConfigs:this.getTypeaheadConfigs(),placeholderText:u.T.getPhrase(this.lang,"placeholder"),callbacks:{onRender:ce.J.selectFirstResult,onBlur:ce.J.clearInputOnBlur},typeaheadOptions:{hint:!1},actionOptions:{clearOnSelect:!0},autofocus:this.options.autofocus}))}},{key:"renderTagList",value:function(){this.showEmptyStateText()||this.showChildView("tagList",new he.K({collection:this.collection,channelName:this.options.channelName,behavior:this.options.behavior,orientation:this.options.orientation,removeEvent:this.options.removeEvent}))}},{key:"onRender",value:function(){this.renderTagSelector(),this.renderTagList()}}])&&be(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(d.Q.wA),Oe=n(58259),Ee=n.n(Oe);function Ce(e){return Ce="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ce(e)}function Pe(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,je(o.key),o)}}function je(e){var t=function(e){if("object"!=Ce(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Ce(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ce(t)?t:t+""}function Ne(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Ne=function(){return!!e})()}function De(e){return De=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},De(e)}function xe(e,t){return xe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},xe(e,t)}var Me=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=De(t),function(e,t){if(t&&("object"==Ce(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Ne()?Reflect.construct(t,n||[],De(e).constructor):t.apply(e,n))}(this,t,[e])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&xe(e,t)}(t,e),n=t,(o=[{key:"name",get:function(){return"CollapseButtonComponent"}},{key:"className",get:function(){return"d-inline-block cursor-pointer expand-details info-link mb-3"}},{key:"lang",get:function(){return"libraryEditor.collapseButton"}},{key:"template",get:function(){return Ee()}},{key:"events",value:function(){return{click:"onClick"}}},{key:"onClick",value:function(){this.options.onClick()}},{key:"viewOptions",value:function(){return{showMorePhrase:this.options.collapse?"showMore":"showLess"}}}])&&Pe(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(d.Q.wA),_e=n(23468),Ve=n.n(_e),Re={suggestEdit:"AgfOM"};function Ie(e){return Ie="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ie(e)}function Be(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,Ue(o.key),o)}}function Ue(e){var t=function(e){if("object"!=Ie(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Ie(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ie(t)?t:t+""}function Le(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Le=function(){return!!e})()}function Ae(e){return Ae=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ae(e)}function Fe(e,t){return Fe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Fe(e,t)}var ze=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=Ae(t),function(e,t){if(t&&("object"==Ie(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Le()?Reflect.construct(t,n||[],Ae(e).constructor):t.apply(e,n))}(this,t,[e])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Fe(e,t)}(t,e),n=t,(o=[{key:"initialize",value:function(){var e=this;this.listenTo(this.options.channelName,"update:tags",(function(){return e.renderCustomerTags(!0)})),this.initializeCollapse()}},{key:"name",get:function(){return"EditVideoDetailsComponent"}},{key:"className",get:function(){return"edit-video-detail py-3"}},{key:"lang",get:function(){return"libraryEditor.editVideoDetails"}},{key:"template",get:function(){return Ve()}},{key:"appLinks",get:function(){return{".suggest-edit":{application:y.OV.LIBRARY_EDITOR,action:y.eX.LibraryEditor.SUGGEST_AN_EDIT,args:[this.model.id]}}}},{key:"events",value:function(){return{"click .expand-details":"onClickExpandDetails"}}},{key:"elements",get:function(){return{expandable:".collapse-area"}}},{key:"regions",value:function(){return{topSave:{el:".top-save-region",replaceElement:!0},bottomSave:{el:".bottom-save-region",replaceElement:!0},thumbnail:{el:".thumbnail-region",replaceElement:!0},basicInfo:{el:".basic-info-region",replaceElement:!0},collapseButton:{el:".collapse-button-region",replaceElement:!0},additionalInfo:{el:".additional-details-region",replaceElement:!0},productionInfo:{el:".production-info-region",replaceElement:!0},fields:{el:".fields-region",replaceElement:!0},clickViewTags:{el:".cv-tags-region",replaceElement:!1},customerTags:{el:".customer-tags-region",replaceElement:!0}}}},{key:"initializeCollapse",value:function(){var e,t,n,o,i,r;this.collapse=!(this.model.get("broadcastDate")||(null===(e=this.model.channel)||void 0===e?void 0:e.get("id"))||this.model.get("productionYear")||(null===(t=this.model.productionCompanies)||void 0===t?void 0:t.any((function(e){return e.get("id")})))||(null===(n=this.model.distributors)||void 0===n?void 0:n.any((function(e){return e.get("id")})))||(null===(o=this.model.producers)||void 0===o?void 0:o.any((function(e){return e.get("id")})))||(null===(i=this.model.directors)||void 0===i?void 0:i.any((function(e){return e.get("id")})))||(null===(r=this.model.fields)||void 0===r?void 0:r.any((function(e){return e.get("id")>0}))))}},{key:"onClickCollapse",value:function(){this.collapse=!this.collapse,this.renderCollapseButton(),this.collapse?this.getUI("expandable").hide():this.getUI("expandable").show()}},{key:"renderSave",value:function(){this.options.editable&&this.showChildView("topSave",new ue.z({channelName:this.options.channelName,allowUndo:!0,isDisabled:this.options.isSaveDisabled,hasChanges:this.options.hasChanges,extraClasses:"float-end"})),this.showChildView("bottomSave",new ue.z({channelName:this.options.channelName,allowUndo:!0,isDisabled:this.options.isSaveDisabled,hasChanges:this.options.hasChanges,extraClasses:"float-end"}))}},{key:"renderBasicInfo",value:function(){this.showChildView("basicInfo",new E.J({model:this.model,ratings:this.options.ratings,channelName:this.options.channelName,editable:this.options.editable,showingSaveButton:this.options.editable}))}},{key:"renderThumbnail",value:function(){this.showChildView("thumbnail",new le({model:this.model,channelName:this.options.channelName,editable:this.options.editable}))}},{key:"renderCollapseButton",value:function(){this.showChildView("collapseButton",new Me({onClick:this.onClickCollapse.bind(this),collapse:this.collapse}))}},{key:"renderAdditionalInfo",value:function(){this.options.currentUser.get("instanceRegion")!==p.b.US&&this.showChildView("additionalInfo",new O.a({model:this.model,channelName:this.options.channelName,editable:this.options.editable}))}},{key:"renderProductionInfo",value:function(){this.showChildView("productionInfo",new C.O({model:this.model,channelName:this.options.channelName,editable:this.options.editable}))}},{key:"renderFields",value:function(){this.options.currentUser.get("instanceRegion")!==p.b.US&&this.showChildView("fields",new Y({model:this.model,channelName:this.options.channelName}))}},{key:"renderClickViewTags",value:function(){if(!this.options.editable){var e=S.BK.filterObjectsByOwnerType(this.model.tags,T.N.ClickView,this.options.currentUser.get("customerId"));this.showChildView("clickViewTags",new Te({parentId:this.model.get("id"),collection:e,orientation:pe.zM.Flex,behavior:pe.Dm.Disabled,channelName:this.options.channelName,headerText:u.T.getPhrase(this.lang,"clickviewTags"),emptyStateText:u.T.getPhrase(this.lang,"clickviewTagsEmpty")}))}}},{key:"renderCustomerTags",value:function(e){var t=S.BK.filterObjectsByOwnerType(this.model.tags,T.N.Customer,this.options.currentUser.get("customerId"));this.showChildView("customerTags",new Te({parentId:this.model.get("id"),collection:t,channelName:this.options.channelName,behavior:pe.Dm.Edit,headerText:this.options.editable?u.T.getPhrase(this.lang,"tags"):u.T.getPhrase(this.lang,"customerTags"),removeEvent:"remove:tag",autofocus:!!e}))}},{key:"renderTags",value:function(){this.renderClickViewTags(),this.renderCustomerTags()}},{key:"viewOptions",value:function(){return{styles:Re,editable:this.options.editable,suggestEditClasses:"info-link text-underline suggest-edit",isExchange:S.M2.isExchangeVideo(this.model),collapse:this.collapse}}},{key:"onRender",value:function(){this.renderSave(),this.renderBasicInfo(),this.renderThumbnail(),this.renderTags(),this.renderCollapseButton(),this.renderAdditionalInfo(),this.renderProductionInfo(),this.renderFields()}}])&&Be(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(d.Q.wA),Qe=n(21053),Je=n(40622),Ze=n(53854),He=n(75535),Ke=n(95061),Ge=n(57785),We=n(55230),Ye=n.n(We);function qe(e){return qe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},qe(e)}function Xe(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,$e(o.key),o)}}function $e(e){var t=function(e){if("object"!=qe(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=qe(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==qe(t)?t:t+""}function et(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(et=function(){return!!e})()}function tt(e){return tt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},tt(e)}function nt(e,t){return nt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},nt(e,t)}var ot=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=function(e,t,n){return t=tt(t),function(e,t){if(t&&("object"==qe(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,et()?Reflect.construct(t,n||[],tt(e).constructor):t.apply(e,n))}(this,t,[e])).editable=!1,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&nt(e,t)}(t,e),n=t,T=[{key:"name",get:function(){return"EditVideoView"}},{key:"title",get:function(){return this.model&&this.model.get("name")}},{key:"lang",get:function(){return"libraryEditor.editVideo"}},{key:"className",get:function(){return"bg-white p-3 rounded"}},{key:"channelName",get:function(){return"".concat(this.name,":").concat(this.cid)}},{key:"viewModelName",get:function(){return"".concat(this.name,":").concat(this.options.videoId)}},{key:"template",get:function(){return Ye()}},{key:"regions",value:function(){return{tabs:{el:".tab-region",replaceElement:!0,partialLoading:b.LP.EditVideoTabs},content:{el:".edit-content-region",replaceElement:!0,partialLoading:b.LP.EditVideoDetails}}}},{key:"initialize",value:function(){this.navLock=l.u.getInstance(y.K9.NavLock,this),this.initDataListeners(),S.Si.initBackButton(),this.initServices()}},{key:"initServices",value:function(){this.videoDataService=l.u.getInstance(y.Or.Video,this),this.tagDataService=l.u.getInstance(y.Or.Tags,this),this.seriesDataService=l.u.getInstance(y.Or.Series,this),this.ratingsDataService=l.u.getInstance(y.Or.Ratings,this),this.fieldsDataService=l.u.getInstance(y.Or.Fields,this),this.alertService=l.u.getInstance(y.K9.Alerts,this),this.personDataService=l.u.getInstance(y.Or.Person,this),this.companyDataService=l.u.getInstance(y.Or.Company,this)}},{key:"initDataListeners",value:function(){this.listenTo(r.G.SHELL,d.Q.Vy.NAV_UNLOCKED_BY_USER,this.onNavigateAway),this.listenTo(y.Vk.VIDEO,"videos:".concat(this.options.videoId,":sync"),this.render),this.listenTo(y.Vk.VIDEO,"videos:".concat(this.options.videoId,":error"),this.onError),this.listenTo(y.Vk.RATINGS,"".concat(y.M_.RATINGS,":sync"),this.render),this.listenTo(y.Vk.VIDEO,"".concat(y.M_.UPDATE_VIDEO_THUMBNAIL,":").concat(this.options.videoId,":sync"),this.onThumbnailUpdated),this.listenTo(this.channelName,"select:rating",i.partial(this.onTypeaheadSelection,i,"rating")),this.listenTo(this.channelName,"select:channel",i.partial(this.onTypeaheadSelection,i,"channel")),this.listenTo(this.channelName,"select:series",this.onSelectSeries),this.listenTo(this.channelName,"add:season",this.onSelectSeason),this.listenTo(this.channelName,"add:distributors",this.onSelectDistributor),this.listenTo(this.channelName,"add:productionCompanies",this.onSelectProductionCompany),this.listenTo(this.channelName,"add:directors",this.onSelectDirector),this.listenTo(this.channelName,"add:producers",this.onSelectProducer),this.listenTo(this.channelName,"add:tag",this.onAddTag),this.listenTo(this.channelName,"remove:distributors",this.onRemoveDistributor),this.listenTo(this.channelName,"remove:productionCompanies",this.onRemoveProductionCompany),this.listenTo(this.channelName,"remove:directors",this.onRemoveDirector),this.listenTo(this.channelName,"remove:producers",this.onRemoveProducer),this.listenTo(this.channelName,"remove:tag",this.onRemoveTag),this.listenTo(this.channelName,Je.NT.Save,this.onSave),this.listenTo(this.channelName,Je.NT.Undo,this.onUndo),this.listenTo(this.channelName,Je.NT.DetectInput,this.onTypeaheadInput),this.listenTo(this.channelName,"image:load",this.onBeforeThumbnailUpload)}},{key:"onError",value:function(e){switch(e.type){case a.h.NotFound:d.Q.Ry.throw(new He.l);break;case a.h.Forbidden:d.Q.Ry.throw(new Ze.a)}}},{key:"onTypeaheadSelection",value:function(e,t,n){if(n){var o=this.viewModel.get(t),r=o.filter({name:e.name});i.each(r,(function(e){return o.remove(e)})),o.add(e)}else this.viewModel.set(t,e);this.onModelChange(e,{manualUpdate:!0})}},{key:"onTypeaheadInput",value:function(e,t,n){e.get("name")||(n&&n.isCollection?this.viewModel.get(t).remove(e.get("id"),{silent:!0}):this.viewModel.get(t).clear({silent:!0}),this.onModelChange(null,{manualUpdate:!0}),"series"===t&&(this.validateSeries(),o.Radio.channel(this.channelName).trigger("clear:series")))}},{key:"onSelectSeries",value:function(e){var t=this;e.id?this.seriesDataService.getSeries(e.id,(function(e){t.viewModel.unset("season"),t.viewModel.set("episodeNumber",null),t.onTypeaheadSelection(e.toJSON(),"series")})):e.name&&this.seriesDataService.createSeries(e.name,(function(e){t.viewModel.unset("season"),t.viewModel.set("episodeNumber",null),t.onTypeaheadSelection({id:e.id},"series")}))}},{key:"onSelectSeason",value:function(e){var t=this;if(i.isNull(e))return this.viewModel.get("season").clear({silent:!0}),this.viewModel.set("episodeNumber",null),S.yV.deselectAll(this.viewModel.get("series.seasons")),void this.onModelChange(null,{manualUpdate:!0});if(e.id)return this.viewModel.set("season",e),S.yV.setSelected(e.id,this.viewModel.get("series.seasons")),void this.onModelChange(e,{manualUpdate:!0});if(e.number){var n=this.viewModel.get("series.id");this.seriesDataService.createSeason(e,n,(function(e){t.viewModel.set("season",e.toJSON()),!t.viewModel.get("series.seasons")&&t.viewModel.get("series").set("seasons",new m.i),t.viewModel.get("series.seasons").add(e.toJSON()),S.yV.setSelected(e.id,t.viewModel.get("series.seasons")),t.onModelChange(e.toJSON(),{manualUpdate:!0}),t.render()}))}}},{key:"onSelectDistributor",value:function(e){var t=this;e.id?this.onTypeaheadSelection(e,"distributors",!0):e.name&&this.companyDataService.createCompany(e.name,(function(e){t.onTypeaheadSelection(e.toJSON(),"distributors",!0)}))}},{key:"onSelectProductionCompany",value:function(e){var t=this;e.id?this.onTypeaheadSelection(e,"productionCompanies",!0):e.name&&this.companyDataService.createCompany(e.name,(function(e){t.onTypeaheadSelection(e.toJSON(),"productionCompanies",!0)}))}},{key:"onSelectDirector",value:function(e){var t=this;e.id?this.onTypeaheadSelection(e,"directors",!0):e.name&&this.personDataService.createPerson(e.name,(function(e){t.onTypeaheadSelection(e.toJSON(),"directors",!0)}))}},{key:"onSelectProducer",value:function(e){var t=this;e.id?this.onTypeaheadSelection(e,"producers",!0):e.name&&this.personDataService.createPerson(e.name,(function(e){t.onTypeaheadSelection(e.toJSON(),"producers",!0)}))}},{key:"onRemoveDistributor",value:function(e){this.removeFromCollection(e,"distributors")}},{key:"onRemoveProductionCompany",value:function(e){this.removeFromCollection(e,"productionCompanies")}},{key:"onRemoveDirector",value:function(e){this.removeFromCollection(e,"directors")}},{key:"onRemoveProducer",value:function(e){this.removeFromCollection(e,"producers")}},{key:"removeFromCollection",value:function(e,t){e&&e.id&&t&&(this.viewModel.get(t).remove(e.id),this.onModelChange(null,{manualUpdate:!0}))}},{key:"onAddTag",value:function(e){var t=this;if(e&&e.name){var n=e.name.trim().toLowerCase();if(n&&!S.yV.findModelByName(n,this.viewModel.tags)){var i=new g.V({name:n});this.viewModel.tags.add(i),this.tagDataService.createTag(n,this.model.get("id"),(function(e){i.set(e.toJSON()),o.Radio.channel(t.channelName).trigger("update:tags")}))}}}},{key:"onRemoveTag",value:function(e){var t=this;e instanceof g.V&&e.id&&this.tagDataService.dissociateTag(e.id,this.model.get("id"),(function(){t.viewModel.tags.remove(e),o.Radio.channel(t.channelName).trigger("update:tags"),t.logDissocAction(t.model.get("id"),e,h.py.Tag)}))}},{key:"saveFields",value:function(e,t){var n=this,o=0;e.updatedVideo=i.extend({},e.updatedVideo||{});var r=function(){++o===e.dataChanges.fields.length&&t(e)};i.each(e.dataChanges.fields,(function(e){if(e.id&&!e.value)return n.viewModel.fields.remove(n.viewModel.fields.findWhere({id:e.id})),void n.fieldsDataService.deleteField(e.id,r);!e.id||e.id>0?n.fieldsDataService.updateField(e,r):n.fieldsDataService.addField(n.options.videoId,e,(function(t){n.viewModel.fields.findWhere({id:e.id}).set("id",t.id),r()}))}))}},{key:"bulkDissoc",value:function(e,t){this.videoDataService.bulkDissoc(this.model.id,e.pendingDissocs,(function(){t(e)}))}},{key:"saveVideo",value:function(e,t){var n=this,o=i.omit(e.dataChanges,"fields");if(i.isEmpty(o))t(e);else{var r=i.omit(e.dataChanges,"fields");this.videoDataService.updateVideo(this.model.get("id"),this.folder.get("id"),r,(function(o){(e.dataChanges.series&&e.dataChanges.series.id||e.dataChanges.episodeNumber||e.dataChanges.season)&&n.videoDataService.clearVideoCache(),e.updatedVideo=i.extend({},e.updatedVideo||{},o),t(e)}))}}},{key:"afterSave",value:function(e){if(this.viewModel){e.updatedVideo&&this.updateState(e.updatedVideo),this.unlockNav(),this.updateSaveButton(Je.NT.DisableSave),this.logEditAction(e.dataChanges,h.eu.Save);var t=v.J.updatedVideoAlert(this.viewModel.get("name"));this.alertService.success(t||"Video was successfully updated")()}}},{key:"onSave",value:function(){if(this.viewModel.validate(),!1===this.viewModel.isValid())return this.updateSaveButton(Je.NT.CancelSave),!1;this.validateSeries();var e=Ge.xC.getChanges(this.model,this.viewModel),t=Ge.xC.getRemovedObjectIds(this.model,this.viewModel);if(!e&&!i.keys(t).length)return this.updateSaveButton(Je.NT.CancelSave),!1;var n=new d.Q.dM;return e&&e.fields&&n.useAsync(i.bind(this.saveFields,this)),t&&i.keys(t).length&&n.useAsync(i.bind(this.bulkDissoc,this)),this.editable&&n.useAsync(i.bind(this.saveVideo,this)),n.useAsync(i.bind(this.afterSave,this)),n.goAsync({dataChanges:e,pendingDissocs:t},null),!1}},{key:"onUndo",value:function(){var e=this;new S.Mr({title:u.T.getPhrase(this.lang,"undoTitle"),text:u.T.getPhrase(this.lang,"undoBody",{videoName:this.model.get("name")}),buttons:[{text:u.T.getPhrase(this.lang,"undo"),className:"btn btn-danger",success:!0},{text:u.T.getPhrase(this.lang,"cancel"),className:"btn btn-link",close:!0}]}).render().done((function(){e.logEditAction({},h.eu.Discard),e.revertState({undo:!0}),e.render()}))}},{key:"updateState",value:function(e){this.stopListening(this.viewModel),Ge.xC.updateModelState(this.model,this.viewModel,e),c.r.clear(this.viewModelName),this.getViewModel(),this.renderContent(),this.renderTabs()}},{key:"onNavigateAway",value:function(){this.revertState()}},{key:"revertState",value:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).undo;this.stopListening(this.viewModel),c.r.clear(this.viewModelName),delete this.viewModel,this.unlockNav(),e&&this.getViewModel()}},{key:"lockNav",value:function(){this.navLock.lock({title:u.T.getPhrase(this.lang,"navLockHeading"),text:u.T.getPhrase(this.lang,"navLockBody")})}},{key:"unlockNav",value:function(){this.navLock.unlock()}},{key:"onBeforeThumbnailUpload",value:function(){this.navLock.isLocked()&&(this.navLock.unlock(),c.r.get("upload:thumbnail:options").set("lockNav",!0))}},{key:"onModelChange",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(t.stickitChange||t.manualUpdate)if(this.viewModel.validate(),!1!==this.viewModel.isValid()){if(!Ge.xC.getChanges(this.model,this.viewModel)&&!i.keys(Ge.xC.getRemovedObjectIds(this.model,this.viewModel)).length)return this.unlockNav(),void this.updateSaveButton(Je.NT.DisableSave);this.lockNav(),this.updateSaveButton(Je.NT.EnableSave)}else this.updateSaveButton(Je.NT.DisableSave)}},{key:"updateSaveButton",value:function(e){var t=o.Radio.channel(this.channelName),n=Je.NT.EnableSave,i=Je.NT.DisableSave,r=Je.NT.CancelSave;switch(e){case n:return void t.trigger(n);case i:return void t.trigger(i);case r:return void t.trigger(r)}d.Q.Ry.throw(new s.H("Save action type is not valid."))}},{key:"onThumbnailUpdated",value:function(){var e=this;this.videoDataService.clearCacheAndGetVideo(this.options.videoId,(function(t){e.model=t,e.viewModel.set("thumbnail",e.model.thumbnail.toJSON())}))}},{key:"logEditAction",value:function(e,t){var n=Object.assign({id:this.model.get("id")},e);f.k.logUserAction(n,{actionType:h.Vw.Edit,entity:h.py.Video,location:h.LZ.EditVideoDetails,workflowPhase:t})}},{key:"logDissocAction",value:function(e,t,n){var o=Object.assign({videoId:e},t.pick("id","name"));f.k.logUserAction(o,{actionType:h.Vw.Dissociate,entity:n,location:h.LZ.EditVideoDetails})}},{key:"onValidation",value:function(e){this.viewModel.set("disabled",!e)}},{key:"getViewModel",value:function(){this.model.fields&&this.model.fields.length||this.model.set("fields",(0,Ge.aj)()),this.viewModel=c.r.get(this.viewModelName,this.model.toJSON(),{ctor:w.n}),this.editable&&(this.viewModel.addValidation(Ge.rr),this.viewModel.addValidation(Ge.tD));var e=this.currentUser.get("instanceRegion")!==p.b.US;e&&this.viewModel.addValidation(Ge.oJ),this.listenTo(this.viewModel,"validated",this.onValidation),this.listenTo(this.viewModel,"change",this.onModelChange),this.listenTo(this.viewModel,"change:dateBroadcast",i.partial(this.onModelChange,i,{manualUpdate:!0})),this.viewModel.fields&&e&&(this.viewModel.fields&&this.viewModel.fields.each((function(e){return e.addValidation(Ge.Zg)})),this.listenTo(this.viewModel.fields,"change",this.onModelChange))}},{key:"validateSeries",value:function(){this.viewModel.get("series.id")||(this.viewModel.unset("season"),this.viewModel.set("episodeNumber",null))}},{key:"fetchData",value:function(){this.model=this.videoDataService.getVideo(this.options.videoId),this.ratings=this.ratingsDataService.getAllRatings(),this.model&&(this.editable=S.BK.canEditVideo(this.model),this.folder=this.model.categories.first(),this.ratings&&(this.viewModel instanceof w.n||this.getViewModel()))}},{key:"requiredResources",get:function(){return{currentUser:k.K.currentUser,libraries:Ke.T.libraries}}},{key:"onBeforeRender",value:function(){return this.fetchData(),!!this.model&&!!this.ratings&&!!this.viewModel}},{key:"renderContent",value:function(){var e=Ge.xC.getChanges(this.model,this.viewModel)||i.keys(Ge.xC.getRemovedObjectIds(this.model,this.viewModel)).length;this.showChildView("content",new ze({model:this.viewModel,ratings:this.ratings,channelName:this.channelName,isSaveDisabled:!e,hasChanges:!!e,editable:this.editable,currentUser:this.currentUser}))}},{key:"renderTabs",value:function(){this.showChildView("tabs",new Qe.W({model:this.viewModel,tabs:S.Si.getEditVideoTabs(this.options.videoId,this.editable),activeTab:".edit-video-applink",context:"edit",folder:this.folder,libraries:this.libraries}))}},{key:"onRender",value:function(){this.renderTabs(),this.renderContent()}}],T&&Xe(n.prototype,T),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,T}(d.Q.G7)},86272:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({1:function(e,t,n,o,i){return e.propertyIsEnumerable,"<h5>"+e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"label",{name:"lang",hash:{},data:i}))+"</h5>\n"},3:function(e,t,n,o,i){return"my-2"},5:function(e,t,n,o,i){e.propertyIsEnumerable;var r,a=null!=t?t:e.nullContext||{},s=e.hooks.helperMissing,l=e.escapeExpression;return' <div class="text-secondary mt-3 mb-1"><em>'+l((n.lang||t&&t.lang||s).call(a,"recommendedSize",{name:"lang",hash:{height:null!=(r=null!=(r=null!=t?t.options:t)?r.dimensions:r)?r.height:r,width:null!=(r=null!=(r=null!=t?t.options:t)?r.dimensions:r)?r.width:r},data:i}))+'</em></div>\n <button class="upload-thumbnail btn btn-outline-dark mb-3 w-100">'+l((n.lang||t&&t.lang||s).call(a,"upload",{name:"lang",hash:{},data:i}))+"</button>\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){e.propertyIsEnumerable;var r,a=null!=t?t:e.nullContext||{};return(null!=(r=n.if.call(a,null!=(r=null!=t?t.options:t)?r.editable:r,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?r:"")+'<div class="thumbnail-region"></div>\n<div class="'+(null!=(r=n.unless.call(a,null!=(r=null!=t?t.options:t)?r.editable:r,{name:"unless",hash:{},fn:e.program(3,i,0),inverse:e.noop,data:i}))?r:"")+'">\n'+(null!=(r=n.if.call(a,null!=(r=null!=t?t.options:t)?r.editable:r,{name:"if",hash:{},fn:e.program(5,i,0),inverse:e.noop,data:i}))?r:"")+"</div>"},useData:!0})},43791:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){var r;return e.propertyIsEnumerable,'<h1 class="h3">\n '+e.escapeExpression("function"==typeof(r=null!=(r=n.name||(null!=t?t.name:t))?r:e.hooks.helperMissing)?r.call(null!=t?t:e.nullContext||{},{name:"name",hash:{},data:i}):r)+'\n</h2>\n<div class="breadcrumbs-region"></div>\n<div class="tabs-region ps-2"></div>'},useData:!0})},23468:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({1:function(e,t,n,o,i){return"mb-4"},3:function(e,t,n,o,i){var r;return e.propertyIsEnumerable,' <p class="mb-2 py-1 px-2 alert alert-info '+e.escapeExpression(e.lambda(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.suggestEdit:r,t))+'">\n'+(null!=(r=n.if.call(null!=t?t:e.nullContext||{},null!=(r=null!=t?t.options:t)?r.isExchange:r,{name:"if",hash:{},fn:e.program(4,i,0),inverse:e.program(6,i,0),data:i}))?r:"")+" </p>\n"},4:function(e,t,n,o,i){var r;return e.propertyIsEnumerable," "+(null!=(r=(n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"suggestEditExchange",{name:"lang",hash:{classNames:null!=(r=null!=t?t.options:t)?r.suggestEditClasses:r},data:i}))?r:"")+"\n"},6:function(e,t,n,o,i){var r;return e.propertyIsEnumerable," "+(null!=(r=(n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"suggestEdit",{name:"lang",hash:{classNames:null!=(r=null!=t?t.options:t)?r.suggestEditClasses:r},data:i}))?r:"")+"\n"},8:function(e,t,n,o,i){return"none"},10:function(e,t,n,o,i){return"block"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){e.propertyIsEnumerable;var r,a=null!=t?t:e.nullContext||{};return'<div class="row">\n <div class="left-pane col-4">\n <div class="thumbnail-region"></div>\n <div class="cv-tags-region '+(null!=(r=n.unless.call(a,null!=(r=null!=t?t.options:t)?r.editable:r,{name:"unless",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?r:"")+'"></div>\n <div class="customer-tags-region"></div>\n </div>\n <div class="right-pane col-8">\n'+(null!=(r=n.unless.call(a,null!=(r=null!=t?t.options:t)?r.editable:r,{name:"unless",hash:{},fn:e.program(3,i,0),inverse:e.noop,data:i}))?r:"")+' <div class="top-save-region"></div>\n <div class="basic-info-region mb-4"></div> \n <div class="collapse-button-region"></div>\n <div class="collapse-area" style="display: '+(null!=(r=n.if.call(a,null!=(r=null!=t?t.options:t)?r.collapse:r,{name:"if",hash:{},fn:e.program(8,i,0),inverse:e.program(10,i,0),data:i}))?r:"")+';">\n <div class="additional-details-region"></div> \n <div class="production-info-region mb-4"></div> \n <div class="fields-region mb-4"></div>\n </div>\n <div class="bottom-save-region"></div>\n </div>\n</div>'},useData:!0})},58259:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){var r;return e.propertyIsEnumerable,e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},null!=(r=null!=t?t.options:t)?r.showMorePhrase:r,{name:"lang",hash:{},data:i}))},useData:!0})},99724:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({1:function(e,t,n,o,i){e.propertyIsEnumerable;var r,a=e.escapeExpression;return'<span class="text-secondary mx-2 undo '+a(e.lambda(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.undo:r,t))+'">'+a((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"undo",{name:"lang",hash:{},data:i}))+"</span>\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){var r;return e.propertyIsEnumerable,(null!=(r=n.if.call(null!=t?t:e.nullContext||{},null!=(r=null!=t?t.options:t)?r.allowUndo:r,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?r:"")+'<div class="save-region"></div>'},useData:!0})},15564:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({1:function(e,t,n,o,i){return'<span class="btn-close cursor-pointer" role="button" aria-label="Close"></span>\n'},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){e.propertyIsEnumerable;var r,a,s=null!=t?t:e.nullContext||{},l=e.escapeExpression;return'<span title="'+l("function"==typeof(a=null!=(a=n.name||(null!=t?t.name:t))?a:e.hooks.helperMissing)?a.call(s,{name:"name",hash:{},data:i}):a)+'">'+l(e.lambda(null!=(r=null!=t?t.options:t)?r.trimmedName:r,t))+"</span>\n"+(null!=(r=n.if.call(s,null!=(r=null!=t?t.options:t)?r.removable:r,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?r:"")},useData:!0})},30992:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({1:function(e,t,n,o,i){var r;return e.propertyIsEnumerable,"<h5>"+e.escapeExpression(e.lambda(null!=(r=null!=t?t.options:t)?r.headerText:r,t))+"</h5>\n"},3:function(e,t,n,o,i){var r;return e.propertyIsEnumerable,"<p>"+e.escapeExpression(e.lambda(null!=(r=null!=t?t.options:t)?r.emptyStateText:r,t))+"</p>\n"},5:function(e,t,n,o,i){return'<div class="tag-selector-region"></div>\n'},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){e.propertyIsEnumerable;var r,a=null!=t?t:e.nullContext||{};return(null!=(r=n.if.call(a,null!=(r=null!=t?t.options:t)?r.headerText:r,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?r:"")+(null!=(r=n.if.call(a,null!=(r=null!=t?t.options:t)?r.emptyStateText:r,{name:"if",hash:{},fn:e.program(3,i,0),inverse:e.noop,data:i}))?r:"")+(null!=(r=n.if.call(a,null!=(r=null!=t?t.options:t)?r.editable:r,{name:"if",hash:{},fn:e.program(5,i,0),inverse:e.noop,data:i}))?r:"")+'<div class="tag-list-region"></div>'},useData:!0})},55230:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){return'<div class="dialog-region"></div>\n<div class="tab-region"></div>\n<div class="edit-content-region"></div>'},useData:!0})},44106:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){return'<h5 class="mb-0">Extra Information</h5>\n<div class="text-secondary mb-3">This information is only visible to administrators and will not be searchable</div>\n<div class="fields-region"></div>'},useData:!0})},72891:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){var r;return e.propertyIsEnumerable,'<div class="form-group">\n <label for="edit-description">'+e.escapeExpression("function"==typeof(r=null!=(r=n.name||(null!=t?t.name:t))?r:e.hooks.helperMissing)?r.call(null!=t?t:e.nullContext||{},{name:"name",hash:{},data:i}):r)+'</label>\n <div class="text-area-region"></div>\n <div class="form-feedback"></div>\n</div>'},useData:!0})}}]);
|
|
1
|
+
(self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[2601],{21053:function(e,t,n){"use strict";n.d(t,{W:function(){return b}});var o=n(43823),i=n(57857),r=n(31647),a=n(57085),s=n(35630),l=n(57098),u=n(43791),c=n.n(u),d={svgContainer:"mtegw"};function f(e){return f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},f(e)}function h(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,p(o.key),o)}}function p(e){var t=function(e){if("object"!=f(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=f(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==f(t)?t:t+""}function v(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(v=function(){return!!e})()}function m(e){return m=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},m(e)}function y(e,t){return y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},y(e,t)}var b=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=m(t),function(e,t){if(t&&("object"==f(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,v()?Reflect.construct(t,n||[],m(e).constructor):t.apply(e,n))}(this,t,[e])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&y(e,t)}(t,e),n=t,(r=[{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 c()}},{key:"viewOptions",value:function(){return{styles:d}}},{key:"onSave",value:function(){o.Radio.channel(l.OV.LIBRARY_EDITOR).trigger(l.eX.LibraryEditor.SAVE_VIDEO)}},{key:"getLocationBreadcrumb",value:function(){switch(this.options.context){case"edit":return{name:i.T.getPhrase(this.lang,"videoDetails")};case"chapters":return{name:i.T.getPhrase(this.lang,"chapters")};case"resources":return{name:i.T.getPhrase(this.lang,"resources")}}}},{key:"onRender",value:function(){this.showChildView("tabs",new s.n({tabs:this.options.tabs,activeTab:this.options.activeTab})),this.showChildView("breadcrumbs",new a.n({folder:this.options.folder,libraries:this.options.libraries,video:this.model,customBreadcrumbs:[this.getLocationBreadcrumb()],enableLastItemAppLink:!1}))}}])&&h(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(r.Q.wA)},74250:function(e,t,n){"use strict";n.d(t,{z:function(){return g}});var o=n(43823),i=n(57857),r=n(31647),a=n(88172),s=n(93569),l=n(40622),u=n(99724),c=n.n(u),d={saveButton:"G_FDK",undo:"dcV70"};function f(e){return f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},f(e)}function h(e,t,n){return(t=v(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,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,v(o.key),o)}}function v(e){var t=function(e){if("object"!=f(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=f(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==f(t)?t:t+""}function m(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(m=function(){return!!e})()}function y(e){return y=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},y(e)}function b(e,t){return b=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},b(e,t)}var g=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=y(t),function(e,t){if(t&&("object"==f(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,m()?Reflect.construct(t,n||[],y(e).constructor):t.apply(e,n))}(this,t,[e])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&b(e,t)}(t,e),n=t,u=[{key:"name",get:function(){return"SaveComponent"}},{key:"template",get:function(){return c()}},{key:"className",get:function(){return"save-component ".concat(this.options.extraClasses)}},{key:"lang",get:function(){return"libraryEditor.save"}},{key:"getParentChannel",value:function(){return o.Radio.channel(this.options.channelName)}},{key:"getSaveChannelName",value:function(){return"".concat(this.name,":").concat(this.cid)}},{key:"regions",value:function(){return{save:{el:".save-region",replaceElement:!0}}}},{key:"events",value:function(){return{"click .undo":"onUndo"}}},{key:"initialize",value:function(){this.model||(this.model=new r.Q.Hn(h(h({},a.ZV.ShowSpinner,this.options.showSpinner),a.ZV.Disabled,this.options.isDisabled)));var e=this.options.channelName;this.listenTo(e,l.NT.DisableSave,this.onDisableSave),this.listenTo(e,l.NT.EnableSave,this.onEnableSave),this.listenTo(e,l.NT.CancelSave,this.onCancelSave);var t=o.Radio.channel(this.getSaveChannelName());this.listenTo(t,l.NT.Save,this.onSave),this.options.allowUndo&&(this.options.hasChanges&&this.model.set("showUndo",!0),this.listenTo(this.model,"change:showUndo",this.render))}},{key:"onCancelSave",value:function(){this.model.set(a.ZV.ShowSpinner,!1)}},{key:"onEnableSave",value:function(){this.model.set(a.ZV.Disabled,!1),this.options.allowUndo&&this.model.set("showUndo",!0)}},{key:"onDisableSave",value:function(){this.model.get(a.ZV.ShowSpinner)&&this.model.set(a.ZV.ShowSpinner,!1,{silent:!0}),this.model.set(a.ZV.Disabled,!0),this.options.allowUndo&&this.model.set("showUndo",!1)}},{key:"onUndo",value:function(e){e.stopPropagation(),this.getParentChannel().trigger(l.NT.Undo)}},{key:"onSave",value:function(){this.model.set(a.ZV.ShowSpinner,!0),this.getParentChannel().trigger(l.NT.Save)}},{key:"viewOptions",value:function(){return{allowUndo:this.options.allowUndo&&this.model.get("showUndo"),styles:d}}},{key:"renderSaveButton",value:function(){var e=new a.Py({saveEvent:l.NT.Save,channelName:this.getSaveChannelName(),model:this.model,buttonText:i.T.getPhrase(this.lang,"save"),extraButtonClass:"btn-dark ".concat(d.saveButton),spinnerOptions:{size:s.Ey.Small,type:s.dR.Light,extraClasses:"mx-auto"}});this.showChildView("save",e)}},{key:"onRender",value:function(){this.renderSaveButton()}}],u&&p(n.prototype,u),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,u}(r.Q.wA)},44391:function(e,t,n){"use strict";n.d(t,{K:function(){return T}});var o=n(11306),i=n(31647),r=n(43823),a=n(57098),s=n(25887),l=n(15564),u=n.n(l);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 d(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,f(o.key),o)}}function f(e){var t=function(e){if("object"!=c(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=c(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==c(t)?t:t+""}function h(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(h=function(){return!!e})()}function p(e){return p=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},p(e)}function v(e,t){return v=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},v(e,t)}var m=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=p(t),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)}(e,h()?Reflect.construct(t,n||[],p(e).constructor):t.apply(e,n))}(this,t,[e])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&v(e,t)}(t,e),n=t,o=[{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"rounded-pill tag py-1 px-2 flex-shrink-0 ".concat(o).concat(e).concat(t).concat(n)}},{key:"template",get:function(){return u()}},{key:"elements",get:function(){return{close:".btn-close"}}},{key:"appLinks",get:function(){return this.options.behavior!==s.Dm.Link?{}:{"[this]":{application:a.OV.SEARCH,action:a.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),r.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||r.Radio.channel(this.options.channelName).trigger(this.options.clickEvent,this.model)}},{key:"getTrimmedName",value:function(){var e=this.model.get("name");return e.length>36?"".concat(e.substring(0,36),"..."):e}},{key:"viewOptions",value:function(){return{removable:this.options.removeEvent,trimmedName:this.getTrimmedName()}}},{key:"onRender",value:function(){this.resetClassName()}}],o&&d(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(i.Q.wA);function y(e){return y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},y(e)}function b(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,g(o.key),o)}}function g(e){var t=function(e){if("object"!=y(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=y(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==y(t)?t:t+""}function w(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(w=function(){return!!e})()}function k(e){return k=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},k(e)}function S(e,t){return S=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},S(e,t)}var T=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=k(t),function(e,t){if(t&&("object"==y(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,w()?Reflect.construct(t,n||[],k(e).constructor):t.apply(e,n))}(this,t,[e])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&S(e,t)}(t,e),n=t,(r=[{key:"initialize",value:function(){this.options.behavior!==s.Dm.Edit||this.options.removeEvent||i.Q.Ry.throw(new o.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":"d-flex flex-wrap gap-1");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 m}}])&&b(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(i.Q.$W)},25887:function(e,t,n){"use strict";var o,i,r;n.d(t,{Dm:function(){return o},zM:function(){return i},x_:function(){return r}}),function(e){e[e.Link=1]="Link",e[e.Edit=2]="Edit",e[e.Disabled=3]="Disabled",e[e.Filter=4]="Filter"}(o||(o={})),function(e){e[e.Flex=1]="Flex",e[e.Vertical=2]="Vertical"}(i||(i={})),function(e){e[e.Folder=0]="Folder",e[e.Series=1]="Series"}(r||(r={}))},18974:function(e,t,n){"use strict";n.r(t),n.d(t,{EditVideoView:function(){return ot}});var o=n(43823),i=n(21161),r=n(25417),a=n(99748),s=n(11306),l=n(21679),u=n(57857),c=n(99249),d=n(31647),f=n(52076),h=n(70065),p=n(8371),v=n(13156),m=n(29625),y=n(57098),b=n(29457),g=n(68619),w=n(85847),k=n(19226),S=n(93569),T=n(45837),O=n(24184),E=n(72998),C=n(95168),P=n(44106),j=n.n(P),N=n(99844),D=n(72891),x=n.n(D);function M(e){return M="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},M(e)}function _(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,V(o.key),o)}}function V(e){var t=function(e){if("object"!=M(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=M(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==M(t)?t:t+""}function R(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(R=function(){return!!e})()}function I(e){return I=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},I(e)}function B(e,t){return B=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},B(e,t)}var U=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=I(t),function(e,t){if(t&&("object"==M(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,R()?Reflect.construct(t,n||[],I(e).constructor):t.apply(e,n))}(this,t,[e])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&B(e,t)}(t,e),n=t,(i=[{key:"initialize",value:function(){var e=this;this.listenTo(this.model,"change",(function(){return e.options.viewModel.validate()}))}},{key:"template",get:function(){return x()}},{key:"name",get:function(){return"ExtraInfoItemComponent"}},{key:"regions",value:function(){return{textArea:{el:".text-area-region",replaceElement:!0}}}},{key:"bindings",get:function(){return{"[name=value]":{observe:"value",setOptions:{validate:!0}}}}},{key:"onRender",value:function(){this.showChildView("textArea",new N.F({name:"value",class:"form-control",placeholder:this.model.get("placeholder"),id:"admin-notes"})),this.stickit(),o.Validation.bind(this)}},{key:"onDestroy",value:function(){this.unstickit(),o.Validation.unbind(this)}}])&&_(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,i}(d.Q.wA);function L(e){return L="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},L(e)}function A(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function 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,Q(o.key),o)}}function z(e,t,n){return t&&F(e.prototype,t),n&&F(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Q(e){var t=function(e){if("object"!=L(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=L(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==L(t)?t:t+""}function J(e,t,n){return t=H(t),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)}(e,Z()?Reflect.construct(t,n||[],H(e).constructor):t.apply(e,n))}function Z(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Z=function(){return!!e})()}function H(e){return H=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},H(e)}function K(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&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)}var W=function(e){function t(e){return A(this,t),J(this,t,[e])}return K(t,e),z(t,[{key:"name",get:function(){return"ExtraInfoComponentCollection"}},{key:"childView",get:function(){return U}},{key:"childViewOptions",get:function(){return{viewModel:this.options.viewModel}}}])}(d.Q.$W),Y=function(e){function t(e){return A(this,t),J(this,t,[e])}return K(t,e),z(t,[{key:"name",get:function(){return"ExtraInfoComponent"}},{key:"template",get:function(){return j()}},{key:"className",get:function(){return"border-top pt-3"}},{key:"regions",value:function(){return{fields:{el:".fields-region",replaceElement:!0}}}},{key:"onRender",value:function(){this.showChildView("fields",new W({collection:this.model.fields,viewModel:this.model}))}}])}(d.Q.wA),q=n(88483),X=n(2772),$=n(10101),ee=n(86272),te=n.n(ee);function ne(e){return ne="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ne(e)}function oe(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,ie(o.key),o)}}function ie(e){var t=function(e){if("object"!=ne(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=ne(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ne(t)?t:t+""}function re(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(re=function(){return!!e})()}function ae(e){return ae=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ae(e)}function se(e,t){return se=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},se(e,t)}var le=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=ae(t),function(e,t){if(t&&("object"==ne(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,re()?Reflect.construct(t,n||[],ae(e).constructor):t.apply(e,n))}(this,t,[e])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&se(e,t)}(t,e),n=t,(o=[{key:"initialize",value:function(){this.viewModel=c.r.get("image:storage")}},{key:"name",get:function(){return"EditThumbnailComponent"}},{key:"lang",get:function(){return"libraryEditor.editThumbnail"}},{key:"template",get:function(){return te()}},{key:"behaviors",get:function(){var e=this;return[{behaviorClass:$.YR,channelName:this.options.channelName,buttonSelector:".upload-thumbnail",imageType:b.__.Thumbnails,appLink:{application:y.OV.LIBRARY_EDITOR,action:y.eX.LibraryEditor.UPLOAD_THUMBNAIL,args:[this.options.model.id]},saveImage:function(t){return e.viewModel.set({dataUrl:t})}}]}},{key:"defaults",get:function(){return{editable:!0}}},{key:"regions",value:function(){return{thumbnail:{el:".thumbnail-region",replaceElement:!0}}}},{key:"viewOptions",value:function(){return{editable:this.options.editable,dimensions:y.nq[b.__.Thumbnails]}}},{key:"onRender",value:function(){this.showChildView("thumbnail",new X.Z({model:this.model,thumbnailOptions:{size:q.h2.Medium}}))}}])&&oe(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(d.Q.wA),ue=n(74250),ce=n(17391),de=n(36022),fe=n(3974),he=n(44391),pe=n(25887),ve=n(30992),me=n.n(ve);function ye(e){return ye="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ye(e)}function be(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,ge(o.key),o)}}function ge(e){var t=function(e){if("object"!=ye(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=ye(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ye(t)?t:t+""}function we(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(we=function(){return!!e})()}function ke(e){return ke=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ke(e)}function Se(e,t){return Se=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Se(e,t)}var Te=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=ke(t),function(e,t){if(t&&("object"==ye(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,we()?Reflect.construct(t,n||[],ke(e).constructor):t.apply(e,n))}(this,t,[e])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Se(e,t)}(t,e),n=t,(o=[{key:"name",get:function(){return"TagsComponent"}},{key:"template",get:function(){return me()}},{key:"lang",get:function(){return"libraryEditor.tags"}},{key:"defaults",get:function(){return{headerText:u.T.getPhrase(this.lang,"heading"),orientation:pe.zM.Flex}}},{key:"regions",value:function(){return{tagList:{el:".tag-list-region",replaceElement:!0},tagSelector:{el:".tag-selector-region",replaceElement:!0}}}},{key:"initialize",value:function(){this.options.behavior!==pe.Dm.Edit||this.options.parentId||d.Q.Ry.throw(new s.H("parentId is required to edit tags."))}},{key:"getTypeaheadConfigs",value:function(){var e=fe.M.getTypeaheadConfig(),t=fe.M.getBloodhoundConfig(),n={newType:y.n8.TagsRaw},o={newType:y.n8.TagsRaw,footerTemplate:ce.J.getConfirmSelectionTemplate()};return[{name:y.n8.TagsRaw,typeaheadConfig:e,bloodhoundConfig:t,options:{hideEmptyResults:!0}},{name:"add-new",typeaheadConfig:e,bloodhoundConfig:t,options:n},{name:"empty-suggestion",typeaheadConfig:e,bloodhoundConfig:t,options:o}]}},{key:"viewOptions",value:function(){var e;return this.showEmptyStateText()&&(e=this.options.emptyStateText),{headerText:this.options.headerText,editable:this.options.behavior===pe.Dm.Edit,emptyStateText:e}}},{key:"showEmptyStateText",value:function(){return this.options.behavior!==pe.Dm.Edit&&!this.collection.length&&!!this.options.emptyStateText}},{key:"renderTagSelector",value:function(){this.options.behavior===pe.Dm.Edit&&this.showChildView("tagSelector",new de.M({model:this.model,parentChannelName:this.options.channelName,inputId:"tag-select",selectEvent:"add:tag",typeaheadConfigs:this.getTypeaheadConfigs(),placeholderText:u.T.getPhrase(this.lang,"placeholder"),callbacks:{onRender:ce.J.selectFirstResult,onBlur:ce.J.clearInputOnBlur},typeaheadOptions:{hint:!1},actionOptions:{clearOnSelect:!0},autofocus:this.options.autofocus}))}},{key:"renderTagList",value:function(){this.showEmptyStateText()||this.showChildView("tagList",new he.K({collection:this.collection,channelName:this.options.channelName,behavior:this.options.behavior,orientation:this.options.orientation,removeEvent:this.options.removeEvent}))}},{key:"onRender",value:function(){this.renderTagSelector(),this.renderTagList()}}])&&be(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(d.Q.wA),Oe=n(58259),Ee=n.n(Oe);function Ce(e){return Ce="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ce(e)}function Pe(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,je(o.key),o)}}function je(e){var t=function(e){if("object"!=Ce(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Ce(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ce(t)?t:t+""}function Ne(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Ne=function(){return!!e})()}function De(e){return De=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},De(e)}function xe(e,t){return xe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},xe(e,t)}var Me=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=De(t),function(e,t){if(t&&("object"==Ce(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Ne()?Reflect.construct(t,n||[],De(e).constructor):t.apply(e,n))}(this,t,[e])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&xe(e,t)}(t,e),n=t,(o=[{key:"name",get:function(){return"CollapseButtonComponent"}},{key:"className",get:function(){return"d-inline-block cursor-pointer expand-details info-link mb-3"}},{key:"lang",get:function(){return"libraryEditor.collapseButton"}},{key:"template",get:function(){return Ee()}},{key:"events",value:function(){return{click:"onClick"}}},{key:"onClick",value:function(){this.options.onClick()}},{key:"viewOptions",value:function(){return{showMorePhrase:this.options.collapse?"showMore":"showLess"}}}])&&Pe(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(d.Q.wA),_e=n(23468),Ve=n.n(_e),Re={suggestEdit:"AgfOM"};function Ie(e){return Ie="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ie(e)}function Be(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,Ue(o.key),o)}}function Ue(e){var t=function(e){if("object"!=Ie(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Ie(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ie(t)?t:t+""}function Le(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Le=function(){return!!e})()}function Ae(e){return Ae=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ae(e)}function Fe(e,t){return Fe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Fe(e,t)}var ze=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=Ae(t),function(e,t){if(t&&("object"==Ie(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Le()?Reflect.construct(t,n||[],Ae(e).constructor):t.apply(e,n))}(this,t,[e])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Fe(e,t)}(t,e),n=t,(o=[{key:"initialize",value:function(){var e=this;this.listenTo(this.options.channelName,"update:tags",(function(){return e.renderCustomerTags(!0)})),this.initializeCollapse()}},{key:"name",get:function(){return"EditVideoDetailsComponent"}},{key:"className",get:function(){return"edit-video-detail py-3"}},{key:"lang",get:function(){return"libraryEditor.editVideoDetails"}},{key:"template",get:function(){return Ve()}},{key:"appLinks",get:function(){return{".suggest-edit":{application:y.OV.LIBRARY_EDITOR,action:y.eX.LibraryEditor.SUGGEST_AN_EDIT,args:[this.model.id]}}}},{key:"events",value:function(){return{"click .expand-details":"onClickExpandDetails"}}},{key:"elements",get:function(){return{expandable:".collapse-area"}}},{key:"regions",value:function(){return{topSave:{el:".top-save-region",replaceElement:!0},bottomSave:{el:".bottom-save-region",replaceElement:!0},thumbnail:{el:".thumbnail-region",replaceElement:!0},basicInfo:{el:".basic-info-region",replaceElement:!0},collapseButton:{el:".collapse-button-region",replaceElement:!0},additionalInfo:{el:".additional-details-region",replaceElement:!0},productionInfo:{el:".production-info-region",replaceElement:!0},fields:{el:".fields-region",replaceElement:!0},clickViewTags:{el:".cv-tags-region",replaceElement:!1},customerTags:{el:".customer-tags-region",replaceElement:!0}}}},{key:"initializeCollapse",value:function(){var e,t,n,o,i,r;this.collapse=!(this.model.get("broadcastDate")||(null===(e=this.model.channel)||void 0===e?void 0:e.get("id"))||this.model.get("productionYear")||(null===(t=this.model.productionCompanies)||void 0===t?void 0:t.any((function(e){return e.get("id")})))||(null===(n=this.model.distributors)||void 0===n?void 0:n.any((function(e){return e.get("id")})))||(null===(o=this.model.producers)||void 0===o?void 0:o.any((function(e){return e.get("id")})))||(null===(i=this.model.directors)||void 0===i?void 0:i.any((function(e){return e.get("id")})))||(null===(r=this.model.fields)||void 0===r?void 0:r.any((function(e){return e.get("id")>0}))))}},{key:"onClickCollapse",value:function(){this.collapse=!this.collapse,this.renderCollapseButton(),this.collapse?this.getUI("expandable").hide():this.getUI("expandable").show()}},{key:"renderSave",value:function(){this.options.editable&&this.showChildView("topSave",new ue.z({channelName:this.options.channelName,allowUndo:!0,isDisabled:this.options.isSaveDisabled,hasChanges:this.options.hasChanges,extraClasses:"float-end"})),this.showChildView("bottomSave",new ue.z({channelName:this.options.channelName,allowUndo:!0,isDisabled:this.options.isSaveDisabled,hasChanges:this.options.hasChanges,extraClasses:"float-end"}))}},{key:"renderBasicInfo",value:function(){this.showChildView("basicInfo",new E.J({model:this.model,ratings:this.options.ratings,channelName:this.options.channelName,editable:this.options.editable,showingSaveButton:this.options.editable}))}},{key:"renderThumbnail",value:function(){this.showChildView("thumbnail",new le({model:this.model,channelName:this.options.channelName,editable:this.options.editable}))}},{key:"renderCollapseButton",value:function(){this.showChildView("collapseButton",new Me({onClick:this.onClickCollapse.bind(this),collapse:this.collapse}))}},{key:"renderAdditionalInfo",value:function(){this.options.currentUser.get("instanceRegion")!==p.b.US&&this.showChildView("additionalInfo",new O.a({model:this.model,channelName:this.options.channelName,editable:this.options.editable}))}},{key:"renderProductionInfo",value:function(){this.showChildView("productionInfo",new C.O({model:this.model,channelName:this.options.channelName,editable:this.options.editable}))}},{key:"renderFields",value:function(){this.options.currentUser.get("instanceRegion")!==p.b.US&&this.showChildView("fields",new Y({model:this.model,channelName:this.options.channelName}))}},{key:"renderClickViewTags",value:function(){if(!this.options.editable){var e=S.BK.filterObjectsByOwnerType(this.model.tags,T.N.ClickView,this.options.currentUser.get("customerId"));this.showChildView("clickViewTags",new Te({parentId:this.model.get("id"),collection:e,orientation:pe.zM.Flex,behavior:pe.Dm.Disabled,channelName:this.options.channelName,headerText:u.T.getPhrase(this.lang,"clickviewTags"),emptyStateText:u.T.getPhrase(this.lang,"clickviewTagsEmpty")}))}}},{key:"renderCustomerTags",value:function(e){var t=S.BK.filterObjectsByOwnerType(this.model.tags,T.N.Customer,this.options.currentUser.get("customerId"));this.showChildView("customerTags",new Te({parentId:this.model.get("id"),collection:t,channelName:this.options.channelName,behavior:pe.Dm.Edit,headerText:this.options.editable?u.T.getPhrase(this.lang,"tags"):u.T.getPhrase(this.lang,"customerTags"),removeEvent:"remove:tag",autofocus:!!e}))}},{key:"renderTags",value:function(){this.renderClickViewTags(),this.renderCustomerTags()}},{key:"viewOptions",value:function(){return{styles:Re,editable:this.options.editable,suggestEditClasses:"info-link text-underline suggest-edit",isExchange:S.M2.isExchangeVideo(this.model),collapse:this.collapse}}},{key:"onRender",value:function(){this.renderSave(),this.renderBasicInfo(),this.renderThumbnail(),this.renderTags(),this.renderCollapseButton(),this.renderAdditionalInfo(),this.renderProductionInfo(),this.renderFields()}}])&&Be(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(d.Q.wA),Qe=n(21053),Je=n(40622),Ze=n(53854),He=n(75535),Ke=n(95061),Ge=n(57785),We=n(55230),Ye=n.n(We);function qe(e){return qe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},qe(e)}function Xe(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,$e(o.key),o)}}function $e(e){var t=function(e){if("object"!=qe(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=qe(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==qe(t)?t:t+""}function et(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(et=function(){return!!e})()}function tt(e){return tt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},tt(e)}function nt(e,t){return nt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},nt(e,t)}var ot=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=function(e,t,n){return t=tt(t),function(e,t){if(t&&("object"==qe(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,et()?Reflect.construct(t,n||[],tt(e).constructor):t.apply(e,n))}(this,t,[e])).editable=!1,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&nt(e,t)}(t,e),n=t,T=[{key:"name",get:function(){return"EditVideoView"}},{key:"title",get:function(){return this.model&&this.model.get("name")}},{key:"lang",get:function(){return"libraryEditor.editVideo"}},{key:"className",get:function(){return"bg-white p-3 rounded"}},{key:"channelName",get:function(){return"".concat(this.name,":").concat(this.cid)}},{key:"viewModelName",get:function(){return"".concat(this.name,":").concat(this.options.videoId)}},{key:"template",get:function(){return Ye()}},{key:"regions",value:function(){return{tabs:{el:".tab-region",replaceElement:!0,partialLoading:b.LP.EditVideoTabs},content:{el:".edit-content-region",replaceElement:!0,partialLoading:b.LP.EditVideoDetails}}}},{key:"initialize",value:function(){this.navLock=l.u.getInstance(y.K9.NavLock,this),this.initDataListeners(),S.Si.initBackButton(),this.initServices()}},{key:"initServices",value:function(){this.videoDataService=l.u.getInstance(y.Or.Video,this),this.tagDataService=l.u.getInstance(y.Or.Tags,this),this.seriesDataService=l.u.getInstance(y.Or.Series,this),this.ratingsDataService=l.u.getInstance(y.Or.Ratings,this),this.fieldsDataService=l.u.getInstance(y.Or.Fields,this),this.alertService=l.u.getInstance(y.K9.Alerts,this),this.personDataService=l.u.getInstance(y.Or.Person,this),this.companyDataService=l.u.getInstance(y.Or.Company,this)}},{key:"initDataListeners",value:function(){this.listenTo(r.G.SHELL,d.Q.Vy.NAV_UNLOCKED_BY_USER,this.onNavigateAway),this.listenTo(y.Vk.VIDEO,"videos:".concat(this.options.videoId,":sync"),this.render),this.listenTo(y.Vk.VIDEO,"videos:".concat(this.options.videoId,":error"),this.onError),this.listenTo(y.Vk.RATINGS,"".concat(y.M_.RATINGS,":sync"),this.render),this.listenTo(y.Vk.VIDEO,"".concat(y.M_.UPDATE_VIDEO_THUMBNAIL,":").concat(this.options.videoId,":sync"),this.onThumbnailUpdated),this.listenTo(this.channelName,"select:rating",i.default.partial(this.onTypeaheadSelection,i.default,"rating")),this.listenTo(this.channelName,"select:channel",i.default.partial(this.onTypeaheadSelection,i.default,"channel")),this.listenTo(this.channelName,"select:series",this.onSelectSeries),this.listenTo(this.channelName,"add:season",this.onSelectSeason),this.listenTo(this.channelName,"add:distributors",this.onSelectDistributor),this.listenTo(this.channelName,"add:productionCompanies",this.onSelectProductionCompany),this.listenTo(this.channelName,"add:directors",this.onSelectDirector),this.listenTo(this.channelName,"add:producers",this.onSelectProducer),this.listenTo(this.channelName,"add:tag",this.onAddTag),this.listenTo(this.channelName,"remove:distributors",this.onRemoveDistributor),this.listenTo(this.channelName,"remove:productionCompanies",this.onRemoveProductionCompany),this.listenTo(this.channelName,"remove:directors",this.onRemoveDirector),this.listenTo(this.channelName,"remove:producers",this.onRemoveProducer),this.listenTo(this.channelName,"remove:tag",this.onRemoveTag),this.listenTo(this.channelName,Je.NT.Save,this.onSave),this.listenTo(this.channelName,Je.NT.Undo,this.onUndo),this.listenTo(this.channelName,Je.NT.DetectInput,this.onTypeaheadInput),this.listenTo(this.channelName,"image:load",this.onBeforeThumbnailUpload)}},{key:"onError",value:function(e){switch(e.type){case a.h.NotFound:d.Q.Ry.throw(new He.l);break;case a.h.Forbidden:d.Q.Ry.throw(new Ze.a)}}},{key:"onTypeaheadSelection",value:function(e,t,n){if(n){var o=this.viewModel.get(t),r=o.filter({name:e.name});i.default.each(r,(function(e){return o.remove(e)})),o.add(e)}else this.viewModel.set(t,e);this.onModelChange(e,{manualUpdate:!0})}},{key:"onTypeaheadInput",value:function(e,t,n){e.get("name")||(n&&n.isCollection?this.viewModel.get(t).remove(e.get("id"),{silent:!0}):this.viewModel.get(t).clear({silent:!0}),this.onModelChange(null,{manualUpdate:!0}),"series"===t&&(this.validateSeries(),o.Radio.channel(this.channelName).trigger("clear:series")))}},{key:"onSelectSeries",value:function(e){var t=this;e.id?this.seriesDataService.getSeries(e.id,(function(e){t.viewModel.unset("season"),t.viewModel.set("episodeNumber",null),t.onTypeaheadSelection(e.toJSON(),"series")})):e.name&&this.seriesDataService.createSeries(e.name,(function(e){t.viewModel.unset("season"),t.viewModel.set("episodeNumber",null),t.onTypeaheadSelection({id:e.id},"series")}))}},{key:"onSelectSeason",value:function(e){var t=this;if(i.default.isNull(e))return this.viewModel.get("season").clear({silent:!0}),this.viewModel.set("episodeNumber",null),S.yV.deselectAll(this.viewModel.get("series.seasons")),void this.onModelChange(null,{manualUpdate:!0});if(e.id)return this.viewModel.set("season",e),S.yV.setSelected(e.id,this.viewModel.get("series.seasons")),void this.onModelChange(e,{manualUpdate:!0});if(e.number){var n=this.viewModel.get("series.id");this.seriesDataService.createSeason(e,n,(function(e){t.viewModel.set("season",e.toJSON()),!t.viewModel.get("series.seasons")&&t.viewModel.get("series").set("seasons",new m.i),t.viewModel.get("series.seasons").add(e.toJSON()),S.yV.setSelected(e.id,t.viewModel.get("series.seasons")),t.onModelChange(e.toJSON(),{manualUpdate:!0}),t.render()}))}}},{key:"onSelectDistributor",value:function(e){var t=this;e.id?this.onTypeaheadSelection(e,"distributors",!0):e.name&&this.companyDataService.createCompany(e.name,(function(e){t.onTypeaheadSelection(e.toJSON(),"distributors",!0)}))}},{key:"onSelectProductionCompany",value:function(e){var t=this;e.id?this.onTypeaheadSelection(e,"productionCompanies",!0):e.name&&this.companyDataService.createCompany(e.name,(function(e){t.onTypeaheadSelection(e.toJSON(),"productionCompanies",!0)}))}},{key:"onSelectDirector",value:function(e){var t=this;e.id?this.onTypeaheadSelection(e,"directors",!0):e.name&&this.personDataService.createPerson(e.name,(function(e){t.onTypeaheadSelection(e.toJSON(),"directors",!0)}))}},{key:"onSelectProducer",value:function(e){var t=this;e.id?this.onTypeaheadSelection(e,"producers",!0):e.name&&this.personDataService.createPerson(e.name,(function(e){t.onTypeaheadSelection(e.toJSON(),"producers",!0)}))}},{key:"onRemoveDistributor",value:function(e){this.removeFromCollection(e,"distributors")}},{key:"onRemoveProductionCompany",value:function(e){this.removeFromCollection(e,"productionCompanies")}},{key:"onRemoveDirector",value:function(e){this.removeFromCollection(e,"directors")}},{key:"onRemoveProducer",value:function(e){this.removeFromCollection(e,"producers")}},{key:"removeFromCollection",value:function(e,t){e&&e.id&&t&&(this.viewModel.get(t).remove(e.id),this.onModelChange(null,{manualUpdate:!0}))}},{key:"onAddTag",value:function(e){var t=this;if(e&&e.name){var n=e.name.trim().toLowerCase();if(n&&!S.yV.findModelByName(n,this.viewModel.tags)){var i=new g.V({name:n});this.viewModel.tags.add(i),this.tagDataService.createTag(n,this.model.get("id"),(function(e){i.set(e.toJSON()),o.Radio.channel(t.channelName).trigger("update:tags")}))}}}},{key:"onRemoveTag",value:function(e){var t=this;e instanceof g.V&&e.id&&this.tagDataService.dissociateTag(e.id,this.model.get("id"),(function(){t.viewModel.tags.remove(e),o.Radio.channel(t.channelName).trigger("update:tags"),t.logDissocAction(t.model.get("id"),e,h.py.Tag)}))}},{key:"saveFields",value:function(e,t){var n=this,o=0;e.updatedVideo=i.default.extend({},e.updatedVideo||{});var r=function(){++o===e.dataChanges.fields.length&&t(e)};i.default.each(e.dataChanges.fields,(function(e){if(e.id&&!e.value)return n.viewModel.fields.remove(n.viewModel.fields.findWhere({id:e.id})),void n.fieldsDataService.deleteField(e.id,r);!e.id||e.id>0?n.fieldsDataService.updateField(e,r):n.fieldsDataService.addField(n.options.videoId,e,(function(t){n.viewModel.fields.findWhere({id:e.id}).set("id",t.id),r()}))}))}},{key:"bulkDissoc",value:function(e,t){this.videoDataService.bulkDissoc(this.model.id,e.pendingDissocs,(function(){t(e)}))}},{key:"saveVideo",value:function(e,t){var n=this,o=i.default.omit(e.dataChanges,"fields");if(i.default.isEmpty(o))t(e);else{var r=i.default.omit(e.dataChanges,"fields");this.videoDataService.updateVideo(this.model.get("id"),this.folder.get("id"),r,(function(o){(e.dataChanges.series&&e.dataChanges.series.id||e.dataChanges.episodeNumber||e.dataChanges.season)&&n.videoDataService.clearVideoCache(),e.updatedVideo=i.default.extend({},e.updatedVideo||{},o),t(e)}))}}},{key:"afterSave",value:function(e){if(this.viewModel){e.updatedVideo&&this.updateState(e.updatedVideo),this.unlockNav(),this.updateSaveButton(Je.NT.DisableSave),this.logEditAction(e.dataChanges,h.eu.Save);var t=v.J.updatedVideoAlert(this.viewModel.get("name"));this.alertService.success(t||"Video was successfully updated")()}}},{key:"onSave",value:function(){if(this.viewModel.validate(),!1===this.viewModel.isValid())return this.updateSaveButton(Je.NT.CancelSave),!1;this.validateSeries();var e=Ge.xC.getChanges(this.model,this.viewModel),t=Ge.xC.getRemovedObjectIds(this.model,this.viewModel);if(!e&&!i.default.keys(t).length)return this.updateSaveButton(Je.NT.CancelSave),!1;var n=new d.Q.dM;return e&&e.fields&&n.useAsync(i.default.bind(this.saveFields,this)),t&&i.default.keys(t).length&&n.useAsync(i.default.bind(this.bulkDissoc,this)),this.editable&&n.useAsync(i.default.bind(this.saveVideo,this)),n.useAsync(i.default.bind(this.afterSave,this)),n.goAsync({dataChanges:e,pendingDissocs:t},null),!1}},{key:"onUndo",value:function(){var e=this;new S.Mr({title:u.T.getPhrase(this.lang,"undoTitle"),text:u.T.getPhrase(this.lang,"undoBody",{videoName:this.model.get("name")}),buttons:[{text:u.T.getPhrase(this.lang,"undo"),className:"btn btn-danger",success:!0},{text:u.T.getPhrase(this.lang,"cancel"),className:"btn btn-link",close:!0}]}).render().done((function(){e.logEditAction({},h.eu.Discard),e.revertState({undo:!0}),e.render()}))}},{key:"updateState",value:function(e){this.stopListening(this.viewModel),Ge.xC.updateModelState(this.model,this.viewModel,e),c.r.clear(this.viewModelName),this.getViewModel(),this.renderContent(),this.renderTabs()}},{key:"onNavigateAway",value:function(){this.revertState()}},{key:"revertState",value:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).undo;this.stopListening(this.viewModel),c.r.clear(this.viewModelName),delete this.viewModel,this.unlockNav(),e&&this.getViewModel()}},{key:"lockNav",value:function(){this.navLock.lock({title:u.T.getPhrase(this.lang,"navLockHeading"),text:u.T.getPhrase(this.lang,"navLockBody")})}},{key:"unlockNav",value:function(){this.navLock.unlock()}},{key:"onBeforeThumbnailUpload",value:function(){this.navLock.isLocked()&&(this.navLock.unlock(),c.r.get("upload:thumbnail:options").set("lockNav",!0))}},{key:"onModelChange",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(t.stickitChange||t.manualUpdate)if(this.viewModel.validate(),!1!==this.viewModel.isValid()){if(!Ge.xC.getChanges(this.model,this.viewModel)&&!i.default.keys(Ge.xC.getRemovedObjectIds(this.model,this.viewModel)).length)return this.unlockNav(),void this.updateSaveButton(Je.NT.DisableSave);this.lockNav(),this.updateSaveButton(Je.NT.EnableSave)}else this.updateSaveButton(Je.NT.DisableSave)}},{key:"updateSaveButton",value:function(e){var t=o.Radio.channel(this.channelName),n=Je.NT.EnableSave,i=Je.NT.DisableSave,r=Je.NT.CancelSave;switch(e){case n:return void t.trigger(n);case i:return void t.trigger(i);case r:return void t.trigger(r)}d.Q.Ry.throw(new s.H("Save action type is not valid."))}},{key:"onThumbnailUpdated",value:function(){var e=this;this.videoDataService.clearCacheAndGetVideo(this.options.videoId,(function(t){e.model=t,e.viewModel.set("thumbnail",e.model.thumbnail.toJSON())}))}},{key:"logEditAction",value:function(e,t){var n=Object.assign({id:this.model.get("id")},e);f.k.logUserAction(n,{actionType:h.Vw.Edit,entity:h.py.Video,location:h.LZ.EditVideoDetails,workflowPhase:t})}},{key:"logDissocAction",value:function(e,t,n){var o=Object.assign({videoId:e},t.pick("id","name"));f.k.logUserAction(o,{actionType:h.Vw.Dissociate,entity:n,location:h.LZ.EditVideoDetails})}},{key:"onValidation",value:function(e){this.viewModel.set("disabled",!e)}},{key:"getViewModel",value:function(){this.model.fields&&this.model.fields.length||this.model.set("fields",(0,Ge.aj)()),this.viewModel=c.r.get(this.viewModelName,this.model.toJSON(),{ctor:w.n}),this.editable&&(this.viewModel.addValidation(Ge.rr),this.viewModel.addValidation(Ge.tD));var e=this.currentUser.get("instanceRegion")!==p.b.US;e&&this.viewModel.addValidation(Ge.oJ),this.listenTo(this.viewModel,"validated",this.onValidation),this.listenTo(this.viewModel,"change",this.onModelChange),this.listenTo(this.viewModel,"change:dateBroadcast",i.default.partial(this.onModelChange,i.default,{manualUpdate:!0})),this.viewModel.fields&&e&&(this.viewModel.fields&&this.viewModel.fields.each((function(e){return e.addValidation(Ge.Zg)})),this.listenTo(this.viewModel.fields,"change",this.onModelChange))}},{key:"validateSeries",value:function(){this.viewModel.get("series.id")||(this.viewModel.unset("season"),this.viewModel.set("episodeNumber",null))}},{key:"fetchData",value:function(){this.model=this.videoDataService.getVideo(this.options.videoId),this.ratings=this.ratingsDataService.getAllRatings(),this.model&&(this.editable=S.BK.canEditVideo(this.model),this.folder=this.model.categories.first(),this.ratings&&(this.viewModel instanceof w.n||this.getViewModel()))}},{key:"requiredResources",get:function(){return{currentUser:k.K.currentUser,libraries:Ke.T.libraries}}},{key:"onBeforeRender",value:function(){return this.fetchData(),!!this.model&&!!this.ratings&&!!this.viewModel}},{key:"renderContent",value:function(){var e=Ge.xC.getChanges(this.model,this.viewModel)||i.default.keys(Ge.xC.getRemovedObjectIds(this.model,this.viewModel)).length;this.showChildView("content",new ze({model:this.viewModel,ratings:this.ratings,channelName:this.channelName,isSaveDisabled:!e,hasChanges:!!e,editable:this.editable,currentUser:this.currentUser}))}},{key:"renderTabs",value:function(){this.showChildView("tabs",new Qe.W({model:this.viewModel,tabs:S.Si.getEditVideoTabs(this.options.videoId,this.editable),activeTab:".edit-video-applink",context:"edit",folder:this.folder,libraries:this.libraries}))}},{key:"onRender",value:function(){this.renderTabs(),this.renderContent()}}],T&&Xe(n.prototype,T),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,T}(d.Q.G7)},86272:function(e,t,n){var o=n(31197);e.exports=(o.default||o).template({1:function(e,t,n,o,i){return e.propertyIsEnumerable,"<h5>"+e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"label",{name:"lang",hash:{},data:i}))+"</h5>\n"},3:function(e,t,n,o,i){return"my-2"},5:function(e,t,n,o,i){e.propertyIsEnumerable;var r,a=null!=t?t:e.nullContext||{},s=e.hooks.helperMissing,l=e.escapeExpression;return' <div class="text-secondary mt-3 mb-1"><em>'+l((n.lang||t&&t.lang||s).call(a,"recommendedSize",{name:"lang",hash:{height:null!=(r=null!=(r=null!=t?t.options:t)?r.dimensions:r)?r.height:r,width:null!=(r=null!=(r=null!=t?t.options:t)?r.dimensions:r)?r.width:r},data:i}))+'</em></div>\n <button class="upload-thumbnail btn btn-outline-dark mb-3 w-100">'+l((n.lang||t&&t.lang||s).call(a,"upload",{name:"lang",hash:{},data:i}))+"</button>\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){e.propertyIsEnumerable;var r,a=null!=t?t:e.nullContext||{};return(null!=(r=n.if.call(a,null!=(r=null!=t?t.options:t)?r.editable:r,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?r:"")+'<div class="thumbnail-region"></div>\n<div class="'+(null!=(r=n.unless.call(a,null!=(r=null!=t?t.options:t)?r.editable:r,{name:"unless",hash:{},fn:e.program(3,i,0),inverse:e.noop,data:i}))?r:"")+'">\n'+(null!=(r=n.if.call(a,null!=(r=null!=t?t.options:t)?r.editable:r,{name:"if",hash:{},fn:e.program(5,i,0),inverse:e.noop,data:i}))?r:"")+"</div>"},useData:!0})},43791:function(e,t,n){var o=n(31197);e.exports=(o.default||o).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){var r;return e.propertyIsEnumerable,'<h1 class="h3">\n '+e.escapeExpression("function"==typeof(r=null!=(r=n.name||(null!=t?t.name:t))?r:e.hooks.helperMissing)?r.call(null!=t?t:e.nullContext||{},{name:"name",hash:{},data:i}):r)+'\n</h2>\n<div class="breadcrumbs-region"></div>\n<div class="tabs-region ps-2"></div>'},useData:!0})},23468:function(e,t,n){var o=n(31197);e.exports=(o.default||o).template({1:function(e,t,n,o,i){return"mb-4"},3:function(e,t,n,o,i){var r;return e.propertyIsEnumerable,' <p class="mb-2 py-1 px-2 alert alert-info '+e.escapeExpression(e.lambda(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.suggestEdit:r,t))+'">\n'+(null!=(r=n.if.call(null!=t?t:e.nullContext||{},null!=(r=null!=t?t.options:t)?r.isExchange:r,{name:"if",hash:{},fn:e.program(4,i,0),inverse:e.program(6,i,0),data:i}))?r:"")+" </p>\n"},4:function(e,t,n,o,i){var r;return e.propertyIsEnumerable," "+(null!=(r=(n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"suggestEditExchange",{name:"lang",hash:{classNames:null!=(r=null!=t?t.options:t)?r.suggestEditClasses:r},data:i}))?r:"")+"\n"},6:function(e,t,n,o,i){var r;return e.propertyIsEnumerable," "+(null!=(r=(n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"suggestEdit",{name:"lang",hash:{classNames:null!=(r=null!=t?t.options:t)?r.suggestEditClasses:r},data:i}))?r:"")+"\n"},8:function(e,t,n,o,i){return"none"},10:function(e,t,n,o,i){return"block"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){e.propertyIsEnumerable;var r,a=null!=t?t:e.nullContext||{};return'<div class="row">\n <div class="left-pane col-4">\n <div class="thumbnail-region"></div>\n <div class="cv-tags-region '+(null!=(r=n.unless.call(a,null!=(r=null!=t?t.options:t)?r.editable:r,{name:"unless",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?r:"")+'"></div>\n <div class="customer-tags-region"></div>\n </div>\n <div class="right-pane col-8">\n'+(null!=(r=n.unless.call(a,null!=(r=null!=t?t.options:t)?r.editable:r,{name:"unless",hash:{},fn:e.program(3,i,0),inverse:e.noop,data:i}))?r:"")+' <div class="top-save-region"></div>\n <div class="basic-info-region mb-4"></div> \n <div class="collapse-button-region"></div>\n <div class="collapse-area" style="display: '+(null!=(r=n.if.call(a,null!=(r=null!=t?t.options:t)?r.collapse:r,{name:"if",hash:{},fn:e.program(8,i,0),inverse:e.program(10,i,0),data:i}))?r:"")+';">\n <div class="additional-details-region"></div> \n <div class="production-info-region mb-4"></div> \n <div class="fields-region mb-4"></div>\n </div>\n <div class="bottom-save-region"></div>\n </div>\n</div>'},useData:!0})},58259:function(e,t,n){var o=n(31197);e.exports=(o.default||o).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){var r;return e.propertyIsEnumerable,e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},null!=(r=null!=t?t.options:t)?r.showMorePhrase:r,{name:"lang",hash:{},data:i}))},useData:!0})},99724:function(e,t,n){var o=n(31197);e.exports=(o.default||o).template({1:function(e,t,n,o,i){e.propertyIsEnumerable;var r,a=e.escapeExpression;return'<span class="text-secondary mx-2 undo '+a(e.lambda(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.undo:r,t))+'">'+a((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"undo",{name:"lang",hash:{},data:i}))+"</span>\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){var r;return e.propertyIsEnumerable,(null!=(r=n.if.call(null!=t?t:e.nullContext||{},null!=(r=null!=t?t.options:t)?r.allowUndo:r,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?r:"")+'<div class="save-region"></div>'},useData:!0})},15564:function(e,t,n){var o=n(31197);e.exports=(o.default||o).template({1:function(e,t,n,o,i){return'<span class="btn-close cursor-pointer" role="button" aria-label="Close"></span>\n'},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){e.propertyIsEnumerable;var r,a,s=null!=t?t:e.nullContext||{},l=e.escapeExpression;return'<span title="'+l("function"==typeof(a=null!=(a=n.name||(null!=t?t.name:t))?a:e.hooks.helperMissing)?a.call(s,{name:"name",hash:{},data:i}):a)+'">'+l(e.lambda(null!=(r=null!=t?t.options:t)?r.trimmedName:r,t))+"</span>\n"+(null!=(r=n.if.call(s,null!=(r=null!=t?t.options:t)?r.removable:r,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?r:"")},useData:!0})},30992:function(e,t,n){var o=n(31197);e.exports=(o.default||o).template({1:function(e,t,n,o,i){var r;return e.propertyIsEnumerable,"<h5>"+e.escapeExpression(e.lambda(null!=(r=null!=t?t.options:t)?r.headerText:r,t))+"</h5>\n"},3:function(e,t,n,o,i){var r;return e.propertyIsEnumerable,"<p>"+e.escapeExpression(e.lambda(null!=(r=null!=t?t.options:t)?r.emptyStateText:r,t))+"</p>\n"},5:function(e,t,n,o,i){return'<div class="tag-selector-region"></div>\n'},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){e.propertyIsEnumerable;var r,a=null!=t?t:e.nullContext||{};return(null!=(r=n.if.call(a,null!=(r=null!=t?t.options:t)?r.headerText:r,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?r:"")+(null!=(r=n.if.call(a,null!=(r=null!=t?t.options:t)?r.emptyStateText:r,{name:"if",hash:{},fn:e.program(3,i,0),inverse:e.noop,data:i}))?r:"")+(null!=(r=n.if.call(a,null!=(r=null!=t?t.options:t)?r.editable:r,{name:"if",hash:{},fn:e.program(5,i,0),inverse:e.noop,data:i}))?r:"")+'<div class="tag-list-region"></div>'},useData:!0})},55230:function(e,t,n){var o=n(31197);e.exports=(o.default||o).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){return'<div class="dialog-region"></div>\n<div class="tab-region"></div>\n<div class="edit-content-region"></div>'},useData:!0})},44106:function(e,t,n){var o=n(31197);e.exports=(o.default||o).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){return'<h5 class="mb-0">Extra Information</h5>\n<div class="text-secondary mb-3">This information is only visible to administrators and will not be searchable</div>\n<div class="fields-region"></div>'},useData:!0})},72891:function(e,t,n){var o=n(31197);e.exports=(o.default||o).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){var r;return e.propertyIsEnumerable,'<div class="form-group">\n <label for="edit-description">'+e.escapeExpression("function"==typeof(r=null!=(r=n.name||(null!=t?t.name:t))?r:e.hooks.helperMissing)?r.call(null!=t?t:e.nullContext||{},{name:"name",hash:{},data:i}):r)+'</label>\n <div class="text-area-region"></div>\n <div class="form-feedback"></div>\n</div>'},useData:!0})}}]);
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! For license information please see 2639-efe1222211.chunk.js.LICENSE.txt */
|
|
2
|
+
(self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[2639],{91439:function(e,t,n){"use strict";n.d(t,{u:function(){return b}});var r=n(43823),o=n(21161),i=n(31647),s=n(85475),a=n(57098),l=n(93421),u="C8gyn";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 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,f(r.key),r)}}function f(e){var t=function(e){if("object"!=c(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=c(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==c(t)?t:t+""}function d(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(d=function(){return!!e})()}function h(e){return h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},h(e)}function v(e,t){return v=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},v(e,t)}n(8757);var b=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=h(t),function(e,t){if(t&&("object"==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)}(e,d()?Reflect.construct(t,n||[],h(e).constructor):t.apply(e,n))}(this,t,arguments)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&v(e,t)}(t,e),n=t,(i=[{key:"getClassMappings",value:function(){return{"ui-draggable":l.W2.draggable,"ui-draggable-handle":l.W2.handle,"ui-draggable-disabled":l.W2.disabled,"ui-draggable-dragging":l.W2.dragging}}},{key:"helper",value:function(){return new l.ND({text:this.view.model.get("name"),svg:s.Nj.getSvg(s.vn.Folder)}).render().el}},{key:"start",value:function(){r.Radio.channel(a.jr.FOLDER_DRAG_DROP).trigger("drag:start",this.view.model),this.view.$el.addClass(u)}},{key:"stop",value:function(){r.Radio.channel(a.jr.FOLDER_DRAG_DROP).trigger("drag:stop"),this.view.$el.removeClass(u)}},{key:"onRender",value:function(){var e={helper:o.bind(this.helper,this),start:o.bind(this.start,this),stop:o.bind(this.stop,this)};e.classes=this.getClassMappings(),this.view.$el.draggable(o.extend({},l.wc,e))}},{key:"onBeforeDestroy",value:function(){this.view.$el.draggable("instance")&&this.view.$el.draggable("destroy")}}])&&p(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,i}(i.Q.cg)},6929:function(e,t,n){"use strict";n.d(t,{x:function(){return h}});var r=n(43823),o=n(21161),i=n(31647),s=n(50997),a=n(10454);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 u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,c(r.key),r)}}function c(e){var t=function(e){if("object"!=l(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=l(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==l(t)?t:t+""}function p(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(p=function(){return!!e})()}function f(e){return f=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},f(e)}function d(e,t){return d=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},d(e,t)}n(95367);var h=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=f(t),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)}(e,p()?Reflect.construct(t,n||[],f(e).constructor):t.apply(e,n))}(this,t,arguments)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&d(e,t)}(t,e),n=t,(i=[{key:"initialize",value:function(){this.listenTo(s.jr.VIDEO_DRAG_DROP,"drag:stop",this.stop),this.listenTo(s.jr.FOLDER_DRAG_DROP,"drag:stop",this.stop)}},{key:"getDroppableElement",value:function(){return this.options.ui?this.view.getUI(this.options.ui):this.$el}},{key:"drop",value:function(){var e=this;o.each(this.options.channelNames,(function(t){r.Radio.channel(t).trigger("drag:drop",e.view.model,e.options.analyticsOptions)}))}},{key:"accept",value:function(){var e=this,t=!1;return o.each(this.options.channelNames,(function(n){!0===r.Radio.channel(n).request("accept",e.view.model)&&(t=!0)})),t||(this.disabledElement=this.getDroppableElement(),this.disabledElement.addClass(a.Z.disabled)),t}},{key:"stop",value:function(){var e;null===(e=this.disabledElement)||void 0===e||e.removeClass(a.Z.disabled)}},{key:"over",value:function(){var e=this;this.isHoveringOver=!0,window.setTimeout((function(){e.isHoveringOver&&e.view.trigger("open:sub:folders",a.Z.active)}),500)}},{key:"out",value:function(){this.isHoveringOver=!1}},{key:"onRender",value:function(){var e={tolerance:"pointer",drop:o.bind(this.drop,this),accept:o.bind(this.accept,this),over:o.bind(this.over,this),out:o.bind(this.out,this)};e.classes={"ui-droppable":a.Z.droppable,"ui-droppable-active":a.Z.active,"ui-droppable-hover":a.Z.hover},this.getDroppableElement().droppable(e)}},{key:"onBeforeDestroy",value:function(){this.getDroppableElement().droppable("instance")&&this.getDroppableElement().droppable("destroy")}}])&&u(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,i}(i.Q.cg)},93421:function(e,t,n){"use strict";n.d(t,{wc:function(){return d},ND:function(){return f},W2:function(){return i}});var r=n(62699),o=n.n(r),i={dragItem:"GYPuI",svgContainer:"olYDa",dragText:"O53FV"};function s(e){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s(e)}function 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,l(r.key),r)}}function l(e){var t=function(e){if("object"!=s(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=s(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==s(t)?t:t+""}function u(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(u=function(){return!!e})()}function c(e){return c=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},c(e)}function p(e,t){return p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},p(e,t)}var f=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=c(t),function(e,t){if(t&&("object"==s(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,u()?Reflect.construct(t,n||[],c(e).constructor):t.apply(e,n))}(this,t,[e])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&p(e,t)}(t,e),n=t,(r=[{key:"name",get:function(){return"DraggableItemComponent"}},{key:"template",get:function(){return o()}},{key:"className",get:function(){return"".concat(i.dragItem," p-3")}},{key:"viewOptions",value:function(){return Object.assign({styles:i},this.options)}}])&&a(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(n(31647).Q.wA),d={delay:150,cursorAt:{left:-20,top:10},refreshPositions:!0}},62699:function(e,t,n){var r=n(31197);e.exports=(r.default||r).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){e.propertyIsEnumerable;var i,s=e.lambda,a=e.escapeExpression;return'<span class="'+a(s(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.svgContainer:i,t))+' me-2">'+(null!=(i=s(null!=(i=null!=t?t.options:t)?i.svg:i,t))?i:"")+'</span>\n<span class="'+a(s(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.dragText:i,t))+'">'+a(s(null!=(i=null!=t?t.options:t)?i.text:i,t))+"</span>"},useData:!0})},95367:function(e,t,n){var r,o,i;o=[n(6723),n(8757),n(5927),n(10021),n(51993)],r=function(e){e.widget("ui.droppable",{version:"1.12.1",widgetEventPrefix:"drop",options:{accept:"*",addClasses:!0,greedy:!1,scope:"default",tolerance:"intersect",activate:null,deactivate:null,drop:null,out:null,over:null},_create:function(){var t,n=this.options,r=n.accept;this.isover=!1,this.isout=!0,this.accept=e.isFunction(r)?r:function(e){return e.is(r)},this.proportions=function(){if(!arguments.length)return t||(t={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight});t=arguments[0]},this._addToManager(n.scope),n.addClasses&&this._addClass("ui-droppable")},_addToManager:function(t){e.ui.ddmanager.droppables[t]=e.ui.ddmanager.droppables[t]||[],e.ui.ddmanager.droppables[t].push(this)},_splice:function(e){for(var t=0;t<e.length;t++)e[t]===this&&e.splice(t,1)},_destroy:function(){var t=e.ui.ddmanager.droppables[this.options.scope];this._splice(t)},_setOption:function(t,n){if("accept"===t)this.accept=e.isFunction(n)?n:function(e){return e.is(n)};else if("scope"===t){var r=e.ui.ddmanager.droppables[this.options.scope];this._splice(r),this._addToManager(n)}this._super(t,n)},_activate:function(t){var n=e.ui.ddmanager.current;this._addActiveClass(),n&&this._trigger("activate",t,this.ui(n))},_deactivate:function(t){var n=e.ui.ddmanager.current;this._removeActiveClass(),n&&this._trigger("deactivate",t,this.ui(n))},_over:function(t){var n=e.ui.ddmanager.current;n&&(n.currentItem||n.element)[0]!==this.element[0]&&this.accept.call(this.element[0],n.currentItem||n.element)&&(this._addHoverClass(),this._trigger("over",t,this.ui(n)))},_out:function(t){var n=e.ui.ddmanager.current;n&&(n.currentItem||n.element)[0]!==this.element[0]&&this.accept.call(this.element[0],n.currentItem||n.element)&&(this._removeHoverClass(),this._trigger("out",t,this.ui(n)))},_drop:function(n,r){var o=r||e.ui.ddmanager.current,i=!1;return!(!o||(o.currentItem||o.element)[0]===this.element[0])&&(this.element.find(":data(ui-droppable)").not(".ui-draggable-dragging").each((function(){var r=e(this).droppable("instance");if(r.options.greedy&&!r.options.disabled&&r.options.scope===o.options.scope&&r.accept.call(r.element[0],o.currentItem||o.element)&&t(o,e.extend(r,{offset:r.element.offset()}),r.options.tolerance,n))return i=!0,!1})),!i&&!!this.accept.call(this.element[0],o.currentItem||o.element)&&(this._removeActiveClass(),this._removeHoverClass(),this._trigger("drop",n,this.ui(o)),this.element))},ui:function(e){return{draggable:e.currentItem||e.element,helper:e.helper,position:e.position,offset:e.positionAbs}},_addHoverClass:function(){this._addClass("ui-droppable-hover")},_removeHoverClass:function(){this._removeClass("ui-droppable-hover")},_addActiveClass:function(){this._addClass("ui-droppable-active")},_removeActiveClass:function(){this._removeClass("ui-droppable-active")}});var t=e.ui.intersect=function(){function e(e,t,n){return e>=t&&e<t+n}return function(t,n,r,o){if(!n.offset)return!1;var i=(t.positionAbs||t.position.absolute).left+t.margins.left,s=(t.positionAbs||t.position.absolute).top+t.margins.top,a=i+t.helperProportions.width,l=s+t.helperProportions.height,u=n.offset.left,c=n.offset.top,p=u+n.proportions().width,f=c+n.proportions().height;switch(r){case"fit":return u<=i&&a<=p&&c<=s&&l<=f;case"intersect":return u<i+t.helperProportions.width/2&&a-t.helperProportions.width/2<p&&c<s+t.helperProportions.height/2&&l-t.helperProportions.height/2<f;case"pointer":return e(o.pageY,c,n.proportions().height)&&e(o.pageX,u,n.proportions().width);case"touch":return(s>=c&&s<=f||l>=c&&l<=f||s<c&&l>f)&&(i>=u&&i<=p||a>=u&&a<=p||i<u&&a>p);default:return!1}}}();return e.ui.ddmanager={current:null,droppables:{default:[]},prepareOffsets:function(t,n){var r,o,i=e.ui.ddmanager.droppables[t.options.scope]||[],s=n?n.type:null,a=(t.currentItem||t.element).find(":data(ui-droppable)").addBack();e:for(r=0;r<i.length;r++)if(!(i[r].options.disabled||t&&!i[r].accept.call(i[r].element[0],t.currentItem||t.element))){for(o=0;o<a.length;o++)if(a[o]===i[r].element[0]){i[r].proportions().height=0;continue e}i[r].visible="none"!==i[r].element.css("display"),i[r].visible&&("mousedown"===s&&i[r]._activate.call(i[r],n),i[r].offset=i[r].element.offset(),i[r].proportions({width:i[r].element[0].offsetWidth,height:i[r].element[0].offsetHeight}))}},drop:function(n,r){var o=!1;return e.each((e.ui.ddmanager.droppables[n.options.scope]||[]).slice(),(function(){this.options&&(!this.options.disabled&&this.visible&&t(n,this,this.options.tolerance,r)&&(o=this._drop.call(this,r)||o),!this.options.disabled&&this.visible&&this.accept.call(this.element[0],n.currentItem||n.element)&&(this.isout=!0,this.isover=!1,this._deactivate.call(this,r)))})),o},dragStart:function(t,n){t.element.parentsUntil("body").on("scroll.droppable",(function(){t.options.refreshPositions||e.ui.ddmanager.prepareOffsets(t,n)}))},drag:function(n,r){n.options.refreshPositions&&e.ui.ddmanager.prepareOffsets(n,r),e.each(e.ui.ddmanager.droppables[n.options.scope]||[],(function(){if(!this.options.disabled&&!this.greedyChild&&this.visible){var o,i,s,a=t(n,this,this.options.tolerance,r),l=!a&&this.isover?"isout":a&&!this.isover?"isover":null;l&&(this.options.greedy&&(i=this.options.scope,(s=this.element.parents(":data(ui-droppable)").filter((function(){return e(this).droppable("instance").options.scope===i}))).length&&((o=e(s[0]).droppable("instance")).greedyChild="isover"===l)),o&&"isover"===l&&(o.isover=!1,o.isout=!0,o._out.call(o,r)),this[l]=!0,this["isout"===l?"isover":"isout"]=!1,this["isover"===l?"_over":"_out"].call(this,r),o&&"isout"===l&&(o.isout=!1,o.isover=!0,o._over.call(o,r)))}}))},dragStop:function(t,n){t.element.parentsUntil("body").off("scroll.droppable"),t.options.refreshPositions||e.ui.ddmanager.prepareOffsets(t,n)}},!1!==e.uiBackCompat&&e.widget("ui.droppable",e.ui.droppable,{options:{hoverClass:!1,activeClass:!1},_addActiveClass:function(){this._super(),this.options.activeClass&&this.element.addClass(this.options.activeClass)},_removeActiveClass:function(){this._super(),this.options.activeClass&&this.element.removeClass(this.options.activeClass)},_addHoverClass:function(){this._super(),this.options.hoverClass&&this.element.addClass(this.options.hoverClass)},_removeHoverClass:function(){this._super(),this.options.hoverClass&&this.element.removeClass(this.options.hoverClass)}}),e.ui.droppable},void 0===(i=r.apply(t,o))||(e.exports=i)}}]);
|