@clickview/library-editor 1.5.0 → 1.5.1-rc.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (245) hide show
  1. package/dist/bundles.json +3 -3
  2. package/dist/css/1086-library-editor-968a46a22b.chunk.css +8 -0
  3. package/dist/css/1409-library-editor-c2f01466c5.chunk.css +2 -0
  4. package/dist/css/1832-library-editor-761fcb8755.chunk.css +2 -0
  5. package/dist/css/243-library-editor-ef57ff2380.chunk.css +4 -0
  6. package/dist/css/2526-library-editor-4e1576c40b.chunk.css +32 -0
  7. package/dist/css/2692-library-editor-968a46a22b.chunk.css +8 -0
  8. package/dist/css/3427-library-editor-d2c6b60f4b.chunk.css +18 -0
  9. package/dist/css/3803-library-editor-780ab340b7.chunk.css +28 -0
  10. package/dist/css/409-library-editor-38562d76cd.chunk.css +10 -0
  11. package/dist/css/4198-library-editor-b1bd4cf413.chunk.css +2 -0
  12. package/dist/css/4269-library-editor-deb40a91d3.chunk.css +14 -0
  13. package/dist/css/435-library-editor-cc1aed9a29.chunk.css +10 -0
  14. package/dist/css/4353-library-editor-ab9b6e56f4.chunk.css +8 -0
  15. package/dist/css/4463-library-editor-31ad107af8.chunk.css +30 -0
  16. package/dist/css/469-library-editor-e4fb95eadc.chunk.css +80 -0
  17. package/dist/css/4810-library-editor-f78ee0ac30.chunk.css +24 -0
  18. package/dist/css/4860-library-editor-d2f7f18ab7.chunk.css +2 -0
  19. package/dist/css/5047-library-editor-616fd087e9.chunk.css +22 -0
  20. package/dist/css/514-library-editor-58793ed69e.chunk.css +2 -0
  21. package/dist/css/5248-library-editor-673111a906.chunk.css +30 -0
  22. package/dist/css/5356-library-editor-84c7439a3a.chunk.css +32 -0
  23. package/dist/css/5624-library-editor-6d43685081.chunk.css +14 -0
  24. package/dist/css/5747-library-editor-a3e5ded646.chunk.css +2 -0
  25. package/dist/css/6093-library-editor-07e26e7dd0.chunk.css +2 -0
  26. package/dist/css/7053-library-editor-96752915ef.chunk.css +2 -0
  27. package/dist/css/8080-library-editor-fbbbd8b68b.chunk.css +14 -0
  28. package/dist/css/8343-library-editor-ecb0d73baf.chunk.css +20 -0
  29. package/dist/css/8420-library-editor-f8846ec2c2.chunk.css +40 -0
  30. package/dist/css/8762-library-editor-968a46a22b.chunk.css +8 -0
  31. package/dist/css/8906-library-editor-968a46a22b.chunk.css +8 -0
  32. package/dist/css/9298-library-editor-8876725368.chunk.css +12 -0
  33. package/dist/css/9383-library-editor-33aa5f52c7.chunk.css +32 -0
  34. package/dist/css/9695-library-editor-a995f8ddfd.chunk.css +2 -0
  35. package/dist/css/library-editor-app-80e343eeaa.css +121 -0
  36. package/dist/en.json +1 -1
  37. package/dist/scripts/1010-187155c696.chunk.js +1 -0
  38. package/dist/scripts/1086-f133353b06.chunk.js +1 -0
  39. package/dist/scripts/1409-5012f7ef74.chunk.js +1 -0
  40. package/dist/scripts/1832-a7aa0ecef5.chunk.js +1 -0
  41. package/dist/scripts/1934-3b82bbbc99.chunk.js +2 -0
  42. package/dist/scripts/1934-3b82bbbc99.chunk.js.LICENSE.txt +9 -0
  43. package/dist/scripts/2098-ad8754cfb1.chunk.js +1 -0
  44. package/dist/scripts/243-395c50486d.chunk.js +1 -0
  45. package/dist/scripts/2526-3655c9227a.chunk.js +1 -0
  46. package/dist/scripts/259-ee63296af8.chunk.js +1 -0
  47. package/dist/scripts/2692-68c581fa09.chunk.js +1 -0
  48. package/dist/scripts/2733-953a077283.chunk.js +1 -0
  49. package/dist/scripts/2803-3d9658a39f.chunk.js +1 -0
  50. package/dist/scripts/2888-dcb3f9554c.chunk.js +1 -0
  51. package/dist/scripts/299-8561db699d.chunk.js +1 -0
  52. package/dist/scripts/3019-8c7fdaf749.chunk.js +1 -0
  53. package/dist/scripts/3096-81108d029e.chunk.js +1 -0
  54. package/dist/scripts/3122-ef94efcef2.chunk.js +1 -0
  55. package/dist/scripts/3400-3a56ad67d9.chunk.js +1 -0
  56. package/dist/scripts/3427-c1019a852e.chunk.js +1 -0
  57. package/dist/scripts/3639-0889b8796c.chunk.js +1 -0
  58. package/dist/scripts/3763-66fb4f7ab9.chunk.js +1 -0
  59. package/dist/scripts/3803-ecb9aa097f.chunk.js +1 -0
  60. package/dist/scripts/400-1e23b44b3d.chunk.js +1 -0
  61. package/dist/scripts/409-7b2d72c33c.chunk.js +1 -0
  62. package/dist/scripts/4198-f2de3da811.chunk.js +1 -0
  63. package/dist/scripts/4201-a43528d101.chunk.js +1 -0
  64. package/dist/scripts/4245-85613e8ec8.chunk.js +1 -0
  65. package/dist/scripts/4269-6f9e82e570.chunk.js +1 -0
  66. package/dist/scripts/435-aacf684517.chunk.js +1 -0
  67. package/dist/scripts/4353-ef2f79f90d.chunk.js +1 -0
  68. package/dist/scripts/4463-71fd94bfb3.chunk.js +1 -0
  69. package/dist/scripts/4591-a6e8818803.chunk.js +1 -0
  70. package/dist/scripts/469-a5b931f910.chunk.js +2 -0
  71. package/dist/scripts/469-a5b931f910.chunk.js.LICENSE.txt +1 -0
  72. package/dist/scripts/4810-2d812b1847.chunk.js +1 -0
  73. package/dist/scripts/4860-1db82c2cda.chunk.js +1 -0
  74. package/dist/scripts/4885-0de9aceda4.chunk.js +1 -0
  75. package/dist/scripts/5047-4ca0d480d2.chunk.js +1 -0
  76. package/dist/scripts/514-e2257e58bd.chunk.js +1 -0
  77. package/dist/scripts/5248-b1f7b8d9fd.chunk.js +1 -0
  78. package/dist/scripts/5356-7abbf73447.chunk.js +1 -0
  79. package/dist/scripts/5412-6a3117fa77.chunk.js +1 -0
  80. package/dist/scripts/5418-94a6b15be1.chunk.js +1 -0
  81. package/dist/scripts/546-9f0093aa66.chunk.js +1 -0
  82. package/dist/scripts/5624-8aa90b5f57.chunk.js +1 -0
  83. package/dist/scripts/5747-9a64e93671.chunk.js +1 -0
  84. package/dist/scripts/6093-c2088a505f.chunk.js +1 -0
  85. package/dist/scripts/6420-218dd42b2a.chunk.js +1 -0
  86. package/dist/scripts/6774-de07d107a4.chunk.js +1 -0
  87. package/dist/scripts/6788-f6b0a8cc33.chunk.js +1 -0
  88. package/dist/scripts/693-26dce53392.chunk.js +1 -0
  89. package/dist/scripts/7053-4c386601c3.chunk.js +1 -0
  90. package/dist/scripts/7190-6574587b99.chunk.js +1 -0
  91. package/dist/scripts/7251-a247842ccb.chunk.js +2 -0
  92. package/dist/scripts/7251-a247842ccb.chunk.js.LICENSE.txt +13 -0
  93. package/dist/scripts/733-3dc29f5775.chunk.js +1 -0
  94. package/dist/scripts/8074-2f29dcbf11.chunk.js +1 -0
  95. package/dist/scripts/8080-34a458a81c.chunk.js +1 -0
  96. package/dist/scripts/8343-5ea346ff5b.chunk.js +1 -0
  97. package/dist/scripts/8362-a0a23ba68a.chunk.js +1 -0
  98. package/dist/scripts/8420-1a5b232743.chunk.js +1 -0
  99. package/dist/scripts/8726-7e3e7b6535.chunk.js +1 -0
  100. package/dist/scripts/8727-64c035a56f.chunk.js +1 -0
  101. package/dist/scripts/8762-02bdc15632.chunk.js +1 -0
  102. package/dist/scripts/8906-9920a2a83d.chunk.js +1 -0
  103. package/dist/scripts/9167-a9d920d75e.chunk.js +1 -0
  104. package/dist/scripts/9231-5de6f18fae.chunk.js +2 -0
  105. package/dist/scripts/9231-5de6f18fae.chunk.js.LICENSE.txt +17 -0
  106. package/dist/scripts/9298-8438cbb300.chunk.js +1 -0
  107. package/dist/scripts/9355-3a23e503c3.chunk.js +1 -0
  108. package/dist/scripts/9357-f0b8bc48ad.chunk.js +1 -0
  109. package/dist/scripts/9383-69a59536d6.chunk.js +1 -0
  110. package/dist/scripts/9592-de190aca67.chunk.js +1 -0
  111. package/dist/scripts/9695-dd63b52766.chunk.js +1 -0
  112. package/dist/scripts/bundle-60541f84c7.min.js +2 -0
  113. package/dist/scripts/bundle-60541f84c7.min.js.LICENSE.txt +1 -0
  114. package/dist/scripts/polyfills-c62d0e7aec.min.js +1 -0
  115. package/package.json +3 -25
  116. package/typings/libs/google-api.d.ts +5 -0
  117. package/typings/libs/microsoft-teams.d.ts +3 -0
  118. package/typings/libs/videojs-contrib-quality-levels.d.ts +31 -0
  119. package/dist/css/0-library-editor-c3083c7c46.chunk.css +0 -6
  120. package/dist/css/1-library-editor-9a899a1d1d.chunk.css +0 -2
  121. package/dist/css/10-library-editor-53c28be130.chunk.css +0 -2
  122. package/dist/css/12-library-editor-7f17ad1c90.chunk.css +0 -24
  123. package/dist/css/13-library-editor-911b8069ae.chunk.css +0 -14
  124. package/dist/css/14-library-editor-f507c0ef52.chunk.css +0 -14
  125. package/dist/css/15-library-editor-6fd06eea2a.chunk.css +0 -4
  126. package/dist/css/16-library-editor-6b9ba08288.chunk.css +0 -4
  127. package/dist/css/17-library-editor-b08725a10e.chunk.css +0 -2
  128. package/dist/css/18-library-editor-89ad109c63.chunk.css +0 -2
  129. package/dist/css/22-library-editor-2bd52b5a32.chunk.css +0 -34
  130. package/dist/css/23-library-editor-a7633bece5.chunk.css +0 -26
  131. package/dist/css/24-library-editor-459b106aec.chunk.css +0 -24
  132. package/dist/css/25-library-editor-33acb75c24.chunk.css +0 -18
  133. package/dist/css/26-library-editor-b180014922.chunk.css +0 -18
  134. package/dist/css/27-library-editor-4c64aed388.chunk.css +0 -16
  135. package/dist/css/28-library-editor-b72d0e2d36.chunk.css +0 -10
  136. package/dist/css/29-library-editor-de55d150ef.chunk.css +0 -10
  137. package/dist/css/3-library-editor-904319558a.chunk.css +0 -4
  138. package/dist/css/30-library-editor-b0e16f882d.chunk.css +0 -8
  139. package/dist/css/31-library-editor-10f54d8a75.chunk.css +0 -8
  140. package/dist/css/32-library-editor-9dfe56513f.chunk.css +0 -10
  141. package/dist/css/36-library-editor-d18b8a3619.chunk.css +0 -4
  142. package/dist/css/37-library-editor-8b225d15f4.chunk.css +0 -4
  143. package/dist/css/38-library-editor-b08725a10e.chunk.css +0 -2
  144. package/dist/css/39-library-editor-b08725a10e.chunk.css +0 -2
  145. package/dist/css/40-library-editor-9a2d011500.chunk.css +0 -4
  146. package/dist/css/41-library-editor-234f39ca94.chunk.css +0 -4
  147. package/dist/css/42-library-editor-593c0084b4.chunk.css +0 -4
  148. package/dist/css/43-library-editor-ca20e9d127.chunk.css +0 -2
  149. package/dist/css/44-library-editor-aa3e9bea9a.chunk.css +0 -2
  150. package/dist/css/45-library-editor-7b1cd4a5cc.chunk.css +0 -2
  151. package/dist/css/46-library-editor-f1820aeeff.chunk.css +0 -2
  152. package/dist/css/47-library-editor-547abc7492.chunk.css +0 -2
  153. package/dist/css/48-library-editor-3f6fb7f3ab.chunk.css +0 -2
  154. package/dist/css/49-library-editor-467e156ba3.chunk.css +0 -2
  155. package/dist/css/5-library-editor-24603066ed.chunk.css +0 -6
  156. package/dist/css/51-library-editor-7aca18778d.chunk.css +0 -2
  157. package/dist/css/52-library-editor-81c5aced1f.chunk.css +0 -2
  158. package/dist/css/56-library-editor-d3b8bb68f9.chunk.css +0 -2
  159. package/dist/css/57-library-editor-94a8c4e7fa.chunk.css +0 -2
  160. package/dist/css/58-library-editor-61808b02a0.chunk.css +0 -2
  161. package/dist/css/59-library-editor-c49b3847df.chunk.css +0 -2
  162. package/dist/css/6-library-editor-d96af27be1.chunk.css +0 -14
  163. package/dist/css/60-library-editor-8f5e04b64a.chunk.css +0 -2
  164. package/dist/css/61-library-editor-b64f6f3e74.chunk.css +0 -2
  165. package/dist/css/63-library-editor-7f123672b2.chunk.css +0 -2
  166. package/dist/css/64-library-editor-61e4c24a7b.chunk.css +0 -2
  167. package/dist/css/7-library-editor-b08725a10e.chunk.css +0 -2
  168. package/dist/css/8-library-editor-eb68c1df75.chunk.css +0 -2
  169. package/dist/css/9-library-editor-fec6984a64.chunk.css +0 -4
  170. package/dist/css/library-editor-app-bc12f8ea16.css +0 -135
  171. package/dist/scripts/0-01f04d6d56.chunk.js +0 -1
  172. package/dist/scripts/1-55d605c2c4.chunk.js +0 -1
  173. package/dist/scripts/10-3f2a274869.chunk.js +0 -1
  174. package/dist/scripts/11-f164d2f418.chunk.js +0 -11
  175. package/dist/scripts/12-c1693e5672.chunk.js +0 -1
  176. package/dist/scripts/13-c2b9880d80.chunk.js +0 -1
  177. package/dist/scripts/14-a8bbfcc005.chunk.js +0 -1
  178. package/dist/scripts/15-46f82eb565.chunk.js +0 -1
  179. package/dist/scripts/16-b2e034d835.chunk.js +0 -1
  180. package/dist/scripts/17-cf12ff6692.chunk.js +0 -1
  181. package/dist/scripts/18-3d7b2bb66b.chunk.js +0 -1
  182. package/dist/scripts/19-4050e84d9e.chunk.js +0 -1
  183. package/dist/scripts/2-cd7f1d10b5.chunk.js +0 -1
  184. package/dist/scripts/22-10eeb6ed95.chunk.js +0 -1
  185. package/dist/scripts/23-3176524b2e.chunk.js +0 -1
  186. package/dist/scripts/24-2620726cc2.chunk.js +0 -1
  187. package/dist/scripts/25-4277b864b4.chunk.js +0 -1
  188. package/dist/scripts/26-29a13a6b02.chunk.js +0 -1
  189. package/dist/scripts/27-66f129aade.chunk.js +0 -1
  190. package/dist/scripts/28-2cb1321628.chunk.js +0 -1
  191. package/dist/scripts/29-7d3e020b57.chunk.js +0 -1
  192. package/dist/scripts/3-408b6c2e20.chunk.js +0 -1
  193. package/dist/scripts/30-59dc5e292e.chunk.js +0 -1
  194. package/dist/scripts/31-e5be7f6d55.chunk.js +0 -1
  195. package/dist/scripts/32-9d14a73828.chunk.js +0 -1
  196. package/dist/scripts/33-2b7afd675e.chunk.js +0 -1
  197. package/dist/scripts/34-3449671540.chunk.js +0 -1
  198. package/dist/scripts/35-a553d5a148.chunk.js +0 -1
  199. package/dist/scripts/36-e494df0f54.chunk.js +0 -1
  200. package/dist/scripts/37-4f2ae73dc5.chunk.js +0 -1
  201. package/dist/scripts/38-a569e85303.chunk.js +0 -1
  202. package/dist/scripts/39-04168942c9.chunk.js +0 -1
  203. package/dist/scripts/4-512c8f05c3.chunk.js +0 -1
  204. package/dist/scripts/40-203241bd8d.chunk.js +0 -1
  205. package/dist/scripts/41-5d00db5a16.chunk.js +0 -1
  206. package/dist/scripts/42-493f93fd61.chunk.js +0 -1
  207. package/dist/scripts/43-f03b40f6bc.chunk.js +0 -1
  208. package/dist/scripts/44-cdca04fbae.chunk.js +0 -1
  209. package/dist/scripts/45-2f3e679889.chunk.js +0 -1
  210. package/dist/scripts/46-af1a164c00.chunk.js +0 -1
  211. package/dist/scripts/47-bd07b4acee.chunk.js +0 -1
  212. package/dist/scripts/48-f709ce0290.chunk.js +0 -1
  213. package/dist/scripts/49-dafac4cd90.chunk.js +0 -1
  214. package/dist/scripts/5-706a90d50a.chunk.js +0 -1
  215. package/dist/scripts/50-9d66026f2b.chunk.js +0 -1
  216. package/dist/scripts/51-f37ca8fa1b.chunk.js +0 -1
  217. package/dist/scripts/52-d1d8bedaad.chunk.js +0 -1
  218. package/dist/scripts/53-a42f975523.chunk.js +0 -1
  219. package/dist/scripts/54-d02dcc88dd.chunk.js +0 -1
  220. package/dist/scripts/55-37223f5e6c.chunk.js +0 -1
  221. package/dist/scripts/56-a90ebf7e95.chunk.js +0 -1
  222. package/dist/scripts/57-952cbdd523.chunk.js +0 -1
  223. package/dist/scripts/58-4d4d2ab11c.chunk.js +0 -1
  224. package/dist/scripts/59-6ce8d22854.chunk.js +0 -1
  225. package/dist/scripts/6-90ce8bfc8e.chunk.js +0 -1
  226. package/dist/scripts/60-18494da9d7.chunk.js +0 -1
  227. package/dist/scripts/61-86685720a1.chunk.js +0 -1
  228. package/dist/scripts/62-96300609c4.chunk.js +0 -1
  229. package/dist/scripts/63-5cf8bf730e.chunk.js +0 -1
  230. package/dist/scripts/64-a9e7449778.chunk.js +0 -1
  231. package/dist/scripts/65-55bda72c96.chunk.js +0 -1
  232. package/dist/scripts/66-55a1693f05.chunk.js +0 -1
  233. package/dist/scripts/67-86aac165f9.chunk.js +0 -1
  234. package/dist/scripts/68-fed6d09e61.chunk.js +0 -1
  235. package/dist/scripts/69-3ae70614ff.chunk.js +0 -1
  236. package/dist/scripts/7-1dc25bf167.chunk.js +0 -1
  237. package/dist/scripts/70-a06f10c030.chunk.js +0 -1
  238. package/dist/scripts/71-879b44e721.chunk.js +0 -1
  239. package/dist/scripts/72-68e8c56940.chunk.js +0 -1
  240. package/dist/scripts/73-2e1903d7ed.chunk.js +0 -1
  241. package/dist/scripts/74-8e2e1cb7a9.chunk.js +0 -1
  242. package/dist/scripts/8-02b96935fe.chunk.js +0 -1
  243. package/dist/scripts/9-ae30afaedb.chunk.js +0 -1
  244. package/dist/scripts/bundle-dec56a0065.min.js +0 -10
  245. package/dist/scripts/polyfills-0fbc27cd8a.min.js +0 -1
