@clickview/library-editor 1.2.2 → 1.3.0-rc.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (149) hide show
  1. package/dist/bundles.json +3 -3
  2. package/dist/css/{library-editor-app-73ef35d93e.css → library-editor-app-30cd08bfae.css} +2 -2
  3. package/dist/en.json +1 -1
  4. package/dist/scripts/0-d20750cdec.chunk.js +1 -0
  5. package/dist/scripts/1-28a327acf3.chunk.js +1 -0
  6. package/dist/scripts/10-b830a40f72.chunk.js +1 -0
  7. package/dist/scripts/{11-efbe8b672b.chunk.js → 11-02eba260f6.chunk.js} +1 -1
  8. package/dist/scripts/12-8791a92594.chunk.js +1 -0
  9. package/dist/scripts/13-665738fbb1.chunk.js +1 -0
  10. package/dist/scripts/14-1e2cd6ac41.chunk.js +1 -0
  11. package/dist/scripts/15-0dc89981e2.chunk.js +1 -0
  12. package/dist/scripts/16-4a1c634dda.chunk.js +1 -0
  13. package/dist/scripts/17-3c94d08d78.chunk.js +1 -0
  14. package/dist/scripts/{18-4c5983938e.chunk.js → 18-3fadb1f394.chunk.js} +1 -1
  15. package/dist/scripts/19-8e572002ab.chunk.js +1 -0
  16. package/dist/scripts/{2-d90f461b10.chunk.js → 2-7a78d29f44.chunk.js} +1 -1
  17. package/dist/scripts/22-d2e056e746.chunk.js +1 -0
  18. package/dist/scripts/23-f8a294ec40.chunk.js +1 -0
  19. package/dist/scripts/24-2bcd00effe.chunk.js +1 -0
  20. package/dist/scripts/25-c4aaeab127.chunk.js +1 -0
  21. package/dist/scripts/26-9a7dd55620.chunk.js +1 -0
  22. package/dist/scripts/27-7e018cd6b5.chunk.js +1 -0
  23. package/dist/scripts/28-b1c31de615.chunk.js +1 -0
  24. package/dist/scripts/29-2beecb7b1b.chunk.js +1 -0
  25. package/dist/scripts/3-eb941619ce.chunk.js +1 -0
  26. package/dist/scripts/30-e056eceff1.chunk.js +1 -0
  27. package/dist/scripts/31-f5fb9024bf.chunk.js +1 -0
  28. package/dist/scripts/32-3a253b3136.chunk.js +1 -0
  29. package/dist/scripts/33-48b0479da2.chunk.js +1 -0
  30. package/dist/scripts/34-3d5a50c31b.chunk.js +1 -0
  31. package/dist/scripts/35-0d7358dba8.chunk.js +1 -0
  32. package/dist/scripts/36-d6d7b848e2.chunk.js +1 -0
  33. package/dist/scripts/37-d39100a6e1.chunk.js +1 -0
  34. package/dist/scripts/38-35d9648dc7.chunk.js +1 -0
  35. package/dist/scripts/39-06dd548dc5.chunk.js +1 -0
  36. package/dist/scripts/4-2a82a84056.chunk.js +1 -0
  37. package/dist/scripts/40-792c2cdf70.chunk.js +1 -0
  38. package/dist/scripts/41-b943713472.chunk.js +1 -0
  39. package/dist/scripts/42-f49212bb91.chunk.js +1 -0
  40. package/dist/scripts/43-fb162a1122.chunk.js +1 -0
  41. package/dist/scripts/44-b3b4565828.chunk.js +1 -0
  42. package/dist/scripts/45-fed967dc8d.chunk.js +1 -0
  43. package/dist/scripts/46-372fa93c13.chunk.js +1 -0
  44. package/dist/scripts/47-3af23cc886.chunk.js +1 -0
  45. package/dist/scripts/48-f0403bcb83.chunk.js +1 -0
  46. package/dist/scripts/49-13b2893542.chunk.js +1 -0
  47. package/dist/scripts/5-0fa94bdf69.chunk.js +1 -0
  48. package/dist/scripts/50-f2d6010fd8.chunk.js +1 -0
  49. package/dist/scripts/51-ec94176992.chunk.js +1 -0
  50. package/dist/scripts/52-f541d887ed.chunk.js +1 -0
  51. package/dist/scripts/53-5de0b434bf.chunk.js +1 -0
  52. package/dist/scripts/54-e397b03055.chunk.js +1 -0
  53. package/dist/scripts/55-a5aa7796a9.chunk.js +1 -0
  54. package/dist/scripts/56-de18389621.chunk.js +1 -0
  55. package/dist/scripts/57-ea4f07ceff.chunk.js +1 -0
  56. package/dist/scripts/58-be172a6ca4.chunk.js +1 -0
  57. package/dist/scripts/59-4bf5baafed.chunk.js +1 -0
  58. package/dist/scripts/6-c0744fc9f6.chunk.js +1 -0
  59. package/dist/scripts/{60-02ac1d0885.chunk.js → 60-03e44d916c.chunk.js} +1 -1
  60. package/dist/scripts/{61-11806e7f0f.chunk.js → 61-f5f8c3a7f9.chunk.js} +1 -1
  61. package/dist/scripts/62-78089903fa.chunk.js +1 -0
  62. package/dist/scripts/63-ea5265b3ba.chunk.js +1 -0
  63. package/dist/scripts/64-1460024bea.chunk.js +1 -0
  64. package/dist/scripts/65-81c6f0a1d0.chunk.js +1 -0
  65. package/dist/scripts/66-469cc41ce6.chunk.js +1 -0
  66. package/dist/scripts/67-d83860b6f9.chunk.js +1 -0
  67. package/dist/scripts/68-bf1905261e.chunk.js +1 -0
  68. package/dist/scripts/69-01456dee21.chunk.js +1 -0
  69. package/dist/scripts/7-8ae226ffea.chunk.js +1 -0
  70. package/dist/scripts/70-e79d42e859.chunk.js +1 -0
  71. package/dist/scripts/71-8bee00418c.chunk.js +1 -0
  72. package/dist/scripts/72-c9c79df587.chunk.js +1 -0
  73. package/dist/scripts/73-172b46004e.chunk.js +1 -0
  74. package/dist/scripts/74-3a572e4113.chunk.js +1 -0
  75. package/dist/scripts/8-320ab9271f.chunk.js +1 -0
  76. package/dist/scripts/9-eb320e3ae9.chunk.js +1 -0
  77. package/dist/scripts/bundle-d80b4b3ce7.min.js +10 -0
  78. package/dist/scripts/polyfills-afb66ec8cc.min.js +1 -0
  79. package/package.json +2 -2
  80. package/dist/scripts/0-3146283f04.chunk.js +0 -1
  81. package/dist/scripts/1-8f308c9df2.chunk.js +0 -1
  82. package/dist/scripts/10-1f8e4712fb.chunk.js +0 -1
  83. package/dist/scripts/12-9a649bd1e8.chunk.js +0 -1
  84. package/dist/scripts/13-d003ff9e41.chunk.js +0 -1
  85. package/dist/scripts/14-79273eff4c.chunk.js +0 -1
  86. package/dist/scripts/15-1a0756e067.chunk.js +0 -1
  87. package/dist/scripts/16-bbf0f01fe8.chunk.js +0 -1
  88. package/dist/scripts/17-3056f1e460.chunk.js +0 -1
  89. package/dist/scripts/19-f6bd3a3d49.chunk.js +0 -1
  90. package/dist/scripts/22-f0e56683c3.chunk.js +0 -1
  91. package/dist/scripts/23-cdce4174d1.chunk.js +0 -1
  92. package/dist/scripts/24-afd2aa2bfc.chunk.js +0 -1
  93. package/dist/scripts/25-b8aeb90fea.chunk.js +0 -1
  94. package/dist/scripts/26-08a7f60500.chunk.js +0 -1
  95. package/dist/scripts/27-4fdfe99ba0.chunk.js +0 -1
  96. package/dist/scripts/28-bb3ced1465.chunk.js +0 -1
  97. package/dist/scripts/29-ef11dca9b5.chunk.js +0 -1
  98. package/dist/scripts/3-f02b82314e.chunk.js +0 -1
  99. package/dist/scripts/30-41819d54db.chunk.js +0 -1
  100. package/dist/scripts/31-adedea4916.chunk.js +0 -1
  101. package/dist/scripts/32-92b6dc1186.chunk.js +0 -1
  102. package/dist/scripts/33-dda4dfbdee.chunk.js +0 -1
  103. package/dist/scripts/34-0f61f7fc7d.chunk.js +0 -1
  104. package/dist/scripts/35-df3c6c90f7.chunk.js +0 -1
  105. package/dist/scripts/36-97a61b13fd.chunk.js +0 -1
  106. package/dist/scripts/37-5f0b4c4b24.chunk.js +0 -1
  107. package/dist/scripts/38-1806441e62.chunk.js +0 -1
  108. package/dist/scripts/39-cb06876d63.chunk.js +0 -1
  109. package/dist/scripts/4-3556f5cd86.chunk.js +0 -1
  110. package/dist/scripts/40-dedc900f03.chunk.js +0 -1
  111. package/dist/scripts/41-2a772649ef.chunk.js +0 -1
  112. package/dist/scripts/42-edd884c6e1.chunk.js +0 -1
  113. package/dist/scripts/43-7cb12bb043.chunk.js +0 -1
  114. package/dist/scripts/44-6e38e6c3da.chunk.js +0 -1
  115. package/dist/scripts/45-7696788c78.chunk.js +0 -1
  116. package/dist/scripts/46-6fae0cec47.chunk.js +0 -1
  117. package/dist/scripts/47-c5e053926b.chunk.js +0 -1
  118. package/dist/scripts/48-c62f428014.chunk.js +0 -1
  119. package/dist/scripts/49-0221ac925c.chunk.js +0 -1
  120. package/dist/scripts/5-f2fad668b9.chunk.js +0 -1
  121. package/dist/scripts/50-6c9cd76347.chunk.js +0 -1
  122. package/dist/scripts/51-4c4cb2a786.chunk.js +0 -1
  123. package/dist/scripts/52-1a2a4d664f.chunk.js +0 -1
  124. package/dist/scripts/53-4420fdb2ff.chunk.js +0 -1
  125. package/dist/scripts/54-7ad2a43bae.chunk.js +0 -1
  126. package/dist/scripts/55-6bdc1394e8.chunk.js +0 -1
  127. package/dist/scripts/56-0e7f151d8f.chunk.js +0 -1
  128. package/dist/scripts/57-e02ec7e3aa.chunk.js +0 -1
  129. package/dist/scripts/58-23f2f08ffa.chunk.js +0 -1
  130. package/dist/scripts/59-73f62422ee.chunk.js +0 -1
  131. package/dist/scripts/6-41fbd1d098.chunk.js +0 -1
  132. package/dist/scripts/62-36cd4edbe1.chunk.js +0 -1
  133. package/dist/scripts/63-221a784003.chunk.js +0 -1
  134. package/dist/scripts/64-de212ef1ff.chunk.js +0 -1
  135. package/dist/scripts/65-2a3fe2cf9f.chunk.js +0 -1
  136. package/dist/scripts/66-3d86df4f03.chunk.js +0 -1
  137. package/dist/scripts/67-4044e5776b.chunk.js +0 -1
  138. package/dist/scripts/68-d9ac81db0f.chunk.js +0 -1
  139. package/dist/scripts/69-4523125605.chunk.js +0 -1
  140. package/dist/scripts/7-7d08599cb1.chunk.js +0 -1
  141. package/dist/scripts/70-cac4a9fb87.chunk.js +0 -1
  142. package/dist/scripts/71-59ded4dd7b.chunk.js +0 -1
  143. package/dist/scripts/72-8329bfea82.chunk.js +0 -1
  144. package/dist/scripts/73-dfe0e3c96a.chunk.js +0 -1
  145. package/dist/scripts/74-1aee6ab328.chunk.js +0 -1
  146. package/dist/scripts/8-b20f6d3c66.chunk.js +0 -1
  147. package/dist/scripts/9-4baf495c07.chunk.js +0 -1
  148. package/dist/scripts/bundle-aba0b4f36c.min.js +0 -10
  149. package/dist/scripts/polyfills-c68217e80d.min.js +0 -1
