/*!CK:2301375408!*//*1459396626,*/

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

__d('SeeFirstProfilePopoverMenu',['PopoverMenu'],function a(b,c,d,e,f,g){var h,i;if(c.__markCompiled)c.__markCompiled();h=babelHelpers.inherits(j,c('PopoverMenu'));i=h&&h.prototype;j.prototype._onMenuDone=function(k){'use strict';};function j(){'use strict';h.apply(this,arguments);}f.exports=j;},null);
__d('legacy:EditSubscriptions',['SubscriptionLevels','EditSubscriptions'],function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();b.SubscriptionLevels=c('SubscriptionLevels');b.EditSubscriptions=c('EditSubscriptions');},3);
__d('FBRTCAvailability',['ChannelConstants','PresenceStatus'],function a(b,c,d,e,f,g){'use strict';if(c.__markCompiled)c.__markCompiled();var h={isCallable:function(i){var j=c('PresenceStatus').getCapabilities(i),k=c('ChannelConstants').CAPABILITY_VOIP_INTEROP;return !!(j&k);}};f.exports=h;},null);
__d('FBRTCStruct',[],function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();var h=function(j,k,l){var m,n;if(typeof j=='string'||j instanceof String){n=j;m=j;}else for(var o in j)if(j.hasOwnProperty(o))if(o==='index'){l=j[o];}else{n=o;m=j[o];}k[n]=l;k.strNames[l]=m;};function i(j){'use strict';this.strNames=[];for(var k=0;k<j.length;k++)h(j[k],this,k);}f.exports=i;},null);
__d('FBRTCConstants',['FBRTCStruct','keyMirror'],function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();var h={OFFER:'offer',ANSWER:'answer',ICE_CANDIDATE:'ice_candidate',OK:'ok',PING:'ping',HANGUP:'hang_up',OTHER_DISMISS:'other_dismiss',MSG_ACK:'msg_ack',PRANSWER:'pranswer',ICERESTART_OFFER:'icerestart_offer',ICERESTART_ANSWER:'icerestart_answer',PCRESTART_OFFER:'pcrestart_offer',PCRESTART_ANSWER:'pcrestart_answer',SDP_UPDATE:'sdp_update',OFFER_ACK:'offer_ack',OFFER_NACK:'offer_nack',ANSWER_ACK:'answer_ack',SET_VIDEO:'set_video',VIDEO_REQUEST:'video_request',ACK:'ack'},i={AUDIO_ONLY:'audio_only',AUDIO_VIDEO:'audio_video',SCREEN_CONTENT:'screen'},j=c('keyMirror')({NO_VIDEO:null,LQ_VIDEO:null,SD_VIDEO:null,HD_VIDEO:null,CUSTOM_VIDEO:null}),k=new (c('FBRTCStruct'))([{IGNORE_CALL:'IgnoreCall'},{HANGUP_CALL:'HangupCall'},{IN_ANOTHER_CALL:'InAnotherCall'},{ACCEPT_AFTER_HANGUP:'CallEndAcceptAfterHangUp'},{NO_ANSWER_TIMEOUT:'NoAnswerTimeout'},{INCOMING_TIMEOUT:'IncomingTimeout'},{OTHER_INSTANCE_HANDLED:'OtherInstanceHandled'},{SIGNALING_MESSAGE_FAILED:'SignalingMessageFailed'},{CONNECTION_DROPPED:'ConnectionDropped'},{CLIENT_INTERRUPTED:'ClientInterrupted'},{WEBRTC_ERROR:'WebRTCError'},{CLIENT_ERROR:'ClientError'},{NO_PERMISSION:'NoPermission'},{OTHER_NOT_CAPABLE:'OtherNotCapable'},{NO_UI_ERROR:'NoUIShown'},{UNSUPPORTED_VERSION:'VersionUnsupported'},{CALLER_NOT_VISIBLE:'CallerNotVisible'},{CARRIER_BLOCKED:'CarrierBlocked'},{OTHER_CARRIER_BLOCKED:'OtherCarrierBlocked'}]),l={TOGGLE_SELF_VIEW:5,SUBMIT_STAR_RATING:6,SUBMIT_FEEDBACK:7,START_CALL:9,OPEN_SCREEN_IN_NEW:10},m={ONE_HOUR:'1hour',UNTIL_EIGHT_AM:'8am',ALWAYS:'always'},n=c('keyMirror')({VIDEO:null,AUDIO:null,SCREEN_SHARE:null}),o={PayloadType:h,StreamType:i,VideoQuality:j,CallEndReason:k,UIEventType:l,CallBlockingConstants:m,IncomingCallDialogTypes:n,endCallReasonFromString:function(p){return k.strNames.indexOf(p);},callEndReasonString:function(p){if(p<0||p>k.strNames.length)return 'Unknown';return k.strNames[p];},fullCallEndReasonString:function(p,q){return this.callEndReasonString(p)+'_'+(q?'remote':'local');}};f.exports=o;},null);
__d('FBRTCIceStatsParser',[],function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();var h=null;i.getInstance=function(){'use strict';if(!h)h=new i();return h;};function i(){'use strict';}i.prototype.extractIceInfo=function(j){'use strict';var k=[],l=j.split("\r\n");for(var m=0;m<l.length;m++){var n=l[m];if(this.$FBRTCIceStatsParser1(n))k.push({gen:this.$FBRTCIceStatsParser2(n),type:this.$FBRTCIceStatsParser3(n)});}return k;};i.prototype.$FBRTCIceStatsParser1=function(j){'use strict';return j.indexOf('candidate:')>-1;};i.prototype.$FBRTCIceStatsParser2=function(j){'use strict';var k=0,l=j.match(/generation (\d+)/);if(l)k=parseInt(l[1],10);return k;};i.prototype.$FBRTCIceStatsParser3=function(j){'use strict';var k=j.match(/typ (host|relay|srflx|prflx)/);if(k){return k[1];}else return 'unknown';};f.exports=i;},null);
__d('FBRTCCallSummary',['FBRTCConstants','FBRTCIceStatsParser','FBRTCLogger','UserAgentData','performanceNow'],function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();var h=5*60*1000,i={CALL_STARTED:'started',POPUP_OPENED:'opened',SENT_OFFER:'s_o',RECV_OFFER:'r_o',SENT_OFFER_ACK:'s_oack',RECV_OFFER_ACK:'r_oack',SENT_RETRIED_OFFER:'s_o2',RECV_RETRIED_OFFER:'r_o2',SENT_RETRIED_OFFER_ACK:'s_oack2',RECV_RETRIED_OFFER_ACK:'r_oack2',SENT_PRANSWER:'s_pr',RECV_PRANSWER:'r_pr',NETWORK_READY:'network_ready',SENT_ANSWER:'s_a',RECV_ANSWER:'r_a',SENT_ANSWER_ACK:'s_aack',RECV_ANSWER_ACK:'r_aack',SENT_RETRIED_ANSWER:'s_a2',RECV_RETRIED_ANSWER:'r_a2',SENT_RETRIED_ANSWER_ACK:'s_aack2',RECV_RETRIED_ANSWER_ACK:'r_aack2',SENT_OK:'s_ok',RECV_OK:'r_ok',CALL_CONNECTED:'connected',CALL_ENDED:'ended'};j.CURRENT_SUMMARY_VERSION=19;function j(k){'use strict';this.peerID=k.peerID;this.callID=k.callID;this.$FBRTCCallSummary1=k.isCaller;this.$FBRTCCallSummary2=new Date().valueOf();this.$FBRTCCallSummary3=null;this.$FBRTCCallSummary4={};this.$FBRTCCallSummary5=null;this.$FBRTCCallSummary6=null;this.$FBRTCCallSummary7=null;this.$FBRTCCallSummary8=null;this.$FBRTCCallSummary9=null;this.$FBRTCCallSummary10=null;this.$FBRTCCallSummary11={};this.$FBRTCCallSummary12={};this.$FBRTCCallSummary13={};this.$FBRTCCallSummary14={};this.$FBRTCCallSummary15={};this.$FBRTCCallSummary16={};this.$FBRTCCallSummary17=c('performanceNow')();this.$FBRTCCallSummary18=0;this.$FBRTCCallSummary19={};this.$FBRTCCallSummary20=this.$FBRTCCallSummary17;this.$FBRTCCallSummary21=0;this.$FBRTCCallSummary22={};this.addExtraInfo(c('FBRTCLogger').Key.DEVICE_INFO,this.$FBRTCCallSummary23());this.$FBRTCCallSummary24();this.$FBRTCCallSummary25=c('FBRTCIceStatsParser').getInstance();this.$FBRTCCallSummary26=c('FBRTCLogger').getInstance();}j.prototype.toJsonString=function(){'use strict';this.$FBRTCCallSummary9=new Date().valueOf();return JSON.stringify({version:j.CURRENT_SUMMARY_VERSION,peerID:this.peerID,callID:this.callID,isCaller:this.$FBRTCCallSummary1,callType:this.$FBRTCCallSummary27,localVideoDuration:this.$FBRTCCallSummary28,remoteVideoDuration:this.$FBRTCCallSummary29,startTime:this.$FBRTCCallSummary2,trigger:this.$FBRTCCallSummary3,signalingTime:this.$FBRTCCallSummary4,endCallReason:this.$FBRTCCallSummary5,endCallSubreason:this.$FBRTCCallSummary6,isRemoteEnded:this.$FBRTCCallSummary7,lastUpdatedTime:this.$FBRTCCallSummary8,lastSerializedTime:this.$FBRTCCallSummary9,unsetOnRetrieve:this.$FBRTCCallSummary10,openCount:this.$FBRTCCallSummary21,extraInfo:this.$FBRTCCallSummary22,pcStats:this.$FBRTCCallSummary11,captureStats:this.$FBRTCCallSummary12,gen0IceSentCount:this.$FBRTCCallSummary13,gen0IceReceivedCount:this.$FBRTCCallSummary14,iceSentCount:this.$FBRTCCallSummary15,iceReceivedCount:this.$FBRTCCallSummary16,newSignalingTime:this.$FBRTCCallSummary19,accumulatedCallTime:this.$FBRTCCallSummary30()});};j.fromJsonString=function(k){'use strict';var l;try{l=JSON.parse(k);}catch(m){return null;}if(l.version!==j.CURRENT_SUMMARY_VERSION)return null;if(!l.hasOwnProperty('peerID')||!l.hasOwnProperty('callID')||!l.hasOwnProperty('isCaller')||!l.hasOwnProperty('startTime')||!l.hasOwnProperty('trigger')||!l.hasOwnProperty('signalingTime')||!l.hasOwnProperty('endCallReason')||!l.hasOwnProperty('isRemoteEnded')||!l.hasOwnProperty('lastUpdatedTime')||!l.hasOwnProperty('lastSerializedTime'))return null;var n=new j({peerID:l.peerID,callID:l.callID,isCaller:l.isCaller});n.$FBRTCCallSummary2=l.startTime;n.$FBRTCCallSummary3=l.trigger;n.$FBRTCCallSummary4=l.signalingTime;n.$FBRTCCallSummary5=l.endCallReason;n.$FBRTCCallSummary6=l.endCallSubreason;n.$FBRTCCallSummary7=l.isRemoteEnded;n.$FBRTCCallSummary8=l.lastUpdatedTime;n.$FBRTCCallSummary9=l.lastSerializedTime;if(l.callType)n.$FBRTCCallSummary27=l.callType;if(l.localVideoDuration)n.$FBRTCCallSummary28=l.localVideoDuration;if(l.remoteVideoDuration)n.$FBRTCCallSummary29=l.remoteVideoDuration;if(l.unsetOnRetrieve)n.$FBRTCCallSummary10=l.unsetOnRetrieve;if(l.openCount)n.$FBRTCCallSummary21=l.openCount;if(l.extraInfo)n.$FBRTCCallSummary22=l.extraInfo;if(l.pcStats)n.$FBRTCCallSummary11=l.pcStats;if(l.captureStats)n.$FBRTCCallSummary12=l.captureStats;if(l.gen0IceSentCount)n.$FBRTCCallSummary13=l.gen0IceSentCount;if(l.gen0IceReceivedCount)n.$FBRTCCallSummary14=l.gen0IceReceivedCount;if(l.iceSentCount)n.$FBRTCCallSummary15=l.iceSentCount;if(l.iceReceivedCount)n.$FBRTCCallSummary16=l.iceReceivedCount;if(l.newSignalingTime)n.$FBRTCCallSummary19=l.newSignalingTime;if(l.accumulatedCallTime)n.$FBRTCCallSummary18=l.accumulatedCallTime;return n;};j.restoreOrInitialize=function(k,l,m,n,o){'use strict';var p=k.retrieveCallSummary(l,m);if(!p){p=new j({peerID:l,callID:m,isCaller:n});if(o){p.onFullMessageReceived({msg:o});p.onOfferAckSent(o);}else p.onCallStarted(c('FBRTCLogger').Trigger.UNKNOWN);c('FBRTCLogger').getInstance().logError(l,m,'Missing call summary from storage');}else if(p.$FBRTCCallSummary10){p.$FBRTCCallSummary5=null;p.$FBRTCCallSummary6=null;p.$FBRTCCallSummary7=null;delete p.$FBRTCCallSummary4[i.CALL_ENDED];delete p.$FBRTCCallSummary19[i.CALL_ENDED];p.$FBRTCCallSummary10=null;}return p;};j.logSavedSummaries=function(k){'use strict';var l=k.getLoggableSummaries(),m=l.length;if(m<=0)return;var n=c('FBRTCLogger').getInstance(),o=[];for(var p=0;p<m;p++){var q=l[p];n.logEndCallSummary(q);o.push({peerID:q.peerID,callID:q.callID});}k.removeCallSummaries(o);n.logToConsole('Logged pending summaries: '+m);};j.prototype.save=function(k){'use strict';var l=c('performanceNow')(),m=l-this.$FBRTCCallSummary20;if(m>h){this.$FBRTCCallSummary26.logInfo(this.peerID,this.callID,'Summary too old: '+m);return;}k.storeCallSummary(this.peerID,this.callID,this);this.$FBRTCCallSummary20=l;};j.prototype.getLastUpdatedTime=function(){'use strict';return this.$FBRTCCallSummary8;};j.prototype.setLastUpdatedTime=function(k){'use strict';this.$FBRTCCallSummary8=k;};j.prototype.getExtraInfo=function(){'use strict';return this.$FBRTCCallSummary22;};j.prototype.addExtraInfo=function(k,l){'use strict';this.$FBRTCCallSummary22[k]=l;this.$FBRTCCallSummary24();};j.prototype.onCallStarted=function(k){'use strict';this.$FBRTCCallSummary3=k;this.$FBRTCCallSummary31(i.CALL_STARTED);this.$FBRTCCallSummary24();};j.prototype.onPopupOpened=function(){'use strict';this.$FBRTCCallSummary31(i.POPUP_OPENED);this.$FBRTCCallSummary21++;this.$FBRTCCallSummary24();};j.prototype.setPcStats=function(k){'use strict';this.$FBRTCCallSummary11=k;this.$FBRTCCallSummary24();};j.prototype.setVideoCaptureStats=function(k,l){'use strict';this.$FBRTCCallSummary12={w:k,h:l};this.$FBRTCCallSummary24();};j.prototype.setCallType=function(k){'use strict';this.$FBRTCCallSummary27=k;this.$FBRTCCallSummary24();};j.prototype.setVideoDurations=function(k,l){'use strict';this.$FBRTCCallSummary28=k;this.$FBRTCCallSummary29=l;this.$FBRTCCallSummary24();};j.prototype.onOfferAckSent=function(k){'use strict';this.onMessageSent({type:c('FBRTCConstants').PayloadType.OFFER_ACK,flag:k.flag});};j.prototype.onMessageSent=function(k){'use strict';var l=k.flag===1;switch(k.type){case c('FBRTCConstants').PayloadType.OFFER:this.$FBRTCCallSummary32(l,i.SENT_OFFER,i.SENT_RETRIED_OFFER);this.$FBRTCCallSummary33(k,this.$FBRTCCallSummary13,this.$FBRTCCallSummary15);break;case c('FBRTCConstants').PayloadType.ANSWER:this.$FBRTCCallSummary32(l,i.SENT_ANSWER,i.SENT_RETRIED_ANSWER);this.$FBRTCCallSummary33(k,this.$FBRTCCallSummary13,this.$FBRTCCallSummary15);break;case c('FBRTCConstants').PayloadType.OK:this.$FBRTCCallSummary31(i.SENT_OK);break;case c('FBRTCConstants').PayloadType.PRANSWER:this.$FBRTCCallSummary31(i.SENT_PRANSWER);break;case c('FBRTCConstants').PayloadType.OFFER_ACK:this.$FBRTCCallSummary32(l,i.SENT_OFFER_ACK,i.SENT_RETRIED_OFFER_ACK);break;case c('FBRTCConstants').PayloadType.ANSWER_ACK:this.$FBRTCCallSummary32(l,i.SENT_ANSWER_ACK,i.SENT_RETRIED_ANSWER_ACK);break;case c('FBRTCConstants').PayloadType.ICE_CANDIDATE:this.$FBRTCCallSummary33(k,this.$FBRTCCallSummary13,this.$FBRTCCallSummary15);break;default:}this.$FBRTCCallSummary24();};j.prototype.$FBRTCCallSummary33=function(k,l,m){'use strict';var n=null,o=null,p=this.$FBRTCCallSummary25.extractIceInfo(k.sdp);for(var q=0;q<p.length;q++){n=p[q].gen;o=p[q].type;if(n===0)this.$FBRTCCallSummary34(l,o);this.$FBRTCCallSummary34(m,o);}};j.prototype.$FBRTCCallSummary34=function(k,l){'use strict';if(!k[l]){k[l]=1;}else k[l]=k[l]+1;};j.prototype.$FBRTCCallSummary35=function(k){'use strict';if(k.isFromMobile())this.addExtraInfo(c('FBRTCLogger').Key.PEER_IS_MOBILE,'1');};j.prototype.onFullMessageReceived=function(k){'use strict';var l=k.msg,m=l.flag===1;switch(l.type){case c('FBRTCConstants').PayloadType.OFFER:this.$FBRTCCallSummary35(k);this.$FBRTCCallSummary32(m,i.RECV_OFFER,i.RECV_RETRIED_OFFER);this.$FBRTCCallSummary33(l,this.$FBRTCCallSummary14,this.$FBRTCCallSummary16);break;case c('FBRTCConstants').PayloadType.ANSWER:this.$FBRTCCallSummary35(k);this.$FBRTCCallSummary32(m,i.RECV_ANSWER,i.RECV_RETRIED_ANSWER);this.$FBRTCCallSummary33(l,this.$FBRTCCallSummary14,this.$FBRTCCallSummary16);break;case c('FBRTCConstants').PayloadType.OK:this.$FBRTCCallSummary31(i.RECV_OK);break;case c('FBRTCConstants').PayloadType.PRANSWER:this.$FBRTCCallSummary31(i.RECV_PRANSWER);break;case c('FBRTCConstants').PayloadType.OFFER_ACK:this.$FBRTCCallSummary32(m,i.RECV_OFFER_ACK,i.RECV_RETRIED_OFFER_ACK);break;case c('FBRTCConstants').PayloadType.ANSWER_ACK:this.$FBRTCCallSummary32(m,i.RECV_ANSWER_ACK,i.RECV_RETRIED_ANSWER_ACK);break;case c('FBRTCConstants').PayloadType.ICE_CANDIDATE:this.$FBRTCCallSummary33(l,this.$FBRTCCallSummary14,this.$FBRTCCallSummary16);break;default:}this.$FBRTCCallSummary24();};j.prototype.onMsgAckReceived=function(k,l){'use strict';var m=k.msg.flag===1;if(l){this.$FBRTCCallSummary32(m,i.RECV_OFFER_ACK,i.RECV_RETRIED_OFFER_ACK);}else this.$FBRTCCallSummary32(m,i.RECV_ANSWER_ACK,i.RECV_RETRIED_ANSWER_ACK);};j.prototype.onCallConnected=function(){'use strict';this.$FBRTCCallSummary31(i.NETWORK_READY);this.$FBRTCCallSummary31(i.CALL_CONNECTED);this.$FBRTCCallSummary24();};j.prototype.onCallEnded=function(k,l,m,n){'use strict';this.$FBRTCCallSummary10=m;this.$FBRTCCallSummary5=k;this.$FBRTCCallSummary6=n;this.$FBRTCCallSummary7=l;this.$FBRTCCallSummary31(i.CALL_ENDED);this.$FBRTCCallSummary24();};j.prototype.toString=function(){'use strict';var k={};k.core_metrics=this.$FBRTCCallSummary36();k.time_series=null;return JSON.stringify(k);};j.prototype.$FBRTCCallSummary36=function(){'use strict';var k={};k.ver=j.CURRENT_SUMMARY_VERSION;k.caller=this.$FBRTCCallSummary1;k.call_type=this.$FBRTCCallSummary27;k.conn=this.$FBRTCCallSummary37();k.peer_id=this.peerID;k.has_video=true;k.open_count=this.$FBRTCCallSummary21;k.signaling=this.$FBRTCCallSummary38();k.sender=this.$FBRTCCallSummary39();k.receiver=this.$FBRTCCallSummary40();k.end=this.$FBRTCCallSummary41();k.video=this.$FBRTCCallSummary42();return k;};j.prototype.$FBRTCCallSummary37=function(){'use strict';var k={dtls:1};if(this.$FBRTCCallSummary11.sender&&this.$FBRTCCallSummary11.sender.rtt)k.rtt=this.$FBRTCCallSummary11.sender.rtt;return k;};j.prototype.$FBRTCCallSummary38=function(){'use strict';var k={};if(this.$FBRTCCallSummary3)k.trigger=this.$FBRTCCallSummary3;k.start_time=this.$FBRTCCallSummary2;k.time_from_start=this.$FBRTCCallSummary4;var l=this.$FBRTCCallSummary4[i.CALL_CONNECTED],m=this.$FBRTCCallSummary4[i.CALL_ENDED];if(l){if(!m)if(this.$FBRTCCallSummary9){m=this.$FBRTCCallSummary9-this.$FBRTCCallSummary2;}else m=this.$FBRTCCallSummary43();var n=m-l;if(n>0)k.duration=n;}k.new_time_from_start=this.$FBRTCCallSummary19;l=this.$FBRTCCallSummary19[i.CALL_CONNECTED];m=this.$FBRTCCallSummary19[i.CALL_ENDED];if(l){if(!m)if(this.$FBRTCCallSummary18>0){m=this.$FBRTCCallSummary18;}else m=this.$FBRTCCallSummary30();n=m-l;if(n>0)k.new_duration=n;}return k;};j.prototype.$FBRTCCallSummary39=function(){'use strict';var k={};if(this.$FBRTCCallSummary13)k.ice_g0=this.$FBRTCCallSummary13;if(this.$FBRTCCallSummary15)k.ice=this.$FBRTCCallSummary15;if(this.$FBRTCCallSummary11.sender)Object.assign(k,this.$FBRTCCallSummary11.sender);return k;};j.prototype.$FBRTCCallSummary40=function(){'use strict';var k={};if(this.$FBRTCCallSummary14)k.ice_g0=this.$FBRTCCallSummary14;if(this.$FBRTCCallSummary16)k.ice=this.$FBRTCCallSummary16;return k;};j.prototype.$FBRTCCallSummary41=function(){'use strict';var k={};if(this.$FBRTCCallSummary5!==null){k.end_call_reason_string=c('FBRTCConstants').callEndReasonString(this.$FBRTCCallSummary5);if(this.$FBRTCCallSummary6!==null)k.end_call_subreason_string=this.$FBRTCCallSummary6;k.remote_ended=this.$FBRTCCallSummary7;}if(this.$FBRTCCallSummary11.end)Object.assign(k,this.$FBRTCCallSummary11.end);return k;};j.prototype.$FBRTCCallSummary42=function(){'use strict';var k={capture:{}};if(this.$FBRTCCallSummary11.video&&this.$FBRTCCallSummary11.video.sender)Object.assign(k,this.$FBRTCCallSummary11.video.sender);if(this.$FBRTCCallSummary12)Object.assign(k.capture,this.$FBRTCCallSummary12);return {sender:k,ld:this.$FBRTCCallSummary28,rd:this.$FBRTCCallSummary29};};j.prototype.$FBRTCCallSummary43=function(){'use strict';return new Date().valueOf()-this.$FBRTCCallSummary2;};j.prototype.$FBRTCCallSummary30=function(){'use strict';var k=c('performanceNow')()-this.$FBRTCCallSummary17;return Math.floor(this.$FBRTCCallSummary18+k);};j.prototype.$FBRTCCallSummary31=function(k){'use strict';if(this.$FBRTCCallSummary4[k])return;this.$FBRTCCallSummary4[k]=this.$FBRTCCallSummary43();this.$FBRTCCallSummary19[k]=this.$FBRTCCallSummary30();};j.prototype.$FBRTCCallSummary32=function(k,l,m){'use strict';if(k){this.$FBRTCCallSummary31(m);}else this.$FBRTCCallSummary31(l);};j.prototype.$FBRTCCallSummary24=function(){'use strict';this.$FBRTCCallSummary8=new Date().valueOf();};j.prototype.$FBRTCCallSummary23=function(){'use strict';return {device:c('UserAgentData').deviceName,os:c('UserAgentData').platformName,os_version:c('UserAgentData').platformFullVersion,browser:c('UserAgentData').browserName,browser_version:c('UserAgentData').browserFullVersion,screen_height:window.screen.availHeight,screen_width:window.screen.availWidth};};f.exports=j;},null);
__d('FBRTCCallSummaryStore',['CacheStorage','FBRTCCallSummary','FBRTCLogger','areEqual'],function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();var h='localstorage',i='RTC_CALL_SUMMARY_',j='summary',k=2000,l=3,m=3*60*1000,n=null;o.getInstance=function(){'use strict';if(!n)n=new o();return n;};function o(){'use strict';this.$FBRTCCallSummaryStore1=new (c('CacheStorage'))(h,i);this.$FBRTCCallSummaryStore2=c('FBRTCLogger').getInstance();}o.prototype.storeCallSummary=function(p,q,r){'use strict';var s=this;this.$FBRTCCallSummaryStore3(function(t){if(!t[p])t[p]={};var u=t[p][q];if(u){var v=s.$FBRTCCallSummaryStore4(u);if(v&&v.getLastUpdatedTime()>r.getLastUpdatedTime()){s.$FBRTCCallSummaryStore2.logToConsole('Outdated summaries');return null;}}t[p][q]=s.$FBRTCCallSummaryStore5(r);return t;},s.$FBRTCCallSummaryStore2.logError.bind(s.$FBRTCCallSummaryStore2,p,q));};o.prototype.retrieveCallSummary=function(p,q){'use strict';var r=this.$FBRTCCallSummaryStore6(),s=null;if(r[p])s=r[p][q];if(s){return this.$FBRTCCallSummaryStore4(s);}else return null;};o.prototype.removeCallSummary=function(p,q){'use strict';this.removeCallSummaries([{peerID:p,callID:q}]);};o.prototype.removeCallSummaries=function(p){'use strict';var q=this;this.$FBRTCCallSummaryStore3(function(r){var s=p.length;for(var t=0;t<s;t++){var u=p[t].peerID,v=p[t].callID;if(r[u]&&r[u][v]){delete r[u][v];if(q.$FBRTCCallSummaryStore7(r[u]))delete r[u];}}return r;},q.$FBRTCCallSummaryStore2.logError.bind(q.$FBRTCCallSummaryStore2,null,null));};o.prototype.getLoggableSummaries=function(){'use strict';var p=this.$FBRTCCallSummaryStore6(),q=[];for(var r in p)if(p.hasOwnProperty(r))for(var s in p[r])if(p[r].hasOwnProperty(s)){var t=this.$FBRTCCallSummaryStore4(p[r][s],m);if(t)q.push(t);}return q;};o.prototype.$FBRTCCallSummaryStore7=function(p){'use strict';for(var q in p)if(p.hasOwnProperty(q))return false;return true;};o.prototype.$FBRTCCallSummaryStore5=function(p){'use strict';var q={__t:Date.now(),__d:p.toJsonString()};return q;};o.prototype.$FBRTCCallSummaryStore4=function(p,q){'use strict';if(p)if(!q||Date.now()-p.__t>=q)return c('FBRTCCallSummary').fromJsonString(p.__d);return null;};o.prototype.$FBRTCCallSummaryStore6=function(){'use strict';var p=this.$FBRTCCallSummaryStore1.get(j)||{};return p;};o.prototype.$FBRTCCallSummaryStore3=function(p,q,r,s){'use strict';if(r===undefined||r===null)r=l;var t=this.$FBRTCCallSummaryStore6(),u=this.$FBRTCCallSummaryStore6(),v=p(t);if(v===null)return;var w=this.$FBRTCCallSummaryStore6();if(c('areEqual')(u,w)){this.$FBRTCCallSummaryStore1.set(j,v);this.$FBRTCCallSummaryStore2.logToConsole('Updated summaries');}else if(r>0){q('Retry lock');if(s){var x=this;setTimeout(function(){x.$FBRTCCallSummaryStore3(p,q,r-1,true);},k);}else this.$FBRTCCallSummaryStore3(p,q,r-1,true);}else q('Failed to lock');};f.exports=o;},null);
__d('FBRTCCallActions',['FBRTCDispatcher','keyMirror'],function a(b,c,d,e,f,g){'use strict';if(c.__markCompiled)c.__markCompiled();var h=c('keyMirror')({START_CALL:null}),i={Types:h,startCall:function(j,k,l,m){c('FBRTCDispatcher').dispatch({type:h.START_CALL,peerID:j,callID:k,isCaller:l,audioOnly:m});}};f.exports=i;},null);
__d('FBRTCScreenSharingLogger',['Log','MarauderLogger','formatDate','keyMirror'],function a(b,c,d,e,f,g){'use strict';if(c.__markCompiled)c.__markCompiled();var h='webrtc_screen_sharing',i=c('keyMirror')({P2P_VIDEO_CALL:null,DIRECT_SCREEN_SHARING:null}),j=c('keyMirror')({screen_sharing_action:null,screen_sharing_error:null}),k=c('keyMirror')({PEER_ID:null,SESSION_ID:null,CONTEXT_TYPE:null,CONTENT:null}),l=c('keyMirror')({SCREEN_SHARING_TOGGLED:null,SCREEN_SHARING_CANCELLED:null,SCREEN_SHARING_ENABLED:null,SCREEN_SHARING_DISABLED:null,SCREEN_SHARING_EXT_DIALOG:null,SCREEN_SHARING_EXT_LINK:null}),m=null;n.getInstance=function(){if(!m)m=new n();return m;};n.prototype.logAction=function(o,p,q,r,s){var t={};t[j.screen_sharing_action]=q;t[k.PEER_ID]=o;t[k.SESSION_ID]=p;t[k.CONTEXT_TYPE]=this.$FBRTCScreenSharingLogger1(r);t[k.CONTENT]=s;this.$FBRTCScreenSharingLogger2(j.screen_sharing_action,t);this.logToConsole(o,p,q);};n.prototype.logError=function(o,p,q,r){var s={};s[k.PEER_ID]=o;s[k.SESSION_ID]=p;s[k.CONTEXT_TYPE]=this.$FBRTCScreenSharingLogger1(q);s[k.CONTENT]=r;this.$FBRTCScreenSharingLogger2(j.screen_sharing_error,s);this.logToConsole(o,p,r);};n.prototype.logToConsole=function(o,p,q){};n.prototype.$FBRTCScreenSharingLogger1=function(o){return o?i.DIRECT_SCREEN_SHARING:i.P2P_VIDEO_CALL;};n.prototype.$FBRTCScreenSharingLogger2=function(o,p){c('MarauderLogger').log(o,h,p);};function n(){}n.Action=l;f.exports=n;},null);
__d("FBRTCVersionDetection",[],function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();var h={isChrome:function(){return !!navigator.webkitGetUserMedia;},isFirefox:function(){return !!navigator.mozGetUserMedia;},webrtcVersion:function(){if(this.isFirefox())return parseInt(navigator.userAgent.match(/Firefox\/([0-9]+)\./)[1],10);if(this.isChrome()){var i=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);if(i!==null){return parseInt(i[2],10);}else return 999;}return 0;}};f.exports=h;},null);
__d('FBRTCScreenSharingUtils',['FBRTCScreenSharingLogger','FBRTCStruct','FBRTCVersionDetection','RTCConfig','FBRTCSupport'],function a(b,c,d,e,f,g){'use strict';if(c.__markCompiled)c.__markCompiled();var h=new (c('FBRTCStruct'))(['UNKNOWN','INSTALLED']),i=h.UNKNOWN,j={RECIPIENT:'SC_CONTENT_SCRIPT',isScreenSharingSupported:function(){return c('RTCConfig').ScreenSharingGK;},isSupportedBrowser:function(){return c('FBRTCVersionDetection').isChrome()&&c('FBRTCVersionDetection').webrtcVersion()>=34;},canUserReceiveScreenSharing:function(){return c('RTCConfig').ReceiveScreenGK&&c('FBRTCSupport').isOSSupported()&&j.isSupportedBrowser();},isExtensionInstalled:function(){return i===h.INSTALLED;},getExtensionStatus:function(){return i;},checkExtensionInstalled:function(k,l){if(this.isExtensionInstalled()){k();return;}window.addEventListener('message',function(event){j.updateExtensionStatus(event,k);});j._loopForExtensionStatus(5,k);},_loopForExtensionStatus:function(k,l){setTimeout(function(){setTimeout(function(){if(i===h.UNKNOWN)window.postMessage({recipient:'SC_CONTENT_SCRIPT',type:'SC_IS_EXT_INSTALLED',text:'is extension installed'},'*');},1);if(k>1){j._loopForExtensionStatus(k-1,l);}else if(!this.isExtensionInstalled())l();}.bind(this),1000);},updateExtensionStatus:function(event,k){if(event.origin!=window.location.origin||!event.data.type)return;if(event.data.type==='SC_EXT_INSTALLED'){window.removeEventListener('message',j.updateExtensionStatus);i=h.INSTALLED;k();}},logFailedAttempt:function(k,l){c('FBRTCScreenSharingLogger').getInstance().logAction(k,l,c('FBRTCScreenSharingLogger').Action.SCREEN_SHARING_TOGGLED,this._isDirect,'feature not available');}};f.exports=j;},null);
__d('FBRTCUtils',['emptyFunction','randomInt','AsyncRequest','FBID','FBRTCVersionDetection','RTCConfig','UserAgent'],function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();var h=6000,i={attachMediaStream:function(j,k){if(window.webkitRTCPeerConnection){j.src=window.webkitURL.createObjectURL(k);}else{j.mozSrcObject=k;j.play();}},reattachMediaStream:function(j,k){if(window.webkitRTCPeerConnection){j.src=k.src;}else{j.mozSrcObject=k.mozSrcObject;j.play();}},generateRandomInt:function(){return c('randomInt')(0,4294967294)+1;},aboutEqual:function(j,k){return j-k<.01&&k-j<.01;},sendServerRequest:function(j,k,l,m,n,o){k=k||c('emptyFunction');l=l||c('emptyFunction');m=m||false;n=n||h;o=o||{};var p=new (c('AsyncRequest'))().setURI(j).setData(o).setAllowCrossPageTransition(true).setHandler(k).setErrorHandler(l).setTimeoutHandler(n,function(){l();});if(m)p.setOption('asynchronous_DEPRECATED',false);p.send();},isCollabCallable:function(j){return !c('FBID').isUser(j)&&(c('RTCConfig').CollaborationVideoGroupCallGK||c('RTCConfig').CollabVCEndpointsVideoCallGK);},isGroupCallable:function(j){return !c('FBID').isUser(j)&&c('RTCConfig').CollaborationVideoGroupCallGK;},isVCEndpointCallable:function(j){return !c('FBID').isUser(j)&&c('RTCConfig').CollabVCEndpointsVideoCallGK;},supportsMultipleStreamsPlanB:function(){return (c('UserAgent').isBrowser('Chrome')||c('UserAgent').isBrowser('Opera'))&&c('FBRTCVersionDetection').webrtcVersion()>=34;}};f.exports=i;},null);
__d('FBRTCConfig',['FBRTCScreenSharingUtils','FBRTCUtils','UserAgent'],function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();var h={},i={setConfig:function(j,k,l){h=j;},statsInterpreterConfig:function(){return {rtt_weight:2,frr_weight:800,plr_weight:500,score_threshold:1000,bad_score_count:3};},settingsEnabled:function(){return h.enable_settings;},shouldAutoDisableVideo:function(){return false;},unsupportedBrowserUrl:function(){if(h.troubleshooting_urls&&h.troubleshooting_urls.unsupported_browser)return h.troubleshooting_urls.unsupported_browser;return 'https://www.facebook.com/help/211644178877843';},userMediaErrorUrl:function(){if(h.troubleshooting_urls&&h.troubleshooting_urls.user_media_error)return h.troubleshooting_urls.user_media_error;return 'https://www.facebook.com/help/232232800134371';},userMediaPermissionErrorUrl:function(){if(h.troubleshooting_urls&&h.troubleshooting_urls.user_media_permission_error)return h.troubleshooting_urls.user_media_permission_error;return 'https://www.facebook.com/help/232232800134371';},supportedSignalingExperiments:function(){var j=[];if(c('UserAgent').isBrowser('Chrome')||c('UserAgent').isBrowser('Opera'))j.push('sdp_update');if(c('FBRTCUtils').supportsMultipleStreamsPlanB())j.push('multiple_streams_plan_b');if(c('FBRTCScreenSharingUtils').canUserReceiveScreenSharing())j.push('screen_sharing');return j;},isMessengerDotCom:function(){return h.is_messenger_dot_com;},useMessengerCallUI:function(){return h.messenger_call_ui;},shouldCreateDataChannel:function(){return h.data_channel;},disableURLManager:function(){return h.disable_url_manager;},useCurrentWindow:function(){return h.use_current_window;}};f.exports=i;},null);
__d("XGroupCallController",["XController"],function a(b,c,d,e,f,g){c.__markCompiled&&c.__markCompiled();f.exports=c("XController").create("\/groupcall\/{?conference_name}\/",{conference_name:{type:"String",required:true},users_to_ring:{type:"StringSet",defaultValue:[]},has_video:{type:"Bool",defaultValue:false},server_info_data:{type:"String"}});},null);
__d("XGroupCallSigningController",["XController"],function a(b,c,d,e,f,g){c.__markCompiled&&c.__markCompiled();f.exports=c("XController").create("\/groupcall\/init\/",{conference_name:{type:"String",required:true},users_to_ring:{type:"StringSet",defaultValue:[]},has_video:{type:"Bool",defaultValue:false}});},null);
__d("XVideoCallController",["XController"],function a(b,c,d,e,f,g){c.__markCompiled&&c.__markCompiled();f.exports=c("XController").create("\/videocall\/incall\/",{peer_id:{type:"Int",required:true},call_id:{type:"Int"},is_caller:{type:"Bool",defaultValue:false},audio_only:{type:"Bool",defaultValue:false},nonce:{type:"String"}});},null);
__d("XVideoCallInitController",["XController"],function a(b,c,d,e,f,g){c.__markCompiled&&c.__markCompiled();f.exports=c("XController").create("\/videocall\/init\/",{peer_id:{type:"Int",required:true},call_id:{type:"Int",required:true},is_caller:{type:"Bool",defaultValue:false},audio_only:{type:"Bool",defaultValue:false}});},null);
__d('FBRTCUrlManager',['regeneratorRuntime','Promise','FBRTCConfig','FBRTCLogger','FBRTCUtils','XVideoCallInitController','XVideoCallController','XGroupCallSigningController','XGroupCallController'],function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();var h=3,i=function(o,p,q,r){c('FBRTCLogger').getInstance().logCallAction(o,p,c('FBRTCLogger').CallAction.OLD_URI);return c('XVideoCallController').getURIBuilder().setInt('peer_id',o).setInt('call_id',p).setBool('is_caller',q).setBool('audio_only',r).getURI();},j=function(o,p,q,r,s,t,u){if(u===undefined||u===null)u=h;var v=c('XVideoCallInitController').getURIBuilder().setInt('peer_id',o).setInt('call_id',p).setBool('is_caller',q).setBool('audio_only',r).getURI();c('FBRTCUtils').sendServerRequest(v,function(w){s(w.payload.uri);},function(w){if(u>0){j(o,p,q,r,s,t,u-1);}else s(i(o,p,q,r));});};function k(o,p,q){var r;return c('regeneratorRuntime').async(function s(t){while(1)switch(t.prev=t.next){case 0:r=c('XGroupCallSigningController').getURIBuilder().setString('conference_name',o).setStringSet('users_to_ring',p).setBool('has_video',q).getURI();return t.abrupt('return',new (c('Promise'))(function(u,v){c('FBRTCUtils').sendServerRequest(r,function(w){u(w.payload.uri);},function(w){v(w);});}));case 2:case 'end':return t.stop();}},null,this);}var l=function(o,p,q,r,s,t,u){if(u===undefined||u===null)u=h;var v=c('XGroupCallSigningController').getURIBuilder().setString('call_id',o).setBool('is_caller',q).setBool('audio_only',r).setStringSet('users_to_call',p).getURI();c('FBRTCUtils').sendServerRequest(v,function(w){s(w.payload.uri);},function(w){if(u>0){l(o,p,q,r,s,t,u-1);}else{var x=c('XGroupCallController').getURIBuilder().setString('call_id',o).setBool('is_caller',q).setBool('audio_only',r).setStringSet('users_to_call',p).getURI();s(x);}});},m=function(o){if(c('FBRTCConfig').disableURLManager())return;window.history.replaceState({},'',o);},n={init:function(o){this._peerID=o;},onCallStarted:function(){m(i(this._peerID));},getCallUri:j,getGroupCallUri:function o(p,q,r){var s;return c('regeneratorRuntime').async(function t(u){while(1)switch(u.prev=u.next){case 0:s=0;case 1:if(!(s<3)){u.next=14;break;}u.prev=2;u.next=5;return c('regeneratorRuntime').awrap(k(p,q,r));case 5:return u.abrupt('return',u.sent);case 8:u.prev=8;u.t0=u['catch'](2);case 11:s++;u.next=1;break;case 14:return u.abrupt('return',c('XGroupCallController').getURIBuilder().setString('conference_name',p).setStringSet('users_to_ring',q).setBool('has_video',r).getURI());case 15:case 'end':return u.stop();}},null,this,[[2,8]]);},getNonceUri:function(o,p,q,r,s){return c('XVideoCallController').getURIBuilder().setInt('peer_id',o).setInt('call_id',p).setBool('is_caller',q).setBool('audio_only',r).setString('nonce',s).getURI();}};f.exports=n;},null);
__d('FBRTCCallUI',['regeneratorRuntime','BanzaiLogger','UserAgent','FBRTCCallActions','FBRTCCallSummary','FBRTCCallSummaryStore','FBRTCConfig','FBRTCConstants','FBRTCLogger','FBRTCMessageListener','FBRTCUrlManager','pageID'],function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();var h=null,i={openGroupCallUI:function j(k,l,m,n){var o,p,q;return c('regeneratorRuntime').async(function r(s){while(1)switch(s.prev=s.next){case 0:o=this._windowPosition();p=['menubar=no','location=no','scrollbars=no','status=no','personalbar=no',o.height,o.width,o.top,o.left].join(',');s.next=4;return c('regeneratorRuntime').awrap(c('FBRTCUrlManager').getGroupCallUri(k,l,m));case 4:q=s.sent;h=window.open(q,'Group Call',p);h.focus&&h.focus();case 7:case 'end':return s.stop();}},null,this);},openGroupCallURI:function j(k,l){var m,n;return c('regeneratorRuntime').async(function o(p){while(1)switch(p.prev=p.next){case 0:m=this._windowPosition();n=['menubar=no','location=no','scrollbars=no','status=no','personalbar=no',m.height,m.width,m.top,m.left].join(',');h=window.open(k,'Group Call',n);h.focus&&h.focus();case 4:case 'end':return p.stop();}},null,this);},openAsCaller:function(j,k,l,m){if(!h&&window.rtcCallChildWindow){h=window.rtcCallChildWindow;window.rtcCallChildWindow=null;}if(this._shouldFocusCallWindow(j)){h.focus();return;}if(this._shouldCloseCallWindow())h.close();c('BanzaiLogger').log('VideoCallLoggerConfig',{event:'open_as_caller'});c('FBRTCLogger').getInstance().logCallAction(j,k,c('FBRTCLogger').CallAction.START_CALL,null,l);var n=new (c('FBRTCCallSummary'))({peerID:j,callID:k,isCaller:true});n.onCallStarted(l);this._open(j,k,true,n,false,m);},openAsCallee:function(j,k,l,m,n){c('BanzaiLogger').log('VideoCallLoggerConfig',{event:'open_as_callee'});this._open(j,k,false,l,m,n);},_shouldFocusCallWindow:function(j){return h&&!h.closed&&h.rtcCallInProgessWith===j;},_shouldCloseCallWindow:function(){return h&&!h.closed&&!h.rtcCallInProgessWith;},_open:function(j,k,l,m,n,o){m.addExtraInfo(c('FBRTCLogger').Key.INITIATED_BY_PAGE_ID,c('pageID'));m.onCallEnded(c('FBRTCConstants').CallEndReason.CLIENT_ERROR,false,true,'PopupPending');m.save(c('FBRTCCallSummaryStore').getInstance());if(c('FBRTCConfig').useCurrentWindow()){c('FBRTCMessageListener').removeMessageHandler();c('FBRTCCallActions').startCall(j,k,l,o);return;}var p=this._windowPosition(),q=['menubar=no','location=no','scrollbars=no','status=no','personalbar=no',p.height,p.width,p.top,p.left].join(',');if(this._isSparkBrowser())q='';n=c('FBRTCUrlManager').getNonceUri(j,k,l,o,c('FBRTCMessageListener').generateNewNonce());c('BanzaiLogger').log('VideoCallLoggerConfig',{event:'open_popup'});if(!n){h=window.open('','Video Call',q);this._setUri(h,j,k,l,o);}else{c('FBRTCLogger').getInstance().logCallAction(j,k,c('FBRTCLogger').CallAction.OPEN_POPUP);h=window.open(n,'Video Call',q);}h.focus&&h.focus();},_setUri:function(j,k,l,m,n){c('FBRTCUrlManager').getCallUri(k,l,m,n,function(o){c('FBRTCLogger').getInstance().logCallAction(k,l,c('FBRTCLogger').CallAction.OPEN_POPUP);j.location=o;},function(){c('FBRTCLogger').getInstance().logCallAction(k,l,c('FBRTCLogger').CallAction.FAILED_GETTING_URI);});},_windowPosition:function(){var j=960,k=540,l,m,n,o;if(screen&&screen.width>1280){j=1280;k=720;}if(window.innerWidth!==undefined){m=window.innerWidth;l=window.innerHeight;}else{m=screen.width;l=screen.height;}if(window.screenLeft!==undefined){n=window.screenLeft;o=window.screenTop;}else{n=window.screenX;o=window.screenY;}var p=Math.floor(m/2-j/2+n),q=Math.floor(l/2-k/2+o);return {height:'height='+k.toString(),width:'width='+j.toString(),top:'top='+q.toString(),left:'left='+p.toString()};},_isSparkBrowser:function(){return c('UserAgent').isBrowser('Chrome < 34')&&c('UserAgent').isBrowser('Chrome > 33');}};f.exports=i;},null);
__d('FBRTCCore',['invariant','Bootloader','FBRTCAvailability','FBRTCCallUI','FBRTCSupport','randomInt'],function a(b,c,d,e,f,g,h){if(c.__markCompiled)c.__markCompiled();var i=false,j={startOutgoingCall:function(k,l,m){!!isNaN(parseInt(k,10))?h(0):void 0;if(i)return;i=true;setTimeout(function(){i=false;},1000);if(c('FBRTCSupport').isWebrtcSupported()){var n=this._generateCallID();c('FBRTCCallUI').openAsCaller(k,n,l,m);}else c('Bootloader').loadModules(["FBRTCUnsupportedBrowserMessage"],function(o){o.showForOutgoingCall();});},startGroupCall:function(k){var l=k.conferenceName,m=k.usersToRing||[],n=k.hasVideo||false,o=k.clickSource||'unknown';!l?h(0):void 0;if(i)return;i=true;setTimeout(function(){i=false;},1000);if(!c('FBRTCSupport').isWebrtcSupported())c('Bootloader').loadModules(["FBRTCUnsupportedBrowserMessage"],function(p){p.showForOutgoingCall();});c('FBRTCCallUI').openGroupCallUI(l,m,n,o);},isAvailableForWebrtcCalling:function(k){return c('FBRTCAvailability').isCallable(k);},shouldEnableVideoCalling:function(){return c('FBRTCSupport').isOSSupported();},_generateCallID:function(){return c('randomInt')(0,4294967295);}};f.exports=j;},null);
__d('FBRTCCallabilityActions',['keyMirror'],function a(b,c,d,e,f,g){'use strict';if(c.__markCompiled)c.__markCompiled();var h=c('keyMirror')({CALLABILITY_FETCHED:null,CALLABILITY_FETCH_ERROR:null});function i(j){this.$FBRTCCallabilityActions1=j;}i.prototype.callabilityFetched=function(j,k){this.$FBRTCCallabilityActions1.dispatch({type:h.CALLABILITY_FETCHED,userID:j,callability:k});};i.prototype.callabilityFetchError=function(j){this.$FBRTCCallabilityActions1.dispatch({type:h.CALLABILITY_FETCH_ERROR,userID:j});};i.Types=h;f.exports=i;},null);
__d("XRTCCallabilityController",["XController"],function a(b,c,d,e,f,g){c.__markCompiled&&c.__markCompiled();f.exports=c("XController").create("\/rtc\/callability\/",{user_id:{type:"Int",required:true}});},null);
__d('FBRTCCallabilityDataManager',['AsyncRequest','FBRTCCallabilityActions','XRTCCallabilityController'],function a(b,c,d,e,f,g){'use strict';if(c.__markCompiled)c.__markCompiled();function h(i){this.$FBRTCCallabilityDataManager1=new (c('FBRTCCallabilityActions'))(i);}h.prototype.fetchCallability=function(i){var j=c('XRTCCallabilityController').getURIBuilder().setInt('user_id',parseInt(i,10)).getURI(),k=this.$FBRTCCallabilityDataManager2.bind(this,i),l=this.$FBRTCCallabilityDataManager3.bind(this,i);new (c('AsyncRequest'))().setURI(j).setHandler(k).setErrorHandler(l).setAllowCrossPageTransition(true).send();};h.prototype.$FBRTCCallabilityDataManager2=function(i,j){this.$FBRTCCallabilityDataManager1.callabilityFetched(i,j.payload);};h.prototype.$FBRTCCallabilityDataManager3=function(i,j){this.$FBRTCCallabilityDataManager1.callabilityFetchError(i);};f.exports=h;},null);
__d('RTCCallabilityStore',['fbt','Cache','FBRTCAvailability','FluxStore','FBRTCCallabilityActions','FBRTCCallabilityDataManager'],function a(b,c,d,e,f,g,h){'use strict';var i,j;if(c.__markCompiled)c.__markCompiled();var k=.5,l=5;i=babelHelpers.inherits(m,c('FluxStore'));j=i&&i.prototype;function m(n){j.constructor.call(this,n);this.$RTCCallabilityStore2=new (c('FBRTCCallabilityDataManager'))(n);this.$RTCCallabilityStore1=new (c('Cache'))();}m.prototype.__onDispatch=function(n){var o=n.type;switch(o){case c('FBRTCCallabilityActions').Types.CALLABILITY_FETCHED:var p=n.userID,q=n.callability;this.$RTCCallabilityStore1.set(p,q.is_callable,null,q.is_callable?l:k);this.__emitChange();break;case c('FBRTCCallabilityActions').Types.CALLABILITY_FETCH_ERROR:this.$RTCCallabilityStore1.set(n.userID,false,null,k);this.__emitChange();break;}};m.prototype.isCallable=function(n){if(c('FBRTCAvailability').isCallable(n))return true;if(!this.$RTCCallabilityStore1.has(n)){this.$RTCCallabilityStore2.fetchCallability(n);this.$RTCCallabilityStore1.set(n,false,null,k);}return !!this.$RTCCallabilityStore1.get(n);};m.prototype.callButtonTooltip=function(n,o){if(this.isCallable(n))return h._("Start a video call with {shortname}",[h.param('shortname',o)]);return h._("{shortname} is currently unavailable for video calling",[h.param('shortname',o)]);};m.prototype.voiceCallButtonTooltip=function(n,o){if(this.isCallable(n))return h._("Start a voice call with {shortname}",[h.param('shortname',o)]);return h._("{shortname} is currently unavailable for voice calling",[h.param('shortname',o)]);};f.exports=m;},null);
__d('FBRTCCallabilityStore',['FBRTCDispatcher','RTCCallabilityStore'],function a(b,c,d,e,f,g){'use strict';if(c.__markCompiled)c.__markCompiled();f.exports=new (c('RTCCallabilityStore'))(c('FBRTCDispatcher'));},null);
__d('ProfileEscapeHatch',['CSS','ProfileTabUtils','Run','TimelineComponentKeys','TimelineController'],function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();var h=[],i=false;function j(k){'use strict';this.$ProfileEscapeHatch1=k;h.push(this);if(!i){c('TimelineController').register(c('TimelineComponentKeys').ESCAPE_HATCH,j);c('Run').onLeave(function(){h=[];});i=true;}}j.handleTabChange=function(k){'use strict';h.forEach(function(l){c('CSS').conditionShow(l.$ProfileEscapeHatch1,c('ProfileTabUtils').isTimelineTab(k));});};f.exports=j;},null);
__d('VideoCallHelpler',['FBRTCCallabilityStore','FBRTCCore','TooltipData'],function a(b,c,d,e,f,g){'use strict';if(c.__markCompiled)c.__markCompiled();function h(j,k){var l=k.calleeID,m=k.calleeName;j.forEachItem(function(n){if(n.getValue&&n.getValue()==='video_call'){if(c('FBRTCCallabilityStore').isCallable(k.calleeID)){n.enable();}else n.disable();c('TooltipData').set(n.getRoot(),c('FBRTCCallabilityStore').callButtonTooltip(l,m),'right');}});}var i={bindProfileVideoCallAction:function(j,k){h(j,k);c('FBRTCCallabilityStore').addListener(function(){h(j,k);});j.subscribe('itemclick',function(l,m){if(m.item.getValue()==='video_call'&&!m.item.isDisabled())c('FBRTCCore').startOutgoingCall(k.calleeID,'timeline_profile',false);});}};f.exports=i;},null);