@clickview/library-editor 1.7.0 → 1.7.1-rc.1

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 (116) hide show
  1. package/dist/bundles.json +2 -2
  2. package/dist/css/{6092-library-editor-09a4993819.chunk.css → 1819-library-editor-69e8f4675f.chunk.css} +2 -2
  3. package/dist/css/1832-library-editor-16982d18f9.chunk.css +2 -0
  4. package/dist/css/{3427-library-editor-2ba6a08f4c.chunk.css → 3427-library-editor-8442ad6453.chunk.css} +1 -1
  5. package/dist/css/4860-library-editor-27c2a56d40.chunk.css +2 -0
  6. package/dist/css/{5047-library-editor-d59ace1885.chunk.css → 5047-library-editor-3ed99ac07f.chunk.css} +1 -1
  7. package/dist/css/5747-library-editor-615300053c.chunk.css +2 -0
  8. package/dist/css/6093-library-editor-3b3ef2f270.chunk.css +2 -0
  9. package/dist/css/7053-library-editor-43ee5fb1f9.chunk.css +2 -0
  10. package/dist/css/9695-library-editor-a3a0f8d8e8.chunk.css +2 -0
  11. package/dist/css/9927-library-editor-e3b21e68b0.chunk.css +2 -0
  12. package/dist/css/{library-editor-app-832d87bac8.css → library-editor-app-4e790b757d.css} +1 -1
  13. package/dist/en.json +1 -1
  14. package/dist/scripts/1819-5e97050377.chunk.js +2 -0
  15. package/dist/scripts/{1832-89afc0b65d.chunk.js → 1832-9528386bfe.chunk.js} +1 -1
  16. package/dist/scripts/243-224b5eea73.chunk.js +1 -0
  17. package/dist/scripts/259-fb7e645a88.chunk.js +1 -0
  18. package/dist/scripts/{2802-6a6c18c88e.chunk.js → 2802-160b25677d.chunk.js} +1 -1
  19. package/dist/scripts/2803-f91683764c.chunk.js +1 -0
  20. package/dist/scripts/{3096-b12e6929ef.chunk.js → 3096-f61a91545d.chunk.js} +1 -1
  21. package/dist/scripts/{3427-4bb7be4830.chunk.js → 3427-1bd7b5956b.chunk.js} +1 -1
  22. package/dist/scripts/3639-8e4d2c9b84.chunk.js +1 -0
  23. package/dist/scripts/3746-7fca58c2db.chunk.js +1 -0
  24. package/dist/scripts/4201-973ee89615.chunk.js +1 -0
  25. package/dist/scripts/435-fbb6b4b01e.chunk.js +1 -0
  26. package/dist/scripts/4860-56e7955cd4.chunk.js +1 -0
  27. package/dist/scripts/{5047-ce9d715ba6.chunk.js → 5047-c22a3ab8f7.chunk.js} +1 -1
  28. package/dist/scripts/5248-c1cfd861cc.chunk.js +1 -0
  29. package/dist/scripts/5356-4583545486.chunk.js +1 -0
  30. package/dist/scripts/5412-51a270fe11.chunk.js +1 -0
  31. package/dist/scripts/{5431-ae8fb2a0d5.chunk.js → 5431-50ab5a6a35.chunk.js} +1 -1
  32. package/dist/scripts/{5747-e533b579f8.chunk.js → 5747-913fcc6f9c.chunk.js} +1 -1
  33. package/dist/scripts/{5967-4561d168be.chunk.js → 5967-5d8ab696d0.chunk.js} +1 -1
  34. package/dist/scripts/6093-67352f9ba1.chunk.js +1 -0
  35. package/dist/scripts/{6625-754683073a.chunk.js → 6625-a31763e7ef.chunk.js} +1 -1
  36. package/dist/scripts/{6788-7373d05068.chunk.js → 6788-4bd780e50b.chunk.js} +1 -1
  37. package/dist/scripts/7053-312e4779fe.chunk.js +1 -0
  38. package/dist/scripts/{7190-b9b56210c7.chunk.js → 7190-8c67f0b2c5.chunk.js} +1 -1
  39. package/dist/scripts/{8343-6cd7f8bc0c.chunk.js → 8343-774860a655.chunk.js} +1 -1
  40. package/dist/scripts/8362-ea6c7521b8.chunk.js +1 -0
  41. package/dist/scripts/8420-77604e5dd5.chunk.js +1 -0
  42. package/dist/scripts/8906-a5aa3d1286.chunk.js +1 -0
  43. package/dist/scripts/9195-db9407692d.chunk.js +1 -0
  44. package/dist/scripts/9298-33d2ab886e.chunk.js +1 -0
  45. package/dist/scripts/9695-72bc239f92.chunk.js +1 -0
  46. package/dist/scripts/9927-6933b86ad4.chunk.js +1 -0
  47. package/dist/scripts/bundle-43ee7c5321.min.js +2 -0
  48. package/package.json +1 -1
  49. package/dist/css/1832-library-editor-761fcb8755.chunk.css +0 -2
  50. package/dist/css/4860-library-editor-d2f7f18ab7.chunk.css +0 -2
  51. package/dist/css/5747-library-editor-a3e5ded646.chunk.css +0 -2
  52. package/dist/css/6093-library-editor-07e26e7dd0.chunk.css +0 -2
  53. package/dist/css/7053-library-editor-96752915ef.chunk.css +0 -2
  54. package/dist/css/9695-library-editor-a995f8ddfd.chunk.css +0 -2
  55. package/dist/scripts/243-9d49b60575.chunk.js +0 -1
  56. package/dist/scripts/259-01aab15df9.chunk.js +0 -1
  57. package/dist/scripts/2803-f77ffe8d6d.chunk.js +0 -1
  58. package/dist/scripts/3639-0103f45f8f.chunk.js +0 -1
  59. package/dist/scripts/4201-d09f8e78d9.chunk.js +0 -1
  60. package/dist/scripts/435-c96da17150.chunk.js +0 -1
  61. package/dist/scripts/4860-e790102563.chunk.js +0 -1
  62. package/dist/scripts/4983-f1497e81d9.chunk.js +0 -1
  63. package/dist/scripts/5248-5e71750de8.chunk.js +0 -1
  64. package/dist/scripts/5356-1daf7014ec.chunk.js +0 -1
  65. package/dist/scripts/5412-95411d83f3.chunk.js +0 -1
  66. package/dist/scripts/6092-b2d4926dbd.chunk.js +0 -2
  67. package/dist/scripts/6093-7981719748.chunk.js +0 -1
  68. package/dist/scripts/6183-90e0e42029.chunk.js +0 -1
  69. package/dist/scripts/7053-8ab28971fd.chunk.js +0 -1
  70. package/dist/scripts/8362-eafdfe9326.chunk.js +0 -1
  71. package/dist/scripts/8420-fae27640ba.chunk.js +0 -1
  72. package/dist/scripts/8906-16bf68d7a8.chunk.js +0 -1
  73. package/dist/scripts/9298-2d96858320.chunk.js +0 -1
  74. package/dist/scripts/9592-35ee192235.chunk.js +0 -1
  75. package/dist/scripts/9695-efcf04cb36.chunk.js +0 -1
  76. package/dist/scripts/bundle-56d7cf88ac.min.js +0 -2
  77. /package/dist/css/{4983-library-editor-76fe7e394b.chunk.css → 3746-library-editor-76fe7e394b.chunk.css} +0 -0
  78. /package/dist/css/{6183-library-editor-14f7d9be38.chunk.css → 9195-library-editor-14f7d9be38.chunk.css} +0 -0
  79. /package/dist/scripts/{1010-24607acfed.chunk.js → 1010-f5821049de.chunk.js} +0 -0
  80. /package/dist/scripts/{1086-a34fb060e6.chunk.js → 1086-ba954c2a70.chunk.js} +0 -0
  81. /package/dist/scripts/{1203-69f107f194.chunk.js → 1203-c5dbf7e172.chunk.js} +0 -0
  82. /package/dist/scripts/{1409-8253b07056.chunk.js → 1409-333eff67cc.chunk.js} +0 -0
  83. /package/dist/scripts/{6092-b2d4926dbd.chunk.js.LICENSE.txt → 1819-5e97050377.chunk.js.LICENSE.txt} +0 -0
  84. /package/dist/scripts/{2098-4df3c20f35.chunk.js → 2098-30b7db58a5.chunk.js} +0 -0
  85. /package/dist/scripts/{2417-5465fe7d6e.chunk.js → 2417-ce05495ed5.chunk.js} +0 -0
  86. /package/dist/scripts/{2692-a5f1f0cbe9.chunk.js → 2692-15c761ec3d.chunk.js} +0 -0
  87. /package/dist/scripts/{2733-104ca5267c.chunk.js → 2733-6b607b5143.chunk.js} +0 -0
  88. /package/dist/scripts/{2802-6a6c18c88e.chunk.js.LICENSE.txt → 2802-160b25677d.chunk.js.LICENSE.txt} +0 -0
  89. /package/dist/scripts/{2888-0544d20f9b.chunk.js → 2888-7396d60be2.chunk.js} +0 -0
  90. /package/dist/scripts/{299-7fe66010c3.chunk.js → 299-921c177109.chunk.js} +0 -0
  91. /package/dist/scripts/{3763-c9be4b8c8b.chunk.js → 3763-0095e75c1a.chunk.js} +0 -0
  92. /package/dist/scripts/{3803-1de2707cba.chunk.js → 3803-d2a02a86eb.chunk.js} +0 -0
  93. /package/dist/scripts/{409-2eb71d2fb9.chunk.js → 409-fbe70b4df9.chunk.js} +0 -0
  94. /package/dist/scripts/{4353-fa7c47f433.chunk.js → 4353-1d4ec918e6.chunk.js} +0 -0
  95. /package/dist/scripts/{4591-da8d98f460.chunk.js → 4591-3fa9999f29.chunk.js} +0 -0
  96. /package/dist/scripts/{4703-8907adfcd9.chunk.js → 4703-1cefcae29b.chunk.js} +0 -0
  97. /package/dist/scripts/{4810-596cb1efb0.chunk.js → 4810-908fe3f045.chunk.js} +0 -0
  98. /package/dist/scripts/{4885-7e874365cf.chunk.js → 4885-3a35265eab.chunk.js} +0 -0
  99. /package/dist/scripts/{514-425e874f7e.chunk.js → 514-923fb794ae.chunk.js} +0 -0
  100. /package/dist/scripts/{5418-0089ab591d.chunk.js → 5418-bc46c939fc.chunk.js} +0 -0
  101. /package/dist/scripts/{546-0cec8e55ef.chunk.js → 546-6736b53bcd.chunk.js} +0 -0
  102. /package/dist/scripts/{5665-073470759f.chunk.js → 5665-38506a938a.chunk.js} +0 -0
  103. /package/dist/scripts/{6420-2178cb2561.chunk.js → 6420-6bae432c6b.chunk.js} +0 -0
  104. /package/dist/scripts/{6774-dd35a32f7d.chunk.js → 6774-580a63bbeb.chunk.js} +0 -0
  105. /package/dist/scripts/{693-e91aae32f6.chunk.js → 693-780241d5a9.chunk.js} +0 -0
  106. /package/dist/scripts/{7002-135475be76.chunk.js → 7002-596b9b3c71.chunk.js} +0 -0
  107. /package/dist/scripts/{7173-a5e749e591.chunk.js → 7173-28ec11155c.chunk.js} +0 -0
  108. /package/dist/scripts/{8074-fdddb2e35b.chunk.js → 8074-e02348d9c5.chunk.js} +0 -0
  109. /package/dist/scripts/{8727-2cdd110cc8.chunk.js → 8727-4be0c05629.chunk.js} +0 -0
  110. /package/dist/scripts/{8762-912bdafad1.chunk.js → 8762-264adb9817.chunk.js} +0 -0
  111. /package/dist/scripts/{8947-152b36ebd5.chunk.js → 8947-563b287016.chunk.js} +0 -0
  112. /package/dist/scripts/{9167-2c993dcf7a.chunk.js → 9167-0e451c25a3.chunk.js} +0 -0
  113. /package/dist/scripts/{9355-0629e54449.chunk.js → 9355-633de33fc9.chunk.js} +0 -0
  114. /package/dist/scripts/{9357-30cb06614f.chunk.js → 9357-22395b794f.chunk.js} +0 -0
  115. /package/dist/scripts/{9383-bb6ad888b4.chunk.js → 9383-afe019b90c.chunk.js} +0 -0
  116. /package/dist/scripts/{bundle-56d7cf88ac.min.js.LICENSE.txt → bundle-43ee7c5321.min.js.LICENSE.txt} +0 -0
