@clickview/library-editor 1.1.50-dev.1 → 1.1.50-rc.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (78) hide show
  1. package/dist/bundles.json +2 -2
  2. package/dist/en.json +1 -1
  3. package/dist/scripts/{0-5f0c2cd8fe.chunk.js → 0-39b4264c40.chunk.js} +1 -1
  4. package/dist/scripts/{1-7a35a849f0.chunk.js → 1-b4853334f7.chunk.js} +1 -1
  5. package/dist/scripts/{10-45d2a5ef25.chunk.js → 10-74b6a07baa.chunk.js} +1 -1
  6. package/dist/scripts/{11-74bc3f2d9f.chunk.js → 11-f9ca151e61.chunk.js} +1 -1
  7. package/dist/scripts/{12-f0c771aad1.chunk.js → 12-a961dabbb5.chunk.js} +1 -1
  8. package/dist/scripts/{13-d70fedb2e0.chunk.js → 13-31b759d4dc.chunk.js} +1 -1
  9. package/dist/scripts/{14-fafea6f32c.chunk.js → 14-28ab8d5025.chunk.js} +1 -1
  10. package/dist/scripts/{15-7aa65c016d.chunk.js → 15-e326770074.chunk.js} +1 -1
  11. package/dist/scripts/{16-56c022c016.chunk.js → 16-33bc415c72.chunk.js} +1 -1
  12. package/dist/scripts/{17-14a7b2aed1.chunk.js → 17-4d85362caa.chunk.js} +1 -1
  13. package/dist/scripts/{2-0c5fba8b60.chunk.js → 2-6334a56d75.chunk.js} +1 -1
  14. package/dist/scripts/{20-48346c1412.chunk.js → 20-09959dbb36.chunk.js} +1 -1
  15. package/dist/scripts/{21-f9ff3e0692.chunk.js → 21-d07eac93af.chunk.js} +1 -1
  16. package/dist/scripts/{22-82ad962fa7.chunk.js → 22-d5cba8a51b.chunk.js} +1 -1
  17. package/dist/scripts/{23-d534e3d903.chunk.js → 23-6f0c2ffe34.chunk.js} +1 -1
  18. package/dist/scripts/{24-264b454456.chunk.js → 24-28d1ee1ddb.chunk.js} +1 -1
  19. package/dist/scripts/{25-e1743bb45d.chunk.js → 25-3b12323e76.chunk.js} +1 -1
  20. package/dist/scripts/{26-0d7e56893b.chunk.js → 26-41d73fb1cc.chunk.js} +1 -1
  21. package/dist/scripts/{27-4ddeaff155.chunk.js → 27-9faadbc5ad.chunk.js} +1 -1
  22. package/dist/scripts/{28-96aef6893a.chunk.js → 28-1abda5ddcd.chunk.js} +1 -1
  23. package/dist/scripts/{29-554f426b85.chunk.js → 29-89a17b3cd5.chunk.js} +1 -1
  24. package/dist/scripts/{3-75a0223960.chunk.js → 3-c468e5f805.chunk.js} +1 -1
  25. package/dist/scripts/{30-9bdc787ec5.chunk.js → 30-4331611384.chunk.js} +1 -1
  26. package/dist/scripts/{31-67f46f7d90.chunk.js → 31-0522a0350b.chunk.js} +1 -1
  27. package/dist/scripts/{32-afdbc7da12.chunk.js → 32-e9df7dd92c.chunk.js} +1 -1
  28. package/dist/scripts/{33-6c83870de4.chunk.js → 33-b88d856ab0.chunk.js} +1 -1
  29. package/dist/scripts/{34-486d783b77.chunk.js → 34-c677ede372.chunk.js} +1 -1
  30. package/dist/scripts/{35-44dfa1d229.chunk.js → 35-58a7bef4a3.chunk.js} +1 -1
  31. package/dist/scripts/{36-6e22a76e9d.chunk.js → 36-22798bd81a.chunk.js} +1 -1
  32. package/dist/scripts/{37-247574943e.chunk.js → 37-0336031536.chunk.js} +1 -1
  33. package/dist/scripts/{38-c053771304.chunk.js → 38-b424c6398c.chunk.js} +1 -1
  34. package/dist/scripts/{39-0034f40388.chunk.js → 39-faf8a59822.chunk.js} +1 -1
  35. package/dist/scripts/{4-bbf9a27d2b.chunk.js → 4-4c62127fb2.chunk.js} +1 -1
  36. package/dist/scripts/{40-4c9075f25f.chunk.js → 40-9b473a87c2.chunk.js} +1 -1
  37. package/dist/scripts/{41-9ef30d9bce.chunk.js → 41-20fe91435b.chunk.js} +1 -1
  38. package/dist/scripts/{42-d5ebd7e173.chunk.js → 42-143ac3914b.chunk.js} +1 -1
  39. package/dist/scripts/{43-18cb4a605c.chunk.js → 43-ce726c3839.chunk.js} +1 -1
  40. package/dist/scripts/{44-c501392a17.chunk.js → 44-fc7c025c5f.chunk.js} +1 -1
  41. package/dist/scripts/{45-6f27b84b9a.chunk.js → 45-1e84cd6639.chunk.js} +1 -1
  42. package/dist/scripts/{46-26943c79e1.chunk.js → 46-26b40a870e.chunk.js} +1 -1
  43. package/dist/scripts/{47-58f15ff5f7.chunk.js → 47-f03e03252c.chunk.js} +1 -1
  44. package/dist/scripts/{48-59c60086c6.chunk.js → 48-c9a61fd1e3.chunk.js} +1 -1
  45. package/dist/scripts/{49-c7095beb6f.chunk.js → 49-2879e96eed.chunk.js} +1 -1
  46. package/dist/scripts/{5-a06b2153c3.chunk.js → 5-96980a85ac.chunk.js} +1 -1
  47. package/dist/scripts/{50-015c9c420c.chunk.js → 50-b76b6c7d52.chunk.js} +1 -1
  48. package/dist/scripts/{51-0cca989dae.chunk.js → 51-c252822f95.chunk.js} +1 -1
  49. package/dist/scripts/{52-3cc8a4a0c6.chunk.js → 52-ecde4fecf3.chunk.js} +1 -1
  50. package/dist/scripts/{53-b0a20bc5a0.chunk.js → 53-3ab3b83088.chunk.js} +1 -1
  51. package/dist/scripts/{54-79dca3d489.chunk.js → 54-0e921db390.chunk.js} +1 -1
  52. package/dist/scripts/{55-8c5eba8730.chunk.js → 55-bd9dc838cd.chunk.js} +1 -1
  53. package/dist/scripts/{56-4d5b5fecd6.chunk.js → 56-6528a68474.chunk.js} +1 -1
  54. package/dist/scripts/{57-84eff54b39.chunk.js → 57-3477d4f9b5.chunk.js} +1 -1
  55. package/dist/scripts/{58-c0d48a915f.chunk.js → 58-2c62df5dbd.chunk.js} +1 -1
  56. package/dist/scripts/{59-53d002a1db.chunk.js → 59-13ade58ba1.chunk.js} +1 -1
  57. package/dist/scripts/{6-6c8dac1a42.chunk.js → 6-1fdfa2191a.chunk.js} +1 -1
  58. package/dist/scripts/{60-9ba5670a0b.chunk.js → 60-f36c57ef33.chunk.js} +1 -1
  59. package/dist/scripts/{61-7189b10e86.chunk.js → 61-24acf3201f.chunk.js} +1 -1
  60. package/dist/scripts/{62-6c382c4af3.chunk.js → 62-d869eccf9a.chunk.js} +1 -1
  61. package/dist/scripts/{63-d55def5355.chunk.js → 63-d35e9ced47.chunk.js} +1 -1
  62. package/dist/scripts/{64-4925cb46d4.chunk.js → 64-dfc3cd19ee.chunk.js} +1 -1
  63. package/dist/scripts/{65-28d1f3d305.chunk.js → 65-b66a158393.chunk.js} +1 -1
  64. package/dist/scripts/{66-dd4f73d58f.chunk.js → 66-89b577d70f.chunk.js} +1 -1
  65. package/dist/scripts/{67-25c6582829.chunk.js → 67-029aaf6fac.chunk.js} +1 -1
  66. package/dist/scripts/{68-4962d3fcfc.chunk.js → 68-452e0327d9.chunk.js} +1 -1
  67. package/dist/scripts/{69-2067a2189e.chunk.js → 69-0491a8faf5.chunk.js} +1 -1
  68. package/dist/scripts/{7-881a9b64de.chunk.js → 7-13b4886b73.chunk.js} +1 -1
  69. package/dist/scripts/{70-d2472d2122.chunk.js → 70-62aff2ab4e.chunk.js} +1 -1
  70. package/dist/scripts/{71-3f1e0d4f31.chunk.js → 71-91b4d4dfcb.chunk.js} +1 -1
  71. package/dist/scripts/{72-d5c52637ca.chunk.js → 72-4d851db609.chunk.js} +1 -1
  72. package/dist/scripts/{8-ef172e304b.chunk.js → 8-55ea9736c8.chunk.js} +1 -1
  73. package/dist/scripts/{9-d5b2cc8210.chunk.js → 9-e4f29db920.chunk.js} +1 -1
  74. package/dist/scripts/bundle-2140125778.min.js +10 -0
  75. package/dist/scripts/polyfills-e9aab74cda.min.js +1 -0
  76. package/package.json +3 -3
  77. package/dist/scripts/bundle-2b9531d6bc.min.js +0 -10
  78. package/dist/scripts/polyfills-35ff77d456.min.js +0 -1
