@clickview/library-editor 1.37.1 → 1.38.0-rc.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/dist/bundles.json +2 -2
  2. package/dist/css/{1086-library-editor-c513fb882b.chunk.css → 1086-library-editor-076ef8e022.chunk.css} +2 -2
  3. package/dist/css/{2692-library-editor-c513fb882b.chunk.css → 2692-library-editor-076ef8e022.chunk.css} +2 -2
  4. package/dist/css/{5424-library-editor-ad7edcce65.chunk.css → 5424-library-editor-cbb9c55dc8.chunk.css} +2 -2
  5. package/dist/css/{61-library-editor-54b70c4868.chunk.css → 61-library-editor-51e80bdaad.chunk.css} +1 -1
  6. package/dist/css/{6909-library-editor-d0f7f345f1.chunk.css → 6150-library-editor-59f052a1cf.chunk.css} +6 -5
  7. package/dist/css/{6732-library-editor-09b58e4f36.chunk.css → 6732-library-editor-6233ce01e9.chunk.css} +2 -2
  8. package/dist/css/{708-library-editor-40f1929114.chunk.css → 708-library-editor-ce48b52d72.chunk.css} +1 -1
  9. package/dist/css/{8906-library-editor-c513fb882b.chunk.css → 8762-library-editor-076ef8e022.chunk.css} +2 -2
  10. package/dist/css/{8762-library-editor-c513fb882b.chunk.css → 8906-library-editor-076ef8e022.chunk.css} +2 -2
  11. package/dist/css/{9383-library-editor-542aecca2b.chunk.css → 9383-library-editor-454e5b7acb.chunk.css} +2 -2
  12. package/dist/css/library-editor-app-88622a8138.css +65 -0
  13. package/dist/languages/en.json +1 -1
  14. package/dist/scripts/{1269-1ce9a7902d.chunk.js → 1269-9ae6f52d3d.chunk.js} +1 -1
  15. package/dist/scripts/3087-b5f7599412.chunk.js +1 -0
  16. package/dist/scripts/5418-d828f63db4.chunk.js +1 -0
  17. package/dist/scripts/5698-fe8deeb19c.chunk.js +1 -0
  18. package/dist/scripts/61-b31dc67c9c.chunk.js +2 -0
  19. package/dist/scripts/6150-f76661bd35.chunk.js +2 -0
  20. package/dist/scripts/8906-29da3dd261.chunk.js +1 -0
  21. package/dist/scripts/9219-fcb2aa48d4.chunk.js +1 -0
  22. package/dist/scripts/{9309-c031e0377b.chunk.js → 9309-c4a5761175.chunk.js} +1 -1
  23. package/dist/scripts/{9383-cca692b227.chunk.js → 9383-38a30cdc5a.chunk.js} +1 -1
  24. package/dist/scripts/bundle-1de1984db3.min.js +2 -0
  25. package/package.json +1 -1
  26. package/dist/css/library-editor-app-bed81f7dd3.css +0 -65
  27. package/dist/scripts/3087-a00194efdc.chunk.js +0 -1
  28. package/dist/scripts/5418-57159c045d.chunk.js +0 -1
  29. package/dist/scripts/5698-11224503e0.chunk.js +0 -1
  30. package/dist/scripts/61-2dc4cd6085.chunk.js +0 -2
  31. package/dist/scripts/6909-b3b2a456a7.chunk.js +0 -2
  32. package/dist/scripts/8906-c65afff142.chunk.js +0 -1
  33. package/dist/scripts/9219-3fcebeb8cb.chunk.js +0 -1
  34. package/dist/scripts/bundle-7010637a83.min.js +0 -2
  35. /package/dist/scripts/{1086-9ffd85c4a1.chunk.js → 1086-f474fdd295.chunk.js} +0 -0
  36. /package/dist/scripts/{2692-fb7c0af3ed.chunk.js → 2692-8a53aba52d.chunk.js} +0 -0
  37. /package/dist/scripts/{5424-45e0e60c2a.chunk.js → 5424-1433cc8161.chunk.js} +0 -0
  38. /package/dist/scripts/{61-2dc4cd6085.chunk.js.LICENSE.txt → 61-b31dc67c9c.chunk.js.LICENSE.txt} +0 -0
  39. /package/dist/scripts/{6909-b3b2a456a7.chunk.js.LICENSE.txt → 6150-f76661bd35.chunk.js.LICENSE.txt} +0 -0
  40. /package/dist/scripts/{6732-2cefa220ec.chunk.js → 6732-8ffe8f9b56.chunk.js} +0 -0
  41. /package/dist/scripts/{708-421fd360d6.chunk.js → 708-30b695437c.chunk.js} +0 -0
  42. /package/dist/scripts/{8762-5f7c906a16.chunk.js → 8762-c12f4bc9a0.chunk.js} +0 -0
  43. /package/dist/scripts/{bundle-7010637a83.min.js.LICENSE.txt → bundle-1de1984db3.min.js.LICENSE.txt} +0 -0
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[3087],{86347:function(e,t,r){r.d(t,{b:function(){return u},n:function(){return s}});var n=r(1024),a=r(92802),l=r(53808),i=r(85887);function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var c=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(n=Object.getOwnPropertySymbols(e);a<n.length;a++)t.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]])}return r};function s(e){var t=e.castInitialValues,r=e.castValuesOnSubmit,s=e.initialValues,u=e.onSubmit,d=c(e,["castInitialValues","castValuesOnSubmit","initialValues","onSubmit"]),m=t&&e.validationSchema?e.validationSchema.cast(function(e){if(!e)return{};var t=i.t.deepClone(e);return function e(r){Object.keys(t).forEach((function(n){t.hasOwnProperty(n)&&(i.t.isObject(r[n])?e(r[n]):null===t[n]&&delete t[n])}))}(t),t}(s)):s,f={allowInitialSubmit:e.allowInitialSubmit};return n.createElement(a.J9,Object.assign({enableReinitialize:!0},d,{initialValues:m,onSubmit:function(t,n){var a=n.setSubmitting,l=n.resetForm,i=n.setFieldError,c=r&&e.validationSchema?e.validationSchema.cast(t):t;u(c,(function(){var e,t,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(r.reset&&l(),r.errors)for(var n=0,c=Object.entries(r.errors);n<c.length;n++){var s=(e=c[n],t=2,function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,l,i,o=[],c=!0,s=!1;try{if(l=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=l.call(r)).done)&&(o.push(n.value),o.length!==t);c=!0);}catch(e){s=!0,a=e}finally{try{if(!c&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(s)throw a}}return o}}(e,t)||function(e,t){if(e){if("string"==typeof e)return o(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?o(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.")}()),u=s[0],d=s[1];i(u,d)}a(!1)}))},initialStatus:f}),l.q.isFunction(e.children)?function(t){return e.children(t)}:n.Children.count(e.children)?e.children:null)}function u(){return(0,a.u6)()}s.defaultProps={castInitialValues:!0,castValuesOnSubmit:!0}},53087:function(e,t,r){r.r(t),r.d(t,{PendingRequestsView:function(){return Qe}});var n=r(1024),a=r.n(n),l=r(57857),i=r(86120),o=r(23689),c=r(86242),s=r(66703),u=r(90335),d=r(15408),m=r(2491),f=r(30317),v=r(22430),p=r(50997),b=r(68893),y=r(48404),h=r(19226),g=r(95061),E=r(31647),N=r(52076),S=r(70065),R=r(86347),w=r(98495),O=r(92802),x=r(5173),q=r(49642),I=r(63151),L=r(42120),C=r(63791),k=r(39396),j=function(e){switch(e){case"up":return"JAT0R";case"down":return"ld41u";case"right":return"HHkPe";case"left":return"jZTRR"}};function A(e){return a().createElement(k.x,{svgName:C.vn.Caret,className:"".concat(j(e.direction)," svg-container d-inline-block ").concat(e.className)})}A.defaultProps={direction:"right"};var T=r(58424);function P(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=F(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var l,i=!0,o=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return i=e.done,e},e:function(e){o=!0,l=e},f:function(){try{i||null==r.return||r.return()}finally{if(o)throw l}}}}function D(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,l,i,o=[],c=!0,s=!1;try{if(l=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=l.call(r)).done)&&(o.push(n.value),o.length!==t);c=!0);}catch(e){s=!0,a=e}finally{try{if(!c&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(s)throw a}}return o}}(e,t)||F(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 F(e,t){if(e){if("string"==typeof e)return V(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?V(e,t):void 0}}function V(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function _(e,t,r){if(I.m.isEqual(e.id,t))return[e,r];var n,a=e.children;if(!a||!a.length)return[null,null];for(var l=0;l<a.length;l++){var i=D(_(a[l],t,[].concat(function(e){if(Array.isArray(e))return V(e)}(n=r)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(n)||F(n)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),[e])),2),o=i[0],c=i[1];if(o)return[o,c]}return[null,null]}var U={find:function(e,t){if(e&&e.children&&e.children.length)for(var r=0;r<e.children.length;r++){var n=D(_(e.children[r],t,[]),1)[0];if(n)return n}},getPath:function(e,t){if(e&&e.children&&e.children.length)for(var r=0;r<e.children.length;r++){var n=D(_(e.children[r],t,[]),2)[1];if(null==n?void 0:n.length)return n}},getParent:function(e,t){var r=U.getPath(e,t);return(null==r?void 0:r.length)?r[r.length-1]:null},convertNestedObjectToTree:function(e){var t,r=Object.assign(Object.assign({},e.data),{children:e.children});return(null===(t=r.children)||void 0===t?void 0:t.length)&&(r.children=r.children.map(U.convertNestedObjectToTree)),r},findDepth:function(e,t){var r,n,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(!e||0===e.length)return 0;var l,i=0,o=P(e);try{for(o.s();!(l=o.n()).done;){var c=l.value;if((null===(n=null===(r=c.data)||void 0===r?void 0:r.id)||void 0===n?void 0:n.toString())===t.toString())return a;var s=U.findDepth(c.children,t,a+1);if(s>0){i=s;break}}}catch(e){o.e(e)}finally{o.f()}return i},findMaxChildDepth:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(!e||0===e.length)return t;var r,n=t,a=P(e);try{for(a.s();!(r=a.n()).done;){var l=r.value,i=U.findMaxChildDepth(l.children,t+1);n=Math.max(n,i)}}catch(e){a.e(e)}finally{a.f()}return n},findTargetNode:function(e,t){var r,n;if(!e||0===e.length)return null;var a,l=P(e);try{for(l.s();!(a=l.n()).done;){var i=a.value;if((null===(n=null===(r=i.data)||void 0===r?void 0:r.id)||void 0===n?void 0:n.toString())===t.toString())return i;var o=U.findTargetNode(i.children,t);if(null!==o)return o}}catch(e){l.e(e)}finally{l.f()}return null},isMaxDepth:function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:7,a=U.findTargetNode(e,t);return U.findMaxChildDepth(a.children)+U.findDepth(e,r)>=n}},B=r(63946),M={tree:"ZYvBT",text:"eVGWe",chevron:"v76mu",disabled:"wIrTq",root:"JDRq_",selected:"wT87N",actions:"fKJU4",node:"gOBrH",noActions:"fKmrr"};function Q(e){var t;function r(){var t="".concat(M.text," clamp-4");return e.className&&(t+=" ".concat(e.className)),t}if(e.isDisabled){var n="string"==typeof e.disabledTooltip?e.disabledTooltip:null===(t=e.disabledTooltip)||void 0===t?void 0:t.call(e,e.tree);return a().createElement(B.u,{title:n,spanHack:!0,spanHackClassName:"d-inline-block flex-grow-1"},a().createElement("span",{className:"".concat(r()," text-muted ").concat(M.disabled)},e.text))}return a().createElement("div",{className:r()},e.text)}function H(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var G="tree-actions";function Y(e){var t,r,a,l=e.tree,i=e.selectedIds,o=e.getAppLink,c=e.onSelect,s=e.isDisabled,u=e.isClickDisabled,d=e.actions,m=e.isDropdown,f=n.useRef(null),v=n.useMemo((function(){return null==i?void 0:i.some((function(e){return U.find(l,e)}))}),[l,i]),p=e.openDepth&&e.depth<e.openDepth,b=(r=n.useState(v||p),a=2,function(e){if(Array.isArray(e))return e}(r)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,l,i,o=[],c=!0,s=!1;try{if(l=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=l.call(r)).done)&&(o.push(n.value),o.length!==t);c=!0);}catch(e){s=!0,a=e}finally{try{if(!c&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(s)throw a}}return o}}(r,a)||function(e,t){if(e){if("string"==typeof e)return H(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?H(e,t):void 0}}(r,a)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),y=b[0],h=b[1],g=null==i?void 0:i.some((function(e){return I.m.isEqual(l.id,e)})),N=!!l.children&&!!l.children.length;function S(){(null==u?void 0:u(l))||(e.multiSelect||h(!y),o?E.Q.C$.trigger(o(l)):(null==s?void 0:s(l))?c(null):null==c||c(l))}return e.maxDisplayDepth&&N&&(N=e.depth<e.maxDisplayDepth),n.useEffect((function(){if(f.current&&m){var e=function(e){e.stopPropagation(),S()};return f.current.addEventListener("click",e),function(){f.current&&f.current.removeEventListener("click",e)}}}),[f.current,c]),n.useEffect((function(){var t;e.multiSelect||y&&(v||g||!(null===(t=e.selectedIds)||void 0===t?void 0:t.length)&&(null==s?void 0:s(e.tree))||p||h(!1))}),[i]),e.maxDisplayDepth&&e.depth>e.maxDisplayDepth?n.createElement(n.Fragment,null):n.createElement("li",{className:"position-relative ".concat(y?"":M.collapsed," ").concat(e.isRoot?M.root:"")},n.createElement("div",{className:"position-relative"},n.createElement(T.L,{className:(t="py-1 d-flex align-items-center w-100 position-relative ".concat(M.node),g&&(t+=" "+e.selectedLinkClassName),(null==d?void 0:d.length)||(t+=" "+M.noActions),v&&e.multiSelect&&(t+=" text-underline fst-italic"),t),onClick:m?null:S,ref:f},N&&n.createElement("div",{className:M.chevron,onClick:function(t){t.stopPropagation(),e.multiSelect?h(!y):S()}},n.createElement(A,{direction:y?"down":"right"})),n.createElement(Q,{tree:l,text:l.name||l.description,isDisabled:(null==s?void 0:s(l))||(null==u?void 0:u(l)),disabledTooltip:e.disabledTooltip})),!!e.actions&&n.createElement(L.e,{className:M.actions,actions:null==d?void 0:d.map((function(e){return Object.assign(Object.assign({},e),{appLink:e.getAppLink(l)})})),actionsDropdownClassName:"btn btn-light ".concat(G," py-0")}),y&&n.createElement(K,Object.assign({key:l.id},e,{isChild:!0,depth:e.depth+1}))))}Y.defaultProps={selectedLinkClassName:M.selected};var X=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(n=Object.getOwnPropertySymbols(e);a<n.length;a++)t.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]])}return r};function K(e){var t=e.tree,r=X(e,["tree"]);return t&&t.children?n.createElement("ul",{className:"m-0 p-0 list-unstyled ".concat(M.tree)},t.children.map((function(t,a){return n.createElement(Y,Object.assign({key:a,tree:t},r,{isRoot:!e.isChild,depth:e.depth||0}))}))):n.createElement(n.Fragment,null)}var J=r(21974),$=r(264),z=r(39123),W={selectButton:"Jh8Ep",createNew:"hnfdj"},Z="libraryRequests.destinationForm",ee=(0,x.Ry)().shape({library:(0,x.Ry)().required(),folder:(0,x.Ry)().required()});function te(e){var t,r,n,l,i,o,c,u=(0,R.b)();(0,z.g)((function(e,t){var r=e.find((function(e){return e.id.toString()===u.values.library.id.toString()}));if(r){u.setFieldValue("library",r,!0);var n=U.find(r,t.id);n&&u.setFieldValue("folder",n,!0)}}));var d=e.libraryRequest.sender&&"".concat(e.libraryRequest.sender.name," ").concat(e.libraryRequest.sender.surname),m="";return(null===(t=e.libraryRequest.senderCustomer)||void 0===t?void 0:t.id.toString())!==e.currentUser.get("customerId").toString()&&(m=null===(r=e.libraryRequest.senderCustomer)||void 0===r?void 0:r.name),a().createElement("div",{className:"bg-white rounded p-3 mb-3"},a().createElement(O.l0,null,a().createElement("div",{className:"row"},a().createElement("div",{className:"col-9"},!!d&&a().createElement("div",{className:"row mb-3"},a().createElement("div",{className:"col-3"},a().createElement("label",null,a().createElement(s.x,{namespace:Z,phrase:"requestedBy"}))),a().createElement("div",{className:"col-9"},a().createElement(a().Fragment,null,d,!!m&&a().createElement(a().Fragment,null," (",m,")")))),a().createElement("div",{className:"row mb-3"},a().createElement("div",{className:"col-3"},a().createElement("label",null,a().createElement(s.x,{namespace:Z,phrase:"videoSource"}))),a().createElement("div",{className:"col-9"},!!e.libraryRequest.sourceLibrary&&a().createElement("span",{className:"badge p-1 me-1 text-white ".concat(J.u.mapSourceToClass(e.libraryRequest.sourceLibrary.type))},J.u.mapSourceToDisplayName(e.libraryRequest.sourceLibrary,$.g.hasLite)),!!e.libraryRequest.sourceCategory&&a().createElement("span",{className:"ms-2"},e.libraryRequest.sourceCategory.name))),a().createElement("div",{className:"row mb-3"},a().createElement("div",{className:"col-3"},a().createElement("label",null,a().createElement(s.x,{namespace:Z,phrase:"addTo"}))),a().createElement("div",{className:"col-9"},e.libraries.length>1&&a().createElement("div",{className:"dropdown mb-2"},a().createElement("button",{className:"dropdown-toggle form-control text-start position-relative ".concat(W.selectButton),type:"button",id:"select-library","data-bs-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false"},a().createElement("div",{className:"text-truncate"},null!==(l=null===(n=u.values.library)||void 0===n?void 0:n.name)&&void 0!==l?l:a().createElement(s.x,{namespace:Z,phrase:"selectALibrary"}))),a().createElement("div",{className:"dropdown-menu w-100","aria-labelledby":"select-library"},e.libraries.map((function(e,t){var r,n,l=e.id.toString()===(null===(n=null===(r=u.values.library)||void 0===r?void 0:r.id)||void 0===n?void 0:n.toString());return a().createElement("div",{className:"dropdown-item cursor-pointer ".concat(l?"active":""),key:t,onClick:function(){u.setFieldValue("library",e,!0),u.setFieldValue("folder",null,!0)}},e.name)})))),a().createElement("div",{className:"dropdown mb-2"},a().createElement("button",{className:"dropdown-toggle form-control text-start position-relative ".concat(W.selectButton),type:"button",id:"select-folder","data-bs-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false",disabled:!u.values.library},a().createElement("div",{className:"text-truncate"},null!==(o=u.values.library&&(null===(i=u.values.folder)||void 0===i?void 0:i.name))&&void 0!==o?o:a().createElement(s.x,{namespace:Z,phrase:"selectAFolder"}))),a().createElement("div",{className:"dropdown-menu w-100","aria-labelledby":"select-folder"},a().createElement(w.ZP,{autoHeight:!0,autoHeightMax:300,hideTracksWhenNotNeeded:!0},a().createElement(K,{tree:u.values.library,onSelect:function(e){return u.setFieldValue("folder",e,!0)},selectedIds:(null===(c=u.values.folder)||void 0===c?void 0:c.id)?[u.values.folder.id]:void 0,selectedLinkClassName:"bg-light fw-semibold",isDropdown:!0}),u.values.library&&a().createElement(q.F,{className:"btn fw-bold rounded-0 w-100 text-start ".concat(W.createNew),appLink:{application:p.OV.LIBRARY_REQUESTS,action:p.eX.Shared.NEW_FOLDER,args:[u.values.library.id]}},a().createElement(s.x,{namespace:Z,phrase:"createNew"})))))))),a().createElement("div",{className:"col-3"},a().createElement("div",{className:"d-flex justify-content-end"},a().createElement("button",{type:"button",className:"btn btn-link",onClick:e.onReject},a().createElement(s.x,{namespace:Z,phrase:"reject"})),a().createElement("button",{type:"submit",className:"btn btn-dark",disabled:!u.isValid},a().createElement(s.x,{namespace:Z,phrase:"approve"})))))))}function re(e){function t(t,r){var n,a,l,i,o,c,s={location:S.LZ.LibraryRequestDetails,actionType:t,entity:S.py.LibraryRequest,workflowPhase:S.eu.Start},u={id:e.libraryRequest.id,videoId:null===(n=e.libraryRequest.object)||void 0===n?void 0:n.id,requestingUserId:null===(a=e.libraryRequest.sender)||void 0===a?void 0:a.id,sourceLibraryId:null===(l=e.libraryRequest.sourceLibrary)||void 0===l?void 0:l.id,sourceFolderId:null===(i=e.libraryRequest.sourceCategory)||void 0===i?void 0:i.id,destinationLibraryId:null===(o=null==r?void 0:r.library)||void 0===o?void 0:o.id,destinationFolderId:null===(c=null==r?void 0:r.folder)||void 0===c?void 0:c.id};N.k.logUserAction(u,s)}return a().createElement(R.n,{initialValues:{library:e.libraries.find((function(t){var r;return t.id.toString()===(null===(r=e.libraryRequest.destinationLibrary)||void 0===r?void 0:r.id.toString())})),folder:e.libraryRequest.destinationCategory},validationSchema:ee,onSubmit:function(r){t(S.Vw.Approve,r),E.Q.C$.trigger({application:p.OV.LIBRARY_REQUESTS,action:p.eX.LibraryRequests.APPROVE,args:[e.libraryRequest.id],params:{libraryId:r.library.id,folderId:r.folder.id,queryParams:e.queryParams}})},validateOnMount:!0,enableReinitialize:!1},a().createElement(te,{libraries:e.libraries,libraryRequest:e.libraryRequest,onReject:function(){t(S.Vw.Reject),E.Q.C$.trigger({application:p.OV.LIBRARY_REQUESTS,action:p.eX.LibraryRequests.REJECT,args:[e.libraryRequest.id],params:e.queryParams})},currentUser:e.user}))}function ne(){return a().createElement("div",{className:"bg-white rounded p-3 mb-3"},a().createElement("div",{className:"row"},a().createElement("div",{className:"col-3"},a().createElement("div",{className:"partial-loading-background",style:{height:"1.25rem",width:"6rem"}})),a().createElement("div",{className:"col-6"},a().createElement("div",{className:"partial-loading-background",style:{height:"1.25rem",width:"9rem"}})),a().createElement("div",{className:"col-3 d-flex justify-content-end align-items-center"},a().createElement("div",{className:"partial-loading-background rounded",style:{height:"1.25rem",width:"3rem"}}),a().createElement("div",{className:"partial-loading-background rounded ms-2",style:{height:"2.5rem",width:"5rem"}})),a().createElement("div",{className:"col-3"},a().createElement("div",{className:"partial-loading-background",style:{height:"1.25rem",width:"7rem"}})),a().createElement("div",{className:"col-6 mb-2"},a().createElement("div",{className:"partial-loading-background rounded mb-1",style:{height:"2.5rem"}}),a().createElement("div",{className:"partial-loading-background rounded",style:{height:"2.5rem"}}))))}var ae,le,ie={HIGH:.75,MODERATE:.5},oe={circleContainer:"p8Vgz",backgroundCircle:"asGGE",circleSuccess:"PXLNj",circleWarning:"ZckRN",circleDanger:"slBRg",lgCircleContainer:"N8KCI",pendingCircle:"DKrcq",centredPercentageText:"tpmLR"},ce=2,se=5.8,ue=.2,de=.36;function me(e){var t=e===ae.Large?se:ce,r=e===ae.Large?de:ue;return"".concat(t/2-2*r,"rem")}function fe(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ie;return e>=t.HIGH?oe.circleSuccess:e>=t.MODERATE?oe.circleWarning:oe.circleDanger}function ve(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ie;return e>=t.HIGH?"text-success":e>=t.MODERATE?"text-warning":"text-danger"}function pe(e,t){var r="d-inline-block ".concat(oe.circleContainer);return e===ae.Large&&(r+=" ".concat(oe.lgCircleContainer)),be(t)&&(r+=" ".concat(oe.pendingCircle)),r}function be(e){return"number"!=typeof e}function ye(e){var t=a().useCallback((function(t){if(t){var r=t.r.baseVal.value,n=2*Math.PI*r,a=n-e.percentage*n;t.style.strokeDasharray="".concat(n," ").concat(n),t.style.strokeDashoffset=a.toString()}}),[]);return a().createElement("svg",null,a().createElement("circle",{r:me(e.size),className:oe.backgroundCircle}),!be(e.percentage)&&a().createElement("circle",{ref:t,r:me(e.size),className:fe(e.percentage,e.scoreThresholds)}))}function he(e){var t,r,n=function(e){if(!be(e))return+e.toFixed(2)}(e.percentage),l=e.layout===le.LabelInside?ae.Large:ae.Small,i=e.customLabel||(be(r=n)?"--%":"".concat(Math.round(100*r),"%"));return e.layout===le.LabelOnly?a().createElement("span",{className:ve(n)},i):a().createElement("div",{className:"d-flex align-items-center justify-content-between ".concat(null!==(t=e.className)&&void 0!==t?t:"")},e.layout===le.LabelBefore&&a().createElement("span",{className:"me-2"},i),a().createElement("div",{className:pe(l,n)},a().createElement(ye,{percentage:n,size:l,scoreThresholds:e.scoreThresholds}),e.layout===le.LabelInside&&a().createElement("span",{className:oe.centredPercentageText},i)))}!function(e){e.Small="small",e.Large="large"}(ae||(ae={})),function(e){e.CircleOnly="circle_only",e.LabelOnly="label_only",e.LabelBefore="label_before",e.LabelInside="label_inside"}(le||(le={})),he.defaultProps={layout:le.CircleOnly};var ge="libraryRequests.count";function Ee(e){return a().createElement("div",{className:"bg-white rounded px-3 py-2 mb-3 d-flex align-items-center"},a().createElement(he,null),a().createElement("div",{className:"ps-2"},a().createElement(s.x,{namespace:ge,phrase:"count",options:{smartCount:e.count.count}})))}var Ne=r(30664),Se=r(49824),Re=r(1015),we=r(7044),Oe=r(17950),xe=r(9416),qe=r(50072),Ie=r(25796),Le=r(41026),Ce=r(59198),ke=r(85739),je=r(30328),Ae=r(64429),Te=r(41777),Pe=r(56154),De="libraryRequests.pendingRequestsEmptyState",Fe=l.T.encloseNamespace(De);function Ve(e){return a().createElement("div",{className:"bg-white rounded p-3 py-5"},a().createElement(Te.u,null,a().createElement(Te.u.Image,{src:Pe.W.EmptyStates.PENDING_REQUESTS}),a().createElement(Te.u.Info,{className:"mb-1"},a().createElement(s.x,{namespace:De,phrase:"info"})),e.hasLibraries&&a().createElement(Te.u.Cta,{text:Fe("cta"),className:"btn btn-link text-info",appLink:{application:p.OV.LIBRARY_REQUESTS,action:p.eX.LibraryRequests.LIBRARY_REQUEST_SETTINGS_LIBRARIES}})))}function _e(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,l,i,o=[],c=!0,s=!1;try{if(l=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=l.call(r)).done)&&(o.push(n.value),o.length!==t);c=!0);}catch(e){s=!0,a=e}finally{try{if(!c&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(s)throw a}}return o}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Ue(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?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 r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var Be="libraryRequests.pendingRequests",Me=l.T.encloseNamespace(Be);function Qe(e){var t,r,n=i.a.useGetFetch(),l=(0,m.Z)(),E=(0,ke.p)(e.queryParams.sort||u.D.Newest,[qe.l.Pending]),N=i.a.useBasicFetch(e.id&&Ie.y.libraryRequest(e.id)),S=(0,Ce.s)(e.id),R=i.a.useBasicFetch(Ie.y.pendingRequestsCount()),w=_e(a().useState(null),2),O=w[0],x=w[1];(0,o.i)(g.T.getLibrariesFetchOptions((function(e){return x(e.toJSON())})),[]),(0,z.g)(x);var q=_e(a().useState(null),2),I=q[0],L=q[1];(0,o.i)(y.p.getConfigFetchOptions(L),[]);var C=_e(a().useState(null),2),k=C[0],j=C[1];(0,o.i)(h.K.getCurrentUserFetchOptions(j),[]);var A=i.a.useBasicFetch(d.N.currentUser());(0,f.v)(N),(0,je.A)({id:e.id,requests:E.items,appLink:{application:p.OV.LIBRARY_REQUESTS,action:p.eX.LibraryRequests.PENDING_REQUESTS,params:e.queryParams}}),(0,Ae.m)(N.data,"pending",e.queryParams),(0,Le.K)(N.data);var T=((null===(t=E.items)||void 0===t?void 0:t.length)||E.hasCompleted)&&O&&I&&A.data,P=N.data&&S.hasCompleted;return console.log(O),a().createElement("div",null,a().createElement("h1",{className:"h2"},a().createElement(s.x,{namespace:Be,phrase:"title"})),a().createElement("div",{className:"mb-3"},a().createElement(c.Oo,{breadcrumbs:[{name:Me("libraryEditor"),appLink:{application:p.OV.LIBRARY_EDITOR,action:p.eX.LibraryEditor.HOME}},{name:Me("title"),active:!0}]})),a().createElement(xe.A,{active:"pending"}),!T||(null===(r=E.items)||void 0===r?void 0:r.length)?a().createElement(a().Fragment,null,a().createElement("div",{className:"d-flex justify-content-end mb-3"},a().createElement(Oe.F,{appLink:{application:p.OV.LIBRARY_REQUESTS,action:p.eX.LibraryRequests.PENDING_REQUESTS,args:[e.id]},queryParams:e.queryParams})),a().createElement("div",{className:"row"},a().createElement("div",{className:"col-4"},T?a().createElement(a().Fragment,null,a().createElement(Ee,{count:R.data}),a().createElement(Re.q,{libraryRequests:E.items,selectedId:e.id,appLink:{application:p.OV.LIBRARY_REQUESTS,action:p.eX.LibraryRequests.PENDING_REQUESTS},queryParams:e.queryParams,fetchNext:E.fetchNext,isFetching:E.isFetching,nextCursor:E.nextCursor})):a().createElement(we.p,null)),a().createElement("div",{className:"col-8"},T&&P?a().createElement(a().Fragment,null,a().createElement(re,{key:N.data.id,libraryRequest:N.data,libraries:O,queryParams:e.queryParams,user:k}),a().createElement(Ne.x,{libraryRequest:N.data,config:I,user:k,currentUser:A.data,createViewKey:function(t,r){var a=Ie.y.createViewKey(e.id,(function(e){return r(new b.y(e))}),(function(e){return l.error(v.M.libraryApiError(e))}));n(a)},comments:S.items})):a().createElement(a().Fragment,null,a().createElement(ne,null),a().createElement(Se.j,null))))):a().createElement(Ve,{hasLibraries:!!O.length}))}}}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[5418],{77739:function(e,t,n){"use strict";n.d(t,{r:function(){return h}});var r=n(31647),o=n(10101),i=n(20072),l=n(93569),a=n(11653),u=n(14538),c=n.n(u);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 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,p(r.key),r)}}function p(e){var t=function(e,t){if("object"!=s(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=s(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==s(t)?t:String(t)}function d(e,t,n){return t=y(t),function(e,t){if(t&&("object"===s(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,b()?Reflect.construct(t,n||[],y(e).constructor):t.apply(e,n))}function b(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(b=function(){return!!e})()}function y(e){return y=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},y(e)}function m(e,t){return m=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},m(e,t)}var h=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),d(this,t,[e])}var n,r;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&m(e,t)}(t,e),n=t,(r=[{key:"initialize",value:function(){this.bindListeners()}},{key:"bindListeners",value:function(){this.listenTo(this.options.channelName,"folder:selected",this.onFolderSelected)}},{key:"name",get:function(){return"FolderDetailsComponent"}},{key:"template",get:function(){return c()}},{key:"lang",get:function(){return"libraryEditor.folderDetails"}},{key:"folderTreeKey",get:function(){return this.options.folderTreeKey||"folderselect:".concat(this.cid)}},{key:"regions",value:function(){return{parentFolder:".parent-folder-region"}}},{key:"behaviors",get:function(){return[{behaviorClass:o.fS,modelValidation:(0,a.h)({validateName:this.options.editName,validateParent:this.options.editParent,folder:this.options.model,collection:this.options.collection})},{behaviorClass:o.Bp}]}},{key:"bindings",get:function(){return{"[name=name]":{observe:"name",setOptions:{validate:!0}}}}},{key:"onFolderSelected",value:function(e,t){e&&(l.PU.setSelected(this.folderTreeKey,e,this.collection,t),t||this.model.set("parentId",e.get("id"),{validate:!0}))}},{key:"renderSubFolders",value:function(){this.options.editParent&&this.showChildView("parentFolder",new i.Y({collection:this.collection,channelName:this.options.channelName,folderTreeKey:this.folderTreeKey,disabledIds:this.options.disabledParentFolderIds}))}},{key:"viewOptions",value:function(){return{editName:this.options.editName,editParent:this.options.editParent}}},{key:"onRender",value:function(){this.renderSubFolders()}}])&&f(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),t}(r.Q.wA)},11653:function(e,t,n){"use strict";n.d(t,{h:function(){return s}});var r=n(39479),o=n(57857),i=n(54008),l=n(22557),a="libraryEditor.utils",u={name:[{required:!0,msg:function(){return o.T.getPhrase(a,"folderNameRequired")}},{maxLength:255,msg:function(){return o.T.getPhrase(a,"folderNameExceeds")}}]},c=function(e,t){return{parentId:function(n){return n?l.P.calculateDestinationFolderDepth(e,n,t)>i.p.MAX_FOLDER_DEPTH?o.T.getPhrase(a,"maxFolderDepth",{maxDepth:i.p.MAX_FOLDER_DEPTH}):"":o.T.getPhrase(a,"selectParentFolder")}}},s=function(e){var t=e.validateName,n=e.validateParent,o=e.folder,i=e.collection;return t&&n?r.extend({},u,c(o,i)):t?u:n?c(o,i):void 0}},20072:function(e,t,n){"use strict";n.d(t,{Y:function(){return v}});var r=n(48088),o=n(57857),i=n(31647),l=n(50299),a=n(93569),u=n(68979),c=n.n(u),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,d(r.key),r)}}function d(e){var t=function(e,t){if("object"!=f(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=f(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==f(t)?t:String(t)}function b(e,t,n){return t=m(t),function(e,t){if(t&&("object"===f(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,y()?Reflect.construct(t,n||[],m(e).constructor):t.apply(e,n))}function y(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(y=function(){return!!e})()}function m(e){return m=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},m(e)}function h(e,t){return h=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},h(e,t)}var v=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),b(this,t,[e])}var n,i;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&h(e,t)}(t,e),n=t,(i=[{key:"initialize",value:function(){this.listenTo(this.options.channelName,"folder:selected new:folder:selected",this.setButtonText),this.listenTo(this.options.channelName,"re:render:selector",this.renderSelector),this.disabledIds=this.options.disabledIds&&this.options.disabledIds.reduce((function(e,t){return Object.assign(Object.assign({},e),function(e,t,n){return(t=d(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 c()}},{key:"className",get:function(){return"position-relative"}},{key:"lang",get:function(){return"libraryEditor.treeDropdown"}},{key:"regions",value:function(){return{selector:{el:".selector-region",replaceElement:!1}}}},{key:"events",value:function(){return{"click .create-new":"onClickCreateNew"}}},{key:"defaults",get:function(){return{disabledIds:[]}}},{key:"elements",get:function(){return{button:".button-text"}}},{key:"onClickCreateNew",value:function(e){e.preventDefault(),r.Radio.channel(this.options.channelName).trigger("create:folder:clicked")}},{key:"setButtonText",value:function(e,t){if(e&&!t){var n=e.get("name");this.getUI("button").text(n)}else{var r=a.PU.getSelected(this.options.folderTreeKey,this.collection),i=r?r.get("name"):o.T.getPhrase(this.lang,"button");this.getUI("button").text(i)}}},{key:"renderSelector",value:function(){this.showChildView("selector",new l.J({styles:s,collection:this.collection,channelName:this.options.channelName,childrenProperty:"children",folderTreeId:this.options.folderTreeKey,extraClass:s.list,isSelector:!0,disabledIds:this.disabledIds||{}}))}},{key:"viewOptions",value:function(){return{styles:s,name:this.options.name||this.options.channelName,buttonText:this.buttonText,canCreateNew:this.options.canCreateNew,dropdown:this.options.dropdown}}},{key:"onRender",value:function(){this.setButtonText(),this.renderSelector()}}])&&p(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),t}(i.Q.wA)},67670:function(e,t,n){"use strict";n.d(t,{v:function(){return d}});var r=n(31647),o=n(88172);function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function l(e,t,n){return(t=u(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,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,u(r.key),r)}}function u(e){var t=function(e,t){if("object"!=i(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=i(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==i(t)?t:String(t)}function c(e,t,n){return t=f(t),function(e,t){if(t&&("object"===i(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,s()?Reflect.construct(t,n||[],f(e).constructor):t.apply(e,n))}function s(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(s=function(){return!!e})()}function f(e){return f=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},f(e)}function p(e,t){return p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},p(e,t)}var d=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),c(this,t,arguments)}var n,r;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&p(e,t)}(t,e),n=t,(r=[{key:"defaults",value:function(){return l(l({},o.ZV.Disabled,!0),o.ZV.Hidden,!1)}}])&&a(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),t}(r.Q.Hn)},14538: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=null!=t?t:e.nullContext||{},l=e.hooks.helperMissing,a=e.escapeExpression;return' <div class="form-group">\n <label for="name" class="control-label">'+a((n.lang||t&&t.lang||l).call(i,"name",{name:"lang",hash:{},data:o}))+'</label>\n <input name="name" id="name" type="text" class="form-control" placeholder="'+a((n.lang||t&&t.lang||l).call(i,"namePlaceholder",{name:"lang",hash:{},data:o}))+'" autocomplete="off" autofocus/>\n <div class="form-feedback"></div>\n </div>\n'},3:function(e,t,n,r,o){return e.propertyIsEnumerable,' <div class="form-group pt-2">\n <label for="parentId" class="control-label">'+e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"parent",{name:"lang",hash:{},data:o}))+'</label>\n <div class="parent-folder-region"></div>\n </div>\n'},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){e.propertyIsEnumerable;var i,l=null!=t?t:e.nullContext||{};return"<form>\n"+(null!=(i=n.if.call(l,null!=(i=null!=t?t.options:t)?i.editName:i,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o}))?i:"")+(null!=(i=n.if.call(l,null!=(i=null!=t?t.options:t)?i.editParent:i,{name:"if",hash:{},fn:e.program(3,o,0),inverse:e.noop,data:o}))?i:"")+"</form>"},useData:!0})},68979:function(e,t,n){var r=n(32227);e.exports=(r.default||r).template({1:function(e,t,n,r,o){e.propertyIsEnumerable;var i,l=e.lambda,a=e.escapeExpression;return' <button\n class="'+a(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.selectBtn:i,t))+' form-select form-control"\n data-bs-toggle="dropdown"\n aria-haspopup="true"\n aria-expanded="false"\n name='+a(l(null!=(i=null!=t?t.options:t)?i.name:i,t))+'\n >\n <span class="d-block text-truncate button-text">\n '+a(l(null!=(i=null!=t?t.options:t)?i.buttonText:i,t))+'\n </span>\n </button>\n<div class="dropdown-menu '+a(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.selector:i,t))+'">\n'},3:function(e,t,n,r,o){return"border rounded-3"},5:function(e,t,n,r,o){e.propertyIsEnumerable;var i,l=e.escapeExpression;return' <button class="create-new btn fw-bold rounded-0 rounded-bottom-lg w-100 text-start '+l(e.lambda(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.customItem:i,t))+'">'+l((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"createNew",{name:"lang",hash:{},data:o}))+"</button>\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){e.propertyIsEnumerable;var i,l=null!=t?t:e.nullContext||{};return(null!=(i=n.if.call(l,null!=(i=null!=t?t.options:t)?i.dropdown:i,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o}))?i:"")+'<div class="'+(null!=(i=n.unless.call(l,null!=(i=null!=t?t.options:t)?i.dropdown:i,{name:"unless",hash:{},fn:e.program(3,o,0),inverse:e.noop,data:o}))?i:"")+' overflow-auto" name='+e.escapeExpression(e.lambda(null!=(i=null!=t?t.options:t)?i.name:i,t))+'>\n <div class="selector-region"></div>\n'+(null!=(i=n.if.call(l,null!=(i=null!=t?t.options:t)?i.canCreateNew:i,{name:"if",hash:{},fn:e.program(5,o,0),inverse:e.noop,data:o}))?i:"")+'</div>\n<div class="form-feedback"></div>'},useData:!0})}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[5698],{54096:function(e,t,n){n.d(t,{G:function(){return a}});var r=n(1024),i=n(21679);function a(e){var t,n;return t=e,n=i.u.getInstance(t),r.useEffect((function(){return function(){i.u.releaseInstance(t)}})),n}},38182:function(e,t,n){n.d(t,{q:function(){return s}});var r=n(1024),i=n.n(r),a=n(68003),o=n(88483),c=n(87013),u={avatar:"Gvwzj",dot:"JJHBJ"};function s(e){var t,n,r=e.imageUrl||(t=e.imageCdnUrl,(n=e.initials)?c.j.createUrl(a._.safeUrlConcat(t,"/v1/profile-images?initials=".concat(n)),{size:o.h2.Small}):"");return i().createElement("div",{className:"position-relative h-100 w-100"},i().createElement("div",{className:"".concat(u.avatar," ").concat((null==e?void 0:e.extraClasses)||""),style:{backgroundImage:"url('".concat(r,"')")}}," "),e.showDot&&i().createElement("div",{className:"".concat(u.dot," rounded-circle bg-danger")}))}},45458:function(e,t,n){n.d(t,{C:function(){return m},g:function(){return r}});var r,i=n(1024),a=n(57857),o=n(39396),c=n(63946),u=n(50028),s=n(27866),d=n(45428),l=n(63791),v=n(21974),p=n(7121),f=a.T.encloseNamespace("shared.badges");function m(e){var t=e.type,n=e.data;if(!function(e,t){var n,i,a;return"boolean"==typeof t?!!t:e===r.Rating?t&&!!t.value:e===r.Resources?!!(null==t?void 0:t.length)||!!(null===(n=null==t?void 0:t.data)||void 0===n?void 0:n.length):e===r.Interactive?!!(null==t?void 0:t.length)||!!(null===(i=null==t?void 0:t.data)||void 0===i?void 0:i.length):e===r.Captions?!!(null==t?void 0:t.length)||!!(null===(a=null==t?void 0:t.data)||void 0===a?void 0:a.length):e===r.Status?"number"==typeof t:!!t}(t,n))return i.createElement(i.Fragment,null);var a=function(e,t){var n="";if(e===r.DurationApproximate&&(n="duration-badge-new px-2 rounded-pill text-nowrap d-flex align-items-center"),e===r.DurationExact&&(n="duration-badge"),e===r.Interactive&&(n="interactive-badge"),e===r.Rating&&(n="rating-badge ".concat(v.u.mapRatingToClass(t.value))),e===r.ProductionYear&&(n="production-year-badge"),e===r.Resources&&(n="resources-badge"),e===r.Captions)return"p-0";if(e===r.Status)return"badge ".concat(function(e){switch(e){case u.X.Published:return"bg-success";case u.X.Archived:case u.X.Rejected:return"bg-danger";case u.X.Draft:return"draft-badge px-2 rounded-pill text-nowrap d-flex align-items-center";case u.X.Pending:case u.X.Processing:return"bg-warning"}}(t));if(e===r.Trending)return"trending-badge px-2 d-flex align-items-center";if(e===r.Count&&(n="count-badge px-1 rounded"),e===r.Restriction){var i=d.l.mapRestrictionToClass(t.restrictions);return"restriction-badge rounded-pill px-2 d-flex align-items-center ".concat(i)}return e===r.Source&&(n=function(e){switch(e){case"streamable":return"px-1 text-nowrap d-flex align-items-center ".concat(p.Z.streamable);case"exchange":return"bg-orange text-white px-1 text-nowrap d-flex align-items-center";default:return""}}(t)),"".concat("badge"," ").concat(n)}(t,n);a="".concat(a," ").concat(e.inline?"d-inline-block":"d-flex justify-content-center"," ").concat(e.className||"");var m=function(e,t){return e===r.Interactive?f("interactive"):e===r.DurationApproximate?s.T.ToDisplayDurationNewStyle(t):e===r.DurationExact?s.T.ToDisplayDuration(t):e===r.Rating?t.code:e===r.ProductionYear?t:e===r.Resources?f("resources"):e===r.Captions?i.createElement(o.x,{svgName:l.vn.CloseCaptionBadge}):e===r.Status?u.X[t]:e===r.Trending?i.createElement(i.Fragment,null,i.createElement(o.x,{svgName:l.vn.Trending}),i.createElement("span",{className:"ps-1"},t)):e===r.Count?t:e===r.Restriction?i.createElement(i.Fragment,null,i.createElement(o.x,{svgName:d.l.mapRestrictionToSvg(t.restrictions)}),i.createElement("span",null,d.l.mapRestrictionToText(t.restrictions,t.yearGroups))):e===r.Source?t:void 0}(t,n),g=function(e,t){return e===r.Rating?{title:t.name,placement:"top"}:null}(t,n),y=e.inline&&"d-inline-block";return g?i.createElement("div",{className:"badge-wrapper d-inline"},i.createElement(c.u,Object.assign({},g,{spanHack:!0,spanHackClassName:y}),i.createElement("span",{className:a},m))):i.createElement("span",{className:"".concat(a," badge-wrapper")},m)}!function(e){e.DurationExact="duration-exact",e.DurationApproximate="duration-approximate",e.Interactive="interactive",e.Rating="rating",e.ProductionYear="production-year",e.Resources="resources",e.Captions="captions",e.Status="status",e.Trending="trending",e.Count="count",e.Restriction="restriction",e.Source="source"}(r||(r={}))},44550:function(e,t,n){n.d(t,{c:function(){return a}});var r=n(1024),i=n(7121);function a(e){var t="d-flex align-items-center badge-list ".concat(i.Z.minHeight);return e.className&&(t+=" ".concat(e.className)),r.createElement("div",{className:t},e.children)}},90547:function(e,t,n){var r;n.d(t,{r:function(){return r}}),function(e){e.XS="(max-width: 575px)",e.SM="(min-width: 576px) and (max-width: 767px)",e.MD="(min-width: 768px) and (max-width: 991px)",e.LG="(min-width: 992px)",e.XL="(min-width: 1200px)",e.XXL="(min-width: 1440px)",e.SMDown="(max-width: 576px)",e.MDDown="(max-width: 768px)",e.LGDown="(max-width: 992px)",e.XLDown="(max-width: 1200px)"}(r||(r={}))},34254:function(e,t,n){var r;n.d(t,{r:function(){return r}}),function(e){e[e.FilterOut=0]="FilterOut",e[e.StripMetadata=1]="StripMetadata"}(r||(r={}))},86257:function(e,t,n){var r;n.d(t,{L:function(){return r}}),function(e){e.Pdf="pdf",e.Image="image",e.PowerPoint="powerpoint",e.Document="document",e.Excel="excel",e.Zip="archive",e.File="text"}(r||(r={}))},87648:function(e,t,n){var r;n.d(t,{c:function(){return r}}),function(e){e.Custom="custom",e.User="year_group"}(r||(r={}))},89603:function(e,t,n){var r,i;n.d(t,{Q:function(){return r}}),function(e){e.Normal="normal",e.Pedagogy="pedagogy",e.Hidden="hidden",e.Skill="skill",e.Curation="curation"}(r||(r={})),function(e){e[e.Normal=0]="Normal",e[e.Pedagogy=1]="Pedagogy",e[e.Hidden=2]="Hidden",e[e.Skill=3]="Skill",e[e.Curation=4]="Curation"}(i||(i={}))},90335:function(e,t,n){var r;n.d(t,{D:function(){return r}}),function(e){e.Newest="newest",e.Oldest="oldest",e.RecentlyAdded="recently_added",e.AtoZ="atoz",e.ZtoA="ztoa",e.Series="series"}(r||(r={}))},332:function(e,t,n){n.d(t,{e:function(){return c}});var r=n(2248),i=n(68003),a=n(84657),o=n(34254),c={clip:function(e,t){return{key:"clip:".concat(e,":").concat(t),url:i._.urlBuilder("{gateway}/v1/objects/".concat(e),{query:a.v.CLIP,permissionFilterOption:t})}},clipWithAllInteractives:function(e,t){return{key:"clip:".concat(e,":").concat(t,":interactives"),url:i._.urlBuilder("{gateway}/v1/objects/".concat(e),{query:"".concat(a.v.CLIP,",interactives{status:[0,1]}"),permissionFilterOption:t}),normalize:!1}},publicClip:function(e,t,n,r){return{key:"clip:".concat(e,":public:").concat(t),url:i._.urlBuilder("/api/objects/".concat(e),{query:"_parentVideo,_canBeConsumed,_thumbnail",permissionFilterOption:o.r.StripMetadata,shareId:t}),bootstrapName:"shared:object:".concat(e),success:n,error:r}},sharedClip:function(e,t,n,r){return{key:"shared:clip:".concat(e),url:i._.urlBuilder("/api/objects/".concat(e),{shareId:t,query:a.v.CLIP}),success:n,error:r}},createClip:function(e,t,n,i,a){return{key:"create:clip",url:"{gateway}/v1/objects/".concat(e,"/clips"),data:t,type:r.k.POST,invalidationKeys:["videos:".concat(e),"my:videos"],success:n,error:i,always:a}},updateClip:function(e,t,n,i,a){return{key:"update:clip",url:"{gateway}/v1/objects/".concat(e),data:t,type:r.k.PUT,success:n,error:i,always:a}},deleteClip:function(e,t,n,i,a){return{key:"delete:clip",url:"{gateway}/v1/objects/".concat(e),type:r.k.DELETE,invalidationKeys:["videos:".concat(t),"my:videos","videos"],success:n,error:i,always:a}}}},91432:function(e,t,n){n.d(t,{b:function(){return c}});var r=n(2248),i=n(68003),a=n(84657),o=n(34254),c={interactiveMetadata:function(e,t){return{url:i._.urlBuilder("{gateway}/v1/objects/".concat(e),{query:a.v.INTERACTIVE,permissionFilterOption:t}),key:"interactive:metadata:".concat(e,":").concat(t)}},sharedInteractiveMetadata:function(e,t,n,r){return{url:i._.urlBuilder("/api/objects/".concat(e),{shareId:t,query:a.v.INTERACTIVE}),key:"shared:interactive:metadata:".concat(e),success:n,error:r}},publicInteractiveMetadata:function(e,t,n,r){return{url:i._.urlBuilder("/api/objects/".concat(e),{query:"_parentVideo[rating],_canBeConsumed,_thumbnail",permissionFilterOption:o.r.StripMetadata,shareId:t}),key:"interactive:metadata:".concat(e,":public:").concat(t),bootstrapName:"shared:object:".concat(e),success:n,error:r}},interactive:function(e){return{url:"/api/domain/v1/interactives/".concat(e),key:"interactive:".concat(e)}},createInteractive:function(e,t,n){return{url:"/api/domain/v1/interactives",key:"create:interactive",type:r.k.POST,invalidationKeys:["my:videos"],data:e,success:t,error:n}},createInteractiveMetadata:function(e,t,n,i){return{url:"{gateway}/v1/objects/".concat(e,"/interactives"),key:"create:interactive:metadata",type:r.k.POST,data:t,success:n,error:i}},updateInteractive:function(e,t,n,i){return{url:"/api/domain/v1/interactives/".concat(e),key:"update:interactive",type:r.k.PUT,data:t,success:n,error:i,formatData:function(){return t}}},updateInteractiveMetadata:function(e,t,n,i){return{url:"{gateway}/v1/objects/".concat(e),key:"update:interactive:metadata",type:r.k.PUT,data:t,success:n,error:i}},interactiveResultSet:function(e,t){return{url:"/api/domain/v1/analytics/interactives/".concat(e,"/metadata/").concat(t),key:"interactive:result:set:".concat(e,":").concat(t)}},copyInteractive:function(e,t,n){return{url:"/api/domain/v1/interactives/".concat(e,"/copy"),key:"copy:interactive",type:r.k.POST,invalidationKeys:["interactive:".concat(e),"my:videos"],success:t,error:n}},deleteInteractiveMetadata:function(e,t,n){return{url:"{gateway}/v1/objects/".concat(e),key:"delete:interactive",type:r.k.DELETE,invalidationKeys:["interactive:".concat(e),"my:videos","videos"],success:t,error:n}}}},77131:function(e,t,n){n.d(t,{R:function(){return m}});var r,i=n(2248),a=n(68003),o=n(84657),c=n(50028),u=n(74421),s=n(34254);!function(e){e.Series="series",e.Playlist="playlist",e.Widget="widget"}(r||(r={}));var d=n(15970),l=function(e,t){return a._.urlBuilder("/api/objects/".concat(e),{shareId:t,query:o.v.VIDEO})},v=function(e,t){return a._.urlBuilder("/api/objects/".concat(e),{query:"thumbnail,_canBeConsumed,series,season,rating",permissionFilterOption:s.r.StripMetadata,shareId:t})},p=function(e){return a._.urlBuilder("{gateway}/v1/objects",{"query.video":o.v.VIDEO_COLLECTION,"query.clip":o.v.CLIP_COLLECTION,"query.interactive":o.v.INTERACTIVE,id:e})},f=function(e){var t=e.videoId,n=e.context,i=e.collectionId,c=e.moviesAndTv,u={videoId:t,limit:25,query:o.v.VIDEO_COLLECTION};return n&&(n===r.Widget?u["context.widgetId"]=i:(u["context.collectionType"]=n,u["context.collectionId"]=i)),c&&(u["context.moviesAndTv"]=!0),a._.urlBuilder("{gateway}/v1/suggestions/related-videos",u)},m={video:function(e,t){return{url:a._.urlBuilder("{gateway}/v1/objects/".concat(e),{query:o.v.VIDEO,permissionFilterOption:t}),publicUrl:a._.urlBuilder("/api/objects/".concat(e),{query:o.t.VIDEO,permissionFilterOption: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),{_parentVideo:{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),{_parentVideo:{id:e.id}})}))),e}}},publicVideo:function(e,t,n,r){return{url:v(e,t),key:"videos:".concat(e,":public:").concat(t),bootstrapName:"shared:object:".concat(e),success:n,error:r}},sharedVideo:function(e,t,n,r){return{url:l(e,t),key:"shared:video:".concat(e),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),{_parentVideo:{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),{_parentVideo:{id:e.id}})}))),e},success:n,error:r}},myVideos:function(e,t){var n=o.v.VIDEO_COLLECTION,r=o.v.CLIP_COLLECTION,i=o.v.INTERACTIVE,d="videos[".concat(n,"]{libraries.typeid:").concat(u.E.WorkspaceCollection,"}"),l="clips[".concat(r,"]"),v="interactives[".concat(i,"]{status:[").concat(c.X.Published,",").concat(c.X.Draft,"]}"),p={query:"(".concat(d,"|").concat(l,"|").concat(v,"){orderbydesc:id}"),permissionFilterOption:s.r.StripMetadata};return t&&(p.cursor=t),{url:a._.urlBuilder("{gateway}/v1/objects/".concat(e,"/members"),p),key:"my:videos:".concat(t)}},videos:function(e,t){return{url:p(e),key:"videos:by:id:".concat(e.join(",")),success:t}},watchHistoryVideos:function(e,t){return{url:p(e),key:"watch:history:videos:by:id:".concat(e.join(",")),success:t}},updateVideo:function(e,t,n,r,a){return{key:"update:video:".concat(e),url:"{gateway}/v1/objects/".concat(e),type:i.k.PUT,data:t,success:n,error:r,always:a}},videoRatings:function(e,t){var n=e.map((function(e){return"id=".concat(e)}));if(n.length)return{url:"/api/domain/v2/objects?query=rating&".concat(n.join("&")),key:"video:ratings:by:id:".concat(e.join(",")),normalizeOptions:{namespace:t}}},getRestrictions:function(e){var t=e.slice().sort();return{url:"/api/domain/v1/restrictedobjects"+"?objectTypeId=".concat(u.E.Video).concat(t.map((function(e){return"&objectId=".concat(e)})).join("")),key:"restrictions:".concat(t.join(",")),normalizeOptions:{namespace:"domain",idAttribute:"objectId"}}},delete:function(e,t,n){return{url:"{gateway}/v1/objects/".concat(e),key:"delete:video:".concat(e),type:i.k.DELETE,success:t,error:n,invalidationKeys:["videos","search"]}},deleteBulk:function(e,t,n,r,a){var o=e.map((function(e){return"videoIds=".concat(e)})).join("&"),c=["categoryId=".concat(n),"".concat(o)].join("&");return{url:"/api/domain/v1/libraries/".concat(t,"/videos?").concat(c),key:"delete:bulk:video:".concat(e.join(":"),":").concat(t,":").concat(n),type:i.k.DELETE,success:r,error:a,invalidationKeys:["videos","search"]}},relatedVideos:function(e){var t=e.videoId,n=e.context,r=e.collectionId,i=e.moviesAndTv;return{url:f(e),key:"related:videos:".concat(t,":").concat(n,":").concat(r,":").concat(i)}},collectionVideos:function(e,t,n,r,i,u){var l=d.d.getVideoSortParam(t),v=o.v.VIDEO_COLLECTION,p=o.v.CLIP_COLLECTION,f=o.v.INTERACTIVE,m="videos[".concat(v,"]"),g="clips[".concat(p,"]"),y="interactives[".concat(f,"]{status:[").concat(c.X.Published,",").concat(c.X.Draft,"]}"),b=Object.assign({query:"(".concat(m,"|").concat(g,"|").concat(y,")").concat(l?"{".concat(l,"}"):""),permissionFilterOption:s.r.FilterOut},n?{cursor:n}:{}),h=["folder","videos",e,n,t].filter((function(e){return!!e})).join(":");return{url:a._.urlBuilder("{gateway}/v1/objects/".concat(e,"/members"),b),key:h,success:r,error:i,always:u}},pointsOfInterest:function(e,t,n,r,i){var o={query:"{limit:100}",cursor:t};return{url:a._.urlBuilder("{gateway}/v1/objects/".concat(e,"/pointsofinterest"),o),publicUrl:a._.urlBuilder("/api/objects/".concat(e,"/pointsofinterest"),o),key:"pointsofinterest:".concat(e).concat(t?":".concat(t):""),success:n,error:r,always:i}},regionAlternatives:function(e,t,n,r){return{url:"/api/objects/videos/".concat(e,"/region-alternatives"),publicUrl:"/api/objects/videos/".concat(e,"/region-alternatives"),key:"video:regionAlternatives:".concat(e),normalize:!1,success:t,error:n,always:r}}}},2491:function(e,t,n){n.d(t,{Z:function(){return o}});var r=n(92159),i=n(21186),a=n(54096);function o(){var e=(0,a.G)(r.P.ALERT);return{success:function(t){e.success(t)()},error:function(t){e.error(t)()},warning:function(t){e.createAlert({type:i.NK.Warning,heading:i.R6.Warning,message:t})}}}},45428:function(e,t,n){n.d(t,{l:function(){return m}});var r=n(57857),i=n(56285),a=n(7121),o=n(87648),c=n(63791);function u(e){return u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},u(e)}function s(e,t,n){var r;return r=function(e,t){if("object"!=u(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=u(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(t),(t="symbol"==u(r)?r:String(r))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var d=r.T.encloseNamespace("shared.shared-utils"),l=s(s({},o.c.Custom,a.Z.restrictionBadgeCustom),o.c.User,a.Z.restrictionBadgeUser),v=s(s({},o.c.Custom,c.vn.Timer),o.c.User,c.vn.Lock),p=s(s({},o.c.Custom,"restrictionCustom"),o.c.User,"restrictionYearGroup"),f=s(s({},o.c.Custom,200),o.c.User,100),m={mapRestrictionToClass:function(e){var t;if(!(null===(t=null==e?void 0:e.value)||void 0===t?void 0:t.length))return"";var n=m.getWeightedRestriction(e.value);return l[n.type]},mapRestrictionToSvg:function(e){var t;if(!(null===(t=null==e?void 0:e.value)||void 0===t?void 0:t.length))return c.vn.Lock;var n=m.getWeightedRestriction(e.value);return v[n.type]},mapRestrictionToText:function(e,t){var n;if(!(null===(n=null==e?void 0:e.value)||void 0===n?void 0:n.length)||!(null==t?void 0:t.length))return"";var r=m.getWeightedRestriction(e.value),i=t.find((function(e){return e.value===r.yearGroup})),a=p[r.type];if(r.type===o.c.User)return null===r.yearGroup?d("restrictionStaff"):i?d(a,{yearGroup:i.name}):"";if(r.type===o.c.Custom){var c=m.getRestrictionDuration(r);return c?d(a,{duration:c,smartCount:c}):d("restrictionCustomLessThanDay",{duration:c,smartCount:1})}return""},getWeightedRestriction:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"highest";if(e.length)return 1===e.length?e[0]:e.reduce((function(e,n){var r=f[e.type],i=f[n.type];return"highest"===t&&r>i||"lowest"===t&&r<i?e:n}))},getRestrictionByType:function(e,t){if(!m.hasRestrictions(e))return null;var n=Array.isArray(t)?t:[t],r=e._restrictions.value.filter((function(e){return n.includes(e.type)}));return m.getWeightedRestriction(r)},getRestrictionDuration:function(e){if(e.type===o.c.Custom&&e.expiresOn){var t=i.O.convertUTCToLocal(e.expiresOn);if(t)return i.O.diffBetween(t,new Date,"day")}},hasCustomRestriction:function(e){return!!m.getRestrictionByType(e,[o.c.Custom])},hasRestrictions:function(e){var t,n;return!!(null===(n=null===(t=null==e?void 0:e._restrictions)||void 0===t?void 0:t.value)||void 0===n?void 0:n.length)}}},21974:function(e,t,n){n.d(t,{u:function(){return d}});var r=n(57857),i=n(75459),a=n(86257),o=n(63791);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 u(e,t,n){var r;return r=function(e,t){if("object"!=c(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=c(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(t),(t="symbol"==c(r)?r:String(r))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var s="shared.shared-utils",d={mapRatingToClass:function(e){return e?function(e){switch(!0){case e<32:return"bg-purple";case e<48:return"bg-green";case e<80:return"bg-info";case e<96:return"bg-red";case e<128:return"bg-pink";case e>=128:return"bg-yellow";default:return""}}(e):""},mapSourceToDisplayName:function(e,t){switch(e.type){case i.r.HostedLibrary:case i.r.CustomLibrary:return e.name;case i.r.Exchange:return r.T.getPhrase(s,"exchange");case i.r.Workspace:return r.T.getPhrase(s,t?"myVideos":"workspace");default:return""}},mapSourceToClass:function(e){switch(e){case i.r.HostedLibrary:case i.r.CustomLibrary:return"bg-info";case i.r.Exchange:return"bg-green";case i.r.Workspace:default:return"bg-red"}},isInteractive:function(e){var t,n;return!!(null===(n=null===(t=null==e?void 0:e.interactives)||void 0===t?void 0:t.data)||void 0===n?void 0:n.length)},mapTypeToSvg:function(e){var t=u(u(u(u(u(u(u({},a.L.Pdf,o.vn.FilePDF),a.L.Image,o.vn.FileImg),a.L.PowerPoint,o.vn.FilePowerpoint),a.L.Document,o.vn.FileWord),a.L.Excel,o.vn.FileExcel),a.L.Zip,o.vn.FileZip),a.L.File,o.vn.File)[e];return t||(t=o.vn.Folder),t},mapTypeToClass:function(e){switch(e){case a.L.Pdf:return"icon-red";case a.L.Image:return"icon-purple";case a.L.Document:return"icon-blue";case a.L.Excel:return"icon-green";case a.L.PowerPoint:return"icon-orange";case a.L.Zip:return"icon-teal";case a.L.File:return"icon-gray";default:return""}},mapTypeToExtension:function(e){return e?{pdf:"pdf",image:"png",powerpoint:"pptx"}[e.toLowerCase()]:""},mapTypeToName:function(e){if(!e)return"";switch(e){case a.L.Pdf:return r.T.getPhrase(s,"pdf");case a.L.Image:return r.T.getPhrase(s,"image");case a.L.Document:return r.T.getPhrase(s,"document");case a.L.Excel:return r.T.getPhrase(s,"spreadsheet");case a.L.PowerPoint:return r.T.getPhrase(s,"presentation");case a.L.Zip:return r.T.getPhrase(s,"zipArchive");case a.L.File:return r.T.getPhrase(s,"file");default:return""}}}},12927:function(e,t,n){n.d(t,{M:function(){return h}});var r,i=n(11306),a=n(57857),o=n(31647),c=n(56285),u=n(70065);!function(e){e.Screenrights="screenrights",e.Era="era",e.ClickView="clickview"}(r||(r={}));var s=n(50028),d=n(74421),l=n(87648),v=n(89603),p=n(332),f=n(91432),m=n(77131),g=n(45428),y=n(75459),b=a.T.encloseNamespace("shared.shared-utils"),h={isVideo:function(e){return(null==e?void 0:e.typeId)===d.E.Video},isClip:function(e){return(null==e?void 0:e.typeId)===d.E.Clip},isInteractive:function(e){return(null==e?void 0:e.typeId)===d.E.Interactive},isVideoTypeArchived:function(e){return(null==e?void 0:e.status)===s.X.Archived},isVideoType:function(e){return h.isVideo(e)||h.isInteractive(e)||h.isClip(e)},hasSeries:function(e){var t;return!!(null===(t=null==e?void 0:e.series)||void 0===t?void 0:t.id)},getVideoProgress:function(e){var t,n;return(null==e?void 0:e.lastProgressPoint)?null==e?void 0:e.lastProgressPoint:(null===(t=null==e?void 0:e._videoProgress)||void 0===t?void 0:t.progress)?null===(n=null==e?void 0:e._videoProgress)||void 0===n?void 0:n.progress:0},getThumbnail:function(e){var t,n;return e?h.isVideo(e)?e.thumbnail:(null==e?void 0:e._thumbnail)?e._thumbnail:h.isClip(e)?e.thumbnail||(null===(t=e._parentVideo)||void 0===t?void 0:t.thumbnail):h.isInteractive(e)?null===(n=e._parentVideo)||void 0===n?void 0:n.thumbnail:void 0:null},getDuration:function(e){var t,n;if(e){if(h.isVideo(e))return e.duration;if(h.isInteractive(e)){if(null===(t=e._parentClip)||void 0===t?void 0:t.id)return 1e3*(e._parentClip.endTime-e._parentClip.startTime);if(null===(n=e._parentVideo)||void 0===n?void 0:n.duration)return e._parentVideo.duration}return h.isClip(e)?1e3*(e.endTime-e.startTime):void 0}},getAnalyticsEntity:function(e){return h.isVideo(e)?u.py.Video:h.isInteractive(e)?u.py.Interactive:h.isClip(e)?u.py.Clip:void 0},getCanBeConsumed:function(e){var t,n;return e&&h.isVideoType(e)?e._canBeConsumed?{canNavigate:"login-required"===(null===(t=e._canBeConsumed)||void 0===t?void 0:t.reason)&&h.isVideo(e)||!0===e._canBeConsumed.value,canConsume:e._canBeConsumed.value,reason:null===(n=e._canBeConsumed)||void 0===n?void 0:n.reason}:{canNavigate:!0,canConsume:!0}:{canNavigate:!1,canConsume:!1}},getPrivacyReasoning:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=h.getCanBeConsumed(e),i=r.canConsume,a=r.canNavigate,o=r.reason,c=function(){return h.isClip(e)?b("clipLoginRequired"):h.isInteractive(e)?b("interactiveLoginRequired"):b("videoLoginRequired")};if(!i&&!a){if(n)return c();switch(o){case"rating-not-allowed":return b("ratingNotAllowed");case"video-deleted":return h.isClip(e)?b("clipParentDeleted"):h.isInteractive(e)?b("interactiveParentDeleted"):b("videoDeleted");case"clickview-private":return b("clickViewPrivate");case"private":default:return b("genericCannotAccess");case"login-required":return c();case"restricted-access":var u=g.l.getWeightedRestriction(null===(t=e._restrictions)||void 0===t?void 0:t.value);return(null==u?void 0:u.type)===l.c.Custom?b("awaitingApproval"):b("restrictedAccess")}}return h.isInteractive(e)&&e.status===s.X.Draft?b("draftInteractive"):""},getTitle:function(e){if(e.name)return e.name;var t=h.getCanBeConsumed(e),n=t.canConsume,r=t.reason;return b(n||"private"!==r?n||"video-deleted"!==r?"privateVideo":"videoUnavailable":"privateVideo")},getParentVideo:function(e){return h.isVideo(e)?e:h.isClip(e)||h.isInteractive(e)?e._parentVideo:void 0},showWhyThisVideo:function(e){var t,n;return!!h.isVideo(e)&&!!(null===(n=null===(t=e.tags)||void 0===t?void 0:t.data)||void 0===n?void 0:n.some((function(e){return e.tagType===v.Q.Pedagogy||e.tagType===v.Q.Skill})))},showWhatsIncluded:function(e){var t,n,r,i,a,o;if(!h.isVideo(e))return!1;var c=!!(null===(n=null===(t=e.interactives)||void 0===t?void 0:t.data)||void 0===n?void 0:n.length),u=!!(null===(i=null===(r=e.resources)||void 0===r?void 0:r.data)||void 0===i?void 0:i.length),s=!!(null===(o=null===(a=e.subtitles)||void 0===a?void 0:a.data)||void 0===o?void 0:o.length);return c||u||s},getRating:function(e){var t;return h.isVideo(e)?e.rating:null===(t=null==e?void 0:e._parentVideo)||void 0===t?void 0:t.rating},getVideoRequest:function(e,t,n){if(n){switch(t){case d.E.Video:return m.R.sharedVideo(e,n);case d.E.Clip:return p.e.sharedClip(e,n);case d.E.Interactive:return f.b.sharedInteractiveMetadata(e,n)}o.Q.Ry.throw(new i.H("Unsupported master type"))}switch(t){case d.E.Video:return m.R.video(e);case d.E.Clip:return p.e.clip(e);case d.E.Interactive:return f.b.interactiveMetadata(e)}o.Q.Ry.throw(new i.H("Unsupported master type"))},isBroadcast:function(e){var t,n;return!!(null===(n=null===(t=null==e?void 0:e.contentLicences)||void 0===t?void 0:t.data)||void 0===n?void 0:n.some((function(e){return e.systemName===r.Era||e.systemName===r.Screenrights})))},getReleaseDate:function(e){return e&&e.dateReleased&&h.isBroadcast(e)?c.O.format(e.dateReleased,"DD/MM/YYYY"):""},canViewOriginalVideo:function(e){var t,n,r;return!(!e||!(null===(t=e._isClickViewContent)||void 0===t?void 0:t.value)&&(null===(r=null===(n=e.libraries)||void 0===n?void 0:n.data)||void 0===r?void 0:r.some((function(e){return e.type===y.r.CustomLibrary}))))},getTrackingCode:function(e){return h.isVideo(e)?e.trackingCode:h.isClip(e)||h.isInteractive(e)?e._parentVideo.trackingCode:void 0}}},15970:function(e,t,n){n.d(t,{d:function(){return o}});var r=n(4705),i=n(90335),a=i.D.RecentlyAdded,o={getValidSortTypeFromParam:function(e){return Object.values(i.D).includes(e)?e:i.D.Newest},getOrSetSortType:function(e,t,n){var i=function(e){return"video:sort:".concat(e)}(e);return!t&&r.SG.cacheExists(i)||r.SG.cacheSet(i,t||n||a),t||(t=r.SG.cacheGet(i)),t},getVideoSortParam:function(e){switch(e){case i.D.AtoZ:return"orderby:name";case i.D.ZtoA:return"orderbydesc:name";case i.D.Newest:return"orderbydesc:datecreated";case i.D.Oldest:return"orderby:datecreated";case i.D.RecentlyAdded:return"orderbydesc:timestamp";case i.D.Series:return"orderby:seriessort";default:return}}}},7121:function(e,t){t.Z={minHeight:"jEh7m",restrictionBadgeCustom:"WQ2eS",restrictionBadgeUser:"z4DeQ",streamable:"D_2nt"}}}]);