@clickview/library-editor 1.36.2-rc.0 → 1.36.2

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 (81) hide show
  1. package/dist/bundles.json +2 -2
  2. package/dist/css/{1086-library-editor-1b6300c4f7.chunk.css → 1086-library-editor-171329bca2.chunk.css} +1 -1
  3. package/dist/css/{2692-library-editor-1b6300c4f7.chunk.css → 2692-library-editor-171329bca2.chunk.css} +1 -1
  4. package/dist/css/514-library-editor-d534ea06b5.chunk.css +1 -0
  5. package/dist/css/{5424-library-editor-dd51bf8b8e.chunk.css → 5424-library-editor-54d47524f3.chunk.css} +1 -1
  6. package/dist/css/{6909-library-editor-7d43d475ea.chunk.css → 5582-library-editor-c850aea3cd.chunk.css} +1 -1
  7. package/dist/css/{6732-library-editor-db7c031b5b.chunk.css → 6732-library-editor-2f2cb516f7.chunk.css} +1 -1
  8. package/dist/css/{8906-library-editor-1b6300c4f7.chunk.css → 8762-library-editor-171329bca2.chunk.css} +1 -1
  9. package/dist/css/{8762-library-editor-1b6300c4f7.chunk.css → 8906-library-editor-171329bca2.chunk.css} +1 -1
  10. package/dist/css/{9383-library-editor-faaa1e3e83.chunk.css → 9383-library-editor-0862b9edab.chunk.css} +1 -1
  11. package/dist/css/{library-editor-app-b522ca3fcd.css → library-editor-app-ad7039f1c8.css} +1 -1
  12. package/dist/languages/en.json +1 -1
  13. package/dist/scripts/{1269-3d3ad610e9.chunk.js → 1269-acbb46db66.chunk.js} +1 -1
  14. package/dist/scripts/{1492-95e9c7537a.chunk.js → 1492-307fdc91b9.chunk.js} +1 -1
  15. package/dist/scripts/{1601-e99fdde245.chunk.js → 1601-2420d5adfd.chunk.js} +1 -1
  16. package/dist/scripts/2842-27f6310c64.chunk.js +1 -0
  17. package/dist/scripts/343-db62a4653d.chunk.js +1 -0
  18. package/dist/scripts/{4201-56cff16d9a.chunk.js → 4201-1127e73b2a.chunk.js} +1 -1
  19. package/dist/scripts/514-1c92d29abf.chunk.js +1 -0
  20. package/dist/scripts/5418-a4b09bf2b6.chunk.js +1 -0
  21. package/dist/scripts/5582-fc64a02c8a.chunk.js +2 -0
  22. package/dist/scripts/5698-3d0dbbbb24.chunk.js +1 -0
  23. package/dist/scripts/{61-1307b131d1.chunk.js → 61-19c661d56c.chunk.js} +1 -1
  24. package/dist/scripts/8906-e276c0ff3c.chunk.js +1 -0
  25. package/dist/scripts/{9219-364398ccd3.chunk.js → 9219-670da4d5fe.chunk.js} +1 -1
  26. package/dist/scripts/9309-6d8328e336.chunk.js +1 -0
  27. package/dist/scripts/{9383-f831aced05.chunk.js → 9383-0c17fdf3cc.chunk.js} +1 -1
  28. package/dist/scripts/bundle-1da77e9057.min.js +2 -0
  29. package/package.json +1 -1
  30. package/dist/css/514-library-editor-4cb4f22674.chunk.css +0 -1
  31. package/dist/scripts/3087-a00194efdc.chunk.js +0 -1
  32. package/dist/scripts/343-ad087e2d1c.chunk.js +0 -1
  33. package/dist/scripts/514-3de0207983.chunk.js +0 -1
  34. package/dist/scripts/5418-9524d92ab1.chunk.js +0 -1
  35. package/dist/scripts/5698-79c7c12ba7.chunk.js +0 -1
  36. package/dist/scripts/6909-20240f4be9.chunk.js +0 -2
  37. package/dist/scripts/8906-f0ffc1a58c.chunk.js +0 -1
  38. package/dist/scripts/9309-c031e0377b.chunk.js +0 -1
  39. package/dist/scripts/bundle-06428d700e.min.js +0 -2
  40. /package/dist/css/{3087-library-editor-32398cd1ad.chunk.css → 2842-library-editor-32398cd1ad.chunk.css} +0 -0
  41. /package/dist/scripts/{101-4c60c0a1d9.chunk.js → 101-6b75d8dabe.chunk.js} +0 -0
  42. /package/dist/scripts/{1010-2a92a263a3.chunk.js → 1010-8fff0f8d13.chunk.js} +0 -0
  43. /package/dist/scripts/{1086-09259636d8.chunk.js → 1086-e8af280ffb.chunk.js} +0 -0
  44. /package/dist/scripts/{1409-8d7b677cb8.chunk.js → 1409-a35e935afe.chunk.js} +0 -0
  45. /package/dist/scripts/{1601-e99fdde245.chunk.js.LICENSE.txt → 1601-2420d5adfd.chunk.js.LICENSE.txt} +0 -0
  46. /package/dist/scripts/{1703-c0dbaab27c.chunk.js → 1703-fe8afddbb1.chunk.js} +0 -0
  47. /package/dist/scripts/{1832-670c87f424.chunk.js → 1832-ba7102fc98.chunk.js} +0 -0
  48. /package/dist/scripts/{1876-ca6bb09e77.chunk.js → 1876-68b682bedb.chunk.js} +0 -0
  49. /package/dist/scripts/{2417-0ecf739bcd.chunk.js → 2417-8e04800595.chunk.js} +0 -0
  50. /package/dist/scripts/{243-d3d7abe117.chunk.js → 243-deef0aa1b8.chunk.js} +0 -0
  51. /package/dist/scripts/{259-075889f0e6.chunk.js → 259-4df316602f.chunk.js} +0 -0
  52. /package/dist/scripts/{2601-88248233bb.chunk.js → 2601-d720204adc.chunk.js} +0 -0
  53. /package/dist/scripts/{2644-72833b9de8.chunk.js → 2644-159adfaad6.chunk.js} +0 -0
  54. /package/dist/scripts/{2692-e6d52294ef.chunk.js → 2692-88db0d0d77.chunk.js} +0 -0
  55. /package/dist/scripts/{299-fd20c7c19b.chunk.js → 299-f4cd99228b.chunk.js} +0 -0
  56. /package/dist/scripts/{35-aa593493ed.chunk.js → 35-438a013146.chunk.js} +0 -0
  57. /package/dist/scripts/{3551-ef8b9692dd.chunk.js → 3551-f9e42a608e.chunk.js} +0 -0
  58. /package/dist/scripts/{3746-c000b59b9b.chunk.js → 3746-44c2f70e92.chunk.js} +0 -0
  59. /package/dist/scripts/{376-4c215af590.chunk.js → 376-7d729e74cc.chunk.js} +0 -0
  60. /package/dist/scripts/{3969-99be8f1ef1.chunk.js → 3969-a7a10eb86b.chunk.js} +0 -0
  61. /package/dist/scripts/{4245-4b8ff55ce5.chunk.js → 4245-bd9476ab05.chunk.js} +0 -0
  62. /package/dist/scripts/{4523-88443dc698.chunk.js → 4523-069eee9ca7.chunk.js} +0 -0
  63. /package/dist/scripts/{5046-cc98da747f.chunk.js → 5046-cf64750c31.chunk.js} +0 -0
  64. /package/dist/scripts/{5286-d5088b9145.chunk.js → 5286-03cfd80b6f.chunk.js} +0 -0
  65. /package/dist/scripts/{5424-66906b62da.chunk.js → 5424-ee744a34d1.chunk.js} +0 -0
  66. /package/dist/scripts/{61-1307b131d1.chunk.js.LICENSE.txt → 5582-fc64a02c8a.chunk.js.LICENSE.txt} +0 -0
  67. /package/dist/scripts/{5707-b463d21e70.chunk.js → 5707-e852e0ab0a.chunk.js} +0 -0
  68. /package/dist/scripts/{5747-bfbe98e0f3.chunk.js → 5747-22e78fc02a.chunk.js} +0 -0
  69. /package/dist/scripts/{5891-b7c7024645.chunk.js → 5891-d09d299d05.chunk.js} +0 -0
  70. /package/dist/scripts/{6909-20240f4be9.chunk.js.LICENSE.txt → 61-19c661d56c.chunk.js.LICENSE.txt} +0 -0
  71. /package/dist/scripts/{6352-2cbc465b4e.chunk.js → 6352-3f49199fca.chunk.js} +0 -0
  72. /package/dist/scripts/{6732-a98b58145b.chunk.js → 6732-00df2c6583.chunk.js} +0 -0
  73. /package/dist/scripts/{6963-54f96adfbb.chunk.js → 6963-cd1f607329.chunk.js} +0 -0
  74. /package/dist/scripts/{7002-2c4e673fa4.chunk.js → 7002-48bafca25c.chunk.js} +0 -0
  75. /package/dist/scripts/{7053-4bb976f78c.chunk.js → 7053-63bd766cc8.chunk.js} +0 -0
  76. /package/dist/scripts/{7071-0a40ab40af.chunk.js → 7071-917715b410.chunk.js} +0 -0
  77. /package/dist/scripts/{708-30b695437c.chunk.js → 708-bb186270f7.chunk.js} +0 -0
  78. /package/dist/scripts/{7408-32aecd60b3.chunk.js → 7408-1463a332e9.chunk.js} +0 -0
  79. /package/dist/scripts/{8727-cd7adf615a.chunk.js → 8727-64fe668f3b.chunk.js} +0 -0
  80. /package/dist/scripts/{8762-48a61b5d7f.chunk.js → 8762-3391a1b55c.chunk.js} +0 -0
  81. /package/dist/scripts/{bundle-06428d700e.min.js.LICENSE.txt → bundle-1da77e9057.min.js.LICENSE.txt} +0 -0
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[9309],{79410:function(e,t,n){n.d(t,{D:function(){return c}});var r=n(1024),i=n.n(r),a=n(58566),o=n(4705),l=n(34279),c=function(e,t,n){var r,c=(r=null==n?void 0:n.storage)?r===o.Z1.SessionStorage?o.qS:o.SG:null,s=null==c?void 0:c.get(e),u=(0,a.useDispatch)(),d=(0,a.useSelector)((function(t){return t.viewModelData[e]}));function f(){return null!=s}"undefined"!==s&&"null"!==s||(s=null);var m=(void 0!==t||f())&&void 0===d;function v(t,n){c&&function(t,n){if(c){var r=c.get(e);"string"!=typeof t||void 0===n?c.set(e,t):c.set(e,Object.assign(Object.assign({},r),{dataOrKey:n}))}}(t,n),u({type:l.B.UPDATE,payload:{viewModelKey:e,dataOrKey:t,keyData:n}})}return i().useEffect((function(){if(m)return f()?void v(s):void v(t)}),[]),m?f()?[s,v]:[t,v]:[null!=d?d:void 0,v]}},39023:function(e,t,n){n.d(t,{X:function(){return i}});var r=n(1024);function i(e){var t=e.isLabelEllipsis,n=r.useRef(null);return r.useEffect((function(){n.current&&(e.checked?n.current.indeterminate&&(n.current.indeterminate=!1):!e.indeterminate||n.current.indeterminate?!e.indeterminate&&n.current.indeterminate&&(n.current.indeterminate=!1):n.current.indeterminate=!0)}),[n.current,e.indeterminate,e.checked]),r.createElement("div",{className:"form-check pe-2 ".concat(e.className)},r.createElement("input",{ref:n,type:"checkbox",className:"form-check-input",id:e.id,name:e.name,checked:e.checked,onChange:e.onChange,disabled:e.disabled}),r.createElement("label",{className:"form-check-label cursor-pointer align-top",htmlFor:e.id},r.createElement("span",{className:"".concat(t?"clamp-1":"")},e.label)))}i.defaultProps={checked:!1,label:"",className:""}},52086:function(e,t,n){n.d(t,{g:function(){return r}});var r={PERMISSIONS:"permissions",AUDIENCE_FILTER:"audience:filter",BULK_USER_UPLOAD:"bulk:user:upload",BULK_REMOVE_USERS:"bulk:remove:users",BULK_USER_ACTIONS:"bulk:user:actions",CURATOR_WORKING_LISTS:"curator:working:lists",LOOKING_FOR_INTEGRATION:"looking:for:integration",PRESENTATION_ID:"presentation:id",BRAZE_BANNER_PREFIX:"braze:banner",ONBOARDING_BANNER_DISMISSED:"onboarding:banner:dismissed"}},74483:function(e,t,n){var r;n.d(t,{w:function(){return r}}),function(e){e.Disabled="Disabled",e.Active="Active",e.Inactive="Inactive"}(r||(r={}))},29309:function(e,t,n){n.r(t),n.d(t,{PastRequestsView:function(){return Cn}});var r=n(1024),i=n.n(r),a=n(57857),o=n(86120),l=n(23689),c=n(86242),s=n(66703),u=n(90335),d=n(15408),f=n(2491),m=n(30317),v=n(22430),p=n(50997),y=n(68893),g=n(48404),b=n(19226),h=n(39396),E=n(63791),S=n(50072),A="libraryRequests.closedAlert";function O(e){var t;return(null===(t=e.libraryRequest)||void 0===t?void 0:t.status)!==S.l.Closed?i().createElement(i().Fragment,null):i().createElement("div",{className:"alert alert-warning mb-3 rounded d-flex align-items-center px-2",role:"alert"},i().createElement(h.x,{svgName:E.vn.Lock,className:"d-inline-block svg-container me-2"}),i().createElement(s.x,{namespace:A,phrase:"closedRequest"}))}var C=n(70065),w=n(40221),k=n(85887),L=n(99910),T=n(58424),I="search.filterActions";function N(e){return r.createElement("div",{className:"d-flex justify-content-between ".concat(e.className)},e.active?r.createElement(T.L,{className:"text-muted hover-text-underline cursor-pointer",onClick:e.onClickReset},r.createElement(s.x,{namespace:I,phrase:"reset"})):r.createElement("div",{className:"invisible"}),r.createElement(T.L,{className:"info-link",onClick:e.onClickApply},r.createElement(s.x,{namespace:I,phrase:"apply"})))}N.defaultProps={active:!1,className:""};var R=(0,r.createContext)(null);function j(e,t){return"update"===t.type?t.payload:e}var _=n(53808),x=n(31647),P=n(52076);function F(e){return i().createElement("h3",{className:"h6 mb-2"},e.title)}var D=n(39023);function B(e){return 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.")}()}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 q(e){var t,n=ke.displayTwoColumns(e.filter),i=e.draftState.selection;return r.createElement(r.Fragment,null,r.createElement(F,{title:e.filter.name}),r.createElement(L.Form,{className:"mb-3"},(t=e.filter.options.map((function(t){var a=e.filter.disabled||t.disabled,o=!!e.draftState.selection.find((function(e){return e.id.toString()===t.id.toString()})),l=Array.isArray(t.id)?t.id.join("_"):t.id;return r.createElement(D.X,{key:l,label:t.name,name:l,id:l,onChange:function(){return function(t,n){if(n){var r=-1;i.find((function(e,n){r>-1||e.id.toString()===t.id.toString()&&(r=n)}));var a=[].concat(B(i.slice(0,r)),B(i.slice(r+1)));e.setDraftState({active:!!a.length,selection:a})}else{var o=B(i);o.push(t),e.setDraftState({active:!!o.length,selection:o})}}(t,o)},checked:!a&&o,className:"my-1 ".concat(n?"col-md-6 col-12":""),isLabelEllipsis:n,disabled:a})})),n?r.createElement("div",{className:"d-flex flex-wrap"},t):t)))}function M(e,t){if(e){if("string"==typeof e)return V(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)?V(e,t):void 0}}function V(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 G(e){var t,n,i,a=[],o=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=M(e))){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}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 a,o=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){l=!0,a=e},f:function(){try{o||null==n.return||n.return()}finally{if(l)throw a}}}}(e.filter.options);try{var l=function(){var o,l=i.value,c=e.filter.disabled||l.disabled,s=null===(t=e.draftState.selection)||void 0===t?void 0:t.find((function(e){return(null==e?void 0:e.id)===l.id})),u=null!==(n=l.secondLayerOptions)&&void 0!==n?n:[],d=function(e,t){var n,r,i=(null===(n=null==e?void 0:e.secondLayerSelection)||void 0===n?void 0:n.length)>0,a=(null===(r=null==e?void 0:e.secondLayerSelection)||void 0===r?void 0:r.length)===t.length;return i&&!a}(s,u),f=!d&&!!s;a.push(r.createElement(D.X,{key:l.id,label:l.name,name:l.id,id:l.id,indeterminate:d,onChange:function(){return e.onToggleItem(l,f||d)},checked:!c&&f,className:"my-1",disabled:c})),ke.hasManyFilterOptions(u)&&a.push.apply(a,(o=u.map((function(t){var n,i=c||t.disabled,a=!!(null===(n=null==s?void 0:s.secondLayerSelection)||void 0===n?void 0:n.find((function(e){return e.id===t.id})));return r.createElement(D.X,{key:t.id,label:t.name,name:t.id,id:t.id,onChange:function(){return e.onToggleChildItem(t,a,l)},checked:!i&&a,className:"my-1 ms-3",disabled:i})})),function(e){if(Array.isArray(e))return V(e)}(o)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(o)||M(o)||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.")}()))};for(o.s();!(i=o.n()).done;)l()}catch(e){o.e(e)}finally{o.f()}return r.createElement(r.Fragment,null,a)}function X(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Y(e){var t,n,i,a=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return X(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?X(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}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 a,o=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){l=!0,a=e},f:function(){try{o||null==n.return||n.return()}finally{if(l)throw a}}}}(e.filter.options);try{var o,l=function(){var a=i.value,o=e.filter.disabled||a.disabled,l=null===(t=e.draftState.selection)||void 0===t?void 0:t.find((function(e){return(null==e?void 0:e.id)===a.id})),c=(null!==(n=a.secondLayerOptions)&&void 0!==n?n:[]).map((function(t){var n,i=o||t.disabled,c=!!(null===(n=null==l?void 0:l.secondLayerSelection)||void 0===n?void 0:n.find((function(e){return e.id===t.id})));return r.createElement(D.X,{key:t.id,label:t.name,name:t.id,id:t.id,onChange:function(){return e.onToggleChildItem(t,c,a)},checked:!i&&c,className:"my-1",disabled:i})}));return{v:r.createElement(r.Fragment,null,c)}};for(a.s();!(i=a.n()).done;)if(o=l())return o.v}catch(e){a.e(e)}finally{a.f()}}function Q(e){return function(e){if(Array.isArray(e))return W(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 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}}(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 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 H(e){var t=e.filter.options;function n(t,n,r){var i,a,o=e.draftState.selection,l=o.findIndex((function(e){return e.id===r.id}));if(!n){var c=[].concat(Q(null!==(a=null===(i=o[l])||void 0===i?void 0:i.secondLayerSelection)&&void 0!==a?a:[]),[t]);if(0===o.length||-1===l){var s=Object.assign(Object.assign({},r),{secondLayerSelection:c}),u=[].concat(Q(o),[s]);return void e.setDraftState({active:!!u.length,selection:u})}if(-1!==l){var d=o.map((function(e){return e.id===r.id?Object.assign(Object.assign({},e),{secondLayerSelection:c}):e}));return void e.setDraftState({active:!!d.length,selection:d})}}var f=o.map((function(e){if(e.id===r.id){var n=w.m.removeItem(e.secondLayerSelection,t);return Object.assign(Object.assign({},r),{secondLayerSelection:n})}return e}));0===f[l].secondLayerSelection.length&&(f=w.m.removeItem(f,r)),e.setDraftState({active:!!f.length,selection:f})}return r.createElement(r.Fragment,null,r.createElement(F,{title:e.filter.name}),r.createElement(L.Form,{className:"mb-3"},ke.hasManyFilterOptions(t)?r.createElement(G,Object.assign({onToggleItem:function(n,r){var i,a=e.draftState.selection,o=a.findIndex((function(e){return e.id===n.id}));if(!r){var l=null===(i=null==t?void 0:t.find((function(e){return e.id===n.id})).secondLayerOptions)||void 0===i?void 0:i.filter((function(e){return!e.disabled})),c=Object.assign(Object.assign({},n),{secondLayerSelection:l});if(0===a.length||-1===o){var s=[].concat(Q(a),[c]);return void e.setDraftState({active:!0,selection:s})}if(-1!==o){var u=a.map((function(e){return e.id===n.id?c:e}));return void e.setDraftState({active:!!u.length,selection:u})}}var d=w.m.removeItemFromIndex(a,a.findIndex((function(e){return e.id===n.id})));e.setDraftState({active:!!d.length,selection:d})},onToggleChildItem:n},e)):r.createElement(Y,Object.assign({onToggleChildItem:n},e))))}var z=n(9063);function $(e){var t=e.draftState.active;return r.createElement(r.Fragment,null,r.createElement(F,{title:e.filter.name}),r.createElement("div",{className:"d-flex align-items-start justify-content-between"},r.createElement("p",{className:"d-inline-block w-75"},e.filter.description),r.createElement(z.Z,{disabled:e.filter.disabled,onClick:function(){e.setDraftState({active:!t})},on:t})))}function K(e){return i().createElement(i().Fragment,null,e.filter.options.map((function(t){return i().createElement(L.Dropdown.Item,{key:t.id,onClick:function(){return function(t){e.setDraftState({active:!t.default,selection:[t]})}(t)},disabled:e.filter.disabled||t.disabled},t.name)})))}function Z(e){return r.createElement(r.Fragment,null,r.createElement(F,{title:e.filter.name}),r.createElement(L.Form,{className:e.isOnMoreFilters?"d-flex flex-wrap":""},e.filter.options.map((function(t){var n,i=e.filter.disabled||t.disabled,a=(null===(n=w.m.first(e.draftState.selection))||void 0===n?void 0:n.id.toString())===t.id.toString();return r.createElement(L.Form.Check,{key:t.id,type:"radio",label:t.name,name:t.id,id:t.id,value:t.id,onChange:function(){return function(t){e.setDraftState({active:!t.default,selection:[t]})}(t)},checked:!i&&a,className:"".concat("B3rOI"," ").concat(e.isOnMoreFilters?"w-50":""),disabled:i})}))))}var J=n(63946),ee=n(32557);function te(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,i,a,o,l=[],c=!0,s=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(l.push(r.value),l.length!==t);c=!0);}catch(e){s=!0,i=e}finally{try{if(!c&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(s)throw i}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return ne(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)?ne(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 ne(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 re=a.T.encloseNamespace("shared.ratingRangeSelector");function ie(e){var t=te((0,ee.X)({delay:1}),2),n=t[0],r=t[1];if(i().useEffect((function(){e.onHover(r?e.rating:null,e.isRatingValid)}),[r]),!e.rating.code)return i().createElement(i().Fragment,null);var a=i().createElement(T.L,{ref:n,className:e.getButtonClasses(e.rating,e.isActive,r,e.isRatingValid),onClick:e.onClick,disabled:e.disabled},e.rating.code);return e.disabled?a:i().createElement(J.u,{title:e.isRatingValid?e.rating.name:re("invalidRating"),spanHack:!0},a)}function ae(e){var t=te(i().useState(!1),2),n=t[0],r=t[1],a=te(i().useState([]),2),o=a[0],l=a[1];function c(t){return e.ratings.filter((function(e){return e.code&&e.value<=t.value}))}function s(t,n){t&&!e.isDisabled(t)?(n&&l(c(t)),r(n)):l([])}function u(t){return o.length?!!o.find((function(e){return e.id===t.id})):!!e.selections.find((function(e){return e.id===t.id}))}function d(t){if(!t)return!1;var n=e.yearGroups.findIndex((function(t){return t.value===e.yearGroup.value}));return 0===n||e.yearGroups.slice(0,n).every((function(e){return t.value>=e.rating.value}))}return i().createElement("div",null,i().createElement(L.ButtonGroup,null,e.ratings.map((function(t){var r;return i().createElement(ie,{key:t.id,rating:t,isRatingValid:!e.yearGroup||d(t),onClick:function(){return function(t){if(n){var r=c(t);e.onSelectRange(r)}}(t)},onHover:s,isActive:u(t),disabled:e.disabled||(null===(r=e.isDisabled)||void 0===r?void 0:r.call(e,t)),getButtonClasses:e.getButtonClasses})}))))}ae.defaultProps={selections:[]};function oe(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 le(e){var t,n,i=e.filter.options,a=i.filter((function(e){return e.code})),o=(t=a,n=1,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,i,a,o,l=[],c=!0,s=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(l.push(r.value),l.length!==t);c=!0);}catch(e){s=!0,i=e}finally{try{if(!c&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(s)throw i}}return l}}(t,n)||function(e,t){if(e){if("string"==typeof e)return oe(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)?oe(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.")}())[0],l=a[a.length-1];return r.createElement(r.Fragment,null,r.createElement(F,{title:e.filter.name}),r.createElement("div",{className:"mb-2"},r.createElement(ae,{ratings:i,selections:e.draftState.selection,onSelectRange:function(t){e.setDraftState({active:!!t.length,selection:t})},disabled:e.filter.disabled,isDisabled:function(e){return e.disabled},getButtonClasses:function(e,t,n){var r="btn border text-nowrap";return r+=t||n?" btn-dark":" btn-outline-dark",n&&(r+=" active"),1===a.length?r+=" rounded":o.id===e.id?r+=" sLa86":l.id===e.id?r+=" xDcnT":r+=" rounded-0",r}})))}var ce,se,ue,de,fe,me,ve="filters.";!function(e){e.CLICKVIEW_CURATED="is_clickview_curated",e.MOVIES_AND_TV="is_movies_and_tv"}(ce||(ce={})),n(11306),n(79410),n(56285),n(1268),n(74483),n(46237),n(38182),n(83891),function(e){e.Online="online",e.Primary="primary",e.Curator="curator"}(se||(se={})),n(52086),i().createContext({}),function(e){e[e.Unknown=0]="Unknown",e[e.Staff=1]="Staff",e[e.Learner=2]="Learner",e[e.MasterVideo=3]="MasterVideo"}(ue||(ue={})),function(e){e.YearGroupRollover="year-group-rollover",e.ChangeYearGroup="change-year-group",e.DeleteUser="delete-user",e.RemoveUser="remove-user",e.DeactivateUser="deactivate-user",e.ActivateUser="activate-user",e.AddToClassroom="add-to-classroom",e.ResetPassword="reset-password",e.SendResetPasswordEmail="send-reset-password-email",e.SendAccountActivationEmail="send-account-activation-email",e.CreateUser="create-user",e.AddToAudience="add-to-audience",e.AddToBackboneClassification="add-to-backbone-classification",e.AddToBackboneAudience="add-to-backbone-audience",e.AddToClassification="add-to-classification",e.AddToSeries="add-to-series",e.AddToDirector="add-to-director",e.AddToDistributor="add-to-distributor",e.AddToProductionCompany="add-to-production-company",e.AddToProducer="add-to-producer",e.AddToLibrary="add-to-library",e.AddToCurationTag="add-to-curation-tag",e.AddToSkillTag="add-to-skill-tag",e.AddToPedagogyTag="add-to-pedagogy-tag",e.AddToNormalTag="add-to-normal-tag",e.AddToHiddenTag="add-to-hidden-tag",e.AddResourceAndLink="add-resource-and-link",e.Rostering="rostering"}(de||(de={})),function(e){e[e.NoAction=1]="NoAction",e[e.Succeed=1]="Succeed",e[e.Unknown=10]="Unknown",e[e.CustomerNotFound=100]="CustomerNotFound",e[e.UserNotFound=101]="UserNotFound",e[e.EmailNotVerified=131]="EmailNotVerified",e[e.UserDisabled=133]="UserDisabled",e[e.InvalidYearGroup=200]="InvalidYearGroup",e[e.MissingYearGroup=201]="MissingYearGroup",e[e.NewYearGroupNotSet=202]="NewYearGroupNotSet",e[e.ObjectNotFoundInBackboneClassification=300]="ObjectNotFoundInBackboneClassification",e[e.ObjectNotFoundInBackboneAudience=301]="ObjectNotFoundInBackboneAudience"}(fe||(fe={})),function(e){e[e.RolloverYearGroup=1]="RolloverYearGroup",e[e.DeactivateUser=2]="DeactivateUser",e[e.ChangeYearGroup=3]="ChangeYearGroup",e[e.DeleteUser=4]="DeleteUser",e[e.CreateUser=5]="CreateUser",e[e.ResetPassword=6]="ResetPassword",e[e.AddUsersClassroom=7]="AddUsersClassroom",e[e.SendAccountReminderEmail=8]="SendAccountReminderEmail",e[e.ActivateUser=9]="ActivateUser",e[e.AddToBackboneClassification=10]="AddToBackboneClassification",e[e.AddToClassification=11]="AddToClassification",e[e.AddToBackboneAudience=12]="AddToBackboneAudience",e[e.AddToAudience=13]="AddToAudience",e[e.AddVideosSeries=14]="AddVideosSeries",e[e.AddVideosDistributor=15]="AddVideosDistributor",e[e.AddVideosProductionCompany=16]="AddVideosProductionCompany",e[e.AddVideosProducer=17]="AddVideosProducer",e[e.AddVideosDirector=18]="AddVideosDirector",e[e.AddVideosLibrary=19]="AddVideosLibrary",e[e.AddVideosResourceAndLinks=21]="AddVideosResourceAndLinks",e[e.AddVideosTag=22]="AddVideosTag",e[e.SendAccountActivationEmail=23]="SendAccountActivationEmail",e[e.RemoveUser=24]="RemoveUser",e[e.Rostering=25]="Rostering"}(me||(me={})),n(74421),n(84868),a.T.encloseNamespace("userManager.utils"),me.ActivateUser,me.AddUsersClassroom,me.ChangeYearGroup,me.DeactivateUser,me.DeleteUser,me.ResetPassword,me.RolloverYearGroup,me.SendAccountReminderEmail,me.CreateUser,me.SendAccountActivationEmail,me.RemoveUser;var pe=(a.T.encloseNamespace("sharedSearch.utils"),function(e){switch(e){case"bite-sized":return"...179999";case"short":return"180000...299999";case"medium":return"300000...899999";case"long":return"900000..."}}),ye=(a.T.encloseNamespace("sharedSearch.utils"),function(e){var t=(new Date).getFullYear();switch(e){case"any-year":return"";case"this-year":return"".concat(t,"...");case"last-3-years":return"".concat(t-3,"...");case"last-5-years":return"".concat(t-5,"...")}});function ge(e,t){return e.split("-to-").map((function(e){return t.find((function(t){return t.code===e}))}))}function be(e){return be="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},be(e)}function he(e,t,n){var r;return r=function(e,t){if("object"!=be(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=be(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(t),(t="symbol"==be(r)?r:String(r))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ee(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=Ae(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}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 a,o=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){l=!0,a=e},f:function(){try{o||null==n.return||n.return()}finally{if(l)throw a}}}}function Se(e){return function(e){if(Array.isArray(e))return Oe(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Ae(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 Ae(e,t){if(e){if("string"==typeof e)return Oe(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)?Oe(e,t):void 0}}function Oe(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 Ce=a.T.encloseNamespace("sharedSearch.utils"),we={classification:!0,categoryId:!0,channel:!0},ke={displayTwoLayers:function(e){var t=this;return"nested-checkbox"===e.type&&!!this.hasManyFilterOptions(e.options)&&!e.options.every((function(e){return!t.hasManyFilterOptions(null==e?void 0:e.secondLayerOptions)}))},hasManyFilterOptions:function(e){return e.length>=2},displayTwoColumns:function(e){var t;return we[e.id]&&(null===(t=e.options)||void 0===t?void 0:t.length)>=10},showPresentationFilter:function(e){var t,n;return!!(null===(t=e.options)||void 0===t?void 0:t.length)&&(e.options.length>1||!!(null===(n=w.m.first(e.options).secondLayerOptions)||void 0===n?void 0:n.length))},getMoreFilters:function(e){return{id:"moreFilters",name:Ce("moreFilters"),type:"more-filters",filters:e}},mapTypeToComponent:function(e){switch(e){case"switch":return function(e){return r.createElement($,Object.assign({key:e.id},e))};case"checkbox":return function(e){return r.createElement(q,Object.assign({key:e.id},e))};case"nested-checkbox":return function(e){return r.createElement(H,Object.assign({key:e.id},e))};case"radio":return function(e){return r.createElement(Z,Object.assign({key:e.id},e))};case"rating":return function(e){return r.createElement(le,Object.assign({key:e.id},e))};case"dropdown":return function(e){return r.createElement(K,Object.assign({key:e.id},e))};default:return function(){return r.createElement(r.Fragment,null)}}},deriveInitialStateFromQuery:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3?arguments[3]:void 0,i={sort:{active:!!e.sort,selection:Le(e,t,"sort")},classification:{active:!!e.classification,selection:Le(e,t,"classification")},presentation:{active:!!e.presentation,selection:Le(e,t,"presentation")},type:{active:!!e.type,selection:Le(e,t,"type")},rating:{active:!!e.rating,selection:Le(e,t,"rating")},interactives:{active:e.interactives},clips:{active:e.clips},yearGroup:{active:!!e.yearGroup,selection:Le(e,t,"yearGroup")},moviesAndTv:{active:!!e.moviesAndTv},classroom:{active:!!e.classroom,selection:Le(e,t,"classroom")},audience:{active:!!e.audience,selection:Le(e,t,"audience")},hasResources:{active:e.hasResources},hasSubtitles:{active:e.hasSubtitles},productionYear:{active:!!e.productionYear,selection:Le(e,null==n?void 0:n.filters,"productionYear")},isHd:{active:e.isHd},producedByClickView:{active:e.producedByClickView},duration:{active:e.duration,selection:Le(e,null==n?void 0:n.filters,"duration")},tagOrClassification:{active:!!e.tagOrClassification,selection:Le(e,t,"tagOrClassification")},status:{active:!!e.status,selection:Le(e,t,"status")},jobStatus:{active:!!e.jobStatus,selection:Le(e,t,"jobStatus")},isAdmin:{active:e.isAdmin},bulkActionType:{active:!!e.bulkActionType,selection:Le(e,t,"bulkActionType")},userType:{active:!!e.userType,selection:Le(e,t,"userType")},filter:{active:!!e.filter,selection:Le(e,t,"filter")},channel:{active:!!e.channel,selection:Le(e,t,"channel")},dateBroadcast:{active:!!e.dateBroadcast,selection:Le(e,t,"dateBroadcast")},categoryId:{active:!!e.categoryId,selection:Le(e,t,"categoryId")},hasInteractives:{active:!!e.hasInteractives,selection:Le(e,t,"hasInteractives")}},a=t.reduce((function(e,t){return e[t.id]=i[t.id],e}),{});return(null==n?void 0:n.filters)&&(a.moreFilters=n.filters.reduce((function(e,t){return e[t.id]=i[t.id],e}),{})),a.appLink=r,a},hasActiveFilters:function(e){var t=Object.keys(e);return!!t.length&&!!t.filter((function(t){return"query"!==t&&"cursor"!==t&&"page"!==t&&!(Array.isArray(e[t])&&!e[t].length)})).length},getLabel:function(e,t){var n,r;if(!(null===(n=t.selection)||void 0===n?void 0:n.length))return e.name;if("dropdown"===e.type)return w.m.first(t.selection).name;if("radio"===e.type){var i=w.m.first(t.selection);return!i||i.default?e.name:i.name}if("nested-checkbox"===e.type||"checkbox"===e.type){var a=e.options.find((function(e){return e.default&&t.selection.find((function(t){return t.id===e.id}))}));if(a)return e.name;if(e.secondaryId){var o=null===(r=t.selection)||void 0===r?void 0:r.reduce((function(t,n){var r,i,a,o=e.options,l=o.findIndex((function(e){return e.id===n.id}));return 0===(null===(r=o[l].secondLayerOptions)||void 0===r?void 0:r.length)?t+1:null!==(a=t+(null===(i=n.secondLayerSelection)||void 0===i?void 0:i.length))&&void 0!==a?a:0}),0);return"".concat(e.name," - ").concat(o)}return"".concat(e.name," - ").concat(t.selection.length)}if("rating"===e.type){if(!t.selection.length)return e.name;var l=w.m.first(t.selection),c=w.m.last(t.selection);return 1===t.selection.length?"".concat(e.name,": ").concat(l.code):"".concat(e.name,": ").concat(l.code," to ").concat(c.code)}},buildFrontendFilterParams:function(e,t){var n=Object.assign({},e);return t.forEach((function(e){var t,r;if(null==e?void 0:e.filter){var i=e.filter,a=i.id,o=i.type,l=e.state,c=l.active,s=l.selection;switch(o){case"switch":case"button":n[a]=c?"true":"";break;case"radio":case"dropdown":var u=1===(null===(t=e.state.selection)||void 0===t?void 0:t.length)&&(null===(r=w.m.first(e.state.selection))||void 0===r?void 0:r.default);n[a]=e.state.selection.length&&!u?w.m.first(e.state.selection).id:"";break;case"nested-checkbox":n[a]=c?s.map((function(e){return e.id})):null;var d,f=e.filter.secondaryId;f&&(n[f]=(d=[]).concat.apply(d,Se(s.map((function(e){return e.secondLayerSelection.map((function(e){return e.id}))})))));break;case"checkbox":if(!c){n[a]=null;break}var m,v=[],p=Ee(s);try{for(p.s();!(m=p.n()).done;){var y=m.value,g=y.id.toString().split(":");if(g.length>1){var b,h=Ee(g);try{for(h.s();!(b=h.n()).done;){var E=b.value;v.push(E)}}catch(e){h.e(e)}finally{h.f()}}else v.push(y.id)}}catch(e){p.e(e)}finally{p.f()}n[a]=v;break;case"tag":n[a]=c?s.map((function(e){return e.id})):null;break;case"rating":n[a]=c?function(e){if(!(null==e?void 0:e.length))return"";var t=w.m.first(e),n=w.m.last(e);return 1===e.length?t.code:"".concat(t.code,"-to-").concat(n.code)}(s):null}n[a]||delete n[a]}})),k.t.omit(n,["cursor"])},buildBackendFilterParams:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>3?arguments[3]:void 0,r={query:!0,type:!0},i=n?he(he({},"filters.presentation",arguments.length>2?arguments[2]:void 0),"isLearner",n):{};return Object.keys(e).reduce((function(n,i){if(r[i])return n;var a=e[i];return Array.isArray(a)&&!a.length||!a?n:"rating"===i?(n["".concat(ve).concat(i)]=function(e,t){var n=ge(e,t);if(1===n.length){var r=w.m.first(n);return"0...".concat(r.value)}var i=w.m.last(n);return"0...".concat(i.value)}(a,t),n):"productionYear"===i?(n["".concat(ve).concat(i)]=ye(a),n):"duration"===i?(n["".concat(ve).concat(i)]=pe(a),n):"moviesAndTv"===i?(n["".concat(ve,"curationTag")]=ce.MOVIES_AND_TV,n):(n["".concat(ve).concat(i)]=a,n)}),i)},getAppliedIndices:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).type;if(e){if(!Array.isArray(e))return[e];if(e.length)return e}return["series","video","playlist","classification","clip","interactive","company"]},applyFilter:function(e,t,n,r){if(!k.t.isEqual(t,n)){var i=Object.keys(n).map((function(t){var r,i,a=e.find((function(e){return e.id===t})),o=n[t],l=1===(null===(r=o.selection)||void 0===r?void 0:r.length)&&(null===(i=w.m.first(o.selection))||void 0===i?void 0:i.default);return{filter:a,state:{active:o.active&&!l,selection:o.selection}}})),a=x.Q.Ab.GetQuery();x.Q.C$.trigger(Object.assign(Object.assign({},r),{params:ke.buildFrontendFilterParams(a,i)}),{replace:!0})}},mixinDisabledFields:function(e,t,n,r){var i,a=[].concat(Se(n),Se(null!==(i=null==r?void 0:r.filters)&&void 0!==i?i:[]));a=function(e,t,n){var r=n.reduce((function(e,t){return e[t]=!0,e}),{});return t.map((function(n){var i;if(!(null===(i=n.compatibleIndices)||void 0===i?void 0:i.length))return n;if(!n.compatibleIndices.find((function(e){return r[e]})))return Object.assign(Object.assign({},n),{disabled:!0});var a=Object.keys(e).filter((function(t){var n=e[t];return"active"in n&&n.active})),o=!1;return a.forEach((function(e){var r;if(!o){var i=t.find((function(t){return t.id===e}));if(null===(r=i.compatibleIndices)||void 0===r?void 0:r.length){var a=i.compatibleIndices.reduce((function(e,t){return e[t]=!0,e}),{});n.compatibleIndices.find((function(e){return a[e]}))||(o=!0)}}})),Object.assign(Object.assign({},n),{disabled:o})}))}(e,a,t),a=function(e,t){return t.map((function(n){if(!_.q.isFunction(n.disableOptions))return n;var r=n.disableOptions(n.options,t,e);return Object.assign(Object.assign({},n),{options:r})}))}(e,a);var o={mainFilters:a.filter((function(e){return n.find((function(t){return t.id===e.id}))}))};return(null==r?void 0:r.filters)&&(o.moreFilters=Object.assign(Object.assign({},r),{filters:a.filter((function(e){return r.filters.find((function(t){return t.id===e.id}))}))})),o},logFilterEvent:function(e,t,n,r,i){var a,o=[];null==e||e.forEach((function(e){var t=n[e.id];t.active&&o.push({type:e.id,selection:t.selection})})),null===(a=null==t?void 0:t.filters)||void 0===a||a.forEach((function(e){var t=n.moreFilters[e.id];t.active&&o.push({type:e.id,selection:t.selection})})),o.length||(i.descriptor=C.OR.Reset),P.k.logUserAction({query:null!=r?r:"",filters:o},P.k.mergeOptions(i,{workflowPhase:C.eu.Complete,actionType:C.Vw.Filter}))},getObjectTypeOptions:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return[{id:"classification",name:Ce("topics")},{id:"playlist",name:Ce("playlists")},{id:"series",name:Ce("series")},{id:"video",name:Ce("videos")},{id:"clip",name:Ce("clips")},{id:"interactive",name:Ce("interactives")}].filter((function(t){return!e.find((function(e){return e===t.id}))}))},getIsObjectTypeOptionDisabled:function(e,t,n){return e.map((function(e){var r=!1;return t.forEach((function(t){var i;if(!r){var a=n[t.id]||n.moreFilters[t.id];(null==a?void 0:a.active)&&(null===(i=t.compatibleIndices)||void 0===i?void 0:i.length)&&(t.compatibleIndices.find((function(t){return e.id===t}))||(r=!0))}})),Object.assign(Object.assign({},e),{disabled:r})}))},getNameSortOptions:function(){return[{id:"newest",name:Ce("newest")},{id:"oldest",name:Ce("oldest")},{id:"first-name-atoz",name:Ce("firstNameAToZ")},{id:"first-name-ztoa",name:Ce("firstNameZToA")},{id:"surname-atoz",name:Ce("surnameAToZ")},{id:"surname-ztoa",name:Ce("surnameZToA")}]},getYearGroupOptions:function(e){return(null==e?void 0:e.length)?e.map((function(e){return{id:e.value.toString(),name:e.name}})):[]},getStatusOptions:function(){return[{id:"active",name:Ce("active")},{id:"deactivated",name:Ce("deactivated")},{id:"pending",name:Ce("pending")}]},getJobStatusOptions:function(){return[{id:"completed",name:Ce("completed")},{id:"failed",name:Ce("errored")},{id:"inProgress",name:Ce("inProgress")}]},getTvFieldsOptions:function(){return[{id:"0",name:Ce("allFields"),default:!0},{id:"1",name:Ce("titleDescriptionField")},{id:"2",name:Ce("captionsField")}]},getTvChannelOptions:function(e){return(null==e?void 0:e.length)?e.map((function(e){return{id:e.name,name:e.name}})):[]},getTvDateBroadcastOptions:function(){return[{id:"any-time",name:Ce("anyTime"),default:!0},{id:"yesterday",name:Ce("yesterday")},{id:"last-week",name:Ce("lastWeek")},{id:"last-2-weeks",name:Ce("last2Weeks")}]},getCategoriesOptions:function(e){return(null==e?void 0:e.length)?e.map((function(e){return{id:e.data.id,name:e.data.name}})):[]}};function Le(e){var t,n,r=arguments.length>2?arguments[2]:void 0,i=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:[]).find((function(e){return e.id===r}));if(!i)return[];if(!e[r])return null!==(n=null===(t=i.options)||void 0===t?void 0:t.filter((function(e){return e.default})))&&void 0!==n?n:[];if("rating"===r)return function(e,t){if(Array.isArray(e))return e;var n=t.options,r=ge(e,n),i=w.m.last(r);return n.filter((function(e){return e.value>0&&e.value<=i.value}))}(e[r],i);var a=e[r];return Array.isArray(a)||(a=[a]),"classification"===r?function(e,t){var n,r;return null!==(r=null===(n=null==e?void 0:e.options)||void 0===n?void 0:n.filter((function(e){return e.id.split(":").every((function(e){return t.find((function(t){return t.toString()===e.toString()}))}))})))&&void 0!==r?r:[]}(i,a):"presentation"===r?function(e,t,n){return Te(e,t).map((function(e){var t=n.audience,r=Te(e.secondLayerOptions,t);return Object.assign(Object.assign({},e),{secondLayerSelection:r})}))}(i.options,a,e):Te(i.options,a)}function Te(e,t){var n;return Array.isArray(t)||(t=[t]),null!==(n=null==e?void 0:e.filter((function(e){return t.find((function(t){return t.toString()===e.id.toString()}))})))&&void 0!==n?n:[]}var Ie={hideCaret:"KDq7l",filterMenu:"E9o_Q",twoColumnsWidth:"C70vU",nestedCheckboxesWidth:"kUHcg",switchWidth:"bi1FH",moreFiltersWidth:"rbr22",svgContainer:"UwDMA"};function Ne(e){return Ne="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},Ne(e)}function Re(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,i,a,o,l=[],c=!0,s=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(l.push(r.value),l.length!==t);c=!0);}catch(e){s=!0,i=e}finally{try{if(!c&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(s)throw i}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return je(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?je(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function je(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function _e(e){var t=r.useContext(R).state,n=t[e.filter.id],i="dropdown"===e.filter.type,a=Re(r.useState(e.filter.name),2),o=a[0],l=a[1],c=Re(r.useState(!1),2),s=c[0],u=c[1],d=Re(r.useState(n),2),f=d[0],m=d[1];function v(e){m(e),i&&p(e)}function p(){var r,i,a,o,l=arguments.length>0&&void 0!==arguments[0]?arguments[0]:f;ke.applyFilter([e.filter],n,(r={},i=e.filter.id,a=l,o=function(e,t){if("object"!=Ne(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=Ne(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(i),(i="symbol"==Ne(o)?o:String(o))in r?Object.defineProperty(r,i,{value:a,enumerable:!0,configurable:!0,writable:!0}):r[i]=a,r),t.appLink)}r.useEffect((function(){l(ke.getLabel(e.filter,n)),m(n)}),[e.filter,n.selection]);var y,g=r.useMemo((function(){return e.filter.customComponent?e.filter.customComponent:ke.mapTypeToComponent(e.filter.type)}),[e.filter.type]),b=i?"":Ie.hideCaret,E=(y=e.filter,ke.displayTwoColumns(y)?Ie.twoColumnsWidth:"classification"===y.id?Ie.classificationWidth:ke.displayTwoLayers(y)?Ie.nestedCheckboxesWidth:"switch"===y.type?Ie.switchWidth:"");return"button"===e.filter.type?r.createElement(g,{filter:e.filter,draftState:f,setDraftState:v}):r.createElement(L.Dropdown,{onToggle:function(e){u(e),e||i||p()},show:s},r.createElement(L.Dropdown.Toggle,{id:"filterButton-".concat(e.filter.id),className:"".concat("fw-semibold mx-1 btn d-flex align-items-center"," ").concat(b),variant:n.active&&!i?"dark":"outline-dark",disabled:e.filter.disabled},!!e.filter.icon&&r.createElement("div",{className:Ie.svgContainer},r.createElement(h.x,{svgName:e.filter.icon})),o),r.createElement(L.Dropdown.Menu,null,r.createElement("div",{className:"mx-1 ".concat(Ie.filterMenu," ").concat(E," ").concat(i?"":"px-2 py-1")},r.createElement(g,{filter:e.filter,draftState:f,setDraftState:v}),!i&&!e.filter.disabled&&r.createElement(N,{active:f.active,onClickReset:function(){var t,n=null===(t=e.filter.options)||void 0===t?void 0:t.find((function(e){return e.default}));m({active:!1,selection:n?[n]:[]})},onClickApply:function(){p(),u(!1)}}))))}function xe(e){return xe="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},xe(e)}var Pe={getSetStateByKey:function(e,t,n){return function(r){return e((function(e){var i=_.q.isFunction(n)?n:_.q.useIdentity();return Object.assign(Object.assign({},e),function(e,t,n){var r;return r=function(e,t){if("object"!=xe(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=xe(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(t),(t="symbol"==xe(r)?r:String(r))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}({},t,i(r,e)))}))}}};function Fe(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,i,a,o,l=[],c=!0,s=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(l.push(r.value),l.length!==t);c=!0);}catch(e){s=!0,i=e}finally{try{if(!c&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(s)throw i}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return De(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)?De(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 De(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 Be(e){return Object.keys(e).reduce((function(t,n){return e[n].active?t+1:t}),0)}function Ue(e){var t=r.useContext(R).state,n=t.moreFilters,i=Fe(r.useState(e.filter.name),2),a=i[0],o=i[1],l=Fe(r.useState(!1),2),c=l[0],s=l[1],u=Fe(r.useState(n),2),d=u[0],f=u[1],m=Fe(r.useState(Be(n)),2),v=m[0],p=m[1],y=Object.keys(n).map((function(e){return"".concat(e,":").concat(n[e].active)})).join("-");function g(){ke.applyFilter(e.filter.filters,n,d,t.appLink)}r.useEffect((function(){f(n),p(Be(n))}),[e.filter,y]),r.useEffect((function(){o(v?"".concat(e.filter.name," - ").concat(v):e.filter.name)}),[v]);var b="fw-semibold ".concat(Ie.hideCaret," mx-1 btn");return r.createElement(L.Dropdown,{onToggle:function(e){s(e),e||g()},show:c},r.createElement(L.Dropdown.Toggle,{id:e.filter.id,className:b,variant:v?"dark":"outline-dark"},a),r.createElement(L.Dropdown.Menu,{onClick:function(e){return e.stopPropagation()}},r.createElement("div",{className:"mx-1 ".concat(Ie.moreFiltersWidth," ").concat("dropdown"!==e.filter.type?"px-2 py-1":"")},e.filter.filters.map((function(e){var t=e.customComponent?e.customComponent:ke.mapTypeToComponent(e.type);return r.createElement("div",{key:e.id,className:"mb-2"},r.createElement(t,{filter:e,draftState:d[e.id],setDraftState:Pe.getSetStateByKey(f,e.id),isOnMoreFilters:!0}))})),r.createElement(N,{active:!!Object.keys(d).find((function(e){return d[e].active})),onClickReset:function(){var t=Object.keys(n).reduce((function(t,n){var r,i=null===(r=e.filter.filters.find((function(e){return e.id===n})).options)||void 0===r?void 0:r.find((function(e){return e.default}));return t[n]={active:!1,selection:i?[i]:[]},t}),{});f(t)},onClickApply:function(){g(),s(!1)}}))))}var qe,Me=n(91807),Ve=i().memo((function(e){var t=e.tagClass,n="partial-loading-background d-inline-block rounded-pill py-1 px-2 mb-1 me-1 text-nowrap ".concat(void 0===t?"":t," ").concat(Me.Z.partialTag);return i().createElement("div",{className:"mt-1"},i().createElement("span",{className:n}," "))})),Ge=n(37360),Xe=n(49642);function Ye(e){return i().createElement(i().Fragment,null,!!e.name&&i().createElement(Xe.F,{appLink:e.appLink,analyticsData:e.analyticsData,analyticsOptions:e.analyticsOptions,className:"text-decoration-none ".concat(e.appLink?"curated-widget-link":"")},i().createElement("h2",{className:"h4 curated-widget-heading"},e.name,!!e.appLink&&i().createElement(h.x,{svgName:E.vn.ChevronRight,size:h.S.Small}))),!!e.description&&i().createElement("p",{className:"description curated-widget-description"},i().createElement("span",{className:"clamp-2"},e.description)))}!function(e){e.Percentage="%",e.Pixels="px"}(qe||(qe={}));var Qe=new Image;Qe.src="data:image/gif;base64,R0lGODlhAQABAIAAAAUEBAAAACwAAAAAAQABAAACAkQBADs=";var We,He=function(e){e.dataTransfer.setDragImage&&_.q.isFunction(e.dataTransfer.setDragImage)&&e.dataTransfer.setDragImage(Qe,0,0)},ze=Ge.V.isTouchScreen(),$e=r.forwardRef((function(e,t){var n,i,a,o,l=e.children,c=e.positionType,s=e.onDrag,u=e.onDragEnd,d=e.onTouchMove,f=e.onTouchEnd,m=e.percentageDragged,v=e.position,p=void 0===v?0:v;return r.createElement("div",Object.assign({className:"d-flex flex-nowrap position-relative w-100",style:(i=p,a=c,o=m,a===qe.Percentage&&o&&(i-=o),{transform:"translate3d(".concat(i).concat(a,", 0px, 0px)"),transition:"transform .4s ease-in-out"}),ref:t},(n={},s&&u&&(n.draggable=!0,n.onDragEnd=u,n.onDragStart=He,n.onDragOver=s),d&&f&&ze&&(n.onTouchMoveCapture=d,n.onTouchEndCapture=f),n)),l)})),Ke="VSAPU",Ze="kgeXh";!function(e){e[e.Left=0]="Left",e[e.Right=1]="Right"}(We||(We={}));var Je,et=r.memo((function(e){var t,n,i,a=e.direction===We.Left,o=a?E.vn.ChevronLeft:E.vn.ChevronRight;return e.hide?r.createElement(r.Fragment,null):r.createElement("div",{className:"_ejId",style:"videos"===(null===(n=e.state)||void 0===n?void 0:n.contents)?{paddingBottom:56.25/(null===(i=e.state)||void 0===i?void 0:i.viewableItems)+"%"}:{height:"100%"}},e.useGradientBackdrop&&r.createElement("div",{className:a?"".concat("Pt3nx"," ").concat(e.leftGradientClassName):"".concat("ZuAif"," ").concat(e.rightGradientClassName)}),!e.hideExtendedClickableArea&&r.createElement("div",{role:"button",onClick:e.onClick,className:"".concat("AtsWP"," ").concat(a?Ke:Ze)}),r.createElement("div",{role:"button",className:"".concat((t="BVcIS",t+=a?" ".concat(Ke," ").concat(e.leftButtonClassName):" ".concat(Ze," ").concat(e.rightButtonClassName))," ").concat("gAsE9"," ").concat(e.className||""),onClick:e.onClick},e.hoverText&&r.createElement("span",{className:"ps-3 pe-2 ".concat("APA36")},e.hoverText),r.createElement(h.x,{svgName:o,size:h.S.Medium,className:"svg-container d-inline-block ".concat("Ev4hr")})))}));!function(e){e.Init="init",e.Next="next",e.Previous="previous",e.Resize="resize",e.Drag="drag",e.Update="update",e.JumpToIndex="jump-to-index"}(Je||(Je={}));var tt=n(90547),nt=n(5256),rt=n(29267);function it(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 at,ot,lt,ct=n(89146);!function(e){e[e.Draft=0]="Draft",e[e.Published=1]="Published",e[e.Archived=2]="Archived"}(at||(at={})),function(e){e.ThumbnailHeroMedia="thumbnail_hero_media",e.ThumbnailFeaturedMedia="thumbnail_featured_media",e.ThumbnailSlidingListSmall="thumbnail_sliding_list_small",e.ThumbnailSlidingListLarge="thumbnail_sliding_list_large",e.CoverSlidingPillListSmall="cover_sliding_pill_list_small",e.CoverFixedPillListLarge="cover_fixed_pill_list_large",e.CoverFixedPillListXSmall="cover_fixed_pill_list_xsmall",e.CoverFixedTileList="cover_fixed_tile_list",e.PosterSlidingListLarge="poster_sliding_list_large",e.PosterSlidingListMedium="poster_sliding_list_medium",e.PosterSlidingListSmall="poster_sliding_list_small",e.FeaturedThumbnailSlidingList="featured_thumbnail_sliding_list",e.HeroBanner="hero_banner",e.HeroBannerSmall="hero_banner_small",e.HeroThumbnailSmall="hero_thumbnail_small",e.ThumbnailFixedListXLarge="thumbnail_fixed_list_xlarge",e.ThumbnailFixedListLarge="thumbnail_fixed_list_large",e.ThumbnailFixedListSmall="thumbnail_fixed_list_small",e.EditableCoverFixedPillListSmall="editable_cover_fixed_pill_list_small",e.Heading="heading",e.ThumbnailFixedListMediaLarge="thumbnail_fixed_list_media_large",e.PopoutThumbnailSlidingListLarge="popout_thumbnail_sliding_list_large",e.PopoutThumbnailSlidingListSmall="popout_thumbnail_sliding_list_small",e.OnboardingSteps="onboarding_steps",e.CircleLogoSlidingList="circle_logo_sliding_list",e.FilterSlidingPillListSmall="filter_sliding_pill_list_small",e.EventIconSlidingList="event_icon_sliding_list"}(ot||(ot={})),function(e){e.CuratedMedia="curated_media",e.PlaylistMedia="playlist_media",e.ClassificationMedia="classification_media",e.LatestReleasedVideos="latest_released_videos",e.ContinueWatching="continue_watching_videos",e.CuratedClassifications="curated_classifications",e.Classifications="classifications",e.ClassificationLatestReleasedVideos="classification_latest_released_videos",e.SpecialEventClassifications="special_event_classifications",e.CuratedSeries="curated_series",e.CuratedPlaylists="curated_playlists",e.Blurb="blurb",e.DynamicBlurb="dynamic_blurb",e.CuratedCompanies="curated_companies",e.Ratings="ratings",e.Presentations="presentations",e.ClassificationPlaylists="classification_playlists",e.ClassificationSeries="classification_series",e.ClassificationFeaturedVideo="classification_featured_video",e.ClassificationPinnedVideos="classification_pinned_videos"}(lt||(lt={}));var st,ut=n(84938);function dt(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.Draft="Draft",e.Published="Published",e.Archived="Archived"}(st||(st={}));var ft={getSliderAnalyticsOptions:function(){return{actionType:C.Vw.Click,location:C.LZ.SlidingList,entity:C.py.Widget,descriptor:C._S.Slide}},getSliderItemAnalyticsOptions:function(){return{location:C.LZ.SlidingListItem}},getSliderHeadingAnalyticsOptions:function(){return{actionType:C.Vw.Click,location:C.LZ.SlidingList,entity:C.py.Widget,descriptor:C._S.Title}},useGetContent:function(e,t){return i().useMemo((function(){var n;if(!e)return{content:null,unfilteredContent:null};if(!Array.isArray(e))return{content:e,unfilteredContent:e};var r,i=null!==(n=null==t?void 0:t.reduce((function(e,t){return e[t.id]=t,e}),{}))&&void 0!==n?n:{},a=function(e){if(Array.isArray(e))return dt(e)}(r=e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(r)||function(e,t){if(e){if("string"==typeof e)return dt(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)?dt(e,t):void 0}}(r)||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.")}(),o=a.sort((function(e,t){var n,r,o,l,c=null!==(r=null===(n=i[e.id])||void 0===n?void 0:n.index)&&void 0!==r?r:a.findIndex((function(t){return t.id===e.id})),s=null!==(l=null===(o=i[t.id])||void 0===o?void 0:o.index)&&void 0!==l?l:a.findIndex((function(e){return e.id===t.id}));return c<s?-1:c>s?1:0}));return{content:o.filter((function(e){var t;return!(null===(t=i[e.id])||void 0===t?void 0:t.hidden)})),unfilteredContent:o}}),[e,t])},getCustomAppLink:function(e){var t,n,r,i,a,o;return(null===(t=e.metadata)||void 0===t?void 0:t.appLink)===ut.OL.LatestReleases?null===(r=null===(n=e.appLinks)||void 0===n?void 0:n.latestReleases)||void 0===r?void 0:r.call(n):(null===(i=e.metadata)||void 0===i?void 0:i.appLink)===ut.OL.ExploreAllTopics?null===(o=null===(a=e.appLinks)||void 0===a?void 0:a.allTopics)||void 0===o?void 0:o.call(a,e.presentation.id):null},getWidgetStatus:function(e){var t=e.status;if("string"==typeof t)switch(t){case st.Archived:t=at.Archived;break;case st.Published:t=at.Published;break;case st.Draft:t=at.Draft}return t},formatResponseData:function(e,t){var n=e.content;if(!n)return e;switch("data"in n?e.content=n.data:Array.isArray(n)||(e.content=[n]),e.widgetId){case lt.ClassificationSeries:e.content=e.content.filter((function(e){var t;return!!(null===(t=e.tallPoster)||void 0===t?void 0:t.id)}));break;case lt.ClassificationPlaylists:e.content=e.content.filter((function(e){var t;return!!(null===(t=e.cover)||void 0===t?void 0:t.id)}));break;case lt.ContinueWatching:e.content=e.content.map((function(e){return e.object}));default:break;case lt.Presentations:e.content=e.content.filter((function(e){var n;return e.id.toString()!==(null===(n=null==t?void 0:t.id)||void 0===n?void 0:n.toString())}))}return e},isWidgetInTableOfContents:function(e){return!!(null==e?void 0:e.showInTableOfContents)},hasNoContent:function(e){return e===lt.Blurb},canDisplayOnScreenSize:function(e,t,n){return t!==lt.Blurb||n!==ot.HeroBannerSmall||!e.xs&&!e.sm}},mt=function(e,t,n){return function(){e.container.current&&(e.container.current.style.transition=""),t({type:Je.Resize,payload:{elementRefs:e,mediaQuery:n}})}},vt=function(e){return function(){e.current&&(e.current.style.transition="transform .4s ease-in-out")}},pt=function(e,t,n,r,i){return function(a){var o=a.clientX,l=r;l||(l=Object.assign(Object.assign({},t),{initialMouseX:o}),i(l),e.current.style.transition=""),n({type:Je.Drag,payload:{widgetSnapshot:l,currentMouseX:o}})}},yt=function(e,t){return function(){e.current.style.transition="transform .4s ease-in-out",t(null)}};function gt(e){return e===tt.r.XS?200:e===tt.r.SM||e===tt.r.MD?350:500}var bt={offset:0,containerLeftPosition:null,containerRightPosition:null,firstElementPosition:null,lastElementPosition:null,hideLeftButton:!0,hideRightButton:!0,maxSlideDistance:0,leftOffsetLimit:null},ht=function(e){var t=e.elementRefs,n=t.container,r=t.lastElement;if(!(null==n?void 0:n.current)||!(null==r?void 0:r.current))return bt;var i=n.current.getBoundingClientRect(),a=i.left,o=i.right,l=a,c=r.current.getBoundingClientRect().right,s=o-c;return Object.assign(Object.assign({},bt),{containerLeftPosition:a,containerRightPosition:o,firstElementPosition:l,lastElementPosition:c,hideRightButton:c<o,leftOffsetLimit:s,maxSlideDistance:gt(e.mediaQuery)})},Et=function(e){var t=ht(Object.assign(Object.assign({},e),e.elementRefs));return Object.assign(Object.assign({},t),{maxSlideDistance:gt(e.mediaQuery)})},St=function(e){var t=e.firstElementPosition,n=e.lastElementPosition,r=e.maxSlideDistance,i=e.offset,a=e.containerRightPosition,o=n-a>=r?r:n-a;return{firstElementPosition:t-o,lastElementPosition:n-o,offset:i-o,hideRightButton:n-o===a,hideLeftButton:!1}},At=function(e){var t=e.containerLeftPosition,n=e.firstElementPosition,r=e.lastElementPosition,i=e.maxSlideDistance,a=e.offset,o=n+i<=t,l=o?i:Math.abs(a);return{firstElementPosition:n+l,lastElementPosition:r+l,offset:a+l,hideLeftButton:!o||n+l===t,hideRightButton:!1}},Ot=function(e,t){var n=t.widgetSnapshot,r=t.currentMouseX;if(n.hideLeftButton&&n.hideRightButton)return{};var i=n.initialMouseX-r,a=n.offset-i,o=n.firstElementPosition-i,l=n.lastElementPosition-i,c=!1,s=!1;return o>e.containerLeftPosition&&(a=0,o=e.containerLeftPosition,l=e.lastElementPosition,c=!0),l<=e.containerRightPosition&&(a=e.leftOffsetLimit,o=e.containerLeftPosition-Math.abs(e.leftOffsetLimit),l=n.containerRightPosition,s=!0),{offset:a,firstElementPosition:o,lastElementPosition:l,hideLeftButton:c,hideRightButton:s}};function Ct(e,t){switch(t.type){case Je.Init:return Object.assign(Object.assign({},e),ht(t.payload));case Je.Resize:return Object.assign(Object.assign({},e),Et(t.payload));case Je.Next:return Object.assign(Object.assign({},e),St(e));case Je.Previous:return Object.assign(Object.assign({},e),At(e));case Je.Drag:return Object.assign(Object.assign({},e),Ot(e,t.payload));default:return e}}var wt={itemSpacing:"fDc_6",mobileScroll:"aLSzv",leftGradient:"YheD1",leftButton:"ISepF",rightGradient:"i9XEE",rightButton:"OxM84"};function kt(e){return function(e){if(Array.isArray(e))return It(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Tt(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 Lt(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,i,a,o,l=[],c=!0,s=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(l.push(r.value),l.length!==t);c=!0);}catch(e){s=!0,i=e}finally{try{if(!c&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(s)throw i}}return l}}(e,t)||Tt(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 Tt(e,t){if(e){if("string"==typeof e)return It(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)?It(e,t):void 0}}function It(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 Nt(e){var t,n,i,a,o,l,c,s=e.childComponent,u=e.staticChildren,d=e.getWidgetItemAnalyticsData,f=void 0===d?function(){}:d,m=Lt(r.useReducer(Ct,bt),2),v=m[0],p=m[1],y=Lt(r.useState(null),2),g=y[0],b=y[1],h={container:r.useRef(null),firstElement:r.useRef(null),lastElement:r.useRef(null)},E=(t=(0,nt.a)(tt.r.XS),n=(0,nt.a)(tt.r.SM),i=(0,nt.a)(tt.r.MD),a=(0,nt.a)(tt.r.LG),o=(0,nt.a)(tt.r.XL),l=(0,nt.a)(tt.r.XXL),c=tt.r.LG,t&&(c=tt.r.XS),n&&(c=tt.r.SM),i&&(c=tt.r.MD),a&&(c=tt.r.LG),o&&(c=tt.r.XL),l&&(c=tt.r.XXL),c),S=Ge.V.isTabletOrMobile();!function(e,t){var n,i,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],o=function(){e(),window.clearTimeout(n),n=window.setTimeout(t,100)};r.useEffect((function(){return window.addEventListener("resize",t?o:e),function(){return window.removeEventListener("resize",t?o:e)}}),function(e){if(Array.isArray(e))return it(e)}(i=a)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(i)||function(e,t){if(e){if("string"==typeof e)return it(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)?it(e,t):void 0}}(i)||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.")}())}(mt(h,p,E),vt(h.container),[E]);var A=(0,rt.Y)({prevent:!e.lazyLoad}),O=A.ref,C=A.inView,L=e.collection;if(!e.collection&&_.q.isFunction(e.fetch)){var T=e.fetch(C);L=T.data}r.useEffect((function(){L&&!k.t.isEmpty(L)&&p({type:Je.Init,payload:{elementRefs:h,mediaQuery:E}})}),[L]);var I=r.useMemo((function(){var t,n;if(L){var i=null!==(t=null==u?void 0:u.filter((function(e){return"start"===e.position})))&&void 0!==t?t:[],a=null!==(n=null==u?void 0:u.filter((function(e){return"end"===e.position})))&&void 0!==n?n:[],o=L.map((function(t,n){var o;t===w.m.first(L)&&(null==i?void 0:i.length)&&(o=h.firstElement),t!==w.m.last(L)||(null==a?void 0:a.length)||(o=h.lastElement);var l=n+1===L.length;return r.createElement("div",{key:t.id,ref:o,className:"".concat(wt.itemSpacing," ").concat(l&&S?"pe-4":"")},r.createElement(s,{getChildAppLink:e.getChildAppLink,data:t,getSubtitle:e.getSubtitle,analyticsData:Object.assign(Object.assign({itemIndex:n},e.analyticsData),f(t)),analyticsOptions:Object.assign(Object.assign({},null==e?void 0:e.analyticsOptions),ft.getSliderItemAnalyticsOptions())}))}));return i.length&&(o=[].concat(kt(i.map((function(e,t){var n=e.component;return r.createElement("div",{key:"first-widget-component:".concat(t),ref:0===t?h.firstElement:null,className:wt.itemSpacing},r.createElement(n,null))}))),kt(o))),a.length&&(o=[].concat(kt(o),kt(a.map((function(e,t){var n=e.component;return r.createElement("div",{key:"end-widget-component:".concat(t),ref:t===a.length-1?h.lastElement:null,className:wt.itemSpacing},r.createElement(n,null))}))))),r.createElement(r.Fragment,null,o)}}),[L]);if(L&&!L.length&&!(null==u?void 0:u.length))return r.createElement(r.Fragment,null);if(!L||k.t.isEmpty(L))return r.createElement("div",{ref:O},r.createElement(Rt,{partialLoadingComponent:e.partialLoadingComponent,partialLoadingOptions:e.partialLoadingOptions}));var N=function(t){return Object.assign(Object.assign({},e.analyticsData),{name:e.heading,direction:t===Je.Next?"right":"left"})},R=S||e.hideButtons;return r.createElement("div",{className:"mx-n4"},r.createElement("div",{className:"px-4"},r.createElement(Ye,{name:e.heading,description:e.description,appLink:e.headingAppLink})),r.createElement("div",{className:"position-relative"},r.createElement("div",{className:"px-4 py-3 my-n3 position-relative ".concat(S?wt.mobileScroll:"overflow-hidden-x")},r.createElement("div",{className:"position-relative ".concat(e.hideButtons?"overflow-hidden-x":"")},!R&&r.createElement(et,{direction:We.Left,onClick:function(){p({type:Je.Previous}),P.k.logUserAction(N(Je.Previous),ft.getSliderAnalyticsOptions())},leftButtonClassName:wt.leftButton,leftGradientClassName:wt.leftGradient,hide:v.hideLeftButton,useGradientBackdrop:!0}),r.createElement($e,{position:v.offset,positionType:qe.Pixels,onDrag:pt(h.container,v,p,g,b),onDragEnd:yt(h.container,b),ref:h.container},I),!R&&r.createElement(et,{direction:We.Right,onClick:function(){p({type:Je.Next}),P.k.logUserAction(N(Je.Next),ft.getSliderAnalyticsOptions())},hide:v.hideRightButton,rightButtonClassName:wt.rightButton,rightGradientClassName:wt.rightGradient,useGradientBackdrop:!0})))))}Nt.defaultProps={heading:"",description:""};var Rt=function(e){var t=e.partialLoadingComponent,n=e.partialLoadingOptions;return r.createElement("div",{className:"d-flex flex-nowrap overflow-hidden"},ct.u.getPartialLoadingItems(n).map((function(e,n){return r.createElement(t,{key:n})})))},jt=n(34564),_t={tagItem:"EcurS",selected:"FypfE"};function xt(e){var t=e.selectedItems.find((function(t){return t.id===e.data.id}))?"".concat(_t.selected," text-info"):"bg-light";return i().createElement(jt.z,{tag:e.data,appLink:e.appLink,tagClass:"no-decoration ".concat(t," ").concat(_t.tagItem),onClick:function(){return e.onClick(e.data)}})}var Pt={tagItem:"j84HW"};function Ft(e){return Ft="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},Ft(e)}function Dt(e){return function(e){if(Array.isArray(e))return Bt(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 Bt(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)?Bt(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 Bt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Ut(e){var t,n,r,a,o=i().useContext(R).state;if(!(null===(t=e.filter)||void 0===t?void 0:t.id))return i().createElement(i().Fragment,null);var l=o[e.filter.id],c=l.selection,s=null!==(a=null===(r=null===(n=e.filter)||void 0===n?void 0:n.options)||void 0===r?void 0:r.filter((function(e){return!(null==c?void 0:c.find((function(t){return t.id===e.id})))})))&&void 0!==a?a:[];function u(t){var n,r,i,a,s=null,u=-1;if(c.find((function(e,n){u>-1||e.id.toString()===t.id.toString()&&(u=n)})),u>=0){var d=[].concat(Dt(c.slice(0,u)),Dt(c.slice(u+1)));s={active:!!d.length,selection:d}}else s={active:!0,selection:c.concat(t)};ke.applyFilter([e.filter],l,(n={},r=e.filter.id,i=s,a=function(e,t){if("object"!=Ft(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=Ft(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r),(r="symbol"==Ft(a)?a:String(a))in n?Object.defineProperty(n,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):n[r]=i,n),o.appLink)}var d,f=[].concat(Dt(c),Dt(e.isFetching?[]:s));return i().createElement("div",{className:"py-2"},i().createElement("div",{className:(d="mb-3",f.length&&e.isFetching?d+=" mt-n1":f.length||e.isFetching||(d+=" d-none"),d)},(!!f.length||e.isFetching)&&i().createElement(Nt,{collection:f,childComponent:function(e){return i().createElement(xt,Object.assign({},e,{selectedItems:c,onClick:u}))},staticChildren:e.isFetching?new Array(3).fill({component:function(){return i().createElement(Ve,{tagClass:Pt.tagItem})},position:"end"}):[],partialLoadingComponent:function(){return i().createElement("div",{className:"me-2"},i().createElement(Ve,{tagClass:"".concat(Pt.tagItem)}))}})))}function qt(e){var t=r.useContext(R).state;return r.createElement(T.L,{onClick:function(){x.Q.C$.trigger(Object.assign(Object.assign({},t.appLink),{params:e.currentQueryParam?{query:e.currentQueryParam}:null}))},className:"hover-text-underline cursor-pointer d-flex align-items-center ms-2"},r.createElement(s.x,{namespace:"search.resetButton",phrase:"reset"}))}var Mt={partialFilterHeading:"O8f8H",partialButton:"ThKam",filtersContainer:"JIp3h"};function Vt(e){return function(e){if(Array.isArray(e))return Xt(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Gt(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 Gt(e,t){if(e){if("string"==typeof e)return Xt(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)?Xt(e,t):void 0}}function Xt(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 Yt(e){var t,n,i=e.queryParams,a=e.appLink,o=e.hideHeading,l=e.isFetchingOptions,c=e.constantIndices,u=void 0===c?[]:c,d=r.useMemo((function(){return ke.deriveInitialStateFromQuery(i,e.mainFilters,e.moreFilters,a)}),[i,l]),f=(t=r.useReducer(j,d),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,i,a,o,l=[],c=!0,s=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(l.push(r.value),l.length!==t);c=!0);}catch(e){s=!0,i=e}finally{try{if(!c&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(s)throw i}}return l}}(t,n)||Gt(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.")}()),m=f[0],v=f[1];r.useEffect((function(){k.t.isEqual(d,m)||(v({type:"update",payload:d}),e.analyticsOptions&&ke.logFilterEvent(e.mainFilters,e.moreFilters,d,i.query,e.analyticsOptions))}),[d]);var p=w.m.uniq([].concat(Vt(ke.getAppliedIndices(i)),Vt(u))),y=ke.mixinDisabledFields(m,p,e.mainFilters,e.moreFilters),g=y.mainFilters,b=y.moreFilters,h=g.filter((function(e){return"tag"!==e.type})),E=g.find((function(e){return"tag"===e.type}));return r.createElement(R.Provider,{value:{state:m,dispatch:v}},r.createElement(s.D.Provider,{value:"search.searchFilters"},r.createElement("section",null,r.createElement("div",{className:"d-flex ".concat(e.hideDivider?"":"border-bottom pb-3 mb-3")},!o&&r.createElement("h2",{className:"h5 mb-0 d-inline-block pe-2 border-end d-flex align-items-center"},r.createElement(s.x,{phrase:"heading"})),r.createElement("div",{className:"d-flex flex-wrap ".concat(Mt.filtersContainer," ").concat(o?"":"ms-2")},h.map((function(e){return r.createElement(_e,{key:e.id,filter:e})})),b&&r.createElement(Ue,{filter:b}),ke.hasActiveFilters(i)&&!e.hideResetButton&&r.createElement(qt,{mainFilters:e.mainFilters,moreFilters:e.moreFilters,currentQueryParam:i.query,analyticsOptions:e.analyticsOptions}))),r.createElement(Ut,{filter:E,queryParams:i,isFetching:e.isFetchingOptions}))))}var Qt=a.T.encloseNamespace("libraryRequests.filters");function Wt(e){return i().createElement(Yt,{queryParams:e.queryParams,mainFilters:[{id:"status",name:"Status",type:"checkbox",options:[{id:"approved",name:Qt("approved")},{id:"rejected",name:Qt("rejected")},{id:"closed",name:Qt("closed")},{id:"autoApproved",name:Qt("autoApproved")}],compatibleIndices:[]}],appLink:{application:p.OV.LIBRARY_REQUESTS,action:p.eX.LibraryRequests.PAST_REQUESTS,args:[e.id],params:e.queryParams},analyticsOptions:{entity:C.py.LibraryRequest,location:C.LZ.LibraryRequestDetails},constantIndices:[],hideDivider:!0})}var Ht=n(30664),zt=n(49824),$t=n(1015),Kt=n(7044),Zt=n(21974),Jt=n(264),en=n(65402),tn="libraryRequests.pastDetails";function nn(e){var t=(0,en.$)(e.status);return i().createElement("span",{className:"ms-1"},t)}function rn(e){var t,n,r,a,o,l,u,d=e.libraryRequest.sourceLibrary||e.libraryRequest.sourceCategory,f="";e.libraryRequest.actionedBy&&(f="".concat(e.libraryRequest.actionedBy.name," ").concat(e.libraryRequest.actionedBy.surname));var m=function(e){switch(e){case S.l.AutoApproved:return"addedBy";case S.l.Approved:return"approvedBy";default:return"rejectedBy"}}(e.libraryRequest.status),v=e.libraryRequest.sender&&"".concat(null!==(n=null===(t=e.libraryRequest.sender)||void 0===t?void 0:t.name)&&void 0!==n?n:""," ").concat(null!==(a=null===(r=e.libraryRequest.sender)||void 0===r?void 0:r.surname)&&void 0!==a?a:""),y="";return(null===(o=e.libraryRequest.senderCustomer)||void 0===o?void 0:o.id.toString())!==e.user.get("customerId").toString()&&(y=null===(l=e.libraryRequest.senderCustomer)||void 0===l?void 0:l.name),i().createElement("div",{className:"bg-white rounded p-3 mb-3"},i().createElement("div",{className:"row"},i().createElement("div",{className:"col-3 offset-9 mb-n3"},i().createElement("div",{className:"d-flex justify-content-end align-items-start"},i().createElement(en.h,{status:e.libraryRequest.status}),i().createElement(nn,{status:e.libraryRequest.status}))),i().createElement("div",{className:"col-12"},!!f&&i().createElement("div",{className:"row mb-3"},i().createElement("div",{className:"col-3 font-label"},i().createElement(s.x,{namespace:tn,phrase:m})),i().createElement("div",{className:"col-6"},f)),!!v&&e.libraryRequest.status!==S.l.AutoApproved&&i().createElement("div",{className:"row mb-3"},i().createElement("div",{className:"col-3"},i().createElement("label",null,i().createElement(s.x,{namespace:tn,phrase:"requestedBy"}))),i().createElement("div",{className:"col-6"},i().createElement(i().Fragment,null,v,!!y&&i().createElement(i().Fragment,null," (",y,")")))),i().createElement("div",{className:"row mb-3"},i().createElement("div",{className:"col-3 font-label"},d&&i().createElement(s.x,{namespace:tn,phrase:"videoSource"})),i().createElement("div",{className:"col-6"},!!e.libraryRequest.sourceLibrary&&i().createElement("span",{className:"badge p-1 me-1 text-white ".concat(Zt.u.mapSourceToClass(e.libraryRequest.sourceLibrary.type))},Zt.u.mapSourceToDisplayName(e.libraryRequest.sourceLibrary,Jt.g.hasLite)),!!e.libraryRequest.sourceCategory&&i().createElement("span",{className:"ms-1"},e.libraryRequest.sourceCategory.name))),(null===(u=e.folderPath)||void 0===u?void 0:u.length)&&i().createElement("div",{className:"row"},i().createElement("div",{className:"col-3 font-label"},i().createElement(s.x,{namespace:tn,phrase:"libraryLocation"})),i().createElement("div",{className:"col-9"},i().createElement(c.Oo,{breadcrumbs:e.folderPath.map((function(e,t){return{name:e.name,appLink:{application:p.OV.LIBRARY_EDITOR,action:0===t?p.eX.LibraryEditor.LIBRARY:p.eX.LibraryEditor.FOLDER,args:[e.id]}}}))}))))))}function an(){return i().createElement("div",{className:"bg-white rounded p-3 mb-3"},i().createElement("div",{className:"row"},i().createElement("div",{className:"col-3"},i().createElement("div",{className:"partial-loading-background",style:{height:"1.25rem",width:"6rem"}})),i().createElement("div",{className:"col-6 mb-2"},i().createElement("div",{className:"partial-loading-background",style:{height:"1.25rem",width:"9rem"}})),i().createElement("div",{className:"col-3 d-flex justify-content-end"},i().createElement("div",{className:"partial-loading-background rounded",style:{height:"1.25rem",width:"6rem"}})),i().createElement("div",{className:"col-3"},i().createElement("div",{className:"partial-loading-background",style:{height:"1.25rem",width:"7rem"}})),i().createElement("div",{className:"col-6"},i().createElement("div",{className:"partial-loading-background",style:{height:"1.25rem",width:"15rem"}}))))}var on=n(17950),ln=n(9416),cn=n(25796),sn=n(41026),un=n(59198),dn=n(85739),fn=n(30328),mn=n(64429),vn=n(41777),pn=n(56154),yn="libraryRequests.pastRequestsEmptyState",gn=a.T.encloseNamespace(yn);function bn(){return i().createElement("div",{className:"bg-white rounded p-3 py-5"},i().createElement(vn.u,null,i().createElement(vn.u.Image,{src:pn.W.EmptyStates.PAST_REQUESTS}),i().createElement(vn.u.Info,{className:"mb-1"},i().createElement(s.x,{namespace:yn,phrase:"info"})),i().createElement(vn.u.Cta,{text:gn("cta"),className:"btn btn-link text-info",appLink:{application:p.OV.LIBRARY_REQUESTS,action:p.eX.LibraryRequests.LIBRARY_REQUEST_SETTINGS_LIBRARIES}})))}function hn(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,a,o,l=[],c=!0,s=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(l.push(r.value),l.length!==t);c=!0);}catch(e){s=!0,i=e}finally{try{if(!c&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(s)throw i}}return l}}(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 Sn="libraryRequests.pastRequests",An=a.T.encloseNamespace(Sn),On=[S.l.Approved,S.l.Closed,S.l.Rejected,S.l.AutoApproved];function Cn(e){var t,n,r,a,h,E=o.a.useGetFetch(),S=(0,f.Z)(),A=(0,dn.p)(e.queryParams.sort||u.D.Newest,e.queryParams.status||On),C=o.a.useBasicFetch(e.id&&cn.y.libraryRequest(e.id)),w=(0,un.s)(e.id),k=o.a.useBasicFetch(C.data&&(null===(t=C.data.destinationLibrary)||void 0===t?void 0:t.id)&&(null===(n=C.data.destinationCategory)||void 0===n?void 0:n.id)&&cn.y.categoryPath(C.data.destinationLibrary.id,C.data.destinationCategory.id)),L=hn(i().useState(null),2),T=L[0],I=L[1];(0,l.i)(g.p.getConfigFetchOptions(I),[]);var N=hn(i().useState(null),2),R=N[0],j=N[1];(0,l.i)(b.K.getCurrentUserFetchOptions(j),[]);var _=o.a.useBasicFetch(d.N.currentUser());(0,m.v)(C),(0,fn.A)({id:e.id,requests:A.items,appLink:{application:p.OV.LIBRARY_REQUESTS,action:p.eX.LibraryRequests.PAST_REQUESTS,params:e.queryParams}}),(0,mn.m)(C.data,"past",e.queryParams),(0,sn.K)(C.data);var x=((null===(r=A.items)||void 0===r?void 0:r.length)||A.hasCompleted)&&T&&_.data,P=C.data&&w.hasCompleted,F=!e.queryParams.status&&C.hasCompleted&&!(null===(a=A.items)||void 0===a?void 0:a.length);return i().createElement("div",null,i().createElement("h1",{className:"h2"},i().createElement(s.x,{namespace:Sn,phrase:"title"})),i().createElement("div",{className:"mb-3"},i().createElement(c.Oo,{breadcrumbs:[{name:An("libraryEditor"),appLink:{application:p.OV.LIBRARY_EDITOR,action:p.eX.LibraryEditor.HOME}},{name:An("title"),active:!0}]})),i().createElement(ln.A,{active:"past"}),!F&&i().createElement("div",{className:"d-flex justify-content-between mb-3"},i().createElement(Wt,{id:e.id,queryParams:e.queryParams}),i().createElement(on.F,{appLink:{application:p.OV.LIBRARY_REQUESTS,action:p.eX.LibraryRequests.PAST_REQUESTS,args:[e.id]},queryParams:e.queryParams})),!x||(null===(h=A.items)||void 0===h?void 0:h.length)?i().createElement("div",{className:"row"},i().createElement("div",{className:"col-4"},x?i().createElement($t.q,{libraryRequests:A.items,selectedId:e.id,appLink:{application:p.OV.LIBRARY_REQUESTS,action:p.eX.LibraryRequests.PAST_REQUESTS},queryParams:e.queryParams,fetchNext:A.fetchNext,isFetching:A.isFetching,nextCursor:A.nextCursor}):i().createElement(Kt.p,null)),i().createElement("div",{className:"col-8"},x&&P?i().createElement(i().Fragment,null,i().createElement(O,{libraryRequest:C.data}),i().createElement(rn,{libraryRequest:C.data,folderPath:k.data,user:R}),i().createElement(Ht.x,{libraryRequest:C.data,currentUser:_.data,comments:w.items,config:T,user:R,createViewKey:function(t,n){var r=cn.y.createViewKey(e.id,(function(e){return n(new y.y(e))}),(function(e){return S.error(v.M.libraryApiError(e))}));E(r)}})):i().createElement(i().Fragment,null,i().createElement(an,null),i().createElement(zt.j,null)))):i().createElement(bn,null))}}}]);
@@ -1 +1 @@
1
- (self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[9383],{80732:function(e,t,n){"use strict";n.r(t),n.d(t,{UploadVideosView:function(){return wt}});var o=n(48088),i=n(39479),r=n(25417),a=n(21186),l=n(21679),s=n(57857),c=n(99249),u=n(31647),d=n(52076),p=n(70065),f=n(81937),h=n(5854),y=n(8371),v=n(36357),m=n(57098),g=n(64404),b=n(48404),w=n(19226),S=n(93569),k=n(95061),O=n(56252),C=n(57769),P=n(88172),T=n(42494),N=n.n(T);function j(e){return j="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},j(e)}function E(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,x(o.key),o)}}function x(e){var t=function(e,t){if("object"!=j(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!=j(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==j(t)?t:String(t)}function I(e,t,n){return t=D(t),function(e,t){if(t&&("object"===j(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,_()?Reflect.construct(t,n||[],D(e).constructor):t.apply(e,n))}function _(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(_=function(){return!!e})()}function D(e){return D=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},D(e)}function A(e,t){return A=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},A(e,t)}var R=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),I(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&&A(e,t)}(t,e),n=t,(i=[{key:"initialize",value:function(){this.model=c.r.get("upload:progress:".concat(O.AJ.Video)),this.listenTo(this.model,"change:done",this.render),this.listenTo(this.channelName,"continue",this.onClickContinue),this.listenTo(this.options.uploadChannelName,"start:spinner",this.startSpinner)}},{key:"name",get:function(){return"UploadActionsComponent"}},{key:"lang",get:function(){return"upload.uploadActions"}},{key:"template",get:function(){return N()}},{key:"className",get:function(){return"clearfix my-3"}},{key:"channelName",get:function(){return"".concat(this.name).concat(this.cid)}},{key:"regions",value:function(){return{finishButton:{el:".finish-button-region",replaceElement:!0}}}},{key:"behaviors",get:function(){return[{behaviorClass:C.Z,buttonSelector:".add-more-videos",channelName:this.options.uploadChannelName,acceptMultiple:!0,mimeType:"video/*"}]}},{key:"startSpinner",value:function(){o.Radio.channel(this.channelName).trigger(P.I3.ShowSpinner)}},{key:"onClickContinue",value:function(){this.model.get("done")&&o.Radio.channel(this.options.uploadChannelName).trigger("continue")}},{key:"onRender",value:function(){this.showChildView("finishButton",new P.Py({channelName:this.channelName,disabled:!this.model.get("done"),saveEvent:"continue",extraButtonClass:"btn-dark float-end ms-3",buttonText:s.T.getPhrase(this.lang,"finish"),spinnerOptions:{size:S.Ey.Small,type:S.dR.Light,extraClasses:"mx-auto"},tooltip:{title:this.model.get("done")?"":s.T.getPhrase(this.lang,"stillUploading")}}))}}])&&E(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),t}(u.Q.wA),V=n(33192),M=n(88483),F=n(2772),U=n(24184),L=n(72998),B=n(95168),K=n(39155),Q=(n(14611),n(33015),n(90680)),z=n(20072),J=n(60602),H=n(75459),q=n(26357),W=n(22557),G=n(21893),X=n.n(G);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 Z(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,ee(o.key),o)}}function ee(e){var t=function(e,t){if("object"!=Y(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!=Y(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Y(t)?t:String(t)}function te(e,t,n){return t=oe(t),function(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)}(e,ne()?Reflect.construct(t,n||[],oe(e).constructor):t.apply(e,n))}function ne(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(ne=function(){return!!e})()}function oe(e){return oe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},oe(e)}function ie(e,t){return ie=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ie(e,t)}var re=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),te(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&&ie(e,t)}(t,e),n=t,(r=[{key:"initialize",value:function(){this.prepareData(),this.bindListeners()}},{key:"lang",get:function(){return"libraryEditor.folderSelect"}},{key:"prepareData",value:function(){var e=this.options.library?this.options.library.collection:this.collection;this.collection=W.P.flatten(e),S.yV.setSelected(this.options.currentFolderId,this.collection),this.options.canCreateFolder&&this.collection.add({name:s.T.getPhrase(this.lang,"createNew"),eventName:"create:folder"})}},{key:"bindListeners",value:function(){var e=this;this.listenTo(this.channelName,"create:folder",this.onClickCreateFolder),this.listenTo(this.channelName,"select:option:selected",(function(t){o.Radio.channel(e.options.channelName).trigger("folder:selected",t)}))}},{key:"channelName",get:function(){return"".concat(this.name).concat(this.cid)}},{key:"folderTreeKey",get:function(){return"folderselect:".concat(this.cid)}},{key:"name",get:function(){return"FolderSelectView"}},{key:"className",get:function(){return"position-relative"}},{key:"template",get:function(){return X()}},{key:"regions",value:function(){return{dropdown:{el:".dropdown-menu-region",replaceElement:!0}}}},{key:"onClickCreateFolder",value:function(){o.Radio.channel(this.options.channelName).trigger("create:folder:clicked")}},{key:"generatePrefix",value:function(){var e=this.model.get("depth");if(!i.isNumber(e)||this.model.get("hidePrefix"))return"";for(var t="",n=0;n<e;n++)t+="&nbsp;&nbsp;";return e&&(t+="- "),t}},{key:"getIsOptionDisabledFn",value:function(){var e=this.options.disableLibraries,t=this.options.disabledFolderIds;return function(n){var o=n||this.model;return!(!e||o.get("type")!==H.r.CustomLibrary)||!(!t||!i.contains(t,o.get("id").toString()))}}},{key:"onRender",value:function(){this.showChildView("dropdown",new q.H({collection:this.collection,channelName:this.channelName,childOptions:{titleProperty:"name",eventName:"select:option:click",prefixHandler:this.generatePrefix,currentSelectedMessage:this.options.currentSelectedMessage||s.T.getPhrase(this.lang,"current"),isDisabled:this.getIsOptionDisabledFn()},placeholderText:this.options.placeholderText||s.T.getPhrase(this.lang,"placeholder"),noOptionsText:s.T.getPhrase(this.lang,"noFolders"),inputName:this.options.inputName,disabled:0===this.collection.length||this.options.disabled,analyticsHelper:d.k}))}}])&&Z(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),t}(u.Q.wA),ae=n(76370),le=n.n(ae),se={requiredStar:"BykcP"};function ce(e){return ce="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},ce(e)}function ue(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,de(o.key),o)}}function de(e){var t=function(e,t){if("object"!=ce(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!=ce(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ce(t)?t:String(t)}function pe(e,t,n){return t=he(t),function(e,t){if(t&&("object"===ce(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,fe()?Reflect.construct(t,n||[],he(e).constructor):t.apply(e,n))}function fe(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(fe=function(){return!!e})()}function he(e){return he=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},he(e)}function ye(e,t){return ye=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ye(e,t)}var ve=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),pe(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&&ye(e,t)}(t,e),n=t,(i=[{key:"initialize",value:function(){var e=this;this.librariesWithoutFolders=new Q.q,this.collection.each((function(t){return e.librariesWithoutFolders.add(t.toFlatJSON())})),this.listenTo(this.libraryChannelName,"folder:selected",this.onLibrarySelected),this.listenTo(this.channelName,"folder:selected new:folder:selected",this.onFolderSelected),this.listenTo(this.channelName,"create:folder:clicked",this.onCreateFolderClicked),!this.hasMultipleLibraries()&&this.librariesWithoutFolders.first()&&this.model.set("libraryId",this.librariesWithoutFolders.first().get("id"));var t=this.collection.get(this.model.get("libraryId"));if(t){var n=S.PU.getSelected(this.folderTreeKey,t.children);this.options.preselectedFolderId&&!n&&this.onFolderSelected(this.options.preselectedFolderId)}}},{key:"name",get:function(){return"UploadFolderSelectComponent"}},{key:"template",get:function(){return le()}},{key:"lang",get:function(){return"upload.uploadFolderSelect"}},{key:"folderTreeKey",get:function(){return"folder:tree:".concat(this.model.cid)}},{key:"regions",value:function(){return{librarySelect:".library-select-region",folderSelect:".folder-select-region"}}},{key:"hasMultipleLibraries",value:function(){return this.librariesWithoutFolders.length>1}},{key:"libraryChannelName",get:function(){return"".concat(this.channelName,":").concat(this.options.selectId,":libraries")}},{key:"channelName",get:function(){return"".concat(this.name).concat(this.cid).concat(this.options.selectId)}},{key:"onLibrarySelected",value:function(e){this.model.set("libraryId",e.get("id")),this.model.unset("folderId"),this.render()}},{key:"onFolderSelected",value:function(e){var t=e;e instanceof J.g&&(t=e.get("id")),this.model.set("folderId",t);var n=this.collection.get(this.model.get("libraryId")).children;S.PU.setSelected(this.folderTreeKey,t,n),this.model.validate()}},{key:"onCreateFolderClicked",value:function(){o.Radio.channel(this.options.channelName).trigger("show:new:folder",this.model.get("libraryId"),this.channelName)}},{key:"renderLibrarySelect",value:function(){if(this.hasMultipleLibraries()){var e=new re({collection:this.librariesWithoutFolders,channelName:this.libraryChannelName,placeholderText:s.T.getPhrase(this.lang,"selectLibraryPlaceholder"),currentFolderId:this.model.get("libraryId"),currentSelectedMessage:s.T.getPhrase(this.lang,"currentLibrary"),inputName:"libraryId",canCreateFolder:!1});this.showChildView("librarySelect",e)}}},{key:"renderFolderSelect",value:function(){var e=this.model.get("libraryId");if(e){var t=this.collection.get(e);this.showChildView("folderSelect",new z.Y({collection:t.children,channelName:this.channelName,folderTreeKey:this.folderTreeKey,canCreateNew:!0,name:"folderId"}))}}},{key:"viewOptions",value:function(){return{styles:se,hasMultipleLibraries:this.hasMultipleLibraries(),requiredFields:this.options.requiredFields}}},{key:"onRender",value:function(){this.renderLibrarySelect(),this.renderFolderSelect()}}])&&ue(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),t}(u.Q.wA),me=n(11453),ge=n.n(me);function be(e){return be="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},be(e)}function we(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,Se(o.key),o)}}function Se(e){var t=function(e,t){if("object"!=be(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!=be(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==be(t)?t:String(t)}function ke(e,t,n){return t=Ce(t),function(e,t){if(t&&("object"===be(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,Oe()?Reflect.construct(t,n||[],Ce(e).constructor):t.apply(e,n))}function Oe(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Oe=function(){return!!e})()}function Ce(e){return Ce=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ce(e)}function Pe(e,t){return Pe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Pe(e,t)}var Te=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),ke(this,t,arguments)}var n,o;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&&Pe(e,t)}(t,e),n=t,(o=[{key:"initialize",value:function(){this.listenTo(this.model,"change:progress",this.update)}},{key:"name",get:function(){return"UploadProgressComponent"}},{key:"template",get:function(){return ge()}},{key:"className",get:function(){return"progress my-3"}},{key:"elements",get:function(){return{progressBar:".progress-bar"}}},{key:"update",value:function(){var e=this.model.get("progress"),t=this.getUI("progressBar");t&&t.get(0)&&$(t.get(0)).css("width","".concat(e,"%"))}}])&&we(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),t}(u.Q.wA),Ne=n(42633),je=n.n(Ne);function Ee(e){return Ee="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},Ee(e)}function xe(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,Ie(o.key),o)}}function Ie(e){var t=function(e,t){if("object"!=Ee(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!=Ee(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ee(t)?t:String(t)}function _e(e,t,n){return t=Ae(t),function(e,t){if(t&&("object"===Ee(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,De()?Reflect.construct(t,n||[],Ae(e).constructor):t.apply(e,n))}function De(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(De=function(){return!!e})()}function Ae(e){return Ae=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ae(e)}function Re(e,t){return Re=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Re(e,t)}var Ve=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),_e(this,t,[e])}var n,o;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&&Re(e,t)}(t,e),n=t,(o=[{key:"name",get:function(){return"UploadVideoOptionsComponent"}},{key:"template",get:function(){return je()}},{key:"lang",get:function(){return"upload.uploadVideoOptions"}},{key:"tagName",get:function(){return"form"}},{key:"className",get:function(){return"border-top pt-3"}},{key:"events",value:function(){return{"click .toggle-option":"onToggleAutoCaptioning"}}},{key:"onToggleAutoCaptioning",value:function(e){e.stopPropagation(),this.model.set("autoCaption",!this.model.get("autoCaption")),this.render()}},{key:"viewOptions",value:function(){return{isSelected:this.model.get("autoCaption")}}}])&&xe(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),t}(u.Q.wA),Me=n(61778),Fe=n.n(Me),Ue=n(47381),Le=n.n(Ue),Be=n(63105),Ke=n.n(Be),Qe={title:"melld"};function ze(e){return ze="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},ze(e)}function Je(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function He(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,$e(o.key),o)}}function qe(e,t,n){return t&&He(e.prototype,t),n&&He(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function $e(e){var t=function(e,t){if("object"!=ze(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!=ze(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ze(t)?t:String(t)}function We(e,t,n){return t=Xe(t),function(e,t){if(t&&("object"===ze(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,Ge()?Reflect.construct(t,n||[],Xe(e).constructor):t.apply(e,n))}function Ge(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Ge=function(){return!!e})()}function Xe(e){return Xe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Xe(e)}function Ye(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&&Ze(e,t)}function Ze(e,t){return Ze=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Ze(e,t)}var et=function(e){function t(){return Je(this,t),We(this,t,arguments)}return Ye(t,e),qe(t,[{key:"initialize",value:function(){this.listenTo(this.model,"change:name",this.render)}},{key:"name",get:function(){return"UploadTitleComponent"}},{key:"template",get:function(){return Le()}},{key:"tagName",get:function(){return"h3"}},{key:"className",get:function(){return"mb-0 border-bottom p-3 ".concat(Qe.title)}},{key:"viewOptions",value:function(){return{name:this.model.get("name")||this.model.get("fileName")}}}]),t}(u.Q.wA),tt=function(e){function t(){return Je(this,t),We(this,t,arguments)}return Ye(t,e),qe(t,[{key:"initialize",value:function(){this.listenTo(this.model,"change:progress",this.render)}},{key:"name",get:function(){return"TextProgressComponent"}},{key:"template",get:function(){return Fe()}},{key:"lang",get:function(){return"upload.uploadVideo"}},{key:"className",get:function(){return" text-muted"}},{key:"tagName",get:function(){return"p"}},{key:"viewOptions",value:function(){return{percentage:Math.round(this.model.get("progress")||0)}}}]),t}(u.Q.wA),nt=function(e){function t(e){return Je(this,t),We(this,t,[e])}return Ye(t,e),qe(t,[{key:"initialize",value:function(){this.viewModel=c.r.get("upload:".concat(this.model.get("id")),{name:this.model.get("name"),fileName:this.model.get("name"),showAdvanced:this.options.openAdvancedMetadata,rating:this.options.ratings.findWhere({value:0}),folderId:this.options.folderId,libraryId:this.options.libraryId,timeInitialized:V(),autoCaption:!1},{ctor:g.n}),this.viewModel.addValidation(K.I),this.listenTo(this.channelName,"select:rating",i.partial(this.onAssociationSelected,i,"rating")),this.listenTo(this.channelName,"select:channel",i.partial(this.onAssociationSelected,i,"channel")),this.listenTo(this.channelName,"add:producers",this.onSelectProducer),this.listenTo(this.channelName,"add:distributors",this.onSelectDistributor),this.listenTo(this.channelName,"add:productionCompanies",this.onSelectProductionCompany),this.listenTo(this.channelName,"add:directors",this.onSelectDirector),this.listenTo(this.channelName,"select:series",this.onSelectSeries),this.listenTo(this.channelName,"add:season",this.onSelectSeason),this.listenTo(this.options.uploadChannelName,"invalid:".concat(this.model.get("id")),this.scrollTo)}},{key:"name",get:function(){return"UploadVideoComponent"}},{key:"template",get:function(){return Ke()}},{key:"className",get:function(){return"bg-white mb-3 rounded"}},{key:"lang",get:function(){return"upload.uploadVideo"}},{key:"events",value:function(){return{"click .add-advanced-metadata":"onClickAddAdvancedMetadata","click .cancel-upload":"onClickCancelUpload"}}},{key:"channelName",get:function(){return"".concat(this.name).concat(this.cid)}},{key:"regions",value:function(){return{progress:{el:".upload-progress-region",replaceElement:!0},thumbnail:{el:".thumbnail-region",replaceElement:!0},uploadTitle:{el:".upload-title-region",replaceElement:!0},folderSelect:{el:".folder-select-region",replaceElement:!0},textProgress:{el:".text-progress-region",replaceElement:!0},videoDetails:{el:".video-details-region",replaceElement:!0},productionInfo:{el:".production-info-region",replaceElement:!0},advancedDetails:{el:".additional-info-region",replaceElement:!0},uploadOptions:{el:".video-options-region",replaceElement:!0}}}},{key:"onClickAddAdvancedMetadata",value:function(){this.viewModel.set("showAdvanced",!this.viewModel.get("showAdvanced")),this.render()}},{key:"onClickCancelUpload",value:function(){var e=this,t={title:s.T.getPhrase(this.lang,"cancelHeading"),text:s.T.getPhrase(this.lang,"cancelBody",{videoTitle:this.model.get("name")}),buttons:[{text:s.T.getPhrase(this.lang,"yes"),className:"btn btn-dark",success:!0},{text:s.T.getPhrase(this.lang,"no"),className:"btn btn-link",close:!0}],channelName:this.channelName};new S.Mr(t).render().done((function(){o.Radio.channel(e.options.uploadChannelName).trigger("cancel:upload",e.model.get("id"))}))}},{key:"onAssociationSelected",value:function(e,t){var n=this.viewModel.get(t);if(n instanceof u.Q.FE){var o=n.filter((function(t){return!t.id||t.name===e.name}));i.each(o,(function(e){return n.remove(e)})),this.viewModel.get(t).add(e)}else this.viewModel.set(t,e)}},{key:"onSelectSeries",value:function(e){var t=this,n=o.Radio.channel(this.options.uploadChannelName);e.id?n.trigger("get:series",e.id,(function(e){t.onAssociationSelected(e.toJSON(),"series"),t.renderBasicVideoDetails()})):e.name&&n.trigger("create:series",e.name,(function(e){t.onAssociationSelected(e.toJSON(),"series"),t.renderBasicVideoDetails()}))}},{key:"onSelectSeason",value:function(e){var t=this;if(i.isNull(e))return this.viewModel.get("season").clear({silent:!0}),S.yV.deselectAll(this.viewModel.get("series.seasons")),this.onAssociationSelected(null,"season"),void this.renderBasicVideoDetails();if(e.id)return S.yV.setSelected(e.id,this.viewModel.get("series.seasons")),this.onAssociationSelected(e,"season"),void this.renderBasicVideoDetails();if(e.number){var n=this.viewModel.get("series.id");o.Radio.channel(this.options.uploadChannelName).trigger("create:season",e,n,(function(e){t.viewModel.get("series.seasons").add(e.toJSON()),S.yV.setSelected(e.id,t.viewModel.get("series.seasons")),t.onAssociationSelected(e.toJSON(),"season"),t.renderBasicVideoDetails()}))}}},{key:"onSelectDistributor",value:function(e){var t=this;e.id?this.onAssociationSelected(e,"distributors"):e.name&&o.Radio.channel(this.options.uploadChannelName).trigger("create:company",e.name,(function(e){t.onAssociationSelected(e.toJSON(),"distributors")}))}},{key:"onSelectProductionCompany",value:function(e){var t=this;e.id?this.onAssociationSelected(e,"productionCompanies"):e.name&&o.Radio.channel(this.options.uploadChannelName).trigger("create:company",e.name,(function(e){t.onAssociationSelected(e.toJSON(),"productionCompanies")}))}},{key:"onSelectDirector",value:function(e){var t=this;e.id?this.onAssociationSelected(e,"directors"):e.name&&o.Radio.channel(this.options.uploadChannelName).trigger("create:person",e.name,(function(e){t.onAssociationSelected(e.toJSON(),"directors")}))}},{key:"onSelectProducer",value:function(e){var t=this;e.id?this.onAssociationSelected(e,"producers"):e.name&&o.Radio.channel(this.options.uploadChannelName).trigger("create:person",e.name,(function(e){t.onAssociationSelected(e.toJSON(),"producers")}))}},{key:"getRequiredFields",value:function(){return{uploadDestination:!0}}},{key:"renderTitle",value:function(){var e=new et({model:this.viewModel});this.showChildView("uploadTitle",e)}},{key:"renderThumbnail",value:function(){var e=new F.Z({model:this.viewModel,thumbnailOptions:{size:M.h2.Medium}});this.showChildView("thumbnail",e)}},{key:"renderProgress",value:function(){var e=new Te({model:this.model});this.showChildView("progress",e);var t=new tt({model:this.model});this.showChildView("textProgress",t)}},{key:"renderBasicVideoDetails",value:function(){var e=new L.J({model:this.viewModel,channelName:this.channelName,ratings:this.options.ratings,requiredFields:this.getRequiredFields(),editable:!0});this.showChildView("videoDetails",e)}},{key:"renderFolderSelect",value:function(){var e=new ve({collection:this.options.libraries,selectId:this.model.get("id"),model:this.viewModel,channelName:this.options.uploadChannelName,requiredFields:this.getRequiredFields(),preselectedFolderId:this.options.folderId});this.showChildView("folderSelect",e)}},{key:"renderAdvancedVideoDetails",value:function(){if(this.viewModel.get("showAdvanced")){if(!this.options.hideBroadcastInfo){var e=new U.a({channelName:this.channelName,model:this.viewModel,editable:!0});this.showChildView("advancedDetails",e)}var t=new B.O({channelName:this.channelName,model:this.viewModel,editable:!0});this.showChildView("productionInfo",t),this.options.allowAutoCaptioning&&this.showChildView("uploadOptions",new Ve({model:this.viewModel}))}}},{key:"scrollTo",value:function(){$("html,body").animate({scrollTop:this.$el.offset().top},250)}},{key:"viewOptions",value:function(){return Object.assign({styles:Qe,showExpand:this.options.allowAutoCaptioning},this.viewModel.toJSON())}},{key:"onRender",value:function(){this.renderTitle(),this.renderThumbnail(),this.renderProgress(),this.renderBasicVideoDetails(),this.renderFolderSelect(),this.renderAdvancedVideoDetails(),o.Validation.bind(this,{model:this.viewModel})}},{key:"onDestroy",value:function(){o.Validation.unbind(this)}}]),t}(u.Q.wA);function ot(e){return ot="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},ot(e)}function it(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,rt(o.key),o)}}function rt(e){var t=function(e,t){if("object"!=ot(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!=ot(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ot(t)?t:String(t)}function at(e,t,n){return t=st(t),function(e,t){if(t&&("object"===ot(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,lt()?Reflect.construct(t,n||[],st(e).constructor):t.apply(e,n))}function lt(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(lt=function(){return!!e})()}function st(e){return st=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},st(e)}function ct(e,t){return ct=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ct(e,t)}var ut=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),at(this,t,[e])}var n,o;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&&ct(e,t)}(t,e),n=t,(o=[{key:"name",get:function(){return"UploadVideoComponentCollection"}},{key:"childView",get:function(){return nt}},{key:"childViewOptions",get:function(){return{ratings:this.options.ratings,libraries:this.options.libraries,uploadChannelName:this.options.uploadChannelName,folderId:this.options.folderId,libraryId:this.options.libraryId,allowAutoCaptioning:this.options.allowAutoCaptioning,hideBroadcastInfo:this.options.hideBroadcastInfo,openAdvancedMetadata:this.collection.length<=1}}}])&&it(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),t}(u.Q.$W),dt=n(35250),pt=n.n(dt);function ft(e){return ft="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},ft(e)}function ht(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,yt(o.key),o)}}function yt(e){var t=function(e,t){if("object"!=ft(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!=ft(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ft(t)?t:String(t)}function vt(e,t,n){return t=gt(t),function(e,t){if(t&&("object"===ft(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,mt()?Reflect.construct(t,n||[],gt(e).constructor):t.apply(e,n))}function mt(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(mt=function(){return!!e})()}function gt(e){return gt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},gt(e)}function bt(e,t){return bt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},bt(e,t)}var wt=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=vt(this,t,[e])).completed=!1,n}var n,O;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&&bt(e,t)}(t,e),n=t,(O=[{key:"initialize",value:function(){this.initServices(),this.initDataListeners(),this.initComponentListeners(),this.initCollectionListeners(),this.initShellListeners()}},{key:"name",get:function(){return"UploadVideosView"}},{key:"title",get:function(){return s.T.getPhrase(this.lang,"title")}},{key:"lang",get:function(){return"upload.uploadVideos"}},{key:"template",get:function(){return pt()}},{key:"regions",value:function(){return{topActions:{el:".top-actions-region",replaceElement:!0},bottomActions:{el:".bottom-actions-region",replaceElement:!0},videos:{el:".videos-region",replaceElement:!0}}}},{key:"channelName",get:function(){return"".concat(this.name).concat(this.cid)}},{key:"initServices",value:function(){this.videoDataService=l.u.getInstance(m.Or.Video,this),this.videoUploadService=l.u.getInstance(m.K9.VideoUpload,this),this.videoUploadDataService=l.u.getInstance(m.Or.VideoUpload,this),this.seriesDataService=l.u.getInstance(m.Or.Series,this),this.ratingsDataService=l.u.getInstance(m.Or.Ratings,this),this.companyDataService=l.u.getInstance(m.Or.Company,this),this.personDataService=l.u.getInstance(m.Or.Person,this),this.alertService=l.u.getInstance(m.K9.Alerts,this),this.navLockService=l.u.getInstance(m.K9.NavLock,this),this.settingsDataService=l.u.getInstance(m.Or.Settings,this)}},{key:"initDataListeners",value:function(){this.listenTo(m.Vk.RATINGS,"".concat(m.M_.RATINGS,":sync"),this.render),this.listenTo(m.Vk.LIBRARY,"folder:created",this.onFolderCreated)}},{key:"initComponentListeners",value:function(){this.listenTo(this.channelName,"continue",this.onClickContinue),this.listenTo(this.channelName,"cancel:upload",this.cancelUpload),this.listenTo(this.channelName,f.S.FILES_SELECTED,this.onFilesSelected),this.listenTo(this.channelName,"show:new:folder",this.onClickNewFolder),this.listenTo(this.channelName,"get:series",this.onSelectSeries),this.listenTo(this.channelName,"create:series",this.onCreateSeries),this.listenTo(this.channelName,"create:season",this.onCreateSeason),this.listenTo(this.channelName,"create:company",this.onCreateCompany),this.listenTo(this.channelName,"create:person",this.onCreatePerson)}},{key:"initCollectionListeners",value:function(){var e=this.videoUploadService.getCollection();this.listenTo(e,"remove",this.onCollectionChange)}},{key:"initShellListeners",value:function(){this.listenTo(r.G.SHELL,u.Q.Vy.NAV_UNLOCKED_BY_USER,this.onNavigateAway)}},{key:"cancelUpload",value:function(e){this.logCancelAction(e),this.videoUploadService.cancelUpload(e)}},{key:"onNavigateAway",value:function(){this.logCancelAction(),this.videoUploadService.cancelAllUploads()}},{key:"onCollectionChange",value:function(e,t){t.length||(this.navLockService.unlock(),u.Q.C$.trigger({application:m.OV.UPLOAD,action:m.eX.Upload.FILE_SELECTION}))}},{key:"onSelectSeries",value:function(e,t){this.seriesDataService.getSeries(e,t)}},{key:"onCreateSeries",value:function(e,t){this.seriesDataService.createSeries(e,t)}},{key:"onCreateSeason",value:function(e,t,n){this.seriesDataService.createSeason(e,t,n)}},{key:"onCreateCompany",value:function(e,t){this.companyDataService.createCompany(e,t)}},{key:"onCreatePerson",value:function(e,t){this.personDataService.createPerson(e,t)}},{key:"onClickContinue",value:function(){var e,t=this,n=o.Radio.channel(this.channelName),i=this.videoUploadService.getCollection(),r=!0;if(i.each((function(t){var n=c.r.get("upload:".concat(t.get("id")),null,{ctor:g.n});n.validate();var o=n.isValid();!1!==o||e||(e=t.id),r=r&&o})),e&&n.trigger("invalid:".concat(e)),r){n.trigger("start:spinner");var d=[];i.each((function(e){var n=e.get("file"),o=c.r.get("upload:".concat(e.get("id")),null,{ctor:g.n});if(h.S.hasExpired(o,t.config.get("uploadSessionExpiryTime")))return t.alertService.createAlert({heading:s.T.getPhrase(t.lang,"uploadErrorHeading"),message:s.T.getPhrase(t.lang,"uploadErrorBody",{videoName:o.get("name")}),type:a.NK.Fail}),void i.remove(e);o.set("fileId",n.cvUpload.fileId),o.set("fileSize",n.size),d.push(o)})),this.videoUploadDataService.completeVideoUploads(this.currentUser.get("id"),this.currentUser.get("customerId"),d,(function(){t.completed=!0,t.navLockService.unlock(),l.u.getInstance(m.K9.PendingItems).forceFetchPendingItems(),l.u.releaseInstance(m.K9.PendingItems),u.Q.C$.trigger({application:m.OV.UPLOAD,action:d.length?m.eX.Upload.UPLOAD_COMPLETE:m.eX.Upload.FILE_SELECTION}),t.logFinishAction(d),t.videoDataService.clearVideoCache()}))}}},{key:"onFilesSelected",value:function(e,t){this.videoUploadService.addFiles(e),this.logStartAction(e,t)}},{key:"onClickNewFolder",value:function(e,t){this.setFolderChannel=t,this.navLockService.unlock(),u.Q.C$.trigger({application:m.OV.UPLOAD,action:m.eX.Shared.NEW_FOLDER,args:[e]}),this.lockNav()}},{key:"onFolderCreated",value:function(e){this.setFolderChannel&&(o.Radio.channel(this.setFolderChannel).trigger("new:folder:selected",e),this.render())}},{key:"logStartAction",value:function(e,t){var n=d.k.mergeOptions(this.options.analyticsOptions,{workflowPhase:p.eu.Start,descriptor:d.k.mapInteractionType(t)});d.k.logUserAction(e,n)}},{key:"logCancelAction",value:function(e){var t=this.videoUploadService.getCollection();if(t.length){var n=e?t.get(e):t,o=d.k.mergeOptions(this.options.analyticsOptions,{workflowPhase:p.eu.Discard,descriptor:e?p.yh.Single:p.yh.All});d.k.logUserAction(n.toJSON(),o)}}},{key:"logFinishAction",value:function(e){if(e.length){var t=i.map(e,(function(e){return e.toJSON()})),n=d.k.mergeOptions(this.options.analyticsOptions,{workflowPhase:p.eu.Complete});d.k.logUserAction(t,n)}}},{key:"fetchData",value:function(){this.ratings=this.ratingsDataService.getAllRatings(),this.autoCaptioning=this.settingsDataService.getSetting(this.currentUser.get("customerId"),v.E.AutoCaptioning)}},{key:"renderUploadActions",value:function(){this.showChildView("topActions",new R({uploadChannelName:this.channelName})),this.showChildView("bottomActions",new R({uploadChannelName:this.channelName}))}},{key:"renderVideos",value:function(){var e={collection:this.videoUploadService.getCollection(),ratings:this.ratings,libraries:this.libraries,uploadChannelName:this.channelName,allowAutoCaptioning:this.autoCaptioning.get("value"),hideBroadcastInfo:this.currentUser.get("instanceRegion")===y.b.US};if(this.options.folderId){var t=S.PU.getLibrary(this.options.folderId,this.libraries);t&&(e.folderId=this.options.folderId,e.libraryId=t.get("id"))}var n=new ut(e);this.showChildView("videos",n)}},{key:"lockNav",value:function(){this.completed||this.navLockService.lock({title:s.T.getPhrase(this.lang,"navLockHeading"),text:s.T.getPhrase(this.lang,"navLockBody")})}},{key:"requiredResources",get:function(){return{currentUser:w.K.currentUser,libraries:k.T.libraries,config:b.p.config}}},{key:"onBeforeRender",value:function(){return this.fetchData(),!!this.ratings&&!!this.autoCaptioning}},{key:"onRender",value:function(){this.lockNav(),this.renderUploadActions(),this.renderVideos()}}])&&ht(n.prototype,O),Object.defineProperty(n,"prototype",{writable:!1}),t}(u.Q.G7)},71641:function(e,t,n){"use strict";n.d(t,{w:function(){return f}});var o=n(39479),i=n(31647),r=n(55142);function a(e){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(e)}function l(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,s(o.key),o)}}function s(e){var t=function(e,t){if("object"!=a(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!=a(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==a(t)?t:String(t)}function c(e,t,n){return t=d(t),function(e,t){if(t&&("object"===a(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,u()?Reflect.construct(t,n||[],d(e).constructor):t.apply(e,n))}function u(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(u=function(){return!!e})()}function d(e){return d=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},d(e)}function p(e,t){return p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},p(e,t)}var f=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),c(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&&p(e,t)}(t,e),n=t,i=[{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 r.N}},{key:"childViewOptions",get:function(){var e={channelName:this.options.channelName,analyticsHelper:this.options.analyticsHelper};return o.extend(e,this.options.childOptions)}},{key:"getExtraClasses",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.alignment,n=void 0===t?"left":t,o=e.extraClasses,i="dropdown-menu-".concat(n);return o&&(i="".concat(i," ").concat(o)),i}},{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)}}}],i&&l(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),t}(i.Q.$W)},26357:function(e,t,n){"use strict";n.d(t,{H:function(){return g}});var o=n(48088),i=n(39479),r=n(31647),a=n(71641),l=n(93569),s=n(46635),c=n.n(s),u={dropdownMenu:"oKdKI",selectButton:"fTeoW",disabled:"gZbQ4"};function d(e){return d="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},d(e)}function p(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,f(o.key),o)}}function f(e){var t=function(e,t){if("object"!=d(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!=d(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==d(t)?t:String(t)}function h(e,t,n){return t=v(t),function(e,t){if(t&&("object"===d(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||[],v(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 v(e){return v=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},v(e)}function m(e,t){return m=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},m(e,t)}var g=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=h(this,t,[e])).selectSearch="",n.sameCharIndex=1,n.optionStep=1,n}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.setModel(),this.bindListeners()}},{key:"name",get:function(){return"SelectComponent"}},{key:"template",get:function(){return c()}},{key:"regions",value:function(){return{dropdown:{el:".dropdown-region",replaceElement:!0}}}},{key:"events",value:function(){return{keydown:"onKeydown","shown.bs.dropdown":"onShowDropdown"}}},{key:"defaults",get:function(){return{displayProperty:"name"}}},{key:"elements",get:function(){return{dropdownToggle:".dropdown-toggle"}}},{key:"bindListeners",value:function(){this.listenTo(this.options.channelName,this.options.childOptions.eventName,this.onSelect)}},{key:"onShowDropdown",value:function(){o.Radio.channel(this.options.channelName).trigger("center:dropdown")}},{key:"onKeydown",value:function(e){38===e.keyCode||40===e.keyCode?this.onArrowKeyDown(e):13===e.keyCode?this.render():this.onType(e),o.Radio.channel(this.options.channelName).trigger("center:dropdown")}},{key:"onArrowKeyDown",value:function(e){l.yV.getSelected(this.collection)?this.optionStep=1:this.optionStep=0;var t=this.getNextModel(e.keyCode);for(t||(l.yV.deselectAll(this.collection),t=this.getNextModel(e.keyCode));this.isDisabled(t);)this.optionStep++,t=this.getNextModel(e.keyCode);this.onSelect(t)}},{key:"onType",value:function(e){if(1===e.key.toString().length){var t=this.getModelMatch(e);t&&this.onSelect(t),this.runTimer()}}},{key:"onSelect",value:function(e){this.isDisabled(e)||(l.yV.setSelected(e.get("id"),this.collection),this.setModel(),this.getUI("dropdownToggle").text(this.getButtonText()),o.Radio.channel(this.options.channelName).trigger("select:option:selected",e))}},{key:"setModel",value:function(){this.model=l.yV.getSelected(this.collection)}},{key:"getNextModel",value:function(e){var t,n=l.yV.getSelected(this.collection)||this.collection.first(),o=this.collection.indexOf(n);return(t=38===e?this.collection.at(o-this.optionStep):this.collection.at(o+this.optionStep))||(l.yV.deselectAll(this.collection),t=this.collection.first(),this.optionStep=0),t}},{key:"getModelMatch",value:function(e){var t,n=this;return 1===this.selectSearch.length&&this.selectSearch===e.key?t=this.handleSameCharIndex(e.key):(this.selectSearch+=e.key,this.sameCharIndex=1),t||(t=i.find(this.collection.models,(function(e){return e.get(n.options.displayProperty).toLowerCase().slice(0,n.selectSearch.length).includes(n.selectSearch.toLowerCase())}))),t}},{key:"handleSameCharIndex",value:function(e){var t=this,n=i.filter(this.collection.models,(function(n){return n.get(t.options.displayProperty).toLowerCase().slice(0,1)===e}));if(n.length>1){var o=n[this.sameCharIndex];return o||(o=i.first(n),this.sameCharIndex=0),this.sameCharIndex++,o}return i.first(n)}},{key:"runTimer",value:function(){var e=this;this.scopedTimerIndex&&clearTimeout(this.scopedTimerIndex),this.scopedTimerIndex=window.setTimeout((function(){e.selectSearch=""}),500)}},{key:"isDisabled",value:function(e){var t;if(e.get("divider"))return!0;if(!i.isFunction(this.options.childOptions.isDisabled))return!1;for(var n=arguments.length,o=new Array(n>1?n-1:0),r=1;r<n;r++)o[r-1]=arguments[r];return(t=this.options.childOptions.isDisabled).call.apply(t,[this,e].concat(o))}},{key:"getButtonText",value:function(){if(this.options.disabled)return this.options.noOptionsText;var e=l.yV.getSelected(this.collection);return e&&e.get(this.options.displayProperty)||this.options.placeholderText}},{key:"viewOptions",value:function(){return{styles:u,inputName:this.options.inputName,disabled:this.options.disabled,placeholderText:this.getButtonText()}}},{key:"onRender",value:function(){this.showChildView("dropdown",new a.w({collection:this.collection,channelName:this.options.channelName,childOptions:i.extend(this.options.childOptions),displayOptions:{extraClasses:"w-100 ".concat(u.dropdownMenu)},analyticsHelper:this.options.analyticsHelper}))}}],r&&p(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),t}(r.Q.wA)},20072:function(e,t,n){"use strict";n.d(t,{Y:function(){return g}});var o=n(48088),i=n(57857),r=n(31647),a=n(50299),l=n(93569),s=n(68979),c=n.n(s),u={list:"MxlSt",selector:"qHvbU",customItem:"aJzJB"};function d(e){return d="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},d(e)}function p(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,f(o.key),o)}}function f(e){var t=function(e,t){if("object"!=d(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!=d(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==d(t)?t:String(t)}function h(e,t,n){return t=v(t),function(e,t){if(t&&("object"===d(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||[],v(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 v(e){return v=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},v(e)}function m(e,t){return m=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},m(e,t)}var g=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),h(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.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=f(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(),o.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 o=l.PU.getSelected(this.options.folderTreeKey,this.collection),r=o?o.get("name"):i.T.getPhrase(this.lang,"button");this.getUI("button").text(r)}}},{key:"renderSelector",value:function(){this.showChildView("selector",new a.J({styles:u,collection:this.collection,channelName:this.options.channelName,childrenProperty:"children",folderTreeId:this.options.folderTreeKey,extraClass:u.list,extraClasses:u.list,isSelector:!0,disabledIds:this.disabledIds||{}}))}},{key:"viewOptions",value:function(){return{styles:u,name:this.options.name||this.options.channelName,buttonText:this.buttonText,canCreateNew:this.options.canCreateNew}}},{key:"onRender",value:function(){this.setButtonText(),this.renderSelector()}}])&&p(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),t}(r.Q.wA)},21893: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,i){return'<div class="dropdown-menu-region"></div>'},useData:!0})},42494: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,i){return e.propertyIsEnumerable,'<div class="finish-button-region"></div>\n<button class="btn btn-outline-dark float-end add-more-videos">'+e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"addMore",{name:"lang",hash:{},data:i}))+"</button>"},useData:!0})},76370:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({1:function(e,t,n,o,i){var r;return e.propertyIsEnumerable,'<span class="'+e.escapeExpression(e.lambda(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.requiredStar:r,t))+'">*</span>'},3:function(e,t,n,o,i){return' <div class="library-select-region form-group col-6"></div>\n'},5:function(e,t,n,o,i){return"col-6"},7:function(e,t,n,o,i){return"col-12"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){e.propertyIsEnumerable;var r,a=null!=t?t:e.nullContext||{};return"<h5>"+e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(a,"uploadDestination",{name:"lang",hash:{},data:i}))+(null!=(r=n.if.call(a,null!=(r=null!=(r=null!=t?t.options:t)?r.requiredFields:r)?r.uploadDestination:r,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?r:"")+'</h5>\n <div class="container-fluid px-0">\n <div class="row">\n'+(null!=(r=n.if.call(a,null!=(r=null!=t?t.options:t)?r.hasMultipleLibraries:r,{name:"if",hash:{},fn:e.program(3,i,0),inverse:e.noop,data:i}))?r:"")+' <div class="folder-select-region form-group '+(null!=(r=n.if.call(a,null!=(r=null!=t?t.options:t)?r.hasMultipleLibraries:r,{name:"if",hash:{},fn:e.program(5,i,0),inverse:e.program(7,i,0),data:i}))?r:"")+'"></div>\n </div>\n </div>\n</div>'},useData:!0})},11453: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,i){e.propertyIsEnumerable;var r,a=null!=t?t:e.nullContext||{},l=e.hooks.helperMissing,s="function",c=e.escapeExpression;return'<div class="progress-bar bg-info" style="width: '+c(typeof(r=null!=(r=n.progress||(null!=t?t.progress:t))?r:l)===s?r.call(a,{name:"progress",hash:{},data:i}):r)+'%" aria-valuenow="'+c(typeof(r=null!=(r=n.progress||(null!=t?t.progress:t))?r:l)===s?r.call(a,{name:"progress",hash:{},data:i}):r)+'" aria-valuemin="0" aria-valuemax="100"></div>'},useData:!0})},42633:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({1:function(e,t,n,o,i){return" on"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){e.propertyIsEnumerable;var r,a=null!=t?t:e.nullContext||{},l=e.hooks.helperMissing,s=e.escapeExpression;return"<h5>"+s((n.lang||t&&t.lang||l).call(a,"heading",{name:"lang",hash:{},data:i}))+'</h5>\n<div class="container-fluid">\n <div class="row">\n <div class="form-group col-6 p-0">\n <div class="d-block">\n <label>'+s((n.lang||t&&t.lang||l).call(a,"autoCaptioningHeading",{name:"lang",hash:{},data:i}))+'</label>\n <div class="custom-toggle toggle-option float-end'+(null!=(r=n.if.call(a,null!=(r=null!=t?t.options:t)?r.isSelected:r,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?r:"")+'"><span class="handle"></span></div>\n </div>\n <p class=\'mb-0 me-5\'>'+s((n.lang||t&&t.lang||l).call(a,"autoCaptioningInfo",{name:"lang",hash:{},data:i}))+"</p>\n </div>\n </div>\n</div>\n \n"},useData:!0})},61778: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,i){var r;return e.propertyIsEnumerable,e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"uploading",{name:"lang",hash:{percentage:null!=(r=null!=t?t.options:t)?r.percentage:r},data:i}))},useData:!0})},47381: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,i){var r;return e.propertyIsEnumerable,e.escapeExpression(e.lambda(null!=(r=null!=t?t.options:t)?r.name:r,t))},useData:!0})},63105:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({1:function(e,t,n,o,i){var r;return e.propertyIsEnumerable,'<div class="p-2 text-center border-top">\n <button class="add-advanced-metadata btn btn-link">'+(null!=(r=n.if.call(null!=t?t:e.nullContext||{},null!=(r=null!=t?t.options:t)?r.showAdvanced:r,{name:"if",hash:{},fn:e.program(2,i,0),inverse:e.program(4,i,0),data:i}))?r:"")+"</a>\n</div>\n"},2:function(e,t,n,o,i){return e.propertyIsEnumerable,e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"hideMetadata",{name:"lang",hash:{},data:i}))},4:function(e,t,n,o,i){return e.propertyIsEnumerable,e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"addMetadata",{name:"lang",hash:{},data:i}))},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){e.propertyIsEnumerable;var r,a,l=e.escapeExpression,s=null!=t?t:e.nullContext||{},c=e.hooks.helperMissing;return'<div class="upload-title-region"></div>\n<div class="container-fluid">\n <div class="row">\n <div class="col-4 p-3">\n <div class="thumbnail-region"></div>\n <div class="upload-progress-region"></div>\n <div class="my-3">\n <h5 class="'+l(e.lambda(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.title:r,t))+'">'+l("function"==typeof(a=null!=(a=n.name||(null!=t?t.name:t))?a:c)?a.call(s,{name:"name",hash:{},data:i}):a)+'</h5>\n <div class="text-progress-region"></div>\n <button class="btn btn-outline-dark cancel-upload">'+l((n.lang||t&&t.lang||c).call(s,"cancel",{name:"lang",hash:{},data:i}))+'</button>\n </div>\n\n </div>\n <div class="col-8 py-3 pe-3">\n <div class="video-details-region"></div>\n <div class="folder-select-region"></div>\n <div class="additional-info-region"></div>\n <div class="production-info-region"></div>\n <div class="video-options-region"></div>\n </div>\n </div>\n</div>\n'+(null!=(r=n.if.call(s,null!=(r=null!=t?t.options:t)?r.showExpand:r,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?r:"")},useData:!0})},35250: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,i){return'<div class="top-actions-region"></div>\n<div class="videos-region"></div>\n<div class="bottom-actions-region"></div>'},useData:!0})},46635:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({1:function(e,t,n,o,i){var r;return e.propertyIsEnumerable,e.escapeExpression(e.lambda(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.disabled:r,t))},3:function(e,t,n,o,i){return" disabled"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){e.propertyIsEnumerable;var r,a=e.lambda,l=e.escapeExpression,s=null!=t?t:e.nullContext||{};return'<button \n class="dropdown-toggle form-control text-start position-relative '+l(a(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.selectButton:r,t))+" "+(null!=(r=n.if.call(s,null!=(r=null!=t?t.options:t)?r.disabled:r,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?r:"")+'" \n type="button" \n id="dropdownMenuButton" \n data-bs-toggle="dropdown" \n aria-haspopup="true" \n aria-expanded="false"\n '+(null!=(r=n.if.call(s,null!=(r=null!=t?t.options:t)?r.disabled:r,{name:"if",hash:{},fn:e.program(3,i,0),inverse:e.noop,data:i}))?r:"")+' \n name="'+l(a(null!=(r=null!=t?t.options:t)?r.inputName:r,t))+'"\n >\n '+l(a(null!=(r=null!=t?t.options:t)?r.placeholderText:r,t))+'\n</button>\n<div class="dropdown-region"></div>\n<div class="form-feedback"></div>'},useData:!0})},68979:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({1:function(e,t,n,o,i){e.propertyIsEnumerable;var r,a=e.escapeExpression;return' <button class="create-new btn fw-bold rounded-0 rounded-bottom-lg w-100 text-start '+a(e.lambda(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.customItem:r,t))+'">'+a((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"createNew",{name:"lang",hash:{},data:i}))+"</button>\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){var r;return e.propertyIsEnumerable,'<div class="border rounded-3 overflow-auto" name='+e.escapeExpression(e.lambda(null!=(r=null!=t?t.options:t)?r.name:r,t))+'>\n <div class="selector-region"></div>\n'+(null!=(r=n.if.call(null!=t?t:e.nullContext||{},null!=(r=null!=t?t.options:t)?r.canCreateNew:r,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?r:"")+'</div>\n<div class="form-feedback"></div>'},useData:!0})}}]);
1
+ (self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[9383],{80732:function(e,t,n){"use strict";n.r(t),n.d(t,{UploadVideosView:function(){return wt}});var o=n(48088),i=n(39479),r=n(25417),a=n(21186),l=n(21679),s=n(57857),c=n(99249),u=n(31647),d=n(52076),p=n(70065),f=n(81937),h=n(5854),y=n(8371),v=n(36357),m=n(57098),g=n(64404),b=n(48404),w=n(19226),S=n(93569),k=n(95061),O=n(88410),C=n(57769),P=n(88172),T=n(42494),N=n.n(T);function j(e){return j="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},j(e)}function E(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,x(o.key),o)}}function x(e){var t=function(e,t){if("object"!=j(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!=j(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==j(t)?t:String(t)}function I(e,t,n){return t=D(t),function(e,t){if(t&&("object"===j(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,_()?Reflect.construct(t,n||[],D(e).constructor):t.apply(e,n))}function _(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(_=function(){return!!e})()}function D(e){return D=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},D(e)}function A(e,t){return A=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},A(e,t)}var R=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),I(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&&A(e,t)}(t,e),n=t,(i=[{key:"initialize",value:function(){this.model=c.r.get("upload:progress:".concat(O.AJ.Video)),this.listenTo(this.model,"change:done",this.render),this.listenTo(this.channelName,"continue",this.onClickContinue),this.listenTo(this.options.uploadChannelName,"start:spinner",this.startSpinner)}},{key:"name",get:function(){return"UploadActionsComponent"}},{key:"lang",get:function(){return"upload.uploadActions"}},{key:"template",get:function(){return N()}},{key:"className",get:function(){return"clearfix my-3"}},{key:"channelName",get:function(){return"".concat(this.name).concat(this.cid)}},{key:"regions",value:function(){return{finishButton:{el:".finish-button-region",replaceElement:!0}}}},{key:"behaviors",get:function(){return[{behaviorClass:C.Z,buttonSelector:".add-more-videos",channelName:this.options.uploadChannelName,acceptMultiple:!0,mimeType:"video/*"}]}},{key:"startSpinner",value:function(){o.Radio.channel(this.channelName).trigger(P.I3.ShowSpinner)}},{key:"onClickContinue",value:function(){this.model.get("done")&&o.Radio.channel(this.options.uploadChannelName).trigger("continue")}},{key:"onRender",value:function(){this.showChildView("finishButton",new P.Py({channelName:this.channelName,disabled:!this.model.get("done"),saveEvent:"continue",extraButtonClass:"btn-dark float-end ms-3",buttonText:s.T.getPhrase(this.lang,"finish"),spinnerOptions:{size:S.Ey.Small,type:S.dR.Light,extraClasses:"mx-auto"},tooltip:{title:this.model.get("done")?"":s.T.getPhrase(this.lang,"stillUploading")}}))}}])&&E(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),t}(u.Q.wA),V=n(33192),M=n(88483),U=n(2772),F=n(24184),B=n(72998),L=n(95168),K=n(39155),Q=(n(14611),n(33015),n(90680)),z=n(20072),J=n(60602),H=n(75459),q=n(26357),W=n(22557),G=n(21893),X=n.n(G);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 Z(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,ee(o.key),o)}}function ee(e){var t=function(e,t){if("object"!=Y(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!=Y(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Y(t)?t:String(t)}function te(e,t,n){return t=oe(t),function(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)}(e,ne()?Reflect.construct(t,n||[],oe(e).constructor):t.apply(e,n))}function ne(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(ne=function(){return!!e})()}function oe(e){return oe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},oe(e)}function ie(e,t){return ie=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ie(e,t)}var re=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),te(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&&ie(e,t)}(t,e),n=t,(r=[{key:"initialize",value:function(){this.prepareData(),this.bindListeners()}},{key:"lang",get:function(){return"libraryEditor.folderSelect"}},{key:"prepareData",value:function(){var e=this.options.library?this.options.library.collection:this.collection;this.collection=W.P.flatten(e),S.yV.setSelected(this.options.currentFolderId,this.collection),this.options.canCreateFolder&&this.collection.add({name:s.T.getPhrase(this.lang,"createNew"),eventName:"create:folder"})}},{key:"bindListeners",value:function(){var e=this;this.listenTo(this.channelName,"create:folder",this.onClickCreateFolder),this.listenTo(this.channelName,"select:option:selected",(function(t){o.Radio.channel(e.options.channelName).trigger("folder:selected",t)}))}},{key:"channelName",get:function(){return"".concat(this.name).concat(this.cid)}},{key:"folderTreeKey",get:function(){return"folderselect:".concat(this.cid)}},{key:"name",get:function(){return"FolderSelectView"}},{key:"className",get:function(){return"position-relative"}},{key:"template",get:function(){return X()}},{key:"regions",value:function(){return{dropdown:{el:".dropdown-menu-region",replaceElement:!0}}}},{key:"onClickCreateFolder",value:function(){o.Radio.channel(this.options.channelName).trigger("create:folder:clicked")}},{key:"generatePrefix",value:function(){var e=this.model.get("depth");if(!i.isNumber(e)||this.model.get("hidePrefix"))return"";for(var t="",n=0;n<e;n++)t+="&nbsp;&nbsp;";return e&&(t+="- "),t}},{key:"getIsOptionDisabledFn",value:function(){var e=this.options.disableLibraries,t=this.options.disabledFolderIds;return function(n){var o=n||this.model;return!(!e||o.get("type")!==H.r.CustomLibrary)||!(!t||!i.contains(t,o.get("id").toString()))}}},{key:"onRender",value:function(){this.showChildView("dropdown",new q.H({collection:this.collection,channelName:this.channelName,childOptions:{titleProperty:"name",eventName:"select:option:click",prefixHandler:this.generatePrefix,currentSelectedMessage:this.options.currentSelectedMessage||s.T.getPhrase(this.lang,"current"),isDisabled:this.getIsOptionDisabledFn()},placeholderText:this.options.placeholderText||s.T.getPhrase(this.lang,"placeholder"),noOptionsText:s.T.getPhrase(this.lang,"noFolders"),inputName:this.options.inputName,disabled:0===this.collection.length||this.options.disabled,analyticsHelper:d.k}))}}])&&Z(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),t}(u.Q.wA),ae=n(76370),le=n.n(ae),se={requiredStar:"BykcP"};function ce(e){return ce="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},ce(e)}function ue(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,de(o.key),o)}}function de(e){var t=function(e,t){if("object"!=ce(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!=ce(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ce(t)?t:String(t)}function pe(e,t,n){return t=he(t),function(e,t){if(t&&("object"===ce(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,fe()?Reflect.construct(t,n||[],he(e).constructor):t.apply(e,n))}function fe(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(fe=function(){return!!e})()}function he(e){return he=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},he(e)}function ye(e,t){return ye=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ye(e,t)}var ve=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),pe(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&&ye(e,t)}(t,e),n=t,(i=[{key:"initialize",value:function(){var e=this;this.librariesWithoutFolders=new Q.q,this.collection.each((function(t){return e.librariesWithoutFolders.add(t.toFlatJSON())})),this.listenTo(this.libraryChannelName,"folder:selected",this.onLibrarySelected),this.listenTo(this.channelName,"folder:selected new:folder:selected",this.onFolderSelected),this.listenTo(this.channelName,"create:folder:clicked",this.onCreateFolderClicked),!this.hasMultipleLibraries()&&this.librariesWithoutFolders.first()&&this.model.set("libraryId",this.librariesWithoutFolders.first().get("id"));var t=this.collection.get(this.model.get("libraryId"));if(t){var n=S.PU.getSelected(this.folderTreeKey,t.children);this.options.preselectedFolderId&&!n&&this.onFolderSelected(this.options.preselectedFolderId)}}},{key:"name",get:function(){return"UploadFolderSelectComponent"}},{key:"template",get:function(){return le()}},{key:"lang",get:function(){return"upload.uploadFolderSelect"}},{key:"folderTreeKey",get:function(){return"folder:tree:".concat(this.model.cid)}},{key:"regions",value:function(){return{librarySelect:".library-select-region",folderSelect:".folder-select-region"}}},{key:"hasMultipleLibraries",value:function(){return this.librariesWithoutFolders.length>1}},{key:"libraryChannelName",get:function(){return"".concat(this.channelName,":").concat(this.options.selectId,":libraries")}},{key:"channelName",get:function(){return"".concat(this.name).concat(this.cid).concat(this.options.selectId)}},{key:"onLibrarySelected",value:function(e){this.model.set("libraryId",e.get("id")),this.model.unset("folderId"),this.render()}},{key:"onFolderSelected",value:function(e){var t=e;e instanceof J.g&&(t=e.get("id")),this.model.set("folderId",t);var n=this.collection.get(this.model.get("libraryId")).children;S.PU.setSelected(this.folderTreeKey,t,n),this.model.validate()}},{key:"onCreateFolderClicked",value:function(){o.Radio.channel(this.options.channelName).trigger("show:new:folder",this.model.get("libraryId"),this.channelName)}},{key:"renderLibrarySelect",value:function(){if(this.hasMultipleLibraries()){var e=new re({collection:this.librariesWithoutFolders,channelName:this.libraryChannelName,placeholderText:s.T.getPhrase(this.lang,"selectLibraryPlaceholder"),currentFolderId:this.model.get("libraryId"),currentSelectedMessage:s.T.getPhrase(this.lang,"currentLibrary"),inputName:"libraryId",canCreateFolder:!1});this.showChildView("librarySelect",e)}}},{key:"renderFolderSelect",value:function(){var e=this.model.get("libraryId");if(e){var t=this.collection.get(e);this.showChildView("folderSelect",new z.Y({collection:t.children,channelName:this.channelName,folderTreeKey:this.folderTreeKey,canCreateNew:!0,name:"folderId"}))}}},{key:"viewOptions",value:function(){return{styles:se,hasMultipleLibraries:this.hasMultipleLibraries(),requiredFields:this.options.requiredFields}}},{key:"onRender",value:function(){this.renderLibrarySelect(),this.renderFolderSelect()}}])&&ue(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),t}(u.Q.wA),me=n(11453),ge=n.n(me);function be(e){return be="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},be(e)}function we(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,Se(o.key),o)}}function Se(e){var t=function(e,t){if("object"!=be(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!=be(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==be(t)?t:String(t)}function ke(e,t,n){return t=Ce(t),function(e,t){if(t&&("object"===be(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,Oe()?Reflect.construct(t,n||[],Ce(e).constructor):t.apply(e,n))}function Oe(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Oe=function(){return!!e})()}function Ce(e){return Ce=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ce(e)}function Pe(e,t){return Pe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Pe(e,t)}var Te=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),ke(this,t,arguments)}var n,o;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&&Pe(e,t)}(t,e),n=t,(o=[{key:"initialize",value:function(){this.listenTo(this.model,"change:progress",this.update)}},{key:"name",get:function(){return"UploadProgressComponent"}},{key:"template",get:function(){return ge()}},{key:"className",get:function(){return"progress my-3"}},{key:"elements",get:function(){return{progressBar:".progress-bar"}}},{key:"update",value:function(){var e=this.model.get("progress"),t=this.getUI("progressBar");t&&t.get(0)&&$(t.get(0)).css("width","".concat(e,"%"))}}])&&we(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),t}(u.Q.wA),Ne=n(42633),je=n.n(Ne);function Ee(e){return Ee="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},Ee(e)}function xe(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,Ie(o.key),o)}}function Ie(e){var t=function(e,t){if("object"!=Ee(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!=Ee(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ee(t)?t:String(t)}function _e(e,t,n){return t=Ae(t),function(e,t){if(t&&("object"===Ee(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,De()?Reflect.construct(t,n||[],Ae(e).constructor):t.apply(e,n))}function De(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(De=function(){return!!e})()}function Ae(e){return Ae=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ae(e)}function Re(e,t){return Re=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Re(e,t)}var Ve=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),_e(this,t,[e])}var n,o;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&&Re(e,t)}(t,e),n=t,(o=[{key:"name",get:function(){return"UploadVideoOptionsComponent"}},{key:"template",get:function(){return je()}},{key:"lang",get:function(){return"upload.uploadVideoOptions"}},{key:"tagName",get:function(){return"form"}},{key:"className",get:function(){return"border-top pt-3"}},{key:"events",value:function(){return{"click .toggle-option":"onToggleAutoCaptioning"}}},{key:"onToggleAutoCaptioning",value:function(e){e.stopPropagation(),this.model.set("autoCaption",!this.model.get("autoCaption")),this.render()}},{key:"viewOptions",value:function(){return{isSelected:this.model.get("autoCaption")}}}])&&xe(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),t}(u.Q.wA),Me=n(61778),Ue=n.n(Me),Fe=n(47381),Be=n.n(Fe),Le=n(63105),Ke=n.n(Le),Qe={title:"melld"};function ze(e){return ze="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},ze(e)}function Je(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function He(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,$e(o.key),o)}}function qe(e,t,n){return t&&He(e.prototype,t),n&&He(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function $e(e){var t=function(e,t){if("object"!=ze(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!=ze(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ze(t)?t:String(t)}function We(e,t,n){return t=Xe(t),function(e,t){if(t&&("object"===ze(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,Ge()?Reflect.construct(t,n||[],Xe(e).constructor):t.apply(e,n))}function Ge(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Ge=function(){return!!e})()}function Xe(e){return Xe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Xe(e)}function Ye(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&&Ze(e,t)}function Ze(e,t){return Ze=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Ze(e,t)}var et=function(e){function t(){return Je(this,t),We(this,t,arguments)}return Ye(t,e),qe(t,[{key:"initialize",value:function(){this.listenTo(this.model,"change:name",this.render)}},{key:"name",get:function(){return"UploadTitleComponent"}},{key:"template",get:function(){return Be()}},{key:"tagName",get:function(){return"h3"}},{key:"className",get:function(){return"mb-0 border-bottom p-3 ".concat(Qe.title)}},{key:"viewOptions",value:function(){return{name:this.model.get("name")||this.model.get("fileName")}}}]),t}(u.Q.wA),tt=function(e){function t(){return Je(this,t),We(this,t,arguments)}return Ye(t,e),qe(t,[{key:"initialize",value:function(){this.listenTo(this.model,"change:progress",this.render)}},{key:"name",get:function(){return"TextProgressComponent"}},{key:"template",get:function(){return Ue()}},{key:"lang",get:function(){return"upload.uploadVideo"}},{key:"className",get:function(){return" text-muted"}},{key:"tagName",get:function(){return"p"}},{key:"viewOptions",value:function(){return{percentage:Math.round(this.model.get("progress")||0)}}}]),t}(u.Q.wA),nt=function(e){function t(e){return Je(this,t),We(this,t,[e])}return Ye(t,e),qe(t,[{key:"initialize",value:function(){this.viewModel=c.r.get("upload:".concat(this.model.get("id")),{name:this.model.get("name"),fileName:this.model.get("name"),showAdvanced:this.options.openAdvancedMetadata,rating:this.options.ratings.findWhere({value:0}),folderId:this.options.folderId,libraryId:this.options.libraryId,timeInitialized:V(),autoCaption:!1},{ctor:g.n}),this.viewModel.addValidation(K.I),this.listenTo(this.channelName,"select:rating",i.partial(this.onAssociationSelected,i,"rating")),this.listenTo(this.channelName,"select:channel",i.partial(this.onAssociationSelected,i,"channel")),this.listenTo(this.channelName,"add:producers",this.onSelectProducer),this.listenTo(this.channelName,"add:distributors",this.onSelectDistributor),this.listenTo(this.channelName,"add:productionCompanies",this.onSelectProductionCompany),this.listenTo(this.channelName,"add:directors",this.onSelectDirector),this.listenTo(this.channelName,"select:series",this.onSelectSeries),this.listenTo(this.channelName,"add:season",this.onSelectSeason),this.listenTo(this.options.uploadChannelName,"invalid:".concat(this.model.get("id")),this.scrollTo)}},{key:"name",get:function(){return"UploadVideoComponent"}},{key:"template",get:function(){return Ke()}},{key:"className",get:function(){return"bg-white mb-3 rounded"}},{key:"lang",get:function(){return"upload.uploadVideo"}},{key:"events",value:function(){return{"click .add-advanced-metadata":"onClickAddAdvancedMetadata","click .cancel-upload":"onClickCancelUpload"}}},{key:"channelName",get:function(){return"".concat(this.name).concat(this.cid)}},{key:"regions",value:function(){return{progress:{el:".upload-progress-region",replaceElement:!0},thumbnail:{el:".thumbnail-region",replaceElement:!0},uploadTitle:{el:".upload-title-region",replaceElement:!0},folderSelect:{el:".folder-select-region",replaceElement:!0},textProgress:{el:".text-progress-region",replaceElement:!0},videoDetails:{el:".video-details-region",replaceElement:!0},productionInfo:{el:".production-info-region",replaceElement:!0},advancedDetails:{el:".additional-info-region",replaceElement:!0},uploadOptions:{el:".video-options-region",replaceElement:!0}}}},{key:"onClickAddAdvancedMetadata",value:function(){this.viewModel.set("showAdvanced",!this.viewModel.get("showAdvanced")),this.render()}},{key:"onClickCancelUpload",value:function(){var e=this,t={title:s.T.getPhrase(this.lang,"cancelHeading"),text:s.T.getPhrase(this.lang,"cancelBody",{videoTitle:this.model.get("name")}),buttons:[{text:s.T.getPhrase(this.lang,"yes"),className:"btn btn-dark",success:!0},{text:s.T.getPhrase(this.lang,"no"),className:"btn btn-link",close:!0}],channelName:this.channelName};new S.Mr(t).render().done((function(){o.Radio.channel(e.options.uploadChannelName).trigger("cancel:upload",e.model.get("id"))}))}},{key:"onAssociationSelected",value:function(e,t){var n=this.viewModel.get(t);if(n instanceof u.Q.FE){var o=n.filter((function(t){return!t.id||t.name===e.name}));i.each(o,(function(e){return n.remove(e)})),this.viewModel.get(t).add(e)}else this.viewModel.set(t,e)}},{key:"onSelectSeries",value:function(e){var t=this,n=o.Radio.channel(this.options.uploadChannelName);e.id?n.trigger("get:series",e.id,(function(e){t.onAssociationSelected(e.toJSON(),"series"),t.renderBasicVideoDetails()})):e.name&&n.trigger("create:series",e.name,(function(e){t.onAssociationSelected(e.toJSON(),"series"),t.renderBasicVideoDetails()}))}},{key:"onSelectSeason",value:function(e){var t=this;if(i.isNull(e))return this.viewModel.get("season").clear({silent:!0}),S.yV.deselectAll(this.viewModel.get("series.seasons")),this.onAssociationSelected(null,"season"),void this.renderBasicVideoDetails();if(e.id)return S.yV.setSelected(e.id,this.viewModel.get("series.seasons")),this.onAssociationSelected(e,"season"),void this.renderBasicVideoDetails();if(e.number){var n=this.viewModel.get("series.id");o.Radio.channel(this.options.uploadChannelName).trigger("create:season",e,n,(function(e){t.viewModel.get("series.seasons").add(e.toJSON()),S.yV.setSelected(e.id,t.viewModel.get("series.seasons")),t.onAssociationSelected(e.toJSON(),"season"),t.renderBasicVideoDetails()}))}}},{key:"onSelectDistributor",value:function(e){var t=this;e.id?this.onAssociationSelected(e,"distributors"):e.name&&o.Radio.channel(this.options.uploadChannelName).trigger("create:company",e.name,(function(e){t.onAssociationSelected(e.toJSON(),"distributors")}))}},{key:"onSelectProductionCompany",value:function(e){var t=this;e.id?this.onAssociationSelected(e,"productionCompanies"):e.name&&o.Radio.channel(this.options.uploadChannelName).trigger("create:company",e.name,(function(e){t.onAssociationSelected(e.toJSON(),"productionCompanies")}))}},{key:"onSelectDirector",value:function(e){var t=this;e.id?this.onAssociationSelected(e,"directors"):e.name&&o.Radio.channel(this.options.uploadChannelName).trigger("create:person",e.name,(function(e){t.onAssociationSelected(e.toJSON(),"directors")}))}},{key:"onSelectProducer",value:function(e){var t=this;e.id?this.onAssociationSelected(e,"producers"):e.name&&o.Radio.channel(this.options.uploadChannelName).trigger("create:person",e.name,(function(e){t.onAssociationSelected(e.toJSON(),"producers")}))}},{key:"getRequiredFields",value:function(){return{uploadDestination:!0}}},{key:"renderTitle",value:function(){var e=new et({model:this.viewModel});this.showChildView("uploadTitle",e)}},{key:"renderThumbnail",value:function(){var e=new U.Z({model:this.viewModel,thumbnailOptions:{size:M.h2.Medium}});this.showChildView("thumbnail",e)}},{key:"renderProgress",value:function(){var e=new Te({model:this.model});this.showChildView("progress",e);var t=new tt({model:this.model});this.showChildView("textProgress",t)}},{key:"renderBasicVideoDetails",value:function(){var e=new B.J({model:this.viewModel,channelName:this.channelName,ratings:this.options.ratings,requiredFields:this.getRequiredFields(),editable:!0});this.showChildView("videoDetails",e)}},{key:"renderFolderSelect",value:function(){var e=new ve({collection:this.options.libraries,selectId:this.model.get("id"),model:this.viewModel,channelName:this.options.uploadChannelName,requiredFields:this.getRequiredFields(),preselectedFolderId:this.options.folderId});this.showChildView("folderSelect",e)}},{key:"renderAdvancedVideoDetails",value:function(){if(this.viewModel.get("showAdvanced")){if(!this.options.hideBroadcastInfo){var e=new F.a({channelName:this.channelName,model:this.viewModel,editable:!0});this.showChildView("advancedDetails",e)}var t=new L.O({channelName:this.channelName,model:this.viewModel,editable:!0});this.showChildView("productionInfo",t),this.options.allowAutoCaptioning&&this.showChildView("uploadOptions",new Ve({model:this.viewModel}))}}},{key:"scrollTo",value:function(){$("html,body").animate({scrollTop:this.$el.offset().top},250)}},{key:"viewOptions",value:function(){return Object.assign({styles:Qe,showExpand:this.options.allowAutoCaptioning},this.viewModel.toJSON())}},{key:"onRender",value:function(){this.renderTitle(),this.renderThumbnail(),this.renderProgress(),this.renderBasicVideoDetails(),this.renderFolderSelect(),this.renderAdvancedVideoDetails(),o.Validation.bind(this,{model:this.viewModel})}},{key:"onDestroy",value:function(){o.Validation.unbind(this)}}]),t}(u.Q.wA);function ot(e){return ot="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},ot(e)}function it(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,rt(o.key),o)}}function rt(e){var t=function(e,t){if("object"!=ot(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!=ot(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ot(t)?t:String(t)}function at(e,t,n){return t=st(t),function(e,t){if(t&&("object"===ot(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,lt()?Reflect.construct(t,n||[],st(e).constructor):t.apply(e,n))}function lt(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(lt=function(){return!!e})()}function st(e){return st=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},st(e)}function ct(e,t){return ct=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ct(e,t)}var ut=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),at(this,t,[e])}var n,o;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&&ct(e,t)}(t,e),n=t,(o=[{key:"name",get:function(){return"UploadVideoComponentCollection"}},{key:"childView",get:function(){return nt}},{key:"childViewOptions",get:function(){return{ratings:this.options.ratings,libraries:this.options.libraries,uploadChannelName:this.options.uploadChannelName,folderId:this.options.folderId,libraryId:this.options.libraryId,allowAutoCaptioning:this.options.allowAutoCaptioning,hideBroadcastInfo:this.options.hideBroadcastInfo,openAdvancedMetadata:this.collection.length<=1}}}])&&it(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),t}(u.Q.$W),dt=n(35250),pt=n.n(dt);function ft(e){return ft="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},ft(e)}function ht(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,yt(o.key),o)}}function yt(e){var t=function(e,t){if("object"!=ft(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!=ft(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ft(t)?t:String(t)}function vt(e,t,n){return t=gt(t),function(e,t){if(t&&("object"===ft(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,mt()?Reflect.construct(t,n||[],gt(e).constructor):t.apply(e,n))}function mt(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(mt=function(){return!!e})()}function gt(e){return gt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},gt(e)}function bt(e,t){return bt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},bt(e,t)}var wt=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=vt(this,t,[e])).completed=!1,n}var n,O;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&&bt(e,t)}(t,e),n=t,(O=[{key:"initialize",value:function(){this.initServices(),this.initDataListeners(),this.initComponentListeners(),this.initCollectionListeners(),this.initShellListeners()}},{key:"name",get:function(){return"UploadVideosView"}},{key:"title",get:function(){return s.T.getPhrase(this.lang,"title")}},{key:"lang",get:function(){return"upload.uploadVideos"}},{key:"template",get:function(){return pt()}},{key:"regions",value:function(){return{topActions:{el:".top-actions-region",replaceElement:!0},bottomActions:{el:".bottom-actions-region",replaceElement:!0},videos:{el:".videos-region",replaceElement:!0}}}},{key:"channelName",get:function(){return"".concat(this.name).concat(this.cid)}},{key:"initServices",value:function(){this.videoDataService=l.u.getInstance(m.Or.Video,this),this.videoUploadService=l.u.getInstance(m.K9.VideoUpload,this),this.videoUploadDataService=l.u.getInstance(m.Or.VideoUpload,this),this.seriesDataService=l.u.getInstance(m.Or.Series,this),this.ratingsDataService=l.u.getInstance(m.Or.Ratings,this),this.companyDataService=l.u.getInstance(m.Or.Company,this),this.personDataService=l.u.getInstance(m.Or.Person,this),this.alertService=l.u.getInstance(m.K9.Alerts,this),this.navLockService=l.u.getInstance(m.K9.NavLock,this),this.settingsDataService=l.u.getInstance(m.Or.Settings,this)}},{key:"initDataListeners",value:function(){this.listenTo(m.Vk.RATINGS,"".concat(m.M_.RATINGS,":sync"),this.render),this.listenTo(m.Vk.LIBRARY,"folder:created",this.onFolderCreated)}},{key:"initComponentListeners",value:function(){this.listenTo(this.channelName,"continue",this.onClickContinue),this.listenTo(this.channelName,"cancel:upload",this.cancelUpload),this.listenTo(this.channelName,f.S.FILES_SELECTED,this.onFilesSelected),this.listenTo(this.channelName,"show:new:folder",this.onClickNewFolder),this.listenTo(this.channelName,"get:series",this.onSelectSeries),this.listenTo(this.channelName,"create:series",this.onCreateSeries),this.listenTo(this.channelName,"create:season",this.onCreateSeason),this.listenTo(this.channelName,"create:company",this.onCreateCompany),this.listenTo(this.channelName,"create:person",this.onCreatePerson)}},{key:"initCollectionListeners",value:function(){var e=this.videoUploadService.getCollection();this.listenTo(e,"remove",this.onCollectionChange)}},{key:"initShellListeners",value:function(){this.listenTo(r.G.SHELL,u.Q.Vy.NAV_UNLOCKED_BY_USER,this.onNavigateAway)}},{key:"cancelUpload",value:function(e){this.logCancelAction(e),this.videoUploadService.cancelUpload(e)}},{key:"onNavigateAway",value:function(){this.logCancelAction(),this.videoUploadService.cancelAllUploads()}},{key:"onCollectionChange",value:function(e,t){t.length||(this.navLockService.unlock(),u.Q.C$.trigger({application:m.OV.UPLOAD,action:m.eX.Upload.FILE_SELECTION}))}},{key:"onSelectSeries",value:function(e,t){this.seriesDataService.getSeries(e,t)}},{key:"onCreateSeries",value:function(e,t){this.seriesDataService.createSeries(e,t)}},{key:"onCreateSeason",value:function(e,t,n){this.seriesDataService.createSeason(e,t,n)}},{key:"onCreateCompany",value:function(e,t){this.companyDataService.createCompany(e,t)}},{key:"onCreatePerson",value:function(e,t){this.personDataService.createPerson(e,t)}},{key:"onClickContinue",value:function(){var e,t=this,n=o.Radio.channel(this.channelName),i=this.videoUploadService.getCollection(),r=!0;if(i.each((function(t){var n=c.r.get("upload:".concat(t.get("id")),null,{ctor:g.n});n.validate();var o=n.isValid();!1!==o||e||(e=t.id),r=r&&o})),e&&n.trigger("invalid:".concat(e)),r){n.trigger("start:spinner");var d=[];i.each((function(e){var n=e.get("file"),o=c.r.get("upload:".concat(e.get("id")),null,{ctor:g.n});if(h.S.hasExpired(o,t.config.get("uploadSessionExpiryTime")))return t.alertService.createAlert({heading:s.T.getPhrase(t.lang,"uploadErrorHeading"),message:s.T.getPhrase(t.lang,"uploadErrorBody",{videoName:o.get("name")}),type:a.NK.Fail}),void i.remove(e);o.set("fileId",n.cvUpload.fileId),o.set("fileSize",n.size),d.push(o)})),this.videoUploadDataService.completeVideoUploads(this.currentUser.get("id"),this.currentUser.get("customerId"),d,(function(){t.completed=!0,t.navLockService.unlock(),l.u.getInstance(m.K9.PendingItems).forceFetchPendingItems(),l.u.releaseInstance(m.K9.PendingItems),u.Q.C$.trigger({application:m.OV.UPLOAD,action:d.length?m.eX.Upload.UPLOAD_COMPLETE:m.eX.Upload.FILE_SELECTION}),t.logFinishAction(d),t.videoDataService.clearVideoCache()}))}}},{key:"onFilesSelected",value:function(e,t){this.videoUploadService.addFiles(e),this.logStartAction(e,t)}},{key:"onClickNewFolder",value:function(e,t){this.setFolderChannel=t,this.navLockService.unlock(),u.Q.C$.trigger({application:m.OV.UPLOAD,action:m.eX.Shared.NEW_FOLDER,args:[e]}),this.lockNav()}},{key:"onFolderCreated",value:function(e){this.setFolderChannel&&(o.Radio.channel(this.setFolderChannel).trigger("new:folder:selected",e),this.render())}},{key:"logStartAction",value:function(e,t){var n=d.k.mergeOptions(this.options.analyticsOptions,{workflowPhase:p.eu.Start,descriptor:d.k.mapInteractionType(t)});d.k.logUserAction(e,n)}},{key:"logCancelAction",value:function(e){var t=this.videoUploadService.getCollection();if(t.length){var n=e?t.get(e):t,o=d.k.mergeOptions(this.options.analyticsOptions,{workflowPhase:p.eu.Discard,descriptor:e?p.yh.Single:p.yh.All});d.k.logUserAction(n.toJSON(),o)}}},{key:"logFinishAction",value:function(e){if(e.length){var t=i.map(e,(function(e){return e.toJSON()})),n=d.k.mergeOptions(this.options.analyticsOptions,{workflowPhase:p.eu.Complete});d.k.logUserAction(t,n)}}},{key:"fetchData",value:function(){this.ratings=this.ratingsDataService.getAllRatings(),this.autoCaptioning=this.settingsDataService.getSetting(this.currentUser.get("customerId"),v.E.AutoCaptioning)}},{key:"renderUploadActions",value:function(){this.showChildView("topActions",new R({uploadChannelName:this.channelName})),this.showChildView("bottomActions",new R({uploadChannelName:this.channelName}))}},{key:"renderVideos",value:function(){var e={collection:this.videoUploadService.getCollection(),ratings:this.ratings,libraries:this.libraries,uploadChannelName:this.channelName,allowAutoCaptioning:this.autoCaptioning.get("value"),hideBroadcastInfo:this.currentUser.get("instanceRegion")===y.b.US};if(this.options.folderId){var t=S.PU.getLibrary(this.options.folderId,this.libraries);t&&(e.folderId=this.options.folderId,e.libraryId=t.get("id"))}var n=new ut(e);this.showChildView("videos",n)}},{key:"lockNav",value:function(){this.completed||this.navLockService.lock({title:s.T.getPhrase(this.lang,"navLockHeading"),text:s.T.getPhrase(this.lang,"navLockBody")})}},{key:"requiredResources",get:function(){return{currentUser:w.K.currentUser,libraries:k.T.libraries,config:b.p.config}}},{key:"onBeforeRender",value:function(){return this.fetchData(),!!this.ratings&&!!this.autoCaptioning}},{key:"onRender",value:function(){this.lockNav(),this.renderUploadActions(),this.renderVideos()}}])&&ht(n.prototype,O),Object.defineProperty(n,"prototype",{writable:!1}),t}(u.Q.G7)},71641:function(e,t,n){"use strict";n.d(t,{w:function(){return f}});var o=n(39479),i=n(31647),r=n(55142);function a(e){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(e)}function l(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,s(o.key),o)}}function s(e){var t=function(e,t){if("object"!=a(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!=a(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==a(t)?t:String(t)}function c(e,t,n){return t=d(t),function(e,t){if(t&&("object"===a(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,u()?Reflect.construct(t,n||[],d(e).constructor):t.apply(e,n))}function u(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(u=function(){return!!e})()}function d(e){return d=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},d(e)}function p(e,t){return p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},p(e,t)}var f=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),c(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&&p(e,t)}(t,e),n=t,i=[{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 r.N}},{key:"childViewOptions",get:function(){var e={channelName:this.options.channelName,analyticsHelper:this.options.analyticsHelper};return o.extend(e,this.options.childOptions)}},{key:"getExtraClasses",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.alignment,n=void 0===t?"left":t,o=e.extraClasses,i="dropdown-menu-".concat(n);return o&&(i="".concat(i," ").concat(o)),i}},{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)}}}],i&&l(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),t}(i.Q.$W)},26357:function(e,t,n){"use strict";n.d(t,{H:function(){return g}});var o=n(48088),i=n(39479),r=n(31647),a=n(71641),l=n(93569),s=n(46635),c=n.n(s),u={dropdownMenu:"oKdKI",selectButton:"fTeoW",disabled:"gZbQ4"};function d(e){return d="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},d(e)}function p(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,f(o.key),o)}}function f(e){var t=function(e,t){if("object"!=d(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!=d(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==d(t)?t:String(t)}function h(e,t,n){return t=v(t),function(e,t){if(t&&("object"===d(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||[],v(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 v(e){return v=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},v(e)}function m(e,t){return m=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},m(e,t)}var g=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=h(this,t,[e])).selectSearch="",n.sameCharIndex=1,n.optionStep=1,n}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.setModel(),this.bindListeners()}},{key:"name",get:function(){return"SelectComponent"}},{key:"template",get:function(){return c()}},{key:"regions",value:function(){return{dropdown:{el:".dropdown-region",replaceElement:!0}}}},{key:"events",value:function(){return{keydown:"onKeydown","shown.bs.dropdown":"onShowDropdown"}}},{key:"defaults",get:function(){return{displayProperty:"name"}}},{key:"elements",get:function(){return{dropdownToggle:".dropdown-toggle"}}},{key:"bindListeners",value:function(){this.listenTo(this.options.channelName,this.options.childOptions.eventName,this.onSelect)}},{key:"onShowDropdown",value:function(){o.Radio.channel(this.options.channelName).trigger("center:dropdown")}},{key:"onKeydown",value:function(e){38===e.keyCode||40===e.keyCode?this.onArrowKeyDown(e):13===e.keyCode?this.render():this.onType(e),o.Radio.channel(this.options.channelName).trigger("center:dropdown")}},{key:"onArrowKeyDown",value:function(e){l.yV.getSelected(this.collection)?this.optionStep=1:this.optionStep=0;var t=this.getNextModel(e.keyCode);for(t||(l.yV.deselectAll(this.collection),t=this.getNextModel(e.keyCode));this.isDisabled(t);)this.optionStep++,t=this.getNextModel(e.keyCode);this.onSelect(t)}},{key:"onType",value:function(e){if(1===e.key.toString().length){var t=this.getModelMatch(e);t&&this.onSelect(t),this.runTimer()}}},{key:"onSelect",value:function(e){this.isDisabled(e)||(l.yV.setSelected(e.get("id"),this.collection),this.setModel(),this.getUI("dropdownToggle").text(this.getButtonText()),o.Radio.channel(this.options.channelName).trigger("select:option:selected",e))}},{key:"setModel",value:function(){this.model=l.yV.getSelected(this.collection)}},{key:"getNextModel",value:function(e){var t,n=l.yV.getSelected(this.collection)||this.collection.first(),o=this.collection.indexOf(n);return(t=38===e?this.collection.at(o-this.optionStep):this.collection.at(o+this.optionStep))||(l.yV.deselectAll(this.collection),t=this.collection.first(),this.optionStep=0),t}},{key:"getModelMatch",value:function(e){var t,n=this;return 1===this.selectSearch.length&&this.selectSearch===e.key?t=this.handleSameCharIndex(e.key):(this.selectSearch+=e.key,this.sameCharIndex=1),t||(t=i.find(this.collection.models,(function(e){return e.get(n.options.displayProperty).toLowerCase().slice(0,n.selectSearch.length).includes(n.selectSearch.toLowerCase())}))),t}},{key:"handleSameCharIndex",value:function(e){var t=this,n=i.filter(this.collection.models,(function(n){return n.get(t.options.displayProperty).toLowerCase().slice(0,1)===e}));if(n.length>1){var o=n[this.sameCharIndex];return o||(o=i.first(n),this.sameCharIndex=0),this.sameCharIndex++,o}return i.first(n)}},{key:"runTimer",value:function(){var e=this;this.scopedTimerIndex&&clearTimeout(this.scopedTimerIndex),this.scopedTimerIndex=window.setTimeout((function(){e.selectSearch=""}),500)}},{key:"isDisabled",value:function(e){var t;if(e.get("divider"))return!0;if(!i.isFunction(this.options.childOptions.isDisabled))return!1;for(var n=arguments.length,o=new Array(n>1?n-1:0),r=1;r<n;r++)o[r-1]=arguments[r];return(t=this.options.childOptions.isDisabled).call.apply(t,[this,e].concat(o))}},{key:"getButtonText",value:function(){if(this.options.disabled)return this.options.noOptionsText;var e=l.yV.getSelected(this.collection);return e&&e.get(this.options.displayProperty)||this.options.placeholderText}},{key:"viewOptions",value:function(){return{styles:u,inputName:this.options.inputName,disabled:this.options.disabled,placeholderText:this.getButtonText()}}},{key:"onRender",value:function(){this.showChildView("dropdown",new a.w({collection:this.collection,channelName:this.options.channelName,childOptions:i.extend(this.options.childOptions),displayOptions:{extraClasses:"w-100 ".concat(u.dropdownMenu)},analyticsHelper:this.options.analyticsHelper}))}}],r&&p(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),t}(r.Q.wA)},20072:function(e,t,n){"use strict";n.d(t,{Y:function(){return g}});var o=n(48088),i=n(57857),r=n(31647),a=n(50299),l=n(93569),s=n(68979),c=n.n(s),u={selectBtn:"tZUtI",list:"MxlSt",selector:"qHvbU",customItem:"aJzJB"};function d(e){return d="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},d(e)}function p(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,f(o.key),o)}}function f(e){var t=function(e,t){if("object"!=d(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!=d(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==d(t)?t:String(t)}function h(e,t,n){return t=v(t),function(e,t){if(t&&("object"===d(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||[],v(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 v(e){return v=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},v(e)}function m(e,t){return m=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},m(e,t)}var g=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),h(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.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=f(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(),o.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 o=l.PU.getSelected(this.options.folderTreeKey,this.collection),r=o?o.get("name"):i.T.getPhrase(this.lang,"button");this.getUI("button").text(r)}}},{key:"renderSelector",value:function(){this.showChildView("selector",new a.J({styles:u,collection:this.collection,channelName:this.options.channelName,childrenProperty:"children",folderTreeId:this.options.folderTreeKey,extraClass:u.list,extraClasses:u.list,isSelector:!0,disabledIds:this.disabledIds||{}}))}},{key:"viewOptions",value:function(){return{styles:u,name:this.options.name||this.options.channelName,buttonText:this.buttonText,canCreateNew:this.options.canCreateNew}}},{key:"onRender",value:function(){this.setButtonText(),this.renderSelector()}}])&&p(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),t}(r.Q.wA)},21893: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,i){return'<div class="dropdown-menu-region"></div>'},useData:!0})},42494: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,i){return e.propertyIsEnumerable,'<div class="finish-button-region"></div>\n<button class="btn btn-outline-dark float-end add-more-videos">'+e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"addMore",{name:"lang",hash:{},data:i}))+"</button>"},useData:!0})},76370:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({1:function(e,t,n,o,i){var r;return e.propertyIsEnumerable,'<span class="'+e.escapeExpression(e.lambda(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.requiredStar:r,t))+'">*</span>'},3:function(e,t,n,o,i){return' <div class="library-select-region form-group col-6"></div>\n'},5:function(e,t,n,o,i){return"col-6"},7:function(e,t,n,o,i){return"col-12"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){e.propertyIsEnumerable;var r,a=null!=t?t:e.nullContext||{};return"<h5>"+e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(a,"uploadDestination",{name:"lang",hash:{},data:i}))+(null!=(r=n.if.call(a,null!=(r=null!=(r=null!=t?t.options:t)?r.requiredFields:r)?r.uploadDestination:r,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?r:"")+'</h5>\n <div class="container-fluid px-0">\n <div class="row">\n'+(null!=(r=n.if.call(a,null!=(r=null!=t?t.options:t)?r.hasMultipleLibraries:r,{name:"if",hash:{},fn:e.program(3,i,0),inverse:e.noop,data:i}))?r:"")+' <div class="folder-select-region form-group '+(null!=(r=n.if.call(a,null!=(r=null!=t?t.options:t)?r.hasMultipleLibraries:r,{name:"if",hash:{},fn:e.program(5,i,0),inverse:e.program(7,i,0),data:i}))?r:"")+'"></div>\n </div>\n </div>\n</div>'},useData:!0})},11453: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,i){e.propertyIsEnumerable;var r,a=null!=t?t:e.nullContext||{},l=e.hooks.helperMissing,s="function",c=e.escapeExpression;return'<div class="progress-bar bg-info" style="width: '+c(typeof(r=null!=(r=n.progress||(null!=t?t.progress:t))?r:l)===s?r.call(a,{name:"progress",hash:{},data:i}):r)+'%" aria-valuenow="'+c(typeof(r=null!=(r=n.progress||(null!=t?t.progress:t))?r:l)===s?r.call(a,{name:"progress",hash:{},data:i}):r)+'" aria-valuemin="0" aria-valuemax="100"></div>'},useData:!0})},42633:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({1:function(e,t,n,o,i){return" on"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){e.propertyIsEnumerable;var r,a=null!=t?t:e.nullContext||{},l=e.hooks.helperMissing,s=e.escapeExpression;return"<h5>"+s((n.lang||t&&t.lang||l).call(a,"heading",{name:"lang",hash:{},data:i}))+'</h5>\n<div class="container-fluid">\n <div class="row">\n <div class="form-group col-6 p-0">\n <div class="d-block">\n <label>'+s((n.lang||t&&t.lang||l).call(a,"autoCaptioningHeading",{name:"lang",hash:{},data:i}))+'</label>\n <div class="custom-toggle toggle-option float-end'+(null!=(r=n.if.call(a,null!=(r=null!=t?t.options:t)?r.isSelected:r,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?r:"")+'"><span class="handle"></span></div>\n </div>\n <p class=\'mb-0 me-5\'>'+s((n.lang||t&&t.lang||l).call(a,"autoCaptioningInfo",{name:"lang",hash:{},data:i}))+"</p>\n </div>\n </div>\n</div>\n \n"},useData:!0})},61778: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,i){var r;return e.propertyIsEnumerable,e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"uploading",{name:"lang",hash:{percentage:null!=(r=null!=t?t.options:t)?r.percentage:r},data:i}))},useData:!0})},47381: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,i){var r;return e.propertyIsEnumerable,e.escapeExpression(e.lambda(null!=(r=null!=t?t.options:t)?r.name:r,t))},useData:!0})},63105:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({1:function(e,t,n,o,i){var r;return e.propertyIsEnumerable,'<div class="p-2 text-center border-top">\n <button class="add-advanced-metadata btn btn-link">'+(null!=(r=n.if.call(null!=t?t:e.nullContext||{},null!=(r=null!=t?t.options:t)?r.showAdvanced:r,{name:"if",hash:{},fn:e.program(2,i,0),inverse:e.program(4,i,0),data:i}))?r:"")+"</a>\n</div>\n"},2:function(e,t,n,o,i){return e.propertyIsEnumerable,e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"hideMetadata",{name:"lang",hash:{},data:i}))},4:function(e,t,n,o,i){return e.propertyIsEnumerable,e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"addMetadata",{name:"lang",hash:{},data:i}))},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){e.propertyIsEnumerable;var r,a,l=e.escapeExpression,s=null!=t?t:e.nullContext||{},c=e.hooks.helperMissing;return'<div class="upload-title-region"></div>\n<div class="container-fluid">\n <div class="row">\n <div class="col-4 p-3">\n <div class="thumbnail-region"></div>\n <div class="upload-progress-region"></div>\n <div class="my-3">\n <h5 class="'+l(e.lambda(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.title:r,t))+'">'+l("function"==typeof(a=null!=(a=n.name||(null!=t?t.name:t))?a:c)?a.call(s,{name:"name",hash:{},data:i}):a)+'</h5>\n <div class="text-progress-region"></div>\n <button class="btn btn-outline-dark cancel-upload">'+l((n.lang||t&&t.lang||c).call(s,"cancel",{name:"lang",hash:{},data:i}))+'</button>\n </div>\n\n </div>\n <div class="col-8 py-3 pe-3">\n <div class="video-details-region"></div>\n <div class="folder-select-region"></div>\n <div class="additional-info-region"></div>\n <div class="production-info-region"></div>\n <div class="video-options-region"></div>\n </div>\n </div>\n</div>\n'+(null!=(r=n.if.call(s,null!=(r=null!=t?t.options:t)?r.showExpand:r,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?r:"")},useData:!0})},35250: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,i){return'<div class="top-actions-region"></div>\n<div class="videos-region"></div>\n<div class="bottom-actions-region"></div>'},useData:!0})},46635:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({1:function(e,t,n,o,i){var r;return e.propertyIsEnumerable,e.escapeExpression(e.lambda(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.disabled:r,t))},3:function(e,t,n,o,i){return" disabled"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){e.propertyIsEnumerable;var r,a=e.lambda,l=e.escapeExpression,s=null!=t?t:e.nullContext||{};return'<button \n class="dropdown-toggle form-control text-start position-relative '+l(a(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.selectButton:r,t))+" "+(null!=(r=n.if.call(s,null!=(r=null!=t?t.options:t)?r.disabled:r,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?r:"")+'" \n type="button" \n id="dropdownMenuButton" \n data-bs-toggle="dropdown" \n aria-haspopup="true" \n aria-expanded="false"\n '+(null!=(r=n.if.call(s,null!=(r=null!=t?t.options:t)?r.disabled:r,{name:"if",hash:{},fn:e.program(3,i,0),inverse:e.noop,data:i}))?r:"")+' \n name="'+l(a(null!=(r=null!=t?t.options:t)?r.inputName:r,t))+'"\n >\n '+l(a(null!=(r=null!=t?t.options:t)?r.placeholderText:r,t))+'\n</button>\n<div class="dropdown-region"></div>\n<div class="form-feedback"></div>'},useData:!0})},68979:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({1:function(e,t,n,o,i){e.propertyIsEnumerable;var r,a=e.escapeExpression;return' <button class="create-new btn fw-bold rounded-0 w-100 text-start '+a(e.lambda(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.customItem:r,t))+'">'+a((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"createNew",{name:"lang",hash:{},data:i}))+"</button>\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){e.propertyIsEnumerable;var r,a=e.lambda,l=e.escapeExpression;return'<button\n class="'+l(a(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.selectBtn:r,t))+' form-select form-control"\n data-bs-toggle="dropdown"\n aria-haspopup="true"\n aria-expanded="false"\n name='+l(a(null!=(r=null!=t?t.options:t)?r.name:r,t))+'\n>\n <span class="d-block text-truncate button-text">\n '+l(a(null!=(r=null!=t?t.options:t)?r.buttonText:r,t))+'\n </span>\n</button>\n<div class="dropdown-menu '+l(a(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.selector:r,t))+'">\n <div class="selector-region"></div>\n'+(null!=(r=n.if.call(null!=t?t:e.nullContext||{},null!=(r=null!=t?t.options:t)?r.canCreateNew:r,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?r:"")+'</div>\n<div class="form-feedback"></div>'},useData:!0})}}]);