@clickview/library-editor 1.54.1-dev.0 → 1.55.0-dev.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundles.json +3 -3
- package/dist/css/{2601-library-editor-8922d361d6.chunk.css → 2601-library-editor-df40499c04.chunk.css} +2 -2
- package/dist/css/{4001-library-editor-da87291909.chunk.css → 4001-library-editor-f6d2f9fb58.chunk.css} +1 -1
- package/dist/css/{9383-library-editor-02381b537c.chunk.css → 9383-library-editor-41fc3cc85e.chunk.css} +2 -2
- package/dist/css/{library-editor-app-08d619de95.css → library-editor-app-bcca987662.css} +1 -1
- package/dist/languages/en.json +4321 -1
- package/dist/scripts/101-8f41923234.chunk.js +1 -0
- package/dist/scripts/{1010-2c4e71bac2.chunk.js → 1010-4a381a84d4.chunk.js} +1 -1
- package/dist/scripts/{1086-d0efa1a0ca.chunk.js → 1086-7632f7b45b.chunk.js} +1 -1
- package/dist/scripts/112-4f413f94c0.chunk.js +1 -0
- package/dist/scripts/1216-83f6fbc7be.chunk.js +1 -0
- package/dist/scripts/{1269-ec70091b19.chunk.js → 1269-02d8d91784.chunk.js} +1 -1
- package/dist/scripts/{1409-f3fea6c3c3.chunk.js → 1409-58db6bd9f7.chunk.js} +1 -1
- package/dist/scripts/152-808e046b1f.chunk.js +2 -0
- package/dist/scripts/{1703-0e6940a3c0.chunk.js → 1703-45ced13ccd.chunk.js} +1 -1
- package/dist/scripts/{1832-9fd96d5efe.chunk.js → 1832-6a54b38248.chunk.js} +1 -1
- package/dist/scripts/{1876-fc815ba31e.chunk.js → 1876-e0567188b8.chunk.js} +1 -1
- package/dist/scripts/1973-7a1768228d.chunk.js +1 -0
- package/dist/scripts/2417-7628573bf3.chunk.js +1 -0
- package/dist/scripts/{243-d27b3c7903.chunk.js → 243-25fcce188c.chunk.js} +1 -1
- package/dist/scripts/2482-ded3090c15.chunk.js +1 -0
- package/dist/scripts/{259-d6a4aa6694.chunk.js → 259-e24fcf8f12.chunk.js} +1 -1
- package/dist/scripts/{2601-d42245cb40.chunk.js → 2601-944902ba08.chunk.js} +1 -1
- package/dist/scripts/{2644-cadc6531d6.chunk.js → 2644-98304e9394.chunk.js} +1 -1
- package/dist/scripts/2648-0a58c0fc05.chunk.js +1 -0
- package/dist/scripts/{2692-b7dff9da8a.chunk.js → 2692-1ddd87476e.chunk.js} +1 -1
- package/dist/scripts/2802-d428814c29.chunk.js +2 -0
- package/dist/scripts/2802-d428814c29.chunk.js.LICENSE.txt +8 -0
- package/dist/scripts/{2803-026f3af7cb.chunk.js → 2803-fbb9d2439d.chunk.js} +1 -1
- package/dist/scripts/{2888-a406bcd564.chunk.js → 2888-c2c8b859cd.chunk.js} +1 -1
- package/dist/scripts/299-1a0d6a88dc.chunk.js +1 -0
- package/dist/scripts/{2998-a3c3a1e950.chunk.js → 2998-aae0ec14de.chunk.js} +1 -1
- package/dist/scripts/{3400-326dc33968.chunk.js → 3400-ebc91cde7a.chunk.js} +1 -1
- package/dist/scripts/343-41502b5d24.chunk.js +1 -0
- package/dist/scripts/{35-d04a61537f.chunk.js → 35-68aa98885c.chunk.js} +1 -1
- package/dist/scripts/{3551-97ac416527.chunk.js → 3551-ad62e3a403.chunk.js} +1 -1
- package/dist/scripts/{3639-171b53e474.chunk.js → 3639-c5cc04c72d.chunk.js} +1 -1
- package/dist/scripts/3746-9c62c31099.chunk.js +1 -0
- package/dist/scripts/376-83584040a3.chunk.js +1 -0
- package/dist/scripts/{3763-21a9bc8c81.chunk.js → 3763-47619f0e54.chunk.js} +1 -1
- package/dist/scripts/3969-c636ff3159.chunk.js +1 -0
- package/dist/scripts/4001-a84ada264e.chunk.js +2 -0
- package/dist/scripts/4024-5bc8aa8dcd.chunk.js +1 -0
- package/dist/scripts/{4201-9f363cadea.chunk.js → 4201-ffd35af9cb.chunk.js} +1 -1
- package/dist/scripts/{4245-3680566469.chunk.js → 4245-59b4242cad.chunk.js} +1 -1
- package/dist/scripts/4523-55c4df85c8.chunk.js +1 -0
- package/dist/scripts/{4591-84bc2f21f0.chunk.js → 4591-78600e384c.chunk.js} +1 -1
- package/dist/scripts/{4860-7e9c7b578f.chunk.js → 4860-6001ab4e2a.chunk.js} +1 -1
- package/dist/scripts/5046-cb525612c6.chunk.js +1 -0
- package/dist/scripts/514-eeb95eba47.chunk.js +1 -0
- package/dist/scripts/{5173-6fe93f90b8.chunk.js → 5173-d333602893.chunk.js} +1 -1
- package/dist/scripts/{5286-c55bd5882c.chunk.js → 5286-7aac82c4d1.chunk.js} +1 -1
- package/dist/scripts/535-27d0457532.chunk.js +1 -0
- package/dist/scripts/{5412-abf3c7ab24.chunk.js → 5412-e2505df3a4.chunk.js} +1 -1
- package/dist/scripts/{5418-4cf3592f6a.chunk.js → 5418-f84d0ff359.chunk.js} +1 -1
- package/dist/scripts/{5424-fb9af4cac5.chunk.js → 5424-65be3c657c.chunk.js} +1 -1
- package/dist/scripts/5524-04583b6e40.chunk.js +1 -0
- package/dist/scripts/{5707-2455798bbe.chunk.js → 5707-fcb653aa7a.chunk.js} +1 -1
- package/dist/scripts/{5747-dc100fe944.chunk.js → 5747-674f00efcd.chunk.js} +1 -1
- package/dist/scripts/5850-74b0b14549.chunk.js +1 -0
- package/dist/scripts/5891-0864c38750.chunk.js +1 -0
- package/dist/scripts/{6093-c4d7d99258.chunk.js → 6093-e19df1d1fa.chunk.js} +1 -1
- package/dist/scripts/61-ec794cf02d.chunk.js +2 -0
- package/dist/scripts/{6352-9f5498c43f.chunk.js → 6352-6452f77c89.chunk.js} +1 -1
- package/dist/scripts/6532-48f3f080f5.chunk.js +2 -0
- package/dist/scripts/{6732-0223b7e084.chunk.js → 6732-85afd02f41.chunk.js} +1 -1
- package/dist/scripts/{6774-7d16e3a1b2.chunk.js → 6774-a002ac7253.chunk.js} +1 -1
- package/dist/scripts/{6788-1baf5483df.chunk.js → 6788-dc6b522995.chunk.js} +1 -1
- package/dist/scripts/6963-0e2bf1bde7.chunk.js +1 -0
- package/dist/scripts/7002-eef9319d36.chunk.js +1 -0
- package/dist/scripts/{7053-5f6f2bf8ee.chunk.js → 7053-35b82818eb.chunk.js} +1 -1
- package/dist/scripts/7071-6f7e375aaa.chunk.js +1 -0
- package/dist/scripts/708-c74c75f82a.chunk.js +1 -0
- package/dist/scripts/7153-57796cd98e.chunk.js +1 -0
- package/dist/scripts/{7190-b143292308.chunk.js → 7190-2b40df1e89.chunk.js} +1 -1
- package/dist/scripts/7295-474c754cb6.chunk.js +1 -0
- package/dist/scripts/{7376-e476873e22.chunk.js → 7376-e3bf3a94f9.chunk.js} +1 -1
- package/dist/scripts/{7408-eb04403233.chunk.js → 7408-15b5cc4a39.chunk.js} +1 -1
- package/dist/scripts/7827-ce63697325.chunk.js +1 -0
- package/dist/scripts/8113-d678e76098.chunk.js +1 -0
- package/dist/scripts/8130-0a0a9c4cab.chunk.js +1 -0
- package/dist/scripts/8213-14b105169f.chunk.js +1 -0
- package/dist/scripts/{8362-2712404025.chunk.js → 8362-267efdac61.chunk.js} +1 -1
- package/dist/scripts/8542-64733a5c92.chunk.js +1 -0
- package/dist/scripts/8591-149f4a2b62.chunk.js +1 -0
- package/dist/scripts/{8726-10013d1e22.chunk.js → 8726-2d0bc64637.chunk.js} +1 -1
- package/dist/scripts/{4506-e3e16c1c39.chunk.js → 8727-9077c2b877.chunk.js} +1 -1
- package/dist/scripts/{8762-0c818e61d0.chunk.js → 8762-be126e413d.chunk.js} +1 -1
- package/dist/scripts/{8906-3052c24e98.chunk.js → 8906-2ae58fb990.chunk.js} +1 -1
- package/dist/scripts/{8952-5dfd08cdc7.chunk.js → 8952-a9a7742f72.chunk.js} +2 -2
- package/dist/scripts/{9357-04700677af.chunk.js → 9357-e71ea6a34d.chunk.js} +1 -1
- package/dist/scripts/9369-1e706eb521.chunk.js +2 -0
- package/dist/scripts/9383-405d522f62.chunk.js +1 -0
- package/dist/scripts/{9695-8b46921478.chunk.js → 9695-636ea0ef64.chunk.js} +1 -1
- package/dist/scripts/{9927-1a5a65a341.chunk.js → 9927-7a935c955d.chunk.js} +1 -1
- package/dist/scripts/bundle-1a963db722.min.js +2 -0
- package/dist/scripts/bundle-1a963db722.min.js.LICENSE.txt +10 -0
- package/dist/scripts/{polyfills-e4d8584da7.min.js → polyfills-5ce436cbbe.min.js} +1 -1
- package/package.json +4 -5
- package/typings/libs/CVEvents.d.ts +13 -0
- package/typings/libs/CVLanguages.d.ts +24 -0
- package/typings/libs/LazyLoad.d.ts +30 -0
- package/typings/libs/LazyLoad.ts +27 -0
- package/typings/libs/cookiesjs.d.ts +24 -0
- package/dist/scripts/101-1aa755b98b.chunk.js +0 -1
- package/dist/scripts/1216-9d2e314558.chunk.js +0 -1
- package/dist/scripts/1537-2945b91924.chunk.js +0 -1
- package/dist/scripts/1973-074d4e72c2.chunk.js +0 -1
- package/dist/scripts/209-f9e52775b1.chunk.js +0 -1
- package/dist/scripts/2516-0290fc7712.chunk.js +0 -1
- package/dist/scripts/2639-efe1222211.chunk.js +0 -2
- package/dist/scripts/2639-efe1222211.chunk.js.LICENSE.txt +0 -8
- package/dist/scripts/2648-61a84bc983.chunk.js +0 -1
- package/dist/scripts/2955-521e238d27.chunk.js +0 -1
- package/dist/scripts/299-32a1391000.chunk.js +0 -1
- package/dist/scripts/3746-9f89d2e526.chunk.js +0 -1
- package/dist/scripts/376-4d9e8d5305.chunk.js +0 -1
- package/dist/scripts/3969-14f58e46c8.chunk.js +0 -1
- package/dist/scripts/4001-5f16bcaff3.chunk.js +0 -2
- package/dist/scripts/4024-e76b07c207.chunk.js +0 -1
- package/dist/scripts/4523-e918636e67.chunk.js +0 -1
- package/dist/scripts/471-9ae0a7d088.chunk.js +0 -2
- package/dist/scripts/4984-e55e0bfa17.chunk.js +0 -1
- package/dist/scripts/514-9e42f33112.chunk.js +0 -2
- package/dist/scripts/514-9e42f33112.chunk.js.LICENSE.txt +0 -6
- package/dist/scripts/535-96be75b325.chunk.js +0 -1
- package/dist/scripts/5524-83e92242a1.chunk.js +0 -1
- package/dist/scripts/5698-74d4a95cab.chunk.js +0 -1
- package/dist/scripts/5850-21711256a9.chunk.js +0 -1
- package/dist/scripts/5891-1f548b9c62.chunk.js +0 -1
- package/dist/scripts/61-35a4e0dd3d.chunk.js +0 -2
- package/dist/scripts/6637-3078ed12bc.chunk.js +0 -1
- package/dist/scripts/6725-52d65e0d02.chunk.js +0 -2
- package/dist/scripts/6963-2e5edf04ac.chunk.js +0 -1
- package/dist/scripts/7071-9ae15d6979.chunk.js +0 -1
- package/dist/scripts/7153-11798dda90.chunk.js +0 -1
- package/dist/scripts/7295-c5ccbfe2be.chunk.js +0 -1
- package/dist/scripts/7416-bafece2a3d.chunk.js +0 -1
- package/dist/scripts/7827-53c10fe9d7.chunk.js +0 -1
- package/dist/scripts/8080-540165cb5c.chunk.js +0 -1
- package/dist/scripts/8113-eb9901344c.chunk.js +0 -1
- package/dist/scripts/8213-4d11becb33.chunk.js +0 -1
- package/dist/scripts/8542-7dbc2fa676.chunk.js +0 -1
- package/dist/scripts/8591-920b0560e4.chunk.js +0 -1
- package/dist/scripts/8757-8ba60a3c5f.chunk.js +0 -2
- package/dist/scripts/8757-8ba60a3c5f.chunk.js.LICENSE.txt +0 -44
- package/dist/scripts/9077-fd1d054d31.chunk.js +0 -1
- package/dist/scripts/9134-8845590ece.chunk.js +0 -1
- package/dist/scripts/9369-cacc5f30e5.chunk.js +0 -2
- package/dist/scripts/9383-26ce3e3847.chunk.js +0 -1
- package/dist/scripts/bundle-5d010f1f12.min.js +0 -2
- package/dist/scripts/bundle-5d010f1f12.min.js.LICENSE.txt +0 -133
- /package/dist/css/{6637-library-editor-6a2d152d7d.chunk.css → 112-library-editor-6a2d152d7d.chunk.css} +0 -0
- /package/dist/css/{6725-library-editor-01b4461ff1.chunk.css → 152-library-editor-01b4461ff1.chunk.css} +0 -0
- /package/dist/css/{1537-library-editor-46f8e6e95b.chunk.css → 2417-library-editor-46f8e6e95b.chunk.css} +0 -0
- /package/dist/css/{209-library-editor-1b6dc45d45.chunk.css → 2482-library-editor-1b6dc45d45.chunk.css} +0 -0
- /package/dist/css/{2955-library-editor-d2f704c6a5.chunk.css → 343-library-editor-d2f704c6a5.chunk.css} +0 -0
- /package/dist/css/{9077-library-editor-765ea88cb0.chunk.css → 5046-library-editor-765ea88cb0.chunk.css} +0 -0
- /package/dist/css/{8080-library-editor-7ffe353138.chunk.css → 708-library-editor-7ffe353138.chunk.css} +0 -0
- /package/dist/css/{9134-library-editor-5a1c6fc3b4.chunk.css → 8130-library-editor-5a1c6fc3b4.chunk.css} +0 -0
- /package/dist/scripts/{6725-52d65e0d02.chunk.js.LICENSE.txt → 152-808e046b1f.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{4001-5f16bcaff3.chunk.js.LICENSE.txt → 4001-a84ada264e.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{546-2cf4378b0c.chunk.js → 546-f770211173.chunk.js} +0 -0
- /package/dist/scripts/{61-35a4e0dd3d.chunk.js.LICENSE.txt → 61-ec794cf02d.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{471-9ae0a7d088.chunk.js.LICENSE.txt → 6532-48f3f080f5.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{8952-5dfd08cdc7.chunk.js.LICENSE.txt → 8952-a9a7742f72.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{9369-cacc5f30e5.chunk.js.LICENSE.txt → 9369-1e706eb521.chunk.js.LICENSE.txt} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[243],{24828:function(e,t,n){"use strict";n.d(t,{o:function(){return r}});var r=["bg-pink","bg-orange"].concat(["bg-green","bg-cyan","bg-teal","bg-blue","bg-indigo","bg-purple"])},22231:function(e,t,n){"use strict";function r(e,t){return t[e.charCodeAt(0)%t.length]}n.d(t,{x:function(){return r}})},50243:function(e,t,n){"use strict";n.r(t),n.d(t,{EditFolderImagesView:function(){return $}});var r=n(43823),o=n(21161),i=n(21679),a=n(99249),l=n(31647),u=n(52076),c=n(70065),s=n(10101),p=n(58025),f=n(88172),h=n(57098),m=n(29457),d=n(67670),y=n(18375),g=n(48404),b=n(93569),v=n(57857),w=n(24828),I=n(22231),k=n(86983),C=n.n(k),T={removeImage:"daDCA",imageElement:"U_0tb",banner:"J28Xw",thumbnail:"OoZ6O",imageContainer:"RWdbM"};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 O(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,E(r.key),r)}}function E(e){var t=function(e){if("object"!=_(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.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 j(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(j=function(){return!!e})()}function B(e){return B=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},B(e)}function S(e,t){return S=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},S(e,t)}var P=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=B(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,j()?Reflect.construct(t,n||[],B(e).constructor):t.apply(e,n))}(this,t,[e])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&S(e,t)}(t,e),n=t,o=[{key:"initialize",value:function(){this.viewModel=a.r.get("edit:folder:images")}},{key:"name",get:function(){return"EditImageComponent"}},{key:"template",get:function(){return C()}},{key:"lang",get:function(){return"libraryEditor.editImage"}},{key:"className",get:function(){return this.options.imageType===m.__.Thumbnails?"".concat(T.thumbnail," mb-2"):"".concat(T.banner," mt-2")}},{key:"events",value:function(){return e={},n="onClickRemoveImage",(t=E(t="click .".concat(T.removeImage)))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:s.YR,channelName:this.options.channelName,buttonSelector:".btn-outline-dark",imageType:this.options.imageType,saveImage:function(t,n){n?(e.viewModel.set({dataUrl:t,type:e.options.imageType}),l.Q.C$.trigger({application:h.OV.LIBRARY_EDITOR,action:h.eX.LibraryEditor.EDIT_FOLDER_IMAGES,args:[e.options.folderId]})):r.Radio.channel(e.options.channelName).trigger("select:image",t,e.options.imageType)}}]}},{key:"onClickRemoveImage",value:function(){r.Radio.channel(this.options.channelName).trigger("show:dialog",this.options.imageType)}},{key:"getImageUrl",value:function(){var e=this.options.imageType===m.__.Banners?"createBannerUrl":"createFolderThumbnailUrl";return b.jw[e](this.options.originalImage)}},{key:"getImageTypeText",value:function(){switch(this.options.imageType){case m.__.Banners:return v.T.getPhrase(this.lang,"banner");case m.__.Thumbnails:return v.T.getPhrase(this.lang,"thumbnail")}}},{key:"viewOptions",value:function(){return{styles:T,imageUrl:this.getImageUrl(),backgroundColor:(0,I.x)(this.options.folderName,w.o),hasImage:this.options.originalImage&&this.options.originalImage.get("id"),imageTypeText:this.getImageTypeText(),dimensions:h.yE[this.options.imageType],recommendedDimensions:h.nq[this.options.imageType]}}}],o&&O(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(l.Q.wA),R=n(80322),x=n.n(R);function U(e){return U="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},U(e)}function D(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,M(r.key),r)}}function M(e){var t=function(e){if("object"!=U(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=U(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==U(t)?t:t+""}function N(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(N=function(){return!!e})()}function V(e){return V=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},V(e)}function A(e,t){return A=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},A(e,t)}var L,F=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=V(t),function(e,t){if(t&&("object"==U(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,N()?Reflect.construct(t,n||[],V(e).constructor):t.apply(e,n))}(this,t,[e])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&A(e,t)}(t,e),n=t,(r=[{key:"name",get:function(){return"EditImagesWrapperComponent"}},{key:"template",get:function(){return x()}},{key:"regions",value:function(){return{banner:{el:".banner-region",replaceElement:!0},thumbnail:{el:".thumbnail-region",replaceElement:!0}}}},{key:"renderBanner",value:function(){this.showChildView("banner",new P({channelName:this.options.bannerChannel,imageCdnUrl:this.options.imageCdnUrl,imageType:m.__.Banners,folderName:this.options.folderName,originalImage:this.options.bannerImage,folderId:this.options.folderId}))}},{key:"renderThumbnail",value:function(){this.showChildView("thumbnail",new P({channelName:this.options.thumbnailChannel,imageCdnUrl:this.options.imageCdnUrl,imageType:m.__.Thumbnails,folderName:this.options.folderName,originalImage:this.options.thumbnailImage,folderId:this.options.folderId}))}},{key:"onRender",value:function(){this.renderBanner(),this.renderThumbnail()}}])&&D(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(l.Q.wA),W=n(42687),Z=n.n(W),H="EOVMO";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 z(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Q(r.key),r)}}function Q(e){var t=function(e){if("object"!=Y(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Y(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Y(t)?t:t+""}function q(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(q=function(){return!!e})()}function G(e){return G=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},G(e)}function X(e,t){return X=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},X(e,t)}!function(e){e[e.Upload=0]="Upload",e[e.Crop=1]="Crop"}(L||(L={}));var $=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=G(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,q()?Reflect.construct(t,n||[],G(e).constructor):t.apply(e,n))}(this,t,[e])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&X(e,t)}(t,e),n=t,v=[{key:"initialize",value:function(){this.popupContentState=L.Upload,this.viewModel=a.r.get("edit:folder:images"),this.viewModel.get("dataUrl")&&(this.selectedImageType=this.viewModel.get("type"),this.newImageEl=new Image,this.newImageEl.src=this.viewModel.get("dataUrl"),this.spinnerModel.set(f.ZV.Disabled,!1),this.popupContentState=L.Crop),this.libraryDataService=i.u.getInstance(h.Or.Library,this),this.imageUploadDataService=i.u.getInstance(h.Or.ImageUpload,this),this.bindListeners()}},{key:"name",get:function(){return"EditFolderImagesView"}},{key:"title",get:function(){return"Edit Folder Images"}},{key:"template",get:function(){return Z()}},{key:"channelName",get:function(){return b.N0.generateUniqueChannelName(this)}},{key:"regions",value:function(){return{content:{el:".content-region",replaceElement:!0}}}},{key:"events",value:function(){return{"click .back-btn":"onClickBackButton","shown.bs.modal":"renderCropper"}}},{key:"elements",get:function(){return{backBtn:".back-btn",cancelBtn:".cancel-btn"}}},{key:"behaviors",get:function(){return[{title:"Edit folder images",behaviorClass:s.Yw,size:"modal-lg",buttons:[{text:"Back",className:"btn btn-outline-dark back-btn ".concat(H)}],spinnerButtonOptions:{model:this.spinnerModel=new d.v((e={},t=f.ZV.Hidden,n=!0,(t=Q(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e)),channelName:this.channelName,buttonText:"Continue",onClick:this.onClickCrop,extraButtonClass:"btn-dark"},cancelButtonOptions:{className:"btn btn-dark cancel-btn",text:"Close"}}];var e,t,n}},{key:"requiredResources",get:function(){return{config:g.p.config}}},{key:"bindListeners",value:function(){var e=this;this.listenTo(h.Vk.LIBRARY,"".concat(h.M_.FOLDER,":").concat(this.options.folderId,":sync"),this.render);var t="".concat(this.channelName,":").concat(m.__.Banners),n="".concat(this.channelName,":").concat(m.__.Thumbnails);this.listenTo(t,"select:image",(function(t){return e.onSelectImage(t,m.__.Banners)})),this.listenTo(n,"select:image",(function(t){return e.onSelectImage(t,m.__.Thumbnails)})),this.listenTo(t,"show:dialog",(function(){return e.onShowDialog(m.__.Banners)})),this.listenTo(n,"show:dialog",(function(){return e.onShowDialog(m.__.Thumbnails)})),this.listenTo(t,"image:error",(function(){return e.triggerMethod("hide")})),this.listenTo(n,"image:error",(function(){return e.triggerMethod("hide")})),this.listenTo(this.channelName,p.Y.ImageCropped,this.onImageCropped)}},{key:"onClickBackButton",value:function(){this.popupContentState!==L.Upload&&(this.popupContentState=L.Upload,this.selectedImageType=null,this.newImageEl=null,this.spinnerModel.set(f.ZV.Disabled,!0),this.renderContent())}},{key:"onClickCrop",value:function(){r.Radio.channel(this.channelName).trigger(p.Y.CropImage).trigger(f.I3.ShowSpinner)}},{key:"onSelectImage",value:function(e,t){this.selectedImageType=t,this.newImageEl=new Image,this.newImageEl.src=e,this.popupContentState=L.Crop,this.spinnerModel.set(f.ZV.Disabled,!1),this.renderCropper()}},{key:"onImageCropped",value:function(e){var t=this;this.imageUploadDataService.uploadBase64Image(e,this.selectedImageType,(function(e){return t.onImageUploaded(e)}))}},{key:"onImageUploaded",value:function(e){var t=this,n={libraryId:this.libraryId,folderId:this.options.folderId,currentImageId:this.getCurrentImageId(),imageModel:e},r=this.selectedImageType===m.__.Banners?c.py.Banner:c.py.Thumbnail,o=this.selectedImageType===m.__.Banners?"addOrUpdateBanner":"addOrUpdateThumbnail";this.libraryDataService[o](n,(function(e){u.k.logUserAction({libraryId:t.libraryId,folderId:t.options.folderId,id:e.get("id")},{actionType:c.Vw.Upload,entity:r,workflowPhase:c.eu.Complete,location:c.LZ.Popup}),t.onFinish()}))}},{key:"onShowDialog",value:function(e){var t=this,n=new b.Mr({title:"Remove image?",text:"Are you sure you want to remove this image?",buttons:[{text:"Remove",className:"btn btn-danger",success:!0},{text:"Cancel",className:"btn btn-link",close:!0}],channelName:this.options.channelName});setTimeout((function(){return n.render().done((function(){return t.removeImage(e)}))}),200),this.triggerMethod("hide")}},{key:"removeImage",value:function(e){var t=this,n=e===m.__.Banners?"deleteBanner":"deleteThumbnail",r=e===m.__.Banners?this.currentBanner:this.currentThumbnail,o={libraryId:this.libraryId,folderId:this.model.get("id"),imageId:r.get("id")},i=e===m.__.Banners?c.py.Banner:c.py.Thumbnail;this.libraryDataService[n](o,(function(){u.k.logUserAction({libraryId:t.libraryId,folderId:t.model.get("id"),id:r.get("id")},{actionType:c.Vw.Delete,entity:i,workflowPhase:c.eu.Complete,location:c.LZ.Popup}),e===m.__.Banners&&(t.currentBanner=null),e===m.__.Thumbnails&&(t.currentThumbnail=null),t.onFinish()}))}},{key:"onFinish",value:function(){this.viewModel.clear(),l.Q.C$.trigger({application:h.OV.LIBRARY_EDITOR,action:h.eX.LibraryEditor.EDIT_FOLDER_IMAGES,args:[this.options.folderId]})}},{key:"getCurrentImageId",value:function(){return this.selectedImageType===m.__.Banners&&this.currentBanner?this.currentBanner.get("id"):this.selectedImageType===m.__.Thumbnails&&this.currentThumbnail?this.currentThumbnail.get("id"):void 0}},{key:"getCropRegionWidth",value:function(){return this.$el.find(".modal-body").width()}},{key:"getImageModel",value:function(){return new y.E({dataUrl:this.newImageEl.src,width:this.newImageEl.width,height:this.newImageEl.height})}},{key:"renderContent",value:function(){this.popupContentState===L.Upload&&(this.getUI("backBtn").addClass(H),this.getUI("cancelBtn").removeClass(H),r.Radio.channel(this.channelName).trigger(f.I3.HideButton),this.showChildView("content",new F({imageCdnUrl:this.config.get("imageCdnUrl"),folderName:this.model.get("name"),bannerImage:this.currentBanner,thumbnailImage:this.currentThumbnail,bannerChannel:"".concat(this.channelName,":").concat(m.__.Banners),thumbnailChannel:"".concat(this.channelName,":").concat(m.__.Thumbnails),folderId:this.options.folderId})))}},{key:"renderCropper",value:function(){this.popupContentState===L.Crop&&(this.getUI("backBtn").removeClass(H),this.getUI("cancelBtn").addClass(H),r.Radio.channel(this.channelName).trigger(f.I3.ShowButton),this.showChildView("content",new p.a({model:this.getImageModel(),channelName:this.channelName,imageType:this.selectedImageType,minWidth:h.yE[this.selectedImageType].width,minHeight:h.yE[this.selectedImageType].height,getCropRegionWidth:o.bind(this.getCropRegionWidth,this)})))}},{key:"viewOptions",value:function(){return{dataFetched:!!this.model&&!!this.libraryId,spinnerEl:b.Kp.getSpinner({size:b.Ey.Large,extraClasses:"mx-auto"})}}},{key:"onBeforeRender",value:function(){var e=this;this.model&&this.libraryId||(this.model=this.libraryDataService.getFolder(this.options.folderId),this.libraryDataService.getLibraries((function(t){return e.libraryId=t.first().id})))}},{key:"onRender",value:function(){this.model&&this.libraryId&&(this.currentBanner=this.model.get("banner"),this.currentThumbnail=this.model.get("thumbnail"),this.renderContent())}},{key:"onBeforeDestroy",value:function(){this.viewModel.clear()}}],v&&z(n.prototype,v),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,v}(l.Q.G7)},58025:function(e,t,n){"use strict";n.d(t,{Y:function(){return r},a:function(){return y}});var r,o=n(43823),i=n(51934),a=n.n(i),l=n(31647),u=n(91465),c=n.n(u);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 p(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,f(r.key),r)}}function f(e){var t=function(e){if("object"!=s(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=s(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==s(t)?t:t+""}function h(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(h=function(){return!!e})()}function m(e){return m=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},m(e)}function d(e,t){return d=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},d(e,t)}!function(e){e.ClickCrop="click:crop",e.CropImage="crop:image",e.ImageCropped="image:cropped"}(r||(r={}));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),function(e,t,n){return t=m(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,h()?Reflect.construct(t,n||[],m(e).constructor):t.apply(e,n))}(this,t,[e])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&d(e,t)}(t,e),n=t,(i=[{key:"initialize",value:function(){this.listenTo(this.options.channelName,r.CropImage,this.crop)}},{key:"name",get:function(){return"ImageCropperComponent"}},{key:"template",get:function(){return c()}},{key:"className",get:function(){return"text-center"}},{key:"elements",get:function(){return{image:".img"}}},{key:"getMinCropBoxWidth",value:function(){return this.options.minWidth*this.getViewportToImageRatio()}},{key:"getMinCropBoxHeight",value:function(){return this.options.minHeight*this.getViewportToImageRatio()}},{key:"getViewportToImageRatio",value:function(){return this.options.getCropRegionWidth()/this.model.get("width")}},{key:"crop",value:function(){var e=this.cropper.getCroppedCanvas().toDataURL(this.getImageMimeType());o.Radio.channel(this.options.channelName).trigger(r.ImageCropped,e)}},{key:"getImageMimeType",value:function(){var e=this.model.get("dataUrl").match(/data:([a-zA-Z0-9]+\/[a-zA-Z0-9-.+]+).*,.*/);if(e)return e[1]}},{key:"renderCropper",value:function(){this.getMinCropBoxWidth();var e=this.getUI("image").get(0);this.cropper=new(a())(e,{viewMode:1,aspectRatio:this.options.minWidth/this.options.minHeight,minCropBoxWidth:this.getMinCropBoxWidth(),minCropBoxHeight:this.getMinCropBoxHeight(),autoCropArea:1})}},{key:"onRender",value:function(){this.renderCropper()}},{key:"onBeforeDestroy",value:function(){this.cropper.destroy()}}])&&p(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,i}(l.Q.wA)},67670:function(e,t,n){"use strict";n.d(t,{v:function(){return f}});var r=n(31647),o=n(88172);function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function a(e,t,n){return(t=u(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,u(r.key),r)}}function u(e){var t=function(e){if("object"!=i(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==i(t)?t:t+""}function c(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(c=function(){return!!e})()}function s(e){return s=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},s(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),function(e,t,n){return t=s(t),function(e,t){if(t&&("object"==i(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,c()?Reflect.construct(t,n||[],s(e).constructor):t.apply(e,n))}(this,t,arguments)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&p(e,t)}(t,e),n=t,(r=[{key:"defaults",value:function(){return a(a({},o.ZV.Disabled,!0),o.ZV.Hidden,!1)}}])&&l(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(r.Q.Hn)},86983:function(e,t,n){var r=n(31197);e.exports=(r.default||r).template({1:function(e,t,n,r,o){var i;return e.propertyIsEnumerable," "+e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"minimumRecommended",{name:"lang",hash:{height:null!=(i=null!=(i=null!=t?t.options:t)?i.recommendedDimensions:i)?i.height:i,width:null!=(i=null!=(i=null!=t?t.options:t)?i.recommendedDimensions:i)?i.width:i},data:o}))+"\n"},3:function(e,t,n,r,o){var i;return e.propertyIsEnumerable," "+e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"minimumActual",{name:"lang",hash:{height:null!=(i=null!=(i=null!=t?t.options:t)?i.dimensions:i)?i.height:i,width:null!=(i=null!=(i=null!=t?t.options:t)?i.dimensions:i)?i.width:i},data:o}))+"\n"},5:function(e,t,n,r,o){e.propertyIsEnumerable;var i,a=e.lambda,l=e.escapeExpression;return'<button class="'+l(a(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.removeImage:i,t))+'">'+l((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"remove",{name:"lang",hash:{},data:o}))+" "+l(a(null!=(i=null!=t?t.options:t)?i.imageTypeText:i,t))+"</button>\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){e.propertyIsEnumerable;var i,a=null!=t?t:e.nullContext||{},l=e.hooks.helperMissing,u=e.escapeExpression,c=e.lambda;return'<h6 class="mb-0">'+u((n.lang||t&&t.lang||l).call(a,"edit",{name:"lang",hash:{},data:o}))+" "+u(c(null!=(i=null!=t?t.options:t)?i.imageTypeText:i,t))+'</h6>\n<div class="text-secondary mb-1">\n <em>\n'+(null!=(i=n.if.call(a,null!=(i=null!=t?t.options:t)?i.recommendedDimensions:i,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.program(3,o,0),data:o}))?i:"")+' </em>\n</div>\n<div class="my-1 '+u(c(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.imageContainer:i,t))+'">\n <div class="'+u(c(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.imageElement:i,t))+" "+u(c(null!=(i=null!=t?t.options:t)?i.backgroundColor:i,t))+'" style="background-image: url(\''+u(c(null!=(i=null!=t?t.options:t)?i.imageUrl:i,t))+'\')"></div>\n</div>\n<button class="btn btn-outline-dark my-1">'+u((n.lang||t&&t.lang||l).call(a,"upload",{name:"lang",hash:{},data:o}))+" "+u(c(null!=(i=null!=t?t.options:t)?i.imageTypeText:i,t))+"</button>\n"+(null!=(i=n.if.call(a,null!=(i=null!=t?t.options:t)?i.hasImage:i,{name:"if",hash:{},fn:e.program(5,o,0),inverse:e.noop,data:o}))?i:"")},useData:!0})},80322:function(e,t,n){var r=n(31197);e.exports=(r.default||r).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){return'<div class="thumbnail-region"></div>\n<div class="dropdown-divider"></div>\n<div class="banner-region"></div>'},useData:!0})},42687:function(e,t,n){var r=n(31197);e.exports=(r.default||r).template({1:function(e,t,n,r,o){return'<div class="content-region"></div>\n'},3:function(e,t,n,r,o){var i;return e.propertyIsEnumerable,(null!=(i=e.lambda(null!=(i=null!=t?t.options:t)?i.spinnerEl:i,t))?i:"")+"\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var i;return e.propertyIsEnumerable,null!=(i=n.if.call(null!=t?t:e.nullContext||{},null!=(i=null!=t?t.options:t)?i.dataFetched:i,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.program(3,o,0),data:o}))?i:""},useData:!0})},91465:function(e,t,n){var r=n(31197);e.exports=(r.default||r).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var i;return e.propertyIsEnumerable,'<img src="'+e.escapeExpression("function"==typeof(i=null!=(i=n.dataUrl||(null!=t?t.dataUrl:t))?i:e.hooks.helperMissing)?i.call(null!=t?t:e.nullContext||{},{name:"dataUrl",hash:{},data:o}):i)+'" class="img img-fluid" />'},useData:!0})}}]);
|
|
1
|
+
(self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[243],{24828:function(e,t,n){"use strict";n.d(t,{o:function(){return r}});var r=["bg-pink","bg-orange"].concat(["bg-green","bg-cyan","bg-teal","bg-blue","bg-indigo","bg-purple"])},22231:function(e,t,n){"use strict";function r(e,t){return t[e.charCodeAt(0)%t.length]}n.d(t,{x:function(){return r}})},50243:function(e,t,n){"use strict";n.r(t),n.d(t,{EditFolderImagesView:function(){return $}});var r=n(48088),o=n(39479),i=n(21679),a=n(99249),l=n(31647),u=n(52076),c=n(70065),s=n(10101),p=n(58025),f=n(88172),h=n(57098),m=n(29457),d=n(67670),y=n(18375),g=n(48404),b=n(93569),v=n(57857),w=n(24828),I=n(22231),k=n(86983),C=n.n(k),T={removeImage:"daDCA",imageElement:"U_0tb",banner:"J28Xw",thumbnail:"OoZ6O",imageContainer:"RWdbM"};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 O(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,E(r.key),r)}}function E(e){var t=function(e){if("object"!=_(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.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 j(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(j=function(){return!!e})()}function B(e){return B=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},B(e)}function S(e,t){return S=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},S(e,t)}var P=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=B(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,j()?Reflect.construct(t,n||[],B(e).constructor):t.apply(e,n))}(this,t,[e])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&S(e,t)}(t,e),n=t,o=[{key:"initialize",value:function(){this.viewModel=a.r.get("edit:folder:images")}},{key:"name",get:function(){return"EditImageComponent"}},{key:"template",get:function(){return C()}},{key:"lang",get:function(){return"libraryEditor.editImage"}},{key:"className",get:function(){return this.options.imageType===m.__.Thumbnails?"".concat(T.thumbnail," mb-2"):"".concat(T.banner," mt-2")}},{key:"events",value:function(){return e={},n="onClickRemoveImage",(t=E(t="click .".concat(T.removeImage)))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:s.YR,channelName:this.options.channelName,buttonSelector:".btn-outline-dark",imageType:this.options.imageType,saveImage:function(t,n){n?(e.viewModel.set({dataUrl:t,type:e.options.imageType}),l.Q.C$.trigger({application:h.OV.LIBRARY_EDITOR,action:h.eX.LibraryEditor.EDIT_FOLDER_IMAGES,args:[e.options.folderId]})):r.Radio.channel(e.options.channelName).trigger("select:image",t,e.options.imageType)}}]}},{key:"onClickRemoveImage",value:function(){r.Radio.channel(this.options.channelName).trigger("show:dialog",this.options.imageType)}},{key:"getImageUrl",value:function(){var e=this.options.imageType===m.__.Banners?"createBannerUrl":"createFolderThumbnailUrl";return b.jw[e](this.options.originalImage)}},{key:"getImageTypeText",value:function(){switch(this.options.imageType){case m.__.Banners:return v.T.getPhrase(this.lang,"banner");case m.__.Thumbnails:return v.T.getPhrase(this.lang,"thumbnail")}}},{key:"viewOptions",value:function(){return{styles:T,imageUrl:this.getImageUrl(),backgroundColor:(0,I.x)(this.options.folderName,w.o),hasImage:this.options.originalImage&&this.options.originalImage.get("id"),imageTypeText:this.getImageTypeText(),dimensions:h.yE[this.options.imageType],recommendedDimensions:h.nq[this.options.imageType]}}}],o&&O(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(l.Q.wA),R=n(80322),x=n.n(R);function U(e){return U="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},U(e)}function D(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,M(r.key),r)}}function M(e){var t=function(e){if("object"!=U(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=U(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==U(t)?t:t+""}function N(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(N=function(){return!!e})()}function V(e){return V=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},V(e)}function A(e,t){return A=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},A(e,t)}var L,F=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=V(t),function(e,t){if(t&&("object"==U(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,N()?Reflect.construct(t,n||[],V(e).constructor):t.apply(e,n))}(this,t,[e])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&A(e,t)}(t,e),n=t,(r=[{key:"name",get:function(){return"EditImagesWrapperComponent"}},{key:"template",get:function(){return x()}},{key:"regions",value:function(){return{banner:{el:".banner-region",replaceElement:!0},thumbnail:{el:".thumbnail-region",replaceElement:!0}}}},{key:"renderBanner",value:function(){this.showChildView("banner",new P({channelName:this.options.bannerChannel,imageCdnUrl:this.options.imageCdnUrl,imageType:m.__.Banners,folderName:this.options.folderName,originalImage:this.options.bannerImage,folderId:this.options.folderId}))}},{key:"renderThumbnail",value:function(){this.showChildView("thumbnail",new P({channelName:this.options.thumbnailChannel,imageCdnUrl:this.options.imageCdnUrl,imageType:m.__.Thumbnails,folderName:this.options.folderName,originalImage:this.options.thumbnailImage,folderId:this.options.folderId}))}},{key:"onRender",value:function(){this.renderBanner(),this.renderThumbnail()}}])&&D(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(l.Q.wA),W=n(42687),Z=n.n(W),H="EOVMO";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 z(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Q(r.key),r)}}function Q(e){var t=function(e){if("object"!=Y(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Y(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Y(t)?t:t+""}function q(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(q=function(){return!!e})()}function G(e){return G=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},G(e)}function X(e,t){return X=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},X(e,t)}!function(e){e[e.Upload=0]="Upload",e[e.Crop=1]="Crop"}(L||(L={}));var $=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=G(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,q()?Reflect.construct(t,n||[],G(e).constructor):t.apply(e,n))}(this,t,[e])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&X(e,t)}(t,e),n=t,v=[{key:"initialize",value:function(){this.popupContentState=L.Upload,this.viewModel=a.r.get("edit:folder:images"),this.viewModel.get("dataUrl")&&(this.selectedImageType=this.viewModel.get("type"),this.newImageEl=new Image,this.newImageEl.src=this.viewModel.get("dataUrl"),this.spinnerModel.set(f.ZV.Disabled,!1),this.popupContentState=L.Crop),this.libraryDataService=i.u.getInstance(h.Or.Library,this),this.imageUploadDataService=i.u.getInstance(h.Or.ImageUpload,this),this.bindListeners()}},{key:"name",get:function(){return"EditFolderImagesView"}},{key:"title",get:function(){return"Edit Folder Images"}},{key:"template",get:function(){return Z()}},{key:"channelName",get:function(){return b.N0.generateUniqueChannelName(this)}},{key:"regions",value:function(){return{content:{el:".content-region",replaceElement:!0}}}},{key:"events",value:function(){return{"click .back-btn":"onClickBackButton","shown.bs.modal":"renderCropper"}}},{key:"elements",get:function(){return{backBtn:".back-btn",cancelBtn:".cancel-btn"}}},{key:"behaviors",get:function(){return[{title:"Edit folder images",behaviorClass:s.Yw,size:"modal-lg",buttons:[{text:"Back",className:"btn btn-outline-dark back-btn ".concat(H)}],spinnerButtonOptions:{model:this.spinnerModel=new d.v((e={},t=f.ZV.Hidden,n=!0,(t=Q(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e)),channelName:this.channelName,buttonText:"Continue",onClick:this.onClickCrop,extraButtonClass:"btn-dark"},cancelButtonOptions:{className:"btn btn-dark cancel-btn",text:"Close"}}];var e,t,n}},{key:"requiredResources",get:function(){return{config:g.p.config}}},{key:"bindListeners",value:function(){var e=this;this.listenTo(h.Vk.LIBRARY,"".concat(h.M_.FOLDER,":").concat(this.options.folderId,":sync"),this.render);var t="".concat(this.channelName,":").concat(m.__.Banners),n="".concat(this.channelName,":").concat(m.__.Thumbnails);this.listenTo(t,"select:image",(function(t){return e.onSelectImage(t,m.__.Banners)})),this.listenTo(n,"select:image",(function(t){return e.onSelectImage(t,m.__.Thumbnails)})),this.listenTo(t,"show:dialog",(function(){return e.onShowDialog(m.__.Banners)})),this.listenTo(n,"show:dialog",(function(){return e.onShowDialog(m.__.Thumbnails)})),this.listenTo(t,"image:error",(function(){return e.triggerMethod("hide")})),this.listenTo(n,"image:error",(function(){return e.triggerMethod("hide")})),this.listenTo(this.channelName,p.Y.ImageCropped,this.onImageCropped)}},{key:"onClickBackButton",value:function(){this.popupContentState!==L.Upload&&(this.popupContentState=L.Upload,this.selectedImageType=null,this.newImageEl=null,this.spinnerModel.set(f.ZV.Disabled,!0),this.renderContent())}},{key:"onClickCrop",value:function(){r.Radio.channel(this.channelName).trigger(p.Y.CropImage).trigger(f.I3.ShowSpinner)}},{key:"onSelectImage",value:function(e,t){this.selectedImageType=t,this.newImageEl=new Image,this.newImageEl.src=e,this.popupContentState=L.Crop,this.spinnerModel.set(f.ZV.Disabled,!1),this.renderCropper()}},{key:"onImageCropped",value:function(e){var t=this;this.imageUploadDataService.uploadBase64Image(e,this.selectedImageType,(function(e){return t.onImageUploaded(e)}))}},{key:"onImageUploaded",value:function(e){var t=this,n={libraryId:this.libraryId,folderId:this.options.folderId,currentImageId:this.getCurrentImageId(),imageModel:e},r=this.selectedImageType===m.__.Banners?c.py.Banner:c.py.Thumbnail,o=this.selectedImageType===m.__.Banners?"addOrUpdateBanner":"addOrUpdateThumbnail";this.libraryDataService[o](n,(function(e){u.k.logUserAction({libraryId:t.libraryId,folderId:t.options.folderId,id:e.get("id")},{actionType:c.Vw.Upload,entity:r,workflowPhase:c.eu.Complete,location:c.LZ.Popup}),t.onFinish()}))}},{key:"onShowDialog",value:function(e){var t=this,n=new b.Mr({title:"Remove image?",text:"Are you sure you want to remove this image?",buttons:[{text:"Remove",className:"btn btn-danger",success:!0},{text:"Cancel",className:"btn btn-link",close:!0}],channelName:this.options.channelName});setTimeout((function(){return n.render().done((function(){return t.removeImage(e)}))}),200),this.triggerMethod("hide")}},{key:"removeImage",value:function(e){var t=this,n=e===m.__.Banners?"deleteBanner":"deleteThumbnail",r=e===m.__.Banners?this.currentBanner:this.currentThumbnail,o={libraryId:this.libraryId,folderId:this.model.get("id"),imageId:r.get("id")},i=e===m.__.Banners?c.py.Banner:c.py.Thumbnail;this.libraryDataService[n](o,(function(){u.k.logUserAction({libraryId:t.libraryId,folderId:t.model.get("id"),id:r.get("id")},{actionType:c.Vw.Delete,entity:i,workflowPhase:c.eu.Complete,location:c.LZ.Popup}),e===m.__.Banners&&(t.currentBanner=null),e===m.__.Thumbnails&&(t.currentThumbnail=null),t.onFinish()}))}},{key:"onFinish",value:function(){this.viewModel.clear(),l.Q.C$.trigger({application:h.OV.LIBRARY_EDITOR,action:h.eX.LibraryEditor.EDIT_FOLDER_IMAGES,args:[this.options.folderId]})}},{key:"getCurrentImageId",value:function(){return this.selectedImageType===m.__.Banners&&this.currentBanner?this.currentBanner.get("id"):this.selectedImageType===m.__.Thumbnails&&this.currentThumbnail?this.currentThumbnail.get("id"):void 0}},{key:"getCropRegionWidth",value:function(){return this.$el.find(".modal-body").width()}},{key:"getImageModel",value:function(){return new y.E({dataUrl:this.newImageEl.src,width:this.newImageEl.width,height:this.newImageEl.height})}},{key:"renderContent",value:function(){this.popupContentState===L.Upload&&(this.getUI("backBtn").addClass(H),this.getUI("cancelBtn").removeClass(H),r.Radio.channel(this.channelName).trigger(f.I3.HideButton),this.showChildView("content",new F({imageCdnUrl:this.config.get("imageCdnUrl"),folderName:this.model.get("name"),bannerImage:this.currentBanner,thumbnailImage:this.currentThumbnail,bannerChannel:"".concat(this.channelName,":").concat(m.__.Banners),thumbnailChannel:"".concat(this.channelName,":").concat(m.__.Thumbnails),folderId:this.options.folderId})))}},{key:"renderCropper",value:function(){this.popupContentState===L.Crop&&(this.getUI("backBtn").removeClass(H),this.getUI("cancelBtn").addClass(H),r.Radio.channel(this.channelName).trigger(f.I3.ShowButton),this.showChildView("content",new p.a({model:this.getImageModel(),channelName:this.channelName,imageType:this.selectedImageType,minWidth:h.yE[this.selectedImageType].width,minHeight:h.yE[this.selectedImageType].height,getCropRegionWidth:o.bind(this.getCropRegionWidth,this)})))}},{key:"viewOptions",value:function(){return{dataFetched:!!this.model&&!!this.libraryId,spinnerEl:b.Kp.getSpinner({size:b.Ey.Large,extraClasses:"mx-auto"})}}},{key:"onBeforeRender",value:function(){var e=this;this.model&&this.libraryId||(this.model=this.libraryDataService.getFolder(this.options.folderId),this.libraryDataService.getLibraries((function(t){return e.libraryId=t.first().id})))}},{key:"onRender",value:function(){this.model&&this.libraryId&&(this.currentBanner=this.model.get("banner"),this.currentThumbnail=this.model.get("thumbnail"),this.renderContent())}},{key:"onBeforeDestroy",value:function(){this.viewModel.clear()}}],v&&z(n.prototype,v),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,v}(l.Q.G7)},58025:function(e,t,n){"use strict";n.d(t,{Y:function(){return r},a:function(){return y}});var r,o=n(48088),i=n(51934),a=n.n(i),l=n(31647),u=n(91465),c=n.n(u);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 p(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,f(r.key),r)}}function f(e){var t=function(e){if("object"!=s(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=s(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==s(t)?t:t+""}function h(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(h=function(){return!!e})()}function m(e){return m=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},m(e)}function d(e,t){return d=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},d(e,t)}!function(e){e.ClickCrop="click:crop",e.CropImage="crop:image",e.ImageCropped="image:cropped"}(r||(r={}));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),function(e,t,n){return t=m(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,h()?Reflect.construct(t,n||[],m(e).constructor):t.apply(e,n))}(this,t,[e])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&d(e,t)}(t,e),n=t,(i=[{key:"initialize",value:function(){this.listenTo(this.options.channelName,r.CropImage,this.crop)}},{key:"name",get:function(){return"ImageCropperComponent"}},{key:"template",get:function(){return c()}},{key:"className",get:function(){return"text-center"}},{key:"elements",get:function(){return{image:".img"}}},{key:"getMinCropBoxWidth",value:function(){return this.options.minWidth*this.getViewportToImageRatio()}},{key:"getMinCropBoxHeight",value:function(){return this.options.minHeight*this.getViewportToImageRatio()}},{key:"getViewportToImageRatio",value:function(){return this.options.getCropRegionWidth()/this.model.get("width")}},{key:"crop",value:function(){var e=this.cropper.getCroppedCanvas().toDataURL(this.getImageMimeType());o.Radio.channel(this.options.channelName).trigger(r.ImageCropped,e)}},{key:"getImageMimeType",value:function(){var e=this.model.get("dataUrl").match(/data:([a-zA-Z0-9]+\/[a-zA-Z0-9-.+]+).*,.*/);if(e)return e[1]}},{key:"renderCropper",value:function(){this.getMinCropBoxWidth();var e=this.getUI("image").get(0);this.cropper=new(a())(e,{viewMode:1,aspectRatio:this.options.minWidth/this.options.minHeight,minCropBoxWidth:this.getMinCropBoxWidth(),minCropBoxHeight:this.getMinCropBoxHeight(),autoCropArea:1})}},{key:"onRender",value:function(){this.renderCropper()}},{key:"onBeforeDestroy",value:function(){this.cropper.destroy()}}])&&p(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,i}(l.Q.wA)},67670:function(e,t,n){"use strict";n.d(t,{v:function(){return f}});var r=n(31647),o=n(88172);function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function a(e,t,n){return(t=u(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,u(r.key),r)}}function u(e){var t=function(e){if("object"!=i(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==i(t)?t:t+""}function c(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(c=function(){return!!e})()}function s(e){return s=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},s(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),function(e,t,n){return t=s(t),function(e,t){if(t&&("object"==i(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,c()?Reflect.construct(t,n||[],s(e).constructor):t.apply(e,n))}(this,t,arguments)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&p(e,t)}(t,e),n=t,(r=[{key:"defaults",value:function(){return a(a({},o.ZV.Disabled,!0),o.ZV.Hidden,!1)}}])&&l(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(r.Q.Hn)},86983:function(e,t,n){var r=n(32227);e.exports=(r.default||r).template({1:function(e,t,n,r,o){var i;return e.propertyIsEnumerable," "+e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"minimumRecommended",{name:"lang",hash:{height:null!=(i=null!=(i=null!=t?t.options:t)?i.recommendedDimensions:i)?i.height:i,width:null!=(i=null!=(i=null!=t?t.options:t)?i.recommendedDimensions:i)?i.width:i},data:o}))+"\n"},3:function(e,t,n,r,o){var i;return e.propertyIsEnumerable," "+e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"minimumActual",{name:"lang",hash:{height:null!=(i=null!=(i=null!=t?t.options:t)?i.dimensions:i)?i.height:i,width:null!=(i=null!=(i=null!=t?t.options:t)?i.dimensions:i)?i.width:i},data:o}))+"\n"},5:function(e,t,n,r,o){e.propertyIsEnumerable;var i,a=e.lambda,l=e.escapeExpression;return'<button class="'+l(a(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.removeImage:i,t))+'">'+l((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"remove",{name:"lang",hash:{},data:o}))+" "+l(a(null!=(i=null!=t?t.options:t)?i.imageTypeText:i,t))+"</button>\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){e.propertyIsEnumerable;var i,a=null!=t?t:e.nullContext||{},l=e.hooks.helperMissing,u=e.escapeExpression,c=e.lambda;return'<h6 class="mb-0">'+u((n.lang||t&&t.lang||l).call(a,"edit",{name:"lang",hash:{},data:o}))+" "+u(c(null!=(i=null!=t?t.options:t)?i.imageTypeText:i,t))+'</h6>\n<div class="text-secondary mb-1">\n <em>\n'+(null!=(i=n.if.call(a,null!=(i=null!=t?t.options:t)?i.recommendedDimensions:i,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.program(3,o,0),data:o}))?i:"")+' </em>\n</div>\n<div class="my-1 '+u(c(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.imageContainer:i,t))+'">\n <div class="'+u(c(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.imageElement:i,t))+" "+u(c(null!=(i=null!=t?t.options:t)?i.backgroundColor:i,t))+'" style="background-image: url(\''+u(c(null!=(i=null!=t?t.options:t)?i.imageUrl:i,t))+'\')"></div>\n</div>\n<button class="btn btn-outline-dark my-1">'+u((n.lang||t&&t.lang||l).call(a,"upload",{name:"lang",hash:{},data:o}))+" "+u(c(null!=(i=null!=t?t.options:t)?i.imageTypeText:i,t))+"</button>\n"+(null!=(i=n.if.call(a,null!=(i=null!=t?t.options:t)?i.hasImage:i,{name:"if",hash:{},fn:e.program(5,o,0),inverse:e.noop,data:o}))?i:"")},useData:!0})},80322:function(e,t,n){var r=n(32227);e.exports=(r.default||r).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){return'<div class="thumbnail-region"></div>\n<div class="dropdown-divider"></div>\n<div class="banner-region"></div>'},useData:!0})},42687:function(e,t,n){var r=n(32227);e.exports=(r.default||r).template({1:function(e,t,n,r,o){return'<div class="content-region"></div>\n'},3:function(e,t,n,r,o){var i;return e.propertyIsEnumerable,(null!=(i=e.lambda(null!=(i=null!=t?t.options:t)?i.spinnerEl:i,t))?i:"")+"\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var i;return e.propertyIsEnumerable,null!=(i=n.if.call(null!=t?t:e.nullContext||{},null!=(i=null!=t?t.options:t)?i.dataFetched:i,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.program(3,o,0),data:o}))?i:""},useData:!0})},91465:function(e,t,n){var r=n(32227);e.exports=(r.default||r).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var i;return e.propertyIsEnumerable,'<img src="'+e.escapeExpression("function"==typeof(i=null!=(i=n.dataUrl||(null!=t?t.dataUrl:t))?i:e.hooks.helperMissing)?i.call(null!=t?t:e.nullContext||{},{name:"dataUrl",hash:{},data:o}):i)+'" class="img img-fluid" />'},useData:!0})}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[2482],{59054:function(e,t,r){"use strict";var n;r.d(t,{f:function(){return n}}),function(e){e.Share="share",e.MasterObject="masterobject"}(n||(n={}))},61519:function(e,t,r){"use strict";r.r(t),r.d(t,{SearchView:function(){return te}});var n=r(48088),i=r(39479),o=r(21679),a=r(57857),c=r(99249),s=r(31647),u=r(11543),l=r(59054),f=r(47022),h=r(33303),y=r(70763),p=r(57098),d=r(21251),g=r(33800),v=r(51174),b=r(48404),m=r(64649),S=r(19226),w=r(95061),C=r(13809),O=r(80867),k=r(29457),P=r(96605),E=r.n(P);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 R(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,V(n.key),n)}}function V(e){var t=function(e){if("object"!=j(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=j(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==j(t)?t:t+""}function M(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(M=function(){return!!e})()}function _(e){return _=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},_(e)}function T(e,t){return T=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},T(e,t)}var D=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,r){return t=_(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,M()?Reflect.construct(t,r||[],_(e).constructor):t.apply(e,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&&T(e,t)}(t,e),r=t,(n=[{key:"name",get:function(){return"SearchResultsComponent"}},{key:"template",get:function(){return E()}},{key:"lang",get:function(){return"search.searchResults"}},{key:"className",get:function(){return"bg-white"}},{key:"regions",value:function(){return{results:{replaceElement:!0,el:".results-region",partialLoading:k.LP.VideoList}}}},{key:"onBeforeRender",value:function(){return!!this.collection}},{key:"onRender",value:function(){var e=new O.Y({collection:this.collection,videosWithMetadata:this.options.videosWithMetadata,application:p.OV.SEARCH,videoItemComponentType:C.UC.Search,collectionIdentifier:null,config:this.options.config,emptyStateType:k.ub.Search,emptyStateOptions:{heading:a.T.getPhrase(this.lang,"emptyStateHeading",{query:this.options.query}),description:a.T.getPhrase(this.lang,"emptyStateDescription")},collectionViewChannel:this.options.collectionViewChannel,customerHasExchange:this.options.customerHasExchange,currentUser:this.options.currentUser,playerApiUrl:this.options.playerApiUrl,createViewKey:this.options.createViewKey,hasCursors:this.options.hasCursors,showEmptyState:!0,libraries:this.options.libraries,products:this.options.products});this.showChildView("results",e)}}])&&R(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(s.Q.wA),I=r(8614),q=r(15709),x=r.n(q);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 F(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,H(n.key),n)}}function H(e){var t=function(e){if("object"!=A(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=A(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==A(t)?t:t+""}function N(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(N=function(){return!!e})()}function Q(e){return Q=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Q(e)}function U(e,t){return U=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},U(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),function(e,t,r){return t=Q(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,N()?Reflect.construct(t,r||[],Q(e).constructor):t.apply(e,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&&U(e,t)}(t,e),r=t,(n=[{key:"name",get:function(){return"SearchHeaderComponent"}},{key:"template",get:function(){return x()}},{key:"lang",get:function(){return"search.searchHeader"}},{key:"className",get:function(){return"bg-white border-bottom p-3"}},{key:"regions",value:function(){return{filters:{el:".filters-region",replaceElement:!0}}}},{key:"renderFilters",value:function(){var e=new I.b5({collection:this.collection,channelName:this.options.channelName});this.showChildView("filters",e)}},{key:"onRender",value:function(){this.renderFilters()}}])&&F(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(s.Q.wA),B=r(21769),K=r(44937),L=r(5344),z=r(28434),G=r.n(z);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 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,Z(n.key),n)}}function Z(e){var t=function(e){if("object"!=J(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=J(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==J(t)?t:t+""}function $(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return($=function(){return!!e})()}function Y(e){return Y=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Y(e)}function ee(e,t){return ee=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ee(e,t)}var te=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,r){return t=Y(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,$()?Reflect.construct(t,r||[],Y(e).constructor):t.apply(e,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&&ee(e,t)}(t,e),r=t,C=[{key:"initialize",value:function(){this.initializeQuery(),this.bindListeners(),this.contextualSearchService=o.u.getInstance(u.D.ContextualSearch,this),this.searchDataService=o.u.getInstance(u.Z.Search,this),this.videoDataService=o.u.getInstance(g.O.Video,this),this.ratingsDataService=o.u.getInstance(g.O.Ratings,this),this.playerDataService=o.u.getInstance(g.O.Player,this),this.videoMixinService=o.u.getInstance(g.K.VideoMixin,this),this.collectionIdentifier=new h.J(Object.assign({collectionPrefix:d.M.SEARCH_VIDEOS},this.options.queryParams)),this.createViewKey=this.createViewKey.bind(this)}},{key:"initializeQuery",value:function(){this.queryModel=this.getSearchModel()}},{key:"bindListeners",value:function(){this.listenTo(p.Vk.RATINGS,"".concat(d.M.RATINGS,":sync"),this.render),this.listenTo(p.Vk.RESTRICTED_VIDEO,"".concat(d.M.RESTRICTED_OBJECTS,":").concat(d.M.SEARCH_VIDEOS,":invalidate"),this.updateRestrictedVideos),this.listenTo(this.channelName,p.Vy.Filters.FILTER_CHANGED,i.debounce(this.onFilterChange,100)),this.listenTo(this.channelName,"fetch:video:with:metadata",this.fetchVideoWithMetadata),this.listenTo(B.I.TagFilter,"change:relevant:tags",this.updateSearchResults)}},{key:"name",get:function(){return"SearchView"}},{key:"title",get:function(){return a.T.getPhrase(this.lang,"title")}},{key:"lang",get:function(){return"search.search"}},{key:"template",get:function(){return G()}},{key:"className",get:function(){return"bg-white rounded"}},{key:"channelName",get:function(){return"".concat(this.name).concat(this.cid)}},{key:"regions",value:function(){return{header:{replaceElement:!0,el:".header-region"},results:{replaceElement:!0,el:".results-region"},pagination:{el:".pagination-region",replaceElement:!0}}}},{key:"getSearchModel",value:function(){return c.r.get("search",{ctor:K.AE})}},{key:"fetchSearchData",value:function(){this.ratings=this.ratingsDataService.getAllRatings(),this.ratings&&!this.filterCollection&&this.initializeFilterCollection()}},{key:"initializeFilterCollection",value:function(){this.filterCollection=L.qr.getFilterCollection(this.sources,this.ratings),this.setQueryParams()}},{key:"setQueryParams",value:function(){L.yf.setQueryParams(Object.assign(Object.assign({},this.options.queryParams),this.getContextParams()),this.queryModel,this.filterCollection)}},{key:"getContextParams",value:function(){if(!this.queryModel.get("query"))return n.Radio.channel(p.jr.CONTEXTUAL_SEARCH).trigger("reset:search:context"),{};var e,t,r,i=this.contextualSearchService.getSearchContext();return i&&i.get("filterParam")?(e={},t=i.get("filterParam"),r=i.get("filterValue"),(t=Z(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e):{}}},{key:"createViewKey",value:function(e,t){this.playerDataService.createViewKey(e,l.f.MasterObject,t)}},{key:"onFilterChange",value:function(){s.Q.C$.trigger({application:p.OV.SEARCH,action:p.eX.Search.HOME,params:L.yf.getRouteQueryParams(this.queryModel,this.filterCollection,this.sources)})}},{key:"setVideosWithMetadata",value:function(){this.resultCollection&&!this.videosWithMetadata&&(this.videosWithMetadata=new y.t(this.resultCollection.map((function(e){return(0,v.Z)({id:e.get("id"),typeId:e.get("typeId")})}))))}},{key:"updateSearchResults",value:function(){var e=this;this.resultCollection=null,this.renderResults(),this.queryString=L.yf.getQueryString(this.queryModel,this.filterCollection,this.sources,this.collectionIdentifier.cursor);var t=function(){return s.Q.C$.trigger({application:p.OV.SEARCH,action:p.eX.Search.HOME,params:L.yf.getRouteQueryParams(e.queryModel,e.filterCollection,e.sources)})};this.queryString?this.searchDataService.searchVideos(this.queryString,this.collectionIdentifier,t):t()}},{key:"renderHeader",value:function(){var e=new W({collection:this.filterCollection,channelName:this.channelName});this.showChildView("header",e)}},{key:"renderResults",value:function(){var e=this.videoDataService.getVideoCollectionCursors(this.collectionIdentifier),t=new D({collection:this.resultCollection,videosWithMetadata:this.videosWithMetadata,config:this.config,collectionViewChannel:this.channelName,customerHasExchange:this.exchanges.any(),currentUser:this.currentUser,playerApiUrl:this.config.get("playerApiUrl"),createViewKey:this.createViewKey,hasCursors:!!e,libraries:this.sources,query:this.queryModel.get("query"),products:this.products});this.showChildView("results",t)}},{key:"renderPagination",value:function(){if(this.resultCollection&&this.resultCollection.length){var e=this.videoDataService.getVideoCollectionCursors(this.collectionIdentifier),t=new f.Q({cursors:e,appLink:{application:p.OV.SEARCH,action:p.eX.Search.HOME,params:L.yf.getRouteQueryParams(this.queryModel,this.filterCollection,this.sources)}});this.showChildView("pagination",t)}}},{key:"fetchResults",value:function(){var e=this;if(this.filterCollection){this.queryString=L.yf.getQueryString(this.queryModel,this.filterCollection,this.sources,this.collectionIdentifier.cursor);var t=L.yf.getDynamicFilterQueryString(this.queryModel,this.filterCollection);if(this.dynamicFiltersFetched||this.searchDataService.getDynamicFilters(t,(function(t){e.dynamicFiltersFetched||(e.filterCollection.add(t.toJSON(),{merge:!0}),e.dynamicFiltersFetched=!0,e.render())})),!this.resultCollection){var r=function(t){e.resultCollection=t,e.setVideosWithMetadata(),e.render()};this.queryString?this.searchDataService.searchVideos(this.queryString,this.collectionIdentifier,r):r(new y.t([]))}}}},{key:"fetchVideoWithMetadata",value:function(e,t){var r=this;this.videoDataService.getUnionVideo(e,t,(function(t){var n=r.videosWithMetadata.get(e);n&&(n.set(t.toJSON()),n.set({dataFetched:!0}))}))}},{key:"updateRestrictedVideos",value:function(){var e=this;this.videoMixinService.getAndMixinVideoCollectionRestrictions(this.resultCollection,this.collectionIdentifier,(function(){return e.render()}))}},{key:"requiredResources",get:function(){return{config:b.p.config,sources:w.T.libraries,exchanges:w.T.exchanges,currentUser:S.K.currentUser,products:m.s.products}}},{key:"onBeforeRender",value:function(){return this.fetchSearchData(),this.fetchResults(),!0}},{key:"onRender",value:function(){this.renderHeader(),this.renderResults(),this.renderPagination()}},{key:"onBeforeDestroy",value:function(){this.queryModel.clear()}}],C&&X(r.prototype,C),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,C}(s.Q.G7)},13809:function(e,t,r){"use strict";r.d(t,{UC:function(){return n.U}});var n=r(58688);r(19969),r(14898)},96605:function(e,t,r){var n=r(32227);e.exports=(n.default||n).template({compiler:[8,">= 4.3.0"],main:function(e,t,r,n,i){return'<div class="results-region"></div>'},useData:!0})},15709:function(e,t,r){var n=r(32227);e.exports=(n.default||n).template({compiler:[8,">= 4.3.0"],main:function(e,t,r,n,i){return e.propertyIsEnumerable,"<h3>"+e.escapeExpression((r.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"header",{name:"lang",hash:{},data:i}))+'</h3>\n<div class="filters-region"></div>'},useData:!0})},28434:function(e,t,r){var n=r(32227);e.exports=(n.default||n).template({compiler:[8,">= 4.3.0"],main:function(e,t,r,n,i){return'<div class="header-region"></div>\n<div class="results-region"></div>\n<div class="pagination-region"></div>'},useData:!0})}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[259],{86257:function(e,t,n){"use strict";var r;n.d(t,{L:function(){return r}}),function(e){e.Pdf="pdf",e.Image="image",e.PowerPoint="powerpoint",e.Document="document",e.Excel="excel",e.Zip="archive",e.File="text"}(r||(r={}))},21974:function(e,t,n){"use strict";n.d(t,{u:function(){return s}});var r=n(57857),o=n(75459),i=n(86257),u=n(85475);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,n){return(t=function(e){var t=function(e){if("object"!=a(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.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+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var c="shared.shared-utils",s={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,t){switch(e.type){case o.r.HostedLibrary:case o.r.CustomLibrary:return e.name;case o.r.Exchange:return r.T.getPhrase(c,"exchange");case o.r.Workspace:return r.T.getPhrase(c,t?"myVideos":"workspace");default:return""}},mapSourceToClass:function(e){switch(e){case o.r.HostedLibrary:case o.r.CustomLibrary:return"bg-blue";case o.r.Exchange:return"bg-green";case o.r.Workspace:default:return"bg-red"}},isInteractive:function(e){var t,n;return!!(null===(n=null===(t=null==e?void 0:e.interactives)||void 0===t?void 0:t.data)||void 0===n?void 0:n.length)},mapTypeToSvg:function(e){var t=l(l(l(l(l(l(l({},i.L.Pdf,u.vn.FilePDF),i.L.Image,u.vn.FileImg),i.L.PowerPoint,u.vn.FilePowerpoint),i.L.Document,u.vn.FileWord),i.L.Excel,u.vn.FileExcel),i.L.Zip,u.vn.FileZip),i.L.File,u.vn.File)[e];return t||(t=u.vn.Folder),t},mapTypeToClass:function(e){switch(e){case i.L.Pdf:return"icon-red";case i.L.Image:return"icon-purple";case i.L.Document:return"icon-blue";case i.L.Excel:return"icon-green";case i.L.PowerPoint:return"icon-orange";case i.L.Zip:return"icon-teal";case i.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 i.L.Pdf:return r.T.getPhrase(c,"pdf");case i.L.Image:return r.T.getPhrase(c,"image");case i.L.Document:return r.T.getPhrase(c,"document");case i.L.Excel:return r.T.getPhrase(c,"spreadsheet");case i.L.PowerPoint:return r.T.getPhrase(c,"presentation");case i.L.Zip:return r.T.getPhrase(c,"zipArchive");case i.L.File:return r.T.getPhrase(c,"file");default:return""}}}},68708:function(e,t,n){"use strict";n.d(t,{c:function(){return R}});var r=n(31647),o=n(43823),i=n(57857),u=n(52076),a=n(70065),l=n(85475),c=n(57098),s=n(93569),p=n(76431),f=n.n(p),y={container:"vvTSf"};function d(e){return d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},d(e)}function m(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,b(r.key),r)}}function b(e){var t=function(e){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(t)?t:t+""}function h(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(h=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 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),function(e,t,n){return t=v(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,h()?Reflect.construct(t,n||[],v(e).constructor):t.apply(e,n))}(this,t,[e])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&g(e,t)}(t,e),n=t,(r=[{key:"name",get:function(){return"LinkItemComponent"}},{key:"template",get:function(){return f()}},{key:"className",get:function(){return"".concat(y.container," rounded p-2 mb-2 d-flex align-items-center")}},{key:"lang",get:function(){return"libraryEditor.editLinks"}},{key:"attributes",get:function(){return{title:this.model.get("name")}}},{key:"events",value:function(){return{"click .delete":"onClickDelete","click .edit":"onClickEdit"}}},{key:"appLinks",get:function(){return{".edit":{application:c.OV.LIBRARY_EDITOR,action:c.eX.LibraryEditor.EDIT_LINK,args:[this.options.videoId,this.model.get("id")]}}}},{key:"onClickEdit",value:function(){var e=u.k.mergeOptions(this.options.analyticsOptions,{actionType:a.Vw.Edit,entity:a.py.Resource,workflowPhase:a.eu.Start}),t={id:this.model.get("id"),parentId:+this.options.videoId};u.k.logUserAction(t,e)}},{key:"onClickDelete",value:function(){var e=this;new s.Mr({title:i.T.getPhrase(this.lang,"removeHeading"),text:i.T.getPhrase(this.lang,"removeConfirm",{name:s.m$.escapeExpression(this.model.get("name"))}),buttons:[{text:i.T.getPhrase(this.lang,"remove"),className:"btn btn-danger",success:!0},{text:i.T.getPhrase(this.lang,"cancel"),className:"btn btn-outline-dark",close:!0}],channelName:s.N0.generateUniqueChannelName(this)}).render().done((function(){o.Radio.channel(e.options.channelName).trigger("delete:link",e.model.get("id"))}))}},{key:"viewOptions",value:function(){return{styles:y,editable:this.options.editable,linkSvg:l.Nj.getSvg(l.vn.Link),editSvg:l.Nj.getSvg(l.vn.Edit),trashSvg:l.Nj.getSvg(l.vn.Delete)}}}])&&m(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(r.Q.wA),k=n(52929),O=n.n(k);function P(e){return P="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},P(e)}function T(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function S(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,j(r.key),r)}}function E(e,t,n){return t&&S(e.prototype,t),n&&S(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function j(e){var t=function(e){if("object"!=P(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=P(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==P(t)?t:t+""}function x(e,t,n){return t=_(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,C()?Reflect.construct(t,n||[],_(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 _(e){return _=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},_(e)}function L(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)}function I(e,t){return I=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},I(e,t)}var R=function(e){function t(e){return T(this,t),x(this,t,[e])}return L(t,e),E(t,[{key:"name",get:function(){return"VideoLinksComponent"}},{key:"template",get:function(){return O()}},{key:"className",get:function(){return this.options.customCollection?"":"py-3 border-top"}},{key:"regions",value:function(){return{links:{el:".links-region",replaceElement:!0}}}},{key:"viewOptions",value:function(){return this.options}},{key:"onRender",value:function(){this.showChildView("links",new N({collection:this.options.customCollection||this.model.get("links"),channelName:this.options.channelName,analyticsOptions:this.options.analyticsOptions,editable:this.options.editable,videoId:this.options.videoId,headingText:this.options.headingText,emptyStateText:this.options.emptyStateText}))}}])}(r.Q.wA),N=function(e){function t(e){return T(this,t),x(this,t,[e])}return L(t,e),E(t,[{key:"name",get:function(){return"LinkItemComponentCollection"}},{key:"childViewOptions",get:function(){return this.options}},{key:"childView",get:function(){return w}}])}(r.Q.$W)},77605:function(e,t,n){"use strict";n.d(t,{c:function(){return F},h:function(){return D}});var r=n(43823),o=n(57857),i=n(31647),u=n(53808),a=n(52076),l=n(70065),c=n(85475),s=n(21974),p=n(95117),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 r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,m(r.key),r)}}function m(e){var t=function(e){if("object"!=y(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=y(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==y(t)?t:t+""}function b(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(b=function(){return!!e})()}function h(e){return h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},h(e)}function v(e,t){return v=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},v(e,t)}var g=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=h(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,b()?Reflect.construct(t,n||[],h(e).constructor):t.apply(e,n))}(this,t,[e])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&v(e,t)}(t,e),n=t,(r=[{key:"name",get:function(){return"ResourceItemComponent"}},{key:"template",get:function(){return f()}},{key:"className",get:function(){return"".concat("CdlNn"," rounded p-2 mb-2")}},{key:"events",value:function(){return{"click .delete":"onClickDelete","click .edit":"onClickEdit"}}},{key:"appLinks",get:function(){return{".edit":this.options.getEditAppLink(this.model.get("id"))}}},{key:"onClickEdit",value:function(){var e=a.k.mergeOptions(this.options.analyticsOptions,{actionType:l.Vw.Edit,entity:l.py.Resource,workflowPhase:l.eu.Start}),t={id:this.model.get("id"),parentId:+this.options.videoId};a.k.logUserAction(t,e)}},{key:"onClickDelete",value:function(){u.q.isFunction(this.options.onClickDelete)&&this.options.onClickDelete(this.model)}},{key:"viewOptions",value:function(){var e=this.model.get("metadata"),t=e?e.type:"";return{editable:this.options.editable,extension:s.u.mapTypeToExtension(t),svg:c.Nj.getSvg(s.u.mapTypeToSvg(t)),iconClass:s.u.mapTypeToClass(t),resourceType:s.u.mapTypeToName(t),editSvg:c.Nj.getSvg(c.vn.Edit),trashSvg:c.Nj.getSvg(c.vn.Delete)}}}])&&d(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(i.Q.wA),w=n(41934),k=n(25094),O=n(54758),P=n(99114),T=n.n(P);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 E(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function j(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,C(r.key),r)}}function x(e,t,n){return t&&j(e.prototype,t),n&&j(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function C(e){var t=function(e){if("object"!=S(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=S(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==S(t)?t:t+""}function _(e,t,n){return t=I(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,L()?Reflect.construct(t,n||[],I(e).constructor):t.apply(e,n))}function L(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(L=function(){return!!e})()}function I(e){return I=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},I(e)}function R(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&N(e,t)}function N(e,t){return N=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},N(e,t)}var D=function(e){function t(e){return E(this,t),_(this,t,[e])}return R(t,e),x(t,[{key:"name",get:function(){return"VideoResourcesComponentCollection"}},{key:"className",get:function(){return"mt-3"}},{key:"lang",get:function(){return"libraryEditor.videoResources"}},{key:"childView",get:function(){return g}},{key:"childViewOptions",get:function(){var e=this;return{editable:this.options.editable,videoId:this.options.videoId,analyticsOptions:this.options.analyticsOptions,onClickDelete:function(t){return e.onClickDelete(t)},getEditAppLink:function(t){return{application:k.OV.LIBRARY_EDITOR,action:w.e.LibraryEditor.EDIT_RESOURCE,args:[e.options.videoId,t]}}}}},{key:"onClickDelete",value:function(e){var t=this;new O.M({title:o.T.getPhrase(this.lang,"removeHeading"),text:o.T.getPhrase(this.lang,"removeBody",{resourceName:e.get("name")}),buttons:[{text:o.T.getPhrase(this.lang,"remove"),className:"btn btn-danger",success:!0},{text:o.T.getPhrase(this.lang,"cancel"),className:"btn btn-outline-dark",close:!0}],channelName:"".concat(this.name).concat(this.cid)}).render().done((function(){r.Radio.channel(t.options.channelName).trigger("delete:resource",e.get("id"))}))}}])}(i.Q.$W),F=function(e){function t(e){return E(this,t),_(this,t,[e])}return R(t,e),x(t,[{key:"name",get:function(){return"VideoResourcesComponent"}},{key:"template",get:function(){return T()}},{key:"lang",get:function(){return"libraryEditor.videoResources"}},{key:"channelName",get:function(){return"".concat(this.name).concat(this.cid)}},{key:"className",get:function(){return this.options.customCollection?"":"py-3 border-top"}},{key:"regions",value:function(){return{resources:{replaceElement:!0,el:".resource-list-region"}}}},{key:"renderResources",value:function(){var e=new D({collection:this.options.customCollection||this.model.resources,editable:this.options.editable||!1,videoId:this.options.videoId||this.model.get("id"),channelName:this.options.parentChannelName||this.channelName});this.showChildView("resources",e)}},{key:"viewOptions",value:function(){return{resourcesHeadingText:this.options.headerText||o.T.getPhrase(this.lang,"heading"),emptyStateText:this.options.emptyStateText}}},{key:"onRender",value:function(){this.renderResources()}}])}(i.Q.wA)},95117:function(e,t,n){var r=n(31197);e.exports=(r.default||r).template({1:function(e,t,n,r,o){e.propertyIsEnumerable;var i,u=e.lambda;return'<a class="float-end svg-container cursor-pointer text-secondary delete">'+(null!=(i=u(null!=(i=null!=t?t.options:t)?i.trashSvg:i,t))?i:"")+'</a>\n<a class="float-end svg-container cursor-pointer text-secondary edit">'+(null!=(i=u(null!=(i=null!=t?t.options:t)?i.editSvg:i,t))?i:"")+"</a>\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){e.propertyIsEnumerable;var i,u,a=e.lambda,l=e.escapeExpression,c=null!=t?t:e.nullContext||{},s=e.hooks.helperMissing,p="function";return'<span title="'+l(a(null!=(i=null!=t?t.options:t)?i.resourceType:i,t))+'" class="d-inline-block align-middle me-2 svg-container '+l(a(null!=(i=null!=t?t.options:t)?i.iconClass:i,t))+'">'+(null!=(i=a(null!=(i=null!=t?t.options:t)?i.svg:i,t))?i:"")+'</span>\n<a href="'+l(typeof(u=null!=(u=n.url||(null!=t?t.url:t))?u:s)===p?u.call(c,{name:"url",hash:{},data:o}):u)+"?name="+l(typeof(u=null!=(u=n.name||(null!=t?t.name:t))?u:s)===p?u.call(c,{name:"name",hash:{},data:o}):u)+'" class="align-middle">\n '+l(typeof(u=null!=(u=n.name||(null!=t?t.name:t))?u:s)===p?u.call(c,{name:"name",hash:{},data:o}):u)+"\n</a>\n"+(null!=(i=n.if.call(c,null!=(i=null!=t?t.options:t)?i.editable:i,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o}))?i:"")},useData:!0})},76431:function(e,t,n){var r=n(31197);e.exports=(r.default||r).template({1:function(e,t,n,r,o){e.propertyIsEnumerable;var i,u=e.lambda;return' <a class="ms-auto me-1 svg-container cursor-pointer text-secondary edit">'+(null!=(i=u(null!=(i=null!=t?t.options:t)?i.editSvg:i,t))?i:"")+'</a>\n <a class="svg-container cursor-pointer text-secondary delete">'+(null!=(i=u(null!=(i=null!=t?t.options:t)?i.trashSvg:i,t))?i:"")+"</a>\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){e.propertyIsEnumerable;var i,u,a=null!=t?t:e.nullContext||{},l=e.hooks.helperMissing,c="function",s=e.escapeExpression;return'<span class="svg-container text-info me-2">'+(null!=(i=e.lambda(null!=(i=null!=t?t.options:t)?i.linkSvg:i,t))?i:"")+'</span>\n<a class="w-75 text-truncate" href="'+s(typeof(u=null!=(u=n.url||(null!=t?t.url:t))?u:l)===c?u.call(a,{name:"url",hash:{},data:o}):u)+'" target="_blank">'+s(typeof(u=null!=(u=n.name||(null!=t?t.name:t))?u:l)===c?u.call(a,{name:"name",hash:{},data:o}):u)+"</a>\n"+(null!=(i=n.if.call(a,null!=(i=null!=t?t.options:t)?i.editable:i,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o}))?i:"")},useData:!0})},52929:function(e,t,n){var r=n(31197);e.exports=(r.default||r).template({1:function(e,t,n,r,o){var i;return e.propertyIsEnumerable,"<p>"+e.escapeExpression(e.lambda(null!=(i=null!=t?t.options:t)?i.emptyStateText:i,t))+"</p>"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var i;return e.propertyIsEnumerable,"<h5>"+e.escapeExpression(e.lambda(null!=(i=null!=t?t.options:t)?i.headingText:i,t))+"</h5>\n"+(null!=(i=n.if.call(null!=t?t:e.nullContext||{},null!=(i=null!=t?t.options:t)?i.emptyStateText:i,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o}))?i:"")+'\n<div class="links-region"></div>'},useData:!0})},99114:function(e,t,n){var r=n(31197);e.exports=(r.default||r).template({1:function(e,t,n,r,o){var i;return e.propertyIsEnumerable,"<p>"+e.escapeExpression(e.lambda(null!=(i=null!=t?t.options:t)?i.emptyStateText:i,t))+"</p>"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var i;return e.propertyIsEnumerable,"<h5>"+e.escapeExpression(e.lambda(null!=(i=null!=t?t.options:t)?i.resourcesHeadingText:i,t))+"</h5>\n"+(null!=(i=n.if.call(null!=t?t:e.nullContext||{},null!=(i=null!=t?t.options:t)?i.emptyStateText:i,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o}))?i:"")+'\n<div class="resource-list-region"></div>'},useData:!0})}}]);
|
|
1
|
+
(self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[259],{86257:function(e,t,n){"use strict";var r;n.d(t,{L:function(){return r}}),function(e){e.Pdf="pdf",e.Image="image",e.PowerPoint="powerpoint",e.Document="document",e.Excel="excel",e.Zip="archive",e.File="text"}(r||(r={}))},21974:function(e,t,n){"use strict";n.d(t,{u:function(){return s}});var r=n(57857),o=n(75459),i=n(86257),u=n(63791);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,n){return(t=function(e){var t=function(e){if("object"!=a(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.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+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var c="shared.shared-utils",s={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,t){switch(e.type){case o.r.HostedLibrary:case o.r.CustomLibrary:return e.name;case o.r.Exchange:return r.T.getPhrase(c,"exchange");case o.r.Workspace:return r.T.getPhrase(c,t?"myVideos":"workspace");default:return""}},mapSourceToClass:function(e){switch(e){case o.r.HostedLibrary:case o.r.CustomLibrary:return"bg-blue";case o.r.Exchange:return"bg-green";case o.r.Workspace:default:return"bg-red"}},isInteractive:function(e){var t,n;return!!(null===(n=null===(t=null==e?void 0:e.interactives)||void 0===t?void 0:t.data)||void 0===n?void 0:n.length)},mapTypeToSvg:function(e){var t=l(l(l(l(l(l(l({},i.L.Pdf,u.vn.FilePDF),i.L.Image,u.vn.FileImg),i.L.PowerPoint,u.vn.FilePowerpoint),i.L.Document,u.vn.FileWord),i.L.Excel,u.vn.FileExcel),i.L.Zip,u.vn.FileZip),i.L.File,u.vn.File)[e];return t||(t=u.vn.Folder),t},mapTypeToClass:function(e){switch(e){case i.L.Pdf:return"icon-red";case i.L.Image:return"icon-purple";case i.L.Document:return"icon-blue";case i.L.Excel:return"icon-green";case i.L.PowerPoint:return"icon-orange";case i.L.Zip:return"icon-teal";case i.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 i.L.Pdf:return r.T.getPhrase(c,"pdf");case i.L.Image:return r.T.getPhrase(c,"image");case i.L.Document:return r.T.getPhrase(c,"document");case i.L.Excel:return r.T.getPhrase(c,"spreadsheet");case i.L.PowerPoint:return r.T.getPhrase(c,"presentation");case i.L.Zip:return r.T.getPhrase(c,"zipArchive");case i.L.File:return r.T.getPhrase(c,"file");default:return""}}}},68708:function(e,t,n){"use strict";n.d(t,{c:function(){return R}});var r=n(31647),o=n(48088),i=n(57857),u=n(52076),a=n(70065),l=n(63791),c=n(57098),s=n(93569),p=n(76431),f=n.n(p),y={container:"vvTSf"};function d(e){return d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},d(e)}function m(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,b(r.key),r)}}function b(e){var t=function(e){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(t)?t:t+""}function h(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(h=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 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),function(e,t,n){return t=v(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,h()?Reflect.construct(t,n||[],v(e).constructor):t.apply(e,n))}(this,t,[e])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&g(e,t)}(t,e),n=t,(r=[{key:"name",get:function(){return"LinkItemComponent"}},{key:"template",get:function(){return f()}},{key:"className",get:function(){return"".concat(y.container," rounded p-2 mb-2 d-flex align-items-center")}},{key:"lang",get:function(){return"libraryEditor.editLinks"}},{key:"attributes",get:function(){return{title:this.model.get("name")}}},{key:"events",value:function(){return{"click .delete":"onClickDelete","click .edit":"onClickEdit"}}},{key:"appLinks",get:function(){return{".edit":{application:c.OV.LIBRARY_EDITOR,action:c.eX.LibraryEditor.EDIT_LINK,args:[this.options.videoId,this.model.get("id")]}}}},{key:"onClickEdit",value:function(){var e=u.k.mergeOptions(this.options.analyticsOptions,{actionType:a.Vw.Edit,entity:a.py.Resource,workflowPhase:a.eu.Start}),t={id:this.model.get("id"),parentId:+this.options.videoId};u.k.logUserAction(t,e)}},{key:"onClickDelete",value:function(){var e=this;new s.Mr({title:i.T.getPhrase(this.lang,"removeHeading"),text:i.T.getPhrase(this.lang,"removeConfirm",{name:s.m$.escapeExpression(this.model.get("name"))}),buttons:[{text:i.T.getPhrase(this.lang,"remove"),className:"btn btn-danger",success:!0},{text:i.T.getPhrase(this.lang,"cancel"),className:"btn btn-outline-dark",close:!0}],channelName:s.N0.generateUniqueChannelName(this)}).render().done((function(){o.Radio.channel(e.options.channelName).trigger("delete:link",e.model.get("id"))}))}},{key:"viewOptions",value:function(){return{styles:y,editable:this.options.editable,linkSvg:l.Nj.getSvg(l.vn.Link),editSvg:l.Nj.getSvg(l.vn.Edit),trashSvg:l.Nj.getSvg(l.vn.Delete)}}}])&&m(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(r.Q.wA),k=n(52929),O=n.n(k);function P(e){return P="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},P(e)}function T(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function S(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,j(r.key),r)}}function E(e,t,n){return t&&S(e.prototype,t),n&&S(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function j(e){var t=function(e){if("object"!=P(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=P(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==P(t)?t:t+""}function x(e,t,n){return t=_(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,C()?Reflect.construct(t,n||[],_(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 _(e){return _=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},_(e)}function L(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)}function I(e,t){return I=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},I(e,t)}var R=function(e){function t(e){return T(this,t),x(this,t,[e])}return L(t,e),E(t,[{key:"name",get:function(){return"VideoLinksComponent"}},{key:"template",get:function(){return O()}},{key:"className",get:function(){return this.options.customCollection?"":"py-3 border-top"}},{key:"regions",value:function(){return{links:{el:".links-region",replaceElement:!0}}}},{key:"viewOptions",value:function(){return this.options}},{key:"onRender",value:function(){this.showChildView("links",new N({collection:this.options.customCollection||this.model.get("links"),channelName:this.options.channelName,analyticsOptions:this.options.analyticsOptions,editable:this.options.editable,videoId:this.options.videoId,headingText:this.options.headingText,emptyStateText:this.options.emptyStateText}))}}])}(r.Q.wA),N=function(e){function t(e){return T(this,t),x(this,t,[e])}return L(t,e),E(t,[{key:"name",get:function(){return"LinkItemComponentCollection"}},{key:"childViewOptions",get:function(){return this.options}},{key:"childView",get:function(){return w}}])}(r.Q.$W)},77605:function(e,t,n){"use strict";n.d(t,{c:function(){return F},h:function(){return D}});var r=n(48088),o=n(57857),i=n(31647),u=n(53808),a=n(52076),l=n(70065),c=n(63791),s=n(21974),p=n(95117),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 r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,m(r.key),r)}}function m(e){var t=function(e){if("object"!=y(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=y(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==y(t)?t:t+""}function b(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(b=function(){return!!e})()}function h(e){return h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},h(e)}function v(e,t){return v=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},v(e,t)}var g=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=h(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,b()?Reflect.construct(t,n||[],h(e).constructor):t.apply(e,n))}(this,t,[e])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&v(e,t)}(t,e),n=t,(r=[{key:"name",get:function(){return"ResourceItemComponent"}},{key:"template",get:function(){return f()}},{key:"className",get:function(){return"".concat("CdlNn"," rounded p-2 mb-2")}},{key:"events",value:function(){return{"click .delete":"onClickDelete","click .edit":"onClickEdit"}}},{key:"appLinks",get:function(){return{".edit":this.options.getEditAppLink(this.model.get("id"))}}},{key:"onClickEdit",value:function(){var e=a.k.mergeOptions(this.options.analyticsOptions,{actionType:l.Vw.Edit,entity:l.py.Resource,workflowPhase:l.eu.Start}),t={id:this.model.get("id"),parentId:+this.options.videoId};a.k.logUserAction(t,e)}},{key:"onClickDelete",value:function(){u.q.isFunction(this.options.onClickDelete)&&this.options.onClickDelete(this.model)}},{key:"viewOptions",value:function(){var e=this.model.get("metadata"),t=e?e.type:"";return{editable:this.options.editable,extension:s.u.mapTypeToExtension(t),svg:c.Nj.getSvg(s.u.mapTypeToSvg(t)),iconClass:s.u.mapTypeToClass(t),resourceType:s.u.mapTypeToName(t),editSvg:c.Nj.getSvg(c.vn.Edit),trashSvg:c.Nj.getSvg(c.vn.Delete)}}}])&&d(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(i.Q.wA),w=n(41934),k=n(25094),O=n(54758),P=n(99114),T=n.n(P);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 E(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function j(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,C(r.key),r)}}function x(e,t,n){return t&&j(e.prototype,t),n&&j(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function C(e){var t=function(e){if("object"!=S(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=S(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==S(t)?t:t+""}function _(e,t,n){return t=I(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,L()?Reflect.construct(t,n||[],I(e).constructor):t.apply(e,n))}function L(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(L=function(){return!!e})()}function I(e){return I=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},I(e)}function R(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&N(e,t)}function N(e,t){return N=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},N(e,t)}var D=function(e){function t(e){return E(this,t),_(this,t,[e])}return R(t,e),x(t,[{key:"name",get:function(){return"VideoResourcesComponentCollection"}},{key:"className",get:function(){return"mt-3"}},{key:"lang",get:function(){return"libraryEditor.videoResources"}},{key:"childView",get:function(){return g}},{key:"childViewOptions",get:function(){var e=this;return{editable:this.options.editable,videoId:this.options.videoId,analyticsOptions:this.options.analyticsOptions,onClickDelete:function(t){return e.onClickDelete(t)},getEditAppLink:function(t){return{application:k.OV.LIBRARY_EDITOR,action:w.e.LibraryEditor.EDIT_RESOURCE,args:[e.options.videoId,t]}}}}},{key:"onClickDelete",value:function(e){var t=this;new O.M({title:o.T.getPhrase(this.lang,"removeHeading"),text:o.T.getPhrase(this.lang,"removeBody",{resourceName:e.get("name")}),buttons:[{text:o.T.getPhrase(this.lang,"remove"),className:"btn btn-danger",success:!0},{text:o.T.getPhrase(this.lang,"cancel"),className:"btn btn-outline-dark",close:!0}],channelName:"".concat(this.name).concat(this.cid)}).render().done((function(){r.Radio.channel(t.options.channelName).trigger("delete:resource",e.get("id"))}))}}])}(i.Q.$W),F=function(e){function t(e){return E(this,t),_(this,t,[e])}return R(t,e),x(t,[{key:"name",get:function(){return"VideoResourcesComponent"}},{key:"template",get:function(){return T()}},{key:"lang",get:function(){return"libraryEditor.videoResources"}},{key:"channelName",get:function(){return"".concat(this.name).concat(this.cid)}},{key:"className",get:function(){return this.options.customCollection?"":"py-3 border-top"}},{key:"regions",value:function(){return{resources:{replaceElement:!0,el:".resource-list-region"}}}},{key:"renderResources",value:function(){var e=new D({collection:this.options.customCollection||this.model.resources,editable:this.options.editable||!1,videoId:this.options.videoId||this.model.get("id"),channelName:this.options.parentChannelName||this.channelName});this.showChildView("resources",e)}},{key:"viewOptions",value:function(){return{resourcesHeadingText:this.options.headerText||o.T.getPhrase(this.lang,"heading"),emptyStateText:this.options.emptyStateText}}},{key:"onRender",value:function(){this.renderResources()}}])}(i.Q.wA)},95117:function(e,t,n){var r=n(32227);e.exports=(r.default||r).template({1:function(e,t,n,r,o){e.propertyIsEnumerable;var i,u=e.lambda;return'<a class="float-end svg-container cursor-pointer text-secondary delete">'+(null!=(i=u(null!=(i=null!=t?t.options:t)?i.trashSvg:i,t))?i:"")+'</a>\n<a class="float-end svg-container cursor-pointer text-secondary edit">'+(null!=(i=u(null!=(i=null!=t?t.options:t)?i.editSvg:i,t))?i:"")+"</a>\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){e.propertyIsEnumerable;var i,u,a=e.lambda,l=e.escapeExpression,c=null!=t?t:e.nullContext||{},s=e.hooks.helperMissing,p="function";return'<span title="'+l(a(null!=(i=null!=t?t.options:t)?i.resourceType:i,t))+'" class="d-inline-block align-middle me-2 svg-container '+l(a(null!=(i=null!=t?t.options:t)?i.iconClass:i,t))+'">'+(null!=(i=a(null!=(i=null!=t?t.options:t)?i.svg:i,t))?i:"")+'</span>\n<a href="'+l(typeof(u=null!=(u=n.url||(null!=t?t.url:t))?u:s)===p?u.call(c,{name:"url",hash:{},data:o}):u)+"?name="+l(typeof(u=null!=(u=n.name||(null!=t?t.name:t))?u:s)===p?u.call(c,{name:"name",hash:{},data:o}):u)+'" class="align-middle">\n '+l(typeof(u=null!=(u=n.name||(null!=t?t.name:t))?u:s)===p?u.call(c,{name:"name",hash:{},data:o}):u)+"\n</a>\n"+(null!=(i=n.if.call(c,null!=(i=null!=t?t.options:t)?i.editable:i,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o}))?i:"")},useData:!0})},76431:function(e,t,n){var r=n(32227);e.exports=(r.default||r).template({1:function(e,t,n,r,o){e.propertyIsEnumerable;var i,u=e.lambda;return' <a class="ms-auto me-1 svg-container cursor-pointer text-secondary edit">'+(null!=(i=u(null!=(i=null!=t?t.options:t)?i.editSvg:i,t))?i:"")+'</a>\n <a class="svg-container cursor-pointer text-secondary delete">'+(null!=(i=u(null!=(i=null!=t?t.options:t)?i.trashSvg:i,t))?i:"")+"</a>\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){e.propertyIsEnumerable;var i,u,a=null!=t?t:e.nullContext||{},l=e.hooks.helperMissing,c="function",s=e.escapeExpression;return'<span class="svg-container text-info me-2">'+(null!=(i=e.lambda(null!=(i=null!=t?t.options:t)?i.linkSvg:i,t))?i:"")+'</span>\n<a class="w-75 text-truncate" href="'+s(typeof(u=null!=(u=n.url||(null!=t?t.url:t))?u:l)===c?u.call(a,{name:"url",hash:{},data:o}):u)+'" target="_blank">'+s(typeof(u=null!=(u=n.name||(null!=t?t.name:t))?u:l)===c?u.call(a,{name:"name",hash:{},data:o}):u)+"</a>\n"+(null!=(i=n.if.call(a,null!=(i=null!=t?t.options:t)?i.editable:i,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o}))?i:"")},useData:!0})},52929:function(e,t,n){var r=n(32227);e.exports=(r.default||r).template({1:function(e,t,n,r,o){var i;return e.propertyIsEnumerable,"<p>"+e.escapeExpression(e.lambda(null!=(i=null!=t?t.options:t)?i.emptyStateText:i,t))+"</p>"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var i;return e.propertyIsEnumerable,"<h5>"+e.escapeExpression(e.lambda(null!=(i=null!=t?t.options:t)?i.headingText:i,t))+"</h5>\n"+(null!=(i=n.if.call(null!=t?t:e.nullContext||{},null!=(i=null!=t?t.options:t)?i.emptyStateText:i,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o}))?i:"")+'\n<div class="links-region"></div>'},useData:!0})},99114:function(e,t,n){var r=n(32227);e.exports=(r.default||r).template({1:function(e,t,n,r,o){var i;return e.propertyIsEnumerable,"<p>"+e.escapeExpression(e.lambda(null!=(i=null!=t?t.options:t)?i.emptyStateText:i,t))+"</p>"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var i;return e.propertyIsEnumerable,"<h5>"+e.escapeExpression(e.lambda(null!=(i=null!=t?t.options:t)?i.resourcesHeadingText:i,t))+"</h5>\n"+(null!=(i=n.if.call(null!=t?t:e.nullContext||{},null!=(i=null!=t?t.options:t)?i.emptyStateText:i,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o}))?i:"")+'\n<div class="resource-list-region"></div>'},useData:!0})}}]);
|