@clickview/library-editor 1.2.2 → 1.3.0-rc.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (149) hide show
  1. package/dist/bundles.json +3 -3
  2. package/dist/css/{library-editor-app-73ef35d93e.css → library-editor-app-30cd08bfae.css} +2 -2
  3. package/dist/en.json +1 -1
  4. package/dist/scripts/0-d20750cdec.chunk.js +1 -0
  5. package/dist/scripts/1-28a327acf3.chunk.js +1 -0
  6. package/dist/scripts/10-b830a40f72.chunk.js +1 -0
  7. package/dist/scripts/{11-efbe8b672b.chunk.js → 11-02eba260f6.chunk.js} +1 -1
  8. package/dist/scripts/12-8791a92594.chunk.js +1 -0
  9. package/dist/scripts/13-665738fbb1.chunk.js +1 -0
  10. package/dist/scripts/14-1e2cd6ac41.chunk.js +1 -0
  11. package/dist/scripts/15-0dc89981e2.chunk.js +1 -0
  12. package/dist/scripts/16-4a1c634dda.chunk.js +1 -0
  13. package/dist/scripts/17-3c94d08d78.chunk.js +1 -0
  14. package/dist/scripts/{18-4c5983938e.chunk.js → 18-3fadb1f394.chunk.js} +1 -1
  15. package/dist/scripts/19-8e572002ab.chunk.js +1 -0
  16. package/dist/scripts/{2-d90f461b10.chunk.js → 2-7a78d29f44.chunk.js} +1 -1
  17. package/dist/scripts/22-d2e056e746.chunk.js +1 -0
  18. package/dist/scripts/23-f8a294ec40.chunk.js +1 -0
  19. package/dist/scripts/24-2bcd00effe.chunk.js +1 -0
  20. package/dist/scripts/25-c4aaeab127.chunk.js +1 -0
  21. package/dist/scripts/26-9a7dd55620.chunk.js +1 -0
  22. package/dist/scripts/27-7e018cd6b5.chunk.js +1 -0
  23. package/dist/scripts/28-b1c31de615.chunk.js +1 -0
  24. package/dist/scripts/29-2beecb7b1b.chunk.js +1 -0
  25. package/dist/scripts/3-eb941619ce.chunk.js +1 -0
  26. package/dist/scripts/30-e056eceff1.chunk.js +1 -0
  27. package/dist/scripts/31-f5fb9024bf.chunk.js +1 -0
  28. package/dist/scripts/32-3a253b3136.chunk.js +1 -0
  29. package/dist/scripts/33-48b0479da2.chunk.js +1 -0
  30. package/dist/scripts/34-3d5a50c31b.chunk.js +1 -0
  31. package/dist/scripts/35-0d7358dba8.chunk.js +1 -0
  32. package/dist/scripts/36-d6d7b848e2.chunk.js +1 -0
  33. package/dist/scripts/37-d39100a6e1.chunk.js +1 -0
  34. package/dist/scripts/38-35d9648dc7.chunk.js +1 -0
  35. package/dist/scripts/39-06dd548dc5.chunk.js +1 -0
  36. package/dist/scripts/4-2a82a84056.chunk.js +1 -0
  37. package/dist/scripts/40-792c2cdf70.chunk.js +1 -0
  38. package/dist/scripts/41-b943713472.chunk.js +1 -0
  39. package/dist/scripts/42-f49212bb91.chunk.js +1 -0
  40. package/dist/scripts/43-fb162a1122.chunk.js +1 -0
  41. package/dist/scripts/44-b3b4565828.chunk.js +1 -0
  42. package/dist/scripts/45-fed967dc8d.chunk.js +1 -0
  43. package/dist/scripts/46-372fa93c13.chunk.js +1 -0
  44. package/dist/scripts/47-3af23cc886.chunk.js +1 -0
  45. package/dist/scripts/48-f0403bcb83.chunk.js +1 -0
  46. package/dist/scripts/49-13b2893542.chunk.js +1 -0
  47. package/dist/scripts/5-0fa94bdf69.chunk.js +1 -0
  48. package/dist/scripts/50-f2d6010fd8.chunk.js +1 -0
  49. package/dist/scripts/51-ec94176992.chunk.js +1 -0
  50. package/dist/scripts/52-f541d887ed.chunk.js +1 -0
  51. package/dist/scripts/53-5de0b434bf.chunk.js +1 -0
  52. package/dist/scripts/54-e397b03055.chunk.js +1 -0
  53. package/dist/scripts/55-a5aa7796a9.chunk.js +1 -0
  54. package/dist/scripts/56-de18389621.chunk.js +1 -0
  55. package/dist/scripts/57-ea4f07ceff.chunk.js +1 -0
  56. package/dist/scripts/58-be172a6ca4.chunk.js +1 -0
  57. package/dist/scripts/59-4bf5baafed.chunk.js +1 -0
  58. package/dist/scripts/6-c0744fc9f6.chunk.js +1 -0
  59. package/dist/scripts/{60-02ac1d0885.chunk.js → 60-03e44d916c.chunk.js} +1 -1
  60. package/dist/scripts/{61-11806e7f0f.chunk.js → 61-f5f8c3a7f9.chunk.js} +1 -1
  61. package/dist/scripts/62-78089903fa.chunk.js +1 -0
  62. package/dist/scripts/63-ea5265b3ba.chunk.js +1 -0
  63. package/dist/scripts/64-1460024bea.chunk.js +1 -0
  64. package/dist/scripts/65-81c6f0a1d0.chunk.js +1 -0
  65. package/dist/scripts/66-469cc41ce6.chunk.js +1 -0
  66. package/dist/scripts/67-d83860b6f9.chunk.js +1 -0
  67. package/dist/scripts/68-bf1905261e.chunk.js +1 -0
  68. package/dist/scripts/69-01456dee21.chunk.js +1 -0
  69. package/dist/scripts/7-8ae226ffea.chunk.js +1 -0
  70. package/dist/scripts/70-e79d42e859.chunk.js +1 -0
  71. package/dist/scripts/71-8bee00418c.chunk.js +1 -0
  72. package/dist/scripts/72-c9c79df587.chunk.js +1 -0
  73. package/dist/scripts/73-172b46004e.chunk.js +1 -0
  74. package/dist/scripts/74-3a572e4113.chunk.js +1 -0
  75. package/dist/scripts/8-320ab9271f.chunk.js +1 -0
  76. package/dist/scripts/9-eb320e3ae9.chunk.js +1 -0
  77. package/dist/scripts/bundle-d80b4b3ce7.min.js +10 -0
  78. package/dist/scripts/polyfills-afb66ec8cc.min.js +1 -0
  79. package/package.json +2 -2
  80. package/dist/scripts/0-3146283f04.chunk.js +0 -1
  81. package/dist/scripts/1-8f308c9df2.chunk.js +0 -1
  82. package/dist/scripts/10-1f8e4712fb.chunk.js +0 -1
  83. package/dist/scripts/12-9a649bd1e8.chunk.js +0 -1
  84. package/dist/scripts/13-d003ff9e41.chunk.js +0 -1
  85. package/dist/scripts/14-79273eff4c.chunk.js +0 -1
  86. package/dist/scripts/15-1a0756e067.chunk.js +0 -1
  87. package/dist/scripts/16-bbf0f01fe8.chunk.js +0 -1
  88. package/dist/scripts/17-3056f1e460.chunk.js +0 -1
  89. package/dist/scripts/19-f6bd3a3d49.chunk.js +0 -1
  90. package/dist/scripts/22-f0e56683c3.chunk.js +0 -1
  91. package/dist/scripts/23-cdce4174d1.chunk.js +0 -1
  92. package/dist/scripts/24-afd2aa2bfc.chunk.js +0 -1
  93. package/dist/scripts/25-b8aeb90fea.chunk.js +0 -1
  94. package/dist/scripts/26-08a7f60500.chunk.js +0 -1
  95. package/dist/scripts/27-4fdfe99ba0.chunk.js +0 -1
  96. package/dist/scripts/28-bb3ced1465.chunk.js +0 -1
  97. package/dist/scripts/29-ef11dca9b5.chunk.js +0 -1
  98. package/dist/scripts/3-f02b82314e.chunk.js +0 -1
  99. package/dist/scripts/30-41819d54db.chunk.js +0 -1
  100. package/dist/scripts/31-adedea4916.chunk.js +0 -1
  101. package/dist/scripts/32-92b6dc1186.chunk.js +0 -1
  102. package/dist/scripts/33-dda4dfbdee.chunk.js +0 -1
  103. package/dist/scripts/34-0f61f7fc7d.chunk.js +0 -1
  104. package/dist/scripts/35-df3c6c90f7.chunk.js +0 -1
  105. package/dist/scripts/36-97a61b13fd.chunk.js +0 -1
  106. package/dist/scripts/37-5f0b4c4b24.chunk.js +0 -1
  107. package/dist/scripts/38-1806441e62.chunk.js +0 -1
  108. package/dist/scripts/39-cb06876d63.chunk.js +0 -1
  109. package/dist/scripts/4-3556f5cd86.chunk.js +0 -1
  110. package/dist/scripts/40-dedc900f03.chunk.js +0 -1
  111. package/dist/scripts/41-2a772649ef.chunk.js +0 -1
  112. package/dist/scripts/42-edd884c6e1.chunk.js +0 -1
  113. package/dist/scripts/43-7cb12bb043.chunk.js +0 -1
  114. package/dist/scripts/44-6e38e6c3da.chunk.js +0 -1
  115. package/dist/scripts/45-7696788c78.chunk.js +0 -1
  116. package/dist/scripts/46-6fae0cec47.chunk.js +0 -1
  117. package/dist/scripts/47-c5e053926b.chunk.js +0 -1
  118. package/dist/scripts/48-c62f428014.chunk.js +0 -1
  119. package/dist/scripts/49-0221ac925c.chunk.js +0 -1
  120. package/dist/scripts/5-f2fad668b9.chunk.js +0 -1
  121. package/dist/scripts/50-6c9cd76347.chunk.js +0 -1
  122. package/dist/scripts/51-4c4cb2a786.chunk.js +0 -1
  123. package/dist/scripts/52-1a2a4d664f.chunk.js +0 -1
  124. package/dist/scripts/53-4420fdb2ff.chunk.js +0 -1
  125. package/dist/scripts/54-7ad2a43bae.chunk.js +0 -1
  126. package/dist/scripts/55-6bdc1394e8.chunk.js +0 -1
  127. package/dist/scripts/56-0e7f151d8f.chunk.js +0 -1
  128. package/dist/scripts/57-e02ec7e3aa.chunk.js +0 -1
  129. package/dist/scripts/58-23f2f08ffa.chunk.js +0 -1
  130. package/dist/scripts/59-73f62422ee.chunk.js +0 -1
  131. package/dist/scripts/6-41fbd1d098.chunk.js +0 -1
  132. package/dist/scripts/62-36cd4edbe1.chunk.js +0 -1
  133. package/dist/scripts/63-221a784003.chunk.js +0 -1
  134. package/dist/scripts/64-de212ef1ff.chunk.js +0 -1
  135. package/dist/scripts/65-2a3fe2cf9f.chunk.js +0 -1
  136. package/dist/scripts/66-3d86df4f03.chunk.js +0 -1
  137. package/dist/scripts/67-4044e5776b.chunk.js +0 -1
  138. package/dist/scripts/68-d9ac81db0f.chunk.js +0 -1
  139. package/dist/scripts/69-4523125605.chunk.js +0 -1
  140. package/dist/scripts/7-7d08599cb1.chunk.js +0 -1
  141. package/dist/scripts/70-cac4a9fb87.chunk.js +0 -1
  142. package/dist/scripts/71-59ded4dd7b.chunk.js +0 -1
  143. package/dist/scripts/72-8329bfea82.chunk.js +0 -1
  144. package/dist/scripts/73-dfe0e3c96a.chunk.js +0 -1
  145. package/dist/scripts/74-1aee6ab328.chunk.js +0 -1
  146. package/dist/scripts/8-b20f6d3c66.chunk.js +0 -1
  147. package/dist/scripts/9-4baf495c07.chunk.js +0 -1
  148. package/dist/scripts/bundle-aba0b4f36c.min.js +0 -10
  149. package/dist/scripts/polyfills-c68217e80d.min.js +0 -1
