/*!CK:1428650832!*//*1459382618,*/

if (self.CavalryLogger) { CavalryLogger.start_js(["x6alu"]); }

__d("VideoChainingCaller",[],function a(b,c,d,e,f,g){c.__markCompiled&&c.__markCompiled();f.exports={INTERNAL:"internal",WWW_FEED_PIVOTS:"www_feed_pivots",WWW_FEED_SNOWLIFT:"www_feed_snowlift",MISC_PHOTO_SET:"misc_photo_set",MOBILE:"mobile",SEARCH:"search",WWW_FEED_RHC:"www_feed_rhc",WWW_PERMALINK:"www_permalink",MY_VIDEO_CHANNELS_ENT_QUERY:"my_video_channels_ent_query",TOP_FOLLOWED_VIDEO_CHANNELS_ENT_QUERY:"top_followed_video_channels_ent_query",BADGE:"badge",PAGINATION:"pagination",SUBTITLE:"subtitle",CHANNEL_VIEW_FROM_UNKNOWN:"channel_view_from_unknown",CHANNEL_VIEW_FROM_NEWSFEED:"channel_view_from_newsfeed",CHANNEL_VIEW_FROM_SEARCH:"channel_view_from_search",CHANNEL_VIEW_FROM_NEWSFEED_PIVOT:"channel_view_from_newsfeed_pivot",NEWSFEED_PIVOT_INLINE:"newsfeed_pivot_inline",CHANNEL_VIEW_FROM_PAGE_CALL_TO_ACTION:"channel_view_from_page_call_to_action",CHANNEL_VIEW_FROM_PAGE_TIMELINE:"channel_view_from_page_timeline",CHANNEL_VIEW_FROM_PAGE_TIMELINE_FEATURED:"channel_view_from_page_timeline_featured",CHANNEL_VIEW_FROM_PAGE_VIDEO_TAB:"channel_view_from_page_video_tab",CHANNEL_VIEW_FROM_USER_TIMELINE:"channel_view_from_user_timeline",CHANNEL_VIEW_FROM_USER_VIDEO_TAB:"channel_view_from_user_video_tab",CHANNEL_VIEW_FROM_GROUP_TIMELINE:"channel_view_from_group_timeline",CHANNEL_VIEW_FROM_GROUP_VIDEO_TAB:"channel_view_from_group_video_tab",CHANNEL_VIEW_FROM_SAVED_STORY:"channel_view_from_saved_story",SAVED_STORY_INLINE:"saved_story_inline",CHANNEL_VIEW_FROM_SHARED_WITH_YOU_STORY:"channel_view_from_shared_with_you_story",SHARED_WITH_YOU_STORY_INLINE:"shared_with_you_story_inline",CHANNEL_VIEW_FROM_LATEST_FROM_YOUR_CHANNELS_STORY:"channel_view_from_latest_from_your_channels_story",LATEST_FROM_YOUR_CHANNELS_STORY_INLINE:"latest_from_your_channels_story_inline",CHANNEL_VIEW_FROM_CHANNEL_PIVOT:"channel_view_from_channel_pivot",CHANNEL_PIVOT_INLINE:"channel_pivot_inine",CHANNEL_VIEW_FROM_CHANNEL_RECOMMENDED_CHANNEL_STORY:"channel_view_from_recommended_channel_story",RECOMMENDED_CHANNEL_STORY_INLINE:"recommended_channel_story_inline",CHANNEL_VIEW_FROM_VIDEO_HOME:"channel_view_from_video_home",VIDEO_HOME_INLINE:"video_home_inline",VIDEO_HOME_FEED:"video_home_feed",FEED_SURVEY_SWIPE:"feed_survey_swipe",FEED_PIVOTS_INLINE:"feed_pivots_inline",CHANNEL_VIEW_FROM_FEED_PIVOTS:"channel_view_from_feed_pivots",VIDEO_SETS_CACHE_REFRESH:"video_sets_cache_refresh",VIDEO_SETS_CACHE_CHECK:"video_sets_cache_check",DUMMY_STORY_RECOMMENDED_VIDEOS:"dummy_story_recommended_videos",DUMMY_STORY_FRIENDS_ENJOYING:"dummy_story_friends_enjoying",DUMMY_STORY_FRIENDS_ENJOYING_NOW:"dummy_story_friends_enjoying_now",DUMMY_STORY_DUMMY_ACTION:"dummy_story_dummy_action",OCULUS_VIDEO:"oculus_video",TRENDING_DEMOGRAPHICS_LIVE:"trending_demographics_live"};},null);
__d("VideoChannelLoggerEvents",[],function a(b,c,d,e,f,g){c.__markCompiled&&c.__markCompiled();f.exports={SESSION_START:"session_start",SESSION_PAUSE:"session_pause",SESSION_RESUME:"session_resume",SESSION_END:"session_end",IMPRESSION:"impression",VPV:"vpv",CLICK:"click",FOLLOW:"follow",UNFOLLOW:"unfollow",SUBSCRIBE:"subscribe",UNSUBSCRIBE:"unsubscribe",PIN_TOPIC:"pin_topic",UNPIN_TOPIC:"unpin_topic",MARK_VISIT:"mark_visit",AUTO_ADVANCE:"auto_advance",STORY_FETCH_RESULTS:"story_fetch_results",FETCH_FIRST_STORY:"fetch_first_story_success",FETCH_STORIES_FROM_ENTQUERY:"fetch_stories_from_entquery",FETCH_STORIES_FORWARD:"fetch_stories_forward",FETCH_STORIES_BACKWARD:"fetch_stories_backward",FETCH_FIRST_STORY_SUCCESS:"fetch_first_story_success",FETCH_FIRST_STORY_ERROR:"fetch_first_story_error",FETCH_STORIES_FROM_ENTQUERY_SUCCESS:"fetch_stories_from_entquery_success",FETCH_STORIES_FROM_ENTQUERY_ERROR:"fetch_stories_from_entquery_error",FETCH_STORIES_FORWARD_SUCCESS:"fetch_stories_forward_success",FETCH_STORIES_FORWARD_ERROR:"fetch_stories_forward_error",FETCH_STORIES_BACKWARD_SUCCESS:"fetch_stories_backward_success",FETCH_STORIES_BACKWARD_ERROR:"fetch_stories_backward_error"};},null);
__d("VideoChannelLoggerFields",[],function a(b,c,d,e,f,g){c.__markCompiled&&c.__markCompiled();f.exports={EVENT_TARGET:"event_target",EVENT_TARGET_INFO:"event_target_info",ENTRY_POINT:"entry_point",ENTRY_POINT_TYPE:"entry_point_type",ENTRY_POINT_VALUE:"entry_point_value",EXIT_POINT_TYPE:"exit_point_type",EXIT_POINT_VALUE:"exit_point_value",FOLLOW_SURFACE:"follow_surface",EVENT:"event",IS_AD:"is_ad",IS_EMPLOYEE:"is_employee",IS_TEST_USER:"is_test_user",PERF_TIME_MS:"perf_time_ms",REQUEST_STATUS:"request_status",POSITION_IN_CHANNEL:"position_in_channel",SESSION_ID:"session_id",SUBSCRIPTION_SURFACE:"subscription_surface",STORY_ID:"story_id",STORY_FETCH_COUNT:"story_fetch_count",STORY_FETCH_CURSOR:"story_fetch_cursor",STORY_FETCH_LIMIT:"story_fetch_limit",TIME_SINCE_START:"time_since_start",TRACKING_DATA:"tracking_data",VIDEO_ID:"video",VIDEO_CHAINING_CALLER:"video_chaining_caller",VIDEO_CHANNEL_ID:"video_channel_id",VIDEO_CHANNEL_TYPE:"video_channel_type",VIDEO_CHANNEL_TITLE:"video_channel_title",VIDEO_HOME_SESSION_ID:"video_home_session_id"};},null);
__d("VideoHomeEvents",[],function a(b,c,d,e,f,g){c.__markCompiled&&c.__markCompiled();f.exports={SESSION_PREFETCH:"session_prefetch",SESSION_START:"session_start",SESSION_PAUSE:"session_pause",SESSION_RESUME:"session_resume",SESSION_END:"session_end",FOLLOW:"follow",UNFOLLOW:"unfollow",SUBSCRIBE:"subscribe",UNSUBSCRIBE:"unsubscribe",PIN_TOPIC:"pin_topic",UNPIN_TOPIC:"unpin_topic",MARK_VISIT:"mark_visit",NAVIGATION:"navigation",OPEN_DIVEBAR:"open_divebar",CONTENT:"content",PULL_TO_REFRESH:"pull_to_refresh",BADGE_FETCHED:"badge_fetched",BADGE_COUNT_FETCH:"badge_count_fetch",GRAPHQL_BADGE_UPDATE_SUBSCRIPTION:"graphql_badge_update_subscription",BADGE_COUNT_FETCH_ON_BADGE_PUSH:"badge_count_fetch_on_badge_push",EMPTY_UNIT:"empty_unit",INVALID_UNIT:"invalid_unit",NO_ITEMS_WITH_HAS_NEXT_PAGE:"no_items_with_has_next_page",COLLAPSED_IMPRESSION:"collapsed_impression",COLLAPSED_NO_VIDEO:"collapsed_no_video",COLLAPSED_WAS_LIVE_LIMIT_IMPRESSION:"collapsed_was_live_limit_impression",IMPRESSION:"impression",VPV:"vpv",VPVD:"vpvd",VPV_DURATION:"vpv_duration",CLICK:"click",DUPLICATE:"duplicate",BACKGROUNDED:"backgrounded",FOREGROUNDED:"foregrounded",LOAD_LOADING_CARD_VIEW:"load_loading_card_view",LOAD_ITEMS_LOADING_CARD_VIEW:"load_items_loading_card_view",TTI:"tti",E2E:"e2e",LOAD_SECTION:"load_section",LOAD_ITEMS:"load_items",REACTION_FETCH_UNITS:"reaction_fetch_units",REACTION_UNIT_ID_MEMCACHE_HIT:"reaction_unit_id_memcache_hit",REACTION_UNIT_ID_MEMCACHE_MISS:"reaction_unit_id_memcache_miss"};},null);
__d("VideoHomeEventTargets",[],function a(b,c,d,e,f,g){c.__markCompiled&&c.__markCompiled();f.exports={BOOKMARK:"bookmark",CHANNEL:"channel",STORY:"story",VIDEO:"video",BUTTON:"button",NONE:"none"};},null);
__d("VideoHomeExitPointTypes",[],function a(b,c,d,e,f,g){c.__markCompiled&&c.__markCompiled();f.exports={BACK:"back",URL:"url",BACKGROUND:"background",CHANNEL:"channel",TAB:"tab",DIVEBAR:"divebar",MESSENGER:"messenger",FACECAST:"facecast",LIVE_FULLSCREEN:"live_fullscreen",FULLSCREEN:"fullscreen",SEARCH:"search",UNKNOWN:"unknown"};},null);
__d("VideoHomeLoggerFields",[],function a(b,c,d,e,f,g){c.__markCompiled&&c.__markCompiled();f.exports={BADGE_COUNT:"badge_count",BADGE_FETCH_REASON:"badge_fetch_reason",CHANNEL_ID:"channel_id",CLICK_TARGET:"click_target",DATA_SOURCE:"data_source",EVENT:"event",EVENT_TARGET:"event_target",EVENT_TARGET_ID:"event_target_id",ENTRY_POINT_TYPE:"entry_point_type",ENTRY_POINT_VALUE:"entry_point_value",EXIT_POINT_TYPE:"exit_point_type",EXIT_POINT_VALUE:"exit_point_value",FETCH_COUNT:"fetch_count",FETCH_CURSOR:"fetch_cursor",IS_EMPLOYEE:"is_employee",IS_TEST_USER:"is_test_user",IS_LIVE_STREAMING:"is_live_streaming",IS_BROADCAST:"is_broadcast",INITIAL_REQUEST:"initial_request",LOADING_DATA_TYPE:"loading_data_type",REQUEST_STATUS:"request_status",OLD_BADGE_COUNT:"old_badge_count",PERF_TIME_MS:"perf_time_ms",SESSION_DURATION:"session_duration",UNIT_POSITION:"unit_position",POSITION_IN_UNIT:"position_in_unit",NEW_BADGE_COUNT:"new_badge_count",SESSION_ID:"session_id",VIDEO_ID:"video",VIDEO_CHANNEL_TYPE:"video_channel_type",VIDEO_CHANNEL_TITLE:"video_channel_title",TRACKING_DATA:"tracking_data",TAB_OPTION:"tab_option",REACTION_REQUEST_TYPE:"reaction_request_type",REACTION_UNIT_TYPE:"reaction_unit_type",REACTION_UNIT_NAME:"reaction_unit_name",TTI_TYPE:"tti_type",DURATION:"duration",LIVE_NOW_COUNT:"live_now_count",CLIENT_EVENT_TIME:"client_event_time",LAST_VISIT_TIME:"last_visit_time",EVENT_TARGET_INFO:"event_target_info",DUPLICATE_STORY_ID:"duplicate_story_id",CLICK_POINT:"click_point",DEST_MODULE:"dest_module",DEST_MODULE_CLASS:"dest_module_class",MODULE_CLASS:"module_class",SOURCE_MODULE:"source_module"};},null);
__d("VideoPlayerLoggerEvent",[],function a(b,c,d,e,f,g){c.__markCompiled&&c.__markCompiled();f.exports={AUTOPLAY_PREFERENCE_CHANGED:"autoplay_preference_changed",END_STALL_TIME:"end_stall_time",AUTOPLAY_PREFERENCE_STATUS:"autoplay_preference_status",ERROR_ALERT_SHOWN:"video_error_alert_shown",NOT_AUTOPLAYING:"not_autoplaying",VIDEO_CHANNEL_NO_RELATED_VIDEO:"video_channel_no_related_video",VIDEO_ORIENTATION_CHANGED:"video_orientation_changed",ASSETS_LOADED:"assets_loaded",BUFFERED:"buffered",CANCELLED_REQUESTED_PLAYING:"cancelled_requested_playing",CAROUSEL_CHANGE:"carousel_change",CHROMECAST_AVAILABILITY_CHECKED:"chromecast_availabilty_checked",CHROMECAST_CAST_CLICKED:"chromecast_button_clicked",CHROMECAST_CAST_CONNECTED:"chromecast_connected",CHROMECAST_CAST_DISABLED:"chromecast_button_disabled",CHROMECAST_CAST_DISCONNECTED:"chromecast_disconnected",CHROMECAST_CAST_RECONNECTED:"chromecast_reconnected",CHROMECAST_CAST_VISIBLE:"chromecast_button_visible",CHROMECAST_NOT_SUPPORTED:"chromecast_not_supported",DISPLAYED:"displayed",ENTERED_HD:"entered_hd",ENTERED_FALLBACK:"entered_fallback",ENTERED_FS:"entered_fs",EXITED_HD:"exited_hd",EXITED_FS:"exited_fs",ERROR:"error",FINISHED_LOADING:"finished_loading",FINISHED_PLAYING:"finished_playing",HTTP_STATUS_UPDATE:"http_status_update",IMPRESSION:"impression",INVALID_URL:"invalid_url",MUTED:"muted",NO_SURFACE_UPDATE:"no_surface_update",PAUSED:"paused",PLAY_REQUESTED:"play_requested",PLAYER_FORMAT_CHANGED:"player_format_changed",PLAYER_LOADED:"player_loaded",PROGRESS:"progress",STREAM_RESET:"stream_reset",POP_FAILOVER:"pop_failover",SURFACE_UPDATED:"surface_updated",TOGGLE_SUBTITLE_OFF:"toggle_subtitle_off",TOGGLE_SUBTITLE_ON:"toggle_subtitle_on",QUALITY_CHANGE:"quality_change",READY_TO_PLAY:"ready_to_play",REPLAYED:"replayed",REPRESENTATION_ENDED:"representation_ended",REQUESTED:"requested",REQUESTED_PLAYING:"requested_playing",SCRUBBED:"scrubbed",STARTED_PLAYING:"started_playing",STARTED_RECEIVING_BYTES:"started_receiving_bytes",STOPPED_PLAYING:"stopped_playing",UNMUTED:"unmuted",UNPAUSED:"unpaused",VOLUME_CHANGED:"volume_changed",VOLUME_DECREASE:"volume_decrease",VOLUME_INCREASE:"volume_increase",VIDEO_PLAYING:"video_playing",VIDEO_SKIP_AD:"video_skip_ad",VIDEO_CHAINING_IMPRESSION:"video_chaining_impression",VIDEO_CHAINING_TAP:"video_chaining_tap",PLAYING_LIVE_STARTED:"playing_live_started",PLAYING_LIVE_STOPPED:"playing_live_stopped",SWITCHED_IMPLEMENTATION:"switched_implementation",INLINE_CLICK_TO_PLAY:"inline_click_to_play",VIDEO_PLAYER_SERVICE_DISCONNECTED:"video_player_service_disconnected",VIDEO_PLAYER_SERVICE_RECONNECTED:"video_player_service_reconnected",VIDEO_PLAYER_SERVICE_UNAVAILABLE:"video_player_service_unavailable",LIVE_SEGMENT_LOAD_ERROR:"live_segment_load_error",MANIFEST_LOAD_ERROR:"manifest_load_error",MANIFEST_DATA_TYPE_ERROR:"manifest_data_type_error",STREAM_SEGMENT_LOAD_ERROR:"stream_segment_load_error",PLAYHEAD_FELL_BEHIND_ERROR:"playhead_fell_behind_error",UNEXPECTED_SEGMENT_ERROR:"unexpected_segment_error",NETWORK_TIMEOUT:"network_timeout",COMPLETION:"completion",VIEW:"view"};},null);
__d('VideoChannelViewChainLengthManager',['guid','Map'],function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();var h={generateNewSessionID:function(){this._currentSessionID=c('guid')();this._videoIDToDepthMap=new (c('Map'))();},getLoggingData:function(){return {video_chaining_depth_level:this.getCurrentChainLength(),video_chaining_session_id:this.getCurrentSessionID()};},registerChainingInfos:function(i,j){var k=i;if(j){var l=j.decode();k=l.root_id;}if(k)k=k.toString();this.registerVideoID(k,i);},registerVideoID:function(i,j){var k=0;if(i!==j)k=1;if(!this._currentRootVideoID||this._currentRootVideoID!==i){this.generateNewSessionID();this._currentRootVideoID=i;this._chainLength=k;this._videoIDToDepthMap.set(j,k);}if(!this._videoIDToDepthMap.has(j)){this._chainLength++;this._videoIDToDepthMap.set(j,this._chainLength);}this._currentVideoID=j;},getCurrentSessionID:function(){return this._currentSessionID;},getCurrentChainLength:function(){if(!this._currentVideoID||!this._videoIDToDepthMap)return null;return this._videoIDToDepthMap.get(this._currentVideoID);}};f.exports=h;},null);
__d("VideoChannel",[],function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();var h=null,i={get:function(){return h;},set:function(j){h=j;}};f.exports=i;},null);
__d('VideoChannelLogger',['Arbiter','Banzai','BanzaiLogger','Run','VideoChannelLoggerEvents','VideoChannelLoggerFields','VideoChannelViewChainLengthManager'],function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();var h=0,i=null,j=null,k=0,l=null,m={startSession:function(n,o,p){i=o;j=p;c('Arbiter').inform('LogEnterChannel',o);c('VideoChannelViewChainLengthManager').registerVideoID(n,n);var q={};q[c('VideoChannelLoggerFields').EVENT]=c('VideoChannelLoggerEvents').SESSION_START;m.log(q);h=Date.now();c('Run').onLeave(m.endSession);c('Banzai').subscribe(c('Banzai').SHUTDOWN,m.endSession);},endSession:function(){if(i){c('Arbiter').inform('LogExitChannel',i);var n={};n[c('VideoChannelLoggerFields').EVENT]=c('VideoChannelLoggerEvents').SESSION_END;m.log(n);i=null;j=null;l=null;h=0;}},setOffset:function(n){k=n;},setPosition:function(n){l=n;},getPlayerLoggingData:function(){if(!i)return {};return {video_channel_id:i,position_in_channel:l+k};},log:function(n){n[c('VideoChannelLoggerFields').SESSION_ID]=c('VideoChannelViewChainLengthManager').getCurrentSessionID();n[c('VideoChannelLoggerFields').VIDEO_CHANNEL_ID]=i;n[c('VideoChannelLoggerFields').VIDEO_CHAINING_CALLER]=j;if(!(c('VideoChannelLoggerFields').POSITION_IN_CHANNEL in n))n[c('VideoChannelLoggerFields').POSITION_IN_CHANNEL]=l+k;if(h){var o=Date.now()-h;n[c('VideoChannelLoggerFields').TIME_SINCE_START]=o+.001;}c('BanzaiLogger').log('VideoChannelLoggerConfig',n);}};f.exports=m;},null);
__d('logVideosClickTracking',['clickRefAction'],function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();function h(i){c('clickRefAction')('click',i,null,'FORCE');}f.exports=h;},null);
__d('VideoWithClickPlayPause',['VideoPlayerReason','logVideosClickTracking'],function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();function h(i){'use strict';this.$VideoWithClickPlayPause1=i;this.$VideoWithClickPlayPause2=this.$VideoWithClickPlayPause1.getVideoNode();this.$VideoWithClickPlayPause1.addListener('clickVideo',this.$VideoWithClickPlayPause3.bind(this));if(this.$VideoWithClickPlayPause1.hasSeenClick())this.$VideoWithClickPlayPause3();}h.prototype.$VideoWithClickPlayPause3=function(){'use strict';if(this.$VideoWithClickPlayPause1.isState('playing')){this.$VideoWithClickPlayPause1.pause(c('VideoPlayerReason').USER);}else{c('logVideosClickTracking')(this.$VideoWithClickPlayPause2);this.$VideoWithClickPlayPause1.play(c('VideoPlayerReason').USER);}};f.exports=h;},null);
__d('VideoAutoplayControllerBase',['Arbiter','DesktopHscrollUnitEventConstants','Event','VideoPlayerAbortLoadingExperiment','VideoPlayerReason','Visibility','destroyOnUnload','SubscriptionsHandler','throttle'],function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();function h(i){'use strict';this.$VideoAutoplayControllerBase3=null;this.$VideoAutoplayControllerBase2=null;this.$VideoAutoplayControllerBase6=[];this.$VideoAutoplayControllerBase1=i;this.$VideoAutoplayControllerBase4=null;this.$VideoAutoplayControllerBase5=new (c('SubscriptionsHandler'))();c('destroyOnUnload')(function(){this.$VideoAutoplayControllerBase6=[];this.$VideoAutoplayControllerBase3=null;if(this.$VideoAutoplayControllerBase4){this.$VideoAutoplayControllerBase4.remove();this.$VideoAutoplayControllerBase4=null;}this.$VideoAutoplayControllerBase5.release();}.bind(this));}h.prototype.getVideoUnits=function(){'use strict';return this.$VideoAutoplayControllerBase6;};h.prototype.setVideoUnits=function(i){'use strict';this.$VideoAutoplayControllerBase6=i;};h.prototype.addVideoUnit=function(i){'use strict';this.$VideoAutoplayControllerBase6.push(i);};h.prototype.getPlayingVideoUnit=function(){'use strict';return this.$VideoAutoplayControllerBase3;};h.prototype.setPlayingVideoUnit=function(i){'use strict';this.$VideoAutoplayControllerBase3=i;if(this.$VideoAutoplayControllerBase3)this.setupPlayingVideoUnitSubscriptions();};h.prototype.playVideo=function(i,j){'use strict';this.setPlayingVideoUnit(i);if(this.$VideoAutoplayControllerBase3)this.$VideoAutoplayControllerBase3.playWithoutUnmute(j);};h.prototype.setupPlayingVideoUnitSubscriptions=function(){'use strict';throw new Error('Should be overridden');};h.prototype.addSubscriberVideoUnit=function(){'use strict';if(!this.getVideoUnits().length){this.$VideoAutoplayControllerBase5.addSubscriptions(c('Event').listen(window,'resize',this.updateAutoplay.bind(this)),c('Event').listen(window,'blur',this.$VideoAutoplayControllerBase7.bind(this)),c('Event').listen(window,'focus',this.$VideoAutoplayControllerBase8.bind(this)),c('Visibility').addListener(c('Visibility').HIDDEN,this.$VideoAutoplayControllerBase7.bind(this)),c('Visibility').addListener(c('Visibility').VISIBLE,this.$VideoAutoplayControllerBase8.bind(this)),c('Arbiter').subscribe(c('DesktopHscrollUnitEventConstants').HSCROLL_ITEM_SHOWN_EVENT,this.updateAutoplay.bind(this)));if(!this.$VideoAutoplayControllerBase9())this.$VideoAutoplayControllerBase10();}};h.prototype.$VideoAutoplayControllerBase7=function(){'use strict';if(!this.$VideoAutoplayControllerBase2){this.$VideoAutoplayControllerBase2=this.getPlayingVideoUnit();this.pausePlayingVideo(c('VideoPlayerReason').PAGE_VISIBILITY);}};h.prototype.$VideoAutoplayControllerBase8=function(){'use strict';if(this.$VideoAutoplayControllerBase2){this.playVideo(this.$VideoAutoplayControllerBase2,c('VideoPlayerReason').PAGE_VISIBILITY);this.$VideoAutoplayControllerBase2=null;}};h.prototype.$VideoAutoplayControllerBase10=function(){'use strict';if(this.$VideoAutoplayControllerBase4)this.$VideoAutoplayControllerBase4.remove();this.$VideoAutoplayControllerBase4=c('Event').listen(window,'scroll',c('throttle')(this.updateAutoplay.bind(this),this.$VideoAutoplayControllerBase1));};h.prototype.$VideoAutoplayControllerBase9=function(){'use strict';return !!this.$VideoAutoplayControllerBase4;};h.prototype.getClosestVideoUnits=function(i){'use strict';return this.$VideoAutoplayControllerBase6.filter(function(j){return j.getDistanceToViewport()>=0;}).sort(function(j,k){return (j.getDistanceToViewport()-k.getDistanceToViewport());}).slice(0,i);};h.prototype.getVisibleUnits=function(){'use strict';var i=[];this.$VideoAutoplayControllerBase6.forEach(function(j){if(j.isVisible()){i.push(j);if(!j.wasVisible){j.wasVisible=true;j.logDisplayed();}}else j.wasVisible=false;});return i;};h.prototype.pausePlayingVideo=function(i){'use strict';var j=this.$VideoAutoplayControllerBase3;if(j){j.pause(i);if(c('VideoPlayerAbortLoadingExperiment').canAbort&&!j.getIsInChannel())j.abortLoading();this.$VideoAutoplayControllerBase3=null;}};h.prototype.updateAutoplay=function(){'use strict';throw new Error('Should be overridden');};f.exports=h;},null);
__d("XVideoAutoplayNuxAsyncController",["XController"],function a(b,c,d,e,f,g){c.__markCompiled&&c.__markCompiled();f.exports=c("XController").create("\/video\/autoplay\/nux\/",{});},null);
__d("XVideoAutoplayNuxDismissAsyncController",["XController"],function a(b,c,d,e,f,g){c.__markCompiled&&c.__markCompiled();f.exports=c("XController").create("\/video\/autoplay\/nux\/dismiss\/",{});},null);
__d("XVideoAutoplayNuxLogViewAsyncController",["XController"],function a(b,c,d,e,f,g){c.__markCompiled&&c.__markCompiled();f.exports=c("XController").create("\/video\/autoplay\/nux\/log\/view\/",{});},null);
__d('VideoAutoplayControllerX',['csx','AsyncRequest','DOM','Event','SubscriptionsHandler','VideoAutoplayControllerBase','VideoPlayerPreloadExperiment','VideoPlayerReason','XVideoAutoplayNuxAsyncController','XVideoAutoplayNuxDismissAsyncController','XVideoAutoplayNuxLogViewAsyncController','destroyOnUnload','getViewportDimensions'],function a(b,c,d,e,f,g,h){var i,j;if(c.__markCompiled)c.__markCompiled();var k=null,l=500;i=babelHelpers.inherits(m,c('VideoAutoplayControllerBase'));j=i&&i.prototype;function m(){'use strict';j.constructor.call(this,l);this.$VideoAutoplayControllerX1=new (c('SubscriptionsHandler'))();this.$VideoAutoplayControllerX2=true;this.$VideoAutoplayControllerX3=null;this.$VideoAutoplayControllerX4=null;this.$VideoAutoplayControllerX5=false;var n=c('XVideoAutoplayNuxAsyncController').getURIBuilder().getURI();new (c('AsyncRequest'))(n).send();c('destroyOnUnload')(function(){this.$VideoAutoplayControllerX6();if(this===k)k=null;}.bind(this));}m.registerVideoUnit=function(n){'use strict';if(k==null)k=new m();k.addSubscriberVideoUnit();k.addVideoUnit(n);if(n.isVisible())k.updateAutoplay();};m.setShouldAutoplay=function(n){'use strict';if(k==null)k=new m();k.$VideoAutoplayControllerX2=n;k.updateAutoplay();};m.prototype.$VideoAutoplayControllerX6=function(){'use strict';this.$VideoAutoplayControllerX1.release();};m.setAutoplayNux=function(n,o){'use strict';if(k==null)return;k.$VideoAutoplayControllerX3=n;k.$VideoAutoplayControllerX4=o;k.$VideoAutoplayControllerX5=true;var p=c('DOM').find(o.getContentRoot(),"._5cqr");c('Event').listen(p,'click',function(){k.$VideoAutoplayControllerX7();});var q=c('DOM').scry(o.getContentRoot(),"._36gl")[0];if(q)c('Event').listen(q,'click',function(){k.$VideoAutoplayControllerX7();});};m.prototype.$VideoAutoplayControllerX7=function(){'use strict';this.$VideoAutoplayControllerX4.hide();this.$VideoAutoplayControllerX5=false;var n=c('XVideoAutoplayNuxDismissAsyncController').getURIBuilder().getURI();new (c('AsyncRequest'))(n).send();};m.prototype.setupPlayingVideoUnitSubscriptions=function(){'use strict';if(this.getPlayingVideoUnit().addListener){this.$VideoAutoplayControllerX1.release();this.$VideoAutoplayControllerX1.engage();if(!this.getPlayingVideoUnit().isLooping())this.$VideoAutoplayControllerX1.addSubscriptions(this.getPlayingVideoUnit().addListener('finishPlayback',function(){this.setPlayingVideoUnit(null);}.bind(this)));this.$VideoAutoplayControllerX1.addSubscriptions(this.getPlayingVideoUnit().addListener('turnOffAutoplay',function(){this.setPlayingVideoUnit(null);}.bind(this)));}};m.prototype.showAutoplayNUX=function(n){'use strict';if(this.$VideoAutoplayControllerX4&&!this.$VideoAutoplayControllerX4.isShown()){var o=n.getVideoPlayerController().getRootNode();c('DOM').prependContent(o,this.$VideoAutoplayControllerX3);this.$VideoAutoplayControllerX4.show();var p=c('XVideoAutoplayNuxLogViewAsyncController').getURIBuilder().getURI();new (c('AsyncRequest'))(p).send();}this.$VideoAutoplayControllerX5=false;};m.getChannelVideos=function(){'use strict';if(k)return k.getVideoUnits().filter(function(n){return n.getIsInChannel();});return null;};m.prototype.updateAutoplay=function(){'use strict';if(!this.$VideoAutoplayControllerX2){this.pausePlayingVideo(c('VideoPlayerReason').AUTOPLAY);return;}var n=this.getVisibleUnits();this.getClosestVideoUnits(c('VideoPlayerPreloadExperiment').preloadVideosCount).forEach(function(r){return r.preload();});var o=n.length,p=null;if(o==1){p=n[0];p=p.isAutoplayable()?p:null;}else if(o>1){var q=c('getViewportDimensions')().height/2;n.forEach(function(r){if(!r.isAutoplayable())return;var s=r.getDOMPosition(),t=s.y+s.height/2,u=Math.abs(t-q);r.playPriority=u;if(!p||r.playPriority<p.playPriority)p=r;});}if(this.getPlayingVideoUnit()){if(p!=this.getPlayingVideoUnit()){this.pausePlayingVideo(c('VideoPlayerReason').AUTOPLAY);this.playVideo(p,c('VideoPlayerReason').AUTOPLAY);if(this.$VideoAutoplayControllerX5)this.showAutoplayNUX(p);}}else if(p){this.playVideo(p,c('VideoPlayerReason').AUTOPLAY);if(this.$VideoAutoplayControllerX5)this.showAutoplayNUX(p);}};f.exports=m;},null);
__d('VideoAutoplayPlayerBase',['EventEmitter'],function a(b,c,d,e,f,g){var h,i;if(c.__markCompiled)c.__markCompiled();h=babelHelpers.inherits(j,c('EventEmitter'));i=h&&h.prototype;function j(){'use strict';i.constructor.call(this);}j.prototype.isVisible=function(){'use strict';throw new Error('Should be overridden');};j.prototype.getDistanceToViewport=function(){'use strict';throw new Error('Should be overridden');};j.prototype.logDisplayed=function(){'use strict';throw new Error('Should be overridden');};j.prototype.playWithoutUnmute=function(k){'use strict';throw new Error('Should be overridden');};j.prototype.pause=function(k){'use strict';throw new Error('Should be overridden');};j.prototype.isAutoplayable=function(){'use strict';throw new Error('Should be overridden');};j.prototype.getDOMPosition=function(){'use strict';throw new Error('Should be overridden');};j.prototype.isLooping=function(){'use strict';throw new Error('Should be overridden');};f.exports=j;},null);
__d('VideoCTAEndscreen',['cx','Arbiter','AttachmentRelatedShareConstants','CSS','Event','Focus','SubscriptionsHandler','VideoPlayerReason','VideoPlayerLoggerEvent','logVideosClickTracking'],function a(b,c,d,e,f,g,h){if(c.__markCompiled)c.__markCompiled();function i(j,k){'use strict';this.$VideoCTAEndscreen1=j;this.$VideoCTAEndscreen2=k.endscreenElement;this.$VideoCTAEndscreen3=k.replayElement;this.$VideoCTAEndscreen4=k.ctaElement;this.$VideoCTAEndscreen5=k.isPausescreen;this.$VideoCTAEndscreen6=new (c('SubscriptionsHandler'))();this.$VideoCTAEndscreen6.addSubscriptions(c('Event').listen(this.$VideoCTAEndscreen3,'click',function(){return this.$VideoCTAEndscreen7();}.bind(this)),c('Event').listen(this.$VideoCTAEndscreen4,'click',function(){return this.$VideoCTAEndscreen8();}.bind(this)),j.addListener('beginPlayback',function(){return this.$VideoCTAEndscreen9();}.bind(this)));if(this.$VideoCTAEndscreen5){this.$VideoCTAEndscreen6.addSubscriptions(j.addListener('pausePlayback',function(){return this.$VideoCTAEndscreen10();}.bind(this)));}else this.$VideoCTAEndscreen6.addSubscriptions(j.addListener('finishPlayback',function(){return this.$VideoCTAEndscreen11();}.bind(this)));}i.prototype.$VideoCTAEndscreen7=function(){'use strict';var j={reason:c('VideoPlayerReason').USER};this.$VideoCTAEndscreen1.clickVideo();var k=this.$VideoCTAEndscreen1.getVideoNode();if(this.$VideoCTAEndscreen1.isState('paused')){this.$VideoCTAEndscreen1.logEvent(c('VideoPlayerLoggerEvent').UNPAUSED,j);}else if(this.$VideoCTAEndscreen1.isState('finished'))this.$VideoCTAEndscreen1.logEvent(c('VideoPlayerLoggerEvent').REPLAYED,j);c('logVideosClickTracking')(k);c('Focus').set(k);};i.prototype.$VideoCTAEndscreen8=function(){'use strict';c('Arbiter').inform(c('AttachmentRelatedShareConstants').FBVIDEO_CLICK,{attachment:this.$VideoCTAEndscreen1.getRootNode(),fbvideo_id:this.$VideoCTAEndscreen1.getVideoID()});};i.prototype.$VideoCTAEndscreen11=function(){'use strict';if(!this.$VideoCTAEndscreen1.getIsInChannel())this.$VideoCTAEndscreen10();};i.prototype.$VideoCTAEndscreen10=function(){'use strict';c('CSS').addClass(this.$VideoCTAEndscreen2,"_1qbf");};i.prototype.$VideoCTAEndscreen9=function(){'use strict';c('CSS').removeClass(this.$VideoCTAEndscreen2,"_1qbf");};f.exports=i;},null);
__d('VideoHomeViewportTracking',['csx','DOM','VideoHomeEvents','VideoHomeEventTargets','VideoHomeLoggerFields','ViewportTracking'],function a(b,c,d,e,f,g,h){var i,j;if(c.__markCompiled)c.__markCompiled();i=babelHelpers.inherits(k,c('ViewportTracking'));j=i&&i.prototype;k.prototype.getDataFromConfig=function(l){'use strict';this.$VideoHomeViewportTracking1=l.log;this.$VideoHomeViewportTracking2=l.container;};k.prototype.getTimeout=function(){'use strict';return 0;};k.prototype.getAllStories=function(){'use strict';var l=c('DOM').scry(this.$VideoHomeViewportTracking2,"._5bll");return l.filter(function(m){return m.getAttribute('data-home-vpv');});};k.prototype.getStoryID=function(l){'use strict';var m=JSON.parse(l.getAttribute('data-home-vpv'));return m.storyID;};k.prototype.getDataToLog=function(l){'use strict';return JSON.parse(l.getAttribute('data-home-vpv'));};k.prototype.sendDataToLog=function(l,m){'use strict';var n={};n[c('VideoHomeLoggerFields').EVENT]=c('VideoHomeEvents').VPV;n[c('VideoHomeLoggerFields').SESSION_ID]=m.sessionID;n[c('VideoHomeLoggerFields').DATA_SOURCE]=m.dataSource;n[c('VideoHomeLoggerFields').CHANNEL_ID]=m.channelID;n[c('VideoHomeLoggerFields').EVENT_TARGET]=c('VideoHomeEventTargets').STORY;n[c('VideoHomeLoggerFields').EVENT_TARGET_ID]=m.storyID;n[c('VideoHomeLoggerFields').CHANNEL_POSITION]=m.channelPosition;n[c('VideoHomeLoggerFields').POSITION_IN_CHANNEL]=m.positionInChannel;n[c('VideoHomeLoggerFields').TRACKING_DATA]=m.trackingData;this.$VideoHomeViewportTracking1(n);};function k(){'use strict';i.apply(this,arguments);}f.exports=k;},null);
__d('VideoHomeLogger',['Arbiter','Banzai','BanzaiLogger','BigPipe','Run','StreamViewportTracking','VideoHomeExitPointTypes','VideoHomeEvents','VideoHomeLoggerFields','VideoHomeViewportTracking','ViewportTrackingConfig'],function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();var h=void 0,i=void 0,j=void 0,k=0,l={init:function(m){j=m.session_id;k=Date.now();var n=new (c('StreamViewportTracking'))();n.init(c('ViewportTrackingConfig'),m.container);i=n;var o=new (c('VideoHomeViewportTracking'))(),p={log:l.log,container:m.container};o.init(p);h=o;c('Arbiter').subscribe(c('BigPipe').Events.init,function(r,s){var t=s.arbiter;if(t){t.subscribe(c('BigPipe').Events.tti,function(event,u){var v={};v[c('VideoHomeLoggerFields').EVENT]=c('VideoHomeEvents').TTI;v[c('VideoHomeLoggerFields').SESSION_ID]=j;v[c('VideoHomeLoggerFields').PERF_TIME_MS]=Date.now()-k;l.log(v);});t.subscribe(c('BigPipe').Events.loaded,function(event,u){var v={};v[c('VideoHomeLoggerFields').EVENT]=c('VideoHomeEvents').E2E;v[c('VideoHomeLoggerFields').SESSION_ID]=j;v[c('VideoHomeLoggerFields').PERF_TIME_MS]=Date.now()-k;l.log(v);});}});function q(){if(j!==m.session_id)return;var r={};r[c('VideoHomeLoggerFields').EVENT]=c('VideoHomeEvents').SESSION_END;r[c('VideoHomeLoggerFields').SESSION_ID]=j;r[c('VideoHomeLoggerFields').EXIT_POINT_TYPE]=c('VideoHomeExitPointTypes').UNKNOWN;l.log(r);n.updateTimeTrackingData(true);o.updateTimeTrackingData(true);j=null;i=null;h=null;}c('Run').onLeave(q);c('Banzai').subscribe(c('Banzai').SHUTDOWN,q);},updateViewportTracking:function(){if(i){i.fireTimer();i.updateTimeTrackingData(false,'scroll');}if(h){h.fireTimer();h.updateTimeTrackingData(false,'scroll');}},_pause:function(m,n){if(j){var o={};o[c('VideoHomeLoggerFields').EVENT]=c('VideoHomeEvents').SESSION_PAUSE;o[c('VideoHomeLoggerFields').SESSION_ID]=j;o[c('VideoHomeLoggerFields').EXIT_POINT_TYPE]=c('VideoHomeExitPointTypes').CHANNEL;o[c('VideoHomeLoggerFields').EXIT_POINT_VALUE]=n;l.log(o);}},_resume:function(m,n){if(j){var o={};o[c('VideoHomeLoggerFields').EVENT]=c('VideoHomeEvents').SESSION_RESUME;o[c('VideoHomeLoggerFields').SESSION_ID]=j;o[c('VideoHomeLoggerFields').ENTRY_POINT_TYPE]=c('VideoHomeExitPointTypes').CHANNEL;o[c('VideoHomeLoggerFields').EXIT_POINT_VALUE]=n;l.log(o);}},getPlayerLoggingData:function(){return {video_home_session_id:j};},log:function(m){if(j&&k){var n=Date.now()-k;m[c('VideoHomeLoggerFields').TIME_SINCE_START]=n+.001;}c('BanzaiLogger').log('VideoHomeLoggerConfig',m);}};c('Arbiter').subscribe('LogEnterChannel',l._pause);c('Arbiter').subscribe('LogExitChannel',l._resume);f.exports=l;},null);
__d("XVideoDataController",["XController"],function a(b,c,d,e,f,g){c.__markCompiled&&c.__markCompiled();f.exports=c("XController").create("\/video\/video_data\/",{video_id:{type:"String",required:true},width:{type:"Int"},height:{type:"Int"},scrubbing_preference:{type:"Int"}});},null);