@clickview/library-editor 1.34.0 → 1.34.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (99) hide show
  1. package/dist/bundles.json +1 -1
  2. package/dist/scripts/{1010-a4704e61de.chunk.js → 1010-0885c521b8.chunk.js} +1 -1
  3. package/dist/scripts/{1086-1e49d7436c.chunk.js → 1086-fe154012dd.chunk.js} +1 -1
  4. package/dist/scripts/{1216-3680236a27.chunk.js → 1216-d126efc56b.chunk.js} +1 -1
  5. package/dist/scripts/{1269-6898014713.chunk.js → 1269-2b37c230ee.chunk.js} +1 -1
  6. package/dist/scripts/1364-e6e04987d4.chunk.js +1 -0
  7. package/dist/scripts/1409-1e86b4eda5.chunk.js +1 -0
  8. package/dist/scripts/{1492-815b776897.chunk.js → 1492-91af564cb2.chunk.js} +1 -1
  9. package/dist/scripts/{1601-d11282915d.chunk.js → 1601-893f768f11.chunk.js} +2 -2
  10. package/dist/scripts/{1832-2c91ee3a51.chunk.js → 1832-4f4b6ba356.chunk.js} +1 -1
  11. package/dist/scripts/{1887-1f10bdcd32.chunk.js → 1887-954988b80e.chunk.js} +1 -1
  12. package/dist/scripts/{1911-90a2329c55.chunk.js → 1911-1dcbdf2ca3.chunk.js} +1 -1
  13. package/dist/scripts/{2254-28945bd10d.chunk.js → 2254-d8b8504476.chunk.js} +1 -1
  14. package/dist/scripts/{2417-5006b87aa9.chunk.js → 2417-274561b5b6.chunk.js} +1 -1
  15. package/dist/scripts/{243-7cbcd679de.chunk.js → 243-1dbfc3220c.chunk.js} +1 -1
  16. package/dist/scripts/259-d117cc1894.chunk.js +1 -0
  17. package/dist/scripts/{2692-4dec659d9d.chunk.js → 2692-aa369df8c9.chunk.js} +1 -1
  18. package/dist/scripts/{2888-0eeb8ded06.chunk.js → 2888-d50b64a6b4.chunk.js} +1 -1
  19. package/dist/scripts/{299-500f0b6af0.chunk.js → 299-ab469ed1ae.chunk.js} +1 -1
  20. package/dist/scripts/3096-669715698a.chunk.js +1 -0
  21. package/dist/scripts/{3400-a38cfe2a5d.chunk.js → 3400-c76a38cdf8.chunk.js} +1 -1
  22. package/dist/scripts/3525-c303e09399.chunk.js +2 -0
  23. package/dist/scripts/{3763-6f873cc545.chunk.js → 3763-dc8ddac371.chunk.js} +1 -1
  24. package/dist/scripts/{4177-2ce1a9bdaa.chunk.js → 4177-bdd5090174.chunk.js} +1 -1
  25. package/dist/scripts/{4201-84a6867187.chunk.js → 4201-625f4064dd.chunk.js} +1 -1
  26. package/dist/scripts/{4245-b2e9ec5ba5.chunk.js → 4245-a1a023cd7d.chunk.js} +1 -1
  27. package/dist/scripts/{4591-55fa691940.chunk.js → 4591-cb921b33c7.chunk.js} +1 -1
  28. package/dist/scripts/{4860-d42be62696.chunk.js → 4860-da56ee92fd.chunk.js} +1 -1
  29. package/dist/scripts/{4885-8b2fae075e.chunk.js → 4885-ece06ae02f.chunk.js} +1 -1
  30. package/dist/scripts/{514-0d0d21f74f.chunk.js → 514-3ffe5b2338.chunk.js} +1 -1
  31. package/dist/scripts/{5412-789cbf80a3.chunk.js → 5412-9846d1f676.chunk.js} +1 -1
  32. package/dist/scripts/{5418-c1287e4896.chunk.js → 5418-eca3699393.chunk.js} +1 -1
  33. package/dist/scripts/{5424-b185ba8a45.chunk.js → 5424-b39db67d02.chunk.js} +1 -1
  34. package/dist/scripts/5524-b4a0c38b11.chunk.js +1 -0
  35. package/dist/scripts/{5698-74d4735cbc.chunk.js → 5698-c93b7d0f23.chunk.js} +1 -1
  36. package/dist/scripts/{5747-05c9d61fe0.chunk.js → 5747-70016712db.chunk.js} +1 -1
  37. package/dist/scripts/{6093-d497dc9474.chunk.js → 6093-25b1188c94.chunk.js} +1 -1
  38. package/dist/scripts/61-c1d9ae9d3f.chunk.js +2 -0
  39. package/dist/scripts/{6220-dfa7ef3ad3.chunk.js → 6220-df69ae5053.chunk.js} +1 -1
  40. package/dist/scripts/{6357-8477d01a86.chunk.js → 6357-fce36786e9.chunk.js} +1 -1
  41. package/dist/scripts/{6505-f069c1fbe4.chunk.js → 6505-eda1d34b53.chunk.js} +1 -1
  42. package/dist/scripts/{6732-59d6dff740.chunk.js → 6732-99288b7716.chunk.js} +1 -1
  43. package/dist/scripts/{6774-c9e8698d5c.chunk.js → 6774-9b62595255.chunk.js} +1 -1
  44. package/dist/scripts/{6995-861706c8b2.chunk.js → 6995-a6f779a727.chunk.js} +1 -1
  45. package/dist/scripts/{6999-1b7d8256a1.chunk.js → 6999-32f5791926.chunk.js} +1 -1
  46. package/dist/scripts/{7002-29951169db.chunk.js → 7002-e88c82d257.chunk.js} +1 -1
  47. package/dist/scripts/{7053-86b05dc741.chunk.js → 7053-af84e27ffc.chunk.js} +1 -1
  48. package/dist/scripts/{708-ac4137af9c.chunk.js → 708-4cc63f751b.chunk.js} +1 -1
  49. package/dist/scripts/{7190-921073f4ef.chunk.js → 7190-cc85bd1c26.chunk.js} +1 -1
  50. package/dist/scripts/{7376-753fc6cb76.chunk.js → 7376-92729fc093.chunk.js} +1 -1
  51. package/dist/scripts/7634-cbe11fd31f.chunk.js +1 -0
  52. package/dist/scripts/{8362-e662057f79.chunk.js → 8362-ff7966140e.chunk.js} +1 -1
  53. package/dist/scripts/{8727-6104f06be6.chunk.js → 8727-12197a5a2b.chunk.js} +1 -1
  54. package/dist/scripts/{8762-97ee795453.chunk.js → 8762-6223770914.chunk.js} +1 -1
  55. package/dist/scripts/{8906-2f788f9242.chunk.js → 8906-746489f5ca.chunk.js} +1 -1
  56. package/dist/scripts/{8947-c600642573.chunk.js → 8947-fcd146181d.chunk.js} +1 -1
  57. package/dist/scripts/9215-c65cf4202e.chunk.js +2 -0
  58. package/dist/scripts/9219-0117d9169b.chunk.js +1 -0
  59. package/dist/scripts/9309-3c56aacfb6.chunk.js +1 -0
  60. package/dist/scripts/{9357-8cae90b1de.chunk.js → 9357-fade2427e7.chunk.js} +1 -1
  61. package/dist/scripts/{9695-ad43223301.chunk.js → 9695-d90471521a.chunk.js} +1 -1
  62. package/dist/scripts/9927-09536434a8.chunk.js +1 -0
  63. package/dist/scripts/{9976-e00c6a4cb7.chunk.js → 9976-91f8545a3c.chunk.js} +1 -1
  64. package/dist/scripts/bundle-452a6bbd77.min.js +2 -0
  65. package/package.json +73 -73
  66. package/typings/libs/CVEvents.d.ts +12 -12
  67. package/typings/libs/CVLanguages.d.ts +24 -24
  68. package/typings/libs/Environment.d.ts +10 -10
  69. package/typings/libs/LazyLoad.d.ts +29 -29
  70. package/typings/libs/LazyLoad.ts +27 -27
  71. package/typings/libs/backbone.validation.d.ts +99 -99
  72. package/typings/libs/cloneDeep.d.ts +4 -4
  73. package/typings/libs/cookiesjs.d.ts +24 -24
  74. package/typings/libs/draft-convert.d.ts +3 -3
  75. package/typings/libs/google-api.d.ts +4 -4
  76. package/typings/libs/microsoft-teams.d.ts +2 -2
  77. package/typings/libs/trackjs.d.ts +2 -2
  78. package/typings/libs/videojs-contrib-quality-levels.d.ts +30 -30
  79. package/typings/utils/imports.d.ts +9 -9
  80. package/dist/scripts/1364-17e2eeefbc.chunk.js +0 -1
  81. package/dist/scripts/1409-7dec2a8e18.chunk.js +0 -1
  82. package/dist/scripts/259-1e858db89a.chunk.js +0 -1
  83. package/dist/scripts/3096-ce0ed4447d.chunk.js +0 -1
  84. package/dist/scripts/3525-54f3afe02c.chunk.js +0 -2
  85. package/dist/scripts/5524-b4527dfc81.chunk.js +0 -1
  86. package/dist/scripts/61-b53ce2761e.chunk.js +0 -2
  87. package/dist/scripts/7634-8a81b8d57d.chunk.js +0 -1
  88. package/dist/scripts/9215-23e4e44ad3.chunk.js +0 -2
  89. package/dist/scripts/9219-f1a3581014.chunk.js +0 -1
  90. package/dist/scripts/9309-f68d1f311a.chunk.js +0 -1
  91. package/dist/scripts/9927-faf9b990b5.chunk.js +0 -1
  92. package/dist/scripts/bundle-4cce60eb9f.min.js +0 -2
  93. /package/dist/scripts/{1601-d11282915d.chunk.js.LICENSE.txt → 1601-893f768f11.chunk.js.LICENSE.txt} +0 -0
  94. /package/dist/scripts/{3525-54f3afe02c.chunk.js.LICENSE.txt → 3525-c303e09399.chunk.js.LICENSE.txt} +0 -0
  95. /package/dist/scripts/{3969-07f2d1c976.chunk.js → 3969-1b2647b886.chunk.js} +0 -0
  96. /package/dist/scripts/{61-b53ce2761e.chunk.js.LICENSE.txt → 61-c1d9ae9d3f.chunk.js.LICENSE.txt} +0 -0
  97. /package/dist/scripts/{8113-a5da448af4.chunk.js → 8113-c9edecedca.chunk.js} +0 -0
  98. /package/dist/scripts/{9215-23e4e44ad3.chunk.js.LICENSE.txt → 9215-c65cf4202e.chunk.js.LICENSE.txt} +0 -0
  99. /package/dist/scripts/{bundle-4cce60eb9f.min.js.LICENSE.txt → bundle-452a6bbd77.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 k}});var r=n(48088),i=n(21679),o=n(57857),a=n(31647),c=n(52076),l=n(70065),u=n(77502),s=n(10101),f=n(88172),p=n(48090),h=n(67670),y=n(19226),d=n(61843),b=n(56906),v=n(44634),m=n.n(v),g={image:"Di3M6"};function w(e){return w="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},w(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,(void 0,i=function(e,t){if("object"!==w(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==w(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key),"symbol"===w(i)?i:String(i)),r)}var i}function P(e,t){return P=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},P(e,t)}function E(e){return E=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},E(e)}var k=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)}(T,e);var t,n,v,k,S=(v=T,k=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(k){var n=E(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===w(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function T(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,T),S.call(this,e)}return t=T,(n=[{key:"initialize",value:function(){this.collectionIdentifier=this.options.collectionIdentifier,this.libraryDataService=i.u.getInstance(p.Or.Library,this),this.videoDataService=i.u.getInstance(p.Or.Video,this),this.exportDataService=i.u.getInstance(p.Or.Export,this),this.bindListeners()}},{key:"name",get:function(){return"GeneratePdfView"}},{key:"title",get:function(){return o.T.getPhrase(this.lang,"title")}},{key:"lang",get:function(){return"libraryEditor.generatePdf"}},{key:"template",get:function(){return m()}},{key:"channelName",get:function(){return d.N0.generateUniqueChannelName(this)}},{key:"behaviors",get:function(){return[{behaviorClass:s.Yw,title:o.T.getPhrase(this.lang,"heading"),spinnerButtonOptions:{model:this.spinnerModel=new h.v,saveEvent:"generate:pdf",channelName:this.channelName,buttonText:o.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(p.Vk.LIBRARY,"".concat(p.M_.FOLDER,":").concat(this.collectionIdentifier.id,":sync"),this.render),this.listenTo(p.Vk.VIDEO,"".concat(this.collectionIdentifier.toString(),":sync"),this.render),this.listenTo(p.Vk.EXPORT,"".concat(p.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:l.LZ.Popup,actionType:l.Vw.Create,entity:l.py.PDF,workflowPhase:l.eu.Complete},r={id:e,sort:u.E[t]};c.k.logUserAction(r,n)}},{key:"hasDataFetched",value:function(){return!!this.model&&!!this.videos&&!!this.library}},{key:"requiredResources",get:function(){return{currentUser:y.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"),a.Q.Ry.throw(new b.Xz(o.T.getPhrase(e.lang,"errorHeading")))}),p.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"}),imageUrl:p.Wn.Shared.GENERATE_PDF,infoText:o.T.getPhrase(this.lang,"info",{name:this.model.get("name"),email:this.currentUser.get("email"),escapeText:!0}),styles:g}}}])&&O(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),T}(a.Q.G7)},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,n){return(t=l(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}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,l(r.key),r)}}function l(e){var t=function(e,t){if("object"!==o(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==o(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===o(t)?t:String(t)}function u(e,t){return u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},u(e,t)}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&&u(e,t)}(p,e);var t,n,r,l,f=(r=p,l=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=s(r);if(l){var n=s(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===o(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function p(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,p),f.apply(this,arguments)}return t=p,(n=[{key:"defaults",value:function(){var e;return a(e={},i.ZV.Disabled,!0),a(e,i.ZV.Hidden,!1),e}}])&&c(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),p}(r.Q.Hn)},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:"")+"\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">\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))+'" />\n</div>\n<p class="m-0">'+(null!=(o=a(null!=(o=null!=t?t.options:t)?o.infoText:o,t))?o:"")+"</p>\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 k}});var r=n(48088),i=n(21679),o=n(57857),a=n(31647),c=n(52076),l=n(70065),u=n(77502),s=n(10101),f=n(88172),p=n(48090),h=n(67670),y=n(19226),d=n(61843),b=n(56906),v=n(44634),m=n.n(v),g={image:"Di3M6"};function w(e){return w="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},w(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,(void 0,i=function(e,t){if("object"!==w(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==w(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key),"symbol"===w(i)?i:String(i)),r)}var i}function P(e,t){return P=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},P(e,t)}function E(e){return E=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},E(e)}var k=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)}(T,e);var t,n,v,k,S=(v=T,k=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(k){var n=E(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===w(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function T(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,T),S.call(this,e)}return t=T,(n=[{key:"initialize",value:function(){this.collectionIdentifier=this.options.collectionIdentifier,this.libraryDataService=i.u.getInstance(p.Or.Library,this),this.videoDataService=i.u.getInstance(p.Or.Video,this),this.exportDataService=i.u.getInstance(p.Or.Export,this),this.bindListeners()}},{key:"name",get:function(){return"GeneratePdfView"}},{key:"title",get:function(){return o.T.getPhrase(this.lang,"title")}},{key:"lang",get:function(){return"libraryEditor.generatePdf"}},{key:"template",get:function(){return m()}},{key:"channelName",get:function(){return d.N0.generateUniqueChannelName(this)}},{key:"behaviors",get:function(){return[{behaviorClass:s.Yw,title:o.T.getPhrase(this.lang,"heading"),spinnerButtonOptions:{model:this.spinnerModel=new h.v,saveEvent:"generate:pdf",channelName:this.channelName,buttonText:o.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(p.Vk.LIBRARY,"".concat(p.M_.FOLDER,":").concat(this.collectionIdentifier.id,":sync"),this.render),this.listenTo(p.Vk.VIDEO,"".concat(this.collectionIdentifier.toString(),":sync"),this.render),this.listenTo(p.Vk.EXPORT,"".concat(p.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:l.LZ.Popup,actionType:l.Vw.Create,entity:l.py.PDF,workflowPhase:l.eu.Complete},r={id:e,sort:u.E[t]};c.k.logUserAction(r,n)}},{key:"hasDataFetched",value:function(){return!!this.model&&!!this.videos&&!!this.library}},{key:"requiredResources",get:function(){return{currentUser:y.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"),a.Q.Ry.throw(new b.Xz(o.T.getPhrase(e.lang,"errorHeading")))}),p.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"}),imageUrl:p.Wn.Shared.GENERATE_PDF,infoText:o.T.getPhrase(this.lang,"info",{name:this.model.get("name"),email:this.currentUser.get("email"),escapeText:!0}),styles:g}}}])&&O(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),T}(a.Q.G7)},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,n){return(t=l(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}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,l(r.key),r)}}function l(e){var t=function(e,t){if("object"!==o(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==o(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===o(t)?t:String(t)}function u(e,t){return u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},u(e,t)}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&&u(e,t)}(p,e);var t,n,r,l,f=(r=p,l=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=s(r);if(l){var n=s(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===o(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function p(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,p),f.apply(this,arguments)}return t=p,(n=[{key:"defaults",value:function(){return a(a({},i.ZV.Disabled,!0),i.ZV.Hidden,!1)}}])&&c(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),p}(r.Q.Hn)},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=a(null!=(o=null!=t?t.options:t)?o.infoText:o,t))?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 +1 @@