@@ -0,0 +1 @@
1
+ (window.webpackJsonp_clickview_library_editor=window.webpackJsonp_clickview_library_editor||[]).push([[13],{1112:function(e,n,t){"use strict";t.d(n,"a",(function(){return k}));var o=t(1),r=t(6),i=t(2),a=t(19),l=t(16),s=t(99),u=t(12),c=t(1160),p=t.n(c),d=t(1161),f=t.n(d);function h(e){return(h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function m(e,n){for(var t=0;t<n.length;t++){var o=n[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function y(e,n){return(y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,n){return e.__proto__=n,e})(e,n)}function b(e){var n=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 t,o=v(e);if(n){var r=v(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return g(this,t)}}function g(e,n){if(n&&("object"===h(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function v(e){return(v=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var k=function(e){!function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),n&&y(e,n)}(h,e);var n,t,c,d=b(h);function h(e){return function(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}(this,h),d.call(this,e)}return n=h,(t=[{key:"name",get:function(){return"SearchTypeaheadComponent"}},{key:"template",get:function(){return p.a}},{key:"className",get:function(){return"search-container ".concat(f.a.typeaheadContainer," mb-2")}},{key:"channelName",get:function(){return u.k.generateUniqueChannelName(this)}},{key:"elements",get:function(){return{input:"#".concat(this.options.inputId)}}},{key:"defaults",get:function(){return{inputId:"search-typeahead",placeholderText:"Search",stickItProperty:"name",selectEvent:"select:result",additionalClasses:"",editable:!0}}},{key:"events",value:function(){return{submit:"onSubmit","click .remove":"onClickRemove"}}},{key:"initialize",value:function(){this.model||this.options.parentChannelName||i.a.ErrorHelper.throw(new a.a("Either pass a model or a channelName to access the typeahead selection")),this.model||(this.model=new i.a.Model),this.options.inputName||(this.options.inputName=this.options.inputId),this.bindListeners()}},{key:"bindListeners",value:function(){this.options.parentChannelName&&(this.parentChannel=r.Radio.channel(this.options.parentChannelName)),this.listenTo(this.channelName,"typeahead:set:input",this.setInput),this.listenTo(this.channelName,"typeahead:clear:input",this.clearInput)}},{key:"bindings",get:function(){var e,n,t,o="[name=".concat(this.options.inputName,"]");return e={},n=o,t={observe:this.options.stickItProperty,setOptions:{validate:!0}},n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}},{key:"clearInput",value:function(){this.getUI("input").typeahead("val",null)}},{key:"setInput",value:function(e){this.getUI("input").typeahead("val",e)}},{key:"onTypeaheadSelect",value:function(e,n){var t;e.preventDefault(),t="string"==typeof n?n:n.title||n.name||n.query,this.model.set(this.options.stickItProperty,t),this.parentChannel&&this.options.selectEvent&&this.parentChannel.trigger(this.options.selectEvent,n),this.onSubmit(e),this.toggleRemove()}},{key:"onSubmit",value:function(e){var n=this;if(e.preventDefault(),!this.isDestroyed()&&this.getTypeaheadActionOptions().clearOnSelect)return this.getUI("input").typeahead("close"),setTimeout((function(){n.model.clear(),n.clearInput()}),0),!1}},{key:"onClickRemove",value:function(){this.model.clear(),this.parentChannel.trigger(this.options.removeEvent,this.model),this.toggleRemove()}},{key:"getSources",value:function(){return o.isArray(this.options.typeaheadConfigs)?s.a.getSearchSources(this.options.typeaheadConfigs):s.a.getSearchSources([this.options.typeaheadConfigs])}},{key:"getTypeaheadOptions",value:function(){var e={minLength:1,highlight:!0};return this.options.typeaheadOptions?o.extend({},e,this.options.typeaheadOptions):e}},{key:"getTypeaheadActionOptions",value:function(){var e={clearOnSelect:!1};return o.isObject(this.options.actionOptions)?o.extend({},e,this.options.actionOptions):e}},{key:"bindOptionalCallbacks",value:function(){o.isObject(this.options.callbacks)&&(o.isFunction(this.options.callbacks.onRender)&&this.getUI("input").on("typeahead:render",o.bind(this.options.callbacks.onRender,this)),o.isFunction(this.options.callbacks.onInput)&&this.listenTo(this.model,"change:".concat(this.options.stickItProperty),this.options.callbacks.onInput),o.isFunction(this.options.callbacks.onBlur)&&this.getUI("input").on("blur",o.bind(this.options.callbacks.onBlur,this,this.channelName,this.options.stickItProperty)))}},{key:"initTypeahead",value:function(){this.getUI("input").typeahead(this.getTypeaheadOptions(),this.getSources())}},{key:"initTypeaheadListeners",value:function(){this.getUI("input").on("typeahead:select",o.bind(this.onTypeaheadSelect,this)),this.bindOptionalCallbacks()}},{key:"toggleRemove",value:function(){this.shouldShowRemove()?this.$el.find(".remove").show():this.$el.find(".remove").hide()}},{key:"shouldShowRemove",value:function(){return!!this.options.editable&&(!!this.options.forceShowRemoveButton||this.options.removeEvent&&!!this.model.get(this.options.stickItProperty))}},{key:"viewOptions",value:function(){return Object.assign(Object.assign({styles:f.a},this.options),{showRemove:this.shouldShowRemove(),svgRemove:l.a.getSvg(l.b.Close)})}},{key:"onRender",value:function(){var e=this;this.stickit(),this.initTypeahead(),this.initTypeaheadListeners(),r.Validation.bind(this),this.toggleRemove(),this.options.autofocus&&window.requestAnimationFrame((function(){e.getUI("input").focus()}))}},{key:"onClose",value:function(){this.getUI("input").off(),this.unstickit(),r.Validation.unbind(this)}}])&&m(n.prototype,t),c&&m(n,c),Object.defineProperty(n,"prototype",{writable:!1}),h}(i.a.Component)},1160:function(e,n,t){var o=t(10);e.exports=(o.default||o).template({1:function(e,n,t,o,r){var i;e.propertyIsEnumerable;return e.escapeExpression(e.lambda(null!=(i=null!=(i=null!=n?n.options:n)?i.styles:i)?i.disabled:i,n))},3:function(e,n,t,o,r){return"autofocus"},5:function(e,n,t,o,r){return"disabled"},compiler:[8,">= 4.3.0"],main:function(e,n,t,o,r){e.propertyIsEnumerable;var i,a=e.lambda,l=e.escapeExpression,s=null!=n?n:e.nullContext||{};return'<input\r\n name="'+l(a(null!=(i=null!=n?n.options:n)?i.inputName:i,n))+'"\r\n type="text"\r\n class="form-control '+(null!=(i=t.unless.call(s,null!=(i=null!=n?n.options:n)?i.editable:i,{name:"unless",hash:{},fn:e.program(1,r,0),inverse:e.noop,data:r}))?i:"")+" "+l(a(null!=(i=null!=n?n.options:n)?i.additionalClasses:i,n))+'"\r\n id="'+l(a(null!=(i=null!=n?n.options:n)?i.inputId:i,n))+'"\r\n autocomplete="off"\r\n placeholder="'+l(a(null!=(i=null!=n?n.options:n)?i.placeholderText:i,n))+'"\r\n '+(null!=(i=t.if.call(s,null!=(i=null!=n?n.options:n)?i.autofocus:i,{name:"if",hash:{},fn:e.program(3,r,0),inverse:e.noop,data:r}))?i:"")+"\r\n "+(null!=(i=t.unless.call(s,null!=(i=null!=n?n.options:n)?i.editable:i,{name:"unless",hash:{},fn:e.program(5,r,0),inverse:e.noop,data:r}))?i:"")+'\r\n></input>\r\n<span class="svg-container mb-2 '+l(a(null!=(i=null!=(i=null!=n?n.options:n)?i.styles:i)?i.svg:i,n))+' remove" style="display: none;">'+(null!=(i=a(null!=(i=null!=n?n.options:n)?i.svgRemove:i,n))?i:"")+"</span>"},useData:!0})},1161:function(e,n,t){e.exports={svg:"_1iL3O",typeaheadContainer:"_1SWXc",disabled:"_3C2O8"}},1205:function(e,n,t){"use strict";t.d(n,"a",(function(){return w}));var o=t(6),r=t(2),i=t(16),a=t(1209),l=t(1207),s=t(3),u=t(0),c=t(200),p=t(1269),d=t.n(p),f=t(1111),h=t.n(f);function m(e){return(m="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 y(e,n){for(var t=0;t<n.length;t++){var o=n[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function b(e,n){return(b=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,n){return e.__proto__=n,e})(e,n)}function g(e){var n=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 t,o=k(e);if(n){var r=k(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return v(this,t)}}function v(e,n){if(n&&("object"===m(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function k(e){return(k=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var w=function(e){!function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),n&&b(e,n)}(f,e);var n,t,r,p=g(f);function f(e){return function(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}(this,f),p.call(this,e)}return n=f,(t=[{key:"name",get:function(){return"EditBasicInfoComponent"}},{key:"tagName",get:function(){return"form"}},{key:"template",get:function(){return d.a}},{key:"lang",get:function(){return"shared.editBasicInfo"}},{key:"channelName",get:function(){return this.options.channelName}},{key:"className",get:function(){return"edit-basic-info"}},{key:"events",value:function(){return{submit:function(e){return e.preventDefault()}}}},{key:"regions",value:function(){return{description:{el:".description-region",replaceElement:!0},ratings:{el:".ratings-region",replaceElement:!0}}}},{key:"appLinks",get:function(){return{".suggest-title":{application:u.b.LIBRARY_EDITOR,action:u.a.LibraryEditor.SUGGEST_AN_EDIT,args:[this.model.get("id")],params:{metadata:c.MetadataType.VideoTitle}},".suggest-description":{application:u.b.LIBRARY_EDITOR,action:u.a.LibraryEditor.SUGGEST_AN_EDIT,args:[this.model.get("id")],params:{metadata:c.MetadataType.Description}},".applink-publisher-video":{application:u.b.LIBRARY_EDITOR,action:u.a.LibraryEditor.SHOW_PUBLISHER_VIDEO,args:[this.model.get("id")]}}}},{key:"bindings",get:function(){return{"[name=name]":{observe:"name",setOptions:{validate:!0}},"[name=description]":{observe:"description",setOptions:{validate:!0}}}}},{key:"renderDescription",value:function(){this.showChildView("description",new l.a({name:"description",class:"form-control ".concat(!this.options.editable&&h.a.disabled),placeholder:this.options.editable?s.a.getPhrase(this.lang,"descriptionPlaceholder"):"",id:"edit-description",disabled:!this.options.editable}))}},{key:"renderRatings",value:function(){this.showChildView("ratings",new a.a({model:this.model.rating,collection:this.options.ratings,parentChannelName:this.options.channelName,editable:this.options.editable,videoId:this.model.get("id")}))}},{key:"viewOptions",value:function(){return{styles:h.a,requiredFields:this.options.requiredFields,videoTitlePlaceholder:this.options.editable?s.a.getPhrase(this.lang,"titlePlaceholder"):"",editable:this.options.editable,publisherArchiveSvg:i.a.getSvg(i.b.PublisherArchive),showPublisherVideoDetails:this.options.showPublisherVideoDetails,showingSaveButton:this.options.showingSaveButton}}},{key:"onRender",value:function(){this.renderDescription(),this.renderRatings(),this.stickit(),o.Validation.bind(this)}},{key:"onDestroy",value:function(){this.unstickit(),o.Validation.unbind(this)}}])&&y(n.prototype,t),r&&y(n,r),Object.defineProperty(n,"prototype",{writable:!1}),f}(r.a.Component)},1207:function(e,n,t){"use strict";t.d(n,"a",(function(){return m}));var o=t(1),r=t(2),i=t(1267),a=t.n(i),l=t(1268),s=t.n(l);function u(e){return(u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function c(e,n){for(var t=0;t<n.length;t++){var o=n[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function p(e,n){return(p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,n){return e.__proto__=n,e})(e,n)}function d(e){var n=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 t,o=h(e);if(n){var r=h(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return f(this,t)}}function f(e,n){if(n&&("object"===u(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function h(e){return(h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var m=function(e){!function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),n&&p(e,n)}(l,e);var n,t,r,i=d(l);function l(e){return function(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}(this,l),i.call(this,e)}return n=l,(t=[{key:"name",get:function(){return"ResizingTextAreaComponent"}},{key:"template",get:function(){return a.a}},{key:"events",value:function(){return{"input .event-selector":"onInput"}}},{key:"onInput",value:function(e){var n=e.target;n.style.height="inherit";var t=window.getComputedStyle(n),o=parseInt(t.getPropertyValue("border-top-width"),10)+parseInt(t.getPropertyValue("padding-top"),10)+n.scrollHeight+parseInt(t.getPropertyValue("padding-bottom"),10)+parseInt(t.getPropertyValue("border-bottom-width"),10);n.style.height=o+"px"}},{key:"viewOptions",value:function(){return o.extend({},this.options,{styles:s.a})}}])&&c(n.prototype,t),r&&c(n,r),Object.defineProperty(n,"prototype",{writable:!1}),l}(r.a.Component)},1208:function(e,n,t){"use strict";var o=t(1),r=t(6),i=t(2),a=t(99),l=t(305),s=t(1112),u=t(370),c=t(0),p=t(29),d=t(16),f=t(1272),h=t.n(f),m=t(1273),y=t.n(m);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 g(e,n){for(var t=0;t<n.length;t++){var o=n[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function v(e,n){return(v=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,n){return e.__proto__=n,e})(e,n)}function k(e){var n=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 t,o=E(e);if(n){var r=E(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return w(this,t)}}function w(e,n){if(n&&("object"===b(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function E(e){return(E=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var C=function(e){!function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),n&&v(e,n)}(a,e);var n,t,o,i=k(a);function a(e){return function(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}(this,a),i.call(this,e)}return n=a,(t=[{key:"name",get:function(){return"ClearButtonComponent"}},{key:"className",get:function(){return"".concat(y.a.clearButton)}},{key:"template",get:function(){return h.a}},{key:"events",value:function(){return{click:"onClick"}}},{key:"onClick",value:function(){r.Radio.channel(this.options.channelName).trigger("clear:date")}},{key:"onBeforeRender",value:function(){return!!this.options.shouldRender}},{key:"viewOptions",value:function(){return{styles:y.a,svgClear:d.a.getSvg(d.b.Close)}}}])&&g(n.prototype,t),o&&g(n,o),Object.defineProperty(n,"prototype",{writable:!1}),a}(i.a.Component),O=t(3),S=t(200),P=t(1274),T=t.n(P),x=t(1275),I=t.n(x),R=t(1111),_=t.n(R);function D(e){return(D="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function j(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function N(e,n){for(var t=0;t<n.length;t++){var o=n[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function B(e,n){return(B=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,n){return e.__proto__=n,e})(e,n)}function A(e){var n=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 t,o=M(e);if(n){var r=M(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return L(this,t)}}function L(e,n){if(n&&("object"===D(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function M(e){return(M=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var V=function(e){!function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),n&&B(e,n)}(a,e);var n,t,r,i=A(a);function a(e){return function(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}(this,a),i.call(this,e)}return n=a,(t=[{key:"initialize",value:function(){this.listenTo(this.model,"change:".concat(this.options.modelAttr),this.renderClearDateButton),this.listenTo(this.channelName,"clear:date",this.onClearDate)}},{key:"name",get:function(){return"DatePickerComponent"}},{key:"template",get:function(){return T.a}},{key:"lang",get:function(){return"shared.datePicker"}},{key:"channelName",get:function(){return"".concat(this.name,":").concat(this.cid)}},{key:"elements",get:function(){return{date:"#".concat(this.options.modelAttr)}}},{key:"regions",value:function(){return{clearButton:{el:".clear-button-region"}}}},{key:"appLinks",get:function(){return{".suggest-broadcast-date":{application:c.b.LIBRARY_EDITOR,action:c.a.LibraryEditor.SUGGEST_AN_EDIT,args:[this.model.get("id")],params:{metadata:S.MetadataType.BroadcastDate}}}}},{key:"defaults",get:function(){return{placeholderText:O.a.getPhrase(this.lang,"placeholder"),allowTextInput:!1,allowClearDate:!0,minYear:1900,editable:!0}}},{key:"behaviors",get:function(){return[{behaviorClass:l.a},{behaviorClass:l.f}]}},{key:"bindings",get:function(){var e=this;return j({},"[name=".concat(this.options.modelAttr,"]"),{observe:this.options.modelAttr,setOptions:{validate:!0},onGet:function(n){return e.getFormattedDisplayDate(n)},onSet:function(n){return e.getFormattedSavedDate(n)}})}},{key:"events",value:function(){return j({"keydown @ui.date":"onKeyDownDate"},"click .".concat(I.a.calendarSvg),"onClickCalendarIcon")}},{key:"getInstanceClassName",value:function(){return"datetimepicker-".concat(this.cid)}},{key:"initDatePicker",value:function(){this.getUI("date").datetimepicker({format:this.options.displayedTimeFormat,minDate:p().year(this.options.minYear),maxDate:p(),icons:{previous:I.a.previous,next:I.a.next}})}},{key:"getFormattedDisplayDate",value:function(e){if(e)return o.isFunction(this.options.formatDisplayDate)?this.options.formatDisplayDate(e):p.utc(e).local().format(this.options.displayedTimeFormat)}},{key:"getFormattedSavedDate",value:function(e){if(e)return o.isFunction(this.options.formatSavedDate)?this.options.formatSavedDate(e):this.options.savedTimeFormat?p.utc(e).format(this.options.savedTimeFormat):p.utc(e).format()}},{key:"onClickCalendarIcon",value:function(){if(this.options.editable)return this.getUI("date").datetimepicker("toggle"),!0}},{key:"onClearDate",value:function(){return!this.options.allowClearDate||(this.model.set(j({},"".concat(this.options.modelAttr),null)),!0)}},{key:"onKeyDownDate",value:function(e){this.options.allowTextInput||e.preventDefault()}},{key:"renderClearDateButton",value:function(){this.showChildView("clearButton",new C({channelName:this.channelName,shouldRender:this.options.allowClearDate&&!!this.model.get("dateBroadcast")}))}},{key:"viewOptions",value:function(){return{styles:o.extend(_.a,I.a),label:this.options.label,modelAttr:this.options.modelAttr,instanceClass:this.getInstanceClassName(),placeholderText:this.options.placeholderText,displayedTimeFormat:this.options.displayedTimeFormat,svgCalendar:d.a.getSvg(d.b.Calendar),svgClear:d.a.getSvg(d.b.Close),editable:this.options.editable}}},{key:"onRender",value:function(){this.initDatePicker(),this.renderClearDateButton()}}])&&N(n.prototype,t),r&&N(n,r),Object.defineProperty(n,"prototype",{writable:!1}),a}(i.a.Component),F=t(9),U=t(314),Y=t(1276),G=t.n(Y);function z(e){return(z="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function q(e,n){for(var t=0;t<n.length;t++){var o=n[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function J(e,n){return(J=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,n){return e.__proto__=n,e})(e,n)}function H(e){var n=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 t,o=K(e);if(n){var r=K(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return W(this,t)}}function W(e,n){if(n&&("object"===z(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function K(e){return(K=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Z=function(e){!function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),n&&J(e,n)}(i,e);var n,t,o,r=H(i);function i(e){return function(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}(this,i),r.call(this,e)}return n=i,(t=[{key:"name",get:function(){return"EditBroadcastComponent"}},{key:"template",get:function(){return G.a}},{key:"lang",get:function(){return"shared.editBroadcast"}},{key:"className",get:function(){return"edit-broadcast"}},{key:"regions",value:function(){return{dateBroadcast:{el:".date-broadcast-region",replaceElement:!0},channelSearch:{el:".channel-search-region",replaceElement:!0}}}},{key:"appLinks",get:function(){return{".suggest-channel":{application:c.b.LIBRARY_EDITOR,action:c.a.LibraryEditor.SUGGEST_AN_EDIT,args:[this.model.get("id")],params:{metadata:S.MetadataType.Channel}}}}},{key:"buildTypeaheadConfig",value:function(){return{name:c.v.ChannelRaw,typeaheadConfig:U.a.getTypeaheadConfig(),bloodhoundConfig:U.a.getBloodhoundConfig()}}},{key:"renderBroadcastDate",value:function(){this.showChildView("dateBroadcast",new V({model:this.model,label:O.a.getPhrase(this.lang,"broadcastDate"),modelAttr:"dateBroadcast",displayedTimeFormat:F.l.FULL_YEAR,placeholderText:this.options.editable?O.a.getPhrase(this.lang,"selectBroadcastDate"):"",allowClearDate:this.options.editable,editable:this.options.editable}))}},{key:"renderChannelTypeahead",value:function(){this.model.get("channel")||this.model.set("channel",new u.a),this.showChildView("channelSearch",new s.a({model:this.model.get("channel"),parentChannelName:this.options.channelName,inputId:"channel-search",selectEvent:"select:channel",placeholderText:this.options.editable?O.a.getPhrase(this.lang,"searchChannels"):"",typeaheadConfigs:this.buildTypeaheadConfig(),callbacks:{onInput:a.a.emitEventOnInput(this.options.channelName,S.LibraryEditorActions.DetectInput,"channel"),onBlur:a.a.resetAssociationOnBlur(this.model.get("channel").toJSON())},editable:this.options.editable,removeEvent:"remove:channel"}))}},{key:"viewOptions",value:function(){return{styles:_.a,editable:this.options.editable}}},{key:"onRender",value:function(){this.renderBroadcastDate(),this.renderChannelTypeahead()}}])&&q(n.prototype,t),o&&q(n,o),Object.defineProperty(n,"prototype",{writable:!1}),i}(i.a.Component),$=t(1277),X=t.n($),Q=t(1278),ee=t.n(Q);function ne(e){return(ne="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function te(e,n){for(var t=0;t<n.length;t++){var o=n[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function oe(e,n){return(oe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,n){return e.__proto__=n,e})(e,n)}function re(e){var n=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 t,o=ae(e);if(n){var r=ae(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return ie(this,t)}}function ie(e,n){if(n&&("object"===ne(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function ae(e){return(ae=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var le=function(e){!function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),n&&oe(e,n)}(i,e);var n,t,o,r=re(i);function i(e){return function(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}(this,i),r.call(this,e)}return n=i,(t=[{key:"name",get:function(){return"ToggleBroadcastComponent"}},{key:"template",get:function(){return X.a}},{key:"lang",get:function(){return"shared.toggleBroadcast"}},{key:"className",get:function(){return"toggle-broadcast"}},{key:"regions",value:function(){return{broadcast:{el:".broadcast-region",replaceElement:!0}}}},{key:"behaviors",get:function(){return this.options.hideToggle?[]:[{behaviorClass:l.a},{behaviorClass:l.f}]}},{key:"bindings",get:function(){return{"[name=toggleBroadcast]":{observe:"hasBroadcast"}}}},{key:"initialize",value:function(){this.listenTo(this.model,"change:hasBroadcast",this.render),this.initBroadcast()}},{key:"initBroadcast",value:function(){var e=this.model.get("channel"),n=this.model.get("dateBroadcast")||e&&e.get("id");this.model.set("hasBroadcast",!!n,{silent:!0})}},{key:"renderEditBroadcast",value:function(){this.model.get("hasBroadcast")||this.options.hideToggle?this.showChildView("broadcast",new Z({model:this.model,channelName:this.options.channelName,editable:this.options.editable})):this.getRegion("broadcast").empty()}},{key:"viewOptions",value:function(){return Object.assign({styles:ee.a},this.options)}},{key:"onRender",value:function(){this.renderEditBroadcast()}}])&&te(n.prototype,t),o&&te(n,o),Object.defineProperty(n,"prototype",{writable:!1}),i}(i.a.Component),se=t(30),ue=t(265),ce=t(12),pe=t(1051),de=t(1279),fe=t.n(de),he=t(1280),me=t.n(he),ye=t(1281),be=t.n(ye);function ge(e){return(ge="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ve(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function ke(e,n){for(var t=0;t<n.length;t++){var o=n[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function we(e,n,t){return n&&ke(e.prototype,n),t&&ke(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Ee(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),n&&Ce(e,n)}function Ce(e,n){return(Ce=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,n){return e.__proto__=n,e})(e,n)}function Oe(e){var n=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 t,o=Pe(e);if(n){var r=Pe(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Se(this,t)}}function Se(e,n){if(n&&("object"===ge(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Pe(e){return(Pe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Te=function(e){Ee(t,e);var n=Oe(t);function t(e){var o;return ve(this,t),(o=n.call(this,e)).showSpinner=!1,o.disableBtn=!0,o}return we(t,[{key:"initialize",value:function(){this.bindListeners()}},{key:"name",get:function(){return"CreateSeasonComponent"}},{key:"template",get:function(){return fe.a}},{key:"className",get:function(){return"px-2"}},{key:"bindings",get:function(){return{"[name=number]":{observe:"number",setOptions:{validate:!0}}}}},{key:"regions",value:function(){return{button:{el:".button-region",replaceElement:!0}}}},{key:"behaviors",get:function(){return[{behaviorClass:l.f},{behaviorClass:l.a}]}},{key:"bindListeners",value:function(){this.listenTo(this.model,"change",this.onChange),this.listenTo(this.options.channelName,"create:season",this.onCreateSeason),this.listenTo(c.e.SERIES,"".concat(c.f.CREATE_SEASON,":").concat(this.options.seriesId,":sync"),this.onSync)}},{key:"onChange",value:function(){this.disableBtn=!this.model.isValid(),this.renderButton()}},{key:"onCreateSeason",value:function(){this.disableBtn||(this.model.validate(),this.model.isValid()&&(this.showSpinner=!0,this.renderButton(),this.model.set("number",parseInt(this.model.get("number"))),r.Radio.channel(this.options.channelName).trigger("select:season",this.model.toJSON())))}},{key:"onSync",value:function(){this.disableBtn=!0,this.showSpinner=!1,this.model.clear(),this.renderButton()}},{key:"viewOptions",value:function(){return{model:this.model,show:this.options.show}}},{key:"renderButton",value:function(){this.options.show&&this.showChildView("button",new ue.a({channelName:this.options.channelName,saveEvent:"create:season",extraButtonClass:"btn btn-primary",buttonText:"Create",buttonType:"submit",showSpinner:this.showSpinner,disabled:this.disableBtn,spinnerOptions:{size:ce.s.Small}}))}},{key:"onRender",value:function(){this.stickit(),this.renderButton()}},{key:"onClose",value:function(){this.unstickit()}}]),t}(i.a.Component),xe=function(e){Ee(t,e);var n=Oe(t);function t(e){return ve(this,t),n.call(this,e)}return we(t,[{key:"initialize",value:function(){this.model.get("season.id")&&ce.c.setSelected(this.model.get("season.id"),this.collection),this.viewModel=se.a.get("".concat(this.name,":").concat(this.model.get("id"))),this.options.disabled||this.viewModel.addValidation(pe.e)}},{key:"name",get:function(){return"EditSeasonInfoComponent"}},{key:"template",get:function(){return me.a}},{key:"className",get:function(){return be.a.seasonContainer}},{key:"lang",get:function(){return"shared.editSeasonInfo"}},{key:"events",value:function(){return{"click .dropdown-btn":"onToggleDropdown","click .dropdown-menu":"onClickPopover","click .create":"onClickCreateNewSeason","change .custom-select":"onSelectOption","click .remove":"onClickRemove"}}},{key:"elements",get:function(){return{dropdownBtn:".dropdown-btn"}}},{key:"regions",value:function(){return{create:{el:".create-region",replaceElement:!0}}}},{key:"onToggleDropdown",value:function(e){this.options.disabled?e.stopPropagation():this.renderCreate()}},{key:"onClickPopover",value:function(e){e.stopPropagation()}},{key:"onClickCreateNewSeason",value:function(e){e.preventDefault(),this.showCreateForm=!0,this.renderCreate()}},{key:"onSelectOption",value:function(e){var n=e.target.value,t="-1"===n?null:this.collection.findWhere({number:+n}).toJSON();this.setButtonText(n),r.Radio.channel(this.options.channelName).trigger("select:season",t),this.showCreateForm=!1,this.render()}},{key:"onClickRemove",value:function(e){e.stopPropagation(),r.Radio.channel(this.options.channelName).trigger("select:season",null),this.showCreateForm=!1,this.render()}},{key:"setButtonText",value:function(e){if(this.options.isSuggestEdit){var n=e&&"-1"!==e?O.a.getPhrase(this.lang,"season",{number:e}):"";this.getUI("dropdownBtn").text(n)}else{var t=e&&"-1"!==e?"season":"placeholder";this.getUI("dropdownBtn").text(O.a.getPhrase(this.lang,t,{number:e}))}}},{key:"renderCreate",value:function(){this.showChildView("create",new Te({model:this.viewModel,channelName:this.options.channelName,show:this.showCreateForm,seriesId:this.model.get("series.id")}))}},{key:"viewOptions",value:function(){return{styles:be.a,disabled:this.options.disabled,seasons:this.collection.toJSON(),svgRemove:d.a.getSvg(d.b.Close),showRemoveIcon:!!this.model.get("season.id")&&!this.options.isSuggestEdit}}},{key:"onRender",value:function(){this.renderCreate(),this.setButtonText(this.model.get("season.number"))}}]),t}(i.a.Component),Ie=t(320),Re=t(1282),_e=t.n(Re),De=t(1283),je=t.n(De);function Ne(e){return(Ne="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Be(e,n){for(var t=0;t<n.length;t++){var o=n[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function Ae(e,n){return(Ae=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,n){return e.__proto__=n,e})(e,n)}function Le(e){var n=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 t,o=Ve(e);if(n){var r=Ve(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Me(this,t)}}function Me(e,n){if(n&&("object"===Ne(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Ve(e){return(Ve=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}t.d(n,"a",(function(){return Fe}));var Fe=function(e){!function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),n&&Ae(e,n)}(d,e);var n,t,u,p=Le(d);function d(e){return function(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}(this,d),p.call(this,e)}return n=d,(t=[{key:"initialize",value:function(){this.listenTo(this.options.channelName,"select:season",this.onSelectSeason),this.listenTo(this.options.channelName,"clear:series",this.onSeriesChange),this.listenTo(this.model,"change:series",this.onSeriesChange),this.lockSeasonAndEpisode=!this.options.editable||!this.model.get("series.id")}},{key:"name",get:function(){return"EditAdditionalInfoComponent"}},{key:"tagName",get:function(){return"form"}},{key:"lang",get:function(){return"shared.editAdditionalInfo"}},{key:"template",get:function(){return _e.a}},{key:"className",get:function(){return"edit-additional-info border-top pt-3"}},{key:"events",value:function(){return{submit:function(e){return e.preventDefault()}}}},{key:"elements",get:function(){return{episodeNumberField:".episode-number",seriesTypeahead:".tt-input"}}},{key:"appLinks",get:function(){return{".suggest-series-title":{application:c.b.LIBRARY_EDITOR,action:c.a.LibraryEditor.SUGGEST_AN_EDIT,args:[this.model.get("id")],params:{metadata:S.MetadataType.SeriesTitle}},".suggest-season-number":{application:c.b.LIBRARY_EDITOR,action:c.a.LibraryEditor.SUGGEST_AN_EDIT,args:[this.model.get("id")],params:{metadata:S.MetadataType.Season}},".suggest-episode-number":{application:c.b.LIBRARY_EDITOR,action:c.a.LibraryEditor.SUGGEST_AN_EDIT,args:[this.model.get("id")],params:{metadata:S.MetadataType.EpisodeNumber}}}}},{key:"regions",value:function(){return{series:{el:".edit-series-region",replaceElement:!0},season:{el:".edit-season-region",replaceElement:!0},broadcast:{el:".edit-broadcast-region",replaceElement:!0}}}},{key:"behaviors",get:function(){return[{behaviorClass:l.f},{behaviorClass:l.a}]}},{key:"bindings",get:function(){return{"[name=episodeNumber]":{observe:"episodeNumber",setOptions:{validate:!0},onSet:function(e){return e?+e:null}}}}},{key:"onSelectSeason",value:function(e){e&&this.getUI("episodeNumberField").focus(),r.Radio.channel(this.options.channelName).trigger("add:season",e)}},{key:"onSeriesChange",value:function(e){this.lockSeasonAndEpisode=!e||!e.get("id"),this.renderEditSeason();var n=this.getUI("episodeNumberField");this.lockSeasonAndEpisode?(n.attr("disabled","disabled"),n.attr("class","form-control ".concat(je.a.disabled))):(n.removeAttr("disabled"),n.attr("class","form-control"))}},{key:"getLibraryIds",value:function(e){return e&&e.map((function(e){return e.id})).join(",")}},{key:"getTypeaheadConfigs",value:function(){var e=ce.m.getTypeaheadConfig(),n=ce.m.getBloodhoundConfig(),t={newType:c.v.Series},o={newType:c.v.Series,footerTemplate:a.a.getConfirmSelectionTemplate()};return[{name:c.v.Series,typeaheadConfig:e,bloodhoundConfig:n,options:{hideEmptyResults:!0}},{name:"add-new",typeaheadConfig:e,bloodhoundConfig:n,options:t},{name:"empty-suggestion",typeaheadConfig:e,bloodhoundConfig:n,options:o}]}},{key:"renderSeriesTypeahead",value:function(){var e=this.model.series||new i.a.Model;this.showChildView("series",new s.a({model:e,editable:this.options.editable,parentChannelName:this.options.channelName,inputId:"series-search",selectEvent:"select:series",placeholderText:this.options.editable?O.a.getPhrase(this.lang,"searchSeries"):"",typeaheadConfigs:this.getTypeaheadConfigs(),typeaheadOptions:{hint:!1},callbacks:{onRender:a.a.selectFirstResult,onInput:a.a.emitEventOnInput(this.options.channelName,S.LibraryEditorActions.DetectInput,"series"),onBlur:a.a.resetAssociationOnBlur(e.toJSON())},removeEvent:"remove:series"}))}},{key:"renderEditSeason",value:function(){var e=this,n=this.model.get("series.seasons")||new Ie.a,t=new Ie.a(n.map((function(n){return n.set("displayName",O.a.getPhrase(e.lang,"seasonNumber",{number:n.get("number")}))})));this.showChildView("season",new xe({model:this.model,collection:t,channelName:this.options.channelName,disabled:!this.options.editable||this.lockSeasonAndEpisode,isSuggestEdit:!this.options.editable}))}},{key:"renderEditBroadcast",value:function(){this.showChildView("broadcast",new le({model:this.model,channelName:this.options.channelName,hideToggle:!0,editable:this.options.editable}))}},{key:"viewOptions",value:function(){return{styles:o.extend({},_.a,je.a),editable:this.options.editable,lockEpisodeNumber:this.lockSeasonAndEpisode,episodeNumberPlaceholderText:this.options.editable?O.a.getPhrase(this.lang,"epNumberPlaceholder"):""}}},{key:"onRender",value:function(){this.stickit(),r.Validation.bind(this),this.renderSeriesTypeahead(),this.renderEditSeason(),this.renderEditBroadcast()}},{key:"onClose",value:function(){this.unstickit(),r.Validation.unbind(this)}}])&&Be(n.prototype,t),u&&Be(n,u),Object.defineProperty(n,"prototype",{writable:!1}),d}(i.a.Component)},1210:function(e,n,t){"use strict";var o=t(1),r=t(6),i=t(2),a=t(16),l=t(99),s=t(305),u=t(0),c=t(3),p=t(1112),d=t(200),f=t(1270),h=t.n(f);function m(e){return(m="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 y(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function b(e,n){for(var t=0;t<n.length;t++){var o=n[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function g(e,n,t){return n&&b(e.prototype,n),t&&b(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function v(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),n&&k(e,n)}function k(e,n){return(k=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,n){return e.__proto__=n,e})(e,n)}function w(e){var n=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 t,o=C(e);if(n){var r=C(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return E(this,t)}}function E(e,n){if(n&&("object"===m(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function C(e){return(C=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var O=function(e){v(t,e);var n=w(t);function t(e){return y(this,t),n.call(this,e)}return g(t,[{key:"name",get:function(){return"TypeaheadListComponentCollection"}},{key:"childViewOptions",get:function(){return Object.assign({},this.options)}},{key:"childView",get:function(){return S}}]),t}(i.a.ComponentCollection),S=function(e){v(t,e);var n=w(t);function t(e){return y(this,t),n.call(this,e)}return g(t,[{key:"name",get:function(){return"TypeaheadListComponent"}},{key:"template",get:function(){return h.a}},{key:"modelId",get:function(){return this.model.get("id")||"new-model"}},{key:"bindings",get:function(){return e={},n="[name=".concat(this.modelId,"]"),t={observe:"name",setOptions:{validate:!0}},n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e;var e,n,t}},{key:"regions",value:function(){return{typeahead:{el:".typeahead-region",replaceElement:!1}}}},{key:"renderTypeahead",value:function(){this.showChildView("typeahead",new p.a({model:this.model,parentChannelName:this.options.channelName,inputId:this.options.inputId,selectEvent:this.options.selectEvent,typeaheadConfigs:this.options.typeaheadConfig,placeholderText:this.options.editable?this.options.placeholderText:"",callbacks:{onRender:l.a.selectFirstResult,onInput:l.a.emitEventOnInput(this.options.channelName,d.LibraryEditorActions.DetectInput,this.options.modelType,{isCollection:!0})},editable:this.options.editable,actionOptions:{clearOnSelect:!0},removeEvent:this.options.removeEvent,forceShowRemoveButton:this.collection.length>1||!!this.model.get("name")}))}},{key:"viewOptions",value:function(){return{id:this.modelId}}},{key:"onRender",value:function(){this.renderTypeahead()}}]),t}(i.a.Component),P=t(314),T=t(9),x=t(702),I=t(701),R=t(703),_=t(704),D=t(1271),j=t.n(D),N=t(1111),B=t.n(N);function A(e){return(A="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function L(e,n){for(var t=0;t<n.length;t++){var o=n[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function M(e,n){return(M=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,n){return e.__proto__=n,e})(e,n)}function V(e){var n=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 t,o=U(e);if(n){var r=U(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return F(this,t)}}function F(e,n){if(n&&("object"===A(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function U(e){return(U=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}t.d(n,"a",(function(){return Y}));var Y=function(e){!function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),n&&M(e,n)}(f,e);var n,t,i,p=V(f);function f(e){return function(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}(this,f),p.call(this,e)}return n=f,(t=[{key:"initialize",value:function(){var e=this.options.channelName;this.listenTo(e,"select:distributor",this.onSelectDistributor),this.listenTo(e,"select:production:company",this.onSelectProductionCompany),this.listenTo(e,"select:director",this.onSelectDirector),this.listenTo(e,"select:producer",this.onSelectProducer),this.listenTo(e,"remove:distributor",this.onRemoveDistributor),this.listenTo(e,"remove:production:company",this.onRemoveProductionCompany),this.listenTo(e,"remove:director",this.onRemoveDirector),this.listenTo(e,"remove:producer",this.onRemoveProducer)}},{key:"name",get:function(){return"EditProductionInfoComponent"}},{key:"tagName",get:function(){return"form"}},{key:"template",get:function(){return j.a}},{key:"lang",get:function(){return"shared.editProductionInfo"}},{key:"className",get:function(){return"edit-production-info border-top pt-3"}},{key:"elements",get:function(){return{tooltips:".info-tooltip"}}},{key:"events",value:function(){return{submit:function(e){return e.preventDefault()},"click .new-producer":"onClickAddNewProducer","click .new-director":"onClickAddNewDirector","click .new-distributor":"onClickAddNewDistributor","click .new-production-company":"onClickAddNewProductionCompany"}}},{key:"regions",value:function(){return{distributors:{el:".distributor-region",replaceElement:!0},productionCompanies:{el:".production-company-region",replaceElement:!0},directors:{el:".directors-region",replaceElement:!0},producers:{el:".producers-region",replaceElement:!0}}}},{key:"bindings",get:function(){return{"[name=productionYear]":{observe:"productionYear",setOptions:{validate:!0},onSet:function(e){return e}}}}},{key:"behaviors",get:function(){return[{behaviorClass:s.a},{behaviorClass:s.f}]}},{key:"appLinks",get:function(){var e={application:u.b.LIBRARY_EDITOR,action:u.a.LibraryEditor.SUGGEST_AN_EDIT,args:[this.model.get("id")]};return{".suggest-production-year":o.extend({},e,{params:{metadata:d.MetadataType.ProductionYear}}),".suggest-distributors":o.extend({},e,{params:{metadata:d.MetadataType.Distributors}}),".suggest-production-companies":o.extend({},e,{params:{metadata:d.MetadataType.ProductionCompanies}}),".suggest-directors":o.extend({},e,{params:{metadata:d.MetadataType.Directors}}),".suggest-producers":o.extend({},e,{params:{metadata:d.MetadataType.Producers}})}}},{key:"onClickAddNewProducer",value:function(){this.expandPersonList(T.a.Producer)}},{key:"onClickAddNewDirector",value:function(){this.expandPersonList(T.a.Director)}},{key:"onClickAddNewDistributor",value:function(){this.expandPersonList(T.a.Distributor)}},{key:"onClickAddNewProductionCompany",value:function(){this.expandPersonList(T.a.ProductionCompany)}},{key:"expandPersonList",value:function(e){var n=this.model.get(e);5!==n.length&&n.add({}),this.render()}},{key:"onSelectDistributor",value:function(e){this.onSelect(e,T.a.Distributor)}},{key:"onSelectProductionCompany",value:function(e){this.onSelect(e,T.a.ProductionCompany)}},{key:"onSelectDirector",value:function(e){this.onSelect(e,T.a.Director)}},{key:"onSelectProducer",value:function(e){this.onSelect(e,T.a.Producer)}},{key:"onSelect",value:function(e,n){r.Radio.channel(this.options.channelName).trigger("add:".concat(n),e),this.render()}},{key:"onRemoveDistributor",value:function(e){this.onRemove(e,T.a.Distributor)}},{key:"onRemoveProductionCompany",value:function(e){this.onRemove(e,T.a.ProductionCompany)}},{key:"onRemoveDirector",value:function(e){this.onRemove(e,T.a.Director)}},{key:"onRemoveProducer",value:function(e){this.onRemove(e,T.a.Producer)}},{key:"onRemove",value:function(e,n){this.model.get(n).remove(e),r.Radio.channel(this.options.channelName).trigger("remove:".concat(n),e),this.render()}},{key:"buildTypeaheadConfig",value:function(e){var n=P.a.getTypeaheadConfig(),t=P.a.getBloodhoundConfig();return[{name:e,typeaheadConfig:n,bloodhoundConfig:t,options:{hideEmptyResults:!0}},{name:"add-new",typeaheadConfig:n,bloodhoundConfig:t,options:{newType:e}},{name:"empty-suggestion",typeaheadConfig:n,bloodhoundConfig:t,options:{newType:e,footerTemplate:l.a.getConfirmSelectionTemplate()}}]}},{key:"allowAdditional",value:function(e){return!!this.options.editable&&this.model.get(e)&&5!==this.model.get(e).length}},{key:"renderDistributors",value:function(){this.showChildView("distributors",new O({collection:this.model.get("distributors"),channelName:this.options.channelName,typeaheadConfig:this.buildTypeaheadConfig(u.v.Distributors),removeEvent:"remove:distributor",selectEvent:"select:distributor",inputId:"distributor-search",editable:this.options.editable,placeholderText:"Search content distributors",modelType:"distributors"}))}},{key:"renderProductionCompanies",value:function(){this.showChildView("productionCompanies",new O({collection:this.model.get("productionCompanies"),channelName:this.options.channelName,typeaheadConfig:this.buildTypeaheadConfig(u.v.ProductionCompanies),removeEvent:"remove:production:company",selectEvent:"select:production:company",inputId:"production-company-search",editable:this.options.editable,placeholderText:"Search content production companies",modelType:"productionCompanies"}))}},{key:"renderDirectors",value:function(){this.showChildView("directors",new O({collection:this.model.get("directors"),channelName:this.options.channelName,typeaheadConfig:this.buildTypeaheadConfig(u.v.Directors),removeEvent:"remove:director",selectEvent:"select:director",inputId:"director-search",editable:this.options.editable,placeholderText:"Search content directors",modelType:"directors"}))}},{key:"renderProducers",value:function(){this.showChildView("producers",new O({collection:this.model.get("producers"),channelName:this.options.channelName,typeaheadConfig:this.buildTypeaheadConfig(u.v.Producers),removeEvent:"remove:producer",selectEvent:"select:producer",inputId:"producer-search",editable:this.options.editable,placeholderText:"Search content producers",modelType:"producers"}))}},{key:"onBeforeRender",value:function(){this.model.get("distributors")||this.model.set("distributors",new x.a([{}])),this.model.get("productionCompanies")||this.model.set("productionCompanies",new R.a([{}])),this.model.get("directors")||this.model.set("directors",new _.a([{}])),this.model.get("producers")||this.model.set("producers",new I.a([{}])),this.model.get("distributors").length||this.model.get("distributors").add({}),this.model.get("productionCompanies").length||this.model.get("productionCompanies").add({}),this.model.get("directors").length||this.model.get("directors").add({}),this.model.get("producers").length||this.model.get("producers").add({})}},{key:"viewOptions",value:function(){return{styles:B.a,editable:this.options.editable,productionYearPlaceholderText:this.options.editable?c.a.getPhrase(this.lang,"productionYearPlaceholder"):"",allowAdditionalDirector:this.allowAdditional(T.a.Director),allowAdditionalProducer:this.allowAdditional(T.a.Producer),allowAdditionalDistributor:this.allowAdditional(T.a.Distributor),allowAdditionalProductionCompany:this.allowAdditional(T.a.ProductionCompany),infoSvg:a.a.getSvg(a.b.Info)}}},{key:"onRender",value:function(){this.renderDistributors(),this.renderProductionCompanies(),this.renderDirectors(),this.renderProducers(),this.getUI("tooltips").tooltip()}},{key:"onBeforeDestroy",value:function(){this.getUI("tooltips").tooltip("dispose")}}])&&L(n.prototype,t),i&&L(n,i),Object.defineProperty(n,"prototype",{writable:!1}),f}(i.a.Component)},1267:function(e,n,t){var o=t(10);e.exports=(o.default||o).template({1:function(e,n,t,o,r){return"required"},3:function(e,n,t,o,r){return"readonly"},5:function(e,n,t,o,r){return"disabled"},compiler:[8,">= 4.3.0"],main:function(e,n,t,o,r){e.propertyIsEnumerable;var i,a=e.lambda,l=e.escapeExpression,s=null!=n?n:e.nullContext||{};return'<textarea\r\n name="'+l(a(null!=(i=null!=n?n.options:n)?i.name:i,n))+'"\r\n id="'+l(a(null!=(i=null!=n?n.options:n)?i.id:i,n))+'"\r\n autocomplete="false"\r\n class="'+l(a(null!=(i=null!=n?n.options:n)?i.class:i,n))+" event-selector "+l(a(null!=(i=null!=(i=null!=n?n.options:n)?i.styles:i)?i.resizingTextarea:i,n))+'"\r\n placeholder="'+l(a(null!=(i=null!=n?n.options:n)?i.placeholder:i,n))+'"\r\n '+(null!=(i=t.if.call(s,null!=(i=null!=n?n.options:n)?i.required:i,{name:"if",hash:{},fn:e.program(1,r,0),inverse:e.noop,data:r}))?i:"")+"\r\n "+(null!=(i=t.if.call(s,null!=(i=null!=n?n.options:n)?i.readonly:i,{name:"if",hash:{},fn:e.program(3,r,0),inverse:e.noop,data:r}))?i:"")+"\r\n "+(null!=(i=t.if.call(s,null!=(i=null!=n?n.options:n)?i.disabled:i,{name:"if",hash:{},fn:e.program(5,r,0),inverse:e.noop,data:r}))?i:"")+"\r\n></textarea>"},useData:!0})},1268:function(e,n,t){e.exports={resizingTextarea:"qKxbV"}},1269:function(e,n,t){var o=t(10);e.exports=(o.default||o).template({1:function(e,n,t,o,r){return"d-inline-block"},3:function(e,n,t,o,r){e.propertyIsEnumerable;var i,a=null!=n?n:e.nullContext||{},l=e.lambda,s=e.escapeExpression;return" "+(null!=(i=t.if.call(a,null!=(i=null!=n?n.options:n)?i.showingSaveButton:i,{name:"if",hash:{},fn:e.program(4,r,0),inverse:e.noop,data:r}))?i:"")+'\r\n <a class="'+(null!=(i=t.unless.call(a,null!=(i=null!=n?n.options:n)?i.showingSaveButton:i,{name:"unless",hash:{},fn:e.program(6,r,0),inverse:e.noop,data:r}))?i:"")+'cursor-pointer applink-publisher-video">\r\n <span class="d-inline-block align-middle '+s(l(null!=(i=null!=(i=null!=n?n.options:n)?i.styles:i)?i.icon:i,n))+'">'+(null!=(i=l(null!=(i=null!=n?n.options:n)?i.publisherArchiveSvg:i,n))?i:"")+"</span> "+s((t.lang||n&&n.lang||e.hooks.helperMissing).call(a,"viewInPublisherArchive",{name:"lang",hash:{},data:r}))+"\r\n </a>\r\n"},4:function(e,n,t,o,r){return"-"},6:function(e,n,t,o,r){return"float-right "},8:function(e,n,t,o,r){var i;e.propertyIsEnumerable;return e.escapeExpression(e.lambda(null!=(i=null!=(i=null!=n?n.options:n)?i.styles:i)?i.programTitle:i,n))},10:function(e,n,t,o,r){var i;e.propertyIsEnumerable;return'<span class="'+e.escapeExpression(e.lambda(null!=(i=null!=(i=null!=n?n.options:n)?i.styles:i)?i.requiredStar:i,n))+'">*</span>'},12:function(e,n,t,o,r){e.propertyIsEnumerable;var i,a=e.escapeExpression;return'<span class="'+a(e.lambda(null!=(i=null!=(i=null!=n?n.options:n)?i.styles:i)?i.suggestEdit:i,n))+'">- <a class="suggest-title">'+a((t.lang||n&&n.lang||e.hooks.helperMissing).call(null!=n?n:e.nullContext||{},"suggestEdit",{name:"lang",hash:{},data:r}))+"</a></span>"},14:function(e,n,t,o,r){var i;e.propertyIsEnumerable;return e.escapeExpression(e.lambda(null!=(i=null!=(i=null!=n?n.options:n)?i.styles:i)?i.disabled:i,n))},16:function(e,n,t,o,r){return"disabled"},18:function(e,n,t,o,r){var i;e.propertyIsEnumerable;return e.escapeExpression(e.lambda(null!=(i=null!=(i=null!=n?n.options:n)?i.styles:i)?i.description:i,n))},20:function(e,n,t,o,r){e.propertyIsEnumerable;var i,a=e.escapeExpression;return'<span class="'+a(e.lambda(null!=(i=null!=(i=null!=n?n.options:n)?i.styles:i)?i.suggestEdit:i,n))+'">- <a class="suggest-description">'+a((t.lang||n&&n.lang||e.hooks.helperMissing).call(null!=n?n:e.nullContext||{},"suggestEdit",{name:"lang",hash:{},data:r}))+"</a></span>"},compiler:[8,">= 4.3.0"],main:function(e,n,t,o,r){e.propertyIsEnumerable;var i,a=null!=n?n:e.nullContext||{},l=e.hooks.helperMissing,s=e.escapeExpression;return'<div class="position-relative '+(null!=(i=t.if.call(a,null!=(i=null!=n?n.options:n)?i.showingSaveButton:i,{name:"if",hash:{},fn:e.program(1,r,0),inverse:e.noop,data:r}))?i:"")+'">\r\n <h5 class="d-inline-block">'+s((t.lang||n&&n.lang||l).call(a,"heading",{name:"lang",hash:{},data:r}))+"</h5>\r\n\r\n"+(null!=(i=t.if.call(a,null!=(i=null!=n?n.options:n)?i.showPublisherVideoDetails:i,{name:"if",hash:{},fn:e.program(3,r,0),inverse:e.noop,data:r}))?i:"")+'</div>\r\n<div class="form-group '+(null!=(i=t.unless.call(a,null!=(i=null!=n?n.options:n)?i.editable:i,{name:"unless",hash:{},fn:e.program(8,r,0),inverse:e.noop,data:r}))?i:"")+'">\r\n <label for="edit-title">'+s((t.lang||n&&n.lang||l).call(a,"title",{name:"lang",hash:{},data:r}))+(null!=(i=t.if.call(a,null!=(i=null!=(i=null!=n?n.options:n)?i.requiredFields:i)?i.programTitle:i,{name:"if",hash:{},fn:e.program(10,r,0),inverse:e.noop,data:r}))?i:"")+"</label>\r\n "+(null!=(i=t.unless.call(a,null!=(i=null!=n?n.options:n)?i.editable:i,{name:"unless",hash:{},fn:e.program(12,r,0),inverse:e.noop,data:r}))?i:"")+'\r\n <input\r\n name="name"\r\n type="text"\r\n class="form-control '+(null!=(i=t.unless.call(a,null!=(i=null!=n?n.options:n)?i.editable:i,{name:"unless",hash:{},fn:e.program(14,r,0),inverse:e.noop,data:r}))?i:"")+'"\r\n placeholder="'+s((t.lang||n&&n.lang||l).call(a,"titlePlaceholder",{name:"lang",hash:{},data:r}))+'"\r\n id="edit-title"\r\n autocomplete="off"\r\n '+(null!=(i=t.unless.call(a,null!=(i=null!=n?n.options:n)?i.editable:i,{name:"unless",hash:{},fn:e.program(16,r,0),inverse:e.noop,data:r}))?i:"")+'\r\n >\r\n <div class="form-feedback"></div>\r\n</div>\r\n<div class="form-group '+(null!=(i=t.unless.call(a,null!=(i=null!=n?n.options:n)?i.editable:i,{name:"unless",hash:{},fn:e.program(18,r,0),inverse:e.noop,data:r}))?i:"")+'">\r\n <label for="edit-description">'+s((t.lang||n&&n.lang||l).call(a,"description",{name:"lang",hash:{},data:r}))+"</label>\r\n "+(null!=(i=t.unless.call(a,null!=(i=null!=n?n.options:n)?i.editable:i,{name:"unless",hash:{},fn:e.program(20,r,0),inverse:e.noop,data:r}))?i:"")+'\r\n <div class="description-region"></div>\r\n <div class="form-feedback"></div>\r\n</div>\r\n<div class="ratings-region"></div>'},useData:!0})},1270:function(e,n,t){var o=t(10);e.exports=(o.default||o).template({compiler:[8,">= 4.3.0"],main:function(e,n,t,o,r){var i;e.propertyIsEnumerable;return'<div class="typeahead-region '+e.escapeExpression(e.lambda(null!=(i=null!=(i=null!=n?n.options:n)?i.styles:i)?i.typeahead:i,n))+'"></div>'},useData:!0})},1271:function(e,n,t){var o=t(10);e.exports=(o.default||o).template({1:function(e,n,t,o,r){var i;e.propertyIsEnumerable;return e.escapeExpression(e.lambda(null!=(i=null!=(i=null!=n?n.options:n)?i.styles:i)?i.productionYear:i,n))},3:function(e,n,t,o,r){e.propertyIsEnumerable;var i,a=e.escapeExpression;return'<span class="'+a(e.lambda(null!=(i=null!=(i=null!=n?n.options:n)?i.styles:i)?i.suggestEdit:i,n))+'">- <a class="suggest-production-year">'+a((t.lang||n&&n.lang||e.hooks.helperMissing).call(null!=n?n:e.nullContext||{},"suggestEdit",{name:"lang",hash:{},data:r}))+"</a></span>"},5:function(e,n,t,o,r){var i;e.propertyIsEnumerable;return e.escapeExpression(e.lambda(null!=(i=null!=(i=null!=n?n.options:n)?i.styles:i)?i.disabled:i,n))},7:function(e,n,t,o,r){return"disabled"},9:function(e,n,t,o,r){var i;e.propertyIsEnumerable;return e.escapeExpression(e.lambda(null!=(i=null!=(i=null!=n?n.options:n)?i.styles:i)?i.productionCompanies:i,n))},11:function(e,n,t,o,r){e.propertyIsEnumerable;var i,a=e.escapeExpression;return'<span class="'+a(e.lambda(null!=(i=null!=(i=null!=n?n.options:n)?i.styles:i)?i.suggestEdit:i,n))+'">- <a class="suggest-production-companies">'+a((t.lang||n&&n.lang||e.hooks.helperMissing).call(null!=n?n:e.nullContext||{},"suggestEdit",{name:"lang",hash:{},data:r}))+"</a></span>"},13:function(e,n,t,o,r){e.propertyIsEnumerable;return' <p class="info-link pb-0 new-production-company">'+e.escapeExpression((t.lang||n&&n.lang||e.hooks.helperMissing).call(null!=n?n:e.nullContext||{},"newProductionCompany",{name:"lang",hash:{},data:r}))+"</p>\r\n"},15:function(e,n,t,o,r){var i;e.propertyIsEnumerable;return e.escapeExpression(e.lambda(null!=(i=null!=(i=null!=n?n.options:n)?i.styles:i)?i.distributors:i,n))},17:function(e,n,t,o,r){e.propertyIsEnumerable;var i,a=e.escapeExpression;return'<span class="'+a(e.lambda(null!=(i=null!=(i=null!=n?n.options:n)?i.styles:i)?i.suggestEdit:i,n))+'">- <a class="suggest-distributors">'+a((t.lang||n&&n.lang||e.hooks.helperMissing).call(null!=n?n:e.nullContext||{},"suggestEdit",{name:"lang",hash:{},data:r}))+"</a></span>"},19:function(e,n,t,o,r){e.propertyIsEnumerable;return' <p class="info-link pb-0 new-distributor">'+e.escapeExpression((t.lang||n&&n.lang||e.hooks.helperMissing).call(null!=n?n:e.nullContext||{},"newDistributor",{name:"lang",hash:{},data:r}))+"</p>\r\n"},21:function(e,n,t,o,r){var i;e.propertyIsEnumerable;return e.escapeExpression(e.lambda(null!=(i=null!=(i=null!=n?n.options:n)?i.styles:i)?i.producers:i,n))},23:function(e,n,t,o,r){e.propertyIsEnumerable;var i,a=e.escapeExpression;return'<span class="'+a(e.lambda(null!=(i=null!=(i=null!=n?n.options:n)?i.styles:i)?i.suggestEdit:i,n))+'">- <a class="suggest-producers">'+a((t.lang||n&&n.lang||e.hooks.helperMissing).call(null!=n?n:e.nullContext||{},"suggestEdit",{name:"lang",hash:{},data:r}))+"</a></span>"},25:function(e,n,t,o,r){e.propertyIsEnumerable;return' <p class="info-link pb-0 new-producer">'+e.escapeExpression((t.lang||n&&n.lang||e.hooks.helperMissing).call(null!=n?n:e.nullContext||{},"newProducer",{name:"lang",hash:{},data:r}))+"</p>\r\n"},27:function(e,n,t,o,r){var i;e.propertyIsEnumerable;return e.escapeExpression(e.lambda(null!=(i=null!=(i=null!=n?n.options:n)?i.styles:i)?i.directors:i,n))},29:function(e,n,t,o,r){e.propertyIsEnumerable;var i,a=e.escapeExpression;return'<span class="'+a(e.lambda(null!=(i=null!=(i=null!=n?n.options:n)?i.styles:i)?i.suggestEdit:i,n))+'">- <a class="suggest-directors">'+a((t.lang||n&&n.lang||e.hooks.helperMissing).call(null!=n?n:e.nullContext||{},"suggestEdit",{name:"lang",hash:{},data:r}))+"</a></span>"},31:function(e,n,t,o,r){e.propertyIsEnumerable;return' <p class="info-link pb-0 new-director">'+e.escapeExpression((t.lang||n&&n.lang||e.hooks.helperMissing).call(null!=n?n:e.nullContext||{},"newDirector",{name:"lang",hash:{},data:r}))+"</p>\r\n"},compiler:[8,">= 4.3.0"],main:function(e,n,t,o,r){e.propertyIsEnumerable;var i,a=null!=n?n:e.nullContext||{},l=e.hooks.helperMissing,s=e.escapeExpression,u=e.lambda;return"<h5>"+s((t.lang||n&&n.lang||l).call(a,"heading",{name:"lang",hash:{},data:r}))+'</h5>\r\n\r\n<div class="container-fluid p-0">\r\n <div class="row">\r\n <div class="form-group col-4 pr-0 '+(null!=(i=t.unless.call(a,null!=(i=null!=n?n.options:n)?i.editable:i,{name:"unless",hash:{},fn:e.program(1,r,0),inverse:e.noop,data:r}))?i:"")+'">\r\n <label for="edit-production-year">'+s((t.lang||n&&n.lang||l).call(a,"productionYear",{name:"lang",hash:{},data:r}))+"</label>\r\n "+(null!=(i=t.unless.call(a,null!=(i=null!=n?n.options:n)?i.editable:i,{name:"unless",hash:{},fn:e.program(3,r,0),inverse:e.noop,data:r}))?i:"")+'\r\n <input\r\n name="productionYear"\r\n type="number"\r\n class="form-control '+(null!=(i=t.unless.call(a,null!=(i=null!=n?n.options:n)?i.editable:i,{name:"unless",hash:{},fn:e.program(5,r,0),inverse:e.noop,data:r}))?i:"")+'"\r\n id="edit-production-year"\r\n placeholder="'+s(u(null!=(i=null!=n?n.options:n)?i.productionYearPlaceholderText:i,n))+'"\r\n autocomplete="off"\r\n '+(null!=(i=t.unless.call(a,null!=(i=null!=n?n.options:n)?i.editable:i,{name:"unless",hash:{},fn:e.program(7,r,0),inverse:e.noop,data:r}))?i:"")+'\r\n >\r\n <div class="form-feedback"></div>\r\n </div>\r\n </div>\r\n\r\n <div class="row">\r\n <div class="form-group col-6 '+(null!=(i=t.unless.call(a,null!=(i=null!=n?n.options:n)?i.editable:i,{name:"unless",hash:{},fn:e.program(9,r,0),inverse:e.noop,data:r}))?i:"")+'">\r\n <label for="production-company-search">\r\n '+s((t.lang||n&&n.lang||l).call(a,"productionCompanies",{name:"lang",hash:{},data:r}))+'\r\n <span class="'+s(u(null!=(i=null!=(i=null!=n?n.options:n)?i.styles:i)?i.infoSvgContainer:i,n))+' info-tooltip" \r\n title="'+s((t.lang||n&&n.lang||l).call(a,"productionCompanyInfo",{name:"lang",hash:{},data:r}))+'"\r\n >'+(null!=(i=u(null!=(i=null!=n?n.options:n)?i.infoSvg:i,n))?i:"")+"</span>\r\n </label>\r\n "+(null!=(i=t.unless.call(a,null!=(i=null!=n?n.options:n)?i.editable:i,{name:"unless",hash:{},fn:e.program(11,r,0),inverse:e.noop,data:r}))?i:"")+'\r\n <div class="production-company-region"></div>\r\n'+(null!=(i=t.if.call(a,null!=(i=null!=n?n.options:n)?i.allowAdditionalProductionCompany:i,{name:"if",hash:{},fn:e.program(13,r,0),inverse:e.noop,data:r}))?i:"")+' </div>\r\n\r\n <div class="form-group col-6 pr-0 '+(null!=(i=t.unless.call(a,null!=(i=null!=n?n.options:n)?i.editable:i,{name:"unless",hash:{},fn:e.program(15,r,0),inverse:e.noop,data:r}))?i:"")+'">\r\n <label for="distributor-search">\r\n '+s((t.lang||n&&n.lang||l).call(a,"distributors",{name:"lang",hash:{},data:r}))+'\r\n <span class="'+s(u(null!=(i=null!=(i=null!=n?n.options:n)?i.styles:i)?i.infoSvgContainer:i,n))+' info-tooltip"\r\n title="'+s((t.lang||n&&n.lang||l).call(a,"distributorInfo",{name:"lang",hash:{},data:r}))+'"\r\n >'+(null!=(i=u(null!=(i=null!=n?n.options:n)?i.infoSvg:i,n))?i:"")+"</span>\r\n </label>\r\n "+(null!=(i=t.unless.call(a,null!=(i=null!=n?n.options:n)?i.editable:i,{name:"unless",hash:{},fn:e.program(17,r,0),inverse:e.noop,data:r}))?i:"")+'\r\n <div class="distributor-region"></div>\r\n'+(null!=(i=t.if.call(a,null!=(i=null!=n?n.options:n)?i.allowAdditionalDistributor:i,{name:"if",hash:{},fn:e.program(19,r,0),inverse:e.noop,data:r}))?i:"")+' </div>\r\n </div>\r\n\r\n <div class="row">\r\n <div class="form-group col-6 '+(null!=(i=t.unless.call(a,null!=(i=null!=n?n.options:n)?i.editable:i,{name:"unless",hash:{},fn:e.program(21,r,0),inverse:e.noop,data:r}))?i:"")+'">\r\n <label for="producer-search">\r\n '+s((t.lang||n&&n.lang||l).call(a,"producers",{name:"lang",hash:{},data:r}))+'\r\n <span class="'+s(u(null!=(i=null!=(i=null!=n?n.options:n)?i.styles:i)?i.infoSvgContainer:i,n))+' info-tooltip"\r\n title="'+s((t.lang||n&&n.lang||l).call(a,"producerInfo",{name:"lang",hash:{},data:r}))+'"\r\n >'+(null!=(i=u(null!=(i=null!=n?n.options:n)?i.infoSvg:i,n))?i:"")+"</span>\r\n </label>\r\n "+(null!=(i=t.unless.call(a,null!=(i=null!=n?n.options:n)?i.editable:i,{name:"unless",hash:{},fn:e.program(23,r,0),inverse:e.noop,data:r}))?i:"")+'\r\n <div class="producers-region"></div>\r\n'+(null!=(i=t.if.call(a,null!=(i=null!=n?n.options:n)?i.allowAdditionalProducer:i,{name:"if",hash:{},fn:e.program(25,r,0),inverse:e.noop,data:r}))?i:"")+' </div>\r\n\r\n <div class="form-group col-6 pr-0 '+(null!=(i=t.unless.call(a,null!=(i=null!=n?n.options:n)?i.editable:i,{name:"unless",hash:{},fn:e.program(27,r,0),inverse:e.noop,data:r}))?i:"")+'">\r\n <label for="director-search">\r\n '+s((t.lang||n&&n.lang||l).call(a,"directors",{name:"lang",hash:{},data:r}))+'\r\n <span class="'+s(u(null!=(i=null!=(i=null!=n?n.options:n)?i.styles:i)?i.infoSvgContainer:i,n))+' info-tooltip"\r\n title="'+s((t.lang||n&&n.lang||l).call(a,"directorInfo",{name:"lang",hash:{},data:r}))+'"\r\n >'+(null!=(i=u(null!=(i=null!=n?n.options:n)?i.infoSvg:i,n))?i:"")+"</span>\r\n </label>\r\n "+(null!=(i=t.unless.call(a,null!=(i=null!=n?n.options:n)?i.editable:i,{name:"unless",hash:{},fn:e.program(29,r,0),inverse:e.noop,data:r}))?i:"")+'\r\n <div class="directors-region"></div>\r\n'+(null!=(i=t.if.call(a,null!=(i=null!=n?n.options:n)?i.allowAdditionalDirector:i,{name:"if",hash:{},fn:e.program(31,r,0),inverse:e.noop,data:r}))?i:"")+" </div>\r\n </div>\r\n</div>"},useData:!0})},1272:function(e,n,t){var o=t(10);e.exports=(o.default||o).template({compiler:[8,">= 4.3.0"],main:function(e,n,t,o,r){e.propertyIsEnumerable;var i,a=e.lambda;return'<span class="svg-container '+e.escapeExpression(a(null!=(i=null!=(i=null!=n?n.options:n)?i.styles:i)?i.clearSvg:i,n))+' clear-button">'+(null!=(i=a(null!=(i=null!=n?n.options:n)?i.svgClear:i,n))?i:"")+"</span>"},useData:!0})},1273:function(e,n,t){e.exports={clearSvg:"_2-D4Z"}},1274:function(e,n,t){var o=t(10);e.exports=(o.default||o).template({1:function(e,n,t,o,r){e.propertyIsEnumerable;var i,a=e.lambda,l=e.escapeExpression;return' <label for="'+l(a(null!=(i=null!=n?n.options:n)?i.modelAttr:i,n))+'">'+l(a(null!=(i=null!=n?n.options:n)?i.label:i,n))+"</label>\r\n "+(null!=(i=t.unless.call(null!=n?n:e.nullContext||{},null!=(i=null!=n?n.options:n)?i.editable:i,{name:"unless",hash:{},fn:e.program(2,r,0),inverse:e.noop,data:r}))?i:"")+"\r\n"},2:function(e,n,t,o,r){e.propertyIsEnumerable;var i,a=e.escapeExpression;return'<span class="'+a(e.lambda(null!=(i=null!=(i=null!=n?n.options:n)?i.styles:i)?i.suggestEdit:i,n))+'">- <a class="suggest-broadcast-date">'+a((t.lang||n&&n.lang||e.hooks.helperMissing).call(null!=n?n:e.nullContext||{},"suggestEdit",{name:"lang",hash:{},data:r}))+"</a></span>"},4:function(e,n,t,o,r){var i;e.propertyIsEnumerable;return e.escapeExpression(e.lambda(null!=(i=null!=(i=null!=n?n.options:n)?i.styles:i)?i.disabled:i,n))},6:function(e,n,t,o,r){return"disabled"},8:function(e,n,t,o,r){return"cursor-pointer"},compiler:[8,">= 4.3.0"],main:function(e,n,t,o,r){e.propertyIsEnumerable;var i,a=e.lambda,l=e.escapeExpression,s=null!=n?n:e.nullContext||{};return'<div class="'+l(a(null!=(i=null!=(i=null!=n?n.options:n)?i.styles:i)?i.datePicker:i,n))+" "+l(a(null!=(i=null!=(i=null!=n?n.options:n)?i.styles:i)?i.broadcastDate:i,n))+'">\r\n'+(null!=(i=t.if.call(s,null!=(i=null!=n?n.options:n)?i.label:i,{name:"if",hash:{},fn:e.program(1,r,0),inverse:e.noop,data:r}))?i:"")+' <input\r\n name="'+l(a(null!=(i=null!=n?n.options:n)?i.modelAttr:i,n))+'"\r\n class="form-control datetimepicker-input '+l(a(null!=(i=null!=n?n.options:n)?i.instanceClass:i,n))+" "+(null!=(i=t.unless.call(s,null!=(i=null!=n?n.options:n)?i.editable:i,{name:"unless",hash:{},fn:e.program(4,r,0),inverse:e.noop,data:r}))?i:"")+'"\r\n id="'+l(a(null!=(i=null!=n?n.options:n)?i.modelAttr:i,n))+'"\r\n placeholder="'+l(a(null!=(i=null!=n?n.options:n)?i.placeholderText:i,n))+'"\r\n data-toggle="datetimepicker"\r\n data-target=".'+l(a(null!=(i=null!=n?n.options:n)?i.instanceClass:i,n))+'"\r\n autocomplete="off"\r\n '+(null!=(i=t.unless.call(s,null!=(i=null!=n?n.options:n)?i.editable:i,{name:"unless",hash:{},fn:e.program(6,r,0),inverse:e.noop,data:r}))?i:"")+'\r\n />\r\n <span class="clear-button-region clear-svg"></span>\r\n <span class="svg-container '+l(a(null!=(i=null!=(i=null!=n?n.options:n)?i.styles:i)?i.calendarSvg:i,n))+" "+(null!=(i=t.if.call(s,null!=(i=null!=n?n.options:n)?i.editable:i,{name:"if",hash:{},fn:e.program(8,r,0),inverse:e.program(4,r,0),data:r}))?i:"")+'">'+(null!=(i=a(null!=(i=null!=n?n.options:n)?i.svgCalendar:i,n))?i:"")+'</span>\r\n <div class="form-feedback"></div>\r\n</div>'},useData:!0})},1275:function(e,n,t){e.exports={next:"_1sAku",previous:"_3zc5V",datePicker:"_1j_H7",calendarSvg:"_3ViTN",disabled:"DzdxT"}},1276:function(e,n,t){var o=t(10);e.exports=(o.default||o).template({1:function(e,n,t,o,r){e.propertyIsEnumerable;var i,a=e.escapeExpression;return'<span class="'+a(e.lambda(null!=(i=null!=(i=null!=n?n.options:n)?i.styles:i)?i.suggestEdit:i,n))+'">- <a class="suggest-channel">'+a((t.lang||n&&n.lang||e.hooks.helperMissing).call(null!=n?n:e.nullContext||{},"suggestEdit",{name:"lang",hash:{},data:r}))+"</a></span>"},compiler:[8,">= 4.3.0"],main:function(e,n,t,o,r){e.propertyIsEnumerable;var i,a=e.escapeExpression,l=null!=n?n:e.nullContext||{};return'<div class="container-fluid">\r\n <div class="row">\r\n <div class="form-group col-6 px-0">\r\n <div class="date-broadcast-region"></div>\r\n </div>\r\n <div class="form-group col-6 pr-0 '+a(e.lambda(null!=(i=null!=(i=null!=n?n.options:n)?i.styles:i)?i.channel:i,n))+'">\r\n <label for="channel-search">'+a((t.lang||n&&n.lang||e.hooks.helperMissing).call(l,"channel",{name:"lang",hash:{},data:r}))+"</label>\r\n "+(null!=(i=t.unless.call(l,null!=(i=null!=n?n.options:n)?i.editable:i,{name:"unless",hash:{},fn:e.program(1,r,0),inverse:e.noop,data:r}))?i:"")+'\r\n <div class="channel-search-region"></div>\r\n </div>\r\n </div>\r\n</div>'},useData:!0})},1277:function(e,n,t){var o=t(10);e.exports=(o.default||o).template({1:function(e,n,t,o,r){e.propertyIsEnumerable;var i,a=null!=n?n:e.nullContext||{};return'<div class="form-group"> \r\n <div class="custom-control custom-checkbox">\r\n <input\r\n name="toggleBroadcast"\r\n type="checkbox"\r\n class="custom-control-input '+(null!=(i=t.unless.call(a,null!=(i=null!=n?n.options:n)?i.editable:i,{name:"unless",hash:{},fn:e.program(2,r,0),inverse:e.noop,data:r}))?i:"")+'"\r\n id="toggle-broadcast"\r\n '+(null!=(i=t.unless.call(a,null!=(i=null!=n?n.options:n)?i.editable:i,{name:"unless",hash:{},fn:e.program(4,r,0),inverse:e.noop,data:r}))?i:"")+'\r\n >\r\n <label class="custom-control-label" for="toggle-broadcast">'+e.escapeExpression((t.lang||n&&n.lang||e.hooks.helperMissing).call(a,"tv",{name:"lang",hash:{},data:r}))+"</label>\r\n </div>\r\n</div>\r\n"},2:function(e,n,t,o,r){var i;e.propertyIsEnumerable;return e.escapeExpression(e.lambda(null!=(i=null!=(i=null!=n?n.options:n)?i.styles:i)?i.disabled:i,n))},4:function(e,n,t,o,r){return"disabled"},compiler:[8,">= 4.3.0"],main:function(e,n,t,o,r){var i;e.propertyIsEnumerable;return(null!=(i=t.unless.call(null!=n?n:e.nullContext||{},null!=(i=null!=n?n.options:n)?i.hideToggle:i,{name:"unless",hash:{},fn:e.program(1,r,0),inverse:e.noop,data:r}))?i:"")+'<div class="broadcast-region"></div>\r\n'},useData:!0})},1278:function(e,n,t){e.exports={disabled:"_3TIct"}},1279:function(e,n,t){var o=t(10);e.exports=(o.default||o).template({1:function(e,n,t,o,r){return'<div class="">\r\n <button class="btn btn-light create w-100">+ Create a season</button>\r\n</div>\r\n'},3:function(e,n,t,o,r){return'<div class="form-group mb-2">\r\n <input type="number" class="form-control" name="number" min="1" placeholder="Season number">\r\n <div class="form-feedback"></div>\r\n</div>\r\n'},compiler:[8,">= 4.3.0"],main:function(e,n,t,o,r){var i;e.propertyIsEnumerable;return(null!=(i=t.unless.call(null!=n?n:e.nullContext||{},null!=(i=null!=n?n.options:n)?i.show:i,{name:"unless",hash:{},fn:e.program(1,r,0),inverse:e.program(3,r,0),data:r}))?i:"")+'<div class="text-right">\r\n <div class="button-region"></div>\r\n</div>'},useData:!0})},1280:function(e,n,t){var o=t(10);e.exports=(o.default||o).template({1:function(e,n,t,o,r){var i;e.propertyIsEnumerable;return e.escapeExpression(e.lambda(null!=(i=null!=(i=null!=n?n.options:n)?i.styles:i)?i.disabled:i,n))},3:function(e,n,t,o,r){return"selected"},5:function(e,n,t,o,r){e.propertyIsEnumerable;var i,a=e.lambda,l=e.escapeExpression;return' <option value="'+l(a(null!=n?n.number:n,n))+'" '+(null!=(i=t.if.call(null!=n?n:e.nullContext||{},null!=n?n.selected:n,{name:"if",hash:{},fn:e.program(3,r,0),inverse:e.noop,data:r}))?i:"")+">"+l(a(null!=n?n.displayName:n,n))+"</option>\r\n"},7:function(e,n,t,o,r){e.propertyIsEnumerable;var i,a=e.lambda;return'<span class="svg-container mb-2 '+e.escapeExpression(a(null!=(i=null!=(i=null!=n?n.options:n)?i.styles:i)?i.svg:i,n))+' remove">'+(null!=(i=a(null!=(i=null!=n?n.options:n)?i.svgRemove:i,n))?i:"")+"</span>\r\n"},compiler:[8,">= 4.3.0"],main:function(e,n,t,o,r){e.propertyIsEnumerable;var i,a=e.escapeExpression,l=null!=n?n:e.nullContext||{};return'<div\r\n data-toggle="dropdown"\r\n aria-haspopup="true"\r\n aria-expanded="false"\r\n class="cursor-pointer w-100 dropdown-btn btn btn-link '+a(e.lambda(null!=(i=null!=(i=null!=n?n.options:n)?i.styles:i)?i.button:i,n))+" "+(null!=(i=t.if.call(l,null!=(i=null!=n?n.options:n)?i.disabled:i,{name:"if",hash:{},fn:e.program(1,r,0),inverse:e.noop,data:r}))?i:"")+'"\r\n name="season"\r\n></div>\r\n<div class="dropdown-menu dropdown-menu-right dropdown-arrow w-100">\r\n <div class="text-center px-2">\r\n <select name="season" class="custom-select">\r\n <option value="-1" '+(null!=(i=t.unless.call(l,null!=(i=null!=n?n.options:n)?i.hasSelected:i,{name:"unless",hash:{},fn:e.program(3,r,0),inverse:e.noop,data:r}))?i:"")+">"+a((t.lang||n&&n.lang||e.hooks.helperMissing).call(l,"selectASeason",{name:"lang",hash:{},data:r}))+"</option>\r\n"+(null!=(i=t.each.call(l,null!=(i=null!=n?n.options:n)?i.seasons:i,{name:"each",hash:{},fn:e.program(5,r,0),inverse:e.noop,data:r}))?i:"")+' </select>\r\n </div>\r\n\r\n <div class="dropdown-divider"></div>\r\n\r\n <div class="create-region"></div>\r\n</div>\r\n'+(null!=(i=t.if.call(l,null!=(i=null!=n?n.options:n)?i.showRemoveIcon:i,{name:"if",hash:{},fn:e.program(7,r,0),inverse:e.noop,data:r}))?i:"")},useData:!0})},1281:function(e,n,t){e.exports={button:"_39NvM",svg:"_2Tl0W",disabled:"_2julA",seasonContainer:"_SpZq"}},1282:function(e,n,t){var o=t(10);e.exports=(o.default||o).template({1:function(e,n,t,o,r){var i;e.propertyIsEnumerable;return e.escapeExpression(e.lambda(null!=(i=null!=(i=null!=n?n.options:n)?i.styles:i)?i.seriesTitle:i,n))},3:function(e,n,t,o,r){e.propertyIsEnumerable;var i,a=e.escapeExpression;return'<span class="'+a(e.lambda(null!=(i=null!=(i=null!=n?n.options:n)?i.styles:i)?i.suggestEdit:i,n))+'">- <a class="suggest-series-title">'+a((t.lang||n&&n.lang||e.hooks.helperMissing).call(null!=n?n:e.nullContext||{},"suggestEdit",{name:"lang",hash:{},data:r}))+"</a></span>"},5:function(e,n,t,o,r){var i;e.propertyIsEnumerable;return e.escapeExpression(e.lambda(null!=(i=null!=(i=null!=n?n.options:n)?i.styles:i)?i.seasonNumber:i,n))},7:function(e,n,t,o,r){e.propertyIsEnumerable;var i,a=e.escapeExpression;return'<span class="'+a(e.lambda(null!=(i=null!=(i=null!=n?n.options:n)?i.styles:i)?i.suggestEdit:i,n))+'">- <a class="suggest-season-number">'+a((t.lang||n&&n.lang||e.hooks.helperMissing).call(null!=n?n:e.nullContext||{},"suggestEdit",{name:"lang",hash:{},data:r}))+"</a></span>"},9:function(e,n,t,o,r){var i;e.propertyIsEnumerable;return e.escapeExpression(e.lambda(null!=(i=null!=(i=null!=n?n.options:n)?i.styles:i)?i.episodeNumber:i,n))},11:function(e,n,t,o,r){e.propertyIsEnumerable;var i,a=e.escapeExpression;return'<span class="'+a(e.lambda(null!=(i=null!=(i=null!=n?n.options:n)?i.styles:i)?i.suggestEdit:i,n))+'">- <a class="suggest-episode-number">'+a((t.lang||n&&n.lang||e.hooks.helperMissing).call(null!=n?n:e.nullContext||{},"suggestEdit",{name:"lang",hash:{},data:r}))+"</a></span>"},13:function(e,n,t,o,r){var i;e.propertyIsEnumerable;return e.escapeExpression(e.lambda(null!=(i=null!=(i=null!=n?n.options:n)?i.styles:i)?i.disabled:i,n))},15:function(e,n,t,o,r){return"disabled"},compiler:[8,">= 4.3.0"],main:function(e,n,t,o,r){e.propertyIsEnumerable;var i,a=null!=n?n:e.nullContext||{},l=e.hooks.helperMissing,s=e.escapeExpression;return"<h5>"+s((t.lang||n&&n.lang||l).call(a,"heading",{name:"lang",hash:{},data:r}))+'</h5>\r\n<div class="container-fluid">\r\n <div class="row">\r\n <div class="form-group col-6 p-0 '+(null!=(i=t.unless.call(a,null!=(i=null!=n?n.options:n)?i.editable:i,{name:"unless",hash:{},fn:e.program(1,r,0),inverse:e.noop,data:r}))?i:"")+'">\r\n <label for="edit-title">'+s((t.lang||n&&n.lang||l).call(a,"series",{name:"lang",hash:{},data:r}))+"</label>\r\n "+(null!=(i=t.unless.call(a,null!=(i=null!=n?n.options:n)?i.editable:i,{name:"unless",hash:{},fn:e.program(3,r,0),inverse:e.noop,data:r}))?i:"")+'\r\n <div class="edit-series-region"></div>\r\n <div class="form-feedback"></div>\r\n </div>\r\n\r\n <div class="form-group col-3 pr-0 '+(null!=(i=t.unless.call(a,null!=(i=null!=n?n.options:n)?i.editable:i,{name:"unless",hash:{},fn:e.program(5,r,0),inverse:e.noop,data:r}))?i:"")+'">\r\n <label for="edit-season-number">'+s((t.lang||n&&n.lang||l).call(a,"season",{name:"lang",hash:{},data:r}))+"</label>\r\n "+(null!=(i=t.unless.call(a,null!=(i=null!=n?n.options:n)?i.editable:i,{name:"unless",hash:{},fn:e.program(7,r,0),inverse:e.noop,data:r}))?i:"")+'\r\n <div class="edit-season-region"></div>\r\n <div class="form-feedback"></div>\r\n </div>\r\n \r\n <div class="form-group col-3 pr-0 '+(null!=(i=t.unless.call(a,null!=(i=null!=n?n.options:n)?i.editable:i,{name:"unless",hash:{},fn:e.program(9,r,0),inverse:e.noop,data:r}))?i:"")+'">\r\n <label for="edit-episode-number">'+s((t.lang||n&&n.lang||l).call(a,"episode",{name:"lang",hash:{},data:r}))+"</label>\r\n "+(null!=(i=t.unless.call(a,null!=(i=null!=n?n.options:n)?i.editable:i,{name:"unless",hash:{},fn:e.program(11,r,0),inverse:e.noop,data:r}))?i:"")+'\r\n <input\r\n name="episodeNumber"\r\n type="number"\r\n class="form-control episode-number '+(null!=(i=t.if.call(a,null!=(i=null!=n?n.options:n)?i.lockEpisodeNumber:i,{name:"if",hash:{},fn:e.program(13,r,0),inverse:e.noop,data:r}))?i:"")+'"\r\n id="edit-episode-number"\r\n placeholder="'+s(e.lambda(null!=(i=null!=n?n.options:n)?i.episodeNumberPlaceholderText:i,n))+'"\r\n autocomplete="off"\r\n min="1"\r\n '+(null!=(i=t.if.call(a,null!=(i=null!=n?n.options:n)?i.lockEpisodeNumber:i,{name:"if",hash:{},fn:e.program(15,r,0),inverse:e.noop,data:r}))?i:"")+'\r\n >\r\n <div class="form-feedback"></div>\r\n </div>\r\n </div>\r\n</div>\r\n\r\n<div class="edit-broadcast-region"></div>'},useData:!0})},1283:function(e,n,t){e.exports={disabled:"tOHRz"}}}]);
@@ -0,0 +1 @@
1
+ (window.webpackJsonp_clickview_library_editor=window.webpackJsonp_clickview_library_editor||[]).push([[14,16],{1064:function(e,t,n){"use strict";n.d(t,"a",(function(){return b}));var o=n(6),r=n(2),i=n(3),l=n(1103),s=n(12),a=n(1066),c=n.n(a),u=n(1067),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?Object.setPrototypeOf.bind():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){if(t&&("object"===p(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function g(e){return(g=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var b=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&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),Object.defineProperty(t,"prototype",{writable:!1}),u}(r.a.Component)},1066: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})},1067:function(e,t,n){e.exports={selectBtn:"_2TTgs",list:"_3wN7o",selector:"_3Xf1P",customItem:"_199PI"}},1105:function(e,t,n){"use strict";n.d(t,"a",(function(){return b}));var o=n(1),r=n(6),i=n(2),l=n(1059),s=n(12),a=n(1106),c=n.n(a),u=n(1107),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?Object.setPrototypeOf.bind():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){if(t&&("object"===p(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function g(e){return(g=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var b=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&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),Object.defineProperty(t,"prototype",{writable:!1}),u}(i.a.Component)},1106: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})},1107:function(e,t,n){e.exports={dropdownMenu:"_2RaQu",selectButton:"_2xGqi",disabled:"_15kWr"}},1125:function(e,t,n){"use strict";n.d(t,"a",(function(){return b}));var o=n(1),r=n(6),i=n(2),l=n(3),s=n(42),a=n(1105),c=n(12),u=n(1146),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?Object.setPrototypeOf.bind():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){if(t&&("object"===p(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function g(e){return(g=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var b=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&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),Object.defineProperty(t,"prototype",{writable:!1}),p}(i.a.Component)},1146: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})},1157: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(57),s=n(16),a=n(144),c=n(0),u=n(9),f=n(1075),p=n(1050),d=n(1051),h=n(1158),y=n.n(h),m=n(1159),g=n.n(m),b=n(3);function v(e){return(v="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(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?Object.setPrototypeOf.bind():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){if(t&&("object"===v(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function R(e){return(R=Object.setPrototypeOf?Object.getPrototypeOf.bind():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}}),Object.defineProperty(e,"prototype",{writable:!1}),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)?b.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),Object.defineProperty(t,"prototype",{writable:!1}),m}(i.a.Component)},1158:function(e,t,n){e.exports={columnNames:"_1N_VT",seriesContainer:"_4pk2s",icon:"_3SoBV",citationValues:"_1nYZg"}},1159: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})},1198: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}))},1337: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})},1338:function(e,t,n){e.exports={list:"_3aP3V",item:"_1uqg-",selected:"_29kkj"}},1339:function(e,t,n){e.exports={actions:"_2xyI4",source:"_153F1",button:"_3I7SQ"}},1340: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})},1341: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})},1342:function(e,t,n){e.exports={avatar:"_2c8zD",message:"EQzqm",interactive:"mnE2L"}},1343: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})},1344:function(e,t,n){e.exports={requestList:"_3DFfh",requestDetails:"_2ezub"}},1480: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(495),c=n(494),u=n(309),f=n(0),p=n(201),d=n(145),h=n(9),y=n(256),m=n(29),g=n(1337),b=n.n(g),v=n(1338),w=n.n(v);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),Object.defineProperty(e,"prototype",{writable:!1}),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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&O(e,t)}function O(e,t){return(O=Object.setPrototypeOf?Object.setPrototypeOf.bind():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=P(e);if(t){var r=P(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return T(this,n)}}function T(e,t){if(t&&("object"===k(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function P(e){return(P=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var _=function(e){E(n,e);var t=x(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 b.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),I=function(e){E(n,e);var t=x(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 _}},{key:"childViewOptions",get:function(){return{selectedRequestId:this.options.selectedRequestId,currentUser:this.options.currentUser}}}]),n}(l.a.ComponentCollection),q=n(12),j=n(4),N=n(1157),L=n(1091),D=n(1054),F=n(30),M=n(42),A=n(48),U=n(84),V=n(1064),B=n(158),H=n(1198),Q=n(1125),K=n(1339),z=n.n(K),Y=n(1340),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?Object.setPrototypeOf.bind():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){if(t&&("object"===W(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function ee(e){return(ee=Object.setPrototypeOf?Object.getPrototypeOf.bind():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}}),Object.defineProperty(e,"prototype",{writable:!1}),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=F.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(j.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(j.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:j.LocationContext.StaffRequestDetails,actionType:e,entity:j.EntityType.StaffRequest,workflowPhase:j.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")};M.a.logUserAction(n,t)}},{key:"logCreateFolderAction",value:function(){var e={location:j.LocationContext.StaffRequestDetails,actionType:j.UserAction.Create,entity:j.EntityType.Folder,workflowPhase:j.WorkflowPhase.Start},t={libraryId:this.viewModel.destinationLibrary.get("id")};M.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:D.a.mapSourceToDisplayName(this.model.sourceLibrary),sourceClass:"".concat(z.a.source," ").concat(D.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),Object.defineProperty(t,"prototype",{writable:!1}),s}(l.a.Component),ne=n(1341),oe=n.n(ne),re=n(1342),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?Object.setPrototypeOf.bind():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){if(t&&("object"===le(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function fe(e){return(fe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(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}}),Object.defineProperty(e,"prototype",{writable:!1}),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 q.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 L.a({model:this.model.video,webPlayerUrl:this.options.config.get("webPlayerUrl"),analyticsOptions:{location:j.LocationContext.VideoRequest},currentUser:this.options.currentUser}))}},{key:"renderVideoInfo",value:function(){this.showChildView("info",new N.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:D.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),Object.defineProperty(t,"prototype",{writable:!1}),i}(l.a.Component),de=n(147),he=n(1343),ye=n.n(he),me=n(1344),ge=n.n(me);function be(e){return(be="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ve(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?Object.setPrototypeOf.bind():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){if(t&&("object"===be(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Ce(e){return(Ce=Object.setPrototypeOf?Object.getPrototypeOf.bind():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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&we(e,t)}(b,e);var t,n,m,g=ke(b);function b(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,b),(t=g.call(this,e)).unavailableLibraryIds=[],t}return t=b,(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 I({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()}}])&&ve(t.prototype,n),m&&ve(t,m),Object.defineProperty(t,"prototype",{writable:!1}),b}(l.a.View)}}]);
@@ -0,0 +1 @@
1
+ (window.webpackJsonp_clickview_library_editor=window.webpackJsonp_clickview_library_editor||[]).push([[15],{1059:function(t,e,n){"use strict";n.d(e,"a",(function(){return f}));var o=n(1),r=n(2),i=n(312);function a(t){return(a="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 c(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?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function l(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=p(t);if(e){var r=p(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return u(this,n)}}function u(t,e){if(e&&("object"===a(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function p(t){return(p=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var f=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&s(t,e)}(u,t);var e,n,r,a=l(u);function u(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,u),a.call(this,t)}return e=u,(n=[{key:"name",get:function(){return"DropdownCollectionComponent"}},{key:"className",get:function(){return"dropdown-menu items-viewpart ".concat(this.getExtraClasses(this.options.displayOptions))}},{key:"attributes",get:function(){return{"aria-labelledby":"dropdownSelector"}}},{key:"initialize",value:function(){this.listenTo(this.options.channelName,"center:dropdown",this.centerSelectedItem)}},{key:"childView",get:function(){return i.a}},{key:"childViewOptions",get:function(){var t={channelName:this.options.channelName,analyticsHelper:this.options.analyticsHelper};return o.extend(t,this.options.childOptions)}},{key:"getExtraClasses",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.alignment,n=void 0===e?"left":e,o=t.extraClasses,r="dropdown-menu-".concat(n);return o&&(r="".concat(r," ").concat(o)),r}},{key:"centerSelectedItem",value:function(){var t=this.$el.find(".active");if(t.length){var e=this.$el.scrollTop()+t.position().top,n=.5*this.$el.height()+.5*t.height();this.$el.scrollTop(e-n)}}}])&&c(e.prototype,n),r&&c(e,r),Object.defineProperty(e,"prototype",{writable:!1}),u}(r.a.ComponentCollection)},1124:function(t,e,n){"use strict";var o=n(2),r=n(16),i=n(87),a=n(4),c=n(42),s=n(1059),l=n(0),u=n(3),p=n(1136),f=n.n(p);function y(t){return(y="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 d(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 h(t,e){return(h=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function b(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=m(t);if(e){var r=m(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return g(this,n)}}function g(t,e){if(e&&("object"===y(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function m(t){return(m=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var w=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&h(t,e)}(p,t);var e,n,r,i=b(p);function p(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,p),i.call(this,t)}return e=p,(n=[{key:"name",get:function(){return"FolderActionsDropdownComponent"}},{key:"template",get:function(){return f.a}},{key:"lang",get:function(){return"libraryEditor.folderActionsDropdown"}},{key:"channelName",get:function(){return"".concat(this.name).concat(this.cid)}},{key:"regions",value:function(){return{items:{el:".items-region",replaceElement:!0}}}},{key:"getFolderActions",value:function(){return[{title:u.a.getPhrase(this.lang,"addSubfolder"),analyticsOptions:c.a.mergeOptions(this.options.analyticsOptions,{actionType:a.UserAction.Create,entity:a.EntityType.Folder,workflowPhase:a.WorkflowPhase.Start}),appLink:{application:l.b.LIBRARY_EDITOR,action:l.a.LibraryEditor.NEW_SUB_FOLDER,args:[this.model.get("id")]}},{title:u.a.getPhrase(this.lang,"rename"),analyticsOptions:c.a.mergeOptions(this.options.analyticsOptions,{actionType:a.UserAction.Rename,entity:a.EntityType.Folder,workflowPhase:a.WorkflowPhase.Start}),appLink:{application:l.b.LIBRARY_EDITOR,action:l.a.LibraryEditor.RENAME_FOLDER,args:[this.model.get("id")]}},{title:u.a.getPhrase(this.lang,"move"),analyticsOptions:c.a.mergeOptions(this.options.analyticsOptions,{actionType:a.UserAction.Move,entity:a.EntityType.Folder,workflowPhase:a.WorkflowPhase.Start}),appLink:{application:l.b.LIBRARY_EDITOR,action:l.a.LibraryEditor.MOVE_FOLDER,args:[this.model.get("id")]}},{title:u.a.getPhrase(this.lang,"editImages"),analyticsOptions:c.a.mergeOptions(this.options.analyticsOptions,{actionType:a.UserAction.EditAssoc,entity:a.EntityType.Folder,workflowPhase:a.WorkflowPhase.Start,descriptor:a.AssocDescriptor.Image}),appLink:{application:l.b.LIBRARY_EDITOR,action:l.a.LibraryEditor.EDIT_FOLDER_IMAGES,args:[this.model.get("id")]}},{title:u.a.getPhrase(this.lang,"generatePdf"),analyticsOptions:c.a.mergeOptions(this.options.analyticsOptions,{actionType:a.UserAction.Create,entity:a.EntityType.PDF,workflowPhase:a.WorkflowPhase.Start}),appLink:{application:l.b.LIBRARY_EDITOR,action:l.a.LibraryEditor.GENERATE_PDF,args:[this.model.get("id")]}},{title:u.a.getPhrase(this.lang,"remove"),analyticsOptions:c.a.mergeOptions(this.options.analyticsOptions,{actionType:a.UserAction.Delete,entity:a.EntityType.Folder,workflowPhase:a.WorkflowPhase.Start}),classes:"text-danger",appLink:{application:l.b.LIBRARY_EDITOR,action:l.a.LibraryEditor.DELETE_FOLDER,args:[this.model.get("id")]}}]}},{key:"onRender",value:function(){this.showChildView("items",new s.a({analyticsHelper:c.a,displayOptions:{alignment:"right"},channelName:this.channelName,collection:new o.a.Collection(this.getFolderActions()),childOptions:{isDisabled:function(){return this.model.get("disabled")}}}))}}])&&d(e.prototype,n),r&&d(e,r),Object.defineProperty(e,"prototype",{writable:!1}),p}(o.a.Component),O=n(1137),v=n.n(O),k=n(1138),E=n.n(k);function P(t){return(P="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 R(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 _(t,e){return(_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function T(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=j(t);if(e){var r=j(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return C(this,n)}}function C(t,e){if(e&&("object"===P(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function j(t){return(j=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}n.d(e,"a",(function(){return D}));var D=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&_(t,e)}(c,t);var e,n,o,a=T(c);function c(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,c),a.call(this,t)}return e=c,(n=[{key:"name",get:function(){return"VideoCollectionActionsComponent"}},{key:"channelName",get:function(){return"".concat(this.name).concat(this.cid)}},{key:"className",get:function(){if(this.model instanceof i.a)return"position-absolute ".concat(this.options.overrideClasses?"":E.a.dropdownContainer," ").concat(this.options.extraClasses," ")}},{key:"elements",get:function(){return{dropdownToggle:".ui-dropdown-toggle",dropdownItem:".dropdown-item"}}},{key:"events",value:function(){return{"click @ui.dropdownToggle":"onClickDropdownToggle","click @ui.dropdownItem":"onClickDropdownItem"}}},{key:"template",get:function(){return v.a}},{key:"regions",value:function(){return{items:{replaceElement:!0,el:".items-region"}}}},{key:"onClickDropdownToggle",value:function(){this.model instanceof i.a&&this.showChildView("items",new w({model:this.model,analyticsOptions:this.options.analyticsOptions}))}},{key:"onClickDropdownItem",value:function(t){t.stopPropagation(),t.preventDefault(),this.getUI("dropdownToggle").dropdown("toggle")}},{key:"viewOptions",value:function(){return{hasActions:this.model instanceof i.a,dropdownClass:"".concat(E.a.dropdownButton," ").concat(this.options.buttonClass),svg:r.a.getSvg(r.b.More)}}}])&&R(e.prototype,n),o&&R(e,o),Object.defineProperty(e,"prototype",{writable:!1}),c}(o.a.Component)},1136:function(t,e,n){var o=n(10);t.exports=(o.default||o).template({compiler:[8,">= 4.3.0"],main:function(t,e,n,o,r){return'<div class="items-region"></div>'},useData:!0})},1137:function(t,e,n){var o=n(10);t.exports=(o.default||o).template({1:function(t,e,n,o,r){t.propertyIsEnumerable;var i,a=t.lambda;return'<span data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" class="'+t.escapeExpression(a(null!=(i=null!=e?e.options:e)?i.dropdownClass:i,e))+' d-inline-block ui-dropdown-toggle">\r\n '+(null!=(i=a(null!=(i=null!=e?e.options:e)?i.svg:i,e))?i:"")+'\r\n</span>\r\n<div class="items-region"></div>\r\n'},compiler:[8,">= 4.3.0"],main:function(t,e,n,o,r){var i;t.propertyIsEnumerable;return null!=(i=n.if.call(null!=e?e:t.nullContext||{},null!=(i=null!=e?e.options:e)?i.hasActions:i,{name:"if",hash:{},fn:t.program(1,r,0),inverse:t.noop,data:r}))?i:""},useData:!0})},1138:function(t,e,n){t.exports={dropdownContainer:"_2F3Cz",dropdownButton:"_2TdId"}},1201:function(t,e,n){"use strict";n.d(e,"a",(function(){return O}));var o=n(2),r=n(16),i=n(4),a=n(42),c=n(1059),s=n(0),l=n(3),u=n(1219),p=n.n(u),f=n(1220),y=n.n(f);function d(t){return(d="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 h(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 b(t,e){return(b=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function g(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=w(t);if(e){var r=w(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return m(this,n)}}function m(t,e){if(e&&("object"===d(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function w(t){return(w=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var O=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&b(t,e)}(d,t);var e,n,u,f=g(d);function d(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,d),f.call(this,t)}return e=d,(n=[{key:"name",get:function(){return"LibraryActionsComponent"}},{key:"template",get:function(){return p.a}},{key:"channelName",get:function(){return"".concat(this.name).concat(this.cid)}},{key:"lang",get:function(){return"libraryEditor.libraryActions"}},{key:"className",get:function(){return"position-absolute ".concat(y.a.dropdownContainer," ").concat(this.options.extraClasses," ")}},{key:"elements",get:function(){return{dropdownToggle:".ui-dropdown-toggle",dropdownItem:".dropdown-item"}}},{key:"events",value:function(){return{"click @ui.dropdownToggle":"onClickDropdownToggle","click @ui.dropdownItem":"onClickDropdownItem"}}},{key:"regions",value:function(){return{dropdownItems:{replaceElement:!0,el:".items-region"}}}},{key:"onClickDropdownToggle",value:function(){this.showChildView("dropdownItems",new c.a({analyticsHelper:a.a,displayOptions:{alignment:"right"},channelName:this.channelName,collection:new o.a.Collection([{title:l.a.getPhrase(this.lang,"addFolder"),analyticsOptions:a.a.mergeOptions(this.options.analyticsOptions,{actionType:i.UserAction.Create,entity:i.EntityType.Folder,workflowPhase:i.WorkflowPhase.Start}),appLink:{application:s.b.LIBRARY_EDITOR,action:s.a.Shared.NEW_FOLDER,args:[this.model.get("id")]}},{title:l.a.getPhrase(this.lang,"rename"),analyticsOptions:a.a.mergeOptions(this.options.analyticsOptions,{actionType:i.UserAction.Rename,entity:i.EntityType.Library,workflowPhase:i.WorkflowPhase.Start}),appLink:{application:s.b.LIBRARY_EDITOR,action:s.a.LibraryEditor.RENAME_LIBRARY,args:[this.model.get("id")]}},{title:l.a.getPhrase(this.lang,"remove"),analyticsOptions:a.a.mergeOptions(this.options.analyticsOptions,{actionType:i.UserAction.Delete,entity:i.EntityType.Library,workflowPhase:i.WorkflowPhase.Start}),appLink:{application:s.b.LIBRARY_EDITOR,action:s.a.LibraryEditor.DELETE_LIBRARY,args:[this.model.get("id")]},classes:"text-danger"}])}))}},{key:"onClickDropdownItem",value:function(t){t.stopPropagation(),t.preventDefault(),this.getUI("dropdownToggle").dropdown("toggle")}},{key:"viewOptions",value:function(){return{dropdownClass:"".concat(y.a.dropdownButton," ").concat(this.options.buttonClass),svg:r.a.getSvg(r.b.More)}}}])&&h(e.prototype,n),u&&h(e,u),Object.defineProperty(e,"prototype",{writable:!1}),d}(o.a.Component)},1219:function(t,e,n){var o=n(10);t.exports=(o.default||o).template({compiler:[8,">= 4.3.0"],main:function(t,e,n,o,r){t.propertyIsEnumerable;var i,a=t.lambda;return'<span data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" class="'+t.escapeExpression(a(null!=(i=null!=e?e.options:e)?i.dropdownClass:i,e))+' d-inline-block ui-dropdown-toggle">\r\n '+(null!=(i=a(null!=(i=null!=e?e.options:e)?i.svg:i,e))?i:"")+'\r\n</span>\r\n<div class="items-region"></div>'},useData:!0})},1220:function(t,e,n){t.exports={dropdownContainer:"_293SV",dropdownButton:"_23YxG"}}}]);
@@ -0,0 +1 @@
1
+ (window.webpackJsonp_clickview_library_editor=window.webpackJsonp_clickview_library_editor||[]).push([[16],{1064: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(1103),s=n(12),c=n(1066),a=n.n(c),u=n(1067),p=n.n(u);function f(e){return(f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function d(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function h(e,t){return(h=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(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=m(e);if(t){var r=m(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return b(this,n)}}function b(e,t){if(t&&("object"===f(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function m(e){return(m=Object.setPrototypeOf?Object.getPrototypeOf.bind():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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&h(e,t)}(u,e);var t,n,r,c=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),c.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 a.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:p.a,collection:this.collection,channelName:this.options.channelName,childrenProperty:"children",folderTreeId:this.options.folderTreeKey,extraClass:p.a.list,extraClasses:p.a.list,isSelector:!0,disabledIds:this.disabledIds||{}}))}},{key:"viewOptions",value:function(){return{styles:p.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),Object.defineProperty(t,"prototype",{writable:!1}),u}(r.a.Component)},1066: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})},1067:function(e,t,n){e.exports={selectBtn:"_2TTgs",list:"_3wN7o",selector:"_3Xf1P",customItem:"_199PI"}},1105: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(1059),s=n(12),c=n(1106),a=n.n(c),u=n(1107),p=n.n(u);function f(e){return(f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function d(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function h(e,t){return(h=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(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=m(e);if(t){var r=m(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return b(this,n)}}function b(e,t){if(t&&("object"===f(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function m(e){return(m=Object.setPrototypeOf?Object.getPrototypeOf.bind():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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&h(e,t)}(u,e);var t,n,i,c=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=c.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 a.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:p.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(p.a.dropdownMenu)},analyticsHelper:this.options.analyticsHelper}))}}])&&d(t.prototype,n),i&&d(t,i),Object.defineProperty(t,"prototype",{writable:!1}),u}(i.a.Component)},1106: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,c=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(c,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(c,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})},1107:function(e,t,n){e.exports={dropdownMenu:"_2RaQu",selectButton:"_2xGqi",disabled:"_15kWr"}},1125: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),c=n(1105),a=n(12),u=n(1146),p=n.n(u);function f(e){return(f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function d(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function h(e,t){return(h=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(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=m(e);if(t){var r=m(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return b(this,n)}}function b(e,t){if(t&&("object"===f(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function m(e){return(m=Object.setPrototypeOf?Object.getPrototypeOf.bind():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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&h(e,t)}(f,e);var t,n,i,u=y(f);function f(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,f),u.call(this,e)}return t=f,(n=[{key:"initialize",value:function(){this.bindListeners(),a.c.deselectAll(this.collection),a.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 p.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 c.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),Object.defineProperty(t,"prototype",{writable:!1}),f}(i.a.Component)},1146: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})}}]);
@@ -0,0 +1 @@
1
+ (window.webpackJsonp_clickview_library_editor=window.webpackJsonp_clickview_library_editor||[]).push([[17],{1045:function(e,t,n){"use strict";n.d(t,"a",(function(){return p}));var r=n(2),o=n(265);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 c(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function a(e,t){return(a=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(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){if(t&&("object"===i(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function f(e){return(f=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var p=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&a(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}}])&&c(t.prototype,n),r&&c(t,r),Object.defineProperty(t,"prototype",{writable:!1}),s}(r.a.Model)},1064:function(e,t,n){"use strict";n.d(t,"a",(function(){return v}));var r=n(6),o=n(2),i=n(3),l=n(1103),c=n(12),a=n(1066),u=n.n(a),s=n(1067),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 y(e,t){return(y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function h(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){if(t&&("object"===p(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function m(e){return(m=Object.setPrototypeOf?Object.getPrototypeOf.bind():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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&y(e,t)}(s,e);var t,n,o,a=h(s);function s(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),a.call(this,e)}return t=s,(n=[{key:"initialize",value:function(){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=c.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),Object.defineProperty(t,"prototype",{writable:!1}),s}(o.a.Component)},1066: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,c=e.escapeExpression;return'<button\r\n class="'+c(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='+c(l(null!=(i=null!=t?t.options:t)?i.name:i,t))+"\r\n>"+c(l(null!=(i=null!=t?t.options:t)?i.buttonText:i,t))+'</button>\r\n<div class="dropdown-menu '+c(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})},1067:function(e,t,n){e.exports={selectBtn:"_2TTgs",list:"_3wN7o",selector:"_3Xf1P",customItem:"_199PI"}},1331: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})},1450:function(e,t,n){"use strict";n.r(t),n.d(t,"AddToExchangeView",(function(){return k}));var r=n(2),o=n(5),i=n(57),l=n(51),c=n(305),a=n(1045),u=n(12),s=n(201),f=n(265),p=n(1064),d=n(0),y=n(1331),h=n.n(y);function b(e){return(b="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function m(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function v(e,t){return(v=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function g(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=O(e);if(t){var o=O(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return w(this,n)}}function w(e,t){if(t&&("object"===b(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function O(e){return(O=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var k=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&v(e,t)}(b,e);var t,n,r,y=g(b);function b(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,b),y.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 h.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:c.e,title:"Add to the Exchange",spinnerButtonOptions:{model:this.spinnerModel=new a.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),Object.defineProperty(t,"prototype",{writable:!1}),b}(r.a.View)}}]);