@@ -0,0 +1 @@
1
+ (window.webpackJsonp_clickview_library_editor=window.webpackJsonp_clickview_library_editor||[]).push([[27],{1101:function(e,t,n){"use strict";var r=n(204),o=n(1),i=n(202),a=n(0),l=n(146),s=n(307);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})(e)}function u(e){return function(e){if(Array.isArray(e))return f(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return f(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return f(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function p(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function d(e,t){return(d=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(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,r=m(e);if(t){var o=m(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return y(this,n)}}function y(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)}function m(e){return(m=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var b=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&d(e,t)}(c,e);var t,n,r,i=h(c);function c(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c),(t=i.call(this,{collectionPrefix:"".concat(a.f.RECENT_VIDEOS,":collection"),cursor:e.cursor,sort:e.sort})).setAdditionalData(e),t}return t=c,(n=[{key:"setAdditionalData",value:function(e){var t=e.libraryIds,n=e.dateQueryString,r=e.subjects;t&&(this.libraryIds=t),r&&(o.isArray(r)&&r.length&&(this.subjects=r),o.isArray(r)||(this.subjects=[r]));var i=o.findWhere(s.g,{queryString:n})||s.e;this.dateOption=new l.b(i)}},{key:"toString",value:function(){var e=this.subjects&&this.subjects.length&&this.subjects.map((function(e){return escape(e.get("name"))}))||[];return[this.collectionPrefix,this.libraryIds,this.dateOption.get("from"),this.dateOption.get("to")].concat(u(e),[this.cursor]).filter(Boolean).join(":")}},{key:"toParams",value:function(){var e={};return this.libraryIds&&(e.libraryIds=this.libraryIds),this.dateOption&&(e.from=this.dateOption.get("from"),e.to=this.dateOption.get("to")),this.subjects&&(e.subjectIds=o.flatten(this.subjects.map((function(e){return e.get("subjectIds")})))),this.cursor&&(e.cursor=this.cursor),e}}])&&p(t.prototype,n),r&&p(t,r),Object.defineProperty(t,"prototype",{writable:!1}),c}(i.a);function g(e){return(g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function v(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function w(e,t){return(w=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function k(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=E(e);if(t){var o=E(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return O(this,n)}}function O(e,t){if(t&&("object"===g(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function E(e){return(E=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var C=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&&w(e,t)}(c,e);var t,n,r,i=k(c);function c(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c),(t=i.call(this,{collectionPrefix:"".concat(a.f.RECENT_SUBJECTS,":collection"),sort:e.sort})).setAdditionalData(e),t}return t=c,(n=[{key:"setAdditionalData",value:function(e){var t=e.libraryIds,n=e.dateQueryString;t&&(this.libraryIds=t);var r=o.findWhere(s.g,{queryString:n})||s.e;this.dateOption=new l.b(r)}},{key:"toString",value:function(){return[this.collectionPrefix,this.libraryIds,this.dateOption.get("from"),this.dateOption.get("to")].filter(Boolean).join(":")}},{key:"toParams",value:function(){var e={};return this.libraryIds&&(e.libraryIds=this.libraryIds),this.dateOption&&(e.from=this.dateOption.get("from"),e.to=this.dateOption.get("to")),e}}])&&v(t.prototype,n),r&&v(t,r),Object.defineProperty(t,"prototype",{writable:!1}),c}(i.a);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})(e)}function P(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function j(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function S(e,t){return(S=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function R(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=_(e);if(t){var o=_(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return T(this,n)}}function T(e,t){if(t&&("object"===x(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function _(e){return(_=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var I=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&&S(e,t)}(i,e);var t,n,r,o=R(i);function i(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return j(this,i),o.call(this,{collectionPrefix:a.f.LIBRARY_FOLDERS,id:e,sort:t,cursor:n})}return t=i,n&&P(t.prototype,n),r&&P(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}(i.a);n.d(t,"d",(function(){return r.a})),n.d(t,"b",(function(){return b})),n.d(t,"c",(function(){return C})),n.d(t,"a",(function(){return I}))},1126:function(e,t,n){"use strict";n.d(t,"a",(function(){return v}));var r=n(6),o=n(2),i=n(30),a=n(16),l=n(305),s=n(12),c=n(1055),u=n(200),f=n(1150),p=n.n(f);function d(e){return(d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function h(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function y(e,t){return(y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function m(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=g(e);if(t){var o=g(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return b(this,n)}}function b(e,t){if(t&&("object"===d(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function g(e){return(g=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var v=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&y(e,t)}(d,e);var t,n,o,f=m(d);function d(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,d),f.call(this,e)}return t=d,(n=[{key:"initialize",value:function(){this.options.playerViewModelKey&&this.listenToPlayerViewModel(),this.initViewModel(),this.options.editing&&this.syncTime()}},{key:"name",get:function(){return"ChapterFormComponent"}},{key:"lang",get:function(){return"libraryEditor.chapterForm"}},{key:"tagName",get:function(){return"form"}},{key:"viewModelName",get:function(){return"".concat(this.name,":").concat(this.cid)}},{key:"template",get:function(){return p.a}},{key:"className",get:function(){return this.options.creating?"py-3":"border-top p-2"}},{key:"behaviors",get:function(){return[{behaviorClass:l.a,bindViewModel:!0},{behaviorClass:l.f,bindViewModel:!0}]}},{key:"events",value:function(){return{submit:"onSubmit","change .chapter-name":"validateName","keyup .chapter-name":"validateName","change .time-input":"onTimeInputUpdate","click .time-input":"onTimeInputUpdate","keyup .time-input":"onTimeInputUpdate","click .cancel":"destroyView"}}},{key:"bindings",get:function(){return{"[name=name]":{observe:"name",setOptions:{validate:!0}},"[name=hours]":{observe:"hours",setOptions:{validate:!0}},"[name=minutes]":{observe:"minutes",setOptions:{validate:!0}},"[name=seconds]":{observe:"seconds",setOptions:{validate:!0}}}}},{key:"initViewModel",value:function(){this.viewModel=i.a.get(this.viewModelName,this.model.toJSON())}},{key:"listenToPlayerViewModel",value:function(){var e=i.a.get(this.options.playerViewModelKey);this.listenTo(e,"change:currenttime",this.updateTime)}},{key:"updateTime",value:function(e){this.webPlayerTime=e.get("currenttime"),this.syncTime()}},{key:"syncTime",value:function(){var e=this.viewModel.get("startTime")||this.webPlayerTime;this.viewModel.set({hours:s.x.getHoursComponent(e),minutes:s.x.getMinutesComponent(e),seconds:s.x.getSecondsComponent(e)})}},{key:"getNewTime",value:function(){return this.enabled()?s.x.parseTime(this.viewModel.pick("hours","minutes","seconds")):0}},{key:"enabled",value:function(){return this.options.creating||0!==this.model.collection.indexOf(this.model)}},{key:"maxTimes",value:function(){var e=s.x.millisecondsToSeconds(this.options.duration),t=s.x.getHoursComponent(e),n=t>0?59:s.x.getMinutesComponent(e);return{maxHr:t,maxMin:n,maxSec:n>0?59:s.x.getSecondsComponent(e)}}},{key:"onTimeInputUpdate",value:function(){r.Radio.channel(this.options.channelName).trigger(u.LibraryEditorActions.UpdateChapterTime,this.getNewTime()),this.validateStartTime()}},{key:"destroyView",value:function(){r.Radio.channel(this.options.channelName).trigger(u.LibraryEditorActions.CancelChapterEdit),this.destroy()}},{key:"onSubmit",value:function(e){if(e.preventDefault(),!this.validate())return!1;var t={id:this.viewModel.get("id"),name:this.viewModel.get("name"),startTime:this.getNewTime()},n=r.Radio.channel(this.options.channelName),o=u.LibraryEditorActions.CreateChapter;this.options.editing&&(o=u.LibraryEditorActions.UpdateChapter),n.trigger(o,t),this.stopListening(this.viewModel),i.a.clear(this.viewModelName)}},{key:"validate",value:function(){this.viewModel.validate();var e=this.validateStartTime(),t=this.validateName();return this.viewModel.isValid()&&e&&t}},{key:"validateStartTime",value:function(){var e=this,t=r.Validation.callbacks,n=t.valid,o=t.invalid,i=this.model.collection||this.options.collection,a=this.getNewTime(),l=c.a.isValidChapterTime(this.model,a,this.options.duration,i),s=[],u=["seconds","minutes","hours"];return a<0?s=u:l&&(s.push("seconds"),a>59&&s.push("minutes"),a>3540&&s.push("hours")),u.forEach((function(t){return n(e,t,null)})),s.forEach((function(t){return o(e,t,l,null)})),!l}},{key:"validateName",value:function(e){if(!e||13!==e.keyCode){var t=r.Validation.callbacks,n=t.valid,o=t.invalid,i=this.model.collection||this.options.collection,a=c.a.isValidChapterName(this.model,this.viewModel.get("name"),i);return a?o(this,"name",a,null):n(this,"name",null),!a}}},{key:"viewOptions",value:function(){var e=this.maxTimes(),t=e.maxHr,n=e.maxMin,r=0===e.maxSec,o=0===n,i=0===t;return Object.assign(Object.assign({},this.options),{enabled:this.enabled(),timeId:"".concat(this.cid,"-time"),chapterId:"".concat(this.cid,"-chapter-name"),plusSvg:a.a.getSvg(a.b.Plus),secDisabled:r,minDisabled:o,hrDisabled:i})}}])&&h(t.prototype,n),o&&h(t,o),Object.defineProperty(t,"prototype",{writable:!1}),d}(o.a.Component)},1134:function(e,t,n){"use strict";var r=n(2),o=n(6),i=n(1147),a=n.n(i),l=n(111),s=n(4),c=n(42),u=n(16),f=n(1135),p=n(1148),d=n.n(p),h=n(1149),y=n.n(h);function m(e){return(m="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function b(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function g(e,t){return(g=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function v(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=k(e);if(t){var o=k(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return w(this,n)}}function w(e,t){if(t&&("object"===m(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function k(e){return(k=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var O=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&&g(e,t)}(i,e);var t,n,r,o=v(i);function i(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),o.call(this,e)}return t=i,(n=[{key:"name",get:function(){return"ResourceItemComponent"}},{key:"template",get:function(){return d.a}},{key:"className",get:function(){return"".concat(y.a.container," rounded p-2 mb-2")}},{key:"events",value:function(){return{"click .delete":"onClickDelete","click .edit":"onClickEdit"}}},{key:"appLinks",get:function(){return{".edit":this.options.getEditAppLink(this.model.get("id"))}}},{key:"onClickEdit",value:function(){var e=c.a.mergeOptions(this.options.analyticsOptions,{actionType:s.UserAction.Edit,entity:s.EntityType.Resource,workflowPhase:s.WorkflowPhase.Start}),t={id:this.model.get("id"),parentId:+this.options.videoId};c.a.logUserAction(t,e)}},{key:"onClickDelete",value:function(){l.a.isFunction(this.options.onClickDelete)&&this.options.onClickDelete(this.model)}},{key:"viewOptions",value:function(){var e=this.model.get("metadata"),t=e?e.type:"";return{editable:this.options.editable,extension:f.a.mapTypeToExtension(t),svg:u.a.getSvg(f.a.mapTypeToSvg(t)),iconClass:f.a.mapTypeToClass(t),resourceType:f.a.mapTypeToName(t),editSvg:u.a.getSvg(u.b.Edit),trashSvg:u.a.getSvg(u.b.Delete)}}}])&&b(t.prototype,n),r&&b(t,r),Object.defineProperty(t,"prototype",{writable:!1}),i}(r.a.Component),E=n(3),C=n(120),x=n(153),P=n(207);function j(e){return(j="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function S(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function R(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function T(e,t,n){return t&&R(e.prototype,t),n&&R(e,n),Object.defineProperty(e,"prototype",{writable:!1}),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)}function I(e,t){return(I=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function D(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=V(e);if(t){var o=V(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return L(this,n)}}function L(e,t){if(t&&("object"===j(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function V(e){return(V=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n.d(t,"b",(function(){return N})),n.d(t,"a",(function(){return B}));var N=function(e){_(n,e);var t=D(n);function n(e){return S(this,n),t.call(this,e)}return T(n,[{key:"name",get:function(){return"VideoResourcesComponentCollection"}},{key:"className",get:function(){return"mt-3"}},{key:"lang",get:function(){return"libraryEditor.videoResources"}},{key:"childView",get:function(){return O}},{key:"childViewOptions",get:function(){var e=this;return{editable:this.options.editable,videoId:this.options.videoId,analyticsOptions:this.options.analyticsOptions,onClickDelete:function(t){return e.onClickDelete(t)},getEditAppLink:function(t){return{application:C.a.LIBRARY_EDITOR,action:x.a.LibraryEditor.EDIT_RESOURCE,args:[e.options.videoId,t]}}}}},{key:"onClickDelete",value:function(e){var t=this;new P.a({title:E.a.getPhrase(this.lang,"removeHeading"),text:E.a.getPhrase(this.lang,"removeBody",{resourceName:e.get("name")}),buttons:[{text:E.a.getPhrase(this.lang,"remove"),className:"btn btn-danger",success:!0},{text:E.a.getPhrase(this.lang,"cancel"),className:"btn btn-secondary",close:!0}],channelName:"".concat(this.name).concat(this.cid)}).render().done((function(){o.Radio.channel(t.options.channelName).trigger("delete:resource",e.get("id"))}))}}]),n}(r.a.ComponentCollection),B=function(e){_(n,e);var t=D(n);function n(e){return S(this,n),t.call(this,e)}return T(n,[{key:"name",get:function(){return"VideoResourcesComponent"}},{key:"template",get:function(){return a.a}},{key:"lang",get:function(){return"libraryEditor.videoResources"}},{key:"channelName",get:function(){return"".concat(this.name).concat(this.cid)}},{key:"className",get:function(){return this.options.customCollection?"":"py-3 border-top"}},{key:"regions",value:function(){return{resources:{replaceElement:!0,el:".resource-list-region"}}}},{key:"renderResources",value:function(){var e=new N({collection:this.options.customCollection||this.model.resources,editable:this.options.editable||!1,videoId:this.options.videoId||this.model.get("id"),channelName:this.options.parentChannelName||this.channelName});this.showChildView("resources",e)}},{key:"viewOptions",value:function(){return{resourcesHeadingText:this.options.headerText||E.a.getPhrase(this.lang,"heading"),emptyStateText:this.options.emptyStateText}}},{key:"onRender",value:function(){this.renderResources()}}]),n}(r.a.Component)},1135:function(e,t,n){"use strict";var r,o=n(3),i=n(16),a=n(62);function l(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}!function(e){e.Pdf="pdf",e.Image="image",e.PowerPoint="powerpoint",e.Document="document",e.Excel="excel",e.Zip="archive",e.File="text"}(r||(r={})),n.d(t,"a",(function(){return c}));var s="shared.shared-utils",c={mapRatingToClass:function(e){if(!e)return"";return function(e){switch(!0){case e<32:return"bg-purple";case e<48:return"bg-green";case e<80:return"bg-info";case e<96:return"bg-red";case e<128:return"bg-pink";case e>=128:return"bg-yellow";default:return""}}(e)},mapSourceToDisplayName:function(e){switch(e.type){case a.a.HostedLibrary:case a.a.CustomLibrary:return e.name;case a.a.Exchange:return o.a.getPhrase(s,"exchange");case a.a.Workspace:return o.a.getPhrase(s,"workspace");default:return""}},mapSourceToClass:function(e){switch(e){case a.a.HostedLibrary:case a.a.CustomLibrary:return"bg-info";case a.a.Exchange:return"bg-green";case a.a.Workspace:default:return"bg-red"}},isInteractive:function(e){var t,n;return!!(null===(n=null===(t=null==e?void 0:e.interactives)||void 0===t?void 0:t.data)||void 0===n?void 0:n.length)},mapTypeToSvg:function(e){var t,n=(l(t={},r.Pdf,i.b.FilePDF),l(t,r.Image,i.b.FileImg),l(t,r.PowerPoint,i.b.FilePowerpoint),l(t,r.Document,i.b.FileWord),l(t,r.Excel,i.b.FileExcel),l(t,r.Zip,i.b.FileZip),l(t,r.File,i.b.File),t)[e];return n||(n=i.b.Folder),n},mapTypeToClass:function(e){switch(e){case r.Pdf:return"icon-red";case r.Image:return"icon-purple";case r.Document:return"icon-blue";case r.Excel:return"icon-green";case r.PowerPoint:return"icon-orange";case r.Zip:return"icon-teal";case r.File:return"icon-gray";default:return""}},mapTypeToExtension:function(e){if(!e)return"";return{pdf:"pdf",image:"png",powerpoint:"pptx"}[e.toLowerCase()]},mapTypeToName:function(e){if(!e)return"";switch(e){case r.Pdf:return o.a.getPhrase(s,"pdf");case r.Image:return o.a.getPhrase(s,"image");case r.Document:return o.a.getPhrase(s,"document");case r.Excel:return o.a.getPhrase(s,"spreadsheet");case r.PowerPoint:return o.a.getPhrase(s,"presentation");case r.Zip:return o.a.getPhrase(s,"zipArchive");case r.File:return o.a.getPhrase(s,"file");default:return""}}}},1144:function(e,t,n){var r=n(10);e.exports=(r.default||r).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){return'<nav class="breadcrumbs-region" aria-label="breadcrumb"></nav>'},useData:!0})},1145:function(e,t,n){var r=n(10);e.exports=(r.default||r).template({1:function(e,t,n,r,o){var i;e.propertyIsEnumerable;return 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:o}):i)+"\r\n"},3:function(e,t,n,r,o){var i;e.propertyIsEnumerable;return'<a class="info-link">'+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:o}):i)+"</a>\r\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var i;e.propertyIsEnumerable;return 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,o,0),inverse:e.program(3,o,0),data:o}))?i:""},useData:!0})},1147:function(e,t,n){var r=n(10);e.exports=(r.default||r).template({1:function(e,t,n,r,o){var i;e.propertyIsEnumerable;return"<p>"+e.escapeExpression(e.lambda(null!=(i=null!=t?t.options:t)?i.emptyStateText:i,t))+"</p>"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var i;e.propertyIsEnumerable;return"<h5>"+e.escapeExpression(e.lambda(null!=(i=null!=t?t.options:t)?i.resourcesHeadingText:i,t))+"</h5>\r\n"+(null!=(i=n.if.call(null!=t?t:e.nullContext||{},null!=(i=null!=t?t.options:t)?i.emptyStateText:i,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o}))?i:"")+'\r\n<div class="resource-list-region"></div>'},useData:!0})},1148:function(e,t,n){var r=n(10);e.exports=(r.default||r).template({1:function(e,t,n,r,o){e.propertyIsEnumerable;var i,a=e.lambda;return'<a class="float-right svg-container cursor-pointer text-muted delete">'+(null!=(i=a(null!=(i=null!=t?t.options:t)?i.trashSvg:i,t))?i:"")+'</a>\r\n<a class="float-right svg-container cursor-pointer text-muted edit">'+(null!=(i=a(null!=(i=null!=t?t.options:t)?i.editSvg:i,t))?i:"")+"</a>\r\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){e.propertyIsEnumerable;var i,a,l=e.lambda,s=e.escapeExpression,c=null!=t?t:e.nullContext||{},u=e.hooks.helperMissing;return'<span title="'+s(l(null!=(i=null!=t?t.options:t)?i.resourceType:i,t))+'" class="d-inline-block align-middle mr-2 svg-container '+s(l(null!=(i=null!=t?t.options:t)?i.iconClass:i,t))+'">'+(null!=(i=l(null!=(i=null!=t?t.options:t)?i.svg:i,t))?i:"")+'</span>\r\n<a href="'+s("function"==typeof(a=null!=(a=n.url||(null!=t?t.url:t))?a:u)?a.call(c,{name:"url",hash:{},data:o}):a)+"?name="+s("function"==typeof(a=null!=(a=n.name||(null!=t?t.name:t))?a:u)?a.call(c,{name:"name",hash:{},data:o}):a)+'" class="align-middle">\r\n '+s("function"==typeof(a=null!=(a=n.name||(null!=t?t.name:t))?a:u)?a.call(c,{name:"name",hash:{},data:o}):a)+"\r\n</a>\r\n"+(null!=(i=n.if.call(c,null!=(i=null!=t?t.options:t)?i.editable:i,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o}))?i:"")},useData:!0})},1149:function(e,t,n){e.exports={container:"f6lVD"}},1150:function(e,t,n){var r=n(10);e.exports=(r.default||r).template({1:function(e,t,n,r,o){e.propertyIsEnumerable;var i,a=e.lambda,l=e.escapeExpression,s=null!=t?t:e.nullContext||{},c=e.hooks.helperMissing;return' <div class="col-6 form-group">\r\n <label class="d-block" for="'+l(a(null!=(i=null!=t?t.options:t)?i.timeId:i,t))+'">'+l((n.lang||t&&t.lang||c).call(s,"startTimeLabel",{name:"lang",hash:{},data:o}))+'</label>\r\n <input\r\n class="form-control d-inline-block col-3 time-input hour-input"\r\n type="number"\r\n placeholder="'+l((n.lang||t&&t.lang||c).call(s,"hoursPlaceholder",{name:"lang",hash:{},data:o}))+'"\r\n name="hours"\r\n autocomplete="off"\r\n '+(null!=(i=n.if.call(s,null!=(i=null!=t?t.options:t)?i.hrDisabled:i,{name:"if",hash:{},fn:e.program(2,o,0),inverse:e.noop,data:o}))?i:"")+'> <b>:</b>\r\n <input\r\n class="form-control d-inline-block col-3 time-input minute-input"\r\n type="number"\r\n placeholder="'+l((n.lang||t&&t.lang||c).call(s,"minutesPlaceholder",{name:"lang",hash:{},data:o}))+'"\r\n name="minutes"\r\n autocomplete="off"\r\n '+(null!=(i=n.if.call(s,null!=(i=null!=t?t.options:t)?i.minDisabled:i,{name:"if",hash:{},fn:e.program(2,o,0),inverse:e.noop,data:o}))?i:"")+'> <b>:</b>\r\n <input\r\n class="form-control d-inline-block col-3 time-input second-input"\r\n type="number"\r\n placeholder="'+l((n.lang||t&&t.lang||c).call(s,"secondsPlaceholder",{name:"lang",hash:{},data:o}))+'"\r\n name="seconds"\r\n id="'+l(a(null!=(i=null!=t?t.options:t)?i.timeId:i,t))+'"\r\n autocomplete="off"\r\n '+(null!=(i=n.if.call(s,null!=(i=null!=t?t.options:t)?i.secDisabled:i,{name:"if",hash:{},fn:e.program(2,o,0),inverse:e.noop,data:o}))?i:"")+'>\r\n <div class="form-feedback"></div>\r\n </div>\r\n'},2:function(e,t,n,r,o){return"disabled"},4:function(e,t,n,r,o){var i;e.propertyIsEnumerable;return' <button type="submit" class="btn btn-primary btn-sm ml-2">\r\n <span class="d-inline-block align-middle svg-container">'+(null!=(i=e.lambda(null!=(i=null!=t?t.options:t)?i.plusSvg:i,t))?i:"")+'</span>\r\n <span class="align-middle">'+e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"add",{name:"lang",hash:{},data:o}))+"</span>\r\n </button>\r\n"},6:function(e,t,n,r,o){e.propertyIsEnumerable;var i=null!=t?t:e.nullContext||{},a=e.hooks.helperMissing,l=e.escapeExpression;return' <button type="submit" class="btn btn-primary btn-sm ml-2">'+l((n.lang||t&&t.lang||a).call(i,"save",{name:"lang",hash:{},data:o}))+'</button>\r\n <button type="button" class="btn btn-secondary btn-sm cancel ml-2">'+l((n.lang||t&&t.lang||a).call(i,"cancel",{name:"lang",hash:{},data:o}))+"</button>\r\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){e.propertyIsEnumerable;var i,a=e.lambda,l=e.escapeExpression,s=null!=t?t:e.nullContext||{},c=e.hooks.helperMissing;return'<div class="row">\r\n <div class="col-6 form-group">\r\n <label for="'+l(a(null!=(i=null!=t?t.options:t)?i.chapterId:i,t))+'">'+l((n.lang||t&&t.lang||c).call(s,"nameLabel",{name:"lang",hash:{},data:o}))+'</label>\r\n <input type="text" class="form-control chapter-name" name="name" id="'+l(a(null!=(i=null!=t?t.options:t)?i.chapterId:i,t))+'" placeholder="'+l((n.lang||t&&t.lang||c).call(s,"namePlaceholder",{name:"lang",hash:{},data:o}))+'" autofocus autocomplete="off">\r\n <div class="form-feedback"></div>\r\n </div>\r\n'+(null!=(i=n.if.call(s,null!=(i=null!=t?t.options:t)?i.enabled:i,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o}))?i:"")+'</div>\r\n\r\n<div class="row">\r\n'+(null!=(i=n.if.call(s,null!=(i=null!=t?t.options:t)?i.creating:i,{name:"if",hash:{},fn:e.program(4,o,0),inverse:e.noop,data:o}))?i:"")+"\r\n"+(null!=(i=n.if.call(s,null!=(i=null!=t?t.options:t)?i.editing:i,{name:"if",hash:{},fn:e.program(6,o,0),inverse:e.noop,data:o}))?i:"")+"</div>"},useData:!0})},1151:function(e,t,n){var r=n(10);e.exports=(r.default||r).template({1:function(e,t,n,r,o){var i;e.propertyIsEnumerable;return e.escapeExpression(e.lambda(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.loading:i,t))},3:function(e,t,n,r,o){e.propertyIsEnumerable;var i,a=e.lambda,l=e.escapeExpression,s=null!=t?t:e.nullContext||{};return' <div class="col-2 text-right">\r\n <a class="action edit-chapter my-2 svg-container '+l(a(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.svgContainer:i,t))+' d-inline-block text-muted"\r\n title="'+l((n.lang||t&&t.lang||e.hooks.helperMissing).call(s,"edit",{name:"lang",hash:{},data:o}))+'">'+(null!=(i=a(null!=(i=null!=t?t.options:t)?i.editSvg:i,t))?i:"")+"</a>\r\n"+(null!=(i=n.if.call(s,null!=(i=null!=t?t.options:t)?i.allowDelete:i,{name:"if",hash:{},fn:e.program(4,o,0),inverse:e.noop,data:o}))?i:"")+" </div>\r\n"},4:function(e,t,n,r,o){e.propertyIsEnumerable;var i,a=e.lambda,l=e.escapeExpression;return' <a class="action delete-chapter my-2 svg-container '+l(a(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.svgContainer:i,t))+' d-inline-block text-muted"\r\n title="'+l((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"delete",{name:"lang",hash:{},data:o}))+'">'+(null!=(i=a(null!=(i=null!=t?t.options:t)?i.deleteSvg:i,t))?i:"")+"</a>\r\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){e.propertyIsEnumerable;var i,a,l=null!=t?t:e.nullContext||{},s=e.lambda,c=e.escapeExpression;return'<div class="row mx-0 border-top chapter-item '+(null!=(i=n.if.call(l,null!=(i=null!=t?t.options:t)?i.loading:i,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o}))?i:"")+'">\r\n <div class="clickable-seek col-1">\r\n <p class="m-0 py-2">'+c(s(null!=(i=null!=t?t.options:t)?i.index:i,t))+'</p>\r\n </div>\r\n <div class="clickable-seek col-6">\r\n <p class="m-0 py-2">'+c("function"==typeof(a=null!=(a=n.name||(null!=t?t.name:t))?a:e.hooks.helperMissing)?a.call(l,{name:"name",hash:{},data:o}):a)+'</p>\r\n </div>\r\n <div class="clickable-seek col-3 text-right">\r\n <p class="m-0 py-2">'+c(s(null!=(i=null!=t?t.options:t)?i.time:i,t))+"</p>\r\n </div>\r\n"+(null!=(i=n.if.call(l,null!=(i=null!=t?t.options:t)?i.showActions:i,{name:"if",hash:{},fn:e.program(3,o,0),inverse:e.noop,data:o}))?i:"")+'</div>\r\n<div class="edit-form-region"></div>\r\n'},useData:!0})},1152:function(e,t,n){e.exports={darkBackground:"_2jtQl",loading:"_152ia",svgContainer:"xdD5o",chapterItem:"_3G38c"}},1153:function(e,t,n){var r=n(10);e.exports=(r.default||r).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){e.propertyIsEnumerable;var i=null!=t?t:e.nullContext||{},a=e.hooks.helperMissing,l=e.escapeExpression;return"<h5>"+l((n.lang||t&&t.lang||a).call(i,"chapters",{name:"lang",hash:{},data:o}))+'</h5>\r\n<div class="row mt-3 m-0 border-bottom">\r\n <div class="col-1">\r\n <label>#</label>\r\n </div>\r\n <div class="col-6">\r\n <label>'+l((n.lang||t&&t.lang||a).call(i,"nameLabel",{name:"lang",hash:{},data:o}))+'</label>\r\n </div>\r\n <div class="col-3 text-right">\r\n <label>'+l((n.lang||t&&t.lang||a).call(i,"startLabel",{name:"lang",hash:{},data:o}))+'</>\r\n </div>\r\n</div>\r\n<div class="chapter-list-region"></div>'},useData:!0})},1154:function(e,t,n){var r=n(10);e.exports=(r.default||r).template({1:function(e,t,n,r,o){e.propertyIsEnumerable;var i,a=e.lambda,l=e.escapeExpression;return'<a class="float-right '+l(a(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.svgContainer:i,t))+" "+l(a(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.actionSvg:i,t))+' text-muted delete">'+(null!=(i=a(null!=(i=null!=t?t.options:t)?i.trashSvg:i,t))?i:"")+'</a>\r\n<a class="float-right '+l(a(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.svgContainer:i,t))+" "+l(a(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.actionSvg:i,t))+' text-muted edit">'+(null!=(i=a(null!=(i=null!=t?t.options:t)?i.editSvg:i,t))?i:"")+"</a>\r\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){e.propertyIsEnumerable;var i,a,l=e.lambda,s=e.escapeExpression,c=null!=t?t:e.nullContext||{},u=e.hooks.helperMissing;return'<span class="d-inline-block align-middle mr-2 icon-blue '+s(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.svgContainer:i,t))+'">'+(null!=(i=l(null!=(i=null!=t?t.options:t)?i.linkSvg:i,t))?i:"")+'</span>\r\n<a href="'+s("function"==typeof(a=null!=(a=n.url||(null!=t?t.url:t))?a:u)?a.call(c,{name:"url",hash:{},data:o}):a)+'" target="_blank" class="align-middle">\r\n '+s("function"==typeof(a=null!=(a=n.name||(null!=t?t.name:t))?a:u)?a.call(c,{name:"name",hash:{},data:o}):a)+"\r\n</a>\r\n"+(null!=(i=n.if.call(c,null!=(i=null!=t?t.options:t)?i.editable:i,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o}))?i:"")},useData:!0})},1155:function(e,t,n){e.exports={container:"_3Qewt",svgContainer:"_3T40U",actionSvg:"_3FRzz"}},1156:function(e,t,n){var r=n(10);e.exports=(r.default||r).template({1:function(e,t,n,r,o){var i;e.propertyIsEnumerable;return"<p>"+e.escapeExpression(e.lambda(null!=(i=null!=t?t.options:t)?i.emptyStateText:i,t))+"</p>"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var i;e.propertyIsEnumerable;return"<h5>"+e.escapeExpression(e.lambda(null!=(i=null!=t?t.options:t)?i.headingText:i,t))+"</h5>\r\n"+(null!=(i=n.if.call(null!=t?t:e.nullContext||{},null!=(i=null!=t?t.options:t)?i.emptyStateText:i,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o}))?i:"")+'\r\n<div class="links-region"></div>'},useData:!0})},1157:function(e,t,n){"use strict";n.d(t,"a",(function(){return x}));var r=n(1),o=n(29),i=n(2),a=n(57),l=n(16),s=n(144),c=n(0),u=n(9),f=n(1075),p=n(1050),d=n(1051),h=n(1158),y=n.n(h),m=n(1159),b=n.n(m),g=n(3);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})(e)}function w(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function k(e,t){return(k=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function O(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=C(e);if(t){var o=C(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return E(this,n)}}function E(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)}function C(e){return(C=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(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&&k(e,t)}(m,e);var t,n,i,h=O(m);function m(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,m),h.call(this,e)}return t=m,(n=[{key:"name",get:function(){return"VideoBasicInfoComponent"}},{key:"template",get:function(){return b.a}},{key:"lang",get:function(){return"shared.videoBasicInfo"}},{key:"defaults",get:function(){return{truncateDescription:!0}}},{key:"behaviors",get:function(){return[{behaviorClass:s.a,selector:".tool-tip"}]}},{key:"regions",value:function(){return{description:{el:".description-region",replaceElement:!0,partialLoading:u.h.VideoBasicInfo},series:{el:".series-region",replaceElement:!0}}}},{key:"appLinks",get:function(){return{".applink-publisher-video":{application:c.b.LIBRARY_EDITOR,action:c.a.LibraryEditor.SHOW_PUBLISHER_VIDEO,args:[this.model.get("id")]}}}},{key:"getBroadcastDate",value:function(){return this.model.get("dateBroadcast")?o(this.model.get("dateBroadcast")).format(u.l.FULL_YEAR):""}},{key:"getSeriesUrl",value:function(){if(this.options.externalSeriesLink&&this.model.series)return a.a.urlBuilder(a.a.safeUrlConcat(this.options.config.get("onlineUrl"),"series/".concat(this.model.series.id)),{loginPrompt:!1})}},{key:"renderSeries",value:function(){this.model.series&&this.model.series.get("name")&&this.showChildView("series",new p.a({model:this.model,highlight:!1,seriesUrl:this.getSeriesUrl(),styleUppercase:!1}))}},{key:"renderDescription",value:function(){if(this.model&&this.model.get("description")){var e=new f.a({model:this.model,linkify:!0,size:f.b.Large,truncate:this.options.truncateDescription,allowExpand:!0});this.showChildView("description",e)}}},{key:"getSubtitleLanguage",value:function(){var e=this;return this.model.subtitles&&this.model.get("subtitles").length?r.uniq(this.model.get("subtitles").map((function(t){var n,r=t.get("language"),o=CVLanguages.getFullEnglishName(r);return(null===(n=t.get("metadata"))||void 0===n?void 0:n.autoGenerated)?g.a.getPhrase(e.lang,"autoGenerated",{name:o}):o}))).join(", "):""}},{key:"getCitationHeading",value:function(e,t,n){return this.model.get(e)?this.model.get(e).length>1?n:t:""}},{key:"getCitationHeadings",value:function(){return{productionCompaniesText:this.getCitationHeading(u.a.ProductionCompany,"Production Company","Production Companies"),producersText:this.getCitationHeading(u.a.Producer,"Producer","Producers"),disributorsText:this.getCitationHeading(u.a.Distributor,"Distributor","Distributors"),directorsText:this.getCitationHeading(u.a.Director,"Director","Directors")}}},{key:"viewOptions",value:function(){return Object.assign({styles:y.a,ratingClass:this.model.rating&&d.h.mapRatingToClass(this.model.rating.get("value")),broadcastDate:this.getBroadcastDate(),showHeading:this.options.showHeading,subtitles:this.getSubtitleLanguage(),publisherArchiveSvg:l.a.getSvg(l.b.PublisherArchive),showPublisherVideoDetails:this.options.showPublisherVideoDetails},this.getCitationHeadings())}},{key:"onRender",value:function(){this.renderSeries(),this.renderDescription()}}])&&w(t.prototype,n),i&&w(t,i),Object.defineProperty(t,"prototype",{writable:!1}),m}(i.a.Component)},1158:function(e,t,n){e.exports={columnNames:"_1N_VT",seriesContainer:"_4pk2s",icon:"_3SoBV",citationValues:"_1nYZg"}},1159:function(e,t,n){var r=n(10);e.exports=(r.default||r).template({1:function(e,t,n,r,o){e.propertyIsEnumerable;var i,a=null!=t?t:e.nullContext||{};return'<div class="position-relative">\r\n <h5 class="d-inline-block">'+e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(a,"basicInfo",{name:"lang",hash:{},data:o}))+"</h5>\r\n"+(null!=(i=n.if.call(a,null!=(i=null!=t?t.options:t)?i.showPublisherVideoDetails:i,{name:"if",hash:{},fn:e.program(2,o,0),inverse:e.noop,data:o}))?i:"")+"</div>\r\n"},2:function(e,t,n,r,o){e.propertyIsEnumerable;var i,a=e.lambda,l=e.escapeExpression;return' <a class="float-right cursor-pointer applink-publisher-video">\r\n <span class="d-inline-block align-middle '+l(a(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.icon:i,t))+'">'+(null!=(i=a(null!=(i=null!=t?t.options:t)?i.publisherArchiveSvg:i,t))?i:"")+"</span> "+l((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"viewInPublisherArchive",{name:"lang",hash:{},data:o}))+"\r\n </a>\r\n"},4:function(e,t,n,r,o){e.propertyIsEnumerable;var i,a,l=e.escapeExpression,s=null!=t?t:e.nullContext||{},c=e.hooks.helperMissing;return' <div class="col-3 '+l(e.lambda(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.columnNames:i,t))+'">'+l((n.lang||t&&t.lang||c).call(s,"videoTitle",{name:"lang",hash:{},data:o}))+'</div>\r\n <p class="col-9">'+l("function"==typeof(a=null!=(a=n.name||(null!=t?t.name:t))?a:c)?a.call(s,{name:"name",hash:{},data:o}):a)+"</p>\r\n"},6:function(e,t,n,r,o){e.propertyIsEnumerable;var i,a=e.lambda,l=e.escapeExpression;return' <div class="col-3 '+l(a(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.columnNames:i,t))+'">'+l((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"series",{name:"lang",hash:{},data:o}))+'</div>\r\n <div class="col-9 '+l(a(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.seriesContainer:i,t))+'"><div class="series-region"></div></div>\r\n'},8:function(e,t,n,r,o){e.propertyIsEnumerable;var i,a=e.lambda,l=e.escapeExpression;return' <div class="col-3 '+l(a(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.columnNames:i,t))+'">'+l((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"rating",{name:"lang",hash:{},data:o}))+'</div>\r\n <p class="col-9"><span class="p-1 badge text-white tool-tip '+l(a(null!=(i=null!=t?t.options:t)?i.ratingClass:i,t))+" "+l(a(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.rating:i,t))+'" title="'+l(a(null!=(i=null!=t?t.rating:t)?i.name:i,t))+'">'+l(a(null!=(i=null!=t?t.rating:t)?i.code:i,t))+"</span></p>\r\n"},10:function(e,t,n,r,o){e.propertyIsEnumerable;var i,a=e.escapeExpression;return' <div class="col-3 '+a(e.lambda(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.columnNames:i,t))+'">'+a((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"description",{name:"lang",hash:{},data:o}))+'</div>\r\n <div class="col-9">\r\n <div class="description-region"></div>\r\n </div>\r\n'},12:function(e,t,n,r,o){e.propertyIsEnumerable;var i,a,l=e.escapeExpression,s=null!=t?t:e.nullContext||{},c=e.hooks.helperMissing;return' <div class="col-3 '+l(e.lambda(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.columnNames:i,t))+'">'+l((n.lang||t&&t.lang||c).call(s,"productionYear",{name:"lang",hash:{},data:o}))+'</div>\r\n <p class="col-9">'+l("function"==typeof(a=null!=(a=n.productionYear||(null!=t?t.productionYear:t))?a:c)?a.call(s,{name:"productionYear",hash:{},data:o}):a)+"</p>\r\n"},14:function(e,t,n,r,o){e.propertyIsEnumerable;var i,a=e.lambda,l=e.escapeExpression,s=null!=t?t:e.nullContext||{};return' <div class="col-3 '+l(a(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.columnNames:i,t))+'">'+l((n.lang||t&&t.lang||e.hooks.helperMissing).call(s,"producers",{name:"lang",hash:{},data:o}))+'</div>\r\n <div class="col-9 '+l(a(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.citationValues:i,t))+'">\r\n <p>\r\n'+(null!=(i=n.each.call(s,null!=t?t.producers:t,{name:"each",hash:{},fn:e.program(15,o,0),inverse:e.noop,data:o}))?i:"")+" </p>\r\n </div>\r\n"},15:function(e,t,n,r,o){var i;e.propertyIsEnumerable;return" <span>"+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:o}):i)+"</span>\r\n"},17:function(e,t,n,r,o){e.propertyIsEnumerable;var i,a=e.lambda,l=e.escapeExpression,s=null!=t?t:e.nullContext||{};return' <div class="col-3 '+l(a(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.columnNames:i,t))+'">'+l((n.lang||t&&t.lang||e.hooks.helperMissing).call(s,"directors",{name:"lang",hash:{},data:o}))+'</div>\r\n <div class="col-9 '+l(a(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.citationValues:i,t))+'">\r\n <p>\r\n'+(null!=(i=n.each.call(s,null!=t?t.directors:t,{name:"each",hash:{},fn:e.program(15,o,0),inverse:e.noop,data:o}))?i:"")+" </p>\r\n </div>\r\n"},19:function(e,t,n,r,o){e.propertyIsEnumerable;var i,a=e.lambda,l=e.escapeExpression,s=null!=t?t:e.nullContext||{};return' <div class="col-3 '+l(a(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.columnNames:i,t))+'">'+l((n.lang||t&&t.lang||e.hooks.helperMissing).call(s,"productionCompanies",{name:"lang",hash:{},data:o}))+'</div>\r\n <div class="col-9 '+l(a(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.citationValues:i,t))+'">\r\n <p>\r\n'+(null!=(i=n.each.call(s,null!=t?t.productionCompanies:t,{name:"each",hash:{},fn:e.program(15,o,0),inverse:e.noop,data:o}))?i:"")+" </p>\r\n </div>\r\n"},21:function(e,t,n,r,o){e.propertyIsEnumerable;var i,a=e.lambda,l=e.escapeExpression,s=null!=t?t:e.nullContext||{};return' <div class="col-3 '+l(a(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.columnNames:i,t))+'">'+l((n.lang||t&&t.lang||e.hooks.helperMissing).call(s,"distributors",{name:"lang",hash:{},data:o}))+'</div>\r\n <div class="col-9 '+l(a(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.citationValues:i,t))+'">\r\n <p>\r\n'+(null!=(i=n.each.call(s,null!=t?t.distributors:t,{name:"each",hash:{},fn:e.program(15,o,0),inverse:e.noop,data:o}))?i:"")+" </p>\r\n </div>\r\n"},23:function(e,t,n,r,o){var i;e.propertyIsEnumerable;return null!=(i=n.if.call(null!=t?t:e.nullContext||{},null!=t?t.channel:t,{name:"if",hash:{},fn:e.program(24,o,0),inverse:e.noop,data:o}))?i:""},24:function(e,t,n,r,o){e.propertyIsEnumerable;var i,a=e.lambda,l=e.escapeExpression;return'\r\n <div class="col-3 '+l(a(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.columnNames:i,t))+'">'+l((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"channel",{name:"lang",hash:{},data:o}))+'</div>\r\n <p class="col-9">'+l(a(null!=(i=null!=t?t.channel:t)?i.name:i,t))+"</p>\r\n "},26:function(e,t,n,r,o){e.propertyIsEnumerable;var i,a=e.lambda,l=e.escapeExpression;return' <div class="col-3 '+l(a(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.columnNames:i,t))+'">'+l((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"broadcastDate",{name:"lang",hash:{},data:o}))+'</div>\r\n <p class="col-9">'+l(a(null!=(i=null!=t?t.options:t)?i.broadcastDate:i,t))+"</p>\r\n"},28:function(e,t,n,r,o){e.propertyIsEnumerable;var i,a=e.lambda,l=e.escapeExpression;return' <div class="col-3 '+l(a(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.columnNames:i,t))+'">'+l((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"subtitles",{name:"lang",hash:{},data:o}))+'</div>\r\n <p class="col-9">'+l(a(null!=(i=null!=t?t.options:t)?i.subtitles:i,t))+"</p>\r\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){e.propertyIsEnumerable;var i,a=null!=t?t:e.nullContext||{};return(null!=(i=n.if.call(a,null!=(i=null!=t?t.options:t)?i.showHeading:i,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o}))?i:"")+'<div class="row mb-0">\r\n'+(null!=(i=n.if.call(a,null!=t?t.name:t,{name:"if",hash:{},fn:e.program(4,o,0),inverse:e.noop,data:o}))?i:"")+"\r\n"+(null!=(i=n.if.call(a,null!=(i=null!=t?t.series:t)?i.name:i,{name:"if",hash:{},fn:e.program(6,o,0),inverse:e.noop,data:o}))?i:"")+"\r\n"+(null!=(i=n.if.call(a,null!=(i=null!=t?t.rating:t)?i.code:i,{name:"if",hash:{},fn:e.program(8,o,0),inverse:e.noop,data:o}))?i:"")+"\r\n"+(null!=(i=n.if.call(a,null!=t?t.description:t,{name:"if",hash:{},fn:e.program(10,o,0),inverse:e.noop,data:o}))?i:"")+"\r\n"+(null!=(i=n.if.call(a,null!=t?t.productionYear:t,{name:"if",hash:{},fn:e.program(12,o,0),inverse:e.noop,data:o}))?i:"")+"\r\n"+(null!=(i=n.if.call(a,null!=(i=null!=t?t.producers:t)?i.length:i,{name:"if",hash:{},fn:e.program(14,o,0),inverse:e.noop,data:o}))?i:"")+"\r\n"+(null!=(i=n.if.call(a,null!=(i=null!=t?t.directors:t)?i.length:i,{name:"if",hash:{},fn:e.program(17,o,0),inverse:e.noop,data:o}))?i:"")+"\r\n"+(null!=(i=n.if.call(a,null!=(i=null!=t?t.productionCompanies:t)?i.length:i,{name:"if",hash:{},fn:e.program(19,o,0),inverse:e.noop,data:o}))?i:"")+"\r\n"+(null!=(i=n.if.call(a,null!=(i=null!=t?t.distributors:t)?i.length:i,{name:"if",hash:{},fn:e.program(21,o,0),inverse:e.noop,data:o}))?i:"")+"\r\n "+(null!=(i=n.if.call(a,null!=(i=null!=t?t.channel:t)?i.name:i,{name:"if",hash:{},fn:e.program(23,o,0),inverse:e.noop,data:o}))?i:"")+"\r\n\r\n"+(null!=(i=n.if.call(a,null!=(i=null!=t?t.options:t)?i.broadcastDate:i,{name:"if",hash:{},fn:e.program(26,o,0),inverse:e.noop,data:o}))?i:"")+"\r\n"+(null!=(i=n.if.call(a,null!=(i=null!=t?t.options:t)?i.subtitles:i,{name:"if",hash:{},fn:e.program(28,o,0),inverse:e.noop,data:o}))?i:"")+"</div>"},useData:!0})},1197:function(e,t,n){"use strict";var r=n(2),o=n(6),i=n(16),a=n(144),l=n(12),s=n(1126),c=n(200),u=n(1151),f=n.n(u),p=n(1152),d=n.n(p);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})(e)}function y(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function m(e,t){return(m=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function b(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=v(e);if(t){var o=v(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return g(this,n)}}function g(e,t){if(t&&("object"===h(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function v(e){return(v=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(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&&m(e,t)}(p,e);var t,n,r,u=b(p);function p(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,p),u.call(this,e)}return t=p,(n=[{key:"initialize",value:function(){this.bindListeners()}},{key:"name",get:function(){return"ChapterItemComponent"}},{key:"lang",get:function(){return"libraryEditor.chapterItem"}},{key:"instanceChannelName",get:function(){return"".concat(this.name).concat(this.cid)}},{key:"template",get:function(){return f.a}},{key:"className",get:function(){return"chapter ".concat(d.a.chapterItem)}},{key:"behaviors",get:function(){return[{behaviorClass:a.a,selector:".action"}]}},{key:"regions",value:function(){return{editForm:{replaceElement:!1,el:".edit-form-region"}}}},{key:"elements",get:function(){return{chapterItem:".chapter-item",editChapter:".edit-chapter",deleteChapter:".delete-chapter"}}},{key:"events",value:function(){return{"click @ui.editChapter":"onEditChapter","click @ui.deleteChapter":"onDeleteChapter","click .clickable-seek":"onClick"}}},{key:"bindListeners",value:function(){this.listenTo(this.instanceChannelName,c.LibraryEditorActions.CancelChapterEdit,this.onCancelEdit),this.listenTo(this.instanceChannelName,c.LibraryEditorActions.UpdateChapter,this.onUpdateChapter),this.listenTo(this.instanceChannelName,c.LibraryEditorActions.UpdateChapterTime,this.onUpdateChapterTime),this.listenTo(this.model,"change:showEditor",this.onShowEditorChange),this.listenTo(this.model,"change:loading",this.onLoadingChange);var e=this.model.collection.first();this.model!==e?this.listenTo(this.model.collection,"sort",this.render):this.listenTo(this.model.collection,"add remove sort",this.render)}},{key:"onClick",value:function(){var e=o.Radio.channel(this.options.channelName);this.model.get("isPhysicalChapter")?e.trigger(c.LibraryEditorActions.SeekToChapter,this.model.get("index")):e.trigger(c.LibraryEditorActions.UpdateChapterTime,this.model.get("startTime"))}},{key:"onLoadingChange",value:function(){var e=this.model.get("loading")?"disable":"enable";this.getUI("editChapter").tooltip(e),this.getUI("deleteChapter").tooltip(e),this.model.set("showEditor",!1,{silent:!0}),this.render()}},{key:"onShowEditorChange",value:function(){this.model.get("loading")||(this.model.get("showEditor")?this.showEditView():this.hideEditView())}},{key:"showEditView",value:function(){this.renderEditForm(),this.getUI("chapterItem").addClass(d.a.darkBackground)}},{key:"hideEditView",value:function(){this.model.set("showEditor",!1,{silent:!0}),this.getUI("chapterItem").removeClass(d.a.darkBackground),this.detachChildView("editForm")}},{key:"onCancelEdit",value:function(){this.hideEditView()}},{key:"onDeleteChapter",value:function(){this.model.get("loading")||o.Radio.channel(this.options.channelName).trigger(c.LibraryEditorActions.DeleteChapter,this.model)}},{key:"onUpdateChapter",value:function(e){o.Radio.channel(this.options.channelName).trigger(c.LibraryEditorActions.UpdateChapter,e),this.render()}},{key:"onUpdateChapterTime",value:function(e){o.Radio.channel(this.options.channelName).trigger(c.LibraryEditorActions.UpdateChapterTime,e)}},{key:"onEditChapter",value:function(){o.Radio.channel(this.options.channelName).trigger(c.LibraryEditorActions.ToggleEdit,this.model)}},{key:"canDelete",value:function(e){var t=this.model.collection.length;return 1===e&&1===t||!(1===e&&t>1)}},{key:"viewOptions",value:function(){var e=this.model.collection.indexOf(this.model)+1,t=l.x.trimToMinutes(l.x.secondsToHoursFormatted(this.model.get("startTime")));return Object.assign(Object.assign({},this.options),{styles:d.a,time:t,index:e,loading:this.model.get("loading"),allowDelete:this.canDelete(e),editSvg:i.a.getSvg(i.b.Edit),deleteSvg:i.a.getSvg(i.b.Delete)})}},{key:"renderEditForm",value:function(){this.showChildView("editForm",new s.a({model:this.model,editing:!0,channelName:this.instanceChannelName,duration:this.options.duration}))}},{key:"onBeforeDetach",value:function(){$(".tooltip").remove()}}])&&y(t.prototype,n),r&&y(t,r),Object.defineProperty(t,"prototype",{writable:!1}),p}(r.a.Component);function k(e){return(k="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function O(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function E(e,t){return(E=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function C(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=P(e);if(t){var o=P(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return x(this,n)}}function x(e,t){if(t&&("object"===k(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function P(e){return(P=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var j=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&E(e,t)}(i,e);var t,n,r,o=C(i);function i(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),o.call(this,e)}return t=i,(n=[{key:"initialize",value:function(){this.bindEditorListeners()}},{key:"name",get:function(){return"ChapterComponentCollection"}},{key:"className",get:function(){return"chapters"}},{key:"childView",get:function(){return w}},{key:"bindEditorListeners",value:function(){this.options.editable&&this.listenTo(this.options.channelName,c.LibraryEditorActions.ToggleEdit,this.toggleEditForm)}},{key:"toggleEditForm",value:function(e){this.collection.each((function(t){return t!==e&&t.set("showEditor",!1)})),e.set("showEditor",!e.get("showEditor"))}},{key:"childViewOptions",get:function(){return{showActions:this.options.showActions,duration:this.options.duration,channelName:this.options.channelName}}}])&&O(t.prototype,n),r&&O(t,r),Object.defineProperty(t,"prototype",{writable:!1}),i}(r.a.ComponentCollection),S=n(1153),R=n.n(S);function T(e){return(T="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function I(e,t){return(I=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function D(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=V(e);if(t){var o=V(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return L(this,n)}}function L(e,t){if(t&&("object"===T(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function V(e){return(V=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n.d(t,"a",(function(){return N}));var N=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)}(i,e);var t,n,r,o=D(i);function i(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),o.call(this,e)}return t=i,(n=[{key:"name",get:function(){return"ChaptersComponent"}},{key:"template",get:function(){return R.a}},{key:"lang",get:function(){return"libraryEditor.chapters"}},{key:"className",get:function(){return"chapters ".concat(!this.options.editable&&"py-3 border-top")}},{key:"regions",value:function(){return{chapterList:{replaceElement:!0,el:".chapter-list-region"}}}},{key:"viewOptions",value:function(){return{showHeader:this.options.showHeader}}},{key:"onRender",value:function(){this.showChildView("chapterList",new j({collection:this.collection,duration:this.options.duration,channelName:this.options.channelName,showActions:this.options.showActions,editable:this.options.editable}))}}])&&_(t.prototype,n),r&&_(t,r),Object.defineProperty(t,"prototype",{writable:!1}),i}(r.a.Component)},1199:function(e,t,n){"use strict";var r=n(2),o=n(1144),i=n.n(o),a=n(1145),l=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})(e)}function c(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 r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function f(e,t,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})(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,r=m(e);if(t){var o=m(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return y(this,n)}}function y(e,t){if(t&&("object"===s(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function m(e){return(m=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var b=function(e){p(n,e);var t=h(n);function n(){return c(this,n),t.apply(this,arguments)}return f(n,[{key:"name",get:function(){return"BreadcrumbItemComponent"}},{key:"template",get:function(){return l.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}(r.a.Component),g=function(e){p(n,e);var t=h(n);function n(){return c(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}(r.a.ComponentCollection),v=n(48),w=n(0);function k(e){return(k="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function O(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function E(e,t){return(E=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function C(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=P(e);if(t){var o=P(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return x(this,n)}}function x(e,t){if(t&&("object"===k(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function P(e){return(P=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n.d(t,"a",(function(){return j}));var j=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&E(e,t)}(l,e);var t,n,o,a=C(l);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:"initialize",value:function(){this.getBreadcrumbs()}},{key:"name",get:function(){return"BreadcrumbsComponent"}},{key:"template",get:function(){return i.a}},{key:"className",get:function(){return"d-inline-block"}},{key:"regions",value:function(){return{breadcrumbs:".breadcrumbs-region"}}},{key:"getBreadcrumbs",value:function(){this.breadcrumbCollection=new r.a.Collection;var e,t=this.options.folder;do{if(e=v.a.getParent(t.id,this.options.libraries),this.breadcrumbCollection.add(this.getBreadcrumb(t,!!e),{at:0}),!e)break;t=e}while(e);this.options.video&&this.breadcrumbCollection.add({name:this.options.video.get("name"),appLink:{application:w.b.LIBRARY_EDITOR,action:w.a.LibraryEditor.VIDEO_DETAILS,args:[this.options.video.id]}}),this.breadcrumbCollection.length&&this.breadcrumbCollection.last().set("active",!this.options.enableLastItemAppLink)}},{key:"getBreadcrumb",value:function(e,t){var n=t?w.a.LibraryEditor.FOLDER:w.a.LibraryEditor.LIBRARY;return{name:e.get("name"),appLink:{application:w.b.LIBRARY_EDITOR,action:n,args:[e.id]}}}},{key:"onRender",value:function(){var e=new g({collection:this.breadcrumbCollection});this.showChildView("breadcrumbs",e)}}])&&O(t.prototype,n),o&&O(t,o),Object.defineProperty(t,"prototype",{writable:!1}),l}(r.a.Component)},1200:function(e,t,n){"use strict";var r=n(2),o=n(6),i=n(16),a=n(4),l=n(42),s=n(12),c=n(0),u=n(1154),f=n.n(u),p=n(1155),d=n.n(p),h=n(3);function y(e){return(y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function m(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function b(e,t){return(b=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function g(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=w(e);if(t){var o=w(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return v(this,n)}}function v(e,t){if(t&&("object"===y(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function w(e){return(w=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(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&&b(e,t)}(p,e);var t,n,r,u=g(p);function p(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,p),u.call(this,e)}return t=p,(n=[{key:"name",get:function(){return"LinkItemComponent"}},{key:"template",get:function(){return f.a}},{key:"className",get:function(){return"".concat(d.a.container," rounded p-2 mb-2")}},{key:"lang",get:function(){return"libraryEditor.editLinks"}},{key:"events",value:function(){return{"click .delete":"onClickDelete","click .edit":"onClickEdit"}}},{key:"appLinks",get:function(){return{".edit":{application:c.b.LIBRARY_EDITOR,action:c.a.LibraryEditor.EDIT_LINK,args:[this.options.videoId,this.model.get("id")]}}}},{key:"onClickEdit",value:function(){var e=l.a.mergeOptions(this.options.analyticsOptions,{actionType:a.UserAction.Edit,entity:a.EntityType.Resource,workflowPhase:a.WorkflowPhase.Start}),t={id:this.model.get("id"),parentId:+this.options.videoId};l.a.logUserAction(t,e)}},{key:"onClickDelete",value:function(){var e=this;new s.d({title:h.a.getPhrase(this.lang,"removeHeading"),text:h.a.getPhrase(this.lang,"removeConfirm",{name:s.w.escapeExpression(this.model.get("name"))}),buttons:[{text:h.a.getPhrase(this.lang,"remove"),className:"btn btn-danger",success:!0},{text:h.a.getPhrase(this.lang,"cancel"),className:"btn btn-secondary",close:!0}],channelName:s.k.generateUniqueChannelName(this)}).render().done((function(){o.Radio.channel(e.options.channelName).trigger("delete:link",e.model.get("id"))}))}},{key:"viewOptions",value:function(){return{styles:d.a,editable:this.options.editable,linkSvg:i.a.getSvg(i.b.Link),editSvg:i.a.getSvg(i.b.Edit),trashSvg:i.a.getSvg(i.b.Delete)}}}])&&m(t.prototype,n),r&&m(t,r),Object.defineProperty(t,"prototype",{writable:!1}),p}(r.a.Component),O=n(1156),E=n.n(O);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})(e)}function x(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function P(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function j(e,t,n){return t&&P(e.prototype,t),n&&P(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function S(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&R(e,t)}function R(e,t){return(R=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function T(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=I(e);if(t){var o=I(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return _(this,n)}}function _(e,t){if(t&&("object"===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)}function I(e){return(I=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n.d(t,"a",(function(){return D}));var D=function(e){S(n,e);var t=T(n);function n(e){return x(this,n),t.call(this,e)}return j(n,[{key:"name",get:function(){return"VideoLinksComponent"}},{key:"template",get:function(){return E.a}},{key:"className",get:function(){return this.options.customCollection?"":"py-3 border-top"}},{key:"regions",value:function(){return{links:{el:".links-region",replaceElement:!0}}}},{key:"viewOptions",value:function(){return this.options}},{key:"onRender",value:function(){this.showChildView("links",new L({collection:this.options.customCollection||this.model.get("links"),channelName:this.options.channelName,analyticsOptions:this.options.analyticsOptions,editable:this.options.editable,videoId:this.options.videoId,headingText:this.options.headingText,emptyStateText:this.options.emptyStateText}))}}]),n}(r.a.Component),L=function(e){S(n,e);var t=T(n);function n(e){return x(this,n),t.call(this,e)}return j(n,[{key:"name",get:function(){return"LinkItemComponentCollection"}},{key:"childViewOptions",get:function(){return this.options}},{key:"childView",get:function(){return k}}]),n}(r.a.ComponentCollection)},1248:function(e,t,n){e.exports={svgContainer:"_2fUyj"}},1249:function(e,t,n){var r=n(10);e.exports=(r.default||r).template({1:function(e,t,n,r,o){e.propertyIsEnumerable;var i,a=e.lambda,l=e.escapeExpression;return' <span class="d-inline-block ml-2 '+l(a(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.svgContainer:i,t))+'" title="'+l(a(null!=(i=null!=t?t.options:t)?i.restrictionMessage:i,t))+'">'+(null!=(i=a(null!=(i=null!=t?t.options:t)?i.lockSvg:i,t))?i:"")+"</span>\r\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){e.propertyIsEnumerable;var i,a,l=null!=t?t:e.nullContext||{};return'<div class="d-inline-flex align-items-center">\r\n <h4 class="d-inline-block mb-0">'+e.escapeExpression("function"==typeof(a=null!=(a=n.name||(null!=t?t.name:t))?a:e.hooks.helperMissing)?a.call(l,{name:"name",hash:{},data:o}):a)+"</h4>\r\n"+(null!=(i=n.if.call(l,null!=(i=null!=t?t.options:t)?i.hasRestriction:i,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o}))?i:"")+'</div>\r\n<div class="video-actions-region d-inline-block"></div>'},useData:!0})},1250:function(e,t,n){var r=n(10);e.exports=(r.default||r).template({1:function(e,t,n,r,o){e.propertyIsEnumerable;var i,a=e.escapeExpression;return' <span class="badge p-1 '+a(e.lambda(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.interactive:i,t))+'">'+a((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"interactive",{name:"lang",hash:{},data:o}))+"</span>\r\n"},3:function(e,t,n,r,o){var i;e.propertyIsEnumerable;return' <div class="mt-3">\r\n <h5>'+e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"folders",{name:"lang",hash:{smartCount:null!=(i=null!=t?t.options:t)?i.folders:i},data:o}))+'</h5>\r\n <div class="folders-region"></div>\r\n </div>\r\n'},5:function(e,t,n,r,o){e.propertyIsEnumerable;return' <div class="mt-3">\r\n <h5>'+e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"tags",{name:"lang",hash:{},data:o}))+'</h5>\r\n <div class="tags-region"></div>\r\n </div>\r\n'},7:function(e,t,n,r,o){e.propertyIsEnumerable;var i,a=e.escapeExpression;return' <div class="mt-3">\r\n <h5>'+a((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"curriculumLinks",{name:"lang",hash:{},data:o}))+"</h5>\r\n <p>"+a(e.lambda(null!=(i=null!=t?t.options:t)?i.links:i,t))+"</p>\r\n </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||{};return'<div class="border-right h-100 pl-2 pr-3">\r\n <div class="video-preview-region"></div>\r\n <div class="mt-3">\r\n'+(null!=(i=n.if.call(a,null!=(i=null!=t?t.options:t)?i.interactive:i,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o}))?i:"")+" </div>\r\n\r\n"+(null!=(i=n.if.call(a,null!=(i=null!=t?t.options:t)?i.folders:i,{name:"if",hash:{},fn:e.program(3,o,0),inverse:e.noop,data:o}))?i:"")+"\r\n"+(null!=(i=n.if.call(a,null!=(i=null!=t?t.options:t)?i.tags:i,{name:"if",hash:{},fn:e.program(5,o,0),inverse:e.noop,data:o}))?i:"")+"\r\n"+(null!=(i=n.if.call(a,null!=(i=null!=t?t.options:t)?i.links:i,{name:"if",hash:{},fn:e.program(7,o,0),inverse:e.noop,data:o}))?i:"")+"</div>"},useData:!0})},1251:function(e,t,n){e.exports={interactive:"cAujD"}},1252:function(e,t,n){var r=n(10);e.exports=(r.default||r).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){e.propertyIsEnumerable;var i,a,l=e.escapeExpression;return'<div class="col-3 '+l(e.lambda(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.columnNames:i,t))+'">'+l("function"==typeof(a=null!=(a=n.name||(null!=t?t.name:t))?a:e.hooks.helperMissing)?a.call(null!=t?t:e.nullContext||{},{name:"name",hash:{},data:o}):a)+'</div>\r\n<div class="col-9">\r\n <div class="description-region"></div>\r\n</div>'},useData:!0})},1253:function(e,t,n){var r=n(10);e.exports=(r.default||r).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){return'<h5 class="mb-0">Extra Information</h5>\r\n<div class="text-muted mb-3">This information is only visible to admins and will not be searchable</div>\r\n<div class="fields-region"></div>'},useData:!0})},1254:function(e,t,n){e.exports={columnNames:"_1ZuuN"}},1255:function(e,t,n){var r=n(10);e.exports=(r.default||r).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){e.propertyIsEnumerable;var i,a=e.lambda,l=e.escapeExpression;return'<div class="d-inline-block '+l(a(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.licenseContainer:i,t))+'">\r\n <div class="'+l(a(null!=(i=null!=t?t.options:t)?i.logoClass:i,t))+'">'+l(a(null!=(i=null!=t?t.options:t)?i.labelText:i,t))+'</div>\r\n <p class="'+l(a(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.license:i,t))+' bg-white p-2 border box-shadow">\r\n '+(null!=(i=a(null!=(i=null!=t?t.options:t)?i.licenseText:i,t))?i:"")+"\r\n </p>\r\n</div>"},useData:!0})},1256:function(e,t,n){e.exports={licenseContainer:"_3xIoE",license:"_1fpgM",era:"_3S6te"}},1257:function(e,t,n){var r=n(10);e.exports=(r.default||r).template({1:function(e,t,n,r,o){return'<div class="row pl-3 pt-3 pr-3">\r\n <div class="breadcrumbs-region"></div>\r\n</div>\r\n'},3:function(e,t,n,r,o){return' <div class="fields-region"></div>\r\n'},5:function(e,t,n,r,o){return' <div class="video-chapters-region"></div>\r\n'},7:function(e,t,n,r,o){return' <div class="video-resources-region"></div>\r\n'},9:function(e,t,n,r,o){return' <div class="video-links-region"></div>\r\n'},11:function(e,t,n,r,o){return' <div class="screenright-disclaimer-region"></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||{};return(null!=(i=n.if.call(a,null!=(i=null!=t?t.options:t)?i.hasFolder:i,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o}))?i:"")+'<div class="row border-bottom">\r\n <div class="video-header-region"></div>\r\n</div>\r\n<div class="row">\r\n <div class="col-4">\r\n <div class="main-video-information-region"></div>\r\n </div>\r\n <div class="col-8">\r\n <div class="basic-video-information-region py-3 pr-2"></div>\r\n'+(null!=(i=n.if.call(a,null!=(i=null!=t?t.options:t)?i.hasFields:i,{name:"if",hash:{},fn:e.program(3,o,0),inverse:e.noop,data:o}))?i:"")+(null!=(i=n.if.call(a,null!=(i=null!=t?t.options:t)?i.hasChapters:i,{name:"if",hash:{},fn:e.program(5,o,0),inverse:e.noop,data:o}))?i:"")+(null!=(i=n.if.call(a,null!=(i=null!=t?t.options:t)?i.hasResources:i,{name:"if",hash:{},fn:e.program(7,o,0),inverse:e.noop,data:o}))?i:"")+(null!=(i=n.if.call(a,null!=(i=null!=t?t.options:t)?i.hasLinks:i,{name:"if",hash:{},fn:e.program(9,o,0),inverse:e.noop,data:o}))?i:"")+(null!=(i=n.if.call(a,null!=(i=null!=t?t.options:t)?i.showScreenrightsDisclaimer:i,{name:"if",hash:{},fn:e.program(11,o,0),inverse:e.noop,data:o}))?i:"")+" </div>\r\n</div>"},useData:!0})},1477:function(e,t,n){"use strict";n.r(t);var r,o=n(2);!function(e){e.AU="content-ap-southeast-1",e.NZ="content-ap-southeast-2",e.UK="content-eu-west-1",e.SCOT="content-eu-west-2",e.US="content-na-central-1",e.GLOBAL="content-global"}(r||(r={}));var i=n(0),a=n(1),l=n(4),s=n(16),c=n(144),u=n(12),f=n(1114),p=n(1248),d=n.n(p),h=n(1249),y=n.n(h);function m(e){return(m="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function b(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function g(e,t){return(g=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function v(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=k(e);if(t){var o=k(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return w(this,n)}}function w(e,t){if(t&&("object"===m(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function k(e){return(k=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var O=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&&g(e,t)}(p,e);var t,n,r,o=v(p);function p(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,p),o.call(this,e)}return t=p,(n=[{key:"name",get:function(){return"VideoHeaderComponent"}},{key:"template",get:function(){return y.a}},{key:"className",get:function(){return"d-flex align-items-center justify-content-between p-3 w-100"}},{key:"behaviors",get:function(){return[{behaviorClass:c.a,selector:".".concat(d.a.svgContainer)}]}},{key:"regions",value:function(){return{actions:{el:".video-actions-region",replaceElement:!1}}}},{key:"viewOptions",value:function(){return{styles:d.a,lockSvg:s.a.getSvg(s.b.Lock),hasRestriction:!a.isUndefined(this.model.get("restrictions")),restrictionMessage:u.o.getRestrictionTooltipMessage(this.model)}}},{key:"onRender",value:function(){this.showChildView("actions",new f.a({model:this.model,showActionLabels:!0,application:i.b.LIBRARY_EDITOR,customerHasLocalCache:this.options.customerHasLocalCache,customerHasExchange:this.options.customerHasExchange,collectionIdentifier:this.options.collectionIdentifier,routeToFolderOnDelete:!0,analyticsOptions:{entity:l.EntityType.Video,location:l.LocationContext.VideoDetailsHeader,descriptor:l.OperationDescriptor.Single},config:this.options.config}))}}])&&b(t.prototype,n),r&&b(t,r),Object.defineProperty(t,"prototype",{writable:!1}),p}(o.a.Component),E=n(1134),C=n(1091),x=n(1061),P=n(145),j=n(266),S=n(1076),R=n(1054),T=n(306),_=n(1250),I=n.n(_),D=n(1251),L=n.n(D);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})(e)}function N(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function B(e,t){return(B=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function A(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=U(e);if(t){var o=U(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return M(this,n)}}function M(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)}function U(e){return(U=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(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&&B(e,t)}(i,e);var t,n,r,o=A(i);function i(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),o.call(this,e)}return t=i,(n=[{key:"initialize",value:function(){this.isClickViewContent=this.model&&!u.j.canEditVideo(this.model)}},{key:"name",get:function(){return"VideoSidebarInfoComponent"}},{key:"lang",get:function(){return"libraryEditor.videoSidebarInfo"}},{key:"className",get:function(){return"py-3 h-100"}},{key:"template",get:function(){return I.a}},{key:"regions",value:function(){return{preview:{el:".video-preview-region",replaceElement:!0},folders:{el:".folders-region",replaceElement:!0},tags:{el:".tags-region",replaceElement:!0}}}},{key:"requiredResources",get:function(){return{currentUser:P.b.currentUser}}},{key:"renderVideoPreview",value:function(){this.showChildView("preview",new C.a({model:this.model,webPlayerUrl:this.options.webPlayerUrl,channelName:this.options.channelName,analyticsOptions:{location:l.LocationContext.VideoDetails},currentUser:this.options.currentUser}))}},{key:"renderTags",value:function(){this.model.get("tags")&&this.model.get("tags").length&&this.showChildView("tags",new S.a({collection:this.model.get("tags"),orientation:T.c.Flex,behavior:T.b.Link}))}},{key:"renderFolders",value:function(){this.model.get("categories")&&this.model.get("categories").length&&this.showChildView("folders",new x.a({model:this.model,showFolder:!0,hideLabel:!0}))}},{key:"viewOptions",value:function(){return{styles:L.a,interactive:R.a.isInteractive(this.model),duration:u.e.ToDisplayDuration(this.model.get("duration")),folders:this.model.categories&&this.model.categories.length,multipleFolders:this.model.categories.length>1,tags:this.model.get("tags")&&this.model.get("tags").length,isClickViewContent:this.isClickViewContent,hasCustomerTags:this.isClickViewContent&&u.j.filterObjectsByOwnerType(this.model.tags,j.a.Customer,this.options.currentUser.get("customerId")).length}}},{key:"onRender",value:function(){this.renderVideoPreview(),this.renderTags(),this.renderFolders()}}])&&N(t.prototype,n),r&&N(t,r),Object.defineProperty(t,"prototype",{writable:!1}),i}(o.a.Component),H=n(1197),Y=n(1200),z=n(1157),Z=n(1199),W=n(1075),q=n(1252),J=n.n(q),K=n(1253),G=n.n(K),Q=n(1254),$=n.n(Q);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})(e)}function ee(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function te(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ne(e,t,n){return t&&te(e.prototype,t),n&&te(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function re(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)}function oe(e,t){return(oe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function ie(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=le(e);if(t){var o=le(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return ae(this,n)}}function ae(e,t){if(t&&("object"===X(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function le(e){return(le=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var se=function(e){re(n,e);var t=ie(n);function n(){return ee(this,n),t.apply(this,arguments)}return ne(n,[{key:"name",get:function(){return"FieldComponent"}},{key:"template",get:function(){return J.a}},{key:"className",get:function(){return"row mb-0"}},{key:"regions",value:function(){return{description:{el:".description-region",replaceElement:!0}}}},{key:"viewOptions",value:function(){return{styles:$.a}}},{key:"renderDescription",value:function(){this.model.get("value")&&this.showChildView("description",new W.a({model:new o.a.Model({description:this.model.get("value")}),linkify:!0,size:W.b.Large,truncate:!0,allowExpand:!0}))}},{key:"onRender",value:function(){this.renderDescription()}}]),n}(o.a.Component),ce=function(e){re(n,e);var t=ie(n);function n(){return ee(this,n),t.apply(this,arguments)}return ne(n,[{key:"name",get:function(){return"FieldsComponentCollection"}},{key:"childView",get:function(){return se}}]),n}(o.a.ComponentCollection),ue=function(e){re(n,e);var t=ie(n);function n(){return ee(this,n),t.apply(this,arguments)}return ne(n,[{key:"name",get:function(){return"FieldsComponent"}},{key:"template",get:function(){return G.a}},{key:"className",get:function(){return"py-3 border-top"}},{key:"regions",value:function(){return{fields:{el:".fields-region",replaceElement:!0}}}},{key:"onRender",value:function(){this.showChildView("fields",new ce({collection:this.collection}))}}]),n}(o.a.Component),fe=n(32),pe=n(5),de=n(14),he=n(201),ye=n(9),me=n(316),be=n(121),ge=n(315),ve=n(147),we=n(1101),ke=n(3),Oe=n(1255),Ee=n.n(Oe),Ce=n(1256),xe=n.n(Ce);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})(e)}function je(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Se(e,t){return(Se=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Re(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=_e(e);if(t){var o=_e(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Te(this,n)}}function Te(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)}function _e(e){return(_e=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(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&&Se(e,t)}(a,e);var t,n,o,i=Re(a);function a(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),i.call(this,e)}return t=a,(n=[{key:"name",get:function(){return"ScreenrightsDisclaimerComponent"}},{key:"template",get:function(){return Ee.a}},{key:"lang",get:function(){return"shared.screenrightsDisclaimer"}},{key:"className",get:function(){return"py-3 border-top"}},{key:"getLogoClass",value:function(){return u.n.isInContentRegion(this.options.contentRegion,r.UK)?xe.a.era:""}},{key:"getLicenseText",value:function(){switch(this.options.contentRegion){case r.UK:return ke.a.getPhrase(this.lang,"era");case r.AU:return ke.a.getPhrase(this.lang,"copyrightAct");case r.NZ:default:return""}}},{key:"viewOptions",value:function(){var e=u.n.isInContentRegion(this.options.contentRegion,r.AU);return{styles:xe.a,logoClass:this.getLogoClass(),labelText:e?ke.a.getPhrase(this.lang,"labelAu"):"",licenseText:this.getLicenseText()}}}])&&je(t.prototype,n),o&&je(t,o),Object.defineProperty(t,"prototype",{writable:!1}),a}(o.a.Component),De=n(1257),Le=n.n(De);function Ve(e){return(Ve="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ne(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Be(e,t){return(Be=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Ae(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Ue(e);if(t){var o=Ue(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Me(this,n)}}function Me(e,t){if(t&&("object"===Ve(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Ue(e){return(Ue=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n.d(t,"VideoDetailsView",(function(){return Fe}));var Fe=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&&Be(e,t)}(s,e);var t,n,a,l=Ae(s);function s(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),l.call(this,e)}return t=s,(n=[{key:"initialize",value:function(){this.bindListeners(),this.videoDataService=pe.a.getInstance(de.a.Video,this),this.videoMixinService=pe.a.getInstance(de.b.VideoMixin,this),this.localCacheDataService=pe.a.getInstance(de.a.LocalCache,this),this.migrationVideoDataService=pe.a.getInstance(de.a.MigrationVideo,this)}},{key:"bindListeners",value:function(){this.listenTo(i.e.VIDEO,"".concat(fe.a.VIDEOS,":").concat(this.options.videoId,":sync"),this.render),this.listenTo(i.e.VIDEO,"".concat(fe.a.VIDEOS,":").concat(this.options.videoId,":error"),this.onError),this.listenTo(i.e.VIDEO,"".concat(fe.a.RESTRICTED_OBJECTS,":").concat(this.options.videoId,":sync"),this.render),this.listenTo(i.e.VIDEO,"cache:cleared",this.render),this.listenTo(i.e.LIBRARY,"libraries:sync",this.render),this.listenTo(i.e.RESTRICTED_VIDEO,"".concat(fe.a.UPDATE_VIDEO_RESTRICTION,":sync"),this.updateRestriction),this.listenTo(i.e.RESTRICTED_VIDEO,"".concat(fe.a.RESTRICTED_OBJECTS,":").concat(this.options.videoId,":sync"),this.render),this.listenTo(i.e.LOCAL_CACHE,"".concat(fe.a.LOCAL_CACHE_DEVICES,":sync"),this.render),this.listenTo(i.e.LOCAL_CACHE,"".concat(fe.a.LOCAL_CACHE_DEVICES,":error"),this.onError)}},{key:"name",get:function(){return"VideoDetailsView"}},{key:"title",get:function(){return this.video&&this.video.get("name")}},{key:"channelName",get:function(){return"".concat(this.name).concat(this.cid)}},{key:"template",get:function(){return Le.a}},{key:"className",get:function(){return"container-fluid h-100 bg-white"}},{key:"onError",value:function(e){switch(e.type){case be.a.NotFound:o.a.ErrorHelper.throw(new me.a);break;case be.a.Forbidden:o.a.ErrorHelper.throw(new ge.a)}}},{key:"regions",value:function(){return{breadcrumbs:{el:".breadcrumbs-region",replaceElement:!1},header:{replaceElement:!0,el:".video-header-region",partialLoading:ye.h.VideoHeader},main:{replaceElement:!0,el:".main-video-information-region",partialLoading:ye.h.VideoSidebarInfo},basic:{replaceElement:!1,el:".basic-video-information-region",partialLoading:ye.h.VideoBasicInfo},chapters:{replaceElement:!0,el:".video-chapters-region"},resources:{replaceElement:!0,el:".video-resources-region"},fields:{replaceElement:!0,el:".fields-region"},links:{replaceElement:!0,el:".video-links-region"},screenrightsDisclaimer:{replaceElement:!0,el:".screenright-disclaimer-region"}}}},{key:"updateRestriction",value:function(){this.videoMixinService.getAndMixinVideoRestriction(this.video)}},{key:"showLicense",value:function(){return!(!this.video||u.n.isInContentRegion(this.currentUser.get("contentRegion"),r.NZ)||(!this.video.get("channel")||!this.video.get("channel").get("id"))&&!this.video.get("dateBroadcast"))}},{key:"renderBreadcrumbs",value:function(){this.folder&&this.showChildView("breadcrumbs",new Z.a({folder:this.folder,libraries:this.libraries,enableLastItemAppLink:!0}))}},{key:"renderVideoHeader",value:function(){this.showChildView("header",new O({model:this.video,customerHasLocalCache:u.i.customerHasLocalCache(this.devices,this.currentUser.get("customerId")),customerHasExchange:this.exchanges.any(),collectionIdentifier:this.folder&&new we.d(this.folder.id,u.q.GetCurrentSortType()),config:this.config}))}},{key:"renderSidebarInfo",value:function(){this.showChildView("main",new F({model:this.video,webPlayerUrl:this.config.get("webPlayerUrl"),channelName:this.channelName,currentUser:this.currentUser}))}},{key:"renderBasicInfo",value:function(){this.video&&this.showChildView("basic",new z.a({model:this.video,showHeading:!0,showPublisherVideoDetails:!!this.publisherVideo,config:this.config}))}},{key:"renderFields",value:function(){this.video.fields&&this.video.fields.length&&this.showChildView("fields",new ue({collection:this.video.fields}))}},{key:"renderChapters",value:function(){var e=this.video.chapters;e&&e.length>0&&this.showChildView("chapters",new H.a({channelName:this.channelName,collection:this.video.chapters}))}},{key:"renderResources",value:function(){var e=this.video.resources;e&&e.length>0&&this.showChildView("resources",new E.a({model:this.video}))}},{key:"renderLinks",value:function(){var e=this.video.links;e&&e.length&&this.showChildView("links",new Y.a({model:this.video,headingText:"Links"}))}},{key:"renderScreenrightsDisclaimer",value:function(){this.showLicense()&&this.showChildView("screenrightsDisclaimer",new Ie({contentRegion:this.currentUser.get("contentRegion")}))}},{key:"requiredResources",get:function(){return{config:he.b.config,currentUser:P.b.currentUser,libraries:ve.b.libraries,exchanges:ve.b.exchanges}}},{key:"onBeforeRender",value:function(){var e=this;return this.video=this.videoDataService.getVideo(this.options.videoId),this.video&&(this.folder=this.video.categories.first()),this.devices=this.localCacheDataService.getDevices(this.currentUser.get("customerId")),this.migrationVideoDataService.getCustomerVideoByMasterId(this.options.videoId,(function(t){var n=!!e.publisherVideo;e.publisherVideo=t,n&&e.isRendered()&&e.renderBasicInfo()})),!!this.video}},{key:"viewOptions",value:function(){if(this.video){var e=this.video,t=e.chapters,n=e.resources,r=e.fields,o=e.links;return{hasFolder:!!this.folder,hasChapters:t&&t.length,hasResources:n&&n.length,hasFields:r&&r.length,hasLinks:o&&o.length,showScreenrightsDisclaimer:this.showLicense()}}}},{key:"onRender",value:function(){this.renderBreadcrumbs(),this.renderVideoHeader(),this.renderSidebarInfo(),this.renderBasicInfo(),this.renderFields(),this.renderChapters(),this.renderResources(),this.renderLinks(),this.renderScreenrightsDisclaimer()}}])&&Ne(t.prototype,n),a&&Ne(t,a),Object.defineProperty(t,"prototype",{writable:!1}),s}(o.a.View)}}]);
@@ -0,0 +1 @@
1
+ (window.webpackJsonp_clickview_library_editor=window.webpackJsonp_clickview_library_editor||[]).push([[28],{1076:function(e,t,n){"use strict";var o=n(2),i=n(19),r=n(6),a=n(0),s=n(306),l=n(1142),c=n.n(l),u=n(1143),d=n.n(u);function f(e){return(f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function h(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function p(e,t){return(p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function v(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=b(e);if(t){var i=b(this).constructor;n=Reflect.construct(o,arguments,i)}else n=o.apply(this,arguments);return y(this,n)}}function y(e,t){if(t&&("object"===f(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function b(e){return(b=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var m=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&p(e,t)}(l,e);var t,n,o,i=v(l);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"TagItemComponent"}},{key:"tagName",get:function(){return this.options.behavior===s.b.Link?"a":"span"}},{key:"className",get:function(){var e="".concat(this.options.orientation===s.c.Vertical?"":" d-inline-flex"),t="".concat(this.isSaving()?" saving":""),n="".concat(this.options.behavior===s.b.Disabled?" ".concat(d.a.disabled):""),o="".concat(this.options.behavior===s.b.Filter?" cursor-pointer":"");return"badge-pill tag py-1 px-2 my-1 mr-1".concat(o).concat(e).concat(t).concat(n)}},{key:"template",get:function(){return c.a}},{key:"elements",get:function(){return{close:".close"}}},{key:"appLinks",get:function(){return this.options.behavior!==s.b.Link?{}:{"[this]":{application:a.b.SEARCH,action:a.a.Search.HOME,params:{tag:this.model.get("name")}}}}},{key:"defaults",get:function(){return{behavior:s.b.Link,orientation:s.c.Flex}}},{key:"events",value:function(){return this.options.removeEvent?{"click @ui.close":"onRemoveTag"}:{click:"onClickTag"}}},{key:"initialize",value:function(){this.options.behavior===s.b.Edit&&this.listenTo(this.model,"change",this.render)}},{key:"isSaving",value:function(){if(this.options.behavior!==s.b.Filter){var e=this.model.pick("id","name","remove"),t=e.id,n=e.name;return!!e.remove||!t||!n}}},{key:"onRemoveTag",value:function(e){if(e.stopPropagation(),!this.isSaving())return this.model.set("remove",!0),r.Radio.channel(this.options.channelName).trigger(this.options.removeEvent,this.model),!1}},{key:"onClickTag",value:function(){this.options.behavior!==s.b.Filter||this.options.removeEvent||r.Radio.channel(this.options.channelName).trigger(this.options.clickEvent,this.model)}},{key:"viewOptions",value:function(){return{removable:this.options.removeEvent}}},{key:"onRender",value:function(){this.resetClassName()}}])&&h(t.prototype,n),o&&h(t,o),Object.defineProperty(t,"prototype",{writable:!1}),l}(o.a.Component);function g(e){return(g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function w(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,o.key,o)}}function k(e,t){return(k=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function S(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=E(e);if(t){var i=E(this).constructor;n=Reflect.construct(o,arguments,i)}else n=o.apply(this,arguments);return O(this,n)}}function O(e,t){if(t&&("object"===g(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function E(e){return(E=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n.d(t,"a",(function(){return T}));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&&k(e,t)}(l,e);var t,n,r,a=S(l);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:"initialize",value:function(){this.options.behavior!==s.b.Edit||this.options.removeEvent||o.a.ErrorHelper.throw(new i.a("removeEvent is required to edit tags."))}},{key:"name",get:function(){return"TagComponentCollection"}},{key:"defaults",get:function(){return{orientation:s.c.Flex}}},{key:"className",get:function(){var e="".concat(this.options.orientation===s.c.Vertical?" d-flex align-items-start flex-column":"");return"tags".concat(e)}},{key:"childViewOptions",get:function(){return{channelName:this.options.channelName,behavior:this.options.behavior,orientation:this.options.orientation,removeEvent:this.options.removeEvent,clickEvent:this.options.clickEvent}}},{key:"childView",get:function(){return m}}])&&w(t.prototype,n),r&&w(t,r),Object.defineProperty(t,"prototype",{writable:!1}),l}(o.a.ComponentCollection)},1098:function(e,t,n){"use strict";n.d(t,"a",(function(){return v}));var o=n(1),i=n(2),r=n(1099),a=n.n(r),s=n(1100),l=n.n(s);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})(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,o.key,o)}}function d(e,t){return(d=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function f(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=p(e);if(t){var i=p(this).constructor;n=Reflect.construct(o,arguments,i)}else n=o.apply(this,arguments);return h(this,n)}}function h(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)}function p(e){return(p=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var v=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&d(e,t)}(s,e);var t,n,i,r=f(s);function s(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),r.call(this,e)}return t=s,(n=[{key:"name",get:function(){return"TabsView"}},{key:"className",get:function(){var e="bg-white py-2 border-bottom";return this.options.className&&(e+=" ".concat(this.options.className)),e}},{key:"template",get:function(){return l.a}},{key:"appLinks",get:function(){var e={};return this.options.tabs.forEach((function(t){return e[t.link.selector]=t.link.appLink})),e}},{key:"viewOptions",value:function(){var e=this.options.tabs.map((function(e){return Object.assign(Object.assign({},e),{link:e.link.selector.replace(".","")})}));return{styles:a.a,tabs:e}}},{key:"setActiveTab",value:function(){var e=this,t=!1;if(this.options.tabs.forEach((function(n){n.active=!1,n.link.selector===e.options.activeTab&&(n.active=!0,t=!0)})),!t){var n=o.first(this.options.tabs);n&&(n.active=!0)}}},{key:"onBeforeRender",value:function(){this.setActiveTab()}}])&&u(t.prototype,n),i&&u(t,i),Object.defineProperty(t,"prototype",{writable:!1}),s}(i.a.Component)},1099:function(e,t,n){e.exports={link:"_5idZs",active:"_3Ty4M"}},1100:function(e,t,n){var o=n(10);e.exports=(o.default||o).template({1:function(e,t,n,o,i,r,a){var s;e.propertyIsEnumerable;return null!=(s=n.unless.call(null!=t?t:e.nullContext||{},null!=t?t.hide:t,{name:"unless",hash:{},fn:e.program(2,i,0,r,a),inverse:e.noop,data:i}))?s:""},2:function(e,t,n,o,i,r,a){e.propertyIsEnumerable;var s,l=e.lambda,c=e.escapeExpression;return' <a class="'+c(l(null!=(s=null!=(s=null!=a[1]?a[1].options:a[1])?s.styles:s)?s.link:s,t))+" p-2 "+c(l(null!=t?t.link:t,t))+" "+(null!=(s=n.if.call(null!=t?t:e.nullContext||{},null!=t?t.active:t,{name:"if",hash:{},fn:e.program(3,i,0,r,a),inverse:e.noop,data:i}))?s:"")+'">'+c(l(null!=t?t.name:t,t))+"</a>\r\n"},3:function(e,t,n,o,i,r,a){var s;e.propertyIsEnumerable;return e.escapeExpression(e.lambda(null!=(s=null!=(s=null!=a[1]?a[1].options:a[1])?s.styles:s)?s.active:s,t))+" border-bottom border-primary text-primary"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i,r,a){var s;e.propertyIsEnumerable;return null!=(s=n.each.call(null!=t?t:e.nullContext||{},null!=(s=null!=t?t.options:t)?s.tabs:s,{name:"each",hash:{},fn:e.program(1,i,0,r,a),inverse:e.noop,data:i}))?s:""},useData:!0,useDepths:!0})},1118:function(e,t,n){"use strict";n.d(t,"a",(function(){return m}));var o=n(6),i=n(2),r=n(16),a=n(1119),s=n.n(a),l=n(1120),c=n.n(l),u=n(0),d=n(1098);function f(e){return(f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function h(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function p(e,t){return(p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function v(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=b(e);if(t){var i=b(this).constructor;n=Reflect.construct(o,arguments,i)}else n=o.apply(this,arguments);return y(this,n)}}function y(e,t){if(t&&("object"===f(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function b(e){return(b=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var m=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&p(e,t)}(l,e);var t,n,i,a=v(l);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"EditVideoTabsComponent"}},{key:"className",get:function(){return"bg-white"}},{key:"regions",value:function(){return{tabs:{el:".tabs-region",replaceElement:!0}}}},{key:"template",get:function(){return c.a}},{key:"appLinks",get:function(){var e,t,n,o=this.options.goBackTab.link;return e={},t=o.selector,n=o.appLink,t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},{key:"viewOptions",value:function(){var e=Object.assign(Object.assign({},this.options.goBackTab),{link:this.options.goBackTab.link.selector.replace(".","")});return{styles:s.a,backTab:e,backArrow:r.a.getSvg(r.b.ArrowLeft)}}},{key:"onSave",value:function(){o.Radio.channel(u.b.LIBRARY_EDITOR).trigger(u.a.LibraryEditor.SAVE_VIDEO)}},{key:"onRender",value:function(){this.showChildView("tabs",new d.a({tabs:this.options.tabs,activeTab:this.options.activeTab}))}}])&&h(t.prototype,n),i&&h(t,i),Object.defineProperty(t,"prototype",{writable:!1}),l}(i.a.Component)},1119:function(e,t,n){e.exports={svgContainer:"_27gR6"}},1120:function(e,t,n){var o=n(10);e.exports=(o.default||o).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){e.propertyIsEnumerable;var r,a=e.lambda,s=e.escapeExpression;return'<div class="row">\r\n <h4>\r\n <a class="d-inline-flex align-items-center '+s(a(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.link:r,t))+" "+s(a(null!=(r=null!=(r=null!=t?t.options:t)?r.backTab:r)?r.link:r,t))+'">\r\n <span class="'+s(a(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.svgContainer:r,t))+' d-inline-block mx-2">'+(null!=(r=a(null!=(r=null!=t?t.options:t)?r.backArrow:r,t))?r:"")+"</span>\r\n "+s(a(null!=(r=null!=(r=null!=t?t.options:t)?r.backTab:r)?r.name:r,t))+'\r\n </a>\r\n </h4>\r\n</div>\r\n<div class="tabs-region pl-2"></div>'},useData:!0})},1142:function(e,t,n){var o=n(10);e.exports=(o.default||o).template({1:function(e,t,n,o,i){return'<span class="close cursor-pointer" aria-hidden="true">&times;</span>\r\n'},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){e.propertyIsEnumerable;var r,a,s=null!=t?t:e.nullContext||{},l=e.hooks.helperMissing,c=e.escapeExpression;return'<span class="clamp-1" title="'+c("function"==typeof(a=null!=(a=n.name||(null!=t?t.name:t))?a:l)?a.call(s,{name:"name",hash:{},data:i}):a)+'">'+c("function"==typeof(a=null!=(a=n.name||(null!=t?t.name:t))?a:l)?a.call(s,{name:"name",hash:{},data:i}):a)+"</span>\r\n"+(null!=(r=n.if.call(s,null!=(r=null!=t?t.options:t)?r.removable:r,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?r:"")},useData:!0})},1143:function(e,t,n){e.exports={disabled:"_3Vziu"}},1284:function(e,t,n){var o=n(10);e.exports=(o.default||o).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){var r;e.propertyIsEnumerable;return'<div class="form-group">\r\n <label for="edit-description">'+e.escapeExpression("function"==typeof(r=null!=(r=n.name||(null!=t?t.name:t))?r:e.hooks.helperMissing)?r.call(null!=t?t:e.nullContext||{},{name:"name",hash:{},data:i}):r)+'</label>\r\n <div class="text-area-region"></div>\r\n <div class="form-feedback"></div>\r\n</div>'},useData:!0})},1285:function(e,t,n){var o=n(10);e.exports=(o.default||o).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){return'<h5 class="mb-0">Extra Information</h5>\r\n<div class="text-muted mb-3">This information is only visible to admins and will not be searchable</div>\r\n<div class="fields-region"></div>'},useData:!0})},1286:function(e,t,n){var o=n(10);e.exports=(o.default||o).template({1:function(e,t,n,o,i){var r;e.propertyIsEnumerable;return"<h5>"+e.escapeExpression(e.lambda(null!=(r=null!=t?t.options:t)?r.headerText:r,t))+"</h5>\r\n"},3:function(e,t,n,o,i){var r;e.propertyIsEnumerable;return"<p>"+e.escapeExpression(e.lambda(null!=(r=null!=t?t.options:t)?r.emptyStateText:r,t))+"</p>\r\n"},5:function(e,t,n,o,i){return'<div class="tag-selector-region"></div>\r\n'},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){e.propertyIsEnumerable;var r,a=null!=t?t:e.nullContext||{};return(null!=(r=n.if.call(a,null!=(r=null!=t?t.options:t)?r.headerText:r,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?r:"")+(null!=(r=n.if.call(a,null!=(r=null!=t?t.options:t)?r.emptyStateText:r,{name:"if",hash:{},fn:e.program(3,i,0),inverse:e.noop,data:i}))?r:"")+(null!=(r=n.if.call(a,null!=(r=null!=t?t.options:t)?r.editable:r,{name:"if",hash:{},fn:e.program(5,i,0),inverse:e.noop,data:i}))?r:"")+'<div class="tag-list-region"></div>'},useData:!0})},1287:function(e,t,n){var o=n(10);e.exports=(o.default||o).template({1:function(e,t,n,o,i){e.propertyIsEnumerable;var r,a=e.escapeExpression;return'<span class="text-muted mx-2 undo '+a(e.lambda(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.undo:r,t))+'">'+a((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"undo",{name:"lang",hash:{},data:i}))+"</span>\r\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){var r;e.propertyIsEnumerable;return(null!=(r=n.if.call(null!=t?t:e.nullContext||{},null!=(r=null!=t?t.options:t)?r.allowUndo:r,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?r:"")+'<div class="save-region"></div>'},useData:!0})},1288:function(e,t,n){e.exports={saveButton:"_2FsA6",undo:"v6msX"}},1289:function(e,t,n){var o=n(10);e.exports=(o.default||o).template({1:function(e,t,n,o,i){e.propertyIsEnumerable;return"<h5>"+e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"label",{name:"lang",hash:{},data:i}))+"</h5>\r\n"},3:function(e,t,n,o,i){return"my-2"},5:function(e,t,n,o,i){e.propertyIsEnumerable;var r,a=null!=t?t:e.nullContext||{},s=e.hooks.helperMissing,l=e.escapeExpression;return' <div class="text-muted mt-3 mb-1"><em>'+l((n.lang||t&&t.lang||s).call(a,"recommendedSize",{name:"lang",hash:{height:null!=(r=null!=(r=null!=t?t.options:t)?r.dimensions:r)?r.height:r,width:null!=(r=null!=(r=null!=t?t.options:t)?r.dimensions:r)?r.width:r},data:i}))+'</em></div>\r\n <button class="upload-thumbnail btn btn-light mb-3 w-100">'+l((n.lang||t&&t.lang||s).call(a,"upload",{name:"lang",hash:{},data:i}))+"</button>\r\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){e.propertyIsEnumerable;var r,a=null!=t?t:e.nullContext||{};return(null!=(r=n.if.call(a,null!=(r=null!=t?t.options:t)?r.editable:r,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?r:"")+'<div class="thumbnail-region"></div>\r\n<div class="'+(null!=(r=n.unless.call(a,null!=(r=null!=t?t.options:t)?r.editable:r,{name:"unless",hash:{},fn:e.program(3,i,0),inverse:e.noop,data:i}))?r:"")+'">\r\n'+(null!=(r=n.if.call(a,null!=(r=null!=t?t.options:t)?r.editable:r,{name:"if",hash:{},fn:e.program(5,i,0),inverse:e.noop,data:i}))?r:"")+"</div>"},useData:!0})},1290:function(e,t,n){var o=n(10);e.exports=(o.default||o).template({1:function(e,t,n,o,i){return"mb-4"},3:function(e,t,n,o,i){var r;e.propertyIsEnumerable;return' <p class="mb-2 py-1 px-2 alert alert-info '+e.escapeExpression(e.lambda(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.suggestEdit:r,t))+'">\r\n'+(null!=(r=n.if.call(null!=t?t:e.nullContext||{},null!=(r=null!=t?t.options:t)?r.isExchange:r,{name:"if",hash:{},fn:e.program(4,i,0),inverse:e.program(6,i,0),data:i}))?r:"")+" </p>\r\n"},4:function(e,t,n,o,i){var r;e.propertyIsEnumerable;return" "+(null!=(r=(n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"suggestEditExchange",{name:"lang",hash:{classNames:null!=(r=null!=t?t.options:t)?r.suggestEditClasses:r},data:i}))?r:"")+"\r\n"},6:function(e,t,n,o,i){var r;e.propertyIsEnumerable;return" "+(null!=(r=(n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"suggestEdit",{name:"lang",hash:{classNames:null!=(r=null!=t?t.options:t)?r.suggestEditClasses:r},data:i}))?r:"")+"\r\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){e.propertyIsEnumerable;var r,a=null!=t?t:e.nullContext||{};return'<div class="row">\r\n <div class="left-pane col-4">\r\n <div class="thumbnail-region"></div>\r\n <div class="cv-tags-region '+(null!=(r=n.unless.call(a,null!=(r=null!=t?t.options:t)?r.editable:r,{name:"unless",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?r:"")+'"></div>\r\n <div class="customer-tags-region"></div>\r\n </div>\r\n <div class="right-pane col-8">\r\n'+(null!=(r=n.unless.call(a,null!=(r=null!=t?t.options:t)?r.editable:r,{name:"unless",hash:{},fn:e.program(3,i,0),inverse:e.noop,data:i}))?r:"")+' <div class="top-save-region"></div>\r\n <div class="basic-info-region mb-4"></div> \r\n <div class="additional-details-region mb-4"></div> \r\n <div class="production-info-region mb-4"></div> \r\n <div class="fields-region mb-4"></div>\r\n <div class="bottom-save-region"></div>\r\n </div>\r\n</div>'},useData:!0})},1291:function(e,t,n){e.exports={suggestEdit:"_1X4l5"}},1292:function(e,t,n){var o=n(10);e.exports=(o.default||o).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){return'<div class="tab-region"></div>\r\n<div class="edit-content-region"></div>\r\n<div class="dialog-region"></div>'},useData:!0})},1476:function(e,t,n){"use strict";n.r(t);var o=n(1),i=n(6),r=n(2),a=n(19),s=n(30),l=n(3),c=n(15),u=n(5),d=n(121),f=n(0),h=n(320),p=n(145),v=n(12),y=n(103),b=n(237),m=n(318),g=n(9),w=n(4),k=n(42),S=n(200),O=n(147),E=n(1052),T=n(1205),C=n(1210),P=n(1208),j=n(1207),R=n(1284),x=n.n(R);function N(e){return(N="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function D(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function _(e,t){return(_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function M(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=I(e);if(t){var i=I(this).constructor;n=Reflect.construct(o,arguments,i)}else n=o.apply(this,arguments);return V(this,n)}}function V(e,t){if(t&&("object"===N(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function I(e){return(I=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var L=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&_(e,t)}(a,e);var t,n,o,r=M(a);function a(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),r.call(this,e)}return t=a,(n=[{key:"initialize",value:function(){var e=this;this.listenTo(this.model,"change",(function(){return e.options.viewModel.validate()}))}},{key:"template",get:function(){return x.a}},{key:"name",get:function(){return"ExtraInfoItemComponent"}},{key:"regions",value:function(){return{textArea:{el:".text-area-region",replaceElement:!0}}}},{key:"bindings",get:function(){return{"[name=value]":{observe:"value",setOptions:{validate:!0}}}}},{key:"onRender",value:function(){this.showChildView("textArea",new j.a({name:"value",class:"form-control",placeholder:this.model.get("placeholder"),id:"admin-notes"})),this.stickit(),i.Validation.bind(this)}},{key:"onDestroy",value:function(){this.unstickit(),i.Validation.unbind(this)}}])&&D(t.prototype,n),o&&D(t,o),Object.defineProperty(t,"prototype",{writable:!1}),a}(r.a.Component),B=n(1285),A=n.n(B);function U(e){return(U="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function F(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function J(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function z(e,t,n){return t&&J(e.prototype,t),n&&J(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function H(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&G(e,t)}function G(e,t){return(G=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Y(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=q(e);if(t){var i=q(this).constructor;n=Reflect.construct(o,arguments,i)}else n=o.apply(this,arguments);return W(this,n)}}function W(e,t){if(t&&("object"===U(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function q(e){return(q=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var X=function(e){H(n,e);var t=Y(n);function n(e){return F(this,n),t.call(this,e)}return z(n,[{key:"name",get:function(){return"ExtraInfoComponentCollection"}},{key:"childView",get:function(){return L}},{key:"childViewOptions",get:function(){return{viewModel:this.options.viewModel}}}]),n}(r.a.ComponentCollection),K=function(e){H(n,e);var t=Y(n);function n(e){return F(this,n),t.call(this,e)}return z(n,[{key:"name",get:function(){return"ExtraInfoComponent"}},{key:"template",get:function(){return A.a}},{key:"className",get:function(){return"border-top pt-3"}},{key:"regions",value:function(){return{fields:{el:".fields-region",replaceElement:!0}}}},{key:"onRender",value:function(){this.showChildView("fields",new X({collection:this.model.fields,viewModel:this.model}))}}]),n}(r.a.Component),Z=n(266),Q=n(99),$=n(314),ee=n(1112),te=n(1076),ne=n(306),oe=n(1286),ie=n.n(oe);function re(e){return(re="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ae(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,o.key,o)}}function se(e,t){return(se=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function le(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=ue(e);if(t){var i=ue(this).constructor;n=Reflect.construct(o,arguments,i)}else n=o.apply(this,arguments);return ce(this,n)}}function ce(e,t){if(t&&("object"===re(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function ue(e){return(ue=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var de=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)}(s,e);var t,n,o,i=le(s);function s(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),i.call(this,e)}return t=s,(n=[{key:"name",get:function(){return"TagsComponent"}},{key:"template",get:function(){return ie.a}},{key:"lang",get:function(){return"libraryEditor.tags"}},{key:"defaults",get:function(){return{headerText:l.a.getPhrase(this.lang,"heading"),orientation:ne.c.Flex}}},{key:"regions",value:function(){return{tagList:{el:".tag-list-region",replaceElement:!0},tagSelector:{el:".tag-selector-region",replaceElement:!0}}}},{key:"initialize",value:function(){this.options.behavior!==ne.b.Edit||this.options.parentId||r.a.ErrorHelper.throw(new a.a("parentId is required to edit tags."))}},{key:"getTypeaheadConfigs",value:function(){var e=$.a.getTypeaheadConfig(),t=$.a.getBloodhoundConfig(),n={newType:f.v.TagsRaw},o={newType:f.v.TagsRaw,footerTemplate:Q.a.getConfirmSelectionTemplate()};return[{name:f.v.TagsRaw,typeaheadConfig:e,bloodhoundConfig:t,options:{hideEmptyResults:!0}},{name:"add-new",typeaheadConfig:e,bloodhoundConfig:t,options:n},{name:"empty-suggestion",typeaheadConfig:e,bloodhoundConfig:t,options:o}]}},{key:"viewOptions",value:function(){var e;return this.showEmptyStateText()&&(e=this.options.emptyStateText),{headerText:this.options.headerText,editable:this.options.behavior===ne.b.Edit,emptyStateText:e}}},{key:"showEmptyStateText",value:function(){return this.options.behavior!==ne.b.Edit&&!this.collection.length&&!!this.options.emptyStateText}},{key:"renderTagSelector",value:function(){this.options.behavior===ne.b.Edit&&this.showChildView("tagSelector",new ee.a({model:this.model,parentChannelName:this.options.channelName,inputId:"tag-select",selectEvent:"add:tag",typeaheadConfigs:this.getTypeaheadConfigs(),placeholderText:l.a.getPhrase(this.lang,"placeholder"),callbacks:{onRender:Q.a.selectFirstResult,onBlur:Q.a.clearInputOnBlur},typeaheadOptions:{hint:!1},actionOptions:{clearOnSelect:!0},autofocus:this.options.autofocus}))}},{key:"renderTagList",value:function(){this.showEmptyStateText()||this.showChildView("tagList",new te.a({collection:this.collection,channelName:this.options.channelName,behavior:this.options.behavior,orientation:this.options.orientation,removeEvent:this.options.removeEvent}))}},{key:"onRender",value:function(){this.renderTagSelector(),this.renderTagList()}}])&&ae(t.prototype,n),o&&ae(t,o),Object.defineProperty(t,"prototype",{writable:!1}),s}(r.a.Component),fe=n(265),he=n(1287),pe=n.n(he),ve=n(1288),ye=n.n(ve);function be(e){return(be="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function me(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ge(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,o.key,o)}}function we(e,t){return(we=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function ke(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=Oe(e);if(t){var i=Oe(this).constructor;n=Reflect.construct(o,arguments,i)}else n=o.apply(this,arguments);return Se(this,n)}}function Se(e,t){if(t&&("object"===be(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Oe(e){return(Oe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Ee=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&&we(e,t)}(s,e);var t,n,o,a=ke(s);function s(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),a.call(this,e)}return t=s,(n=[{key:"name",get:function(){return"SaveComponent"}},{key:"template",get:function(){return pe.a}},{key:"className",get:function(){return"save-component ".concat(this.options.extraClasses)}},{key:"lang",get:function(){return"libraryEditor.save"}},{key:"getParentChannel",value:function(){return i.Radio.channel(this.options.channelName)}},{key:"getSaveChannelName",value:function(){return"".concat(this.name,":").concat(this.cid)}},{key:"regions",value:function(){return{save:{el:".save-region",replaceElement:!0}}}},{key:"events",value:function(){return{"click .undo":"onUndo"}}},{key:"initialize",value:function(){var e;this.model||(this.model=new r.a.Model((me(e={},fe.c.ShowSpinner,this.options.showSpinner),me(e,fe.c.Disabled,this.options.isDisabled),e)));var t=this.options.channelName;this.listenTo(t,S.LibraryEditorActions.DisableSave,this.onDisableSave),this.listenTo(t,S.LibraryEditorActions.EnableSave,this.onEnableSave),this.listenTo(t,S.LibraryEditorActions.CancelSave,this.onCancelSave);var n=i.Radio.channel(this.getSaveChannelName());this.listenTo(n,S.LibraryEditorActions.Save,this.onSave),this.options.allowUndo&&(this.options.hasChanges&&this.model.set("showUndo",!0),this.listenTo(this.model,"change:showUndo",this.render))}},{key:"onCancelSave",value:function(){this.model.set(fe.c.ShowSpinner,!1)}},{key:"onEnableSave",value:function(){this.model.set(fe.c.Disabled,!1),this.options.allowUndo&&this.model.set("showUndo",!0)}},{key:"onDisableSave",value:function(){this.model.get(fe.c.ShowSpinner)&&this.model.set(fe.c.ShowSpinner,!1,{silent:!0}),this.model.set(fe.c.Disabled,!0),this.options.allowUndo&&this.model.set("showUndo",!1)}},{key:"onUndo",value:function(e){e.stopPropagation(),this.getParentChannel().trigger(S.LibraryEditorActions.Undo)}},{key:"onSave",value:function(){this.model.set(fe.c.ShowSpinner,!0),this.getParentChannel().trigger(S.LibraryEditorActions.Save)}},{key:"viewOptions",value:function(){return{allowUndo:this.options.allowUndo&&this.model.get("showUndo"),styles:ye.a}}},{key:"renderSaveButton",value:function(){var e=new fe.a({saveEvent:S.LibraryEditorActions.Save,channelName:this.getSaveChannelName(),model:this.model,buttonText:l.a.getPhrase(this.lang,"save"),extraButtonClass:"btn-primary ".concat(ye.a.saveButton),spinnerOptions:{size:v.s.Small,type:v.t.Light,extraClasses:"mx-auto"}});this.showChildView("save",e)}},{key:"onRender",value:function(){this.renderSaveButton()}}])&&ge(t.prototype,n),o&&ge(t,o),Object.defineProperty(t,"prototype",{writable:!1}),s}(r.a.Component),Te=n(203),Ce=n(205),Pe=n(305),je=n(1289),Re=n.n(je);function xe(e){return(xe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function 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,o.key,o)}}function De(e,t){return(De=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function _e(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=Ve(e);if(t){var i=Ve(this).constructor;n=Reflect.construct(o,arguments,i)}else n=o.apply(this,arguments);return Me(this,n)}}function Me(e,t){if(t&&("object"===xe(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Ve(e){return(Ve=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(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&&De(e,t)}(r,e);var t,n,o,i=_e(r);function r(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r),i.call(this,e)}return t=r,(n=[{key:"initialize",value:function(){this.viewModel=s.a.get("image:storage")}},{key:"name",get:function(){return"EditThumbnailComponent"}},{key:"lang",get:function(){return"libraryEditor.editThumbnail"}},{key:"template",get:function(){return Re.a}},{key:"behaviors",get:function(){var e=this;return[{behaviorClass:Pe.b,channelName:this.options.channelName,buttonSelector:".upload-thumbnail",imageType:g.f.Thumbnails,appLink:{application:f.b.LIBRARY_EDITOR,action:f.a.LibraryEditor.UPLOAD_THUMBNAIL,args:[this.options.model.id]},saveImage:function(t){return e.viewModel.set({dataUrl:t})}}]}},{key:"defaults",get:function(){return{editable:!0}}},{key:"regions",value:function(){return{thumbnail:{el:".thumbnail-region",replaceElement:!0}}}},{key:"viewOptions",value:function(){return{editable:this.options.editable,dimensions:f.m[g.f.Thumbnails]}}},{key:"onRender",value:function(){this.showChildView("thumbnail",new Te.a({model:this.model,thumbnailOptions:{size:Ce.a.Medium}}))}}])&&Ne(t.prototype,n),o&&Ne(t,o),Object.defineProperty(t,"prototype",{writable:!1}),r}(r.a.Component),Le=n(1290),Be=n.n(Le),Ae=n(1291),Ue=n.n(Ae);function Fe(e){return(Fe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Je(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function ze(e,t){return(ze=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function He(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=Ye(e);if(t){var i=Ye(this).constructor;n=Reflect.construct(o,arguments,i)}else n=o.apply(this,arguments);return Ge(this,n)}}function Ge(e,t){if(t&&("object"===Fe(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Ye(e){return(Ye=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var We=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&&ze(e,t)}(r,e);var t,n,o,i=He(r);function r(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r),i.call(this,e)}return t=r,(n=[{key:"initialize",value:function(){var e=this;this.listenTo(this.options.channelName,"update:tags",(function(){return e.renderCustomerTags(!0)}))}},{key:"name",get:function(){return"EditVideoDetailsComponent"}},{key:"className",get:function(){return"edit-video-detail py-3"}},{key:"lang",get:function(){return"libraryEditor.editVideoDetails"}},{key:"template",get:function(){return Be.a}},{key:"appLinks",get:function(){return{".suggest-edit":{application:f.b.LIBRARY_EDITOR,action:f.a.LibraryEditor.SUGGEST_AN_EDIT,args:[this.model.id]}}}},{key:"regions",value:function(){return{topSave:{el:".top-save-region",replaceElement:!0},bottomSave:{el:".bottom-save-region",replaceElement:!0},thumbnail:{el:".thumbnail-region",replaceElement:!0},basicInfo:{el:".basic-info-region",replaceElement:!0},additionalInfo:{el:".additional-details-region",replaceElement:!0},productionInfo:{el:".production-info-region",replaceElement:!0},fields:{el:".fields-region",replaceElement:!0},clickViewTags:{el:".cv-tags-region",replaceElement:!1},customerTags:{el:".customer-tags-region",replaceElement:!0}}}},{key:"renderSave",value:function(){this.options.editable&&this.showChildView("topSave",new Ee({channelName:this.options.channelName,allowUndo:!0,isDisabled:this.options.isSaveDisabled,hasChanges:this.options.hasChanges,extraClasses:"float-right"})),this.showChildView("bottomSave",new Ee({channelName:this.options.channelName,allowUndo:!0,isDisabled:this.options.isSaveDisabled,hasChanges:this.options.hasChanges,extraClasses:"float-right"}))}},{key:"renderBasicInfo",value:function(){this.showChildView("basicInfo",new T.a({model:this.model,ratings:this.options.ratings,channelName:this.options.channelName,editable:this.options.editable,showingSaveButton:this.options.editable,showPublisherVideoDetails:this.options.showPublisherVideoDetails}))}},{key:"renderThumbnail",value:function(){this.showChildView("thumbnail",new Ie({model:this.model,channelName:this.options.channelName,editable:this.options.editable}))}},{key:"renderAdditionalInfo",value:function(){this.showChildView("additionalInfo",new P.a({model:this.model,channelName:this.options.channelName,libraries:this.options.libraries,hostedLibraries:this.options.hostedLibraries,editable:this.options.editable}))}},{key:"renderProductionInfo",value:function(){this.showChildView("productionInfo",new C.a({model:this.model,channelName:this.options.channelName,editable:this.options.editable}))}},{key:"renderFields",value:function(){this.showChildView("fields",new K({model:this.model,channelName:this.options.channelName}))}},{key:"renderClickViewTags",value:function(){if(!this.options.editable){var e=v.j.filterObjectsByOwnerType(this.model.tags,Z.a.ClickView,this.options.currentUser.get("customerId"));this.showChildView("clickViewTags",new de({parentId:this.model.get("id"),collection:e,orientation:ne.c.Flex,behavior:ne.b.Disabled,channelName:this.options.channelName,headerText:l.a.getPhrase(this.lang,"clickviewTags"),emptyStateText:l.a.getPhrase(this.lang,"clickviewTagsEmpty")}))}}},{key:"renderCustomerTags",value:function(e){var t=v.j.filterObjectsByOwnerType(this.model.tags,Z.a.Customer,this.options.currentUser.get("customerId"));this.showChildView("customerTags",new de({parentId:this.model.get("id"),collection:t,channelName:this.options.channelName,behavior:ne.b.Edit,headerText:l.a.getPhrase(this.lang,"customerTags"),removeEvent:"remove:tag",autofocus:!!e}))}},{key:"renderTags",value:function(){this.renderClickViewTags(),this.renderCustomerTags()}},{key:"viewOptions",value:function(){return{styles:Ue.a,editable:this.options.editable,suggestEditClasses:"info-link text-underline suggest-edit",isExchange:v.y.isExchangeVideo(this.model)}}},{key:"onRender",value:function(){this.renderSave(),this.renderBasicInfo(),this.renderThumbnail(),this.renderAdditionalInfo(),this.renderProductionInfo(),this.renderFields(),this.renderTags()}}])&&Je(t.prototype,n),o&&Je(t,o),Object.defineProperty(t,"prototype",{writable:!1}),r}(r.a.Component),qe=n(1118),Xe=n(315),Ke=n(316),Ze=n(1292),Qe=n.n(Ze);function $e(e){return($e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function et(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,o.key,o)}}function tt(e,t){return(tt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function nt(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=it(e);if(t){var i=it(this).constructor;n=Reflect.construct(o,arguments,i)}else n=o.apply(this,arguments);return ot(this,n)}}function ot(e,t){if(t&&("object"===$e(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function it(e){return(it=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n.d(t,"EditVideoView",(function(){return rt}));var rt=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&&tt(e,t)}(P,e);var t,n,T,C=nt(P);function P(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,P),(t=C.call(this,e)).editable=!1,t}return t=P,(n=[{key:"name",get:function(){return"EditVideoView"}},{key:"title",get:function(){return this.model&&this.model.get("name")}},{key:"lang",get:function(){return"libraryEditor.editVideo"}},{key:"className",get:function(){return"bg-white p-3"}},{key:"channelName",get:function(){return"".concat(this.name,":").concat(this.cid)}},{key:"viewModelName",get:function(){return"".concat(this.name,":").concat(this.options.videoId)}},{key:"template",get:function(){return Qe.a}},{key:"regions",value:function(){return{tabs:{el:".tab-region",replaceElement:!0,partialLoading:g.h.EditVideoTabs},content:{el:".edit-content-region",replaceElement:!0,partialLoading:g.h.EditVideoDetails}}}},{key:"initialize",value:function(){this.navLock=u.a.getInstance(f.x.NavLock,this),this.initDataListeners(),v.v.initBackButton(),this.initServices()}},{key:"initServices",value:function(){this.videoDataService=u.a.getInstance(f.g.Video,this),this.tagDataService=u.a.getInstance(f.g.Tags,this),this.libraryDataService=u.a.getInstance(f.g.Library,this),this.seriesDataService=u.a.getInstance(f.g.Series,this),this.ratingsDataService=u.a.getInstance(f.g.Ratings,this),this.migrationVideoDataService=u.a.getInstance(f.g.MigrationVideo,this),this.fieldsDataService=u.a.getInstance(f.g.Fields,this),this.alertService=u.a.getInstance(f.x.Alerts,this),this.personDataService=u.a.getInstance(f.g.Person,this),this.companyDataService=u.a.getInstance(f.g.Company,this)}},{key:"initDataListeners",value:function(){this.listenTo(c.a.SHELL,r.a.EventNames.NAV_UNLOCKED_BY_USER,this.onNavigateAway),this.listenTo(f.e.VIDEO,"videos:".concat(this.options.videoId,":sync"),this.render),this.listenTo(f.e.VIDEO,"videos:".concat(this.options.videoId,":error"),this.onError),this.listenTo(f.e.RATINGS,"".concat(f.f.RATINGS,":sync"),this.render),this.listenTo(f.e.VIDEO,"".concat(f.f.UPDATE_VIDEO_THUMBNAIL,":").concat(this.options.videoId,":sync"),this.onThumbnailUpdated),this.listenTo(f.e.LIBRARY,"hosted:libraries:sync",this.render),this.listenTo(this.channelName,"select:rating",o.partial(this.onTypeaheadSelection,o,"rating")),this.listenTo(this.channelName,"select:channel",o.partial(this.onTypeaheadSelection,o,"channel")),this.listenTo(this.channelName,"select:series",this.onSelectSeries),this.listenTo(this.channelName,"add:season",this.onSelectSeason),this.listenTo(this.channelName,"add:distributors",this.onSelectDistributor),this.listenTo(this.channelName,"add:productionCompanies",this.onSelectProductionCompany),this.listenTo(this.channelName,"add:directors",this.onSelectDirector),this.listenTo(this.channelName,"add:producers",this.onSelectProducer),this.listenTo(this.channelName,"add:tag",this.onAddTag),this.listenTo(this.channelName,"remove:distributors",this.onRemoveDistributor),this.listenTo(this.channelName,"remove:productionCompanies",this.onRemoveProductionCompany),this.listenTo(this.channelName,"remove:directors",this.onRemoveDirector),this.listenTo(this.channelName,"remove:producers",this.onRemoveProducer),this.listenTo(this.channelName,"remove:tag",this.onRemoveTag),this.listenTo(this.channelName,S.LibraryEditorActions.Save,this.onSave),this.listenTo(this.channelName,S.LibraryEditorActions.Undo,this.onUndo),this.listenTo(this.channelName,S.LibraryEditorActions.DetectInput,this.onTypeaheadInput),this.listenTo(this.channelName,"image:load",this.onBeforeThumbnailUpload)}},{key:"onError",value:function(e){switch(e.type){case d.a.NotFound:r.a.ErrorHelper.throw(new Ke.a);break;case d.a.Forbidden:r.a.ErrorHelper.throw(new Xe.a)}}},{key:"onTypeaheadSelection",value:function(e,t,n){if(n){var i=this.viewModel.get(t),r=i.filter({name:e.name});o.each(r,(function(e){return i.remove(e)})),i.add(e)}else this.viewModel.set(t,e);this.onModelChange(e,{manualUpdate:!0})}},{key:"onTypeaheadInput",value:function(e,t,n){e.get("name")||(n&&n.isCollection?this.viewModel.get(t).remove(e.get("id"),{silent:!0}):this.viewModel.get(t).clear({silent:!0}),this.onModelChange(null,{manualUpdate:!0}),"series"===t&&(this.validateSeries(),i.Radio.channel(this.channelName).trigger("clear:series")))}},{key:"onSelectSeries",value:function(e){var t=this;e.id?this.seriesDataService.getSeries(e.id,(function(e){t.viewModel.unset("season"),t.viewModel.set("episodeNumber",null),t.onTypeaheadSelection(e.toJSON(),"series")})):e.name&&this.seriesDataService.createSeries(e.name,(function(e){t.viewModel.unset("season"),t.viewModel.set("episodeNumber",null),t.onTypeaheadSelection({id:e.id},"series")}))}},{key:"onSelectSeason",value:function(e){var t=this;if(o.isNull(e))return this.viewModel.get("season").clear({silent:!0}),this.viewModel.set("episodeNumber",null),v.c.deselectAll(this.viewModel.get("series.seasons")),void this.onModelChange(null,{manualUpdate:!0});if(e.id)return this.viewModel.set("season",e),v.c.setSelected(e.id,this.viewModel.get("series.seasons")),void this.onModelChange(e,{manualUpdate:!0});if(e.number){var n=this.viewModel.get("series.id");this.seriesDataService.createSeason(e,n,(function(e){t.viewModel.set("season",e.toJSON()),!t.viewModel.get("series.seasons")&&t.viewModel.get("series").set("seasons",new h.a),t.viewModel.get("series.seasons").add(e.toJSON()),v.c.setSelected(e.id,t.viewModel.get("series.seasons")),t.onModelChange(e.toJSON(),{manualUpdate:!0}),t.render()}))}}},{key:"onSelectDistributor",value:function(e){var t=this;e.id?this.onTypeaheadSelection(e,"distributors",!0):e.name&&this.companyDataService.createCompany(e.name,(function(e){t.onTypeaheadSelection(e.toJSON(),"distributors",!0)}))}},{key:"onSelectProductionCompany",value:function(e){var t=this;e.id?this.onTypeaheadSelection(e,"productionCompanies",!0):e.name&&this.companyDataService.createCompany(e.name,(function(e){t.onTypeaheadSelection(e.toJSON(),"productionCompanies",!0)}))}},{key:"onSelectDirector",value:function(e){var t=this;e.id?this.onTypeaheadSelection(e,"directors",!0):e.name&&this.personDataService.createPerson(e.name,(function(e){t.onTypeaheadSelection(e.toJSON(),"directors",!0)}))}},{key:"onSelectProducer",value:function(e){var t=this;e.id?this.onTypeaheadSelection(e,"producers",!0):e.name&&this.personDataService.createPerson(e.name,(function(e){t.onTypeaheadSelection(e.toJSON(),"producers",!0)}))}},{key:"onRemoveDistributor",value:function(e){this.removeFromCollection(e,"distributors")}},{key:"onRemoveProductionCompany",value:function(e){this.removeFromCollection(e,"productionCompanies")}},{key:"onRemoveDirector",value:function(e){this.removeFromCollection(e,"directors")}},{key:"onRemoveProducer",value:function(e){this.removeFromCollection(e,"producers")}},{key:"removeFromCollection",value:function(e,t){e&&e.id&&t&&(this.viewModel.get(t).remove(e.id),this.onModelChange(null,{manualUpdate:!0}))}},{key:"onAddTag",value:function(e){var t=this;if(e&&e.name){var n=e.name.trim().toLowerCase();if(n&&!v.c.findModelByName(n,this.viewModel.tags)){var o=new b.a({name:n});this.viewModel.tags.add(o),this.tagDataService.createTag(n,this.model.get("id"),(function(e){o.set(e.toJSON()),i.Radio.channel(t.channelName).trigger("update:tags")}))}}}},{key:"onRemoveTag",value:function(e){var t=this;e instanceof b.a&&e.id&&this.tagDataService.dissociateTag(e.id,this.model.get("id"),(function(){t.viewModel.tags.remove(e),i.Radio.channel(t.channelName).trigger("update:tags"),t.logDissocAction(t.model.get("id"),e,w.EntityType.Tag)}))}},{key:"saveFields",value:function(e,t){var n=this,i=0;e.updatedVideo=o.extend({},e.updatedVideo||{});var r=function(){++i===e.dataChanges.fields.length&&t(e)};o.each(e.dataChanges.fields,(function(e){if(e.id&&!e.value)return n.viewModel.fields.remove(n.viewModel.fields.findWhere({id:e.id})),void n.fieldsDataService.deleteField(e.id,r);!e.id||e.id>0?n.fieldsDataService.updateField(e,r):n.fieldsDataService.addField(n.options.videoId,e,(function(t){n.viewModel.fields.findWhere({id:e.id}).set("id",t.id),r()}))}))}},{key:"bulkDissoc",value:function(e,t){this.videoDataService.bulkDissoc(this.model.id,e.pendingDissocs,(function(){t(e)}))}},{key:"saveVideo",value:function(e,t){var n=this,i=o.omit(e.dataChanges,"fields");if(o.isEmpty(i))t(e);else{var r=o.omit(e.dataChanges,"fields");this.videoDataService.updateVideo(this.model.get("id"),this.folder.get("id"),r,(function(i){(e.dataChanges.series&&e.dataChanges.series.id||e.dataChanges.episodeNumber||e.dataChanges.season)&&n.videoDataService.clearVideoCache(),e.updatedVideo=o.extend({},e.updatedVideo||{},i),t(e)}))}}},{key:"afterSave",value:function(e){if(this.viewModel){e.updatedVideo&&this.updateState(e.updatedVideo),this.unlockNav(),this.updateSaveButton(S.LibraryEditorActions.DisableSave),this.logEditAction(e.dataChanges,w.WorkflowPhase.Save);var t=m.a.updatedVideoAlert(this.viewModel.get("name"));this.alertService.success(t||"Video was successfully updated")()}}},{key:"onSave",value:function(){if(this.viewModel.validate(),!1===this.viewModel.isValid())return this.updateSaveButton(S.LibraryEditorActions.CancelSave),!1;this.validateSeries();var e=E.a.getChanges(this.model,this.viewModel),t=E.a.getRemovedObjectIds(this.model,this.viewModel);if(!e&&!o.keys(t).length)return this.updateSaveButton(S.LibraryEditorActions.CancelSave),!1;var n=new r.a.Middleware;return e&&e.fields&&n.use(o.bind(this.saveFields,this)),t&&o.keys(t).length&&n.use(o.bind(this.bulkDissoc,this)),this.editable&&n.use(o.bind(this.saveVideo,this)),n.use(o.bind(this.afterSave,this)),n.go({dataChanges:e,pendingDissocs:t},null),!1}},{key:"onUndo",value:function(){var e=this;new v.d({title:l.a.getPhrase(this.lang,"undoTitle"),text:l.a.getPhrase(this.lang,"undoBody",{videoName:this.model.get("name")}),buttons:[{text:l.a.getPhrase(this.lang,"undo"),className:"btn btn-danger",success:!0},{text:l.a.getPhrase(this.lang,"cancel"),className:"btn btn-secondary",close:!0}]}).render().done((function(){e.logEditAction({},w.WorkflowPhase.Discard),e.revertState({undo:!0}),e.render()}))}},{key:"updateState",value:function(e){this.stopListening(this.viewModel),E.a.updateModelState(this.model,this.viewModel,e),s.a.clear(this.viewModelName),this.getViewModel(),this.renderContent()}},{key:"onNavigateAway",value:function(){this.revertState()}},{key:"revertState",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.undo;this.stopListening(this.viewModel),s.a.clear(this.viewModelName),delete this.viewModel,this.unlockNav(),t&&this.getViewModel()}},{key:"lockNav",value:function(){this.navLock.lock({title:l.a.getPhrase(this.lang,"navLockHeading"),text:l.a.getPhrase(this.lang,"navLockBody")})}},{key:"unlockNav",value:function(){this.navLock.unlock()}},{key:"onBeforeThumbnailUpload",value:function(){this.navLock.isLocked()&&(this.navLock.unlock(),s.a.get("upload:thumbnail:options").set("lockNav",!0))}},{key:"onModelChange",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(t.stickitChange||t.manualUpdate)if(this.viewModel.validate(),!1!==this.viewModel.isValid()){var n=E.a.getChanges(this.model,this.viewModel)||o.keys(E.a.getRemovedObjectIds(this.model,this.viewModel)).length;if(!n)return this.unlockNav(),void this.updateSaveButton(S.LibraryEditorActions.DisableSave);this.lockNav(),this.updateSaveButton(S.LibraryEditorActions.EnableSave)}else this.updateSaveButton(S.LibraryEditorActions.DisableSave)}},{key:"updateSaveButton",value:function(e){var t=i.Radio.channel(this.channelName),n=S.LibraryEditorActions.EnableSave,o=S.LibraryEditorActions.DisableSave,s=S.LibraryEditorActions.CancelSave;switch(e){case n:return void t.trigger(n);case o:return void t.trigger(o);case s:return void t.trigger(s)}r.a.ErrorHelper.throw(new a.a("Save action type is not valid."))}},{key:"onThumbnailUpdated",value:function(){var e=this;this.videoDataService.clearCacheAndGetVideo(this.options.videoId,(function(t){e.model=t,e.viewModel.set("thumbnail",e.model.thumbnail.toJSON())}))}},{key:"logEditAction",value:function(e,t){var n=Object.assign({id:this.model.get("id")},e);k.a.logUserAction(n,{actionType:w.UserAction.Edit,entity:w.EntityType.Video,location:w.LocationContext.EditVideoDetails,workflowPhase:t})}},{key:"logDissocAction",value:function(e,t,n){var o=Object.assign({videoId:e},t.pick("id","name"));k.a.logUserAction(o,{actionType:w.UserAction.Dissociate,entity:n,location:w.LocationContext.EditVideoDetails})}},{key:"onValidation",value:function(e){this.viewModel.set("disabled",!e)}},{key:"getViewModel",value:function(){this.model.fields&&this.model.fields.length||this.model.set("fields",Object(E.d)()),this.viewModel=s.a.get(this.viewModelName,this.model.toJSON(),{ctor:y.a}),this.editable&&(this.viewModel.addValidation(E.k),this.viewModel.addValidation(E.e)),this.viewModel.addValidation(E.b),this.listenTo(this.viewModel,"validated",this.onValidation),this.listenTo(this.viewModel,"change",this.onModelChange),this.listenTo(this.viewModel,"change:dateBroadcast",o.partial(this.onModelChange,o,{manualUpdate:!0})),this.viewModel.fields&&(this.viewModel.fields&&this.viewModel.fields.each((function(e){return e.addValidation(E.c)})),this.listenTo(this.viewModel.fields,"change",this.onModelChange))}},{key:"validateSeries",value:function(){this.viewModel.get("series.id")||(this.viewModel.unset("season"),this.viewModel.set("episodeNumber",null))}},{key:"fetchData",value:function(){var e=this;this.model=this.videoDataService.getVideo(this.options.videoId),this.ratings=this.ratingsDataService.getAllRatings(),this.hostedLibraries=this.libraryDataService.getHostedLibraries(),this.migrationVideoDataService.getCustomerVideoByMasterId(this.options.videoId,(function(t){var n=!!e.publisherVideo;e.publisherVideo=t,n&&e.isRendered()&&e.renderContent()})),this.model&&(this.editable=v.j.canEditVideo(this.model),this.folder=this.model.categories.first(),this.ratings&&this.hostedLibraries&&(this.viewModel instanceof y.a||this.getViewModel()))}},{key:"requiredResources",get:function(){return{libraries:O.b.libraries,currentUser:p.b.currentUser}}},{key:"onBeforeRender",value:function(){return this.fetchData(),!!this.model&&!!this.ratings&&!!this.viewModel}},{key:"renderContent",value:function(){var e=E.a.getChanges(this.model,this.viewModel)||o.keys(E.a.getRemovedObjectIds(this.model,this.viewModel)).length;this.showChildView("content",new We({model:this.viewModel,ratings:this.ratings,libraries:this.libraries,hostedLibraries:this.hostedLibraries,channelName:this.channelName,isSaveDisabled:!e,hasChanges:!!e,editable:this.editable,currentUser:this.currentUser,showPublisherVideoDetails:!!this.publisherVideo}))}},{key:"renderTabs",value:function(){this.showChildView("tabs",new qe.a({tabs:v.v.getEditVideoTabs(this.options.videoId,{hideChaptersTab:!this.editable}),activeTab:".edit-video-applink",goBackTab:v.v.getBackButton(this.options.videoId)}))}},{key:"onRender",value:function(){this.renderTabs(),this.renderContent()}}])&&et(t.prototype,n),T&&et(t,T),Object.defineProperty(t,"prototype",{writable:!1}),P}(r.a.View)}}]);
@@ -0,0 +1 @@
1
+ (window.webpackJsonp_clickview_library_editor=window.webpackJsonp_clickview_library_editor||[]).push([[29],{1046:function(e,t,n){"use strict";var o,r;n.d(t,"b",(function(){return o})),n.d(t,"a",(function(){return r})),function(e){e[e.Base=0]="Base",e[e.AwaitingReview=1]="AwaitingReview",e[e.PastReleases=2]="PastReleases",e[e.VideoAccess=3]="VideoAccess",e[e.ProcessingVideo=4]="ProcessingVideo",e[e.Draggable=5]="Draggable",e[e.Search=6]="Search"}(o||(o={})),function(e){e.Checkbox="checkbox",e.Thumbnail="thumbnail",e.Metadata="metadata",e.VideoActions="videoActions",e.VideoInfo="videoInfo"}(r||(r={}))},1075:function(e,t,n){"use strict";n.d(t,"b",(function(){return r})),n.d(t,"a",(function(){return w}));var o,r,i=n(2),l=n(12),a=n(3),s=n(1139),u=n.n(s),c=n(1140),p=n.n(c);function f(e){return(f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function d(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function h(e,t){return(h=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function y(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=m(e);if(t){var r=m(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return g(this,n)}}function g(e,t){if(t&&("object"===f(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function m(e){return(m=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function b(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}!function(e){e.Small="sm",e.Large="lg"}(r||(r={}));var v=(b(o={},r.Small,3),b(o,r.Large,5),o),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&&h(e,t)}(s,e);var t,n,o,i=y(s);function s(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),(t=i.call(this,e)).showingMore=!1,t}return t=s,(n=[{key:"name",get:function(){return"VideoDescriptionComponent"}},{key:"template",get:function(){return u.a}},{key:"lang",get:function(){return"shared.videoDescription"}},{key:"defaults",get:function(){return{size:"sm"}}},{key:"elements",get:function(){return{description:".description",ellipsis:this.options.allowExpand?".".concat(p.a.showMoreEllipsis):".".concat(p.a.singleEllipsis)}}},{key:"events",value:function(){return b({},"click .".concat(p.a.showMoreEllipsis),"onClickShowMore")}},{key:"onClickShowMore",value:function(e){e.preventDefault(),this.showingMore?this.showLessDescription():this.showMoreDescription()}},{key:"getDescription",value:function(){return this.options.linkify?l.w.linkifyText(this.model.get("description")):this.options.highlighter?l.w.wordsHighlighter(l.w.escapeExpression(this.model.get("description")),this.model.get("_matchedWords")):void 0}},{key:"getDescriptionElements",value:function(){return{descriptionTextEl:this.getUI("description"),ellipsisEl:this.getUI("ellipsis")}}},{key:"showMoreDescription",value:function(){var e=this.getDescriptionElements(),t=e.descriptionTextEl,n=e.ellipsisEl;t.removeClass(p.a.truncateLarge).addClass(p.a.open),n.text(a.a.getPhrase(this.lang,"showLess")),this.showingMore=!0}},{key:"showLessDescription",value:function(){var e,t=this.getDescriptionElements(),n=t.descriptionTextEl,o=t.ellipsisEl;this.options.size===r.Small&&(e="truncateSmall"),this.options.size===r.Large&&(e="truncateLarge"),n.addClass(p.a[e]),o.text(this.options.allowExpand?"... ".concat(a.a.getPhrase(this.lang,"showMore")):"...").removeClass(p.a.hideEllipsis).addClass(p.a.showEllipsis),this.showingMore=!1}},{key:"truncateDescription",value:function(){if(this.options.truncate){var e=this.getDescriptionElements().descriptionTextEl,t=v[this.options.size];e.height()<=21*t||this.showLessDescription()}}},{key:"viewOptions",value:function(){return{styles:p.a,truncate:this.options.truncate,expandable:this.options.allowExpand,description:this.getDescription()}}},{key:"onAttach",value:function(){this.truncateDescription()}}])&&d(t.prototype,n),o&&d(t,o),Object.defineProperty(t,"prototype",{writable:!1}),s}(i.a.Component)},1091:function(e,t,n){"use strict";n.d(t,"a",(function(){return C}));var o=n(1),r=n(6),i=n(2),l=n(4),a=n(42),s=n(205),u=n(203),c=n(305),p=n(12),f=n(0),d=n(1196),h=n(1141),y=n.n(h);function g(e){return(g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function m(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,o.key,o)}}function b(e,t){return(b=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function v(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=k(e);if(t){var r=k(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return w(this,n)}}function w(e,t){if(t&&("object"===g(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function k(e){return(k=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var C=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)}(g,e);var t,n,i,h=v(g);function g(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,g),h.call(this,e)}return t=g,(n=[{key:"initialize",value:function(){this.bindListeners()}},{key:"name",get:function(){return"VideoPreviewComponent"}},{key:"template",get:function(){return y.a}},{key:"instanceChannelName",get:function(){return p.k.generateUniqueChannelName(this)}},{key:"defaults",get:function(){return{captureAnalytics:!0}}},{key:"behaviors",get:function(){var e=this;return[{behaviorClass:c.c,selector:".lazy-img",callback:function(){r.Radio.channel(e.instanceChannelName).trigger("show:play:icon")},minBrowserSupportVersion:f.p}]}},{key:"regions",value:function(){return{player:{el:".video-player-region",replaceElement:!1},thumbnail:{el:".thumbnail-region",replaceElement:!0}}}},{key:"events",value:function(){return{click:"onClick"}}},{key:"bindListeners",value:function(){this.options.channelName&&this.listenTo(this.options.channelName,"update:chapter:time",this.onUpdateWebplayer)}},{key:"onUpdateWebplayer",value:function(e){if(!this.player)return this.listenToOnce(this.options.channelName,"webplayer:loaded",o.bind(this.seekToChapter,this,e)),void this.renderVideoPreview();this.seekToChapter(e)}},{key:"seekToChapter",value:function(e){this.player.seekTo(e)}},{key:"onClick",value:function(){this.player||this.renderVideoPreview()}},{key:"renderThumbnail",value:function(){this.showChildView("thumbnail",new u.a({model:this.model,thumbnailOptions:{size:s.a.Medium},playIcon:!0,lazyload:!0,channelName:this.instanceChannelName}))}},{key:"renderVideoPreview",value:function(){this.player=new d.a({model:this.model,webPlayerUrl:this.options.webPlayerUrl,parentChannelName:this.options.channelName,autoplay:!0,analyticsOptions:a.a.mergeOptions(this.options.analyticsOptions,{entity:l.EntityType.Video}),captureAnalytics:this.options.captureAnalytics,currentUser:this.options.currentUser}),this.showChildView("player",this.player)}},{key:"onRender",value:function(){this.renderThumbnail()}}])&&m(t.prototype,n),i&&m(t,i),Object.defineProperty(t,"prototype",{writable:!1}),g}(i.a.Component)},1139:function(e,t,n){var o=n(10);e.exports=(o.default||o).template({1: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.descriptionWrapper:i,t))+'">\r\n <p class="description '+a(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.description:i,t))+'">'+(null!=(i=n.if.call(null!=t?t:e.nullContext||{},null!=(i=null!=t?t.options:t)?i.expandable:i,{name:"if",hash:{},fn:e.program(2,r,0),inverse:e.program(4,r,0),data:r}))?i:"")+"</p>\r\n </div>\r\n"},2:function(e,t,n,o,r){e.propertyIsEnumerable;var i,l=e.lambda,a=e.escapeExpression;return(null!=(i=l(null!=(i=null!=t?t.options:t)?i.description:i,t))?i:"")+'<span class="'+a(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.showMoreEllipsis:i,t))+" "+a(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.hideEllipsis:i,t))+'">... '+a((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"showMore",{name:"lang",hash:{},data:r}))+"</span>"},4:function(e,t,n,o,r){e.propertyIsEnumerable;var i,l=e.lambda,a=e.escapeExpression;return(null!=(i=l(null!=(i=null!=t?t.options:t)?i.description:i,t))?i:"")+'<span class="'+a(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.singleEllipsis:i,t))+" "+a(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.hideEllipsis:i,t))+'">...</span>'},6:function(e,t,n,o,r){e.propertyIsEnumerable;var i,l=e.lambda;return' <p class="'+e.escapeExpression(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.description:i,t))+'">'+(null!=(i=l(null!=(i=null!=t?t.options:t)?i.description:i,t))?i:"")+"</p>\r\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,r){var i;e.propertyIsEnumerable;return null!=(i=n.if.call(null!=t?t:e.nullContext||{},null!=(i=null!=t?t.options:t)?i.truncate:i,{name:"if",hash:{},fn:e.program(1,r,0),inverse:e.program(6,r,0),data:r}))?i:""},useData:!0})},1140:function(e,t,n){e.exports={columnNames:"_1a1Re",descriptionWrapper:"_2MZC5",description:"_3U9j9",ellipsis:"_1YjUg",singleEllipsis:"_3SNtn",showMoreEllipsis:"xy3i9",showEllipsis:"_1_L9t",hideEllipsis:"TCdgP",open:"_18ojI",truncateSmall:"nLuVF",truncateLarge:"sEELY"}},1141:function(e,t,n){var o=n(10);e.exports=(o.default||o).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,o,r){return'<div class="video-player-region cursor-pointer responsize-img">\r\n <div class="thumbnail-region"></div>\r\n</div>'},useData:!0})},1410:function(e,t,n){var o=n(10);e.exports=(o.default||o).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,o,r){return'<div class="videos-region"></div>'},useData:!0})},1411:function(e,t,n){var o=n(10);e.exports=(o.default||o).template({1:function(e,t,n,o,r){e.propertyIsEnumerable;return'<p class="text-uppercase text-muted">'+e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"description",{name:"lang",hash:{},data:r}))+"</p>\r\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,r){var i;e.propertyIsEnumerable;return(null!=(i=n.if.call(null!=t?t:e.nullContext||{},null!=t?t.description:t,{name:"if",hash:{},fn:e.program(1,r,0),inverse:e.noop,data:r}))?i:"")+'<div class="description-region"></div>\r\n<div class="webplayer-region col-5 pl-0"></div>'},useData:!0})},1412:function(e,t,n){var o=n(10);e.exports=(o.default||o).template({1:function(e,t,n,o,r){e.propertyIsEnumerable;return" <span>"+e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"series",{name:"lang",hash:{series:null!=t?t.series:t},data:r}))+"</span>\r\n"},3:function(e,t,n,o,r){e.propertyIsEnumerable;var i,l=null!=t?t:e.nullContext||{};return" "+(null!=(i=n.if.call(l,null!=t?t.series:t,{name:"if",hash:{},fn:e.program(4,r,0),inverse:e.noop,data:r}))?i:"")+"\r\n <span>"+e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(l,"folder",{name:"lang",hash:{folder:null!=t?t.category:t},data:r}))+"</span>\r\n"},4:function(e,t,n,o,r){return'<span class="mx-1">|</span>'},6:function(e,t,n,o,r){e.propertyIsEnumerable;var i,l=e.lambda,a=e.escapeExpression;return' <span class="badge p-1 tool-tip '+a(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.rating:i,t))+" "+a(l(null!=(i=null!=t?t.options:t)?i.ratingColorClass:i,t))+'" title="'+a(l(null!=(i=null!=t?t.rating:t)?i.name:i,t))+'">'+a(l(null!=(i=null!=t?t.rating:t)?i.code:i,t))+"</span>\r\n"},8:function(e,t,n,o,r){var i;return null!=(i=n.if.call(null!=t?t:e.nullContext||{},t,{name:"if",hash:{},fn:e.program(9,r,0),inverse:e.noop,data:r}))?i:""},9:function(e,t,n,o,r){return' <div class="text-danger">'+e.escapeExpression(e.lambda(t,t))+"</div>\r\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,r){e.propertyIsEnumerable;var i,l,a=null!=t?t:e.nullContext||{};return'<div>\r\n <a class="h6">'+e.escapeExpression("function"==typeof(l=null!=(l=n.name||(null!=t?t.name:t))?l:e.hooks.helperMissing)?l.call(a,{name:"name",hash:{},data:r}):l)+"</a>\r\n</div>\r\n<div>\r\n"+(null!=(i=n.if.call(a,null!=t?t.series:t,{name:"if",hash:{},fn:e.program(1,r,0),inverse:e.noop,data:r}))?i:"")+(null!=(i=n.if.call(a,null!=t?t.category:t,{name:"if",hash:{},fn:e.program(3,r,0),inverse:e.noop,data:r}))?i:"")+"</div>\r\n"+(null!=(i=n.if.call(a,null!=(i=null!=t?t.rating:t)?i.code:i,{name:"if",hash:{},fn:e.program(6,r,0),inverse:e.noop,data:r}))?i:"")+(null!=(i=n.each.call(a,null!=(i=null!=t?t.options:t)?i.errorStrings:i,{name:"each",hash:{},fn:e.program(8,r,0),inverse:e.noop,data:r}))?i:"")},useData:!0})},1413:function(e,t,n){e.exports={rating:"_3IJcl"}},1414:function(e,t,n){e.exports={svgContainer:"_-0ibU",selectedButton:"_28zhr",showPreview:"_2r4VF"}},1415:function(e,t,n){var o=n(10);e.exports=(o.default||o).template({1:function(e,t,n,o,r){e.propertyIsEnumerable;var i,l=e.lambda,a=e.escapeExpression;return' <button class="btn btn-success use-online-copy '+a(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.selectedButton:i,t))+'"><span class="'+a(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.svgContainer:i,t))+'">'+(null!=(i=l(null!=(i=null!=t?t.options:t)?i.checkSvg:i,t))?i:"")+"</span>"+a((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"resolve",{name:"lang",hash:{},data:r}))+"</button>\r\n"},3:function(e,t,n,o,r){e.propertyIsEnumerable;var i=null!=t?t:e.nullContext||{},l=e.hooks.helperMissing,a=e.escapeExpression;return' <button class="btn btn-link dismiss">'+a((n.lang||t&&t.lang||l).call(i,"dismiss",{name:"lang",hash:{},data:r}))+'</button>\r\n <button class="btn btn-outline-secondary use-online-copy">'+a((n.lang||t&&t.lang||l).call(i,"resolve",{name:"lang",hash:{},data:r}))+"</button>\r\n"},5:function(e,t,n,o,r){e.propertyIsEnumerable;return e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"hide",{name:"lang",hash:{},data:r}))},7:function(e,t,n,o,r){e.propertyIsEnumerable;return e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"show",{name:"lang",hash:{},data:r}))},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,r){e.propertyIsEnumerable;var i,l=null!=t?t:e.nullContext||{},a=e.lambda,s=e.escapeExpression;return"<div>\r\n"+(null!=(i=n.if.call(l,null!=(i=null!=t?t.options:t)?i.selected:i,{name:"if",hash:{},fn:e.program(1,r,0),inverse:e.program(3,r,0),data:r}))?i:"")+'</div>\r\n<div class="mt-4 cursor-pointer video-item-show-preview text-right '+s(a(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.showPreview:i,t))+'">\r\n <span class="svg-container d-inline-block">'+(null!=(i=a(null!=(i=null!=t?t.options:t)?i.previewSvg:i,t))?i:"")+"</span>\r\n "+(null!=(i=n.if.call(l,null!=(i=null!=t?t.options:t)?i.previewDisplayed:i,{name:"if",hash:{},fn:e.program(5,r,0),inverse:e.program(7,r,0),data:r}))?i:"")+" "+s((n.lang||t&&t.lang||e.hooks.helperMissing).call(l,"preview",{name:"lang",hash:{},data:r}))+"\r\n</div>"},useData:!0})},1416:function(e,t,n){var o=n(10);e.exports=(o.default||o).template({1:function(e,t,n,o,r){return" cursor-pointer"},3:function(e,t,n,o,r){e.propertyIsEnumerable;var i,l=e.escapeExpression,a=null!=t?t:e.nullContext||{},s=e.hooks.helperMissing;return'<div class="'+l(e.lambda(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.doNotAdd:i,t))+' text-center">\r\n <p class="mb-0 mt-3">'+(null!=(i=(n.lang||t&&t.lang||s).call(a,"willNotBeAdded",{name:"lang",hash:{videoName:null!=t?t.name:t},data:r}))?i:"")+'</p>\r\n <p class="m-0">'+l((n.lang||t&&t.lang||s).call(a,"willBeRemoved",{name:"lang",hash:{},data:r}))+'</p>\r\n <button class="btn btn-link undo">'+l((n.lang||t&&t.lang||s).call(a,"undo",{name:"lang",hash:{},data:r}))+"</button>\r\n</div>\r\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,r){e.propertyIsEnumerable;var i,l=e.lambda,a=e.escapeExpression,s=null!=t?t:e.nullContext||{};return'<div class="d-flex justify-content-between align-items-stretch p-3 drag-item '+a(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.videoItem:i,t))+(null!=(i=n.if.call(s,null!=(i=null!=t?t.options:t)?i.isClickable:i,{name:"if",hash:{},fn:e.program(1,r,0),inverse:e.noop,data:r}))?i:"")+'">\r\n <div class="thumbnail-region d-inline-block '+a(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.thumbnailContainer:i,t))+'"></div>\r\n <div class="metadata-region d-inline-block px-3 '+a(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.metaContainer:i,t))+'"></div>\r\n <div class="video-actions-region d-inline-block '+a(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.actionsContainer:i,t))+'"></div>\r\n</div>\r\n<div class="video-info-region '+a(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.previewContainer:i,t))+'"></div>\r\n'+(null!=(i=n.if.call(s,null!=(i=null!=t?t.options:t)?i.doNotAdd:i,{name:"if",hash:{},fn:e.program(3,r,0),inverse:e.noop,data:r}))?i:"")},useData:!0})},1417:function(e,t,n){e.exports={component:"_13khy",thumbnailContainer:"_gEcp",metaContainer:"zuMb1",actionsContainer:"_1ppp8",videoItem:"_2Ru6c",doNotAdd:"_8l6WV"}},1418:function(e,t,n){var o=n(10);e.exports=(o.default||o).template({1:function(e,t,n,o,r){var i;e.propertyIsEnumerable;return'<span class="border-right d-inline-block align-middle pr-3">'+e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"videosAdded",{name:"lang",hash:{smartCount:null!=(i=null!=t?t.options:t)?i.count:i},data:r}))+"</span>\r\n"},3: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,s=e.escapeExpression;return(null!=(i=n.if.call(l,null!=(i=null!=t?t.options:t)?i.countPhrase:i,{name:"if",hash:{},fn:e.program(1,r,0),inverse:e.noop,data:r}))?i:"")+'<span class="d-inline-block align-middle"><button class="btn btn-link clear-all"'+(null!=(i=n.if.call(l,null!=(i=null!=t?t.options:t)?i.submitDisabled:i,{name:"if",hash:{},fn:e.program(3,r,0),inverse:e.noop,data:r}))?i:"")+">"+s((n.lang||t&&t.lang||a).call(l,"reset",{name:"lang",hash:{},data:r}))+'</button></span>\r\n<button class="btn btn-primary align-middle ml-2 submit" '+(null!=(i=n.if.call(l,null!=(i=null!=t?t.options:t)?i.submitDisabled:i,{name:"if",hash:{},fn:e.program(3,r,0),inverse:e.noop,data:r}))?i:"")+">"+s((n.lang||t&&t.lang||a).call(l,"submit",{name:"lang",hash:{},data:r}))+"</button>"},useData:!0})},1419:function(e,t,n){var o=n(10);e.exports=(o.default||o).template({1:function(e,t,n,o,r){e.propertyIsEnumerable;var i,l,a=e.escapeExpression,s=null!=t?t:e.nullContext||{},u=e.hooks.helperMissing;return'<div class="m-auto text-warning '+a(e.lambda(null!=(i=null!=t?t.styles:t)?i.svgContainer:i,t))+'">'+(null!=(i="function"==typeof(l=null!=(l=n.warningSvg||(null!=t?t.warningSvg:t))?l:u)?l.call(s,{name:"warningSvg",hash:{},data:r}):l)?i:"")+"</div>\r\n<p>\r\n <div>"+(null!=(i="function"==typeof(l=null!=(l=n.onlineCopyCountText||(null!=t?t.onlineCopyCountText:t))?l:u)?l.call(s,{name:"onlineCopyCountText",hash:{},data:r}):l)?i:"")+' will be migrated to your Library Editor ignoring all warnings.</div>\r\n <span class="text-danger">\r\n '+a("function"==typeof(l=null!=(l=n.warningText||(null!=t?t.warningText:t))?l:u)?l.call(s,{name:"warningText",hash:{},data:r}):l)+"\r\n </span>\r\n</p> \r\n"},3:function(e,t,n,o,r){var i,l;e.propertyIsEnumerable;return"<p>"+(null!=(i="function"==typeof(l=null!=(l=n.doNotAddCountText||(null!=t?t.doNotAddCountText:t))?l:e.hooks.helperMissing)?l.call(null!=t?t:e.nullContext||{},{name:"doNotAddCountText",hash:{},data:r}):l)?i:"")+" will be removed from this list and will not be added to your library.</p>\r\n"},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!=t?t.onlineCopyCount:t,{name:"if",hash:{},fn:e.program(1,r,0),inverse:e.noop,data:r}))?i:"")+(null!=(i=n.if.call(l,null!=t?t.doNotAddCount:t,{name:"if",hash:{},fn:e.program(3,r,0),inverse:e.noop,data:r}))?i:"")},useData:!0})},1420:function(e,t,n){var o=n(10);e.exports=(o.default||o).template({1:function(e,t,n,o,r){e.propertyIsEnumerable;var i,l=null!=t?t:e.nullContext||{},a=e.hooks.helperMissing,s=e.escapeExpression;return' <h2 class="h3">'+s((n.lang||t&&t.lang||a).call(l,"couldNotBeMigrated",{name:"lang",hash:{smartCount:null!=(i=null!=t?t.options:t)?i.items:i},data:r}))+'</h2>\r\n <p class="mb-1">'+s((n.lang||t&&t.lang||a).call(l,"ensureValidity",{name:"lang",hash:{},data:r}))+'</p>\r\n <p class="mb-2"><a href="'+s(e.lambda(null!=(i=null!=t?t.options:t)?i.supportArticle:i,t))+'" target="_blank" class="text-info">'+s((n.lang||t&&t.lang||a).call(l,"moreInfo",{name:"lang",hash:{},data:r}))+'</a></p>\r\n <button class="approve-all btn btn-success d-inline-block mr-2" type="button">'+s((n.lang||t&&t.lang||a).call(l,"resolve",{name:"lang",hash:{},data:r}))+'</button>\r\n <button class="do-not-add btn btn-link d-inline-block" type="button">'+s((n.lang||t&&t.lang||a).call(l,"dismiss",{name:"lang",hash:{},data:r}))+"</button>\r\n"},3:function(e,t,n,o,r){return""},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,r){e.propertyIsEnumerable;var i,l=e.lambda,a=e.escapeExpression;return'<div class="tab-region '+a(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.tabsContainer:i,t))+' border-bottom"></div>\r\n<div class="p-3 border-bottom '+a(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.headingContainer:i,t))+'">\r\n'+(null!=(i=n.if.call(null!=t?t:e.nullContext||{},null!=(i=null!=t?t.options:t)?i.items:i,{name:"if",hash:{},fn:e.program(1,r,0),inverse:e.program(3,r,0),data:r}))?i:"")+'</div>\r\n<div class="videos-region '+a(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.videoContainer:i,t))+'"></div>\r\n<div class="footer-region"></div>\r\n'},useData:!0})},1421:function(e,t,n){e.exports={migrationErrorView:"_1Jo6e",videoContainer:"_7tGnj",svgContainer:"csNIF",headingContainer:"_30NNv",tabsContainer:"_10__f"}},1473:function(e,t,n){"use strict";n.r(t);var o=n(1),r=n(2),i=n(5),l=n(30),a=n(3),s=n(16),u=n(309),c=n(4),p=n(42),f=n(201),d=n(0),h=n(9),y=n(12),g=n(305),m=n(1410),b=n(203),v=n(1046),w=n(103),k=n(1411),C=n(1075),O=n(1091);function E(e){return(E="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function x(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,o.key,o)}}function S(e,t){return(S=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function P(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=M(e);if(t){var r=M(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return j(this,n)}}function j(e,t){if(t&&("object"===E(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function M(e){return(M=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var _,R=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&&S(e,t)}(i,e);var t,n,o,r=P(i);function i(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),r.call(this,e)}return t=i,(n=[{key:"name",get:function(){return"ErroredVideoPreviewComponent"}},{key:"className",get:function(){return"p-3 border-top"}},{key:"template",get:function(){return k}},{key:"lang",get:function(){return"migrationWizard.erroredVideoPreview"}},{key:"regions",value:function(){return{description:{el:".description-region",replaceElement:!0},webplayer:{el:".webplayer-region"}}}},{key:"onRender",value:function(){this.showChildView("webplayer",new O.a({webPlayerUrl:this.options.webplayerUrl,model:new w.a({duration:1e3*this.model.get("duration"),thumbnail:{url:"".concat(this.options.imageCdnUrl,"v1/thumbnails/trackingcode/").concat(this.model.get("trackingCode"))},trackingCode:this.model.get("trackingCode")}),captureAnalytics:!1,currentUser:this.options.currentUser})),this.model.get("description")&&this.showChildView("description",new C.a({model:this.model,linkify:!0,size:C.b.Large,truncate:!0,allowExpand:!0}))}}])&&x(t.prototype,n),o&&x(t,o),Object.defineProperty(t,"prototype",{writable:!1}),i}(r.a.Component),V=n(1412),D=n(1413),T=n(53);function N(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var I="migrationWizard.utils",A=function(){return a.a.getPhrase(I,"videoFileCorrupt")},U=function(){return a.a.getPhrase(I,"videoFileInformationMissing")},L=function(){return a.a.getPhrase(I,"resouceFileMissing")},B=(N(_={},T.f.BinaryRemoved,(function(){return""})),N(_,T.f.LocalFileNotFound,(function(){return a.a.getPhrase(I,"videoFileMissing")})),N(_,T.f.DbEmptyChapter,A),N(_,T.f.DbChapterChecksumNotFound,A),N(_,T.f.DbChapterDurationNotFound,U),N(_,T.f.DbChapterFileSizeNotFound,U),N(_,T.f.DbChapterChecksumNotMatch,U),N(_,T.f.DbChapterDurationNotMatch,U),N(_,T.f.DbChapterFileSizeNotMatch,U),N(_,T.f.SubtitleUploadFailure,(function(){return a.a.getPhrase(I,"subtitleFileMissing")})),N(_,T.f.ResourceUploadFailure,L),N(_,T.f.ResourceFileNotFound,L),N(_,T.f.ResourceFileInvalid,L),N(_,T.f.DbResourceChecksumNotFound,L),N(_,T.f.DbResourceExtensionNotFound,L),N(_,T.f.DbResourceFileSizeNotFound,L),N(_,T.f.DbResourceChecksumNotMatch,L),N(_,T.f.DbResourceFileSizeNotMatch,L),N(_,T.f.CoverImageUploadFailure,(function(){return a.a.getPhrase(I,"thumbnailMissing")})),_),z=function(e){return o.unique(o.map(e,(function(e){return B[e]()})))},F=n(1051);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})(e)}function q(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function G(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function H(e,t){return(H=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function J(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=Z(e);if(t){var r=Z(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Y(this,n)}}function Y(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)}function Z(e){return(Z=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(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&&H(e,t)}(i,e);var t,n,o,r=J(i);function i(){return q(this,i),r.apply(this,arguments)}return t=i,(n=[{key:"name",get:function(){return"ErroredVideoMetadataComponent"}},{key:"template",get:function(){return V}},{key:"lang",get:function(){return"migrationWizard.erroredVideoMetadata"}},{key:"viewOptions",value:function(){return{styles:D,errorStrings:z(this.model.get("clientValidationResults")),ratingColorClass:this.model.get("rating")&&F.h.mapRatingToClass(this.model.get("rating").value)}}}])&&G(t.prototype,n),o&&G(t,o),Object.defineProperty(t,"prototype",{writable:!1}),i}(r.a.Component),Q="use-online-copy",X="do-not-add",$="migration:errored:videos:preview",ee="migration:errored:videos:selected",te=n(1414),ne=n(1415);function oe(e){return(oe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(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,o.key,o)}}function ie(e,t){return(ie=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function le(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=se(e);if(t){var r=se(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return ae(this,n)}}function ae(e,t){if(t&&("object"===oe(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function se(e){return(se=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var ue=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&&ie(e,t)}(i,e);var t,n,o,r=le(i);function i(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),r.call(this,e)}return t=i,(n=[{key:"initialize",value:function(){this.viewModel=l.a.get(ee),this.previewViewModel=l.a.get($),this.listenTo(this.viewModel,"change:".concat(this.model.get("id")),this.render)}},{key:"name",get:function(){return"ErroredVideoActionsComponent"}},{key:"template",get:function(){return ne}},{key:"lang",get:function(){return"migrationWizard.erroredVideoActions"}},{key:"className",get:function(){return"text-right"}},{key:"events",value:function(){return{"click .use-online-copy":"onClickSelect","click .dismiss":"onClickDismiss"}}},{key:"isSelected",value:function(){return this.viewModel.get(this.model.get("id"))===Q}},{key:"onClickSelect",value:function(e){e.stopPropagation(),this.previewViewModel.get(this.model.get("id"))&&this.previewViewModel.clear(),this.isSelected()?this.viewModel.unset(this.model.get("id")):this.viewModel.set(this.model.get("id"),Q)}},{key:"onClickDismiss",value:function(e){e.stopPropagation(),this.previewViewModel.get(this.model.get("id"))&&this.previewViewModel.clear(),this.viewModel.set(this.model.get("id"),X)}},{key:"viewOptions",value:function(){return{styles:te,selected:this.isSelected(),checkSvg:s.a.getSvg(s.b.Check),previewSvg:s.a.getSvg(s.b.Preview)}}}])&&re(t.prototype,n),o&&re(t,o),Object.defineProperty(t,"prototype",{writable:!1}),i}(r.a.Component),ce=n(1416),pe=n(1417);function fe(e){return(fe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function de(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}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,o.key,o)}}function ye(e,t){return(ye=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function ge(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=be(e);if(t){var r=be(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return me(this,n)}}function me(e,t){if(t&&("object"===fe(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function be(e){return(be=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(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&&ye(e,t)}(i,e);var t,n,o,r=ge(i);function i(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),r.call(this,e)}return t=i,(n=[{key:"initialize",value:function(){this.viewModel=l.a.get(ee),this.previewViewModel=l.a.get($),this.listenTo(this.viewModel,"change:".concat(this.model.get("id")),this.render),this.listenTo(this.previewViewModel,"change:".concat(this.model.get("id")),this.render),this.listenTo(this.channelName,"thumbnail:load",this.onThumbnailLoad)}},{key:"name",get:function(){return"ErroredVideoItemComponent"}},{key:"template",get:function(){return ce}},{key:"lang",get:function(){return"migrationWizard.erroredVideoItem"}},{key:"channelName",get:function(){return y.k.generateUniqueChannelName(this)}},{key:"className",get:function(){return"border-bottom ".concat(pe.component)}},{key:"regions",value:function(){var e;return de(e={},v.a.Thumbnail,".thumbnail-region"),de(e,v.a.Metadata,".metadata-region"),de(e,v.a.VideoActions,".video-actions-region"),de(e,v.a.VideoInfo,".video-info-region"),e}},{key:"events",value:function(){return{"click .drag-item":"onClick","click .undo":"onClickUndo"}}},{key:"onThumbnailLoad",value:function(){this.thumbnailLoaded=!0}},{key:"onClick",value:function(){this.previewViewModel.get(this.model.get("id"))?this.previewViewModel.unset(this.model.get("id")):(this.previewViewModel.clear(),this.previewViewModel.set(this.model.get("id"),!0))}},{key:"onClickUndo",value:function(){this.viewModel.unset(this.model.get("id"))}},{key:"shouldLazyLoadThumbnail",value:function(){return!!y.h.isLazyLoadSupported(d.p)&&!this.thumbnailLoaded}},{key:"renderThumbnail",value:function(){var e=new b.a({model:new w.a({duration:1e3*this.model.get("duration"),thumbnail:{url:"".concat(this.options.imageCdnUrl,"v1/thumbnails/trackingcode/").concat(this.model.get("trackingCode"))}}),lazyload:this.shouldLazyLoadThumbnail(),channelName:this.channelName});this.showChildView(v.a.Thumbnail,e)}},{key:"renderMetadata",value:function(){var e=new K({model:this.model});this.showChildView(v.a.Metadata,e)}},{key:"renderActions",value:function(){var e=new ue({model:this.model});this.showChildView(v.a.VideoActions,e)}},{key:"renderPreview",value:function(){if(this.previewViewModel.get(this.model.get("id"))){var e=new R({model:this.model,webplayerUrl:this.options.webplayerUrl,imageCdnUrl:this.options.imageCdnUrl,currentUser:this.options.currentUser});this.showChildView(v.a.VideoInfo,e)}}},{key:"viewOptions",value:function(){return{styles:pe,doNotAdd:this.viewModel.get(this.model.get("id"))===X}}},{key:"onRender",value:function(){this.renderThumbnail(),this.renderMetadata(),this.renderActions(),this.renderPreview()}}])&&he(t.prototype,n),o&&he(t,o),Object.defineProperty(t,"prototype",{writable:!1}),i}(r.a.Component);function we(e){return(we="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ke(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ce(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,o.key,o)}}function Oe(e,t,n){return t&&Ce(e.prototype,t),n&&Ce(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Ee(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)}function xe(e,t){return(xe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Se(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=je(e);if(t){var r=je(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Pe(this,n)}}function Pe(e,t){if(t&&("object"===we(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function je(e){return(je=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Me=function(e){Ee(n,e);var t=Se(n);function n(e){return ke(this,n),t.call(this,e)}return Oe(n,[{key:"name",get:function(){return"ErroredVideoItemComponentCollection"}},{key:"childView",get:function(){return ve}},{key:"childViewOptions",get:function(){return this.options}}]),n}(r.a.ComponentCollection),_e=function(e){Ee(n,e);var t=Se(n);function n(e){return ke(this,n),t.call(this,e)}return Oe(n,[{key:"name",get:function(){return"ErroredVideoListComponent"}},{key:"template",get:function(){return m}},{key:"behaviors",get:function(){return[{behaviorClass:g.c,selector:".lazy-img",minBrowserSupportVersion:d.p}]}},{key:"regions",value:function(){return{videos:{el:".videos-region",replaceElement:!0}}}},{key:"onRender",value:function(){this.showChildView("videos",new Me(this.options))}}]),n}(r.a.Component),Re=n(1418),Ve=n(6);function De(e){return(De="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Te(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function Ne(e,t){return(Ne=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Ie(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=Ue(e);if(t){var r=Ue(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Ae(this,n)}}function Ae(e,t){if(t&&("object"===De(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Ue(e){return(Ue=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Le=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&&Ne(e,t)}(a,e);var t,n,r,i=Ie(a);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.viewModel=l.a.get(ee),this.listenTo(this.viewModel,"change",this.render)}},{key:"name",get:function(){return"ErroredVideoFooterComponent"}},{key:"template",get:function(){return Re}},{key:"lang",get:function(){return"migrationWizard.erroredVideoFooter"}},{key:"className",get:function(){return"border-top px-3 py-2 text-right"}},{key:"events",value:function(){return{"click .clear-all":"onClickClearAll","click .submit":"onClickSubmit"}}},{key:"onClickClearAll",value:function(){this.viewModel.clear()}},{key:"onClickSubmit",value:function(){Ve.Radio.channel(this.options.channelName).trigger(this.options.submitEvent)}},{key:"canSubmit",value:function(){return this.viewModel.keys().length>0}},{key:"countWillBeAdded",value:function(){var e=this;return o.filter(this.viewModel.keys(),(function(t){return e.viewModel.get(t)===Q})).length}},{key:"viewOptions",value:function(){return{count:this.countWillBeAdded(),submitDisabled:!this.canSubmit()}}}])&&Te(t.prototype,n),r&&Te(t,r),Object.defineProperty(t,"prototype",{writable:!1}),a}(r.a.Component),Be=n(1132),ze=n(1123),Fe=n(1419),We=n(1420),qe=n(1421),Ge=n(145),He=n(308),Je=n(310);function Ye(e){return(Ye="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ze(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ke(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,o.key,o)}}function Qe(e,t){return(Qe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Xe(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=et(e);if(t){var r=et(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return $e(this,n)}}function $e(e,t){if(t&&("object"===Ye(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function et(e){return(et=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n.d(t,"MigrationErrorView",(function(){return tt}));var tt=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&&Qe(e,t)}(b,e);var t,n,g,m=Xe(b);function b(){return Ze(this,b),m.apply(this,arguments)}return t=b,(n=[{key:"initialize",value:function(){this.migrationVideoDataService=i.a.getInstance(d.g.MigrationVideo,this),this.navLockService=i.a.getInstance(d.x.NavLock,this),this.viewModel=l.a.get(ee),this.previewViewModel=l.a.get($),this.listenTo(d.e.MIGRATION,"manual:review:videos:sync",this.render),this.listenTo(this.channelName,"submit",this.onSubmit),this.listenTo(this.viewModel,"change",this.onChangeSelected),this.page=1}},{key:"name",get:function(){return"MigrationErrorView"}},{key:"title",get:function(){return a.a.getPhrase(this.lang,"title")}},{key:"lang",get:function(){return"migrationWizard.migrationError"}},{key:"channelName",get:function(){return y.k.generateUniqueChannelName(this)}},{key:"elements",get:function(){return{videos:".videos-region"}}},{key:"regions",value:function(){return{tabs:{el:".tab-region",replaceElement:!0},videos:{el:".videos-region",partialLoading:h.h.VideoList},footer:{el:".footer-region",replaceElement:!0}}}},{key:"behaviors",get:function(){return[{behaviorClass:u.a,region:"videos",type:h.c.ManualReviewVideos,emptyStateComponents:d.h}]}},{key:"template",get:function(){return We}},{key:"className",get:function(){return"bg-white w-100 ".concat(qe.migrationErrorView)}},{key:"events",value:function(){return{"click .approve-all":"onClickApproveAll","click .do-not-add":"onClickDoNotAdd"}}},{key:"onClickApproveAll",value:function(){var e={};this.collection.each((function(t){e[t.get("id")]=Q})),this.viewModel.set(e)}},{key:"onClickDoNotAdd",value:function(){this.previewViewModel.clear();var e={};this.collection.each((function(t){e[t.get("id")]=X})),this.viewModel.set(e)}},{key:"onChangeSelected",value:function(){this.viewModel.keys().length?this.navLockService.lock({title:a.a.getPhrase(this.lang,"navLockTitle"),text:a.a.getPhrase(this.lang,"navLockBody")}):this.navLockService.unlock()}},{key:"getDialog",value:function(e,t){return new y.d({title:a.a.getPhrase(this.lang,"dialogHeading"),text:Fe({onlineCopyCount:e,onlineCopyCountText:a.a.getPhrase(this.lang,"videos",{smartCount:e}),warningText:a.a.getPhrase(this.lang,"warningText",{smartCount:e}),doNotAddCount:t,doNotAddCountText:a.a.getPhrase(this.lang,"videos",{smartCount:t}),styles:qe,warningSvg:s.a.getSvg(s.b.Warning)}),buttons:[{text:a.a.getPhrase(this.lang,"submit"),className:"btn btn-primary",success:!0}]})}},{key:"getSelectedVideos",value:function(){var e=this,t=this.collection.filter((function(t){return e.viewModel.get(t.get("id"))===Q})),n=o.groupBy(t,(function(e){return e.get("category")})),i=o.map(o.keys(n),(function(e){return{folderChord:e,videoIds:o.map(n[e],(function(e){return e.get("id")}))}}));return new r.a.Collection(i)}},{key:"onSubmit",value:function(){var e=this,t=[],n=[];o.each(this.viewModel.keys(),(function(o){var r=e.viewModel.get(o);r===X&&t.push(+o),r===Q&&n.push(+o)}));var i=this.getDialog(n.length,t.length),l=!1,a=!1,s=0,u=function(){l&&a&&(n.length?(e.viewModel.clear({silent:!0}),e.navLockService.unlock(),r.a.AppLinkHelper.trigger({application:d.b.MIGRATION_WIZARD,action:d.a.MigrationWizard.PROGRESS,args:[s]})):(e.viewModel.clear(),e.migrationVideoDataService.clearCacheAndGetCustomerMetadata(),e.migrationVideoDataService.getManualReviewVideos(),delete e.collectionSubset))};i.render().done((function(){e.logMigrationActions(n,t),t.length?e.migrationVideoDataService.updateMigrationStatus(t,Be.a.HasNotBeenMigrated,(function(){l=!0,u()})):l=!0,n.length?e.migrationVideoDataService.finaliseCustomerVideos(e.getSelectedVideos(),!0,(function(e){a=!0,s=e.get("id"),u()})):a=!0}))}},{key:"logMigrationActions",value:function(e,t){var n=this;if(e.length){var r=o.map(e,(function(t){return n.processLogData(t,e)}));this.logData(c.UserAction.ResolveWarning,r)}if(t.length){var i=o.map(t,(function(e){return n.processLogData(e,t)}));this.logData(c.UserAction.DismissWarning,i)}}},{key:"logData",value:function(e,t){var n={location:c.LocationContext.MigrationWarnings,entity:c.EntityType.Video},o=t.length===this.collection.length;p.a.logUserAction(t,p.a.mergeOptions(n,{actionType:e,descriptor:o?c.OperationDescriptor.All:c.OperationDescriptor.Single}))}},{key:"processLogData",value:function(e,t){var n=this.collection.get(e).pick("name","trackingCode");return{id:e,name:n.name,trackingCode:n.trackingCode,actionCount:t.length,warningCount:this.collection.length}}},{key:"requiredResources",get:function(){return{config:f.b.config,currentUser:Ge.b.currentUser}}},{key:"unBindScroll",value:function(){this.getUI("videos").off("scroll")}},{key:"bindScroll",value:function(){this.scrollBound||(this.getUI("videos").on("scroll",o.bind(this.onScroll,this)),this.scrollBound=!0)}},{key:"onScroll",value:function(){var e=this.getUI("videos"),t=e.children().height()-e.height()/2;e.scrollTop()+e.height()<t||25*this.page>this.collection.length||(this.collectionSubset.add(o.first(this.collection.rest(25*this.page),25)),this.page++)}},{key:"viewOptions",value:function(){var e,t;return{styles:qe,supportArticle:Je.a.getArticle(null===(e=this.config)||void 0===e?void 0:e.get("supportSiteUrl"),He.a.ManuelReview,null===(t=this.currentUser)||void 0===t?void 0:t.get("countryCode")),items:this.collection&&this.collection.length}}},{key:"onBeforeRender",value:function(){return this.collection=this.migrationVideoDataService.getManualReviewVideos(),this.collection&&!this.collectionSubset&&(this.collectionSubset=new r.a.Collection(this.collection.first(25))),!!this.collection}},{key:"onRender",value:function(){this.showChildView("tabs",new ze.h({selected:"migration-errors"})),this.showChildView("videos",new _e({collection:this.collectionSubset,imageCdnUrl:this.config.get("imageCdnUrl"),webplayerUrl:this.config.get("webPlayerUrl"),currentUser:this.currentUser})),this.showChildView("footer",new Le({channelName:this.channelName,submitEvent:"submit"})),this.bindScroll()}},{key:"onBeforeDestroy",value:function(){this.unBindScroll()}},{key:"onDestroy",value:function(){l.a.clear($),l.a.clear(ee)}}])&&Ke(t.prototype,n),g&&Ke(t,g),Object.defineProperty(t,"prototype",{writable:!1}),b}(r.a.View)}}]);