@clickview/library-editor 1.57.0 → 1.58.0-rc.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (216) hide show
  1. package/dist/bundles.json +3 -3
  2. package/dist/css/{152-library-editor-01b4461ff1.chunk.css → 463-library-editor-911bfc41fe.chunk.css} +1 -1
  3. package/dist/css/{5524-library-editor-de77327cdc.chunk.css → 4719-library-editor-7e2ac516b4.chunk.css} +1 -1
  4. package/dist/css/{61-library-editor-b5c939f10f.chunk.css → 4796-library-editor-2a18ebe0b9.chunk.css} +4 -4
  5. package/dist/css/{4001-library-editor-da87291909.chunk.css → 5319-library-editor-fe54adac16.chunk.css} +2 -2
  6. package/dist/css/library-editor-app-380eaa3fce.css +62 -0
  7. package/dist/scripts/{1010-f1c8bca022.chunk.js → 1010-a34c5ba546.chunk.js} +1 -1
  8. package/dist/scripts/1015-fde8b5ba1e.chunk.js +2 -0
  9. package/dist/scripts/1015-fde8b5ba1e.chunk.js.LICENSE.txt +41 -0
  10. package/dist/scripts/{7408-c1551d3e0d.chunk.js → 1080-78e6c18aa7.chunk.js} +1 -1
  11. package/dist/scripts/1115-c6cc1353bd.chunk.js +1 -0
  12. package/dist/scripts/1200-193f4b5bbd.chunk.js +1 -0
  13. package/dist/scripts/1524-1e4a0330df.chunk.js +1 -0
  14. package/dist/scripts/{1934-562cd9f48b.chunk.js → 1934-84460445ad.chunk.js} +1 -1
  15. package/dist/scripts/1973-47ac2859c2.chunk.js +1 -0
  16. package/dist/scripts/{2998-aae0ec14de.chunk.js → 2035-d874bdac26.chunk.js} +1 -1
  17. package/dist/scripts/2539-915297f0b5.chunk.js +1 -0
  18. package/dist/scripts/2591-fba291a9c0.chunk.js +1 -0
  19. package/dist/scripts/2598-225a27335b.chunk.js +1 -0
  20. package/dist/scripts/2614-aed18ce4af.chunk.js +1 -0
  21. package/dist/scripts/2648-3893c6b865.chunk.js +1 -0
  22. package/dist/scripts/{2803-fbb9d2439d.chunk.js → 2803-7a2cdecd93.chunk.js} +1 -1
  23. package/dist/scripts/{2888-c2c8b859cd.chunk.js → 2888-3298161a61.chunk.js} +1 -1
  24. package/dist/scripts/299-df09594cf4.chunk.js +1 -0
  25. package/dist/scripts/3288-ab3ca0da7f.chunk.js +1 -0
  26. package/dist/scripts/3305-b4175d4211.chunk.js +1 -0
  27. package/dist/scripts/3373-3286d26d40.chunk.js +1 -0
  28. package/dist/scripts/{5286-c574f5b574.chunk.js → 3391-469c93ab2c.chunk.js} +1 -1
  29. package/dist/scripts/{3400-ebc91cde7a.chunk.js → 3400-7a082a0377.chunk.js} +1 -1
  30. package/dist/scripts/3450-ad966a93e7.chunk.js +1 -0
  31. package/dist/scripts/{1832-52444b0088.chunk.js → 3475-d6fd75feeb.chunk.js} +1 -1
  32. package/dist/scripts/{3639-c5cc04c72d.chunk.js → 3639-631906e5be.chunk.js} +1 -1
  33. package/dist/scripts/3643-a191b71123.chunk.js +1 -0
  34. package/dist/scripts/{3763-47619f0e54.chunk.js → 3763-7ae73d91fa.chunk.js} +1 -1
  35. package/dist/scripts/3873-42f43a345f.chunk.js +1 -0
  36. package/dist/scripts/4027-fd3b5a0220.chunk.js +1 -0
  37. package/dist/scripts/416-4e7988439a.chunk.js +1 -0
  38. package/dist/scripts/{4201-ffd35af9cb.chunk.js → 4201-8856b389f1.chunk.js} +1 -1
  39. package/dist/scripts/4245-bcb3d8e3e4.chunk.js +1 -0
  40. package/dist/scripts/{4860-6001ab4e2a.chunk.js → 4327-b8cd9a74f9.chunk.js} +1 -1
  41. package/dist/scripts/{6732-85afd02f41.chunk.js → 4567-3ca6ef4308.chunk.js} +1 -1
  42. package/dist/scripts/{4591-78600e384c.chunk.js → 4591-9ea0b32ac6.chunk.js} +1 -1
  43. package/dist/scripts/463-f5f80e35df.chunk.js +2 -0
  44. package/dist/scripts/4719-8c6ca32259.chunk.js +1 -0
  45. package/dist/scripts/4796-284cbfa43b.chunk.js +2 -0
  46. package/dist/scripts/4851-5877fa3e54.chunk.js +1 -0
  47. package/dist/scripts/{5173-f2d72d7c3e.chunk.js → 5173-9338a14ee3.chunk.js} +1 -1
  48. package/dist/scripts/{8906-2ae58fb990.chunk.js → 5180-37c1d4f9bd.chunk.js} +1 -1
  49. package/dist/scripts/5182-0c4b67f64d.chunk.js +2 -0
  50. package/dist/scripts/5193-e559c4c41a.chunk.js +1 -0
  51. package/dist/scripts/5319-4f146e8e39.chunk.js +2 -0
  52. package/dist/scripts/{259-ef5133c0fd.chunk.js → 5327-9b16f6b411.chunk.js} +1 -1
  53. package/dist/scripts/5346-6ecbb5b2b1.chunk.js +1 -0
  54. package/dist/scripts/{5412-e2505df3a4.chunk.js → 5412-bc03f5a901.chunk.js} +1 -1
  55. package/dist/scripts/{5418-f84d0ff359.chunk.js → 5418-a9d060f9d0.chunk.js} +1 -1
  56. package/dist/scripts/5424-fa6c668f42.chunk.js +1 -0
  57. package/dist/scripts/{546-2ee5c90feb.chunk.js → 546-36e1e11039.chunk.js} +1 -1
  58. package/dist/scripts/{7295-49780496e2.chunk.js → 5736-83fa0776d5.chunk.js} +1 -1
  59. package/dist/scripts/576-243c823838.chunk.js +1 -0
  60. package/dist/scripts/5814-5a46f1f264.chunk.js +1 -0
  61. package/dist/scripts/5972-d637eea712.chunk.js +1 -0
  62. package/dist/scripts/6239-92a0bebbeb.chunk.js +1 -0
  63. package/dist/scripts/6350-862d3edb93.chunk.js +1 -0
  64. package/dist/scripts/6439-8aac0bd92a.chunk.js +1 -0
  65. package/dist/scripts/{8762-be126e413d.chunk.js → 6450-a3ca4cdb2a.chunk.js} +1 -1
  66. package/dist/scripts/6467-db60883ef6.chunk.js +1 -0
  67. package/dist/scripts/{1086-7632f7b45b.chunk.js → 6587-eed4f0308b.chunk.js} +1 -1
  68. package/dist/scripts/{1409-ae672618b1.chunk.js → 6677-66b4b60478.chunk.js} +1 -1
  69. package/dist/scripts/6768-5f9040eac8.chunk.js +1 -0
  70. package/dist/scripts/{6774-a002ac7253.chunk.js → 6774-7ed47e1b8c.chunk.js} +1 -1
  71. package/dist/scripts/{6788-dc6b522995.chunk.js → 6788-d3b052f1a9.chunk.js} +1 -1
  72. package/dist/scripts/7071-4b42b6a81f.chunk.js +1 -0
  73. package/dist/scripts/7153-b8a8099148.chunk.js +1 -0
  74. package/dist/scripts/7182-9378cbae60.chunk.js +2 -0
  75. package/dist/scripts/7182-9378cbae60.chunk.js.LICENSE.txt +8 -0
  76. package/dist/scripts/{7190-2b40df1e89.chunk.js → 7190-35f785a3e3.chunk.js} +1 -1
  77. package/dist/scripts/{5747-7ca7ad6c1d.chunk.js → 7366-1132e85416.chunk.js} +1 -1
  78. package/dist/scripts/7384-29be02029c.chunk.js +1 -0
  79. package/dist/scripts/7416-4d6b9b9a5b.chunk.js +1 -0
  80. package/dist/scripts/7696-08e022c4b5.chunk.js +1 -0
  81. package/dist/scripts/775-2c991c9c6e.chunk.js +1 -0
  82. package/dist/scripts/777-1b328a0073.chunk.js +2 -0
  83. package/dist/scripts/8113-e17a857adc.chunk.js +1 -0
  84. package/dist/scripts/{9695-636ea0ef64.chunk.js → 8143-3c844e6f7b.chunk.js} +1 -1
  85. package/dist/scripts/{8362-267efdac61.chunk.js → 8362-a48a464bd6.chunk.js} +1 -1
  86. package/dist/scripts/8542-6f5077cb9a.chunk.js +1 -0
  87. package/dist/scripts/8591-047736d51e.chunk.js +1 -0
  88. package/dist/scripts/8757-9ff47570ba.chunk.js +2 -0
  89. package/dist/scripts/8757-9ff47570ba.chunk.js.LICENSE.txt +44 -0
  90. package/dist/scripts/{7376-e3bf3a94f9.chunk.js → 8797-2e772deab9.chunk.js} +1 -1
  91. package/dist/scripts/8862-0ce7a20f11.chunk.js +1 -0
  92. package/dist/scripts/{5707-b2b239ff4e.chunk.js → 8915-53b71a635d.chunk.js} +1 -1
  93. package/dist/scripts/{2692-1ddd87476e.chunk.js → 8989-258e7f8a87.chunk.js} +1 -1
  94. package/dist/scripts/9011-4862aa077d.chunk.js +1 -0
  95. package/dist/scripts/{6093-e19df1d1fa.chunk.js → 9037-7ce5f91571.chunk.js} +1 -1
  96. package/dist/scripts/9217-9c61b07e9e.chunk.js +1 -0
  97. package/dist/scripts/{9357-e71ea6a34d.chunk.js → 9357-64d247d840.chunk.js} +1 -1
  98. package/dist/scripts/{3551-d2ea1832c5.chunk.js → 95-bd02e086ac.chunk.js} +1 -1
  99. package/dist/scripts/{8726-2d0bc64637.chunk.js → 9620-3ba8334ebc.chunk.js} +1 -1
  100. package/dist/scripts/{5424-65be3c657c.chunk.js → 9734-37ab55da4e.chunk.js} +1 -1
  101. package/dist/scripts/9766-753d188467.chunk.js +2 -0
  102. package/dist/scripts/9766-753d188467.chunk.js.LICENSE.txt +6 -0
  103. package/dist/scripts/{9927-7a935c955d.chunk.js → 9825-965bc63629.chunk.js} +1 -1
  104. package/dist/scripts/9928-f43d6de0a3.chunk.js +1 -0
  105. package/dist/scripts/bundle-5438371664.min.js +2 -0
  106. package/dist/scripts/bundle-5438371664.min.js.LICENSE.txt +124 -0
  107. package/dist/scripts/{polyfills-5ce436cbbe.min.js → polyfills-4c06ebd0dd.min.js} +1 -1
  108. package/package.json +4 -5
  109. package/dist/css/library-editor-app-6b401b236c.css +0 -62
  110. package/dist/scripts/101-c2af2cc10c.chunk.js +0 -1
  111. package/dist/scripts/112-5209a9a2d0.chunk.js +0 -1
  112. package/dist/scripts/1216-83f6fbc7be.chunk.js +0 -1
  113. package/dist/scripts/1269-02d8d91784.chunk.js +0 -1
  114. package/dist/scripts/152-808e046b1f.chunk.js +0 -2
  115. package/dist/scripts/1703-0f9e8a489f.chunk.js +0 -1
  116. package/dist/scripts/1876-0a931d62d9.chunk.js +0 -1
  117. package/dist/scripts/1973-7a1768228d.chunk.js +0 -1
  118. package/dist/scripts/2417-9731b9da6b.chunk.js +0 -1
  119. package/dist/scripts/243-c4bb9e995e.chunk.js +0 -1
  120. package/dist/scripts/2482-ded3090c15.chunk.js +0 -1
  121. package/dist/scripts/2601-0bbd055a92.chunk.js +0 -1
  122. package/dist/scripts/2644-17c596a0c9.chunk.js +0 -1
  123. package/dist/scripts/2648-0a58c0fc05.chunk.js +0 -1
  124. package/dist/scripts/2802-d428814c29.chunk.js +0 -2
  125. package/dist/scripts/2802-d428814c29.chunk.js.LICENSE.txt +0 -8
  126. package/dist/scripts/299-5585deab1d.chunk.js +0 -1
  127. package/dist/scripts/343-a3dabdd615.chunk.js +0 -1
  128. package/dist/scripts/35-dde0c25008.chunk.js +0 -1
  129. package/dist/scripts/3746-588ea9d62d.chunk.js +0 -1
  130. package/dist/scripts/376-d76b864238.chunk.js +0 -1
  131. package/dist/scripts/3969-c636ff3159.chunk.js +0 -1
  132. package/dist/scripts/3978-46652b7a6d.chunk.js +0 -1
  133. package/dist/scripts/4001-e9f2e6c242.chunk.js +0 -2
  134. package/dist/scripts/4024-e9e014aae3.chunk.js +0 -1
  135. package/dist/scripts/4245-db2d86c59d.chunk.js +0 -1
  136. package/dist/scripts/4523-4dc52522e2.chunk.js +0 -1
  137. package/dist/scripts/471-8eefc9b28a.chunk.js +0 -2
  138. package/dist/scripts/471-8eefc9b28a.chunk.js.LICENSE.txt +0 -13
  139. package/dist/scripts/5046-b65e8db7c0.chunk.js +0 -1
  140. package/dist/scripts/514-eeb95eba47.chunk.js +0 -1
  141. package/dist/scripts/535-794be8eab5.chunk.js +0 -1
  142. package/dist/scripts/5524-04583b6e40.chunk.js +0 -1
  143. package/dist/scripts/5850-fd3912ade8.chunk.js +0 -1
  144. package/dist/scripts/5891-ac4d3f803a.chunk.js +0 -1
  145. package/dist/scripts/61-4b8d6a6f6d.chunk.js +0 -2
  146. package/dist/scripts/6352-50c10c1bc6.chunk.js +0 -1
  147. package/dist/scripts/6963-254d82f6c2.chunk.js +0 -1
  148. package/dist/scripts/7002-6d9f52d6d3.chunk.js +0 -1
  149. package/dist/scripts/7053-91a52f57d7.chunk.js +0 -1
  150. package/dist/scripts/7071-6d98c3dcfa.chunk.js +0 -1
  151. package/dist/scripts/708-f7536cb7a4.chunk.js +0 -1
  152. package/dist/scripts/7153-fc080e3d53.chunk.js +0 -1
  153. package/dist/scripts/7827-c1f1b4f608.chunk.js +0 -1
  154. package/dist/scripts/8113-d678e76098.chunk.js +0 -1
  155. package/dist/scripts/8213-6c873c853e.chunk.js +0 -1
  156. package/dist/scripts/8542-64733a5c92.chunk.js +0 -1
  157. package/dist/scripts/8591-149f4a2b62.chunk.js +0 -1
  158. package/dist/scripts/8727-188101f028.chunk.js +0 -1
  159. package/dist/scripts/8952-4201ae6599.chunk.js +0 -2
  160. package/dist/scripts/9369-d0cfe79b64.chunk.js +0 -2
  161. package/dist/scripts/9383-4ed13f5993.chunk.js +0 -1
  162. package/dist/scripts/bundle-e23c97dca7.min.js +0 -2
  163. package/dist/scripts/bundle-e23c97dca7.min.js.LICENSE.txt +0 -1
  164. package/typings/libs/CVLanguages.d.ts +0 -24
  165. package/typings/libs/LazyLoad.d.ts +0 -30
  166. package/typings/libs/LazyLoad.ts +0 -27
  167. package/typings/libs/cookiesjs.d.ts +0 -24
  168. /package/dist/css/{7408-library-editor-2a67dae087.chunk.css → 1080-library-editor-2a67dae087.chunk.css} +0 -0
  169. /package/dist/css/{376-library-editor-ce09c2fd78.chunk.css → 1524-library-editor-ce09c2fd78.chunk.css} +0 -0
  170. /package/dist/css/{6352-library-editor-33de5ce339.chunk.css → 2591-library-editor-33de5ce339.chunk.css} +0 -0
  171. /package/dist/css/{3978-library-editor-5a1c6fc3b4.chunk.css → 2598-library-editor-5a1c6fc3b4.chunk.css} +0 -0
  172. /package/dist/css/{3746-library-editor-46e4b6af59.chunk.css → 2614-library-editor-46e4b6af59.chunk.css} +0 -0
  173. /package/dist/css/{7053-library-editor-cbe896c46a.chunk.css → 3288-library-editor-cbe896c46a.chunk.css} +0 -0
  174. /package/dist/css/{2644-library-editor-9a25c88900.chunk.css → 3305-library-editor-9a25c88900.chunk.css} +0 -0
  175. /package/dist/css/{5046-library-editor-765ea88cb0.chunk.css → 3373-library-editor-765ea88cb0.chunk.css} +0 -0
  176. /package/dist/css/{1832-library-editor-e123877850.chunk.css → 3475-library-editor-e123877850.chunk.css} +0 -0
  177. /package/dist/css/{3969-library-editor-30997910e2.chunk.css → 3643-library-editor-30997910e2.chunk.css} +0 -0
  178. /package/dist/css/{4860-library-editor-f5eddb2400.chunk.css → 4327-library-editor-f5eddb2400.chunk.css} +0 -0
  179. /package/dist/css/{6732-library-editor-0be4d10f09.chunk.css → 4567-library-editor-0be4d10f09.chunk.css} +0 -0
  180. /package/dist/css/{1086-library-editor-9f7cd4e27e.chunk.css → 5180-library-editor-9f7cd4e27e.chunk.css} +0 -0
  181. /package/dist/css/{9369-library-editor-e354d61dfe.chunk.css → 5182-library-editor-e354d61dfe.chunk.css} +0 -0
  182. /package/dist/css/{4024-library-editor-b0081783ab.chunk.css → 5193-library-editor-b0081783ab.chunk.css} +0 -0
  183. /package/dist/css/{2601-library-editor-8922d361d6.chunk.css → 5346-library-editor-8922d361d6.chunk.css} +0 -0
  184. /package/dist/css/{1703-library-editor-3334df179f.chunk.css → 5424-library-editor-3334df179f.chunk.css} +0 -0
  185. /package/dist/css/{7295-library-editor-34087db2b0.chunk.css → 5736-library-editor-34087db2b0.chunk.css} +0 -0
  186. /package/dist/css/{535-library-editor-fa24102d7f.chunk.css → 576-library-editor-fa24102d7f.chunk.css} +0 -0
  187. /package/dist/css/{5891-library-editor-46e4b6af59.chunk.css → 5814-library-editor-46e4b6af59.chunk.css} +0 -0
  188. /package/dist/css/{708-library-editor-7ffe353138.chunk.css → 5972-library-editor-7ffe353138.chunk.css} +0 -0
  189. /package/dist/css/{243-library-editor-decee8d957.chunk.css → 6239-library-editor-decee8d957.chunk.css} +0 -0
  190. /package/dist/css/{4523-library-editor-c52f3ffbb0.chunk.css → 6350-library-editor-c52f3ffbb0.chunk.css} +0 -0
  191. /package/dist/css/{2482-library-editor-1b6dc45d45.chunk.css → 6439-library-editor-1b6dc45d45.chunk.css} +0 -0
  192. /package/dist/css/{2692-library-editor-9f7cd4e27e.chunk.css → 6450-library-editor-9f7cd4e27e.chunk.css} +0 -0
  193. /package/dist/css/{1876-library-editor-3334df179f.chunk.css → 6467-library-editor-3334df179f.chunk.css} +0 -0
  194. /package/dist/css/{8762-library-editor-9f7cd4e27e.chunk.css → 6587-library-editor-9f7cd4e27e.chunk.css} +0 -0
  195. /package/dist/css/{1409-library-editor-bc215e1152.chunk.css → 6677-library-editor-bc215e1152.chunk.css} +0 -0
  196. /package/dist/css/{9383-library-editor-02381b537c.chunk.css → 6768-library-editor-02381b537c.chunk.css} +0 -0
  197. /package/dist/css/{5747-library-editor-de4ea80bfc.chunk.css → 7366-library-editor-de4ea80bfc.chunk.css} +0 -0
  198. /package/dist/css/{2417-library-editor-46f8e6e95b.chunk.css → 7384-library-editor-46f8e6e95b.chunk.css} +0 -0
  199. /package/dist/css/{101-library-editor-cc4c4155eb.chunk.css → 7696-library-editor-cc4c4155eb.chunk.css} +0 -0
  200. /package/dist/css/{8952-library-editor-5d85817bef.chunk.css → 777-library-editor-5d85817bef.chunk.css} +0 -0
  201. /package/dist/css/{9695-library-editor-c5004a1fec.chunk.css → 8143-library-editor-c5004a1fec.chunk.css} +0 -0
  202. /package/dist/css/{343-library-editor-d2f704c6a5.chunk.css → 8862-library-editor-d2f704c6a5.chunk.css} +0 -0
  203. /package/dist/css/{8906-library-editor-9f7cd4e27e.chunk.css → 8989-library-editor-9f7cd4e27e.chunk.css} +0 -0
  204. /package/dist/css/{112-library-editor-6a2d152d7d.chunk.css → 9011-library-editor-6a2d152d7d.chunk.css} +0 -0
  205. /package/dist/css/{6093-library-editor-446ee2e049.chunk.css → 9037-library-editor-446ee2e049.chunk.css} +0 -0
  206. /package/dist/css/{6963-library-editor-46e4b6af59.chunk.css → 9217-library-editor-46e4b6af59.chunk.css} +0 -0
  207. /package/dist/css/{3551-library-editor-787101ac7a.chunk.css → 95-library-editor-787101ac7a.chunk.css} +0 -0
  208. /package/dist/css/{5424-library-editor-30b3c7de26.chunk.css → 9734-library-editor-30b3c7de26.chunk.css} +0 -0
  209. /package/dist/css/{514-library-editor-4cb4f22674.chunk.css → 9766-library-editor-4cb4f22674.chunk.css} +0 -0
  210. /package/dist/css/{9927-library-editor-a11669ad9d.chunk.css → 9825-library-editor-a11669ad9d.chunk.css} +0 -0
  211. /package/dist/scripts/{1934-562cd9f48b.chunk.js.LICENSE.txt → 1934-84460445ad.chunk.js.LICENSE.txt} +0 -0
  212. /package/dist/scripts/{152-808e046b1f.chunk.js.LICENSE.txt → 463-f5f80e35df.chunk.js.LICENSE.txt} +0 -0
  213. /package/dist/scripts/{4001-e9f2e6c242.chunk.js.LICENSE.txt → 4796-284cbfa43b.chunk.js.LICENSE.txt} +0 -0
  214. /package/dist/scripts/{61-4b8d6a6f6d.chunk.js.LICENSE.txt → 5182-0c4b67f64d.chunk.js.LICENSE.txt} +0 -0
  215. /package/dist/scripts/{8952-4201ae6599.chunk.js.LICENSE.txt → 5319-4f146e8e39.chunk.js.LICENSE.txt} +0 -0
  216. /package/dist/scripts/{9369-d0cfe79b64.chunk.js.LICENSE.txt → 777-1b328a0073.chunk.js.LICENSE.txt} +0 -0
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[6350],{16616:function(e,r,a){a.d(r,{FT:function(){return c}});var t=a(32735),n=a(74512);const i=["as","disabled"];function c({tagName:e,disabled:r,href:a,target:t,rel:n,role:i,onClick:c,tabIndex:o=0,type:s}){e||(e=null!=a||null!=t||null!=n?"a":"button");const l={tagName:e};if("button"===e)return[{type:s||"button",disabled:r},l];const u=t=>{(r||"a"===e&&function(e){return!e||"#"===e.trim()}(a))&&t.preventDefault(),r?t.stopPropagation():null==c||c(t)};return"a"===e&&(a||(a="#"),r&&(a=void 0)),[{role:null!=i?i:"button",disabled:void 0,tabIndex:r?void 0:o,href:a,target:"a"===e?t:void 0,"aria-disabled":r||void 0,rel:"a"===e?n:void 0,onClick:u,onKeyDown:e=>{" "===e.key&&(e.preventDefault(),u(e))}},l]}const o=t.forwardRef(((e,r)=>{let{as:a,disabled:t}=e,o=function(e,r){if(null==e)return{};var a={};for(var t in e)if({}.hasOwnProperty.call(e,t)){if(r.indexOf(t)>=0)continue;a[t]=e[t]}return a}(e,i);const[s,{tagName:l}]=c(Object.assign({tagName:a,disabled:t},o));return(0,n.jsx)(l,Object.assign({},o,s,{ref:r}))}));o.displayName="Button",r.ZP=o},54096:function(e,r,a){a.d(r,{G:function(){return i}});var t=a(32735),n=a(21679);function i(e){var r,a;return r=e,a=n.u.getInstance(r),t.useEffect((function(){return function(){n.u.releaseInstance(r)}})),a}},23454:function(e,r,a){a.d(r,{f:function(){return c}});var t=a(32735),n=a(39396),i={circle:"Uxnsl",img:"BQ87Y"};function c(e){var r;return e.imageUrl||e.svgName?e.imageUrl?t.createElement("div",{className:"".concat(i.img," rounded-circle h-100 w-100"),style:{backgroundImage:"url(".concat(e.imageUrl,")")}}," "):t.createElement("div",{className:"".concat(i.circle," ").concat(e.variant?"bg-".concat(e.variant):""," text-").concat(e.textVariant," rounded-circle h-100 w-100 ").concat(null!==(r=e.svgWrapperClassName)&&void 0!==r?r:"")},t.createElement(n.x,{svgName:e.svgName,size:e.svgSize})):t.createElement(t.Fragment,null)}c.defaultProps={textVariant:"white"}},9063:function(e,r,a){a.d(r,{Z:function(){return s}});var t=a(32735),n=a(58424),i=a(21326),c=function(e,r){var a={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&r.indexOf(t)<0&&(a[t]=e[t]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(t=Object.getOwnPropertySymbols(e);n<t.length;n++)r.indexOf(t[n])<0&&Object.prototype.propertyIsEnumerable.call(e,t[n])&&(a[t[n]]=e[t[n]])}return a},o={info:"custom-toggle-info"};function s(e){var r,a=e.on,s=e.showStateWhenDisabled,l=e.tooltipText,u=e.variant,d=e.floatEnd,m=e.hideOutline,b=c(e,["on","showStateWhenDisabled","tooltipText","variant","floatEnd","hideOutline"]);function p(){e.disabled||e.onClick.apply(e,arguments)}var y=e.disabled?"disabled":"",v=m?"outline-none":"",f=null!==(r=o[u])&&void 0!==r?r:"",g=d?"float-end":"",h=a?"on":"";e.disabled&&!s&&(h="");var E="".concat("d-inline-block align-top custom-toggle toggle-option"," ").concat(f," ").concat(h," ").concat(y," ").concat(v," ").concat(g);return e.tooltipText?t.createElement(i.u,{title:l,spanHack:!0},t.createElement(n.L,Object.assign({},b,{role:"switch","aria-checked":"".concat(a),onClick:p,className:E}),t.createElement("span",{className:"handle"}))):t.createElement(n.L,Object.assign({},b,{role:"switch","aria-checked":a,onClick:p,className:E}),t.createElement("span",{className:"handle"}))}s.defaults={floatEnd:!0}},90547:function(e,r,a){var t;a.d(r,{r:function(){return t}}),function(e){e.XS="(max-width: 575px)",e.SM="(min-width: 576px) and (max-width: 767px)",e.MD="(min-width: 768px) and (max-width: 991px)",e.LG="(min-width: 992px)",e.XL="(min-width: 1200px)",e.XXL="(min-width: 1440px)",e.SMDown="(max-width: 576px)",e.MDDown="(max-width: 768px)",e.LGDown="(max-width: 992px)",e.XLDown="(max-width: 1200px)"}(t||(t={}))},34107:function(e,r,a){a.d(r,{D:function(){return o}});var t=a(2248),n=a(68003),i=a(40221),c=a(84657),o={domainLibraries:function(e,r,a,t){return{url:n._.urlBuilder("/api/domain/v2/me/libraries",{type:e,maxCategoryDepth:0}),key:"libraries:".concat(e.sort().join(":")),formatData:function(e){return e.map((function(e){return e.data}))},success:r,error:a,always:t}},libraryRequestLibraries:function(){return{url:"{gateway}/v1/library-requests/libraries",key:"libraries"}},librariesWithCategories:function(){return{url:n._.urlBuilder("/api/domain/v2/me/libraries",{type:["sharedLibrary","customLibrary","unpublishedCustomLibrary"],maxCategoryDepth:5}),key:"libraries:with:categories",normalize:!1}},librariesWithOwnerLogos:function(e,r,a,t){return e.sort(),{url:n._.urlBuilder("/api/domain/v2/objects",{query:c.v.LIBRARY_COLLECTION,id:e}),key:"libraries:owner:logo:".concat(e.join(",")),success:r,error:a,always:t}},library:function(e,r,a,t){return{url:n._.urlBuilder("{gateway}/v1/objects/".concat(e),{query:c.v.LIBRARY}),key:"library:".concat(e),success:r,error:a,always:t}},exchange:function(e){return{url:n._.urlBuilder("{gateway}/v1/objects/".concat(e),{query:"categorytree"}),key:"exchange"}},streamableLearning:function(){return{url:"{gateway}/v1/streamable-learning-library",key:"streamable:learning"}},librarySubscribers:function(e,r){var a={};return r&&(a.cursor=r),{url:n._.urlBuilder("{gateway}/v1/library-requests/libraries/".concat(e,"/subscribers"),a),key:"library:subscribers:".concat(e,":").concat(r)}},libraryOwner:function(e){return{url:"{gateway}/v1/library-requests/libraries/".concat(e,"/subscribers?ownerOnly=true"),key:"library:owner:".concat(e),formatData:function(e){return i.m.first(e.data)}}},updateSubscriberPermissions:function(e,r,a,n,i){return{url:"{gateway}/v1/libraries/".concat(e,"/library-request-permissions"),key:"update:subscriber:permissions:".concat(e,":").concat(r),type:t.k.PUT,data:{customerId:r,granted:a},invalidationKeys:["library:owner:".concat(e),"library:subscribers:".concat(e)],success:n,error:i}},removeSubscriber:function(e,r,a,n){return{url:"{gateway}/v1/objects/".concat(e,"/subscribedcustomers?memberId=").concat(r),key:"revoke:subscription:".concat(e,":").concat(r),type:t.k.DELETE,invalidationKeys:["library:subscribers:".concat(e)],success:a,error:n}},folder:function(e,r,a,t){return{url:"{gateway}/v1/objects/".concat(e,"?query=banner,libraries"),key:"library:folder:".concat(e),success:r,error:a,always:t}},videoFolders:function(e){return{url:"{gateway}/v1/objects/".concat(e,"/categories?query=libraries"),key:"video:folders:".concat(e)}},folderParentTree:function(e,r,a,t){return{url:"/api/domain/v2/categories/".concat(e,"/parent-tree?includeAll=false"),key:"folder:parent:tree".concat(e),success:r,error:a,always:t}},childFolders:function(e,r,a,t,n){var i="{gateway}/v1/objects/".concat(e,"/categories?query={limit:100}thumbnail"),c="child:folders:".concat(e);return r&&(i+="&cursor=".concat(r),c+=":".concat(r)),{url:i,key:c,formatData:function(e){var r=e.data.sort((function(e,r){return e.name.toLowerCase().localeCompare(r.name.toLowerCase())}));return Object.assign(Object.assign({},e),{data:r})},success:a,error:t,always:n}},addToLibrary:function(e,r){var a=["folder","videos",e.metadata.destinationCategoryId,r].filter((function(e){return!!e})).join(":");return{url:"{gateway}/v1/library-requests",key:"add:".concat(e.objectId,":to:").concat(e.destinationLibraryId,":").concat(e.metadata.destinationCategoryId),type:t.k.POST,data:e,invalidationKeys:a}},libraries:function(){return{url:"{gateway}/v1/users/me/libraries",key:"objects:libraries"}}}},2491:function(e,r,a){a.d(r,{Z:function(){return c}});var t=a(92159),n=a(21186),i=a(54096);function c(){var e=(0,i.G)(t.P.ALERT);return{success:function(r){e.success(r)()},error:function(r){e.error(r)()},warning:function(r){e.createAlert({type:n.NK.Warning,heading:n.R6.Warning,message:r})}}}},52814:function(e,r,a){a.d(r,{y:function(){return n}});var t=a(32735);function n(){return t.createElement("div",{className:"partial-loading-background w-100 rounded-3",style:{height:"3.5rem"}}," ")}},3586:function(e,r,a){a.r(r),a.d(r,{LibraryRequestSettingsView:function(){return A}});var t=a(32735),n=a(57857),i=a(86120),c=a(89375),o=a(52076),s=a(70065),l=a(86242),u=a(98269),d=a(70868),m=a(77105),b=a(66703);function p(e,r,a){var t;if(!r)return null;var n=null!==(t=e.params)&&void 0!==t?t:{};return a?(null==n?void 0:n.previous)?{application:e.application,action:e.action,args:e.args,params:Object.assign(Object.assign({},n),{cursor:null==n?void 0:n.previous,previous:null})}:{application:e.application,action:e.action,args:e.args,params:Object.assign(Object.assign({},n),{cursor:null,previous:null})}:{application:e.application,action:e.action,args:e.args,params:Object.assign(Object.assign({},n),{cursor:r,previous:n.cursor})}}function y(e){var r=e.appLink,a=e.cursors,n=e.className,i=e.buttonVariant,c=e.prevHack,l=e.scrollTop,y=e.onClick;function v(e){r&&!1===l&&d.t.preventScrollTop(),o.k.logUserAction({page:e},{location:s.LZ.Pagination,entity:s.py.Pagination,actionType:s.Vw.Navigate}),y&&y(a[e])}return r?t.createElement(b.D.Provider,{value:"shared.pagination"},t.createElement("div",{className:n},t.createElement(m.F,{appLink:p(r,a.previous,c),className:"btn btn-".concat(i," me-1 ").concat(a.previous?"":"disabled"),onClick:function(){return v("previous")},style:{display:"inline-block"}},t.createElement(b.x,{phrase:"previous"})),t.createElement(m.F,{appLink:p(r,a.next),className:"btn btn-".concat(i," ").concat(a.next?"":"disabled"),onClick:function(){return v("next")},style:{display:"inline-block"}},t.createElement(b.x,{phrase:"next"})))):t.createElement(b.D.Provider,{value:"shared.pagination"},t.createElement("div",{className:n},t.createElement(u.Z,{variant:i,className:"me-1 ".concat(a.previous?"":"disabled"),onClick:function(){return v("previous")}},t.createElement(b.x,{phrase:"previous"})),t.createElement(u.Z,{variant:i,className:"btn ".concat(a.next?"":"disabled"),onClick:function(){return v("next")}},t.createElement(b.x,{phrase:"next"}))))}y.defaultProps={className:"py-2",buttonVariant:"secondary"};var v=a(34107),f=a(2491),g=a(30317),h=a(22430),E=a(50997),w=a(23454),k=a(9063),L=a(85475),x={libraryIcon:"iKsvQ",totalStaffAndAdmins:"ru_SO",revokeAccess:"BZF1Q",customerItem:"S_m9j"};function S(e,r){(null==r||r>e.length)&&(r=e.length);for(var a=0,t=Array(r);a<r;a++)t[a]=e[a];return t}var I="libraryRequests.schoolLibraryRequestSettings";function R(e){var r,a,n,i,c=(n=t.useState(!!e.customer.libraryRequestEnabled),i=2,function(e){if(Array.isArray(e))return e}(n)||function(e,r){var a=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=a){var t,n,i,c,o=[],s=!0,l=!1;try{if(i=(a=a.call(e)).next,0===r){if(Object(a)!==a)return;s=!1}else for(;!(s=(t=i.call(a)).done)&&(o.push(t.value),o.length!==r);s=!0);}catch(e){l=!0,n=e}finally{try{if(!s&&null!=a.return&&(c=a.return(),Object(c)!==c))return}finally{if(l)throw n}}return o}}(n,i)||function(e,r){if(e){if("string"==typeof e)return S(e,r);var a={}.toString.call(e).slice(8,-1);return"Object"===a&&e.constructor&&(a=e.constructor.name),"Map"===a||"Set"===a?Array.from(e):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?S(e,r):void 0}}(n,i)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),o=c[0],l=c[1];return t.createElement("div",{className:"p-2 border rounded-3 d-flex align-items-center mb-2 ".concat(e.isLibraryOwner?"":x.customerItem)},t.createElement("div",{className:"me-2 ".concat(x.libraryIcon)},t.createElement(w.f,{imageUrl:e.customer.logoUrl,svgName:L.vn.School,variant:"ultramarine"})),t.createElement("div",{className:"me-auto"},t.createElement("h3",{className:"h6 mb-0"},e.customer.customerName),t.createElement("p",{className:"".concat(x.totalStaffAndAdmins," mb-0 text-secondary")},t.createElement(b.x,{namespace:I,phrase:"totalStaffAndAdmins",options:{smartCount:(null!==(r=e.customer.staff)&&void 0!==r?r:0)+(null!==(a=e.customer.admin)&&void 0!==a?a:0)}})),t.createElement(m.F,{className:"".concat(x.revokeAccess," danger-link"),appLink:{application:E.OV.LIBRARY_REQUESTS,action:E.eX.LibraryRequests.REMOVE_LIBRARY_SUBSCRIBER,args:[e.libraryId,e.customer.customerId]},analyticsData:{id:e.libraryId,customerId:e.customer.customerId},analyticsOptions:{actionType:s.Vw.Dissociate,entity:s.py.Library,descriptor:s.iF.Customer,location:s.LZ.LibraryRequestSettings,workflowPhase:s.eu.Start}},t.createElement(b.x,{namespace:I,phrase:"removeAccess"}))),t.createElement(k.Z,{on:o,onClick:function(){l(!o),e.onToggle(e.customer.customerId,!o)}}))}var N=a(52814);function O(){return t.createElement("div",{className:"bg-white p-3"},t.createElement("div",{className:"mb-2 partial-loading-background",style:{width:"10rem",height:"1.8rem"}}),t.createElement(l.b2,null),t.createElement("hr",null),t.createElement("div",{className:"mb-1 partial-loading-background",style:{height:"1.5rem",width:"5.25rem"}}),t.createElement("div",{className:"mb-2 partial-loading-background",style:{height:"1.15rem",width:"24.5rem"}}),t.createElement(N.y,null))}var j="libraryRequests.libraryRequestSettings",T=n.T.encloseNamespace(j);function A(e){var r,a,n,u,d,m,p,w,k,L,x=i.a.useBasicFetch(v.D.domainLibraries(["customLibrary","unpublishedCustomLibrary"])),S=null===(r=x.data)||void 0===r?void 0:r.find((function(r){return r.id.toString()===e.libraryId.toString()})),I=i.a.useBasicFetch(v.D.libraryOwner(e.libraryId)),N=i.a.useBasicFetch(v.D.librarySubscribers(e.libraryId,e.cursor)),A=!!(null===(n=null===(a=N.data)||void 0===a?void 0:a.data)||void 0===n?void 0:n.length),C=i.a.useGetFetch(),q=(0,f.Z)();function D(r,a){var t=I.data.customerId===r?I.data:N.data.data.find((function(e){return e.customerId===r}));C(v.D.updateSubscriberPermissions(e.libraryId,r,a,(function(){var n=T(a?"enableLibraryRequestsSuccess":"disableLibraryRequestsSuccess",{school:t.customerName});q.success(n),o.k.logUserAction({id:e.libraryId,customerId:r,canAddContent:a},{actionType:s.Vw.SetAccess,entity:s.py.Library,descriptor:s.iF.Customer,location:s.LZ.LibraryRequestSettings})}),(function(e){return q.error(h.M.libraryApiError(e))})))}(0,g.v)(x),t.useEffect((function(){return c.j.setPageTitle(T("libraryRequestSettings"))}),[]);var B=[{name:T("libraryEditor"),appLink:{application:E.OV.LIBRARY_EDITOR,action:E.eX.LibraryEditor.HOME}},{name:T("libraryRequestSettings"),appLink:{application:E.OV.LIBRARY_REQUESTS,action:E.eX.LibraryRequests.LIBRARY_REQUEST_SETTINGS_LIBRARIES},active:(null===(u=x.data)||void 0===u?void 0:u.length)<=1}];return x.data&&(null===(d=x.data)||void 0===d?void 0:d.length)>1&&B.push({name:T("requestingTo",{name:S.name}),appLink:{application:E.OV.LIBRARY_EDITOR,action:E.eX.LibraryEditor.LIBRARY,args:[S.id]},active:!0}),x.data&&N.data?t.createElement("div",{className:"bg-white p-3"},t.createElement("h1",{className:"h3 mb-2"},A?t.createElement(b.x,{namespace:j,phrase:"requestingTo",options:{name:S.name}}):T("libraryRequestSettings")),t.createElement(l.Oo,{breadcrumbs:B}),t.createElement("hr",null),t.createElement("p",{className:"mb-3"},A?t.createElement(b.x,{namespace:j,phrase:"manageSubscribers"}):t.createElement(b.x,{namespace:j,phrase:"manageSchool"})),!(null===(p=null===(m=N.data.pagination)||void 0===m?void 0:m.cursors)||void 0===p?void 0:p.previous)&&t.createElement(t.Fragment,null,t.createElement("h2",{className:"h5 mb-1"},A?t.createElement(b.x,{namespace:j,phrase:"mySchool"}):S.name),!!I.data&&t.createElement(R,{libraryId:e.libraryId,customer:I.data,onToggle:D,isLibraryOwner:!0})),!!(null===(k=null===(w=N.data)||void 0===w?void 0:w.data)||void 0===k?void 0:k.length)&&t.createElement(t.Fragment,null,t.createElement("h2",{className:"h5 mb-1 mt-3"},t.createElement(b.x,{namespace:j,phrase:"subscribers"})),N.data.data.map((function(r){return t.createElement(R,{libraryId:e.libraryId,key:r.customerId,customer:r,onToggle:D})})),(null===(L=N.data.pagination)||void 0===L?void 0:L.cursors)&&t.createElement(y,{cursors:N.data.pagination.cursors,appLink:{application:E.OV.LIBRARY_REQUESTS,action:E.eX.LibraryRequests.LIBRARY_REQUEST_SETTINGS,args:[e.libraryId]},buttonVariant:"outline-dark",className:"text-end pt-2 pb-1"}))):t.createElement(O,null)}},98269:function(e,r,a){var t=a(95685),n=a.n(t),i=a(32735),c=a(16616),o=a(46304),s=a(74512);const l=i.forwardRef((({as:e,bsPrefix:r,variant:a="primary",size:t,active:i=!1,disabled:l=!1,className:u,...d},m)=>{const b=(0,o.vE)(r,"btn"),[p,{tagName:y}]=(0,c.FT)({tagName:e,disabled:l,...d}),v=y;return(0,s.jsx)(v,{...p,...d,ref:m,disabled:l,className:n()(u,b,i&&"active",a&&`${b}-${a}`,t&&`${b}-${t}`,d.href&&l&&"disabled")})}));l.displayName="Button",r.Z=l}}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[6439],{59054:function(e,t,r){"use strict";var n;r.d(t,{f:function(){return n}}),function(e){e.Share="share",e.MasterObject="masterobject"}(n||(n={}))},82936:function(e,t,r){"use strict";r.d(t,{wc:function(){return y},ND:function(){return h},W2:function(){return o}});var n=r(62699),i=r.n(n),o={dragItem:"GYPuI",svgContainer:"olYDa",dragText:"O53FV"};function c(e){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},c(e)}function 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,s(n.key),n)}}function s(e){var t=function(e){if("object"!=c(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=c(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==c(t)?t:t+""}function u(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(u=function(){return!!e})()}function l(e){return l=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},l(e)}function f(e,t){return f=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},f(e,t)}var h=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,r){return t=l(t),function(e,t){if(t&&("object"==c(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,u()?Reflect.construct(t,r||[],l(e).constructor):t.apply(e,r))}(this,t,[e])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&f(e,t)}(t,e),r=t,(n=[{key:"name",get:function(){return"DraggableItemComponent"}},{key:"template",get:function(){return i()}},{key:"className",get:function(){return"".concat(o.dragItem," p-3")}},{key:"viewOptions",value:function(){return Object.assign({styles:o},this.options)}}])&&a(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(r(31647).Q.wA),y={delay:150,cursorAt:{left:-20,top:10},refreshPositions:!0}},61519:function(e,t,r){"use strict";r.r(t),r.d(t,{SearchView:function(){return te}});var n=r(43823),i=r(21161),o=r(21679),c=r(57857),a=r(99249),s=r(31647),u=r(11543),l=r(59054),f=r(47022),h=r(33303),y=r(70763),p=r(45390),d=r(21251),v=r(33800),b=r(51174),g=r(48404),m=r(64649),w=r(19226),S=r(95061),O=r(13809),C=r(80867),P=r(29457),j=r(96605),k=r.n(j);function E(e){return E="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},E(e)}function R(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,V(n.key),n)}}function V(e){var t=function(e){if("object"!=E(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=E(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==E(t)?t:t+""}function _(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(_=function(){return!!e})()}function T(e){return T=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},T(e)}function M(e,t){return M=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},M(e,t)}var D=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,r){return t=T(t),function(e,t){if(t&&("object"==E(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,_()?Reflect.construct(t,r||[],T(e).constructor):t.apply(e,r))}(this,t,[e])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&M(e,t)}(t,e),r=t,(n=[{key:"name",get:function(){return"SearchResultsComponent"}},{key:"template",get:function(){return k()}},{key:"lang",get:function(){return"search.searchResults"}},{key:"className",get:function(){return"bg-white"}},{key:"regions",value:function(){return{results:{replaceElement:!0,el:".results-region",partialLoading:P.LP.VideoList}}}},{key:"onBeforeRender",value:function(){return!!this.collection}},{key:"onRender",value:function(){var e=new C.Y({collection:this.collection,videosWithMetadata:this.options.videosWithMetadata,application:p.OV.SEARCH,videoItemComponentType:O.UC.Search,collectionIdentifier:null,config:this.options.config,emptyStateType:P.ub.Search,emptyStateOptions:{heading:c.T.getPhrase(this.lang,"emptyStateHeading",{query:this.options.query}),description:c.T.getPhrase(this.lang,"emptyStateDescription")},collectionViewChannel:this.options.collectionViewChannel,customerHasExchange:this.options.customerHasExchange,currentUser:this.options.currentUser,playerApiUrl:this.options.playerApiUrl,createViewKey:this.options.createViewKey,hasCursors:this.options.hasCursors,showEmptyState:!0,libraries:this.options.libraries,products:this.options.products});this.showChildView("results",e)}}])&&R(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(s.Q.wA),I=r(92266),x=r(15709),q=r.n(x);function A(e){return A="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},A(e)}function F(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,H(n.key),n)}}function H(e){var t=function(e){if("object"!=A(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=A(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==A(t)?t:t+""}function N(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(N=function(){return!!e})()}function Q(e){return Q=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Q(e)}function U(e,t){return U=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},U(e,t)}var B=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,r){return t=Q(t),function(e,t){if(t&&("object"==A(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,N()?Reflect.construct(t,r||[],Q(e).constructor):t.apply(e,r))}(this,t,[e])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&U(e,t)}(t,e),r=t,(n=[{key:"name",get:function(){return"SearchHeaderComponent"}},{key:"template",get:function(){return q()}},{key:"lang",get:function(){return"search.searchHeader"}},{key:"className",get:function(){return"bg-white border-bottom p-3"}},{key:"regions",value:function(){return{filters:{el:".filters-region",replaceElement:!0}}}},{key:"renderFilters",value:function(){var e=new I.b5({collection:this.collection,channelName:this.options.channelName});this.showChildView("filters",e)}},{key:"onRender",value:function(){this.renderFilters()}}])&&F(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(s.Q.wA),W=r(21769),K=r(44937),L=r(5344),z=r(28434),G=r.n(z);function J(e){return J="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},J(e)}function X(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Y(n.key),n)}}function Y(e){var t=function(e){if("object"!=J(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=J(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==J(t)?t:t+""}function Z(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Z=function(){return!!e})()}function $(e){return $=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},$(e)}function ee(e,t){return ee=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ee(e,t)}var te=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,r){return t=$(t),function(e,t){if(t&&("object"==J(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Z()?Reflect.construct(t,r||[],$(e).constructor):t.apply(e,r))}(this,t,[e])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ee(e,t)}(t,e),r=t,O=[{key:"initialize",value:function(){this.initializeQuery(),this.bindListeners(),this.contextualSearchService=o.u.getInstance(u.D.ContextualSearch,this),this.searchDataService=o.u.getInstance(u.Z.Search,this),this.videoDataService=o.u.getInstance(v.O.Video,this),this.ratingsDataService=o.u.getInstance(v.O.Ratings,this),this.playerDataService=o.u.getInstance(v.O.Player,this),this.videoMixinService=o.u.getInstance(v.K.VideoMixin,this),this.collectionIdentifier=new h.J(Object.assign({collectionPrefix:d.M.SEARCH_VIDEOS},this.options.queryParams)),this.createViewKey=this.createViewKey.bind(this)}},{key:"initializeQuery",value:function(){this.queryModel=this.getSearchModel()}},{key:"bindListeners",value:function(){this.listenTo(p.Vk.RATINGS,"".concat(d.M.RATINGS,":sync"),this.render),this.listenTo(p.Vk.RESTRICTED_VIDEO,"".concat(d.M.RESTRICTED_OBJECTS,":").concat(d.M.SEARCH_VIDEOS,":invalidate"),this.updateRestrictedVideos),this.listenTo(this.channelName,p.Vy.Filters.FILTER_CHANGED,i.debounce(this.onFilterChange,100)),this.listenTo(this.channelName,"fetch:video:with:metadata",this.fetchVideoWithMetadata),this.listenTo(W.I.TagFilter,"change:relevant:tags",this.updateSearchResults)}},{key:"name",get:function(){return"SearchView"}},{key:"title",get:function(){return c.T.getPhrase(this.lang,"title")}},{key:"lang",get:function(){return"search.search"}},{key:"template",get:function(){return G()}},{key:"className",get:function(){return"bg-white rounded"}},{key:"channelName",get:function(){return"".concat(this.name).concat(this.cid)}},{key:"regions",value:function(){return{header:{replaceElement:!0,el:".header-region"},results:{replaceElement:!0,el:".results-region"},pagination:{el:".pagination-region",replaceElement:!0}}}},{key:"getSearchModel",value:function(){return a.r.get("search",{ctor:K.AE})}},{key:"fetchSearchData",value:function(){this.ratings=this.ratingsDataService.getAllRatings(),this.ratings&&!this.filterCollection&&this.initializeFilterCollection()}},{key:"initializeFilterCollection",value:function(){this.filterCollection=L.qr.getFilterCollection(this.sources,this.ratings),this.setQueryParams()}},{key:"setQueryParams",value:function(){L.yf.setQueryParams(Object.assign(Object.assign({},this.options.queryParams),this.getContextParams()),this.queryModel,this.filterCollection)}},{key:"getContextParams",value:function(){if(!this.queryModel.get("query"))return n.Radio.channel(p.jr.CONTEXTUAL_SEARCH).trigger("reset:search:context"),{};var e,t,r,i=this.contextualSearchService.getSearchContext();return i&&i.get("filterParam")?(e={},t=i.get("filterParam"),r=i.get("filterValue"),(t=Y(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e):{}}},{key:"createViewKey",value:function(e,t){this.playerDataService.createViewKey(e,l.f.MasterObject,t)}},{key:"onFilterChange",value:function(){s.Q.C$.trigger({application:p.OV.SEARCH,action:p.eX.Search.HOME,params:L.yf.getRouteQueryParams(this.queryModel,this.filterCollection,this.sources)})}},{key:"setVideosWithMetadata",value:function(){this.resultCollection&&!this.videosWithMetadata&&(this.videosWithMetadata=new y.t(this.resultCollection.map((function(e){return(0,b.Z)({id:e.get("id"),typeId:e.get("typeId")})}))))}},{key:"updateSearchResults",value:function(){var e=this;this.resultCollection=null,this.renderResults(),this.queryString=L.yf.getQueryString(this.queryModel,this.filterCollection,this.sources,this.collectionIdentifier.cursor);var t=function(){return s.Q.C$.trigger({application:p.OV.SEARCH,action:p.eX.Search.HOME,params:L.yf.getRouteQueryParams(e.queryModel,e.filterCollection,e.sources)})};this.queryString?this.searchDataService.searchVideos(this.queryString,this.collectionIdentifier,t):t()}},{key:"renderHeader",value:function(){var e=new B({collection:this.filterCollection,channelName:this.channelName});this.showChildView("header",e)}},{key:"renderResults",value:function(){var e=this.videoDataService.getVideoCollectionCursors(this.collectionIdentifier),t=new D({collection:this.resultCollection,videosWithMetadata:this.videosWithMetadata,config:this.config,collectionViewChannel:this.channelName,customerHasExchange:this.exchanges.any(),currentUser:this.currentUser,playerApiUrl:this.config.get("playerApiUrl"),createViewKey:this.createViewKey,hasCursors:!!e,libraries:this.sources,query:this.queryModel.get("query"),products:this.products});this.showChildView("results",t)}},{key:"renderPagination",value:function(){if(this.resultCollection&&this.resultCollection.length){var e=this.videoDataService.getVideoCollectionCursors(this.collectionIdentifier),t=new f.Q({cursors:e,appLink:{application:p.OV.SEARCH,action:p.eX.Search.HOME,params:L.yf.getRouteQueryParams(this.queryModel,this.filterCollection,this.sources)}});this.showChildView("pagination",t)}}},{key:"fetchResults",value:function(){var e=this;if(this.filterCollection){this.queryString=L.yf.getQueryString(this.queryModel,this.filterCollection,this.sources,this.collectionIdentifier.cursor);var t=L.yf.getDynamicFilterQueryString(this.queryModel,this.filterCollection);if(this.dynamicFiltersFetched||this.searchDataService.getDynamicFilters(t,(function(t){e.dynamicFiltersFetched||(e.filterCollection.add(t.toJSON(),{merge:!0}),e.dynamicFiltersFetched=!0,e.render())})),!this.resultCollection){var r=function(t){e.resultCollection=t,e.setVideosWithMetadata(),e.render()};this.queryString?this.searchDataService.searchVideos(this.queryString,this.collectionIdentifier,r):r(new y.t([]))}}}},{key:"fetchVideoWithMetadata",value:function(e,t){var r=this;this.videoDataService.getUnionVideo(e,t,(function(t){var n=r.videosWithMetadata.get(e);n&&(n.set(t.toJSON()),n.set({dataFetched:!0}))}))}},{key:"updateRestrictedVideos",value:function(){var e=this;this.videoMixinService.getAndMixinVideoCollectionRestrictions(this.resultCollection,this.collectionIdentifier,(function(){return e.render()}))}},{key:"requiredResources",get:function(){return{config:g.p.config,sources:S.T.libraries,exchanges:S.T.exchanges,currentUser:w.K.currentUser,products:m.s.products}}},{key:"onBeforeRender",value:function(){return this.fetchSearchData(),this.fetchResults(),!0}},{key:"onRender",value:function(){this.renderHeader(),this.renderResults(),this.renderPagination()}},{key:"onBeforeDestroy",value:function(){this.queryModel.clear()}}],O&&X(r.prototype,O),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,O}(s.Q.G7)},13809:function(e,t,r){"use strict";r.d(t,{UC:function(){return n.U}});var n=r(58688);r(58780),r(14898)},62699:function(e,t,r){var n=r(31197);e.exports=(n.default||n).template({compiler:[8,">= 4.3.0"],main:function(e,t,r,n,i){e.propertyIsEnumerable;var o,c=e.lambda,a=e.escapeExpression;return'<span class="'+a(c(null!=(o=null!=(o=null!=t?t.options:t)?o.styles:o)?o.svgContainer:o,t))+' me-2">'+(null!=(o=c(null!=(o=null!=t?t.options:t)?o.svg:o,t))?o:"")+'</span>\n<span class="'+a(c(null!=(o=null!=(o=null!=t?t.options:t)?o.styles:o)?o.dragText:o,t))+'">'+a(c(null!=(o=null!=t?t.options:t)?o.text:o,t))+"</span>"},useData:!0})},96605:function(e,t,r){var n=r(31197);e.exports=(n.default||n).template({compiler:[8,">= 4.3.0"],main:function(e,t,r,n,i){return'<div class="results-region"></div>'},useData:!0})},15709:function(e,t,r){var n=r(31197);e.exports=(n.default||n).template({compiler:[8,">= 4.3.0"],main:function(e,t,r,n,i){return e.propertyIsEnumerable,"<h3>"+e.escapeExpression((r.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"header",{name:"lang",hash:{},data:i}))+'</h3>\n<div class="filters-region"></div>'},useData:!0})},28434:function(e,t,r){var n=r(31197);e.exports=(n.default||n).template({compiler:[8,">= 4.3.0"],main:function(e,t,r,n,i){return'<div class="header-region"></div>\n<div class="results-region"></div>\n<div class="pagination-region"></div>'},useData:!0})}}]);
@@ -1 +1 @@
1
- (self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[8762],{23380:function(e,t,n){"use strict";n.r(t),n.d(t,{NewFolderView:function(){return T}});var r=n(48088),i=n(11306),o=n(21679),l=n(57857),a=n(99249),s=n(31647),u=n(52076),c=n(10101),d=n(60103),f=n(88172),h=n(57098),p=n(67670),y=n(60602),v=n(93569),b=n(77739),g=n(56906),w=n(77830),m=n.n(w);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},k(e)}function I(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,M(r.key),r)}}function M(e){var t=function(e){if("object"!=k(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=k(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==k(t)?t:t+""}function O(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(O=function(){return!!e})()}function S(e){return S=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},S(e)}function P(e,t){return P=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},P(e,t)}var T=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=S(t),function(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)}(e,O()?Reflect.construct(t,n||[],S(e).constructor):t.apply(e,n))}(this,t,[e])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&P(e,t)}(t,e),n=t,w=[{key:"initialize",value:function(e){var t=e.parentId,n=e.libraryId;(t?!n:n)||s.Q.Ry.throw(new i.H("Must provide either a libraryId or a parentId to ".concat(this.name))),this.bindListeners(),this.libraryDataService=o.u.getInstance(h.Or.Library,this)}},{key:"bindListeners",value:function(){this.listenTo(h.Vk.LIBRARY,"libraries:sync",this.render)}},{key:"name",get:function(){return"NewFolderView"}},{key:"lang",get:function(){return"libraryEditor.newFolder"}},{key:"title",get:function(){return l.T.getPhrase(this.lang,"title")}},{key:"folderTreeKey",get:function(){return"folderselect:".concat(this.cid)}},{key:"template",get:function(){return m()}},{key:"channelName",get:function(){return v.N0.generateUniqueChannelName(this)}},{key:"behaviors",get:function(){var e=this;return[{behaviorClass:c.Yw,title:l.T.getPhrase(this.lang,"heading"),appLink:this.options.returnAppLink,spinnerButtonOptions:{model:this.spinnerModel=new p.v,channelName:this.channelName,buttonText:l.T.getPhrase(this.lang,"create"),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()&&(r.Radio.channel(this.channelName).trigger(f.I3.ShowSpinner),this.trimFolderName(),this.addFolder(),this.logAction())}},{key:"addFolder",value:function(){var e=this,t=this.viewModel.get("parentId").toString()===this.library.get("id").toString()?null:this.viewModel.get("parentId").toString();this.libraryDataService.addFolder(this.viewModel,this.library.get("id").toString(),t,(function(t){a.r.clear(e.getViewModelKey()),e.options.routeToFolderOnCreate?s.Q.C$.trigger({application:h.OV.LIBRARY_EDITOR,action:h.eX.LibraryEditor.FOLDER,args:[t.get("id")]}):e.triggerMethod("hide")}))}},{key:"trimFolderName",value:function(){var e=this.viewModel.get("name");this.viewModel.set("name",e.trim())}},{key:"logAction",value:function(){var e={id:this.options.libraryId,name:this.viewModel.get("name"),isSubfolder:this.viewModel.get("parentId").toString()!==this.library.get("id").toString()};u.k.logUserAction(e,this.options.analyticsOptions)}},{key:"setUpViewModel",value:function(){if(!this.viewModel){var e=this.getViewModelKey();this.viewModel=a.r.get(e,null,{ctor:y.g}),this.viewModel.set({parentId:this.options.parentId||this.options.libraryId})}}},{key:"getViewModelKey",value:function(){return"folder:new:".concat(this.options.libraryId,":").concat(this.options.parentId)}},{key:"renderFolderDetails",value:function(){if(this.collection){var e=new b.r({model:this.viewModel,collection:this.collection,library:this.library,channelName:this.channelName,editName:!0,editParent:!0,folderTreeKey:this.folderTreeKey});this.showChildView("folderDetails",e)}}},{key:"onBeforeRender",value:function(){var e=this;if(this.libraryDataService.getLibraries((function(t){if(!e.collection){var n=e.options.libraryId||e.options.parentId;e.library=v.PU.getLibrary(n,t),e.setUpViewModel(),e.collection=new d.I([e.library]),v.PU.setSelected(e.folderTreeKey,e.viewModel.get("parentId"),e.collection)}})),this.collection&&this.spinnerModel.set(f.ZV.Disabled,!1),v.PU.getFolderDepth(this.options.parentId,this.collection)>=h.pA.MAX_FOLDER_DEPTH)return window.setTimeout((function(){e.triggerMethod("hide"),s.Q.Ry.throw(new g.al)}),h.pA.POPUP_FADE_TIMEOUT),!1}},{key:"viewOptions",value:function(){return{dataFetched:!!this.collection,spinnerEl:v.Kp.getSpinner({size:v.Ey.Large,extraClasses:"mx-auto"})}}},{key:"onRender",value:function(){this.renderFolderDetails()}}],w&&I(n.prototype,w),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,w}(s.Q.G7)},77830:function(e,t,n){var r=n(32227);e.exports=(r.default||r).template({1:function(e,t,n,r,i){var o;return e.propertyIsEnumerable,(null!=(o=e.lambda(null!=(o=null!=t?t.options:t)?o.spinnerEl:o,t))?o:"")+"\n"},3:function(e,t,n,r,i){return'<div class="folder-details-region"></div>\n'},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,i){var o;return e.propertyIsEnumerable,null!=(o=n.unless.call(null!=t?t:e.nullContext||{},null!=(o=null!=t?t.options:t)?o.dataFetched:o,{name:"unless",hash:{},fn:e.program(1,i,0),inverse:e.program(3,i,0),data:i}))?o:""},useData:!0})}}]);
1
+ (self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[6450],{23380:function(e,t,n){"use strict";n.r(t),n.d(t,{NewFolderView:function(){return T}});var r=n(43823),i=n(11306),o=n(21679),l=n(57857),a=n(99249),s=n(31647),u=n(52076),c=n(10101),d=n(60103),f=n(88172),h=n(45390),p=n(67670),y=n(60602),v=n(93569),b=n(77739),g=n(56906),w=n(77830),m=n.n(w);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},k(e)}function I(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,M(r.key),r)}}function M(e){var t=function(e){if("object"!=k(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=k(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==k(t)?t:t+""}function O(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(O=function(){return!!e})()}function S(e){return S=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},S(e)}function P(e,t){return P=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},P(e,t)}var T=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=S(t),function(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)}(e,O()?Reflect.construct(t,n||[],S(e).constructor):t.apply(e,n))}(this,t,[e])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&P(e,t)}(t,e),n=t,w=[{key:"initialize",value:function(e){var t=e.parentId,n=e.libraryId;(t?!n:n)||s.Q.Ry.throw(new i.H("Must provide either a libraryId or a parentId to ".concat(this.name))),this.bindListeners(),this.libraryDataService=o.u.getInstance(h.Or.Library,this)}},{key:"bindListeners",value:function(){this.listenTo(h.Vk.LIBRARY,"libraries:sync",this.render)}},{key:"name",get:function(){return"NewFolderView"}},{key:"lang",get:function(){return"libraryEditor.newFolder"}},{key:"title",get:function(){return l.T.getPhrase(this.lang,"title")}},{key:"folderTreeKey",get:function(){return"folderselect:".concat(this.cid)}},{key:"template",get:function(){return m()}},{key:"channelName",get:function(){return v.N0.generateUniqueChannelName(this)}},{key:"behaviors",get:function(){var e=this;return[{behaviorClass:c.Yw,title:l.T.getPhrase(this.lang,"heading"),appLink:this.options.returnAppLink,spinnerButtonOptions:{model:this.spinnerModel=new p.v,channelName:this.channelName,buttonText:l.T.getPhrase(this.lang,"create"),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()&&(r.Radio.channel(this.channelName).trigger(f.I3.ShowSpinner),this.trimFolderName(),this.addFolder(),this.logAction())}},{key:"addFolder",value:function(){var e=this,t=this.viewModel.get("parentId").toString()===this.library.get("id").toString()?null:this.viewModel.get("parentId").toString();this.libraryDataService.addFolder(this.viewModel,this.library.get("id").toString(),t,(function(t){a.r.clear(e.getViewModelKey()),e.options.routeToFolderOnCreate?s.Q.C$.trigger({application:h.OV.LIBRARY_EDITOR,action:h.eX.LibraryEditor.FOLDER,args:[t.get("id")]}):e.triggerMethod("hide")}))}},{key:"trimFolderName",value:function(){var e=this.viewModel.get("name");this.viewModel.set("name",e.trim())}},{key:"logAction",value:function(){var e={id:this.options.libraryId,name:this.viewModel.get("name"),isSubfolder:this.viewModel.get("parentId").toString()!==this.library.get("id").toString()};u.k.logUserAction(e,this.options.analyticsOptions)}},{key:"setUpViewModel",value:function(){if(!this.viewModel){var e=this.getViewModelKey();this.viewModel=a.r.get(e,null,{ctor:y.g}),this.viewModel.set({parentId:this.options.parentId||this.options.libraryId})}}},{key:"getViewModelKey",value:function(){return"folder:new:".concat(this.options.libraryId,":").concat(this.options.parentId)}},{key:"renderFolderDetails",value:function(){if(this.collection){var e=new b.r({model:this.viewModel,collection:this.collection,library:this.library,channelName:this.channelName,editName:!0,editParent:!0,folderTreeKey:this.folderTreeKey});this.showChildView("folderDetails",e)}}},{key:"onBeforeRender",value:function(){var e=this;if(this.libraryDataService.getLibraries((function(t){if(!e.collection){var n=e.options.libraryId||e.options.parentId;e.library=v.PU.getLibrary(n,t),e.setUpViewModel(),e.collection=new d.I([e.library]),v.PU.setSelected(e.folderTreeKey,e.viewModel.get("parentId"),e.collection)}})),this.collection&&this.spinnerModel.set(f.ZV.Disabled,!1),v.PU.getFolderDepth(this.options.parentId,this.collection)>=h.pA.MAX_FOLDER_DEPTH)return window.setTimeout((function(){e.triggerMethod("hide"),s.Q.Ry.throw(new g.al)}),h.pA.POPUP_FADE_TIMEOUT),!1}},{key:"viewOptions",value:function(){return{dataFetched:!!this.collection,spinnerEl:v.Kp.getSpinner({size:v.Ey.Large,extraClasses:"mx-auto"})}}},{key:"onRender",value:function(){this.renderFolderDetails()}}],w&&I(n.prototype,w),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,w}(s.Q.G7)},77830:function(e,t,n){var r=n(31197);e.exports=(r.default||r).template({1:function(e,t,n,r,i){var o;return e.propertyIsEnumerable,(null!=(o=e.lambda(null!=(o=null!=t?t.options:t)?o.spinnerEl:o,t))?o:"")+"\n"},3:function(e,t,n,r,i){return'<div class="folder-details-region"></div>\n'},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,i){var o;return e.propertyIsEnumerable,null!=(o=n.unless.call(null!=t?t:e.nullContext||{},null!=(o=null!=t?t.options:t)?o.dataFetched:o,{name:"unless",hash:{},fn:e.program(1,i,0),inverse:e.program(3,i,0),data:i}))?o:""},useData:!0})}}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[6467],{77151:function(e,t,n){"use strict";n.d(t,{z:function(){return g}});var o=n(43823),i=n(57857),r=n(31647),a=n(88172),l=n(93569),s=n(40622),u=n(99724),c=n.n(u),d={saveButton:"G_FDK",undo:"dcV70"};function f(e){return f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},f(e)}function h(e,t,n){return(t=v(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,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,v(o.key),o)}}function v(e){var t=function(e){if("object"!=f(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=f(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==f(t)?t:t+""}function b(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(b=function(){return!!e})()}function y(e){return y=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},y(e)}function m(e,t){return m=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},m(e,t)}var g=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=y(t),function(e,t){if(t&&("object"==f(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,b()?Reflect.construct(t,n||[],y(e).constructor):t.apply(e,n))}(this,t,[e])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&m(e,t)}(t,e),n=t,u=[{key:"name",get:function(){return"SaveComponent"}},{key:"template",get:function(){return c()}},{key:"className",get:function(){return"save-component ".concat(this.options.extraClasses)}},{key:"lang",get:function(){return"libraryEditor.save"}},{key:"getParentChannel",value:function(){return o.Radio.channel(this.options.channelName)}},{key:"getSaveChannelName",value:function(){return"".concat(this.name,":").concat(this.cid)}},{key:"regions",value:function(){return{save:{el:".save-region",replaceElement:!0}}}},{key:"events",value:function(){return{"click .undo":"onUndo"}}},{key:"initialize",value:function(){this.model||(this.model=new r.Q.Hn(h(h({},a.ZV.ShowSpinner,this.options.showSpinner),a.ZV.Disabled,this.options.isDisabled)));var e=this.options.channelName;this.listenTo(e,s.NT.DisableSave,this.onDisableSave),this.listenTo(e,s.NT.EnableSave,this.onEnableSave),this.listenTo(e,s.NT.CancelSave,this.onCancelSave);var t=o.Radio.channel(this.getSaveChannelName());this.listenTo(t,s.NT.Save,this.onSave),this.options.allowUndo&&(this.options.hasChanges&&this.model.set("showUndo",!0),this.listenTo(this.model,"change:showUndo",this.render))}},{key:"onCancelSave",value:function(){this.model.set(a.ZV.ShowSpinner,!1)}},{key:"onEnableSave",value:function(){this.model.set(a.ZV.Disabled,!1),this.options.allowUndo&&this.model.set("showUndo",!0)}},{key:"onDisableSave",value:function(){this.model.get(a.ZV.ShowSpinner)&&this.model.set(a.ZV.ShowSpinner,!1,{silent:!0}),this.model.set(a.ZV.Disabled,!0),this.options.allowUndo&&this.model.set("showUndo",!1)}},{key:"onUndo",value:function(e){e.stopPropagation(),this.getParentChannel().trigger(s.NT.Undo)}},{key:"onSave",value:function(){this.model.set(a.ZV.ShowSpinner,!0),this.getParentChannel().trigger(s.NT.Save)}},{key:"viewOptions",value:function(){return{allowUndo:this.options.allowUndo&&this.model.get("showUndo"),styles:d}}},{key:"renderSaveButton",value:function(){var e=new a.Py({saveEvent:s.NT.Save,channelName:this.getSaveChannelName(),model:this.model,buttonText:i.T.getPhrase(this.lang,"save"),extraButtonClass:"btn-dark ".concat(d.saveButton),spinnerOptions:{size:l.Ey.Small,type:l.dR.Light,extraClasses:"mx-auto"}});this.showChildView("save",e)}},{key:"onRender",value:function(){this.renderSaveButton()}}],u&&p(n.prototype,u),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,u}(r.Q.wA)},66481:function(e,t,n){"use strict";n.r(t),n.d(t,{EditClipView:function(){return H}});var o=n(43823),i=n(21161),r=n(25417),a=n(99748),l=n(11306),s=n(21679),u=n(57857),c=n(99249),d=n(31647),f=n(52076),h=n(70065),p=n(13156),v=n(57085),b=n(45390),y=n(29457),m=n(610),g=n(48404),w=n(19226),k=n(93569),S=n(88483),C=n(53825),E=n(32035),O=n(77151),j=n(47122),P=n.n(j);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},T(e)}function N(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,_(o.key),o)}}function _(e){var t=function(e){if("object"!=T(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=T(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==T(t)?t:t+""}function x(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(x=function(){return!!e})()}function D(e){return D=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},D(e)}function V(e,t){return V=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},V(e,t)}var B=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=D(t),function(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)}(e,x()?Reflect.construct(t,n||[],D(e).constructor):t.apply(e,n))}(this,t,[e])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&V(e,t)}(t,e),n=t,(o=[{key:"name",get:function(){return"EditClipDetailsComponent"}},{key:"className",get:function(){return"edit-clip-detail py-3"}},{key:"lang",get:function(){return"libraryEditor.editClipDetails"}},{key:"template",get:function(){return P()}},{key:"appLinks",get:function(){return{".suggest-edit":{application:b.OV.LIBRARY_EDITOR,action:b.eX.LibraryEditor.SUGGEST_AN_EDIT,args:[this.model.get("id"),this.model.get("typeId")]}}}},{key:"events",value:function(){return{"click .expand-details":"onClickExpandDetails"}}},{key:"elements",get:function(){return{expandable:".collapse-area"}}},{key:"regions",value:function(){return{topSave:{el:".top-save-region",replaceElement:!0},bottomSave:{el:".bottom-save-region",replaceElement:!0},thumbnail:{el:".thumbnail-region",replaceElement:!0},basicInfo:{el:".basic-info-region",replaceElement:!0}}}},{key:"renderSave",value:function(){this.options.editable&&this.showChildView("topSave",new O.z({channelName:this.options.channelName,allowUndo:!0,isDisabled:this.options.isSaveDisabled,hasChanges:this.options.hasChanges,extraClasses:"float-end"})),this.showChildView("bottomSave",new O.z({channelName:this.options.channelName,allowUndo:!0,isDisabled:this.options.isSaveDisabled,hasChanges:this.options.hasChanges,extraClasses:"float-end"}))}},{key:"renderBasicInfo",value:function(){this.showChildView("basicInfo",new E.J({model:this.model,channelName:this.options.channelName,editable:this.options.editable,showingSaveButton:this.options.editable}))}},{key:"renderThumbnail",value:function(){this.showChildView("thumbnail",new C.Z({model:this.model,thumbnail:k.M2.getThumbnail(this.model),thumbnailOptions:{size:S.h2.Medium},duration:k.M2.getDuration(this.model),durationNewStyle:!0}))}},{key:"viewOptions",value:function(){return{editable:this.options.editable,suggestEditClasses:"info-link text-underline suggest-edit",isExchange:k.M2.isExchangeVideo(this.model)}}},{key:"onRender",value:function(){this.renderSave(),this.renderBasicInfo(),this.renderThumbnail()}}])&&N(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(d.Q.wA),M=n(40622),R=n(53854),I=n(75535),L=n(95061),U=n(57785),A=n(50814),Q=n.n(A);function Z(e){return Z="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},Z(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,K(o.key),o)}}function K(e){var t=function(e){if("object"!=Z(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Z(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Z(t)?t:t+""}function F(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(F=function(){return!!e})()}function G(e){return G=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},G(e)}function Y(e,t){return Y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Y(e,t)}var H=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=function(e,t,n){return t=G(t),function(e,t){if(t&&("object"==Z(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,F()?Reflect.construct(t,n||[],G(e).constructor):t.apply(e,n))}(this,t,[e])).editable=!1,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Y(e,t)}(t,e),n=t,S=[{key:"name",get:function(){return"EditClipView"}},{key:"title",get:function(){return this.model&&this.model.get("name")}},{key:"lang",get:function(){return"libraryEditor.editClip"}},{key:"className",get:function(){return"bg-white p-3 rounded"}},{key:"channelName",get:function(){return"".concat(this.name,":").concat(this.cid)}},{key:"viewModelName",get:function(){return"".concat(this.name,":").concat(this.options.clipId)}},{key:"template",get:function(){return Q()}},{key:"regions",value:function(){return{breadcrumbs:{el:".breadcrumbs-region",replaceElement:!1,partialLoading:y.LP.Breadcrumbs},content:{el:".edit-content-region",replaceElement:!0,partialLoading:y.LP.EditClipDetails}}}},{key:"initialize",value:function(){this.navLock=s.u.getInstance(b.K9.NavLock,this),this.initDataListeners(),k.Si.initBackButton(),this.initServices()}},{key:"initServices",value:function(){this.videoDataService=s.u.getInstance(b.Or.Video,this),this.alertService=s.u.getInstance(b.K9.Alerts,this)}},{key:"initDataListeners",value:function(){this.listenTo(r.G.SHELL,d.Q.Vy.NAV_UNLOCKED_BY_USER,this.onNavigateAway),this.listenTo(b.Vk.VIDEO,"".concat(b.M_.CLIPS,":").concat(this.options.clipId,":sync"),this.render),this.listenTo(b.Vk.VIDEO,"".concat(b.M_.CLIPS,":").concat(this.options.clipId,":error"),this.onError),this.listenTo(this.channelName,M.NT.Save,this.onSave),this.listenTo(this.channelName,M.NT.Undo,this.onUndo)}},{key:"onError",value:function(e){switch(e.type){case a.h.NotFound:d.Q.Ry.throw(new I.l);break;case a.h.Forbidden:d.Q.Ry.throw(new R.a)}}},{key:"saveVideo",value:function(e,t){var n=this,o=e.dataChanges;if(i.isEmpty(o))t(e);else{var r=e.dataChanges;this.videoDataService.updateClip(this.model.get("id"),this.folder.get("id"),r,(function(o){n.videoDataService.clearVideoCache(),e.updatedVideo=i.extend({},e.updatedVideo||{},o),t(e)}))}}},{key:"afterSave",value:function(e){if(this.viewModel){e.updatedVideo&&this.updateState(e.updatedVideo),this.unlockNav(),this.updateSaveButton(M.NT.DisableSave),this.logEditAction(e.dataChanges,h.eu.Save);var t=p.J.updatedVideoAlert(this.viewModel.get("name"));this.alertService.success(t||"Clip was successfully updated")()}}},{key:"onSave",value:function(){if(this.viewModel.validate(),!1===this.viewModel.isValid())return this.updateSaveButton(M.NT.CancelSave),!1;var e=U.xC.getChanges(this.model,this.viewModel),t=U.xC.getRemovedObjectIds(this.model,this.viewModel);if(!e&&!i.keys(t).length)return this.updateSaveButton(M.NT.CancelSave),!1;var n=new d.Q.dM;return this.editable&&n.useAsync(i.bind(this.saveVideo,this)),n.useAsync(i.bind(this.afterSave,this)),n.goAsync({dataChanges:e,pendingDissocs:t},null),!1}},{key:"onUndo",value:function(){var e=this;new k.Mr({title:u.T.getPhrase(this.lang,"undoTitle"),text:u.T.getPhrase(this.lang,"undoBody",{clipName:this.model.get("name")}),buttons:[{text:u.T.getPhrase(this.lang,"undo"),className:"btn btn-danger",success:!0},{text:u.T.getPhrase(this.lang,"cancel"),className:"btn btn-link",close:!0}]}).render().done((function(){e.logEditAction({},h.eu.Discard),e.revertState({undo:!0}),e.render()}))}},{key:"updateState",value:function(e){this.stopListening(this.viewModel),U.xC.updateModelState(this.model,this.viewModel,e),c.r.clear(this.viewModelName),this.getViewModel(),this.renderContent()}},{key:"onNavigateAway",value:function(){this.revertState()}},{key:"revertState",value:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).undo;this.stopListening(this.viewModel),c.r.clear(this.viewModelName),delete this.viewModel,this.unlockNav(),e&&this.getViewModel()}},{key:"lockNav",value:function(){this.navLock.lock({title:u.T.getPhrase(this.lang,"navLockHeading"),text:u.T.getPhrase(this.lang,"navLockBody")})}},{key:"unlockNav",value:function(){this.navLock.unlock()}},{key:"onModelChange",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(t.stickitChange||t.manualUpdate)if(this.viewModel.validate(),!1!==this.viewModel.isValid()){if(!U.xC.getChanges(this.model,this.viewModel)&&!i.keys(U.xC.getRemovedObjectIds(this.model,this.viewModel)).length)return this.unlockNav(),void this.updateSaveButton(M.NT.DisableSave);this.lockNav(),this.updateSaveButton(M.NT.EnableSave)}else this.updateSaveButton(M.NT.DisableSave)}},{key:"updateSaveButton",value:function(e){var t=o.Radio.channel(this.channelName),n=M.NT.EnableSave,i=M.NT.DisableSave,r=M.NT.CancelSave;switch(e){case n:return void t.trigger(n);case i:return void t.trigger(i);case r:return void t.trigger(r)}d.Q.Ry.throw(new l.H("Save action type is not valid."))}},{key:"logEditAction",value:function(e,t){var n=Object.assign({id:this.model.get("id")},e);f.k.logUserAction(n,{actionType:h.Vw.Edit,entity:h.py.Clip,location:h.LZ.EditClipDetails,workflowPhase:t})}},{key:"onValidation",value:function(e){this.viewModel.set("disabled",!e)}},{key:"getViewModel",value:function(){this.viewModel=c.r.get(this.viewModelName,this.model.toJSON(),{ctor:m.b}),this.editable&&this.viewModel.addValidation(U.Zl),this.listenTo(this.viewModel,"validated",this.onValidation),this.listenTo(this.viewModel,"change",this.onModelChange)}},{key:"fetchData",value:function(){this.model=this.videoDataService.getClip(this.options.clipId),this.model&&(this.editable=k.BK.canEditVideo(this.model),this.folder=this.model.categories.first(),this.viewModel instanceof m.b||this.getViewModel())}},{key:"requiredResources",get:function(){return{config:g.p.config,currentUser:w.K.currentUser,libraries:L.T.libraries}}},{key:"onBeforeRender",value:function(){return this.fetchData(),!!this.model&&!!this.viewModel}},{key:"renderBreadcrumbs",value:function(){this.folder&&this.showChildView("breadcrumbs",new v.n({folder:this.folder,libraries:this.libraries,video:this.model,enableLastItemAppLink:!1}))}},{key:"renderContent",value:function(){var e=U.xC.getChanges(this.model,this.viewModel)||i.keys(U.xC.getRemovedObjectIds(this.model,this.viewModel)).length;this.showChildView("content",new B({model:this.viewModel,channelName:this.channelName,isSaveDisabled:!e,hasChanges:!!e,editable:this.editable,currentUser:this.currentUser}))}},{key:"onRender",value:function(){this.renderBreadcrumbs(),this.renderContent()}}],S&&z(n.prototype,S),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,S}(d.Q.G7)},57085:function(e,t,n){"use strict";n.d(t,{n:function(){return T}});var o=n(31647),i=n(45390),r=n(22557),a=n(86363),l=n.n(a);function s(e){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s(e)}function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,f(o.key),o)}}function d(e,t,n){return t&&c(e.prototype,t),n&&c(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function f(e){var t=function(e){if("object"!=s(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=s(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==s(t)?t:t+""}function h(e,t,n){return t=v(t),function(e,t){if(t&&("object"==s(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,p()?Reflect.construct(t,n||[],v(e).constructor):t.apply(e,n))}function p(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(p=function(){return!!e})()}function v(e){return v=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},v(e)}function b(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)}function y(e,t){return y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},y(e,t)}var m=function(e){function t(){return u(this,t),h(this,t,arguments)}return b(t,e),d(t,[{key:"name",get:function(){return"BreadcrumbItemComponent"}},{key:"template",get:function(){return l()}},{key:"tagName",get:function(){return"li"}},{key:"className",get:function(){var e="breadcrumb-item";return this.model.get("active")&&(e+=" active"),e}},{key:"attributes",get:function(){return this.model.get("active")?{"aria-current":"page"}:{}}},{key:"appLinks",get:function(){return this.model.get("active")?{}:{a:this.model.get("appLink")}}},{key:"viewOptions",value:function(){return{isActive:this.model.get("active")}}}])}(o.Q.wA),g=function(e){function t(){return u(this,t),h(this,t,arguments)}return b(t,e),d(t,[{key:"name",get:function(){return"BreadcrumbComponentCollection"}},{key:"tagName",get:function(){return"ol"}},{key:"className",get:function(){return"breadcrumb m-0 p-0"}},{key:"childView",get:function(){return m}}])}(o.Q.$W),w=n(93933),k=n.n(w);function S(e){return S="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},S(e)}function C(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,E(o.key),o)}}function E(e){var t=function(e){if("object"!=S(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=S(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==S(t)?t:t+""}function O(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(O=function(){return!!e})()}function j(e){return j=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},j(e)}function P(e,t){return P=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},P(e,t)}var T=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=j(t),function(e,t){if(t&&("object"==S(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,O()?Reflect.construct(t,n||[],j(e).constructor):t.apply(e,n))}(this,t,[e])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&P(e,t)}(t,e),n=t,(a=[{key:"initialize",value:function(){this.getBreadcrumbs()}},{key:"name",get:function(){return"BreadcrumbsComponent"}},{key:"template",get:function(){return k()}},{key:"className",get:function(){return"d-inline-block"}},{key:"regions",value:function(){return{breadcrumbs:".breadcrumbs-region"}}},{key:"defaults",get:function(){return{customBreadcrumbs:[]}}},{key:"getBreadcrumbs",value:function(){var e=this;this.breadcrumbCollection=new o.Q.FE([]);var t,n=this.options.folder;do{if(!n)break;if(t=r.P.getParent(n.id,this.options.libraries),this.breadcrumbCollection.add(this.getBreadcrumb(n,!!t),{at:0}),!t)break;n=t}while(t);this.options.video&&this.breadcrumbCollection.add({name:this.options.video.get("name"),appLink:{application:i.OV.LIBRARY_EDITOR,action:i.eX.LibraryEditor.VIDEO_DETAILS,args:[this.options.video.id]}}),this.options.customBreadcrumbs&&this.options.customBreadcrumbs.forEach((function(t){return e.breadcrumbCollection.add(t)})),this.breadcrumbCollection.length&&this.breadcrumbCollection.last().set("active",!this.options.enableLastItemAppLink)}},{key:"getBreadcrumb",value:function(e,t){var n=t?i.eX.LibraryEditor.FOLDER:i.eX.LibraryEditor.LIBRARY;return{name:e.get("name"),appLink:{application:i.OV.LIBRARY_EDITOR,action:n,args:[e.id]}}}},{key:"onRender",value:function(){var e=new g({collection:this.breadcrumbCollection});this.showChildView("breadcrumbs",e)}}])&&C(n.prototype,a),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,a}(o.Q.wA)},47122:function(e,t,n){var o=n(31197);e.exports=(o.default||o).template({1:function(e,t,n,o,i){var r;return e.propertyIsEnumerable,' <p class="mb-2 py-1 px-2 alert alert-info rounded fw-semibold">\n'+(null!=(r=n.if.call(null!=t?t:e.nullContext||{},null!=(r=null!=t?t.options:t)?r.isExchange:r,{name:"if",hash:{},fn:e.program(2,i,0),inverse:e.program(4,i,0),data:i}))?r:"")+" </p>\n"},2:function(e,t,n,o,i){var r;return e.propertyIsEnumerable," "+(null!=(r=(n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"suggestEditExchange",{name:"lang",hash:{classNames:null!=(r=null!=t?t.options:t)?r.suggestEditClasses:r},data:i}))?r:"")+"\n"},4:function(e,t,n,o,i){var r;return e.propertyIsEnumerable," "+(null!=(r=(n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"suggestEdit",{name:"lang",hash:{classNames:null!=(r=null!=t?t.options:t)?r.suggestEditClasses:r},data:i}))?r:"")+"\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){var r;return e.propertyIsEnumerable,'<div class="row">\n <div class="left-pane col-4">\n <div class="thumbnail-region"></div>\n </div>\n <div class="right-pane col-8">\n'+(null!=(r=n.unless.call(null!=t?t:e.nullContext||{},null!=(r=null!=t?t.options:t)?r.editable:r,{name:"unless",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?r:"")+' <div class="top-save-region"></div>\n <div class="basic-info-region mb-4"></div> \n <div class="bottom-save-region"></div>\n </div>\n</div>'},useData:!0})},99724:function(e,t,n){var o=n(31197);e.exports=(o.default||o).template({1:function(e,t,n,o,i){e.propertyIsEnumerable;var r,a=e.escapeExpression;return'<span class="text-secondary mx-2 undo '+a(e.lambda(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.undo:r,t))+'">'+a((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"undo",{name:"lang",hash:{},data:i}))+"</span>\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){var r;return e.propertyIsEnumerable,(null!=(r=n.if.call(null!=t?t:e.nullContext||{},null!=(r=null!=t?t.options:t)?r.allowUndo:r,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?r:"")+'<div class="save-region"></div>'},useData:!0})},50814:function(e,t,n){var o=n(31197);e.exports=(o.default||o).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){var r;return e.propertyIsEnumerable,'<div class="row pb-3 border-bottom">\n <h1 class="h3">'+e.escapeExpression("function"==typeof(r=null!=(r=n.name||(null!=t?t.name:t))?r:e.hooks.helperMissing)?r.call(null!=t?t:e.nullContext||{},{name:"name",hash:{},data:i}):r)+'</h1>\n\n <div class="breadcrumbs-region"></div>\n</div>\n<div class="edit-content-region"></div>'},useData:!0})},86363:function(e,t,n){var o=n(31197);e.exports=(o.default||o).template({1:function(e,t,n,o,i){var r;return e.propertyIsEnumerable,'<span class="fw-bolder">'+e.escapeExpression("function"==typeof(r=null!=(r=n.name||(null!=t?t.name:t))?r:e.hooks.helperMissing)?r.call(null!=t?t:e.nullContext||{},{name:"name",hash:{},data:i}):r)+"</span>\n"},3:function(e,t,n,o,i){var r;return e.propertyIsEnumerable,"<a>"+e.escapeExpression("function"==typeof(r=null!=(r=n.name||(null!=t?t.name:t))?r:e.hooks.helperMissing)?r.call(null!=t?t:e.nullContext||{},{name:"name",hash:{},data:i}):r)+"</a>\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){var r;return e.propertyIsEnumerable,null!=(r=n.if.call(null!=t?t:e.nullContext||{},null!=(r=null!=t?t.options:t)?r.isActive:r,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.program(3,i,0),data:i}))?r:""},useData:!0})},93933:function(e,t,n){var o=n(31197);e.exports=(o.default||o).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){return'<nav class="breadcrumbs-region" aria-label="breadcrumb"></nav>'},useData:!0})}}]);
@@ -1 +1 @@
1
- (self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[1086],{36537:function(e,t,n){"use strict";n.r(t),n.d(t,{MoveFolderView:function(){return D}});var r=n(48088),i=n(39479),o=n(21679),l=n(57857),a=n(99249),s=n(31647),u=n(52076),c=n(10101),d=n(60103),f=n(88172),h=n(57098),p=n(67670),y=n(60602),v=n(93569),b=n(77739),g=n(88441),m=n.n(g);function w(e){return w="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},w(e)}function I(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function P(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,k(r.key),r)}}function k(e){var t=function(e){if("object"!=w(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=w(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==w(t)?t:t+""}function S(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(S=function(){return!!e})()}function O(e){return O=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},O(e)}function M(e,t){return M=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},M(e,t)}var D=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=O(t),function(e,t){if(t&&("object"==w(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,S()?Reflect.construct(t,n||[],O(e).constructor):t.apply(e,n))}(this,t,[e])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&M(e,t)}(t,e),n=t,g=[{key:"initialize",value:function(){this.bindListeners(),this.libraryDataService=o.u.getInstance(h.Or.Library,this)}},{key:"bindListeners",value:function(){this.listenTo(h.Vk.LIBRARY,"libraries:sync",this.render),this.listenTo(h.Vk.LIBRARY,"folder:".concat(this.options.folderId,":sync"),this.render)}},{key:"name",get:function(){return"MoveFolderView"}},{key:"title",get:function(){return l.T.getPhrase(this.lang,"title")}},{key:"lang",get:function(){return"libraryEditor.moveFolder"}},{key:"template",get:function(){return m()}},{key:"channelName",get:function(){return v.N0.generateUniqueChannelName(this)}},{key:"behaviors",get:function(){var e=this;return[{behaviorClass:c.Yw,title:l.T.getPhrase(this.lang,"heading"),spinnerButtonOptions:{model:this.spinnerModel=new p.v,channelName:this.channelName,buttonText:l.T.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()&&(r.Radio.channel(this.channelName).trigger(f.I3.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};u.k.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(){s.Q.C$.trigger({application:h.OV.LIBRARY_EDITOR,action:h.eX.LibraryEditor.FOLDER,args:[e.viewModel.get("id")]}),e.triggerMethod("hide")})):s.Q.C$.trigger({application:h.OV.LIBRARY_EDITOR,action:h.eX.LibraryEditor.FOLDER,args:[this.viewModel.get("id")]})}},{key:"getParentIds",value:function(){return{oldParentId:v.PU.getParent(this.options.folderId,this.collection).get("id"),newParentId:this.viewModel.get("parentId")}}},{key:"setUpCollection",value:function(e){this.collection||(this.library=v.PU.getLibrary(this.options.folderId,e),this.collection=new d.I([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=a.r.get(e,this.model.toJSON(),{ctor:y.g});var t=v.PU.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(f.ZV.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,function(e){return function(e){if(Array.isArray(e))return I(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){if("string"==typeof e)return I(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?I(e,t):void 0}}(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.")}()}(v.PU.flatten(this.model.children).map((function(e){return e.id.toString()})))):e}},{key:"renderFolderDetails",value:function(){if(this.model&&this.collection){var e=new b.r({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(i.bind(this.setUpCollection,this)),this.libraryDataService.getFolderFromLibraries(this.options.folderId,i.bind(this.setUpModel,this))}},{key:"viewOptions",value:function(){return{dataFetched:!!this.model&&!!this.collection,spinnerEl:v.Kp.getSpinner({size:v.Ey.Large,extraClasses:"mx-auto"})}}},{key:"onRender",value:function(){this.renderFolderDetails()}}],g&&P(n.prototype,g),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,g}(s.Q.G7)},88441:function(e,t,n){var r=n(32227);e.exports=(r.default||r).template({1:function(e,t,n,r,i){var o;return e.propertyIsEnumerable,(null!=(o=e.lambda(null!=(o=null!=t?t.options:t)?o.spinnerEl:o,t))?o:"")+"\n"},3:function(e,t,n,r,i){return'<div class="folder-details-region"></div>\n'},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,i){var o;return e.propertyIsEnumerable,null!=(o=n.unless.call(null!=t?t:e.nullContext||{},null!=(o=null!=t?t.options:t)?o.dataFetched:o,{name:"unless",hash:{},fn:e.program(1,i,0),inverse:e.program(3,i,0),data:i}))?o:""},useData:!0})}}]);
1
+ (self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[6587],{36537:function(e,t,n){"use strict";n.r(t),n.d(t,{MoveFolderView:function(){return D}});var r=n(43823),i=n(21161),o=n(21679),l=n(57857),a=n(99249),s=n(31647),u=n(52076),c=n(10101),d=n(60103),f=n(88172),h=n(45390),p=n(67670),y=n(60602),v=n(93569),b=n(77739),g=n(88441),m=n.n(g);function w(e){return w="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},w(e)}function I(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function P(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,k(r.key),r)}}function k(e){var t=function(e){if("object"!=w(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=w(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==w(t)?t:t+""}function S(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(S=function(){return!!e})()}function O(e){return O=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},O(e)}function M(e,t){return M=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},M(e,t)}var D=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=O(t),function(e,t){if(t&&("object"==w(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,S()?Reflect.construct(t,n||[],O(e).constructor):t.apply(e,n))}(this,t,[e])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&M(e,t)}(t,e),n=t,g=[{key:"initialize",value:function(){this.bindListeners(),this.libraryDataService=o.u.getInstance(h.Or.Library,this)}},{key:"bindListeners",value:function(){this.listenTo(h.Vk.LIBRARY,"libraries:sync",this.render),this.listenTo(h.Vk.LIBRARY,"folder:".concat(this.options.folderId,":sync"),this.render)}},{key:"name",get:function(){return"MoveFolderView"}},{key:"title",get:function(){return l.T.getPhrase(this.lang,"title")}},{key:"lang",get:function(){return"libraryEditor.moveFolder"}},{key:"template",get:function(){return m()}},{key:"channelName",get:function(){return v.N0.generateUniqueChannelName(this)}},{key:"behaviors",get:function(){var e=this;return[{behaviorClass:c.Yw,title:l.T.getPhrase(this.lang,"heading"),spinnerButtonOptions:{model:this.spinnerModel=new p.v,channelName:this.channelName,buttonText:l.T.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()&&(r.Radio.channel(this.channelName).trigger(f.I3.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};u.k.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(){s.Q.C$.trigger({application:h.OV.LIBRARY_EDITOR,action:h.eX.LibraryEditor.FOLDER,args:[e.viewModel.get("id")]}),e.triggerMethod("hide")})):s.Q.C$.trigger({application:h.OV.LIBRARY_EDITOR,action:h.eX.LibraryEditor.FOLDER,args:[this.viewModel.get("id")]})}},{key:"getParentIds",value:function(){return{oldParentId:v.PU.getParent(this.options.folderId,this.collection).get("id"),newParentId:this.viewModel.get("parentId")}}},{key:"setUpCollection",value:function(e){this.collection||(this.library=v.PU.getLibrary(this.options.folderId,e),this.collection=new d.I([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=a.r.get(e,this.model.toJSON(),{ctor:y.g});var t=v.PU.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(f.ZV.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,function(e){return function(e){if(Array.isArray(e))return I(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){if("string"==typeof e)return I(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?I(e,t):void 0}}(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.")}()}(v.PU.flatten(this.model.children).map((function(e){return e.id.toString()})))):e}},{key:"renderFolderDetails",value:function(){if(this.model&&this.collection){var e=new b.r({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(i.bind(this.setUpCollection,this)),this.libraryDataService.getFolderFromLibraries(this.options.folderId,i.bind(this.setUpModel,this))}},{key:"viewOptions",value:function(){return{dataFetched:!!this.model&&!!this.collection,spinnerEl:v.Kp.getSpinner({size:v.Ey.Large,extraClasses:"mx-auto"})}}},{key:"onRender",value:function(){this.renderFolderDetails()}}],g&&P(n.prototype,g),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,g}(s.Q.G7)},88441:function(e,t,n){var r=n(31197);e.exports=(r.default||r).template({1:function(e,t,n,r,i){var o;return e.propertyIsEnumerable,(null!=(o=e.lambda(null!=(o=null!=t?t.options:t)?o.spinnerEl:o,t))?o:"")+"\n"},3:function(e,t,n,r,i){return'<div class="folder-details-region"></div>\n'},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,i){var o;return e.propertyIsEnumerable,null!=(o=n.unless.call(null!=t?t:e.nullContext||{},null!=(o=null!=t?t.options:t)?o.dataFetched:o,{name:"unless",hash:{},fn:e.program(1,i,0),inverse:e.program(3,i,0),data:i}))?o:""},useData:!0})}}]);
@@ -1 +1 @@
1
- (self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[1409],{71641:function(e,t,n){"use strict";n.d(t,{w:function(){return p}});var r=n(39479),o=n(31647),i=n(55142);function u(e){return u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},u(e)}function c(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,s(r.key),r)}}function s(e){var t=function(e){if("object"!=u(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=u(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==u(t)?t:t+""}function l(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(l=function(){return!!e})()}function a(e){return a=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},a(e)}function f(e,t){return f=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},f(e,t)}var p=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=a(t),function(e,t){if(t&&("object"==u(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,l()?Reflect.construct(t,n||[],a(e).constructor):t.apply(e,n))}(this,t,[e])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&f(e,t)}(t,e),n=t,o=[{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.N}},{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)}}}],o&&c(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(o.Q.$W)},67670:function(e,t,n){"use strict";n.d(t,{v:function(){return p}});var r=n(31647),o=n(88172);function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function u(e,t,n){return(t=s(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function c(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,s(r.key),r)}}function s(e){var t=function(e){if("object"!=i(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==i(t)?t:t+""}function l(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(l=function(){return!!e})()}function a(e){return a=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},a(e)}function f(e,t){return f=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},f(e,t)}var p=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=a(t),function(e,t){if(t&&("object"==i(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,l()?Reflect.construct(t,n||[],a(e).constructor):t.apply(e,n))}(this,t,arguments)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&f(e,t)}(t,e),n=t,(r=[{key:"defaults",value:function(){return u(u({},o.ZV.Disabled,!0),o.ZV.Hidden,!1)}}])&&c(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(r.Q.Hn)},31409:function(e,t,n){"use strict";n.r(t),n.d(t,{RestrictAccessView:function(){return ve}});var r=n(48088),o=n(39479),i=n(21679),u=n(57857),c=n(31647),s=n(52076),l=n(70065),a=n(25692),f=n(56210),p=n(98985),d=n(63791),y=n(10101),h=n(71641),b=n(93569),m=n(28492),g=n.n(m);function v(e){return v="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},v(e)}function 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,O(r.key),r)}}function O(e){var t=function(e){if("object"!=v(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=v(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==v(t)?t:t+""}function S(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(S=function(){return!!e})()}function k(e){return k=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},k(e)}function j(e,t){return j=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},j(e,t)}var P=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=k(t),function(e,t){if(t&&("object"==v(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,S()?Reflect.construct(t,n||[],k(e).constructor):t.apply(e,n))}(this,t,[e])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&j(e,t)}(t,e),n=t,(r=[{key:"initialize",value:function(){var e=this.model?this.model.get("id"):"";b.yV.setSelected(e,this.collection),this.listenTo(this.options.channelName,this.options.eventName,this.onSelect)}},{key:"name",get:function(){return"DropdownComponent"}},{key:"template",get:function(){return g()}},{key:"className",get:function(){return this.options.buttonClass?"select-channel ".concat(this.options.buttonClass):"select-channel"}},{key:"regions",value:function(){return{dropdown:{el:".dropdown-menu-region",replaceElement:!0}}}},{key:"onSelect",value:function(e){b.yV.setSelected(e.get("id"),this.collection),this.render()}},{key:"viewOptions",value:function(){var e=b.yV.getSelected(this.collection);return Object.assign({selected:e&&e.get("name")},this.options)}},{key:"getIsOptionDisabledFn",value:function(){var e=b.yV.getSelected(this.collection),t=e&&e.id;return function(){return!!t&&(t=t.toString(),this.model.get("id").toString()===t)}}},{key:"renderChannelDropdown",value:function(){this.showChildView("dropdown",new h.w({collection:this.collection,channelName:this.options.channelName,childOptions:{titleProperty:this.options.titleProperty,isDisabled:this.getIsOptionDisabledFn(),eventName:this.options.eventName},displayOptions:this.options.displayOptions,analyticsHelper:this.options.analyticsHelper}))}},{key:"onRender",value:function(){this.renderChannelDropdown()}}])&&w(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(c.Q.wA),T=n(88172),C=n(57098),_=n(29457),E=n(67670),I=n(13052),A=n(48404),N=n(19226),R=n(264);function V(e){return V="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},V(e)}function 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,x(r.key),r)}}function x(e){var t=function(e){if("object"!=V(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=V(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==V(t)?t:t+""}function B(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(B=function(){return!!e})()}function G(e){return G=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},G(e)}function F(e,t){return F=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},F(e,t)}var M=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=G(t),function(e,t){if(t&&("object"==V(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,B()?Reflect.construct(t,n||[],G(e).constructor):t.apply(e,n))}(this,t,arguments)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&F(e,t)}(t,e),n=t,(r=[{key:"name",get:function(){return"RestrictAccessNoneComponent"}},{key:"template",get:function(){var e=this;return function(){return"<p>".concat(e.getTemplateText(),"</p>")}}},{key:"lang",get:function(){return"shared.restrictAccess"}},{key:"getTemplateText",value:function(){return u.T.getPhrase(this.lang,"noGroupSelected")}}])&&D(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(c.Q.wA);function U(e){return U="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},U(e)}function Y(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Q(r.key),r)}}function Q(e){var t=function(e){if("object"!=U(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=U(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==U(t)?t:t+""}function L(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(L=function(){return!!e})()}function H(e){return H=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},H(e)}function Z(e,t){return Z=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Z(e,t)}var z=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=H(t),function(e,t){if(t&&("object"==U(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,L()?Reflect.construct(t,n||[],H(e).constructor):t.apply(e,n))}(this,t,arguments)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Z(e,t)}(t,e),n=t,(r=[{key:"name",get:function(){return"RestrictAccessComponent"}},{key:"template",get:function(){var e=this;return function(){return"<p>".concat(e.getTemplateText(),"</p>")}}},{key:"lang",get:function(){return"shared.restrictAccess"}},{key:"getTemplateText",value:function(){return u.T.getPhrase(this.lang,"groupNoAccess",{groupName:b.S9.mapYearGroupToName(this.model.get("groupId"))})}}])&&Y(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(c.Q.wA),K=n(26033),$=n.n(K),q={select:"iQmg0",selectButton:"T67RV",svgContainer:"bNfyr",groupButton:"YOe2E",groupButtons:"q45Xi",groupButtonSelected:"FU9Dm",buttonDisabled:"UTSW5",mediumWeight:"CexaV"};function W(e){return W="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},W(e)}function J(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function X(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,te(r.key),r)}}function ee(e,t,n){return t&&X(e.prototype,t),n&&X(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function te(e){var t=function(e){if("object"!=W(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=W(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==W(t)?t:t+""}function ne(e,t,n){return t=oe(t),function(e,t){if(t&&("object"==W(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,re()?Reflect.construct(t,n||[],oe(e).constructor):t.apply(e,n))}function re(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(re=function(){return!!e})()}function oe(e){return oe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},oe(e)}function ie(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&&ue(e,t)}function ue(e,t){return ue=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ue(e,t)}var ce,se=function(e){function t(){return J(this,t),ne(this,t,arguments)}return ie(t,e),ee(t,[{key:"name",get:function(){return"RestrictAccessYearGroupItemView"}},{key:"className",get:function(){var e="btn text-center p-0 pb-1 pt-1 ".concat(q.groupButton);return this.model.get("selected")&&(e+=" ".concat(q.groupButtonSelected)),e}},{key:"tagName",get:function(){return"button"}},{key:"attributes",get:function(){var e=100/this.model.collection.length;return{type:"button",style:"width: ".concat(e,"%")}}},{key:"template",get:function(){var e=this.model.get("year");return function(){return"<span>".concat(e,"</span>")}}},{key:"events",value:function(){return{click:"onClick"}}},{key:"onClick",value:function(){r.Radio.channel(this.options.channelName).trigger("group:selected",this.model)}}])}(c.Q.wA),le=function(e){function t(){return J(this,t),ne(this,t,arguments)}return ie(t,e),ee(t,[{key:"initialize",value:function(){this.bindListeners()}},{key:"name",get:function(){return"RestrictAccessYearGroupComponentCollection"}},{key:"className",get:function(){return"btn-group w-100 ".concat(q.groupButtons)}},{key:"channelName",get:function(){return"".concat(this.name).concat(this.cid)}},{key:"childView",get:function(){return se}},{key:"childViewOptions",get:function(){return{channelName:this.channelName}}},{key:"bindListeners",value:function(){this.listenTo(this.channelName,"group:selected",this.onYearGroupSelected)}},{key:"onYearGroupSelected",value:function(e){this.collection.each((function(t){return t.set("selected",t.get("groupId")<=e.get("groupId"))})),this.model.set("groupId",e.get("groupId")),this.model.set("yearGroup",e.get("groupId")),this.render()}},{key:"onBeforeRender",value:function(){var e=this.model.get("yearGroup")||this.model.get("groupId");e&&(this.collection.each((function(t){return t.set("selected",t.get("groupId")<=e)})),this.model.set("groupId",e))}}])}(c.Q.n6),ae=function(e){function t(){return J(this,t),ne(this,t,arguments)}return ie(t,e),ee(t,[{key:"initialize",value:function(){this.configDataService=i.u.getInstance(C.Or.Config,this)}},{key:"name",get:function(){return"RestrictAccessGroupComponent"}},{key:"lang",get:function(){return"shared.restrictAccess"}},{key:"props",get:function(){return["configDataService","currentUser"]}},{key:"template",get:function(){return $()}},{key:"bindings",get:function(){var e=this;return{"[name=year]":{observe:"groupId",onGet:function(t){return e.buildGroupMessage(t)},updateMethod:"html",escape:!1}}}},{key:"regions",value:function(){return{yearGroupList:{replaceElement:!0,el:".year-group-region"}}}},{key:"requiredResources",get:function(){return{currentUser:N.K.currentUser}}},{key:"viewOptions",value:function(){return{styles:q}}},{key:"onBeforeRender",value:function(){var e=this;this.yearGroups||this.getYearGroups(),o.some(this.yearGroups,(function(t){return t.groupId===e.model.get("groupId")}))||this.model.set("groupId",void 0)}},{key:"onRender",value:function(){this.stickit(),this.showChildView("yearGroupList",new le({model:this.model,collection:new c.Q.FE(this.yearGroups)}))}},{key:"onBeforeDestroy",value:function(){this.unstickit()}},{key:"getYearGroups",value:function(){var e=this,t=this.configDataService.getCustomerYearGroups(this.currentUser.get("countryCode"));this.yearGroups=[],o.keys(_.lA).forEach((function(n){var r=parseInt(n,10);if(!o.isNaN(r)&&o.contains(t,r)){var i=r===_.lA.Kindergarten?"K":_.lA[r].replace("Year","Y");e.yearGroups.push({year:i,groupId:r})}}))}},{key:"buildGroupMessage",value:function(e){if(e){var t=b.S9.mapYearGroupToName(e);return u.T.getPhrase(this.lang,"selectedYearGroups",{classNames:q.mediumWeight,groupName:t})}return u.T.getPhrase(this.lang,"selectYearGroups")}}])}(c.Q.wA),fe=n(59047),pe=n.n(fe);function de(e){return de="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},de(e)}function ye(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,he(r.key),r)}}function he(e){var t=function(e){if("object"!=de(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=de(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==de(t)?t:t+""}function be(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(be=function(){return!!e})()}function me(e){return me=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},me(e)}function ge(e,t){return ge=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ge(e,t)}!function(e){e.None="Select a group...",e.Students="Students",e.Groups="Certain year levels",e.All="Students and staff"}(ce||(ce={}));var ve=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=me(t),function(e,t){if(t&&("object"==de(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,be()?Reflect.construct(t,n||[],me(e).constructor):t.apply(e,n))}(this,t,[e])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ge(e,t)}(t,e),n=t,h=[{key:"initialize",value:function(){this.restriction=new I.g({groupId:_.lA.Students}),this.selected=ce.None,this.bindListeners(),this.videoDataService=i.u.getInstance(C.Or.Video,this),this.restrictedVideoDataService=i.u.getInstance(C.Or.RestrictedVideo,this),this.videoMixinService=i.u.getInstance(C.K9.VideoMixin,this)}},{key:"bindListeners",value:function(){this.listenTo(this.channelName,"dropdown:selected",this.onOptionSelected),this.listenTo(this.restriction,"change:groupId",this.onGroupChanged),this.listenTo(C.Vk.VIDEO,"".concat(C.M_.VIDEOS,":").concat(this.options.videoId,":sync"),this.render),this.listenTo(C.Vk.RESTRICTED_VIDEO,"".concat(C.M_.RESTRICTED_OBJECTS,":").concat(this.options.videoId,":sync"),this.render)}},{key:"name",get:function(){return"RestrictAccessView"}},{key:"title",get:function(){return u.T.getPhrase(this.lang,"title")}},{key:"lang",get:function(){return"shared.restrictAccess"}},{key:"tagName",get:function(){return"form"}},{key:"className",get:function(){return"form-group"}},{key:"channelName",get:function(){return b.N0.generateUniqueChannelName(this)}},{key:"template",get:function(){return pe()}},{key:"behaviors",get:function(){var e=this;return[{behaviorClass:y.Yw,title:u.T.getPhrase(this.lang,"popupHeading"),modalClasses:q.modal,hideCloseButton:!0,size:"modal-md",spinnerButtonOptions:{channelName:this.channelName,model:this.spinnerModel=new E.v,buttonText:u.T.getPhrase(this.lang,"updateAccess"),tooltip:function(){return e.getSubmitBtnTooltipOptions()},onClick:function(t){return e.onSubmit(t)}},buttons:[{text:u.T.getPhrase(this.lang,"allowFullAccess"),getClassName:function(){return e.getAllowFullAccessBtnClassName()}}]},{behaviorClass:f.H,selector:".".concat(q.svgContainer),title:u.T.getPhrase(this.lang,"findOutMore")}]}},{key:"elements",get:function(){return{submit:"submit"}}},{key:"events",value:function(){return{submit:"onSubmit","click .allow-full-access":"onAllowFullAccess"}}},{key:"regions",value:function(){return{dropdown:".dropdown-region",accessView:{replaceElement:!0,el:".access-view-region"}}}},{key:"getAllowFullAccessBtnClassName",value:function(){var e="btn btn-link cursor-pointer me-2 allow-full-access";return this.dataFetched()&&!this.spinnerModel.get(T.ZV.ShowSpinner)||(e+=" disabled"),e}},{key:"getSubmitBtnTooltipOptions",value:function(){if(this.dataFetched()&&this.spinnerModel.get(T.ZV.Disabled))return{title:u.T.getPhrase(this.lang,"selectYear")}}},{key:"onOptionSelected",value:function(e){this.refreshRestriction();var t=this.getAccessView(e.get("name"));this.spinnerModel.set(T.ZV.Disabled,e.get("name")===ce.None),this.showChildView("accessView",new t({model:this.restriction,currentUser:this.currentUser})),this.renderDropdown()}},{key:"onGroupChanged",value:function(e){this.isRendered()&&this.spinnerModel.set(T.ZV.Disabled,o.isUndefined(e.get("groupId")))}},{key:"getAccessView",value:function(e){switch(this.selected=e,e){case ce.None:return M;case ce.Students:return this.restriction.set("groupId",_.lA.Students),z;case ce.Groups:return ae;case ce.All:return this.restriction.set("groupId",_.lA.All),z}}},{key:"getSelection",value:function(e){switch(e){case _.lA.All:case _.lA.Staff:return ce.All;case _.lA.Students:return ce.Students;default:return ce.Groups}}},{key:"refreshRestriction",value:function(){if(this.restrictedObjectCollection&&this.restrictedObjectCollection.length&&this.model){this.videoMixinService.mixinVideoRestriction(this.model,this.restrictedObjectCollection);var e=this.model.restrictions.last(),t=e.get("groupId");e&&o.isNumber(t)&&(this.restriction.set("groupId",t),this.selected=this.getSelection(t))}}},{key:"onSubmit",value:function(e){var t=this;if(e&&e.preventDefault(),o.isUndefined(this.restriction.get("groupId")))return!1;r.Radio.channel(this.channelName).trigger(T.I3.ShowSpinner),this.restrictedVideoDataService.updateVideoRestriction(this.options.videoId,this.restriction.get("groupId"),this.currentUser.get("customerId"),this.currentUser.get("id"),(function(){return t.triggerMethod("hide")})),this.logAction(this.restriction.get("groupId"))}},{key:"onAllowFullAccess",value:function(){var e=this;this.dataFetched()&&!this.spinnerModel.get(T.ZV.ShowSpinner)&&(this.spinnerModel.set(T.ZV.Disabled,!0),this.restriction.set("groupId",_.lA.All),this.restrictedVideoDataService.deleteVideoRestriction(this.options.videoId,(function(){return e.triggerMethod("hide")})),this.logAction())}},{key:"logAction",value:function(e){var t={location:l.LZ.Popup,actionType:l.Vw.SetAccess,entity:l.py.Video,workflowPhase:l.eu.Complete},n={id:this.model.get("id"),restriction:!!o.isNumber(e)&&_.lA[e]};s.k.logUserAction(n,t)}},{key:"dataFetched",value:function(){return!!this.model&&!!this.restrictedObjectCollection}},{key:"renderDropdown",value:function(){var e=this;this.collection=new c.Q.FE([{name:ce.None},{name:ce.Students},{name:ce.Groups},{name:ce.All}]),this.collection.each((function(t){return t.set("selected",t.get("name")===e.selected)})),this.showChildView("dropdown",new P({titleProperty:"name",eventName:"dropdown:selected",buttonId:"select-btn",collection:this.collection,channelName:this.channelName,buttonClass:q.selectButton,displayOptions:{extraClasses:"w-100"},analyticsHelper:s.k}))}},{key:"requiredResources",get:function(){return{config:A.p.config,currentUser:N.K.currentUser}}},{key:"onBeforeRender",value:function(){var e=this;this.model||this.videoDataService.getUnionVideo(this.options.videoId,this.options.typeId,(function(t){e.model=t,e.render()})),this.restrictedObjectCollection||this.restrictedVideoDataService.getVideoRestrictions([this.options.videoId],null,(function(t){e.restrictedObjectCollection=t,e.render()})),this.dataFetched()&&(this.refreshRestriction(),this.spinnerModel.set(T.ZV.Disabled,!1))}},{key:"viewOptions",value:function(){return{styles:q,supportUrl:!R.g.hasLite&&p.o.getOnlineArticle(a.s.VideoAccess),svg:d.Nj.getSvg(d.vn.Info),dataFetched:this.dataFetched(),spinnerEl:b.Kp.getSpinner({size:b.Ey.Large,extraClasses:"mx-auto"}),restrictFromLabel:u.T.getPhrase(this.lang,"popupSubheading")}}},{key:"onRender",value:function(){this.dataFetched()&&(this.renderDropdown(),this.onOptionSelected(new c.Q.Hn({name:this.selected})))}}],h&&ye(n.prototype,h),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,h}(c.Q.G7)},28492:function(e,t,n){var r=n(32227);e.exports=(r.default||r).template({1:function(e,t,n,r,o){e.propertyIsEnumerable;var i,u=e.lambda,c=e.escapeExpression;return'<label for="'+c(u(null!=(i=null!=t?t.options:t)?i.buttonId:i,t))+'" class="control-label">'+c(u(null!=(i=null!=t?t.options:t)?i.labelText:i,t))+"</label>\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){e.propertyIsEnumerable;var i,u=e.lambda,c=e.escapeExpression;return(null!=(i=n.if.call(null!=t?t:e.nullContext||{},null!=(i=null!=t?t.options:t)?i.labelText:i,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o}))?i:"")+'<button class="dropdown-toggle form-control text-start '+c(u(null!=(i=null!=t?t.options:t)?i.buttonClass:i,t))+'" type="button" id="'+c(u(null!=(i=null!=t?t.options:t)?i.buttonId:i,t))+'" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">\n '+c(u(null!=(i=null!=t?t.options:t)?i.selected:i,t))+'\n</button>\n<div class="dropdown-menu-region"></div>'},useData:!0})},59047:function(e,t,n){var r=n(32227);e.exports=(r.default||r).template({1:function(e,t,n,r,o){var i;return e.propertyIsEnumerable,(null!=(i=e.lambda(null!=(i=null!=t?t.options:t)?i.spinnerEl:i,t))?i:"")+"\n"},3:function(e,t,n,r,o){e.propertyIsEnumerable;var i,u=e.lambda,c=e.escapeExpression;return'<div class="d-flex align-items-center">\n<label class="control-label m-0 pb-2">'+c(u(null!=(i=null!=t?t.options:t)?i.restrictFromLabel:i,t))+"</label>\n"+(null!=(i=n.if.call(null!=t?t:e.nullContext||{},null!=(i=null!=t?t.options:t)?i.supportUrl:i,{name:"if",hash:{},fn:e.program(4,o,0),inverse:e.noop,data:o}))?i:"")+'</div>\n<div class="dropdown-region '+c(u(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.select:i,t))+' mb-3"></div>\n<div class="access-view-region"></div>\n'},4:function(e,t,n,r,o){e.propertyIsEnumerable;var i,u=e.lambda,c=e.escapeExpression;return'<a \n class="d-inline-block ms-1 mb-3 '+c(u(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.svgContainer:i,t))+'"\n title="'+c((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"findOutMore",{name:"lang",hash:{},data:o}))+'"\n href="'+c(u(null!=(i=null!=t?t.options:t)?i.supportUrl:i,t))+'" \n target="_blank"\n>\n '+(null!=(i=u(null!=(i=null!=t?t.options:t)?i.svg:i,t))?i:"")+"\n</a>\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var i;return e.propertyIsEnumerable,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})},26033:function(e,t,n){var r=n(32227);e.exports=(r.default||r).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){return'<div class="year-group-region"></div>\n<div name="year" class="mt-3"></div>'},useData:!0})}}]);
1
+ (self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[6677],{71641:function(e,t,n){"use strict";n.d(t,{w:function(){return p}});var r=n(21161),o=n(31647),i=n(55142);function u(e){return u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},u(e)}function c(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,s(r.key),r)}}function s(e){var t=function(e){if("object"!=u(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=u(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==u(t)?t:t+""}function l(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(l=function(){return!!e})()}function a(e){return a=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},a(e)}function f(e,t){return f=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},f(e,t)}var p=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=a(t),function(e,t){if(t&&("object"==u(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,l()?Reflect.construct(t,n||[],a(e).constructor):t.apply(e,n))}(this,t,[e])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&f(e,t)}(t,e),n=t,o=[{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.N}},{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)}}}],o&&c(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(o.Q.$W)},67670:function(e,t,n){"use strict";n.d(t,{v:function(){return p}});var r=n(31647),o=n(88172);function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function u(e,t,n){return(t=s(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function c(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,s(r.key),r)}}function s(e){var t=function(e){if("object"!=i(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==i(t)?t:t+""}function l(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(l=function(){return!!e})()}function a(e){return a=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},a(e)}function f(e,t){return f=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},f(e,t)}var p=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=a(t),function(e,t){if(t&&("object"==i(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,l()?Reflect.construct(t,n||[],a(e).constructor):t.apply(e,n))}(this,t,arguments)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&f(e,t)}(t,e),n=t,(r=[{key:"defaults",value:function(){return u(u({},o.ZV.Disabled,!0),o.ZV.Hidden,!1)}}])&&c(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(r.Q.Hn)},56677:function(e,t,n){"use strict";n.r(t),n.d(t,{RestrictAccessView:function(){return ve}});var r=n(43823),o=n(21161),i=n(21679),u=n(57857),c=n(31647),s=n(52076),l=n(70065),a=n(25692),f=n(56210),p=n(98985),d=n(85475),y=n(10101),h=n(71641),b=n(93569),m=n(28492),g=n.n(m);function v(e){return v="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},v(e)}function 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,O(r.key),r)}}function O(e){var t=function(e){if("object"!=v(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=v(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==v(t)?t:t+""}function S(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(S=function(){return!!e})()}function k(e){return k=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},k(e)}function j(e,t){return j=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},j(e,t)}var P=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=k(t),function(e,t){if(t&&("object"==v(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,S()?Reflect.construct(t,n||[],k(e).constructor):t.apply(e,n))}(this,t,[e])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&j(e,t)}(t,e),n=t,(r=[{key:"initialize",value:function(){var e=this.model?this.model.get("id"):"";b.yV.setSelected(e,this.collection),this.listenTo(this.options.channelName,this.options.eventName,this.onSelect)}},{key:"name",get:function(){return"DropdownComponent"}},{key:"template",get:function(){return g()}},{key:"className",get:function(){return this.options.buttonClass?"select-channel ".concat(this.options.buttonClass):"select-channel"}},{key:"regions",value:function(){return{dropdown:{el:".dropdown-menu-region",replaceElement:!0}}}},{key:"onSelect",value:function(e){b.yV.setSelected(e.get("id"),this.collection),this.render()}},{key:"viewOptions",value:function(){var e=b.yV.getSelected(this.collection);return Object.assign({selected:e&&e.get("name")},this.options)}},{key:"getIsOptionDisabledFn",value:function(){var e=b.yV.getSelected(this.collection),t=e&&e.id;return function(){return!!t&&(t=t.toString(),this.model.get("id").toString()===t)}}},{key:"renderChannelDropdown",value:function(){this.showChildView("dropdown",new h.w({collection:this.collection,channelName:this.options.channelName,childOptions:{titleProperty:this.options.titleProperty,isDisabled:this.getIsOptionDisabledFn(),eventName:this.options.eventName},displayOptions:this.options.displayOptions,analyticsHelper:this.options.analyticsHelper}))}},{key:"onRender",value:function(){this.renderChannelDropdown()}}])&&w(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(c.Q.wA),T=n(88172),C=n(45390),_=n(29457),E=n(67670),I=n(13052),A=n(48404),N=n(19226),R=n(264);function V(e){return V="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},V(e)}function 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,x(r.key),r)}}function x(e){var t=function(e){if("object"!=V(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=V(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==V(t)?t:t+""}function B(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(B=function(){return!!e})()}function G(e){return G=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},G(e)}function F(e,t){return F=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},F(e,t)}var M=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=G(t),function(e,t){if(t&&("object"==V(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,B()?Reflect.construct(t,n||[],G(e).constructor):t.apply(e,n))}(this,t,arguments)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&F(e,t)}(t,e),n=t,(r=[{key:"name",get:function(){return"RestrictAccessNoneComponent"}},{key:"template",get:function(){var e=this;return function(){return"<p>".concat(e.getTemplateText(),"</p>")}}},{key:"lang",get:function(){return"shared.restrictAccess"}},{key:"getTemplateText",value:function(){return u.T.getPhrase(this.lang,"noGroupSelected")}}])&&D(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(c.Q.wA);function U(e){return U="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},U(e)}function Y(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Q(r.key),r)}}function Q(e){var t=function(e){if("object"!=U(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=U(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==U(t)?t:t+""}function L(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(L=function(){return!!e})()}function H(e){return H=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},H(e)}function Z(e,t){return Z=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Z(e,t)}var z=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=H(t),function(e,t){if(t&&("object"==U(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,L()?Reflect.construct(t,n||[],H(e).constructor):t.apply(e,n))}(this,t,arguments)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Z(e,t)}(t,e),n=t,(r=[{key:"name",get:function(){return"RestrictAccessComponent"}},{key:"template",get:function(){var e=this;return function(){return"<p>".concat(e.getTemplateText(),"</p>")}}},{key:"lang",get:function(){return"shared.restrictAccess"}},{key:"getTemplateText",value:function(){return u.T.getPhrase(this.lang,"groupNoAccess",{groupName:b.S9.mapYearGroupToName(this.model.get("groupId"))})}}])&&Y(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(c.Q.wA),K=n(26033),$=n.n(K),q={select:"iQmg0",selectButton:"T67RV",svgContainer:"bNfyr",groupButton:"YOe2E",groupButtons:"q45Xi",groupButtonSelected:"FU9Dm",buttonDisabled:"UTSW5",mediumWeight:"CexaV"};function W(e){return W="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},W(e)}function J(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function X(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,te(r.key),r)}}function ee(e,t,n){return t&&X(e.prototype,t),n&&X(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function te(e){var t=function(e){if("object"!=W(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=W(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==W(t)?t:t+""}function ne(e,t,n){return t=oe(t),function(e,t){if(t&&("object"==W(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,re()?Reflect.construct(t,n||[],oe(e).constructor):t.apply(e,n))}function re(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(re=function(){return!!e})()}function oe(e){return oe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},oe(e)}function ie(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&&ue(e,t)}function ue(e,t){return ue=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ue(e,t)}var ce,se=function(e){function t(){return J(this,t),ne(this,t,arguments)}return ie(t,e),ee(t,[{key:"name",get:function(){return"RestrictAccessYearGroupItemView"}},{key:"className",get:function(){var e="btn text-center p-0 pb-1 pt-1 ".concat(q.groupButton);return this.model.get("selected")&&(e+=" ".concat(q.groupButtonSelected)),e}},{key:"tagName",get:function(){return"button"}},{key:"attributes",get:function(){var e=100/this.model.collection.length;return{type:"button",style:"width: ".concat(e,"%")}}},{key:"template",get:function(){var e=this.model.get("year");return function(){return"<span>".concat(e,"</span>")}}},{key:"events",value:function(){return{click:"onClick"}}},{key:"onClick",value:function(){r.Radio.channel(this.options.channelName).trigger("group:selected",this.model)}}])}(c.Q.wA),le=function(e){function t(){return J(this,t),ne(this,t,arguments)}return ie(t,e),ee(t,[{key:"initialize",value:function(){this.bindListeners()}},{key:"name",get:function(){return"RestrictAccessYearGroupComponentCollection"}},{key:"className",get:function(){return"btn-group w-100 ".concat(q.groupButtons)}},{key:"channelName",get:function(){return"".concat(this.name).concat(this.cid)}},{key:"childView",get:function(){return se}},{key:"childViewOptions",get:function(){return{channelName:this.channelName}}},{key:"bindListeners",value:function(){this.listenTo(this.channelName,"group:selected",this.onYearGroupSelected)}},{key:"onYearGroupSelected",value:function(e){this.collection.each((function(t){return t.set("selected",t.get("groupId")<=e.get("groupId"))})),this.model.set("groupId",e.get("groupId")),this.model.set("yearGroup",e.get("groupId")),this.render()}},{key:"onBeforeRender",value:function(){var e=this.model.get("yearGroup")||this.model.get("groupId");e&&(this.collection.each((function(t){return t.set("selected",t.get("groupId")<=e)})),this.model.set("groupId",e))}}])}(c.Q.n6),ae=function(e){function t(){return J(this,t),ne(this,t,arguments)}return ie(t,e),ee(t,[{key:"initialize",value:function(){this.configDataService=i.u.getInstance(C.Or.Config,this)}},{key:"name",get:function(){return"RestrictAccessGroupComponent"}},{key:"lang",get:function(){return"shared.restrictAccess"}},{key:"props",get:function(){return["configDataService","currentUser"]}},{key:"template",get:function(){return $()}},{key:"bindings",get:function(){var e=this;return{"[name=year]":{observe:"groupId",onGet:function(t){return e.buildGroupMessage(t)},updateMethod:"html",escape:!1}}}},{key:"regions",value:function(){return{yearGroupList:{replaceElement:!0,el:".year-group-region"}}}},{key:"requiredResources",get:function(){return{currentUser:N.K.currentUser}}},{key:"viewOptions",value:function(){return{styles:q}}},{key:"onBeforeRender",value:function(){var e=this;this.yearGroups||this.getYearGroups(),o.some(this.yearGroups,(function(t){return t.groupId===e.model.get("groupId")}))||this.model.set("groupId",void 0)}},{key:"onRender",value:function(){this.stickit(),this.showChildView("yearGroupList",new le({model:this.model,collection:new c.Q.FE(this.yearGroups)}))}},{key:"onBeforeDestroy",value:function(){this.unstickit()}},{key:"getYearGroups",value:function(){var e=this,t=this.configDataService.getCustomerYearGroups(this.currentUser.get("countryCode"));this.yearGroups=[],o.keys(_.lA).forEach((function(n){var r=parseInt(n,10);if(!o.isNaN(r)&&o.contains(t,r)){var i=r===_.lA.Kindergarten?"K":_.lA[r].replace("Year","Y");e.yearGroups.push({year:i,groupId:r})}}))}},{key:"buildGroupMessage",value:function(e){if(e){var t=b.S9.mapYearGroupToName(e);return u.T.getPhrase(this.lang,"selectedYearGroups",{classNames:q.mediumWeight,groupName:t})}return u.T.getPhrase(this.lang,"selectYearGroups")}}])}(c.Q.wA),fe=n(59047),pe=n.n(fe);function de(e){return de="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},de(e)}function ye(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,he(r.key),r)}}function he(e){var t=function(e){if("object"!=de(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=de(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==de(t)?t:t+""}function be(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(be=function(){return!!e})()}function me(e){return me=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},me(e)}function ge(e,t){return ge=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ge(e,t)}!function(e){e.None="Select a group...",e.Students="Students",e.Groups="Certain year levels",e.All="Students and staff"}(ce||(ce={}));var ve=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=me(t),function(e,t){if(t&&("object"==de(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,be()?Reflect.construct(t,n||[],me(e).constructor):t.apply(e,n))}(this,t,[e])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ge(e,t)}(t,e),n=t,h=[{key:"initialize",value:function(){this.restriction=new I.g({groupId:_.lA.Students}),this.selected=ce.None,this.bindListeners(),this.videoDataService=i.u.getInstance(C.Or.Video,this),this.restrictedVideoDataService=i.u.getInstance(C.Or.RestrictedVideo,this),this.videoMixinService=i.u.getInstance(C.K9.VideoMixin,this)}},{key:"bindListeners",value:function(){this.listenTo(this.channelName,"dropdown:selected",this.onOptionSelected),this.listenTo(this.restriction,"change:groupId",this.onGroupChanged),this.listenTo(C.Vk.VIDEO,"".concat(C.M_.VIDEOS,":").concat(this.options.videoId,":sync"),this.render),this.listenTo(C.Vk.RESTRICTED_VIDEO,"".concat(C.M_.RESTRICTED_OBJECTS,":").concat(this.options.videoId,":sync"),this.render)}},{key:"name",get:function(){return"RestrictAccessView"}},{key:"title",get:function(){return u.T.getPhrase(this.lang,"title")}},{key:"lang",get:function(){return"shared.restrictAccess"}},{key:"tagName",get:function(){return"form"}},{key:"className",get:function(){return"form-group"}},{key:"channelName",get:function(){return b.N0.generateUniqueChannelName(this)}},{key:"template",get:function(){return pe()}},{key:"behaviors",get:function(){var e=this;return[{behaviorClass:y.Yw,title:u.T.getPhrase(this.lang,"popupHeading"),modalClasses:q.modal,hideCloseButton:!0,size:"modal-md",spinnerButtonOptions:{channelName:this.channelName,model:this.spinnerModel=new E.v,buttonText:u.T.getPhrase(this.lang,"updateAccess"),tooltip:function(){return e.getSubmitBtnTooltipOptions()},onClick:function(t){return e.onSubmit(t)}},buttons:[{text:u.T.getPhrase(this.lang,"allowFullAccess"),getClassName:function(){return e.getAllowFullAccessBtnClassName()}}]},{behaviorClass:f.H,selector:".".concat(q.svgContainer),title:u.T.getPhrase(this.lang,"findOutMore")}]}},{key:"elements",get:function(){return{submit:"submit"}}},{key:"events",value:function(){return{submit:"onSubmit","click .allow-full-access":"onAllowFullAccess"}}},{key:"regions",value:function(){return{dropdown:".dropdown-region",accessView:{replaceElement:!0,el:".access-view-region"}}}},{key:"getAllowFullAccessBtnClassName",value:function(){var e="btn btn-link cursor-pointer me-2 allow-full-access";return this.dataFetched()&&!this.spinnerModel.get(T.ZV.ShowSpinner)||(e+=" disabled"),e}},{key:"getSubmitBtnTooltipOptions",value:function(){if(this.dataFetched()&&this.spinnerModel.get(T.ZV.Disabled))return{title:u.T.getPhrase(this.lang,"selectYear")}}},{key:"onOptionSelected",value:function(e){this.refreshRestriction();var t=this.getAccessView(e.get("name"));this.spinnerModel.set(T.ZV.Disabled,e.get("name")===ce.None),this.showChildView("accessView",new t({model:this.restriction,currentUser:this.currentUser})),this.renderDropdown()}},{key:"onGroupChanged",value:function(e){this.isRendered()&&this.spinnerModel.set(T.ZV.Disabled,o.isUndefined(e.get("groupId")))}},{key:"getAccessView",value:function(e){switch(this.selected=e,e){case ce.None:return M;case ce.Students:return this.restriction.set("groupId",_.lA.Students),z;case ce.Groups:return ae;case ce.All:return this.restriction.set("groupId",_.lA.All),z}}},{key:"getSelection",value:function(e){switch(e){case _.lA.All:case _.lA.Staff:return ce.All;case _.lA.Students:return ce.Students;default:return ce.Groups}}},{key:"refreshRestriction",value:function(){if(this.restrictedObjectCollection&&this.restrictedObjectCollection.length&&this.model){this.videoMixinService.mixinVideoRestriction(this.model,this.restrictedObjectCollection);var e=this.model.restrictions.last(),t=e.get("groupId");e&&o.isNumber(t)&&(this.restriction.set("groupId",t),this.selected=this.getSelection(t))}}},{key:"onSubmit",value:function(e){var t=this;if(e&&e.preventDefault(),o.isUndefined(this.restriction.get("groupId")))return!1;r.Radio.channel(this.channelName).trigger(T.I3.ShowSpinner),this.restrictedVideoDataService.updateVideoRestriction(this.options.videoId,this.restriction.get("groupId"),this.currentUser.get("customerId"),this.currentUser.get("id"),(function(){return t.triggerMethod("hide")})),this.logAction(this.restriction.get("groupId"))}},{key:"onAllowFullAccess",value:function(){var e=this;this.dataFetched()&&!this.spinnerModel.get(T.ZV.ShowSpinner)&&(this.spinnerModel.set(T.ZV.Disabled,!0),this.restriction.set("groupId",_.lA.All),this.restrictedVideoDataService.deleteVideoRestriction(this.options.videoId,(function(){return e.triggerMethod("hide")})),this.logAction())}},{key:"logAction",value:function(e){var t={location:l.LZ.Popup,actionType:l.Vw.SetAccess,entity:l.py.Video,workflowPhase:l.eu.Complete},n={id:this.model.get("id"),restriction:!!o.isNumber(e)&&_.lA[e]};s.k.logUserAction(n,t)}},{key:"dataFetched",value:function(){return!!this.model&&!!this.restrictedObjectCollection}},{key:"renderDropdown",value:function(){var e=this;this.collection=new c.Q.FE([{name:ce.None},{name:ce.Students},{name:ce.Groups},{name:ce.All}]),this.collection.each((function(t){return t.set("selected",t.get("name")===e.selected)})),this.showChildView("dropdown",new P({titleProperty:"name",eventName:"dropdown:selected",buttonId:"select-btn",collection:this.collection,channelName:this.channelName,buttonClass:q.selectButton,displayOptions:{extraClasses:"w-100"},analyticsHelper:s.k}))}},{key:"requiredResources",get:function(){return{config:A.p.config,currentUser:N.K.currentUser}}},{key:"onBeforeRender",value:function(){var e=this;this.model||this.videoDataService.getUnionVideo(this.options.videoId,this.options.typeId,(function(t){e.model=t,e.render()})),this.restrictedObjectCollection||this.restrictedVideoDataService.getVideoRestrictions([this.options.videoId],null,(function(t){e.restrictedObjectCollection=t,e.render()})),this.dataFetched()&&(this.refreshRestriction(),this.spinnerModel.set(T.ZV.Disabled,!1))}},{key:"viewOptions",value:function(){return{styles:q,supportUrl:!R.g.hasLite&&p.o.getOnlineArticle(a.s.VideoAccess),svg:d.Nj.getSvg(d.vn.Info),dataFetched:this.dataFetched(),spinnerEl:b.Kp.getSpinner({size:b.Ey.Large,extraClasses:"mx-auto"}),restrictFromLabel:u.T.getPhrase(this.lang,"popupSubheading")}}},{key:"onRender",value:function(){this.dataFetched()&&(this.renderDropdown(),this.onOptionSelected(new c.Q.Hn({name:this.selected})))}}],h&&ye(n.prototype,h),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,h}(c.Q.G7)},28492:function(e,t,n){var r=n(31197);e.exports=(r.default||r).template({1:function(e,t,n,r,o){e.propertyIsEnumerable;var i,u=e.lambda,c=e.escapeExpression;return'<label for="'+c(u(null!=(i=null!=t?t.options:t)?i.buttonId:i,t))+'" class="control-label">'+c(u(null!=(i=null!=t?t.options:t)?i.labelText:i,t))+"</label>\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){e.propertyIsEnumerable;var i,u=e.lambda,c=e.escapeExpression;return(null!=(i=n.if.call(null!=t?t:e.nullContext||{},null!=(i=null!=t?t.options:t)?i.labelText:i,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o}))?i:"")+'<button class="dropdown-toggle form-control text-start '+c(u(null!=(i=null!=t?t.options:t)?i.buttonClass:i,t))+'" type="button" id="'+c(u(null!=(i=null!=t?t.options:t)?i.buttonId:i,t))+'" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">\n '+c(u(null!=(i=null!=t?t.options:t)?i.selected:i,t))+'\n</button>\n<div class="dropdown-menu-region"></div>'},useData:!0})},59047:function(e,t,n){var r=n(31197);e.exports=(r.default||r).template({1:function(e,t,n,r,o){var i;return e.propertyIsEnumerable,(null!=(i=e.lambda(null!=(i=null!=t?t.options:t)?i.spinnerEl:i,t))?i:"")+"\n"},3:function(e,t,n,r,o){e.propertyIsEnumerable;var i,u=e.lambda,c=e.escapeExpression;return'<div class="d-flex align-items-center">\n<label class="control-label m-0 pb-2">'+c(u(null!=(i=null!=t?t.options:t)?i.restrictFromLabel:i,t))+"</label>\n"+(null!=(i=n.if.call(null!=t?t:e.nullContext||{},null!=(i=null!=t?t.options:t)?i.supportUrl:i,{name:"if",hash:{},fn:e.program(4,o,0),inverse:e.noop,data:o}))?i:"")+'</div>\n<div class="dropdown-region '+c(u(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.select:i,t))+' mb-3"></div>\n<div class="access-view-region"></div>\n'},4:function(e,t,n,r,o){e.propertyIsEnumerable;var i,u=e.lambda,c=e.escapeExpression;return'<a \n class="d-inline-block ms-1 mb-3 '+c(u(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.svgContainer:i,t))+'"\n title="'+c((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"findOutMore",{name:"lang",hash:{},data:o}))+'"\n href="'+c(u(null!=(i=null!=t?t.options:t)?i.supportUrl:i,t))+'" \n target="_blank"\n>\n '+(null!=(i=u(null!=(i=null!=t?t.options:t)?i.svg:i,t))?i:"")+"\n</a>\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var i;return e.propertyIsEnumerable,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})},26033:function(e,t,n){var r=n(31197);e.exports=(r.default||r).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){return'<div class="year-group-region"></div>\n<div name="year" class="mt-3"></div>'},useData:!0})}}]);