@clickview/library-editor 1.16.1-dev.0 → 1.16.1-rc.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (163) hide show
  1. package/dist/bundles.json +2 -2
  2. package/dist/css/{2227-library-editor-0d09b13673.chunk.css → 2227-library-editor-9bc11aebb1.chunk.css} +1 -1
  3. package/dist/css/{969-library-editor-c6e04e5107.chunk.css → 4274-library-editor-2e7ad56bc8.chunk.css} +9 -1
  4. package/dist/css/{58-library-editor-6b4606a972.chunk.css → 6833-library-editor-cf78223244.chunk.css} +10 -1
  5. package/dist/css/{library-editor-app-0f73fdab81.css → library-editor-app-bb91d6169b.css} +1 -1
  6. package/dist/languages/en.json +1 -1
  7. package/dist/scripts/101-882794aeb8.chunk.js +1 -0
  8. package/dist/scripts/1010-deb50c7ea4.chunk.js +1 -0
  9. package/dist/scripts/1086-c589e7a188.chunk.js +1 -0
  10. package/dist/scripts/1203-81d0661e18.chunk.js +1 -0
  11. package/dist/scripts/1216-7f24ede8e0.chunk.js +1 -0
  12. package/dist/scripts/1269-0663125949.chunk.js +1 -0
  13. package/dist/scripts/1364-3cdf7e5e62.chunk.js +1 -0
  14. package/dist/scripts/1409-061e3f9029.chunk.js +1 -0
  15. package/dist/scripts/1492-e352aa8d88.chunk.js +1 -0
  16. package/dist/scripts/1601-1ef0e562fc.chunk.js +2 -0
  17. package/dist/scripts/1671-f88be3329a.chunk.js +1 -0
  18. package/dist/scripts/1832-4939bef81a.chunk.js +1 -0
  19. package/dist/scripts/1887-10d9bb03cb.chunk.js +1 -0
  20. package/dist/scripts/1911-23568f6138.chunk.js +1 -0
  21. package/dist/scripts/2227-af3bb5232c.chunk.js +2 -0
  22. package/dist/scripts/243-7bb390ea4d.chunk.js +1 -0
  23. package/dist/scripts/259-fdac3828c2.chunk.js +1 -0
  24. package/dist/scripts/2692-a74b07a169.chunk.js +1 -0
  25. package/dist/scripts/{2802-2218d4b4bb.chunk.js → 2802-af98ef08cd.chunk.js} +1 -1
  26. package/dist/scripts/2803-29511f028a.chunk.js +1 -0
  27. package/dist/scripts/2888-eec152c5f5.chunk.js +1 -0
  28. package/dist/scripts/299-e581e06f46.chunk.js +1 -0
  29. package/dist/scripts/3096-3b816591ce.chunk.js +1 -0
  30. package/dist/scripts/3400-d4b59083ef.chunk.js +1 -0
  31. package/dist/scripts/3639-63ad27fb38.chunk.js +1 -0
  32. package/dist/scripts/3746-1f13b0764f.chunk.js +1 -0
  33. package/dist/scripts/3763-f486c7b891.chunk.js +1 -0
  34. package/dist/scripts/4000-9ac17853ea.chunk.js +1 -0
  35. package/dist/scripts/4177-d135a23ab6.chunk.js +1 -0
  36. package/dist/scripts/4201-84129dfc88.chunk.js +1 -0
  37. package/dist/scripts/4245-a95daa8056.chunk.js +1 -0
  38. package/dist/scripts/4274-3eb2257694.chunk.js +1 -0
  39. package/dist/scripts/4591-706f7173dd.chunk.js +1 -0
  40. package/dist/scripts/4830-a10093b5d2.chunk.js +1 -0
  41. package/dist/scripts/4860-f9a7be96c8.chunk.js +1 -0
  42. package/dist/scripts/4885-7c1d78dd3d.chunk.js +1 -0
  43. package/dist/scripts/4993-1e2baa25b7.chunk.js +1 -0
  44. package/dist/scripts/514-520d9e5687.chunk.js +1 -0
  45. package/dist/scripts/{5173-088a10449c.chunk.js → 5173-02a0713c0b.chunk.js} +1 -1
  46. package/dist/scripts/5235-d8a1857ab9.chunk.js +1 -0
  47. package/dist/scripts/5412-3b77eef79d.chunk.js +1 -0
  48. package/dist/scripts/5418-8318e5971b.chunk.js +1 -0
  49. package/dist/scripts/5424-164897f2cf.chunk.js +1 -0
  50. package/dist/scripts/546-7f77850497.chunk.js +1 -0
  51. package/dist/scripts/5747-c7570a4dee.chunk.js +1 -0
  52. package/dist/scripts/{5891-12bda30b4c.chunk.js → 5891-784e65ff2e.chunk.js} +1 -1
  53. package/dist/scripts/6093-e000b9f0a3.chunk.js +1 -0
  54. package/dist/scripts/6220-3273db4569.chunk.js +1 -0
  55. package/dist/scripts/6357-d37e948f5e.chunk.js +1 -0
  56. package/dist/scripts/6505-8ae1da1dfa.chunk.js +1 -0
  57. package/dist/scripts/6732-73f12b3316.chunk.js +1 -0
  58. package/dist/scripts/6756-73653a9e01.chunk.js +1 -0
  59. package/dist/scripts/6774-3b27ee5b7d.chunk.js +1 -0
  60. package/dist/scripts/6788-d25db35e6c.chunk.js +1 -0
  61. package/dist/scripts/6833-36be90324c.chunk.js +1 -0
  62. package/dist/scripts/{6963-473a09e985.chunk.js → 6963-222d163a4b.chunk.js} +1 -1
  63. package/dist/scripts/6995-6be8d799d2.chunk.js +1 -0
  64. package/dist/scripts/6999-9284afd732.chunk.js +1 -0
  65. package/dist/scripts/7002-baa9e9e285.chunk.js +1 -0
  66. package/dist/scripts/7053-cce5055ceb.chunk.js +1 -0
  67. package/dist/scripts/708-44fa959bcc.chunk.js +1 -0
  68. package/dist/scripts/{7190-3632c1b97b.chunk.js → 7190-aa3f4b4ba1.chunk.js} +1 -1
  69. package/dist/scripts/7376-e3e7d54126.chunk.js +1 -0
  70. package/dist/scripts/755-03d4567c99.chunk.js +1 -0
  71. package/dist/scripts/7634-bcbee3cbfc.chunk.js +1 -0
  72. package/dist/scripts/8362-ccb5f61d03.chunk.js +1 -0
  73. package/dist/scripts/8727-86d52bc39b.chunk.js +1 -0
  74. package/dist/scripts/8762-ab438942a2.chunk.js +1 -0
  75. package/dist/scripts/8906-e6be28b199.chunk.js +1 -0
  76. package/dist/scripts/8947-50189acd36.chunk.js +1 -0
  77. package/dist/scripts/9357-cac07c3362.chunk.js +1 -0
  78. package/dist/scripts/{9379-12465b685a.chunk.js → 9379-dc10121a03.chunk.js} +1 -1
  79. package/dist/scripts/9695-b789b2a9be.chunk.js +1 -0
  80. package/dist/scripts/9927-773e307959.chunk.js +1 -0
  81. package/dist/scripts/9976-aa31d18e61.chunk.js +1 -0
  82. package/dist/scripts/bundle-eb490e61aa.min.js +2 -0
  83. package/package.json +2 -2
  84. package/dist/scripts/101-d96e2f6c30.chunk.js +0 -1
  85. package/dist/scripts/1010-9322c39308.chunk.js +0 -1
  86. package/dist/scripts/1086-65173e4f6f.chunk.js +0 -1
  87. package/dist/scripts/1203-50f5844bcc.chunk.js +0 -1
  88. package/dist/scripts/1216-7a9f411abd.chunk.js +0 -1
  89. package/dist/scripts/1269-391b95a348.chunk.js +0 -1
  90. package/dist/scripts/1364-2540e700a9.chunk.js +0 -1
  91. package/dist/scripts/1409-9ca416a3a6.chunk.js +0 -1
  92. package/dist/scripts/1601-4fee3d2336.chunk.js +0 -2
  93. package/dist/scripts/1832-84b066cd22.chunk.js +0 -1
  94. package/dist/scripts/1887-59656a5c74.chunk.js +0 -1
  95. package/dist/scripts/1911-fb86f6cf48.chunk.js +0 -1
  96. package/dist/scripts/2227-fa9bef889f.chunk.js +0 -2
  97. package/dist/scripts/243-6b31d75a3e.chunk.js +0 -1
  98. package/dist/scripts/259-14636ed69c.chunk.js +0 -1
  99. package/dist/scripts/2692-2bd19c2b39.chunk.js +0 -1
  100. package/dist/scripts/2803-c102b0ab98.chunk.js +0 -1
  101. package/dist/scripts/2888-7a0e8d2574.chunk.js +0 -1
  102. package/dist/scripts/299-529b3d1c71.chunk.js +0 -1
  103. package/dist/scripts/3096-3ca8e8973f.chunk.js +0 -1
  104. package/dist/scripts/3400-181a33c06f.chunk.js +0 -1
  105. package/dist/scripts/3639-69c8ac5224.chunk.js +0 -1
  106. package/dist/scripts/3746-5e91d1f43b.chunk.js +0 -1
  107. package/dist/scripts/3763-99ac8ff777.chunk.js +0 -1
  108. package/dist/scripts/4000-a623369bef.chunk.js +0 -1
  109. package/dist/scripts/4177-719ae5d83e.chunk.js +0 -1
  110. package/dist/scripts/4201-8af865508e.chunk.js +0 -1
  111. package/dist/scripts/4245-1eba9c3cf2.chunk.js +0 -1
  112. package/dist/scripts/4353-ec529c5ba1.chunk.js +0 -1
  113. package/dist/scripts/4591-c6ba353e39.chunk.js +0 -1
  114. package/dist/scripts/4830-e87392f843.chunk.js +0 -1
  115. package/dist/scripts/4860-3da347c5a2.chunk.js +0 -1
  116. package/dist/scripts/4885-cc2e3d4f81.chunk.js +0 -1
  117. package/dist/scripts/514-bea172c18c.chunk.js +0 -1
  118. package/dist/scripts/5235-b6c96f2729.chunk.js +0 -1
  119. package/dist/scripts/5412-273d33a674.chunk.js +0 -1
  120. package/dist/scripts/5418-32716c915a.chunk.js +0 -1
  121. package/dist/scripts/5424-208acbb259.chunk.js +0 -1
  122. package/dist/scripts/546-a82365178d.chunk.js +0 -1
  123. package/dist/scripts/5747-fea829f6ed.chunk.js +0 -1
  124. package/dist/scripts/58-69552d3a8a.chunk.js +0 -1
  125. package/dist/scripts/6093-8b76178c29.chunk.js +0 -1
  126. package/dist/scripts/6220-36949a4ae4.chunk.js +0 -1
  127. package/dist/scripts/6732-fdb443a7b2.chunk.js +0 -1
  128. package/dist/scripts/6774-1322f42232.chunk.js +0 -1
  129. package/dist/scripts/6788-3450bef42f.chunk.js +0 -1
  130. package/dist/scripts/6995-5aa2da66d8.chunk.js +0 -1
  131. package/dist/scripts/6999-deb99c2bc6.chunk.js +0 -1
  132. package/dist/scripts/7002-cc2ef03644.chunk.js +0 -1
  133. package/dist/scripts/7053-f60b518071.chunk.js +0 -1
  134. package/dist/scripts/708-a654139b29.chunk.js +0 -1
  135. package/dist/scripts/7136-63abefe108.chunk.js +0 -1
  136. package/dist/scripts/7295-78d818c45e.chunk.js +0 -1
  137. package/dist/scripts/7376-0cb303b67a.chunk.js +0 -1
  138. package/dist/scripts/7634-0af03f5b05.chunk.js +0 -1
  139. package/dist/scripts/8362-3956de64fc.chunk.js +0 -1
  140. package/dist/scripts/8727-f4069ff97d.chunk.js +0 -1
  141. package/dist/scripts/8762-d2131ead72.chunk.js +0 -1
  142. package/dist/scripts/8906-6ebd80b566.chunk.js +0 -1
  143. package/dist/scripts/8947-fdf495502b.chunk.js +0 -1
  144. package/dist/scripts/9040-5117f20224.chunk.js +0 -1
  145. package/dist/scripts/9268-6b2b1cd07c.chunk.js +0 -1
  146. package/dist/scripts/9357-985ceb4f17.chunk.js +0 -1
  147. package/dist/scripts/9383-65c422d821.chunk.js +0 -1
  148. package/dist/scripts/969-85e83a6a9b.chunk.js +0 -1
  149. package/dist/scripts/9695-6ad5f06aef.chunk.js +0 -1
  150. package/dist/scripts/9927-998d2ca69d.chunk.js +0 -1
  151. package/dist/scripts/9976-0072a2700d.chunk.js +0 -1
  152. package/dist/scripts/bundle-b610b4e8f2.min.js +0 -2
  153. /package/dist/css/{7295-library-editor-cdf829452c.chunk.css → 1492-library-editor-cdf829452c.chunk.css} +0 -0
  154. /package/dist/css/{7136-library-editor-bd1f6e2ee3.chunk.css → 1671-library-editor-bd1f6e2ee3.chunk.css} +0 -0
  155. /package/dist/css/{9383-library-editor-c6a9216107.chunk.css → 6505-library-editor-c6a9216107.chunk.css} +0 -0
  156. /package/dist/css/{4353-library-editor-7a8f34cf74.chunk.css → 6756-library-editor-7a8f34cf74.chunk.css} +0 -0
  157. /package/dist/scripts/{1601-4fee3d2336.chunk.js.LICENSE.txt → 1601-1ef0e562fc.chunk.js.LICENSE.txt} +0 -0
  158. /package/dist/scripts/{2227-fa9bef889f.chunk.js.LICENSE.txt → 2227-af3bb5232c.chunk.js.LICENSE.txt} +0 -0
  159. /package/dist/scripts/{2802-2218d4b4bb.chunk.js.LICENSE.txt → 2802-af98ef08cd.chunk.js.LICENSE.txt} +0 -0
  160. /package/dist/scripts/{3969-a22b097163.chunk.js → 3969-2a1261acad.chunk.js} +0 -0
  161. /package/dist/scripts/{8495-c2a8d27ffa.chunk.js → 8495-80e0f9737d.chunk.js} +0 -0
  162. /package/dist/scripts/{9770-f16965ec13.chunk.js → 9770-d498ca5470.chunk.js} +0 -0
  163. /package/dist/scripts/{bundle-b610b4e8f2.min.js.LICENSE.txt → bundle-eb490e61aa.min.js.LICENSE.txt} +0 -0