1
- (self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[1887],{59054:function(e,t,r){"use strict";var n;r.d(t,{f:function(){return n}}),function(e){e.Share="share",e.MasterObject="masterobject"}(n||(n={}))},61519:function(e,t,r){"use strict";r.r(t),r.d(t,{SearchView:function(){return X}});var n=r(48088),i=r(39479),o=r(21679),a=r(57857),c=r(99249),s=r(31647),u=r(11543),l=r(59054),f=r(47022),h=r(33303),y=r(70763),p=r(48090),d=r(21251),g=r(33800),v=r(71192),b=r(48404),m=r(19226),S=r(95061),w=r(13809),O=r(23096),C=r(29457),k=r(96605),P=r.n(k);function R(e){return R="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},R(e)}function j(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,(void 0,i=function(e,t){if("object"!==R(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==R(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(n.key),"symbol"===R(i)?i:String(i)),n)}var i}function E(e,t){return E=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},E(e,t)}function V(e){return V=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},V(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&&E(e,t)}(c,e);var t,r,n,i,o=(n=c,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=V(n);if(i){var r=V(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===R(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(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),o.call(this,e)}return t=c,(r=[{key:"name",get:function(){return"SearchResultsComponent"}},{key:"template",get:function(){return P()}},{key:"lang",get:function(){return"search.searchResults"}},{key:"className",get:function(){return"bg-white"}},{key:"regions",value:function(){return{results:{replaceElement:!0,el:".results-region",partialLoading:C.LP.VideoList}}}},{key:"onBeforeRender",value:function(){return!!this.collection}},{key:"onRender",value:function(){var e=new O.Y({collection:this.collection,videosWithMetadata:this.options.videosWithMetadata,application:p.OV.SEARCH,videoItemComponentType:w.UC.Search,collectionIdentifier:null,config:this.options.config,emptyStateType:C.ub.Search,emptyStateOptions:{heading:a.T.getPhrase(this.lang,"emptyStateHeading",{query:this.options.query}),description:a.T.getPhrase(this.lang,"emptyStateDescription")},collectionViewChannel:this.options.collectionViewChannel,customerHasExchange:this.options.customerHasExchange,currentUser:this.options.currentUser,playerApiUrl:this.options.playerApiUrl,createViewKey:this.options.createViewKey,hasCursors:this.options.hasCursors,showEmptyState:!0,libraries:this.options.libraries});this.showChildView("results",e)}}])&&j(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),c}(s.Q.wA),M=r(8614),T=r(15709),D=r.n(T);function q(e){return q="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},q(e)}function x(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,(void 0,i=function(e,t){if("object"!==q(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==q(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(n.key),"symbol"===q(i)?i:String(i)),n)}var i}function I(e,t){return I=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},I(e,t)}function F(e){return F=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},F(e)}var A=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&&I(e,t)}(a,e);var t,r,n,i,o=(n=a,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=F(n);if(i){var r=F(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===q(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function a(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),o.apply(this,arguments)}return t=a,(r=[{key:"name",get:function(){return"SearchHeaderComponent"}},{key:"template",get:function(){return D()}},{key:"lang",get:function(){return"search.searchHeader"}},{key:"className",get:function(){return"bg-white border-bottom p-3"}},{key:"regions",value:function(){return{filters:{el:".filters-region",replaceElement:!0}}}},{key:"renderFilters",value:function(){var e=new M.b5({collection:this.collection,channelName:this.options.channelName});this.showChildView("filters",e)}},{key:"onRender",value:function(){this.renderFilters()}}])&&x(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),a}(s.Q.wA),H=r(21769),N=r(44937),Q=r(5344),U=r(28434),W=r.n(U);function B(e){return B="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},B(e)}function K(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,L(n.key),n)}}function L(e){var t=function(e,t){if("object"!==B(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==B(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===B(t)?t:String(t)}function z(e,t){return z=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},z(e,t)}function G(e){return G=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},G(e)}var X=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,r,w,O,C=(w=k,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(w);if(O){var r=G(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===B(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(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),C.call(this,e)}return t=k,(r=[{key:"initialize",value:function(){this.initializeQuery(),this.bindListeners(),this.contextualSearchService=o.u.getInstance(u.D.ContextualSearch,this),this.searchDataService=o.u.getInstance(u.Z.Search,this),this.videoDataService=o.u.getInstance(g.O.Video,this),this.ratingsDataService=o.u.getInstance(g.O.Ratings,this),this.playerDataService=o.u.getInstance(g.O.Player,this),this.collectionIdentifier=new h.J(Object.assign({collectionPrefix:d.M.SEARCH_VIDEOS},this.options.queryParams)),this.createViewKey=this.createViewKey.bind(this)}},{key:"initializeQuery",value:function(){this.queryModel=this.getSearchModel()}},{key:"bindListeners",value:function(){this.listenTo(p.Vk.RATINGS,"".concat(d.M.RATINGS,":sync"),this.render),this.listenTo(this.channelName,p.Vy.Filters.FILTER_CHANGED,i.debounce(this.onFilterChange,100)),this.listenTo(this.channelName,"fetch:video:with:metadata",this.fetchVideoWithMetadata),this.listenTo(H.I.TagFilter,"change:relevant:tags",this.updateSearchResults)}},{key:"name",get:function(){return"SearchView"}},{key:"title",get:function(){return a.T.getPhrase(this.lang,"title")}},{key:"lang",get:function(){return"search.search"}},{key:"template",get:function(){return W()}},{key:"className",get:function(){return"bg-white rounded"}},{key:"channelName",get:function(){return"".concat(this.name).concat(this.cid)}},{key:"regions",value:function(){return{header:{replaceElement:!0,el:".header-region"},results:{replaceElement:!0,el:".results-region"},pagination:{el:".pagination-region",replaceElement:!0}}}},{key:"getSearchModel",value:function(){return c.r.get("search",{ctor:N.AE})}},{key:"fetchSearchData",value:function(){this.ratings=this.ratingsDataService.getAllRatings(),this.ratings&&!this.filterCollection&&this.initializeFilterCollection()}},{key:"initializeFilterCollection",value:function(){this.filterCollection=Q.qr.getFilterCollection(this.sources,this.ratings),this.setQueryParams()}},{key:"setQueryParams",value:function(){Q.yf.setQueryParams(Object.assign(Object.assign({},this.options.queryParams),this.getContextParams()),this.queryModel,this.filterCollection)}},{key:"getContextParams",value:function(){if(!this.queryModel.get("query"))return n.Radio.channel(p.jr.CONTEXTUAL_SEARCH).trigger("reset:search:context"),{};var e,t,r,i=this.contextualSearchService.getSearchContext();return i&&i.get("filterParam")?(e={},t=i.get("filterParam"),r=i.get("filterValue"),(t=L(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e):{}}},{key:"createViewKey",value:function(e,t){this.playerDataService.createViewKey(e,l.f.MasterObject,t)}},{key:"onFilterChange",value:function(){s.Q.C$.trigger({application:p.OV.SEARCH,action:p.eX.Search.HOME,params:Q.yf.getRouteQueryParams(this.queryModel,this.filterCollection,this.sources)})}},{key:"setVideosWithMetadata",value:function(){this.resultCollection&&!this.videosWithMetadata&&(this.videosWithMetadata=new y.t(this.resultCollection.map((function(e){return new v.n({id:e.get("id")})}))))}},{key:"updateSearchResults",value:function(){var e=this;this.resultCollection=null,this.renderResults(),this.queryString=Q.yf.getQueryString(this.queryModel,this.filterCollection,this.collectionIdentifier.cursor);var t=function(){return s.Q.C$.trigger({application:p.OV.SEARCH,action:p.eX.Search.HOME,params:Q.yf.getRouteQueryParams(e.queryModel,e.filterCollection,e.sources)})};this.queryString?this.searchDataService.searchVideos(this.queryString,this.collectionIdentifier,t):t()}},{key:"renderHeader",value:function(){var e=new A({collection:this.filterCollection,channelName:this.channelName});this.showChildView("header",e)}},{key:"renderResults",value:function(){var e=this.videoDataService.getVideoCollectionCursors(this.collectionIdentifier),t=new _({collection:this.resultCollection,videosWithMetadata:this.videosWithMetadata,config:this.config,collectionViewChannel:this.channelName,customerHasExchange:this.exchanges.any(),currentUser:this.currentUser,playerApiUrl:this.config.get("playerApiUrl"),createViewKey:this.createViewKey,hasCursors:!!e,libraries:this.sources,query:this.queryModel.get("query")});this.showChildView("results",t)}},{key:"renderPagination",value:function(){if(this.resultCollection&&this.resultCollection.length){var e=this.videoDataService.getVideoCollectionCursors(this.collectionIdentifier),t=new f.Q({cursors:e,appLink:{application:p.OV.SEARCH,action:p.eX.Search.HOME,params:Q.yf.getRouteQueryParams(this.queryModel,this.filterCollection,this.sources)}});this.showChildView("pagination",t)}}},{key:"fetchResults",value:function(){var e=this;if(this.filterCollection){this.queryString=Q.yf.getQueryString(this.queryModel,this.filterCollection,this.collectionIdentifier.cursor);var t=Q.yf.getDynamicFilterQueryString(this.queryModel,this.filterCollection);if(this.dynamicFiltersFetched||this.searchDataService.getDynamicFilters(t,(function(t){e.dynamicFiltersFetched||(e.filterCollection.add(t.toJSON(),{merge:!0}),e.dynamicFiltersFetched=!0,e.render())})),!this.resultCollection){var r=function(t){e.resultCollection=t,e.setVideosWithMetadata(),e.render()};this.queryString?this.searchDataService.searchVideos(this.queryString,this.collectionIdentifier,r):r(new y.t([]))}}}},{key:"fetchVideoWithMetadata",value:function(e){var t=this;this.videoDataService.getVideo(e,(function(r){var n=t.videosWithMetadata.get(e);n&&(n.set(r.toJSON()),n.set({dataFetched:!0}))}))}},{key:"requiredResources",get:function(){return{config:b.p.config,sources:S.T.libraries,exchanges:S.T.exchanges,currentUser:m.K.currentUser}}},{key:"onBeforeRender",value:function(){return this.fetchSearchData(),this.fetchResults(),!0}},{key:"onRender",value:function(){this.renderHeader(),this.renderResults(),this.renderPagination()}},{key:"onBeforeDestroy",value:function(){this.queryModel.clear()}}])&&K(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),k}(s.Q.G7)},13809:function(e,t,r){"use strict";r.d(t,{UC:function(){return n.U}});var n=r(58688);r(86605),r(14898)},96605:function(e,t,r){var n=r(32227);e.exports=(n.default||n).template({compiler:[8,">= 4.3.0"],main:function(e,t,r,n,i){return'<div class="results-region"></div>'},useData:!0})},15709:function(e,t,r){var n=r(32227);e.exports=(n.default||n).template({compiler:[8,">= 4.3.0"],main:function(e,t,r,n,i){return e.propertyIsEnumerable,"<h3>"+e.escapeExpression((r.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"header",{name:"lang",hash:{},data:i}))+'</h3>\n<div class="filters-region"></div>'},useData:!0})},28434:function(e,t,r){var n=r(32227);e.exports=(n.default||n).template({compiler:[8,">= 4.3.0"],main:function(e,t,r,n,i){return'<div class="header-region"></div>\n<div class="results-region"></div>\n<div class="pagination-region"></div>'},useData:!0})}}]);
1
+ (self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[1887],{59054:function(e,t,r){"use strict";var n;r.d(t,{f:function(){return n}}),function(e){e.Share="share",e.MasterObject="masterobject"}(n||(n={}))},61519:function(e,t,r){"use strict";r.r(t),r.d(t,{SearchView:function(){return X}});var n=r(48088),i=r(39479),o=r(21679),a=r(57857),c=r(99249),s=r(31647),u=r(11543),l=r(59054),f=r(47022),h=r(33303),y=r(70763),p=r(48090),d=r(21251),g=r(33800),v=r(71192),b=r(48404),m=r(19226),S=r(95061),w=r(13809),O=r(23096),C=r(29457),k=r(96605),P=r.n(k);function R(e){return R="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},R(e)}function j(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,(void 0,i=function(e,t){if("object"!==R(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==R(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(n.key),"symbol"===R(i)?i:String(i)),n)}var i}function E(e,t){return E=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},E(e,t)}function V(e){return V=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},V(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&&E(e,t)}(c,e);var t,r,n,i,o=(n=c,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=V(n);if(i){var r=V(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===R(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(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),o.call(this,e)}return t=c,(r=[{key:"name",get:function(){return"SearchResultsComponent"}},{key:"template",get:function(){return P()}},{key:"lang",get:function(){return"search.searchResults"}},{key:"className",get:function(){return"bg-white"}},{key:"regions",value:function(){return{results:{replaceElement:!0,el:".results-region",partialLoading:C.LP.VideoList}}}},{key:"onBeforeRender",value:function(){return!!this.collection}},{key:"onRender",value:function(){var e=new O.Y({collection:this.collection,videosWithMetadata:this.options.videosWithMetadata,application:p.OV.SEARCH,videoItemComponentType:w.UC.Search,collectionIdentifier:null,config:this.options.config,emptyStateType:C.ub.Search,emptyStateOptions:{heading:a.T.getPhrase(this.lang,"emptyStateHeading",{query:this.options.query}),description:a.T.getPhrase(this.lang,"emptyStateDescription")},collectionViewChannel:this.options.collectionViewChannel,customerHasExchange:this.options.customerHasExchange,currentUser:this.options.currentUser,playerApiUrl:this.options.playerApiUrl,createViewKey:this.options.createViewKey,hasCursors:this.options.hasCursors,showEmptyState:!0,libraries:this.options.libraries});this.showChildView("results",e)}}])&&j(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),c}(s.Q.wA),M=r(8614),T=r(15709),D=r.n(T);function q(e){return q="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},q(e)}function x(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,(void 0,i=function(e,t){if("object"!==q(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==q(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(n.key),"symbol"===q(i)?i:String(i)),n)}var i}function I(e,t){return I=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},I(e,t)}function F(e){return F=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},F(e)}var A=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&&I(e,t)}(a,e);var t,r,n,i,o=(n=a,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=F(n);if(i){var r=F(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===q(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function a(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),o.apply(this,arguments)}return t=a,(r=[{key:"name",get:function(){return"SearchHeaderComponent"}},{key:"template",get:function(){return D()}},{key:"lang",get:function(){return"search.searchHeader"}},{key:"className",get:function(){return"bg-white border-bottom p-3"}},{key:"regions",value:function(){return{filters:{el:".filters-region",replaceElement:!0}}}},{key:"renderFilters",value:function(){var e=new M.b5({collection:this.collection,channelName:this.options.channelName});this.showChildView("filters",e)}},{key:"onRender",value:function(){this.renderFilters()}}])&&x(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),a}(s.Q.wA),H=r(21769),N=r(44937),Q=r(5344),U=r(28434),W=r.n(U);function B(e){return B="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},B(e)}function K(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,L(n.key),n)}}function L(e){var t=function(e,t){if("object"!==B(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==B(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===B(t)?t:String(t)}function z(e,t){return z=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},z(e,t)}function G(e){return G=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},G(e)}var X=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,r,w,O,C=(w=k,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(w);if(O){var r=G(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===B(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(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),C.call(this,e)}return t=k,(r=[{key:"initialize",value:function(){this.initializeQuery(),this.bindListeners(),this.contextualSearchService=o.u.getInstance(u.D.ContextualSearch,this),this.searchDataService=o.u.getInstance(u.Z.Search,this),this.videoDataService=o.u.getInstance(g.O.Video,this),this.ratingsDataService=o.u.getInstance(g.O.Ratings,this),this.playerDataService=o.u.getInstance(g.O.Player,this),this.collectionIdentifier=new h.J(Object.assign({collectionPrefix:d.M.SEARCH_VIDEOS},this.options.queryParams)),this.createViewKey=this.createViewKey.bind(this)}},{key:"initializeQuery",value:function(){this.queryModel=this.getSearchModel()}},{key:"bindListeners",value:function(){this.listenTo(p.Vk.RATINGS,"".concat(d.M.RATINGS,":sync"),this.render),this.listenTo(this.channelName,p.Vy.Filters.FILTER_CHANGED,i.debounce(this.onFilterChange,100)),this.listenTo(this.channelName,"fetch:video:with:metadata",this.fetchVideoWithMetadata),this.listenTo(H.I.TagFilter,"change:relevant:tags",this.updateSearchResults)}},{key:"name",get:function(){return"SearchView"}},{key:"title",get:function(){return a.T.getPhrase(this.lang,"title")}},{key:"lang",get:function(){return"search.search"}},{key:"template",get:function(){return W()}},{key:"className",get:function(){return"bg-white rounded"}},{key:"channelName",get:function(){return"".concat(this.name).concat(this.cid)}},{key:"regions",value:function(){return{header:{replaceElement:!0,el:".header-region"},results:{replaceElement:!0,el:".results-region"},pagination:{el:".pagination-region",replaceElement:!0}}}},{key:"getSearchModel",value:function(){return c.r.get("search",{ctor:N.AE})}},{key:"fetchSearchData",value:function(){this.ratings=this.ratingsDataService.getAllRatings(),this.ratings&&!this.filterCollection&&this.initializeFilterCollection()}},{key:"initializeFilterCollection",value:function(){this.filterCollection=Q.qr.getFilterCollection(this.sources,this.ratings),this.setQueryParams()}},{key:"setQueryParams",value:function(){Q.yf.setQueryParams(Object.assign(Object.assign({},this.options.queryParams),this.getContextParams()),this.queryModel,this.filterCollection)}},{key:"getContextParams",value:function(){if(!this.queryModel.get("query"))return n.Radio.channel(p.jr.CONTEXTUAL_SEARCH).trigger("reset:search:context"),{};var e,t,r,i=this.contextualSearchService.getSearchContext();return i&&i.get("filterParam")?(e={},t=i.get("filterParam"),r=i.get("filterValue"),(t=L(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e):{}}},{key:"createViewKey",value:function(e,t){this.playerDataService.createViewKey(e,l.f.MasterObject,t)}},{key:"onFilterChange",value:function(){s.Q.C$.trigger({application:p.OV.SEARCH,action:p.eX.Search.HOME,params:Q.yf.getRouteQueryParams(this.queryModel,this.filterCollection,this.sources)})}},{key:"setVideosWithMetadata",value:function(){this.resultCollection&&!this.videosWithMetadata&&(this.videosWithMetadata=new y.t(this.resultCollection.map((function(e){return new v.n({id:e.get("id")})}))))}},{key:"updateSearchResults",value:function(){var e=this;this.resultCollection=null,this.renderResults(),this.queryString=Q.yf.getQueryString(this.queryModel,this.filterCollection,this.collectionIdentifier.cursor);var t=function(){return s.Q.C$.trigger({application:p.OV.SEARCH,action:p.eX.Search.HOME,params:Q.yf.getRouteQueryParams(e.queryModel,e.filterCollection,e.sources)})};this.queryString?this.searchDataService.searchVideos(this.queryString,this.collectionIdentifier,t):t()}},{key:"renderHeader",value:function(){var e=new A({collection:this.filterCollection,channelName:this.channelName});this.showChildView("header",e)}},{key:"renderResults",value:function(){var e=this.videoDataService.getVideoCollectionCursors(this.collectionIdentifier),t=new _({collection:this.resultCollection,videosWithMetadata:this.videosWithMetadata,config:this.config,collectionViewChannel:this.channelName,customerHasExchange:this.exchanges.any(),currentUser:this.currentUser,playerApiUrl:this.config.get("playerApiUrl"),createViewKey:this.createViewKey,hasCursors:!!e,libraries:this.sources,query:this.queryModel.get("query")});this.showChildView("results",t)}},{key:"renderPagination",value:function(){if(this.resultCollection&&this.resultCollection.length){var e=this.videoDataService.getVideoCollectionCursors(this.collectionIdentifier),t=new f.Q({cursors:e,appLink:{application:p.OV.SEARCH,action:p.eX.Search.HOME,params:Q.yf.getRouteQueryParams(this.queryModel,this.filterCollection,this.sources)}});this.showChildView("pagination",t)}}},{key:"fetchResults",value:function(){var e=this;if(this.filterCollection){this.queryString=Q.yf.getQueryString(this.queryModel,this.filterCollection,this.collectionIdentifier.cursor);var t=Q.yf.getDynamicFilterQueryString(this.queryModel,this.filterCollection);if(this.dynamicFiltersFetched||this.searchDataService.getDynamicFilters(t,(function(t){e.dynamicFiltersFetched||(e.filterCollection.add(t.toJSON(),{merge:!0}),e.dynamicFiltersFetched=!0,e.render())})),!this.resultCollection){var r=function(t){e.resultCollection=t,e.setVideosWithMetadata(),e.render()};this.queryString?this.searchDataService.searchVideos(this.queryString,this.collectionIdentifier,r):r(new y.t([]))}}}},{key:"fetchVideoWithMetadata",value:function(e){var t=this;this.videoDataService.getVideo(e,(function(r){var n=t.videosWithMetadata.get(e);n&&(n.set(r.toJSON()),n.set({dataFetched:!0}))}))}},{key:"requiredResources",get:function(){return{config:b.p.config,sources:S.T.libraries,exchanges:S.T.exchanges,currentUser:m.K.currentUser}}},{key:"onBeforeRender",value:function(){return this.fetchSearchData(),this.fetchResults(),!0}},{key:"onRender",value:function(){this.renderHeader(),this.renderResults(),this.renderPagination()}},{key:"onBeforeDestroy",value:function(){this.queryModel.clear()}}])&&K(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),k}(s.Q.G7)},13809:function(e,t,r){"use strict";r.d(t,{UC:function(){return n.U}});var n=r(58688);r(86605),r(14898)},96605:function(e,t,r){var n=r(32227);e.exports=(n.default||n).template({compiler:[8,">= 4.3.0"],main:function(e,t,r,n,i){return'<div class="results-region"></div>'},useData:!0})},15709:function(e,t,r){var n=r(32227);e.exports=(n.default||n).template({compiler:[8,">= 4.3.0"],main:function(e,t,r,n,i){return e.propertyIsEnumerable,"<h3>"+e.escapeExpression((r.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"header",{name:"lang",hash:{},data:i}))+'</h3>\r\n<div class="filters-region"></div>'},useData:!0})},28434:function(e,t,r){var n=r(32227);e.exports=(n.default||n).template({compiler:[8,">= 4.3.0"],main:function(e,t,r,n,i){return'<div class="header-region"></div>\r\n<div class="results-region"></div>\r\n<div class="pagination-region"></div>'},useData:!0})}}]);
@@ -1 +1 @@
1
- (self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[1911],{59054:function(e,t,n){"use strict";var o;n.d(t,{f:function(){return o}}),function(e){e.Share="share",e.MasterObject="masterobject"}(o||(o={}))},47022:function(e,t,n){"use strict";n.d(t,{Q:function(){return h}});var o=n(39479),r=n(31647),i=n(52076),l=n(70065),a=n(99186),c=n.n(a);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 u(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,f(o.key),o)}}function f(e){var t=function(e,t){if("object"!==s(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!==s(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===s(t)?t:String(t)}function p(e,t){return p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},p(e,t)}function d(e){return d=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},d(e)}var h=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)}(y,e);var t,n,r,a,h=(r=y,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(r);if(a){var n=d(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===s(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function y(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,y),h.call(this,e)}return t=y,(n=[{key:"defaults",get:function(){return{cursors:{},cursorParamName:"cursor"}}},{key:"name",get:function(){return"PaginationComponent"}},{key:"template",get:function(){return c()}},{key:"lang",get:function(){return"shared._pagination"}},{key:"appLinks",get:function(){var e={};if(!this.options.cursors)return{};if(this.options.cursors.previous){var t=this.options.cursors.previous,n=this.buildCursor(this.options.cursors.previous);+t<=1&&!0!==this.options.allowFirstPageCursor&&delete n.params.cursor,e[".previous-applink"]=n}return this.options.cursors.next&&(e[".next-applink"]=this.buildCursor(this.options.cursors.next)),e}},{key:"events",value:function(){return{"click .previous-applink":"onClickPrevious","click .next-applink":"onClickNext"}}},{key:"buildCursor",value:function(e){return{application:this.options.appLink.application,action:this.options.appLink.action,args:this.options.appLink.args,params:o.extend({},this.options.appLink.params,(t={},n=this.options.cursorParamName,r=e,(n=f(n))in t?Object.defineProperty(t,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[n]=r,t))};var t,n,r}},{key:"onClickPrevious",value:function(){this.logAction("previous")}},{key:"onClickNext",value:function(){this.logAction("next")}},{key:"logAction",value:function(e){var t=i.k.mergeOptions(this.options.analyticsOptions,{location:l.LZ.Pagination,entity:l.py.Pagination,actionType:l.Vw.Navigate}),n={id:this.options.collectionId,page:e};i.k.logUserAction(n,t)}},{key:"viewOptions",value:function(){return{cursors:this.options.cursors}}},{key:"onBeforeRender",value:function(){return!!this.options.cursors}}])&&u(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),y}(r.Q.wA)},27719:function(e,t,n){"use strict";n.r(t),n.d(t,{FolderView:function(){return Xe},SeriesView:function(){return Ze}});var o=n(99748),r=n(21679),i=n(57857),l=n(31647),a=n(59054),c=n(25692),s=n(47022),u=n(77502),f=n(98985),p=n(70763),d=n(58688),h=n(23096),y=n(48090),b=n(29457),v=n(3059),m=n(60602),g=n(71192),w=n(48404),k=n(19226),O=n(61843),S=n(70065),E=n(24828),P=n(22231),C=n(51785),j=n(85552),I=n.n(j),R=n(21625);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 _(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,(void 0,r=function(e,t){if("object"!==x(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!==x(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(o.key),"symbol"===x(r)?r:String(r)),o)}var r}function V(e,t){return V=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},V(e,t)}function L(e){return L=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},L(e)}var T=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&&V(e,t)}(l,e);var t,n,o,r,i=(o=l,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=L(o);if(r){var n=L(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(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)}(this,e)});function l(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l),i.call(this,e)}return t=l,(n=[{key:"name",get:function(){return"BannerComponent"}},{key:"className",get:function(){var e=(0,P.x)(this.model.get("name"),E.o);return"px-3 position-relative rounded-top ".concat(R.Z.banner," ").concat(e)}},{key:"regions",value:function(){return{options:{el:".options-region",replaceElement:!0}}}},{key:"attributes",get:function(){var e=O.jw.createBannerUrl(this.model.banner);return e?{style:"background-image: url('".concat(e,"')")}:null}},{key:"template",get:function(){return I()}},{key:"renderActions",value:function(){this.showChildView("options",new C.c({model:this.model,extraClasses:"".concat(R.Z.actions," rounded-circle me-2 mt-2"),buttonClass:"text-light",analyticsOptions:{location:S.LZ.Banner}}))}},{key:"onRender",value:function(){this.renderActions()}}])&&_(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),l}(l.Q.wA),A=n(4705),D=n(63791),B=n(87002),M=n(73368),F=n.n(M),N={svgContainer:"mMWNm",caretClosed:"Fe74o"};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 Q(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function U(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,(void 0,r=function(e,t){if("object"!==H(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!==H(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(o.key),"symbol"===H(r)?r:String(r)),o)}var r}function Y(e,t,n){return t&&U(e.prototype,t),n&&U(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function W(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&K(e,t)}function K(e,t){return K=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},K(e,t)}function z(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=X(e);if(t){var r=X(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return function(e,t){if(t&&("object"===H(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,n)}}function X(e){return X=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},X(e)}var Z="has:expanded:library:folders",G=function(e){W(n,e);var t=z(n);function n(){return Q(this,n),t.apply(this,arguments)}return Y(n,[{key:"name",get:function(){return"SubFoldersCollectionView"}},{key:"className",get:function(){return"row px-2"}},{key:"childView",get:function(){return B.Y}},{key:"childViewOptions",get:function(){return{location:"subfolder"}}}]),n}(l.Q.$W),$=function(e){W(n,e);var t=z(n);function n(e){return Q(this,n),t.call(this,e)}return Y(n,[{key:"initialize",value:function(){this.forceExpanded=this.options.forceExpanded||this.collection.length<=6,this.forceExpanded?this.isExpanded=!0:this.isExpanded=A.SG.get(Z)||!1}},{key:"name",get:function(){return"SubFoldersView"}},{key:"className",get:function(){return"container-fluid pb-3"}},{key:"lang",get:function(){return"libraryEditor.subfolders"}},{key:"template",get:function(){return F()}},{key:"events",value:function(){return{"click .expand-toggle":"onClickExpandToggle"}}},{key:"regions",value:function(){return{subFolders:{replaceElement:!0,el:".subfolders-region"}}}},{key:"onClickExpandToggle",value:function(){this.options.forceExpanded||(this.isExpanded=!this.isExpanded,A.SG.set(Z,this.isExpanded),this.render())}},{key:"viewOptions",value:function(){return{styles:N,caretSvg:D.Nj.getSvg(D.vn.Caret),isExpanded:this.isExpanded,forceExpanded:this.forceExpanded,caretClass:this.isExpanded?"":N.caretClosed,count:this.collection.length}}},{key:"onRender",value:function(){this.showChildView("subFolders",new G({collection:this.isExpanded?this.collection:new l.Q.FE(this.collection.first(6))}))}}]),n}(l.Q.wA),J=n(57085),q=n(8420),ee=n.n(q);function te(e){return te="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},te(e)}function ne(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,(void 0,r=function(e,t){if("object"!==te(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!==te(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(o.key),"symbol"===te(r)?r:String(r)),o)}var r}function oe(e,t){return oe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},oe(e,t)}function re(e){return re=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},re(e)}var ie=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&&oe(e,t)}(l,e);var t,n,o,r,i=(o=l,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=re(o);if(r){var n=re(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===te(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function l(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l),i.call(this,e)}return t=l,(n=[{key:"name",get:function(){return"VideoListHeaderComponent"}},{key:"template",get:function(){return ee()}},{key:"className",get:function(){return this.options.folder?"px-3 mb-3":"mb-3"}},{key:"props",get:function(){return["collectionIdentifier"]}},{key:"regions",value:function(){return{breadcrumbs:{el:".breadcrumbs-region",replaceElement:!1}}}},{key:"renderBreadcrumbs",value:function(){this.options.folder&&this.options.libraries&&this.showChildView("breadcrumbs",new J.n({folder:this.options.folder,libraries:this.options.libraries}))}},{key:"onBeforeRender",value:function(){return!!this.options.folder}},{key:"onRender",value:function(){this.renderBreadcrumbs()}}])&&ne(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),l}(l.Q.wA),le=n(52076),ae=n(50028),ce=n(71641),se=n(40622),ue=n(34670),fe=n.n(ue);function pe(e){return pe="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},pe(e)}function de(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,(void 0,r=function(e,t){if("object"!==pe(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!==pe(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(o.key),"symbol"===pe(r)?r:String(r)),o)}var r}function he(e,t){return he=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},he(e,t)}function ye(e){return ye=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ye(e)}var be=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&&he(e,t)}(c,e);var t,n,o,r,a=(o=c,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=ye(o);if(r){var n=ye(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===pe(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function c(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c),a.call(this,e)}return t=c,(n=[{key:"initialize",value:function(){this.getViewModel(),this.bindListeners()}},{key:"getViewModel",value:function(){var e=this.options.collectionIdentifier.toString();this.model=O.S0.GetViewModel(e,se.De.VIDEO_LIST)}},{key:"bindListeners",value:function(){this.listenTo(this.model,"change",this.render),this.listenTo(this.collection,"remove",this.render)}},{key:"name",get:function(){return"BulkVideoActionsComponent"}},{key:"template",get:function(){return fe()}},{key:"lang",get:function(){return"shared.bulkVideoActions"}},{key:"regions",value:function(){return{dropdownItems:{replaceElement:!0,el:".dropdown-menu-region"}}}},{key:"getSelectedIds",value:function(){return O.S0.GetSelectedIds({key:this.options.collectionIdentifier.toString(),type:se.De.VIDEO_LIST,collection:this.collection,excludePredicate:function(e){return e.get("status")===ae.X.Processing}})}},{key:"getActions",value:function(){if(this.options.collectionIdentifier){var e=this.getSelectedIds();return new l.Q.FE([{title:i.T.getPhrase(this.lang,"move",{smartCount:e.length}),appLink:{application:this.options.application,action:y.eX.Shared.MOVE_VIDEOS,args:[e.join(","),this.options.collectionIdentifier.id]},analyticsOptions:le.k.mergeOptions(this.options.analyticsOptions,{actionType:S.Vw.Move,workflowPhase:S.eu.Start})},{title:i.T.getPhrase(this.lang,"remove",{smartCount:e.length}),appLink:{application:y.OV.LIBRARY_EDITOR,action:y.eX.Shared.DELETE_VIDEOS,args:[this.options.collectionIdentifier.id,e.join(",")]},analyticsOptions:le.k.mergeOptions(this.options.analyticsOptions,{actionType:S.Vw.Delete,workflowPhase:S.eu.Start}),classes:"text-danger"}])}}},{key:"viewOptions",value:function(){return{enabled:this.getSelectedIds().length}}},{key:"onRender",value:function(){this.showChildView("dropdownItems",new ce.w({displayOptions:{alignment:"end"},channelName:"".concat(this.name).concat(this.cid),collection:this.getActions(),analyticsHelper:le.k}))}}])&&de(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),c}(l.Q.wA),ve=n(12542),me=n(39479),ge=n(53370),we=n.n(ge);function ke(e){return ke="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},ke(e)}function Oe(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,(void 0,r=function(e,t){if("object"!==ke(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!==ke(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(o.key),"symbol"===ke(r)?r:String(r)),o)}var r}function Se(e,t){return Se=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Se(e,t)}function Ee(e){return Ee=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ee(e)}var Pe=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&&Se(e,t)}(a,e);var t,n,o,r,i=(o=a,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Ee(o);if(r){var n=Ee(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===ke(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function 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:"initialize",value:function(){this.getViewModel(),this.setSort(),this.bindListeners(),this.initializeCollection()}},{key:"getViewModel",value:function(){this.model=O.x$.GetSortViewModel()}},{key:"setSort",value:function(){var e=this.options.collectionIdentifier.sort;if(e!==this.model.get("sortType")){var t=O.x$.CreateSortObject(e);this.model.set(t)}}},{key:"bindListeners",value:function(){this.listenTo(this.channelName,"sort:selected",this.onSortSelected)}},{key:"initializeCollection",value:function(){this.collection||(this.collection=O.x$.CreateSortCollection())}},{key:"name",get:function(){return"SortSelectComponent"}},{key:"regions",value:function(){return{dropdown:{el:".dropdown-menu-region",replaceElement:!0}}}},{key:"template",get:function(){return we()}},{key:"channelName",get:function(){return"".concat(this.name).concat(this.cid)}},{key:"className",get:function(){return"position-relative"}},{key:"events",value:function(){return{click:"onClick"}}},{key:"onClick",value:function(){this.logAction(S.eu.Start)}},{key:"onSortSelected",value:function(e){this.model.set(e.toJSON()),this.render(),this.logAction(S.eu.Complete)}},{key:"logAction",value:function(e){var t=le.k.mergeOptions(this.options.analyticsOptions,{actionType:S.Vw.Sort,workflowPhase:e}),n={id:this.options.collectionIdentifier.id,sort:this.model.get("name")};le.k.logUserAction(n,t)}},{key:"onRender",value:function(){var e=this,t=this.collection.filter((function(t){return t.get("name")!==e.model.get("name")})),n=new l.Q.FE(me.map(t,(function(t){var n=t.toJSON();return n.appLink={application:e.options.appLink.application,action:e.options.appLink.action,args:[e.options.collectionIdentifier.id],params:{sort:t.get("sortName")}},n})));this.showChildView("dropdown",new ce.w({collection:n,channelName:this.channelName,childOptions:{titleProperty:"name",eventName:"sort:selected"},displayOptions:{alignment:"end"},analyticsHelper:le.k}))}}])&&Oe(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(l.Q.wA),Ce=n(56846),je=n.n(Ce);function Ie(e){return Ie="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ie(e)}function Re(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,(void 0,r=function(e,t){if("object"!==Ie(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!==Ie(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(o.key),"symbol"===Ie(r)?r:String(r)),o)}var r}function xe(e,t){return xe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},xe(e,t)}function _e(e){return _e=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},_e(e)}var Ve=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&&xe(e,t)}(l,e);var t,n,o,r,i=(o=l,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=_e(o);if(r){var n=_e(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===Ie(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function l(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l),i.call(this,e)}return t=l,(n=[{key:"initialize",value:function(){this.analyticsOptions=le.k.mergeOptions(this.options.analyticsOptions,{location:S.LZ.VideoListHeader})}},{key:"name",get:function(){return"VideoListSubheadingComponent"}},{key:"template",get:function(){return je()}},{key:"className",get:function(){return"px-3"}},{key:"lang",get:function(){return"libraryEditor.videoListSubheading"}},{key:"props",get:function(){return["collectionIdentifier"]}},{key:"regions",value:function(){return{checkAll:{el:".check-all-region",replaceElement:!1},bulkActions:{el:".bulk-actions-region",replaceElement:!0},sorting:{el:".sorting-region",replaceElement:!0}}}},{key:"renderCheckAll",value:function(){this.options.allowBulk&&this.showChildView("checkAll",new ve.Y({className:"float-start",key:this.collectionIdentifier.toString(),type:se.De.VIDEO_LIST,numberOfItems:this.collection.length}))}},{key:"renderBulkActions",value:function(){this.options.allowBulk&&this.showChildView("bulkActions",new be({collection:this.collection,collectionIdentifier:this.collectionIdentifier,application:this.options.application,analyticsOptions:le.k.mergeOptions(this.options.analyticsOptions,{descriptor:S.yh.Bulk,location:S.LZ.VideoListHeader,entity:S.py.Video,workflowPhase:S.eu.Start})}))}},{key:"renderSorting",value:function(){this.showChildView("sorting",new Pe({collectionIdentifier:this.collectionIdentifier,analyticsOptions:this.analyticsOptions,appLink:{application:this.options.application,action:this.options.action}}))}},{key:"viewOptions",value:function(){return{showBulkActions:this.options.allowBulk&&this.collection.length>0,showHeading:this.options.showHeading}}},{key:"onBeforeRender",value:function(){return!(this.collection.length<=0)}},{key:"onRender",value:function(){this.renderCheckAll(),this.renderBulkActions(),this.renderSorting()}}])&&Re(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),l}(l.Q.wA),Le=n(26457),Te=n(56906),Ae=n(95061),De=n(93089),Be=n.n(De);function Me(e){return Me="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},Me(e)}function Fe(){return Fe="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var o=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Ke(e)););return e}(e,t);if(o){var r=Object.getOwnPropertyDescriptor(o,t);return r.get?r.get.call(arguments.length<3?e:n):r.value}},Fe.apply(this,arguments)}function Ne(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function He(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,(void 0,r=function(e,t){if("object"!==Me(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!==Me(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(o.key),"symbol"===Me(r)?r:String(r)),o)}var r}function Qe(e,t,n){return t&&He(e.prototype,t),n&&He(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Ue(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&&Ye(e,t)}function Ye(e,t){return Ye=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Ye(e,t)}function We(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Ke(e);if(t){var r=Ke(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return function(e,t){if(t&&("object"===Me(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,n)}}function Ke(e){return Ke=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ke(e)}var ze=function(e){Ue(n,e);var t=We(n);function n(e){return Ne(this,n),t.call(this,e)}return Qe(n,[{key:"initialize",value:function(){this.bindListeners(),this.getSortType(),this.videoDataService=r.u.getInstance(y.Or.Video,this),this.libraryDataService=r.u.getInstance(y.Or.Library,this),this.pendingItemsService=r.u.getInstance(y.K9.PendingItems,this),this.localCacheDataService=r.u.getInstance(y.Or.LocalCache,this),this.playerDataService=r.u.getInstance(y.Or.Player,this),this.videoMixinService=r.u.getInstance(y.K9.VideoMixin,this),this.createViewKey=this.createViewKey.bind(this)}},{key:"title",get:function(){return!!this.model&&this.model.get("name")}},{key:"template",get:function(){return Be()}},{key:"className",get:function(){return"bg-white rounded"}},{key:"channelName",get:function(){return"".concat(this.name,":").concat(this.cid)}},{key:"props",get:function(){return["collectionIdentifier"]}},{key:"regions",value:function(){return{banner:{el:".banner-region",replaceElement:!0,partialLoading:b.LP.Banner},header:{el:".header-region",replaceElement:!0,partialLoading:b.LP.VideoListHeader},videoList:{el:".video-list-region",replaceElement:!0,partialLoading:b.LP.VideoListWithBulkActions},childFolders:{el:".child-folders-region",replaceElement:!1,partialLoading:b.LP.SubFolder},pagination:{el:".pagination-region",replaceElement:!0},subheading:{el:".subheading-region",replaceElement:!0,partialLoading:b.LP.VideoListSubheading}}}},{key:"bindListeners",value:function(){var e=this.options.collectionIdentifier.toString();this.listenTo(y.Vk.VIDEO,"".concat(e,":sync"),this.render),this.listenTo(y.Vk.VIDEO,"".concat(y.M_.DELETE_VIDEO,":sync"),this.fetchData),this.listenTo(y.Vk.VIDEO,"cache:cleared",this.render),this.listenTo(y.Vk.RESTRICTED_VIDEO,"".concat(y.M_.RESTRICTED_OBJECTS,":").concat(e,":invalidate"),this.updateRestrictedVideos),this.listenTo(this.channelName,"cancel:pending:item",this.cancelPendingItem),this.listenTo(this.channelName,"retry:pending:item",this.retryPendingItem),this.listenTo(this.channelName,"fetch:video:with:metadata",this.fetchVideoWithMetadata),this.listenTo(y.Vk.LOCAL_CACHE,"".concat(y.M_.LOCAL_CACHE_DEVICES,":sync"),this.render),this.listenTo(y.Vk.LOCAL_CACHE,"".concat(y.M_.LOCAL_CACHE_DEVICES,":error"),this.onError)}},{key:"getSortType",value:function(){this.sortType||(this.sortType=this.options.collectionIdentifier.sort)}},{key:"updateRestrictedVideos",value:function(){var e=this;this.videoMixinService.getAndMixinVideoCollectionRestrictions(this.videoCollection,this.collectionIdentifier,(function(){return e.render()}))}},{key:"cancelPendingItem",value:function(e){this.pendingItemsService.clearPendingItem(e)}},{key:"retryPendingItem",value:function(e){this.pendingItemsService.retryPendingItem(e)}},{key:"createViewKey",value:function(e,t){this.playerDataService.createViewKey(e,a.f.MasterObject,t)}},{key:"setVideosWithMetadata",value:function(){this.videoCollection&&(this.videosWithMetadata=new p.t(this.videoCollection.map((function(e){return new g.n({id:e.get("id")})}))))}},{key:"renderBanner",value:function(){var e=new T({model:this.model,channelName:this.channelName,imageCdnUrl:this.config.get("imageCdnUrl")});this.showChildView("banner",e)}},{key:"renderChildFolders",value:function(){var e;if(null===(e=this.folders)||void 0===e?void 0:e.length){var t=new $({collection:this.folders,forceExpanded:0===this.videoCollection.length});this.showChildView("childFolders",t)}}},{key:"renderHeader",value:function(){this.showChildView("header",new ie({collection:this.videoCollection,libraries:this.libraryCollection,folder:this.model instanceof m.g&&this.model}))}},{key:"renderSubheading",value:function(){var e;this.showChildView("subheading",new Ve({collection:this.videoCollection,application:y.OV.LIBRARY_EDITOR,action:this.appLinkAction(),allowBulk:this.allowBulk(),collectionIdentifier:this.collectionIdentifier,analyticsOptions:this.options.analyticsOptions,showHeading:!!(null===(e=this.folders)||void 0===e?void 0:e.length)}))}},{key:"renderVideoList",value:function(){var e,t=this.videoDataService.getVideoCollectionCursors(this.collectionIdentifier),n=new h.Y({collection:this.videoCollection,videosWithMetadata:this.videosWithMetadata,application:y.OV.LIBRARY_EDITOR,allowBulk:this.allowBulk(),collectionIdentifier:this.collectionIdentifier,config:this.config,pendingItems:this.pendingItemsService.getPendingItems(),videoItemComponentType:this.componentType,emptyStateType:this.emptyStateType(),emptyStateOptions:this.emptyStateOptions(),supportSiteUrl:this.config.get("supportSiteUrl"),collectionViewChannel:this.channelName,customerHasLocalCache:O.o8.customerHasLocalCache(this.devices,this.currentUser.get("customerId")),customerHasExchange:this.exchanges.any(),analyticsOptions:this.options.analyticsOptions,sourceMetadataOptions:{showFolder:this.showFolderSource(),libraries:this.libraryCollection},videoCollectionSource:this.getVideoCollectionSource(),currentUser:this.currentUser,playerApiUrl:this.config.get("playerApiUrl"),createViewKey:this.createViewKey,hasCursors:!!t,showEmptyState:!(null===(e=this.folders)||void 0===e?void 0:e.length),libraries:this.libraryCollection});this.showChildView("videoList",n)}},{key:"renderPagination",value:function(){var e=this.videoDataService.getVideoCollectionCursors(this.collectionIdentifier),t=new s.Q({cursors:e,collectionId:this.options.collectionIdentifier.id,appLink:{application:y.OV.LIBRARY_EDITOR,action:this.appLinkAction(),args:[this.collectionIdentifier.id],params:this.collectionIdentifier.toParams()},analyticsOptions:this.options.analyticsOptions});this.showChildView("pagination",t)}},{key:"fetchData",value:function(){this.fetchModel(),this.devices=this.localCacheDataService.getDevices(this.currentUser.get("customerId")),this.fetchVideoCollection()}},{key:"fetchVideoWithMetadata",value:function(e){var t=this;this.videoDataService.getVideo(e,(function(n){var o=t.videosWithMetadata.get(e);o&&(o.set(n.toJSON()),o.set({dataFetched:!0}))}))}},{key:"requiredResources",get:function(){return{config:w.p.config,currentUser:k.K.currentUser,libraryCollection:Ae.T.libraries,exchanges:Ae.T.exchanges}}},{key:"onBeforeRender",value:function(){return this.fetchData(),!!this.videoCollection&&(this.setVideosWithMetadata(),!!this.model)}},{key:"onRender",value:function(){this.renderBanner(),this.renderHeader(),this.renderChildFolders(),this.renderSubheading(),this.renderVideoList(),this.renderPagination()}}]),n}(l.Q.G7),Xe=function(e){Ue(n,e);var t=We(n);function n(){return Ne(this,n),t.apply(this,arguments)}return Qe(n,[{key:"name",get:function(){return"FolderView"}},{key:"lang",get:function(){return"libraryEditor.folderView"}},{key:"componentType",get:function(){return d.U.Draggable}},{key:"bindListeners",value:function(){this.listenTo(y.Vk.LIBRARY,"".concat(y.M_.FOLDER,":").concat(this.options.collectionIdentifier.id,":sync libraries:sync"),this.render),this.listenTo(y.Vk.LIBRARY,"".concat(y.M_.FOLDER,":").concat(this.options.collectionIdentifier.id,":error"),this.onError),this.listenTo(y.Vk.LIBRARY,"".concat(y.M_.UPDATE_FOLDER_BANNER,":").concat(this.options.collectionIdentifier.id,":sync"),this.fetchModel),this.listenTo(y.Vk.LIBRARY,"".concat(new v.KX(this.options.collectionIdentifier.id,u.E.AtoZ),":invalidate"),this.onFoldersInvalidate),Fe(Ke(n.prototype),"bindListeners",this).call(this)}},{key:"onError",value:function(e){switch(e.type){case o.h.Forbidden:l.Q.Ry.throw(new Te.gO);break;case o.h.NotFound:l.Q.Ry.throw(new Te.Zv)}}},{key:"appLinkAction",value:function(){return y.eX.LibraryEditor.FOLDER}},{key:"allowBulk",value:function(){return!0}},{key:"emptyStateType",value:function(){return b.ub.Folder}},{key:"emptyStateOptions",value:function(){return{heading:i.T.getPhrase(this.lang,"emptyStateHeading"),description:i.T.getPhrase(this.lang,"emptyStateInfo",{url:f.o.getHybridArticle(c.s.AddFromOnline,c.b.AddFromLite),classNames:"info-link"})}}},{key:"showFolderSource",value:function(){return!1}},{key:"getVideoCollectionSource",value:function(){return Le.x_.Folder}},{key:"fetchModel",value:function(){this.model=this.libraryDataService.getFolder(this.collectionIdentifier.id)}},{key:"fetchVideoCollection",value:function(){this.videoCollection=this.videoDataService.getCollectionVideos(this.collectionIdentifier)}},{key:"onFoldersInvalidate",value:function(){this.fetchFolders(null,!0)}},{key:"fetchFolders",value:function(e,t){var n=this,o=new v.KX(this.collectionIdentifier.id,u.E.AtoZ,e);this.libraryDataService.getFolders(o,(function(e){t||!n.folders?n.folders=e:n.folders.add(e.models);var r=n.libraryDataService.getFoldersCursors(o);(null==r?void 0:r.next)?n.fetchFolders(r.next):n.render()}))}},{key:"onBeforeRender",value:function(){return this.folders||this.fetchFolders(),Fe(Ke(n.prototype),"onBeforeRender",this).call(this)&&!!this.folders}}]),n}(ze),Ze=function(e){Ue(n,e);var t=We(n);function n(){return Ne(this,n),t.apply(this,arguments)}return Qe(n,[{key:"initialize",value:function(){this.seriesDataService=r.u.getInstance(y.Or.Series,this),Fe(Ke(n.prototype),"initialize",this).call(this)}},{key:"name",get:function(){return"SeriesView"}},{key:"lang",get:function(){return"libraryEditor.seriesView"}},{key:"componentType",get:function(){return d.U.Base}},{key:"regions",value:function(){var e=Fe(Ke(n.prototype),"regions",this).call(this);return e.subheading.partialLoading=b.LP.SeriesVideoListSubheading,delete e.header.partialLoading,delete e.childFolders.partialLoading,e}},{key:"bindListeners",value:function(){this.listenTo(y.Vk.SERIES,"".concat(y.M_.SERIES,":").concat(this.options.collectionIdentifier.id,":sync"),this.render),this.listenTo(y.Vk.SERIES,"".concat(y.M_.SERIES,":").concat(this.options.collectionIdentifier.id,":error"),this.onError),Fe(Ke(n.prototype),"bindListeners",this).call(this)}},{key:"onError",value:function(e){e.type===o.h.NotFound&&l.Q.Ry.throw(new Te.Ag)}},{key:"appLinkAction",value:function(){return y.eX.LibraryEditor.SERIES}},{key:"allowBulk",value:function(){return!1}},{key:"emptyStateType",value:function(){return b.ub.Series}},{key:"emptyStateOptions",value:function(){return{heading:i.T.getPhrase(this.lang,"emptyStateHeading"),description:i.T.getPhrase(this.lang,"emptyStateInfo",{url:f.o.getHybridArticle(c.s.AddFromOnline,c.b.AddFromLite),classNames:"info-link"})}}},{key:"showFolderSource",value:function(){return!0}},{key:"getVideoCollectionSource",value:function(){return Le.x_.Series}},{key:"fetchModel",value:function(){this.model=this.seriesDataService.getSeries(this.collectionIdentifier.id)}},{key:"fetchVideoCollection",value:function(){this.videoCollection=this.videoDataService.getSeriesVideos(this.collectionIdentifier,this.libraryCollection.pluck("id"))}}]),n}(ze)},57085:function(e,t,n){"use strict";n.d(t,{n:function(){return E}});var o=n(31647),r=n(48090),i=n(22557),l=n(86363),a=n.n(l);function c(e){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},c(e)}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,(void 0,r=function(e,t){if("object"!==c(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!==c(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(o.key),"symbol"===c(r)?r:String(r)),o)}var r}function f(e,t,n){return t&&u(e.prototype,t),n&&u(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function p(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)}function d(e,t){return d=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},d(e,t)}function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=y(e);if(t){var r=y(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return function(e,t){if(t&&("object"===c(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,n)}}function y(e){return y=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},y(e)}var b=function(e){p(n,e);var t=h(n);function n(){return s(this,n),t.apply(this,arguments)}return f(n,[{key:"name",get:function(){return"BreadcrumbItemComponent"}},{key:"template",get:function(){return a()}},{key:"tagName",get:function(){return"li"}},{key:"className",get:function(){var e="breadcrumb-item";return this.model.get("active")&&(e+=" active"),e}},{key:"attributes",get:function(){return this.model.get("active")?{"aria-current":"page"}:{}}},{key:"appLinks",get:function(){return this.model.get("active")?{}:{a:this.model.get("appLink")}}},{key:"viewOptions",value:function(){return{isActive:this.model.get("active")}}}]),n}(o.Q.wA),v=function(e){p(n,e);var t=h(n);function n(){return s(this,n),t.apply(this,arguments)}return f(n,[{key:"name",get:function(){return"BreadcrumbComponentCollection"}},{key:"tagName",get:function(){return"ol"}},{key:"className",get:function(){return"breadcrumb m-0 p-0"}},{key:"childView",get:function(){return b}}]),n}(o.Q.$W),m=n(93933),g=n.n(m);function w(e){return w="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},w(e)}function k(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,(void 0,r=function(e,t){if("object"!==w(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!==w(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(o.key),"symbol"===w(r)?r:String(r)),o)}var r}function O(e,t){return O=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},O(e,t)}function S(e){return S=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},S(e)}var E=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&&O(e,t)}(s,e);var t,n,l,a,c=(l=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=S(l);if(a){var n=S(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===w(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function s(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),c.call(this,e)}return t=s,(n=[{key:"initialize",value:function(){this.getBreadcrumbs()}},{key:"name",get:function(){return"BreadcrumbsComponent"}},{key:"template",get:function(){return g()}},{key:"className",get:function(){return"d-inline-block"}},{key:"regions",value:function(){return{breadcrumbs:".breadcrumbs-region"}}},{key:"defaults",get:function(){return{customBreadcrumbs:[]}}},{key:"getBreadcrumbs",value:function(){var e=this;this.breadcrumbCollection=new o.Q.FE([]);var t,n=this.options.folder;do{if(!n)break;if(t=i.P.getParent(n.id,this.options.libraries),this.breadcrumbCollection.add(this.getBreadcrumb(n,!!t),{at:0}),!t)break;n=t}while(t);this.options.video&&this.breadcrumbCollection.add({name:this.options.video.get("name"),appLink:{application:r.OV.LIBRARY_EDITOR,action:r.eX.LibraryEditor.VIDEO_DETAILS,args:[this.options.video.id]}}),this.options.customBreadcrumbs&&this.options.customBreadcrumbs.forEach((function(t){return e.breadcrumbCollection.add(t)})),this.breadcrumbCollection.length&&this.breadcrumbCollection.last().set("active",!this.options.enableLastItemAppLink)}},{key:"getBreadcrumb",value:function(e,t){var n=t?r.eX.LibraryEditor.FOLDER:r.eX.LibraryEditor.LIBRARY;return{name:e.get("name"),appLink:{application:r.OV.LIBRARY_EDITOR,action:n,args:[e.id]}}}},{key:"onRender",value:function(){var e=new v({collection:this.breadcrumbCollection});this.showChildView("breadcrumbs",e)}}])&&k(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),s}(o.Q.wA)},99186:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({1:function(e,t,n,o,r){return"disabled"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,r){e.propertyIsEnumerable;var i,l=null!=t?t:e.nullContext||{},a=e.hooks.helperMissing,c=e.escapeExpression;return'<div class="p-3">\n <a class="btn previous-applink btn-outline-dark '+(null!=(i=n.unless.call(l,null!=(i=null!=(i=null!=t?t.options:t)?i.cursors:i)?i.previous:i,{name:"unless",hash:{},fn:e.program(1,r,0),inverse:e.noop,data:r}))?i:"")+'">'+c((n.lang||t&&t.lang||a).call(l,"previous",{name:"lang",hash:{},data:r}))+'</a>\n <a class="btn next-applink btn-outline-dark '+(null!=(i=n.unless.call(l,null!=(i=null!=(i=null!=t?t.options:t)?i.cursors:i)?i.next:i,{name:"unless",hash:{},fn:e.program(1,r,0),inverse:e.noop,data:r}))?i:"")+'">'+c((n.lang||t&&t.lang||a).call(l,"next",{name:"lang",hash:{},data:r}))+"</a>\n</div>"},useData:!0})},85552:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,o,r){var i;return e.propertyIsEnumerable,'<h1 class="text-white position-absolute m-0">\n '+e.escapeExpression("function"==typeof(i=null!=(i=n.name||(null!=t?t.name:t))?i:e.hooks.helperMissing)?i.call(null!=t?t:e.nullContext||{},{name:"name",hash:{},data:r}):i)+'\n</h1>\n<div class="options-region"></div>'},useData:!0})},53370:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,o,r){var i;return e.propertyIsEnumerable,'<button class="btn btn-outline-dark dropdown-toggle" type="button" id="sortSelectButton" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">\n '+e.escapeExpression("function"==typeof(i=null!=(i=n.name||(null!=t?t.name:t))?i:e.hooks.helperMissing)?i.call(null!=t?t:e.nullContext||{},{name:"name",hash:{},data:r}):i)+'\n</button>\n<div class="dropdown-menu-region"></div>'},useData:!0})},73368:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({1:function(e,t,n,o,r){return"ps-2"},3:function(e,t,n,o,r){return"cursor-pointer"},5:function(e,t,n,o,r){e.propertyIsEnumerable;var i,l=e.lambda,a=e.escapeExpression;return' <div class="'+a(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.svgContainer:i,t))+" "+a(l(null!=(i=null!=t?t.options:t)?i.caretClass:i,t))+'">\n '+(null!=(i=l(null!=(i=null!=t?t.options:t)?i.caretSvg:i,t))?i:"")+"\n </div>\n"},7:function(e,t,n,o,r){var i;return e.propertyIsEnumerable,' <div class="d-flex justify-content-end justify-self-end px-2 expand-toggle">\n <span class="info-link d-inline-block">\n'+(null!=(i=n.if.call(null!=t?t:e.nullContext||{},null!=(i=null!=t?t.options:t)?i.isExpanded:i,{name:"if",hash:{},fn:e.program(8,r,0),inverse:e.program(10,r,0),data:r}))?i:"")+" </span>\n </div>\n"},8:function(e,t,n,o,r){return e.propertyIsEnumerable," "+e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"seeLess",{name:"lang",hash:{},data:r}))+"\n"},10:function(e,t,n,o,r){var i;return e.propertyIsEnumerable," "+e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"seeAll",{name:"lang",hash:{smartCount:null!=(i=null!=t?t.options:t)?i.count:i},data:r}))+"\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,r){e.propertyIsEnumerable;var i,l=null!=t?t:e.nullContext||{},a=e.escapeExpression;return'<div class="d-flex justify-content-between align-items-center">\n <div class="d-inline-flex align-items-center mb-2 expand-toggle '+(null!=(i=n.if.call(l,null!=(i=null!=t?t.options:t)?i.forceExpanded:i,{name:"if",hash:{},fn:e.program(1,r,0),inverse:e.program(3,r,0),data:r}))?i:"")+'">\n'+(null!=(i=n.unless.call(l,null!=(i=null!=t?t.options:t)?i.forceExpanded:i,{name:"unless",hash:{},fn:e.program(5,r,0),inverse:e.noop,data:r}))?i:"")+' <h2 class="h4 mb-0">'+a((n.lang||t&&t.lang||e.hooks.helperMissing).call(l,"folders",{name:"lang",hash:{},data:r}))+" ("+a(e.lambda(null!=(i=null!=t?t.options:t)?i.count:i,t))+")</h2>\n </div>\n"+(null!=(i=n.unless.call(l,null!=(i=null!=t?t.options:t)?i.forceExpanded:i,{name:"unless",hash:{},fn:e.program(7,r,0),inverse:e.noop,data:r}))?i:"")+'</div>\n<div class="subfolders-region"></div>'},useData:!0})},8420:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,o,r){return'<div class="py-3 border-bottom">\n <div class="breadcrumbs-region d-inline-flex align-items-center"></div>\n</div>'},useData:!0})},56846:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({1:function(e,t,n,o,r){return e.propertyIsEnumerable,'<h2 class="h4">'+e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"videos",{name:"lang",hash:{},data:r}))+"</h2>"},3:function(e,t,n,o,r){return"pt-2"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,r){e.propertyIsEnumerable;var i,l=null!=t?t:e.nullContext||{};return(null!=(i=n.if.call(l,null!=(i=null!=t?t.options:t)?i.showHeading:i,{name:"if",hash:{},fn:e.program(1,r,0),inverse:e.noop,data:r}))?i:"")+'\n<div class="d-flex justify-content-between align-items-center pb-2 '+(null!=(i=n.if.call(l,null!=(i=null!=t?t.options:t)?i.showHeading:i,{name:"if",hash:{},fn:e.program(3,r,0),inverse:e.noop,data:r}))?i:"")+'">\n <div class="d-inline-flex justify-content-start">\n <div class="check-all-region d-inline-flex align-items-center"></div>\n <div class="bulk-actions-region"></div>\n </div>\n <div class="sorting-region"></div>\n</div>'},useData:!0})},93089:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,o,r){return'<div class="banner-region"></div>\n<div class="header-region"></div>\n<div class="child-folders-region"></div>\n<div class="subheading-region"></div>\n<div class="video-list-region"></div>\n<div class="pagination-region"></div>'},useData:!0})},86363:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({1:function(e,t,n,o,r){var i;return e.propertyIsEnumerable,'<span class="fw-bolder">'+e.escapeExpression("function"==typeof(i=null!=(i=n.name||(null!=t?t.name:t))?i:e.hooks.helperMissing)?i.call(null!=t?t:e.nullContext||{},{name:"name",hash:{},data:r}):i)+"</span>\n"},3:function(e,t,n,o,r){var i;return e.propertyIsEnumerable,"<a>"+e.escapeExpression("function"==typeof(i=null!=(i=n.name||(null!=t?t.name:t))?i:e.hooks.helperMissing)?i.call(null!=t?t:e.nullContext||{},{name:"name",hash:{},data:r}):i)+"</a>\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,r){var i;return e.propertyIsEnumerable,null!=(i=n.if.call(null!=t?t:e.nullContext||{},null!=(i=null!=t?t.options:t)?i.isActive:i,{name:"if",hash:{},fn:e.program(1,r,0),inverse:e.program(3,r,0),data:r}))?i:""},useData:!0})},93933:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,o,r){return'<nav class="breadcrumbs-region" aria-label="breadcrumb"></nav>'},useData:!0})},34670:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({1:function(e,t,n,o,r){return"disabled"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,r){e.propertyIsEnumerable;var i,l=null!=t?t:e.nullContext||{};return'<button\n class="dropdown-toggle btn btn-outline-dark ms-2 '+(null!=(i=n.unless.call(l,null!=(i=null!=t?t.options:t)?i.enabled:i,{name:"unless",hash:{},fn:e.program(1,r,0),inverse:e.noop,data:r}))?i:"")+'"\n type="button"\n id="bulkActions"\n data-bs-toggle="dropdown"\n aria-haspopup="true"\n aria-expanded="false"\n '+(null!=(i=n.unless.call(l,null!=(i=null!=t?t.options:t)?i.enabled:i,{name:"unless",hash:{},fn:e.program(1,r,0),inverse:e.noop,data:r}))?i:"")+"\n>\n "+e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(l,"options",{name:"lang",hash:{},data:r}))+'\n</button>\n<div class="dropdown-menu-region"></div>'},useData:!0})}}]);
1
+ (self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[1911],{59054:function(e,t,n){"use strict";var o;n.d(t,{f:function(){return o}}),function(e){e.Share="share",e.MasterObject="masterobject"}(o||(o={}))},47022:function(e,t,n){"use strict";n.d(t,{Q:function(){return h}});var o=n(39479),r=n(31647),i=n(52076),l=n(70065),a=n(99186),c=n.n(a);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 u(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,f(o.key),o)}}function f(e){var t=function(e,t){if("object"!==s(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!==s(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===s(t)?t:String(t)}function p(e,t){return p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},p(e,t)}function d(e){return d=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},d(e)}var h=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)}(y,e);var t,n,r,a,h=(r=y,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(r);if(a){var n=d(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===s(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function y(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,y),h.call(this,e)}return t=y,(n=[{key:"defaults",get:function(){return{cursors:{},cursorParamName:"cursor"}}},{key:"name",get:function(){return"PaginationComponent"}},{key:"template",get:function(){return c()}},{key:"lang",get:function(){return"shared._pagination"}},{key:"appLinks",get:function(){var e={};if(!this.options.cursors)return{};if(this.options.cursors.previous){var t=this.options.cursors.previous,n=this.buildCursor(this.options.cursors.previous);+t<=1&&!0!==this.options.allowFirstPageCursor&&delete n.params.cursor,e[".previous-applink"]=n}return this.options.cursors.next&&(e[".next-applink"]=this.buildCursor(this.options.cursors.next)),e}},{key:"events",value:function(){return{"click .previous-applink":"onClickPrevious","click .next-applink":"onClickNext"}}},{key:"buildCursor",value:function(e){return{application:this.options.appLink.application,action:this.options.appLink.action,args:this.options.appLink.args,params:o.extend({},this.options.appLink.params,(t={},n=this.options.cursorParamName,r=e,(n=f(n))in t?Object.defineProperty(t,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[n]=r,t))};var t,n,r}},{key:"onClickPrevious",value:function(){this.logAction("previous")}},{key:"onClickNext",value:function(){this.logAction("next")}},{key:"logAction",value:function(e){var t=i.k.mergeOptions(this.options.analyticsOptions,{location:l.LZ.Pagination,entity:l.py.Pagination,actionType:l.Vw.Navigate}),n={id:this.options.collectionId,page:e};i.k.logUserAction(n,t)}},{key:"viewOptions",value:function(){return{cursors:this.options.cursors}}},{key:"onBeforeRender",value:function(){return!!this.options.cursors}}])&&u(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),y}(r.Q.wA)},27719:function(e,t,n){"use strict";n.r(t),n.d(t,{FolderView:function(){return Xe},SeriesView:function(){return Ze}});var o=n(99748),r=n(21679),i=n(57857),l=n(31647),a=n(59054),c=n(25692),s=n(47022),u=n(77502),f=n(98985),p=n(70763),d=n(58688),h=n(23096),y=n(48090),b=n(29457),v=n(3059),m=n(60602),g=n(71192),w=n(48404),k=n(19226),O=n(61843),S=n(70065),E=n(24828),P=n(22231),C=n(51785),j=n(85552),I=n.n(j),R=n(21625);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 _(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,(void 0,r=function(e,t){if("object"!==x(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!==x(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(o.key),"symbol"===x(r)?r:String(r)),o)}var r}function V(e,t){return V=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},V(e,t)}function L(e){return L=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},L(e)}var T=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&&V(e,t)}(l,e);var t,n,o,r,i=(o=l,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=L(o);if(r){var n=L(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(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)}(this,e)});function l(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l),i.call(this,e)}return t=l,(n=[{key:"name",get:function(){return"BannerComponent"}},{key:"className",get:function(){var e=(0,P.x)(this.model.get("name"),E.o);return"px-3 position-relative rounded-top ".concat(R.Z.banner," ").concat(e)}},{key:"regions",value:function(){return{options:{el:".options-region",replaceElement:!0}}}},{key:"attributes",get:function(){var e=O.jw.createBannerUrl(this.model.banner);return e?{style:"background-image: url('".concat(e,"')")}:null}},{key:"template",get:function(){return I()}},{key:"renderActions",value:function(){this.showChildView("options",new C.c({model:this.model,extraClasses:"".concat(R.Z.actions," rounded-circle me-2 mt-2"),buttonClass:"text-light",analyticsOptions:{location:S.LZ.Banner}}))}},{key:"onRender",value:function(){this.renderActions()}}])&&_(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),l}(l.Q.wA),A=n(4705),D=n(63791),B=n(87002),M=n(73368),F=n.n(M),N={svgContainer:"mMWNm",caretClosed:"Fe74o"};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 Q(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function U(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,(void 0,r=function(e,t){if("object"!==H(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!==H(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(o.key),"symbol"===H(r)?r:String(r)),o)}var r}function Y(e,t,n){return t&&U(e.prototype,t),n&&U(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function W(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&K(e,t)}function K(e,t){return K=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},K(e,t)}function z(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=X(e);if(t){var r=X(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return function(e,t){if(t&&("object"===H(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,n)}}function X(e){return X=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},X(e)}var Z="has:expanded:library:folders",G=function(e){W(n,e);var t=z(n);function n(){return Q(this,n),t.apply(this,arguments)}return Y(n,[{key:"name",get:function(){return"SubFoldersCollectionView"}},{key:"className",get:function(){return"row px-2"}},{key:"childView",get:function(){return B.Y}},{key:"childViewOptions",get:function(){return{location:"subfolder"}}}]),n}(l.Q.$W),$=function(e){W(n,e);var t=z(n);function n(e){return Q(this,n),t.call(this,e)}return Y(n,[{key:"initialize",value:function(){this.forceExpanded=this.options.forceExpanded||this.collection.length<=6,this.forceExpanded?this.isExpanded=!0:this.isExpanded=A.SG.get(Z)||!1}},{key:"name",get:function(){return"SubFoldersView"}},{key:"className",get:function(){return"container-fluid pb-3"}},{key:"lang",get:function(){return"libraryEditor.subfolders"}},{key:"template",get:function(){return F()}},{key:"events",value:function(){return{"click .expand-toggle":"onClickExpandToggle"}}},{key:"regions",value:function(){return{subFolders:{replaceElement:!0,el:".subfolders-region"}}}},{key:"onClickExpandToggle",value:function(){this.options.forceExpanded||(this.isExpanded=!this.isExpanded,A.SG.set(Z,this.isExpanded),this.render())}},{key:"viewOptions",value:function(){return{styles:N,caretSvg:D.Nj.getSvg(D.vn.Caret),isExpanded:this.isExpanded,forceExpanded:this.forceExpanded,caretClass:this.isExpanded?"":N.caretClosed,count:this.collection.length}}},{key:"onRender",value:function(){this.showChildView("subFolders",new G({collection:this.isExpanded?this.collection:new l.Q.FE(this.collection.first(6))}))}}]),n}(l.Q.wA),J=n(57085),q=n(8420),ee=n.n(q);function te(e){return te="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},te(e)}function ne(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,(void 0,r=function(e,t){if("object"!==te(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!==te(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(o.key),"symbol"===te(r)?r:String(r)),o)}var r}function oe(e,t){return oe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},oe(e,t)}function re(e){return re=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},re(e)}var ie=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&&oe(e,t)}(l,e);var t,n,o,r,i=(o=l,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=re(o);if(r){var n=re(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===te(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function l(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l),i.call(this,e)}return t=l,(n=[{key:"name",get:function(){return"VideoListHeaderComponent"}},{key:"template",get:function(){return ee()}},{key:"className",get:function(){return this.options.folder?"px-3 mb-3":"mb-3"}},{key:"props",get:function(){return["collectionIdentifier"]}},{key:"regions",value:function(){return{breadcrumbs:{el:".breadcrumbs-region",replaceElement:!1}}}},{key:"renderBreadcrumbs",value:function(){this.options.folder&&this.options.libraries&&this.showChildView("breadcrumbs",new J.n({folder:this.options.folder,libraries:this.options.libraries}))}},{key:"onBeforeRender",value:function(){return!!this.options.folder}},{key:"onRender",value:function(){this.renderBreadcrumbs()}}])&&ne(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),l}(l.Q.wA),le=n(52076),ae=n(50028),ce=n(71641),se=n(40622),ue=n(34670),fe=n.n(ue);function pe(e){return pe="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},pe(e)}function de(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,(void 0,r=function(e,t){if("object"!==pe(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!==pe(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(o.key),"symbol"===pe(r)?r:String(r)),o)}var r}function he(e,t){return he=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},he(e,t)}function ye(e){return ye=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ye(e)}var be=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&&he(e,t)}(c,e);var t,n,o,r,a=(o=c,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=ye(o);if(r){var n=ye(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===pe(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function c(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c),a.call(this,e)}return t=c,(n=[{key:"initialize",value:function(){this.getViewModel(),this.bindListeners()}},{key:"getViewModel",value:function(){var e=this.options.collectionIdentifier.toString();this.model=O.S0.GetViewModel(e,se.De.VIDEO_LIST)}},{key:"bindListeners",value:function(){this.listenTo(this.model,"change",this.render),this.listenTo(this.collection,"remove",this.render)}},{key:"name",get:function(){return"BulkVideoActionsComponent"}},{key:"template",get:function(){return fe()}},{key:"lang",get:function(){return"shared.bulkVideoActions"}},{key:"regions",value:function(){return{dropdownItems:{replaceElement:!0,el:".dropdown-menu-region"}}}},{key:"getSelectedIds",value:function(){return O.S0.GetSelectedIds({key:this.options.collectionIdentifier.toString(),type:se.De.VIDEO_LIST,collection:this.collection,excludePredicate:function(e){return e.get("status")===ae.X.Processing}})}},{key:"getActions",value:function(){if(this.options.collectionIdentifier){var e=this.getSelectedIds();return new l.Q.FE([{title:i.T.getPhrase(this.lang,"move",{smartCount:e.length}),appLink:{application:this.options.application,action:y.eX.Shared.MOVE_VIDEOS,args:[e.join(","),this.options.collectionIdentifier.id]},analyticsOptions:le.k.mergeOptions(this.options.analyticsOptions,{actionType:S.Vw.Move,workflowPhase:S.eu.Start})},{title:i.T.getPhrase(this.lang,"remove",{smartCount:e.length}),appLink:{application:y.OV.LIBRARY_EDITOR,action:y.eX.Shared.DELETE_VIDEOS,args:[this.options.collectionIdentifier.id,e.join(",")]},analyticsOptions:le.k.mergeOptions(this.options.analyticsOptions,{actionType:S.Vw.Delete,workflowPhase:S.eu.Start}),classes:"text-danger"}])}}},{key:"viewOptions",value:function(){return{enabled:this.getSelectedIds().length}}},{key:"onRender",value:function(){this.showChildView("dropdownItems",new ce.w({displayOptions:{alignment:"end"},channelName:"".concat(this.name).concat(this.cid),collection:this.getActions(),analyticsHelper:le.k}))}}])&&de(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),c}(l.Q.wA),ve=n(12542),me=n(39479),ge=n(53370),we=n.n(ge);function ke(e){return ke="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},ke(e)}function Oe(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,(void 0,r=function(e,t){if("object"!==ke(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!==ke(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(o.key),"symbol"===ke(r)?r:String(r)),o)}var r}function Se(e,t){return Se=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Se(e,t)}function Ee(e){return Ee=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ee(e)}var Pe=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&&Se(e,t)}(a,e);var t,n,o,r,i=(o=a,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Ee(o);if(r){var n=Ee(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===ke(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function 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:"initialize",value:function(){this.getViewModel(),this.setSort(),this.bindListeners(),this.initializeCollection()}},{key:"getViewModel",value:function(){this.model=O.x$.GetSortViewModel()}},{key:"setSort",value:function(){var e=this.options.collectionIdentifier.sort;if(e!==this.model.get("sortType")){var t=O.x$.CreateSortObject(e);this.model.set(t)}}},{key:"bindListeners",value:function(){this.listenTo(this.channelName,"sort:selected",this.onSortSelected)}},{key:"initializeCollection",value:function(){this.collection||(this.collection=O.x$.CreateSortCollection())}},{key:"name",get:function(){return"SortSelectComponent"}},{key:"regions",value:function(){return{dropdown:{el:".dropdown-menu-region",replaceElement:!0}}}},{key:"template",get:function(){return we()}},{key:"channelName",get:function(){return"".concat(this.name).concat(this.cid)}},{key:"className",get:function(){return"position-relative"}},{key:"events",value:function(){return{click:"onClick"}}},{key:"onClick",value:function(){this.logAction(S.eu.Start)}},{key:"onSortSelected",value:function(e){this.model.set(e.toJSON()),this.render(),this.logAction(S.eu.Complete)}},{key:"logAction",value:function(e){var t=le.k.mergeOptions(this.options.analyticsOptions,{actionType:S.Vw.Sort,workflowPhase:e}),n={id:this.options.collectionIdentifier.id,sort:this.model.get("name")};le.k.logUserAction(n,t)}},{key:"onRender",value:function(){var e=this,t=this.collection.filter((function(t){return t.get("name")!==e.model.get("name")})),n=new l.Q.FE(me.map(t,(function(t){var n=t.toJSON();return n.appLink={application:e.options.appLink.application,action:e.options.appLink.action,args:[e.options.collectionIdentifier.id],params:{sort:t.get("sortName")}},n})));this.showChildView("dropdown",new ce.w({collection:n,channelName:this.channelName,childOptions:{titleProperty:"name",eventName:"sort:selected"},displayOptions:{alignment:"end"},analyticsHelper:le.k}))}}])&&Oe(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(l.Q.wA),Ce=n(56846),je=n.n(Ce);function Ie(e){return Ie="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ie(e)}function Re(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,(void 0,r=function(e,t){if("object"!==Ie(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!==Ie(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(o.key),"symbol"===Ie(r)?r:String(r)),o)}var r}function xe(e,t){return xe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},xe(e,t)}function _e(e){return _e=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},_e(e)}var Ve=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&&xe(e,t)}(l,e);var t,n,o,r,i=(o=l,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=_e(o);if(r){var n=_e(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===Ie(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function l(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l),i.call(this,e)}return t=l,(n=[{key:"initialize",value:function(){this.analyticsOptions=le.k.mergeOptions(this.options.analyticsOptions,{location:S.LZ.VideoListHeader})}},{key:"name",get:function(){return"VideoListSubheadingComponent"}},{key:"template",get:function(){return je()}},{key:"className",get:function(){return"px-3"}},{key:"lang",get:function(){return"libraryEditor.videoListSubheading"}},{key:"props",get:function(){return["collectionIdentifier"]}},{key:"regions",value:function(){return{checkAll:{el:".check-all-region",replaceElement:!1},bulkActions:{el:".bulk-actions-region",replaceElement:!0},sorting:{el:".sorting-region",replaceElement:!0}}}},{key:"renderCheckAll",value:function(){this.options.allowBulk&&this.showChildView("checkAll",new ve.Y({className:"float-start",key:this.collectionIdentifier.toString(),type:se.De.VIDEO_LIST,numberOfItems:this.collection.length}))}},{key:"renderBulkActions",value:function(){this.options.allowBulk&&this.showChildView("bulkActions",new be({collection:this.collection,collectionIdentifier:this.collectionIdentifier,application:this.options.application,analyticsOptions:le.k.mergeOptions(this.options.analyticsOptions,{descriptor:S.yh.Bulk,location:S.LZ.VideoListHeader,entity:S.py.Video,workflowPhase:S.eu.Start})}))}},{key:"renderSorting",value:function(){this.showChildView("sorting",new Pe({collectionIdentifier:this.collectionIdentifier,analyticsOptions:this.analyticsOptions,appLink:{application:this.options.application,action:this.options.action}}))}},{key:"viewOptions",value:function(){return{showBulkActions:this.options.allowBulk&&this.collection.length>0,showHeading:this.options.showHeading}}},{key:"onBeforeRender",value:function(){return!(this.collection.length<=0)}},{key:"onRender",value:function(){this.renderCheckAll(),this.renderBulkActions(),this.renderSorting()}}])&&Re(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),l}(l.Q.wA),Le=n(26457),Te=n(56906),Ae=n(95061),De=n(93089),Be=n.n(De);function Me(e){return Me="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},Me(e)}function Fe(){return Fe="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var o=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Ke(e)););return e}(e,t);if(o){var r=Object.getOwnPropertyDescriptor(o,t);return r.get?r.get.call(arguments.length<3?e:n):r.value}},Fe.apply(this,arguments)}function Ne(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function He(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,(void 0,r=function(e,t){if("object"!==Me(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!==Me(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(o.key),"symbol"===Me(r)?r:String(r)),o)}var r}function Qe(e,t,n){return t&&He(e.prototype,t),n&&He(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Ue(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&&Ye(e,t)}function Ye(e,t){return Ye=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Ye(e,t)}function We(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Ke(e);if(t){var r=Ke(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return function(e,t){if(t&&("object"===Me(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,n)}}function Ke(e){return Ke=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ke(e)}var ze=function(e){Ue(n,e);var t=We(n);function n(e){return Ne(this,n),t.call(this,e)}return Qe(n,[{key:"initialize",value:function(){this.bindListeners(),this.getSortType(),this.videoDataService=r.u.getInstance(y.Or.Video,this),this.libraryDataService=r.u.getInstance(y.Or.Library,this),this.pendingItemsService=r.u.getInstance(y.K9.PendingItems,this),this.localCacheDataService=r.u.getInstance(y.Or.LocalCache,this),this.playerDataService=r.u.getInstance(y.Or.Player,this),this.videoMixinService=r.u.getInstance(y.K9.VideoMixin,this),this.createViewKey=this.createViewKey.bind(this)}},{key:"title",get:function(){return!!this.model&&this.model.get("name")}},{key:"template",get:function(){return Be()}},{key:"className",get:function(){return"bg-white rounded"}},{key:"channelName",get:function(){return"".concat(this.name,":").concat(this.cid)}},{key:"props",get:function(){return["collectionIdentifier"]}},{key:"regions",value:function(){return{banner:{el:".banner-region",replaceElement:!0,partialLoading:b.LP.Banner},header:{el:".header-region",replaceElement:!0,partialLoading:b.LP.VideoListHeader},videoList:{el:".video-list-region",replaceElement:!0,partialLoading:b.LP.VideoListWithBulkActions},childFolders:{el:".child-folders-region",replaceElement:!1,partialLoading:b.LP.SubFolder},pagination:{el:".pagination-region",replaceElement:!0},subheading:{el:".subheading-region",replaceElement:!0,partialLoading:b.LP.VideoListSubheading}}}},{key:"bindListeners",value:function(){var e=this.options.collectionIdentifier.toString();this.listenTo(y.Vk.VIDEO,"".concat(e,":sync"),this.render),this.listenTo(y.Vk.VIDEO,"".concat(y.M_.DELETE_VIDEO,":sync"),this.fetchData),this.listenTo(y.Vk.VIDEO,"cache:cleared",this.render),this.listenTo(y.Vk.RESTRICTED_VIDEO,"".concat(y.M_.RESTRICTED_OBJECTS,":").concat(e,":invalidate"),this.updateRestrictedVideos),this.listenTo(this.channelName,"cancel:pending:item",this.cancelPendingItem),this.listenTo(this.channelName,"retry:pending:item",this.retryPendingItem),this.listenTo(this.channelName,"fetch:video:with:metadata",this.fetchVideoWithMetadata),this.listenTo(y.Vk.LOCAL_CACHE,"".concat(y.M_.LOCAL_CACHE_DEVICES,":sync"),this.render),this.listenTo(y.Vk.LOCAL_CACHE,"".concat(y.M_.LOCAL_CACHE_DEVICES,":error"),this.onError)}},{key:"getSortType",value:function(){this.sortType||(this.sortType=this.options.collectionIdentifier.sort)}},{key:"updateRestrictedVideos",value:function(){var e=this;this.videoMixinService.getAndMixinVideoCollectionRestrictions(this.videoCollection,this.collectionIdentifier,(function(){return e.render()}))}},{key:"cancelPendingItem",value:function(e){this.pendingItemsService.clearPendingItem(e)}},{key:"retryPendingItem",value:function(e){this.pendingItemsService.retryPendingItem(e)}},{key:"createViewKey",value:function(e,t){this.playerDataService.createViewKey(e,a.f.MasterObject,t)}},{key:"setVideosWithMetadata",value:function(){this.videoCollection&&(this.videosWithMetadata=new p.t(this.videoCollection.map((function(e){return new g.n({id:e.get("id")})}))))}},{key:"renderBanner",value:function(){var e=new T({model:this.model,channelName:this.channelName,imageCdnUrl:this.config.get("imageCdnUrl")});this.showChildView("banner",e)}},{key:"renderChildFolders",value:function(){var e;if(null===(e=this.folders)||void 0===e?void 0:e.length){var t=new $({collection:this.folders,forceExpanded:0===this.videoCollection.length});this.showChildView("childFolders",t)}}},{key:"renderHeader",value:function(){this.showChildView("header",new ie({collection:this.videoCollection,libraries:this.libraryCollection,folder:this.model instanceof m.g&&this.model}))}},{key:"renderSubheading",value:function(){var e;this.showChildView("subheading",new Ve({collection:this.videoCollection,application:y.OV.LIBRARY_EDITOR,action:this.appLinkAction(),allowBulk:this.allowBulk(),collectionIdentifier:this.collectionIdentifier,analyticsOptions:this.options.analyticsOptions,showHeading:!!(null===(e=this.folders)||void 0===e?void 0:e.length)}))}},{key:"renderVideoList",value:function(){var e,t=this.videoDataService.getVideoCollectionCursors(this.collectionIdentifier),n=new h.Y({collection:this.videoCollection,videosWithMetadata:this.videosWithMetadata,application:y.OV.LIBRARY_EDITOR,allowBulk:this.allowBulk(),collectionIdentifier:this.collectionIdentifier,config:this.config,pendingItems:this.pendingItemsService.getPendingItems(),videoItemComponentType:this.componentType,emptyStateType:this.emptyStateType(),emptyStateOptions:this.emptyStateOptions(),supportSiteUrl:this.config.get("supportSiteUrl"),collectionViewChannel:this.channelName,customerHasLocalCache:O.o8.customerHasLocalCache(this.devices,this.currentUser.get("customerId")),customerHasExchange:this.exchanges.any(),analyticsOptions:this.options.analyticsOptions,sourceMetadataOptions:{showFolder:this.showFolderSource(),libraries:this.libraryCollection},videoCollectionSource:this.getVideoCollectionSource(),currentUser:this.currentUser,playerApiUrl:this.config.get("playerApiUrl"),createViewKey:this.createViewKey,hasCursors:!!t,showEmptyState:!(null===(e=this.folders)||void 0===e?void 0:e.length),libraries:this.libraryCollection});this.showChildView("videoList",n)}},{key:"renderPagination",value:function(){var e=this.videoDataService.getVideoCollectionCursors(this.collectionIdentifier),t=new s.Q({cursors:e,collectionId:this.options.collectionIdentifier.id,appLink:{application:y.OV.LIBRARY_EDITOR,action:this.appLinkAction(),args:[this.collectionIdentifier.id],params:this.collectionIdentifier.toParams()},analyticsOptions:this.options.analyticsOptions});this.showChildView("pagination",t)}},{key:"fetchData",value:function(){this.fetchModel(),this.devices=this.localCacheDataService.getDevices(this.currentUser.get("customerId")),this.fetchVideoCollection()}},{key:"fetchVideoWithMetadata",value:function(e){var t=this;this.videoDataService.getVideo(e,(function(n){var o=t.videosWithMetadata.get(e);o&&(o.set(n.toJSON()),o.set({dataFetched:!0}))}))}},{key:"requiredResources",get:function(){return{config:w.p.config,currentUser:k.K.currentUser,libraryCollection:Ae.T.libraries,exchanges:Ae.T.exchanges}}},{key:"onBeforeRender",value:function(){return this.fetchData(),!!this.videoCollection&&(this.setVideosWithMetadata(),!!this.model)}},{key:"onRender",value:function(){this.renderBanner(),this.renderHeader(),this.renderChildFolders(),this.renderSubheading(),this.renderVideoList(),this.renderPagination()}}]),n}(l.Q.G7),Xe=function(e){Ue(n,e);var t=We(n);function n(){return Ne(this,n),t.apply(this,arguments)}return Qe(n,[{key:"name",get:function(){return"FolderView"}},{key:"lang",get:function(){return"libraryEditor.folderView"}},{key:"componentType",get:function(){return d.U.Draggable}},{key:"bindListeners",value:function(){this.listenTo(y.Vk.LIBRARY,"".concat(y.M_.FOLDER,":").concat(this.options.collectionIdentifier.id,":sync libraries:sync"),this.render),this.listenTo(y.Vk.LIBRARY,"".concat(y.M_.FOLDER,":").concat(this.options.collectionIdentifier.id,":error"),this.onError),this.listenTo(y.Vk.LIBRARY,"".concat(y.M_.UPDATE_FOLDER_BANNER,":").concat(this.options.collectionIdentifier.id,":sync"),this.fetchModel),this.listenTo(y.Vk.LIBRARY,"".concat(new v.KX(this.options.collectionIdentifier.id,u.E.AtoZ),":invalidate"),this.onFoldersInvalidate),Fe(Ke(n.prototype),"bindListeners",this).call(this)}},{key:"onError",value:function(e){switch(e.type){case o.h.Forbidden:l.Q.Ry.throw(new Te.gO);break;case o.h.NotFound:l.Q.Ry.throw(new Te.Zv)}}},{key:"appLinkAction",value:function(){return y.eX.LibraryEditor.FOLDER}},{key:"allowBulk",value:function(){return!0}},{key:"emptyStateType",value:function(){return b.ub.Folder}},{key:"emptyStateOptions",value:function(){return{heading:i.T.getPhrase(this.lang,"emptyStateHeading"),description:i.T.getPhrase(this.lang,"emptyStateInfo",{url:f.o.getHybridArticle(c.s.AddFromOnline,c.b.AddFromLite),classNames:"info-link"})}}},{key:"showFolderSource",value:function(){return!1}},{key:"getVideoCollectionSource",value:function(){return Le.x_.Folder}},{key:"fetchModel",value:function(){this.model=this.libraryDataService.getFolder(this.collectionIdentifier.id)}},{key:"fetchVideoCollection",value:function(){this.videoCollection=this.videoDataService.getCollectionVideos(this.collectionIdentifier)}},{key:"onFoldersInvalidate",value:function(){this.fetchFolders(null,!0)}},{key:"fetchFolders",value:function(e,t){var n=this,o=new v.KX(this.collectionIdentifier.id,u.E.AtoZ,e);this.libraryDataService.getFolders(o,(function(e){t||!n.folders?n.folders=e:n.folders.add(e.models);var r=n.libraryDataService.getFoldersCursors(o);(null==r?void 0:r.next)?n.fetchFolders(r.next):n.render()}))}},{key:"onBeforeRender",value:function(){return this.folders||this.fetchFolders(),Fe(Ke(n.prototype),"onBeforeRender",this).call(this)&&!!this.folders}}]),n}(ze),Ze=function(e){Ue(n,e);var t=We(n);function n(){return Ne(this,n),t.apply(this,arguments)}return Qe(n,[{key:"initialize",value:function(){this.seriesDataService=r.u.getInstance(y.Or.Series,this),Fe(Ke(n.prototype),"initialize",this).call(this)}},{key:"name",get:function(){return"SeriesView"}},{key:"lang",get:function(){return"libraryEditor.seriesView"}},{key:"componentType",get:function(){return d.U.Base}},{key:"regions",value:function(){var e=Fe(Ke(n.prototype),"regions",this).call(this);return e.subheading.partialLoading=b.LP.SeriesVideoListSubheading,delete e.header.partialLoading,delete e.childFolders.partialLoading,e}},{key:"bindListeners",value:function(){this.listenTo(y.Vk.SERIES,"".concat(y.M_.SERIES,":").concat(this.options.collectionIdentifier.id,":sync"),this.render),this.listenTo(y.Vk.SERIES,"".concat(y.M_.SERIES,":").concat(this.options.collectionIdentifier.id,":error"),this.onError),Fe(Ke(n.prototype),"bindListeners",this).call(this)}},{key:"onError",value:function(e){e.type===o.h.NotFound&&l.Q.Ry.throw(new Te.Ag)}},{key:"appLinkAction",value:function(){return y.eX.LibraryEditor.SERIES}},{key:"allowBulk",value:function(){return!1}},{key:"emptyStateType",value:function(){return b.ub.Series}},{key:"emptyStateOptions",value:function(){return{heading:i.T.getPhrase(this.lang,"emptyStateHeading"),description:i.T.getPhrase(this.lang,"emptyStateInfo",{url:f.o.getHybridArticle(c.s.AddFromOnline,c.b.AddFromLite),classNames:"info-link"})}}},{key:"showFolderSource",value:function(){return!0}},{key:"getVideoCollectionSource",value:function(){return Le.x_.Series}},{key:"fetchModel",value:function(){this.model=this.seriesDataService.getSeries(this.collectionIdentifier.id)}},{key:"fetchVideoCollection",value:function(){this.videoCollection=this.videoDataService.getSeriesVideos(this.collectionIdentifier,this.libraryCollection.pluck("id"))}}]),n}(ze)},57085:function(e,t,n){"use strict";n.d(t,{n:function(){return E}});var o=n(31647),r=n(48090),i=n(22557),l=n(86363),a=n.n(l);function c(e){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},c(e)}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,(void 0,r=function(e,t){if("object"!==c(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!==c(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(o.key),"symbol"===c(r)?r:String(r)),o)}var r}function f(e,t,n){return t&&u(e.prototype,t),n&&u(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function p(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)}function d(e,t){return d=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},d(e,t)}function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=y(e);if(t){var r=y(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return function(e,t){if(t&&("object"===c(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,n)}}function y(e){return y=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},y(e)}var b=function(e){p(n,e);var t=h(n);function n(){return s(this,n),t.apply(this,arguments)}return f(n,[{key:"name",get:function(){return"BreadcrumbItemComponent"}},{key:"template",get:function(){return a()}},{key:"tagName",get:function(){return"li"}},{key:"className",get:function(){var e="breadcrumb-item";return this.model.get("active")&&(e+=" active"),e}},{key:"attributes",get:function(){return this.model.get("active")?{"aria-current":"page"}:{}}},{key:"appLinks",get:function(){return this.model.get("active")?{}:{a:this.model.get("appLink")}}},{key:"viewOptions",value:function(){return{isActive:this.model.get("active")}}}]),n}(o.Q.wA),v=function(e){p(n,e);var t=h(n);function n(){return s(this,n),t.apply(this,arguments)}return f(n,[{key:"name",get:function(){return"BreadcrumbComponentCollection"}},{key:"tagName",get:function(){return"ol"}},{key:"className",get:function(){return"breadcrumb m-0 p-0"}},{key:"childView",get:function(){return b}}]),n}(o.Q.$W),m=n(93933),g=n.n(m);function w(e){return w="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},w(e)}function k(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,(void 0,r=function(e,t){if("object"!==w(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!==w(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(o.key),"symbol"===w(r)?r:String(r)),o)}var r}function O(e,t){return O=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},O(e,t)}function S(e){return S=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},S(e)}var E=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&&O(e,t)}(s,e);var t,n,l,a,c=(l=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=S(l);if(a){var n=S(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===w(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function s(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),c.call(this,e)}return t=s,(n=[{key:"initialize",value:function(){this.getBreadcrumbs()}},{key:"name",get:function(){return"BreadcrumbsComponent"}},{key:"template",get:function(){return g()}},{key:"className",get:function(){return"d-inline-block"}},{key:"regions",value:function(){return{breadcrumbs:".breadcrumbs-region"}}},{key:"defaults",get:function(){return{customBreadcrumbs:[]}}},{key:"getBreadcrumbs",value:function(){var e=this;this.breadcrumbCollection=new o.Q.FE([]);var t,n=this.options.folder;do{if(!n)break;if(t=i.P.getParent(n.id,this.options.libraries),this.breadcrumbCollection.add(this.getBreadcrumb(n,!!t),{at:0}),!t)break;n=t}while(t);this.options.video&&this.breadcrumbCollection.add({name:this.options.video.get("name"),appLink:{application:r.OV.LIBRARY_EDITOR,action:r.eX.LibraryEditor.VIDEO_DETAILS,args:[this.options.video.id]}}),this.options.customBreadcrumbs&&this.options.customBreadcrumbs.forEach((function(t){return e.breadcrumbCollection.add(t)})),this.breadcrumbCollection.length&&this.breadcrumbCollection.last().set("active",!this.options.enableLastItemAppLink)}},{key:"getBreadcrumb",value:function(e,t){var n=t?r.eX.LibraryEditor.FOLDER:r.eX.LibraryEditor.LIBRARY;return{name:e.get("name"),appLink:{application:r.OV.LIBRARY_EDITOR,action:n,args:[e.id]}}}},{key:"onRender",value:function(){var e=new v({collection:this.breadcrumbCollection});this.showChildView("breadcrumbs",e)}}])&&k(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),s}(o.Q.wA)},99186:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({1:function(e,t,n,o,r){return"disabled"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,r){e.propertyIsEnumerable;var i,l=null!=t?t:e.nullContext||{},a=e.hooks.helperMissing,c=e.escapeExpression;return'<div class="p-3">\r\n <a class="btn previous-applink btn-outline-dark '+(null!=(i=n.unless.call(l,null!=(i=null!=(i=null!=t?t.options:t)?i.cursors:i)?i.previous:i,{name:"unless",hash:{},fn:e.program(1,r,0),inverse:e.noop,data:r}))?i:"")+'">'+c((n.lang||t&&t.lang||a).call(l,"previous",{name:"lang",hash:{},data:r}))+'</a>\r\n <a class="btn next-applink btn-outline-dark '+(null!=(i=n.unless.call(l,null!=(i=null!=(i=null!=t?t.options:t)?i.cursors:i)?i.next:i,{name:"unless",hash:{},fn:e.program(1,r,0),inverse:e.noop,data:r}))?i:"")+'">'+c((n.lang||t&&t.lang||a).call(l,"next",{name:"lang",hash:{},data:r}))+"</a>\r\n</div>"},useData:!0})},85552:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,o,r){var i;return e.propertyIsEnumerable,'<h1 class="text-white position-absolute m-0">\r\n '+e.escapeExpression("function"==typeof(i=null!=(i=n.name||(null!=t?t.name:t))?i:e.hooks.helperMissing)?i.call(null!=t?t:e.nullContext||{},{name:"name",hash:{},data:r}):i)+'\r\n</h1>\r\n<div class="options-region"></div>'},useData:!0})},53370:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,o,r){var i;return e.propertyIsEnumerable,'<button class="btn btn-outline-dark dropdown-toggle" type="button" id="sortSelectButton" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">\r\n '+e.escapeExpression("function"==typeof(i=null!=(i=n.name||(null!=t?t.name:t))?i:e.hooks.helperMissing)?i.call(null!=t?t:e.nullContext||{},{name:"name",hash:{},data:r}):i)+'\r\n</button>\r\n<div class="dropdown-menu-region"></div>'},useData:!0})},73368:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({1:function(e,t,n,o,r){return"ps-2"},3:function(e,t,n,o,r){return"cursor-pointer"},5:function(e,t,n,o,r){e.propertyIsEnumerable;var i,l=e.lambda,a=e.escapeExpression;return' <div class="'+a(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.svgContainer:i,t))+" "+a(l(null!=(i=null!=t?t.options:t)?i.caretClass:i,t))+'">\r\n '+(null!=(i=l(null!=(i=null!=t?t.options:t)?i.caretSvg:i,t))?i:"")+"\r\n </div>\r\n"},7:function(e,t,n,o,r){var i;return e.propertyIsEnumerable,' <div class="d-flex justify-content-end justify-self-end px-2 expand-toggle">\r\n <span class="info-link d-inline-block">\r\n'+(null!=(i=n.if.call(null!=t?t:e.nullContext||{},null!=(i=null!=t?t.options:t)?i.isExpanded:i,{name:"if",hash:{},fn:e.program(8,r,0),inverse:e.program(10,r,0),data:r}))?i:"")+" </span>\r\n </div>\r\n"},8:function(e,t,n,o,r){return e.propertyIsEnumerable," "+e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"seeLess",{name:"lang",hash:{},data:r}))+"\r\n"},10:function(e,t,n,o,r){var i;return e.propertyIsEnumerable," "+e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"seeAll",{name:"lang",hash:{smartCount:null!=(i=null!=t?t.options:t)?i.count:i},data:r}))+"\r\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,r){e.propertyIsEnumerable;var i,l=null!=t?t:e.nullContext||{},a=e.escapeExpression;return'<div class="d-flex justify-content-between align-items-center">\r\n <div class="d-inline-flex align-items-center mb-2 expand-toggle '+(null!=(i=n.if.call(l,null!=(i=null!=t?t.options:t)?i.forceExpanded:i,{name:"if",hash:{},fn:e.program(1,r,0),inverse:e.program(3,r,0),data:r}))?i:"")+'">\r\n'+(null!=(i=n.unless.call(l,null!=(i=null!=t?t.options:t)?i.forceExpanded:i,{name:"unless",hash:{},fn:e.program(5,r,0),inverse:e.noop,data:r}))?i:"")+' <h2 class="h4 mb-0">'+a((n.lang||t&&t.lang||e.hooks.helperMissing).call(l,"folders",{name:"lang",hash:{},data:r}))+" ("+a(e.lambda(null!=(i=null!=t?t.options:t)?i.count:i,t))+")</h2>\r\n </div>\r\n"+(null!=(i=n.unless.call(l,null!=(i=null!=t?t.options:t)?i.forceExpanded:i,{name:"unless",hash:{},fn:e.program(7,r,0),inverse:e.noop,data:r}))?i:"")+'</div>\r\n<div class="subfolders-region"></div>'},useData:!0})},8420:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,o,r){return'<div class="py-3 border-bottom">\r\n <div class="breadcrumbs-region d-inline-flex align-items-center"></div>\r\n</div>'},useData:!0})},56846:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({1:function(e,t,n,o,r){return e.propertyIsEnumerable,'<h2 class="h4">'+e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"videos",{name:"lang",hash:{},data:r}))+"</h2>"},3:function(e,t,n,o,r){return"pt-2"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,r){e.propertyIsEnumerable;var i,l=null!=t?t:e.nullContext||{};return(null!=(i=n.if.call(l,null!=(i=null!=t?t.options:t)?i.showHeading:i,{name:"if",hash:{},fn:e.program(1,r,0),inverse:e.noop,data:r}))?i:"")+'\r\n<div class="d-flex justify-content-between align-items-center pb-2 '+(null!=(i=n.if.call(l,null!=(i=null!=t?t.options:t)?i.showHeading:i,{name:"if",hash:{},fn:e.program(3,r,0),inverse:e.noop,data:r}))?i:"")+'">\r\n <div class="d-inline-flex justify-content-start">\r\n <div class="check-all-region d-inline-flex align-items-center"></div>\r\n <div class="bulk-actions-region"></div>\r\n </div>\r\n <div class="sorting-region"></div>\r\n</div>'},useData:!0})},93089:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,o,r){return'<div class="banner-region"></div>\r\n<div class="header-region"></div>\r\n<div class="child-folders-region"></div>\r\n<div class="subheading-region"></div>\r\n<div class="video-list-region"></div>\r\n<div class="pagination-region"></div>'},useData:!0})},86363:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({1:function(e,t,n,o,r){var i;return e.propertyIsEnumerable,'<span class="fw-bolder">'+e.escapeExpression("function"==typeof(i=null!=(i=n.name||(null!=t?t.name:t))?i:e.hooks.helperMissing)?i.call(null!=t?t:e.nullContext||{},{name:"name",hash:{},data:r}):i)+"</span>\r\n"},3:function(e,t,n,o,r){var i;return e.propertyIsEnumerable,"<a>"+e.escapeExpression("function"==typeof(i=null!=(i=n.name||(null!=t?t.name:t))?i:e.hooks.helperMissing)?i.call(null!=t?t:e.nullContext||{},{name:"name",hash:{},data:r}):i)+"</a>\r\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,r){var i;return e.propertyIsEnumerable,null!=(i=n.if.call(null!=t?t:e.nullContext||{},null!=(i=null!=t?t.options:t)?i.isActive:i,{name:"if",hash:{},fn:e.program(1,r,0),inverse:e.program(3,r,0),data:r}))?i:""},useData:!0})},93933:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,o,r){return'<nav class="breadcrumbs-region" aria-label="breadcrumb"></nav>'},useData:!0})},34670:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({1:function(e,t,n,o,r){return"disabled"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,r){e.propertyIsEnumerable;var i,l=null!=t?t:e.nullContext||{};return'<button\r\n class="dropdown-toggle btn btn-outline-dark ms-2 '+(null!=(i=n.unless.call(l,null!=(i=null!=t?t.options:t)?i.enabled:i,{name:"unless",hash:{},fn:e.program(1,r,0),inverse:e.noop,data:r}))?i:"")+'"\r\n type="button"\r\n id="bulkActions"\r\n data-bs-toggle="dropdown"\r\n aria-haspopup="true"\r\n aria-expanded="false"\r\n '+(null!=(i=n.unless.call(l,null!=(i=null!=t?t.options:t)?i.enabled:i,{name:"unless",hash:{},fn:e.program(1,r,0),inverse:e.noop,data:r}))?i:"")+"\r\n>\r\n "+e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(l,"options",{name:"lang",hash:{},data:r}))+'\r\n</button>\r\n<div class="dropdown-menu-region"></div>'},useData:!0})}}]);
@@ -1 +1 @@
1
- (self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[2254],{34629:function(e,t,n){"use strict";n.r(t),n.d(t,{SuggestAnEditView:function(){return W}});var r=n(39479),o=n(21679),i=n(57857),a=n(99249),s=n(31647),l=n(52076),u=n(70065),c=n(8371),d=n(75459),f=n(10101),p=n(83665),g=n(26357),h=n(88172),y=n(48090),m=n(67670);function v(e){return v="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},v(e)}function b(e,t){return b=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},b(e,t)}function w(e){return w=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},w(e)}var S=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&b(e,t)}(i,e);var t,n,r,o=(n=i,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=w(n);if(r){var o=w(this).constructor;e=Reflect.construct(t,arguments,o)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===v(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function i(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),o.apply(this,arguments)}return t=i,Object.defineProperty(t,"prototype",{writable:!1}),t}(s.Q.Hn),O=n(13102),k=n(48404),M=n(19226),E=n(61843),P=n(48088),T=n(33192),V=n(48726),j=n(29457),R=n(40622),_=n(7190),C=n(19098),N=n.n(C),x={metadataValue:"mvVSS"};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 D(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,(void 0,o=function(e,t){if("object"!==I(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==I(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key),"symbol"===I(o)?o:String(o)),r)}var o}function B(e,t){return B=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},B(e,t)}function G(e){return G=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},G(e)}var U,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&&B(e,t)}(l,e);var t,n,r,o,a=(r=l,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 function(e,t){if(t&&("object"===I(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function l(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l),a.call(this,e)}return t=l,(n=[{key:"name",get:function(){return"SuggestEditComponent"}},{key:"template",get:function(){return N()}},{key:"tagName",get:function(){return"form"}},{key:"className",get:function(){return"mt-3"}},{key:"lang",get:function(){return"libraryEditor.suggestEdit"}},{key:"regions",value:function(){return{ratingSelect:{el:".rating-select-region",replaceElement:!0}}}},{key:"bindings",get:function(){return{"[name=suggestion]":{observe:"suggestion",setOptions:{validate:!0}},"[name=reason]":{observe:"reason",setOptions:{validate:!0}}}}},{key:"elements",get:function(){return{ratingValidation:".rating-form-feedback"}}},{key:"getMetadataValue",value:function(){return this.options.metadataType===R.pG.BroadcastDate?this.options.metadataValue?T(this.options.metadataValue).format(j.K4.FULL_YEAR):i.T.getPhrase(this.lang,"noMetadataValue"):this.options.metadataValue instanceof s.Q.FE?this.options.metadataValue.length?this.options.metadataValue.map((function(e){return e.get("name")})).join(", "):i.T.getPhrase(this.lang,"noMetadataValue"):this.options.metadataValue||i.T.getPhrase(this.lang,"noMetadataValue")}},{key:"getSuggestionPlaceholder",value:function(){return this.options.metadataType===R.pG.Other?i.T.getPhrase(this.lang,"otherSuggestionPlaceholder"):i.T.getPhrase(this.lang,"suggestionPlaceholder",{metadataType:_.uB.translateMetadataName(this.options.metadataType).toLowerCase()})}},{key:"renderRatingSelect",value:function(){this.options.ratingValidationMessage?this.getUI("ratingValidation").text(this.options.ratingValidationMessage).attr("style","display: block;"):this.getUI("ratingValidation").hide(),this.options.metadataType===R.pG.Rating&&this.showChildView("ratingSelect",new V.R({model:this.options.currentRating,collection:this.options.ratings,parentChannelName:this.options.channelName,hideHeaderText:!0,hideRemove:!0}))}},{key:"viewOptions",value:function(){return{styles:x,metadataValue:this.getMetadataValue(),useRatingSelect:this.options.metadataType===R.pG.Rating,isOtherType:this.options.metadataType===R.pG.Other,metadataType:_.uB.translateMetadataName(this.options.metadataType).toLowerCase(),suggestionPlaceholder:this.getSuggestionPlaceholder()}}},{key:"onRender",value:function(){this.renderRatingSelect(),this.stickit(),P.Validation.bind(this)}},{key:"onDestroy",value:function(){this.unstickit(),P.Validation.unbind(this)}}])&&D(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),l}(s.Q.wA),L=n(68249),A=n(60519);!function(e){e[e.Email=0]="Email"}(U||(U={}));var Z=Object.assign(Object.assign({},A.c),{createSuggestEditNotification:function(e){return{_type:L.k.SuggestEdit,groupId:e.groupId,receiverId:0,instanceRegion:e.instanceRegion,countryCode:e.countryCode,channels:[U.Email],data:{video:e.video,user:e.user,property:e.property,suggestion:e.suggestion,reason:e.reason,currentValue:e.currentValue}}}}),H=n(34651),K=n.n(H);function Q(e){return Q="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},Q(e)}function z(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,(void 0,o=function(e,t){if("object"!==Q(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==Q(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key),"symbol"===Q(o)?o:String(o)),r)}var o}function q(e,t){return q=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},q(e,t)}function J(e){return J=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},J(e)}var W=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&&q(e,t)}(w,e);var t,n,s,v,b=(s=w,v=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=J(s);if(v){var n=J(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===Q(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function w(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,w),b.call(this,e)}return t=w,(n=[{key:"initialize",value:function(){this.getViewModel(),this.videoDataService=o.u.getInstance(y.Or.Video,this),this.ratingsDataService=o.u.getInstance(y.Or.Ratings,this),this.notificationDataService=o.u.getInstance(y.Or.Notifications,this),this.selectedMetadata=new S,this.bindListeners()}},{key:"name",get:function(){return"SuggestAnEditView"}},{key:"template",get:function(){return K()}},{key:"tagName",get:function(){return"form"}},{key:"className",get:function(){return"form-group"}},{key:"lang",get:function(){return"libraryEditor.suggestAnEdit"}},{key:"title",get:function(){return i.T.getPhrase(this.lang,"title")}},{key:"channelName",get:function(){return E.N0.generateUniqueChannelName(this)}},{key:"viewModelName",get:function(){return"".concat(this.name,":").concat(this.options.videoId)}},{key:"regions",value:function(){return{dropdown:{el:".metadata-dropdown-region",replaceElement:!1},suggestEdit:{el:".suggest-edit-region",replaceElement:!0}}}},{key:"behaviors",get:function(){var e=this;return[{behaviorClass:f.Yw,title:i.T.getPhrase(this.lang,"heading"),spinnerButtonOptions:{model:this.spinnerModel=new m.v,channelName:this.channelName,buttonText:i.T.getPhrase(this.lang,"submit"),onClick:function(){return e.onSubmit()}}}]}},{key:"requiredResources",get:function(){return{config:k.p.config,currentUser:M.K.currentUser}}},{key:"bindListeners",value:function(){this.listenTo(this.channelName,"select:option:selected",this.onMetadataSelect),this.listenTo(this.channelName,"select:rating",this.onSelectRating),this.listenTo(y.Vk.VIDEO,"".concat(y.M_.VIDEOS,":").concat(this.options.videoId,":sync"),this.render),this.listenTo(y.Vk.NOTIFICATIONS,"".concat(y.M_.SUGGEST_EDIT,":error"),this.onError)}},{key:"onSubmit",value:function(){var e=this;if(this.validateForm()){this.spinnerModel.set(h.ZV.ShowSpinner,!0);var t=this.selectedMetadata.get("metadataType")===R.pG.Rating?this.viewModel.get("ratingSuggestion"):this.viewModel.get("suggestion"),n=this.config.get("suggestEditMetadataGroupId"),r=Z.createSuggestEditNotification({groupId:n,instanceRegion:this.currentUser.get("instanceRegion"),countryCode:this.currentUser.get("countryCode"),video:this.model.toJSON(),user:this.currentUser.toJSON(),property:this.selectedMetadata.get("metadataType").toLowerCase(),suggestion:t,reason:this.viewModel.get("reason"),currentValue:this.selectedMetadata.get("metadataValue")});this.notificationDataService.suggestEdit(r,(function(){e.triggerMethod("hide"),e.spinnerModel.set(h.ZV.ShowSpinner,!1),e.spinnerModel.set(h.ZV.Disabled,!0)})),this.logAction(),this.viewModel.clear()}}},{key:"onError",value:function(){this.spinnerModel.set(h.ZV.ShowSpinner,!1)}},{key:"onMetadataSelect",value:function(e){this.selectMetadata(e),this.renderSuggestEdit()}},{key:"onSelectRating",value:function(e){this.viewModel.set("ratingSuggestion",e.get("name")),this.renderSuggestEdit()}},{key:"selectMetadata",value:function(e){this.spinnerModel.set(h.ZV.Disabled,!1),E.yV.setSelected(e.get("id"),this.metadataCollection),this.selectedMetadata.set({metadataType:e.get("name"),metadataValue:e.get("name")!==R.pG.Other?this.model.get(e.get("property")):null}),e.get("name")!==R.pG.Rating&&this.viewModel.set("ratingSuggestion","")}},{key:"getMetadataCollection",value:function(){var e=Object.keys(R.zK).map((function(e){return R.zK[e]}));return this.currentUser.get("instanceRegion")===c.b.US&&(e=e.filter((function(e){return e.name!==R.pG.Channel&&e.name!==R.pG.BroadcastDate}))),new p.L(e)}},{key:"getMetadataByType",value:function(e){return this.metadataCollection.findWhere({name:e})}},{key:"getViewModel",value:function(){this.viewModel=a.r.get(this.viewModelName),this.viewModel.addValidation(_.xs)}},{key:"validateForm",value:function(){this.renderSuggestEdit(),this.viewModel.validate();var e=this.viewModel.toJSON(),t=e.reason,n=e.suggestion;return!(this.getRatingValidationMessage()||this.selectedMetadata.get("metadataType")!==R.pG.Rating&&!n||!t)}},{key:"getRatingValidationMessage",value:function(){if(this.selectedMetadata.get("metadataType")!==R.pG.Rating)return"";var e=this.selectedMetadata.get("metadataValue"),t=this.viewModel.get("ratingSuggestion");return t?e===t?_.nf.original():"":_.nf.empty()}},{key:"checkPreselection",value:function(){if(!this.selectedMetadata.get("metadataType")&&this.options.metadata&&this.dataFetched()){var e=this.getMetadataByType(this.options.metadata);this.selectMetadata(e)}}},{key:"logAction",value:function(){var e=E.M2.getSourceTypes(this.model);e=r.filter(e,(function(e){return e!==d.r.CustomLibrary}));var t={videoSourceTypes:r.sortBy(r.unique(e),(function(e){return e})).join(","),videoId:this.model.get("id"),metadataProperty:this.selectedMetadata.get("metadataType"),metadataPropertyValue:this.selectedMetadata.get("metadataValue"),suggestion:this.viewModel.get("suggestion"),reason:this.viewModel.get("reason")};l.k.logUserAction(t,{descriptor:u.gL.Edit,location:u.LZ.Popup,actionType:u.Vw.Suggest,entity:u.py.Video})}},{key:"dataFetched",value:function(){return!!this.model&&!!this.ratingCollection}},{key:"renderMetadataDropdown",value:function(){this.showChildView("dropdown",new g.H({collection:_.uB.translateMetadataCollectionNames(this.metadataCollection),channelName:this.channelName,childOptions:{titleProperty:"name",eventName:"select:option:click"},placeholderText:this.selectedMetadata.get("metadataType")||i.T.getPhrase(this.lang,"dropdownPlaceholder"),analyticsHelper:l.k}))}},{key:"renderSuggestEdit",value:function(){this.selectedMetadata.get("metadataType")&&this.showChildView("suggestEdit",new F({model:this.viewModel,channelName:this.channelName,ratings:this.ratingCollection,currentRating:this.viewModel.get("ratingSuggestion")?new O.i(this.ratingCollection.findWhere({name:this.viewModel.get("ratingSuggestion")})):null,metadataType:this.selectedMetadata.get("metadataType"),metadataValue:this.selectedMetadata.get("metadataValue"),ratingValidationMessage:this.getRatingValidationMessage()}))}},{key:"onBeforeRender",value:function(){this.dataFetched()||(this.model=this.videoDataService.getVideo(this.options.videoId),this.ratingCollection=this.ratingsDataService.getAllRatings()),this.metadataCollection||(this.metadataCollection=this.getMetadataCollection()),this.checkPreselection()}},{key:"viewOptions",value:function(){return{dataFetched:this.dataFetched(),spinnerEl:E.Kp.getSpinner({size:E.Ey.Large,extraClasses:"mx-auto"})}}},{key:"onRender",value:function(){this.dataFetched()&&(this.renderMetadataDropdown(),this.renderSuggestEdit())}}])&&z(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),w}(s.Q.G7)},67670:function(e,t,n){"use strict";n.d(t,{v:function(){return d}});var r=n(31647),o=n(88172);function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function a(e,t,n){return(t=l(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,l(r.key),r)}}function l(e){var t=function(e,t){if("object"!==i(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==i(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===i(t)?t:String(t)}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){return c=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},c(e)}var d=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,l,d=(r=f,l=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=c(r);if(l){var n=c(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===i(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function f(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,f),d.apply(this,arguments)}return t=f,(n=[{key:"defaults",value:function(){var e;return a(e={},o.ZV.Disabled,!0),a(e,o.ZV.Hidden,!1),e}}])&&s(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),f}(r.Q.Hn)},19098: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.escapeExpression,s=e.lambda;return'<p class="fw-bold mb-0">'+a((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"currentType",{name:"lang",hash:{metadataType:null!=(i=null!=t?t.options:t)?i.metadataType:i},data:o}))+'</p>\n<p class="mb-3 '+a(s(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.metadataValue:i,t))+'">'+(null!=(i=s(null!=(i=null!=t?t.options:t)?i.metadataValue:i,t))?i:"")+"</p>\n"},3:function(e,t,n,r,o){var i;return e.propertyIsEnumerable,' <textarea\n id="suggest-edit"\n placeholder="'+e.escapeExpression(e.lambda(null!=(i=null!=t?t.options:t)?i.suggestionPlaceholder:i,t))+'"\n class="form-control"\n name="suggestion"\n ></textarea>\n <div class="form-feedback"></div>\n'},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){e.propertyIsEnumerable;var i,a=null!=t?t:e.nullContext||{},s=e.hooks.helperMissing,l=e.escapeExpression;return(null!=(i=n.unless.call(a,null!=(i=null!=t?t.options:t)?i.isOtherType:i,{name:"unless",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o}))?i:"")+'\n<div class="dropdown-divider"></div>\n\n<div class="form-group">\n <label for="suggest-edit" class="fw-bold">'+l((n.lang||t&&t.lang||s).call(a,"suggestionSubheading",{name:"lang",hash:{},data:o}))+'</label>\n <div class="rating-select-region"></div>\n <div class="rating-form-feedback invalid-feedback"></div>\n'+(null!=(i=n.unless.call(a,null!=(i=null!=t?t.options:t)?i.useRatingSelect:i,{name:"unless",hash:{},fn:e.program(3,o,0),inverse:e.noop,data:o}))?i:"")+'</div>\n\n<div class="form-group">\n <label for="reason-for-edit" class="fw-bold">'+l((n.lang||t&&t.lang||s).call(a,"reasoningSubheading",{name:"lang",hash:{},data:o}))+'</label>\n <textarea\n id="reason-for-edit"\n placeholder="'+l((n.lang||t&&t.lang||s).call(a,"reasoningPlaceholder",{name:"lang",hash:{},data:o}))+'"\n class="form-control"\n name="reason"\n ></textarea>\n <div class="form-feedback"></div>\n</div>'},useData:!0})},34651:function(e,t,n){var r=n(32227);e.exports=(r.default||r).template({1:function(e,t,n,r,o){e.propertyIsEnumerable;var i=null!=t?t:e.nullContext||{},a=e.hooks.helperMissing,s=e.escapeExpression;return"<p>"+s((n.lang||t&&t.lang||a).call(i,"guidelines",{name:"lang",hash:{},data:o}))+'</p>\n<p class="fw-bold mb-1">'+s((n.lang||t&&t.lang||a).call(i,"dropdownHeading",{name:"lang",hash:{},data:o}))+'</p>\n<div class="metadata-dropdown-region position-relative"></div>\n<div class="suggest-edit-region"></div>\n'},3:function(e,t,n,r,o){var i;return e.propertyIsEnumerable,(null!=(i=e.lambda(null!=(i=null!=t?t.options:t)?i.spinnerEl:i,t))?i:"")+"\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var i;return e.propertyIsEnumerable,null!=(i=n.if.call(null!=t?t:e.nullContext||{},null!=(i=null!=t?t.options:t)?i.dataFetched:i,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.program(3,o,0),data:o}))?i:""},useData:!0})}}]);
1
+ (self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[2254],{34629:function(e,t,n){"use strict";n.r(t),n.d(t,{SuggestAnEditView:function(){return W}});var r=n(39479),o=n(21679),i=n(57857),a=n(99249),s=n(31647),l=n(52076),u=n(70065),c=n(8371),d=n(75459),f=n(10101),p=n(83665),g=n(26357),h=n(88172),y=n(48090),m=n(67670);function v(e){return v="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},v(e)}function b(e,t){return b=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},b(e,t)}function w(e){return w=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},w(e)}var S=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&b(e,t)}(i,e);var t,n,r,o=(n=i,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=w(n);if(r){var o=w(this).constructor;e=Reflect.construct(t,arguments,o)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===v(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function i(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),o.apply(this,arguments)}return t=i,Object.defineProperty(t,"prototype",{writable:!1}),t}(s.Q.Hn),O=n(13102),k=n(48404),M=n(19226),E=n(61843),P=n(48088),T=n(33192),V=n(48726),j=n(29457),R=n(40622),_=n(7190),C=n(19098),N=n.n(C),x={metadataValue:"mvVSS"};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 D(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,(void 0,o=function(e,t){if("object"!==I(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==I(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key),"symbol"===I(o)?o:String(o)),r)}var o}function B(e,t){return B=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},B(e,t)}function G(e){return G=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},G(e)}var U,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&&B(e,t)}(l,e);var t,n,r,o,a=(r=l,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 function(e,t){if(t&&("object"===I(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function l(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l),a.call(this,e)}return t=l,(n=[{key:"name",get:function(){return"SuggestEditComponent"}},{key:"template",get:function(){return N()}},{key:"tagName",get:function(){return"form"}},{key:"className",get:function(){return"mt-3"}},{key:"lang",get:function(){return"libraryEditor.suggestEdit"}},{key:"regions",value:function(){return{ratingSelect:{el:".rating-select-region",replaceElement:!0}}}},{key:"bindings",get:function(){return{"[name=suggestion]":{observe:"suggestion",setOptions:{validate:!0}},"[name=reason]":{observe:"reason",setOptions:{validate:!0}}}}},{key:"elements",get:function(){return{ratingValidation:".rating-form-feedback"}}},{key:"getMetadataValue",value:function(){return this.options.metadataType===R.pG.BroadcastDate?this.options.metadataValue?T(this.options.metadataValue).format(j.K4.FULL_YEAR):i.T.getPhrase(this.lang,"noMetadataValue"):this.options.metadataValue instanceof s.Q.FE?this.options.metadataValue.length?this.options.metadataValue.map((function(e){return e.get("name")})).join(", "):i.T.getPhrase(this.lang,"noMetadataValue"):this.options.metadataValue||i.T.getPhrase(this.lang,"noMetadataValue")}},{key:"getSuggestionPlaceholder",value:function(){return this.options.metadataType===R.pG.Other?i.T.getPhrase(this.lang,"otherSuggestionPlaceholder"):i.T.getPhrase(this.lang,"suggestionPlaceholder",{metadataType:_.uB.translateMetadataName(this.options.metadataType).toLowerCase()})}},{key:"renderRatingSelect",value:function(){this.options.ratingValidationMessage?this.getUI("ratingValidation").text(this.options.ratingValidationMessage).attr("style","display: block;"):this.getUI("ratingValidation").hide(),this.options.metadataType===R.pG.Rating&&this.showChildView("ratingSelect",new V.R({model:this.options.currentRating,collection:this.options.ratings,parentChannelName:this.options.channelName,hideHeaderText:!0,hideRemove:!0}))}},{key:"viewOptions",value:function(){return{styles:x,metadataValue:this.getMetadataValue(),useRatingSelect:this.options.metadataType===R.pG.Rating,isOtherType:this.options.metadataType===R.pG.Other,metadataType:_.uB.translateMetadataName(this.options.metadataType).toLowerCase(),suggestionPlaceholder:this.getSuggestionPlaceholder()}}},{key:"onRender",value:function(){this.renderRatingSelect(),this.stickit(),P.Validation.bind(this)}},{key:"onDestroy",value:function(){this.unstickit(),P.Validation.unbind(this)}}])&&D(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),l}(s.Q.wA),L=n(68249),A=n(60519);!function(e){e[e.Email=0]="Email"}(U||(U={}));var Z=Object.assign(Object.assign({},A.c),{createSuggestEditNotification:function(e){return{_type:L.k.SuggestEdit,groupId:e.groupId,receiverId:0,instanceRegion:e.instanceRegion,countryCode:e.countryCode,channels:[U.Email],data:{video:e.video,user:e.user,property:e.property,suggestion:e.suggestion,reason:e.reason,currentValue:e.currentValue}}}}),H=n(34651),K=n.n(H);function Q(e){return Q="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},Q(e)}function z(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,(void 0,o=function(e,t){if("object"!==Q(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==Q(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key),"symbol"===Q(o)?o:String(o)),r)}var o}function q(e,t){return q=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},q(e,t)}function J(e){return J=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},J(e)}var W=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&&q(e,t)}(w,e);var t,n,s,v,b=(s=w,v=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=J(s);if(v){var n=J(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===Q(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function w(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,w),b.call(this,e)}return t=w,(n=[{key:"initialize",value:function(){this.getViewModel(),this.videoDataService=o.u.getInstance(y.Or.Video,this),this.ratingsDataService=o.u.getInstance(y.Or.Ratings,this),this.notificationDataService=o.u.getInstance(y.Or.Notifications,this),this.selectedMetadata=new S,this.bindListeners()}},{key:"name",get:function(){return"SuggestAnEditView"}},{key:"template",get:function(){return K()}},{key:"tagName",get:function(){return"form"}},{key:"className",get:function(){return"form-group"}},{key:"lang",get:function(){return"libraryEditor.suggestAnEdit"}},{key:"title",get:function(){return i.T.getPhrase(this.lang,"title")}},{key:"channelName",get:function(){return E.N0.generateUniqueChannelName(this)}},{key:"viewModelName",get:function(){return"".concat(this.name,":").concat(this.options.videoId)}},{key:"regions",value:function(){return{dropdown:{el:".metadata-dropdown-region",replaceElement:!1},suggestEdit:{el:".suggest-edit-region",replaceElement:!0}}}},{key:"behaviors",get:function(){var e=this;return[{behaviorClass:f.Yw,title:i.T.getPhrase(this.lang,"heading"),spinnerButtonOptions:{model:this.spinnerModel=new m.v,channelName:this.channelName,buttonText:i.T.getPhrase(this.lang,"submit"),onClick:function(){return e.onSubmit()}}}]}},{key:"requiredResources",get:function(){return{config:k.p.config,currentUser:M.K.currentUser}}},{key:"bindListeners",value:function(){this.listenTo(this.channelName,"select:option:selected",this.onMetadataSelect),this.listenTo(this.channelName,"select:rating",this.onSelectRating),this.listenTo(y.Vk.VIDEO,"".concat(y.M_.VIDEOS,":").concat(this.options.videoId,":sync"),this.render),this.listenTo(y.Vk.NOTIFICATIONS,"".concat(y.M_.SUGGEST_EDIT,":error"),this.onError)}},{key:"onSubmit",value:function(){var e=this;if(this.validateForm()){this.spinnerModel.set(h.ZV.ShowSpinner,!0);var t=this.selectedMetadata.get("metadataType")===R.pG.Rating?this.viewModel.get("ratingSuggestion"):this.viewModel.get("suggestion"),n=this.config.get("suggestEditMetadataGroupId"),r=Z.createSuggestEditNotification({groupId:n,instanceRegion:this.currentUser.get("instanceRegion"),countryCode:this.currentUser.get("countryCode"),video:this.model.toJSON(),user:this.currentUser.toJSON(),property:this.selectedMetadata.get("metadataType").toLowerCase(),suggestion:t,reason:this.viewModel.get("reason"),currentValue:this.selectedMetadata.get("metadataValue")});this.notificationDataService.suggestEdit(r,(function(){e.triggerMethod("hide"),e.spinnerModel.set(h.ZV.ShowSpinner,!1),e.spinnerModel.set(h.ZV.Disabled,!0)})),this.logAction(),this.viewModel.clear()}}},{key:"onError",value:function(){this.spinnerModel.set(h.ZV.ShowSpinner,!1)}},{key:"onMetadataSelect",value:function(e){this.selectMetadata(e),this.renderSuggestEdit()}},{key:"onSelectRating",value:function(e){this.viewModel.set("ratingSuggestion",e.get("name")),this.renderSuggestEdit()}},{key:"selectMetadata",value:function(e){this.spinnerModel.set(h.ZV.Disabled,!1),E.yV.setSelected(e.get("id"),this.metadataCollection),this.selectedMetadata.set({metadataType:e.get("name"),metadataValue:e.get("name")!==R.pG.Other?this.model.get(e.get("property")):null}),e.get("name")!==R.pG.Rating&&this.viewModel.set("ratingSuggestion","")}},{key:"getMetadataCollection",value:function(){var e=Object.keys(R.zK).map((function(e){return R.zK[e]}));return this.currentUser.get("instanceRegion")===c.b.US&&(e=e.filter((function(e){return e.name!==R.pG.Channel&&e.name!==R.pG.BroadcastDate}))),new p.L(e)}},{key:"getMetadataByType",value:function(e){return this.metadataCollection.findWhere({name:e})}},{key:"getViewModel",value:function(){this.viewModel=a.r.get(this.viewModelName),this.viewModel.addValidation(_.xs)}},{key:"validateForm",value:function(){this.renderSuggestEdit(),this.viewModel.validate();var e=this.viewModel.toJSON(),t=e.reason,n=e.suggestion;return!(this.getRatingValidationMessage()||this.selectedMetadata.get("metadataType")!==R.pG.Rating&&!n||!t)}},{key:"getRatingValidationMessage",value:function(){if(this.selectedMetadata.get("metadataType")!==R.pG.Rating)return"";var e=this.selectedMetadata.get("metadataValue"),t=this.viewModel.get("ratingSuggestion");return t?e===t?_.nf.original():"":_.nf.empty()}},{key:"checkPreselection",value:function(){if(!this.selectedMetadata.get("metadataType")&&this.options.metadata&&this.dataFetched()){var e=this.getMetadataByType(this.options.metadata);this.selectMetadata(e)}}},{key:"logAction",value:function(){var e=E.M2.getSourceTypes(this.model);e=r.filter(e,(function(e){return e!==d.r.CustomLibrary}));var t={videoSourceTypes:r.sortBy(r.unique(e),(function(e){return e})).join(","),videoId:this.model.get("id"),metadataProperty:this.selectedMetadata.get("metadataType"),metadataPropertyValue:this.selectedMetadata.get("metadataValue"),suggestion:this.viewModel.get("suggestion"),reason:this.viewModel.get("reason")};l.k.logUserAction(t,{descriptor:u.gL.Edit,location:u.LZ.Popup,actionType:u.Vw.Suggest,entity:u.py.Video})}},{key:"dataFetched",value:function(){return!!this.model&&!!this.ratingCollection}},{key:"renderMetadataDropdown",value:function(){this.showChildView("dropdown",new g.H({collection:_.uB.translateMetadataCollectionNames(this.metadataCollection),channelName:this.channelName,childOptions:{titleProperty:"name",eventName:"select:option:click"},placeholderText:this.selectedMetadata.get("metadataType")||i.T.getPhrase(this.lang,"dropdownPlaceholder"),analyticsHelper:l.k}))}},{key:"renderSuggestEdit",value:function(){this.selectedMetadata.get("metadataType")&&this.showChildView("suggestEdit",new F({model:this.viewModel,channelName:this.channelName,ratings:this.ratingCollection,currentRating:this.viewModel.get("ratingSuggestion")?new O.i(this.ratingCollection.findWhere({name:this.viewModel.get("ratingSuggestion")})):null,metadataType:this.selectedMetadata.get("metadataType"),metadataValue:this.selectedMetadata.get("metadataValue"),ratingValidationMessage:this.getRatingValidationMessage()}))}},{key:"onBeforeRender",value:function(){this.dataFetched()||(this.model=this.videoDataService.getVideo(this.options.videoId),this.ratingCollection=this.ratingsDataService.getAllRatings()),this.metadataCollection||(this.metadataCollection=this.getMetadataCollection()),this.checkPreselection()}},{key:"viewOptions",value:function(){return{dataFetched:this.dataFetched(),spinnerEl:E.Kp.getSpinner({size:E.Ey.Large,extraClasses:"mx-auto"})}}},{key:"onRender",value:function(){this.dataFetched()&&(this.renderMetadataDropdown(),this.renderSuggestEdit())}}])&&z(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),w}(s.Q.G7)},67670:function(e,t,n){"use strict";n.d(t,{v:function(){return d}});var r=n(31647),o=n(88172);function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function a(e,t,n){return(t=l(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,l(r.key),r)}}function l(e){var t=function(e,t){if("object"!==i(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==i(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===i(t)?t:String(t)}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){return c=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},c(e)}var d=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,l,d=(r=f,l=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=c(r);if(l){var n=c(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===i(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function f(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,f),d.apply(this,arguments)}return t=f,(n=[{key:"defaults",value:function(){return a(a({},o.ZV.Disabled,!0),o.ZV.Hidden,!1)}}])&&s(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),f}(r.Q.Hn)},19098: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.escapeExpression,s=e.lambda;return'<p class="fw-bold mb-0">'+a((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"currentType",{name:"lang",hash:{metadataType:null!=(i=null!=t?t.options:t)?i.metadataType:i},data:o}))+'</p>\r\n<p class="mb-3 '+a(s(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.metadataValue:i,t))+'">'+(null!=(i=s(null!=(i=null!=t?t.options:t)?i.metadataValue:i,t))?i:"")+"</p>\r\n"},3:function(e,t,n,r,o){var i;return e.propertyIsEnumerable,' <textarea\r\n id="suggest-edit"\r\n placeholder="'+e.escapeExpression(e.lambda(null!=(i=null!=t?t.options:t)?i.suggestionPlaceholder:i,t))+'"\r\n class="form-control"\r\n name="suggestion"\r\n ></textarea>\r\n <div class="form-feedback"></div>\r\n'},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){e.propertyIsEnumerable;var i,a=null!=t?t:e.nullContext||{},s=e.hooks.helperMissing,l=e.escapeExpression;return(null!=(i=n.unless.call(a,null!=(i=null!=t?t.options:t)?i.isOtherType:i,{name:"unless",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o}))?i:"")+'\r\n<div class="dropdown-divider"></div>\r\n\r\n<div class="form-group">\r\n <label for="suggest-edit" class="fw-bold">'+l((n.lang||t&&t.lang||s).call(a,"suggestionSubheading",{name:"lang",hash:{},data:o}))+'</label>\r\n <div class="rating-select-region"></div>\r\n <div class="rating-form-feedback invalid-feedback"></div>\r\n'+(null!=(i=n.unless.call(a,null!=(i=null!=t?t.options:t)?i.useRatingSelect:i,{name:"unless",hash:{},fn:e.program(3,o,0),inverse:e.noop,data:o}))?i:"")+'</div>\r\n\r\n<div class="form-group">\r\n <label for="reason-for-edit" class="fw-bold">'+l((n.lang||t&&t.lang||s).call(a,"reasoningSubheading",{name:"lang",hash:{},data:o}))+'</label>\r\n <textarea\r\n id="reason-for-edit"\r\n placeholder="'+l((n.lang||t&&t.lang||s).call(a,"reasoningPlaceholder",{name:"lang",hash:{},data:o}))+'"\r\n class="form-control"\r\n name="reason"\r\n ></textarea>\r\n <div class="form-feedback"></div>\r\n</div>'},useData:!0})},34651: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=null!=t?t:e.nullContext||{},a=e.hooks.helperMissing,s=e.escapeExpression;return"<p>"+s((n.lang||t&&t.lang||a).call(i,"guidelines",{name:"lang",hash:{},data:o}))+'</p>\r\n<p class="fw-bold mb-1">'+s((n.lang||t&&t.lang||a).call(i,"dropdownHeading",{name:"lang",hash:{},data:o}))+'</p>\r\n<div class="metadata-dropdown-region position-relative"></div>\r\n<div class="suggest-edit-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})}}]);