@clickview/library-editor 1.8.1-dev.0 → 1.8.1-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.
- package/dist/bundles.json +3 -3
- package/dist/css/{8179-library-editor-df33c921f0.chunk.css → 2704-library-editor-8067d27c56.chunk.css} +4 -0
- package/dist/css/{7295-library-editor-b0c43d2c79.chunk.css → 3427-library-editor-8442ad6453.chunk.css} +1 -1
- package/dist/css/{1132-library-editor-c1a116496b.chunk.css → 3803-library-editor-c08c7cc096.chunk.css} +1 -1
- package/dist/css/{2284-library-editor-436a0d1ce1.chunk.css → 409-library-editor-38562d76cd.chunk.css} +1 -1
- package/dist/css/{6220-library-editor-e66d80c18a.chunk.css → 4810-library-editor-740619bb9d.chunk.css} +1 -11
- package/dist/css/{6181-library-editor-db9baf23c2.chunk.css → 5047-library-editor-3ed99ac07f.chunk.css} +0 -4
- package/dist/css/{4177-library-editor-4cba18186c.chunk.css → 5248-library-editor-c06823703f.chunk.css} +8 -4
- package/dist/css/{6999-library-editor-c9c844221a.chunk.css → 5356-library-editor-075fbedf48.chunk.css} +0 -12
- package/dist/css/{1911-library-editor-f7158ba599.chunk.css → 6625-library-editor-89b6e935f3.chunk.css} +0 -4
- package/dist/css/{1521-library-editor-b3d6d791c2.chunk.css → 8343-library-editor-10baca49f5.chunk.css} +0 -4
- package/dist/css/{1887-library-editor-2e57df189d.chunk.css → 8420-library-editor-3bb4952bab.chunk.css} +8 -4
- package/dist/css/{8929-library-editor-2cba3474fe.chunk.css → 9195-library-editor-14f7d9be38.chunk.css} +1 -1
- package/dist/css/{library-editor-app-1cd9634b7b.css → library-editor-app-4e790b757d.css} +10 -10
- package/dist/en.json +1 -1
- package/dist/scripts/{1010-cd4e715098.chunk.js → 1010-cb37772c49.chunk.js} +1 -1
- package/dist/scripts/{1086-b559030dcf.chunk.js → 1086-a8cf020218.chunk.js} +1 -1
- package/dist/scripts/{1203-b828105755.chunk.js → 1203-14ae840d6b.chunk.js} +1 -1
- package/dist/scripts/{1409-8f5c1c9d0e.chunk.js → 1409-32bd85885e.chunk.js} +1 -1
- package/dist/scripts/{1832-d4427bb6f5.chunk.js → 1832-86cd9ad582.chunk.js} +1 -1
- package/dist/scripts/{1934-3b82bbbc99.chunk.js → 1934-3f8be23263.chunk.js} +1 -1
- package/dist/scripts/{2098-31d99bc407.chunk.js → 2098-96f81af824.chunk.js} +1 -1
- package/dist/scripts/2417-b87afd64a5.chunk.js +1 -0
- package/dist/scripts/{243-c9fdd938fd.chunk.js → 243-f01e965f4b.chunk.js} +1 -1
- package/dist/scripts/259-004621af29.chunk.js +1 -0
- package/dist/scripts/{2692-9ebe6d1ea4.chunk.js → 2692-61fa0956f7.chunk.js} +1 -1
- package/dist/scripts/2704-2acb36a8e6.chunk.js +2 -0
- package/dist/scripts/{2733-e8cc6e3610.chunk.js → 2733-b894e791d4.chunk.js} +1 -1
- package/dist/scripts/{2802-160b25677d.chunk.js → 2802-b27bcc7922.chunk.js} +1 -1
- package/dist/scripts/2803-a61efc3928.chunk.js +1 -0
- package/dist/scripts/{2888-80050720b2.chunk.js → 2888-aa8575c95a.chunk.js} +1 -1
- package/dist/scripts/{299-d19e77b508.chunk.js → 299-f783c04b9f.chunk.js} +1 -1
- package/dist/scripts/3096-7b76aacf1b.chunk.js +1 -0
- package/dist/scripts/3427-69e041b58f.chunk.js +1 -0
- package/dist/scripts/{3639-36a34d483b.chunk.js → 3639-49cbb7726d.chunk.js} +1 -1
- package/dist/scripts/3746-035d2a375b.chunk.js +1 -0
- package/dist/scripts/{3763-3bef6ac728.chunk.js → 3763-42330d8e14.chunk.js} +1 -1
- package/dist/scripts/3803-ddb6cb3af0.chunk.js +1 -0
- package/dist/scripts/409-4d3f47dde3.chunk.js +1 -0
- package/dist/scripts/{4201-25e82e2429.chunk.js → 4201-934449ecc8.chunk.js} +1 -1
- package/dist/scripts/{435-fb19753c8d.chunk.js → 435-15245a31f0.chunk.js} +1 -1
- package/dist/scripts/{4353-c7a0df4214.chunk.js → 4353-2cc9f63986.chunk.js} +1 -1
- package/dist/scripts/{4591-9a2868f8a0.chunk.js → 4591-5170be25a2.chunk.js} +1 -1
- package/dist/scripts/4703-d6f96abde3.chunk.js +1 -0
- package/dist/scripts/4810-abc1d10673.chunk.js +1 -0
- package/dist/scripts/{4860-b3e5cb9cbd.chunk.js → 4860-59a185099c.chunk.js} +1 -1
- package/dist/scripts/{4885-9e4ce006c8.chunk.js → 4885-5e746feb33.chunk.js} +1 -1
- package/dist/scripts/5047-fede824a7a.chunk.js +1 -0
- package/dist/scripts/{514-59d9a9a7bd.chunk.js → 514-4d8b3e1241.chunk.js} +1 -1
- package/dist/scripts/{6220-984f02c732.chunk.js → 5248-f08a510a35.chunk.js} +1 -1
- package/dist/scripts/{1887-d306fab87c.chunk.js → 5356-e72cc7d540.chunk.js} +1 -1
- package/dist/scripts/{5412-a1721cffc4.chunk.js → 5412-f7addc660e.chunk.js} +1 -1
- package/dist/scripts/5431-5878626ffc.chunk.js +1 -0
- package/dist/scripts/{546-81473f1035.chunk.js → 546-0a0da54e49.chunk.js} +1 -1
- package/dist/scripts/5665-652f2d5ce2.chunk.js +1 -0
- package/dist/scripts/{5747-8a168b816b.chunk.js → 5747-1c103faee6.chunk.js} +1 -1
- package/dist/scripts/5967-7f52d83b9d.chunk.js +1 -0
- package/dist/scripts/6093-e8c8ee685e.chunk.js +1 -0
- package/dist/scripts/{6420-1537f8f587.chunk.js → 6420-e6a2a2f8e1.chunk.js} +1 -1
- package/dist/scripts/{1911-41bf677d7e.chunk.js → 6625-dad5409d21.chunk.js} +1 -1
- package/dist/scripts/{6774-185468f6f5.chunk.js → 6774-65575c493f.chunk.js} +1 -1
- package/dist/scripts/{6788-2368a122f1.chunk.js → 6788-5a4f2eb9cc.chunk.js} +1 -1
- package/dist/scripts/7002-93a4fa2a41.chunk.js +1 -0
- package/dist/scripts/7053-367c9fd75e.chunk.js +1 -0
- package/dist/scripts/{7251-a247842ccb.chunk.js → 7251-6f904debb4.chunk.js} +2 -2
- package/dist/scripts/{8074-b610b1ba63.chunk.js → 8074-f41783a736.chunk.js} +1 -1
- package/dist/scripts/{1521-0c23d44c5e.chunk.js → 8343-744924c708.chunk.js} +1 -1
- package/dist/scripts/{8362-195c5ba6c3.chunk.js → 8362-bd0a827fd1.chunk.js} +1 -1
- package/dist/scripts/8420-feedc1737c.chunk.js +1 -0
- package/dist/scripts/8727-bcd1353109.chunk.js +1 -0
- package/dist/scripts/{8762-b445a592a5.chunk.js → 8762-44030384bd.chunk.js} +1 -1
- package/dist/scripts/{8906-efcc846fad.chunk.js → 8906-9c897538cc.chunk.js} +1 -1
- package/dist/scripts/{8947-4df5e81810.chunk.js → 8947-361fa0bb45.chunk.js} +1 -1
- package/dist/scripts/{9167-9c54b36e3a.chunk.js → 9167-653b78f15a.chunk.js} +1 -1
- package/dist/scripts/9195-86ea4a2c6e.chunk.js +1 -0
- package/dist/scripts/{9298-d8c9ed5471.chunk.js → 9298-e7d4c8cdcd.chunk.js} +1 -1
- package/dist/scripts/9355-805decfc74.chunk.js +1 -0
- package/dist/scripts/{9357-2e288289f3.chunk.js → 9357-24309fbc82.chunk.js} +1 -1
- package/dist/scripts/9383-db31c7a3f4.chunk.js +1 -0
- package/dist/scripts/{9695-4bb132be57.chunk.js → 9695-3b345f10c3.chunk.js} +1 -1
- package/dist/scripts/{9927-25579dff18.chunk.js → 9927-e6b59f3a6c.chunk.js} +1 -1
- package/dist/scripts/bundle-5523d17860.min.js +2 -0
- package/package.json +1 -1
- package/dist/css/101-library-editor-808f785991.chunk.css +0 -4
- package/dist/css/2011-library-editor-9b9cd091d0.chunk.css +0 -62
- package/dist/css/2119-library-editor-1d6a95fb9f.chunk.css +0 -4
- package/dist/css/3969-library-editor-3382f0875b.chunk.css +0 -4
- package/dist/css/3987-library-editor-2271e5262a.chunk.css +0 -56
- package/dist/css/5891-library-editor-76fe7e394b.chunk.css +0 -2
- package/dist/css/6963-library-editor-76fe7e394b.chunk.css +0 -2
- package/dist/scripts/101-98e020bd6f.chunk.js +0 -1
- package/dist/scripts/1132-3f29e51c9d.chunk.js +0 -1
- package/dist/scripts/2011-f178a6dabf.chunk.js +0 -1
- package/dist/scripts/2119-cbaa6000b1.chunk.js +0 -1
- package/dist/scripts/2284-a57db3563f.chunk.js +0 -1
- package/dist/scripts/2417-48687b3eeb.chunk.js +0 -1
- package/dist/scripts/259-e1d9ce07f4.chunk.js +0 -1
- package/dist/scripts/2803-86fc1b1e3f.chunk.js +0 -1
- package/dist/scripts/3096-ca9e2f0dfd.chunk.js +0 -1
- package/dist/scripts/3746-46e0073a46.chunk.js +0 -1
- package/dist/scripts/3969-258fca82a8.chunk.js +0 -1
- package/dist/scripts/3987-e3a4ade0c9.chunk.js +0 -1
- package/dist/scripts/4177-0be8ceed3c.chunk.js +0 -1
- package/dist/scripts/5173-e1b904c06c.chunk.js +0 -1
- package/dist/scripts/5235-abc8ea83ed.chunk.js +0 -1
- package/dist/scripts/5263-38198ed595.chunk.js +0 -1
- package/dist/scripts/5664-d6cbc77d63.chunk.js +0 -1
- package/dist/scripts/5891-63973f5678.chunk.js +0 -1
- package/dist/scripts/6093-a62d8ebc86.chunk.js +0 -1
- package/dist/scripts/6181-fa5e7bcbf9.chunk.js +0 -1
- package/dist/scripts/6963-a576fd9c4d.chunk.js +0 -1
- package/dist/scripts/6999-1fe379ca99.chunk.js +0 -1
- package/dist/scripts/7002-9b2aad8369.chunk.js +0 -1
- package/dist/scripts/7053-643499a3a6.chunk.js +0 -1
- package/dist/scripts/708-9e2ef23c87.chunk.js +0 -1
- package/dist/scripts/7295-96fcbaa176.chunk.js +0 -1
- package/dist/scripts/7376-21f5de2ce6.chunk.js +0 -1
- package/dist/scripts/8179-f5cc87ded7.chunk.js +0 -2
- package/dist/scripts/8495-0a9a71f2dc.chunk.js +0 -1
- package/dist/scripts/8727-20ae545e12.chunk.js +0 -1
- package/dist/scripts/8929-6fac19a7a3.chunk.js +0 -1
- package/dist/scripts/9383-6d0392b17f.chunk.js +0 -1
- package/dist/scripts/9770-9eaef2c966.chunk.js +0 -1
- package/dist/scripts/995-3a6de1eec1.chunk.js +0 -1
- package/dist/scripts/bundle-2b73fa6c21.min.js +0 -2
- /package/dist/css/{708-library-editor-7417a89428.chunk.css → 5967-library-editor-7417a89428.chunk.css} +0 -0
- /package/dist/scripts/{1934-3b82bbbc99.chunk.js.LICENSE.txt → 1934-3f8be23263.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{8179-f5cc87ded7.chunk.js.LICENSE.txt → 2704-2acb36a8e6.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{2802-160b25677d.chunk.js.LICENSE.txt → 2802-b27bcc7922.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{3019-8c7fdaf749.chunk.js → 3019-756f3418e1.chunk.js} +0 -0
- /package/dist/scripts/{3400-3a56ad67d9.chunk.js → 3400-77e28c9a26.chunk.js} +0 -0
- /package/dist/scripts/{400-00070f1714.chunk.js → 400-245e50bb8b.chunk.js} +0 -0
- /package/dist/scripts/{4245-4d98c3f676.chunk.js → 4245-7ca37805e2.chunk.js} +0 -0
- /package/dist/scripts/{5418-bfa546cf33.chunk.js → 5418-eab2a58869.chunk.js} +0 -0
- /package/dist/scripts/{693-0ae38e2ba5.chunk.js → 693-4e5dfe0a0a.chunk.js} +0 -0
- /package/dist/scripts/{7173-a4f745b0ed.chunk.js → 7173-f13a6eaf95.chunk.js} +0 -0
- /package/dist/scripts/{7190-d294d5b67c.chunk.js → 7190-663dc02699.chunk.js} +0 -0
- /package/dist/scripts/{7251-a247842ccb.chunk.js.LICENSE.txt → 7251-6f904debb4.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{bundle-2b73fa6c21.min.js.LICENSE.txt → bundle-5523d17860.min.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{polyfills-c62d0e7aec.min.js → polyfills-513148dd03.min.js} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[9383],{80732:function(e,t,n){"use strict";n.r(t),n.d(t,{UploadVideosView:function(){return at}});var o=n(39479),i=n(48088),r=n(31647),l=n(99249),a=n(21679),s=n(57857),c=n(21186),u=n(25417),d=n(36357),f=n(8371),p=n(35250),h=n.n(p),y=n(88410),m=n(57769),g=n(61843),v=n(88172),b=n(42494),w=n.n(b);function k(e){return k="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},k(e)}function S(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 O(e,t){return O=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},O(e,t)}function C(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)},P(e)}var N=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&&O(e,t)}(c,e);var t,n,o,r,a=(o=c,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=P(o);if(r){var n=P(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return C(this,e)});function c(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c),a.call(this,e)}return t=c,(n=[{key:"initialize",value:function(){this.model=l.r.get("upload:progress:".concat(y.AJ.Video)),this.listenTo(this.model,"change:done",this.render),this.listenTo(this.channelName,"continue",this.onClickContinue),this.listenTo(this.options.uploadChannelName,"start:spinner",this.startSpinner)}},{key:"name",get:function(){return"UploadActionsComponent"}},{key:"lang",get:function(){return"upload.uploadActions"}},{key:"template",get:function(){return w()}},{key:"className",get:function(){return"clearfix my-3"}},{key:"channelName",get:function(){return"".concat(this.name).concat(this.cid)}},{key:"regions",value:function(){return{finishButton:{el:".finish-button-region",replaceElement:!0}}}},{key:"behaviors",get:function(){return[{behaviorClass:m.Z,buttonSelector:".add-more-videos",channelName:this.options.uploadChannelName,acceptMultiple:!0,mimeType:"video/*"}]}},{key:"startSpinner",value:function(){i.Radio.channel(this.channelName).trigger(v.I3.ShowSpinner)}},{key:"onClickContinue",value:function(){this.model.get("done")&&i.Radio.channel(this.options.uploadChannelName).trigger("continue")}},{key:"onRender",value:function(){this.showChildView("finishButton",new v.Py({channelName:this.channelName,disabled:!this.model.get("done"),saveEvent:"continue",extraButtonClass:"btn-dark float-right ml-3",buttonText:s.T.getPhrase(this.lang,"finish"),spinnerOptions:{size:g.Ey.Small,type:g.dR.Light,extraClasses:"mx-auto"},tooltip:{title:this.model.get("done")?"":s.T.getPhrase(this.lang,"stillUploading")}}))}}])&&S(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),c}(r.Q.Component),T=n(33192),x=n(39995),j=n(88483),E=n(71192),I=n(37382),R=n(15180),_=n(95168),D=n(39155),A=(n(14611),n(33015),n(90680)),V=n(60602),L=n(20072),M=n(52076),U=n(22557),F=n(75459),B=n(26357),K=n(21893),Q=n.n(K);function z(e){return z="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},z(e)}function H(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 J(e,t){return J=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},J(e,t)}function q(e,t){if(t&&("object"===z(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function W(e){return W=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},W(e)}var Y=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&&J(e,t)}(c,e);var t,n,r,l,a=(r=c,l=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=W(r);if(l){var n=W(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return q(this,e)});function c(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c),a.call(this,e)}return t=c,(n=[{key:"initialize",value:function(){this.prepareData(),this.bindListeners()}},{key:"lang",get:function(){return"libraryEditor.folderSelect"}},{key:"prepareData",value:function(){var e=this.options.library?this.options.library.collection:this.collection;this.collection=U.P.flatten(e),g.yV.setSelected(this.options.currentFolderId,this.collection),this.options.canCreateFolder&&this.collection.add({name:s.T.getPhrase(this.lang,"createNew"),eventName:"create:folder"})}},{key:"bindListeners",value:function(){var e=this;this.listenTo(this.channelName,"create:folder",this.onClickCreateFolder),this.listenTo(this.channelName,"select:option:selected",(function(t){i.Radio.channel(e.options.channelName).trigger("folder:selected",t)}))}},{key:"channelName",get:function(){return"".concat(this.name).concat(this.cid)}},{key:"folderTreeKey",get:function(){return"folderselect:".concat(this.cid)}},{key:"name",get:function(){return"FolderSelectView"}},{key:"className",get:function(){return"position-relative"}},{key:"template",get:function(){return Q()}},{key:"regions",value:function(){return{dropdown:{el:".dropdown-menu-region",replaceElement:!0}}}},{key:"onClickCreateFolder",value:function(){i.Radio.channel(this.options.channelName).trigger("create:folder:clicked")}},{key:"generatePrefix",value:function(){var e=this.model.get("depth");if(!o.isNumber(e)||this.model.get("hidePrefix"))return"";for(var t="",n=0;n<e;n++)t+=" ";return e&&(t+="- "),t}},{key:"getIsOptionDisabledFn",value:function(){var e=this.options.disableLibraries,t=this.options.disabledFolderIds;return function(n){var i=n||this.model;return!(!e||i.get("type")!==F.r.CustomLibrary)||!(!t||!o.contains(t,i.get("id").toString()))}}},{key:"onRender",value:function(){this.showChildView("dropdown",new B.H({collection:this.collection,channelName:this.channelName,childOptions:{titleProperty:"name",eventName:"select:option:click",prefixHandler:this.generatePrefix,currentSelectedMessage:this.options.currentSelectedMessage||s.T.getPhrase(this.lang,"current"),isDisabled:this.getIsOptionDisabledFn()},placeholderText:this.options.placeholderText||s.T.getPhrase(this.lang,"placeholder"),noOptionsText:s.T.getPhrase(this.lang,"noFolders"),inputName:this.options.inputName,disabled:0===this.collection.length||this.options.disabled,analyticsHelper:M.k}))}}])&&H(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),c}(r.Q.Component),X={requiredStar:"BykcP"},Z=n(76370),G=n.n(Z);function ee(e){return ee="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ee(e)}function te(e,t){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 ne(e,t){return ne=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ne(e,t)}function oe(e,t){if(t&&("object"===ee(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function ie(e){return ie=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ie(e)}var 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&&ne(e,t)}(a,e);var t,n,o,r,l=(o=a,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=ie(o);if(r){var n=ie(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return oe(this,e)});function a(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),l.call(this,e)}return t=a,(n=[{key:"initialize",value:function(){var e=this;this.librariesWithoutFolders=new A.q,this.collection.each((function(t){return e.librariesWithoutFolders.add(t.toFlatJSON())})),this.listenTo(this.libraryChannelName,"folder:selected",this.onLibrarySelected),this.listenTo(this.channelName,"folder:selected new:folder:selected",this.onFolderSelected),this.listenTo(this.channelName,"create:folder:clicked",this.onCreateFolderClicked),!this.hasMultipleLibraries()&&this.librariesWithoutFolders.first()&&this.model.set("libraryId",this.librariesWithoutFolders.first().get("id"));var t=this.collection.get(this.model.get("libraryId"));if(t){var n=g.PU.getSelected(this.folderTreeKey,t.children);this.options.preselectedFolderId&&!n&&this.onFolderSelected(this.options.preselectedFolderId)}}},{key:"name",get:function(){return"UploadFolderSelectComponent"}},{key:"template",get:function(){return G()}},{key:"lang",get:function(){return"upload.uploadFolderSelect"}},{key:"folderTreeKey",get:function(){return"folder:tree:".concat(this.model.cid)}},{key:"regions",value:function(){return{librarySelect:".library-select-region",folderSelect:".folder-select-region"}}},{key:"hasMultipleLibraries",value:function(){return this.librariesWithoutFolders.length>1}},{key:"libraryChannelName",get:function(){return"".concat(this.channelName,":").concat(this.options.selectId,":libraries")}},{key:"channelName",get:function(){return"".concat(this.name).concat(this.cid).concat(this.options.selectId)}},{key:"onLibrarySelected",value:function(e){this.model.set("libraryId",e.get("id")),this.model.unset("folderId"),this.render()}},{key:"onFolderSelected",value:function(e){var t=e;e instanceof V.g&&(t=e.get("id")),this.model.set("folderId",t);var n=this.collection.get(this.model.get("libraryId")).children;g.PU.setSelected(this.folderTreeKey,t,n),this.model.validate()}},{key:"onCreateFolderClicked",value:function(){i.Radio.channel(this.options.channelName).trigger("show:new:folder",this.model.get("libraryId"),this.channelName)}},{key:"renderLibrarySelect",value:function(){if(this.hasMultipleLibraries()){var e=new Y({collection:this.librariesWithoutFolders,channelName:this.libraryChannelName,placeholderText:s.T.getPhrase(this.lang,"selectLibraryPlaceholder"),currentFolderId:this.model.get("libraryId"),currentSelectedMessage:s.T.getPhrase(this.lang,"currentLibrary"),inputName:"libraryId",canCreateFolder:!1});this.showChildView("librarySelect",e)}}},{key:"renderFolderSelect",value:function(){var e=this.model.get("libraryId");if(e){var t=this.collection.get(e);this.showChildView("folderSelect",new L.Y({collection:t.children,channelName:this.channelName,folderTreeKey:this.folderTreeKey,canCreateNew:!0,name:"folderId"}))}}},{key:"viewOptions",value:function(){return{styles:X,hasMultipleLibraries:this.hasMultipleLibraries(),requiredFields:this.options.requiredFields}}},{key:"onRender",value:function(){this.renderLibrarySelect(),this.renderFolderSelect()}}])&&te(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(r.Q.Component),le=n(11453),ae=n.n(le);function se(e){return se="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},se(e)}function ce(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ue(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function de(e,t){return de=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},de(e,t)}function fe(e,t){if(t&&("object"===se(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 pe(e){return pe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},pe(e)}var he=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&de(e,t)}(l,e);var t,n,o,i,r=(o=l,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=pe(o);if(i){var n=pe(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return fe(this,e)});function l(){return ce(this,l),r.apply(this,arguments)}return t=l,(n=[{key:"initialize",value:function(){this.listenTo(this.model,"change:progress",this.update)}},{key:"name",get:function(){return"UploadProgressComponent"}},{key:"template",get:function(){return ae()}},{key:"className",get:function(){return"progress my-3"}},{key:"elements",get:function(){return{progressBar:".progress-bar"}}},{key:"update",value:function(){var e=this.model.get("progress"),t=this.getUI("progressBar");t&&t.get(0)&&$(t.get(0)).css("width","".concat(e,"%"))}}])&&ue(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),l}(r.Q.Component),ye=n(63105),me=n.n(ye),ge=n(47381),ve=n.n(ge),be=n(61778),we=n.n(be),ke={title:"melld"},Se=n(42633),Oe=n.n(Se);function Ce(e){return Ce="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ce(e)}function Pe(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 Ne(e,t){return Ne=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Ne(e,t)}function Te(e,t){if(t&&("object"===Ce(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function xe(e){return xe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},xe(e)}var je=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&&Ne(e,t)}(l,e);var t,n,o,i,r=(o=l,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=xe(o);if(i){var n=xe(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return Te(this,e)});function l(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l),r.call(this,e)}return t=l,(n=[{key:"name",get:function(){return"UploadVideoOptionsComponent"}},{key:"template",get:function(){return Oe()}},{key:"lang",get:function(){return"upload.uploadVideoOptions"}},{key:"tagName",get:function(){return"form"}},{key:"className",get:function(){return"border-top pt-3"}},{key:"events",value:function(){return{"click .toggle-option":"onToggleAutoCaptioning"}}},{key:"onToggleAutoCaptioning",value:function(e){e.stopPropagation(),this.model.set("autoCaption",!this.model.get("autoCaption")),this.render()}},{key:"viewOptions",value:function(){return{isSelected:this.model.get("autoCaption")}}}])&&Pe(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),l}(r.Q.Component),Ee=n(264);function Ie(e){return Ie="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},Ie(e)}function Re(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function De(e,t,n){return t&&_e(e.prototype,t),n&&_e(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Ae(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&&Ve(e,t)}function Ve(e,t){return Ve=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Ve(e,t)}function Le(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=Ue(e);if(t){var i=Ue(this).constructor;n=Reflect.construct(o,arguments,i)}else n=o.apply(this,arguments);return Me(this,n)}}function Me(e,t){if(t&&("object"===Ie(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Ue(e){return Ue=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ue(e)}var Fe=function(e){Ae(n,e);var t=Le(n);function n(){return Re(this,n),t.apply(this,arguments)}return De(n,[{key:"initialize",value:function(){this.listenTo(this.model,"change:name",this.render)}},{key:"name",get:function(){return"UploadTitleComponent"}},{key:"template",get:function(){return ve()}},{key:"tagName",get:function(){return"h3"}},{key:"className",get:function(){return"mb-0 border-bottom p-3 ".concat(ke.title)}},{key:"viewOptions",value:function(){return{name:this.model.get("name")||this.model.get("fileName")}}}]),n}(r.Q.Component),Be=function(e){Ae(n,e);var t=Le(n);function n(){return Re(this,n),t.apply(this,arguments)}return De(n,[{key:"initialize",value:function(){this.listenTo(this.model,"change:progress",this.render)}},{key:"name",get:function(){return"TextProgressComponent"}},{key:"template",get:function(){return we()}},{key:"lang",get:function(){return"upload.uploadVideo"}},{key:"className",get:function(){return" text-muted"}},{key:"tagName",get:function(){return"p"}},{key:"viewOptions",value:function(){return{percentage:Math.round(this.model.get("progress")||0)}}}]),n}(r.Q.Component),Ke=function(e){Ae(n,e);var t=Le(n);function n(e){return Re(this,n),t.call(this,e)}return De(n,[{key:"initialize",value:function(){this.viewModel=l.r.get("upload:".concat(this.model.get("id")),{name:this.model.get("name"),fileName:this.model.get("name"),showAdvanced:this.options.openAdvancedMetadata,rating:this.options.ratings.findWhere({value:0}),folderId:this.options.folderId,libraryId:this.options.libraryId,timeInitialized:T(),autoCaption:!1},{ctor:E.n}),this.viewModel.addValidation(D.I),this.listenTo(this.channelName,"select:rating",o.partial(this.onAssociationSelected,o,"rating")),this.listenTo(this.channelName,"select:channel",o.partial(this.onAssociationSelected,o,"channel")),this.listenTo(this.channelName,"add:producers",this.onSelectProducer),this.listenTo(this.channelName,"add:distributors",this.onSelectDistributor),this.listenTo(this.channelName,"add:productionCompanies",this.onSelectProductionCompany),this.listenTo(this.channelName,"add:directors",this.onSelectDirector),this.listenTo(this.channelName,"select:series",this.onSelectSeries),this.listenTo(this.channelName,"add:season",this.onSelectSeason),this.listenTo(this.options.uploadChannelName,"invalid:".concat(this.model.get("id")),this.scrollTo)}},{key:"name",get:function(){return"UploadVideoComponent"}},{key:"template",get:function(){return me()}},{key:"className",get:function(){return"bg-white mb-3 rounded"}},{key:"lang",get:function(){return"upload.uploadVideo"}},{key:"events",value:function(){return{"click .add-advanced-metadata":"onClickAddAdvancedMetadata","click .cancel-upload":"onClickCancelUpload"}}},{key:"channelName",get:function(){return"".concat(this.name).concat(this.cid)}},{key:"regions",value:function(){return{progress:{el:".upload-progress-region",replaceElement:!0},thumbnail:{el:".thumbnail-region",replaceElement:!0},uploadTitle:{el:".upload-title-region",replaceElement:!0},folderSelect:{el:".folder-select-region",replaceElement:!0},textProgress:{el:".text-progress-region",replaceElement:!0},videoDetails:{el:".video-details-region",replaceElement:!0},productionInfo:{el:".production-info-region",replaceElement:!0},advancedDetails:{el:".additional-info-region",replaceElement:!0},uploadOptions:{el:".video-options-region",replaceElement:!0}}}},{key:"onClickAddAdvancedMetadata",value:function(){this.viewModel.set("showAdvanced",!this.viewModel.get("showAdvanced")),this.render()}},{key:"onClickCancelUpload",value:function(){var e=this,t={title:s.T.getPhrase(this.lang,"cancelHeading"),text:s.T.getPhrase(this.lang,"cancelBody",{videoTitle:this.model.get("name")}),buttons:[{text:s.T.getPhrase(this.lang,"yes"),className:"btn btn-dark",success:!0},{text:s.T.getPhrase(this.lang,"no"),className:"btn btn-link",close:!0}],channelName:this.channelName};new g.Mr(t).render().done((function(){i.Radio.channel(e.options.uploadChannelName).trigger("cancel:upload",e.model.get("id"))}))}},{key:"onAssociationSelected",value:function(e,t){var n=this.viewModel.get(t);if(n instanceof r.Q.Collection){var i=n.filter((function(t){return!t.id||t.name===e.name}));o.each(i,(function(e){return n.remove(e)})),this.viewModel.get(t).add(e)}else this.viewModel.set(t,e)}},{key:"onSelectSeries",value:function(e){var t=this,n=i.Radio.channel(this.options.uploadChannelName);e.id?n.trigger("get:series",e.id,(function(e){t.onAssociationSelected(e.toJSON(),"series"),t.renderAdvancedVideoDetails()})):e.name&&n.trigger("create:series",e.name,(function(e){t.onAssociationSelected(e.toJSON(),"series"),t.renderAdvancedVideoDetails()}))}},{key:"onSelectSeason",value:function(e){var t=this;if(o.isNull(e))return this.viewModel.get("season").clear({silent:!0}),g.yV.deselectAll(this.viewModel.get("series.seasons")),this.onAssociationSelected(null,"season"),void this.renderAdvancedVideoDetails();if(e.id)return g.yV.setSelected(e.id,this.viewModel.get("series.seasons")),this.onAssociationSelected(e,"season"),void this.renderAdvancedVideoDetails();if(e.number){var n=this.viewModel.get("series.id");i.Radio.channel(this.options.uploadChannelName).trigger("create:season",e,n,(function(e){t.viewModel.get("series.seasons").add(e.toJSON()),g.yV.setSelected(e.id,t.viewModel.get("series.seasons")),t.onAssociationSelected(e.toJSON(),"season"),t.renderAdvancedVideoDetails()}))}}},{key:"onSelectDistributor",value:function(e){var t=this;e.id?this.onAssociationSelected(e,"distributors"):e.name&&i.Radio.channel(this.options.uploadChannelName).trigger("create:company",e.name,(function(e){t.onAssociationSelected(e.toJSON(),"distributors")}))}},{key:"onSelectProductionCompany",value:function(e){var t=this;e.id?this.onAssociationSelected(e,"productionCompanies"):e.name&&i.Radio.channel(this.options.uploadChannelName).trigger("create:company",e.name,(function(e){t.onAssociationSelected(e.toJSON(),"productionCompanies")}))}},{key:"onSelectDirector",value:function(e){var t=this;e.id?this.onAssociationSelected(e,"directors"):e.name&&i.Radio.channel(this.options.uploadChannelName).trigger("create:person",e.name,(function(e){t.onAssociationSelected(e.toJSON(),"directors")}))}},{key:"onSelectProducer",value:function(e){var t=this;e.id?this.onAssociationSelected(e,"producers"):e.name&&i.Radio.channel(this.options.uploadChannelName).trigger("create:person",e.name,(function(e){t.onAssociationSelected(e.toJSON(),"producers")}))}},{key:"getRequiredFields",value:function(){return{uploadDestination:!0}}},{key:"renderTitle",value:function(){var e=new Fe({model:this.viewModel});this.showChildView("uploadTitle",e)}},{key:"renderThumbnail",value:function(){var e=new x.Z({model:this.viewModel,thumbnailOptions:{size:j.h2.Medium}});this.showChildView("thumbnail",e)}},{key:"renderProgress",value:function(){var e=new he({model:this.model});this.showChildView("progress",e);var t=new Be({model:this.model});this.showChildView("textProgress",t)}},{key:"renderBasicVideoDetails",value:function(){var e=new I.J({model:this.viewModel,channelName:this.channelName,ratings:this.options.ratings,requiredFields:this.getRequiredFields(),editable:!0});this.showChildView("videoDetails",e)}},{key:"renderFolderSelect",value:function(){var e=new re({collection:this.options.libraries,selectId:this.model.get("id"),model:this.viewModel,channelName:this.options.uploadChannelName,requiredFields:this.getRequiredFields(),preselectedFolderId:this.options.folderId});this.showChildView("folderSelect",e)}},{key:"renderAdvancedVideoDetails",value:function(){if(this.viewModel.get("showAdvanced")){if(!Ee.g.hasLite){var e=new R.a({channelName:this.channelName,model:this.viewModel,libraries:this.options.libraries,hostedLibraries:this.options.hostedLibraries,editable:!0,hideBroadcastInfo:this.options.hideBroadcastInfo}),t=new _.O({channelName:this.channelName,model:this.viewModel,editable:!0});this.showChildView("advancedDetails",e),this.showChildView("productionInfo",t)}this.options.allowAutoCaptioning&&this.showChildView("uploadOptions",new je({model:this.viewModel}))}}},{key:"scrollTo",value:function(){$("html,body").animate({scrollTop:this.$el.offset().top},250)}},{key:"viewOptions",value:function(){return Object.assign({styles:ke,showExpand:this.options.allowAutoCaptioning||!Ee.g.hasLite},this.viewModel.toJSON())}},{key:"onRender",value:function(){this.renderTitle(),this.renderThumbnail(),this.renderProgress(),this.renderBasicVideoDetails(),this.renderFolderSelect(),this.renderAdvancedVideoDetails(),i.Validation.bind(this,{model:this.viewModel})}},{key:"onDestroy",value:function(){i.Validation.unbind(this)}}]),n}(r.Q.Component);function Qe(e){return Qe="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},Qe(e)}function ze(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 He(e,t){return He=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},He(e,t)}function Je(e,t){if(t&&("object"===Qe(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 qe(e){return qe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},qe(e)}var We=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&&He(e,t)}(l,e);var t,n,o,i,r=(o=l,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=qe(o);if(i){var n=qe(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return Je(this,e)});function l(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l),r.call(this,e)}return t=l,(n=[{key:"name",get:function(){return"UploadVideoComponentCollection"}},{key:"childView",get:function(){return Ke}},{key:"childViewOptions",get:function(){return{ratings:this.options.ratings,libraries:this.options.libraries,hostedLibraries:this.options.hostedLibraries,uploadChannelName:this.options.uploadChannelName,folderId:this.options.folderId,libraryId:this.options.libraryId,allowAutoCaptioning:this.options.allowAutoCaptioning,hideBroadcastInfo:this.options.hideBroadcastInfo,openAdvancedMetadata:this.collection.length<=1}}}])&&ze(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),l}(r.Q.ComponentCollection),$e=n(30305),Ye=n(48404),Xe=n(9484),Ze=n(95061),Ge=n(70065),et=n(81937),tt=n(5854);function nt(e){return nt="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},nt(e)}function ot(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 it(e,t){return it=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},it(e,t)}function rt(e,t){if(t&&("object"===nt(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 lt(e){return lt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},lt(e)}var at=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&&it(e,t)}(v,e);var t,n,p,y,m=(p=v,y=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=lt(p);if(y){var n=lt(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return rt(this,e)});function v(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,v),m.call(this,e)}return t=v,(n=[{key:"initialize",value:function(){this.initServices(),this.initDataListeners(),this.initComponentListeners(),this.initCollectionListeners(),this.initShellListeners()}},{key:"name",get:function(){return"UploadVideosView"}},{key:"title",get:function(){return s.T.getPhrase(this.lang,"title")}},{key:"lang",get:function(){return"upload.uploadVideos"}},{key:"template",get:function(){return h()}},{key:"regions",value:function(){return{topActions:{el:".top-actions-region",replaceElement:!0},bottomActions:{el:".bottom-actions-region",replaceElement:!0},videos:{el:".videos-region",replaceElement:!0}}}},{key:"channelName",get:function(){return"".concat(this.name).concat(this.cid)}},{key:"initServices",value:function(){this.videoDataService=a.u.getInstance($e.Or.Video,this),this.libraryDataService=a.u.getInstance($e.Or.Library,this),this.videoUploadService=a.u.getInstance($e.K9.VideoUpload,this),this.videoUploadDataService=a.u.getInstance($e.Or.VideoUpload,this),this.seriesDataService=a.u.getInstance($e.Or.Series,this),this.ratingsDataService=a.u.getInstance($e.Or.Ratings,this),this.companyDataService=a.u.getInstance($e.Or.Company,this),this.personDataService=a.u.getInstance($e.Or.Person,this),this.alertService=a.u.getInstance($e.K9.Alerts,this),this.navLockService=a.u.getInstance($e.K9.NavLock,this),this.settingsDataService=a.u.getInstance($e.Or.Settings,this)}},{key:"initDataListeners",value:function(){this.listenTo($e.Vk.RATINGS,"".concat($e.M_.RATINGS,":sync"),this.render),this.listenTo($e.Vk.LIBRARY,"hosted:libraries:sync",this.render),this.listenTo($e.Vk.LIBRARY,"folder:created",this.onFolderCreated)}},{key:"initComponentListeners",value:function(){this.listenTo(this.channelName,"continue",this.onClickContinue),this.listenTo(this.channelName,"cancel:upload",this.cancelUpload),this.listenTo(this.channelName,et.S.FILES_SELECTED,this.onFilesSelected),this.listenTo(this.channelName,"show:new:folder",this.onClickNewFolder),this.listenTo(this.channelName,"get:series",this.onSelectSeries),this.listenTo(this.channelName,"create:series",this.onCreateSeries),this.listenTo(this.channelName,"create:season",this.onCreateSeason),this.listenTo(this.channelName,"create:company",this.onCreateCompany),this.listenTo(this.channelName,"create:person",this.onCreatePerson)}},{key:"initCollectionListeners",value:function(){var e=this.videoUploadService.getCollection();this.listenTo(e,"remove",this.onCollectionChange)}},{key:"initShellListeners",value:function(){this.listenTo(u.G.SHELL,r.Q.EventNames.NAV_UNLOCKED_BY_USER,this.onNavigateAway)}},{key:"cancelUpload",value:function(e){this.logCancelAction(e),this.videoUploadService.cancelUpload(e)}},{key:"onNavigateAway",value:function(){this.logCancelAction(),this.videoUploadService.cancelAllUploads()}},{key:"onCollectionChange",value:function(e,t){t.length||(this.navLockService.unlock(),r.Q.AppLinkHelper.trigger({application:$e.OV.UPLOAD,action:$e.eX.Upload.FILE_SELECTION}))}},{key:"onSelectSeries",value:function(e,t){this.seriesDataService.getSeries(e,t)}},{key:"onCreateSeries",value:function(e,t){this.seriesDataService.createSeries(e,t)}},{key:"onCreateSeason",value:function(e,t,n){this.seriesDataService.createSeason(e,t,n)}},{key:"onCreateCompany",value:function(e,t){this.companyDataService.createCompany(e,t)}},{key:"onCreatePerson",value:function(e,t){this.personDataService.createPerson(e,t)}},{key:"onClickContinue",value:function(){var e,t=this,n=i.Radio.channel(this.channelName),o=this.videoUploadService.getCollection(),u=!0;if(o.each((function(t){var n=l.r.get("upload:".concat(t.get("id")),null,{ctor:E.n});n.validate();var o=n.isValid();!1!==o||e||(e=t.id),u=u&&o})),e&&n.trigger("invalid:".concat(e)),u){n.trigger("start:spinner");var d=[];o.each((function(e){var n=e.get("file"),i=l.r.get("upload:".concat(e.get("id")),null,{ctor:E.n});if(tt.S.hasExpired(i,t.config.get("uploadSessionExpiryTime")))return t.alertService.createAlert({heading:s.T.getPhrase(t.lang,"uploadErrorHeading"),message:s.T.getPhrase(t.lang,"uploadErrorBody",{videoName:i.get("name")}),type:c.NK.Fail}),void o.remove(e);i.set("fileId",n.cvUpload.fileId),i.set("fileSize",n.size),d.push(i)})),this.videoUploadDataService.completeVideoUploads(this.currentUser.get("id"),this.currentUser.get("customerId"),d,(function(){t.navLockService.unlock(),a.u.getInstance($e.K9.PendingItems).forceFetchPendingItems(),a.u.releaseInstance($e.K9.PendingItems),r.Q.AppLinkHelper.trigger({application:$e.OV.UPLOAD,action:d.length?$e.eX.Upload.UPLOAD_COMPLETE:$e.eX.Upload.FILE_SELECTION}),t.logFinishAction(d),t.videoDataService.clearVideoCache()}))}}},{key:"onFilesSelected",value:function(e,t){this.videoUploadService.addFiles(e),this.logStartAction(e,t)}},{key:"onClickNewFolder",value:function(e,t){this.setFolderChannel=t,this.navLockService.unlock(),r.Q.AppLinkHelper.trigger({application:$e.OV.UPLOAD,action:$e.eX.Shared.NEW_FOLDER,args:[e]}),this.lockNav()}},{key:"onFolderCreated",value:function(e){this.setFolderChannel&&(i.Radio.channel(this.setFolderChannel).trigger("new:folder:selected",e),this.render())}},{key:"logStartAction",value:function(e,t){var n=M.k.mergeOptions(this.options.analyticsOptions,{workflowPhase:Ge.WorkflowPhase.Start,descriptor:M.k.mapInteractionType(t)});M.k.logUserAction(e,n)}},{key:"logCancelAction",value:function(e){var t=this.videoUploadService.getCollection();if(t.length){var n=e?t.get(e):t,o=M.k.mergeOptions(this.options.analyticsOptions,{workflowPhase:Ge.WorkflowPhase.Discard,descriptor:e?Ge.OperationDescriptor.Single:Ge.OperationDescriptor.All});M.k.logUserAction(n.toJSON(),o)}}},{key:"logFinishAction",value:function(e){if(e.length){var t=o.map(e,(function(e){return e.toJSON()})),n=M.k.mergeOptions(this.options.analyticsOptions,{workflowPhase:Ge.WorkflowPhase.Complete});M.k.logUserAction(t,n)}}},{key:"fetchData",value:function(){this.ratings=this.ratingsDataService.getAllRatings(),this.hostedLibraries=this.libraryDataService.getLibraries(),this.autoCaptioning=this.settingsDataService.getSetting(this.currentUser.get("customerId"),d.E.AutoCaptioning)}},{key:"renderUploadActions",value:function(){this.showChildView("topActions",new N({uploadChannelName:this.channelName})),this.showChildView("bottomActions",new N({uploadChannelName:this.channelName}))}},{key:"renderVideos",value:function(){var e={collection:this.videoUploadService.getCollection(),ratings:this.ratings,libraries:this.libraries,hostedLibraries:this.hostedLibraries,uploadChannelName:this.channelName,allowAutoCaptioning:this.autoCaptioning.get("value"),hideBroadcastInfo:this.currentUser.get("instanceRegion")===f.b.US};if(this.options.folderId){var t=g.PU.getLibrary(this.options.folderId,this.libraries);t&&(e.folderId=this.options.folderId,e.libraryId=t.get("id"))}var n=new We(e);this.showChildView("videos",n)}},{key:"lockNav",value:function(){this.navLockService.lock({title:s.T.getPhrase(this.lang,"navLockHeading"),text:s.T.getPhrase(this.lang,"navLockBody")})}},{key:"requiredResources",get:function(){return{currentUser:Xe.K.currentUser,libraries:Ze.T.libraries,config:Ye.p.config}}},{key:"onBeforeRender",value:function(){return this.fetchData(),!!this.ratings&&!!this.hostedLibraries&&!!this.autoCaptioning}},{key:"onRender",value:function(){this.lockNav(),this.renderUploadActions(),this.renderVideos()}}])&&ot(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),v}(r.Q.View)},71641:function(e,t,n){"use strict";n.d(t,{w:function(){return d}});var o=n(39479),i=n(31647),r=n(55142);function l(e){return l="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},l(e)}function a(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 s(e,t){return s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},s(e,t)}function c(e,t){if(t&&("object"===l(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 u(e){return u=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},u(e)}var d=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&s(e,t)}(f,e);var t,n,i,l,d=(i=f,l=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=u(i);if(l){var n=u(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return c(this,e)});function f(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,f),d.call(this,e)}return t=f,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 r.N}},{key:"childViewOptions",get:function(){var e={channelName:this.options.channelName,analyticsHelper:this.options.analyticsHelper};return o.extend(e,this.options.childOptions)}},{key:"getExtraClasses",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.alignment,n=void 0===t?"left":t,o=e.extraClasses,i="dropdown-menu-".concat(n);return o&&(i="".concat(i," ").concat(o)),i}},{key:"centerSelectedItem",value:function(){var e=this.$el.find(".active");if(e.length){var t=this.$el.scrollTop()+e.position().top,n=.5*this.$el.height()+.5*e.height();this.$el.scrollTop(t-n)}}}],n&&a(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),f}(i.Q.ComponentCollection)},26357:function(e,t,n){"use strict";n.d(t,{H:function(){return m}});var o=n(39479),i=n(48088),r=n(31647),l=n(71641),a=n(61843),s=n(46635),c=n.n(s),u={dropdownMenu:"oKdKI",selectButton:"fTeoW",disabled:"gZbQ4"};function d(e){return d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},d(e)}function f(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function p(e,t){return p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},p(e,t)}function h(e,t){if(t&&("object"===d(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function y(e){return y=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},y(e)}var m=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&p(e,t)}(m,e);var t,n,r,s,d=(r=m,s=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=y(r);if(s){var n=y(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return h(this,e)});function m(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,m),(t=d.call(this,e)).selectSearch="",t.sameCharIndex=1,t.optionStep=1,t}return t=m,n=[{key:"initialize",value:function(){this.setModel(),this.bindListeners()}},{key:"name",get:function(){return"SelectComponent"}},{key:"template",get:function(){return c()}},{key:"regions",value:function(){return{dropdown:{el:".dropdown-region",replaceElement:!0}}}},{key:"events",value:function(){return{keydown:"onKeydown","shown.bs.dropdown":"onShowDropdown"}}},{key:"defaults",get:function(){return{displayProperty:"name"}}},{key:"elements",get:function(){return{dropdownToggle:".dropdown-toggle"}}},{key:"bindListeners",value:function(){this.listenTo(this.options.channelName,this.options.childOptions.eventName,this.onSelect)}},{key:"onShowDropdown",value:function(){i.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),i.Radio.channel(this.options.channelName).trigger("center:dropdown")}},{key:"onArrowKeyDown",value:function(e){a.yV.getSelected(this.collection)?this.optionStep=1:this.optionStep=0;var t=this.getNextModel(e.keyCode);for(t||(a.yV.deselectAll(this.collection),t=this.getNextModel(e.keyCode));this.isDisabled(t);)this.optionStep++,t=this.getNextModel(e.keyCode);this.onSelect(t)}},{key:"onType",value:function(e){if(1===e.key.toString().length){var t=this.getModelMatch(e);t&&this.onSelect(t),this.runTimer()}}},{key:"onSelect",value:function(e){this.isDisabled(e)||(a.yV.setSelected(e.get("id"),this.collection),this.setModel(),this.getUI("dropdownToggle").text(this.getButtonText()),i.Radio.channel(this.options.channelName).trigger("select:option:selected",e))}},{key:"setModel",value:function(){this.model=a.yV.getSelected(this.collection)}},{key:"getNextModel",value:function(e){var t,n=a.yV.getSelected(this.collection)||this.collection.first(),o=this.collection.indexOf(n);return(t=38===e?this.collection.at(o-this.optionStep):this.collection.at(o+this.optionStep))||(a.yV.deselectAll(this.collection),t=this.collection.first(),this.optionStep=0),t}},{key:"getModelMatch",value:function(e){var t,n=this;return 1===this.selectSearch.length&&this.selectSearch===e.key?t=this.handleSameCharIndex(e.key):(this.selectSearch+=e.key,this.sameCharIndex=1),t||(t=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 i=n[this.sameCharIndex];return i||(i=o.first(n),this.sameCharIndex=0),this.sameCharIndex++,i}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,i=new Array(n>1?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];return(t=this.options.childOptions.isDisabled).call.apply(t,[this,e].concat(i))}},{key:"getButtonText",value:function(){if(this.options.disabled)return this.options.noOptionsText;var e=a.yV.getSelected(this.collection);return e&&e.get(this.options.displayProperty)||this.options.placeholderText}},{key:"viewOptions",value:function(){return{styles:u,inputName:this.options.inputName,disabled:this.options.disabled,placeholderText:this.getButtonText()}}},{key:"onRender",value:function(){this.showChildView("dropdown",new l.w({collection:this.collection,channelName:this.options.channelName,childOptions:o.extend(this.options.childOptions),displayOptions:{extraClasses:"w-100 ".concat(u.dropdownMenu)},analyticsHelper:this.options.analyticsHelper}))}}],n&&f(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),m}(r.Q.Component)},20072:function(e,t,n){"use strict";n.d(t,{Y:function(){return m}});var o=n(48088),i=n(31647),r=n(57857),l=n(50299),a=n(61843),s=n(68979),c=n.n(s),u={selectBtn:"tZUtI",list:"MxlSt",selector:"qHvbU",customItem:"aJzJB"};function d(e){return d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},d(e)}function f(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function p(e,t){return p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},p(e,t)}function h(e,t){if(t&&("object"===d(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function y(e){return y=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},y(e)}var m=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&p(e,t)}(m,e);var t,n,i,s,d=(i=m,s=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=y(i);if(s){var n=y(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return h(this,e)});function m(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,m),d.call(this,e)}return t=m,(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:true,enumerable:!0,configurable:!0,writable:!0}):e[t]=true,e}({},t))}),{})}},{key:"name",get:function(){return"TreeDropdownComponent"}},{key:"template",get:function(){return c()}},{key:"className",get:function(){return"position-relative"}},{key:"lang",get:function(){return"libraryEditor.treeDropdown"}},{key:"regions",value:function(){return{selector:{el:".selector-region",replaceElement:!1}}}},{key:"events",value:function(){return{"click .create-new":"onClickCreateNew"}}},{key:"defaults",get:function(){return{disabledIds:[]}}},{key:"elements",get:function(){return{button:".button-text"}}},{key:"onClickCreateNew",value:function(e){e.preventDefault(),o.Radio.channel(this.options.channelName).trigger("create:folder:clicked")}},{key:"setButtonText",value:function(e,t){if(e&&!t){var n=e.get("name");this.getUI("button").text(n)}else{var o=a.PU.getSelected(this.options.folderTreeKey,this.collection),i=o?o.get("name"):r.T.getPhrase(this.lang,"button");this.getUI("button").text(i)}}},{key:"renderSelector",value:function(){this.showChildView("selector",new l.J({styles:u,collection:this.collection,channelName:this.options.channelName,childrenProperty:"children",folderTreeId:this.options.folderTreeKey,extraClass:u.list,extraClasses:u.list,isSelector:!0,disabledIds:this.disabledIds||{}}))}},{key:"viewOptions",value:function(){return{styles:u,name:this.options.name||this.options.channelName,buttonText:this.buttonText,canCreateNew:this.options.canCreateNew}}},{key:"onRender",value:function(){this.setButtonText(),this.renderSelector()}}])&&f(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),m}(i.Q.Component)},21893:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){return'<div class="dropdown-menu-region"></div>'},useData:!0})},42494:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){return e.propertyIsEnumerable,'<div class="finish-button-region"></div>\r\n<button class="btn btn-outline-dark float-right add-more-videos">'+e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"addMore",{name:"lang",hash:{},data:i}))+"</button>"},useData:!0})},76370:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({1:function(e,t,n,o,i){var r;return e.propertyIsEnumerable,'<span class="'+e.escapeExpression(e.lambda(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.requiredStar:r,t))+'">*</span>'},3:function(e,t,n,o,i){return' <div class="library-select-region form-group col-6"></div>\r\n'},5:function(e,t,n,o,i){return"col-6"},7:function(e,t,n,o,i){return"col-12"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){e.propertyIsEnumerable;var r,l=null!=t?t:e.nullContext||{};return"<h5>"+e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(l,"uploadDestination",{name:"lang",hash:{},data:i}))+(null!=(r=n.if.call(l,null!=(r=null!=(r=null!=t?t.options:t)?r.requiredFields:r)?r.uploadDestination:r,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?r:"")+'</h5>\r\n <div class="container-fluid px-0">\r\n <div class="row">\r\n'+(null!=(r=n.if.call(l,null!=(r=null!=t?t.options:t)?r.hasMultipleLibraries:r,{name:"if",hash:{},fn:e.program(3,i,0),inverse:e.noop,data:i}))?r:"")+' <div class="folder-select-region form-group '+(null!=(r=n.if.call(l,null!=(r=null!=t?t.options:t)?r.hasMultipleLibraries:r,{name:"if",hash:{},fn:e.program(5,i,0),inverse:e.program(7,i,0),data:i}))?r:"")+'"></div>\r\n </div>\r\n </div>\r\n</div>'},useData:!0})},11453:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){e.propertyIsEnumerable;var r,l=null!=t?t:e.nullContext||{},a=e.hooks.helperMissing,s="function",c=e.escapeExpression;return'<div class="progress-bar bg-info" style="width: '+c(typeof(r=null!=(r=n.progress||(null!=t?t.progress:t))?r:a)===s?r.call(l,{name:"progress",hash:{},data:i}):r)+'%" aria-valuenow="'+c(typeof(r=null!=(r=n.progress||(null!=t?t.progress:t))?r:a)===s?r.call(l,{name:"progress",hash:{},data:i}):r)+'" aria-valuemin="0" aria-valuemax="100"></div>'},useData:!0})},42633:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({1:function(e,t,n,o,i){return" on"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){e.propertyIsEnumerable;var r,l=null!=t?t:e.nullContext||{},a=e.hooks.helperMissing,s=e.escapeExpression;return"<h5>"+s((n.lang||t&&t.lang||a).call(l,"heading",{name:"lang",hash:{},data:i}))+'</h5>\r\n<div class="container-fluid">\r\n <div class="row">\r\n <div class="form-group col-6 p-0">\r\n <div class="d-block">\r\n <label>'+s((n.lang||t&&t.lang||a).call(l,"autoCaptioningHeading",{name:"lang",hash:{},data:i}))+'</label>\r\n <div class="custom-toggle toggle-option float-right'+(null!=(r=n.if.call(l,null!=(r=null!=t?t.options:t)?r.isSelected:r,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?r:"")+'"><span class="handle"></span></div>\r\n </div>\r\n <p class=\'mb-0 mr-5\'>'+s((n.lang||t&&t.lang||a).call(l,"autoCaptioningInfo",{name:"lang",hash:{},data:i}))+"</p>\r\n </div>\r\n </div>\r\n</div>\r\n \r\n"},useData:!0})},61778:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){var r;return e.propertyIsEnumerable,e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"uploading",{name:"lang",hash:{percentage:null!=(r=null!=t?t.options:t)?r.percentage:r},data:i}))},useData:!0})},47381:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){var r;return e.propertyIsEnumerable,e.escapeExpression(e.lambda(null!=(r=null!=t?t.options:t)?r.name:r,t))},useData:!0})},63105:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({1:function(e,t,n,o,i){var r;return e.propertyIsEnumerable,'<div class="p-2 text-center border-top">\r\n <button class="add-advanced-metadata btn btn-link">'+(null!=(r=n.if.call(null!=t?t:e.nullContext||{},null!=(r=null!=t?t.options:t)?r.showAdvanced:r,{name:"if",hash:{},fn:e.program(2,i,0),inverse:e.program(4,i,0),data:i}))?r:"")+"</a>\r\n</div>\r\n"},2:function(e,t,n,o,i){return e.propertyIsEnumerable,e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"hideMetadata",{name:"lang",hash:{},data:i}))},4:function(e,t,n,o,i){return e.propertyIsEnumerable,e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"addMetadata",{name:"lang",hash:{},data:i}))},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){e.propertyIsEnumerable;var r,l,a=e.escapeExpression,s=null!=t?t:e.nullContext||{},c=e.hooks.helperMissing;return'<div class="upload-title-region"></div>\r\n<div class="container-fluid">\r\n <div class="row">\r\n <div class="col-4 p-3">\r\n <div class="thumbnail-region"></div>\r\n <div class="upload-progress-region"></div>\r\n <div class="my-3">\r\n <h5 class="'+a(e.lambda(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.title:r,t))+'">'+a("function"==typeof(l=null!=(l=n.name||(null!=t?t.name:t))?l:c)?l.call(s,{name:"name",hash:{},data:i}):l)+'</h5>\r\n <div class="text-progress-region"></div>\r\n <button class="btn btn-outline-dark cancel-upload">'+a((n.lang||t&&t.lang||c).call(s,"cancel",{name:"lang",hash:{},data:i}))+'</button>\r\n </div>\r\n\r\n </div>\r\n <div class="col-8 py-3 pr-3">\r\n <div class="video-details-region"></div>\r\n <div class="folder-select-region"></div>\r\n <div class="additional-info-region"></div>\r\n <div class="production-info-region"></div>\r\n <div class="video-options-region"></div>\r\n </div>\r\n </div>\r\n</div>\r\n'+(null!=(r=n.if.call(s,null!=(r=null!=t?t.options:t)?r.showExpand:r,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?r:"")},useData:!0})},35250:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){return'<div class="top-actions-region"></div>\r\n<div class="videos-region"></div>\r\n<div class="bottom-actions-region"></div>'},useData:!0})},46635:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({1:function(e,t,n,o,i){var r;return e.propertyIsEnumerable,e.escapeExpression(e.lambda(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.disabled:r,t))},3:function(e,t,n,o,i){return" disabled"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){e.propertyIsEnumerable;var r,l=e.lambda,a=e.escapeExpression,s=null!=t?t:e.nullContext||{};return'<button \r\n class="dropdown-toggle form-control btn-block text-left position-relative '+a(l(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.selectButton:r,t))+" "+(null!=(r=n.if.call(s,null!=(r=null!=t?t.options:t)?r.disabled:r,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?r:"")+'" \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!=(r=n.if.call(s,null!=(r=null!=t?t.options:t)?r.disabled:r,{name:"if",hash:{},fn:e.program(3,i,0),inverse:e.noop,data:i}))?r:"")+' \r\n name="'+a(l(null!=(r=null!=t?t.options:t)?r.inputName:r,t))+'"\r\n >\r\n '+a(l(null!=(r=null!=t?t.options:t)?r.placeholderText:r,t))+'\r\n</button>\r\n<div class="dropdown-region"></div>\r\n<div class="form-feedback"></div>'},useData:!0})},68979:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({1:function(e,t,n,o,i){e.propertyIsEnumerable;var r,l=e.escapeExpression;return' <button class="create-new btn font-weight-bold rounded-0 w-100 text-left '+l(e.lambda(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.customItem:r,t))+'">'+l((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"createNew",{name:"lang",hash:{},data:i}))+"</button>\r\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){e.propertyIsEnumerable;var r,l=e.lambda,a=e.escapeExpression;return'<button\r\n class="'+a(l(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.selectBtn:r,t))+' custom-select form-control"\r\n data-toggle="dropdown"\r\n aria-haspopup="true"\r\n aria-expanded="false"\r\n name='+a(l(null!=(r=null!=t?t.options:t)?r.name:r,t))+'\r\n>\r\n <span class="d-block text-truncate button-text">\r\n '+a(l(null!=(r=null!=t?t.options:t)?r.buttonText:r,t))+'\r\n </span>\r\n</button>\r\n<div class="dropdown-menu '+a(l(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.selector:r,t))+'">\r\n <div class="selector-region"></div>\r\n'+(null!=(r=n.if.call(null!=t?t:e.nullContext||{},null!=(r=null!=t?t.options:t)?r.canCreateNew:r,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?r:"")+'</div>\r\n<div class="form-feedback"></div>'},useData:!0})}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[9695],{49695:function(e,t,n){"use strict";n.r(t),n.d(t,{UploadCompleteView:function(){return m}});var r=n(31647),o=n(21679),i=n(27169),l=n.n(i),a=n(
|
|
1
|
+
(self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[9695],{49695:function(e,t,n){"use strict";n.r(t),n.d(t,{UploadCompleteView:function(){return m}});var r=n(31647),o=n(21679),i=n(27169),l=n.n(i),a=n(30305),u=n(57857),c={completeImage:"TcxNH"};function p(e){return p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},p(e)}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function f(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function y(e,t){return y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},y(e,t)}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 d(e){return d=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},d(e)}var m=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&y(e,t)}(m,e);var t,n,r,i,p=(r=m,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=d(r);if(i){var n=d(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return b(this,e)});function m(){return s(this,m),p.apply(this,arguments)}return t=m,(n=[{key:"initialize",value:function(){this.videoUploadService=o.u.getInstance(a.K9.VideoUpload,this)}},{key:"name",get:function(){return"UploadCompleteView"}},{key:"title",get:function(){return u.T.getPhrase(this.lang,"title")}},{key:"lang",get:function(){return"upload.uploadComplete"}},{key:"template",get:function(){return l()}},{key:"className",get:function(){return"p-3 my-3 bg-white rounded text-center"}},{key:"appLinks",get:function(){return{".back-to-library-applink":{application:a.OV.LIBRARY_EDITOR,action:a.eX.LibraryEditor.HOME}}}},{key:"viewOptions",value:function(){return{styles:c,count:this.videoUploadService.getCollection().length,imageUrl:a.Wn.Shared.SUCCESS}}},{key:"onBeforeDestroy",value:function(){this.videoUploadService.getCollection().reset()}}])&&f(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),m}(r.Q.View)},27169:function(e,t,n){var r=n(32227);e.exports=(r.default||r).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){e.propertyIsEnumerable;var i,l=null!=t?t:e.nullContext||{},a=e.hooks.helperMissing,u=e.escapeExpression,c=e.lambda;return"<h1>"+u((n.lang||t&&t.lang||a).call(l,"inLibrary",{name:"lang",hash:{smartCount:null!=(i=null!=t?t.options:t)?i.count:i},data:o}))+'</h1>\r\n<div class="my-3">\r\n <img src='+u(c(null!=(i=null!=t?t.options:t)?i.imageUrl:i,t))+' class="'+u(c(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.completeImage:i,t))+' my-4 img-fluid"/>\r\n</div>\r\n<p>'+u((n.lang||t&&t.lang||a).call(l,"isProcessing",{name:"lang",hash:{smartCount:null!=(i=null!=t?t.options:t)?i.count:i},data:o}))+'</p>\r\n<a class="back-to-library-applink btn btn-dark">'+u((n.lang||t&&t.lang||a).call(l,"back",{name:"lang",hash:{},data:o}))+"</a>"},useData:!0})}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[9927],{67670:function(e,t,n){"use strict";n.d(t,{v:function(){return p}});var r=n(31647),o=n(88172);function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function l(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function 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 u(e,t){return u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},u(e,t)}function s(e,t){if(t&&("object"===i(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function f(e){return f=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},f(e)}var p=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&u(e,t)}(h,e);var t,n,r,i,p=(r=h,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=f(r);if(i){var n=f(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return s(this,e)});function h(){return a(this,h),p.apply(this,arguments)}return t=h,(n=[{key:"defaults",value:function(){var e;return l(e={},o.ZV.Disabled,!0),l(e,o.ZV.Hidden,!1),e}}])&&c(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),h}(r.Q.Model)},79927:function(e,t,n){"use strict";n.r(t),n.d(t,{DownloadToLocalCacheView:function(){return w}});var r=n(21679),o=n(57857),i=n(31647),l=n(10101),a=n(88172),c=n(9484),u=n(
|
|
1
|
+
(self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[9927],{67670:function(e,t,n){"use strict";n.d(t,{v:function(){return p}});var r=n(31647),o=n(88172);function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function l(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function 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 u(e,t){return u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},u(e,t)}function s(e,t){if(t&&("object"===i(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function f(e){return f=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},f(e)}var p=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&u(e,t)}(h,e);var t,n,r,i,p=(r=h,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=f(r);if(i){var n=f(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return s(this,e)});function h(){return a(this,h),p.apply(this,arguments)}return t=h,(n=[{key:"defaults",value:function(){var e;return l(e={},o.ZV.Disabled,!0),l(e,o.ZV.Hidden,!1),e}}])&&c(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),h}(r.Q.Model)},79927:function(e,t,n){"use strict";n.r(t),n.d(t,{DownloadToLocalCacheView:function(){return w}});var r=n(21679),o=n(57857),i=n(31647),l=n(10101),a=n(88172),c=n(9484),u=n(30305),s=n(67670),f=n(61843),p=n(16317),h=n(9231),d=n.n(h),y={image:"wnpu5"};function b(e){return b="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},b(e)}function g(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function m(e,t){return m=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},m(e,t)}function v(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 C(e){return C=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},C(e)}var w=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&m(e,t)}(O,e);var t,n,h,b,w=(h=O,b=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=C(h);if(b){var n=C(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return v(this,e)});function O(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,O),w.call(this,e)}return t=O,(n=[{key:"initialize",value:function(){this.localCacheDataService=r.u.getInstance(u.Or.LocalCache,this),this.bindListeners()}},{key:"name",get:function(){return"DownloadToLocalCacheView"}},{key:"title",get:function(){return o.T.getPhrase(this.lang,"title")}},{key:"lang",get:function(){return"shared.downloadToLocalCache"}},{key:"template",get:function(){return d()}},{key:"channelName",get:function(){return f.N0.generateUniqueChannelName(this)}},{key:"behaviors",get:function(){return this.spinnerModel=new s.v,[{behaviorClass:l.Yw,title:o.T.getPhrase(this.lang,"popupHeading"),spinnerButtonOptions:this.getSpinnerButtonOptions}]}},{key:"bindListeners",value:function(){var e=this;this.listenTo(u.Vk.USER,"".concat(u.M_.CURRENT_USER,":sync"),this.render),this.listenTo(u.Vk.LOCAL_CACHE,"".concat(u.M_.LOCAL_CACHE_DEVICES,":sync"),this.render),this.listenTo(u.Vk.LOCAL_CACHE,"".concat(u.M_.LOCAL_CACHE_DOWNLOADS,":").concat(this.options.videoId,":sync"),this.render),this.listenTo(u.Vk.LOCAL_CACHE,"".concat(u.M_.ADD_VIDEO_TO_LOCAL_CACHE,":sync"),(function(){return e.triggerMethod("hide")})),this.listenTo(u.Vk.LOCAL_CACHE,"".concat(u.M_.ADD_VIDEO_TO_LOCAL_CACHE,":error"),(function(){return e.triggerMethod("hide")}))}},{key:"getSpinnerButtonOptions",value:function(){var e=this;if(!this.localCacheDownloads||!this.localCacheDownloads.length)return{model:this.spinnerModel,channelName:this.channelName,buttonText:o.T.getPhrase(this.lang,"buttonText"),onClick:function(){return e.onClickAddToLocalCache()}}}},{key:"onClickAddToLocalCache",value:function(){this.spinnerModel.set(a.ZV.ShowSpinner,!0),this.localCacheDataService.downloadVideoToLocalCache(this.model.get("deviceId"),this.options.videoId)}},{key:"requiredResources",get:function(){return{currentUser:c.K.currentUser}}},{key:"onBeforeRender",value:function(){var e=this.localCacheDataService.getDevices(this.currentUser.get("customerId"));return this.localCacheDownloads=this.localCacheDataService.getDownloadsForVideos([this.options.videoId]),!(e&&this.localCacheDownloads&&(this.model=f.o8.getNewestDeviceUserCanManage(e,this.currentUser.get("customerId")),this.model?(this.spinnerModel.set(a.ZV.Disabled,!1),0):(setTimeout((function(){return i.Q.ErrorHelper.throw(new p.HH)}),0),1)))}},{key:"viewOptions",value:function(){return{styles:y,dataFetched:!!this.model&&!!this.localCacheDownloads,spinnerEl:f.Kp.getSpinner({size:f.Ey.Large,extraClasses:"mx-auto"}),alreadyDownloaded:this.localCacheDownloads&&this.localCacheDownloads.length,imageUrl:u.Wn.Shared.LOCAL_CACHE}}}])&&g(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),O}(i.Q.View)},9231:function(e,t,n){var r=n(32227);e.exports=(r.default||r).template({1:function(e,t,n,r,o){var i;return e.propertyIsEnumerable,(null!=(i=e.lambda(null!=(i=null!=t?t.options:t)?i.spinnerEl:i,t))?i:"")+"\r\n"},3:function(e,t,n,r,o){var i;return e.propertyIsEnumerable,null!=(i=n.unless.call(null!=t?t:e.nullContext||{},null!=(i=null!=t?t.options:t)?i.alreadyDownloaded:i,{name:"unless",hash:{},fn:e.program(4,o,0),inverse:e.program(6,o,0),data:o}))?i:""},4:function(e,t,n,r,o){e.propertyIsEnumerable;var i,l=null!=t?t:e.nullContext||{},a=e.hooks.helperMissing,c=e.escapeExpression,u=e.lambda;return'<p class="mb-3"><strong>'+c((n.lang||t&&t.lang||a).call(l,"description",{name:"lang",hash:{},data:o}))+'</strong></p>\r\n<img class="img-fluid '+c(u(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.image:i,t))+' mb-3" src="'+c(u(null!=(i=null!=t?t.options:t)?i.imageUrl:i,t))+'" />\r\n<p>'+c((n.lang||t&&t.lang||a).call(l,"nextStep",{name:"lang",hash:{},data:o}))+"</p>\r\n"},6:function(e,t,n,r,o){return e.propertyIsEnumerable,'<p class="m-0">'+e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"alreadyAdded",{name:"lang",hash:{},data:o}))+"</p>\r\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var i;return e.propertyIsEnumerable,null!=(i=n.unless.call(null!=t?t:e.nullContext||{},null!=(i=null!=t?t.options:t)?i.dataFetched:i,{name:"unless",hash:{},fn:e.program(1,o,0),inverse:e.program(3,o,0),data:o}))?i:""},useData:!0})}}]);
|