@@ -1 +0,0 @@
1
- (self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[6999],{46814:function(e,t,n){"use strict";n.r(t),n.d(t,{PastReleasesView:function(){return Y}});var i=n(39479),r=n(31647),o=n(21679),a=n(57857),s=n(70065),l=n(52076),c=n(47022),u=n(36357),f=n(71192),h=n(70763),d=n(29457),p=n(48090),y=n(58688),v=n(48404),g=n(19226),b=n(3059),m=n(95061),w=n(39090),C=(n(14129),n(7572)),S=n(46415),k=n(56750),P=n.n(k),R=n(8614),O=n(7170),E=n(5344);function T(e){return T="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},T(e)}function V(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function j(e,t){return j=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},j(e,t)}function _(e,t){if(t&&("object"===T(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function L(e){return L=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},L(e)}var N=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&j(e,t)}(a,e);var t,n,i,r,o=(i=a,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=L(i);if(r){var n=L(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return _(this,e)});function a(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),o.call(this,e)}return t=a,(n=[{key:"name",get:function(){return"PastReleasesFiltersComponent"}},{key:"template",get:function(){return P()}},{key:"lang",get:function(){return"contentUpdates.pastReleasesFilters"}},{key:"regions",value:function(){return{filterList:{el:".filter-list-region",replaceRegion:!1,partialLoading:d.LP.PastReleasesSearchFilter}}}},{key:"getVisibleFilters",value:function(){return new O.y(this.collection.filter((function(e){return E.qr.showFilter(e)})))}},{key:"renderFilterList",value:function(){var e=new R.$V({collection:this.getVisibleFilters(),channelName:this.options.channelName});this.showChildView("filterList",e)}},{key:"onBeforeRender",value:function(){return!!this.collection}},{key:"onRender",value:function(){this.renderFilterList()}}])&&V(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(r.Q.Component),I=n(48088),D=n(68536),F=n.n(D);function U(e){return U="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},U(e)}function x(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function M(e,t){return M=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},M(e,t)}function A(e,t){if(t&&("object"===U(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function G(e){return G=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},G(e)}var H=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&M(e,t)}(a,e);var t,n,i,r,o=(i=a,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=G(i);if(r){var n=G(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return A(this,e)});function a(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),o.call(this,e)}return t=a,(n=[{key:"name",get:function(){return"PastReleasesHeaderComponent"}},{key:"props",get:function(){return["filterCollection"]}},{key:"lang",get:function(){return"contentUpdates.pastReleasesHeader"}},{key:"className",get:function(){return"d-flex justify-content-between align-items-center p-3 border-bottom"}},{key:"template",get:function(){return F()}},{key:"regions",value:function(){return{filters:{el:".filters-region"}}}},{key:"events",value:function(){return{"click .generate-pdf":"onClickGeneratePdf"}}},{key:"onClickGeneratePdf",value:function(){I.Radio.channel(this.options.channelName).trigger("generate:pdf")}},{key:"renderFilters",value:function(){var e=new N({collection:this.filterCollection,channelName:this.options.channelName});this.showChildView("filters",e)}},{key:"viewOptions",value:function(){return{showGeneratePdf:this.options.showGeneratePdf}}},{key:"onRender",value:function(){this.renderFilters()}}])&&x(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(r.Q.Component),Q=n(82405),W=n(73616),B=n(29565),q=n(69711),z=n.n(q);function J(e){return J="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},J(e)}function X(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function K(e,t){return K=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},K(e,t)}function Z(e,t){if(t&&("object"===J(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function $(e){return $=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},$(e)}var Y=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&K(e,t)}(O,e);var t,n,k,P,R=(k=O,P=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=$(k);if(P){var n=$(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return Z(this,e)});function O(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,O),R.call(this,e)}return t=O,(n=[{key:"initialize",value:function(){this.bindListeners(),this.settingsDataService=o.u.getInstance(p.Or.Settings,this),this.contentUpdatesDataService=o.u.getInstance(p.Or.ContentUpdates,this),this.videoDataService=o.u.getInstance(p.Or.Video,this),this.libraryDataService=o.u.getInstance(p.Or.Library,this),this.videoMixinService=o.u.getInstance(p.K9.VideoMixin,this)}},{key:"name",get:function(){return"PastReleasesView"}},{key:"title",get:function(){return a.T.getPhrase(this.lang,"title")}},{key:"lang",get:function(){return"contentUpdates.pastReleases"}},{key:"channelName",get:function(){return"".concat(this.name).concat(this.cid)}},{key:"className",get:function(){return"bg-white rounded"}},{key:"template",get:function(){return z()}},{key:"regions",value:function(){return{header:{el:".header-region",replaceElement:!0},leftNav:{el:".left-nav-region",replaceElement:!0},listHeader:{el:".list-header-region",replaceElement:!0},videos:{el:".video-list-region",replaceElement:!0,partialLoading:d.LP.VideoGroupList},pagination:{el:".pagination-region",replaceElement:!0}}}},{key:"bindListeners",value:function(){this.listenTo(p.Vk.SETTINGS,"".concat(p.M_.CUSTOMER_SETTINGS,":sync ").concat(p.M_.USER_SETTINGS,":sync"),this.render),this.listenTo(this.channelName,"generate:pdf",this.onClickGeneratePdf),this.listenTo(p.Vk.RESTRICTED_VIDEO,"".concat(p.M_.UPDATE_VIDEO_RESTRICTION,":sync"),this.updateRestrictedVideos),this.listenTo(this.channelName,p.Vy.Filters.FILTER_CHANGED,i.debounce(this.onFilterChange,100)),this.listenTo(this.channelName,"fetch:video:with:metadata",this.fetchVideoWithMetadata)}},{key:"initializeFilterCollection",value:function(){var e=this;this.filterCollection||this.libraryDataService.getHostedLibraries((function(t){return e.onLibrariesSync(t)}))}},{key:"onLibrariesSync",value:function(e){var t=this;this.filterCollection||(this.libraryIds=w.RF.getLibraryIds(this.options.queryParams[W.g.Libraries],e),this.subjectCollectionIdentifier=new b.xw({dateQueryString:this.options.queryParams[W.g.ReleaseDate],libraryIds:this.libraryIds}),this.contentUpdatesDataService.getRecentVideoSubjects(this.subjectCollectionIdentifier,(function(n){return t.onSubjectsSync(e,n)})))}},{key:"onSubjectsSync",value:function(e,t){var n=w.RF.getSubjectOptions(t);this.filterCollection=w.RF.getFilterCollection(e,n,this.options.queryParams);var i=w.RF.getSelectedSubjects(this.filterCollection),r=n.length>1&&n.length===i.length;this.videoCollectionIdentifier=new b.IJ({dateQueryString:this.options.queryParams[W.g.ReleaseDate],libraryIds:this.libraryIds,subjects:!r&&i,cursor:this.options.queryParams.cursor}),this.listenTo(p.Vk.CONTENT_UPDATES,"".concat(this.videoCollectionIdentifier.toString(),":sync"),this.render),this.fetchVideos()}},{key:"setVideosWithMetadata",value:function(){this.videoCollection&&!this.videosWithMetadata&&(this.videosWithMetadata=new h.t(this.videoCollection.map((function(e){return new f.n({id:e.get("id")})}))))}},{key:"updateRestrictedVideos",value:function(){var e=this;this.videoMixinService.getAndMixinVideoCollectionRestrictions(this.videoCollection,null,(function(){return e.render()}))}},{key:"onFilterChange",value:function(){r.Q.AppLinkHelper.trigger({application:p.OV.CONTENT_UPDATES,action:p.eX.ContentUpdates.PAST_RELEASES,params:w.RF.getRouteQueryParams(this.filterCollection)})}},{key:"onClickGeneratePdf",value:function(){this.videoCollection.length&&(r.Q.AppLinkHelper.trigger({application:p.OV.CONTENT_UPDATES,action:p.eX.ContentUpdates.GENERATE_PDF,params:w.RF.getRouteQueryParams(this.filterCollection)}),this.logPdfAction())}},{key:"getContentClassName",value:function(){var e=B.Z.content;return this.reviewSetting&&this.reviewSetting.get("value")?e+=" d-inline-block border-left ".concat(B.Z.contentWithLeftNav):e+=" w-100",e}},{key:"logPdfAction",value:function(){var e={location:s.LocationContext.PastReleasesHeader,actionType:s.UserAction.Create,entity:s.EntityType.PDF,workflowPhase:s.WorkflowPhase.Start},t=w.RF.getSelectedSubjects(this.filterCollection),n=w.RF.getSelectedReleaseDate(this.filterCollection),i={libraries:this.libraryIds.join(","),subjects:t.map((function(e){return e.get("name")})).join(","),releaseDate:n.get("name")};l.k.logUserAction(i,e)}},{key:"renderHeader",value:function(){this.reviewSetting?this.showChildView("header",new C.u({activeTab:w.JI.PastReleases,reviewEnabled:this.reviewSetting.get("value")})):this.renderPartialLoading("header")}},{key:"renderLeftNav",value:function(){this.reviewSetting&&this.reviewSetting.get("value")&&this.showChildView("leftNav",new S.m({supportSiteUrl:this.config.get("supportSiteUrl"),currentUser:this.currentUser}))}},{key:"renderListHeader",value:function(){this.showChildView("listHeader",new H({filterCollection:this.filterCollection,channelName:this.channelName,showGeneratePdf:!!this.videoCollection&&!!this.videoCollection.length}))}},{key:"renderVideos",value:function(){this.config&&this.groupedVideoCollection?this.showChildView("videos",new Q.D({collection:this.groupedVideoCollection,childOptions:{config:this.config,videoItemComponentType:y.U.PastReleases,videosWithMetadata:this.videosWithMetadata,customerHasCustomLibrary:this.customLibraries&&!!this.customLibraries.length,collectionViewChannel:this.channelName,currentUser:this.currentUser,libraries:this.customLibraries},emptyStateType:d.ub.PastReleases,emptyStateOptions:{heading:a.T.getPhrase(this.lang,"emptyState")}})):this.renderPartialLoading("videos")}},{key:"renderPagination",value:function(){if(this.videoCollection){var e=this.contentUpdatesDataService.getVideoCollectionCursors(this.videoCollectionIdentifier),t=new c.Q({cursors:e,appLink:{application:p.OV.CONTENT_UPDATES,action:p.eX.ContentUpdates.PAST_RELEASES,params:w.RF.getRouteQueryParams(this.filterCollection)}});this.showChildView("pagination",t)}}},{key:"fetchVideos",value:function(){this.filterCollection&&!this.videoCollection&&(this.videoCollection=this.contentUpdatesDataService.getRecentVideos(this.videoCollectionIdentifier),this.videoCollection&&(this.setVideosWithMetadata(),this.groupedVideoCollection=w.RF.groupVideosByReleaseMonth(this.videoCollection)))}},{key:"fetchVideoWithMetadata",value:function(e){var t=this;this.videoDataService.getVideo(e,(function(n){var i=t.videosWithMetadata.get(e);i&&(i.set(n.toJSON()),i.set({dataFetched:!0}))}))}},{key:"requiredResources",get:function(){return{config:v.p.config,currentUser:g.K.currentUser,customLibraries:m.T.libraries}}},{key:"onBeforeRender",value:function(){this.initializeFilterCollection(),this.fetchVideos(),this.videoCollection&&(this.groupedVideoCollection=w.RF.groupVideosByReleaseMonth(this.videoCollection)),this.reviewSetting=this.settingsDataService.getSetting(this.currentUser.get("customerId"),u.E.LibraryReview)}},{key:"viewOptions",value:function(){return{showLeftNav:this.reviewSetting&&this.reviewSetting.get("value"),contentClass:this.getContentClassName()}}},{key:"onRender",value:function(){this.renderHeader(),this.renderLeftNav(),this.renderListHeader(),this.renderVideos(),this.renderPagination()}}])&&X(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),O}(r.Q.View)},56750:function(e,t,n){var i=n(32227);e.exports=(i.default||i).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,i,r){return e.propertyIsEnumerable,'<div class="d-inline-block border-right py-1 pr-3"><strong>'+e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"filters",{name:"lang",hash:{},data:r}))+'</strong></div>\n<div class="filter-list-region d-inline-block pl-2"></div>'},useData:!0})},68536:function(e,t,n){var i=n(32227);e.exports=(i.default||i).template({1:function(e,t,n,i,r){return e.propertyIsEnumerable,'<button class="generate-pdf btn btn-outline-dark d-inline-block" type="button">'+e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"generatePdf",{name:"lang",hash:{},data:r}))+"</button>\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,i,r){var o;return e.propertyIsEnumerable,'<div class="filters-region d-inline-block"></div>\n'+(null!=(o=n.if.call(null!=t?t:e.nullContext||{},null!=(o=null!=t?t.options:t)?o.showGeneratePdf:o,{name:"if",hash:{},fn:e.program(1,r,0),inverse:e.noop,data:r}))?o:"")},useData:!0})},69711:function(e,t,n){var i=n(32227);e.exports=(i.default||i).template({1:function(e,t,n,i,r){return'<div class="left-nav-region"></div>'},compiler:[8,">= 4.3.0"],main:function(e,t,n,i,r){var o;return e.propertyIsEnumerable,'<div class="header-region"></div>\n'+(null!=(o=n.if.call(null!=t?t:e.nullContext||{},null!=(o=null!=t?t.options:t)?o.showLeftNav:o,{name:"if",hash:{},fn:e.program(1,r,0),inverse:e.noop,data:r}))?o:"")+'<div class="'+e.escapeExpression(e.lambda(null!=(o=null!=t?t.options:t)?o.contentClass:o,t))+'">\n<div class="list-header-region"></div>\n<div class="video-list-region"></div>\n<div class="pagination-region"></div>\n</div>'},useData:!0})}}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[7002],{24828:function(t,e,n){"use strict";n.d(e,{o:function(){return o}});var o=["bg-pink","bg-orange"].concat(["bg-green","bg-cyan","bg-teal","bg-blue","bg-indigo","bg-purple"])},22231:function(t,e,n){"use strict";function o(t,e){return e[t.charCodeAt(0)%e.length]}n.d(e,{x:function(){return o}})},91439:function(t,e,n){"use strict";n.d(e,{u:function(){return h}});var o=n(39479),r=n(48088),i=n(31647),a=n(63791),c=n(48090),l=n(93421),s="C8gyn";function u(t){return u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},u(t)}function p(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}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,o.key,o)}}function y(t,e){return y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},y(t,e)}function d(t,e){if(e&&("object"===u(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function b(t){return b=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},b(t)}var h=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&y(t,e)}(g,t);var e,n,i,u,h=(i=g,u=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=b(i);if(u){var n=b(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return d(this,t)});function g(){return p(this,g),h.apply(this,arguments)}return e=g,(n=[{key:"getClassMappings",value:function(){return{"ui-draggable":l.W2.draggable,"ui-draggable-handle":l.W2.handle,"ui-draggable-disabled":l.W2.disabled,"ui-draggable-dragging":l.W2.dragging}}},{key:"helper",value:function(){return new l.ND({text:this.view.model.get("name"),svg:a.Nj.getSvg(a.vn.Folder)}).render().el}},{key:"start",value:function(){r.Radio.channel(c.jr.FOLDER_DRAG_DROP).trigger("drag:start",this.view.model),this.view.$el.addClass(s)}},{key:"stop",value:function(){r.Radio.channel(c.jr.FOLDER_DRAG_DROP).trigger("drag:stop"),this.view.$el.removeClass(s)}},{key:"onRender",value:function(){var t={helper:o.bind(this.helper,this),start:o.bind(this.start,this),stop:o.bind(this.stop,this)};t.classes=this.getClassMappings(),this.view.$el.draggable(o.extend({},l.wc,t))}},{key:"onBeforeDestroy",value:function(){this.view.$el.draggable("instance")&&this.view.$el.draggable("destroy")}}])&&f(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),g}(i.Q.Behavior)},6929:function(t,e,n){"use strict";n.d(e,{x:function(){return d}});var o=n(39479),r=n(48088),i=n(31647),a=n(50997),c=n(10454);function l(t){return l="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},l(t)}function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}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,o.key,o)}}function p(t,e){return p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},p(t,e)}function f(t,e){if(e&&("object"===l(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function y(t){return y=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},y(t)}var d=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&p(t,e)}(b,t);var e,n,i,l,d=(i=b,l=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=y(i);if(l){var n=y(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return f(this,t)});function b(){return s(this,b),d.apply(this,arguments)}return e=b,(n=[{key:"initialize",value:function(){this.listenTo(a.jr.VIDEO_DRAG_DROP,"drag:stop",this.stop),this.listenTo(a.jr.FOLDER_DRAG_DROP,"drag:stop",this.stop)}},{key:"getDroppableElement",value:function(){return this.options.ui?this.view.getUI(this.options.ui):this.$el}},{key:"drop",value:function(){var t=this;o.each(this.options.channelNames,(function(e){r.Radio.channel(e).trigger("drag:drop",t.view.model,t.options.analyticsOptions)}))}},{key:"accept",value:function(){var t=this,e=!1;return o.each(this.options.channelNames,(function(n){!0===r.Radio.channel(n).request("accept",t.view.model)&&(e=!0)})),e||(this.disabledElement=this.getDroppableElement(),this.disabledElement.addClass(c.Z.disabled)),e}},{key:"stop",value:function(){var t;null===(t=this.disabledElement)||void 0===t||t.removeClass(c.Z.disabled)}},{key:"over",value:function(){var t=this;this.isHoveringOver=!0,window.setTimeout((function(){t.isHoveringOver&&t.view.trigger("open:sub:folders",c.Z.active)}),500)}},{key:"out",value:function(){this.isHoveringOver=!1}},{key:"onRender",value:function(){var t={tolerance:"pointer",drop:o.bind(this.drop,this),accept:o.bind(this.accept,this),over:o.bind(this.over,this),out:o.bind(this.out,this)};t.classes={"ui-droppable":c.Z.droppable,"ui-droppable-active":c.Z.active,"ui-droppable-hover":c.Z.hover},this.getDroppableElement().droppable(t)}},{key:"onBeforeDestroy",value:function(){this.getDroppableElement().droppable("instance")&&this.getDroppableElement().droppable("destroy")}}])&&u(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),b}(i.Q.Behavior)},87002:function(t,e,n){"use strict";n.d(e,{Y:function(){return O}});var o=n(31647),r=n(50997),i=n(91439),a=(n(98001),n(6929)),c=n(70065),l=n(61843),s=n(22231),u=n(24828),p=n(51785),f=n(90743),y=n.n(f),d={folder:"cLuIF",actions:"vWWVi"};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 h(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,o.key,o)}}function g(t,e){return g=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},g(t,e)}function m(t,e){if(e&&("object"===b(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function v(t){return v=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},v(t)}var O=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&g(t,e)}(O,t);var e,n,o,f,b=(o=O,f=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=v(o);if(f){var n=v(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return m(this,t)});function O(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,O),b.call(this,t)}return e=O,(n=[{key:"initialize",value:function(){this.listenTo(this.model,"change:name",this.render)}},{key:"name",get:function(){return"FolderItemComponent"}},{key:"template",get:function(){return y()}},{key:"className",get:function(){return"col-2 p-1 rounded"}},{key:"appLinks",get:function(){return{a:{application:r.OV.LIBRARY_EDITOR,action:r.eX.LibraryEditor.FOLDER,args:[this.model.get("id")]}}}},{key:"regions",value:function(){return{actions:{el:".actions-region",replaceElement:!0}}}},{key:"behaviors",get:function(){return[{behaviorClass:a.x,channelNames:[r.jr.VIDEO_DRAG_DROP,r.jr.FOLDER_DRAG_DROP],analyticsOptions:{location:"library"===this.options.location?c.LocationContext.LibraryTiles:c.LocationContext.SubFolderList}},{behaviorClass:i.u}]}},{key:"viewOptions",value:function(){var t=l.jw.createFolderThumbnailUrl(this.model.thumbnail);return{styles:d,imageUrl:t,backgroundColor:(0,s.x)(this.model.get("name"),u.o)}}},{key:"onRender",value:function(){this.showChildView("actions",new p.c({model:this.model,extraClasses:"".concat(d.actions," rounded-circle"),buttonClass:"text-light",analyticsOptions:{location:c.LocationContext.LibraryTiles},overrideClasses:!0}))}}])&&h(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),O}(o.Q.Component)},51785:function(t,e,n){"use strict";n.d(e,{c:function(){return _}});var o=n(31647),r=n(63791),i=n(60602),a=n(70065),c=n(52076),l=n(71641),s=n(48090),u=n(57857),p=n(58266),f=n.n(p);function y(t){return y="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},y(t)}function d(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,o.key,o)}}function b(t,e){return b=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},b(t,e)}function h(t,e){if(e&&("object"===y(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function g(t){return g=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},g(t)}var m=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&b(t,e)}(y,t);var e,n,r,i,p=(r=y,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=g(r);if(i){var n=g(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return h(this,t)});function y(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,y),p.call(this,t)}return e=y,(n=[{key:"name",get:function(){return"FolderActionsDropdownComponent"}},{key:"template",get:function(){return f()}},{key:"lang",get:function(){return"libraryEditor.folderActionsDropdown"}},{key:"channelName",get:function(){return"".concat(this.name).concat(this.cid)}},{key:"regions",value:function(){return{items:{el:".items-region",replaceElement:!0}}}},{key:"getFolderActions",value:function(){return[{title:u.T.getPhrase(this.lang,"addSubfolder"),analyticsOptions:c.k.mergeOptions(this.options.analyticsOptions,{actionType:a.UserAction.Create,entity:a.EntityType.Folder,workflowPhase:a.WorkflowPhase.Start}),appLink:{application:s.OV.LIBRARY_EDITOR,action:s.eX.LibraryEditor.NEW_SUB_FOLDER,args:[this.model.get("id")]}},{title:u.T.getPhrase(this.lang,"rename"),analyticsOptions:c.k.mergeOptions(this.options.analyticsOptions,{actionType:a.UserAction.Rename,entity:a.EntityType.Folder,workflowPhase:a.WorkflowPhase.Start}),appLink:{application:s.OV.LIBRARY_EDITOR,action:s.eX.LibraryEditor.RENAME_FOLDER,args:[this.model.get("id")]}},{title:u.T.getPhrase(this.lang,"move"),analyticsOptions:c.k.mergeOptions(this.options.analyticsOptions,{actionType:a.UserAction.Move,entity:a.EntityType.Folder,workflowPhase:a.WorkflowPhase.Start}),appLink:{application:s.OV.LIBRARY_EDITOR,action:s.eX.LibraryEditor.MOVE_FOLDER,args:[this.model.get("id")]}},{title:u.T.getPhrase(this.lang,"editImages"),analyticsOptions:c.k.mergeOptions(this.options.analyticsOptions,{actionType:a.UserAction.EditAssoc,entity:a.EntityType.Folder,workflowPhase:a.WorkflowPhase.Start,descriptor:a.AssocDescriptor.Image}),appLink:{application:s.OV.LIBRARY_EDITOR,action:s.eX.LibraryEditor.EDIT_FOLDER_IMAGES,args:[this.model.get("id")]}},{title:u.T.getPhrase(this.lang,"generatePdf"),analyticsOptions:c.k.mergeOptions(this.options.analyticsOptions,{actionType:a.UserAction.Create,entity:a.EntityType.PDF,workflowPhase:a.WorkflowPhase.Start}),appLink:{application:s.OV.LIBRARY_EDITOR,action:s.eX.LibraryEditor.GENERATE_PDF,args:[this.model.get("id")]}},{title:u.T.getPhrase(this.lang,"remove"),analyticsOptions:c.k.mergeOptions(this.options.analyticsOptions,{actionType:a.UserAction.Delete,entity:a.EntityType.Folder,workflowPhase:a.WorkflowPhase.Start}),classes:"text-danger",appLink:{application:s.OV.LIBRARY_EDITOR,action:s.eX.LibraryEditor.DELETE_FOLDER,args:[this.model.get("id")]}}]}},{key:"onRender",value:function(){this.showChildView("items",new l.w({analyticsHelper:c.k,displayOptions:{alignment:"right"},channelName:this.channelName,collection:new o.Q.Collection(this.getFolderActions()),childOptions:{isDisabled:function(){return this.model.get("disabled")}}}))}}])&&d(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),y}(o.Q.Component),v=n(26704),O=n.n(v);function w(t){return w="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},w(t)}function k(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,o.key,o)}}function E(t,e){return E=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},E(t,e)}function R(t,e){if(e&&("object"===w(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function P(t){return P=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},P(t)}var _=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&E(t,e)}(l,t);var e,n,o,a,c=(o=l,a=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=P(o);if(a){var n=P(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return R(this,t)});function l(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),c.call(this,t)}return e=l,(n=[{key:"name",get:function(){return"VideoCollectionActionsComponent"}},{key:"channelName",get:function(){return"".concat(this.name).concat(this.cid)}},{key:"className",get:function(){if(this.model instanceof i.g)return"position-absolute ".concat(this.options.overrideClasses?"":"zHCsb"," ").concat(this.options.extraClasses," ")}},{key:"elements",get:function(){return{dropdownToggle:".ui-dropdown-toggle",dropdownItem:".dropdown-item"}}},{key:"events",value:function(){return{"click @ui.dropdownToggle":"onClickDropdownToggle","click @ui.dropdownItem":"onClickDropdownItem"}}},{key:"template",get:function(){return O()}},{key:"regions",value:function(){return{items:{replaceElement:!0,el:".items-region"}}}},{key:"onClickDropdownToggle",value:function(){this.model instanceof i.g&&this.showChildView("items",new m({model:this.model,analyticsOptions:this.options.analyticsOptions}))}},{key:"onClickDropdownItem",value:function(t){t.stopPropagation(),t.preventDefault(),this.getUI("dropdownToggle").dropdown("toggle")}},{key:"viewOptions",value:function(){return{hasActions:this.model instanceof i.g,dropdownClass:"".concat("He1m9"," ").concat(this.options.buttonClass),svg:r.Nj.getSvg(r.vn.More)}}}])&&k(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),l}(o.Q.Component)},58266: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="items-region"></div>'},useData:!0})},90743:function(t,e,n){var o=n(32227);t.exports=(o.default||o).template({1:function(t,e,n,o,r){var i;return t.propertyIsEnumerable,"style=\"background-image: url('"+t.escapeExpression(t.lambda(null!=(i=null!=e?e.options:e)?i.imageUrl:i,e))+"')\""},compiler:[8,">= 4.3.0"],main:function(t,e,n,o,r){t.propertyIsEnumerable;var i,a,c=null!=e?e:t.nullContext||{},l=t.hooks.helperMissing,s="function",u=t.escapeExpression,p=t.lambda;return'<a class="rounded d-block text-decoration-none" title="'+u(typeof(a=null!=(a=n.name||(null!=e?e.name:e))?a:l)===s?a.call(c,{name:"name",hash:{},data:r}):a)+'">\n <div \n class="'+u(p(null!=(i=null!=(i=null!=e?e.options:e)?i.styles:i)?i.folder:i,e))+" "+u(p(null!=(i=null!=e?e.options:e)?i.backgroundColor:i,e))+' rounded-top"\n '+(null!=(i=n.if.call(c,null!=(i=null!=e?e.options:e)?i.imageUrl:i,{name:"if",hash:{},fn:t.program(1,r,0),inverse:t.noop,data:r}))?i:"")+'\n />\n <h3 class="font-size-normal font-weight-500 mb-0 p-2 bg-white border-left border-right border-bottom rounded-bottom ">\n <span class="text-truncate d-block">'+u(typeof(a=null!=(a=n.name||(null!=e?e.name:e))?a:l)===s?a.call(c,{name:"name",hash:{},data:r}):a)+'</span>\n </h3>\n</a>\n<div class="actions-region"></div>'},useData:!0})},26704: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.lambda;return'<span data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" class="'+t.escapeExpression(a(null!=(i=null!=e?e.options:e)?i.dropdownClass:i,e))+' d-inline-block ui-dropdown-toggle">\n '+(null!=(i=a(null!=(i=null!=e?e.options:e)?i.svg:i,e))?i:"")+'\n</span>\n<div class="items-region"></div>\n'},compiler:[8,">= 4.3.0"],main:function(t,e,n,o,r){var i;return t.propertyIsEnumerable,null!=(i=n.if.call(null!=e?e:t.nullContext||{},null!=(i=null!=e?e.options:e)?i.hasActions:i,{name:"if",hash:{},fn:t.program(1,r,0),inverse:t.noop,data:r}))?i:""},useData:!0})}}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[7053],{87053:function(e,t,n){"use strict";n.r(t),n.d(t,{GeneratePastReleasesPdfView:function(){return I}});var r=n(39479),i=n(33192),o=n(31647),a=n(21679),l=n(57857),s=n(70065),u=n(52076),c=n(10101),f=n(3059),p=n(19226),d=n(48090),h=n(67670),y=n(61843),b=n(39090),g=n(88172),m=n(44937),v=n(29569),j=n.n(v),S={image:"go5qS"};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 w(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function O(e,t){return O=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},O(e,t)}function k(e,t){if(t&&("object"===P(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function C(e){return C=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},C(e)}var I=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&O(e,t)}(I,e);var t,n,o,v,P=(o=I,v=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=C(o);if(v){var n=C(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return k(this,e)});function I(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,I),P.call(this,e)}return t=I,(n=[{key:"initialize",value:function(){this.libraryDataService=a.u.getInstance(d.Or.Library,this),this.contentUpdatesDataService=a.u.getInstance(d.Or.ContentUpdates,this),this.exportDataService=a.u.getInstance(d.Or.Export,this)}},{key:"name",get:function(){return"GeneratePastReleasesPdfView"}},{key:"title",get:function(){return l.T.getPhrase(this.lang,"title")}},{key:"lang",get:function(){return"contentUpdates.generatePastReleasesPdf"}},{key:"template",get:function(){return j()}},{key:"channelName",get:function(){return y.N0.generateUniqueChannelName(this)}},{key:"behaviors",get:function(){var e=this;return[{behaviorClass:c.Yw,title:l.T.getPhrase(this.lang,"heading"),spinnerButtonOptions:{model:this.spinnerModel=new h.v,channelName:this.channelName,buttonText:l.T.getPhrase(this.lang,"generateBtn"),onClick:function(){return e.onClickGeneratePdf()}}}]}},{key:"onLibrariesSync",value:function(e){var t=this;this.libraries=e,this.selectedLibraryIds=b.RF.getLibraryIds(this.options.librariesQueryString,e),this.subjectCollectionIdentifier=new f.xw({dateQueryString:this.options.dateQueryString,libraryIds:this.selectedLibraryIds}),this.contentUpdatesDataService.getRecentVideoSubjects(this.subjectCollectionIdentifier,(function(n){return t.onSubjectsSync(e,n)}))}},{key:"onSubjectsSync",value:function(e,t){var n=b.RF.getSubjectOptions(t).map((function(e){return new m.Wx(e)})),i={dateQueryString:this.options.dateQueryString,libraryIds:this.selectedLibraryIds};if(!this.options.subjectQueryString)return this.videoCollectionIdentifier=new f.IJ(i),void this.spinnerModel.set(g.ZV.Disabled,!1);var o=this.getSubjectIds();this.videoCollectionIdentifier=new f.IJ(r.extend(i,{subjects:n.filter((function(e){return!!r.intersection(o,e.get("subjectIds")).length}))})),this.spinnerModel.set(g.ZV.Disabled,!1)}},{key:"getSubjectIds",value:function(){if(this.options.subjectQueryString)return this.options.subjectQueryString.split("-")[1].split(",")}},{key:"getLibrariesText",value:function(){var e=this;if(this.libraries.length!==this.selectedLibraryIds.length){var t=this.libraries.filter((function(t){return r.contains(e.selectedLibraryIds,t.id.toString())})),n=t.map((function(e){return"<strong>".concat(y.m$.escapeExpression(e.get("name")),"</strong>")}));return t.length<=2?n.join(" ".concat(l.T.getPhrase(this.lang,"and")," ")):r.first(n,n.length-1).join(", ")+" ".concat(l.T.getPhrase(this.lang,"and")," ").concat(r.last(n))}}},{key:"getFormattedDate",value:function(e){if(e)return i(e).format("DD MMMM YYYY")}},{key:"getFormattedSubjects",value:function(){if(this.videoCollectionIdentifier.subjects){var e=this.videoCollectionIdentifier.subjects.map((function(e){return e.get("name")}));return 1===e.length?e[0]:e.slice(0,-1).join(", ")+" ".concat(l.T.getPhrase(this.lang,"and")," ")+e.slice(-1)}}},{key:"onClickGeneratePdf",value:function(){this.spinnerModel.set(g.ZV.ShowSpinner,!0),this.fetchVideosAndGeneratePdf()}},{key:"fetchVideosAndGeneratePdf",value:function(){var e=this;this.contentUpdatesDataService.getRecentVideosAllPages(this.videoCollectionIdentifier,(function(t){t&&t.length?e.generatePdf(t.map((function(e){return e.id.toString()}))):e.triggerMethod("hide")}))}},{key:"generatePdf",value:function(e){var t=this,n=this.videoCollectionIdentifier.subjects?this.getFormattedSubjects():l.T.getPhrase(this.lang,"latestReleases"),r=i(this.videoCollectionIdentifier.dateOption.get("from")).format("MMMM YYYY"),o=i(this.videoCollectionIdentifier.dateOption.get("to")).format("MMMM YYYY"),a=r===o?l.T.getPhrase(this.lang,"fromContentUpdate",{from:r}):l.T.getPhrase(this.lang,"fromToContentUpdates",{from:r,to:o});this.exportDataService.generateCustomListPdf(n,a,e,this.currentUser,(function(){return t.triggerMethod("hide")})),this.logAction(e.length)}},{key:"logAction",value:function(e){var t={location:s.LocationContext.Popup,actionType:s.UserAction.Create,entity:s.EntityType.PDF,workflowPhase:s.WorkflowPhase.Complete},n={videoCount:e,libraries:this.selectedLibraryIds.join(","),releaseDate:this.videoCollectionIdentifier.dateOption.get("name"),subjects:this.options.subjectQueryString?this.videoCollectionIdentifier.subjects.map((function(e){return e.get("name")})).join(","):""};u.k.logUserAction(n,t)}},{key:"requiredResources",get:function(){return{currentUser:p.K.currentUser}}},{key:"onBeforeRender",value:function(){var e=this;this.libraries||this.libraryDataService.getHostedLibraries((function(t){return e.onLibrariesSync(t)}))}},{key:"viewOptions",value:function(){return{styles:S,dataFetched:!!this.libraries,spinnerEl:y.Kp.getSpinner({size:y.Ey.Large,extraClasses:"mx-auto"}),email:this.currentUser.get("email"),imageUrl:d.Wn.Shared.GENERATE_PDF,libraryText:this.getLibrariesText(),subject:this.getFormattedSubjects(),from:this.videoCollectionIdentifier&&this.getFormattedDate(this.videoCollectionIdentifier.dateOption.get("from")),to:this.videoCollectionIdentifier&&this.getFormattedDate(this.videoCollectionIdentifier.dateOption.get("to"))}}}])&&w(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),I}(o.Q.View)},67670:function(e,t,n){"use strict";n.d(t,{v:function(){return p}});var r=n(31647),i=n(88172);function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function u(e,t){return u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},u(e,t)}function c(e,t){if(t&&("object"===o(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function f(e){return f=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},f(e)}var p=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&u(e,t)}(d,e);var t,n,r,o,p=(r=d,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=f(r);if(o){var n=f(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return c(this,e)});function d(){return l(this,d),p.apply(this,arguments)}return t=d,(n=[{key:"defaults",value:function(){var e;return a(e={},i.ZV.Disabled,!0),a(e,i.ZV.Hidden,!1),e}}])&&s(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),d}(r.Q.Model)},29569:function(e,t,n){var r=n(32227);e.exports=(r.default||r).template({1:function(e,t,n,r,i){var o;return e.propertyIsEnumerable,(null!=(o=e.lambda(null!=(o=null!=t?t.options:t)?o.spinnerEl:o,t))?o:"")+"\n"},3:function(e,t,n,r,i){e.propertyIsEnumerable;var o,a=e.lambda,l=e.escapeExpression,s=null!=t?t:e.nullContext||{},u=e.hooks.helperMissing;return'<div class="pb-3 text-center">\n <img src="'+l(a(null!=(o=null!=t?t.options:t)?o.imageUrl:o,t))+'" class="'+l(a(null!=(o=null!=(o=null!=t?t.options:t)?o.styles:o)?o.image:o,t))+'" />\n</div>\n<p class="m-0">\n '+(null!=(o=(n.lang||t&&t.lang||u).call(s,"body1",{name:"lang",hash:{},data:i}))?o:"")+"\n "+(null!=(o=n.if.call(s,null!=(o=null!=t?t.options:t)?o.libraryText:o,{name:"if",hash:{},fn:e.program(4,i,0),inverse:e.noop,data:i}))?o:"")+"\n "+(null!=(o=n.if.call(s,null!=(o=null!=t?t.options:t)?o.subject:o,{name:"if",hash:{},fn:e.program(6,i,0),inverse:e.noop,data:i}))?o:"")+"\n "+(null!=(o=(n.lang||t&&t.lang||u).call(s,"body4",{name:"lang",hash:{email:null!=(o=null!=t?t.options:t)?o.email:o,to:null!=(o=null!=t?t.options:t)?o.to:o,from:null!=(o=null!=t?t.options:t)?o.from:o},data:i}))?o:"")+"\n</p>\n"},4:function(e,t,n,r,i){var o;return e.propertyIsEnumerable,null!=(o=(n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"body2",{name:"lang",hash:{libraryText:null!=(o=null!=t?t.options:t)?o.libraryText:o},data:i}))?o:""},6:function(e,t,n,r,i){var o;return e.propertyIsEnumerable,null!=(o=(n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"body3",{name:"lang",hash:{subject:null!=(o=null!=t?t.options:t)?o.subject:o},data:i}))?o:""},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 +0,0 @@
1
- (self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[708],{43953:function(e,t,n){"use strict";n.d(t,{J:function(){return m}});var o=n(31647),r=n(57857),i=n(63791),l=n(70065),a=n(52076),s=n(71641),c=n(48090),u=n(8050),p=n.n(u);function f(e){return f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},f(e)}function y(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function d(e,t){return d=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},d(e,t)}function h(e,t){if(t&&("object"===f(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function g(e){return g=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},g(e)}var m=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&d(e,t)}(b,e);var t,n,u,f,m=(u=b,f=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=g(u);if(f){var n=g(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return h(this,e)});function b(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,b),m.call(this,e)}return t=b,(n=[{key:"name",get:function(){return"LibraryActionsComponent"}},{key:"template",get:function(){return p()}},{key:"channelName",get:function(){return"".concat(this.name).concat(this.cid)}},{key:"lang",get:function(){return"libraryEditor.libraryActions"}},{key:"className",get:function(){return"position-absolute ".concat("Qgopl"," ").concat(this.options.extraClasses," ")}},{key:"elements",get:function(){return{dropdownToggle:".ui-dropdown-toggle",dropdownItem:".dropdown-item"}}},{key:"events",value:function(){return{"click @ui.dropdownToggle":"onClickDropdownToggle","click @ui.dropdownItem":"onClickDropdownItem"}}},{key:"regions",value:function(){return{dropdownItems:{replaceElement:!0,el:".items-region"}}}},{key:"getDropdownItems",value:function(){return[{title:r.T.getPhrase(this.lang,"addFolder"),analyticsOptions:a.k.mergeOptions(this.options.analyticsOptions,{actionType:l.UserAction.Create,entity:l.EntityType.Folder,workflowPhase:l.WorkflowPhase.Start}),appLink:{application:c.OV.LIBRARY_EDITOR,action:c.eX.Shared.NEW_FOLDER,args:[this.model.get("id")]}},{title:r.T.getPhrase(this.lang,"rename"),analyticsOptions:a.k.mergeOptions(this.options.analyticsOptions,{actionType:l.UserAction.Rename,entity:l.EntityType.Library,workflowPhase:l.WorkflowPhase.Start}),appLink:{application:c.OV.LIBRARY_EDITOR,action:c.eX.LibraryEditor.RENAME_LIBRARY,args:[this.model.get("id")]}},{title:r.T.getPhrase(this.lang,"libraryRequestSettings"),analyticsOptions:a.k.mergeOptions(this.options.analyticsOptions,{actionType:l.UserAction.SetAccess,entity:l.EntityType.Library,workflowPhase:l.WorkflowPhase.Start}),appLink:{application:c.OV.LIBRARY_REQUESTS,action:c.eX.LibraryRequests.LIBRARY_REQUEST_SETTINGS,args:[this.model.get("id")]}},{title:r.T.getPhrase(this.lang,"remove"),analyticsOptions:a.k.mergeOptions(this.options.analyticsOptions,{actionType:l.UserAction.Delete,entity:l.EntityType.Library,workflowPhase:l.WorkflowPhase.Start}),appLink:{application:c.OV.LIBRARY_EDITOR,action:c.eX.LibraryEditor.DELETE_LIBRARY,args:[this.model.get("id")]},classes:"text-danger"}]}},{key:"onClickDropdownToggle",value:function(){this.showChildView("dropdownItems",new s.w({analyticsHelper:a.k,displayOptions:{alignment:"right"},channelName:this.channelName,collection:new o.Q.Collection(this.getDropdownItems())}))}},{key:"onClickDropdownItem",value:function(e){e.stopPropagation(),e.preventDefault(),this.getUI("dropdownToggle").dropdown("toggle")}},{key:"viewOptions",value:function(){return{dropdownClass:"".concat("AAIc2"," ").concat(this.options.buttonClass),svg:i.Nj.getSvg(i.vn.More)}}}])&&y(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),b}(o.Q.Component)},51785:function(e,t,n){"use strict";n.d(t,{c:function(){return L}});var o=n(31647),r=n(63791),i=n(60602),l=n(70065),a=n(52076),s=n(71641),c=n(48090),u=n(57857),p=n(58266),f=n.n(p);function y(e){return y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},y(e)}function d(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function h(e,t){return h=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},h(e,t)}function g(e,t){if(t&&("object"===y(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function m(e){return m=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},m(e)}var b=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&h(e,t)}(y,e);var t,n,r,i,p=(r=y,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=m(r);if(i){var n=m(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return g(this,e)});function y(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,y),p.call(this,e)}return t=y,(n=[{key:"name",get:function(){return"FolderActionsDropdownComponent"}},{key:"template",get:function(){return f()}},{key:"lang",get:function(){return"libraryEditor.folderActionsDropdown"}},{key:"channelName",get:function(){return"".concat(this.name).concat(this.cid)}},{key:"regions",value:function(){return{items:{el:".items-region",replaceElement:!0}}}},{key:"getFolderActions",value:function(){return[{title:u.T.getPhrase(this.lang,"addSubfolder"),analyticsOptions:a.k.mergeOptions(this.options.analyticsOptions,{actionType:l.UserAction.Create,entity:l.EntityType.Folder,workflowPhase:l.WorkflowPhase.Start}),appLink:{application:c.OV.LIBRARY_EDITOR,action:c.eX.LibraryEditor.NEW_SUB_FOLDER,args:[this.model.get("id")]}},{title:u.T.getPhrase(this.lang,"rename"),analyticsOptions:a.k.mergeOptions(this.options.analyticsOptions,{actionType:l.UserAction.Rename,entity:l.EntityType.Folder,workflowPhase:l.WorkflowPhase.Start}),appLink:{application:c.OV.LIBRARY_EDITOR,action:c.eX.LibraryEditor.RENAME_FOLDER,args:[this.model.get("id")]}},{title:u.T.getPhrase(this.lang,"move"),analyticsOptions:a.k.mergeOptions(this.options.analyticsOptions,{actionType:l.UserAction.Move,entity:l.EntityType.Folder,workflowPhase:l.WorkflowPhase.Start}),appLink:{application:c.OV.LIBRARY_EDITOR,action:c.eX.LibraryEditor.MOVE_FOLDER,args:[this.model.get("id")]}},{title:u.T.getPhrase(this.lang,"editImages"),analyticsOptions:a.k.mergeOptions(this.options.analyticsOptions,{actionType:l.UserAction.EditAssoc,entity:l.EntityType.Folder,workflowPhase:l.WorkflowPhase.Start,descriptor:l.AssocDescriptor.Image}),appLink:{application:c.OV.LIBRARY_EDITOR,action:c.eX.LibraryEditor.EDIT_FOLDER_IMAGES,args:[this.model.get("id")]}},{title:u.T.getPhrase(this.lang,"generatePdf"),analyticsOptions:a.k.mergeOptions(this.options.analyticsOptions,{actionType:l.UserAction.Create,entity:l.EntityType.PDF,workflowPhase:l.WorkflowPhase.Start}),appLink:{application:c.OV.LIBRARY_EDITOR,action:c.eX.LibraryEditor.GENERATE_PDF,args:[this.model.get("id")]}},{title:u.T.getPhrase(this.lang,"remove"),analyticsOptions:a.k.mergeOptions(this.options.analyticsOptions,{actionType:l.UserAction.Delete,entity:l.EntityType.Folder,workflowPhase:l.WorkflowPhase.Start}),classes:"text-danger",appLink:{application:c.OV.LIBRARY_EDITOR,action:c.eX.LibraryEditor.DELETE_FOLDER,args:[this.model.get("id")]}}]}},{key:"onRender",value:function(){this.showChildView("items",new s.w({analyticsHelper:a.k,displayOptions:{alignment:"right"},channelName:this.channelName,collection:new o.Q.Collection(this.getFolderActions()),childOptions:{isDisabled:function(){return this.model.get("disabled")}}}))}}])&&d(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),y}(o.Q.Component),v=n(26704),w=n.n(v);function O(e){return O="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},O(e)}function k(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function E(e,t){return E=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},E(e,t)}function R(e,t){if(t&&("object"===O(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function T(e){return T=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},T(e)}var L=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&E(e,t)}(s,e);var t,n,o,l,a=(o=s,l=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=T(o);if(l){var n=T(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return R(this,e)});function s(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),a.call(this,e)}return t=s,(n=[{key:"name",get:function(){return"VideoCollectionActionsComponent"}},{key:"channelName",get:function(){return"".concat(this.name).concat(this.cid)}},{key:"className",get:function(){if(this.model instanceof i.g)return"position-absolute ".concat(this.options.overrideClasses?"":"zHCsb"," ").concat(this.options.extraClasses," ")}},{key:"elements",get:function(){return{dropdownToggle:".ui-dropdown-toggle",dropdownItem:".dropdown-item"}}},{key:"events",value:function(){return{"click @ui.dropdownToggle":"onClickDropdownToggle","click @ui.dropdownItem":"onClickDropdownItem"}}},{key:"template",get:function(){return w()}},{key:"regions",value:function(){return{items:{replaceElement:!0,el:".items-region"}}}},{key:"onClickDropdownToggle",value:function(){this.model instanceof i.g&&this.showChildView("items",new b({model:this.model,analyticsOptions:this.options.analyticsOptions}))}},{key:"onClickDropdownItem",value:function(e){e.stopPropagation(),e.preventDefault(),this.getUI("dropdownToggle").dropdown("toggle")}},{key:"viewOptions",value:function(){return{hasActions:this.model instanceof i.g,dropdownClass:"".concat("He1m9"," ").concat(this.options.buttonClass),svg:r.Nj.getSvg(r.vn.More)}}}])&&k(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),s}(o.Q.Component)},43:function(e,t,n){"use strict";n.r(t),n.d(t,{LeftNavigationView:function(){return le}});var o=n(31647),r=n(63791),i=n(36357),l=n(48090),a=n(95061),s=n(32122),c=n.n(s),u=n(21679),p=n(50299),f=n(51785),y=n(99223),d=n.n(y),h=n(43953),g=n(95308),m=n(61843),b=n(99249),v=n(6929),w=n(70065);function O(e){return O="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},O(e)}function k(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function E(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function R(e,t,n){return t&&E(e.prototype,t),n&&E(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function T(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&L(e,t)}function L(e,t){return L=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},L(e,t)}function C(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=_(e);if(t){var r=_(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return P(this,n)}}function P(e,t){if(t&&("object"===O(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function _(e){return _=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},_(e)}var S="library:left:nav",I=function(e){T(n,e);var t=C(n);function n(e){return k(this,n),t.call(this,e)}return R(n,[{key:"initialize",value:function(){var e=this.options.forceOpen||this.options.libraryId&&this.model.get("id").toString()===this.options.libraryId.toString();this.viewModel=b.r.get("".concat(S,":").concat(this.model.get("id"))),this.viewModel.set("open",e),this.viewModel.set("disabled",!1),this.listenTo(this.model,"change:name",this.render),this.options.hasMultipleLibraries&&this.listenTo(this,"open:sub:folders",this.onOpenSubFolders),this.videoDragDropService=u.u.getInstance(l.K9.VideoDragDrop,this)}},{key:"name",get:function(){return"LeftNavLibraryComponent"}},{key:"template",get:function(){return d()}},{key:"className",get:function(){return g.Z.libraryContainer}},{key:"behaviors",get:function(){var e=[l.jr.FOLDER_DRAG_DROP];return this.options.hasMultipleLibraries&&e.push(l.jr.VIDEO_DRAG_DROP),[{behaviorClass:v.x,ui:"anchor",channelNames:e,analyticsOptions:{location:w.LocationContext.LeftNav}}]}},{key:"regions",value:function(){return{folders:{el:".folders-region",replaceElement:!0},actions:{el:".actions-region",replaceElement:!0}}}},{key:"appLinks",get:function(){return{".ui-anchor":{application:l.OV.LIBRARY_EDITOR,action:l.eX.LibraryEditor.LIBRARY,args:[this.model.get("id")]}}}},{key:"events",value:function(){return{"click .library-event":"onClick"}}},{key:"elements",get:function(){return{anchor:".ui-anchor",text:".ui-text"}}},{key:"onClick",value:function(e){this.viewModel.get("open")&&(e.stopImmediatePropagation(),e.preventDefault(),this.viewModel.set("open",!this.viewModel.get("open")),this.render())}},{key:"onOpenSubFolders",value:function(){if(this.videoDragDropService.getDisabledLibraryIds().includes(this.model.get("id")))return this.viewModel.set("disabled",!0),void this.render();this.viewModel.set("open",!0),this.render()}},{key:"hasFolders",value:function(){return!!m.PU.getFirstType(this.model.children,"category")}},{key:"analyticsOptions",get:function(){return{location:w.LocationContext.LeftNav}}},{key:"viewOptions",value:function(){return{styles:g.Z,caretSvg:r.Nj.getSvg(r.vn.Caret),open:this.viewModel.get("open"),hasFolders:this.hasFolders(),disabled:this.viewModel.get("disabled")}}},{key:"onRender",value:function(){this.showChildView("actions",new h.J({model:this.model,extraClasses:"rounded-circle mr-1 ".concat(g.Z.actions),buttonClass:"text-muted",analyticsOptions:this.analyticsOptions})),this.model.children&&this.model.children.length&&this.viewModel.get("open")&&this.showChildView("folders",new p.J({appLink:{action:l.eX.LibraryEditor.FOLDER,application:l.OV.LIBRARY_EDITOR},linkArgs:function(e){return[e.get("id")]},collection:this.model.children,channelName:"".concat(this.cid),childrenProperty:"children",actions:f.c,folderTreeId:this.options.folderTreeId,analyticsOptions:this.analyticsOptions}))}}]),n}(o.Q.Component),j=function(e){T(n,e);var t=C(n);function n(e){return k(this,n),t.call(this,e)}return R(n,[{key:"name",get:function(){return"LeftNavLibrariesComponent"}},{key:"childView",get:function(){return I}},{key:"childViewOptions",get:function(){return{channelName:this.options.channelName,libraryId:this.options.libraryId,folderTreeId:this.options.folderTreeId,forceOpen:this.options.forceOpen,hasMultipleLibraries:this.collection.length>1}}}]),n}(o.Q.ComponentCollection),D={addLibrary:"ii_E8",addLibraryContainer:"WroNW",plus:"zhT_f"},x=n(33800),A=n(19226),N=n(48404),V=n(29457),B=n(14177),U=n(48088),M=n(57857),F=n(52076),Y=n(71641),W=n(88483),Q=n(50997),X=n(41238),G=n.n(X),z={imageContainer:"mh27r",imageMask:"aklBj",dropdownContainer:"tqZpr",dropdownButton:"aTbSF",image:"V_4dx",addCrest:"zD8lx",plusSvg:"gYx3Z"};function H(e){return H="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},H(e)}function Z(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function q(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function J(e,t){return J=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},J(e,t)}function $(e,t){if(t&&("object"===H(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function K(e){return K=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},K(e)}var ee=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&J(e,t)}(c,e);var t,i,l,a,s=(l=c,a=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=K(l);if(a){var n=K(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return $(this,e)});function c(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c),s.call(this,e)}return t=c,(i=[{key:"initialize",value:function(){var e=this;this.listenTo(this.options.channelName,"upload:logo",(function(){F.k.logUserAction({},e.getAnalyticsOptions("create"))}))}},{key:"name",get:function(){return"CustomerLogoComponent"}},{key:"template",get:function(){return G()}},{key:"lang",get:function(){return"libraryEditor.customerLogo"}},{key:"className",get:function(){return"text-center p-3 position-relative"}},{key:"elements",get:function(){return{dropdownToggle:".ui-dropdown-toggle"}}},{key:"regions",value:function(){return{options:{replaceElement:!0,el:".options-region"}}}},{key:"events",value:function(){var e;return Z(e={},"click .".concat(z.addCrest),"onClickAddLogo"),Z(e,"click @ui.dropdownToggle","onClickDropdownToggle"),e}},{key:"behaviors",get:function(){var e=this;return[{behaviorClass:Q.YR,channelName:this.options.channelName,eventName:"upload:logo",buttonSelector:".upload-logo",imageType:W.__.Logos,saveImage:function(t){Promise.all([n.e(2802),n.e(1934),n.e(5235),n.e(1203)]).then(n.bind(n,74269)).then((function(n){n.DialogHelper.renderCropper({src:t,alt:"",onClickCrop:function(t,n){U.Radio.channel(e.options.channelName).trigger("upload:image",t),e.listenToOnce(Q.Vk.CUSTOMER,"".concat(Q.M_.CREATE_LOGO,":sync"),n)},imageType:W.__.Logos,popupSize:"md"})}))}}]}},{key:"onClickDropdownToggle",value:function(){this.showChildView("options",new Y.w({analyticsHelper:F.k,displayOptions:{alignment:"left"},channelName:this.options.channelName,collection:new o.Q.Collection(this.getCustomerLogoActions())}))}},{key:"onClickAddLogo",value:function(){F.k.logUserAction({},this.getAnalyticsOptions("create"))}},{key:"getCustomerLogoActions",value:function(){return[{title:M.T.getPhrase(this.lang,"uploadImage"),channelName:this.options.channelName,eventName:"upload:logo"},{title:M.T.getPhrase(this.lang,"removeImage"),analyticsOptions:this.getAnalyticsOptions("remove"),classes:"text-danger",appLink:{application:Q.OV.LIBRARY_EDITOR,action:Q.eX.LibraryEditor.REMOVE_LOGO,args:[this.model.get("id"),this.options.customerId]}}]}},{key:"getAnalyticsOptions",value:function(e){return{actionType:"create"===e?w.UserAction.Create:w.UserAction.Remove,entity:w.EntityType.Logo,workflowPhase:w.WorkflowPhase.Start,location:w.LocationContext.LeftNav,eventVersion:"create"===e?w.EventVersion.V2:w.EventVersion.V1}}},{key:"viewOptions",value:function(){return{styles:z,dropdownSvg:r.Nj.getSvg(r.vn.More),plusSvg:r.Nj.getSvg(r.vn.Plus)}}}])&&q(t.prototype,i),Object.defineProperty(t,"prototype",{writable:!1}),c}(o.Q.Component);function te(e){return te="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},te(e)}function ne(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function oe(e,t){return oe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},oe(e,t)}function re(e,t){if(t&&("object"===te(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function ie(e){return ie=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ie(e)}var le=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&oe(e,t)}(f,e);var t,n,o,s,p=(o=f,s=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=ie(o);if(s){var n=ie(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return re(this,e)});function f(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,f),p.call(this,e)}return t=f,(n=[{key:"initialize",value:function(){this.bindListeners(),this.settingsDataService=u.u.getInstance(x.O.Settings,this),this.imageUploadDataService=u.u.getInstance(x.O.ImageUpload,this),this.customerDataService=u.u.getInstance(x.O.Customer,this)}},{key:"bindListeners",value:function(){this.listenTo(this.channelName,"select:library",this.onSelectLibrary),this.listenTo(this.channelName,"upload:image",this.onUploadLogo),this.listenTo(l.Vk.LIBRARY,"cache:cleared",this.fetchData),this.listenTo(l.jr.FOLDER_DRAG_DROP,"re:render:left:nav",this.render),this.listenTo(l.Vk.SETTINGS,"".concat(l.M_.CUSTOMER_SETTINGS,":sync ").concat(l.M_.USER_SETTINGS,":sync"),this.render),this.listenTo(l.Vk.CUSTOMER,"".concat(l.M_.LOGO,":sync ").concat(l.M_.LOGO,":invalidate"),this.render)}},{key:"name",get:function(){return"LeftNavigationView"}},{key:"title",get:function(){return!1}},{key:"channelName",get:function(){return"".concat(this.name).concat(this.cid)}},{key:"lang",get:function(){return"libraryEditor.leftNavigation"}},{key:"className",get:function(){return"bg-white pb-3"}},{key:"template",get:function(){return c()}},{key:"regions",value:function(){return{logo:{el:".logo-region",replaceElement:!1},folderTree:{el:".folder-tree-region",replaceElement:!1,partialLoading:V.LP.LeftNav}}}},{key:"events",value:function(){return{"click .new-folder":"newFolder"}}},{key:"appLinks",get:function(){return{".applink-new-library":{application:l.OV.LIBRARY_EDITOR,action:l.eX.LibraryEditor.NEW_LIBRARY}}}},{key:"fetchData",value:function(){this.maxCustomLibraries=this.settingsDataService.getSetting(this.currentUser.get("customerId"),i.E.MaxCustomLibraries),this.customerLogo=this.customerDataService.getLogo(this.currentUser.get("customerId"))}},{key:"onSelectLibrary",value:function(e){this.collection.each((function(t){b.r.get("".concat(S,":").concat(t.id)).set("open",t.id.toString()===e)})),this.render()}},{key:"onUploadLogo",value:function(e){var t=this;this.imageUploadDataService.uploadBase64Image(e,V.__.Logos,(function(e){return t.onImageUploaded(e)}))}},{key:"onImageUploaded",value:function(e){this.customerDataService.createLogo(this.currentUser.get("customerId"),e.get("id"),e.get("fileIdType"),(function(e){F.k.logUserAction({id:e.get("id")},{location:w.LocationContext.LeftNav,actionType:w.UserAction.Create,entity:w.EntityType.Logo,workflowPhase:w.WorkflowPhase.Complete,eventVersion:w.EventVersion.V2})}))}},{key:"renderLogo",value:function(){this.showChildView("logo",new ee({model:this.customerLogo,customerId:this.currentUser.get("customerId"),channelName:this.channelName}))}},{key:"renderLeftNav",value:function(){var e=new j({collection:this.collection,channelName:this.channelName,libraryId:this.options.libraryId,folderTreeId:B.J.LIBRARY_EDITOR,forceOpen:1===this.collection.length});this.showChildView("folderTree",e)}},{key:"requiredResources",get:function(){return{currentUser:A.K.currentUser,config:N.p.config,collection:a.T.libraries}}},{key:"onBeforeRender",value:function(){return this.fetchData(),!!this.maxCustomLibraries}},{key:"viewOptions",value:function(){if(this.collection)return{styles:D,plusSvg:r.Nj.getSvg(r.vn.Plus),canCreateLibraries:!!this.maxCustomLibraries&&this.maxCustomLibraries.get("value")>this.collection.length}}},{key:"onRender",value:function(){this.renderLogo(),this.renderLeftNav()}}])&&ne(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),f}(o.Q.View)},71641:function(e,t,n){"use strict";n.d(t,{w:function(){return p}});var o=n(39479),r=n(31647),i=n(55142);function l(e){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},l(e)}function a(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function s(e,t){return s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},s(e,t)}function c(e,t){if(t&&("object"===l(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function u(e){return u=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},u(e)}var p=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&s(e,t)}(f,e);var t,n,r,l,p=(r=f,l=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=u(r);if(l){var n=u(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return c(this,e)});function f(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,f),p.call(this,e)}return t=f,n=[{key:"name",get:function(){return"DropdownCollectionComponent"}},{key:"className",get:function(){return"dropdown-menu items-viewpart ".concat(this.getExtraClasses(this.options.displayOptions))}},{key:"attributes",get:function(){return{"aria-labelledby":"dropdownSelector"}}},{key:"initialize",value:function(){this.listenTo(this.options.channelName,"center:dropdown",this.centerSelectedItem)}},{key:"childView",get:function(){return i.N}},{key:"childViewOptions",get:function(){var e={channelName:this.options.channelName,analyticsHelper:this.options.analyticsHelper};return o.extend(e,this.options.childOptions)}},{key:"getExtraClasses",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.alignment,n=void 0===t?"left":t,o=e.extraClasses,r="dropdown-menu-".concat(n);return o&&(r="".concat(r," ").concat(o)),r}},{key:"centerSelectedItem",value:function(){var e=this.$el.find(".active");if(e.length){var t=this.$el.scrollTop()+e.position().top,n=.5*this.$el.height()+.5*e.height();this.$el.scrollTop(t-n)}}}],n&&a(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),f}(r.Q.ComponentCollection)},41238:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({1:function(e,t,n,o,r){e.propertyIsEnumerable;var i,l,a=e.lambda,s=e.escapeExpression;return'<a class="'+s(a(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.imageContainer:i,t))+' mx-auto d-block">\n <div class="'+s(a(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.imageMask:i,t))+' rounded-lg"></div>\n\n <div class="position-absolute text-white '+s(a(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.dropdownContainer:i,t))+'">\n <span data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" class="'+s(a(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.dropdownButton:i,t))+' d-inline-block ui-dropdown-toggle">\n '+(null!=(i=a(null!=(i=null!=t?t.options:t)?i.dropdownSvg:i,t))?i:"")+'\n </span>\n <div class="options-region"></div>\n </div>\n\n <img src="'+s("function"==typeof(l=null!=(l=n.url||(null!=t?t.url:t))?l:e.hooks.helperMissing)?l.call(null!=t?t:e.nullContext||{},{name:"url",hash:{},data:r}):l)+'" class="'+s(a(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.image:i,t))+' rounded-lg"/>\n</a>\n<span class="upload-logo d-none"></span>\n'},3:function(e,t,n,o,r){e.propertyIsEnumerable;var i,l=e.lambda,a=e.escapeExpression;return'<a class="d-flex flex-column justify-content-center align-items-center mx-auto no-decoration rounded-lg upload-logo '+a(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.addCrest:i,t))+'">\n <div class="'+a(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.plusSvg:i,t))+'">'+(null!=(i=l(null!=(i=null!=t?t.options:t)?i.plusSvg:i,t))?i:"")+'</div>\n <div class="w-75">'+a((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"addCrest",{name:"lang",hash:{},data:r}))+"</div>\n</a>\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,r){var i;return e.propertyIsEnumerable,null!=(i=n.if.call(null!=t?t:e.nullContext||{},null!=t?t.url:t,{name:"if",hash:{},fn:e.program(1,r,0),inverse:e.program(3,r,0),data:r}))?i:""},useData:!0})},58266:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,o,r){return'<div class="items-region"></div>'},useData:!0})},99223:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({1:function(e,t,n,o,r){var i;return e.propertyIsEnumerable,e.escapeExpression(e.lambda(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.disabled:i,t))},3:function(e,t,n,o,r){var i;return e.propertyIsEnumerable,e.escapeExpression(e.lambda(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.selected:i,t))},5:function(e,t,n,o,r){e.propertyIsEnumerable;var i,l=e.lambda;return' <span class="'+e.escapeExpression(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.caret:i,t))+' d-inline-block position-absolute">\n '+(null!=(i=l(null!=(i=null!=t?t.options:t)?i.caretSvg:i,t))?i:"")+"\n </span>\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,r){e.propertyIsEnumerable;var i,l,a=e.lambda,s=e.escapeExpression,c=null!=t?t:e.nullContext||{};return'<div class="position-relative '+s(a(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.library:i,t))+" "+(null!=(i=n.if.call(c,null!=(i=null!=t?t.options:t)?i.disabled:i,{name:"if",hash:{},fn:e.program(1,r,0),inverse:e.noop,data:r}))?i:"")+'">\n <a class="position-relative library-event '+s(a(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.libraryAnchor:i,t))+" "+(null!=(i=n.if.call(c,null!=(i=null!=t?t.options:t)?i.open:i,{name:"if",hash:{},fn:e.program(3,r,0),inverse:e.noop,data:r}))?i:"")+' ui-anchor no-hover-text-underline">\n'+(null!=(i=n.if.call(c,null!=(i=null!=t?t.options:t)?i.hasFolders:i,{name:"if",hash:{},fn:e.program(5,r,0),inverse:e.noop,data:r}))?i:"")+' <span class="'+s(a(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.text:i,t))+' ui-text">'+s("function"==typeof(l=null!=(l=n.name||(null!=t?t.name:t))?l:e.hooks.helperMissing)?l.call(c,{name:"name",hash:{},data:r}):l)+'</span>\n </a>\n <div class="actions-region"></div>\n</div>\n<div class="folders-region"></div>'},useData:!0})},8050:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,o,r){e.propertyIsEnumerable;var i,l=e.lambda;return'<span data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" class="'+e.escapeExpression(l(null!=(i=null!=t?t.options:t)?i.dropdownClass:i,t))+' d-inline-block ui-dropdown-toggle">\n '+(null!=(i=l(null!=(i=null!=t?t.options:t)?i.svg:i,t))?i:"")+'\n</span>\n<div class="items-region"></div>'},useData:!0})},26704:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({1:function(e,t,n,o,r){e.propertyIsEnumerable;var i,l=e.lambda;return'<span data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" class="'+e.escapeExpression(l(null!=(i=null!=t?t.options:t)?i.dropdownClass:i,t))+' d-inline-block ui-dropdown-toggle">\n '+(null!=(i=l(null!=(i=null!=t?t.options:t)?i.svg:i,t))?i:"")+'\n</span>\n<div class="items-region"></div>\n'},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,r){var i;return e.propertyIsEnumerable,null!=(i=n.if.call(null!=t?t:e.nullContext||{},null!=(i=null!=t?t.options:t)?i.hasActions:i,{name:"if",hash:{},fn:e.program(1,r,0),inverse:e.noop,data:r}))?i:""},useData:!0})},32122:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({1:function(e,t,n,o,r){e.propertyIsEnumerable;var i,l=e.lambda,a=e.escapeExpression;return'<div class="'+a(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.addLibraryContainer:i,t))+'">\n <button class="applink-new-library btn btn-outline-secondary '+a(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.addLibrary:i,t))+'">\n <span class="'+a(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.plus:i,t))+' d-inline-block position-absolute">\n '+(null!=(i=l(null!=(i=null!=t?t.options:t)?i.plusSvg:i,t))?i:"")+"\n </span>\n "+a((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"newLibrary",{name:"lang",hash:{},data:r}))+"\n </button>\n</div>\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,r){var i;return e.propertyIsEnumerable,'<div class="logo-region"></div>\n<div class="folder-tree-region"></div>\n'+(null!=(i=n.if.call(null!=t?t:e.nullContext||{},null!=(i=null!=t?t.options:t)?i.canCreateLibraries:i,{name:"if",hash:{},fn:e.program(1,r,0),inverse:e.noop,data:r}))?i:"")},useData:!0})}}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[7136],{54096:function(e,t,n){"use strict";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}},79410:function(e,t,n){"use strict";n.d(t,{D:function(){return l}});var r=n(1024),a=n.n(r),i=n(58566),o=n(34279),c=n(4705),l=function(e,t,n){var r,l=(r=null==n?void 0:n.storage)?r===c.Z1.SessionStorage?c.qS:c.SG:null,s=null==l?void 0:l.get(e),u=(0,i.useDispatch)(),m=(0,i.useSelector)((function(t){return t.viewModelData[e]}));function d(){return null!=s}"undefined"!==s&&"null"!==s||(s=null);var p=(void 0!==t||d())&&void 0===m;function f(t,n){l&&function(t,n){if(l){var r=l.get(e);"string"!=typeof t||void 0===n?l.set(e,t):l.set(e,Object.assign(Object.assign({},r),{dataOrKey:n}))}}(t,n),u({type:o.B.UPDATE,payload:{viewModelKey:e,dataOrKey:t,keyData:n}})}return a().useEffect((function(){if(p)return d()?void f(s):void f(t)}),[]),p?d()?[s,f]:[t,f]:[null!=m?m:void 0,f]}},42227:function(){},41387:function(e,t,n){"use strict";n.d(t,{w:function(){return r}});var r={FILTER_PARAM_PREFIX:"filters.",MAX_CHECKBOXES_PER_COLUMN:10}},10766:function(e,t,n){"use strict";n.r(t),n.d(t,{ShareView:function(){return Ln}});var r,a=n(1024),i=n.n(a),o=n(58566),c=n(57857),l=n(86120),s=n(15408),u=n(66703),m=n(71575),d=n(2491),p=n(36357);!function(e){e.GoogleClassroom="google-classroom",e.MicrosoftTeams="microsoft-teams"}(r||(r={}));var f,v,y=c.T.encloseNamespace("shared.shared-utils"),g=function(e,t){return[{id:r.GoogleClassroom,name:y("googleClassroom"),enabled:null!=e&&e,settingName:p.E.ShareToGoogleClassroom},{id:r.MicrosoftTeams,name:y("msftTeams"),enabled:null!=t&&t,settingName:p.E.ShareToMicrosoftTeams}]},h=n(98495),b=n(40221),E=n(68003);function S(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}!function(e){e.ManageSubjectPreferences="subjects.preferences.manage",e.FollowSubjects="subjects.follow",e.ViewClassrooms="classrooms.view",e.ManageAllClassrooms="classrooms.manage.all",e.ShareToClassrooms="share.direct.classrooms",e.ShareToClassroomGroups="share.direct.classroomgroups",e.CreateClassrooms="classrooms.create",e.DeleteClassrooms="classrooms.delete",e.StudentExperience="studentexperience",e.ManageUsers="users.manage",e.ManageIntegrations="integrations.manage",e.EditProfileDetails="profile.edit",e.ManageCustomerSettings="customersettings.manage",e.ManageLocalCache="localcache.manage",e.ViewCustomerAnalytics="analytics.customeranalytics.view",e.ManageShareLinkSettings="sharelink.settings.edit",e.ViewProductBoard="productboard.view",e.ViewTrialBanner="trial.banner.view",e.ViewTrialEndPage="trial.endpage.view",e.VideoUpload="video.upload",e.ViewLibraries="libraries.view"}(f||(f={})),function(e){e.ManagePublicPresentation="presentation.public.manage",e.ViewPlaylistsLanding="playlists.landing.view",e.ViewMyVideosLanding="myvideos.landing.view",e.ViewMyFavouritesLanding="myfavourites.landing.view",e.ViewWatchHistoryLanding="watchhistory.landing.view"}(v||(v={}));var C,w=function(){var e=l.a.useBasicFetch(s.N.currentUser()),t=l.a.useBasicFetch(e.hasCompleted&&s.N.permissions()),n=function(e){var t;return S(t={},v.ManagePublicPresentation,!(null==e?void 0:e.isAuthenticated)),S(t,v.ViewPlaylistsLanding,!(null==e?void 0:e.isAuthenticated)),S(t,v.ViewMyVideosLanding,!(null==e?void 0:e.isAuthenticated)),S(t,v.ViewMyFavouritesLanding,!(null==e?void 0:e.isAuthenticated)),S(t,v.ViewWatchHistoryLanding,!(null==e?void 0:e.isAuthenticated)),t}(e.data);return{permissions:t.data,hasPermissions:function(e){return!(!t.hasCompleted||t.hasError||e&&(null==e?void 0:e.length)&&(Array.isArray(e)?e.find((function(e){return!t.data[e]})):!t.data[e]))},hasLocalPermissions:function(e){return!(e&&(null==e?void 0:e.length)&&(Array.isArray(e)?e.find((function(e){return!n[e]})):!n[e]))},isLoaded:t.hasCompleted}},k=n(8952),I=n(53808);function O(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}!function(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)"}(C||(C={}));var x=n(39396),T=n(63791),A="h8OBl";function N(e,t,n,r,a){var i="form-control";return n||(i+=" ".concat("cKcry")),"left"===e&&(i+=" ".concat("Rt24D")),("right"===e&&!t||"left"===e&&t)&&(i+=" ".concat("pxKzq")),"right"===e&&t&&(i+=" ".concat("Oerjh")),"lg"===a&&(i+=" form-control-lg"),"sm"===a&&(i+=" form-control-sm"),r&&(i+=" ".concat(r)),i}function L(e){var t="d-inline-block svg-container";return I.q.isFunction(e)?t+" cursor-pointer":t}function P(e){var t=e.onClickSearchIcon,n=e.searchIconPlacement,r=e.showClearInputIcon,i=e.onClickClearInput,o=e.highlightOnFocus,c=e.className,l=e.formSize,s=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}(e,["onClickSearchIcon","searchIconPlacement","showClearInputIcon","onClickClearInput","highlightOnFocus","className","formSize"]),u=function(){return a.createElement("div",{className:"d-inline-block"},a.createElement(x.x,{svgName:T.vn.Search,size:x.S.Standard,onClick:t,className:L(t)}))};return a.createElement("div",{className:"position-relative ".concat("utnMG")},"left"===n&&a.createElement("div",{className:"".concat(A," ").concat("L5mrV")},a.createElement(u,null)),a.createElement("input",Object.assign({className:N(n,r,o,c,l)},s)),("right"===n||!!r)&&a.createElement("div",{className:"".concat(A," ").concat("V23aG")},!!r&&a.createElement((function(){return a.createElement("div",{className:"d-inline-block text-muted ".concat("TAoT9")},a.createElement(x.x,{svgName:T.vn.Close,size:x.S.Standard,onClick:i,className:L(i)}))}),null),"right"===n&&a.createElement(u,null)))}var j=n(99910),U=n(2248),F=n(85887);function R(e){return R="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},R(e)}var V,D={isNumber:function(e){return D.isType(e,"number")},isString:function(e){return D.isType(e,"string")},isType:function(e,t){return R(e)===t}};function _(e){return function(e){if(Array.isArray(e))return M(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 M(e,t);var n=Object.prototype.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)?M(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.")}()}function M(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function B(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function G(e,t){var n;return B(n={},V.Recent,t),B(n,V.Local,e),B(n,V.Remote,[]),B(n,V.Generic,[]),n}function z(e,t){return F.t.isObject(e)&&e.hasOwnProperty(t)&&D.isString(e[t])}function q(e,t){e(Object.assign(Object.assign({},G([],[])),B({},V.Generic,[{type:t,generic:!0}])))}function H(e,t,n){return function(r){var a,i,o=r.value,c=r.reason;if((null===(i=null===(a=e.allowableSuggestionFetchRequestedReasons)||void 0===a?void 0:a.includes(c))||void 0===i||i)&&(o.length||n(),!(o.length<e.activationLength))){if(e.local){var s=I.q.isFunction(e.getLocalSuggestions)?e.getLocalSuggestions(o,e.local):(u=o,m=e.local,d=e.valueKey,(p=u.trim().toLowerCase()).length?m.filter((function(e){return!(!z(e,d)||!D.isString(e[d]))&&e[d].trim().toLowerCase().includes(p)})):[]);if(!s.length&&e.getEmptyStateComponent)return void q(t,"empty");t((function(e){var t;return Object.assign(Object.assign({},e),(B(t={},V.Local,s),B(t,V.Generic,[]),t))}))}var u,m,d,p;e.getRemoteUrl&&(q(t,"loading"),function(n,r,a,i,o){var c=I.q.isFunction(n)&&n(r);c&&l.a.ajaxRequest({resource:c,type:U.k.GET,success:function(n){var r=I.q.isFunction(e.formatRemoteSuggestions)?e.formatRemoteSuggestions(n):n;r.length||!e.getEmptyStateComponent?t((function(e){var t;return Object.assign(Object.assign({},e),(B(t={},V.Remote,r),B(t,V.Generic,[]),t))})):q(t,"empty")},error:function(){q(t,"errored")},headers:o})}(e.getRemoteUrl,o,0,0,e.requestHeaders))}}}function K(e,t,n,r,a){var i=function(t){var n=e[t];return n?n.map((function(e){return Object.assign(Object.assign({},e),{suggestionType:t})})):[]},o=i(V.Recent),c=i(V.Local),l=i(V.Remote),s=i(V.Generic);if(s.length)return[{data:s,suggestionType:V.Generic}];if(I.q.isFunction(r))return r([].concat(_(c),_(l),_(o)));var u=[];return((null==c?void 0:c.length)||(null==l?void 0:l.length))&&u.push({title:t,data:Z([].concat(_(c),_(l)),a),suggestionType:V.Local}),(null==o?void 0:o.length)&&u.push({title:n,data:Z(o,a),suggestionType:V.Recent}),u}function Z(e,t){return"boolean"==typeof t||e.length<=t?e:e.slice(0,t)}function $(e){return e.data}function W(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=!0,c=!1;try{for(n=n.call(e);!(o=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);o=!0);}catch(e){c=!0,a=e}finally{try{o||null==n.return||n.return()}finally{if(c)throw a}}return i}}(e,t)||Q(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 Q(e,t){if(e){if("string"==typeof e)return X(e,t);var n=Object.prototype.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)?X(e,t):void 0}}function X(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}!function(e){e.Local="local",e.Recent="recent",e.Remote="remote",e.Generic="generic"}(V||(V={}));var Y="shared.searchBar",J=I.q.isFunction;function ee(e){return e.renderAsForm?a.createElement("form",{onSubmit:e.onSubmit},e.children):a.createElement(a.Fragment,null,e.children)}function te(e){var t,n=G(e.initialLocalSuggestions,e.recentSearches),r=W(a.useState(e.initialQuery||""),2),i=r[0],o=r[1],l=W(a.useState(n),2),s=l[0],u=l[1],m=W(a.useState(e.initialQuery||""),2),d=m[0],p=m[1],f=W(a.useState("none"),2),v=f[0],y=f[1],g=function(e){var t,n,r=(t=(0,a.useState)(window.matchMedia(e).matches),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=!0,c=!1;try{for(n=n.call(e);!(o=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);o=!0);}catch(e){c=!0,a=e}finally{try{o||null==n.return||n.return()}finally{if(c)throw a}}return i}}(t,n)||function(e,t){if(e){if("string"==typeof e)return O(e,t);var n=Object.prototype.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)?O(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.")}()),i=r[0],o=r[1];return(0,a.useEffect)((function(){var t=window.matchMedia(e);t.matches!==i&&o(t.matches);var n=function(){return o(t.matches)};return t.addListener(n),function(){return t.removeListener(n)}}),[e]),i}(C.XS);a.useEffect((function(){if(!i.length){var t=G(e.initialLocalSuggestions,e.recentSearches);u(t)}}),[e.initialLocalSuggestions,e.recentSearches]),a.useEffect((function(){var t=e.initialQuery||"";i!==t&&(o(t),p(t))}),[e.initialQuery]);var b=function(){var t=G(e.initialLocalSuggestions,e.recentSearches);u(t)},E=function(){o(""),p("")};!function(e,t){a.useEffect((function(){e&&!e.current&&(e.current={resetQuery:t})}),[null==e?void 0:e.current])}(e.controlsRef,E);var S,w,x,T,A,N=function(){y("none")},L=function(t){t.preventDefault(),J(e.onSubmit)&&e.onSubmit(i),e.clearQueryOnSelect&&E()},U=a.useMemo((function(){return e.debounceTime?I.q.debounce(H(e,u,b),e.debounceTime):H(e,u,b)}),[e.debounceTime].concat(function(e){if(Array.isArray(e))return X(e)}(S=e.onSuggestionDependencies)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(S)||Q(S)||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.")}()));return a.createElement(ee,{onSubmit:L,renderAsForm:!!e.renderAsForm},a.createElement(k,Object.assign({ref:function(e){null!==e&&(t=e.input)},suggestions:K(s,e.suggestionsHeading,e.recentSearchHeading||c.T.getPhrase(Y,"recentSearchesHeading"),e.getSections,e.suggestionLimit),onSuggestionsFetchRequested:U,onSuggestionHighlighted:function(e){var t=e.suggestion;("none"!==v||t)&&y(t?"suggestion":"custom")},onSuggestionsClearRequested:function(){e.alwaysRenderSuggestions||b()},onSuggestionSelected:function(n,r){var a=r.suggestion;a.generic||(e.clearQueryOnSelect&&E(),e.onSuggestionSelected(a,t))},getSuggestionValue:function(t){return function(t){return J(e.shouldUpdateQueryOnSelection)?e.shouldUpdateQueryOnSelection(t):e.shouldUpdateQueryOnSelection}(t)?function(e,t){return z(t,e)?t[e]:""}(e.valueKey,t):i},renderSuggestion:function(t){if(t.generic){if("empty"===t.type)return i.length>=e.activationLength&&J(e.getEmptyStateComponent)?e.getEmptyStateComponent(i):a.createElement(a.Fragment,null);if("errored"===t.type&&J(e.getErrorStateComponent)){var n=H(e,u,b);return e.getErrorStateComponent((function(){return n({value:i,reason:"input-changed"})}))}if("loading"===t.type)return r=e.loadingComponentClassName,a.createElement("div",{className:"d-flex justify-content-center cursor-default ".concat(null!=r?r:""),onClick:function(e){e.stopPropagation()}},a.createElement(j.Spinner,{as:"span",animation:"border",role:"status"}))}var r;return J(e.getSuggestionComponent)?e.getSuggestionComponent(t):function(e,t){return z(t,e)?a.createElement(a.Fragment,null,t[e]):a.createElement(a.Fragment,null)}(e.valueKey,t)},renderSuggestionsContainer:function(t){var n=t.containerProps,r=n.ref,o=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}(n,["ref"]);if(!e.customScrollbarProps){var c={suggestions:s,query:i,isDropdownOpen:!!t.children};return a.createElement("div",Object.assign({ref:r},o,{onMouseOut:N}),t.children,e.getCreateComponent&&e.getCreateComponent(Object.assign({userInput:d,isActive:"custom"===v,onClear:function(){E(),b()}},c)),e.getFooterComponent&&e.getFooterComponent(c))}return a.createElement(h.ZP,Object.assign({ref:r},e.customScrollbarProps,o),t.children)},alwaysRenderSuggestions:e.alwaysRenderSuggestions,focusInputOnSuggestionClick:!g&&e.focusInputOnSuggestionClick,inputProps:{placeholder:e.placeholder||c.T.getPhrase(Y,"placeholder"),value:i,onChange:function(t,n){var r=n.newValue,a=n.method;"type"===a&&p(r),"escape"===a&&y("none"),["up","down"].includes(a)||(o(r),J(e.onQueryChange)&&e.onQueryChange(r))},onKeyDown:function(t){8===t.keyCode&&e.onBackspace&&!i&&e.onBackspace()},autoFocus:!!e.autoFocusInput,highlightOnFocus:e.highlightInputOnFocus,onClickSearchIcon:!!e.submitOnClickSearchIcon&&L,searchIconPlacement:e.searchIconPlacement,showClearInputIcon:!!e.showClearInputIcon&&!!i.length,onClickClearInput:function(){E(),J(e.onClickClearInput)&&e.onClickClearInput()},formSize:e.size,onBlur:function(){e.onBlur&&e.onBlur(i)}},renderInputComponent:P,theme:(w=e.theme,x=!!s.generic.length,T="function"==typeof w?w(x):w,A=function(e){return{container:"position-relative",suggestionsContainerOpen:"bg-white py-1 border rounded ".concat("avM9L"),suggestionsList:"list-unstyled m-0",suggestion:"".concat(e?"":"cursor-pointer"," py-1 px-2"),suggestionHighlighted:e?"":"gFitp",sectionContainer:"border-bottom py-1 ".concat("u35Wz")}}(x),Object.assign(A,T)),multiSection:!0,renderSectionTitle:function(t){return J(e.renderSectionTitle)?e.renderSectionTitle(t,e.sectionTitleClassName):function(e,t){if(e.title)return a.createElement("div",{className:"pb-1 ".concat(null!=t?t:"")},a.createElement("strong",null,e.title))}(t,e.sectionTitleClassName)},getSectionSuggestions:$},e.renderSuggestionsOnInputFocus?{shouldRenderSuggestions:function(){return J(e.renderSuggestionsOnInputFocus)?e.renderSuggestionsOnInputFocus(i):e.renderSuggestionsOnInputFocus}}:{})))}te.defaultProps={valueKey:"name",activationLength:3,suggestionLimit:5,recentSearches:[],initialLocalSuggestions:[],searchIconPlacement:"right",renderAsForm:!0,onSuggestionDependencies:[],shouldUpdateQueryOnSelection:!0,focusInputOnSuggestionClick:!0};var ne=n(74421),re=n(63946),ae=function(e,t){return(null==e?void 0:e.typeId)===t},ie=n(83891),oe=n(38182),ce=n(1268),le=n(46237),se="Zcpg3",ue=c.T.encloseNamespace("shared.userRecipientItemMetadata");function me(e){var t;return i().createElement(i().Fragment,null,i().createElement("div",{className:"".concat(se," d-inline-block")},i().createElement(oe.q,{imageUrl:null===(t=e.user.avatar)||void 0===t?void 0:t.url,imageCdnUrl:e.imageCdnUrl,initials:ie.l.getInitials(e.user.name,e.user.surname)})),i().createElement("div",{className:e.detailsClassName},i().createElement("h4",{className:"font-size-normal font-weight-normal m-0"},ie.l.getDisplayName(e.user)),i().createElement("p",{className:"text-muted m-0"},function(e){var t=ie.l.getUserType(e),n=ie.l.getUserRole(e);if(t===ce.Y.Staff)return n===le.i.Admin?ue("admin"):ue("staff");var r=ie.l.getYearGroup(e);return(null==r?void 0:r.name)?r.name:ue("student")}(e.user))))}var de=n(84611);function pe(e){return i().createElement(i().Fragment,null,i().createElement("div",{className:"".concat(se," d-inline-block")},i().createElement(de.f,{svgName:T.vn.Classrooms,variant:"teal"})),i().createElement("div",{className:e.detailsClassName},i().createElement("h4",{className:"font-size-normal font-weight-normal m-0"},e.classroom.name),i().createElement("p",{className:"text-muted m-0"},(n=null===(t=e.classroom.users)||void 0===t?void 0:t.count,Number.isInteger(n)?c.T.getPhrase("shared.classroomRecipientItemMetadata","subheading",{smartCount:n}):""))));var t,n}var fe=n(16287);function ve(e){switch(e){case fe.ClassroomGroupColour.Pink:return"pink";case fe.ClassroomGroupColour.Orange:return"orange";case fe.ClassroomGroupColour.Green:return"green";case fe.ClassroomGroupColour.Blue:return"blue";case fe.ClassroomGroupColour.Purple:return"purple";case fe.ClassroomGroupColour.Indigo:return"indigo";default:return"pink"}}function ye(e){var t;return i().createElement(i().Fragment,null,i().createElement("div",{className:"".concat(se," d-inline-block")},i().createElement(de.f,{svgName:T.vn.Group,variant:ve(null===(t=e.classroomGroup.metadata)||void 0===t?void 0:t.colour)})),i().createElement("div",{className:e.detailsClassName},i().createElement("h4",{className:"font-size-normal font-weight-normal m-0"},e.classroomGroup.name),i().createElement("p",{className:"text-muted m-0"},function(e){var t,n,r,a=null!==(n=null===(t=e.users)||void 0===t?void 0:t.count)&&void 0!==n?n:0,i=null===(r=e.classroom)||void 0===r?void 0:r.name;return i?c.T.getPhrase("shared.classroomGroupRecipientItemMetadata","subheading",{classroomName:i,smartCount:a}):""}(e.classroomGroup))))}function ge(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var he=c.T.encloseNamespace("share.recipientItem");function be(e){switch(e){case ne.E.User:return he("removeUser");case ne.E.Classroom:return he("removeClassroom");case ne.E.ClassroomGroup:return he("removeGroup")}return null}function Ee(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=!0,c=!1;try{for(n=n.call(e);!(o=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);o=!0);}catch(e){c=!0,a=e}finally{try{o||null==n.return||n.return()}finally{if(c)throw a}}return i}}(t,n)||function(e,t){if(e){if("string"==typeof e)return ge(e,t);var n=Object.prototype.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)?ge(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="".concat("kdcb0"," d-flex");a&&(c+=" ".concat("xH6Mu"));var l="".concat(e.removeRecipient?"_V928":"v5EmV"," d-inline-block ml-2");return i().createElement("div",{className:c},ae(e.entity,ne.E.User)?i().createElement(me,{user:e.entity,imageCdnUrl:e.imageCdnUrl,detailsClassName:l}):ae(e.entity,ne.E.Classroom)?i().createElement(pe,{classroom:e.entity,detailsClassName:l}):ae(e.entity,ne.E.ClassroomGroup)?i().createElement(ye,{classroomGroup:e.entity,detailsClassName:l}):void 0,I.q.isFunction(e.removeRecipient)&&i().createElement("div",{className:"".concat("mCbMC"," d-inline-flex justify-content-center align-items-center")},a?i().createElement(j.Spinner,{as:"div",size:"sm",animation:"border",role:"status"}):i().createElement(re.u,{title:be(e.entity.typeId),spanHack:!0},i().createElement("div",{className:"close cursor-pointer",role:"button",onClick:function(){o(!0),e.removeRecipient(e.entity.id,(function(){return o(!1)}))}},"×"))))}function Se(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Ce(e){var t,n,r,a,o,c,l=e.query,s=void 0===l?"":l,m=e.imageUrl,d=(t=s,300,o=i().useState(t),c=2,r=(n=function(e){if(Array.isArray(e))return e}(o)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,i=[],o=!0,c=!1;try{for(n=n.call(e);!(o=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);o=!0);}catch(e){c=!0,a=e}finally{try{o||null==n.return||n.return()}finally{if(c)throw a}}return i}}(o,c)||function(e,t){if(e){if("string"==typeof e)return Se(e,t);var n=Object.prototype.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)?Se(e,t):void 0}}(o,c)||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.")}())[0],a=n[1],i().useEffect((function(){var e=setTimeout((function(){return a(t)}),300);return function(){return clearTimeout(e)}}),[t,300]),r);return i().createElement("div",{className:"d-flex flex-column align-items-center text-center",onClick:function(e){e.stopPropagation()}},i().createElement("img",{alt:"",role:"presentation",src:m,className:"pb-2 ".concat("bKTf0")}),i().createElement("h2",{className:"h6"},i().createElement(u.x,{namespace:"shared.typeaheadEmptyState",phrase:"noResults",options:{query:d,smartCount:d.length}})))}var we=n(58424),ke="shared.typeaheadErrorState";function Ie(e){return i().createElement("div",{className:"d-flex flex-column align-items-center text-center",onClick:function(e){e.stopPropagation()}},i().createElement("img",{alt:"",role:"presentation",src:e.imageUrl,className:"pb-2 ".concat("k5mEG")}),i().createElement("h2",{className:"h6"},i().createElement(u.x,{namespace:ke,phrase:"error"})),i().createElement(we.L,{onClick:function(t){t.stopPropagation(),e.onClickTryAgain()},className:"btn btn-link info-link p-0"},i().createElement(u.x,{namespace:ke,phrase:"tryAgain"})))}function Oe(e){var t=e.imageUrl,n=e.initials,r={};return t&&(r.backgroundImage="url('".concat(t,"')")),i().createElement("div",{className:"srrS3",style:r},t?i().createElement(i().Fragment,null," "):n)}var xe="laVU4",Te="rFH4W",Ae=c.T.encloseNamespace("shared.inputSelection");function Ne(e){var t,n="".concat(xe," ").concat("BarYz");return e.typeId===ne.E.Classroom?n+=" text-teal":n+=" text-".concat(ve(null===(t=e.metadata)||void 0===t?void 0:t.colour)),n}function Le(e){var t,n=function(e){var t;switch(e.typeId){case ne.E.Classroom:return"text-hover-teal";case ne.E.ClassroomGroup:return"text-hover-".concat(ve(null===(t=e.metadata)||void 0===t?void 0:t.colour))}}(e.selection),r=e.selection.typeId===ne.E.Classroom;if(!e.canExpand){if(e.selection.typeId===ne.E.User){var a=e.selection;return i().createElement("div",{className:xe},i().createElement(Oe,{imageUrl:null===(t=a.avatar)||void 0===t?void 0:t.url,initials:ie.l.getInitials(e.selection.name,e.selection.surname)}))}return i().createElement(re.u,{title:Ae(r?"emptyClassroom":"emptyGroup")},i().createElement("div",{className:"align-items-center border border-white bg-white ".concat(Te)},i().createElement(x.x,{className:Ne(e.selection),svgName:r?T.vn.Classrooms:T.vn.Group})))}return e.hasExpanded?i().createElement("div",{className:"d-flex align-items-center text-white ".concat("iKeXW"," ").concat(xe)},i().createElement(j.Spinner,{as:"div",size:"sm",animation:"border",role:"status"})):i().createElement(i().Fragment,null,i().createElement(we.L,{className:"align-items-center cursor-pointer text-white border border-white rounded-circle ".concat("d1NHd"," ").concat(n),onClick:e.onClickExpand},i().createElement(x.x,{svgName:T.vn.Plus,className:"d-flex align-items-center ".concat(xe)})),i().createElement("div",{className:"align-items-center border border-white bg-white ".concat(Te)},i().createElement(x.x,{className:Ne(e.selection),svgName:r?T.vn.Classrooms:T.vn.Group})))}function Pe(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=!0,c=!1;try{for(n=n.call(e);!(o=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);o=!0);}catch(e){c=!0,a=e}finally{try{o||null==n.return||n.return()}finally{if(c)throw a}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return je(e,t);var n=Object.prototype.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)?je(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 je(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Ue(e){var t;switch(e.typeId){case ne.E.User:return"number"==typeof e.userType?2===e.userType?"dark-blue":"indigo":e.userType===ce.Y.Learner?"dark-blue":"indigo";case ne.E.Classroom:return"teal";case ne.E.ClassroomGroup:return ve(null===(t=e.metadata)||void 0===t?void 0:t.colour)}}function Fe(e){var t,n,r,a=ae(e.selection,ne.E.Classroom),o=ae(e.selection,ne.E.ClassroomGroup),c=e.onClickExpand&&(a||o),l=!!(null===(t=e.selection.users)||void 0===t?void 0:t.count),s=!!(null===(r=null===(n=e.selection.users)||void 0===n?void 0:n.data)||void 0===r?void 0:r.length),u=Pe(i().useState(!1),2),m=u[0],d=u[1],p=Pe(i().useState(c&&l),2),f=p[0],v=p[1];if(i().useEffect((function(){v(c&&l)}),[c,l]),s){var y=e.selection,g=Ue(e.selection);return i().createElement("div",{className:"d-flex align-items-center flex-wrap mr-1 mt-1 pb-1 pl-1 pr-4 position-relative border-".concat(g," text-").concat(g," ").concat("HF0E8")},y.users.data.map((function(t){return i().createElement(Re,{key:"".concat(t.id,":").concat(e.selection.id),selection:t,colourVariant:g})})),i().createElement(we.L,{className:"cursor-pointer position-absolute text-".concat(g," ").concat("mgt6Y"),onClick:function(){return e.onClickRemove(e.selection.id)}},i().createElement(x.x,{svgName:T.vn.Close,className:"d-flex align-items-center ".concat(xe)})))}return i().createElement(Re,{selection:e.selection,canExpand:f,hasExpanded:m,onClickExpand:function(){d(!0),e.onClickExpand(e.selection.id)},onClickRemove:e.onClickRemove,colourVariant:Ue(e.selection)})}function Re(e){var t=e.colourVariant||Ue(e.selection),n=e.selection.name;return e.selection.typeId===ne.E.User&&(n=ie.l.getDisplayName(e.selection)),i().createElement("div",{className:"".concat("vEOCt"," bg-").concat(t," badge-pill text-").concat(t," d-flex align-items-center mr-1 mt-1 overflow-hidden")},i().createElement(Le,{canExpand:e.canExpand,hasExpanded:e.hasExpanded,onClickExpand:e.onClickExpand,selection:e.selection}),i().createElement("span",{className:"mx-1 text-white"},n),I.q.isFunction(e.onClickRemove)&&i().createElement(we.L,{className:"d-flex align-items-center cursor-pointer align-self-stretch text-white ".concat("pyzCM"),onClick:function(){return e.onClickRemove(e.selection.id)}},i().createElement(x.x,{svgName:T.vn.Close,className:"d-flex align-items-center ".concat(xe)})))}function Ve(e){var t;return i().createElement("div",{className:"form-control h-auto d-flex align-items-top py-1 px-0 position-relative"},i().createElement(x.x,{className:"svg-container m-1",svgName:T.vn.Search}),i().createElement("div",{className:"".concat("kFjoN"," d-flex flex-wrap align-items-center mt-n1")},e.selections.map((function(t){return i().createElement(Fe,{key:t.id,selection:t,onClickRemove:function(t){return e.removeSelection(t)},onClickExpand:e.fetchSelectionMembers})})),i().createElement(te,{getRemoteUrl:e.getRemoteUrl,requestHeaders:e.requestHeaders,formatRemoteSuggestions:e.formatRemoteSuggestions,onSuggestionSelected:function(t){e.updateSelections(t)},onBackspace:function(){return e.selections.length&&e.removeSelection(b.m.last(e.selections).id)},local:e.localSuggestions,recentSearchHeading:e.recentSearchHeading||c.T.getPhrase("shared.tokenizedTypeahead","recentSearchHeading"),recentSearches:e.recentSearches,placeholder:(null===(t=e.selections)||void 0===t?void 0:t.length)?" ":e.placeholder,searchIconPlacement:!1,activationLength:e.activationLength,clearQueryOnSelect:!0,getSuggestionComponent:function(t){return i().createElement(Ee,{entity:t,imageCdnUrl:e.imageCdnUrl})},getEmptyStateComponent:function(t){return i().createElement(Ce,{query:t,imageUrl:e.emptyStateImageUrl})},getErrorStateComponent:function(t){return i().createElement(Ie,{imageUrl:e.errorStateImageUrl,onClickTryAgain:t})},theme:{container:"Dc3kX",suggestionsContainerOpen:"bg-white py-1 rounded border mt-1 ".concat("c5t3e")},sectionTitleClassName:"pl-2",renderSuggestionsOnInputFocus:!0,debounceTime:e.debounceTime})),!!e.sharePermissionsDescription&&i().createElement("span",{className:"px-2 text-secondary text-nowrap"},e.sharePermissionsDescription))}var De=n(59087);function _e(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Me=c.T.encloseNamespace("shared.copyInput");function Be(e){var t,n,r=(t=a.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=!0,c=!1;try{for(n=n.call(e);!(o=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);o=!0);}catch(e){c=!0,a=e}finally{try{o||null==n.return||n.return()}finally{if(c)throw a}}return i}}(t,n)||function(e,t){if(e){if("string"==typeof e)return _e(e,t);var n=Object.prototype.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)?_e(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.")}()),i=r[0],o=r[1],c=a.createElement("div",{className:"input-group"},a.createElement("input",{type:"text",autoComplete:"off",className:"form-control ".concat("normal"===e.styling?"Q1UGv":""),spellCheck:!1,value:e.value,readOnly:!0}),a.createElement("div",{className:"input-group-append"},a.createElement(De,{text:e.value},a.createElement("button",{className:"btn btn-outline-dark border border-secondary py-0 text-nowrap ".concat("J3fBx"),onClick:function(t){t.preventDefault(),e.onCopy&&e.onCopy(),i||(o(!0),setTimeout((function(){return o(!1)}),2e3))}},Me(i?"copied":"copy")))));return e.label?a.createElement(j.Form.Group,null,a.createElement(j.Form.Label,null,e.label),c):c}Be.defaultProps={styling:"normal"};var Ge,ze=n(33192),qe=n.n(ze);function He(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=!0,c=!1;try{for(n=n.call(e);!(o=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);o=!0);}catch(e){c=!0,a=e}finally{try{o||null==n.return||n.return()}finally{if(c)throw a}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Ke(e,t);var n=Object.prototype.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)?Ke(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 Ke(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}!function(e){e.Expired="Expired",e.Active="Active"}(Ge||(Ge={}));var Ze=c.T.encloseNamespace("share.shareLinkInfo");function $e(e){var t=He(i().useState(!1),2),n=t[0],r=t[1],a=He(i().useState(!1),2),o=a[0],c=a[1],l=function(e){var t=e.linkExpireDate,n=e.isPasswordProtected,r=e.status;if(!t&&!n)return function(e){var t=e.entityTypeId,n=e.privacy,r=e.hasPrivatePlaylistVideos;if(t===ne.E.Playlist)return r?{icon:T.vn.Warning,text:Ze("hasPrivateVideos")}:{icon:T.vn.VisibleOn,text:Ze("public")};if(t===ne.E.Topic||t===ne.E.Series)return{icon:T.vn.VisibleOn,text:Ze("justMySchool")};if(!Array.isArray(n))switch(n.privacy){case"public":return{icon:T.vn.VisibleOn,text:Ze("public")};case"protected":return{icon:T.vn.VisibleOn,text:Ze("clickViewOnly")};case"just_my_customer":return{icon:T.vn.Lock,text:Ze("justMySchool")};case"restricted":case"private":return{icon:T.vn.Lock,text:Ze("private")};default:return{}}}(e);if(!t)return{icon:T.vn.Lock,text:Ze("password")};var a=qe().utc(t).local(),i=qe()(),o=a.isSame(i,"day"),c=a.diff(i,"days");if(!n){var l=o?Ze("expiryToday"):Ze("expiry",{days:c});return r===Ge.Expired&&(l=Ze("expired")),{icon:T.vn.Timer,text:l}}var s=o?Ze("passwordExpiryToday"):Ze("passwordExpiry",{days:c});return r===Ge.Expired&&(s=Ze("passwordExpired")),{icon:T.vn.Lock,text:s}}(Object.assign(Object.assign({},e),{hasPrivatePlaylistVideos:o})),s=l.icon,u=l.text;return i().useEffect((function(){if(Array.isArray(e.privacy)){if(e.privacy.length&&e.entityTypeId===ne.E.Playlist){var t=e.privacy.some((function(e){return!!e.canManageAccess&&("private"===e.privacy||"restricted"===e.privacy)}));r(t),c(t)}}else r(e.privacy.canManageAccess)}),[e.privacy]),i().createElement("div",{className:"d-flex align-items-center"},i().createElement(x.x,{svgName:s,className:"svg-container mr-1"}),n&&e.onClickShowPrivacies?i().createElement(we.L,{className:"info-link",onClick:e.onClickShowPrivacies},u):i().createElement("span",null,u))}var We=n(52076),Qe=n(22218),Xe=n(34254);function Ye(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Je,et={namespace:"share"},tt=function(e,t){e.sort();var n={id:e};return t===ne.E.User&&(n.query="yearGroups,avatar"),t===ne.E.Classroom&&(n.query="users[count()]{limit:0}"),t===ne.E.ClassroomGroup&&(n.query="classroom,users[count()]{limit:0}"),{url:E._.urlBuilder("{gateway}/v1/objects",n),key:"share:recipients:".concat(e.join(":"),":").concat(t)}},nt=n(4705),rt={getRecentItem:function(e,t){var n=t.cacheGet(e);return Array.isArray(n)||(n=[]),n},setRecentItem:function(e,t,n){Array.isArray(t)&&n.cacheSet(e,t)},addRecentItem:function(e,t,n){var r=n.id,a=n.limit,i=void 0===a?5:a,o=rt.getRecentItem(e,t),c=o.indexOf(r);return c>-1&&o.splice(c,1),o.unshift(r),o.length>i&&(o=o.slice(0,i)),rt.setRecentItem(e,o,t),o},removeRecentItem:function(e,t,n){var r=rt.getRecentItem(e,n).filter((function(e){return e!==t.toString()}));rt.setRecentItem(e,r,n)}},at=function(e){return"recently:shared:to:".concat(e)},it=(n(90335),n(84657));!function(e){e.Topic="topic",e.Series="series",e.Playlist="playlist"}(Je||(Je={})),n(50028);var ot,ct,lt,st,ut=(n(42227),n(48318));(st=ot||(ot={})).Newest="newest",st.Oldest="oldest",st.RecentlyUpdated="recently_added",st.AtoZ="atoz",st.ZtoA="ztoa",(lt=ct||(ct={})).OwnedByMe="owned_by_me",lt.Followed="followed",lt.All="all",ut.BaseCollectionIdentifier,n(18830);var mt,dt;!function(e){e.Playlists="playlists",e.Series="series",e.Videos="videos",e.PinnedVideos="pinnedVideos"}(mt||(mt={})),function(e){e.Subject="Subject",e.Curriculum="Curriculum"}(dt||(dt={})),n(85523);var pt=c.T.encloseNamespace("shared.share"),ft={getObjectTypeId:function(e){switch(e){case"video":return ne.E.Video;case"playlist":return ne.E.Playlist;case"subject":return ne.E.Subject;case"series":return ne.E.Series;case"interactive":return ne.E.Interactive;case"clip":return ne.E.Clip}},createLink:function(e){var t={resourceId:e.entity.id};e.password&&(t.password=e.password),e.linkExpireDate&&(t.linkExpireDate=e.linkExpireDate),l.a.fetch(e.dispatch,function(e,t,n,r){return{url:"{gateway}/v1/share/links",key:"create:share:link",type:U.k.POST,data:e,normalizeOptions:et,invalidationKeys:["share:link:object:".concat(e.resourceId),"privacy:".concat(e.resourceId)],success:t,error:n,always:r}}(t,(function(t){We.k.logUserAction(t,We.k.mergeOptions(ft.getAnalyticsOptions(e.entityType),{actionType:Qe.Vw.Create,entity:Qe.py.ShareLink,eventVersion:Qe.eq.V3})),e.success&&e.success(t)}),(function(){e.alerts.error(pt("createLinkError",{name:e.entity.name}))})))},updateLink:function(e,t,n,r,a,i,o,c){l.a.fetch(e,function(e,t,n,r,a){return{url:"{gateway}/v1/share/links/".concat(e.id),key:"edit:share:link",data:t,type:U.k.PUT,normalizeOptions:et,invalidationKeys:["share:".concat(e.id),"share:link:object:".concat(e.objectId),"share:sent"],success:n,error:r,always:a}}(r,a,(function(e){We.k.logUserAction(e,We.k.mergeOptions(ft.getAnalyticsOptions(n),{actionType:Qe.Vw.Edit,entity:Qe.py.ShareLink,eventVersion:Qe.eq.V3})),o&&o(e),i.success(pt("editSuccess",{name:t.name,escapeText:!0}))}),(function(){c&&c(),i.error(pt("editError",{name:t.name,escapeText:!0}))})))},deleteLink:function(e,t,n,r,a,i,o){l.a.fetch(e,function(e,t,n,r){return{url:"{gateway}/v1/share/links/".concat(e.id),key:"delete:share:link",type:U.k.DELETE,normalizeOptions:et,invalidationKeys:["share:".concat(e.id),"share:link:object:".concat(e.objectId)],success:t,error:n,always:r}}(r,(function(){We.k.logUserAction({shareLink:r},We.k.mergeOptions(ft.getAnalyticsOptions(n),{actionType:Qe.Vw.Delete,entity:Qe.py.ShareLink})),i&&i(),a.success(pt("deleteSuccess",{name:t.name,escapeText:!0}))}),(function(){a.error(pt("deleteError",{name:t.name,escapeText:!0}))}),(function(){o&&o()})))},createOrUpdateDirectShare:function(e){var t=e.dispatch,n=e.entity,r=e.entityType,a=e.currentUser,i=e.recipients,o=e.sentDirectShare,c=e.message,s=e.onSuccess,u=e.onError,m=e.onDone,d=function(e){s&&s(e),We.k.logUserAction(Object.assign(Object.assign({},n),{shareCount:i.length}),We.k.mergeOptions(ft.getAnalyticsOptions(r),{actionType:Qe.Vw.Share,descriptor:Qe.YM.DirectShare,eventVersion:Qe.eq.V3})),i.map((function(e){!function(e,t){rt.addRecentItem(at(e),nt.SG,t)}(a.id,{id:e.id})}))},p={objectId:n.id,objectTypeId:ft.getObjectTypeId(r),recipients:i,message:c},f={recipients:i,message:c},v=o?function(e,t,n,r,a){var i="direct:share:recipients:".concat(e);return{url:"{gateway}/v1/share/".concat(e,"/recipients"),key:"edit:direct:share",data:t,type:U.k.POST,normalizeOptions:et,invalidationKeys:"share:sent",updateState:{keys:i,updateData:function(e){return!e[i]||t.recipients.length?e:Object.assign(Object.assign({},e),Ye({},i,[]))}},success:n,error:r,always:a}}(o.id,f,d,u,m):function(e,t,n,r){return{url:"{gateway}/v1/share",key:"create:direct:share",data:e,type:U.k.POST,normalizeOptions:et,invalidationKeys:["direct:share:sent:object:".concat(e.objectId),"share:sent"],success:t,error:n,always:r}}(p,d,u,m);l.a.fetch(t,v)},removeDirectShareRecipient:function(e,t,n,r,a,i){l.a.fetch(e,function(e,t,n,r,a){var i="direct:share:recipients:".concat(e);return{url:E._.urlBuilder("{gateway}/v1/share/".concat(e,"/recipients"),{recipientId:t}),key:"remove:direct:share:recipient",type:U.k.DELETE,normalizeOptions:et,invalidationKeys:"share:sent",updateState:{keys:i,updateData:function(e){return e[i]?Object.assign(Object.assign({},e),Ye({},i,[])):e}},success:n,error:r,always:a}}(r.id,t,(function(e){a&&a(e),We.k.logUserAction({shareCount:1},We.k.mergeOptions(ft.getAnalyticsOptions(n),{actionType:Qe.Vw.Unshare}))}),i))},getDirectShareRecipientsRequest:function(e){var t,n,r,a;return!!(null===(t=null==e?void 0:e.recipients)||void 0===t?void 0:t.length)&&(n=e.id,r=e.recipients,a=r.map((function(e){return"id=".concat(e.id)})).join("&"),{url:"{gateway}/v1/objects?".concat(a),key:"direct:share:recipients:".concat(n)})},useHydrateRecipients:function(e){var t=b.m.groupBy(e,"typeId"),n=t[ne.E.User],r=t[ne.E.Classroom],a=t[ne.E.ClassroomGroup];l.a.useBasicFetch(!!(null==n?void 0:n.length)&&tt(n.map((function(e){return e.id})),ne.E.User)),l.a.useBasicFetch(!!(null==r?void 0:r.length)&&tt(r.map((function(e){return e.id})),ne.E.Classroom)),l.a.useBasicFetch(!!(null==a?void 0:a.length)&&tt(a.map((function(e){return e.id})),ne.E.ClassroomGroup))},getAnalyticsOptions:function(e){var t;switch(e){case"playlist":t=Qe.py.Playlist;break;case"subject":t=Qe.py.Classification;break;case"video":t=Qe.py.Video;break;case"series":t=Qe.py.Series;break;case"interactive":t=Qe.py.Interactive;break;case"clip":t=Qe.py.Clip}return{entity:t,location:Qe.LZ.Popup,workflowPhase:Qe.eu.Complete}},getFetchFunctionByType:function(e){switch(e){case"video":return function(e){return l.a.useBasicFetch(function(e,t){return{url:E._.urlBuilder("{gateway}/v1/objects/".concat(e),{query:it.v.VIDEO,permissionFilterOption:t}),publicUrl:E._.urlBuilder("/api/objects/".concat(e),{query:it.t.VIDEO,permissionFilterOption:Xe.r.StripMetadata}),key:"videos:".concat(e,":").concat(t),formatData:function(e){var t,n;return(null===(t=e.interactives)||void 0===t?void 0:t.data)&&(e.interactives.data=e.interactives.data.map((function(t){return Object.assign(Object.assign({},t),{video:{id:e.id}})}))),(null===(n=e.clips)||void 0===n?void 0:n.data)&&(e.clips.data=e.clips.data.map((function(t){return Object.assign(Object.assign({},t),{video:{id:e.id}})}))),e}}}(e))};case"playlist":return function(e){return l.a.useBasicFetch(function(e,t,n){return{url:E._.urlBuilder("{gateway}/v1/objects/".concat(e),{query:"".concat(it.v.PLAYLIST,",_isClickViewPlaylist,_liteOwner")}),publicUrl:E._.urlBuilder("/api/objects/".concat(e),{query:"".concat(it.v.PLAYLIST,",_isClickViewPlaylist")}),key:"playlist:".concat(e),success:t,error:n}}(e))};case"subject":return function(e,t){return l.a.useBasicFetch(function(e,t,n){return{url:E._.urlBuilder("/api/domain/v1/subjects/".concat(e),{query:it.v.CLASSIFICATION(t)}),publicUrl:E._.urlBuilder("/api/subjects/classifications/".concat(e),{query:it.t.CLASSIFICATION}),key:"classification:".concat(e),error:n}}(e,t))};case"series":return function(e){return l.a.useBasicFetch(function(e){var t={query:it.v.SERIES};return{url:E._.urlBuilder("{gateway}/v1/objects/".concat(e),t),publicUrl:E._.urlBuilder("/api/objects/".concat(e),t),key:"series:".concat(e)}}(e))};case"interactive":return function(e){return l.a.useBasicFetch(function(e,t){return{url:E._.urlBuilder("{gateway}/v1/objects/".concat(e),{query:it.v.INTERACTIVE,permissionFilterOption:t}),key:"interactive:metadata:".concat(e,":").concat(t)}}(e))};case"clip":return function(e){return l.a.useBasicFetch(function(e,t){return{key:"clip:".concat(e,":").concat(t),url:E._.urlBuilder("{gateway}/v1/objects/".concat(e),{query:it.v.CLIP,permissionFilterOption:t})}}(e))}}},getImageUrl:function(e){var t,n,r,a,i,o,c,l;return"thumbnail"in e&&e.thumbnail?null===(t=e.thumbnail)||void 0===t?void 0:t.url:"cover"in e?null===(n=e.cover)||void 0===n?void 0:n.url:"tallPoster"in e?null===(r=e.tallPoster)||void 0===r?void 0:r.url:"video"in e&&e.video?null===(i=null===(a=e.video)||void 0===a?void 0:a.thumbnail)||void 0===i?void 0:i.url:"clip"in e?null===(l=null===(c=null===(o=null==e?void 0:e.clip)||void 0===o?void 0:o.video)||void 0===c?void 0:c.thumbnail)||void 0===l?void 0:l.url:""}},vt=n(70065);function yt(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=!0,c=!1;try{for(n=n.call(e);!(o=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);o=!0);}catch(e){c=!0,a=e}finally{try{o||null==n.return||n.return()}finally{if(c)throw a}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return gt(e,t);var n=Object.prototype.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)?gt(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 gt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var ht="share.shareAsLink";function bt(e){var t=yt(i().useState(!1),2),n=t[0],r=t[1],a=yt(i().useState(!1),2),o=a[0],l=a[1];return i().useEffect((function(){r(!!e.shareLinkIsLoading)}),[e.shareLinkIsLoading]),n?i().createElement("div",{className:"text-center"},i().createElement(j.Spinner,{as:"div",animation:"border",role:"status"})):i().createElement(i().Fragment,null,i().createElement("div",{className:"d-flex justify-content-between"},i().createElement("h3",{className:"h6"},i().createElement(u.x,{phrase:"shareALink"})),e.shareLink&&("playlist"===e.entityType||"series"===e.entityType)&&i().createElement(re.u,{title:"playlist"===e.entityType||"series"===e.entityType?c.T.getPhrase(ht,"deleteLinkTooltipPlaylist"):"",spanHack:!0},i().createElement(we.L,{onClick:e.onClickDeleteLink,className:"info-link justify-self-start"},i().createElement(u.x,{namespace:ht,phrase:"deleteLink"})))),i().createElement("div",{className:"d-flex justify-content-between align-items-center"},i().createElement("div",{className:"".concat(e.shareLink?"w-100":"w-75 d-flex align-items-center")},e.shareLink?i().createElement(i().Fragment,null,i().createElement("div",{className:"d-flex justify-content-between align-items-center mb-1"},i().createElement($e,{linkExpireDate:e.shareLink.linkExpireDate,isPasswordProtected:e.shareLink.isPasswordProtected,privacy:e.privacy,entityTypeId:e.shareLink.objectTypeId,status:e.shareLink.status,onClickShowPrivacies:e.onClickShowPrivacies}),e.canAddPolicies&&i().createElement(we.L,{className:"cursor-pointer",onClick:e.onClickShowSettings},i().createElement(x.x,{svgName:T.vn.Cog}))),i().createElement(Be,{value:e.shareLink.url,onCopy:function(){o||(l(!0),We.k.logUserAction(Object.assign({},e.entity),We.k.mergeOptions(ft.getAnalyticsOptions(e.entityType),{actionType:vt.UserAction.Share,descriptor:vt.ShareDescriptors.CopyLink,eventVersion:vt.EventVersion.V3})))}})):i().createElement("div",{className:"d-flex align-items-center"},i().createElement(x.x,{svgName:T.vn.Link,className:"svg-container mr-1"}),i().createElement("span",null,i().createElement(u.x,{namespace:ht,phrase:"generate"})))),!e.shareLink&&i().createElement(we.L,{className:"info-link",onClick:function(){r(!0),e.onClickCreateLink()}},i().createElement(u.x,{phrase:"createLink"}))))}var Et=n(5173),St=n(92802),Ct=n(86347),wt=n(63038),kt=n(85610),It=c.T.encloseNamespace("share.shareMessage"),Ot=Et.Ry().shape({message:Et.Z_().max(280,(function(){return It("maxMessageLen")}))});function xt(){var e=(0,Ct.b)();return i().createElement(St.l0,null,i().createElement(wt.W,{component:"textarea",name:"message",id:"message",placeholder:It("placeholder"),value:e.values.message,label:It("label"),showOptionalLabel:!0}),i().createElement(kt.u,null,i().createElement(kt.u.Submit,{variant:"dark",text:It("share")})))}function Tt(e){return i().createElement(Ct.n,{initialValues:{message:""},validationSchema:Ot,onSubmit:function(t,n){var r=null;t.message&&(r=t.message),e.onClickShare(r,n)},allowInitialSubmit:!0},i().createElement(xt,null))}var At=n(41387),Nt=n(79410),Lt=n(54753),Pt=n(52086);function jt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Ut(e){var t,n,r=(t=(0,Nt.D)(Pt.g.LOOKING_FOR_INTEGRATION,{show:!0},{storage:nt.Z1.LocalStorage}),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=!0,c=!1;try{for(n=n.call(e);!(o=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);o=!0);}catch(e){c=!0,a=e}finally{try{o||null==n.return||n.return()}finally{if(c)throw a}}return i}}(t,n)||function(e,t){if(e){if("string"==typeof e)return jt(e,t);var n=Object.prototype.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)?jt(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.")}()),i=r[0],o=r[1];return i.show?a.createElement("div",{className:"d-flex justify-content-between rounded mt-3 p-2 ".concat("hVQto")},a.createElement(Lt.F,{appLink:e.appLink,onClick:function(){var t;return null===(t=e.closePopup)||void 0===t?void 0:t.call(e)},className:"d-inline-flex align-items-center mb-0"},a.createElement("span",{className:"ml-1 font-weight-500 text-info"},c.T.getPhrase("shared.lookingForIntegration","lookingForIntegration"))),a.createElement(x.x,{svgName:T.vn.Close,size:x.S.Small,className:"text-info d-inline-block svg-container cursor-pointer",onClick:function(){return o({show:!1})}})):a.createElement(a.Fragment,null)}var Ft="g-share-to-classroom";function Rt(e){var t;if(t=e.integrations,i().useEffect((function(){var e;t.includes(r.GoogleClassroom)&&(null===(e=null===gapi||void 0===gapi?void 0:gapi.sharetoclassroom)||void 0===e||e.go(Ft))}),[t.includes(r.GoogleClassroom)]),i().useEffect((function(){t.includes(r.MicrosoftTeams)&&(null===shareToMicrosoftTeams||void 0===shareToMicrosoftTeams||shareToMicrosoftTeams.renderButtons())}),[t.includes(r.MicrosoftTeams)]),!e.integrations.length)return i().createElement(Ut,{appLink:e.appLink,closePopup:e.closePopup});var n="".concat("Rkyqz"," rounded mx-1");return i().createElement("div",{className:"d-flex mt-2 mx-n1"},e.integrations.includes(r.GoogleClassroom)&&i().createElement("div",{id:Ft,className:"".concat(n," partial-loading-background")},i().createElement("div",{className:"g-sharetoclassroom","data-size":"32","data-url":e.url})),e.integrations.includes(r.MicrosoftTeams)&&i().createElement("div",{className:"teams-share-button ".concat(n," ").concat("mPAD2"),"data-href":e.url,"data-button-type":"smallTransWhite","data-preview":"false","data-icon-px-size":"32"}))}function Vt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Dt(e){return function(e){if(Array.isArray(e))return Mt(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||_t(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _t(e,t){if(e){if("string"==typeof e)return Mt(e,t);var n=Object.prototype.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)?Mt(e,t):void 0}}function Mt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Bt=c.T.encloseNamespace("shared.share");function Gt(e,t,n,r){if(!e)return[];var a=[].concat(Dt(t),Dt(n)).map((function(e){return e.id}));return e.filter((function(e){return!a.includes(e.id)&&e.id!==r}))}function zt(e){var t,n,r,a=(n=i().useState([]),r=2,function(e){if(Array.isArray(e))return e}(n)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,i=[],o=!0,c=!1;try{for(n=n.call(e);!(o=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);o=!0);}catch(e){c=!0,a=e}finally{try{o||null==n.return||n.return()}finally{if(c)throw a}}return i}}(n,r)||_t(n,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),o=a[0],c=a[1],l=w().hasPermissions,s=l(f.ManageIntegrations),m=Gt(e.recentlySharedTo,o,e.directShareRecipients,e.currentUser.id);return i().createElement(i().Fragment,null,i().createElement("div",{className:"d-flex justify-content-between align-items-center pb-3"},i().createElement(Ve,{key:null!==(t=null==m?void 0:m.map((function(e){return e.id})).join(":"))&&void 0!==t?t:"share:search",getRemoteUrl:function(t){var n,r=E._.safeUrlConcat(e.gatewayApiUrl,"v1/search/users"),a=["user"];return l(f.ShareToClassrooms)&&a.push("classroom"),l(f.ShareToClassroomGroups)&&a.push("classroom_group"),E._.urlBuilder(r,(Vt(n={query:t,index:a},"".concat(At.w.FILTER_PARAM_PREFIX,"customerId"),e.currentUser.customerId),Vt(n,"limit",10),n))},requestHeaders:e.searchRequestHeaders,formatRemoteSuggestions:function(t){return Gt(null==t?void 0:t.results,o,e.directShareRecipients,e.currentUser.id)},recentSearches:m,selections:o,updateSelections:function(e){return c([].concat(Dt(o),[e]))},removeSelection:function(e){return c(o.filter((function(t){return t.id!==e})))},placeholder:Bt("searchPlaceholder"),imageCdnUrl:e.imageCdnUrl,activationLength:2,fetchSelectionMembers:e.fetchRecipientUsers&&function(t){e.fetchRecipientUsers&&e.fetchRecipientUsers(t,(function(e){var n=[];o.forEach((function(r){var a;if(r.id!==t)return n.push(r);var i=F.t.deepClone(r);(null===(a=null==e?void 0:e.data)||void 0===a?void 0:a.length)?i.users=e:i.users={count:0,data:[],pagination:null},n.push(i)})),c(b.m.uniq(n,"id"))}))},debounceTime:300,emptyStateImageUrl:e.emptyStateImageUrl,errorStateImageUrl:e.errorStateImageUrl})),!o.length&&e.directShareRecipients.length?i().createElement("div",null,i().createElement("h3",{className:"font-size-normal"},i().createElement(u.x,{phrase:"sharedTo"})),i().createElement(h.ZP,{autoHeight:!0},i().createElement("ul",{className:"list-unstyled"},e.directShareRecipients.map((function(t){return i().createElement("li",{key:t.id,className:"mb-2 pr-1"},i().createElement(Ee,{entity:t,imageCdnUrl:e.imageCdnUrl,removeRecipient:e.onClickRemoveRecipient}))}))))):i().createElement(i().Fragment,null),o.length?i().createElement(Tt,{onClickShare:function(t,n){e.onClickShare(o.map((function(e){return{id:e.id,typeId:e.typeId}})),t,(function(){c([]),n()}))}}):i().createElement("div",{className:"mx-n3 px-3 pt-3 border-top"},i().createElement(bt,{entity:e.entity,entityType:e.entityType,shareLink:e.shareLink,onClickShowSettings:e.onClickShowSettings,onClickCreateLink:e.onClickCreateLink,shareLinkIsLoading:e.shareLinkIsLoading,canAddPolicies:e.canAddPolicies,privacy:e.privacy,entityTypeId:e.entity.typeId,onClickShowPrivacies:e.onClickShowPrivacies,onClickDeleteLink:e.onClickDeleteLink}),!!e.shareLink&&e.enableIntegrationBanner&&i().createElement(Rt,{integrations:e.integrations,url:e.shareLink.url,closePopup:e.closePopup,appLink:s?e.integrationSettingAppLink:e.messagePopupAppLink})))}var qt=n(42905),Ht=n(39023),Kt="share.embedSize";function Zt(e){var t=e.autoplay,n=e.setAutoplay,r=e.videoSize,a=e.setVideoSize,o=e.videoSizes;return i().createElement("div",{className:"d-flex align-items-center"},!!o.length&&i().createElement(i().Fragment,null,i().createElement("div",{className:"mr-1"},i().createElement(u.x,{namespace:Kt,phrase:"videoSize"})),i().createElement("div",{className:"pr-3"},i().createElement(j.Dropdown,null,i().createElement(j.Dropdown.Toggle,{id:"embed-resolution",variant:"outline-dark"},r.label),i().createElement(j.Dropdown.Menu,null,o.map((function(e){return i().createElement(j.Dropdown.Item,{key:"".concat(e.width,"x").concat(e.height),onClick:function(){return a(e)}},e.label)})))))),i().createElement("div",{className:"mr-2"},i().createElement(u.x,{namespace:Kt,phrase:"autoplay"})),i().createElement(Ht.X,{id:"autoplay-checkbox",checked:t,onChange:function(){return n(!t)}}))}function $t(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=!0,c=!1;try{for(n=n.call(e);!(o=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);o=!0);}catch(e){c=!0,a=e}finally{try{o||null==n.return||n.return()}finally{if(c)throw a}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Wt(e,t);var n=Object.prototype.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)?Wt(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 Wt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Qt="share.copyEmbedHtml",Xt=c.T.encloseNamespace(Qt);function Yt(e){var t=qt.i.getEmbedResolutions(),n=$t(i().useState("copy"),2),r=n[0],a=n[1],o=$t(i().useState(!1),2),c=o[0],l=o[1],s=$t(i().useState(t.find((function(e){return"100%"===e.width}))),2),m=s[0],d=s[1],p=$t(i().useState(!1),2),f=p[0],v=p[1],y=qt.i.buildEmbedUrl({embedUrl:e.embedUrl,host:e.config.primaryUrl,shareId:e.shareId,autoplay:c}),g=qt.i.getEmbedString({url:y,size:m});return i().createElement(u.D.Provider,{value:Qt},i().createElement("label",null,i().createElement(u.x,{namespace:Qt,phrase:"label"})),i().createElement("div",{className:"input-group mb-2"},i().createElement("textarea",{className:"form-control rounded w-100 h-100 ".concat("mwvd0"),spellCheck:!1,value:g,rows:5,readOnly:!0}),i().createElement("div",{className:"input-group-append ".concat("myePx")},i().createElement(De,{onCopy:function(){a("copied"),setTimeout((function(){return a("copy")}),2e3),f||(v(!0),We.k.logUserAction(Object.assign(Object.assign({},e.entity),{embedDetails:{size:m,autoplay:c}}),We.k.mergeOptions(ft.getAnalyticsOptions(e.entityType),{actionType:vt.UserAction.Share,descriptor:vt.ShareDescriptors.CopyEmbedHtml,eventVersion:vt.EventVersion.V3})))},text:g},i().createElement("button",{className:"btn btn-outline-dark border border-secondary ".concat("zgdag"),type:"button"},Xt(r))))),i().createElement(Zt,{autoplay:c,setAutoplay:l,videoSize:m,setVideoSize:d,videoSizes:t}))}var Jt=(0,Et.Ry)().shape({removePassword:(0,Et.O7)(),resourceId:(0,Et.Z_)(),linkExpireDate:(0,Et.Z_)().nullable(),password:(0,Et.Z_)().test({name:"password-length",exclusive:!1,params:{},message:c.T.getPhrase("share.validation","minPassword"),test:function(e){return!((null==e?void 0:e.length)&&e.length<3)}}).default("")}),en=n(9063);function tn(e){if(!e)return null;var t=new Date;return t.setDate(t.getDate()+30),t.toISOString()}var nn="shared.linkExpiry",rn=c.T.encloseNamespace(nn);function an(e){var t=(0,St.u6)();return i().createElement("div",{className:"d-flex justify-content-between align-items-center pb-3"},i().createElement("div",null,i().createElement("label",{className:"m-0",htmlFor:""},i().createElement(u.x,{namespace:nn,phrase:"linkExpirationHeading"})),i().createElement("p",{className:"m-0"},i().createElement(u.x,{namespace:nn,phrase:"linkExpirationInfo"}))),i().createElement(re.u,{title:rn("passwordProtected"),disable:!e.passwordProtectLink,spanHack:!0,trigger:"hover"},i().createElement(en.Z,{onClick:function(){e.passwordProtectLink||t.setFieldValue("linkExpireDate",tn(!t.values.linkExpireDate))},on:!!t.values.linkExpireDate,disabled:e.passwordProtectLink,showStateWhenDisabled:!0})))}var on="W9Jl8";function cn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var ln=c.T.encloseNamespace("share.setPasswordInput");function sn(e){var t,n,r,i=(n=a.useState(!1),r=2,function(e){if(Array.isArray(e))return e}(n)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,i=[],o=!0,c=!1;try{for(n=n.call(e);!(o=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);o=!0);}catch(e){c=!0,a=e}finally{try{o||null==n.return||n.return()}finally{if(c)throw a}}return i}}(n,r)||function(e,t){if(e){if("string"==typeof e)return cn(e,t);var n=Object.prototype.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)?cn(e,t):void 0}}(n,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),o=i[0],c=i[1],l=null===(t=(0,St.u6)().errors)||void 0===t?void 0:t.password;return a.createElement(a.Fragment,null,a.createElement("input",{className:"form-control ".concat(l?"is-invalid":""),value:e.value,onChange:function(t){e.canEdit&&e.onChange(t.target.value)},type:o?"text":"password",placeholder:e.placeholder||ln("passwordPlaceholder"),readOnly:!e.canEdit}),!!l&&a.createElement(j.Form.Control.Feedback,{type:"invalid"},l),!!e.canEdit&&a.createElement(we.L,{className:on,onClick:function(){return c(!o)}},a.createElement(x.x,{svgName:o?T.vn.VisibleOn:T.vn.VisibleOff,title:ln(o?"hidePassword":"revealPassword"),tooltipPlacement:"top"})),!e.canEdit&&!!e.canReset&&!!e.onReset&&a.createElement(we.L,{className:on,onClick:e.onReset},a.createElement(x.x,{svgName:T.vn.Close,title:ln("resetPassword"),tooltipPlacement:"top"})))}function un(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var mn="shared.linkPassword";function dn(e){var t,n,r,a=e.passwordProtectLink,o=e.setPasswordProtectLink,c=(0,St.u6)(),l=(n=i().useState(!!(null===(t=e.shareLink)||void 0===t?void 0:t.isPasswordProtected)),r=2,function(e){if(Array.isArray(e))return e}(n)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,i=[],o=!0,c=!1;try{for(n=n.call(e);!(o=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);o=!0);}catch(e){c=!0,a=e}finally{try{o||null==n.return||n.return()}finally{if(c)throw a}}return i}}(n,r)||function(e,t){if(e){if("string"==typeof e)return un(e,t);var n=Object.prototype.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)?un(e,t):void 0}}(n,r)||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.")}()),s=l[0],m=l[1];return i().createElement("div",{className:"pb-3"},i().createElement("div",{className:"d-flex justify-content-between align-items-center"},i().createElement("div",null,i().createElement("label",{className:"m-0",htmlFor:""},i().createElement(u.x,{namespace:mn,phrase:"passwordProtectHeading"})),i().createElement("p",{className:"m-0"},i().createElement(u.x,{namespace:mn,phrase:"passwordProtectInfo"}))),i().createElement(en.Z,{onClick:function(){var t;(null===(t=e.shareLink)||void 0===t?void 0:t.isPasswordProtected)&&c.setFieldValue("removePassword",a),c.setFieldValue("password",""),o(!a),c.setFieldValue("linkExpireDate",tn(!a))},on:a})),a&&i().createElement("div",{className:"position-relative mt-2"},i().createElement(sn,{value:s?"********":c.values.password,onChange:function(e){c.setFieldValue("password",e)},onReset:function(){c.setFieldValue("password",""),c.setFieldValue("removePassword",!0),m(!1)},canEdit:!s,canReset:!0})))}function pn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var fn=c.T.encloseNamespace("shared.share");function vn(e){var t,n,r=(0,St.u6)(),a=w().hasPermissions,o=(t=i().useState(!!e.shareLink.isPasswordProtected),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=!0,c=!1;try{for(n=n.call(e);!(o=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);o=!0);}catch(e){c=!0,a=e}finally{try{o||null==n.return||n.return()}finally{if(c)throw a}}return i}}(t,n)||function(e,t){if(e){if("string"==typeof e)return pn(e,t);var n=Object.prototype.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)?pn(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.")}()),c=o[0],l=o[1];return i().createElement(St.l0,null,i().createElement("div",{className:"d-flex align-items-center justify-content-between pb-3"},i().createElement($e,{linkExpireDate:r.values.linkExpireDate,isPasswordProtected:c,privacy:e.privacy,entityTypeId:e.shareLink.objectTypeId,status:e.shareLink.status,onClickShowPrivacies:e.onClickShowPrivacies}),i().createElement(re.u,{title:fn("deleteLinkTooltip"),spanHack:!0},i().createElement(we.L,{onClick:e.onClickDeleteLink,className:"info-link justify-self-start"},i().createElement(u.x,{phrase:"deleteLink"})))),a(f.ManageShareLinkSettings)&&i().createElement(i().Fragment,null,i().createElement(an,{passwordProtectLink:c}),i().createElement(dn,{shareLink:e.shareLink,passwordProtectLink:c,setPasswordProtectLink:l})),!!e.canEmbed&&i().createElement("div",{className:"pb-3"},i().createElement(Yt,{embedUrl:e.shareLink.embedUrl,entity:e.entity,entityType:e.entityType,config:e.config,entityId:e.entityId,shareId:e.shareLink.id,analyticsOptions:e.analyticsOptions})),i().createElement(kt.u,null,i().createElement(kt.u.Cancel,{onClick:e.onClickCancel,text:fn("back"),variant:"outline-dark"}),i().createElement(kt.u.Submit,{variant:"dark"})))}function yn(e){var t={password:"",removePassword:!1,linkExpireDate:e.shareLink.linkExpireDate};return i().createElement(Ct.n,{initialValues:t,onSubmit:e.onClickSaveLink,castInitialValues:!1,validationSchema:Jt},i().createElement(vn,{entity:e.entity,entityType:e.entityType,config:e.config,shareLink:e.shareLink,entityId:e.entityId,onClickCancel:e.onClickCancel,analyticsOptions:e.analyticsOptions,canEmbed:e.canEmbed,privacy:e.privacy,onClickShowPrivacies:e.onClickShowPrivacies,onClickDeleteLink:e.onClickDeleteLink}))}var gn=n(28294);function hn(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=!0,c=!1;try{for(n=n.call(e);!(o=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);o=!0);}catch(e){c=!0,a=e}finally{try{o||null==n.return||n.return()}finally{if(c)throw a}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return bn(e,t);var n=Object.prototype.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)?bn(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 bn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var En="share.shareLinkPrivacies",Sn=c.T.encloseNamespace(En);function Cn(e){return i().createElement("div",{className:"pb-3"},i().createElement(j.Form.Check,{type:"radio",name:e.id,id:e.id,value:e.id,label:e.name,onChange:function(){return e.onSelect(e.id)},checked:e.checked,className:"".concat("Hxlr9"," m-0"),custom:!0,disabled:e.disabled}),i().createElement("p",{className:"mb-0 ".concat("ZFUnb")},e.description))}function wn(e){var t="private";Array.isArray(e.privacy)||(t=e.privacy.privacy);var n=hn(i().useState(t),2),r=n[0],a=n[1],o=hn(i().useState(!1),2),c=o[0],l=o[1];function s(e){r!==e&&("restricted"===r&&"private"===e||a(e))}var m=e.shareLink.isPasswordProtected;return i().createElement(i().Fragment,null,e.shareLink.objectTypeId===ne.E.Playlist&&i().createElement("div",null,i().createElement(u.x,{namespace:En,phrase:"privatePlaylistVideos"})),m&&i().createElement($e,{entityTypeId:e.shareLink.objectTypeId,linkExpireDate:e.shareLink.linkExpireDate,isPasswordProtected:e.shareLink.isPasswordProtected,status:e.shareLink.status,privacy:e.privacy}),i().createElement("div",{className:"py-3"},i().createElement(Cn,{key:"public",id:"public",name:Sn("public"),description:Sn("publicDescription"),checked:!m&&"public"===r,onSelect:s,disabled:m}),i().createElement(Cn,{key:"just_my_customer",id:"just_my_customer",name:Sn("protected"),description:Sn("protectedDescription"),checked:!m&&"just_my_customer"===r,onSelect:s,disabled:m}),i().createElement(Cn,{key:"private",id:"private",name:Sn("private"),description:Sn("privateDescription"),checked:!m&&("private"===r||"restricted"===r),onSelect:s,disabled:m})),i().createElement("div",{className:"d-flex justify-content-between align-items-center"},i().createElement("div",{className:"d-flex justify-content-end"},i().createElement("button",{type:"button",className:"btn btn-outline-dark mr-2",onClick:e.onClickCancel},i().createElement(u.x,{namespace:En,phrase:"back"})),i().createElement(gn.m,{className:"btn btn-dark",type:"button",onClick:function(){l(!0),e.onClickSavePrivacy(r)},disabled:r===t,showSpinner:c},i().createElement(u.x,{namespace:En,phrase:"save"})))))}var kn=n(91656);function In(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=!0,c=!1;try{for(n=n.call(e);!(o=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);o=!0);}catch(e){c=!0,a=e}finally{try{o||null==n.return||n.return()}finally{if(c)throw a}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return On(e,t);var n=Object.prototype.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)?On(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 On(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var xn="shared.share",Tn=c.T.encloseNamespace(xn);function An(e){switch(e){case"video":return Tn("titleVideo");case"clip":return Tn("titleClip");case"interactive":return Tn("titleInteractive");case"series":return Tn("titleSeries");case"playlist":return Tn("titlePlaylist");case"subject":return Tn("titleTopic")}}var Nn=function(e){return"video"===e||"interactive"===e||"clip"===e};function Ln(e){var t,n,r,a,c,p,f,v,y=(0,o.useDispatch)(),h=(0,d.Z)(),b=!e.gatewayApiUrl,E=In(i().useState(!1),2),S=E[0],C=E[1],w=In(i().useState("main"),2),k=w[0],I=w[1],O=(n=k,r=i().useRef(),i().useEffect((function(){r.current=n})),r.current),x=In(i().useState(!1),2),T=x[0],A=x[1],N=l.a.useBasicFetch(s.N.currentUser()),L=ft.getFetchFunctionByType(e.entityType)(e.entityId,null===(t=N.data)||void 0===t?void 0:t.id),P=l.a.useBasicFetch({url:"/api/config",key:"config",bootstrapName:"config",success:f,error:v}),j=l.a.useBasicFetch(b&&s.N.token()),F=l.a.useBasicFetch((p=e.entityId,{url:"{gateway}/v1/share/links?objectId=".concat(p),key:"share:link:object:".concat(p),normalizeOptions:et,formatData:function(e){return Object.assign(Object.assign({},e),{linkExpireDate:e.linkExpireDate||null})}})),R=l.a.useBasicFetch((c=e.entityId,{url:"{gateway}/v1/users/me/share/direct/sent-items?objectId=".concat(c),key:"direct:share:sent:object:".concat(c),normalizeOptions:et})),V=l.a.useBasicFetch(ft.getDirectShareRecipientsRequest(R.data)),D=N.data&&(a=N.data.id,rt.getRecentItem(at(a),nt.SG)),_=!!(null==D?void 0:D.length),M=l.a.useBasicFetch(_&&function(e){e.sort();var t=e.map((function(e){return"id=".concat(e)})).join("&");return{url:"{gateway}/v1/objects?".concat(t,"&query.user=avatar"),key:"share:recipients:".concat(e.join(","))}}(D)),B=l.a.useBasicFetch(function(e){return{url:"{gateway}/v1/objects/".concat(e,"/access"),key:"privacy:".concat(e),normalize:!1}}(e.entityId)),G=(0,kn.r)(null),z=G.shareToGoogleClassroom,q=G.shareToMicrosoftTeams,H=G.isLoadingSettings;function K(e){var t;(null===(t=e.recipients)||void 0===t?void 0:t.length)&&l.a.getFetch(y)(ft.getDirectShareRecipientsRequest(e))}function Z(e,t){l.a.getFetch(y)(function(e,t){return{url:"{gateway}/v1/objects/".concat(e,"/users?query={limit:100}"),key:"share:recipients:".concat(e,":users"),success:t}}(e,t))}function $(){F.data||ft.createLink({dispatch:y,entity:L.data,entityType:e.entityType,alerts:h})}function W(t,n){ft.updateLink(y,L.data,e.entityType,F.data,t,h,(function(){return I("main")}),n)}function Q(){C(!0),A(!1),ft.deleteLink(y,L.data,e.entityType,F.data,h,(function(){return I("main")}),(function(){return C(!1)}))}function X(t,n,r){ft.createOrUpdateDirectShare({dispatch:y,entity:L.data,entityType:e.entityType,currentUser:N.data,recipients:t,message:n,sentDirectShare:R.data,onSuccess:K,onError:function(){return h.error(Tn("directShareError",{name:L.data.name}))},onDone:r})}function Y(t,n){ft.removeDirectShareRecipient(y,t,e.entityType,R.data,K,(function(){h.error(Tn("removeDirectShareError")),n&&n()}))}function J(t){l.a.fetch(y,function(e,t,n,r){return{url:"{gateway}/v1/objects/privacy",key:"update:privacy",type:U.k.PUT,data:{privacy:t,objectId:e},invalidationKeys:"privacy",normalize:!1,success:n,error:r}}(e.entityId,t,(function(){return I(O)}),(function(){return h.error(Tn("privaciesError",{name:L.data.name}))})))}ft.useHydrateRecipients(V.data),ft.useHydrateRecipients(M.data),i().useEffect((function(){F.hasCompleted&&A(!0)}),[F.hasCompleted,T]);var ee=!!N.data&&!!P.data&&(!b||!!j.data)&&!!R.hasCompleted&&T&&!!B.data&&!!L.data&&!H;return i().createElement(u.D.Provider,{value:xn},i().createElement(m.G,{title:An(e.entityType),closePopup:e.closePopup,showLoadingSpinner:S||!ee},function(){if(S||!ee)return i().createElement(i().Fragment,null);switch(k){case"main":return i().createElement(zt,{shareLink:F.data,shareLinkIsLoading:F.isFetching,entity:L.data,entityType:e.entityType,directShareRecipients:V.data||[],recentlySharedTo:M.data||[],onClickCreateLink:$,onClickShowSettings:function(){return I("link-settings")},onClickShare:X,onClickRemoveRecipient:Y,onClickDeleteLink:Q,analyticsOptions:ft.getAnalyticsOptions(e.entityType),gatewayApiUrl:e.gatewayApiUrl||P.data.gatewayApiUrl,imageCdnUrl:P.data.imageCdnUrl,searchRequestHeaders:b?{authorization:"Bearer ".concat(j.data.value)}:null,currentUser:N.data,fetchRecipientUsers:Z,privacy:B.data,onClickShowPrivacies:function(){return I("privacy")},canAddPolicies:(r=e.entityType,"video"===r||"interactive"===r||"clip"===r),emptyStateImageUrl:e.emptyStateImageUrl,errorStateImageUrl:e.errorStateImageUrl,integrations:(t=z,n=q,g(t,n).filter((function(e){return e.enabled})).map((function(e){return e.id}))),integrationSettingAppLink:e.integrationSettingAppLink,messagePopupAppLink:e.messagePopupAppLink,closePopup:e.closePopup,enableIntegrationBanner:e.enableIntegrationBanner});case"link-settings":return i().createElement(yn,{entity:L.data,entityType:e.entityType,config:P.data,shareLink:F.data,entityId:e.entityId,analyticsOptions:ft.getAnalyticsOptions(e.entityType),onClickSaveLink:W,onClickDeleteLink:Q,onClickCancel:function(){return I("main")},canEmbed:Nn(e.entityType),privacy:B.data,onClickShowPrivacies:function(){return I("privacy")}});case"privacy":return i().createElement(wn,{privacy:B.data,shareLink:F.data,onClickCancel:function(){return I(O)},onClickSavePrivacy:J})}var t,n,r}()))}},38182:function(e,t,n){"use strict";n.d(t,{q:function(){return l}});var r=n(1024),a=n.n(r),i=n(68003),o=n(87013),c=n(88483);function l(e){var t,n,r=e.imageUrl||(t=e.imageCdnUrl,(n=e.initials)?o.j.createUrl(i._.safeUrlConcat(t,"/v1/profile-images?initials=".concat(n)),{size:c.h2.Small}):"");return a().createElement("div",{className:"position-relative h-100 w-100"},a().createElement("div",{className:"".concat("Gvwzj"," ").concat((null==e?void 0:e.extraClasses)||""),style:{backgroundImage:"url('".concat(r,"')")}}," "),e.showDot&&a().createElement("div",{className:"".concat("JJHBJ"," rounded-circle bg-danger")}))}},39023:function(e,t,n){"use strict";n.d(t,{X:function(){return a}});var r=n(1024);function a(e){var t=e.isLabelEllipsis,n=r.useRef(null);return r.useEffect((function(){n.current&&(e.checked?n.current.indeterminate&&(n.current.indeterminate=!1):!e.indeterminate||n.current.indeterminate?!e.indeterminate&&n.current.indeterminate&&(n.current.indeterminate=!1):n.current.indeterminate=!0)}),[n.current,e.indeterminate,e.checked]),r.createElement("div",{className:"custom-control custom-checkbox ".concat(e.className)},r.createElement("input",{ref:n,type:"checkbox",className:"custom-control-input",id:e.id,name:e.name,checked:e.checked,onChange:e.onChange,disabled:e.disabled}),r.createElement("label",{className:"custom-control-label cursor-pointer",htmlFor:e.id},r.createElement("span",{className:"".concat(t?"clamp-1":"")},e.label)))}a.defaultProps={checked:!1,label:"",className:""}},63038:function(e,t,n){"use strict";n.d(t,{n:function(){return y},W:function(){return g}});var r=n(1024),a=n(92802),i=n(99910),o=n(85887),c=n(53808),l=function(e,t,n,r,i){var o="form-control";return"sm"===r&&(o+=" form-control-sm"),"lg"===r&&(o+=" form-control-lg"),(0,a.u9)(t,n)&&(0,a.u9)(e,n)&&(o+=" is-invalid"),i&&(o+=" ".concat(i)),o};function s(e){var t=e.label,n=e.checkboxLabelClassName,a=e.checkboxLabelFontWeight,o=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}(e,["label","checkboxLabelClassName","checkboxLabelFontWeight"]);return r.createElement(i.Form.Group,null,r.createElement("div",{className:"custom-control custom-checkbox"},r.createElement(y,Object.assign({className:"custom-control-input"},o)),r.createElement(i.Form.Label,{className:"custom-control-label cursor-pointer ".concat("normal"===a?"font-weight-normal":""," \n ").concat(n),htmlFor:o.id},t)))}var u=n(39396),m=n(63791),d=n(66703);function p(e){var t=(0,a.u6)().values[e.fieldName];return"string"!=typeof t?r.createElement(r.Fragment,null):r.createElement("div",{className:"float-right text-muted font-weight-normal"},t.length,"/",e.limit," characters")}function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var v=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};function y(e){var t,n,i=e.children,l=v(e,["children"]),s=(t=r.useState(e.type),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=!0,c=!1;try{for(n=n.call(e);!(o=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);o=!0);}catch(e){c=!0,a=e}finally{try{o||null==n.return||n.return()}finally{if(c)throw a}}return i}}(t,n)||function(e,t){if(e){if("string"==typeof e)return f(e,t);var n=Object.prototype.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}}(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.")}()),d=s[0],p=s[1],y=c.q.isFunction(i)?function(e){return i(e)}:r.Children.count(i)?i:null;if("password"!==l.type)return r.createElement(a.gN,Object.assign({},o.t.omit(l,["formSize"])),y);var g="position-relative ".concat("d78lK");return l.className&&(g+=" ".concat(l.className)),l.disabled&&(g+=" ".concat("asbVo")),r.createElement("div",{className:g},r.createElement(a.gN,Object.assign({},o.t.omit(l,["formSize","type","className"]),{type:d,className:"".concat("RBJnf"," border-0 w-100 h-100 outline-none rounded")}),y),"password"===l.type&&r.createElement(u.x,{svgName:"password"===d?m.vn.VisibleOn:m.vn.VisibleOff,className:"svg-container cursor-pointer ".concat("jCfI0"),onClick:function(){p("password"===d?"text":"password")}}))}function g(e){var t=e.label,n=e.className,c=e.showCharacterCounter,f=e.showRequiredStar,g=e.infoTooltip,h=e.infoText,b=e.formSize,E=e.showOptionalLabel,S=v(e,["label","className","showCharacterCounter","showRequiredStar","infoTooltip","infoText","formSize","showOptionalLabel"]),C=(0,a.u6)(),w=C.errors,k=C.touched,I=function(){};if("checkbox"===S.type){var O=o.t.omit(e,["formSize"]);return e.disabled&&(O.onChange=I),r.createElement(s,Object.assign({},O))}var x=Object.assign(Object.assign({},S),{className:l(w,k,S.name,b,n)});return e.disabled&&(x.onChange=I),r.createElement(i.Form.Group,null,!!t&&r.createElement(i.Form.Label,{htmlFor:S.id,className:"d-flex align-items-center"},t,f&&r.createElement("span",{className:"text-danger"},"*"),g&&r.createElement(u.x,{svgName:m.vn.Info,title:g,tooltipPlacement:"top",tooltipSpanHack:!0}),E&&r.createElement("span",{className:"text-muted"}," ",r.createElement(d.x,{namespace:"shared.formField",phrase:"optional"})),!!c&&!!S.maxLength&&r.createElement("div",{className:"ml-auto"},r.createElement(p,{fieldName:S.name,limit:S.maxLength}))),r.createElement(y,Object.assign({},x)),!!h&&r.createElement(i.Form.Text,{className:"text-muted"},h),r.createElement(a.Bc,{name:S.name},(function(e){return r.createElement(i.Form.Control.Feedback,{type:"invalid"},e)})))}y.defaultProps={autoComplete:"off"},g.defaultProps={autoComplete:"off"}},86347:function(e,t,n){"use strict";n.d(t,{b:function(){return m},n:function(){return u}});var r=n(1024),a=n(92802),i=n(53808),o=n(85887);function c(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=!0,c=!1;try{for(n=n.call(e);!(o=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);o=!0);}catch(e){c=!0,a=e}finally{try{o||null==n.return||n.return()}finally{if(c)throw a}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return l(e,t);var n=Object.prototype.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)?l(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 l(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function s(e){var t=o.t.deepClone(e);return Object.keys(t).forEach((function(e){t.hasOwnProperty(e)&&(o.t.isObject(t[e])?t[e]=s(t[e]):null===t[e]&&delete t[e])})),t}function u(e){var t=e.castInitialValues,n=e.castValuesOnSubmit,o=e.initialValues,l=e.onSubmit,u=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}(e,["castInitialValues","castValuesOnSubmit","initialValues","onSubmit"]),m=t&&e.validationSchema?e.validationSchema.cast(s(o)):o,d={allowInitialSubmit:e.allowInitialSubmit};return r.createElement(a.J9,Object.assign({enableReinitialize:!0},u,{initialValues:m,onSubmit:function(t,r){var a=r.setSubmitting,i=r.resetForm,o=r.setFieldError,s=n&&e.validationSchema?e.validationSchema.cast(t):t;l(s,(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(e.reset&&i(),e.errors)for(var t=0,n=Object.entries(e.errors);t<n.length;t++){var r=c(n[t],2),l=r[0],s=r[1];o(l,s)}a(!1)}))},initialStatus:d}),i.q.isFunction(e.children)?function(t){return e.children(t)}:r.Children.count(e.children)?e.children:null)}function m(){return(0,a.u6)()}u.defaultProps={castInitialValues:!0,castValuesOnSubmit:!0}},84611:function(e,t,n){"use strict";n.d(t,{f:function(){return o}});var r=n(1024),a=n.n(r),i=n(39396);function o(e){return e.imageUrl||e.svgName?e.imageUrl?a().createElement("div",{className:"".concat("BQ87Y"," rounded-circle h-100 w-100"),style:{backgroundImage:"url(".concat(e.imageUrl,")")}}," "):a().createElement("div",{className:"".concat("Uxnsl"," ").concat(e.variant?"bg-".concat(e.variant):""," text-").concat(e.textVariant," rounded-circle h-100 w-100")},a().createElement(i.x,{svgName:e.svgName,size:e.svgSize})):a().createElement(a().Fragment,null)}o.defaultProps={textVariant:"white"}},52086:function(e,t,n){"use strict";n.d(t,{g:function(){return r}});var r={PERMISSIONS:"permissions",AUDIENCE_FILTER:"audience:filter",LAYOUT_CONTAINER_FLUID:"layout:container:fluid",BULK_USER_UPLOAD:"bulk:user:upload",BULK_REMOVE_USERS:"bulk:remove:users",BULK_USER_ACTIONS:"bulk:user:actions",CURATOR_WORKING_SET:"curator:working:set",LOOKING_FOR_INTEGRATION:"looking:for:integration",PUBLIC_PRESENTATION_ID:"public:presentation:id"}},84657:function(e,t,n){"use strict";n.d(t,{t:function(){return a},v:function(){return r}});var r={BASE_VIDEO_COLLECTION:"thumbnail,tags,rating,series,season,owner",VIDEO_COLLECTION:"(videoCollection)",SERIES:"tallposter,rating,banner",FOLDER:"banner,thumbnail",CLASSIFICATION_COLLECTION:"banner,cover,tallPoster",CLASSIFICATION:function(e){return"banner,cover,tallPoster,thumbnail,followers{id:".concat(e,"},pinnedVideos[count()]{limit:0},playlists[count()]{limit:0},series[count()]{limit:0}")},VIDEO:"series,season,rating,producers,glance,distributors,owner,resources[thumbnail,pdf],tags,productionCompanies,directors,links,thumbnail,interactives[thumbnail,_canBeConsumed,_isClickViewContent,owner[avatar]],clips[_canBeConsumed,owner[avatar],_isClickViewContent],_canUpdate,_videoProgress,_canBeConsumed,categories,libraries,_canAddToLibrary",PLAYLIST:"cover,banner,owner,videos[count()]{limit:0},clips[count()]{limit:0},interactives[count()]{limit:0},followers[count()]{limit:0}",PLAYLIST_COLLECTION:"videos[count()]{limit:0},interactives[count()]{limit:0},clips[count()]{limit:0},cover",CLIP:"(clip)",CLIP_COLLECTION:"(clipCollection)",INTERACTIVE:"(interactive)",LIBRARY_COLLECTION:"owner[logo]",LIBRARY:"owner[logo],categorytree"},a={CLASSIFICATION:"banner,cover,tallPoster,pinnedVideos[count()]{limit:0},playlists[count()]{limit:0},series[count()]{limit:0}",CLASSIFICATION_COLLECTION:"banner,cover,tallPoster",VIDEO:"series,season,rating,producers,glance,distributors,resources[thumbnail,pdf],tags,productionCompanies,directors,links,thumbnail,interactives[thumbnail,_canBeConsumed,_isClickViewContent],clips[_canBeConsumed,_isClickViewContent],_canBeConsumed,categories,libraries",VIDEO_COLLECTION:"thumbnail,rating,series,season,_canBeConsumed"}},74421:function(e,t,n){"use strict";var r;n.d(t,{E:function(){return r}}),function(e){e[e.Audience=1]="Audience",e[e.Category=2]="Category",e[e.Channel=3]="Channel",e[e.Chapter=4]="Chapter",e[e.Comment=5]="Comment",e[e.OwnerComment=6]="OwnerComment",e[e.Image=7]="Image",e[e.Thumbnail=8]="Thumbnail",e[e.Avatar=9]="Avatar",e[e.Banner=10]="Banner",e[e.Video=11]="Video",e[e.Trailer=12]="Trailer",e[e.Rating=13]="Rating",e[e.Topic=14]="Topic",e[e.Series=15]="Series",e[e.Season=16]="Season",e[e.HostedMediaObjectCollection=17]="HostedMediaObjectCollection",e[e.ExchangeCollection=18]="ExchangeCollection",e[e.CustomMediaObjectCollection=19]="CustomMediaObjectCollection",e[e.Playlist=20]="Playlist",e[e.ClickViewTvCollection=21]="ClickViewTvCollection",e[e.ClickViewProductionsCollection=22]="ClickViewProductionsCollection",e[e.User=23]="User",e[e.SystemUser=24]="SystemUser",e[e.Customer=25]="Customer",e[e.Country=26]="Country",e[e.Organisation=28]="Organisation",e[e.SystemOrganisation=29]="SystemOrganisation",e[e.Group=30]="Group",e[e.SystemGroup=31]="SystemGroup",e[e.FlagReason=32]="FlagReason",e[e.Library=33]="Library",e[e.Interactive=34]="Interactive",e[e.WorkspaceCollection=35]="WorkspaceCollection",e[e.Conversation=36]="Conversation",e[e.Message=37]="Message",e[e.Notification=38]="Notification",e[e.Clip=39]="Clip",e[e.Link=40]="Link",e[e.UserChannel=41]="UserChannel",e[e.Resource=42]="Resource",e[e.VideoStream=43]="VideoStream",e[e.AudioStream=44]="AudioStream",e[e.Tag=45]="Tag",e[e.Subtitle=46]="Subtitle",e[e.LicencedContentCollection=47]="LicencedContentCollection",e[e.PublicCollection=48]="PublicCollection",e[e.CategoryTree=49]="CategoryTree",e[e.Logo=50]="Logo",e[e.Permission=51]="Permission",e[e.Subject=52]="Subject",e[e.Field=53]="Field",e[e.Company=54]="Company",e[e.Person=55]="Person",e[e.Cover=56]="Cover",e[e.Poster=57]="Poster",e[e.SubjectAudience=58]="SubjectAudience",e[e.TallPoster=60]="TallPoster",e[e.Classroom=67]="Classroom",e[e.ClassroomGroup=68]="ClassroomGroup"}(r||(r={}))},34254:function(e,t,n){"use strict";var r;n.d(t,{r:function(){return r}}),function(e){e[e.FilterOut=0]="FilterOut",e[e.StripMetadata=1]="StripMetadata"}(r||(r={}))},90335:function(e,t,n){"use strict";var r;n.d(t,{D:function(){return r}}),function(e){e.Newest="newest",e.Oldest="oldest",e.RecentlyAdded="recently_added",e.AtoZ="atoz",e.ZtoA="ztoa",e.Series="series"}(r||(r={}))},2491:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(54096),a=n(21186),i=n(92159);function o(){var e=(0,r.G)(i.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})}}}},42905:function(e,t,n){"use strict";n.d(t,{i:function(){return o}});var r=n(57857),a=n(68003),i="shared.shared-utils",o={getEmbedResolutions:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=[{label:r.T.getPhrase(i,"small"),width:"640",height:"360"},{label:r.T.getPhrase(i,"medium"),width:"1014",height:"576"},{label:r.T.getPhrase(i,"large"),width:"1280",height:"720"}];return e&&t.unshift({label:r.T.getPhrase(i,"responsive"),width:"100%",height:"100%"}),t},getEmbedString:function(e){var t=e.url,n=e.size,r="100%"===n.width,a=r?'style="position:absolute; top:0; left:0; width:100%; height:100%;"':'width="'.concat(n.width,'" height="').concat(n.height,'"'),i='src="'.concat(t,'"'),o="<iframe ".concat(a," ").concat('frameborder="0" allowfullscreen webkitallowfullscreen mozallowfullscreen allow="autoplay"'," ").concat(i,"></iframe>");return r?'<div style="padding:56.25% 0 0 0; position:relative;">'.concat(o,"</div>"):o},buildEmbedUrl:function(e){var t=e.embedUrl,n=e.host,r=e.shareId,i=e.autoplay,o=e.consumerKey,c=t;c||(c=a._.safeUrlConcat(n,"share/embed/".concat(r)));var l={};return i&&(l.a=!0),o&&(l.consumerKey=o),a._.urlBuilder(c,l)}}},18830:function(e,t,n){"use strict";n.d(t,{M:function(){return l}});var r=n(57857),a=n(74421),i=n(70065),o=n(50028),c=r.T.encloseNamespace("shared.shared-utils"),l={isVideo:function(e){return(null==e?void 0:e.typeId)===a.E.Video},isClip:function(e){return(null==e?void 0:e.typeId)===a.E.Clip},isInteractive:function(e){return(null==e?void 0:e.typeId)===a.E.Interactive},isVideoType:function(e){return l.isVideo(e)||l.isInteractive(e)||l.isClip(e)},hasSeries:function(e){var t;return!!(null===(t=null==e?void 0:e.series)||void 0===t?void 0:t.id)},getVideoProgress:function(e){var t,n;return(null==e?void 0:e.lastProgressPoint)?null==e?void 0:e.lastProgressPoint:(null===(t=null==e?void 0:e._videoProgress)||void 0===t?void 0:t.progress)?null===(n=null==e?void 0:e._videoProgress)||void 0===n?void 0:n.progress:0},getThumbnail:function(e){var t,n,r,a;return l.isVideo(e)?e.thumbnail:l.isClip(e)?null===(t=e.video)||void 0===t?void 0:t.thumbnail:l.isInteractive(e)?e.thumbnail||(null===(n=e.video)||void 0===n?void 0:n.thumbnail)||(null===(a=null===(r=e.clip)||void 0===r?void 0:r.video)||void 0===a?void 0:a.thumbnail):void 0},getDuration:function(e){var t,n;if(l.isVideo(e))return e.duration;if(l.isInteractive(e)){if(null===(t=e.video)||void 0===t?void 0:t.duration)return e.video.duration;if(null===(n=e.clip)||void 0===n?void 0:n.id)return 1e3*(e.clip.endTime-e.clip.startTime)}return l.isClip(e)?1e3*(e.endTime-e.startTime):void 0},getAnalyticsEntity:function(e){return l.isVideo(e)?i.EntityType.Video:l.isInteractive(e)?i.EntityType.Interactive:l.isClip(e)?i.EntityType.Clip:void 0},getCanBeConsumed:function(e){return e&&(l.isVideo(e)||l.isClip(e)||l.isInteractive(e))?e._canBeConsumed?e._canBeConsumed:{value:!0}:null},getPrivacyReasoning:function(e){var t=l.getCanBeConsumed(e);if(t&&!t.value)switch(t.reason){case"rating-not-allowed":return c("ratingNotAllowed");case"video-deleted":return l.isClip(e)?c("clipParentDeleted"):l.isInteractive(e)?c("interactiveParentDeleted"):c("videoDeleted");case"clickview-private":return c("clickViewPrivate");default:return c("genericCannotAccess")}return l.isInteractive(e)&&e.status===o.X.Draft?c("draftInteractive"):""},getTitle:function(e){if(e.name)return e.name;var t=l.getCanBeConsumed(e);return(null==t?void 0:t.value)||"private"!==(null==t?void 0:t.reason)?(null==t?void 0:t.value)||"video-deleted"!==(null==t?void 0:t.reason)?c("privateVideo"):c("videoUnavailable"):c("privateVideo")},getParentVideo:function(e){var t;return l.isVideo(e)?e:l.isClip(e)?e.video:l.isInteractive(e)?e.video||(null===(t=e.clip)||void 0===t?void 0:t.video):void 0}}}}]);