@clickview/library-editor 1.6.1-rc.4 → 1.7.1-rc.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.
Files changed (116) hide show
  1. package/dist/bundles.json +2 -2
  2. package/dist/css/{6092-library-editor-09a4993819.chunk.css → 1819-library-editor-69e8f4675f.chunk.css} +2 -2
  3. package/dist/css/1832-library-editor-16982d18f9.chunk.css +2 -0
  4. package/dist/css/{3427-library-editor-2ba6a08f4c.chunk.css → 3427-library-editor-8442ad6453.chunk.css} +1 -1
  5. package/dist/css/4860-library-editor-27c2a56d40.chunk.css +2 -0
  6. package/dist/css/{5047-library-editor-d59ace1885.chunk.css → 5047-library-editor-3ed99ac07f.chunk.css} +1 -1
  7. package/dist/css/5747-library-editor-615300053c.chunk.css +2 -0
  8. package/dist/css/6093-library-editor-3b3ef2f270.chunk.css +2 -0
  9. package/dist/css/7053-library-editor-43ee5fb1f9.chunk.css +2 -0
  10. package/dist/css/9695-library-editor-a3a0f8d8e8.chunk.css +2 -0
  11. package/dist/css/9927-library-editor-e3b21e68b0.chunk.css +2 -0
  12. package/dist/css/{library-editor-app-832d87bac8.css → library-editor-app-4e790b757d.css} +1 -1
  13. package/dist/en.json +1 -1
  14. package/dist/scripts/1819-5e97050377.chunk.js +2 -0
  15. package/dist/scripts/{1832-89afc0b65d.chunk.js → 1832-9528386bfe.chunk.js} +1 -1
  16. package/dist/scripts/243-224b5eea73.chunk.js +1 -0
  17. package/dist/scripts/259-fb7e645a88.chunk.js +1 -0
  18. package/dist/scripts/{2802-6a6c18c88e.chunk.js → 2802-160b25677d.chunk.js} +1 -1
  19. package/dist/scripts/2803-f91683764c.chunk.js +1 -0
  20. package/dist/scripts/{3096-b12e6929ef.chunk.js → 3096-f61a91545d.chunk.js} +1 -1
  21. package/dist/scripts/{3427-4bb7be4830.chunk.js → 3427-1bd7b5956b.chunk.js} +1 -1
  22. package/dist/scripts/3639-8e4d2c9b84.chunk.js +1 -0
  23. package/dist/scripts/3746-7fca58c2db.chunk.js +1 -0
  24. package/dist/scripts/4201-973ee89615.chunk.js +1 -0
  25. package/dist/scripts/435-fbb6b4b01e.chunk.js +1 -0
  26. package/dist/scripts/4860-56e7955cd4.chunk.js +1 -0
  27. package/dist/scripts/{5047-ce9d715ba6.chunk.js → 5047-c22a3ab8f7.chunk.js} +1 -1
  28. package/dist/scripts/5248-c1cfd861cc.chunk.js +1 -0
  29. package/dist/scripts/5356-4583545486.chunk.js +1 -0
  30. package/dist/scripts/5412-51a270fe11.chunk.js +1 -0
  31. package/dist/scripts/{5431-ae8fb2a0d5.chunk.js → 5431-50ab5a6a35.chunk.js} +1 -1
  32. package/dist/scripts/{5747-e533b579f8.chunk.js → 5747-913fcc6f9c.chunk.js} +1 -1
  33. package/dist/scripts/{5967-4561d168be.chunk.js → 5967-5d8ab696d0.chunk.js} +1 -1
  34. package/dist/scripts/6093-67352f9ba1.chunk.js +1 -0
  35. package/dist/scripts/{6625-754683073a.chunk.js → 6625-a31763e7ef.chunk.js} +1 -1
  36. package/dist/scripts/{6788-7373d05068.chunk.js → 6788-4bd780e50b.chunk.js} +1 -1
  37. package/dist/scripts/7053-312e4779fe.chunk.js +1 -0
  38. package/dist/scripts/{7190-b9b56210c7.chunk.js → 7190-8c67f0b2c5.chunk.js} +1 -1
  39. package/dist/scripts/{8343-6cd7f8bc0c.chunk.js → 8343-774860a655.chunk.js} +1 -1
  40. package/dist/scripts/8362-ea6c7521b8.chunk.js +1 -0
  41. package/dist/scripts/8420-77604e5dd5.chunk.js +1 -0
  42. package/dist/scripts/8906-a5aa3d1286.chunk.js +1 -0
  43. package/dist/scripts/9195-db9407692d.chunk.js +1 -0
  44. package/dist/scripts/9298-33d2ab886e.chunk.js +1 -0
  45. package/dist/scripts/9695-72bc239f92.chunk.js +1 -0
  46. package/dist/scripts/9927-6933b86ad4.chunk.js +1 -0
  47. package/dist/scripts/bundle-926d3fe541.min.js +2 -0
  48. package/package.json +1 -1
  49. package/dist/css/1832-library-editor-761fcb8755.chunk.css +0 -2
  50. package/dist/css/4860-library-editor-d2f7f18ab7.chunk.css +0 -2
  51. package/dist/css/5747-library-editor-a3e5ded646.chunk.css +0 -2
  52. package/dist/css/6093-library-editor-07e26e7dd0.chunk.css +0 -2
  53. package/dist/css/7053-library-editor-96752915ef.chunk.css +0 -2
  54. package/dist/css/9695-library-editor-a995f8ddfd.chunk.css +0 -2
  55. package/dist/scripts/243-9d49b60575.chunk.js +0 -1
  56. package/dist/scripts/259-01aab15df9.chunk.js +0 -1
  57. package/dist/scripts/2803-f77ffe8d6d.chunk.js +0 -1
  58. package/dist/scripts/3639-0103f45f8f.chunk.js +0 -1
  59. package/dist/scripts/4201-d09f8e78d9.chunk.js +0 -1
  60. package/dist/scripts/435-c96da17150.chunk.js +0 -1
  61. package/dist/scripts/4860-e790102563.chunk.js +0 -1
  62. package/dist/scripts/4983-f1497e81d9.chunk.js +0 -1
  63. package/dist/scripts/5248-5e71750de8.chunk.js +0 -1
  64. package/dist/scripts/5356-1daf7014ec.chunk.js +0 -1
  65. package/dist/scripts/5412-95411d83f3.chunk.js +0 -1
  66. package/dist/scripts/6092-b2d4926dbd.chunk.js +0 -2
  67. package/dist/scripts/6093-7981719748.chunk.js +0 -1
  68. package/dist/scripts/6183-90e0e42029.chunk.js +0 -1
  69. package/dist/scripts/7053-8ab28971fd.chunk.js +0 -1
  70. package/dist/scripts/8362-eafdfe9326.chunk.js +0 -1
  71. package/dist/scripts/8420-fae27640ba.chunk.js +0 -1
  72. package/dist/scripts/8906-16bf68d7a8.chunk.js +0 -1
  73. package/dist/scripts/9298-2d96858320.chunk.js +0 -1
  74. package/dist/scripts/9592-35ee192235.chunk.js +0 -1
  75. package/dist/scripts/9695-efcf04cb36.chunk.js +0 -1
  76. package/dist/scripts/bundle-60e78a30ba.min.js +0 -2
  77. /package/dist/css/{4983-library-editor-76fe7e394b.chunk.css → 3746-library-editor-76fe7e394b.chunk.css} +0 -0
  78. /package/dist/css/{6183-library-editor-14f7d9be38.chunk.css → 9195-library-editor-14f7d9be38.chunk.css} +0 -0
  79. /package/dist/scripts/{1010-24607acfed.chunk.js → 1010-f5821049de.chunk.js} +0 -0
  80. /package/dist/scripts/{1086-a34fb060e6.chunk.js → 1086-ba954c2a70.chunk.js} +0 -0
  81. /package/dist/scripts/{1203-69f107f194.chunk.js → 1203-c5dbf7e172.chunk.js} +0 -0
  82. /package/dist/scripts/{1409-8253b07056.chunk.js → 1409-333eff67cc.chunk.js} +0 -0
  83. /package/dist/scripts/{6092-b2d4926dbd.chunk.js.LICENSE.txt → 1819-5e97050377.chunk.js.LICENSE.txt} +0 -0
  84. /package/dist/scripts/{2098-4df3c20f35.chunk.js → 2098-30b7db58a5.chunk.js} +0 -0
  85. /package/dist/scripts/{2417-5465fe7d6e.chunk.js → 2417-ce05495ed5.chunk.js} +0 -0
  86. /package/dist/scripts/{2692-a5f1f0cbe9.chunk.js → 2692-15c761ec3d.chunk.js} +0 -0
  87. /package/dist/scripts/{2733-104ca5267c.chunk.js → 2733-6b607b5143.chunk.js} +0 -0
  88. /package/dist/scripts/{2802-6a6c18c88e.chunk.js.LICENSE.txt → 2802-160b25677d.chunk.js.LICENSE.txt} +0 -0
  89. /package/dist/scripts/{2888-0544d20f9b.chunk.js → 2888-7396d60be2.chunk.js} +0 -0
  90. /package/dist/scripts/{299-7fe66010c3.chunk.js → 299-921c177109.chunk.js} +0 -0
  91. /package/dist/scripts/{3763-c9be4b8c8b.chunk.js → 3763-0095e75c1a.chunk.js} +0 -0
  92. /package/dist/scripts/{3803-1de2707cba.chunk.js → 3803-d2a02a86eb.chunk.js} +0 -0
  93. /package/dist/scripts/{409-2eb71d2fb9.chunk.js → 409-fbe70b4df9.chunk.js} +0 -0
  94. /package/dist/scripts/{4353-fa7c47f433.chunk.js → 4353-1d4ec918e6.chunk.js} +0 -0
  95. /package/dist/scripts/{4591-da8d98f460.chunk.js → 4591-3fa9999f29.chunk.js} +0 -0
  96. /package/dist/scripts/{4703-8907adfcd9.chunk.js → 4703-1cefcae29b.chunk.js} +0 -0
  97. /package/dist/scripts/{4810-596cb1efb0.chunk.js → 4810-908fe3f045.chunk.js} +0 -0
  98. /package/dist/scripts/{4885-7e874365cf.chunk.js → 4885-3a35265eab.chunk.js} +0 -0
  99. /package/dist/scripts/{514-425e874f7e.chunk.js → 514-923fb794ae.chunk.js} +0 -0
  100. /package/dist/scripts/{5418-0089ab591d.chunk.js → 5418-bc46c939fc.chunk.js} +0 -0
  101. /package/dist/scripts/{546-0cec8e55ef.chunk.js → 546-6736b53bcd.chunk.js} +0 -0
  102. /package/dist/scripts/{5665-073470759f.chunk.js → 5665-38506a938a.chunk.js} +0 -0
  103. /package/dist/scripts/{6420-2178cb2561.chunk.js → 6420-6bae432c6b.chunk.js} +0 -0
  104. /package/dist/scripts/{6774-dd35a32f7d.chunk.js → 6774-580a63bbeb.chunk.js} +0 -0
  105. /package/dist/scripts/{693-e91aae32f6.chunk.js → 693-780241d5a9.chunk.js} +0 -0
  106. /package/dist/scripts/{7002-135475be76.chunk.js → 7002-596b9b3c71.chunk.js} +0 -0
  107. /package/dist/scripts/{7173-a5e749e591.chunk.js → 7173-28ec11155c.chunk.js} +0 -0
  108. /package/dist/scripts/{8074-fdddb2e35b.chunk.js → 8074-e02348d9c5.chunk.js} +0 -0
  109. /package/dist/scripts/{8727-2cdd110cc8.chunk.js → 8727-4be0c05629.chunk.js} +0 -0
  110. /package/dist/scripts/{8762-912bdafad1.chunk.js → 8762-264adb9817.chunk.js} +0 -0
  111. /package/dist/scripts/{8947-152b36ebd5.chunk.js → 8947-563b287016.chunk.js} +0 -0
  112. /package/dist/scripts/{9167-2c993dcf7a.chunk.js → 9167-0e451c25a3.chunk.js} +0 -0
  113. /package/dist/scripts/{9355-0629e54449.chunk.js → 9355-633de33fc9.chunk.js} +0 -0
  114. /package/dist/scripts/{9357-30cb06614f.chunk.js → 9357-22395b794f.chunk.js} +0 -0
  115. /package/dist/scripts/{9383-bb6ad888b4.chunk.js → 9383-afe019b90c.chunk.js} +0 -0
  116. /package/dist/scripts/{bundle-60e78a30ba.min.js.LICENSE.txt → bundle-926d3fe541.min.js.LICENSE.txt} +0 -0
