@clickview/library-editor 1.54.1-dev.0 → 1.55.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 (166) hide show
  1. package/dist/bundles.json +3 -3
  2. package/dist/css/{4001-library-editor-da87291909.chunk.css → 4001-library-editor-f6d2f9fb58.chunk.css} +1 -1
  3. package/dist/css/{library-editor-app-08d619de95.css → library-editor-app-bcca987662.css} +1 -1
  4. package/dist/languages/en.json +1 -1
  5. package/dist/scripts/101-8f41923234.chunk.js +1 -0
  6. package/dist/scripts/{1010-2c4e71bac2.chunk.js → 1010-4a381a84d4.chunk.js} +1 -1
  7. package/dist/scripts/{1086-d0efa1a0ca.chunk.js → 1086-7632f7b45b.chunk.js} +1 -1
  8. package/dist/scripts/112-4f413f94c0.chunk.js +1 -0
  9. package/dist/scripts/1216-83f6fbc7be.chunk.js +1 -0
  10. package/dist/scripts/{1269-ec70091b19.chunk.js → 1269-02d8d91784.chunk.js} +1 -1
  11. package/dist/scripts/{1409-f3fea6c3c3.chunk.js → 1409-58db6bd9f7.chunk.js} +1 -1
  12. package/dist/scripts/152-808e046b1f.chunk.js +2 -0
  13. package/dist/scripts/{1703-0e6940a3c0.chunk.js → 1703-45ced13ccd.chunk.js} +1 -1
  14. package/dist/scripts/{1832-9fd96d5efe.chunk.js → 1832-6a54b38248.chunk.js} +1 -1
  15. package/dist/scripts/{1876-fc815ba31e.chunk.js → 1876-e0567188b8.chunk.js} +1 -1
  16. package/dist/scripts/1973-7a1768228d.chunk.js +1 -0
  17. package/dist/scripts/2417-7628573bf3.chunk.js +1 -0
  18. package/dist/scripts/{243-d27b3c7903.chunk.js → 243-25fcce188c.chunk.js} +1 -1
  19. package/dist/scripts/2482-ded3090c15.chunk.js +1 -0
  20. package/dist/scripts/{259-d6a4aa6694.chunk.js → 259-e24fcf8f12.chunk.js} +1 -1
  21. package/dist/scripts/{2601-d42245cb40.chunk.js → 2601-d46e5810eb.chunk.js} +1 -1
  22. package/dist/scripts/{2644-cadc6531d6.chunk.js → 2644-98304e9394.chunk.js} +1 -1
  23. package/dist/scripts/2648-0a58c0fc05.chunk.js +1 -0
  24. package/dist/scripts/{2692-b7dff9da8a.chunk.js → 2692-1ddd87476e.chunk.js} +1 -1
  25. package/dist/scripts/2802-d428814c29.chunk.js +2 -0
  26. package/dist/scripts/2802-d428814c29.chunk.js.LICENSE.txt +8 -0
  27. package/dist/scripts/{2803-026f3af7cb.chunk.js → 2803-fbb9d2439d.chunk.js} +1 -1
  28. package/dist/scripts/{2888-a406bcd564.chunk.js → 2888-c2c8b859cd.chunk.js} +1 -1
  29. package/dist/scripts/299-1a0d6a88dc.chunk.js +1 -0
  30. package/dist/scripts/{2998-a3c3a1e950.chunk.js → 2998-aae0ec14de.chunk.js} +1 -1
  31. package/dist/scripts/{3400-326dc33968.chunk.js → 3400-ebc91cde7a.chunk.js} +1 -1
  32. package/dist/scripts/343-41502b5d24.chunk.js +1 -0
  33. package/dist/scripts/{35-d04a61537f.chunk.js → 35-68aa98885c.chunk.js} +1 -1
  34. package/dist/scripts/{3551-97ac416527.chunk.js → 3551-ad62e3a403.chunk.js} +1 -1
  35. package/dist/scripts/{3639-171b53e474.chunk.js → 3639-c5cc04c72d.chunk.js} +1 -1
  36. package/dist/scripts/3746-9c62c31099.chunk.js +1 -0
  37. package/dist/scripts/376-83584040a3.chunk.js +1 -0
  38. package/dist/scripts/{3763-21a9bc8c81.chunk.js → 3763-47619f0e54.chunk.js} +1 -1
  39. package/dist/scripts/3969-c636ff3159.chunk.js +1 -0
  40. package/dist/scripts/4001-9194fbe77b.chunk.js +2 -0
  41. package/dist/scripts/4024-5bc8aa8dcd.chunk.js +1 -0
  42. package/dist/scripts/{4201-9f363cadea.chunk.js → 4201-ffd35af9cb.chunk.js} +1 -1
  43. package/dist/scripts/{4245-3680566469.chunk.js → 4245-59b4242cad.chunk.js} +1 -1
  44. package/dist/scripts/4523-55c4df85c8.chunk.js +1 -0
  45. package/dist/scripts/{4591-84bc2f21f0.chunk.js → 4591-78600e384c.chunk.js} +1 -1
  46. package/dist/scripts/{4860-7e9c7b578f.chunk.js → 4860-6001ab4e2a.chunk.js} +1 -1
  47. package/dist/scripts/5046-cb525612c6.chunk.js +1 -0
  48. package/dist/scripts/514-eeb95eba47.chunk.js +1 -0
  49. package/dist/scripts/{5173-6fe93f90b8.chunk.js → 5173-d333602893.chunk.js} +1 -1
  50. package/dist/scripts/{5286-c55bd5882c.chunk.js → 5286-7aac82c4d1.chunk.js} +1 -1
  51. package/dist/scripts/535-27d0457532.chunk.js +1 -0
  52. package/dist/scripts/{5412-abf3c7ab24.chunk.js → 5412-e2505df3a4.chunk.js} +1 -1
  53. package/dist/scripts/{5418-4cf3592f6a.chunk.js → 5418-f84d0ff359.chunk.js} +1 -1
  54. package/dist/scripts/{5424-fb9af4cac5.chunk.js → 5424-65be3c657c.chunk.js} +1 -1
  55. package/dist/scripts/5524-04583b6e40.chunk.js +1 -0
  56. package/dist/scripts/{5707-2455798bbe.chunk.js → 5707-fcb653aa7a.chunk.js} +1 -1
  57. package/dist/scripts/{5747-dc100fe944.chunk.js → 5747-674f00efcd.chunk.js} +1 -1
  58. package/dist/scripts/5850-74b0b14549.chunk.js +1 -0
  59. package/dist/scripts/5891-0864c38750.chunk.js +1 -0
  60. package/dist/scripts/{6093-c4d7d99258.chunk.js → 6093-e19df1d1fa.chunk.js} +1 -1
  61. package/dist/scripts/61-ec794cf02d.chunk.js +2 -0
  62. package/dist/scripts/{6352-9f5498c43f.chunk.js → 6352-6452f77c89.chunk.js} +1 -1
  63. package/dist/scripts/6532-48f3f080f5.chunk.js +2 -0
  64. package/dist/scripts/{6732-0223b7e084.chunk.js → 6732-85afd02f41.chunk.js} +1 -1
  65. package/dist/scripts/{6774-7d16e3a1b2.chunk.js → 6774-a002ac7253.chunk.js} +1 -1
  66. package/dist/scripts/{6788-1baf5483df.chunk.js → 6788-dc6b522995.chunk.js} +1 -1
  67. package/dist/scripts/6963-0e2bf1bde7.chunk.js +1 -0
  68. package/dist/scripts/7002-eef9319d36.chunk.js +1 -0
  69. package/dist/scripts/{7053-5f6f2bf8ee.chunk.js → 7053-35b82818eb.chunk.js} +1 -1
  70. package/dist/scripts/7071-6f7e375aaa.chunk.js +1 -0
  71. package/dist/scripts/708-c74c75f82a.chunk.js +1 -0
  72. package/dist/scripts/7153-57796cd98e.chunk.js +1 -0
  73. package/dist/scripts/{7190-b143292308.chunk.js → 7190-2b40df1e89.chunk.js} +1 -1
  74. package/dist/scripts/7295-474c754cb6.chunk.js +1 -0
  75. package/dist/scripts/{7376-e476873e22.chunk.js → 7376-e3bf3a94f9.chunk.js} +1 -1
  76. package/dist/scripts/{7408-eb04403233.chunk.js → 7408-15b5cc4a39.chunk.js} +1 -1
  77. package/dist/scripts/7827-ce63697325.chunk.js +1 -0
  78. package/dist/scripts/8113-d678e76098.chunk.js +1 -0
  79. package/dist/scripts/8130-0a0a9c4cab.chunk.js +1 -0
  80. package/dist/scripts/{8213-4d11becb33.chunk.js → 8213-6c873c853e.chunk.js} +1 -1
  81. package/dist/scripts/{8362-2712404025.chunk.js → 8362-267efdac61.chunk.js} +1 -1
  82. package/dist/scripts/8542-64733a5c92.chunk.js +1 -0
  83. package/dist/scripts/8591-149f4a2b62.chunk.js +1 -0
  84. package/dist/scripts/{8726-10013d1e22.chunk.js → 8726-2d0bc64637.chunk.js} +1 -1
  85. package/dist/scripts/{4506-e3e16c1c39.chunk.js → 8727-9077c2b877.chunk.js} +1 -1
  86. package/dist/scripts/{8762-0c818e61d0.chunk.js → 8762-be126e413d.chunk.js} +1 -1
  87. package/dist/scripts/{8906-3052c24e98.chunk.js → 8906-2ae58fb990.chunk.js} +1 -1
  88. package/dist/scripts/{8952-5dfd08cdc7.chunk.js → 8952-a9a7742f72.chunk.js} +2 -2
  89. package/dist/scripts/{9357-04700677af.chunk.js → 9357-e71ea6a34d.chunk.js} +1 -1
  90. package/dist/scripts/9369-1e706eb521.chunk.js +2 -0
  91. package/dist/scripts/9383-d58506608c.chunk.js +1 -0
  92. package/dist/scripts/{9695-8b46921478.chunk.js → 9695-636ea0ef64.chunk.js} +1 -1
  93. package/dist/scripts/{9927-1a5a65a341.chunk.js → 9927-7a935c955d.chunk.js} +1 -1
  94. package/dist/scripts/bundle-0a99cc18ef.min.js +2 -0
  95. package/dist/scripts/bundle-0a99cc18ef.min.js.LICENSE.txt +1 -0
  96. package/dist/scripts/{polyfills-e4d8584da7.min.js → polyfills-5ce436cbbe.min.js} +1 -1
  97. package/package.json +4 -4
  98. package/typings/libs/CVEvents.d.ts +13 -0
  99. package/typings/libs/CVLanguages.d.ts +24 -0
  100. package/typings/libs/LazyLoad.d.ts +30 -0
  101. package/typings/libs/LazyLoad.ts +27 -0
  102. package/typings/libs/cookiesjs.d.ts +24 -0
  103. package/typings/libs/lodash.d.ts +11 -0
  104. package/dist/scripts/101-1aa755b98b.chunk.js +0 -1
  105. package/dist/scripts/1216-9d2e314558.chunk.js +0 -1
  106. package/dist/scripts/1537-2945b91924.chunk.js +0 -1
  107. package/dist/scripts/1973-074d4e72c2.chunk.js +0 -1
  108. package/dist/scripts/209-f9e52775b1.chunk.js +0 -1
  109. package/dist/scripts/2516-0290fc7712.chunk.js +0 -1
  110. package/dist/scripts/2639-efe1222211.chunk.js +0 -2
  111. package/dist/scripts/2639-efe1222211.chunk.js.LICENSE.txt +0 -8
  112. package/dist/scripts/2648-61a84bc983.chunk.js +0 -1
  113. package/dist/scripts/2955-521e238d27.chunk.js +0 -1
  114. package/dist/scripts/299-32a1391000.chunk.js +0 -1
  115. package/dist/scripts/3746-9f89d2e526.chunk.js +0 -1
  116. package/dist/scripts/376-4d9e8d5305.chunk.js +0 -1
  117. package/dist/scripts/3969-14f58e46c8.chunk.js +0 -1
  118. package/dist/scripts/4001-5f16bcaff3.chunk.js +0 -2
  119. package/dist/scripts/4024-e76b07c207.chunk.js +0 -1
  120. package/dist/scripts/4523-e918636e67.chunk.js +0 -1
  121. package/dist/scripts/471-9ae0a7d088.chunk.js +0 -2
  122. package/dist/scripts/4984-e55e0bfa17.chunk.js +0 -1
  123. package/dist/scripts/514-9e42f33112.chunk.js +0 -2
  124. package/dist/scripts/514-9e42f33112.chunk.js.LICENSE.txt +0 -6
  125. package/dist/scripts/535-96be75b325.chunk.js +0 -1
  126. package/dist/scripts/5524-83e92242a1.chunk.js +0 -1
  127. package/dist/scripts/5698-74d4a95cab.chunk.js +0 -1
  128. package/dist/scripts/5850-21711256a9.chunk.js +0 -1
  129. package/dist/scripts/5891-1f548b9c62.chunk.js +0 -1
  130. package/dist/scripts/61-35a4e0dd3d.chunk.js +0 -2
  131. package/dist/scripts/6637-3078ed12bc.chunk.js +0 -1
  132. package/dist/scripts/6725-52d65e0d02.chunk.js +0 -2
  133. package/dist/scripts/6963-2e5edf04ac.chunk.js +0 -1
  134. package/dist/scripts/7071-9ae15d6979.chunk.js +0 -1
  135. package/dist/scripts/7153-11798dda90.chunk.js +0 -1
  136. package/dist/scripts/7295-c5ccbfe2be.chunk.js +0 -1
  137. package/dist/scripts/7416-bafece2a3d.chunk.js +0 -1
  138. package/dist/scripts/7827-53c10fe9d7.chunk.js +0 -1
  139. package/dist/scripts/8080-540165cb5c.chunk.js +0 -1
  140. package/dist/scripts/8113-eb9901344c.chunk.js +0 -1
  141. package/dist/scripts/8542-7dbc2fa676.chunk.js +0 -1
  142. package/dist/scripts/8591-920b0560e4.chunk.js +0 -1
  143. package/dist/scripts/8757-8ba60a3c5f.chunk.js +0 -2
  144. package/dist/scripts/8757-8ba60a3c5f.chunk.js.LICENSE.txt +0 -44
  145. package/dist/scripts/9077-fd1d054d31.chunk.js +0 -1
  146. package/dist/scripts/9134-8845590ece.chunk.js +0 -1
  147. package/dist/scripts/9369-cacc5f30e5.chunk.js +0 -2
  148. package/dist/scripts/9383-26ce3e3847.chunk.js +0 -1
  149. package/dist/scripts/bundle-5d010f1f12.min.js +0 -2
  150. package/dist/scripts/bundle-5d010f1f12.min.js.LICENSE.txt +0 -133
  151. package/typings/libs/cloneDeep.d.ts +0 -5
  152. /package/dist/css/{6637-library-editor-6a2d152d7d.chunk.css → 112-library-editor-6a2d152d7d.chunk.css} +0 -0
  153. /package/dist/css/{6725-library-editor-01b4461ff1.chunk.css → 152-library-editor-01b4461ff1.chunk.css} +0 -0
  154. /package/dist/css/{1537-library-editor-46f8e6e95b.chunk.css → 2417-library-editor-46f8e6e95b.chunk.css} +0 -0
  155. /package/dist/css/{209-library-editor-1b6dc45d45.chunk.css → 2482-library-editor-1b6dc45d45.chunk.css} +0 -0
  156. /package/dist/css/{2955-library-editor-d2f704c6a5.chunk.css → 343-library-editor-d2f704c6a5.chunk.css} +0 -0
  157. /package/dist/css/{9077-library-editor-765ea88cb0.chunk.css → 5046-library-editor-765ea88cb0.chunk.css} +0 -0
  158. /package/dist/css/{8080-library-editor-7ffe353138.chunk.css → 708-library-editor-7ffe353138.chunk.css} +0 -0
  159. /package/dist/css/{9134-library-editor-5a1c6fc3b4.chunk.css → 8130-library-editor-5a1c6fc3b4.chunk.css} +0 -0
  160. /package/dist/scripts/{6725-52d65e0d02.chunk.js.LICENSE.txt → 152-808e046b1f.chunk.js.LICENSE.txt} +0 -0
  161. /package/dist/scripts/{4001-5f16bcaff3.chunk.js.LICENSE.txt → 4001-9194fbe77b.chunk.js.LICENSE.txt} +0 -0
  162. /package/dist/scripts/{546-2cf4378b0c.chunk.js → 546-f770211173.chunk.js} +0 -0
  163. /package/dist/scripts/{61-35a4e0dd3d.chunk.js.LICENSE.txt → 61-ec794cf02d.chunk.js.LICENSE.txt} +0 -0
  164. /package/dist/scripts/{471-9ae0a7d088.chunk.js.LICENSE.txt → 6532-48f3f080f5.chunk.js.LICENSE.txt} +0 -0
  165. /package/dist/scripts/{8952-5dfd08cdc7.chunk.js.LICENSE.txt → 8952-a9a7742f72.chunk.js.LICENSE.txt} +0 -0
  166. /package/dist/scripts/{9369-cacc5f30e5.chunk.js.LICENSE.txt → 9369-1e706eb521.chunk.js.LICENSE.txt} +0 -0
