mirror of
https://github.com/mediacms-io/mediacms.git
synced 2024-11-28 19:23:33 +01:00
1 line
43 KiB
JavaScript
1 line
43 KiB
JavaScript
!function(){"use strict";var e={6861:function(e,t,i){var a=i(9087),n=(i(5101),i(6394),i(3080),i(4669),i(5466)),o=(i(6116),i(4426)),s=i(8349);i(6010),i(775),i(8787),i(8024);n.PureComponent,i(9751),i(2322),i(3296),i(9808);i(137),i(6912);o.Z.get("config-theme").switch.enabled&&o.Z.get("config-theme").switch.position;var r=[];o.Z.get("config-enabled").pages.history&&o.Z.get("config-enabled").pages.history.enabled&&r.push({link:o.Z.get("url-history"),icon:"history",text:o.Z.get("config-enabled").pages.history.title}),o.Z.get("config-user").can.likeMedia&&o.Z.get("config-enabled").pages.liked&&o.Z.get("config-enabled").pages.liked.enabled&&r.push({link:o.Z.get("url-liked-media"),icon:"thumb_up",text:o.Z.get("config-enabled").pages.liked.title});var l=[{page:"home",itemType:"link",link:o.Z.get("url-home"),icon:"home",iconPos:"left",text:"Home"}];o.Z.get("config-enabled").pages.featured&&o.Z.get("config-enabled").pages.featured.enabled&&l.push({page:"featured-media",itemType:"link",link:o.Z.get("url-featured-media"),icon:"star",iconPos:"left",text:o.Z.get("config-enabled").pages.featured.title}),o.Z.get("config-enabled").pages.recommended&&o.Z.get("config-enabled").pages.recommended.enabled&&l.push({page:"recommended-media",itemType:"link",link:o.Z.get("url-recommended-media"),icon:"done_outline",iconPos:"left",text:o.Z.get("config-enabled").pages.recommended.title}),o.Z.get("config-enabled").pages.latest&&o.Z.get("config-enabled").pages.latest.enabled&&l.push({page:"latest-media",itemType:"link",link:o.Z.get("url-latest-media"),icon:"new_releases",iconPos:"left",text:o.Z.get("config-enabled").pages.latest.title}),o.Z.get("config-enabled").taxonomies.tags&&o.Z.get("config-enabled").taxonomies.tags.enabled&&l.push({page:"tags",itemType:"link",link:o.Z.get("url-tags"),icon:"local_offer",iconPos:"left",text:o.Z.get("config-enabled").taxonomies.tags.title}),o.Z.get("config-enabled").taxonomies.categories&&o.Z.get("config-enabled").taxonomies.categories.enabled&&l.push({page:"categories",itemType:"link",link:o.Z.get("url-categories"),icon:"list_alt",iconPos:"left",text:o.Z.get("config-enabled").taxonomies.categories.title}),o.Z.get("config-enabled").taxonomies.topics&&o.Z.get("config-enabled").taxonomies.topics.enabled&&l.push({page:"topics",itemType:"link",link:o.Z.get("url-topics"),icon:"topic",iconPos:"left",text:o.Z.get("config-enabled").taxonomies.topics.title}),o.Z.get("config-enabled").taxonomies.languages&&o.Z.get("config-enabled").taxonomies.languages.enabled&&l.push({page:"languages",itemType:"link",link:o.Z.get("url-languages"),icon:"language",iconPos:"left",text:o.Z.get("config-enabled").taxonomies.languages.title}),o.Z.get("config-enabled").taxonomies.countries&&o.Z.get("config-enabled").taxonomies.countries.enabled&&l.push({page:"countries",itemType:"link",link:o.Z.get("url-countries"),icon:"public",iconPos:"left",text:o.Z.get("config-enabled").taxonomies.countries.title}),o.Z.get("config-enabled").pages.members&&o.Z.get("config-enabled").pages.members.enabled&&l.push({page:"members",itemType:"link",link:o.Z.get("url-members"),icon:"people",iconPos:"left",text:o.Z.get("config-enabled").pages.members.title});n.PureComponent;var d=i(9518),c=i(2276),u=i(8416),p=i.n(u);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,t){for(var i=0;i<t.length;i++){var a=t[i];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}function f(e,t){return(f=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function y(e,t){return!t||"object"!==h(t)&&"function"!=typeof t?b(e):t}function b(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function v(e){return(v=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}!function(e,t){if(void 0!==t){var i=document.getElementById(e);null!==i&&a.Z.display(i,t,{},e)}}("page-embed",function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&f(e,t)}(l,e);var t,i,a,o,r=(a=l,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=v(a);if(o){var i=v(this).constructor;e=Reflect.construct(t,arguments,i)}else e=t.apply(this,arguments);return y(this,e)});function l(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l),t=r.call(this,e),s.df("embed"),t.state={loadedVideo:!1,loadedAudio:!1,loadedImage:!1,failedMediaLoad:!1},t.onLoadedVideoData=t.onLoadedVideoData.bind(b(t)),t.onLoadedAudioData=t.onLoadedAudioData.bind(b(t)),t.onLoadedImageData=t.onLoadedImageData.bind(b(t)),t.onMediaLoadError=t.onMediaLoadError.bind(b(t)),c.Z.on("loaded_video_data",t.onLoadedVideoData),c.Z.on("loaded_audio_data",t.onLoadedAudioData),c.Z.on("loaded_image_data",t.onLoadedImageData),c.Z.on("loaded_media_error",t.onMediaLoadError),t}return t=l,(i=[{key:"componentDidMount",value:function(){p().dispatch({type:"LOAD_MEDIA_DATA"})}},{key:"onLoadedVideoData",value:function(){this.setState({loadedVideo:!0})}},{key:"onLoadedAudioData",value:function(){this.setState({loadedAudio:!0})}},{key:"onLoadedImageData",value:function(){this.setState({loadedImage:!0})}},{key:"onMediaLoadError",value:function(){this.setState({failedMediaLoad:!0})}},{key:"render",value:function(){return n.createElement("div",{className:"embed-wrap"},this.state.failedMediaLoad?n.createElement("div",{className:"player-container player-container-error"},n.createElement("div",{className:"player-container-inner"},n.createElement("div",{className:"error-container"},n.createElement("div",{className:"error-container-inner"},n.createElement("span",{className:"icon-wrap"},n.createElement("i",{className:"material-icons"},"error_outline")),n.createElement("span",{className:"msg-wrap"},c.Z.get("media-load-error-message")))))):null,this.state.loadedVideo?n.createElement(d.Z,{data:c.Z.get("media-data")}):null)}}])&&m(t.prototype,i),l}(n.PureComponent))},9450:function(e,t,i){i(7441),i(9751),i(6394),i(4669);var a=i(2186);function n(e,t){for(var i=0;i<t.length;i++){var a=t[i];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}var o={},s=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),o[Object.defineProperty(this,"id",{value:"MediaDurationInfo_"+Object.keys(o).length}).id]={fn:{infoToString:function(e){return e<10?"0"+e:e}}},(0,a.ZU)(t)&&this.update(t)}var t,i;return t=e,(i=[{key:"update",value:function(e){o[this.id].toString=void 0,o[this.id].ariaLabel=void 0,(0,a.ZU)(e)&&(o[this.id].days=Math.floor(e/86400),o[this.id].seconds=e%86400,o[this.id].date=o[this.id].seconds?new Date(1e3*o[this.id].seconds):null,o[this.id].hours=o[this.id].date?24*o[this.id].days+o[this.id].date.getUTCHours():0,o[this.id].minutes=o[this.id].date?o[this.id].date.getUTCMinutes():0,o[this.id].seconds=o[this.id].date?o[this.id].date.getSeconds():0)}},{key:"toString",value:function(){return void 0===o[this.id].toString&&(o[this.id].toString=(0<o[this.id].hours?o[this.id].hours+":":"")+(0<o[this.id].hours&&10>o[this.id].minutes?"0":"")+o[this.id].minutes+":"+o[this.id].fn.infoToString(o[this.id].seconds)),o[this.id].toString}},{key:"ariaLabel",value:function(){if(void 0===o[this.id].ariaLabel){var e=[];0<o[this.id].hours&&e.push(o[this.id].hours+" hours"),0<o[this.id].minutes&&e.push(o[this.id].minutes+" minutes"),0<o[this.id].seconds&&e.push(o[this.id].seconds+" seconds"),o[this.id].ariaLabel=e.join(", ")}return o[this.id].ariaLabel}},{key:"ISO8601",value:function(){return"P0Y0M0DT"+o[this.id].hours+"H"+o[this.id].minutes+"M"+o[this.id].seconds+"S"}}])&&n(t.prototype,i),e}();t.Z=s},1395:function(e,t,i){function a(e,t,i){return e.scrollLeft?1+Math.ceil(e.scrollLeft/t):i}function n(e,t){void 0!==e&&(this.data={dom:{wrapper:e,firstItem:e.querySelector(t)},item:{width:null}},this.data.item.width=this.data.dom.firstItem.offsetWidth,this.state={initedAllStateValues:!1,currentSlide:1,maxSlideIndex:null,slideItemsFit:null,slideItems:null,totalItems:null,wrapper:{width:null,scrollWidth:null}})}i.d(t,{Z:function(){return n}}),n.prototype.updateDataStateOnResize=function(e,t){this.data.item.width=this.data.dom.firstItem.offsetWidth,this.state.wrapper.width=this.data.dom.wrapper.offsetWidth,this.state.wrapper.scrollWidth=this.data.dom.wrapper.scrollWidth,this.state.slideItemsFit=Math.floor(this.state.wrapper.width/this.data.item.width),this.state.slideItems=Math.max(1,this.state.slideItemsFit),t&&this.state.slideItems<=this.state.slideItems&&(this.state.itemsLengthFit=this.state.slideItems),this.state.totalItems=e,this.state.maxSlideIndex=Math.max(this.state.totalItems-this.state.slideItemsFit+1),this.state.currentSlide=Math.min(this.state.currentSlide,this.state.maxSlideIndex||1)},n.prototype.updateDataState=function(e,t,i){!i&&this.state.initedAllStateValues||(this.state.initedAllStateValues=!0,this.state.wrapper.width=this.data.dom.wrapper.offsetWidth,this.state.wrapper.scrollWidth=this.data.dom.wrapper.scrollWidth,this.state.slideItemsFit=Math.floor(this.state.wrapper.width/this.data.item.width),this.state.slideItems=Math.max(1,this.state.slideItemsFit),t&&this.state.slideItems<=this.state.slideItems&&(this.state.itemsLengthFit=this.state.slideItems)),this.state.totalItems=e,this.state.maxSlideIndex=Math.max(1,this.state.totalItems-this.state.slideItemsFit+1),this.state.currentSlide=Math.min(this.state.currentSlide,this.state.maxSlideIndex)},n.prototype.nextSlide=function(){this.state.currentSlide=Math.min(a(this.data.dom.wrapper,this.data.item.width,this.state.currentSlide)+this.state.slideItems,this.state.maxSlideIndex)},n.prototype.previousSlide=function(){this.state.currentSlide=Math.max(1,a(this.data.dom.wrapper,this.data.item.width,this.state.currentSlide)-this.state.slideItems)},n.prototype.scrollToCurrentSlide=function(){this.data.dom.wrapper.scrollLeft=this.data.item.width*(this.state.currentSlide-1)},n.prototype.hasNextSlide=function(){return this.state.currentSlide<this.state.maxSlideIndex},n.prototype.hasPreviousSlide=function(){return 1<this.state.currentSlide},n.prototype.currentSlide=function(){return this.state.currentSlide},n.prototype.loadItemsToFit=function(){return 2*this.state.slideItemsFit>this.state.totalItems},n.prototype.loadMoreItems=function(){return this.state.currentSlide+this.state.slideItemsFit>=this.state.maxSlideIndex},n.prototype.itemsFit=function(){return this.state.slideItemsFit}},792:function(e,t,i){i.d(t,{KC:function(){return r},RA:function(){return l},$e:function(){return d}}),i(7228),i(9751),i(2322),i(9268);var a=i(4426),n=i(9688),o=["hls","h265","vp9","h264","vp8","mp4","theora"];function s(e,t){var i=null,a=document.createElement("video");if(a.canPlayType)try{switch(e){case"hls":i=!0;break;case"h265":i="probably"===a.canPlayType('video/mp4; codecs="hvc1.1.L0.0"')||"probably"===a.canPlayType('video/mp4; codecs="hev1.1.L0.0"');break;case"h264":i="probably"===a.canPlayType('video/mp4; codecs="avc1.42E01E"')||"probably"===a.canPlayType('video/mp4; codecs="avc1.42E01E, mp4a.40.2"');break;case"vp9":i="probably"===a.canPlayType('video/webm; codecs="vp9"');break;case"vp8":i="probably"===a.canPlayType('video/webm; codecs="vp8, vorbis"');break;case"theora":i="probably"===a.canPlayType('video/ogg; codecs="theora"');break;case"mp4":i=!0}if(t=(t instanceof Boolean||0===t||1==t)&&t){if("no"===a.canPlayType("video/nonsense")&&console.warn('BUGGY: Codec detection bug in Firefox 3.5.0 - 3.5.1 and Safari 4.0.0 - 4.0.4 that answer "no" to unknown codecs instead of an empty string'),"probably"===a.canPlayType("video/webm")&&console.warn('BUGGY: Codec detection bug that Firefox 27 and earlier always says "probably" when asked about WebM, even when the codecs string is not present'),"maybe"===a.canPlayType('video/mp4; codecs="avc1.42E01E"'))switch(a.canPlayType("video/mp4")){case"probably":console.warn('BUGGY: Codec detection bug in iOS 4.1 and earlier that switches "maybe" and "probably" around');break;case"maybe":console.warn('BUGGY: Codec detection bug in Android where no better answer than "maybe" is given')}"probably"===a.canPlayType('video/mp4; codecs="avc1.42E01E, mp4a.40.2"')&&"probably"!==a.canPlayType('video/mp4; codecs="avc1.42E01E"')&&console.warn("BUGGY: Codec detection bug in Internet Explorer 9 that requires both audio and video codec on test")}}catch(e){console.warn(e)}return i}function r(e){var t=[],i={},a=document.createElement("video");return a.canPlayType&&(i.hls=!0,t.push("hls"),(a.canPlayType('video/mp4; codecs="hvc1.1.L0.0"')||"probably"===a.canPlayType('video/mp4; codecs="hev1.1.L0.0"'))&&(i.h265=!0,t.push("h265")),"probably"===a.canPlayType('video/mp4; codecs="avc1.42E01E"')&&(i.h264=!0,t.push("h264")),"probably"===a.canPlayType('video/webm; codecs="vp9"')&&(i.vp9=!0,t.push("vp9")),e&&("probably"===a.canPlayType('video/webm; codecs="vp8, vorbis"')&&(i.vp8=!0,t.push("vp8")),"probably"===a.canPlayType('video/ogg; codecs="theora"')&&(i.theora=!0,t.push("theora"))),"probably"===a.canPlayType('video/mp4; codecs="mp4v.20.8"')&&(i.mp4=!0,t.push("mp4"))),{order:t,support:i}}function l(e,t,i){var l,d,c,u={};i=void 0===i?r():i;var p={hls:["m3u8"],h265:["mp4","webm"],h264:["mp4","webm"],vp9:["mp4","webm"],vp8:["mp4","webm"],theora:["ogg"],mp4:["mp4"]};for(l in t)t.hasOwnProperty(l)&&(d=null,null!==(d="master_file"===l?"Auto":2===(d=l.split("_playlist")).length?d[0]:null)&&(u[d]=void 0===u[d]?{format:[],url:[]}:u[d],u[d].format.push("hls"),u[d].url.push((0,n.U)(t[l],a.Z.get("config-site").url))));for(d in e)if(e.hasOwnProperty(d)&&Object.keys(e[d]).length&&(1080>=parseInt(d,10)||1080<window.screen.width&&1080<window.screen.height))for(l=0;l<o.length;)void 0!==e[d][o[l]]&&s(o[l],!1)&&e[d][o[l]]&&e[d][o[l]].url&&(100!==e[d][o[l]].progress&&console.warn("VIDEO DEBUG:","PROGRESS value is",e[d][o[l]].progress),"success"!==e[d][o[l]].status&&console.warn("VIDEO DEBUG:","STATUS value is",e[d][o[l]].status),(c=e[d][o[l]].url.split(".")).length&&0<=p[o[l]].indexOf(c[c.length-1])&&(u[d]=void 0===u[d]?{format:[],url:[]}:u[d],u[d].format.push(o[l]),u[d].url.push((0,n.U)(e[d][o[l]].url,a.Z.get("config-site").url)))),l+=1;return u}function d(e,t){var i,a=Object.keys(t);if(void 0!==t[e])return e;if(parseInt(e,10)>=parseInt(a[a.length-1],10))return a[a.length-1];if(parseInt(e,10)<=parseInt(a[0],10))return a[0];for(i=a.length-1;i>=0;){if(parseInt(e,10)>=parseInt(a[i],10))return a[i+1];i-=1}}},6912:function(e,t,i){i.d(t,{Z:function(){return v}}),i(5101),i(6394),i(3080),i(4669),i(9808);var a=i(5466),n=(i(6116),i(3074)),o=i.n(n),s=i(7448);function r(e){return(r="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(){return(l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(e[a]=i[a])}return e}).apply(this,arguments)}function d(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){for(var i=0;i<t.length;i++){var a=t[i];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}function u(e,t,i){return t&&c(e.prototype,t),i&&c(e,i),e}function p(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&h(e,t)}function h(e,t){return(h=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function m(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 Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,a=y(e);if(t){var n=y(this).constructor;i=Reflect.construct(a,arguments,n)}else i=a.apply(this,arguments);return f(this,i)}}function f(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function y(e){return(y=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var b=function(e){p(i,e);var t=m(i);function i(e){var n;d(this,i);var o=(n=t.call(this,e)).props.text?n.props.icon&&"right"!==n.props.iconPos?1:0:-1,r=n.props.icon?n.props.text&&"right"===n.props.iconPos?1:0:-1;switch(n.itemAttr=n.props.itemAttr||{},n.children=[],n.className=void 0!==n.itemAttr.className?n.itemAttr.className+" ":"",n.itemAttr.className,-1<o&&(n.children[o]=a.createElement("span",{key:"Text"},n.props.text)),-1<r&&(n.children[r]=a.createElement("span",{key:"Icon",className:"right"===n.props.iconPos?"menu-item-icon-right":"menu-item-icon"},a.createElement(s.Z,{type:n.props.icon}))),n.props.itemType){case"link":n.children=a.createElement("a",l({},n.props.linkAttr||{},{href:n.props.link,title:n.props.text||null}),n.children),n.className+="link-item"+(n.props.active?" active":"");break;case"button":case"open-subpage":n.children=a.createElement("button",l({},n.props.buttonAttr||{},{key:"button"}),n.children);break;case"label":n.children=a.createElement("button",l({},n.props.buttonAttr||{},{key:"button"}),a.createElement("span",null,n.props.text||null)),n.className="label-item";break;case"div":n.children=a.createElement("div",l({},n.props.divAttr||{},{key:"div"}),n.props.text||null)}return n.className=void 0!==n.className?" "+n.className:"",n}return u(i,[{key:"render",value:function(){return a.createElement("li",l({},this.itemAttr,{className:this.className}),this.children)}}]),i}(a.PureComponent),v=function(e){p(i,e);var t=m(i);function i(){return d(this,i),t.apply(this,arguments)}return u(i,[{key:"render",value:function(){for(var e=0,t=[];e<this.props.items.length;)t.push(a.createElement(b,l({key:e},this.props.items[e]))),e+=1;return t.length?a.createElement("div",{className:"nav-menu"+(this.props.removeVerticalPadding?" pv0":"")},a.createElement("nav",null,a.createElement("ul",null,t))):null}}]),i}(a.PureComponent);b.defaultProps={itemType:"link",iconPos:"left",active:!1},b.propTypes={itemType:o().oneOf(["link","open-subpage","button","label","div"]),link:o().string,icon:o().string,iconPos:o().oneOf(["left","right"]),text:o().string,active:o().bool,divAttr:o().object,buttonAttr:o().object,itemAttr:o().object,linkAttr:o().object},v.defaultProps={removeVerticalPadding:!1},v.propTypes={removeVerticalPadding:o().bool,items:o().arrayOf(o().shape(b.propTypes)).isRequired}},915:function(e,t,i){i.d(t,{Y:function(){return b}}),i(717),i(5101),i(6394),i(3080),i(4669);var a=i(5466),n=(i(6116),i(3074)),o=i.n(n),s=i(920),r=i.n(s),l=i(4426),d=i(4860),c=i(9688);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 p(e,t){for(var i=0;i<t.length;i++){var a=t[i];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}function h(e,t){return(h=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function m(e,t){return!t||"object"!==u(t)&&"function"!=typeof t?f(e):t}function f(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function y(e){return(y=Object.setPrototypeOf?Object.getPrototypeOf: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}}),t&&h(e,t)}(u,e);var t,i,n,o,s=(n=u,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=y(n);if(o){var i=y(this).constructor;e=Reflect.construct(t,arguments,i)}else e=t.apply(this,arguments);return m(this,e)});function u(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,u),(t=s.call(this,e)).player=null,t.initPlayer=t.initPlayer.bind(f(t)),t.unsetPlayer=t.unsetPlayer.bind(f(t)),t.onClickNext=t.onClickNext.bind(f(t)),t.onClickPrevious=t.onClickPrevious.bind(f(t)),t.onPlayerStateUpdate=t.onPlayerStateUpdate.bind(f(t));var i=new d.Z(l.Z.get("config-site").id,86400);return t.playerStates={playerVolume:i.get("player-volume"),playerSoundMuted:i.get("player-sound-muted"),videoQuality:i.get("video-quality"),videoPlaybackSpeed:i.get("video-playback-speed"),inTheaterMode:i.get("in-theater-mode")},t.playerStates.playerVolume=null===t.playerStates.playerVolume?1:Math.max(Math.min(Number(t.playerStates.playerVolume),1),0),t.playerStates.playerSoundMuted=null!==t.playerStates.playerSoundMuted&&t.playerStates.playerSoundMuted,t.playerStates.videoQuality=null!==t.playerStates.videoQuality?t.playerStates.videoQuality:"Auto",t.playerStates.videoPlaybackSpeed=null!==t.playerStates.videoPlaybackSpeed&&t.playerStates.videoPlaybackSpeed,t.playerStates.inTheaterMode=null!==t.playerStates.inTheaterMode&&t.playerStates.inTheaterMode,t}return t=u,(i=[{key:"componentDidMount",value:function(){this.props.inEmbed||document.hasFocus()||"visible"===document.visibilityState?this.initPlayer():(window.addEventListener("focus",this.initPlayer),document.addEventListener("visibilitychange",this.initPlayer))}},{key:"componentWillUnmount",value:function(){this.unsetPlayer(),"function"==typeof this.props.onUnmountCallback&&this.props.onUnmountCallback()}},{key:"onClickNext",value:function(){"function"==typeof this.props.onClickNextCallback&&this.props.onClickNextCallback()}},{key:"onClickPrevious",value:function(){"function"==typeof this.props.onClickPreviousCallback&&this.props.onClickPreviousCallback()}},{key:"onPlayerStateUpdate",value:function(e){this.playerStates.playerVolume!==e.volume&&(this.playerStates.playerVolume=e.volume),this.playerStates.playerSoundMuted!==e.soundMuted&&(this.playerStates.playerSoundMuted=e.soundMuted),this.playerStates.videoQuality!==e.quality&&(this.playerStates.videoQuality=e.quality),this.playerStates.videoPlaybackSpeed!==e.playbackSpeed&&(this.playerStates.videoPlaybackSpeed=e.playbackSpeed),this.playerStates.inTheaterMode!==e.theaterMode&&(this.playerStates.inTheaterMode=e.theaterMode),"function"==typeof this.props.onStateUpdateCallback&&this.props.onStateUpdateCallback(e)}},{key:"initPlayer",value:function(){if(null===this.player&&null===this.props.errorMessage&&(this.props.inEmbed||(window.removeEventListener("focus",this.initPlayer),document.removeEventListener("visibilitychange",this.initPlayer)),this.refs.videoElem)){this.props.inEmbed||this.refs.videoElem.focus();var e={on:!1};if(void 0!==this.props.subtitlesInfo&&null!==this.props.subtitlesInfo&&this.props.subtitlesInfo.length){e.languages=[];for(var t=0;t<this.props.subtitlesInfo.length;)void 0!==this.props.subtitlesInfo[t].src&&void 0!==this.props.subtitlesInfo[t].srclang&&void 0!==this.props.subtitlesInfo[t].label&&e.languages.push({src:(0,c.U)(this.props.subtitlesInfo[t].src,l.Z.get("config-site").url),srclang:this.props.subtitlesInfo[t].srclang,label:this.props.subtitlesInfo[t].label}),t+=1;e.languages.length&&(e.on=!0)}this.player=new(r())(this.refs.videoElem,{enabledTouchControls:!0,sources:this.props.sources,poster:this.props.poster,autoplay:this.props.autoplay,bigPlayButton:!0,controlBar:{theaterMode:this.props.theaterMode,pictureInPicture:!1,next:this.props.nextLink},subtitles:e,cornerLayers:this.props.cornerLayers,videoPreviewThumb:this.props.previewSprite},{volume:this.playerStates.playerVolume,soundMuted:this.playerStates.playerSoundMuted,theaterMode:this.playerStates.inTheaterMode,theSelectedQuality:void 0,theSelectedPlaybackSpeed:this.playerStates.videoPlaybackSpeed||1},this.props.info,[.25,.5,.75,1,1.25,1.5,1.75,2],this.onPlayerStateUpdate,this.onClickNext,this.onClickPrevious),"function"==typeof this.props.onPlayerInitCallback&&this.props.onPlayerInitCallback(this.player,this.refs.videoElem)}}},{key:"unsetPlayer",value:function(){this.player&&(videojs(this.refs.videoElem).dispose(),this.player=null,delete this.player)}},{key:"render",value:function(){return null===this.props.errorMessage?a.createElement("video",{ref:"videoElem",className:"video-js vjs-mediacms native-dimensions"}):a.createElement("div",{className:"error-container"},a.createElement("div",{className:"error-container-inner"},a.createElement("span",{className:"icon-wrap"},a.createElement("i",{className:"material-icons"},"error_outline")),a.createElement("span",{className:"msg-wrap"},this.props.errorMessage)))}}])&&p(t.prototype,i),u}(a.PureComponent);b.propTypes={cornerLayers:o().object.isRequired},b.defaultProps={cornerLayers:{}}},8024:function(e,t,i){function a(e,t){e.classList?e.classList.remove(t):e.className=e.className.replace(new RegExp("(^|\\b)"+t.split(" ").join("|")+"(\\b|$)","gi")," ")}function n(e,t){e.classList?e.classList.add(t):e.className+=" "+t}i.d(t,{dt:function(){return a},Ec:function(){return n}}),i(7441),i(7390),i(2322),i(4669),i(3296),i(9268)},3140:function(e,t,i){i(2322),i(9268)},9688:function(e,t,i){i.d(t,{U:function(){return o}}),i(6394),i(2322),i(4669),i(3296);var a=i(137),n=i.n(a);function o(e,t){var i=n()(e,{});return""!==i.origin&&"null"!==i.origin&&i.origin||(i=n()(t+"/"+e.replace(/^\//g,""),{})),i.toString()}},4135:function(e,t,i){function a(e,t){function i(e,t,i){return Number(parseFloat(e/t).toFixed(e<10*t?1:0))+i}return t?e.toLocaleString():function(e,t,a,n,o,s){for(;t>=n;)o*=a,n*=a,e+=1;return e<s.length?i(t,o,s[e]):i(t*(a*(e-(s.length-1))),o,s[s.length-1])}(0,e,1e3,1e3,1,["","K","M","B","T"])}i.d(t,{Z:function(){return a}}),i(717),i(6660)},8420:function(e,t,i){i.d(t,{A_:function(){return a.Z},j0:function(){return n.Z},GH:function(){return o.Z},Jl:function(){return s.Z},v$:function(){return r.Z},uf:function(){return l.Z},UN:function(){return d.Z},$A:function(){return c.Z},m5:function(){return u.Z},vo:function(){return p.ZP}});var a=i(1712),n=i(9752),o=i(84),s=i(9009),r=i(1438),l=i(4135),d=(i(3140),i(1752),i(7514),i(7634),i(6146)),c=i(4845),u=(i(1569),i(6203)),p=i(7188)},2186:function(e,t,i){function a(e){return function(e){return e===Math.trunc(e)}(e)&&(function(e){return function(e,t){return e>0}(e)}(e)||function(e){return 0===e}(e))}i.d(t,{ZU:function(){return a}}),i(5777)},2276:function(e,t,i){i(2004),i(8407),i(5101),i(9751),i(6394),i(3080),i(2322),i(4669),i(3296),i(9268),i(3233),i(5466);var a=i(1590),n=i.n(a),o=i(8420),s=(i(4559),i(137)),r=i.n(s),l=i(4426);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 c(e,t){for(var i=0;i<t.length;i++){var a=t[i];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}function u(e,t){return(u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function p(e,t){return!t||"object"!==d(t)&&"function"!=typeof t?h(e):t}function h(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function m(e){return(m=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var f={},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}}),t&&u(e,t)}(d,e);var t,i,a,n,s=(a=d,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=m(a);if(n){var i=m(this).constructor;e=Reflect.construct(t,arguments,i)}else e=t.apply(this,arguments);return p(this,e)});function d(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,d),e=s.call(this),f[Object.defineProperty(h(e),"id",{value:"MediaPageStoreData_"+Object.keys(f).length}).id]={likedMedia:!1,dislikedMedia:!1,reported_times:0,while:{deleteMedia:!1,submitComment:!1,deleteCommentId:null}},e.removeMediaResponse=e.removeMediaResponse.bind(h(e)),e.removeMediaFail=e.removeMediaFail.bind(h(e)),e.submitCommentFail=e.submitCommentFail.bind(h(e)),e.submitCommentResponse=e.submitCommentResponse.bind(h(e)),e.removeCommentFail=e.removeCommentFail.bind(h(e)),e.removeCommentResponse=e.removeCommentResponse.bind(h(e)),e}return t=d,(i=[{key:"loadData",value:function(){if(!f[this.id].mediaId){var e=((i=new(r())(window.location.href).query)?((i=i.substring(1)).split("&"),i=i.length?i.split("="):[]):i=[],i);if(e.length)for(var t=0;t<e.length;)"m"===e[t]&&(f[this.id].mediaId=e[t+1]),t+=2}var i;if(!f[this.id].mediaId)return console.warn("Invalid media id:",f[this.id].mediaId),!1;this.mediaAPIUrl=l.Z.get("api-media")+"/"+f[this.id].mediaId,this.dataResponse=this.dataResponse.bind(this),this.dataErrorResponse=this.dataErrorResponse.bind(this),(0,o.A_)(this.mediaAPIUrl,!1,this.dataResponse,this.dataErrorResponse)}},{key:"loadComments",value:function(){this.commentsAPIUrl=l.Z.get("api-media")+"/"+f[this.id].mediaId+"/comments",this.commentsResponse=this.commentsResponse.bind(this),(0,o.A_)(this.commentsAPIUrl,!1,this.commentsResponse)}},{key:"loadPlaylists",value:function(){l.Z.get("config-user").can.saveMedia&&(this.playlistsAPIUrl=l.Z.get("api-user-playlists")+l.Z.get("user-username"),this.playlistsResponse=this.playlistsResponse.bind(this),(0,o.A_)(this.playlistsAPIUrl,!1,this.playlistsResponse))}},{key:"dataResponse",value:function(e){if(e&&e.data){switch(f[this.id].data=e.data,f[this.id].reported_times=!!f[this.id].data.reported_times,this.get("media-type")){case"video":case"audio":case"image":this.emit("loaded_"+this.get("media-type")+"_data")}this.emit("loaded_media_data")}this.loadPlaylists(),l.Z.get("config-user").can.readComment&&this.loadComments()}},{key:"dataErrorResponse",value:function(e){if(void 0!==e.type)switch(e.type){case"network":case"private":case"unavailable":f[this.id].loadErrorType=e.type,f[this.id].loadErrorMessage=void 0!==e.message?e.message:"Αn error occurred while loading the media's data",this.emit("loaded_media_error")}}},{key:"commentsResponse",value:function(e){e&&e.data&&(f[this.id].comments=e.data.count?e.data.results:[],this.emit("comments_load"))}},{key:"playlistsResponse",value:function(e){var t=this;e&&e.data&&function(){var i=e.data.count?e.data.results:[];f[t.id].playlists=[];for(var a=0,n=0;a<i.length;)(function(e){var t,a,s=this;if(i[e].user===l.Z.get("config-user").username){var r=f[s.id].playlists.length;f[s.id].playlists[r]={playlist_id:(t=i[e].url,a=t.split("/"),1<a.length?a[a.length-1]:null),title:i[e].title,description:i[e].description,add_date:i[e].add_date},(0,o.A_)(l.Z.get("config-site").url+"/"+i[e].api_url.replace(/^\//g,""),!1,(function(e){if(e&&e.data){f[s.id].playlists[r].media_list=[];for(var t,a=0;a<e.data.playlist_media.length;)2===(t=e.data.playlist_media[a].url.split("m=")).length&&f[s.id].playlists[r].media_list.push(t[1]),a+=1}(n+=1)===i.length&&this.emit("playlists_load")}))}}).bind(t)(a),a+=1}()}},{key:"requestMediaLike",value:function(){if(!f[this.id].mediaId)return console.warn("Invalid media id:",f[this.id].mediaId),!1;var e=l.Z.get("api-media")+"/"+f[this.id].mediaId+"/actions";this.likeActionResponse=this.likeActionResponse.bind(this),(0,o.j0)(e,{type:"like"},{headers:{"X-CSRFToken":(0,o.m5)()}},!1,this.likeActionResponse,function(){this.emit("liked_media_failed_request")}.bind(this))}},{key:"likeActionResponse",value:function(e){e&&(e instanceof Error||e.data&&(f[this.id].likedMedia=!0,this.emit("liked_media")))}},{key:"requestMediaDislike",value:function(){if(!f[this.id].mediaId)return console.warn("Invalid media id:",f[this.id].mediaId),!1;var e=l.Z.get("api-media")+"/"+f[this.id].mediaId+"/actions";this.dislikeActionResponse=this.dislikeActionResponse.bind(this),(0,o.j0)(e,{type:"dislike"},{headers:{"X-CSRFToken":(0,o.m5)()}},!1,this.dislikeActionResponse,function(){this.emit("disliked_media_failed_request")}.bind(this))}},{key:"dislikeActionResponse",value:function(e){e&&(e instanceof Error||e.data&&(f[this.id].dislikedMedia=!0,this.emit("disliked_media")))}},{key:"requestMediaReport",value:function(e){if(!f[this.id].mediaId)return console.warn("Invalid media id:",f[this.id].mediaId),!1;var t=l.Z.get("api-media")+"/"+f[this.id].mediaId+"/actions";this.reportActionResponse=this.reportActionResponse.bind(this),(0,o.j0)(t,{type:"report",extra_info:e},{headers:{"X-CSRFToken":(0,o.m5)()}},!1,this.reportActionResponse,this.reportActionResponse)}},{key:"reportActionResponse",value:function(e){e&&(e instanceof Error||e.data&&(f[this.id].reported_times+=1,this.emit("reported_media")))}},{key:"set",value:function(e,t){switch(e){case"media-load-error-type":f[this.id].loadErrorType=t;break;case"media-load-error-message":f[this.id].loadErrorMessage=t}}},{key:"get",value:function(e){var t,i=null;switch(e){case"playlists":i=f[this.id].playlists||[];break;case"media-load-error-type":i=void 0!==f[this.id].loadErrorType?f[this.id].loadErrorType:null;break;case"media-load-error-message":i=void 0!==f[this.id].loadErrorMessage?f[this.id].loadErrorMessage:null;break;case"media-comments":i=f[this.id].comments||[];break;case"media-data":i=f[this.id].data||null;break;case"media-id":i=f[this.id].mediaId;break;case"media-url":i=void 0!==f[this.id].data&&void 0!==f[this.id].data.url?f[this.id].data.url:"N/A";break;case"media-edit-subtitle-url":i=void 0!==f[this.id].data&&"string"==typeof f[this.id].data.add_subtitle_url?f[this.id].data.add_subtitle_url:null;break;case"media-likes":i=(t=f[this.id].likedMedia?1:0)?void 0!==f[this.id].data&&void 0!==f[this.id].data.likes?f[this.id].data.likes+t:t:void 0!==f[this.id].data&&void 0!==f[this.id].data.likes?f[this.id].data.likes:"N/A";break;case"media-dislikes":i=(t=f[this.id].dislikedMedia?1:0)?void 0!==f[this.id].data&&void 0!==f[this.id].data.dislikes?f[this.id].data.dislikes+t:t:void 0!==f[this.id].data&&void 0!==f[this.id].data.dislikes?f[this.id].data.dislikes:"N/A";break;case"media-summary":i=void 0!==f[this.id].data&&void 0!==f[this.id].data.summary?f[this.id].data.summary:null;break;case"media-production-company":i=void 0!==f[this.id].data&&void 0!==f[this.id].data.company&&null!==f[this.id].data.company?f[this.id].data.company.trim():null;break;case"media-website":i=void 0!==f[this.id].data&&void 0!==f[this.id].data.website&&null!==f[this.id].data.website?f[this.id].data.website.trim():null;break;case"display-media-license-info":i=void 0!==f[this.id].data&&void 0!==f[this.id].data.license_info;break;case"media-license-info":i=void 0!==f[this.id].data&&void 0!==f[this.id].data.license_info&&Object.keys(f[this.id].data.license_info).length?f[this.id].data.license_info:null;break;case"media-countries":i=void 0!==f[this.id].data&&void 0!==f[this.id].data.media_country_info?f[this.id].data.media_country_info:[];break;case"media-languages":i=void 0!==f[this.id].data&&void 0!==f[this.id].data.media_language_info?f[this.id].data.media_language_info:[];break;case"media-categories":i=void 0!==f[this.id].data&&void 0!==f[this.id].data.categories_info?f[this.id].data.categories_info:[];break;case"media-topics":i=void 0!==f[this.id].data&&void 0!==f[this.id].data.topics_info?f[this.id].data.topics_info:[];break;case"media-tags":i=void 0!==f[this.id].data&&void 0!==f[this.id].data.tags_info?f[this.id].data.tags_info:[];break;case"media-type":i=void 0!==f[this.id].data&&void 0!==f[this.id].data.media_type?f[this.id].data.media_type:null;break;case"media-original-url":i=void 0!==f[this.id].data&&void 0!==f[this.id].data.original_media_url?f[this.id].data.original_media_url:null;break;case"media-thumbnail-url":i=void 0!==f[this.id].data&&void 0!==f[this.id].data.thumbnail_url?f[this.id].data.thumbnail_url:null;break;case"user-liked-media":i=f[this.id].likedMedia;break;case"user-disliked-media":i=f[this.id].dislikedMedia;break;case"media-author-thumbnail-url":i=void 0!==f[this.id].data&&void 0!==f[this.id].data.author_thumbnail?l.Z.get("config-site").url+"/"+f[this.id].data.author_thumbnail.replace(/^\//g,""):null}return i}},{key:"isVideo",value:function(){return"video"===this.get("media-type")}},{key:"onPlaylistCreationCompleted",value:function(e){e&&e.data&&this.emit("playlist_creation_completed",e.data)}},{key:"onPlaylistCreationFailed",value:function(){this.emit("playlist_creation_failed")}},{key:"onPlaylistMediaAdditionCompleted",value:function(e,t){if(t){for(var i=0;i<f[this.id].playlists.length;){if(e===f[this.id].playlists[i].playlist_id){f[this.id].playlists[i].media_list.push(f[this.id].mediaId);break}i+=1}this.emit("media_playlist_addition_completed",e)}}},{key:"onPlaylistMediaAdditionFailed",value:function(e,t){this.emit("media_playlist_addition_failed")}},{key:"onPlaylistMediaRemovalCompleted",value:function(e,t){if(t){for(var i,a,n=0;n<f[this.id].playlists.length;){if(e===f[this.id].playlists[n].playlist_id){for(a=[],i=0;i<f[this.id].playlists[n].media_list.length;)f[this.id].mediaId!==f[this.id].playlists[n].media_list[i]&&a.push(f[this.id].playlists[n].media_list[i]),i+=1;f[this.id].playlists[n].media_list=a;break}n+=1}this.emit("media_playlist_removal_completed",e)}}},{key:"onPlaylistMediaRemovalFailed",value:function(e,t){this.emit("media_playlist_removal_failed")}},{key:"actions_handler",value:function(e){switch(e.type){case"LOAD_MEDIA_DATA":f[this.id].mediaId=window.MediaCMS.mediaId||f[this.id].mediaId,this.loadData();break;case"UNLIKE_MEDIA":break;case"LIKE_MEDIA":f[this.id].likedMedia||f[this.id].dislikedMedia||this.requestMediaLike();break;case"DISLIKE_MEDIA":f[this.id].likedMedia||f[this.id].dislikedMedia||this.requestMediaDislike();break;case"UNDISLIKE_MEDIA":break;case"REPORT_MEDIA":f[this.id].reported_times||""!==e.reportDescription&&this.requestMediaReport(e.reportDescription);break;case"COPY_SHARE_LINK":e.inputElement instanceof HTMLElement&&(e.inputElement.select(),document.execCommand("copy"),this.emit("copied_media_link"));break;case"COPY_EMBED_MEDIA_CODE":e.inputElement instanceof HTMLElement&&(e.inputElement.select(),document.execCommand("copy"),this.emit("copied_embed_media_code"));break;case"REMOVE_MEDIA":if(f[this.id].while.deleteMedia)return;f[this.id].while.deleteMedia=!0,(0,o.Jl)(this.mediaAPIUrl,{headers:{"X-CSRFToken":(0,o.m5)()}},!1,this.removeMediaResponse,this.removeMediaFail);break;case"SUBMIT_COMMENT":if(f[this.id].while.submitComment)return;f[this.id].while.submitComment=!0,(0,o.j0)(this.commentsAPIUrl,{text:e.commentText},{headers:{"X-CSRFToken":(0,o.m5)()}},!1,this.submitCommentResponse,this.submitCommentFail);break;case"DELETE_COMMENT":if(null!==f[this.id].while.deleteCommentId)return;f[this.id].while.deleteCommentId=e.commentId,(0,o.Jl)(this.commentsAPIUrl+"/"+e.commentId,{headers:{"X-CSRFToken":(0,o.m5)()}},!1,this.removeCommentResponse,this.removeCommentFail);break;case"CREATE_PLAYLIST":(0,o.j0)(l.Z.get("api-playlists"),{title:e.playlist_data.title,description:e.playlist_data.description},{headers:{"X-CSRFToken":(0,o.m5)()}},!1,this.onPlaylistCreationCompleted.bind(this),this.onPlaylistCreationFailed.bind(this));break;case"ADD_MEDIA_TO_PLAYLIST":(0,o.GH)(l.Z.get("api-playlists")+"/"+e.playlist_id,{type:"add",media_friendly_token:e.media_id},{headers:{"X-CSRFToken":(0,o.m5)()}},!1,this.onPlaylistMediaAdditionCompleted.bind(this,e.playlist_id),this.onPlaylistMediaAdditionFailed.bind(this,e.playlist_id));break;case"REMOVE_MEDIA_FROM_PLAYLIST":(0,o.GH)(l.Z.get("api-playlists")+"/"+e.playlist_id,{type:"remove",media_friendly_token:e.media_id},{headers:{"X-CSRFToken":(0,o.m5)()}},!1,this.onPlaylistMediaRemovalCompleted.bind(this,e.playlist_id),this.onPlaylistMediaRemovalFailed.bind(this,e.playlist_id));break;case"APPEND_NEW_PLAYLIST":f[this.id].playlists.push(e.playlist_data),this.emit("playlists_load")}}},{key:"removeMediaResponse",value:function(e){e&&204===e.status&&this.emit("media_delete",f[this.id].mediaId)}},{key:"removeMediaFail",value:function(){this.emit("media_delete_fail",f[this.id].mediaId),setTimeout((function(e){f[e.id].while.deleteMedia=null}),100,this)}},{key:"removeCommentFail",value:function(e){this.emit("comment_delete_fail",f[this.id].while.deleteCommentId),setTimeout((function(e){f[e.id].while.deleteCommentId=null}),100,this)}},{key:"removeCommentResponse",value:function(e){if(e&&204===e.status){var t,i=[];for(t in f[this.id].comments)f[this.id].comments.hasOwnProperty(t)&&f[this.id].while.deleteCommentId!==f[this.id].comments[t].uid&&i.push(f[this.id].comments[t]);f[this.id].comments=i,i=null,this.emit("comment_delete",f[this.id].while.deleteCommentId)}setTimeout((function(e){f[e.id].while.deleteCommentId=null}),100,this)}},{key:"submitCommentFail",value:function(e){this.emit("comment_submit_fail"),setTimeout((function(e){f[e.id].while.submitComment=!1}),100,this)}},{key:"submitCommentResponse",value:function(e){e&&201===e.status&&e.data&&Object.keys(e.data)&&(f[this.id].comments.push(e.data),this.emit("comment_submit",e.data.uid)),setTimeout((function(e){f[e.id].while.submitComment=!1}),100,this)}}])&&c(t.prototype,i),d}(n());t.Z=(0,o.v$)(new y,"actions_handler")},8349:function(e,t,i){i.d(t,{sc:function(){return o},df:function(){return s},Zr:function(){return r},vh:function(){return l},Qb:function(){return d}});var a=i(8416),n=i.n(a);function o(){n().dispatch({type:"TOGGLE_PAGE_SIDEBAR"})}function s(e){n().dispatch({type:"INIT_PAGE",page:e})}function r(e){n().dispatch({type:"INIT_SIDEBAR",page:e})}function l(e){n().dispatch({type:"TOGGLE_MOBILE_SEARCH_FIELD",open:e})}function d(e){n().dispatch({type:"TOGGLE_DARK_THEME"})}}},t={};function i(a){if(t[a])return t[a].exports;var n=t[a]={exports:{}};return e[a].call(n.exports,n,n.exports,i),n.exports}i.m=e,i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,{a:t}),t},i.d=function(e,t){for(var a in t)i.o(t,a)&&!i.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})},i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.j=991,function(){var e={991:0},t=[[6861,431]],a=function(){};function n(){for(var a,n=0;n<t.length;n++){for(var o=t[n],s=!0,r=1;r<o.length;r++){var l=o[r];0!==e[l]&&(s=!1)}s&&(t.splice(n--,1),a=i(i.s=o[0]))}return 0===t.length&&(i.x(),i.x=function(){}),a}i.x=function(){i.x=function(){},s=s.slice();for(var e=0;e<s.length;e++)o(s[e]);return(a=n)()};var o=function(n){for(var o,s,l=n[0],d=n[1],c=n[2],u=n[3],p=0,h=[];p<l.length;p++)s=l[p],i.o(e,s)&&e[s]&&h.push(e[s][0]),e[s]=0;for(o in d)i.o(d,o)&&(i.m[o]=d[o]);for(c&&c(i),r(n);h.length;)h.shift()();return u&&t.push.apply(t,u),a()},s=self.webpackChunk_mediacms_frontend=self.webpackChunk_mediacms_frontend||[],r=s.push.bind(s);s.push=o}(),i.x()}(); |