@clickview/library-editor 1.7.1-rc.2 → 1.8.1-dev.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundles.json +2 -2
- package/dist/css/101-library-editor-808f785991.chunk.css +4 -0
- package/dist/css/{3803-library-editor-c08c7cc096.chunk.css → 1132-library-editor-c1a116496b.chunk.css} +1 -1
- package/dist/css/{8343-library-editor-10baca49f5.chunk.css → 1521-library-editor-b3d6d791c2.chunk.css} +4 -0
- package/dist/css/{8420-library-editor-3bb4952bab.chunk.css → 1887-library-editor-2e57df189d.chunk.css} +4 -8
- package/dist/css/{6625-library-editor-89b6e935f3.chunk.css → 1911-library-editor-f7158ba599.chunk.css} +4 -0
- package/dist/css/2011-library-editor-9b9cd091d0.chunk.css +62 -0
- package/dist/css/2119-library-editor-1d6a95fb9f.chunk.css +4 -0
- package/dist/css/{409-library-editor-38562d76cd.chunk.css → 2284-library-editor-436a0d1ce1.chunk.css} +1 -1
- package/dist/css/3969-library-editor-3382f0875b.chunk.css +4 -0
- package/dist/css/3987-library-editor-2271e5262a.chunk.css +56 -0
- package/dist/css/{5248-library-editor-c06823703f.chunk.css → 4177-library-editor-4cba18186c.chunk.css} +4 -8
- package/dist/css/5891-library-editor-76fe7e394b.chunk.css +2 -0
- package/dist/css/{5047-library-editor-3ed99ac07f.chunk.css → 6181-library-editor-db9baf23c2.chunk.css} +4 -0
- package/dist/css/6220-library-editor-e66d80c18a.chunk.css +34 -0
- package/dist/css/6963-library-editor-76fe7e394b.chunk.css +2 -0
- package/dist/css/{5356-library-editor-075fbedf48.chunk.css → 6999-library-editor-c9c844221a.chunk.css} +12 -0
- package/dist/css/{3427-library-editor-8442ad6453.chunk.css → 7295-library-editor-b0c43d2c79.chunk.css} +1 -1
- package/dist/css/{1819-library-editor-69e8f4675f.chunk.css → 8179-library-editor-df33c921f0.chunk.css} +3 -5
- package/dist/css/{9195-library-editor-14f7d9be38.chunk.css → 8929-library-editor-2cba3474fe.chunk.css} +1 -1
- package/dist/css/{library-editor-app-4e790b757d.css → library-editor-app-1cd9634b7b.css} +10 -10
- package/dist/en.json +1 -1
- package/dist/scripts/101-98e020bd6f.chunk.js +1 -0
- package/dist/scripts/{1010-f5821049de.chunk.js → 1010-cd4e715098.chunk.js} +1 -1
- package/dist/scripts/{1086-ba954c2a70.chunk.js → 1086-b559030dcf.chunk.js} +1 -1
- package/dist/scripts/1132-3f29e51c9d.chunk.js +1 -0
- package/dist/scripts/1203-b828105755.chunk.js +1 -0
- package/dist/scripts/1409-8f5c1c9d0e.chunk.js +1 -0
- package/dist/scripts/{8343-774860a655.chunk.js → 1521-0c23d44c5e.chunk.js} +1 -1
- package/dist/scripts/1832-d4427bb6f5.chunk.js +1 -0
- package/dist/scripts/{5356-4583545486.chunk.js → 1887-d306fab87c.chunk.js} +1 -1
- package/dist/scripts/{6625-a31763e7ef.chunk.js → 1911-41bf677d7e.chunk.js} +1 -1
- package/dist/scripts/2011-f178a6dabf.chunk.js +1 -0
- package/dist/scripts/{2098-30b7db58a5.chunk.js → 2098-31d99bc407.chunk.js} +1 -1
- package/dist/scripts/2119-cbaa6000b1.chunk.js +1 -0
- package/dist/scripts/2284-a57db3563f.chunk.js +1 -0
- package/dist/scripts/2417-48687b3eeb.chunk.js +1 -0
- package/dist/scripts/243-c9fdd938fd.chunk.js +1 -0
- package/dist/scripts/259-e1d9ce07f4.chunk.js +1 -0
- package/dist/scripts/{2692-15c761ec3d.chunk.js → 2692-9ebe6d1ea4.chunk.js} +1 -1
- package/dist/scripts/{2733-6b607b5143.chunk.js → 2733-e8cc6e3610.chunk.js} +1 -1
- package/dist/scripts/2803-86fc1b1e3f.chunk.js +1 -0
- package/dist/scripts/{2888-7396d60be2.chunk.js → 2888-80050720b2.chunk.js} +1 -1
- package/dist/scripts/{299-921c177109.chunk.js → 299-d19e77b508.chunk.js} +1 -1
- package/dist/scripts/3096-ca9e2f0dfd.chunk.js +1 -0
- package/dist/scripts/{3639-8e4d2c9b84.chunk.js → 3639-36a34d483b.chunk.js} +1 -1
- package/dist/scripts/3746-46e0073a46.chunk.js +1 -0
- package/dist/scripts/{3763-0095e75c1a.chunk.js → 3763-3bef6ac728.chunk.js} +1 -1
- package/dist/scripts/3969-258fca82a8.chunk.js +1 -0
- package/dist/scripts/3987-e3a4ade0c9.chunk.js +1 -0
- package/dist/scripts/4177-0be8ceed3c.chunk.js +1 -0
- package/dist/scripts/{4201-973ee89615.chunk.js → 4201-25e82e2429.chunk.js} +1 -1
- package/dist/scripts/{435-fbb6b4b01e.chunk.js → 435-fb19753c8d.chunk.js} +1 -1
- package/dist/scripts/{4353-1d4ec918e6.chunk.js → 4353-c7a0df4214.chunk.js} +1 -1
- package/dist/scripts/{4591-3fa9999f29.chunk.js → 4591-9a2868f8a0.chunk.js} +1 -1
- package/dist/scripts/{4860-56e7955cd4.chunk.js → 4860-b3e5cb9cbd.chunk.js} +1 -1
- package/dist/scripts/{4885-3a35265eab.chunk.js → 4885-9e4ce006c8.chunk.js} +1 -1
- package/dist/scripts/{514-923fb794ae.chunk.js → 514-59d9a9a7bd.chunk.js} +1 -1
- package/dist/scripts/5173-e1b904c06c.chunk.js +1 -0
- package/dist/scripts/5235-abc8ea83ed.chunk.js +1 -0
- package/dist/scripts/5263-38198ed595.chunk.js +1 -0
- package/dist/scripts/{5412-51a270fe11.chunk.js → 5412-a1721cffc4.chunk.js} +1 -1
- package/dist/scripts/{5418-bc46c939fc.chunk.js → 5418-bfa546cf33.chunk.js} +1 -1
- package/dist/scripts/{546-6736b53bcd.chunk.js → 546-81473f1035.chunk.js} +1 -1
- package/dist/scripts/5664-d6cbc77d63.chunk.js +1 -0
- package/dist/scripts/{5747-913fcc6f9c.chunk.js → 5747-8a168b816b.chunk.js} +1 -1
- package/dist/scripts/5891-63973f5678.chunk.js +1 -0
- package/dist/scripts/6093-a62d8ebc86.chunk.js +1 -0
- package/dist/scripts/6181-fa5e7bcbf9.chunk.js +1 -0
- package/dist/scripts/{5248-c1cfd861cc.chunk.js → 6220-984f02c732.chunk.js} +1 -1
- package/dist/scripts/{6420-6bae432c6b.chunk.js → 6420-1537f8f587.chunk.js} +1 -1
- package/dist/scripts/{6774-580a63bbeb.chunk.js → 6774-185468f6f5.chunk.js} +1 -1
- package/dist/scripts/{6788-4bd780e50b.chunk.js → 6788-2368a122f1.chunk.js} +1 -1
- package/dist/scripts/6963-a576fd9c4d.chunk.js +1 -0
- package/dist/scripts/6999-1fe379ca99.chunk.js +1 -0
- package/dist/scripts/7002-9b2aad8369.chunk.js +1 -0
- package/dist/scripts/7053-643499a3a6.chunk.js +1 -0
- package/dist/scripts/708-9e2ef23c87.chunk.js +1 -0
- package/dist/scripts/7295-96fcbaa176.chunk.js +1 -0
- package/dist/scripts/7376-21f5de2ce6.chunk.js +1 -0
- package/dist/scripts/{8074-e02348d9c5.chunk.js → 8074-b610b1ba63.chunk.js} +1 -1
- package/dist/scripts/8179-f5cc87ded7.chunk.js +2 -0
- package/dist/scripts/{8362-ea6c7521b8.chunk.js → 8362-195c5ba6c3.chunk.js} +1 -1
- package/dist/scripts/8495-0a9a71f2dc.chunk.js +1 -0
- package/dist/scripts/8727-20ae545e12.chunk.js +1 -0
- package/dist/scripts/{8762-264adb9817.chunk.js → 8762-b445a592a5.chunk.js} +1 -1
- package/dist/scripts/{8906-a5aa3d1286.chunk.js → 8906-efcc846fad.chunk.js} +1 -1
- package/dist/scripts/8929-6fac19a7a3.chunk.js +1 -0
- package/dist/scripts/{8947-563b287016.chunk.js → 8947-4df5e81810.chunk.js} +1 -1
- package/dist/scripts/{9167-0e451c25a3.chunk.js → 9167-9c54b36e3a.chunk.js} +1 -1
- package/dist/scripts/{9298-33d2ab886e.chunk.js → 9298-d8c9ed5471.chunk.js} +1 -1
- package/dist/scripts/{9357-22395b794f.chunk.js → 9357-2e288289f3.chunk.js} +1 -1
- package/dist/scripts/9383-6d0392b17f.chunk.js +1 -0
- package/dist/scripts/{9695-72bc239f92.chunk.js → 9695-4bb132be57.chunk.js} +1 -1
- package/dist/scripts/9770-9eaef2c966.chunk.js +1 -0
- package/dist/scripts/9927-25579dff18.chunk.js +1 -0
- package/dist/scripts/995-3a6de1eec1.chunk.js +1 -0
- package/dist/scripts/bundle-2b73fa6c21.min.js +2 -0
- package/package.json +1 -1
- package/dist/css/4810-library-editor-740619bb9d.chunk.css +0 -24
- package/dist/scripts/1203-c5dbf7e172.chunk.js +0 -1
- package/dist/scripts/1409-333eff67cc.chunk.js +0 -1
- package/dist/scripts/1819-5e97050377.chunk.js +0 -2
- package/dist/scripts/1832-9528386bfe.chunk.js +0 -1
- package/dist/scripts/2417-ce05495ed5.chunk.js +0 -1
- package/dist/scripts/243-224b5eea73.chunk.js +0 -1
- package/dist/scripts/259-fb7e645a88.chunk.js +0 -1
- package/dist/scripts/2803-f91683764c.chunk.js +0 -1
- package/dist/scripts/3096-f61a91545d.chunk.js +0 -1
- package/dist/scripts/3427-1bd7b5956b.chunk.js +0 -1
- package/dist/scripts/3746-7fca58c2db.chunk.js +0 -1
- package/dist/scripts/3803-d2a02a86eb.chunk.js +0 -1
- package/dist/scripts/409-fbe70b4df9.chunk.js +0 -1
- package/dist/scripts/4703-1cefcae29b.chunk.js +0 -1
- package/dist/scripts/4810-908fe3f045.chunk.js +0 -1
- package/dist/scripts/5047-c22a3ab8f7.chunk.js +0 -1
- package/dist/scripts/5431-50ab5a6a35.chunk.js +0 -1
- package/dist/scripts/5665-38506a938a.chunk.js +0 -1
- package/dist/scripts/5967-5d8ab696d0.chunk.js +0 -1
- package/dist/scripts/6093-67352f9ba1.chunk.js +0 -1
- package/dist/scripts/7002-596b9b3c71.chunk.js +0 -1
- package/dist/scripts/7053-312e4779fe.chunk.js +0 -1
- package/dist/scripts/8420-77604e5dd5.chunk.js +0 -1
- package/dist/scripts/8727-4be0c05629.chunk.js +0 -1
- package/dist/scripts/9195-db9407692d.chunk.js +0 -1
- package/dist/scripts/9355-633de33fc9.chunk.js +0 -1
- package/dist/scripts/9383-afe019b90c.chunk.js +0 -1
- package/dist/scripts/9927-6933b86ad4.chunk.js +0 -1
- package/dist/scripts/bundle-52a4040147.min.js +0 -2
- /package/dist/css/{5967-library-editor-7417a89428.chunk.css → 708-library-editor-7417a89428.chunk.css} +0 -0
- /package/dist/scripts/{400-228bfe98a2.chunk.js → 400-00070f1714.chunk.js} +0 -0
- /package/dist/scripts/{4245-30ea8edd8c.chunk.js → 4245-4d98c3f676.chunk.js} +0 -0
- /package/dist/scripts/{693-780241d5a9.chunk.js → 693-0ae38e2ba5.chunk.js} +0 -0
- /package/dist/scripts/{7173-28ec11155c.chunk.js → 7173-a4f745b0ed.chunk.js} +0 -0
- /package/dist/scripts/{7190-8c67f0b2c5.chunk.js → 7190-d294d5b67c.chunk.js} +0 -0
- /package/dist/scripts/{1819-5e97050377.chunk.js.LICENSE.txt → 8179-f5cc87ded7.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{bundle-52a4040147.min.js.LICENSE.txt → bundle-2b73fa6c21.min.js.LICENSE.txt} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[101],{54096:function(e,t,n){"use strict";n.d(t,{G:function(){return o}});var r=n(1024),a=n(21679);function o(e){var t,n;return t=e,n=a.u.getInstance(t),r.useEffect((function(){return function(){a.u.releaseInstance(t)}})),n}},63038:function(e,t,n){"use strict";n.d(t,{n:function(){return y},W:function(){return v}});var r=n(1024),a=n(92802),o=n(99910),i=n(85887),l=n(53808),c=function(e,t,n,r,o){var i="form-control";return"sm"===r&&(i+=" form-control-sm"),"lg"===r&&(i+=" form-control-lg"),(0,a.u9)(t,n)&&(0,a.u9)(e,n)&&(i+=" is-invalid"),o&&(i+=" ".concat(o)),i};function u(e){var t=e.label,n=e.checkboxLabelClassName,a=e.checkboxLabelFontWeight,i=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]])}return n}(e,["label","checkboxLabelClassName","checkboxLabelFontWeight"]);return r.createElement(o.Form.Group,null,r.createElement("div",{className:"custom-control custom-checkbox"},r.createElement(y,Object.assign({className:"custom-control-input"},i)),r.createElement(o.Form.Label,{className:"custom-control-label cursor-pointer ".concat("normal"===a?"font-weight-normal":""," \n ").concat(n),htmlFor:i.id},t)))}var s=n(39396),f=n(6681),d=n(66703);function m(e){var t=(0,a.u6)().values[e.fieldName];return"string"!=typeof t?r.createElement(r.Fragment,null):r.createElement("div",{className:"float-right text-muted"},t.length,"/",e.limit)}function p(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 b=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]])}return n};function y(e){var t,n,o=e.children,c=b(e,["children"]),u=(t=r.useState(e.type),n=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,o=[],i=!0,l=!1;try{for(n=n.call(e);!(i=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);i=!0);}catch(e){l=!0,a=e}finally{try{i||null==n.return||n.return()}finally{if(l)throw a}}return o}}(t,n)||function(e,t){if(e){if("string"==typeof e)return p(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)?p(e,t):void 0}}(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),d=u[0],m=u[1],y=l.q.isFunction(o)?function(e){return o(e)}:r.Children.count(o)?o:null;if("password"!==c.type)return r.createElement(a.gN,Object.assign({},i.t.omit(c,["formSize"])),y);var v="position-relative ".concat("d78lK");return c.className&&(v+=" ".concat(c.className)),c.disabled&&(v+=" ".concat("asbVo")),r.createElement("div",{className:v},r.createElement(a.gN,Object.assign({},i.t.omit(c,["formSize","type","className"]),{type:d,className:"".concat("RBJnf"," border-0 w-100 h-100 outline-none rounded")}),y),"password"===c.type&&r.createElement(s.x,{svgName:"password"===d?f.vn.VisibleOn:f.vn.VisibleOff,className:"svg-container cursor-pointer ".concat("jCfI0"),onClick:function(){m("password"===d?"text":"password")}}))}function v(e){var t=e.label,n=e.className,l=e.showCharacterCounter,p=e.showRequiredStar,v=e.infoTooltip,h=e.infoText,g=e.formSize,S=e.showOptionalLabel,O=b(e,["label","className","showCharacterCounter","showRequiredStar","infoTooltip","infoText","formSize","showOptionalLabel"]),w=(0,a.u6)(),E=w.errors,x=w.touched,j=function(){};if("checkbox"===O.type){var C=i.t.omit(e,["formSize"]);return e.disabled&&(C.onChange=j),r.createElement(u,Object.assign({},C))}var I=Object.assign(Object.assign({},O),{className:c(E,x,O.name,g,n)});return e.disabled&&(I.onChange=j),r.createElement(o.Form.Group,null,!!t&&r.createElement(o.Form.Label,{htmlFor:O.id,className:"d-flex align-items-center"},t,p&&r.createElement("span",{className:"text-danger"},"*"),v&&r.createElement(s.x,{svgName:f.vn.Info,title:v,tooltipPlacement:"top",tooltipSpanHack:!0}),S&&r.createElement("span",{className:"text-muted"}," ",r.createElement(d.x,{namespace:"shared.formField",phrase:"optional"}))),r.createElement(y,Object.assign({},I)),!!l&&!!O.maxLength&&r.createElement(m,{fieldName:O.name,limit:O.maxLength}),!!h&&r.createElement(o.Form.Text,{className:"text-muted"},h),r.createElement(a.Bc,{name:O.name},(function(e){return r.createElement(o.Form.Control.Feedback,{type:"invalid"},e)})))}y.defaultProps={autoComplete:"off"},v.defaultProps={autoComplete:"off"}},86347:function(e,t,n){"use strict";n.d(t,{b:function(){return u},n:function(){return c}});var r=n(1024),a=n(92802),o=n(53808),i=n(85887);function l(e){var t=i.t.deepClone(e);return Object.keys(t).forEach((function(e){t.hasOwnProperty(e)&&(i.t.isObject(t[e])?t[e]=l(t[e]):null===t[e]&&delete t[e])})),t}function c(e){var t=e.castInitialValues,n=e.castValuesOnSubmit,i=e.initialValues,c=e.onSubmit,u=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]])}return n}(e,["castInitialValues","castValuesOnSubmit","initialValues","onSubmit"]),s=t&&e.validationSchema?e.validationSchema.cast(l(i)):i,f={allowInitialSubmit:e.allowInitialSubmit};return r.createElement(a.J9,Object.assign({enableReinitialize:!0},u,{initialValues:s,onSubmit:function(t,r){var a=r.setSubmitting,o=r.resetForm,i=n&&e.validationSchema?e.validationSchema.cast(t):t;c(i,(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.reset&&o(),a(!1)}))},initialStatus:f}),o.q.isFunction(e.children)?function(t){return e.children(t)}:r.Children.count(e.children)?e.children:null)}function u(){return(0,a.u6)()}c.defaultProps={castInitialValues:!0,castValuesOnSubmit:!0}},90335:function(e,t,n){"use strict";var r;n.d(t,{D:function(){return r}}),function(e){e.Newest="newest",e.Oldest="oldest",e.RecentlyAdded="recently_added",e.AtoZ="atoz",e.ZtoA="ztoa",e.Series="series"}(r||(r={}))},2491:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(54096),a=n(21186),o=n(92159);function i(){var e=(0,r.G)(o.P.ALERT);return{success:function(t){e.success(t)()},error:function(t){e.error(t)()},warning:function(t){e.createAlert({type:a.NK.Warning,heading:a.R6.Warning,message:t})}}}},65657:function(e,t,n){"use strict";n.d(t,{i:function(){return c}});var r=n(1024),a=n(58566),o=n(86120),i=n(53808);function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function c(e,t){var n=e,c=t,u=function(e,t,n){function c(e){if(e)return i.q.isFunction(t)?t(e):e.data}function u(e){var t,n;if(e)return null===(n=null===(t=e.pagination)||void 0===t?void 0:t.cursors)||void 0===n?void 0:n.next}return(0,a.useSelector)((0,r.useMemo)((function(){return function(t){if(i.q.isFunction(e)){for(var n=e,r=i.q.isFunction(e)&&n(),a=r&&o.a.getResponse(t,r),s=a&&a.isFetching,f=a&&a.statusCode,d=a&&a.hasCompleted,m=a&&a.shouldFetch,p=c(a&&a.data),b=u(a&&a.data),y=function(e){var t;if(e)return null===(t=e)||void 0===t?void 0:t.count}(a&&a.data);b&&(s=(a=o.a.getResponse(t,n(b))).isFetching,f=a.statusCode,d=a.hasCompleted,!a.shouldFetch);){var v=c(a.data);v&&p.push.apply(p,function(e){if(Array.isArray(e))return l(e)}(S=v)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(S)||function(e,t){if(e){if("string"==typeof e)return l(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?l(e,t):void 0}}(S)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}());var h=u(a.data);b=h===b?null:h}var g={shouldInitialFetch:m,items:p,nextCursor:b,isFetching:s,statusCode:f,hasCompleted:d};return"number"==typeof y&&(g.totalItems=y),g}var S}}),[e]))}(e&&function(e){return n(e).key});return(0,r.useEffect)((function(){u&&u.shouldInitialFetch&&t&&c()}),[null==u?void 0:u.shouldInitialFetch,t]),(0,r.useEffect)((function(){u&&u.nextCursor&&!u.isFetching&&t&&c(u.nextCursor)}),[null==u?void 0:u.nextCursor,null==u?void 0:u.isFetching,t]),u}n(35656).o.Ok},50072:function(e,t,n){"use strict";var r;n.d(t,{l:function(){return r}}),function(e){e.Pending="Pending",e.Approved="Approved",e.Rejected="Rejected",e.Closed="Closed"}(r||(r={}))},85739:function(e,t,n){"use strict";n.d(t,{p:function(){return i}});var r=n(25796),a=n(86120),o=n(65657);function i(e,t){var n=a.a.useGetFetch(),i=function(n){return r.y.libraryRequests(e,t,n)};return(0,o.i)(i,(function(e){return n(i(e))}))}},41228:function(e,t,n){"use strict";n.r(t),n.d(t,{RejectLibraryRequestView:function(){return F}});var r=n(1024),a=n.n(r),o=n(5173),i=n(92802),l=n(57857),c=n(86120),u=n(31647),s=n(71575),f=n(2491),d=n(66703),m=n(63038),p=n(85610),b=n(25796),y=n(86347),v=n(50072),h=n(90335),g=n(50997),S=n(85739),O=n(70065),w=n(52076);function E(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var x="libraryRequests.reject",j=l.T.encloseNamespace(x),C=(0,o.Ry)().shape({message:(0,o.Z_)().required((function(){return j("required")})).max(500,(function(){return j("max")}))});function I(e){var t=(0,y.b)(),n="".concat(e.libraryRequest.sender.name," ").concat(e.libraryRequest.sender.surname);return a().createElement(i.l0,null,a().createElement("p",null,a().createElement(d.x,{namespace:x,phrase:"message",options:{videoName:e.libraryRequest.object.name}})),a().createElement(m.W,{label:j("label"),as:"textarea",name:"message",id:"message",value:t.values.message,placeholder:j("placeholder",{fullName:n})}),a().createElement(p.u,null,a().createElement(p.u.Cancel,{onClick:e.closePopup}),a().createElement(p.u.Submit,{text:j("reject"),variant:"danger",showSpinner:e.showSpinner})))}function F(e){var t,n,r=c.a.useGetFetch(),o=(0,f.Z)(),i=(t=a().useState(!1),n=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,o=[],i=!0,l=!1;try{for(n=n.call(e);!(i=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);i=!0);}catch(e){l=!0,a=e}finally{try{i||null==n.return||n.return()}finally{if(l)throw a}}return o}}(t,n)||function(e,t){if(e){if("string"==typeof e)return E(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?E(e,t):void 0}}(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),l=i[0],d=i[1],m=(0,S.p)(e.queryParams.sort||h.D.Newest,[v.l.Pending]),p=c.a.useBasicFetch(b.y.libraryRequest(e.libraryRequestId));function x(){var t,n,r,a,i,l;i={location:O.LocationContext.Popup,actionType:O.UserAction.Reject,entity:O.EntityType.StaffRequest,workflowPhase:O.WorkflowPhase.Complete},l={id:p.data.id,videoId:null===(t=p.data.object)||void 0===t?void 0:t.id,requestingUserId:null===(n=p.data.sender)||void 0===n?void 0:n.id,sourceLibraryId:null===(r=p.data.sourceLibrary)||void 0===r?void 0:r.id,sourceFolderId:null===(a=p.data.sourceCategory)||void 0===a?void 0:a.id},w.k.logUserAction(l,i),o.success(j("success"));var c=m.items.findIndex((function(t){return t.id.toString()===e.libraryRequestId.toString()})),s=m.items[c+1];u.Q.AppLinkHelper.trigger({application:g.OV.LIBRARY_REQUESTS,action:g.eX.LibraryRequests.PENDING_REQUESTS,args:[(null==s?void 0:s.id)||""],params:e.queryParams},{replace:!0})}var F=!!m.hasCompleted&&!!p.data;return a().createElement(s.G,{title:j("title"),closePopup:e.closePopup,showLoadingSpinner:!F},F&&a().createElement(y.n,{initialValues:{message:""},validationSchema:C,onSubmit:function(t){d(!0);var n={response:v.l.Rejected,message:t.message};r(b.y.fulfilRequest(e.libraryRequestId,n,x,(function(){return o.error("error")}),e.closePopup))}},a().createElement(I,{libraryRequest:p.data,closePopup:e.closePopup,showSpinner:l})))}},448:function(e){function t(){return e.exports=t=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},e.exports.__esModule=!0,e.exports.default=e.exports,t.apply(this,arguments)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[1010],{51010:function(e,t,n){"use strict";n.r(t),n.d(t,{DisableReviewView:function(){return k}});var r=n(21679),o=n(57857),i=n(31647),a=n(70065),u=n(52076),l=n(88172),c=n(10101),s=n(61843),f=n(9484),p=n(
|
|
1
|
+
(self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[1010],{51010:function(e,t,n){"use strict";n.r(t),n.d(t,{DisableReviewView:function(){return k}});var r=n(21679),o=n(57857),i=n(31647),a=n(70065),u=n(52076),l=n(88172),c=n(10101),s=n(61843),f=n(9484),p=n(28099),y=n(67670),h=n(17654),b=n.n(h);function v(e){return v="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},v(e)}function d(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function g(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function m(e,t){return m=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},m(e,t)}function w(e,t){if(t&&("object"===v(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function O(e){return O=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},O(e)}var k=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&m(e,t)}(R,e);var t,n,h,v,k=(h=R,v=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=O(h);if(v){var n=O(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return w(this,e)});function R(){return d(this,R),k.apply(this,arguments)}return t=R,(n=[{key:"initialize",value:function(){this.bindListeners(),this.settingsDataService=r.u.getInstance(p.Or.Settings,this),this.contentUpdatesDataService=r.u.getInstance(p.Or.ContentUpdates,this)}},{key:"name",get:function(){return"DisableReviewView"}},{key:"title",get:function(){return o.T.getPhrase(this.lang,"title")}},{key:"template",get:function(){return b()}},{key:"lang",get:function(){return"contentUpdates.disableReview"}},{key:"channelName",get:function(){return s.N0.generateUniqueChannelName(this)}},{key:"behaviors",get:function(){var e=this;return[{title:o.T.getPhrase(this.lang,"heading"),behaviorClass:c.Yw,spinnerButtonOptions:{model:this.spinnerModel=new y.v,channelName:this.channelName,buttonText:o.T.getPhrase(this.lang,"offBtn"),onClick:function(){return e.onClickDisable()}}}]}},{key:"bindListeners",value:function(){this.listenTo(p.Vk.VIDEO,"".concat(p.M_.VIDEOS_TO_REVIEW,":sync"),this.render)}},{key:"videosToReview",value:function(){return!!this.videoCollection&&!!this.videoCollection.length}},{key:"onClickDisable",value:function(){this.videosToReview()?this.approveAllThenDisableReview():this.disableReview(),this.triggerMethod("hide")}},{key:"approveAllThenDisableReview",value:function(){var e=this;this.contentUpdatesDataService.approveAllVideos((function(){return e.disableReview()}))}},{key:"disableReview",value:function(){var e=s.xN.getLibraryReviewOptions(!1);this.settingsDataService.updateSetting(this.currentUser.get("customerId"),e,o.T.getPhrase(this.lang,"disableSuccess"),this.redirectToPastReleases),this.logAction()}},{key:"redirectToPastReleases",value:function(){i.Q.AppLinkHelper.trigger({application:p.OV.CONTENT_UPDATES,action:p.eX.ContentUpdates.PAST_RELEASES})}},{key:"logAction",value:function(){var e={location:a.LocationContext.Popup,actionType:a.UserAction.Disable,entity:a.EntityType.CustomerSetting,descriptor:a.CustomerSettingDescriptor.LibraryReview,workflowPhase:a.WorkflowPhase.Complete},t={approvedCount:this.videoCollection.length};u.k.logUserAction(t,e)}},{key:"requiredResources",get:function(){return{currentUser:f.K.currentUser}}},{key:"onBeforeRender",value:function(){this.videoCollection=this.contentUpdatesDataService.getVideosToReview(),this.videoCollection&&this.spinnerModel.set(l.ZV.Disabled,!1)}},{key:"viewOptions",value:function(){return{videosToReview:this.videosToReview(),dataFetched:!!this.videoCollection,spinnerEl:s.Kp.getSpinner({size:s.Ey.Large,extraClasses:"mx-auto"})}}}])&&g(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),R}(i.Q.View)},67670:function(e,t,n){"use strict";n.d(t,{v:function(){return p}});var r=n(31647),o=n(88172);function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function c(e,t){return c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},c(e,t)}function s(e,t){if(t&&("object"===i(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function f(e){return f=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},f(e)}var p=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&c(e,t)}(y,e);var t,n,r,i,p=(r=y,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=f(r);if(i){var n=f(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return s(this,e)});function y(){return u(this,y),p.apply(this,arguments)}return t=y,(n=[{key:"defaults",value:function(){var e;return a(e={},o.ZV.Disabled,!0),a(e,o.ZV.Hidden,!1),e}}])&&l(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),y}(r.Q.Model)},17654:function(e,t,n){var r=n(32227);e.exports=(r.default||r).template({1:function(e,t,n,r,o){var i;return e.propertyIsEnumerable,(null!=(i=e.lambda(null!=(i=null!=t?t.options:t)?i.spinnerEl:i,t))?i:"")+"\r\n"},3:function(e,t,n,r,o){e.propertyIsEnumerable;var i,a=null!=t?t:e.nullContext||{},u=e.hooks.helperMissing,l=e.escapeExpression;return'<p class="m-0 pb-2">'+l((n.lang||t&&t.lang||u).call(a,"noReview",{name:"lang",hash:{},data:o}))+"</p>\r\n"+(null!=(i=n.if.call(a,null!=(i=null!=t?t.options:t)?i.videosToReview:i,{name:"if",hash:{},fn:e.program(4,o,0),inverse:e.noop,data:o}))?i:"")+'<p class="m-0">'+l((n.lang||t&&t.lang||u).call(a,"undoInstructions",{name:"lang",hash:{},data:o}))+"</p>\r\n"},4:function(e,t,n,r,o){return e.propertyIsEnumerable,'<p class="m-0 pb-2">'+e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"automaticApproval",{name:"lang",hash:{},data:o}))+"</p>\r\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var i;return e.propertyIsEnumerable,null!=(i=n.unless.call(null!=t?t:e.nullContext||{},null!=(i=null!=t?t.options:t)?i.dataFetched:i,{name:"unless",hash:{},fn:e.program(1,o,0),inverse:e.program(3,o,0),data:o}))?i:""},useData:!0})}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[1086],{36537:function(e,t,n){"use strict";n.r(t),n.d(t,{MoveFolderView:function(){return M}});var r=n(39479),i=n(48088),o=n(31647),l=n(99249),a=n(21679),s=n(52076),u=n(
|
|
1
|
+
(self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[1086],{36537:function(e,t,n){"use strict";n.r(t),n.d(t,{MoveFolderView:function(){return M}});var r=n(39479),i=n(48088),o=n(31647),l=n(99249),a=n(21679),s=n(52076),u=n(28099),c=n(10101),d=n(60103),f=n(67670),h=n(60602),p=n(61843),y=n(88172),v=n(57857),b=n(77739),g=n(88441),m=n.n(g);function w(e){return w="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},w(e)}function I(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 P(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function k(e,t){return k=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},k(e,t)}function O(e,t){if(t&&("object"===w(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function S(e){return S=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},S(e)}var M=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&k(e,t)}(R,e);var t,n,g,w,M=(g=R,w=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=S(g);if(w){var n=S(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return O(this,e)});function R(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,R),M.call(this,e)}return t=R,(n=[{key:"initialize",value:function(){this.bindListeners(),this.libraryDataService=a.u.getInstance(u.Or.Library,this)}},{key:"bindListeners",value:function(){this.listenTo(u.Vk.LIBRARY,"libraries:sync",this.render),this.listenTo(u.Vk.LIBRARY,"folder:".concat(this.options.folderId,":sync"),this.render)}},{key:"name",get:function(){return"MoveFolderView"}},{key:"title",get:function(){return v.T.getPhrase(this.lang,"title")}},{key:"lang",get:function(){return"libraryEditor.moveFolder"}},{key:"template",get:function(){return m()}},{key:"channelName",get:function(){return p.N0.generateUniqueChannelName(this)}},{key:"behaviors",get:function(){var e=this;return[{behaviorClass:c.Yw,title:v.T.getPhrase(this.lang,"heading"),spinnerButtonOptions:{model:this.spinnerModel=new f.v,channelName:this.channelName,buttonText:v.T.getPhrase(this.lang,"move"),onClick:function(t){return e.onSubmit(t)}}}]}},{key:"regions",value:function(){return{folderDetails:".folder-details-region"}}},{key:"events",value:function(){return{submit:"onSubmit"}}},{key:"onSubmit",value:function(e){e&&e.preventDefault(),this.viewModel.validate(),!1!==this.viewModel.isValid()&&(i.Radio.channel(this.channelName).trigger(y.I3.ShowSpinner),this.saveFolder(),this.logAction())}},{key:"logAction",value:function(){var e=this.getParentIds(),t=e.oldParentId,n=e.newParentId,r={id:this.options.folderId,isSubfolder:n.toString()!==this.library.get("id").toString(),oldParentId:t,newParentId:n};s.k.logUserAction(r,this.options.analyticsOptions)}},{key:"saveFolder",value:function(){var e=this,t=this.getParentIds(),n=t.oldParentId,r=t.newParentId;n!==r?this.libraryDataService.moveFolder(this.viewModel.get("id"),r,n,(function(){o.Q.AppLinkHelper.trigger({application:u.OV.LIBRARY_EDITOR,action:u.eX.LibraryEditor.FOLDER,args:[e.viewModel.get("id")]}),e.triggerMethod("hide")})):o.Q.AppLinkHelper.trigger({application:u.OV.LIBRARY_EDITOR,action:u.eX.LibraryEditor.FOLDER,args:[this.viewModel.get("id")]})}},{key:"getParentIds",value:function(){return{oldParentId:p.PU.getParent(this.options.folderId,this.collection).get("id"),newParentId:this.viewModel.get("parentId")}}},{key:"setUpCollection",value:function(e){this.collection||(this.library=p.PU.getLibrary(this.options.folderId,e),this.collection=new d.I([this.library]))}},{key:"setUpModel",value:function(e){this.model||(this.model=e,this.setUpViewModel())}},{key:"setUpViewModel",value:function(){if(!this.viewModel){var e="folder:details:".concat(this.options.folderId);this.viewModel=l.r.get(e,this.model.toJSON(),{ctor:h.g});var t=p.PU.getParent(this.options.folderId,this.collection);this.viewModel.set("parentId",t?t.get("id"):null),this.listenTo(this.viewModel,"change:parentId",this.onParentChange)}}},{key:"onParentChange",value:function(){var e=this.getParentIds(),t=e.oldParentId,n=e.newParentId;this.spinnerModel.set(y.ZV.Disabled,t===n)}},{key:"getDisabledParentFolderIds",value:function(){var e,t=[this.model.get("id").toString()];return this.viewModel.get("parentId")&&t.push(this.viewModel.get("parentId").toString()),this.model.children?[].concat(t,function(e){if(Array.isArray(e))return I(e)}(e=p.PU.flatten(this.model.children).map((function(e){return e.id.toString()})))||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 I(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)?I(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()):t}},{key:"renderFolderDetails",value:function(){if(this.model&&this.collection){var e=new b.r({model:this.viewModel,collection:this.collection,library:this.library,channelName:this.channelName,editName:!1,editParent:!0,disabledParentFolderIds:this.getDisabledParentFolderIds()});this.showChildView("folderDetails",e)}}},{key:"onBeforeRender",value:function(){this.libraryDataService.getLibraries(r.bind(this.setUpCollection,this)),this.libraryDataService.getFolderFromLibraries(this.options.folderId,r.bind(this.setUpModel,this))}},{key:"viewOptions",value:function(){return{dataFetched:!!this.model&&!!this.collection,spinnerEl:p.Kp.getSpinner({size:p.Ey.Large,extraClasses:"mx-auto"})}}},{key:"onRender",value:function(){this.renderFolderDetails()}}])&&P(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),R}(o.Q.View)},88441:function(e,t,n){var r=n(32227);e.exports=(r.default||r).template({1:function(e,t,n,r,i){var o;return e.propertyIsEnumerable,(null!=(o=e.lambda(null!=(o=null!=t?t.options:t)?o.spinnerEl:o,t))?o:"")+"\r\n"},3:function(e,t,n,r,i){return'<div class="folder-details-region"></div>\r\n'},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,i){var o;return e.propertyIsEnumerable,null!=(o=n.unless.call(null!=t?t:e.nullContext||{},null!=(o=null!=t?t.options:t)?o.dataFetched:o,{name:"unless",hash:{},fn:e.program(1,i,0),inverse:e.program(3,i,0),data:i}))?o:""},useData:!0})}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[1132],{21053:function(e,t,n){"use strict";n.d(t,{W:function(){return m}});var o=n(48088),i=n(31647),r={svgContainer:"mtegw"},a=n(43791),s=n.n(a),l=n(28099),c=n(35630),u=n(57085),d=n(57857);function h(e){return h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},h(e)}function f(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function p(e,t){return p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},p(e,t)}function v(e,t){if(t&&("object"===h(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function y(e){return y=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},y(e)}var m=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&p(e,t)}(m,e);var t,n,i,a,h=(i=m,a=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=y(i);if(a){var n=y(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return v(this,e)});function m(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,m),h.call(this,e)}return t=m,(n=[{key:"name",get:function(){return"EditVideoTabsComponent"}},{key:"className",get:function(){return"bg-white"}},{key:"regions",value:function(){return{tabs:{el:".tabs-region",replaceElement:!0},breadcrumbs:{el:".breadcrumbs-region",replaceElement:!0}}}},{key:"lang",get:function(){return"libraryEditor.editVideoTabs"}},{key:"template",get:function(){return s()}},{key:"viewOptions",value:function(){return{styles:r}}},{key:"onSave",value:function(){o.Radio.channel(l.OV.LIBRARY_EDITOR).trigger(l.eX.LibraryEditor.SAVE_VIDEO)}},{key:"getLocationBreadcrumb",value:function(){switch(this.options.context){case"edit":return{name:d.T.getPhrase(this.lang,"videoDetails")};case"chapters":return{name:d.T.getPhrase(this.lang,"chapters")};case"resources":return{name:d.T.getPhrase(this.lang,"resources")}}}},{key:"onRender",value:function(){this.showChildView("tabs",new c.n({tabs:this.options.tabs,activeTab:this.options.activeTab})),this.showChildView("breadcrumbs",new u.n({folder:this.options.folder,libraries:this.options.libraries,video:this.model,customBreadcrumbs:[this.getLocationBreadcrumb()],enableLastItemAppLink:!1}))}}])&&f(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),m}(i.Q.Component)},44391:function(e,t,n){"use strict";n.d(t,{K:function(){return k}});var o=n(31647),i=n(11306),r=n(48088),a=n(28099),s=n(26457),l=n(15564),c=n.n(l);function u(e){return u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},u(e)}function d(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function h(e,t){return h=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},h(e,t)}function f(e,t){if(t&&("object"===u(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function p(e){return p=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},p(e)}var v=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&h(e,t)}(u,e);var t,n,o,i,l=(o=u,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=p(o);if(i){var n=p(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return f(this,e)});function u(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,u),l.call(this,e)}return t=u,(n=[{key:"name",get:function(){return"TagItemComponent"}},{key:"tagName",get:function(){return this.options.behavior===s.Dm.Link?"a":"span"}},{key:"className",get:function(){var e="".concat(this.options.orientation===s.zM.Vertical?"":" d-inline-flex"),t="".concat(this.isSaving()?" saving":""),n="".concat(this.options.behavior===s.Dm.Disabled?" ".concat("dE3WC"):""),o="".concat(this.options.behavior===s.Dm.Filter?" cursor-pointer":"");return"badge-pill tag py-1 px-2 my-1 mr-1".concat(o).concat(e).concat(t).concat(n)}},{key:"template",get:function(){return c()}},{key:"elements",get:function(){return{close:".close"}}},{key:"appLinks",get:function(){return this.options.behavior!==s.Dm.Link?{}:{"[this]":{application:a.OV.SEARCH,action:a.eX.Search.HOME,params:{tag:this.model.get("name")}}}}},{key:"defaults",get:function(){return{behavior:s.Dm.Link,orientation:s.zM.Flex}}},{key:"events",value:function(){return this.options.removeEvent?{"click @ui.close":"onRemoveTag"}:{click:"onClickTag"}}},{key:"initialize",value:function(){this.options.behavior===s.Dm.Edit&&this.listenTo(this.model,"change",this.render)}},{key:"isSaving",value:function(){if(this.options.behavior!==s.Dm.Filter){var e=this.model.pick("id","name","remove"),t=e.id,n=e.name;return!!e.remove||!t||!n}}},{key:"onRemoveTag",value:function(e){if(e.stopPropagation(),!this.isSaving())return this.model.set("remove",!0),r.Radio.channel(this.options.channelName).trigger(this.options.removeEvent,this.model),!1}},{key:"onClickTag",value:function(){this.options.behavior!==s.Dm.Filter||this.options.removeEvent||r.Radio.channel(this.options.channelName).trigger(this.options.clickEvent,this.model)}},{key:"viewOptions",value:function(){return{removable:this.options.removeEvent}}},{key:"onRender",value:function(){this.resetClassName()}}])&&d(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),u}(o.Q.Component);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 m(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function b(e,t){return b=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},b(e,t)}function g(e,t){if(t&&("object"===y(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function w(e){return w=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},w(e)}var k=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&b(e,t)}(c,e);var t,n,r,a,l=(r=c,a=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=w(r);if(a){var n=w(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return g(this,e)});function c(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c),l.call(this,e)}return t=c,(n=[{key:"initialize",value:function(){this.options.behavior!==s.Dm.Edit||this.options.removeEvent||o.Q.ErrorHelper.throw(new i.H("removeEvent is required to edit tags."))}},{key:"name",get:function(){return"TagComponentCollection"}},{key:"defaults",get:function(){return{orientation:s.zM.Flex}}},{key:"className",get:function(){var e="".concat(this.options.orientation===s.zM.Vertical?" d-flex align-items-start flex-column":"");return"tags".concat(e)}},{key:"childViewOptions",get:function(){return{channelName:this.options.channelName,behavior:this.options.behavior,orientation:this.options.orientation,removeEvent:this.options.removeEvent,clickEvent:this.options.clickEvent}}},{key:"childView",get:function(){return v}}])&&m(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),c}(o.Q.ComponentCollection)},63292:function(e,t,n){"use strict";n.r(t),n.d(t,{EditVideoView:function(){return $e}});var o=n(39479),i=n(48088),r=n(31647),a=n(11306),s=n(99249),l=n(57857),c=n(25417),u=n(21679),d=n(99748),h=n(28099),f=n(29625),p=n(9484),v=n(61843),y=n(71192),m=n(68619),b=n(13156),g=n(17422),w=n(70065),k=n(8371),S=n(52076),O=n(40622),E=n(95061),T=n(57785),C=n(264),P=n(45837),R=n(37382),D=n(95168),j=n(15180),x=n(99844),N=n(72891),M=n.n(N);function V(e){return V="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},V(e)}function _(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function I(e,t){return I=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},I(e,t)}function L(e,t){if(t&&("object"===V(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function B(e){return B=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},B(e)}var A=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&I(e,t)}(s,e);var t,n,o,r,a=(o=s,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=B(o);if(r){var n=B(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return L(this,e)});function s(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),a.call(this,e)}return t=s,(n=[{key:"initialize",value:function(){var e=this;this.listenTo(this.model,"change",(function(){return e.options.viewModel.validate()}))}},{key:"template",get:function(){return M()}},{key:"name",get:function(){return"ExtraInfoItemComponent"}},{key:"regions",value:function(){return{textArea:{el:".text-area-region",replaceElement:!0}}}},{key:"bindings",get:function(){return{"[name=value]":{observe:"value",setOptions:{validate:!0}}}}},{key:"onRender",value:function(){this.showChildView("textArea",new x.F({name:"value",class:"form-control",placeholder:this.model.get("placeholder"),id:"admin-notes"})),this.stickit(),i.Validation.bind(this)}},{key:"onDestroy",value:function(){this.unstickit(),i.Validation.unbind(this)}}])&&_(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),s}(r.Q.Component),U=n(44106),F=n.n(U);function Q(e){return Q="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},Q(e)}function z(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function J(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function H(e,t,n){return t&&J(e.prototype,t),n&&J(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function K(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&&Z(e,t)}function Z(e,t){return Z=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Z(e,t)}function G(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Y(e);if(t){var i=Y(this).constructor;n=Reflect.construct(o,arguments,i)}else n=o.apply(this,arguments);return W(this,n)}}function W(e,t){if(t&&("object"===Q(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Y(e){return Y=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Y(e)}var q=function(e){K(n,e);var t=G(n);function n(e){return z(this,n),t.call(this,e)}return H(n,[{key:"name",get:function(){return"ExtraInfoComponentCollection"}},{key:"childView",get:function(){return A}},{key:"childViewOptions",get:function(){return{viewModel:this.options.viewModel}}}]),n}(r.Q.ComponentCollection),X=function(e){K(n,e);var t=G(n);function n(e){return z(this,n),t.call(this,e)}return H(n,[{key:"name",get:function(){return"ExtraInfoComponent"}},{key:"template",get:function(){return F()}},{key:"className",get:function(){return"border-top pt-3"}},{key:"regions",value:function(){return{fields:{el:".fields-region",replaceElement:!0}}}},{key:"onRender",value:function(){this.showChildView("fields",new q({collection:this.model.fields,viewModel:this.model}))}}]),n}(r.Q.Component),$=n(17391),ee=n(3974),te=n(36022),ne=n(44391),oe=n(26457),ie=n(30992),re=n.n(ie);function ae(e){return ae="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},ae(e)}function se(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function le(e,t){return le=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},le(e,t)}function ce(e,t){if(t&&("object"===ae(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function ue(e){return ue=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ue(e)}var de=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&le(e,t)}(c,e);var t,n,o,i,s=(o=c,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=ue(o);if(i){var n=ue(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return ce(this,e)});function c(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c),s.call(this,e)}return t=c,(n=[{key:"name",get:function(){return"TagsComponent"}},{key:"template",get:function(){return re()}},{key:"lang",get:function(){return"libraryEditor.tags"}},{key:"defaults",get:function(){return{headerText:l.T.getPhrase(this.lang,"heading"),orientation:oe.zM.Flex}}},{key:"regions",value:function(){return{tagList:{el:".tag-list-region",replaceElement:!0},tagSelector:{el:".tag-selector-region",replaceElement:!0}}}},{key:"initialize",value:function(){this.options.behavior!==oe.Dm.Edit||this.options.parentId||r.Q.ErrorHelper.throw(new a.H("parentId is required to edit tags."))}},{key:"getTypeaheadConfigs",value:function(){var e=ee.M.getTypeaheadConfig(),t=ee.M.getBloodhoundConfig(),n={newType:h.n8.TagsRaw},o={newType:h.n8.TagsRaw,footerTemplate:$.J.getConfirmSelectionTemplate()};return[{name:h.n8.TagsRaw,typeaheadConfig:e,bloodhoundConfig:t,options:{hideEmptyResults:!0}},{name:"add-new",typeaheadConfig:e,bloodhoundConfig:t,options:n},{name:"empty-suggestion",typeaheadConfig:e,bloodhoundConfig:t,options:o}]}},{key:"viewOptions",value:function(){var e;return this.showEmptyStateText()&&(e=this.options.emptyStateText),{headerText:this.options.headerText,editable:this.options.behavior===oe.Dm.Edit,emptyStateText:e}}},{key:"showEmptyStateText",value:function(){return this.options.behavior!==oe.Dm.Edit&&!this.collection.length&&!!this.options.emptyStateText}},{key:"renderTagSelector",value:function(){this.options.behavior===oe.Dm.Edit&&this.showChildView("tagSelector",new te.M({model:this.model,parentChannelName:this.options.channelName,inputId:"tag-select",selectEvent:"add:tag",typeaheadConfigs:this.getTypeaheadConfigs(),placeholderText:l.T.getPhrase(this.lang,"placeholder"),callbacks:{onRender:$.J.selectFirstResult,onBlur:$.J.clearInputOnBlur},typeaheadOptions:{hint:!1},actionOptions:{clearOnSelect:!0},autofocus:this.options.autofocus}))}},{key:"renderTagList",value:function(){this.showEmptyStateText()||this.showChildView("tagList",new ne.K({collection:this.collection,channelName:this.options.channelName,behavior:this.options.behavior,orientation:this.options.orientation,removeEvent:this.options.removeEvent}))}},{key:"onRender",value:function(){this.renderTagSelector(),this.renderTagList()}}])&&se(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),c}(r.Q.Component),he=n(88172),fe=n(99724),pe=n.n(fe),ve={saveButton:"G_FDK",undo:"dcV70"};function ye(e){return ye="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},ye(e)}function me(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function be(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function ge(e,t){return ge=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ge(e,t)}function we(e,t){if(t&&("object"===ye(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function ke(e){return ke=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ke(e)}var Se=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ge(e,t)}(c,e);var t,n,o,a,s=(o=c,a=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=ke(o);if(a){var n=ke(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return we(this,e)});function c(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c),s.call(this,e)}return t=c,(n=[{key:"name",get:function(){return"SaveComponent"}},{key:"template",get:function(){return pe()}},{key:"className",get:function(){return"save-component ".concat(this.options.extraClasses)}},{key:"lang",get:function(){return"libraryEditor.save"}},{key:"getParentChannel",value:function(){return i.Radio.channel(this.options.channelName)}},{key:"getSaveChannelName",value:function(){return"".concat(this.name,":").concat(this.cid)}},{key:"regions",value:function(){return{save:{el:".save-region",replaceElement:!0}}}},{key:"events",value:function(){return{"click .undo":"onUndo"}}},{key:"initialize",value:function(){var e;this.model||(this.model=new r.Q.Model((me(e={},he.ZV.ShowSpinner,this.options.showSpinner),me(e,he.ZV.Disabled,this.options.isDisabled),e)));var t=this.options.channelName;this.listenTo(t,O.LibraryEditorActions.DisableSave,this.onDisableSave),this.listenTo(t,O.LibraryEditorActions.EnableSave,this.onEnableSave),this.listenTo(t,O.LibraryEditorActions.CancelSave,this.onCancelSave);var n=i.Radio.channel(this.getSaveChannelName());this.listenTo(n,O.LibraryEditorActions.Save,this.onSave),this.options.allowUndo&&(this.options.hasChanges&&this.model.set("showUndo",!0),this.listenTo(this.model,"change:showUndo",this.render))}},{key:"onCancelSave",value:function(){this.model.set(he.ZV.ShowSpinner,!1)}},{key:"onEnableSave",value:function(){this.model.set(he.ZV.Disabled,!1),this.options.allowUndo&&this.model.set("showUndo",!0)}},{key:"onDisableSave",value:function(){this.model.get(he.ZV.ShowSpinner)&&this.model.set(he.ZV.ShowSpinner,!1,{silent:!0}),this.model.set(he.ZV.Disabled,!0),this.options.allowUndo&&this.model.set("showUndo",!1)}},{key:"onUndo",value:function(e){e.stopPropagation(),this.getParentChannel().trigger(O.LibraryEditorActions.Undo)}},{key:"onSave",value:function(){this.model.set(he.ZV.ShowSpinner,!0),this.getParentChannel().trigger(O.LibraryEditorActions.Save)}},{key:"viewOptions",value:function(){return{allowUndo:this.options.allowUndo&&this.model.get("showUndo"),styles:ve}}},{key:"renderSaveButton",value:function(){var e=new he.Py({saveEvent:O.LibraryEditorActions.Save,channelName:this.getSaveChannelName(),model:this.model,buttonText:l.T.getPhrase(this.lang,"save"),extraButtonClass:"btn-dark ".concat(ve.saveButton),spinnerOptions:{size:v.Ey.Small,type:v.dR.Light,extraClasses:"mx-auto"}});this.showChildView("save",e)}},{key:"onRender",value:function(){this.renderSaveButton()}}])&&be(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),c}(r.Q.Component),Oe=n(2772),Ee=n(88483),Te=n(10101),Ce=n(86272),Pe=n.n(Ce);function Re(e){return Re="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},Re(e)}function De(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function je(e,t){return je=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},je(e,t)}function xe(e,t){if(t&&("object"===Re(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Ne(e){return Ne=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ne(e)}var Me=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&je(e,t)}(a,e);var t,n,o,i,r=(o=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Ne(o);if(i){var n=Ne(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return xe(this,e)});function a(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),r.call(this,e)}return t=a,(n=[{key:"initialize",value:function(){this.viewModel=s.r.get("image:storage")}},{key:"name",get:function(){return"EditThumbnailComponent"}},{key:"lang",get:function(){return"libraryEditor.editThumbnail"}},{key:"template",get:function(){return Pe()}},{key:"behaviors",get:function(){var e=this;return[{behaviorClass:Te.YR,channelName:this.options.channelName,buttonSelector:".upload-thumbnail",imageType:g.__.Thumbnails,appLink:{application:h.OV.LIBRARY_EDITOR,action:h.eX.LibraryEditor.UPLOAD_THUMBNAIL,args:[this.options.model.id]},saveImage:function(t){return e.viewModel.set({dataUrl:t})}}]}},{key:"defaults",get:function(){return{editable:!0}}},{key:"regions",value:function(){return{thumbnail:{el:".thumbnail-region",replaceElement:!0}}}},{key:"viewOptions",value:function(){return{editable:this.options.editable,dimensions:h.nq[g.__.Thumbnails]}}},{key:"onRender",value:function(){this.showChildView("thumbnail",new Oe.Z({model:this.model,thumbnailOptions:{size:Ee.h2.Medium}}))}}])&&De(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(r.Q.Component),Ve=n(23468),_e=n.n(Ve),Ie={suggestEdit:"AgfOM"};function Le(e){return Le="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},Le(e)}function Be(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function Ae(e,t){return Ae=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Ae(e,t)}function Ue(e,t){if(t&&("object"===Le(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Fe(e){return Fe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Fe(e)}var Qe=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ae(e,t)}(a,e);var t,n,o,i,r=(o=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Fe(o);if(i){var n=Fe(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return Ue(this,e)});function a(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),r.call(this,e)}return t=a,(n=[{key:"initialize",value:function(){var e=this;this.listenTo(this.options.channelName,"update:tags",(function(){return e.renderCustomerTags(!0)}))}},{key:"name",get:function(){return"EditVideoDetailsComponent"}},{key:"className",get:function(){return"edit-video-detail py-3"}},{key:"lang",get:function(){return"libraryEditor.editVideoDetails"}},{key:"template",get:function(){return _e()}},{key:"appLinks",get:function(){return{".suggest-edit":{application:h.OV.LIBRARY_EDITOR,action:h.eX.LibraryEditor.SUGGEST_AN_EDIT,args:[this.model.id]}}}},{key:"regions",value:function(){return{topSave:{el:".top-save-region",replaceElement:!0},bottomSave:{el:".bottom-save-region",replaceElement:!0},thumbnail:{el:".thumbnail-region",replaceElement:!0},basicInfo:{el:".basic-info-region",replaceElement:!0},additionalInfo:{el:".additional-details-region",replaceElement:!0},productionInfo:{el:".production-info-region",replaceElement:!0},fields:{el:".fields-region",replaceElement:!0},clickViewTags:{el:".cv-tags-region",replaceElement:!1},customerTags:{el:".customer-tags-region",replaceElement:!0}}}},{key:"renderSave",value:function(){this.options.editable&&this.showChildView("topSave",new Se({channelName:this.options.channelName,allowUndo:!0,isDisabled:this.options.isSaveDisabled,hasChanges:this.options.hasChanges,extraClasses:"float-right"})),this.showChildView("bottomSave",new Se({channelName:this.options.channelName,allowUndo:!0,isDisabled:this.options.isSaveDisabled,hasChanges:this.options.hasChanges,extraClasses:"float-right"}))}},{key:"renderBasicInfo",value:function(){this.showChildView("basicInfo",new R.J({model:this.model,ratings:this.options.ratings,channelName:this.options.channelName,editable:this.options.editable,showingSaveButton:this.options.editable}))}},{key:"renderThumbnail",value:function(){this.showChildView("thumbnail",new Me({model:this.model,channelName:this.options.channelName,editable:this.options.editable}))}},{key:"renderAdditionalInfo",value:function(){this.options.editable&&C.g.hasLite||this.showChildView("additionalInfo",new j.a({model:this.model,channelName:this.options.channelName,libraries:this.options.libraries,hostedLibraries:this.options.hostedLibraries,editable:this.options.editable,hideBroadcastInfo:this.options.currentUser.get("instanceRegion")===k.b.US}))}},{key:"renderProductionInfo",value:function(){this.options.editable&&C.g.hasLite||this.showChildView("productionInfo",new D.O({model:this.model,channelName:this.options.channelName,editable:this.options.editable}))}},{key:"renderFields",value:function(){C.g.hasLite||this.options.currentUser.get("instanceRegion")===k.b.US||this.showChildView("fields",new X({model:this.model,channelName:this.options.channelName}))}},{key:"renderClickViewTags",value:function(){if(!this.options.editable){var e=v.BK.filterObjectsByOwnerType(this.model.tags,P.N.ClickView,this.options.currentUser.get("customerId"));this.showChildView("clickViewTags",new de({parentId:this.model.get("id"),collection:e,orientation:oe.zM.Flex,behavior:oe.Dm.Disabled,channelName:this.options.channelName,headerText:l.T.getPhrase(this.lang,"clickviewTags"),emptyStateText:l.T.getPhrase(this.lang,"clickviewTagsEmpty")}))}}},{key:"renderCustomerTags",value:function(e){if(!C.g.hasLite||this.options.editable){var t=v.BK.filterObjectsByOwnerType(this.model.tags,P.N.Customer,this.options.currentUser.get("customerId"));this.showChildView("customerTags",new de({parentId:this.model.get("id"),collection:t,channelName:this.options.channelName,behavior:oe.Dm.Edit,headerText:this.options.editable?l.T.getPhrase(this.lang,"tags"):l.T.getPhrase(this.lang,"customerTags"),removeEvent:"remove:tag",autofocus:!!e}))}}},{key:"renderTags",value:function(){this.renderClickViewTags(),this.renderCustomerTags()}},{key:"viewOptions",value:function(){return{styles:Ie,editable:this.options.editable,suggestEditClasses:"info-link text-underline suggest-edit",isExchange:v.M2.isExchangeVideo(this.model)}}},{key:"onRender",value:function(){this.renderSave(),this.renderBasicInfo(),this.renderThumbnail(),this.renderAdditionalInfo(),this.renderProductionInfo(),this.renderFields(),this.renderTags()}}])&&Be(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(r.Q.Component),ze=n(21053),Je=n(53854),He=n(75535),Ke=n(55230),Ze=n.n(Ke);function Ge(e){return Ge="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},Ge(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,o.key,o)}}function Ye(e,t){return Ye=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Ye(e,t)}function qe(e,t){if(t&&("object"===Ge(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Xe(e){return Xe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Xe(e)}var $e=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ye(e,t)}(j,e);var t,n,P,R,D=(P=j,R=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Xe(P);if(R){var n=Xe(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return qe(this,e)});function j(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,j),(t=D.call(this,e)).editable=!1,t}return t=j,n=[{key:"name",get:function(){return"EditVideoView"}},{key:"title",get:function(){return this.model&&this.model.get("name")}},{key:"lang",get:function(){return"libraryEditor.editVideo"}},{key:"className",get:function(){return"bg-white p-3 rounded"}},{key:"channelName",get:function(){return"".concat(this.name,":").concat(this.cid)}},{key:"viewModelName",get:function(){return"".concat(this.name,":").concat(this.options.videoId)}},{key:"template",get:function(){return Ze()}},{key:"regions",value:function(){return{tabs:{el:".tab-region",replaceElement:!0,partialLoading:g.LP.EditVideoTabs},content:{el:".edit-content-region",replaceElement:!0,partialLoading:g.LP.EditVideoDetails}}}},{key:"initialize",value:function(){this.navLock=u.u.getInstance(h.K9.NavLock,this),this.initDataListeners(),v.Si.initBackButton(),this.initServices()}},{key:"initServices",value:function(){this.videoDataService=u.u.getInstance(h.Or.Video,this),this.tagDataService=u.u.getInstance(h.Or.Tags,this),this.libraryDataService=u.u.getInstance(h.Or.Library,this),this.seriesDataService=u.u.getInstance(h.Or.Series,this),this.ratingsDataService=u.u.getInstance(h.Or.Ratings,this),this.fieldsDataService=u.u.getInstance(h.Or.Fields,this),this.alertService=u.u.getInstance(h.K9.Alerts,this),this.personDataService=u.u.getInstance(h.Or.Person,this),this.companyDataService=u.u.getInstance(h.Or.Company,this)}},{key:"initDataListeners",value:function(){this.listenTo(c.G.SHELL,r.Q.EventNames.NAV_UNLOCKED_BY_USER,this.onNavigateAway),this.listenTo(h.Vk.VIDEO,"videos:".concat(this.options.videoId,":sync"),this.render),this.listenTo(h.Vk.VIDEO,"videos:".concat(this.options.videoId,":error"),this.onError),this.listenTo(h.Vk.RATINGS,"".concat(h.M_.RATINGS,":sync"),this.render),this.listenTo(h.Vk.VIDEO,"".concat(h.M_.UPDATE_VIDEO_THUMBNAIL,":").concat(this.options.videoId,":sync"),this.onThumbnailUpdated),this.listenTo(h.Vk.LIBRARY,"hosted:libraries:sync",this.render),this.listenTo(this.channelName,"select:rating",o.partial(this.onTypeaheadSelection,o,"rating")),this.listenTo(this.channelName,"select:channel",o.partial(this.onTypeaheadSelection,o,"channel")),this.listenTo(this.channelName,"select:series",this.onSelectSeries),this.listenTo(this.channelName,"add:season",this.onSelectSeason),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,"add:producers",this.onSelectProducer),this.listenTo(this.channelName,"add:tag",this.onAddTag),this.listenTo(this.channelName,"remove:distributors",this.onRemoveDistributor),this.listenTo(this.channelName,"remove:productionCompanies",this.onRemoveProductionCompany),this.listenTo(this.channelName,"remove:directors",this.onRemoveDirector),this.listenTo(this.channelName,"remove:producers",this.onRemoveProducer),this.listenTo(this.channelName,"remove:tag",this.onRemoveTag),this.listenTo(this.channelName,O.LibraryEditorActions.Save,this.onSave),this.listenTo(this.channelName,O.LibraryEditorActions.Undo,this.onUndo),this.listenTo(this.channelName,O.LibraryEditorActions.DetectInput,this.onTypeaheadInput),this.listenTo(this.channelName,"image:load",this.onBeforeThumbnailUpload)}},{key:"onError",value:function(e){switch(e.type){case d.h.NotFound:r.Q.ErrorHelper.throw(new He.l);break;case d.h.Forbidden:r.Q.ErrorHelper.throw(new Je.a)}}},{key:"onTypeaheadSelection",value:function(e,t,n){if(n){var i=this.viewModel.get(t),r=i.filter({name:e.name});o.each(r,(function(e){return i.remove(e)})),i.add(e)}else this.viewModel.set(t,e);this.onModelChange(e,{manualUpdate:!0})}},{key:"onTypeaheadInput",value:function(e,t,n){e.get("name")||(n&&n.isCollection?this.viewModel.get(t).remove(e.get("id"),{silent:!0}):this.viewModel.get(t).clear({silent:!0}),this.onModelChange(null,{manualUpdate:!0}),"series"===t&&(this.validateSeries(),i.Radio.channel(this.channelName).trigger("clear:series")))}},{key:"onSelectSeries",value:function(e){var t=this;e.id?this.seriesDataService.getSeries(e.id,(function(e){t.viewModel.unset("season"),t.viewModel.set("episodeNumber",null),t.onTypeaheadSelection(e.toJSON(),"series")})):e.name&&this.seriesDataService.createSeries(e.name,(function(e){t.viewModel.unset("season"),t.viewModel.set("episodeNumber",null),t.onTypeaheadSelection({id:e.id},"series")}))}},{key:"onSelectSeason",value:function(e){var t=this;if(o.isNull(e))return this.viewModel.get("season").clear({silent:!0}),this.viewModel.set("episodeNumber",null),v.yV.deselectAll(this.viewModel.get("series.seasons")),void this.onModelChange(null,{manualUpdate:!0});if(e.id)return this.viewModel.set("season",e),v.yV.setSelected(e.id,this.viewModel.get("series.seasons")),void this.onModelChange(e,{manualUpdate:!0});if(e.number){var n=this.viewModel.get("series.id");this.seriesDataService.createSeason(e,n,(function(e){t.viewModel.set("season",e.toJSON()),!t.viewModel.get("series.seasons")&&t.viewModel.get("series").set("seasons",new f.i),t.viewModel.get("series.seasons").add(e.toJSON()),v.yV.setSelected(e.id,t.viewModel.get("series.seasons")),t.onModelChange(e.toJSON(),{manualUpdate:!0}),t.render()}))}}},{key:"onSelectDistributor",value:function(e){var t=this;e.id?this.onTypeaheadSelection(e,"distributors",!0):e.name&&this.companyDataService.createCompany(e.name,(function(e){t.onTypeaheadSelection(e.toJSON(),"distributors",!0)}))}},{key:"onSelectProductionCompany",value:function(e){var t=this;e.id?this.onTypeaheadSelection(e,"productionCompanies",!0):e.name&&this.companyDataService.createCompany(e.name,(function(e){t.onTypeaheadSelection(e.toJSON(),"productionCompanies",!0)}))}},{key:"onSelectDirector",value:function(e){var t=this;e.id?this.onTypeaheadSelection(e,"directors",!0):e.name&&this.personDataService.createPerson(e.name,(function(e){t.onTypeaheadSelection(e.toJSON(),"directors",!0)}))}},{key:"onSelectProducer",value:function(e){var t=this;e.id?this.onTypeaheadSelection(e,"producers",!0):e.name&&this.personDataService.createPerson(e.name,(function(e){t.onTypeaheadSelection(e.toJSON(),"producers",!0)}))}},{key:"onRemoveDistributor",value:function(e){this.removeFromCollection(e,"distributors")}},{key:"onRemoveProductionCompany",value:function(e){this.removeFromCollection(e,"productionCompanies")}},{key:"onRemoveDirector",value:function(e){this.removeFromCollection(e,"directors")}},{key:"onRemoveProducer",value:function(e){this.removeFromCollection(e,"producers")}},{key:"removeFromCollection",value:function(e,t){e&&e.id&&t&&(this.viewModel.get(t).remove(e.id),this.onModelChange(null,{manualUpdate:!0}))}},{key:"onAddTag",value:function(e){var t=this;if(e&&e.name){var n=e.name.trim().toLowerCase();if(n&&!v.yV.findModelByName(n,this.viewModel.tags)){var o=new m.V({name:n});this.viewModel.tags.add(o),this.tagDataService.createTag(n,this.model.get("id"),(function(e){o.set(e.toJSON()),i.Radio.channel(t.channelName).trigger("update:tags")}))}}}},{key:"onRemoveTag",value:function(e){var t=this;e instanceof m.V&&e.id&&this.tagDataService.dissociateTag(e.id,this.model.get("id"),(function(){t.viewModel.tags.remove(e),i.Radio.channel(t.channelName).trigger("update:tags"),t.logDissocAction(t.model.get("id"),e,w.EntityType.Tag)}))}},{key:"saveFields",value:function(e,t){var n=this,i=0;e.updatedVideo=o.extend({},e.updatedVideo||{});var r=function(){++i===e.dataChanges.fields.length&&t(e)};o.each(e.dataChanges.fields,(function(e){if(e.id&&!e.value)return n.viewModel.fields.remove(n.viewModel.fields.findWhere({id:e.id})),void n.fieldsDataService.deleteField(e.id,r);!e.id||e.id>0?n.fieldsDataService.updateField(e,r):n.fieldsDataService.addField(n.options.videoId,e,(function(t){n.viewModel.fields.findWhere({id:e.id}).set("id",t.id),r()}))}))}},{key:"bulkDissoc",value:function(e,t){this.videoDataService.bulkDissoc(this.model.id,e.pendingDissocs,(function(){t(e)}))}},{key:"saveVideo",value:function(e,t){var n=this,i=o.omit(e.dataChanges,"fields");if(o.isEmpty(i))t(e);else{var r=o.omit(e.dataChanges,"fields");this.videoDataService.updateVideo(this.model.get("id"),this.folder.get("id"),r,(function(i){(e.dataChanges.series&&e.dataChanges.series.id||e.dataChanges.episodeNumber||e.dataChanges.season)&&n.videoDataService.clearVideoCache(),e.updatedVideo=o.extend({},e.updatedVideo||{},i),t(e)}))}}},{key:"afterSave",value:function(e){if(this.viewModel){e.updatedVideo&&this.updateState(e.updatedVideo),this.unlockNav(),this.updateSaveButton(O.LibraryEditorActions.DisableSave),this.logEditAction(e.dataChanges,w.WorkflowPhase.Save);var t=b.J.updatedVideoAlert(this.viewModel.get("name"));this.alertService.success(t||"Video was successfully updated")()}}},{key:"onSave",value:function(){if(this.viewModel.validate(),!1===this.viewModel.isValid())return this.updateSaveButton(O.LibraryEditorActions.CancelSave),!1;this.validateSeries();var e=T.xC.getChanges(this.model,this.viewModel),t=T.xC.getRemovedObjectIds(this.model,this.viewModel);if(!e&&!o.keys(t).length)return this.updateSaveButton(O.LibraryEditorActions.CancelSave),!1;var n=new r.Q.Middleware;return e&&e.fields&&n.use(o.bind(this.saveFields,this)),t&&o.keys(t).length&&n.use(o.bind(this.bulkDissoc,this)),this.editable&&n.use(o.bind(this.saveVideo,this)),n.use(o.bind(this.afterSave,this)),n.go({dataChanges:e,pendingDissocs:t},null),!1}},{key:"onUndo",value:function(){var e=this;new v.Mr({title:l.T.getPhrase(this.lang,"undoTitle"),text:l.T.getPhrase(this.lang,"undoBody",{videoName:this.model.get("name")}),buttons:[{text:l.T.getPhrase(this.lang,"undo"),className:"btn btn-danger",success:!0},{text:l.T.getPhrase(this.lang,"cancel"),className:"btn btn-link",close:!0}]}).render().done((function(){e.logEditAction({},w.WorkflowPhase.Discard),e.revertState({undo:!0}),e.render()}))}},{key:"updateState",value:function(e){this.stopListening(this.viewModel),T.xC.updateModelState(this.model,this.viewModel,e),s.r.clear(this.viewModelName),this.getViewModel(),this.renderContent(),this.renderTabs()}},{key:"onNavigateAway",value:function(){this.revertState()}},{key:"revertState",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.undo;this.stopListening(this.viewModel),s.r.clear(this.viewModelName),delete this.viewModel,this.unlockNav(),t&&this.getViewModel()}},{key:"lockNav",value:function(){this.navLock.lock({title:l.T.getPhrase(this.lang,"navLockHeading"),text:l.T.getPhrase(this.lang,"navLockBody")})}},{key:"unlockNav",value:function(){this.navLock.unlock()}},{key:"onBeforeThumbnailUpload",value:function(){this.navLock.isLocked()&&(this.navLock.unlock(),s.r.get("upload:thumbnail:options").set("lockNav",!0))}},{key:"onModelChange",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(t.stickitChange||t.manualUpdate)if(this.viewModel.validate(),!1!==this.viewModel.isValid()){var n=T.xC.getChanges(this.model,this.viewModel)||o.keys(T.xC.getRemovedObjectIds(this.model,this.viewModel)).length;if(!n)return this.unlockNav(),void this.updateSaveButton(O.LibraryEditorActions.DisableSave);this.lockNav(),this.updateSaveButton(O.LibraryEditorActions.EnableSave)}else this.updateSaveButton(O.LibraryEditorActions.DisableSave)}},{key:"updateSaveButton",value:function(e){var t=i.Radio.channel(this.channelName),n=O.LibraryEditorActions.EnableSave,o=O.LibraryEditorActions.DisableSave,s=O.LibraryEditorActions.CancelSave;switch(e){case n:return void t.trigger(n);case o:return void t.trigger(o);case s:return void t.trigger(s)}r.Q.ErrorHelper.throw(new a.H("Save action type is not valid."))}},{key:"onThumbnailUpdated",value:function(){var e=this;this.videoDataService.clearCacheAndGetVideo(this.options.videoId,(function(t){e.model=t,e.viewModel.set("thumbnail",e.model.thumbnail.toJSON())}))}},{key:"logEditAction",value:function(e,t){var n=Object.assign({id:this.model.get("id")},e);S.k.logUserAction(n,{actionType:w.UserAction.Edit,entity:w.EntityType.Video,location:w.LocationContext.EditVideoDetails,workflowPhase:t})}},{key:"logDissocAction",value:function(e,t,n){var o=Object.assign({videoId:e},t.pick("id","name"));S.k.logUserAction(o,{actionType:w.UserAction.Dissociate,entity:n,location:w.LocationContext.EditVideoDetails})}},{key:"onValidation",value:function(e){this.viewModel.set("disabled",!e)}},{key:"getViewModel",value:function(){this.model.fields&&this.model.fields.length||this.model.set("fields",(0,T.aj)()),this.viewModel=s.r.get(this.viewModelName,this.model.toJSON(),{ctor:y.n}),this.editable&&(this.viewModel.addValidation(T.rr),this.viewModel.addValidation(T.tD));var e=!C.g.hasLite&&this.currentUser.get("instanceRegion")!==k.b.US;e&&this.viewModel.addValidation(T.oJ),this.listenTo(this.viewModel,"validated",this.onValidation),this.listenTo(this.viewModel,"change",this.onModelChange),this.listenTo(this.viewModel,"change:dateBroadcast",o.partial(this.onModelChange,o,{manualUpdate:!0})),this.viewModel.fields&&e&&(this.viewModel.fields&&this.viewModel.fields.each((function(e){return e.addValidation(T.Zg)})),this.listenTo(this.viewModel.fields,"change",this.onModelChange))}},{key:"validateSeries",value:function(){this.viewModel.get("series.id")||(this.viewModel.unset("season"),this.viewModel.set("episodeNumber",null))}},{key:"fetchData",value:function(){this.model=this.videoDataService.getVideo(this.options.videoId),this.ratings=this.ratingsDataService.getAllRatings(),this.hostedLibraries=this.libraryDataService.getHostedLibraries(),this.model&&(this.editable=v.BK.canEditVideo(this.model),this.folder=this.model.categories.first(),this.ratings&&this.hostedLibraries&&(this.viewModel instanceof y.n||this.getViewModel()))}},{key:"requiredResources",get:function(){return{libraries:E.T.libraries,currentUser:p.K.currentUser}}},{key:"onBeforeRender",value:function(){return this.fetchData(),!!this.model&&!!this.ratings&&!!this.viewModel}},{key:"renderContent",value:function(){var e=T.xC.getChanges(this.model,this.viewModel)||o.keys(T.xC.getRemovedObjectIds(this.model,this.viewModel)).length;this.showChildView("content",new Qe({model:this.viewModel,ratings:this.ratings,libraries:this.libraries,hostedLibraries:this.hostedLibraries,channelName:this.channelName,isSaveDisabled:!e,hasChanges:!!e,editable:this.editable,currentUser:this.currentUser}))}},{key:"renderTabs",value:function(){this.showChildView("tabs",new ze.W({model:this.viewModel,tabs:v.Si.getEditVideoTabs(this.options.videoId,this.editable),activeTab:".edit-video-applink",context:"edit",folder:this.folder,libraries:this.libraries}))}},{key:"onRender",value:function(){this.renderTabs(),this.renderContent()}}],n&&We(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),j}(r.Q.View)},86272:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({1:function(e,t,n,o,i){return e.propertyIsEnumerable,"<h5>"+e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"label",{name:"lang",hash:{},data:i}))+"</h5>\r\n"},3:function(e,t,n,o,i){return"my-2"},5:function(e,t,n,o,i){e.propertyIsEnumerable;var r,a=null!=t?t:e.nullContext||{},s=e.hooks.helperMissing,l=e.escapeExpression;return' <div class="text-muted mt-3 mb-1"><em>'+l((n.lang||t&&t.lang||s).call(a,"recommendedSize",{name:"lang",hash:{height:null!=(r=null!=(r=null!=t?t.options:t)?r.dimensions:r)?r.height:r,width:null!=(r=null!=(r=null!=t?t.options:t)?r.dimensions:r)?r.width:r},data:i}))+'</em></div>\r\n <button class="upload-thumbnail btn btn-outline-dark mb-3 w-100">'+l((n.lang||t&&t.lang||s).call(a,"upload",{name:"lang",hash:{},data:i}))+"</button>\r\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){e.propertyIsEnumerable;var r,a=null!=t?t:e.nullContext||{};return(null!=(r=n.if.call(a,null!=(r=null!=t?t.options:t)?r.editable:r,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?r:"")+'<div class="thumbnail-region"></div>\r\n<div class="'+(null!=(r=n.unless.call(a,null!=(r=null!=t?t.options:t)?r.editable:r,{name:"unless",hash:{},fn:e.program(3,i,0),inverse:e.noop,data:i}))?r:"")+'">\r\n'+(null!=(r=n.if.call(a,null!=(r=null!=t?t.options:t)?r.editable:r,{name:"if",hash:{},fn:e.program(5,i,0),inverse:e.noop,data:i}))?r:"")+"</div>"},useData:!0})},43791: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,'<h1 class="h3">\r\n '+e.escapeExpression("function"==typeof(r=null!=(r=n.name||(null!=t?t.name:t))?r:e.hooks.helperMissing)?r.call(null!=t?t:e.nullContext||{},{name:"name",hash:{},data:i}):r)+'\r\n</h2>\r\n<div class="breadcrumbs-region"></div>\r\n<div class="tabs-region pl-2"></div>'},useData:!0})},23468:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({1:function(e,t,n,o,i){return"mb-4"},3:function(e,t,n,o,i){var r;return e.propertyIsEnumerable,' <p class="mb-2 py-1 px-2 alert alert-info '+e.escapeExpression(e.lambda(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.suggestEdit:r,t))+'">\r\n'+(null!=(r=n.if.call(null!=t?t:e.nullContext||{},null!=(r=null!=t?t.options:t)?r.isExchange:r,{name:"if",hash:{},fn:e.program(4,i,0),inverse:e.program(6,i,0),data:i}))?r:"")+" </p>\r\n"},4:function(e,t,n,o,i){var r;return e.propertyIsEnumerable," "+(null!=(r=(n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"suggestEditExchange",{name:"lang",hash:{classNames:null!=(r=null!=t?t.options:t)?r.suggestEditClasses:r},data:i}))?r:"")+"\r\n"},6:function(e,t,n,o,i){var r;return e.propertyIsEnumerable," "+(null!=(r=(n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"suggestEdit",{name:"lang",hash:{classNames:null!=(r=null!=t?t.options:t)?r.suggestEditClasses:r},data:i}))?r:"")+"\r\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){e.propertyIsEnumerable;var r,a=null!=t?t:e.nullContext||{};return'<div class="row">\r\n <div class="left-pane col-4">\r\n <div class="thumbnail-region"></div>\r\n <div class="cv-tags-region '+(null!=(r=n.unless.call(a,null!=(r=null!=t?t.options:t)?r.editable:r,{name:"unless",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?r:"")+'"></div>\r\n <div class="customer-tags-region"></div>\r\n </div>\r\n <div class="right-pane col-8">\r\n'+(null!=(r=n.unless.call(a,null!=(r=null!=t?t.options:t)?r.editable:r,{name:"unless",hash:{},fn:e.program(3,i,0),inverse:e.noop,data:i}))?r:"")+' <div class="top-save-region"></div>\r\n <div class="basic-info-region mb-4"></div> \r\n <div class="additional-details-region mb-4"></div> \r\n <div class="production-info-region mb-4"></div> \r\n <div class="fields-region mb-4"></div>\r\n <div class="bottom-save-region"></div>\r\n </div>\r\n</div>'},useData:!0})},99724: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'<span class="text-muted mx-2 undo '+a(e.lambda(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.undo:r,t))+'">'+a((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"undo",{name:"lang",hash:{},data:i}))+"</span>\r\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){var r;return e.propertyIsEnumerable,(null!=(r=n.if.call(null!=t?t:e.nullContext||{},null!=(r=null!=t?t.options:t)?r.allowUndo:r,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?r:"")+'<div class="save-region"></div>'},useData:!0})},15564:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({1:function(e,t,n,o,i){return'<span class="close cursor-pointer" aria-hidden="true">×</span>\r\n'},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){e.propertyIsEnumerable;var r,a,s=null!=t?t:e.nullContext||{},l=e.hooks.helperMissing,c="function",u=e.escapeExpression;return'<span class="clamp-1" title="'+u(typeof(a=null!=(a=n.name||(null!=t?t.name:t))?a:l)===c?a.call(s,{name:"name",hash:{},data:i}):a)+'">'+u(typeof(a=null!=(a=n.name||(null!=t?t.name:t))?a:l)===c?a.call(s,{name:"name",hash:{},data:i}):a)+"</span>\r\n"+(null!=(r=n.if.call(s,null!=(r=null!=t?t.options:t)?r.removable:r,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?r:"")},useData:!0})},30992: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,"<h5>"+e.escapeExpression(e.lambda(null!=(r=null!=t?t.options:t)?r.headerText:r,t))+"</h5>\r\n"},3:function(e,t,n,o,i){var r;return e.propertyIsEnumerable,"<p>"+e.escapeExpression(e.lambda(null!=(r=null!=t?t.options:t)?r.emptyStateText:r,t))+"</p>\r\n"},5:function(e,t,n,o,i){return'<div class="tag-selector-region"></div>\r\n'},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){e.propertyIsEnumerable;var r,a=null!=t?t:e.nullContext||{};return(null!=(r=n.if.call(a,null!=(r=null!=t?t.options:t)?r.headerText:r,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?r:"")+(null!=(r=n.if.call(a,null!=(r=null!=t?t.options:t)?r.emptyStateText:r,{name:"if",hash:{},fn:e.program(3,i,0),inverse:e.noop,data:i}))?r:"")+(null!=(r=n.if.call(a,null!=(r=null!=t?t.options:t)?r.editable:r,{name:"if",hash:{},fn:e.program(5,i,0),inverse:e.noop,data:i}))?r:"")+'<div class="tag-list-region"></div>'},useData:!0})},55230: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="tab-region"></div>\r\n<div class="edit-content-region"></div>\r\n<div class="dialog-region"></div>'},useData:!0})},44106: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'<h5 class="mb-0">Extra Information</h5>\r\n<div class="text-muted mb-3">This information is only visible to admins and will not be searchable</div>\r\n<div class="fields-region"></div>'},useData:!0})},72891: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,'<div class="form-group">\r\n <label for="edit-description">'+e.escapeExpression("function"==typeof(r=null!=(r=n.name||(null!=t?t.name:t))?r:e.hooks.helperMissing)?r.call(null!=t?t:e.nullContext||{},{name:"name",hash:{},data:i}):r)+'</label>\r\n <div class="text-area-region"></div>\r\n <div class="form-feedback"></div>\r\n</div>'},useData:!0})}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[1203],{74269:function(e,t,n){n.r(t),n.d(t,{DialogHelper:function(){return P}});var r,o=n(1024),i=n.n(o),a=n(30314),u=n(53808),c=n(71575),l=n(51934),s=n.n(l),d=n(85610),p=n(88483);function h(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var f=(h(r={},p.__.Thumbnails,{width:1280,height:720}),h(r,p.__.Banners,{width:1200,height:222}),h(r,p.__.Covers,{width:512,height:512}),h(r,p.__.Posters,{width:1e3,height:1500}),h(r,p.__.TallPosters,{width:1080,height:1920}),h(r,p.__.HeroBanners,{width:1920,height:640}),h(r,p.__.None,{width:1,height:1}),h(r,p.__.Avatars,{width:256,height:256}),h(r,p.__.Logos,{width:128,height:128}),r),m=n(57857);function g(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,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e,t)||function(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}}(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 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}var b=m.T.encloseNamespace("shared.imageCropper"),C=/data:([a-zA-Z0-9]+\/[a-zA-Z0-9-.+]+).*,.*/;function w(e){var t=g(i().useState(!1),2),n=t[0],r=t[1],o=g(i().useState(!1),2),a=o[0],u=o[1],l=i().useRef(),p=i().useRef();return i().useEffect((function(){var t=new Image;t.src=e.src;var n=l.current.offsetWidth/t.width,o=f[e.imageType],i={viewMode:2,autoCropArea:1,ready:function(){return r(!0)}};return o&&(i.minCropBoxWidth=o.width*n,i.minCropBoxHeight=o.height*n,i.aspectRatio=o.width/o.height),p.current=new(s())(l.current,i),function(){p.current.destroy()}}),[]),i().createElement(c.G,{title:b("title"),closePopup:e.closePopup,size:e.popupSize},i().createElement("div",null,i().createElement("img",{src:e.src,alt:e.alt,ref:l,className:"img img-fluid"})),i().createElement(d.u,null,i().createElement(d.u.Cancel,{onClick:e.closePopup}),i().createElement(d.u.Submit,{onClick:function(){if(n){var t=p.current.getCroppedCanvas().toDataURL(function(e){var t=e.match(C);if(t)return t[1]}(e.src));u(!0),e.onClickCrop(t,e.closePopup)}},text:b("crop"),variant:"dark",showSpinner:a})))}w.defaultProps={popupSize:"lg"};var y="shared.shared-utils",_=function(){return document.getElementById("dialog-region")},P={render:function(e,t){var n=_();function r(){var e;u.q.isFunction(null===(e=t.cancelButtonProps)||void 0===e?void 0:e.onClick)&&t.cancelButtonProps.onClick(),(0,a.unmountComponentAtNode)(n)}var o=Object.assign(Object.assign({},t.submitButtonProps?t.submitButtonProps:{}),{onClick:function(){var e;u.q.isFunction(null===(e=t.submitButtonProps)||void 0===e?void 0:e.onClick)&&t.submitButtonProps.onClick(),(0,a.unmountComponentAtNode)(n),r()}}),l=Object.assign(Object.assign({},t.cancelButtonProps?t.cancelButtonProps:{}),{onClick:function(){r()}});(0,a.render)(i().createElement(c.G,{title:t.title,closePopup:r,size:t.size,centered:t.centered,bodyClassName:"overflow-hidden",dialogClassName:t.dialogClassName},e,!t.hideButtons&&i().createElement(d.u,{className:t.buttonContainerClassName},t.cancelButtonProps&&i().createElement(d.u.Cancel,Object.assign({},l)),t.submitButtonProps&&i().createElement(d.u.Submit,Object.assign({},o)))),n)},renderCropper:function(e){var t=_();(0,a.render)(i().createElement(w,Object.assign({},e,{closePopup:function(){return(0,a.unmountComponentAtNode)(t)}})),t)},getDefaultSubmitButton:function(){return{variant:"dark",text:m.T.getPhrase(y,"confirm")}},getDefaultCancelButton:function(){return{variant:"light",text:m.T.getPhrase(y,"cancel")}}}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[1409],{71641:function(e,t,n){"use strict";n.d(t,{w:function(){return f}});var r=n(39479),o=n(31647),i=n(55142);function c(e){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},c(e)}function u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function s(e,t){return s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},s(e,t)}function l(e,t){if(t&&("object"===c(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function a(e){return a=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},a(e)}var f=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&s(e,t)}(p,e);var t,n,o,c,f=(o=p,c=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=a(o);if(c){var n=a(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return l(this,e)});function p(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,p),f.call(this,e)}return t=p,n=[{key:"name",get:function(){return"DropdownCollectionComponent"}},{key:"className",get:function(){return"dropdown-menu items-viewpart ".concat(this.getExtraClasses(this.options.displayOptions))}},{key:"attributes",get:function(){return{"aria-labelledby":"dropdownSelector"}}},{key:"initialize",value:function(){this.listenTo(this.options.channelName,"center:dropdown",this.centerSelectedItem)}},{key:"childView",get:function(){return i.N}},{key:"childViewOptions",get:function(){var e={channelName:this.options.channelName,analyticsHelper:this.options.analyticsHelper};return r.extend(e,this.options.childOptions)}},{key:"getExtraClasses",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.alignment,n=void 0===t?"left":t,r=e.extraClasses,o="dropdown-menu-".concat(n);return r&&(o="".concat(o," ").concat(r)),o}},{key:"centerSelectedItem",value:function(){var e=this.$el.find(".active");if(e.length){var t=this.$el.scrollTop()+e.position().top,n=.5*this.$el.height()+.5*e.height();this.$el.scrollTop(t-n)}}}],n&&u(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),p}(o.Q.ComponentCollection)},67670:function(e,t,n){"use strict";n.d(t,{v:function(){return p}});var r=n(31647),o=n(88172);function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function c(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function l(e,t){return l=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},l(e,t)}function a(e,t){if(t&&("object"===i(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function f(e){return f=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},f(e)}var p=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&l(e,t)}(d,e);var t,n,r,i,p=(r=d,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=f(r);if(i){var n=f(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return a(this,e)});function d(){return u(this,d),p.apply(this,arguments)}return t=d,(n=[{key:"defaults",value:function(){var e;return c(e={},o.ZV.Disabled,!0),c(e,o.ZV.Hidden,!1),e}}])&&s(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),d}(r.Q.Model)},31409:function(e,t,n){"use strict";n.r(t),n.d(t,{RestrictAccessView:function(){return be}});var r=n(39479),o=n(48088),i=n(31647),c=n(21679),u=n(57857),s=n(6681),l=n(56210),a=n(87262),f=n(25692),p=n(67670),d=n(10101),y=n(70065),h=n(52076),b=n(61843),g=n(13052),m=n(28099),v=n(9484),w=n(48404),O=n(17422),k=n(88172),S=n(71641),j=n(28492),C=n.n(j);function P(e){return P="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},P(e)}function R(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function T(e,t){return T=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},T(e,t)}function _(e,t){if(t&&("object"===P(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function I(e){return I=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},I(e)}var E=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&T(e,t)}(c,e);var t,n,r,o,i=(r=c,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=I(r);if(o){var n=I(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return _(this,e)});function c(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c),i.call(this,e)}return t=c,(n=[{key:"initialize",value:function(){var e=this.model?this.model.get("id"):"";b.yV.setSelected(e,this.collection),this.listenTo(this.options.channelName,this.options.eventName,this.onSelect)}},{key:"name",get:function(){return"DropdownComponent"}},{key:"template",get:function(){return C()}},{key:"className",get:function(){return this.options.buttonClass?"select-channel ".concat(this.options.buttonClass):"select-channel"}},{key:"regions",value:function(){return{dropdown:{el:".dropdown-menu-region",replaceElement:!0}}}},{key:"onSelect",value:function(e){b.yV.setSelected(e.get("id"),this.collection),this.render()}},{key:"viewOptions",value:function(){var e=b.yV.getSelected(this.collection);return Object.assign({selected:e&&e.get("name")},this.options)}},{key:"getIsOptionDisabledFn",value:function(){var e=b.yV.getSelected(this.collection),t=e&&e.id;return function(){return!!t&&(t=t.toString(),this.model.get("id").toString()===t)}}},{key:"renderChannelDropdown",value:function(){this.showChildView("dropdown",new S.w({collection:this.collection,channelName:this.options.channelName,childOptions:{titleProperty:this.options.titleProperty,isDisabled:this.getIsOptionDisabledFn(),eventName:this.options.eventName},displayOptions:this.options.displayOptions,analyticsHelper:this.options.analyticsHelper}))}},{key:"onRender",value:function(){this.renderChannelDropdown()}}])&&R(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),c}(i.Q.Component),V={select:"iQmg0",selectButton:"T67RV",svgContainer:"bNfyr",groupButton:"YOe2E",groupButtons:"q45Xi",groupButtonSelected:"FU9Dm",buttonDisabled:"UTSW5",mediumWeight:"CexaV"},N=n(26033),x=n.n(N);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 D(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function B(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function G(e,t,n){return t&&B(e.prototype,t),n&&B(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function M(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&U(e,t)}function U(e,t){return U=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},U(e,t)}function F(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Q(e);if(t){var o=Q(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Y(this,n)}}function Y(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)}function Q(e){return Q=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Q(e)}var L=function(e){M(n,e);var t=F(n);function n(){return D(this,n),t.apply(this,arguments)}return G(n,[{key:"name",get:function(){return"RestrictAccessYearGroupItemView"}},{key:"className",get:function(){var e="btn text-center p-0 pb-1 pt-1 ".concat(V.groupButton);return this.model.get("selected")&&(e+=" ".concat(V.groupButtonSelected)),e}},{key:"tagName",get:function(){return"button"}},{key:"attributes",get:function(){var e=100/this.model.collection.length;return{type:"button",style:"width: ".concat(e,"%")}}},{key:"template",get:function(){var e=this.model.get("year");return"<span>".concat(e,"</span>")}},{key:"events",value:function(){return{click:"onClick"}}},{key:"onClick",value:function(){o.Radio.channel(this.options.channelName).trigger("group:selected",this.model)}}]),n}(i.Q.Component),Z=function(e){M(n,e);var t=F(n);function n(){return D(this,n),t.apply(this,arguments)}return G(n,[{key:"initialize",value:function(){this.bindListeners()}},{key:"name",get:function(){return"RestrictAccessYearGroupComponentCollection"}},{key:"className",get:function(){return"btn-group w-100 ".concat(V.groupButtons)}},{key:"channelName",get:function(){return"".concat(this.name).concat(this.cid)}},{key:"childView",get:function(){return L}},{key:"childViewOptions",get:function(){return{channelName:this.channelName}}},{key:"bindListeners",value:function(){this.listenTo(this.channelName,"group:selected",this.onYearGroupSelected)}},{key:"onYearGroupSelected",value:function(e){this.collection.each((function(t){return t.set("selected",t.get("groupId")<=e.get("groupId"))})),this.model.set("groupId",e.get("groupId")),this.model.set("yearGroup",e.get("groupId")),this.render()}},{key:"onBeforeRender",value:function(){var e=this.model.get("yearGroup")||this.model.get("groupId");e&&(this.collection.each((function(t){return t.set("selected",t.get("groupId")<=e)})),this.model.set("groupId",e))}}]),n}(i.Q.CollectionView),H=function(e){M(n,e);var t=F(n);function n(){return D(this,n),t.apply(this,arguments)}return G(n,[{key:"initialize",value:function(){this.configDataService=c.u.getInstance(m.Or.Config,this)}},{key:"name",get:function(){return"RestrictAccessGroupComponent"}},{key:"lang",get:function(){return"shared.restrictAccess"}},{key:"props",get:function(){return["configDataService","currentUser"]}},{key:"template",get:function(){return x()}},{key:"bindings",get:function(){var e=this;return{"[name=year]":{observe:"groupId",onGet:function(t){return e.buildGroupMessage(t)},updateMethod:"html",escape:!1}}}},{key:"regions",value:function(){return{yearGroupList:{replaceElement:!0,el:".year-group-region"}}}},{key:"requiredResources",get:function(){return{currentUser:v.K.currentUser}}},{key:"viewOptions",value:function(){return{styles:V}}},{key:"onBeforeRender",value:function(){var e=this;this.yearGroups||this.getYearGroups(),r.some(this.yearGroups,(function(t){return t.groupId===e.model.get("groupId")}))||this.model.set("groupId",void 0)}},{key:"onRender",value:function(){this.stickit(),this.showChildView("yearGroupList",new Z({model:this.model,collection:new i.Q.Collection(this.yearGroups)}))}},{key:"onBeforeDestroy",value:function(){this.unstickit()}},{key:"getYearGroups",value:function(){var e=this,t=this.configDataService.getCustomerYearGroups(this.currentUser.get("countryCode"));this.yearGroups=[],r.keys(O.lA).forEach((function(n){var o=parseInt(n,10);if(!r.isNaN(o)&&r.contains(t,o)){var i=o===O.lA.Kindergarten?"K":O.lA[o].replace("Year","Y");e.yearGroups.push({year:i,groupId:o})}}))}},{key:"buildGroupMessage",value:function(e){if(e){var t=b.S9.mapYearGroupToName(e);return u.T.getPhrase(this.lang,"selectedYearGroups",{classNames:V.mediumWeight,groupName:t})}return u.T.getPhrase(this.lang,"selectYearGroups")}}]),n}(i.Q.Component);function z(e){return z="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},z(e)}function K(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function q(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function W(e,t){return W=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},W(e,t)}function $(e,t){if(t&&("object"===z(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function J(e){return J=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},J(e)}var X=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&W(e,t)}(c,e);var t,n,r,o,i=(r=c,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=J(r);if(o){var n=J(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return $(this,e)});function c(){return K(this,c),i.apply(this,arguments)}return t=c,(n=[{key:"name",get:function(){return"RestrictAccessComponent"}},{key:"template",get:function(){return"<p>".concat(this.getTemplateText(),"</p>")}},{key:"lang",get:function(){return"shared.restrictAccess"}},{key:"getTemplateText",value:function(){return u.T.getPhrase(this.lang,"groupNoAccess",{groupName:b.S9.mapYearGroupToName(this.model.get("groupId"))})}}])&&q(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),c}(i.Q.Component);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 te(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ne(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function re(e,t){return re=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},re(e,t)}function oe(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)}function ie(e){return ie=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ie(e)}var ce,ue=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&re(e,t)}(c,e);var t,n,r,o,i=(r=c,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=ie(r);if(o){var n=ie(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return oe(this,e)});function c(){return te(this,c),i.apply(this,arguments)}return t=c,(n=[{key:"name",get:function(){return"RestrictAccessNoneComponent"}},{key:"template",get:function(){return"<p>".concat(this.getTemplateText(),"</p>")}},{key:"lang",get:function(){return"shared.restrictAccess"}},{key:"getTemplateText",value:function(){return u.T.getPhrase(this.lang,"noGroupSelected")}}])&&ne(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),c}(i.Q.Component),se=n(59047),le=n.n(se),ae=n(264);function fe(e){return fe="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},fe(e)}function pe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function de(e,t){return de=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},de(e,t)}function ye(e,t){if(t&&("object"===fe(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function he(e){return he=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},he(e)}!function(e){e.None="Select a group...",e.Students="Students",e.Groups="Certain year groups",e.All="Students and staff"}(ce||(ce={}));var be=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&de(e,t)}(P,e);var t,n,S,j,C=(S=P,j=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=he(S);if(j){var n=he(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return ye(this,e)});function P(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,P),C.call(this,e)}return t=P,(n=[{key:"initialize",value:function(){this.restriction=new g.g({groupId:O.lA.Students}),this.selected=ce.None,this.bindListeners(),this.videoDataService=c.u.getInstance(m.Or.Video,this),this.restrictedVideoDataService=c.u.getInstance(m.Or.RestrictedVideo,this),this.videoMixinService=c.u.getInstance(m.K9.VideoMixin,this)}},{key:"bindListeners",value:function(){this.listenTo(this.channelName,"dropdown:selected",this.onOptionSelected),this.listenTo(this.restriction,"change:groupId",this.onGroupChanged),this.listenTo(m.Vk.VIDEO,"".concat(m.M_.VIDEOS,":").concat(this.options.videoId,":sync"),this.render),this.listenTo(m.Vk.RESTRICTED_VIDEO,"".concat(m.M_.RESTRICTED_OBJECTS,":").concat(this.options.videoId,":sync"),this.render)}},{key:"name",get:function(){return"RestrictAccessView"}},{key:"title",get:function(){return u.T.getPhrase(this.lang,"title")}},{key:"lang",get:function(){return"shared.restrictAccess"}},{key:"tagName",get:function(){return"form"}},{key:"className",get:function(){return"form-group"}},{key:"channelName",get:function(){return b.N0.generateUniqueChannelName(this)}},{key:"template",get:function(){return le()}},{key:"behaviors",get:function(){var e=this;return[{behaviorClass:d.Yw,title:u.T.getPhrase(this.lang,"popupHeading"),modalClasses:V.modal,hideCloseButton:!0,size:"modal-md",spinnerButtonOptions:{channelName:this.channelName,model:this.spinnerModel=new p.v,buttonText:u.T.getPhrase(this.lang,"updateAccess"),tooltip:function(){return e.getSubmitBtnTooltipOptions()},onClick:function(t){return e.onSubmit(t)}},buttons:[{text:u.T.getPhrase(this.lang,"allowFullAccess"),getClassName:function(){return e.getAllowFullAccessBtnClassName()}}]},{behaviorClass:l.H,selector:".".concat(V.svgContainer),title:u.T.getPhrase(this.lang,"findOutMore")}]}},{key:"elements",get:function(){return{submit:"submit"}}},{key:"events",value:function(){return{submit:"onSubmit","click .allow-full-access":"onAllowFullAccess"}}},{key:"regions",value:function(){return{dropdown:".dropdown-region",accessView:{replaceElement:!0,el:".access-view-region"}}}},{key:"getAllowFullAccessBtnClassName",value:function(){var e="btn btn-link cursor-pointer mr-2 allow-full-access";return this.dataFetched()&&!this.spinnerModel.get(k.ZV.ShowSpinner)||(e+=" disabled"),e}},{key:"getSubmitBtnTooltipOptions",value:function(){if(this.dataFetched()&&this.spinnerModel.get(k.ZV.Disabled))return{title:u.T.getPhrase(this.lang,"selectYear")}}},{key:"onOptionSelected",value:function(e){this.refreshRestriction();var t=this.getAccessView(e.get("name"));this.spinnerModel.set(k.ZV.Disabled,e.get("name")===ce.None),this.showChildView("accessView",new t({model:this.restriction,currentUser:this.currentUser})),this.renderDropdown()}},{key:"onGroupChanged",value:function(e){this.isRendered()&&this.spinnerModel.set(k.ZV.Disabled,r.isUndefined(e.get("groupId")))}},{key:"getAccessView",value:function(e){switch(this.selected=e,e){case ce.None:return ue;case ce.Students:return this.restriction.set("groupId",O.lA.Students),X;case ce.Groups:return H;case ce.All:return this.restriction.set("groupId",O.lA.All),X}}},{key:"getSelection",value:function(e){switch(e){case O.lA.All:case O.lA.Staff:return ce.All;case O.lA.Students:return ce.Students;default:return ce.Groups}}},{key:"refreshRestriction",value:function(){if(this.restrictedObjectCollection&&this.restrictedObjectCollection.length&&this.model){this.videoMixinService.mixinVideoRestriction(this.model,this.restrictedObjectCollection);var e=this.model.restrictions.last();e&&r.isNumber(e.get("groupId"))&&(this.restriction.set("groupId",e.get("groupId")),this.selected=this.getSelection(e.get("groupId")))}}},{key:"onSubmit",value:function(e){var t=this;if(e&&e.preventDefault(),r.isUndefined(this.restriction.get("groupId")))return!1;o.Radio.channel(this.channelName).trigger(k.I3.ShowSpinner),this.restrictedVideoDataService.updateVideoRestriction(this.options.videoId,this.restriction.get("groupId"),this.currentUser.get("customerId"),this.currentUser.get("id"),(function(){t.triggerMethod("hide"),o.Radio.channel(m.Vk.RESTRICTED_VIDEO).trigger("cache:cleared")})),this.logAction(this.restriction.get("groupId"))}},{key:"onAllowFullAccess",value:function(){this.dataFetched()&&!this.spinnerModel.get(k.ZV.ShowSpinner)&&(this.spinnerModel.set(k.ZV.Disabled,!0),this.restriction.set("groupId",O.lA.All),this.restrictedVideoDataService.deleteVideoRestriction(this.options.videoId,(function(){o.Radio.channel(m.Vk.RESTRICTED_VIDEO).trigger("cache:cleared")})),this.triggerMethod("hide"),this.logAction())}},{key:"logAction",value:function(e){var t={location:y.LocationContext.Popup,actionType:y.UserAction.SetAccess,entity:y.EntityType.Video,workflowPhase:y.WorkflowPhase.Complete},n={id:this.model.get("id"),restriction:!!r.isNumber(e)&&O.lA[e]};h.k.logUserAction(n,t)}},{key:"dataFetched",value:function(){return!!this.model&&!!this.restrictedObjectCollection}},{key:"renderDropdown",value:function(){var e=this;this.collection=new i.Q.Collection([{name:ce.None},{name:ce.Students},{name:ce.Groups},{name:ce.All}]),this.collection.each((function(t){return t.set("selected",t.get("name")===e.selected)})),this.showChildView("dropdown",new E({titleProperty:"name",eventName:"dropdown:selected",buttonId:"select-btn",collection:this.collection,channelName:this.channelName,buttonClass:V.selectButton,displayOptions:{extraClasses:"w-100"},analyticsHelper:h.k}))}},{key:"requiredResources",get:function(){return{config:w.p.config,currentUser:v.K.currentUser}}},{key:"onBeforeRender",value:function(){this.model=this.videoDataService.getVideo(this.options.videoId),this.restrictedObjectCollection=this.restrictedVideoDataService.getVideoRestrictions([this.options.videoId]),this.model&&this.restrictedObjectCollection&&this.refreshRestriction(),this.dataFetched()&&this.spinnerModel.set(k.ZV.Disabled,!1)}},{key:"viewOptions",value:function(){var e,t;return{styles:V,supportUrl:!ae.g.hasLite&&a.o.getArticle(null===(e=this.config)||void 0===e?void 0:e.get("supportSiteUrl"),f.w.VideoAccess,null===(t=this.currentUser)||void 0===t?void 0:t.get("countryCode")),svg:s.Nj.getSvg(s.vn.Info),dataFetched:this.dataFetched(),spinnerEl:b.Kp.getSpinner({size:b.Ey.Large,extraClasses:"mx-auto"}),restrictFromLabel:u.T.getPhrase(this.lang,"popupSubheading")}}},{key:"onRender",value:function(){this.dataFetched()&&(this.renderDropdown(),this.onOptionSelected(new i.Q.Model({name:this.selected})))}}])&&pe(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),P}(i.Q.View)},28492:function(e,t,n){var r=n(32227);e.exports=(r.default||r).template({1:function(e,t,n,r,o){e.propertyIsEnumerable;var i,c=e.lambda,u=e.escapeExpression;return'<label for="'+u(c(null!=(i=null!=t?t.options:t)?i.buttonId:i,t))+'" class="control-label">'+u(c(null!=(i=null!=t?t.options:t)?i.labelText:i,t))+"</label>\r\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){e.propertyIsEnumerable;var i,c=e.lambda,u=e.escapeExpression;return(null!=(i=n.if.call(null!=t?t:e.nullContext||{},null!=(i=null!=t?t.options:t)?i.labelText:i,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o}))?i:"")+'<button class="dropdown-toggle form-control btn-block text-left '+u(c(null!=(i=null!=t?t.options:t)?i.buttonClass:i,t))+'" type="button" id="'+u(c(null!=(i=null!=t?t.options:t)?i.buttonId:i,t))+'" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">\r\n '+u(c(null!=(i=null!=t?t.options:t)?i.selected:i,t))+'\r\n</button>\r\n<div class="dropdown-menu-region"></div>'},useData:!0})},59047:function(e,t,n){var r=n(32227);e.exports=(r.default||r).template({1:function(e,t,n,r,o){var i;return e.propertyIsEnumerable,(null!=(i=e.lambda(null!=(i=null!=t?t.options:t)?i.spinnerEl:i,t))?i:"")+"\r\n"},3:function(e,t,n,r,o){e.propertyIsEnumerable;var i,c=e.lambda,u=e.escapeExpression;return'<div class="d-flex align-items-center">\r\n<label class="control-label m-0 pb-2">'+u(c(null!=(i=null!=t?t.options:t)?i.restrictFromLabel:i,t))+"</label>\r\n"+(null!=(i=n.if.call(null!=t?t:e.nullContext||{},null!=(i=null!=t?t.options:t)?i.supportUrl:i,{name:"if",hash:{},fn:e.program(4,o,0),inverse:e.noop,data:o}))?i:"")+'</div>\r\n<div class="dropdown-region '+u(c(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.select:i,t))+' mb-3"></div>\r\n<div class="access-view-region"></div>\r\n'},4:function(e,t,n,r,o){e.propertyIsEnumerable;var i,c=e.lambda,u=e.escapeExpression;return'<a \r\n class="d-inline-block ml-1 mb-3 '+u(c(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.svgContainer:i,t))+'"\r\n title="'+u((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"findOutMore",{name:"lang",hash:{},data:o}))+'"\r\n href="'+u(c(null!=(i=null!=t?t.options:t)?i.supportUrl:i,t))+'" \r\n target="_blank"\r\n>\r\n '+(null!=(i=c(null!=(i=null!=t?t.options:t)?i.svg:i,t))?i:"")+"\r\n</a>\r\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var i;return e.propertyIsEnumerable,null!=(i=n.unless.call(null!=t?t:e.nullContext||{},null!=(i=null!=t?t.options:t)?i.dataFetched:i,{name:"unless",hash:{},fn:e.program(1,o,0),inverse:e.program(3,o,0),data:o}))?i:""},useData:!0})},26033:function(e,t,n){var r=n(32227);e.exports=(r.default||r).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){return'<div class="year-group-region"></div>\r\n<div name="year" class="mt-3"></div>'},useData:!0})}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[8343],{96417:function(e,t,n){"use strict";n.d(t,{s:function(){return o},p:function(){return s}});var r=n(57857),i="staffRequests.utils",o={destinationLibrary:function(e){if(!e||!e.id)return r.T.getPhrase(i,"selectLibrary")},destinationFolder:function(e){if(!e||!e.id)return r.T.getPhrase(i,"selectFolder")}},s={message:[{required:!0,msg:function(){return r.T.getPhrase("staffRequests.utils","provideMessage")}}]}},17126:function(e,t,n){"use strict";n.r(t),n.d(t,{StaffRequestsView:function(){return ve}});var r=n(48088),i=n(21679),o=n(57857),s=n(31647),l=n(50028),a=n(51632),c=n(29536),u=n(56371),f=n(30305),d=n(48404),p=n(9484),h=n(17422),y=n(43097),m=n(33192),g=n(23478),v=n.n(g);function b(e){return b="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},b(e)}function S(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function w(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function R(e,t,n){return t&&w(e.prototype,t),n&&w(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function k(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&&q(e,t)}function q(e,t){return q=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},q(e,t)}function E(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=O(e);if(t){var i=O(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return C(this,n)}}function C(e,t){if(t&&("object"===b(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function O(e){return O=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},O(e)}var T=function(e){k(n,e);var t=E(n);function n(e){return S(this,n),t.call(this,e)}return R(n,[{key:"name",get:function(){return"StaffRequestItemComponent"}},{key:"template",get:function(){return v()}},{key:"lang",get:function(){return"staffRequests.staffRequestItem"}},{key:"className",get:function(){var e="p-3 border-bottom cursor-pointer ".concat("bhDh_");return this.isSelected()&&(e+=" ".concat("Mwkkb")),e}},{key:"events",value:function(){return{click:"onClick"}}},{key:"isSelected",value:function(){return this.options.selectedRequestId&&this.model.get("id").toString()===this.options.selectedRequestId.toString()}},{key:"onClick",value:function(){s.Q.AppLinkHelper.trigger({application:f.OV.STAFF_REQUESTS,action:f.eX.StaffRequests.EDIT_REQUEST,args:[this.model.get("id")]})}},{key:"viewOptions",value:function(){return{dateRequested:m.parseZone(this.model.get("dateCreated")).local().fromNow(),isSelected:this.isSelected(),firstName:this.model.user.get("name"),lastName:this.model.user.get("surname")}}}]),n}(s.Q.Component),L=function(e){k(n,e);var t=E(n);function n(e){return S(this,n),t.call(this,e)}return R(n,[{key:"name",get:function(){return"StaffRequestListComponent"}},{key:"className",get:function(){return"zc6Jm"}},{key:"childView",get:function(){return T}},{key:"childViewOptions",get:function(){return{selectedRequestId:this.options.selectedRequestId,currentUser:this.options.currentUser}}}]),n}(s.Q.ComponentCollection),_=n(61843),P=n(70065),F=n(88483),I=n(63122),j=n(39775),N=n(70042),U=n(99249),A=n(52076),M=n(22557),D=n(60103),V=n(20072),x=n(36935),Q=n(96417),B=n(79665),H={actions:"fONDA",source:"jgNKp",button:"YExjW"},X=n(93566),K=n.n(X);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 z(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function W(e,t){return W=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},W(e,t)}function Y(e,t){if(t&&("object"===J(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Z(e){return Z=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Z(e)}var G=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&W(e,t)}(a,e);var t,n,i,o,l=(i=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Z(i);if(o){var n=Z(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return Y(this,e)});function a(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),l.call(this,e)}return t=a,(n=[{key:"initialize",value:function(){this.bindListeners(),this.getViewModel();var e=this.viewModel.destinationLibrary&&this.viewModel.destinationLibrary.get("id"),t=e&&this.collection.get(e);this.folderCollection=t?t.children:new D.I,M.P.setSelected(this.folderTreeKey,this.viewModel.destinationFolder,this.folderCollection)}},{key:"name",get:function(){return"StaffRequestActionsComponent"}},{key:"template",get:function(){return K()}},{key:"lang",get:function(){return"staffRequests.staffRequestActions"}},{key:"folderTreeKey",get:function(){return"staff:requests:folder:select"}},{key:"className",get:function(){return"p-3 border-bottom ".concat(H.actions)}},{key:"channelName",get:function(){return"".concat(this.name).concat(this.cid)}},{key:"viewModelName",get:function(){return"".concat(this.name,":").concat(this.model.get("id"))}},{key:"regions",value:function(){return{librarySelect:{el:".library-select-region",replaceElement:!0},folderSelect:{el:".folder-select-region",replaceElement:!0}}}},{key:"events",value:function(){return{"click .approve":"onClickApprove","click .reject":"onClickReject"}}},{key:"bindListeners",value:function(){var e=this;this.listenTo(this.channelName,"library:selected",this.onLibrarySelected),this.listenTo(this.channelName,"folder:selected",this.onFolderSelected),this.listenTo(this.channelName,"create:folder:clicked",this.onClickCreateFolder),this.listenTo(this.options.staffRequestsChannel,"select:folder",(function(t){e.onFolderSelected(t),e.render()}))}},{key:"getViewModel",value:function(){var e={},t=this.collection.get(this.model.destinationLibrary);t&&(e.destinationLibrary=t.toJSON());var n=M.P.getModelFromCollection(this.model.destinationFolder.get("id"),this.collection);n&&(e.destinationFolder=n.toJSON()),this.viewModel=U.r.get(this.viewModelName,e,{ctor:x.U}),this.viewModel.addValidation(Q.s);var r=this.viewModel.get("destinationFolder");r&&(r.collection=n.collection)}},{key:"onLibrarySelected",value:function(e){this.viewModel.set("destinationLibrary",e.toJSON()),this.viewModel.unset("destinationFolder"),this.viewModel.set("destinationFolder",{}),M.P.deselectAll(this.folderTreeKey,this.folderCollection),this.folderCollection=e.get("children"),this.renderFolderSelect()}},{key:"onFolderSelected",value:function(e){this.viewModel.set("destinationFolder",e.toJSON()),this.viewModel.get("destinationFolder").collection=e.collection,M.P.setSelected(this.folderTreeKey,e,this.folderCollection)}},{key:"onClickApprove",value:function(){var e=this.model.get("id"),t=this.viewModel.destinationLibrary.get("id"),n=this.viewModel.destinationFolder.get("id");e&&t&&n&&(s.Q.AppLinkHelper.trigger({application:f.OV.STAFF_REQUESTS,action:f.eX.StaffRequests.APPROVE_REQUEST,args:[e,t,n]}),this.logStaffRequestAction(P.UserAction.Approve))}},{key:"onClickReject",value:function(){s.Q.AppLinkHelper.trigger({application:f.OV.STAFF_REQUESTS,action:f.eX.StaffRequests.REJECT_REQUEST,args:[this.model.get("id")]}),this.logStaffRequestAction(P.UserAction.Reject)}},{key:"onClickCreateFolder",value:function(){s.Q.AppLinkHelper.trigger({application:f.OV.STAFF_REQUESTS,action:f.eX.Shared.NEW_FOLDER,args:[this.viewModel.destinationLibrary.get("id")]}),this.logCreateFolderAction()}},{key:"logStaffRequestAction",value:function(e){var t={location:P.LocationContext.StaffRequestDetails,actionType:e,entity:P.EntityType.StaffRequest,workflowPhase:P.WorkflowPhase.Start},n={id:this.model.get("id"),videoId:this.model.get("video")&&this.model.get("video").get("id"),requestingUserId:this.model.get("user")&&this.model.get("user").get("id"),sourceLibraryId:this.model.get("sourceLibrary")&&this.model.get("sourceLibrary").get("id"),sourceFolderId:this.model.get("sourceFolder")&&this.model.get("sourceFolder").get("id"),destinationLibraryId:this.viewModel.destinationLibrary.get("id"),destinationFolderId:this.viewModel.destinationFolder.get("id")};A.k.logUserAction(n,t)}},{key:"logCreateFolderAction",value:function(){var e={location:P.LocationContext.StaffRequestDetails,actionType:P.UserAction.Create,entity:P.EntityType.Folder,workflowPhase:P.WorkflowPhase.Start},t={libraryId:this.viewModel.destinationLibrary.get("id")};A.k.logUserAction(t,e)}},{key:"renderLibrarySelect",value:function(){this.collection.length<2||this.showChildView("librarySelect",new B.A({collection:this.collection,channelName:this.channelName,currentLibraryId:this.viewModel.destinationLibrary&&this.viewModel.destinationLibrary.get("id"),inputName:"destinationLibrary",placeholderText:this.viewModel.destinationLibrary&&this.viewModel.destinationLibrary.get("name"),disabledLibraryIds:this.options.disabledLibraryIds}))}},{key:"renderFolderSelect",value:function(){this.showChildView("folderSelect",new V.Y({collection:this.folderCollection,channelName:this.channelName,folderTreeKey:this.folderTreeKey,canCreateNew:!0}))}},{key:"viewOptions",value:function(){return{styles:H,sourceLibraryName:N.u.mapSourceToDisplayName(this.model.sourceLibrary),sourceClass:"".concat(H.source," ").concat(N.u.mapSourceToClass(this.model.sourceLibrary.get("type"))),showLibrarySelect:this.collection&&this.collection.length>1}}},{key:"onRender",value:function(){this.renderLibrarySelect(),this.renderFolderSelect(),r.Validation.bind(this,{model:this.viewModel})}}])&&z(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(s.Q.Component),$=n(30639),ee=n.n($),te={avatar:"X2btX",message:"O0vox",interactive:"u4gzP"},ne=n(8371);function re(e){return re="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},re(e)}function ie(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function oe(e,t){return oe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},oe(e,t)}function se(e,t){if(t&&("object"===re(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function le(e){return le=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},le(e)}var ae=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&oe(e,t)}(s,e);var t,n,r,i,o=(r=s,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=le(r);if(i){var n=le(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return se(this,e)});function s(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),o.call(this,e)}return t=s,(n=[{key:"name",get:function(){return"StaffRequestDetailsComponent"}},{key:"template",get:function(){return ee()}},{key:"lang",get:function(){return"staffRequests.staffRequestDetails"}},{key:"regions",value:function(){return{actions:{el:".request-action-region",replaceElement:!0},preview:{el:".video-preview-region",replaceElement:!1},info:{el:".video-info-region",replaceElement:!1}}}},{key:"getAvatarUrl",value:function(){var e=this.collection&&this.collection.first(),t=e&&e.user&&e.user.avatar;if(t&&t.get("url"))return t.get("url");var n="".concat(this.options.config.get("imageCdnUrl"),"/v1/profile-images?initials=").concat(this.getInitials());return _.jw.createUrl(n,{size:F.h2.Small})}},{key:"getInitials",value:function(){var e=this.collection&&this.collection.first();if(e&&e.user){var t=e.user.get("name"),n=e.user.get("surname");return"".concat(t&&t.trim()[0]).concat(n&&n.trim()[0])}}},{key:"renderActions",value:function(){this.showChildView("actions",new G({model:this.model,collection:this.options.libraryCollection,disabledLibraryIds:this.options.disabledLibraryIds,staffRequestsChannel:this.options.channelName}))}},{key:"renderVideoPreview",value:function(){this.showChildView("preview",new j.c({model:this.model.video,webPlayerUrl:this.options.config.get("webPlayerUrl"),analyticsOptions:{location:P.LocationContext.VideoRequest},currentUser:this.options.currentUser}))}},{key:"renderVideoInfo",value:function(){this.showChildView("info",new I.S({model:this.model.video,config:this.options.config,externalSeriesLink:!0,hideBroadcastInfo:this.options.currentUser.get("instanceRegion")===ne.b.US}))}},{key:"viewOptions",value:function(){return{styles:te,avatarUrl:this.getAvatarUrl(),message:this.collection&&this.collection.length&&this.collection.first().toJSON(),interactive:N.u.isInteractive(this.model.video),firstName:this.model.user.get("name"),lastName:this.model.user.get("surname")}}},{key:"onRender",value:function(){this.renderActions(),this.renderVideoPreview(),this.renderVideoInfo()}}])&&ie(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),s}(s.Q.Component),ce=n(95061),ue=n(21811),fe=n.n(ue),de={requestList:"QuZ0B",requestDetails:"keZrR"};function pe(e){return pe="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},pe(e)}function he(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ye(e,t){return ye=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ye(e,t)}function me(e,t){if(t&&("object"===pe(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function ge(e){return ge=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ge(e)}var ve=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ye(e,t)}(b,e);var t,n,m,g,v=(m=b,g=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=ge(m);if(g){var n=ge(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return me(this,e)});function b(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,b),(t=v.call(this,e)).unavailableLibraryIds=[],t}return t=b,(n=[{key:"initialize",value:function(){this.staffRequestDataService=i.u.getInstance(f.Or.StaffRequests,this),this.videoDataService=i.u.getInstance(f.Or.Video,this),this.options.referrer===a.f.Notification&&this.staffRequestDataService.clearRequestCache(),this.bindListeners()}},{key:"name",get:function(){return"StaffRequestsView"}},{key:"lang",get:function(){return"staffRequests.staffRequests"}},{key:"title",get:function(){return o.T.getPhrase(this.lang,"title")}},{key:"template",get:function(){return fe()}},{key:"className",get:function(){return"bg-white rounded"}},{key:"channelName",get:function(){return"".concat(this.name).concat(this.cid)}},{key:"regions",value:function(){return{requestList:{el:".request-list-region",partialLoading:h.LP.StaffRequestList,replaceElement:!1},requestDetails:{el:".request-details-region",partialLoading:h.LP.StaffRequestDetails,replaceElement:!1},emptyState:{el:".empty-region",replaceElement:!0}}}},{key:"behaviors",get:function(){var e=this;return[{behaviorClass:u.o,collectionName:"staffRequestCollection",region:"emptyState",type:h.ub.StaffRequests,shouldRender:c.r.isCollectionEmpty.bind(null,this,"staffRequestCollection"),componentOptions:{description:function(){return e.getEmptyStateDescription()},emptyState:function(){return o.T.getPhrase(e.lang,"emptyStateHeading")}},emptyStateComponents:f.aW}]}},{key:"bindListeners",value:function(){if(this.listenTo(f.Vk.LIBRARY,"folder:created",this.onFolderCreated),this.options.requestId){this.listenTo(f.Vk.STAFF_REQUEST,"cache:cleared",this.render);var e="".concat(f.M_.STAFF_REQUEST_BY_ID,":").concat(this.options.requestId);this.listenTo(f.Vk.STAFF_REQUEST,"".concat(e,":sync"),this.render),this.listenTo(f.Vk.STAFF_REQUEST,"".concat(e,":error"),this.onError),this.listenTo(f.Vk.STAFF_REQUEST,"".concat(f.M_.STAFF_REQUESTS,":invalidate"),this.onUpdate);var t="".concat(f.M_.STAFF_REQUEST_MESSAGES,":").concat(this.options.requestId);this.listenTo(f.Vk.STAFF_REQUEST,"".concat(t,":sync"),this.render),this.listenTo(f.Vk.STAFF_REQUEST,"".concat(t,":error"),this.onError)}}},{key:"onUpdate",value:function(){this.staffRequestCollection=null,this.render()}},{key:"fetchData",value:function(){var e=this;if(this.staffRequestCollection||this.staffRequestDataService.getStaffRequests((function(t){e.staffRequestCollection=t,e.onRequestsSync()})),this.options.requestId&&(this.model=this.staffRequestDataService.getStaffRequest(this.options.requestId),this.staffRequestMessageCollection=this.staffRequestDataService.getMessages(this.options.requestId),this.libraryCollection&&this.libraryCollection.length>1&&this.model&&!this.unavailableLibraryIds.length)){var t=this.model.get("video");this.videoDataService.getLibraries(t.get("id"),(function(t){e.unavailableLibraryIds=t.map((function(e){return e.get("id")+""})),e.render()}))}}},{key:"onRequestsSync",value:function(){var e;this.options.requestId&&(e=this.staffRequestCollection.get(this.options.requestId)),!e&&this.staffRequestCollection.first()?(e=this.staffRequestCollection.first(),s.Q.AppLinkHelper.trigger({application:f.OV.STAFF_REQUESTS,action:f.eX.StaffRequests.EDIT_REQUEST,args:[e.id]},{replace:!0})):this.render()}},{key:"onError",value:function(){this.redirectToHome()}},{key:"onFolderCreated",value:function(e){r.Radio.channel(this.channelName).trigger("select:folder",e),this.render()}},{key:"redirectToHome",value:function(){s.Q.AppLinkHelper.trigger({application:f.OV.STAFF_REQUESTS,action:f.eX.StaffRequests.HOME})}},{key:"getEmptyStateDescription",value:function(){return this.libraryCollection?!this.libraryCollection.length||this.libraryCollection.every((function(e){return e.get("status")!==l.X.Published}))?o.T.getPhrase(this.lang,"emptyStateNoLibraries"):o.T.getPhrase(this.lang,"emptyStateDescription"):""}},{key:"renderRequestList",value:function(){this.staffRequestCollection?this.showChildView("requestList",new L({collection:this.staffRequestCollection,selectedRequestId:this.options.requestId,currentUser:this.currentUser})):this.renderPartialLoading("requestList")}},{key:"renderRequestDetails",value:function(){var e=!!this.libraryCollection,t=e&&!!this.model&&!!this.staffRequestMessageCollection;!this.options.requestId&&!e||this.options.requestId&&!t?this.renderPartialLoading("requestDetails"):this.options.requestId&&this.showChildView("requestDetails",new ae({model:this.model,collection:this.staffRequestMessageCollection,libraryCollection:this.libraryCollection,disabledLibraryIds:this.unavailableLibraryIds,config:this.config,channelName:this.channelName,currentUser:this.currentUser}))}},{key:"viewOptions",value:function(){return{styles:de}}},{key:"requiredResources",get:function(){return{config:d.p.config,libraryCollection:ce.T.libraries,currentUser:p.K.currentUser}}},{key:"onBeforeRender",value:function(){return this.fetchData(),!this.model||this.model.get("status")===y.C.Pending||(this.redirectToHome(),!1)}},{key:"onRender",value:function(){this.renderRequestList(),this.renderRequestDetails()}}])&&he(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),b}(s.Q.View)},93566:function(e,t,n){var r=n(32227);e.exports=(r.default||r).template({1:function(e,t,n,r,i){var o;return e.propertyIsEnumerable," <span>"+e.escapeExpression(e.lambda(null!=(o=null!=t?t.sourceFolder:t)?o.name:o,t))+"</span>\r\n"},3:function(e,t,n,r,i){return' <div class="form-group m-0 pb-2">\r\n <div class="library-select-region"></div>\r\n </div> \r\n'},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,i){e.propertyIsEnumerable;var o,s=null!=t?t:e.nullContext||{},l=e.hooks.helperMissing,a=e.escapeExpression,c=e.lambda;return'<div class="row align-items-center py-2">\r\n <div class="col-3"><strong>'+a((n.lang||t&&t.lang||l).call(s,"source",{name:"lang",hash:{},data:i}))+'</strong></div>\r\n <div class="col-5">\r\n <span class="badge p-1 mr-1 '+a(c(null!=(o=null!=t?t.options:t)?o.sourceClass:o,t))+'">'+a(c(null!=(o=null!=t?t.options:t)?o.sourceLibraryName:o,t))+"</span>\r\n"+(null!=(o=n.if.call(s,null!=(o=null!=t?t.sourceFolder:t)?o.name:o,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?o:"")+' </div>\r\n <div class="col-4 text-right">\r\n <button class="btn btn-dark mr-2 '+a(c(null!=(o=null!=(o=null!=t?t.options:t)?o.styles:o)?o.button:o,t))+' approve" type="button">'+a((n.lang||t&&t.lang||l).call(s,"approve",{name:"lang",hash:{},data:i}))+'</button>\r\n <button class="btn btn-outline-dark '+a(c(null!=(o=null!=(o=null!=t?t.options:t)?o.styles:o)?o.button:o,t))+' reject" type="button">'+a((n.lang||t&&t.lang||l).call(s,"reject",{name:"lang",hash:{},data:i}))+'</button>\r\n </div>\r\n</div>\r\n<div class="row align-items-center py-2">\r\n <div class="col-3"><strong>'+a((n.lang||t&&t.lang||l).call(s,"moveVideo",{name:"lang",hash:{},data:i}))+'</strong></div>\r\n <div class="col-5">\r\n'+(null!=(o=n.if.call(s,null!=(o=null!=t?t.options:t)?o.showLibrarySelect:o,{name:"if",hash:{},fn:e.program(3,i,0),inverse:e.noop,data:i}))?o:"")+' <div class="form-group m-0">\r\n <div class="folder-select-region"></div>\r\n </div> \r\n </div>\r\n</div>'},useData:!0})},30639:function(e,t,n){var r=n(32227);e.exports=(r.default||r).template({1:function(e,t,n,r,i){e.propertyIsEnumerable;var o,s=e.lambda,l=e.escapeExpression;return'<div class="border-bottom">\r\n <div class="d-inline-block mr-2 '+l(s(null!=(o=null!=(o=null!=t?t.options:t)?o.styles:o)?o.avatar:o,t))+'" style="background-image: url(\''+l(s(null!=(o=null!=t?t.options:t)?o.avatarUrl:o,t))+'\')">\r\n  \r\n </div>\r\n <div class="d-inline-block">\r\n <p>'+(null!=(o=(n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"requestNote",{name:"lang",hash:{lastName:null!=(o=null!=t?t.options:t)?o.lastName:o,firstName:null!=(o=null!=t?t.options:t)?o.firstName:o},data:i}))?o:"")+'</p>\r\n <p class="pl-2 '+l(s(null!=(o=null!=(o=null!=t?t.options:t)?o.styles:o)?o.message:o,t))+'">'+l(s(null!=(o=null!=(o=null!=t?t.options:t)?o.message:o)?o.message:o,t))+"</p>\r\n </div> \r\n</div>\r\n"},3:function(e,t,n,r,i){e.propertyIsEnumerable;var o,s=e.escapeExpression;return'<span class="badge p-1 '+s(e.lambda(null!=(o=null!=(o=null!=t?t.options:t)?o.styles:o)?o.interactive:o,t))+'">'+s((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"interactive",{name:"lang",hash:{},data:i}))+"</span>\r\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,i){e.propertyIsEnumerable;var o,s=null!=t?t:e.nullContext||{};return'<div class="request-action-region"></div>\r\n<div class="p-3">\r\n'+(null!=(o=n.if.call(s,null!=(o=null!=t?t.options:t)?o.message:o,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?o:"")+'<div class="video-preview-region responsize-img col-7 pt-3 pb-2 px-0">\r\n <img class="img-fluid cursor-pointer" src="'+e.escapeExpression(e.lambda(null!=(o=null!=(o=null!=t?t.video:t)?o.thumbnail:o)?o.url:o,t))+'"/>\r\n</div>\r\n'+(null!=(o=n.if.call(s,null!=(o=null!=t?t.options:t)?o.interactive:o,{name:"if",hash:{},fn:e.program(3,i,0),inverse:e.noop,data:i}))?o:"")+'<div class="video-info-region py-1"></div>\r\n</div>'},useData:!0})},23478:function(e,t,n){var r=n(32227);e.exports=(r.default||r).template({1:function(e,t,n,r,i){return" text-muted"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,i){e.propertyIsEnumerable;var o,s,l=e.lambda,a=e.escapeExpression,c=null!=t?t:e.nullContext||{},u=e.hooks.helperMissing;return'<h6 class="mb-1">'+a(l(null!=(o=null!=t?t.video:t)?o.name:o,t))+'</h6>\r\n<p class="m-0">'+a((n.lang||t&&t.lang||u).call(c,"request",{name:"lang",hash:{lastName:null!=(o=null!=t?t.options:t)?o.lastName:o,firstName:null!=(o=null!=t?t.options:t)?o.firstName:o},data:i}))+'</p>\r\n<time class="m-0'+(null!=(o=n.unless.call(c,null!=(o=null!=t?t.options:t)?o.isSelected:o,{name:"unless",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?o:"")+'" datetime='+a("function"==typeof(s=null!=(s=n.dateCreated||(null!=t?t.dateCreated:t))?s:u)?s.call(c,{name:"dateCreated",hash:{},data:i}):s)+">"+a(l(null!=(o=null!=t?t.options:t)?o.dateRequested:o,t))+"</time"},useData:!0})},21811:function(e,t,n){var r=n(32227);e.exports=(r.default||r).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,r,i){e.propertyIsEnumerable;var o,s=e.escapeExpression,l=e.lambda;return'<div class="border-bottom">\r\n <h1 class="h3 p-3 m-0">'+s((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"staffRequests",{name:"lang",hash:{},data:i}))+'</h1>\r\n</div>\r\n<div class="request-list-region border-right d-inline-block '+s(l(null!=(o=null!=(o=null!=t?t.options:t)?o.styles:o)?o.requestList:o,t))+'"></div><div class="request-details-region border-left d-inline-block '+s(l(null!=(o=null!=(o=null!=t?t.options:t)?o.styles:o)?o.requestDetails:o,t))+'"></div>\r\n<div class="empty-region"></div>'},useData:!0})}}]);
|
|
1
|
+
(self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[1521],{96417:function(e,t,n){"use strict";n.d(t,{s:function(){return o},p:function(){return s}});var r=n(57857),i="staffRequests.utils",o={destinationLibrary:function(e){if(!e||!e.id)return r.T.getPhrase(i,"selectLibrary")},destinationFolder:function(e){if(!e||!e.id)return r.T.getPhrase(i,"selectFolder")}},s={message:[{required:!0,msg:function(){return r.T.getPhrase("staffRequests.utils","provideMessage")}}]}},17126:function(e,t,n){"use strict";n.r(t),n.d(t,{StaffRequestsView:function(){return ve}});var r=n(48088),i=n(21679),o=n(57857),s=n(31647),l=n(50028),a=n(51632),c=n(29536),u=n(56371),f=n(28099),d=n(48404),p=n(9484),h=n(17422),y=n(43097),m=n(33192),g=n(23478),v=n.n(g);function b(e){return b="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},b(e)}function S(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function w(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function R(e,t,n){return t&&w(e.prototype,t),n&&w(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function k(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&&q(e,t)}function q(e,t){return q=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},q(e,t)}function E(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=O(e);if(t){var i=O(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return C(this,n)}}function C(e,t){if(t&&("object"===b(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function O(e){return O=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},O(e)}var T=function(e){k(n,e);var t=E(n);function n(e){return S(this,n),t.call(this,e)}return R(n,[{key:"name",get:function(){return"StaffRequestItemComponent"}},{key:"template",get:function(){return v()}},{key:"lang",get:function(){return"staffRequests.staffRequestItem"}},{key:"className",get:function(){var e="p-3 border-bottom cursor-pointer ".concat("bhDh_");return this.isSelected()&&(e+=" ".concat("Mwkkb")),e}},{key:"events",value:function(){return{click:"onClick"}}},{key:"isSelected",value:function(){return this.options.selectedRequestId&&this.model.get("id").toString()===this.options.selectedRequestId.toString()}},{key:"onClick",value:function(){s.Q.AppLinkHelper.trigger({application:f.OV.STAFF_REQUESTS,action:f.eX.StaffRequests.EDIT_REQUEST,args:[this.model.get("id")]})}},{key:"viewOptions",value:function(){return{dateRequested:m.parseZone(this.model.get("dateCreated")).local().fromNow(),isSelected:this.isSelected(),firstName:this.model.user.get("name"),lastName:this.model.user.get("surname")}}}]),n}(s.Q.Component),L=function(e){k(n,e);var t=E(n);function n(e){return S(this,n),t.call(this,e)}return R(n,[{key:"name",get:function(){return"StaffRequestListComponent"}},{key:"className",get:function(){return"zc6Jm"}},{key:"childView",get:function(){return T}},{key:"childViewOptions",get:function(){return{selectedRequestId:this.options.selectedRequestId,currentUser:this.options.currentUser}}}]),n}(s.Q.ComponentCollection),_=n(61843),P=n(70065),F=n(88483),I=n(63122),j=n(89545),N=n(70042),U=n(99249),A=n(52076),M=n(22557),D=n(60103),V=n(20072),x=n(36935),Q=n(96417),B=n(79665),H={actions:"fONDA",source:"jgNKp",button:"YExjW"},X=n(93566),K=n.n(X);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 z(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function W(e,t){return W=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},W(e,t)}function Y(e,t){if(t&&("object"===J(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Z(e){return Z=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Z(e)}var G=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&W(e,t)}(a,e);var t,n,i,o,l=(i=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Z(i);if(o){var n=Z(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return Y(this,e)});function a(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),l.call(this,e)}return t=a,(n=[{key:"initialize",value:function(){this.bindListeners(),this.getViewModel();var e=this.viewModel.destinationLibrary&&this.viewModel.destinationLibrary.get("id"),t=e&&this.collection.get(e);this.folderCollection=t?t.children:new D.I,M.P.setSelected(this.folderTreeKey,this.viewModel.destinationFolder,this.folderCollection)}},{key:"name",get:function(){return"StaffRequestActionsComponent"}},{key:"template",get:function(){return K()}},{key:"lang",get:function(){return"staffRequests.staffRequestActions"}},{key:"folderTreeKey",get:function(){return"staff:requests:folder:select"}},{key:"className",get:function(){return"p-3 border-bottom ".concat(H.actions)}},{key:"channelName",get:function(){return"".concat(this.name).concat(this.cid)}},{key:"viewModelName",get:function(){return"".concat(this.name,":").concat(this.model.get("id"))}},{key:"regions",value:function(){return{librarySelect:{el:".library-select-region",replaceElement:!0},folderSelect:{el:".folder-select-region",replaceElement:!0}}}},{key:"events",value:function(){return{"click .approve":"onClickApprove","click .reject":"onClickReject"}}},{key:"bindListeners",value:function(){var e=this;this.listenTo(this.channelName,"library:selected",this.onLibrarySelected),this.listenTo(this.channelName,"folder:selected",this.onFolderSelected),this.listenTo(this.channelName,"create:folder:clicked",this.onClickCreateFolder),this.listenTo(this.options.staffRequestsChannel,"select:folder",(function(t){e.onFolderSelected(t),e.render()}))}},{key:"getViewModel",value:function(){var e={},t=this.collection.get(this.model.destinationLibrary);t&&(e.destinationLibrary=t.toJSON());var n=M.P.getModelFromCollection(this.model.destinationFolder.get("id"),this.collection);n&&(e.destinationFolder=n.toJSON()),this.viewModel=U.r.get(this.viewModelName,e,{ctor:x.U}),this.viewModel.addValidation(Q.s);var r=this.viewModel.get("destinationFolder");r&&(r.collection=n.collection)}},{key:"onLibrarySelected",value:function(e){this.viewModel.set("destinationLibrary",e.toJSON()),this.viewModel.unset("destinationFolder"),this.viewModel.set("destinationFolder",{}),M.P.deselectAll(this.folderTreeKey,this.folderCollection),this.folderCollection=e.get("children"),this.renderFolderSelect()}},{key:"onFolderSelected",value:function(e){this.viewModel.set("destinationFolder",e.toJSON()),this.viewModel.get("destinationFolder").collection=e.collection,M.P.setSelected(this.folderTreeKey,e,this.folderCollection)}},{key:"onClickApprove",value:function(){var e=this.model.get("id"),t=this.viewModel.destinationLibrary.get("id"),n=this.viewModel.destinationFolder.get("id");e&&t&&n&&(s.Q.AppLinkHelper.trigger({application:f.OV.STAFF_REQUESTS,action:f.eX.StaffRequests.APPROVE_REQUEST,args:[e,t,n]}),this.logStaffRequestAction(P.UserAction.Approve))}},{key:"onClickReject",value:function(){s.Q.AppLinkHelper.trigger({application:f.OV.STAFF_REQUESTS,action:f.eX.StaffRequests.REJECT_REQUEST,args:[this.model.get("id")]}),this.logStaffRequestAction(P.UserAction.Reject)}},{key:"onClickCreateFolder",value:function(){s.Q.AppLinkHelper.trigger({application:f.OV.STAFF_REQUESTS,action:f.eX.Shared.NEW_FOLDER,args:[this.viewModel.destinationLibrary.get("id")]}),this.logCreateFolderAction()}},{key:"logStaffRequestAction",value:function(e){var t={location:P.LocationContext.StaffRequestDetails,actionType:e,entity:P.EntityType.StaffRequest,workflowPhase:P.WorkflowPhase.Start},n={id:this.model.get("id"),videoId:this.model.get("video")&&this.model.get("video").get("id"),requestingUserId:this.model.get("user")&&this.model.get("user").get("id"),sourceLibraryId:this.model.get("sourceLibrary")&&this.model.get("sourceLibrary").get("id"),sourceFolderId:this.model.get("sourceFolder")&&this.model.get("sourceFolder").get("id"),destinationLibraryId:this.viewModel.destinationLibrary.get("id"),destinationFolderId:this.viewModel.destinationFolder.get("id")};A.k.logUserAction(n,t)}},{key:"logCreateFolderAction",value:function(){var e={location:P.LocationContext.StaffRequestDetails,actionType:P.UserAction.Create,entity:P.EntityType.Folder,workflowPhase:P.WorkflowPhase.Start},t={libraryId:this.viewModel.destinationLibrary.get("id")};A.k.logUserAction(t,e)}},{key:"renderLibrarySelect",value:function(){this.collection.length<2||this.showChildView("librarySelect",new B.A({collection:this.collection,channelName:this.channelName,currentLibraryId:this.viewModel.destinationLibrary&&this.viewModel.destinationLibrary.get("id"),inputName:"destinationLibrary",placeholderText:this.viewModel.destinationLibrary&&this.viewModel.destinationLibrary.get("name"),disabledLibraryIds:this.options.disabledLibraryIds}))}},{key:"renderFolderSelect",value:function(){this.showChildView("folderSelect",new V.Y({collection:this.folderCollection,channelName:this.channelName,folderTreeKey:this.folderTreeKey,canCreateNew:!0}))}},{key:"viewOptions",value:function(){return{styles:H,sourceLibraryName:N.u.mapSourceToDisplayName(this.model.sourceLibrary),sourceClass:"".concat(H.source," ").concat(N.u.mapSourceToClass(this.model.sourceLibrary.get("type"))),showLibrarySelect:this.collection&&this.collection.length>1}}},{key:"onRender",value:function(){this.renderLibrarySelect(),this.renderFolderSelect(),r.Validation.bind(this,{model:this.viewModel})}}])&&z(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(s.Q.Component),$=n(30639),ee=n.n($),te={avatar:"X2btX",message:"O0vox",interactive:"u4gzP"},ne=n(8371);function re(e){return re="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},re(e)}function ie(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function oe(e,t){return oe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},oe(e,t)}function se(e,t){if(t&&("object"===re(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function le(e){return le=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},le(e)}var ae=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&oe(e,t)}(s,e);var t,n,r,i,o=(r=s,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=le(r);if(i){var n=le(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return se(this,e)});function s(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),o.call(this,e)}return t=s,(n=[{key:"name",get:function(){return"StaffRequestDetailsComponent"}},{key:"template",get:function(){return ee()}},{key:"lang",get:function(){return"staffRequests.staffRequestDetails"}},{key:"regions",value:function(){return{actions:{el:".request-action-region",replaceElement:!0},preview:{el:".video-preview-region",replaceElement:!1},info:{el:".video-info-region",replaceElement:!1}}}},{key:"getAvatarUrl",value:function(){var e=this.collection&&this.collection.first(),t=e&&e.user&&e.user.avatar;if(t&&t.get("url"))return t.get("url");var n="".concat(this.options.config.get("imageCdnUrl"),"/v1/profile-images?initials=").concat(this.getInitials());return _.jw.createUrl(n,{size:F.h2.Small})}},{key:"getInitials",value:function(){var e=this.collection&&this.collection.first();if(e&&e.user){var t=e.user.get("name"),n=e.user.get("surname");return"".concat(t&&t.trim()[0]).concat(n&&n.trim()[0])}}},{key:"renderActions",value:function(){this.showChildView("actions",new G({model:this.model,collection:this.options.libraryCollection,disabledLibraryIds:this.options.disabledLibraryIds,staffRequestsChannel:this.options.channelName}))}},{key:"renderVideoPreview",value:function(){this.showChildView("preview",new j.c({model:this.model.video,webPlayerUrl:this.options.config.get("webPlayerUrl"),analyticsOptions:{location:P.LocationContext.VideoRequest},currentUser:this.options.currentUser}))}},{key:"renderVideoInfo",value:function(){this.showChildView("info",new I.S({model:this.model.video,config:this.options.config,externalSeriesLink:!0,hideBroadcastInfo:this.options.currentUser.get("instanceRegion")===ne.b.US}))}},{key:"viewOptions",value:function(){return{styles:te,avatarUrl:this.getAvatarUrl(),message:this.collection&&this.collection.length&&this.collection.first().toJSON(),interactive:N.u.isInteractive(this.model.video),firstName:this.model.user.get("name"),lastName:this.model.user.get("surname")}}},{key:"onRender",value:function(){this.renderActions(),this.renderVideoPreview(),this.renderVideoInfo()}}])&&ie(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),s}(s.Q.Component),ce=n(95061),ue=n(21811),fe=n.n(ue),de={requestList:"QuZ0B",requestDetails:"keZrR"};function pe(e){return pe="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},pe(e)}function he(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ye(e,t){return ye=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ye(e,t)}function me(e,t){if(t&&("object"===pe(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function ge(e){return ge=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ge(e)}var ve=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ye(e,t)}(b,e);var t,n,m,g,v=(m=b,g=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=ge(m);if(g){var n=ge(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return me(this,e)});function b(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,b),(t=v.call(this,e)).unavailableLibraryIds=[],t}return t=b,(n=[{key:"initialize",value:function(){this.staffRequestDataService=i.u.getInstance(f.Or.StaffRequests,this),this.videoDataService=i.u.getInstance(f.Or.Video,this),this.options.referrer===a.f.Notification&&this.staffRequestDataService.clearRequestCache(),this.bindListeners()}},{key:"name",get:function(){return"StaffRequestsView"}},{key:"lang",get:function(){return"staffRequests.staffRequests"}},{key:"title",get:function(){return o.T.getPhrase(this.lang,"title")}},{key:"template",get:function(){return fe()}},{key:"className",get:function(){return"bg-white rounded"}},{key:"channelName",get:function(){return"".concat(this.name).concat(this.cid)}},{key:"regions",value:function(){return{requestList:{el:".request-list-region",partialLoading:h.LP.StaffRequestList,replaceElement:!1},requestDetails:{el:".request-details-region",partialLoading:h.LP.StaffRequestDetails,replaceElement:!1},emptyState:{el:".empty-region",replaceElement:!0}}}},{key:"behaviors",get:function(){var e=this;return[{behaviorClass:u.o,collectionName:"staffRequestCollection",region:"emptyState",type:h.ub.StaffRequests,shouldRender:c.r.isCollectionEmpty.bind(null,this,"staffRequestCollection"),componentOptions:{description:function(){return e.getEmptyStateDescription()},emptyState:function(){return o.T.getPhrase(e.lang,"emptyStateHeading")}},emptyStateComponents:f.aW}]}},{key:"bindListeners",value:function(){if(this.listenTo(f.Vk.LIBRARY,"folder:created",this.onFolderCreated),this.options.requestId){this.listenTo(f.Vk.STAFF_REQUEST,"cache:cleared",this.render);var e="".concat(f.M_.STAFF_REQUEST_BY_ID,":").concat(this.options.requestId);this.listenTo(f.Vk.STAFF_REQUEST,"".concat(e,":sync"),this.render),this.listenTo(f.Vk.STAFF_REQUEST,"".concat(e,":error"),this.onError),this.listenTo(f.Vk.STAFF_REQUEST,"".concat(f.M_.STAFF_REQUESTS,":invalidate"),this.onUpdate);var t="".concat(f.M_.STAFF_REQUEST_MESSAGES,":").concat(this.options.requestId);this.listenTo(f.Vk.STAFF_REQUEST,"".concat(t,":sync"),this.render),this.listenTo(f.Vk.STAFF_REQUEST,"".concat(t,":error"),this.onError)}}},{key:"onUpdate",value:function(){this.staffRequestCollection=null,this.render()}},{key:"fetchData",value:function(){var e=this;if(this.staffRequestCollection||this.staffRequestDataService.getStaffRequests((function(t){e.staffRequestCollection=t,e.onRequestsSync()})),this.options.requestId&&(this.model=this.staffRequestDataService.getStaffRequest(this.options.requestId),this.staffRequestMessageCollection=this.staffRequestDataService.getMessages(this.options.requestId),this.libraryCollection&&this.libraryCollection.length>1&&this.model&&!this.unavailableLibraryIds.length)){var t=this.model.get("video");this.videoDataService.getLibraries(t.get("id"),(function(t){e.unavailableLibraryIds=t.map((function(e){return e.get("id")+""})),e.render()}))}}},{key:"onRequestsSync",value:function(){var e;this.options.requestId&&(e=this.staffRequestCollection.get(this.options.requestId)),!e&&this.staffRequestCollection.first()?(e=this.staffRequestCollection.first(),s.Q.AppLinkHelper.trigger({application:f.OV.STAFF_REQUESTS,action:f.eX.StaffRequests.EDIT_REQUEST,args:[e.id]},{replace:!0})):this.render()}},{key:"onError",value:function(){this.redirectToHome()}},{key:"onFolderCreated",value:function(e){r.Radio.channel(this.channelName).trigger("select:folder",e),this.render()}},{key:"redirectToHome",value:function(){s.Q.AppLinkHelper.trigger({application:f.OV.STAFF_REQUESTS,action:f.eX.StaffRequests.HOME})}},{key:"getEmptyStateDescription",value:function(){return this.libraryCollection?!this.libraryCollection.length||this.libraryCollection.every((function(e){return e.get("status")!==l.X.Published}))?o.T.getPhrase(this.lang,"emptyStateNoLibraries"):o.T.getPhrase(this.lang,"emptyStateDescription"):""}},{key:"renderRequestList",value:function(){this.staffRequestCollection?this.showChildView("requestList",new L({collection:this.staffRequestCollection,selectedRequestId:this.options.requestId,currentUser:this.currentUser})):this.renderPartialLoading("requestList")}},{key:"renderRequestDetails",value:function(){var e=!!this.libraryCollection,t=e&&!!this.model&&!!this.staffRequestMessageCollection;!this.options.requestId&&!e||this.options.requestId&&!t?this.renderPartialLoading("requestDetails"):this.options.requestId&&this.showChildView("requestDetails",new ae({model:this.model,collection:this.staffRequestMessageCollection,libraryCollection:this.libraryCollection,disabledLibraryIds:this.unavailableLibraryIds,config:this.config,channelName:this.channelName,currentUser:this.currentUser}))}},{key:"viewOptions",value:function(){return{styles:de}}},{key:"requiredResources",get:function(){return{config:d.p.config,libraryCollection:ce.T.libraries,currentUser:p.K.currentUser}}},{key:"onBeforeRender",value:function(){return this.fetchData(),!this.model||this.model.get("status")===y.C.Pending||(this.redirectToHome(),!1)}},{key:"onRender",value:function(){this.renderRequestList(),this.renderRequestDetails()}}])&&he(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),b}(s.Q.View)},93566:function(e,t,n){var r=n(32227);e.exports=(r.default||r).template({1:function(e,t,n,r,i){var o;return e.propertyIsEnumerable," <span>"+e.escapeExpression(e.lambda(null!=(o=null!=t?t.sourceFolder:t)?o.name:o,t))+"</span>\r\n"},3:function(e,t,n,r,i){return' <div class="form-group m-0 pb-2">\r\n <div class="library-select-region"></div>\r\n </div> \r\n'},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,i){e.propertyIsEnumerable;var o,s=null!=t?t:e.nullContext||{},l=e.hooks.helperMissing,a=e.escapeExpression,c=e.lambda;return'<div class="row align-items-center py-2">\r\n <div class="col-3"><strong>'+a((n.lang||t&&t.lang||l).call(s,"source",{name:"lang",hash:{},data:i}))+'</strong></div>\r\n <div class="col-5">\r\n <span class="badge p-1 mr-1 '+a(c(null!=(o=null!=t?t.options:t)?o.sourceClass:o,t))+'">'+a(c(null!=(o=null!=t?t.options:t)?o.sourceLibraryName:o,t))+"</span>\r\n"+(null!=(o=n.if.call(s,null!=(o=null!=t?t.sourceFolder:t)?o.name:o,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?o:"")+' </div>\r\n <div class="col-4 text-right">\r\n <button class="btn btn-dark mr-2 '+a(c(null!=(o=null!=(o=null!=t?t.options:t)?o.styles:o)?o.button:o,t))+' approve" type="button">'+a((n.lang||t&&t.lang||l).call(s,"approve",{name:"lang",hash:{},data:i}))+'</button>\r\n <button class="btn btn-outline-dark '+a(c(null!=(o=null!=(o=null!=t?t.options:t)?o.styles:o)?o.button:o,t))+' reject" type="button">'+a((n.lang||t&&t.lang||l).call(s,"reject",{name:"lang",hash:{},data:i}))+'</button>\r\n </div>\r\n</div>\r\n<div class="row align-items-center py-2">\r\n <div class="col-3"><strong>'+a((n.lang||t&&t.lang||l).call(s,"moveVideo",{name:"lang",hash:{},data:i}))+'</strong></div>\r\n <div class="col-5">\r\n'+(null!=(o=n.if.call(s,null!=(o=null!=t?t.options:t)?o.showLibrarySelect:o,{name:"if",hash:{},fn:e.program(3,i,0),inverse:e.noop,data:i}))?o:"")+' <div class="form-group m-0">\r\n <div class="folder-select-region"></div>\r\n </div> \r\n </div>\r\n</div>'},useData:!0})},30639:function(e,t,n){var r=n(32227);e.exports=(r.default||r).template({1:function(e,t,n,r,i){e.propertyIsEnumerable;var o,s=e.lambda,l=e.escapeExpression;return'<div class="border-bottom">\r\n <div class="d-inline-block mr-2 '+l(s(null!=(o=null!=(o=null!=t?t.options:t)?o.styles:o)?o.avatar:o,t))+'" style="background-image: url(\''+l(s(null!=(o=null!=t?t.options:t)?o.avatarUrl:o,t))+'\')">\r\n  \r\n </div>\r\n <div class="d-inline-block">\r\n <p>'+(null!=(o=(n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"requestNote",{name:"lang",hash:{lastName:null!=(o=null!=t?t.options:t)?o.lastName:o,firstName:null!=(o=null!=t?t.options:t)?o.firstName:o},data:i}))?o:"")+'</p>\r\n <p class="pl-2 '+l(s(null!=(o=null!=(o=null!=t?t.options:t)?o.styles:o)?o.message:o,t))+'">'+l(s(null!=(o=null!=(o=null!=t?t.options:t)?o.message:o)?o.message:o,t))+"</p>\r\n </div> \r\n</div>\r\n"},3:function(e,t,n,r,i){e.propertyIsEnumerable;var o,s=e.escapeExpression;return'<span class="badge p-1 '+s(e.lambda(null!=(o=null!=(o=null!=t?t.options:t)?o.styles:o)?o.interactive:o,t))+'">'+s((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"interactive",{name:"lang",hash:{},data:i}))+"</span>\r\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,i){e.propertyIsEnumerable;var o,s=null!=t?t:e.nullContext||{};return'<div class="request-action-region"></div>\r\n<div class="p-3">\r\n'+(null!=(o=n.if.call(s,null!=(o=null!=t?t.options:t)?o.message:o,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?o:"")+'<div class="video-preview-region responsize-img col-7 pt-3 pb-2 px-0">\r\n <img class="img-fluid cursor-pointer" src="'+e.escapeExpression(e.lambda(null!=(o=null!=(o=null!=t?t.video:t)?o.thumbnail:o)?o.url:o,t))+'"/>\r\n</div>\r\n'+(null!=(o=n.if.call(s,null!=(o=null!=t?t.options:t)?o.interactive:o,{name:"if",hash:{},fn:e.program(3,i,0),inverse:e.noop,data:i}))?o:"")+'<div class="video-info-region py-1"></div>\r\n</div>'},useData:!0})},23478:function(e,t,n){var r=n(32227);e.exports=(r.default||r).template({1:function(e,t,n,r,i){return" text-muted"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,i){e.propertyIsEnumerable;var o,s,l=e.lambda,a=e.escapeExpression,c=null!=t?t:e.nullContext||{},u=e.hooks.helperMissing;return'<h6 class="mb-1">'+a(l(null!=(o=null!=t?t.video:t)?o.name:o,t))+'</h6>\r\n<p class="m-0">'+a((n.lang||t&&t.lang||u).call(c,"request",{name:"lang",hash:{lastName:null!=(o=null!=t?t.options:t)?o.lastName:o,firstName:null!=(o=null!=t?t.options:t)?o.firstName:o},data:i}))+'</p>\r\n<time class="m-0'+(null!=(o=n.unless.call(c,null!=(o=null!=t?t.options:t)?o.isSelected:o,{name:"unless",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?o:"")+'" datetime='+a("function"==typeof(s=null!=(s=n.dateCreated||(null!=t?t.dateCreated:t))?s:u)?s.call(c,{name:"dateCreated",hash:{},data:i}):s)+">"+a(l(null!=(o=null!=t?t.options:t)?o.dateRequested:o,t))+"</time"},useData:!0})},21811:function(e,t,n){var r=n(32227);e.exports=(r.default||r).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,r,i){e.propertyIsEnumerable;var o,s=e.escapeExpression,l=e.lambda;return'<div class="border-bottom">\r\n <h1 class="h3 p-3 m-0">'+s((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"staffRequests",{name:"lang",hash:{},data:i}))+'</h1>\r\n</div>\r\n<div class="request-list-region border-right d-inline-block '+s(l(null!=(o=null!=(o=null!=t?t.options:t)?o.styles:o)?o.requestList:o,t))+'"></div><div class="request-details-region border-left d-inline-block '+s(l(null!=(o=null!=(o=null!=t?t.options:t)?o.styles:o)?o.requestDetails:o,t))+'"></div>\r\n<div class="empty-region"></div>'},useData:!0})}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[1832],{21832:function(e,t,n){"use strict";n.r(t),n.d(t,{GeneratePdfView:function(){return _}});var r=n(48088),i=n(31647),o=n(21679),c=n(57857),a=n(70065),l=n(52076),s=n(77502),u=n(10101),f=n(88172),h=n(67670),p=n(9484),y=n(28099),d=n(61843),b=n(56906),v=n(44634),g=n.n(v),m={image:"Di3M6"};function O(e){return O="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},O(e)}function w(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function P(e,t){return P=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},P(e,t)}function E(e,t){if(t&&("object"===O(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function k(e){return k=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},k(e)}var _=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&P(e,t)}(T,e);var t,n,v,O,_=(v=T,O=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=k(v);if(O){var n=k(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return E(this,e)});function T(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,T),_.call(this,e)}return t=T,(n=[{key:"initialize",value:function(){this.collectionIdentifier=this.options.collectionIdentifier,this.libraryDataService=o.u.getInstance(y.Or.Library,this),this.videoDataService=o.u.getInstance(y.Or.Video,this),this.exportDataService=o.u.getInstance(y.Or.Export,this),this.bindListeners()}},{key:"name",get:function(){return"GeneratePdfView"}},{key:"title",get:function(){return c.T.getPhrase(this.lang,"title")}},{key:"lang",get:function(){return"libraryEditor.generatePdf"}},{key:"template",get:function(){return g()}},{key:"channelName",get:function(){return d.N0.generateUniqueChannelName(this)}},{key:"behaviors",get:function(){return[{behaviorClass:u.Yw,title:c.T.getPhrase(this.lang,"heading"),spinnerButtonOptions:{model:this.spinnerModel=new h.v,saveEvent:"generate:pdf",channelName:this.channelName,buttonText:c.T.getPhrase(this.lang,"generate"),extraButtonClass:"btn-dark",spinnerOptions:{size:d.Ey.Small,type:d.dR.Light,extraClasses:"mx-auto"}}}]}},{key:"bindListeners",value:function(){var e=this;this.listenTo(this.channelName,"generate:pdf",this.onClickGeneratePdf),this.listenTo(y.Vk.LIBRARY,"".concat(y.M_.FOLDER,":").concat(this.collectionIdentifier.id,":sync"),this.render),this.listenTo(y.Vk.VIDEO,"".concat(this.collectionIdentifier.toString(),":sync"),this.render),this.listenTo(y.Vk.EXPORT,"".concat(y.M_.GENERATE_COLLECTION_PDF,":").concat(this.collectionIdentifier.id,":sync"),(function(){return e.triggerMethod("hide")}))}},{key:"onClickGeneratePdf",value:function(){this.hasDataFetched()&&(r.Radio.channel(this.channelName).trigger(f.I3.ShowSpinner),this.exportDataService.generateCollectionPdf(this.library.id,this.collectionIdentifier.id,this.currentUser,this.collectionIdentifier.sort),this.logAction(this.collectionIdentifier.id,this.collectionIdentifier.sort))}},{key:"fetchData",value:function(){var e=this;this.videos=this.videoDataService.getCollectionVideos(this.collectionIdentifier),this.model=this.libraryDataService.getFolder(this.collectionIdentifier.id),this.library||this.libraryDataService.getLibraries((function(t){e.library=d.PU.getLibrary(e.collectionIdentifier.id,t),e.render()}))}},{key:"logAction",value:function(e,t){var n={location:a.LocationContext.Popup,actionType:a.UserAction.Create,entity:a.EntityType.PDF,workflowPhase:a.WorkflowPhase.Complete},r={id:e,sort:s.E[t]};l.k.logUserAction(r,n)}},{key:"hasDataFetched",value:function(){return!!this.model&&!!this.videos&&!!this.library}},{key:"requiredResources",get:function(){return{currentUser:p.K.currentUser}}},{key:"onBeforeRender",value:function(){var e=this;return this.fetchData(),!!this.hasDataFetched()&&(this.videos&&!this.videos.length?(window.setTimeout((function(){e.triggerMethod("hide"),i.Q.ErrorHelper.throw(new b.Xz(c.T.getPhrase(e.lang,"errorHeading")))}),y.pA.POPUP_FADE_TIMEOUT),!1):(this.hasDataFetched()&&this.spinnerModel.set(f.ZV.Disabled,!1),!0))}},{key:"viewOptions",value:function(){return{dataFetched:this.hasDataFetched(),spinnerEl:d.Kp.getSpinner({size:d.Ey.Large,extraClasses:"mx-auto"}),imageUrl:y.Wn.Shared.GENERATE_PDF,infoText:c.T.getPhrase(this.lang,"info",{name:this.model.get("name"),email:this.currentUser.get("email"),escapeText:!0}),styles:m}}}])&&w(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),T}(i.Q.View)},67670:function(e,t,n){"use strict";n.d(t,{v:function(){return h}});var r=n(31647),i=n(88172);function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}function c(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function s(e,t){return s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},s(e,t)}function u(e,t){if(t&&("object"===o(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function f(e){return f=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},f(e)}var h=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&s(e,t)}(p,e);var t,n,r,o,h=(r=p,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=f(r);if(o){var n=f(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return u(this,e)});function p(){return a(this,p),h.apply(this,arguments)}return t=p,(n=[{key:"defaults",value:function(){var e;return c(e={},i.ZV.Disabled,!0),c(e,i.ZV.Hidden,!1),e}}])&&l(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),p}(r.Q.Model)},44634:function(e,t,n){var r=n(32227);e.exports=(r.default||r).template({1:function(e,t,n,r,i){var o;return e.propertyIsEnumerable,(null!=(o=e.lambda(null!=(o=null!=t?t.options:t)?o.spinnerEl:o,t))?o:"")+"\r\n"},3:function(e,t,n,r,i){e.propertyIsEnumerable;var o,c=e.lambda,a=e.escapeExpression;return'<div class="pb-3 text-center">\r\n <img src="'+a(c(null!=(o=null!=t?t.options:t)?o.imageUrl:o,t))+'" class="'+a(c(null!=(o=null!=(o=null!=t?t.options:t)?o.styles:o)?o.image:o,t))+'" />\r\n</div>\r\n<p class="m-0">'+(null!=(o=c(null!=(o=null!=t?t.options:t)?o.infoText:o,t))?o:"")+"</p>\r\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,i){var o;return e.propertyIsEnumerable,null!=(o=n.unless.call(null!=t?t:e.nullContext||{},null!=(o=null!=t?t.options:t)?o.dataFetched:o,{name:"unless",hash:{},fn:e.program(1,i,0),inverse:e.program(3,i,0),data:i}))?o:""},useData:!0})}}]);
|