@clickview/library-editor 1.51.0 → 1.52.0-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintrc.js +5 -0
- package/dist/bundles.json +3 -3
- package/dist/css/101-library-editor-cc4c4155eb.chunk.css +2 -0
- package/dist/css/1086-library-editor-9f7cd4e27e.chunk.css +4 -0
- package/dist/css/{112-library-editor-f77f4c1797.chunk.css → 112-library-editor-6a2d152d7d.chunk.css} +3 -3
- package/dist/css/{2417-library-editor-1c2828a69b.chunk.css → 2417-library-editor-46f8e6e95b.chunk.css} +2 -2
- package/dist/css/{2482-library-editor-6893a774e7.chunk.css → 2482-library-editor-1b6dc45d45.chunk.css} +3 -3
- package/dist/css/{2644-library-editor-cdc1c17774.chunk.css → 2644-library-editor-9a25c88900.chunk.css} +3 -3
- package/dist/css/2692-library-editor-9f7cd4e27e.chunk.css +4 -0
- package/dist/css/3087-library-editor-b3e75f7e7d.chunk.css +4 -0
- package/dist/css/{343-library-editor-a5b4b92fa3.chunk.css → 343-library-editor-d2f704c6a5.chunk.css} +4 -4
- package/dist/css/{3551-library-editor-37e6a3ecdc.chunk.css → 3551-library-editor-787101ac7a.chunk.css} +3 -3
- package/dist/css/{376-library-editor-6d718e6fc5.chunk.css → 376-library-editor-ce09c2fd78.chunk.css} +2 -2
- package/dist/css/{456-library-editor-a92bd26671.chunk.css → 456-library-editor-7dd590d5da.chunk.css} +7 -7
- package/dist/css/{5046-library-editor-d255e3d3d5.chunk.css → 5046-library-editor-765ea88cb0.chunk.css} +3 -3
- package/dist/css/{5314-library-editor-2013dd2fec.chunk.css → 5314-library-editor-abd6613696.chunk.css} +6 -6
- package/dist/css/5424-library-editor-30b3c7de26.chunk.css +5 -0
- package/dist/css/{61-library-editor-46bcd7b5f8.chunk.css → 61-library-editor-f25bac2db6.chunk.css} +7 -7
- package/dist/css/{6352-library-editor-c99ed407da.chunk.css → 6352-library-editor-33de5ce339.chunk.css} +3 -3
- package/dist/css/{6586-library-editor-d87449021d.chunk.css → 6586-library-editor-ad58bdb1e9.chunk.css} +29 -29
- package/dist/css/6732-library-editor-0be4d10f09.chunk.css +6 -0
- package/dist/css/708-library-editor-7ffe353138.chunk.css +7 -0
- package/dist/css/{7295-library-editor-a539c72655.chunk.css → 7295-library-editor-34087db2b0.chunk.css} +0 -1
- package/dist/css/8762-library-editor-9f7cd4e27e.chunk.css +4 -0
- package/dist/css/8906-library-editor-9f7cd4e27e.chunk.css +4 -0
- package/dist/css/{1601-library-editor-4a6aafa66a.chunk.css → 8952-library-editor-5d85817bef.chunk.css} +0 -1
- package/dist/css/{9369-library-editor-126f3beb94.chunk.css → 9369-library-editor-9f1e2cf42c.chunk.css} +3 -3
- package/dist/css/{9383-library-editor-a65f7ef186.chunk.css → 9383-library-editor-02381b537c.chunk.css} +2 -2
- package/dist/css/library-editor-app-61b0cfb735.css +62 -0
- package/dist/languages/en.json +1 -1
- package/dist/scripts/{101-cd0245d087.chunk.js → 101-d21c700d2c.chunk.js} +1 -1
- package/dist/scripts/1010-02e8a15325.chunk.js +1 -0
- package/dist/scripts/1086-262ea2b235.chunk.js +1 -0
- package/dist/scripts/112-088fff3566.chunk.js +1 -0
- package/dist/scripts/1216-e810014734.chunk.js +1 -0
- package/dist/scripts/1224-88f701eed5.chunk.js +1 -0
- package/dist/scripts/1269-33455b77e3.chunk.js +1 -0
- package/dist/scripts/1409-8700120c03.chunk.js +1 -0
- package/dist/scripts/152-3e03297486.chunk.js +2 -0
- package/dist/scripts/1703-187a4204a1.chunk.js +1 -0
- package/dist/scripts/1832-d0edba279f.chunk.js +1 -0
- package/dist/scripts/1876-ece6af806b.chunk.js +1 -0
- package/dist/scripts/{1934-cf53d84778.chunk.js → 1934-55d1327eb7.chunk.js} +1 -1
- package/dist/scripts/{1973-d4b3f2d0a9.chunk.js → 1973-b4b1932093.chunk.js} +1 -1
- package/dist/scripts/2417-ad6f0d0fd0.chunk.js +1 -0
- package/dist/scripts/243-28c10ef38e.chunk.js +1 -0
- package/dist/scripts/2482-0bad286d91.chunk.js +1 -0
- package/dist/scripts/259-e04ce9b65e.chunk.js +1 -0
- package/dist/scripts/2601-896b1c48bd.chunk.js +1 -0
- package/dist/scripts/2644-2edd5377f2.chunk.js +1 -0
- package/dist/scripts/2648-2cbb683d6d.chunk.js +1 -0
- package/dist/scripts/2692-205c2b2a30.chunk.js +1 -0
- package/dist/scripts/{2802-31b24a8131.chunk.js → 2802-a9de5e47dc.chunk.js} +1 -1
- package/dist/scripts/2803-477b2df7f7.chunk.js +1 -0
- package/dist/scripts/2888-46d4a32920.chunk.js +1 -0
- package/dist/scripts/299-7940ffca4d.chunk.js +1 -0
- package/dist/scripts/2998-452eac1864.chunk.js +1 -0
- package/dist/scripts/3400-83d3c4beb2.chunk.js +1 -0
- package/dist/scripts/343-4941b2ce3b.chunk.js +1 -0
- package/dist/scripts/35-9da0465d53.chunk.js +1 -0
- package/dist/scripts/3551-d922b88e92.chunk.js +1 -0
- package/dist/scripts/3639-60600a5ec9.chunk.js +1 -0
- package/dist/scripts/3746-26ea375c5c.chunk.js +1 -0
- package/dist/scripts/376-4a074491f5.chunk.js +1 -0
- package/dist/scripts/3763-54afb8f767.chunk.js +1 -0
- package/dist/scripts/{3969-fe64f3d542.chunk.js → 3969-a1807a9a1e.chunk.js} +1 -1
- package/dist/scripts/4201-1b1b268276.chunk.js +1 -0
- package/dist/scripts/4245-278ccd31be.chunk.js +1 -0
- package/dist/scripts/{4523-7a79c1890d.chunk.js → 4523-66bb5f6b9b.chunk.js} +1 -1
- package/dist/scripts/456-8e33233627.chunk.js +1 -0
- package/dist/scripts/4591-a946b821ad.chunk.js +1 -0
- package/dist/scripts/4860-ab7d2109eb.chunk.js +1 -0
- package/dist/scripts/5046-ed8705ad88.chunk.js +1 -0
- package/dist/scripts/514-b64b498fa4.chunk.js +1 -0
- package/dist/scripts/{5173-ae0218ce2b.chunk.js → 5173-dffab02f01.chunk.js} +1 -1
- package/dist/scripts/5286-81cd9ab0aa.chunk.js +1 -0
- package/dist/scripts/5314-3b18fc1015.chunk.js +1 -0
- package/dist/scripts/5412-27b107d23b.chunk.js +1 -0
- package/dist/scripts/5418-ad6ef337de.chunk.js +1 -0
- package/dist/scripts/5424-0721f9ce8b.chunk.js +1 -0
- package/dist/scripts/546-932b6272a0.chunk.js +1 -0
- package/dist/scripts/5524-ec2fbbfe30.chunk.js +1 -0
- package/dist/scripts/5707-a2314e31b6.chunk.js +1 -0
- package/dist/scripts/5747-5aebd8ce5e.chunk.js +1 -0
- package/dist/scripts/5850-fd6f7d29bf.chunk.js +1 -0
- package/dist/scripts/{5891-f7bd1916f7.chunk.js → 5891-6e77508bf1.chunk.js} +1 -1
- package/dist/scripts/6093-c54db8b7a2.chunk.js +1 -0
- package/dist/scripts/61-3a88ac9e9e.chunk.js +2 -0
- package/dist/scripts/6352-8c1a579b31.chunk.js +1 -0
- package/dist/scripts/6427-78e788c3b9.chunk.js +1 -0
- package/dist/scripts/6532-bb34418e8b.chunk.js +2 -0
- package/dist/scripts/6586-f14cd28e96.chunk.js +2 -0
- package/dist/scripts/6732-881331afc9.chunk.js +1 -0
- package/dist/scripts/6774-c1f539fbf7.chunk.js +1 -0
- package/dist/scripts/6788-ff68198a04.chunk.js +1 -0
- package/dist/scripts/{6963-898cb28e8d.chunk.js → 6963-dc358c6e31.chunk.js} +1 -1
- package/dist/scripts/7002-a5097661ad.chunk.js +1 -0
- package/dist/scripts/7053-999af1f110.chunk.js +1 -0
- package/dist/scripts/7071-f1f932823b.chunk.js +1 -0
- package/dist/scripts/708-dcabc16f2f.chunk.js +1 -0
- package/dist/scripts/7153-a00d4989cd.chunk.js +1 -0
- package/dist/scripts/7190-34cfe64bef.chunk.js +1 -0
- package/dist/scripts/7295-7bf9241a12.chunk.js +1 -0
- package/dist/scripts/7376-0eb27a7b62.chunk.js +1 -0
- package/dist/scripts/7408-30188de55f.chunk.js +1 -0
- package/dist/scripts/8113-5dcecdc6f9.chunk.js +1 -0
- package/dist/scripts/8362-92af0d8f39.chunk.js +1 -0
- package/dist/scripts/8542-6117e3ca8a.chunk.js +1 -0
- package/dist/scripts/{4064-217e21dc03.chunk.js → 8591-b8bcd87d71.chunk.js} +1 -1
- package/dist/scripts/8726-d5e54aa139.chunk.js +1 -0
- package/dist/scripts/8727-aaf9baba79.chunk.js +1 -0
- package/dist/scripts/8762-c6dc9734c2.chunk.js +1 -0
- package/dist/scripts/8906-7724b68fdf.chunk.js +1 -0
- package/dist/scripts/8952-3295afb0b2.chunk.js +2 -0
- package/dist/scripts/9357-604f7dbafb.chunk.js +1 -0
- package/dist/scripts/9369-20f67977ae.chunk.js +2 -0
- package/dist/scripts/9383-b607778022.chunk.js +1 -0
- package/dist/scripts/9695-29895e2f41.chunk.js +1 -0
- package/dist/scripts/9927-889f09d139.chunk.js +1 -0
- package/dist/scripts/bundle-1def9771f9.min.js +2 -0
- package/dist/scripts/{polyfills-a15c0386f5.min.js → polyfills-a3792d7e2d.min.js} +1 -1
- package/package.json +2 -7
- package/dist/css/101-library-editor-ea0aa41f12.chunk.css +0 -2
- package/dist/css/1086-library-editor-076ef8e022.chunk.css +0 -4
- package/dist/css/2692-library-editor-076ef8e022.chunk.css +0 -4
- package/dist/css/3087-library-editor-7c76d2234e.chunk.css +0 -4
- package/dist/css/5424-library-editor-cbb9c55dc8.chunk.css +0 -5
- package/dist/css/6732-library-editor-6233ce01e9.chunk.css +0 -6
- package/dist/css/708-library-editor-ce48b52d72.chunk.css +0 -7
- package/dist/css/8762-library-editor-076ef8e022.chunk.css +0 -4
- package/dist/css/8906-library-editor-076ef8e022.chunk.css +0 -4
- package/dist/css/library-editor-app-69756271a2.css +0 -62
- package/dist/scripts/1010-60f6dfd832.chunk.js +0 -1
- package/dist/scripts/1086-2682e6d3f7.chunk.js +0 -1
- package/dist/scripts/112-24c19e2cde.chunk.js +0 -1
- package/dist/scripts/1216-f3e3f911fa.chunk.js +0 -1
- package/dist/scripts/1224-3ad7211630.chunk.js +0 -1
- package/dist/scripts/1269-a34a1de36d.chunk.js +0 -1
- package/dist/scripts/1409-93a72ff5bf.chunk.js +0 -1
- package/dist/scripts/152-2a8a32c9e8.chunk.js +0 -2
- package/dist/scripts/1601-cfa68d5d16.chunk.js +0 -2
- package/dist/scripts/1703-0ee4d1051b.chunk.js +0 -1
- package/dist/scripts/1832-23fead57c5.chunk.js +0 -1
- package/dist/scripts/1876-a98a0d0a0b.chunk.js +0 -1
- package/dist/scripts/2417-d1a2c3b7e1.chunk.js +0 -1
- package/dist/scripts/243-2012c53e96.chunk.js +0 -1
- package/dist/scripts/2482-955e4b3615.chunk.js +0 -1
- package/dist/scripts/259-7d1d480f6e.chunk.js +0 -1
- package/dist/scripts/2601-c8a6cf71d8.chunk.js +0 -1
- package/dist/scripts/2644-4188284c06.chunk.js +0 -1
- package/dist/scripts/2648-10e901bc4c.chunk.js +0 -1
- package/dist/scripts/2692-438539ccbe.chunk.js +0 -1
- package/dist/scripts/2803-3cee0dd7a5.chunk.js +0 -1
- package/dist/scripts/2888-55edc16fd6.chunk.js +0 -1
- package/dist/scripts/299-eeaac48864.chunk.js +0 -1
- package/dist/scripts/2998-24191bc8ab.chunk.js +0 -1
- package/dist/scripts/3400-95d7a3a0d6.chunk.js +0 -1
- package/dist/scripts/343-4e17813e7a.chunk.js +0 -1
- package/dist/scripts/35-7bfbab50e6.chunk.js +0 -1
- package/dist/scripts/3551-5513258594.chunk.js +0 -1
- package/dist/scripts/3639-02abbd0b71.chunk.js +0 -1
- package/dist/scripts/3746-fab7340300.chunk.js +0 -1
- package/dist/scripts/376-98c734f74f.chunk.js +0 -1
- package/dist/scripts/3763-c5de5a36a1.chunk.js +0 -1
- package/dist/scripts/4201-6311ac5cac.chunk.js +0 -1
- package/dist/scripts/4245-6e9e71cc7d.chunk.js +0 -1
- package/dist/scripts/456-d5a07590b3.chunk.js +0 -1
- package/dist/scripts/4591-9e342f97bc.chunk.js +0 -1
- package/dist/scripts/4860-955b4bf901.chunk.js +0 -1
- package/dist/scripts/5046-19d7090284.chunk.js +0 -1
- package/dist/scripts/514-927a43219d.chunk.js +0 -1
- package/dist/scripts/5286-293188ce69.chunk.js +0 -1
- package/dist/scripts/5314-bd5f985235.chunk.js +0 -1
- package/dist/scripts/5412-95152820bb.chunk.js +0 -1
- package/dist/scripts/5418-f31f79952c.chunk.js +0 -1
- package/dist/scripts/5424-f53a7d8068.chunk.js +0 -1
- package/dist/scripts/546-9b17236feb.chunk.js +0 -1
- package/dist/scripts/5524-165e9fe50f.chunk.js +0 -1
- package/dist/scripts/5707-d7fa777817.chunk.js +0 -1
- package/dist/scripts/5747-0ab2cc3678.chunk.js +0 -1
- package/dist/scripts/5850-6391e3cda2.chunk.js +0 -1
- package/dist/scripts/6093-7e5c1af050.chunk.js +0 -1
- package/dist/scripts/61-30b83d9e41.chunk.js +0 -2
- package/dist/scripts/6352-aaaf02499b.chunk.js +0 -1
- package/dist/scripts/6427-ca580c2f5d.chunk.js +0 -1
- package/dist/scripts/6532-ffb2f40362.chunk.js +0 -2
- package/dist/scripts/6586-1d70947aa6.chunk.js +0 -2
- package/dist/scripts/6721-60208978c9.chunk.js +0 -1
- package/dist/scripts/6732-5bf9ec4e56.chunk.js +0 -1
- package/dist/scripts/6774-3cad51b5b7.chunk.js +0 -1
- package/dist/scripts/6788-6e4efcfd00.chunk.js +0 -1
- package/dist/scripts/7002-3686f9dcfb.chunk.js +0 -1
- package/dist/scripts/7053-38535c04ca.chunk.js +0 -1
- package/dist/scripts/7071-5a543a7eec.chunk.js +0 -1
- package/dist/scripts/708-9aa6428a97.chunk.js +0 -1
- package/dist/scripts/7190-d26b5ef34d.chunk.js +0 -1
- package/dist/scripts/7295-594d2f2def.chunk.js +0 -1
- package/dist/scripts/7376-baac126511.chunk.js +0 -1
- package/dist/scripts/7408-209544dca5.chunk.js +0 -1
- package/dist/scripts/8113-879f7b221a.chunk.js +0 -1
- package/dist/scripts/8362-e82bef3e07.chunk.js +0 -1
- package/dist/scripts/8542-776c339eeb.chunk.js +0 -1
- package/dist/scripts/8726-edded1064e.chunk.js +0 -1
- package/dist/scripts/8727-2e314f9301.chunk.js +0 -1
- package/dist/scripts/8762-4ee15995c8.chunk.js +0 -1
- package/dist/scripts/8906-3bde92a78d.chunk.js +0 -1
- package/dist/scripts/9357-c5c5984ec8.chunk.js +0 -1
- package/dist/scripts/9369-ef153a7fd3.chunk.js +0 -2
- package/dist/scripts/9383-b01e8ae3c8.chunk.js +0 -1
- package/dist/scripts/9695-a04e508364.chunk.js +0 -1
- package/dist/scripts/9927-a667775ac4.chunk.js +0 -1
- package/dist/scripts/bundle-5275a894a8.min.js +0 -2
- /package/dist/scripts/{152-2a8a32c9e8.chunk.js.LICENSE.txt → 152-3e03297486.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{1934-cf53d84778.chunk.js.LICENSE.txt → 1934-55d1327eb7.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{2802-31b24a8131.chunk.js.LICENSE.txt → 2802-a9de5e47dc.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{3087-150643537b.chunk.js → 3087-c9b9c3e2ea.chunk.js} +0 -0
- /package/dist/scripts/{1601-cfa68d5d16.chunk.js.LICENSE.txt → 61-3a88ac9e9e.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{6532-ffb2f40362.chunk.js.LICENSE.txt → 6532-bb34418e8b.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{61-30b83d9e41.chunk.js.LICENSE.txt → 6586-f14cd28e96.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{6586-1d70947aa6.chunk.js.LICENSE.txt → 8952-3295afb0b2.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{9369-ef153a7fd3.chunk.js.LICENSE.txt → 9369-20f67977ae.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{bundle-5275a894a8.min.js.LICENSE.txt → bundle-1def9771f9.min.js.LICENSE.txt} +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[708],{43953:function(e,t,n){"use strict";n.d(t,{J:function(){return v}});var o=n(57857),r=n(31647),i=n(52076),a=n(70065),l=n(63791),s=n(71641),c=n(57098),u=n(8050),p=n.n(u);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 y(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,d(o.key),o)}}function d(e){var t=function(e,t){if("object"!=f(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!=f(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==f(t)?t:t+""}function h(e,t,n){return t=g(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||[],g(e).constructor):t.apply(e,n))}function m(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(m=function(){return!!e})()}function g(e){return g=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},g(e)}function b(e,t){return b=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},b(e,t)}var v=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),h(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"LibraryActionsComponent"}},{key:"template",get:function(){return p()}},{key:"channelName",get:function(){return"".concat(this.name).concat(this.cid)}},{key:"lang",get:function(){return"libraryEditor.libraryActions"}},{key:"className",get:function(){return"position-absolute ".concat("Qgopl"," ").concat(this.options.extraClasses," ")}},{key:"elements",get:function(){return{dropdownToggle:".ui-dropdown-toggle"}}},{key:"regions",value:function(){return{dropdownItems:{replaceElement:!0,el:".items-region"}}}},{key:"getDropdownItems",value:function(){return[{title:o.T.getPhrase(this.lang,"addFolder"),analyticsOptions:i.k.mergeOptions(this.options.analyticsOptions,{actionType:a.Vw.Create,entity:a.py.Folder,workflowPhase:a.eu.Start}),appLink:{application:c.OV.LIBRARY_EDITOR,action:c.eX.Shared.NEW_FOLDER,args:[this.model.get("id")]}},{title:o.T.getPhrase(this.lang,"rename"),analyticsOptions:i.k.mergeOptions(this.options.analyticsOptions,{actionType:a.Vw.Rename,entity:a.py.Library,workflowPhase:a.eu.Start}),appLink:{application:c.OV.LIBRARY_EDITOR,action:c.eX.LibraryEditor.RENAME_LIBRARY,args:[this.model.get("id")]}},{title:o.T.getPhrase(this.lang,"libraryRequestSettings"),analyticsOptions:i.k.mergeOptions(this.options.analyticsOptions,{actionType:a.Vw.SetAccess,entity:a.py.Library,workflowPhase:a.eu.Start}),appLink:{application:c.OV.LIBRARY_REQUESTS,action:c.eX.LibraryRequests.LIBRARY_REQUEST_SETTINGS,args:[this.model.get("id")]}},{title:o.T.getPhrase(this.lang,"remove"),analyticsOptions:i.k.mergeOptions(this.options.analyticsOptions,{actionType:a.Vw.Delete,entity:a.py.Library,workflowPhase:a.eu.Start}),appLink:{application:c.OV.LIBRARY_EDITOR,action:c.eX.LibraryEditor.DELETE_LIBRARY,args:[this.model.get("id")]},classes:"text-danger"}]}},{key:"viewOptions",value:function(){return{dropdownClass:"".concat("AAIc2"," ").concat(this.options.buttonClass),svg:l.Nj.getSvg(l.vn.More)}}},{key:"onRender",value:function(){var e;(null===(e=this.model)||void 0===e?void 0:e.get("id"))&&(this.showChildView("dropdownItems",new s.w({analyticsHelper:i.k,displayOptions:{alignment:"end"},channelName:this.channelName,collection:new r.Q.FE(this.getDropdownItems())})),this.getUI("dropdownToggle").dropdown())}}])&&y(n.prototype,u),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,u}(r.Q.wA)},51785:function(e,t,n){"use strict";n.d(t,{c:function(){return j}});var o=n(31647),r=n(63791),i=n(60602),a=n(57857),l=n(52076),s=n(70065),c=n(71641),u=n(57098),p=n(58266),f=n.n(p);function y(e){return y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},y(e)}function d(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,h(o.key),o)}}function h(e){var t=function(e,t){if("object"!=y(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!=y(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==y(t)?t:t+""}function m(e,t,n){return t=b(t),function(e,t){if(t&&("object"==y(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,g()?Reflect.construct(t,n||[],b(e).constructor):t.apply(e,n))}function g(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(g=function(){return!!e})()}function b(e){return b=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},b(e)}function v(e,t){return v=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},v(e,t)}var w=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),m(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,(r=[{key:"name",get:function(){return"FolderActionsDropdownComponent"}},{key:"template",get:function(){return f()}},{key:"lang",get:function(){return"libraryEditor.folderActionsDropdown"}},{key:"channelName",get:function(){return"".concat(this.name).concat(this.cid)}},{key:"regions",value:function(){return{items:{el:".items-region",replaceElement:!0}}}},{key:"getFolderActions",value:function(){return[{title:a.T.getPhrase(this.lang,"addSubfolder"),analyticsOptions:l.k.mergeOptions(this.options.analyticsOptions,{actionType:s.Vw.Create,entity:s.py.Folder,workflowPhase:s.eu.Start}),appLink:{application:u.OV.LIBRARY_EDITOR,action:u.eX.LibraryEditor.NEW_SUB_FOLDER,args:[this.model.get("id")]}},{title:a.T.getPhrase(this.lang,"rename"),analyticsOptions:l.k.mergeOptions(this.options.analyticsOptions,{actionType:s.Vw.Rename,entity:s.py.Folder,workflowPhase:s.eu.Start}),appLink:{application:u.OV.LIBRARY_EDITOR,action:u.eX.LibraryEditor.RENAME_FOLDER,args:[this.model.get("id")]}},{title:a.T.getPhrase(this.lang,"move"),analyticsOptions:l.k.mergeOptions(this.options.analyticsOptions,{actionType:s.Vw.Move,entity:s.py.Folder,workflowPhase:s.eu.Start}),appLink:{application:u.OV.LIBRARY_EDITOR,action:u.eX.LibraryEditor.MOVE_FOLDER,args:[this.model.get("id")]}},{title:a.T.getPhrase(this.lang,"editImages"),analyticsOptions:l.k.mergeOptions(this.options.analyticsOptions,{actionType:s.Vw.EditAssoc,entity:s.py.Folder,workflowPhase:s.eu.Start,descriptor:s.iF.Image}),appLink:{application:u.OV.LIBRARY_EDITOR,action:u.eX.LibraryEditor.EDIT_FOLDER_IMAGES,args:[this.model.get("id")]}},{title:a.T.getPhrase(this.lang,"generatePdf"),analyticsOptions:l.k.mergeOptions(this.options.analyticsOptions,{actionType:s.Vw.Create,entity:s.py.PDF,workflowPhase:s.eu.Start}),appLink:{application:u.OV.LIBRARY_EDITOR,action:u.eX.LibraryEditor.GENERATE_PDF,args:[this.model.get("id")]}},{title:a.T.getPhrase(this.lang,"remove"),analyticsOptions:l.k.mergeOptions(this.options.analyticsOptions,{actionType:s.Vw.Delete,entity:s.py.Folder,workflowPhase:s.eu.Start}),classes:"text-danger",appLink:{application:u.OV.LIBRARY_EDITOR,action:u.eX.LibraryEditor.DELETE_FOLDER,args:[this.model.get("id")]}}]}},{key:"onRender",value:function(){this.showChildView("items",new c.w({analyticsHelper:l.k,displayOptions:{alignment:"end"},channelName:this.channelName,collection:new o.Q.FE(this.getFolderActions()),childOptions:{isDisabled:function(){return this.model.get("disabled")}}}))}}])&&d(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(o.Q.wA),O=n(26704),k=n.n(O);function E(e){return E="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},E(e)}function S(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,L(o.key),o)}}function L(e){var t=function(e,t){if("object"!=E(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!=E(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==E(t)?t:t+""}function R(e,t,n){return t=T(t),function(e,t){if(t&&("object"==E(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,_()?Reflect.construct(t,n||[],T(e).constructor):t.apply(e,n))}function _(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(_=function(){return!!e})()}function T(e){return T=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},T(e)}function P(e,t){return P=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},P(e,t)}var j=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),R(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,(o=[{key:"name",get:function(){return"VideoCollectionActionsComponent"}},{key:"channelName",get:function(){return"".concat(this.name).concat(this.cid)}},{key:"className",get:function(){if(this.model instanceof i.g)return"position-absolute ".concat(this.options.overrideClasses?"":"zHCsb"," ").concat(this.options.extraClasses," ")}},{key:"template",get:function(){return k()}},{key:"regions",value:function(){return{items:{replaceElement:!0,el:".items-region"}}}},{key:"renderFolderActions",value:function(){this.model instanceof i.g&&this.showChildView("items",new w({model:this.model,analyticsOptions:this.options.analyticsOptions}))}},{key:"viewOptions",value:function(){return{hasActions:this.model instanceof i.g,dropdownClass:"".concat("He1m9"," ").concat(this.options.buttonClass),svg:r.Nj.getSvg(r.vn.More)}}},{key:"onRender",value:function(){this.renderFolderActions()}}])&&S(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(o.Q.wA)},43:function(e,t,n){"use strict";n.r(t),n.d(t,{LeftNavigationView:function(){return ue}});var o=n(21679),r=n(99249),i=n(31647),a=n(52076),l=n(70065),s=n(36357),c=n(63791),u=n(57098),p=n(14177),f=n(33800),y=n(29457),d=n(48404),h=n(19226),m=n(48088),g=n(57857),b=n(88483),v=n(50997),w=n(71641),O=n(41238),k=n.n(O),E={imageContainer:"mh27r",imageMask:"aklBj",dropdownContainer:"tqZpr",dropdownButton:"aTbSF",image:"V_4dx",addCrest:"zD8lx",plusSvg:"gYx3Z"};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 L(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,R(o.key),o)}}function R(e){var t=function(e,t){if("object"!=S(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!=S(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==S(t)?t:t+""}function _(e,t,n){return t=P(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,T()?Reflect.construct(t,n||[],P(e).constructor):t.apply(e,n))}function T(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(T=function(){return!!e})()}function P(e){return P=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},P(e)}function j(e,t){return j=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},j(e,t)}var I=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),_(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&&j(e,t)}(t,e),o=t,r=[{key:"initialize",value:function(){var e=this;this.listenTo(this.options.channelName,"upload:logo",(function(){a.k.logUserAction({},e.getAnalyticsOptions("create"))}))}},{key:"name",get:function(){return"CustomerLogoComponent"}},{key:"template",get:function(){return k()}},{key:"lang",get:function(){return"libraryEditor.customerLogo"}},{key:"className",get:function(){return"text-center p-3 position-relative"}},{key:"elements",get:function(){return{dropdownToggle:".ui-dropdown-toggle"}}},{key:"regions",value:function(){return{options:{replaceElement:!0,el:".options-region"}}}},{key:"events",value:function(){return e={},n="onClickAddLogo",(t=R(t="click .".concat(E.addCrest)))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e;var e,t,n}},{key:"behaviors",get:function(){var e=this;return[{behaviorClass:v.YR,channelName:this.options.channelName,eventName:"upload:logo",buttonSelector:".upload-logo",imageType:b.__.Logos,saveImage:function(t){Promise.all([n.e(2802),n.e(1934),n.e(6721),n.e(5524)]).then(n.bind(n,24365)).then((function(n){n.CropperHelper.renderCropper({src:t,alt:"",onClickCrop:function(t,n){m.Radio.channel(e.options.channelName).trigger("upload:image",t),e.listenToOnce(v.Vk.CUSTOMER,"".concat(v.M_.CREATE_LOGO,":sync"),n)},imageType:b.__.Logos,popupSize:"md"})}))}}]}},{key:"onClickAddLogo",value:function(){a.k.logUserAction({},this.getAnalyticsOptions("create"))}},{key:"getCustomerLogoActions",value:function(){return[{title:g.T.getPhrase(this.lang,"uploadImage"),channelName:this.options.channelName,eventName:"upload:logo"},{title:g.T.getPhrase(this.lang,"removeImage"),analyticsOptions:this.getAnalyticsOptions("remove"),classes:"text-danger",appLink:{application:v.OV.LIBRARY_EDITOR,action:v.eX.LibraryEditor.REMOVE_LOGO,args:[this.model.get("id"),this.options.customerId]}}]}},{key:"getAnalyticsOptions",value:function(e){return{actionType:"create"===e?l.Vw.Create:l.Vw.Remove,entity:l.py.Logo,workflowPhase:l.eu.Start,location:l.LZ.LeftNav,eventVersion:"create"===e?l.eq.V2:l.eq.V1}}},{key:"viewOptions",value:function(){return{styles:E,dropdownSvg:c.Nj.getSvg(c.vn.More),plusSvg:c.Nj.getSvg(c.vn.Plus)}}},{key:"onRender",value:function(){var e;(null===(e=this.model)||void 0===e?void 0:e.get("url"))&&this.showChildView("options",new w.w({analyticsHelper:a.k,displayOptions:{alignment:"start"},channelName:this.options.channelName,collection:new i.Q.FE(this.getCustomerLogoActions())}))}}],r&&L(o.prototype,r),Object.defineProperty(o,"prototype",{writable:!1}),o;var o,r}(i.Q.wA),C=n(95308),D=n(50299),N=n(93569),x=n(6929),A=n(43953),V=n(51785),B=n(99223),M=n.n(B);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 U(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Y(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 G(e,t,n){return t&&Y(e.prototype,t),n&&Y(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Q(e){var t=function(e,t){if("object"!=F(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!=F(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==F(t)?t:t+""}function X(e,t,n){return t=z(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,Z()?Reflect.construct(t,n||[],z(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 z(e){return z=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},z(e)}function H(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&q(e,t)}function q(e,t){return q=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},q(e,t)}var W="library:left:nav",$=function(e){function t(e){return U(this,t),X(this,t,[e])}return H(t,e),G(t,[{key:"initialize",value:function(){var e=this.options.forceOpen||this.options.libraryId&&this.model.get("id").toString()===this.options.libraryId.toString();this.viewModel=r.r.get("".concat(W,":").concat(this.model.get("id"))),this.viewModel.set("open",e),this.viewModel.set("disabled",!1),this.listenTo(this.model,"change:name",this.render),this.options.hasMultipleLibraries&&this.listenTo(this,"open:sub:folders",this.onOpenSubFolders),this.videoDragDropService=o.u.getInstance(u.K9.VideoDragDrop,this)}},{key:"name",get:function(){return"LeftNavLibraryComponent"}},{key:"template",get:function(){return M()}},{key:"className",get:function(){return C.Z.libraryContainer}},{key:"behaviors",get:function(){var e=[u.jr.FOLDER_DRAG_DROP];return this.options.hasMultipleLibraries&&e.push(u.jr.VIDEO_DRAG_DROP),[{behaviorClass:x.x,ui:"anchor",channelNames:e,analyticsOptions:{location:l.LZ.LeftNav}}]}},{key:"regions",value:function(){return{folders:{el:".folders-region",replaceElement:!0},actions:{el:".actions-region",replaceElement:!0}}}},{key:"appLinks",get:function(){return{".ui-anchor":{application:u.OV.LIBRARY_EDITOR,action:u.eX.LibraryEditor.LIBRARY,args:[this.model.get("id")]}}}},{key:"events",value:function(){return{"click .library-event":"onClick"}}},{key:"elements",get:function(){return{anchor:".ui-anchor",text:".ui-text"}}},{key:"onClick",value:function(e){this.viewModel.get("open")&&(e.stopImmediatePropagation(),e.preventDefault(),this.viewModel.set("open",!this.viewModel.get("open")),this.render())}},{key:"onOpenSubFolders",value:function(){if(this.videoDragDropService.getDisabledLibraryIds().includes(this.model.get("id")))return this.viewModel.set("disabled",!0),void this.render();this.viewModel.set("open",!0),this.render()}},{key:"hasFolders",value:function(){return!!N.PU.getFirstType(this.model.children,"category")}},{key:"analyticsOptions",get:function(){return{location:l.LZ.LeftNav}}},{key:"viewOptions",value:function(){return{styles:C.Z,caretSvg:c.Nj.getSvg(c.vn.Caret),open:this.viewModel.get("open"),hasFolders:this.hasFolders(),disabled:this.viewModel.get("disabled")}}},{key:"onRender",value:function(){this.showChildView("actions",new A.J({model:this.model,extraClasses:"rounded-circle me-1 ".concat(C.Z.actions),buttonClass:"text-secondary",analyticsOptions:this.analyticsOptions})),this.model.children&&this.model.children.length&&this.viewModel.get("open")&&this.showChildView("folders",new D.J({appLink:{action:u.eX.LibraryEditor.FOLDER,application:u.OV.LIBRARY_EDITOR},linkArgs:function(e){return[e.get("id")]},collection:this.model.children,channelName:"".concat(this.cid),childrenProperty:"children",actions:V.c,folderTreeId:this.options.folderTreeId,analyticsOptions:this.analyticsOptions}))}}])}(i.Q.wA),J=function(e){function t(e){return U(this,t),X(this,t,[e])}return H(t,e),G(t,[{key:"name",get:function(){return"LeftNavLibrariesComponent"}},{key:"childView",get:function(){return $}},{key:"childViewOptions",get:function(){return{channelName:this.options.channelName,libraryId:this.options.libraryId,folderTreeId:this.options.folderTreeId,forceOpen:this.options.forceOpen,hasMultipleLibraries:this.collection.length>1}}}])}(i.Q.$W),K=n(95061),ee=n(32122),te=n.n(ee),ne={addLibrary:"ii_E8",addLibraryContainer:"WroNW",plus:"zhT_f"};function oe(e){return oe="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},oe(e)}function re(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,t){if("object"!=oe(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!=oe(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==oe(t)?t:t+""}function ae(e,t,n){return t=se(t),function(e,t){if(t&&("object"==oe(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||[],se(e).constructor):t.apply(e,n))}function le(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(le=function(){return!!e})()}function se(e){return se=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},se(e)}function ce(e,t){return ce=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ce(e,t)}var ue=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),ae(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&&ce(e,t)}(t,e),n=t,(i=[{key:"initialize",value:function(){this.bindListeners(),this.settingsDataService=o.u.getInstance(f.O.Settings,this),this.imageUploadDataService=o.u.getInstance(f.O.ImageUpload,this),this.customerDataService=o.u.getInstance(f.O.Customer,this)}},{key:"bindListeners",value:function(){this.listenTo(this.channelName,"select:library",this.onSelectLibrary),this.listenTo(this.channelName,"upload:image",this.onUploadLogo),this.listenTo(u.Vk.LIBRARY,"cache:cleared",this.fetchData),this.listenTo(u.jr.FOLDER_DRAG_DROP,"re:render:left:nav",this.render),this.listenTo(u.Vk.SETTINGS,"".concat(u.M_.CUSTOMER_SETTINGS,":sync ").concat(u.M_.USER_SETTINGS,":sync"),this.render),this.listenTo(u.Vk.CUSTOMER,"".concat(u.M_.LOGO,":sync ").concat(u.M_.LOGO,":invalidate"),this.render)}},{key:"name",get:function(){return"LeftNavigationView"}},{key:"title",get:function(){return!1}},{key:"channelName",get:function(){return"".concat(this.name).concat(this.cid)}},{key:"lang",get:function(){return"libraryEditor.leftNavigation"}},{key:"className",get:function(){return"bg-white pb-3"}},{key:"template",get:function(){return te()}},{key:"regions",value:function(){return{logo:{el:".logo-region",replaceElement:!1},folderTree:{el:".folder-tree-region",replaceElement:!1,partialLoading:y.LP.LeftNav}}}},{key:"events",value:function(){return{"click .new-folder":"newFolder"}}},{key:"appLinks",get:function(){return{".applink-new-library":{application:u.OV.LIBRARY_EDITOR,action:u.eX.LibraryEditor.NEW_LIBRARY}}}},{key:"fetchData",value:function(){this.maxCustomLibraries=this.settingsDataService.getSetting(this.currentUser.get("customerId"),s.E.MaxCustomLibraries),this.customerLogo=this.customerDataService.getLogo(this.currentUser.get("customerId"))}},{key:"onSelectLibrary",value:function(e){this.collection.each((function(t){r.r.get("".concat(W,":").concat(t.id)).set("open",t.id.toString()===e)})),this.render()}},{key:"onUploadLogo",value:function(e){var t=this;this.imageUploadDataService.uploadBase64Image(e,y.__.Logos,(function(e){return t.onImageUploaded(e)}))}},{key:"onImageUploaded",value:function(e){this.customerDataService.createLogo(this.currentUser.get("customerId"),e.get("id"),e.get("fileIdType"),(function(e){a.k.logUserAction({id:e.get("id")},{location:l.LZ.LeftNav,actionType:l.Vw.Create,entity:l.py.Logo,workflowPhase:l.eu.Complete,eventVersion:l.eq.V2})}))}},{key:"renderLogo",value:function(){this.showChildView("logo",new I({model:this.customerLogo,customerId:this.currentUser.get("customerId"),channelName:this.channelName}))}},{key:"renderLeftNav",value:function(){var e=new J({collection:this.collection,channelName:this.channelName,libraryId:this.options.libraryId,folderTreeId:p.J.LIBRARY_EDITOR,forceOpen:1===this.collection.length});this.showChildView("folderTree",e)}},{key:"requiredResources",get:function(){return{currentUser:h.K.currentUser,config:d.p.config,collection:K.T.libraries}}},{key:"onBeforeRender",value:function(){return this.fetchData(),!!this.maxCustomLibraries}},{key:"viewOptions",value:function(){if(this.collection)return{styles:ne,plusSvg:c.Nj.getSvg(c.vn.Plus),canCreateLibraries:!!this.maxCustomLibraries&&this.maxCustomLibraries.get("value")>this.collection.length}}},{key:"onRender",value:function(){this.renderLogo(),this.renderLeftNav()}}])&&re(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,i}(i.Q.G7)},71641:function(e,t,n){"use strict";n.d(t,{w:function(){return y}});var o=n(39479),r=n(31647),i=n(55142);function a(e){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(e)}function l(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,s(o.key),o)}}function s(e){var t=function(e,t){if("object"!=a(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!=a(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==a(t)?t:t+""}function c(e,t,n){return t=p(t),function(e,t){if(t&&("object"==a(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,u()?Reflect.construct(t,n||[],p(e).constructor):t.apply(e,n))}function u(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(u=function(){return!!e})()}function p(e){return p=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},p(e)}function f(e,t){return f=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},f(e,t)}var y=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),c(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&&f(e,t)}(t,e),n=t,r=[{key:"name",get:function(){return"DropdownCollectionComponent"}},{key:"className",get:function(){return"dropdown-menu items-viewpart ".concat(this.getExtraClasses(this.options.displayOptions))}},{key:"attributes",get:function(){return{"aria-labelledby":"dropdownSelector"}}},{key:"initialize",value:function(){this.listenTo(this.options.channelName,"center:dropdown",this.centerSelectedItem)}},{key:"childView",get:function(){return i.N}},{key:"childViewOptions",get:function(){var e={channelName:this.options.channelName,analyticsHelper:this.options.analyticsHelper};return o.extend(e,this.options.childOptions)}},{key:"getExtraClasses",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.alignment,n=void 0===t?"left":t,o=e.extraClasses,r="dropdown-menu-".concat(n);return o&&(r="".concat(r," ").concat(o)),r}},{key:"centerSelectedItem",value:function(){var e=this.$el.find(".active");if(e.length){var t=this.$el.scrollTop()+e.position().top,n=.5*this.$el.height()+.5*e.height();this.$el.scrollTop(t-n)}}}],r&&l(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(r.Q.$W)},41238:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({1:function(e,t,n,o,r){e.propertyIsEnumerable;var i,a,l=e.lambda,s=e.escapeExpression;return'<a class="'+s(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.imageContainer:i,t))+' mx-auto d-block">\n <div class="'+s(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.imageMask:i,t))+' rounded-3"></div>\n\n <div class="position-absolute text-white '+s(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.dropdownContainer:i,t))+'">\n <span data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false" class="'+s(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.dropdownButton:i,t))+' d-inline-block ui-dropdown-toggle">\n '+(null!=(i=l(null!=(i=null!=t?t.options:t)?i.dropdownSvg:i,t))?i:"")+'\n </span>\n <div class="options-region"></div>\n </div>\n\n <img src="'+s("function"==typeof(a=null!=(a=n.url||(null!=t?t.url:t))?a:e.hooks.helperMissing)?a.call(null!=t?t:e.nullContext||{},{name:"url",hash:{},data:r}):a)+'" class="'+s(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.image:i,t))+' rounded-3"/>\n</a>\n<span class="upload-logo d-none"></span>\n'},3:function(e,t,n,o,r){e.propertyIsEnumerable;var i,a=e.lambda,l=e.escapeExpression;return'<a class="d-flex flex-column justify-content-center align-items-center mx-auto no-decoration rounded-3 upload-logo '+l(a(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.addCrest:i,t))+'">\n <div class="'+l(a(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.plusSvg:i,t))+'">'+(null!=(i=a(null!=(i=null!=t?t.options:t)?i.plusSvg:i,t))?i:"")+'</div>\n <div class="w-75">'+l((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"addCrest",{name:"lang",hash:{},data:r}))+"</div>\n</a>\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,r){var i;return e.propertyIsEnumerable,null!=(i=n.if.call(null!=t?t:e.nullContext||{},null!=t?t.url:t,{name:"if",hash:{},fn:e.program(1,r,0),inverse:e.program(3,r,0),data:r}))?i:""},useData:!0})},58266:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,o,r){return'<div class="items-region"></div>'},useData:!0})},99223:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({1:function(e,t,n,o,r){var i;return e.propertyIsEnumerable,e.escapeExpression(e.lambda(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.disabled:i,t))},3:function(e,t,n,o,r){var i;return e.propertyIsEnumerable,e.escapeExpression(e.lambda(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.selected:i,t))},5:function(e,t,n,o,r){e.propertyIsEnumerable;var i,a=e.lambda;return' <span class="'+e.escapeExpression(a(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.caret:i,t))+' d-inline-block position-absolute">\n '+(null!=(i=a(null!=(i=null!=t?t.options:t)?i.caretSvg:i,t))?i:"")+"\n </span>\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,r){e.propertyIsEnumerable;var i,a,l=e.lambda,s=e.escapeExpression,c=null!=t?t:e.nullContext||{};return'<div class="position-relative '+s(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.library:i,t))+" "+(null!=(i=n.if.call(c,null!=(i=null!=t?t.options:t)?i.disabled:i,{name:"if",hash:{},fn:e.program(1,r,0),inverse:e.noop,data:r}))?i:"")+'">\n <a class="position-relative library-event '+s(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.libraryAnchor:i,t))+" "+(null!=(i=n.if.call(c,null!=(i=null!=t?t.options:t)?i.open:i,{name:"if",hash:{},fn:e.program(3,r,0),inverse:e.noop,data:r}))?i:"")+' ui-anchor no-hover-text-underline">\n'+(null!=(i=n.if.call(c,null!=(i=null!=t?t.options:t)?i.hasFolders:i,{name:"if",hash:{},fn:e.program(5,r,0),inverse:e.noop,data:r}))?i:"")+' <span class="'+s(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.text:i,t))+' ui-text">'+s("function"==typeof(a=null!=(a=n.name||(null!=t?t.name:t))?a:e.hooks.helperMissing)?a.call(c,{name:"name",hash:{},data:r}):a)+'</span>\n </a>\n <div class="actions-region"></div>\n</div>\n<div class="folders-region"></div>'},useData:!0})},8050:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,o,r){e.propertyIsEnumerable;var i,a=e.lambda;return'<span data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false" class="'+e.escapeExpression(a(null!=(i=null!=t?t.options:t)?i.dropdownClass:i,t))+' d-inline-block ui-dropdown-toggle">\n '+(null!=(i=a(null!=(i=null!=t?t.options:t)?i.svg:i,t))?i:"")+'\n</span>\n<div class="items-region"></div>'},useData:!0})},26704:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({1:function(e,t,n,o,r){e.propertyIsEnumerable;var i,a=e.lambda;return'<span data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false" class="'+e.escapeExpression(a(null!=(i=null!=t?t.options:t)?i.dropdownClass:i,t))+' d-inline-block ui-dropdown-toggle">\n '+(null!=(i=a(null!=(i=null!=t?t.options:t)?i.svg:i,t))?i:"")+'\n</span>\n<div class="items-region"></div>\n'},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,r){var i;return e.propertyIsEnumerable,null!=(i=n.if.call(null!=t?t:e.nullContext||{},null!=(i=null!=t?t.options:t)?i.hasActions:i,{name:"if",hash:{},fn:e.program(1,r,0),inverse:e.noop,data:r}))?i:""},useData:!0})},32122:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({1:function(e,t,n,o,r){e.propertyIsEnumerable;var i,a=e.lambda,l=e.escapeExpression;return'<div class="'+l(a(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.addLibraryContainer:i,t))+'">\n <button class="applink-new-library btn btn-outline-secondary '+l(a(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.addLibrary:i,t))+'">\n <span class="'+l(a(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.plus:i,t))+' d-inline-block position-absolute">\n '+(null!=(i=a(null!=(i=null!=t?t.options:t)?i.plusSvg:i,t))?i:"")+"\n </span>\n "+l((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"newLibrary",{name:"lang",hash:{},data:r}))+"\n </button>\n</div>\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,r){var i;return e.propertyIsEnumerable,'<div class="logo-region"></div>\n<div class="folder-tree-region"></div>\n'+(null!=(i=n.if.call(null!=t?t:e.nullContext||{},null!=(i=null!=t?t.options:t)?i.canCreateLibraries:i,{name:"if",hash:{},fn:e.program(1,r,0),inverse:e.noop,data:r}))?i:"")},useData:!0})}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[7190],{61596:function(e,r,t){t.d(r,{$:function(){return u}});var n=t(39479),i=t(57857),a=t(93569),o="libraryEditor.utils",u={isValidChapterTime:function(e,r,t,i){if(i){if(!n.isNumber(r))return s.StartTime.Invalid();if(r<0)return s.StartTime.Invalid();if(r>a.X4.millisecondsToSeconds(t))return s.StartTime.Exceeds();if(i.some((function(t){return!(t.id&&t.id===e.id||t.cid===e.cid)&&t.get("startTime")===r})))return s.StartTime.Exists()}},isValidChapterName:function(e,r,t){return r?r.length>255?s.Name.MaxLength():t.some((function(t){return!(t.id&&t.id===e.id||t.cid===e.cid)&&t.get("name").trim()===r.trim()}))?s.Name.Exists():n.isEmpty(r.trim())?s.Name.Invalid():void 0:s.Name.Invalid()},mapPhysicalChapters:function(e){var r=0;return n.map(e,(function(e,t){var n={name:e.title,startTime:r,index:t,isPhysicalChapter:!0};return r+=e.duration,n}))}},s={Name:{Invalid:function(){return i.T.getPhrase(o,"chapterNameInvalid")},Exists:function(){return i.T.getPhrase(o,"chapterNameExists")},MaxLength:function(){return i.T.getPhrase(o,"chapterNameExceeds")}},StartTime:{Invalid:function(){return i.T.getPhrase(o,"chapterStartTimeInvalid")},Exists:function(){return i.T.getPhrase(o,"chapterStartTimeExists")},Exceeds:function(){return i.T.getPhrase(o,"chapterStartTimeExceeds")}}}},57785:function(e,r,t){t.d(r,{A9:function(){return b},B9:function(){return g},Zg:function(){return E},Zl:function(){return m},aj:function(){return N},c6:function(){return v},nf:function(){return y},oJ:function(){return x},rr:function(){return l},tD:function(){return h},xC:function(){return f},xs:function(){return T},yU:function(){return P}});var n=t(39479),i=t(11306),a=t(57857),o=t(31647),u="libraryEditor.utils",s=["tags","thumbnail","chapters","resources","subtitles","disabled","links","restrictions","categories"];function c(e,r){if(e){var t=n.reduce(e,(function(e,t,i){var a=r[i];return t||a?n.isObject(t)&&n.isObject(a)&&!n.isUndefined(t.id)&&t.id===a.id?e:n.isArray(t)?d(t,a).length?e.concat(i):e:n.isEqual(t,a)?e:e.concat(i):e}),[]);if(t.length)return n.object(n.map(t,(function(t){return n.isArray(r[t])?[t,d(e[t],r[t])]:[t,r[t]]})))}}function d(e,r){var t=[];return n.each(r,(function(r){var i=n.findWhere(e,{id:r.id});if(!n.isUndefined(i)||0!==Object.keys(r).length){var a=n.isUndefined(i)?r:c(i,r);a&&(r.id<0&&!r.value||(!i||r.id<0?t.push(r):(a.id=r.id,t.push(a))))}})),t}var f={getChanges:function(e,r){var t=c(n.omit(e.toJSON(),s),n.omit(r.toJSON(),s));if(t)return n.object(n.map(n.keys(t),(function(e){return[e,f.formatChanges(e,t[e])]})))},formatChanges:function(e,r){if(!r)return null;if(n.isObject(r)&&n.isEmpty(r))return null;switch(e){case"name":case"description":case"productionYear":case"dateBroadcast":case"fields":case"episodeNumber":return r;case"channel":case"series":case"rating":case"season":return{id:r.id};case"distributors":case"producers":case"directors":case"productionCompanies":return n.map(r,(function(e){return e.id}));case"dateModified":case"hasBroadcast":case"seriesSort":return;default:o.Q.Ry.throw(new i.H("There are no formatting settings for ".concat(e)))}},updateModelState:function(e,r,t){var i=["distributors","producers","directors","productionCompanies"];for(var a in n.each(n.keys(t),(function(e){i.includes(e)&&(t[e]=r.get(e).toJSON())})),r.set(n.clone(t),{silent:!0}),e.set(r.toJSON(),{silent:!0}),t)if(!t[a]&&e.associations[a]){var u=e.get(a);(u instanceof o.Q.Hn||u instanceof o.Q.Do)&&u.clear()}},getRemovedObjectIds:function(e,r){var t=["distributors","productionCompanies","producers","directors"],i={};return n.each(n.keys(e.toJSON()),(function(a){if(n.contains(t,a)){var o=e.get(a).map((function(e){return e.id})),u=r.get(a).map((function(e){return e.id})),s=n.filter(o,(function(e){return e&&!n.contains(u,e)}));s.length&&(i[a]=s)}})),i}},l={name:[{required:!0,msg:function(){return a.T.getPhrase(u,"videoTitleRequired")}},{maxLength:255,msg:function(){return a.T.getPhrase(u,"videoTitleExceeds")}}],description:[{required:!1},{maxLength:16e3,msg:function(){return a.T.getPhrase(u,"videoDescriptionExceeds")}}],episodeNumber:function(e,r,t){return e&&e<1?a.T.getPhrase(u,"episodeNumberLessThanOne"):e&&e>2147483647?a.T.getPhrase(u,"episodeNumberExceeds"):e%1!=0?a.T.getPhrase(u,"episodeNumberNotWhole"):t.season&&t.season.get("number")>=0&&null===e?a.T.getPhrase(u,"episodeNumberNoSeason"):""},season:function(e,r,t){return t.season&&t.season.get("number")||e&&e.number||!t.episodeNumber?"":a.T.getPhrase(u,"seasonNoEpisodeNumber")}},g={name:[{required:!0,msg:function(){return a.T.getPhrase(u,"videoTitleRequired")}},{maxLength:255,msg:function(){return a.T.getPhrase(u,"videoTitleExceeds")}}],description:[{required:!1},{maxLength:16e3,msg:function(){return a.T.getPhrase(u,"videoDescriptionExceeds")}}]},m={name:[{required:!0,msg:function(){return a.T.getPhrase(u,"videoTitleRequired")}},{maxLength:255,msg:function(){return a.T.getPhrase(u,"videoTitleExceeds")}}],description:[{required:!1},{maxLength:16e3,msg:function(){return a.T.getPhrase(u,"videoDescriptionExceeds")}}]},p=(new Date).getFullYear(),h={productionYear:function(e){return e||0===e?(e=+e,isNaN(e)?"Production year must be a number.":e<1900||e>p?a.T.getPhrase(u,"validProductionYears",{currentYear:p}):void 0):""}},b={name:[{required:!0,msg:function(){return a.T.getPhrase(u,"resourceNameRequired")}}]},T={suggestion:[{required:!0,msg:function(){return a.T.getPhrase(u,"suggestEditRequired")}},{maxLength:16e3,msg:function(){return a.T.getPhrase(u,"suggestEditExceeds")}}],reason:[{required:!0,msg:function(){return a.T.getPhrase(u,"suggestEditReasonRequired")}},{maxLength:16e3,msg:function(){return a.T.getPhrase(u,"suggestEditReasonExceeds")}}]},v={number:function(e){return e?+e<1?a.T.getPhrase(u,"seasonLessThanOne"):+e>3e3?a.T.getPhrase(u,"seasonExceeds"):+e%1!=0?a.T.getPhrase(u,"seasonNotWhole"):"":a.T.getPhrase(u,"seasonRequired")}},y={empty:function(){return a.T.getPhrase(u,"suggestEditRatingRequired")},original:function(){return a.T.getPhrase(u,"suggestEditRatingInvalid")}},P={url:[{required:!0,pattern:"url",msg:function(){return a.T.getPhrase(u,"linkUrlRequired")}},{maxLength:16e3,msg:function(){return a.T.getPhrase(u,"linkUrlExceeds")}}],name:[{required:!0,msg:function(){return a.T.getPhrase(u,"linkNameRequired")}},{maxLength:255,msg:function(){return a.T.getPhrase(u,"linkNameExceeds")}}]},E={name:[{maxLength:128,msg:function(){return a.T.getPhrase(u,"fieldNameExceeds")}}],value:[{maxLength:16e3,msg:function(){return a.T.getPhrase(u,"fieldValueExceeds")}}]},x={fields:function(e){return e&&e.length?e.all((function(e){return!1!==e.isValid()}))?"":a.T.getPhrase(u,"fieldsInvalid"):""}};function N(){return[{id:-1,name:"Admin notes",value:"",placeholder:"Notes that only administrators will see"}]}},11653:function(e,r,t){t.d(r,{h:function(){return d}});var n=t(39479),i=t(57857),a=t(54008),o=t(22557),u="libraryEditor.utils",s={name:[{required:!0,msg:function(){return i.T.getPhrase(u,"folderNameRequired")}},{maxLength:255,msg:function(){return i.T.getPhrase(u,"folderNameExceeds")}}]},c=function(e,r){return{parentId:function(t){return t?o.P.calculateDestinationFolderDepth(e,t,r)>a.p.MAX_FOLDER_DEPTH?i.T.getPhrase(u,"maxFolderDepth",{maxDepth:a.p.MAX_FOLDER_DEPTH}):"":i.T.getPhrase(u,"selectParentFolder")}}},d=function(e){var r=e.validateName,t=e.validateParent,i=e.folder,a=e.collection;return r&&t?n.extend({},s,c(i,a)):r?s:t?c(i,a):void 0}},87120:function(e,r,t){t.d(r,{Y:function(){return a}});var n=t(57857),i="libraryEditor.utils",a={name:[{required:!0,msg:function(){return n.T.getPhrase(i,"libraryNameRequired")}},{maxLength:255,msg:function(){return n.T.getPhrase(i,"libraryNameExceeds")}}]}},39155:function(e,r,t){t.d(r,{I:function(){return o}});var n=t(57857),i=t(57785),a=n.T.encloseNamespace("libraryEditor.utils"),o={name:[{required:!0,msg:function(){return a("videoTitleRequired")}}],folderId:[{required:!0,msg:function(){return a("uploadFolderRequired")}}],libraryId:[{required:!0,msg:function(){return a("uploadLibraryRequired")}}],episodeNumber:function(e,r,t){return e&&e<1?a("episodeNumberLessThanOne"):e&&e>255?a("episodeNumberExceeds"):e&&e%1!=0?a("episodeNumberNotWhole"):t.season&&t.season.get("number")>=0&&null===e?a("episodeNumberNoSeason"):""},season:function(e,r,t){return t.season&&t.season.get("number")||e&&e.number||!t.episodeNumber?"":a("seasonNoEpisodeNumber")},productionYear:function(){for(var e=arguments.length,r=new Array(e),t=0;t<e;t++)r[t]=arguments[t];return i.tD.productionYear.apply(null,r)}}},70042:function(e,r,t){t.d(r,{u:function(){return m}});var n=t(57857),i=t(75459),a=t(74421),o=t(63791),u=t(83665),s=t(264),c=t(40622);function d(e){return d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},d(e)}function f(e,r,t){return(r=function(e){var r=function(e,r){if("object"!=d(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=d(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==d(r)?r:r+""}(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}var l,g="libraryEditor.utils";!function(e){e.Pdf="pdf",e.Image="image",e.PowerPoint="powerpoint",e.Document="document",e.Excel="excel",e.Zip="archive",e.File="text"}(l||(l={}));var m={mapRatingToClass:function(e){return e?function(e){switch(!0){case e<32:return"bg-purple";case e<48:return"bg-green";case e<80:return"bg-blue";case e<96:return"bg-red";case e<128:return"bg-pink";case e>=128:return"bg-yellow";default:return""}}(e):""},mapSourceToDisplayName:function(e){switch(e.get("type")){case i.r.HostedLibrary:case i.r.CustomLibrary:return e.get("name");case i.r.Exchange:return n.T.getPhrase(g,"exchange");case i.r.Workspace:return n.T.getPhrase(g,"workspace");default:return""}},mapSourceToClass:function(e){switch(e){case i.r.HostedLibrary:case i.r.CustomLibrary:return"bg-blue";case i.r.Exchange:return"bg-green";case i.r.Workspace:default:return"bg-red"}},mapMediaTypeToClass:function(e){switch(e.get("typeId")){case a.E.Clip:return"bg-dark-blue";case a.E.Interactive:return"bg-green";default:return""}},mapMediaTypeToSvg:function(e){switch(e.get("typeId")){case a.E.Clip:return o.Nj.getSvg(o.vn.Clip);case a.E.Interactive:return o.Nj.getSvg(o.vn.Interactive);default:return""}},isInteractive:function(e){return!(s.g.hasLite||!e||!e.interactives||!e.interactives.length)},mapTypeToSvg:function(e){var r=f(f(f(f(f(f(f({},l.Pdf,o.vn.FilePDF),l.Image,o.vn.FileImg),l.PowerPoint,o.vn.FilePowerpoint),l.Document,o.vn.FileWord),l.Excel,o.vn.FileExcel),l.Zip,o.vn.FileZip),l.File,o.vn.File)[e];return r||(r=o.vn.Folder),o.Nj.getSvg(r)},mapTypeToClass:function(e){switch(e){case l.Pdf:return"icon-red";case l.Image:return"icon-purple";case l.Document:return"icon-blue";case l.Excel:return"icon-green";case l.PowerPoint:return"icon-orange";case l.Zip:return"icon-teal";case l.File:return"icon-gray";default:return""}},mapTypeToExtension:function(e){return e?{pdf:"pdf",image:"png",powerpoint:"pptx"}[e.toLowerCase()]:""},mapTypeToName:function(e){if(!e)return"";switch(e){case l.Pdf:return n.T.getPhrase(g,"pdf");case l.Image:return n.T.getPhrase(g,"image");case l.Document:return n.T.getPhrase(g,"document");case l.Excel:return n.T.getPhrase(g,"spreadsheet");case l.PowerPoint:return n.T.getPhrase(g,"presentation");case l.Zip:return n.T.getPhrase(g,"zipArchive");case l.File:return n.T.getPhrase(g,"file");default:return""}},translateMetadataCollectionNames:function(e){return new u.L(e.map((function(e){return Object.assign(Object.assign({},e.toJSON()),{name:m.translateMetadataName(e.get("name"))})})))},translateMetadataName:function(e){var r="suggestEdit";switch(e){case c.pG.VideoTitle:r+="VideoTitle";break;case c.pG.Description:r+="Description";break;case c.pG.Rating:r+="Rating";break;case c.pG.SeriesTitle:r+="SeriesTitle";break;case c.pG.Season:r+="SeasonNumber";break;case c.pG.EpisodeNumber:r+="EpisodeNumber";break;case c.pG.BroadcastDate:r+="BroadcastDate";break;case c.pG.Channel:r+="Channel";break;case c.pG.ProductionYear:r+="ProductionYear";break;case c.pG.Distributors:r+="Distributors";break;case c.pG.ProductionCompanies:r+="ProductionCompanies";break;case c.pG.Directors:r+="Directors";break;case c.pG.Producers:r+="Producers";break;case c.pG.Other:r+="Other"}return n.T.getPhrase(g,r)}}},7190:function(e,r,t){t.d(r,{$k:function(){return n.$},Y7:function(){return a.Y},yU:function(){return i.yU},A9:function(){return i.A9},c6:function(){return i.c6},nf:function(){return i.nf},xs:function(){return i.xs},uB:function(){return o.u}});var n=t(61596),i=t(57785),a=(t(11653),t(57857),t(87120)),o=(t(39155),t(70042))},83665:function(e,r,t){function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function i(e,r,t){return r=o(r),function(e,r){if(r&&("object"==n(r)||"function"==typeof r))return r;if(void 0!==r)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,a()?Reflect.construct(r,t||[],o(e).constructor):r.apply(e,t))}function a(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(a=function(){return!!e})()}function o(e){return o=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},o(e)}function u(e,r){return u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,r){return e.__proto__=r,e},u(e,r)}t.d(r,{L:function(){return s}});var s=function(e){function r(){return function(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}(this,r),i(this,r,arguments)}return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),r&&u(e,r)}(r,e),t=r,Object.defineProperty(t,"prototype",{writable:!1}),t;var t}(t(31647).Q.FE)}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[7295],{70680:function(e,t,n){"use strict";n.d(t,{r:function(){return v}});var o=n(57857),i=n(31647),r=n(88172),l=n(93569),s=n(40622),a=n(26457),u=n(97781),c=n.n(u);function p(e){return p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},p(e)}function f(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,h(o.key),o)}}function h(e){var t=function(e,t){if("object"!=p(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!=p(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==p(t)?t:t+""}function d(e,t,n){return t=b(t),function(e,t){if(t&&("object"==p(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,y()?Reflect.construct(t,n||[],b(e).constructor):t.apply(e,n))}function y(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(y=function(){return!!e})()}function b(e){return b=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},b(e)}function m(e,t){return m=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},m(e,t)}var v=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),d(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&&m(e,t)}(t,e),n=t,(u=[{key:"initialize",value:function(){this.spinnerModel=new i.Q.Hn({showSpinner:this.isProcessing()}),this.listenTo(this.options.channelName,s.NT.MergeChapters,this.onClickMergeChapters)}},{key:"name",get:function(){return"ConcatenateRequestComponent"}},{key:"template",get:function(){return c()}},{key:"lang",get:function(){return"libraryEditor.concatenateRequest"}},{key:"className",get:function(){return"mt-3"}},{key:"regions",value:function(){return{button:{el:".btn-region",replaceElement:!0}}}},{key:"onClickMergeChapters",value:function(){this.spinnerModel.set(r.ZV.ShowSpinner,!0),this.render()}},{key:"isProcessing",value:function(){return!(!this.model||!this.model.get("status")||this.model.get("status")!==a.Um.New&&this.model.get("status")!==a.Um.Concatenating)}},{key:"renderButton",value:function(){var e={chapters:o.T.getPhrase(this.lang,"mergeChapters"),subtitles:o.T.getPhrase(this.lang,"mergeChapters"),clickViewSubtitles:o.T.getPhrase(this.lang,"enabledCustomSubtitles")},t=new r.Py({buttonText:e[this.options.type],extraButtonClass:"btn-dark ".concat("XKFne"),model:this.spinnerModel,spinnerOptions:{size:l.Ey.Small,type:l.dR.Light,extraClasses:"mx-auto"},channelName:this.options.channelName,saveEvent:s.NT.MergeChapters});this.showChildView("button",t)}},{key:"viewOptions",value:function(){var e={chapters:{heading:o.T.getPhrase(this.lang,"chaptersHeading"),line1:o.T.getPhrase(this.lang,"chaptersInfo1"),line2:o.T.getPhrase(this.lang,"chaptersInfo2")},subtitles:{heading:o.T.getPhrase(this.lang,"subtitlesHeading"),line1:o.T.getPhrase(this.lang,"subtitlesInfo1"),line2:o.T.getPhrase(this.lang,"subtitlesInfo2")},clickViewSubtitles:{heading:o.T.getPhrase(this.lang,"cvSubtitlesHeading"),line1:o.T.getPhrase(this.lang,"cvSubtitlesInfo1"),line2:o.T.getPhrase(this.lang,"cvSubtitlesInfo2")}};return{progress:this.model&&this.model.get("progress")&&o.T.getPhrase(this.lang,"progress",{progress:this.model.get("progress")}),componentOptions:e[this.options.type],processing:this.spinnerModel.get(r.ZV.ShowSpinner),failed:this.model&&this.model.get("status")&&this.model.get("status")===a.Um.ConcatenationFailed}}},{key:"onRender",value:function(){this.renderButton()}}])&&f(n.prototype,u),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,u}(i.Q.wA)},21053:function(e,t,n){"use strict";n.d(t,{W:function(){return g}});var o=n(48088),i=n(57857),r=n(31647),l=n(57085),s=n(35630),a=n(57098),u=n(43791),c=n.n(u),p={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,d(o.key),o)}}function d(e){var t=function(e,t){if("object"!=f(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!=f(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==f(t)?t:t+""}function y(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,b()?Reflect.construct(t,n||[],m(e).constructor):t.apply(e,n))}function b(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(b=function(){return!!e})()}function m(e){return m=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},m(e)}function v(e,t){return v=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},v(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),y(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,(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:p}}},{key:"onSave",value:function(){o.Radio.channel(a.OV.LIBRARY_EDITOR).trigger(a.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 l.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)},82407:function(e,t,n){"use strict";n.r(t),n.d(t,{EditResourcesView:function(){return Ft}});var o=n(48088),i=n(39479),r=n(25417),l=n(99748),s=n(21679),a=n(57857),u=n(31647),c=n(52076),p=n(70065),f=n(81937),h=n(56252),d=n(18222),y=n(45837),b=n(83162),m=n(57769),v=n(44237),g=n.n(v),k=n(61571),w=n.n(k),C={fileDrop:"ejhuF",dropMask:"fLdBH",dragOver:"_sk3R"};function O(e){return O="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},O(e)}function S(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,T(o.key),o)}}function T(e){var t=function(e,t){if("object"!=O(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!=O(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==O(t)?t:t+""}function P(e,t,n){return t=E(t),function(e,t){if(t&&("object"==O(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,j()?Reflect.construct(t,n||[],E(e).constructor):t.apply(e,n))}function j(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(j=function(){return!!e})()}function E(e){return E=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},E(e)}function R(e,t){return R=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},R(e,t)}var L=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),P(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&&R(e,t)}(t,e),n=t,o=[{key:"name",get:function(){return"FileSelectComponent"}},{key:"template",get:function(){return g()}},{key:"lang",get:function(){return"shared._fileSelect"}},{key:"elements",get:function(){return{dropArea:".file-drop"}}},{key:"defaults",get:function(){return{acceptMultiple:!0}}},{key:"behaviors",get:function(){return[{behaviorClass:m.Z,buttonSelector:".browse",channelName:this.options.channelName,acceptMultiple:this.options.acceptMultiple,mimeType:this.options.mimeType},{behaviorClass:b.V,channelName:this.options.channelName,acceptMultiple:this.options.acceptMultiple}]}},{key:"events",value:function(){var e,t,n;return e={"drop .file-drop":"onDrop","dragover .file-drop":"onDragOver"},n="onDragLeave",(t=T(t="dragleave .".concat(C.dropMask)))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},{key:"onDrop",value:function(){this.$el.removeClass(C.dragOver)}},{key:"onDragOver",value:function(e){this.$el.addClass(C.dragOver),e.preventDefault()}},{key:"onDragLeave",value:function(){this.$el.removeClass(C.dragOver)}},{key:"viewOptions",value:function(){return Object.assign(Object.assign({},this.options),{styles:C,limitText:this.options.limitText,isClickViewContent:this.options.isClickViewContent})}},{key:"onRender",value:function(){this.getUI("dropArea").append(w()({dropMask:C.dropMask,fileDropText:a.T.getPhrase(this.lang,"drop")}))}}],o&&S(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(u.Q.wA),V=n(85835);function _(e){return _="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_(e)}function I(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,N(o.key),o)}}function N(e){var t=function(e,t){if("object"!=_(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!=_(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==_(t)?t:t+""}function x(e,t,n){return t=D(t),function(e,t){if(t&&("object"==_(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||[],D(e).constructor):t.apply(e,n))}function U(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(U=function(){return!!e})()}function D(e){return D=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},D(e)}function B(e,t){return B=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},B(e,t)}var A="shared.errors.tooManyResources",M=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=x(this,t,["Cannot add that many resources"])).resourceLimit=e,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&B(e,t)}(t,e),n=t,(o=[{key:"name",get:function(){return"TooManyResourcesError"}},{key:"dialogOptions",get:function(){return{title:a.T.getPhrase(A,"heading"),text:a.T.getPhrase(A,"body",{resourceLimit:this.resourceLimit}),buttons:[{text:a.T.getPhrase(A,"okay"),className:"btn btn-dark",success:!0}]}}}])&&I(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(V.S);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 q(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 Q(e){var t=function(e,t){if("object"!=F(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!=F(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==F(t)?t:t+""}function z(e,t,n){return t=J(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,H()?Reflect.construct(t,n||[],J(e).constructor):t.apply(e,n))}function H(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(H=function(){return!!e})()}function J(e){return J=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},J(e)}function K(e,t){return K=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},K(e,t)}var Z="shared.errors.tooManySubtitles",G=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=z(this,t,["Cannot add that many subtitles"])).subtileLimit=e,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&K(e,t)}(t,e),n=t,(o=[{key:"name",get:function(){return"TooManySubtitlesError"}},{key:"dialogOptions",get:function(){return{title:a.T.getPhrase(Z,"heading"),text:a.T.getPhrase(Z,"body",{subtitleLimit:this.subtileLimit}),buttons:[{text:a.T.getPhrase(Z,"okay"),className:"btn btn-dark",success:!0}]}}}])&&q(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(V.S),W=n(10101),Y=n(57098),X=n(29457),ee=n(14327),te=n(19226),ne=n(93569),oe=n(99249),ie=n(88172),re=n(7190),le=n(41165),se=n.n(le);function ae(e){return ae="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},ae(e)}function ue(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,ce(o.key),o)}}function ce(e){var t=function(e,t){if("object"!=ae(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!=ae(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ae(t)?t:t+""}function pe(e,t,n){return t=he(t),function(e,t){if(t&&("object"==ae(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,fe()?Reflect.construct(t,n||[],he(e).constructor):t.apply(e,n))}function fe(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(fe=function(){return!!e})()}function he(e){return he=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},he(e)}function de(e,t){return de=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},de(e,t)}var ye=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=pe(this,t,[e])).showNameField=!1,n.disableBtn=!0,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&de(e,t)}(t,e),n=t,(i=[{key:"initialize",value:function(){this.model=oe.r.get(this.viewModelName),this.model.addValidation(re.yU),this.bindListeners()}},{key:"name",get:function(){return"AddLinksComponent"}},{key:"template",get:function(){return se()}},{key:"lang",get:function(){return"libraryEditor.addLinks"}},{key:"tagName",get:function(){return"form"}},{key:"bindings",get:function(){return{"[name=url]":{observe:"url",setOptions:{validate:!0}},"[name=name]":{observe:"name",setOptions:{validate:!0}}}}},{key:"regions",value:function(){return{attachBtn:".attach-btn-region"}}},{key:"behaviors",get:function(){return[{behaviorClass:W.Bp},{behaviorClass:W.fS}]}},{key:"elements",get:function(){return{nameField:"#name-container"}}},{key:"viewModelName",get:function(){return"".concat(this.name,":").concat(this.cid)}},{key:"bindListeners",value:function(){this.listenTo(this.model,"change:url",this.onChangeUrl),this.listenTo(this.model,"change:name",this.onChangeName),this.listenTo(this.options.channelName,"attach:link",this.onClickAttach)}},{key:"onChangeUrl",value:function(){this.showNameField&&!this.model.isValid("url")?(this.getUI("nameField").hide(),this.model.set("name",""),this.showNameField=!1):!this.showNameField&&this.model.isValid("url")&&(this.getUI("nameField").show(),this.showNameField=!0)}},{key:"onChangeName",value:function(){this.model.validate("name"),this.disableBtn=!this.model.isValid(),this.renderAttachButton()}},{key:"onClickAttach",value:function(){var e=this.model.toJSON();this.model.clear(),o.Radio.channel(this.options.channelName).trigger("add:link",e),this.render()}},{key:"renderAttachButton",value:function(){this.options.hide||this.showChildView("attachBtn",new ie.Py({saveEvent:"attach:link",channelName:this.options.channelName,buttonText:a.T.getPhrase(this.lang,"attach"),extraButtonClass:"btn-dark attach",disabled:this.disableBtn,buttonType:"submit",spinnerOptions:{size:ne.Ey.Medium,type:ne.dR.Light,extraClasses:"mx-auto"}}))}},{key:"viewOptions",value:function(){return{limit:this.options.limit,hide:this.options.hide}}},{key:"onRender",value:function(){this.renderAttachButton(),this.stickit(),o.Validation.bind(this)}},{key:"onClose",value:function(){this.unstickit(),o.Validation.unbind(this)}}])&&ue(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,i}(u.Q.wA),be=n(70680),me=n(68708),ve=n(21053),ge=n(53808),ke=n(63791),we=n(97237),Ce=n.n(we),Oe={svgContainer:"sr9KQ",progress:"Cn0ad"};function Se(e){return Se="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Se(e)}function Te(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,Pe(o.key),o)}}function Pe(e){var t=function(e,t){if("object"!=Se(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!=Se(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Se(t)?t:t+""}function je(e,t,n){return t=Re(t),function(e,t){if(t&&("object"==Se(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Ee()?Reflect.construct(t,n||[],Re(e).constructor):t.apply(e,n))}function Ee(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Ee=function(){return!!e})()}function Re(e){return Re=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Re(e)}function Le(e,t){return Le=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Le(e,t)}var Ve=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),je(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&&Le(e,t)}(t,e),n=t,(o=[{key:"initialize",value:function(){this.listenTo(this.model,"change:progress",this.render)}},{key:"name",get:function(){return"FileUploadComponent"}},{key:"template",get:function(){return Ce()}},{key:"events",value:function(){return{"click .cancel-upload":"onClickCancelUpload"}}},{key:"onClickCancelUpload",value:function(){ge.q.isFunction(this.options.onClickCancelUpload)&&this.options.onClickCancelUpload(this.model.get("id"))}},{key:"viewOptions",value:function(){return{styles:Oe,svg:ke.Nj.getSvg(ke.vn.Folder),tickSvg:ke.Nj.getSvg(ke.vn.Check),finished:this.model.get("progress")>=100}}}])&&Te(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(u.Q.wA);function _e(e){return _e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_e(e)}function Ie(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,Ne(o.key),o)}}function Ne(e){var t=function(e,t){if("object"!=_e(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!=_e(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==_e(t)?t:t+""}function xe(e,t,n){return t=De(t),function(e,t){if(t&&("object"==_e(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Ue()?Reflect.construct(t,n||[],De(e).constructor):t.apply(e,n))}function Ue(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Ue=function(){return!!e})()}function De(e){return De=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},De(e)}function Be(e,t){return Be=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Be(e,t)}var Ae=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),xe(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&&Be(e,t)}(t,e),n=t,(i=[{key:"name",get:function(){return"FileUploadsComponentCollection"}},{key:"childView",get:function(){return Ve}},{key:"childViewOptions",get:function(){var e=this;return{onClickCancelUpload:function(t){o.Radio.channel(e.options.channelName).trigger("cancel:upload",t)}}}}])&&Ie(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,i}(u.Q.$W),Me=n(36022),Fe=n(19249),qe={handleQuery:function(){return function(e,t){var n=[];if(e){var o=CVLanguages.getEnglishNameContains(e);return i.each(o,(function(e,t){n.push({key:t,name:e.englishName})})),t(n)}t()}},getTypeaheadConfig:function(){return function(){return{name:"languages",source:qe.handleQuery(),limit:5,display:function(e){return e.name},templates:{suggestion:Fe.ou,pending:Fe.gb,notFound:Fe.TX}}}}},Qe=n(56730),ze=n.n(Qe);function He(e){return He="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},He(e)}function Je(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,Ke(o.key),o)}}function Ke(e){var t=function(e,t){if("object"!=He(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!=He(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==He(t)?t:t+""}function Ze(e,t,n){return t=Ge(t),function(e,t){if(t&&("object"==He(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,$e()?Reflect.construct(t,n||[],Ge(e).constructor):t.apply(e,n))}function $e(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return($e=function(){return!!e})()}function Ge(e){return Ge=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ge(e)}function We(e,t){return We=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},We(e,t)}var Ye=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),Ze(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&&We(e,t)}(t,e),n=t,(o=[{key:"initialize",value:function(e){this.model=oe.r.get("subtitle:language",e.defaultLanguage),this.model.addValidation(ne.AJ),this.listenTo(this.channelName,"select:language",this.onLanguageSelected)}},{key:"template",get:function(){return ze()}},{key:"name",get:function(){return"LanguageSelectComponent"}},{key:"lang",get:function(){return"libraryEditor.languageSelect"}},{key:"events",value:function(){return{"click .submit":"onClickSubmit",submit:"onClickSubmit"}}},{key:"behaviors",get:function(){return[{behaviorClass:W.Yw,title:a.T.getPhrase(this.lang,"heading"),buttons:[{text:a.T.getPhrase(this.lang,"submit"),type:"submit",className:"btn btn-dark submit"}]},{behaviorClass:W.fS}]}},{key:"regions",value:function(){return{typeahead:".typahead-region"}}},{key:"channelName",get:function(){return"".concat(this.name).concat(this.cid)}},{key:"getTypeaheadConfigs",value:function(){return[{name:"languages",typeaheadConfig:qe.getTypeaheadConfig()}]}},{key:"renderTypeahead",value:function(){this.showChildView("typeahead",new Me.M({model:this.model,parentChannelName:this.channelName,inputId:"language",selectEvent:"select:language",typeaheadConfigs:this.getTypeaheadConfigs()}))}},{key:"onLanguageSelected",value:function(e){this.model.set("code",e.key)}},{key:"onClickSubmit",value:function(){this.model.validate(),this.model.isValid()&&(this.options.promise.resolve(this.model.toJSON()),this.triggerMethod("hide"))}},{key:"onBeforeDestroy",value:function(){"pending"===this.options.promise.state()&&this.options.promise.reject()}},{key:"onRender",value:function(){this.renderTypeahead()}}])&&Je(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(u.Q.wA),Xe=n(77605),et=function(e,t){var n,o,i=e.language;return o=(null==t?void 0:t.filter((function(e){return e.language!==i}))).length>0?CVLanguages.getFullEnglishName(i):CVLanguages.getEnglishName(i),(null===(n=e.metadata)||void 0===n?void 0:n.autoGenerated)?a.T.getPhrase("shared.shared-utils","autoGeneratedSubtitle",{name:o}):o},tt=n(21974),nt=n(85985),ot=n.n(nt),it={container:"SizJb",svgContainer:"PuqLQ",actionSvg:"L9P1P"};function rt(e){return rt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},rt(e)}function lt(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,st(o.key),o)}}function st(e){var t=function(e,t){if("object"!=rt(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!=rt(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==rt(t)?t:t+""}function at(e,t,n){return t=ct(t),function(e,t){if(t&&("object"==rt(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,ut()?Reflect.construct(t,n||[],ct(e).constructor):t.apply(e,n))}function ut(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(ut=function(){return!!e})()}function ct(e){return ct=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ct(e)}function pt(e,t){return pt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},pt(e,t)}var ft=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),at(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&&pt(e,t)}(t,e),n=t,(o=[{key:"name",get:function(){return"SubtitleItemComponent"}},{key:"template",get:function(){return ot()}},{key:"className",get:function(){return"".concat(it.container," rounded p-2 mb-2")}},{key:"events",value:function(){return{"click .delete":"onClickDelete"}}},{key:"getEnglishName",value:function(){return et(this.model.toJSON(),this.model.collection.toJSON())}},{key:"onClickDelete",value:function(){!this.options.isClickViewContent&&ge.q.isFunction(this.options.onClickDelete)&&this.options.onClickDelete(this.model)}},{key:"viewOptions",value:function(){return{styles:it,svg:ke.Nj.getSvg(tt.u.mapTypeToSvg("subtitle")),trashSvg:ke.Nj.getSvg(ke.vn.Delete),name:this.getEnglishName(),isClickViewContent:this.options.isClickViewContent}}}])&<(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(u.Q.wA),ht=n(54758),dt=n(71060),yt=n.n(dt);function bt(e){return bt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},bt(e)}function mt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function vt(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,kt(o.key),o)}}function gt(e,t,n){return t&&vt(e.prototype,t),n&&vt(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function kt(e){var t=function(e,t){if("object"!=bt(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!=bt(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==bt(t)?t:t+""}function wt(e,t,n){return t=Ot(t),function(e,t){if(t&&("object"==bt(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Ct()?Reflect.construct(t,n||[],Ot(e).constructor):t.apply(e,n))}function Ct(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Ct=function(){return!!e})()}function Ot(e){return Ot=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ot(e)}function St(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&&Tt(e,t)}function Tt(e,t){return Tt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Tt(e,t)}var Pt=function(e){function t(e){return mt(this,t),wt(this,t,[e])}return St(t,e),gt(t,[{key:"name",get:function(){return"VideoSubtitlesComponent"}},{key:"template",get:function(){return yt()}},{key:"regions",value:function(){return{subtitles:{el:".subtitles-list-region",replaceElement:!0}}}},{key:"viewOptions",value:function(){return{headerText:this.options.headerText,emptyStateText:this.options.emptyStateText}}},{key:"onRender",value:function(){this.showChildView("subtitles",new jt({collection:this.collection,channelName:this.options.channelName,isClickViewContent:this.options.isClickViewContent}))}}])}(u.Q.wA),jt=function(e){function t(e){return mt(this,t),wt(this,t,[e])}return St(t,e),gt(t,[{key:"name",get:function(){return"VideoSubtitlesComponentCollection"}},{key:"lang",get:function(){return"libraryEditor.videoSubtitles"}},{key:"childView",get:function(){return ft}},{key:"childViewOptions",get:function(){var e=this;return{isClickViewContent:this.options.isClickViewContent,onClickDelete:function(t){return e.onClickDelete(t)}}}},{key:"onClickDelete",value:function(e){var t=this;this.options.isClickViewContent||new ht.M({title:a.T.getPhrase(this.lang,"removeHeading"),text:a.T.getPhrase(this.lang,"removeBody",{language:this.getEnglishName(e)}),buttons:[{text:a.T.getPhrase(this.lang,"remove"),className:"btn btn-danger",success:!0},{text:a.T.getPhrase(this.lang,"cancel"),className:"btn btn-link",close:!0}],channelName:"".concat(this.name).concat(this.cid)}).render().done((function(){o.Radio.channel(t.options.channelName).trigger("delete:subtitle",e.get("id"))}))}},{key:"getEnglishName",value:function(e){return et(e.toJSON(),e.collection.toJSON())}}])}(u.Q.$W),Et=n(40622),Rt=n(26457),Lt=n(56906),Vt=n(95061),_t=n(51069),It=n.n(_t);function Nt(e){return Nt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Nt(e)}function xt(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,Ut(o.key),o)}}function Ut(e){var t=function(e,t){if("object"!=Nt(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!=Nt(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Nt(t)?t:t+""}function Dt(e,t,n){return t=At(t),function(e,t){if(t&&("object"==Nt(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Bt()?Reflect.construct(t,n||[],At(e).constructor):t.apply(e,n))}function Bt(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Bt=function(){return!!e})()}function At(e){return At=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},At(e)}function Mt(e,t){return Mt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Mt(e,t)}var Ft=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),Dt(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&&Mt(e,t)}(t,e),n=t,b=[{key:"initialize",value:function(){this.initializeUploadServices(),this.bindDataListeners(),this.bindViewListeners(),this.bindFileSelectListeners(),ne.Si.initBackButton(),this.chapterDataService=s.u.getInstance(Y.Or.Chapter,this),this.videoDataService=s.u.getInstance(Y.Or.Video,this),this.linkDataService=s.u.getInstance(Y.Or.Link,this),this.resourceDataService=s.u.getInstance(Y.Or.Resource,this),this.subtitleDataService=s.u.getInstance(Y.Or.Subtitle,this),this.resourceUploads=[],this.resourceUploadCount=0}},{key:"name",get:function(){return"EditResourcesView"}},{key:"lang",get:function(){return"libraryEditor.editResources"}},{key:"title",get:function(){return this.model&&this.model.get("name")||"Edit Resources"}},{key:"template",get:function(){return It()}},{key:"props",get:function(){return["videoDataService"]}},{key:"className",get:function(){return"bg-white p-3 rounded"}},{key:"channelName",get:function(){return ne.N0.generateUniqueChannelName(this)}},{key:"behaviors",get:function(){return[{behaviorClass:W._7}]}},{key:"requiredResources",get:function(){return{currentUser:te.K.currentUser,libraries:Vt.T.libraries}}},{key:"initializeUploadServices",value:function(){this.resourceUploadService=new h.L1,this.listenTo(Y.jr.RESOURCE_UPLOAD,f.S.UPLOAD_COMPLETE,this.onResourceUploadComplete),this.subtitleUploadService=new h.M_,this.listenTo(Y.jr.SUBTITLE_UPLOAD,f.S.UPLOAD_COMPLETE,this.onSubtitleUploadComplete)}},{key:"bindDataListeners",value:function(){this.listenTo(Y.Vk.VIDEO,"".concat(Y.M_.VIDEOS,":").concat(this.options.videoId,":sync"),this.render),this.listenTo(Y.Vk.VIDEO,"".concat(Y.M_.VIDEOS,":").concat(this.options.videoId,":error"),this.onVideoDataError),this.listenTo(Y.Vk.VIDEO,"".concat(Y.M_.VIDEO_HAS_PHYSICAL_CHAPTERS,":").concat(this.options.videoId,":sync"),this.render),this.listenTo(Y.Vk.CHAPTER,"".concat(Y.M_.CONCATENATE_STATUS,":").concat(this.options.videoId,":error"),this.onConcatenateDataError)}},{key:"bindViewListeners",value:function(){this.listenTo(this.channelName,"add:link",this.onAddLink),this.listenTo(this.channelName,"delete:subtitle",this.onDeleteSubtitle),this.listenTo(this.channelName,"delete:resource",this.onDeleteResource),this.listenTo(this.channelName,"delete:link",this.onDeleteLink),this.listenTo(this.channelName,"cancel:upload",this.onCancelUpload),this.listenTo(this.channelName,Et.NT.MergeChapters,this.onMergeChapters)}},{key:"bindFileSelectListeners",value:function(){this.listenTo(this.getSubtitleSelectChannelName(),f.S.FILES_SELECTED,this.onSubtitleFilesAdded),this.listenTo(this.getResourceSelectChannelName(),f.S.FILES_SELECTED,this.onResourceFilesAdded)}},{key:"getSubtitleSelectChannelName",value:function(){return"".concat(this.name).concat(this.cid,"subtitles")}},{key:"getResourceSelectChannelName",value:function(){return"".concat(this.name).concat(this.cid,"resources")}},{key:"onVideoDataError",value:function(e){switch(e.type){case l.h.NotFound:u.Q.Ry.throw(new Lt.l1);break;case l.h.Forbidden:u.Q.Ry.throw(new Lt.aV)}}},{key:"onConcatenateDataError",value:function(e){e.type===l.h.NotFound&&(this.concatenateRequestNotFound=!0,this.render())}},{key:"onSubtitleFilesAdded",value:function(e,t){e.length>5-this.model.subtitles.length?u.Q.Ry.throw(new G(5)):(t&&(this.interactionType=t),this.subtitleUploadService.addFiles(e))}},{key:"onResourceFilesAdded",value:function(e,t){e.length>25-this.model.resources.length?u.Q.Ry.throw(new M(25)):(this.resourceUploadCount+=e.length,t&&(this.interactionType=t),this.resourceUploadService.addFiles(e))}},{key:"onAddLink",value:function(e){var t=this;25!==this.model.links.length&&(this.model.links.length+1===25&&this.renderAddLinks(!0),this.linkDataService.addLink(this.model.get("id"),e,(function(e){t.model.links.add(e),t.render()})))}},{key:"regions",value:function(){return{tabs:{el:".tab-region",partialLoading:X.LP.EditVideoTabs},subtitlesUpload:{el:".subtitles-upload-region",partialLoading:X.LP.EditVideoUploadArea},subtitlesUploadList:".subtitles-upload-list-region",customerSubtitlesList:".customer-subtitles-list-region",clickViewSubtitlesList:".clickview-subtitles-list-region",resourcesUpload:{el:".resources-upload-region",partialLoading:X.LP.EditVideoUploadArea},resourcesUploadList:".resources-upload-list-region",customerResourcesList:".customer-resources-list-region",clickViewResourcesList:".clickview-resources-list-region",addLinks:{el:".add-links-region",partialLoading:X.LP.EditVideoUploadArea},customerLinkList:".customer-link-list-region",clickViewLinkList:".clickview-link-list-region"}}},{key:"startPollingConcatenation",value:function(){if(this.concatenateRequest){var e=[Rt.Um.SingleFile,Rt.Um.ConcatenationFailed];i.contains(e,this.concatenateRequest.get("status"))||this.pollConcatenation()}}},{key:"pollConcatenation",value:function(){var e=this;this.isDestroyed()||this.chapterDataService.getConcatenateRequest(this.options.videoId,(function(t){if(e.concatenateRequest=t,e.concatenateRequest.get("status")!==Rt.Um.SingleFile)return setTimeout((function(){return e.pollConcatenation()}),5e3),void e.renderConcatenationRequest();e.videoDataService.clearPhysicialChaptersCache(),e.videoDataService.hasPhysicalChapters(e.options.videoId,(function(t){e.hasPhysicalChapters=t,e.renderSubtitleFileSelect()}))}))}},{key:"onDeleteResource",value:function(e){var t=this;this.resourceDataService.deleteResource(this.options.videoId,e,(function(){t.logDeleteAction(p.py.Resource,e),t.render()}))}},{key:"onDeleteSubtitle",value:function(e){var t=this;this.subtitleDataService.deleteSubtitle(this.options.videoId,e,(function(){t.logDeleteAction(p.py.Subtitle,e),t.render()}))}},{key:"onDeleteLink",value:function(e){var t=this;this.linkDataService.deleteLink(this.options.videoId,e,(function(){t.logDeleteAction(p.py.Link,e),t.render()}))}},{key:"onCancelUpload",value:function(e){this.resourceUploadService.cancelUpload(e),this.subtitleUploadService.cancelUpload(e)}},{key:"onResourceUploadComplete",value:function(e){var t=this,n=e.toJSON(),o={fileId:n.fileInfo.id,uploadId:n.file.cvUpload.uploadId,name:n.fileInfo.name,type:d.v.getResourceType(n.fileInfo.extension),extension:n.fileInfo.extension,fileSize:n.fileInfo.size,fileUrl:n.fileInfo.url,ingestUrl:n.file.cvUpload.ingestUrl,metaData:{type:d.v.getResourceType(n.fileInfo.extension)},contribution:!1,url:n.fileInfo.url,fileIdType:2};this.resourceUploads.push(o),this.resourceUploadCount--,this.resourceUploadCount>0||(this.resourceDataService.addResource(this.options.videoId,this.resourceUploads,(function(e){t.model.resources.add(e);var n=t.resourceUploadService.getCollection().filter((function(t){return t.get("fileInfo").id===e.get("fileId")}));t.resourceUploadService.getCollection().remove(n),t.logUploadAction(e),t.render()})),this.resourceUploads=[])}},{key:"onSubtitleUploadComplete",value:function(e){var t=this,n=$.Deferred(),i=new Ye({defaultLanguage:{code:"en",name:"English"},promise:n});n.done((function(n){var o=e.toJSON(),i={fileId:o.fileInfo.id,name:n.name,language:n.code,type:d.v.getResourceType(o.fileInfo.extension),fileIdType:2};t.subtitleDataService.addSubtitle(t.options.videoId,i,(function(n){t.model.subtitles.add(n),t.subtitleUploadService.getCollection().remove(e),t.logUploadAction(n),t.render()}))})).fail((function(){t.subtitleUploadService.cancelUpload(e.get("id"))})),o.Radio.channel(r.G.POPUP).trigger(u.Q.Vy.SHOW_POPUP,i)}},{key:"logUploadAction",value:function(e){var t=e instanceof ee._?p.py.Resource:p.py.Subtitle,n=c.k.mapInteractionType(this.interactionType),o={location:p.LZ.EditVideoResources,actionType:p.Vw.Upload,entity:t,descriptor:n};c.k.logUserAction(e,o)}},{key:"logDeleteAction",value:function(e,t){var n={location:p.LZ.EditVideoResources,actionType:p.Vw.Delete,entity:e},o={id:t,parentId:+this.options.videoId};c.k.logUserAction(o,n)}},{key:"onMergeChapters",value:function(){var e=this;this.chapterDataService.addConcatenateRequest(this.options.videoId,(function(){e.pollConcatenation()}))}},{key:"renderTabs",value:function(){var e=ne.BK.canEditVideo(this.model);this.showChildView("tabs",new ve.W({model:this.model,tabs:ne.Si.getEditVideoTabs(this.options.videoId,e),activeTab:".edit-resources-subtitles-applink",context:"resources",folder:this.folder,libraries:this.libraries}))}},{key:"renderSubtitleFileSelect",value:function(){if(this.hasPhysicalChapters.get("value"))this.renderConcatenationRequest();else{var e=a.T.getPhrase(this.lang,"subtitlesLimit",{limit:5});this.showChildView("subtitlesUpload",new L({title:this.isClickViewContent?a.T.getPhrase(this.lang,"customerSubtitles"):a.T.getPhrase(this.lang,"subtitles"),description:a.T.getPhrase(this.lang,"subtitlesInfo"),alternateText:a.T.getPhrase(this.lang,"subtitlesAlternative"),mimeType:d.l.SUBTITLES,channelName:this.getSubtitleSelectChannelName(),acceptMultiple:!1,limitText:this.model.subtitles.length>=5?e:null,isClickViewContent:this.isClickViewContent}))}}},{key:"renderSubtitleUploadList",value:function(){var e=this.subtitleUploadService.getCollection();this.showChildView("subtitlesUploadList",new Ae({collection:e,channelName:this.channelName}))}},{key:"renderSubtitlesLists",value:function(){this.renderClickViewSubtitlesList(),this.renderCustomerSubtitlesList()}},{key:"renderClickViewSubtitlesList",value:function(){if(this.isClickViewContent){var e=ne.BK.filterObjectsByOwnerType(this.model.subtitles,y.N.ClickView);this.showChildView("clickViewSubtitlesList",new Pt({collection:e,channelName:this.channelName,isClickViewContent:!0,headerText:a.T.getPhrase(this.lang,"clickViewSubtitles"),emptyStateText:e.models.length?"":a.T.getPhrase(this.lang,"clickViewSubtitlesEmpty")}))}}},{key:"renderCustomerSubtitlesList",value:function(){this.showChildView("customerSubtitlesList",new Pt({collection:ne.BK.filterObjectsByOwnerType(this.model.subtitles,y.N.Customer,this.currentUser.get("customerId")),channelName:this.channelName}))}},{key:"renderConcatenationRequest",value:function(){this.isRendered()&&this.showChildView("subtitlesUpload",new be.r({type:this.isClickViewContent?"clickViewSubtitles":"subtitles",channelName:this.channelName,model:this.concatenateRequest}))}},{key:"renderResourcesFileSelect",value:function(){var e=a.T.getPhrase(this.lang,"resourcesLimit",{limit:25});this.showChildView("resourcesUpload",new L({title:this.isClickViewContent?a.T.getPhrase(this.lang,"customerResources"):a.T.getPhrase(this.lang,"resources"),description:a.T.getPhrase(this.lang,"resourcesDescription"),alternateText:a.T.getPhrase(this.lang,"resourcesAlternative"),mimeType:d.l.RESOURCES,channelName:this.getResourceSelectChannelName(),limitText:this.model.resources.length>=25?e:null,isClickViewContent:this.isClickViewContent}))}},{key:"renderResourcesUploadList",value:function(){var e=this.resourceUploadService.getCollection();this.showChildView("resourcesUploadList",new Ae({collection:e,channelName:this.channelName}))}},{key:"renderResourcesLists",value:function(){this.renderClickViewResourcesList(),this.renderCustomerResourcesList()}},{key:"renderClickViewResourcesList",value:function(){if(this.isClickViewContent){var e=ne.BK.filterObjectsByOwnerType(this.model.resources,y.N.ClickView);this.showChildView("clickViewResourcesList",new Xe.c({model:this.model,customCollection:e,editable:!1,videoId:this.options.videoId,parentChannelName:this.channelName,headerText:a.T.getPhrase(this.lang,"clickViewResources"),emptyStateText:e.models.length?"":a.T.getPhrase(this.lang,"clickViewResourcesEmpty"),analyticsOptions:{location:p.LZ.EditVideoResources}}))}}},{key:"renderCustomerResourcesList",value:function(){this.showChildView("customerResourcesList",new Xe.h({collection:ne.BK.filterObjectsByOwnerType(this.model.resources,y.N.Customer,this.currentUser.get("customerId")),editable:!0,videoId:this.options.videoId,channelName:this.channelName,analyticsOptions:{location:p.LZ.EditVideoResources}}))}},{key:"renderAddLinks",value:function(e){this.showChildView("addLinks",new ye({collection:this.model.get("links"),channelName:this.channelName,hide:e||25===this.model.get("links").length,limit:25}))}},{key:"renderLinkLists",value:function(){var e={channelName:this.channelName,analyticsOptions:{location:p.LZ.EditVideoResources},videoId:this.options.videoId};this.renderClickViewLinkList(e),this.renderCustomerLinkList(e)}},{key:"renderClickViewLinkList",value:function(e){if(this.isClickViewContent){var t=ne.BK.filterObjectsByOwnerType(this.model.links,y.N.ClickView);this.showChildView("clickViewLinkList",new me.c(Object.assign(Object.assign({},e),{headingText:"Resource links by ClickView",emptyStateText:t.models.length?"":"There are no ClickView links for this video",customCollection:t,editable:!1})))}}},{key:"renderCustomerLinkList",value:function(e){this.showChildView("customerLinkList",new me.c(Object.assign(Object.assign({},e),{customCollection:ne.BK.filterObjectsByOwnerType(this.model.links,y.N.Customer,this.currentUser.get("customerId")),editable:!0})))}},{key:"fetchData",value:function(){var e=this;this.model=this.videoDataService.getVideo(this.options.videoId),this.hasPhysicalChapters=this.videoDataService.hasPhysicalChapters(this.options.videoId),this.isClickViewContent=this.model&&!ne.BK.canEditVideo(this.model),this.folder=this.model&&this.model.categories.first(),this.hasPhysicalChapters&&this.hasPhysicalChapters.get("value")&&!this.getConcatenateRequestSent&&(this.chapterDataService.getConcatenateRequest(this.options.videoId,(function(t){e.concatenateRequest=t,e.render()})),this.getConcatenateRequestSent=!0)}},{key:"shouldRender",value:function(){return!(!this.model||!this.hasPhysicalChapters||this.hasPhysicalChapters.get("value")&&!this.concatenateRequest&&!this.concatenateRequestNotFound)}},{key:"onBeforeRender",value:function(){return this.fetchData(),this.shouldRender()}},{key:"viewOptions",value:function(){return{isClickViewContent:this.isClickViewContent}}},{key:"onRender",value:function(){this.renderTabs(),this.renderSubtitleFileSelect(),this.renderSubtitleUploadList(),this.renderSubtitlesLists(),this.renderResourcesFileSelect(),this.renderResourcesUploadList(),this.renderResourcesLists(),this.renderAddLinks(),this.renderLinkLists(),this.startPollingConcatenation()}},{key:"onDestroy",value:function(){this.subtitleUploadService.destroy(),this.resourceUploadService.destroy()}}],b&&xt(n.prototype,b),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,b}(u.Q.G7)},36022:function(e,t,n){"use strict";n.d(t,{M:function(){return k}});var o=n(48088),i=n(39479),r=n(11306),l=n(31647),s=n(17391),a=n(63791),u=n(93569),c=n(94407),p=n.n(c),f={svg:"QbFgf",typeaheadContainer:"Y3ErG",disabled:"VTCM4"};function h(e){return h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},h(e)}function 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,y(o.key),o)}}function y(e){var t=function(e,t){if("object"!=h(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!=h(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==h(t)?t:t+""}function b(e,t,n){return t=v(t),function(e,t){if(t&&("object"==h(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,m()?Reflect.construct(t,n||[],v(e).constructor):t.apply(e,n))}function m(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(m=function(){return!!e})()}function v(e){return v=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},v(e)}function g(e,t){return g=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},g(e,t)}var k=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),b(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&&g(e,t)}(t,e),n=t,c=[{key:"name",get:function(){return"SearchTypeaheadComponent"}},{key:"template",get:function(){return p()}},{key:"className",get:function(){return"search-container ".concat(f.typeaheadContainer," mb-2")}},{key:"channelName",get:function(){return u.N0.generateUniqueChannelName(this)}},{key:"elements",get:function(){return{input:"#".concat(this.options.inputId)}}},{key:"defaults",get:function(){return{inputId:"search-typeahead",placeholderText:"Search",stickItProperty:"name",selectEvent:"select:result",additionalClasses:"",editable:!0}}},{key:"events",value:function(){return{submit:"onSubmit","click .remove":"onClickRemove"}}},{key:"initialize",value:function(){this.model||this.options.parentChannelName||l.Q.Ry.throw(new r.H("Either pass a model or a channelName to access the typeahead selection")),this.model||(this.model=new l.Q.Hn),this.options.inputName||(this.options.inputName=this.options.inputId),this.bindListeners()}},{key:"bindListeners",value:function(){this.options.parentChannelName&&(this.parentChannel=o.Radio.channel(this.options.parentChannelName)),this.listenTo(this.channelName,"typeahead:set:input",this.setInput),this.listenTo(this.channelName,"typeahead:clear:input",this.clearInput)}},{key:"bindings",get:function(){var e,t,n;return e={},t="[name=".concat(this.options.inputName,"]"),n={observe:this.options.stickItProperty,setOptions:{validate:!0}},(t=y(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},{key:"clearInput",value:function(){this.getUI("input").typeahead("val",null)}},{key:"setInput",value:function(e){this.getUI("input").typeahead("val",e)}},{key:"onTypeaheadSelect",value:function(e,t){var n;e.preventDefault(),n="string"==typeof t?t:t.title||t.name||t.query,this.model.set(this.options.stickItProperty,n),this.parentChannel&&this.options.selectEvent&&this.parentChannel.trigger(this.options.selectEvent,t),this.onSubmit(e),this.toggleRemove()}},{key:"onSubmit",value:function(e){var t=this;if(e.preventDefault(),!this.isDestroyed()&&this.getTypeaheadActionOptions().clearOnSelect)return this.getUI("input").typeahead("close"),setTimeout((function(){t.model.clear(),t.clearInput()}),0),!1}},{key:"onClickRemove",value:function(){this.model.clear(),this.parentChannel.trigger(this.options.removeEvent,this.model),this.toggleRemove()}},{key:"getSources",value:function(){return i.isArray(this.options.typeaheadConfigs)?s.J.getSearchSources(this.options.typeaheadConfigs):s.J.getSearchSources([this.options.typeaheadConfigs])}},{key:"getTypeaheadOptions",value:function(){var e={minLength:1,highlight:!0};return this.options.typeaheadOptions?i.extend({},e,this.options.typeaheadOptions):e}},{key:"getTypeaheadActionOptions",value:function(){var e={clearOnSelect:!1};return i.isObject(this.options.actionOptions)?i.extend({},e,this.options.actionOptions):e}},{key:"bindOptionalCallbacks",value:function(){i.isObject(this.options.callbacks)&&(i.isFunction(this.options.callbacks.onRender)&&this.getUI("input").on("typeahead:render",i.bind(this.options.callbacks.onRender,this)),i.isFunction(this.options.callbacks.onInput)&&this.listenTo(this.model,"change:".concat(this.options.stickItProperty),this.options.callbacks.onInput),i.isFunction(this.options.callbacks.onBlur)&&this.getUI("input").on("blur",i.bind(this.options.callbacks.onBlur,this,this.channelName,this.options.stickItProperty)))}},{key:"initTypeahead",value:function(){this.getUI("input").typeahead(this.getTypeaheadOptions(),this.getSources())}},{key:"initTypeaheadListeners",value:function(){this.getUI("input").on("typeahead:select",i.bind(this.onTypeaheadSelect,this)),this.bindOptionalCallbacks()}},{key:"toggleRemove",value:function(){this.shouldShowRemove()?this.$el.find(".remove").show():this.$el.find(".remove").hide()}},{key:"shouldShowRemove",value:function(){return!!this.options.editable&&(!!this.options.forceShowRemoveButton||this.options.removeEvent&&!!this.model.get(this.options.stickItProperty))}},{key:"viewOptions",value:function(){return Object.assign(Object.assign({styles:f},this.options),{showRemove:this.shouldShowRemove(),svgRemove:a.Nj.getSvg(a.vn.Close)})}},{key:"onRender",value:function(){var e=this;this.stickit(),this.initTypeahead(),this.initTypeaheadListeners(),o.Validation.bind(this),this.toggleRemove(),this.options.autofocus&&window.requestAnimationFrame((function(){e.getUI("input").focus()}))}},{key:"onClose",value:function(){this.getUI("input").off(),this.unstickit(),o.Validation.unbind(this)}}],c&&d(n.prototype,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,c}(l.Q.wA)},44237: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,'<p class="alert alert-warning mb-0">'+e.escapeExpression(e.lambda(null!=(r=null!=t?t.options:t)?r.limitText:r,t))+"</p>\n"},3:function(e,t,n,o,i){e.propertyIsEnumerable;var r,l=e.lambda,s=e.escapeExpression,a=null!=t?t:e.nullContext||{};return'<div class="file-drop '+s(l(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.fileDrop:r,t))+" p-2"+(null!=(r=n.if.call(a,null!=(r=null!=t?t.options:t)?r.limitText:r,{name:"if",hash:{},fn:e.program(4,i,0),inverse:e.noop,data:i}))?r:"")+'">\n <button class="browse btn btn-outline-dark me-2">'+s((n.lang||t&&t.lang||e.hooks.helperMissing).call(a,"browse",{name:"lang",hash:{},data:i}))+'</button>\n <span class="text-secondary align-middle">'+s(l(null!=(r=null!=t?t.options:t)?r.alternateText:r,t))+"</span>\n</div>\n"},4:function(e,t,n,o,i){return" col-6 "},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){e.propertyIsEnumerable;var r,l=e.lambda;return"<h5>"+e.escapeExpression(l(null!=(r=null!=t?t.options:t)?r.title:r,t))+"</h5>\n<p>"+(null!=(r=l(null!=(r=null!=t?t.options:t)?r.description:r,t))?r:"")+"</p>\n"+(null!=(r=n.if.call(null!=t?t:e.nullContext||{},null!=(r=null!=t?t.options:t)?r.limitText:r,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.program(3,i,0),data:i}))?r:"")},useData:!0})},61571:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){e.propertyIsEnumerable;var r,l,s=e.escapeExpression;return'<div class="'+s("function"==typeof(l=null!=(l=n.dropMask||(null!=t?t.dropMask:t))?l:e.hooks.helperMissing)?l.call(null!=t?t:e.nullContext||{},{name:"dropMask",hash:{},data:i}):l)+'">\n <h3>'+s(e.lambda(null!=(r=null!=t?t.options:t)?r.fileDropText:r,t))+"</h3>\n</div>"},useData:!0})},97237:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({1:function(e,t,n,o,i){e.propertyIsEnumerable;var r,l=e.lambda;return'<span class="d-inline-block align-middle me-2 '+e.escapeExpression(l(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.svgContainer:r,t))+' float-end text-success">'+(null!=(r=l(null!=(r=null!=t?t.options:t)?r.tickSvg:r,t))?r:"")+"</span>\n"},3:function(e,t,n,o,i){var r;return e.propertyIsEnumerable,'<span class="d-inline-block align-middle me-2 '+e.escapeExpression(e.lambda(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.svgContainer:r,t))+' cursor-pointer cancel-upload btn-close float-end" role="button" aria-label="Close"></span>\n'},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){e.propertyIsEnumerable;var r,l,s=e.lambda,a=e.escapeExpression,u=null!=t?t:e.nullContext||{},c=e.hooks.helperMissing,p="function";return'<span class="d-inline-block align-middle me-2 '+a(s(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.svgContainer:r,t))+'">'+(null!=(r=s(null!=(r=null!=t?t.options:t)?r.svg:r,t))?r:"")+'</span>\n<span class="align-middle">\n '+a(typeof(l=null!=(l=n.name||(null!=t?t.name:t))?l:c)===p?l.call(u,{name:"name",hash:{},data:i}):l)+"\n</span>\n"+(null!=(r=n.if.call(u,null!=(r=null!=t?t.options:t)?r.finished:r,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.program(3,i,0),data:i}))?r:"")+'\n<div class="progress my-2 '+a(s(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.progress:r,t))+' mt-2">\n <div class="progress-bar bg-blue" style="width: '+a(typeof(l=null!=(l=n.progress||(null!=t?t.progress:t))?l:c)===p?l.call(u,{name:"progress",hash:{},data:i}):l)+'%" aria-valuenow="'+a(typeof(l=null!=(l=n.progress||(null!=t?t.progress:t))?l:c)===p?l.call(u,{name:"progress",hash:{},data:i}):l)+'" aria-valuemin="0" aria-valuemax="100"></div>\n</div>'},useData:!0})},85985:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({1:function(e,t,n,o,i){e.propertyIsEnumerable;var r,l=e.lambda,s=e.escapeExpression;return'<a class="float-end '+s(l(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.svgContainer:r,t))+" "+s(l(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.actionSvg:r,t))+' text-secondary delete">'+(null!=(r=l(null!=(r=null!=t?t.options:t)?r.trashSvg:r,t))?r:"")+"</a>\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){e.propertyIsEnumerable;var r,l,s=e.lambda,a=e.escapeExpression,u=null!=t?t:e.nullContext||{};return'<span class="d-inline-block align-middle me-2 '+a(s(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.svgContainer:r,t))+'">'+(null!=(r=s(null!=(r=null!=t?t.options:t)?r.svg:r,t))?r:"")+'</span>\n<a href="'+a("function"==typeof(l=null!=(l=n.url||(null!=t?t.url:t))?l:e.hooks.helperMissing)?l.call(u,{name:"url",hash:{},data:i}):l)+"?name="+a(s(null!=(r=null!=t?t.options:t)?r.name:r,t))+'" class="align-middle">\n '+a(s(null!=(r=null!=t?t.options:t)?r.name:r,t))+"\n</a>\n"+(null!=(r=n.unless.call(u,null!=(r=null!=t?t.options:t)?r.isClickViewContent:r,{name:"unless",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?r:"")},useData:!0})},41165: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,'<p class="alert alert-warning col-8">'+e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"limit",{name:"lang",hash:{limit:null!=(r=null!=t?t.options:t)?r.limit:r},data:i}))+"</p>\n"},3:function(e,t,n,o,i){e.propertyIsEnumerable;var r=null!=t?t:e.nullContext||{},l=e.hooks.helperMissing,s=e.escapeExpression;return"<p>"+s((n.lang||t&&t.lang||l).call(r,"subheading",{name:"lang",hash:{},data:i}))+'</p>\n<div class="form-group mb-1">\n <label for="url">'+s((n.lang||t&&t.lang||l).call(r,"urlLabel",{name:"lang",hash:{},data:i}))+'</label>\n <input name="url" id="url" class="form-control" type="text" placeholder="'+s((n.lang||t&&t.lang||l).call(r,"urlPlaceholder",{name:"lang",hash:{},data:i}))+'">\n <div class="form-feedback"></div>\n</div>\n<div class="form-group mb-1" id="name-container" style="display: none;">\n <input type="text" class="form-control" name="name" placeholder="'+s((n.lang||t&&t.lang||l).call(r,"namePlaceholder",{name:"lang",hash:{},data:i}))+'">\n <div class="form-feedback"></div>\n</div>\n<div class="attach-btn-region"></div>\n'},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){var r;return e.propertyIsEnumerable,'<h5 class="pt-2">Resource links</h5>\n'+(null!=(r=n.if.call(null!=t?t:e.nullContext||{},null!=(r=null!=t?t.options:t)?r.hide:r,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.program(3,i,0),data:i}))?r:"")},useData:!0})},97781: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,null!=(r=n.if.call(null!=t?t:e.nullContext||{},null!=(r=null!=t?t.options:t)?r.progress:r,{name:"if",hash:{},fn:e.program(2,i,0),inverse:e.noop,data:i}))?r:""},2:function(e,t,n,o,i){e.propertyIsEnumerable;var r,l=e.escapeExpression;return' <span class="m-3 text-secondary">'+l(e.lambda(null!=(r=null!=t?t.options:t)?r.progress:r,t))+'</span>\n <p class="pt-2">'+l((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"processing",{name:"lang",hash:{},data:i}))+"</p>\n"},4:function(e,t,n,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.failed:r,{name:"if",hash:{},fn:e.program(5,i,0),inverse:e.noop,data:i}))?r:""},5:function(e,t,n,o,i){return e.propertyIsEnumerable,'<p class="pt-2 text-danger">'+e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"failed",{name:"lang",hash:{},data:i}))+"</p>\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){e.propertyIsEnumerable;var r,l=e.lambda,s=e.escapeExpression;return"<h4>"+s(l(null!=(r=null!=(r=null!=t?t.options:t)?r.componentOptions:r)?r.heading:r,t))+"</h4>\n<p>"+s(l(null!=(r=null!=(r=null!=t?t.options:t)?r.componentOptions:r)?r.line1:r,t))+"</p>\n<p>"+s(l(null!=(r=null!=(r=null!=t?t.options:t)?r.componentOptions:r)?r.line2:r,t))+'</p>\n<div class="btn-region"></div>\n'+(null!=(r=n.if.call(null!=t?t:e.nullContext||{},null!=(r=null!=t?t.options:t)?r.processing:r,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.program(4,i,0),data:i}))?r:"")},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})},56730:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){return e.propertyIsEnumerable,'<form>\n <div class="form-group">\n <label for="language">'+e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"label",{name:"lang",hash:{},data:i}))+'</label>\n <div class="typahead-region"></div>\n </div>\n</form>'},useData:!0})},71060:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({1:function(e,t,n,o,i){var r;return e.propertyIsEnumerable,e.escapeExpression(e.lambda(null!=(r=null!=t?t.options:t)?r.emptyStateText:r,t))},compiler:[8,">= 4.3.0"],main: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"+(null!=(r=n.if.call(null!=t?t:e.nullContext||{},null!=(r=null!=t?t.options:t)?r.emptyStateText:r,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?r:"")+'\n<div class="subtitles-list-region"></div>'},useData:!0})},51069:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({1:function(e,t,n,o,i){return"col-5"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){e.propertyIsEnumerable;var r,l=null!=t?t:e.nullContext||{};return'<div class="tab-region"></div>\n\n<div class="row py-3">\n <div class="'+(null!=(r=n.if.call(l,null!=(r=null!=t?t.options:t)?r.isClickViewContent:r,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?r:"")+'">\n <div class="clickview-subtitles-list-region"></div>\n </div>\n <div class="col-7">\n <div class="subtitles-upload-region"></div>\n <div class="subtitles-upload-list-region p-0 col-8"></div>\n <div class="customer-subtitles-list-region p-0 col-8"></div>\n </div>\n</div>\n\n<div class="row border-top py-3">\n <div class="'+(null!=(r=n.if.call(l,null!=(r=null!=t?t.options:t)?r.isClickViewContent:r,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?r:"")+'">\n <div class="clickview-resources-list-region"></div>\n </div>\n <div class="col-7">\n <div class="resources-upload-region"></div>\n <div class="resources-upload-list-region p-0 col-8"></div>\n <div class="customer-resources-list-region p-0 col-8"></div>\n </div>\n</div>\n\n<div class="row border-top py-3">\n <div class="'+(null!=(r=n.if.call(l,null!=(r=null!=t?t.options:t)?r.isClickViewContent:r,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?r:"")+'">\n <div class="clickview-link-list-region"></div>\n </div>\n <div class="col-7">\n <div class="add-links-region mb-2"></div>\n <div class="customer-link-list-region p-0 col-8"></div>\n </div>\n</div>'},useData:!0})},94407:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({1:function(e,t,n,o,i){var r;return e.propertyIsEnumerable,e.escapeExpression(e.lambda(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.disabled:r,t))},3:function(e,t,n,o,i){return"autofocus"},5:function(e,t,n,o,i){return"disabled"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){e.propertyIsEnumerable;var r,l=e.lambda,s=e.escapeExpression,a=null!=t?t:e.nullContext||{};return'<input\n name="'+s(l(null!=(r=null!=t?t.options:t)?r.inputName:r,t))+'"\n type="text"\n class="form-control '+(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:"")+" "+s(l(null!=(r=null!=t?t.options:t)?r.additionalClasses:r,t))+'"\n id="'+s(l(null!=(r=null!=t?t.options:t)?r.inputId:r,t))+'"\n autocomplete="off"\n placeholder="'+s(l(null!=(r=null!=t?t.options:t)?r.placeholderText:r,t))+'"\n '+(null!=(r=n.if.call(a,null!=(r=null!=t?t.options:t)?r.autofocus:r,{name:"if",hash:{},fn:e.program(3,i,0),inverse:e.noop,data:i}))?r:"")+"\n "+(null!=(r=n.unless.call(a,null!=(r=null!=t?t.options:t)?r.editable:r,{name:"unless",hash:{},fn:e.program(5,i,0),inverse:e.noop,data:i}))?r:"")+'\n></input>\n<span class="svg-container mb-2 '+s(l(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.svg:r,t))+' remove" style="display: none;">'+(null!=(r=l(null!=(r=null!=t?t.options:t)?r.svgRemove:r,t))?r:"")+"</span>"},useData:!0})}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[7376],{57085:function(t,e,n){"use strict";n.d(e,{n:function(){return x}});var r=n(31647),o=n(57098),i=n(22557),u=n(86363),a=n.n(u);function c(t){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},c(t)}function l(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,p(r.key),r)}}function f(t,e,n){return e&&s(t.prototype,e),n&&s(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function p(t){var e=function(t,e){if("object"!=c(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!=c(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==c(e)?e:e+""}function b(t,e,n){return e=m(e),function(t,e){if(e&&("object"==c(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,y()?Reflect.construct(e,n||[],m(t).constructor):e.apply(t,n))}function y(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(y=function(){return!!t})()}function m(t){return m=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},m(t)}function d(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&v(t,e)}function v(t,e){return v=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},v(t,e)}var h=function(t){function e(){return l(this,e),b(this,e,arguments)}return d(e,t),f(e,[{key:"name",get:function(){return"BreadcrumbItemComponent"}},{key:"template",get:function(){return a()}},{key:"tagName",get:function(){return"li"}},{key:"className",get:function(){var t="breadcrumb-item";return this.model.get("active")&&(t+=" active"),t}},{key:"attributes",get:function(){return this.model.get("active")?{"aria-current":"page"}:{}}},{key:"appLinks",get:function(){return this.model.get("active")?{}:{a:this.model.get("appLink")}}},{key:"viewOptions",value:function(){return{isActive:this.model.get("active")}}}])}(r.Q.wA),g=function(t){function e(){return l(this,e),b(this,e,arguments)}return d(e,t),f(e,[{key:"name",get:function(){return"BreadcrumbComponentCollection"}},{key:"tagName",get:function(){return"ol"}},{key:"className",get:function(){return"breadcrumb m-0 p-0"}},{key:"childView",get:function(){return h}}])}(r.Q.$W),w=n(93933),k=n.n(w);function O(t){return O="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},O(t)}function j(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,E(r.key),r)}}function E(t){var e=function(t,e){if("object"!=O(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!=O(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==O(e)?e:e+""}function _(t,e,n){return e=S(e),function(t,e){if(e&&("object"==O(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,P()?Reflect.construct(e,n||[],S(t).constructor):e.apply(t,n))}function P(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(P=function(){return!!t})()}function S(t){return S=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},S(t)}function C(t,e){return C=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},C(t,e)}var x=function(t){function e(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),_(this,e,[t])}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&C(t,e)}(e,t),n=e,(u=[{key:"initialize",value:function(){this.getBreadcrumbs()}},{key:"name",get:function(){return"BreadcrumbsComponent"}},{key:"template",get:function(){return k()}},{key:"className",get:function(){return"d-inline-block"}},{key:"regions",value:function(){return{breadcrumbs:".breadcrumbs-region"}}},{key:"defaults",get:function(){return{customBreadcrumbs:[]}}},{key:"getBreadcrumbs",value:function(){var t=this;this.breadcrumbCollection=new r.Q.FE([]);var e,n=this.options.folder;do{if(!n)break;if(e=i.P.getParent(n.id,this.options.libraries),this.breadcrumbCollection.add(this.getBreadcrumb(n,!!e),{at:0}),!e)break;n=e}while(e);this.options.video&&this.breadcrumbCollection.add({name:this.options.video.get("name"),appLink:{application:o.OV.LIBRARY_EDITOR,action:o.eX.LibraryEditor.VIDEO_DETAILS,args:[this.options.video.id]}}),this.options.customBreadcrumbs&&this.options.customBreadcrumbs.forEach((function(e){return t.breadcrumbCollection.add(e)})),this.breadcrumbCollection.length&&this.breadcrumbCollection.last().set("active",!this.options.enableLastItemAppLink)}},{key:"getBreadcrumb",value:function(t,e){var n=e?o.eX.LibraryEditor.FOLDER:o.eX.LibraryEditor.LIBRARY;return{name:t.get("name"),appLink:{application:o.OV.LIBRARY_EDITOR,action:n,args:[t.id]}}}},{key:"onRender",value:function(){var t=new g({collection:this.breadcrumbCollection});this.showChildView("breadcrumbs",t)}}])&&j(n.prototype,u),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,u}(r.Q.wA)},35630:function(t,e,n){"use strict";n.d(e,{n:function(){return m}});var r=n(39479),o=n(31647),i=n(92655),u=n.n(i),a={pillTabSelector:"lo5ex",pillItem:"Zschz",umm:"uD6rh"};function c(t){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},c(t)}function l(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,s(r.key),r)}}function s(t){var e=function(t,e){if("object"!=c(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!=c(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==c(e)?e:e+""}function f(t,e,n){return e=b(e),function(t,e){if(e&&("object"==c(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,p()?Reflect.construct(e,n||[],b(t).constructor):e.apply(t,n))}function p(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(p=function(){return!!t})()}function b(t){return b=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},b(t)}function y(t,e){return y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},y(t,e)}var m=function(t){function e(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),f(this,e,[t])}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&y(t,e)}(e,t),n=e,o=[{key:"name",get:function(){return"TabsView"}},{key:"className",get:function(){var t="bg-white py-3 border-bottom";return this.options.className&&(t+=" ".concat(this.options.className)),t}},{key:"template",get:function(){return u()}},{key:"tagName",get:function(){return"nav"}},{key:"appLinks",get:function(){var t={};return this.options.tabs.forEach((function(e){return t[e.link.selector]=e.link.appLink})),t}},{key:"viewOptions",value:function(){var t=this.options.tabs.map((function(t){return Object.assign(Object.assign({},t),{link:t.link.selector.replace(".","")})}));return{styles:a,tabs:t}}},{key:"setActiveTab",value:function(){var t=this,e=!1;if(this.options.tabs.forEach((function(n){n.active=!1,n.link.selector===t.options.activeTab&&(n.active=!0,e=!0)})),!e){var n=r.first(this.options.tabs);n&&(n.active=!0)}}},{key:"onBeforeRender",value:function(){this.setActiveTab()}}],o&&l(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(o.Q.wA)},86363:function(t,e,n){var r=n(32227);t.exports=(r.default||r).template({1:function(t,e,n,r,o){var i;return t.propertyIsEnumerable,'<span class="fw-bolder">'+t.escapeExpression("function"==typeof(i=null!=(i=n.name||(null!=e?e.name:e))?i:t.hooks.helperMissing)?i.call(null!=e?e:t.nullContext||{},{name:"name",hash:{},data:o}):i)+"</span>\n"},3:function(t,e,n,r,o){var i;return t.propertyIsEnumerable,"<a>"+t.escapeExpression("function"==typeof(i=null!=(i=n.name||(null!=e?e.name:e))?i:t.hooks.helperMissing)?i.call(null!=e?e:t.nullContext||{},{name:"name",hash:{},data:o}):i)+"</a>\n"},compiler:[8,">= 4.3.0"],main:function(t,e,n,r,o){var i;return t.propertyIsEnumerable,null!=(i=n.if.call(null!=e?e:t.nullContext||{},null!=(i=null!=e?e.options:e)?i.isActive:i,{name:"if",hash:{},fn:t.program(1,o,0),inverse:t.program(3,o,0),data:o}))?i:""},useData:!0})},93933:function(t,e,n){var r=n(32227);t.exports=(r.default||r).template({compiler:[8,">= 4.3.0"],main:function(t,e,n,r,o){return'<nav class="breadcrumbs-region" aria-label="breadcrumb"></nav>'},useData:!0})},92655:function(t,e,n){var r=n(32227);t.exports=(r.default||r).template({1:function(t,e,n,r,o,i,u){var a;return t.propertyIsEnumerable,null!=(a=n.unless.call(null!=e?e:t.nullContext||{},null!=e?e.hide:e,{name:"unless",hash:{},fn:t.program(2,o,0,i,u),inverse:t.noop,data:o}))?a:""},2:function(t,e,n,r,o,i,u){t.propertyIsEnumerable;var a,c=t.lambda,l=t.escapeExpression;return' <li class="p-0 '+(null!=(a=n.if.call(null!=e?e:t.nullContext||{},null!=e?e.active:e,{name:"if",hash:{},fn:t.program(3,o,0,i,u),inverse:t.program(5,o,0,i,u),data:o}))?a:"")+'">\n <a class="'+l(c(null!=e?e.link:e,e))+" cursor-pointer d-block text-decoration-none text-reset px-2 "+l(c(null!=(a=null!=(a=null!=u[1]?u[1].options:u[1])?a.styles:a)?a.pillItem:a,e))+'">\n '+l(c(null!=e?e.name:e,e))+"\n </a>\n </li>\n"},3:function(t,e,n,r,o){return"btn btn-dark"},5:function(t,e,n,r,o){return"btn btn-outline-dark"},compiler:[8,">= 4.3.0"],main:function(t,e,n,r,o,i,u){var a;return t.propertyIsEnumerable,'<ul class="list-unstyled d-inline-block m-0 d-flex '+t.escapeExpression(t.lambda(null!=(a=null!=(a=null!=e?e.options:e)?a.styles:a)?a.pillTabSelector:a,e))+'">\n'+(null!=(a=n.each.call(null!=e?e:t.nullContext||{},null!=(a=null!=e?e.options:e)?a.tabs:a,{name:"each",hash:{},fn:t.program(1,o,0,i,u),inverse:t.noop,data:o}))?a:"")+"</ul>"},useData:!0,useDepths:!0})}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[7408],{34629:function(e,t,n){"use strict";n.r(t),n.d(t,{SuggestAnEditView:function(){return ie}});var o=n(39479),i=n(21679),r=n(57857),a=n(99249),s=n(31647),l=n(52076),u=n(70065),c=n(8371),d=n(75459),p=n(10101),f=n(83665),h=n(26357),y=n(88172),g=n(57098),m=n(67670);function b(e){return b="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},b(e)}function v(e,t,n){return t=S(t),function(e,t){if(t&&("object"==b(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,w()?Reflect.construct(t,n||[],S(e).constructor):t.apply(e,n))}function w(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(w=function(){return!!e})()}function S(e){return S=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},S(e)}function O(e,t){return O=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},O(e,t)}var k=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),v(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&&O(e,t)}(t,e),n=t,Object.defineProperty(n,"prototype",{writable:!1}),n;var n}(s.Q.Hn),T=n(13102),M=n(48404),P=n(19226),E=n(93569),j=n(48088),V=n(56285),C=n(48726),x=n(29457),_=n(40622),R=n(7190),N=n(19098),I=n.n(N),D={metadataValue:"mvVSS"};function B(e){return B="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},B(e)}function G(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,L(o.key),o)}}function L(e){var t=function(e,t){if("object"!=B(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!=B(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==B(t)?t:t+""}function A(e,t,n){return t=F(t),function(e,t){if(t&&("object"==B(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,U()?Reflect.construct(t,n||[],F(e).constructor):t.apply(e,n))}function U(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(U=function(){return!!e})()}function F(e){return F=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},F(e)}function H(e,t){return H=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},H(e,t)}var K,Z=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),A(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&&H(e,t)}(t,e),n=t,(o=[{key:"name",get:function(){return"SuggestEditComponent"}},{key:"template",get:function(){return I()}},{key:"tagName",get:function(){return"form"}},{key:"className",get:function(){return"mt-3"}},{key:"lang",get:function(){return"libraryEditor.suggestEdit"}},{key:"regions",value:function(){return{ratingSelect:{el:".rating-select-region",replaceElement:!0}}}},{key:"bindings",get:function(){return{"[name=suggestion]":{observe:"suggestion",setOptions:{validate:!0}},"[name=reason]":{observe:"reason",setOptions:{validate:!0}}}}},{key:"elements",get:function(){return{ratingValidation:".rating-form-feedback"}}},{key:"getMetadataValue",value:function(){return this.options.metadataType===_.pG.BroadcastDate?this.options.metadataValue?V.O.format(this.options.metadataValue,x.K4.FULL_YEAR):r.T.getPhrase(this.lang,"noMetadataValue"):this.options.metadataValue instanceof s.Q.FE?this.options.metadataValue.length?this.options.metadataValue.map((function(e){return e.get("name")})).join(", "):r.T.getPhrase(this.lang,"noMetadataValue"):this.options.metadataValue||r.T.getPhrase(this.lang,"noMetadataValue")}},{key:"getSuggestionPlaceholder",value:function(){return this.options.metadataType===_.pG.Other?r.T.getPhrase(this.lang,"otherSuggestionPlaceholder"):r.T.getPhrase(this.lang,"suggestionPlaceholder",{metadataType:R.uB.translateMetadataName(this.options.metadataType).toLowerCase()})}},{key:"renderRatingSelect",value:function(){this.options.ratingValidationMessage?this.getUI("ratingValidation").text(this.options.ratingValidationMessage).attr("style","display: block;"):this.getUI("ratingValidation").hide(),this.options.metadataType===_.pG.Rating&&this.showChildView("ratingSelect",new C.R({model:this.options.currentRating,collection:this.options.ratings,parentChannelName:this.options.channelName,hideHeaderText:!0,hideRemove:!0}))}},{key:"viewOptions",value:function(){return{styles:D,metadataValue:this.getMetadataValue(),useRatingSelect:this.options.metadataType===_.pG.Rating,isOtherType:this.options.metadataType===_.pG.Other,metadataType:R.uB.translateMetadataName(this.options.metadataType).toLowerCase(),suggestionPlaceholder:this.getSuggestionPlaceholder()}}},{key:"onRender",value:function(){this.renderRatingSelect(),this.stickit(),j.Validation.bind(this)}},{key:"onDestroy",value:function(){this.unstickit(),j.Validation.unbind(this)}}])&&G(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(s.Q.wA),Q=n(68249),z=n(60519);!function(e){e[e.Email=0]="Email"}(K||(K={}));var $=Object.assign(Object.assign({},z.c),{createSuggestEditNotification:function(e){return{_type:Q.k.SuggestEdit,groupId:e.groupId,receiverId:0,instanceRegion:e.instanceRegion,countryCode:e.countryCode,channels:[K.Email],data:{video:e.video,user:e.user,property:e.property,suggestion:e.suggestion,reason:e.reason,currentValue:e.currentValue}}}}),W=n(34651),q=n.n(W);function J(e){return J="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},J(e)}function Y(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,X(o.key),o)}}function X(e){var t=function(e,t){if("object"!=J(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!=J(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==J(t)?t:t+""}function ee(e,t,n){return t=ne(t),function(e,t){if(t&&("object"==J(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,te()?Reflect.construct(t,n||[],ne(e).constructor):t.apply(e,n))}function te(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(te=function(){return!!e})()}function ne(e){return ne=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ne(e)}function oe(e,t){return oe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},oe(e,t)}var ie=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),ee(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&&oe(e,t)}(t,e),n=t,(s=[{key:"initialize",value:function(){this.getViewModel(),this.videoDataService=i.u.getInstance(g.Or.Video,this),this.ratingsDataService=i.u.getInstance(g.Or.Ratings,this),this.notificationDataService=i.u.getInstance(g.Or.Notifications,this),this.selectedMetadata=new k,this.bindListeners()}},{key:"name",get:function(){return"SuggestAnEditView"}},{key:"template",get:function(){return q()}},{key:"tagName",get:function(){return"form"}},{key:"className",get:function(){return"form-group"}},{key:"lang",get:function(){return"libraryEditor.suggestAnEdit"}},{key:"title",get:function(){return r.T.getPhrase(this.lang,"title")}},{key:"channelName",get:function(){return E.N0.generateUniqueChannelName(this)}},{key:"viewModelName",get:function(){return"".concat(this.name,":").concat(this.options.videoId)}},{key:"regions",value:function(){return{dropdown:{el:".metadata-dropdown-region",replaceElement:!1},suggestEdit:{el:".suggest-edit-region",replaceElement:!0}}}},{key:"behaviors",get:function(){var e=this;return[{behaviorClass:p.Yw,title:r.T.getPhrase(this.lang,"heading"),spinnerButtonOptions:{model:this.spinnerModel=new m.v,channelName:this.channelName,buttonText:r.T.getPhrase(this.lang,"submit"),onClick:function(){return e.onSubmit()}}}]}},{key:"requiredResources",get:function(){return{config:M.p.config,currentUser:P.K.currentUser}}},{key:"bindListeners",value:function(){this.listenTo(this.channelName,"select:option:selected",this.onMetadataSelect),this.listenTo(this.channelName,"select:rating",this.onSelectRating),this.listenTo(g.Vk.VIDEO,"".concat(g.M_.VIDEOS,":").concat(this.options.videoId,":sync"),this.render),this.listenTo(g.Vk.NOTIFICATIONS,"".concat(g.M_.SUGGEST_EDIT,":error"),this.onError)}},{key:"onSubmit",value:function(){var e=this;if(this.validateForm()){this.spinnerModel.set(y.ZV.ShowSpinner,!0);var t=this.selectedMetadata.get("metadataType")===_.pG.Rating?this.viewModel.get("ratingSuggestion"):this.viewModel.get("suggestion"),n=this.config.get("suggestEditMetadataGroupId"),o=$.createSuggestEditNotification({groupId:n,instanceRegion:this.currentUser.get("instanceRegion"),countryCode:this.currentUser.get("countryCode"),video:this.model.toJSON(),user:this.currentUser.toJSON(),property:this.selectedMetadata.get("metadataType").toLowerCase(),suggestion:t,reason:this.viewModel.get("reason"),currentValue:this.selectedMetadata.get("metadataValue")});this.notificationDataService.suggestEdit(o,(function(){e.triggerMethod("hide"),e.spinnerModel.set(y.ZV.ShowSpinner,!1),e.spinnerModel.set(y.ZV.Disabled,!0)})),this.logAction(),this.viewModel.clear()}}},{key:"onError",value:function(){this.spinnerModel.set(y.ZV.ShowSpinner,!1)}},{key:"onMetadataSelect",value:function(e){this.selectMetadata(e),this.renderSuggestEdit()}},{key:"onSelectRating",value:function(e){this.viewModel.set("ratingSuggestion",e.get("name")),this.renderSuggestEdit()}},{key:"selectMetadata",value:function(e){this.spinnerModel.set(y.ZV.Disabled,!1),E.yV.setSelected(e.get("id"),this.metadataCollection),this.selectedMetadata.set({metadataType:e.get("name"),metadataValue:e.get("name")!==_.pG.Other?this.model.get(e.get("property")):null}),e.get("name")!==_.pG.Rating&&this.viewModel.set("ratingSuggestion","")}},{key:"getMetadataCollection",value:function(){var e=Object.keys(_.zK).map((function(e){return _.zK[e]}));return(E.M2.isClip(this.model)||E.M2.isInteractive(this.model))&&(e=e.filter((function(e){return e.name===_.pG.VideoTitle||e.name===_.pG.Description}))),this.currentUser.get("instanceRegion")===c.b.US&&(e=e.filter((function(e){return e.name!==_.pG.Channel&&e.name!==_.pG.BroadcastDate}))),new f.L(e)}},{key:"getMetadataByType",value:function(e){return this.metadataCollection.findWhere({name:e})}},{key:"getViewModel",value:function(){this.viewModel=a.r.get(this.viewModelName),this.viewModel.addValidation(R.xs)}},{key:"validateForm",value:function(){this.renderSuggestEdit(),this.viewModel.validate();var e=this.viewModel.toJSON(),t=e.reason,n=e.suggestion;return!(this.getRatingValidationMessage()||this.selectedMetadata.get("metadataType")!==_.pG.Rating&&!n||!t)}},{key:"getRatingValidationMessage",value:function(){if(this.selectedMetadata.get("metadataType")!==_.pG.Rating)return"";var e=this.selectedMetadata.get("metadataValue"),t=this.viewModel.get("ratingSuggestion");return t?e===t?R.nf.original():"":R.nf.empty()}},{key:"checkPreselection",value:function(){if(!this.selectedMetadata.get("metadataType")&&this.options.metadata&&this.dataFetched()){var e=this.getMetadataByType(this.options.metadata);this.selectMetadata(e)}}},{key:"logAction",value:function(){var e=E.M2.getSourceTypes(this.model);e=o.filter(e,(function(e){return e!==d.r.CustomLibrary}));var t={videoSourceTypes:o.sortBy(o.unique(e),(function(e){return e})).join(","),videoId:this.model.get("id"),metadataProperty:this.selectedMetadata.get("metadataType"),metadataPropertyValue:this.selectedMetadata.get("metadataValue"),suggestion:this.viewModel.get("suggestion"),reason:this.viewModel.get("reason")};l.k.logUserAction(t,{descriptor:u.gL.Edit,location:u.LZ.Popup,actionType:u.Vw.Suggest,entity:u.py.Video})}},{key:"dataFetched",value:function(){return!(!this.model||E.M2.isVideo(this.model)&&!this.ratingCollection)}},{key:"renderMetadataDropdown",value:function(){this.showChildView("dropdown",new h.H({collection:R.uB.translateMetadataCollectionNames(this.metadataCollection),channelName:this.channelName,childOptions:{titleProperty:"name",eventName:"select:option:click"},placeholderText:this.selectedMetadata.get("metadataType")||r.T.getPhrase(this.lang,"dropdownPlaceholder"),analyticsHelper:l.k}))}},{key:"renderSuggestEdit",value:function(){this.selectedMetadata.get("metadataType")&&this.showChildView("suggestEdit",new Z({model:this.viewModel,channelName:this.channelName,ratings:this.ratingCollection,currentRating:this.viewModel.get("ratingSuggestion")?new T.i(this.ratingCollection.findWhere({name:this.viewModel.get("ratingSuggestion")})):null,metadataType:this.selectedMetadata.get("metadataType"),metadataValue:this.selectedMetadata.get("metadataValue"),ratingValidationMessage:this.getRatingValidationMessage()}))}},{key:"onBeforeRender",value:function(){this.model||(this.model=this.videoDataService.getUnionVideo(this.options.videoId,this.options.typeId)),this.ratingCollection||(this.ratingCollection=this.ratingsDataService.getAllRatings()),this.model&&!this.metadataCollection&&(this.metadataCollection=this.getMetadataCollection()),this.checkPreselection()}},{key:"viewOptions",value:function(){return{dataFetched:this.dataFetched(),spinnerEl:E.Kp.getSpinner({size:E.Ey.Large,extraClasses:"mx-auto"})}}},{key:"onRender",value:function(){this.dataFetched()&&(this.renderMetadataDropdown(),this.renderSuggestEdit())}}])&&Y(n.prototype,s),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,s}(s.Q.G7)},71641:function(e,t,n){"use strict";n.d(t,{w:function(){return f}});var o=n(39479),i=n(31647),r=n(55142);function a(e){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(e)}function s(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,l(o.key),o)}}function l(e){var t=function(e,t){if("object"!=a(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!=a(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==a(t)?t:t+""}function u(e,t,n){return t=d(t),function(e,t){if(t&&("object"==a(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,c()?Reflect.construct(t,n||[],d(e).constructor):t.apply(e,n))}function c(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(c=function(){return!!e})()}function d(e){return d=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},d(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),u(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,i=[{key:"name",get:function(){return"DropdownCollectionComponent"}},{key:"className",get:function(){return"dropdown-menu items-viewpart ".concat(this.getExtraClasses(this.options.displayOptions))}},{key:"attributes",get:function(){return{"aria-labelledby":"dropdownSelector"}}},{key:"initialize",value:function(){this.listenTo(this.options.channelName,"center:dropdown",this.centerSelectedItem)}},{key:"childView",get:function(){return r.N}},{key:"childViewOptions",get:function(){var e={channelName:this.options.channelName,analyticsHelper:this.options.analyticsHelper};return o.extend(e,this.options.childOptions)}},{key:"getExtraClasses",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.alignment,n=void 0===t?"left":t,o=e.extraClasses,i="dropdown-menu-".concat(n);return o&&(i="".concat(i," ").concat(o)),i}},{key:"centerSelectedItem",value:function(){var e=this.$el.find(".active");if(e.length){var t=this.$el.scrollTop()+e.position().top,n=.5*this.$el.height()+.5*e.height();this.$el.scrollTop(t-n)}}}],i&&s(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,i}(i.Q.$W)},26357:function(e,t,n){"use strict";n.d(t,{H:function(){return b}});var o=n(48088),i=n(39479),r=n(31647),a=n(71641),s=n(93569),l=n(46635),u=n.n(l),c={dropdownMenu:"oKdKI",selectButton:"fTeoW",disabled:"gZbQ4"};function d(e){return d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},d(e)}function p(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,f(o.key),o)}}function f(e){var t=function(e,t){if("object"!=d(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!=d(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==d(t)?t:t+""}function h(e,t,n){return t=g(t),function(e,t){if(t&&("object"==d(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,y()?Reflect.construct(t,n||[],g(e).constructor):t.apply(e,n))}function y(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(y=function(){return!!e})()}function g(e){return g=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},g(e)}function m(e,t){return m=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},m(e,t)}var b=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=h(this,t,[e])).selectSearch="",n.sameCharIndex=1,n.optionStep=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&&m(e,t)}(t,e),n=t,r=[{key:"initialize",value:function(){this.setModel(),this.bindListeners()}},{key:"name",get:function(){return"SelectComponent"}},{key:"template",get:function(){return u()}},{key:"regions",value:function(){return{dropdown:{el:".dropdown-region",replaceElement:!0}}}},{key:"events",value:function(){return{keydown:"onKeydown","shown.bs.dropdown":"onShowDropdown"}}},{key:"defaults",get:function(){return{displayProperty:"name"}}},{key:"elements",get:function(){return{dropdownToggle:".dropdown-toggle"}}},{key:"bindListeners",value:function(){this.listenTo(this.options.channelName,this.options.childOptions.eventName,this.onSelect)}},{key:"onShowDropdown",value:function(){o.Radio.channel(this.options.channelName).trigger("center:dropdown")}},{key:"onKeydown",value:function(e){38===e.keyCode||40===e.keyCode?this.onArrowKeyDown(e):13===e.keyCode?this.render():this.onType(e),o.Radio.channel(this.options.channelName).trigger("center:dropdown")}},{key:"onArrowKeyDown",value:function(e){s.yV.getSelected(this.collection)?this.optionStep=1:this.optionStep=0;var t=this.getNextModel(e.keyCode);for(t||(s.yV.deselectAll(this.collection),t=this.getNextModel(e.keyCode));this.isDisabled(t);)this.optionStep++,t=this.getNextModel(e.keyCode);this.onSelect(t)}},{key:"onType",value:function(e){if(1===e.key.toString().length){var t=this.getModelMatch(e);t&&this.onSelect(t),this.runTimer()}}},{key:"onSelect",value:function(e){this.isDisabled(e)||(s.yV.setSelected(e.get("id"),this.collection),this.setModel(),this.getUI("dropdownToggle").text(this.getButtonText()),o.Radio.channel(this.options.channelName).trigger("select:option:selected",e))}},{key:"setModel",value:function(){this.model=s.yV.getSelected(this.collection)}},{key:"getNextModel",value:function(e){var t,n=s.yV.getSelected(this.collection)||this.collection.first(),o=this.collection.indexOf(n);return(t=38===e?this.collection.at(o-this.optionStep):this.collection.at(o+this.optionStep))||(s.yV.deselectAll(this.collection),t=this.collection.first(),this.optionStep=0),t}},{key:"getModelMatch",value:function(e){var t,n=this;return 1===this.selectSearch.length&&this.selectSearch===e.key?t=this.handleSameCharIndex(e.key):(this.selectSearch+=e.key,this.sameCharIndex=1),t||(t=i.find(this.collection.models,(function(e){return e.get(n.options.displayProperty).toLowerCase().slice(0,n.selectSearch.length).includes(n.selectSearch.toLowerCase())}))),t}},{key:"handleSameCharIndex",value:function(e){var t=this,n=i.filter(this.collection.models,(function(n){return n.get(t.options.displayProperty).toLowerCase().slice(0,1)===e}));if(n.length>1){var o=n[this.sameCharIndex];return o||(o=i.first(n),this.sameCharIndex=0),this.sameCharIndex++,o}return i.first(n)}},{key:"runTimer",value:function(){var e=this;this.scopedTimerIndex&&clearTimeout(this.scopedTimerIndex),this.scopedTimerIndex=window.setTimeout((function(){e.selectSearch=""}),500)}},{key:"isDisabled",value:function(e){var t;if(e.get("divider"))return!0;if(!i.isFunction(this.options.childOptions.isDisabled))return!1;for(var n=arguments.length,o=new Array(n>1?n-1:0),r=1;r<n;r++)o[r-1]=arguments[r];return(t=this.options.childOptions.isDisabled).call.apply(t,[this,e].concat(o))}},{key:"getButtonText",value:function(){if(this.options.disabled)return this.options.noOptionsText;var e=s.yV.getSelected(this.collection);return e&&e.get(this.options.displayProperty)||this.options.placeholderText}},{key:"viewOptions",value:function(){return{styles:c,inputName:this.options.inputName,disabled:this.options.disabled,placeholderText:this.getButtonText()}}},{key:"onRender",value:function(){this.showChildView("dropdown",new a.w({collection:this.collection,channelName:this.options.channelName,childOptions:i.extend(this.options.childOptions),displayOptions:{extraClasses:"w-100 ".concat(c.dropdownMenu)},analyticsHelper:this.options.analyticsHelper}))}}],r&&p(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(r.Q.wA)},67670:function(e,t,n){"use strict";n.d(t,{v:function(){return f}});var o=n(31647),i=n(88172);function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function a(e,t,n){return(t=l(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,l(o.key),o)}}function l(e){var t=function(e,t){if("object"!=r(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!=r(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==r(t)?t:t+""}function u(e,t,n){return t=d(t),function(e,t){if(t&&("object"==r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,c()?Reflect.construct(t,n||[],d(e).constructor):t.apply(e,n))}function c(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(c=function(){return!!e})()}function d(e){return d=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},d(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(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),u(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&&p(e,t)}(t,e),n=t,(o=[{key:"defaults",value:function(){return a(a({},i.ZV.Disabled,!0),i.ZV.Hidden,!1)}}])&&s(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(o.Q.Hn)},19098: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,s=e.lambda;return'<p class="fw-bold mb-0">'+a((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"currentType",{name:"lang",hash:{metadataType:null!=(r=null!=t?t.options:t)?r.metadataType:r},data:i}))+'</p>\n<p class="mb-3 '+a(s(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.metadataValue:r,t))+'">'+(null!=(r=s(null!=(r=null!=t?t.options:t)?r.metadataValue:r,t))?r:"")+"</p>\n"},3:function(e,t,n,o,i){var r;return e.propertyIsEnumerable,' <textarea\n id="suggest-edit"\n placeholder="'+e.escapeExpression(e.lambda(null!=(r=null!=t?t.options:t)?r.suggestionPlaceholder:r,t))+'"\n class="form-control"\n name="suggestion"\n ></textarea>\n <div class="form-feedback"></div>\n'},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){e.propertyIsEnumerable;var r,a=null!=t?t:e.nullContext||{},s=e.hooks.helperMissing,l=e.escapeExpression;return(null!=(r=n.unless.call(a,null!=(r=null!=t?t.options:t)?r.isOtherType:r,{name:"unless",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?r:"")+'\n<div class="dropdown-divider"></div>\n\n<div class="form-group">\n <label for="suggest-edit" class="fw-bold">'+l((n.lang||t&&t.lang||s).call(a,"suggestionSubheading",{name:"lang",hash:{},data:i}))+'</label>\n <div class="rating-select-region"></div>\n <div class="rating-form-feedback invalid-feedback"></div>\n'+(null!=(r=n.unless.call(a,null!=(r=null!=t?t.options:t)?r.useRatingSelect:r,{name:"unless",hash:{},fn:e.program(3,i,0),inverse:e.noop,data:i}))?r:"")+'</div>\n\n<div class="form-group">\n <label for="reason-for-edit" class="fw-bold">'+l((n.lang||t&&t.lang||s).call(a,"reasoningSubheading",{name:"lang",hash:{},data:i}))+'</label>\n <textarea\n id="reason-for-edit"\n placeholder="'+l((n.lang||t&&t.lang||s).call(a,"reasoningPlaceholder",{name:"lang",hash:{},data:i}))+'"\n class="form-control"\n name="reason"\n ></textarea>\n <div class="form-feedback"></div>\n</div>'},useData:!0})},34651:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({1:function(e,t,n,o,i){e.propertyIsEnumerable;var r=null!=t?t:e.nullContext||{},a=e.hooks.helperMissing,s=e.escapeExpression;return"<p>"+s((n.lang||t&&t.lang||a).call(r,"guidelines",{name:"lang",hash:{},data:i}))+'</p>\n<p class="fw-bold mb-1">'+s((n.lang||t&&t.lang||a).call(r,"dropdownHeading",{name:"lang",hash:{},data:i}))+'</p>\n<div class="metadata-dropdown-region position-relative"></div>\n<div class="suggest-edit-region"></div>\n'},3:function(e,t,n,o,i){var r;return e.propertyIsEnumerable,(null!=(r=e.lambda(null!=(r=null!=t?t.options:t)?r.spinnerEl:r,t))?r:"")+"\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.dataFetched:r,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.program(3,i,0),data:i}))?r:""},useData:!0})},46635:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({1:function(e,t,n,o,i){var r;return e.propertyIsEnumerable,e.escapeExpression(e.lambda(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.disabled:r,t))},3:function(e,t,n,o,i){return" disabled"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){e.propertyIsEnumerable;var r,a=e.lambda,s=e.escapeExpression,l=null!=t?t:e.nullContext||{};return'<button \n class="dropdown-toggle form-control text-start position-relative '+s(a(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.selectButton:r,t))+" "+(null!=(r=n.if.call(l,null!=(r=null!=t?t.options:t)?r.disabled:r,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?r:"")+'" \n type="button" \n id="dropdownMenuButton" \n data-bs-toggle="dropdown" \n aria-haspopup="true" \n aria-expanded="false"\n '+(null!=(r=n.if.call(l,null!=(r=null!=t?t.options:t)?r.disabled:r,{name:"if",hash:{},fn:e.program(3,i,0),inverse:e.noop,data:i}))?r:"")+' \n name="'+s(a(null!=(r=null!=t?t.options:t)?r.inputName:r,t))+'"\n >\n '+s(a(null!=(r=null!=t?t.options:t)?r.placeholderText:r,t))+'\n</button>\n<div class="dropdown-region"></div>\n<div class="form-feedback"></div>'},useData:!0})}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[8113],{70868:function(e,t,r){r.d(t,{t:function(){return i}});var n=r(48088),o=r(25417),i={preventScrollTop:function(){n.Radio.channel(o.G.SHELL).trigger("prevent:scroll:top")}}},89375:function(e,t,r){r.d(t,{j:function(){return i}});var n=r(31647),o=" - ClickView",i={setPageTitle:function(e){e&&n.Q.Ab.SetPageTitle(function(e){return e.length+12<=60?e+o:e.substring(0,57)+"..."+o}(e))}}},86242:function(e,t,r){r.d(t,{Oo:function(){return m},b2:function(){return d}});var n=r(1024),o=r(57857),i=r(49642),u=r(90547),c=r(5256),a=r(89146),l=r(63791),f=r(39396);function s(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,u,c=[],a=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;a=!1}else for(;!(a=(n=i.call(r)).done)&&(c.push(n.value),c.length!==t);a=!0);}catch(e){l=!0,o=e}finally{try{if(!a&&null!=r.return&&(u=r.return(),Object(u)!==u))return}finally{if(l)throw o}}return c}}(e,t)||function(e,t){if(e){if("string"==typeof e)return b(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?b(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function b(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var y=o.T.encloseNamespace("shared.breadcrumbComponent"),p=n.forwardRef((function(e,t){var r=e.breadcrumb,o=r.name,u=r.appLink,c=r.active,a=e.withBackIcon,s=o,b=null;return s.length>48&&(s=o.slice(0,48)+"...",b=o),n.createElement("li",{className:"breadcrumb-item".concat(c?" active":""),title:b},c?n.createElement("strong",null,s):n.createElement(i.F,{appLink:u,ref:t},a&&n.createElement(f.x,{svgName:l.vn.ChevronLeft,size:f.S.Small}),n.createElement("span",{className:a?"ms-2":""},s)))})),m=function(e){var t=e.breadcrumbs,r=(0,c.a)(u.r.XS),o=(null==t?void 0:t.length)||0,i=s(n.useState(!1),2),a=i[0],l=i[1],f=s(n.useState(!1),2),b=f[0],m=f[1],d=n.useRef();if(n.useEffect((function(){var e,r=null!==(e=null==t?void 0:t.reduce((function(e,t){return e+t.name.length}),0))&&void 0!==e?e:0;o>4&&r>64&&l(!0)}),[null==t?void 0:t.length]),n.useLayoutEffect((function(){var e;b&&(null===(e=d.current)||void 0===e||e.focus())}),[d.current,b]),!o||r&&o<2)return n.createElement(n.Fragment,null);if(r)return n.createElement("nav",{"aria-label":"breadcrumb"},n.createElement("ol",{className:"breadcrumb m-0 p-0"},n.createElement(p,{breadcrumb:t[o-2],withBackIcon:!0})));var v=n.createElement(p,{breadcrumb:t[0]}),h=o>2?n.createElement(p,{breadcrumb:t[1]}):n.createElement(n.Fragment,null),g=o>3?n.createElement(p,{breadcrumb:t[o-2]}):n.createElement(n.Fragment,null),w=o>1?n.createElement(p,{breadcrumb:t[o-1]}):n.createElement(n.Fragment,null),O=t.slice(2,o-2);return n.createElement("nav",{"aria-label":"breadcrumb"},n.createElement("ol",{className:"breadcrumb m-0 p-0"},v,h,a?n.createElement("li",{className:"breadcrumb-item"},n.createElement("button",{className:"btn-link",onClick:function(){l(!1),m(!0)},"aria-label":y("expand")},"...")):O.map((function(e,t){return n.createElement(p,{key:t,breadcrumb:e,ref:0===t?d:null})})),g,w))},d=n.memo((function(e){var t=e.numItems,r=void 0===t?3:t;return(0,c.a)(u.r.XS)?n.createElement("div",{className:"partial-loading-background",style:{height:"1.3125rem",width:"6rem"}}):n.createElement("nav",{"aria-label":"breadcrumb"},n.createElement("ol",{className:"breadcrumb m-0 p-0"},a.u.getPartialLoadingItems({numItems:r}).map((function(e,t){var r=e.width;return n.createElement("li",{key:t,className:"breadcrumb-item"},n.createElement("span",{className:"d-inline-block partial-loading-background",style:{width:r},dangerouslySetInnerHTML:{__html:" "}}))}))))}))},30317:function(e,t,r){r.d(t,{v:function(){return X}});var n=r(1024),o=r(35656),i=r(31647),u=r(57857),c=r(88070);function a(e){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(e)}function l(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,f(n.key),n)}}function f(e){var t=function(e,t){if("object"!=a(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!=a(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==a(t)?t:t+""}function s(e,t,r){return t=y(t),function(e,t){if(t&&("object"==a(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,b()?Reflect.construct(t,r||[],y(e).constructor):t.apply(e,r))}function b(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(b=function(){return!!e})()}function y(e){return y=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},y(e)}function p(e,t){return p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},p(e,t)}var m="shared.notFoundError",d=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),s(this,t,[u.T.getPhrase(m,"title")])}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),r=t,(n=[{key:"name",get:function(){return"NotFoundError"}},{key:"heading",get:function(){return u.T.getPhrase(m,"heading")}},{key:"description",get:function(){return u.T.getPhrase(m,"description")}}])&&l(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(c.H);function v(e){return v="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},v(e)}function h(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,g(n.key),n)}}function g(e){var t=function(e,t){if("object"!=v(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!=v(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==v(t)?t:t+""}function w(e,t,r){return t=j(t),function(e,t){if(t&&("object"==v(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,O()?Reflect.construct(t,r||[],j(e).constructor):t.apply(e,r))}function O(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(O=function(){return!!e})()}function j(e){return j=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},j(e)}function E(e,t){return E=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},E(e,t)}var P="shared.privateResourceError",S=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),w(this,t,[u.T.getPhrase(P,"title")])}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&&E(e,t)}(t,e),r=t,(n=[{key:"name",get:function(){return"PrivateResourceError"}},{key:"heading",get:function(){return u.T.getPhrase(P,"heading")}},{key:"description",get:function(){return u.T.getPhrase(P,"description")}}])&&h(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(c.H);function _(e){return _="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_(e)}function k(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,T(n.key),n)}}function T(e){var t=function(e,t){if("object"!=_(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!=_(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==_(t)?t:t+""}function R(e,t,r){return t=C(t),function(e,t){if(t&&("object"==_(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,A()?Reflect.construct(t,r||[],C(e).constructor):t.apply(e,r))}function A(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(A=function(){return!!e})()}function C(e){return C=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},C(e)}function I(e,t){return I=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},I(e,t)}var N="shared.regionLockedResourceError",F=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),R(this,t,[u.T.getPhrase(N,"title")])}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&&I(e,t)}(t,e),r=t,(n=[{key:"name",get:function(){return"RegionLockedResourceError"}},{key:"heading",get:function(){return u.T.getPhrase(N,"heading")}},{key:"description",get:function(){return u.T.getPhrase(N,"description")}}])&&k(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(c.H);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 x(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,B(n.key),n)}}function B(e){var t=function(e,t){if("object"!=L(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.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 H(e,t,r){return t=Q(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,M()?Reflect.construct(t,r||[],Q(e).constructor):t.apply(e,r))}function M(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(M=function(){return!!e})()}function Q(e){return Q=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Q(e)}function D(e,t){return D=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},D(e,t)}var W="shared.unspecifiedError",q={notFound:d,forbidden:{rating:S,yearLevel:S,region:F,privacy:S},badRequest:function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),H(this,t,[u.T.getPhrase(W,"title")])}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),r=t,(n=[{key:"name",get:function(){return"UnspecifiedError"}},{key:"heading",get:function(){return u.T.getPhrase(W,"heading")}},{key:"description",get:function(){return u.T.getPhrase(W,"description")}},{key:"cta",get:function(){return!1}}])&&x(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(c.H)};function U(e){return e.map((function(e){return e.statusCode})).join(":")}function X(e,t,r){var u=Array.isArray(e)?e:[e];(0,n.useEffect)((function(){u.forEach((function(e){!function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(e){var n;n="number"==typeof e?e:e.status;var u=Object.assign(Object.assign({},q),t);n&&i.Q.Ry.isStatusCodeError(n)&&(n!==o.o.NotFound?n!==o.o.Forbidden?r.badRequest||i.Q.Ry.throw(new u.badRequest):r.forbidden||i.Q.Ry.throw(new u.forbidden.privacy):r.notFound||i.Q.Ry.throw(new u.notFound))}}(e.statusCode,t,r)}))}),[U(u),t,r])}},89146:function(e,t,r){function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}r.d(t,{u:function(){return i}});var o={numItems:5,minWidth:50,maxWidth:100},i={getPartialLoadingItems:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=Object.assign(Object.assign({},o),t);return(e=Array(r.numItems),function(e){if(Array.isArray(e))return n(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return n(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).map((function(){return{width:"".concat(Math.max(Math.floor(Math.random()*r.maxWidth),r.minWidth),"px")}}))}}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[8362],{38362:function(t,e,n){"use strict";n.r(e),n.d(e,{EditLinkView:function(){return E}});var r=n(48088),o=n(21679),i=n(57857),u=n(99249),a=n(31647),l=n(52076),c=n(10101),s=n(88172),f=n(57098),p=n(67670),d=n(13823),y=n(93569),b=n(7190),v=n(8407),h=n.n(v);function m(t){return m="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},m(t)}function w(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,g(r.key),r)}}function g(t){var e=function(t,e){if("object"!=m(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!=m(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==m(e)?e:e+""}function k(t,e,n){return e=S(e),function(t,e){if(e&&("object"==m(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,O()?Reflect.construct(e,n||[],S(t).constructor):e.apply(t,n))}function O(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(O=function(){return!!t})()}function S(t){return S=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},S(t)}function j(t,e){return j=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},j(t,e)}var E=function(t){function e(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),k(this,e,[t])}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&j(t,e)}(e,t),n=e,v=[{key:"initialize",value:function(){this.listenTo(f.Vk.LINK,"link:".concat(this.options.linkId,":sync"),this.render),this.linkDataService=o.u.getInstance(f.Or.Link,this)}},{key:"name",get:function(){return"EditLinkView"}},{key:"title",get:function(){return"Edit link"}},{key:"template",get:function(){return h()}},{key:"channelName",get:function(){return y.N0.generateUniqueChannelName(this)}},{key:"bindings",get:function(){return{"[name=url]":{observe:"url",setOptions:{validate:!0}},"[name=name]":{observe:"name",setOptions:{validate:!0}}}}},{key:"lang",get:function(){return"libraryEditor.editLink"}},{key:"behaviors",get:function(){var t=this;return[{behaviorClass:c.Yw,title:i.T.getPhrase(this.lang,"heading"),spinnerButtonOptions:{channelName:this.channelName,model:this.spinnerModel=new p.v,buttonText:i.T.getPhrase(this.lang,"save"),onClick:function(e){return t.onSubmit(e)}}}]}},{key:"events",value:function(){return{submit:"onSubmit"}}},{key:"onSubmit",value:function(t){var e=this;t&&t.preventDefault(),this.viewModel.validate(),!1!==this.viewModel.isValid()&&(r.Radio.channel(this.channelName).trigger(s.I3.ShowSpinner),this.linkDataService.updateLink(this.options.videoId,this.viewModel,(function(){e.logAction(),a.Q.C$.trigger({application:f.OV.LIBRARY_EDITOR,action:f.eX.LibraryEditor.EDIT_VIDEO_RESOURCES,args:[e.options.videoId]})})))}},{key:"logAction",value:function(){var t={id:this.options.linkId,parentId:+this.options.videoId,name:this.viewModel.get("name")};l.k.logUserAction(t,this.options.analyticsOptions)}},{key:"dataFetched",value:function(){return!!this.model&&!!this.viewModel}},{key:"onBeforeRender",value:function(){var t=this;this.model=this.linkDataService.getLink(this.options.linkId,(function(e){t.viewModel=u.r.get("link:".concat(t.options.linkId),e.toJSON(),{ctor:d.r}),t.viewModel.addValidation(b.yU)})),this.dataFetched()&&this.spinnerModel.set(s.ZV.Disabled,!1)}},{key:"viewOptions",value:function(){return{dataFetched:this.dataFetched(),spinnerEl:y.Kp.getSpinner({size:y.Ey.Large,extraClasses:"mx-auto"})}}},{key:"onRender",value:function(){this.viewModel&&(this.stickit(this.viewModel),r.Validation.bind(this,{model:this.viewModel}))}},{key:"onClose",value:function(){this.unstickit()}}],v&&w(n.prototype,v),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,v}(a.Q.G7)},67670:function(t,e,n){"use strict";n.d(e,{v:function(){return d}});var r=n(31647),o=n(88172);function i(t){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(t)}function u(t,e,n){return(e=l(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function a(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,l(r.key),r)}}function l(t){var e=function(t,e){if("object"!=i(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!=i(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==i(e)?e:e+""}function c(t,e,n){return e=f(e),function(t,e){if(e&&("object"==i(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,s()?Reflect.construct(e,n||[],f(t).constructor):e.apply(t,n))}function s(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(s=function(){return!!t})()}function f(t){return f=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},f(t)}function p(t,e){return p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},p(t,e)}var d=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),c(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&p(t,e)}(e,t),n=e,(r=[{key:"defaults",value:function(){return u(u({},o.ZV.Disabled,!0),o.ZV.Hidden,!1)}}])&&a(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(r.Q.Hn)},8407:function(t,e,n){var r=n(32227);t.exports=(r.default||r).template({1:function(t,e,n,r,o){var i;return t.propertyIsEnumerable,(null!=(i=t.lambda(null!=(i=null!=e?e.options:e)?i.spinnerEl:i,e))?i:"")+"\n"},3:function(t,e,n,r,o){return'<form>\n <div class="form-group">\n <label for="url" class="control-label">URL</label>\n <input name="url" id="url" type="text" class="form-control" placeholder="URL" autocomplete="off" autofocus/>\n <div class="form-feedback"></div>\n </div>\n <div class="form-group">\n <label for="name" class="control-label">Name</label>\n <input name="name" id="name" type="text" class="form-control" placeholder="Name" autocomplete="off" autofocus/>\n <div class="form-feedback"></div>\n </div>\n</form>\n'},compiler:[8,">= 4.3.0"],main:function(t,e,n,r,o){var i;return t.propertyIsEnumerable,null!=(i=n.unless.call(null!=e?e:t.nullContext||{},null!=(i=null!=e?e.options:e)?i.dataFetched:i,{name:"unless",hash:{},fn:t.program(1,o,0),inverse:t.program(3,o,0),data:o}))?i:""},useData:!0})}}]);
|