@@ -1 +1 @@
1
- (window.webpackJsonp_clickview_library_editor=window.webpackJsonp_clickview_library_editor||[]).push([[14],{1047:function(e,t,n){"use strict";n.d(t,"a",(function(){return v}));var o=n(6),r=n(2),i=n(3),l=n(1061),s=n(13),a=n(1048),c=n.n(a),u=n(1049),f=n.n(u);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})(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||function(e,t){return e.__proto__=t,e})(e,t)}function y(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=g(e);if(t){var r=g(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return m(this,n)}}function m(e,t){return!t||"object"!==p(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function g(e){return(g=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(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}}),t&&h(e,t)}(u,e);var t,n,r,a=y(u);function u(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,u),a.call(this,e)}return t=u,(n=[{key:"initialize",value:function(){this.listenTo(this.options.channelName,"folder:selected new:folder:selected",this.setButtonText),this.listenTo(this.options.channelName,"re:render:selector",this.renderSelector),this.disabledIds=this.options.disabledIds&&this.options.disabledIds.reduce((function(e,t){return Object.assign(Object.assign({},e),function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}({},t,!0))}),{})}},{key:"name",get:function(){return"TreeDropdownComponent"}},{key:"template",get:function(){return c.a}},{key:"className",get:function(){return"position-relative"}},{key:"lang",get:function(){return"libraryEditor.treeDropdown"}},{key:"regions",value:function(){return{selector:{el:".selector-region",replaceElement:!1}}}},{key:"events",value:function(){return{"click .create-new":"onClickCreateNew"}}},{key:"defaults",get:function(){return{disabledIds:[]}}},{key:"elements",get:function(){return{button:".custom-select"}}},{key:"onClickCreateNew",value:function(e){e.preventDefault(),o.Radio.channel(this.options.channelName).trigger("create:folder:clicked")}},{key:"setButtonText",value:function(e,t){if(e&&!t){var n=e.get("name");this.getUI("button").text(n)}else{var o=s.f.getSelected(this.options.folderTreeKey,this.collection),r=o?o.get("name"):i.a.getPhrase(this.lang,"button");this.getUI("button").text(r)}}},{key:"renderSelector",value:function(){this.showChildView("selector",new l.a({styles:f.a,collection:this.collection,channelName:this.options.channelName,childrenProperty:"children",folderTreeId:this.options.folderTreeKey,extraClass:f.a.list,extraClasses:f.a.list,isSelector:!0,disabledIds:this.disabledIds||{}}))}},{key:"viewOptions",value:function(){return{styles:f.a,name:this.options.name||this.options.channelName,buttonText:this.buttonText,canCreateNew:this.options.canCreateNew}}},{key:"onRender",value:function(){this.setButtonText(),this.renderSelector()}}])&&d(t.prototype,n),r&&d(t,r),u}(r.a.Component)},1048:function(e,t,n){var o=n(10);e.exports=(o.default||o).template({1:function(e,t,n,o,r){e.propertyIsEnumerable;var i,l=e.escapeExpression;return' <button class="create-new btn font-weight-bold rounded-0 w-100 text-left '+l(e.lambda(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.customItem:i,t))+'">'+l((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"createNew",{name:"lang",hash:{},data:r}))+"</button>\r\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,r){e.propertyIsEnumerable;var i,l=e.lambda,s=e.escapeExpression;return'<button\r\n class="'+s(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.selectBtn:i,t))+' custom-select form-control"\r\n data-toggle="dropdown"\r\n aria-haspopup="true"\r\n aria-expanded="false"\r\n name='+s(l(null!=(i=null!=t?t.options:t)?i.name:i,t))+"\r\n>"+s(l(null!=(i=null!=t?t.options:t)?i.buttonText:i,t))+'</button>\r\n<div class="dropdown-menu '+s(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.selector:i,t))+'">\r\n <div class="selector-region"></div>\r\n'+(null!=(i=n.if.call(null!=t?t:e.nullContext||{},null!=(i=null!=t?t.options:t)?i.canCreateNew:i,{name:"if",hash:{},fn:e.program(1,r,0),inverse:e.noop,data:r}))?i:"")+'</div>\r\n<div class="form-feedback"></div>'},useData:!0})},1049:function(e,t,n){e.exports={selectBtn:"_2TTgs",list:"_3wN7o",selector:"_3Xf1P",customItem:"_199PI"}},1084:function(e,t,n){"use strict";n.d(t,"a",(function(){return v}));var o=n(1),r=n(6),i=n(2),l=n(1039),s=n(13),a=n(1085),c=n.n(a),u=n(1086),f=n.n(u);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})(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||function(e,t){return e.__proto__=t,e})(e,t)}function y(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=g(e);if(t){var r=g(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return m(this,n)}}function m(e,t){return!t||"object"!==p(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function g(e){return(g=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(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}}),t&&h(e,t)}(u,e);var t,n,i,a=y(u);function u(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,u),(t=a.call(this,e)).selectSearch="",t.sameCharIndex=1,t.optionStep=1,t}return t=u,(n=[{key:"initialize",value:function(){this.setModel(),this.bindListeners()}},{key:"name",get:function(){return"SelectComponent"}},{key:"template",get:function(){return c.a}},{key:"regions",value:function(){return{dropdown:{el:".dropdown-region",replaceElement:!0}}}},{key:"events",value:function(){return{keydown:"onKeydown","shown.bs.dropdown":"onShowDropdown"}}},{key:"defaults",get:function(){return{displayProperty:"name"}}},{key:"elements",get:function(){return{dropdownToggle:".dropdown-toggle"}}},{key:"bindListeners",value:function(){this.listenTo(this.options.channelName,this.options.childOptions.eventName,this.onSelect)}},{key:"onShowDropdown",value:function(){r.Radio.channel(this.options.channelName).trigger("center:dropdown")}},{key:"onKeydown",value:function(e){38===e.keyCode||40===e.keyCode?this.onArrowKeyDown(e):13===e.keyCode?this.render():this.onType(e),r.Radio.channel(this.options.channelName).trigger("center:dropdown")}},{key:"onArrowKeyDown",value:function(e){s.c.getSelected(this.collection)?this.optionStep=1:this.optionStep=0;var t=this.getNextModel(e.keyCode);for(t||(s.c.deselectAll(this.collection),t=this.getNextModel(e.keyCode));this.isDisabled(t);)this.optionStep++,t=this.getNextModel(e.keyCode);this.onSelect(t)}},{key:"onType",value:function(e){if(1===e.key.toString().length){var t=this.getModelMatch(e);t&&this.onSelect(t),this.runTimer()}}},{key:"onSelect",value:function(e){this.isDisabled(e)||(s.c.setSelected(e.get("id"),this.collection),this.setModel(),this.getUI("dropdownToggle").text(this.getButtonText()),r.Radio.channel(this.options.channelName).trigger("select:option:selected",e))}},{key:"setModel",value:function(){this.model=s.c.getSelected(this.collection)}},{key:"getNextModel",value:function(e){var t,n=s.c.getSelected(this.collection)||this.collection.first(),o=this.collection.indexOf(n);return(t=38===e?this.collection.at(o-this.optionStep):this.collection.at(o+this.optionStep))||(s.c.deselectAll(this.collection),t=this.collection.first(),this.optionStep=0),t}},{key:"getModelMatch",value:function(e){var t,n=this;return 1===this.selectSearch.length&&this.selectSearch===e.key?t=this.handleSameCharIndex(e.key):(this.selectSearch+=e.key,this.sameCharIndex=1),t||(t=o.find(this.collection.models,(function(e){return e.get(n.options.displayProperty).toLowerCase().slice(0,n.selectSearch.length).includes(n.selectSearch.toLowerCase())}))),t}},{key:"handleSameCharIndex",value:function(e){var t=this,n=o.filter(this.collection.models,(function(n){return n.get(t.options.displayProperty).toLowerCase().slice(0,1)===e}));if(n.length>1){var r=n[this.sameCharIndex];return r||(r=o.first(n),this.sameCharIndex=0),this.sameCharIndex++,r}return o.first(n)}},{key:"runTimer",value:function(){var e=this;this.scopedTimerIndex&&clearTimeout(this.scopedTimerIndex),this.scopedTimerIndex=window.setTimeout((function(){e.selectSearch=""}),500)}},{key:"isDisabled",value:function(e){var t;if(e.get("divider"))return!0;if(!o.isFunction(this.options.childOptions.isDisabled))return!1;for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return(t=this.options.childOptions.isDisabled).call.apply(t,[this,e].concat(r))}},{key:"getButtonText",value:function(){if(this.options.disabled)return this.options.noOptionsText;var e=s.c.getSelected(this.collection);return e&&e.get(this.options.displayProperty)||this.options.placeholderText}},{key:"viewOptions",value:function(){return{styles:f.a,inputName:this.options.inputName,disabled:this.options.disabled,placeholderText:this.getButtonText()}}},{key:"onRender",value:function(){this.showChildView("dropdown",new l.a({collection:this.collection,channelName:this.options.channelName,childOptions:o.extend(this.options.childOptions),displayOptions:{extraClasses:"w-100 ".concat(f.a.dropdownMenu)},analyticsHelper:this.options.analyticsHelper}))}}])&&d(t.prototype,n),i&&d(t,i),u}(i.a.Component)},1085:function(e,t,n){var o=n(10);e.exports=(o.default||o).template({1:function(e,t,n,o,r){var i;e.propertyIsEnumerable;return e.escapeExpression(e.lambda(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.disabled:i,t))},3:function(e,t,n,o,r){return" disabled"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,r){e.propertyIsEnumerable;var i,l=e.lambda,s=e.escapeExpression,a=null!=t?t:e.nullContext||{};return'<button \r\n class="dropdown-toggle form-control btn-block text-left position-relative '+s(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.selectButton:i,t))+" "+(null!=(i=n.if.call(a,null!=(i=null!=t?t.options:t)?i.disabled:i,{name:"if",hash:{},fn:e.program(1,r,0),inverse:e.noop,data:r}))?i:"")+'" \r\n type="button" \r\n id="dropdownMenuButton" \r\n data-toggle="dropdown" \r\n aria-haspopup="true" \r\n aria-expanded="false"\r\n '+(null!=(i=n.if.call(a,null!=(i=null!=t?t.options:t)?i.disabled:i,{name:"if",hash:{},fn:e.program(3,r,0),inverse:e.noop,data:r}))?i:"")+' \r\n name="'+s(l(null!=(i=null!=t?t.options:t)?i.inputName:i,t))+'"\r\n >\r\n '+s(l(null!=(i=null!=t?t.options:t)?i.placeholderText:i,t))+'\r\n</button>\r\n<div class="dropdown-region"></div>\r\n<div class="form-feedback"></div>'},useData:!0})},1086:function(e,t,n){e.exports={dropdownMenu:"_2RaQu",selectButton:"_2xGqi",disabled:"_15kWr"}},1107:function(e,t,n){"use strict";n.d(t,"a",(function(){return v}));var o=n(1),r=n(6),i=n(2),l=n(3),s=n(42),a=n(1084),c=n(13),u=n(1108),f=n.n(u);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})(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||function(e,t){return e.__proto__=t,e})(e,t)}function y(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=g(e);if(t){var r=g(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return m(this,n)}}function m(e,t){return!t||"object"!==p(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function g(e){return(g=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(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}}),t&&h(e,t)}(p,e);var t,n,i,u=y(p);function p(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,p),u.call(this,e)}return t=p,(n=[{key:"initialize",value:function(){this.bindListeners(),c.c.deselectAll(this.collection),c.c.setSelected(this.options.currentLibraryId,this.collection)}},{key:"name",get:function(){return"LibrarySelectComponent"}},{key:"channelName",get:function(){return"".concat(this.name).concat(this.cid)}},{key:"className",get:function(){return"position-relative"}},{key:"lang",get:function(){return"libraryEditor.librarySelect"}},{key:"template",get:function(){return f.a}},{key:"regions",value:function(){return{dropdown:{el:".dropdown-menu-region",replaceElement:!0}}}},{key:"bindListeners",value:function(){var e=this;this.listenTo(this.channelName,"select:option:selected",(function(t){r.Radio.channel(e.options.channelName).trigger("library:selected",t)}))}},{key:"getIsOptionDisabledFn",value:function(){var e=this.options.disabledLibraryIds;return function(t){var n=t||this.model;if(o.contains(e,n.get("id")+""))return!0}}},{key:"onRender",value:function(){this.showChildView("dropdown",new a.a({collection:this.collection,channelName:this.channelName,childOptions:{titleProperty:"name",eventName:"select:option:click",isDisabled:this.getIsOptionDisabledFn()},placeholderText:this.options.placeholderText||l.a.getPhrase(this.lang,"placeholder"),noOptionsText:l.a.getPhrase(this.lang,"noLibraries"),inputName:this.options.inputName,disabled:0===this.collection.length||this.options.disabled,analyticsHelper:s.a}))}}])&&d(t.prototype,n),i&&d(t,i),p}(i.a.Component)},1108:function(e,t,n){var o=n(10);e.exports=(o.default||o).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,o,r){return'<div class="dropdown-menu-region"></div>\r\n<div class="form-feedback"></div>'},useData:!0})},1145:function(e,t,n){"use strict";n.d(t,"a",(function(){return E}));var o=n(1),r=n(29),i=n(2),l=n(59),s=n(16),a=n(143),c=n(0),u=n(9),f=n(1060),p=n(1035),d=n(1036),h=n(1146),y=n.n(h),m=n(1147),g=n.n(m),v=n(3);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})(e)}function w(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 k(e,t){return(k=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function S(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=R(e);if(t){var r=R(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return C(this,n)}}function C(e,t){return!t||"object"!==b(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function R(e){return(R=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(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}}),t&&k(e,t)}(m,e);var t,n,i,h=S(m);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"VideoBasicInfoComponent"}},{key:"template",get:function(){return g.a}},{key:"lang",get:function(){return"shared.videoBasicInfo"}},{key:"defaults",get:function(){return{truncateDescription:!0}}},{key:"behaviors",get:function(){return[{behaviorClass:a.a,selector:".tool-tip"}]}},{key:"regions",value:function(){return{description:{el:".description-region",replaceElement:!0,partialLoading:u.h.VideoBasicInfo},series:{el:".series-region",replaceElement:!0}}}},{key:"appLinks",get:function(){return{".applink-publisher-video":{application:c.b.LIBRARY_EDITOR,action:c.a.LibraryEditor.SHOW_PUBLISHER_VIDEO,args:[this.model.get("id")]}}}},{key:"getBroadcastDate",value:function(){return this.model.get("dateBroadcast")?r(this.model.get("dateBroadcast")).format(u.l.FULL_YEAR):""}},{key:"getSeriesUrl",value:function(){if(this.options.externalSeriesLink&&this.model.series)return l.a.urlBuilder(l.a.safeUrlConcat(this.options.config.get("onlineUrl"),"series/".concat(this.model.series.id)),{loginPrompt:!1})}},{key:"renderSeries",value:function(){this.model.series&&this.model.series.get("name")&&this.showChildView("series",new p.a({model:this.model,highlight:!1,seriesUrl:this.getSeriesUrl(),styleUppercase:!1}))}},{key:"renderDescription",value:function(){if(this.model&&this.model.get("description")){var e=new f.a({model:this.model,linkify:!0,size:f.b.Large,truncate:this.options.truncateDescription,allowExpand:!0});this.showChildView("description",e)}}},{key:"getSubtitleLanguage",value:function(){var e=this;return this.model.subtitles&&this.model.get("subtitles").length?o.uniq(this.model.get("subtitles").map((function(t){var n,o=t.get("language"),r=CVLanguages.getFullEnglishName(o);return(null===(n=t.get("metadata"))||void 0===n?void 0:n.autoGenerated)?v.a.getPhrase(e.lang,"autoGenerated",{name:r}):r}))).join(", "):""}},{key:"getCitationHeading",value:function(e,t,n){return this.model.get(e)?this.model.get(e).length>1?n:t:""}},{key:"getCitationHeadings",value:function(){return{productionCompaniesText:this.getCitationHeading(u.a.ProductionCompany,"Production Company","Production Companies"),producersText:this.getCitationHeading(u.a.Producer,"Producer","Producers"),disributorsText:this.getCitationHeading(u.a.Distributor,"Distributor","Distributors"),directorsText:this.getCitationHeading(u.a.Director,"Director","Directors")}}},{key:"viewOptions",value:function(){return Object.assign({styles:y.a,ratingClass:this.model.rating&&d.h.mapRatingToClass(this.model.rating.get("value")),broadcastDate:this.getBroadcastDate(),showHeading:this.options.showHeading,subtitles:this.getSubtitleLanguage(),publisherArchiveSvg:s.a.getSvg(s.b.PublisherArchive),showPublisherVideoDetails:this.options.showPublisherVideoDetails},this.getCitationHeadings())}},{key:"onRender",value:function(){this.renderSeries(),this.renderDescription()}}])&&w(t.prototype,n),i&&w(t,i),m}(i.a.Component)},1146:function(e,t,n){e.exports={columnNames:"_1N_VT",seriesContainer:"_4pk2s",icon:"_3SoBV",citationValues:"_1nYZg"}},1147:function(e,t,n){var o=n(10);e.exports=(o.default||o).template({1:function(e,t,n,o,r){e.propertyIsEnumerable;var i,l=null!=t?t:e.nullContext||{};return'<div class="position-relative">\r\n <h5 class="d-inline-block">'+e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(l,"basicInfo",{name:"lang",hash:{},data:r}))+"</h5>\r\n"+(null!=(i=n.if.call(l,null!=(i=null!=t?t.options:t)?i.showPublisherVideoDetails:i,{name:"if",hash:{},fn:e.program(2,r,0),inverse:e.noop,data:r}))?i:"")+"</div>\r\n"},2:function(e,t,n,o,r){e.propertyIsEnumerable;var i,l=e.lambda,s=e.escapeExpression;return' <a class="float-right cursor-pointer applink-publisher-video">\r\n <span class="d-inline-block align-middle '+s(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.icon:i,t))+'">'+(null!=(i=l(null!=(i=null!=t?t.options:t)?i.publisherArchiveSvg:i,t))?i:"")+"</span> "+s((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"viewInPublisherArchive",{name:"lang",hash:{},data:r}))+"\r\n </a>\r\n"},4:function(e,t,n,o,r){e.propertyIsEnumerable;var i,l,s=e.escapeExpression,a=null!=t?t:e.nullContext||{},c=e.hooks.helperMissing;return' <div class="col-3 '+s(e.lambda(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.columnNames:i,t))+'">'+s((n.lang||t&&t.lang||c).call(a,"videoTitle",{name:"lang",hash:{},data:r}))+'</div>\r\n <p class="col-9">'+s("function"==typeof(l=null!=(l=n.name||(null!=t?t.name:t))?l:c)?l.call(a,{name:"name",hash:{},data:r}):l)+"</p>\r\n"},6:function(e,t,n,o,r){e.propertyIsEnumerable;var i,l=e.lambda,s=e.escapeExpression;return' <div class="col-3 '+s(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.columnNames:i,t))+'">'+s((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"series",{name:"lang",hash:{},data:r}))+'</div>\r\n <div class="col-9 '+s(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.seriesContainer:i,t))+'"><div class="series-region"></div></div>\r\n'},8:function(e,t,n,o,r){e.propertyIsEnumerable;var i,l=e.lambda,s=e.escapeExpression;return' <div class="col-3 '+s(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.columnNames:i,t))+'">'+s((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"rating",{name:"lang",hash:{},data:r}))+'</div>\r\n <p class="col-9"><span class="p-1 badge text-white tool-tip '+s(l(null!=(i=null!=t?t.options:t)?i.ratingClass:i,t))+" "+s(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.rating:i,t))+'" title="'+s(l(null!=(i=null!=t?t.rating:t)?i.name:i,t))+'">'+s(l(null!=(i=null!=t?t.rating:t)?i.code:i,t))+"</span></p>\r\n"},10:function(e,t,n,o,r){e.propertyIsEnumerable;var i,l=e.escapeExpression;return' <div class="col-3 '+l(e.lambda(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.columnNames:i,t))+'">'+l((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"description",{name:"lang",hash:{},data:r}))+'</div>\r\n <div class="col-9">\r\n <div class="description-region"></div>\r\n </div>\r\n'},12:function(e,t,n,o,r){e.propertyIsEnumerable;var i,l,s=e.escapeExpression,a=null!=t?t:e.nullContext||{},c=e.hooks.helperMissing;return' <div class="col-3 '+s(e.lambda(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.columnNames:i,t))+'">'+s((n.lang||t&&t.lang||c).call(a,"productionYear",{name:"lang",hash:{},data:r}))+'</div>\r\n <p class="col-9">'+s("function"==typeof(l=null!=(l=n.productionYear||(null!=t?t.productionYear:t))?l:c)?l.call(a,{name:"productionYear",hash:{},data:r}):l)+"</p>\r\n"},14:function(e,t,n,o,r){e.propertyIsEnumerable;var i,l=e.lambda,s=e.escapeExpression,a=null!=t?t:e.nullContext||{};return' <div class="col-3 '+s(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.columnNames:i,t))+'">'+s((n.lang||t&&t.lang||e.hooks.helperMissing).call(a,"producers",{name:"lang",hash:{},data:r}))+'</div>\r\n <div class="col-9 '+s(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.citationValues:i,t))+'">\r\n <p>\r\n'+(null!=(i=n.each.call(a,null!=t?t.producers:t,{name:"each",hash:{},fn:e.program(15,r,0),inverse:e.noop,data:r}))?i:"")+" </p>\r\n </div>\r\n"},15:function(e,t,n,o,r){var i;e.propertyIsEnumerable;return" <span>"+e.escapeExpression("function"==typeof(i=null!=(i=n.name||(null!=t?t.name:t))?i:e.hooks.helperMissing)?i.call(null!=t?t:e.nullContext||{},{name:"name",hash:{},data:r}):i)+"</span>\r\n"},17:function(e,t,n,o,r){e.propertyIsEnumerable;var i,l=e.lambda,s=e.escapeExpression,a=null!=t?t:e.nullContext||{};return' <div class="col-3 '+s(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.columnNames:i,t))+'">'+s((n.lang||t&&t.lang||e.hooks.helperMissing).call(a,"directors",{name:"lang",hash:{},data:r}))+'</div>\r\n <div class="col-9 '+s(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.citationValues:i,t))+'">\r\n <p>\r\n'+(null!=(i=n.each.call(a,null!=t?t.directors:t,{name:"each",hash:{},fn:e.program(15,r,0),inverse:e.noop,data:r}))?i:"")+" </p>\r\n </div>\r\n"},19:function(e,t,n,o,r){e.propertyIsEnumerable;var i,l=e.lambda,s=e.escapeExpression,a=null!=t?t:e.nullContext||{};return' <div class="col-3 '+s(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.columnNames:i,t))+'">'+s((n.lang||t&&t.lang||e.hooks.helperMissing).call(a,"productionCompanies",{name:"lang",hash:{},data:r}))+'</div>\r\n <div class="col-9 '+s(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.citationValues:i,t))+'">\r\n <p>\r\n'+(null!=(i=n.each.call(a,null!=t?t.productionCompanies:t,{name:"each",hash:{},fn:e.program(15,r,0),inverse:e.noop,data:r}))?i:"")+" </p>\r\n </div>\r\n"},21:function(e,t,n,o,r){e.propertyIsEnumerable;var i,l=e.lambda,s=e.escapeExpression,a=null!=t?t:e.nullContext||{};return' <div class="col-3 '+s(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.columnNames:i,t))+'">'+s((n.lang||t&&t.lang||e.hooks.helperMissing).call(a,"distributors",{name:"lang",hash:{},data:r}))+'</div>\r\n <div class="col-9 '+s(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.citationValues:i,t))+'">\r\n <p>\r\n'+(null!=(i=n.each.call(a,null!=t?t.distributors:t,{name:"each",hash:{},fn:e.program(15,r,0),inverse:e.noop,data:r}))?i:"")+" </p>\r\n </div>\r\n"},23:function(e,t,n,o,r){var i;e.propertyIsEnumerable;return null!=(i=n.if.call(null!=t?t:e.nullContext||{},null!=t?t.channel:t,{name:"if",hash:{},fn:e.program(24,r,0),inverse:e.noop,data:r}))?i:""},24:function(e,t,n,o,r){e.propertyIsEnumerable;var i,l=e.lambda,s=e.escapeExpression;return'\r\n <div class="col-3 '+s(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.columnNames:i,t))+'">'+s((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"channel",{name:"lang",hash:{},data:r}))+'</div>\r\n <p class="col-9">'+s(l(null!=(i=null!=t?t.channel:t)?i.name:i,t))+"</p>\r\n "},26:function(e,t,n,o,r){e.propertyIsEnumerable;var i,l=e.lambda,s=e.escapeExpression;return' <div class="col-3 '+s(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.columnNames:i,t))+'">'+s((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"broadcastDate",{name:"lang",hash:{},data:r}))+'</div>\r\n <p class="col-9">'+s(l(null!=(i=null!=t?t.options:t)?i.broadcastDate:i,t))+"</p>\r\n"},28:function(e,t,n,o,r){e.propertyIsEnumerable;var i,l=e.lambda,s=e.escapeExpression;return' <div class="col-3 '+s(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.columnNames:i,t))+'">'+s((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"subtitles",{name:"lang",hash:{},data:r}))+'</div>\r\n <p class="col-9">'+s(l(null!=(i=null!=t?t.options:t)?i.subtitles:i,t))+"</p>\r\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,r){e.propertyIsEnumerable;var i,l=null!=t?t:e.nullContext||{};return(null!=(i=n.if.call(l,null!=(i=null!=t?t.options:t)?i.showHeading:i,{name:"if",hash:{},fn:e.program(1,r,0),inverse:e.noop,data:r}))?i:"")+'<div class="row mb-0">\r\n'+(null!=(i=n.if.call(l,null!=t?t.name:t,{name:"if",hash:{},fn:e.program(4,r,0),inverse:e.noop,data:r}))?i:"")+"\r\n"+(null!=(i=n.if.call(l,null!=(i=null!=t?t.series:t)?i.name:i,{name:"if",hash:{},fn:e.program(6,r,0),inverse:e.noop,data:r}))?i:"")+"\r\n"+(null!=(i=n.if.call(l,null!=(i=null!=t?t.rating:t)?i.code:i,{name:"if",hash:{},fn:e.program(8,r,0),inverse:e.noop,data:r}))?i:"")+"\r\n"+(null!=(i=n.if.call(l,null!=t?t.description:t,{name:"if",hash:{},fn:e.program(10,r,0),inverse:e.noop,data:r}))?i:"")+"\r\n"+(null!=(i=n.if.call(l,null!=t?t.productionYear:t,{name:"if",hash:{},fn:e.program(12,r,0),inverse:e.noop,data:r}))?i:"")+"\r\n"+(null!=(i=n.if.call(l,null!=(i=null!=t?t.producers:t)?i.length:i,{name:"if",hash:{},fn:e.program(14,r,0),inverse:e.noop,data:r}))?i:"")+"\r\n"+(null!=(i=n.if.call(l,null!=(i=null!=t?t.directors:t)?i.length:i,{name:"if",hash:{},fn:e.program(17,r,0),inverse:e.noop,data:r}))?i:"")+"\r\n"+(null!=(i=n.if.call(l,null!=(i=null!=t?t.productionCompanies:t)?i.length:i,{name:"if",hash:{},fn:e.program(19,r,0),inverse:e.noop,data:r}))?i:"")+"\r\n"+(null!=(i=n.if.call(l,null!=(i=null!=t?t.distributors:t)?i.length:i,{name:"if",hash:{},fn:e.program(21,r,0),inverse:e.noop,data:r}))?i:"")+"\r\n "+(null!=(i=n.if.call(l,null!=(i=null!=t?t.channel:t)?i.name:i,{name:"if",hash:{},fn:e.program(23,r,0),inverse:e.noop,data:r}))?i:"")+"\r\n\r\n"+(null!=(i=n.if.call(l,null!=(i=null!=t?t.options:t)?i.broadcastDate:i,{name:"if",hash:{},fn:e.program(26,r,0),inverse:e.noop,data:r}))?i:"")+"\r\n"+(null!=(i=n.if.call(l,null!=(i=null!=t?t.options:t)?i.subtitles:i,{name:"if",hash:{},fn:e.program(28,r,0),inverse:e.noop,data:r}))?i:"")+"</div>"},useData:!0})},1186:function(e,t,n){"use strict";var o=n(3),r="staffRequests.utils",i={destinationLibrary:function(e){if(!e||!e.id)return o.a.getPhrase(r,"selectLibrary")},destinationFolder:function(e){if(!e||!e.id)return o.a.getPhrase(r,"selectFolder")}},l={message:[{required:!0,msg:function(){return o.a.getPhrase("staffRequests.utils","provideMessage")}}]};n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return l}))},1322:function(e,t,n){var o=n(10);e.exports=(o.default||o).template({1:function(e,t,n,o,r){return" text-muted"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,r){e.propertyIsEnumerable;var i,l,s=e.lambda,a=e.escapeExpression,c=null!=t?t:e.nullContext||{},u=e.hooks.helperMissing;return'<h6 class="mb-1">'+a(s(null!=(i=null!=t?t.video:t)?i.name:i,t))+'</h6>\r\n<p class="m-0">'+a((n.lang||t&&t.lang||u).call(c,"request",{name:"lang",hash:{lastName:null!=(i=null!=t?t.options:t)?i.lastName:i,firstName:null!=(i=null!=t?t.options:t)?i.firstName:i},data:r}))+'</p>\r\n<time class="m-0'+(null!=(i=n.unless.call(c,null!=(i=null!=t?t.options:t)?i.isSelected:i,{name:"unless",hash:{},fn:e.program(1,r,0),inverse:e.noop,data:r}))?i:"")+'" datetime='+a("function"==typeof(l=null!=(l=n.dateCreated||(null!=t?t.dateCreated:t))?l:u)?l.call(c,{name:"dateCreated",hash:{},data:r}):l)+">"+a(s(null!=(i=null!=t?t.options:t)?i.dateRequested:i,t))+"</time"},useData:!0})},1323:function(e,t,n){e.exports={list:"_3aP3V",item:"_1uqg-",selected:"_29kkj"}},1324:function(e,t,n){e.exports={actions:"_2xyI4",source:"_153F1",button:"_3I7SQ"}},1325:function(e,t,n){var o=n(10);e.exports=(o.default||o).template({1:function(e,t,n,o,r){var i;e.propertyIsEnumerable;return" <span>"+e.escapeExpression(e.lambda(null!=(i=null!=t?t.sourceFolder:t)?i.name:i,t))+"</span>\r\n"},3:function(e,t,n,o,r){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,o,r){e.propertyIsEnumerable;var i,l=null!=t?t:e.nullContext||{},s=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||s).call(l,"source",{name:"lang",hash:{},data:r}))+'</strong></div>\r\n <div class="col-5">\r\n <span class="badge p-1 mr-1 '+a(c(null!=(i=null!=t?t.options:t)?i.sourceClass:i,t))+'">'+a(c(null!=(i=null!=t?t.options:t)?i.sourceLibraryName:i,t))+"</span>\r\n"+(null!=(i=n.if.call(l,null!=(i=null!=t?t.sourceFolder:t)?i.name:i,{name:"if",hash:{},fn:e.program(1,r,0),inverse:e.noop,data:r}))?i:"")+' </div>\r\n <div class="col-4 text-right">\r\n <button class="btn btn-success btn-sm '+a(c(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.button:i,t))+' approve" type="button">'+a((n.lang||t&&t.lang||s).call(l,"approve",{name:"lang",hash:{},data:r}))+'</button>\r\n <button class="btn btn-light btn-sm border-secondary '+a(c(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.button:i,t))+' reject" type="button">'+a((n.lang||t&&t.lang||s).call(l,"reject",{name:"lang",hash:{},data:r}))+'</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||s).call(l,"moveVideo",{name:"lang",hash:{},data:r}))+'</strong></div>\r\n <div class="col-5">\r\n'+(null!=(i=n.if.call(l,null!=(i=null!=t?t.options:t)?i.showLibrarySelect:i,{name:"if",hash:{},fn:e.program(3,r,0),inverse:e.noop,data:r}))?i:"")+' <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})},1326:function(e,t,n){var o=n(10);e.exports=(o.default||o).template({1:function(e,t,n,o,r){e.propertyIsEnumerable;var i,l=e.lambda,s=e.escapeExpression;return'<div class="border-bottom">\r\n <div class="d-inline-block mr-2 '+s(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.avatar:i,t))+'" style="background-image: url(\''+s(l(null!=(i=null!=t?t.options:t)?i.avatarUrl:i,t))+'\')">\r\n &nbsp\r\n </div>\r\n <div class="d-inline-block">\r\n <p>'+(null!=(i=(n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"requestNote",{name:"lang",hash:{lastName:null!=(i=null!=t?t.options:t)?i.lastName:i,firstName:null!=(i=null!=t?t.options:t)?i.firstName:i},data:r}))?i:"")+'</p>\r\n <p class="pl-2 '+s(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.message:i,t))+'">'+s(l(null!=(i=null!=(i=null!=t?t.options:t)?i.message:i)?i.message:i,t))+"</p>\r\n </div> \r\n</div>\r\n"},3:function(e,t,n,o,r){e.propertyIsEnumerable;var i,l=e.escapeExpression;return'<span class="badge p-1 '+l(e.lambda(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.interactive:i,t))+'">'+l((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"interactive",{name:"lang",hash:{},data:r}))+"</span>\r\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,r){e.propertyIsEnumerable;var i,l=null!=t?t:e.nullContext||{};return'<div class="request-action-region"></div>\r\n<div class="p-3">\r\n'+(null!=(i=n.if.call(l,null!=(i=null!=t?t.options:t)?i.message:i,{name:"if",hash:{},fn:e.program(1,r,0),inverse:e.noop,data:r}))?i:"")+'<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!=(i=null!=(i=null!=t?t.video:t)?i.thumbnail:i)?i.url:i,t))+'"/>\r\n</div>\r\n'+(null!=(i=n.if.call(l,null!=(i=null!=t?t.options:t)?i.interactive:i,{name:"if",hash:{},fn:e.program(3,r,0),inverse:e.noop,data:r}))?i:"")+'<div class="video-info-region py-1"></div>\r\n</div>'},useData:!0})},1327:function(e,t,n){e.exports={avatar:"_2c8zD",message:"EQzqm",interactive:"mnE2L"}},1328:function(e,t,n){var o=n(10);e.exports=(o.default||o).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,o,r){e.propertyIsEnumerable;var i,l=e.escapeExpression,s=e.lambda;return'<div class="border-bottom">\r\n <h1 class="h3 p-3 m-0">'+l((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"staffRequests",{name:"lang",hash:{},data:r}))+'</h1>\r\n</div>\r\n<div class="request-list-region border-right d-inline-block '+l(s(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.requestList:i,t))+'"></div><div class="request-details-region border-left d-inline-block '+l(s(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.requestDetails:i,t))+'"></div>\r\n<div class="empty-region"></div>'},useData:!0})},1329:function(e,t,n){e.exports={requestList:"_3DFfh",requestDetails:"_2ezub"}},1465:function(e,t,n){"use strict";n.r(t);var o=n(6),r=n(5),i=n(3),l=n(2),s=n(102),a=n(489),c=n(488),u=n(307),f=n(0),p=n(200),d=n(144),h=n(9),y=n(255),m=n(29),g=n(1322),v=n.n(g),b=n(1323),w=n.n(b);function k(e){return(k="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function S(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function C(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function R(e,t,n){return t&&C(e.prototype,t),n&&C(e,n),e}function E(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}}),t&&x(e,t)}function x(e,t){return(x=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function O(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=_(e);if(t){var r=_(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return T(this,n)}}function T(e,t){return!t||"object"!==k(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function _(e){return(_=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var I=function(e){E(n,e);var t=O(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.a}},{key:"lang",get:function(){return"staffRequests.staffRequestItem"}},{key:"className",get:function(){var e="p-3 border-bottom cursor-pointer ".concat(w.a.item);return this.isSelected()&&(e+=" ".concat(w.a.selected)),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(){l.a.AppLinkHelper.trigger({application:f.b.STAFF_REQUESTS,action:f.a.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}(l.a.Component),q=function(e){E(n,e);var t=O(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 w.a.list}},{key:"childView",get:function(){return I}},{key:"childViewOptions",get:function(){return{selectedRequestId:this.options.selectedRequestId,currentUser:this.options.currentUser}}}]),n}(l.a.ComponentCollection),N=n(13),P=n(4),L=n(1145),D=n(1077),F=n(1040),M=n(30),j=n(42),A=n(48),U=n(84),V=n(1047),B=n(157),H=n(1186),Q=n(1107),K=n(1324),z=n.n(K),Y=n(1325),J=n.n(Y);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})(e)}function G(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 Z(e,t){return(Z=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function X(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=ee(e);if(t){var r=ee(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return $(this,n)}}function $(e,t){return!t||"object"!==W(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function ee(e){return(ee=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var te=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}}),t&&Z(e,t)}(s,e);var t,n,r,i=X(s);function s(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),i.call(this,e)}return t=s,(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 U.a,A.a.setSelected(this.folderTreeKey,this.viewModel.destinationFolder,this.folderCollection)}},{key:"name",get:function(){return"StaffRequestActionsComponent"}},{key:"template",get:function(){return J.a}},{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(z.a.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=A.a.getModelFromCollection(this.model.destinationFolder.get("id"),this.collection);n&&(e.destinationFolder=n.toJSON()),this.viewModel=M.a.get(this.viewModelName,e,{ctor:B.a}),this.viewModel.addValidation(H.a);var o=this.viewModel.get("destinationFolder");o&&(o.collection=n.collection)}},{key:"onLibrarySelected",value:function(e){this.viewModel.set("destinationLibrary",e.toJSON()),this.viewModel.unset("destinationFolder"),this.viewModel.set("destinationFolder",{}),A.a.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,A.a.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&&(l.a.AppLinkHelper.trigger({application:f.b.STAFF_REQUESTS,action:f.a.StaffRequests.APPROVE_REQUEST,args:[e,t,n]}),this.logStaffRequestAction(P.UserAction.Approve))}},{key:"onClickReject",value:function(){l.a.AppLinkHelper.trigger({application:f.b.STAFF_REQUESTS,action:f.a.StaffRequests.REJECT_REQUEST,args:[this.model.get("id")]}),this.logStaffRequestAction(P.UserAction.Reject)}},{key:"onClickCreateFolder",value:function(){l.a.AppLinkHelper.trigger({application:f.b.STAFF_REQUESTS,action:f.a.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")};j.a.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")};j.a.logUserAction(t,e)}},{key:"renderLibrarySelect",value:function(){this.collection.length<2||this.showChildView("librarySelect",new Q.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.a({collection:this.folderCollection,channelName:this.channelName,folderTreeKey:this.folderTreeKey,canCreateNew:!0}))}},{key:"viewOptions",value:function(){return{styles:z.a,sourceLibraryName:F.a.mapSourceToDisplayName(this.model.sourceLibrary),sourceClass:"".concat(z.a.source," ").concat(F.a.mapSourceToClass(this.model.sourceLibrary.get("type"))),showLibrarySelect:this.collection&&this.collection.length>1}}},{key:"onRender",value:function(){this.renderLibrarySelect(),this.renderFolderSelect(),o.Validation.bind(this,{model:this.viewModel})}}])&&G(t.prototype,n),r&&G(t,r),s}(l.a.Component),ne=n(1326),oe=n.n(ne),re=n(1327),ie=n.n(re);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})(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 ae(e,t){return(ae=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ce(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=fe(e);if(t){var r=fe(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return ue(this,n)}}function ue(e,t){return!t||"object"!==le(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function fe(e){return(fe=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var pe=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}}),t&&ae(e,t)}(i,e);var t,n,o,r=ce(i);function i(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),r.call(this,e)}return t=i,(n=[{key:"name",get:function(){return"StaffRequestDetailsComponent"}},{key:"template",get:function(){return oe.a}},{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 N.g.createUrl(n,{size:"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 te({model:this.model,collection:this.options.libraryCollection,disabledLibraryIds:this.options.disabledLibraryIds,staffRequestsChannel:this.options.channelName}))}},{key:"renderVideoPreview",value:function(){this.showChildView("preview",new D.a({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 L.a({model:this.model.video,config:this.options.config,externalSeriesLink:!0}))}},{key:"viewOptions",value:function(){return{styles:ie.a,avatarUrl:this.getAvatarUrl(),message:this.collection&&this.collection.length&&this.collection.first().toJSON(),interactive:F.a.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()}}])&&se(t.prototype,n),o&&se(t,o),i}(l.a.Component),de=n(146),he=n(1328),ye=n.n(he),me=n(1329),ge=n.n(me);function ve(e){return(ve="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}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 we(e,t){return(we=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ke(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=Ce(e);if(t){var r=Ce(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Se(this,n)}}function Se(e,t){return!t||"object"!==ve(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Ce(e){return(Ce=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n.d(t,"StaffRequestsView",(function(){return Re}));var Re=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}}),t&&we(e,t)}(v,e);var t,n,m,g=ke(v);function v(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,v),(t=g.call(this,e)).unavailableLibraryIds=[],t}return t=v,(n=[{key:"initialize",value:function(){this.staffRequestDataService=r.a.getInstance(f.g.StaffRequests,this),this.videoDataService=r.a.getInstance(f.g.Video,this),this.options.referrer===a.a.Notification&&this.staffRequestDataService.clearRequestCache(),this.bindListeners()}},{key:"name",get:function(){return"StaffRequestsView"}},{key:"lang",get:function(){return"staffRequests.staffRequests"}},{key:"title",get:function(){return i.a.getPhrase(this.lang,"title")}},{key:"template",get:function(){return ye.a}},{key:"className",get:function(){return"bg-white"}},{key:"channelName",get:function(){return"".concat(this.name).concat(this.cid)}},{key:"regions",value:function(){return{requestList:{el:".request-list-region",partialLoading:h.h.StaffRequestList,replaceElement:!1},requestDetails:{el:".request-details-region",partialLoading:h.h.StaffRequestDetails,replaceElement:!1},emptyState:{el:".empty-region",replaceElement:!0}}}},{key:"behaviors",get:function(){var e=this;return[{behaviorClass:u.a,collectionName:"staffRequestCollection",region:"emptyState",type:h.c.StaffRequests,shouldRender:c.a.isCollectionEmpty.bind(null,this,"staffRequestCollection"),componentOptions:{description:function(){return e.getEmptyStateDescription()},emptyState:function(){return i.a.getPhrase(e.lang,"emptyStateHeading")}},emptyStateComponents:f.h}]}},{key:"bindListeners",value:function(){if(this.listenTo(f.e.LIBRARY,"folder:created",this.onFolderCreated),this.options.requestId){this.listenTo(f.e.STAFF_REQUEST,"cache:cleared",this.render);var e="".concat(f.f.STAFF_REQUEST_BY_ID,":").concat(this.options.requestId);this.listenTo(f.e.STAFF_REQUEST,"".concat(e,":sync"),this.render),this.listenTo(f.e.STAFF_REQUEST,"".concat(e,":error"),this.onError),this.listenTo(f.e.STAFF_REQUEST,"".concat(f.f.STAFF_REQUESTS,":invalidate"),this.onUpdate);var t="".concat(f.f.STAFF_REQUEST_MESSAGES,":").concat(this.options.requestId);this.listenTo(f.e.STAFF_REQUEST,"".concat(t,":sync"),this.render),this.listenTo(f.e.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(),l.a.AppLinkHelper.trigger({application:f.b.STAFF_REQUESTS,action:f.a.StaffRequests.EDIT_REQUEST,args:[e.id]},{replace:!0})):this.render()}},{key:"onError",value:function(){this.redirectToHome()}},{key:"onFolderCreated",value:function(e){o.Radio.channel(this.channelName).trigger("select:folder",e),this.render()}},{key:"redirectToHome",value:function(){l.a.AppLinkHelper.trigger({application:f.b.STAFF_REQUESTS,action:f.a.StaffRequests.HOME})}},{key:"getEmptyStateDescription",value:function(){return this.libraryCollection?!this.libraryCollection.length||this.libraryCollection.every((function(e){return e.get("status")!==s.a.Published}))?i.a.getPhrase(this.lang,"emptyStateNoLibraries"):i.a.getPhrase(this.lang,"emptyStateDescription"):""}},{key:"renderRequestList",value:function(){this.staffRequestCollection?this.showChildView("requestList",new q({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 pe({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:ge.a}}},{key:"requiredResources",get:function(){return{config:p.b.config,libraryCollection:de.b.libraries,currentUser:d.b.currentUser}}},{key:"onBeforeRender",value:function(){return this.fetchData(),!this.model||this.model.get("status")===y.a.Pending||(this.redirectToHome(),!1)}},{key:"onRender",value:function(){this.renderRequestList(),this.renderRequestDetails()}}])&&be(t.prototype,n),m&&be(t,m),v}(l.a.View)}}]);
1
+ (window.webpackJsonp_clickview_library_editor=window.webpackJsonp_clickview_library_editor||[]).push([[14],{1044:function(e,t,n){"use strict";n.d(t,"a",(function(){return v}));var o=n(6),r=n(2),i=n(3),l=n(1058),s=n(13),a=n(1045),c=n.n(a),u=n(1046),f=n.n(u);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})(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||function(e,t){return e.__proto__=t,e})(e,t)}function y(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=g(e);if(t){var r=g(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return m(this,n)}}function m(e,t){return!t||"object"!==p(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function g(e){return(g=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(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}}),t&&h(e,t)}(u,e);var t,n,r,a=y(u);function u(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,u),a.call(this,e)}return t=u,(n=[{key:"initialize",value:function(){this.listenTo(this.options.channelName,"folder:selected new:folder:selected",this.setButtonText),this.listenTo(this.options.channelName,"re:render:selector",this.renderSelector),this.disabledIds=this.options.disabledIds&&this.options.disabledIds.reduce((function(e,t){return Object.assign(Object.assign({},e),function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}({},t,!0))}),{})}},{key:"name",get:function(){return"TreeDropdownComponent"}},{key:"template",get:function(){return c.a}},{key:"className",get:function(){return"position-relative"}},{key:"lang",get:function(){return"libraryEditor.treeDropdown"}},{key:"regions",value:function(){return{selector:{el:".selector-region",replaceElement:!1}}}},{key:"events",value:function(){return{"click .create-new":"onClickCreateNew"}}},{key:"defaults",get:function(){return{disabledIds:[]}}},{key:"elements",get:function(){return{button:".custom-select"}}},{key:"onClickCreateNew",value:function(e){e.preventDefault(),o.Radio.channel(this.options.channelName).trigger("create:folder:clicked")}},{key:"setButtonText",value:function(e,t){if(e&&!t){var n=e.get("name");this.getUI("button").text(n)}else{var o=s.f.getSelected(this.options.folderTreeKey,this.collection),r=o?o.get("name"):i.a.getPhrase(this.lang,"button");this.getUI("button").text(r)}}},{key:"renderSelector",value:function(){this.showChildView("selector",new l.a({styles:f.a,collection:this.collection,channelName:this.options.channelName,childrenProperty:"children",folderTreeId:this.options.folderTreeKey,extraClass:f.a.list,extraClasses:f.a.list,isSelector:!0,disabledIds:this.disabledIds||{}}))}},{key:"viewOptions",value:function(){return{styles:f.a,name:this.options.name||this.options.channelName,buttonText:this.buttonText,canCreateNew:this.options.canCreateNew}}},{key:"onRender",value:function(){this.setButtonText(),this.renderSelector()}}])&&d(t.prototype,n),r&&d(t,r),u}(r.a.Component)},1045:function(e,t,n){var o=n(10);e.exports=(o.default||o).template({1:function(e,t,n,o,r){e.propertyIsEnumerable;var i,l=e.escapeExpression;return' <button class="create-new btn font-weight-bold rounded-0 w-100 text-left '+l(e.lambda(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.customItem:i,t))+'">'+l((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"createNew",{name:"lang",hash:{},data:r}))+"</button>\r\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,r){e.propertyIsEnumerable;var i,l=e.lambda,s=e.escapeExpression;return'<button\r\n class="'+s(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.selectBtn:i,t))+' custom-select form-control"\r\n data-toggle="dropdown"\r\n aria-haspopup="true"\r\n aria-expanded="false"\r\n name='+s(l(null!=(i=null!=t?t.options:t)?i.name:i,t))+"\r\n>"+s(l(null!=(i=null!=t?t.options:t)?i.buttonText:i,t))+'</button>\r\n<div class="dropdown-menu '+s(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.selector:i,t))+'">\r\n <div class="selector-region"></div>\r\n'+(null!=(i=n.if.call(null!=t?t:e.nullContext||{},null!=(i=null!=t?t.options:t)?i.canCreateNew:i,{name:"if",hash:{},fn:e.program(1,r,0),inverse:e.noop,data:r}))?i:"")+'</div>\r\n<div class="form-feedback"></div>'},useData:!0})},1046:function(e,t,n){e.exports={selectBtn:"_2TTgs",list:"_3wN7o",selector:"_3Xf1P",customItem:"_199PI"}},1081:function(e,t,n){"use strict";n.d(t,"a",(function(){return v}));var o=n(1),r=n(6),i=n(2),l=n(1036),s=n(13),a=n(1082),c=n.n(a),u=n(1083),f=n.n(u);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})(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||function(e,t){return e.__proto__=t,e})(e,t)}function y(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=g(e);if(t){var r=g(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return m(this,n)}}function m(e,t){return!t||"object"!==p(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function g(e){return(g=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(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}}),t&&h(e,t)}(u,e);var t,n,i,a=y(u);function u(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,u),(t=a.call(this,e)).selectSearch="",t.sameCharIndex=1,t.optionStep=1,t}return t=u,(n=[{key:"initialize",value:function(){this.setModel(),this.bindListeners()}},{key:"name",get:function(){return"SelectComponent"}},{key:"template",get:function(){return c.a}},{key:"regions",value:function(){return{dropdown:{el:".dropdown-region",replaceElement:!0}}}},{key:"events",value:function(){return{keydown:"onKeydown","shown.bs.dropdown":"onShowDropdown"}}},{key:"defaults",get:function(){return{displayProperty:"name"}}},{key:"elements",get:function(){return{dropdownToggle:".dropdown-toggle"}}},{key:"bindListeners",value:function(){this.listenTo(this.options.channelName,this.options.childOptions.eventName,this.onSelect)}},{key:"onShowDropdown",value:function(){r.Radio.channel(this.options.channelName).trigger("center:dropdown")}},{key:"onKeydown",value:function(e){38===e.keyCode||40===e.keyCode?this.onArrowKeyDown(e):13===e.keyCode?this.render():this.onType(e),r.Radio.channel(this.options.channelName).trigger("center:dropdown")}},{key:"onArrowKeyDown",value:function(e){s.c.getSelected(this.collection)?this.optionStep=1:this.optionStep=0;var t=this.getNextModel(e.keyCode);for(t||(s.c.deselectAll(this.collection),t=this.getNextModel(e.keyCode));this.isDisabled(t);)this.optionStep++,t=this.getNextModel(e.keyCode);this.onSelect(t)}},{key:"onType",value:function(e){if(1===e.key.toString().length){var t=this.getModelMatch(e);t&&this.onSelect(t),this.runTimer()}}},{key:"onSelect",value:function(e){this.isDisabled(e)||(s.c.setSelected(e.get("id"),this.collection),this.setModel(),this.getUI("dropdownToggle").text(this.getButtonText()),r.Radio.channel(this.options.channelName).trigger("select:option:selected",e))}},{key:"setModel",value:function(){this.model=s.c.getSelected(this.collection)}},{key:"getNextModel",value:function(e){var t,n=s.c.getSelected(this.collection)||this.collection.first(),o=this.collection.indexOf(n);return(t=38===e?this.collection.at(o-this.optionStep):this.collection.at(o+this.optionStep))||(s.c.deselectAll(this.collection),t=this.collection.first(),this.optionStep=0),t}},{key:"getModelMatch",value:function(e){var t,n=this;return 1===this.selectSearch.length&&this.selectSearch===e.key?t=this.handleSameCharIndex(e.key):(this.selectSearch+=e.key,this.sameCharIndex=1),t||(t=o.find(this.collection.models,(function(e){return e.get(n.options.displayProperty).toLowerCase().slice(0,n.selectSearch.length).includes(n.selectSearch.toLowerCase())}))),t}},{key:"handleSameCharIndex",value:function(e){var t=this,n=o.filter(this.collection.models,(function(n){return n.get(t.options.displayProperty).toLowerCase().slice(0,1)===e}));if(n.length>1){var r=n[this.sameCharIndex];return r||(r=o.first(n),this.sameCharIndex=0),this.sameCharIndex++,r}return o.first(n)}},{key:"runTimer",value:function(){var e=this;this.scopedTimerIndex&&clearTimeout(this.scopedTimerIndex),this.scopedTimerIndex=window.setTimeout((function(){e.selectSearch=""}),500)}},{key:"isDisabled",value:function(e){var t;if(e.get("divider"))return!0;if(!o.isFunction(this.options.childOptions.isDisabled))return!1;for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return(t=this.options.childOptions.isDisabled).call.apply(t,[this,e].concat(r))}},{key:"getButtonText",value:function(){if(this.options.disabled)return this.options.noOptionsText;var e=s.c.getSelected(this.collection);return e&&e.get(this.options.displayProperty)||this.options.placeholderText}},{key:"viewOptions",value:function(){return{styles:f.a,inputName:this.options.inputName,disabled:this.options.disabled,placeholderText:this.getButtonText()}}},{key:"onRender",value:function(){this.showChildView("dropdown",new l.a({collection:this.collection,channelName:this.options.channelName,childOptions:o.extend(this.options.childOptions),displayOptions:{extraClasses:"w-100 ".concat(f.a.dropdownMenu)},analyticsHelper:this.options.analyticsHelper}))}}])&&d(t.prototype,n),i&&d(t,i),u}(i.a.Component)},1082:function(e,t,n){var o=n(10);e.exports=(o.default||o).template({1:function(e,t,n,o,r){var i;e.propertyIsEnumerable;return e.escapeExpression(e.lambda(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.disabled:i,t))},3:function(e,t,n,o,r){return" disabled"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,r){e.propertyIsEnumerable;var i,l=e.lambda,s=e.escapeExpression,a=null!=t?t:e.nullContext||{};return'<button \r\n class="dropdown-toggle form-control btn-block text-left position-relative '+s(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.selectButton:i,t))+" "+(null!=(i=n.if.call(a,null!=(i=null!=t?t.options:t)?i.disabled:i,{name:"if",hash:{},fn:e.program(1,r,0),inverse:e.noop,data:r}))?i:"")+'" \r\n type="button" \r\n id="dropdownMenuButton" \r\n data-toggle="dropdown" \r\n aria-haspopup="true" \r\n aria-expanded="false"\r\n '+(null!=(i=n.if.call(a,null!=(i=null!=t?t.options:t)?i.disabled:i,{name:"if",hash:{},fn:e.program(3,r,0),inverse:e.noop,data:r}))?i:"")+' \r\n name="'+s(l(null!=(i=null!=t?t.options:t)?i.inputName:i,t))+'"\r\n >\r\n '+s(l(null!=(i=null!=t?t.options:t)?i.placeholderText:i,t))+'\r\n</button>\r\n<div class="dropdown-region"></div>\r\n<div class="form-feedback"></div>'},useData:!0})},1083:function(e,t,n){e.exports={dropdownMenu:"_2RaQu",selectButton:"_2xGqi",disabled:"_15kWr"}},1104:function(e,t,n){"use strict";n.d(t,"a",(function(){return v}));var o=n(1),r=n(6),i=n(2),l=n(3),s=n(42),a=n(1081),c=n(13),u=n(1105),f=n.n(u);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})(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||function(e,t){return e.__proto__=t,e})(e,t)}function y(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=g(e);if(t){var r=g(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return m(this,n)}}function m(e,t){return!t||"object"!==p(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function g(e){return(g=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(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}}),t&&h(e,t)}(p,e);var t,n,i,u=y(p);function p(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,p),u.call(this,e)}return t=p,(n=[{key:"initialize",value:function(){this.bindListeners(),c.c.deselectAll(this.collection),c.c.setSelected(this.options.currentLibraryId,this.collection)}},{key:"name",get:function(){return"LibrarySelectComponent"}},{key:"channelName",get:function(){return"".concat(this.name).concat(this.cid)}},{key:"className",get:function(){return"position-relative"}},{key:"lang",get:function(){return"libraryEditor.librarySelect"}},{key:"template",get:function(){return f.a}},{key:"regions",value:function(){return{dropdown:{el:".dropdown-menu-region",replaceElement:!0}}}},{key:"bindListeners",value:function(){var e=this;this.listenTo(this.channelName,"select:option:selected",(function(t){r.Radio.channel(e.options.channelName).trigger("library:selected",t)}))}},{key:"getIsOptionDisabledFn",value:function(){var e=this.options.disabledLibraryIds;return function(t){var n=t||this.model;if(o.contains(e,n.get("id")+""))return!0}}},{key:"onRender",value:function(){this.showChildView("dropdown",new a.a({collection:this.collection,channelName:this.channelName,childOptions:{titleProperty:"name",eventName:"select:option:click",isDisabled:this.getIsOptionDisabledFn()},placeholderText:this.options.placeholderText||l.a.getPhrase(this.lang,"placeholder"),noOptionsText:l.a.getPhrase(this.lang,"noLibraries"),inputName:this.options.inputName,disabled:0===this.collection.length||this.options.disabled,analyticsHelper:s.a}))}}])&&d(t.prototype,n),i&&d(t,i),p}(i.a.Component)},1105:function(e,t,n){var o=n(10);e.exports=(o.default||o).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,o,r){return'<div class="dropdown-menu-region"></div>\r\n<div class="form-feedback"></div>'},useData:!0})},1142:function(e,t,n){"use strict";n.d(t,"a",(function(){return E}));var o=n(1),r=n(29),i=n(2),l=n(59),s=n(17),a=n(142),c=n(0),u=n(9),f=n(1057),p=n(1032),d=n(1033),h=n(1143),y=n.n(h),m=n(1144),g=n.n(m),v=n(3);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})(e)}function w(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 k(e,t){return(k=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function S(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=R(e);if(t){var r=R(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return C(this,n)}}function C(e,t){return!t||"object"!==b(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function R(e){return(R=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(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}}),t&&k(e,t)}(m,e);var t,n,i,h=S(m);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"VideoBasicInfoComponent"}},{key:"template",get:function(){return g.a}},{key:"lang",get:function(){return"shared.videoBasicInfo"}},{key:"defaults",get:function(){return{truncateDescription:!0}}},{key:"behaviors",get:function(){return[{behaviorClass:a.a,selector:".tool-tip"}]}},{key:"regions",value:function(){return{description:{el:".description-region",replaceElement:!0,partialLoading:u.h.VideoBasicInfo},series:{el:".series-region",replaceElement:!0}}}},{key:"appLinks",get:function(){return{".applink-publisher-video":{application:c.b.LIBRARY_EDITOR,action:c.a.LibraryEditor.SHOW_PUBLISHER_VIDEO,args:[this.model.get("id")]}}}},{key:"getBroadcastDate",value:function(){return this.model.get("dateBroadcast")?r(this.model.get("dateBroadcast")).format(u.l.FULL_YEAR):""}},{key:"getSeriesUrl",value:function(){if(this.options.externalSeriesLink&&this.model.series)return l.a.urlBuilder(l.a.safeUrlConcat(this.options.config.get("onlineUrl"),"series/".concat(this.model.series.id)),{loginPrompt:!1})}},{key:"renderSeries",value:function(){this.model.series&&this.model.series.get("name")&&this.showChildView("series",new p.a({model:this.model,highlight:!1,seriesUrl:this.getSeriesUrl(),styleUppercase:!1}))}},{key:"renderDescription",value:function(){if(this.model&&this.model.get("description")){var e=new f.a({model:this.model,linkify:!0,size:f.b.Large,truncate:this.options.truncateDescription,allowExpand:!0});this.showChildView("description",e)}}},{key:"getSubtitleLanguage",value:function(){var e=this;return this.model.subtitles&&this.model.get("subtitles").length?o.uniq(this.model.get("subtitles").map((function(t){var n,o=t.get("language"),r=CVLanguages.getFullEnglishName(o);return(null===(n=t.get("metadata"))||void 0===n?void 0:n.autoGenerated)?v.a.getPhrase(e.lang,"autoGenerated",{name:r}):r}))).join(", "):""}},{key:"getCitationHeading",value:function(e,t,n){return this.model.get(e)?this.model.get(e).length>1?n:t:""}},{key:"getCitationHeadings",value:function(){return{productionCompaniesText:this.getCitationHeading(u.a.ProductionCompany,"Production Company","Production Companies"),producersText:this.getCitationHeading(u.a.Producer,"Producer","Producers"),disributorsText:this.getCitationHeading(u.a.Distributor,"Distributor","Distributors"),directorsText:this.getCitationHeading(u.a.Director,"Director","Directors")}}},{key:"viewOptions",value:function(){return Object.assign({styles:y.a,ratingClass:this.model.rating&&d.h.mapRatingToClass(this.model.rating.get("value")),broadcastDate:this.getBroadcastDate(),showHeading:this.options.showHeading,subtitles:this.getSubtitleLanguage(),publisherArchiveSvg:s.a.getSvg(s.b.PublisherArchive),showPublisherVideoDetails:this.options.showPublisherVideoDetails},this.getCitationHeadings())}},{key:"onRender",value:function(){this.renderSeries(),this.renderDescription()}}])&&w(t.prototype,n),i&&w(t,i),m}(i.a.Component)},1143:function(e,t,n){e.exports={columnNames:"_1N_VT",seriesContainer:"_4pk2s",icon:"_3SoBV",citationValues:"_1nYZg"}},1144:function(e,t,n){var o=n(10);e.exports=(o.default||o).template({1:function(e,t,n,o,r){e.propertyIsEnumerable;var i,l=null!=t?t:e.nullContext||{};return'<div class="position-relative">\r\n <h5 class="d-inline-block">'+e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(l,"basicInfo",{name:"lang",hash:{},data:r}))+"</h5>\r\n"+(null!=(i=n.if.call(l,null!=(i=null!=t?t.options:t)?i.showPublisherVideoDetails:i,{name:"if",hash:{},fn:e.program(2,r,0),inverse:e.noop,data:r}))?i:"")+"</div>\r\n"},2:function(e,t,n,o,r){e.propertyIsEnumerable;var i,l=e.lambda,s=e.escapeExpression;return' <a class="float-right cursor-pointer applink-publisher-video">\r\n <span class="d-inline-block align-middle '+s(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.icon:i,t))+'">'+(null!=(i=l(null!=(i=null!=t?t.options:t)?i.publisherArchiveSvg:i,t))?i:"")+"</span> "+s((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"viewInPublisherArchive",{name:"lang",hash:{},data:r}))+"\r\n </a>\r\n"},4:function(e,t,n,o,r){e.propertyIsEnumerable;var i,l,s=e.escapeExpression,a=null!=t?t:e.nullContext||{},c=e.hooks.helperMissing;return' <div class="col-3 '+s(e.lambda(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.columnNames:i,t))+'">'+s((n.lang||t&&t.lang||c).call(a,"videoTitle",{name:"lang",hash:{},data:r}))+'</div>\r\n <p class="col-9">'+s("function"==typeof(l=null!=(l=n.name||(null!=t?t.name:t))?l:c)?l.call(a,{name:"name",hash:{},data:r}):l)+"</p>\r\n"},6:function(e,t,n,o,r){e.propertyIsEnumerable;var i,l=e.lambda,s=e.escapeExpression;return' <div class="col-3 '+s(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.columnNames:i,t))+'">'+s((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"series",{name:"lang",hash:{},data:r}))+'</div>\r\n <div class="col-9 '+s(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.seriesContainer:i,t))+'"><div class="series-region"></div></div>\r\n'},8:function(e,t,n,o,r){e.propertyIsEnumerable;var i,l=e.lambda,s=e.escapeExpression;return' <div class="col-3 '+s(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.columnNames:i,t))+'">'+s((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"rating",{name:"lang",hash:{},data:r}))+'</div>\r\n <p class="col-9"><span class="p-1 badge text-white tool-tip '+s(l(null!=(i=null!=t?t.options:t)?i.ratingClass:i,t))+" "+s(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.rating:i,t))+'" title="'+s(l(null!=(i=null!=t?t.rating:t)?i.name:i,t))+'">'+s(l(null!=(i=null!=t?t.rating:t)?i.code:i,t))+"</span></p>\r\n"},10:function(e,t,n,o,r){e.propertyIsEnumerable;var i,l=e.escapeExpression;return' <div class="col-3 '+l(e.lambda(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.columnNames:i,t))+'">'+l((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"description",{name:"lang",hash:{},data:r}))+'</div>\r\n <div class="col-9">\r\n <div class="description-region"></div>\r\n </div>\r\n'},12:function(e,t,n,o,r){e.propertyIsEnumerable;var i,l,s=e.escapeExpression,a=null!=t?t:e.nullContext||{},c=e.hooks.helperMissing;return' <div class="col-3 '+s(e.lambda(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.columnNames:i,t))+'">'+s((n.lang||t&&t.lang||c).call(a,"productionYear",{name:"lang",hash:{},data:r}))+'</div>\r\n <p class="col-9">'+s("function"==typeof(l=null!=(l=n.productionYear||(null!=t?t.productionYear:t))?l:c)?l.call(a,{name:"productionYear",hash:{},data:r}):l)+"</p>\r\n"},14:function(e,t,n,o,r){e.propertyIsEnumerable;var i,l=e.lambda,s=e.escapeExpression,a=null!=t?t:e.nullContext||{};return' <div class="col-3 '+s(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.columnNames:i,t))+'">'+s((n.lang||t&&t.lang||e.hooks.helperMissing).call(a,"producers",{name:"lang",hash:{},data:r}))+'</div>\r\n <div class="col-9 '+s(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.citationValues:i,t))+'">\r\n <p>\r\n'+(null!=(i=n.each.call(a,null!=t?t.producers:t,{name:"each",hash:{},fn:e.program(15,r,0),inverse:e.noop,data:r}))?i:"")+" </p>\r\n </div>\r\n"},15:function(e,t,n,o,r){var i;e.propertyIsEnumerable;return" <span>"+e.escapeExpression("function"==typeof(i=null!=(i=n.name||(null!=t?t.name:t))?i:e.hooks.helperMissing)?i.call(null!=t?t:e.nullContext||{},{name:"name",hash:{},data:r}):i)+"</span>\r\n"},17:function(e,t,n,o,r){e.propertyIsEnumerable;var i,l=e.lambda,s=e.escapeExpression,a=null!=t?t:e.nullContext||{};return' <div class="col-3 '+s(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.columnNames:i,t))+'">'+s((n.lang||t&&t.lang||e.hooks.helperMissing).call(a,"directors",{name:"lang",hash:{},data:r}))+'</div>\r\n <div class="col-9 '+s(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.citationValues:i,t))+'">\r\n <p>\r\n'+(null!=(i=n.each.call(a,null!=t?t.directors:t,{name:"each",hash:{},fn:e.program(15,r,0),inverse:e.noop,data:r}))?i:"")+" </p>\r\n </div>\r\n"},19:function(e,t,n,o,r){e.propertyIsEnumerable;var i,l=e.lambda,s=e.escapeExpression,a=null!=t?t:e.nullContext||{};return' <div class="col-3 '+s(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.columnNames:i,t))+'">'+s((n.lang||t&&t.lang||e.hooks.helperMissing).call(a,"productionCompanies",{name:"lang",hash:{},data:r}))+'</div>\r\n <div class="col-9 '+s(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.citationValues:i,t))+'">\r\n <p>\r\n'+(null!=(i=n.each.call(a,null!=t?t.productionCompanies:t,{name:"each",hash:{},fn:e.program(15,r,0),inverse:e.noop,data:r}))?i:"")+" </p>\r\n </div>\r\n"},21:function(e,t,n,o,r){e.propertyIsEnumerable;var i,l=e.lambda,s=e.escapeExpression,a=null!=t?t:e.nullContext||{};return' <div class="col-3 '+s(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.columnNames:i,t))+'">'+s((n.lang||t&&t.lang||e.hooks.helperMissing).call(a,"distributors",{name:"lang",hash:{},data:r}))+'</div>\r\n <div class="col-9 '+s(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.citationValues:i,t))+'">\r\n <p>\r\n'+(null!=(i=n.each.call(a,null!=t?t.distributors:t,{name:"each",hash:{},fn:e.program(15,r,0),inverse:e.noop,data:r}))?i:"")+" </p>\r\n </div>\r\n"},23:function(e,t,n,o,r){var i;e.propertyIsEnumerable;return null!=(i=n.if.call(null!=t?t:e.nullContext||{},null!=t?t.channel:t,{name:"if",hash:{},fn:e.program(24,r,0),inverse:e.noop,data:r}))?i:""},24:function(e,t,n,o,r){e.propertyIsEnumerable;var i,l=e.lambda,s=e.escapeExpression;return'\r\n <div class="col-3 '+s(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.columnNames:i,t))+'">'+s((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"channel",{name:"lang",hash:{},data:r}))+'</div>\r\n <p class="col-9">'+s(l(null!=(i=null!=t?t.channel:t)?i.name:i,t))+"</p>\r\n "},26:function(e,t,n,o,r){e.propertyIsEnumerable;var i,l=e.lambda,s=e.escapeExpression;return' <div class="col-3 '+s(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.columnNames:i,t))+'">'+s((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"broadcastDate",{name:"lang",hash:{},data:r}))+'</div>\r\n <p class="col-9">'+s(l(null!=(i=null!=t?t.options:t)?i.broadcastDate:i,t))+"</p>\r\n"},28:function(e,t,n,o,r){e.propertyIsEnumerable;var i,l=e.lambda,s=e.escapeExpression;return' <div class="col-3 '+s(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.columnNames:i,t))+'">'+s((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"subtitles",{name:"lang",hash:{},data:r}))+'</div>\r\n <p class="col-9">'+s(l(null!=(i=null!=t?t.options:t)?i.subtitles:i,t))+"</p>\r\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,r){e.propertyIsEnumerable;var i,l=null!=t?t:e.nullContext||{};return(null!=(i=n.if.call(l,null!=(i=null!=t?t.options:t)?i.showHeading:i,{name:"if",hash:{},fn:e.program(1,r,0),inverse:e.noop,data:r}))?i:"")+'<div class="row mb-0">\r\n'+(null!=(i=n.if.call(l,null!=t?t.name:t,{name:"if",hash:{},fn:e.program(4,r,0),inverse:e.noop,data:r}))?i:"")+"\r\n"+(null!=(i=n.if.call(l,null!=(i=null!=t?t.series:t)?i.name:i,{name:"if",hash:{},fn:e.program(6,r,0),inverse:e.noop,data:r}))?i:"")+"\r\n"+(null!=(i=n.if.call(l,null!=(i=null!=t?t.rating:t)?i.code:i,{name:"if",hash:{},fn:e.program(8,r,0),inverse:e.noop,data:r}))?i:"")+"\r\n"+(null!=(i=n.if.call(l,null!=t?t.description:t,{name:"if",hash:{},fn:e.program(10,r,0),inverse:e.noop,data:r}))?i:"")+"\r\n"+(null!=(i=n.if.call(l,null!=t?t.productionYear:t,{name:"if",hash:{},fn:e.program(12,r,0),inverse:e.noop,data:r}))?i:"")+"\r\n"+(null!=(i=n.if.call(l,null!=(i=null!=t?t.producers:t)?i.length:i,{name:"if",hash:{},fn:e.program(14,r,0),inverse:e.noop,data:r}))?i:"")+"\r\n"+(null!=(i=n.if.call(l,null!=(i=null!=t?t.directors:t)?i.length:i,{name:"if",hash:{},fn:e.program(17,r,0),inverse:e.noop,data:r}))?i:"")+"\r\n"+(null!=(i=n.if.call(l,null!=(i=null!=t?t.productionCompanies:t)?i.length:i,{name:"if",hash:{},fn:e.program(19,r,0),inverse:e.noop,data:r}))?i:"")+"\r\n"+(null!=(i=n.if.call(l,null!=(i=null!=t?t.distributors:t)?i.length:i,{name:"if",hash:{},fn:e.program(21,r,0),inverse:e.noop,data:r}))?i:"")+"\r\n "+(null!=(i=n.if.call(l,null!=(i=null!=t?t.channel:t)?i.name:i,{name:"if",hash:{},fn:e.program(23,r,0),inverse:e.noop,data:r}))?i:"")+"\r\n\r\n"+(null!=(i=n.if.call(l,null!=(i=null!=t?t.options:t)?i.broadcastDate:i,{name:"if",hash:{},fn:e.program(26,r,0),inverse:e.noop,data:r}))?i:"")+"\r\n"+(null!=(i=n.if.call(l,null!=(i=null!=t?t.options:t)?i.subtitles:i,{name:"if",hash:{},fn:e.program(28,r,0),inverse:e.noop,data:r}))?i:"")+"</div>"},useData:!0})},1183:function(e,t,n){"use strict";var o=n(3),r="staffRequests.utils",i={destinationLibrary:function(e){if(!e||!e.id)return o.a.getPhrase(r,"selectLibrary")},destinationFolder:function(e){if(!e||!e.id)return o.a.getPhrase(r,"selectFolder")}},l={message:[{required:!0,msg:function(){return o.a.getPhrase("staffRequests.utils","provideMessage")}}]};n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return l}))},1319:function(e,t,n){var o=n(10);e.exports=(o.default||o).template({1:function(e,t,n,o,r){return" text-muted"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,r){e.propertyIsEnumerable;var i,l,s=e.lambda,a=e.escapeExpression,c=null!=t?t:e.nullContext||{},u=e.hooks.helperMissing;return'<h6 class="mb-1">'+a(s(null!=(i=null!=t?t.video:t)?i.name:i,t))+'</h6>\r\n<p class="m-0">'+a((n.lang||t&&t.lang||u).call(c,"request",{name:"lang",hash:{lastName:null!=(i=null!=t?t.options:t)?i.lastName:i,firstName:null!=(i=null!=t?t.options:t)?i.firstName:i},data:r}))+'</p>\r\n<time class="m-0'+(null!=(i=n.unless.call(c,null!=(i=null!=t?t.options:t)?i.isSelected:i,{name:"unless",hash:{},fn:e.program(1,r,0),inverse:e.noop,data:r}))?i:"")+'" datetime='+a("function"==typeof(l=null!=(l=n.dateCreated||(null!=t?t.dateCreated:t))?l:u)?l.call(c,{name:"dateCreated",hash:{},data:r}):l)+">"+a(s(null!=(i=null!=t?t.options:t)?i.dateRequested:i,t))+"</time"},useData:!0})},1320:function(e,t,n){e.exports={list:"_3aP3V",item:"_1uqg-",selected:"_29kkj"}},1321:function(e,t,n){e.exports={actions:"_2xyI4",source:"_153F1",button:"_3I7SQ"}},1322:function(e,t,n){var o=n(10);e.exports=(o.default||o).template({1:function(e,t,n,o,r){var i;e.propertyIsEnumerable;return" <span>"+e.escapeExpression(e.lambda(null!=(i=null!=t?t.sourceFolder:t)?i.name:i,t))+"</span>\r\n"},3:function(e,t,n,o,r){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,o,r){e.propertyIsEnumerable;var i,l=null!=t?t:e.nullContext||{},s=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||s).call(l,"source",{name:"lang",hash:{},data:r}))+'</strong></div>\r\n <div class="col-5">\r\n <span class="badge p-1 mr-1 '+a(c(null!=(i=null!=t?t.options:t)?i.sourceClass:i,t))+'">'+a(c(null!=(i=null!=t?t.options:t)?i.sourceLibraryName:i,t))+"</span>\r\n"+(null!=(i=n.if.call(l,null!=(i=null!=t?t.sourceFolder:t)?i.name:i,{name:"if",hash:{},fn:e.program(1,r,0),inverse:e.noop,data:r}))?i:"")+' </div>\r\n <div class="col-4 text-right">\r\n <button class="btn btn-success btn-sm '+a(c(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.button:i,t))+' approve" type="button">'+a((n.lang||t&&t.lang||s).call(l,"approve",{name:"lang",hash:{},data:r}))+'</button>\r\n <button class="btn btn-light btn-sm border-secondary '+a(c(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.button:i,t))+' reject" type="button">'+a((n.lang||t&&t.lang||s).call(l,"reject",{name:"lang",hash:{},data:r}))+'</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||s).call(l,"moveVideo",{name:"lang",hash:{},data:r}))+'</strong></div>\r\n <div class="col-5">\r\n'+(null!=(i=n.if.call(l,null!=(i=null!=t?t.options:t)?i.showLibrarySelect:i,{name:"if",hash:{},fn:e.program(3,r,0),inverse:e.noop,data:r}))?i:"")+' <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})},1323:function(e,t,n){var o=n(10);e.exports=(o.default||o).template({1:function(e,t,n,o,r){e.propertyIsEnumerable;var i,l=e.lambda,s=e.escapeExpression;return'<div class="border-bottom">\r\n <div class="d-inline-block mr-2 '+s(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.avatar:i,t))+'" style="background-image: url(\''+s(l(null!=(i=null!=t?t.options:t)?i.avatarUrl:i,t))+'\')">\r\n &nbsp\r\n </div>\r\n <div class="d-inline-block">\r\n <p>'+(null!=(i=(n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"requestNote",{name:"lang",hash:{lastName:null!=(i=null!=t?t.options:t)?i.lastName:i,firstName:null!=(i=null!=t?t.options:t)?i.firstName:i},data:r}))?i:"")+'</p>\r\n <p class="pl-2 '+s(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.message:i,t))+'">'+s(l(null!=(i=null!=(i=null!=t?t.options:t)?i.message:i)?i.message:i,t))+"</p>\r\n </div> \r\n</div>\r\n"},3:function(e,t,n,o,r){e.propertyIsEnumerable;var i,l=e.escapeExpression;return'<span class="badge p-1 '+l(e.lambda(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.interactive:i,t))+'">'+l((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"interactive",{name:"lang",hash:{},data:r}))+"</span>\r\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,r){e.propertyIsEnumerable;var i,l=null!=t?t:e.nullContext||{};return'<div class="request-action-region"></div>\r\n<div class="p-3">\r\n'+(null!=(i=n.if.call(l,null!=(i=null!=t?t.options:t)?i.message:i,{name:"if",hash:{},fn:e.program(1,r,0),inverse:e.noop,data:r}))?i:"")+'<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!=(i=null!=(i=null!=t?t.video:t)?i.thumbnail:i)?i.url:i,t))+'"/>\r\n</div>\r\n'+(null!=(i=n.if.call(l,null!=(i=null!=t?t.options:t)?i.interactive:i,{name:"if",hash:{},fn:e.program(3,r,0),inverse:e.noop,data:r}))?i:"")+'<div class="video-info-region py-1"></div>\r\n</div>'},useData:!0})},1324:function(e,t,n){e.exports={avatar:"_2c8zD",message:"EQzqm",interactive:"mnE2L"}},1325:function(e,t,n){var o=n(10);e.exports=(o.default||o).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,o,r){e.propertyIsEnumerable;var i,l=e.escapeExpression,s=e.lambda;return'<div class="border-bottom">\r\n <h1 class="h3 p-3 m-0">'+l((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"staffRequests",{name:"lang",hash:{},data:r}))+'</h1>\r\n</div>\r\n<div class="request-list-region border-right d-inline-block '+l(s(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.requestList:i,t))+'"></div><div class="request-details-region border-left d-inline-block '+l(s(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.requestDetails:i,t))+'"></div>\r\n<div class="empty-region"></div>'},useData:!0})},1326:function(e,t,n){e.exports={requestList:"_3DFfh",requestDetails:"_2ezub"}},1462:function(e,t,n){"use strict";n.r(t);var o=n(6),r=n(5),i=n(3),l=n(2),s=n(102),a=n(488),c=n(487),u=n(306),f=n(0),p=n(197),d=n(143),h=n(9),y=n(254),m=n(29),g=n(1319),v=n.n(g),b=n(1320),w=n.n(b);function k(e){return(k="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function S(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function C(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function R(e,t,n){return t&&C(e.prototype,t),n&&C(e,n),e}function E(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}}),t&&x(e,t)}function x(e,t){return(x=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function O(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=_(e);if(t){var r=_(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return T(this,n)}}function T(e,t){return!t||"object"!==k(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function _(e){return(_=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var I=function(e){E(n,e);var t=O(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.a}},{key:"lang",get:function(){return"staffRequests.staffRequestItem"}},{key:"className",get:function(){var e="p-3 border-bottom cursor-pointer ".concat(w.a.item);return this.isSelected()&&(e+=" ".concat(w.a.selected)),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(){l.a.AppLinkHelper.trigger({application:f.b.STAFF_REQUESTS,action:f.a.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}(l.a.Component),q=function(e){E(n,e);var t=O(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 w.a.list}},{key:"childView",get:function(){return I}},{key:"childViewOptions",get:function(){return{selectedRequestId:this.options.selectedRequestId,currentUser:this.options.currentUser}}}]),n}(l.a.ComponentCollection),N=n(13),P=n(4),L=n(1142),D=n(1074),F=n(1037),M=n(30),j=n(42),A=n(48),U=n(84),V=n(1044),B=n(156),H=n(1183),Q=n(1104),K=n(1321),z=n.n(K),Y=n(1322),J=n.n(Y);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})(e)}function G(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 Z(e,t){return(Z=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function X(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=ee(e);if(t){var r=ee(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return $(this,n)}}function $(e,t){return!t||"object"!==W(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function ee(e){return(ee=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var te=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}}),t&&Z(e,t)}(s,e);var t,n,r,i=X(s);function s(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),i.call(this,e)}return t=s,(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 U.a,A.a.setSelected(this.folderTreeKey,this.viewModel.destinationFolder,this.folderCollection)}},{key:"name",get:function(){return"StaffRequestActionsComponent"}},{key:"template",get:function(){return J.a}},{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(z.a.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=A.a.getModelFromCollection(this.model.destinationFolder.get("id"),this.collection);n&&(e.destinationFolder=n.toJSON()),this.viewModel=M.a.get(this.viewModelName,e,{ctor:B.a}),this.viewModel.addValidation(H.a);var o=this.viewModel.get("destinationFolder");o&&(o.collection=n.collection)}},{key:"onLibrarySelected",value:function(e){this.viewModel.set("destinationLibrary",e.toJSON()),this.viewModel.unset("destinationFolder"),this.viewModel.set("destinationFolder",{}),A.a.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,A.a.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&&(l.a.AppLinkHelper.trigger({application:f.b.STAFF_REQUESTS,action:f.a.StaffRequests.APPROVE_REQUEST,args:[e,t,n]}),this.logStaffRequestAction(P.UserAction.Approve))}},{key:"onClickReject",value:function(){l.a.AppLinkHelper.trigger({application:f.b.STAFF_REQUESTS,action:f.a.StaffRequests.REJECT_REQUEST,args:[this.model.get("id")]}),this.logStaffRequestAction(P.UserAction.Reject)}},{key:"onClickCreateFolder",value:function(){l.a.AppLinkHelper.trigger({application:f.b.STAFF_REQUESTS,action:f.a.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")};j.a.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")};j.a.logUserAction(t,e)}},{key:"renderLibrarySelect",value:function(){this.collection.length<2||this.showChildView("librarySelect",new Q.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.a({collection:this.folderCollection,channelName:this.channelName,folderTreeKey:this.folderTreeKey,canCreateNew:!0}))}},{key:"viewOptions",value:function(){return{styles:z.a,sourceLibraryName:F.a.mapSourceToDisplayName(this.model.sourceLibrary),sourceClass:"".concat(z.a.source," ").concat(F.a.mapSourceToClass(this.model.sourceLibrary.get("type"))),showLibrarySelect:this.collection&&this.collection.length>1}}},{key:"onRender",value:function(){this.renderLibrarySelect(),this.renderFolderSelect(),o.Validation.bind(this,{model:this.viewModel})}}])&&G(t.prototype,n),r&&G(t,r),s}(l.a.Component),ne=n(1323),oe=n.n(ne),re=n(1324),ie=n.n(re);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})(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 ae(e,t){return(ae=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ce(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=fe(e);if(t){var r=fe(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return ue(this,n)}}function ue(e,t){return!t||"object"!==le(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function fe(e){return(fe=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var pe=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}}),t&&ae(e,t)}(i,e);var t,n,o,r=ce(i);function i(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),r.call(this,e)}return t=i,(n=[{key:"name",get:function(){return"StaffRequestDetailsComponent"}},{key:"template",get:function(){return oe.a}},{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 N.g.createUrl(n,{size:"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 te({model:this.model,collection:this.options.libraryCollection,disabledLibraryIds:this.options.disabledLibraryIds,staffRequestsChannel:this.options.channelName}))}},{key:"renderVideoPreview",value:function(){this.showChildView("preview",new D.a({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 L.a({model:this.model.video,config:this.options.config,externalSeriesLink:!0}))}},{key:"viewOptions",value:function(){return{styles:ie.a,avatarUrl:this.getAvatarUrl(),message:this.collection&&this.collection.length&&this.collection.first().toJSON(),interactive:F.a.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()}}])&&se(t.prototype,n),o&&se(t,o),i}(l.a.Component),de=n(145),he=n(1325),ye=n.n(he),me=n(1326),ge=n.n(me);function ve(e){return(ve="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}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 we(e,t){return(we=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ke(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=Ce(e);if(t){var r=Ce(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Se(this,n)}}function Se(e,t){return!t||"object"!==ve(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Ce(e){return(Ce=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n.d(t,"StaffRequestsView",(function(){return Re}));var Re=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}}),t&&we(e,t)}(v,e);var t,n,m,g=ke(v);function v(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,v),(t=g.call(this,e)).unavailableLibraryIds=[],t}return t=v,(n=[{key:"initialize",value:function(){this.staffRequestDataService=r.a.getInstance(f.g.StaffRequests,this),this.videoDataService=r.a.getInstance(f.g.Video,this),this.options.referrer===a.a.Notification&&this.staffRequestDataService.clearRequestCache(),this.bindListeners()}},{key:"name",get:function(){return"StaffRequestsView"}},{key:"lang",get:function(){return"staffRequests.staffRequests"}},{key:"title",get:function(){return i.a.getPhrase(this.lang,"title")}},{key:"template",get:function(){return ye.a}},{key:"className",get:function(){return"bg-white"}},{key:"channelName",get:function(){return"".concat(this.name).concat(this.cid)}},{key:"regions",value:function(){return{requestList:{el:".request-list-region",partialLoading:h.h.StaffRequestList,replaceElement:!1},requestDetails:{el:".request-details-region",partialLoading:h.h.StaffRequestDetails,replaceElement:!1},emptyState:{el:".empty-region",replaceElement:!0}}}},{key:"behaviors",get:function(){var e=this;return[{behaviorClass:u.a,collectionName:"staffRequestCollection",region:"emptyState",type:h.c.StaffRequests,shouldRender:c.a.isCollectionEmpty.bind(null,this,"staffRequestCollection"),componentOptions:{description:function(){return e.getEmptyStateDescription()},emptyState:function(){return i.a.getPhrase(e.lang,"emptyStateHeading")}},emptyStateComponents:f.h}]}},{key:"bindListeners",value:function(){if(this.listenTo(f.e.LIBRARY,"folder:created",this.onFolderCreated),this.options.requestId){this.listenTo(f.e.STAFF_REQUEST,"cache:cleared",this.render);var e="".concat(f.f.STAFF_REQUEST_BY_ID,":").concat(this.options.requestId);this.listenTo(f.e.STAFF_REQUEST,"".concat(e,":sync"),this.render),this.listenTo(f.e.STAFF_REQUEST,"".concat(e,":error"),this.onError),this.listenTo(f.e.STAFF_REQUEST,"".concat(f.f.STAFF_REQUESTS,":invalidate"),this.onUpdate);var t="".concat(f.f.STAFF_REQUEST_MESSAGES,":").concat(this.options.requestId);this.listenTo(f.e.STAFF_REQUEST,"".concat(t,":sync"),this.render),this.listenTo(f.e.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(),l.a.AppLinkHelper.trigger({application:f.b.STAFF_REQUESTS,action:f.a.StaffRequests.EDIT_REQUEST,args:[e.id]},{replace:!0})):this.render()}},{key:"onError",value:function(){this.redirectToHome()}},{key:"onFolderCreated",value:function(e){o.Radio.channel(this.channelName).trigger("select:folder",e),this.render()}},{key:"redirectToHome",value:function(){l.a.AppLinkHelper.trigger({application:f.b.STAFF_REQUESTS,action:f.a.StaffRequests.HOME})}},{key:"getEmptyStateDescription",value:function(){return this.libraryCollection?!this.libraryCollection.length||this.libraryCollection.every((function(e){return e.get("status")!==s.a.Published}))?i.a.getPhrase(this.lang,"emptyStateNoLibraries"):i.a.getPhrase(this.lang,"emptyStateDescription"):""}},{key:"renderRequestList",value:function(){this.staffRequestCollection?this.showChildView("requestList",new q({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 pe({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:ge.a}}},{key:"requiredResources",get:function(){return{config:p.b.config,libraryCollection:de.b.libraries,currentUser:d.b.currentUser}}},{key:"onBeforeRender",value:function(){return this.fetchData(),!this.model||this.model.get("status")===y.a.Pending||(this.redirectToHome(),!1)}},{key:"onRender",value:function(){this.renderRequestList(),this.renderRequestDetails()}}])&&be(t.prototype,n),m&&be(t,m),v}(l.a.View)}}]);
@@ -1 +1 @@
1
- (window.webpackJsonp_clickview_library_editor=window.webpackJsonp_clickview_library_editor||[]).push([[15],{1030:function(e,t,n){"use strict";n.d(t,"a",(function(){return p}));var r=n(2),o=n(264);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})(e)}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function c(e,t){return(c=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function u(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=f(e);if(t){var o=f(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return s(this,n)}}function s(e,t){return!t||"object"!==i(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function f(e){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(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}}),t&&c(e,t)}(s,e);var t,n,r,i=u(s);function s(){return l(this,s),i.apply(this,arguments)}return t=s,(n=[{key:"defaults",value:function(){return e={},t=o.c.Disabled,n=!0,t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e;var e,t,n}}])&&a(t.prototype,n),r&&a(t,r),s}(r.a.Model)},1047:function(e,t,n){"use strict";n.d(t,"a",(function(){return g}));var r=n(6),o=n(2),i=n(3),l=n(1061),a=n(13),c=n(1048),u=n.n(c),s=n(1049),f=n.n(s);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})(e)}function d(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 h(e,t){return(h=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function y(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=m(e);if(t){var o=m(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return b(this,n)}}function b(e,t){return!t||"object"!==p(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function m(e){return(m=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(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}}),t&&h(e,t)}(s,e);var t,n,o,c=y(s);function s(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),c.call(this,e)}return t=s,(n=[{key:"initialize",value:function(){this.listenTo(this.options.channelName,"folder:selected new:folder:selected",this.setButtonText),this.listenTo(this.options.channelName,"re:render:selector",this.renderSelector),this.disabledIds=this.options.disabledIds&&this.options.disabledIds.reduce((function(e,t){return Object.assign(Object.assign({},e),function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}({},t,!0))}),{})}},{key:"name",get:function(){return"TreeDropdownComponent"}},{key:"template",get:function(){return u.a}},{key:"className",get:function(){return"position-relative"}},{key:"lang",get:function(){return"libraryEditor.treeDropdown"}},{key:"regions",value:function(){return{selector:{el:".selector-region",replaceElement:!1}}}},{key:"events",value:function(){return{"click .create-new":"onClickCreateNew"}}},{key:"defaults",get:function(){return{disabledIds:[]}}},{key:"elements",get:function(){return{button:".custom-select"}}},{key:"onClickCreateNew",value:function(e){e.preventDefault(),r.Radio.channel(this.options.channelName).trigger("create:folder:clicked")}},{key:"setButtonText",value:function(e,t){if(e&&!t){var n=e.get("name");this.getUI("button").text(n)}else{var r=a.f.getSelected(this.options.folderTreeKey,this.collection),o=r?r.get("name"):i.a.getPhrase(this.lang,"button");this.getUI("button").text(o)}}},{key:"renderSelector",value:function(){this.showChildView("selector",new l.a({styles:f.a,collection:this.collection,channelName:this.options.channelName,childrenProperty:"children",folderTreeId:this.options.folderTreeKey,extraClass:f.a.list,extraClasses:f.a.list,isSelector:!0,disabledIds:this.disabledIds||{}}))}},{key:"viewOptions",value:function(){return{styles:f.a,name:this.options.name||this.options.channelName,buttonText:this.buttonText,canCreateNew:this.options.canCreateNew}}},{key:"onRender",value:function(){this.setButtonText(),this.renderSelector()}}])&&d(t.prototype,n),o&&d(t,o),s}(o.a.Component)},1048:function(e,t,n){var r=n(10);e.exports=(r.default||r).template({1:function(e,t,n,r,o){e.propertyIsEnumerable;var i,l=e.escapeExpression;return' <button class="create-new btn font-weight-bold rounded-0 w-100 text-left '+l(e.lambda(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.customItem:i,t))+'">'+l((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"createNew",{name:"lang",hash:{},data:o}))+"</button>\r\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){e.propertyIsEnumerable;var i,l=e.lambda,a=e.escapeExpression;return'<button\r\n class="'+a(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.selectBtn:i,t))+' custom-select form-control"\r\n data-toggle="dropdown"\r\n aria-haspopup="true"\r\n aria-expanded="false"\r\n name='+a(l(null!=(i=null!=t?t.options:t)?i.name:i,t))+"\r\n>"+a(l(null!=(i=null!=t?t.options:t)?i.buttonText:i,t))+'</button>\r\n<div class="dropdown-menu '+a(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.selector:i,t))+'">\r\n <div class="selector-region"></div>\r\n'+(null!=(i=n.if.call(null!=t?t:e.nullContext||{},null!=(i=null!=t?t.options:t)?i.canCreateNew:i,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o}))?i:"")+'</div>\r\n<div class="form-feedback"></div>'},useData:!0})},1049:function(e,t,n){e.exports={selectBtn:"_2TTgs",list:"_3wN7o",selector:"_3Xf1P",customItem:"_199PI"}},1316:function(e,t,n){var r=n(10);e.exports=(r.default||r).template({1:function(e,t,n,r,o){var i;e.propertyIsEnumerable;return'<div class="alert alert-info" role="alert">\r\n The ClickView Exchange is a community for educators, read our <a class="info-link" href="'+e.escapeExpression(e.lambda(null!=(i=null!=t?t.options:t)?i.guidelinesUrl:i,t))+'" target="_blank">community guidelines</a> and let\'s ensure that we keep the Exchange a place we\'re proud of!\r\n</div>\r\n<p>After you submit your video to the Exchange, we will review it and notify you when your video has been made available.</p>\r\n<div class="form-group">\r\n <label>Select a folder</label>\r\n <div class="folder-dropdown-region"></div>\r\n</div>\r\n'},3:function(e,t,n,r,o){var i;e.propertyIsEnumerable;return" "+(null!=(i=e.lambda(null!=(i=null!=t?t.options:t)?i.spinnerEl:i,t))?i:"")+"\r\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var i;e.propertyIsEnumerable;return null!=(i=n.if.call(null!=t?t:e.nullContext||{},null!=(i=null!=t?t.options:t)?i.foldersLoaded:i,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.program(3,o,0),data:o}))?i:""},useData:!0})},1435:function(e,t,n){"use strict";n.r(t),n.d(t,"AddToExchangeView",(function(){return x}));var r=n(2),o=n(5),i=n(59),l=n(51),a=n(303),c=n(1030),u=n(13),s=n(200),f=n(264),p=n(1047),d=n(0),h=n(1316),y=n.n(h);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})(e)}function m(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function g(e,t){return(g=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function v(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=k(e);if(t){var o=k(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return w(this,n)}}function w(e,t){return!t||"object"!==b(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function k(e){return(k=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(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}}),t&&g(e,t)}(b,e);var t,n,r,h=v(b);function b(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,b),h.call(this,e)}return t=b,(n=[{key:"initialize",value:function(){this.libraryDataService=o.a.getInstance(d.g.Library,this),this.videoDataService=o.a.getInstance(d.g.Video,this),this.alertService=o.a.getInstance(d.x.Alerts,this),this.listenTo(d.e.LIBRARY,"exchange:".concat(10,":sync"),this.render),this.listenTo(this.channelName,"folder:selected",this.onFolderSelected)}},{key:"name",get:function(){return"AddToExchangeView"}},{key:"title",get:function(){return!1}},{key:"template",get:function(){return y.a}},{key:"channelName",get:function(){return u.k.generateUniqueChannelName(this)}},{key:"folderTreeKey",get:function(){return"folderselect:".concat(this.cid)}},{key:"regions",value:function(){return{folderDropdown:".folder-dropdown-region"}}},{key:"behaviors",get:function(){var e=this;return[{behaviorClass:a.e,title:"Add to the Exchange",spinnerButtonOptions:{model:this.spinnerModel=new c.a,channelName:this.channelName,buttonText:"Submit",onClick:function(t){return e.onClickSubmit(t)}}}]}},{key:"getExchange",value:function(){return this.exchangeLibraries.first()}},{key:"onClickSubmit",value:function(e){var t=this;e&&e.preventDefault(),this.spinnerModel.set(f.c.ShowSpinner,!0),this.videoDataService.copyVideo(this.options.videoId,this.getExchange().get("id"),this.folder.get("id"),(function(){t.alertService.createAlert({heading:"Request submitted",message:"We will notify you once your Exchange request has been approved",type:l.a.Success}),t.triggerMethod("hide")}))}},{key:"onFolderSelected",value:function(e){this.folder=e,this.spinnerModel.set(f.c.Disabled,!1),u.f.setSelected(this.folderTreeKey,e,this.getExchange().children)}},{key:"requiredResources",get:function(){return{config:s.b.config}}},{key:"onBeforeRender",value:function(){this.exchangeLibraries=this.libraryDataService.getExchange(10)}},{key:"onRender",value:function(){this.exchangeLibraries&&this.showChildView("folderDropdown",new p.a({collection:this.getExchange().children,channelName:this.channelName,folderTreeKey:this.folderTreeKey}))}},{key:"viewOptions",value:function(){return{foldersLoaded:!!this.exchangeLibraries,guidelinesUrl:i.a.safeUrlConcat(this.config.get("onlineUrl"),"/exchange/community-guidelines"),spinnerEl:u.r.getSpinner({size:u.s.Large,extraClasses:"mx-auto"})}}}])&&m(t.prototype,n),r&&m(t,r),b}(r.a.View)}}]);
1
+ (window.webpackJsonp_clickview_library_editor=window.webpackJsonp_clickview_library_editor||[]).push([[15],{1027:function(e,t,n){"use strict";n.d(t,"a",(function(){return p}));var r=n(2),o=n(263);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})(e)}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function c(e,t){return(c=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function u(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=f(e);if(t){var o=f(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return s(this,n)}}function s(e,t){return!t||"object"!==i(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function f(e){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(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}}),t&&c(e,t)}(s,e);var t,n,r,i=u(s);function s(){return l(this,s),i.apply(this,arguments)}return t=s,(n=[{key:"defaults",value:function(){return e={},t=o.c.Disabled,n=!0,t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e;var e,t,n}}])&&a(t.prototype,n),r&&a(t,r),s}(r.a.Model)},1044:function(e,t,n){"use strict";n.d(t,"a",(function(){return g}));var r=n(6),o=n(2),i=n(3),l=n(1058),a=n(13),c=n(1045),u=n.n(c),s=n(1046),f=n.n(s);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})(e)}function d(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 h(e,t){return(h=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function y(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=m(e);if(t){var o=m(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return b(this,n)}}function b(e,t){return!t||"object"!==p(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function m(e){return(m=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(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}}),t&&h(e,t)}(s,e);var t,n,o,c=y(s);function s(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),c.call(this,e)}return t=s,(n=[{key:"initialize",value:function(){this.listenTo(this.options.channelName,"folder:selected new:folder:selected",this.setButtonText),this.listenTo(this.options.channelName,"re:render:selector",this.renderSelector),this.disabledIds=this.options.disabledIds&&this.options.disabledIds.reduce((function(e,t){return Object.assign(Object.assign({},e),function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}({},t,!0))}),{})}},{key:"name",get:function(){return"TreeDropdownComponent"}},{key:"template",get:function(){return u.a}},{key:"className",get:function(){return"position-relative"}},{key:"lang",get:function(){return"libraryEditor.treeDropdown"}},{key:"regions",value:function(){return{selector:{el:".selector-region",replaceElement:!1}}}},{key:"events",value:function(){return{"click .create-new":"onClickCreateNew"}}},{key:"defaults",get:function(){return{disabledIds:[]}}},{key:"elements",get:function(){return{button:".custom-select"}}},{key:"onClickCreateNew",value:function(e){e.preventDefault(),r.Radio.channel(this.options.channelName).trigger("create:folder:clicked")}},{key:"setButtonText",value:function(e,t){if(e&&!t){var n=e.get("name");this.getUI("button").text(n)}else{var r=a.f.getSelected(this.options.folderTreeKey,this.collection),o=r?r.get("name"):i.a.getPhrase(this.lang,"button");this.getUI("button").text(o)}}},{key:"renderSelector",value:function(){this.showChildView("selector",new l.a({styles:f.a,collection:this.collection,channelName:this.options.channelName,childrenProperty:"children",folderTreeId:this.options.folderTreeKey,extraClass:f.a.list,extraClasses:f.a.list,isSelector:!0,disabledIds:this.disabledIds||{}}))}},{key:"viewOptions",value:function(){return{styles:f.a,name:this.options.name||this.options.channelName,buttonText:this.buttonText,canCreateNew:this.options.canCreateNew}}},{key:"onRender",value:function(){this.setButtonText(),this.renderSelector()}}])&&d(t.prototype,n),o&&d(t,o),s}(o.a.Component)},1045:function(e,t,n){var r=n(10);e.exports=(r.default||r).template({1:function(e,t,n,r,o){e.propertyIsEnumerable;var i,l=e.escapeExpression;return' <button class="create-new btn font-weight-bold rounded-0 w-100 text-left '+l(e.lambda(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.customItem:i,t))+'">'+l((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"createNew",{name:"lang",hash:{},data:o}))+"</button>\r\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){e.propertyIsEnumerable;var i,l=e.lambda,a=e.escapeExpression;return'<button\r\n class="'+a(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.selectBtn:i,t))+' custom-select form-control"\r\n data-toggle="dropdown"\r\n aria-haspopup="true"\r\n aria-expanded="false"\r\n name='+a(l(null!=(i=null!=t?t.options:t)?i.name:i,t))+"\r\n>"+a(l(null!=(i=null!=t?t.options:t)?i.buttonText:i,t))+'</button>\r\n<div class="dropdown-menu '+a(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.selector:i,t))+'">\r\n <div class="selector-region"></div>\r\n'+(null!=(i=n.if.call(null!=t?t:e.nullContext||{},null!=(i=null!=t?t.options:t)?i.canCreateNew:i,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o}))?i:"")+'</div>\r\n<div class="form-feedback"></div>'},useData:!0})},1046:function(e,t,n){e.exports={selectBtn:"_2TTgs",list:"_3wN7o",selector:"_3Xf1P",customItem:"_199PI"}},1313:function(e,t,n){var r=n(10);e.exports=(r.default||r).template({1:function(e,t,n,r,o){var i;e.propertyIsEnumerable;return'<div class="alert alert-info" role="alert">\r\n The ClickView Exchange is a community for educators, read our <a class="info-link" href="'+e.escapeExpression(e.lambda(null!=(i=null!=t?t.options:t)?i.guidelinesUrl:i,t))+'" target="_blank">community guidelines</a> and let\'s ensure that we keep the Exchange a place we\'re proud of!\r\n</div>\r\n<p>After you submit your video to the Exchange, we will review it and notify you when your video has been made available.</p>\r\n<div class="form-group">\r\n <label>Select a folder</label>\r\n <div class="folder-dropdown-region"></div>\r\n</div>\r\n'},3:function(e,t,n,r,o){var i;e.propertyIsEnumerable;return" "+(null!=(i=e.lambda(null!=(i=null!=t?t.options:t)?i.spinnerEl:i,t))?i:"")+"\r\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var i;e.propertyIsEnumerable;return null!=(i=n.if.call(null!=t?t:e.nullContext||{},null!=(i=null!=t?t.options:t)?i.foldersLoaded:i,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.program(3,o,0),data:o}))?i:""},useData:!0})},1432:function(e,t,n){"use strict";n.r(t),n.d(t,"AddToExchangeView",(function(){return x}));var r=n(2),o=n(5),i=n(59),l=n(51),a=n(302),c=n(1027),u=n(13),s=n(197),f=n(263),p=n(1044),d=n(0),h=n(1313),y=n.n(h);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})(e)}function m(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function g(e,t){return(g=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function v(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=k(e);if(t){var o=k(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return w(this,n)}}function w(e,t){return!t||"object"!==b(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function k(e){return(k=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(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}}),t&&g(e,t)}(b,e);var t,n,r,h=v(b);function b(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,b),h.call(this,e)}return t=b,(n=[{key:"initialize",value:function(){this.libraryDataService=o.a.getInstance(d.g.Library,this),this.videoDataService=o.a.getInstance(d.g.Video,this),this.alertService=o.a.getInstance(d.x.Alerts,this),this.listenTo(d.e.LIBRARY,"exchange:".concat(10,":sync"),this.render),this.listenTo(this.channelName,"folder:selected",this.onFolderSelected)}},{key:"name",get:function(){return"AddToExchangeView"}},{key:"title",get:function(){return!1}},{key:"template",get:function(){return y.a}},{key:"channelName",get:function(){return u.k.generateUniqueChannelName(this)}},{key:"folderTreeKey",get:function(){return"folderselect:".concat(this.cid)}},{key:"regions",value:function(){return{folderDropdown:".folder-dropdown-region"}}},{key:"behaviors",get:function(){var e=this;return[{behaviorClass:a.e,title:"Add to the Exchange",spinnerButtonOptions:{model:this.spinnerModel=new c.a,channelName:this.channelName,buttonText:"Submit",onClick:function(t){return e.onClickSubmit(t)}}}]}},{key:"getExchange",value:function(){return this.exchangeLibraries.first()}},{key:"onClickSubmit",value:function(e){var t=this;e&&e.preventDefault(),this.spinnerModel.set(f.c.ShowSpinner,!0),this.videoDataService.copyVideo(this.options.videoId,this.getExchange().get("id"),this.folder.get("id"),(function(){t.alertService.createAlert({heading:"Request submitted",message:"We will notify you once your Exchange request has been approved",type:l.a.Success}),t.triggerMethod("hide")}))}},{key:"onFolderSelected",value:function(e){this.folder=e,this.spinnerModel.set(f.c.Disabled,!1),u.f.setSelected(this.folderTreeKey,e,this.getExchange().children)}},{key:"requiredResources",get:function(){return{config:s.b.config}}},{key:"onBeforeRender",value:function(){this.exchangeLibraries=this.libraryDataService.getExchange(10)}},{key:"onRender",value:function(){this.exchangeLibraries&&this.showChildView("folderDropdown",new p.a({collection:this.getExchange().children,channelName:this.channelName,folderTreeKey:this.folderTreeKey}))}},{key:"viewOptions",value:function(){return{foldersLoaded:!!this.exchangeLibraries,guidelinesUrl:i.a.safeUrlConcat(this.config.get("onlineUrl"),"/exchange/community-guidelines"),spinnerEl:u.r.getSpinner({size:u.s.Large,extraClasses:"mx-auto"})}}}])&&m(t.prototype,n),r&&m(t,r),b}(r.a.View)}}]);
@@ -1 +1 @@
1
- (window.webpackJsonp_clickview_library_editor=window.webpackJsonp_clickview_library_editor||[]).push([[16],{1300:function(n,e,r){n.exports={thumbnail:"_3S7KI"}},1301:function(n,e,r){var l=r(10);n.exports=(l.default||l).template({1:function(n,e,r,l,t){var o;n.propertyIsEnumerable;return(null!=(o=n.lambda(null!=(o=null!=e?e.options:e)?o.spinnerEl:o,e))?o:"")+"\r\n"},3:function(n,e,r,l,t){n.propertyIsEnumerable;var o,a=null!=e?e:n.nullContext||{};return'<div class="row">\r\n <div class="col-7">\r\n <div class="row no-gutters">\r\n'+(null!=(o=r.if.call(a,null!=e?e.title:e,{name:"if",hash:{},fn:n.program(4,t,0),inverse:n.noop,data:t}))?o:"")+(null!=(o=r.if.call(a,null!=e?e.seriesName:e,{name:"if",hash:{},fn:n.program(6,t,0),inverse:n.noop,data:t}))?o:"")+(null!=(o=r.if.call(a,null!=e?e.duration:e,{name:"if",hash:{},fn:n.program(8,t,0),inverse:n.noop,data:t}))?o:"")+(null!=(o=r.if.call(a,null!=e?e.productionYear:e,{name:"if",hash:{},fn:n.program(10,t,0),inverse:n.noop,data:t}))?o:"")+(null!=(o=r.if.call(a,null!=e?e.audience:e,{name:"if",hash:{},fn:n.program(12,t,0),inverse:n.noop,data:t}))?o:"")+(null!=(o=r.if.call(a,null!=e?e.ratingCode:e,{name:"if",hash:{},fn:n.program(14,t,0),inverse:n.noop,data:t}))?o:"")+(null!=(o=r.if.call(a,null!=e?e.itemCode:e,{name:"if",hash:{},fn:n.program(16,t,0),inverse:n.noop,data:t}))?o:"")+(null!=(o=r.if.call(a,null!=e?e.producer:e,{name:"if",hash:{},fn:n.program(18,t,0),inverse:n.noop,data:t}))?o:"")+(null!=(o=r.if.call(a,null!=e?e.publisher:e,{name:"if",hash:{},fn:n.program(20,t,0),inverse:n.noop,data:t}))?o:"")+(null!=(o=r.if.call(a,null!=(o=null!=e?e.options:e)?o.dateBroadcast:o,{name:"if",hash:{},fn:n.program(22,t,0),inverse:n.noop,data:t}))?o:"")+(null!=(o=r.if.call(a,null!=e?e.distributor:e,{name:"if",hash:{},fn:n.program(24,t,0),inverse:n.noop,data:t}))?o:"")+(null!=(o=r.if.call(a,null!=e?e.source:e,{name:"if",hash:{},fn:n.program(26,t,0),inverse:n.noop,data:t}))?o:"")+' </div>\r\n </div>\r\n <div class="col-5">\r\n <div class="thumbnail-region"></div>\r\n </div>\r\n <div class="col-12">\r\n'+(null!=(o=r.if.call(a,null!=e?e.description:e,{name:"if",hash:{},fn:n.program(28,t,0),inverse:n.noop,data:t}))?o:"")+" </div>\r\n</div>\r\n"},4:function(n,e,r,l,t){var o;n.propertyIsEnumerable;return' <div class="col-4">\r\n <label class="font-weight-bold">Title</label>\r\n </div>\r\n <div class="col-8">\r\n <p>'+n.escapeExpression("function"==typeof(o=null!=(o=r.title||(null!=e?e.title:e))?o:n.hooks.helperMissing)?o.call(null!=e?e:n.nullContext||{},{name:"title",hash:{},data:t}):o)+"</p>\r\n </div>\r\n"},6:function(n,e,r,l,t){var o;n.propertyIsEnumerable;return' <div class="col-4">\r\n <label class="font-weight-bold">Series</label>\r\n </div>\r\n <div class="col-8">\r\n <p>'+n.escapeExpression("function"==typeof(o=null!=(o=r.seriesName||(null!=e?e.seriesName:e))?o:n.hooks.helperMissing)?o.call(null!=e?e:n.nullContext||{},{name:"seriesName",hash:{},data:t}):o)+"</p>\r\n </div>\r\n"},8:function(n,e,r,l,t){var o;n.propertyIsEnumerable;return' <div class="col-4">\r\n <label class="font-weight-bold">Duration</label>\r\n </div>\r\n <div class="col-8">\r\n <p>'+n.escapeExpression("function"==typeof(o=null!=(o=r.duration||(null!=e?e.duration:e))?o:n.hooks.helperMissing)?o.call(null!=e?e:n.nullContext||{},{name:"duration",hash:{},data:t}):o)+"</p>\r\n </div>\r\n"},10:function(n,e,r,l,t){var o;n.propertyIsEnumerable;return' <div class="col-4">\r\n <label class="font-weight-bold">Year</label>\r\n </div>\r\n <div class="col-8">\r\n <p>'+n.escapeExpression("function"==typeof(o=null!=(o=r.productionYear||(null!=e?e.productionYear:e))?o:n.hooks.helperMissing)?o.call(null!=e?e:n.nullContext||{},{name:"productionYear",hash:{},data:t}):o)+"</p>\r\n </div>\r\n"},12:function(n,e,r,l,t){var o;n.propertyIsEnumerable;return' <div class="col-4">\r\n <label class="font-weight-bold">Audience</label>\r\n </div>\r\n <div class="col-8">\r\n <p>'+n.escapeExpression("function"==typeof(o=null!=(o=r.audience||(null!=e?e.audience:e))?o:n.hooks.helperMissing)?o.call(null!=e?e:n.nullContext||{},{name:"audience",hash:{},data:t}):o)+"</p>\r\n </div>\r\n"},14:function(n,e,r,l,t){var o;n.propertyIsEnumerable;return' <div class="col-4">\r\n <label class="font-weight-bold">Rating</label>\r\n </div>\r\n <div class="col-8">\r\n <p>'+n.escapeExpression("function"==typeof(o=null!=(o=r.ratingCode||(null!=e?e.ratingCode:e))?o:n.hooks.helperMissing)?o.call(null!=e?e:n.nullContext||{},{name:"ratingCode",hash:{},data:t}):o)+"</p>\r\n </div>\r\n"},16:function(n,e,r,l,t){var o;n.propertyIsEnumerable;return' <div class="col-4">\r\n <label class="font-weight-bold">Identifier</label>\r\n </div>\r\n <div class="col-8">\r\n <p>'+n.escapeExpression("function"==typeof(o=null!=(o=r.itemCode||(null!=e?e.itemCode:e))?o:n.hooks.helperMissing)?o.call(null!=e?e:n.nullContext||{},{name:"itemCode",hash:{},data:t}):o)+"</p>\r\n </div>\r\n"},18:function(n,e,r,l,t){var o;n.propertyIsEnumerable;return' <div class="col-4">\r\n <label class="font-weight-bold">Creator</label>\r\n </div>\r\n <div class="col-8">\r\n <p>'+n.escapeExpression("function"==typeof(o=null!=(o=r.producer||(null!=e?e.producer:e))?o:n.hooks.helperMissing)?o.call(null!=e?e:n.nullContext||{},{name:"producer",hash:{},data:t}):o)+"</p>\r\n </div>\r\n"},20:function(n,e,r,l,t){var o;n.propertyIsEnumerable;return' <div class="col-4">\r\n <label class="font-weight-bold">Publisher</label>\r\n </div>\r\n <div class="col-8">\r\n <p>'+n.escapeExpression("function"==typeof(o=null!=(o=r.publisher||(null!=e?e.publisher:e))?o:n.hooks.helperMissing)?o.call(null!=e?e:n.nullContext||{},{name:"publisher",hash:{},data:t}):o)+"</p>\r\n </div>\r\n"},22:function(n,e,r,l,t){var o;n.propertyIsEnumerable;return' <div class="col-4">\r\n <label class="font-weight-bold">Date Broadcast</label>\r\n </div>\r\n <div class="col-8">\r\n <p>'+n.escapeExpression(n.lambda(null!=(o=null!=e?e.options:e)?o.dateBroadcast:o,e))+"</p>\r\n </div>\r\n"},24:function(n,e,r,l,t){var o;n.propertyIsEnumerable;return' <div class="col-4">\r\n <label class="font-weight-bold">Distributor</label>\r\n </div>\r\n <div class="col-8">\r\n <p>'+n.escapeExpression("function"==typeof(o=null!=(o=r.distributor||(null!=e?e.distributor:e))?o:n.hooks.helperMissing)?o.call(null!=e?e:n.nullContext||{},{name:"distributor",hash:{},data:t}):o)+"</p>\r\n </div>\r\n"},26:function(n,e,r,l,t){var o;n.propertyIsEnumerable;return' <div class="col-4">\r\n <label class="font-weight-bold">Source</label>\r\n </div>\r\n <div class="col-8">\r\n <p>'+n.escapeExpression("function"==typeof(o=null!=(o=r.source||(null!=e?e.source:e))?o:n.hooks.helperMissing)?o.call(null!=e?e:n.nullContext||{},{name:"source",hash:{},data:t}):o)+"</p>\r\n </div>\r\n"},28:function(n,e,r,l,t){var o;n.propertyIsEnumerable;return' <label class="font-weight-bold">Description</label>\r\n <p>'+n.escapeExpression("function"==typeof(o=null!=(o=r.description||(null!=e?e.description:e))?o:n.hooks.helperMissing)?o.call(null!=e?e:n.nullContext||{},{name:"description",hash:{},data:t}):o)+"</p>\r\n"},compiler:[8,">= 4.3.0"],main:function(n,e,r,l,t){var o;n.propertyIsEnumerable;return(null!=(o=r.unless.call(null!=e?e:n.nullContext||{},null!=(o=null!=e?e.options:e)?o.dataFetched:o,{name:"unless",hash:{},fn:n.program(1,t,0),inverse:n.program(3,t,0),data:t}))?o:"")+"\r\n"},useData:!0})},1433:function(n,e,r){"use strict";r.r(e),r.d(e,"ShowPublisherVideoPopupView",(function(){return x}));var l=r(29),t=r(5),o=r(2),a=r(202),i=r(204),s=r(13),u=r(303),c=r(103),p=r(0),d=r(200),f=r(9),h=r(1300),v=r.n(h),m=r(1301),b=r.n(m);function g(n){return(g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n})(n)}function y(n,e){for(var r=0;r<e.length;r++){var l=e[r];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(n,l.key,l)}}function w(n,e){return(w=Object.setPrototypeOf||function(n,e){return n.__proto__=e,n})(n,e)}function E(n){var e=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(n){return!1}}();return function(){var r,l=k(n);if(e){var t=k(this).constructor;r=Reflect.construct(l,arguments,t)}else r=l.apply(this,arguments);return C(this,r)}}function C(n,e){return!e||"object"!==g(e)&&"function"!=typeof e?function(n){if(void 0===n)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}(n):e}function k(n){return(k=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)})(n)}var x=function(n){!function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),e&&w(n,e)}(m,n);var e,r,o,h=E(m);function m(n){return function(n,e){if(!(n instanceof e))throw new TypeError("Cannot call a class as a function")}(this,m),h.call(this,n)}return e=m,(r=[{key:"initialize",value:function(){this.migrationVideoDataService=t.a.getInstance(p.g.MigrationVideo,this),this.listenTo(p.e.MIGRATION,"".concat(p.f.CUSTOMER_VIDEO,":").concat(this.options.trackingCode,":sync"),this.render),this.listenTo(p.e.MIGRATION,"".concat(p.f.CUSTOMER_VIDEO,":").concat(this.options.masterId,":sync"),this.render)}},{key:"name",get:function(){return"ShowPublisherVideoPopupView"}},{key:"title",get:function(){return!1}},{key:"tagName",get:function(){return"p"}},{key:"template",get:function(){return b.a}},{key:"regions",value:function(){return{thumbnail:".thumbnail-region"}}},{key:"behaviors",get:function(){return[{behaviorClass:u.e,title:"Publisher Archive Video Details",hideCloseButton:!0,size:"modal-lg"}]}},{key:"getUrl",value:function(){if(this.model){var n=this.config.get("imageCdnUrl"),e=this.model.get("trackingCode");return"".concat(n,"v1/thumbnails/trackingcode/").concat(e)}}},{key:"getBroadcastDate",value:function(){return this.model.get("dateBroadcast")?l(this.model.get("dateBroadcast")).format(f.l.FULL_YEAR):""}},{key:"viewOptions",value:function(){return{styles:v.a,dataFetched:!!this.model,spinnerEl:s.r.getSpinner({size:s.s.Large,extraClasses:"mx-auto"}),dateBroadcast:this.getBroadcastDate()}}},{key:"requiredResources",get:function(){return{config:d.b.config}}},{key:"onBeforeRender",value:function(){return this.options.trackingCode&&(this.model=this.migrationVideoDataService.getCustomerVideoByTrackingCode(this.options.trackingCode)),this.options.masterId&&(this.model=this.migrationVideoDataService.getCustomerVideoByMasterId(this.options.masterId)),!!this.model}},{key:"onRender",value:function(){this.showChildView("thumbnail",new a.a({model:new c.a({thumbnail:{url:this.getUrl()}},{parse:!0}),thumbnailOptions:{size:i.a.Small}}))}}])&&y(e.prototype,r),o&&y(e,o),m}(o.a.View)}}]);
1
+ (window.webpackJsonp_clickview_library_editor=window.webpackJsonp_clickview_library_editor||[]).push([[16],{1297:function(n,e,r){n.exports={thumbnail:"_3S7KI"}},1298:function(n,e,r){var l=r(10);n.exports=(l.default||l).template({1:function(n,e,r,l,t){var o;n.propertyIsEnumerable;return(null!=(o=n.lambda(null!=(o=null!=e?e.options:e)?o.spinnerEl:o,e))?o:"")+"\r\n"},3:function(n,e,r,l,t){n.propertyIsEnumerable;var o,a=null!=e?e:n.nullContext||{};return'<div class="row">\r\n <div class="col-7">\r\n <div class="row no-gutters">\r\n'+(null!=(o=r.if.call(a,null!=e?e.title:e,{name:"if",hash:{},fn:n.program(4,t,0),inverse:n.noop,data:t}))?o:"")+(null!=(o=r.if.call(a,null!=e?e.seriesName:e,{name:"if",hash:{},fn:n.program(6,t,0),inverse:n.noop,data:t}))?o:"")+(null!=(o=r.if.call(a,null!=e?e.duration:e,{name:"if",hash:{},fn:n.program(8,t,0),inverse:n.noop,data:t}))?o:"")+(null!=(o=r.if.call(a,null!=e?e.productionYear:e,{name:"if",hash:{},fn:n.program(10,t,0),inverse:n.noop,data:t}))?o:"")+(null!=(o=r.if.call(a,null!=e?e.audience:e,{name:"if",hash:{},fn:n.program(12,t,0),inverse:n.noop,data:t}))?o:"")+(null!=(o=r.if.call(a,null!=e?e.ratingCode:e,{name:"if",hash:{},fn:n.program(14,t,0),inverse:n.noop,data:t}))?o:"")+(null!=(o=r.if.call(a,null!=e?e.itemCode:e,{name:"if",hash:{},fn:n.program(16,t,0),inverse:n.noop,data:t}))?o:"")+(null!=(o=r.if.call(a,null!=e?e.producer:e,{name:"if",hash:{},fn:n.program(18,t,0),inverse:n.noop,data:t}))?o:"")+(null!=(o=r.if.call(a,null!=e?e.publisher:e,{name:"if",hash:{},fn:n.program(20,t,0),inverse:n.noop,data:t}))?o:"")+(null!=(o=r.if.call(a,null!=(o=null!=e?e.options:e)?o.dateBroadcast:o,{name:"if",hash:{},fn:n.program(22,t,0),inverse:n.noop,data:t}))?o:"")+(null!=(o=r.if.call(a,null!=e?e.distributor:e,{name:"if",hash:{},fn:n.program(24,t,0),inverse:n.noop,data:t}))?o:"")+(null!=(o=r.if.call(a,null!=e?e.source:e,{name:"if",hash:{},fn:n.program(26,t,0),inverse:n.noop,data:t}))?o:"")+' </div>\r\n </div>\r\n <div class="col-5">\r\n <div class="thumbnail-region"></div>\r\n </div>\r\n <div class="col-12">\r\n'+(null!=(o=r.if.call(a,null!=e?e.description:e,{name:"if",hash:{},fn:n.program(28,t,0),inverse:n.noop,data:t}))?o:"")+" </div>\r\n</div>\r\n"},4:function(n,e,r,l,t){var o;n.propertyIsEnumerable;return' <div class="col-4">\r\n <label class="font-weight-bold">Title</label>\r\n </div>\r\n <div class="col-8">\r\n <p>'+n.escapeExpression("function"==typeof(o=null!=(o=r.title||(null!=e?e.title:e))?o:n.hooks.helperMissing)?o.call(null!=e?e:n.nullContext||{},{name:"title",hash:{},data:t}):o)+"</p>\r\n </div>\r\n"},6:function(n,e,r,l,t){var o;n.propertyIsEnumerable;return' <div class="col-4">\r\n <label class="font-weight-bold">Series</label>\r\n </div>\r\n <div class="col-8">\r\n <p>'+n.escapeExpression("function"==typeof(o=null!=(o=r.seriesName||(null!=e?e.seriesName:e))?o:n.hooks.helperMissing)?o.call(null!=e?e:n.nullContext||{},{name:"seriesName",hash:{},data:t}):o)+"</p>\r\n </div>\r\n"},8:function(n,e,r,l,t){var o;n.propertyIsEnumerable;return' <div class="col-4">\r\n <label class="font-weight-bold">Duration</label>\r\n </div>\r\n <div class="col-8">\r\n <p>'+n.escapeExpression("function"==typeof(o=null!=(o=r.duration||(null!=e?e.duration:e))?o:n.hooks.helperMissing)?o.call(null!=e?e:n.nullContext||{},{name:"duration",hash:{},data:t}):o)+"</p>\r\n </div>\r\n"},10:function(n,e,r,l,t){var o;n.propertyIsEnumerable;return' <div class="col-4">\r\n <label class="font-weight-bold">Year</label>\r\n </div>\r\n <div class="col-8">\r\n <p>'+n.escapeExpression("function"==typeof(o=null!=(o=r.productionYear||(null!=e?e.productionYear:e))?o:n.hooks.helperMissing)?o.call(null!=e?e:n.nullContext||{},{name:"productionYear",hash:{},data:t}):o)+"</p>\r\n </div>\r\n"},12:function(n,e,r,l,t){var o;n.propertyIsEnumerable;return' <div class="col-4">\r\n <label class="font-weight-bold">Audience</label>\r\n </div>\r\n <div class="col-8">\r\n <p>'+n.escapeExpression("function"==typeof(o=null!=(o=r.audience||(null!=e?e.audience:e))?o:n.hooks.helperMissing)?o.call(null!=e?e:n.nullContext||{},{name:"audience",hash:{},data:t}):o)+"</p>\r\n </div>\r\n"},14:function(n,e,r,l,t){var o;n.propertyIsEnumerable;return' <div class="col-4">\r\n <label class="font-weight-bold">Rating</label>\r\n </div>\r\n <div class="col-8">\r\n <p>'+n.escapeExpression("function"==typeof(o=null!=(o=r.ratingCode||(null!=e?e.ratingCode:e))?o:n.hooks.helperMissing)?o.call(null!=e?e:n.nullContext||{},{name:"ratingCode",hash:{},data:t}):o)+"</p>\r\n </div>\r\n"},16:function(n,e,r,l,t){var o;n.propertyIsEnumerable;return' <div class="col-4">\r\n <label class="font-weight-bold">Identifier</label>\r\n </div>\r\n <div class="col-8">\r\n <p>'+n.escapeExpression("function"==typeof(o=null!=(o=r.itemCode||(null!=e?e.itemCode:e))?o:n.hooks.helperMissing)?o.call(null!=e?e:n.nullContext||{},{name:"itemCode",hash:{},data:t}):o)+"</p>\r\n </div>\r\n"},18:function(n,e,r,l,t){var o;n.propertyIsEnumerable;return' <div class="col-4">\r\n <label class="font-weight-bold">Creator</label>\r\n </div>\r\n <div class="col-8">\r\n <p>'+n.escapeExpression("function"==typeof(o=null!=(o=r.producer||(null!=e?e.producer:e))?o:n.hooks.helperMissing)?o.call(null!=e?e:n.nullContext||{},{name:"producer",hash:{},data:t}):o)+"</p>\r\n </div>\r\n"},20:function(n,e,r,l,t){var o;n.propertyIsEnumerable;return' <div class="col-4">\r\n <label class="font-weight-bold">Publisher</label>\r\n </div>\r\n <div class="col-8">\r\n <p>'+n.escapeExpression("function"==typeof(o=null!=(o=r.publisher||(null!=e?e.publisher:e))?o:n.hooks.helperMissing)?o.call(null!=e?e:n.nullContext||{},{name:"publisher",hash:{},data:t}):o)+"</p>\r\n </div>\r\n"},22:function(n,e,r,l,t){var o;n.propertyIsEnumerable;return' <div class="col-4">\r\n <label class="font-weight-bold">Date Broadcast</label>\r\n </div>\r\n <div class="col-8">\r\n <p>'+n.escapeExpression(n.lambda(null!=(o=null!=e?e.options:e)?o.dateBroadcast:o,e))+"</p>\r\n </div>\r\n"},24:function(n,e,r,l,t){var o;n.propertyIsEnumerable;return' <div class="col-4">\r\n <label class="font-weight-bold">Distributor</label>\r\n </div>\r\n <div class="col-8">\r\n <p>'+n.escapeExpression("function"==typeof(o=null!=(o=r.distributor||(null!=e?e.distributor:e))?o:n.hooks.helperMissing)?o.call(null!=e?e:n.nullContext||{},{name:"distributor",hash:{},data:t}):o)+"</p>\r\n </div>\r\n"},26:function(n,e,r,l,t){var o;n.propertyIsEnumerable;return' <div class="col-4">\r\n <label class="font-weight-bold">Source</label>\r\n </div>\r\n <div class="col-8">\r\n <p>'+n.escapeExpression("function"==typeof(o=null!=(o=r.source||(null!=e?e.source:e))?o:n.hooks.helperMissing)?o.call(null!=e?e:n.nullContext||{},{name:"source",hash:{},data:t}):o)+"</p>\r\n </div>\r\n"},28:function(n,e,r,l,t){var o;n.propertyIsEnumerable;return' <label class="font-weight-bold">Description</label>\r\n <p>'+n.escapeExpression("function"==typeof(o=null!=(o=r.description||(null!=e?e.description:e))?o:n.hooks.helperMissing)?o.call(null!=e?e:n.nullContext||{},{name:"description",hash:{},data:t}):o)+"</p>\r\n"},compiler:[8,">= 4.3.0"],main:function(n,e,r,l,t){var o;n.propertyIsEnumerable;return(null!=(o=r.unless.call(null!=e?e:n.nullContext||{},null!=(o=null!=e?e.options:e)?o.dataFetched:o,{name:"unless",hash:{},fn:n.program(1,t,0),inverse:n.program(3,t,0),data:t}))?o:"")+"\r\n"},useData:!0})},1430:function(n,e,r){"use strict";r.r(e),r.d(e,"ShowPublisherVideoPopupView",(function(){return x}));var l=r(29),t=r(5),o=r(2),a=r(199),i=r(201),s=r(13),u=r(302),c=r(103),p=r(0),d=r(197),f=r(9),h=r(1297),v=r.n(h),m=r(1298),b=r.n(m);function g(n){return(g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n})(n)}function y(n,e){for(var r=0;r<e.length;r++){var l=e[r];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(n,l.key,l)}}function w(n,e){return(w=Object.setPrototypeOf||function(n,e){return n.__proto__=e,n})(n,e)}function E(n){var e=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(n){return!1}}();return function(){var r,l=k(n);if(e){var t=k(this).constructor;r=Reflect.construct(l,arguments,t)}else r=l.apply(this,arguments);return C(this,r)}}function C(n,e){return!e||"object"!==g(e)&&"function"!=typeof e?function(n){if(void 0===n)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}(n):e}function k(n){return(k=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)})(n)}var x=function(n){!function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),e&&w(n,e)}(m,n);var e,r,o,h=E(m);function m(n){return function(n,e){if(!(n instanceof e))throw new TypeError("Cannot call a class as a function")}(this,m),h.call(this,n)}return e=m,(r=[{key:"initialize",value:function(){this.migrationVideoDataService=t.a.getInstance(p.g.MigrationVideo,this),this.listenTo(p.e.MIGRATION,"".concat(p.f.CUSTOMER_VIDEO,":").concat(this.options.trackingCode,":sync"),this.render),this.listenTo(p.e.MIGRATION,"".concat(p.f.CUSTOMER_VIDEO,":").concat(this.options.masterId,":sync"),this.render)}},{key:"name",get:function(){return"ShowPublisherVideoPopupView"}},{key:"title",get:function(){return!1}},{key:"tagName",get:function(){return"p"}},{key:"template",get:function(){return b.a}},{key:"regions",value:function(){return{thumbnail:".thumbnail-region"}}},{key:"behaviors",get:function(){return[{behaviorClass:u.e,title:"Publisher Archive Video Details",hideCloseButton:!0,size:"modal-lg"}]}},{key:"getUrl",value:function(){if(this.model){var n=this.config.get("imageCdnUrl"),e=this.model.get("trackingCode");return"".concat(n,"v1/thumbnails/trackingcode/").concat(e)}}},{key:"getBroadcastDate",value:function(){return this.model.get("dateBroadcast")?l(this.model.get("dateBroadcast")).format(f.l.FULL_YEAR):""}},{key:"viewOptions",value:function(){return{styles:v.a,dataFetched:!!this.model,spinnerEl:s.r.getSpinner({size:s.s.Large,extraClasses:"mx-auto"}),dateBroadcast:this.getBroadcastDate()}}},{key:"requiredResources",get:function(){return{config:d.b.config}}},{key:"onBeforeRender",value:function(){return this.options.trackingCode&&(this.model=this.migrationVideoDataService.getCustomerVideoByTrackingCode(this.options.trackingCode)),this.options.masterId&&(this.model=this.migrationVideoDataService.getCustomerVideoByMasterId(this.options.masterId)),!!this.model}},{key:"onRender",value:function(){this.showChildView("thumbnail",new a.a({model:new c.a({thumbnail:{url:this.getUrl()}},{parse:!0}),thumbnailOptions:{size:i.a.Small}}))}}])&&y(e.prototype,r),o&&y(e,o),m}(o.a.View)}}]);
@@ -1 +1 @@
1
- (window.webpackJsonp_clickview_library_editor=window.webpackJsonp_clickview_library_editor||[]).push([[17],{1473:function(t,e,n){"use strict";n.r(e);var o=n(2),r=n(200),i=n(5),c=n(0),u=n(59),a=function(t,e){return u.a.safeUrlConcat(u.a.makeHttps(t),"/download?token=".concat(e))};function f(t){return(f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function l(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}function s(t,e){return(s=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function y(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,o=d(t);if(e){var r=d(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return p(this,n)}}function p(t,e){return!e||"object"!==f(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function d(t){return(d=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}n.d(e,"DownloadVideoView",(function(){return b}));var b=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&s(t,e)}(f,t);var e,n,o,u=y(f);function f(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,f),u.call(this,t)}return e=f,(n=[{key:"initialize",value:function(){this.downloadProxyDataService=i.a.getInstance(c.g.DownloadProxy,this)}},{key:"name",get:function(){return"DownloadVideoView"}},{key:"title",get:function(){return!1}},{key:"tagName",get:function(){return"iframe"}},{key:"template",get:function(){return"<div></div>"}},{key:"requiredResources",get:function(){return{config:r.b.config}}},{key:"onBeforeRender",value:function(){var t=this;this.downloadProxyDataService.createDownloadToken(this.options.videoId,(function(e){var n=a(t.config.get("downloadProxy"),e.get("token"));t.$el.attr("src",n)}))}}])&&l(e.prototype,n),o&&l(e,o),f}(o.a.View)}}]);
1
+ (window.webpackJsonp_clickview_library_editor=window.webpackJsonp_clickview_library_editor||[]).push([[17],{1470:function(t,e,n){"use strict";n.r(e);var o=n(2),r=n(197),i=n(5),c=n(0),u=n(59),a=function(t,e){return u.a.safeUrlConcat(u.a.makeHttps(t),"/download?token=".concat(e))};function f(t){return(f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function l(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}function s(t,e){return(s=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function y(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,o=d(t);if(e){var r=d(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return p(this,n)}}function p(t,e){return!e||"object"!==f(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function d(t){return(d=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}n.d(e,"DownloadVideoView",(function(){return b}));var b=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&s(t,e)}(f,t);var e,n,o,u=y(f);function f(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,f),u.call(this,t)}return e=f,(n=[{key:"initialize",value:function(){this.downloadProxyDataService=i.a.getInstance(c.g.DownloadProxy,this)}},{key:"name",get:function(){return"DownloadVideoView"}},{key:"title",get:function(){return!1}},{key:"tagName",get:function(){return"iframe"}},{key:"template",get:function(){return"<div></div>"}},{key:"requiredResources",get:function(){return{config:r.b.config}}},{key:"onBeforeRender",value:function(){var t=this;this.downloadProxyDataService.createDownloadToken(this.options.videoId,(function(e){var n=a(t.config.get("downloadProxy"),e.get("token"));t.$el.attr("src",n)}))}}])&&l(e.prototype,n),o&&l(e,o),f}(o.a.View)}}]);