!function(){var e,t={3683:function(e,t,n){"use strict";var r=n(2541),a=(n(2322),n(9268),n(9006),n(5090),n(5101),n(3080),n(2004),n(8407),n(6394),n(8288),n(5677),n(2129),n(4655),n(5466)),i=n(3613),o=n(8578);function l(){return a.createElement("div",{className:"player-container viewer-attachment-container"},a.createElement("div",{className:"player-container-inner"},a.createElement("span",null,a.createElement("span",null,a.createElement("i",{className:"material-icons"},"insert_drive_file")))))}var s=n(3074),u=n.n(s),c=n(8009),d=n.n(c),m=n(473),f=n(541),p=n(9722);function y(e){var t=null,n=e.split(".");if(n.length)switch(n=n[n.length-1]){case"webm":t="audio/webm";break;case"flac":t="audio/flac";break;case"wave":t="audio/wave";break;case"wav":t="audio/wav";break;case"ogg":case"ogg":t="audio/ogg";break;case"mp3":case"mpeg":t="audio/mpeg"}return t}var h=n(1283);function g(e){return(g="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 v(e,t){for(var n=0;n');var n=null,r=null;!this.props.inEmbed&&o.MediaPageStore.get("playlist-id")?(n=o.MediaPageStore.get("playlist-next-media-url"),r=o.MediaPageStore.get("playlist-previous-media-url")):n=o.MediaPageStore.get("media-data").related_media.length&&!this.props.inEmbed?o.MediaPageStore.get("media-data").related_media[0].url:null,this.AudioPlayerData.instance=new(d())(this.refs.AudioElem,{sources:this.videoSources,poster:this.videoPoster,autoplay:!this.props.inEmbed,bigPlayButton:!0,controlBar:{fullscreen:!1,theaterMode:!1,next:!!n,previous:!!r},cornerLayers:{topLeft:e,topRight:this.upNextLoaderView?this.upNextLoaderView.html():null,bottomLeft:this.recommendedMedia?this.recommendedMedia.html():null,bottomRight:t}},{volume:o.VideoViewerStore.get("player-volume"),soundMuted:o.VideoViewerStore.get("player-sound-muted")},null,null,this.onAudioPlayerStateUpdate.bind(this),this.onClickNextButton.bind(this),this.onClickPreviousButton.bind(this)),this.upNextLoaderView&&(this.upNextLoaderView.setVideoJsPlayerElem(this.AudioPlayerData.instance.player.el_),this.onUpdateMediaAutoPlay()),this.refs.AudioElem.parentNode.focus(),this.AudioPlayerData.instance.player.one("play",function(){this.audioStartedPlaying=!0}.bind(this)),this.recommendedMedia&&(this.recommendedMedia.initWrappers(this.AudioPlayerData.instance.player.el_),this.AudioPlayerData.instance.player.one("pause",this.recommendedMedia.init),this.AudioPlayerData.instance.player.on("fullscreenchange",this.recommendedMedia.onResize),o.PageStore.on("window_resize",this.recommendedMedia.onResize),o.VideoViewerStore.on("changed_viewer_mode",this.recommendedMedia.onResize)),this.AudioPlayerData.instance.player.one("ended",this.onAudioEnd)}}.bind(this),50)}},{key:"initialDocumentFocus",value:function(){this.refs.AudioElem.parentNode&&(this.refs.AudioElem.parentNode.focus(),setTimeout(function(){this.AudioPlayerData.instance.player.play()}.bind(this),50)),window.removeEventListener("focus",this.initialDocumentFocus),this.initialDocumentFocus=null}},{key:"onClickNextButton",value:function(){var e;o.MediaPageStore.get("playlist-id")?null===(e=o.MediaPageStore.get("playlist-next-media-url"))&&(e=o.MediaPageStore.get("media-data").related_media[0].url):this.props.inEmbed||(e=o.MediaPageStore.get("media-data").related_media[0].url),window.location.href=e}},{key:"onClickPreviousButton",value:function(){var e;o.MediaPageStore.get("playlist-id")?null===(e=o.MediaPageStore.get("playlist-previous-media-url"))&&(e=o.MediaPageStore.get("media-data").related_media[0].url):this.props.inEmbed||(e=o.MediaPageStore.get("media-data").related_media[0].url),window.location.href=e}},{key:"onUpdateMediaAutoPlay",value:function(){this.upNextLoaderView&&(o.PageStore.get("media-auto-play")?this.upNextLoaderView.showTimerView(this.AudioPlayerData.instance.isEnded()):this.upNextLoaderView.hideTimerView())}},{key:"onAudioPlayerStateUpdate",value:function(e){this.updatePlayerVolume(e.volume,e.soundMuted)}},{key:"onAudioRestart",value:function(){this.recommendedMedia&&(this.recommendedMedia.updateDisplayType("inline"),this.AudioPlayerData.instance.player.one("pause",this.recommendedMedia.init),this.AudioPlayerData.instance.player.one("ended",this.onAudioEnd))}},{key:"onAudioEnd",value:function(){if(this.recommendedMedia&&(this.recommendedMedia.updateDisplayType("full"),this.AudioPlayerData.instance.player.one("playing",this.onAudioRestart)),!this.props.inEmbed&&o.MediaPageStore.get("playlist-id")){var e=document.querySelector(".video-player .more-media"),t=document.querySelector(".video-player .vjs-actions-anim");this.upNextLoaderView.cancelTimer();var n=o.MediaPageStore.get("playlist-next-media-url");return n&&(e&&(e.style.display="none"),t&&(t.style.display="none"),window.location.href=n),void this.upNextLoaderView.hideTimerView()}this.upNextLoaderView&&(o.PageStore.get("media-auto-play")?(this.upNextLoaderView.startTimer(),this.AudioPlayerData.instance.player.one("play",function(){this.upNextLoaderView.cancelTimer()}.bind(this))):this.upNextLoaderView.cancelTimer())}},{key:"updatePlayerVolume",value:function(e,t){o.VideoViewerStore.get("player-volume")!==e&&f.VideoViewerActions.set_player_volume(e),o.VideoViewerStore.get("player-sound-muted")!==t&&f.VideoViewerActions.set_player_sound_muted(t)}},{key:"wrapperClick",value:function(e){e.target.parentNode===this.refs.videoPlayerWrap&&(this.AudioPlayerData.instance.player.ended()||(!this.AudioPlayerData.instance.player.hasStarted_||this.AudioPlayerData.instance.player.paused()?this.AudioPlayerData.instance.player.play():this.AudioPlayerData.instance.player.pause()))}},{key:"render",value:function(){return a.createElement("div",{className:"player-container audio-player-container"},a.createElement("div",{className:"player-container-inner"},a.createElement("div",{className:"video-player",ref:"videoPlayerWrap",onClick:this.wrapperClick},a.createElement("audio",{tabIndex:"1",ref:"AudioElem",className:"video-js vjs-mediacms native-dimensions"}))))}}])&&v(t.prototype,n),u}(a.PureComponent);function k(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);nshareShare';a+='\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\temailEmail\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tFacebook\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tTwitter\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tWhatsApp\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tTelegram\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tLinkedIn\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\treddit\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tTumblr\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tPinterest\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tmore_horiz\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t',this.cornerLayers={topLeft:e,topRight:this.upNextLoaderView?this.upNextLoaderView.html():null,bottomLeft:this.recommendedMedia?this.recommendedMedia.html():null,bottomRight:this.props.inEmbed?a:null},this.setState({displayPlayer:!0},(function(){setTimeout((function(){var e=document.querySelector(".share-video-btn"),t=document.querySelector(".share-options-wrapper"),n=document.querySelector(".share-options-inner");e&&e.addEventListener("click",(function(e){(0,m.addClassname)(document.querySelector(".video-js.vjs-mediacms"),"vjs-visible-share-options")})),t&&t.addEventListener("click",(function(e){e.target!==n&&e.target!==t||(0,m.removeClassname)(document.querySelector(".video-js.vjs-mediacms"),"vjs-visible-share-options")}))}),1e3)}))}}},{key:"componentWillUnmount",value:function(){this.unsetRecommendedMedia()}},{key:"initRecommendedMedia",value:function(){null!==this.recommendedMedia&&(this.props.inEmbed||this.recommendedMedia.init(),this.playerInstance.player.on("fullscreenchange",this.recommendedMedia.onResize),o.PageStore.on("window_resize",this.recommendedMedia.onResize),o.VideoViewerStore.on("changed_viewer_mode",this.recommendedMedia.onResize))}},{key:"unsetRecommendedMedia",value:function(){null!==this.recommendedMedia&&(this.playerInstance.player.off("fullscreenchange",this.recommendedMedia.onResize),o.PageStore.removeListener("window_resize",this.recommendedMedia.onResize),o.VideoViewerStore.removeListener("changed_viewer_mode",this.recommendedMedia.onResize),this.recommendedMedia.destroy())}},{key:"onClickNext",value:function(){var e;o.MediaPageStore.get("playlist-id")?null===(e=o.MediaPageStore.get("playlist-next-media-url"))&&(e=this.props.data.related_media[0].url):this.props.inEmbed||(e=this.props.data.related_media[0].url),window.location.href=e}},{key:"onClickPrevious",value:function(){var e;o.MediaPageStore.get("playlist-id")?null===(e=o.MediaPageStore.get("playlist-previous-media-url"))&&(e=this.props.data.related_media[0].url):this.props.inEmbed||(e=this.props.data.related_media[0].url),window.location.href=e}},{key:"onStateUpdate",value:function(e){o.VideoViewerStore.get("in-theater-mode")!==e.theaterMode&&f.VideoViewerActions.set_viewer_mode(e.theaterMode),o.VideoViewerStore.get("player-volume")!==e.volume&&f.VideoViewerActions.set_player_volume(e.volume),o.VideoViewerStore.get("player-sound-muted")!==e.soundMuted&&f.VideoViewerActions.set_player_sound_muted(e.soundMuted),o.VideoViewerStore.get("video-quality")!==e.quality&&f.VideoViewerActions.set_video_quality(e.quality),o.VideoViewerStore.get("video-playback-speed")!==e.playbackSpeed&&f.VideoViewerActions.set_video_playback_speed(e.playbackSpeed)}},{key:"onPlayerInit",value:function(e,t){this.playerElem=t,this.playerInstance=e,this.upNextLoaderView&&(this.upNextLoaderView.setVideoJsPlayerElem(this.playerInstance.player.el_),this.onUpdateMediaAutoPlay()),this.props.inEmbed||this.playerElem.parentNode.focus(),null!==this.recommendedMedia&&(this.recommendedMedia.initWrappers(this.playerElem.parentNode),this.props.inEmbed&&(this.playerInstance.player.one("pause",this.recommendedMedia.init),this.initRecommendedMedia())),this.playerInstance.player.one("ended",this.onVideoEnd)}},{key:"onVideoRestart",value:function(){null!==this.recommendedMedia&&(this.recommendedMedia.updateDisplayType("inline"),this.props.inEmbed&&this.playerInstance.player.one("pause",this.recommendedMedia.init),this.playerInstance.player.one("ended",this.onVideoEnd))}},{key:"onVideoEnd",value:function(){if(null!==this.recommendedMedia&&(this.props.inEmbed||this.initRecommendedMedia(),this.recommendedMedia.updateDisplayType("full"),this.playerInstance.player.one("playing",this.onVideoRestart)),!this.props.inEmbed&&o.MediaPageStore.get("playlist-id")){var e=document.querySelector(".video-player .more-media"),t=document.querySelector(".video-player .vjs-actions-anim");this.upNextLoaderView.cancelTimer();var n=o.MediaPageStore.get("playlist-next-media-url");return n&&(e&&(e.style.display="none"),t&&(t.style.display="none"),window.location.href=n),void this.upNextLoaderView.hideTimerView()}this.upNextLoaderView&&(o.PageStore.get("media-auto-play")?(this.upNextLoaderView.startTimer(),this.playerInstance.player.one("play",function(){this.upNextLoaderView.cancelTimer()}.bind(this))):this.upNextLoaderView.cancelTimer())}},{key:"onUpdateMediaAutoPlay",value:function(){this.upNextLoaderView&&(o.PageStore.get("media-auto-play")?this.upNextLoaderView.showTimerView(this.playerInstance.isEnded()):this.upNextLoaderView.hideTimerView())}},{key:"render",value:function(){var e=this,t=null,n=null;!this.props.inEmbed&&o.MediaPageStore.get("playlist-id")?(t=o.MediaPageStore.get("playlist-next-media-url"),n=o.MediaPageStore.get("playlist-previous-media-url")):t=this.props.data.related_media.length&&!this.props.inEmbed?this.props.data.related_media[0].url:null;var r=this.props.data.sprites_url?{url:this.props.siteUrl+"/"+this.props.data.sprites_url.replace(/^\//g,""),frame:{width:160,height:90,seconds:10}}:null;return a.createElement("div",{key:(this.props.inEmbed?"embed-":"")+"player-container",className:"player-container"+(this.videoSources.length?"":" player-container-error"),style:this.props.containerStyles,ref:"playerContainer"},a.createElement("div",{className:"player-container-inner",ref:"playerContainerInner",style:this.props.containerStyles},this.state.displayPlayer&&null!==o.MediaPageStore.get("media-load-error-type")?a.createElement(C.hJ,{errorMessage:o.MediaPageStore.get("media-load-error-message")}):null,this.state.displayPlayer&&null==o.MediaPageStore.get("media-load-error-type")?a.createElement("div",{className:"video-player",ref:"videoPlayerWrapper",key:"videoPlayerWrapper"},a.createElement(i.SiteConsumer,null,(function(i){return a.createElement(C.Y7,{playerVolume:e.browserCache.get("player-volume"),playerSoundMuted:e.browserCache.get("player-sound-muted"),videoQuality:e.browserCache.get("video-quality"),videoPlaybackSpeed:parseInt(e.browserCache.get("video-playback-speed"),10),inTheaterMode:e.browserCache.get("in-theater-mode"),siteId:i.id,siteUrl:i.url,info:e.videoInfo,cornerLayers:e.cornerLayers,sources:e.videoSources,poster:e.videoPoster,previewSprite:r,subtitlesInfo:e.props.data.subtitles_info,enableAutoplay:!e.props.inEmbed,inEmbed:e.props.inEmbed,hasTheaterMode:!e.props.inEmbed,hasNextLink:!!t,hasPreviousLink:!!n,errorMessage:o.MediaPageStore.get("media-load-error-message"),onClickNextCallback:e.onClickNext,onClickPreviousCallback:e.onClickPrevious,onStateUpdateCallback:e.onStateUpdate,onPlayerInitCallback:e.onPlayerInit})}))):null))}}])&&O(t.prototype,n),u}(a.PureComponent);function L(e){for(var t=null,n=[],r=location.search.substr(1).split("&"),a=0;a=0&&n.currentTime(L("time")),1==L("autoplay")&&n.play(),void t.disconnect()})).observe(document,{childList:!0,subtree:!0}),n(9808);var D,U,B=n(2546),F=n(4234),q=(n(7441),n(6453),n(7390),n(4669),n(2070),n(9511)),z=n(3064),H=(n(4486),n(6429),n(1283));function W(e){return(W="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function $(e){return function(e){if(Array.isArray(e))return Z(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Y(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Q(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,i=[],o=!0,l=!1;try{for(n=n.call(e);!(o=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);o=!0);}catch(e){l=!0,a=e}finally{try{o||null==n.return||n.return()}finally{if(l)throw a}}return i}}(e,t)||Y(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Y(e,t){if(e){if("string"==typeof e)return Z(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Z(e,t):void 0}}function Z(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n1)&&(t.style.display="none"),t.style.left=g(e)+"%",e.duration)t.style.width=e.duration/d.duration()*100+"%",t.style.marginLeft="0px";else{var r=i(t);t.style.marginLeft=r.width/2+"px"}}function b(e){f&&(p=o,f.style.visibility="hidden"),c=o;var t=[];e.forEach((function(e){var n=u[e];if(n){delete s[n.key],t.push(e);var r=d.el().querySelector(".vjs-marker[data-marker-key='"+n.key+"']");r&&r.parentNode.removeChild(r)}}));try{t.reverse(),t.forEach((function(e){u.splice(e,1)}))}catch(e){H.log(e)}y()}function S(){if(l.breakOverlay.display&&!(c<0)){var e=d.currentTime(),t=u[c],n=l.markerTip.time(t);e>=n&&e<=n+l.breakOverlay.displayTime?(p!==c&&(p=c,f&&(f.querySelector(".vjs-break-overlay-text").innerHTML=l.breakOverlay.text(t))),f&&(f.style.visibility="visible")):(p=o,f&&(f.style.visibility="hidden"))}}function w(){!function(){if(u.length){var t=function(e){return e=l.markerTip.time(u[c])&&n=l.markerTip.time(u[i])&&n"}),d.el().querySelector(".vjs-progress-holder").appendChild(m)),d.markers.removeAll(),h(l.markers),l.breakOverlay.display&&(f=n.default.createEl("div",{className:"vjs-break-overlay",innerHTML:""}),Object.keys(l.breakOverlay.style).forEach((function(e){f&&(f.style[e]=l.breakOverlay.style[e])})),d.el().appendChild(f),p=o),w(),d.on("timeupdate",w),d.off("loadedmetadata")})),d.markers={getMarkers:function(){return u},next:function(){for(var e=d.currentTime(),t=0;te){d.currentTime(n);break}}},prev:function(){for(var e=d.currentTime(),t=u.length-1;t>=0;t--){var n=l.markerTip.time(u[t]);if(n+.5")})})),c?a.createElement("button",{className:"toggle-more",onClick:function(){s(!l)}},l?"Show less":"Read more"):null,i.MemberContext._currentValue.can.deleteComment?a.createElement(ee,{comment_id:e.comment_id}):null)))}te.propTypes={comment_id:u().oneOfType([u().string,u().number]).isRequired,media_id:u().oneOfType([u().string,u().number]).isRequired,text:u().string,author_name:u().string,author_link:u().string,author_thumb:u().string,publish_date:u().oneOfType([u().string,u().number]),likes:u().number,dislikes:u().number},te.defaultProps={author_name:"",author_link:"#",publish_date:0,likes:0,dislikes:0};var ne=function(e){var t=e.commentsLength;return a.createElement(a.Fragment,null,!i.MemberContext._currentValue.can.readComment||o.MediaPageStore.get("media-data").enable_comments?null:a.createElement("span",{className:"disabled-comments-msg"},"Comments are disabled"),i.MemberContext._currentValue.can.readComment&&(o.MediaPageStore.get("media-data").enable_comments||i.MemberContext._currentValue.can.editMedia)?a.createElement("h2",null,t?1e.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n'}),a.createElement("div",{className:"iframe-config"},a.createElement("div",{className:"iframe-config-options-title"},"Embed options"),a.createElement("div",{className:"iframe-config-option"},a.createElement("div",{className:"option-content"},a.createElement("div",{className:"ratio-options"},a.createElement("div",{className:"options-group"},a.createElement("label",{style:{minHeight:"36px"}},a.createElement("input",{type:"checkbox",checked:h,onChange:function(){var e=!h,t=b.split(":"),n=t[0],r=t[1];g(e),M(e?"px":_),I(e?"px":O),N(e?parseInt(E*r/n,10):C),z(e?[{key:"px",label:"px"}]:[{key:"px",label:"px"},{key:"percent",label:"%"}])}}),"Keep aspect ratio")),h?a.createElement("div",{className:"options-group"},a.createElement("select",{ref:r,onChange:function(){var e=r.current.value,t=e.split(":"),n=t[0],a=t[1];S(e),N(h?parseInt(E*a/n,10):C)},value:b},a.createElement("optgroup",{label:"Horizontal orientation"},a.createElement("option",{value:"16:9"},"16:9"),a.createElement("option",{value:"4:3"},"4:3"),a.createElement("option",{value:"3:2"},"3:2")),a.createElement("optgroup",{label:"Vertical orientation"},a.createElement("option",{value:"9:16"},"9:16"),a.createElement("option",{value:"3:4"},"3:4"),a.createElement("option",{value:"2:3"},"2:3")))):null),a.createElement("br",null),a.createElement("div",{className:"options-group"},a.createElement(F.NumericInputWithUnit,{valueCallback:function(e){e=""===e?0:e;var t=b.split(":"),n=t[0],r=t[1];P(e),N(h?parseInt(e*r/n,10):C)},unitCallback:function(e){M(e)},label:"Width",defaultValue:parseInt(E,10),defaultUnit:_,minValue:1,maxValue:99999,units:q})),a.createElement("div",{className:"options-group"},a.createElement(F.NumericInputWithUnit,{valueCallback:function(e){e=""===e?0:e;var t=b.split(":"),n=t[0],r=t[1];N(e),P(h?parseInt(e*n/r,10):E)},unitCallback:function(e){I(e)},label:"Height",defaultValue:parseInt(C,10),defaultUnit:O,minValue:1,maxValue:99999,units:q})))))),a.createElement("div",{ref:c,className:"on-right-bottom"},a.createElement("button",{onClick:function(){f.MediaPageActions.copyEmbedMediaCode(u.current.querySelector("textarea"))}},"COPY")))))}xe.propTypes={playlistId:u().string,isChecked:u().bool,title:u().string},xe.defaultProps={isChecked:!1,title:""},Oe.propTypes={triggerPopupClose:u().func},n(8833),n(815),n(9174),Le.propTypes={triggerPopupClose:u().func},n(5777);var De=n(3458);function Ue(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,i=[],o=!0,l=!1;try{for(n=n.call(e);!(o=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);o=!0);}catch(e){l=!0,a=e}finally{try{o||null==n.return||n.return()}finally{if(l)throw a}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Be(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Be(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Be(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);nwindow.innerWidth-80?window.innerWidth-80:null}}function He(e){var t=(0,a.useRef)(null),n=(0,a.useRef)(null),r=o.MediaPageStore.get("media-url"),l=Ue((0,a.useState)(null),2),s=l[0],u=l[1],c=Ue((0,a.useState)({prev:!1,next:!1}),2),d=c[0],m=c[1],p=Ue((0,a.useState)(ze()),2),y=p[0],h=p[1],g=Ue((0,a.useState)(function(){var e=function(){for(var e=i.ShareOptionsContext._currentValue,t=o.MediaPageStore.get("media-url"),n=o.MediaPageStore.get("media-data").title,r={},a=0;a=1?n+":"+r+":"+a:r+":"+a)),function(){o.PageStore.removeListener("window_resize",x),o.MediaPageStore.removeListener("copied_media_link",O),u(null)}}),[]),a.createElement("div",{ref:t,style:null!==y.maxPopupWidth?{maxWidth:y.maxPopupWidth+"px"}:null},a.createElement("div",{className:"scrollable-content",style:null!==y.maxFormContentHeight?{maxHeight:y.maxFormContentHeight+"px"}:null},a.createElement("div",{className:"share-popup-title"},"Share media"),g.length?a.createElement("div",{className:"share-options"},d.prev?a.createElement(qe,{onClick:function(){s.previousSlide(),I()}}):null,a.createElement("div",{ref:n,className:"share-options-inner"},g),d.next?a.createElement(Fe,{onClick:function(){s.nextSlide(),I()}}):null):null),a.createElement("div",{className:"copy-field"},a.createElement("div",null,a.createElement("input",{type:"text",readOnly:!0,value:C}),a.createElement("button",{onClick:function(){f.MediaPageActions.copyShareLink(t.current.querySelector(".copy-field input"))}},"COPY"))),a.createElement("div",{className:"start-at"},a.createElement("label",null,a.createElement("input",{type:"checkbox",name:"start-at-checkbox",id:"id-start-at-checkbox",checked:_,onChange:function(){var e;M(!_),e=_?r:r+"&t="+Math.trunc(b),N(e)}}),"Start at ",E)))}function We(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,i=[],o=!0,l=!1;try{for(n=n.call(e);!(o=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);o=!0);}catch(e){l=!0,a=e}finally{try{o||null==n.return||n.return()}finally{if(l)throw a}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return $e(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?$e(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function $e(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n=this.props.views?"view":"views"):null,a.createElement("div",{className:"media-actions"},a.createElement("div",null,i.MemberContext._currentValue.can.likeMedia?a.createElement(ve,null):null,i.MemberContext._currentValue.can.dislikeMedia?a.createElement(ye,null):null,i.MemberContext._currentValue.can.shareMedia?a.createElement(Je,{isVideo:!1}):null,!i.MemberContext._currentValue.is.anonymous&&i.MemberContext._currentValue.can.saveMedia&&-1=this.props.views?"view":"views"):null,a.createElement("div",{className:"media-actions"},a.createElement("div",null,i.MemberContext._currentValue.can.likeMedia?a.createElement(ve,null):null,i.MemberContext._currentValue.can.dislikeMedia?a.createElement(ye,null):null,i.MemberContext._currentValue.can.shareMedia?a.createElement(Je,{isVideo:!0}):null,!i.MemberContext._currentValue.is.anonymous&&i.MemberContext._currentValue.can.saveMedia&&-1e.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);ne?t:e,void 0!==n&&ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n div");g&&(g.innerHTML=j.summary)}}function B(e){if(void 0!==e&&void 0!==e.type)switch(e.type){case"network":case"private":case"unavailable":i(e.type),h(void 0!==e.message?e.message:"Αn error occurred while loading the media's data")}}return null!==R&&(V=t.media+"/"+R),(0,r.useEffect)((function(){null!==V&&(0,u.getRequest)(V,!1,U,B)}),[]),w.length?r.createElement("div",{className:"video-player"},r.createElement(m.Y7,{siteId:n.id,siteUrl:n.url,info:k,sources:w,poster:v,previewSprite:x,subtitlesInfo:A,enableAutoplay:!1,inEmbed:!1,hasTheaterMode:!1,hasNextLink:!1,hasPreviousLink:!1,errorMessage:y})):null}h.propTypes={pageLink:i().string.isRequired}},8204:function(e,t,n){"use strict";n.d(t,{T:function(){return m}}),n(5101),n(3080),n(2004),n(8407),n(6394),n(8288),n(5677),n(2129),n(4655);var r=n(5466),a=n(541),i=n(6191),o=n(4234);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})(e)}function s(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n=a;)i*=r,a*=r,e+=1;return ee.length)&&(t=e.length);for(var n=0,r=new Array(t);n0}(e)},i=function(e){return r(e)&&a(e)},o=function(e){return r(e)&&(a(e)||function(e){return 0===e}(e))},l=function e(t,n){return n?e(n,t%n):t}},447:function(e,t,n){"use strict";n.d(t,{A_:function(){return l},j0:function(){return u},GH:function(){return d},Jl:function(){return f}}),n(7588),n(6394),n(5334);var r=n(4559),a=n.n(r);function i(e,t,n,r,a,i,o){try{var l=e[i](o),s=l.value}catch(e){return void n(e)}l.done?t(s):Promise.resolve(s).then(r,a)}function o(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function l(e){i(o,r,a,l,s,"next",e)}function s(e){i(o,r,a,l,s,"throw",e)}l(void 0)}))}}function l(e,t,n,r){return s.apply(this,arguments)}function s(){return(s=o(regeneratorRuntime.mark((function e(t,n,a,i){var o,l,s;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(s=function(e){if(i instanceof Function){var t=e;if(void 0===e.response)t={type:"network",error:e};else if(void 0!==e.response.status)switch(e.response.status){case 401:t={type:"private",error:e,message:"Media is private"};break;case 400:t={type:"unavailable",error:e,message:"Media is unavailable"}}i(t)}},l=function(e){a instanceof Function&&a(e)},o={timeout:null,maxContentLength:null},!n){e.next=8;break}return e.next=6,(0,r.get)(t,o).then(l).catch(s||null);case 6:e.next=9;break;case 8:(0,r.get)(t,o).then(l).catch(s||null);case 9:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function u(e,t,n,r,a,i){return c.apply(this,arguments)}function c(){return(c=o(regeneratorRuntime.mark((function e(t,n,a,i,o,l){var s,u;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(u=function(e){l instanceof Function&&l(e)},s=function(e){o instanceof Function&&o(e)},n=n||{},!i){e.next=8;break}return e.next=6,(0,r.post)(t,n,a||null).then(s).catch(u||null);case 6:e.next=9;break;case 8:(0,r.post)(t,n,a||null).then(s).catch(u||null);case 9:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function d(e,t,n,r,a,i){return m.apply(this,arguments)}function m(){return(m=o(regeneratorRuntime.mark((function e(t,n,a,i,o,l){var s,u;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(u=function(e){l instanceof Function&&l(e)},s=function(e){o instanceof Function&&o(e)},n=n||{},!i){e.next=8;break}return e.next=6,(0,r.put)(t,n,a||null).then(s).catch(u||null);case 6:e.next=9;break;case 8:(0,r.put)(t,n,a||null).then(s).catch(u||null);case 9:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function f(e,t,n,r,a){return p.apply(this,arguments)}function p(){return(p=o(regeneratorRuntime.mark((function e(t,n,r,i,o){var l,s;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(s=function(e){o instanceof Function&&o(e)},l=function(e){i instanceof Function&&i(e)},n=n||{},!r){e.next=8;break}return e.next=6,a().delete(t,n||null).then(l).catch(s||null);case 6:e.next=9;break;case 8:a().delete(t,n||null).then(l).catch(s||null);case 9:case"end":return e.stop()}}),e)})))).apply(this,arguments)}},7959:function(e,t,n){"use strict";n.r(t),n(5677),n(6394),n(506),n(3224),n(597),n(3543),n(5210),n(5785),n(91),n(9595),n(3357),n(1816),n(5292),n(7445),n(4875),n(1608),n(2994),n(284),n(601),n(9494),n(6229),n(9149),n(9503),n(9617),n(1962),n(8097),n(2322),n(3296),n(4669),n(7441),n(2070),n(3675),n(2129),n(9268),n(2004),n(8407),n(8288),n(4655),n(288),n(4458),n(5101),n(3080);var r,a=n(1590),i=n.n(a),o=n(9722),l=n(473),s=n(9479);function u(e){return(u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function c(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n=i)&&Object.keys(r.O).every((function(e){return r.O[e](n[s])}))?n.splice(s--,1):(l=!1,i0&&e[u-1][2]>i;u--)e[u]=e[u-1];e[u]=[n,a,i]},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,{a:t}),t},r.d=function(e,t){for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.j=411,function(){var e={411:0};r.O.j=function(t){return 0===e[t]};var t=function(t,n){var a,i,o=n[0],l=n[1],s=n[2],u=0;for(a in l)r.o(l,a)&&(r.m[a]=l[a]);if(s)var c=s(r);for(t&&t(n);u