@@ -1 +1 @@
1
- (self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[4506],{14129:function(t,e,n){"use strict";n.d(e,{U:function(){return d}});var o=n(43823),r=n(57857),i=n(31647),a=n(52076),u=n(70065),l=n(93569),c=n(91553),s=n.n(c);function p(t){return p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},p(t)}function f(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,y(o.key),o)}}function y(t){var e=function(t){if("object"!=p(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=p(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==p(e)?e:e+""}function b(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(b=function(){return!!t})()}function m(t){return m=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},m(t)}function v(t,e){return v=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},v(t,e)}var d=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e,n){return e=m(e),function(t,e){if(e&&("object"==p(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,b()?Reflect.construct(e,n||[],m(t).constructor):e.apply(t,n))}(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&v(t,e)}(e,t),n=e,(i=[{key:"name",get:function(){return"AwaitingReviewHeaderComponent"}},{key:"className",get:function(){return"d-flex justify-content-between align-items-center p-3 border-bottom"}},{key:"template",get:function(){return s()}},{key:"lang",get:function(){return"contentUpdates.awaitingReviewHeader"}},{key:"events",value:function(){return{"click .approve-all":"onClickApproveAll"}}},{key:"onClickApproveAll",value:function(){var t=this;new l.Mr(this.getApproveAllDialogOptions()).render().done((function(){return t.onConfirmApproveAll()})),this.logAction(u.eu.Start)}},{key:"onConfirmApproveAll",value:function(){o.Radio.channel(this.options.channelName).trigger("approve:all"),this.logAction(u.eu.Complete)}},{key:"getApproveAllDialogOptions",value:function(){return{title:r.T.getPhrase(this.lang,"dialogTitle"),text:r.T.getPhrase(this.lang,"dialogBody"),buttons:[{text:r.T.getPhrase(this.lang,"dialogButton"),className:"btn btn-dark",success:!0}]}}},{key:"logAction",value:function(t){var e={location:u.LZ.AwaitingReviewVideoListHeader,actionType:u.Vw.Approve,descriptor:u.yh.All,entity:u.py.Video,workflowPhase:t},n={approvedCount:this.collection.length};a.k.logUserAction(n,e)}},{key:"viewOptions",value:function(){return{videosToReview:!!this.collection.length,multipleVideos:this.collection.length>1,numVideos:this.collection.length}}}])&&f(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,i}(i.Q.wA)},7572:function(t,e,n){"use strict";n.d(e,{u:function(){return h}});var o=n(57857),r=n(31647),i=n(50997),a=n(57085),u=n(35630),l=n(39090),c=n(5181),s=n.n(c),p={tabsContainer:"PDRLS"};function f(t){return f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},f(t)}function y(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,b(o.key),o)}}function b(t){var e=function(t){if("object"!=f(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=f(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==f(e)?e:e+""}function m(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(m=function(){return!!t})()}function v(t){return v=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},v(t)}function d(t,e){return d=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},d(t,e)}var h=function(t){function e(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e,n){return e=v(e),function(t,e){if(e&&("object"==f(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,m()?Reflect.construct(e,n||[],v(t).constructor):e.apply(t,n))}(this,e,[t])}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&d(t,e)}(e,t),n=e,r=[{key:"name",get:function(){return"ContentUpdatesHeaderComponent"}},{key:"className",get:function(){return"border-bottom px-3 d-flex flex-column"}},{key:"template",get:function(){return s()}},{key:"lang",get:function(){return"contentUpdates.contentUpdatesHeader"}},{key:"regions",value:function(){return{tabs:{el:".tabs-region"},breadcrumbs:{el:".breadcrumbs-region",replaceElement:!0}}}},{key:"getTabs",value:function(){var t=l.HW;return this.options.reviewEnabled?t:t.filter((function(t){return t.name!==l.tF.AwaitingReview}))}},{key:"renderBreadcrumbs",value:function(){this.showChildView("breadcrumbs",new a.n({enableLastItemAppLink:!1,customBreadcrumbs:[{name:o.T.getPhrase(this.lang,"libraryEditor"),appLink:{application:i.OV.LIBRARY_EDITOR,action:i.eX.LibraryEditor.HOME},active:!1},{name:o.T.getPhrase(this.lang,"contentUpdates"),active:!0}]}))}},{key:"renderTabs",value:function(){var t=this.getTabs();t.length<=1||this.showChildView("tabs",new u.n({tabs:t,activeTab:this.options.activeTab,className:"border-0"}))}},{key:"viewOptions",value:function(){return{styles:p}}},{key:"onRender",value:function(){this.renderBreadcrumbs(),this.renderTabs()}}],r&&y(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(r.Q.wA)},95920:function(t,e,n){"use strict";n.d(e,{m:function(){return h}});var o=n(31647),r=n(52076),i=n(70065),a=n(25692),u=n(98985),l=n(57098),c=n(264),s=n(67732),p=n.n(s);function f(t){return f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},f(t)}function y(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,b(o.key),o)}}function b(t){var e=function(t){if("object"!=f(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=f(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==f(e)?e:e+""}function m(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(m=function(){return!!t})()}function v(t){return v=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},v(t)}function d(t,e){return d=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},d(t,e)}var h=function(t){function e(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e,n){return e=v(e),function(t,e){if(e&&("object"==f(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,m()?Reflect.construct(e,n||[],v(t).constructor):e.apply(t,n))}(this,e,[t])}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&d(t,e)}(e,t),n=e,(o=[{key:"name",get:function(){return"ContentUpdatesLeftNavComponent"}},{key:"className",get:function(){return"d-inline-block ".concat("GuWDP")}},{key:"template",get:function(){return p()}},{key:"lang",get:function(){return"contentUpdates.contentUpdatesLeftNav"}},{key:"appLinks",get:function(){return{".disable-review":{application:l.OV.CONTENT_UPDATES,action:l.eX.ContentUpdates.DISABLE_REVIEW}}}},{key:"events",value:function(){return{"click .disable-review":"onClickDisableReview"}}},{key:"onClickDisableReview",value:function(){var t={location:i.LZ.LeftNav,actionType:i.Vw.Disable,entity:i.py.CustomerSetting,descriptor:i.YK.LibraryReview,workflowPhase:i.eu.Start};r.k.logUserAction({},t)}},{key:"viewOptions",value:function(){return{supportUrl:!c.g.hasLite&&u.o.getOnlineArticle(a.s.LibraryReview)}}}])&&y(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(o.Q.wA)},82405:function(t,e,n){"use strict";n.d(e,{D:function(){return E}});var o=n(57857),r=n(31647),i=n(80758),a=n(58688),u=n(80867),l=n(57098),c=n(29457),s=n(14727),p=n.n(s),f=n(89364),y=n.n(f);function b(t){return b="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},b(t)}function m(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function v(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,h(o.key),o)}}function d(t,e,n){return e&&v(t.prototype,e),n&&v(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function h(t){var e=function(t){if("object"!=b(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=b(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==b(e)?e:e+""}function g(t,e,n){return e=O(e),function(t,e){if(e&&("object"==b(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,w()?Reflect.construct(e,n||[],O(t).constructor):e.apply(t,n))}function w(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(w=function(){return!!t})()}function O(t){return O=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},O(t)}function k(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&j(t,e)}function j(t,e){return j=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},j(t,e)}var P=function(t){function e(t){return m(this,e),g(this,e,[t])}return k(e,t),d(e,[{key:"name",get:function(){return"VideoGroupItemComponent"}},{key:"template",get:function(){return p()}},{key:"className",get:function(){return"pt-3"}},{key:"defaults",get:function(){return{videoItemComponentType:a.U.Base}}},{key:"regions",value:function(){return{videos:{el:".video-list-region",replaceElement:!0}}}},{key:"getGroupTitle",value:function(){var t=this.options.groupTitleAttr||"groupTitle";return this.model.get(t)}},{key:"viewOptions",value:function(){return{groupTitle:this.getGroupTitle()}}},{key:"onRender",value:function(){this.showChildView("videos",new u.Y({collection:this.model.videos,videosWithMetadata:this.options.videosWithMetadata,application:l.OV.CONTENT_UPDATES,collectionIdentifier:null,videoItemComponentType:this.options.videoItemComponentType,config:this.options.config,sourceMetadataOptions:this.options.sourceMetadataOptions,collectionViewChannel:this.options.collectionViewChannel,customerHasLocalCache:this.options.customerHasLocalCache,customerHasCustomLibrary:this.options.customerHasCustomLibrary,currentUser:this.options.currentUser,hasCursors:!1,showEmptyState:!0,libraries:this.options.libraries}))}}])}(r.Q.wA),C=function(t){function e(t){return m(this,e),g(this,e,[t])}return k(e,t),d(e,[{key:"name",get:function(){return"VideoGroupItemComponentCollection"}},{key:"childView",get:function(){return P}},{key:"childViewOptions",get:function(){return this.options.childOptions}}])}(r.Q.$W),E=function(t){function e(t){return m(this,e),g(this,e,[t])}return k(e,t),d(e,[{key:"name",get:function(){return"VideoGroupListComponent"}},{key:"template",get:function(){return y()}},{key:"lang",get:function(){return"contentUpdates.videoGroupList"}},{key:"defaults",get:function(){return{emptyState:c.ub.Default}}},{key:"behaviors",get:function(){return[{behaviorClass:i.o,region:"videos",type:this.options.emptyStateType,componentOptions:this.getEmptyStateComponentOptions(),emptyStateComponents:l.aW}]}},{key:"regions",value:function(){return{videos:{el:".videos-region",replaceElement:!0}}}},{key:"getEmptyStateComponentOptions",value:function(){return this.options.emptyStateType===c.ub.AwaitingReview?{heading:o.T.getPhrase(this.lang,"awaitingReviewEmptyStateHeading"),description:o.T.getPhrase(this.lang,"awaitingReviewEmptyStateBody")}:this.options.emptyStateType===c.ub.PastReleases?{heading:o.T.getPhrase(this.lang,"pastReleasesEmptyStateHeading")}:void 0}},{key:"onRender",value:function(){this.showChildView("videos",new C(this.options))}}])}(r.Q.wA)},93421:function(t,e,n){"use strict";n.d(e,{wc:function(){return y},ND:function(){return f},W2:function(){return i}});var o=n(62699),r=n.n(o),i={dragItem:"GYPuI",svgContainer:"olYDa",dragText:"O53FV"};function a(t){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},a(t)}function u(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,l(o.key),o)}}function l(t){var e=function(t){if("object"!=a(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=a(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==a(e)?e:e+""}function c(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(c=function(){return!!t})()}function s(t){return s=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},s(t)}function p(t,e){return p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},p(t,e)}var f=function(t){function e(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e,n){return e=s(e),function(t,e){if(e&&("object"==a(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,c()?Reflect.construct(e,n||[],s(t).constructor):e.apply(t,n))}(this,e,[t])}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&p(t,e)}(e,t),n=e,(o=[{key:"name",get:function(){return"DraggableItemComponent"}},{key:"template",get:function(){return r()}},{key:"className",get:function(){return"".concat(i.dragItem," p-3")}},{key:"viewOptions",value:function(){return Object.assign({styles:i},this.options)}}])&&u(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(n(31647).Q.wA),y={delay:150,cursorAt:{left:-20,top:10},refreshPositions:!0}},91553:function(t,e,n){var o=n(31197);t.exports=(o.default||o).template({1:function(t,e,n,o,r){t.propertyIsEnumerable;var i,a=t.escapeExpression;return'<button class="approve-all btn btn-dark d-inline-block '+a(t.lambda(null!=(i=null!=e?e.options:e)?i.btnClass:i,e))+'" type="button">'+a((n.lang||e&&e.lang||t.hooks.helperMissing).call(null!=e?e:t.nullContext||{},"approveBtn",{name:"lang",hash:{smartCount:null!=(i=null!=e?e.options:e)?i.numVideos:i},data:r}))+"</button>\n"},compiler:[8,">= 4.3.0"],main:function(t,e,n,o,r){t.propertyIsEnumerable;var i,a=t.escapeExpression,u=null!=e?e:t.nullContext||{};return'<h5 class="d-inline-block m-0 '+a(t.lambda(null!=(i=null!=e?e.options:e)?i.headingClass:i,e))+'">'+a((n.lang||e&&e.lang||t.hooks.helperMissing).call(u,"heading",{name:"lang",hash:{smartCount:null!=(i=null!=e?e.options:e)?i.numVideos:i},data:r}))+"</h5>\n"+(null!=(i=n.if.call(u,null!=(i=null!=e?e.options:e)?i.videosToReview:i,{name:"if",hash:{},fn:t.program(1,r,0),inverse:t.noop,data:r}))?i:"")},useData:!0})},5181:function(t,e,n){var o=n(31197);t.exports=(o.default||o).template({compiler:[8,">= 4.3.0"],main:function(t,e,n,o,r){t.propertyIsEnumerable;var i,a=t.escapeExpression;return'<div class="pt-3 pb-2">\n <h1 class="h3 m-0">\n '+a((n.lang||e&&e.lang||t.hooks.helperMissing).call(null!=e?e:t.nullContext||{},"contentUpdates",{name:"lang",hash:{},data:r}))+'\n </h1>\n</div>\n\n<div class="breadcrumbs-region"></div>\n<div class="tabs-region d-inline-flex align-items-end '+a(t.lambda(null!=(i=null!=(i=null!=e?e.options:e)?i.styles:i)?i.tabsContainer:i,e))+'"></div>'},useData:!0})},67732:function(t,e,n){var o=n(31197);t.exports=(o.default||o).template({1:function(t,e,n,o,r){t.propertyIsEnumerable;var i,a=null!=e?e:t.nullContext||{},u=t.hooks.helperMissing,l=t.escapeExpression;return' <p class="m-0">'+l((n.lang||e&&e.lang||u).call(a,"learnMore",{name:"lang",hash:{},data:r}))+" <a href="+l(t.lambda(null!=(i=null!=e?e.options:e)?i.supportUrl:i,e))+' target="_blank">'+l((n.lang||e&&e.lang||u).call(a,"learnMoreLink",{name:"lang",hash:{},data:r}))+"</a></p>\n"},compiler:[8,">= 4.3.0"],main:function(t,e,n,o,r){t.propertyIsEnumerable;var i,a=null!=e?e:t.nullContext||{},u=t.hooks.helperMissing,l=t.escapeExpression;return'<div class="p-3 border-bottom">\n <h5>'+l((n.lang||e&&e.lang||u).call(a,"manualReviewHeading",{name:"lang",hash:{},data:r}))+"</h5>\n <p>"+l((n.lang||e&&e.lang||u).call(a,"manualReviewBody",{name:"lang",hash:{},data:r}))+'</p>\n <button class="btn btn-outline-dark text-center disable-review" type="button">'+l((n.lang||e&&e.lang||u).call(a,"manualReviewOffBtn",{name:"lang",hash:{},data:r}))+'</button>\n</div>\n<div class="p-3 border-bottom">\n <p class="m-0">'+l((n.lang||e&&e.lang||u).call(a,"noActionDisclaimer",{name:"lang",hash:{},data:r}))+"</p>\n"+(null!=(i=n.if.call(a,null!=(i=null!=e?e.options:e)?i.supportUrl:i,{name:"if",hash:{},fn:t.program(1,r,0),inverse:t.noop,data:r}))?i:"")+"</div>"},useData:!0})},14727:function(t,e,n){var o=n(31197);t.exports=(o.default||o).template({compiler:[8,">= 4.3.0"],main:function(t,e,n,o,r){var i;return t.propertyIsEnumerable,'<h4 class="ps-3">'+t.escapeExpression(t.lambda(null!=(i=null!=e?e.options:e)?i.groupTitle:i,e))+'</h4>\n<div class="video-list-region"></div>'},useData:!0})},89364:function(t,e,n){var o=n(31197);t.exports=(o.default||o).template({compiler:[8,">= 4.3.0"],main:function(t,e,n,o,r){return'<div class="videos-region"></div>'},useData:!0})},62699:function(t,e,n){var o=n(31197);t.exports=(o.default||o).template({compiler:[8,">= 4.3.0"],main:function(t,e,n,o,r){t.propertyIsEnumerable;var i,a=t.lambda,u=t.escapeExpression;return'<span class="'+u(a(null!=(i=null!=(i=null!=e?e.options:e)?i.styles:i)?i.svgContainer:i,e))+' me-2">'+(null!=(i=a(null!=(i=null!=e?e.options:e)?i.svg:i,e))?i:"")+'</span>\n<span class="'+u(a(null!=(i=null!=(i=null!=e?e.options:e)?i.styles:i)?i.dragText:i,e))+'">'+u(a(null!=(i=null!=e?e.options:e)?i.text:i,e))+"</span>"},useData:!0})},29565:function(t,e){"use strict";e.Z={content:"utl4w",contentWithLeftNav:"K9CFZ"}}}]);
1
+ (self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[8727],{14129:function(t,e,n){"use strict";n.d(e,{U:function(){return v}});var o=n(48088),r=n(57857),i=n(31647),a=n(52076),u=n(70065),l=n(93569),c=n(91553),s=n.n(c);function p(t){return p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},p(t)}function f(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,y(o.key),o)}}function y(t){var e=function(t){if("object"!=p(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=p(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==p(e)?e:e+""}function b(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(b=function(){return!!t})()}function d(t){return d=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},d(t)}function m(t,e){return m=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},m(t,e)}var v=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e,n){return e=d(e),function(t,e){if(e&&("object"==p(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,b()?Reflect.construct(e,n||[],d(t).constructor):e.apply(t,n))}(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&m(t,e)}(e,t),n=e,(i=[{key:"name",get:function(){return"AwaitingReviewHeaderComponent"}},{key:"className",get:function(){return"d-flex justify-content-between align-items-center p-3 border-bottom"}},{key:"template",get:function(){return s()}},{key:"lang",get:function(){return"contentUpdates.awaitingReviewHeader"}},{key:"events",value:function(){return{"click .approve-all":"onClickApproveAll"}}},{key:"onClickApproveAll",value:function(){var t=this;new l.Mr(this.getApproveAllDialogOptions()).render().done((function(){return t.onConfirmApproveAll()})),this.logAction(u.eu.Start)}},{key:"onConfirmApproveAll",value:function(){o.Radio.channel(this.options.channelName).trigger("approve:all"),this.logAction(u.eu.Complete)}},{key:"getApproveAllDialogOptions",value:function(){return{title:r.T.getPhrase(this.lang,"dialogTitle"),text:r.T.getPhrase(this.lang,"dialogBody"),buttons:[{text:r.T.getPhrase(this.lang,"dialogButton"),className:"btn btn-dark",success:!0}]}}},{key:"logAction",value:function(t){var e={location:u.LZ.AwaitingReviewVideoListHeader,actionType:u.Vw.Approve,descriptor:u.yh.All,entity:u.py.Video,workflowPhase:t},n={approvedCount:this.collection.length};a.k.logUserAction(n,e)}},{key:"viewOptions",value:function(){return{videosToReview:!!this.collection.length,multipleVideos:this.collection.length>1,numVideos:this.collection.length}}}])&&f(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,i}(i.Q.wA)},7572:function(t,e,n){"use strict";n.d(e,{u:function(){return h}});var o=n(57857),r=n(31647),i=n(50997),a=n(57085),u=n(35630),l=n(39090),c=n(5181),s=n.n(c),p={tabsContainer:"PDRLS"};function f(t){return f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},f(t)}function y(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,b(o.key),o)}}function b(t){var e=function(t){if("object"!=f(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=f(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==f(e)?e:e+""}function d(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(d=function(){return!!t})()}function m(t){return m=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},m(t)}function v(t,e){return v=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},v(t,e)}var h=function(t){function e(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e,n){return e=m(e),function(t,e){if(e&&("object"==f(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,d()?Reflect.construct(e,n||[],m(t).constructor):e.apply(t,n))}(this,e,[t])}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&v(t,e)}(e,t),n=e,r=[{key:"name",get:function(){return"ContentUpdatesHeaderComponent"}},{key:"className",get:function(){return"border-bottom px-3 d-flex flex-column"}},{key:"template",get:function(){return s()}},{key:"lang",get:function(){return"contentUpdates.contentUpdatesHeader"}},{key:"regions",value:function(){return{tabs:{el:".tabs-region"},breadcrumbs:{el:".breadcrumbs-region",replaceElement:!0}}}},{key:"getTabs",value:function(){var t=l.HW;return this.options.reviewEnabled?t:t.filter((function(t){return t.name!==l.tF.AwaitingReview}))}},{key:"renderBreadcrumbs",value:function(){this.showChildView("breadcrumbs",new a.n({enableLastItemAppLink:!1,customBreadcrumbs:[{name:o.T.getPhrase(this.lang,"libraryEditor"),appLink:{application:i.OV.LIBRARY_EDITOR,action:i.eX.LibraryEditor.HOME},active:!1},{name:o.T.getPhrase(this.lang,"contentUpdates"),active:!0}]}))}},{key:"renderTabs",value:function(){var t=this.getTabs();t.length<=1||this.showChildView("tabs",new u.n({tabs:t,activeTab:this.options.activeTab,className:"border-0"}))}},{key:"viewOptions",value:function(){return{styles:p}}},{key:"onRender",value:function(){this.renderBreadcrumbs(),this.renderTabs()}}],r&&y(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(r.Q.wA)},95920:function(t,e,n){"use strict";n.d(e,{m:function(){return h}});var o=n(31647),r=n(52076),i=n(70065),a=n(25692),u=n(98985),l=n(57098),c=n(264),s=n(67732),p=n.n(s);function f(t){return f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},f(t)}function y(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,b(o.key),o)}}function b(t){var e=function(t){if("object"!=f(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=f(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==f(e)?e:e+""}function d(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(d=function(){return!!t})()}function m(t){return m=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},m(t)}function v(t,e){return v=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},v(t,e)}var h=function(t){function e(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e,n){return e=m(e),function(t,e){if(e&&("object"==f(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,d()?Reflect.construct(e,n||[],m(t).constructor):e.apply(t,n))}(this,e,[t])}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&v(t,e)}(e,t),n=e,(o=[{key:"name",get:function(){return"ContentUpdatesLeftNavComponent"}},{key:"className",get:function(){return"d-inline-block ".concat("GuWDP")}},{key:"template",get:function(){return p()}},{key:"lang",get:function(){return"contentUpdates.contentUpdatesLeftNav"}},{key:"appLinks",get:function(){return{".disable-review":{application:l.OV.CONTENT_UPDATES,action:l.eX.ContentUpdates.DISABLE_REVIEW}}}},{key:"events",value:function(){return{"click .disable-review":"onClickDisableReview"}}},{key:"onClickDisableReview",value:function(){var t={location:i.LZ.LeftNav,actionType:i.Vw.Disable,entity:i.py.CustomerSetting,descriptor:i.YK.LibraryReview,workflowPhase:i.eu.Start};r.k.logUserAction({},t)}},{key:"viewOptions",value:function(){return{supportUrl:!c.g.hasLite&&u.o.getOnlineArticle(a.s.LibraryReview)}}}])&&y(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(o.Q.wA)},82405:function(t,e,n){"use strict";n.d(e,{D:function(){return j}});var o=n(57857),r=n(31647),i=n(80758),a=n(58688),u=n(80867),l=n(57098),c=n(29457),s=n(14727),p=n.n(s),f=n(89364),y=n.n(f);function b(t){return b="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},b(t)}function d(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function m(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,h(o.key),o)}}function v(t,e,n){return e&&m(t.prototype,e),n&&m(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function h(t){var e=function(t){if("object"!=b(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=b(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==b(e)?e:e+""}function g(t,e,n){return e=k(e),function(t,e){if(e&&("object"==b(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,w()?Reflect.construct(e,n||[],k(t).constructor):e.apply(t,n))}function w(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(w=function(){return!!t})()}function k(t){return k=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},k(t)}function O(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&C(t,e)}function C(t,e){return C=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},C(t,e)}var P=function(t){function e(t){return d(this,e),g(this,e,[t])}return O(e,t),v(e,[{key:"name",get:function(){return"VideoGroupItemComponent"}},{key:"template",get:function(){return p()}},{key:"className",get:function(){return"pt-3"}},{key:"defaults",get:function(){return{videoItemComponentType:a.U.Base}}},{key:"regions",value:function(){return{videos:{el:".video-list-region",replaceElement:!0}}}},{key:"getGroupTitle",value:function(){var t=this.options.groupTitleAttr||"groupTitle";return this.model.get(t)}},{key:"viewOptions",value:function(){return{groupTitle:this.getGroupTitle()}}},{key:"onRender",value:function(){this.showChildView("videos",new u.Y({collection:this.model.videos,videosWithMetadata:this.options.videosWithMetadata,application:l.OV.CONTENT_UPDATES,collectionIdentifier:null,videoItemComponentType:this.options.videoItemComponentType,config:this.options.config,sourceMetadataOptions:this.options.sourceMetadataOptions,collectionViewChannel:this.options.collectionViewChannel,customerHasLocalCache:this.options.customerHasLocalCache,customerHasCustomLibrary:this.options.customerHasCustomLibrary,currentUser:this.options.currentUser,hasCursors:!1,showEmptyState:!0,libraries:this.options.libraries}))}}])}(r.Q.wA),T=function(t){function e(t){return d(this,e),g(this,e,[t])}return O(e,t),v(e,[{key:"name",get:function(){return"VideoGroupItemComponentCollection"}},{key:"childView",get:function(){return P}},{key:"childViewOptions",get:function(){return this.options.childOptions}}])}(r.Q.$W),j=function(t){function e(t){return d(this,e),g(this,e,[t])}return O(e,t),v(e,[{key:"name",get:function(){return"VideoGroupListComponent"}},{key:"template",get:function(){return y()}},{key:"lang",get:function(){return"contentUpdates.videoGroupList"}},{key:"defaults",get:function(){return{emptyState:c.ub.Default}}},{key:"behaviors",get:function(){return[{behaviorClass:i.o,region:"videos",type:this.options.emptyStateType,componentOptions:this.getEmptyStateComponentOptions(),emptyStateComponents:l.aW}]}},{key:"regions",value:function(){return{videos:{el:".videos-region",replaceElement:!0}}}},{key:"getEmptyStateComponentOptions",value:function(){return this.options.emptyStateType===c.ub.AwaitingReview?{heading:o.T.getPhrase(this.lang,"awaitingReviewEmptyStateHeading"),description:o.T.getPhrase(this.lang,"awaitingReviewEmptyStateBody")}:this.options.emptyStateType===c.ub.PastReleases?{heading:o.T.getPhrase(this.lang,"pastReleasesEmptyStateHeading")}:void 0}},{key:"onRender",value:function(){this.showChildView("videos",new T(this.options))}}])}(r.Q.wA)},91553:function(t,e,n){var o=n(32227);t.exports=(o.default||o).template({1:function(t,e,n,o,r){t.propertyIsEnumerable;var i,a=t.escapeExpression;return'<button class="approve-all btn btn-dark d-inline-block '+a(t.lambda(null!=(i=null!=e?e.options:e)?i.btnClass:i,e))+'" type="button">'+a((n.lang||e&&e.lang||t.hooks.helperMissing).call(null!=e?e:t.nullContext||{},"approveBtn",{name:"lang",hash:{smartCount:null!=(i=null!=e?e.options:e)?i.numVideos:i},data:r}))+"</button>\n"},compiler:[8,">= 4.3.0"],main:function(t,e,n,o,r){t.propertyIsEnumerable;var i,a=t.escapeExpression,u=null!=e?e:t.nullContext||{};return'<h5 class="d-inline-block m-0 '+a(t.lambda(null!=(i=null!=e?e.options:e)?i.headingClass:i,e))+'">'+a((n.lang||e&&e.lang||t.hooks.helperMissing).call(u,"heading",{name:"lang",hash:{smartCount:null!=(i=null!=e?e.options:e)?i.numVideos:i},data:r}))+"</h5>\n"+(null!=(i=n.if.call(u,null!=(i=null!=e?e.options:e)?i.videosToReview:i,{name:"if",hash:{},fn:t.program(1,r,0),inverse:t.noop,data:r}))?i:"")},useData:!0})},5181:function(t,e,n){var o=n(32227);t.exports=(o.default||o).template({compiler:[8,">= 4.3.0"],main:function(t,e,n,o,r){t.propertyIsEnumerable;var i,a=t.escapeExpression;return'<div class="pt-3 pb-2">\n <h1 class="h3 m-0">\n '+a((n.lang||e&&e.lang||t.hooks.helperMissing).call(null!=e?e:t.nullContext||{},"contentUpdates",{name:"lang",hash:{},data:r}))+'\n </h1>\n</div>\n\n<div class="breadcrumbs-region"></div>\n<div class="tabs-region d-inline-flex align-items-end '+a(t.lambda(null!=(i=null!=(i=null!=e?e.options:e)?i.styles:i)?i.tabsContainer:i,e))+'"></div>'},useData:!0})},67732:function(t,e,n){var o=n(32227);t.exports=(o.default||o).template({1:function(t,e,n,o,r){t.propertyIsEnumerable;var i,a=null!=e?e:t.nullContext||{},u=t.hooks.helperMissing,l=t.escapeExpression;return' <p class="m-0">'+l((n.lang||e&&e.lang||u).call(a,"learnMore",{name:"lang",hash:{},data:r}))+" <a href="+l(t.lambda(null!=(i=null!=e?e.options:e)?i.supportUrl:i,e))+' target="_blank">'+l((n.lang||e&&e.lang||u).call(a,"learnMoreLink",{name:"lang",hash:{},data:r}))+"</a></p>\n"},compiler:[8,">= 4.3.0"],main:function(t,e,n,o,r){t.propertyIsEnumerable;var i,a=null!=e?e:t.nullContext||{},u=t.hooks.helperMissing,l=t.escapeExpression;return'<div class="p-3 border-bottom">\n <h5>'+l((n.lang||e&&e.lang||u).call(a,"manualReviewHeading",{name:"lang",hash:{},data:r}))+"</h5>\n <p>"+l((n.lang||e&&e.lang||u).call(a,"manualReviewBody",{name:"lang",hash:{},data:r}))+'</p>\n <button class="btn btn-outline-dark text-center disable-review" type="button">'+l((n.lang||e&&e.lang||u).call(a,"manualReviewOffBtn",{name:"lang",hash:{},data:r}))+'</button>\n</div>\n<div class="p-3 border-bottom">\n <p class="m-0">'+l((n.lang||e&&e.lang||u).call(a,"noActionDisclaimer",{name:"lang",hash:{},data:r}))+"</p>\n"+(null!=(i=n.if.call(a,null!=(i=null!=e?e.options:e)?i.supportUrl:i,{name:"if",hash:{},fn:t.program(1,r,0),inverse:t.noop,data:r}))?i:"")+"</div>"},useData:!0})},14727:function(t,e,n){var o=n(32227);t.exports=(o.default||o).template({compiler:[8,">= 4.3.0"],main:function(t,e,n,o,r){var i;return t.propertyIsEnumerable,'<h4 class="ps-3">'+t.escapeExpression(t.lambda(null!=(i=null!=e?e.options:e)?i.groupTitle:i,e))+'</h4>\n<div class="video-list-region"></div>'},useData:!0})},89364:function(t,e,n){var o=n(32227);t.exports=(o.default||o).template({compiler:[8,">= 4.3.0"],main:function(t,e,n,o,r){return'<div class="videos-region"></div>'},useData:!0})},29565:function(t,e){"use strict";e.Z={content:"utl4w",contentWithLeftNav:"K9CFZ"}}}]);
@@ -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(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(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(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
+ (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 +1 @@
1
- (self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[8906],{11224:function(e,t,n){"use strict";n.r(t),n.d(t,{AddToExchangeView:function(){return j}});var r=n(21186),o=n(21679),i=n(57857),l=n(68003),u=n(31647),a=n(25692),c=n(98985),s=n(10101),f=n(88172),p=n(20072),d=n(57098),y=n(67670),b=n(48404),h=n(93569),v=n(264),m=n(28274),g=n.n(m);function w(e){return w="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},w(e)}function k(e,t){for(var n=0;n<t.length;n++){var 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"!=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 x(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(x=function(){return!!e})()}function S(e){return S=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},S(e)}function E(e,t){return E=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},E(e,t)}var j=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"==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,x()?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&&E(e,t)}(t,e),n=t,u=[{key:"initialize",value:function(){this.libraryDataService=o.u.getInstance(d.Or.Library,this),this.videoDataService=o.u.getInstance(d.Or.Video,this),this.alertService=o.u.getInstance(d.K9.Alerts,this),this.listenTo(d.Vk.LIBRARY,"exchange:".concat(10,":sync"),this.render),this.listenTo(this.channelName,"folder:selected",this.onFolderSelected)}},{key:"name",get:function(){return"AddToExchangeView"}},{key:"lang",get:function(){return"libraryEditor.addToExchange"}},{key:"title",get:function(){return!1}},{key:"template",get:function(){return g()}},{key:"channelName",get:function(){return h.N0.generateUniqueChannelName(this)}},{key:"folderTreeKey",get:function(){return"folderselect:".concat(this.cid)}},{key:"regions",value:function(){return{folderDropdown:".folder-dropdown-region"}}},{key:"behaviors",get:function(){var e=this;return[{behaviorClass:s.Yw,title:i.T.getPhrase(this.lang,"heading"),spinnerButtonOptions:{model:this.spinnerModel=new y.v,channelName:this.channelName,buttonText:i.T.getPhrase(this.lang,"add"),onClick:function(t){return e.onClickSubmit(t)}}}]}},{key:"getExchange",value:function(){return this.exchangeLibraries.first()}},{key:"onClickSubmit",value:function(e){var t=this;e&&e.preventDefault(),this.spinnerModel.set(f.ZV.ShowSpinner,!0),this.videoDataService.copyVideo(this.options.videoId,this.getExchange().get("id"),this.folder.get("id"),(function(){t.alertService.createAlert({heading:"Request submitted",message:"We will notify you once your Exchange request has been approved",type:r.NK.Success}),t.triggerMethod("hide")}))}},{key:"onFolderSelected",value:function(e){this.folder=e,this.spinnerModel.set(f.ZV.Disabled,!1),h.PU.setSelected(this.folderTreeKey,e,this.getExchange().children)}},{key:"requiredResources",get:function(){return{config:b.p.config}}},{key:"onBeforeRender",value:function(){this.exchangeLibraries=this.libraryDataService.getExchange(10)}},{key:"onRender",value:function(){this.exchangeLibraries&&this.showChildView("folderDropdown",new p.Y({collection:this.getExchange().children,channelName:this.channelName,folderTreeKey:this.folderTreeKey}))}},{key:"viewOptions",value:function(){return{foldersLoaded:!!this.exchangeLibraries,guidelinesUrl:v.g.hasLite?c.o.getLiteArticle(a.b.ContentGuidelines):l._.safeUrlConcat(this.config.get("onlineUrl"),"/exchange/community-guidelines"),spinnerEl:h.Kp.getSpinner({size:h.Ey.Large,extraClasses:"mx-auto"})}}}],u&&k(n.prototype,u),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,u}(u.Q.G7)},20072:function(e,t,n){"use strict";n.d(t,{Y:function(){return v}});var r=n(43823),o=n(57857),i=n(31647),l=n(50299),u=n(93569),a=n(68979),c=n.n(a),s={selectBtn:"tZUtI",list:"MxlSt",selector:"qHvbU",maxHeight:"jp36d",customItem:"aJzJB"};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 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,d(r.key),r)}}function d(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 y(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(y=function(){return!!e})()}function b(e){return b=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},b(e)}function h(e,t){return h=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},h(e,t)}var v=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=b(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,y()?Reflect.construct(t,n||[],b(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&&h(e,t)}(t,e),n=t,i=[{key:"initialize",value:function(){this.listenTo(this.options.channelName,"folder:selected new:folder:selected",this.setButtonText),this.listenTo(this.options.channelName,"re:render:selector",this.renderSelector),this.disabledIds=this.options.disabledIds&&this.options.disabledIds.reduce((function(e,t){return Object.assign(Object.assign({},e),(n={},o=!0,(r=d(r=t))in n?Object.defineProperty(n,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[r]=o,n));var n,r,o}),{})}},{key:"name",get:function(){return"TreeDropdownComponent"}},{key:"template",get:function(){return c()}},{key:"className",get:function(){return"position-relative"}},{key:"lang",get:function(){return"libraryEditor.treeDropdown"}},{key:"regions",value:function(){return{selector:{el:".selector-region",replaceElement:!1}}}},{key:"events",value:function(){return{"click .create-new":"onClickCreateNew"}}},{key:"defaults",get:function(){return{disabledIds:[]}}},{key:"elements",get:function(){return{button:".button-text"}}},{key:"onClickCreateNew",value:function(e){e.preventDefault(),r.Radio.channel(this.options.channelName).trigger("create:folder:clicked")}},{key:"setButtonText",value:function(e,t){if(e&&!t){var n=e.get("name");this.getUI("button").text(n)}else{var r=u.PU.getSelected(this.options.folderTreeKey,this.collection),i=r?r.get("name"):o.T.getPhrase(this.lang,"button");this.getUI("button").text(i)}}},{key:"renderSelector",value:function(){this.showChildView("selector",new l.J({styles:s,collection:this.collection,channelName:this.options.channelName,childrenProperty:"children",folderTreeId:this.options.folderTreeKey,extraClass:s.list,isSelector:!0,disabledIds:this.disabledIds||{}}))}},{key:"viewOptions",value:function(){return{styles:s,name:this.options.name||this.options.channelName,buttonText:this.buttonText,canCreateNew:this.options.canCreateNew,dropdown:this.options.dropdown}}},{key:"onRender",value:function(){this.setButtonText(),this.renderSelector()}}],i&&p(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,i}(i.Q.wA)},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 l(e,t,n){return(t=a(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,a(r.key),r)}}function a(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 c(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(c=function(){return!!e})()}function s(e){return s=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},s(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=s(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,c()?Reflect.construct(t,n||[],s(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 l(l({},o.ZV.Disabled,!0),o.ZV.Hidden,!1)}}])&&u(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(r.Q.Hn)},28274: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,'<div class="alert alert-info" role="alert">\n The ClickView Exchange is a community for educators, read our <a class="info-link" href="'+e.escapeExpression(e.lambda(null!=(i=null!=t?t.options:t)?i.guidelinesUrl:i,t))+'" target="_blank">community guidelines</a> and let\'s ensure that we keep the Exchange a place we\'re proud of!\n</div>\n<p>After you submit your video to the Exchange, we will review it and notify you when your video has been made available.</p>\n<div class="form-group">\n <label>Select a folder</label>\n <div class="folder-dropdown-region"></div>\n</div>\n'},3:function(e,t,n,r,o){var i;return e.propertyIsEnumerable," "+(null!=(i=e.lambda(null!=(i=null!=t?t.options:t)?i.spinnerEl:i,t))?i:"")+"\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var i;return e.propertyIsEnumerable,null!=(i=n.if.call(null!=t?t:e.nullContext||{},null!=(i=null!=t?t.options:t)?i.foldersLoaded:i,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.program(3,o,0),data:o}))?i:""},useData:!0})},68979: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,l=e.lambda,u=e.escapeExpression;return' <button\n class="'+u(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.selectBtn:i,t))+' form-select form-control"\n data-bs-toggle="dropdown"\n aria-haspopup="true"\n aria-expanded="false"\n name='+u(l(null!=(i=null!=t?t.options:t)?i.name:i,t))+'\n >\n <span class="d-block text-truncate button-text">\n '+u(l(null!=(i=null!=t?t.options:t)?i.buttonText:i,t))+'\n </span>\n </button>\n<div class="dropdown-menu '+u(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.selector:i,t))+'">\n'},3:function(e,t,n,r,o){var i;return e.propertyIsEnumerable,"border rounded-3 "+e.escapeExpression(e.lambda(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.maxHeight:i,t))},5:function(e,t,n,r,o){e.propertyIsEnumerable;var i,l=e.escapeExpression;return' <button class="create-new btn fw-bold rounded-0 rounded-bottom-lg w-100 text-start '+l(e.lambda(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.customItem:i,t))+'">'+l((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"createNew",{name:"lang",hash:{},data:o}))+"</button>\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){e.propertyIsEnumerable;var i,l=null!=t?t:e.nullContext||{};return(null!=(i=n.if.call(l,null!=(i=null!=t?t.options:t)?i.dropdown:i,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o}))?i:"")+'<div class="'+(null!=(i=n.unless.call(l,null!=(i=null!=t?t.options:t)?i.dropdown:i,{name:"unless",hash:{},fn:e.program(3,o,0),inverse:e.noop,data:o}))?i:"")+' overflow-auto" name='+e.escapeExpression(e.lambda(null!=(i=null!=t?t.options:t)?i.name:i,t))+'>\n <div class="selector-region"></div>\n'+(null!=(i=n.if.call(l,null!=(i=null!=t?t.options:t)?i.canCreateNew:i,{name:"if",hash:{},fn:e.program(5,o,0),inverse:e.noop,data:o}))?i:"")+'</div>\n<div class="form-feedback"></div>'},useData:!0})}}]);
1
+ (self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[8906],{11224:function(e,t,n){"use strict";n.r(t),n.d(t,{AddToExchangeView:function(){return j}});var r=n(21186),o=n(21679),i=n(57857),l=n(68003),u=n(31647),a=n(25692),c=n(98985),s=n(10101),f=n(88172),p=n(20072),d=n(57098),y=n(67670),b=n(48404),h=n(93569),v=n(264),m=n(28274),g=n.n(m);function w(e){return w="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},w(e)}function k(e,t){for(var n=0;n<t.length;n++){var 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"!=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 x(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(x=function(){return!!e})()}function S(e){return S=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},S(e)}function E(e,t){return E=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},E(e,t)}var j=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"==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,x()?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&&E(e,t)}(t,e),n=t,u=[{key:"initialize",value:function(){this.libraryDataService=o.u.getInstance(d.Or.Library,this),this.videoDataService=o.u.getInstance(d.Or.Video,this),this.alertService=o.u.getInstance(d.K9.Alerts,this),this.listenTo(d.Vk.LIBRARY,"exchange:".concat(10,":sync"),this.render),this.listenTo(this.channelName,"folder:selected",this.onFolderSelected)}},{key:"name",get:function(){return"AddToExchangeView"}},{key:"lang",get:function(){return"libraryEditor.addToExchange"}},{key:"title",get:function(){return!1}},{key:"template",get:function(){return g()}},{key:"channelName",get:function(){return h.N0.generateUniqueChannelName(this)}},{key:"folderTreeKey",get:function(){return"folderselect:".concat(this.cid)}},{key:"regions",value:function(){return{folderDropdown:".folder-dropdown-region"}}},{key:"behaviors",get:function(){var e=this;return[{behaviorClass:s.Yw,title:i.T.getPhrase(this.lang,"heading"),spinnerButtonOptions:{model:this.spinnerModel=new y.v,channelName:this.channelName,buttonText:i.T.getPhrase(this.lang,"add"),onClick:function(t){return e.onClickSubmit(t)}}}]}},{key:"getExchange",value:function(){return this.exchangeLibraries.first()}},{key:"onClickSubmit",value:function(e){var t=this;e&&e.preventDefault(),this.spinnerModel.set(f.ZV.ShowSpinner,!0),this.videoDataService.copyVideo(this.options.videoId,this.getExchange().get("id"),this.folder.get("id"),(function(){t.alertService.createAlert({heading:"Request submitted",message:"We will notify you once your Exchange request has been approved",type:r.NK.Success}),t.triggerMethod("hide")}))}},{key:"onFolderSelected",value:function(e){this.folder=e,this.spinnerModel.set(f.ZV.Disabled,!1),h.PU.setSelected(this.folderTreeKey,e,this.getExchange().children)}},{key:"requiredResources",get:function(){return{config:b.p.config}}},{key:"onBeforeRender",value:function(){this.exchangeLibraries=this.libraryDataService.getExchange(10)}},{key:"onRender",value:function(){this.exchangeLibraries&&this.showChildView("folderDropdown",new p.Y({collection:this.getExchange().children,channelName:this.channelName,folderTreeKey:this.folderTreeKey}))}},{key:"viewOptions",value:function(){return{foldersLoaded:!!this.exchangeLibraries,guidelinesUrl:v.g.hasLite?c.o.getLiteArticle(a.b.ContentGuidelines):l._.safeUrlConcat(this.config.get("onlineUrl"),"/exchange/community-guidelines"),spinnerEl:h.Kp.getSpinner({size:h.Ey.Large,extraClasses:"mx-auto"})}}}],u&&k(n.prototype,u),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,u}(u.Q.G7)},20072:function(e,t,n){"use strict";n.d(t,{Y:function(){return v}});var r=n(48088),o=n(57857),i=n(31647),l=n(50299),u=n(93569),a=n(68979),c=n.n(a),s={selectBtn:"tZUtI",list:"MxlSt",selector:"qHvbU",maxHeight:"jp36d",customItem:"aJzJB"};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 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,d(r.key),r)}}function d(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 y(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(y=function(){return!!e})()}function b(e){return b=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},b(e)}function h(e,t){return h=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},h(e,t)}var v=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=b(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,y()?Reflect.construct(t,n||[],b(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&&h(e,t)}(t,e),n=t,i=[{key:"initialize",value:function(){this.listenTo(this.options.channelName,"folder:selected new:folder:selected",this.setButtonText),this.listenTo(this.options.channelName,"re:render:selector",this.renderSelector),this.disabledIds=this.options.disabledIds&&this.options.disabledIds.reduce((function(e,t){return Object.assign(Object.assign({},e),(n={},o=!0,(r=d(r=t))in n?Object.defineProperty(n,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[r]=o,n));var n,r,o}),{})}},{key:"name",get:function(){return"TreeDropdownComponent"}},{key:"template",get:function(){return c()}},{key:"className",get:function(){return"position-relative"}},{key:"lang",get:function(){return"libraryEditor.treeDropdown"}},{key:"regions",value:function(){return{selector:{el:".selector-region",replaceElement:!1}}}},{key:"events",value:function(){return{"click .create-new":"onClickCreateNew"}}},{key:"defaults",get:function(){return{disabledIds:[]}}},{key:"elements",get:function(){return{button:".button-text"}}},{key:"onClickCreateNew",value:function(e){e.preventDefault(),r.Radio.channel(this.options.channelName).trigger("create:folder:clicked")}},{key:"setButtonText",value:function(e,t){if(e&&!t){var n=e.get("name");this.getUI("button").text(n)}else{var r=u.PU.getSelected(this.options.folderTreeKey,this.collection),i=r?r.get("name"):o.T.getPhrase(this.lang,"button");this.getUI("button").text(i)}}},{key:"renderSelector",value:function(){this.showChildView("selector",new l.J({styles:s,collection:this.collection,channelName:this.options.channelName,childrenProperty:"children",folderTreeId:this.options.folderTreeKey,extraClass:s.list,isSelector:!0,disabledIds:this.disabledIds||{}}))}},{key:"viewOptions",value:function(){return{styles:s,name:this.options.name||this.options.channelName,buttonText:this.buttonText,canCreateNew:this.options.canCreateNew,dropdown:this.options.dropdown}}},{key:"onRender",value:function(){this.setButtonText(),this.renderSelector()}}],i&&p(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,i}(i.Q.wA)},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 l(e,t,n){return(t=a(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,a(r.key),r)}}function a(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 c(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(c=function(){return!!e})()}function s(e){return s=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},s(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=s(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,c()?Reflect.construct(t,n||[],s(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 l(l({},o.ZV.Disabled,!0),o.ZV.Hidden,!1)}}])&&u(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(r.Q.Hn)},28274: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,'<div class="alert alert-info" role="alert">\n The ClickView Exchange is a community for educators, read our <a class="info-link" href="'+e.escapeExpression(e.lambda(null!=(i=null!=t?t.options:t)?i.guidelinesUrl:i,t))+'" target="_blank">community guidelines</a> and let\'s ensure that we keep the Exchange a place we\'re proud of!\n</div>\n<p>After you submit your video to the Exchange, we will review it and notify you when your video has been made available.</p>\n<div class="form-group">\n <label>Select a folder</label>\n <div class="folder-dropdown-region"></div>\n</div>\n'},3:function(e,t,n,r,o){var i;return e.propertyIsEnumerable," "+(null!=(i=e.lambda(null!=(i=null!=t?t.options:t)?i.spinnerEl:i,t))?i:"")+"\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var i;return e.propertyIsEnumerable,null!=(i=n.if.call(null!=t?t:e.nullContext||{},null!=(i=null!=t?t.options:t)?i.foldersLoaded:i,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.program(3,o,0),data:o}))?i:""},useData:!0})},68979: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,l=e.lambda,u=e.escapeExpression;return' <button\n class="'+u(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.selectBtn:i,t))+' form-select form-control"\n data-bs-toggle="dropdown"\n aria-haspopup="true"\n aria-expanded="false"\n name='+u(l(null!=(i=null!=t?t.options:t)?i.name:i,t))+'\n >\n <span class="d-block text-truncate button-text">\n '+u(l(null!=(i=null!=t?t.options:t)?i.buttonText:i,t))+'\n </span>\n </button>\n<div class="dropdown-menu '+u(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.selector:i,t))+'">\n'},3:function(e,t,n,r,o){var i;return e.propertyIsEnumerable,"border rounded-3 "+e.escapeExpression(e.lambda(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.maxHeight:i,t))},5:function(e,t,n,r,o){e.propertyIsEnumerable;var i,l=e.escapeExpression;return' <button class="create-new btn fw-bold rounded-0 rounded-bottom-lg w-100 text-start '+l(e.lambda(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.customItem:i,t))+'">'+l((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"createNew",{name:"lang",hash:{},data:o}))+"</button>\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){e.propertyIsEnumerable;var i,l=null!=t?t:e.nullContext||{};return(null!=(i=n.if.call(l,null!=(i=null!=t?t.options:t)?i.dropdown:i,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o}))?i:"")+'<div class="'+(null!=(i=n.unless.call(l,null!=(i=null!=t?t.options:t)?i.dropdown:i,{name:"unless",hash:{},fn:e.program(3,o,0),inverse:e.noop,data:o}))?i:"")+' overflow-auto" name='+e.escapeExpression(e.lambda(null!=(i=null!=t?t.options:t)?i.name:i,t))+'>\n <div class="selector-region"></div>\n'+(null!=(i=n.if.call(l,null!=(i=null!=t?t.options:t)?i.canCreateNew:i,{name:"if",hash:{},fn:e.program(5,o,0),inverse:e.noop,data:o}))?i:"")+'</div>\n<div class="form-feedback"></div>'},useData:!0})}}]);
@@ -1,2 +1,2 @@
1
- /*! For license information please see 8952-5dfd08cdc7.chunk.js.LICENSE.txt */
2
- (self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[8952],{21053:function(e,t,r){"use strict";r.d(t,{W:function(){return g}});var n=r(43823),i=r(57857),o=r(31647),a=r(57085),c=r(35630),s=r(57098),u=r(43791),l=r.n(u),h={svgContainer:"mtegw"};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 p(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,d(n.key),n)}}function d(e){var t=function(e){if("object"!=f(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=f(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==f(t)?t:t+""}function y(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(y=function(){return!!e})()}function v(e){return v=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},v(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,r){return t=v(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,y()?Reflect.construct(t,r||[],v(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,(o=[{key:"name",get:function(){return"EditVideoTabsComponent"}},{key:"className",get:function(){return"bg-white"}},{key:"regions",value:function(){return{tabs:{el:".tabs-region",replaceElement:!0},breadcrumbs:{el:".breadcrumbs-region",replaceElement:!0}}}},{key:"lang",get:function(){return"libraryEditor.editVideoTabs"}},{key:"template",get:function(){return l()}},{key:"viewOptions",value:function(){return{styles:h}}},{key:"onSave",value:function(){n.Radio.channel(s.OV.LIBRARY_EDITOR).trigger(s.eX.LibraryEditor.SAVE_VIDEO)}},{key:"getLocationBreadcrumb",value:function(){switch(this.options.context){case"edit":return{name:i.T.getPhrase(this.lang,"videoDetails")};case"chapters":return{name:i.T.getPhrase(this.lang,"chapters")};case"resources":return{name:i.T.getPhrase(this.lang,"resources")}}}},{key:"onRender",value:function(){this.showChildView("tabs",new c.n({tabs:this.options.tabs,activeTab:this.options.activeTab})),this.showChildView("breadcrumbs",new a.n({folder:this.options.folder,libraries:this.options.libraries,video:this.model,customBreadcrumbs:[this.getLocationBreadcrumb()],enableLastItemAppLink:!1}))}}])&&p(r.prototype,o),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,o}(o.Q.wA)},61596:function(e,t,r){"use strict";r.d(t,{$:function(){return c}});var n=r(21161),i=r(57857),o=r(93569),a="libraryEditor.utils",c={isValidChapterTime:function(e,t,r,i){if(i){if(!n.isNumber(t))return s.StartTime.Invalid();if(t<0)return s.StartTime.Invalid();if(t>o.X4.millisecondsToSeconds(r))return s.StartTime.Exceeds();if(i.some((function(r){return!(r.id&&r.id===e.id||r.cid===e.cid)&&r.get("startTime")===t})))return s.StartTime.Exists()}},isValidChapterName:function(e,t,r){return t?t.length>255?s.Name.MaxLength():r.some((function(r){return!(r.id&&r.id===e.id||r.cid===e.cid)&&r.get("name").trim()===t.trim()}))?s.Name.Exists():n.isEmpty(t.trim())?s.Name.Invalid():void 0:s.Name.Invalid()}},s={Name:{Invalid:function(){return i.T.getPhrase(a,"chapterNameInvalid")},Exists:function(){return i.T.getPhrase(a,"chapterNameExists")},MaxLength:function(){return i.T.getPhrase(a,"chapterNameExceeds")}},StartTime:{Invalid:function(){return i.T.getPhrase(a,"chapterStartTimeInvalid")},Exists:function(){return i.T.getPhrase(a,"chapterStartTimeExists")},Exceeds:function(){return i.T.getPhrase(a,"chapterStartTimeExceeds")}}}},16704:function(e,t,r){"use strict";r.r(t),r.d(t,{EditChaptersView:function(){return A}});var n=r(99748),i=r(21679),o=r(57857),a=r(31647),c=r(52076),s=r(70065),u=r(59054),l=r(13156),h=r(57e3),f=r(89167),p=r(57098),d=r(29457),y=r(74749),v=r(48404),m=r(19226),g=r(93569),b=r(264),w=r(45114),E=r(70693),T=r(21053),k=r(40622),C=r(56906),O=r(95061),S=r(61159),L=r.n(S);function P(e){return P="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},P(e)}function x(){x=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function u(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,r){return e[t]=r}}function l(e,t,r,n){var o=t&&t.prototype instanceof m?t:m,a=Object.create(o.prototype),c=new j(n||[]);return i(a,"_invoke",{value:S(e,r,c)}),a}function h(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=l;var f="suspendedStart",p="suspendedYield",d="executing",y="completed",v={};function m(){}function g(){}function b(){}var w={};u(w,a,(function(){return this}));var E=Object.getPrototypeOf,T=E&&E(E(N([])));T&&T!==r&&n.call(T,a)&&(w=T);var k=b.prototype=m.prototype=Object.create(w);function C(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function O(e,t){function r(i,o,a,c){var s=h(e[i],e,o);if("throw"!==s.type){var u=s.arg,l=u.value;return l&&"object"==P(l)&&n.call(l,"__await")?t.resolve(l.__await).then((function(e){r("next",e,a,c)}),(function(e){r("throw",e,a,c)})):t.resolve(l).then((function(e){u.value=e,a(u)}),(function(e){return r("throw",e,a,c)}))}c(s.arg)}var o;i(this,"_invoke",{value:function(e,n){function i(){return new t((function(t,i){r(e,n,t,i)}))}return o=o?o.then(i,i):i()}})}function S(t,r,n){var i=f;return function(o,a){if(i===d)throw Error("Generator is already running");if(i===y){if("throw"===o)throw a;return{value:e,done:!0}}for(n.method=o,n.arg=a;;){var c=n.delegate;if(c){var s=L(c,n);if(s){if(s===v)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===f)throw i=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=d;var u=h(t,r,n);if("normal"===u.type){if(i=n.done?y:p,u.arg===v)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(i=y,n.method="throw",n.arg=u.arg)}}}function L(t,r){var n=r.method,i=t.iterator[n];if(i===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,L(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),v;var o=h(i,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,v;var a=o.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,v):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function V(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function _(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function j(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(V,this),this.reset(!0)}function N(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function r(){for(;++i<t.length;)if(n.call(t,i))return r.value=t[i],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(P(t)+" is not iterable")}return g.prototype=b,i(k,"constructor",{value:b,configurable:!0}),i(b,"constructor",{value:g,configurable:!0}),g.displayName=u(b,s,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===g||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,u(e,s,"GeneratorFunction")),e.prototype=Object.create(k),e},t.awrap=function(e){return{__await:e}},C(O.prototype),u(O.prototype,c,(function(){return this})),t.AsyncIterator=O,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var a=new O(l(e,r,n,i),o);return t.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},C(k),u(k,s,"Generator"),u(k,a,(function(){return this})),u(k,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=N,j.prototype={constructor:j,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(_),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function i(n,i){return c.type="throw",c.arg=t,r.next=n,i&&(r.method="next",r.arg=e),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],c=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var s=n.call(a,"catchLoc"),u=n.call(a,"finallyLoc");if(s&&u){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,v):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),v},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),_(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var i=n.arg;_(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:N(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}function V(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function _(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,j(n.key),n)}}function j(e){var t=function(e){if("object"!=P(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=P(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==P(t)?t:t+""}function N(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(N=function(){return!!e})()}function I(e){return I=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},I(e)}function D(e,t){return D=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},D(e,t)}var A=function(e){function t(e){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,r){return t=I(t),function(e,t){if(t&&("object"==P(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,N()?Reflect.construct(t,r||[],I(e).constructor):t.apply(e,r))}(this,t,[e]))._viewKeyRequested=!1,r}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&&D(e,t)}(t,e),r=t,(S=[{key:"initialize",value:function(){this.bindListeners(),this.initializeDataServices(),g.Si.initBackButton()}},{key:"name",get:function(){return"EditVideoChaptersView"}},{key:"title",get:function(){return!!this.model&&this.model.get("name")}},{key:"lang",get:function(){return"libraryEditor.editChapters"}},{key:"channelName",get:function(){return"".concat(this.name).concat(this.cid)}},{key:"className",get:function(){return"bg-white p-3 rounded"}},{key:"template",get:function(){return L()}},{key:"regions",value:function(){return{tabs:{el:".tab-region",partialLoading:d.LP.EditVideoTabs},webplayer:{replaceElement:!0,el:".webplayer-region",partialLoading:d.LP.WebPlayer},addChapter:{replaceElement:!0,el:".add-chapter-region",partialLoading:d.LP.EditVideoChaptersForm},chapterList:{replaceElement:!0,el:".chapter-list-region",partialLoading:d.LP.EditVideoChapterList}}}},{key:"bindListeners",value:function(){this.listenTo(p.Vk.VIDEO,"".concat(p.M_.VIDEOS,":").concat(this.options.videoId,":sync"),this.render),this.listenTo(p.Vk.VIDEO,"".concat(p.M_.VIDEOS,":").concat(this.options.videoId,":error"),this.onVideoDataError),this.listenTo(this.channelName,k.NT.CreateChapter,this.onCreateChapter),this.listenTo(this.channelName,k.NT.UpdateChapter,this.onUpdateChapter),this.listenTo(this.channelName,k.NT.DeleteChapter,this.onDeleteChapter),this.listenTo(this.channelName,k.NT.UpdateChapterTime,this.onTimeInputUpdate),this.listenTo(this.channelName,k.NT.SeekToChapter,this.onSeekToChapter)}},{key:"initializeDataServices",value:function(){this.videoDataService=i.u.getInstance(p.Or.Video,this),this.chapterDataService=i.u.getInstance(p.Or.Chapter,this),this.playerDataService=i.u.getInstance(p.Or.Player,this)}},{key:"onVideoDataError",value:function(e){switch(e.type){case n.h.NotFound:a.Q.Ry.throw(new C.l1);break;case n.h.Forbidden:a.Q.Ry.throw(new C.aV)}}},{key:"updateChapters",value:function(){var e=this;if(b.g.hasLite){var t=this.chapters.toJSON().reverse().reduce((function(t,r){var n=t[t.length-1];return[].concat(function(e){return function(e){if(Array.isArray(e))return V(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 V(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?V(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.")}()}(t),[{timestamp:r.startTime,endTimestamp:(null==n?void 0:n.timestamp)||e.player.duration(),name:r.name}])}),[]).reverse();this.player.setChapters(t)}}},{key:"onCreateChapter",value:function(e){0===this.chapters.length&&0!==e.startTime&&this.createChapter({name:o.T.getPhrase(this.lang,"intro"),startTime:0}),this.createChapter(e)}},{key:"createChapter",value:function(e){var t=this,r=new y.W(e);this.chapters.add(r),r.set("loading",!0),this.chapterDataService.createChapter(this.model.get("id"),e.name,e.startTime,(function(e){r.set(e.toJSON(),{silent:!0}),r.set("loading",!1),t.chapters.sort(),t.renderChapterForm(),t.updateChapters(),t.logAction(e,s.Vw.Create)}))}},{key:"onUpdateChapter",value:function(e){var t=this,r=this.chapters.find((function(t){return t.get("id")===e.id}));r.set("loading",!0);var n=l.J.updatedChaptersAlert(this.model.get("name"));this.chapterDataService.updateChapter(r.id,e.name,e.startTime,(function(e){r.set(e.toJSON(),{silent:!0}),r.set("loading",!1),t.chapters.sort(),t.updateChapters(),t.logAction(e,s.Vw.Edit)}),n)}},{key:"onDeleteChapter",value:function(e){var t=this;e.set("loading",!0),this.chapterDataService.deleteChapter(e.id,(function(){t.logAction(e,s.Vw.Delete),t.chapters.remove(e),t.updateChapters()}))}},{key:"onTimeInputUpdate",value:function(e){e>=0&&e<=g.X4.millisecondsToSeconds(this.model.get("duration"))&&(this.player?this.player.currentTime(e):this.webPlayer.seekTo(e))}},{key:"logAction",value:function(e,t){var r=Object.assign({videoId:this.model.get("id")},e.pick("id","name","startTime"));c.k.logUserAction(r,{actionType:t,entity:s.py.Chapter,location:s.LZ.EditVideoChapters})}},{key:"onSeekToChapter",value:function(e){return t=this,r=void 0,n=void 0,i=x().mark((function t(){var r,n;return x().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(e<0)){t.next=2;break}return t.abrupt("return");case 2:if(!this.player){t.next=9;break}return t.next=5,this.player.getChapters();case 5:return r=t.sent,n=r[e],this.player.currentTime(n.timestamp),t.abrupt("return");case 9:this.webPlayer.seekToChapter(e);case 10:case"end":return t.stop()}}),t,this)})),new(n||(n=Promise))((function(e,o){function a(e){try{s(i.next(e))}catch(e){o(e)}}function c(e){try{s(i.throw(e))}catch(e){o(e)}}function s(t){var r;t.done?e(t.value):(r=t.value,r instanceof n?r:new n((function(e){e(r)}))).then(a,c)}s((i=i.apply(t,r||[])).next())}));var t,r,n,i}},{key:"renderChapterList",value:function(){this.showChildView("chapterList",new E.Q({collection:this.chapters,duration:this.model.get("duration"),channelName:this.channelName,showActions:!0,editable:!0,showHeader:!0}))}},{key:"renderChapterForm",value:function(){this.showChildView("addChapter",new w.L({model:new y.W,collection:this.chapters,creating:!0,duration:this.model.get("duration"),channelName:this.channelName,playerViewModelKey:"".concat(p._2.NAME,"-").concat(this.model.get("id"))}))}},{key:"renderEditComponents",value:function(){this.renderChapterForm(),this.renderChapterList()}},{key:"renderTabs",value:function(){var e=g.BK.canEditVideo(this.model);this.showChildView("tabs",new T.W({model:this.model,tabs:g.Si.getEditVideoTabs(this.options.videoId,e),activeTab:".edit-chapters-applink",context:"chapters",folder:this.folder,libraries:this.libraries}))}},{key:"renderWebPlayer",value:function(){if(this.playerViewKey)return this.player=new h.l({model:this.playerViewKey,playerApiUrl:this.config.get("playerApiUrl"),channelName:this.channelName,inactivityTimeout:0}),void this.showChildView("webplayer",this.player);this.webPlayer=new f.Q({model:this.model,webPlayerUrl:this.config.get("webPlayerUrl"),captureAnalytics:!1,currentUser:this.currentUser}),this.showChildView("webplayer",this.webPlayer)}},{key:"redirectToVideoDetails",value:function(){a.Q.C$.trigger({application:p.OV.LIBRARY_EDITOR,action:p.eX.LibraryEditor.VIDEO_DETAILS,args:[this.model.get("id")]},{replace:!0})}},{key:"fetchData",value:function(){var e=this;this.model=this.videoDataService.getVideo(this.options.videoId),this.model&&(g.BK.canEditVideo(this.model)?(this.chapters=this.model.chapters,this.folder=this.model.categories.first(),b.g.hasLite&&!this._viewKeyRequested&&(this._viewKeyRequested=!0,this.playerDataService.createViewKey(this.model.get("id"),u.f.MasterObject,(function(t){e.playerViewKey=t,e.render()})))):this.redirectToVideoDetails())}},{key:"shouldRender",value:function(){return!(!this.model||b.g.hasLite&&!this.playerViewKey)}},{key:"requiredResources",get:function(){return{config:v.p.config,currentUser:m.K.currentUser,libraries:O.T.libraries}}},{key:"onBeforeRender",value:function(){return this.fetchData(),this.shouldRender()}},{key:"onRender",value:function(){this.renderTabs(),this.renderWebPlayer(),this.renderEditComponents()}}])&&_(r.prototype,S),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,S}(a.Q.G7)},43791: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){var o;return e.propertyIsEnumerable,'<h1 class="h3">\n '+e.escapeExpression("function"==typeof(o=null!=(o=r.name||(null!=t?t.name:t))?o:e.hooks.helperMissing)?o.call(null!=t?t:e.nullContext||{},{name:"name",hash:{},data:i}):o)+'\n</h2>\n<div class="breadcrumbs-region"></div>\n<div class="tabs-region ps-2"></div>'},useData:!0})},61159: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="tab-region w-100"></div>\n<div class="row">\n <div class="col-6 pt-3">\n <div class="webplayer-region"></div>\n <div class="add-chapter-region"></div>\n </div>\n <div class="col-6 mb-2 pt-3">\n <div class="chapter-list-region"></div>\n </div>\n</div>'},useData:!0})}}]);
1
+ /*! For license information please see 8952-a9a7742f72.chunk.js.LICENSE.txt */
2
+ (self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[8952],{21053:function(e,t,r){"use strict";r.d(t,{W:function(){return g}});var n=r(48088),i=r(57857),o=r(31647),a=r(57085),c=r(35630),s=r(57098),u=r(43791),l=r.n(u),h={svgContainer:"mtegw"};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 p(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,d(n.key),n)}}function d(e){var t=function(e){if("object"!=f(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=f(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==f(t)?t:t+""}function y(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(y=function(){return!!e})()}function v(e){return v=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},v(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,r){return t=v(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,y()?Reflect.construct(t,r||[],v(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,(o=[{key:"name",get:function(){return"EditVideoTabsComponent"}},{key:"className",get:function(){return"bg-white"}},{key:"regions",value:function(){return{tabs:{el:".tabs-region",replaceElement:!0},breadcrumbs:{el:".breadcrumbs-region",replaceElement:!0}}}},{key:"lang",get:function(){return"libraryEditor.editVideoTabs"}},{key:"template",get:function(){return l()}},{key:"viewOptions",value:function(){return{styles:h}}},{key:"onSave",value:function(){n.Radio.channel(s.OV.LIBRARY_EDITOR).trigger(s.eX.LibraryEditor.SAVE_VIDEO)}},{key:"getLocationBreadcrumb",value:function(){switch(this.options.context){case"edit":return{name:i.T.getPhrase(this.lang,"videoDetails")};case"chapters":return{name:i.T.getPhrase(this.lang,"chapters")};case"resources":return{name:i.T.getPhrase(this.lang,"resources")}}}},{key:"onRender",value:function(){this.showChildView("tabs",new c.n({tabs:this.options.tabs,activeTab:this.options.activeTab})),this.showChildView("breadcrumbs",new a.n({folder:this.options.folder,libraries:this.options.libraries,video:this.model,customBreadcrumbs:[this.getLocationBreadcrumb()],enableLastItemAppLink:!1}))}}])&&p(r.prototype,o),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,o}(o.Q.wA)},61596:function(e,t,r){"use strict";r.d(t,{$:function(){return c}});var n=r(39479),i=r(57857),o=r(93569),a="libraryEditor.utils",c={isValidChapterTime:function(e,t,r,i){if(i){if(!n.isNumber(t))return s.StartTime.Invalid();if(t<0)return s.StartTime.Invalid();if(t>o.X4.millisecondsToSeconds(r))return s.StartTime.Exceeds();if(i.some((function(r){return!(r.id&&r.id===e.id||r.cid===e.cid)&&r.get("startTime")===t})))return s.StartTime.Exists()}},isValidChapterName:function(e,t,r){return t?t.length>255?s.Name.MaxLength():r.some((function(r){return!(r.id&&r.id===e.id||r.cid===e.cid)&&r.get("name").trim()===t.trim()}))?s.Name.Exists():n.isEmpty(t.trim())?s.Name.Invalid():void 0:s.Name.Invalid()}},s={Name:{Invalid:function(){return i.T.getPhrase(a,"chapterNameInvalid")},Exists:function(){return i.T.getPhrase(a,"chapterNameExists")},MaxLength:function(){return i.T.getPhrase(a,"chapterNameExceeds")}},StartTime:{Invalid:function(){return i.T.getPhrase(a,"chapterStartTimeInvalid")},Exists:function(){return i.T.getPhrase(a,"chapterStartTimeExists")},Exceeds:function(){return i.T.getPhrase(a,"chapterStartTimeExceeds")}}}},16704:function(e,t,r){"use strict";r.r(t),r.d(t,{EditChaptersView:function(){return A}});var n=r(99748),i=r(21679),o=r(57857),a=r(31647),c=r(52076),s=r(70065),u=r(59054),l=r(13156),h=r(57e3),f=r(89167),p=r(57098),d=r(29457),y=r(74749),v=r(48404),m=r(19226),g=r(93569),b=r(264),w=r(45114),E=r(70693),T=r(21053),k=r(40622),C=r(56906),O=r(95061),S=r(61159),L=r.n(S);function P(e){return P="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},P(e)}function x(){x=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function u(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,r){return e[t]=r}}function l(e,t,r,n){var o=t&&t.prototype instanceof m?t:m,a=Object.create(o.prototype),c=new j(n||[]);return i(a,"_invoke",{value:S(e,r,c)}),a}function h(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=l;var f="suspendedStart",p="suspendedYield",d="executing",y="completed",v={};function m(){}function g(){}function b(){}var w={};u(w,a,(function(){return this}));var E=Object.getPrototypeOf,T=E&&E(E(N([])));T&&T!==r&&n.call(T,a)&&(w=T);var k=b.prototype=m.prototype=Object.create(w);function C(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function O(e,t){function r(i,o,a,c){var s=h(e[i],e,o);if("throw"!==s.type){var u=s.arg,l=u.value;return l&&"object"==P(l)&&n.call(l,"__await")?t.resolve(l.__await).then((function(e){r("next",e,a,c)}),(function(e){r("throw",e,a,c)})):t.resolve(l).then((function(e){u.value=e,a(u)}),(function(e){return r("throw",e,a,c)}))}c(s.arg)}var o;i(this,"_invoke",{value:function(e,n){function i(){return new t((function(t,i){r(e,n,t,i)}))}return o=o?o.then(i,i):i()}})}function S(t,r,n){var i=f;return function(o,a){if(i===d)throw Error("Generator is already running");if(i===y){if("throw"===o)throw a;return{value:e,done:!0}}for(n.method=o,n.arg=a;;){var c=n.delegate;if(c){var s=L(c,n);if(s){if(s===v)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===f)throw i=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=d;var u=h(t,r,n);if("normal"===u.type){if(i=n.done?y:p,u.arg===v)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(i=y,n.method="throw",n.arg=u.arg)}}}function L(t,r){var n=r.method,i=t.iterator[n];if(i===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,L(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),v;var o=h(i,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,v;var a=o.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,v):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function V(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function _(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function j(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(V,this),this.reset(!0)}function N(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function r(){for(;++i<t.length;)if(n.call(t,i))return r.value=t[i],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(P(t)+" is not iterable")}return g.prototype=b,i(k,"constructor",{value:b,configurable:!0}),i(b,"constructor",{value:g,configurable:!0}),g.displayName=u(b,s,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===g||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,u(e,s,"GeneratorFunction")),e.prototype=Object.create(k),e},t.awrap=function(e){return{__await:e}},C(O.prototype),u(O.prototype,c,(function(){return this})),t.AsyncIterator=O,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var a=new O(l(e,r,n,i),o);return t.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},C(k),u(k,s,"Generator"),u(k,a,(function(){return this})),u(k,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=N,j.prototype={constructor:j,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(_),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function i(n,i){return c.type="throw",c.arg=t,r.next=n,i&&(r.method="next",r.arg=e),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],c=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var s=n.call(a,"catchLoc"),u=n.call(a,"finallyLoc");if(s&&u){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,v):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),v},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),_(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var i=n.arg;_(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:N(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}function V(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function _(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,j(n.key),n)}}function j(e){var t=function(e){if("object"!=P(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=P(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==P(t)?t:t+""}function N(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(N=function(){return!!e})()}function I(e){return I=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},I(e)}function D(e,t){return D=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},D(e,t)}var A=function(e){function t(e){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,r){return t=I(t),function(e,t){if(t&&("object"==P(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,N()?Reflect.construct(t,r||[],I(e).constructor):t.apply(e,r))}(this,t,[e]))._viewKeyRequested=!1,r}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&&D(e,t)}(t,e),r=t,(S=[{key:"initialize",value:function(){this.bindListeners(),this.initializeDataServices(),g.Si.initBackButton()}},{key:"name",get:function(){return"EditVideoChaptersView"}},{key:"title",get:function(){return!!this.model&&this.model.get("name")}},{key:"lang",get:function(){return"libraryEditor.editChapters"}},{key:"channelName",get:function(){return"".concat(this.name).concat(this.cid)}},{key:"className",get:function(){return"bg-white p-3 rounded"}},{key:"template",get:function(){return L()}},{key:"regions",value:function(){return{tabs:{el:".tab-region",partialLoading:d.LP.EditVideoTabs},webplayer:{replaceElement:!0,el:".webplayer-region",partialLoading:d.LP.WebPlayer},addChapter:{replaceElement:!0,el:".add-chapter-region",partialLoading:d.LP.EditVideoChaptersForm},chapterList:{replaceElement:!0,el:".chapter-list-region",partialLoading:d.LP.EditVideoChapterList}}}},{key:"bindListeners",value:function(){this.listenTo(p.Vk.VIDEO,"".concat(p.M_.VIDEOS,":").concat(this.options.videoId,":sync"),this.render),this.listenTo(p.Vk.VIDEO,"".concat(p.M_.VIDEOS,":").concat(this.options.videoId,":error"),this.onVideoDataError),this.listenTo(this.channelName,k.NT.CreateChapter,this.onCreateChapter),this.listenTo(this.channelName,k.NT.UpdateChapter,this.onUpdateChapter),this.listenTo(this.channelName,k.NT.DeleteChapter,this.onDeleteChapter),this.listenTo(this.channelName,k.NT.UpdateChapterTime,this.onTimeInputUpdate),this.listenTo(this.channelName,k.NT.SeekToChapter,this.onSeekToChapter)}},{key:"initializeDataServices",value:function(){this.videoDataService=i.u.getInstance(p.Or.Video,this),this.chapterDataService=i.u.getInstance(p.Or.Chapter,this),this.playerDataService=i.u.getInstance(p.Or.Player,this)}},{key:"onVideoDataError",value:function(e){switch(e.type){case n.h.NotFound:a.Q.Ry.throw(new C.l1);break;case n.h.Forbidden:a.Q.Ry.throw(new C.aV)}}},{key:"updateChapters",value:function(){var e=this;if(b.g.hasLite){var t=this.chapters.toJSON().reverse().reduce((function(t,r){var n=t[t.length-1];return[].concat(function(e){return function(e){if(Array.isArray(e))return V(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 V(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?V(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.")}()}(t),[{timestamp:r.startTime,endTimestamp:(null==n?void 0:n.timestamp)||e.player.duration(),name:r.name}])}),[]).reverse();this.player.setChapters(t)}}},{key:"onCreateChapter",value:function(e){0===this.chapters.length&&0!==e.startTime&&this.createChapter({name:o.T.getPhrase(this.lang,"intro"),startTime:0}),this.createChapter(e)}},{key:"createChapter",value:function(e){var t=this,r=new y.W(e);this.chapters.add(r),r.set("loading",!0),this.chapterDataService.createChapter(this.model.get("id"),e.name,e.startTime,(function(e){r.set(e.toJSON(),{silent:!0}),r.set("loading",!1),t.chapters.sort(),t.renderChapterForm(),t.updateChapters(),t.logAction(e,s.Vw.Create)}))}},{key:"onUpdateChapter",value:function(e){var t=this,r=this.chapters.find((function(t){return t.get("id")===e.id}));r.set("loading",!0);var n=l.J.updatedChaptersAlert(this.model.get("name"));this.chapterDataService.updateChapter(r.id,e.name,e.startTime,(function(e){r.set(e.toJSON(),{silent:!0}),r.set("loading",!1),t.chapters.sort(),t.updateChapters(),t.logAction(e,s.Vw.Edit)}),n)}},{key:"onDeleteChapter",value:function(e){var t=this;e.set("loading",!0),this.chapterDataService.deleteChapter(e.id,(function(){t.logAction(e,s.Vw.Delete),t.chapters.remove(e),t.updateChapters()}))}},{key:"onTimeInputUpdate",value:function(e){e>=0&&e<=g.X4.millisecondsToSeconds(this.model.get("duration"))&&(this.player?this.player.currentTime(e):this.webPlayer.seekTo(e))}},{key:"logAction",value:function(e,t){var r=Object.assign({videoId:this.model.get("id")},e.pick("id","name","startTime"));c.k.logUserAction(r,{actionType:t,entity:s.py.Chapter,location:s.LZ.EditVideoChapters})}},{key:"onSeekToChapter",value:function(e){return t=this,r=void 0,n=void 0,i=x().mark((function t(){var r,n;return x().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(e<0)){t.next=2;break}return t.abrupt("return");case 2:if(!this.player){t.next=9;break}return t.next=5,this.player.getChapters();case 5:return r=t.sent,n=r[e],this.player.currentTime(n.timestamp),t.abrupt("return");case 9:this.webPlayer.seekToChapter(e);case 10:case"end":return t.stop()}}),t,this)})),new(n||(n=Promise))((function(e,o){function a(e){try{s(i.next(e))}catch(e){o(e)}}function c(e){try{s(i.throw(e))}catch(e){o(e)}}function s(t){var r;t.done?e(t.value):(r=t.value,r instanceof n?r:new n((function(e){e(r)}))).then(a,c)}s((i=i.apply(t,r||[])).next())}));var t,r,n,i}},{key:"renderChapterList",value:function(){this.showChildView("chapterList",new E.Q({collection:this.chapters,duration:this.model.get("duration"),channelName:this.channelName,showActions:!0,editable:!0,showHeader:!0}))}},{key:"renderChapterForm",value:function(){this.showChildView("addChapter",new w.L({model:new y.W,collection:this.chapters,creating:!0,duration:this.model.get("duration"),channelName:this.channelName,playerViewModelKey:"".concat(p._2.NAME,"-").concat(this.model.get("id"))}))}},{key:"renderEditComponents",value:function(){this.renderChapterForm(),this.renderChapterList()}},{key:"renderTabs",value:function(){var e=g.BK.canEditVideo(this.model);this.showChildView("tabs",new T.W({model:this.model,tabs:g.Si.getEditVideoTabs(this.options.videoId,e),activeTab:".edit-chapters-applink",context:"chapters",folder:this.folder,libraries:this.libraries}))}},{key:"renderWebPlayer",value:function(){if(this.playerViewKey)return this.player=new h.l({model:this.playerViewKey,playerApiUrl:this.config.get("playerApiUrl"),channelName:this.channelName,inactivityTimeout:0}),void this.showChildView("webplayer",this.player);this.webPlayer=new f.Q({model:this.model,webPlayerUrl:this.config.get("webPlayerUrl"),captureAnalytics:!1,currentUser:this.currentUser}),this.showChildView("webplayer",this.webPlayer)}},{key:"redirectToVideoDetails",value:function(){a.Q.C$.trigger({application:p.OV.LIBRARY_EDITOR,action:p.eX.LibraryEditor.VIDEO_DETAILS,args:[this.model.get("id")]},{replace:!0})}},{key:"fetchData",value:function(){var e=this;this.model=this.videoDataService.getVideo(this.options.videoId),this.model&&(g.BK.canEditVideo(this.model)?(this.chapters=this.model.chapters,this.folder=this.model.categories.first(),b.g.hasLite&&!this._viewKeyRequested&&(this._viewKeyRequested=!0,this.playerDataService.createViewKey(this.model.get("id"),u.f.MasterObject,(function(t){e.playerViewKey=t,e.render()})))):this.redirectToVideoDetails())}},{key:"shouldRender",value:function(){return!(!this.model||b.g.hasLite&&!this.playerViewKey)}},{key:"requiredResources",get:function(){return{config:v.p.config,currentUser:m.K.currentUser,libraries:O.T.libraries}}},{key:"onBeforeRender",value:function(){return this.fetchData(),this.shouldRender()}},{key:"onRender",value:function(){this.renderTabs(),this.renderWebPlayer(),this.renderEditComponents()}}])&&_(r.prototype,S),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,S}(a.Q.G7)},43791:function(e,t,r){var n=r(32227);e.exports=(n.default||n).template({compiler:[8,">= 4.3.0"],main:function(e,t,r,n,i){var o;return e.propertyIsEnumerable,'<h1 class="h3">\n '+e.escapeExpression("function"==typeof(o=null!=(o=r.name||(null!=t?t.name:t))?o:e.hooks.helperMissing)?o.call(null!=t?t:e.nullContext||{},{name:"name",hash:{},data:i}):o)+'\n</h2>\n<div class="breadcrumbs-region"></div>\n<div class="tabs-region ps-2"></div>'},useData:!0})},61159:function(e,t,r){var n=r(32227);e.exports=(n.default||n).template({compiler:[8,">= 4.3.0"],main:function(e,t,r,n,i){return'<div class="tab-region w-100"></div>\n<div class="row">\n <div class="col-6 pt-3">\n <div class="webplayer-region"></div>\n <div class="add-chapter-region"></div>\n </div>\n <div class="col-6 mb-2 pt-3">\n <div class="chapter-list-region"></div>\n </div>\n</div>'},useData:!0})}}]);
@@ -1 +1 @@
1
- (self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[9357],{39357:function(e,t,n){"use strict";n.r(t),n.d(t,{ThumbnailUploadView:function(){return E}});var r=n(43823),o=n(21161),i=n(11306),a=n(21679),u=n(57857),c=n(99249),l=n(31647),s=n(10101),p=n(58025),h=n(88172),f=n(57098),d=n(29457),m=n(18375),g=n(93569),y=n(68826),v=n.n(y);function b(e){return b="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},b(e)}function 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,k(r.key),r)}}function k(e){var t=function(e){if("object"!=b(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=b(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==b(t)?t:t+""}function C(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(C=function(){return!!e})()}function O(e){return O=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},O(e)}function I(e,t){return I=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},I(e,t)}var E=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"==b(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,C()?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&&I(e,t)}(t,e),n=t,(y=[{key:"initialize",value:function(){this.videoDataService=a.u.getInstance(f.Or.Video,this),this.imageUploadDataService=a.u.getInstance(f.Or.ImageUpload,this),this.navLockService=a.u.getInstance(f.K9.NavLock,this),this.viewModel=c.r.get("image:storage"),this.bindListeners(),this.initImageEl()}},{key:"name",get:function(){return"ThumbnailUploadView"}},{key:"title",get:function(){return u.T.getPhrase(this.lang,"title")}},{key:"lang",get:function(){return"libraryEditor.thumbnailUpload"}},{key:"template",get:function(){return v()}},{key:"channelName",get:function(){return g.N0.generateUniqueChannelName(this)}},{key:"behaviors",get:function(){var e=this;return[{behaviorClass:s.Yw,title:u.T.getPhrase(this.lang,"resizeAndCrop"),size:"modal-lg",spinnerButtonOptions:{channelName:this.channelName,buttonText:u.T.getPhrase(this.lang,"crop"),onClick:function(){return e.onClickCrop()}}}]}},{key:"regions",value:function(){return{cropper:{el:".cropper-region",replaceElement:!0}}}},{key:"events",value:function(){return{"shown.bs.modal":"renderCropper"}}},{key:"bindListeners",value:function(){var e=this;this.listenTo(this.channelName,p.Y.ImageCropped,this.onImageCropped),this.listenTo(f.Vk.VIDEO,"".concat(f.M_.VIDEOS,":").concat(this.options.videoId,":sync"),this.render),this.listenTo(f.Vk.VIDEO,"".concat(f.M_.UPDATE_VIDEO_THUMBNAIL,":").concat(this.options.videoId,":sync"),(function(){return e.triggerMethod("hide")}))}},{key:"initImageEl",value:function(){this.viewModel.get("dataUrl")||l.Q.Ry.throw(new i.H("DataUrl must be set on the image:storage ViewModel")),this.imageEl=new Image,this.imageEl.src=this.viewModel.get("dataUrl"),this.viewModel.unset("dataUrl")}},{key:"getCropRegionWidth",value:function(){return this.$el.find(".modal-body").width()}},{key:"onClickCrop",value:function(){r.Radio.channel(this.channelName).trigger(p.Y.CropImage),r.Radio.channel(this.channelName).trigger(h.I3.ShowSpinner)}},{key:"onImageCropped",value:function(e){var t=this;this.imageUploadDataService.uploadBase64Image(e,d.__.Thumbnails,(function(e){return t.onImageUploaded(e)}))}},{key:"onImageUploaded",value:function(e){var t=this,n=this.model.thumbnail&&this.model.thumbnail.id;this.videoDataService.addOrUpdateThumbnail(this.options.videoId,e,n,(function(){return t.triggerMethod("hide")}))}},{key:"renderCropper",value:function(){var e=new m.E({dataUrl:this.imageEl.src,width:this.imageEl.width,height:this.imageEl.height});this.showChildView("cropper",new p.a({model:e,channelName:this.channelName,imageType:d.__.Thumbnails,minWidth:f.yE[d.__.Thumbnails].width,minHeight:f.yE[d.__.Thumbnails].height,getCropRegionWidth:o.bind(this.getCropRegionWidth,this)}))}},{key:"onBeforeRender",value:function(){this.model=this.videoDataService.getVideo(this.options.videoId)}},{key:"viewOptions",value:function(){return{dataFetched:!!this.model,spinnerEl:g.Kp.getSpinner({size:g.Ey.Large,extraClasses:"mx-auto"})}}},{key:"onBeforeDestroy",value:function(){c.r.get("upload:thumbnail:options").get("lockNav")&&this.navLockService.lock()}}])&&w(n.prototype,y),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,y}(l.Q.G7)},58025:function(e,t,n){"use strict";n.d(t,{Y:function(){return r},a:function(){return g}});var r,o=n(43823),i=n(51934),a=n.n(i),u=n(31647),c=n(91465),l=n.n(c);function s(e){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s(e)}function p(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,h(r.key),r)}}function h(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 f(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(f=function(){return!!e})()}function d(e){return d=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},d(e)}function m(e,t){return m=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},m(e,t)}!function(e){e.ClickCrop="click:crop",e.CropImage="crop:image",e.ImageCropped="image:cropped"}(r||(r={}));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=d(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,f()?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&&m(e,t)}(t,e),n=t,(i=[{key:"initialize",value:function(){this.listenTo(this.options.channelName,r.CropImage,this.crop)}},{key:"name",get:function(){return"ImageCropperComponent"}},{key:"template",get:function(){return l()}},{key:"className",get:function(){return"text-center"}},{key:"elements",get:function(){return{image:".img"}}},{key:"getMinCropBoxWidth",value:function(){return this.options.minWidth*this.getViewportToImageRatio()}},{key:"getMinCropBoxHeight",value:function(){return this.options.minHeight*this.getViewportToImageRatio()}},{key:"getViewportToImageRatio",value:function(){return this.options.getCropRegionWidth()/this.model.get("width")}},{key:"crop",value:function(){var e=this.cropper.getCroppedCanvas().toDataURL(this.getImageMimeType());o.Radio.channel(this.options.channelName).trigger(r.ImageCropped,e)}},{key:"getImageMimeType",value:function(){var e=this.model.get("dataUrl").match(/data:([a-zA-Z0-9]+\/[a-zA-Z0-9-.+]+).*,.*/);if(e)return e[1]}},{key:"renderCropper",value:function(){this.getMinCropBoxWidth();var e=this.getUI("image").get(0);this.cropper=new(a())(e,{viewMode:1,aspectRatio:this.options.minWidth/this.options.minHeight,minCropBoxWidth:this.getMinCropBoxWidth(),minCropBoxHeight:this.getMinCropBoxHeight(),autoCropArea:1})}},{key:"onRender",value:function(){this.renderCropper()}},{key:"onBeforeDestroy",value:function(){this.cropper.destroy()}}])&&p(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,i}(u.Q.wA)},68826: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){return'<div class="cropper-region"></div>\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})},91465: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){var i;return e.propertyIsEnumerable,'<img src="'+e.escapeExpression("function"==typeof(i=null!=(i=n.dataUrl||(null!=t?t.dataUrl:t))?i:e.hooks.helperMissing)?i.call(null!=t?t:e.nullContext||{},{name:"dataUrl",hash:{},data:o}):i)+'" class="img img-fluid" />'},useData:!0})}}]);
1
+ (self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[9357],{39357:function(e,t,n){"use strict";n.r(t),n.d(t,{ThumbnailUploadView:function(){return E}});var r=n(48088),o=n(39479),i=n(11306),a=n(21679),u=n(57857),c=n(99249),l=n(31647),s=n(10101),p=n(58025),h=n(88172),f=n(57098),d=n(29457),m=n(18375),g=n(93569),y=n(68826),v=n.n(y);function b(e){return b="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},b(e)}function 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,k(r.key),r)}}function k(e){var t=function(e){if("object"!=b(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=b(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==b(t)?t:t+""}function C(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(C=function(){return!!e})()}function O(e){return O=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},O(e)}function I(e,t){return I=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},I(e,t)}var E=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"==b(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,C()?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&&I(e,t)}(t,e),n=t,(y=[{key:"initialize",value:function(){this.videoDataService=a.u.getInstance(f.Or.Video,this),this.imageUploadDataService=a.u.getInstance(f.Or.ImageUpload,this),this.navLockService=a.u.getInstance(f.K9.NavLock,this),this.viewModel=c.r.get("image:storage"),this.bindListeners(),this.initImageEl()}},{key:"name",get:function(){return"ThumbnailUploadView"}},{key:"title",get:function(){return u.T.getPhrase(this.lang,"title")}},{key:"lang",get:function(){return"libraryEditor.thumbnailUpload"}},{key:"template",get:function(){return v()}},{key:"channelName",get:function(){return g.N0.generateUniqueChannelName(this)}},{key:"behaviors",get:function(){var e=this;return[{behaviorClass:s.Yw,title:u.T.getPhrase(this.lang,"resizeAndCrop"),size:"modal-lg",spinnerButtonOptions:{channelName:this.channelName,buttonText:u.T.getPhrase(this.lang,"crop"),onClick:function(){return e.onClickCrop()}}}]}},{key:"regions",value:function(){return{cropper:{el:".cropper-region",replaceElement:!0}}}},{key:"events",value:function(){return{"shown.bs.modal":"renderCropper"}}},{key:"bindListeners",value:function(){var e=this;this.listenTo(this.channelName,p.Y.ImageCropped,this.onImageCropped),this.listenTo(f.Vk.VIDEO,"".concat(f.M_.VIDEOS,":").concat(this.options.videoId,":sync"),this.render),this.listenTo(f.Vk.VIDEO,"".concat(f.M_.UPDATE_VIDEO_THUMBNAIL,":").concat(this.options.videoId,":sync"),(function(){return e.triggerMethod("hide")}))}},{key:"initImageEl",value:function(){this.viewModel.get("dataUrl")||l.Q.Ry.throw(new i.H("DataUrl must be set on the image:storage ViewModel")),this.imageEl=new Image,this.imageEl.src=this.viewModel.get("dataUrl"),this.viewModel.unset("dataUrl")}},{key:"getCropRegionWidth",value:function(){return this.$el.find(".modal-body").width()}},{key:"onClickCrop",value:function(){r.Radio.channel(this.channelName).trigger(p.Y.CropImage),r.Radio.channel(this.channelName).trigger(h.I3.ShowSpinner)}},{key:"onImageCropped",value:function(e){var t=this;this.imageUploadDataService.uploadBase64Image(e,d.__.Thumbnails,(function(e){return t.onImageUploaded(e)}))}},{key:"onImageUploaded",value:function(e){var t=this,n=this.model.thumbnail&&this.model.thumbnail.id;this.videoDataService.addOrUpdateThumbnail(this.options.videoId,e,n,(function(){return t.triggerMethod("hide")}))}},{key:"renderCropper",value:function(){var e=new m.E({dataUrl:this.imageEl.src,width:this.imageEl.width,height:this.imageEl.height});this.showChildView("cropper",new p.a({model:e,channelName:this.channelName,imageType:d.__.Thumbnails,minWidth:f.yE[d.__.Thumbnails].width,minHeight:f.yE[d.__.Thumbnails].height,getCropRegionWidth:o.bind(this.getCropRegionWidth,this)}))}},{key:"onBeforeRender",value:function(){this.model=this.videoDataService.getVideo(this.options.videoId)}},{key:"viewOptions",value:function(){return{dataFetched:!!this.model,spinnerEl:g.Kp.getSpinner({size:g.Ey.Large,extraClasses:"mx-auto"})}}},{key:"onBeforeDestroy",value:function(){c.r.get("upload:thumbnail:options").get("lockNav")&&this.navLockService.lock()}}])&&w(n.prototype,y),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,y}(l.Q.G7)},58025:function(e,t,n){"use strict";n.d(t,{Y:function(){return r},a:function(){return g}});var r,o=n(48088),i=n(51934),a=n.n(i),u=n(31647),c=n(91465),l=n.n(c);function s(e){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s(e)}function p(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,h(r.key),r)}}function h(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 f(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(f=function(){return!!e})()}function d(e){return d=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},d(e)}function m(e,t){return m=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},m(e,t)}!function(e){e.ClickCrop="click:crop",e.CropImage="crop:image",e.ImageCropped="image:cropped"}(r||(r={}));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=d(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,f()?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&&m(e,t)}(t,e),n=t,(i=[{key:"initialize",value:function(){this.listenTo(this.options.channelName,r.CropImage,this.crop)}},{key:"name",get:function(){return"ImageCropperComponent"}},{key:"template",get:function(){return l()}},{key:"className",get:function(){return"text-center"}},{key:"elements",get:function(){return{image:".img"}}},{key:"getMinCropBoxWidth",value:function(){return this.options.minWidth*this.getViewportToImageRatio()}},{key:"getMinCropBoxHeight",value:function(){return this.options.minHeight*this.getViewportToImageRatio()}},{key:"getViewportToImageRatio",value:function(){return this.options.getCropRegionWidth()/this.model.get("width")}},{key:"crop",value:function(){var e=this.cropper.getCroppedCanvas().toDataURL(this.getImageMimeType());o.Radio.channel(this.options.channelName).trigger(r.ImageCropped,e)}},{key:"getImageMimeType",value:function(){var e=this.model.get("dataUrl").match(/data:([a-zA-Z0-9]+\/[a-zA-Z0-9-.+]+).*,.*/);if(e)return e[1]}},{key:"renderCropper",value:function(){this.getMinCropBoxWidth();var e=this.getUI("image").get(0);this.cropper=new(a())(e,{viewMode:1,aspectRatio:this.options.minWidth/this.options.minHeight,minCropBoxWidth:this.getMinCropBoxWidth(),minCropBoxHeight:this.getMinCropBoxHeight(),autoCropArea:1})}},{key:"onRender",value:function(){this.renderCropper()}},{key:"onBeforeDestroy",value:function(){this.cropper.destroy()}}])&&p(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,i}(u.Q.wA)},68826: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){return'<div class="cropper-region"></div>\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})},91465:function(e,t,n){var r=n(32227);e.exports=(r.default||r).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var i;return e.propertyIsEnumerable,'<img src="'+e.escapeExpression("function"==typeof(i=null!=(i=n.dataUrl||(null!=t?t.dataUrl:t))?i:e.hooks.helperMissing)?i.call(null!=t?t:e.nullContext||{},{name:"dataUrl",hash:{},data:o}):i)+'" class="img img-fluid" />'},useData:!0})}}]);
@@ -0,0 +1,2 @@
1
+ /*! For license information please see 9369-1e706eb521.chunk.js.LICENSE.txt */
2
+ "use strict";(self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[9369],{54096:function(e,t,n){n.d(t,{G:function(){return i}});var r=n(1024),a=n(21679);function i(e){var t,n;return t=e,n=a.u.getInstance(t),r.useEffect((function(){return function(){a.u.releaseInstance(t)}})),n}},38182:function(e,t,n){n.d(t,{q:function(){return m}});var r=n(1024),a=n.n(r),i=n(68003),o=n(88483),c=n(87013),l=n(63791),s=n(39396),u={avatar:"Gvwzj",dot:"JJHBJ"};function m(e){var t,n,r=!e.anonymiseUsers&&e.imageUrl||(t=e.imageCdnUrl,(n=e.initials)?c.j.createUrl(i._.safeUrlConcat(t,"/v1/profile-images?initials=".concat(n)),{size:o.h2.Small}):"");return a().createElement("div",{className:"position-relative h-100 w-100"},e.showAnonymousUser?a().createElement("div",{className:"".concat(u.avatar," ").concat((null==e?void 0:e.extraClasses)||""," bg-gray-700 text-light")},a().createElement(s.x,{svgName:l.vn.Anonymous,size:e.anonymousSvgSize||s.S.Large,className:"svg-container w-100 h-100"})):a().createElement("div",{className:"".concat(u.avatar," ").concat((null==e?void 0:e.extraClasses)||""),style:{backgroundImage:"url('".concat(r,"')")}}," "),e.showDot&&a().createElement("div",{className:"".concat(u.dot," rounded-circle bg-danger")}))}},8371:function(e,t,n){var r;n.d(t,{b:function(){return r}}),function(e){e.AU="cv-ap-southeast-1",e.NZ="cv-ap-southeast-2",e.UK="cv-eu-west-1",e.US="cv-na-west-1"}(r||(r={}))},90547:function(e,t,n){var r;n.d(t,{r:function(){return r}}),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)"}(r||(r={}))},34254:function(e,t,n){var r;n.d(t,{r:function(){return r}}),function(e){e[e.FilterOut=0]="FilterOut",e[e.StripMetadata=1]="StripMetadata"}(r||(r={}))},2491:function(e,t,n){n.d(t,{Z:function(){return o}});var r=n(92159),a=n(21186),i=n(54096);function o(){var e=(0,i.G)(r.P.ALERT);return{success:function(t){e.success(t)()},error:function(t){e.error(t)()},warning:function(t){e.createAlert({type:a.NK.Warning,heading:a.R6.Warning,message:t})}}}},32557:function(e,t,n){n.d(t,{X:function(){return h},L:function(){return g}});var r=n(1024),a=n.n(r),i=n(53808),o=n(85887),c=function(){var e=a().useRef(!0);return a().useEffect((function(){return function(){e.current=!1}}),[]),e};function l(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,i,o,c=[],l=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(c.push(r.value),c.length!==t);l=!0);}catch(e){s=!0,a=e}finally{try{if(!l&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(s)throw a}}return c}}(e,t)||function(e,t){if(e){if("string"==typeof e)return s(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)?s(e,t):void 0}}(e,t)||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.")}()}function s(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}var u=275,m=5,d={className:"",delay:0,style:null},p={screenX:0,screenY:0};function f(e,t){var n;e.current&&(t.className&&(null===(n=e.current.classList)||void 0===n||n.add(t.className)),t.style&&Object.keys(t.style).forEach((function(n){e.current.style[n]=t.style[n]})))}function v(e,t){var n;e.current&&(t.className&&(null===(n=e.current.classList)||void 0===n||n.remove(t.className)),t.style&&Object.keys(t.style).forEach((function(t){e.current.style[t]=null})))}function h(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:d,t=c(),n=l(r.useState(e),2),a=n[0],s=n[1],u=l(r.useState(!1),2),m=u[0],p=u[1],h=r.useRef(null);r.useEffect((function(){o.t.isEqual(e,a)||s(e)}),[e]);var g=i.q.throttle((function(){f(h,a),t.current&&p(!0)}),a.delay,{leading:!1}),b=function(){i.q.isFunction(g.cancel)&&g.cancel(),v(h,a),t.current&&p(!1)};return r.useLayoutEffect((function(){var e=h.current;if(e)return e.addEventListener("mouseenter",g),e.addEventListener("mouseleave",b),function(){e.removeEventListener("mouseenter",g),e.removeEventListener("mouseleave",b)}}),[h.current,a]),[h,m]}function g(e){var t=l(r.useState(e),2),n=t[0],a=t[1],c=r.useRef(Object.assign({},p)),s=r.useRef(!1),d=r.useRef(0),h=r.useRef(null),g=l(r.useState(!1),2),b=g[0],y=g[1];function E(){d.current&&(window.clearTimeout(d.current),d.current=0)}function S(){s.current=!0}function w(e){if(s.current){var t,r,a=Object.assign({},c.current);c.current.screenX=e.screenX,c.current.screenY=e.screenY,function(e,t){return Math.abs(e.screenX-t.screenX)>m||Math.abs(e.screenY-t.screenY)>m}(a,e)&&E(),t=function(){f(h,n),y(!0)},r=n.delay||u,d.current||(d.current=window.setTimeout(t,r))}}function O(){E(),v(h,n),s.current=!1,y(!1)}return r.useEffect((function(){o.t.isEqual(e,n)||a(e)}),[e]),r.useLayoutEffect((function(){if(h.current){var e=i.q.throttle(w,25,{leading:!1});return h.current.addEventListener("mouseenter",S),h.current.addEventListener("mousemove",e),h.current.addEventListener("mouseleave",O),function(){h.current&&(h.current.removeEventListener("mouseenter",S),h.current.removeEventListener("mousemove",e),h.current.removeEventListener("mouseleave",O))}}}),[h.current,n]),[h,b]}},38e3:function(e,t,n){n.d(t,{G:function(){return a}});var r=n(74421),a={isType:function(e,t){var n;return(null==e?void 0:e.typeId)?e.typeId===t:(null===(n=null==e?void 0:e.type)||void 0===n?void 0:n.toLowerCase())===r.E[t].toLowerCase()},isResource:function(e){return a.isType(e,r.E.Resource)},isClassification:function(e){return"Subject"===e.type}}},34165:function(e,t,n){n.r(t),n.d(t,{GiveFeedbackView:function(){return Dt}});var r,a=n(1024),i=n.n(a),o=n(48088),c=n(53301),l=n.n(c),s=n(52765),u=n(57857),m=n(3026),d=n(54096),p=n(86120),f=n(52076),v=n(70065),h=n(81937),g=n(18222),b=n(4231),y=n(66703),E=n(69184),S=n(11543);!function(e){e[e.Other=0]="Other",e[e.SuggestImprovement=1]="SuggestImprovement",e[e.ReportBug=2]="ReportBug",e[e.RequestVideo=3]="RequestVideo",e[e.RaiseIssue=4]="RaiseIssue",e[e.GivePraise=5]="GivePraise",e[e.Footer=6]="Footer",e[e.RequestLivestream=7]="RequestLivestream"}(r||(r={}));var w=n(48050),O=n(84868),x=n(68003),R={presentationAudiences:function(e,t){var n=t||w.R.Subject.toLowerCase(),r={type:n,presentationId:e};return{bootstrapName:"presentationAudiences",url:x._.urlBuilder("/api/domain/v1/subjects/audiences",r),publicUrl:x._.urlBuilder("/api/subjects/presentation/".concat(e,"/audiences"),r),key:"presentation:audiences:".concat(e,":").concat(n),normalize:!1}},audiencesByPresentationId:function(e){return{url:"/api/domain/v1/subjects/presentations/".concat(e,"/audiences"),publicUrl:x._.urlBuilder("/api/subjects/presentation/".concat(e,"/audiences"),{type:w.R.Subject.toLowerCase(),presentationId:e}),key:"presentation:".concat(e,":audiences"),normalize:!1}}},T=n(57867),I=n(62709),k=n(2248),L={submitFeedback:function(e,t){return{url:"{gateway}/v1/feedback",key:"submit:feedback",type:k.k.POST,data:Object.assign(Object.assign({},e),t)}}},U=n(95644),N={userProducts:function(e,t){return{url:"{gateway}/v1/users/me/products",key:"user:products",normalizeOptions:{namespace:"product"},success:e,error:t,bootstrapName:U.h.PRODUCTS}}},A=n(15408),j=n(2491);function F(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}var P=n(6367),C=n(8371),_=n(46237);function V(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}var q,G={getUserInfo:function(e,t){return{id:e.id,username:e.username,email:e.email,userType:e.role===_.i.Admin?"Admin":"Staff",customerId:e.customerId,cvcId:t.crmId,customerName:t.name,instanceRegion:e.instanceRegion,contentRegion:e.contentRegion,firstName:e.givenName,lastName:e.familyName}},mapInstanceRegionToTag:function(e){switch(e){case C.b.AU:return"au";case C.b.NZ:return"nz";case C.b.UK:return"uk";case C.b.US:return"us"}},getTags:function(e,t,n,r){var a,i=[t].concat(function(e){if(Array.isArray(e))return V(e)}(a=r)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(a)||function(e,t){if(e){if("string"==typeof e)return V(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)?V(e,t):void 0}}(a)||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.")}());i.push(n?"student":"staff"),e.role===_.i.Admin&&i.push("administrator");var o=G.mapInstanceRegionToTag(e.instanceRegion);return o&&i.push(o),i},categorizeFiles:function(e){return e.reduce((function(e,t){var n=t.get("fileInfo");return l().isValidFile(t.get("file"),g.l.VIDEO)?e.videoUrls.push(null==n?void 0:n.url):e.imageUrls.push(null==n?void 0:n.url),e}),{imageUrls:[],videoUrls:[]})}},M=n(58424),D=n(32557);!function(e){e.SUGGEST_IMPROVEMENT="suggestImprovement",e.REPORT_BUG="reportBug",e.REQUEST_VIDEO="requestVideo",e.REQUEST_LIVESTREAM="requestLivestream",e.GIVE_PRAISE="givePraise",e.RAISE_ISSUE="raiseIssue",e.OTHER="other"}(q||(q={}));var B=u.T.encloseNamespace("shared.feedbackFormTitles"),W=function(e){switch(e){case q.SUGGEST_IMPROVEMENT:case q.REPORT_BUG:case q.REQUEST_VIDEO:case q.REQUEST_LIVESTREAM:case q.GIVE_PRAISE:case q.RAISE_ISSUE:case q.OTHER:return B(e)}};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 H(e,t,n){return(t=function(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+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Z=H(H(H(H(H(H(H({mailSent:"https://img.clickviewapp.com/v2/images/2mZ7L9",mediaPreview:"https://img.clickviewapp.com/v2/images/ageRM0",lightBulb:"https://img.clickviewapp.com/v2/images/Oqg3JN",heartHands:"https://img.clickviewapp.com/v2/images/1ML8Oj",videoAlert:"https://img.clickviewapp.com/v2/images/dq2oMq"},q.REQUEST_VIDEO,{default:"https://img.clickviewapp.com/v2/images/G1YGdn",hover:"https://img.clickviewapp.com/v2/images/K6yPxz"}),q.REQUEST_LIVESTREAM,{default:"https://img.clickviewapp.com/v2/images/G1YGdn",hover:"https://img.clickviewapp.com/v2/images/K6yPxz"}),q.SUGGEST_IMPROVEMENT,{default:"https://img.clickviewapp.com/v2/images/g7aR1l",hover:"https://img.clickviewapp.com/v2/images/zMR0Dk"}),q.RAISE_ISSUE,{default:"https://img.clickviewapp.com/v2/images/5boW78",hover:"https://img.clickviewapp.com/v2/images/m6yRKr"}),q.GIVE_PRAISE,{default:"https://img.clickviewapp.com/v2/images/nE1mdz",hover:"https://img.clickviewapp.com/v2/images/JjEnmR"}),q.REPORT_BUG,{default:"https://img.clickviewapp.com/v2/images/AOdYpo",hover:"https://img.clickviewapp.com/v2/images/yro9NM"}),q.OTHER,{default:"https://img.clickviewapp.com/v2/images/Eoaykj",hover:"https://img.clickviewapp.com/v2/images/wN59Zg"}),X={image:"_2jo0"};function Q(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 Y(e){var t,n,r=(t=(0,D.X)(),n=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,i,o,c=[],l=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(c.push(r.value),c.length!==t);l=!0);}catch(e){s=!0,a=e}finally{try{if(!l&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(s)throw a}}return c}}(t,n)||function(e,t){if(e){if("string"==typeof e)return Q(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)?Q(e,t):void 0}}(t,n)||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.")}()),a=r[0],o=r[1],c=Z[e.option];return i().createElement(M.L,{ref:a,className:"col-lg-4 col-sm-6 col-12",onClick:function(){return e.onSelectOption(e.option)}},i().createElement("div",{className:"d-flex flex-column align-items-center h-100 rounded border py-3 gap-2"},i().createElement("img",{className:X.image,src:o?c.hover:c.default,alt:W(e.option)}),i().createElement("p",{className:"fw-semibold text-center mb-0"},W(e.option))))}function K(e){return i().createElement("div",{className:"row g-2"},e.options.map((function(t){return i().createElement(Y,{key:t,option:t,onSelectOption:e.onSelectOption})})))}var $=n(92802),J=n(86347),ee=n(83996),te=u.T.encloseNamespace("shared.feedbackButtons");function ne(e){var t=(0,J.b)();return i().createElement(ee.u,null,"form"===e.formStage&&i().createElement(i().Fragment,null,i().createElement(ee.u.Cancel,{onClick:function(){return e.setSelectedOption(null)},text:te("cancel")}),i().createElement(ee.u.Submit,{variant:"dark",text:e.submitText||te("submit"),disabled:!t.isValid})),"success"===e.formStage&&i().createElement(ee.u.Cancel,{variant:"dark",text:te("close"),onClick:e.closePopup}))}var re={successImage:"yp7vQ"},ae=u.T.encloseNamespace("shared.feedbackFormState");function ie(e){return"form"===e.formStage||"error"===e.formStage?i().createElement(i().Fragment,null):i().createElement("div",{className:"text-center"},i().createElement("div",{className:"mb-3"},i().createElement("img",{className:re.successImage,src:e.successImageUrl||Z.mailSent})),i().createElement("h4",{className:"mb-3"},e.successHeading||ae("successHeading")),i().createElement("p",{className:"mb-3"},e.successDescription||ae("successDescription")))}var oe=n(5173),ce=n(63038),le=u.T.encloseNamespace("shared.feedbackForm"),se=5e3,ue=function(e){switch(e){case"requiredError":return le(e);case"minCharactersError":return le(e,{limit:10});case"maxCharactersError":return le("maxCharactersError",{limit:se})}},me=function(){return oe.Z_().min(10,ue("minCharactersError")).max(se,ue("maxCharactersError"))},de=u.T.encloseNamespace("shared.feedbackGivePraise"),pe={praise:""},fe=oe.Ry().shape({praise:me().required(ue("requiredError"))}).noUnknown();function ve(){var e=(0,J.b)();return i().createElement(i().Fragment,null,i().createElement(ce.W,{as:"textarea",placeholder:de("givePraisePlaceholder"),label:de("givePraiseLabel"),name:"praise",rows:5,value:e.values.praise,showRequiredStar:!0}))}function he(e){return i().createElement(kt,Object.assign({},e,{initialValues:Object.assign(Object.assign({},pe),e.initialValues),validationSchema:fe,successImageUrl:Z.heartHands,successHeading:de("successHeading"),successDescription:de("successDescription")}),i().createElement(ve,null))}var ge=u.T.encloseNamespace("shared.feedbackOther"),be={feedback:""},ye=oe.Ry().shape({feedback:me().required(ue("requiredError"))}).noUnknown();function Ee(){var e=(0,J.b)();return i().createElement(i().Fragment,null,i().createElement(ce.W,{as:"textarea",placeholder:ge("otherPlaceholder"),label:ge("otherLabel"),name:"feedback",rows:5,value:e.values.feedback,showRequiredStar:!0}))}function Se(e){return i().createElement(kt,Object.assign({},e,{initialValues:Object.assign(Object.assign({},be),e.initialValues),validationSchema:ye}),i().createElement(Ee,null))}var we=u.T.encloseNamespace("shared.feedbackRaiseIssue"),Oe={issue:""},xe=oe.Ry().shape({issue:me().required(ue("requiredError"))}).noUnknown();function Re(){var e=(0,J.b)();return i().createElement(i().Fragment,null,i().createElement(ce.W,{as:"textarea",placeholder:we("raiseIssuePlaceholder"),label:we("raiseIssueLabel"),name:"issue",rows:5,value:e.values.issue,showRequiredStar:!0}))}function Te(e){return i().createElement(kt,Object.assign({},e,{initialValues:Object.assign(Object.assign({},Oe),e.initialValues),validationSchema:xe}),i().createElement(Re,null))}var Ie=n(39396);function ke(e){return ke="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ke(e)}function Le(e,t,n){return(t=function(e){var t=function(e){if("object"!=ke(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=ke(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ke(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Ue=Le(Le(Le(Le({},C.b.AU,{phone:"02 9509 2600",email:"support@clickview.com.au",website:"https://www.clickviewsupport.com/hc"}),C.b.UK,{phone:"+44 (0)333 207 6595",email:"info@clickview.co.uk",website:"https://www.clickviewsupport.com/hc"}),C.b.NZ,{phone:"09 916 1156",email:"support@clickview.co.nz",website:"https://www.clickviewsupport.com/hc"}),C.b.US,{phone:"+1 312-292-9322",email:"info@clickvieweducation.com",website:"https://www.clickviewsupport.com/hc"}),Ne=n(63791),Ae=n(58591);function je(e){return i().createElement("span",{id:"".concat(e.name,"Error"),className:"".concat(e.className," invalid-feedback d-block"),role:"status"},e.children)}var Fe=n(76013),Pe={fileDrop:"vdCUc",resourcePreview:"tZQbH"};function Ce(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}var _e="shared.feedbackFileUpload";function Ve(e){var t=(0,Ae.uI)({onDrop:function(t){return e.onFilesAdded(t,Fe.s.DragDrop)},noClick:!0,noKeyboard:!0,multiple:!!e.acceptMultiple,noDragEventsBubbling:!0}),n=t.getRootProps,r=t.getInputProps,i=t.isDragActive,o=a.useRef(null),c=a.useCallback((function(e){e&&(o.current=e)}),[]),l="".concat(Pe.fileDrop," text-center p-2 rounded-1");return e.uploadError&&(l+=" border-red"),i&&(l+=" border-blue bg-light-blue"),a.createElement(a.Fragment,null,a.createElement("div",Object.assign({},n({className:l})),a.createElement("img",{className:Pe.resourcePreview,src:e.imageUrl,draggable:!1}),a.createElement("div",{className:"position-relative"},i&&a.createElement("p",{className:"position-absolute font-size-md translate-middle top-50 start-50 mb-0"},a.createElement(y.x,{namespace:_e,phrase:"dropUpload"})),a.createElement("div",{className:i?"opacity-0":""},a.createElement("p",{className:"mb-0"},a.createElement(y.x,{namespace:_e,phrase:"dragDrop"})),a.createElement("button",{type:"button",className:"btn btn-link text-underline p-0",onClick:function(){o.current.value=null,o.current.click()}},a.createElement(y.x,{namespace:_e,phrase:"upload"})))),a.createElement("input",{type:"file",name:"fileUpload",className:"file-select d-none",multiple:!!e.acceptMultiple,accept:e.mimeType,ref:c,onChange:function(t){return e.onFilesAdded(function(e){if(Array.isArray(e))return Ce(e)}(n=t.target.files)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(n)||function(e,t){if(e){if("string"==typeof e)return Ce(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)?Ce(e,t):void 0}}(n)||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.")}(),Fe.s.FileSelect);var n},"aria-errormessage":"fileUploadError"}),a.createElement("input",Object.assign({},r()))),e.uploadError&&a.createElement(je,{name:"fileUpload"},e.uploadError))}var qe={progress:"PeDF6"};function Ge(e){var t=100===e.upload.progress;return a.createElement(a.Fragment,null,a.createElement("div",null,a.createElement(Ie.x,{svgName:Ne.vn.Folder,className:"svg-container me-2"}),a.createElement("span",{className:"align-middle"},e.upload.name),t&&a.createElement(Ie.x,{svgName:Ne.vn.Check,className:"svg-container float-end text-success"}),!t&&a.createElement("div",{role:"button","aria-label":"close",onClick:function(){return e.cancelUpload(e.upload.id)},className:"float-end description"},a.createElement(Ie.x,{svgName:Ne.vn.Close}))),a.createElement("div",{className:"".concat(qe.progress," progress my-2")},a.createElement("div",{className:"progress-bar bg-blue",role:"progressbar",style:{width:"".concat(e.upload.progress,"%")},"aria-valuenow":e.upload.progress,"aria-valuemin":0,"aria-valuemax":100})))}function Me(e){var t;return(null===(t=e.uploads)||void 0===t?void 0:t.length)?a.createElement(a.Fragment,null,e.uploads.map((function(t,n){return a.createElement(Ge,{key:n,upload:t,cancelUpload:e.cancelUpload})}))):a.createElement(a.Fragment,null)}function De(e){return i().createElement("div",{className:"bg-gray-100 rounded p-2"},i().createElement(Ie.x,{className:"d-inline-block align-middle svg-container icon-purple me-2",svgName:Ne.vn.FileImg}),i().createElement("span",{className:"align-middle"},e.file.get("name")),i().createElement("button",{className:"btn p-0 border-0 float-end",onClick:function(){return e.deleteFile(e.file.get("id"))}},i().createElement(Ie.x,{svgName:Ne.vn.Delete})))}function Be(e){return i().createElement("div",{className:"d-flex flex-column gap-2"},e.uploadedFiles.map((function(t){return i().createElement(De,{key:t.id,file:t,deleteFile:e.deleteFile})})))}var We=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]])}return n},ze="shared.feedbackReportBug",He=u.T.encloseNamespace(ze),Ze={issue:"",stepsToReproduce:""},Xe=oe.Ry().shape({issue:me().required(ue("requiredError")),stepsToReproduce:me()}).noUnknown();function Qe(e){var t=(0,J.b)();return i().createElement(i().Fragment,null,i().createElement("div",{className:"form-group"},i().createElement("label",{className:"form-label mb-1"},i().createElement(y.x,{namespace:ze,phrase:"mixedMediaLabel"})),i().createElement("p",{className:"text-secondary font-size-sm"},i().createElement(y.x,{namespace:ze,phrase:"mixedMediaDescription"})),i().createElement("div",{className:"mb-3"},i().createElement(Ve,{mimeType:g.l.MIXED_MEDIA,onFilesAdded:e.onFilesAdded,imageUrl:e.previewImageUrl,uploadError:e.uploadError,acceptMultiple:!0})),i().createElement(Me,{uploads:e.uploadingFiles,cancelUpload:e.cancelUpload}),i().createElement(Be,{uploadedFiles:e.uploadedFiles,deleteFile:e.deleteFile})),i().createElement(ce.W,{as:"textarea",placeholder:He("issuePlaceholder"),label:He("issueLabel"),name:"issue",value:t.values.issue,showRequiredStar:!0}),i().createElement(ce.W,{as:"textarea",placeholder:He("stepsPlaceholder"),label:He("stepsLabel"),name:"stepsToReproduce",value:t.values.stepsToReproduce}),i().createElement("div",{className:"rounded bg-light-yellow p-2 mb-3"},i().createElement("p",{className:"fw-semibold mb-2"},i().createElement(y.x,{namespace:ze,phrase:"help"})),i().createElement("div",{className:"d-flex gap-1 mb-2"},i().createElement(Ie.x,{svgName:Ne.vn.Link}),i().createElement("a",{href:Ue[e.instanceRegion].website,target:"_blank",className:"text-underline"},i().createElement(y.x,{namespace:ze,phrase:"visitHelpCentre"}))),i().createElement("p",{className:"mb-2"},i().createElement(y.x,{namespace:ze,phrase:"supportTeam"})),i().createElement("div",{className:"d-flex gap-1 mb-2"},i().createElement(Ie.x,{svgName:Ne.vn.Phone}),i().createElement("span",null,Ue[e.instanceRegion].phone)),i().createElement("div",{className:"d-flex gap-1 mb-2"},i().createElement(Ie.x,{svgName:Ne.vn.Email}),i().createElement("span",null,Ue[e.instanceRegion].email))))}function Ye(e){var t=e.onFilesAdded,n=e.cancelUpload,r=e.uploadingFiles,a=e.uploadedFiles,o=e.deleteFile,c=We(e,["onFilesAdded","cancelUpload","uploadingFiles","uploadedFiles","deleteFile"]);return i().createElement(kt,Object.assign({},c,{initialValues:Object.assign(Object.assign({},Ze),e.initialValues),validationSchema:Xe,submitText:He("submit")}),i().createElement(Qe,{onFilesAdded:t,previewImageUrl:Z.mediaPreview,cancelUpload:n,uploadingFiles:r,uploadedFiles:a,deleteFile:o,uploadError:e.uploadError,instanceRegion:e.instanceRegion}))}var Ke=n(40221),$e=n(39691),Je=n(71185),et=n(78523),tt="shared.feedbackRequestLivestream",nt=u.T.encloseNamespace(tt),rt={topic:"",studentLevel:[],producerCompany:"",additionalInfo:""},at=oe.Z_().max(se,ue("maxCharactersError")),it=oe.Ry().shape({producerCompany:at.required((function(){return nt("companyError")})),topic:at,studentLevel:oe.IX(oe.Z_()),additionalInfo:me()}).noUnknown();function ot(e){var t=(0,J.b)(),n=t.values.studentLevel.map((function(t){return e.audiences.find((function(e){return e.name===t}))}))||[];function r(e){t.setFieldValue("studentLevel",Ke.m.addOrRemoveImmutable(t.values.studentLevel,e.name)),requestAnimationFrame((function(){return t.setFieldTouched("studentLevel")}))}return i().createElement(i().Fragment,null,i().createElement(ce.W,{placeholder:nt("companyPlaceholder"),label:nt("companyLabel"),name:"producerCompany",value:t.values.producerCompany,showRequiredStar:!0}),i().createElement(ce.W,{placeholder:nt("topicPlaceholder"),label:nt("topicLabel"),name:"topic",value:t.values.topic}),i().createElement("div",{className:"form-group"},i().createElement("label",{className:"form-label"},i().createElement(y.x,{namespace:tt,phrase:"audiencesLabel"})),i().createElement(Je.R,{id:"audiences",placeholder:nt("audiencesPlaceholder"),local:e.audiences,valueKey:"name",selections:n,onSuggestionSelected:r,removeSelection:function(e){return r(e)},errorStateImageUrl:null,emptyStateImageUrl:null,activationLength:0,suggestionLimit:!1,getInputTokenComponent:function(e){return i().createElement($e.D,{key:e.name,selection:{name:e.name,masterId:e.masterId},colourVariant:"teal",onClickRemove:function(e){return r(e)},hideExpander:!0})},getSuggestionComponent:function(e){return(0,et.Go)("name",e)},onSuggestionDependencies:[e.audiences,t.values.studentLevel,n],getLocalSuggestions:function(e,t){var r=t.find((function(t){return t.name===e}));return(0,et.Zo)(r?"":e,t,"name",0).filter((function(e){return!n.find((function(t){return t.name===e.name}))&&e.name!==(null==r?void 0:r.name)}))},focusInputOnSuggestionClick:!1,renderAsForm:!1,hideIcon:!0,onBlur:function(){return t.setFieldTouched("studentLevel")},className:"p-2 ".concat(t.touched.studentLevel&&t.errors.studentLevel?"is-invalid":"")}),t.touched.studentLevel&&t.errors.studentLevel&&i().createElement(je,{name:"audiences"},t.errors.studentLevel)),i().createElement(ce.W,{as:"textarea",placeholder:nt("otherPlaceholder"),label:nt("otherLabel"),name:"additionalInfo",value:t.values.additionalInfo}))}function ct(e){return i().createElement(kt,Object.assign({},e,{initialValues:Object.assign(Object.assign({},rt),e.initialValues),validationSchema:it}),i().createElement(ot,{audiences:e.audiences}))}var lt={image:"SdHLR"};function st(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}var ut="shared.feedbackBeforeRequesting",mt=u.T.encloseNamespace(ut);function dt(e){var t,n,r=(t=i().useState(!1),n=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,i,o,c=[],l=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(c.push(r.value),c.length!==t);l=!0);}catch(e){s=!0,a=e}finally{try{if(!l&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(s)throw a}}return c}}(t,n)||function(e,t){if(e){if("string"==typeof e)return st(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)?st(e,t):void 0}}(t,n)||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.")}()),a=r[0],o=r[1];return i().createElement(i().Fragment,null,i().createElement("div",{className:"d-flex flex-column align-items-center my-4"},i().createElement("img",{className:"".concat(lt.image," mb-3"),src:Z.videoAlert}),i().createElement("h4",{className:"mb-3"},i().createElement(y.x,{namespace:ut,phrase:"beforeRequesting"})),i().createElement("p",null,i().createElement(y.x,{namespace:ut,phrase:"haveYouSearched",options:{exchangeUrl:"".concat(e.exchangeTvUrl,"/exchange")}}))),i().createElement(ee.u,null,i().createElement(ee.u.Checkbox,{id:"confirmExchange",checked:a,onToggle:function(){return o(!a)},label:mt("exchangeCheck")}),i().createElement(ee.u.Cancel,{onClick:function(){return e.setSelectedOption(null)},text:mt("back")}),i().createElement(ee.u.Submit,{variant:"dark",text:mt("continue"),disabled:!a,onClick:function(){return e.setConfirmed(!0)}})))}function pt(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}var ft,vt="shared.feedbackRequestVideo",ht=u.T.encloseNamespace(vt);!function(e){e.VideosTopic="videosTopic",e.VideoOrSeries="videoOrSeries"}(ft||(ft={}));var gt={videoRequestType:"",topic:"",studentLevel:[],videoTitle:"",seriesName:"",producerCompany:"",websiteOrTrailer:"",additionalInfo:""},bt=function(){return oe.Z_().max(se,ue("maxCharactersError"))},yt=oe.Ry().shape({videoRequestType:oe.Z_().required(ht("videoRequestTypeRequiredError")),topic:bt().when("videoRequestType",{is:function(e){return e===ft.VideosTopic},then:bt().required(ht("topicRequiredError")),otherwise:bt().notRequired()}),studentLevel:oe.IX(oe.Z_()),videoTitle:bt().when(["videoRequestType","seriesName"],{is:function(e,t){return e===ft.VideoOrSeries&&!t},then:bt().required(ht("videoRequiredError")),otherwise:bt().notRequired()}),seriesName:bt(),producerCompany:bt(),websiteOrTrailer:bt(),additionalInfo:me()}).noUnknown();function Et(e){var t=(0,J.b)(),n=t.values.studentLevel.map((function(t){var n;return null===(n=e.audiences)||void 0===n?void 0:n.find((function(e){return e.name===t}))}))||[];function r(e){t.setFieldValue("studentLevel",Ke.m.addOrRemoveImmutable(t.values.studentLevel,e.name)),requestAnimationFrame((function(){return t.setFieldTouched("studentLevel")}))}return i().createElement(i().Fragment,null,i().createElement(ce.W,{as:"select",label:ht("videoRequestTypeLabel"),name:"videoRequestType",value:t.values.videoRequestType},i().createElement("option",{value:"",disabled:!0,hidden:!0},ht("videoRequestTypePlaceholder")),i().createElement("option",{value:ft.VideosTopic},ht("videosTopicType")),i().createElement("option",{value:ft.VideoOrSeries},ht("videoOrSeriesType"))),t.values.videoRequestType===ft.VideosTopic&&i().createElement(i().Fragment,null,i().createElement(ce.W,{placeholder:ht("videoTopicPlaceholder"),label:ht("videoTopicLabel"),name:"topic",value:t.values.topic,showRequiredStar:!0}),i().createElement("div",{className:"form-group"},i().createElement("label",{className:"form-label"},i().createElement(y.x,{namespace:vt,phrase:"audiencesLabel"})),i().createElement(Je.R,{id:"audiences",placeholder:ht("audiencesPlaceholder"),local:e.audiences,valueKey:"name",selections:n,onSuggestionSelected:r,removeSelection:function(e){return r(e)},errorStateImageUrl:null,emptyStateImageUrl:null,activationLength:0,suggestionLimit:!1,getInputTokenComponent:function(e){return i().createElement($e.D,{key:e.name,selection:{name:e.name,masterId:e.masterId},colourVariant:"teal",onClickRemove:function(e){return r(e)},hideExpander:!0})},getSuggestionComponent:function(e){return(0,et.Go)("name",e)},onSuggestionDependencies:[e.audiences,t.values.studentLevel,n],getLocalSuggestions:function(e,t){var r=t.find((function(t){return t.name===e}));return(0,et.Zo)(r?"":e,t,"name",0).filter((function(e){return!n.find((function(t){return t.name===e.name}))&&e.name!==(null==r?void 0:r.name)}))},focusInputOnSuggestionClick:!1,renderAsForm:!1,hideIcon:!0,onBlur:function(){return t.setFieldTouched("studentLevel")},className:"p-2 ".concat(t.touched.studentLevel&&t.errors.studentLevel?"is-invalid":"")}),t.touched.studentLevel&&t.errors.studentLevel&&i().createElement(je,{name:"audiences"},t.errors.studentLevel)),i().createElement(ce.W,{as:"textarea",placeholder:ht("otherPlaceholder"),label:ht("otherLabel"),name:"additionalInfo",value:t.values.additionalInfo})),t.values.videoRequestType===ft.VideoOrSeries&&i().createElement(i().Fragment,null,i().createElement(ce.W,{placeholder:ht("videoTitlePlaceholder"),label:ht("videoTitleLabel"),name:"videoTitle",value:t.values.videoTitle}),i().createElement(ce.W,{placeholder:ht("seriesPlaceholder"),label:ht("seriesLabel"),name:"seriesName",value:t.values.seriesName}),i().createElement(ce.W,{placeholder:ht("companyPlaceholder"),label:ht("companyLabel"),name:"producerCompany",value:t.values.producerCompany}),i().createElement(ce.W,{placeholder:ht("videoTopicPlaceholder"),label:ht("topicLabel"),name:"topic",value:t.values.topic}),i().createElement(ce.W,{placeholder:ht("websiteOrTrailerPlaceholder"),label:ht("websiteOrTrailerLabel"),name:"websiteOrTrailer",value:t.values.websiteOrTrailer}),i().createElement(ce.W,{as:"textarea",placeholder:ht("otherPlaceholder"),label:ht("otherLabel"),name:"additionalInfo",value:t.values.additionalInfo})))}function St(e){var t,n,r=(t=i().useState(!1),n=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,i,o,c=[],l=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(c.push(r.value),c.length!==t);l=!0);}catch(e){s=!0,a=e}finally{try{if(!l&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(s)throw a}}return c}}(t,n)||function(e,t){if(e){if("string"==typeof e)return pt(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)?pt(e,t):void 0}}(t,n)||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.")}()),a=r[0],o=r[1],c=e.hasExchangeTvProduct&&!a;return i().createElement(kt,Object.assign({},e,{initialValues:Object.assign(Object.assign({},gt),e.initialValues),validationSchema:yt,hideButtons:e.hasExchangeTvProduct&&!a}),c&&i().createElement(dt,{setConfirmed:o,setSelectedOption:e.setSelectedOption,exchangeTvUrl:e.exchangeTvUrl}),!c&&i().createElement(Et,{audiences:e.audiences}))}var wt="shared.feedbackSuggestImprovement",Ot=u.T.encloseNamespace(wt),xt={suggestion:"",importance:""},Rt=oe.Ry().shape({suggestion:me().required(ue("requiredError")),importance:me()}).noUnknown();function Tt(e){var t=(0,J.b)();return i().createElement(i().Fragment,null,i().createElement(ce.W,{as:"textarea",placeholder:Ot("suggestionPlaceholder"),label:Ot("suggestionLabel"),name:"suggestion",value:t.values.suggestion,showRequiredStar:!0}),i().createElement(ce.W,{as:"textarea",placeholder:Ot("whySuggestionPlaceholder"),label:Ot("whySuggestionLabel"),name:"importance",rows:5,value:t.values.importance}),i().createElement("p",null,i().createElement(y.x,{namespace:wt,phrase:"contactSupport"})," ",i().createElement("button",{className:"btn btn-link text-underline p-0",onClick:function(){return e.setSelectedOption(q.RAISE_ISSUE)}},i().createElement(y.x,{namespace:wt,phrase:"raiseIssue"}))))}function It(e){return i().createElement(kt,Object.assign({},e,{initialValues:Object.assign(Object.assign({},xt),e.initialValues),validationSchema:Rt,successImageUrl:Z.lightBulb,successHeading:Ot("successHeading"),successDescription:Ot("successDescription")}),i().createElement(Tt,{setSelectedOption:e.setSelectedOption}))}function kt(e){var t=i().useRef(null);return i().createElement(J.n,{onSubmit:e.onSubmit,initialValues:e.initialValues,validationSchema:e.validationSchema,validateOnMount:!0,innerRef:t},i().createElement($.l0,null,"form"===e.formStage&&e.children,i().createElement(ie,{formStage:e.formStage,successImageUrl:e.successImageUrl,successHeading:e.successHeading,successDescription:e.successDescription}),!e.hideButtons&&i().createElement(ne,{setSelectedOption:function(n){e.setFormState((function(e){var n;return Object.assign(Object.assign({},e),null===(n=t.current)||void 0===n?void 0:n.values)})),e.setSelectedOption(n)},submitText:e.submitText,formStage:e.formStage,closePopup:e.closePopup})))}function Lt(e){var t={formStage:e.formStage,initialValues:e.initialValues,setFormState:e.setFormState,onSubmit:e.onSubmit,setSelectedOption:e.setSelectedOption,closePopup:e.closePopup};switch(e.selectedOption){case q.SUGGEST_IMPROVEMENT:return i().createElement(It,Object.assign({},t));case q.REPORT_BUG:return i().createElement(Ye,Object.assign({},t,{onFilesAdded:e.onFilesAdded,cancelUpload:e.cancelUpload,uploadingFiles:e.uploadingFiles,uploadedFiles:e.uploadedFiles,deleteFile:e.deleteFile,uploadError:e.uploadError,instanceRegion:e.instanceRegion}));case q.REQUEST_VIDEO:return i().createElement(St,Object.assign({},t,{audiences:e.audiences,hasExchangeTvProduct:e.hasExchangeTvProduct,exchangeTvUrl:e.exchangeTvUrl}));case q.REQUEST_LIVESTREAM:return i().createElement(ct,Object.assign({},t,{audiences:e.audiences}));case q.RAISE_ISSUE:return i().createElement(Te,Object.assign({},t));case q.GIVE_PRAISE:return i().createElement(he,Object.assign({},t));case q.OTHER:return i().createElement(Se,Object.assign({},t))}}function Ut(e){return Ut="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},Ut(e)}function Nt(){Nt=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,a=Object.defineProperty||function(e,t,n){e[t]=n.value},i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function s(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,n){return e[t]=n}}function u(e,t,n,r){var i=t&&t.prototype instanceof g?t:g,o=Object.create(i.prototype),c=new U(r||[]);return a(o,"_invoke",{value:T(e,n,c)}),o}function m(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var d="suspendedStart",p="suspendedYield",f="executing",v="completed",h={};function g(){}function b(){}function y(){}var E={};s(E,o,(function(){return this}));var S=Object.getPrototypeOf,w=S&&S(S(N([])));w&&w!==n&&r.call(w,o)&&(E=w);var O=y.prototype=g.prototype=Object.create(E);function x(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function R(e,t){function n(a,i,o,c){var l=m(e[a],e,i);if("throw"!==l.type){var s=l.arg,u=s.value;return u&&"object"==Ut(u)&&r.call(u,"__await")?t.resolve(u.__await).then((function(e){n("next",e,o,c)}),(function(e){n("throw",e,o,c)})):t.resolve(u).then((function(e){s.value=e,o(s)}),(function(e){return n("throw",e,o,c)}))}c(l.arg)}var i;a(this,"_invoke",{value:function(e,r){function a(){return new t((function(t,a){n(e,r,t,a)}))}return i=i?i.then(a,a):a()}})}function T(t,n,r){var a=d;return function(i,o){if(a===f)throw Error("Generator is already running");if(a===v){if("throw"===i)throw o;return{value:e,done:!0}}for(r.method=i,r.arg=o;;){var c=r.delegate;if(c){var l=I(c,r);if(l){if(l===h)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(a===d)throw a=v,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);a=f;var s=m(t,n,r);if("normal"===s.type){if(a=r.done?v:p,s.arg===h)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(a=v,r.method="throw",r.arg=s.arg)}}}function I(t,n){var r=n.method,a=t.iterator[r];if(a===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,I(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),h;var i=m(a,t.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,h;var o=i.arg;return o?o.done?(n[t.resultName]=o.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,h):o:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,h)}function k(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function U(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(k,this),this.reset(!0)}function N(t){if(t||""===t){var n=t[o];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,i=function n(){for(;++a<t.length;)if(r.call(t,a))return n.value=t[a],n.done=!1,n;return n.value=e,n.done=!0,n};return i.next=i}}throw new TypeError(Ut(t)+" is not iterable")}return b.prototype=y,a(O,"constructor",{value:y,configurable:!0}),a(y,"constructor",{value:b,configurable:!0}),b.displayName=s(y,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,s(e,l,"GeneratorFunction")),e.prototype=Object.create(O),e},t.awrap=function(e){return{__await:e}},x(R.prototype),s(R.prototype,c,(function(){return this})),t.AsyncIterator=R,t.async=function(e,n,r,a,i){void 0===i&&(i=Promise);var o=new R(u(e,n,r,a),i);return t.isGeneratorFunction(n)?o:o.next().then((function(e){return e.done?e.value:o.next()}))},x(O),s(O,l,"Generator"),s(O,o,(function(){return this})),s(O,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=N,U.prototype={constructor:U,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function a(r,a){return c.type="throw",c.arg=t,n.next=r,a&&(n.method="next",n.arg=e),!!a}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],c=o.completion;if("root"===o.tryLoc)return a("end");if(o.tryLoc<=this.prev){var l=r.call(o,"catchLoc"),s=r.call(o,"finallyLoc");if(l&&s){if(this.prev<o.catchLoc)return a(o.catchLoc,!0);if(this.prev<o.finallyLoc)return a(o.finallyLoc)}else if(l){if(this.prev<o.catchLoc)return a(o.catchLoc,!0)}else{if(!s)throw Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return a(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var i=a;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var o=i?i.completion:{};return o.type=e,o.arg=t,i?(this.method="next",this.next=i.finallyLoc,h):this.complete(o)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),h},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),L(n),h}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var a=r.arg;L(n)}return a}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:N(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),h}},t}function At(e){return function(e){if(Array.isArray(e))return Pt(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Ft(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function jt(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,i,o,c=[],l=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(c.push(r.value),c.length!==t);l=!0);}catch(e){s=!0,a=e}finally{try{if(!l&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(s)throw a}}return c}}(e,t)||Ft(e,t)||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.")}()}function Ft(e,t){if(e){if("string"==typeof e)return Pt(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)?Pt(e,t):void 0}}function Pt(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}var Ct=function(e,t,n,r){return new(n||(n=Promise))((function(a,i){function o(e){try{l(r.next(e))}catch(e){i(e)}}function c(e){try{l(r.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,c)}l((r=r.apply(e,t||[])).next())}))},_t="shared.giveFeedback",Vt=u.T.encloseNamespace(_t),qt=5,Gt=60,Mt=1e6;function Dt(e){var t,n,a=(0,j.Z)(),c=(0,m.useGetFetchAsync)(),u=p.a.useBasicFetch(A.N.currentUser()),x=p.a.useBasicFetch(u.data&&I.h.customer(u.data.customerId)),k=p.a.useBasicFetch(u.data&&A.N.user(u.data.id)),U=jt(i().useState(null),2),C=U[0],_=U[1],V=jt(i().useState("form"),2),M=V[0],D=V[1],B=jt(i().useState(null),2),z=B[0],H=B[1],Z=(0,d.G)(S.D.MixedMediaUpload),X=function(e,t){var n,r,a,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],c=(r=i().useState(!1),a=2,function(e){if(Array.isArray(e))return e}(r)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,i,o,c=[],l=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(c.push(r.value),c.length!==t);l=!0);}catch(e){s=!0,a=e}finally{try{if(!l&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(s)throw a}}return c}}(r,a)||function(e,t){if(e){if("string"==typeof e)return F(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)?F(e,t):void 0}}(r,a)||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.")}())[1];return i().useEffect((function(){var n=e();if(n)return n.off("add remove change"),n.on("add remove change",(function(){c((function(e){return!e}))})),t&&n.on("remove",t),function(){n.off("add remove change")}}),o),null===(n=e())||void 0===n?void 0:n.toJSON()}((function(){return Z.getCollection()}),null),Q=i().useRef(),Y=i().useRef(0),$=i().useRef([]),J=jt(i().useState([]),2),ee=J[0],te=J[1],ne=jt(i().useState(""),2),re=ne[0],ae=ne[1],ie=e.product===O.x.StreamableLearning?w.R.StreamableLearning:w.R.Subject,oe=p.a.useBasicFetch(T.x.presentation(ie)),ce=p.a.useBasicFetch(R.presentationAudiences(null,ie)),le=null===(t=p.a.useBasicFetch(N.userProducts()).data)||void 0===t?void 0:t.find((function(e){return e.id===O.x.Exchange}));function se(e){_(e),e&&f.k.logUserAction({type:e},{actionType:v.Vw.Click,entity:v.py.Feedback,location:v.LZ.GiveFeedbackPopup,workflowPhase:v.eu.Start})}function ue(e){switch(e){case q.SUGGEST_IMPROVEMENT:return r.SuggestImprovement;case q.REPORT_BUG:return r.ReportBug;case q.REQUEST_VIDEO:return r.RequestVideo;case q.REQUEST_LIVESTREAM:return r.RequestLivestream;case q.GIVE_PRAISE:return r.GivePraise;case q.RAISE_ISSUE:return r.RaiseIssue;case q.OTHER:return r.Other}}return(0,P.L)(o.Radio.channel(E.Q4.MIXED_MEDIA_UPLOAD),h.S.UPLOAD_COMPLETE,(function(e){var t=e.toJSON();if($.current.push(t),Y.current--,!(Y.current>0)){var n=$.current.length;$.current.forEach((function(e){setTimeout((function(){n--;var t=Z.getCollection().filter((function(t){var n;return(null===(n=t.get("fileInfo"))||void 0===n?void 0:n.id)===e.fileInfo.id}));Z.getCollection().remove(t),te((function(e){return[].concat(At(e),At(t))})),n>0||(f.k.logUserAction({fileInfo:e.fileInfo},{location:v.LZ.GiveFeedbackPopup,actionType:v.Vw.Upload,entity:v.py.MixedMedia,descriptor:f.k.mapInteractionType(Q.current)}),a.success(Vt("mixedMediaUploadSuccess")))}))})),$.current=[]}})),i().createElement(b.G,{size:"lg",title:C?W(C):Vt("title"),closePopup:e.closePopup,backdrop:"static"},!C&&i().createElement("p",null,i().createElement(y.x,{namespace:_t,phrase:"description"})),!C&&i().createElement(K,{onSelectOption:se,options:[q.SUGGEST_IMPROVEMENT,q.REPORT_BUG,e.product===O.x.StreamableLearning?q.REQUEST_LIVESTREAM:q.REQUEST_VIDEO,q.GIVE_PRAISE,q.RAISE_ISSUE,q.OTHER]}),C&&i().createElement(Lt,{selectedOption:C,formStage:M,onSubmit:function(t,n){var r,i,o,l,m,d;return Ct(this,void 0,void 0,Nt().mark((function p(){var h,g;return Nt().wrap((function(p){for(;;)switch(p.prev=p.next){case 0:return h={type:ue(C),user:G.getUserInfo(u.data,x.data),tags:G.getTags(u.data,e.product,!1,["give feedback",W(C).toLowerCase(),null===(i=null===(r=oe.data)||void 0===r?void 0:r.description)||void 0===i?void 0:i.toLowerCase().trim(),null===(d=null===(m=null===(l=null===(o=k.data)||void 0===o?void 0:o.userProfile)||void 0===l?void 0:l.metadata)||void 0===m?void 0:m.jobTitle)||void 0===d?void 0:d.toLowerCase()].filter(Boolean))},g=Object.assign(Object.assign({},t),{currentPageUrl:s.Ab.GetCurrentUrl()}),C===q.REPORT_BUG&&ee.length&&(g=Object.assign(Object.assign({},g),G.categorizeFiles(ee))),p.prev=3,p.next=6,c(L.submitFeedback(h,g));case 6:f.k.logUserAction(Object.assign(Object.assign({},h),g),{actionType:v.Vw.Submit,entity:v.py.Feedback,location:v.LZ.GiveFeedbackPopup,workflowPhase:v.eu.Complete}),D("success"),p.next=13;break;case 10:p.prev=10,p.t0=p.catch(3),a.error(Vt("error"));case 13:return p.prev=13,n(),p.finish(13);case 16:case"end":return p.stop()}}),p,null,[[3,10,13,16]])})))},setSelectedOption:se,closePopup:e.closePopup,onFilesAdded:function(e,t){e.some((function(e){return e.size>Gt*Mt}))?ae(Vt("maxFileSizeUploadError",{limit:Gt})):e.length>qt-X.length?ae(Vt("maxFilesUploadError",{limit:qt})):e.some((function(e){return!l().isValidFile(e,g.l.MIXED_MEDIA)}))?ae(Vt("invalidTypeUploadError")):(ae(""),Y.current+=e.length,t&&(Q.current=t),Z.addFiles(e))},uploadingFiles:X,uploadedFiles:ee,deleteFile:function(e){te((function(t){return t.filter((function(t){return t.id!==e}))}))},cancelUpload:function(e){return Z.cancelUpload(e)},audiences:ce.data,uploadError:re,initialValues:z,setFormState:H,instanceRegion:null===(n=u.data)||void 0===n?void 0:n.instanceRegion,hasExchangeTvProduct:!!le,exchangeTvUrl:null==le?void 0:le.url}))}}}]);