@@ -1 +1 @@
1
- (self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[1832],{21832:function(e,t,n){"use strict";n.r(t),n.d(t,{GeneratePdfView:function(){return _}});var r=n(48088),i=n(31647),o=n(21679),a=n(57857),c=n(70065),l=n(52076),u=n(77502),s=n(10101),f=n(88172),h=n(67670),p=n(9484),y=n(30305),d=n(61843),b=n(56906),v=n(44634),g=n.n(v),m={image:"Di3M6"};function O(e){return O="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},O(e)}function w(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function P(e,t){return P=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},P(e,t)}function k(e,t){if(t&&("object"===O(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function E(e){return E=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},E(e)}var _=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&P(e,t)}(D,e);var t,n,v,O,_=(v=D,O=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=E(v);if(O){var n=E(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return k(this,e)});function D(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,D),_.call(this,e)}return t=D,(n=[{key:"initialize",value:function(){this.collectionIdentifier=this.options.collectionIdentifier,this.libraryDataService=o.u.getInstance(y.Or.Library,this),this.videoDataService=o.u.getInstance(y.Or.Video,this),this.exportDataService=o.u.getInstance(y.Or.Export,this),this.bindListeners()}},{key:"name",get:function(){return"GeneratePdfView"}},{key:"title",get:function(){return a.T.getPhrase(this.lang,"title")}},{key:"lang",get:function(){return"libraryEditor.generatePdf"}},{key:"template",get:function(){return g()}},{key:"channelName",get:function(){return d.N0.generateUniqueChannelName(this)}},{key:"behaviors",get:function(){return[{behaviorClass:s.Yw,title:a.T.getPhrase(this.lang,"heading"),spinnerButtonOptions:{model:this.spinnerModel=new h.v,saveEvent:"generate:pdf",channelName:this.channelName,buttonText:a.T.getPhrase(this.lang,"generate"),extraButtonClass:"btn-dark",spinnerOptions:{size:d.Ey.Small,type:d.dR.Light,extraClasses:"mx-auto"}}}]}},{key:"bindListeners",value:function(){var e=this;this.listenTo(this.channelName,"generate:pdf",this.onClickGeneratePdf),this.listenTo(y.Vk.LIBRARY,"".concat(y.M_.FOLDER,":").concat(this.collectionIdentifier.id,":sync"),this.render),this.listenTo(y.Vk.VIDEO,"".concat(this.collectionIdentifier.toString(),":sync"),this.render),this.listenTo(y.Vk.EXPORT,"".concat(y.M_.GENERATE_COLLECTION_PDF,":").concat(this.collectionIdentifier.id,":sync"),(function(){return e.triggerMethod("hide")}))}},{key:"onClickGeneratePdf",value:function(){this.hasDataFetched()&&(r.Radio.channel(this.channelName).trigger(f.I3.ShowSpinner),this.exportDataService.generateCollectionPdf(this.library.id,this.collectionIdentifier.id,this.currentUser,this.collectionIdentifier.sort),this.logAction(this.collectionIdentifier.id,this.collectionIdentifier.sort))}},{key:"fetchData",value:function(){var e=this;this.videos=this.videoDataService.getCollectionVideos(this.collectionIdentifier),this.model=this.libraryDataService.getFolder(this.collectionIdentifier.id),this.library||this.libraryDataService.getLibraries((function(t){e.library=d.PU.getLibrary(e.collectionIdentifier.id,t),e.render()}))}},{key:"logAction",value:function(e,t){var n={location:c.LocationContext.Popup,actionType:c.UserAction.Create,entity:c.EntityType.PDF,workflowPhase:c.WorkflowPhase.Complete},r={id:e,sort:u.E[t]};l.k.logUserAction(r,n)}},{key:"hasDataFetched",value:function(){return!!this.model&&!!this.videos&&!!this.library}},{key:"requiredResources",get:function(){return{currentUser:p.K.currentUser}}},{key:"onBeforeRender",value:function(){var e=this;return this.fetchData(),!!this.hasDataFetched()&&(this.videos&&!this.videos.length?(window.setTimeout((function(){e.triggerMethod("hide"),i.Q.ErrorHelper.throw(new b.Xz(a.T.getPhrase(e.lang,"errorHeading")))}),y.pA.POPUP_FADE_TIMEOUT),!1):(this.hasDataFetched()&&this.spinnerModel.set(f.ZV.Disabled,!1),!0))}},{key:"viewOptions",value:function(){return{dataFetched:this.hasDataFetched(),spinnerEl:d.Kp.getSpinner({size:d.Ey.Large,extraClasses:"mx-auto"}),email:this.currentUser.get("email"),imageUrl:y.Wn.Shared.GeneratePdf,styles:m}}}])&&w(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),D}(i.Q.View)},67670:function(e,t,n){"use strict";n.d(t,{v:function(){return f}});var r=n(31647),i=n(88172);function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function l(e,t){return l=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},l(e,t)}function u(e,t){if(t&&("object"===o(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function s(e){return s=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},s(e)}var f=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&l(e,t)}(h,e);var t,n,r,o,f=(r=h,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=s(r);if(o){var n=s(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return u(this,e)});function h(){return a(this,h),f.apply(this,arguments)}return t=h,(n=[{key:"defaults",value:function(){return e={},!0,(t=i.ZV.Disabled)in e?Object.defineProperty(e,t,{value:true,enumerable:!0,configurable:!0,writable:!0}):e[t]=true,e;var e,t}}])&&c(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),h}(r.Q.Model)},44634:function(e,t,n){var r=n(32227);e.exports=(r.default||r).template({1:function(e,t,n,r,i){var o;return e.propertyIsEnumerable,(null!=(o=e.lambda(null!=(o=null!=t?t.options:t)?o.spinnerEl:o,t))?o:"")+"\r\n"},3:function(e,t,n,r,i){e.propertyIsEnumerable;var o,a=e.lambda,c=e.escapeExpression;return'<div class="pb-3 text-center">\r\n <img src="'+c(a(null!=(o=null!=t?t.options:t)?o.imageUrl:o,t))+'" class="'+c(a(null!=(o=null!=(o=null!=t?t.options:t)?o.styles:o)?o.image:o,t))+'" />\r\n</div>\r\n<p class="m-0">'+(null!=(o=(n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"info",{name:"lang",hash:{email:null!=(o=null!=t?t.options:t)?o.email:o,name:null!=t?t.name:t},data:i}))?o:"")+"</p>\r\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,i){var o;return e.propertyIsEnumerable,null!=(o=n.unless.call(null!=t?t:e.nullContext||{},null!=(o=null!=t?t.options:t)?o.dataFetched:o,{name:"unless",hash:{},fn:e.program(1,i,0),inverse:e.program(3,i,0),data:i}))?o:""},useData:!0})}}]);
1
+ (self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[1832],{21832:function(e,t,n){"use strict";n.r(t),n.d(t,{GeneratePdfView:function(){return _}});var r=n(48088),i=n(31647),o=n(21679),a=n(57857),c=n(70065),l=n(52076),u=n(77502),s=n(10101),f=n(88172),h=n(67670),p=n(9484),y=n(30305),d=n(61843),b=n(56906),v=n(44634),g=n.n(v),m={image:"Di3M6"};function O(e){return O="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},O(e)}function w(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function P(e,t){return P=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},P(e,t)}function k(e,t){if(t&&("object"===O(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function E(e){return E=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},E(e)}var _=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&P(e,t)}(D,e);var t,n,v,O,_=(v=D,O=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=E(v);if(O){var n=E(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return k(this,e)});function D(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,D),_.call(this,e)}return t=D,(n=[{key:"initialize",value:function(){this.collectionIdentifier=this.options.collectionIdentifier,this.libraryDataService=o.u.getInstance(y.Or.Library,this),this.videoDataService=o.u.getInstance(y.Or.Video,this),this.exportDataService=o.u.getInstance(y.Or.Export,this),this.bindListeners()}},{key:"name",get:function(){return"GeneratePdfView"}},{key:"title",get:function(){return a.T.getPhrase(this.lang,"title")}},{key:"lang",get:function(){return"libraryEditor.generatePdf"}},{key:"template",get:function(){return g()}},{key:"channelName",get:function(){return d.N0.generateUniqueChannelName(this)}},{key:"behaviors",get:function(){return[{behaviorClass:s.Yw,title:a.T.getPhrase(this.lang,"heading"),spinnerButtonOptions:{model:this.spinnerModel=new h.v,saveEvent:"generate:pdf",channelName:this.channelName,buttonText:a.T.getPhrase(this.lang,"generate"),extraButtonClass:"btn-dark",spinnerOptions:{size:d.Ey.Small,type:d.dR.Light,extraClasses:"mx-auto"}}}]}},{key:"bindListeners",value:function(){var e=this;this.listenTo(this.channelName,"generate:pdf",this.onClickGeneratePdf),this.listenTo(y.Vk.LIBRARY,"".concat(y.M_.FOLDER,":").concat(this.collectionIdentifier.id,":sync"),this.render),this.listenTo(y.Vk.VIDEO,"".concat(this.collectionIdentifier.toString(),":sync"),this.render),this.listenTo(y.Vk.EXPORT,"".concat(y.M_.GENERATE_COLLECTION_PDF,":").concat(this.collectionIdentifier.id,":sync"),(function(){return e.triggerMethod("hide")}))}},{key:"onClickGeneratePdf",value:function(){this.hasDataFetched()&&(r.Radio.channel(this.channelName).trigger(f.I3.ShowSpinner),this.exportDataService.generateCollectionPdf(this.library.id,this.collectionIdentifier.id,this.currentUser,this.collectionIdentifier.sort),this.logAction(this.collectionIdentifier.id,this.collectionIdentifier.sort))}},{key:"fetchData",value:function(){var e=this;this.videos=this.videoDataService.getCollectionVideos(this.collectionIdentifier),this.model=this.libraryDataService.getFolder(this.collectionIdentifier.id),this.library||this.libraryDataService.getLibraries((function(t){e.library=d.PU.getLibrary(e.collectionIdentifier.id,t),e.render()}))}},{key:"logAction",value:function(e,t){var n={location:c.LocationContext.Popup,actionType:c.UserAction.Create,entity:c.EntityType.PDF,workflowPhase:c.WorkflowPhase.Complete},r={id:e,sort:u.E[t]};l.k.logUserAction(r,n)}},{key:"hasDataFetched",value:function(){return!!this.model&&!!this.videos&&!!this.library}},{key:"requiredResources",get:function(){return{currentUser:p.K.currentUser}}},{key:"onBeforeRender",value:function(){var e=this;return this.fetchData(),!!this.hasDataFetched()&&(this.videos&&!this.videos.length?(window.setTimeout((function(){e.triggerMethod("hide"),i.Q.ErrorHelper.throw(new b.Xz(a.T.getPhrase(e.lang,"errorHeading")))}),y.pA.POPUP_FADE_TIMEOUT),!1):(this.hasDataFetched()&&this.spinnerModel.set(f.ZV.Disabled,!1),!0))}},{key:"viewOptions",value:function(){return{dataFetched:this.hasDataFetched(),spinnerEl:d.Kp.getSpinner({size:d.Ey.Large,extraClasses:"mx-auto"}),email:this.currentUser.get("email"),imageUrl:y.Wn.Shared.GENERATE_PDF,styles:m}}}])&&w(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),D}(i.Q.View)},67670:function(e,t,n){"use strict";n.d(t,{v:function(){return f}});var r=n(31647),i=n(88172);function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function l(e,t){return l=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},l(e,t)}function u(e,t){if(t&&("object"===o(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function s(e){return s=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},s(e)}var f=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&l(e,t)}(h,e);var t,n,r,o,f=(r=h,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=s(r);if(o){var n=s(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return u(this,e)});function h(){return a(this,h),f.apply(this,arguments)}return t=h,(n=[{key:"defaults",value:function(){return e={},!0,(t=i.ZV.Disabled)in e?Object.defineProperty(e,t,{value:true,enumerable:!0,configurable:!0,writable:!0}):e[t]=true,e;var e,t}}])&&c(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),h}(r.Q.Model)},44634:function(e,t,n){var r=n(32227);e.exports=(r.default||r).template({1:function(e,t,n,r,i){var o;return e.propertyIsEnumerable,(null!=(o=e.lambda(null!=(o=null!=t?t.options:t)?o.spinnerEl:o,t))?o:"")+"\r\n"},3:function(e,t,n,r,i){e.propertyIsEnumerable;var o,a=e.lambda,c=e.escapeExpression;return'<div class="pb-3 text-center">\r\n <img src="'+c(a(null!=(o=null!=t?t.options:t)?o.imageUrl:o,t))+'" class="'+c(a(null!=(o=null!=(o=null!=t?t.options:t)?o.styles:o)?o.image:o,t))+'" />\r\n</div>\r\n<p class="m-0">'+(null!=(o=(n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"info",{name:"lang",hash:{email:null!=(o=null!=t?t.options:t)?o.email:o,name:null!=t?t.name:t},data:i}))?o:"")+"</p>\r\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,i){var o;return e.propertyIsEnumerable,null!=(o=n.unless.call(null!=t?t:e.nullContext||{},null!=(o=null!=t?t.options:t)?o.dataFetched:o,{name:"unless",hash:{},fn:e.program(1,i,0),inverse:e.program(3,i,0),data:i}))?o:""},useData:!0})}}]);
@@ -0,0 +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 q}});var r=n(39479),o=n(48088),i=n(31647),a=n(21679),l=n(99249),u=n(70065),c=n(52076),s=n(10101),p=n(18375),f=n(67670),h=n(61843),d=n(30305),m=n(17422),y=n(58025),g=n(88172),b=n(48404),v=n(57857),w=n(86983),I=n.n(w),k={removeImage:"daDCA",imageElement:"U_0tb",banner:"J28Xw",thumbnail:"OoZ6O",imageContainer:"RWdbM"},C=n(22231),T=n(24828);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,r.key,r)}}function E(e,t){return E=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},E(e,t)}function R(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)}function B(e){return B=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},B(e)}var j=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&E(e,t)}(c,e);var t,n,r,a,u=(r=c,a=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=B(r);if(a){var n=B(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return R(this,e)});function c(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c),u.call(this,e)}return t=c,(n=[{key:"initialize",value:function(){this.viewModel=l.r.get("edit:folder:images")}},{key:"name",get:function(){return"EditImageComponent"}},{key:"template",get:function(){return I()}},{key:"lang",get:function(){return"libraryEditor.editImage"}},{key:"className",get:function(){return this.options.imageType===m.__.Thumbnails?"".concat(k.thumbnail," mb-2"):"".concat(k.banner," mt-2")}},{key:"events",value:function(){return e={},n="onClickRemoveImage",(t="click .".concat(k.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}),i.Q.AppLinkHelper.trigger({application:d.OV.LIBRARY_EDITOR,action:d.eX.LibraryEditor.EDIT_FOLDER_IMAGES,args:[e.options.folderId]})):o.Radio.channel(e.options.channelName).trigger("select:image",t,e.options.imageType)}}]}},{key:"onClickRemoveImage",value:function(){o.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 h.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:k,imageUrl:this.getImageUrl(),backgroundColor:(0,C.x)(this.options.folderName,T.o),hasImage:this.options.originalImage&&this.options.originalImage.get("id"),imageTypeText:this.getImageTypeText(),dimensions:d.yE[this.options.imageType],recommendedDimensions:d.nq[this.options.imageType]}}}])&&O(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),c}(i.Q.Component),S=n(80322),P=n.n(S);function x(e){return x="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},x(e)}function U(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function D(e,t){return D=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},D(e,t)}function M(e,t){if(t&&("object"===x(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function N(e){return N=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},N(e)}var A,L=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&D(e,t)}(a,e);var t,n,r,o,i=(r=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=N(r);if(o){var n=N(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return M(this,e)});function a(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),i.call(this,e)}return t=a,(n=[{key:"name",get:function(){return"EditImagesWrapperComponent"}},{key:"template",get:function(){return P()}},{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 j({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 j({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()}}])&&U(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(i.Q.Component),V="EOVMO",W=n(42687),F=n.n(W);function H(e){return H="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},H(e)}function Y(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function z(e,t){return z=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},z(e,t)}function Q(e,t){if(t&&("object"===H(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Z(e){return Z=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Z(e)}!function(e){e[e.Upload=0]="Upload",e[e.Crop=1]="Crop"}(A||(A={}));var q=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&z(e,t)}(k,e);var t,n,v,w,I=(v=k,w=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Z(v);if(w){var n=Z(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return Q(this,e)});function k(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,k),I.call(this,e)}return t=k,(n=[{key:"initialize",value:function(){this.popupContentState=A.Upload,this.viewModel=l.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(g.ZV.Disabled,!1),this.popupContentState=A.Crop),this.libraryDataService=a.u.getInstance(d.Or.Library,this),this.imageUploadDataService=a.u.getInstance(d.Or.ImageUpload,this),this.bindListeners()}},{key:"name",get:function(){return"EditFolderImagesView"}},{key:"title",get:function(){return"Edit Folder Images"}},{key:"template",get:function(){return F()}},{key:"channelName",get:function(){return h.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"}}},{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(V)}],spinnerButtonOptions:{model:this.spinnerModel=new f.v,channelName:this.channelName,buttonText:"Continue",onClick:this.onClickCrop}}]}},{key:"requiredResources",get:function(){return{config:b.p.config}}},{key:"bindListeners",value:function(){var e=this;this.listenTo(d.Vk.LIBRARY,"".concat(d.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,y.Y.ImageCropped,this.onImageCropped)}},{key:"onClickBackButton",value:function(){this.popupContentState!==A.Upload&&(this.popupContentState=A.Upload,this.selectedImageType=null,this.newImageEl=null,this.spinnerModel.set(g.ZV.Disabled,!0),this.renderContent())}},{key:"onClickCrop",value:function(){o.Radio.channel(this.channelName).trigger(y.Y.CropImage).trigger(g.I3.ShowSpinner)}},{key:"onSelectImage",value:function(e,t){this.selectedImageType=t,this.newImageEl=new Image,this.newImageEl.src=e,this.popupContentState=A.Crop,this.spinnerModel.set(g.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?u.EntityType.Banner:u.EntityType.Thumbnail,o=this.selectedImageType===m.__.Banners?"addOrUpdateBanner":"addOrUpdateThumbnail";this.libraryDataService[o](n,(function(e){c.k.logUserAction({libraryId:t.libraryId,folderId:t.options.folderId,id:e.get("id")},{actionType:u.UserAction.Upload,entity:r,workflowPhase:u.WorkflowPhase.Complete,location:u.LocationContext.Popup}),t.onFinish()}))}},{key:"onShowDialog",value:function(e){var t=this,n=new h.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?u.EntityType.Banner:u.EntityType.Thumbnail;this.libraryDataService[n](o,(function(){c.k.logUserAction({libraryId:t.libraryId,folderId:t.model.get("id"),id:r.get("id")},{actionType:u.UserAction.Delete,entity:i,workflowPhase:u.WorkflowPhase.Complete,location:u.LocationContext.Popup}),e===m.__.Banners&&(t.currentBanner=null),e===m.__.Thumbnails&&(t.currentThumbnail=null),t.onFinish()}))}},{key:"onFinish",value:function(){this.viewModel.clear(),i.Q.AppLinkHelper.trigger({application:d.OV.LIBRARY_EDITOR,action:d.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 p.E({dataUrl:this.newImageEl.src,width:this.newImageEl.width,height:this.newImageEl.height})}},{key:"renderContent",value:function(){this.popupContentState===A.Upload&&(this.getUI("backBtn").addClass(V),this.showChildView("content",new L({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===A.Crop&&(this.getUI("backBtn").removeClass(V),this.showChildView("content",new y.a({model:this.getImageModel(),channelName:this.channelName,imageType:this.selectedImageType,minWidth:d.yE[this.selectedImageType].width,minHeight:d.yE[this.selectedImageType].height,getCropRegionWidth:r.bind(this.getCropRegionWidth,this)})))}},{key:"viewOptions",value:function(){return{dataFetched:!!this.model&&!!this.libraryId,spinnerEl:h.Kp.getSpinner({size:h.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()}}])&&Y(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),k}(i.Q.View)},58025:function(e,t,n){"use strict";n.d(t,{Y:function(){return r},a:function(){return m}});var r,o=n(48088),i=n(31647),a=n(51934),l=n.n(a),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,r.key,r)}}function f(e,t){return f=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},f(e,t)}function h(e,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)}function d(e){return d=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},d(e)}!function(e){e.ClickCrop="click:crop",e.CropImage="crop:image",e.ImageCropped="image:cropped"}(r||(r={}));var m=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&f(e,t)}(s,e);var t,n,i,a,u=(i=s,a=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=d(i);if(a){var n=d(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return h(this,e)});function s(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),u.call(this,e)}return t=s,(n=[{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(l())(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(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),s}(i.Q.Component)},67670:function(e,t,n){"use strict";n.d(t,{v:function(){return p}});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){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function u(e,t){return u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},u(e,t)}function c(e,t){if(t&&("object"===i(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function s(e){return s=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},s(e)}var p=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&u(e,t)}(f,e);var t,n,r,i,p=(r=f,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=s(r);if(i){var n=s(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return c(this,e)});function f(){return a(this,f),p.apply(this,arguments)}return t=f,(n=[{key:"defaults",value:function(){return e={},!0,(t=o.ZV.Disabled)in e?Object.defineProperty(e,t,{value:true,enumerable:!0,configurable:!0,writable:!0}):e[t]=true,e;var e,t}}])&&l(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),f}(r.Q.Model)},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}))+"\r\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}))+"\r\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>\r\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>\r\n<div class="text-muted mb-1">\r\n <em>\r\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>\r\n</div>\r\n<div class="my-1 '+u(c(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.imageContainer:i,t))+'">\r\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>\r\n</div>\r\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>\r\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>\r\n<div class="dropdown-divider"></div>\r\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>\r\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:"")+"\r\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var i;return e.propertyIsEnumerable,null!=(i=n.if.call(null!=t?t:e.nullContext||{},null!=(i=null!=t?t.options:t)?i.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([[259],{18582:function(e,t,n){"use strict";n.d(t,{u:function(){return c}});var r,o=n(57857),i=n(6681),a=n(75459);function u(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}!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={}));var l="shared.shared-utils",c={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-info";case e<96:return"bg-red";case e<128:return"bg-pink";case e>=128:return"bg-yellow";default:return""}}(e):""},mapSourceToDisplayName:function(e){switch(e.type){case a.r.HostedLibrary:case a.r.CustomLibrary:return e.name;case a.r.Exchange:return o.T.getPhrase(l,"exchange");case a.r.Workspace:return o.T.getPhrase(l,"workspace");default:return""}},mapSourceToClass:function(e){switch(e){case a.r.HostedLibrary:case a.r.CustomLibrary:return"bg-info";case a.r.Exchange:return"bg-green";case a.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,n=(u(t={},r.Pdf,i.vn.FilePDF),u(t,r.Image,i.vn.FileImg),u(t,r.PowerPoint,i.vn.FilePowerpoint),u(t,r.Document,i.vn.FileWord),u(t,r.Excel,i.vn.FileExcel),u(t,r.Zip,i.vn.FileZip),u(t,r.File,i.vn.File),t)[e];return n||(n=i.vn.Folder),n},mapTypeToClass:function(e){switch(e){case r.Pdf:return"icon-red";case r.Image:return"icon-purple";case r.Document:return"icon-blue";case r.Excel:return"icon-green";case r.PowerPoint:return"icon-orange";case r.Zip:return"icon-teal";case r.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 r.Pdf:return o.T.getPhrase(l,"pdf");case r.Image:return o.T.getPhrase(l,"image");case r.Document:return o.T.getPhrase(l,"document");case r.Excel:return o.T.getPhrase(l,"spreadsheet");case r.PowerPoint:return o.T.getPhrase(l,"presentation");case r.Zip:return o.T.getPhrase(l,"zipArchive");case r.File:return o.T.getPhrase(l,"file");default:return""}}}},68708:function(e,t,n){"use strict";n.d(t,{c:function(){return _}});var r=n(31647),o=n(48088),i=n(6681),a=n(70065),u=n(52076),l=n(61843),c=n(30305),s=n(76431),p=n.n(s),f={container:"vvTSf"},y=n(57857);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,r.key,r)}}function h(e,t){return h=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},h(e,t)}function b(e,t){if(t&&("object"===d(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function g(e){return g=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},g(e)}var v=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&h(e,t)}(v,e);var t,n,r,s,d=(r=v,s=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=g(r);if(s){var n=g(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return b(this,e)});function v(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,v),d.call(this,e)}return t=v,(n=[{key:"name",get:function(){return"LinkItemComponent"}},{key:"template",get:function(){return p()}},{key:"className",get:function(){return"".concat(f.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.UserAction.Edit,entity:a.EntityType.Resource,workflowPhase:a.WorkflowPhase.Start}),t={id:this.model.get("id"),parentId:+this.options.videoId};u.k.logUserAction(t,e)}},{key:"onClickDelete",value:function(){var e=this;new l.Mr({title:y.T.getPhrase(this.lang,"removeHeading"),text:y.T.getPhrase(this.lang,"removeConfirm",{name:l.m$.escapeExpression(this.model.get("name"))}),buttons:[{text:y.T.getPhrase(this.lang,"remove"),className:"btn btn-danger",success:!0},{text:y.T.getPhrase(this.lang,"cancel"),className:"btn btn-outline-dark",close:!0}],channelName:l.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:f,editable:this.options.editable,linkSvg:i.Nj.getSvg(i.vn.Link),editSvg:i.Nj.getSvg(i.vn.Edit),trashSvg:i.Nj.getSvg(i.vn.Delete)}}}])&&m(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),v}(r.Q.Component),k=n(52929),w=n.n(k);function O(e){return O="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},O(e)}function T(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}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,r.key,r)}}function E(e,t,n){return t&&P(e.prototype,t),n&&P(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function x(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&C(e,t)}function C(e,t){return C=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},C(e,t)}function S(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=R(e);if(t){var o=R(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return j(this,n)}}function j(e,t){if(t&&("object"===O(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function R(e){return R=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},R(e)}var _=function(e){x(n,e);var t=S(n);function n(e){return T(this,n),t.call(this,e)}return E(n,[{key:"name",get:function(){return"VideoLinksComponent"}},{key:"template",get:function(){return w()}},{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 I({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}))}}]),n}(r.Q.Component),I=function(e){x(n,e);var t=S(n);function n(e){return T(this,n),t.call(this,e)}return E(n,[{key:"name",get:function(){return"LinkItemComponentCollection"}},{key:"childViewOptions",get:function(){return this.options}},{key:"childView",get:function(){return v}}]),n}(r.Q.ComponentCollection)},77605:function(e,t,n){"use strict";n.d(t,{c:function(){return D},h:function(){return N}});var r=n(31647),o=n(48088),i=n(99114),a=n.n(i),u=n(53808),l=n(70065),c=n(52076),s=n(6681),p=n(18582),f=n(95117),y=n.n(f);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,r.key,r)}}function h(e,t){return h=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},h(e,t)}function b(e,t){if(t&&("object"===d(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function g(e){return g=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},g(e)}var v=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&h(e,t)}(a,e);var t,n,r,o,i=(r=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=g(r);if(o){var n=g(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return b(this,e)});function a(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),i.call(this,e)}return t=a,(n=[{key:"name",get:function(){return"ResourceItemComponent"}},{key:"template",get:function(){return y()}},{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=c.k.mergeOptions(this.options.analyticsOptions,{actionType:l.UserAction.Edit,entity:l.EntityType.Resource,workflowPhase:l.WorkflowPhase.Start}),t={id:this.model.get("id"),parentId:+this.options.videoId};c.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:p.u.mapTypeToExtension(t),svg:s.Nj.getSvg(p.u.mapTypeToSvg(t)),iconClass:p.u.mapTypeToClass(t),resourceType:p.u.mapTypeToName(t),editSvg:s.Nj.getSvg(s.vn.Edit),trashSvg:s.Nj.getSvg(s.vn.Delete)}}}])&&m(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(r.Q.Component),k=n(57857),w=n(25094),O=n(41934),T=n(54758);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 E(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function x(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function C(e,t,n){return t&&x(e.prototype,t),n&&x(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function S(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&j(e,t)}function j(e,t){return j=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},j(e,t)}function R(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=I(e);if(t){var o=I(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return _(this,n)}}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)}function I(e){return I=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},I(e)}var N=function(e){S(n,e);var t=R(n);function n(e){return E(this,n),t.call(this,e)}return C(n,[{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 v}},{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:w.OV.LIBRARY_EDITOR,action:O.e.LibraryEditor.EDIT_RESOURCE,args:[e.options.videoId,t]}}}}},{key:"onClickDelete",value:function(e){var t=this;new T.M({title:k.T.getPhrase(this.lang,"removeHeading"),text:k.T.getPhrase(this.lang,"removeBody",{resourceName:e.get("name")}),buttons:[{text:k.T.getPhrase(this.lang,"remove"),className:"btn btn-danger",success:!0},{text:k.T.getPhrase(this.lang,"cancel"),className:"btn btn-outline-dark",close:!0}],channelName:"".concat(this.name).concat(this.cid)}).render().done((function(){o.Radio.channel(t.options.channelName).trigger("delete:resource",e.get("id"))}))}}]),n}(r.Q.ComponentCollection),D=function(e){S(n,e);var t=R(n);function n(e){return E(this,n),t.call(this,e)}return C(n,[{key:"name",get:function(){return"VideoResourcesComponent"}},{key:"template",get:function(){return a()}},{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 N({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||k.T.getPhrase(this.lang,"heading"),emptyStateText:this.options.emptyStateText}}},{key:"onRender",value:function(){this.renderResources()}}]),n}(r.Q.Component)},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,a=e.lambda;return'<a class="float-right svg-container cursor-pointer text-muted delete">'+(null!=(i=a(null!=(i=null!=t?t.options:t)?i.trashSvg:i,t))?i:"")+'</a>\r\n<a class="float-right svg-container cursor-pointer text-muted edit">'+(null!=(i=a(null!=(i=null!=t?t.options:t)?i.editSvg:i,t))?i:"")+"</a>\r\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){e.propertyIsEnumerable;var i,a,u=e.lambda,l=e.escapeExpression,c=null!=t?t:e.nullContext||{},s=e.hooks.helperMissing,p="function";return'<span title="'+l(u(null!=(i=null!=t?t.options:t)?i.resourceType:i,t))+'" class="d-inline-block align-middle mr-2 svg-container '+l(u(null!=(i=null!=t?t.options:t)?i.iconClass:i,t))+'">'+(null!=(i=u(null!=(i=null!=t?t.options:t)?i.svg:i,t))?i:"")+'</span>\r\n<a href="'+l(typeof(a=null!=(a=n.url||(null!=t?t.url:t))?a:s)===p?a.call(c,{name:"url",hash:{},data:o}):a)+"?name="+l(typeof(a=null!=(a=n.name||(null!=t?t.name:t))?a:s)===p?a.call(c,{name:"name",hash:{},data:o}):a)+'" class="align-middle">\r\n '+l(typeof(a=null!=(a=n.name||(null!=t?t.name:t))?a:s)===p?a.call(c,{name:"name",hash:{},data:o}):a)+"\r\n</a>\r\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,a=e.lambda;return' <a class="ml-auto mr-1 svg-container cursor-pointer text-muted edit">'+(null!=(i=a(null!=(i=null!=t?t.options:t)?i.editSvg:i,t))?i:"")+'</a>\r\n <a class="svg-container cursor-pointer text-muted delete">'+(null!=(i=a(null!=(i=null!=t?t.options:t)?i.trashSvg:i,t))?i:"")+"</a>\r\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){e.propertyIsEnumerable;var i,a,u=null!=t?t:e.nullContext||{},l=e.hooks.helperMissing,c="function",s=e.escapeExpression;return'<span class="svg-container text-info mr-2">'+(null!=(i=e.lambda(null!=(i=null!=t?t.options:t)?i.linkSvg:i,t))?i:"")+'</span>\r\n<a class="w-75 text-truncate" href="'+s(typeof(a=null!=(a=n.url||(null!=t?t.url:t))?a:l)===c?a.call(u,{name:"url",hash:{},data:o}):a)+'" target="_blank">'+s(typeof(a=null!=(a=n.name||(null!=t?t.name:t))?a:l)===c?a.call(u,{name:"name",hash:{},data:o}):a)+"</a>\r\n"+(null!=(i=n.if.call(u,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>\r\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:"")+'\r\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>\r\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:"")+'\r\n<div class="resource-list-region"></div>'},useData:!0})}}]);
@@ -1,2 +1,2 @@
1
- /*! For license information please see 2802-6a6c18c88e.chunk.js.LICENSE.txt */
1
+ /*! For license information please see 2802-160b25677d.chunk.js.LICENSE.txt */
2
2
  "use strict";(self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[2802],{92802:function(e,t,r){r.d(t,{Bc:function(){return $r},gN:function(){return Rr},l0:function(){return Pr},J9:function(){return Tr},u9:function(){return vr},u6:function(){return jr}});var n=r(1024),o=r(41231),a=r.n(o),i=function(e){return function(e){return!!e&&"object"==typeof e}(e)&&!function(e){var t=Object.prototype.toString.call(e);return"[object RegExp]"===t||"[object Date]"===t||function(e){return e.$$typeof===u}(e)}(e)},u="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function c(e,t){return!1!==t.clone&&t.isMergeableObject(e)?s((r=e,Array.isArray(r)?[]:{}),e,t):e;var r}function l(e,t,r){return e.concat(t).map((function(e){return c(e,r)}))}function s(e,t,r){(r=r||{}).arrayMerge=r.arrayMerge||l,r.isMergeableObject=r.isMergeableObject||i;var n=Array.isArray(t);return n===Array.isArray(e)?n?r.arrayMerge(e,t,r):function(e,t,r){var n={};return r.isMergeableObject(e)&&Object.keys(e).forEach((function(t){n[t]=c(e[t],r)})),Object.keys(t).forEach((function(o){r.isMergeableObject(t[o])&&e[o]?n[o]=s(e[o],t[o],r):n[o]=c(t[o],r)})),n}(e,t,r):c(t,r)}s.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce((function(e,r){return s(e,r,t)}),{})};var f=s,p="object"==typeof global&&global&&global.Object===Object&&global,d="object"==typeof self&&self&&self.Object===Object&&self,y=p||d||Function("return this")(),v=y.Symbol,h=Object.prototype,b=h.hasOwnProperty,m=h.toString,_=v?v.toStringTag:void 0,g=Object.prototype.toString,j=v?v.toStringTag:void 0,S=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":j&&j in Object(e)?function(e){var t=b.call(e,_),r=e[_];try{e[_]=void 0;var n=!0}catch(e){}var o=m.call(e);return n&&(t?e[_]=r:delete e[_]),o}(e):function(e){return g.call(e)}(e)},E=function(e,t){return function(r){return e(t(r))}},O=E(Object.getPrototypeOf,Object),w=function(e){return null!=e&&"object"==typeof e},T=Function.prototype,A=Object.prototype,k=T.toString,F=A.hasOwnProperty,C=k.call(Object),R=function(e){if(!w(e)||"[object Object]"!=S(e))return!1;var t=O(e);if(null===t)return!0;var r=F.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&k.call(r)==C},P=function(e,t){return e===t||e!=e&&t!=t},x=function(e,t){for(var r=e.length;r--;)if(P(e[r][0],t))return r;return-1},I=Array.prototype.splice;function M(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}M.prototype.clear=function(){this.__data__=[],this.size=0},M.prototype.delete=function(e){var t=this.__data__,r=x(t,e);return!(r<0||(r==t.length-1?t.pop():I.call(t,r,1),--this.size,0))},M.prototype.get=function(e){var t=this.__data__,r=x(t,e);return r<0?void 0:t[r][1]},M.prototype.has=function(e){return x(this.__data__,e)>-1},M.prototype.set=function(e,t){var r=this.__data__,n=x(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this};var U,D=M,$=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)},L=function(e){if(!$(e))return!1;var t=S(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t},V=y["__core-js_shared__"],B=(U=/[^.]+$/.exec(V&&V.keys&&V.keys.IE_PROTO||""))?"Symbol(src)_1."+U:"",N=Function.prototype.toString,z=function(e){if(null!=e){try{return N.call(e)}catch(e){}try{return e+""}catch(e){}}return""},W=/^\[object .+?Constructor\]$/,G=Function.prototype,H=Object.prototype,q=G.toString,K=H.hasOwnProperty,Y=RegExp("^"+q.call(K).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),J=function(e){return!(!$(e)||(t=e,B&&B in t))&&(L(e)?Y:W).test(z(e));var t},Q=function(e,t){var r=function(e,t){return null==e?void 0:e[t]}(e,t);return J(r)?r:void 0},X=Q(y,"Map"),Z=Q(Object,"create"),ee=Object.prototype.hasOwnProperty,te=Object.prototype.hasOwnProperty;function re(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}re.prototype.clear=function(){this.__data__=Z?Z(null):{},this.size=0},re.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},re.prototype.get=function(e){var t=this.__data__;if(Z){var r=t[e];return"__lodash_hash_undefined__"===r?void 0:r}return ee.call(t,e)?t[e]:void 0},re.prototype.has=function(e){var t=this.__data__;return Z?void 0!==t[e]:te.call(t,e)},re.prototype.set=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=Z&&void 0===t?"__lodash_hash_undefined__":t,this};var ne=re,oe=function(e,t){var r,n,o=e.__data__;return("string"==(n=typeof(r=t))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==r:null===r)?o["string"==typeof t?"string":"hash"]:o.map};function ae(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}ae.prototype.clear=function(){this.size=0,this.__data__={hash:new ne,map:new(X||D),string:new ne}},ae.prototype.delete=function(e){var t=oe(this,e).delete(e);return this.size-=t?1:0,t},ae.prototype.get=function(e){return oe(this,e).get(e)},ae.prototype.has=function(e){return oe(this,e).has(e)},ae.prototype.set=function(e,t){var r=oe(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this};var ie=ae;function ue(e){var t=this.__data__=new D(e);this.size=t.size}ue.prototype.clear=function(){this.__data__=new D,this.size=0},ue.prototype.delete=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r},ue.prototype.get=function(e){return this.__data__.get(e)},ue.prototype.has=function(e){return this.__data__.has(e)},ue.prototype.set=function(e,t){var r=this.__data__;if(r instanceof D){var n=r.__data__;if(!X||n.length<199)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new ie(n)}return r.set(e,t),this.size=r.size,this};var ce=ue,le=function(){try{var e=Q(Object,"defineProperty");return e({},"",{}),e}catch(e){}}(),se=function(e,t,r){"__proto__"==t&&le?le(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r},fe=Object.prototype.hasOwnProperty,pe=function(e,t,r){var n=e[t];fe.call(e,t)&&P(n,r)&&(void 0!==r||t in e)||se(e,t,r)},de=function(e,t,r,n){var o=!r;r||(r={});for(var a=-1,i=t.length;++a<i;){var u=t[a],c=n?n(r[u],e[u],u,r,e):void 0;void 0===c&&(c=e[u]),o?se(r,u,c):pe(r,u,c)}return r},ye=function(e){return w(e)&&"[object Arguments]"==S(e)},ve=Object.prototype,he=ve.hasOwnProperty,be=ve.propertyIsEnumerable,me=ye(function(){return arguments}())?ye:function(e){return w(e)&&he.call(e,"callee")&&!be.call(e,"callee")},_e=me,ge=Array.isArray,je="object"==typeof exports&&exports&&!exports.nodeType&&exports,Se=je&&"object"==typeof module&&module&&!module.nodeType&&module,Ee=Se&&Se.exports===je?y.Buffer:void 0,Oe=(Ee?Ee.isBuffer:void 0)||function(){return!1},we=/^(?:0|[1-9]\d*)$/,Te=function(e,t){var r=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==r||"symbol"!=r&&we.test(e))&&e>-1&&e%1==0&&e<t},Ae=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991},ke={};ke["[object Float32Array]"]=ke["[object Float64Array]"]=ke["[object Int8Array]"]=ke["[object Int16Array]"]=ke["[object Int32Array]"]=ke["[object Uint8Array]"]=ke["[object Uint8ClampedArray]"]=ke["[object Uint16Array]"]=ke["[object Uint32Array]"]=!0,ke["[object Arguments]"]=ke["[object Array]"]=ke["[object ArrayBuffer]"]=ke["[object Boolean]"]=ke["[object DataView]"]=ke["[object Date]"]=ke["[object Error]"]=ke["[object Function]"]=ke["[object Map]"]=ke["[object Number]"]=ke["[object Object]"]=ke["[object RegExp]"]=ke["[object Set]"]=ke["[object String]"]=ke["[object WeakMap]"]=!1;var Fe=function(e){return function(t){return e(t)}},Ce="object"==typeof exports&&exports&&!exports.nodeType&&exports,Re=Ce&&"object"==typeof module&&module&&!module.nodeType&&module,Pe=Re&&Re.exports===Ce&&p.process,xe=function(){try{return Re&&Re.require&&Re.require("util").types||Pe&&Pe.binding&&Pe.binding("util")}catch(e){}}(),Ie=xe&&xe.isTypedArray,Me=Ie?Fe(Ie):function(e){return w(e)&&Ae(e.length)&&!!ke[S(e)]},Ue=Object.prototype.hasOwnProperty,De=function(e,t){var r=ge(e),n=!r&&_e(e),o=!r&&!n&&Oe(e),a=!r&&!n&&!o&&Me(e),i=r||n||o||a,u=i?function(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}(e.length,String):[],c=u.length;for(var l in e)!t&&!Ue.call(e,l)||i&&("length"==l||o&&("offset"==l||"parent"==l)||a&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||Te(l,c))||u.push(l);return u},$e=Object.prototype,Le=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||$e)},Ve=E(Object.keys,Object),Be=Object.prototype.hasOwnProperty,Ne=function(e){return null!=e&&Ae(e.length)&&!L(e)},ze=function(e){return Ne(e)?De(e):function(e){if(!Le(e))return Ve(e);var t=[];for(var r in Object(e))Be.call(e,r)&&"constructor"!=r&&t.push(r);return t}(e)},We=Object.prototype.hasOwnProperty,Ge=function(e){if(!$(e))return function(e){var t=[];if(null!=e)for(var r in Object(e))t.push(r);return t}(e);var t=Le(e),r=[];for(var n in e)("constructor"!=n||!t&&We.call(e,n))&&r.push(n);return r},He=function(e){return Ne(e)?De(e,!0):Ge(e)},qe="object"==typeof exports&&exports&&!exports.nodeType&&exports,Ke=qe&&"object"==typeof module&&module&&!module.nodeType&&module,Ye=Ke&&Ke.exports===qe?y.Buffer:void 0,Je=Ye?Ye.allocUnsafe:void 0,Qe=function(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t},Xe=function(){return[]},Ze=Object.prototype.propertyIsEnumerable,et=Object.getOwnPropertySymbols,tt=et?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var r=-1,n=null==e?0:e.length,o=0,a=[];++r<n;){var i=e[r];t(i,r,e)&&(a[o++]=i)}return a}(et(e),(function(t){return Ze.call(e,t)})))}:Xe,rt=function(e,t){for(var r=-1,n=t.length,o=e.length;++r<n;)e[o+r]=t[r];return e},nt=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)rt(t,tt(e)),e=O(e);return t}:Xe,ot=function(e,t,r){var n=t(e);return ge(e)?n:rt(n,r(e))},at=function(e){return ot(e,ze,tt)},it=function(e){return ot(e,He,nt)},ut=Q(y,"DataView"),ct=Q(y,"Promise"),lt=Q(y,"Set"),st=Q(y,"WeakMap"),ft="[object Map]",pt="[object Promise]",dt="[object Set]",yt="[object WeakMap]",vt="[object DataView]",ht=z(ut),bt=z(X),mt=z(ct),_t=z(lt),gt=z(st),jt=S;(ut&&jt(new ut(new ArrayBuffer(1)))!=vt||X&&jt(new X)!=ft||ct&&jt(ct.resolve())!=pt||lt&&jt(new lt)!=dt||st&&jt(new st)!=yt)&&(jt=function(e){var t=S(e),r="[object Object]"==t?e.constructor:void 0,n=r?z(r):"";if(n)switch(n){case ht:return vt;case bt:return ft;case mt:return pt;case _t:return dt;case gt:return yt}return t});var St=jt,Et=Object.prototype.hasOwnProperty,Ot=y.Uint8Array,wt=function(e){var t=new e.constructor(e.byteLength);return new Ot(t).set(new Ot(e)),t},Tt=/\w*$/,At=v?v.prototype:void 0,kt=At?At.valueOf:void 0,Ft=function(e,t,r){var n,o,a,i=e.constructor;switch(t){case"[object ArrayBuffer]":return wt(e);case"[object Boolean]":case"[object Date]":return new i(+e);case"[object DataView]":return function(e,t){var r=t?wt(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}(e,r);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return function(e,t){var r=t?wt(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}(e,r);case"[object Map]":case"[object Set]":return new i;case"[object Number]":case"[object String]":return new i(e);case"[object RegExp]":return(a=new(o=e).constructor(o.source,Tt.exec(o))).lastIndex=o.lastIndex,a;case"[object Symbol]":return n=e,kt?Object(kt.call(n)):{}}},Ct=Object.create,Rt=function(){function e(){}return function(t){if(!$(t))return{};if(Ct)return Ct(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}(),Pt=xe&&xe.isMap,xt=Pt?Fe(Pt):function(e){return w(e)&&"[object Map]"==St(e)},It=xe&&xe.isSet,Mt=It?Fe(It):function(e){return w(e)&&"[object Set]"==St(e)},Ut="[object Arguments]",Dt="[object Function]",$t={};$t[Ut]=$t["[object Array]"]=$t["[object ArrayBuffer]"]=$t["[object DataView]"]=$t["[object Boolean]"]=$t["[object Date]"]=$t["[object Float32Array]"]=$t["[object Float64Array]"]=$t["[object Int8Array]"]=$t["[object Int16Array]"]=$t["[object Int32Array]"]=$t["[object Map]"]=$t["[object Number]"]=$t["[object Object]"]=$t["[object RegExp]"]=$t["[object Set]"]=$t["[object String]"]=$t["[object Symbol]"]=$t["[object Uint8Array]"]=$t["[object Uint8ClampedArray]"]=$t["[object Uint16Array]"]=$t["[object Uint32Array]"]=!0,$t["[object Error]"]=$t[Dt]=$t["[object WeakMap]"]=!1;var Lt=function e(t,r,n,o,a,i){var u,c=1&r,l=2&r,s=4&r;if(n&&(u=a?n(t,o,a,i):n(t)),void 0!==u)return u;if(!$(t))return t;var f=ge(t);if(f){if(u=function(e){var t=e.length,r=new e.constructor(t);return t&&"string"==typeof e[0]&&Et.call(e,"index")&&(r.index=e.index,r.input=e.input),r}(t),!c)return Qe(t,u)}else{var p=St(t),d=p==Dt||"[object GeneratorFunction]"==p;if(Oe(t))return function(e,t){if(t)return e.slice();var r=e.length,n=Je?Je(r):new e.constructor(r);return e.copy(n),n}(t,c);if("[object Object]"==p||p==Ut||d&&!a){if(u=l||d?{}:function(e){return"function"!=typeof e.constructor||Le(e)?{}:Rt(O(e))}(t),!c)return l?function(e,t){return de(e,nt(e),t)}(t,function(e,t){return e&&de(t,He(t),e)}(u,t)):function(e,t){return de(e,tt(e),t)}(t,function(e,t){return e&&de(t,ze(t),e)}(u,t))}else{if(!$t[p])return a?t:{};u=Ft(t,p,c)}}i||(i=new ce);var y=i.get(t);if(y)return y;i.set(t,u),Mt(t)?t.forEach((function(o){u.add(e(o,r,n,o,t,i))})):xt(t)&&t.forEach((function(o,a){u.set(a,e(o,r,n,a,t,i))}));var v=f?void 0:(s?l?it:at:l?He:ze)(t);return function(e,t){for(var r=-1,n=null==e?0:e.length;++r<n&&!1!==t(e[r],r,e););}(v||t,(function(o,a){v&&(o=t[a=o]),pe(u,a,e(o,r,n,a,t,i))})),u},Vt=function(e){return Lt(e,4)},Bt=function(e,t){for(var r=-1,n=null==e?0:e.length,o=Array(n);++r<n;)o[r]=t(e[r],r,e);return o},Nt=function(e){return"symbol"==typeof e||w(e)&&"[object Symbol]"==S(e)};function zt(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var r=function(){var n=arguments,o=t?t.apply(this,n):n[0],a=r.cache;if(a.has(o))return a.get(o);var i=e.apply(this,n);return r.cache=a.set(o,i)||a,i};return r.cache=new(zt.Cache||ie),r}zt.Cache=ie;var Wt,Gt,Ht=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,qt=/\\(\\)?/g,Kt=(Wt=zt((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(Ht,(function(e,r,n,o){t.push(n?o.replace(qt,"$1"):r||e)})),t}),(function(e){return 500===Gt.size&&Gt.clear(),e})),Gt=Wt.cache,Wt),Yt=function(e){if("string"==typeof e||Nt(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t},Jt=v?v.prototype:void 0,Qt=Jt?Jt.toString:void 0,Xt=function e(t){if("string"==typeof t)return t;if(ge(t))return Bt(t,e)+"";if(Nt(t))return Qt?Qt.call(t):"";var r=t+"";return"0"==r&&1/t==-1/0?"-0":r},Zt=function(e){return null==e?"":Xt(e)},er=function(e){return ge(e)?Bt(e,Yt):Nt(e)?[e]:Qe(Kt(Zt(e)))},tr=r(9146),rr=r(86058),nr=r.n(rr),or=function(e){return Lt(e,5)};function ar(){return ar=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ar.apply(this,arguments)}function ir(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function ur(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}function cr(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var lr=function(e){return"function"==typeof e},sr=function(e){return null!==e&&"object"==typeof e},fr=function(e){return String(Math.floor(Number(e)))===e},pr=function(e){return"[object String]"===Object.prototype.toString.call(e)},dr=function(e){return 0===n.Children.count(e)},yr=function(e){return sr(e)&&lr(e.then)};function vr(e,t,r,n){void 0===n&&(n=0);for(var o=er(t);e&&n<o.length;)e=e[o[n++]];return void 0===e?r:e}function hr(e,t,r){for(var n=Vt(e),o=n,a=0,i=er(t);a<i.length-1;a++){var u=i[a],c=vr(e,i.slice(0,a+1));if(c&&(sr(c)||Array.isArray(c)))o=o[u]=Vt(c);else{var l=i[a+1];o=o[u]=fr(l)&&Number(l)>=0?[]:{}}}return(0===a?e:o)[i[a]]===r?e:(void 0===r?delete o[i[a]]:o[i[a]]=r,0===a&&void 0===r&&delete n[i[a]],n)}function br(e,t,r,n){void 0===r&&(r=new WeakMap),void 0===n&&(n={});for(var o=0,a=Object.keys(e);o<a.length;o++){var i=a[o],u=e[i];sr(u)?r.get(u)||(r.set(u,!0),n[i]=Array.isArray(u)?[]:{},br(u,t,r,n[i])):n[i]=t}return n}var mr=(0,n.createContext)(void 0),_r=mr.Provider,gr=mr.Consumer;function jr(){var e=(0,n.useContext)(mr);return e}function Sr(e,t){switch(t.type){case"SET_VALUES":return ar({},e,{values:t.payload});case"SET_TOUCHED":return ar({},e,{touched:t.payload});case"SET_ERRORS":return ar({},e,{errors:t.payload});case"SET_STATUS":return ar({},e,{status:t.payload});case"SET_ISSUBMITTING":return ar({},e,{isSubmitting:t.payload});case"SET_ISVALIDATING":return ar({},e,{isValidating:t.payload});case"SET_FIELD_VALUE":return ar({},e,{values:hr(e.values,t.payload.field,t.payload.value)});case"SET_FIELD_TOUCHED":return ar({},e,{touched:hr(e.touched,t.payload.field,t.payload.value)});case"SET_FIELD_ERROR":return ar({},e,{errors:hr(e.errors,t.payload.field,t.payload.value)});case"RESET_FORM":return ar({},e,t.payload);case"SET_FORMIK_STATE":return t.payload(e);case"SUBMIT_ATTEMPT":return ar({},e,{touched:br(e.values,!0),isSubmitting:!0,submitCount:e.submitCount+1});case"SUBMIT_FAILURE":case"SUBMIT_SUCCESS":return ar({},e,{isSubmitting:!1});default:return e}}var Er={},Or={};function wr(e){var t=e.validateOnChange,r=void 0===t||t,o=e.validateOnBlur,i=void 0===o||o,u=e.validateOnMount,c=void 0!==u&&u,l=e.isInitialValid,s=e.enableReinitialize,p=void 0!==s&&s,d=e.onSubmit,y=ur(e,["validateOnChange","validateOnBlur","validateOnMount","isInitialValid","enableReinitialize","onSubmit"]),v=ar({validateOnChange:r,validateOnBlur:i,validateOnMount:c,onSubmit:d},y),h=(0,n.useRef)(v.initialValues),b=(0,n.useRef)(v.initialErrors||Er),m=(0,n.useRef)(v.initialTouched||Or),_=(0,n.useRef)(v.initialStatus),g=(0,n.useRef)(!1),j=(0,n.useRef)({});(0,n.useEffect)((function(){}),[]),(0,n.useEffect)((function(){return g.current=!0,function(){g.current=!1}}),[]);var S=(0,n.useReducer)(Sr,{values:v.initialValues,errors:v.initialErrors||Er,touched:v.initialTouched||Or,status:v.initialStatus,isSubmitting:!1,isValidating:!1,submitCount:0}),E=S[0],O=S[1],w=(0,n.useCallback)((function(e,t){return new Promise((function(r,n){var o=v.validate(e,t);null==o?r(Er):yr(o)?o.then((function(e){r(e||Er)}),(function(e){n(e)})):r(o)}))}),[v.validate]),T=(0,n.useCallback)((function(e,t){var r=v.validationSchema,n=lr(r)?r(t):r,o=t&&n.validateAt?n.validateAt(t,e):function(e,t,r,n){void 0===r&&(r=!1),void 0===n&&(n={});var o=Ar(e);return t[r?"validateSync":"validate"](o,{abortEarly:!1,context:n})}(e,n);return new Promise((function(e,t){o.then((function(){e(Er)}),(function(r){"ValidationError"===r.name?e(function(e){var t={};if(e.inner){if(0===e.inner.length)return hr(t,e.path,e.message);var r=e.inner,n=Array.isArray(r),o=0;for(r=n?r:r[Symbol.iterator]();;){var a;if(n){if(o>=r.length)break;a=r[o++]}else{if((o=r.next()).done)break;a=o.value}var i=a;vr(t,i.path)||(t=hr(t,i.path,i.message))}}return t}(r)):t(r)}))}))}),[v.validationSchema]),A=(0,n.useCallback)((function(e,t){return new Promise((function(r){return r(j.current[e].validate(t))}))}),[]),k=(0,n.useCallback)((function(e){var t=Object.keys(j.current).filter((function(e){return lr(j.current[e].validate)})),r=t.length>0?t.map((function(t){return A(t,vr(e,t))})):[Promise.resolve("DO_NOT_DELETE_YOU_WILL_BE_FIRED")];return Promise.all(r).then((function(e){return e.reduce((function(e,r,n){return"DO_NOT_DELETE_YOU_WILL_BE_FIRED"===r||r&&(e=hr(e,t[n],r)),e}),{})}))}),[A]),F=(0,n.useCallback)((function(e){return Promise.all([k(e),v.validationSchema?T(e):{},v.validate?w(e):{}]).then((function(e){var t=e[0],r=e[1],n=e[2];return f.all([t,r,n],{arrayMerge:kr})}))}),[v.validate,v.validationSchema,k,w,T]),C=Cr((function(e){return void 0===e&&(e=E.values),(0,tr.unstable_runWithPriority)(tr.LowPriority,(function(){return F(e).then((function(e){return g.current&&O({type:"SET_ERRORS",payload:e}),e}))}))})),R=Cr((function(e){return void 0===e&&(e=E.values),O({type:"SET_ISVALIDATING",payload:!0}),F(e).then((function(e){return g.current&&(O({type:"SET_ISVALIDATING",payload:!1}),a()(E.errors,e)||O({type:"SET_ERRORS",payload:e})),e}))}));(0,n.useEffect)((function(){c&&!0===g.current&&C(v.initialValues)}),[v.initialValues,c,C]);var P=(0,n.useCallback)((function(e){var t=e&&e.values?e.values:h.current,r=e&&e.errors?e.errors:b.current?b.current:v.initialErrors||{},n=e&&e.touched?e.touched:m.current?m.current:v.initialTouched||{},o=e&&e.status?e.status:_.current?_.current:v.initialStatus;h.current=t,b.current=r,m.current=n,_.current=o,O({type:"RESET_FORM",payload:{isSubmitting:!!e&&!!e.isSubmitting,errors:r,touched:n,status:o,values:t,isValidating:!!e&&!!e.isValidating,submitCount:e&&e.submitCount&&"number"==typeof e.submitCount?e.submitCount:0}})}),[v.initialErrors,v.initialStatus,v.initialTouched]);(0,n.useEffect)((function(){p&&!0===g.current&&!a()(h.current,v.initialValues)&&(h.current=v.initialValues,P())}),[p,v.initialValues,P]),(0,n.useEffect)((function(){p&&!0===g.current&&!a()(b.current,v.initialErrors)&&(b.current=v.initialErrors||Er,O({type:"SET_ERRORS",payload:v.initialErrors||Er}))}),[p,v.initialErrors]),(0,n.useEffect)((function(){p&&!0===g.current&&!a()(m.current,v.initialTouched)&&(m.current=v.initialTouched||Or,O({type:"SET_TOUCHED",payload:v.initialTouched||Or}))}),[p,v.initialTouched]),(0,n.useEffect)((function(){p&&!0===g.current&&!a()(_.current,v.initialStatus)&&(_.current=v.initialStatus,O({type:"SET_STATUS",payload:v.initialStatus}))}),[p,v.initialStatus,v.initialTouched]);var x=Cr((function(e){if(lr(j.current[e].validate)){var t=vr(E.values,e),r=j.current[e].validate(t);return yr(r)?(O({type:"SET_ISVALIDATING",payload:!0}),r.then((function(e){return e})).then((function(t){O({type:"SET_FIELD_ERROR",payload:{field:e,value:t}}),O({type:"SET_ISVALIDATING",payload:!1})}))):(O({type:"SET_FIELD_ERROR",payload:{field:e,value:r}}),Promise.resolve(r))}return Promise.resolve()})),I=(0,n.useCallback)((function(e,t){var r=t.validate;j.current[e]={validate:r}}),[]),M=(0,n.useCallback)((function(e){delete j.current[e]}),[]),U=Cr((function(e){return O({type:"SET_TOUCHED",payload:e}),i?C(E.values):Promise.resolve()})),D=(0,n.useCallback)((function(e){O({type:"SET_ERRORS",payload:e})}),[]),$=Cr((function(e){return O({type:"SET_VALUES",payload:e}),r?C(e):Promise.resolve()})),L=(0,n.useCallback)((function(e,t){O({type:"SET_FIELD_ERROR",payload:{field:e,value:t}})}),[]),V=Cr((function(e,t,n){return void 0===n&&(n=!0),O({type:"SET_FIELD_VALUE",payload:{field:e,value:t}}),r&&n?C(hr(E.values,e,t)):Promise.resolve()})),B=(0,n.useCallback)((function(e,t){var r,n=t,o=e;if(!pr(e)){e.persist&&e.persist();var a=e.target,i=a.type,u=a.name,c=a.id,l=a.value,s=a.checked,f=(a.outerHTML,a.options),p=a.multiple;n=t||u||c,o=/number|range/.test(i)?(r=parseFloat(l),isNaN(r)?"":r):/checkbox/.test(i)?function(e,t,r){if("true"==r||"false"==r)return!!t;if(t&&r)return Array.isArray(e)?e.concat(r):[r];if(!Array.isArray(e))return!e;var n=e.indexOf(r);return n<0?e:e.slice(0,n).concat(e.slice(n+1))}(vr(E.values,n),s,l):p?function(e){return Array.from(e).filter((function(e){return e.selected})).map((function(e){return e.value}))}(f):l}n&&V(n,o)}),[V,E.values]),N=(0,n.useCallback)((function(e){if(pr(e))return function(t){return B(t,e)};B(e)}),[B]),z=Cr((function(e,t,r){return void 0===t&&(t=!0),void 0===r&&(r=!0),O({type:"SET_FIELD_TOUCHED",payload:{field:e,value:t}}),i&&r?C(E.values):Promise.resolve()})),W=(0,n.useCallback)((function(e,t){e.persist&&e.persist();var r=e.target,n=r.name,o=r.id,a=(r.outerHTML,t||n||o);z(a,!0)}),[z]),G=(0,n.useCallback)((function(e){if(pr(e))return function(t){return W(t,e)};W(e)}),[W]),H=(0,n.useCallback)((function(e){lr(e)?O({type:"SET_FORMIK_STATE",payload:e}):O({type:"SET_FORMIK_STATE",payload:function(){return e}})}),[]),q=(0,n.useCallback)((function(e){O({type:"SET_STATUS",payload:e})}),[]),K=(0,n.useCallback)((function(e){O({type:"SET_ISSUBMITTING",payload:e})}),[]),Y={resetForm:P,validateForm:R,validateField:x,setErrors:D,setFieldError:L,setFieldTouched:z,setFieldValue:V,setStatus:q,setSubmitting:K,setTouched:U,setValues:$,setFormikState:H},J=Cr((function(){return d(E.values,Y)})),Q=Cr((function(){return O({type:"SUBMIT_ATTEMPT"}),R().then((function(e){if(0===Object.keys(e).length){var t=J();if(void 0===t)return;return Promise.resolve(t).then((function(){g.current&&O({type:"SUBMIT_SUCCESS"})})).catch((function(e){if(g.current)throw O({type:"SUBMIT_FAILURE"}),e}))}g.current&&O({type:"SUBMIT_FAILURE"})}))})),X=Cr((function(e){e&&e.preventDefault&&lr(e.preventDefault)&&e.preventDefault(),e&&e.stopPropagation&&lr(e.stopPropagation)&&e.stopPropagation(),Q()})),Z=Cr((function(e){if(e&&e.preventDefault&&lr(e.preventDefault)&&e.preventDefault(),e&&e.stopPropagation&&lr(e.stopPropagation)&&e.stopPropagation(),v.onReset){var t=v.onReset(E.values,Y);yr(t)?t.then(P):P()}else P()})),ee=(0,n.useCallback)((function(e){return{value:vr(E.values,e),error:vr(E.errors,e),touched:!!vr(E.touched,e),initialValue:vr(h.current,e),initialTouched:!!vr(m.current,e),initialError:vr(b.current,e)}}),[E.errors,E.touched,E.values]),te=(0,n.useCallback)((function(e){var t=sr(e),r=t?e.name:e,n=vr(E.values,r),o={name:r,value:n,onChange:N,onBlur:G};if(t){var a=e.type,i=e.value,u=e.as,c=e.multiple;"checkbox"===a?void 0===i?o.checked=!!n:(o.checked=!(!Array.isArray(n)||!~n.indexOf(i)),o.value=i):"radio"===a?(o.checked=n===i,o.value=i):"select"===u&&c&&(o.value=o.value||[],o.multiple=!0)}return o}),[G,N,E.values]),re=(0,n.useMemo)((function(){return!a()(h.current,E.values)}),[E.values]),ne=(0,n.useMemo)((function(){return void 0!==l?re?E.errors&&0===Object.keys(E.errors).length:!1!==l&&lr(l)?l(v):l:E.errors&&0===Object.keys(E.errors).length}),[l,re,E.errors,v]);return ar({},E,{initialValues:h.current,initialErrors:b.current,initialTouched:m.current,initialStatus:_.current,handleBlur:G,handleChange:N,handleReset:Z,handleSubmit:X,resetForm:P,setErrors:D,setFormikState:H,setFieldTouched:z,setFieldValue:V,setFieldError:L,setStatus:q,setSubmitting:K,setTouched:U,setValues:$,submitForm:Q,validateForm:R,validateField:x,isValid:ne,dirty:re,unregisterField:M,registerField:I,getFieldProps:te,getFieldMeta:ee,validateOnBlur:i,validateOnChange:r,validateOnMount:c})}function Tr(e){var t=wr(e),r=e.component,o=e.children,a=e.render;return(0,n.useEffect)((function(){}),[]),(0,n.createElement)(_r,{value:t},r?(0,n.createElement)(r,t):a?a(t):o?lr(o)?o(t):dr(o)?null:n.Children.only(o):null)}function Ar(e){var t={};for(var r in e)if(e.hasOwnProperty(r)){var n=String(r);!0===Array.isArray(e[n])?t[n]=e[n].map((function(e){return!0===Array.isArray(e)||R(e)?Ar(e):""!==e?e:void 0})):R(e[n])?t[n]=Ar(e[n]):t[n]=""!==e[n]?e[n]:void 0}return t}function kr(e,t,r){var n=e.slice();return t.forEach((function(t,o){if(void 0===n[o]){var a=!1!==r.clone&&r.isMergeableObject(t);n[o]=a?f(Array.isArray(t)?[]:{},t,r):t}else r.isMergeableObject(t)?n[o]=f(e[o],t,r):-1===e.indexOf(t)&&n.push(t)})),n}var Fr="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?n.useLayoutEffect:n.useEffect;function Cr(e){var t=(0,n.useRef)(e);return Fr((function(){t.current=e})),(0,n.useCallback)((function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return t.current.apply(void 0,r)}),[])}function Rr(e){var t=e.validate,r=e.name,o=e.render,a=e.children,i=e.as,u=e.component,c=ur(e,["validate","name","render","children","as","component"]),l=jr(),s=(l.validate,l.validationSchema,ur(l,["validate","validationSchema"]));(0,n.useEffect)((function(){}),[]);var f=s.registerField,p=s.unregisterField;(0,n.useEffect)((function(){return f(r,{validate:t}),function(){p(r)}}),[f,p,r,t]);var d=s.getFieldProps(ar({name:r},c)),y=s.getFieldMeta(r),v={field:d,form:s};if(o)return o(ar({},v,{meta:y}));if(lr(a))return a(ar({},v,{meta:y}));if(u){if("string"==typeof u){var h=c.innerRef,b=ur(c,["innerRef"]);return(0,n.createElement)(u,ar({ref:h},d,b),a)}return(0,n.createElement)(u,ar({field:d,form:s},c),a)}var m=i||"input";if("string"==typeof m){var _=c.innerRef,g=ur(c,["innerRef"]);return(0,n.createElement)(m,ar({ref:_},d,g),a)}return(0,n.createElement)(m,ar({},d,c),a)}var Pr=(0,n.forwardRef)((function(e,t){var r=e.action,o=ur(e,["action"]),a=r||"#",i=jr(),u=i.handleReset,c=i.handleSubmit;return(0,n.createElement)("form",Object.assign({onSubmit:c,ref:t,onReset:u,action:a},o))}));function xr(e){var t=function(t){return(0,n.createElement)(gr,null,(function(r){return(0,n.createElement)(e,Object.assign({},t,{formik:r}))}))},r=e.displayName||e.name||e.constructor&&e.constructor.name||"Component";return t.WrappedComponent=e,t.displayName="FormikConnect("+r+")",nr()(t,e)}Pr.displayName="Form";var Ir=function(e,t,r){var n=Mr(e);return n.splice(t,0,r),n},Mr=function(e){if(e){if(Array.isArray(e))return[].concat(e);var t=Object.keys(e).map((function(e){return parseInt(e)})).reduce((function(e,t){return t>e?t:e}),0);return Array.from(ar({},e,{length:t+1}))}return[]},Ur=function(e){function t(t){var r;return(r=e.call(this,t)||this).updateArrayField=function(e,t,n){var o=r.props,a=o.name,i=o.validateOnChange,u=o.formik,c=u.setFormikState,l=u.validateForm;c((function(r){var o="function"==typeof n?n:e,i="function"==typeof t?t:e;return ar({},r,{values:hr(r.values,a,e(vr(r.values,a))),errors:n?hr(r.errors,a,o(vr(r.errors,a))):r.errors,touched:t?hr(r.touched,a,i(vr(r.touched,a))):r.touched})}),(function(){i&&l()}))},r.push=function(e){return r.updateArrayField((function(t){return[].concat(Mr(t),[or(e)])}),!1,!1)},r.handlePush=function(e){return function(){return r.push(e)}},r.swap=function(e,t){return r.updateArrayField((function(r){return function(e,t,r){var n=Mr(e),o=n[t];return n[t]=n[r],n[r]=o,n}(r,e,t)}),!0,!0)},r.handleSwap=function(e,t){return function(){return r.swap(e,t)}},r.move=function(e,t){return r.updateArrayField((function(r){return function(e,t,r){var n=Mr(e),o=n[t];return n.splice(t,1),n.splice(r,0,o),n}(r,e,t)}),!0,!0)},r.handleMove=function(e,t){return function(){return r.move(e,t)}},r.insert=function(e,t){return r.updateArrayField((function(r){return Ir(r,e,t)}),(function(t){return Ir(t,e,null)}),(function(t){return Ir(t,e,null)}))},r.handleInsert=function(e,t){return function(){return r.insert(e,t)}},r.replace=function(e,t){return r.updateArrayField((function(r){return function(e,t,r){var n=Mr(e);return n[t]=r,n}(r,e,t)}),!1,!1)},r.handleReplace=function(e,t){return function(){return r.replace(e,t)}},r.unshift=function(e){var t=-1;return r.updateArrayField((function(r){var n=r?[e].concat(r):[e];return t<0&&(t=n.length),n}),(function(e){var r=e?[null].concat(e):[null];return t<0&&(t=r.length),r}),(function(e){var r=e?[null].concat(e):[null];return t<0&&(t=r.length),r})),t},r.handleUnshift=function(e){return function(){return r.unshift(e)}},r.handleRemove=function(e){return function(){return r.remove(e)}},r.handlePop=function(){return function(){return r.pop()}},r.remove=r.remove.bind(cr(r)),r.pop=r.pop.bind(cr(r)),r}ir(t,e);var r=t.prototype;return r.remove=function(e){var t;return this.updateArrayField((function(r){var n=r?Mr(r):[];return t||(t=n[e]),lr(n.splice)&&n.splice(e,1),n}),!0,!0),t},r.pop=function(){var e;return this.updateArrayField((function(t){var r=t;return e||(e=r&&r.pop&&r.pop()),r}),!0,!0),e},r.render=function(){var e={push:this.push,pop:this.pop,swap:this.swap,move:this.move,insert:this.insert,replace:this.replace,unshift:this.unshift,remove:this.remove,handlePush:this.handlePush,handlePop:this.handlePop,handleSwap:this.handleSwap,handleMove:this.handleMove,handleInsert:this.handleInsert,handleReplace:this.handleReplace,handleUnshift:this.handleUnshift,handleRemove:this.handleRemove},t=this.props,r=t.component,o=t.render,a=t.children,i=t.name,u=t.formik,c=(u.validate,u.validationSchema,ar({},e,{form:ur(u,["validate","validationSchema"]),name:i}));return r?(0,n.createElement)(r,c):o?o(c):a?"function"==typeof a?a(c):dr(a)?null:n.Children.only(a):null},t}(n.Component);Ur.defaultProps={validateOnChange:!0};var Dr=function(e){function t(){return e.apply(this,arguments)||this}ir(t,e);var r=t.prototype;return r.shouldComponentUpdate=function(e){return vr(this.props.formik.errors,this.props.name)!==vr(e.formik.errors,this.props.name)||vr(this.props.formik.touched,this.props.name)!==vr(e.formik.touched,this.props.name)||Object.keys(this.props).length!==Object.keys(e).length},r.render=function(){var e=this.props,t=e.component,r=e.formik,o=e.render,a=e.children,i=e.name,u=ur(e,["component","formik","render","children","name"]),c=vr(r.touched,i),l=vr(r.errors,i);return c&&l?o?lr(o)?o(l):null:a?lr(a)?a(l):null:t?(0,n.createElement)(t,u,l):l:null},t}(n.Component),$r=xr(Dr);(function(e){function t(t){var r;r=e.call(this,t)||this;var n=t.render,o=t.children,a=t.component,i=t.as;return t.name,i&&o&&lr(o),a&&o&&lr(o),n&&o&&dr(o),r}ir(t,e);var r=t.prototype;return r.shouldComponentUpdate=function(e,t,r){return this.props.shouldUpdate?this.props.shouldUpdate(e,this.props):vr(this.context.values,this.props.name)!==vr(r.values,this.props.name)||vr(this.context.errors,this.props.name)!==vr(r.errors,this.props.name)||vr(this.context.touched,this.props.name)!==vr(r.touched,this.props.name)||Object.keys(this.props).length!==Object.keys(e).length||this.context.isSubmitting!==r.isSubmitting},r.componentDidMount=function(){this.context.registerField(this.props.name,{validate:this.props.validate})},r.componentDidUpdate=function(e){this.props.name!==e.name&&(this.context.unregisterField(e.name),this.context.registerField(this.props.name,{validate:this.props.validate})),this.props.validate!==e.validate&&this.context.registerField(this.props.name,{validate:this.props.validate})},r.componentWillUnmount=function(){this.context.unregisterField(this.props.name)},r.render=function(){var e=this.props,t=(e.validate,e.name),r=e.render,o=e.as,a=e.children,i=e.component,u=(e.shouldUpdate,ur(e,["validate","name","render","as","children","component","shouldUpdate"])),c=this.context,l=(c.validate,c.validationSchema,ur(c,["validate","validationSchema"])),s={value:"radio"===u.type||"checkbox"===u.type?u.value:vr(c.values,t),name:t,onChange:c.handleChange,onBlur:c.handleBlur},f={field:s,meta:{value:vr(c.values,t),error:vr(c.errors,t),touched:!!vr(c.touched,t),initialValue:vr(c.initialValues,t),initialTouched:!!vr(c.initialTouched,t),initialError:vr(c.initialErrors,t)},form:l};if(r)return r(f);if(lr(a))return a(f);if(i){if("string"==typeof i){var p=u.innerRef,d=ur(u,["innerRef"]);return(0,n.createElement)(i,ar({ref:p},s,d),a)}return(0,n.createElement)(i,ar({field:s,form:c},u),a)}var y=o||"input";if("string"==typeof y){var v=u.innerRef,h=ur(u,["innerRef"]);return(0,n.createElement)(y,ar({ref:v},s,h),a)}return(0,n.createElement)(y,ar({},s,u),a)},t}(n.Component)).contextType=mr},41231:function(e){var t=Array.isArray,r=Object.keys,n=Object.prototype.hasOwnProperty,o="undefined"!=typeof Element;function a(e,i){if(e===i)return!0;if(e&&i&&"object"==typeof e&&"object"==typeof i){var u,c,l,s=t(e),f=t(i);if(s&&f){if((c=e.length)!=i.length)return!1;for(u=c;0!=u--;)if(!a(e[u],i[u]))return!1;return!0}if(s!=f)return!1;var p=e instanceof Date,d=i instanceof Date;if(p!=d)return!1;if(p&&d)return e.getTime()==i.getTime();var y=e instanceof RegExp,v=i instanceof RegExp;if(y!=v)return!1;if(y&&v)return e.toString()==i.toString();var h=r(e);if((c=h.length)!==r(i).length)return!1;for(u=c;0!=u--;)if(!n.call(i,h[u]))return!1;if(o&&e instanceof Element&&i instanceof Element)return e===i;for(u=c;0!=u--;)if(!("_owner"===(l=h[u])&&e.$$typeof||a(e[l],i[l])))return!1;return!0}return e!=e&&i!=i}e.exports=function(e,t){try{return a(e,t)}catch(e){if(e.message&&e.message.match(/stack|recursion/i)||-2146828260===e.number)return console.warn("Warning: react-fast-compare does not handle circular references.",e.name,e.message),!1;throw e}}},86058:function(e,t,r){var n=r(72594),o={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},a={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},i={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},u={};function c(e){return n.isMemo(e)?i:u[e.$$typeof]||o}u[n.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},u[n.Memo]=i;var l=Object.defineProperty,s=Object.getOwnPropertyNames,f=Object.getOwnPropertySymbols,p=Object.getOwnPropertyDescriptor,d=Object.getPrototypeOf,y=Object.prototype;e.exports=function e(t,r,n){if("string"!=typeof r){if(y){var o=d(r);o&&o!==y&&e(t,o,n)}var i=s(r);f&&(i=i.concat(f(r)));for(var u=c(t),v=c(r),h=0;h<i.length;++h){var b=i[h];if(!(a[b]||n&&n[b]||v&&v[b]||u&&u[b])){var m=p(r,b);try{l(t,b,m)}catch(e){}}}}return t}},26697:function(e,t){var r="function"==typeof Symbol&&Symbol.for,n=r?Symbol.for("react.element"):60103,o=r?Symbol.for("react.portal"):60106,a=r?Symbol.for("react.fragment"):60107,i=r?Symbol.for("react.strict_mode"):60108,u=r?Symbol.for("react.profiler"):60114,c=r?Symbol.for("react.provider"):60109,l=r?Symbol.for("react.context"):60110,s=r?Symbol.for("react.async_mode"):60111,f=r?Symbol.for("react.concurrent_mode"):60111,p=r?Symbol.for("react.forward_ref"):60112,d=r?Symbol.for("react.suspense"):60113,y=r?Symbol.for("react.suspense_list"):60120,v=r?Symbol.for("react.memo"):60115,h=r?Symbol.for("react.lazy"):60116,b=r?Symbol.for("react.block"):60121,m=r?Symbol.for("react.fundamental"):60117,_=r?Symbol.for("react.responder"):60118,g=r?Symbol.for("react.scope"):60119;function j(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case n:switch(e=e.type){case s:case f:case a:case u:case i:case d:return e;default:switch(e=e&&e.$$typeof){case l:case p:case h:case v:case c:return e;default:return t}}case o:return t}}}function S(e){return j(e)===f}t.AsyncMode=s,t.ConcurrentMode=f,t.ContextConsumer=l,t.ContextProvider=c,t.Element=n,t.ForwardRef=p,t.Fragment=a,t.Lazy=h,t.Memo=v,t.Portal=o,t.Profiler=u,t.StrictMode=i,t.Suspense=d,t.isAsyncMode=function(e){return S(e)||j(e)===s},t.isConcurrentMode=S,t.isContextConsumer=function(e){return j(e)===l},t.isContextProvider=function(e){return j(e)===c},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===n},t.isForwardRef=function(e){return j(e)===p},t.isFragment=function(e){return j(e)===a},t.isLazy=function(e){return j(e)===h},t.isMemo=function(e){return j(e)===v},t.isPortal=function(e){return j(e)===o},t.isProfiler=function(e){return j(e)===u},t.isStrictMode=function(e){return j(e)===i},t.isSuspense=function(e){return j(e)===d},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===a||e===f||e===u||e===i||e===d||e===y||"object"==typeof e&&null!==e&&(e.$$typeof===h||e.$$typeof===v||e.$$typeof===c||e.$$typeof===l||e.$$typeof===p||e.$$typeof===m||e.$$typeof===_||e.$$typeof===g||e.$$typeof===b)},t.typeOf=j},72594:function(e,t,r){e.exports=r(26697)},39666:function(e,t){var r,n,o,a,i;if(Object.defineProperty(t,"__esModule",{value:!0}),"undefined"==typeof window||"function"!=typeof MessageChannel){var u=null,c=null,l=function(){if(null!==u)try{var e=t.unstable_now();u(!0,e),u=null}catch(e){throw setTimeout(l,0),e}},s=Date.now();t.unstable_now=function(){return Date.now()-s},r=function(e){null!==u?setTimeout(r,0,e):(u=e,setTimeout(l,0))},n=function(e,t){c=setTimeout(e,t)},o=function(){clearTimeout(c)},a=function(){return!1},i=t.unstable_forceFrameRate=function(){}}else{var f=window.performance,p=window.Date,d=window.setTimeout,y=window.clearTimeout,v=window.requestAnimationFrame,h=window.cancelAnimationFrame;if("undefined"!=typeof console&&("function"!=typeof v&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills"),"function"!=typeof h&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills")),"object"==typeof f&&"function"==typeof f.now)t.unstable_now=function(){return f.now()};else{var b=p.now();t.unstable_now=function(){return p.now()-b}}var m=!1,_=null,g=-1,j=5,S=0;a=function(){return t.unstable_now()>=S},i=function(){},t.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing framerates higher than 125 fps is not unsupported"):j=0<e?Math.floor(1e3/e):33.33};var E=new MessageChannel,O=E.port2;E.port1.onmessage=function(){if(null!==_){var e=t.unstable_now();S=e+j;try{_(!0,e)?O.postMessage(null):(m=!1,_=null)}catch(e){throw O.postMessage(null),e}}else m=!1},r=function(e){_=e,m||(m=!0,O.postMessage(null))},n=function(e,r){g=d((function(){e(t.unstable_now())}),r)},o=function(){y(g),g=-1}}function w(e,t){var r=e.length;e.push(t);e:for(;;){var n=Math.floor((r-1)/2),o=e[n];if(!(void 0!==o&&0<k(o,t)))break e;e[n]=t,e[r]=o,r=n}}function T(e){return void 0===(e=e[0])?null:e}function A(e){var t=e[0];if(void 0!==t){var r=e.pop();if(r!==t){e[0]=r;e:for(var n=0,o=e.length;n<o;){var a=2*(n+1)-1,i=e[a],u=a+1,c=e[u];if(void 0!==i&&0>k(i,r))void 0!==c&&0>k(c,i)?(e[n]=c,e[u]=r,n=u):(e[n]=i,e[a]=r,n=a);else{if(!(void 0!==c&&0>k(c,r)))break e;e[n]=c,e[u]=r,n=u}}}return t}return null}function k(e,t){var r=e.sortIndex-t.sortIndex;return 0!==r?r:e.id-t.id}var F=[],C=[],R=1,P=null,x=3,I=!1,M=!1,U=!1;function D(e){for(var t=T(C);null!==t;){if(null===t.callback)A(C);else{if(!(t.startTime<=e))break;A(C),t.sortIndex=t.expirationTime,w(F,t)}t=T(C)}}function $(e){if(U=!1,D(e),!M)if(null!==T(F))M=!0,r(L);else{var t=T(C);null!==t&&n($,t.startTime-e)}}function L(e,r){M=!1,U&&(U=!1,o()),I=!0;var i=x;try{for(D(r),P=T(F);null!==P&&(!(P.expirationTime>r)||e&&!a());){var u=P.callback;if(null!==u){P.callback=null,x=P.priorityLevel;var c=u(P.expirationTime<=r);r=t.unstable_now(),"function"==typeof c?P.callback=c:P===T(F)&&A(F),D(r)}else A(F);P=T(F)}if(null!==P)var l=!0;else{var s=T(C);null!==s&&n($,s.startTime-r),l=!1}return l}finally{P=null,x=i,I=!1}}function V(e){switch(e){case 1:return-1;case 2:return 250;case 5:return 1073741823;case 4:return 1e4;default:return 5e3}}var B=i;t.unstable_ImmediatePriority=1,t.unstable_UserBlockingPriority=2,t.unstable_NormalPriority=3,t.unstable_IdlePriority=5,t.unstable_LowPriority=4,t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var r=x;x=e;try{return t()}finally{x=r}},t.unstable_next=function(e){switch(x){case 1:case 2:case 3:var t=3;break;default:t=x}var r=x;x=t;try{return e()}finally{x=r}},t.unstable_scheduleCallback=function(e,a,i){var u=t.unstable_now();if("object"==typeof i&&null!==i){var c=i.delay;c="number"==typeof c&&0<c?u+c:u,i="number"==typeof i.timeout?i.timeout:V(e)}else i=V(e),c=u;return e={id:R++,callback:a,priorityLevel:e,startTime:c,expirationTime:i=c+i,sortIndex:-1},c>u?(e.sortIndex=c,w(C,e),null===T(F)&&e===T(C)&&(U?o():U=!0,n($,c-u))):(e.sortIndex=i,w(F,e),M||I||(M=!0,r(L))),e},t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_wrapCallback=function(e){var t=x;return function(){var r=x;x=t;try{return e.apply(this,arguments)}finally{x=r}}},t.unstable_getCurrentPriorityLevel=function(){return x},t.unstable_shouldYield=function(){var e=t.unstable_now();D(e);var r=T(F);return r!==P&&null!==P&&null!==r&&null!==r.callback&&r.startTime<=e&&r.expirationTime<P.expirationTime||a()},t.unstable_requestPaint=B,t.unstable_continueExecution=function(){M||I||(M=!0,r(L))},t.unstable_pauseExecution=function(){},t.unstable_getFirstCallbackNode=function(){return T(F)},t.unstable_Profiling=null},9146:function(e,t,r){e.exports=r(39666)}}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[2803],{2803:function(t,e,r){"use strict";r.r(e),r.d(e,{DeleteFolderView:function(){return w}});var n=r(48088),o=r(21679),i=r(31647),c=r(52076),u=r(30305),l=r(10101),a=r(61843),f=r(88172),s=r(3059),y=r(57857),p=r(56906),h=r(11885),d=r.n(h);function b(t){return b="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},b(t)}function m(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function v(t,e){return v=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},v(t,e)}function O(t,e){if(e&&("object"===b(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function g(t){return g=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},g(t)}var w=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&v(t,e)}(j,t);var e,r,h,b,w=(h=j,b=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=g(h);if(b){var r=g(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return O(this,t)});function j(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,j),w.call(this,t)}return e=j,(r=[{key:"initialize",value:function(){this.listenTo(u.Vk.LIBRARY,"libraries:sync",this.render),this.collectionIdentifier=new s.F7(this.options.folderId,a.x$.GetCurrentSortType()),this.listenTo(u.Vk.VIDEO,"".concat(this.collectionIdentifier,":sync"),this.render),this.libraryDataService=o.u.getInstance(u.Or.Library,this),this.videoDataService=o.u.getInstance(u.Or.Video,this)}},{key:"name",get:function(){return"DeleteFolderView"}},{key:"title",get:function(){return y.T.getPhrase(this.lang,"title")}},{key:"lang",get:function(){return"libraryEditor.deleteFolder"}},{key:"template",get:function(){return d()}},{key:"channelName",get:function(){return a.N0.generateUniqueChannelName(this)}},{key:"behaviors",get:function(){var t=this;return[{behaviorClass:l.Yw,title:y.T.getPhrase(this.lang,"removeFolder"),spinnerButtonOptions:{channelName:this.channelName,buttonText:y.T.getPhrase(this.lang,"remove"),extraButtonClass:"btn-danger",onClick:function(e){return t.onClickDelete(e)}}}]}},{key:"getParentId",value:function(){if(a.PU.isSubFolder(this.model)&&this.model&&this.model.collection&&this.model.collection.parent&&this.model.collection.parent instanceof i.Q.Model)return this.model.collection.parent.get("id");var t=a.PU.getLibrary(this.model.get("id"),this.model.collection);return t&&t.id||null}},{key:"onClickDelete",value:function(t){t&&t.preventDefault(),n.Radio.channel(this.channelName).trigger(f.I3.ShowSpinner);var e=this.getParentId(),r=a.PU.isSubFolder(this.model)?u.eX.LibraryEditor.FOLDER:u.eX.LibraryEditor.LIBRARY;this.libraryDataService.deleteFolder(this.options.folderId,(function(){i.Q.AppLinkHelper.trigger({application:u.OV.LIBRARY_EDITOR,action:r,args:[e]},{replace:!0})})),this.logAction()}},{key:"logAction",value:function(){var t={id:this.options.folderId,name:this.model.get("name")};c.k.logUserAction(t,this.options.analyticsOptions)}},{key:"canDelete",value:function(){return!(this.model.children&&this.model.children.length||this.videos&&this.videos.length)}},{key:"onBeforeRender",value:function(){var t=this;return this.libraryDataService.getFolderFromLibraries(this.options.folderId,(function(e){t.model=e})),this.videos=this.videoDataService.getCollectionVideos(this.collectionIdentifier),!(!this.model||!this.videos||!this.canDelete()&&(window.setTimeout((function(){t.triggerMethod("hide"),i.Q.ErrorHelper.throw(new p.QH)}),u.pA.POPUP_FADE_TIMEOUT),1))}}])&&m(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),j}(i.Q.View)},3059:function(t,e,r){"use strict";r.d(e,{KX:function(){return R},IJ:function(){return d},xw:function(){return w},F7:function(){return n.F}});var n=r(1091),o=r(39479),i=r(33303),c=r(30305),u=r(44937),l=r(39090);function a(t){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},a(t)}function f(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function s(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function y(t,e){return y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},y(t,e)}function p(t,e){if(e&&("object"===a(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function h(t){return h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},h(t)}var d=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&y(t,e)}(d,t);var e,r,n,i,a=(n=d,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=h(n);if(i){var r=h(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return p(this,t)});function d(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,d),(e=a.call(this,{collectionPrefix:"".concat(c.M_.RECENT_VIDEOS,":collection"),cursor:t.cursor,sort:t.sort})).setAdditionalData(t),e}return e=d,(r=[{key:"setAdditionalData",value:function(t){var e=t.libraryIds,r=t.dateQueryString,n=t.subjects;e&&(this.libraryIds=e),n&&(o.isArray(n)&&n.length&&(this.subjects=n),o.isArray(n)||(this.subjects=[n]));var i=o.findWhere(l.US,{queryString:r})||l.U1;this.dateOption=new u.Wx(i)}},{key:"toString",value:function(){var t,e=this.subjects&&this.subjects.length&&this.subjects.map((function(t){return escape(t.get("name"))}))||[];return[this.collectionPrefix,this.libraryIds,this.dateOption.get("from"),this.dateOption.get("to")].concat((t=e,function(t){if(Array.isArray(t))return f(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return f(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?f(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),[this.cursor]).filter(Boolean).join(":")}},{key:"toParams",value:function(){var t={};return this.libraryIds&&(t.libraryIds=this.libraryIds),this.dateOption&&(t.from=this.dateOption.get("from"),t.to=this.dateOption.get("to")),this.subjects&&(t.subjectIds=o.flatten(this.subjects.map((function(t){return t.get("subjectIds")})))),this.cursor&&(t.cursor=this.cursor),t}}])&&s(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),d}(i.J);function b(t){return b="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},b(t)}function m(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function v(t,e){return v=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},v(t,e)}function O(t,e){if(e&&("object"===b(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function g(t){return g=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},g(t)}var w=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&v(t,e)}(f,t);var e,r,n,i,a=(n=f,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=g(n);if(i){var r=g(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return O(this,t)});function f(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,f),(e=a.call(this,{collectionPrefix:"".concat(c.M_.RECENT_SUBJECTS,":collection"),sort:t.sort})).setAdditionalData(t),e}return e=f,(r=[{key:"setAdditionalData",value:function(t){var e=t.libraryIds,r=t.dateQueryString;e&&(this.libraryIds=e);var n=o.findWhere(l.US,{queryString:r})||l.U1;this.dateOption=new u.Wx(n)}},{key:"toString",value:function(){return[this.collectionPrefix,this.libraryIds,this.dateOption.get("from"),this.dateOption.get("to")].filter(Boolean).join(":")}},{key:"toParams",value:function(){var t={};return this.libraryIds&&(t.libraryIds=this.libraryIds),this.dateOption&&(t.from=this.dateOption.get("from"),t.to=this.dateOption.get("to")),t}}])&&m(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),f}(i.J);function j(t){return j="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},j(t)}function P(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function S(t,e){return S=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},S(t,e)}function _(t,e){if(e&&("object"===j(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function I(t){return I=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},I(t)}var R=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&S(t,e)}(i,t);var e,r,n,o=(r=i,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=I(r);if(n){var o=I(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return _(this,t)});function i(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return P(this,i),o.call(this,{collectionPrefix:c.M_.FOLDERS,id:t,sort:e,cursor:r})}return e=i,Object.defineProperty(e,"prototype",{writable:!1}),e}(i.J)},11885:function(t,e,r){var n=r(32227);t.exports=(n.default||n).template({compiler:[8,">= 4.3.0"],main:function(t,e,r,n,o){var i;return t.propertyIsEnumerable,null!=(i=(r.lang||e&&e.lang||t.hooks.helperMissing).call(null!=e?e:t.nullContext||{},"check",{name:"lang",hash:{name:null!=e?e.name:e},data:o}))?i:""},useData:!0})}}]);