@@ -1 +0,0 @@
1
- (window.webpackJsonp_clickview_library_editor=window.webpackJsonp_clickview_library_editor||[]).push([[35],{1051:function(e,t,r){"use strict";r.d(t,"a",(function(){return d}));var n=r(2),a=r(265);function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function s(e,t){return(s=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 r,n=f(e);if(t){var a=f(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return l(this,r)}}function l(e,t){if(t&&("object"===i(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function f(e){return(f=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var d=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&s(e,t)}(l,e);var t,r,n,i=c(l);function l(){return o(this,l),i.apply(this,arguments)}return t=l,(r=[{key:"defaults",value:function(){return e={},t=a.c.Disabled,r=!0,t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e;var e,t,r}}])&&u(t.prototype,r),n&&u(t,n),Object.defineProperty(t,"prototype",{writable:!1}),l}(n.a.Model)},1057:function(e,t,r){"use strict";var n=r(1061),a=r(1058),i=(r(1059),r(3),r(1062)),o=(r(1064),r(1060));r.d(t,"a",(function(){return n.a})),r.d(t,"d",(function(){return a.g})),r.d(t,"g",(function(){return a.j})),r.d(t,"f",(function(){return a.i})),r.d(t,"c",(function(){return a.f})),r.d(t,"e",(function(){return a.h})),r.d(t,"b",(function(){return i.a})),r.d(t,"h",(function(){return o.a}))},1058:function(e,t,r){"use strict";r.d(t,"a",(function(){return d})),r.d(t,"k",(function(){return p})),r.d(t,"g",(function(){return g})),r.d(t,"e",(function(){return b})),r.d(t,"j",(function(){return h})),r.d(t,"i",(function(){return v})),r.d(t,"c",(function(){return w})),r.d(t,"b",(function(){return E})),r.d(t,"d",(function(){return x})),r.d(t,"f",(function(){return P})),r.d(t,"h",(function(){return y}));var n=r(2),a=r(1),i=r(19),o=r(29),u=r(3),s="libraryEditor.utils",c=["tags","thumbnail","chapters","resources","subtitles","disabled","links","restrictions","categories"];function l(e,t){if(e){var r=a.reduce(e,(function(e,r,n){var i=t[n];return r||i?a.isObject(r)&&a.isObject(i)&&!a.isUndefined(r.id)&&r.id===i.id?e:a.isArray(r)?f(r,i).length?e.concat(n):e:a.isEqual(r,i)?e:e.concat(n):e}),[]);if(r.length)return a.object(a.map(r,(function(r){return a.isArray(t[r])?[r,f(e[r],t[r])]:[r,t[r]]})))}}function f(e,t){var r=[];return a.each(t,(function(t){var n=a.findWhere(e,{id:t.id});if(!a.isUndefined(n)||0!==Object.keys(t).length){var i=a.isUndefined(n)?t:l(n,t);i&&(t.id<0&&!t.value||(!n||t.id<0?r.push(t):(i.id=t.id,r.push(i))))}})),r}var d={getChanges:function(e,t){var r=l(a.omit(e.toJSON(),c),a.omit(t.toJSON(),c));if(r)return a.object(a.map(a.keys(r),(function(e){return[e,d.formatChanges(e,r[e])]})))},formatChanges:function(e,t){if(!t)return null;if(a.isObject(t)&&a.isEmpty(t))return null;switch(e){case"name":case"description":case"productionYear":case"dateBroadcast":case"fields":case"episodeNumber":return t;case"channel":case"series":case"rating":case"season":return{id:t.id};case"distributors":case"producers":case"directors":case"productionCompanies":return a.map(t,(function(e){return e.id}));case"dateModified":case"hasBroadcast":case"seriesSort":return;default:n.a.ErrorHelper.throw(new i.a("There are no formatting settings for ".concat(e)))}},updateModelState:function(e,t,r){var i=["distributors","producers","directors","productionCompanies"];for(var o in a.each(a.keys(r),(function(e){i.includes(e)&&(r[e]=t.get(e).toJSON())})),t.set(a.clone(r),{silent:!0}),e.set(t.toJSON(),{silent:!0}),r){if(!r[o]&&e.associations[o]){var u=e.get(o);(u instanceof n.a.Model||u instanceof n.a.NestedModel)&&u.clear()}}},getRemovedObjectIds:function(e,t){var r=["distributors","productionCompanies","producers","directors"],n={};return a.each(a.keys(e.toJSON()),(function(i){if(a.contains(r,i)){var o=e.get(i).map((function(e){return e.id})),u=t.get(i).map((function(e){return e.id})),s=a.filter(o,(function(e){return e&&!a.contains(u,e)}));s.length&&(n[i]=s)}})),n}},p={name:[{required:!0,msg:function(){return u.a.getPhrase(s,"videoTitleRequired")}},{maxLength:255,msg:function(){return u.a.getPhrase(s,"videoTitleExceeds")}}],description:[{required:!1},{maxLength:16e3,msg:function(){return u.a.getPhrase(s,"videoDescriptionExceeds")}}],episodeNumber:function(e,t,r){return e&&e<1?u.a.getPhrase(s,"episodeNumberLessThanOne"):e&&e>2147483647?u.a.getPhrase(s,"episodeNumberExceeds"):e%1!=0?u.a.getPhrase(s,"episodeNumberNotWhole"):r.season&&r.season.get("number")>=0&&null===e?u.a.getPhrase(s,"episodeNumberNoSeason"):""},season:function(e,t,r){return r.season&&r.season.get("number")||e&&e.number||!r.episodeNumber?"":u.a.getPhrase(s,"seasonNoEpisodeNumber")}},m=o().year(),b={productionYear:function(e){return e||0===e?(e=+e,isNaN(e)?"Production year must be a number.":e<1900||e>m?u.a.getPhrase(s,"validProductionYears",{currentYear:m}):void 0):""}},g={name:[{required:!0,msg:function(){return u.a.getPhrase(s,"resourceNameRequired")}}]},h={suggestion:[{required:!0,msg:function(){return u.a.getPhrase(s,"suggestEditRequired")}},{maxLength:16e3,msg:function(){return u.a.getPhrase(s,"suggestEditExceeds")}}],reason:[{required:!0,msg:function(){return u.a.getPhrase(s,"suggestEditReasonRequired")}},{maxLength:16e3,msg:function(){return u.a.getPhrase(s,"suggestEditReasonExceeds")}}]},y={number:function(e){return e?+e<1?u.a.getPhrase(s,"seasonLessThanOne"):+e>3e3?u.a.getPhrase(s,"seasonExceeds"):+e%1!=0?u.a.getPhrase(s,"seasonNotWhole"):"":u.a.getPhrase(s,"seasonRequired")}},v={empty:function(){return u.a.getPhrase(s,"suggestEditRatingRequired")},original:function(){return u.a.getPhrase(s,"suggestEditRatingInvalid")}},P={url:[{required:!0,pattern:"url",msg:function(){return u.a.getPhrase(s,"linkUrlRequired")}},{maxLength:16e3,msg:function(){return u.a.getPhrase(s,"linkUrlExceeds")}}],name:[{required:!0,msg:function(){return u.a.getPhrase(s,"linkNameRequired")}},{maxLength:255,msg:function(){return u.a.getPhrase(s,"linkNameExceeds")}}]},w={name:[{maxLength:128,msg:function(){return u.a.getPhrase(s,"fieldNameExceeds")}}],value:[{maxLength:16e3,msg:function(){return u.a.getPhrase(s,"fieldValueExceeds")}}]},E={fields:function(e){return e&&e.length?e.all((function(e){return!1!==e.isValid()}))?"":u.a.getPhrase(s,"fieldsInvalid"):""}};function x(){return[{id:-1,name:"Admin Notes",value:"",placeholder:"Notes that only admins will see"}]}},1059:function(e,t,r){"use strict";r.d(t,"a",(function(){return l}));var n=r(1),a=r(48),i=r(169),o=r(3),u="libraryEditor.utils",s={name:[{required:!0,msg:function(){return o.a.getPhrase(u,"folderNameRequired")}},{maxLength:255,msg:function(){return o.a.getPhrase(u,"folderNameExceeds")}}]},c=function(e,t){return{parentId:function(r){return r?a.a.calculateDestinationFolderDepth(e,r,t)>i.a.MAX_FOLDER_DEPTH?o.a.getPhrase(u,"maxFolderDepth",{maxDepth:i.a.MAX_FOLDER_DEPTH}):"":o.a.getPhrase(u,"selectParentFolder")}}},l=function(e){var t=e.validateName,r=e.validateParent,a=e.folder,i=e.collection;return t&&r?n.extend({},s,c(a,i)):t?s:r?c(a,i):void 0}},1060:function(e,t,r){"use strict";r.d(t,"a",(function(){return f}));var n=r(16),a=r(3),i=r(201),o=r(1077),u=r(63);function s(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var c,l="libraryEditor.utils";!function(e){e.Pdf="pdf",e.Image="image",e.PowerPoint="powerpoint",e.Document="document",e.Excel="excel",e.Zip="archive",e.File="text"}(c||(c={}));var f={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.get("type")){case u.a.HostedLibrary:case u.a.CustomLibrary:return e.get("name");case u.a.Exchange:return a.a.getPhrase(l,"exchange");case u.a.Workspace:return a.a.getPhrase(l,"workspace");default:return""}},mapSourceToClass:function(e){switch(e){case u.a.HostedLibrary:case u.a.CustomLibrary:return"bg-info";case u.a.Exchange:return"bg-green";case u.a.Workspace:default:return"bg-red"}},isInteractive:function(e){return!(!e||!e.interactives)&&!!e.interactives.length},mapTypeToSvg:function(e){var t,r=(s(t={},c.Pdf,n.b.FilePDF),s(t,c.Image,n.b.FileImg),s(t,c.PowerPoint,n.b.FilePowerpoint),s(t,c.Document,n.b.FileWord),s(t,c.Excel,n.b.FileExcel),s(t,c.Zip,n.b.FileZip),s(t,c.File,n.b.File),t)[e];return r||(r=n.b.Folder),n.a.getSvg(r)},mapTypeToClass:function(e){switch(e){case c.Pdf:return"icon-red";case c.Image:return"icon-purple";case c.Document:return"icon-blue";case c.Excel:return"icon-green";case c.PowerPoint:return"icon-orange";case c.Zip:return"icon-teal";case c.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 c.Pdf:return a.a.getPhrase(l,"pdf");case c.Image:return a.a.getPhrase(l,"image");case c.Document:return a.a.getPhrase(l,"document");case c.Excel:return a.a.getPhrase(l,"spreadsheet");case c.PowerPoint:return a.a.getPhrase(l,"presentation");case c.Zip:return a.a.getPhrase(l,"zipArchive");case c.File:return a.a.getPhrase(l,"file");default:return""}},translateMetadataCollectionNames:function(e){return new o.a(e.map((function(e){return Object.assign(Object.assign({},e.toJSON()),{name:f.translateMetadataName(e.get("name"))})})))},translateMetadataName:function(e){var t="suggestEdit";switch(e){case i.MetadataType.VideoTitle:t+="VideoTitle";break;case i.MetadataType.Description:t+="Description";break;case i.MetadataType.Rating:t+="Rating";break;case i.MetadataType.SeriesTitle:t+="SeriesTitle";break;case i.MetadataType.Season:t+="SeasonNumber";break;case i.MetadataType.EpisodeNumber:t+="EpisodeNumber";break;case i.MetadataType.BroadcastDate:t+="BroadcastDate";break;case i.MetadataType.Channel:t+="Channel";break;case i.MetadataType.ProductionYear:t+="ProductionYear";break;case i.MetadataType.Distributors:t+="Distributors";break;case i.MetadataType.ProductionCompanies:t+="ProductionCompanies";break;case i.MetadataType.Directors:t+="Directors";break;case i.MetadataType.Producers:t+="Producers";break;case i.MetadataType.Other:t+="Other"}return a.a.getPhrase(l,t)}}},1061:function(e,t,r){"use strict";r.d(t,"a",(function(){return u}));var n=r(1),a=r(12),i=r(3),o="libraryEditor.utils",u={isValidChapterTime:function(e,t,r,i){if(i){if(!n.isNumber(t))return s.StartTime.Invalid();if(t<0)return s.StartTime.Invalid();if(t>a.x.millisecondsToSeconds(r))return s.StartTime.Exceeds();if(i.some((function(r){return!(r.id&&r.id===e.id||r.cid===e.cid)&&r.get("startTime")===t})))return s.StartTime.Exists()}},isValidChapterName:function(e,t,r){return t?t.length>255?s.Name.MaxLength():r.some((function(r){return!(r.id&&r.id===e.id||r.cid===e.cid)&&r.get("name").trim()===t.trim()}))?s.Name.Exists():n.isEmpty(t.trim())?s.Name.Invalid():void 0:s.Name.Invalid()},mapPhysicalChapters:function(e){var t=0;return n.map(e,(function(e,r){var n={name:e.title,startTime:t,index:r,isPhysicalChapter:!0};return t+=e.duration,n}))}},s={Name:{Invalid:function(){return i.a.getPhrase(o,"chapterNameInvalid")},Exists:function(){return i.a.getPhrase(o,"chapterNameExists")},MaxLength:function(){return i.a.getPhrase(o,"chapterNameExceeds")}},StartTime:{Invalid:function(){return i.a.getPhrase(o,"chapterStartTimeInvalid")},Exists:function(){return i.a.getPhrase(o,"chapterStartTimeExists")},Exceeds:function(){return i.a.getPhrase(o,"chapterStartTimeExceeds")}}}},1062:function(e,t,r){"use strict";r.d(t,"a",(function(){return i}));var n=r(3),a="libraryEditor.utils",i={name:[{required:!0,msg:function(){return n.a.getPhrase(a,"libraryNameRequired")}},{maxLength:255,msg:function(){return n.a.getPhrase(a,"libraryNameExceeds")}}]}},1064:function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(3),a=r(1058),i=n.a.encloseNamespace("libraryEditor.utils"),o={name:[{required:!0,msg:function(){return i("videoTitleRequired")}}],folderId:[{required:!0,msg:function(){return i("uploadFolderRequired")}}],libraryId:[{required:!0,msg:function(){return i("uploadLibraryRequired")}}],episodeNumber:function(e,t,r){return e&&e<1?i("episodeNumberLessThanOne"):e&&e>255?i("episodeNumberExceeds"):e&&e%1!=0?i("episodeNumberNotWhole"):r.season&&r.season.get("number")>=0&&null===e?i("episodeNumberNoSeason"):""},season:function(e,t,r){return r.season&&r.season.get("number")||e&&e.number||!r.episodeNumber?"":i("seasonNoEpisodeNumber")},productionYear:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return a.e.productionYear.apply(null,t)}}},1077:function(e,t,r){"use strict";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 a(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){return(o=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function u(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 r,n=c(e);if(t){var a=c(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return s(this,r)}}function s(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 c(e){return(c=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}r.d(t,"a",(function(){return l}));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&&o(e,t)}(c,e);var t,r,n,s=u(c);function c(){return i(this,c),s.apply(this,arguments)}return t=c,r&&a(t.prototype,r),n&&a(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}(r(2).a.Collection)},1312:function(e,t,r){var n=r(10);e.exports=(n.default||n).template({1:function(e,t,r,n,a){var i;e.propertyIsEnumerable;return(null!=(i=e.lambda(null!=(i=null!=t?t.options:t)?i.spinnerEl:i,t))?i:"")+"\r\n"},3:function(e,t,r,n,a){e.propertyIsEnumerable;var i=null!=t?t:e.nullContext||{},o=e.hooks.helperMissing,u=e.escapeExpression;return'<form>\r\n <div class="form-group">\r\n <label for="name" class="control-label">'+u((r.lang||t&&t.lang||o).call(i,"libraryName",{name:"lang",hash:{},data:a}))+'</label>\r\n <input name="name" id="name" type="text" class="form-control" placeholder="'+u((r.lang||t&&t.lang||o).call(i,"secondaryLibrary",{name:"lang",hash:{},data:a}))+'" autocomplete="off" autofocus/>\r\n <div class="form-feedback"></div>\r\n </div>\r\n</form>\r\n'},compiler:[8,">= 4.3.0"],main:function(e,t,r,n,a){var i;e.propertyIsEnumerable;return null!=(i=r.unless.call(null!=t?t:e.nullContext||{},null!=(i=null!=t?t.options:t)?i.dataFetched:i,{name:"unless",hash:{},fn:e.program(1,a,0),inverse:e.program(3,a,0),data:a}))?i:""},useData:!0})},1446:function(e,t,r){"use strict";r.r(t),r.d(t,"NewLibraryView",(function(){return k}));var n=r(6),a=r(2),i=r(5),o=r(30),u=r(3),s=r(69),c=r(305),l=r(145),f=r(0),d=r(265),p=r(137),m=r(1051),b=r(12),g=r(1057),h=r(147),y=r(207),v=r(1312),P=r.n(v);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 E(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function x(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function O(e,t){return(O=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function N(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 r,n=S(e);if(t){var a=S(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return T(this,r)}}function T(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 S(e){return(S=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&&O(e,t)}(T,e);var t,r,v,w=N(T);function T(){return E(this,T),w.apply(this,arguments)}return t=T,(r=[{key:"initialize",value:function(){this.model=o.a.get("new:library",null,{ctor:p.a}),this.bindListeners(),this.settingsDataService=i.a.getInstance(f.g.Settings,this),this.libraryDataService=i.a.getInstance(f.g.Library,this)}},{key:"bindListeners",value:function(){this.listenTo(f.e.SEARCH,"".concat(f.f.SETTINGS,":sync"),this.render)}},{key:"name",get:function(){return"NewLibraryView"}},{key:"title",get:function(){return u.a.getPhrase(this.lang,"title")}},{key:"lang",get:function(){return"libraryEditor.newLibrary"}},{key:"template",get:function(){return P.a}},{key:"channelName",get:function(){return b.k.generateUniqueChannelName(this)}},{key:"behaviors",get:function(){var e=this;return[{behaviorClass:c.a,modelValidation:g.b},{behaviorClass:c.f},{behaviorClass:c.e,title:u.a.getPhrase(this.lang,"heading"),spinnerButtonOptions:{model:this.spinnerModel=new m.a,channelName:this.channelName,buttonText:u.a.getPhrase(this.lang,"save"),onClick:function(t){return e.onSubmit(t)}}}]}},{key:"bindings",get:function(){return{"[name=name]":{observe:"name",setOptions:{validate:!0}}}}},{key:"events",value:function(){return{submit:"onSubmit"}}},{key:"onSubmit",value:function(e){e&&e.preventDefault(),this.model.validate(),this.model.isValid()&&(n.Radio.channel(this.channelName).trigger(d.b.ShowSpinner),this.createLibrary())}},{key:"createLibrary",value:function(){this.libraryDataService.createLibrary(this.currentUser.get("customerId"),this.model,(function(e){o.a.clear("new:library"),a.a.AppLinkHelper.trigger({application:f.b.LIBRARY_EDITOR,action:f.a.LibraryEditor.LIBRARY,args:[e.id]})}))}},{key:"requiredResources",get:function(){return{currentUser:l.b.currentUser,libraries:h.b.libraries}}},{key:"onBeforeRender",value:function(){this.maxCustomLibraries=this.settingsDataService.getSetting(this.currentUser.get("customerId"),s.a.MaxCustomLibraries),this.libraries.length>=this.maxCustomLibraries.get("value")?a.a.ErrorHelper.throw(new y.j(this.libraries.length,this.maxCustomLibraries.get("value"))):this.maxCustomLibraries&&this.spinnerModel.set(d.c.Disabled,!1)}},{key:"viewOptions",value:function(){return{dataFetched:!!this.maxCustomLibraries,spinnerEl:b.r.getSpinner({size:b.s.Large,extraClasses:"mx-auto"})}}}])&&x(t.prototype,r),v&&x(t,v),Object.defineProperty(t,"prototype",{writable:!1}),T}(a.a.View)}}]);
@@ -1 +0,0 @@
1
- (window.webpackJsonp_clickview_library_editor=window.webpackJsonp_clickview_library_editor||[]).push([[36],{1051:function(e,t,n){"use strict";n.d(t,"a",(function(){return f}));var r=n(2),o=n(265);function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function u(e,t){return(u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function s(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=p(e);if(t){var o=p(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return c(this,n)}}function c(e,t){if(t&&("object"===i(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function p(e){return(p=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&&u(e,t)}(c,e);var t,n,r,i=s(c);function c(){return a(this,c),i.apply(this,arguments)}return t=c,(n=[{key:"defaults",value:function(){return e={},t=o.c.Disabled,n=!0,t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e;var e,t,n}}])&&l(t.prototype,n),r&&l(t,r),Object.defineProperty(t,"prototype",{writable:!1}),c}(r.a.Model)},1127:function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return y}));var r,o=n(6),i=n(2),a=n(1171),l=n.n(a),u=n(1128),s=n.n(u);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 p(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function f(e,t){return(f=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(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 d(this,n)}}function d(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)}!function(e){e.ClickCrop="click:crop",e.CropImage="crop:image",e.ImageCropped="image:cropped"}(r||(r={}));var y=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&f(e,t)}(u,e);var t,n,i,a=h(u);function u(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,u),a.call(this,e)}return t=u,(n=[{key:"initialize",value:function(){this.listenTo(this.options.channelName,r.CropImage,this.crop)}},{key:"name",get:function(){return"ImageCropperComponent"}},{key:"template",get:function(){return s.a}},{key:"className",get:function(){return"text-center"}},{key:"elements",get:function(){return{image:".img"}}},{key:"getMinCropBoxWidth",value:function(){return this.options.minWidth*this.getViewportToImageRatio()}},{key:"getMinCropBoxHeight",value:function(){return this.options.minHeight*this.getViewportToImageRatio()}},{key:"getViewportToImageRatio",value:function(){return this.options.getCropRegionWidth()/this.model.get("width")}},{key:"crop",value:function(){var e=this.cropper.getCroppedCanvas().toDataURL(this.getImageMimeType());o.Radio.channel(this.options.channelName).trigger(r.ImageCropped,e)}},{key:"getImageMimeType",value:function(){var e=this.model.get("dataUrl").match(/data:([a-zA-Z0-9]+\/[a-zA-Z0-9-.+]+).*,.*/);if(e)return e[1]}},{key:"renderCropper",value:function(){this.getMinCropBoxWidth();var e=this.getUI("image").get(0);this.cropper=new l.a(e,{viewMode:1,aspectRatio:this.options.minWidth/this.options.minHeight,minCropBoxWidth:this.getMinCropBoxWidth(),minCropBoxHeight:this.getMinCropBoxHeight(),autoCropArea:1})}},{key:"onRender",value:function(){this.renderCropper()}},{key:"onBeforeDestroy",value:function(){this.cropper.destroy()}}])&&p(t.prototype,n),i&&p(t,i),Object.defineProperty(t,"prototype",{writable:!1}),u}(i.a.Component)},1128: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){var i;e.propertyIsEnumerable;return'<img src="'+e.escapeExpression("function"==typeof(i=null!=(i=n.dataUrl||(null!=t?t.dataUrl:t))?i:e.hooks.helperMissing)?i.call(null!=t?t:e.nullContext||{},{name:"dataUrl",hash:{},data:o}):i)+'" class="img img-fluid" />'},useData:!0})},1323: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((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"minimumRecommended",{name:"lang",hash:{height:null!=(i=null!=(i=null!=t?t.options:t)?i.recommendedDimensions:i)?i.height:i,width:null!=(i=null!=(i=null!=t?t.options:t)?i.recommendedDimensions:i)?i.width:i},data:o}))+"\r\n"},3:function(e,t,n,r,o){var i;e.propertyIsEnumerable;return" "+e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"minimumActual",{name:"lang",hash:{height:null!=(i=null!=(i=null!=t?t.options:t)?i.dimensions:i)?i.height:i,width:null!=(i=null!=(i=null!=t?t.options:t)?i.dimensions:i)?i.width:i},data:o}))+"\r\n"},5:function(e,t,n,r,o){e.propertyIsEnumerable;var i,a=e.lambda,l=e.escapeExpression;return'<button class="'+l(a(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.removeImage:i,t))+'">'+l((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"remove",{name:"lang",hash:{},data:o}))+" "+l(a(null!=(i=null!=t?t.options:t)?i.imageTypeText:i,t))+"</button>\r\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){e.propertyIsEnumerable;var i,a=null!=t?t:e.nullContext||{},l=e.hooks.helperMissing,u=e.escapeExpression,s=e.lambda;return'<h6 class="mb-0">'+u((n.lang||t&&t.lang||l).call(a,"edit",{name:"lang",hash:{},data:o}))+" "+u(s(null!=(i=null!=t?t.options:t)?i.imageTypeText:i,t))+'</h6>\r\n<div class="text-muted mb-1">\r\n <em>\r\n'+(null!=(i=n.if.call(a,null!=(i=null!=t?t.options:t)?i.recommendedDimensions:i,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.program(3,o,0),data:o}))?i:"")+' </em>\r\n</div>\r\n<div class="my-1 '+u(s(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.imageContainer:i,t))+'">\r\n <div class="'+u(s(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.imageElement:i,t))+'" style="background-image: url(\''+u(s(null!=(i=null!=t?t.options:t)?i.imageUrl:i,t))+'\')"></div>\r\n</div>\r\n<button class="btn btn-light my-1">'+u((n.lang||t&&t.lang||l).call(a,"upload",{name:"lang",hash:{},data:o}))+" "+u(s(null!=(i=null!=t?t.options:t)?i.imageTypeText:i,t))+"</button>\r\n"+(null!=(i=n.if.call(a,null!=(i=null!=t?t.options:t)?i.hasImage:i,{name:"if",hash:{},fn:e.program(5,o,0),inverse:e.noop,data:o}))?i:"")},useData:!0})},1324:function(e,t,n){e.exports={removeImage:"_3OmsX",imageElement:"_3kJ8m",banner:"uFWnL",thumbnail:"_3_b6l",imageContainer:"_1mYjS"}},1325: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'<div class="thumbnail-region"></div>\r\n<div class="dropdown-divider"></div>\r\n<div class="banner-region"></div>'},useData:!0})},1326:function(e,t,n){e.exports={hide:"_5hYaK"}},1327:function(e,t,n){var r=n(10);e.exports=(r.default||r).template({1:function(e,t,n,r,o){return'<div class="content-region"></div>\r\n'},3:function(e,t,n,r,o){var i;e.propertyIsEnumerable;return(null!=(i=e.lambda(null!=(i=null!=t?t.options:t)?i.spinnerEl:i,t))?i:"")+"\r\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var i;e.propertyIsEnumerable;return null!=(i=n.if.call(null!=t?t:e.nullContext||{},null!=(i=null!=t?t.options:t)?i.dataFetched:i,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.program(3,o,0),data:o}))?i:""},useData:!0})},1489:function(e,t,n){"use strict";n.r(t);var r=n(1),o=n(6),i=n(2),a=n(5),l=n(30),u=n(4),s=n(42),c=n(305),p=n(319),f=n(1051),h=n(12),d=n(0),m=n(9),y=n(1127),g=n(265),b=n(202),v=n(3),w=n(1323),I=n.n(w),k=n(1324),C=n.n(k);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 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 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=P(e);if(t){var o=P(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"===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 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)}(u,e);var t,n,r,a=R(u);function u(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,u),a.call(this,e)}return t=u,(n=[{key:"initialize",value:function(){this.viewModel=l.a.get("edit:folder:images")}},{key:"name",get:function(){return"EditImageComponent"}},{key:"template",get:function(){return I.a}},{key:"lang",get:function(){return"libraryEditor.editImage"}},{key:"className",get:function(){return this.options.imageType===m.f.Thumbnails?"".concat(C.a.thumbnail," mb-2"):"".concat(C.a.banner," mt-2")}},{key:"events",value:function(){return e={},t="click .".concat(C.a.removeImage),n="onClickRemoveImage",t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e;var e,t,n}},{key:"behaviors",get:function(){var e=this;return[{behaviorClass:c.b,channelName:this.options.channelName,buttonSelector:".btn-light",imageType:this.options.imageType,saveImage:function(t,n){n?(e.viewModel.set({dataUrl:t,type:e.options.imageType}),i.a.AppLinkHelper.trigger({application:d.b.LIBRARY_EDITOR,action:d.a.LibraryEditor.EDIT_FOLDER_IMAGES,args:[e.options.folderId]})):o.Radio.channel(e.options.channelName).trigger("select:image",t,e.options.imageType)}}]}},{key:"onClickRemoveImage",value:function(){o.Radio.channel(this.options.channelName).trigger("show:dialog",this.options.imageType)}},{key:"getImageUrl",value:function(){var e=this.options.imageType===m.f.Banners?"createBannerUrl":"createFolderThumbnailUrl";return h.g[e](this.options.originalImage,{fallbackBaseUrl:this.options.imageCdnUrl,fallbackCategoryName:this.options.folderName,type:this.options.imageType})}},{key:"getImageTypeText",value:function(){switch(this.options.imageType){case m.f.Banners:return v.a.getPhrase(this.lang,"banner");case m.f.Thumbnails:return v.a.getPhrase(this.lang,"thumbnail")}}},{key:"viewOptions",value:function(){return{styles:C.a,imageUrl:this.getImageUrl(),hasImage:this.options.originalImage&&this.options.originalImage.get("id"),imageTypeText:this.getImageTypeText(),dimensions:d.k[this.options.imageType],recommendedDimensions:d.m[this.options.imageType]}}}])&&O(t.prototype,n),r&&O(t,r),Object.defineProperty(t,"prototype",{writable:!1}),u}(i.a.Component),S=n(1325),_=n.n(S);function x(e){return(x="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function U(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function D(e,t){return(D=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(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=L(e);if(t){var o=L(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return N(this,n)}}function N(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 L(e){return(L=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var A,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&&D(e,t)}(i,e);var t,n,r,o=M(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"EditImagesWrapperComponent"}},{key:"template",get:function(){return _.a}},{key:"regions",value:function(){return{banner:{el:".banner-region",replaceElement:!0},thumbnail:{el:".thumbnail-region",replaceElement:!0}}}},{key:"renderBanner",value:function(){this.showChildView("banner",new j({channelName:this.options.bannerChannel,imageCdnUrl:this.options.imageCdnUrl,imageType:m.f.Banners,folderName:this.options.folderName,originalImage:this.options.bannerImage,folderId:this.options.folderId}))}},{key:"renderThumbnail",value:function(){this.showChildView("thumbnail",new j({channelName:this.options.thumbnailChannel,imageCdnUrl:this.options.imageCdnUrl,imageType:m.f.Thumbnails,folderName:this.options.folderName,originalImage:this.options.thumbnailImage,folderId:this.options.folderId}))}},{key:"onRender",value:function(){this.renderBanner(),this.renderThumbnail()}}])&&U(t.prototype,n),r&&U(t,r),Object.defineProperty(t,"prototype",{writable:!1}),i}(i.a.Component),F=n(1326),V=n.n(F),H=n(1327),z=n.n(H);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 J(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function q(e,t){return(q=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=K(e);if(t){var o=K(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Z(this,n)}}function Z(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 K(e){return(K=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n.d(t,"EditFolderImagesView",(function(){return X})),function(e){e[e.Upload=0]="Upload",e[e.Crop=1]="Crop"}(A||(A={}));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&&q(e,t)}(I,e);var t,n,v,w=G(I);function I(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,I),w.call(this,e)}return t=I,(n=[{key:"initialize",value:function(){this.popupContentState=A.Upload,this.viewModel=l.a.get("edit:folder:images"),this.viewModel.get("dataUrl")&&(this.selectedImageType=this.viewModel.get("type"),this.newImageEl=new Image,this.newImageEl.src=this.viewModel.get("dataUrl"),this.spinnerModel.set(g.c.Disabled,!1),this.popupContentState=A.Crop),this.libraryDataService=a.a.getInstance(d.g.Library,this),this.imageUploadDataService=a.a.getInstance(d.g.ImageUpload,this),this.bindListeners()}},{key:"name",get:function(){return"EditFolderImagesView"}},{key:"title",get:function(){return"Edit Folder Images"}},{key:"template",get:function(){return z.a}},{key:"channelName",get:function(){return h.k.generateUniqueChannelName(this)}},{key:"regions",value:function(){return{content:{el:".content-region",replaceElement:!0}}}},{key:"events",value:function(){return{"click .back-btn":"onClickBackButton","shown.bs.modal":"renderCropper"}}},{key:"elements",get:function(){return{backBtn:".back-btn"}}},{key:"behaviors",get:function(){return[{title:"Edit folder images",behaviorClass:c.e,size:"modal-lg",buttons:[{text:"Back",className:"btn btn-light back-btn ".concat(V.a.hide)}],spinnerButtonOptions:{model:this.spinnerModel=new f.a,channelName:this.channelName,buttonText:"Continue",onClick:this.onClickCrop}}]}},{key:"requiredResources",get:function(){return{config:b.b.config}}},{key:"bindListeners",value:function(){var e=this;this.listenTo(d.e.LIBRARY,"".concat(d.f.FOLDER,":").concat(this.options.folderId,":sync"),this.render);var t="".concat(this.channelName,":").concat(m.f.Banners),n="".concat(this.channelName,":").concat(m.f.Thumbnails);this.listenTo(t,"select:image",(function(t){return e.onSelectImage(t,m.f.Banners)})),this.listenTo(n,"select:image",(function(t){return e.onSelectImage(t,m.f.Thumbnails)})),this.listenTo(t,"show:dialog",(function(){return e.onShowDialog(m.f.Banners)})),this.listenTo(n,"show:dialog",(function(){return e.onShowDialog(m.f.Thumbnails)})),this.listenTo(t,"image:error",(function(){return e.triggerMethod("hide")})),this.listenTo(n,"image:error",(function(){return e.triggerMethod("hide")})),this.listenTo(this.channelName,y.a.ImageCropped,this.onImageCropped)}},{key:"onClickBackButton",value:function(){this.popupContentState!==A.Upload&&(this.popupContentState=A.Upload,this.selectedImageType=null,this.newImageEl=null,this.spinnerModel.set(g.c.Disabled,!0),this.renderContent())}},{key:"onClickCrop",value:function(){o.Radio.channel(this.channelName).trigger(y.a.CropImage).trigger(g.b.ShowSpinner)}},{key:"onSelectImage",value:function(e,t){this.selectedImageType=t,this.newImageEl=new Image,this.newImageEl.src=e,this.popupContentState=A.Crop,this.spinnerModel.set(g.c.Disabled,!1),this.renderCropper()}},{key:"onImageCropped",value:function(e){var t=this;this.imageUploadDataService.uploadBase64Image(e,this.selectedImageType,(function(e){return t.onImageUploaded(e)}))}},{key:"onImageUploaded",value:function(e){var t=this;this.triggerMethod("hide");var n={libraryId:this.libraryId,folderId:this.options.folderId,currentImageId:this.getCurrentImageId(),imageModel:e},r=this.selectedImageType===m.f.Banners?u.EntityType.Banner:u.EntityType.Thumbnail,o=this.selectedImageType===m.f.Banners?"addOrUpdateBanner":"addOrUpdateThumbnail";this.libraryDataService[o](n,(function(e){s.a.logUserAction({libraryId:t.libraryId,folderId:t.options.folderId,id:e.get("id")},{actionType:u.UserAction.Upload,entity:r,workflowPhase:u.WorkflowPhase.Complete,location:u.LocationContext.Popup}),t.reloadPage()}))}},{key:"onShowDialog",value:function(e){var t=this,n=new h.d({title:"Remove image?",text:"Are you sure you want to remove this image?",buttons:[{text:"Remove",className:"btn btn-danger",success:!0},{text:"Cancel",className:"btn btn-secondary",close:!0}],channelName:this.options.channelName});setTimeout((function(){return n.render().done((function(){return t.removeImage(e)}))}),200),this.triggerMethod("hide")}},{key:"removeImage",value:function(e){var t=this,n=e===m.f.Banners?"deleteBanner":"deleteThumbnail",r=e===m.f.Banners?this.currentBanner:this.currentThumbnail,o={libraryId:this.libraryId,folderId:this.model.get("id"),imageId:r.get("id")},i=e===m.f.Banners?u.EntityType.Banner:u.EntityType.Thumbnail;this.libraryDataService[n](o,(function(){s.a.logUserAction({libraryId:t.libraryId,folderId:t.model.get("id"),id:r.get("id")},{actionType:u.UserAction.Delete,entity:i,workflowPhase:u.WorkflowPhase.Complete,location:u.LocationContext.Popup}),t.reloadPage()}))}},{key:"reloadPage",value:function(){var e=this,t=i.a.LocationUtils.GetCurrentPath().includes("folders");setTimeout((function(){return i.a.AppLinkHelper.trigger({application:d.b.LIBRARY_EDITOR,action:t?d.a.LibraryEditor.FOLDER:d.a.LibraryEditor.HOME,args:t?[e.options.folderId]:void 0})}),0)}},{key:"getCurrentImageId",value:function(){return this.selectedImageType===m.f.Banners&&this.currentBanner?this.currentBanner.get("id"):this.selectedImageType===m.f.Thumbnails&&this.currentThumbnail?this.currentThumbnail.get("id"):void 0}},{key:"getCropRegionWidth",value:function(){return this.$el.find(".modal-body").width()}},{key:"getImageModel",value:function(){return new p.a({dataUrl:this.newImageEl.src,width:this.newImageEl.width,height:this.newImageEl.height})}},{key:"renderContent",value:function(){this.popupContentState===A.Upload&&(this.getUI("backBtn").addClass(V.a.hide),this.showChildView("content",new W({imageCdnUrl:this.config.get("imageCdnUrl"),folderName:this.model.get("name"),bannerImage:this.currentBanner,thumbnailImage:this.currentThumbnail,bannerChannel:"".concat(this.channelName,":").concat(m.f.Banners),thumbnailChannel:"".concat(this.channelName,":").concat(m.f.Thumbnails),folderId:this.options.folderId})))}},{key:"renderCropper",value:function(){this.popupContentState===A.Crop&&(this.getUI("backBtn").removeClass(V.a.hide),this.showChildView("content",new y.b({model:this.getImageModel(),channelName:this.channelName,imageType:this.selectedImageType,minWidth:d.k[this.selectedImageType].width,minHeight:d.k[this.selectedImageType].height,getCropRegionWidth:r.bind(this.getCropRegionWidth,this)})))}},{key:"viewOptions",value:function(){return{dataFetched:!!this.model&&!!this.libraryId,spinnerEl:h.r.getSpinner({size:h.s.Large,extraClasses:"mx-auto"})}}},{key:"onBeforeRender",value:function(){var e=this;this.model&&this.libraryId||(this.model=this.libraryDataService.getFolder(this.options.folderId),this.libraryDataService.getLibraries((function(t){return e.libraryId=t.first().id})))}},{key:"onRender",value:function(){this.model&&this.libraryId&&(this.currentBanner=this.model.get("banner"),this.currentThumbnail=this.model.get("thumbnail"),this.renderContent())}},{key:"onBeforeDestroy",value:function(){this.viewModel.clear()}}])&&J(t.prototype,n),v&&J(t,v),Object.defineProperty(t,"prototype",{writable:!1}),I}(i.a.View)}}]);
@@ -1 +0,0 @@
1
- (window.webpackJsonp_clickview_library_editor=window.webpackJsonp_clickview_library_editor||[]).push([[37],{1051:function(e,t,n){"use strict";n.d(t,"a",(function(){return p}));var o=n(2),r=n(265);function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function l(e,t){return(l=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,o=d(e);if(t){var r=d(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return u(this,n)}}function u(e,t){if(t&&("object"===i(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function d(e){return(d=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var p=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&l(e,t)}(u,e);var t,n,o,i=c(u);function u(){return a(this,u),i.apply(this,arguments)}return t=u,(n=[{key:"defaults",value:function(){return e={},t=r.c.Disabled,n=!0,t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e;var e,t,n}}])&&s(t.prototype,n),o&&s(t,o),Object.defineProperty(t,"prototype",{writable:!1}),u}(o.a.Model)},1065:function(e,t,n){"use strict";n.d(t,"a",(function(){return p}));var o=n(1),r=n(2),i=n(312);function a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function s(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function l(e,t){return(l=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,o=d(e);if(t){var r=d(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return u(this,n)}}function u(e,t){if(t&&("object"===a(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function d(e){return(d=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var p=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&l(e,t)}(u,e);var t,n,r,a=c(u);function u(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,u),a.call(this,e)}return t=u,(n=[{key:"name",get:function(){return"DropdownCollectionComponent"}},{key:"className",get:function(){return"dropdown-menu items-viewpart ".concat(this.getExtraClasses(this.options.displayOptions))}},{key:"attributes",get:function(){return{"aria-labelledby":"dropdownSelector"}}},{key:"initialize",value:function(){this.listenTo(this.options.channelName,"center:dropdown",this.centerSelectedItem)}},{key:"childView",get:function(){return i.a}},{key:"childViewOptions",get:function(){var e={channelName:this.options.channelName,analyticsHelper:this.options.analyticsHelper};return o.extend(e,this.options.childOptions)}},{key:"getExtraClasses",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.alignment,n=void 0===t?"left":t,o=e.extraClasses,r="dropdown-menu-".concat(n);return o&&(r="".concat(r," ").concat(o)),r}},{key:"centerSelectedItem",value:function(){var e=this.$el.find(".active");if(e.length){var t=this.$el.scrollTop()+e.position().top,n=.5*this.$el.height()+.5*e.height();this.$el.scrollTop(t-n)}}}])&&s(t.prototype,n),r&&s(t,r),Object.defineProperty(t,"prototype",{writable:!1}),u}(r.a.ComponentCollection)},1111:function(e,t,n){"use strict";n.d(t,"a",(function(){return b}));var o=n(1),r=n(6),i=n(2),a=n(1065),s=n(12),l=n(1112),c=n.n(l),u=n(1113),d=n.n(u);function p(e){return(p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function f(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,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"===p(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function 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&&h(e,t)}(u,e);var t,n,i,l=y(u);function u(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,u),(t=l.call(this,e)).selectSearch="",t.sameCharIndex=1,t.optionStep=1,t}return t=u,(n=[{key:"initialize",value:function(){this.setModel(),this.bindListeners()}},{key:"name",get:function(){return"SelectComponent"}},{key:"template",get:function(){return c.a}},{key:"regions",value:function(){return{dropdown:{el:".dropdown-region",replaceElement:!0}}}},{key:"events",value:function(){return{keydown:"onKeydown","shown.bs.dropdown":"onShowDropdown"}}},{key:"defaults",get:function(){return{displayProperty:"name"}}},{key:"elements",get:function(){return{dropdownToggle:".dropdown-toggle"}}},{key:"bindListeners",value:function(){this.listenTo(this.options.channelName,this.options.childOptions.eventName,this.onSelect)}},{key:"onShowDropdown",value:function(){r.Radio.channel(this.options.channelName).trigger("center:dropdown")}},{key:"onKeydown",value:function(e){38===e.keyCode||40===e.keyCode?this.onArrowKeyDown(e):13===e.keyCode?this.render():this.onType(e),r.Radio.channel(this.options.channelName).trigger("center:dropdown")}},{key:"onArrowKeyDown",value:function(e){s.c.getSelected(this.collection)?this.optionStep=1:this.optionStep=0;var t=this.getNextModel(e.keyCode);for(t||(s.c.deselectAll(this.collection),t=this.getNextModel(e.keyCode));this.isDisabled(t);)this.optionStep++,t=this.getNextModel(e.keyCode);this.onSelect(t)}},{key:"onType",value:function(e){if(1===e.key.toString().length){var t=this.getModelMatch(e);t&&this.onSelect(t),this.runTimer()}}},{key:"onSelect",value:function(e){this.isDisabled(e)||(s.c.setSelected(e.get("id"),this.collection),this.setModel(),this.getUI("dropdownToggle").text(this.getButtonText()),r.Radio.channel(this.options.channelName).trigger("select:option:selected",e))}},{key:"setModel",value:function(){this.model=s.c.getSelected(this.collection)}},{key:"getNextModel",value:function(e){var t,n=s.c.getSelected(this.collection)||this.collection.first(),o=this.collection.indexOf(n);return(t=38===e?this.collection.at(o-this.optionStep):this.collection.at(o+this.optionStep))||(s.c.deselectAll(this.collection),t=this.collection.first(),this.optionStep=0),t}},{key:"getModelMatch",value:function(e){var t,n=this;return 1===this.selectSearch.length&&this.selectSearch===e.key?t=this.handleSameCharIndex(e.key):(this.selectSearch+=e.key,this.sameCharIndex=1),t||(t=o.find(this.collection.models,(function(e){return e.get(n.options.displayProperty).toLowerCase().slice(0,n.selectSearch.length).includes(n.selectSearch.toLowerCase())}))),t}},{key:"handleSameCharIndex",value:function(e){var t=this,n=o.filter(this.collection.models,(function(n){return n.get(t.options.displayProperty).toLowerCase().slice(0,1)===e}));if(n.length>1){var r=n[this.sameCharIndex];return r||(r=o.first(n),this.sameCharIndex=0),this.sameCharIndex++,r}return o.first(n)}},{key:"runTimer",value:function(){var e=this;this.scopedTimerIndex&&clearTimeout(this.scopedTimerIndex),this.scopedTimerIndex=window.setTimeout((function(){e.selectSearch=""}),500)}},{key:"isDisabled",value:function(e){var t;if(e.get("divider"))return!0;if(!o.isFunction(this.options.childOptions.isDisabled))return!1;for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return(t=this.options.childOptions.isDisabled).call.apply(t,[this,e].concat(r))}},{key:"getButtonText",value:function(){if(this.options.disabled)return this.options.noOptionsText;var e=s.c.getSelected(this.collection);return e&&e.get(this.options.displayProperty)||this.options.placeholderText}},{key:"viewOptions",value:function(){return{styles:d.a,inputName:this.options.inputName,disabled:this.options.disabled,placeholderText:this.getButtonText()}}},{key:"onRender",value:function(){this.showChildView("dropdown",new a.a({collection:this.collection,channelName:this.options.channelName,childOptions:o.extend(this.options.childOptions),displayOptions:{extraClasses:"w-100 ".concat(d.a.dropdownMenu)},analyticsHelper:this.options.analyticsHelper}))}}])&&f(t.prototype,n),i&&f(t,i),Object.defineProperty(t,"prototype",{writable:!1}),u}(i.a.Component)},1112: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 e.escapeExpression(e.lambda(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.disabled:i,t))},3:function(e,t,n,o,r){return" disabled"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,r){e.propertyIsEnumerable;var i,a=e.lambda,s=e.escapeExpression,l=null!=t?t:e.nullContext||{};return'<button \r\n class="dropdown-toggle form-control btn-block text-left position-relative '+s(a(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.selectButton:i,t))+" "+(null!=(i=n.if.call(l,null!=(i=null!=t?t.options:t)?i.disabled:i,{name:"if",hash:{},fn:e.program(1,r,0),inverse:e.noop,data:r}))?i:"")+'" \r\n type="button" \r\n id="dropdownMenuButton" \r\n data-toggle="dropdown" \r\n aria-haspopup="true" \r\n aria-expanded="false"\r\n '+(null!=(i=n.if.call(l,null!=(i=null!=t?t.options:t)?i.disabled:i,{name:"if",hash:{},fn:e.program(3,r,0),inverse:e.noop,data:r}))?i:"")+' \r\n name="'+s(a(null!=(i=null!=t?t.options:t)?i.inputName:i,t))+'"\r\n >\r\n '+s(a(null!=(i=null!=t?t.options:t)?i.placeholderText:i,t))+'\r\n</button>\r\n<div class="dropdown-region"></div>\r\n<div class="form-feedback"></div>'},useData:!0})},1113:function(e,t,n){e.exports={dropdownMenu:"_2RaQu",selectButton:"_2xGqi",disabled:"_15kWr"}},1333: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,a=e.escapeExpression,s=e.lambda;return'<p class="font-weight-bold mb-0">'+a((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"currentType",{name:"lang",hash:{metadataType:null!=(i=null!=t?t.options:t)?i.metadataType:i},data:r}))+'</p>\r\n<p class="mb-3 '+a(s(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.metadataValue:i,t))+'">'+(null!=(i=s(null!=(i=null!=t?t.options:t)?i.metadataValue:i,t))?i:"")+"</p>\r\n"},3:function(e,t,n,o,r){var i;e.propertyIsEnumerable;return' <textarea\r\n id="suggest-edit"\r\n placeholder="'+e.escapeExpression(e.lambda(null!=(i=null!=t?t.options:t)?i.suggestionPlaceholder:i,t))+'"\r\n class="form-control"\r\n name="suggestion"\r\n ></textarea>\r\n <div class="form-feedback"></div>\r\n'},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,r){e.propertyIsEnumerable;var i,a=null!=t?t:e.nullContext||{},s=e.hooks.helperMissing,l=e.escapeExpression;return(null!=(i=n.unless.call(a,null!=(i=null!=t?t.options:t)?i.isOtherType:i,{name:"unless",hash:{},fn:e.program(1,r,0),inverse:e.noop,data:r}))?i:"")+'\r\n<div class="dropdown-divider"></div>\r\n\r\n<div class="form-group">\r\n <label for="suggest-edit" class="font-weight-bold">'+l((n.lang||t&&t.lang||s).call(a,"suggestionSubheading",{name:"lang",hash:{},data:r}))+'</label>\r\n <div class="rating-select-region"></div>\r\n <div class="rating-form-feedback invalid-feedback"></div>\r\n'+(null!=(i=n.unless.call(a,null!=(i=null!=t?t.options:t)?i.useRatingSelect:i,{name:"unless",hash:{},fn:e.program(3,r,0),inverse:e.noop,data:r}))?i:"")+'</div>\r\n\r\n<div class="form-group">\r\n <label for="reason-for-edit" class="font-weight-bold">'+l((n.lang||t&&t.lang||s).call(a,"reasoningSubheading",{name:"lang",hash:{},data:r}))+'</label>\r\n <textarea\r\n id="reason-for-edit"\r\n placeholder="'+l((n.lang||t&&t.lang||s).call(a,"reasoningPlaceholder",{name:"lang",hash:{},data:r}))+'"\r\n class="form-control"\r\n name="reason"\r\n ></textarea>\r\n <div class="form-feedback"></div>\r\n</div>'},useData:!0})},1334:function(e,t,n){e.exports={metadataValue:"_3nkrW"}},1335: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=null!=t?t:e.nullContext||{},a=e.hooks.helperMissing,s=e.escapeExpression;return"<p>"+s((n.lang||t&&t.lang||a).call(i,"guidelines",{name:"lang",hash:{},data:r}))+'</p>\r\n<p class="font-weight-bold mb-1">'+s((n.lang||t&&t.lang||a).call(i,"dropdownHeading",{name:"lang",hash:{},data:r}))+'</p>\r\n<div class="metadata-dropdown-region position-relative"></div>\r\n<div class="suggest-edit-region"></div>\r\n'},3:function(e,t,n,o,r){var i;e.propertyIsEnumerable;return(null!=(i=e.lambda(null!=(i=null!=t?t.options:t)?i.spinnerEl:i,t))?i:"")+"\r\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,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.dataFetched:i,{name:"if",hash:{},fn:e.program(1,r,0),inverse:e.program(3,r,0),data:r}))?i:""},useData:!0})},1484:function(e,t,n){"use strict";n.r(t);var o=n(1),r=n(3),i=n(2),a=n(5),s=n(30),l=n(4),c=n(42),u=n(12);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 p(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}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"===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 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&&h(e,t)}(i,e);var t,n,o,r=y(i);function i(){return f(this,i),r.apply(this,arguments)}return t=i,n&&p(t.prototype,n),o&&p(t,o),Object.defineProperty(t,"prototype",{writable:!1}),t}(i.a.Model),v=n(369),w=n(1051),S=n(145),O=n(202),k=n(0),M=n(1077),T=n(1111),P=n(265),E=n(305),j=n(63),x=n(6),C=n(29),R=n(9),_=n(1215),V=n(201),N=n(1057),I=n(1333),D=n.n(I),B=n(1334),A=n.n(B);function L(e){return(L="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(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 F(e,t){return(F=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,o=q(e);if(t){var r=q(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"===L(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function q(e){return(q=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var z,G=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&F(e,t)}(s,e);var t,n,o,a=H(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"SuggestEditComponent"}},{key:"template",get:function(){return D.a}},{key:"tagName",get:function(){return"form"}},{key:"className",get:function(){return"mt-3"}},{key:"lang",get:function(){return"libraryEditor.suggestEdit"}},{key:"regions",value:function(){return{ratingSelect:{el:".rating-select-region",replaceElement:!0}}}},{key:"bindings",get:function(){return{"[name=suggestion]":{observe:"suggestion",setOptions:{validate:!0}},"[name=reason]":{observe:"reason",setOptions:{validate:!0}}}}},{key:"elements",get:function(){return{ratingValidation:".rating-form-feedback"}}},{key:"getMetadataValue",value:function(){return this.options.metadataType===V.MetadataType.BroadcastDate?this.options.metadataValue?C(this.options.metadataValue).format(R.l.FULL_YEAR):r.a.getPhrase(this.lang,"noMetadataValue"):this.options.metadataValue instanceof i.a.Collection?this.options.metadataValue.length?this.options.metadataValue.map((function(e){return e.get("name")})).join(", "):r.a.getPhrase(this.lang,"noMetadataValue"):this.options.metadataValue||r.a.getPhrase(this.lang,"noMetadataValue")}},{key:"getSuggestionPlaceholder",value:function(){return this.options.metadataType===V.MetadataType.Other?r.a.getPhrase(this.lang,"otherSuggestionPlaceholder"):r.a.getPhrase(this.lang,"suggestionPlaceholder",{metadataType:N.h.translateMetadataName(this.options.metadataType).toLowerCase()})}},{key:"renderRatingSelect",value:function(){this.options.ratingValidationMessage?this.getUI("ratingValidation").text(this.options.ratingValidationMessage).attr("style","display: block;"):this.getUI("ratingValidation").hide(),this.options.metadataType===V.MetadataType.Rating&&this.showChildView("ratingSelect",new _.a({model:this.options.currentRating,collection:this.options.ratings,parentChannelName:this.options.channelName,hideHeaderText:!0,hideRemove:!0}))}},{key:"viewOptions",value:function(){return{styles:A.a,metadataValue:this.getMetadataValue(),useRatingSelect:this.options.metadataType===V.MetadataType.Rating,isOtherType:this.options.metadataType===V.MetadataType.Other,metadataType:N.h.translateMetadataName(this.options.metadataType).toLowerCase(),suggestionPlaceholder:this.getSuggestionPlaceholder()}}},{key:"onRender",value:function(){this.renderRatingSelect(),this.stickit(),x.Validation.bind(this)}},{key:"onDestroy",value:function(){this.unstickit(),x.Validation.unbind(this)}}])&&U(t.prototype,n),o&&U(t,o),Object.defineProperty(t,"prototype",{writable:!1}),s}(i.a.Component);!function(e){e[e.Email=0]="Email"}(z||(z={}));var K=n(165),W=n(60),$=Object.assign(Object.assign({},K.a),{createSuggestEditNotification:function(e){return{_type:W.a.SuggestEdit,groupId:e.groupId,receiverId:0,instanceRegion:e.instanceRegion,countryCode:e.countryCode,channels:[z.Email],data:{video:e.video,user:e.user,property:e.property,suggestion:e.suggestion,reason:e.reason,currentValue:e.currentValue}}}}),Q=n(1335),Y=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 Z(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 ee(e,t){return(ee=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function te(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 r=oe(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return ne(this,n)}}function ne(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 oe(e){return(oe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n.d(t,"SuggestAnEditView",(function(){return re}));var re=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&&ee(e,t)}(p,e);var t,n,i,d=te(p);function p(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,p),d.call(this,e)}return t=p,(n=[{key:"initialize",value:function(){this.getViewModel(),this.videoDataService=a.a.getInstance(k.g.Video,this),this.ratingsDataService=a.a.getInstance(k.g.Ratings,this),this.notificationDataService=a.a.getInstance(k.g.Notifications,this),this.selectedMetadata=new b,this.metadataCollection=this.getMetadataCollection(),this.bindListeners()}},{key:"name",get:function(){return"SuggestAnEditView"}},{key:"template",get:function(){return Y.a}},{key:"tagName",get:function(){return"form"}},{key:"className",get:function(){return"form-group"}},{key:"lang",get:function(){return"libraryEditor.suggestAnEdit"}},{key:"title",get:function(){return r.a.getPhrase(this.lang,"title")}},{key:"channelName",get:function(){return u.k.generateUniqueChannelName(this)}},{key:"viewModelName",get:function(){return"".concat(this.name,":").concat(this.options.videoId)}},{key:"regions",value:function(){return{dropdown:{el:".metadata-dropdown-region",replaceElement:!1},suggestEdit:{el:".suggest-edit-region",replaceElement:!0}}}},{key:"behaviors",get:function(){var e=this;return[{behaviorClass:E.e,title:r.a.getPhrase(this.lang,"heading"),spinnerButtonOptions:{model:this.spinnerModel=new w.a,channelName:this.channelName,buttonText:r.a.getPhrase(this.lang,"submit"),onClick:function(){return e.onSubmit()}}}]}},{key:"requiredResources",get:function(){return{config:O.b.config,currentUser:S.b.currentUser}}},{key:"bindListeners",value:function(){this.listenTo(this.channelName,"select:option:selected",this.onMetadataSelect),this.listenTo(this.channelName,"select:rating",this.onSelectRating),this.listenTo(k.e.VIDEO,"".concat(k.f.VIDEOS,":").concat(this.options.videoId,":sync"),this.render),this.listenTo(k.e.NOTIFICATIONS,"".concat(k.f.SUGGEST_EDIT,":error"),this.onError)}},{key:"onSubmit",value:function(){var e=this;if(this.validateForm()){this.spinnerModel.set(P.c.ShowSpinner,!0);var t=this.selectedMetadata.get("metadataType")===V.MetadataType.Rating?this.viewModel.get("ratingSuggestion"):this.viewModel.get("suggestion"),n=this.config.get("suggestEditMetadataGroupId"),o=$.createSuggestEditNotification({groupId:n,instanceRegion:this.currentUser.get("instanceRegion"),countryCode:this.currentUser.get("countryCode"),video:this.model.toJSON(),user:this.currentUser.toJSON(),property:this.selectedMetadata.get("metadataType").toLowerCase(),suggestion:t,reason:this.viewModel.get("reason"),currentValue:this.selectedMetadata.get("metadataValue")});this.notificationDataService.suggestEdit(o,(function(){e.triggerMethod("hide"),e.spinnerModel.set(P.c.ShowSpinner,!1),e.spinnerModel.set(P.c.Disabled,!0)})),this.logAction(),this.viewModel.clear()}}},{key:"onError",value:function(){this.spinnerModel.set(P.c.ShowSpinner,!1)}},{key:"onMetadataSelect",value:function(e){this.selectMetadata(e),this.renderSuggestEdit()}},{key:"onSelectRating",value:function(e){this.viewModel.set("ratingSuggestion",e.get("name")),this.renderSuggestEdit()}},{key:"selectMetadata",value:function(e){this.spinnerModel.set(P.c.Disabled,!1),u.c.setSelected(e.get("id"),this.metadataCollection),this.selectedMetadata.set({metadataType:e.get("name"),metadataValue:e.get("name")!==V.MetadataType.Other?this.model.get(e.get("property")):null}),e.get("name")!==V.MetadataType.Rating&&this.viewModel.set("ratingSuggestion","")}},{key:"getMetadataCollection",value:function(){return new M.a(Object.keys(V.MetadataTypes).map((function(e){return V.MetadataTypes[e]})))}},{key:"getMetadataByType",value:function(e){return this.metadataCollection.findWhere({name:e})}},{key:"getViewModel",value:function(){this.viewModel=s.a.get(this.viewModelName),this.viewModel.addValidation(N.g)}},{key:"validateForm",value:function(){this.renderSuggestEdit(),this.viewModel.validate();var e=this.viewModel.toJSON(),t=e.reason,n=e.suggestion;return!(this.getRatingValidationMessage()||this.selectedMetadata.get("metadataType")!==V.MetadataType.Rating&&!n||!t)}},{key:"getRatingValidationMessage",value:function(){if(this.selectedMetadata.get("metadataType")!==V.MetadataType.Rating)return"";var e=this.selectedMetadata.get("metadataValue"),t=this.viewModel.get("ratingSuggestion");return t?e===t?N.f.original():"":N.f.empty()}},{key:"checkPreselection",value:function(){if(!this.selectedMetadata.get("metadataType")&&this.options.metadata&&this.dataFetched()){var e=this.getMetadataByType(this.options.metadata);this.selectMetadata(e)}}},{key:"logAction",value:function(){var e=u.y.getSourceTypes(this.model);e=o.filter(e,(function(e){return e!==j.a.CustomLibrary}));var t={videoSourceTypes:o.sortBy(o.unique(e),(function(e){return e})).join(","),videoId:this.model.get("id"),metadataProperty:this.selectedMetadata.get("metadataType"),metadataPropertyValue:this.selectedMetadata.get("metadataValue"),suggestion:this.viewModel.get("suggestion"),reason:this.viewModel.get("reason")};c.a.logUserAction(t,{descriptor:l.SuggestionDescriptor.Edit,location:l.LocationContext.Popup,actionType:l.UserAction.Suggest,entity:l.EntityType.Video})}},{key:"dataFetched",value:function(){return!!this.model&&!!this.ratingCollection}},{key:"renderMetadataDropdown",value:function(){this.showChildView("dropdown",new T.a({collection:N.h.translateMetadataCollectionNames(this.metadataCollection),channelName:this.channelName,childOptions:{titleProperty:"name",eventName:"select:option:click"},placeholderText:this.selectedMetadata.get("metadataType")||r.a.getPhrase(this.lang,"dropdownPlaceholder"),analyticsHelper:c.a}))}},{key:"renderSuggestEdit",value:function(){this.selectedMetadata.get("metadataType")&&this.showChildView("suggestEdit",new G({model:this.viewModel,channelName:this.channelName,ratings:this.ratingCollection,currentRating:this.viewModel.get("ratingSuggestion")?new v.a(this.ratingCollection.findWhere({name:this.viewModel.get("ratingSuggestion")})):null,metadataType:this.selectedMetadata.get("metadataType"),metadataValue:this.selectedMetadata.get("metadataValue"),ratingValidationMessage:this.getRatingValidationMessage()}))}},{key:"onBeforeRender",value:function(){this.dataFetched()||(this.model=this.videoDataService.getVideo(this.options.videoId),this.ratingCollection=this.ratingsDataService.getAllRatings()),this.checkPreselection()}},{key:"viewOptions",value:function(){return{dataFetched:this.dataFetched(),spinnerEl:u.r.getSpinner({size:u.s.Large,extraClasses:"mx-auto"})}}},{key:"onRender",value:function(){this.dataFetched()&&(this.renderMetadataDropdown(),this.renderSuggestEdit())}}])&&Z(t.prototype,n),i&&Z(t,i),Object.defineProperty(t,"prototype",{writable:!1}),p}(i.a.View)}}]);
@@ -1 +0,0 @@
1
- (window.webpackJsonp_clickview_library_editor=window.webpackJsonp_clickview_library_editor||[]).push([[38],{1051:function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));var r=n(2),o=n(265);function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(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 s(e,t){return(s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function u(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=f(e);if(t){var o=f(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return c(this,n)}}function c(e,t){if(t&&("object"===i(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function f(e){return(f=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var d=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&s(e,t)}(c,e);var t,n,r,i=u(c);function c(){return l(this,c),i.apply(this,arguments)}return t=c,(n=[{key:"defaults",value:function(){return e={},t=o.c.Disabled,n=!0,t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e;var e,t,n}}])&&a(t.prototype,n),r&&a(t,r),Object.defineProperty(t,"prototype",{writable:!1}),c}(r.a.Model)},1059:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(1),o=n(48),i=n(169),l=n(3),a="libraryEditor.utils",s={name:[{required:!0,msg:function(){return l.a.getPhrase(a,"folderNameRequired")}},{maxLength:255,msg:function(){return l.a.getPhrase(a,"folderNameExceeds")}}]},u=function(e,t){return{parentId:function(n){return n?o.a.calculateDestinationFolderDepth(e,n,t)>i.a.MAX_FOLDER_DEPTH?l.a.getPhrase(a,"maxFolderDepth",{maxDepth:i.a.MAX_FOLDER_DEPTH}):"":l.a.getPhrase(a,"selectParentFolder")}}},c=function(e){var t=e.validateName,n=e.validateParent,o=e.folder,i=e.collection;return t&&n?r.extend({},s,u(o,i)):t?s:n?u(o,i):void 0}},1070:function(e,t,n){"use strict";n.d(t,"a",(function(){return v}));var r=n(6),o=n(2),i=n(3),l=n(1109),a=n(12),s=n(1072),u=n.n(s),c=n(1073),f=n.n(c);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 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 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,r=m(e);if(t){var o=m(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 m(e){return(m=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&&h(e,t)}(c,e);var t,n,o,s=y(c);function c(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c),s.call(this,e)}return t=c,(n=[{key:"initialize",value:function(){this.listenTo(this.options.channelName,"folder:selected new:folder:selected",this.setButtonText),this.listenTo(this.options.channelName,"re:render:selector",this.renderSelector),this.disabledIds=this.options.disabledIds&&this.options.disabledIds.reduce((function(e,t){return Object.assign(Object.assign({},e),function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}({},t,!0))}),{})}},{key:"name",get:function(){return"TreeDropdownComponent"}},{key:"template",get:function(){return u.a}},{key:"className",get:function(){return"position-relative"}},{key:"lang",get:function(){return"libraryEditor.treeDropdown"}},{key:"regions",value:function(){return{selector:{el:".selector-region",replaceElement:!1}}}},{key:"events",value:function(){return{"click .create-new":"onClickCreateNew"}}},{key:"defaults",get:function(){return{disabledIds:[]}}},{key:"elements",get:function(){return{button:".custom-select"}}},{key:"onClickCreateNew",value:function(e){e.preventDefault(),r.Radio.channel(this.options.channelName).trigger("create:folder:clicked")}},{key:"setButtonText",value:function(e,t){if(e&&!t){var n=e.get("name");this.getUI("button").text(n)}else{var r=a.f.getSelected(this.options.folderTreeKey,this.collection),o=r?r.get("name"):i.a.getPhrase(this.lang,"button");this.getUI("button").text(o)}}},{key:"renderSelector",value:function(){this.showChildView("selector",new l.a({styles:f.a,collection:this.collection,channelName:this.options.channelName,childrenProperty:"children",folderTreeId:this.options.folderTreeKey,extraClass:f.a.list,extraClasses:f.a.list,isSelector:!0,disabledIds:this.disabledIds||{}}))}},{key:"viewOptions",value:function(){return{styles:f.a,name:this.options.name||this.options.channelName,buttonText:this.buttonText,canCreateNew:this.options.canCreateNew}}},{key:"onRender",value:function(){this.setButtonText(),this.renderSelector()}}])&&p(t.prototype,n),o&&p(t,o),Object.defineProperty(t,"prototype",{writable:!1}),c}(o.a.Component)},1072: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,l=e.escapeExpression;return' <button class="create-new btn font-weight-bold rounded-0 w-100 text-left '+l(e.lambda(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.customItem:i,t))+'">'+l((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"createNew",{name:"lang",hash:{},data:o}))+"</button>\r\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){e.propertyIsEnumerable;var i,l=e.lambda,a=e.escapeExpression;return'<button\r\n class="'+a(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.selectBtn:i,t))+' custom-select form-control"\r\n data-toggle="dropdown"\r\n aria-haspopup="true"\r\n aria-expanded="false"\r\n name='+a(l(null!=(i=null!=t?t.options:t)?i.name:i,t))+"\r\n>"+a(l(null!=(i=null!=t?t.options:t)?i.buttonText:i,t))+'</button>\r\n<div class="dropdown-menu '+a(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.selector:i,t))+'">\r\n <div class="selector-region"></div>\r\n'+(null!=(i=n.if.call(null!=t?t:e.nullContext||{},null!=(i=null!=t?t.options:t)?i.canCreateNew:i,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o}))?i:"")+'</div>\r\n<div class="form-feedback"></div>'},useData:!0})},1073:function(e,t,n){e.exports={selectBtn:"_2TTgs",list:"_3wN7o",selector:"_3Xf1P",customItem:"_199PI"}},1122:function(e,t,n){"use strict";n.d(t,"a",(function(){return b}));var r=n(2),o=n(305),i=n(12),l=n(1070),a=n(1059),s=n(1123),u=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 f(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 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,r=y(e);if(t){var o=y(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.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 y(e){return(y=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,s=p(c);function c(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c),s.call(this,e)}return t=c,(n=[{key:"initialize",value:function(){this.bindListeners()}},{key:"bindListeners",value:function(){this.listenTo(this.options.channelName,"folder:selected",this.onFolderSelected)}},{key:"name",get:function(){return"FolderDetailsComponent"}},{key:"template",get:function(){return u.a}},{key:"lang",get:function(){return"libraryEditor.folderDetails"}},{key:"folderTreeKey",get:function(){return this.options.folderTreeKey||"folderselect:".concat(this.cid)}},{key:"regions",value:function(){return{parentFolder:".parent-folder-region"}}},{key:"behaviors",get:function(){return[{behaviorClass:o.a,modelValidation:Object(a.a)({validateName:this.options.editName,validateParent:this.options.editParent,folder:this.options.model,collection:this.options.collection})},{behaviorClass:o.f}]}},{key:"bindings",get:function(){return{"[name=name]":{observe:"name",setOptions:{validate:!0}}}}},{key:"onFolderSelected",value:function(e,t){e&&(i.f.setSelected(this.folderTreeKey,e,this.collection,t),t||this.model.set("parentId",e.get("id"),{validate:!0}))}},{key:"renderSubFolders",value:function(){this.options.editParent&&this.showChildView("parentFolder",new l.a({collection:this.collection,channelName:this.options.channelName,folderTreeKey:this.folderTreeKey,disabledIds:this.options.disabledParentFolderIds}))}},{key:"viewOptions",value:function(){return{editName:this.options.editName,editParent:this.options.editParent}}},{key:"onRender",value:function(){this.renderSubFolders()}}])&&f(t.prototype,n),r&&f(t,r),Object.defineProperty(t,"prototype",{writable:!1}),c}(r.a.Component)},1123: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=null!=t?t:e.nullContext||{},l=e.hooks.helperMissing,a=e.escapeExpression;return' <div class="form-group">\r\n <label for="name" class="control-label">'+a((n.lang||t&&t.lang||l).call(i,"name",{name:"lang",hash:{},data:o}))+'</label>\r\n <input name="name" id="name" type="text" class="form-control" placeholder="'+a((n.lang||t&&t.lang||l).call(i,"namePlaceholder",{name:"lang",hash:{},data:o}))+'" autocomplete="off" autofocus/>\r\n <div class="form-feedback"></div>\r\n </div>\r\n'},3:function(e,t,n,r,o){e.propertyIsEnumerable;return' <div class="form-group pt-2">\r\n <label for="parentId" class="control-label">'+e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"parent",{name:"lang",hash:{},data:o}))+'</label>\r\n <div class="parent-folder-region"></div>\r\n </div>\r\n'},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){e.propertyIsEnumerable;var i,l=null!=t?t:e.nullContext||{};return"<form>\r\n"+(null!=(i=n.if.call(l,null!=(i=null!=t?t.options:t)?i.editName:i,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o}))?i:"")+(null!=(i=n.if.call(l,null!=(i=null!=t?t.options:t)?i.editParent:i,{name:"if",hash:{},fn:e.program(3,o,0),inverse:e.noop,data:o}))?i:"")+"</form>"},useData:!0})},1249: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(null!=(i=e.lambda(null!=(i=null!=t?t.options:t)?i.spinnerEl:i,t))?i:"")+"\r\n"},3:function(e,t,n,r,o){return'<div class="folder-details-region"></div>\r\n'},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var i;e.propertyIsEnumerable;return null!=(i=n.unless.call(null!=t?t:e.nullContext||{},null!=(i=null!=t?t.options:t)?i.dataFetched:i,{name:"unless",hash:{},fn:e.program(1,o,0),inverse:e.program(3,o,0),data:o}))?i:""},useData:!0})},1439:function(e,t,n){"use strict";n.r(t),n.d(t,"MoveFolderView",(function(){return E}));var r=n(1),o=n(6),i=n(2),l=n(30),a=n(5),s=n(42),u=n(0),c=n(305),f=n(85),d=n(1051),p=n(88),h=n(12),y=n(265),b=n(3),m=n(1122),v=n(1249),g=n.n(v);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 P(e){return function(e){if(Array.isArray(e))return O(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 O(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 O(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 O(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 k(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 S(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=_(e);if(t){var o=_(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return j(this,n)}}function j(e,t){if(t&&("object"===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 _(e){return(_=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var E=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&I(e,t)}(O,e);var t,n,v,w=S(O);function O(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,O),w.call(this,e)}return t=O,(n=[{key:"initialize",value:function(){this.bindListeners(),this.libraryDataService=a.a.getInstance(u.g.Library,this)}},{key:"bindListeners",value:function(){this.listenTo(u.e.LIBRARY,"libraries:sync",this.render),this.listenTo(u.e.LIBRARY,"folder:".concat(this.options.folderId,":sync"),this.render)}},{key:"name",get:function(){return"MoveFolderView"}},{key:"title",get:function(){return b.a.getPhrase(this.lang,"title")}},{key:"lang",get:function(){return"libraryEditor.moveFolder"}},{key:"template",get:function(){return g.a}},{key:"channelName",get:function(){return h.k.generateUniqueChannelName(this)}},{key:"behaviors",get:function(){var e=this;return[{behaviorClass:c.e,title:b.a.getPhrase(this.lang,"heading"),spinnerButtonOptions:{model:this.spinnerModel=new d.a,channelName:this.channelName,buttonText:b.a.getPhrase(this.lang,"move"),onClick:function(t){return e.onSubmit(t)}}}]}},{key:"regions",value:function(){return{folderDetails:".folder-details-region"}}},{key:"events",value:function(){return{submit:"onSubmit"}}},{key:"onSubmit",value:function(e){e&&e.preventDefault(),this.viewModel.validate(),!1!==this.viewModel.isValid()&&(o.Radio.channel(this.channelName).trigger(y.b.ShowSpinner),this.saveFolder(),this.logAction())}},{key:"logAction",value:function(){var e=this.getParentIds(),t=e.oldParentId,n=e.newParentId,r={id:this.options.folderId,isSubfolder:n.toString()!==this.library.get("id").toString(),oldParentId:t,newParentId:n};s.a.logUserAction(r,this.options.analyticsOptions)}},{key:"saveFolder",value:function(){var e=this,t=this.getParentIds(),n=t.oldParentId,r=t.newParentId;n!==r?this.libraryDataService.moveFolder(this.viewModel.get("id"),r,n,(function(){i.a.AppLinkHelper.trigger({application:u.b.LIBRARY_EDITOR,action:u.a.LibraryEditor.FOLDER,args:[e.viewModel.get("id")]}),e.triggerMethod("hide")})):i.a.AppLinkHelper.trigger({application:u.b.LIBRARY_EDITOR,action:u.a.LibraryEditor.FOLDER,args:[this.viewModel.get("id")]})}},{key:"getParentIds",value:function(){return{oldParentId:h.f.getParent(this.options.folderId,this.collection).get("id"),newParentId:this.viewModel.get("parentId")}}},{key:"setUpCollection",value:function(e){this.collection||(this.library=h.f.getLibrary(this.options.folderId,e),this.collection=new f.a([this.library]))}},{key:"setUpModel",value:function(e){this.model||(this.model=e,this.setUpViewModel())}},{key:"setUpViewModel",value:function(){if(!this.viewModel){var e="folder:details:".concat(this.options.folderId);this.viewModel=l.a.get(e,this.model.toJSON(),{ctor:p.a});var t=h.f.getParent(this.options.folderId,this.collection);this.viewModel.set("parentId",t?t.get("id"):null),this.listenTo(this.viewModel,"change:parentId",this.onParentChange)}}},{key:"onParentChange",value:function(){var e=this.getParentIds(),t=e.oldParentId,n=e.newParentId;this.spinnerModel.set(y.c.Disabled,t===n)}},{key:"getDisabledParentFolderIds",value:function(){var e=[this.model.get("id").toString()];return this.viewModel.get("parentId")&&e.push(this.viewModel.get("parentId").toString()),this.model.children?[].concat(e,P(h.f.flatten(this.model.children).map((function(e){return e.id.toString()})))):e}},{key:"renderFolderDetails",value:function(){if(this.model&&this.collection){var e=new m.a({model:this.viewModel,collection:this.collection,library:this.library,channelName:this.channelName,editName:!1,editParent:!0,disabledParentFolderIds:this.getDisabledParentFolderIds()});this.showChildView("folderDetails",e)}}},{key:"onBeforeRender",value:function(){this.libraryDataService.getLibraries(r.bind(this.setUpCollection,this)),this.libraryDataService.getFolderFromLibraries(this.options.folderId,r.bind(this.setUpModel,this))}},{key:"viewOptions",value:function(){return{dataFetched:!!this.model&&!!this.collection,spinnerEl:h.r.getSpinner({size:h.s.Large,extraClasses:"mx-auto"})}}},{key:"onRender",value:function(){this.renderFolderDetails()}}])&&k(t.prototype,n),v&&k(t,v),Object.defineProperty(t,"prototype",{writable:!1}),O}(i.a.View)}}]);
@@ -1 +0,0 @@
1
- (window.webpackJsonp_clickview_library_editor=window.webpackJsonp_clickview_library_editor||[]).push([[39],{1051:function(e,t,n){"use strict";n.d(t,"a",(function(){return p}));var r=n(2),o=n(265);function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function u(e,t){return(u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function s(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=f(e);if(t){var o=f(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return c(this,n)}}function c(e,t){if(t&&("object"===i(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function f(e){return(f=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var p=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&u(e,t)}(c,e);var t,n,r,i=s(c);function c(){return l(this,c),i.apply(this,arguments)}return t=c,(n=[{key:"defaults",value:function(){return e={},t=o.c.Disabled,n=!0,t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e;var e,t,n}}])&&a(t.prototype,n),r&&a(t,r),Object.defineProperty(t,"prototype",{writable:!1}),c}(r.a.Model)},1059:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(1),o=n(48),i=n(169),l=n(3),a="libraryEditor.utils",u={name:[{required:!0,msg:function(){return l.a.getPhrase(a,"folderNameRequired")}},{maxLength:255,msg:function(){return l.a.getPhrase(a,"folderNameExceeds")}}]},s=function(e,t){return{parentId:function(n){return n?o.a.calculateDestinationFolderDepth(e,n,t)>i.a.MAX_FOLDER_DEPTH?l.a.getPhrase(a,"maxFolderDepth",{maxDepth:i.a.MAX_FOLDER_DEPTH}):"":l.a.getPhrase(a,"selectParentFolder")}}},c=function(e){var t=e.validateName,n=e.validateParent,o=e.folder,i=e.collection;return t&&n?r.extend({},u,s(o,i)):t?u:n?s(o,i):void 0}},1070:function(e,t,n){"use strict";n.d(t,"a",(function(){return v}));var r=n(6),o=n(2),i=n(3),l=n(1109),a=n(12),u=n(1072),s=n.n(u),c=n(1073),f=n.n(c);function p(e){return(p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function d(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,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 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 b(this,n)}}function b(e,t){if(t&&("object"===p(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function m(e){return(m=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)}(c,e);var t,n,o,u=h(c);function c(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c),u.call(this,e)}return t=c,(n=[{key:"initialize",value:function(){this.listenTo(this.options.channelName,"folder:selected new:folder:selected",this.setButtonText),this.listenTo(this.options.channelName,"re:render:selector",this.renderSelector),this.disabledIds=this.options.disabledIds&&this.options.disabledIds.reduce((function(e,t){return Object.assign(Object.assign({},e),function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}({},t,!0))}),{})}},{key:"name",get:function(){return"TreeDropdownComponent"}},{key:"template",get:function(){return s.a}},{key:"className",get:function(){return"position-relative"}},{key:"lang",get:function(){return"libraryEditor.treeDropdown"}},{key:"regions",value:function(){return{selector:{el:".selector-region",replaceElement:!1}}}},{key:"events",value:function(){return{"click .create-new":"onClickCreateNew"}}},{key:"defaults",get:function(){return{disabledIds:[]}}},{key:"elements",get:function(){return{button:".custom-select"}}},{key:"onClickCreateNew",value:function(e){e.preventDefault(),r.Radio.channel(this.options.channelName).trigger("create:folder:clicked")}},{key:"setButtonText",value:function(e,t){if(e&&!t){var n=e.get("name");this.getUI("button").text(n)}else{var r=a.f.getSelected(this.options.folderTreeKey,this.collection),o=r?r.get("name"):i.a.getPhrase(this.lang,"button");this.getUI("button").text(o)}}},{key:"renderSelector",value:function(){this.showChildView("selector",new l.a({styles:f.a,collection:this.collection,channelName:this.options.channelName,childrenProperty:"children",folderTreeId:this.options.folderTreeKey,extraClass:f.a.list,extraClasses:f.a.list,isSelector:!0,disabledIds:this.disabledIds||{}}))}},{key:"viewOptions",value:function(){return{styles:f.a,name:this.options.name||this.options.channelName,buttonText:this.buttonText,canCreateNew:this.options.canCreateNew}}},{key:"onRender",value:function(){this.setButtonText(),this.renderSelector()}}])&&d(t.prototype,n),o&&d(t,o),Object.defineProperty(t,"prototype",{writable:!1}),c}(o.a.Component)},1072: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,l=e.escapeExpression;return' <button class="create-new btn font-weight-bold rounded-0 w-100 text-left '+l(e.lambda(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.customItem:i,t))+'">'+l((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"createNew",{name:"lang",hash:{},data:o}))+"</button>\r\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){e.propertyIsEnumerable;var i,l=e.lambda,a=e.escapeExpression;return'<button\r\n class="'+a(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.selectBtn:i,t))+' custom-select form-control"\r\n data-toggle="dropdown"\r\n aria-haspopup="true"\r\n aria-expanded="false"\r\n name='+a(l(null!=(i=null!=t?t.options:t)?i.name:i,t))+"\r\n>"+a(l(null!=(i=null!=t?t.options:t)?i.buttonText:i,t))+'</button>\r\n<div class="dropdown-menu '+a(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.selector:i,t))+'">\r\n <div class="selector-region"></div>\r\n'+(null!=(i=n.if.call(null!=t?t:e.nullContext||{},null!=(i=null!=t?t.options:t)?i.canCreateNew:i,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o}))?i:"")+'</div>\r\n<div class="form-feedback"></div>'},useData:!0})},1073:function(e,t,n){e.exports={selectBtn:"_2TTgs",list:"_3wN7o",selector:"_3Xf1P",customItem:"_199PI"}},1122:function(e,t,n){"use strict";n.d(t,"a",(function(){return b}));var r=n(2),o=n(305),i=n(12),l=n(1070),a=n(1059),u=n(1123),s=n.n(u);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 f(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function p(e,t){return(p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(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=h(e);if(t){var o=h(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 h(e){return(h=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&&p(e,t)}(c,e);var t,n,r,u=d(c);function c(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c),u.call(this,e)}return t=c,(n=[{key:"initialize",value:function(){this.bindListeners()}},{key:"bindListeners",value:function(){this.listenTo(this.options.channelName,"folder:selected",this.onFolderSelected)}},{key:"name",get:function(){return"FolderDetailsComponent"}},{key:"template",get:function(){return s.a}},{key:"lang",get:function(){return"libraryEditor.folderDetails"}},{key:"folderTreeKey",get:function(){return this.options.folderTreeKey||"folderselect:".concat(this.cid)}},{key:"regions",value:function(){return{parentFolder:".parent-folder-region"}}},{key:"behaviors",get:function(){return[{behaviorClass:o.a,modelValidation:Object(a.a)({validateName:this.options.editName,validateParent:this.options.editParent,folder:this.options.model,collection:this.options.collection})},{behaviorClass:o.f}]}},{key:"bindings",get:function(){return{"[name=name]":{observe:"name",setOptions:{validate:!0}}}}},{key:"onFolderSelected",value:function(e,t){e&&(i.f.setSelected(this.folderTreeKey,e,this.collection,t),t||this.model.set("parentId",e.get("id"),{validate:!0}))}},{key:"renderSubFolders",value:function(){this.options.editParent&&this.showChildView("parentFolder",new l.a({collection:this.collection,channelName:this.options.channelName,folderTreeKey:this.folderTreeKey,disabledIds:this.options.disabledParentFolderIds}))}},{key:"viewOptions",value:function(){return{editName:this.options.editName,editParent:this.options.editParent}}},{key:"onRender",value:function(){this.renderSubFolders()}}])&&f(t.prototype,n),r&&f(t,r),Object.defineProperty(t,"prototype",{writable:!1}),c}(r.a.Component)},1123: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=null!=t?t:e.nullContext||{},l=e.hooks.helperMissing,a=e.escapeExpression;return' <div class="form-group">\r\n <label for="name" class="control-label">'+a((n.lang||t&&t.lang||l).call(i,"name",{name:"lang",hash:{},data:o}))+'</label>\r\n <input name="name" id="name" type="text" class="form-control" placeholder="'+a((n.lang||t&&t.lang||l).call(i,"namePlaceholder",{name:"lang",hash:{},data:o}))+'" autocomplete="off" autofocus/>\r\n <div class="form-feedback"></div>\r\n </div>\r\n'},3:function(e,t,n,r,o){e.propertyIsEnumerable;return' <div class="form-group pt-2">\r\n <label for="parentId" class="control-label">'+e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"parent",{name:"lang",hash:{},data:o}))+'</label>\r\n <div class="parent-folder-region"></div>\r\n </div>\r\n'},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){e.propertyIsEnumerable;var i,l=null!=t?t:e.nullContext||{};return"<form>\r\n"+(null!=(i=n.if.call(l,null!=(i=null!=t?t.options:t)?i.editName:i,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o}))?i:"")+(null!=(i=n.if.call(l,null!=(i=null!=t?t.options:t)?i.editParent:i,{name:"if",hash:{},fn:e.program(3,o,0),inverse:e.noop,data:o}))?i:"")+"</form>"},useData:!0})},1248: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(null!=(i=e.lambda(null!=(i=null!=t?t.options:t)?i.spinnerEl:i,t))?i:"")+"\r\n"},3:function(e,t,n,r,o){return'<div class="folder-details-region"></div>\r\n'},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var i;e.propertyIsEnumerable;return null!=(i=n.unless.call(null!=t?t:e.nullContext||{},null!=(i=null!=t?t.options:t)?i.dataFetched:i,{name:"unless",hash:{},fn:e.program(1,o,0),inverse:e.program(3,o,0),data:o}))?i:""},useData:!0})},1438:function(e,t,n){"use strict";n.r(t),n.d(t,"RenameFolderView",(function(){return _}));var r=n(1),o=n(6),i=n(30),l=n(5),a=n(2),u=n(42),s=n(0),c=n(305),f=n(1051),p=n(88),d=n(265),y=n(12),h=n(3),b=n(1122),m=n(1248),v=n.n(m);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 r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function O(e,t){return(O=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=j(e);if(t){var o=j(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return P(this,n)}}function P(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 j(e){return(j=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var _=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&O(e,t)}(g,e);var t,n,a,m=k(g);function g(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,g),m.call(this,e)}return t=g,(n=[{key:"initialize",value:function(){this.bindListeners(),this.libraryDataService=l.a.getInstance(s.g.Library,this)}},{key:"bindListeners",value:function(){this.listenTo(s.e.LIBRARY,"folder:".concat(this.options.folderId,":sync"),this.render),this.listenTo(s.e.LIBRARY,"libraries:sync",this.render)}},{key:"name",get:function(){return"RenameFolderView"}},{key:"title",get:function(){return h.a.getPhrase(this.lang,"title")}},{key:"lang",get:function(){return"libraryEditor.renameFolder"}},{key:"template",get:function(){return v.a}},{key:"channelName",get:function(){return y.k.generateUniqueChannelName(this)}},{key:"behaviors",get:function(){var e=this;return[{behaviorClass:c.e,title:h.a.getPhrase(this.lang,"heading"),spinnerButtonOptions:{model:this.spinnerModel=new f.a,channelName:this.channelName,buttonText:h.a.getPhrase(this.lang,"save"),onClick:function(t){return e.onSubmit(t)}}}]}},{key:"regions",value:function(){return{folderDetails:".folder-details-region"}}},{key:"events",value:function(){return{submit:"onSubmit"}}},{key:"onSubmit",value:function(e){e&&e.preventDefault(),this.viewModel.validate(),!1!==this.viewModel.isValid()&&(o.Radio.channel(this.channelName).trigger(d.b.ShowSpinner),this.saveFolder(),this.logAction())}},{key:"logAction",value:function(){var e={id:this.options.folderId,name:this.viewModel.get("name")};u.a.logUserAction(e,this.options.analyticsOptions)}},{key:"saveFolder",value:function(){var e=this;this.libraryDataService.updateFolder(this.viewModel,(function(){e.triggerMethod("hide")}))}},{key:"setUpCollection",value:function(e){this.collection||(this.library=y.f.getLibrary(this.options.folderId,e),this.collection=this.library.children)}},{key:"setUpModel",value:function(e){this.model||(this.model=e,this.setUpViewModel())}},{key:"setUpViewModel",value:function(){if(!this.viewModel){var e="folder:details:".concat(this.options.folderId);this.viewModel=i.a.get(e,this.model.toJSON(),{ctor:p.a})}}},{key:"renderFolderDetails",value:function(){if(this.model&&this.collection){var e=new b.a({model:this.viewModel,channelName:this.channelName,editName:!0,editParent:!1});this.showChildView("folderDetails",e)}}},{key:"onBeforeRender",value:function(){this.libraryDataService.getLibraries(r.bind(this.setUpCollection,this)),this.libraryDataService.getFolderFromLibraries(this.options.folderId,r.bind(this.setUpModel,this)),this.model&&this.collection&&this.spinnerModel.set(d.c.Disabled,!1)}},{key:"viewOptions",value:function(){return{dataFetched:!!this.model&&!!this.collection,spinnerEl:y.r.getSpinner({size:y.s.Large,extraClasses:"mx-auto"})}}},{key:"onRender",value:function(){this.renderFolderDetails()}}])&&w(t.prototype,n),a&&w(t,a),Object.defineProperty(t,"prototype",{writable:!1}),g}(a.a.View)}}]);
@@ -1 +0,0 @@
1
- (window.webpackJsonp_clickview_library_editor=window.webpackJsonp_clickview_library_editor||[]).push([[4],{1319:function(e,n,t){var r=t(10);e.exports=(r.default||r).template({1:function(e,n,t,r,a){e.propertyIsEnumerable;var i=null!=n?n:e.nullContext||{},o=e.hooks.helperMissing,l=e.escapeExpression;return"<p>"+l((t.lang||n&&n.lang||o).call(i,"infoHeading",{name:"lang",hash:{},data:a}))+"</p>\r\n<p>"+l((t.lang||n&&n.lang||o).call(i,"meaningSubheading",{name:"lang",hash:{},data:a}))+"</p>\r\n<ul>\r\n <li>"+l((t.lang||n&&n.lang||o).call(i,"meaning1",{name:"lang",hash:{},data:a}))+"</li>\r\n <li>"+l((t.lang||n&&n.lang||o).call(i,"meaning2",{name:"lang",hash:{},data:a}))+"</li>\r\n <li>"+l((t.lang||n&&n.lang||o).call(i,"meaning3",{name:"lang",hash:{},data:a}))+"</li>\r\n</ul>\r\n"},3:function(e,n,t,r,a){e.propertyIsEnumerable;var i=null!=n?n:e.nullContext||{},o=e.hooks.helperMissing,l=e.escapeExpression;return"<p>"+l((t.lang||n&&n.lang||o).call(i,"disclaimer",{name:"lang",hash:{},data:a}))+"</p>\r\n<p>"+l((t.lang||n&&n.lang||o).call(i,"featureSubheading",{name:"lang",hash:{},data:a}))+"</p>\r\n<ul>\r\n <li>"+l((t.lang||n&&n.lang||o).call(i,"feature1",{name:"lang",hash:{},data:a}))+"</li> \r\n <li>"+l((t.lang||n&&n.lang||o).call(i,"feature2",{name:"lang",hash:{},data:a}))+"</li>\r\n</ul>\r\n"},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var i;e.propertyIsEnumerable;return null!=(i=t.if.call(null!=n?n:e.nullContext||{},null!=(i=null!=n?n.options:n)?i.noPublisher:i,{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.program(3,a,0),data:a}))?i:""},useData:!0})},1452:function(e,n,t){"use strict";t.r(n),t.d(n,"PublishLibraryView",(function(){return O}));var r=t(6),a=t(5),i=t(2),o=t(305),l=t(0),u=t(265),c=t(12),s=t(3),f=t(147),h=t(324),p=t(326),g=t(58),b=t(1319),y=t.n(b);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 m(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function v(e,n){for(var t=0;t<n.length;t++){var r=n[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function w(e,n){return(w=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,n){return e.__proto__=n,e})(e,n)}function k(e){var n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var t,r=P(e);if(n){var a=P(this).constructor;t=Reflect.construct(r,arguments,a)}else t=r.apply(this,arguments);return S(this,t)}}function S(e,n){if(n&&("object"===d(n)||"function"==typeof n))return n;if(void 0!==n)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 O=function(e){!function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),n&&w(e,n)}(S,e);var n,t,b,d=k(S);function S(){return m(this,S),d.apply(this,arguments)}return n=S,(t=[{key:"initialize",value:function(){this.libraryDataService=a.a.getInstance(l.g.Library,this),this.migrationVideoDataService=a.a.getInstance(l.g.MigrationVideo,this),this.videoDataService=a.a.getInstance(l.g.Video,this)}},{key:"name",get:function(){return"PublishLibraryView"}},{key:"title",get:function(){return s.a.getPhrase(this.lang,"title")}},{key:"lang",get:function(){return"libraryEditor.publishLibrary"}},{key:"template",get:function(){return y.a}},{key:"channelName",get:function(){return c.k.generateUniqueChannelName(this)}},{key:"behaviors",get:function(){var e=this;return[{title:s.a.getPhrase(this.lang,"heading"),behaviorClass:o.e,spinnerButtonOptions:{channelName:this.channelName,buttonText:s.a.getPhrase(this.lang,"continue"),onClick:function(){return e.onClickContinue()}}}]}},{key:"onClickContinue",value:function(){var e=this;r.Radio.channel(this.channelName).trigger(u.b.ShowSpinner);var n=0,t=function(){++n===e.libraries.length&&(e.triggerMethod("hide"),e.videoDataService.clearVideoCache(),r.Radio.channel(h.a.LIBRARY_STATUS).trigger("status:changed"))};g.a.noPublisher(this.customerMetadata)?this.libraries.each((function(n){e.libraryDataService.publishLibrary(n.get("id"),t)})):this.migrationVideoDataService.publishLibraries((function(){i.a.AppLinkHelper.trigger({application:l.b.MIGRATION_WIZARD,action:l.a.MigrationWizard.PUBLISH_LIBRARY_PROGRESS})}))}},{key:"requiredResources",get:function(){return{libraries:f.b.libraries,customerMetadata:p.b.customerMetaData}}},{key:"viewOptions",value:function(){return{noPublisher:g.a.noPublisher(this.customerMetadata)}}}])&&v(n.prototype,t),b&&v(n,b),Object.defineProperty(n,"prototype",{writable:!1}),S}(i.a.View)}}]);
@@ -1 +0,0 @@
1
- (window.webpackJsonp_clickview_library_editor=window.webpackJsonp_clickview_library_editor||[]).push([[40],{1078:function(t,e,r){"use strict";r.d(e,"a",(function(){return y}));var n=r(2),o=r(37),i=r(3);function a(t){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function c(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function u(t,e){return(u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function s(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=f(t);if(e){var o=f(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return l(this,r)}}function l(t,e){if(e&&("object"===a(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function f(t){return(f=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var p="migrationWizard.smartMigrationApiCall",y=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&u(t,e)}(l,t);var e,r,o,a=s(l);function l(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),(e=a.call(this,i.a.getPhrase(p,"title"))).supportUrl=t,e}return e=l,(r=[{key:"name",get:function(){return"SmartMigrationApiCallError"}},{key:"dialogOptions",get:function(){return{title:i.a.getPhrase(p,"heading"),text:"<p>".concat(i.a.getPhrase(p,"errorNotice")," \n <strong>").concat(i.a.getPhrase(p,"reloadPage"),"</strong></p>\n <p>").concat(i.a.getPhrase(p,"helpGuide",{supportUrl:this.supportUrl,linkClasses:"text-info"}),"</p>"),buttons:[{text:i.a.getPhrase(p,"reload"),className:"btn btn-primary",success:!0}]}}},{key:"onDone",value:function(){n.a.LocationUtils.Reload()}}])&&c(e.prototype,r),o&&c(e,o),Object.defineProperty(e,"prototype",{writable:!1}),l}(o.a)},1115:function(t,e,r){"use strict";r(311);var n=r(2),o=r(37),i=r(3);function a(t){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function c(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function u(t,e){return(u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function s(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=f(t);if(e){var o=f(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return l(this,r)}}function l(t,e){if(e&&("object"===a(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function f(t){return(f=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var p="migrationWizard.backupProgress",y=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&u(t,e)}(l,t);var e,r,o,a=s(l);function l(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),a.call(this,i.a.getPhrase(p,"title"))}return e=l,(r=[{key:"name",get:function(){return"BackupProgressError"}},{key:"dialogOptions",get:function(){return{title:i.a.getPhrase(p,"heading"),text:i.a.getPhrase(p,"body"),buttons:[{text:i.a.getPhrase(p,"reload"),className:"btn btn-primary",success:!0}]}}},{key:"onDone",value:function(){n.a.LocationUtils.Reload()}}])&&c(e.prototype,r),o&&c(e,o),Object.defineProperty(e,"prototype",{writable:!1}),l}(o.a);function b(t){return(b="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function g(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function h(t,e){return(h=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function d(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=v(t);if(e){var o=v(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return m(this,r)}}function m(t,e){if(e&&("object"===b(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function v(t){return(v=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var O=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&h(t,e)}(c,t);var e,r,o,a=d(c);function c(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,c),a.call(this,i.a.getPhrase("migrationWizard.migrationProgressError","title"))}return e=c,(r=[{key:"name",get:function(){return"MigrationProgressError"}},{key:"dialogOptions",get:function(){return{title:i.a.getPhrase("migrationWizard.migrationProgressError","heading"),text:i.a.getPhrase("migrationWizard.migrationProgressError","body"),buttons:[{text:i.a.getPhrase("migrationWizard.migrationProgressError","reload"),className:"btn btn-primary",success:!0}]}}},{key:"onDone",value:function(){n.a.LocationUtils.Reload()}}])&&g(e.prototype,r),o&&g(e,o),Object.defineProperty(e,"prototype",{writable:!1}),c}(o.a);function P(t){return(P="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function w(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function j(t,e){return(j=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function _(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=R(t);if(e){var o=R(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return k(this,r)}}function k(t,e){if(e&&("object"===P(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function R(t){return(R=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var E=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&j(t,e)}(c,t);var e,r,o,a=_(c);function c(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,c),a.call(this,i.a.getPhrase("migrationWizard.migrationFinalisation","title"))}return e=c,(r=[{key:"name",get:function(){return"MigrationFinalisationError"}},{key:"dialogOptions",get:function(){return{title:i.a.getPhrase("migrationWizard.migrationFinalisation","heading"),text:i.a.getPhrase("migrationWizard.migrationFinalisation","body"),buttons:[{text:i.a.getPhrase("migrationWizard.migrationFinalisation","reload"),className:"btn btn-primary",success:!0}]}}},{key:"onDone",value:function(){n.a.LocationUtils.Reload()}}])&&w(e.prototype,r),o&&w(e,o),Object.defineProperty(e,"prototype",{writable:!1}),c}(o.a);r(1078);r.d(e,"a",(function(){return y})),r.d(e,"c",(function(){return O})),r.d(e,"b",(function(){return E})),r.d(e,"a",(function(){return y}))},1137:function(t,e,r){"use strict";r.d(e,"a",(function(){return b}));var n=r(2),o=r(1198),i=r.n(o),a=r(1199),c=r.n(a);function u(t){return(u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function s(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function l(t,e){return(l=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function f(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=y(t);if(e){var o=y(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return p(this,r)}}function p(t,e){if(e&&("object"===u(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function y(t){return(y=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var b=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&l(t,e)}(a,t);var e,r,n,o=f(a);function a(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a),o.call(this,t)}return e=a,(r=[{key:"initialize",value:function(){this.listenTo(this.model,"change:percentage",this.update)}},{key:"name",get:function(){return"ProgressCircleComponent"}},{key:"template",get:function(){return c.a}},{key:"lang",get:function(){return"migrationWizard.progressCircle"}},{key:"elements",get:function(){return{circle:".progress-circle",text:".progress-circle-text"}}},{key:"viewOptions",value:function(){return{styles:i.a,text:this.options.text,class:this.options.class,percentage:this.options.percentage}}},{key:"onRender",value:function(){this.update()}},{key:"update",value:function(){var t=this.model.get("percentage")||0,e=this.getUI("circle").get(0),r=2*e.r.baseVal.value*Math.PI;e.style.strokeDasharray="".concat(r," ").concat(r),e.style.strokeDashoffset=r;var n=r-t/100*r;e.style.strokeDashoffset=n;var o=this.getUI("text");o&&o.text("".concat(t,"%"))}}])&&s(e.prototype,r),n&&s(e,n),Object.defineProperty(e,"prototype",{writable:!1}),a}(n.a.Component)},1198:function(t,e,r){t.exports={circle:"_3iX0l",extraText:"_1nYnx",progressCircleContainer:"_2l1Al",progressCircle:"_1RbA5"}},1199:function(t,e,r){var n=r(10);t.exports=(n.default||n).template({1:function(t,e,r,n,o){t.propertyIsEnumerable;var i,a=t.lambda,c=t.escapeExpression;return' <span class="'+c(a(null!=(i=null!=(i=null!=e?e.options:e)?i.styles:i)?i.extraText:i,e))+'">'+c(a(null!=(i=null!=e?e.options:e)?i.text:i,e))+"</span>\r\n"},compiler:[8,">= 4.3.0"],main:function(t,e,r,n,o){t.propertyIsEnumerable;var i,a=t.lambda,c=t.escapeExpression,u=null!=e?e:t.nullContext||{};return'<div class="'+c(a(null!=(i=null!=(i=null!=e?e.options:e)?i.styles:i)?i.circle:i,e))+" "+c(a(null!=(i=null!=e?e.options:e)?i.class:i,e))+'">\r\n <span>\r\n <span class="progress-circle-text">'+c((r.lang||e&&e.lang||t.hooks.helperMissing).call(u,"progress",{name:"lang",hash:{percentage:null!=(i=null!=e?e.options:e)?i.percentage:i},data:o}))+"</span>\r\n"+(null!=(i=r.if.call(u,null!=(i=null!=e?e.options:e)?i.text:i,{name:"if",hash:{},fn:t.program(1,o,0),inverse:t.noop,data:o}))?i:"")+' </span>\r\n\r\n <svg class="'+c(a(null!=(i=null!=(i=null!=e?e.options:e)?i.styles:i)?i.progressCircleContainer:i,e))+'">\r\n <circle class="progress-circle '+c(a(null!=(i=null!=(i=null!=e?e.options:e)?i.styles:i)?i.progressCircle:i,e))+'" transform=\'rotate(270 160 0)\' stroke-width="28" fill="transparent" r="150">\r\n </svg>\r\n</div>'},useData:!0})},1382:function(t,e,r){t.exports={backupProgress:"_15jUh",info:"_1NjZL",progress:"fp9FZ",migrationBackupContainer:"_28z_5"}},1383:function(t,e,r){var n=r(10);t.exports=(n.default||n).template({compiler:[8,">= 4.3.0"],main:function(t,e,r,n,o){t.propertyIsEnumerable;var i,a=null!=e?e:t.nullContext||{},c=t.hooks.helperMissing,u=t.escapeExpression;return'<h4 class="pb-4">'+u((r.lang||e&&e.lang||c).call(a,"heading",{name:"lang",hash:{},data:o}))+'</h4>\r\n<div class="progress-circle-region"></div>\r\n<p class="'+u(t.lambda(null!=(i=null!=(i=null!=e?e.options:e)?i.styles:i)?i.info:i,e))+' pt-4">\r\n '+(null!=(i=(r.lang||e&&e.lang||c).call(a,"info",{name:"lang",hash:{},data:o}))?i:"")+"\r\n</p>"},useData:!0})},1469:function(t,e,r){"use strict";r.r(e),r.d(e,"PublisherBackupProgressView",(function(){return P}));var n=r(2),o=r(5),i=r(30),a=r(1382),c=r.n(a),u=r(1383),s=r.n(u),l=r(1115),f=r(0),p=r(3),y=r(1137);function b(t){return(b="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function g(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function h(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function d(t,e){return(d=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function m(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=O(t);if(e){var o=O(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return v(this,r)}}function v(t,e){if(e&&("object"===b(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function O(t){return(O=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var P=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&d(t,e)}(b,t);var e,r,a,u=m(b);function b(){return g(this,b),u.apply(this,arguments)}return e=b,(r=[{key:"initialize",value:function(){this.viewModel=i.a.get("backup:progress",{percentage:0}),this.migrationVideoDataService=o.a.getInstance(f.g.MigrationVideo,this),this.bindMigrationDataListeners()}},{key:"name",get:function(){return"PublisherBackupProgressView"}},{key:"title",get:function(){return p.a.getPhrase(this.lang,"title")}},{key:"lang",get:function(){return"migrationWizard.publisherBackupProgress"}},{key:"className",get:function(){return"container text-center p-5 bg-white ".concat(c.a.migrationBackupContainer," ").concat(c.a.backupProgress)}},{key:"template",get:function(){return s.a}},{key:"regions",value:function(){return{progressCircle:{replaceElement:!0,el:".progress-circle-region"}}}},{key:"bindMigrationDataListeners",value:function(){this.listenTo(f.e.MIGRATION,"".concat(f.f.CUSTOMER_METADATA,":sync"),this.render),this.listenTo(f.e.MIGRATION,"".concat(f.f.CUSTOMER_VIDEO,":count:error"),this.onError)}},{key:"onError",value:function(){n.a.ErrorHelper.throw(new l.a)}},{key:"poll",value:function(){var t=this;this.migrationVideoDataService.getCustomerVideoCount((function(e){t.isDestroyed()||(t.videoCount=e,t.setPercentage(),t.viewModel.get("percentage")>=100?t.migrationVideoDataService.clearCacheAndGetCustomerMetadata((function(){n.a.AppLinkHelper.trigger({application:f.b.MIGRATION_WIZARD,action:f.a.MigrationWizard.BACKUP_COMPLETE})})):(setTimeout((function(){return t.poll()}),5e3),t.render()))}))}},{key:"setPercentage",value:function(){if(this.videoCount){var t=100*this.videoCount.get("progressPercentage");t>100&&(t=100),this.viewModel.set({percentage:Math.round(t)})}}},{key:"renderProgressCircle",value:function(){this.showChildView("progressCircle",new y.a({model:this.viewModel,text:p.a.getPhrase(this.lang,"hasBeenBackedUp"),class:c.a.progress}))}},{key:"onBeforeRender",value:function(){return this.customerMetadata=this.migrationVideoDataService.getCustomerMetadata(),!!this.customerMetadata}},{key:"viewOptions",value:function(){return{styles:c.a,timeRemaining:"30 minutes"}}},{key:"onRender",value:function(){this.pollingStarted||(this.poll(),this.pollingStarted=!0),this.renderProgressCircle()}}])&&h(e.prototype,r),a&&h(e,a),Object.defineProperty(e,"prototype",{writable:!1}),b}(n.a.View)}}]);
@@ -1 +0,0 @@
1
- (window.webpackJsonp_clickview_library_editor=window.webpackJsonp_clickview_library_editor||[]).push([[41],{1328: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,l=e.lambda,a=e.escapeExpression;return'<div class="'+a(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.addLibraryContainer:i,t))+'">\r\n <button class="applink-new-library btn btn-outline-secondary '+a(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.addLibrary:i,t))+'">\r\n <span class="'+a(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.plus:i,t))+' d-inline-block position-absolute">\r\n '+(null!=(i=l(null!=(i=null!=t?t.options:t)?i.plusSvg:i,t))?i:"")+"\r\n </span>\r\n "+a((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"newLibrary",{name:"lang",hash:{},data:o}))+"\r\n </button>\r\n</div>\r\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var i;e.propertyIsEnumerable;return'<div class="logo-region"></div>\r\n<div class="folder-tree-region"></div>\r\n'+(null!=(i=n.if.call(null!=t?t:e.nullContext||{},null!=(i=null!=t?t.options:t)?i.canCreateLibraries:i,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o}))?i:"")},useData:!0})},1329: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.disabled:i,t))},3: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.selected:i,t))},5:function(e,t,n,r,o){e.propertyIsEnumerable;var i,l=e.lambda;return' <span class="'+e.escapeExpression(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.caret:i,t))+' d-inline-block position-absolute">\r\n '+(null!=(i=l(null!=(i=null!=t?t.options:t)?i.caretSvg:i,t))?i:"")+"\r\n </span>\r\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){e.propertyIsEnumerable;var i,l,a=e.lambda,s=e.escapeExpression,u=null!=t?t:e.nullContext||{};return'<div class="position-relative border-bottom '+s(a(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.library:i,t))+" "+(null!=(i=n.if.call(u,null!=(i=null!=t?t.options:t)?i.disabled:i,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o}))?i:"")+'">\r\n <a class="position-relative library-event '+s(a(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.libraryAnchor:i,t))+" "+(null!=(i=n.if.call(u,null!=(i=null!=t?t.options:t)?i.open:i,{name:"if",hash:{},fn:e.program(3,o,0),inverse:e.noop,data:o}))?i:"")+' ui-anchor no-hover-text-underline">\r\n'+(null!=(i=n.if.call(u,null!=(i=null!=t?t.options:t)?i.hasFolders:i,{name:"if",hash:{},fn:e.program(5,o,0),inverse:e.noop,data:o}))?i:"")+' <span class="'+s(a(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.text:i,t))+' ui-text">'+s("function"==typeof(l=null!=(l=n.name||(null!=t?t.name:t))?l:e.hooks.helperMissing)?l.call(u,{name:"name",hash:{},data:o}):l)+'</span>\r\n </a>\r\n <div class="actions-region"></div>\r\n</div>\r\n<div class="folders-region"></div>'},useData:!0})},1330:function(e,t,n){e.exports={addLibrary:"_1O42p",addLibraryContainer:"_1HX0v",plus:"_3aHT2"}},1331: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,l,a=e.escapeExpression;return'<img src="'+a("function"==typeof(l=null!=(l=n.url||(null!=t?t.url:t))?l:e.hooks.helperMissing)?l.call(null!=t?t:e.nullContext||{},{name:"url",hash:{},data:o}):l)+'" class="'+a(e.lambda(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.image:i,t))+'"/>\r\n'},3:function(e,t,n,r,o){e.propertyIsEnumerable;var i,l=e.lambda,a=e.escapeExpression;return'<a class="d-inline-flex align-items-center no-decoration '+a(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.addCrest:i,t))+'" href="'+a(l(null!=(i=null!=t?t.options:t)?i.uploadLogoUrl:i,t))+'" target="_blank">\r\n '+a((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"crest",{name:"lang",hash:{},data:o}))+"\r\n</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!=t?t.url:t,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.program(3,o,0),data:o}))?i:""},useData:!0})},1332:function(e,t,n){e.exports={image:"Cz1y1",addCrest:"_2PAV_"}},1490:function(e,t,n){"use strict";n.r(t);var r=n(2),o=n(16),i=n(69),l=n(0),a=n(147),s=n(1328),u=n.n(s),c=n(5),f=n(1109),p=n(1130),y=n(1329),d=n.n(y),h=n(1207),b=n(1209),v=n.n(b),m=n(12),g=n(30),w=n(1110),O=n(4);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 L(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function E(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 R(e,t,n){return t&&E(e.prototype,t),n&&E(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function C(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)}function _(e,t){return(_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function x(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=S(e);if(t){var o=S(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return I(this,n)}}function I(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 S(e){return(S=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var P=function(e){C(n,e);var t=x(n);function n(e){return L(this,n),t.call(this,e)}return R(n,[{key:"initialize",value:function(){var e=this.options.forceOpen||this.options.libraryId&&this.model.get("id").toString()===this.options.libraryId.toString();this.viewModel=g.a.get("".concat("library:left:nav",":").concat(this.model.get("id"))),this.viewModel.set("open",e),this.viewModel.set("disabled",!1),this.listenTo(this.model,"change:name",this.render),this.options.hasMultipleLibraries&&this.listenTo(this,"open:sub:folders",this.onOpenSubFolders),this.videoDragDropService=c.a.getInstance(l.x.VideoDragDrop,this)}},{key:"name",get:function(){return"LeftNavLibraryComponent"}},{key:"template",get:function(){return d.a}},{key:"className",get:function(){return v.a.libraryContainer}},{key:"behaviors",get:function(){var e=[l.w.FOLDER_DRAG_DROP];return this.options.hasMultipleLibraries&&e.push(l.w.VIDEO_DRAG_DROP),[{behaviorClass:w.a,ui:"anchor",channelNames:e,analyticsOptions:{location:O.LocationContext.LeftNav}}]}},{key:"regions",value:function(){return{folders:{el:".folders-region",replaceElement:!0},actions:{el:".actions-region",replaceElement:!0}}}},{key:"appLinks",get:function(){return{".ui-anchor":{application:l.b.LIBRARY_EDITOR,action:l.a.LibraryEditor.LIBRARY,args:[this.model.get("id")]}}}},{key:"events",value:function(){return{"click .library-event":"onClick"}}},{key:"elements",get:function(){return{anchor:".ui-anchor",text:".ui-text"}}},{key:"onClick",value:function(e){this.viewModel.get("open")&&(e.stopImmediatePropagation(),e.preventDefault(),this.viewModel.set("open",!this.viewModel.get("open")),this.render())}},{key:"onOpenSubFolders",value:function(){if(this.videoDragDropService.getDisabledLibraryIds().includes(this.model.get("id")))return this.viewModel.set("disabled",!0),void this.render();this.viewModel.set("open",!0),this.render()}},{key:"hasFolders",value:function(){return!!m.f.getFirstType(this.model.children,"category")}},{key:"analyticsOptions",get:function(){return{location:O.LocationContext.LeftNav}}},{key:"viewOptions",value:function(){return{styles:v.a,caretSvg:o.a.getSvg(o.b.Caret),open:this.viewModel.get("open"),hasFolders:this.hasFolders(),disabled:this.viewModel.get("disabled")}}},{key:"onRender",value:function(){this.showChildView("actions",new h.a({model:this.model,extraClasses:"rounded-circle mr-1 ".concat(v.a.actions),buttonClass:"text-muted",analyticsOptions:this.analyticsOptions})),this.model.children&&this.model.children.length&&this.viewModel.get("open")&&this.showChildView("folders",new f.a({appLink:{action:l.a.LibraryEditor.FOLDER,application:l.b.LIBRARY_EDITOR},linkArgs:function(e){return[e.get("id")]},collection:this.model.children,channelName:"".concat(this.cid),childrenProperty:"children",actions:p.a,folderTreeId:this.options.folderTreeId,analyticsOptions:this.analyticsOptions}))}}]),n}(r.a.Component),j=function(e){C(n,e);var t=x(n);function n(e){return L(this,n),t.call(this,e)}return R(n,[{key:"name",get:function(){return"LeftNavLibrariesComponent"}},{key:"childView",get:function(){return P}},{key:"childViewOptions",get:function(){return{channelName:this.options.channelName,libraryId:this.options.libraryId,folderTreeId:this.options.folderTreeId,forceOpen:this.options.forceOpen,hasMultipleLibraries:this.collection.length>1}}}]),n}(r.a.ComponentCollection),D=n(1330),T=n.n(D),N=n(14),M=n(145),A=n(202),B=n(9),U=n(95),V=n(53),F=n(42),Y=n(1331),G=n.n(Y),z=n(1332),H=n.n(z);function J(e){return(J="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function q(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 X(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=Q(e);if(t){var o=Q(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return K(this,n)}}function K(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 Q(e){return(Q=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Z=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)}(i,e);var t,n,r,o=X(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"CustomerLogoComponent"}},{key:"template",get:function(){return G.a}},{key:"lang",get:function(){return"libraryEditor.customerLogo"}},{key:"className",get:function(){return"text-center p-3 position-relative"}},{key:"events",value:function(){return e={},t="click .".concat(H.a.addCrest),n="onClickAddLogo",t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e;var e,t,n}},{key:"onClickAddLogo",value:function(){var e={location:O.LocationContext.LeftNav,actionType:O.UserAction.Create,entity:O.EntityType.Logo};F.a.logUserAction({},e)}},{key:"viewOptions",value:function(){return{styles:H.a,uploadLogoUrl:V.a.urlBuilder(V.a.safeUrlConcat(this.options.onlineUrl,l.t.UPLOAD_LOGO),{loginPrompt:!1})}}}])&&q(t.prototype,n),r&&q(t,r),Object.defineProperty(t,"prototype",{writable:!1}),i}(r.a.Component);function $(e){return($="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ee(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 te(e,t){return(te=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function ne(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=oe(e);if(t){var o=oe(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return re(this,n)}}function re(e,t){if(t&&("object"===$(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function oe(e){return(oe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n.d(t,"LeftNavigationView",(function(){return ie}));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&&te(e,t)}(f,e);var t,n,r,s=ne(f);function f(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,f),s.call(this,e)}return t=f,(n=[{key:"initialize",value:function(){this.bindListeners(),this.settingsDataService=c.a.getInstance(N.a.Settings,this)}},{key:"bindListeners",value:function(){this.listenTo(this.channelName,"select:library",this.onSelectLibrary),this.listenTo(l.e.LIBRARY,"cache:cleared",this.fetchData),this.listenTo(l.w.FOLDER_DRAG_DROP,"re:render:left:nav",this.render),this.listenTo(l.e.SETTINGS,"".concat(l.f.SETTINGS,":sync"),this.render)}},{key:"name",get:function(){return"LeftNavigationView"}},{key:"title",get:function(){return!1}},{key:"channelName",get:function(){return"".concat(this.name).concat(this.cid)}},{key:"lang",get:function(){return"libraryEditor.leftNavigation"}},{key:"className",get:function(){return"bg-white pb-3"}},{key:"template",get:function(){return u.a}},{key:"regions",value:function(){return{logo:{el:".logo-region",replaceElement:!1},folderTree:{el:".folder-tree-region",replaceElement:!1,partialLoading:B.h.LeftNav}}}},{key:"events",value:function(){return{"click .new-folder":"newFolder"}}},{key:"appLinks",get:function(){return{".applink-new-library":{application:l.b.LIBRARY_EDITOR,action:l.a.LibraryEditor.NEW_LIBRARY}}}},{key:"fetchData",value:function(){this.maxCustomLibraries=this.settingsDataService.getSetting(this.currentUser.get("customerId"),i.a.MaxCustomLibraries)}},{key:"onSelectLibrary",value:function(e){this.collection.each((function(t){g.a.get("".concat("library:left:nav",":").concat(t.id)).set("open",t.id.toString()===e)})),this.render()}},{key:"renderLogo",value:function(){this.showChildView("logo",new Z({model:this.currentUser.get("customerLogo"),customerId:this.currentUser.get("customerId"),onlineUrl:this.config.get("onlineUrl")}))}},{key:"renderLeftNav",value:function(){var e=new j({collection:this.collection,channelName:this.channelName,libraryId:this.options.libraryId,folderTreeId:U.a.LIBRARY_EDITOR,forceOpen:1===this.collection.length});this.showChildView("folderTree",e)}},{key:"requiredResources",get:function(){return{currentUser:M.b.currentUser,config:A.b.config,collection:a.b.libraries}}},{key:"onBeforeRender",value:function(){return this.fetchData(),!!this.maxCustomLibraries}},{key:"viewOptions",value:function(){if(this.collection)return{styles:T.a,plusSvg:o.a.getSvg(o.b.Plus),canCreateLibraries:!!this.maxCustomLibraries&&this.maxCustomLibraries.get("value")>this.collection.length}}},{key:"onRender",value:function(){this.renderLogo(),this.renderLeftNav()}}])&&ee(t.prototype,n),r&&ee(t,r),Object.defineProperty(t,"prototype",{writable:!1}),f}(r.a.View)}}]);
@@ -1 +0,0 @@
1
- (window.webpackJsonp_clickview_library_editor=window.webpackJsonp_clickview_library_editor||[]).push([[42],{1430:function(e,t,n){e.exports={smart:"_1dRs0",leftNav:"_3dpUO"}},1431:function(e,t,n){e.exports={item:"_13Gu_",text:"_2mbEb",folderTree:"_2NhVk",node:"_1dMK1",selected:"_1AACi"}},1432:function(e,t,n){var i=n(10);e.exports=(i.default||i).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,i,r){var o;e.propertyIsEnumerable;return'<div class="selected-banner-region"></div>\r\n<div class="search-region"></div>\r\n<div class="banner-region"></div>\r\n<div class="col-4 '+e.escapeExpression(e.lambda(null!=(o=null!=(o=null!=t?t.options:t)?o.styles:o)?o.leftNav:o,t))+'">\r\n <div class="left-nav-region"></div>\r\n</div>\r\n<div class="col">\r\n <div class="header-region"></div>\r\n <div class="video-list-region"></div>\r\n</div>\r\n<div class="footer-region"></div>'},useData:!0})},1433:function(e,t,n){var i=n(10);e.exports=(i.default||i).template({1:function(e,t,n,i,r){e.propertyIsEnumerable;var o,a=e.lambda,s=e.escapeExpression;return' <a class="applink-goback '+s(a(null!=(o=null!=(o=null!=t?t.options:t)?o.styles:o)?o.back:o,t))+'">\r\n <span class="align-middle d-inline-block '+s(a(null!=(o=null!=(o=null!=t?t.options:t)?o.styles:o)?o.backSvgContainer:o,t))+'">'+(null!=(o=a(null!=(o=null!=t?t.options:t)?o.backSvg:o,t))?o:"")+"</span>\r\n </a>\r\n"},3:function(e,t,n,i,r){var o;e.propertyIsEnumerable;return" "+(null!=(o=(n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"resultsFor",{name:"lang",hash:{searchTerm:null!=(o=null!=t?t.options:t)?o.searchTerm:o,smartCount:null!=(o=null!=t?t.options:t)?o.results:o},data:r}))?o:"")+"\r\n"},5:function(e,t,n,i,r){var o;e.propertyIsEnumerable;return" "+e.escapeExpression(e.lambda(null!=(o=null!=t?t.options:t)?o.name:o,t))+"\r\n"},7:function(e,t,n,i,r){e.propertyIsEnumerable;var o,a=e.lambda,s=e.escapeExpression,l=null!=t?t:e.nullContext||{};return'<div class="col-4 text-right py-2 '+s(a(null!=(o=null!=(o=null!=t?t.options:t)?o.styles:o)?o.subheader:o,t))+'">\r\n <div class="cursor-pointer toggle-migrated h-100 d-flex align-items-center justify-content-end">\r\n <span class="'+s(a(null!=(o=null!=(o=null!=t?t.options:t)?o.styles:o)?o.svg:o,t))+' mr-1">'+(null!=(o=a(null!=(o=null!=t?t.options:t)?o.svg:o,t))?o:"")+"</span>\r\n <span>"+(null!=(o=n.if.call(l,null!=(o=null!=t?t.options:t)?o.hidden:o,{name:"if",hash:{},fn:e.program(8,r,0),inverse:e.program(10,r,0),data:r}))?o:"")+" "+s((n.lang||t&&t.lang||e.hooks.helperMissing).call(l,"migrated",{name:"lang",hash:{},data:r}))+"</span>\r\n </div>\r\n</div>\r\n"},8:function(e,t,n,i,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}))},10:function(e,t,n,i,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}))},compiler:[8,">= 4.3.0"],main:function(e,t,n,i,r){e.propertyIsEnumerable;var o,a=null!=t?t:e.nullContext||{};return'<div class="col-8">\r\n'+(null!=(o=n.if.call(a,null!=(o=null!=t?t.options:t)?o.goBack:o,{name:"if",hash:{},fn:e.program(1,r,0),inverse:e.noop,data:r}))?o:"")+' <h4 class="'+e.escapeExpression(e.lambda(null!=(o=null!=(o=null!=t?t.options:t)?o.styles:o)?o.header:o,t))+' py-2">\r\n'+(null!=(o=n.if.call(a,null!=(o=null!=t?t.options:t)?o.searchTerm:o,{name:"if",hash:{},fn:e.program(3,r,0),inverse:e.program(5,r,0),data:r}))?o:"")+" </h4>\r\n</div>\r\n\r\n"+(null!=(o=n.if.call(a,null!=(o=null!=t?t.options:t)?o.showMigrationToggle:o,{name:"if",hash:{},fn:e.program(7,r,0),inverse:e.noop,data:r}))?o:"")},useData:!0})},1492:function(e,t,n){"use strict";n.r(t);var i=n(2),r=n(3),o=n(51),a=n(59),s=n(1430),l=n.n(s),c=n(1431),u=n.n(c),d=n(1432),h=n.n(d),f=n(9),g=n(1109),p=n(1139),v=n(1),y=n(6),m=n(5),b=n(16),S=n(338),w=n(1433),k=n.n(w),M=n(54),I=n(120),O=n(0);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 C(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function E(e,t){return(E=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,i=V(e);if(t){var r=V(this).constructor;n=Reflect.construct(i,arguments,r)}else n=i.apply(this,arguments);return A(this,n)}}function A(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)}var _=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&E(e,t)}(o,e);var t,n,i,r=R(o);function o(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),r.call(this,e)}return t=o,(n=[{key:"initialize",value:function(){this.localOptionsService=m.a.getInstance(O.x.LocalOptions,this),this.migrationVideoDataService=m.a.getInstance(O.g.MigrationVideo,this);var e=this.localOptionsService.getOption(M.b.MigratedHidden);v.isUndefined(e)?(this.setMigrationHiddenOption(!1),this.migratedHidden=!1):this.migratedHidden=e}},{key:"name",get:function(){return"CurrentSectionHeaderView"}},{key:"title",get:function(){return!1}},{key:"lang",get:function(){return"migrationWizard.currentSectionHeader"}},{key:"className",get:function(){return"row px-2 ".concat(S.currentHeader)}},{key:"template",get:function(){return k.a}},{key:"elements",get:function(){return{toggleMigrated:".toggle-migrated"}}},{key:"events",value:function(){return{"click @ui.toggleMigrated":"toggleMigrated"}}},{key:"viewOptions",value:function(){return{styles:S,name:this.options.searchTerm||this.model&&this.model.get("name"),hidden:this.migratedHidden,svg:b.a.getSvg(this.migratedHidden?b.b.VisibleOn:b.b.VisibleOff),goBack:this.options.searchTerm,showMigrationToggle:!this.options.initialMigration,backSvg:b.a.getSvg("arrow-left",{prefix:"fas"}),searchTerm:this.options.searchTerm,results:10}}},{key:"appLinks",get:function(){return{".applink-goback":{application:I.a.MIGRATION_WIZARD,action:this.options.initialMigration?O.a.MigrationWizard.SMART:O.a.MigrationWizard.HOME}}}},{key:"onBeforeRender",value:function(){var e=this;return!(!this.model&&!this.options.searchTerm&&(this.migrationVideoDataService.getSelected((function(t){t&&(e.model=t,e.triggerToggle(),e.render())})),!this.model))}},{key:"toggleMigrated",value:function(){this.migratedHidden=!this.migratedHidden,this.setMigrationHiddenOption(this.migratedHidden),this.triggerToggle(),this.render()}},{key:"triggerToggle",value:function(){y.Radio.channel(I.b.MIGRATION).trigger(O.i.MigrationWizard.TOGGLE_MIGRATED,this.migratedHidden)}},{key:"setMigrationHiddenOption",value:function(e){this.localOptionsService.setOption(M.b.MigratedHidden,e)}}])&&C(t.prototype,n),i&&C(t,i),Object.defineProperty(t,"prototype",{writable:!1}),o}(i.a.View);function x(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return N(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 N(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,r=function(){};return{s:r,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function N(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}var P={getSelectedInFolder:function(e,t){var n,i=x(p.a.getSelectedVideosCollection(e).toArray());try{for(i.s();!(n=i.n()).done;){var r=n.value;if(r.get("category")===t)return r.get("count")}}catch(e){i.e(e)}finally{i.f()}return 0},findFolder:function(e,t){var n;if(e)return e.forEach((function(e){if(e.get("categoryGuid")===t)n=e;else{var i=P.findFolder(e.get("children"),t);i&&(n=i)}})),n}},L=n(58),B=n(92),D=n(30),j=n(202),H=n(1129),G=n(12),W=n(95),F=n(201),z=n(145);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 Z(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function q(e,t){return(q=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,i=K(e);if(t){var r=K(this).constructor;n=Reflect.construct(i,arguments,r)}else n=i.apply(this,arguments);return $(this,n)}}function $(e,t){if(t&&("object"===U(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function K(e){return(K=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n.d(t,"SmartMigrationView",(function(){return Y}));var Y=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&q(e,t)}(d,e);var t,n,s,c=J(d);function d(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,d),c.call(this,e)}return t=d,(n=[{key:"initialize",value:function(){this.viewModel=D.a.get(this.viewModelName,{bannerShown:!0},{ctor:B.e,storage:{type:a.c.LocalStorage,persistProps:["bannerShown"]}}),this.bindListeners(),this.initializeServices()}},{key:"name",get:function(){return"SmartMigrationView"}},{key:"title",get:function(){return r.a.getPhrase(this.lang,"title")}},{key:"lang",get:function(){return"migrationWizard.smartMigration"}},{key:"viewModelName",get:function(){return"".concat(this.name,":viewmodel")}},{key:"channelName",get:function(){return"".concat(this.name,":").concat(this.cid)}},{key:"template",get:function(){return h.a}},{key:"className",get:function(){return"row no-gutters w-100 ".concat(l.a.smart)}},{key:"regions",value:function(){return{selectedBanner:{replaceElement:!0,el:".selected-banner-region"},search:{replaceElement:!0,el:".search-region",partialLoading:f.h.PublisherArchiveSearchBar},banner:{replaceElement:!0,el:".banner-region"},leftNav:{replaceElement:!0,el:".left-nav-region",partialLoading:f.h.PublisherArchiveLeftNav},header:{replaceElement:!0,el:".header-region",partialLoading:f.h.PublisherArchiveSectionHeader},videoList:{replaceElement:!0,el:".video-list-region",partialLoading:f.h.PublisherArchiveVideoList},footer:{replaceElement:!0,el:".footer-region",partialLoading:f.h.PublisherArchiveStatusBar}}}},{key:"initializeServices",value:function(){this.folderCacheService=m.a.getInstance(O.x.FolderCache,this),this.selectedVideoService=m.a.getInstance(O.x.SelectedVideo,this),this.migrationVideoDataService=m.a.getInstance(O.g.MigrationVideo,this),this.alertService=m.a.getInstance(O.x.Alerts)}},{key:"bindListeners",value:function(){this.listenTo(O.e.MIGRATION,O.i.MigrationWizard.SELECTED_CHANGED,this.setSelectedVideos),this.listenTo(O.e.MIGRATION,"manual:review:video:count:sync",this.render),this.listenTo(O.e.MIGRATION,"".concat(O.f.CUSTOMER_VIDEO,":count:sync"),this.render),this.listenTo(O.e.MIGRATION,"".concat(O.f.CUSTOMER_METADATA,":sync"),this.render),this.listenTo(O.b.MIGRATION_WIZARD,O.i.MigrationWizard.CLOSE_BANNER,this.closeSelectionBanner),this.listenTo(this.channelName,"add:selected",this.addSelected),this.listenTo(this.channelName,"remove:selected",this.removeSelected),this.listenTo(this.viewModel,"change:selectedVideoCount",this.renderStatusBar)}},{key:"fetchVideos",value:function(){var e=this;!this.videos&&this.options.folderChord&&this.migrationVideoDataService.getCustomerVideos(this.options.folderChord,(function(t){e.videos||(e.videos=p.a.toggleMigrated(t,!0),e.setSelectedVideos(),e.isRendering||e.render())}))}},{key:"fetchFolders",value:function(){var e=this;this.folders||this.migrationVideoDataService.getCustomerFolders((function(t){if(!e.folders){if(e.folders=t,e.options.folderChord){var n=e.folderCacheService.getFolderByChord(e.options.folderChord,t);G.f.setSelected(W.a.MIGRATION_WIZARD,n,e.folders),e.selectedFolder=G.f.getSelected(W.a.MIGRATION_WIZARD,t)}else{var r=e.folders.first();if(r)return void i.a.AppLinkHelper.trigger({application:O.b.MIGRATION_WIZARD,action:O.a.MigrationWizard.HOME,params:{folder:r.get("chord")}},{replace:!0})}e.isRendering||e.render()}}))}},{key:"setFolderText",value:function(e,t){var n=this,i=e.get("chord"),r=e.get("name"),o=this.folderCacheService.getFolderCache(),a=this.options.folderChord;if(a){var s,l=P.getSelectedInFolder(t,r);if(i===a){var c=this.migrationVideoDataService.getCustomerVideos(i);if(!this.selectedFolder)return;c&&(o[a]=c.length),s=o[a]}o[i]&&(s=o[i]),l&&s?e.set("text","".concat(r," (").concat(l,"/").concat(s,")")):e.set("text",r),e.children.forEach((function(e){return n.setFolderText(e,t)}))}else e.set("text",r)}},{key:"closeSelectionBanner",value:function(){var e=this.getRegion("selectedBanner");e&&(this.viewModel.set("bannerShown",!1),e.destroy())}},{key:"setSelectedVideos",value:function(){var e=this,t=this.selectedVideoService.getSelectedVideoIds();this.videos&&this.videos.forEach((function(n){return p.a.setChecked(n,t,e.isInitialMigration())})),t&&this.viewModel.set("selectedVideoCount",t.length)}},{key:"addSelected",value:function(e,t){this.selectedVideoService.addSelectedVideos(e,t)}},{key:"removeSelected",value:function(e,t){this.selectedVideoService.removeSelectedVideos(e,t)}},{key:"isInitialMigration",value:function(){return L.a.isInitialMigration(this.customerMetadata)}},{key:"onClickBack",value:function(){var e=this;new G.d({title:r.a.getPhrase(this.lang,"backHeading"),text:r.a.getPhrase(this.lang,"backBody"),buttons:[{text:r.a.getPhrase(this.lang,"discard"),className:"btn btn-danger",success:!0},{text:r.a.getPhrase(this.lang,"cancel"),className:"btn btn-secondary",close:!0}]}).render().done((function(){e.selectedVideoService.removeAllSelectedVideos(),e.viewModel.set("alertShown",!1),i.a.AppLinkHelper.trigger({application:O.b.MIGRATION_WIZARD,action:O.a.MigrationWizard.START_MIGRATION})}))}},{key:"centerSelectedItem",value:function(){var e=this.$el.find(".".concat(l.a.leftNav)),t=e.find(".".concat(u.a.selected));if(t.length&&!(t.offset().top-e.offset().top+t.height()<e.height())){var n=e.scrollTop()+(t.offset().top-e.offset().top),i=.5*e.height()+.5*t.height();e.scrollTop(n-i)}}},{key:"renderEmptyMessage",value:function(){this.showChildView("videoList",new H.b({text:"No folder selected"}))}},{key:"renderSelectedBanner",value:function(){if(this.isInitialMigration()&&!this.viewModel.get("alertShown")){this.viewModel.set("alertShown",!0);var e={heading:r.a.getPhrase(this.lang,"smartSelected"),message:r.a.getPhrase(this.lang,"last3Years"),type:o.a.Success};this.alertService.createAlert(e)}}},{key:"renderLeftNav",value:function(){var e=this,t=new g.a({styles:u.a,appLink:{action:O.a.MigrationWizard.HOME,application:O.b.MIGRATION_WIZARD},linkParams:function(e){return{folder:e.get("chord")}},collection:this.folders,channelName:"".concat(this.cid),childrenProperty:"children",textProperty:"name",extraClass:"p-0",folderTreeId:W.a.MIGRATION_WIZARD});this.showChildView("leftNav",t),window.requestAnimationFrame((function(){window.requestAnimationFrame((function(){e.centerSelectedItem()}))}))}},{key:"renderSearchBar",value:function(){this.showChildView("search",new H.h({selected:this.errorCount.get("count")?"publisher-archive":"none"}))}},{key:"renderStatusBar",value:function(){var e=this;if(this.videoCount){var t={application:O.b.MIGRATION_WIZARD,action:O.a.MigrationWizard.SELECTED,args:[this.options.folderChord]},n=this.videoCount.get("successCount"),i=this.selectedVideoService.getNumberSelected(),o=new H.k({nextAppLink:t,showSelected:!0,nextDisabled:0===i,showBackButton:this.isInitialMigration(),text:this.isInitialMigration()?r.a.getPhrase(this.lang,"next"):r.a.getPhrase(this.lang,"addToLibrary"),numberSelected:i,numberAvailable:n,onClickBack:function(){return e.onClickBack()}});this.showChildView("footer",o)}}},{key:"renderVideoList",value:function(){var e=this.options,t=e.folderChord,n=e.searchTerm;if(this.videos||!t&&!n)if(this.selectedFolder){this.showChildView("videoList",new H.l({model:this.selectedFolder,initialMigration:this.isInitialMigration(),folderChord:t,searchTerm:n,collection:this.videos,channelName:this.channelName,supportSiteUrl:this.config.get("supportSiteUrl")}));var i=n||t;G.a.GetViewModel(i,F.CheckboxTypes.MIGRATION_VIDEO_LIST).trigger("change")}else this.renderEmptyMessage();else this.renderPartialLoading("videoList")}},{key:"renderCurrentSection",value:function(){this.showChildView("header",new _({searchTerm:this.options.searchTerm,initialMigration:this.isInitialMigration()}))}},{key:"renderBanner",value:function(){this.isInitialMigration()&&this.showChildView("banner",new H.a({config:this.config,currentUser:this.currentUser}))}},{key:"requiredResources",get:function(){return{config:j.b.config,currentUser:z.b.currentUser}}},{key:"onBeforeRender",value:function(){this.isRendering=!0,this.fetchVideos(),this.fetchFolders(),this.customerMetadata=this.migrationVideoDataService.getCustomerMetadata(),this.errorCount=this.migrationVideoDataService.getManualReviewVideoCount(),this.videoCount=this.migrationVideoDataService.getCustomerVideoCountCached();var e=!!(this.customerMetadata&&this.folders&&this.videoCount&&this.errorCount);return e||(this.isRendering=!1),e}},{key:"viewOptions",value:function(){return{styles:l.a}}},{key:"onRender",value:function(){if(this.renderSelectedBanner(),this.renderLeftNav(),this.renderSearchBar(),this.renderStatusBar(),this.renderBanner(),!this.videos)return this.renderPartialLoading("header"),this.renderPartialLoading("videoList"),void(this.isRendering=!1);this.options.folderChord||this.options.searchTerm?(this.renderVideoList(),this.renderCurrentSection()):this.renderEmptyMessage(),this.isRendering=!1}}])&&Z(t.prototype,n),s&&Z(t,s),Object.defineProperty(t,"prototype",{writable:!1}),d}(i.a.View)}}]);
@@ -1 +0,0 @@
1
- (window.webpackJsonp_clickview_library_editor=window.webpackJsonp_clickview_library_editor||[]).push([[43],{1051:function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));var r=n(2),o=n(265);function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function s(e,t){return(s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function u(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=f(e);if(t){var o=f(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return c(this,n)}}function c(e,t){if(t&&("object"===i(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function f(e){return(f=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var d=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&s(e,t)}(c,e);var t,n,r,i=u(c);function c(){return a(this,c),i.apply(this,arguments)}return t=c,(n=[{key:"defaults",value:function(){return e={},t=o.c.Disabled,n=!0,t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e;var e,t,n}}])&&l(t.prototype,n),r&&l(t,r),Object.defineProperty(t,"prototype",{writable:!1}),c}(r.a.Model)},1065:function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));var r=n(1),o=n(2),i=n(312);function a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function l(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function s(e,t){return(s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function u(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=f(e);if(t){var o=f(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return c(this,n)}}function c(e,t){if(t&&("object"===a(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function f(e){return(f=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var d=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&s(e,t)}(c,e);var t,n,o,a=u(c);function c(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c),a.call(this,e)}return t=c,(n=[{key:"name",get:function(){return"DropdownCollectionComponent"}},{key:"className",get:function(){return"dropdown-menu items-viewpart ".concat(this.getExtraClasses(this.options.displayOptions))}},{key:"attributes",get:function(){return{"aria-labelledby":"dropdownSelector"}}},{key:"initialize",value:function(){this.listenTo(this.options.channelName,"center:dropdown",this.centerSelectedItem)}},{key:"childView",get:function(){return i.a}},{key:"childViewOptions",get:function(){var e={channelName:this.options.channelName,analyticsHelper:this.options.analyticsHelper};return r.extend(e,this.options.childOptions)}},{key:"getExtraClasses",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.alignment,n=void 0===t?"left":t,r=e.extraClasses,o="dropdown-menu-".concat(n);return r&&(o="".concat(o," ").concat(r)),o}},{key:"centerSelectedItem",value:function(){var e=this.$el.find(".active");if(e.length){var t=this.$el.scrollTop()+e.position().top,n=.5*this.$el.height()+.5*e.height();this.$el.scrollTop(t-n)}}}])&&l(t.prototype,n),o&&l(t,o),Object.defineProperty(t,"prototype",{writable:!1}),c}(o.a.ComponentCollection)},1360: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(null!=(i=n.if.call(a,null!=(i=null!=t?t.options:t)?i.foundLibraries:i,{name:"if",hash:{},fn:e.program(2,o,0),inverse:e.noop,data:o}))?i:"")+"\r\n"+(null!=(i=n.if.call(a,null!=(i=null!=t?t.options:t)?i.hasAvailableLibraries:i,{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.options:t)?i.showNoFolderText:i,{name:"if",hash:{},fn:e.program(7,o,0),inverse:e.noop,data:o}))?i:"")},2:function(e,t,n,r,o){var i;e.propertyIsEnumerable;return' <div class="alert alert-info" role="alert">\r\n <p class="m-0">'+(null!=(i=(n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"foundLibraries",{name:"lang",hash:{libraries:null!=(i=null!=t?t.options:t)?i.foundLibraries:i},data:o}))?i:"")+"</p>\r\n </div>\r\n"},4:function(e,t,n,r,o){e.propertyIsEnumerable;var i,a=null!=t?t:e.nullContext||{},l=e.hooks.helperMissing,s=e.escapeExpression,u=e.lambda;return' <span class="d-block pb-2">'+s((n.lang||t&&t.lang||l).call(a,"selectFolder",{name:"lang",hash:{},data:o}))+"</span>\r\n"+(null!=(i=n.if.call(a,null!=(i=null!=t?t.options:t)?i.hasMultipleLibraries:i,{name:"if",hash:{},fn:e.program(5,o,0),inverse:e.noop,data:o}))?i:"")+' <div class="mt-1 mb-2 library-dropdown-region"></div>\r\n\r\n <span class="'+s(u(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.header:i,t))+' folder-name">'+s((n.lang||t&&t.lang||l).call(a,"folder",{name:"lang",hash:{},data:o}))+'</span>\r\n <div class="'+s(u(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.folderSelector:i,t))+' mt-1 folder-selector-region"></div>\r\n'},5:function(e,t,n,r,o){e.propertyIsEnumerable;var i,a=e.escapeExpression;return' <span class="'+a(e.lambda(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.header:i,t))+'">'+a((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"library",{name:"lang",hash:{},data:o}))+"</span>\r\n"},7:function(e,t,n,r,o){e.propertyIsEnumerable;var i,a=null!=t?t:e.nullContext||{},l=e.hooks.helperMissing;return" <p>"+e.escapeExpression((n.lang||t&&t.lang||l).call(a,"noFolders1",{name:"lang",hash:{},data:o}))+"</p>\r\n <p>"+(null!=(i=(n.lang||t&&t.lang||l).call(a,"noFolders2",{name:"lang",hash:{},data:o}))?i:"")+"</p>\r\n"},9:function(e,t,n,r,o){var i;e.propertyIsEnumerable;return(null!=(i=e.lambda(null!=(i=null!=t?t.options:t)?i.spinnerEl:i,t))?i:"")+"\r\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var i;e.propertyIsEnumerable;return null!=(i=n.if.call(null!=t?t:e.nullContext||{},null!=(i=null!=t?t.options:t)?i.dataFetched:i,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.program(9,o,0),data:o}))?i:""},useData:!0})},1361:function(e,t,n){e.exports={header:"_1tdTv"}},1463:function(e,t,n){"use strict";n.r(t),n.d(t,"AddToLibraryView",(function(){return C}));var r=n(1),o=n(2),i=n(5),a=n(265),l=n(1070),s=n(305),u=n(9),c=n(63),f=n(1051),d=n(12),p=n(0),h=n(3),y=n(147),b=n(1131),m=n(1360),g=n.n(m),v=n(1361),w=n.n(v);function O(e){return(O="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function k(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function L(e,t){return(L=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function S(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=j(e);if(t){var o=j(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"===O(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function j(e){return(j=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&&L(e,t)}(v,e);var t,n,o,m=S(v);function v(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,v),m.call(this,e)}return t=v,(n=[{key:"initialize",value:function(){this.videoDataService=i.a.getInstance(p.g.Video,this),this.bindListeners()}},{key:"name",get:function(){return"AddToLibraryView"}},{key:"title",get:function(){return h.a.getPhrase(this.lang,"title")}},{key:"lang",get:function(){return"contentUpdates.addToLibrary"}},{key:"tagName",get:function(){return"form"}},{key:"className",get:function(){return"form-group"}},{key:"appLinks",get:function(){return{".library-editor-applink":{application:p.b.LIBRARY_EDITOR,action:p.a.LibraryEditor.HOME}}}},{key:"folderTreeKey",get:function(){return"folderselect:".concat(this.cid)}},{key:"libraryTreeKey",get:function(){return"libraryselect:".concat(this.cid)}},{key:"channelName",get:function(){return d.k.generateUniqueChannelName(this)}},{key:"template",get:function(){return g.a}},{key:"behaviors",get:function(){var e=this;return[{behaviorClass:s.e,title:h.a.getPhrase(this.lang,"submitTooltip"),size:"modal-md",spinnerButtonOptions:{channelName:this.channelName,model:this.spinnerModel=new f.a,buttonText:h.a.getPhrase(this.lang,"addBtn"),tooltip:function(){return e.getSubmitBtnTooltipOptions()},onClick:function(t){return e.onSubmit(t)}}}]}},{key:"regions",value:function(){return{libraryDropdown:".library-dropdown-region",folderSelector:".folder-selector-region"}}},{key:"events",value:function(){return{submit:"onSubmit"}}},{key:"elements",get:function(){return{folderName:".folder-name"}}},{key:"bindListeners",value:function(){this.listenTo("".concat(this.channelName,":library"),"library:selected",this.onLibrarySelected),this.listenTo("".concat(this.channelName,":folder"),"folder:selected",this.onFolderSelected),this.listenTo(p.e.VIDEO,"".concat(p.f.VIDEOS,":").concat(this.options.videoId,":sync"),this.render),this.listenTo(p.e.VIDEO,"get:video:categories:libraries:".concat(this.options.videoId,":sync"),this.render)}},{key:"onSubmit",value:function(e){e&&e.preventDefault(),this.spinnerModel.set(a.c.ShowSpinner,!0),this.addToLibrary()}},{key:"onLibrarySelected",value:function(e){this.spinnerModel.set(a.c.Disabled,!0),d.f.setSelected(this.libraryTreeKey,e.get("id"),this.customLibraries),this.renderFolderSelector()}},{key:"onFolderSelected",value:function(e){this.spinnerModel.set(a.c.Disabled,!1),d.f.setSelected(this.folderTreeKey,e,this.customLibraries)}},{key:"getVideosCustomLibraryNames",value:function(){if(!this.dataFetched())return null;var e=this.getVideoCustomLibraries();if(!e.length)return null;var t=r.map(e,(function(e){return"<strong>".concat(d.w.escapeExpression(e),"</strong>")}));if(1===t.length)return t[0];var n=h.a.getPhrase(this.lang,"and");return"".concat(t.slice(0,-1).join(", ")," ").concat(n," ").concat(t.slice(-1))}},{key:"addToLibrary",value:function(){var e,t,n=this,o=d.f.getSelected(this.folderTreeKey,this.customLibraries),i=o.get("id"),a=d.f.getSelected(this.libraryTreeKey,this.customLibraries).get("id"),l=this.model.libraries.filter((function(e){return e.get("type")===c.a.HostedLibrary})),s=this.model.categories;s&&s.last()&&(e=s.last().get("id")),l&&l.length&&(t=r.last(l).get("id"));var f={masterObjectId:this.options.videoId,masterObjectType:u.g.Video,metadata:{sourceLibraryId:t,sourceCategoryId:e,destinationLibraryId:a,destinationCategoryId:i}};this.videoDataService.addVideoToCustomLibrary(f,this.model,o,(function(){n.triggerMethod("hide")}))}},{key:"getSubmitBtnTooltipOptions",value:function(){if(this.spinnerModel.get(a.c.Disabled)&&this.hasAvailableLibraries())return{title:h.a.getPhrase(this.lang,"heading")}}},{key:"getAvailableCustomLibraries",value:function(){if(!this.dataFetched())return null;var e=this.customLibraries.clone();e.remove(this.model.libraries.filter((function(e){return e.get("type")===c.a.CustomLibrary})));var t=e.filter((function(e){return 0===e.children.length}));return e.remove(t),e}},{key:"hasAvailableLibraries",value:function(){if(!this.customLibraries)return!1;var e=this.getAvailableCustomLibraries();return e&&e.length>0}},{key:"hasFolders",value:function(){return!!this.customLibraries&&!!this.customLibraries.find((function(e){return!!e.get("children").length}))}},{key:"getVideoCustomLibraries",value:function(){if(!this.model||!this.model.libraries||!this.model.libraries.length)return null;var e=this.model.libraries.filter((function(e){return e.get("type")===c.a.CustomLibrary}));return r.map(e,(function(e){return e.get("name")}))}},{key:"dataFetched",value:function(){return!!this.model}},{key:"renderLibraryDropdown",value:function(){if(this.customLibraries.length<=1)this.renderFolderSelector();else{var e=d.f.getSelected(this.libraryTreeKey,this.customLibraries),t=this.getUI("folderName");this.$(t).hide(),this.showChildView("libraryDropdown",new b.a({currentLibraryId:e?e.get("id"):null,collection:this.getAvailableCustomLibraries(),channelName:"".concat(this.channelName,":library")}))}}},{key:"renderFolderSelector",value:function(){var e=this.getAvailableCustomLibraries();1===e.length&&d.f.setSelected(this.libraryTreeKey,e.first().get("id"),e);var t=d.f.getSelected(this.libraryTreeKey,e),n=t.get("children")&&!!t.get("children").length,r=this.getUI("folderName");t&&n&&this.$(r).show(),this.showChildView("folderSelector",new l.a({collection:t.children,channelName:"".concat(this.channelName,":folder"),folderTreeKey:this.folderTreeKey}))}},{key:"requiredResources",get:function(){return{customLibraries:y.b.libraries}}},{key:"onBeforeRender",value:function(){this.model=this.videoDataService.getVideo(this.options.videoId)}},{key:"viewOptions",value:function(){var e;return{styles:w.a,foundLibraries:this.getVideosCustomLibraryNames(),hasAvailableLibraries:this.hasAvailableLibraries(),hasMultipleLibraries:(null===(e=this.customLibraries)||void 0===e?void 0:e.length)>1,dataFetched:this.dataFetched(),spinnerEl:d.r.getSpinner({size:d.s.Large,extraClasses:"mx-auto"}),showNoFolderText:!this.hasFolders()}}},{key:"onRender",value:function(){this.dataFetched()&&this.hasAvailableLibraries()&&this.renderLibraryDropdown()}}])&&k(t.prototype,n),o&&k(t,o),Object.defineProperty(t,"prototype",{writable:!1}),v}(o.a.View)}}]);