@@ -1 +0,0 @@
1
- (self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[6093],{36093:function(e,t,r){"use strict";r.r(t),r.d(t,{ErrorView:function(){return b}});var n=r(48088),o=r(31647),i=r(2882),u=r.n(i),c={image:"DlVFv"};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){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function f(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function s(e,t){return s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},s(e,t)}function p(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 y(e){return y=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},y(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&&s(e,t)}(b,e);var t,r,o,i,l=(o=b,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=y(o);if(i){var r=y(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return p(this,e)});function b(){return a(this,b),l.apply(this,arguments)}return t=b,(r=[{key:"initialize",value:function(){var e=n.Radio.channel("error:view");this.error=e.request("current:error")}},{key:"name",get:function(){return"ErrorView"}},{key:"title",get:function(){return!1}},{key:"className",get:function(){return"bg-white mt-3 p-5 text-center rounded"}},{key:"template",get:function(){return u()}},{key:"viewOptions",value:function(){return{heading:this.error.heading,description:this.error.description,imageNumber:Math.round(5*Math.random()+1),styles:c}}}])&&f(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),b}(o.Q.View)},2882:function(e,t,r){var n=r(32227);e.exports=(n.default||n).template({compiler:[8,">= 4.3.0"],main:function(e,t,r,n,o){e.propertyIsEnumerable;var i,u=e.lambda,c=e.escapeExpression;return'\r\n<img src="/images/errors/Oops'+c(u(null!=(i=null!=t?t.options:t)?i.imageNumber:i,t))+'@2x.png" class="'+c(u(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.image:i,t))+'" />\r\n<h4 class="mt-3 text-muted">'+c(u(null!=(i=null!=t?t.options:t)?i.heading:i,t))+"</h4>\r\n<p>"+(null!=(i=u(null!=(i=null!=t?t.options:t)?i.description:i,t))?i:"")+"</p>"},useData:!0})}}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[6183],{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}},42227:function(){},54783:function(e,t,n){"use strict";n.r(t),n.d(t,{ShareView:function(){return Rn}});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(80325),d=n(2491),p=n(36357);!function(e){e.GoogleClassroom="google-classroom",e.MicrosoftTeams="microsoft-teams"}(r||(r={}));var f,y=c.T.encloseNamespace("shared.shared-utils"),v=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),g=n(40221),b=n(68003),E=function(){var e,t=l.a.useBasicFetch(s.N.currentUser(),{optimize:!0}),n=l.a.useBasicFetch((null===(e=t.data)||void 0===e?void 0:e.isAuthenticated)&&s.N.permissions(),{optimize:!0});return{permissions:n.data,hasPermissions:function(e){var r;return!(!(null===(r=t.data)||void 0===r?void 0:r.isAuthenticated)||!n.hasCompleted||n.hasError||e&&(null==e?void 0:e.length)&&(Array.isArray(e)?e.find((function(e){return!n.data[e]})):!n.data[e]))},isLoaded:n.hasCompleted}};!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.ViewCustomerAnalytics="analytics.customeranalytics.view",e.ManageShareLinkSettings="sharelink.settings.edit",e.ViewProductBoard="productboard.view"}(f||(f={}));var S,k=n(8952),C=n(53808);function w(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)"}(S||(S={}));var x=n(99910),O=n(2248),I=n(85887);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)}var N,j={isNumber:function(e){return j.isType(e,"number")},isString:function(e){return j.isType(e,"string")},isType:function(e,t){return T(e)===t}},A="h8OBl";function P(e){return function(e){if(Array.isArray(e))return L(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 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)||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 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 U(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function F(e,t){var n;return U(n={},N.Recent,t),U(n,N.Local,e),U(n,N.Remote,[]),U(n,N.Generic,[]),n}function R(e,t){return I.t.isObject(e)&&e.hasOwnProperty(t)&&j.isString(e[t])}function D(e,t){e(Object.assign(Object.assign({},F([],[])),U({},N.Generic,[{type:t,generic:!0}])))}function V(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=C.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!(!R(e,d)||!j.isString(e[d]))&&e[d].trim().toLowerCase().includes(p)})):[]);if(!s.length&&e.getEmptyStateComponent)return void D(t,"empty");t((function(e){var t;return Object.assign(Object.assign({},e),(U(t={},N.Local,s),U(t,N.Generic,[]),t))}))}var u,m,d,p;e.getRemoteUrl&&(D(t,"loading"),function(n,r,a,i,o){var c=C.q.isFunction(n)&&n(r);c&&l.a.ajaxRequest({resource:c,type:O.k.GET,success:function(n){var r=C.q.isFunction(e.formatRemoteSuggestions)?e.formatRemoteSuggestions(n):n;r.length||!e.getEmptyStateComponent?t((function(e){var t;return Object.assign(Object.assign({},e),(U(t={},N.Remote,r),U(t,N.Generic,[]),t))})):D(t,"empty")},error:function(){D(t,"errored")},headers:o})}(e.getRemoteUrl,o,0,0,e.requestHeaders))}}}function M(e,t,n,r,a){var i=function(t){return e[t]||[]},o=i(N.Recent),c=i(N.Local),l=i(N.Remote),s=i(N.Generic);if(s.length)return[{data:s}];var u=[].concat(P(c),P(l));return u.length?(Number.isInteger(a)&&u.length>a&&(u=u.slice(0,a)),C.q.isFunction(r)?r(u):[{title:n,data:u}]):o.length?[{title:t,data:o}]:[]}function G(e){return e.data}function z(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")}}function B(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=z(t),r=Object.assign(n,e);return r}!function(e){e.Local="local",e.Recent="recent",e.Remote="remote",e.Generic="generic"}(N||(N={}));var q=n(39396),_=n(6681);function H(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 K(e){var t="d-inline-block svg-container";return C.q.isFunction(e)?t+" cursor-pointer":t}function Z(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(q.x,{svgName:_.vn.Search,size:q.S.Standard,onClick:t,className:K(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:H(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(q.x,{svgName:_.vn.Close,size:q.S.Standard,onClick:i,className:K(i)}))}),null),"right"===n&&a.createElement(u,null)))}function $(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 W(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)?W(e,t):void 0}}function W(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 X,Y="shared.searchBar",J=C.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=F(e.initialSuggestions,e.recentSearches),n=$(a.useState(e.initialQuery||""),2),r=n[0],i=n[1],o=$(a.useState(t),2),l=o[0],s=o[1],u=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 w(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)?w(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}(S.XS);a.useEffect((function(){var t=e.initialQuery||"";r!==t&&i(t)}),[e.initialQuery]);var m,d=function(){s(t)},p=function(t){t.preventDefault(),J(e.onSubmit)&&e.onSubmit(r)},f=a.useMemo((function(){return e.debounceTime?C.q.debounce(V(e,s,d),e.debounceTime):V(e,s,d)}),[e.debounceTime].concat(function(e){if(Array.isArray(e))return W(e)}(m=e.onSuggestionDependencies)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(m)||Q(m)||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:p,renderAsForm:!!e.renderAsForm},a.createElement(k,Object.assign({suggestions:M(l,e.recentSearchHeading||c.T.getPhrase(Y,"recentSearchHeading"),e.suggestionsHeading,e.getSections,e.suggestionLimit),onSuggestionsFetchRequested:f,onSuggestionsClearRequested:function(){e.alwaysRenderSuggestions||d()},onSuggestionSelected:function(t,n){var r=n.suggestion;r.generic||(e.clearQueryOnSelect&&i(""),e.onSuggestionSelected(r))},getSuggestionValue:function(t){return e.updateQueryOnSelection?function(e,t){return R(t,e)?t[e]:""}(e.valueKey,t):r},renderSuggestion:function(t){if(t.generic){if("empty"===t.type)return r.length>=e.activationLength&&C.q.isFunction(e.getEmptyStateComponent)?e.getEmptyStateComponent(r):a.createElement(a.Fragment,null);if("errored"===t.type&&C.q.isFunction(e.getErrorStateComponent)){var n=V(e,s,d);return e.getErrorStateComponent((function(){return n({value:r,reason:"input-changed"})}))}if("loading"===t.type)return i=e.loadingComponentClassName,a.createElement("div",{className:"d-flex justify-content-center cursor-default ".concat(null!=i?i:""),onClick:function(e){e.stopPropagation()}},a.createElement(x.Spinner,{as:"span",animation:"border",role:"status"}))}var i;return J(e.getSuggestionComponent)?e.getSuggestionComponent(t):function(e,t){return R(t,e)?a.createElement(a.Fragment,null,t[e]):a.createElement(a.Fragment,null)}(e.valueKey,t)},renderSuggestionsContainer:function(t){var n=t.containerProps,o=n.ref,c=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"]);return e.customScrollbarProps?a.createElement(h.ZP,Object.assign({ref:o},e.customScrollbarProps,c),t.children):a.createElement("div",Object.assign({ref:o},c),t.children,e.getCreateComponent&&e.getCreateComponent(r,l,!!t.children,(function(){i(""),d()})),e.getFooterComponent&&e.getFooterComponent(r,l,!!t.children))},alwaysRenderSuggestions:e.alwaysRenderSuggestions,focusInputOnSuggestionClick:!u,inputProps:{placeholder:e.placeholder||c.T.getPhrase(Y,"placeholder"),value:r,onChange:function(t,n){var a=n.newValue,o=n.method;!a.length&&["down","up","enter"].includes(o)?i(r):i(a),J(e.onQueryChange)&&e.onQueryChange(a)},onKeyDown:function(t){8===t.keyCode&&e.onBackspace&&!r&&e.onBackspace()},autoFocus:!!e.autoFocusInput,highlightOnFocus:e.highlightInputOnFocus,onClickSearchIcon:!!e.submitOnClickSearchIcon&&p,searchIconPlacement:e.searchIconPlacement,showClearInputIcon:!!e.showClearInputIcon&&!!r.length,onClickClearInput:function(){i(""),J(e.onClickClearInput)&&e.onClickClearInput()},formSize:e.size},renderInputComponent:Z,theme:B(e.theme,!!l.generic.length),multiSection:!0,renderSectionTitle:function(t){return 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:G},e.alwaysRenderSuggestionsOnInputFocus?{shouldRenderSuggestions:function(){return!0}}:{})))}te.defaultProps={updateQueryOnSelection:!0,valueKey:"name",activationLength:3,suggestionLimit:5,recentSearches:[],initialSuggestions:[],searchIconPlacement:"right",renderAsForm:!0,onSuggestionDependencies:[]},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"}(X||(X={}));var ne=n(69620),re=function(e,t){return(null==e?void 0:e.typeId)===t},ae=n(83891),ie=n(87013),oe=n(88483);function ce(e){var t,n,r=e.imageUrl||(t=e.imageCdnUrl,(n=e.initials)?ie.j.createUrl(b._.safeUrlConcat(t,"/v1/profile-images?initials=".concat(n)),{size:oe.h2.Small}):"");return i().createElement("div",{className:"Gvwzj",style:{backgroundImage:"url('".concat(r,"')")}}," ")}var le=n(1268),se=n(46237),ue="Zcpg3",me=c.T.encloseNamespace("shared.userRecipientItemMetadata");function de(e){var t;return i().createElement(i().Fragment,null,i().createElement("div",{className:"".concat(ue," d-inline-block")},i().createElement(ce,{imageUrl:null===(t=e.user.avatar)||void 0===t?void 0:t.url,imageCdnUrl:e.imageCdnUrl,initials:ae.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"},ae.l.getDisplayName(e.user)),i().createElement("p",{className:"text-muted m-0"},function(e){var t=ae.l.getUserType(e),n=ae.l.getUserRole(e);if(t===le.Y.Staff)return n===se.i.Admin?me("admin"):me("staff");var r=ae.l.getYearGroup(e);return(null==r?void 0:r.name)?r.name:me("student")}(e.user))))}function pe(e){return i().createElement("div",{className:"".concat("Uxnsl"," bg-").concat(e.variant," text-white rounded-circle h-100 w-100")},i().createElement(q.x,{svgName:e.svgName,size:e.svgSize}))}function fe(e){return i().createElement(i().Fragment,null,i().createElement("div",{className:"".concat(ue," d-inline-block")},i().createElement(pe,{svgName:_.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 ye=n(16287);function ve(e){switch(e){case ye.ClassroomGroupColour.Pink:return"pink";case ye.ClassroomGroupColour.Orange:return"orange";case ye.ClassroomGroupColour.Green:return"green";case ye.ClassroomGroupColour.Blue:return"blue";case ye.ClassroomGroupColour.Purple:return"purple";case ye.ClassroomGroupColour.Indigo:return"indigo";default:return"pink"}}function he(e){var t;return i().createElement(i().Fragment,null,i().createElement("div",{className:"".concat(ue," d-inline-block")},i().createElement(pe,{svgName:_.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 be=c.T.encloseNamespace("share.recipientItem");function Ee(e){switch(e){case X.User:return be("removeUser");case X.Classroom:return be("removeClassroom");case X.ClassroomGroup:return be("removeGroup")}return null}function Se(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},re(e.entity,X.User)?i().createElement(de,{user:e.entity,imageCdnUrl:e.imageCdnUrl,detailsClassName:l}):re(e.entity,X.Classroom)?i().createElement(fe,{classroom:e.entity,detailsClassName:l}):re(e.entity,X.ClassroomGroup)?i().createElement(he,{classroomGroup:e.entity,detailsClassName:l}):void 0,C.q.isFunction(e.removeRecipient)&&i().createElement("div",{className:"".concat("mCbMC"," d-inline-flex justify-content-center align-items-center")},a?i().createElement(x.Spinner,{as:"div",size:"sm",animation:"border",role:"status"}):i().createElement(ne.u,{title:Ee(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 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 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 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}}(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),xe="shared.typeaheadErrorState";function Oe(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:xe,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:xe,phrase:"tryAgain"})))}function Ie(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 Te="laVU4",Ne="rFH4W",je=c.T.encloseNamespace("shared.inputSelection");function Ae(e){var t,n="".concat(Te," ").concat("BarYz");return e.typeId===X.Classroom?n+=" text-teal":n+=" text-".concat(ve(null===(t=e.metadata)||void 0===t?void 0:t.colour)),n}function Pe(e){var t,n=function(e){var t;switch(e.typeId){case X.Classroom:return"text-hover-teal";case X.ClassroomGroup:return"text-hover-".concat(ve(null===(t=e.metadata)||void 0===t?void 0:t.colour))}}(e.selection),r=e.selection.typeId===X.Classroom;if(!e.canExpand){if(e.selection.typeId===X.User){var a=e.selection;return i().createElement("div",{className:Te},i().createElement(Ie,{imageUrl:null===(t=a.avatar)||void 0===t?void 0:t.url,initials:ae.l.getInitials(e.selection.name,e.selection.surname)}))}return i().createElement(ne.u,{title:je(r?"emptyClassroom":"emptyGroup")},i().createElement("div",{className:"align-items-center border border-white bg-white ".concat(Ne)},i().createElement(q.x,{className:Ae(e.selection),svgName:r?_.vn.Classrooms:_.vn.Group})))}return e.hasExpanded?i().createElement("div",{className:"d-flex align-items-center text-white ".concat("iKeXW"," ").concat(Te)},i().createElement(x.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(q.x,{svgName:_.vn.Plus,className:"d-flex align-items-center ".concat(Te)})),i().createElement("div",{className:"align-items-center border border-white bg-white ".concat(Ne)},i().createElement(q.x,{className:Ae(e.selection),svgName:r?_.vn.Classrooms:_.vn.Group})))}function Le(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 Ue(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)?Ue(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 Ue(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 Fe(e){var t;switch(e.typeId){case X.User:return"number"==typeof e.userType?2===e.userType?"dark-blue":"indigo":e.userType===le.Y.Learner?"dark-blue":"indigo";case X.Classroom:return"teal";case X.ClassroomGroup:return ve(null===(t=e.metadata)||void 0===t?void 0:t.colour)}}function Re(e){var t,n,r,a=re(e.selection,X.Classroom),o=re(e.selection,X.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=Le(i().useState(!1),2),m=u[0],d=u[1],p=Le(i().useState(c&&l),2),f=p[0],y=p[1];if(i().useEffect((function(){y(c&&l)}),[c,l]),s){var v=e.selection,h=Fe(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(h," text-").concat(h," ").concat("HF0E8")},v.users.data.map((function(t){return i().createElement(De,{key:"".concat(t.id,":").concat(e.selection.id),selection:t,colourVariant:h})})),i().createElement(we.L,{className:"cursor-pointer position-absolute text-".concat(h," ").concat("mgt6Y"),onClick:function(){return e.onClickRemove(e.selection.id)}},i().createElement(q.x,{svgName:_.vn.Close,className:"d-flex align-items-center ".concat(Te)})))}return i().createElement(De,{selection:e.selection,canExpand:f,hasExpanded:m,onClickExpand:function(){d(!0),e.onClickExpand(e.selection.id)},onClickRemove:e.onClickRemove,colourVariant:Fe(e.selection)})}function De(e){var t=e.colourVariant||Fe(e.selection),n=e.selection.name;return e.selection.typeId===X.User&&(n=ae.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(Pe,{canExpand:e.canExpand,hasExpanded:e.hasExpanded,onClickExpand:e.onClickExpand,selection:e.selection}),i().createElement("span",{className:"mx-1 text-white"},n),C.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(q.x,{svgName:_.vn.Close,className:"d-flex align-items-center ".concat(Te)})))}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(q.x,{className:"svg-container m-1",svgName:_.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(Re,{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(g.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(Se,{entity:t,imageCdnUrl:e.imageCdnUrl})},getEmptyStateComponent:function(t){return i().createElement(Ce,{query:t,imageUrl:e.emptyStateImageUrl})},getErrorStateComponent:function(t){return i().createElement(Oe,{imageUrl:e.errorStateImageUrl,onClickTryAgain:t})},theme:{container:"Dc3kX",suggestionsContainerOpen:"bg-white py-1 rounded border mt-1 ".concat("c5t3e")},sectionTitleClassName:"pl-2",alwaysRenderSuggestionsOnInputFocus:!0,debounceTime:e.debounceTime})),!!e.sharePermissionsDescription&&i().createElement("span",{className:"px-2 text-secondary text-nowrap"},e.sharePermissionsDescription))}var Me=n(59087);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 ze=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 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.")}()),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(Me,{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))}},ze(i?"copied":"copy")))));return e.label?a.createElement(x.Form.Group,null,a.createElement(x.Form.Label,null,e.label),c):c}Be.defaultProps={styling:"normal"};var qe,_e=n(33192),He=n.n(_e);function Ke(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 Ze(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)?Ze(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 Ze(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"}(qe||(qe={}));var $e=c.T.encloseNamespace("share.shareLinkInfo");function Qe(e){var t=Ke(i().useState(!1),2),n=t[0],r=t[1],a=Ke(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===X.Playlist)return r?{icon:_.vn.Warning,text:$e("hasPrivateVideos")}:{icon:_.vn.VisibleOn,text:$e("public")};if(t===X.Topic||t===X.Series)return{icon:_.vn.VisibleOn,text:$e("justMySchool")};if(!Array.isArray(n))switch(n.privacy){case"public":return{icon:_.vn.VisibleOn,text:$e("public")};case"protected":return{icon:_.vn.VisibleOn,text:$e("clickViewOnly")};case"just_my_customer":return{icon:_.vn.Lock,text:$e("justMySchool")};case"restricted":case"private":return{icon:_.vn.Lock,text:$e("private")};default:return{}}}(e);if(!t)return{icon:_.vn.Lock,text:$e("password")};var a=He().utc(t).local(),i=He()(),o=a.isSame(i,"day"),c=a.diff(i,"days");if(!n){var l=o?$e("expiryToday"):$e("expiry",{days:c});return r===qe.Expired&&(l=$e("expired")),{icon:_.vn.Timer,text:l}}var s=o?$e("passwordExpiryToday"):$e("passwordExpiry",{days:c});return r===qe.Expired&&(s=$e("passwordExpired")),{icon:_.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===X.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(q.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,Xe=n(52076),Ye=n(22218);function Je(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[e.FilterOut=0]="FilterOut",e[e.StripMetadata=1]="StripMetadata"}(We||(We={}));var et,tt={namespace:"share"},nt=function(e,t){e.sort();var n=e.map((function(e){return"id=".concat(e)})).join("&");return t===X.User&&(n+="&query=yearGroups"),t===X.Classroom&&(n+="&query=users[count()]{limit:0}"),t===X.ClassroomGroup&&(n+="&query=classroom,users[count()]{limit:0}"),{url:"{gateway}/v1/objects?".concat(n),key:"share:recipients:".concat(e.join(","),":").concat(n)}},rt=n(4705),at={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=at.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)),at.setRecentItem(e,o,t),o},removeRecentItem:function(e,t,n){var r=at.getRecentItem(e,n).filter((function(e){return e!==t.toString()}));at.setRecentItem(e,r,n)}},it=function(e){return"recently:shared:to:".concat(e)};!function(e){e.Newest="newest",e.Oldest="oldest",e.RecentlyAdded="recently_added",e.AtoZ="atoz",e.ZtoA="ztoa",e.Series="series"}(et||(et={}));var ot;!function(e){e.Topic="topic",e.Series="series",e.Playlist="playlist"}(ot||(ot={})),n(50028);var ct,lt,st,ut,mt=function(e,t){return b._.urlBuilder("{gateway}/v1/objects/".concat(e),{query:"series,season,rating,producers,glance,distributors,owner,resources[thumbnail,pdf],tags,productionCompanies,directors,links,thumbnail,interactives[thumbnail,_canBeConsumed],clips[_canBeConsumed],_canUpdate,_videoProgress,_canBeConsumed",permissionFilterOption:t})},dt=(n(42227),n(48318));(ut=ct||(ct={})).Newest="newest",ut.Oldest="oldest",ut.RecentlyUpdated="recently_added",ut.AtoZ="atoz",ut.ZtoA="ztoa",(st=lt||(lt={})).OwnedByMe="owned_by_me",st.Followed="followed",st.All="all",dt.BaseCollectionIdentifier;var pt=n(70065);c.T.encloseNamespace("shared.shared-utils");var ft,yt;!function(e){e.Playlists="playlists",e.Series="series",e.Videos="videos",e.PinnedVideos="pinnedVideos"}(ft||(ft={})),function(e){e.Subject="Subject",e.Curriculum="Curriculum"}(yt||(yt={}));var vt=function(e,t){return"/api/domain/v1/subjects/".concat(e,"?query=").concat(function(e){return"banner,cover,tallPoster,followers{id:".concat(e,"},pinnedVideos[count()]{limit:0},playlists[count()]{limit:0},series[count()]{limit:0}")}(t))},ht=function(e){return"{gateway}/v1/objects/".concat(e,"?query=").concat("tallposter,rating,banner")},gt=c.T.encloseNamespace("shared.share"),bt={getObjectTypeId:function(e){switch(e){case"video":return X.Video;case"playlist":return X.Playlist;case"subject":return X.Subject;case"series":return X.Series;case"interactive":return X.Interactive;case"clip":return X.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:O.k.POST,data:e,normalizeOptions:tt,invalidationKeys:["share:link:object:".concat(e.resourceId),"privacy:".concat(e.resourceId)],success:t,error:n,always:r}}(t,(function(t){Xe.k.logUserAction(t,Xe.k.mergeOptions(bt.getAnalyticsOptions(e.entityType),{actionType:Ye.Vw.Create,entity:Ye.py.ShareLink,eventVersion:Ye.eq.V3})),e.success&&e.success(t)}),(function(){e.alerts.error(gt("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:O.k.PUT,normalizeOptions:tt,invalidationKeys:["share:".concat(e.id),"share:link:object:".concat(e.objectId),"share:sent"],success:n,error:r,always:a}}(r,a,(function(e){Xe.k.logUserAction(e,Xe.k.mergeOptions(bt.getAnalyticsOptions(n),{actionType:Ye.Vw.Edit,entity:Ye.py.ShareLink,eventVersion:Ye.eq.V3})),o&&o(e),i.success(gt("editSuccess",{name:t.name,escapeText:!0}))}),(function(){c&&c(),i.error(gt("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:O.k.DELETE,normalizeOptions:tt,invalidationKeys:["share:".concat(e.id),"share:link:object:".concat(e.objectId)],success:t,error:n,always:r}}(r,(function(){Xe.k.logUserAction({shareLink:r},Xe.k.mergeOptions(bt.getAnalyticsOptions(n),{actionType:Ye.Vw.Delete,entity:Ye.py.ShareLink})),i&&i(),a.success(gt("deleteSuccess",{name:t.name,escapeText:!0}))}),(function(){a.error(gt("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),Xe.k.logUserAction(Object.assign(Object.assign({},n),{shareCount:i.length}),Xe.k.mergeOptions(bt.getAnalyticsOptions(r),{actionType:Ye.Vw.Share,descriptor:Ye.YM.DirectShare,eventVersion:Ye.eq.V3})),i.map((function(e){!function(e,t){at.addRecentItem(it(e),rt.SG,t)}(a.id,{id:e.id})}))},p={objectId:n.id,objectTypeId:bt.getObjectTypeId(r),recipients:i,message:c},f={recipients:i,message:c},y=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:O.k.POST,normalizeOptions:tt,invalidationKeys:"share:sent",updateState:{keys:i,updateData:function(e){return!e[i]||t.recipients.length?e:Object.assign(Object.assign({},e),Je({},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:O.k.POST,normalizeOptions:tt,invalidationKeys:["direct:share:sent:object:".concat(e.objectId),"share:sent"],success:t,error:n,always:r}}(p,d,u,m);l.a.fetch(t,y)},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:b._.urlBuilder("{gateway}/v1/share/".concat(e,"/recipients"),{recipientId:t}),key:"remove:direct:share:recipient",type:O.k.DELETE,normalizeOptions:tt,invalidationKeys:"share:sent",updateState:{keys:i,updateData:function(e){return e[i]?Object.assign(Object.assign({},e),Je({},i,[])):e}},success:n,error:r,always:a}}(r.id,t,(function(e){a&&a(e),Xe.k.logUserAction({shareCount:1},Xe.k.mergeOptions(bt.getAnalyticsOptions(n),{actionType:Ye.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=g.m.groupBy(e,"typeId"),n=t[X.User],r=t[X.Classroom],a=t[X.ClassroomGroup];l.a.useBasicFetch(!!(null==n?void 0:n.length)&&nt(n.map((function(e){return e.id})),X.User)),l.a.useBasicFetch(!!(null==r?void 0:r.length)&&nt(r.map((function(e){return e.id})),X.Classroom)),l.a.useBasicFetch(!!(null==a?void 0:a.length)&&nt(a.map((function(e){return e.id})),X.ClassroomGroup))},getAnalyticsOptions:function(e){var t;switch(e){case"playlist":t=Ye.py.Playlist;break;case"subject":t=Ye.py.Classification;break;case"video":t=Ye.py.Video;break;case"series":t=Ye.py.Series;break;case"interactive":t=Ye.py.Interactive;break;case"clip":t=Ye.py.Clip}return{entity:t,location:Ye.LZ.Popup,workflowPhase:Ye.eu.Complete}},getFetchFunctionByType:function(e){switch(e){case"video":return function(e){return l.a.useBasicFetch(function(e,t){return{url:mt(e,t),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:"{gateway}/v1/objects/".concat(e,"?query=").concat("cover,banner,owner,videos[count()]{limit:0},clips[count()]{limit:0},interactives[count()]{limit:0},followers[count()]{limit:0}",",_isClickViewPlaylist,_liteOwner"),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:vt(e,t),key:"classification:".concat(e),error:n}}(e,t))};case"series":return function(e){return l.a.useBasicFetch(function(e){return{url:ht(e),key:"series:".concat(e)}}(e))};case"interactive":return function(e){return l.a.useBasicFetch(function(e,t){return{url:b._.urlBuilder("{gateway}/v1/objects/".concat(e),{query:"(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:b._.urlBuilder("{gateway}/v1/objects/".concat(e),{query:"(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:""}};function Et(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 St(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)?St(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 St(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 kt="share.shareAsLink";function Ct(e){var t=Et(i().useState(!1),2),n=t[0],r=t[1],a=Et(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(x.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(ne.u,{title:"playlist"===e.entityType||"series"===e.entityType?c.T.getPhrase(kt,"deleteLinkTooltipPlaylist"):"",spanHack:!0},i().createElement(we.L,{onClick:e.onClickDeleteLink,className:"info-link justify-self-start"},i().createElement(u.x,{namespace:kt,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(Qe,{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(q.x,{svgName:_.vn.Cog}))),i().createElement(Be,{value:e.shareLink.url,onCopy:function(){o||(l(!0),Xe.k.logUserAction(Object.assign({},e.entity),Xe.k.mergeOptions(bt.getAnalyticsOptions(e.entityType),{actionType:pt.UserAction.Share,descriptor:pt.ShareDescriptors.CopyLink,eventVersion:pt.EventVersion.V3})))}})):i().createElement("div",{className:"d-flex align-items-center"},i().createElement(q.x,{svgName:_.vn.Link,className:"svg-container mr-1"}),i().createElement("span",null,i().createElement(u.x,{namespace:kt,phrase:"generate"})))),!e.shareLink&&i().createElement(we.L,{className:"info-link",onClick:function(){r(!0),e.onClickCreateLink()}},i().createElement(u.x,{phrase:"createLink"}))))}var wt=n(5173),xt=n(92802);function Ot(e){var t=I.t.deepClone(e);return Object.keys(t).forEach((function(e){t.hasOwnProperty(e)&&(I.t.isObject(t[e])?t[e]=Ot(t[e]):null===t[e]&&delete t[e])})),t}function It(e){var t=e.castInitialValues,n=e.castValuesOnSubmit,r=e.initialValues,i=e.onSubmit,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,["castInitialValues","castValuesOnSubmit","initialValues","onSubmit"]),c=t&&e.validationSchema?e.validationSchema.cast(Ot(r)):r,l={allowInitialSubmit:e.allowInitialSubmit};return a.createElement(xt.J9,Object.assign({enableReinitialize:!0},o,{initialValues:c,onSubmit:function(t,r){var a=r.setSubmitting,o=r.resetForm,c=n&&e.validationSchema?e.validationSchema.cast(t):t;i(c,(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.reset&&o(),a(!1)}))},initialStatus:l}),C.q.isFunction(e.children)?function(t){return e.children(t)}:a.Children.count(e.children)?e.children:null)}It.defaultProps={castInitialValues:!0,castValuesOnSubmit:!0};var Tt=function(e,t,n,r,a){var i="form-control";return"sm"===r&&(i+=" form-control-sm"),"lg"===r&&(i+=" form-control-lg"),(0,xt.u9)(t,n)&&(0,xt.u9)(e,n)&&(i+=" is-invalid"),a&&(i+=" ".concat(a)),i};function Nt(e){var t=e.label,n=e.checkboxLabelClassName,r=e.checkboxLabelFontWeight,i=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 a.createElement(x.Form.Group,null,a.createElement("div",{className:"custom-control custom-checkbox"},a.createElement(Lt,Object.assign({className:"custom-control-input"},i)),a.createElement(x.Form.Label,{className:"custom-control-label cursor-pointer ".concat("normal"===r?"font-weight-normal":""," \n ").concat(n),htmlFor:i.id},t)))}function jt(e){var t=(0,xt.u6)().values[e.fieldName];return"string"!=typeof t?a.createElement(a.Fragment,null):a.createElement("div",{className:"float-right text-muted"},t.length,"/",e.limit)}function At(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 Pt=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 Lt(e){var t,n,r=e.children,i=Pt(e,["children"]),o=(t=a.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 At(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)?At(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],s=C.q.isFunction(r)?function(e){return r(e)}:a.Children.count(r)?r:null;if("password"!==i.type)return a.createElement(xt.gN,Object.assign({},I.t.omit(i,["formSize"])),s);var u="position-relative ".concat("d78lK");return i.className&&(u+=" ".concat(i.className)),i.disabled&&(u+=" ".concat("asbVo")),a.createElement("div",{className:u},a.createElement(xt.gN,Object.assign({},I.t.omit(i,["formSize","type","className"]),{type:c,className:"".concat("RBJnf"," border-0 w-100 h-100 outline-none rounded")}),s),"password"===i.type&&a.createElement(q.x,{svgName:"password"===c?_.vn.VisibleOn:_.vn.VisibleOff,className:"svg-container cursor-pointer ".concat("jCfI0"),onClick:function(){l("password"===c?"text":"password")}}))}function Ut(e){var t=e.label,n=e.className,r=e.showCharacterCounter,i=e.showRequiredStar,o=e.infoTooltip,c=e.infoText,l=e.formSize,s=e.showOptionalLabel,m=Pt(e,["label","className","showCharacterCounter","showRequiredStar","infoTooltip","infoText","formSize","showOptionalLabel"]),d=(0,xt.u6)(),p=d.errors,f=d.touched,y=function(){};if("checkbox"===m.type){var v=I.t.omit(e,["formSize"]);return e.disabled&&(v.onChange=y),a.createElement(Nt,Object.assign({},v))}var h=Object.assign(Object.assign({},m),{className:Tt(p,f,m.name,l,n)});return e.disabled&&(h.onChange=y),a.createElement(x.Form.Group,null,!!t&&a.createElement(x.Form.Label,{htmlFor:m.id,className:"d-flex align-items-center"},t,i&&a.createElement("span",{className:"text-danger"},"*"),o&&a.createElement(q.x,{svgName:_.vn.Info,title:o,tooltipPlacement:"top",tooltipSpanHack:!0}),s&&a.createElement("span",{className:"text-muted"}," ",a.createElement(u.x,{namespace:"shared.formField",phrase:"optional"}))),a.createElement(Lt,Object.assign({},h)),!!r&&!!m.maxLength&&a.createElement(jt,{fieldName:m.name,limit:m.maxLength}),!!c&&a.createElement(x.Form.Text,{className:"text-muted"},c),a.createElement(xt.Bc,{name:m.name},(function(e){return a.createElement(x.Form.Control.Feedback,{type:"invalid"},e)})))}Lt.defaultProps={autoComplete:"off"},Ut.defaultProps={autoComplete:"off"};var Ft=n(85610),Rt=c.T.encloseNamespace("share.shareMessage"),Dt=wt.Ry().shape({message:wt.Z_().max(280,(function(){return Rt("maxMessageLen")}))});function Vt(){var e=(0,xt.u6)();return i().createElement(xt.l0,null,i().createElement(Ut,{component:"textarea",name:"message",id:"message",placeholder:Rt("placeholder"),value:e.values.message,label:Rt("label"),showOptionalLabel:!0}),i().createElement(Ft.u,null,i().createElement(Ft.u.Submit,{variant:"dark",text:Rt("share")})))}function Mt(e){return i().createElement(It,{initialValues:{message:"",showMessage:!1},validationSchema:Dt,onSubmit:function(t,n){var r=null;t.message&&(r=t.message),e.onClickShare(r,n)},allowInitialSubmit:!0},i().createElement(Vt,null))}var Gt="g-share-to-classroom";function zt(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(Gt))}),[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(i().Fragment,null);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:Gt,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 Bt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function qt(e){return function(e){if(Array.isArray(e))return Ht(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 Ht(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)?Ht(e,t):void 0}}function Ht(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 Kt=c.T.encloseNamespace("shared.share");function Zt(e,t,n,r){if(!e)return[];var a=[].concat(qt(t),qt(n)).map((function(e){return e.id}));return e.filter((function(e){return!a.includes(e.id)&&e.id!==r}))}function $t(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=E().hasPermissions,s=Zt(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==s?void 0:s.map((function(e){return e.id})).join(":"))&&void 0!==t?t:"share:search",getRemoteUrl:function(t){var n,r=b._.safeUrlConcat(e.gatewayApiUrl,"v1/search/users"),a=["user"];return l(f.ShareToClassrooms)&&a.push("classroom"),l(f.ShareToClassroomGroups)&&a.push("classroom_group"),b._.urlBuilder(r,(Bt(n={query:t,index:a},"".concat("filters.","customerId"),e.currentUser.customerId),Bt(n,"limit",10),n))},requestHeaders:e.searchRequestHeaders,formatRemoteSuggestions:function(t){return Zt(null==t?void 0:t.results,o,e.directShareRecipients,e.currentUser.id)},recentSearches:s,selections:o,updateSelections:function(e){return c([].concat(qt(o),[e]))},removeSelection:function(e){return c(o.filter((function(t){return t.id!==e})))},placeholder:Kt("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=I.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(g.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(Se,{entity:t,imageCdnUrl:e.imageCdnUrl,removeRecipient:e.onClickRemoveRecipient}))}))))):i().createElement(i().Fragment,null),o.length?i().createElement(Mt,{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(Ct,{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&&i().createElement(zt,{integrations:e.integrations,url:e.shareLink.url})))}var Qt=n(42905);function Wt(e){var t=e.isLabelEllipsis,n=a.useRef(null);return a.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]),a.createElement("div",{className:"custom-control custom-checkbox ".concat(e.className)},a.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}),a.createElement("label",{className:"custom-control-label cursor-pointer",htmlFor:e.id},a.createElement("span",{className:"".concat(t?"clamp-1":"")},e.label)))}Wt.defaultProps={checked:!1,label:"",className:""};var Xt="share.embedSize";function Yt(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:Xt,phrase:"videoSize"})),i().createElement("div",{className:"pr-3"},i().createElement(x.Dropdown,null,i().createElement(x.Dropdown.Toggle,{id:"embed-resolution",variant:"outline-dark"},r.label),i().createElement(x.Dropdown.Menu,null,o.map((function(e){return i().createElement(x.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:Xt,phrase:"autoplay"})),i().createElement(Wt,{id:"autoplay-checkbox",checked:t,onChange:function(){return n(!t)}}))}function Jt(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,i=[],o=!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 en(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)?en(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 en(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 tn="share.copyEmbedHtml",nn=c.T.encloseNamespace(tn);function rn(e){var t=Qt.i.getEmbedResolutions(),n=Jt(i().useState("copy"),2),r=n[0],a=n[1],o=Jt(i().useState(!1),2),c=o[0],l=o[1],s=Jt(i().useState(t.find((function(e){return"100%"===e.width}))),2),m=s[0],d=s[1],p=Jt(i().useState(!1),2),f=p[0],y=p[1],v=Qt.i.buildEmbedUrl({embedUrl:e.embedUrl,host:e.config.primaryUrl,shareId:e.shareId,autoplay:c}),h=Qt.i.getEmbedString({url:v,size:m});return i().createElement(u.D.Provider,{value:tn},i().createElement("label",null,i().createElement(u.x,{namespace:tn,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:h,rows:5,readOnly:!0}),i().createElement("div",{className:"input-group-append ".concat("myePx")},i().createElement(Me,{onCopy:function(){a("copied"),setTimeout((function(){return a("copy")}),2e3),f||(y(!0),Xe.k.logUserAction(Object.assign(Object.assign({},e.entity),{embedDetails:{size:m,autoplay:c}}),Xe.k.mergeOptions(bt.getAnalyticsOptions(e.entityType),{actionType:pt.UserAction.Share,descriptor:pt.ShareDescriptors.CopyEmbedHtml,eventVersion:pt.EventVersion.V3})))},text:h},i().createElement("button",{className:"btn btn-outline-dark border border-secondary ".concat("zgdag"),type:"button"},nn(r))))),i().createElement(Yt,{autoplay:c,setAutoplay:l,videoSize:m,setVideoSize:d,videoSizes:t}))}var an=(0,wt.Ry)().shape({removePassword:(0,wt.O7)(),resourceId:(0,wt.Z_)(),linkExpireDate:(0,wt.Z_)().nullable(),password:(0,wt.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("")}),on=n(9063);function cn(e){if(!e)return null;var t=new Date;return t.setDate(t.getDate()+30),t.toISOString()}var ln="shared.linkExpiry",sn=c.T.encloseNamespace(ln);function un(e){var t=(0,xt.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:ln,phrase:"linkExpirationHeading"})),i().createElement("p",{className:"m-0"},i().createElement(u.x,{namespace:ln,phrase:"linkExpirationInfo"}))),i().createElement(ne.u,{title:sn("passwordProtected"),disable:!e.passwordProtectLink,spanHack:!0,trigger:"hover"},i().createElement(on.Z,{onClick:function(){e.passwordProtectLink||t.setFieldValue("linkExpireDate",cn(!t.values.linkExpireDate))},on:!!t.values.linkExpireDate,disabled:e.passwordProtectLink,showStateWhenDisabled:!0})))}var mn="W9Jl8";function dn(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 pn=c.T.encloseNamespace("share.setPasswordInput");function fn(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 dn(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)?dn(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,xt.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||pn("passwordPlaceholder"),readOnly:!e.canEdit}),!!l&&a.createElement(x.Form.Control.Feedback,{type:"invalid"},l),!!e.canEdit&&a.createElement(we.L,{className:mn,onClick:function(){return c(!o)}},a.createElement(q.x,{svgName:o?_.vn.VisibleOn:_.vn.VisibleOff,title:pn(o?"hidePassword":"revealPassword"),tooltipPlacement:"top"})),!e.canEdit&&!!e.canReset&&!!e.onReset&&a.createElement(we.L,{className:mn,onClick:e.onReset},a.createElement(q.x,{svgName:_.vn.Close,title:pn("resetPassword"),tooltipPlacement:"top"})))}function yn(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 vn="shared.linkPassword";function hn(e){var t,n,r,a=e.passwordProtectLink,o=e.setPasswordProtectLink,c=(0,xt.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 yn(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)?yn(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:vn,phrase:"passwordProtectHeading"})),i().createElement("p",{className:"m-0"},i().createElement(u.x,{namespace:vn,phrase:"passwordProtectInfo"}))),i().createElement(on.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",cn(!a))},on:a})),a&&i().createElement("div",{className:"position-relative mt-2"},i().createElement(fn,{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 gn(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 bn=c.T.encloseNamespace("shared.share");function En(e){var t,n,r=(0,xt.u6)(),a=E().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 gn(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)?gn(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(xt.l0,null,i().createElement("div",{className:"d-flex align-items-center justify-content-between pb-3"},i().createElement(Qe,{linkExpireDate:r.values.linkExpireDate,isPasswordProtected:c,privacy:e.privacy,entityTypeId:e.shareLink.objectTypeId,status:e.shareLink.status,onClickShowPrivacies:e.onClickShowPrivacies}),i().createElement(ne.u,{title:bn("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(un,{passwordProtectLink:c}),i().createElement(hn,{shareLink:e.shareLink,passwordProtectLink:c,setPasswordProtectLink:l})),!!e.canEmbed&&i().createElement("div",{className:"pb-3"},i().createElement(rn,{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(Ft.u,null,i().createElement(Ft.u.Cancel,{onClick:e.onClickCancel,text:bn("back"),variant:"outline-dark"}),i().createElement(Ft.u.Submit,{variant:"dark"})))}function Sn(e){var t={password:"",removePassword:!1,linkExpireDate:e.shareLink.linkExpireDate};return i().createElement(It,{initialValues:t,onSubmit:e.onClickSaveLink,castInitialValues:!1,validationSchema:an},i().createElement(En,{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 kn=n(28294);function Cn(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 wn(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)?wn(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 wn(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="share.shareLinkPrivacies",On=c.T.encloseNamespace(xn);function In(e){return i().createElement("div",{className:"pb-3"},i().createElement(x.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 Tn(e){var t="private";Array.isArray(e.privacy)||(t=e.privacy.privacy);var n=Cn(i().useState(t),2),r=n[0],a=n[1],o=Cn(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===X.Playlist&&i().createElement("div",null,i().createElement(u.x,{namespace:xn,phrase:"privatePlaylistVideos"})),m&&i().createElement(Qe,{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(In,{key:"public",id:"public",name:On("public"),description:On("publicDescription"),checked:!m&&"public"===r,onSelect:s,disabled:m}),i().createElement(In,{key:"just_my_customer",id:"just_my_customer",name:On("protected"),description:On("protectedDescription"),checked:!m&&"just_my_customer"===r,onSelect:s,disabled:m}),i().createElement(In,{key:"private",id:"private",name:On("private"),description:On("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:xn,phrase:"back"})),i().createElement(kn.m,{className:"btn btn-dark",type:"button",onClick:function(){l(!0),e.onClickSavePrivacy(r)},disabled:r===t,showSpinner:c},i().createElement(u.x,{namespace:xn,phrase:"save"})))))}function Nn(e){return e.reduce((function(e,t){return e[t.name]=t,e}),{})}function jn(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 An(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)?An(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 An(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 Pn="shared.share",Ln=c.T.encloseNamespace(Pn);function Un(e){switch(e){case"video":return Ln("titleVideo");case"clip":return Ln("titleClip");case"interactive":return Ln("titleInteractive");case"series":return Ln("titleSeries");case"playlist":return Ln("titlePlaylist");case"subject":return Ln("titleTopic")}}var Fn=function(e){return"video"===e||"interactive"===e||"clip"===e};function Rn(e){var t,n,r,a,c,f,y,h,g=(0,o.useDispatch)(),b=(0,d.Z)(),E=!e.gatewayApiUrl,S=jn(i().useState(!1),2),k=S[0],C=S[1],w=jn(i().useState("main"),2),x=w[0],I=w[1],T=(n=x,r=i().useRef(),i().useEffect((function(){r.current=n})),r.current),N=jn(i().useState(!1),2),j=N[0],A=N[1],P=l.a.useBasicFetch(s.N.currentUser()),L=bt.getFetchFunctionByType(e.entityType)(e.entityId,null===(t=P.data)||void 0===t?void 0:t.id),U=l.a.useBasicFetch({url:"/api/config",key:"config",bootstrapName:"config",success:y,error:h}),F=l.a.useBasicFetch(E&&s.N.token()),R=l.a.useBasicFetch((f=e.entityId,{url:"{gateway}/v1/share/links?objectId=".concat(f),key:"share:link:object:".concat(f),normalizeOptions:tt,formatData:function(e){return Object.assign(Object.assign({},e),{linkExpireDate:e.linkExpireDate||null})}})),D=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:tt})),V=l.a.useBasicFetch(bt.getDirectShareRecipientsRequest(D.data)),M=P.data&&(a=P.data.id,at.getRecentItem(it(a),rt.SG)),G=!!(null==M?void 0:M.length),z=l.a.useBasicFetch(G&&function(e){e.sort();var t=e.map((function(e){return"id=".concat(e)})).join("&");return{url:"{gateway}/v1/objects?".concat(t),key:"share:recipients:".concat(e.join(","))}}(M)),B=l.a.useBasicFetch(function(e){return{url:"{gateway}/v1/objects/".concat(e,"/access"),key:"privacy:".concat(e),normalize:!1}}(e.entityId)),q=function(e){var t,n,r=l.a.useBasicFetch(s.N.currentUser()),a=l.a.useBasicFetch((null===(t=r.data)||void 0===t?void 0:t.isAuthenticated)&&function(e,t,n){return{key:"customer:settings",url:"/api/domain/v3/settings/".concat(e,"?(customerSettings)"),normalizeOptions:{idAttribute:"name"},formatData:Nn,success:t,error:n}}(r.data.customerId)),i=l.a.useBasicFetch((null===(n=r.data)||void 0===n?void 0:n.isAuthenticated)&&function(e,t,n){return{key:"user:settings",url:"/api/domain/v3/settings/".concat(e,"?(userSettings)"),normalizeOptions:{idAttribute:"name"},formatData:Nn,success:t,error:n}}(r.data.id)),c=(0,o.useDispatch)(),u=!!a.hasCompleted&&!!i.hasCompleted,m=function(e){var t,n;if(!u)return null;if(a.hasError||i.hasError)return null;var r=null===(t=a.data)||void 0===t?void 0:t[e];if(r)return null==r?void 0:r.value;var o=null===(n=i.data)||void 0===n?void 0:n[e];return o?null==o?void 0:o.value:null};return{isLoadingSettings:!u,updateSetting:function(e,t,n,r,a){l.a.fetch(c,function(e,t,n,r,a){return{key:"update:setting:".concat(e,":").concat(t.name),url:"/api/domain/v3/settings/".concat(e),data:t,type:O.k.PUT,formatData:function(){return t},normalizeOptions:{idAttribute:"name"},success:n,error:r,always:a}}(e,t,(function(){Xe.k.logUserAction({name:t.name,value:t.value},{location:null,entity:pt.EntityType.UserSetting,actionType:pt.UserAction.Edit}),null==n||n()}),r,a))},shareToGoogleClassroom:m(p.E.ShareToGoogleClassroom),shareToMicrosoftTeams:m(p.E.ShareToMicrosoftTeams),hasLti:m(p.E.LTI),defaultPlaybackQuality:m(p.E.DefaultPlaybackQuality),defaultLocalCachePlaybackQuality:m(p.E.DefaultLocalCachePlaybackQuality),enableSubtitlesDefault:m(p.E.EnableSubtitlesDefault),hasCompletedOnboarding:m(p.E.HasCompletedOnboarding),liteUpgradeTime:m(p.E.LiteUpgradeTime),liteUpgradeTypeCustomer:m(p.E.LiteUpgradeTypeCustomer),liteUpgradeTypeUser:m(p.E.LiteUpgradeTypeUser),hasCompletedUpgradeOnboarding:m(p.E.HasCompletedUpgradeOnboarding),liteUpgradeFeedback:m(p.E.LiteUpgradeFeedback),liteUpgradeComplete:m(p.E.LiteUpgradeComplete),bulkOnboardingPreferencesState:m(p.E.BulkOnboardingPreferencesState)}}(),_=q.shareToGoogleClassroom,H=q.shareToMicrosoftTeams,K=q.isLoadingSettings;function Z(e){var t;(null===(t=e.recipients)||void 0===t?void 0:t.length)&&l.a.getFetch(g)(bt.getDirectShareRecipientsRequest(e))}function $(e,t){l.a.getFetch(g)(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 Q(){R.data||bt.createLink({dispatch:g,entity:L.data,entityType:e.entityType,alerts:b})}function W(t,n){bt.updateLink(g,L.data,e.entityType,R.data,t,b,(function(){return I("main")}),n)}function X(){C(!0),A(!1),bt.deleteLink(g,L.data,e.entityType,R.data,b,(function(){return I("main")}),(function(){return C(!1)}))}function Y(t,n,r){bt.createOrUpdateDirectShare({dispatch:g,entity:L.data,entityType:e.entityType,currentUser:P.data,recipients:t,message:n,sentDirectShare:D.data,onSuccess:Z,onError:function(){return b.error(Ln("directShareError",{name:L.data.name}))},onDone:r})}function J(t,n){bt.removeDirectShareRecipient(g,t,e.entityType,D.data,Z,(function(){b.error(Ln("removeDirectShareError")),n&&n()}))}function ee(t){l.a.fetch(g,function(e,t,n,r){return{url:"{gateway}/v1/objects/privacy",key:"update:privacy",type:O.k.PUT,data:{privacy:t,objectId:e},invalidationKeys:"privacy",normalize:!1,success:n,error:r}}(e.entityId,t,(function(){return I(T)}),(function(){return b.error(Ln("privaciesError",{name:L.data.name}))})))}bt.useHydrateRecipients(V.data),bt.useHydrateRecipients(z.data),i().useEffect((function(){R.hasCompleted&&A(!0)}),[R.hasCompleted,j]);var te=!!P.data&&!!U.data&&(!E||!!F.data)&&!!D.hasCompleted&&j&&!!B.data&&!!L.data&&!K;return i().createElement(u.D.Provider,{value:Pn},i().createElement(m.G,{title:Un(e.entityType),closePopup:e.closePopup,showLoadingSpinner:k||!te},function(){if(k||!te)return i().createElement(i().Fragment,null);switch(x){case"main":return i().createElement($t,{shareLink:R.data,shareLinkIsLoading:R.isFetching,entity:L.data,entityType:e.entityType,directShareRecipients:V.data||[],recentlySharedTo:z.data||[],onClickCreateLink:Q,onClickShowSettings:function(){return I("link-settings")},onClickShare:Y,onClickRemoveRecipient:J,onClickDeleteLink:X,analyticsOptions:bt.getAnalyticsOptions(e.entityType),gatewayApiUrl:e.gatewayApiUrl||U.data.gatewayApiUrl,imageCdnUrl:U.data.imageCdnUrl,searchRequestHeaders:E?{authorization:"Bearer ".concat(F.data.value)}:null,currentUser:P.data,fetchRecipientUsers:$,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=_,n=H,v(t,n).filter((function(e){return e.enabled})).map((function(e){return e.id})))});case"link-settings":return i().createElement(Sn,{entity:L.data,entityType:e.entityType,config:U.data,shareLink:R.data,entityId:e.entityId,analyticsOptions:bt.getAnalyticsOptions(e.entityType),onClickSaveLink:W,onClickDeleteLink:X,onClickCancel:function(){return I("main")},canEmbed:Fn(e.entityType),privacy:B.data,onClickShowPrivacies:function(){return I("privacy")}});case"privacy":return i().createElement(Tn,{privacy:B.data,shareLink:R.data,onClickCancel:function(){return I(T)},onClickSavePrivacy:ee})}var t,n,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)}}}}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[7053],{87053:function(t,e,n){"use strict";n.r(e),n.d(e,{GeneratePastReleasesPdfView:function(){return k}});var r=n(39479),o=n(33192),i=n(31647),u=n(21679),c=n(57857),a=n(70065),s=n(52076),l=n(10101),f=n(3059),p=n(9484),y=n(30305),b=n(67670),d=n(61843),h=n(39090),g=n(88172),m=n(44937),v=n(29569),O=n.n(v),j={image:"go5qS"};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 S(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function P(t,e){return P=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},P(t,e)}function I(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 _(t){return _=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},_(t)}var k=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)}(k,t);var e,n,i,v,w=(i=k,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(t){return!1}}(),function(){var t,e=_(i);if(v){var n=_(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return I(this,t)});function k(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,k),w.call(this,t)}return e=k,(n=[{key:"initialize",value:function(){this.libraryDataService=u.u.getInstance(y.Or.Library,this),this.contentUpdatesDataService=u.u.getInstance(y.Or.ContentUpdates,this),this.exportDataService=u.u.getInstance(y.Or.Export,this)}},{key:"name",get:function(){return"GeneratePastReleasesPdfView"}},{key:"title",get:function(){return c.T.getPhrase(this.lang,"title")}},{key:"lang",get:function(){return"contentUpdates.generatePastReleasesPdf"}},{key:"template",get:function(){return O()}},{key:"channelName",get:function(){return d.N0.generateUniqueChannelName(this)}},{key:"behaviors",get:function(){var t=this;return[{behaviorClass:l.Yw,title:c.T.getPhrase(this.lang,"heading"),spinnerButtonOptions:{model:this.spinnerModel=new b.v,channelName:this.channelName,buttonText:c.T.getPhrase(this.lang,"generateBtn"),onClick:function(){return t.onClickGeneratePdf()}}}]}},{key:"onLibrariesSync",value:function(t){var e=this;this.libraries=t,this.selectedLibraryIds=h.RF.getLibraryIds(this.options.librariesQueryString,t),this.subjectCollectionIdentifier=new f.xw({dateQueryString:this.options.dateQueryString,libraryIds:this.selectedLibraryIds}),this.contentUpdatesDataService.getRecentVideoSubjects(this.subjectCollectionIdentifier,(function(n){return e.onSubjectsSync(t,n)}))}},{key:"onSubjectsSync",value:function(t,e){var n=h.RF.getSubjectOptions(e).map((function(t){return new m.Wx(t)})),o={dateQueryString:this.options.dateQueryString,libraryIds:this.selectedLibraryIds};if(!this.options.subjectQueryString)return this.videoCollectionIdentifier=new f.IJ(o),void this.spinnerModel.set(g.ZV.Disabled,!1);var i=this.getSubjectIds();this.videoCollectionIdentifier=new f.IJ(r.extend(o,{subjects:n.filter((function(t){return!!r.intersection(i,t.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 t=this;if(this.libraries.length!==this.selectedLibraryIds.length){var e=this.libraries.filter((function(e){return r.contains(t.selectedLibraryIds,e.id.toString())})),n=e.map((function(t){return"<strong>".concat(d.m$.escapeExpression(t.get("name")),"</strong>")}));return e.length<=2?n.join(" ".concat(c.T.getPhrase(this.lang,"and")," ")):r.first(n,n.length-1).join(", ")+" ".concat(c.T.getPhrase(this.lang,"and")," ").concat(r.last(n))}}},{key:"getFormattedDate",value:function(t){if(t)return o(t).format("DD MMMM YYYY")}},{key:"getFormattedSubjects",value:function(){if(this.videoCollectionIdentifier.subjects){var t=this.videoCollectionIdentifier.subjects.map((function(t){return t.get("name")}));return 1===t.length?t[0]:t.slice(0,-1).join(", ")+" ".concat(c.T.getPhrase(this.lang,"and")," ")+t.slice(-1)}}},{key:"onClickGeneratePdf",value:function(){this.spinnerModel.set(g.ZV.ShowSpinner,!0),this.fetchVideosAndGeneratePdf()}},{key:"fetchVideosAndGeneratePdf",value:function(){var t=this;this.contentUpdatesDataService.getRecentVideosAllPages(this.videoCollectionIdentifier,(function(e){e&&e.length?t.generatePdf(e.map((function(t){return t.id.toString()}))):t.triggerMethod("hide")}))}},{key:"generatePdf",value:function(t){var e=this,n=this.videoCollectionIdentifier.subjects?this.getFormattedSubjects():c.T.getPhrase(this.lang,"latestReleases"),r=o(this.videoCollectionIdentifier.dateOption.get("from")).format("MMMM YYYY"),i=o(this.videoCollectionIdentifier.dateOption.get("to")).format("MMMM YYYY"),u=r===i?c.T.getPhrase(this.lang,"fromContentUpdate",{from:r}):c.T.getPhrase(this.lang,"fromToContentUpdates",{from:r,to:i});this.exportDataService.generateCustomListPdf(n,u,t,this.currentUser,(function(){return e.triggerMethod("hide")})),this.logAction(t.length)}},{key:"logAction",value:function(t){var e={location:a.LocationContext.Popup,actionType:a.UserAction.Create,entity:a.EntityType.PDF,workflowPhase:a.WorkflowPhase.Complete},n={videoCount:t,libraries:this.selectedLibraryIds.join(","),releaseDate:this.videoCollectionIdentifier.dateOption.get("name"),subjects:this.options.subjectQueryString?this.videoCollectionIdentifier.subjects.map((function(t){return t.get("name")})).join(","):""};s.k.logUserAction(n,e)}},{key:"requiredResources",get:function(){return{currentUser:p.K.currentUser}}},{key:"onBeforeRender",value:function(){var t=this;this.libraries||this.libraryDataService.getHostedLibraries((function(e){return t.onLibrariesSync(e)}))}},{key:"viewOptions",value:function(){return{styles:j,dataFetched:!!this.libraries,spinnerEl:d.Kp.getSpinner({size:d.Ey.Large,extraClasses:"mx-auto"}),email:this.currentUser.get("email"),imageUrl:y.Wn.Shared.GeneratePdf,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"))}}}])&&S(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),k}(i.Q.View)},3059:function(t,e,n){"use strict";n.d(e,{KX:function(){return k},IJ:function(){return d},xw:function(){return j},F7:function(){return r.F}});var r=n(1091),o=n(39479),i=n(33303),u=n(30305),c=n(44937),a=n(39090);function s(t){return s="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},s(t)}function l(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function f(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function p(t,e){return p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},p(t,e)}function y(t,e){if(e&&("object"===s(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 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)}(d,t);var e,n,r,i,s=(r=d,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=b(r);if(i){var n=b(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return y(this,t)});function d(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,d),(e=s.call(this,{collectionPrefix:"".concat(u.M_.RECENT_VIDEOS,":collection"),cursor:t.cursor,sort:t.sort})).setAdditionalData(t),e}return e=d,(n=[{key:"setAdditionalData",value:function(t){var e=t.libraryIds,n=t.dateQueryString,r=t.subjects;e&&(this.libraryIds=e),r&&(o.isArray(r)&&r.length&&(this.subjects=r),o.isArray(r)||(this.subjects=[r]));var i=o.findWhere(a.US,{queryString:n})||a.U1;this.dateOption=new c.Wx(i)}},{key:"toString",value:function(){var t,e=this.subjects&&this.subjects.length&&this.subjects.map((function(t){return escape(t.get("name"))}))||[];return[this.collectionPrefix,this.libraryIds,this.dateOption.get("from"),this.dateOption.get("to")].concat((t=e,function(t){if(Array.isArray(t))return l(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return l(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?l(t,e):void 0}}(t)||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.")}()),[this.cursor]).filter(Boolean).join(":")}},{key:"toParams",value:function(){var t={};return this.libraryIds&&(t.libraryIds=this.libraryIds),this.dateOption&&(t.from=this.dateOption.get("from"),t.to=this.dateOption.get("to")),this.subjects&&(t.subjectIds=o.flatten(this.subjects.map((function(t){return t.get("subjectIds")})))),this.cursor&&(t.cursor=this.cursor),t}}])&&f(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),d}(i.J);function h(t){return h="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},h(t)}function g(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function m(t,e){return m=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},m(t,e)}function v(t,e){if(e&&("object"===h(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function O(t){return O=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},O(t)}var j=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&&m(t,e)}(l,t);var e,n,r,i,s=(r=l,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=O(r);if(i){var n=O(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return v(this,t)});function l(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),(e=s.call(this,{collectionPrefix:"".concat(u.M_.RECENT_SUBJECTS,":collection"),sort:t.sort})).setAdditionalData(t),e}return e=l,(n=[{key:"setAdditionalData",value:function(t){var e=t.libraryIds,n=t.dateQueryString;e&&(this.libraryIds=e);var r=o.findWhere(a.US,{queryString:n})||a.U1;this.dateOption=new c.Wx(r)}},{key:"toString",value:function(){return[this.collectionPrefix,this.libraryIds,this.dateOption.get("from"),this.dateOption.get("to")].filter(Boolean).join(":")}},{key:"toParams",value:function(){var t={};return this.libraryIds&&(t.libraryIds=this.libraryIds),this.dateOption&&(t.from=this.dateOption.get("from"),t.to=this.dateOption.get("to")),t}}])&&g(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),l}(i.J);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 S(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function P(t,e){return P=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},P(t,e)}function I(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 _(t){return _=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},_(t)}var k=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)}(i,t);var e,n,r,o=(n=i,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(t){return!1}}(),function(){var t,e=_(n);if(r){var o=_(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return I(this,t)});function i(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return S(this,i),o.call(this,{collectionPrefix:u.M_.FOLDERS,id:t,sort:e,cursor:n})}return e=i,Object.defineProperty(e,"prototype",{writable:!1}),e}(i.J)},67670:function(t,e,n){"use strict";n.d(e,{v:function(){return f}});var r=n(31647),o=n(88172);function i(t){return i="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},i(t)}function u(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function c(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function a(t,e){return a=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},a(t,e)}function s(t,e){if(e&&("object"===i(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 l(t){return l=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},l(t)}var f=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&&a(t,e)}(p,t);var e,n,r,i,f=(r=p,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=l(r);if(i){var n=l(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return s(this,t)});function p(){return u(this,p),f.apply(this,arguments)}return e=p,(n=[{key:"defaults",value:function(){return t={},!0,(e=o.ZV.Disabled)in t?Object.defineProperty(t,e,{value:true,enumerable:!0,configurable:!0,writable:!0}):t[e]=true,t;var t,e}}])&&c(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),p}(r.Q.Model)},29569:function(t,e,n){var r=n(32227);t.exports=(r.default||r).template({1:function(t,e,n,r,o){var i;return t.propertyIsEnumerable,(null!=(i=t.lambda(null!=(i=null!=e?e.options:e)?i.spinnerEl:i,e))?i:"")+"\r\n"},3:function(t,e,n,r,o){t.propertyIsEnumerable;var i,u=t.lambda,c=t.escapeExpression,a=null!=e?e:t.nullContext||{},s=t.hooks.helperMissing;return'<div class="pb-3 text-center">\r\n <img src="'+c(u(null!=(i=null!=e?e.options:e)?i.imageUrl:i,e))+'" class="'+c(u(null!=(i=null!=(i=null!=e?e.options:e)?i.styles:i)?i.image:i,e))+'" />\r\n</div>\r\n<p class="m-0">\r\n '+(null!=(i=(n.lang||e&&e.lang||s).call(a,"body1",{name:"lang",hash:{},data:o}))?i:"")+"\r\n "+(null!=(i=n.if.call(a,null!=(i=null!=e?e.options:e)?i.libraryText:i,{name:"if",hash:{},fn:t.program(4,o,0),inverse:t.noop,data:o}))?i:"")+"\r\n "+(null!=(i=n.if.call(a,null!=(i=null!=e?e.options:e)?i.subject:i,{name:"if",hash:{},fn:t.program(6,o,0),inverse:t.noop,data:o}))?i:"")+"\r\n "+(null!=(i=(n.lang||e&&e.lang||s).call(a,"body4",{name:"lang",hash:{email:null!=(i=null!=e?e.options:e)?i.email:i,to:null!=(i=null!=e?e.options:e)?i.to:i,from:null!=(i=null!=e?e.options:e)?i.from:i},data:o}))?i:"")+"\r\n</p>\r\n"},4:function(t,e,n,r,o){var i;return t.propertyIsEnumerable,null!=(i=(n.lang||e&&e.lang||t.hooks.helperMissing).call(null!=e?e:t.nullContext||{},"body2",{name:"lang",hash:{libraryText:null!=(i=null!=e?e.options:e)?i.libraryText:i},data:o}))?i:""},6:function(t,e,n,r,o){var i;return t.propertyIsEnumerable,null!=(i=(n.lang||e&&e.lang||t.hooks.helperMissing).call(null!=e?e:t.nullContext||{},"body3",{name:"lang",hash:{subject:null!=(i=null!=e?e.options:e)?i.subject:i},data:o}))?i:""},compiler:[8,">= 4.3.0"],main:function(t,e,n,r,o){var i;return t.propertyIsEnumerable,null!=(i=n.unless.call(null!=e?e:t.nullContext||{},null!=(i=null!=e?e.options:e)?i.dataFetched:i,{name:"unless",hash:{},fn:t.program(1,o,0),inverse:t.program(3,o,0),data:o}))?i:""},useData:!0})}}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[8362],{38362:function(e,t,n){"use strict";n.r(t),n.d(t,{EditLinkView:function(){return g}});var r=n(48088),o=n(31647),i=n(21679),u=n(99249),l=n(52076),a=n(10101),c=n(88172),s=n(61843),f=n(30305),p=n(13823),d=n(67670),y=n(7190),b=n(8407),h=n.n(b);function v(e){return v="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},v(e)}function m(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function k(e,t){return k=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},k(e,t)}function w(e,t){if(t&&("object"===v(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function O(e){return O=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},O(e)}var g=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&k(e,t)}(S,e);var t,n,b,v,g=(b=S,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=O(b);if(v){var n=O(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return w(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),g.call(this,e)}return t=S,(n=[{key:"initialize",value:function(){this.listenTo(f.Vk.LINK,"link:".concat(this.options.linkId,":sync"),this.render),this.linkDataService=i.u.getInstance(f.Or.Link,this)}},{key:"name",get:function(){return"EditLinkView"}},{key:"title",get:function(){return"Edit link"}},{key:"template",get:function(){return h()}},{key:"channelName",get:function(){return s.N0.generateUniqueChannelName(this)}},{key:"bindings",get:function(){return{"[name=url]":{observe:"url",setOptions:{validate:!0}},"[name=name]":{observe:"name",setOptions:{validate:!0}}}}},{key:"behaviors",get:function(){var e=this;return[{behaviorClass:a.Yw,title:"Edit link",spinnerButtonOptions:{channelName:this.channelName,model:this.spinnerModel=new d.v,buttonText:"Save",onClick:function(t){return e.onSubmit(t)}}}]}},{key:"events",value:function(){return{submit:"onSubmit"}}},{key:"onSubmit",value:function(e){var t=this;e&&e.preventDefault(),this.viewModel.validate(),!1!==this.viewModel.isValid()&&(r.Radio.channel(this.channelName).trigger(c.I3.ShowSpinner),this.linkDataService.updateLink(this.options.videoId,this.viewModel,(function(){t.logAction(),o.Q.AppLinkHelper.trigger({application:f.OV.LIBRARY_EDITOR,action:f.eX.LibraryEditor.EDIT_VIDEO_RESOURCES,args:[t.options.videoId]})})))}},{key:"logAction",value:function(){var e={id:this.options.linkId,parentId:+this.options.videoId,name:this.viewModel.get("name")};l.k.logUserAction(e,this.options.analyticsOptions)}},{key:"dataFetched",value:function(){return!!this.model&&!!this.viewModel}},{key:"onBeforeRender",value:function(){var e=this;this.model=this.linkDataService.getLink(this.options.linkId,(function(t){e.viewModel=u.r.get("link:".concat(e.options.linkId),t.toJSON(),{ctor:p.r}),e.viewModel.addValidation(y.yU)})),this.dataFetched()&&this.spinnerModel.set(c.ZV.Disabled,!1)}},{key:"viewOptions",value:function(){return{dataFetched:this.dataFetched(),spinnerEl:s.Kp.getSpinner({size:s.Ey.Large,extraClasses:"mx-auto"})}}},{key:"onRender",value:function(){this.viewModel&&(this.stickit(this.viewModel),r.Validation.bind(this,{model:this.viewModel}))}},{key:"onClose",value:function(){this.unstickit()}}])&&m(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),S}(o.Q.View)},67670:function(e,t,n){"use strict";n.d(t,{v:function(){return f}});var r=n(31647),o=n(88172);function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function a(e,t){return a=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},a(e,t)}function c(e,t){if(t&&("object"===i(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function s(e){return s=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},s(e)}var f=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&a(e,t)}(p,e);var t,n,r,i,f=(r=p,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=s(r);if(i){var n=s(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return c(this,e)});function p(){return u(this,p),f.apply(this,arguments)}return t=p,(n=[{key:"defaults",value:function(){return e={},!0,(t=o.ZV.Disabled)in e?Object.defineProperty(e,t,{value:true,enumerable:!0,configurable:!0,writable:!0}):e[t]=true,e;var e,t}}])&&l(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),p}(r.Q.Model)},8407:function(e,t,n){var r=n(32227);e.exports=(r.default||r).template({1:function(e,t,n,r,o){var i;return e.propertyIsEnumerable,(null!=(i=e.lambda(null!=(i=null!=t?t.options:t)?i.spinnerEl:i,t))?i:"")+"\r\n"},3:function(e,t,n,r,o){return'<form>\r\n <div class="form-group">\r\n <label for="url" class="control-label">URL</label>\r\n <input name="url" id="url" type="text" class="form-control" placeholder="URL" autocomplete="off" autofocus/>\r\n <div class="form-feedback"></div>\r\n </div>\r\n <div class="form-group">\r\n <label for="name" class="control-label">Name</label>\r\n <input name="name" id="name" type="text" class="form-control" placeholder="Name" autocomplete="off" autofocus/>\r\n <div class="form-feedback"></div>\r\n </div>\r\n</form>\r\n'},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var i;return e.propertyIsEnumerable,null!=(i=n.unless.call(null!=t?t:e.nullContext||{},null!=(i=null!=t?t.options:t)?i.dataFetched:i,{name:"unless",hash:{},fn:e.program(1,o,0),inverse:e.program(3,o,0),data:o}))?i:""},useData:!0})}}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[8420],{46814:function(e,t,n){"use strict";n.r(t),n.d(t,{PastReleasesView:function(){return Y}});var r=n(39479),o=n(31647),i=n(21679),c=n(57857),a=n(70065),s=n(52076),l=n(47022),u=n(36357),f=n(71192),p=n(70763),y=n(17422),h=n(30305),d=n(58688),b=n(48404),v=n(9484),g=n(3059),m=n(95061),w=n(39090),O=(n(14129),n(7572)),S=n(46415),P=n(56750),C=n.n(P),j=n(8614),R=n(7170),k=n(5344);function E(e){return E="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},E(e)}function _(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function T(e,t){return T=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},T(e,t)}function I(e,t){if(t&&("object"===E(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function V(e){return V=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},V(e)}var D=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&T(e,t)}(c,e);var t,n,r,o,i=(r=c,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=V(r);if(o){var n=V(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return I(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),i.call(this,e)}return t=c,(n=[{key:"name",get:function(){return"PastReleasesFiltersComponent"}},{key:"template",get:function(){return C()}},{key:"lang",get:function(){return"contentUpdates.pastReleasesFilters"}},{key:"regions",value:function(){return{filterList:{el:".filter-list-region",replaceRegion:!1,partialLoading:y.LP.PastReleasesSearchFilter}}}},{key:"getVisibleFilters",value:function(){return new R.y(this.collection.filter((function(e){return k.qr.showFilter(e)})))}},{key:"renderFilterList",value:function(){var e=new j.$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()}}])&&_(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),c}(o.Q.Component),L=n(48088),N=n(68536),x=n.n(N);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 U(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function A(e,t){return A=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},A(e,t)}function M(e,t){if(t&&("object"===F(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function B(e){return B=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},B(e)}var W=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&A(e,t)}(c,e);var t,n,r,o,i=(r=c,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=B(r);if(o){var n=B(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return M(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),i.call(this,e)}return t=c,(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 x()}},{key:"regions",value:function(){return{filters:{el:".filters-region"}}}},{key:"events",value:function(){return{"click .generate-pdf":"onClickGeneratePdf"}}},{key:"onClickGeneratePdf",value:function(){L.Radio.channel(this.options.channelName).trigger("generate:pdf")}},{key:"renderFilters",value:function(){var e=new D({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()}}])&&U(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),c}(o.Q.Component),H=n(82405),G=n(73616),Q=n(29565),q=n(69711),J=n.n(q);function X(e){return X="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},X(e)}function z(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function K(e,t){return K=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},K(e,t)}function Z(e,t){if(t&&("object"===X(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function $(e){return $=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},$(e)}var 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)}(R,e);var t,n,P,C,j=(P=R,C=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=$(P);if(C){var n=$(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return Z(this,e)});function R(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,R),j.call(this,e)}return t=R,(n=[{key:"initialize",value:function(){this.bindListeners(),this.settingsDataService=i.u.getInstance(h.Or.Settings,this),this.contentUpdatesDataService=i.u.getInstance(h.Or.ContentUpdates,this),this.videoDataService=i.u.getInstance(h.Or.Video,this),this.libraryDataService=i.u.getInstance(h.Or.Library,this),this.videoMixinService=i.u.getInstance(h.K9.VideoMixin,this)}},{key:"name",get:function(){return"PastReleasesView"}},{key:"title",get:function(){return c.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 J()}},{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:y.LP.VideoGroupList},pagination:{el:".pagination-region",replaceElement:!0}}}},{key:"bindListeners",value:function(){this.listenTo(h.Vk.SETTINGS,"".concat(h.M_.SETTINGS,":sync"),this.render),this.listenTo(this.channelName,"generate:pdf",this.onClickGeneratePdf),this.listenTo(h.Vk.RESTRICTED_VIDEO,"".concat(h.M_.UPDATE_VIDEO_RESTRICTION,":sync"),this.updateRestrictedVideos),this.listenTo(this.channelName,h.Vy.Filters.FILTER_CHANGED,r.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[G.g.Libraries],e),this.subjectCollectionIdentifier=new g.xw({dateQueryString:this.options.queryParams[G.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 r=w.RF.getSelectedSubjects(this.filterCollection),o=n.length>1&&n.length===r.length;this.videoCollectionIdentifier=new g.IJ({dateQueryString:this.options.queryParams[G.g.ReleaseDate],libraryIds:this.libraryIds,subjects:!o&&r,cursor:this.options.queryParams.cursor}),this.listenTo(h.Vk.CONTENT_UPDATES,"".concat(this.videoCollectionIdentifier.toString(),":sync"),this.render),this.fetchVideos()}},{key:"setVideosWithMetadata",value:function(){this.videoCollection&&!this.videosWithMetadata&&(this.videosWithMetadata=new p.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(){o.Q.AppLinkHelper.trigger({application:h.OV.CONTENT_UPDATES,action:h.eX.ContentUpdates.PAST_RELEASES,params:w.RF.getRouteQueryParams(this.filterCollection)})}},{key:"onClickGeneratePdf",value:function(){this.videoCollection.length&&(o.Q.AppLinkHelper.trigger({application:h.OV.CONTENT_UPDATES,action:h.eX.ContentUpdates.GENERATE_PDF,params:w.RF.getRouteQueryParams(this.filterCollection)}),this.logPdfAction())}},{key:"getContentClassName",value:function(){var e=Q.Z.content;return this.reviewSetting&&this.reviewSetting.get("value")?e+=" d-inline-block border-left ".concat(Q.Z.contentWithLeftNav):e+=" w-100",e}},{key:"logPdfAction",value:function(){var e={location:a.LocationContext.PastReleasesHeader,actionType:a.UserAction.Create,entity:a.EntityType.PDF,workflowPhase:a.WorkflowPhase.Start},t=w.RF.getSelectedSubjects(this.filterCollection),n=w.RF.getSelectedReleaseDate(this.filterCollection),r={libraries:this.libraryIds.join(","),subjects:t.map((function(e){return e.get("name")})).join(","),releaseDate:n.get("name")};s.k.logUserAction(r,e)}},{key:"renderHeader",value:function(){this.reviewSetting?this.showChildView("header",new O.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 W({filterCollection:this.filterCollection,channelName:this.channelName,showGeneratePdf:!!this.videoCollection&&!!this.videoCollection.length}))}},{key:"renderVideos",value:function(){this.config&&this.groupedVideoCollection?this.showChildView("videos",new H.D({collection:this.groupedVideoCollection,childOptions:{config:this.config,videoItemComponentType:d.U.PastReleases,videosWithMetadata:this.videosWithMetadata,customerHasCustomLibrary:this.customLibraries&&!!this.customLibraries.length,collectionViewChannel:this.channelName,currentUser:this.currentUser,libraries:this.customLibraries},emptyStateType:y.ub.PastReleases,emptyStateOptions:{heading:c.T.getPhrase(this.lang,"emptyState")}})):this.renderPartialLoading("videos")}},{key:"renderPagination",value:function(){if(this.videoCollection){var e=this.contentUpdatesDataService.getVideoCollectionCursors(this.videoCollectionIdentifier),t=new l.Q({cursors:e,appLink:{application:h.OV.CONTENT_UPDATES,action:h.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 r=t.videosWithMetadata.get(e);r&&(r.set(n.toJSON()),r.set({dataFetched:!0}))}))}},{key:"requiredResources",get:function(){return{config:b.p.config,currentUser:v.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()}}])&&z(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),R}(o.Q.View)},3059:function(e,t,n){"use strict";n.d(t,{KX:function(){return k},IJ:function(){return d},xw:function(){return O},F7:function(){return r.F}});var r=n(1091),o=n(39479),i=n(33303),c=n(30305),a=n(44937),s=n(39090);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 u(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 f(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function p(e,t){return p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},p(e,t)}function y(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 h(e){return h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},h(e)}var d=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&p(e,t)}(d,e);var t,n,r,i,l=(r=d,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=h(r);if(i){var n=h(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return y(this,e)});function d(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,d),(t=l.call(this,{collectionPrefix:"".concat(c.M_.RECENT_VIDEOS,":collection"),cursor:e.cursor,sort:e.sort})).setAdditionalData(e),t}return t=d,(n=[{key:"setAdditionalData",value:function(e){var t=e.libraryIds,n=e.dateQueryString,r=e.subjects;t&&(this.libraryIds=t),r&&(o.isArray(r)&&r.length&&(this.subjects=r),o.isArray(r)||(this.subjects=[r]));var i=o.findWhere(s.US,{queryString:n})||s.U1;this.dateOption=new a.Wx(i)}},{key:"toString",value:function(){var e,t=this.subjects&&this.subjects.length&&this.subjects.map((function(e){return escape(e.get("name"))}))||[];return[this.collectionPrefix,this.libraryIds,this.dateOption.get("from"),this.dateOption.get("to")].concat((e=t,function(e){if(Array.isArray(e))return u(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 u(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)?u(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.")}()),[this.cursor]).filter(Boolean).join(":")}},{key:"toParams",value:function(){var e={};return this.libraryIds&&(e.libraryIds=this.libraryIds),this.dateOption&&(e.from=this.dateOption.get("from"),e.to=this.dateOption.get("to")),this.subjects&&(e.subjectIds=o.flatten(this.subjects.map((function(e){return e.get("subjectIds")})))),this.cursor&&(e.cursor=this.cursor),e}}])&&f(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),d}(i.J);function b(e){return b="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},b(e)}function v(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function g(e,t){return g=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},g(e,t)}function m(e,t){if(t&&("object"===b(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function w(e){return w=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},w(e)}var O=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&g(e,t)}(u,e);var t,n,r,i,l=(r=u,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=w(r);if(i){var n=w(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return m(this,e)});function u(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,u),(t=l.call(this,{collectionPrefix:"".concat(c.M_.RECENT_SUBJECTS,":collection"),sort:e.sort})).setAdditionalData(e),t}return t=u,(n=[{key:"setAdditionalData",value:function(e){var t=e.libraryIds,n=e.dateQueryString;t&&(this.libraryIds=t);var r=o.findWhere(s.US,{queryString:n})||s.U1;this.dateOption=new a.Wx(r)}},{key:"toString",value:function(){return[this.collectionPrefix,this.libraryIds,this.dateOption.get("from"),this.dateOption.get("to")].filter(Boolean).join(":")}},{key:"toParams",value:function(){var e={};return this.libraryIds&&(e.libraryIds=this.libraryIds),this.dateOption&&(e.from=this.dateOption.get("from"),e.to=this.dateOption.get("to")),e}}])&&v(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),u}(i.J);function S(e){return S="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},S(e)}function P(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function C(e,t){return C=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},C(e,t)}function j(e,t){if(t&&("object"===S(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function R(e){return R=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},R(e)}var k=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&C(e,t)}(i,e);var t,n,r,o=(n=i,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=R(n);if(r){var o=R(this).constructor;e=Reflect.construct(t,arguments,o)}else e=t.apply(this,arguments);return j(this,e)});function i(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return P(this,i),o.call(this,{collectionPrefix:c.M_.FOLDERS,id:e,sort:t,cursor:n})}return t=i,Object.defineProperty(t,"prototype",{writable:!1}),t}(i.J)},56750:function(e,t,n){var r=n(32227);e.exports=(r.default||r).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){return 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:o}))+'</strong></div>\r\n<div class="filter-list-region d-inline-block pl-2"></div>'},useData:!0})},68536:function(e,t,n){var r=n(32227);e.exports=(r.default||r).template({1:function(e,t,n,r,o){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:o}))+"</button>\r\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var i;return e.propertyIsEnumerable,'<div class="filters-region d-inline-block"></div>\r\n'+(null!=(i=n.if.call(null!=t?t:e.nullContext||{},null!=(i=null!=t?t.options:t)?i.showGeneratePdf:i,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o}))?i:"")},useData:!0})},69711:function(e,t,n){var r=n(32227);e.exports=(r.default||r).template({1:function(e,t,n,r,o){return'<div class="left-nav-region"></div>'},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var i;return e.propertyIsEnumerable,'<div class="header-region"></div>\r\n'+(null!=(i=n.if.call(null!=t?t:e.nullContext||{},null!=(i=null!=t?t.options:t)?i.showLeftNav:i,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o}))?i:"")+'<div class="'+e.escapeExpression(e.lambda(null!=(i=null!=t?t.options:t)?i.contentClass:i,t))+'">\r\n<div class="list-header-region"></div>\r\n<div class="video-list-region"></div>\r\n<div class="pagination-region"></div>\r\n</div>'},useData:!0})}}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[8906],{11224:function(e,t,n){"use strict";n.r(t),n.d(t,{AddToExchangeView:function(){return k}});var r=n(31647),o=n(21679),i=n(68003),l=n(21186),u=n(10101),c=n(67670),a=n(61843),s=n(48404),f=n(88172),p=n(20072),d=n(30305),y=n(28274),h=n.n(y);function b(e){return b="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},b(e)}function m(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function v(e,t){return v=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},v(e,t)}function g(e,t){if(t&&("object"===b(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function w(e){return w=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},w(e)}var k=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&v(e,t)}(k,e);var t,n,r,y,b=(r=k,y=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=w(r);if(y){var n=w(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return g(this,e)});function k(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,k),b.call(this,e)}return t=k,(n=[{key:"initialize",value:function(){this.libraryDataService=o.u.getInstance(d.Or.Library,this),this.videoDataService=o.u.getInstance(d.Or.Video,this),this.alertService=o.u.getInstance(d.K9.Alerts,this),this.listenTo(d.Vk.LIBRARY,"exchange:".concat(10,":sync"),this.render),this.listenTo(this.channelName,"folder:selected",this.onFolderSelected)}},{key:"name",get:function(){return"AddToExchangeView"}},{key:"title",get:function(){return!1}},{key:"template",get:function(){return h()}},{key:"channelName",get:function(){return a.N0.generateUniqueChannelName(this)}},{key:"folderTreeKey",get:function(){return"folderselect:".concat(this.cid)}},{key:"regions",value:function(){return{folderDropdown:".folder-dropdown-region"}}},{key:"behaviors",get:function(){var e=this;return[{behaviorClass:u.Yw,title:"Add to the Exchange",spinnerButtonOptions:{model:this.spinnerModel=new c.v,channelName:this.channelName,buttonText:"Submit",onClick:function(t){return e.onClickSubmit(t)}}}]}},{key:"getExchange",value:function(){return this.exchangeLibraries.first()}},{key:"onClickSubmit",value:function(e){var t=this;e&&e.preventDefault(),this.spinnerModel.set(f.ZV.ShowSpinner,!0),this.videoDataService.copyVideo(this.options.videoId,this.getExchange().get("id"),this.folder.get("id"),(function(){t.alertService.createAlert({heading:"Request submitted",message:"We will notify you once your Exchange request has been approved",type:l.NK.Success}),t.triggerMethod("hide")}))}},{key:"onFolderSelected",value:function(e){this.folder=e,this.spinnerModel.set(f.ZV.Disabled,!1),a.PU.setSelected(this.folderTreeKey,e,this.getExchange().children)}},{key:"requiredResources",get:function(){return{config:s.p.config}}},{key:"onBeforeRender",value:function(){this.exchangeLibraries=this.libraryDataService.getExchange(10)}},{key:"onRender",value:function(){this.exchangeLibraries&&this.showChildView("folderDropdown",new p.Y({collection:this.getExchange().children,channelName:this.channelName,folderTreeKey:this.folderTreeKey}))}},{key:"viewOptions",value:function(){return{foldersLoaded:!!this.exchangeLibraries,guidelinesUrl:i._.safeUrlConcat(this.config.get("onlineUrl"),"/exchange/community-guidelines"),spinnerEl:a.Kp.getSpinner({size:a.Ey.Large,extraClasses:"mx-auto"})}}}])&&m(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),k}(r.Q.View)},20072:function(e,t,n){"use strict";n.d(t,{Y:function(){return b}});var r=n(48088),o=n(31647),i=n(57857),l=n(50299),u=n(61843),c=n(68979),a=n.n(c),s={selectBtn:"tZUtI",list:"MxlSt",selector:"qHvbU",customItem:"aJzJB"};function f(e){return f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},f(e)}function p(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function d(e,t){return d=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},d(e,t)}function y(e,t){if(t&&("object"===f(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function h(e){return h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},h(e)}var b=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&d(e,t)}(b,e);var t,n,o,c,f=(o=b,c=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=h(o);if(c){var n=h(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return y(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),f.call(this,e)}return t=b,(n=[{key:"initialize",value:function(){this.listenTo(this.options.channelName,"folder:selected new:folder:selected",this.setButtonText),this.listenTo(this.options.channelName,"re:render:selector",this.renderSelector),this.disabledIds=this.options.disabledIds&&this.options.disabledIds.reduce((function(e,t){return Object.assign(Object.assign({},e),function(e,t,n){return t in e?Object.defineProperty(e,t,{value:true,enumerable:!0,configurable:!0,writable:!0}):e[t]=true,e}({},t))}),{})}},{key:"name",get:function(){return"TreeDropdownComponent"}},{key:"template",get:function(){return a()}},{key:"className",get:function(){return"position-relative"}},{key:"lang",get:function(){return"libraryEditor.treeDropdown"}},{key:"regions",value:function(){return{selector:{el:".selector-region",replaceElement:!1}}}},{key:"events",value:function(){return{"click .create-new":"onClickCreateNew"}}},{key:"defaults",get:function(){return{disabledIds:[]}}},{key:"elements",get:function(){return{button:".button-text"}}},{key:"onClickCreateNew",value:function(e){e.preventDefault(),r.Radio.channel(this.options.channelName).trigger("create:folder:clicked")}},{key:"setButtonText",value:function(e,t){if(e&&!t){var n=e.get("name");this.getUI("button").text(n)}else{var r=u.PU.getSelected(this.options.folderTreeKey,this.collection),o=r?r.get("name"):i.T.getPhrase(this.lang,"button");this.getUI("button").text(o)}}},{key:"renderSelector",value:function(){this.showChildView("selector",new l.J({styles:s,collection:this.collection,channelName:this.options.channelName,childrenProperty:"children",folderTreeId:this.options.folderTreeKey,extraClass:s.list,extraClasses:s.list,isSelector:!0,disabledIds:this.disabledIds||{}}))}},{key:"viewOptions",value:function(){return{styles:s,name:this.options.name||this.options.channelName,buttonText:this.buttonText,canCreateNew:this.options.canCreateNew}}},{key:"onRender",value:function(){this.setButtonText(),this.renderSelector()}}])&&p(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),b}(o.Q.Component)},67670:function(e,t,n){"use strict";n.d(t,{v:function(){return f}});var r=n(31647),o=n(88172);function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function c(e,t){return c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},c(e,t)}function a(e,t){if(t&&("object"===i(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function s(e){return s=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},s(e)}var f=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&c(e,t)}(p,e);var t,n,r,i,f=(r=p,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=s(r);if(i){var n=s(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return a(this,e)});function p(){return l(this,p),f.apply(this,arguments)}return t=p,(n=[{key:"defaults",value:function(){return e={},!0,(t=o.ZV.Disabled)in e?Object.defineProperty(e,t,{value:true,enumerable:!0,configurable:!0,writable:!0}):e[t]=true,e;var e,t}}])&&u(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),p}(r.Q.Model)},28274:function(e,t,n){var r=n(32227);e.exports=(r.default||r).template({1:function(e,t,n,r,o){var i;return e.propertyIsEnumerable,'<div class="alert alert-info" role="alert">\r\n The ClickView Exchange is a community for educators, read our <a class="info-link" href="'+e.escapeExpression(e.lambda(null!=(i=null!=t?t.options:t)?i.guidelinesUrl:i,t))+'" target="_blank">community guidelines</a> and let\'s ensure that we keep the Exchange a place we\'re proud of!\r\n</div>\r\n<p>After you submit your video to the Exchange, we will review it and notify you when your video has been made available.</p>\r\n<div class="form-group">\r\n <label>Select a folder</label>\r\n <div class="folder-dropdown-region"></div>\r\n</div>\r\n'},3:function(e,t,n,r,o){var i;return e.propertyIsEnumerable," "+(null!=(i=e.lambda(null!=(i=null!=t?t.options:t)?i.spinnerEl:i,t))?i:"")+"\r\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var i;return e.propertyIsEnumerable,null!=(i=n.if.call(null!=t?t:e.nullContext||{},null!=(i=null!=t?t.options:t)?i.foldersLoaded:i,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.program(3,o,0),data:o}))?i:""},useData:!0})},68979:function(e,t,n){var r=n(32227);e.exports=(r.default||r).template({1:function(e,t,n,r,o){e.propertyIsEnumerable;var i,l=e.escapeExpression;return' <button class="create-new btn font-weight-bold rounded-0 w-100 text-left '+l(e.lambda(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.customItem:i,t))+'">'+l((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"createNew",{name:"lang",hash:{},data:o}))+"</button>\r\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){e.propertyIsEnumerable;var i,l=e.lambda,u=e.escapeExpression;return'<button\r\n class="'+u(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.selectBtn:i,t))+' custom-select form-control"\r\n data-toggle="dropdown"\r\n aria-haspopup="true"\r\n aria-expanded="false"\r\n name='+u(l(null!=(i=null!=t?t.options:t)?i.name:i,t))+'\r\n>\r\n <span class="d-block text-truncate button-text">\r\n '+u(l(null!=(i=null!=t?t.options:t)?i.buttonText:i,t))+'\r\n </span>\r\n</button>\r\n<div class="dropdown-menu '+u(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.selector:i,t))+'">\r\n <div class="selector-region"></div>\r\n'+(null!=(i=n.if.call(null!=t?t:e.nullContext||{},null!=(i=null!=t?t.options:t)?i.canCreateNew:i,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o}))?i:"")+'</div>\r\n<div class="form-feedback"></div>'},useData:!0})}}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[9298],{86812:function(e,t,n){"use strict";n.r(t),n.d(t,{AddToLibraryView:function(){return T}});var r=n(39479),o=n(31647),i=n(21679),l=n(88172),a=n(20072),s=n(10101),u=n(17422),c=n(75459),f=n(67670),d=n(61843),p=n(30305),h=n(57857),y=n(95061),b=n(79665),m=n(99765),g=n.n(m),v={header:"S7CRE"};function w(e){return w="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},w(e)}function O(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function k(e,t){return k=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},k(e,t)}function L(e,t){if(t&&("object"===w(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function S(e){return S=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},S(e)}var T=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&k(e,t)}(T,e);var t,n,o,m,w=(o=T,m=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=S(o);if(m){var n=S(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return L(this,e)});function T(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,T),w.call(this,e)}return t=T,(n=[{key:"initialize",value:function(){this.videoDataService=i.u.getInstance(p.Or.Video,this),this.bindListeners()}},{key:"name",get:function(){return"AddToLibraryView"}},{key:"title",get:function(){return h.T.getPhrase(this.lang,"title")}},{key:"lang",get:function(){return"contentUpdates.addToLibrary"}},{key:"tagName",get:function(){return"form"}},{key:"className",get:function(){return"form-group"}},{key:"appLinks",get:function(){return{".library-editor-applink":{application:p.OV.LIBRARY_EDITOR,action:p.eX.LibraryEditor.HOME}}}},{key:"folderTreeKey",get:function(){return"folderselect:".concat(this.cid)}},{key:"libraryTreeKey",get:function(){return"libraryselect:".concat(this.cid)}},{key:"channelName",get:function(){return d.N0.generateUniqueChannelName(this)}},{key:"template",get:function(){return g()}},{key:"behaviors",get:function(){var e=this;return[{behaviorClass:s.Yw,title:h.T.getPhrase(this.lang,"submitTooltip"),size:"modal-md",spinnerButtonOptions:{channelName:this.channelName,model:this.spinnerModel=new f.v,buttonText:h.T.getPhrase(this.lang,"addBtn"),tooltip:function(){return e.getSubmitBtnTooltipOptions()},onClick:function(t){return e.onSubmit(t)}}}]}},{key:"regions",value:function(){return{libraryDropdown:".library-dropdown-region",folderSelector:".folder-selector-region"}}},{key:"events",value:function(){return{submit:"onSubmit"}}},{key:"elements",get:function(){return{folderName:".folder-name"}}},{key:"bindListeners",value:function(){this.listenTo("".concat(this.channelName,":library"),"library:selected",this.onLibrarySelected),this.listenTo("".concat(this.channelName,":folder"),"folder:selected",this.onFolderSelected),this.listenTo(p.Vk.VIDEO,"".concat(p.M_.VIDEOS,":").concat(this.options.videoId,":sync"),this.render),this.listenTo(p.Vk.VIDEO,"get:video:categories:libraries:".concat(this.options.videoId,":sync"),this.render)}},{key:"onSubmit",value:function(e){e&&e.preventDefault(),this.spinnerModel.set(l.ZV.ShowSpinner,!0),this.addToLibrary()}},{key:"onLibrarySelected",value:function(e){this.spinnerModel.set(l.ZV.Disabled,!0),d.PU.setSelected(this.libraryTreeKey,e.get("id"),this.customLibraries),this.renderFolderSelector()}},{key:"onFolderSelected",value:function(e){this.spinnerModel.set(l.ZV.Disabled,!1),d.PU.setSelected(this.folderTreeKey,e,this.customLibraries)}},{key:"getVideosCustomLibraryNames",value:function(){if(!this.dataFetched())return null;var e=this.getVideoCustomLibraries();if(!e.length)return null;var t=r.map(e,(function(e){return"<strong>".concat(d.m$.escapeExpression(e),"</strong>")}));if(1===t.length)return t[0];var n=h.T.getPhrase(this.lang,"and");return"".concat(t.slice(0,-1).join(", ")," ").concat(n," ").concat(t.slice(-1))}},{key:"addToLibrary",value:function(){var e,t,n=this,o=d.PU.getSelected(this.folderTreeKey,this.customLibraries),i=o.get("id"),l=d.PU.getSelected(this.libraryTreeKey,this.customLibraries).get("id"),a=this.model.libraries.filter((function(e){return e.get("type")===c.r.HostedLibrary})),s=this.model.categories;s&&s.last()&&(e=s.last().get("id")),a&&a.length&&(t=r.last(a).get("id"));var f={masterObjectId:this.options.videoId,masterObjectType:u.En.Video,metadata:{sourceLibraryId:t,sourceCategoryId:e,destinationLibraryId:l,destinationCategoryId:i}};this.videoDataService.addVideoToCustomLibrary(f,this.model,o,(function(){n.triggerMethod("hide")}))}},{key:"getSubmitBtnTooltipOptions",value:function(){if(this.spinnerModel.get(l.ZV.Disabled)&&this.hasAvailableLibraries())return{title:h.T.getPhrase(this.lang,"heading")}}},{key:"getAvailableCustomLibraries",value:function(){if(!this.dataFetched())return null;var e=this.customLibraries.clone();e.remove(this.model.libraries.filter((function(e){return e.get("type")===c.r.CustomLibrary})));var t=e.filter((function(e){return 0===e.children.length}));return e.remove(t),e}},{key:"hasAvailableLibraries",value:function(){if(!this.customLibraries)return!1;var e=this.getAvailableCustomLibraries();return e&&e.length>0}},{key:"hasFolders",value:function(){return!!this.customLibraries&&!!this.customLibraries.find((function(e){return!!e.get("children").length}))}},{key:"getVideoCustomLibraries",value:function(){if(!this.model||!this.model.libraries||!this.model.libraries.length)return null;var e=this.model.libraries.filter((function(e){return e.get("type")===c.r.CustomLibrary}));return r.map(e,(function(e){return e.get("name")}))}},{key:"dataFetched",value:function(){return!!this.model}},{key:"renderLibraryDropdown",value:function(){if(this.customLibraries.length<=1)this.renderFolderSelector();else{var e=d.PU.getSelected(this.libraryTreeKey,this.customLibraries),t=this.getUI("folderName");this.$(t).hide(),this.showChildView("libraryDropdown",new b.A({currentLibraryId:e?e.get("id"):null,collection:this.getAvailableCustomLibraries(),channelName:"".concat(this.channelName,":library")}))}}},{key:"renderFolderSelector",value:function(){var e=this.getAvailableCustomLibraries();1===e.length&&d.PU.setSelected(this.libraryTreeKey,e.first().get("id"),e);var t=d.PU.getSelected(this.libraryTreeKey,e),n=t.get("children")&&!!t.get("children").length,r=this.getUI("folderName");t&&n&&this.$(r).show(),this.showChildView("folderSelector",new a.Y({collection:t.children,channelName:"".concat(this.channelName,":folder"),folderTreeKey:this.folderTreeKey}))}},{key:"requiredResources",get:function(){return{customLibraries:y.T.libraries}}},{key:"onBeforeRender",value:function(){this.model=this.videoDataService.getVideo(this.options.videoId)}},{key:"viewOptions",value:function(){var e;return{styles:v,foundLibraries:this.getVideosCustomLibraryNames(),hasAvailableLibraries:this.hasAvailableLibraries(),hasMultipleLibraries:(null===(e=this.customLibraries)||void 0===e?void 0:e.length)>1,dataFetched:this.dataFetched(),spinnerEl:d.Kp.getSpinner({size:d.Ey.Large,extraClasses:"mx-auto"}),showNoFolderText:!this.hasFolders()}}},{key:"onRender",value:function(){this.dataFetched()&&this.hasAvailableLibraries()&&this.renderLibraryDropdown()}}])&&O(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),T}(o.Q.View)},71641:function(e,t,n){"use strict";n.d(t,{w:function(){return f}});var r=n(39479),o=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 r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function s(e,t){return s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},s(e,t)}function u(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 c(e){return c=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},c(e)}var f=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&s(e,t)}(d,e);var t,n,o,l,f=(o=d,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=c(o);if(l){var n=c(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return u(this,e)});function d(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,d),f.call(this,e)}return t=d,n=[{key:"name",get:function(){return"DropdownCollectionComponent"}},{key:"className",get:function(){return"dropdown-menu items-viewpart ".concat(this.getExtraClasses(this.options.displayOptions))}},{key:"attributes",get:function(){return{"aria-labelledby":"dropdownSelector"}}},{key:"initialize",value:function(){this.listenTo(this.options.channelName,"center:dropdown",this.centerSelectedItem)}},{key:"childView",get:function(){return i.N}},{key:"childViewOptions",get:function(){var e={channelName:this.options.channelName,analyticsHelper:this.options.analyticsHelper};return r.extend(e,this.options.childOptions)}},{key:"getExtraClasses",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.alignment,n=void 0===t?"left":t,r=e.extraClasses,o="dropdown-menu-".concat(n);return r&&(o="".concat(o," ").concat(r)),o}},{key:"centerSelectedItem",value:function(){var e=this.$el.find(".active");if(e.length){var t=this.$el.scrollTop()+e.position().top,n=.5*this.$el.height()+.5*e.height();this.$el.scrollTop(t-n)}}}],n&&a(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),d}(o.Q.ComponentCollection)},67670:function(e,t,n){"use strict";n.d(t,{v:function(){return f}});var r=n(31647),o=n(88172);function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function s(e,t){return s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},s(e,t)}function u(e,t){if(t&&("object"===i(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function c(e){return c=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},c(e)}var f=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&s(e,t)}(d,e);var t,n,r,i,f=(r=d,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=c(r);if(i){var n=c(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return u(this,e)});function d(){return l(this,d),f.apply(this,arguments)}return t=d,(n=[{key:"defaults",value:function(){return e={},!0,(t=o.ZV.Disabled)in e?Object.defineProperty(e,t,{value:true,enumerable:!0,configurable:!0,writable:!0}):e[t]=true,e;var e,t}}])&&a(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),d}(r.Q.Model)},99765:function(e,t,n){var r=n(32227);e.exports=(r.default||r).template({1:function(e,t,n,r,o){e.propertyIsEnumerable;var i,l=null!=t?t:e.nullContext||{};return(null!=(i=n.if.call(l,null!=(i=null!=t?t.options:t)?i.foundLibraries:i,{name:"if",hash:{},fn:e.program(2,o,0),inverse:e.noop,data:o}))?i:"")+"\r\n"+(null!=(i=n.if.call(l,null!=(i=null!=t?t.options:t)?i.hasAvailableLibraries:i,{name:"if",hash:{},fn:e.program(4,o,0),inverse:e.noop,data:o}))?i:"")+"\r\n"+(null!=(i=n.if.call(l,null!=(i=null!=t?t.options:t)?i.showNoFolderText:i,{name:"if",hash:{},fn:e.program(7,o,0),inverse:e.noop,data:o}))?i:"")},2:function(e,t,n,r,o){var i;return e.propertyIsEnumerable,' <div class="alert alert-info" role="alert">\r\n <p class="m-0">'+(null!=(i=(n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"foundLibraries",{name:"lang",hash:{libraries:null!=(i=null!=t?t.options:t)?i.foundLibraries:i},data:o}))?i:"")+"</p>\r\n </div>\r\n"},4:function(e,t,n,r,o){e.propertyIsEnumerable;var i,l=null!=t?t:e.nullContext||{},a=e.hooks.helperMissing,s=e.escapeExpression,u=e.lambda;return' <span class="d-block pb-2">'+s((n.lang||t&&t.lang||a).call(l,"selectFolder",{name:"lang",hash:{},data:o}))+"</span>\r\n"+(null!=(i=n.if.call(l,null!=(i=null!=t?t.options:t)?i.hasMultipleLibraries:i,{name:"if",hash:{},fn:e.program(5,o,0),inverse:e.noop,data:o}))?i:"")+' <div class="mt-1 mb-2 library-dropdown-region"></div>\r\n\r\n <span class="'+s(u(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.header:i,t))+' folder-name">'+s((n.lang||t&&t.lang||a).call(l,"folder",{name:"lang",hash:{},data:o}))+'</span>\r\n <div class="'+s(u(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.folderSelector:i,t))+' mt-1 folder-selector-region"></div>\r\n'},5:function(e,t,n,r,o){e.propertyIsEnumerable;var i,l=e.escapeExpression;return' <span class="'+l(e.lambda(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.header:i,t))+'">'+l((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"library",{name:"lang",hash:{},data:o}))+"</span>\r\n"},7:function(e,t,n,r,o){e.propertyIsEnumerable;var i,l=null!=t?t:e.nullContext||{},a=e.hooks.helperMissing;return" <p>"+e.escapeExpression((n.lang||t&&t.lang||a).call(l,"noFolders1",{name:"lang",hash:{},data:o}))+"</p>\r\n <p>"+(null!=(i=(n.lang||t&&t.lang||a).call(l,"noFolders2",{name:"lang",hash:{},data:o}))?i:"")+"</p>\r\n"},9:function(e,t,n,r,o){var i;return e.propertyIsEnumerable,(null!=(i=e.lambda(null!=(i=null!=t?t.options:t)?i.spinnerEl:i,t))?i:"")+"\r\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var i;return e.propertyIsEnumerable,null!=(i=n.if.call(null!=t?t:e.nullContext||{},null!=(i=null!=t?t.options:t)?i.dataFetched:i,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.program(9,o,0),data:o}))?i:""},useData:!0})}}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[9592],{67670:function(e,t,n){"use strict";n.d(t,{v:function(){return f}});var r=n(31647),o=n(88172);function c(e){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},c(e)}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function a(e,t){return a=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},a(e,t)}function s(e,t){if(t&&("object"===c(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function u(e){return u=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},u(e)}var f=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&a(e,t)}(h,e);var t,n,r,c,f=(r=h,c=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(c){var n=u(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return s(this,e)});function h(){return i(this,h),f.apply(this,arguments)}return t=h,(n=[{key:"defaults",value:function(){return e={},!0,(t=o.ZV.Disabled)in e?Object.defineProperty(e,t,{value:true,enumerable:!0,configurable:!0,writable:!0}):e[t]=true,e;var e,t}}])&&l(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),h}(r.Q.Model)},39592:function(e,t,n){"use strict";n.r(t),n.d(t,{DownloadToLocalCacheView:function(){return w}});var r=n(21679),o=n(57857),c=n(31647),i=n(10101),l=n(88172),a=n(9484),s=n(30305),u=n(67670),f=n(61843),h=n(16317),p=n(9231),d=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 b(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function m(e,t){return m=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},m(e,t)}function v(e,t){if(t&&("object"===y(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function g(e){return g=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},g(e)}var w=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&m(e,t)}(C,e);var t,n,p,y,w=(p=C,y=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(p);if(y){var n=g(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return v(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),w.call(this,e)}return t=C,(n=[{key:"initialize",value:function(){this.localCacheDataService=r.u.getInstance(s.Or.LocalCache,this),this.bindListeners()}},{key:"name",get:function(){return"DownloadToLocalCacheView"}},{key:"title",get:function(){return o.T.getPhrase(this.lang,"title")}},{key:"lang",get:function(){return"shared.downloadToLocalCache"}},{key:"template",get:function(){return d()}},{key:"channelName",get:function(){return f.N0.generateUniqueChannelName(this)}},{key:"behaviors",get:function(){return this.spinnerModel=new u.v,[{behaviorClass:i.Yw,title:o.T.getPhrase(this.lang,"popupHeading"),spinnerButtonOptions:this.getSpinnerButtonOptions}]}},{key:"bindListeners",value:function(){var e=this;this.listenTo(s.Vk.USER,"".concat(s.M_.CURRENT_USER,":sync"),this.render),this.listenTo(s.Vk.LOCAL_CACHE,"".concat(s.M_.LOCAL_CACHE_DEVICES,":sync"),this.render),this.listenTo(s.Vk.LOCAL_CACHE,"".concat(s.M_.LOCAL_CACHE_DOWNLOADS,":").concat(this.options.videoId,":sync"),this.render),this.listenTo(s.Vk.LOCAL_CACHE,"".concat(s.M_.ADD_VIDEO_TO_LOCAL_CACHE,":sync"),(function(){return e.triggerMethod("hide")})),this.listenTo(s.Vk.LOCAL_CACHE,"".concat(s.M_.ADD_VIDEO_TO_LOCAL_CACHE,":error"),(function(){return e.triggerMethod("hide")}))}},{key:"getSpinnerButtonOptions",value:function(){var e=this;if(!this.localCacheDownloads||!this.localCacheDownloads.length)return{model:this.spinnerModel,channelName:this.channelName,buttonText:o.T.getPhrase(this.lang,"buttonText"),onClick:function(){return e.onClickAddToLocalCache()}}}},{key:"onClickAddToLocalCache",value:function(){this.spinnerModel.set(l.ZV.ShowSpinner,!0),this.localCacheDataService.downloadVideoToLocalCache(this.model.get("deviceId"),this.options.videoId)}},{key:"requiredResources",get:function(){return{currentUser:a.K.currentUser}}},{key:"onBeforeRender",value:function(){var e=this.localCacheDataService.getDevices(this.currentUser.get("customerId"));return this.localCacheDownloads=this.localCacheDataService.getDownloadsForVideos([this.options.videoId]),!(e&&this.localCacheDownloads&&(this.model=f.o8.getNewestDeviceUserCanManage(e,this.currentUser.get("customerId")),this.model?(this.spinnerModel.set(l.ZV.Disabled,!1),0):(setTimeout((function(){return c.Q.ErrorHelper.throw(new h.HH)}),0),1)))}},{key:"viewOptions",value:function(){return{dataFetched:!!this.model&&!!this.localCacheDownloads,spinnerEl:f.Kp.getSpinner({size:f.Ey.Large,extraClasses:"mx-auto"}),alreadyDownloaded:this.localCacheDownloads&&this.localCacheDownloads.length}}}])&&b(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),C}(c.Q.View)},9231:function(e,t,n){var r=n(32227);e.exports=(r.default||r).template({1:function(e,t,n,r,o){var c;return e.propertyIsEnumerable,(null!=(c=e.lambda(null!=(c=null!=t?t.options:t)?c.spinnerEl:c,t))?c:"")+"\r\n"},3:function(e,t,n,r,o){var c;return e.propertyIsEnumerable,null!=(c=n.unless.call(null!=t?t:e.nullContext||{},null!=(c=null!=t?t.options:t)?c.alreadyDownloaded:c,{name:"unless",hash:{},fn:e.program(4,o,0),inverse:e.program(6,o,0),data:o}))?c:""},4:function(e,t,n,r,o){e.propertyIsEnumerable;var c=null!=t?t:e.nullContext||{},i=e.hooks.helperMissing,l=e.escapeExpression;return"<p><strong>"+l((n.lang||t&&t.lang||i).call(c,"description",{name:"lang",hash:{},data:o}))+'</strong></p>\r\n<svg height="100" viewBox="0 0 427 100" width="427" xmlns="http://www.w3.org/2000/svg">\r\n <g fill="none" fill-rule="evenodd">\r\n <g fill-rule="nonzero">\r\n <path d="m94.5 55.5c-.5522847 0-1-.4477153-1-1s.4477153-1 1-1h2c.5522847 0 1 .4477153 1 1s-.4477153 1-1 1zm14 0c-.552285 0-1-.4477153-1-1s.447715-1 1-1h2c.552285 0 1 .4477153 1 1s-.447715 1-1 1zm14 0c-.552285 0-1-.4477153-1-1s.447715-1 1-1h2c.552285 0 1 .4477153 1 1s-.447715 1-1 1zm14 0c-.552285 0-1-.4477153-1-1s.447715-1 1-1h2c.552285 0 1 .4477153 1 1s-.447715 1-1 1zm14 0c-.552285 0-1-.4477153-1-1s.447715-1 1-1h2c.552285 0 1 .4477153 1 1s-.447715 1-1 1zm112 0c-.552285 0-1-.4477153-1-1s.447715-1 1-1h2c.552285 0 1 .4477153 1 1s-.447715 1-1 1zm14 0c-.552285 0-1-.4477153-1-1s.447715-1 1-1h2c.552285 0 1 .4477153 1 1s-.447715 1-1 1zm14 0c-.552285 0-1-.4477153-1-1s.447715-1 1-1h2c.552285 0 1 .4477153 1 1s-.447715 1-1 1zm14 0c-.552285 0-1-.4477153-1-1s.447715-1 1-1h2c.552285 0 1 .4477153 1 1s-.447715 1-1 1zm14 0c-.552285 0-1-.4477153-1-1s.447715-1 1-1h2c.552285 0 1 .4477153 1 1s-.447715 1-1 1z" fill="#f8981d"/><path d="m75.3660384 82.489591c-.0757675.0069357-.1518122.010409-.2278965.010409h-54.6179583c-11.70030947 0-19.2714702-8.1915084-19.97109491-19.1076542-.62065424-9.6839806 4.42338321-18.3273466 12.94458521-20.6053076-.4297787-11.9466685 6.5982062-21.1867066 17.1901489-24.2852299 10.2989712-3.0128186 20.88668.7410547 26.0606491 10.0502544 12.8217558-3.457481 26.1104718 8.263297 24.2211271 21.1832845 16.58825 6.4833251 12.6943926 31.07962-5.5995606 32.7542438zm-.3464266-4.989591c13.592216-1.3432135 15.9498811-20.1088375 2.3914689-23.6692862-1.3614422-.3575157-2.1594623-1.7680385-1.7646963-3.11915 3.0734097-10.5189376-8.8471782-21.078668-19.2165057-16.7806108-1.2612369.5227791-2.7086325-.0629726-3.2513006-1.3157806-3.6287978-8.3774717-12.3662807-11.8667544-21.0909115-9.3144869-8.9863414 2.6288273-14.6536056 10.6534543-13.4524943 21.2329216.1549662 1.3649525-.8204237 2.5992336-2.1842308 2.7639765-7.0138244.8472442-11.43239953 7.6566537-10.91209037 15.7749642.54005245 8.4263623 6.08667627 14.4274522 14.98133247 14.4274522z" fill="#e2e2e2"/><path d="m411.5 76h12.5c1.656854 0 3 1.3431458 3 3s-1.343146 3-3 3h-90c-1.656854 0-3-1.3431458-3-3s1.343146-3 3-3h11.5c-4.142136 0-7.5-3.3578644-7.5-7.5v-40c0-4.1421356 3.357864-7.5 7.5-7.5h66c4.142136 0 7.5 3.3578644 7.5 7.5v40c0 4.1421356-3.357864 7.5-7.5 7.5zm-17.5 0h-31c0 1.1045695.895431 2 2 2h27c1.10457 0 2-.8954305 2-2zm-48.5-50c-1.380712 0-2.5 1.1192881-2.5 2.5v40c0 1.3807119 1.119288 2.5 2.5 2.5h66c1.380712 0 2.5-1.1192881 2.5-2.5v-40c0-1.3807119-1.119288-2.5-2.5-2.5z" fill="#e2e2e2"/><path d="m194.688889 46.6708215v4.0154896c-21.037954-1.3356058-31.688889-5.9896514-31.688889-14.6862716 0-1.1045913.891623-2.0000395 1.991496-2.0000395s1.991496.8954482 1.991496 2.0000395c0 5.6687396 9.152444 9.4529958 27.70589 10.6707816zm25.906865.1564809c20.376102-1.018022 30.421254-4.8884966 30.421254-10.8272629 0-1.1045913.891623-2.0000395 1.991496-2.0000395s1.991496.8954482 1.991496 2.0000395c0 8.4131404-9.967884 13.0429588-29.664711 14.5450572zm-25.906865 22.7606388v4.0154864c-21.037953-1.3356021-31.688889-5.9896477-31.688889-14.6862684 0-1.1045913.891623-2.0000395 1.991496-2.0000395s1.991496.8954482 1.991496 2.0000395c0 5.6687397 9.152444 9.4529958 27.70589 10.6707815zm25.879593.1578414c20.394411-1.0159301 30.448526-4.8872081 30.448526-10.8286234 0-1.1045913.891623-2.0000395 1.991496-2.0000395s1.991496.8954482 1.991496 2.0000395c0 9.9178906-13.85241 14.5780829-41.165781 15.0546252zm-55.568482-53.0262704s0 9.9603659 40 9.9603659c11.131238 0 10-6.640244 10-23.24085371 26.666667-3.32012195 40 13.28048781 40 13.28048781s-10 13.2804878-50 13.2804878-40-13.2804878-40-13.2804878z" fill="#f8f8f8"/></g><path d="m199.011905 38.4086355v36.4615785c0 1.1045695.89543 2 2 2 .384934 0 .76169-.1110843 1.085049-.3199204l25.091884-16.205146c.927883-.5992563 1.194287-1.8372468.59503-2.7651291-.115325-.1785696-.258382-.3376117-.423784-.4711387l-25.091884-20.2564325c-.859459-.6938329-2.118651-.5595663-2.812483.2998927-.287178.3557307-.443812.7991133-.443812 1.2562955z" fill="#f8981d"/><path d="m163 16.7249015.011729-.216286.025974-.2387743c1.009035-9.27583682 21.668177-16.2698412 45.79563-16.2698412s44.786596 6.99400437 45.79563 16.2698412l.025974.2387743.01173.216286v65.814781c0 9.5919064-21.048324 16.9642858-45.833334 16.9642858s-45.833333-7.3723794-45.833333-16.9642858zm4 .1084611v65.7063199c0 6.2420953 19.192018 12.9642858 41.833333 12.9642858s41.833334-6.7221905 41.833334-12.9642858v-65.7063199l-.014245-.1309494c-.68278-6.276646-19.663443-12.7024132-41.819089-12.7024132s-41.136309 6.4257672-41.819088 12.7024132z" fill="#e2e2e2" fill-rule="nonzero"/>\r\n </g>\r\n</svg>\r\n<p>'+l((n.lang||t&&t.lang||i).call(c,"nextStep",{name:"lang",hash:{},data:o}))+"</p>\r\n"},6:function(e,t,n,r,o){return e.propertyIsEnumerable,'<p class="m-0">'+e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"alreadyAdded",{name:"lang",hash:{},data:o}))+"</p>\r\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var c;return e.propertyIsEnumerable,null!=(c=n.unless.call(null!=t?t:e.nullContext||{},null!=(c=null!=t?t.options:t)?c.dataFetched:c,{name:"unless",hash:{},fn:e.program(1,o,0),inverse:e.program(3,o,0),data:o}))?c:""},useData:!0})}}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[9695],{49695:function(e,t,n){"use strict";n.r(t),n.d(t,{UploadCompleteView:function(){return h}});var o=n(31647),r=n(21679),i=n(27169),l=n.n(i),a=n(30305),c=n(57857),u={completeImage:"TcxNH"};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 s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function f(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function y(e,t){return y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},y(e,t)}function b(e,t){if(t&&("object"===p(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function d(e){return d=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},d(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&&y(e,t)}(h,e);var t,n,o,i,p=(o=h,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=d(o);if(i){var n=d(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return b(this,e)});function h(){return s(this,h),p.apply(this,arguments)}return t=h,(n=[{key:"initialize",value:function(){this.videoUploadService=r.u.getInstance(a.K9.VideoUpload,this)}},{key:"name",get:function(){return"UploadCompleteView"}},{key:"title",get:function(){return c.T.getPhrase(this.lang,"title")}},{key:"lang",get:function(){return"upload.uploadComplete"}},{key:"template",get:function(){return l()}},{key:"className",get:function(){return"p-3 my-3 bg-white rounded text-center"}},{key:"appLinks",get:function(){return{".back-to-library-applink":{application:a.OV.LIBRARY_EDITOR,action:a.eX.LibraryEditor.HOME}}}},{key:"viewOptions",value:function(){return{styles:u,count:this.videoUploadService.getCollection().length}}},{key:"onBeforeDestroy",value:function(){this.videoUploadService.getCollection().reset()}}])&&f(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),h}(o.Q.View)},27169: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=null!=t?t:e.nullContext||{},a=e.hooks.helperMissing,c=e.escapeExpression;return"<h1>"+c((n.lang||t&&t.lang||a).call(l,"inLibrary",{name:"lang",hash:{smartCount:null!=(i=null!=t?t.options:t)?i.count:i},data:r}))+'</h1>\r\n<div class="my-3">\r\n <img src="/images/upload/upload-completed@2x.png" class="'+c(e.lambda(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.completeImage:i,t))+'"/>\r\n</div>\r\n<p>'+c((n.lang||t&&t.lang||a).call(l,"isProcessing",{name:"lang",hash:{smartCount:null!=(i=null!=t?t.options:t)?i.count:i},data:r}))+'</p>\r\n<a class="back-to-library-applink btn btn-dark">'+c((n.lang||t&&t.lang||a).call(l,"back",{name:"lang",hash:{},data:r}))+"</a>"},useData:!0})}}]);