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

__d("ComposedEntityMutabilityToName",[],(function a(b,c,d,e,f,g){f.exports={0:"MUTABLE",1:"IMMUTABLE",2:"SEGMENTED"}}),null);
__d("ComposedEntityTypeToName",[],(function a(b,c,d,e,f,g){f.exports={0:"MENTION",1:"LINK",2:"IMAGE",3:"VIDEO",4:"EMOTICON",5:"TOKEN",6:"HASHTAG",7:"IMPLICIT_LINK",8:"EMBED",9:"EMOJI",10:"MATH",11:"HIGHLIGHT"}}),null);
__d("MessengerEmojiConfig",[],(function a(b,c,d,e,f,g){f.exports={emoji_colors:[0,127995,127996,127997,127998,127999]}}),null);
__d("MNCommerceBlockTypeJSInstance",[],(function a(b,c,d,e,f,g){f.exports={ALL:"all",PROMOTION:"promotion",NONE:"none"}}),null);
__d("P2PLinkConstants",[],(function a(b,c,d,e,f,g){f.exports={receiverIneligibleHelpURI:"http://www.facebook.com/help/1495718484027862",addDebitCardHelpURI:"http://www.facebook.com/help/200298266807261",helpCenterURI:"http://www.facebook.com/help/863171203733904",contactSupportURI:"http://www.facebook.com/help/contact/1491759007768605",disabledPaymentsSupportURI:"http://www.facebook.com/help/contact/223254857690713",complianceLearnMoreURI:"http://www.facebook.com/help/1555715811351399",complianceLearnMoreMsiteURI:"http://www.facebook.com/help/messenger-app/369959656515129",securePayInfoLearnMoreURI:"http://www.facebook.com/help/146373702454423",contactFraudTeamURI:"http://www.facebook.com/help/contact/370238886476028",payerProtectionURI:"http://www.facebook.com/payer_protection/",helpTransferSystemFailureURI:"http://www.facebook.com/help/contact/614010102040957",helpTransferManualReviewURI:"http://www.facebook.com/help/messenger-app/1463256903894928",helpTransferRecipientCanceledURI:"http://www.facebook.com/help/messenger-app/1564459413784472",helpTransferCompletedURI:"http://www.facebook.com/help/messenger-app/750020781733477",helpTransferCanceledSameCardURI:"http://www.facebook.com/help/messenger-app/818512131561533",helpTransferPushFailURI:"http://www.facebook.com/help/1386991644944095",settingsWWWURI:"http://www.facebook.com/settings?tab=payments",settingsMsiteURI:"http://m.facebook.com/settings/p2p/",mTermsURI:"http://www.facebook.com/legal/m",mHelpURI:"http://www.facebook.com/help/messenger-app/870471599656315",disputeURI:"http://www.facebook.com/help/contact/828169843971429",paymentMethodsURI:"https://www.facebook.com/settings?tab=payments&section=settings",paymentHistoryURI:"https://www.facebook.com/settings?tab=payments&section=history",paymentsTermsURI:"http://www.facebook.com/payments_terms/"}}),null);
__d("MercuryAudioPlayer",["Arbiter","DOM","Event","Flash"],(function a(b,c,d,e,f,g){__p&&__p();var h=200;function i(){var r=c("DOM").create("audio"),s=false;try{if(!!r.canPlayType)if(r.canPlayType("video/mp4;").replace(/^no$/,""))s=true}finally{return s}}function j(){return c("Flash").isAvailable()}var k=function k(){__p&&__p();this.interval=null;this.arbiterInstance=null;this.audio=c("DOM").create("audio");c("Event").listen(this.audio,"playing",function(){this.informAttachment("playing",this.audio.currentTime);this.interval=setInterval(function(){this.informAttachment("playing",this.audio.currentTime)}.bind(this),h)}.bind(this));c("Event").listen(this.audio,"ended",function(){clearInterval(this.interval);this.informAttachment("finished")}.bind(this))};Object.assign(k.prototype,{setAudio:function r(s,t){this.audio.setAttribute("src",s);this.arbiterInstance=t},informAttachment:function r(s,t){if(this.arbiterInstance)this.arbiterInstance.inform(s,t)},play:function r(){this.audio.play();this.informAttachment("played")},resume:function r(){this.audio.play();this.informAttachment("played")},pause:function r(){this.audio.pause();clearInterval(this.interval);this.informAttachment("paused")},getType:function r(){return"html5"}});var l=function l(){this.src=null;this.arbiterInstance=null;var r=c("DOM").create("div");document.body.appendChild(r);this.swf=c("Flash").embed("/swf/cigars/SoundStreamPlayer.swf",r,null,{});this.interval=null;c("Arbiter").subscribe("soundstream/finished",function(){clearInterval(this.interval);this.informAttachment("finished")}.bind(this))};Object.assign(l.prototype,{setAudio:function r(s,t){this.src=s;this.arbiterInstance=t},informAttachment:function r(s,t){if(this.arbiterInstance)this.arbiterInstance.inform(s,t)},play:function r(){this.swf.playSound(this.src);this.interval=setInterval(function(){var s=this.swf.getCurrentTime();this.informAttachment("playing",s)}.bind(this),h);this.informAttachment("played")},resume:function r(){this.swf.resume();this.informAttachment("played")},pause:function r(){clearInterval(this.interval);this.swf.pause();this.informAttachment("paused")},getType:function r(){return"flash"}});function m(){if(i())return new k();else if(j())return new l();return false}var n=null,o=null,p=0;function q(r,s){this.src=r;this.arbiterInstance=s;this.audio_id=++p;n!==null||(n=m());if(!n)return false}Object.assign(q.prototype,{getType:function r(){if(!n)return false;else return n.getType()},play:function r(s){if(s&&o==this.audio_id)n.resume();else{this.pause();o=this.audio_id;n.setAudio(this.src,this.arbiterInstance);n.play()}},pause:function r(){n.pause()}});f.exports=q}),null);
__d("MercuryAttachmentAudioClip.react",["cssVar","cx","fbt","Arbiter","ArbiterMixin","MercuryAudioPlayer","CurrentUser","JSLogger","LeftRight.react","Link.react","MercuryShareAttachmentRenderLocations","React","SubscriptionsHandler","WorkModeConfig","joinClasses","messengerCustomColorUtils","shield"],(function a(b,c,d,e,f,g,h,i,j){__p&&__p();var k=c("React").PropTypes,l="MercuryAttachmentAudioClip/play",m="progress-bar",n=c("JSLogger").create("mercury_audio_clip"),o=c("React").createClass({displayName:"AudioClip",mixins:[c("ArbiterMixin")],propTypes:{customColor:k.string,duration:k.number,isChat:k.bool,isFromViewer:k.bool,location:k.oneOf(c("MercuryShareAttachmentRenderLocations").getValues()),onAttachmentLoad:k.func,rootClassName:k.string,showHelp:k.bool,src:k.string.isRequired,width:k.number},getInitialState:function p(){this.logged=false;return{time:0,playing:false,started:false,duration:this.props.duration,audioPlayer:new(c("MercuryAudioPlayer"))(this.props.src,this)}},componentDidMount:function p(){this.props.onAttachmentLoad&&this.props.onAttachmentLoad();this._subscriptionsHandler=new(c("SubscriptionsHandler"))();this._subscriptionsHandler.addSubscriptions(this.subscribe("playing",this.updateTime),this.subscribe("played",c("shield")(this.setState,this,{playing:true,started:true})),this.subscribe("paused",c("shield")(this.setState,this,{playing:false})),this.subscribe("finished",c("shield")(this.setState,this,{playing:false,started:false,time:this.props.duration})),c("Arbiter").subscribe(l,function(q,r){if(this.props.src!=r)this.setState({time:0})}.bind(this)))},componentWillUnmount:function p(){this._subscriptionsHandler&&this._subscriptionsHandler.release()},updateTime:function p(q,r){this.setState({time:r})},play:function p(){if(this.state.playing)this.state.audioPlayer.pause();else{this.state.audioPlayer.play(this.state.started);c("Arbiter").inform(l,this.props.src);if(!this.logged){this.logged=true;n.log("play",{uid:c("CurrentUser").getID(),duration:this.props.duration})}}},_formatSeconds:function p(q){if(q){q=Math.round(q);var r=q%60;if(r<10)r="0"+r;var s=Math.floor(q/60);return s+":"+r}else return null},_renderPlayer:function p(q,r,s){var t=this.props.isFromViewer,u=this.props.isChat,v=c("WorkModeConfig").is_work_user,w=s===m,x=u&&t&&!w,y=this.props.location===c("MercuryShareAttachmentRenderLocations").MESSENGER,z=v?"#373e4c":"#4080ff",A=s||z,B={width:q};if(x)c("messengerCustomColorUtils").customBubbleStyle(A,B);var C=s&&s!==m&&!u?{color:s}:{},D={};if(w)D["aria-disabled"]=true;return c("React").createElement(c("Link.react"),babelHelpers["extends"]({"aria-label":j._("Voice Message"),className:"_1miz _2e-1"+(!y?" _3_om":"")+(t&&u?" _3e5f":""),role:"button",style:B,onClick:this.play},D),c("React").createElement("span",{className:"_1mi- _2e-2"},c("React").createElement("i",{className:"_1mi_ _2e-3"})),c("React").createElement("span",{style:C,className:"_1mj0 _2e-4 _3oh-"},r),c("React").createElement("div",{className:"_1mj1 _2e-5"}))},render:function p(){__p&&__p();var q=this.state.time,r=this.state.playing,s=this._formatSeconds(this.state.duration),t=this.props.location===c("MercuryShareAttachmentRenderLocations").MESSENGER,u=this.props.width||170;if(t){var v=this.props.duration;if(v>10)u=240;else if(v>5)u=200;else if(v>2)u=160;else u=120}var w=null,x=Math.ceil(q*(u+2)/this.state.duration);if(t)x=Math.ceil(q*(u+24)/this.state.duration);if(this.state.audioPlayer&&this.state.audioPlayer.getType()){var y=this._renderPlayer(u,s,this.props.customColor),z=this._renderPlayer(u,s,m),A="_1mj2 _2e-6"+(r&&q!==0?" _1mj3":"")+(r&&q===0?" _4g4x":"");w=c("React").createElement("div",{className:A},y,c("React").createElement("div",{className:"_1mj4 _2e-7",style:{width:x}},z))}else w=c("React").createElement("div",{className:"_1mj2"},c("React").createElement("div",{className:"_1miz"},c("React").createElement(c("LeftRight.react"),null,c("React").createElement("a",{className:"_1mj5",href:this.props.src},c("React").createElement("span",{className:"_3qi6"},c("React").createElement("i",{className:"_1mj6"})),c("React").createElement("span",{className:"_1mj7"},j._("Voice Message")),c("React").createElement("span",{className:"_1mj8"},s)),c("React").createElement("a",{href:this.props.src,className:"_1mj9"},c("React").createElement("i",{className:"_1mja"})))));return c("React").createElement("div",{className:c("joinClasses")("_1mjb"+(t?" _454y":""),this.props.rootClassName)},w)}});f.exports=o}),null);
__d("UFICreatorInfo.react",["cx","fbt","HelpLink.react","Image.react","React","URI"],(function a(b,c,d,e,f,g,h,i){"use strict";__p&&__p();var j,k,l=c("React").PropTypes;j=babelHelpers.inherits(m,c("React").Component);k=j&&j.prototype;m.prototype.render=function(){__p&&__p();var n=void 0,o=this.getCreatorLink();switch(this.props.labelType){case"commented":n=i._("Commented on by {creator}",[i.param("creator",o)]);break;case"edited_comment":n=i._("Edited by {creator}",[i.param("creator",o)]);break;case"sent_message":n=i._("Sent by {creator}",[i.param("creator",o)]);break;case"page_admin_note":n=i._("Noted by {creator}",[i.param("creator",o)]);break;default:return c("React").createElement("span",null)}return c("React").createElement("span",null,n,c("React").createElement(c("HelpLink.react"),{tooltip:this.getHelpText()}))};m.prototype.getCreatorLink=function(){switch(this.props.creatorType){case"application":case"gray_account":case"indirect_admin":return c("React").createElement("a",{className:"uiLinkSubtle","data-hover":"tooltip","data-tooltip-content":this.getTooltipText()},this.props.creatorName);case"business_admin":return c("React").createElement("a",{className:"uiLinkSubtle",href:this.props.profileURI},this.props.creatorName);case"direct_admin":return this.getProfileLinkWithHovercard();case"former_admin":return c("React").createElement("span",{className:"uiLinkSubtle"},c("React").createElement(c("Image.react"),{src:"/images/privacy/cant-see.png",width:9,height:9,className:"_3-8_"}),this.getProfileLinkWithHovercard());default:return c("React").createElement("span",{className:"uiLinkSubtle"},this.props.creatorName)}};m.prototype.getTooltipText=function(){switch(this.props.creatorType){case"application":return this.getApplicationText();case"gray_account":return this.getGrayAccountText();case"indirect_admin":return this.getIndirectAdminText()}return null};m.prototype.getProfileLinkWithHovercard=function(){if(!this.props.profileURI)return c("React").createElement("span",null,this.props.creatorName);var n=new(c("URI"))("/ajax/hovercard/user.php").setQueryData({id:this.props.creatorID}).addQueryData({type:"page_admin",extragetparams:JSON.stringify({directed_target_id:this.props.pageID})});return c("React").createElement("a",{className:"uiLinkSubtle","data-hovercard":n,href:this.props.profileURI},this.props.creatorName)};m.prototype.getApplicationText=function(){switch(this.props.labelType){case"commented":return i._("This was commented on by someone using {application}.",[i.param("application",this.props.creatorName)]);case"edited_comment":return i._("This was edited by someone using {application}.",[i.param("application",this.props.creatorName)]);case"sent_message":return i._("This was sent by someone using {application}.",[i.param("application",this.props.creatorName)]);case"page_admin_note":return i._("This was noted by someone using {application}.",[i.param("application",this.props.creatorName)])}return null};m.prototype.getIndirectAdminText=function(){switch(this.props.labelType){case"commented":return i._("This was commented on by someone from {page}.",[i.param("page",this.props.creatorName)]);case"edited_comment":return i._("This was edited by someone from {page}.",[i.param("page",this.props.creatorName)]);case"sent_message":return i._("This was sent by someone from {page}.",[i.param("page",this.props.creatorName)]);case"page_admin_note":return i._("This was noted by someone from {page}.",[i.param("page",this.props.creatorName)])}return null};m.prototype.getGrayAccountText=function(){switch(this.props.labelType){case"commented":return i._("This was commented on by someone who doesn't have a personal Facebook account.");case"edited_comment":return i._("This was edited by someone who doesn't have a personal Facebook account.");case"sent_message":return i._("This was sent by someone who doesn't have a personal Facebook account.");case"page_admin_note":return i._("This was noted by someone who doesn't have a personal Facebook account.")}return null};m.prototype.getHelpText=function(){switch(this.props.labelType){case"commented":return i._("Only people who manage this Page can see who posted a comment");case"edited_comment":return i._("Only people who manage this Page can see who edited a comment");case"sent_message":return i._("Only people who manage this Page can see who sent a message");case"page_admin_note":return i._("Only people who manage this Page can see who created a note")}return null};function m(){j.apply(this,arguments)}m.propTypes={creatorID:l.string.isRequired,creatorType:l.string.isRequired,creatorName:l.string.isRequired,labelType:l.string.isRequired,pageID:l.string.isRequired,profileURI:l.string};f.exports=m}),null);
__d("PagesMessengerCreatorInfo.react",["cx","React","UFICreatorInfo.react","XUIGrayText.react"],(function a(b,c,d,e,f,g,h){"use strict";__p&&__p();var i,j,k=c("React").PropTypes;i=babelHelpers.inherits(l,c("React").Component);j=i&&i.prototype;l.prototype.render=function(){return c("React").createElement(c("XUIGrayText.react"),{className:"_ajk"+(this.props.isNote?" _45l2":""),display:"inline",shade:"light",size:"meta1"},c("React").createElement(c("UFICreatorInfo.react"),{creatorID:this.props.creator_info.creatorID,creatorType:this.props.creator_info.creatorType,creatorName:this.props.creator_info.creatorName,labelType:this.props.creator_info.labelType,pageID:this.props.creator_info.pageID,profileURI:this.props.creator_info.profileURI}))};function l(){i.apply(this,arguments)}l.propTypes={creator_info:k.shape({creatorID:k.string.isRequired,creatorName:k.string.isRequired,creatorType:k.string.isRequired,labelType:k.string.isRequired,pageID:k.string.isRequired,profileURI:k.string}).isRequired};f.exports=l}),null);
__d("EmojiDispatcher",["ExplicitRegistrationDispatcher"],(function a(b,c,d,e,f,g){"use strict";f.exports=new(c("ExplicitRegistrationDispatcher"))({strict:false})}),null);
__d("EmojiActions",["EmojiDispatcher","keyMirror"],(function a(b,c,d,e,f,g){"use strict";var h=c("keyMirror")({CHANGE_CURRENT_CATEGORY:null,CHANGE_EMOJI_COLOR:null,EMOJI_COLOR_READY:null,GET_EMOJI_COLOR:null,TRAY_DATA_READY:null,UPDATE_TRAY_DATA:null}),i={Types:h,loadedTrayData:function j(){c("EmojiDispatcher").dispatch({type:i.Types.TRAY_DATA_READY})},updateTrayData:function j(){c("EmojiDispatcher").dispatch({type:i.Types.UPDATE_TRAY_DATA})},changeEmojiColor:function j(k){c("EmojiDispatcher").dispatch({type:i.Types.CHANGE_EMOJI_COLOR,color:k})},changeCurrentCategory:function j(k){c("EmojiDispatcher").dispatch({type:i.Types.CHANGE_CURRENT_CATEGORY,currentCategory:k})},getEmojiColor:function j(){c("EmojiDispatcher").dispatch({type:i.Types.GET_EMOJI_COLOR})},emojiColorReady:function j(k){c("EmojiDispatcher").dispatch({type:i.Types.EMOJI_COLOR_READY,color:k})}};f.exports=i}),null);
__d("XMessagingGetEmojiRecentUsageController",["XController"],(function a(b,c,d,e,f,g){f.exports=c("XController").create("/messaging/emoji_recent_usage/",{})}),null);
__d("EmojiServerRequests",["Promise","AsyncRequest","XMessagingGetEmojiRecentUsageController"],(function a(b,c,d,e,f,g){"use strict";var h={fetchTrayData:function j(k){return i(c("XMessagingGetEmojiRecentUsageController").getURIBuilder().getURI(),k,true)}};function i(j,k,l){return new(c("Promise"))(function(m,n){return new(c("AsyncRequest"))(j).setHandler(function(o){return m(o.getPayload())}).setAllowCrossPageTransition(l).send()}).then(k)}f.exports=h}),null);
__d("XMessagingGetEmojiColorPrefController",["XController"],(function a(b,c,d,e,f,g){f.exports=c("XController").create("/messaging/get_emoji_color/",{})}),null);
__d("XMessagingSetEmojiColorPrefController",["XController"],(function a(b,c,d,e,f,g){f.exports=c("XController").create("/messaging/set_emoji_color/",{})}),null);
__d("EmojiState",["fbt","AsyncRequest","EmojiActions","EmojiServerRequests","MessengerSupportedEmojiUtils","XMessagingGetEmojiColorPrefController","XMessagingSetEmojiColorPrefController"],(function a(b,c,d,e,f,g,h){"use strict";__p&&__p();var i=null,j=null,k=void 0,l={onTrayDataReady:function m(n){if(!k)k=c("EmojiServerRequests").fetchTrayData(function(o){j=o});k.then(function(){n();c("EmojiActions").loadedTrayData()});k.done()},getEmojiColor:function m(){var n=c("XMessagingGetEmojiColorPrefController").getURIBuilder().getURI();new(c("AsyncRequest"))(n).setMethod("POST").setHandler(function(o){c("EmojiActions").emojiColorReady(o.payload)}).send()},changeEmojiColor:function m(n){var o=c("XMessagingSetEmojiColorPrefController").getURIBuilder().getURI();new(c("AsyncRequest"))(o).setMethod("POST").setData({color:n}).send()},addMRUCategory:function m(){if(j){var n=j.map(function(o){return c("MessengerSupportedEmojiUtils").getSupportedEmojiCodesArray(o)}).filter(function(o){return!!o});i={name:h._("Recently Sent"),emojis:n,icon:[128340]};c("EmojiActions").updateTrayData();j=null}},_addRecentlyUsedEmoji:function m(n){__p&&__p();var o,p=i&&i.emojis;if(!p)return;var q=function q(r){var s=n[r];for(var t=0;t<p.length;++t)if(p[t].length==s.length&&p[t].every(function(u,v){return u===s[v]})){p.splice(t,1);break}p.unshift(s)};for(var r=0;r<n.length;++r)q(r);c("EmojiActions").updateTrayData()},getMRUCategory:function m(){if(!i)this.addMRUCategory();return i},updateRecentlyUsed:function m(n){if(!i){this.addMRUCategory();return}this._addRecentlyUsedEmoji(n)}};f.exports=l}),null);
__d("EmojiStateStore",["EmojiActions","EmojiDispatcher","EmojiState","FluxStore"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();var h,i;h=babelHelpers.inherits(j,c("FluxStore"));i=h&&h.prototype;function j(){i.constructor.call(this,c("EmojiDispatcher"));this.$EmojiStateStore2=false}j.prototype.getState=function(){var k=c("EmojiState").getMRUCategory();return{currentCategory:this.$EmojiStateStore4,emojiColor:this.$EmojiStateStore3,mruCategory:[k],threadID:this.$EmojiStateStore1,trayDataReady:this.$EmojiStateStore2}};j.prototype.__onDispatch=function(k){__p&&__p();var l=c("EmojiActions").Types;switch(k.type){case l.GET_EMOJI_COLOR:c("EmojiState").getEmojiColor();break;case l.EMOJI_COLOR_READY:this.$EmojiStateStore3=k.color;break;case l.CHANGE_EMOJI_COLOR:c("EmojiState").changeEmojiColor(k.color);this.$EmojiStateStore3=k.color;break;case l.CHANGE_CURRENT_CATEGORY:this.$EmojiStateStore4=k.currentCategory;break;case l.UPDATE_TRAY_DATA:break;case l.TRAY_DATA_READY:this.$EmojiStateStore2=true;break}this.__emitChange()};f.exports=new j()}),null);
__d("MessengerGraphQLTypeaheadAdapter_game.graphql",[],(function a(b,c,d,e,f,g){"use strict";var h={kind:"Fragment",name:"MessengerGraphQLTypeaheadAdapter_game",type:"Application",metadata:null,argumentDefinitions:[],selections:[{kind:"ScalarField",alias:null,name:"id",args:null,storageKey:null},{kind:"ScalarField",alias:null,name:"name",args:null,storageKey:null},{kind:"LinkedField",alias:null,name:"instant_game_info",storageKey:null,args:null,concreteType:"GamesInstantPlayStyleInfo",plural:false,selections:[{kind:"ScalarField",alias:null,name:"icon_uri",args:null,storageKey:null}]}]};f.exports=h}),null);
__d("MessengerGraphQLTypeaheadAdapter_group.graphql",[],(function a(b,c,d,e,f,g){"use strict";var h=function(){var i={kind:"ScalarField",alias:null,name:"name",args:null,storageKey:null};return{kind:"Fragment",name:"MessengerGraphQLTypeaheadAdapter_group",type:"MessageThread",metadata:null,argumentDefinitions:[],selections:[{kind:"LinkedField",alias:null,name:"thread_key",storageKey:null,args:null,concreteType:"MessageThreadKey",plural:false,selections:[{kind:"ScalarField",alias:null,name:"thread_fbid",args:null,storageKey:null}]},i,{kind:"LinkedField",alias:null,name:"image",storageKey:null,args:null,concreteType:"Image",plural:false,selections:[{kind:"ScalarField",alias:null,name:"uri",args:null,storageKey:null}]},{kind:"ScalarField",alias:null,name:"is_group_thread",args:null,storageKey:null},{kind:"LinkedField",alias:null,name:"other_participants",storageKey:"other_participants(first:250)",args:[{kind:"Literal",name:"first",value:250,type:"Int"}],concreteType:"MessagingParticipantsOfThreadConnection",plural:false,selections:[{kind:"LinkedField",alias:null,name:"edges",storageKey:null,args:null,concreteType:"MessagingParticipantsOfThreadEdge",plural:true,selections:[{kind:"LinkedField",alias:null,name:"node",storageKey:null,args:null,concreteType:"MessagingParticipant",plural:false,selections:[{kind:"LinkedField",alias:null,name:"messaging_actor",storageKey:null,args:null,concreteType:null,plural:false,selections:[{kind:"ScalarField",alias:null,name:"id",args:null,storageKey:null},i,{kind:"InlineFragment",type:"User",selections:[{kind:"ScalarField",alias:null,name:"is_messenger_user",args:null,storageKey:null},{kind:"ScalarField",alias:null,name:"is_viewer_coworker",args:null,storageKey:null}]}]}]}]}]}]}}();f.exports=h}),null);
__d("MessengerGraphQLTypeaheadAdapter_page.graphql",[],(function a(b,c,d,e,f,g){"use strict";var h={kind:"Fragment",name:"MessengerGraphQLTypeaheadAdapter_page",type:"Page",metadata:null,argumentDefinitions:[],selections:[{kind:"ScalarField",alias:null,name:"id",args:null,storageKey:null},{kind:"ScalarField",alias:null,name:"name",args:null,storageKey:null},{kind:"LinkedField",alias:null,name:"profile_picture",storageKey:"profile_picture(height:32,width:32)",args:[{kind:"Literal",name:"height",value:32,type:"Int"},{kind:"Literal",name:"width",value:32,type:"Int"}],concreteType:"Image",plural:false,selections:[{kind:"ScalarField",alias:null,name:"uri",args:null,storageKey:null}]},{kind:"ScalarField",alias:null,name:"url",args:null,storageKey:null},{kind:"ScalarField",alias:null,name:"is_messenger_user",args:null,storageKey:null}]};f.exports=h}),null);
__d("MessengerGraphQLTypeaheadAdapter_user.graphql",[],(function a(b,c,d,e,f,g){"use strict";var h=function(){var i={kind:"ScalarField",alias:null,name:"id",args:null,storageKey:null},j={kind:"ScalarField",alias:null,name:"name",args:null,storageKey:null};return{kind:"Fragment",name:"MessengerGraphQLTypeaheadAdapter_user",type:"User",metadata:null,argumentDefinitions:[],selections:[{kind:"ScalarField",alias:null,name:"url",args:null,storageKey:null},i,{kind:"ScalarField",alias:null,name:"is_memorialized",args:null,storageKey:null},{kind:"ScalarField",alias:null,name:"is_viewer_friend",args:null,storageKey:null},{kind:"ScalarField",alias:null,name:"is_viewer_coworker",args:null,storageKey:null},{kind:"LinkedField",alias:null,name:"profile_picture",storageKey:"profile_picture(height:32,width:32)",args:[{kind:"Literal",name:"height",value:32,type:"Int"},{kind:"Literal",name:"width",value:32,type:"Int"}],concreteType:"Image",plural:false,selections:[{kind:"ScalarField",alias:null,name:"uri",args:null,storageKey:null}]},{kind:"LinkedField",alias:null,name:"messenger_contact",storageKey:null,args:null,concreteType:"Contact",plural:false,selections:[{kind:"ScalarField",alias:null,name:"is_on_viewer_contact_list",args:null,storageKey:null}]},j,{kind:"ScalarField",alias:null,name:"is_messenger_user",args:null,storageKey:null},{kind:"ScalarField",alias:null,name:"is_work_user",args:null,storageKey:null},{kind:"ScalarField",alias:null,name:"viewer_affinity",args:null,storageKey:null},{kind:"LinkedField",alias:null,name:"scim_company_user",storageKey:null,args:null,concreteType:"ScimCompanyUser",plural:false,selections:[{kind:"ScalarField",alias:null,name:"company_title",args:null,storageKey:null}]},{kind:"LinkedField",alias:null,name:"work_info",storageKey:null,args:null,concreteType:"WorkUserInfo",plural:false,selections:[{kind:"LinkedField",alias:null,name:"work_community",storageKey:null,args:null,concreteType:"Group",plural:false,selections:[j]}]},{kind:"LinkedField",alias:"members",name:"aloha_proxy_user_owners",storageKey:"aloha_proxy_user_owners(first:10)",args:[{kind:"Literal",name:"first",value:10,type:"Int"}],concreteType:"AlohaProxyUserToAlohaProxyUserOwnersConnection",plural:false,selections:[{kind:"LinkedField",alias:null,name:"edges",storageKey:null,args:null,concreteType:"AlohaProxyUserToAlohaProxyUserOwnersEdge",plural:true,selections:[{kind:"LinkedField",alias:null,name:"node",storageKey:null,args:null,concreteType:null,plural:false,selections:[i,{kind:"ScalarField",alias:"name",name:"aloha_user_name",args:null,storageKey:null}]}]}]}]}}();f.exports=h}),null);
__d("MessengerGraphQLTypeaheadViewQuery.graphql",[],(function a(b,c,d,e,f,g){"use strict";var h=function(){var i=[{kind:"LocalArgument",name:"queryString",type:"String!",defaultValue:null},{kind:"LocalArgument",name:"canViewerSendMoneyFilter",type:"Boolean",defaultValue:null},{kind:"LocalArgument",name:"localEntryIDs",type:"[ID]!",defaultValue:null},{kind:"LocalArgument",name:"maxThreadResults",type:"Int!",defaultValue:null},{kind:"LocalArgument",name:"shouldQueryGroups",type:"Boolean!",defaultValue:null},{kind:"LocalArgument",name:"shouldQueryPages",type:"Boolean!",defaultValue:null},{kind:"LocalArgument",name:"shouldQueryThreadName",type:"Boolean!",defaultValue:null},{kind:"LocalArgument",name:"shouldQueryParticipantIDs",type:"Boolean!",defaultValue:null},{kind:"LocalArgument",name:"shouldQueryParticipantNames",type:"Boolean!",defaultValue:null},{kind:"LocalArgument",name:"shouldQueryVCEndpoint",type:"Boolean!",defaultValue:null},{kind:"LocalArgument",name:"shouldQueryInternalBot",type:"Boolean!",defaultValue:null},{kind:"LocalArgument",name:"shouldQueryRoomsAudience",type:"Boolean!",defaultValue:null},{kind:"LocalArgument",name:"shouldSkipQueryUsers",type:"Boolean!",defaultValue:null},{kind:"LocalArgument",name:"threadFBID",type:"ID!",defaultValue:null}],j=[{kind:"Variable",name:"query",variableName:"queryString",type:"String!"}],k=[{kind:"Variable",name:"id",variableName:"threadFBID",type:"ID!"}],l={kind:"ScalarField",alias:null,name:"id",args:null,storageKey:null},m={kind:"Literal",name:"first",value:20,type:"Int"},n={kind:"ScalarField",alias:null,name:"__typename",args:null,storageKey:null},o={kind:"ScalarField",alias:null,name:"name",args:null,storageKey:null},p=[{kind:"ScalarField",alias:null,name:"uri",args:null,storageKey:null}],q={kind:"LinkedField",alias:null,name:"profile_picture",storageKey:"profile_picture(height:32,width:32)",args:[{kind:"Literal",name:"height",value:32,type:"Int"},{kind:"Literal",name:"width",value:32,type:"Int"}],concreteType:"Image",plural:false,selections:p},r={kind:"ScalarField",alias:null,name:"url",args:null,storageKey:null},s={kind:"ScalarField",alias:null,name:"is_messenger_user",args:null,storageKey:null},t={kind:"InlineFragment",type:"Page",selections:[o,q,r,s,{kind:"ScalarField",alias:null,name:"category_type",args:null,storageKey:null}]},u=[{kind:"LinkedField",alias:null,name:"edges",storageKey:null,args:null,concreteType:"SearchableResultsEdge",plural:true,selections:[{kind:"LinkedField",alias:null,name:"node",storageKey:null,args:null,concreteType:null,plural:false,selections:[n,l,t]}]}],v={kind:"ScalarField",alias:null,name:"is_viewer_coworker",args:null,storageKey:null},w={kind:"Literal",name:"first",value:10,type:"Int"},x=[{kind:"LinkedField",alias:null,name:"node",storageKey:null,args:null,concreteType:null,plural:false,selections:[n,l,{kind:"InlineFragment",type:"User",selections:[r,{kind:"ScalarField",alias:null,name:"is_memorialized",args:null,storageKey:null},{kind:"ScalarField",alias:null,name:"is_viewer_friend",args:null,storageKey:null},v,q,{kind:"LinkedField",alias:null,name:"messenger_contact",storageKey:null,args:null,concreteType:"Contact",plural:false,selections:[{kind:"ScalarField",alias:null,name:"is_on_viewer_contact_list",args:null,storageKey:null},l]},o,s,{kind:"ScalarField",alias:null,name:"is_work_user",args:null,storageKey:null},{kind:"ScalarField",alias:null,name:"viewer_affinity",args:null,storageKey:null},{kind:"LinkedField",alias:null,name:"scim_company_user",storageKey:null,args:null,concreteType:"ScimCompanyUser",plural:false,selections:[{kind:"ScalarField",alias:null,name:"company_title",args:null,storageKey:null},l]},{kind:"LinkedField",alias:null,name:"work_info",storageKey:null,args:null,concreteType:"WorkUserInfo",plural:false,selections:[{kind:"LinkedField",alias:null,name:"work_community",storageKey:null,args:null,concreteType:"Group",plural:false,selections:[o,l]}]},{kind:"LinkedField",alias:"members",name:"aloha_proxy_user_owners",storageKey:"aloha_proxy_user_owners(first:10)",args:[w],concreteType:"AlohaProxyUserToAlohaProxyUserOwnersConnection",plural:false,selections:[{kind:"LinkedField",alias:null,name:"edges",storageKey:null,args:null,concreteType:"AlohaProxyUserToAlohaProxyUserOwnersEdge",plural:true,selections:[{kind:"LinkedField",alias:null,name:"node",storageKey:null,args:null,concreteType:null,plural:false,selections:[n,l,{kind:"ScalarField",alias:"name",name:"aloha_user_name",args:null,storageKey:null}]}]}]}]}]}],y={kind:"Variable",name:"last",variableName:"maxThreadResults",type:"Int"},z=[{kind:"LinkedField",alias:null,name:"edges",storageKey:null,args:null,concreteType:"ViewerMessageThreadsEdge",plural:true,selections:[{kind:"LinkedField",alias:null,name:"node",storageKey:null,args:null,concreteType:"MessageThread",plural:false,selections:[{kind:"LinkedField",alias:null,name:"thread_key",storageKey:null,args:null,concreteType:"MessageThreadKey",plural:false,selections:[{kind:"ScalarField",alias:null,name:"thread_fbid",args:null,storageKey:null}]},o,{kind:"LinkedField",alias:null,name:"image",storageKey:null,args:null,concreteType:"Image",plural:false,selections:p},{kind:"ScalarField",alias:null,name:"is_group_thread",args:null,storageKey:null},{kind:"LinkedField",alias:null,name:"other_participants",storageKey:"other_participants(first:250)",args:[{kind:"Literal",name:"first",value:250,type:"Int"}],concreteType:"MessagingParticipantsOfThreadConnection",plural:false,selections:[{kind:"LinkedField",alias:null,name:"edges",storageKey:null,args:null,concreteType:"MessagingParticipantsOfThreadEdge",plural:true,selections:[{kind:"LinkedField",alias:null,name:"node",storageKey:null,args:null,concreteType:"MessagingParticipant",plural:false,selections:[{kind:"LinkedField",alias:null,name:"messaging_actor",storageKey:null,args:null,concreteType:null,plural:false,selections:[n,l,o,{kind:"InlineFragment",type:"User",selections:[s,v]}]},l]}]}]},l]}]}];return{kind:"Request",operationKind:"query",name:"MessengerGraphQLTypeaheadViewQuery",id:"1513263878790814",text:null,metadata:{},fragment:{kind:"Fragment",name:"MessengerGraphQLTypeaheadViewQuery",type:"Query",metadata:null,argumentDefinitions:i,selections:[{kind:"LinkedField",alias:"profiles",name:"entities_named",storageKey:null,args:j,concreteType:"SearchableEntitiesQuery",plural:false,selections:[{kind:"FragmentSpread",name:"MessengerTypeaheadResultView_profiles",args:null}]},{kind:"Condition",passingValue:true,condition:"shouldQueryRoomsAudience",selections:[{kind:"LinkedField",alias:"roomAudience",name:"message_thread",storageKey:null,args:k,concreteType:"MessageThread",plural:false,selections:[{kind:"FragmentSpread",name:"MessengerTypeaheadResultView_roomAudience",args:null}]}]},{kind:"Condition",passingValue:true,condition:"shouldQueryGroups",selections:[{kind:"LinkedField",alias:"groups",name:"__viewer_viewer",storageKey:null,args:null,concreteType:"Viewer",plural:false,selections:[{kind:"FragmentSpread",name:"MessengerTypeaheadResultView_groups",args:null}]}]}]},operation:{kind:"Operation",name:"MessengerGraphQLTypeaheadViewQuery",argumentDefinitions:i,selections:[{kind:"LinkedField",alias:"profiles",name:"entities_named",storageKey:null,args:j,concreteType:"SearchableEntitiesQuery",plural:false,selections:[l,{kind:"Condition",passingValue:true,condition:"shouldQueryInternalBot",selections:[{kind:"LinkedField",alias:"internal_bot_results",name:"search_results",storageKey:"search_results(first:20,internal_bot:true)",args:[m,{kind:"Literal",name:"internal_bot",value:true,type:"Boolean"}],concreteType:"SearchableResultsConnection",plural:false,selections:u}]},{kind:"Condition",passingValue:true,condition:"shouldQueryVCEndpoint",selections:[{kind:"LinkedField",alias:"vc_results",name:"search_results",storageKey:"search_results(first:20,vc_endpoint:true)",args:[m,{kind:"Literal",name:"vc_endpoint",value:true,type:"Boolean"}],concreteType:"SearchableResultsConnection",plural:false,selections:u}]},{kind:"Condition",passingValue:true,condition:"shouldQueryPages",selections:[{kind:"LinkedField",alias:"page_results",name:"search_results",storageKey:"search_results(first:5,include_games:true,messenger_commerce:true)",args:[{kind:"Literal",name:"first",value:5,type:"Int"},{kind:"Literal",name:"include_games",value:true,type:"Boolean"},{kind:"Literal",name:"messenger_commerce",value:true,type:"Boolean"}],concreteType:"SearchableResultsConnection",plural:false,selections:[{kind:"LinkedField",alias:null,name:"edges",storageKey:null,args:null,concreteType:"SearchableResultsEdge",plural:true,selections:[{kind:"LinkedField",alias:null,name:"node",storageKey:null,args:null,concreteType:null,plural:false,selections:[n,l,{kind:"InlineFragment",type:"Application",selections:[o,{kind:"LinkedField",alias:null,name:"instant_game_info",storageKey:null,args:null,concreteType:"GamesInstantPlayStyleInfo",plural:false,selections:[{kind:"ScalarField",alias:null,name:"icon_uri",args:null,storageKey:null}]}]},t]}]}]}]},{kind:"Condition",passingValue:false,condition:"shouldSkipQueryUsers",selections:[{kind:"LinkedField",alias:"user_results",name:"search_results",storageKey:null,args:[{kind:"Variable",name:"can_viewer_send_money",variableName:"canViewerSendMoneyFilter",type:"Boolean"},{kind:"Literal",name:"context",value:"web_messenger_composer",type:"SearchContext"},m,{kind:"Literal",name:"include_messenger_only_results_for_web_messenger",value:true,type:"Boolean"},{kind:"Literal",name:"of_type",value:["user"],type:"[SearchEntityType]"}],concreteType:"SearchableResultsConnection",plural:false,selections:[{kind:"LinkedField",alias:null,name:"edges",storageKey:null,args:null,concreteType:"SearchableResultsEdge",plural:true,selections:x}]}]}]},{kind:"Condition",passingValue:true,condition:"shouldQueryRoomsAudience",selections:[{kind:"LinkedField",alias:"roomAudience",name:"message_thread",storageKey:null,args:k,concreteType:"MessageThread",plural:false,selections:[l,{kind:"Condition",passingValue:true,condition:"shouldQueryRoomsAudience",selections:[{kind:"LinkedField",alias:"user_results",name:"messaging_audience_list",storageKey:null,args:[w,{kind:"Variable",name:"named",variableName:"queryString",type:"String"}],concreteType:"AllAudienceListOfMessageThreadConnection",plural:false,selections:[{kind:"LinkedField",alias:null,name:"edges",storageKey:null,args:null,concreteType:"AllAudienceListOfMessageThreadEdge",plural:true,selections:x}]}]}]}]},{kind:"Condition",passingValue:true,condition:"shouldQueryGroups",selections:[{kind:"LinkedField",alias:"groups",name:"viewer",storageKey:null,args:null,concreteType:"Viewer",plural:false,selections:[{kind:"Condition",passingValue:true,condition:"shouldQueryParticipantNames",selections:[{kind:"LinkedField",alias:"threads_matching_participant_names",name:"message_threads",storageKey:null,args:[y,{kind:"Literal",name:"with_group",value:true,type:"Boolean"},{kind:"Variable",name:"with_participants",variableName:"queryString",type:"String"}],concreteType:"ViewerMessageThreadsConnection",plural:false,selections:z}]},{kind:"Condition",passingValue:true,condition:"shouldQueryParticipantIDs",selections:[{kind:"LinkedField",alias:"threads_matching_participant_ids",name:"message_threads",storageKey:null,args:[y,{kind:"Variable",name:"with_participant_ids",variableName:"localEntryIDs",type:"[ID]"}],concreteType:"ViewerMessageThreadsConnection",plural:false,selections:z}]},{kind:"Condition",passingValue:true,condition:"shouldQueryThreadName",selections:[{kind:"LinkedField",alias:"threads_matching_name",name:"message_threads",storageKey:null,args:[y,{kind:"Variable",name:"with_thread_name",variableName:"queryString",type:"String"}],concreteType:"ViewerMessageThreadsConnection",plural:false,selections:z}]}]},{kind:"LinkedHandle",alias:"groups",name:"viewer",args:null,handle:"viewer",key:"",filters:null}]}]}}}();f.exports=h}),null);
__d("MessengerTypeaheadResultView_groups.graphql",[],(function a(b,c,d,e,f,g){"use strict";var h=function(){var i={kind:"Variable",name:"last",variableName:"maxThreadResults",type:"Int"},j={kind:"ScalarField",alias:null,name:"name",args:null,storageKey:null},k=[{kind:"LinkedField",alias:null,name:"edges",storageKey:null,args:null,concreteType:"ViewerMessageThreadsEdge",plural:true,selections:[{kind:"LinkedField",alias:null,name:"node",storageKey:null,args:null,concreteType:"MessageThread",plural:false,selections:[{kind:"LinkedField",alias:null,name:"thread_key",storageKey:null,args:null,concreteType:"MessageThreadKey",plural:false,selections:[{kind:"ScalarField",alias:null,name:"thread_fbid",args:null,storageKey:null}]},j,{kind:"LinkedField",alias:null,name:"image",storageKey:null,args:null,concreteType:"Image",plural:false,selections:[{kind:"ScalarField",alias:null,name:"uri",args:null,storageKey:null}]},{kind:"ScalarField",alias:null,name:"is_group_thread",args:null,storageKey:null},{kind:"LinkedField",alias:null,name:"other_participants",storageKey:"other_participants(first:250)",args:[{kind:"Literal",name:"first",value:250,type:"Int"}],concreteType:"MessagingParticipantsOfThreadConnection",plural:false,selections:[{kind:"LinkedField",alias:null,name:"edges",storageKey:null,args:null,concreteType:"MessagingParticipantsOfThreadEdge",plural:true,selections:[{kind:"LinkedField",alias:null,name:"node",storageKey:null,args:null,concreteType:"MessagingParticipant",plural:false,selections:[{kind:"LinkedField",alias:null,name:"messaging_actor",storageKey:null,args:null,concreteType:null,plural:false,selections:[{kind:"ScalarField",alias:null,name:"id",args:null,storageKey:null},j,{kind:"InlineFragment",type:"User",selections:[{kind:"ScalarField",alias:null,name:"is_messenger_user",args:null,storageKey:null},{kind:"ScalarField",alias:null,name:"is_viewer_coworker",args:null,storageKey:null}]}]}]}]}]}]}]}];return{kind:"Fragment",name:"MessengerTypeaheadResultView_groups",type:"Viewer",metadata:null,argumentDefinitions:[{kind:"RootArgument",name:"queryString",type:"String"},{kind:"RootArgument",name:"maxThreadResults",type:"Int"},{kind:"RootArgument",name:"shouldQueryThreadName",type:"Boolean"},{kind:"RootArgument",name:"localEntryIDs",type:"[ID]"},{kind:"RootArgument",name:"shouldQueryParticipantIDs",type:"Boolean"},{kind:"RootArgument",name:"shouldQueryParticipantNames",type:"Boolean"}],selections:[{kind:"Condition",passingValue:true,condition:"shouldQueryParticipantNames",selections:[{kind:"LinkedField",alias:"threads_matching_participant_names",name:"message_threads",storageKey:null,args:[i,{kind:"Literal",name:"with_group",value:true,type:"Boolean"},{kind:"Variable",name:"with_participants",variableName:"queryString",type:"String"}],concreteType:"ViewerMessageThreadsConnection",plural:false,selections:k}]},{kind:"Condition",passingValue:true,condition:"shouldQueryParticipantIDs",selections:[{kind:"LinkedField",alias:"threads_matching_participant_ids",name:"message_threads",storageKey:null,args:[i,{kind:"Variable",name:"with_participant_ids",variableName:"localEntryIDs",type:"[ID]"}],concreteType:"ViewerMessageThreadsConnection",plural:false,selections:k}]},{kind:"Condition",passingValue:true,condition:"shouldQueryThreadName",selections:[{kind:"LinkedField",alias:"threads_matching_name",name:"message_threads",storageKey:null,args:[i,{kind:"Variable",name:"with_thread_name",variableName:"queryString",type:"String"}],concreteType:"ViewerMessageThreadsConnection",plural:false,selections:k}]}]}}();f.exports=h}),null);
__d("MessengerTypeaheadResultView_profiles.graphql",[],(function a(b,c,d,e,f,g){"use strict";var h=function(){var i={kind:"Literal",name:"first",value:20,type:"Int"},j={kind:"ScalarField",alias:null,name:"id",args:null,storageKey:null},k={kind:"ScalarField",alias:null,name:"name",args:null,storageKey:null},l={kind:"LinkedField",alias:null,name:"profile_picture",storageKey:"profile_picture(height:32,width:32)",args:[{kind:"Literal",name:"height",value:32,type:"Int"},{kind:"Literal",name:"width",value:32,type:"Int"}],concreteType:"Image",plural:false,selections:[{kind:"ScalarField",alias:null,name:"uri",args:null,storageKey:null}]},m={kind:"ScalarField",alias:null,name:"url",args:null,storageKey:null},n={kind:"ScalarField",alias:null,name:"is_messenger_user",args:null,storageKey:null},o={kind:"InlineFragment",type:"Page",selections:[j,k,l,m,n,{kind:"ScalarField",alias:null,name:"category_type",args:null,storageKey:null}]},p=[{kind:"LinkedField",alias:null,name:"edges",storageKey:null,args:null,concreteType:"SearchableResultsEdge",plural:true,selections:[{kind:"LinkedField",alias:null,name:"node",storageKey:null,args:null,concreteType:null,plural:false,selections:[o]}]}];return{kind:"Fragment",name:"MessengerTypeaheadResultView_profiles",type:"SearchableEntitiesQuery",metadata:null,argumentDefinitions:[{kind:"RootArgument",name:"canViewerSendMoneyFilter",type:"Boolean"},{kind:"RootArgument",name:"shouldSkipQueryUsers",type:"Boolean"},{kind:"RootArgument",name:"shouldQueryPages",type:"Boolean"},{kind:"RootArgument",name:"shouldQueryVCEndpoint",type:"Boolean"},{kind:"RootArgument",name:"shouldQueryInternalBot",type:"Boolean"}],selections:[{kind:"Condition",passingValue:true,condition:"shouldQueryInternalBot",selections:[{kind:"LinkedField",alias:"internal_bot_results",name:"search_results",storageKey:"search_results(first:20,internal_bot:true)",args:[i,{kind:"Literal",name:"internal_bot",value:true,type:"Boolean"}],concreteType:"SearchableResultsConnection",plural:false,selections:p}]},{kind:"Condition",passingValue:true,condition:"shouldQueryVCEndpoint",selections:[{kind:"LinkedField",alias:"vc_results",name:"search_results",storageKey:"search_results(first:20,vc_endpoint:true)",args:[i,{kind:"Literal",name:"vc_endpoint",value:true,type:"Boolean"}],concreteType:"SearchableResultsConnection",plural:false,selections:p}]},{kind:"Condition",passingValue:true,condition:"shouldQueryPages",selections:[{kind:"LinkedField",alias:"page_results",name:"search_results",storageKey:"search_results(first:5,include_games:true,messenger_commerce:true)",args:[{kind:"Literal",name:"first",value:5,type:"Int"},{kind:"Literal",name:"include_games",value:true,type:"Boolean"},{kind:"Literal",name:"messenger_commerce",value:true,type:"Boolean"}],concreteType:"SearchableResultsConnection",plural:false,selections:[{kind:"LinkedField",alias:null,name:"edges",storageKey:null,args:null,concreteType:"SearchableResultsEdge",plural:true,selections:[{kind:"LinkedField",alias:null,name:"node",storageKey:null,args:null,concreteType:null,plural:false,selections:[{kind:"InlineFragment",type:"Application",selections:[j,k,{kind:"LinkedField",alias:null,name:"instant_game_info",storageKey:null,args:null,concreteType:"GamesInstantPlayStyleInfo",plural:false,selections:[{kind:"ScalarField",alias:null,name:"icon_uri",args:null,storageKey:null}]}]},o]}]}]}]},{kind:"Condition",passingValue:false,condition:"shouldSkipQueryUsers",selections:[{kind:"LinkedField",alias:"user_results",name:"search_results",storageKey:null,args:[{kind:"Variable",name:"can_viewer_send_money",variableName:"canViewerSendMoneyFilter",type:"Boolean"},{kind:"Literal",name:"context",value:"web_messenger_composer",type:"SearchContext"},i,{kind:"Literal",name:"include_messenger_only_results_for_web_messenger",value:true,type:"Boolean"},{kind:"Literal",name:"of_type",value:["user"],type:"[SearchEntityType]"}],concreteType:"SearchableResultsConnection",plural:false,selections:[{kind:"LinkedField",alias:null,name:"edges",storageKey:null,args:null,concreteType:"SearchableResultsEdge",plural:true,selections:[{kind:"LinkedField",alias:null,name:"node",storageKey:null,args:null,concreteType:null,plural:false,selections:[{kind:"InlineFragment",type:"User",selections:[m,j,{kind:"ScalarField",alias:null,name:"is_memorialized",args:null,storageKey:null},{kind:"ScalarField",alias:null,name:"is_viewer_friend",args:null,storageKey:null},{kind:"ScalarField",alias:null,name:"is_viewer_coworker",args:null,storageKey:null},l,{kind:"LinkedField",alias:null,name:"messenger_contact",storageKey:null,args:null,concreteType:"Contact",plural:false,selections:[{kind:"ScalarField",alias:null,name:"is_on_viewer_contact_list",args:null,storageKey:null}]},k,n,{kind:"ScalarField",alias:null,name:"is_work_user",args:null,storageKey:null},{kind:"ScalarField",alias:null,name:"viewer_affinity",args:null,storageKey:null},{kind:"LinkedField",alias:null,name:"scim_company_user",storageKey:null,args:null,concreteType:"ScimCompanyUser",plural:false,selections:[{kind:"ScalarField",alias:null,name:"company_title",args:null,storageKey:null}]},{kind:"LinkedField",alias:null,name:"work_info",storageKey:null,args:null,concreteType:"WorkUserInfo",plural:false,selections:[{kind:"LinkedField",alias:null,name:"work_community",storageKey:null,args:null,concreteType:"Group",plural:false,selections:[k]}]},{kind:"LinkedField",alias:"members",name:"aloha_proxy_user_owners",storageKey:"aloha_proxy_user_owners(first:10)",args:[{kind:"Literal",name:"first",value:10,type:"Int"}],concreteType:"AlohaProxyUserToAlohaProxyUserOwnersConnection",plural:false,selections:[{kind:"LinkedField",alias:null,name:"edges",storageKey:null,args:null,concreteType:"AlohaProxyUserToAlohaProxyUserOwnersEdge",plural:true,selections:[{kind:"LinkedField",alias:null,name:"node",storageKey:null,args:null,concreteType:null,plural:false,selections:[j,{kind:"ScalarField",alias:"name",name:"aloha_user_name",args:null,storageKey:null}]}]}]}]}]}]}]}]}]}}();f.exports=h}),null);
__d("MessengerTypeaheadResultView_roomAudience.graphql",[],(function a(b,c,d,e,f,g){"use strict";var h=function(){var i={kind:"Literal",name:"first",value:10,type:"Int"},j={kind:"ScalarField",alias:null,name:"id",args:null,storageKey:null},k={kind:"ScalarField",alias:null,name:"name",args:null,storageKey:null};return{kind:"Fragment",name:"MessengerTypeaheadResultView_roomAudience",type:"MessageThread",metadata:null,argumentDefinitions:[{kind:"RootArgument",name:"queryString",type:"String"},{kind:"RootArgument",name:"shouldQueryRoomsAudience",type:"Boolean"}],selections:[{kind:"Condition",passingValue:true,condition:"shouldQueryRoomsAudience",selections:[{kind:"LinkedField",alias:"user_results",name:"messaging_audience_list",storageKey:null,args:[i,{kind:"Variable",name:"named",variableName:"queryString",type:"String"}],concreteType:"AllAudienceListOfMessageThreadConnection",plural:false,selections:[{kind:"LinkedField",alias:null,name:"edges",storageKey:null,args:null,concreteType:"AllAudienceListOfMessageThreadEdge",plural:true,selections:[{kind:"LinkedField",alias:null,name:"node",storageKey:null,args:null,concreteType:null,plural:false,selections:[{kind:"InlineFragment",type:"User",selections:[{kind:"ScalarField",alias:null,name:"url",args:null,storageKey:null},j,{kind:"ScalarField",alias:null,name:"is_memorialized",args:null,storageKey:null},{kind:"ScalarField",alias:null,name:"is_viewer_friend",args:null,storageKey:null},{kind:"ScalarField",alias:null,name:"is_viewer_coworker",args:null,storageKey:null},{kind:"LinkedField",alias:null,name:"profile_picture",storageKey:"profile_picture(height:32,width:32)",args:[{kind:"Literal",name:"height",value:32,type:"Int"},{kind:"Literal",name:"width",value:32,type:"Int"}],concreteType:"Image",plural:false,selections:[{kind:"ScalarField",alias:null,name:"uri",args:null,storageKey:null}]},{kind:"LinkedField",alias:null,name:"messenger_contact",storageKey:null,args:null,concreteType:"Contact",plural:false,selections:[{kind:"ScalarField",alias:null,name:"is_on_viewer_contact_list",args:null,storageKey:null}]},k,{kind:"ScalarField",alias:null,name:"is_messenger_user",args:null,storageKey:null},{kind:"ScalarField",alias:null,name:"is_work_user",args:null,storageKey:null},{kind:"ScalarField",alias:null,name:"viewer_affinity",args:null,storageKey:null},{kind:"LinkedField",alias:null,name:"scim_company_user",storageKey:null,args:null,concreteType:"ScimCompanyUser",plural:false,selections:[{kind:"ScalarField",alias:null,name:"company_title",args:null,storageKey:null}]},{kind:"LinkedField",alias:null,name:"work_info",storageKey:null,args:null,concreteType:"WorkUserInfo",plural:false,selections:[{kind:"LinkedField",alias:null,name:"work_community",storageKey:null,args:null,concreteType:"Group",plural:false,selections:[k]}]},{kind:"LinkedField",alias:"members",name:"aloha_proxy_user_owners",storageKey:"aloha_proxy_user_owners(first:10)",args:[i],concreteType:"AlohaProxyUserToAlohaProxyUserOwnersConnection",plural:false,selections:[{kind:"LinkedField",alias:null,name:"edges",storageKey:null,args:null,concreteType:"AlohaProxyUserToAlohaProxyUserOwnersEdge",plural:true,selections:[{kind:"LinkedField",alias:null,name:"node",storageKey:null,args:null,concreteType:null,plural:false,selections:[j,{kind:"ScalarField",alias:"name",name:"aloha_user_name",args:null,storageKey:null}]}]}]}]}]}]}]}]}]}}();f.exports=h}),null);
__d("MessagingThreadEventTypedLogger",["Banzai","GeneratedLoggerUtils","nullthrows"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();function h(){this.clear()}h.prototype.log=function(){c("GeneratedLoggerUtils").log("logger:MessagingThreadEventLoggerConfig",this.$MessagingThreadEventTypedLogger1,c("Banzai").BASIC)};h.prototype.logVital=function(){c("GeneratedLoggerUtils").log("logger:MessagingThreadEventLoggerConfig",this.$MessagingThreadEventTypedLogger1,c("Banzai").VITAL)};h.prototype.clear=function(){this.$MessagingThreadEventTypedLogger1={};return this};h.prototype.updateData=function(j){this.$MessagingThreadEventTypedLogger1=babelHelpers["extends"]({},this.$MessagingThreadEventTypedLogger1,j);return this};h.prototype.setActiveTimeMs=function(j){this.$MessagingThreadEventTypedLogger1.active_time_ms=j;return this};h.prototype.setClientEventTimeMs=function(j){this.$MessagingThreadEventTypedLogger1.client_event_time_ms=j;return this};h.prototype.setEvent=function(j){this.$MessagingThreadEventTypedLogger1.event=j;return this};h.prototype.setPageData=function(j){this.$MessagingThreadEventTypedLogger1.page_data=c("GeneratedLoggerUtils").serializeMap(j);return this};h.prototype.setPageID=function(j){this.$MessagingThreadEventTypedLogger1.page_id=j;return this};h.prototype.setScriptPath=function(j){this.$MessagingThreadEventTypedLogger1.script_path=j;return this};h.prototype.setSource=function(j){this.$MessagingThreadEventTypedLogger1.source=j;return this};h.prototype.setThreadID=function(j){this.$MessagingThreadEventTypedLogger1.thread_id=j;return this};h.prototype.setVC=function(j){this.$MessagingThreadEventTypedLogger1.vc=j;return this};var i={active_time_ms:true,client_event_time_ms:true,event:true,page_data:true,page_id:true,script_path:true,source:true,thread_id:true,vc:true};f.exports=h}),null);
__d("MessengerSharedPhoto.react",["cx","React","CssBackgroundImage.react"],(function a(b,c,d,e,f,g,h){"use strict";__p&&__p();var i,j,k=c("React").PropTypes;i=babelHelpers.inherits(l,c("React").PureComponent);j=i&&i.prototype;function l(){var m,n;for(var o=arguments.length,p=Array(o),q=0;q<o;q++)p[q]=arguments[q];return n=(m=j.constructor).call.apply(m,[this].concat(p)),this.$MessengerSharedPhoto1=function(r){r.preventDefault();this.props.onClick(this.props.fbid)}.bind(this),n}l.prototype.render=function(){return c("React").createElement("a",{className:this.props.className,href:this.props.uri,onClick:this.$MessengerSharedPhoto1},c("React").createElement(c("CssBackgroundImage.react"),{imageURI:this.props.uri,className:this.props.className,backgroundPosition:"center",style:{height:"100%"}},this.props.isSpherical?c("React").createElement("div",{className:"_3603 _64ks"}):null))};l.propTypes={className:k.string.isRequired,fbid:k.string.isRequired,onClick:k.func.isRequired,uri:k.string.isRequired};f.exports=l}),null);
__d("SphericalPhotoUtils",["PhotoRendererProjection","SphericalPhotoPartialLimits"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();var h=c("PhotoRendererProjection").PERSPECTIVE,i=c("SphericalPhotoPartialLimits").makePartialLimits,j={getMetadataFromGraphQLResult:function k(l){return{CroppedAreaImageHeightPixels:l.cropped_area_image_height_pixels!=null?l.cropped_area_image_height_pixels.toString():null,CroppedAreaImageWidthPixels:l.cropped_area_image_width_pixels!=null?l.cropped_area_image_width_pixels.toString():null,CroppedAreaLeftPixels:l.cropped_area_left_pixels!=null?l.cropped_area_left_pixels.toString():null,CroppedAreaTopPixels:l.cropped_area_top_pixels!=null?l.cropped_area_top_pixels.toString():null,FullPanoHeightPixels:l.full_pano_height_pixels!=null?l.full_pano_height_pixels.toString():null,FullPanoWidthPixels:l.full_pano_width_pixels!=null?l.full_pano_width_pixels.toString():null,InitialViewHeadingDegrees:l.initial_view_heading_degrees!=null?l.initial_view_heading_degrees.toString():null,InitialViewPitchDegrees:l.initial_view_pitch_degrees!=null?l.initial_view_pitch_degrees.toString():null,InitialViewRollDegrees:l.initial_view_roll_degrees!=null?l.initial_view_roll_degrees.toString():null,InitialViewVerticalFOVDegrees:l.initial_view_vertical_fov_degrees!=null?l.initial_view_vertical_fov_degrees.toString():null,PoseHeadingDegrees:l.pose_heading_degrees!=null?l.pose_heading_degrees.toString():null,PosePitchDegrees:l.pose_pitch_degrees!=null?l.pose_pitch_degrees.toString():null,PoseRollDegrees:l.pose_roll_degrees!=null?l.pose_roll_degrees.toString():null,PreProcessCropLeftPixels:null,PreProcessCropRightPixels:null,ProjectionType:l.projection_type,RendererProjectionType:h}},calculatePartialLimits:function k(l){__p&&__p();var m=l.FullPanoHeightPixels,n=l.FullPanoWidthPixels,o=l.CroppedAreaImageWidthPixels,p=l.CroppedAreaImageHeightPixels,q=l.CroppedAreaLeftPixels,r=l.CroppedAreaTopPixels,s=j.parseNumber(m),t=j.parseNumber(n),u=j.parseNumber(o),v=j.parseNumber(p),w=j.parseNumber(q),x=j.parseNumber(r),y=void 0,z=void 0,A=void 0,B=void 0;if(u!==0&&u!==t){var C=360*u/t;if(C<350){y=180*(1-2*w/t);z=C-y}}if(v!==0&&v!==s){if(x!==0)A=90*(1-2*x/s);if(x+v!==s)B=180*(x+v-s/2)/s}var D=null,E=null,F=null,G=null;if(A&&A<87.5)E=A;if(B&&B<87.5)D=B;if(y)F=y;if(z)G=z;return i({partialTopDegrees:E,partialBottomDegrees:D,partialLeftDegrees:F,partialRightDegrees:G})},parseNumber:function k(l){return l?Number(l):0},getThumbnailsFromPhotoEncodings:function k(l){var m=l.find(function(q){return q.projection_type===h}),n=null,o=null;if(m&&m.thumbnails&&m.thumbnails.length>0){var p=m.thumbnails;n=p[0]?p[0].uri:null;o=p[1]?p[1].uri:null}return{smallThumbnail:n,largeThumbnail:o}}};f.exports=j}),null);
__d("ChatPhotoViewFooterHScroll.react",["cx","Animation","MessengerSharedPhoto.react","React","SphericalPhotoUtils"],(function a(b,c,d,e,f,g,h){"use strict";__p&&__p();var i,j,k=c("SphericalPhotoUtils").getThumbnailsFromPhotoEncodings,l=c("React").PropTypes,m=200,n=74,o=140,p=30;i=babelHelpers.inherits(q,c("React").Component);j=i&&i.prototype;function q(){var r,s;for(var t=arguments.length,u=Array(t),v=0;v<t;v++)u[v]=arguments[v];return s=(r=j.constructor).call.apply(r,[this].concat(u)),this.$ChatPhotoViewFooterHScroll1=null,this.state={currentPhoto:"",prevScrollLeft:0,scrollLeft:0},this.$ChatPhotoViewFooterHScroll2=function(w){return w?Math.ceil((w-o*2)/n):p},s}q.prototype.componentDidMount=function(){if(this.props.width)this.props.updateNumberInOneBatch(this.$ChatPhotoViewFooterHScroll2(this.props.width));this.$ChatPhotoViewFooterHScroll1=new(c("Animation"))(this.refs.childContainer).to("scrollLeft",0).duration(m).go()};q.prototype.componentWillReceiveProps=function(r){if(r.photoID!=this.state.currentPhoto||this.props.sharedPhotos.length!==r.sharedPhotos.length){var s=r.width?(r.width-n)/2-o:0,t=r.sharedPhotos.findIndex(function(u){return u.node.id===r.photoID});this.setState({currentPhoto:r.photoID,prevScrollLeft:this.state.scrollLeft,scrollLeft:t*n-s})}if(r.width!=this.props.width)this.props.updateNumberInOneBatch(this.$ChatPhotoViewFooterHScroll2(r.width))};q.prototype.componentDidUpdate=function(){if(this.$ChatPhotoViewFooterHScroll1)this.$ChatPhotoViewFooterHScroll1.from("scrollLeft",this.state.prevScrollLeft).to("scrollLeft",this.state.scrollLeft).duration(m).go()};q.prototype.componentWillUnmount=function(){this.$ChatPhotoViewFooterHScroll1&&this.$ChatPhotoViewFooterHScroll1.stop()};q.prototype.shouldComponentUpdate=function(r,s){if(r.photoID!=this.state.currentPhoto||r.sharedPhotos.length!==this.props.sharedPhotos.length)return true;return false};q.prototype.render=function(){var r=this.props.sharedPhotos,s=r.map(function(t){var u=t.node.photo_encodings?t.node.photo_encodings.length!==0:false,v=t.node.image1.uri;if(u){var w=k(t.node.photo_encodings),x=w.smallThumbnail;v=x||v}return c("React").createElement("div",{className:"_1oyb",key:t.node.legacy_attachment_id},c("React").createElement(c("MessengerSharedPhoto.react"),{className:"_1oyc"+(this.state.currentPhoto!==t.node.id?" _1oyd":""),fbid:t.node.legacy_attachment_id,onClick:this.props.onScroll,photoID:t.node.id,uri:v,isSpherical:u}))}.bind(this));return c("React").createElement("div",{className:"_1oye"},c("React").createElement("div",{className:"_1oyf",ref:"childContainer"},c("React").createElement("div",{className:"_1oyh",ref:"scrollable"},s)))};q.propTypes={onScroll:l.func,photoID:l.string,sharedPhotos:l.array,updateNumberInOneBatch:l.func,width:l.number};f.exports=q}),null);
__d("XForwardingNUXSeenController",["XController"],(function a(b,c,d,e,f,g){f.exports=c("XController").create("/chat/forwarding_nux_seen/",{})}),null);
__d("MessagingForwardingButtonNUX.react",["AsyncRequest","ChatConfig","React","XForwardingNUXSeenController","XUIAmbientNUX.react"],(function a(b,c,d,e,f,g){__p&&__p();var h,i,j=c("React").PropTypes;h=babelHelpers.inherits(k,c("React").Component);i=h&&h.prototype;function k(){__p&&__p();var l,m;"use strict";for(var n=arguments.length,o=Array(n),p=0;p<n;p++)o[p]=arguments[p];return m=(l=i.constructor).call.apply(l,[this].concat(o)),this.state={showNUX:!c("ChatConfig").get("seen_forwarding_nux")},this.$MessagingForwardingButtonNUX1=function(){if(!this.state.showNUX)return;c("ChatConfig").set("seen_forwarding_nux",true);new(c("AsyncRequest"))(c("XForwardingNUXSeenController").getURIBuilder().getURI()).send();this.setState({showNUX:false})}.bind(this),this.close=function(){this.$MessagingForwardingButtonNUX1()}.bind(this),m}k.prototype.render=function(){"use strict";return c("React").createElement(c("XUIAmbientNUX.react"),{contextRef:this.props.contextRef,onCloseButtonClick:this.$MessagingForwardingButtonNUX1,position:"left",width:"auto",shown:this.state.showNUX},this.props.children)};k.propTypes={contextRef:j.func.isRequired};f.exports=k}),null);
__d("MessengerPhotoViewCloseLink.react",["cx","fbt","React","TooltipLink.react"],(function a(b,c,d,e,f,g,h,i){"use strict";var j=c("React").PropTypes,k=function k(l){var m=l.customTooltip!==undefined?l.customTooltip:c("React").createElement("span",null,i._("Press Esc to close"));return c("React").createElement(c("TooltipLink.react"),{className:"_51ok _50-m _51an",onClick:l.onClick,tooltip:m},c("React").createElement("div",{className:"_387s"}))};k.propTypes={onClick:j.func,customTooltip:j.element};f.exports=k}),null);
__d("SpotlightViewerBottomBarLink",["cx","Link.react","React"],(function a(b,c,d,e,f,g,h){__p&&__p();var i,j;i=babelHelpers.inherits(k,c("React").Component);j=i&&i.prototype;k.prototype.render=function(){"use strict";var l=this.props.className||"_4_8j _4_8k";return c("React").createElement(c("Link.react"),babelHelpers["extends"]({},this.props,{className:l}),this.props.children)};function k(){"use strict";i.apply(this,arguments)}f.exports=k}),null);
__d("ChatPhotoViewHeader.react",["cx","fbt","MessagingForwardingButtonNUX.react","MessengerPhotoViewCloseLink.react","React","SpotlightViewerBottomBarLink","WorkModeConfig"],(function a(b,c,d,e,f,g,h,i){"use strict";__p&&__p();var j,k,l=c("React").PropTypes;j=babelHelpers.inherits(m,c("React").PureComponent);k=j&&j.prototype;function m(){var n,o;for(var p=arguments.length,q=Array(p),r=0;r<p;r++)q[r]=arguments[r];return o=(n=k.constructor).call.apply(n,[this].concat(q)),this.$ChatPhotoViewHeader3=function(){this.$ChatPhotoViewHeader2();this.props.showForwardDialog&&this.props.showForwardDialog()}.bind(this),this.$ChatPhotoViewHeader4=function(){this.$ChatPhotoViewHeader2();this.props.showShareDialog&&this.props.showShareDialog()}.bind(this),o}m.prototype.render=function(){return c("React").createElement("div",{className:"_51an _50-m _3h_t _5l-3",role:"banner"},this.$ChatPhotoViewHeader1(),c("React").createElement(c("MessengerPhotoViewCloseLink.react"),{onClick:this.props.onClose}))};m.prototype.$ChatPhotoViewHeader2=function(){if(this.refs.forwardNUX)this.refs.forwardNUX.close()};m.prototype.$ChatPhotoViewHeader1=function(){var n=void 0,o=void 0,p=void 0;if(!this.props.disableForward){n=c("React").createElement(c("SpotlightViewerBottomBarLink"),{className:"_3h_u",onClick:this.$ChatPhotoViewHeader3,ref:"forwardButton"},c("React").createElement("div",{className:"_3h_v _3h_w"}),i._("Forward"));o=c("React").createElement(c("MessagingForwardingButtonNUX.react"),{contextRef:function(){return this.refs.forwardButton}.bind(this),ref:"forwardNUX"},i._("Send this image to other people in separate messages."))}if(this.props.enableShareToFB)p=c("React").createElement("div",{className:"_3h_u",onClick:this.$ChatPhotoViewHeader4,ref:"shareButton",role:"button",tabIndex:"0"},c("React").createElement("div",{className:"_3tth _3h_w"}),this.$ChatPhotoViewHeader5());return c("React").createElement("div",{key:"buttonsContainer",ref:"buttons"},c("React").createElement(c("SpotlightViewerBottomBarLink"),{className:"_3h_u",rel:"async",ajaxify:this.props.url,ref:"downloadButton"},c("React").createElement("div",{className:"_3h_x _3h_w"}),i._("Download")),n,o,p,c("React").createElement("div",{className:"_3h_u",onClick:this.props.openInfo,ref:"moreInfo",role:"link",tabIndex:"0"},c("React").createElement("div",{className:"_3h_y _3h_w"}),i._("Info")))};m.prototype.$ChatPhotoViewHeader5=function(){if(c("WorkModeConfig").is_work_user)return i._("Share to Workplace");else return i._("Share to Facebook")};m.propTypes={disableForward:l.bool,enableShareToFB:l.bool,onClose:l.func,openInfo:l.func,showForwardDialog:l.func,showShareDialog:l.func,url:l.object};f.exports=m}),null);
__d("ChatSpeakingSticker.react",["React","ReactDOM"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();var h,i,j=c("React").PropTypes;h=babelHelpers.inherits(k,c("React").PureComponent);i=h&&h.prototype;function k(){var l,m;for(var n=arguments.length,o=Array(n),p=0;p<n;p++)o[p]=arguments[p];return m=(l=i.constructor).call.apply(l,[this].concat(o)),this.$ChatSpeakingSticker1=function(){var q=c("ReactDOM").findDOMNode(this.refs.stickerVideo);q.play()}.bind(this),m}k.prototype.render=function(){return c("React").createElement("div",{onClick:this.$ChatSpeakingSticker1,role:"presentation"},c("React").createElement("video",{height:this.props.videoSize.height,ref:"stickerVideo",width:this.props.videoSize.width},c("React").createElement("source",{src:this.props.videoURI})))};k.propTypes={videoURI:j.string.isRequired,videoSize:j.shape({height:j.number,width:j.number}).isRequired};f.exports=k}),null);
__d("ChatEmojiPickerButton.react",["cx","fbt","Image.react","ImmutableObject","Keys","React","MessengerHotLikePreviewEvents","MessengerHotLikeUtils","MercuryMessageObject","MercuryTriodeSourceUtil","StickerConstants","setTimeoutAcrossTransitions"],(function a(b,c,d,e,f,g,h,i){"use strict";__p&&__p();var j,k,l=c("MercuryMessageObject").get(),m=c("React").PropTypes;j=babelHelpers.inherits(n,c("React").PureComponent);k=j&&j.prototype;function n(){__p&&__p();var o,p;for(var q=arguments.length,r=Array(q),s=0;s<q;s++)r[s]=arguments[s];return p=(o=k.constructor).call.apply(o,[this].concat(r)),this.$ChatEmojiPickerButton1=null,this.$ChatEmojiPickerButton2=null,this.$ChatEmojiPickerButton3=null,this.$ChatEmojiPickerButton5=function(t){t.stopPropagation();this.props.onClick(this.props.emojiData.emojiCodes,this.refs.div)}.bind(this),this.$ChatEmojiPickerButton6=function(t){if(t.keyCode===c("Keys").RETURN){t.preventDefault();this.props.onClick(this.props.emojiData.emojiCodes,this.refs.div)}}.bind(this),this.$ChatEmojiPickerButton7=function(t){__p&&__p();t.preventDefault();t.stopPropagation();if(t.button!==0)return;if(!this.props.enableHotEmoji)this.$ChatEmojiPickerButton1=setTimeout(this.$ChatEmojiPickerButton9,1e3);else{this.$ChatEmojiPickerButton1=setTimeout(function(){this.$ChatEmojiPickerButton3=Date.now();this.$ChatEmojiPickerButton10();this.$ChatEmojiPickerButton11()}.bind(this),500);this.props.onMouseDown&&this.props.onMouseDown()}}.bind(this),this.$ChatEmojiPickerButton10=function(){this.$ChatEmojiPickerButton9();if(!this.props.threadID)return;var t=this.$ChatEmojiPickerButton12();c("MessengerHotLikePreviewEvents").emit(c("MessengerHotLikePreviewEvents").START,t,this.props.threadID,this.props.emojiData.emojiCodes)}.bind(this),this.$ChatEmojiPickerButton8=function(t){t.stopPropagation();clearTimeout(this.$ChatEmojiPickerButton1);if(this.props.enableHotEmoji){if(!(this.props.threadID&&this.$ChatEmojiPickerButton3))return;this.$ChatEmojiPickerButton3=0;this.$ChatEmojiPickerButton13();this.$ChatEmojiPickerButton14()}}.bind(this),this.$ChatEmojiPickerButton9=function(){this.props.onLongPress(this.props.emojiData.emojiCodes,this.refs.div)}.bind(this),this.$ChatEmojiPickerButton14=function(){if(!this.props.threadID)return;c("MessengerHotLikePreviewEvents").emit(c("MessengerHotLikePreviewEvents").STOP_EMOJI,this.props.threadID,true)}.bind(this),this.$ChatEmojiPickerButton15=function(){if(!this.props.threadID)return;c("MessengerHotLikePreviewEvents").emit(c("MessengerHotLikePreviewEvents").POP,this.props.threadID)}.bind(this),this.$ChatEmojiPickerButton11=function(){this.$ChatEmojiPickerButton13();this.$ChatEmojiPickerButton2=c("setTimeoutAcrossTransitions")(this.$ChatEmojiPickerButton15,c("MessengerHotLikeUtils").SizeTimes.large)}.bind(this),this.$ChatEmojiPickerButton13=function(){clearTimeout(this.$ChatEmojiPickerButton2)}.bind(this),this.$ChatEmojiPickerButton4=function(){if(this.$ChatEmojiPickerButton3){this.$ChatEmojiPickerButton3=0;this.$ChatEmojiPickerButton13();this.$ChatEmojiPickerButton15()}}.bind(this),p}n.prototype.componentWillUnmount=function(){this.$ChatEmojiPickerButton4();clearTimeout(this.$ChatEmojiPickerButton1);clearTimeout(this.$ChatEmojiPickerButton2)};n.prototype.render=function(){return c("React").createElement("div",{"aria-label":i._("Pick an Emoji"),onClick:this.$ChatEmojiPickerButton5,onKeyDown:this.$ChatEmojiPickerButton6,onMouseDown:this.$ChatEmojiPickerButton7,onMouseLeave:this.$ChatEmojiPickerButton4,onMouseUp:this.$ChatEmojiPickerButton8,ref:"div",role:"button",tabIndex:"1"},c("React").createElement(c("Image.react"),{className:"_1lih _1ift _1ifu",style:{margin:0},src:this.props.emojiData.uri}))};n.prototype.$ChatEmojiPickerButton12=function(){if(!this.props.threadID)return null;var o=l.constructStickerMessageObject(c("StickerConstants").HOT_LIKE_SMALL_STICKER_ID,c("MercuryTriodeSourceUtil").getMercuryTriodeSource(),this.props.threadID);l.normalizeNewMessage(o);o.is_like_preview=true;o.like_preview_since=this.$ChatEmojiPickerButton3;o.customLike=this.props.emojiData;o.body="";return new(c("ImmutableObject"))(o)};n.propTypes={emojiData:m.object.isRequired,enableHotEmoji:m.bool,onClick:m.func.isRequired,onLongPress:m.func.isRequired,threadID:m.string};f.exports=n}),null);
__d("MessengerScrollableArea.react",["cx","JSReliabilityFixesGatingConfig","React","ReactDOM","ScrollableArea.react","Style","UserAgent","clearImmediate","joinClasses","setImmediate","throttle"],(function a(b,c,d,e,f,g,h){"use strict";__p&&__p();var i,j,k=c("React").PropTypes,l=20;i=babelHelpers.inherits(m,c("React").Component);j=i&&i.prototype;function m(){var o,p;for(var q=arguments.length,r=Array(q),s=0;s<q;s++)r[s]=arguments[s];return p=(o=j.constructor).call.apply(o,[this].concat(r)),n.call(this),p}m.prototype.componentDidMount=function(){this.$MessengerScrollableArea2=c("setImmediate")(this.$MessengerScrollableArea4);this.$MessengerScrollableArea1=true;this.$MessengerScrollableArea3=c("throttle")(this.$MessengerScrollableArea5,50)};m.prototype.componentWillUnmount=function(){c("clearImmediate")(this.$MessengerScrollableArea2);this.$MessengerScrollableArea1=false};m.prototype.render=function(){return c("React").createElement(c("ScrollableArea.react"),{className:c("joinClasses")("_5f0v",this.props.className),height:this.props.height,onScroll:this.props.needsFastScrollHandler?this.$MessengerScrollableArea5:this.$MessengerScrollableArea3,ref:"scrollable",shadow:false,tabIndex:this.props.tabIndex,width:this.props.width},this.props.children)};m.prototype.scrollToPosition=function(o){var p=arguments.length<=1||arguments[1]===undefined?false:arguments[1],q=arguments.length<=2||arguments[2]===undefined?{}:arguments[2],r=this.getArea();if(!r)return;r.setScrollTop(o,p,q)};m.prototype.isScrolledToBottomWithHeight=function(o){var p=this.getArea();if(!p)return false;return p.getScrollTop()+p.getClientHeight()+o>=p.getScrollHeight()-l};m.propTypes={needsFastScrollHandler:k.bool,onScroll:k.func,width:k.number};var n=function n(){__p&&__p();this.$MessengerScrollableArea1=false;this.$MessengerScrollableArea2=null;this.$MessengerScrollableArea5=function(){if(this.$MessengerScrollableArea1){var o;this.props.onScroll&&(o=this.props).onScroll.apply(o,arguments)}}.bind(this);this.$MessengerScrollableArea4=function(){__p&&__p();if(!c("UserAgent").isBrowser("IE"))return;if(c("JSReliabilityFixesGatingConfig").should_get_fix)if(!this.refs||!this.refs.scrollable)return;var o=this.refs.scrollable.refs.wrap,p=this.refs.scrollable.refs.body;if(!p||!o)return;p=c("ReactDOM").findDOMNode(p);o=c("ReactDOM").findDOMNode(o);var q=o.offsetWidth-o.clientWidth;if(q>0)c("Style").set(p,"margin-right",-q+"px")}.bind(this);this.getArea=function(){return this.refs.scrollable.getArea()}.bind(this);this.scrollToBottom=function(){var o=this.getArea();if(o)this.scrollToPosition(o.getScrollHeight())}.bind(this);this.scrollToTop=function(o){var p=this.getArea();if(p)p.scrollToTop(!!o)}.bind(this);this.isScrolledToBottom=function(){return this.isScrolledToBottomWithHeight(0)}.bind(this);this.isScrolledToTop=function(){var o=this.getArea();if(!o)return true;return o.getScrollTop()<=l}.bind(this);this.getScrollTop=function(){var o=this.getArea();if(!o)return 0;return o.getScrollTop()}.bind(this)};f.exports=m}),null);
__d("EmojiFormat.bs",["EmojiFormat"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();function h(m){return m.length}var i=c("EmojiFormat").codeStringToCodeArray;function j(m){return c("EmojiFormat").codeArrayToCodeString(m)}var k=c("EmojiFormat").codeArrayToUnicode,l=c("EmojiFormat").codeStringToUnicode;g.numSegments=h;g.codeStringToCodeArray=i;g.codeArrayToCodeString=j;g.codeArrayToUnicode=k;g.codeStringToUnicode=l}),null);
__d("SkinToneEmoji.bs",["bs_caml_array","EmojiFormat.bs","MessengerEmojiConfig"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();function h(s){switch(s){case"1f385":case"1f3c3":case"1f3c4":case"1f3ca":case"1f3cb":case"1f442":case"1f443":case"1f446":case"1f447":case"1f448":case"1f449":case"1f44a":case"1f44b":case"1f44c":case"1f44d":case"1f44e":case"1f44f":case"1f450":case"1f466":case"1f467":case"1f468":case"1f469":case"1f46e":case"1f470":case"1f471":case"1f472":case"1f473":case"1f474":case"1f475":case"1f476":case"1f477":case"1f478":case"1f47c":case"1f481":case"1f482":case"1f483":case"1f485":case"1f486":case"1f487":case"1f4aa":case"1f575":case"1f590":case"1f595":case"1f596":case"1f645":case"1f646":case"1f647":case"1f64b":case"1f64c":case"1f64d":case"1f64e":case"1f64f":case"1f6a3":case"1f6b4":case"1f6b5":case"1f6b6":case"1f6c0":case"1f918":case"261d":case"26f9":case"270a":case"270b":case"270c":case"270d":return 1;default:return 0}}function i(s){var t=+(c("bs_caml_array").caml_array_get(s,s.length-1|0)===65039);if(t!==0)return c("bs_caml_array").caml_array_get(s,s.length-1|0);else return 0}function j(s){if(c("bs_caml_array").caml_array_get(s,s.length-1|0)===65039)return s;else{var t=s.slice(0);return t.concat(65039)}}function k(s){var t=+(i(s)===0);if(t!==0)return s;else return s.slice(0,s.length-1|0)}function l(s){var t=c("MessengerEmojiConfig").emoji_colors,u=t.filter(function(v){return+(v===s)});return+(u.length!==0)}function m(s){var t=k(s);if(t.length<=1||!l(c("bs_caml_array").caml_array_get(t,t.length-1|0)))return 0;else return c("bs_caml_array").caml_array_get(t,t.length-1|0)}function n(s){var t=i(s),u=+(t===0),v=u!==0?m(s):m(s.slice(0,s.length-1|0));if(v!==0){var w=+(t===0);if(w!==0)return s.slice(0,s.length-1|0);else return j(s.slice(0,s.length-2|0))}else return s}function o(s,t){__p&&__p();if(t!==0){var u=i(s),v=+(u===0),w=v!==0?s.slice(0):s.slice(0,s.length-1|0),x=m(w);if(x!==0)return s;else{var y=w.concat(t),z=+(u===0);if(z!==0)return y;else return y.concat(u)}}else return s}function p(s){return n(k(s))}function q(s){return h(c("EmojiFormat.bs").codeArrayToCodeString(n(k(s))))}var r=65039;g.emoji_modifier_code=r;g.emoji=h;g.getEmojiModifier=i;g.addEmojiModifier=j;g.removeEmojiModifier=k;g.isToneModifier=l;g.getTone=m;g.removeTone=n;g.applyTone=o;g.removeAllModifiers=p;g.hasVariations=q}),null);
__d("ChatEmojiPicker.react",["cx","ChatEmojiPickerButton.react","ChatEmojiSkinToneSelector.react","EmojiActions","EmojiFormat","EmojiLikeConstants","Grid.react","MessengerHotLikePreviewEvents","MessengerScrollableArea.react","MessengerSupportedEmojiUtils","React","SkinToneEmoji.bs","SubscriptionsHandler"],(function a(b,c,d,e,f,g,h){"use strict";__p&&__p();var i,j,k=c("Grid.react").GridItem,l=c("React").PropTypes;i=babelHelpers.inherits(m,c("React").PureComponent);j=i&&i.prototype;function m(){__p&&__p();var n,o;for(var p=arguments.length,q=Array(p),r=0;r<p;r++)q[r]=arguments[r];return o=(n=j.constructor).call.apply(n,[this].concat(q)),this.$ChatEmojiPicker1=false,this.$ChatEmojiPicker2=null,this.state={clickedEmoji:null,selectedEmoji:[],toneSelectorShown:false,toneSelectorContext:null},this.componentWillUnmount=function(){this.$ChatEmojiPicker2&&this.$ChatEmojiPicker2.release()}.bind(this),this.scrollToTop=function(s){this.refs.scrollable.scrollToTop(s)}.bind(this),this.$ChatEmojiPicker7=function(s){if(this.props.shouldSaveEmojiColorChoice){var t=c("SkinToneEmoji.bs").getTone(s);c("EmojiActions").changeEmojiColor(t)}this.props.onSelect&&this.props.onSelect(s)}.bind(this),this.$ChatEmojiPicker4=function(s,t){if(this.props.shouldSaveEmojiColorChoice&&this.props.useSkinToneSelector&&c("SkinToneEmoji.bs").hasVariations(s)){this.$ChatEmojiPicker8(s,t);this.$ChatEmojiPicker1=false}else if(this.$ChatEmojiPicker1)this.$ChatEmojiPicker1=false;else this.$ChatEmojiPicker7(s)}.bind(this),this.$ChatEmojiPicker5=function(s,t){if(this.props.useSkinToneSelector&&c("SkinToneEmoji.bs").hasVariations(s))this.$ChatEmojiPicker8(s,t);else this.setState({clickedEmoji:s});this.$ChatEmojiPicker1=true}.bind(this),this.$ChatEmojiPicker6=function(){if(!this.$ChatEmojiPicker1)this.$ChatEmojiPicker3()}.bind(this),this.$ChatEmojiPicker3=function(){this.setState({toneSelectorShown:false})}.bind(this),o}m.prototype.componentDidMount=function(){this.$ChatEmojiPicker2=new(c("SubscriptionsHandler"))();this.$ChatEmojiPicker2.addSubscriptions(c("MessengerHotLikePreviewEvents").addListener(c("MessengerHotLikePreviewEvents").START,function(n,o,p){if(p&&this.props.useSkinToneSelector&&!c("SkinToneEmoji.bs").hasVariations(p)&&this.state.toneSelectorShown)this.$ChatEmojiPicker3()}.bind(this)),c("MessengerHotLikePreviewEvents").addListener(c("MessengerHotLikePreviewEvents").FINISH_EMOJI_ANIMATION,function(n,o,p){if(n===this.props.threadID)if(p&&this.state.clickedEmoji&&this.props.sendCustomEmoji){this.props.sendCustomEmoji({emoji:c("EmojiFormat").codeArrayToUnicode(this.state.clickedEmoji)},p,c("EmojiLikeConstants").source.PICKER);this.setState({clickedEmoji:null})}}.bind(this)))};m.prototype.render=function(){var n=this.props.emojiChoices.map(function(o){var p=String.fromCodePoint.apply(String,o),q=c("MessengerSupportedEmojiUtils").getUrl(c("EmojiFormat").codeArrayToCodeString(o),c("EmojiLikeConstants").size.SMALL),r=this.props.enableHotEmoji||!c("SkinToneEmoji.bs").hasVariations(o);return q?c("React").createElement(k,{key:o.join("_"),className:"_3-sy"},c("React").createElement("div",{className:(p===this.props.currentEmoji?"_4rlt":"")+" _4rlu"},c("React").createElement(c("ChatEmojiPickerButton.react"),{emojiData:{emojiCodes:o,uri:q},enableHotEmoji:r,onClick:this.$ChatEmojiPicker4,onLongPress:this.$ChatEmojiPicker5,threadID:this.props.threadID}))):null}.bind(this)).filter(function(o){return!!o});return c("React").createElement(c("MessengerScrollableArea.react"),{className:this.props.className,onScroll:this.$ChatEmojiPicker3,ref:"scrollable"},c("React").createElement(c("Grid.react"),{cols:this.props.columns,className:"_3-s_"},n),this.props.useSkinToneSelector?c("React").createElement(c("ChatEmojiSkinToneSelector.react"),{context:this.state.toneSelectorContext,emojiCodes:this.state.selectedEmoji,onBlur:this.$ChatEmojiPicker6,onSelect:this.$ChatEmojiPicker7,sendCustomEmoji:this.props.sendCustomEmoji,shouldSaveEmojiColorChoice:this.props.shouldSaveEmojiColorChoice,shown:this.state.toneSelectorShown,threadID:this.props.threadID}):null)};m.prototype.$ChatEmojiPicker8=function(n,o){this.setState({toneSelectorShown:true,selectedEmoji:n,toneSelectorContext:o})};m.propTypes={className:l.string,columns:l.number,currentEmoji:l.string,emojiChoices:l.arrayOf(l.arrayOf(l.number)).isRequired,enableHotEmoji:l.bool,onSelect:l.func,sendCustomEmoji:l.func,shouldSaveEmojiColorChoice:l.bool,threadID:l.string,useSkinToneSelector:l.bool};m.defaultProps={columns:7,useSkinToneSelector:false};f.exports=m}),null);
__d("ChatEmojiSkinToneFlyout.react",["cx","fbt","ChatEmojiPicker.react","MessengerEmojiConfig","React","SkinToneEmoji.bs"],(function a(b,c,d,e,f,g,h,i){"use strict";__p&&__p();var j,k,l=c("React").PropTypes;j=babelHelpers.inherits(m,c("React").PureComponent);k=j&&j.prototype;m.prototype.render=function(){__p&&__p();var n,o=this,p=[];if(this.props.emojiCodes.length>0)(function(){var r=c("SkinToneEmoji.bs").removeTone(o.props.emojiCodes);p=c("MessengerEmojiConfig").emoji_colors.map(function(s){return c("SkinToneEmoji.bs").applyTone(r,s)})})();var q=null;if(this.props.shouldSaveEmojiColorChoice)q=c("React").createElement("div",{className:"_4gww"},i._("Pick one. You can change it anytime in Settings."));return c("React").createElement("div",null,q,c("React").createElement(c("ChatEmojiPicker.react"),{className:this.props.className,columns:6,emojiChoices:p,enableHotEmoji:true,onSelect:this.props.onSelect,sendCustomEmoji:this.props.sendCustomEmoji,threadID:this.props.threadID}))};function m(){j.apply(this,arguments)}m.propTypes={className:l.string,emojiCodes:l.arrayOf(l.number).isRequired,onSelect:l.func.isRequired,sendCustomEmoji:l.func,shouldSaveEmojiColorChoice:l.bool,threadID:l.string};f.exports=m}),null);
__d("ChatEmojiSkinToneSelector.react",["cx","ChatEmojiSkinToneFlyout.react","ContextualLayerAutoFlip","React","XUIContextualDialog.react","emptyFunction"],(function a(b,c,d,e,f,g,h){"use strict";__p&&__p();var i,j,k=c("React").PropTypes,l=220;i=babelHelpers.inherits(m,c("React").PureComponent);j=i&&i.prototype;m.prototype.render=function(){return c("React").createElement(c("XUIContextualDialog.react"),{behaviors:{ContextualLayerAutoFlip:c("ContextualLayerAutoFlip")},context:this.props.context,contextRef:c("emptyFunction"),onBlur:this.props.onBlur,onToggle:this.$ChatEmojiSkinToneSelector1,shown:this.props.shown,width:l},c("React").createElement(c("ChatEmojiSkinToneFlyout.react"),{className:"_2ejf",emojiCodes:this.props.emojiCodes,onSelect:this.props.onSelect,sendCustomEmoji:this.props.sendCustomEmoji,shouldSaveEmojiColorChoice:this.props.shouldSaveEmojiColorChoice,threadID:this.props.threadID}))};function m(){i.apply(this,arguments)}m.propTypes={context:k.instanceOf(HTMLElement),emojiCodes:k.arrayOf(k.number).isRequired,onBlur:k.func.isRequired,onSelect:k.func.isRequired,sendCustomEmoji:k.func,shouldSaveEmojiColorChoice:k.bool,shown:k.bool,threadID:k.string};f.exports=m}),null);
__d("ChatEmojiSkinTonePreferencePicker.react",["ChatEmojiPicker.react","MessengerEmojiConfig","React","SkinToneEmoji.bs"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();var h,i,j=c("React").PropTypes,k=128077;h=babelHelpers.inherits(l,c("React").PureComponent);i=h&&h.prototype;function l(){var m,n;for(var o=arguments.length,p=Array(o),q=0;q<o;q++)p[q]=arguments[q];return n=(m=i.constructor).call.apply(m,[this].concat(p)),this.$ChatEmojiSkinTonePreferencePicker1=function(r){var s=c("SkinToneEmoji.bs").getTone(r);this.props.onSelect&&this.props.onSelect(s)}.bind(this),n}l.prototype.render=function(){var m=null;try{m=this.props.currentPreference?String.fromCodePoint.apply(String,c("SkinToneEmoji.bs").applyTone([k],this.props.currentPreference)):String.fromCodePoint(k)}catch(n){m=String.fromCodePoint(k)}return c("React").createElement(c("ChatEmojiPicker.react"),{className:this.props.className,columns:this.props.columns,currentEmoji:m,emojiChoices:c("MessengerEmojiConfig").emoji_colors.map(function(o){return c("SkinToneEmoji.bs").applyTone([k],o)}),onSelect:this.$ChatEmojiSkinTonePreferencePicker1})};l.propTypes={className:j.string,columns:j.number,currentPreference:j.number,onSelect:j.func};l.defaultProps={columns:6};f.exports=l}),null);
__d("MontageThreadViewContainer.react",["BootloadOnRender.react","JSResource","LazyComponent.react","React"],(function a(b,c,d,e,f,g){"use strict";var h,i;h=babelHelpers.inherits(j,c("React").PureComponent);i=h&&h.prototype;j.prototype.render=function(){return c("React").createElement(c("BootloadOnRender.react"),{component:c("React").createElement(c("LazyComponent.react"),this.props),loader:c("JSResource")("MontageThreadViewContainerImpl.react").__setRef("MontageThreadViewContainer.react"),placeholder:c("React").createElement("div",null)})};function j(){h.apply(this,arguments)}f.exports=j}),null);
__d("EmojiSticker.react",["cx","Image.react","React","joinClasses"],(function a(b,c,d,e,f,g,h){"use strict";__p&&__p();var i,j,k=c("React").PropTypes;i=babelHelpers.inherits(l,c("React").Component);j=i&&i.prototype;l.prototype.componentDidMount=function(){this.props.onAttachmentLoad&&this.props.onAttachmentLoad()};l.prototype.render=function(){var m=this.props.emojiImage?this.props.emojiImage:c("React").createElement(c("Image.react"),{src:this.props.sourceURI});return c("React").createElement("div",{"aria-label":this.props.emoji,className:c("joinClasses")(this.props.className,"_383m"),tabIndex:"0"},m)};function l(){i.apply(this,arguments)}l.propTypes={emoji:k.string,emojiImage:k.any,onAttachmentLoad:k.func,sourceURI:k.string.isRequired};f.exports=l}),null);
__d("MessengerErrorBoundary.react",["cx","fbt","ChatReliabilityInstrumentation","ErrorBoundary.react","LogHistory","React","joinClasses"],(function a(b,c,d,e,f,g,h,i){"use strict";__p&&__p();var j,k,l=c("LogHistory").getInstance("messenger_error_boundary"),m=function m(p){return i._({"conversation list":"Could not display conversation list.","conversation":"Could not display conversation.","composer":"Could not display composer.","conversation information":"Could not display conversation information.","attachment":"Could not display attachment."},[i["enum"](p,{"conversation list":"conversation list",conversation:"conversation",composer:"composer","conversation information":"conversation information",attachment:"attachment"})])},n=function n(p,q){return function(){return c("React").createElement("div",{className:c("joinClasses")("_5jpt",q)},p)}};j=babelHelpers.inherits(o,c("React").Component);k=j&&j.prototype;function o(){var p,q;for(var r=arguments.length,s=Array(r),t=0;t<r;t++)s[t]=arguments[t];return q=(p=k.constructor).call.apply(p,[this].concat(s)),this.$MessengerErrorBoundary1=function(u,v){var w="React error in "+v+" got "+u.message;l.error(w,JSON.stringify(u));c("ChatReliabilityInstrumentation").logERROR(w);this.props.onHandleError&&this.props.onHandleError(u,v)}.bind(this),q}o.prototype.render=function(){var p=this.props,q=p.className,r=p.component,s=babelHelpers.objectWithoutProperties(p,["className","component"]);return c("React").createElement(c("ErrorBoundary.react"),babelHelpers["extends"]({},s,{fallbackComponent:n(m(r),q),onHandleError:this.$MessengerErrorBoundary1,bigRedBox:true}))};f.exports=o}),null);
__d("MercuryShareAttachment.react",["cx","BootloadedComponent.react","DOM","Event","MercuryShareAttachmentReactShape","MercuryShareStyleMap","MessengerErrorBoundary.react","React","ReactDOM","MercuryShareAttachmentRenderLocations","emptyFunction","idx","joinClasses"],(function a(b,c,d,e,f,g,h){"use strict";__p&&__p();var i,j,k=c("React").PropTypes;i=babelHelpers.inherits(l,c("React").Component);j=i&&i.prototype;function l(){var m,n;for(var o=arguments.length,p=Array(o),q=0;q<o;q++)p[q]=arguments[q];return n=(m=j.constructor).call.apply(m,[this].concat(p)),this.$MercuryShareAttachment3=function(r){this.$MercuryShareAttachment1(r);c("DOM").scry(c("ReactDOM").findDOMNode(this),"img").forEach(function(s){var t=c("Event").listen(s,"load",function(){this.$MercuryShareAttachment1(s.height);t.remove()}.bind(this))}.bind(this))}.bind(this),n}l.prototype.componentDidMount=function(){this.$MercuryShareAttachment1()};l.prototype.$MercuryShareAttachment2=function(m,n){if(this.props.location===c("MercuryShareAttachmentRenderLocations").MESSENGER&&!this.props.isSubattachment)n=c("joinClasses")("_52mr _2poz _ui9","_4skb",n);return c("React").createElement("div",{className:n},m,this.props.afterDecorators)};l.prototype.render=function(){var m,n=c("MercuryShareStyleMap").getStyleFactory(this.props.attachment);if(!n)return null;var o=n.attachment,p=n.factory;return this.$MercuryShareAttachment2(c("React").createElement(c("MessengerErrorBoundary.react"),babelHelpers["extends"]({},this.props,{component:"attachment"}),c("React").createElement(c("BootloadedComponent.react"),babelHelpers["extends"]({},this.props,{attachment:o,bootloadLoader:p.componentLoader,bootloadPlaceholder:c("React").createElement("div",null),key:(m=this)!=null?(m=m.props)!=null?(m=m.attachment)!=null?m.share_id:m:m:m,module:p.componentName,onComponentLoad:this.$MercuryShareAttachment3}))),p.cx&&p.cx.get(this.props.location))};l.prototype.$MercuryShareAttachment1=function(m){this.props.onComponentLoaded(m)};l.propTypes={attachment:c("MercuryShareAttachmentReactShape"),isSponsored:k.bool,isSubattachment:k.bool,isVisible:k.bool,location:k.oneOf(c("MercuryShareAttachmentRenderLocations").getValues()),messageID:k.string,onComponentLoaded:k.func.isRequired,onSelect:k.func,pageID:k.string,threadID:k.string.isRequired,afterDecorators:k.array};l.defaultProps={onComponentLoaded:c("emptyFunction")};f.exports=l}),null);
__d("MessagingFlowerBorderChecker",["MercuryMessageCustomizations","MessageBorderType","MessageCustomizationType","gkx"],(function a(b,c,d,e,f,g){"use strict";var h={shouldRenderWithFlowerBorder:function i(j){return c("gkx")("AT7rTubr3N_DsfglfGkvVFG3tMrhGme9-eELltAXoSOKkQuD-9JepjOeFPMl1e8XndLLgVmcw1EaaNThD3K6r4QJpohV9bITGr6_ur1k_X_RGQ")&&c("MercuryMessageCustomizations").getCustomizationValue(j,c("MessageCustomizationType").BORDER)===c("MessageBorderType").FLOWERS}};f.exports=h}),null);
__d("MessengerErrorAttachment.react",["cx","fbt","CurrentUser","React"],(function a(b,c,d,e,f,g,h,i){"use strict";__p&&__p();var j,k;j=babelHelpers.inherits(l,c("React").PureComponent);k=j&&j.prototype;function l(m){k.constructor.call(this,m)}l.prototype.render=function(){var m=this.props.attachment.error_msg||i._("This attachment could not be loaded.");return c("React").createElement("div",{className:"_1o12 _52mr"},c("React").createElement("div",{className:"_1o13"},m,this.$MessengerErrorAttachment1()))};l.prototype.$MessengerErrorAttachment1=function(){if(!this.props.attachment.error_msg&&c("CurrentUser").isEmployee()&&c("CurrentUser").hasWorkUser()&&!c("CurrentUser").isWorkUser())return c("React").createElement("div",null,i._("It was probably meant for your \u0040workplace account."));return null};f.exports=l}),null);
__d("MessengerFileAttachment.react",["cx","Link.react","React"],(function a(b,c,d,e,f,g,h){"use strict";__p&&__p();var i,j,k=c("React").PropTypes;i=babelHelpers.inherits(l,c("React").PureComponent);j=i&&i.prototype;l.prototype.render=function(){return c("React").createElement(c("Link.react"),{className:"_4pcn _2uf4",target:"_blank",href:this.props.attachment.url},c("React").createElement("div",{className:"_2uf5"}),this.props.attachment.name)};function l(){i.apply(this,arguments)}l.propTypes={attachment:k.object.isRequired};f.exports=l}),null);
__d("MessengerFromViewerUtils",["CurrentUser","MercuryIDs"],(function a(b,c,d,e,f,g){"use strict";function h(i){return i.author===c("MercuryIDs").getParticipantIDFromUserID(c("CurrentUser").getID())}f.exports={isFromViewer:h}}),null);
__d("MessengerHotLikePreview.react",["cx","Animation","EmojiLikeConstants","HotLikeSound","MessengerHotLikePreviewEvents","MessengerHotLikeSVG.react","MessengerHotLikeUtils","MessengerSupportedEmojiUtils","React","ReactDOM","StickerConstants","SubscriptionsHandler"],(function a(b,c,d,e,f,g,h){"use strict";__p&&__p();var i,j,k=c("React").PropTypes;i=babelHelpers.inherits(l,c("React").Component);j=i&&i.prototype;function l(){__p&&__p();var m,n;for(var o=arguments.length,p=Array(o),q=0;q<o;q++)p[q]=arguments[q];return n=(m=j.constructor).call.apply(m,[this].concat(p)),this.$MessengerHotLikePreview5=function(){this.$MessengerHotLikePreview6=new(c("Animation"))(c("ReactDOM").findDOMNode(this));this.$MessengerHotLikePreview7(-2,2,150,1e3);this.$MessengerHotLikePreview7(-4,4,100,1e3);this.$MessengerHotLikePreview7(-10,10,75,1e3);this.$MessengerHotLikePreview6.go()}.bind(this),this.$MessengerHotLikePreview2=function(r,s){__p&&__p();var t=s?c("MessengerHotLikePreviewEvents").FINISH_EMOJI_ANIMATION:c("MessengerHotLikePreviewEvents").FINISH_ANIMATION;if(this.$MessengerHotLikePreview8)return;this.$MessengerHotLikePreview8=true;var u=Date.now()-this.props.since,v=null;if(this.props.customLike)v=c("MessengerHotLikeUtils").getEmojiSizeForTime(u);var w=c("MessengerHotLikeUtils").getStickerIDForTime(u);c("HotLikeSound").snap(w);var x=c("MessengerHotLikeUtils").getMetadataForHotLike(v||w);this.$MessengerHotLikePreview6.stop();var y=30,z=-10;if(w===c("StickerConstants").HOT_LIKE_SMALL_STICKER_ID){y=0;z=0}this.$MessengerHotLikePreview4.stop().to("width",x.width*1.2).to("height",x.height*1.2).to("rotateZ",y).duration(100).checkpoint().to("width",x.width*.9).to("height",x.height*.9).to("rotateZ",z).duration(100).checkpoint().to("width",x.width).to("height",x.height).to("rotateZ",0).duration(100).ondone(function(){c("MessengerHotLikePreviewEvents").emit(t,r,w,v)}).go()}.bind(this),this.$MessengerHotLikePreview3=function(r){c("HotLikeSound").pop();this.$MessengerHotLikePreview4.stop().to("width",0).to("height",0).duration(100).ondone(function(){c("MessengerHotLikePreviewEvents").emit(c("MessengerHotLikePreviewEvents").REMOVE,r)}).go()}.bind(this),n}l.prototype.componentDidMount=function(){this.$MessengerHotLikePreview1=new(c("SubscriptionsHandler"))();this.$MessengerHotLikePreview1.addSubscriptions(c("MessengerHotLikePreviewEvents").addListener(c("MessengerHotLikePreviewEvents").STOP,this.$MessengerHotLikePreview2),c("MessengerHotLikePreviewEvents").addListener(c("MessengerHotLikePreviewEvents").STOP_EMOJI,this.$MessengerHotLikePreview2),c("MessengerHotLikePreviewEvents").addListener(c("MessengerHotLikePreviewEvents").POP,this.$MessengerHotLikePreview3));c("HotLikeSound").start();this.$MessengerHotLikePreview4=new(c("Animation"))(c("ReactDOM").findDOMNode(this)).to("width",80).to("height",80).duration(3e3).go();this.$MessengerHotLikePreview5()};l.prototype.componentWillUnmount=function(){this.$MessengerHotLikePreview1&&this.$MessengerHotLikePreview1.release()};l.prototype.render=function(){if(this.props.customLike){var m=this.props.customLike,n=c("MessengerSupportedEmojiUtils").getNewEmojiData(m.emoji,c("EmojiLikeConstants").size.LARGE),o=n?n.url:this.props.customLike.large;if(m.uri)o=m.uri;return c("React").createElement("div",{className:"_4a9g _383m",style:{backgroundImage:"url("+o+")"}})}return c("React").createElement("div",{className:"_4a9g _576q"},c("React").createElement(c("MessengerHotLikeSVG.react"),{color:this.props.customColor}))};l.prototype.$MessengerHotLikePreview7=function(m,n,o,p){var q=Math.floor(p/o),r=null;for(var s=0;s<q;s++){r=s%2?m:n;this.$MessengerHotLikePreview6.to("rotateZ",r).duration(o).checkpoint()}};l.propTypes={customLike:k.object,since:k.number};f.exports=l}),null);
__d("ChatSpeakingStickerReact.bs",["ReasonReact.bs","ChatSpeakingSticker.react"],(function a(b,c,d,e,f,g){"use strict";function h(i,j,k){return c("ReasonReact.bs").wrapJsForReason(c("ChatSpeakingSticker.react"),{videoURI:i,videoSize:j},k)}g.make=h}),null);
__d("FBID.bs",["bs_string"],(function a(b,c,d,e,f,g){"use strict";var h=c("bs_string").compare;g.compare=h}),null);
__d("MercuryAttachmentPayload.bs",[],(function a(b,c,d,e,f,g){"use strict";function h(i,j,k){var l=j?j[0]:null;return{app_attribution:null,attach_type:i,deduplication_key:null,description:null,icon_type:null,key:l,large_preview_height:null,large_preview_width:null,large_preview_url:null,media:null,metadata:null,name:null,photo_encodings:null,preview_height:null,preview_uploading:null,preview_url:null,preview_width:null,rel:null,share:null,source:null,target:null,thumbnail_url:null,upload_id:null,uri:null,url:k,video_title:null}}g.create=h}),null);
__d("MessagingFlowerBorderReact.bs",["ReasonReact.bs","MessagingFlowerBorder.react"],(function a(b,c,d,e,f,g){"use strict";function h(i,j){return c("ReasonReact.bs").wrapJsForReason(c("MessagingFlowerBorder.react"),{offset:i},j)}g.make=h}),null);
__d("MessagingGiftWrapReact.bs",["Utils.bs","ReasonReact.bs","bs_js_null_undefined","MessagingGiftWrap.react"],(function a(b,c,d,e,f,g){"use strict";function h(i,j,k){return c("ReasonReact.bs").wrapJsForReason(c("MessagingGiftWrap.react"),{isSticker:c("Utils.bs").optionBoolToNullUndefinedBoolean(i),onUnwrap:c("bs_js_null_undefined").from_opt(j)},k)}g.make=h}),null);
__d("MessengerAttachmentViewer",["Bootloader","MessagesViewer","React","Run","emptyFunction"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();var h={renderVideo:function i(j){c("Bootloader").loadModules(["MessagingVideoViewer.react","MessengerForwardAttachmentDialogReact.bs"],function(k,l){var m=l.jsComponent;c("MessagesViewer").renderVideo(c("React").createElement(k,babelHelpers["extends"]({},j,{forwardDialogComponent:m})))},"MessengerAttachmentViewer")},bootstrapWithConfig:function i(j,k){c("Bootloader").loadModules(["SpotlightMessagesViewer","MessengerForwardAttachmentDialogReact.bs"],function(l,m){var n=m.jsComponent;c("MessagesViewer").renderSpotlight(j,k,l,n)},"MessengerAttachmentViewer")},preload:function i(){c("Run").onAfterLoad(function(){c("Bootloader").loadModules(["MessagingVideoViewer.react","SpotlightMessagesViewer","MessengerForwardAttachmentDialogReact.bs"],c("emptyFunction"),"MessengerAttachmentViewer")})}};f.exports=h}),null);
__d("SphericalPhotoViewerInMessengerThreadBootloaded.react",["cx","BootloadedComponent.react","CssBackgroundImage.react","JSResource","React","PhotoProjection"],(function a(b,c,d,e,f,g,h){"use strict";__p&&__p();var i,j,k=c("PhotoProjection").PERSPECTIVE;i=babelHelpers.inherits(l,c("React").Component);j=i&&i.prototype;l.prototype.render=function(){__p&&__p();if(this.props.photoEncodings&&this.props.thumbnail){var m=this.props.photoEncodings.find(function(s){return s.projection_type===k}),n=null,o=null;if(m&&m.thumbnails&&m.thumbnails.length>0){var p=m.thumbnails;n=p[0]?p[0].uri:null;o=p[1]?p[1].uri:null}if(this.props.useRenderer&&this.props.width&&this.props.height&&this.props.fbid){var q=o||n||this.props.thumbnail;return c("React").createElement(c("BootloadedComponent.react"),{bootloadLoader:c("JSResource")("SphericalPhotoViewerInMessengerThreadWrapper.react").__setRef("SphericalPhotoViewerInMessengerThreadBootloaded.react"),bootloadPlaceholder:c("React").createElement(c("CssBackgroundImage.react"),{backgroundPosition:"center",imageURI:q,className:"_3v3t"}),height:this.props.height,width:this.props.width,fbid:this.props.fbid,thumbnail:q,photoEncodings:this.props.photoEncodings,isVisible:this.props.isVisible,onClickHandler:this.props.onClickHandler})}else{var r=n||o||this.props.thumbnail;return c("React").createElement(c("BootloadedComponent.react"),{bootloadLoader:c("JSResource")("SphericalPhotoMessengerThumbnail.react").__setRef("SphericalPhotoViewerInMessengerThreadBootloaded.react"),bootloadPlaceholder:c("React").createElement(c("CssBackgroundImage.react"),{backgroundPosition:"center",imageURI:r,className:"_3v3t"}),photoEncodings:this.props.photoEncodings,thumbnail:r})}}return null};function l(){i.apply(this,arguments)}f.exports=l}),null);
__d("MessengerSphericalPhotoReact.bs",["Utils.bs","ReasonReact.bs","bs_js_null_undefined","SphericalPhotoViewerInMessengerThreadBootloaded.react"],(function a(b,c,d,e,f,g){"use strict";function h(i,j,k,l,m,n,o,p,q){return c("ReasonReact.bs").wrapJsForReason(c("SphericalPhotoViewerInMessengerThreadBootloaded.react"),{height:c("bs_js_null_undefined").from_opt(i),width:c("bs_js_null_undefined").from_opt(j),fbid:c("bs_js_null_undefined").from_opt(k),thumbnail:c("bs_js_null_undefined").from_opt(l),photoEncodings:c("bs_js_null_undefined").from_opt(m),isVisible:c("Utils.bs").optionBoolToBoolean(n),onClickHandler:o,useRenderer:p},q)}g.make=h}),null);
__d("MessengerPhotoReact.bs",["cx","fbt","bs_curry","React","Utils.bs","LinkReact.bs","cssURL","ImageReact.bs","bs_js_boolean","bs_pervasives","ReasonReact.bs","joinClasses","bs_js_primitive","MercuryAttachmentType","MessengerSpinnerReact.bs","bs_caml_builtin_exceptions","MessengerSphericalPhotoReact.bs"],(function a(b,c,d,aa,ba,e,ca,f){"use strict";__p&&__p();function g(r,s){__p&&__p();var t=r.metadata;if(t==null)return null;else if(r.attach_type===c("MercuryAttachmentType").VIDEO){var u=s&&c("Utils.bs").isDefined(t.large_preview);if(u!==0)return t.large_preview;else return t.inbox_preview}else if(s!==0)return r.large_preview_url;else return r.preview_url}function h(r){if(r==null)return[null,null];else return[r.width,r.height]}function i(r){__p&&__p();var s=+(window.screen.width>1800);if(c("Utils.bs").isTruthy(r.preview_uploading)){var t=function t(H,I){var u=c("Utils.bs").isDefined(H);if(u!==0)return H;else return I},u=s&&c("Utils.bs").isDefined(r.large_preview_url);if(u!==0)return[[t(r.large_preview_width,480),t(r.large_preview_height,480),r.large_preview_url,s]];else return[[t(r.preview_width,280),t(r.preview_height,280),r.preview_url,s]]}else{var v=g(r,s),w=c("Utils.bs").isDefined(v),x=r.metadata,y=0;if(w!==0)if(x==null)y=1;else{var z=s&&c("Utils.bs").isDefined(x.large_size),A=z!==0?x.large_size:x.inbox_size,B=h(A);return[[B[0],B[1],v,s]]}else y=1;if(y===1)if(c("Utils.bs").isDefined(r.preview_url)){var C=s&&c("Utils.bs").isDefined(r.large_preview_url);if(C!==0)return[[r.large_preview_width,r.large_preview_height,r.large_preview_url,s]];else return[[r.preview_width,r.preview_height,r.preview_url,s]]}else{var D=r.media;if(D==null)return 0;else{var E=c("Utils.bs").isDefined(D.playable)&&c("Utils.bs").isDefined(D.animated_image);if(E!==0){var F=h(D.animated_image_size);return[[F[0],F[1],D.animated_image,s]]}else{var G=h(D.image_size);return[[G[0],G[1],D.image,s]]}}}}}function j(r){__p&&__p();var s=function s(z){return[""+(String(z)+"")]};if(c("Utils.bs").isTruthy(r.preview_uploading)){var t=c("Utils.bs").isDefined(r.preview_url);return s(t!==0?0:280)}else{var u=function u(z){var A=z[1],B=z[0];if(!(B==null)&&!(A==null))return[[B,A]];else return 0},v=function v(z){if(z){var A=z[0];return u([A[0],A[1]])}else return 0},w=c("Utils.bs").isDefined(r.media),x=w!==0?v(i(r)):u([r.preview_width,r.preview_height]);if(x){var y=x[0];return s(c("bs_pervasives").min(y[1]*c("bs_pervasives").min(1,450/y[0]),450))}else return 0}}function k(r,s,t,u,v){c("Utils.bs").isTruthy(u.preview_uploading);var w=r[2];if(w==null)return null;else if(v){var x=r[3],y=x!==0?window.screen.height*.7:window.screen.height*.65,z={maxHeight:""+(String(y)+""),maxWidth:"100%",width:"100%"};return c("ReasonReact.bs").element(0,0,c("ImageReact.bs").make([c("joinClasses")(t,c("bs_js_boolean").to_js_boolean(1-s)?"_5pf5":"")],[""],[w],0,0,0,[z],[]))}else return null}var l=c("ReasonReact.bs").statelessComponent("MessengerPhoto");function m(r,s,t,u,v,w,x){__p&&__p();var y=r?r[0]:"",z=l.slice();z[4]=function(){if(v)c("bs_curry")._1(v[0],0);return 0};z[9]=function(){__p&&__p();var A=i(s);if(A){var B=A[0],C=+(s.attach_type===c("MercuryAttachmentType").ANIMATED_IMAGE),D=c("Utils.bs").isDefined(s.app_attribution),E=s.photo_encodings,F=E==null?0:+(E.length!==0),G=(1-C||1-t)&&1-F,H;if(G!==0){var I=B[2],J=I==null?0:[c("cssURL")(I)],K=t!==0?j(s):0;H=[J,K]}else H=[0,0];var L={},M=H[0];if(M)L.backgroundImage=M[0];var N=H[1];if(N)L.minHeight=N[0];var O=L,P=c("Utils.bs").isTruthy(s.preview_uploading),Q=P!==0?c("ReasonReact.bs").element(0,0,c("MessengerSpinnerReact.bs").make(0,0,0,[])):null,R=C!==0?[c("MercuryAttachmentType").ANIMATED_IMAGE]:0,S=function S(){if(w)return c("bs_curry")._1(w[0],s);else return 0},T=function T($){$.preventDefault();return S(0)},U;if(F){var V=B[2],W=s.metadata,X;if(W==null)X=0;else{var Y=W.fbid;X=Y==null?0:[Y]}var Z=s.photo_encodings;U=c("ReasonReact.bs").element(0,0,c("MessengerSphericalPhotoReact.bs").make([400],[400],X,V==null?0:[V],Z==null?0:[Z],u,S,t,[]))}else U=k(B,t&&C,(c("bs_js_boolean").to_js_boolean(D)?"_mxz":"")+(c("bs_js_boolean").to_js_boolean(t&&1-D)?" _52mr":""),s,t);return c("React").cloneElement(c("React").createElement("div",{className:c("joinClasses")(y,"_4tsk"+(c("bs_js_boolean").to_js_boolean(D)?" _mxz":"")+(c("bs_js_boolean").to_js_boolean(t&&1-D)?" _52mr":"")+(c("bs_js_boolean").to_js_boolean(c("Utils.bs").isTruthy(s.preview_uploading)&&1-c("Utils.bs").isDefined(B[2]))?" _3etv":"")+(c("bs_js_boolean").to_js_boolean(F&&1-t)?" _3603":"")),role:"presentation",style:O,onClick:T}),{"data-testid":R},c("React").createElement("div",{className:c("bs_js_boolean").to_js_boolean(F&&1-t)?"_64ks":""}),c("ReasonReact.bs").element(0,0,c("LinkReact.bs").make([f._("Open Photo")],["_4tsl"],0,0,0,0,c("bs_js_primitive").null_undefined_to_opt(B[2]),0,0,0,0,0,0,0,0,0,[x])),U,Q)}else return null};return z}var n=280,o=480,p=1800,q=450;e.preview_thumbnail_size=n;e.preview_large_size=o;e.large_window_width=p;e.max_photo_width=q;e.getSrcFromAttachment=g;e.sizeToWidthHeight=h;e.extractPreviewMetadata=i;e.getMinHeightForAttachment=j;e.getImageFromMetadata=k;e.component=l;e.make=m}),null);
__d("MessengerThreadSharedMediaAfterWebGraphQLQuery",["WebGraphQLQueryBase"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();f.exports=function(){__p&&__p();var h,i;h=babelHelpers.inherits(j,c("WebGraphQLQueryBase"));i=h&&h.prototype;j.__getDocID=function(){"use strict";return"1668947383157276"};j.getQueryID=function(){"use strict";return"515216185516880"};function j(){"use strict";h.apply(this,arguments)}return j}()}),null);
__d("MessengerThreadSharedMediaBeforeWebGraphQLQuery",["WebGraphQLQueryBase"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();f.exports=function(){__p&&__p();var h,i;h=babelHelpers.inherits(j,c("WebGraphQLQueryBase"));i=h&&h.prototype;j.__getDocID=function(){"use strict";return"1712143858865110"};j.getQueryID=function(){"use strict";return"1694317194012102"};function j(){"use strict";h.apply(this,arguments)}return j}()}),null);
__d("MessengerThreadSharedMediaFindWebGraphQLQuery",["WebGraphQLQueryBase"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();f.exports=function(){__p&&__p();var h,i;h=babelHelpers.inherits(j,c("WebGraphQLQueryBase"));i=h&&h.prototype;j.__getDocID=function(){"use strict";return"1504091236306393"};j.getQueryID=function(){"use strict";return"1829469114011976"};function j(){"use strict";h.apply(this,arguments)}return j}()}),null);
__d("MessengerSharedMediaReducer",["JSReliabilityFixesGatingConfig","MessengerSharedMediaActions","MessengerThreadSharedMediaHelper","Set","idx"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();var h=c("MessengerSharedMediaActions").Types;function i(s,t){__p&&__p();switch(t.type){case h.LOAD_CURRENT:var u=s.get("sharedMedia").get(t.threadFBID);if(u){var v=u.edges.find(function(y){return y.node.legacy_attachment_id===t.photoID});if(v)return s}var w=s.get("isLoading").get(t.threadFBID);if(!!w&&w.curr)return s;var x=q(s,t.threadFBID,"curr",true);c("MessengerThreadSharedMediaHelper").search(t.threadFBID,t.photoID,function(y){return c("MessengerSharedMediaActions").currentLoaded(y)});return x}return s}function j(s,t){__p&&__p();switch(t.type){case h.LOAD_MORE_PREVIOUS:var u=s.get("isLoading").get(t.threadFBID);if(!!u&&u.prev)return s;var v=q(s,t.threadFBID,"prev",true);if(v===null)return s;c("MessengerThreadSharedMediaHelper").loadMorePrevious(t.threadFBID,t.afterCursor,t.first,function(w){return c("MessengerSharedMediaActions").previousLoaded(w)});return v}return s}function k(s,t){__p&&__p();switch(t.type){case h.LOAD_MORE_LATEST:var u=s.get("isLoading").get(t.threadFBID);if(!!u&&u.latest)return s;var v=q(s,t.threadFBID,"latest",true);if(v===null)return s;c("MessengerThreadSharedMediaHelper").loadMoreLatest(t.threadFBID,t.beforeCursor,t.last,function(w){return c("MessengerSharedMediaActions").latestLoaded(w)});return v}return s}function l(s,t){__p&&__p();var u,v;switch(t.type){case h.CURRENT_LOADED:var w=t.data,x=Object.keys(w)[0],y=c("JSReliabilityFixesGatingConfig").should_get_fix,z=y?(u=w[x])!=null?u.message_shared_media:u:w[x].message_shared_media,A=y?(v=z)!=null?(v=v.edges)!=null?v.length:v:v:z.edges.length,B=q(s,x,"curr",false);if(A!==0){var C=p(s.get("sharedMedia").get(x),z,0),D=s.get("sharedMedia").set(x,C);B=B.set("sharedMedia",D);var E=z.edges[0];c("MessengerThreadSharedMediaHelper").loadMorePrevious(x,E.cursor,10,function(F){return c("MessengerSharedMediaActions").previousLoaded(F)});c("MessengerThreadSharedMediaHelper").loadMoreLatest(x,E.cursor,10,function(F){return c("MessengerSharedMediaActions").latestLoaded(F)})}return B}return s}function m(s,t){switch(t.type){case h.PREVIOUS_LOADED:var u=t.data,v=Object.keys(u)[0],w=u[v].message_shared_media,x=q(s,v,"prev",false),y=p(s.get("sharedMedia").get(v),w,1),z=s.get("sharedMedia").set(v,y);x=x.set("sharedMedia",z);return x}return s}function n(s,t){switch(t.type){case h.LATEST_LOADED:var u=t.data,v=Object.keys(u)[0],w=u[v].message_shared_media,x=q(s,v,"latest",false),y=p(s.get("sharedMedia").get(v),w,-1),z=s.get("sharedMedia").set(v,y);x=x.set("sharedMedia",z);return x}return s}function o(s,t){switch(t.type){case h.DELETE_PHOTOS:var u=t.threadFBID,v=t.photoFBIDs,w=s.get("sharedMedia").get(u),x=new(c("Set"))(v.map(function(A){return A.toString()}));w.edges=w.edges.filter(function(A){return!x.has(A.node.legacy_attachment_id)});var y=s.get("sharedMedia").set(u,w),z=s.set("sharedMedia",y);return z}return s}function p(s,t,u){__p&&__p();var v={};v.count=t.count;if(u===1&&s){var w=s.edges;v.has_previous_page=s.has_previous_page;v.has_next_page=t.page_info.has_next_page;if(t.edges.length>0)v.edges=w.concat(t.edges);else v.edges=w}else if(u===-1&&s){var x=s.edges;v.has_previous_page=t.page_info.has_previous_page;v.has_next_page=s.has_next_page;if(t.edges.length>0)v.edges=t.edges.concat(x);else v.edges=x}else{v.has_previous_page=t.page_info.has_previous_page;v.has_next_page=t.page_info.has_next_page;if(t.edges.length>0)v.edges=t.edges}return v}function q(s,t,u,v){var w=s.get("isLoading").get(t);if(w===undefined){w={};w[u]=v}else w[u]=v;var x=s.set("isLoading",s.get("isLoading").set(t,w));return x}var r={currentLoaded:l,deletePhotos:o,latestLoaded:n,loadCurrent:i,loadMoreLatest:k,loadMorePrevious:j,previousLoaded:m};f.exports=r}),null);
__d("MessengerSharedMediaState",["immutable"],(function a(b,c,d,e,f,g){"use strict";var h,i,j={sharedMedia:c("immutable").Map({}),isLoading:c("immutable").Map({})};h=babelHelpers.inherits(k,c("immutable").Record(j));i=h&&h.prototype;function k(){h.apply(this,arguments)}f.exports=k}),null);
__d("MessengerSharedMediaStore",["MessengerFluxReduceDispatcher","MessengerSharedMediaActions","MessengerSharedMediaReducer","MessengerSharedMediaState","FluxReduceStore"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();var h,i,j=Object.keys(c("MessengerSharedMediaReducer"));h=babelHelpers.inherits(k,c("FluxReduceStore"));i=h&&h.prototype;k.prototype.getInitialState=function(){return new(c("MessengerSharedMediaState"))()};k.prototype.reduce=function(l,m){if(m.namespace!==c("MessengerSharedMediaActions").Namespace)return l;j.forEach(function(n){l=c("MessengerSharedMediaReducer")[n](l,m)});return l};function k(){h.apply(this,arguments)}f.exports=new k(c("MessengerFluxReduceDispatcher"))}),null);
__d("MessengerSharedPhotosAlbumViewPhotoReact.bs",["bs_curry","React","cssURL","ReasonReact.bs"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();var h=c("ReasonReact.bs").statelessComponent("MessengerSharedPhotosAlbumViewPhotoReact");function i(j,k,l,m,n){var o=h.slice();o[9]=function(){return c("React").createElement("a",{className:j,style:{backgroundImage:c("cssURL")(m)},href:"#",onClick:function p(){return c("bs_curry")._1(l,k)}},n)};return o}g.component=h;g.make=i}),null);
__d("MessengerSharedPhotosAlbumViewVScrollReact.bs",["cx","bs_array","bs_curry","React","bs_string","ReactDOM","Animation","bs_caml_array","bs_js_boolean","ReasonReact.bs","bs_caml_builtin_exceptions","MessengerSharedMediaActions","MessengerSharedPhotosAlbumViewPhotoReact.bs"],(function a(b,c,d,e,f,g,h){"use strict";__p&&__p();function i(C){var D=C[1],E=D.length;if(E<48){c("MessengerSharedMediaActions").loadMorePrevious(C[0],c("bs_caml_array").caml_array_get(D,D.length-1|0).cursor,48);return 0}else return 0}function j(C){if(C){var D=C[0];return+((D.scrollTop+D.clientHeight|0)>=(D.scrollHeight-20|0))}else throw c("bs_caml_builtin_exceptions").not_found}function k(C){if(C)return+(C[0].scrollTop<=20);else throw c("bs_caml_builtin_exceptions").not_found}function l(C){if(C)return C[0].clientHeight;else throw c("bs_caml_builtin_exceptions").not_found}function m(C,D){if(C){new(c("Animation"))(C[0]).to("scrollTop",D).duration(200).go();return 0}else return 0}function n(C){var D=C[2][0];if(D)return m(C[1][0],c("ReactDOM").findDOMNode(D[0]).offsetTop-70|0);else return 0}function o(C,D){__p&&__p();var E=D[3],F=E[3],G=E[1],H=E[0],I=D[2],J=G.length;if(j(I[1][0]))if(J<E[2]&&!F.prev){c("MessengerSharedMediaActions").loadMorePrevious(H,c("bs_caml_array").caml_array_get(G,G.length-1|0).cursor,48);return 0}else return 0;else if(k(I[1][0])&&!F.latest){c("MessengerSharedMediaActions").loadMoreLatest(H,c("bs_caml_array").caml_array_get(G,0).cursor,48);return 0}else return 0}function p(C){__p&&__p();var D=C[2];i(C[3]);var E=function E(F,G){__p&&__p();if(l(D[3][0])>0){n(D);var H=D[0][0];if(H){clearInterval(H[0]);D[0][0]=0;return 0}else return 0}else return 0};D[0][0]=[setInterval(c("bs_curry")._1(C[0],E),200)];return 0}function q(C){var D=C[2][0][0];if(D){clearInterval(D[0]);return 0}else return 0}var r=c("ReasonReact.bs").reducerComponentWithRetainedProps("MessengerSharedPhotosAlbumViewVScrollReact");function s(C,D){D[2][1][0]=C==null?0:[C];return 0}function t(C,D){D[2][3][0]=C==null?0:[C];return 0}function u(C,D){D[2][2][0]=C==null?0:[C];return 0}function v(C,D,E,F,G,H,I){__p&&__p();var J=function J(K){__p&&__p();return c("bs_array").map(function(L){__p&&__p();var M=L.node,N=M.photo_encodings,O=N==null?0:+(N.length!==0),P=M.photo_encodings,Q;if(O!==0)if(P==null)Q=M.image1.uri;else{var R=P.find(function(U){return+(U.projection_type==="perspective")});if(R!==undefined)if(R.thumbnails.length!==0){var S=R.thumbnails;Q=c("bs_caml_array").caml_array_get(S,0).uri}else Q=M.image1.uri;else Q=M.image1.uri}else Q=M.image1.uri;var T=+(M.legacy_attachment_id===H);return c("ReasonReact.bs").element([M.legacy_attachment_id],T!==0?[c("bs_curry")._1(K[0],u)]:0,c("MessengerSharedPhotosAlbumViewPhotoReact.bs").make("_3bly"+(c("bs_js_boolean").to_js_boolean(O)?" _3603":""),M.legacy_attachment_id,D,Q,[c("React").createElement("div",{key:c("bs_string").concat("_",[M.legacy_attachment_id,["spherical_gradient",0]]),className:c("bs_js_boolean").to_js_boolean(O)?"_64ks":""})]))},E)};return[r[0],r[1],r[2],r[3],p,r[5],q,r[7],r[8],function(K){return c("React").createElement("div",{ref:c("bs_curry")._1(K[0],s),className:"_3xo8",onScroll:c("bs_curry")._1(K[0],o)},c("React").createElement("div",{ref:c("bs_curry")._1(K[0],t),className:"_3xoa"},J(K)))},function(){return[[0],[0],[0],[0]]},[F,E,G,C],function(I,K){return 0},function(K){__p&&__p();var L=K[2],M=K[0];return[[function(){var N=L[1][0];if(N){var O=c("bs_curry")._1(M,o);N[0].addEventListener("scroll",O);return[O]}else return 0},function(N){var O=L[1][0];if(O&&N)return O[0].removeEventListener("scroll",N[0]);else return 0}],0]},r[14]]}var w=c("ReasonReact.bs").wrapReasonForJs(r,function(C){return v(C.isLoading,C.onClick,C.sharedPhotos,C.threadID,C.totalCount,C.viewedPhoto,[])}),x=200,y=48,z=6,A=20,B=70;g.animationDuration=x;g.imagesToLoad=y;g.photosPerRow=z;g.scrollToEdgeTolerance=A;g.headerHeight=B;g.graduallyLoadPhotos=i;g.isScrolledToBottom=j;g.isScrolledToTop=k;g.getScrollHeight=l;g.scrollTo=m;g.autoScrollWhenLoaded=n;g.handleScroll=o;g.didMount=p;g.willUnmount=q;g.component=r;g.setRefChildContainer=s;g.setRefScrollable=t;g.setRefChild=u;g.make=v;g.jsComponent=w}),null);
__d("MessengerSharedPhotosAlbumView.react",["cx","fbt","MessengerSharedPhotosAlbumViewVScrollReact.bs","MessengerPhotoViewCloseLink.react","React","ShimButton.react"],(function a(b,c,d,e,f,g,h,i){"use strict";__p&&__p();var j,k,l=c("MessengerSharedPhotosAlbumViewVScrollReact.bs").jsComponent,m=c("React").PropTypes;j=babelHelpers.inherits(n,c("React").Component);k=j&&j.prototype;function n(){var o,p;for(var q=arguments.length,r=Array(q),s=0;s<q;s++)r[s]=arguments[s];return p=(o=k.constructor).call.apply(o,[this].concat(r)),this.$MessengerSharedPhotosAlbumView2=function(){this.props.onClick(this.props.viewedPhoto)}.bind(this),p}n.prototype.render=function(){return c("React").createElement("div",{className:"_3bl- _5l-3",ref:"window"},this.$MessengerSharedPhotosAlbumView1(),c("React").createElement(l,{isLoading:this.props.isLoading,onClick:this.props.onClick,sharedPhotos:this.props.sharedPhotos,threadID:this.props.threadID,totalCount:this.props.totalCount,viewedPhoto:this.props.viewedPhoto}))};n.prototype.$MessengerSharedPhotosAlbumView1=function(){return c("React").createElement("div",{className:"_3bm0 _5l-3",ref:"header"},c("React").createElement(c("ShimButton.react"),{className:"_3bm2",onClick:this.$MessengerSharedPhotosAlbumView2},c("React").createElement("div",{className:"_3bm3"}),i._("Back to photo")),c("React").createElement("div",{className:"_3bm4"},i._("Shared Photos")),c("React").createElement(c("MessengerPhotoViewCloseLink.react"),{onClick:this.props.onCloseSharedPhotos}))};n.propTypes={onClick:m.func.isRequired,onCloseSharedPhotos:m.func.isRequired,sharedPhotos:m.arrayOf(m.object).isRequired,totalCount:m.number.isRequired,viewedPhoto:m.string.isRequired,threadID:m.string.isRequired,isLoading:m.object.isRequired};f.exports=n}),null);
__d("MessengerSharedPhotosAlbumViewContainer.react",["FluxContainer","MessengerSharedMediaStore","React","MessengerSharedPhotosAlbumView.react"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();var h,i,j=c("React").PropTypes;h=babelHelpers.inherits(k,c("React").PureComponent);i=h&&h.prototype;function k(){var l,m;for(var n=arguments.length,o=Array(n),p=0;p<n;p++)o[p]=arguments[p];return m=(l=i.constructor).call.apply(l,[this].concat(o)),this.state={edges:[],count:0,isLoading:{}},m}k.getStores=function(){return[c("MessengerSharedMediaStore")]};k.calculateState=function(l,m){var n=c("MessengerSharedMediaStore").getState(),o=n.sharedMedia;return{edges:o.get(m.threadID).edges,count:o.get(m.threadID).count,isLoading:n.isLoading.get(m.threadID)}};k.prototype.render=function(){if(this.state.edges.length===0)return null;return c("React").createElement(c("MessengerSharedPhotosAlbumView.react"),{onClick:this.props.onClick,onCloseSharedPhotos:this.props.onCloseSharedPhotos,sharedPhotos:this.state.edges,totalCount:this.state.count,viewedPhoto:this.props.viewedPhoto,threadID:this.props.threadID,isLoading:this.state.isLoading})};k.propTypes={onClick:j.func.isRequired,onCloseSharedPhotos:j.func.isRequired,viewedPhoto:j.string.isRequired,threadID:j.string};f.exports=c("FluxContainer").create(k,{withProps:true})}),null);
__d("MessageShareType",[],(function a(b,c,d,e,f,g){f.exports=Object.freeze({IMAGE:"image",PLATFORM_SHARE_CTA:"platform_share_CTA"})}),null);
__d("InstantGameContextType",[],(function a(b,c,d,e,f,g){f.exports=Object.freeze({THREAD:"THREAD",GROUP:"GROUP",STORY:"STORY",SOLO:"SOLO"})}),null);
__d("MessengerGraphQLTypeaheadAdapter",["MercuryIDs","MercuryParticipantTypes","MercuryTypeaheadConstants","RelayModern","SearchableEntry","MessengerGraphQLTypeaheadAdapter_user.graphql","MessengerGraphQLTypeaheadAdapter_page.graphql","MessengerGraphQLTypeaheadAdapter_group.graphql","MessengerGraphQLTypeaheadAdapter_game.graphql"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();var h=c("RelayModern").graphql;function i(m){return c("MercuryIDs").isValid(m)?m:c("MercuryIDs").getParticipantIDFromUserID(m)}function j(m){var n=m.scim_company_user&&m.scim_company_user.company_title,o=m.is_viewer_coworker?null:m.work_info&&m.work_info.work_community&&m.work_info.work_community.name;if(o&&n)return n+" \u2022 "+o;else if(o)return o;else if(n)return n;return null}function k(m){var n=null;if(m.members&&m.members.edges&&m.members.edges.length>0)n=m.members.edges.map(function(o){return o.node.name}).join(", ");else if(m.is_work_user)n=j(m);return n}var l={convertProfileToEntry:function m(n){if(!n||!n.id||!n.name||n.is_memorialized)return null;var o=c("MercuryParticipantTypes").NON_FRIEND;if(n.is_work_user&&n.is_viewer_coworker)o=c("MercuryParticipantTypes").FB4C;else if(n.is_viewer_friend||n.messenger_contact.is_on_viewer_contact_list||n.is_viewer_coworker&&n.viewer_affinity>0)o=c("MercuryParticipantTypes").FRIEND;var p=k(n);return new(c("SearchableEntry"))({uniqueID:n.id,title:n.name,type:o,subtitle:p,photo:n.profile_picture&&n.profile_picture.uri,uri:n.url,auxiliaryData:{isMessengerUser:n.is_messenger_user,isWorkUser:n.is_work_user},order:-n.viewer_affinity})},convertPageToEntry:function m(n,o){if(!n||!n.id||!n.name)return null;if(n.instant_game_info)return this.convertGameToEntry(n);return new(c("SearchableEntry"))({uniqueID:n.id,title:n.name,type:o,photo:n.profile_picture&&n.profile_picture.uri,uri:n.url,auxiliaryData:{isMessengerUser:n.is_messenger_user,isWorkUser:n.is_work_user},order:0})},convertGameToEntry:function m(n,o){if(!n||!n.id||!n.name||!n.instant_game_info)return null;return new(c("SearchableEntry"))({uniqueID:n.id,title:n.name,type:c("MercuryTypeaheadConstants").GAME_TYPE,photo:n.instant_game_info&&n.instant_game_info.icon_uri,uri:n.instant_game_info&&n.instant_game_info.game_uri,order:0})},convertGroupToEntry:function m(n,o){__p&&__p();if(!n||!n.thread_key||!n.is_group_thread)return null;var p=n.thread_key.thread_fbid;if(!p)return null;var q=n.image&&n.image.uri,r=n.other_participants.edges.map(function(v){return v.node.messaging_actor.name}).join(", "),s=n.name,t=null;if(!s)s=r;else t=r;if(!s)return null;var u={};u.thread={thread_id:p,other_user_fbid:null,image_src:q,participants:n.other_participants.edges.map(function(v){return i(v.node.messaging_actor.id)})};u.participantsToRender=n.other_participants.edges.map(function(v){return{id:i(v.node.messaging_actor.id),is_messenger_user:v.node.messaging_actor.is_messenger_user,is_coworker:v.node.messaging_actor.is_viewer_coworker}});return new(c("SearchableEntry"))({uniqueID:p,order:o,photo:q,title:s,subtitle:t,type:c("MercuryParticipantTypes").THREAD,auxiliaryData:u})},userFragment:function m(){return c("MessengerGraphQLTypeaheadAdapter_user.graphql")},pageFragment:function m(){return c("MessengerGraphQLTypeaheadAdapter_page.graphql")},groupFragment:function m(){return c("MessengerGraphQLTypeaheadAdapter_group.graphql")},gameFragment:function m(){return c("MessengerGraphQLTypeaheadAdapter_game.graphql")}};f.exports=l}),null);
__d("MessengerGroupSearchResultsQueryWebGraphQLQuery",["WebGraphQLQueryBase"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();f.exports=function(){__p&&__p();var h,i;h=babelHelpers.inherits(j,c("WebGraphQLQueryBase"));i=h&&h.prototype;j.__getDocID=function(){"use strict";return"1729903047081547"};j.getQueryID=function(){"use strict";return"1520207274730395"};function j(){"use strict";h.apply(this,arguments)}return j}()}),null);
__d("MessengerNewGroupParticipantSuggestionQueryWebGraphQLQuery",["WebGraphQLQueryBase"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();f.exports=function(){__p&&__p();var h,i;h=babelHelpers.inherits(j,c("WebGraphQLQueryBase"));i=h&&h.prototype;j.__getDocID=function(){"use strict";return"1299865353450925"};j.getQueryID=function(){"use strict";return"157516681700220"};function j(){"use strict";h.apply(this,arguments)}return j}()}),null);
__d("MessengerNewGroupParticipantSuggestionLocalCacheManager",["AsyncRequest","Map","immutable","MercurySingletonProvider","MessengerGraphQLTypeaheadAdapter","SearchSourceCallbackManager","TokenizeUtil","MessengerNewGroupParticipantSuggestionQueryWebGraphQLQuery","idx","emptyFunction"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();function h(k,l){this.entriesPromise=null;this.orderedFriendEntries=null;this.alreadyParticipatingIDs=null;this.shouldRefetch=false;this.cursor=null;this.threadFBID=k;this.alreadyParticipatingIDs=l;this.callbackManager=new(c("SearchSourceCallbackManager"))({parseFn:c("TokenizeUtil").parse,matchFn:c("TokenizeUtil").isQueryMatch,indexFn:null})}h.prototype.onEntriesLoaded=function(k){__p&&__p();if(this.orderedFriendEntries!==null&&!this.shouldRefetch){k(this.orderedFriendEntries);return}if(this.entriesPromise===null||this.shouldRefetch){var l=this.alreadyParticipatingIDs?this.alreadyParticipatingIDs.toArray():null,m=c("MessengerNewGroupParticipantSuggestionQueryWebGraphQLQuery").getURI({original_participant_ids:l,count:50});this.entriesPromise=new(c("AsyncRequest"))(m).setAllowCrossPageTransition(true).exec().then(function(n){return n.getPayload().data}).then(function(n){var o,p=n.viewer.messenger_contextual_ranked_users.edges.map(function(r){return c("MessengerGraphQLTypeaheadAdapter").convertProfileToEntry(r.node)}).filter(function(r){return r!==null});this.callbackManager.addLocalEntries(p);this.orderedFriendEntries=p;var q=(o=n)!=null?(o=o.viewer)!=null?(o=o.messenger_contextual_ranked_users)!=null?(o=o.page_info)!=null?o.has_next_page:o:o:o:o;if(q)this.cursor=n.viewer.messenger_contextual_ranked_users.page_info.end_cursor}.bind(this))}if(this.entriesPromise)this.entriesPromise.done(function(){k(this.orderedFriendEntries);this.loadMoreFriends();this.shouldRefetch=false}.bind(this),c("emptyFunction"))};h.prototype.loadMoreFriends=function(){if(this.cursor==null)return;var k=this.cursor;this.cursor=null;new(c("AsyncRequest"))(c("MessengerNewGroupParticipantSuggestionQueryWebGraphQLQuery").getLegacyURI({cursor:k})).setAllowCrossPageTransition(true).exec().then(function(l){return l.getPayload()}).done(function(l){this.callbackManager.addLocalEntries(l.viewer.messenger_contextual_ranked_users.edges.map(function(m){return c("MessengerGraphQLTypeaheadAdapter").convertProfileToEntry(m.node)}).filter(function(m){return m!==null}))}.bind(this))};h.prototype.search=function(k,l){this.onEntriesLoaded(function(){this.callbackManager.search(k,function(m){l(m,k)})}.bind(this))};h.prototype.participantsSame=function(k){return this.twoIDsListEquals(this.alreadyParticipatingIDs,k)};h.prototype.twoIDsListEquals=function(k,l){if(k){if(l.size!==k.size)return false;return l.isSuperset(k)}return l.size==0};h.prototype.setRefetchAndRefreshData=function(k){this.shouldRefetch=true;this.alreadyParticipatingIDs=k};h.prototype.isBootstrapped=function(k){return this.orderedFriendEntries!==null&&this.participantsSame(k)};i.get=function(){return j.get()};function i(){this.threadFBIDToCacheMap=new(c("Map"))()}i.prototype.onEntriesLoaded=function(k,l,m){var n=this.threadFBIDToCacheMap.get(k);if(!n){n=new h(k,l);this.threadFBIDToCacheMap.set(k,n)}else if(!n.participantsSame(l))n.setRefetchAndRefreshData(l);n.onEntriesLoaded(m)};i.prototype.search=function(k,l,m,n){var o=this.threadFBIDToCacheMap.get(k);if(!o){o=new h(k,l);this.threadFBIDToCacheMap.set(k,o)}else if(!o.participantsSame(l))o.setRefetchAndRefreshData(l);o.search(m,n)};i.prototype.isBootstrapped=function(k,l){if(!k)return false;var m=this.threadFBIDToCacheMap.get(k);if(m)return m.isBootstrapped(l);return false};var j=new(c("MercurySingletonProvider"))(i);f.exports=i}),null);
__d("MessengerPageSearchResultsQueryWebGraphQLQuery",["WebGraphQLQueryBase"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();f.exports=function(){__p&&__p();var h,i;h=babelHelpers.inherits(j,c("WebGraphQLQueryBase"));i=h&&h.prototype;j.__getDocID=function(){"use strict";return"1692140974139092"};j.getQueryID=function(){"use strict";return"533569056993528"};function j(){"use strict";h.apply(this,arguments)}return j}()}),null);
__d("MessengerPaymentFriendsQueryWebGraphQLQuery",["WebGraphQLQueryBase"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();f.exports=function(){__p&&__p();var h,i;h=babelHelpers.inherits(j,c("WebGraphQLQueryBase"));i=h&&h.prototype;j.__getDocID=function(){"use strict";return"1554928974562492"};j.getQueryID=function(){"use strict";return"450815375315963"};function j(){"use strict";h.apply(this,arguments)}return j}()}),null);
__d("MessengerPaymentFriendsLocalCache",["AsyncRequest","MessengerGraphQLTypeaheadAdapter","MessengerPaymentFriendsQueryWebGraphQLQuery","SearchSourceCallbackManager","TokenizeUtil","emptyFunction"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();var h=new(c("SearchSourceCallbackManager"))({parseFn:c("TokenizeUtil").parse,matchFn:c("TokenizeUtil").isQueryMatch,indexFn:null}),i=null,j=null,k=null;function l(){if(!k)return;var n=k;k=null;new(c("AsyncRequest"))(c("MessengerPaymentFriendsQueryWebGraphQLQuery").getLegacyURI({cursor:n})).setAllowCrossPageTransition(true).exec().then(function(o){return o.getPayload()}).done(function(o){h.addLocalEntries(o.viewer.all_friends.edges.map(function(p){return c("MessengerGraphQLTypeaheadAdapter").convertProfileToEntry(p.node)}).filter(function(p){return p!==null}))})}var m={onEntriesLoaded:function n(o){__p&&__p();if(j){o(j);return}if(!i){var p=c("MessengerPaymentFriendsQueryWebGraphQLQuery").getURI({first:50});i=new(c("AsyncRequest"))(p).setAllowCrossPageTransition(true).exec().then(function(q){return q.getPayload()}).then(function(q){var r=q.data.viewer.all_friends.edges.map(function(s){return c("MessengerGraphQLTypeaheadAdapter").convertProfileToEntry(s.node)}).filter(function(s){return s!==null});h.addLocalEntries(r);j=r;k=q.data.viewer.all_friends.page_info.end_cursor})}i.done(function(){o(j)},c("emptyFunction"))},search:function n(o,p){m.onEntriesLoaded(function(){h.search(o,function(q){p(q,o)})})},isBootstrapped:function n(){return j!==null}};f.exports=m}),null);
__d("MessengerProfileSearchResultsQueryWebGraphQLQuery",["WebGraphQLQueryBase"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();f.exports=function(){__p&&__p();var h,i;h=babelHelpers.inherits(j,c("WebGraphQLQueryBase"));i=h&&h.prototype;j.__getDocID=function(){"use strict";return"1515081115212951"};j.getQueryID=function(){"use strict";return"140182203342795"};function j(){"use strict";h.apply(this,arguments)}return j}()}),null);
__d("MessengerRoomAudienceSearchResultsQueryWebGraphQLQuery",["WebGraphQLQueryBase"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();f.exports=function(){__p&&__p();var h,i;h=babelHelpers.inherits(j,c("WebGraphQLQueryBase"));i=h&&h.prototype;j.__getDocID=function(){"use strict";return"1573344152755972"};j.getQueryID=function(){"use strict";return"1951489998502913"};function j(){"use strict";h.apply(this,arguments)}return j}()}),null);
__d("MessengerRoomWithAssocObjectAudienceWebGraphQLQuery",["WebGraphQLQueryBase"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();f.exports=function(){__p&&__p();var h,i;h=babelHelpers.inherits(j,c("WebGraphQLQueryBase"));i=h&&h.prototype;j.__getDocID=function(){"use strict";return"1765914773442635"};j.getQueryID=function(){"use strict";return"194809191264948"};function j(){"use strict";h.apply(this,arguments)}return j}()}),null);
__d("MessengerRoomWithAssocObjectAudienceLocalCacheManager",["AsyncRequest","Map","MercurySingletonProvider","MessengerGraphQLTypeaheadAdapter","SearchSourceCallbackManager","TokenizeUtil","MessengerRoomWithAssocObjectAudienceWebGraphQLQuery","emptyFunction"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();function h(k){this.entriesPromise=null;this.audienceEntries=null;this.threadFBID=k;this.callbackManager=new(c("SearchSourceCallbackManager"))({parseFn:c("TokenizeUtil").parse,matchFn:c("TokenizeUtil").isQueryMatch,indexFn:null})}h.prototype.onEntriesLoaded=function(k){__p&&__p();if(this.audienceEntries!==null){k(this.audienceEntries,true);return}if(this.entriesPromise===null){var l=c("MessengerRoomWithAssocObjectAudienceWebGraphQLQuery").getURI({thread_fbid:this.threadFBID,first:30});this.entriesPromise=new(c("AsyncRequest"))(l).setAllowCrossPageTransition(true).exec().then(function(m){return m.getPayload()}).then(function(m){var n=m.data.message_thread.messaging_audience_list.edges.map(function(o){return c("MessengerGraphQLTypeaheadAdapter").convertProfileToEntry(o.node)}).filter(function(o){return o!==null});this.callbackManager.addLocalEntries(n);this.audienceEntries=n}.bind(this))}if(this.entriesPromise)this.entriesPromise.done(function(){k(this.audienceEntries,true)}.bind(this),c("emptyFunction"))};h.prototype.search=function(k,l){this.onEntriesLoaded(function(){this.callbackManager.search(k,function(m){l(m,k)})}.bind(this))};h.prototype.isBootstrapped=function(){return this.audienceEntries!==null};i.get=function(){return j.get()};function i(){this.threadFBIDToCacheMap=new(c("Map"))()}i.prototype.onEntriesLoaded=function(k,l){var m=this.threadFBIDToCacheMap.get(k);if(!m){m=new h(k);this.threadFBIDToCacheMap.set(k,m)}m.onEntriesLoaded(l)};i.prototype.search=function(k,l,m){var n=this.threadFBIDToCacheMap.get(k);if(!n){n=new h(k);this.threadFBIDToCacheMap.set(k,n)}n.search(l,m)};i.prototype.isBootstrapped=function(k){if(!k)return false;var l=this.threadFBIDToCacheMap.get(k);if(l)return l.isBootstrapped();return false};var j=new(c("MercurySingletonProvider"))(i);f.exports=i}),null);
__d("MessengerFriendsWebGraphQLQuery",["WebGraphQLQueryBase"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();f.exports=function(){__p&&__p();var h,i;h=babelHelpers.inherits(j,c("WebGraphQLQueryBase"));i=h&&h.prototype;j.__getDocID=function(){"use strict";return"1578935848808222"};j.getQueryID=function(){"use strict";return"1623997461012452"};function j(){"use strict";h.apply(this,arguments)}return j}()}),null);
__d("TopMessengerFriendsAndGroupsWebGraphQLQuery",["WebGraphQLQueryBase"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();f.exports=function(){__p&&__p();var h,i;h=babelHelpers.inherits(j,c("WebGraphQLQueryBase"));i=h&&h.prototype;j.__getDocID=function(){"use strict";return"1687108378017403"};j.getQueryID=function(){"use strict";return"178688882896247"};function j(){"use strict";h.apply(this,arguments)}return j}()}),null);
__d("MessengerTypeaheadLocalCache",["AsyncRequest","MessengerConfig","MessengerFriendsWebGraphQLQuery","MessengerGraphQLTypeaheadAdapter","SearchSourceCallbackManager","TokenizeUtil","TopMessengerFriendsAndGroupsWebGraphQLQuery","emptyFunction"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();var h=new(c("SearchSourceCallbackManager"))({parseFn:c("TokenizeUtil").parse,matchFn:c("TokenizeUtil").isQueryMatch,indexFn:null}),i=null,j=null,k=null,l=null;function m(){if(c("MessengerConfig").BootstrapTypeaheadFromBuddylist||!k)return;var o=k;k=null;new(c("AsyncRequest"))(c("MessengerFriendsWebGraphQLQuery").getLegacyURI({cursor:o})).setAllowCrossPageTransition(true).exec().then(function(p){return p.getPayload()}).done(function(p){h.addLocalEntries(p.viewer.all_friends.edges.map(function(q){return c("MessengerGraphQLTypeaheadAdapter").convertProfileToEntry(q.node)}).filter(function(q){return q!==null}))})}var n={onEntriesLoaded:function o(p){__p&&__p();var q;if(i!==null&&j!==null){p(i,j,false);return}if(l===null)(function(){__p&&__p();var r=c("MessengerConfig").BootstrapTypeaheadFromBuddylist,s=c("TopMessengerFriendsAndGroupsWebGraphQLQuery").getLegacyURI({use_buddylist:r,first:100});l=new(c("AsyncRequest"))(s).setAllowCrossPageTransition(true).exec().then(function(t){return t.getPayload()}).then(function(t){__p&&__p();var u=(r?t.viewer.chat_buddylist:t.viewer.all_friends.edges).map(function(w){return c("MessengerGraphQLTypeaheadAdapter").convertProfileToEntry(r?w.represented_profile:w.node)}).filter(function(w){return w!==null}),v=t.viewer.message_threads.edges.map(function(w,x){return c("MessengerGraphQLTypeaheadAdapter").convertGroupToEntry(w.node,x)}).filter(function(w){return w!==null});h.addLocalEntries(u);h.addLocalEntries(v);i=u;j=v;if(t.viewer.all_friends&&t.viewer.all_friends.page_info&&t.viewer.all_friends.page_info.has_next_page)k=t.viewer.all_friends.page_info.end_cursor})})();l.done(function(){p(i,j,true);m()},c("emptyFunction"))},search:function o(p,q){n.onEntriesLoaded(function(){h.search(p,function(r){q(r,p)})})},isBootstrapped:function o(){return i!==null&&j!==null}};f.exports=n}),null);
__d("MessengerTypeaheadResultRoute",["react-relay/classic/query/RelayQL","react-relay/classic/route/RelayRoute"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();var h,i;h=babelHelpers.inherits(j,c("react-relay/classic/route/RelayRoute"));i=h&&h.prototype;function j(){h.apply(this,arguments)}j.routeName="MessengerTypeaheadResultRoute";j.paramDefinition={queryString:{required:true,type:"String"},canViewerSendMoneyFilter:{required:false,type:"Boolean"},localEntryIDs:{required:true,type:"Array"},shouldQueryPages:{required:true,type:"Boolean"},shouldQueryThreadName:{required:true,type:"Boolean"},shouldQueryParticipantIDs:{required:true,type:"Boolean"},shouldQueryParticipantNames:{required:true,type:"Boolean"},shouldQueryVCEndpoint:{required:true,type:"Boolean"},shouldQueryInternalBot:{required:true,type:"Boolean"},shouldQueryRoomsAudience:{required:true,type:"Boolean"},threadFBID:{required:false,type:"String"}};j.queries={profiles:function k(l,m){var n=m.canViewerSendMoneyFilter,o=m.shouldQueryPages,p=m.shouldQueryVCEndpoint,q=m.shouldQueryInternalBot,r=m.shouldQueryRoomsAudience;return function(s){return{calls:[{kind:"Call",metadata:{type:"String!"},name:"query",value:{kind:"CallVariable",callVariableName:"queryString"}}],children:[].concat.apply([],[{fieldName:"id",kind:"Field",metadata:{isGenerated:true,isRequisite:true},type:"ID"},c("react-relay/classic/query/RelayQL").__frag(s)]),fieldName:"entities_named",kind:"Query",metadata:{identifyingArgName:"query",identifyingArgType:"String!"},name:"MessengerTypeaheadResultRoute",type:"SearchableEntitiesQuery"}}(l.getFragment("profiles",{canViewerSendMoneyFilter:n,shouldQueryPages:o,shouldQueryVCEndpoint:p,shouldQueryInternalBot:q,shouldQueryRoomsAudience:r}))},groups:function k(l,m){var n=m.queryString,o=m.localEntryIDs,p=m.shouldQueryThreadName,q=m.shouldQueryParticipantIDs,r=m.shouldQueryParticipantNames;return function(s){return{children:[].concat.apply([],[c("react-relay/classic/query/RelayQL").__frag(s)]),fieldName:"viewer",kind:"Query",metadata:{},name:"MessengerTypeaheadResultRoute",type:"Viewer"}}(l.getFragment("groups",{queryString:n,localEntryIDs:o,shouldQueryThreadName:p,shouldQueryParticipantIDs:q,shouldQueryParticipantNames:r}))},roomAudience:function k(l,m){var n=m.queryString,o=m.shouldQueryRoomsAudience;return function(p){return{calls:[{kind:"Call",metadata:{type:"ID!"},name:"id",value:{kind:"CallVariable",callVariableName:"threadFBID"}}],children:[].concat.apply([],[{fieldName:"id",kind:"Field",metadata:{isGenerated:true,isRequisite:true},type:"ID"},c("react-relay/classic/query/RelayQL").__frag(p)]),fieldName:"message_thread",kind:"Query",metadata:{identifyingArgName:"id",identifyingArgType:"ID!"},name:"MessengerTypeaheadResultRoute",type:"MessageThread"}}(l.getFragment("roomAudience",{queryString:n,shouldQueryRoomsAudience:o}))}};f.exports=j}),null);
__d("MessengerContactAdapters",["immutable","ImmutableObject","MercuryTypeaheadConstants"],(function a(b,c,d,e,f,g){__p&&__p();var h={fromSearchableEntry:function i(j){__p&&__p();var k=j.getType(),l={alias:null,isMessengerUser:null,isWorkUser:null,participants:null,photo:j.getPhoto(),subtitle:j.getSubtitle(),thread:null,title:j.getTitle(),type:k,uid:j.getUniqueID()},m=j.getAuxiliaryData();if(m)if(k===c("MercuryTypeaheadConstants").THREAD_TYPE){l.thread=new(c("ImmutableObject"))(m.thread);l.participants=c("immutable").Map().withMutations(function(n){m.participantsToRender.forEach(function(o){n.set(o.id,o)})})}else{l.isMessengerUser=m.isMessengerUser;l.isWorkUser=m.isWorkUser;l.alias=m.alias}return new(c("ImmutableObject"))(l)},fromMercuryParticipant:function i(j){return new(c("ImmutableObject"))({alias:j.alias,uid:j.id,photo:j.image_src,title:j.name,subtitle:"",type:j.type,isMessengerUser:j.is_messenger_user,isWorkUser:j.is_work_user,isCoworker:j.is_coworker,href:j.href,timezone:j.timezone})}};f.exports=h}),null);
__d("ImageBlockReact.bs",["ReasonReact.bs","ImageBlock.react","bs_js_null_undefined"],(function a(b,c,d,e,f,g){"use strict";function h(i,j,k,l,m){return c("ReasonReact.bs").wrapJsForReason(c("ImageBlock.react"),{className:c("bs_js_null_undefined").from_opt(i),contentClassName:c("bs_js_null_undefined").from_opt(j),imageClassName:c("bs_js_null_undefined").from_opt(k),spacing:c("bs_js_null_undefined").from_opt(l)},m)}g.make=h}),null);
__d("MessengerContactImageReact.bs",["React","Utils.bs","ImageReact.bs","CurrentUser","ReasonReact.bs","bs_js_primitive","bs_js_null_undefined","MessengerContactImage.react","MessengerProfileImageWrapperReact.bs"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();var h=c("ReasonReact.bs").statelessComponent("MessengerContactImageReact");function i(n,o,p,q,r,s,t,u){var v=h.slice();v[9]=function(){var w=+c("CurrentUser").isWorkUser(),x=w!==0&&t&&t[0]===0?1:0;return c("React").createElement("div",{className:c("Utils.bs").$pipe$unknown(n,"")},c("ReasonReact.bs").element(0,0,c("MessengerProfileImageWrapperReact.bs").make([1],o,p,q,0,0,0,[r],[x],0,x,[c("ReasonReact.bs").element(0,0,c("ImageReact.bs").make(0,[""],s,[r],0,[r],0,[]))])))};return v}var j=c("ReasonReact.bs").wrapReasonForJs(h,function(n){return i(c("bs_js_primitive").null_undefined_to_opt(n.className),c("bs_js_primitive").null_undefined_to_opt(n.customBadge),c("Utils.bs").nullUndefinedBooleanToOptionBool(n.isMessengerUser),c("Utils.bs").nullUndefinedBooleanToOptionBool(n.isPartiesUser),n.size,c("bs_js_primitive").null_undefined_to_opt(n.src),c("Utils.bs").nullUndefinedBooleanToOptionBool(n.isCoworker),[])});function k(n,o,p,q,r,s,t,u){return c("ReasonReact.bs").wrapJsForReason(c("MessengerContactImage.react"),{className:c("bs_js_null_undefined").from_opt(n),customBadge:c("bs_js_null_undefined").from_opt(o),isMessengerUser:c("Utils.bs").optionBoolToNullUndefinedBoolean(p),isPartiesUser:c("Utils.bs").optionBoolToNullUndefinedBoolean(q),size:r,src:c("bs_js_null_undefined").from_opt(s),isCoworker:c("Utils.bs").optionBoolToNullUndefinedBoolean(t)},u)}var l=[k],m=c("Utils.bs").$pipe$unknown;g.$pipe$unknown=m;g.component=h;g.make=i;g.jsComponent=j;g.StraightJSComponent=l}),null);
__d("MessengerLocalTimeReact.bs",["cx","fbt","React","bs_js_boolean","ReasonReact.bs","joinClasses","MercuryThreadTimestampReact.bs"],(function a(b,c,d,e,f,g,h,i){"use strict";__p&&__p();var j=c("ReasonReact.bs").statelessComponent("RMessengerLocalTimeReact");function k(n,o,p){__p&&__p();var q=j.slice();q[9]=function(){if(o){var r=o[0]-new Date().getTimezoneOffset()*-60;if(r===0)return null;else{var s=new Date(Date.now()+r*1e3),t=s.getHours(),u=+(t<6||t>22),v=c("joinClasses")("_10rk",n);return c("React").createElement("span",{className:v},c("React").createElement("span",{className:c("bs_js_boolean").to_js_boolean(u)?"_2f3x":""},"(",c("ReasonReact.bs").element(0,0,c("MercuryThreadTimestampReact.bs").make([s.getTime()],0,0,0,[]))," ",i._("local time"),")"))}}else return null};return q}var l=22,m=6;g.component=j;g.nightStartHour=l;g.nightEndHour=m;g.make=k}),null);
__d("MessengerTextWithEntitiesReact.bs",["Utils.bs","ReasonReact.bs","bs_js_null_undefined","MessengerTextWithEntities.react"],(function a(b,c,d,e,f,g){"use strict";function h(i,j,k,l){return c("ReasonReact.bs").wrapJsForReason(c("MessengerTextWithEntities.react"),{renderEmoji:c("Utils.bs").optionBoolToNullUndefinedBoolean(i),renderEmoticons:c("Utils.bs").optionBoolToNullUndefinedBoolean(j),text:c("bs_js_null_undefined").from_opt(k)},l)}g.make=h}),null);
__d("MercuryThreadImageReact.bs",["ReasonReact.bs","bs_js_null_undefined","MercuryThreadImage.react"],(function a(b,c,d,e,f,g){"use strict";function h(i,j,k,l,m){return c("ReasonReact.bs").wrapJsForReason(c("MercuryThreadImage.react"),{size:c("bs_js_null_undefined").from_opt(i),thread:j,useBackground:c("bs_js_null_undefined").from_opt(k),viewer:l},m)}g.make=h}),null);
__d("OptionType.bs",["bs_curry"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();function h(j,k,l){if(j)if(k)return c("bs_curry")._2(l,j[0],k[0]);else return 0;else if(k)return 0;else return 1}function i(j,k){if(j)if(k)return+(j[0]===k[0]);else return 0;else if(k)return 0;else return 1}g.equals=h;g.equalsReference=i}),null);
__d("MessengerThreadImageReact.bs",["cx","React","Utils.bs","MercuryIDs","OptionType.bs","CurrentUser","ReasonReact.bs","bs_js_primitive","MercuryThreadImageReact.bs","MessengerProfileImageWrapperReact.bs"],(function a(b,c,d,e,f,g,h){"use strict";__p&&__p();function i(n,o){__p&&__p();var p=n.other_user_fbid,q=o.size,r=+c("MercuryIDs").isCanonical(n.thread_id);if(p==null)return 0;else if(r!==0)if(q!==0){var s=c("MercuryIDs").getParticipantIDFromUserID(p),t=o.get(s);if(!(t==null)&&!(t==null))return c("Utils.bs").isTruthy(t.is_messenger_user);else return 0}else return 0;else return 0}function j(n){__p&&__p();if(c("CurrentUser").isWorkUser())return+n.every(function(o,p,q){if(o==null)return true;else{var r=o.is_coworker;if(r==null)return true;else return r}});else return 0}var k=c("ReasonReact.bs").statelessComponentWithRetainedProps("MessengerThreadImageReact");function l(n,o,p,q,r,s,t,u){__p&&__p();var v=o?o[0]:0,w=p?p[0]:0,x=k.slice();x[8]=function(y){var z=y[1][3],A=y[0][3];if(A[0]!==z[0]||A[2]!==z[2]||!c("OptionType.bs").equalsReference(A[3],z[3])||A[4]!==z[4]||A[1]!==z[1]||A[5]!==z[5])return 1;else return+(A[6]!==z[6])};x[9]=function(){var y=1-j(r),z={};if(n)z.className=n[0];var A=v&&1-y;return c("React").createElement("div",z,c("ReasonReact.bs").element(0,0,c("MessengerProfileImageWrapperReact.bs").make(0,A!==0?[c("React").createElement("div",{className:"_2xpg"})]:0,[i(s,r)],0,c("bs_js_primitive").null_undefined_to_opt(s.custom_color),c("bs_js_primitive").null_undefined_to_opt(s.thread_type),0,q,[y],0,w&&+c("MercuryIDs").isCanonical(s.thread_id)||y,[c("ReasonReact.bs").element(0,0,c("MercuryThreadImageReact.bs").make(q,s,[true],t,[]))])))};x[11]=[n,v,w,q,i(s,r),s,t];return x}var m=c("ReasonReact.bs").wrapReasonForJs(k,function(n){return l(c("bs_js_primitive").null_undefined_to_opt(n.className),[c("Utils.bs").isTruthy(n.isPresenceForWork)],[c("Utils.bs").isTruthy(n.showBadge)],c("bs_js_primitive").null_undefined_to_opt(n.size),n.participants,n.thread,n.viewer,[])});g.getIsMessengerUser=i;g.areAllCoworkers=j;g.component=k;g.make=l;g.jsComponent=m}),null);
__d("MessengerContactListRowReact.bs",["cx","ix","fbt","bs_array","bs_block","bs_curry","React","Utils.bs","LinkReact.bs","ImageReact.bs","bs_js_boolean","MercuryIDs","ReasonReact.bs","TooltipData","joinClasses","bs_js_primitive","PresenceStatus","ImageBlockReact.bs","AvailableListConstants","MercuryParticipantTypes","MessengerContactActions.bs","MessengerLocalTimeReact.bs","MessengerAdminGroupUtils","MessengerThreadImageReact.bs","MessengerContactImageReact.bs","MessengerTextWithEntitiesReact.bs"],(function aa(ba,a,ca,da,ea,b,fa,c,d){"use strict";__p&&__p();function e(q,r){if(q)return+q[0].contains(r);else return 0}function f(q,r,s){__p&&__p();var t=s.thread,u=s.participants,v=+(s.type===a("MercuryParticipantTypes").THREAD),w=s.photo,x=0,y,z;if(r)if(u==null)x=1;else if(v!==0){y=r[0];z=u;x=2}else x=1;else if(t==null)x=1;else if(u==null)x=1;else if(v!==0){y=t;z=u;x=2}else x=1;switch(x){case 1:if(w==null)return a("React").createElement("div",{className:"_5l39"});else return a("ReasonReact.bs").element(0,0,a("MessengerContactImageReact.bs").make(["_5l39 _5rmm"],0,a("Utils.bs").nullUndefinedBooleanToOptionBool(s.isMessengerUser),0,32,[w],a("Utils.bs").nullUndefinedBooleanToOptionBool(s.isCoworker),[]));case 2:return a("ReasonReact.bs").element(0,0,a("MessengerThreadImageReact.bs").make(["_5l39"],0,0,[32],z,y,q,[]))}}function g(q){var r=q.subtitle,s=0;if(r==null)s=1;else if(r==="")s=1;else return a("React").createElement("div",undefined,a("React").createElement("div",{className:"_3q34"},a("ReasonReact.bs").element(0,0,a("MessengerTextWithEntitiesReact.bs").make([1],[1],[q.title],[]))),a("React").createElement("div",{className:"_3q35"},r));if(s===1)return a("React").createElement("div",{className:"_364g"},q.title,a("ReasonReact.bs").element(0,0,a("MessengerLocalTimeReact.bs").make("_5ywd",a("bs_js_primitive").null_undefined_to_opt(q.timezone),[])))}function h(q,r){__p&&__p();var s=r.type;if(q)if(q[0]!==0)if(s==null)return 0;else if(s===a("MercuryParticipantTypes").FRIEND||s===a("MercuryParticipantTypes").USER){var t=a("MercuryIDs").getUserIDFromParticipantID(r.uid);if(t==null)return 0;else return+(a("PresenceStatus").get(t)===a("AvailableListConstants").ACTIVE)}else return 0;else return 0;else return 0}var i=a("React").createElement("span",{className:"_5rh4"},d._("Added")),j=a("React").createElement("span",{className:"_5rh4"},d._("Invited")),k=a("ReasonReact.bs").element(0,0,a("ImageReact.bs").make(["_1kqm"],0,[c("86852")],0,0,0,0,[]));function l(q,r){r[2][2][0]=q==null?0:[q];return 0}function m(q){__p&&__p();var r=q[3],s=r[1],t=r[2],u=q[2][2][0];if(s)if(s[0]!==0)if(t)if(u){var v=u[0];a("bs_curry")._1(t[0],v);var w=r[3];if(w)a("bs_curry")._1(w[0],v)}return 0}function n(q){__p&&__p();var r=q[1],s=r[3][1],t=q[0][3][2],u=r[2][2][0];if(s)if(s[0]!==0)if(t)if(u){var v=u[0];a("bs_curry")._1(t[0],v);var w=r[3][3];if(w)return a("bs_curry")._1(w[0],v);else return 0}else return 0;else return 0;else return 0;else return 0}function o(){__p&&__p();var q=a("ReasonReact.bs").reducerComponentWithRetainedProps("MessengerContactListRowReact"),r=function r(t,u,v,w,x,y,z,A,B,C,D,E,F,ga,ha,G,H,ia,ja,I,J,K,ka){__p&&__p();var la=G?G[0]:"",L=function L(Q){if(y)return 0;else{Q.stopPropagation();Q.preventDefault();return 0}},M=function M(Q,R){if(Q===a("MessengerContactActions.bs").actions.SELECT)return a("bs_curry")._2(w,u,R);else if(x)return a("bs_curry")._2(x[0],Q,u);else return 0},N=function N(){var Q=a("Utils.bs").isSomeTrue(C);if(Q!==0&&v)return a("bs_curry")._1(v[0],u);else return 0},O=function O(Q){Q.stopPropagation();return M(a("MessengerContactActions.bs").actions.SELECT,Q)},P=function P(Q){__p&&__p();var R=Q[4],S=Q[2],T;if(H){var U=H[0].get(S[0].uid);T=U==null?[null,1]:[U,1]}else T=[null,0];if(e(ha,S[0].uid))return i;else if(e(D,S[0].uid))return j;else if(e(ia,S[0].uid))return k;else if(T[1])return T[0];else if(h(ja,S[0]))return a("React").createElement("div",{className:"_jg2"});else{var V=z?a("Utils.bs").arrayCompact(z[0]):undefined,W=S[0].thread,X,Y=0,Z;if(I){Z=I[0];Y=1}else if(W==null)X=0;else{Z=W;Y=1}if(Y===1){var ma=+a("MessengerAdminGroupUtils").isAdmin(V,S[0].uid);X=+a("MessengerAdminGroupUtils").isOwner(a("bs_js_boolean").to_js_boolean(ma),Z)}var $=X!==0?a("React").createElement("span",{className:"_5qsj"},d._("Admin")):null;if(y)return a("React").createElement("div",undefined,$,a("React").createElement(y[0],{className:"_rwo",adminIds:V,contact:S[0],extrasEnabled:a("bs_js_boolean").to_js_boolean(B),isOpen:a("bs_js_boolean").to_js_boolean(S[1]),onAction:M,onToggle:function na(oa){return a("bs_curry")._1(R,[oa])},viewer:K}));else return $}};return[q[0],q[1],q[2],function(Q){var R=Q[2],S=+(u===Q[3][0]);return[S!==0?R[0]:a("bs_curry")._1(t,u),R[1],R[2]]},m,n,q[6],q[7],q[8],function(Q){var R=Q[2],S=a("joinClasses")(la,"_5l37"+(a("Utils.bs").optionBoolToBoolean(E)?" _1k1p":"")+(a("bs_js_boolean").to_js_boolean(R[1])?" _rwn":"")),T=y?-1:0,U={"aria-hidden":a("Utils.bs").optionBoolToNullUndefinedBoolean(E)},V=J?Object.assign(U,a("TooltipData").propsFor(J[0],"left")):{},W=a("ReasonReact.bs").element(0,0,a("LinkReact.bs").make(0,["_5f0v"],0,0,0,0,0,0,[O],[L],[N],0,0,[T],0,0,a("ReasonReact.bs").element(0,0,a("ImageBlockReact.bs").make(0,["_5l38"],0,["medium"],[f(K,I,R[0]),g(R[0]),P(Q)])))),X=a("Utils.bs").isSomeTrue(A);if(X!==0)return a("React").createElement("li",{ref:a("bs_curry")._1(Q[0],l),className:S},W);else return a("React").cloneElement(a("React").createElement("li",{ref:a("bs_curry")._1(Q[0],l),className:S,role:"option"}),V,W)},function(){return[a("bs_curry")._1(t,u),0,[0]]},[u,E,ga,F],function(Q,R){return a("bs_block").__(0,[[R[0],Q[0],R[2]]])},q[13],q[14]]},s=a("ReasonReact.bs").wrapReasonForJs(q,function(t){var u=t.adminIds;return r(t.contactAdapter,t.rawContact,a("bs_js_primitive").null_undefined_to_opt(t.onHighlight),t.onSelect,a("bs_js_primitive").null_undefined_to_opt(t.onAction),a("bs_js_primitive").null_undefined_to_opt(t.actionsClass),u==null?0:[a("bs_array").map(function(v){if(v==null)return 0;else return[v]},u)],a("Utils.bs").nullUndefinedBooleanToOptionBool(t.disableRole),+t.extraActionsEnabled,a("Utils.bs").nullUndefinedBooleanToOptionBool(t.hasHoverState),a("bs_js_primitive").null_undefined_to_opt(t.invitedEntryIDs),a("Utils.bs").nullUndefinedBooleanToOptionBool(t.isHighlighted),a("bs_js_primitive").null_undefined_to_opt(t.onRenderHighlight),a("bs_js_primitive").null_undefined_to_opt(t.onScrollIntoView),a("bs_js_primitive").null_undefined_to_opt(t.originalEntryIDs),a("bs_js_primitive").null_undefined_to_opt(t.rowClassName),a("bs_js_primitive").null_undefined_to_opt(t.rowElements),a("bs_js_primitive").null_undefined_to_opt(t.selectedEntryIDs),a("Utils.bs").nullUndefinedBooleanToOptionBool(t.showPresence),a("bs_js_primitive").null_undefined_to_opt(t.thread),a("bs_js_primitive").null_undefined_to_opt(t.tooltipContent),t.viewer,[])});return[s,r]}var p=32;b.imageSize=p;b.idsContain=e;b.renderContactImage=f;b.renderContactText=g;b.getPresenceStatus=h;b.isOriginal=i;b.isInvited=j;b.isSelected=k;b.setThisRef=l;b.didMount=m;b.didUpdate=n;b.createMake=o}),null);
__d("MessengerContactList.react",["cx","fbt","MessengerContactListRowReact.bs","ImageBlock.react","immutable","ImmutableObject","MessengerSpinner.react","React","joinClasses"],(function a(b,c,d,e,f,g,h,i){"use strict";__p&&__p();var j,k,l=c("MessengerContactListRowReact.bs").createMake(),m=l[0],n=l[1],o=c("React").PropTypes;j=babelHelpers.inherits(p,c("React").PureComponent);k=j&&j.prototype;function p(){var q,r;for(var s=arguments.length,t=Array(s),u=0;u<s;u++)t[u]=arguments[u];return r=(q=k.constructor).call.apply(q,[this].concat(t)),this.$MessengerContactList1=function(v,w){return c("React").createElement("div",{key:w,className:"_29hk"},this.$MessengerContactList4(w),c("React").createElement("ul",{id:this.props.controlleeID,role:this.props.disableRole?undefined:"listbox",className:"_29hl"},v.map(function(x,y){var z=y===0?c("joinClasses")(this.props.rowClassName,"_3h3c"):this.props.rowClassName;return c("React").createElement(m,{actionsClass:this.props.actionsClass,adminIds:this.props.adminIds,contactAdapter:this.props.contactAdapter,disableRole:this.props.disableRole,extraActionsEnabled:!!this.props.extraActionsEnabled,hasHoverState:this.props.hasHoverState,invitedEntryIDs:this.props.invitedEntryIDs,isHighlighted:this.props.highlightedEntry&&this.props.highlightedEntry.getUniqueID()===x.getUniqueID(),key:x.id||x.getUniqueID(),onAction:this.props.onAction,onHighlight:this.props.onHighlight,onRenderHighlight:this.props.onRenderHighlight,onScrollIntoView:this.props.onScrollIntoView,onSelect:this.props.onSelect,originalEntryIDs:this.props.originalEntryIDs,rawContact:x,rowClassName:z,rowElements:this.props.rowElements,selectedEntryIDs:this.props.selectedEntryIDs,showPresence:this.props.showPresence,thread:this.props.thread,tooltipContent:x.getAuxiliaryData&&x.getAuxiliaryData().tooltipContent,viewer:this.props.viewer})}.bind(this))))}.bind(this),r}p.prototype.render=function(){return c("React").createElement("div",{className:this.props.className},this.props.listSections.map(this.$MessengerContactList1).toArray(),this.$MessengerContactList2(),this.$MessengerContactList3())};p.prototype.$MessengerContactList4=function(q){if(!q)return null;return c("React").createElement("div",{className:"_225b"},q)};p.prototype.$MessengerContactList2=function(){if(!this.props.isLoading)return null;return c("React").createElement(c("ImageBlock.react"),{className:"_225c",spacing:"medium"},c("React").createElement(c("MessengerSpinner.react"),{className:"_2i59",color:"grey"}),c("React").createElement("div",{className:"_4g0h"},i._("Searching...")))};p.prototype.$MessengerContactList3=function(){if(this.props.isLoading||this.props.listSections.size>0||!this.props.queryString||this.props.queryString.length===0)return null;return c("React").createElement("div",{className:"_3xcx"},i._("No results found"))};p.propTypes={actionsClass:o.func,adminIds:o.arrayOf(o.string),controlleeID:o.string,contactAdapter:o.func.isRequired,disableRole:o.bool,extraActionsEnabled:o.bool,hasHoverState:o.bool,highlightedEntry:o.object,invitedEntryIDs:o.instanceOf(c("immutable").Set),isLoading:o.bool,listSections:o.instanceOf(c("immutable").OrderedMap).isRequired,onAction:o.func,onHighlight:o.func,onRenderHighlight:o.func,onScrollIntoView:o.func,onSelect:o.func.isRequired,originalEntryIDs:o.instanceOf(c("immutable").Set),queryString:o.string,rowClassName:o.string,rowElements:o.instanceOf(c("immutable").Map),selectedEntryIDs:o.instanceOf(c("immutable").Set),showPresence:o.bool,thread:o.instanceOf(c("ImmutableObject")),viewer:o.string.isRequired};f.exports=p}),null);
__d("MessengerGraphQLTypeaheadHighlighter",["Keys","MercuryTypeaheadConstants","MessengerTypeaheadUtils"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();var h={getNextHighlightedEntry:function i(j,k,l,m){__p&&__p();var n=[];c("MessengerTypeaheadUtils").getEntryOrder(l).forEach(function(r){return n.push.apply(n,k.filter(function(s){return c("MessengerTypeaheadUtils").areSectionsEqual(s.getType(),r)}))});if(!m){if(n.length===0)return null;if(j===c("Keys").DOWN){var o=n[0];if(o.getType()===c("MercuryTypeaheadConstants").SEARCH_TYPE&&n.length>1)return n[1];return o}if(j===c("Keys").UP)return n[n.length-1];return null}var p=m.getUniqueID(),q=n.findIndex(function(r){return r.getUniqueID()===p});if(q===-1)return null;if(j===c("Keys").DOWN){q+=1;if(q>=n.length)q=0}else if(j===c("Keys").UP){q-=1;if(q<0)q=n.length-1}return n[q]}};f.exports=h}),null);
__d("MessengerTypeaheadResultView.react",["cx","immutable","Keys","MercuryConfig","MessengerContactAdapters","MessengerContactList.react","MessengerGraphQLTypeaheadHighlighter","MessengerSearchFunnelLogger","MessengerTypeaheadUtils","MessengerGraphQLTypeaheadAdapter","MercuryParticipantTypes","MercuryTypeaheadConstants","React","RelayModern","SearchableEntry","idx","gkx","joinClasses","wrapNullableForReact","MessengerTypeaheadResultView_profiles.graphql","MessengerTypeaheadResultView_groups.graphql","MessengerTypeaheadResultView_roomAudience.graphql"],(function a(b,c,d,e,f,g,h){"use strict";__p&&__p();var i,j,k=c("RelayModern").createFragmentContainer,l=c("RelayModern").graphql,m=50,n=c("MercuryConfig").SearchMorePeople?c("MercuryConfig").SearchMorePeople:c("MercuryTypeaheadConstants").COMPOSER_NON_FRIENDS_MAX,o=c("gkx")("AT5THIpM4AckuNbWpijh61vC-OipSixPqueb6Cl8xvxjybMRxdw8oN5RZdz305TVhpkiPlzS7Sc53JEnbqyboPGn"),p=c("React").PropTypes;i=babelHelpers.inherits(q,c("React").Component);j=i&&i.prototype;function q(){__p&&__p();var r,s;for(var t=arguments.length,u=Array(t),v=0;v<t;v++)u[v]=arguments[v];return s=(r=j.constructor).call.apply(r,[this].concat(u)),this.$MessengerTypeaheadResultView1=null,this.onKeyDown=function(w,x){if(w===c("Keys").RETURN){this.props.onSelectHighlighted(x);return}if(!this.$MessengerTypeaheadResultView1)return;var y=c("MessengerGraphQLTypeaheadHighlighter").getNextHighlightedEntry(w,this.$MessengerTypeaheadResultView1,this.props.queryString,this.props.highlightedEntry);this.props.onNextHighlighted(y)}.bind(this),this.$MessengerTypeaheadResultView3=function(w){this.props.onNextHighlighted(w)}.bind(this),s}q.prototype.componentWillMount=function(){this.$MessengerTypeaheadResultView1=this.$MessengerTypeaheadResultView2(this.props)};q.prototype.componentDidMount=function(){this.props.onMount(this.onKeyDown)};q.prototype.componentWillUpdate=function(r){this.$MessengerTypeaheadResultView1=this.$MessengerTypeaheadResultView2(r)};q.prototype.componentWillUnmount=function(){this.props.onUnmount()};q.prototype.render=function(){var r=this.$MessengerTypeaheadResultView1;if(!r)return null;return c("React").createElement(c("MessengerContactList.react"),{controlleeID:this.props.controlleeID,className:c("joinClasses")(this.props.className,"_4p-s"),contactAdapter:c("MessengerContactAdapters").fromSearchableEntry,hasHoverState:this.props.hasHoverState,highlightedEntry:c("wrapNullableForReact")(this.props.highlightedEntry),isLoading:false,listSections:c("MessengerTypeaheadUtils").buildListSections(r,this.props.queryString),onHighlight:this.$MessengerTypeaheadResultView3,onScrollIntoView:this.props.onScrollIntoView,onSelect:this.props.onSelect,originalEntryIDs:this.props.originalEntryIDs,queryString:this.props.queryString,selectedEntryIDs:this.props.selectedEntryIDs,showPresence:false,viewer:this.props.viewer})};q.prototype.$MessengerTypeaheadResultView2=function(r){var s=r.localEntries,t={};s.forEach(function(w){t[w.getUniqueID()]=true});var u=c("MessengerTypeaheadUtils").sortEntries(this.$MessengerTypeaheadResultView4(r,t),r.queryString),v=s.concat(u).filter(function(w){return!r.selectedEntryIDs.contains(w.getUniqueID())}).slice(0,m);c("MessengerSearchFunnelLogger").logUpdateQuery("WWW_MESSENGER_SEARCH_SESSION_FUNNEL","fetched_state_impression_list",r.queryString,v.map(function(w){return w.getUniqueID()}));return v};q.prototype.$MessengerTypeaheadResultView4=function(r,s){__p&&__p();var t=r.serverGroups;if(o){t=t.concat(r.serverProfiles.filter(function(D){return D&&!s[D.getUniqueID()]}));if(r.serverPages.pages){t=t.concat(r.serverPages.pages.filter(function(D){return D&&!s[D.getUniqueID()]}).slice(0,c("MercuryTypeaheadConstants").COMPOSER_PAGES_MAX));t=t.concat(r.serverPages.bots.filter(function(D){return D&&!s[D.getUniqueID()]}));t=t.concat(r.serverPages.meeting_rooms.filter(function(D){return D&&!s[D.getUniqueID()]}))}}if(r.profiles){var u,v=(u=r)!=null?(u=u.profiles)!=null?(u=u.user_results)!=null?u.edges:u:u:u;if(v){t=v.map(function(L){return c("MessengerGraphQLTypeaheadAdapter").convertProfileToEntry(L.node)});var w=[],x=[],y=[];for(var z=t,A=Array.isArray(z),B=0,z=A?z:z[typeof Symbol==="function"?Symbol.iterator:"@@iterator"]();;){var C;if(A){if(B>=z.length)break;C=z[B++]}else{B=z.next();if(B.done)break;C=B.value}var D=C;if(!D||s[D.getUniqueID()])continue;if(D.getType()===c("MercuryParticipantTypes").FRIEND&&w.length<c("MercuryTypeaheadConstants").COMPOSER_FRIENDS_MAX)w.push(D);else if(D.getType()===c("MercuryParticipantTypes").FB4C&&x.length<c("MercuryTypeaheadConstants").COMPOSER_FB4C_MAX)x.push(D);else if(D.getType()===c("MercuryParticipantTypes").NON_FRIEND&&y.length<n)y.push(D)}t=w.concat(x).concat(y)}}else if(r.roomAudience){var E,F=(E=r)!=null?(E=E.roomAudience)!=null?(E=E.user_results)!=null?E.edges:E:E:E;if(F)t=t.concat(F.map(function(L){return c("MessengerGraphQLTypeaheadAdapter").convertProfileToEntry(L.node)}))}if(r.profiles&&r.profiles.page_results)t=t.concat(r.profiles.page_results.edges.map(function(L){return c("MessengerGraphQLTypeaheadAdapter").convertPageToEntry(L.node,this.$MessengerTypeaheadResultView5(L.node))}.bind(this)).filter(function(D){return D&&!s[D.getUniqueID()]}).slice(0,c("MercuryTypeaheadConstants").COMPOSER_PAGES_MAX));var G=[],H=[];if(r.groups&&r.groups.threads_matching_name)H=H.concat(r.groups.threads_matching_name.edges);if(r.groups&&r.groups.threads_matching_participant_ids)H=H.concat(r.groups.threads_matching_participant_ids.edges);if(r.groups&&r.groups.threads_matching_participant_names)H=H.concat(r.groups.threads_matching_participant_names.edges);for(var I=0;I<H.length;I++){var J=H[I],K=c("MessengerGraphQLTypeaheadAdapter").convertGroupToEntry(J.node,I);if(!K||s[K.getUniqueID()])continue;G.push(K);s[K.getUniqueID()]=true}t=t.concat(G);if(r.profiles&&r.profiles.vc_results)t=t.concat(r.profiles.vc_results.edges.map(function(L){return c("MessengerGraphQLTypeaheadAdapter").convertPageToEntry(L.node,c("MercuryTypeaheadConstants").MEETING_ROOM_PAGE_TYPE)}));if(r.profiles&&r.profiles.internal_bot_results)t=t.concat(r.profiles.internal_bot_results.edges.map(function(L){return c("MessengerGraphQLTypeaheadAdapter").convertPageToEntry(L.node,c("MercuryTypeaheadConstants").INTERNAL_BOT_PAGE_TYPE)}));return t};q.prototype.$MessengerTypeaheadResultView5=function(r){if(!r||!r.category_type)return c("MercuryParticipantTypes").PAGE;if(r.category_type===c("MercuryTypeaheadConstants").WORKPLACE_BOT_CATEGORY_TYPE)return c("MercuryTypeaheadConstants").INTERNAL_BOT_PAGE_TYPE;return c("MercuryTypeaheadConstants").PAGE_TYPE};q.propTypes={controlleeID:p.string.isRequired,canViewerSendMoneyFilter:p.bool,className:p.string.isRequired,localEntries:p.arrayOf(p.instanceOf(c("SearchableEntry"))).isRequired,localEntryIDs:p.arrayOf(p.string.isRequired).isRequired,hasHoverState:p.bool.isRequired,highlightedEntry:p.object,onMount:p.func.isRequired,onNextHighlighted:p.func.isRequired,onScrollIntoView:p.func.isRequired,onSelect:p.func.isRequired,onSelectHighlighted:p.func.isRequired,onUnmount:p.func.isRequired,originalEntryIDs:p.instanceOf(c("immutable").Set).isRequired,queryString:p.string.isRequired,selectedEntryIDs:p.instanceOf(c("immutable").Set).isRequired,serverGroups:p.arrayOf(p.instanceOf(c("SearchableEntry"))).isRequired,serverPages:p.object.isRequired,serverProfiles:p.arrayOf(p.instanceOf(c("SearchableEntry"))).isRequired,shouldQueryInternalBot:p.bool.isRequired,shouldQueryPages:p.bool.isRequired,shouldQueryVCEndpoint:p.bool.isRequired,viewer:p.string.isRequired};q.defaultProps={controlleeID:"",className:""};f.exports=o?q:k(q,{profiles:function r(){return c("MessengerTypeaheadResultView_profiles.graphql")},groups:function r(){return c("MessengerTypeaheadResultView_groups.graphql")},roomAudience:function r(){return c("MessengerTypeaheadResultView_roomAudience.graphql")}})}),null);
__d("MessengerTypeaheadTopFriendsView.react",["cx","immutable","Keys","MessengerContactAdapters","MessengerContactList.react","MessengerGraphQLTypeaheadHighlighter","MessengerTypeaheadUtils","React","joinClasses","wrapNullableForReact"],(function a(b,c,d,e,f,g,h){"use strict";__p&&__p();var i,j,k=c("React").PropTypes;i=babelHelpers.inherits(l,c("React").Component);j=i&&i.prototype;function l(){__p&&__p();var m,n;for(var o=arguments.length,p=Array(o),q=0;q<o;q++)p[q]=arguments[q];return n=(m=j.constructor).call.apply(m,[this].concat(p)),this.onKeyDown=function(r){if(r===c("Keys").RETURN){this.props.onSelectHighlighted();return}var s=c("MessengerGraphQLTypeaheadHighlighter").getNextHighlightedEntry(r,this.props.entries.toArray(),this.props.queryString,this.props.highlightedEntry);this.props.onNextHighlighted(s)}.bind(this),this.$MessengerTypeaheadTopFriendsView1=function(r){this.props.onNextHighlighted(r)}.bind(this),n}l.prototype.componentWillMount=function(){if(this.props.hasHoverState)if(this.props.entries.size>0)this.props.onNextHighlighted(this.props.entries.first())};l.prototype.componentDidMount=function(){this.props.onMount(this.onKeyDown)};l.prototype.componentWillUnmount=function(){this.props.onUnmount()};l.prototype.render=function(){return c("React").createElement(c("MessengerContactList.react"),{controlleeID:this.props.controlleeID,className:c("joinClasses")(this.props.className,"_4p-s"),contactAdapter:c("MessengerContactAdapters").fromSearchableEntry,hasHoverState:this.props.hasHoverState,highlightedEntry:c("wrapNullableForReact")(this.props.highlightedEntry),isLoading:!!this.props.queryString,listSections:c("MessengerTypeaheadUtils").buildListSections(this.props.entries.toArray(),this.props.queryString),onHighlight:this.$MessengerTypeaheadTopFriendsView1,onScrollIntoView:this.props.onScrollIntoView,onSelect:this.props.onSelect,originalEntryIDs:this.props.originalEntryIDs,queryString:this.props.queryString,selectedEntryIDs:this.props.selectedEntryIDs,showPresence:false,viewer:this.props.viewer})};l.propTypes={controlleeID:k.string.isRequired,className:k.string.isRequired,entries:k.instanceOf(c("immutable").List).isRequired,hasHoverState:k.bool.isRequired,highlightedEntry:k.object,onNextHighlighted:k.func.isRequired,onMount:k.func.isRequired,onScrollIntoView:k.func.isRequired,onSelect:k.func.isRequired,onSelectHighlighted:k.func.isRequired,onUnmount:k.func.isRequired,originalEntryIDs:k.instanceOf(c("immutable").Set).isRequired,queryString:k.string.isRequired,selectedEntryIDs:k.instanceOf(c("immutable").Set).isRequired,viewer:k.string.isRequired};l.defaultProps={controlleeID:"",className:""};f.exports=l}),null);
__d("MessengerGraphQLTypeaheadView.react",["cx","fbt","Promise","CurrentUser","ImageBlock.react","immutable","MercuryConfig","MercuryParticipantTypes","MercuryTypeaheadConstants","MessengerGroupSearchResultsQueryWebGraphQLQuery","MessengerGraphQLTypeaheadAdapter","MessengerPaymentFriendsLocalCache","MessengerPageSearchResultsQueryWebGraphQLQuery","MessengerNewGroupParticipantSuggestionLocalCacheManager","MessengerProfileSearchResultsQueryWebGraphQLQuery","MessengerRoomAudienceSearchResultsQueryWebGraphQLQuery","MessengerRoomPrivacyMode","MessengerRoomWithAssocObjectAudienceLocalCacheManager","MessengerSearchFunnelLogger","MessengerSpinner.react","MessengerTypeaheadLocalCache","MessengerTypeaheadResultRoute","MessengerTypeaheadResultView.react","MessengerTypeaheadTopFriendsView.react","MessengerTypeaheadUtils","React","RelayFBEnvironment","WebGraphQL","RelayModern","createCancelableFunction","debounce","PromiseUtil","compactArray","idx","gkx","MessengerGraphQLTypeaheadViewQuery.graphql"],(function a(b,c,d,e,f,g,h,i){"use strict";__p&&__p();var j,k,l,m=c("RelayModern").graphql,n=c("RelayModern").QueryRenderer,o=c("React").PropTypes,p="WWW_MESSENGER_SEARCH_SESSION_FUNNEL",q=5,r=100,s=c("MercuryConfig").SearchMorePeople?c("MercuryConfig").SearchMorePeople:c("MercuryTypeaheadConstants").COMPOSER_NON_FRIENDS_MAX,t=c("gkx")("AT5THIpM4AckuNbWpijh61vC-OipSixPqueb6Cl8xvxjybMRxdw8oN5RZdz305TVhpkiPlzS7Sc53JEnbqyboPGn"),u=3;k=babelHelpers.inherits(v,c("React").Component);l=k&&k.prototype;function v(){__p&&__p();var w,x;for(var y=arguments.length,z=Array(y),A=0;A<y;A++)z[A]=arguments[A];return x=(w=l.constructor).call.apply(w,[this].concat(z)),this.state={route:null,localEntries:c("immutable").List(),queryCompleteStatus:{usersGroups:!t,pages:!t},serverGroups:[],serverPages:{},serverProfiles:[],highlightedEntry:null},this.$MessengerGraphQLTypeaheadView1=null,this.$MessengerGraphQLTypeaheadView2=null,this.$MessengerGraphQLTypeaheadView3=null,this.$MessengerGraphQLTypeaheadView4=0,this.$MessengerGraphQLTypeaheadView5=0,this.$MessengerGraphQLTypeaheadView6=null,this.$MessengerGraphQLTypeaheadView7=true,this.$MessengerGraphQLTypeaheadView8=c("MessengerRoomWithAssocObjectAudienceLocalCacheManager").get(),this.$MessengerGraphQLTypeaheadView9=c("MessengerNewGroupParticipantSuggestionLocalCacheManager").get(),this.$MessengerGraphQLTypeaheadView12=function(B,C,D,E){if(this.$MessengerGraphQLTypeaheadView7){c("MessengerSearchFunnelLogger").logStartQuery(p,B);this.setState({serverProfiles:[],serverGroups:[],serverPages:{}})}this.$MessengerGraphQLTypeaheadView24(B,C,D);this.$MessengerGraphQLTypeaheadView25(B);this.$MessengerGraphQLTypeaheadView26(B,C,E)}.bind(this),this.$MessengerGraphQLTypeaheadView16=function(B){this.$MessengerGraphQLTypeaheadView6=B}.bind(this),this.$MessengerGraphQLTypeaheadView19=function(){this.$MessengerGraphQLTypeaheadView6=null}.bind(this),this.$MessengerGraphQLTypeaheadView17=function(B){this.setState({highlightedEntry:B})}.bind(this),this.$MessengerGraphQLTypeaheadView18=function(B){if(this.state.highlightedEntry)this.props.onSelect(this.state.highlightedEntry,B)}.bind(this),x}v.prototype.componentDidMount=function(){this.$MessengerGraphQLTypeaheadView10();this.$MessengerGraphQLTypeaheadView2=c("debounce")(function(){if(!t&&this.$MessengerGraphQLTypeaheadView7){var w=this.$MessengerGraphQLTypeaheadView11(),x=new(c("MessengerTypeaheadResultRoute"))(w);c("MessengerSearchFunnelLogger").logStartQuery(p,w.queryString);this.setState({route:x})}}.bind(this),150,this,true);if(t)this.$MessengerGraphQLTypeaheadView3=c("debounce")(this.$MessengerGraphQLTypeaheadView12,150,this,true)};v.prototype.componentWillReceiveProps=function(w){__p&&__p();this.setState({highlightedEntry:null});if(!w.queryString)this.$MessengerGraphQLTypeaheadView10();else if(w.queryString!==this.props.queryString){this.setState({queryCompleteStatus:{userGroupQueryFinished:false,pagesQueryFinished:false}});this.$MessengerGraphQLTypeaheadView2&&this.$MessengerGraphQLTypeaheadView2();var x=w.roomAssociatedObject&&w.roomAssociatedObject.privacy_mode;if(this.$MessengerGraphQLTypeaheadView3)this.$MessengerGraphQLTypeaheadView3(w.queryString,c("MercuryConfig").MaxThreadResults,w.excludeGroups,x===c("MessengerRoomPrivacyMode").WHITELISTED_MODE?w.threadFBID:null);if(x===c("MessengerRoomPrivacyMode").WHITELISTED_MODE){this.$MessengerGraphQLTypeaheadView13(w);return}if(this.props.canViewerSendMoneyFilter){this.$MessengerGraphQLTypeaheadView14(w);return}if(this.props.includeExistingParticipantIDs){this.$MessengerGraphQLTypeaheadView15(w);return}c("MessengerTypeaheadLocalCache").search(w.queryString,function(y,z){__p&&__p();if(this.$MessengerGraphQLTypeaheadView7)if(z===w.queryString){var A=c("MessengerTypeaheadUtils").sortEntries(y,z).slice(0,this.props.maxEntries),B=this.props.enableMessageSearch?c("MessengerTypeaheadUtils").getMessageSearchEntry(z):null;if(B)A.unshift(B);var C=c("immutable").List(A).filter(function(D){if(this.props.excludeGroups&&D.getType()===c("MercuryParticipantTypes").THREAD)return false;if(this.props.excludePages&&D.getType()===c("MercuryParticipantTypes").PAGE)return false;return true}.bind(this));this.setState({localEntries:C})}}.bind(this))}};v.prototype.shouldComponentUpdate=function(w,x){return w.queryString!==this.props.queryString||w.isFocused!==this.props.isFocused||w.excludeGroups!==this.props.excludeGroups||w.excludePages!==this.props.excludePages||x.localEntries!==this.state.localEntries||x.queryCompleteStatus!==this.state.queryCompleteStatus||x.route!==this.state.route||x.highlightedEntry!==this.state.highlightedEntry};v.prototype.componentWillUnmount=function(){if(this.$MessengerGraphQLTypeaheadView1)this.$MessengerGraphQLTypeaheadView1.cancel();if(this.$MessengerGraphQLTypeaheadView3)this.$MessengerGraphQLTypeaheadView3.reset();this.$MessengerGraphQLTypeaheadView7=false};v.prototype.render=function(){__p&&__p();if(!this.props.isFocused&&!this.props.queryString||!c("MessengerTypeaheadLocalCache").isBootstrapped()&&!this.$MessengerGraphQLTypeaheadView8.isBootstrapped(this.props.threadFBID)&&!c("MessengerPaymentFriendsLocalCache").isBootstrapped()&&!this.$MessengerGraphQLTypeaheadView9.isBootstrapped(this.props.threadFBID,this.props.originalEntryIDs))return null;if(!this.props.queryString||!t&&!this.state.route){c("MessengerSearchFunnelLogger").logUpdateQuery(p,"null_state_impression","",this.state.localEntries.toArray().map(function(y){return y.getUniqueID()}));return c("React").createElement(c("MessengerTypeaheadTopFriendsView.react"),{className:this.props.typeaheadViewClassName,entries:this.state.localEntries,hasHoverState:this.props.hasHoverState,highlightedEntry:this.state.highlightedEntry,onMount:this.$MessengerGraphQLTypeaheadView16,onNextHighlighted:this.$MessengerGraphQLTypeaheadView17,onScrollIntoView:this.props.onScrollIntoView,onSelect:this.props.onSelect,onSelectHighlighted:this.$MessengerGraphQLTypeaheadView18,onUnmount:this.$MessengerGraphQLTypeaheadView19,originalEntryIDs:this.props.originalEntryIDs,queryString:this.props.queryString,selectedEntryIDs:this.props.selectedEntryIDs,viewer:this.props.viewer})}if(t){var w=this.state.queryCompleteStatus.usersGroups||this.state.queryCompleteStatus.pages,x=this.state.queryCompleteStatus.usersGroups&&(this.props.excludePages||this.state.queryCompleteStatus.pages);return c("React").createElement("div",null,w?this.$MessengerGraphQLTypeaheadView20():this.$MessengerGraphQLTypeaheadView21(),w&&!x?this.$MessengerGraphQLTypeaheadView22():null)}return c("React").createElement(n,{environment:c("RelayFBEnvironment"),query:j||(j=function j(){return c("MessengerGraphQLTypeaheadViewQuery.graphql")}),render:function(y){var z=y.error,A=y.props;if(z)throw z;else if(A)return this.$MessengerGraphQLTypeaheadView20(A);return this.$MessengerGraphQLTypeaheadView21()}.bind(this),variables:this.$MessengerGraphQLTypeaheadView11()})};v.prototype.$MessengerGraphQLTypeaheadView21=function(){var w=this.state.localEntries.slice(0,q);return c("React").createElement(c("MessengerTypeaheadTopFriendsView.react"),{className:this.props.typeaheadViewClassName,entries:this.$MessengerGraphQLTypeaheadView23(w),hasHoverState:this.props.hasHoverState,highlightedEntry:this.state.highlightedEntry,onNextHighlighted:this.$MessengerGraphQLTypeaheadView17,onMount:this.$MessengerGraphQLTypeaheadView16,onScrollIntoView:this.props.onScrollIntoView,onSelect:this.props.onSelect,onSelectHighlighted:this.$MessengerGraphQLTypeaheadView18,onUnmount:this.$MessengerGraphQLTypeaheadView19,originalEntryIDs:this.props.originalEntryIDs,queryString:this.props.queryString,selectedEntryIDs:this.props.selectedEntryIDs,viewer:this.props.viewer})};v.prototype.$MessengerGraphQLTypeaheadView22=function(){return c("React").createElement(c("ImageBlock.react"),{className:"_225c",spacing:"medium"},c("React").createElement(c("MessengerSpinner.react"),{className:"_2i59",color:"grey"}),c("React").createElement("div",{className:"_4g0h"},i._("Searching...")))};v.prototype.$MessengerGraphQLTypeaheadView20=function(w){var x=this.$MessengerGraphQLTypeaheadView11(),y=this.state.localEntries.slice(0,q);return c("React").createElement(c("MessengerTypeaheadResultView.react"),babelHelpers["extends"]({},w,{className:this.props.typeaheadViewClassName,hasHoverState:this.props.hasHoverState,highlightedEntry:this.state.highlightedEntry,localEntries:y.toArray(),onMount:this.$MessengerGraphQLTypeaheadView16,onNextHighlighted:this.$MessengerGraphQLTypeaheadView17,onScrollIntoView:this.props.onScrollIntoView,onSelect:this.props.onSelect,onSelectHighlighted:this.$MessengerGraphQLTypeaheadView18,onUnmount:this.$MessengerGraphQLTypeaheadView19,originalEntryIDs:this.props.originalEntryIDs,selectedEntryIDs:this.props.selectedEntryIDs,serverGroups:this.state.serverGroups,serverPages:this.state.serverPages,serverProfiles:this.state.serverProfiles,viewer:this.props.viewer},x))};v.prototype.$MessengerGraphQLTypeaheadView24=function(w,x,y){__p&&__p();var z=this.state.localEntries.toArray().filter(function(C){return C.getType()!==c("MercuryTypeaheadConstants").SEARCH_TYPE}).map(function(C){return C.getUniqueID()}),A=[];A.push(new(c("MessengerProfileSearchResultsQueryWebGraphQLQuery"))({search_query:w,result_limit:x,can_viewer_send_money:this.props.canViewerSendMoneyFilter}));if(!y)A.push(new(c("MessengerGroupSearchResultsQueryWebGraphQLQuery"))({search_query:w,result_limit:x,exclude_ids:z}));this.$MessengerGraphQLTypeaheadView4=0;this.$MessengerGraphQLTypeaheadView5=0;var B=c("PromiseUtil").exponentialBackoff(function(){return c("Promise").all(c("WebGraphQL").execAll(A))});c("PromiseUtil").repeatWhileErrorUntil(B,function(C){__p&&__p();var D;if(w!==this.props.queryString)return;var E=[],F=[];if(!y){var G,H=(G=C[1])!=null?(G=G.entities_named)!=null?(G=G.search_results)!=null?G.nodes:G:G:G;if(H)E=H.map(function(T,U){return c("MessengerGraphQLTypeaheadAdapter").convertGroupToEntry(T,U)})}var I=C[0],J=(D=I)!=null?(D=D.entities_named)!=null?(D=D.search_results)!=null?D.nodes:D:D:D;if(J){var K=J.map(function(T){return c("MessengerGraphQLTypeaheadAdapter").convertProfileToEntry(T)}),L=[],M=[],N=[];for(var O=K,P=Array.isArray(O),Q=0,O=P?O:O[typeof Symbol==="function"?Symbol.iterator:"@@iterator"]();;){var R;if(P){if(Q>=O.length)break;R=O[Q++]}else{Q=O.next();if(Q.done)break;R=Q.value}var S=R;if(!S)continue;if(S.getType()===c("MercuryParticipantTypes").FRIEND&&L.length<c("MercuryTypeaheadConstants").COMPOSER_FRIENDS_MAX)L.push(S);else if(S.getType()===c("MercuryParticipantTypes").FB4C&&M.length<c("MercuryTypeaheadConstants").COMPOSER_FB4C_MAX)M.push(S);else if(S.getType()===c("MercuryParticipantTypes").NON_FRIEND&&N.length<s)N.push(S)}F=L.concat(M).concat(N)}if(this.$MessengerGraphQLTypeaheadView7)this.setState({serverGroups:c("compactArray")(E),serverProfiles:c("compactArray")(F),queryCompleteStatus:Object.assign({},this.state.queryCompleteStatus,{usersGroups:true})})}.bind(this),function(C){if(w===this.props.queryString){if(this.$MessengerGraphQLTypeaheadView7&&this.$MessengerGraphQLTypeaheadView4<u){this.$MessengerGraphQLTypeaheadView4+=1;return true}this.setState({queryCompleteStatus:Object.assign({},this.state.queryCompleteStatus,{usersGroups:true})})}return false}.bind(this))()};v.prototype.$MessengerGraphQLTypeaheadView25=function(w){__p&&__p();var x=[];if(!this.props.excludePages)x.push(new(c("MessengerPageSearchResultsQueryWebGraphQLQuery"))({search_query:w,result_limit:5,include_commerce:true,include_games:true,internal_bot:false,vc_endpoint:false}));if(this.props.shouldQueryInternalBot&&c("CurrentUser").isEmployee()&&c("CurrentUser").isWorkUser())x.push(new(c("MessengerPageSearchResultsQueryWebGraphQLQuery"))({search_query:w,result_limit:5,include_commerce:false,include_games:false,internal_bot:true,vc_endpoint:false}));if(this.props.shouldQueryVCEndpoint&&(c("CurrentUser").isEmployee()||c("CurrentUser").isWorkUser()))x.push(new(c("MessengerPageSearchResultsQueryWebGraphQLQuery"))({search_query:w,result_limit:20,include_commerce:false,include_games:false,internal_bot:false,vc_endpoint:true}));if(x.length>0){var y=c("PromiseUtil").exponentialBackoff(function(){return c("Promise").all(c("WebGraphQL").execAll(x))});c("PromiseUtil").repeatWhileErrorUntil(y,function(z){__p&&__p();var A,B;if(w!==this.props.queryString)return;var C=!this.props.excludePages,D=C?(A=z[0])!=null?(A=A.entities_named)!=null?(A=A.search_results)!=null?A.nodes:A:A:A:[],E=C?z[1]:z[0],F=E?(B=E)!=null?(B=B.entities_named)!=null?(B=B.search_results)!=null?B.nodes:B:B:B:[],G=[];if(this.props.shouldQueryVCEndpoint)if(C){var H,I;G=this.props.shouldQueryInternalBot?(H=z[2])!=null?(H=H.entities_named)!=null?(H=H.search_results)!=null?H.nodes:H:H:H:(I=z[1])!=null?(I=I.entities_named)!=null?(I=I.search_results)!=null?I.nodes:I:I:I}else{var J,K;G=this.props.shouldQueryInternalBot?(J=z[1])!=null?(J=J.entities_named)!=null?(J=J.search_results)!=null?J.nodes:J:J:J:(K=z[0])!=null?(K=K.entities_named)!=null?(K=K.search_results)!=null?K.nodes:K:K:K}D=D?D.map(function(L){return c("MessengerGraphQLTypeaheadAdapter").convertPageToEntry(L,c("MercuryTypeaheadConstants").PAGE_TYPE)}):[];F=F?F.map(function(L){return c("MessengerGraphQLTypeaheadAdapter").convertPageToEntry(L,c("MercuryTypeaheadConstants").INTERNAL_BOT_PAGE_TYPE)}):[];G=G?G.map(function(L){return c("MessengerGraphQLTypeaheadAdapter").convertPageToEntry(L,c("MercuryTypeaheadConstants").MEETING_ROOM_PAGE_TYPE)}):[];if(this.$MessengerGraphQLTypeaheadView7){this.setState({serverPages:{pages:c("compactArray")(D),meeting_rooms:c("compactArray")(G),bots:c("compactArray")(F)},queryCompleteStatus:Object.assign({},this.state.queryCompleteStatus,{pages:true})});return}}.bind(this),function(z){if(w===this.props.queryString){if(this.$MessengerGraphQLTypeaheadView7&&this.$MessengerGraphQLTypeaheadView5<u){this.$MessengerGraphQLTypeaheadView5+=1;return true}this.setState({queryCompleteStatus:Object.assign({},this.state.queryCompleteStatus,{excludePages:true})})}return false}.bind(this))()}};v.prototype.$MessengerGraphQLTypeaheadView26=function(w,x,y){__p&&__p();var z=this.props.roomAssociatedObject&&this.props.roomAssociatedObject.privacy_mode;if(z===c("MessengerRoomPrivacyMode").WHITELISTED_MODE&&y){c("WebGraphQL").exec(new(c("MessengerRoomAudienceSearchResultsQueryWebGraphQLQuery"))({search_query:w,result_limit:x,thread_fbid:y})).done(function(A){var B,C=(B=A)!=null?(B=B.message_thread)!=null?(B=B.messaging_audience_list)!=null?B.nodes:B:B:B;if(C){var D=C.map(function(E){return c("MessengerGraphQLTypeaheadAdapter").convertProfileToEntry(E)});this.setState({serverProfiles:D})}}.bind(this));return}};v.prototype.$MessengerGraphQLTypeaheadView23=function(w){var x=w.filter(function(y){return!this.props.selectedEntryIDs.contains(y.getUniqueID())}.bind(this));c("MessengerSearchFunnelLogger").logLoadingStateQuery(p,this.props.queryString,x.toArray().map(function(y){return y.getUniqueID()}));return x};v.prototype.onKeyDown=function(w,x){this.$MessengerGraphQLTypeaheadView6&&this.$MessengerGraphQLTypeaheadView6(w,x)};v.prototype.$MessengerGraphQLTypeaheadView13=function(w){this.$MessengerGraphQLTypeaheadView8.search(w.threadFBID,w.queryString,function(x,y){if(this.$MessengerGraphQLTypeaheadView7)if(y===w.queryString){var z=c("MessengerTypeaheadUtils").sortEntries(x,y).slice(0,this.props.maxEntries);this.setState({localEntries:c("immutable").List(z)})}}.bind(this))};v.prototype.$MessengerGraphQLTypeaheadView27=function(){this.setState({localEntries:c("immutable").List()});this.$MessengerGraphQLTypeaheadView1=c("createCancelableFunction")(function(w){var x=w.slice(0,30);this.setState({localEntries:c("immutable").List(x)})}.bind(this));this.$MessengerGraphQLTypeaheadView8.onEntriesLoaded(this.props.threadFBID,function(w){if(this.$MessengerGraphQLTypeaheadView1)this.$MessengerGraphQLTypeaheadView1(w);this.$MessengerGraphQLTypeaheadView1=null}.bind(this))};v.prototype.$MessengerGraphQLTypeaheadView15=function(w){this.$MessengerGraphQLTypeaheadView9.search(w.threadFBID,w.originalEntryIDs,w.queryString,function(x,y){if(this.$MessengerGraphQLTypeaheadView7)if(y===w.queryString){var z=c("MessengerTypeaheadUtils").sortEntries(x,y).slice(0,this.props.maxEntries);this.setState({localEntries:c("immutable").List(z)})}}.bind(this))};v.prototype.$MessengerGraphQLTypeaheadView28=function(){this.setState({localEntries:c("immutable").List()});this.$MessengerGraphQLTypeaheadView1=c("createCancelableFunction")(function(w){this.setState({localEntries:c("immutable").List(w.slice(0,50))})}.bind(this));this.$MessengerGraphQLTypeaheadView9.onEntriesLoaded(this.props.threadFBID,this.props.originalEntryIDs,function(w){if(this.$MessengerGraphQLTypeaheadView1)this.$MessengerGraphQLTypeaheadView1(w);this.$MessengerGraphQLTypeaheadView1=null}.bind(this))};v.prototype.$MessengerGraphQLTypeaheadView14=function(w){c("MessengerPaymentFriendsLocalCache").search(w.queryString,function(x,y){if(this.$MessengerGraphQLTypeaheadView7)if(y===w.queryString){var z=c("MessengerTypeaheadUtils").sortEntries(x,y).slice(0,this.props.maxEntries);this.setState({localEntries:c("immutable").List(z)})}}.bind(this))};v.prototype.$MessengerGraphQLTypeaheadView29=function(){this.setState({localEntries:c("immutable").List()});this.$MessengerGraphQLTypeaheadView1=c("createCancelableFunction")(function(w){this.setState({localEntries:c("immutable").List(w)})}.bind(this));c("MessengerPaymentFriendsLocalCache").onEntriesLoaded(function(w){if(this.$MessengerGraphQLTypeaheadView1)this.$MessengerGraphQLTypeaheadView1(w);this.$MessengerGraphQLTypeaheadView1=null}.bind(this))};v.prototype.$MessengerGraphQLTypeaheadView10=function(){__p&&__p();var w=this.props.roomAssociatedObject&&this.props.roomAssociatedObject.privacy_mode;if(w===c("MessengerRoomPrivacyMode").WHITELISTED_MODE){this.$MessengerGraphQLTypeaheadView27();return}if(this.props.canViewerSendMoneyFilter){this.$MessengerGraphQLTypeaheadView29();return}if(this.props.includeExistingParticipantIDs){this.$MessengerGraphQLTypeaheadView28();return}this.setState({localEntries:c("immutable").List()});this.$MessengerGraphQLTypeaheadView1=c("createCancelableFunction")(function(x,y,z){var A=x.slice(0,50);if(!this.props.excludeGroups)A=A.concat(y);if(!z||!this.props.queryString){var B=this.props.enableMessageSearch?c("MessengerTypeaheadUtils").getMessageSearchEntry(this.props.queryString):null;if(B)A.unshift(B);this.setState({localEntries:c("immutable").List(A)})}}.bind(this));c("MessengerTypeaheadLocalCache").onEntriesLoaded(function(x,y,z){if(this.$MessengerGraphQLTypeaheadView1)this.$MessengerGraphQLTypeaheadView1(x,y,z);this.$MessengerGraphQLTypeaheadView1=null}.bind(this))};v.prototype.$MessengerGraphQLTypeaheadView11=function(){var w=this.props.canViewerSendMoneyFilter,x=this.state.localEntries.toArray(),y=x.filter(function(L){return L.getType()!==c("MercuryTypeaheadConstants").SEARCH_TYPE}).map(function(L){return L.getUniqueID()}),z=c("MercuryConfig").MaxThreadResults,A=this.props.roomAssociatedObject&&this.props.roomAssociatedObject.privacy_mode,B=A===c("MessengerRoomPrivacyMode").WHITELISTED_MODE,C=!this.props.excludeGroups&&this.props.queryString&&this.props.queryString.length>1&&!B,D=!this.props.excludeGroups&&y.length>0&&!B,E=!this.props.excludeGroups&&(!D||c("CurrentUser").isEmployee())&&!B,F=!c("gkx")("AT5THIpM4AckuNbWpijh61vC-OipSixPqueb6Cl8xvxjybMRxdw8oN5RZdz305TVhpkiPlzS7Sc53JEnbqyboPGn"),G=!this.props.excludePages&&!B,H=this.props.shouldQueryVCEndpoint&&(c("CurrentUser").isEmployee()||c("CurrentUser").isWorkUser())&&!B,I=this.props.shouldQueryInternalBot&&c("CurrentUser").isEmployee()&&c("CurrentUser").isWorkUser()&&!B,J=B,K=this.props.threadFBID;return{queryString:this.props.queryString,canViewerSendMoneyFilter:w,localEntryIDs:y,maxThreadResults:z,shouldQueryGroups:F,shouldQueryPages:G,shouldQueryThreadName:C,shouldQueryParticipantIDs:D,shouldQueryParticipantNames:E,shouldQueryVCEndpoint:H,shouldQueryInternalBot:I,shouldQueryRoomsAudience:B,shouldSkipQueryUsers:J,threadFBID:K}};v.propTypes={includeExistingParticipantIDs:o.bool,canViewerSendMoneyFilter:o.bool,enableMessageSearch:o.bool.isRequired,excludeGroups:o.bool.isRequired,excludePages:o.bool.isRequired,isFocused:o.bool.isRequired,hasHoverState:o.bool.isRequired,maxEntries:o.number.isRequired,onScrollIntoView:o.func.isRequired,onSelect:o.func.isRequired,originalEntryIDs:o.instanceOf(c("immutable").Set).isRequired,queryString:o.string.isRequired,roomAssociatedObject:o.object,selectedEntryIDs:o.instanceOf(c("immutable").Set).isRequired,shouldQueryInternalBot:o.bool.isRequired,shouldQueryVCEndpoint:o.bool.isRequired,threadFBID:o.string,typeaheadViewClassName:o.string.isRequired,viewer:o.string.isRequired};v.defaultProps={maxEntries:r,typeaheadViewClassName:""};f.exports=v}),null);
__d("MessengerGraphQLSearchTypeahead.react",["cx","ix","Bootloader","BootloadOnRender.react","ContextualLayer.react","Event","Image.react","immutable","InstantGameContextType","JSResource","Keys","LazyComponent.react","MercuryIDs","MercuryThreadIDMap","MercuryThreads","MercuryTypeaheadConstants","MercuryVanityIDMap.bs","MessagingSourceEnum","MessengerActions","MessengerGraphQLTypeaheadView.react","MessengerScrollableArea.react","MessengerSearchFunnelLogger","MessengerSpinner.react","MessengerTypeaheadUtils","MNPlatformTagsDataManager","QuicksilverSources","React","ReactDOM","ReactLayeredComponentMixin_DEPRECATED","clearImmediate","emptyFunction","joinClasses","setImmediate"],(function a(b,c,d,e,f,g,h,i){"use strict";__p&&__p();var j=c("MercuryThreadIDMap").get(),k=c("MercuryThreads").get(),l=c("React").PropTypes,m=i("86933"),n=30,o=100,p=c("React").createClass({displayName:"MessengerGraphQLSearchTypeahead",mixins:[c("ReactLayeredComponentMixin_DEPRECATED")],_input:null,_timer:null,_view:null,propTypes:{includeExistingParticipantIDs:l.bool,canViewerSendMoneyFilter:l.bool,className:l.string.isRequired,context:l.object,enableMessageSearch:l.bool.isRequired,excludeGroups:l.bool.isRequired,excludePages:l.bool.isRequired,hasHoverState:l.bool.isRequired,hideClearButton:l.bool.isRequired,hideResults:l.bool,isFacebookChat:l.bool.isRequired,isFocused:l.bool.isRequired,isTokenizer:l.bool.isRequired,onBackspace:l.func.isRequired,onBlur:l.func.isRequired,onChange:l.func.isRequired,onClear:l.func.isRequired,onClick:l.func.isRequired,onFocus:l.func.isRequired,onScrollIntoView:l.func.isRequired,onSelect:l.func.isRequired,originalEntryIDs:l.instanceOf(c("immutable").Set).isRequired,placeholder:l.string.isRequired,queryString:l.string.isRequired,roomAssociatedObject:l.object,scrollableViewClassName:l.string.isRequired,selectedEntryIDs:l.instanceOf(c("immutable").Set).isRequired,shouldQueryInternalBot:l.bool.isRequired,shouldQueryVCEndpoint:l.bool.isRequired,tabIndex:l.number,threadFBID:l.string,typeaheadViewClassName:l.string.isRequired,useLayer:l.bool.isRequired,viewer:l.string.isRequired,width:l.number},getInitialState:function q(){return{gameID:null}},getDefaultProps:function q(){return{includeExistingParticipantIDs:false,canViewerSendMoneyFilter:false,isFacebookChat:false,isTokenizer:false,onBackspace:c("emptyFunction"),onChange:c("emptyFunction"),onClear:c("emptyFunction"),onClick:c("emptyFunction"),onScrollIntoView:c("emptyFunction"),originalEntryIDs:c("immutable").Set(),placeholder:"",scrollableViewClassName:"",selectedEntryIDs:c("immutable").Set(),typeaheadViewClassName:"",useLayer:false}},componentDidMount:function q(){this._timer=c("setImmediate")(this._syncInputWidth)},componentDidUpdate:function q(){c("clearImmediate")(this._timer);this._timer=c("setImmediate")(this._syncInputWidth)},componentWillUnmount:function q(){c("clearImmediate")(this._timer)},renderLayers:function q(){if(!this.props.useLayer)return{};var r=null,s=null;if(this.props.context)r=this.props.context;else s=function(){return this._input}.bind(this);return{typeaheadView:c("React").createElement(c("ContextualLayer.react"),{context:r,contextRef:s,position:"below",shown:this.props.queryString&&this.props.isFocused,shouldSetARIAProperties:false},this._renderView())}},render:function q(){var r=this.props.useLayer?null:this._renderView();return c("React").createElement("div",{className:(!this.props.isTokenizer?"_3rh8":"")+(this.props.isTokenizer?" _3mkz":"")},c("React").createElement("span",{className:c("joinClasses")(this.props.className,"_58ah"+(this.props.hideResults?" _1a03":"")),onChange:this.props.onChange,onSelect:c("emptyFunction"),tabIndex:null},c("React").createElement("label",{className:"_58ak"},c("React").createElement("input",{autoComplete:"off",className:"_58al",disabled:this.props.hideResults,onBlur:this._handleBlur,onClick:this.props.onClick,onFocus:this.props.onFocus,onKeyDown:function(s){return this._handleKeyDown(s)}.bind(this),placeholder:this.props.placeholder,ref:function(s){return this._input=s}.bind(this),spellCheck:false,tabIndex:this.props.tabIndex,type:"text",value:this.props.queryString})),r),c("React").createElement(c("Image.react"),{onMouseDown:this._onClear,className:(this.props.hideClearButton?"hidden_elem":"")+" _2xme",src:m}),c("React").createElement("span",{ref:"textSizeProxy",className:"_58-3","aria-hidden":"true"},this.props.queryString||this.props.placeholder),this._renderGame())},focusInput:function q(){this._input&&this._input.focus()},_onClear:function q(){this._logClearContentSearch();this.props.onClear()},_syncInputWidth:function q(){if(!this.props.isTokenizer)return;var r=c("ReactDOM").findDOMNode(this.refs.textSizeProxy),s=r?r.offsetWidth:0;if(s===0)return;if(this._input)this._input.style.width=s+"px"},_renderGame:function q(){if(!this.state.gameID)return null;return c("React").createElement(c("BootloadOnRender.react"),{loader:c("JSResource")("MessengerGamesQuicksilverPlayerContainer.react").__setRef("MessengerGraphQLSearchTypeahead.react"),placeholder:c("React").createElement(c("MessengerSpinner.react"),null),component:c("React").createElement(c("LazyComponent.react"),{contextType:c("InstantGameContextType").SOLO,contextSourceID:null,gameID:this.state.gameID,onHide:this._handleHideGame,source:c("QuicksilverSources").MESSENGER_GAME_SEARCH,sourceID:null})})},_renderView:function q(){if(!this.props.queryString&&!this.props.isFocused)return null;var r=this.props.isTokenizer?n:o,s=c("React").createElement(c("MessengerGraphQLTypeaheadView.react"),{includeExistingParticipantIDs:this.props.includeExistingParticipantIDs,canViewerSendMoneyFilter:this.props.canViewerSendMoneyFilter,enableMessageSearch:this.props.enableMessageSearch,excludeGroups:this.props.excludeGroups,excludePages:this.props.excludePages,isFocused:this.props.isFocused,hasHoverState:this.props.hasHoverState,maxEntries:r,onScrollIntoView:this._handleScrollIntoView,onSelect:this._handleSelect,originalEntryIDs:this.props.originalEntryIDs,queryString:this.props.queryString,ref:function(t){return this._view=t}.bind(this),roomAssociatedObject:this.props.roomAssociatedObject,shouldQueryInternalBot:this.props.shouldQueryInternalBot,shouldQueryVCEndpoint:this.props.shouldQueryVCEndpoint,selectedEntryIDs:this.props.selectedEntryIDs,threadFBID:this.props.threadFBID,typeaheadViewClassName:this.props.typeaheadViewClassName,viewer:this.props.viewer});if(this.props.isTokenizer)return c("React").createElement(c("MessengerScrollableArea.react"),{className:this.props.scrollableViewClassName,ref:"scrollable",width:this.props.width},s);else return s},_handleScrollIntoView:function q(r){if(!r)return;if(!this.props.isTokenizer){this.props.onScrollIntoView(r);return}if(this.refs.scrollable)c("MessengerTypeaheadUtils").scrollEntryIntoView(r,this.refs.scrollable)},_handleSelect:function q(r,event){__p&&__p();event&&event.preventDefault();var s=r.getUniqueID(),t=r.getType(),u=r.getAuxiliaryData().alias;if(u)c("MercuryVanityIDMap.bs").set(u,c("MercuryIDs").getParticipantIDFromUserID(s));if(t===c("MercuryTypeaheadConstants").SEARCH_TYPE){c("MessengerSearchFunnelLogger").logContentSearchInitiation("WWW_MESSENGER_SEARCH_SESSION_FUNNEL",this.props.queryString);this._logSearchAllThreads(this.props.queryString);c("MessengerActions").changeQueryAll(this.props.queryString)}else if(t===c("MercuryTypeaheadConstants").GAME_TYPE)this.setState({gameID:s});else if(t===c("MercuryTypeaheadConstants").THREAD_TYPE)j.getClientIDFromServerID(s,function(v){return this.props.onSelect(v,t,r)}.bind(this));else{k.getThreadMeta(c("MercuryIDs").getThreadIDFromUserID(s),function(v){return this.props.onSelect(v.thread_id,t,r)}.bind(this));c("MNPlatformTagsDataManager").updateThreadTabAfterSelectThread(c("MessagingSourceEnum").MESSENGER_WEB_SEARCH,s)}},_handleHideGame:function q(){this.setState({gameID:null})},_handleKeyDown:function q(r){var s=r.keyCode;if(s===c("Keys").DOWN||s===c("Keys").UP||s===c("Keys").RETURN)this._view&&this._view.onKeyDown&&this._view.onKeyDown(s,r);else if(s===c("Keys").BACKSPACE)this.props.onBackspace(r);else if(s===c("Keys").ESC)this._input&&this._input.blur();else if(s===c("Keys").RETURN)r.preventDefault()},_handleBlur:function q(){var r=null,s=c("Event").listen(window,"blur",function(){s.remove();c("clearImmediate")(r)});r=c("setImmediate")(function(){s.remove();this.props.onBlur()}.bind(this))},_logClearContentSearch:function q(){c("Bootloader").loadModules(["MessengerContentSearchFunnelLogger","MessengerContentSearchFunnelLoggerConstants"],function(r,s){r&&r.endFunnel(s.FUNNEL_LOGGER_TAGS.END_WITH_X_BUTTON)},"MessengerGraphQLSearchTypeahead.react")},_logSearchAllThreads:function q(r){c("Bootloader").loadModules(["MessengerContentSearchFunnelLogger","MessengerContentSearchFunnelLoggerConstants"],function(s,t){s.startFunnel(r,t.FUNNEL_LOGGER_TAGS.SEARCH_ALL_THREADS)},"MessengerGraphQLSearchTypeahead.react")}});f.exports=p}),null);
__d("MessengerTokenizerToken.react",["cx","Keys","React","SearchableEntry","joinClasses"],(function a(b,c,d,e,f,g,h){"use strict";__p&&__p();var i,j,k=c("React").PropTypes,l=100;i=babelHelpers.inherits(m,c("React").Component);j=i&&i.prototype;function m(){var n,o;for(var p=arguments.length,q=Array(p),r=0;r<p;r++)q[r]=arguments[r];return o=(n=j.constructor).call.apply(n,[this].concat(q)),this.$MessengerTokenizerToken2=function(event){if(event.keyCode===c("Keys").BACKSPACE){event.preventDefault();this.props.onRemove&&this.props.onRemove(this.props.entry)}}.bind(this),o}m.prototype.render=function(){return c("React").createElement("span",{className:c("joinClasses")(this.props.className,"_14-8"),label:null,onClick:this.$MessengerTokenizerToken1,onKeyDown:this.$MessengerTokenizerToken2,role:"option",tabIndex:this.props.index+l},c("React").createElement("span",{"aria-label":this.props.label,title:this.props.label,className:"_14-9"},this.props.label))};m.prototype.$MessengerTokenizerToken1=function(event){event.stopPropagation()};m.propTypes={className:k.string,entry:k.instanceOf(c("SearchableEntry")),index:k.number,label:k.string.isRequired,onRemove:k.func};f.exports=m}),null);
__d("MessengerGraphQLTokenizer.react",["cx","invariant","immutable","MessengerGraphQLSearchTypeahead.react","MessengerTokenizerToken.react","React","joinClasses","setImmediate"],(function a(b,c,d,e,f,g,h,i){"use strict";__p&&__p();var j,k,l=c("React").PropTypes;j=babelHelpers.inherits(m,c("React").PureComponent);k=j&&j.prototype;function m(){__p&&__p();var n,o;for(var p=arguments.length,q=Array(p),r=0;r<p;r++)q[r]=arguments[r];return o=(n=k.constructor).call.apply(n,[this].concat(q)),this.$MessengerGraphQLTokenizer1=true,this.state={focused:this.props.autoFocus,queryString:""},this.focusInput=function(){this.refs.typeahead&&this.refs.typeahead.focusInput()}.bind(this),this.$MessengerGraphQLTokenizer4=function(){if(!this.$MessengerGraphQLTokenizer1)return;this.setState({focused:false})}.bind(this),this.$MessengerGraphQLTokenizer8=function(){if(!this.$MessengerGraphQLTokenizer1)return;this.setState({focused:true})}.bind(this),this.$MessengerGraphQLTokenizer5=function(event){if(this.state.queryString||this.props.entries.size===0)return;this.$MessengerGraphQLTokenizer10(this.props.entries.last());event.preventDefault();c("setImmediate")(this.focusInput)}.bind(this),this.$MessengerGraphQLTokenizer6=function(event){event.target instanceof HTMLInputElement||i(0);if(!this.$MessengerGraphQLTokenizer1)return;this.setState({queryString:event.target.value})}.bind(this),this.$MessengerGraphQLTokenizer7=function(){if(!this.$MessengerGraphQLTokenizer1)return;this.setState({queryString:""});this.props.onClear&&this.props.onClear()}.bind(this),this.$MessengerGraphQLTokenizer9=function(s,t,u){__p&&__p();if(!this.$MessengerGraphQLTokenizer1)return;var v=this.props.entries,w=u.getUniqueID();if(this.props.originalEntryIDs.contains(w))return;else if(v.some(function(x){return x.getUniqueID()===w})){this.$MessengerGraphQLTokenizer10(u);return}this.props.onAddEntryAttempt(u);this.setState({queryString:""})}.bind(this),this.$MessengerGraphQLTokenizer10=function(s){this.props.onRemoveEntryAttempt(s)}.bind(this),this.$MessengerGraphQLTokenizer3=function(s){this.focusInput()}.bind(this),o}m.prototype.componentDidMount=function(){this.$MessengerGraphQLTokenizer1=true;if(this.props.autoFocus)c("setImmediate")(this.focusInput)};m.prototype.componentWillUnmount=function(){this.$MessengerGraphQLTokenizer1=false};m.prototype.render=function(){var n=this.props.entries.map(function(q,r){return this.$MessengerGraphQLTokenizer2(q,r)}.bind(this)),o=n.size>0?"":this.props.placeholder,p=this.props.forceHideClearButton||this.state.queryString===""&&this.props.entries.isEmpty();return c("React").createElement("div",null,c("React").createElement("div",{className:c("joinClasses")(this.props.className,"_14-7")},c("React").createElement("div",{className:c("joinClasses")("_58-2","clearfix"),onClick:this.$MessengerGraphQLTokenizer3},n,c("React").createElement(c("MessengerGraphQLSearchTypeahead.react"),{includeExistingParticipantIDs:this.props.includeExistingParticipantIDs,canViewerSendMoneyFilter:this.props.canViewerSendMoneyFilter,className:"_58-0",context:this.props.context,enableMessageSearch:this.props.enableMessageSearch,excludeGroups:this.props.excludeGroups,excludePages:this.props.excludePages,hasHoverState:this.props.hasHoverState,hideClearButton:p,isFacebookChat:false,isFocused:this.state.focused,isTokenizer:true,onBlur:this.$MessengerGraphQLTokenizer4,onBackspace:this.$MessengerGraphQLTokenizer5,onChange:this.$MessengerGraphQLTokenizer6,onClear:this.$MessengerGraphQLTokenizer7,onFocus:this.$MessengerGraphQLTokenizer8,onSelect:this.$MessengerGraphQLTokenizer9,originalEntryIDs:this.props.originalEntryIDs,placeholder:o,queryString:this.state.queryString,ref:"typeahead",roomAssociatedObject:this.props.roomAssociatedObject,selectedEntryIDs:c("immutable").Seq(this.props.entries).map(function(q){return q.getUniqueID()}).toSet(),scrollableViewClassName:this.props.scrollableViewClassName,shouldQueryInternalBot:this.props.shouldQueryInternalBot,shouldQueryVCEndpoint:this.props.shouldQueryVCEndpoint,tabIndex:this.props.tabIndex,threadFBID:this.props.threadFBID,useLayer:this.props.useLayer,viewer:this.props.viewer,width:this.props.width}))),this.state.queryString===""&&!this.state.focused?this.props.defaultEntries:null)};m.prototype.$MessengerGraphQLTokenizer2=function(n,o){return c("React").createElement(c("MessengerTokenizerToken.react"),{className:"_2ei6",key:n.getUniqueID(),label:n.getTitle(),entry:n,index:o,onRemove:this.$MessengerGraphQLTokenizer10})};m.propTypes={autoFocus:l.bool.isRequired,canViewerSendMoneyFilter:l.bool,includeExistingParticipantIDs:l.bool,className:l.string.isRequired,context:l.object,defaultEntries:l.element,enableMessageSearch:l.bool.isRequired,entries:l.instanceOf(c("immutable").List).isRequired,excludeGroups:l.bool.isRequired,excludePages:l.bool.isRequired,forceHideClearButton:l.bool,hasHoverState:l.bool.isRequired,onAddEntryAttempt:l.func.isRequired,onClear:l.func,onRemoveEntryAttempt:l.func.isRequired,originalEntryIDs:l.instanceOf(c("immutable").Set).isRequired,placeholder:l.node.isRequired,roomAssociatedObject:l.object,scrollableViewClassName:l.string.isRequired,shouldQueryInternalBot:l.bool.isRequired,shouldQueryVCEndpoint:l.bool.isRequired,tabIndex:l.number,threadFBID:l.string,useLayer:l.bool.isRequired,viewer:l.string.isRequired,width:l.number.isRequired};f.exports=m}),null);
__d("MessengerTabIndices",[],(function a(b,c,d,e,f,g){"use strict";var h=Object.freeze({NEW_MESSAGE_TOKENIZER:9998,COMPOSER_INPUT:9999});f.exports=h}),null);
__d("MessengerComposeViewHeader.react",["cx","fbt","immutable","MessengerGraphQLTokenizer.react","MessengerTabIndices","React","clearImmediate","joinClasses","setImmediate"],(function a(b,c,d,e,f,g,h,i){"use strict";__p&&__p();var j,k,l=c("React").PropTypes,m=320;j=babelHelpers.inherits(n,c("React").PureComponent);k=j&&j.prototype;function n(){var o,p;for(var q=arguments.length,r=Array(q),s=0;s<q;s++)r[s]=arguments[s];return p=(o=k.constructor).call.apply(o,[this].concat(r)),this.state={tokenizerContext:null,excludeGroups:false,excludePages:false},this.$MessengerComposeViewHeader1=null,this.$MessengerComposeViewHeader2=function(){this.$MessengerComposeViewHeader1=c("setImmediate")(function(){this.refs.tokenizer&&this.refs.tokenizer.focusInput()}.bind(this))}.bind(this),p}n.prototype.componentDidMount=function(){this.$MessengerComposeViewHeader2();this.setState({tokenizerContext:this.refs.tokenizerContext})};n.prototype.componentDidUpdate=function(o){if(this.props.recipients!==o.recipients)this.props.onResize()};n.prototype.componentWillReceiveProps=function(o){if(o.recipients!==this.props.recipients)if(o.recipients.size===0)this.setState({excludeGroups:false,excludePages:false});else if(!this.state.excludePages&&!this.state.excludeGroups)this.setState({excludeGroups:true,excludePages:true})};n.prototype.componentWillUnmount=function(){this.$MessengerComposeViewHeader1&&c("clearImmediate")(this.$MessengerComposeViewHeader1)};n.prototype.render=function(){var o={enableMessageSearch:false,hasHoverState:true,originalEntryIDs:c("immutable").Set(),scrollableViewClassName:"_2y8_",shouldQueryInternalBot:true,shouldQueryVCEndpoint:false,width:m};return c("React").createElement("div",{className:c("joinClasses")("_2y8y _5l-3",this.props.className),onClick:this.$MessengerComposeViewHeader2,role:"presentation"},c("React").createElement("div",{className:"_2y8z"},i._("To:")),c("React").createElement("div",null,c("React").createElement(c("MessengerGraphQLTokenizer.react"),babelHelpers["extends"]({autoFocus:true,className:"_2y8-",context:this.state.tokenizerContext,entries:this.props.recipients,excludeGroups:this.state.excludeGroups,excludePages:this.state.excludePages,forceHideClearButton:this.props.forceHideClearButton,onAddEntryAttempt:this.props.onAddRecipient,onClear:this.props.onClear,onRemoveEntryAttempt:this.props.onRemoveRecipient,placeholder:i._("Type the name of a person or group"),ref:"tokenizer",tabIndex:c("MessengerTabIndices").NEW_MESSAGE_TOKENIZER,useLayer:true,viewer:this.props.viewer},o)),c("React").createElement("div",{ref:"tokenizerContext"})))};n.propTypes={forceHideClearButton:l.bool.isRequired,onAddRecipient:l.func.isRequired,onClear:l.func,onRemoveRecipient:l.func.isRequired,onResize:l.func.isRequired,recipients:l.instanceOf(c("immutable").List).isRequired,viewer:l.string.isRequired};f.exports=n}),null);
__d("MessengerComposeViewHeaderReact.bs",["bs_js_boolean","ReasonReact.bs","bs_js_null_undefined","MessengerComposeViewHeader.react"],(function a(b,c,d,e,f,g){"use strict";function h(i,j,k,l,m,n,o,p,q){return c("ReasonReact.bs").wrapJsForReason(c("MessengerComposeViewHeader.react"),{className:c("bs_js_null_undefined").from_opt(i),forceHideClearButton:c("bs_js_boolean").to_js_boolean(j),onClear:c("bs_js_null_undefined").from_opt(k),onAddRecipient:l,onRemoveRecipient:m,onResize:n,recipients:o,viewer:p},q)}g.make=h}),null);
__d("MessengerDialogBodyReact.bs",["cx","ReasonReact.bs","joinClasses","bs_js_primitive"],(function a(b,c,d,e,f,g,h){"use strict";__p&&__p();var i=c("ReasonReact.bs").statelessComponent("MessengerDialogBodyReact");function j(l,m){var n=l?l[0]:"",o=i.slice();o[9]=function(){return c("ReasonReact.bs").createDomElement("div",{className:c("joinClasses")("_4eb-",n)},m)};return o}var k=c("ReasonReact.bs").wrapReasonForJs(i,function(l){return j(c("bs_js_primitive").null_undefined_to_opt(l.className),l.children)});g.component=i;g.make=j;g.jsComponent=k}),null);
__d("MessengerDialogCancelButton.react",["fbt","MessengerDialogButton.react","React"],(function a(b,c,d,e,f,g,h){"use strict";var i,j;i=babelHelpers.inherits(k,c("React").PureComponent);j=i&&i.prototype;k.prototype.render=function(){return c("React").createElement(c("MessengerDialogButton.react"),babelHelpers["extends"]({action:"cancel",label:h._("Cancel"),type:"secondary"},this.props))};function k(){i.apply(this,arguments)}f.exports=k}),null);
__d("MessengerDialogReact.bs",["Utils.bs","ReasonReact.bs","bs_js_null_undefined","MessengerDialog.react","MessengerDialogTitle.react","MessengerDialogButton.react","MessengerDialogFooter.react","MessengerDialogHeader.react","MessengerDialogCancelButton.react"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();function h(w){if(w)switch(w[0]){case 0:return["cancel"];case 1:return["button"];case 2:return["confirm"]}else return 0}function i(w){if(w)if(w[0]!==0)return["secondary"];else return["primary"];else return 0}function j(w,x,y,z,A,B,C,D){return c("ReasonReact.bs").wrapJsForReason(c("MessengerDialog.react"),{className:c("bs_js_null_undefined").from_opt(w),onToggle:x,repositionOnUpdate:c("Utils.bs").optionBoolToNullUndefinedBoolean(y),shown:c("Utils.bs").optionBoolToNullUndefinedBoolean(z),titleID:c("bs_js_null_undefined").from_opt(A),type:c("bs_js_null_undefined").from_opt(B),width:c("bs_js_null_undefined").from_opt(C)},D)}var k=[j];function l(w,x,y){return c("ReasonReact.bs").wrapJsForReason(c("MessengerDialogHeader.react"),{className:c("bs_js_null_undefined").from_opt(w),id:c("bs_js_null_undefined").from_opt(x)},y)}var m=[l];function n(w,x){return c("ReasonReact.bs").wrapJsForReason(c("MessengerDialogTitle.react"),{className:c("bs_js_null_undefined").from_opt(w)},x)}var o=[n];function p(w,x,y){return c("ReasonReact.bs").wrapJsForReason(c("MessengerDialogFooter.react"),{className:c("bs_js_null_undefined").from_opt(w),leftContent:c("bs_js_null_undefined").from_opt(x)},y)}var q=[p];function r(w,x){return c("ReasonReact.bs").wrapJsForReason(c("MessengerDialogCancelButton.react"),{onClick:c("bs_js_null_undefined").from_opt(w)},x)}var s=[r];function t(w,x,y,z,A,B,C,D,E){return c("ReasonReact.bs").wrapJsForReason(c("MessengerDialogButton.react"),{action:c("bs_js_null_undefined").from_opt(h(w)),label:c("bs_js_null_undefined").from_opt(x),disabled:c("Utils.bs").optionBoolToNullUndefinedBoolean(y),use:c("bs_js_null_undefined").from_opt(z),onClick:c("bs_js_null_undefined").from_opt(A),type:c("bs_js_null_undefined").from_opt(i(B)),className:c("bs_js_null_undefined").from_opt(C),leftContent:c("bs_js_null_undefined").from_opt(D)},E)}var u=[t],v=0;g.stringOfButtonAction=h;g.stringOfButtonType=i;g.Dialog=k;g.Header=m;g.Title=o;g.Footer=q;g.CancelButton=s;g.Button=u;g.Body=v}),null);
__d("XMessagingForwardAttachmentController",["XController"],(function a(b,c,d,e,f,g){f.exports=c("XController").create("/mercury/attachments/forward/",{})}),null);
__d("XMessengerPlatformShareCTAController",["XController"],(function a(b,c,d,e,f,g){f.exports=c("XController").create("/messages/platform/share/",{})}),null);
__d("MessengerForwardAttachmentDialogReact.bs",["ix","cx","fbt","bs_block","bs_curry","React","immutable","ImageReact.bs","bs_js_boolean","CurrentUser","fbglyph","ReasonReact.bs","AsyncRequest","bs_js_primitive","MercuryLocalIDs","MessageShareType","MessengerDialogReact.bs","MessengerSpinnerReact.bs","MessengerDialogBodyReact.bs","MessengerComposeViewHeaderReact.bs","XMessengerPlatformShareCTAController","XMessagingForwardAttachmentController"],(function a(b,c,d,e,f,g,h,i,j){"use strict";__p&&__p();var k=j._("Send"),l=c("ReasonReact.bs").reducerComponent("MessengerForwardAttachmentDialogReact");function m(p,q,r){new(c("AsyncRequest"))(p.getURIBuilder().getURI()).setMethod("POST").setHandler(r).setData(q).send();return 0}function n(p,q,r,s,t,u,v){__p&&__p();var w=function w(z,v){if(z)return 0;else return c("bs_curry")._1(q,0)},x=function x(v,z){__p&&__p();var A=z[4],B=function B(E){if(E.payload.success)return c("bs_curry")._1(A,2);else return c("bs_curry")._1(A,c("bs_block").__(2,[c("bs_js_primitive").null_undefined_to_opt(E.payload.error)]))},C={};z[2][0].forEach(function(E,v,F){C[String(c("MercuryLocalIDs").generateOfflineThreadingID(undefined))]=E.getUniqueID();return true});var D=0;if(u&&r&&u[0]===c("MessageShareType").PLATFORM_SHARE_CTA)m(c("XMessengerPlatformShareCTAController"),{cta_id:p,message_id:r[0],recipient_map:C},B);else D=1;if(D===1)m(c("XMessagingForwardAttachmentController"),{attachment_id:p,recipient_map:C},B);return c("bs_curry")._1(z[4],1)},y=l.slice();y[9]=function(z){__p&&__p();var A=z[2],B=A[2],C=A[1],D;if(B!==0)D=c("React").createElement("div",undefined,c("ReasonReact.bs").element(0,0,c("MessengerSpinnerReact.bs").make(0,0,0,[])),c("React").createElement("span",{className:"_1e1n _3-99"},j._("Sending")));else if(C){var E=h("141787");D=c("React").createElement("div",{className:"_1e1n"},c("ReasonReact.bs").element(0,0,c("ImageReact.bs").make(0,0,[E],0,0,0,0,[])),c("React").createElement("span",{className:"_3-99"},C[0]))}else D=null;return c("ReasonReact.bs").element(0,0,c("MessengerDialogReact.bs").Dialog[0](0,c("bs_curry")._1(z[0],w),0,[s],0,0,[560],[c("ReasonReact.bs").element(0,0,c("MessengerDialogReact.bs").Header[0](0,0,c("ReasonReact.bs").element(0,0,c("MessengerDialogReact.bs").Title[0](0,[t])))),c("ReasonReact.bs").element(0,0,c("MessengerDialogBodyReact.bs").make(0,[c("ReasonReact.bs").element(0,0,c("MessengerComposeViewHeaderReact.bs").make(["_1e1o"],0,[function(){return c("bs_curry")._1(z[4],0)}],function(F){return c("bs_curry")._1(z[4],c("bs_block").__(0,[F]))},function(F){return c("bs_curry")._1(z[4],c("bs_block").__(1,[F]))},function(){return 0},A[0],c("CurrentUser").getID(),[]))])),c("ReasonReact.bs").element(0,0,c("MessengerDialogReact.bs").Footer[0](0,[D],[c("ReasonReact.bs").element(0,0,c("MessengerDialogReact.bs").CancelButton[0](0,[])),c("ReasonReact.bs").element(0,0,c("MessengerDialogReact.bs").Button[0]([2],[k],[+A[0].isEmpty()||A[2]],0,[c("bs_curry")._1(z[0],x)],[0],0,0,[]))]))]))};y[10]=function(){return[c("immutable").List([]),0,0]};y[12]=function(z){__p&&__p();if(typeof z==="number")switch(z){case 0:return function(D){return c("bs_block").__(0,[[c("immutable").List([]),D[1],D[2]]])};case 1:return function(D){return c("bs_block").__(0,[[D[0],0,1]])};case 2:c("bs_curry")._1(q,0);return function(){return c("bs_block").__(0,[[c("immutable").List([]),0,0]])}}else switch(z.tag|0){case 0:var A=z[0];return function(D){return c("bs_block").__(0,[[D[0].push(A),D[1],D[2]]])};case 1:var B=z[0];return function(D){return c("bs_block").__(0,[[D[0].filter(function(E){return c("bs_js_boolean").to_js_boolean(+(E!==B))}),D[1],D[2]]])};case 2:var C=z[0];return function(D){return c("bs_block").__(0,[[D[0],C,0]])}}};return y}var o=c("ReasonReact.bs").wrapReasonForJs(l,function(p){return n(p.attachmentID,p.onClose,c("bs_js_primitive").null_undefined_to_opt(p.messageID),+p.shown,p.title,c("bs_js_primitive").null_undefined_to_opt(p.shareType),[])});g.sendButtonLabel=k;g.component=l;g.sendData=m;g.make=n;g.jsComponent=o}),null);
__d("MessengerDialogs.bs",["bs_list","bs_curry"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();var h=[0],i=[0];function j(){var o=i[0],p=h[0];if(o){var q=o[0];if(c("bs_list").length(p)>0)return c("bs_curry")._1(q,[p]);else return c("bs_curry")._1(q,0)}else return 0}function k(o){i[0]=[o];return j(0)}function l(o){h[0]=[o,h[0]];return j(0)}function m(){var o=h[0];h[0]=o?o[1]:0;return j(0)}function n(){h[0]=0;return j(0)}g.visibleDialogs=h;g.setDialogComponentState=i;g.updateComponent=j;g.addHandler=k;g.showDialog=l;g.removeDialog=m;g.removeAllDialogs=n}),null);
__d("MessengerPhotoInfoDialog.react",["cx","fbt","MessengerEnvironment","MessengerContactImageReact.bs","MessengerDialog.react","MessengerDialogButton.react","MessengerDialogHeader.react","MessengerDialogTitle.react","MessengerDialogs.bs","MessengerSpinner.react","MercuryIDs","MercuryTimestamp","MercuryParticipants","React","RelayClassic_DEPRECATED","react-relay/classic/query/RelayQL","XUIDialog.react","XUIDialogHeader.react","XUIDialogHeaderTitle.react"],(function a(b,c,d,e,f,g,h,i){"use strict";__p&&__p();var j,k,l=c("MessengerContactImageReact.bs").jsComponent,m=c("React").PropTypes,n=54;j=babelHelpers.inherits(o,c("React").Component);k=j&&j.prototype;function o(){__p&&__p();var p,q;for(var r=arguments.length,s=Array(r),t=0;t<r;t++)s[t]=arguments[t];return q=(p=k.constructor).call.apply(p,[this].concat(s)),this.$MessengerPhotoInfoDialog4=function(event){event.preventDefault();this.props.showHeader&&this.props.showHeader();c("MessengerDialogs.bs").removeDialog()}.bind(this),this.$MessengerPhotoInfoDialog3=function(u){if(!u){this.props.showHeader&&this.props.showHeader();this.props.closeInfo()}}.bind(this),q}o.prototype.render=function(){if(!this.props.fullMedia)return null;return c("MessengerEnvironment").messengerui?this.$MessengerPhotoInfoDialog1():this.$MessengerPhotoInfoDialog2()};o.prototype.$MessengerPhotoInfoDialog1=function(){var p=this.props.fullMedia;return c("React").createElement(c("MessengerDialog.react"),{onToggle:this.$MessengerPhotoInfoDialog3,ref:"dialog",type:"default",width:504},c("React").createElement(c("MessengerDialogHeader.react"),null,c("React").createElement(c("MessengerDialogTitle.react"),null,i._("Info")),c("React").createElement(c("MessengerDialogButton.react"),{action:"cancel",label:i._("Done"),onClick:this.$MessengerPhotoInfoDialog4,type:"primary"})),c("React").createElement("div",{className:"_2zn1"},c("React").createElement("div",{className:"_2zn2"},i._("Uploaded by")),c("React").createElement("div",{className:"_2zn4"},c("React").createElement("div",{className:"_2zn5"},p.creator.name),c("React").createElement("div",{className:"_2zn6"},c("MercuryTimestamp").getPreciseTimestamp(p.creation_time*1e3))),c("React").createElement("div",{className:"_2zn7"},this.showProfilePic())),this.$MessengerPhotoInfoDialog5(),this.$MessengerPhotoInfoDialog6())};o.prototype.$MessengerPhotoInfoDialog2=function(){var p=this.props.fullMedia;return c("React").createElement(c("XUIDialog.react"),{onToggle:this.$MessengerPhotoInfoDialog3,shown:this.props.infoOpen,ref:"dialog",type:"serif",width:504},c("React").createElement(c("XUIDialogHeader.react"),null,c("React").createElement(c("XUIDialogHeaderTitle.react"),null,i._("Info"))),c("React").createElement("div",{className:"_2zn1"},c("React").createElement("div",{className:"_2zn2"},i._("Uploaded by")),c("React").createElement("div",{className:"_2zn4"},c("React").createElement("div",{className:"_2zn5"},p.creator.name),c("React").createElement("div",{className:"_2zn6"},c("MercuryTimestamp").getPreciseTimestamp(p.creation_time*1e3))),c("React").createElement("div",{className:"_2zn7"},this.showProfilePic())),this.$MessengerPhotoInfoDialog5(),this.$MessengerPhotoInfoDialog6())};o.prototype.$MessengerPhotoInfoDialog6=function(){__p&&__p();var p=this.props.fullMedia.exif_data,q="";if(p){if(p.aperture)q=p.aperture+" ";if(p.focal_length){var r=p.focal_length.split("/"),s=parseInt(r[0],10)/(parseInt(r[1],10)||1);q+=s+"mm "}if(p.iso)q+="ISO "+p.iso}if(!q.length)return null;return c("React").createElement("div",{className:"_2zn1"},c("React").createElement("div",{className:"_2zn2"},i._("Camera")),c("React").createElement("div",{className:"_2zn4"},c("React").createElement("div",{className:"_2zn5"},p.model||"Camera"),c("React").createElement("div",{className:"_2zn6"},q)))};o.prototype.$MessengerPhotoInfoDialog5=function(){var p=this.props.fullMedia,q="";if(p.filesize>1e6)q=(p.filesize/1e6).toFixed(2)+"MB";else if(p.filesize>1e3)q=(p.filesize/1e3).toFixed(2)+"KB";else if(p.filesize>0)q=p.filesize+"B";var r=p.__typename==="MessageImage"?(p.original_dimensions.x*p.original_dimensions.y/1e6).toFixed(2)+"MP":"";return c("React").createElement("div",{className:"_2zn1"},c("React").createElement("div",{className:"_2zn2"},i._("Details")),c("React").createElement("div",{className:"_2zn4"},c("React").createElement("div",{className:"_2zn5"},p.filename),c("React").createElement("div",{className:"_2zn6"},r+" "+p.original_dimensions.x+" x "+p.original_dimensions.y+" "+q)))};o.prototype.showProfilePic=function(){var p=this.props.fullMedia;if(!p)return c("React").createElement(c("MessengerSpinner.react"),null);else{var q=c("MercuryIDs").getParticipantIDFromUserID(p.creator.id),r=c("MercuryParticipants").getNow(q);if(r)return c("React").createElement(l,{isMessengerUser:r.is_messenger_user,size:n,src:r.big_image_src||r.image_src});return c("React").createElement(c("MessengerSpinner.react"),null)}};o.propTypes={closeInfo:m.func,fullMedia:m.object,infoOpen:m.bool,photoID:m.string,showHeader:m.func};f.exports=c("RelayClassic_DEPRECATED").createContainer(o,{fragments:{fullMedia:function p(q){return function(){return{children:[{fieldName:"__typename",kind:"Field",metadata:{isRequisite:true},type:"String"},{fieldName:"id",kind:"Field",metadata:{isRequisite:true},type:"ID"},{children:[{fieldName:"creation_time",kind:"Field",metadata:{},type:"Time"},{children:[{fieldName:"id",kind:"Field",metadata:{isRequisite:true},type:"ID"},{fieldName:"name",kind:"Field",metadata:{},type:"String"},{fieldName:"__typename",kind:"Field",metadata:{isGenerated:true,isRequisite:true},type:"String"}],fieldName:"creator",kind:"Field",metadata:{canHaveSubselections:true,inferredRootCallName:"node",inferredPrimaryKey:"id",isAbstract:true},type:"Actor"},{fieldName:"filename",kind:"Field",metadata:{},type:"String"},{children:[{fieldName:"x",kind:"Field",metadata:{},type:"Float"},{fieldName:"y",kind:"Field",metadata:{},type:"Float"}],fieldName:"original_dimensions",kind:"Field",metadata:{canHaveSubselections:true},type:"Vect2"},{fieldName:"filesize",kind:"Field",metadata:{},type:"Int"},{children:[{fieldName:"iso",kind:"Field",metadata:{},type:"Int"},{fieldName:"aperture",kind:"Field",metadata:{},type:"String"},{fieldName:"focal_length",kind:"Field",metadata:{},type:"String"},{fieldName:"model",kind:"Field",metadata:{},type:"String"}],fieldName:"exif_data",kind:"Field",metadata:{canHaveSubselections:true},type:"MessageImageExifData"},{fieldName:"id",kind:"Field",metadata:{isGenerated:true,isRequisite:true},type:"ID"}],id:c("react-relay/classic/query/RelayQL").__id(),kind:"Fragment",metadata:{},name:"MessageImage",type:"MessageImage"},{children:[{fieldName:"creation_time",kind:"Field",metadata:{},type:"Time"},{children:[{fieldName:"id",kind:"Field",metadata:{isRequisite:true},type:"ID"},{fieldName:"name",kind:"Field",metadata:{},type:"String"},{fieldName:"__typename",kind:"Field",metadata:{isGenerated:true,isRequisite:true},type:"String"}],fieldName:"creator",kind:"Field",metadata:{canHaveSubselections:true,inferredRootCallName:"node",inferredPrimaryKey:"id",isAbstract:true},type:"Actor"},{fieldName:"filename",kind:"Field",metadata:{},type:"String"},{children:[{fieldName:"x",kind:"Field",metadata:{},type:"Float"},{fieldName:"y",kind:"Field",metadata:{},type:"Float"}],fieldName:"original_dimensions",kind:"Field",metadata:{canHaveSubselections:true},type:"Vect2"},{fieldName:"id",kind:"Field",metadata:{isGenerated:true,isRequisite:true},type:"ID"}],id:c("react-relay/classic/query/RelayQL").__id(),kind:"Fragment",metadata:{},name:"MessageVideo",type:"MessageVideo"}],id:c("react-relay/classic/query/RelayQL").__id(),kind:"Fragment",metadata:{isAbstract:true},name:"MessengerPhotoInfoDialog_react_FullMediaRelayQL",type:"Node"}}()}}})}),null);
__d("SpotlightMessagesViewerContainerRoute",["react-relay/classic/route/RelayRoute","react-relay/classic/query/RelayQL"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();var h,i;h=babelHelpers.inherits(j,c("react-relay/classic/route/RelayRoute"));i=h&&h.prototype;function j(){h.apply(this,arguments)}j.routeName="SpotlightMessagesViewerContainerRoute";j.paramDefinition={photoID:{type:"String",required:true}};j.queries={fullMedia:function k(l){return function(m){return{calls:[{kind:"Call",metadata:{type:"ID!"},name:"id",value:{kind:"CallVariable",callVariableName:"photoID"}}],children:[].concat.apply([],[{fieldName:"id",kind:"Field",metadata:{isGenerated:true,isRequisite:true},type:"ID"},{fieldName:"__typename",kind:"Field",metadata:{isGenerated:true,isRequisite:true},type:"String"},c("react-relay/classic/query/RelayQL").__frag(m)]),fieldName:"node",kind:"Query",metadata:{isAbstract:true,identifyingArgName:"id",identifyingArgType:"ID!"},name:"SpotlightMessagesViewerContainerRoute",type:"Node"}}(l.getFragment("fullMedia"))}};f.exports=j}),null);
__d("MessengerPhotoInfoDialogContainer.react",["MessengerPhotoInfoDialog.react","react-relay/classic/container/RelayRootContainer","SpotlightMessagesViewerContainerRoute","React"],(function a(b,c,d,e,f,g){"use strict";var h=c("React").PropTypes,i=c("React").createClass({displayName:"MessengerPhotoInfoDialogContainer",proptypes:{photoID:h.string.isRequired,showHeader:h.func},render:function j(){var k=new(c("SpotlightMessagesViewerContainerRoute"))({photoID:this.props.photoID});return c("React").createElement(c("react-relay/classic/container/RelayRootContainer"),{Component:c("MessengerPhotoInfoDialog.react"),route:k,renderFetched:function(l){return c("React").createElement(c("MessengerPhotoInfoDialog.react"),babelHelpers["extends"]({},l,{closeInfo:this.props.closeInfo,photoID:this.props.photoID,infoOpen:this.props.infoOpen,showHeader:this.props.showHeader}))}.bind(this)})}});f.exports=i}),null);
__d("MessengerPhotoViewBottomBar.react",["cx","React"],(function a(b,c,d,e,f,g,h){"use strict";var i=function i(j){return c("React").createElement("div",{className:"_51an _50-m _16zz"},j.children)};f.exports=i}),null);
__d("MessengerPhotoViewHScroll.react",["cx","Animation","MessengerSharedPhoto.react","React","SphericalPhotoUtils"],(function a(b,c,d,e,f,g,h){"use strict";__p&&__p();var i,j,k=c("SphericalPhotoUtils").getThumbnailsFromPhotoEncodings,l=c("React").PropTypes,m=200,n=80;i=babelHelpers.inherits(o,c("React").Component);j=i&&i.prototype;function o(){var p,q;for(var r=arguments.length,s=Array(r),t=0;t<r;t++)s[t]=arguments[t];return q=(p=j.constructor).call.apply(p,[this].concat(s)),this.$MessengerPhotoViewHScroll1=null,q}o.prototype.componentDidMount=function(){this.$MessengerPhotoViewHScroll2()};o.prototype.componentDidUpdate=function(){this.$MessengerPhotoViewHScroll2()};o.prototype.componentWillUnmount=function(){this.$MessengerPhotoViewHScroll1&&this.$MessengerPhotoViewHScroll1.stop();this.$MessengerPhotoViewHScroll1=null};o.prototype.render=function(){__p&&__p();var p=this.props.sharedPhotos,q=p.reduce(function(s,t){var u=t.node.image1===null?t.node.image:t.node.image1,v=t.node.photo_encodings?t.node.photo_encodings.length!==0:false,w=u.uri;if(v){var x=k(t.node.photo_encodings),y=x.smallThumbnail;w=y||w}if(u)s.push(c("React").createElement("div",{className:"_4dy9",key:t.node.legacy_attachment_id},c("React").createElement(c("MessengerSharedPhoto.react"),{className:"_42rl"+(this.props.photoID!==t.node.legacy_attachment_id?" _q1a":""),fbid:t.node.legacy_attachment_id,onClick:this.props.onScroll,uri:w,isSpherical:v})));return s}.bind(this),[]),r=(this.props.width-n)/2;return c("React").createElement("div",{className:"_463g"},c("React").createElement("div",{className:"_463h",ref:"childContainer"},c("React").createElement("div",{className:"_463j",style:{paddingLeft:r,paddingRight:r},ref:"scrollable"},q)))};o.prototype.$MessengerPhotoViewHScroll2=function(){var p=this.refs.childContainer?this.refs.childContainer.scrollLeft:0,q=this.props.sharedPhotos.findIndex(function(s){return s.node.legacy_attachment_id===this.props.photoID}.bind(this)),r=q*n;if(!this.$MessengerPhotoViewHScroll1)this.$MessengerPhotoViewHScroll1=new(c("Animation"))(this.refs.childContainer);this.$MessengerPhotoViewHScroll1.from("scrollLeft",p).to("scrollLeft",r).duration(m).go()};f.exports=o}),null);
__d("MessengerPhotoViewHeader.react",["cx","fbt","MessagingForwardingButtonNUX.react","MessengerActions","MessengerPhotoInfoDialogContainer.react","React","SpotlightViewerBottomBarLink","MessengerPhotoViewCloseLink.react"],(function a(b,c,d,e,f,g,h,i){"use strict";__p&&__p();var j,k,l=c("React").PropTypes;j=babelHelpers.inherits(m,c("React").PureComponent);k=j&&j.prototype;function m(){var n,o;for(var p=arguments.length,q=Array(p),r=0;r<p;r++)q[r]=arguments[r];return o=(n=k.constructor).call.apply(n,[this].concat(q)),this.$MessengerPhotoViewHeader3=function(){if(this.refs.forwardNUX)this.refs.forwardNUX.close();this.props.showForwardDialog&&this.props.showForwardDialog()}.bind(this),o}m.prototype.render=function(){return c("React").createElement("div",{className:"_51an _50-m _3c1i _5l-3",role:"banner"},this.$MessengerPhotoViewHeader1(),this.$MessengerPhotoViewHeader2())};m.prototype.$MessengerPhotoViewHeader2=function(){return c("React").createElement(c("MessengerPhotoViewCloseLink.react"),{onClick:this.props.onClose})};m.prototype.$MessengerPhotoViewHeader1=function(){var n=void 0,o=void 0;if(!this.props.disableForward){n=c("React").createElement(c("SpotlightViewerBottomBarLink"),{className:"_3c1o",onClick:this.$MessengerPhotoViewHeader3,ref:"forwardButton"},c("React").createElement("div",{className:"_2msr _3oo2"}),i._("Forward"));o=c("React").createElement(c("MessagingForwardingButtonNUX.react"),{contextRef:function(){return this.refs.forwardButton}.bind(this),ref:"forwardNUX"},i._("Send this image to other people in separate messages."))}return c("React").createElement("div",{key:"buttonsContainer",ref:"buttons"},c("React").createElement(c("SpotlightViewerBottomBarLink"),{ajaxify:this.props.url,className:"_3c1o",rel:"async"},c("React").createElement("div",{className:"_3ooo _2msr"}),i._("Download")),n,o,c("React").createElement(c("SpotlightViewerBottomBarLink"),{className:"_3c1o",href:"#",onClick:this.props.openInfo,ref:"moreInfo"},c("React").createElement("div",{className:"_3c1k _2msr"}),i._("Info")))};m.propTypes={disableForward:l.bool,onClose:l.func,openInfo:l.func,photoID:l.string,showForwardDialog:l.func,url:l.object};f.exports=m}),null);
__d("XMessagingVideoAttachmentController",["XController"],(function a(b,c,d,e,f,g){f.exports=c("XController").create("/mercury/attachments/video/",{video_id:{type:"String",required:true},video_container_id:{type:"String",required:true},width:{type:"Int",required:true},height:{type:"Int",required:true},start_muted:{type:"Bool",defaultValue:false},no_fullscreen:{type:"Bool",defaultValue:false},load_player_controller:{type:"Bool",defaultValue:false},hide_controls_on_finish:{type:"Bool",defaultValue:false},hide_url_menu_option:{type:"Bool",defaultValue:false},is_share:{type:"Bool",defaultValue:false},render_play_button:{type:"Bool",defaultValue:false},start_timestamp:{type:"Int",defaultValue:0}})}),null);
__d("MessengerVideoPlayer.react",["cx","ActorURI","AsyncRequest","BackgroundImage.react","Event","FullScreen","MessengerSpinner.react","React","ShimButton.react","VideoPlayerReason","VideoPlayerReasonTransitionHelper","VideoPlayerStates","Vector","XMessagingVideoAttachmentController","SpotlightMercurySharedMediaViewer.react","SubscriptionsHandler","cssURL","getFullScreenElement","gkx","guid","joinClasses","setImmediate"],(function a(b,c,d,e,f,g,h){"use strict";__p&&__p();var i,j,k=c("React").PropTypes,l="_ox1";i=babelHelpers.inherits(m,c("React").Component);j=i&&i.prototype;function m(n){__p&&__p();j.constructor.call(this,n);this.$MessengerVideoPlayer2=true;this.$MessengerVideoPlayer3=[];this.$MessengerVideoPlayer4=-1;this.$MessengerVideoPlayer5=false;this.$MessengerVideoPlayer6=false;this.$MessengerVideoPlayer10=function(o){__p&&__p();if(!c("gkx")("AT59RsD6Oiw6mLCf0aoZOq_3iqj624RxAYXc9aMeKCQhXLf14PDA6oVEBHRx-eSc-flBhEiq2DauG8iOn4NpXhX0rqJcIa4_Rg1Bf-oX75YjPQ")&&!this.props.onClick||!this.isVideoClicked(o))return;o.preventDefault();if(c("gkx")("AT59RsD6Oiw6mLCf0aoZOq_3iqj624RxAYXc9aMeKCQhXLf14PDA6oVEBHRx-eSc-flBhEiq2DauG8iOn4NpXhX0rqJcIa4_Rg1Bf-oX75YjPQ")&&this.props.isOnStage){o.stopPropagation();this.isState(c("VideoPlayerStates").PLAYING)?this.pause(c("VideoPlayerReason").USER):this.play(c("VideoPlayerReason").USER)}else{this.pause(c("VideoPlayerReason").USER);this.props.onClick&&this.props.onClick()}}.bind(this);this.$MessengerVideoPlayer11=function(o){if(!this.isRightClick(o))return;o.stopPropagation();o.preventDefault();c("setImmediate")(function(){this.props.onSelect&&this.props.onSelect()}.bind(this))}.bind(this);this.$MessengerVideoPlayer8=function(){if(!this.$MessengerVideoPlayer2||this.state.forcePause)return;if(this.$MessengerVideoPlayer6){this.play(new(c("VideoPlayerReasonTransitionHelper"))(c("VideoPlayerReason").PAGE_VISIBILITY));this.$MessengerVideoPlayer6=false}}.bind(this);this.$MessengerVideoPlayer7=function(){if(!this.$MessengerVideoPlayer2||this.state.forcePause||!(this.state.playerAPI&&this.state.playerAPI.isMuted()))return;this.$MessengerVideoPlayer6=!!this.state.playerAPI&&this.state.playerAPI.isState(c("VideoPlayerStates").PLAYING);this.pause()}.bind(this);this.state={playerAPI:null,forcePause:false};this.$MessengerVideoPlayer1=c("guid")();if(this.props.isInThread){this.listeners=new(c("SubscriptionsHandler"))();this.listeners.addSubscriptions(c("Event").listen(window,"blur",this.$MessengerVideoPlayer7),c("Event").listen(window,"focus",this.$MessengerVideoPlayer8))}}m.prototype.shouldComponentUpdate=function(n){var o=document.getElementById(this.$MessengerVideoPlayer1.toString()),p=c("FullScreen").isFullScreen();if(o!=null&&p&&o.children[0].children[0]===c("getFullScreenElement")())return false;var q=!!(n.stageDimensions&&n.stageDimensions!==this.props.stageDimensions);if(q){this.$MessengerVideoPlayer4=this.getCurrentTimePosition();this.$MessengerVideoPlayer5=!this.isState(c("VideoPlayerStates").PLAYING)}return!this.props.videoData||n.videoData.id!==this.props.videoData.id||q};m.prototype.componentWillReceiveProps=function(n){if(!this.$MessengerVideoPlayer2)return;if(this.props.isInThread&&n.isVisible!==this.props.isVisible)n.isVisible&&!this.state.forcePause?this.play(new(c("VideoPlayerReasonTransitionHelper"))(c("VideoPlayerReason").VIDEO_VISIBILITY)):this.pause()};m.prototype.componentDidMount=function(){if(this.props.videoData)this.$MessengerVideoPlayer9()};m.prototype.componentDidUpdate=function(){this.$MessengerVideoPlayer3.forEach(function(n){return n.abandon()});this.$MessengerVideoPlayer3=[];if(this.props.videoData)this.$MessengerVideoPlayer9()};m.prototype.componentWillUnmount=function(){this.pause(c("VideoPlayerReason").UNLOADED);this.seek(0);this.$MessengerVideoPlayer3.forEach(function(n){return n.abandon()});this.listeners&&this.listeners.release();if(this.state.playerAPI)this.state.playerAPI.detachRootNode()};m.prototype.isVideoLoaded=function(){var n=!!this.state.playerAPI;!n;if(this.isState(c("VideoPlayerStates").FALLBACK))return false;return n};m.prototype.isVideoClicked=function(n){if(n.target instanceof HTMLElement)return n.target.classList.contains(l);return false};m.prototype.isRightClick=function(n){n=n||window.event;return n.button===2};m.prototype.play=function(n){if(!this.isVideoLoaded())return;if(this.state.playerAPI)this.state.playerAPI.play(n)};m.prototype.pause=function(n){if(!this.isVideoLoaded())return;if(this.state.playerAPI)this.state.playerAPI.pause(n)};m.prototype.seek=function(n){if(!this.isVideoLoaded())return;if(this.state.playerAPI)this.state.playerAPI.seek(n)};m.prototype.getCurrentTimePosition=function(){return this.isVideoLoaded()&&this.state.playerAPI?this.state.playerAPI.getCurrentTimePosition():-1};m.prototype.render=function(){var n=this.props.videoData,o=c("React").createElement("div",{ref:"placeholder"},c("React").createElement(c("MessengerSpinner.react"),{color:"blue",size:c("MessengerSpinner.react").large_size})),p={};if(n&&n.url){var q=n.original_dimensions;p.backgroundImage=c("cssURL")(n.url);o=c("React").createElement("div",{ref:"placeholder"},c("React").createElement(c("BackgroundImage.react"),{className:this.props.className,width:q.x,height:q.y,loadingIndicatorStyle:"large",backgroundSize:"cover",ref:"placeholder",style:p,src:n.url}))}return c("React").createElement(c("ShimButton.react"),{className:c("joinClasses")(this.props.className,"_4-od"),id:this.$MessengerVideoPlayer1,onClick:this.$MessengerVideoPlayer10,onMouseDown:this.$MessengerVideoPlayer11,style:p},o)};m.prototype.$MessengerVideoPlayer9=function(){__p&&__p();var n=this.props.videoData;if(n){var o=n.original_dimensions;if(this.props.stageDimensions)o=c("SpotlightMercurySharedMediaViewer.react").getImageDimensionsForStage(new(c("Vector"))(n.original_dimensions.x,n.original_dimensions.y),this.props.stageDimensions);var p=c("XMessagingVideoAttachmentController").getURIBuilder().setString("video_id",n.legacy_attachment_id).setString("video_container_id",this.$MessengerVideoPlayer1).setInt("width",o.x).setInt("height",o.y).setInt("start_timestamp",this.$MessengerVideoPlayer4>0?Math.round(this.$MessengerVideoPlayer4):0).setBool("start_muted",n.start_muted).setBool("no_fullscreen",n.no_fullscreen).setBool("load_player_controller",true).setBool("hide_controls_on_finish",n.hide_controls_on_finish).setBool("hide_url_menu_option",Boolean(n.hide_url_menu_option)).setBool("is_share",n.is_share).setBool("render_play_button",this.props.isInThread).getURI(),q=this.props.attachment;if(q&&q.metadata&&q.metadata.pageid)p=c("ActorURI").create(p,q.metadata.pageid);var r=new(c("AsyncRequest"))();this.$MessengerVideoPlayer3.push(r);r.setMethod("GET").setStatusElement(this.refs.placeholder).setURI(p).setRelativeTo(this).setReadOnly(true).setHandler(function(s){}).send()}};m.prototype.$MessengerVideoPlayer12=function(){if(this.props.isVisible&&this.isState(c("VideoPlayerStates").FINISHED)){this.seek(0);this.play(c("VideoPlayerReason").LOOP)}else if(this.props.isVisible&&this.isState(c("VideoPlayerStates").PAUSED)&&!this.$MessengerVideoPlayer6)this.setState({forcePause:true});else if(this.isState(c("VideoPlayerStates").PLAYING))this.setState({forcePause:false})};m.prototype.onVideoLoaded=function(){if(!this.$MessengerVideoPlayer2)return;this.state.playerAPI&&this.state.playerAPI.addListener("stateChange",function(){return this.$MessengerVideoPlayer12()}.bind(this));if(this.props.isVisible&&!this.$MessengerVideoPlayer5&&!this.state.forcePause)this.play(c("VideoPlayerReason").AUTOPLAY);else this.pause();this.$MessengerVideoPlayer4=-1;this.$MessengerVideoPlayer5=false};m.prototype.isState=function(n){return!!(this.state.playerAPI&&this.state.playerAPI.isState(n))};m.propTypes={attachment:k.object,className:k.string,isInThread:k.bool,isVisible:k.bool,isOnStage:k.bool,stageDimensions:k.instanceOf(c("Vector")),videoData:k.object,onClick:k.func,onSelect:k.func};m.invokeVideoLoaded=function(n,o,p){__p&&__p();n.$MessengerVideoPlayer2=p;if(o.isState(c("VideoPlayerStates").LOADING))n.stateChangeListener=o.addListener("stateChange",function(){if(!o.isState(c("VideoPlayerStates").LOADING)){if(n.state&&n.state.playerAPI)return;n.setState({playerAPI:o},n.onVideoLoaded);if(n.stateChangeListener)n.stateChangeListener.remove()}});else n.setState({playerAPI:o},n.onVideoLoaded)};f.exports=m}),null);
__d("MessagingForwardAttachmentDialog.react",["BootloadOnRender.react","JSResource","LazyComponent.react","React"],(function a(b,c,d,e,f,g){"use strict";var h,i;h=babelHelpers.inherits(j,c("React").PureComponent);i=h&&h.prototype;j.prototype.render=function(){return c("React").createElement(c("BootloadOnRender.react"),{component:c("React").createElement(c("LazyComponent.react"),this.props),loader:c("JSResource")("MessagingForwardAttachmentDialogImpl.react").__setRef("MessagingForwardAttachmentDialog.react"),placeholder:c("React").createElement("div",null)})};function j(){h.apply(this,arguments)}f.exports=j}),null);
__d("SpotlightMessagesViewerPagers.react",["cx","LeftRight.react","Link.react","React"],(function a(b,c,d,e,f,g,h){"use strict";var i=function i(j){return c("React").createElement(c("LeftRight.react"),null,c("React").createElement(c("Link.react"),{className:"_322u"+(!j.disablePrevArrow?" _2bbb":"")+" _50-m"},c("React").createElement("div",{className:(!j.disablePrevArrow?"_4ksl":"")+(!j.disablePrevArrow?" _4ksm":"")})),c("React").createElement(c("Link.react"),{className:"_322u"+(!j.disableNextArrow?" _2bbc":"")+" _50-m"},c("React").createElement("div",{className:(!j.disableNextArrow?"_4ksl":"")+(!j.disableNextArrow?" _4kso":"")})))};f.exports=i}),null);
__d("XMessagingPhotoDownloadController",["XController"],(function a(b,c,d,e,f,g){f.exports=c("XController").create("/mercury/attachments/photo/",{photo_id:{type:"String",required:true}})}),null);
__d("XMessagingShareAttachmentDialogController",["XController"],(function a(b,c,d,e,f,g){f.exports=c("XController").create("/mercury/attachments/share/dialog/",{__asyncDialog:{type:"Int"}})}),null);
__d("SpotlightMercurySharedMediaViewer.react",["csx","cx","fbt","invariant","ActorURI","AsyncDialog","AsyncRequest","BootloadedComponent.react","ChatPhotoViewFooterHScroll.react","ChatPhotoViewHeader.react","Event","FunnelLogger","JSResource","KeyEventController","MessagingForwardAttachmentDialog.react","MessengerPhotoInfoDialogContainer.react","MessengerThreadSharedMediaHelper","MessengerVideoPlayer.react","Parent","PhotoUtils","React","SpotlightViewer","SpotlightViewerImage","SpotlightMessagesViewerPagers.react","SpotlightViewport","SubscriptionsHandler","Vector","XMessagingPhotoDownloadController","XMessagingShareAttachmentDialogController"],(function a(b,c,d,e,f,g,h,i,j,k){"use strict";__p&&__p();var l,m,n=c("React").PropTypes,o=88,p=30,q="WWW_MESSENGER_SHARE_TO_FB_FUNNEL",r="_4-og";l=babelHelpers.inherits(s,c("React").Component);m=l&&l.prototype;function s(){__p&&__p();var t,u;for(var v=arguments.length,w=Array(v),x=0;x<v;x++)w[x]=arguments[x];return u=(t=m.constructor).call.apply(t,[this].concat(w)),this.$SpotlightMercurySharedMediaViewer1=undefined,this.$SpotlightMercurySharedMediaViewer2=[],this.state={hasPrevPage:false,hasNextPage:false,firstPhotoLoaded:false,isLoading:false,mediaData:[],numberInOneBatch:p,photoData:null,showForward:false,showInfo:false,stageDimensions:new(c("Vector"))()},this.$SpotlightMercurySharedMediaViewer11=function(){if(!this.state.photoData)return null;return c("React").createElement(c("ChatPhotoViewFooterHScroll.react"),{onScroll:this.$SpotlightMercurySharedMediaViewer18,photoID:this.state.photoData.node.id,sharedPhotos:this.state.mediaData,updateNumberInOneBatch:this.$SpotlightMercurySharedMediaViewer19,width:this.state.stageDimensions.x})}.bind(this),this.$SpotlightMercurySharedMediaViewer13=function(){return this.state.showInfo?c("React").createElement(c("MessengerPhotoInfoDialogContainer.react"),{closeInfo:this.$SpotlightMercurySharedMediaViewer21,infoOpen:this.state.showInfo,photoID:this.state.photoData.node.id}):c("React").createElement("xhp",null)}.bind(this),this.$SpotlightMercurySharedMediaViewer19=function(y){this.setState({numberInOneBatch:y})}.bind(this),this.$SpotlightMercurySharedMediaViewer18=function(y){if(!this.state.mediaData||this.state.isLoading)return;var z=this.state.mediaData.findIndex(function(B){return B.node.legacy_attachment_id===y});if(z<0)return;var A=this.state.mediaData[z];this.setState({photoData:A});this.$SpotlightMercurySharedMediaViewer22(z)}.bind(this),this.$SpotlightMercurySharedMediaViewer5=function(y,event){__p&&__p();if(this.state.photoData==null||this.state.isLoading)return;if(event&&!!c("Parent").bySelector(event.target,"._3tsq"))return;if(event&&event.target instanceof HTMLElement&&event.target.className===r)this.$SpotlightMercurySharedMediaViewer10();var z=this.state.mediaData.findIndex(function(B){this.state.photoData!=null||k(0);return B.node.legacy_attachment_id===this.state.photoData.node.legacy_attachment_id}.bind(this));if(z<0||z===this.state.mediaData.length-1&&!this.state.hasNextPage&&y)return;if(z===0&&!y){this.setState({isLoading:true},function(){return this.$SpotlightMercurySharedMediaViewer7(this.state.photoData,1,function(B){if(B===0)return;this.$SpotlightMercurySharedMediaViewer5(y)}.bind(this))}.bind(this));return}var A=y?this.state.mediaData[z+1]:this.state.mediaData[z-1];this.setState({photoData:A});this.$SpotlightMercurySharedMediaViewer22(z)}.bind(this),this.$SpotlightMercurySharedMediaViewer22=function(y){var z=this.state.numberInOneBatch,A=this.state.mediaData;if(y<=z/2)this.setState({isLoading:true},function(){return this.$SpotlightMercurySharedMediaViewer7(A[0],z,function(){})}.bind(this));else if(y>=A.length-z/2&&this.state.hasNextPage)this.setState({isLoading:true},function(){return this.$SpotlightMercurySharedMediaViewer6(A[A.length-1],z,function(){})}.bind(this))}.bind(this),this.$SpotlightMercurySharedMediaViewer10=function(){if(this.props.photoID===null)return;this.setState({photoData:null});this.props.onClosePhotoView()}.bind(this),this.$SpotlightMercurySharedMediaViewer16=function(){this.setState({showForward:true})}.bind(this),this.$SpotlightMercurySharedMediaViewer20=function(){this.setState({showForward:false})}.bind(this),this.$SpotlightMercurySharedMediaViewer15=function(){this.setState({showInfo:true})}.bind(this),this.$SpotlightMercurySharedMediaViewer21=function(){this.setState({showInfo:false})}.bind(this),this.$SpotlightMercurySharedMediaViewer17=function(){this.setState({showForward:false,showInfo:false});c("FunnelLogger").appendAction(q,"click");var y=this.state.photoData;if(!this.$SpotlightMercurySharedMediaViewer14()||!(y&&y.node))return;var z=y.node.legacy_attachment_id,A=c("XMessagingShareAttachmentDialogController").getURIBuilder().getURI(),B=new(c("AsyncRequest"))(A).setData({attachment_id:z}).setMethod("POST");c("AsyncDialog").send(B)}.bind(this),this.$SpotlightMercurySharedMediaViewer4=function(y){var z=c("MessengerThreadSharedMediaHelper").search(this.props.threadID,String(y),function(A){return this.$SpotlightMercurySharedMediaViewer23(A,0,function(){})}.bind(this));this.$SpotlightMercurySharedMediaViewer2.push(z)}.bind(this),this.$SpotlightMercurySharedMediaViewer6=function(y,z,A){var B=c("MessengerThreadSharedMediaHelper").loadMorePrevious(this.props.threadID,y.cursor,z||1,function(C){return this.$SpotlightMercurySharedMediaViewer23(C,1,A)}.bind(this));this.$SpotlightMercurySharedMediaViewer2.push(B)}.bind(this),this.$SpotlightMercurySharedMediaViewer7=function(y,z,A){var B=y?y.cursor:null,C=c("MessengerThreadSharedMediaHelper").loadMoreLatest(this.props.threadID,B,z||1,function(D){return this.$SpotlightMercurySharedMediaViewer23(D,-1,A)}.bind(this));this.$SpotlightMercurySharedMediaViewer2.push(C)}.bind(this),this.$SpotlightMercurySharedMediaViewer23=function(y,z,A){__p&&__p();var B=Object.keys(y)[0],C=y[B].message_shared_media,D=C.page_info,E=C.edges.length;if(E!==0){var F=this.state.mediaData;switch(z){case 0:this.setState({photoData:C.edges[0],mediaData:[C.edges[0]],firstPhotoLoaded:true});break;case 1:F=F.concat(C.edges);this.setState({hasNextPage:D.has_next_page,mediaData:F});break;case-1:F=C.edges;F=F.concat(this.state.mediaData);this.setState({mediaData:F,hasPrevPage:D.has_previous_page});break}}this.setState({isLoading:false});A(E)}.bind(this),this.$SpotlightMercurySharedMediaViewer3=function(){var y=new(c("Vector"))(c("Vector").getViewportDimensions().x,c("Vector").getViewportDimensions().y-o);return y},u}s.prototype.getDefaultProps=function(){return{enableShareToFB:false}};s.prototype.componentDidMount=function(){__p&&__p();this.setState({isLoading:true,stageDimensions:this.$SpotlightMercurySharedMediaViewer3()},function(){return this.$SpotlightMercurySharedMediaViewer4(this.props.photoID)}.bind(this));this.$SpotlightMercurySharedMediaViewer1=new(c("SubscriptionsHandler"))();this.$SpotlightMercurySharedMediaViewer1.addSubscriptions(c("Event").listen(window,"resize",function(){this.setState({stageDimensions:this.$SpotlightMercurySharedMediaViewer3()})}.bind(this)),c("KeyEventController").registerKey("LEFT",function(){this.$SpotlightMercurySharedMediaViewer5(false);return false}.bind(this)),c("KeyEventController").registerKey("RIGHT",function(){this.$SpotlightMercurySharedMediaViewer5(true);return false}.bind(this)));if(this.props.enableShareToFB)c("FunnelLogger").startFunnel(q)};s.prototype.componentWillUpdate=function(t,u){if(u.firstPhotoLoaded!==this.state.firstPhotoLoaded)this.setState({isLoading:true},function(){this.$SpotlightMercurySharedMediaViewer6(u.photoData,u.numberInOneBatch,function(){});this.$SpotlightMercurySharedMediaViewer7(u.photoData,u.numberInOneBatch,function(){})}.bind(this));if(u.numberInOneBatch!=this.state.numberInOneBatch&&!u.isLoading)this.setState({isLoading:true},function(){return this.$SpotlightMercurySharedMediaViewer6(u.mediaData[u.mediaData.length-1],u.numberInOneBatch,function(){})}.bind(this))};s.prototype.componentWillUnmount=function(){this.$SpotlightMercurySharedMediaViewer1&&this.$SpotlightMercurySharedMediaViewer1.release();this.$SpotlightMercurySharedMediaViewer1=null;this.$SpotlightMercurySharedMediaViewer2.forEach(function(t){return t.abandon()})};s.prototype.render=function(){var t=this.$SpotlightMercurySharedMediaViewer8(),u=this.state.stageDimensions,v=this.state.isLoading||this.props.useloadingindicator&&!this.state.photoData;if(this.state.photoData==null)return null;var w=this.state.mediaData.findIndex(function(t){this.state.photoData!=null||k(0);return t.node.id===this.state.photoData.node.id}.bind(this)),x=c("React").createElement("div",null,this.$SpotlightMercurySharedMediaViewer9(),this.props.disablepaging?null:c("React").createElement(c("SpotlightMessagesViewerPagers.react"),{disablePrevArrow:w<=0&&!this.state.hasPrevPage,disableNextArrow:!this.state.hasNextPage&&w>=this.state.mediaData.length-1}));return c("React").createElement("span",null,c("React").createElement(c("SpotlightViewer"),{className:"_53vs",onHide:this.$SpotlightMercurySharedMediaViewer10,open:this.props.photoID!==null,ref:"spotlightViewer",rootClassName:this.props.rootClassName},c("React").createElement(c("SpotlightViewport"),{active:false,fadeInNOut:true,media:t,onClick:this.$SpotlightMercurySharedMediaViewer5,ref:"viewport",showLoadingIndicator:v,stageDimensions:u,useWidth:true},x),this.$SpotlightMercurySharedMediaViewer11()),this.$SpotlightMercurySharedMediaViewer12(),this.$SpotlightMercurySharedMediaViewer13())};s.prototype.$SpotlightMercurySharedMediaViewer9=function(){if(!this.state.photoData)return null;var t=this.state.photoData,u=t.node.legacy_attachment_id,v=c("XMessagingPhotoDownloadController").getURIBuilder().setString("photo_id",u).getURI();if(this.props.actorid)v=c("ActorURI").create(v,this.props.actorid);return c("React").createElement(c("ChatPhotoViewHeader.react"),{disableForward:this.props.disableForward,enableShareToFB:this.$SpotlightMercurySharedMediaViewer14(),onClose:this.$SpotlightMercurySharedMediaViewer10,openInfo:this.$SpotlightMercurySharedMediaViewer15,ref:"photoviewheader",showForwardDialog:this.$SpotlightMercurySharedMediaViewer16,showShareDialog:this.$SpotlightMercurySharedMediaViewer17,url:v})};s.prototype.$SpotlightMercurySharedMediaViewer12=function(){if(!this.state.photoData)return null;var t=j._("Forward in separate messages");return c("React").createElement(c("MessagingForwardAttachmentDialog.react"),{attachmentID:this.state.photoData.node.legacy_attachment_id,onClose:this.$SpotlightMercurySharedMediaViewer20,shown:this.state.showForward,title:t})};s.prototype.$SpotlightMercurySharedMediaViewer14=function(){var t=this.state.photoData;if(!t)return false;return!!this.props.enableShareToFB&&t.node.__typename==="MessageImage"&&t.node.image1.uri.indexOf(".gif")<0};s.prototype.$SpotlightMercurySharedMediaViewer8=function(){__p&&__p();if(this.state.photoData&&this.state.photoData.node){var t=this.state.photoData.node;if(t.__typename&&t.__typename==="MessageVideo")return this.$SpotlightMercurySharedMediaViewer24();var u=this.state.stageDimensions,v=this.$SpotlightMercurySharedMediaViewer25(t,u);if(!v)return null;if(t.photo_encodings&&t.photo_encodings.length!==0)return this.$SpotlightMercurySharedMediaViewer26(t.legacy_attachment_id,v,t.photo_encodings,u);var w=s.getImageDimensionsForStage(new(c("Vector"))(v.width,v.height),u);return this.$SpotlightMercurySharedMediaViewer27(v,w)}else return null};s.prototype.$SpotlightMercurySharedMediaViewer24=function(){if(this.state.photoData)return c("React").createElement(c("MessengerVideoPlayer.react"),{isOnStage:true,isVisible:true,videoData:this.state.photoData.node,stageDimensions:this.state.stageDimensions});return null};s.prototype.$SpotlightMercurySharedMediaViewer27=function(t,u){return c("React").createElement(c("SpotlightViewerImage"),{dimensions:u,ref:"image",src:t.uri})};s.prototype.$SpotlightMercurySharedMediaViewer26=function(t,u,v,w){return c("React").createElement(c("BootloadedComponent.react"),{bootloadLoader:c("JSResource")("SpotlightViewerSphericalPhoto.react").__setRef("SpotlightMercurySharedMediaViewer.react"),bootloadPlaceholder:c("React").createElement("div",null),height:w.y,width:w.x,fbid:t,thumbnail:u.uri,photoEncodings:v,stageDimensions:this.state.stageDimensions})};s.prototype.$SpotlightMercurySharedMediaViewer25=function(t,u){var v=null,w=c("PhotoUtils").getImagesFromData(t);w=w.sort(function(y,z){return z.width-y.width});if(window.devicePixelRatio&&window.devicePixelRatio>1)u=new(c("Vector"))(u.x*window.devicePixelRatio,u.y*window.devicePixelRatio);for(var x=0;x<w.length;x++)if(!v||w[x].width>=u.x||w[x].height>=u.y)v=w[x];return v};s.propTypes={disableForward:n.bool,enableShareToFB:n.bool,onClosePhotoView:n.func,photoID:n.string,rootClassName:n.string,threadID:n.string};s.getImageDimensionsForStage=function(t,u){__p&&__p();var v=t.x,w=t.y,x=u.x,y=u.y,z=v/w,A=x/y;if(v>=x||w>=y)if(A<z){v=x;w=Math.round(x/z)}else if(A>z){v=Math.round(y*z);w=y}else{v=x;w=y}else if(z<A)v=Math.round(w*z);else w=Math.round(v/z);return new(c("Vector"))(v,w)};f.exports=s}),null);
__d("SpotlightMessengerSharedMediaViewer.react",["csx","cx","fbt","invariant","ActorURI","BootloadedComponent.react","JSResource","MessengerPhotoViewHScroll.react","Event","KeyEventController","MessengerForwardAttachmentDialogReact.bs","MessengerPhotoInfoDialogContainer.react","MessengerPhotoViewHeader.react","MessengerSharedMediaActions","MessengerVideoPlayer.react","Parent","PhotoUtils","React","SpotlightViewer","SpotlightViewerImage","SpotlightMessagesViewerPagers.react","SpotlightViewport","SubscriptionsHandler","Vector","XMessagingPhotoDownloadController","MessengerPhotoViewBottomBar.react"],(function a(b,c,d,e,f,g,h,i,j,k){"use strict";__p&&__p();var l,m,n=c("MessengerForwardAttachmentDialogReact.bs").jsComponent,o=c("React").PropTypes,p=88,q=80,r=30,s="_4-og";l=babelHelpers.inherits(t,c("React").Component);m=l&&l.prototype;function t(){__p&&__p();var u,v;for(var w=arguments.length,x=Array(w),y=0;y<w;y++)x[y]=arguments[y];return v=(u=m.constructor).call.apply(u,[this].concat(x)),this.$SpotlightMessengerSharedMediaViewer1=undefined,this.$SpotlightMessengerSharedMediaViewer2=[],this.state={photoData:null,showForward:false,showInfo:false,stageDimensions:new(c("Vector"))()},this.$SpotlightMessengerSharedMediaViewer14=function(z){if(!this.props.sharedMedia)return;var A=this.props.sharedMedia.findIndex(function(C){return C.node.legacy_attachment_id===z});if(A<0)return;var B=this.props.sharedMedia[A];this.setState({photoData:B});this.$SpotlightMessengerSharedMediaViewer17(A)}.bind(this),this.$SpotlightMessengerSharedMediaViewer4=function(z,event){__p&&__p();if(this.state.photoData==null)return;var A=this.state.photoData;if(event&&!!c("Parent").bySelector(event.target,"._3tsq"))return;if(event&&event.target instanceof HTMLElement&&event.target.className===s)this.$SpotlightMessengerSharedMediaViewer7();var B=this.props.sharedMedia.findIndex(function(D){return D.node.legacy_attachment_id===A.node.legacy_attachment_id});if(B<0||B===this.props.sharedMedia.length-1&&!this.props.hasNextPage&&z)return;if(B===0&&!z){c("MessengerSharedMediaActions").loadMoreLatest(this.props.threadID,this.props.sharedMedia[0].cursor,r);return}var C=z?this.props.sharedMedia[B+1]:this.props.sharedMedia[B-1];this.setState({photoData:C});this.$SpotlightMessengerSharedMediaViewer17(B)}.bind(this),this.$SpotlightMessengerSharedMediaViewer7=function(){if(this.props.photoID===null)return;this.setState({photoData:null});this.props.onClosePhotoView()}.bind(this),this.$SpotlightMessengerSharedMediaViewer12=function(){this.setState({showForward:true})}.bind(this),this.$SpotlightMessengerSharedMediaViewer15=function(){this.setState({showForward:false})}.bind(this),this.$SpotlightMessengerSharedMediaViewer11=function(){this.setState({showInfo:true})}.bind(this),this.$SpotlightMessengerSharedMediaViewer16=function(){this.setState({showInfo:false})}.bind(this),v}t.prototype.componentDidMount=function(){__p&&__p();var u=this.props.sharedMedia.find(function(v){return v.node.legacy_attachment_id===this.props.photoID}.bind(this));this.setState({photoData:u,stageDimensions:this.$SpotlightMessengerSharedMediaViewer3()});this.$SpotlightMessengerSharedMediaViewer1=new(c("SubscriptionsHandler"))();this.$SpotlightMessengerSharedMediaViewer1.addSubscriptions(c("Event").listen(window,"resize",function(){this.setState({stageDimensions:this.$SpotlightMessengerSharedMediaViewer3()})}.bind(this)),c("KeyEventController").registerKey("LEFT",function(){this.$SpotlightMessengerSharedMediaViewer4(false);return false}.bind(this)),c("KeyEventController").registerKey("RIGHT",function(){this.$SpotlightMessengerSharedMediaViewer4(true);return false}.bind(this)))};t.prototype.componentWillUnmount=function(){this.$SpotlightMessengerSharedMediaViewer1&&this.$SpotlightMessengerSharedMediaViewer1.release();this.$SpotlightMessengerSharedMediaViewer1=null;this.$SpotlightMessengerSharedMediaViewer2.forEach(function(u){return u.abandon()})};t.prototype.render=function(){var u=this.$SpotlightMessengerSharedMediaViewer5(),v=this.state.stageDimensions,w=this.props.useloadingindicator&&!this.state.photoData;if(this.state.photoData==null)return null;var x=this.props.sharedMedia.findIndex(function(u){this.state.photoData!=null||k(0);return u.node.id===this.state.photoData.node.id}.bind(this)),y=c("React").createElement("div",null,this.$SpotlightMessengerSharedMediaViewer6(),this.props.disablepaging?null:c("React").createElement(c("SpotlightMessagesViewerPagers.react"),{disablePrevArrow:x<=0&&!this.props.hasPrevPage,disableNextArrow:!this.props.hasNextPage&&x>=this.props.sharedMedia.length-1}));return c("React").createElement("span",null,c("React").createElement(c("SpotlightViewer"),{className:"_53vs",onHide:this.$SpotlightMessengerSharedMediaViewer7,open:this.props.photoID!==null,ref:"spotlightViewer",rootClassName:this.props.rootClassName},c("React").createElement(c("SpotlightViewport"),{active:false,fadeInNOut:true,media:u,onClick:this.$SpotlightMessengerSharedMediaViewer4,ref:"viewport",showLoadingIndicator:w,stageDimensions:v,useWidth:true},y),this.$SpotlightMessengerSharedMediaViewer8()),this.$SpotlightMessengerSharedMediaViewer9(),this.$SpotlightMessengerSharedMediaViewer10())};t.prototype.$SpotlightMessengerSharedMediaViewer6=function(){if(!this.state.photoData)return null;var u=this.state.photoData.node.legacy_attachment_id,v=c("XMessagingPhotoDownloadController").getURIBuilder().setString("photo_id",u).getURI();if(this.props.actorid)v=c("ActorURI").create(v,this.props.actorid);return c("React").createElement(c("MessengerPhotoViewHeader.react"),{disableForward:this.props.disableForward,onClose:this.$SpotlightMessengerSharedMediaViewer7,openInfo:this.$SpotlightMessengerSharedMediaViewer11,photoID:this.props.photoID,ref:"photoviewheader",showForwardDialog:this.$SpotlightMessengerSharedMediaViewer12,url:v})};t.prototype.$SpotlightMessengerSharedMediaViewer13=function(u){return u?Math.ceil(u/q):r};t.prototype.$SpotlightMessengerSharedMediaViewer8=function(){if(!this.state.photoData)return null;var u=this.state.photoData,v=c("React").createElement("button",{className:"_2n5b",onClick:function(){return this.props.openAlbum(u.node.legacy_attachment_id)}.bind(this),type:"button"},c("React").createElement("div",{className:"_3por"}));return c("React").createElement(c("MessengerPhotoViewBottomBar.react"),null,c("React").createElement(c("MessengerPhotoViewHScroll.react"),{onScroll:this.$SpotlightMessengerSharedMediaViewer14,photoID:u.node.legacy_attachment_id,sharedPhotos:this.props.sharedMedia,width:this.state.stageDimensions.x}),v)};t.prototype.$SpotlightMessengerSharedMediaViewer9=function(){if(!this.state.photoData||this.props.disableForward)return null;var u=j._("Forward in separate messages");return c("React").createElement(n,{attachmentID:this.state.photoData.node.legacy_attachment_id,onClose:this.$SpotlightMessengerSharedMediaViewer15,shown:this.state.showForward,title:u})};t.prototype.$SpotlightMessengerSharedMediaViewer10=function(){return this.state.showInfo?c("React").createElement(c("MessengerPhotoInfoDialogContainer.react"),{closeInfo:this.$SpotlightMessengerSharedMediaViewer16,infoOpen:this.state.showInfo,photoID:this.state.photoData.node.id}):c("React").createElement("xhp",null)};t.prototype.$SpotlightMessengerSharedMediaViewer17=function(u){var v=this.$SpotlightMessengerSharedMediaViewer13(this.state.stageDimensions.x),w=this.props.sharedMedia;if(u<=v/2){c("MessengerSharedMediaActions").loadMoreLatest(this.props.threadID,w[0].cursor,v);if(w.length<v&&this.props.hasNextPage)c("MessengerSharedMediaActions").loadMorePrevious(this.props.threadID,w[w.length-1].cursor,v)}else if(u>=w.length-v/2&&this.props.hasNextPage)c("MessengerSharedMediaActions").loadMorePrevious(this.props.threadID,w[w.length-1].cursor,v)};t.prototype.$SpotlightMessengerSharedMediaViewer3=function(){var u=new(c("Vector"))(c("Vector").getViewportDimensions().x,c("Vector").getViewportDimensions().y-p);return u};t.prototype.$SpotlightMessengerSharedMediaViewer5=function(){__p&&__p();if(this.state.photoData&&this.state.photoData.node){var u=this.state.photoData.node;if(u.__typename&&u.__typename==="MessageVideo")return this.$SpotlightMessengerSharedMediaViewer18();var v=this.state.stageDimensions,w=this.$SpotlightMessengerSharedMediaViewer19(u,v);if(!w)return null;if(u.photo_encodings&&u.photo_encodings.length!==0)return this.$SpotlightMessengerSharedMediaViewer20(u.legacy_attachment_id,w,u.photo_encodings,v);var x=t.getImageDimensionsForStage(new(c("Vector"))(w.width,w.height),v);return this.$SpotlightMessengerSharedMediaViewer21(w,x)}else return null};t.prototype.$SpotlightMessengerSharedMediaViewer18=function(){if(this.state.photoData)return c("React").createElement(c("MessengerVideoPlayer.react"),{isVisible:true,isOnStage:true,videoData:this.state.photoData.node,stageDimensions:this.state.stageDimensions});return null};t.prototype.$SpotlightMessengerSharedMediaViewer21=function(u,v){return c("React").createElement(c("SpotlightViewerImage"),{dimensions:v,ref:"image",src:u.uri})};t.prototype.$SpotlightMessengerSharedMediaViewer20=function(u,v,w,x){return c("React").createElement(c("BootloadedComponent.react"),{bootloadLoader:c("JSResource")("SpotlightViewerSphericalPhoto.react").__setRef("SpotlightMessengerSharedMediaViewer.react"),bootloadPlaceholder:c("React").createElement("div",null),height:x.y,width:x.x,fbid:u,thumbnail:v.uri,photoEncodings:w,stageDimensions:this.state.stageDimensions})};t.prototype.$SpotlightMessengerSharedMediaViewer19=function(u,v){var w=null,x=c("PhotoUtils").getImagesFromData(u);x=x.sort(function(z,A){return A.width-z.width});if(window.devicePixelRatio&&window.devicePixelRatio>1)v=new(c("Vector"))(v.x*window.devicePixelRatio,v.y*window.devicePixelRatio);for(var y=0;y<x.length;y++)if(!w||x[y].width>=v.x||x[y].height>=v.y)w=x[y];return w};t.propTypes={disableForward:o.bool,hasPrevPage:o.bool,hasNextPage:o.bool,onClosePhotoView:o.func,openAlbum:o.func,photoID:o.string,rootClassName:o.string,threadID:o.string,sharedMedia:o.arrayOf(o.object)};t.getImageDimensionsForStage=function(u,v){__p&&__p();var w=u.x,x=u.y,y=v.x,z=v.y,A=w/x,B=y/z;if(w>=y||x>=z)if(B<A){w=y;x=Math.round(y/A)}else if(B>A){w=Math.round(z*A);x=z}else{w=y;x=z}else if(A<B)w=Math.round(x*A);else x=Math.round(w/A);return new(c("Vector"))(w,x)};f.exports=t}),null);
__d("SpotlightMessengerSharedMediaViewerContainer.react",["FluxContainer","MessengerSharedMediaStore","MessengerSharedMediaActions","React","SpotlightMessengerSharedMediaViewer.react"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();var h,i;h=babelHelpers.inherits(j,c("React").PureComponent);i=h&&h.prototype;j.getStores=function(){return[c("MessengerSharedMediaStore")]};j.calculateState=function(k,l){var m=c("MessengerSharedMediaStore").getState(),n=m.sharedMedia.get(l.threadID),o=m.isLoading.get(l.threadID);return{sharedMedia:n,isLoading:o}};j.prototype.componentDidMount=function(){c("MessengerSharedMediaActions").loadCurrent(this.props.threadID,this.props.photoID)};j.prototype.render=function(){if(!this.state.sharedMedia)return null;var k=this.state.sharedMedia&&this.state.sharedMedia.edges.find(function(l){return l.node.legacy_attachment_id===this.props.photoID}.bind(this));if(!k)return null;return c("React").createElement(c("SpotlightMessengerSharedMediaViewer.react"),{disableForward:this.props.disableForward,hasPrevPage:this.state.sharedMedia&&this.state.sharedMedia.has_previous_page,hasNextPage:this.state.sharedMedia&&this.state.sharedMedia.has_next_page,onClosePhotoView:this.props.onClosePhotoView,openAlbum:this.props.openAlbum,photoID:this.props.photoID,rootClassName:this.props.rootClassName,sharedMedia:this.state.sharedMedia&&this.state.sharedMedia.edges,threadID:this.props.threadID})};function j(){h.apply(this,arguments)}f.exports=c("FluxContainer").create(j,{withProps:true})}),null);
__d("MessengerThreadSharedPhotos.react",["cx","MessengerSharedPhotosAlbumViewContainer.react","React","SpotlightViewer","SpotlightMessengerSharedMediaViewerContainer.react"],(function a(b,c,d,e,f,g,h){"use strict";__p&&__p();var i,j,k=c("React").PropTypes;i=babelHelpers.inherits(l,c("React").Component);j=i&&i.prototype;function l(){var m,n;for(var o=arguments.length,p=Array(o),q=0;q<o;q++)p[q]=arguments[q];return n=(m=j.constructor).call.apply(m,[this].concat(p)),this.state={photoView:this.props.findFBID,albumView:""},this.$MessengerThreadSharedPhotos3=function(r){this.setState({albumView:r,photoView:""})}.bind(this),this.$MessengerThreadSharedPhotos4=function(){this.setState({albumView:""})}.bind(this),this.$MessengerThreadSharedPhotos5=function(r){this.setState({albumView:"",photoView:r})}.bind(this),this.$MessengerThreadSharedPhotos6=function(){this.setState({photoView:""})}.bind(this),this.$MessengerThreadSharedPhotos7=function(r){this.setState({photoView:r})}.bind(this),n}l.prototype.componentDidUpdate=function(){!this.state.photoView&&!this.state.albumView&&this.props.onCloseSharedPhotos()};l.prototype.render=function(){var m=this.state.photoView?this.$MessengerThreadSharedPhotos1():null,n=this.state.albumView?this.$MessengerThreadSharedPhotos2():null;return c("React").createElement("div",null,n,m)};l.prototype.$MessengerThreadSharedPhotos1=function(){return c("React").createElement(c("SpotlightMessengerSharedMediaViewerContainer.react"),{disableForward:false,onClosePhotoView:this.$MessengerThreadSharedPhotos6,openAlbum:this.$MessengerThreadSharedPhotos3,photoID:this.state.photoView,rootClassName:"",threadID:this.props.threadFBID})};l.prototype.$MessengerThreadSharedPhotos2=function(){return c("React").createElement(c("SpotlightViewer"),{className:"_3ode",onHide:this.$MessengerThreadSharedPhotos4,open:true,ref:"spotlightViewer"},c("React").createElement(c("MessengerSharedPhotosAlbumViewContainer.react"),{onClick:this.$MessengerThreadSharedPhotos5,onCloseSharedPhotos:this.props.onCloseSharedPhotos,threadID:this.props.threadFBID,viewedPhoto:this.state.albumView}))};l.propTypes={findFBID:k.string,onCloseSharedPhotos:k.func,threadFBID:k.string};f.exports=l}),null);
__d("MessengerThreadSharedPhotosReact.bs",["ReasonReact.bs","MessengerThreadSharedPhotos.react"],(function a(b,c,d,e,f,g){"use strict";function h(i,j,k,l){return c("ReasonReact.bs").wrapJsForReason(c("MessengerThreadSharedPhotos.react"),{findFBID:i,onCloseSharedPhotos:j,threadFBID:k},l)}g.make=h}),null);
__d("MessengerVideoPlayerReact.bs",["Utils.bs","ReasonReact.bs","bs_js_null_undefined","MessengerVideoPlayer.react"],(function a(b,c,d,e,f,g){"use strict";function h(i,j,k,l,m,n,o,p,q,r){return c("ReasonReact.bs").wrapJsForReason(c("MessengerVideoPlayer.react"),{attachment:c("bs_js_null_undefined").from_opt(i),className:c("bs_js_null_undefined").from_opt(j),isInThread:c("Utils.bs").optionBoolToNullUndefinedBoolean(k),isVisible:c("Utils.bs").optionBoolToNullUndefinedBoolean(l),isOnStage:c("Utils.bs").optionBoolToNullUndefinedBoolean(m),stageDimensions:c("bs_js_null_undefined").from_opt(n),videoData:o,onClick:c("bs_js_null_undefined").from_opt(p),onSelect:c("bs_js_null_undefined").from_opt(q)},r)}g.make=h}),null);
__d("MessengerVideoReact.bs",["cx","ix","bs_curry","React","Utils.bs","ImageReact.bs","bs_js_boolean","bs_pervasives","ReasonReact.bs","joinClasses","bs_js_primitive","MessengerPhotoReact.bs","MessengerVideoPlayerReact.bs"],(function a(b,c,d,e,f,g,h,i){"use strict";__p&&__p();var j=c("ReasonReact.bs").statelessComponent("MessengerVideo");function k(o){__p&&__p();var p=true,q=true,r=false,s=o.metadata,t=0;if(s==null)t=1;else if(c("Utils.bs").isDefined(s.fbid)){var u=+(window.screen.width>1800)&&c("Utils.bs").isDefined(s.large_size)&&c("Utils.bs").isDefined(s.large_preview),v=s.fbid,w=u!==0?s.large_size:s.inbox_size,x=w==null?{x:0,y:0}:{x:w.width,y:w.height},y=u!==0?s.large_preview:s.inbox_preview;return{legacy_attachment_id:v,original_dimensions:x,start_muted:p,hide_controls_on_finish:q,url:y,is_share:r}}else t=1;if(t===1)return{legacy_attachment_id:null,original_dimensions:null,start_muted:p,hide_controls_on_finish:q,url:null,is_share:r}}function l(o){var p=o%60,q=+(p<10);return c("bs_pervasives").string_of_int(o/60|0)+(":"+((q!==0?"0":"")+c("bs_pervasives").string_of_int(p)))}function m(o,p,q,r,s,t,u,v){__p&&__p();var w=o?o[0]:"",x=function x(){var B=p.metadata,C=p.media,D=B==null?C==null?0:c("bs_js_primitive").null_undefined_to_opt(C.duration):c("bs_js_primitive").null_undefined_to_opt(B.duration);if(D)return l(D[0]);else return null},y=function y(){if(t)return c("bs_curry")._1(t[0],p);else return 0},z=function z(B){var C=B.legacy_attachment_id;if(c("Utils.bs").isDefined(C))return[c("ReasonReact.bs").element(0,0,c("MessengerVideoPlayerReact.bs").make([p],[c("joinClasses")(w,"_ccq","_4tsk","_3o67",c("bs_js_boolean").to_js_boolean(q)?"_52mr":"")],[1],s,0,0,B,[y],u,[]))];else return 0},A=j.slice();A[9]=function(){var B=k(p),C=z(B);if(C)return C[0];else return c("ReasonReact.bs").element(0,0,c("MessengerPhotoReact.bs").make([c("joinClasses")(w,"_ccq")],p,q,0,r,t,[c("ReasonReact.bs").element(0,0,c("ImageReact.bs").make(["_ccr"],0,[i("27983")],0,0,0,0,[])),c("React").createElement("span",{className:"_ccs"},x(0))]))};return A}var n=1800;g.component=j;g.large_window_width=n;g.constructVideoData=k;g.formatDuration=l;g.make=m}),null);
__d("MessengerXMATextBlock.react",["cx","LineClamp.react","React","ShimButton.react","joinClasses"],(function a(b,c,d,e,f,g,h){"use strict";__p&&__p();var i,j,k=c("React").PropTypes,l=26;i=babelHelpers.inherits(m,c("React").Component);j=i&&i.prototype;function m(){var n,o;for(var p=arguments.length,q=Array(p),r=0;r<p;r++)q[r]=arguments[r];return o=(n=j.constructor).call.apply(n,[this].concat(q)),this.$MessengerXMATextBlock1=function(){this.props.url&&window.open(this.props.url)}.bind(this),o}m.prototype.render=function(){if(!this.props)return c("React").createElement("div",{className:"__6j"});var n=this.props.width?{maxWidth:this.props.width-l,textAlign:"left"}:{textAlign:"left"},o={textDecoration:"none"};return c("React").createElement("div",{className:c("joinClasses")(this.props.className,"__6j _43kk"),style:n},c("React").createElement(c("ShimButton.react"),{form:"link",onClick:this.$MessengerXMATextBlock1,style:o},this.renderTitle(),this.renderDescription(),this.renderSource()))};m.prototype.renderTitle=function(){if(!this.props.title)return null;return c("React").createElement("div",{className:"__6k"},c("React").createElement(c("LineClamp.react"),{lines:2,lineHeight:16},this.props.title))};m.prototype.renderDescription=function(){if(!this.props.description)return null;return c("React").createElement("div",{className:"__6l"},c("React").createElement(c("LineClamp.react"),{lines:2,lineHeight:15},this.props.description))};m.prototype.renderSource=function(){if(!this.props.source)return null;return c("React").createElement("div",{className:"__6m"},c("React").createElement(c("LineClamp.react"),{lines:1,lineHeight:14},this.props.source))};m.propTypes={className:k.string,description:k.string,source:k.string,title:k.string,url:k.string,width:k.number};f.exports=m}),null);
__d("MessengerXMATextBlockReact.bs",["ReasonReact.bs","bs_js_null_undefined","MessengerXMATextBlock.react"],(function a(b,c,d,e,f,g){"use strict";function h(i,j,k,l,m,n,o){return c("ReasonReact.bs").wrapJsForReason(c("MessengerXMATextBlock.react"),{className:c("bs_js_null_undefined").from_opt(i),description:c("bs_js_null_undefined").from_opt(j),source:c("bs_js_null_undefined").from_opt(k),title:c("bs_js_null_undefined").from_opt(l),url:c("bs_js_null_undefined").from_opt(m),width:c("bs_js_null_undefined").from_opt(n)},o)}g.make=h}),null);
__d("MessengerVideoXMAReact.bs",["cx","React","Utils.bs","bs_pervasives","ReasonReact.bs","joinClasses","bs_js_primitive","MessengerVideoPlayerReact.bs","MessengerXMATextBlockReact.bs"],(function a(b,c,d,e,f,g,h){"use strict";__p&&__p();var i=c("ReasonReact.bs").statelessComponent("MessengerVideoXMA");function j(p){if(p==null)return null;else{var q=c("bs_pervasives").max(p.width,p.height),r=+(window.screen.width>1800),s=r!==0?640:450;if(q<=s)return{x:p.width,y:p.height};else{var t=s/q,u=p.width*t|0,v=p.height*t|0;return{x:u,y:v}}}}function k(p){__p&&__p();var q=p.media,r=p.target;if(q==null)return 0;else if(r==null)return 0;else if(c("Utils.bs").isDefined(q.image_size)&&c("Utils.bs").isDefined(r.video_id)){var s=q.image_size;return[{legacy_attachment_id:r.video_id,original_dimensions:j(s),start_muted:true,hide_controls_on_finish:true,url:q.image,is_share:true}]}else return 0}function l(p,q,r,s,t){var u=p?p[0]:"",v=function v(y){if(y)return c("ReasonReact.bs").element(0,0,c("MessengerVideoPlayerReact.bs").make([q],[c("joinClasses")(u,"_ccq","_4tsk","_3o67","_52mr")],[1],r,0,0,y[0],0,s,[]));else return null},w=function w(y){return c("ReasonReact.bs").element(0,0,c("MessengerXMATextBlockReact.bs").make(["_2f5n _4br2 _29ew _3dug"],c("bs_js_primitive").null_undefined_to_opt(q.description),c("bs_js_primitive").null_undefined_to_opt(q.source),c("bs_js_primitive").null_undefined_to_opt(q.video_title),c("bs_js_primitive").null_undefined_to_opt(q.uri),y?[y[0].x]:0,[]))},x=i.slice();x[9]=function(){var y=k(q),z=v(y);return c("React").createElement("div",{className:"_3duc"},z,w(y?c("bs_js_primitive").null_undefined_to_opt(y[0].original_dimensions):0))};return x}var m=640,n=450,o=1800;g.large_preview_dim=m;g.thumbinail_inbox_dim=n;g.large_window_width=o;g.component=i;g.adjustSize=j;g.constructVideoData=k;g.make=l}),null);
__d("MessengerPhotosGroupReact.bs",["cx","URI","FBID.bs","bs_list","bs_array","bs_block","bs_curry","React","Utils.bs","ActorURI","bs_caml_array","bs_js_boolean","MercuryIDs","bs_pervasives","ReasonReact.bs","joinClasses","bs_js_primitive","bs_js_null_undefined","MessagesViewerSetID","MessengerPhotoReact.bs","MessengerVideoReact.bs","MercuryAttachmentType","getPageIDFromThreadID","MessagingGiftWrapReact.bs","MessengerVideoXMAReact.bs","bs_caml_builtin_exceptions","ChatSpeakingStickerReact.bs","MercuryAttachmentPayload.bs","MessengerAttachmentViewer","MessagingFlowerBorderReact.bs","MessengerThreadSharedPhotosReact.bs"],(function aa(ba,a,ca,da,ea,b,fa){"use strict";__p&&__p();var c="empty-spacer",d=a("ReasonReact.bs").reducerComponent("MessengerPhotosGroup");function e(g,h,i,j,k,l,m,n,o,p,q,r,s,t,u){__p&&__p();var v=i?i[0]:"",w=function w(g){var C=g.length,D=+(C===2||C===4);return a("joinClasses")(v,"_2n8h",a("bs_js_boolean").to_js_boolean(+(C===1))?"_2n8i":"",a("bs_js_boolean").to_js_boolean(D)?"_4ksk":"",a("bs_js_boolean").to_js_boolean(+(C>1)&&1-D)?"_2n8k":"","_5fk1")},x=function x(){__p&&__p();if(p){var C=p[0],D=C.thread_fbid;if(D==null)return a("MercuryIDs").getThreadFBIDFromThreadID(C.thread_id);else{var E=+(a("FBID.bs").compare(D,"")===0);if(E!==0)return a("MercuryIDs").getThreadFBIDFromThreadID(C.thread_id);else return D}}else return null},y=function y(C,D){var E=x(0),F=D.metadata,G=F==null?null:F.fbid;return a("ReasonReact.bs").element(0,0,a("MessengerThreadSharedPhotosReact.bs").make(G,function(){return a("bs_curry")._1(C[4],0)},E,[]))},z=function z(C,D,E,F){__p&&__p();var G=a("Utils.bs").isDefined(D.deduplication_key),H=D.metadata,I;if(G!==0)I=D.deduplication_key;else if(H==null)I=D.upload_id;else{var J=H.fbid;I=J==null?null:J}var K=a("Utils.bs").$pipe$unknown(I==null?0:[I],""),L;if(!E&&!a("Utils.bs").isSomeTrue(m)){var M=D.metadata,N=0;if(M==null)N=1;else if(a("Utils.bs").isDefined(M.fbid)){var O=1-a("Utils.bs").isDefined(D.app_attribution);L=O!==0?[function(D){return a("bs_curry")._1(C[4],[D])}]:[function(ga){__p&&__p();var Z=M,D=ga;if(a("Utils.bs").isTruthy(D.preview_uploading))return 0;else if(D.attach_type===a("MercuryAttachmentType").VIDEO){var P=Z.dimensions,V=P==null?{x:null,y:null}:{x:P.width,y:P.height};a("MessengerAttachmentViewer").renderVideo({pageID:a("bs_js_null_undefined").from_opt(t),rootClassName:"_1j1h",videoID:Z.fbid,videoSize:V,videoURI:D.url});return 0}else if(D.attach_type===a("MercuryAttachmentType").PHOTO||D.attach_type===a("MercuryAttachmentType").THIRDPARTYSTICKER||D.attach_type===a("MercuryAttachmentType").ANIMATED_IMAGE){var ha=+(g.length===1),ia=D.url,S;if(!a("Utils.bs").isSomeTrue(n)&&D.attach_type===a("MercuryAttachmentType").PHOTO&&j!==0){var ja=x(0),ka=+(j===[1]),$=new(a("URI"))("/ajax/messaging/attachments/sharedphotos.php").setQueryData({thread_id:ja,image_id:Z.fbid}),la=t?new(a("ActorURI").create)($,t[0]):$;S=[a("MessagesViewerSetID").MESSAGES_VIEW_ALL_IN_THREAD,la,ka]}else S=[null,ia,ha];a("MessengerAttachmentViewer").bootstrapWithConfig({actorid:a("bs_js_null_undefined").from_opt(t),dimensions:Z.dimensions,disableForward:a("bs_js_boolean").to_js_boolean(+(t!==0)),disablePaging:a("bs_js_boolean").to_js_boolean(S[2]),endpoint:S[1],fbid:Z.fbid,rootClassName:"_1j1h",setID:S[0],snapToPhoto:true,src:D.preview_url});return 0}else if(a("Utils.bs").isDefined(D.uri))return window.open(D.uri);else return 0}]}else N=1;if(N===1){var P=a("Utils.bs").isDefined(D.uri);if(P!==0){var Q=D.uri;L=[function(){return window.open(Q)}]}else L=0}}else L=0;var R=a("Utils.bs").$pipe$unknown(h,D.attach_type);if(R===a("MercuryAttachmentType").PHOTO||R===a("MercuryAttachmentType").ANIMATED_IMAGE||R===a("MercuryAttachmentType").THIRDPARTYSTICKER)return a("ReasonReact.bs").element([K],0,a("MessengerPhotoReact.bs").make(0,D,F,o,q,L,[]));else if(R===a("MercuryAttachmentType").VIDEO){var S=D.metadata,T=0;if(S==null)T=1;else if(a("Utils.bs").isTruthy(S.render_as_sticker)){var U=S.dimensions,V=U==null?{height:null,width:null}:{height:U.height,width:U.width},W=D.url;return a("ReasonReact.bs").element(0,0,a("ChatSpeakingStickerReact.bs").make(W,V,[]))}else T=1;if(T===1)if(a("Utils.bs").isSomeTrue(n))return a("ReasonReact.bs").element([K],0,a("MessengerVideoXMAReact.bs").make(0,D,o,r,[]));else return a("ReasonReact.bs").element([K],0,a("MessengerVideoReact.bs").make(0,D,F,q,o,L,r,[]))}else if(R===c){var X={className:"_4tsk _4rf-"},Y=a("bs_js_primitive").null_undefined_to_opt(D.key);if(Y)X.key=Y[0];return a("React").createElement("div",X)}else throw[a("bs_caml_builtin_exceptions").invalid_argument,R+" is not handled by MessengerPhotosGroup"]},A=function A(C,g,D){__p&&__p();if(g.length===1)return z(C,a("bs_caml_array").caml_array_get(g,0),D,1);else{var E=+(g.length===2||g.length===4),F=E!==0?2:3,G=0,H=[0],I=g.length;while(H[0]<I){var J=a("bs_pervasives").min(F,I-H[0]|0),K=a("bs_array").init(F,function(J){return function(L){var E=+(L<J);if(E!==0)return z(C,a("bs_caml_array").caml_array_get(g,H[0]+L|0),D,0);else{var M="ghost"+a("bs_pervasives").string_of_int(F-L|0),N=a("MercuryAttachmentPayload.bs").create(c,[M],new(a("URI"))(""));return z(C,N,D,0)}}}(J));G=[a("React").createElement("div",{key:a("bs_pervasives").string_of_int(H[0]),className:"_2n8g"},K),G];H[0]=H[0]+F|0}return a("bs_array").of_list(a("bs_list").rev(G))}},B=d.slice();B[4]=function(){a("MessengerAttachmentViewer").preload();return 0};B[9]=function(C){var D=p?a("Utils.bs").isDefined(a("getPageIDFromThreadID")(p[0].thread_id)):0,E=A(C,g,D),F=a("Utils.bs").isSomeTrue(l),G=F!==0?a("React").createElement("div",undefined,E):E,H=C[2][0],I=H?y(C,H[0]):null,J=a("Utils.bs").isSomeTrue(l),K=a("Utils.bs").isSomeTrue(k);return a("React").createElement("div",{className:w(g),tabIndex:0},I,G,J!==0?a("ReasonReact.bs").element(0,0,a("MessagingGiftWrapReact.bs").make(0,s,[])):null,K!==0?a("ReasonReact.bs").element(0,0,a("MessagingFlowerBorderReact.bs").make(-10,[])):null)};B[10]=function(){return[0]};B[12]=function(C,u){if(C)return a("bs_block").__(0,[[[C[0]]]]);else return a("bs_block").__(0,[[0]])};return B}var f=a("ReasonReact.bs").wrapReasonForJs(d,function(g){return e(g.attachments,a("bs_js_primitive").null_undefined_to_opt(g.attachType),a("bs_js_primitive").null_undefined_to_opt(g.className),g.count,a("Utils.bs").nullUndefinedBooleanToOptionBool(g.hasFlowerBorder),a("Utils.bs").nullUndefinedBooleanToOptionBool(g.isGiftWrapped),a("Utils.bs").nullUndefinedBooleanToOptionBool(g.isPageMessage),a("Utils.bs").nullUndefinedBooleanToOptionBool(g.isXMA),a("Utils.bs").nullUndefinedBooleanToOptionBool(g.isVisible),a("bs_js_primitive").null_undefined_to_opt(g.message),a("bs_js_primitive").null_undefined_to_opt(g.onAttachmentLoad),a("bs_js_primitive").null_undefined_to_opt(g.onSelect),a("bs_js_primitive").null_undefined_to_opt(g.onUnwrap),a("bs_js_primitive").null_undefined_to_opt(g.pageID),[])});b.empty_spacer_type=c;b.component=d;b.make=e;b.jsComponent=f}),null);
__d("MessengerPhotosGroup.react",["MessengerPhotosGroupReact.bs"],(function a(b,c,d,e,f,g){"use strict";var h=c("MessengerPhotosGroupReact.bs").jsComponent;f.exports=h}),null);
__d("MessengerStickerUtils",["MercuryAttachmentType"],(function a(b,c,d,e,f,g){"use strict";function h(k){return!!(k&&k.attach_type===c("MercuryAttachmentType").STICKER)}function i(k){var l=k.attachments;return!!(k.is_like_preview||k.sticker_id||l&&l.length===1&&h(l[0]))}function j(k){return k.size===1&&i(k.first())}f.exports={isStickerMessageGroup:j,isStickerMessage:i,isStickerAttachment:h}}),null);
__d("MessengerVoiceClipAttachment.react",["cx","MercuryAttachmentAudioClip.react","MercuryShareAttachmentRenderLocations","MessagingGiftWrap.react","MessagingFlowerBorder.react","React","messengerCustomColorUtils"],(function a(b,c,d,e,f,g,h){"use strict";__p&&__p();var i,j,k=c("React").PropTypes;i=babelHelpers.inherits(l,c("React").PureComponent);j=i&&i.prototype;l.prototype.render=function(){var m=this.props.attachment,n=m.metadata.duration/1e3,o=!!m.app_attribution,p={};if(this.props.customColor)p=c("messengerCustomColorUtils").customBubbleStyle(this.props.customColor,p);var q=this.props.isGiftWrapped?c("React").createElement(c("MessagingGiftWrap.react"),{onUnwrap:this.props.onUnwrap}):null,r=this.props.hasFlowerBorder?c("React").createElement(c("MessagingFlowerBorder.react"),{offset:-10}):null;return c("React").createElement("div",{className:"_hh7 _s1-"+(!!this.props.customColor?" _5sxi":"")+(!o?" _52mr":"")+(o?" _mxz":"")+" _1fz8"+(o?" _1-wa":"")+" _1nqp",style:p},c("React").createElement(c("MercuryAttachmentAudioClip.react"),{customColor:this.props.customColor,src:m.url,duration:n,key:"audio:"+this.props.message.message_id,showHelp:false,width:200,location:c("MercuryShareAttachmentRenderLocations").MESSENGER,rootClassName:"_3czg"+(o?" _4yjw":"")+" _2poz _ui9"}),q,r)};function l(){i.apply(this,arguments)}l.propTypes={attachment:k.object.isRequired,customColor:k.string,isGiftWrapped:k.bool,message:k.object.isRequired,onUnwrap:k.func};f.exports=l}),null);
__d("XStickerInTrayController",["XController"],(function a(b,c,d,e,f,g){f.exports=c("XController").create("/stickers/in_tray/",{pack_id:{type:"Int",required:true}})}),null);
__d("StickersPackInTray",["Promise","AsyncRequest","react-relay/classic/query/RelayQL","react-relay/classic/store/RelayStore","XStickerInTrayController","react-relay/classic/query/createRelayQuery"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();var h={onIsPackInTray:function i(j,k,l){__p&&__p();var m=c("react-relay/classic/query/createRelayQuery")(function(){return{children:[{children:[{calls:[{kind:"Call",metadata:{type:"StickerInterfaces"},name:"interface",value:{kind:"CallVariable",callVariableName:"stickerInterface"}},{kind:"Call",metadata:{type:"Int"},name:"first",value:{kind:"CallValue",callValue:1e4}}],children:[{children:[{children:[{fieldName:"id",kind:"Field",metadata:{isRequisite:true},type:"ID"}],fieldName:"node",kind:"Field",metadata:{canHaveSubselections:true,inferredRootCallName:"node",inferredPrimaryKey:"id",isRequisite:true},type:"StickerPack"},{fieldName:"cursor",kind:"Field",metadata:{isGenerated:true,isRequisite:true},type:"ID"}],fieldName:"edges",kind:"Field",metadata:{canHaveSubselections:true,isPlural:true},type:"PacksInTrayEdge"},{children:[{fieldName:"has_next_page",kind:"Field",metadata:{isGenerated:true,isRequisite:true},type:"Boolean"},{fieldName:"has_previous_page",kind:"Field",metadata:{isGenerated:true,isRequisite:true},type:"Boolean"}],fieldName:"page_info",kind:"Field",metadata:{canHaveSubselections:true,isGenerated:true,isRequisite:true},type:"PageInfo"}],fieldName:"tray_packs",kind:"Field",metadata:{canHaveSubselections:true,isConnection:true},type:"PacksInTrayConnection"}],fieldName:"sticker_store",kind:"Field",metadata:{canHaveSubselections:true},type:"StickerStore"}],fieldName:"viewer",kind:"Query",metadata:{},name:"StickersPackInTray",type:"Viewer"}}(),{stickerInterface:k}),n=c("react-relay/classic/store/RelayStore").readQuery(m);n=n&&n.length>0?n[0]:null;if(n&&n.sticker_store&&n.sticker_store.tray_packs&&n.sticker_store.tray_packs.edges)return new(c("Promise"))(function(p,q){return p({in_sticker_tray:n.sticker_store.tray_packs.edges.filter(function(r){return r.node.id===j}).length>0})}).then(l);var o=c("XStickerInTrayController").getURIBuilder().setInt("pack_id",j).getURI();return new(c("Promise"))(function(p,q){return new(c("AsyncRequest"))(o).setHandler(function(r){return p(r.getPayload())}).setAllowCrossPageTransition(true).send()}).then(l)}};f.exports=h}),null);
__d("StickersStateStore",["FluxReduceStore","immutable","StickersActions","StickersConfig","StickersDispatcher"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();var h,i;h=babelHelpers.inherits(j,c("FluxReduceStore"));i=h&&h.prototype;j.prototype.getInitialState=function(){return c("immutable").Map({recentStickers:[],recentStickersLoaded:false,showFlyout:false,storePackID:null,threadID:null,trayLoaded:false,trayPackID:null})};j.prototype.reduce=function(k,l){__p&&__p();var m=l,n=c("StickersActions").Types;switch(m.type){case n.ADD_RECENT_STICKER:var o=[m.sticker];k.get("recentStickers").forEach(function(p){if(p.id===m.sticker.id)return;o.push(p)});return k.set("recentStickers",o.splice(0,c("StickersConfig").max_mru_stickers));case n.HIDE_FLYOUT:return k.set("showFlyout",false);case n.LOAD_RECENT_STICKERS:return k.set("recentStickersLoaded",true).set("recentStickers",m.stickers);case n.SELECT_STORE_PACK:return k.set("storePackID",m.packID);case n.SELECT_TRAY_PACK:return k.set("trayPackID",m.packID).set("trayLoaded",true);case n.SHOW_FLYOUT:return k.set("showFlyout",true).set("threadID",m.threadID);case n.TRAY_LOADED:return k.set("trayLoaded",true);default:return k}};function j(){h.apply(this,arguments)}f.exports=new j(c("StickersDispatcher"))}),null);
__d("StickersStoreController",["cx","Bootloader","DialogFitHeight","DOM","LayerAutoFocus","LayerFadeOnHide","LayerHideOnEscape","PureStoreBasedStateMixin","React","ReactDOM","StickersActions","StickersDispatcher","StickersStateStore","XUIDialog.react","XUIDialogBody.react","XUISpinner.react","isSocialPlugin","requestAnimationFrame"],(function a(b,c,d,e,f,g,h){"use strict";__p&&__p();var i=c("React").PropTypes,j=688,k=320,l=null,m=c("React").createClass({displayName:"StoreLayer",mixins:[c("PureStoreBasedStateMixin")(c("StickersStateStore"))],propTypes:{isComposer:i.bool,onToggle:i.func.isRequired,shown:i.bool.isRequired},getDefaultProps:function r(){return{isComposer:false}},statics:{calculateState:function r(){return{packID:c("StickersStateStore").getState().get("storePackID")}}},getInitialState:function r(){return{renderStore:function s(){return c("React").createElement("div",{className:"_5r5e"},c("React").createElement(c("XUISpinner.react"),{background:"light",size:"large"}))}}},componentWillMount:function r(){c("StickersDispatcher").explicitlyRegisterStores([c("StickersStateStore")])},shouldComponentUpdate:function r(s){return!!s.shown},componentDidMount:function r(){c("Bootloader").loadModules(["StickersStore.react","react-relay/classic/container/RelayRootContainer","StickersStorePackListRoute","StickersStorePackDetailRoute"],function(s,t,u,v){this.setState({renderStore:function(){var w=this.state.packID?new v({packID:this.state.packID}):new u();return c("React").createElement(t,{Component:s,route:w,renderFetched:function(x){return c("React").createElement(s,babelHelpers["extends"]({},x,{isComposer:this.props.isComposer,packID:this.state.packID,shown:this.props.shown}))}.bind(this)})}.bind(this)})}.bind(this),"StickersStoreController")},_onToggle:function r(s){c("requestAnimationFrame")(function(){return this.props.onToggle(s)}.bind(this))},render:function r(){var s=c("isSocialPlugin")()&&document.body.offsetWidth<j?k:j;return c("React").createElement(c("XUIDialog.react"),{behaviors:{DialogFitHeight:c("DialogFitHeight"),LayerAutoFocus:c("LayerAutoFocus"),LayerFadeOnHide:c("LayerFadeOnHide"),LayerHideOnEscape:c("LayerHideOnEscape")},onToggle:this._onToggle,shown:this.props.shown,width:s},c("React").createElement(c("XUIDialogBody.react"),{className:"_5rq- autofocus"},this.state.renderStore()))}}),n=function n(r){if(!l){l=c("DOM").create("div");c("DOM").appendContent(document.body,l)}c("ReactDOM").render(c("React").createElement(m,{isComposer:r,onToggle:p,shown:true}),l)},o=function o(){if(!l)return;c("ReactDOM").render(c("React").createElement(m,{shown:false,onToggle:p}),l)},p=function p(r){r?n():o()},q={showStore:function r(s,t){c("StickersActions").selectStorePack(s);n(!!t)}};f.exports=q}),null);
__d("isRetina",[],(function a(b,c,d,e,f,g){"use strict";f.exports=function(){return(window.devicePixelRatio||1)>1}}),null);
__d("MessengerAttachmentRenderer",["cx","EmojiSticker.react","MercuryAttachment","MercuryAttachmentType","MercuryAudioType","MercuryIDs","MercuryShareAttachment.react","MercuryShareAttachmentRenderLocations","MessagingFlowerBorder.react","MessagingFlowerBorderChecker","MessagingGiftWrap.react","MessagingGiftWrapChecker","MessengerErrorAttachment.react","MessengerFileAttachment.react","MessengerFromViewerUtils","MessengerHotLikePreview.react","MessengerHotLikeUtils","MessengerPhotosGroup.react","MessengerStickerUtils","MessengerSupportedEmojiUtils","MessengerVoiceClipAttachment.react","MessengerWebDriverTestIDs","React","Sticker.react","StickerAssetType","StickerConstants","StickerInterfaces","StickerUtils","StickersActions","StickersPackInTray","StickersStoreController","StoryAttachmentStyle","XStickerAssetController","idx","isRetina","wrapNullableForReact"],(function a(b,c,d,e,f,g,h){"use strict";__p&&__p();var i=700,j="sticker:",k="giftwrap:",l="share:",m="_1c_u",n="_3o6m",o=function o(q){return q===Object(q)},p={getAttachmentsInsideBubble:function q(r,s){var t=c("MercuryAttachment").get(r).filter(o).filter(function(u){return!this.attachmentShouldAppearOutsideBubble(u)}.bind(this));return this._getAttachmentComponents(t,r,s)},getAttachmentsOutsideBubble:function q(r,s,t,u){var v=c("MercuryAttachment").get(r).filter(o).filter(function(w){return this.attachmentShouldAppearOutsideBubble(w)}.bind(this));return this._getAttachmentComponents(v,r,s,t,u)},_getAttachmentComponents:function q(r,s,t,u,v){var w=this._getPhotosGroup(r.filter(c("MercuryAttachment").isPhotoGroupAttachment),s,t,u),x=r.filter(function(y){return!c("MercuryAttachment").isPhotoGroupAttachment(y)}).map(function(y){return this._getAttachmentComponent(y,s,t,u,v)}.bind(this));if(w)x.push(w);return x},_getAttachmentComponent:function q(r,s,t,u,v){__p&&__p();var w=u&&u.customColor,x=u&&u.onUnwrap,y=u&&u.isVisible,z=u&&u.isFromViewer,A=u&&u.onSelect;if(c("MessengerStickerUtils").isStickerAttachment(r))return this._getStickerComponent(r,s,w,x);if(this.isEmojiLikeAttachment(r))return this._getEmojiLikeAttachment(r,s,x);if(this.isVoiceClip(r))return this._getVoiceClip(r,s,w,x);if(this.isFileAttchment(r))return this._getFileComponent(r,s);if(this.isP2P(r)||this.isShareAttachment(r))return this._getShareAttachment(r,s,t,y,z,A,v);if(this.isErrorAttachment(r))return this._getErrorAttachment(r,s);return null},_getStickerComponent:function q(r,s,t,u){__p&&__p();if(s.is_like_preview)return this._maybeGiftWrapSticker(c("React").createElement(c("MessengerHotLikePreview.react"),{customColor:t,customLike:s.customLike,key:"hlp:"+s.like_preview_since,since:s.like_preview_since}),s,u);var v=r.metadata;if(!v){v=c("MessengerHotLikeUtils").getMetadataForHotLike(s.sticker_id);if(!v){v={};var w=c("StickerUtils").getScaledDimensions(c("StickerConstants").THREAD_SIZE,c("StickerConstants").THREAD_SIZE,c("StickerConstants").THREAD_SIZE),x=w.height,y=w.width;v.height=x;v.width=y}v.stickerID=s.sticker_id}var z=c("XStickerAssetController").getURIBuilder().setInt("sticker_id",v.stickerID),A=null,B=null;if(c("isRetina")()){A=v.paddedSpriteURI2x;B=v.spriteURI2x}else{A=v.paddedSpriteURI;B=v.spriteURI}var C=v.stickerID.toString(),D=c("React").createElement(c("Sticker.react"),{accessibilityLabel:v.accessibilityLabel,className:"_2poz _ui9"+(c("MessagingGiftWrapChecker").shouldRenderWithGiftWrap(s)&&!!c("MessengerHotLikeUtils").getMetadataForHotLike(C)?" _4ue_":""),animationTrigger:"hover",customColor:t,frameCount:v.frameCount||1,frameRate:v.frameRate||c("StickerConstants").DEFAULT_FRAME_RATE,framesPerCol:v.framesPerCol||1,framesPerRow:v.framesPerRow||1,key:j+s.message_id,onStickerClick:function E(F,C){c("StickersPackInTray").onIsPackInTray(F,c("StickerInterfaces").MESSAGES,function(G){if(G.in_sticker_tray){c("StickersActions").selectTrayPack(F);c("StickersActions").showStickerFlyout(s.thread_id)}else c("StickersStoreController").showStore(F)})},packID:v.packID&&v.packID.toString(),paddedSpriteURI:A,sourceHeight:v.height,sourceURI:z.setEnum("image_type",c("StickerAssetType").IMAGE).getURI().toString(),sourceWidth:v.width,spriteURI:B,stickerID:C,testID:c("MessengerWebDriverTestIDs").STICKER});return this._maybeGiftWrapSticker(D,s,u)},_getEmojiLikeAttachment:function q(r,s,t){var u=c("MessengerSupportedEmojiUtils").transferSize(r.size),v=c("MessengerSupportedEmojiUtils").getNewEmojiData(s.body,u),w=v?v.emoji:undefined;if(!v)return this._getErrorAttachment(r,s);var x=c("React").createElement(c("EmojiSticker.react"),{className:"_2poz _ui9",key:j+s.message_id,emoji:s.body,emojiImage:w,sourceURI:""});return this._maybeGiftWrapSticker(x,s,t)},_getShareAttachment:function q(r,s,t,u,v,w,x){var y,z,A=null;if(s&&s.platform_xmd)A=JSON.parse(s.platform_xmd);var B=(y=r)!=null?(y=y.share)!=null?(y=y.messenger_ctas)!=null?(y=y[0])!=null?y.page_id:y:y:y:y,C=(z=r)!=null?(z=z.share)!=null?(z=z.target)!=null?(z=z.items)!=null?(z=z[0])!=null?(z=z.call_to_actions)!=null?(z=z[0])!=null?z.page_id:z:z:z:z:z:z:z,D=B||C,E=D?c("MercuryIDs").getParticipantIDFromUserID(D):s.author;return c("React").createElement(c("MercuryShareAttachment.react"),{attachment:r.share,isFromViewer:v,isSponsored:s.is_sponsored,isVisible:!!u,key:l+s.message_id,location:c("MercuryShareAttachmentRenderLocations").MESSENGER,maxWidth:i,messageID:s.message_id,mnMessageType:A&&A.template_type,onComponentLoaded:t,onSelect:w,pageID:E,threadID:s.thread_id,afterDecorators:x})},_getVoiceClip:function q(r,s,t,u){t=c("MessengerFromViewerUtils").isFromViewer(s)?t||undefined:undefined;return c("React").createElement(c("MessengerVoiceClipAttachment.react"),{attachment:r,customColor:t,isGiftWrapped:c("MessagingGiftWrapChecker").shouldRenderWithGiftWrap(s),hasFlowerBorder:c("MessagingFlowerBorderChecker").shouldRenderWithFlowerBorder(s),key:"audio:"+s.message_id,message:s,onUnwrap:function(v){function u(){return v.apply(this,arguments)}u.toString=function(){return v.toString()};return u}(function(){u&&u()})})},_getErrorAttachment:function q(r,s){return c("React").createElement(c("MessengerErrorAttachment.react"),{attachment:r,key:"error:"+s.message_id})},_getPhotosGroup:function q(r,s,t,u){__p&&__p();if(!r.length)return null;var v=u&&u.onUnwrap,w=u&&u.isVisible,x=u&&u.onSelect,y=u&&u.isPageMessage,z=u&&u.pageID,A=c("MessagingFlowerBorderChecker").shouldRenderWithFlowerBorder(s),B=c("MessagingGiftWrapChecker").shouldRenderWithGiftWrap(s)&&this._rendersWithoutAttribution(r);return c("React").createElement(c("MessengerPhotosGroup.react"),{attachments:r,className:"_2poz _52mr _ui9",count:r.length,hasFlowerBorder:A,isGiftWrapped:B,isPageMessage:y,isVisible:!!w,key:"photos:"+s.message_id,message:s,onSelect:x,onUnwrap:function(C){function v(){return C.apply(this,arguments)}v.toString=function(){return C.toString()};return v}(function(){v&&v()}),pageID:z})},getVideoElem:function q(r,s){var t=s.getMessageElement(r);if(!t)return null;var u=t.getElementsByClassName(m);return u&&u.length?u[0]:t},getSphericalPhotoElem:function q(r,s){var t=s.getMessageElement(r);if(!t)return null;var u=t.getElementsByClassName(n);return u&&u.length?u[0]:t},_rendersWithoutAttribution:function q(r){return r.length!=1||!c("MercuryAttachment").hasAttribution(r[0])},_getFileComponent:function q(r,s){return c("React").createElement(c("MessengerFileAttachment.react"),{attachment:r,className:"_2poz",key:"file:"+r.url})},attachmentShouldAppearOutsideBubble:function q(r){return c("MessengerStickerUtils").isStickerAttachment(r)||c("MercuryAttachment").isPhotoGroupAttachment(r)||this.isShareAttachment(r)||this.isP2P(r)||this.isVoiceClip(r)||this.isErrorAttachment(r)||this.isEmojiLikeAttachment(r)},isPhotosGroupAttachment:function q(r){var s=r.props.attachments;return!!s&&s.length>1&&s.some(function(t){return!!t&&c("MercuryAttachment").isPhotoGroupAttachment(t)})},isRenderedShareAttachment:function q(r){return!!(r.key&&r.key.startsWith(l))},isFileAttchment:function q(r){return r.attach_type===c("MercuryAttachmentType").FILE},isShareAttachment:function q(r){return!!(this._isStoryBased(r)&&!this.isP2P(r)&&(r.share.style_list.indexOf(c("StoryAttachmentStyle").SHARE)>-1||r.share.style_list.indexOf(c("StoryAttachmentStyle").FALLBACK)>-1))},isSharedVideoAttachment:function q(r){var s=r.attach_type===c("MercuryAttachmentType").SHARE&&r.share&&r.share.subattachments&&r.share.subattachments[0];return!!(s&&s.target&&s.target.video_id)},isP2P:function q(r){return!!(this._isStoryBased(r)&&r.share.style_list.indexOf(c("StoryAttachmentStyle").ORION)>-1)},_isStoryBased:function q(r){return!!(r.attach_type===c("MercuryAttachmentType").SHARE&&r.share&&r.share.style_list)},isEmojiLikeAttachment:function q(r){return r.attach_type===c("MercuryAttachmentType").EMOJI_LIKE},isVoiceClip:function q(r){var s=r.metadata;return!!s&&(!!s.isAudio||s.type===c("MercuryAudioType").AudioClip||s.type===c("MercuryAudioType").VoiceMessageWithTranscript)},isVoiceClipAttachment:function q(r){var s=c("MercuryAttachment").get(r).filter(o).filter(function(t){return this.isVoiceClip(t)}.bind(this));return!!s.length},isP2PAttachment:function q(r){var s=c("MercuryAttachment").get(r).filter(function(t){return o(t)&&this.isP2P(t)}.bind(this));return!!s.length},isSingleVideoAttachment:function q(r){var s=c("MercuryAttachment").get(r).filter(o).filter(function(t){return c("MercuryAttachment").isVideoAttachment(t)});return s.length===1},isSharedVideoAttachmentMessage:function q(r){var s=c("MercuryAttachment").get(r).filter(o).filter(function(t){return this.isSharedVideoAttachment(t)||this.isGenieSharedVideoAttachment(t)}.bind(this));return s.length===1},isGenieSharedVideoAttachment:function q(r){return!!(r.attach_type===c("MercuryAttachmentType").SHARE&&r.share&&r.share.style_list.indexOf(c("StoryAttachmentStyle").GENIE_MESSAGE)>-1&&r.share.target&&r.share.target.attachment&&this.isSharedVideoAttachment(r.share.target.attachment))},isSingleSphericalPhotoAttachment:function q(r){var s=c("MercuryAttachment").get(r).filter(o);if(s.length!==1)return false;var t=s.filter(function(u){return u.photo_encodings&&u.photo_encodings.length!==0}).length===1;return t},isErrorAttachment:function q(r){return r.attach_type===c("MercuryAttachmentType").ERROR},_maybeGiftWrapComponentForMessage:function q(r,s,t){var u=c("MessagingGiftWrapChecker").shouldRenderWithGiftWrap(s),v=c("MessagingFlowerBorderChecker").shouldRenderWithFlowerBorder(s);if(!u&&!v)return r;return c("React").createElement("div",{key:k+s.message_id},r,u?c("React").createElement(c("MessagingGiftWrap.react"),{onUnwrap:c("wrapNullableForReact")(t)}):null,v?c("React").createElement(c("MessagingFlowerBorder.react"),{offset:-10}):null)},_maybeGiftWrapSticker:function q(r,s,t){var u=c("MessagingGiftWrapChecker").shouldRenderWithGiftWrap(s),v=c("MessagingFlowerBorderChecker").shouldRenderWithFlowerBorder(s);if(!u&&!v)return r;return c("React").createElement("div",{key:k+s.message_id},r,u?c("React").createElement(c("MessagingGiftWrap.react"),{isSticker:true,onUnwrap:c("wrapNullableForReact")(t)}):null,v?c("React").createElement(c("MessagingFlowerBorder.react"),{offset:-10}):null)}};f.exports=p}),null);
__d("MessengerCodePasteUtils",["cx","BanzaiODS","MessengerBubble.react","React"],(function a(b,c,d,e,f,g,h){"use strict";__p&&__p();var i=/`{3,}/;function j(l){return!!(l&&l.search(i)!==-1&&l.split("\n").length>1)}function k(l,m,n,o,p){__p&&__p();var q=l.split(i),r=[];for(var s=0;s<q.length;s+=2){var t=q[s].trim();if(t&&t.length>0)r.push(c("React").createElement(c("MessengerBubble.react"),{key:s,body:t,customColor:o||undefined,className:"clearfix _3058 _ui9",isFromViewer:p,ranges:m,threadID:n}));if(s+1<q.length&&q[s+1]){var u=q[s+1].split("\n"),v=u[0].replace(/[^a-zA-Z]+/g,""),w=u.slice(1).join("\n");c("BanzaiODS").bumpEntityKey("messenger_code_paste","render_bubble");r.push(c("React").createElement("div",{key:s+1,className:"_3058 _wu0 _52mr"},c("React").createElement("div",{ref:"syntaxTarget"+s,className:"language-"+v},w)))}}return r}f.exports={containsCodeBlock:j,getCodeAndMessageBubbles:k}}),null);
__d("MNRTCCallabilityStore",["MessengerDispatcher","RTCCallabilityStore"],(function a(b,c,d,e,f,g){"use strict";f.exports=new(c("RTCCallabilityStore"))(c("MessengerDispatcher"))}),null);
__d("shouldNotRenderSegoe",["MessengerConfig","UserAgent"],(function a(b,c,d,e,f,g){"use strict";var h=new RegExp("[\u0530-\u05f4\u10a0-\u10ff]"),i=c("UserAgent").isBrowser("Chrome")&&c("UserAgent").isPlatform("Windows 10");f.exports=function j(k){return!c("MessengerConfig").SegoeUIDisabled&&i&&h.test(k)}}),null);
__d("MessengerBubble.react",["cx","fbt","invariant","EmojiOnlyMessage.react","immutable","ImmutableObject","MercuryIDs","MercuryMessageBody.react","MessengerCodeBubble.react","MercuryMessageRenderLocations","MessengerActions","MessengerContactActions.bs","MessengerDecorator","MessengerSupportedEmojiUtils","React","SimpleXUIDialog","joinClasses","shouldNotRenderSegoe"],(function a(b,c,d,e,f,g,h,i,j){"use strict";__p&&__p();var k,l,m=c("MessengerContactActions.bs").actions,n=c("React").PropTypes;k=babelHelpers.inherits(o,c("React").PureComponent);l=k&&k.prototype;function o(){__p&&__p();var p,q;for(var r=arguments.length,s=Array(r),t=0;t<r;t++)s[t]=arguments[t];return q=(p=l.constructor).call.apply(p,[this].concat(s)),this.state={emojis:undefined},this.$MessengerBubble1=function(u,v,w){__p&&__p();switch(u){case m.MESSAGE:this.$MessengerBubble2(v,w);break;case m.PROFILE:var x=c("MercuryIDs").getParticipantIDFromUserID(v.id),y=this.props.participants&&this.props.participants.get(x);if(y&&y.href)window.open(y.href);else this.$MessengerBubble2(v,w);break;case m.FREE_CALL:e(["FBRTCCore","MNRTCCallabilityStore"],function(z,A){var B=v.id;B||j(0);if(z.isAvailableForWebrtcCalling(B)||A.isCallable(B))z.startOutgoingCall(B,"messenger_dot_com",false);else c("SimpleXUIDialog").show(i._("{firstname} can't be reached right now.",[i.param("firstname",v.contactName)]),i._("Can't Connect Call"))});break}}.bind(this),q}o.prototype.componentDidMount=function(){if(!this.props.emojis){var p=this.props.body||"",q=c("MessengerSupportedEmojiUtils").getEmojiOnlyContents(p);if(q&&q.length)this.setState({emojis:q})}};o.prototype.render=function(){__p&&__p();var p=false,q=null;if(this.state.emojis)q=c("React").createElement(c("EmojiOnlyMessage.react"),{contents:this.state.emojis});else{p=true;q=c("React").createElement(c("MercuryMessageBody.react"),{ref:this.props.bodyRef,body:this.props.body,className:"_3oh-"+(c("shouldNotRenderSegoe")(this.props.body||"")?" _2por":"")+" _58nk",threadCustomColor:this.props.threadCustomColor,isFromViewer:this.props.isFromViewer,ranges:this.props.ranges,metaRanges:this.props.metaRanges,plainText:this.props.plainText,threadID:this.props.threadID,customLike:this.props.customLike,onContactSelect:this.$MessengerBubble1,renderLocation:c("MercuryMessageRenderLocations").MESSENGER})}var r=[],s=[],t=this.props.message,u=!!this.props.isFromViewer;if(t&&!this.props.excludeAfterDecorators){c("MessengerDecorator").getInsideDecorators().concat(c("MessengerDecorator").getAfterDecorators()).forEach(function(x){if(x.check(t)){r.push(x.render(t,u,this.props));s.push(x.getAdditionalClassNames())}}.bind(this));c("MessengerDecorator").getBeforeDecorators().forEach(function(x){if(x.check(t))s.push(x.getAdditionalClassNames())})}var v=s.join(" "),w=null;if(this.props.body)if(this.props.containsCode)w=c("React").createElement(c("MessengerCodeBubble.react"),babelHelpers["extends"]({},this.props,{attachments:this.props.attachments,body:this.props.body,customColor:this.props.customColor,isFromViewer:this.props.isFromViewer,ranges:this.props.ranges||[],threadID:this.props.threadID||""}));else w=c("React").createElement("div",{className:"_aok"},q,this.props.attachments);return c("React").createElement("div",babelHelpers["extends"]({},this.props,{className:c("joinClasses")(v,this.props.className,(!this.props.containsCode?"_hh7":"")+(!this.props.isFromViewer&&this.props.containsCode?" _65sp":"")+(this.props.isFromViewer&&this.props.containsCode?" _65sq":"")+(!this.props.containsCode?" _s1-":"")+(!this.props.containsCode&&!this.props.notBubblish?" _52mr":"")+(!this.props.containsCode&&this.props.isP2PAttachment?" _4z55":"")+(!this.props.containsCode&&!!this.state.emojis?" _2f5r":"")+(!this.props.containsCode&&!!this.state.emojis?" _581a":"")+(this.props.isFromViewer&&!this.state.emojis&&!this.props.containsCode?" _43by":"")+(!this.props.containsCode&&p?" _3oh-":""))}),w,!w?q:null,!w?this.props.attachments:null,r)};o.prototype.$MessengerBubble2=function(p,q){q&&q.preventDefault();var r=c("MercuryIDs").getThreadIDFromUserID(p.id);r&&c("MessengerActions").selectThread(r)};o.propTypes={attachments:n.instanceOf(c("immutable").List),body:n.string,customColor:n.string,customLike:n.object,excludeAfterDecorators:n.bool,isFromViewer:n.bool,message:n.instanceOf(c("ImmutableObject")),metaRanges:n.array,notBubblish:n.bool,onUnwrap:n.func,participants:n.object,plainText:n.bool,ranges:n.array,threadID:n.string,threadCustomColor:n.string};f.exports=o}),null);
__d("MessengerCodeBubble.react",["Bootloader","immutable","MessengerCodePasteUtils","React","ReactDOM"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();var h,i,j=c("React").PropTypes;h=babelHelpers.inherits(k,c("React").PureComponent);i=h&&h.prototype;k.prototype.componentDidMount=function(){c("Bootloader").loadModules(["Prism.Complete"],function(l){for(var m in this.refs){var n=c("ReactDOM").findDOMNode(this.refs[m]);l.highlightElement(n)}}.bind(this),"MessengerCodeBubble.react")};k.prototype.render=function(){var l=c("MessengerCodePasteUtils").getCodeAndMessageBubbles(this.props.body,this.props.ranges,this.props.threadID,this.props.customColor,this.props.isFromViewer);return c("React").createElement("div",{className:this.props.className},l)};function k(){h.apply(this,arguments)}k.propTypes={attachments:j.instanceOf(c("immutable").List),body:j.string.isRequired,customColor:j.string,isFromViewer:j.bool.isRequired,ranges:j.array.isRequired,threadID:j.string.isRequired};f.exports=k}),null);
__d("MessengerDesktopNotificationPermissions",[],(function a(b,c,d,e,f,g){var h=Object.freeze({DEFAULT:"default",DENIED:"denied",GRANTED:"granted"});f.exports=h}),null);
__d("MessengerDesktopNotifications",["Map","MessengerDesktopNotificationPermissions","Run","UserAgent"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();var h=5e3,i=new(c("Map"))();function j(){i.forEach(function(l,m,n){l.close&&l.close()})}var k={_closeTimer:null,isSupported:function l(){return!!window.Notification},checkPermission:function l(){if(window.Notification)return window.Notification.permission},hasDefaultSound:function l(){return c("UserAgent").isBrowser("FireFox")&&c("UserAgent").isPlatform("Mac OS X")},isDenied:function l(){return this.checkPermission()===c("MessengerDesktopNotificationPermissions").DENIED},isGranted:function l(){return this.checkPermission()===c("MessengerDesktopNotificationPermissions").GRANTED},requestPermission:function l(m){if(window.Notification)window.Notification.requestPermission(m)},showNotification:function l(m){__p&&__p();if(this.isGranted()){var n=window.Notification?new window.Notification(m.title,{body:m.body,icon:m.icon,tag:m.tag,silent:m.silent}):{};i.set(m.tag,n);n.onclick=m.onClick;n.onclose=function(){i["delete"](m.tag)};this._closeTimer=setTimeout(function(){n.close()},m.closeTime||h);return n}else return null}};c("Run").onUnload(j);f.exports=k}),null);
__d("ComposedEntityMutability",[],(function a(b,c,d,e,f,g){f.exports=Object.freeze({MUTABLE:0,IMMUTABLE:1,SEGMENTED:2})}),null);
__d("MessengerConstants",[],(function a(b,c,d,e,f,g){"use strict";var h={NEW_THREAD_KEY:"new",BROWSER_EXTENSIONS_DIALOG_DIMENSIONS:{HEIGHT:604,WIDTH:405}};f.exports=h}),null);
__d("MessengerEditorStateManager",["CacheStorage","ComposedEntityMutability","ComposedEntityMutabilityToName","ComposedEntityTypeToName","DraftEntityInstance","EditorState","MessengerConstants","SelectionState","decodeBlocks","encodeBlocks","mapObject"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();var h=new(c("CacheStorage"))("localstorage"),i=c("ComposedEntityMutability").IMMUTABLE,j=void 0,k={get:function l(m){__p&&__p();if(!m)return this._getEmptyEditorState();if(m===c("MessengerConstants").NEW_THREAD_KEY)return j||this._getEmptyEditorState();var n=h.get(m,false);if(!n)return this._getEmptyEditorState();var o=n.encodedBlocks,p=c("mapObject")(o.entityMap,function(s,t){return new(c("DraftEntityInstance"))({type:c("ComposedEntityTypeToName")[s.type],mutability:c("ComposedEntityMutabilityToName")[i],data:s.data})}),q=c("decodeBlocks")(o.blocks,p),r=c("EditorState").createWithContent(q);return c("EditorState").acceptSelection(r,new(c("SelectionState"))(n.selection))},set:function l(m,n){if(m===c("MessengerConstants").NEW_THREAD_KEY){j=n;return}var o=c("encodeBlocks")(n.getCurrentContent()),p=n.getSelection().toJS();h.set(m,{encodedBlocks:o,selection:p})},_getEmptyEditorState:function l(){var m=c("EditorState").createEmpty();return c("EditorState").forceSelection(m,m.getSelection())}};f.exports=k}),null);
__d("MessengerPresenceStatusUtils",["fbt","AvailableListConstants","CurrentUser","LastActiveTimes","MercuryIDs","PresenceStatus"],(function a(b,c,d,e,f,g,h){"use strict";__p&&__p();var i={getStatusFromCanonicalThread:function j(k,l){__p&&__p();var m=null;if(l&&l.is_canonical){var n=k.get(c("MercuryIDs").getParticipantIDFromFromThreadID(l.thread_id));if(n){var o=void 0;if(n.is_messenger_user)o=c("CurrentUser").isWorkUser()?h._("Workplace Chat"):h._("Messenger");else o=c("CurrentUser").isWorkUser()?h._("Workplace"):h._("Facebook");var p=c("PresenceStatus").get(n.fbid),q=void 0,r=void 0;if(p!==c("AvailableListConstants").ACTIVE){q=c("LastActiveTimes").get(n.fbid);r=c("LastActiveTimes").getShortDisplay(n.fbid)}m={contact:n,platform:o,isUserActive:p===c("AvailableListConstants").ACTIVE,lastActiveTS:q,lastActive:r}}}return m}};f.exports=i}),null);
__d("MessagingThreadEventType",[],(function a(b,c,d,e,f,g){f.exports=Object.freeze({ACTIVE:"active",INACTIVE:"inactive"})}),null);
__d("MessagingThreadSourceName",[],(function a(b,c,d,e,f,g){f.exports=Object.freeze({CHAT_NUB:"chat_nub",MESSENGER:"messenger"})}),null);
__d("MessengerLoggerUtils",["MercuryIDs","MessagingThreadEventType","MessagingThreadEventTypedLogger","MessagingThreadSourceName","ScriptPath","pageID"],(function a(b,c,d,e,f,g){var h={logThreadChangeEvent:function i(j,k,l,m){if(l.activeThreadID&&j)this.log({activeThreadID:l.activeThreadID,event:c("MessagingThreadEventType").INACTIVE,clientEventTimeMs:k,activeTimeMs:k-j});if(m.activeThreadID)this.log({activeThreadID:m.activeThreadID,event:c("MessagingThreadEventType").ACTIVE,clientEventTimeMs:k,activeTimeMs:0})},log:function i(j){var k=c("MercuryIDs").tokenize(j.activeThreadID.toString()),l=c("ScriptPath").getPageInfo();new(c("MessagingThreadEventTypedLogger"))().setEvent(j.event).setClientEventTimeMs(j.clientEventTimeMs).setActiveTimeMs(j.activeTimeMs).setPageID(c("pageID")).setPageData(l?l.extraData:{}).setThreadID(k.value).setSource(c("MessagingThreadSourceName").MESSENGER).log()}};f.exports=h}),null);
__d("MessengerStateStore",["MessengerActions","MessengerLoggerUtils","MessengerStore"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();var h,i;h=babelHelpers.inherits(j,c("MessengerStore"));i=h&&h.prototype;function j(){i.constructor.call(this);this.$MessengerStateStore1={activeThreadID:null,detailView:null,filter:null,folder:null,masterView:null,query:null,mid:null,serverThreadID:null,extraQueryParams:null,threadIDs:null};this.$MessengerStateStore2=babelHelpers["extends"]({},this.$MessengerStateStore1);this.$MessengerStateStore4=this.$MessengerStateStore3=null}j.prototype.getState=function(){return this.$MessengerStateStore1};j.prototype.getPrevState=function(){return this.$MessengerStateStore2};j.prototype.__onDispatch=function(k){switch(k.type){case c("MessengerActions").Types.REPLACE_STATE:this.$MessengerStateStore2=this.$MessengerStateStore1;this.$MessengerStateStore4=this.$MessengerStateStore3;this.$MessengerStateStore1=babelHelpers["extends"]({activeThreadID:null,detailView:null,filter:null,folder:null,masterView:null,query:null,mid:null,serverThreadID:null,extraQueryParams:null,threadsIDs:null},k.nextState);var l=Date.now();this.$MessengerStateStore3=l;c("MessengerLoggerUtils").logThreadChangeEvent(this.$MessengerStateStore4,l,this.$MessengerStateStore2,this.$MessengerStateStore1);this.emitChange();break}};f.exports=new j()}),null);
__d("MessengerComposerActions",["MessengerDispatcher","keyMirror"],(function a(b,c,d,e,f,g){"use strict";var h=c("keyMirror")({ADD_TOKEN:null,REMOVE_TOKEN:null,FOCUS_COMPOSER:null,FOCUS_TYPEAHEAD:null,EXIT_COMPOSE_STATE:null,MOVE_DRAFT:null}),i={Types:h,addToken:function j(k){c("MessengerDispatcher").dispatch({type:h.ADD_TOKEN,entry:k})},moveDraftToNextThread:function j(k){c("MessengerDispatcher").dispatch({type:h.MOVE_DRAFT,threadID:k})},removeToken:function j(k){c("MessengerDispatcher").dispatch({type:h.REMOVE_TOKEN,entry:k})},focusComposer:function j(){c("MessengerDispatcher").dispatch({type:h.FOCUS_COMPOSER})},focusTypeahead:function j(){c("MessengerDispatcher").dispatch({type:h.FOCUS_TYPEAHEAD})},exitComposeState:function j(){c("MessengerDispatcher").dispatch({type:h.EXIT_COMPOSE_STATE})}};f.exports=i}),null);
__d("XMessengerDotComSettingsEditController",["XController"],(function a(b,c,d,e,f,g){f.exports=c("XController").create("/settings/edit/",{})}),null);
__d("MessengerSettingsActions",["AsyncRequest","CurrentEnvironment","MessengerDispatcher","MessengerDesktopNotifications","MessengerDesktopNotificationPermissions","MessengerURIConstants","XMessengerDotComSettingsEditController","keyMirror"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();var h=c("keyMirror")({CHANGE_SETTINGS:null,CHANGE_DESKTOP_NOTIFS:null}),i={Types:h,changeSettings:function j(k){var l=c("XMessengerDotComSettingsEditController").getURIBuilder().getURI();if(c("CurrentEnvironment").facebookdotcom)l.setPath(c("MessengerURIConstants").FACEBOOK_PREFIX+l.getPath());new(c("AsyncRequest"))().setData({settings:k}).setURI(l).send();c("MessengerDispatcher").dispatch({type:h.CHANGE_SETTINGS,newSettings:k})},changeDesktopNotifs:function j(k,l){if(k&&!c("MessengerDesktopNotifications").isGranted())c("MessengerDesktopNotifications").requestPermission(function(m){if(m!==c("MessengerDesktopNotificationPermissions").GRANTED){if(c("MessengerDesktopNotifications").checkPermission()===c("MessengerDesktopNotificationPermissions").DENIED)l&&l();return}c("MessengerDispatcher").dispatch({type:h.CHANGE_DESKTOP_NOTIFS,desktopNotifsEnabled:k})});else c("MessengerDispatcher").dispatch({type:h.CHANGE_DESKTOP_NOTIFS,desktopNotifsEnabled:k})}};f.exports=i}),null);
__d("LinkWithHiddenURLBar.react",["Link.react","React","ReactDOM","setImmediate"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();var h,i;h=babelHelpers.inherits(j,c("React").Component);i=h&&h.prototype;function j(){__p&&__p();var k,l;for(var m=arguments.length,n=Array(m),o=0;o<m;o++)n[o]=arguments[o];return l=(k=i.constructor).call.apply(k,[this].concat(n)),this.link=null,this.$LinkWithHiddenURLBar5=function(p){this.link=p}.bind(this),this.$LinkWithHiddenURLBar4=function(p){this.$LinkWithHiddenURLBar6();this.props.onFocus&&this.props.onFocus(p)}.bind(this),this.$LinkWithHiddenURLBar2=function(p){this.$LinkWithHiddenURLBar1();this.props.onBlur&&this.props.onBlur(p)}.bind(this),this.$LinkWithHiddenURLBar3=function(p){this.$LinkWithHiddenURLBar6();if(!p.metaKey&&this.props.onClick){this.props.onClick(p);p.preventDefault()}this.props.onAllClicks&&this.props.onAllClicks(p);c("setImmediate")(function(){return this.$LinkWithHiddenURLBar1()}.bind(this))}.bind(this),l}j.prototype.componentDidMount=function(){this.$LinkWithHiddenURLBar1()};j.prototype.render=function(){var k=this.props,l=k.label,m=k.onBlur,n=k.onAllClicks,o=k.onClick,p=k.onFocus,q=babelHelpers.objectWithoutProperties(k,["label","onBlur","onAllClicks","onClick","onFocus"]);return c("React").createElement(c("Link.react"),babelHelpers["extends"]({},q,{label:l,onBlur:this.$LinkWithHiddenURLBar2,onClick:this.$LinkWithHiddenURLBar3,onFocus:this.$LinkWithHiddenURLBar4,ref:this.$LinkWithHiddenURLBar5}))};j.prototype.$LinkWithHiddenURLBar1=function(){if(this.link){var k=c("ReactDOM").findDOMNode(this.link);if(k.href){k.setAttribute("data-href",k.href);k.removeAttribute("href")}}};j.prototype.$LinkWithHiddenURLBar6=function(){if(this.link){var k=c("ReactDOM").findDOMNode(this.link),l=k.getAttribute("data-href");if(l){k.setAttribute("href",l);k.removeAttribute("data-href")}}};f.exports=j}),null);
__d("MessengerAddIconSVG.react",["React"],(function a(b,c,d,e,f,g){"use strict";var h=c("React").PropTypes,i=function i(j){return c("React").createElement("div",{className:j.className},c("React").createElement("svg",{viewBox:"-8 -8 48 48"},c("React").createElement("title",null,"add to group"),c("React").createElement("path",{d:"M16,0 V32 M0,16 H32",fillRule:"evenodd",clipRule:"evenodd",fill:"none",stroke:j.customColor,strokeWidth:2,strokeMiterlimit:10,strokeLinecap:"round"})))};i.propTypes={className:h.string,customColor:h.string.isRequired};f.exports=i}),null);
__d("MercuryAttachmentAttribution.react",["cx","fbt","Image.react","ImmutableObject","Link.react","React","joinClasses"],(function a(b,c,d,e,f,g,h,i){"use strict";__p&&__p();var j,k,l=c("React").PropTypes;j=babelHelpers.inherits(m,c("React").PureComponent);k=j&&j.prototype;m.prototype.render=function(){var n=this.$MercuryAttachmentAttribution1();if(!n)return null;return c("React").createElement("div",{className:c("joinClasses")(this.props.className,"_29ew")},c("React").createElement(c("Image.react"),{src:n.icon_url,className:"_29ex"}),c("React").createElement("span",{className:"_29ey"},n.name),this.$MercuryAttachmentAttribution2())};m.prototype.$MercuryAttachmentAttribution1=function(){return this.props.attachment&&this.props.attachment.app_attribution};m.prototype.$MercuryAttachmentAttribution2=function(){__p&&__p();var n=this.$MercuryAttachmentAttribution1();if(!n||!n.metadata)return null;var o="_439n",p=void 0;try{p=JSON.parse(n.metadata)}catch(q){return null}if(p.spotify_link)return c("React").createElement(c("Link.react"),{className:o,href:p.spotify_link,target:"_blank"},i._("Open"));return null};function m(){j.apply(this,arguments)}m.propTypes={attachment:l.instanceOf(c("ImmutableObject"))};f.exports=m}),null);
__d("MessengerAttachmentAttribution.react",["cx","ImmutableObject","MercuryAttachmentAttribution.react","React"],(function a(b,c,d,e,f,g,h){"use strict";__p&&__p();var i,j,k=c("React").PropTypes;i=babelHelpers.inherits(l,c("React").Component);j=i&&i.prototype;l.prototype.render=function(){return c("React").createElement(c("MercuryAttachmentAttribution.react"),{attachment:this.props.attachment,className:"_2f5n _4br2"})};function l(){i.apply(this,arguments)}l.propTypes={attachment:k.instanceOf(c("ImmutableObject"))};f.exports=l}),null);
__d("MessengerBootloadedLogMessage.react",["cx","BootloadOnRender.react","JSResource","LazyComponent.react","React"],(function a(b,c,d,e,f,g,h){"use strict";var i,j;i=babelHelpers.inherits(k,c("React").PureComponent);j=i&&i.prototype;k.prototype.render=function(){return c("React").createElement(c("BootloadOnRender.react"),{component:c("React").createElement(c("LazyComponent.react"),this.props),loader:c("JSResource")("MessengerLogMessage.react").__setRef("MessengerBootloadedLogMessage.react"),placeholder:c("React").createElement("div",{className:"_497p"},"...")})};function k(){i.apply(this,arguments)}f.exports=k}),null);
__d("MessengerBubbleBlock.react",["cx","React"],(function a(b,c,d,e,f,g,h){"use strict";var i,j;i=babelHelpers.inherits(k,c("React").Component);j=i&&i.prototype;k.prototype.render=function(){return c("React").createElement("div",{className:"_52mr _4h13 _3058"},this.props.children)};function k(){i.apply(this,arguments)}f.exports=k}),null);
__d("MessengerMenu.react",["cx","Keys","MenuSeparator.react","ReactXUIMenu","joinClasses"],(function a(b,c,d,e,f,g,h){"use strict";__p&&__p();var i,j;function k(m){m.isReactLegacyFactory={};m.type=m}i=babelHelpers.inherits(l,c("ReactXUIMenu"));j=i&&i.prototype;function l(m){var n=m.className,o=babelHelpers.objectWithoutProperties(m,["className"]);j.constructor.call(this,babelHelpers["extends"]({className:c("joinClasses")(n,"_2i-c _150g")},o))}l.prototype.handleKeydown=function(m,n){if(m===c("Keys").DOWN||m===c("Keys").UP||m===c("Keys").SPACE)return j.handleKeydown.call(this,m,n);return true};k(l);l.Item=c("ReactXUIMenu").Item;l.Separator=c("MenuSeparator.react");f.exports=l}),null);
__d("XSettingsEmployeeBetaController",["XController"],(function a(b,c,d,e,f,g){f.exports=c("XController").create("/settings/employee/beta_mode/",{enabled:{type:"Bool",defaultValue:false}})}),null);
__d("MessengerBugNub.react",["cx","fbt","ix","AsyncRequest","Image.react","Link.react","MessengerEnvironment","MessengerMenu.react","MessengerPopoverMenu.react","React","Tooltip","URI","WorkModeConfig","XSettingsEmployeeBetaController","gkx","goURI"],(function a(b,c,d,e,f,g,h,i,j){"use strict";__p&&__p();var k,l,m=j("86836"),n=j("86835"),o=j("86837"),p=c("React").PropTypes,q=c("MessengerMenu.react").Item,r=c("MessengerMenu.react").Separator;k=babelHelpers.inherits(s,c("React").PureComponent);l=k&&k.prototype;s.prototype.render=function(){return c("React").createElement("div",{className:"_4_xe"+(c("gkx")("AT5ad75lfUu_LEQloT_GHl5l4DgqBru4g1KtvnZgqgchaE21iYmpzSvKrpk6THSFyobb17PT_X_4ySOjfDebuqUc")?" _2jqn":"")},this.$MessengerBugNub1(),c("React").createElement(c("Link.react"),babelHelpers["extends"]({href:"#",ajaxify:"/ajax/bugs/employee_report",className:"_1fr8",rel:"dialog"},c("Tooltip").propsFor(i._("Report a bug"))),c("React").createElement("div",{className:"_1gng"},c("React").createElement(c("Image.react"),{src:m}))))};s.prototype.$MessengerBugNub1=function(){var t=this.props.isBetaEnabled?n:o,u=i._("Internal preferences");return c("React").createElement(c("MessengerPopoverMenu.react"),babelHelpers["extends"]({className:"_1fr8",menu:this.$MessengerBugNub2()},c("Tooltip").propsFor(u)),c("React").createElement(c("Link.react"),{"aria-haspopup":"true","aria-label":u,className:"_1gng",href:"#",role:"button"},c("React").createElement(c("Image.react"),{src:t})))};s.prototype.$MessengerBugNub2=function(){__p&&__p();var t,u=this,v=null;if(this.props.unixName)(function(){var w=u.props.unixName+".sb";v=c("React").createElement(q,{label:"Sandbox",onclick:function(){return this.$MessengerBugNub3(w)}.bind(u)})})();return c("React").createElement(c("MessengerMenu.react"),null,c("React").createElement(q,{label:"Public",onclick:function(){return this.$MessengerBugNub4(false)}.bind(this)}),c("React").createElement(q,{label:"Beta",onclick:function(){return this.$MessengerBugNub4(true)}.bind(this)}),c("React").createElement(r,null),c("React").createElement(q,{label:"C1 (trunkstable)",onclick:function(){return this.$MessengerBugNub3()}.bind(this)}),c("React").createElement(q,{label:"Intern",onclick:function(){return this.$MessengerBugNub3("intern")}.bind(this)}),c("React").createElement(q,{label:"Production",onclick:function(){return this.$MessengerBugNub3("prod")}.bind(this)}),v)};s.prototype.$MessengerBugNub4=function(t){var u=c("XSettingsEmployeeBetaController").getURIBuilder().getURI();new(c("AsyncRequest"))().setURI(u).setData({enabled:t}).setMethod("POST").setAllowCrossPageTransition(true).send()};s.prototype.$MessengerBugNub3=function(t){var u=c("MessengerEnvironment").facebookdotcom?".facebook.com":".messenger.com",v=c("WorkModeConfig").company_subdomain,w=v?v:"www",x=w+(t?"."+t:"")+u;c("goURI")(c("URI").getRequestURI().getQualifiedURI().setDomain(x))};function s(){k.apply(this,arguments)}s.propTypes={isBetaEnabled:p.bool,unixName:p.string};f.exports=s}),null);
__d("MessengerCollapsedLogMessageGroup.react",["cx","fbt","Link.react","React"],(function a(b,c,d,e,f,g,h,i){"use strict";__p&&__p();var j,k;j=babelHelpers.inherits(l,c("React").PureComponent);k=j&&j.prototype;function l(){var m,n;for(var o=arguments.length,p=Array(o),q=0;q<o;q++)p[q]=arguments[q];return n=(m=k.constructor).call.apply(m,[this].concat(p)),this.state={collapsed:true},n}l.prototype.render=function(){var m=i._("See Latest Activity"),n=i._("See Less Activity");return c("React").createElement("div",{className:"_497p"},c("React").createElement(c("Link.react"),{className:"_4ea1",onClick:function(){return this.setState({collapsed:!this.state.collapsed})}.bind(this)},this.state.collapsed?m:n),!this.state.collapsed?c("React").createElement("div",null,c("React").createElement("div",{className:"_4ea2"}),this.props.children,c("React").createElement("div",{className:"_4ea2"})):null)};f.exports=l}),null);
__d("MessageThreadAssociatedObjectKey",[],(function a(b,c,d,e,f,g){f.exports=Object.freeze({ACTION_LINK:"action_link",APPROVAL_MODE_TOGGLEABLE:"approval_mode_toggleable",EVENT_PLACE:"event_place",ID:"id",IS_WORKPLACE_COMMUNITY:"is_workplace_community",MENTORSHIP_PROGRAM:"mentorship_program",NAME:"name",PRIVACY_MODE:"privacy_mode",PROFILE_PICTURE:"profile_picture",ROOM_TYPE:"room_type",START_TIMESTAMP:"start_timestamp"})}),null);
__d("TimeSpentRoomTypeEnum$FbtEnum",[],(function a(b,c,d,e,f,g){"use strict";var h=Object.freeze({GROUP:"Group",EVENT:"Event"});f.exports=h}),null);
__d("MessengerContextBanner.react",["cx","fbt","Badge.react","CurrentUser","Image.react","ImageBlock.react","immutable","Link.react","MercuryParticipantsConstants","MercuryParticipantsImage.react","MercuryThreadImage.react","MessageThreadAssociatedObjectKey","React","MercuryShareAttachmentRenderLocations","TimeSpentRoomTypeEnum","TimeSpentRoomTypeEnum$FbtEnum","requireWeak"],(function a(b,c,d,e,f,g,h,i){"use strict";__p&&__p();var j,k,l=c("React").PropTypes,m=void 0;c("requireWeak")("MessengerThreadImageReact.bs",function(o){m=o.jsComponent});j=babelHelpers.inherits(n,c("React").PureComponent);k=j&&j.prototype;n.prototype.render=function(){var o=c("React").createElement(c("ImageBlock.react"),{className:"_llj"+(this.props.location===c("MercuryShareAttachmentRenderLocations").MESSENGER?" _2eu-":"")+(this.props.location===c("MercuryShareAttachmentRenderLocations").CHAT?" _2eu_":""),spacing:"large",style:this.props.style},this.$MessengerContextBanner1(),c("React").createElement("div",{className:"_lll"},this.$MessengerContextBanner2(),this.$MessengerContextBanner3(),this.$MessengerContextBanner4())),p=this.props.associatedObject;if(p&&p[c("MessageThreadAssociatedObjectKey").ACTION_LINK])o=c("React").createElement(c("Link.react"),{href:p[c("MessageThreadAssociatedObjectKey").ACTION_LINK],target:"_blank",style:{textDecoration:"none"}},o);return o};n.prototype.$MessengerContextBanner1=function(){__p&&__p();var o=this.props.location===c("MercuryShareAttachmentRenderLocations").MESSENGER,p=this.props.associatedObject,q=null;if(!this.props.contactName&&p&&o)q=c("React").createElement(c("Image.react"),{className:"_4ld- _1wrc",src:p[c("MessageThreadAssociatedObjectKey").PROFILE_PICTURE]});else if(this.props.thread){var r=m&&o?m:c("MercuryThreadImage.react");q=c("React").createElement(r,{showBadge:false,participants:this.props.participants,size:o?60:null,thread:this.props.thread,viewer:this.props.viewer})}else if(this.props.participantIDs)q=c("React").createElement(c("MercuryParticipantsImage.react"),{participants:this.props.participantIDs,size:c("MercuryParticipantsConstants").BIG_IMAGE_SIZE});return c("React").createElement("div",{className:"_llk"},q)};n.prototype.$MessengerContextBanner2=function(){if(this.props.location!==c("MercuryShareAttachmentRenderLocations").MESSENGER)return null;var o=this.props.isVerified?c("React").createElement(c("Badge.react"),{size:"medium",type:"verified"}):null,p=this.props.contactName;if(!p){var q=this.props.associatedObject;p=q?q[c("MessageThreadAssociatedObjectKey").NAME]:null}return c("React").createElement("div",{className:"_llq"},c("React").createElement("span",{className:"_3oh-"},p,o))};n.prototype.$MessengerContextBanner3=function(){return c("React").createElement("div",{className:"_1n-e _36zg"},this.props.connectionContext)};n.prototype.$MessengerContextBanner4=function(){__p&&__p();if(!this.props.contextItems.length){var o=this.props.associatedObject;if(o){var p=c("TimeSpentRoomTypeEnum")[o[c("MessageThreadAssociatedObjectKey").ROOM_TYPE]],q=c("CurrentUser").isWorkUser()?"Workplace":"Facebook";return c("React").createElement("div",{className:"_1n-e"},i._({"EVENT":"Go to {productName} Event","GROUP":"Go to {productName} Group"},[i.param("productName",q),i["enum"](p,c("TimeSpentRoomTypeEnum$FbtEnum"))]))}return null}return c("React").createElement("div",null,this.props.contextItems.map(function(r,s){return c("React").createElement("div",{className:"_1n-e",key:"item:"+s},r)}))};function n(){j.apply(this,arguments)}n.propTypes={contactName:l.string,associatedObject:l.object,connectionContext:l.string,contextItems:l.arrayOf(l.string).isRequired,isVerified:l.bool,location:l.string.isRequired,participantIDs:l.arrayOf(l.string),participants:l.instanceOf(c("immutable").Map),thread:l.object,viewer:l.string.isRequired};f.exports=n}),null);
__d("XMessengerContextBannerController",["XController"],(function a(b,c,d,e,f,g){f.exports=c("XController").create("/ajax/messenger/context_banner/",{profile_id:{type:"Int",required:true},max_context_items:{type:"Int",defaultValue:3}})}),null);
__d("MessengerContextInformationStore",["AsyncRequest","EventEmitter","Map","TimeSlice","XMessengerContextBannerController"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();var h,i,j=new(c("Map"))(),k=new(c("Map"))();h=babelHelpers.inherits(l,c("EventEmitter"));i=h&&h.prototype;function l(){var m,n;for(var o=arguments.length,p=Array(o),q=0;q<o;q++)p[q]=arguments[q];return n=(m=i.constructor).call.apply(m,[this].concat(p)),this.$MessengerContextInformationStore1=function(r){if(k.get(r))return;var s=c("XMessengerContextBannerController").getURIBuilder().setInt("profile_id",r).getURI(),t=new(c("AsyncRequest"))().setAllowCrossPageTransition(true).setURI(s).setHandler(this.$MessengerContextInformationStore2.bind(this,r));k.set(r,t);t.send()}.bind(this),n}l.prototype.getOrFetch=function(m){var n=j.get(m);n||c("TimeSlice").guard(this.$MessengerContextInformationStore1,"Chat Tab Messenger Context Banner Fetch",{propagationType:c("TimeSlice").PropagationType.ORPHAN})(m);return n};l.prototype.$MessengerContextInformationStore2=function(m,n){j.set(m,{connectionContext:n.payload.connection_context||"",contextItems:n.payload.context_items||[]});k["delete"](m);this.emit("change")};f.exports=new l()}),null);
__d("PagesMessengerContextBanner.react",["cx","MercuryThreadImage.react","ProfileHeaderCoverPhoto.react","React"],(function a(b,c,d,e,f,g,h){"use strict";__p&&__p();var i,j,k=83,l=260,m=60;i=babelHelpers.inherits(n,c("React").PureComponent);j=i&&i.prototype;n.prototype.render=function(){var o=this.props.coverPhotoData?c("React").createElement(c("ProfileHeaderCoverPhoto.react"),{coverPhotoData:this.props.coverPhotoData,height:k,width:l}):null;return c("React").createElement("div",{className:"_fj3",style:this.props.style},o,c("React").createElement("div",{className:"_2-0o"},c("React").createElement(c("MercuryThreadImage.react"),{size:m,thread:this.props.thread,viewer:this.props.viewer})))};function n(){i.apply(this,arguments)}f.exports=n}),null);
__d("MessengerContextBannerContainer.react",["DOMDimensions","immutable","MercuryIDs","MercuryParticipants","MercuryThreads","MessengerContextBanner.react","MessengerContextInformationStore","PagesMessagingMercuryChatTabStore","PagesMessengerContextBanner.react","ReactComponentWithPureRenderMixin","React","ReactDOM","MercuryShareAttachmentRenderLocations","StoreAndPropBasedStateMixin"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();var h=c("React").PropTypes,i=c("React").createClass({displayName:"MessengerContextBannerContainer",mixins:[c("ReactComponentWithPureRenderMixin"),c("StoreAndPropBasedStateMixin")(c("MercuryParticipants"),c("MercuryThreads"),c("MessengerContextInformationStore"),c("PagesMessagingMercuryChatTabStore"))],propTypes:{location:h.string.isRequired,onResize:h.func,otherUserFBIDs:h.arrayOf(h.string),threadID:h.string,viewer:h.string.isRequired},statics:{calculateState:function j(k){__p&&__p();var l=null,m=null;if(k.threadID){l=c("MercuryThreads").getForFBID(k.viewer).getOrFetch(k.threadID);m=l&&l.participants}else if(k.otherUserFBIDs&&k.otherUserFBIDs.length===1)m=k.otherUserFBIDs.map(function(s){return c("MercuryParticipants").getIDFromVanityOrFBID(s)});var n=c("immutable").Map();if(m)n=n.withMutations(function(s){m&&m.forEach(function(t){s.set(t,c("MercuryParticipants").getOrFetch(t))})});var o=null,p=null;if(l){o=n.get(c("MercuryIDs").getParticipantIDFromFromThreadID(l.thread_id));p=l.associated_object}else o=m&&n.get(m[0]);var q=c("PagesMessagingMercuryChatTabStore").getStateByThread(k.threadID),r=q.coverPhotoData;return babelHelpers["extends"]({associatedObject:p,contact:o,coverPhotoData:r,participantIDs:m,participants:n,thread:l},i.getContextInformation(o&&o.fbid&&o.fbid.toString()))},getContextInformation:function j(k){var l=void 0;if(k)l=c("MessengerContextInformationStore").getOrFetch(k.toString());return l||{connectionContext:"",contextItems:[]}}},componentDidUpdate:function j(){var k=c("ReactDOM").findDOMNode(this);if(!k)return;var l=c("DOMDimensions").getElementDimensions(k).height;if(this.props.onResize)this.props.onResize(l)},render:function j(){__p&&__p();if(!this.state.contact){if(this.state.associatedObject&&this.props.location==c("MercuryShareAttachmentRenderLocations").MESSENGER)return c("React").createElement(c("MessengerContextBanner.react"),{associatedObject:this.state.associatedObject,contextItems:this.state.contextItems,location:this.props.location,participantIDs:this.state.participantIDs,participants:this.state.participants,style:this.props.style,thread:this.state.thread,viewer:this.props.viewer});return null}if(this.state.contact.type==="page"){if(!this.state.connectionContext&&!this.state.contextItems.length)return null;if(this.props.location===c("MercuryShareAttachmentRenderLocations").CHAT)return c("React").createElement(c("PagesMessengerContextBanner.react"),{coverPhotoData:this.state.coverPhotoData,style:this.props.style,thread:this.state.thread,viewer:this.props.viewer})}return c("React").createElement(c("MessengerContextBanner.react"),{contactName:this.state.contact.name,connectionContext:this.state.connectionContext,contextItems:this.state.contextItems,isVerified:this.state.contact.is_verified,location:this.props.location,participantIDs:this.state.participantIDs,participants:this.state.participants,style:this.props.style,thread:this.state.thread,viewer:this.props.viewer})}});f.exports=i}),null);
__d("MessengerDateBreak.react",["cx","React","formatDate","joinClasses"],(function a(b,c,d,e,f,g,h){__p&&__p();var i,j,k=c("React").PropTypes;i=babelHelpers.inherits(l,c("React").Component);j=i&&i.prototype;l.prototype.shouldComponentUpdate=function(m){"use strict";return this.props.date.getTime()!==m.date.getTime()};l.prototype.render=function(){"use strict";var m=c("formatDate")(this.props.date,{today:"g:ia",withinWeek:"D g:ia",thisYear:"M jS, g:ia",older:"m/d/Y g:ia"});return c("React").createElement("h4",{className:c("joinClasses")(this.props.className,"_497p _2lpt")},c("React").createElement("time",{className:"_3oh-"},m))};function l(){"use strict";i.apply(this,arguments)}l.propTypes={date:k.instanceOf(Date).isRequired};f.exports=l}),null);
__d("MessengerDeliveryReceipt.bs",["Utils.bs","bs_js_primitive"],(function a(b,c,d,e,f,g){"use strict";function h(j,k){return c("Utils.bs").$pipe$unknown(c("bs_js_primitive").undefined_to_opt(j[k]),0)}var i=c("Utils.bs").$pipe$unknown;g.$pipe$unknown=i;g.getDeliveryTimeOfThread=h}),null);
__d("MessengerSignals.bs",["EventEmitter"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();var h=new(c("EventEmitter"))(),i="resize";function j(){h.emit(i);return 0}function k(l){return h.addListener(i,l)}g.emitter=h;g.resizeEvent=i;g.resize=j;g.onResize=k}),null);
__d("MessengerFlexArea.react",["cx","CSS","Event","MessengerSignals.bs","React","ReactDOM","ResponsiveBlock.react","Style","SubscriptionsHandler","Vector","getElementRect","getScrollPosition","gkx","joinClasses","throttle"],(function a(b,c,d,e,f,g,h){"use strict";__p&&__p();var i=c("React").PropTypes,j=c("React").createClass({displayName:"MessengerFlexArea",propTypes:{beforeResize:i.func,onResize:i.func},_subscriptions:null,_onResizeTimeout:null,getInitialState:function k(){return{height:0}},componentDidMount:function k(){var l=new(c("SubscriptionsHandler"))();l.addSubscriptions(c("Event").listen(window,"resize",c("throttle")(this.recalculateHeight,51)),c("MessengerSignals.bs").onResize(function(){this.recalculateHeight()}.bind(this)));this._subscriptions=l;this.recalculateHeight()},componentWillUnmount:function k(){this._subscriptions&&this._subscriptions.release();clearTimeout(this._onResizeTimeout)},render:function k(){return c("React").createElement(c("ResponsiveBlock.react"),{className:c("joinClasses")(this.props.className,"_9hq"+(c("gkx")("AT7X8zD-9DNn0OeQ0S5-rozrySawyX8ZP8Z_NFsQBL8WAUNZhO-HKIM8cWBdfNilWyfk5H-Q_oFDDxJhsL4ycAkk")?" _1aza":"")),onResize:this._handleResponsiveBlockResize,style:{height:this.state.height+"px"}},this.props.children)},recalculateHeight:function k(){__p&&__p();if(!this.isMounted())return;var l=c("ReactDOM").findDOMNode(this),m=l.parentNode,n=this.state.height,o=c("Vector").getViewportDimensions().y,p=false;if(m&&c("Style").get(m,"display")==="none"){c("Style").set(m,"display","initial");p=true}var q=false;if(m instanceof Element&&c("CSS").hasClass(m,"hidden_elem")){c("CSS").removeClass(m,"hidden_elem");q=true}o-=c("Vector").getElementPosition(m||l).y;var r=c("getScrollPosition")(window);o+=r.y;if(m){Array.from(m.childNodes).forEach(function(s){if(s.nodeType===Node.COMMENT_NODE||c("Style").get(s,"position")==="absolute")return;o-=c("getElementRect")(s).height});o+=c("getElementRect")(l).height}if(p)c("Style").set(m,"display","");if(q&&m instanceof Element)c("CSS").addClass(m,"hidden_elem");if(isNaN(o)||o<0)o=0;if(o!==n){this.props.beforeResize&&this.props.beforeResize();this.setState({height:o},this.props.onResize)}},_handleResponsiveBlockResize:c("throttle")(function(k,l){if(!this.isMounted())return;if(l===this.state.height){this.props.beforeResize&&this.props.beforeResize();clearTimeout(this._onResizeTimeout);if(this.props.onResize)this._onResizeTimeout=setTimeout(this.props.onResize,0)}},51)});f.exports=j}),null);
__d("MessengerFlexScrollableArea.react",["csx","DOM","Event","MessengerFlexArea.react","MessengerScrollableArea.react","MutationObserver","Parent","React","ReactDOM","gkx"],(function a(b,c,d,e,f,g,h){"use strict";__p&&__p();var i,j,k=c("React").PropTypes,l=".img:not(.loaded)",m="loaded",n="._2poz";i=babelHelpers.inherits(o,c("React").Component);j=i&&i.prototype;function o(){__p&&__p();var p,q;for(var r=arguments.length,s=Array(r),t=0;t<r;t++)s[t]=arguments[t];return q=(p=j.constructor).call.apply(p,[this].concat(s)),this.state={shouldTrackBottom:this.props.shouldStickToBottom},this.$MessengerFlexScrollableArea5=function(u){if(!c("gkx")("AT7X8zD-9DNn0OeQ0S5-rozrySawyX8ZP8Z_NFsQBL8WAUNZhO-HKIM8cWBdfNilWyfk5H-Q_oFDDxJhsL4ycAkk"))return;u.forEach(function(v){if(v.addedNodes.length>0){v.addedNodes.forEach(function(w){this.$MessengerFlexScrollableArea3(w)}.bind(this));this.trackBottomIfRequired()}}.bind(this))}.bind(this),this.$MessengerFlexScrollableArea8=function(){this.props.onScroll&&this.props.onScroll();if(!this.props.shouldStickToBottom)return;this.$MessengerFlexScrollableArea9()}.bind(this),this.$MessengerFlexScrollableArea7=function(){this.trackBottomIfRequired()}.bind(this),q}o.prototype.componentDidMount=function(){this.props.onMount&&this.props.onMount();if(this.props.shouldStickToBottom){this.$MessengerFlexScrollableArea3(c("ReactDOM").findDOMNode(this.refs.scrollable));this.$MessengerFlexScrollableArea4()}};o.prototype.$MessengerFlexScrollableArea4=function(){if(!c("gkx")("AT7X8zD-9DNn0OeQ0S5-rozrySawyX8ZP8Z_NFsQBL8WAUNZhO-HKIM8cWBdfNilWyfk5H-Q_oFDDxJhsL4ycAkk"))return;this.$MessengerFlexScrollableArea1=new(c("MutationObserver"))(this.$MessengerFlexScrollableArea5);var p=c("ReactDOM").findDOMNode(this.refs.scrollable);this.$MessengerFlexScrollableArea1.observe(p,{childList:true,subtree:true})};o.prototype.$MessengerFlexScrollableArea3=function(p){__p&&__p();if(!c("gkx")("AT7X8zD-9DNn0OeQ0S5-rozrySawyX8ZP8Z_NFsQBL8WAUNZhO-HKIM8cWBdfNilWyfk5H-Q_oFDDxJhsL4ycAkk"))return;this.$MessengerFlexScrollableArea6(p).forEach(function(q){c("DOM").scry(q,l).forEach(function(r){if(r.complete){r.classList.add(m);return}var s=c("Event").listen(r,"load",function(){r.classList.add(m);this.trackBottomIfRequired();s.remove()}.bind(this))}.bind(this))}.bind(this))};o.prototype.$MessengerFlexScrollableArea6=function(p){var q=c("DOM").scry(p,n);if(q.length===0){var r=c("Parent").bySelector(p,n);if(r)q=q.concat(r)}return q};o.prototype.componentWillUnmount=function(){this.$MessengerFlexScrollableArea1&&this.$MessengerFlexScrollableArea1.disconnect()};o.prototype.render=function(){return c("React").createElement(c("MessengerFlexArea.react"),{className:this.props.className,onResize:this.$MessengerFlexScrollableArea7,ref:"flexArea"},this.props.flexChildren,c("React").createElement(c("MessengerScrollableArea.react"),{height:"100%",needsFastScrollHandler:this.state.shouldTrackBottom,onScroll:this.$MessengerFlexScrollableArea8,ref:"scrollable",tabIndex:this.props.tabIndex},this.props.children),this.props.footerChildren)};o.prototype.$MessengerFlexScrollableArea9=function(){if(this.isScrolledToBottom()){this.setState({shouldTrackBottom:true});this.$MessengerFlexScrollableArea10()}else{this.setState({shouldTrackBottom:false});this.$MessengerFlexScrollableArea11()}};o.prototype.$MessengerFlexScrollableArea10=function(){if(!this.props.useScrollProtection)return;this.$MessengerFlexScrollableArea11();this.$MessengerFlexScrollableArea2=setInterval(function(){this.trackBottomIfRequired()}.bind(this),500)};o.prototype.$MessengerFlexScrollableArea11=function(){if(this.$MessengerFlexScrollableArea2)clearInterval(this.$MessengerFlexScrollableArea2)};o.prototype.getArea=function(){return this.refs.scrollable&&this.refs.scrollable.getArea()};o.prototype.handleResize=function(){this.refs.flexArea&&this.refs.flexArea.recalculateHeight()};o.prototype.trackBottomIfRequired=function(){if(this.state.shouldTrackBottom)this.scrollToBottom()};o.prototype.scrollToBottom=function(){this.refs.scrollable&&this.refs.scrollable.scrollToBottom()};o.prototype.scrollToTop=function(p){this.refs.scrollable&&this.refs.scrollable.scrollToTop(p)};o.prototype.scrollToPosition=function(p,q,r){this.refs.scrollable&&this.refs.scrollable.scrollToPosition(p,q,r)};o.prototype.isScrolledToBottom=function(){var p=this.refs.scrollable;return p?p.isScrolledToBottom():true};o.prototype.isScrolledToBottomWithHeight=function(p){return this.refs.scrollable.isScrolledToBottomWithHeight(p)};o.prototype.isScrolledToTop=function(){return this.refs.scrollable&&this.refs.scrollable.isScrolledToTop()};o.prototype.getScrollTop=function(){return this.refs.scrollable&&this.refs.scrollable.getScrollTop()||0};o.propTypes={flexChildren:k.node,footerChildren:k.node,onMount:k.func,onScroll:k.func,shouldStickToBottom:k.bool,tabIndex:k.number,useScrollProtection:k.bool};f.exports=o}),null);
__d("MessengerMessageActionsWrapper.react",["ImmutableObject","React"],(function a(b,c,d,e,f,g){"use strict";var h=c("React").PropTypes,i=c("React").createClass({displayName:"MessengerMessageActionsWrapper",propTypes:{message:h.instanceOf(c("ImmutableObject")).isRequired,onShowMenu:h.func.isRequired},render:function j(){return c("React").createElement("div",babelHelpers["extends"]({onMouseEnter:this._handleShowMenu,onMouseLeave:this._handleHideMenu},this.props),this.props.children)},_handleShowMenu:function j(){this.props.onShowMenu(this.props.message.message_id,true)},_handleHideMenu:function j(){this.props.onShowMenu(this.props.message.message_id,false)}});f.exports=i}),null);
__d("MessengerMessageSeenHeadsReact.bs",["cx","fbt","cssVar","React","immutable","ImageReact.bs","bs_pervasives","ReasonReact.bs","joinClasses","MessengerConfig","MercuryTimestamp","MercuryAttachment","MercuryMessageInfo","getViewportDimensions"],(function a(b,c,d,e,f,g,h,i,j){"use strict";__p&&__p();var k=c("MessengerConfig").MaxSeenHeadCount;function l(){var p=c("getViewportDimensions")().width;if(p<parseInt("920px".replace("px",""),10))return c("bs_pervasives").min(k,8);else if(p<parseInt("1211px".replace("px",""),10))return c("bs_pervasives").min(k,3);else return k}var m=c("ReasonReact.bs").statelessComponent("MessengerMessageSeenHeadsReact");function n(p,q,r,s,t,u,v){__p&&__p();var w=m.slice();w[9]=function(){__p&&__p();if(c("MercuryMessageInfo").isSending(r)||u.isEmpty()||c("MercuryMessageInfo").hasError(r))return null;else{var x=c("immutable").Seq(u).filter(function(F){var G=+(F.watermark>=r.timestamp&&F.watermark<s);if(G!==0)return true;else return false}).sort(function(F,G){return F.action-G.action|0});if(x.isEmpty())return null;else{var y=q!==0?k:l(0),z=+(x.count()>(y+1|0)),A=z!==0?x.slice(0,y):x,B=A.map(function(F,G,v){var H=t.get(G);if(H==null)return null;else{var I=i._("Seen by {full name} at {seen time}",[i.param("full name",H.name),i.param("seen time",c("MercuryTimestamp").getPreciseTimestamp(F.action))]);return c("ReasonReact.bs").element([c("bs_pervasives").string_of_int(G)],0,c("ImageReact.bs").make(["_jf2"],[I],[H.image_src],0,[I],0,0,[]))}}).toArray(),C=B.length;if(C){var D=z!==0?x.slice(y,undefined).count():0;if(D>0){var E=x.slice(y,undefined).map(function(v,F,G){var H=t.get(F);if(H==null)return"";else return H.name}).filter(function(F){var G=+(F==="");if(G!==0)return false;else return true}).join("\n")+" ";B.unshift(c("React").createElement("span",{key:"overflow",className:"_jf3",title:E},"+"+c("bs_pervasives").string_of_int(D)))}return c("React").createElement("span",{className:c("joinClasses")(p,"_jf4"+(+((C+D|0)===1)?" _jf5":"")+(+c("MercuryAttachment").isSinglePhotoGroupAttachment(r)?" _ba3":""))},B)}else return null}}};return w}var o=c("ReasonReact.bs").wrapReasonForJs(m,function(p){return n(p.className,+p.isFromViewer,p.message,p.nextTimestamp,p.participants,p.readReceipts,[])});g.maxSeenHeads=k;g.calculateSliceNumber=l;g.component=m;g.make=n;g.jsComponent=o}),null);
__d("MessengerURIUtils.bs",["URI","MercuryIDs","MessengerView","MessengerURISerializer"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();function h(k){var l=c("MessengerURISerializer").deserialize(new(c("URI"))(window.location.href)),m=c("MessengerView").DETAIL.THREAD,n=+l.queryAll;return c("MessengerURISerializer").serialize(Object.assign(Object.assign({},l),{activeThreadID:k,detailView:m,query:n!==0?l.query:undefined}))}function i(k){return h(c("MercuryIDs").getThreadIDFromUserID(k))}function j(k){return new(c("URI"))("/m/"+k)}g.getURIForThreadID=h;g.getURIForUserID=i;g.getURIForMessageID=j}),null);
__d("messengerRTLClasses",["cx","isRTL"],(function a(b,c,d,e,f,g,h){"use strict";function i(j,k){var l=c("isRTL")(j||"");return k?l?"_4pv0":"":(!l?"direction_ltr":"")+(l?" direction_rtl":"")+(!l?" text_align_ltr":"")+(l?" text_align_rtl":"")+(l?" _4pv0":"")}f.exports=i}),null);
__d("MessengerMessage.react",["cssVar","cx","fbt","EmojiLikeUtils","MercuryDisplayTimeFilterMessageRenderer","FluxContainer","ifRequired","immutable","ImmutableObject","MercuryAttachment","MercuryMessageDeliveryState","MercuryMessageError.react","MercuryMessageInfo","MercuryTimestamp","MessengerAttachmentAttribution.react","MessengerAttachmentRenderer","MessengerBubble.react","MessengerBubbleBlock.react","MessengerCodeBubble.react","MessengerCodePasteUtils","MessengerDecorator","MessengerInnerDecorators.react","MessengerMessageActionsWrapper.react","MessengerMessageSeenHeadsReact.bs","MessengerURIUtils.bs","MessengerVideoAutoplayStore","MNCommerceMessageType","React","TooltipData","emptyFunction","getViewportDimensions","joinClasses","messengerRTLClasses"],(function a(b,c,d,e,f,g,h,i,j){"use strict";__p&&__p();var k,l,m=c("MessengerMessageSeenHeadsReact.bs").jsComponent,n=c("React").PropTypes;function o(r){switch(r){case c("MercuryMessageDeliveryState").SENDING:return j._("Sending");case c("MercuryMessageDeliveryState").SENT:return j._("Sent");case c("MercuryMessageDeliveryState").DELIVERED:return j._("Delivered");case c("MercuryMessageDeliveryState").ERROR:return j._("Error")}return null}k=babelHelpers.inherits(p,c("React").Component);l=k&&k.prototype;function p(){__p&&__p();var r,s;for(var t=arguments.length,u=Array(t),v=0;v<t;v++)u[v]=arguments[v];return s=(r=l.constructor).call.apply(r,[this].concat(u)),this.state={isVisible:false,plainText:false,shown:{}},this.$MessengerMessage14=function(w){w.stopPropagation();this.props.onSelect(this.props.message.message_id)}.bind(this),this.$MessengerMessage4=function(w,x){var y;this.setState({shown:babelHelpers["extends"]({},this.state.shown,(y={},y[w]=x,y))})}.bind(this),this.$MessengerMessage5=function(){this.setState({plainText:!this.state.plainText})}.bind(this),this.$MessengerMessage12=function(){this.props.onSelect(this.props.message.message_id)}.bind(this),this.$MessengerMessage6=function(){return c("MessengerCodePasteUtils").containsCodeBlock(this.props.message.body)||!!this.messageBody&&this.messageBody.hasFormatting()}.bind(this),s}p.getStores=function(){var r=[c("MessengerVideoAutoplayStore")],s=c("ifRequired")("MessengerSphericalRendererStore",function(t){return t},function(){return null});if(s)r.push(s);return r};p.calculateState=function(r,s){return{isVisible:c("MessengerVideoAutoplayStore").isVisible(s.message.thread_id,s.message.message_id)||c("ifRequired")("MessengerSphericalRendererStore",function(t){return t.isVisible(s.message.thread_id,s.message.message_id)},function(){return false})}};p.prototype.shouldComponentUpdate=function(r,s){return r.isActive!==this.props.isActive||r.isFromViewer!==this.props.isFromViewer||r.message!==this.props.message||r.nextTimestamp!==this.props.nextTimestamp||r.showDeliveryState!==this.props.showDeliveryState||r.deliveryTimestamp!==this.props.deliveryTimestamp||!c("immutable").is(r.readReceipts,this.props.readReceipts)||!c("immutable").is(r.participants,this.props.participants)||r.customColor!==this.props.customColor||s.isVisible!==this.state.isVisible};p.prototype.render=function(){__p&&__p();var r=this.props,s=r.isActive,t=r.isFromViewer,u=r.isPageMessage,v=r.message,w=j._("{time}",[j.param("time",c("MercuryTimestamp").getPreciseTimestamp(v.timestamp))]),x=c("TooltipData").propsFor(w,q(t)),y=[],z=[],A=this.props.message,B=t||false;if(A&&!this.props.hideBeforeDecorator){c("MessengerDecorator").getBeforeDecorators().forEach(function(F){if(F.check(A))y.push(F.render(A,B))});c("MessengerDecorator").getInnerDecorators().forEach(function(F){if(F.check(A))z.push(F.getAdditionalClassNames())})}var C=this.$MessengerMessage1(x,false),D=this.$MessengerMessage2(x,null);if(D)C=this.$MessengerMessage1(x,true);var E=!!D&&this.$MessengerMessage3();return c("React").createElement(c("MessengerMessageActionsWrapper.react"),{className:c("joinClasses").apply(undefined,["clearfix _o46 _3erg"+(s?" _-5k":"")+(t?" _3i_m":"")+(t?" _nd_":"")+(!t?" _29_7":"")+(v.isSelected?" _3xsz":"")+(E?" _q4a":""),c("messengerRTLClasses")(v.body)].concat(z)),message:v,onShowMenu:this.$MessengerMessage4},y,C,D||u?null:c("React").createElement(c("MessengerInnerDecorators.react"),{message:A,isFromViewer:t,hovered:this.state.shown[A.message_id],messageProps:babelHelpers["extends"]({},this.props,{handleToggleOriginal:this.$MessengerMessage5,hasFormatting:this.$MessengerMessage6,isShowingOriginal:this.state.plainText})}),D,this.$MessengerMessage7(A,B),this.$MessengerMessage8(),this.$MessengerMessage9(),c("React").createElement(m,{className:"_4jzq",isFromViewer:t,message:v,nextTimestamp:this.props.nextTimestamp,participants:this.props.participants,readReceipts:this.props.readReceipts}))};p.prototype.$MessengerMessage7=function(r,s){__p&&__p();var t,u=this;if(r&&!this.props.hideAfterExternalDecorator){var t=function(){__p&&__p();var v=[],w=[];c("MessengerDecorator").getAfterExternalDecorators().forEach(function(y){if(r&&y.check(r)){v.push(y.render(r,s,this.props));w.push(y.getAdditionalClassNames())}},u);var x=w.join(" ");if(v.length===0)return{v:null};return{v:c("React").createElement("span",{className:c("joinClasses")(x,"_31gm"+(!s?" isFromOther":""))},v)}}();if(typeof t==="object")return t.v}return null};p.prototype.$MessengerMessage10=function(r){return r.every(function(s){return!s||!c("MessengerAttachmentRenderer").isRenderedShareAttachment(s)})};p.prototype.$MessengerMessage11=function(){return this.props.message.attachments.length===1&&c("MercuryAttachment").hasAttribution(this.props.message.attachments[0])};p.prototype.$MessengerMessage2=function(r,s){__p&&__p();if(this.props.message.is_filtered_content)return null;if(this.props.message.commerce_message_type===c("MNCommerceMessageType").RIDE_INTENT)return null;var t=[],u=[],v=this.props.message,w=this.props.isFromViewer||false;if(v)c("MessengerDecorator").getAfterDecorators().forEach(function(B){if(B.check(v,w)){t.push(B.render(v,w,this.props));u.push(B.getAdditionalClassNames())}}.bind(this));var x=c("MessengerAttachmentRenderer").getAttachmentsOutsideBubble(this.props.message,this.props.onAttachmentLoad,{customColor:this.props.customColor,isFromViewer:this.props.isFromViewer,isPageMessage:this.props.isPageMessage,isVisible:this.state.isVisible,onSelect:this.$MessengerMessage12,onUnwrap:null,pageID:this.props.pageID},t);if(!x||!x.length)return null;if(r){var y=x.some(function(B){return!!B&&c("MessengerAttachmentRenderer").isPhotosGroupAttachment(B)});if(this.$MessengerMessage11())x=[c("React").createElement("span",{key:"AttachmentWithAttribution"},x[0],c("React").createElement(c("MessengerAttachmentAttribution.react"),{attachment:new(c("ImmutableObject"))(this.props.message.attachments[0])}))];x=this.$MessengerMessage10(x)?c("React").createElement("div",babelHelpers["extends"]({},r,{className:c("joinClasses").apply(undefined,["_3zvs"+(y?" _2-x3":"")].concat(u))}),x,t):x.map(function(B){return B&&c("React").cloneElement(B,r)})}var z=c("MessengerAttachmentRenderer").isSharedVideoAttachmentMessage(this.props.message),A=c("React").createElement("div",{key:"renderedAttachments",className:"_3058 _15gf"+(z?" _3duc":"")},x,this.props.isPageMessage?null:c("React").createElement(c("MessengerInnerDecorators.react"),{message:this.props.message,isFromViewer:this.props.isFromViewer||false,hovered:this.state.shown[this.props.message.message_id],messageProps:this.props}));if(this.$MessengerMessage11())return c("React").createElement(c("MessengerBubbleBlock.react"),null,A);return A};p.prototype.$MessengerMessage13=function(){return c("MessengerAttachmentRenderer").isP2PAttachment(this.props.message)};p.prototype.$MessengerMessage1=function(r,s){__p&&__p();var t=this.props.message,u=c("immutable").List(c("MessengerAttachmentRenderer").getAttachmentsInsideBubble(t,this.props.onAttachmentLoad)),v=t.ranges;if(t.profile_ranges&&t.profile_ranges.length)v=(v||[]).concat(t.profile_ranges.map(function(y){return babelHelpers["extends"]({},y,{url:c("MessengerURIUtils.bs").getURIForUserID(y.id)})}));var w=c("MessengerCodePasteUtils").containsCodeBlock(t.body)&&!this.state.plainText;if(t.is_filtered_content)return c("React").createElement("div",{className:"_3058 _wiu _52mr uiBoxYellow clearfix"},c("MercuryDisplayTimeFilterMessageRenderer").renderFilteredContent(t));var x=t.body&&!c("EmojiLikeUtils").isEmojiLike(t);if(x||!u.isEmpty())return c("React").createElement(c("MessengerBubble.react"),babelHelpers["extends"]({attachments:u,body:t.body,bodyRef:function(y){this.messageBody=y}.bind(this),className:w?(this.props.isFromViewer?"_3uhm":"")+(!this.props.isFromViewer?" _3uhn":""):"_3058 _ui9",containsCode:w,customColor:this.props.isFromViewer?this.props.customColor:"",customLike:t.customLike,excludeAfterDecorators:s,isFromViewer:this.props.isFromViewer,isP2PAttachment:this.$MessengerMessage13(),ranges:v,message:t,metaRanges:t.meta_ranges,plainText:this.state.plainText,threadCustomColor:this.props.threadCustomColor||"#0084ff",threadID:t.thread_id,participants:this.props.participants},r||{}));return null};p.prototype.$MessengerMessage9=function(){__p&&__p();if(!this.props.isFromViewer||!this.props.showDeliveryState||this.props.message.is_like_preview)return null;var r=c("MercuryMessageInfo").getDeliveryState(this.props.message,this.props.deliveryTimestamp);if(r===c("MercuryMessageDeliveryState").UNKNOWN)return null;var s={};if(this.props.customColor&&(r===c("MercuryMessageDeliveryState").SENT||r===c("MercuryMessageDeliveryState").SENDING||r===c("MercuryMessageDeliveryState").DELIVERED))s.color=this.props.customColor;var t=o(r);return c("React").createElement("span",{className:"_2her"+(r===c("MercuryMessageDeliveryState").SENDING?" _4jzp":"")+(r===c("MercuryMessageDeliveryState").SENT?" _3zzf":"")+(r===c("MercuryMessageDeliveryState").DELIVERED?" _9ah":"")+(r===c("MercuryMessageDeliveryState").ERROR?" _5ei9":""),style:s,title:t},c("React").createElement("i",{"aria-label":t,"aria-roledescription":j._("Status icon"),className:"_57e_",role:"img"}))};p.prototype.$MessengerMessage8=function(){var r=this.props.message;if(!c("MercuryMessageInfo").hasError(r))return null;return c("React").createElement(c("MercuryMessageError.react"),{className:"_3058 _2ygi",message:r,authorFBID:this.props.authorFBID})};p.prototype.$MessengerMessage3=function(){var r=this.props.message,s=false;if(r)s=!!(r.reactions&&Object.keys(r.reactions).length>0);return s};p.propTypes={customColor:n.string,deliveryTimestamp:n.number.isRequired,hideAfterExternalDecorator:n.bool,hideBeforeDecorator:n.bool,isActive:n.bool,isFromViewer:n.bool,isPageMessage:n.bool,message:n.instanceOf(c("ImmutableObject")).isRequired,nextTimestamp:n.number.isRequired,onAttachmentLoad:n.func.isRequired,onDeselect:n.func.isRequired,onSelect:n.func.isRequired,participants:n.instanceOf(c("immutable").Map).isRequired,readReceipts:n.instanceOf(c("immutable").OrderedMap).isRequired,showDeliveryState:n.bool,authorFBID:n.string,threadCustomColor:n.string,pageID:n.string};p.defaultProps={onAttachmentLoad:c("emptyFunction"),threadCustomColor:"#0084ff"};function q(r){if(c("getViewportDimensions")().width<=parseInt("700px".replace("px",""),10))return"above";return r?"right":"left"}f.exports=c("FluxContainer").create(p,{withProps:true})}),null);
__d("MessengerPageAdminNoteList.react",["cx","fbt","LeftRight.react","MessengerBubble.react","PagesMessengerCreatorInfo.react","ReactComponentWithPureRenderMixin","React","enumerate","classWithMixins","immutable","mixin"],(function a(b,c,d,e,f,g,h,i){"use strict";__p&&__p();var j,k,l=c("React").PropTypes;j=babelHelpers.inherits(m,c("classWithMixins")(c("React").Component,c("mixin")(c("ReactComponentWithPureRenderMixin"))));k=j&&j.prototype;m.prototype.render=function(){var n=[],o=this.calculateGroups(this.props.notes);o.forEach(function(p,q){n.push(c("React").createElement("li",{className:"_4kd2",key:"group:"+q},this.$MessengerPageAdminNoteList1(p)))}.bind(this));return c("React").createElement("ul",{className:"_4kd3"},n)};m.prototype.$MessengerPageAdminNoteList1=function(n){var o=[];n.forEach(function(p,q){o.push(c("React").createElement("div",{className:"_4kd4",key:"note:"+q},this.$MessengerPageAdminNoteList2(p,n)))}.bind(this));return o};m.prototype.$MessengerPageAdminNoteList2=function(n,o){var p=c("immutable").List([c("React").createElement(c("LeftRight.react"),{className:"_561k"},c("React").createElement("div",{className:"_561l"},i._("Private Note")),c("React").createElement(c("PagesMessengerCreatorInfo.react"),{key:"creator_info",creator_info:o[0].creator_info,isNote:true}))]);return c("React").createElement("div",{className:"_o46 _3i_m _nd_"},c("React").createElement("div",{className:"clearfix"},c("React").createElement(c("MessengerBubble.react"),{body:n.body.text,attachments:p,className:"_3058 _4kd5"})))};m.prototype.calculateGroups=function(n){__p&&__p();var o=[],p=null,q=null,r=c("enumerate")(n),s=void 0;while(!(s=r.next()).done){var t=q&&q.value.creator_info.creatorID===s.value.creator_info.creatorID;if(!t){p=[];o.push(p)}if(p)p.push(s.value);q=s}return o};function m(){j.apply(this,arguments)}m.propTypes={notes:l.arrayOf(l.shape({id:l.string,body:l.object.isRequired,creator_info:l.shape({creatorID:l.string.isRequired,creatorName:l.string.isRequired,creatorType:l.string.isRequired,labelType:l.string.isRequired,pageID:l.string.isRequired,profileURI:l.string}),timestamp:l.number.isRequired})).isRequired};f.exports=m}),null);
__d("MessengerMessageGroup.react",["cx","fbt","invariant","BootloadOnRender.react","CurrentUser","immutable","ImmutableObject","Image.react","JSResource","LazyComponent.react","Link.react","MercuryIDs","MercuryParticipants","MercuryParticipantSilhouettes","MessengerActions","MessengerContactActions.bs","MessengerMessage.react","MessengerPageAdminNoteList.react","MessengerProfileImageWrapperReact.bs","MessengerStickerUtils","MessengerTextWithEmoticons.react","MessengerURIUtils.bs","PagesMessengerCreatorInfo.react","React","ReactDOM","SimpleXUIDialog","StoreAndPropBasedStateMixin","emptyFunction","gkx"],(function a(b,c,d,e,f,g,h,i,j){"use strict";__p&&__p();var k=c("MessengerContactActions.bs").actions,l=c("MessengerProfileImageWrapperReact.bs").jsComponent,m=c("immutable").List,n=c("immutable").OrderedMap,o=c("React").PropTypes,p=32,q=new(c("ImmutableObject"))({image_src:c("MercuryParticipantSilhouettes").neutralSilhouette,is_messenger_user:true,name:""}),r=c("React").createClass({displayName:"MessengerMessageGroup",mixins:[c("StoreAndPropBasedStateMixin")(c("MercuryParticipants"))],propTypes:{activeMessageID:o.string,deliveryTimestamp:o.number.isRequired,hasDateBreak:o.bool,isCanonical:o.bool,isFromViewer:o.bool,isPageMessage:o.bool,lastReadTimestamp:o.number.isRequired,messages:o.instanceOf(m).isRequired,nextTimestamp:o.number.isRequired,onAttachmentLoad:o.func,onMessageDeselect:o.func.isRequired,onMessageSelect:o.func.isRequired,readReceipts:o.instanceOf(n).isRequired,thread:o.object,pageID:o.string},statics:{calculateState:function u(v){return{participants:s(v)}}},shouldComponentUpdate:function u(v,w){return this.props.activeMessageID!==v.activeMessageID||this.props.isFromViewer!==v.isFromViewer||this.props.deliveryTimestamp!==v.deliveryTimestamp||this.props.lastReadTimestamp!==v.lastReadTimestamp||!c("immutable").is(this.props.messages,v.messages)||!c("immutable").is(this.props.readReceipts,v.readReceipts)||!c("immutable").is(this.state.participants,w.participants)||!!(v.thread&&this.props.thread&&this.props.thread!==v.thread)},render:function u(){return c("React").createElement("div",null,c("React").createElement("div",{className:"_1t_p clearfix"+(c("MessengerStickerUtils").isStickerMessageGroup(this.props.messages)?" _5tx1":"")+(this._hasSeenHeadsAtBottom()?" _35fy":"")},this._renderProfileColumn(),c("React").createElement("div",{className:"_41ud"},this._renderName(),this._renderMessages())),this.props.isPageMessage?this._renderNotes():null)},_renderProfileColumn:function u(){__p&&__p();if(this.props.isFromViewer)return null;var v=this.props.messages.last(),w=this.state.participants.get(v.author)||q,x=i._("{name}",[i.param("name",w.name)]),y=c("CurrentUser").isWorkUser()&&w.is_coworker===false,z=c("React").createElement(l,{className:"_1t_r",isMessengerUser:w.is_messenger_user,size:p,showBadge:y,isMultiCompany:y,tooltipContent:x},c("React").createElement(c("Image.react"),{alt:w.name,src:w.image_src,height:p,width:p}));if(w.fbid){var A=c("MessengerURIUtils.bs").getURIForUserID(w.fbid);if(c("gkx")("AT7Q3RXvU0e0MR7WMB7vpMdOzYsW6m3MXSY9NFLfpMl_9zOHYMydsYAgMgpRAa3rIuTQCnrjzygxZViELyTXnLRu"))z=c("React").createElement(c("BootloadOnRender.react"),{loader:c("JSResource")("MessengerAvatarActions.react").__setRef("MessengerMessageGroup.react"),placeholder:!this.props.isCanonical?c("React").createElement(c("Link.react"),{className:"_5f0v",href:A.toString(),onClick:this._handleContactSelect.bind(this,w),tabIndex:-1},z):z,component:c("React").createElement(c("LazyComponent.react"),{avatar:z,contact:w,showSendMessageItem:!this.props.isCanonical,onAction:this._handleContactAction})});else if(!this.props.isCanonical)z=c("React").createElement(c("Link.react"),{className:"_5f0v",href:A.toString(),onClick:this._handleContactSelect.bind(this,w),tabIndex:-1},z)}return c("React").createElement("div",{className:"_1t_q"},z)},_handleContactAction:function u(v,w,x){__p&&__p();switch(v){case k.MESSAGE:this._handleContactSelect(w,x);break;case k.PROFILE:var y=this.state.participants.get(w.id);if(y&&y.href)window.open(y.href);else this._handleContactSelect(w,x);break;case k.FREE_CALL:e(["FBRTCCore","MNRTCCallabilityStore"],function(z,A){var B=w.fbid;B||j(0);if(z.isAvailableForWebrtcCalling(B)||A.isCallable(B))z.startOutgoingCall(B,"messenger_dot_com",false);else c("SimpleXUIDialog").show(i._("{firstname} can't be reached right now.",[i.param("firstname",w.short_name)]),i._("Can't Connect Call"))});break}},_renderMessages:function u(){var v=this.props.messages.size,w=[];this.props.messages.forEach(function(x,y,z){var A=x.message_id===this.props.activeMessageID,B=c("MercuryIDs").getUserIDFromParticipantID(this.props.author),C=this.props.thread?this.props.thread.custom_color:"",D=c("gkx")("AT7X8zD-9DNn0OeQ0S5-rozrySawyX8ZP8Z_NFsQBL8WAUNZhO-HKIM8cWBdfNilWyfk5H-Q_oFDDxJhsL4ycAkk")?c("emptyFunction"):this.props.onAttachmentLoad;w.push(c("React").createElement(c("MessengerMessage.react"),{customColor:C,deliveryTimestamp:this.props.deliveryTimestamp,isActive:A,isFromViewer:this.props.isFromViewer,isPageMessage:this.props.isPageMessage,key:x.message_id,message:x,messageActionsWrapper:this.props.messageActionWrapper,onAttachmentLoad:D,participants:this.state.participants,nextTimestamp:this._getNextTimestamp(z,v,y),onDeselect:this.props.onMessageDeselect,onSelect:this.props.onMessageSelect,readReceipts:this.props.readReceipts,showDeliveryState:x.timestamp>this.props.lastReadTimestamp,ref:x.message_id,authorFBID:B==null?undefined:B,threadCustomColor:C,pageID:this.props.pageID}));if(t(this.props.isPageMessage,z,y,x))w.push(c("React").createElement(c("PagesMessengerCreatorInfo.react"),{key:"creator_info:"+y,creator_info:x.creator_info}))}.bind(this));return w},_renderNotes:function u(){var v=[];this.props.messages.forEach(function(w,x,y){if(this.props.isPageMessage&&w.page_admin_notes)v.push(c("React").createElement(c("MessengerPageAdminNoteList.react"),{key:"notes:"+w.message_id,notes:w.page_admin_notes}))}.bind(this));return v},_renderName:function u(){__p&&__p();var v=this.state.participants.get(this.props.messages.first().author);if(!v)return null;var w=v.short_name;if(this.props.thread){var x=this.props.thread.custom_nickname?this.props.thread.custom_nickname:null,y=c("MercuryIDs").getUserIDFromParticipantID(v.id);if(x&&y&&x[y])w=c("React").createElement(c("MessengerTextWithEmoticons.react"),{renderEmoticons:true,renderEmoji:true,text:x[y]})}return c("React").createElement("h5",{className:"_ih3"+(this.props.isFromViewer?" accessible_elem":"")+(this.props.isCanonical?" _-ne":"")},w)},getMessageElement:function u(v){return c("ReactDOM").findDOMNode(this.refs[v])},_hasSeenHeadsAtBottom:function u(){var v=this.props,w=v.messages,x=v.nextTimestamp,y=v.readReceipts,z=w.last().timestamp,A=0;y.forEach(function(B){if(B>=z&&B<x)if(++A===2)return false});return A===2},_getNextTimestamp:function u(v,w,x){return x<w-1?v.get(x+1).timestamp:this.props.nextTimestamp},_handleContactSelect:function u(v,w){w&&w.preventDefault();var x=c("MercuryIDs").getThreadIDFromParticipantID(v.id);x&&c("MessengerActions").selectThread(x)}});function s(u){var v=u.messages.first().author;return c("immutable").Map().withMutations(function(w){u.readReceipts.forEach(function(x,y){w.set(y,c("MercuryParticipants").getOrFetch(y))});w.set(v,c("MercuryParticipants").getOrFetch(v))})}function t(u,v,w,x){if(!u||!x.creator_info)return false;if(w===v.size-1)return true;var y=v.get(w+1).creator_info;if(!y)return true;return x.creator_info.creatorID!==y.creatorID}f.exports=r}),null);
__d("MessengerNewMessagesNoticeReact.bs",["cx","ix","fbt","React","LinkReact.bs","ImageReact.bs","bs_js_boolean","ReasonReact.bs"],(function a(b,c,d,e,f,g,h,i,j){"use strict";__p&&__p();var k=i("86939"),l=j._("New Messages"),m=c("ReasonReact.bs").statelessComponent("MessengerNewMessagesNoticeReact");function n(p,q,r,s){var t=r?r[0]:l,u=m.slice();u[9]=function(){return c("React").cloneElement(c("React").createElement("div",{className:"_4wzq"+(c("bs_js_boolean").to_js_boolean(p)?" _4wzr":"")+(c("bs_js_boolean").to_js_boolean(1-p)?" _4-je":"")},c("ReasonReact.bs").element(0,0,c("LinkReact.bs").make(0,["_5f0v _4wzs"],0,0,0,0,0,0,[q],0,0,0,0,[p!==0?0:-1],0,0,[c("ReasonReact.bs").element(0,0,c("ImageReact.bs").make(["_4wzt"],0,[k],0,0,0,0,[])),c("React").createElement("div",{className:"_1bqr"},t)]))),{"aria-hidden":c("bs_js_boolean").to_js_boolean(1-p)})};return u}var o=c("ReasonReact.bs").wrapReasonForJs(m,function(p){return n(+p.isOpen,p.onClick,[p.label],[])});g.newMessageSrc=k;g.defaultLabel=l;g.component=m;g.make=n;g.jsComponent=o}),null);
__d("MessengerPlatformSubscriptionMessageClassification",[],(function a(b,c,d,e,f,g){f.exports=Object.freeze({EXEMPTED_TEMPLATE_MESSAGE:"exempted_template_message",MESSAGE_WITHIN_24HRS:"message_within_24hrs",SUBSCRIPTION_MESSAGE:"subscription_message",ACCEPTABLE_EXTRA_MESSAGE:"acceptable_extra_message",UNACCEPTABLE_EXTRA_MESSAGGE:"unacceptable_extra_message",AD_MESSAGE:"ad_message",FREE_LIMIT:"FREE_LIMIT"})}),null);
__d("XSetNUXSeenController",["XController"],(function a(b,c,d,e,f,g){f.exports=c("XController").create("/chat/nux_seen/",{setting_name:{type:"String"}})}),null);
__d("MessagingShowNUX.react",["AsyncRequest","ChatConfig","React","XSetNUXSeenController","XUIAmbientNUX.react"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();var h,i,j=c("React").PropTypes;h=babelHelpers.inherits(k,c("React").PureComponent);i=h&&h.prototype;function k(){__p&&__p();var l,m;for(var n=arguments.length,o=Array(n),p=0;p<n;p++)o[p]=arguments[p];return m=(l=i.constructor).call.apply(l,[this].concat(o)),this.state={showNUX:!c("ChatConfig").get(this.props.settingName)},this.$MessagingShowNUX1=function(){if(!this.state.showNUX)return;c("ChatConfig").set(this.props.settingName,true);new(c("AsyncRequest"))(c("XSetNUXSeenController").getURIBuilder().getURI()).setData({setting_name:this.props.settingName}).send();this.setState({showNUX:false});this.props.onHidden()}.bind(this),m}k.prototype.render=function(){return c("React").createElement(c("XUIAmbientNUX.react"),{contextRef:this.props.contextRef,onCloseButtonClick:this.$MessagingShowNUX1,position:"left",width:"auto",shown:this.state.showNUX&&this.props.shown},this.props.children)};k.propTypes={children:j.any,contextRef:j.func.isRequired,onHidden:j.func.isRequired,settingName:j.string.isRequired,shown:j.bool.isRequired};f.exports=k}),null);
__d("MessengerQuickCamDispatcher",["ExplicitRegistrationReactDispatcher"],(function a(b,c,d,e,f,g){"use strict";var h,i;h=babelHelpers.inherits(j,c("ExplicitRegistrationReactDispatcher"));i=h&&h.prototype;function j(){h.apply(this,arguments)}f.exports=new j({strict:false})}),null);
__d("MessengerQuickCamActions",["MessengerQuickCamDispatcher","keyMirror"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();var h=c("keyMirror")({CLOSE:null,COUNT_DOWN_TIMER:null,COUNT_DOWN_TIMER_START:null,PROCESS_RECORDING:null,REGISTER_QUICKCAM:null,REMOVE_ALL_LISTENERS:null,REQUEST_USER_MEDIA:null,RETAKE:null,SEND_PHOTO:null,SEND_VIDEO:null,SET_MEDIA:null,SHUTTER_OFF:null,STOP_VIDEO:null,TAKE_VIDEO:null,UPDATE_PROGRESS:null,UPLOAD_COMPLETE:null,UPLOAD_ERROR:null,USER_MEDIA_ERROR:null}),i={Types:h,close:function j(){c("MessengerQuickCamDispatcher").dispatch({type:h.CLOSE})},countDownTimer:function j(){c("MessengerQuickCamDispatcher").dispatch({type:h.COUNT_DOWN_TIMER})},countDownTimerStart:function j(){c("MessengerQuickCamDispatcher").dispatch({type:h.COUNT_DOWN_TIMER_START})},processRecording:function j(k){c("MessengerQuickCamDispatcher").dispatch({type:h.PROCESS_RECORDING,videoBlob:k})},registerQuickCam:function j(k,l){c("MessengerQuickCamDispatcher").dispatch({type:h.REGISTER_QUICKCAM,source:k,quickcam:l})},requestUserMedia:function j(k,l){c("MessengerQuickCamDispatcher").dispatch({type:h.REQUEST_USER_MEDIA,viewer:k,threadID:l})},retake:function j(){c("MessengerQuickCamDispatcher").dispatch({type:h.RETAKE})},sendPhoto:function j(){c("MessengerQuickCamDispatcher").dispatch({type:h.SEND_PHOTO})},sendVideo:function j(){c("MessengerQuickCamDispatcher").dispatch({type:h.SEND_VIDEO})},setMedia:function j(k,l){c("MessengerQuickCamDispatcher").dispatch({type:h.SET_MEDIA,videoSrc:k,videoStream:l})},stopVideo:function j(){c("MessengerQuickCamDispatcher").dispatch({type:h.STOP_VIDEO})},shutterOff:function j(){c("MessengerQuickCamDispatcher").dispatch({type:h.SHUTTER_OFF})},takeVideo:function j(){c("MessengerQuickCamDispatcher").dispatch({type:h.TAKE_VIDEO})},updateProgress:function j(){c("MessengerQuickCamDispatcher").dispatch({type:h.UPDATE_PROGRESS})},uploadError:function j(k){c("MessengerQuickCamDispatcher").dispatch({type:h.UPLOAD_ERROR,error:k})},uploadComplete:function j(k){c("MessengerQuickCamDispatcher").dispatch({type:h.UPLOAD_COMPLETE,data:k})},userMediaError:function j(){c("MessengerQuickCamDispatcher").dispatch({type:h.USER_MEDIA_ERROR})}};f.exports=i}),null);
__d("MessengerQuickCamButtonHTML5.react",["cx","fbt","BootloadedComponent.react","ChatConfig","JSResource","AutoFocusableLink.react","MessagingShowNUX.react","MessengerDialog.react","MessengerQuickCamActions","MessengerQuickCamOrigins","MessengerSpinner.react","React","XUIDialog.react","XUISpinner.react","joinClasses"],(function a(b,c,d,e,f,g,h,i){"use strict";__p&&__p();var j,k,l=c("React").PropTypes,m="seen_cam_button_nux";j=babelHelpers.inherits(n,c("React").PureComponent);k=j&&j.prototype;function n(){__p&&__p();var o,p;for(var q=arguments.length,r=Array(q),s=0;s<q;s++)r[s]=arguments[s];return p=(o=k.constructor).call.apply(o,[this].concat(r)),this.state={dialogOpen:!!this.props.clicked,nuxShown:!!c("ChatConfig").get(m),nuxOpen:false},this.$MessengerQuickCamButtonHTML53=function(){this.setState({nuxOpen:false,nuxShown:true,dialogOpen:true})}.bind(this),this.$MessengerQuickCamButtonHTML56=function(){if(this.state.dialogOpen)this.setState({dialogOpen:false})}.bind(this),this.$MessengerQuickCamButtonHTML57=function(t){if(!t)this.$MessengerQuickCamButtonHTML56();else c("MessengerQuickCamActions").requestUserMedia(this.props.viewer,this.props.threadID)}.bind(this),this.$MessengerQuickCamButtonHTML51=function(t){if(!this.state.nuxShown){this.setState({nuxOpen:true});return}if(this.state.dialogOpen)return;t.stopPropagation();this.setState({dialogOpen:!this.state.dialogOpen})}.bind(this),p}n.prototype.render=function(){var o=this.props.textChild;return c("React").createElement(c("AutoFocusableLink.react"),{autoFocus:this.props.autoFocus,className:c("joinClasses")(this.props.className,"_30yy"),onClick:this.$MessengerQuickCamButtonHTML51,ref:"photoButton",role:"button",title:i._("Take a picture using quick cam")},!!o&&o,this.$MessengerQuickCamButtonHTML52())};n.prototype.$MessengerQuickCamButtonHTML52=function(){if(!this.state.nuxShown)return c("React").createElement(c("MessagingShowNUX.react"),{contextRef:function(){return this.refs.photoButton}.bind(this),settingName:m,shown:this.state.nuxOpen,onHidden:this.$MessengerQuickCamButtonHTML53,ref:"camNUX"},i._("Send photos and videos from your computer's camera."));if(!this.state.dialogOpen)return null;return this.props.location===c("MessengerQuickCamOrigins").MESSENGER?this.$MessengerQuickCamButtonHTML54():this.$MessengerQuickCamButtonHTML55()};n.prototype.$MessengerQuickCamButtonHTML54=function(){var o=window.innerWidth/3;return c("React").createElement(c("MessengerDialog.react"),{overflow:"hidden",contextRef:function(){return this.refs.photoButton}.bind(this),shown:this.state.dialogOpen,onBlur:this.$MessengerQuickCamButtonHTML56,onToggle:this.$MessengerQuickCamButtonHTML57,width:400>o?400:o},c("React").createElement(c("BootloadedComponent.react"),{bootloadPlaceholder:c("React").createElement("div",{style:{padding:"30px",textAlign:"center"}},c("React").createElement(c("MessengerSpinner.react"),null)),bootloadLoader:c("JSResource")("MessengerQuickCamDialog.react").__setRef("MessengerQuickCamButtonHTML5.react"),location:this.props.location,onShown:function(p){this.$MessengerQuickCamButtonHTML57(true);if(this.props.onDialogShown)this.props.onDialogShown(p)}.bind(this),onHidden:this.$MessengerQuickCamButtonHTML56,onEscKeyDown:this.$MessengerQuickCamButtonHTML56,shown:this.state.dialogOpen,threadID:this.props.threadID,viewer:this.props.viewer}))};n.prototype.$MessengerQuickCamButtonHTML55=function(){var o=window.innerWidth/3;return c("React").createElement(c("XUIDialog.react"),{overflow:"hidden",contextRef:function(){return this.refs.photoButton}.bind(this),shown:this.state.dialogOpen,onBlur:this.$MessengerQuickCamButtonHTML56,hideOnEscape:true,onToggle:this.$MessengerQuickCamButtonHTML57,width:400>o?400:o},c("React").createElement(c("BootloadedComponent.react"),{bootloadPlaceholder:c("React").createElement("div",{style:{padding:"30px",textAlign:"center"}},c("React").createElement(c("XUISpinner.react"),null)),bootloadLoader:c("JSResource")("MessengerQuickCamDialog.react").__setRef("MessengerQuickCamButtonHTML5.react"),location:this.props.location,onShown:function(p){this.$MessengerQuickCamButtonHTML57(true);if(this.props.onDialogShown)this.props.onDialogShown(p)}.bind(this),onHidden:this.$MessengerQuickCamButtonHTML56,onEscKeyDown:this.$MessengerQuickCamButtonHTML56,shown:this.state.dialogOpen,threadID:this.props.threadID,viewer:this.props.viewer}))};n.propTypes={autoFocus:l.bool,className:l.string.isRequired,clicked:l.bool,location:l.oneOf(c("MessengerQuickCamOrigins").getValues()).isRequired,textChild:l.node,threadID:l.string.isRequired,viewer:l.string.isRequired};f.exports=n}),null);
__d("MessengerTypingIndicator.react",["cx","Image.react","immutable","MercuryParticipants","MercuryTypingAnimation.react","MessengerProfileImageWrapperReact.bs","MessengerBubble.react","ReactComponentWithPureRenderMixin","React","createReactClass_DEPRECATED","StoreAndPropBasedStateMixin"],(function a(b,c,d,e,f,g,h){var i=c("MessengerProfileImageWrapperReact.bs").jsComponent,j=c("React").PropTypes,k=32,l=c("createReactClass_DEPRECATED")({displayName:"MessengerTypingIndicator",mixins:[c("ReactComponentWithPureRenderMixin"),c("StoreAndPropBasedStateMixin")(c("MercuryParticipants"))],propTypes:{userID:j.string,showName:j.bool},statics:{calculateState:function m(n){return{author:c("MercuryParticipants").getOrFetch(n.userID)}}},render:function m(){if(!this.state.author)return null;var n=this.state.author;return c("React").createElement("div",{className:"_1t_p _1hbw"},c("React").createElement("div",{className:"_1t_q"},c("React").createElement(i,{className:"_1t_r",isMessengerUser:n.is_messenger_user,size:k,showBadge:true},c("React").createElement(c("Image.react"),{alt:"",src:n.image_src,height:k,width:k}))),c("React").createElement("div",{className:"_41ud"},c("React").createElement("div",{className:"_o46 _3erg _29_7"},c("React").createElement(c("MessengerBubble.react"),{attachments:c("immutable").List([c("React").createElement(c("MercuryTypingAnimation.react"),{key:"animation"})]),body:"",className:"_3058",ref:"bubble"}))))},getBubble:function m(){return this.refs.bubble}});f.exports=l}),null);
__d("MessengerConversation.react",["csx","cx","fbt","Bootloader","BootloadOnRender.react","ChatTypingIndicators.react","CSS","DOM","DOMDimensions","Event","EventProfiler","immutable","ImmutableObject","JSReliabilityFixesGatingConfig","JSResource","KeyEventController","LazyComponent.react","MercuryActionType","MercuryIDs","MercuryRoger.bs","MercuryShareAttachmentRenderLocations","MessageList.react","MessengerAttachmentRenderer","MessengerButtonReact.bs","MessengerCollapsedLogMessageGroup.react","MessengerContextBannerContainer.react","MessengerConfig","MessengerDateBreak.react","MessengerDeliveryReceipt.bs","MessengerFlexScrollableArea.react","MessengerBootloadedLogMessage.react","MessengerMessageGroup.react","MessengerNewMessagesNoticeReact.bs","MessengerPlatformSubscriptionMessageClassification","MessengerQuickCamButtonHTML5.react","MessengerQuickCamOrigins","MessengerSpinner.react","MessengerTypingIndicator.react","MessengerVideoAutoplayActions","MessengerVideoAutoplayStore","MessengerViewerContactMethodsWebGraphQLQuery","Parent","React","ReactDOM","Set","SubscriptionsHandler","UserActivity","WebGraphQL","WebMessengerConstants","convertMIGColorToFIGColor","getPageIDFromThreadID","gkx","idx","ifRequired","joinClasses","setImmediate","throttle"],(function a(b,c,d,e,f,g,h,i,j){"use strict";__p&&__p();var k,l,m=c("MercuryRoger.bs").get(),n=c("MessengerButtonReact.bs").jsComponent,o=c("MessengerNewMessagesNoticeReact.bs").jsComponent,p=c("immutable").OrderedMap,q=c("React").PropTypes,r=20,s=100,t=1e3;function u(event,y){return!!(c("KeyEventController").filterEventTypes(event,y)&&c("KeyEventController").filterEventModifiers(event,y)&&event.target instanceof Element&&c("Parent").bySelector(event.target,"._4_j4"))}k=babelHelpers.inherits(v,c("React").PureComponent);l=k&&k.prototype;function v(){__p&&__p();var y,z;for(var A=arguments.length,B=Array(A),C=0;C<A;C++)B[C]=arguments[C];return z=(y=l.constructor).call.apply(y,[this].concat(B)),this.state={readReceipts:w(this.props),scrollingToUnreadMessage:false,showUnreadNotice:false,unreadCount:this.props.thread?this.props.thread.unread_count:0,width:0,viewerEmail:null,viewerPhone:null},this.$MessengerConversation1=null,this.$MessengerConversation2=0,this.$MessengerConversation3=0,this.$MessengerConversation4=null,this.$MessengerConversation6=[],this.$MessengerConversation16=function(){__p&&__p();var D=this.$MessengerConversation18();if(!this.refs||!D||this.props.isLoading){this.$MessengerConversation6=[];return}var E=c("getPageIDFromThreadID")(this.props.threadID),F=this.refs.messageList;if(!F||!E){this.$MessengerConversation6=[];return}var G=10,H=D.getElement().getBoundingClientRect(),I=[];this.$MessengerConversation5.forEach(function(J){__p&&__p();var K=J.message_id,L=this.refs.messageList.getMessageElement(K);if(L){var M=L.getBoundingClientRect();if(M.top>H.top-G&&M.bottom<H.bottom+G){I.push(K);if(!this.$MessengerConversation6.includes(K))c("Bootloader").loadModules(["MessengerAdsWebLogger","MNAdsLoggerEventEnum"],function(N,O){N.log(J.ad_client_token,J.ad_id,O.MESSAGE_SEEN_THREAD,true,K,E)},"MessengerConversation.react")}}}.bind(this),this);this.$MessengerConversation6=I}.bind(this),this.$MessengerConversation9=function(){var D=this.$MessengerConversation18();D&&D.pageUp();return false}.bind(this),this.$MessengerConversation10=function(){var D=this.$MessengerConversation18();D&&D.pageDown();return false}.bind(this),this.$MessengerConversation11=function(D){if(D.target===document.body){this.scrollToTop();return false}return null}.bind(this),this.$MessengerConversation12=function(D){if(D.target===document.body){this.scrollToBottom();return false}return null}.bind(this),this.$MessengerConversation15=function(){__p&&__p();if(c("JSReliabilityFixesGatingConfig").should_get_fix&&!this.refs)return;if(!this.refs.scrollable)return;var D=this.$MessengerConversation18(),E=this.refs.quickReply;E&&c("CSS").conditionClass(E,"_1mzg",!this.isScrolledToBottom());this.$MessengerConversation13();this.$MessengerConversation14();if(D&&this.state.unreadCount&&this.$MessengerConversation23(D))this.setState({showUnreadNotice:false,unreadCount:0});this.$MessengerConversation32(D);this.$MessengerConversation33(D);this.$MessengerConversation8()}.bind(this),this.$MessengerConversation31=function(D){D.preventDefault();this.setState({showUnreadNotice:false});this.$MessengerConversation20()}.bind(this),this.$MessengerConversation14=function(){__p&&__p();if(!this.isScrolledToBottom()||this.props.messages.size===0)return;if(c("UserActivity").isOnTab()&&c("UserActivity").isActive())this.props.onRead(this.props.threadID);else if(!this.$MessengerConversation4)this.$MessengerConversation4=c("UserActivity").subscribe(function(){if(c("UserActivity").isOnTab()){this.$MessengerConversation17();this.props.onRead(this.props.threadID)}}.bind(this))}.bind(this),this.handleResize=function(){__p&&__p();if(c("JSReliabilityFixesGatingConfig").should_get_fix&&!this.refs)return;if(this.refs.scrollable){this.refs.scrollable.handleResize();var D=c("DOMDimensions").getElementDimensions(c("ReactDOM").findDOMNode(this.refs.scrollable)).width;if(D!==this.state.width)this.setState({width:D})}var E=this.refs.quickReply;E&&c("CSS").conditionClass(E,"_1mzg",!this.isScrolledToBottom());this.trackBottomIfRequired()}.bind(this),z}v.prototype.componentDidMount=function(){__p&&__p();var y=new(c("SubscriptionsHandler"))();y.addSubscriptions(c("Event").listen(window,"resize",c("throttle")(this.handleResize,50)),c("KeyEventController").registerKey("PAGE_UP",this.$MessengerConversation9,u),c("KeyEventController").registerKey("PAGE_DOWN",this.$MessengerConversation10,u),c("KeyEventController").registerKey("HOME",this.$MessengerConversation11,u),c("KeyEventController").registerKey("END",this.$MessengerConversation12,u),m.subscribe("change",function(z,A){A[this.props.threadID]&&this.setState({readReceipts:w(this.props)})}.bind(this)));this.$MessengerConversation1=y;this.$MessengerConversation13();this.handleResize();this.$MessengerConversation14();this.$MessengerConversation7=c("throttle")(this.$MessengerConversation15,s);this.$MessengerConversation8=c("throttle")(this.$MessengerConversation16,t);this.$MessengerConversation5=this.props.messages.filter(function(z){return z.is_sponsored});this.$MessengerConversation8()};v.prototype.componentWillReceiveProps=function(y){__p&&__p();var z=y.threadID!==this.props.threadID;if(z){this.$MessengerConversation17();this.setState({scrollingToUnreadMessage:false,showUnreadNotice:false,unreadCount:y.thread?y.thread.unread_count:0})}if(z||y.messages!==this.props.messages){this.$MessengerConversation5=y.messages.filter(function(A){return A.is_sponsored});this.setState({readReceipts:w(y)})}};v.prototype.componentWillUnmount=function(){this.$MessengerConversation17();this.$MessengerConversation1&&this.$MessengerConversation1.release()};v.prototype.componentWillUpdate=function(){var y=this.$MessengerConversation18();if(y){this.$MessengerConversation2=y.getScrollHeight();this.$MessengerConversation3=y.getScrollTop()}};v.prototype.componentDidUpdate=function(y){__p&&__p();if(c("JSReliabilityFixesGatingConfig").should_get_fix&&!this.refs)return;if(!this.refs.scrollable)return;var z=this.props.threadID!==y.threadID;if(z||x(y,this.props)){this.scrollToBottom();this.$MessengerConversation19()}else{var A=this.$MessengerConversation18();if(A){var B=A.getScrollHeight();if(B!==this.$MessengerConversation2){var C=A.getScrollHeight()-this.$MessengerConversation2+this.$MessengerConversation3;this.refs.scrollable.scrollToPosition(C)}else this.$MessengerConversation19()}}if(this.props.messages!==y.messages){this.$MessengerConversation14();if(this.state.scrollingToUnreadMessage)this.$MessengerConversation20();this.$MessengerConversation21()}this.$MessengerConversation22();setTimeout(function(){var F=this.$MessengerConversation18();this.trackBottomIfRequired();if(F&&this.state.unreadCount&&!this.state.scrollingToUnreadMessage&&!this.props.isLoading)if(this.$MessengerConversation23(F))this.setState({showUnreadNotice:false,unreadCount:0});else this.setState({showUnreadNotice:true});this.$MessengerConversation13();this.$MessengerConversation8()}.bind(this),0);var D=y.messages&&y.messages.size||0,E=this.props.messages&&this.props.messages.size||0;if(z||D===0&&(E>0||!this.props.isLoading))c("EventProfiler").informManualInteractionTimestamp(["MessengerThredRow"],true,"click")};v.prototype.render=function(){__p&&__p();if(this.props.isLoading&&this.props.messages.isEmpty())return this.$MessengerConversation24();var y=this.props.messages.last(),z=c("MercuryIDs").getParticipantIDFromUserID(this.props.viewer),A=this.$MessengerConversation25(y),B=this.$MessengerConversation26(y),C=y&&y.author!==z?A||B:null,D=null;if(Array.isArray(C)){var E=C.every(function(N){return N.content_type==="user_email"&&this.state.viewerEmail===null||N.content_type==="user_phone_number"&&this.state.viewerPhone===null}.bind(this));if(!E)D=c("React").createElement(c("BootloadOnRender.react"),{component:c("React").createElement(c("LazyComponent.react"),{options:C,threadID:y.thread_id,onVoiceClipCreate:this.props.onVoiceClipCreate,viewer:this.props.viewer,quickCamOriginLocation:c("MessengerQuickCamOrigins").MESSENGER,messageId:y.message_id,pageId:c("MercuryIDs").getUserIDFromParticipantID(y.author),isMessengerAdPreview:this.props.isMessengerAdPreview,isSponsored:y.is_sponsored,viewerEmail:this.state.viewerEmail,viewerPhone:this.state.viewerPhone}),loader:c("JSResource")("MessengerBotsQuickReplyButtonList.react").__setRef("MessengerConversation.react"),placeholder:c("React").createElement("div",null)})}var F=null;if(y&&y.message_source&&y.author!==z&&c("gkx")("AT7Fdvvof3gB21NGh8Fo7o5af68El03cTnUDtqQrI_yHQbziWN3MyQvvj6iMavHBZ0fTg3S3rpHTM9337zgjjUnM")){var G=y.message_source;if(G==="camera"){var H=this.props.thread?c("convertMIGColorToFIGColor")(this.props.thread.custom_color):null,I=c("React").createElement("div",{className:"_1gc5",style:H&&{color:H}},j._("Send a photo reply"));F=c("React").createElement("div",{className:"_1gc6"},c("React").createElement(c("MessengerQuickCamButtonHTML5.react"),{className:"_4rv5 _1gcb",location:c("MessengerQuickCamOrigins").MESSENGER,threadID:this.props.threadID,viewer:this.props.viewer,textChild:I}))}}var J=null,K=null;if(F||D){J=c("React").createElement("div",{className:"_51op"},c("React").createElement("div",{className:"_51oq",onResize:this.handleResize}));K=c("React").createElement("div",{ref:"quickReply"},c("React").createElement("div",{className:"_1mzb",onResize:this.handleResize},F,D))}var L=j._("Messages"),M=j._("Load more...");return c("React").createElement(c("MessengerFlexScrollableArea.react"),{className:this.props.className,flexChildren:this.$MessengerConversation27(),footerChildren:K,onMount:function(){return c("setImmediate")(this.$MessengerConversation14)}.bind(this),onScroll:this.props.useManualFetch?undefined:this.$MessengerConversation7,ref:"scrollable",shouldStickToBottom:true,tabIndex:0,useScrollProtection:!c("gkx")("AT7X8zD-9DNn0OeQ0S5-rozrySawyX8ZP8Z_NFsQBL8WAUNZhO-HKIM8cWBdfNilWyfk5H-Q_oFDDxJhsL4ycAkk")&&c("MessengerConfig").ChatScrollInterval},c("React").createElement("div",{"aria-label":L,className:c("joinClasses")("__i_",this.props.innerClassName),role:"region"},c("React").createElement("h3",{className:"accessible_elem"},L),this.$MessengerConversation28(),this.props.useManualFetch&&!this.props.upExhausted?c("React").createElement(n,{className:"_41jf",label:M,onClick:function(){return this.props.fetchMessages(c("WebMessengerConstants").MORE_SEARCH_CONTEXT_UP)}.bind(this),type:"primary",use:"default"}):null,this.$MessengerConversation29(),c("React").createElement(c("MessageList.react"),{DateBreak:c("MessengerDateBreak.react"),deliveryTimestamp:this.props.deliveryReceipts?c("MessengerDeliveryReceipt.bs").getDeliveryTimeOfThread(this.props.deliveryReceipts,this.props.threadID):0,isCanonical:this.props.isCanonical,LogMessage:c("MessengerBootloadedLogMessage.react"),CollapsedLogMessageGroup:c("MessengerCollapsedLogMessageGroup.react"),MessageGroup:c("MessengerMessageGroup.react"),messages:this.props.messages,onAttachmentLoad:this.$MessengerConversation30(this.props.threadID),readReceipts:this.state.readReceipts,ref:"messageList",location:c("MercuryShareAttachmentRenderLocations").MESSENGER,viewer:this.props.viewer,thread:this.props.thread}),this.props.useManualFetch&&!this.props.downExhausted?c("React").createElement(n,{className:"_41jf",label:M,onClick:function(){return this.props.fetchMessages(c("WebMessengerConstants").MORE_SEARCH_CONTEXT_DOWN)}.bind(this),type:"primary",use:"default"}):null,c("React").createElement(c("ChatTypingIndicators.react"),{indicatorClass:c("MessengerTypingIndicator.react"),indicatorsDidShow:function(){this.trackBottomIfRequired()}.bind(this),rootClassName:"clearfix _17pz",threadID:this.props.threadID,viewer:this.props.viewer}),J))};v.prototype.$MessengerConversation25=function(y){var z=null,A=y&&y.platform_xmd&&JSON.parse(y.platform_xmd),B=A&&A.message_classification===c("MessengerPlatformSubscriptionMessageClassification").AD_MESSAGE;if(B&&Array.isArray(A&&A.quick_replies))z=A&&A.quick_replies;return z};v.prototype.$MessengerConversation26=function(y){var z=y&&y.platform_xmd&&JSON.parse(y.platform_xmd);return Array.isArray(z&&z.quick_replies)?z&&z.quick_replies:null};v.prototype.$MessengerConversation13=function(){if(this.props.useManualFetch)return;var y=this.$MessengerConversation18();if(y&&y.getScrollTop()<r){this.props.fetchMessages(c("WebMessengerConstants").MORE_SEARCH_CONTEXT_UP);this.$MessengerConversation21()}};v.prototype.$MessengerConversation22=function(){__p&&__p();var y=this.state.suggestions||{},z=y.quickReplies;if(!z||z.length===0)return;var A=c("gkx")("AT6b68OqbLsWJQlJTGZqwlCTZJ0z0taRGUXqOzuQVRDoLPO2Dnjh-maTANaNF_FUgpVzi4qt9-S_T7GMqZpzzd99"),B=c("gkx")("AT70ApPO8u4r9N24CdWkIiFYZMdcnAaeV9BaXzLxdBmkmVf60X7teW8bfJTrYYnPlB7TPT4_aBOsOQDbCdO-mpJj4JY2rmmLkTH2jaDU2xAiSg");if(z.some(function(C){return C.content_type==="user_email"&&A||C.content_type==="user_phone_number"&&B}))c("WebGraphQL").exec(new(c("MessengerViewerContactMethodsWebGraphQLQuery"))({})).done(function(C){var D,E,F,G,H=B?(D=C)!=null?(D=D.viewer)!=null?(D=D.user)!=null?D.all_phones:D:D:D:null,I=A?(E=C)!=null?(E=E.viewer)!=null?E.all_emails:E:E:null,J=!H?null:H.find(function(L){return L.is_preferred});if(!J&&H)J=H[0];var K=!I?null:I.find(function(L){return L.is_primary});this.setState({viewerEmail:(F=K)!=null?(F=F.email_address)!=null?F.deduplicated_email_address:F:F,viewerPhone:(G=J)!=null?(G=G.phone_number)!=null?G.universal_number:G:G})}.bind(this))};v.prototype.isScrolledToBottom=function(){return!!(this.refs.scrollable&&this.refs.scrollable.isScrolledToBottom())};v.prototype.isScrolledToBottomWithHeight=function(y){return!!(this.refs.scrollable&&this.refs.scrollable.isScrolledToBottomWithHeight(y))};v.prototype.$MessengerConversation27=function(){return c("React").createElement(o,{isOpen:this.state.showUnreadNotice,label:j._({"*":"{number} unread messages","_1":"1 unread message"},[j.plural(this.state.unreadCount,"number")]),onClick:this.$MessengerConversation31})};v.prototype.$MessengerConversation28=function(){if(!this.props.isLoaded)return null;return c("React").createElement(c("MessengerContextBannerContainer.react"),{location:c("MercuryShareAttachmentRenderLocations").MESSENGER,threadID:this.props.threadID,viewer:this.props.viewer})};v.prototype.$MessengerConversation29=function(){if(this.props.isLoaded)return null;return c("React").createElement("div",{className:"_2k8v"},this.props.isLoading?c("React").createElement(c("MessengerSpinner.react"),null):null)};v.prototype.$MessengerConversation24=function(){return c("React").createElement("div",{className:"_4xu0"},c("React").createElement(c("MessengerSpinner.react"),{className:"_4xu1",size:c("MessengerSpinner.react").large_size}))};v.prototype.trackBottomIfRequired=function(){if(c("JSReliabilityFixesGatingConfig").should_get_fix&&!this.refs)return;this.refs.scrollable&&this.refs.scrollable.trackBottomIfRequired()};v.prototype.scrollToBottom=function(){if(c("JSReliabilityFixesGatingConfig").should_get_fix&&!this.refs)return;this.refs.scrollable&&this.refs.scrollable.scrollToBottom()};v.prototype.scrollToTop=function(y){if(c("JSReliabilityFixesGatingConfig").should_get_fix&&!this.refs)return;this.refs.scrollable&&this.refs.scrollable.scrollToTop(y)};v.prototype.$MessengerConversation30=function(y){return function(){if(this.props.threadID!==y)return;this.trackBottomIfRequired()}.bind(this)};v.prototype.$MessengerConversation19=function(){c("DOM").scry(c("ReactDOM").findDOMNode(this),"img").forEach(function(y){if(y.complete)return;var z=this.props.threadID,A=c("Event").listen(y,"load",function(){if(this.props.threadID===z)this.trackBottomIfRequired();A.remove()}.bind(this))}.bind(this))};v.prototype.$MessengerConversation34=function(){var y=this.props.messages,z=this.state.unreadCount;if(!z||z>y.size)return null;return y.get(y.size-z)};v.prototype.$MessengerConversation23=function(y){__p&&__p();var z=this.props.messages,A=this.$MessengerConversation34();if(!A)return false;var B=y.getElement().getBoundingClientRect();return z.filter(function(C){return C.timestamp<=A.timestamp}).some(function(C){var D=this.refs.messageList.getMessageElement(C.message_id);if(!D)return false;var E=D.getBoundingClientRect();return E.bottom>B.top&&E.top<B.bottom}.bind(this))};v.prototype.$MessengerConversation35=function(y){return!!this.props.messages.find(function(z){return z.message_id===y})};v.prototype.$MessengerConversation20=function(){__p&&__p();if(!this.state.unreadCount)return;this.setState({scrollingToUnreadMessage:true});var y=this.$MessengerConversation34();if(!y){this.scrollToTop(false);return}this.$MessengerConversation36(y.message_id,function(){this.setState({scrollingToUnreadMessage:false,unreadCount:0})}.bind(this))};v.prototype.$MessengerConversation36=function(y,z){var A=this.refs.messageList.getMessageElement(y,true),B=this.$MessengerConversation18();if(!A||!B)return;var C=A.getBoundingClientRect().top,D=c("ReactDOM").findDOMNode(this.refs.messageList).getBoundingClientRect().top,E=B.getElement().getBoundingClientRect().top,F=C+Math.abs(D)+E;B.setScrollTop(F,true,{callback:z})};v.prototype.$MessengerConversation18=function(){if(c("JSReliabilityFixesGatingConfig").should_get_fix&&!this.refs)return;return this.refs.scrollable&&this.refs.scrollable.getArea()};v.prototype.$MessengerConversation17=function(){this.$MessengerConversation4&&this.$MessengerConversation4.unsubscribe();this.$MessengerConversation4=null};v.prototype.$MessengerConversation37=function(){return this.props.messages.filter(function(y){return c("MessengerAttachmentRenderer").isSingleVideoAttachment(y)||c("MessengerAttachmentRenderer").isSharedVideoAttachmentMessage(y)}).reverse().map(function(y){return y.message_id})};v.prototype.$MessengerConversation32=function(y){__p&&__p();var z=this.refs.messageList;if(!z||!y)return;var A=[],B=y.getElement().getBoundingClientRect(),C=c("MessengerVideoAutoplayStore").getMessageIDs(this.props.threadID),D=C||this.$MessengerConversation37()||c("immutable").List();D.map(function(E){var F=c("MessengerAttachmentRenderer").getVideoElem(E,z);if(F)A.push([E,F.getBoundingClientRect()])});if(A.length)c("MessengerVideoAutoplayActions").onScroll(this.props.threadID,C?null:D,c("immutable").Map(A),B)};v.prototype.$MessengerConversation38=function(){return this.props.messages.filter(function(y){return c("MessengerAttachmentRenderer").isSingleSphericalPhotoAttachment(y)}).map(function(y){return y.message_id})};v.prototype.$MessengerConversation33=function(y){__p&&__p();c("ifRequired")("MessengerSphericalRendererActions",function(z){__p&&__p();c("ifRequired")("MessengerSphericalRendererStore",function(A){__p&&__p();var B=this.refs.messageList;if(!B||!y)return;var C=[],D=y.getElement().getBoundingClientRect(),E=A.getMessageIDs(this.props.threadID),F=E||this.$MessengerConversation38()||c("immutable").List();F.map(function(G){var H=c("MessengerAttachmentRenderer").getSphericalPhotoElem(G,B);if(H)C.push([G,H.getBoundingClientRect()])});if(C.length)z.onScroll(this.props.threadID,F,c("immutable").Map(C),D)}.bind(this),function(){})}.bind(this),function(){})};v.prototype.$MessengerConversation21=function(){c("MessengerVideoAutoplayActions").updateStore(this.props.threadID,this.$MessengerConversation37());var y=this.$MessengerConversation38();if(y&&y.count()!==0)c("ifRequired")("MessengerSphericalRendererActions",function(z){z.updateStore(this.props.threadID,y)}.bind(this),function(){c("Bootloader").loadModules(["MessengerSphericalRendererActions","MessengerSphericalRendererStore"],function(z,A){z.updateStore(this.props.threadID,y)}.bind(this),"MessengerConversation.react")}.bind(this))};v.propTypes={contact:q.instanceOf(c("ImmutableObject")),deliveryReceipts:q.object,downExhausted:q.bool,fetchMessages:q.func.isRequired,innerClassName:q.string,isCanonical:q.bool,isLoaded:q.bool,isLoading:q.bool,isMessengerAdPreview:q.bool,messages:q.instanceOf(c("immutable").List).isRequired,onVoiceClipCreate:q.func,participants:q.instanceOf(c("immutable").Map),thread:q.object,threadID:q.string.isRequired,upExhausted:q.bool,useManualFetch:q.bool,viewer:q.string.isRequired};function w(y){__p&&__p();var z=c("MercuryIDs").getParticipantIDFromUserID(y.viewer),A=m.getSeenTimestamps(y.threadID),B=new(c("Set"))(y.thread?y.thread.participants:A.keys());B["delete"](z);var C=null;c("immutable").Seq(y.messages).reverse().forEach(function(D){if(D.action_type!==c("MercuryActionType").LOG_MESSAGE){C=D;return false}return true});return A.withMutations(function(A){__p&&__p();c("immutable").Seq(y.messages).reverse().forEach(function(D){__p&&__p();if(B.size===0)return false;if(!B.has(D.author))return;A.update(D.author,function(E){var F=E;if(!E||E.watermark<=D.timestamp)F={watermark:D.timestamp,action:D.timestamp};if(C&&C.timestamp<F.watermark)F={watermark:C.timestamp,action:C.timestamp};return F});B["delete"](D.author)})})}function x(y,z){var A=c("MercuryIDs").getParticipantIDFromUserID(z.viewer);return z.threadID===y.threadID&&z.messages!==y.messages&&!z.messages.isEmpty()&&z.messages.last()!==y.messages.last()&&z.messages.last().author===A}f.exports=v}),null);
__d("MessengerMessageRequestsInfo.react",["cx","fbt","React"],(function a(b,c,d,e,f,g,h,i){"use strict";var j=function j(){return c("React").createElement("div",{className:"_5u15"},i._("Open a request to get more info about who's messaging you.")," ",i._("They won't know you've seen it until you accept."))};f.exports=j}),null);
__d("MessengerResponsiveBlock.react",["React","createCancelableFunction","requestAnimationFrame","shallowEqual","throttle"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();var h,i,j=c("React").PropTypes,k={bottom:0,left:0,overflow:"hidden",position:"absolute",right:0,top:0,visibility:"hidden",zIndex:-1},l={left:0,position:"absolute",top:0,transition:"0s"},m={height:"200%",left:0,position:"absolute",top:0,transition:"0s",width:"200%"};h=babelHelpers.inherits(n,c("React").Component);i=h&&h.prototype;function n(){__p&&__p();var o,p;for(var q=arguments.length,r=Array(q),s=0;s<q;s++)r[s]=arguments[s];return p=(o=i.constructor).call.apply(o,[this].concat(r)),this.dirty=false,this.lastWidth=null,this.lastHeight=null,this.lastBreakpointsToggles=null,this.setupWeirdScrollTracking=function(){this.refs.expandChild.style.width="10000px";this.refs.expandChild.style.height="10000px";this.refs.expand.scrollLeft=1e5;this.refs.expand.scrollTop=1e5;this.refs.shrink.scrollLeft=1e5;this.refs.shrink.scrollTop=1e5}.bind(this),this.$MessengerResponsiveBlock2=function(){__p&&__p();var t=this.refs.outer.offsetWidth,u=this.refs.outer.offsetHeight;if(t!=this.lastWidth||u!=this.lastHeight)if(!this.dirty){if(Math.abs(t-(this.lastWidth||0))<10&&Math.abs(u-(this.lastHeight||0))<16)return;this.dirty=true;this.lastWidth=t;this.lastHeight=u;var v=this.props.breakpointsToggles(t,u);if(c("shallowEqual")(this.lastBreakpointsToggles,v))this.dirty=false;else this.forceUpdate(function(){c("requestAnimationFrame")(function(){this.dirty=false}.bind(this))}.bind(this));this.lastBreakpointsToggles=v}this.setupWeirdScrollTracking()}.bind(this),p}n.prototype.componentDidMount=function(){this.$MessengerResponsiveBlock1=c("createCancelableFunction")(this.$MessengerResponsiveBlock2);this.onScroll=c("throttle")(this.$MessengerResponsiveBlock1,50);this.setupWeirdScrollTracking();this.onScroll()};n.prototype.componentWillUnmount=function(){this.$MessengerResponsiveBlock1.cancel()};n.prototype.render=function(){return c("React").createElement("div",{ref:"outer"},this.props.children(this.props.breakpointsToggles(this.lastWidth,this.lastHeight)),c("React").createElement("div",{style:k,onScroll:this.onScroll,ref:"expand"},c("React").createElement("div",{style:l,ref:"expandChild"})),c("React").createElement("div",{style:k,onScroll:this.onScroll,ref:"shrink"},c("React").createElement("div",{style:m})))};n.propTypes={children:j.func.isRequired,breakpointsToggles:j.func.isRequired};f.exports=n}),null);
__d("MessengerThreadListGridWrapper.react",["cx","React"],(function a(b,c,d,e,f,g,h){"use strict";__p&&__p();var i,j,k=c("React").PropTypes;i=babelHelpers.inherits(l,c("React").PureComponent);j=i&&i.prototype;l.prototype.render=function(){var m=this.props.label;return c("React").createElement("div",null,c("React").createElement("h2",{className:"accessible_elem"},m),c("React").createElement("ul",{"aria-label":m,role:"grid"},this.props.children))};function l(){i.apply(this,arguments)}l.propTypes={label:k.string.isRequired};f.exports=l}),null);
__d("MessengerContextualDialog.react",["cx","AccessibleLayer","ContextualLayerAutoFlipHorizontal","ContextualLayerUpdateOnScroll","LayerHideOnEscape","ReactAbstractContextualDialog","ReactLayer"],(function a(b,c,d,e,f,g,h){"use strict";var i=12,j=c("ReactLayer").createClass(c("ReactAbstractContextualDialog").createSpec({addedBehaviors:[c("ContextualLayerAutoFlipHorizontal"),c("ContextualLayerUpdateOnScroll"),c("LayerHideOnEscape"),c("AccessibleLayer")],displayName:"MessengerContextualDialog",shouldSetARIAProperties:false,theme:{wrapperClassName:"_1r_9",arrowDimensions:{offset:i,length:16}}}));f.exports=j}),null);
__d("MessengerRadioButton.react",["cx","React","XUIRadioInput.react"],(function a(b,c,d,e,f,g,h){"use strict";var i,j;i=babelHelpers.inherits(k,c("React").PureComponent);j=i&&i.prototype;k.prototype.render=function(){return c("React").createElement(c("XUIRadioInput.react"),babelHelpers["extends"]({},this.props,{className:"__rm"}))};function k(){i.apply(this,arguments)}f.exports=k}),null);
__d("MessengerRadioList.react",["invariant","InputLabel_DEPRECATED.react","InputLabelLabel_DEPRECATED.react","MessengerRadioButton.react","React"],(function a(b,c,d,e,f,g,h){"use strict";__p&&__p();var i,j,k,l,m=c("React").PropTypes;i=babelHelpers.inherits(n,c("React").Component);j=i&&i.prototype;function n(){var p,q;for(var r=arguments.length,s=Array(r),t=0;t<r;t++)s[t]=arguments[t];return q=(p=j.constructor).call.apply(p,[this].concat(s)),this.$MessengerRadioListItem1=function(event){event.target instanceof HTMLInputElement||h(0);this.props.onSelect&&this.props.onSelect(this.props.value)}.bind(this),q}n.prototype.render=function(){return c("React").createElement("li",{className:this.props.className},c("React").createElement(c("InputLabel_DEPRECATED.react"),{display:"inline"},c("React").createElement(c("MessengerRadioButton.react"),{checked:this.props.selectedValue===this.props.value,disabled:!!this.props.disabled,name:this.props.name,onChange:this.$MessengerRadioListItem1,value:this.props.value}),c("React").createElement(c("InputLabelLabel_DEPRECATED.react"),null,this.props.children)))};n.propTypes={disabled:m.bool,name:m.string,onSelect:m.func,selectedValue:m.any,value:m.any};k=babelHelpers.inherits(o,c("React").Component);l=k&&k.prototype;o.prototype.render=function(){var p=c("React").Children.map(this.props.children,function(q){return c("React").cloneElement(q,{name:this.props.name,onSelect:this.props.onValueChange,selectedValue:this.props.selectedValue})},this);return c("React").createElement("ul",babelHelpers["extends"]({},this.props,{name:null}),p)};function o(){k.apply(this,arguments)}o.propTypes={name:m.string,onValueChange:m.func,selectedValue:m.any};o.Item=n;f.exports=o}),null);
__d("MNCommerceAttachmentConstants",[],(function a(b,c,d,e,f,g){var h={XLARGE_IMAGE_DIMENSION:72,LARGE_IMAGE_DIMENSION:60,SMALL_IMAGE_DIMENSION:32,SINGLE_IMAGE_HEIGHT:108,BUBBLE_PADDING:6,IMAGE_HEIGHT:{CHAT:108,WEB_INBOX:130},UNLINK_ERROR_DIALOG:{WIDTH:300},DIALOG:{WIDTH:445,PADDING:12},MDOTCOMDIALOG:{WIDTH:495},ORDER_DETAIL:{SUB_TOTAL:"subTotal",SHIPPING:"shippingCost",TAX:"tax",TOTAL:"totalCost"}};f.exports=h}),null);
__d("MNCommerceDialog.react",["cx","MessengerEnvironment","LayerFadeOnHide","LayerHideOnEscape","MNCommerceAttachmentConstants","MessengerDialog.react","React","XUIDialog.react","emptyFunction","joinClasses"],(function a(b,c,d,e,f,g,h){"use strict";__p&&__p();var i=c("React").PropTypes,j=c("React").createClass({displayName:"MNCommerceDialog",propTypes:{onToggle:i.func,shown:i.bool,width:i.number.isRequired},getDefaultProps:function k(){return{onToggle:c("emptyFunction"),repositionOnUpdate:true,shown:true,width:c("MessengerEnvironment").messengerui?c("MNCommerceAttachmentConstants").MDOTCOMDIALOG.WIDTH:c("MNCommerceAttachmentConstants").DIALOG.WIDTH}},componentDidUpdate:function k(){if(this.props.repositionOnUpdate)setTimeout(function(){if(this.isMounted()&&this.refs.dialog&&this.refs.dialog.layer)this.refs.dialog.layer.updatePosition()}.bind(this),0)},render:function k(){var l=c("MessengerEnvironment").messengerui,m=l?c("MessengerDialog.react"):c("XUIDialog.react");return c("React").createElement(m,babelHelpers["extends"]({behaviors:{LayerFadeOnHide:c("LayerFadeOnHide"),LayerHideOnEscape:c("LayerHideOnEscape")}},this.props,{className:c("joinClasses")(this.props.className,l?"_3rx0":""),ref:"dialog"}),this.props.children)}});f.exports=j}),null);
__d("MNCommerceDialogBody.react",["MessengerEnvironment","MessengerDialogBody.react","React","XUIDialogBody.react"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();var h,i;h=babelHelpers.inherits(j,c("React").Component);i=h&&h.prototype;j.prototype.render=function(){var k=c("MessengerEnvironment").messengerui,l=k?c("MessengerDialogBody.react"):c("XUIDialogBody.react");return c("React").createElement(l,this.props,this.props.children)};function j(){h.apply(this,arguments)}f.exports=j}),null);
__d("MNCommerceDialogTitle.react",["MessengerEnvironment","MessengerDialogHeader.react","React","XUIDialogTitle.react"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();var h,i;h=babelHelpers.inherits(j,c("React").Component);i=h&&h.prototype;j.prototype.render=function(){var k=c("MessengerEnvironment").messengerui,l=k?c("MessengerDialogHeader.react"):c("XUIDialogTitle.react");return c("React").createElement(l,this.props,this.props.children)};function j(){h.apply(this,arguments)}f.exports=j}),null);
__d("MNCommerceDetailsDialog.react",["cx","fbt","React","MNCommerceDialog.react","MNCommerceDialogBody.react","MNCommerceDialogTitle.react","XUISpinner.react","XUIButton.react"],(function a(b,c,d,e,f,g,h,i){"use strict";__p&&__p();var j,k,l=c("React").PropTypes;j=babelHelpers.inherits(m,c("React").Component);k=j&&j.prototype;function m(){var n,o;for(var p=arguments.length,q=Array(p),r=0;r<p;r++)q[r]=arguments[r];return o=(n=k.constructor).call.apply(n,[this].concat(q)),this.$MNCommerceDetailsDialog2=function(){return c("React").createElement("div",{className:"_4y9b"},c("React").createElement("p",{className:"_4y9c"},i._("Sorry, Something Went Wrong")),c("React").createElement("p",{className:"_4y9d"},this.props.errorMessage),c("React").createElement(c("XUIButton.react"),{onClick:this.props.onTryAgain,label:i._("Try Again")}))}.bind(this),this.$MNCommerceDetailsDialog1=function(){return c("React").createElement("div",{className:"_4y9e"},c("React").createElement(c("XUISpinner.react"),{background:"light",size:"large",paused:false}))},o}m.prototype.render=function(){var n=null;if(this.props.loading)n=this.$MNCommerceDetailsDialog1();else if(this.props.error)n=this.$MNCommerceDetailsDialog2();else n=this.props.children;return c("React").createElement(c("MNCommerceDialog.react"),{className:this.props.className,modal:true,onToggle:this.props.onToggle,shown:this.props.shown},this.$MNCommerceDetailsDialog3(),c("React").createElement(c("MNCommerceDialogBody.react"),{useCustomPadding:true},n))};m.prototype.$MNCommerceDetailsDialog3=function(){return this.props.title?c("React").createElement(c("MNCommerceDialogTitle.react"),null,this.props.title):null};m.propTypes={error:l.object,errorMessage:l.node,loading:l.bool.isRequired,onToggle:l.func,onTryAgain:l.func,title:l.node,shown:l.bool.isRequired};m.defaultProps={shown:false};f.exports=m}),null);
__d("MNCommerceButton.react",["MessengerEnvironment","MessengerDialogButton.react","React","XUIButton.react"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();var h,i;h=babelHelpers.inherits(j,c("React").Component);i=h&&h.prototype;j.prototype.render=function(){var k=c("MessengerEnvironment").messengerui,l=k?c("MessengerDialogButton.react"):c("XUIButton.react"),m=this.props.type;if(!m)m=this.props.type==="confirm"?"primary":"secondary";var n=k?"default":this.props.use,o=babelHelpers["extends"]({},this.props,{type:m,use:n});return c("React").createElement(l,o,this.props.children)};function j(){h.apply(this,arguments)}f.exports=j}),null);
__d("MNCommerceDialogFooter.react",["cx","MessengerEnvironment","MessengerDialogFooter.react","React","XUIDialogFooter.react","joinClasses"],(function a(b,c,d,e,f,g,h){"use strict";__p&&__p();var i,j;i=babelHelpers.inherits(k,c("React").Component);j=i&&i.prototype;k.prototype.render=function(){var l=c("MessengerEnvironment").messengerui,m=l?c("MessengerDialogFooter.react"):c("XUIDialogFooter.react"),n=void 0,o=this.props.children;if(l){n=c("React").Children.count(this.props.children);o=c("React").Children.map(this.props.children,function(p,q){if(!p)return null;return c("React").cloneElement(p,{className:c("joinClasses")(p.props.className,"_4ec0"),type:q===0&&n===2?"secondary":"primary"})})}return c("React").createElement(m,this.props,o)};function k(){i.apply(this,arguments)}f.exports=k}),null);
__d("MNCommercePromotionManageBlockDialog.react",["fbt","MessengerEnvironment","Link.react","MessengerRadioList.react","MNCommerceButton.react","MNCommerceDetailsDialog.react","MNCommerceDialogBody.react","MNCommerceDialogFooter.react","MNCommerceDialogTitle.react","MNCommerceBlockTypeJSInstance","React","URI","WorkModeConfig","XUIRadioList.react"],(function a(b,c,d,e,f,g,h){"use strict";__p&&__p();var i,j,k=c("MessengerRadioList.react").Item,l=c("XUIRadioList.react").Item,m=c("React").PropTypes;i=babelHelpers.inherits(n,c("React").Component);j=i&&i.prototype;function n(p,q){j.constructor.call(this,p,q);o.call(this);this.state=this.$MNCommercePromotionManageBlockDialog1()}n.prototype.componentWillReceiveProps=function(p){this.setState(this.$MNCommercePromotionManageBlockDialog1(p))};n.prototype.$MNCommercePromotionManageBlockDialog1=function(p){var q=p||this.props,r=c("MNCommerceBlockTypeJSInstance").ALL;if(q.isAllBlocked||q.isPromotionBlocked)r=c("MNCommerceBlockTypeJSInstance").NONE;return{type:r}};n.prototype.render=function(){var p=this.props.merchantName||"",q=h._("Manage messages from {label for merchant name}",[h.param("label for merchant name",p)]),r=h._("Cancel"),s=h._("Confirm"),t=h._("Manage Options couldn't be shown."),u=c("WorkModeConfig").is_work_user?new(c("URI"))("https://facebook.com/help/work/1731361900459513").setSubdomain(c("WorkModeConfig").company_subdomain||""):new(c("URI"))("https://www.facebook.com/help/389645087895231"),v=c("React").createElement(c("Link.react"),{href:u,target:"_blank"},h._("Learn More"));return c("React").createElement(c("MNCommerceDetailsDialog.react"),babelHelpers["extends"]({errorMessage:t,onToggle:this.props.onToggle,shown:this.props.shown},this.props),c("React").createElement(c("MNCommerceDialogTitle.react"),{showCloseButton:true},q),c("React").createElement(c("MNCommerceDialogBody.react"),null,this.$MNCommercePromotionManageBlockDialog2()),c("React").createElement(c("MNCommerceDialogFooter.react"),{leftContent:v},c("React").createElement(c("MNCommerceButton.react"),{label:r,onClick:this.props.onCancelButtonClick,use:"default"}),c("React").createElement(c("MNCommerceButton.react"),{label:s,onClick:this.$MNCommercePromotionManageBlockDialog3,use:"confirm"})))};n.prototype.$MNCommercePromotionManageBlockDialog2=function(){var p=c("MessengerEnvironment").messengerui,q=p?c("MessengerRadioList.react"):c("XUIRadioList.react"),r=p?k:l;return c("React").createElement(q,{selectedValue:this.state.type,onValueChange:this.onTypeChange},c("React").createElement(r,{value:c("MNCommerceBlockTypeJSInstance").ALL},h._("Receive all messages")),c("React").createElement(r,{value:c("MNCommerceBlockTypeJSInstance").NONE},h._("Turn off all messages")))};n.propTypes={isAllBlocked:m.bool,isPromotionBlocked:m.bool,error:m.object,loading:m.bool.isRequired,merchantName:m.string,onCancelButtonClick:m.func,onConfirmButtonClick:m.func.isRequired,pageID:m.string};var o=function o(){this.onTypeChange=function(p){this.setState({type:p})}.bind(this);this.$MNCommercePromotionManageBlockDialog3=function(p){var q=this.props;q.onToggle(false);if(!q.onConfirmButtonClick)return;var r=q.pageID;q.onConfirmButtonClick(r,this.state.type)}.bind(this)};f.exports=n}),null);
__d("MNCommerceCacheTimeoutLimits",[],(function a(b,c,d,e,f,g){"use strict";var h=Object.freeze({SUCCESS_TIMEOUT:10,ERROR_TIMEOUT:1});f.exports=h}),null);
__d("XMNCommercePromotionStateController",["XController"],(function a(b,c,d,e,f,g){f.exports=c("XController").create("/messages/commerce/promotion/state/",{page_id:{type:"String",required:true}})}),null);
__d("MNCommercePromotionStateDataManager",["AsyncRequest","MNCommercePromotionStateActions","XMNCommercePromotionStateController"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();h.prototype.fetchPromotionState=function(i){var j=c("XMNCommercePromotionStateController").getURIBuilder().setString("page_id",i).getURI();new(c("AsyncRequest"))().setURI(j).setHandler(this.$MNCommercePromotionStateDataManager1).setErrorHandler(this.$MNCommercePromotionStateDataManager2).send()};h.prototype.$MNCommercePromotionStateDataManager1=function(i){var j=i.getRequest().uri.getQueryData(),k=j.page_id;i.payload.pageID=k;c("MNCommercePromotionStateActions").stateLoaded(i.payload)};h.prototype.$MNCommercePromotionStateDataManager2=function(i){var j=i.getRequest().uri.getQueryData(),k=j.page_id;c("MNCommercePromotionStateActions").stateLoadError(k)};function h(){}f.exports=new h()}),null);
__d("MNCommercePromotionStateStore",["Cache","FluxStore","LoadObject","MessengerDispatcher","MNCommerceActionTypes","MNCommerceCacheTimeoutLimits","MNCommercePromotionStateDataManager"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();var h,i;h=babelHelpers.inherits(j,c("FluxStore"));i=h&&h.prototype;function j(){i.constructor.call(this,c("MessengerDispatcher"));this.$MNCommercePromotionStateStore1=new(c("Cache"))()}j.prototype.__onDispatch=function(k){__p&&__p();var l=k.type,m=k.pageID||k.state&&k.state.pageID;switch(l){case c("MNCommerceActionTypes").PROMOTION_STATE.LOADED:var n=k.state;this.$MNCommercePromotionStateStore1.set(m,c("LoadObject").empty().setValue(n),null,c("MNCommerceCacheTimeoutLimits").SUCCESS_TIMEOUT);this.__emitChange();break;case c("MNCommerceActionTypes").PROMOTION_STATE.LOAD_ERROR:this.$MNCommercePromotionStateStore1.set(m,c("LoadObject").empty().setError(new Error("Unable to load permissions for: "+m)),null,c("MNCommerceCacheTimeoutLimits").ERROR_TIMEOUT);this.__emitChange();break;case c("MNCommerceActionTypes").PROMOTION_STATE.RELOAD:if(m){this.$MNCommercePromotionStateStore1.set(m,c("LoadObject").loading());c("MNCommercePromotionStateDataManager").fetchPromotionState(m)}this.__emitChange();break}};j.prototype.getPromotionState=function(k){if(k&&!this.$MNCommercePromotionStateStore1.has(k)){this.$MNCommercePromotionStateStore1.set(k,c("LoadObject").loading().setValue({pageID:k}));c("MNCommercePromotionStateDataManager").fetchPromotionState(k)}return this.$MNCommercePromotionStateStore1.get(k)||c("LoadObject").empty()};f.exports=new j()}),null);
__d("MNCommercePromotionManageBlockDialogContainer.react",["MNCommerceDialogStateActions","MNCommerceDialogStateStore","MNCommercePromotionBlockDataManager","MNCommercePromotionManageBlockDialog.react","MNCommercePromotionStateActions","MNCommercePromotionStateStore","PureStoreBasedStateMixin","React"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();var h=c("React").createClass({displayName:"MNCommercePromotionManageBlockDialogContainer",mixins:[c("PureStoreBasedStateMixin")(c("MNCommercePromotionStateStore"))],statics:{calculateState:function i(){var j=c("MNCommerceDialogStateStore").getState(),k=null;if(j)k=j.pageID;var l=c("MNCommercePromotionStateStore").getPromotionState(k);return{shown:!!j,loading:l.isLoading(),pageID:k,promotionState:l.getValue(),error:l.getError()}}},render:function i(){var j=this.state.promotionState;return c("React").createElement(c("MNCommercePromotionManageBlockDialog.react"),{error:this.state.error,isAllBlocked:j&&j.is_all_blocked,isPromotionBlocked:j&&j.is_promotion_blocked,loading:this.state.loading,merchantName:j&&j.name,onCancelButtonClick:this._hideDialog,onToggle:this._onToggle,pageID:this.state.pageID,onTryAgain:this._onTryAgainClick,onConfirmButtonClick:this._handleConfirmButtonClick,shown:this.state.shown})},_onToggle:function i(j){if(!j)this._hideDialog()},_onTryAgainClick:function i(){c("MNCommercePromotionStateActions").stateReload(this.state.pageID)},_hideDialog:function i(){c("MNCommerceDialogStateActions").hideDialog()},_handleConfirmButtonClick:function i(j,k){return c("MNCommercePromotionBlockDataManager").block(j,k)}});f.exports=h}),null);
__d("MessengerPlatformAbuseReportType",[],(function a(b,c,d,e,f,g){f.exports=Object.freeze({SPAM:"spam",INAPPROPRIATE:"inappropriate",OTHER_ABUSE:"other_abuse"})}),null);
__d("XMNReportPageConversationActionController",["XController"],(function a(b,c,d,e,f,g){f.exports=c("XController").create("/messenger_platform/report_page_conversation/submit/",{page_id:{type:"FBID",required:true},report_type:{type:"String",required:true}})}),null);
__d("MNCommerceReportConversationDialog.react",["cx","fbt","AsyncRequest","Link.react","MercuryIDs","MercuryParticipants","MessengerDialog.react","MessengerDialogBody.react","MessengerDialogButton.react","MessengerDialogFooter.react","MessengerDialogHeader.react","MessengerDialogs.bs","MessengerPlatformAbuseReportType","MNCommerceDialogStateActions","MNCommercePromotionBlockDataManager","MNCommercePromotionManageBlockDialogContainer.react","React","XMNReportPageConversationActionController","XUIRadioList.react"],(function a(b,c,d,e,f,g,h,i){"use strict";__p&&__p();var j,k,l=c("XUIRadioList.react").Item,m=c("React").PropTypes;j=babelHelpers.inherits(n,c("React").PureComponent);k=j&&j.prototype;function n(){__p&&__p();var o,p;for(var q=arguments.length,r=Array(q),s=0;s<q;s++)r[s]=arguments[s];return p=(o=k.constructor).call.apply(o,[this].concat(r)),this.state={error:false,pageName:"",reportType:c("MessengerPlatformAbuseReportType").SPAM},this.$MNCommerceReportConversationDialog9=function(){this.$MNCommerceReportConversationDialog1();var t=function t(u,v){return c("MNCommercePromotionBlockDataManager").block(u,v)},u=this.props.pageID;c("MNCommerceDialogStateActions").showDialog(c("MNCommercePromotionManageBlockDialogContainer.react"),{pageID:u,onConfirmButtonClick:t})}.bind(this),this.$MNCommerceReportConversationDialog7=function(t){this.setState({reportType:t})}.bind(this),this.$MNCommerceReportConversationDialog1=function(){if(this.props.onToggle)this.props.onToggle();else c("MessengerDialogs.bs").removeDialog()}.bind(this),this.$MNCommerceReportConversationDialog6=function(){var t=c("XMNReportPageConversationActionController").getURIBuilder().setFBID("page_id",this.props.pageID).setString("report_type",this.state.reportType).getURI();new(c("AsyncRequest"))().setURI(t).setHandler(function(){this.$MNCommerceReportConversationDialog1()}.bind(this)).setErrorHandler(function(){this.setState({error:true})}.bind(this)).send()}.bind(this),p}n.prototype.componentWillMount=function(){var o=c("MercuryParticipants").getNow(c("MercuryIDs").getParticipantIDFromUserID(this.props.pageID));this.setState({pageName:o?o.short_name:""})};n.prototype.render=function(){if(this.props.showDialog===false)return null;return c("React").createElement(c("MessengerDialog.react"),{onToggle:this.$MNCommerceReportConversationDialog1},c("React").createElement(c("MessengerDialogHeader.react"),null,i._("Report")),this.$MNCommerceReportConversationDialog2(),this.$MNCommerceReportConversationDialog3())};n.prototype.$MNCommerceReportConversationDialog2=function(){var o=c("React").createElement("div",{className:"_5zjy"},i._("Help us understand what's happening:")),p=this.$MNCommerceReportConversationDialog4(),q=c("React").createElement("div",{className:"_5zjz"},i._("Reporting this conversation will also turn off all messages from {page name}.",[i.param("page name",this.state.pageName)])),r=this.$MNCommerceReportConversationDialog5();return this.state.error?c("React").createElement(c("MessengerDialogBody.react"),{className:"_5zj-"},i._("Sorry, Something went wrong.")):c("React").createElement(c("MessengerDialogBody.react"),{className:"_5zj_"},o,p,q,r)};n.prototype.$MNCommerceReportConversationDialog3=function(){var o=i._("Report"),p=i._("Cancel"),q=i._("OK");if(this.state.error)return c("React").createElement(c("MessengerDialogFooter.react"),{className:"_5zk0"},c("React").createElement(c("MessengerDialogButton.react"),{label:q,onClick:this.$MNCommerceReportConversationDialog1,type:"primary",use:"default"}));return c("React").createElement(c("MessengerDialogFooter.react"),{className:"_5zk0"},c("React").createElement(c("MessengerDialogButton.react"),{label:p,type:"secondary",onClick:this.$MNCommerceReportConversationDialog1,use:"default"}),c("React").createElement(c("MessengerDialogButton.react"),{label:o,onClick:this.$MNCommerceReportConversationDialog6,type:"primary",use:"default"}))};n.prototype.$MNCommerceReportConversationDialog4=function(){return c("React").createElement(c("XUIRadioList.react"),{selectedValue:this.state.reportType,onValueChange:this.$MNCommerceReportConversationDialog7},c("React").createElement(l,{value:c("MessengerPlatformAbuseReportType").SPAM},i._("It's spam")),c("React").createElement(l,{value:c("MessengerPlatformAbuseReportType").INAPPROPRIATE},i._("It's inappropriate")),c("React").createElement(l,{value:c("MessengerPlatformAbuseReportType").OTHER_ABUSE},i._("Other")))};n.prototype.$MNCommerceReportConversationDialog5=function(){return c("React").createElement("div",{className:"_5zk1"},i._("To stop receiving messages without reporting {page name}, you can manage your messages instead.",[i.param("page name",this.state.pageName)]),this.$MNCommerceReportConversationDialog8())};n.prototype.$MNCommerceReportConversationDialog8=function(){return c("React").createElement(c("Link.react"),{className:"_5zk2",onClick:this.$MNCommerceReportConversationDialog9},i._("Manage"))};n.propTypes={pageID:m.string.isRequired,showDialog:m.bool,onToggle:m.func};f.exports=n}),null);
__d("MessengerDeleteAllMenuBootloader.react",["BootloadOnRender.react","JSResource","LazyComponent.react","React"],(function a(b,c,d,e,f,g){"use strict";var h,i;h=babelHelpers.inherits(j,c("React").PureComponent);i=h&&h.prototype;j.prototype.render=function(){return c("React").createElement(c("BootloadOnRender.react"),{component:c("React").createElement(c("LazyComponent.react"),this.props),loader:c("JSResource")("messengerDeleteAllMenuReactComponent").__setRef("MessengerDeleteAllMenuBootloader.react"),placeholder:c("React").createElement("div",null)})};function j(){h.apply(this,arguments)}f.exports=j}),null);
__d("MessengerDeleteDialogBootloader.react",["BootloadOnRender.react","JSResource","LazyComponent.react","React"],(function a(b,c,d,e,f,g){"use strict";var h,i;h=babelHelpers.inherits(j,c("React").PureComponent);i=h&&h.prototype;j.prototype.render=function(){return c("React").createElement(c("BootloadOnRender.react"),{component:c("React").createElement(c("LazyComponent.react"),this.props),loader:c("JSResource")("messengerDeleteDialogReactComponent").__setRef("MessengerDeleteDialogBootloader.react"),placeholder:c("React").createElement("div",null)})};function j(){h.apply(this,arguments)}f.exports=j}),null);
__d("MessengerMarkSpamDialogBootloader.react",["BootloadOnRender.react","JSResource","LazyComponent.react","React"],(function a(b,c,d,e,f,g){"use strict";var h,i;h=babelHelpers.inherits(j,c("React").PureComponent);i=h&&h.prototype;j.prototype.render=function(){return c("React").createElement(c("BootloadOnRender.react"),{component:c("React").createElement(c("LazyComponent.react"),this.props),loader:c("JSResource")("messengerMarkSpamDialogReactComponent").__setRef("MessengerMarkSpamDialogBootloader.react"),placeholder:c("React").createElement("div",null)})};function j(){h.apply(this,arguments)}f.exports=j}),null);
__d("MessengerMuteDialogBootloader.react",["BootloadOnRender.react","JSResource","LazyComponent.react","React"],(function a(b,c,d,e,f,g){"use strict";var h,i;h=babelHelpers.inherits(j,c("React").PureComponent);i=h&&h.prototype;j.prototype.render=function(){return c("React").createElement(c("BootloadOnRender.react"),{component:c("React").createElement(c("LazyComponent.react"),this.props),loader:c("JSResource")("messengerMuteDialogReactComponent").__setRef("MessengerMuteDialogBootloader.react"),placeholder:c("React").createElement("div",null)})};function j(){h.apply(this,arguments)}f.exports=j}),null);
__d("WorkchatNotificationsJewelBootloader.react",["BootloadOnRender.react","JSResource","LazyComponent.react","React"],(function a(b,c,d,e,f,g){"use strict";var h,i;h=babelHelpers.inherits(j,c("React").PureComponent);i=h&&h.prototype;j.prototype.render=function(){return c("React").createElement(c("BootloadOnRender.react"),{component:c("React").createElement(c("LazyComponent.react"),this.props),loader:c("JSResource")("workchatNotificationsJewelReactComponent").__setRef("WorkchatNotificationsJewelBootloader.react"),placeholder:c("React").createElement("div",null)})};function j(){h.apply(this,arguments)}f.exports=j}),null);
__d("MessengerRTCGroupCallContactListItem.react",["cx","fbt","ix","FBRTCParticipantCallState","Image.react","Link.react","MessengerContactImageReact.bs","React","emptyFunction"],(function a(b,c,d,e,f,g,h,i,j){"use strict";__p&&__p();var k,l=c("MessengerContactImageReact.bs").jsComponent,m=(k={},k[c("FBRTCParticipantCallState").DISCONNECTED]=i._("Disconnected"),k[c("FBRTCParticipantCallState").NO_ANSWER]=i._("No Answer"),k[c("FBRTCParticipantCallState").REJECTED]=i._("Rejected"),k[c("FBRTCParticipantCallState").UNREACHABLE]=i._("Unreachable"),k[c("FBRTCParticipantCallState").CONNECTION_DROPPED]=i._("Connection Dropped"),k[c("FBRTCParticipantCallState").CONTACTING]=i._("Contacting..."),k[c("FBRTCParticipantCallState").RINGING]=i._("Ringing..."),k[c("FBRTCParticipantCallState").CONNECTING]=i._("Connecting..."),k[c("FBRTCParticipantCallState").CONNECTED]=i._("Connected"),k[c("FBRTCParticipantCallState").PARTICIPANT_LIMIT_REACHED]=i._("Participant Limit Reached"),k[c("FBRTCParticipantCallState").IN_ANOTHER_CALL]=i._("In Another Call"),k),n=32,o=function o(s){var t=s.isSelected,u=s.onClick,v=s.user,w=s.participantState;return c("React").createElement(c("Link.react"),{"aria-checked":t,className:"_4nvn",onClick:r(w)?c("emptyFunction"):u,role:"checkbox"},c("React").createElement(l,{className:"_4nvr",isMessengerUser:v.isMessengerUser,isPartiesUser:v.isPartiesUser,size:n,src:v.profilePictureUrl}),c("React").createElement("div",{className:"_4nvs"},c("React").createElement("div",{className:"_4nvt"},c("React").createElement("div",{className:"_4nv_"},v.userName),c("React").createElement(p,{user:v,participantState:w})),c("React").createElement(q,{isSelected:t,participantState:w})))},p=function p(s){var t=s.user,u=s.participantState;if(u){var v=m[u.state]||i._("Unknown");return c("React").createElement("div",{className:"_4nw0"},v)}if(t.vanity)return c("React").createElement("div",{className:"_4nw0"},"@",t.vanity);return null},q=function q(s){var t=s.isSelected,u=s.participantState;if(r(u))return c("React").createElement("div",{className:"_1j79"},i._("In Call"));else if(t)return c("React").createElement("div",{className:"_1j79"},c("React").createElement(c("Image.react"),{src:j("86852")}));return null};function r(s){if(!s)return false;switch(s.state){case c("FBRTCParticipantCallState").CONTACTING:case c("FBRTCParticipantCallState").RINGING:case c("FBRTCParticipantCallState").CONNECTING:case c("FBRTCParticipantCallState").CONNECTED:return true;default:return false}}f.exports=o}),null);
__d("MessengerRTCGroupCallContactList.react",["cx","immutable","MessengerRTCGroupCallContactListItem.react","MessengerScrollableArea.react","React"],(function a(b,c,d,e,f,g,h){"use strict";__p&&__p();var i=function i(j){var k=j.isParticipantSelected,l=j.onClick,m=j.remoteUsers,n=j.participantStates,o=n===undefined?c("immutable").Map():n,p=m.map(function(q){return c("React").createElement(c("MessengerRTCGroupCallContactListItem.react"),{isSelected:k.get(q.FBID),key:q.FBID,onClick:function(r){function l(){return r.apply(this,arguments)}l.toString=function(){return r.toString()};return l}(function(){return l(q.FBID)}),user:q,participantState:o.get(q.FBID)})});return c("React").createElement(c("MessengerScrollableArea.react"),{className:"_12zw"},p)};f.exports=i}),null);
__d("MessengerRTCGroupCallRingParticipantsRow.react",["cx","fbt","React","intlList"],(function a(b,c,d,e,f,g,h,i){"use strict";var j=function j(k){var l=k.names;return c("React").createElement("div",{className:"_1wsd"},c("React").createElement("div",{className:"_1wse"},i._("Ring:")),c("React").createElement("div",{className:"_1wsg"},c("intlList")(l,c("intlList").CONJUNCTIONS.NONE)))};f.exports=j}),null);
__d("RTCCallTitle.react",["immutable","MercuryIDs","MercuryParticipantListRenderer","React"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();var h=function h(i){var j=i.viewer,k=i.participants,l=i.className,m=c("MercuryIDs").getParticipantIDFromUserID(j),n=Object.keys(k.toJS());if(n.length>1)n=n.filter(function(q){return q!=m});var o=n.map(function(q){return k.get(q)}),p=new(c("MercuryParticipantListRenderer"))().setUseShortName(false).setUseAndSeparator(false).renderParticipantList(o);return c("React").createElement("span",{className:l},p)};f.exports=h}),null);
__d("MessengerRTCGroupCallThreadRow.react",["cx","fbt","MercuryParticipantsImage.react","MercuryThreadTitle.react","MessengerProfileImageWrapperReact.bs","MessengerThreadImageReact.bs","React","RTCCallTitle.react"],(function a(b,c,d,e,f,g,h,i){"use strict";__p&&__p();var j=c("MessengerProfileImageWrapperReact.bs").jsComponent,k=c("MessengerThreadImageReact.bs").jsComponent,l=function l(p){var q=p.displayAddMemberWarning,r=p.participants,s=p.thread,t=p.viewerID;return c("React").createElement("div",{className:"_5y31"},c("React").createElement(k,{className:"_5y32",participants:r,thread:s,viewer:t}),c("React").createElement("div",{className:"_5y34"},c("React").createElement(c("MercuryThreadTitle.react"),{className:"_5y37",thread:s,viewer:t}),c("React").createElement(n,{displayAddMemberWarning:q})))},m=function m(p){var q=p.displayAddMemberWarning,r=p.participants,s=p.thread,t=p.viewerID;return c("React").createElement("div",{className:"_5y31"},c("React").createElement(j,{className:"_5y32",showBadge:false},c("React").createElement(c("MercuryParticipantsImage.react"),{participants:Object.keys(r.toJS()),size:50})),c("React").createElement("div",{className:"_5y34"},c("React").createElement(c("RTCCallTitle.react"),{className:"_5y37",participants:r,viewer:t}),c("React").createElement(n,{displayAddMemberWarning:q})))},n=function n(p){var q=p.displayAddMemberWarning;return q?c("React").createElement("div",{className:"_1apf"},i._("People you add to this group video will see previous messages in this conversation.")):null},o=function o(p){var q=p.thread,r=babelHelpers.objectWithoutProperties(p,["thread"]);return q?c("React").createElement(l,babelHelpers["extends"]({thread:q},r)):c("React").createElement(m,babelHelpers["extends"]({thread:q},r))};f.exports=o}),null);
__d("MessengerRTCGroupCallParticipantsPickerDialog.react",["cx","fbt","invariant","FBRTCCore","immutable","ImmutableObject","MessengerDialog.react","MessengerDialogButton.react","MessengerDialogCancelButton.react","MessengerDialogHeader.react","MessengerDialogTitle.react","MessengerRTCFunnelLogger","MessengerRTCGroupCallContactList.react","MessengerRTCGroupCallRingParticipantsRow.react","MessengerRTCGroupCallThreadRow.react","React","RTCUser","URI"],(function a(b,c,d,e,f,g,h,i,j){"use strict";__p&&__p();var k,l,m=c("React").PropTypes,n=460,o=5;k=babelHelpers.inherits(p,c("React").Component);l=k&&k.prototype;function p(q){__p&&__p();l.constructor.call(this,q);this.state={isParticipantSelected:this.props.participants.mapEntries(function(s){var t=s[0],u=s[1];return[u.fbid?u.fbid:t,this.props.participants.size<=o]}.bind(this))};this.$MessengerRTCGroupCallParticipantsPickerDialog3=function(){var s=this.$MessengerRTCGroupCallParticipantsPickerDialog4().map(function(t){return t.fbid});c("MessengerRTCFunnelLogger").appendAction("participant_picker_click_call");if(this.props.handleCall)this.props.handleCall(s);else c("FBRTCCore").startGroupCall({conferenceName:this.props.conferenceName,hasVideo:this.props.hasVideo,trigger:this.props.trigger,usersToRing:s});this.props.onUnmount()}.bind(this);var r=this.props.participants.valueSeq().toArray().map(function(s){var t=s.big_image_src||s.image_src;s.fbid||j(0);return new(c("RTCUser"))({FBID:s.fbid,profileUrl:new(c("URI"))(s.href),profilePictureUrl:t,isMessengerUser:!!s.is_messenger_user,isPartiesUser:!!s.is_parties_user,userName:s.name,userShortName:s.short_name,vanity:s.vanity||""})});this.$MessengerRTCGroupCallParticipantsPickerDialog1=r.sort(function(s,t){return s.userName.localeCompare(t.userName)})}p.prototype.render=function(){var q=this.props,r=q.participants,s=q.thread,t=q.viewerID;return c("React").createElement(c("MessengerDialog.react"),{onToggle:function(){c("MessengerRTCFunnelLogger").endFunnel("participant_picker_dismissed");this.props.onUnmount&&this.props.onUnmount()}.bind(this),type:"default",width:n},c("React").createElement("div",{className:"_2m1r"},c("React").createElement(c("MessengerDialogHeader.react"),null,c("React").createElement(c("MessengerDialogCancelButton.react"),{onClick:this.$MessengerRTCGroupCallParticipantsPickerDialog2}),c("React").createElement(c("MessengerDialogTitle.react"),null,i._("Ring Group Members")),c("React").createElement(c("MessengerDialogButton.react"),{label:i._("Call"),onClick:this.$MessengerRTCGroupCallParticipantsPickerDialog3,disabled:this.$MessengerRTCGroupCallParticipantsPickerDialog4().length===0,type:"primary"})),c("React").createElement(c("MessengerRTCGroupCallThreadRow.react"),{participants:r,thread:s,viewerID:t}),c("React").createElement(c("MessengerRTCGroupCallRingParticipantsRow.react"),{names:this.$MessengerRTCGroupCallParticipantsPickerDialog4().map(function(u){var v=u.name;return v}).sort(function(u,v){return u.localeCompare(v)})}),c("React").createElement(c("MessengerRTCGroupCallContactList.react"),{remoteUsers:this.$MessengerRTCGroupCallParticipantsPickerDialog1,isParticipantSelected:this.state.isParticipantSelected,onClick:function(u){this.setState({isParticipantSelected:this.state.isParticipantSelected.set(u,!this.state.isParticipantSelected.get(u))})}.bind(this)})))};p.prototype.$MessengerRTCGroupCallParticipantsPickerDialog2=function(){c("MessengerRTCFunnelLogger").appendAction("participant_picker_click_cancel")};p.prototype.$MessengerRTCGroupCallParticipantsPickerDialog4=function(){return this.props.participants.filter(function(q,r){return this.state.isParticipantSelected.get(q.fbid?q.fbid:r)}.bind(this)).toArray()};p.propTypes={participants:m.instanceOf(c("immutable").Map).isRequired,thread:m.instanceOf(c("ImmutableObject")),viewerID:m.string.isRequired,trigger:m.string.isRequired,conferenceName:m.string.isRequired,hasVideo:m.bool.isRequired,handleCall:m.func,onUnmount:m.func.isRequired};f.exports=p}),null);
__d("MessengerRTCGroupCallParticipantsPickerDialogController",["DOM","MessengerRTCGroupCallParticipantsPickerDialog.react","React","ReactDOM"],(function a(b,c,d,e,f,g){"use strict";var h={_container:c("DOM").create("div"),render:function i(j){var k=j.participants,l=j.thread,m=j.viewerID,n=j.trigger,o=j.conferenceName,p=j.hasVideo,q=j.handleCall;c("ReactDOM").render(c("React").createElement(c("MessengerRTCGroupCallParticipantsPickerDialog.react"),{participants:k,thread:l,viewerID:m,trigger:n,conferenceName:o,hasVideo:p,handleCall:q,onUnmount:function(){return this._onUnmount()}.bind(this)}),this._container)},_onUnmount:function i(){c("ReactDOM").unmountComponentAtNode(this._container)}};f.exports=h}),null);
__d("MessengerRTCGroupCallUnsupportedBrowserDialog.react",["fbt","Link.react","MessengerDialog.react","MessengerDialogBodyReact.bs","MessengerDialogButton.react","MessengerDialogFooter.react","MessengerDialogHeader.react","React","UserAgent"],(function a(b,c,d,e,f,g,h){"use strict";__p&&__p();var i=c("MessengerDialogBodyReact.bs").jsComponent,j=function j(n){var o=n.hasVideo,p=n.onUnmount;return c("React").createElement(c("MessengerDialog.react"),{onToggle:p},c("React").createElement(c("MessengerDialogHeader.react"),null,k(o)),c("React").createElement(i,null,l(o)),c("React").createElement(c("MessengerDialogFooter.react"),null,c("React").createElement(c("MessengerDialogButton.react"),{label:h._("OK"),onClick:p,type:"primary"})))};function k(n){return n?h._("Switch Browsers to Make Group Video Chats"):h._("Switch Browsers to Make Group Calls")}function l(n){return n?h._("Unfortunately, our group calling feature doesn't support {browser name, i.e. Internet Explorer or Safari} yet. To make a group video chat, open in {link to install chrome}.",[h.param("browser name, i.e. Internet Explorer or Safari",m()),h.param("link to install chrome",c("React").createElement(c("Link.react"),{href:"https://www.google.com/chrome/index.html",target:"_blank"},"Google Chrome"))]):h._("Unfortunately, our group calling feature doesn't support {browser name, i.e. Internet Explorer or Safari} yet. To make a group call, open in {link to install chrome}.",[h.param("browser name, i.e. Internet Explorer or Safari",m()),h.param("link to install chrome",c("React").createElement(c("Link.react"),{href:"https://www.google.com/chrome/index.html",target:"_blank"},"Google Chrome"))])}function m(){if(c("UserAgent").isBrowser("Firefox"))return h._("Firefox");else if(c("UserAgent").isBrowser("IE"))return h._("Internet Explorer");else if(c("UserAgent").isBrowser("Safari"))return h._("Safari");else return h._("your browser")}f.exports=j}),null);
__d("MessengerRTCGroupCallUnsupportedBrowserDialogController",["DOM","MessengerRTCGroupCallUnsupportedBrowserDialog.react","React","ReactDOM"],(function a(b,c,d,e,f,g){"use strict";var h={_container:c("DOM").create("div"),render:function i(j){var k=j.hasVideo;c("ReactDOM").render(c("React").createElement(c("MessengerRTCGroupCallUnsupportedBrowserDialog.react"),{hasVideo:k,onUnmount:function(){return this.unmount()}.bind(this)}),this._container)},unmount:function i(){c("ReactDOM").unmountComponentAtNode(this._container)}};f.exports=h}),null);
__d("MessengerRTCUnavailableDialog.react",["fbt","MessengerDialogs.bs","MessengerDialog.react","MessengerDialogBodyReact.bs","MessengerDialogButton.react","MessengerDialogFooter.react","MessengerDialogHeader.react","React"],(function a(b,c,d,e,f,g,h){"use strict";__p&&__p();var i,j,k=c("MessengerDialogBodyReact.bs").jsComponent,l=c("React").PropTypes;i=babelHelpers.inherits(m,c("React").Component);j=i&&i.prototype;m.prototype.render=function(){return c("React").createElement(c("MessengerDialog.react"),{onToggle:this.$MessengerRTCUnavailableDialog1},c("React").createElement(c("MessengerDialogHeader.react"),null,h._("Can't Make Call")),c("React").createElement(k,null,this.$MessengerRTCUnavailableDialog2()),c("React").createElement(c("MessengerDialogFooter.react"),null,c("React").createElement(c("MessengerDialogButton.react"),{action:"cancel",label:h._("OK"),type:"primary"})))};m.prototype.$MessengerRTCUnavailableDialog2=function(){return c("React").createElement("div",null,h._("{name} is not available right now.",[h.param("name",this.props.name)]))};m.prototype.$MessengerRTCUnavailableDialog1=function(n){if(!n)c("MessengerDialogs.bs").removeDialog()};function m(){i.apply(this,arguments)}m.propTypes={name:l.string.isRequired};f.exports=m}),null);
__d("MessengerRTCVideoCallButtonReact.bs",["fbt","React","ReasonReact.bs"],(function a(b,c,d,e,f,g,h){"use strict";__p&&__p();var i={height:"32px",width:"32px"};function j(o,p){return{clipRule:"evenodd",fill:"none",fillRule:"evenodd",stroke:o,strokeMiterlimit:"10",strokeWidth:"2"}}var k=j("#888888",0),l=c("ReasonReact.bs").statelessComponent("MessengerRTCVideoCallButtonReact");function m(o,p,q,r){var s=l.slice();s[9]=function(){var t=q!==0?h._("Start a group video chat"):h._("Start a video chat"),u=p!==0?j(o,0):k;return c("React").createElement("div",{style:i,title:t},c("React").createElement("svg",{style:u,viewBox:"0 0 64 64"},c("React").createElement("title",undefined,t),c("React").createElement("g",undefined,c("React").createElement("g",undefined,c("React").createElement("path",{d:"M47,27.8v7.5l9,4.5V23.2L47,27.8z M37.2,17H13.8C10.6,17,8,19.6,8,22.8v17.4c0,3.2,2.6,5.8,5.8,5.8h23.3\nc3.2,0,5.8-2.6,5.8-5.8V22.8C43,19.6,40.4,17,37.2,17z"})))))};return s}var n=c("ReasonReact.bs").wrapReasonForJs(l,function(o){return m(o.customColor,+o.isAvailable,+o.isGroupChat,[])});g.svgWrapperStyle=i;g.svgStyle=j;g.unavailable=k;g.component=l;g.make=m;g.jsComponent=n}),null);
__d("MessengerRTCVoiceCallButtonReact.bs",["fbt","React","ReasonReact.bs"],(function a(b,c,d,e,f,g,h){"use strict";__p&&__p();var i={height:"32px",width:"32px"};function j(o,p){return{clipRule:"evenodd",fill:"none",fillRule:"evenodd",stroke:o,strokeMiterlimit:"10",strokeWidth:"2"}}var k=j("#888888",0),l=c("ReasonReact.bs").statelessComponent("MessengerRTCVoiceCallButtonReact");function m(o,p,q,r){var s=l.slice();s[9]=function(){var t=q!==0?h._("Start a group call"):h._("Start a voice call"),u=p!==0?j(o,0):k;return c("React").createElement("div",{style:i,title:t},c("React").createElement("svg",{style:u,viewBox:"0 0 64 64"},c("React").createElement("title",undefined,t),c("React").createElement("path",{d:"M48.3,50.5c-7.7,6.5-24.2-10-24.5-10.3C23.5,39.9,7,23.4,13.5,15.7c4.8-5.7,6.3-3.4,7-2.7\nc0.6,0.5,5.7,7.8,6,9.2c0.3,1.4-2.4,4.6-2.2,5.9c0.2,1.2,3.6,5,5.1,6.5c1.5,1.5,5.3,4.9,6.5,5.1c1.2,0.2,4.4-2.5,5.9-2.2\nc1.4,0.3,8.7,5.4,9.2,6C51.6,44.2,54,45.7,48.3,50.5z"})))};return s}var n=c("ReasonReact.bs").wrapReasonForJs(l,function(o){return m(o.customColor,+o.isAvailable,+o.isGroupChat,[])});g.svgWrapperStyle=i;g.svgStyle=j;g.unavailable=k;g.component=l;g.make=m;g.jsComponent=n}),null);
__d("MessengerRTCCallButton.react",["invariant","immutable","ImmutableObject","Link.react","MercuryIDs","MercuryThreadIDMap","MessengerDialogs.bs","MessengerRTCUnavailableDialog.react","MessengerRTCVideoCallButtonReact.bs","MessengerRTCVoiceCallButtonReact.bs","MessengerRTCFunnelLogger","MNRTCCallabilityStore","React","RTCCallState","StoreAndPropBasedStateMixin","FBRTCLogger"],(function a(b,c,d,e,f,g,h){"use strict";__p&&__p();var i=c("MercuryThreadIDMap").get(),j=c("MessengerRTCVideoCallButtonReact.bs").jsComponent,k=c("MessengerRTCVoiceCallButtonReact.bs").jsComponent,l=c("FBRTCLogger").Trigger,m=c("React").PropTypes,n=c("React").createClass({displayName:"MessengerRTCCallButton",mixins:[c("StoreAndPropBasedStateMixin")(c("MNRTCCallabilityStore"))],statics:{calculateState:function o(p){if(c("MercuryIDs").isGroupChat(p.threadID))return{isCallable:true};var q=c("MercuryIDs").getUserIDFromThreadID(p.threadID),r=q?c("MNRTCCallabilityStore").isCallable(q,p.thread):false;return{isCallable:r}}},propTypes:{className:m.string.isRequired,customColor:m.string.isRequired,isVideo:m.bool.isRequired,participants:m.instanceOf(c("immutable").Map).isRequired,thread:m.instanceOf(c("ImmutableObject")).isRequired,threadID:m.string.isRequired,viewer:m.string.isRequired,calleeName:m.string.isRequired},render:function o(){var p={customColor:this.props.customColor,isAvailable:this.state.isCallable,isGroupChat:c("MercuryIDs").isGroupChat(this.props.threadID)};return c("React").createElement(c("Link.react"),{className:this.props.className,onClick:this._handleStartCall},this.props.isVideo?c("React").createElement(j,p):c("React").createElement(k,p))},_handleStartCall:function o(p){__p&&__p();p.preventDefault();c("MessengerRTCFunnelLogger").startFunnel("FBMessagesPage");if(this.state.isCallable)if(c("MercuryIDs").isGroupChat(this.props.threadID)){c("MessengerRTCFunnelLogger").appendAction("start_in_group_thread");e(["FBRTCCore","FBRTCSupport","MessengerRTCGroupCallUnsupportedBrowserDialogController","MessengerRTCGroupCallParticipantsPickerDialogController"],function(q,r,s,t){__p&&__p();var u=this.props.thread.rtc_call_data;if(u&&u.call_state!==c("RTCCallState").NO_ONGOING_CALL&&u.server_info_data){c("MessengerRTCFunnelLogger").appendAction("join_existing_call");q.startGroupCall({conferenceName:"GROUP:"+this.props.thread.thread_fbid,hasVideo:this.props.isVideo,serverInfoData:u.server_info_data,trigger:u.call_state!==c("RTCCallState").AUDIO_GROUP_CALL?this.props.isVideo?l.MULTIWAY_THREAD_HEADER_JOIN_AUDIO_CALL_VIDEO_BUTTON:l.MULTIWAY_THREAD_HEADER_JOIN_AUDIO_CALL_AUDIO_BUTTON:this.props.isVideo?l.MULTIWAY_THREAD_HEADER_JOIN_VIDEO_CALL_VIDEO_BUTTON:l.MULTIWAY_THREAD_HEADER_JOIN_VIDEO_CALL_AUDIO_BUTTON});return}if(!r.isGroupCallWebtrcSupported()){c("MessengerRTCFunnelLogger").endFunnel("unsupported_browser");s.render({hasVideo:this.props.isVideo});return}var v=function(w){c("MessengerRTCFunnelLogger").appendAction("render_participant_picker");t.render({participants:this.props.participants.filter(function(x){var y=x.fbid;return y!==this.props.viewer}.bind(this)),thread:this.props.thread,viewerID:this.props.viewer,trigger:this.props.isVideo?l.MULTIWAY_THREAD_HEADER_VIDEO_BUTTON:l.MULTIWAY_THREAD_HEADER_AUDIO_BUTTON,conferenceName:"GROUP:"+w,hasVideo:this.props.isVideo})}.bind(this);if(c("MercuryIDs").isLocalThread(this.props.threadID))i.getServerIDFromClientID(this.props.threadID,function(w){return v(w)});else v(c("MercuryIDs").getThreadFBIDFromThreadID(this.props.threadID))}.bind(this))}else{c("MessengerRTCFunnelLogger").appendAction("start_in_p2p_thread");e(["FBRTCCore"],function(q){var r=c("MercuryIDs").getUserIDFromThreadID(this.props.threadID);r||h(0);q.startOutgoingCall(r,"messenger_dot_com",!this.props.isVideo)}.bind(this))}else{c("MessengerRTCFunnelLogger").endFunnel("callee_not_callable");c("MessengerDialogs.bs").showDialog(function(){return c("React").createElement(c("MessengerRTCUnavailableDialog.react"),{name:this.props.calleeName})}.bind(this))}}});f.exports=n}),null);
__d("XMessengerDotComSpoofIFrameController",["XController"],(function a(b,c,d,e,f,g){f.exports=c("XController").create("/spoof/fb_iframe_target/",{gk_spoof:{type:"String"}})}),null);
__d("XSpoofMessengerDotComIFrameController",["XController"],(function a(b,c,d,e,f,g){f.exports=c("XController").create("/spoof/messenger_dot_com_iframe/",{redirect_uri:{type:"String",required:true}})}),null);
__d("MessengerSpoof",["Arbiter","DOM","JSXDOM","URI","XSpoofMessengerDotComIFrameController","XMessengerDotComSpoofIFrameController"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();var h=6e3;function i(k){var l=c("JSXDOM").iframe({src:j().toString(),width:0,height:0});c("DOM").appendContent(document.body,l);c("Arbiter").subscribeOnce("messengerdotcom_spoof",function(){c("DOM").remove(l);k()});setTimeout(function(){c("Arbiter").inform("messengerdotcom_spoof")},h)}function j(){var k=new(c("URI"))(document.URL),l=c("XMessengerDotComSpoofIFrameController").getURIBuilder().getURI().getQualifiedURI().toString(),m=c("XSpoofMessengerDotComIFrameController").getURIBuilder().setString("redirect_uri",l).getURI();return m.setDomain(k.getDomain().replace("messenger.com","facebook.com")).setPort(k.getPort()).setProtocol("https")}f.exports={init:i}}),null);
__d("MessengerThreadlistMessageRequestsRow.react",["cx","fbt","ix","Image.react","ImmutableObject","LinkWithHiddenURLBar.react","MercuryConfig","MercuryIDs","MercuryParticipants","MessagingTag","MessengerActions","MNAdsLogMessageUtils","React","Keys","intlList","MessengerMessageRequestsTypedLogger","CurrentUser","gkx","shallowEqual"],(function a(b,c,d,e,f,g,h,i,j){"use strict";__p&&__p();var k,l,m=50,n=j("86936"),o=c("React").PropTypes;k=babelHelpers.inherits(p,c("React").Component);l=k&&k.prototype;function p(){__p&&__p();var q,r;for(var s=arguments.length,t=Array(s),u=0;u<s;u++)t[u]=arguments[u];return r=(q=l.constructor).call.apply(q,[this].concat(t)),this.$MessengerThreadlistMessageRequestsRow4=function(v){if(this.props.aggregatedThreads.length>0){var w=this.props.aggregatedThreads,x=w.map(function(y){return y.thread_id});c("MessengerActions").selectAggregation(x);this.props.onAggregationClick&&this.props.onAggregationClick(v,w)}else{v.preventDefault();c("MessengerActions").changeFolder(c("MessagingTag").PENDING)}}.bind(this),r}p.prototype.shouldComponentUpdate=function(q){return!c("shallowEqual")(this.props,q)};p.prototype.componentDidUpdate=function(q){if(this.props.isFocused)this.$MessengerThreadlistMessageRequestsRow1&&this.$MessengerThreadlistMessageRequestsRow1.focus&&this.$MessengerThreadlistMessageRequestsRow1.focus()};p.prototype.render=function(){var q=this.props.newMessageRequestThreads.length||this.props.aggregatedThreads.length;if(q===0)return null;var r=this.$MessengerThreadlistMessageRequestsRow2()==0?"_1htf _r0_":"_1htf _5nxb";return c("React").createElement("li",{className:"_5l-3 _1ht1 _2il3 _2kt",ref:function(s){this.$MessengerThreadlistMessageRequestsRow1=s}.bind(this),onKeyPress:this.$MessengerThreadlistMessageRequestsRow3,role:"row",tabIndex:-1},c("React").createElement(c("LinkWithHiddenURLBar.react"),{tabIndex:-1,onAllClicks:this.$MessengerThreadlistMessageRequestsRow4,className:"_1ht5 _5l-3"},c("React").createElement("div",{className:"_5l-3 _1qt3 _5nxe"},c("React").createElement(c("Image.react"),{alt:"",height:m,src:n,width:m}),this.$MessengerThreadlistMessageRequestsRow5()),c("React").createElement("div",{className:"_1qt4 _5l-m"},c("React").createElement("div",{className:"_1qt5 _5l-3"},c("React").createElement("div",{className:"_1ht6 _5nxa"},this.$MessengerThreadlistMessageRequestsRow6())),c("React").createElement("div",{className:"_1qt5 _5l-3"},c("React").createElement("div",{className:r},this.$MessengerThreadlistMessageRequestsRow7())))))};p.prototype.$MessengerThreadlistMessageRequestsRow2=function(){var q=this.props.newMessageRequestThreads.length>0?this.props.newMessageRequestThreads:this.props.aggregatedThreads;if(!c("MercuryConfig").MCMA)return q.length;var r=0;q.forEach(function(s){return s.unread_count!==0?r++:r});return r};p.prototype.$MessengerThreadlistMessageRequestsRow6=function(){var q=this.props.newMessageRequestThreads.length>0?this.props.newMessageRequestThreads:this.props.aggregatedThreads;return c("MercuryConfig").RTCR?i._({"*":"Connection Requests","_1":"Connection Request"},[i.plural(q.length)]):i._({"*":"New Message Requests","_1":"New Message Request"},[i.plural(q.length)])};p.prototype.$MessengerThreadlistMessageRequestsRow5=function(){var q=this.$MessengerThreadlistMessageRequestsRow2();return q==0?null:c("React").createElement("span",{className:"_5nxf"},i._({"*":"{count}"},[i.param("count",q,[0])]))};p.prototype.componentDidMount=function(){var q,r=this;if(this.props.aggregatedThreads&&this.props.aggregatedThreads.length>0)(function(){var s=c("CurrentUser").getID(),t=r.props.aggregatedThreads.map(function(u){return c("MercuryIDs").getThreadKeyfromThreadIDUserID(u.thread_id,s)});new(c("MessengerMessageRequestsTypedLogger"))().setAction("aggregation_unit_impression").setThreadKeyList(t.filter(function(u){return u}).join(", ")).setEntryPoint("inbox_aggregation").setSurface("inbox").setFolderType("pending").log()})()};p.prototype.$MessengerThreadlistMessageRequestsRow8=function(){__p&&__p();var q=this.props.newMessageRequestThreads.length>0?this.props.newMessageRequestThreads:this.props.aggregatedThreads,r=i._({"*":"From people you may know","_1":"From someone you may know"},[i.plural(q.length)]),s=c("MercuryIDs").getParticipantIDFromUserID(this.props.viewer),t=[];for(var u=0,v=0;v<3&&u<q.length;u++){var w=q[u].participants.find(function(y){return y!==s});if(w){var x=c("MercuryParticipants").getOrFetch(w);if(x){v++;t.push(x.name.split(" ")[0])}}}if(!t||t.length==0)return r;if(q.length>0)c("MNAdsLogMessageUtils").logAdsThreadListImpression(q[0]);return q.length-t.length==0?i._("From {name}",[i.param("name",c("intlList")(t,c("intlList").CONJUNCTIONS.NONE))]):i._({"*":"From {name} and {count} more"},[i.param("name",c("intlList")(t,c("intlList").CONJUNCTIONS.NONE)),i.param("count",q.length-t.length,[0])])};p.prototype.$MessengerThreadlistMessageRequestsRow7=function(){__p&&__p();if(c("MercuryConfig").MCMA)return this.$MessengerThreadlistMessageRequestsRow8();var q=this.props.newMessageRequestThreads.length>0?this.props.newMessageRequestThreads:this.props.aggregatedThreads,r=i._({"someone":"From someone you may know","people":"From people you may know"},[i["enum"](q.length===1?"someone":"people",{someone:"someone",people:"people"})]),s=c("MercuryIDs").getParticipantIDFromUserID(this.props.viewer),t=q[0].participants.find(function(v){return v!==s});if(!t)return r;var u=c("MercuryParticipants").getOrFetch(t);if(!u||!u.name)return r;if(q.length>0)c("MNAdsLogMessageUtils").logAdsThreadListImpression(q[0]);return q.length===1?i._("From {name}",[i.param("name",u.name)]):i._({"*":"From {name} and {count} more"},[i.param("name",u.name),i.param("count",q.length-1,[0])])};p.prototype.$MessengerThreadlistMessageRequestsRow9=function(q){q.preventDefault();var r=this.props.newMessageRequestThreads.length>0?this.props.newMessageRequestThreads:this.props.aggregatedThreads;this.props.onFocus(r[0].thread_id)};p.prototype.$MessengerThreadlistMessageRequestsRow3=function(q){q.preventDefault();var r=q.charCode;if(r===c("Keys").RETURN)c("MessengerActions").changeFolder(c("MessagingTag").PENDING)};p.propTypes={onAggregationClick:o.func,isFocused:o.bool,newMessageRequestThreads:o.arrayOf(o.instanceOf(c("ImmutableObject"))).isRequired,aggregatedThreads:o.arrayOf(o.instanceOf(c("ImmutableObject"))),viewer:o.string.isRequired};f.exports=p}),null);
__d("MessengerComposerState",["immutable"],(function a(b,c,d,e,f,g){"use strict";var h=c("immutable").Record({step:null,recipients:c("immutable").List()});h.__TCmeta={type:"MessengerComposerState"};f.exports=h}),null);
__d("MessengerComposerSteps",["keyMirror"],(function a(b,c,d,e,f,g){"use strict";var h=c("keyMirror")({NULL:null,SELECT_RECIPIENTS:null,COMPOSE:null});f.exports=h}),null);
__d("MessengerComposerStore",["EditorState","immutable","MessengerActions","MessengerComposerActions","MessengerComposerState","MessengerComposerSteps","MessengerConstants","MessengerDispatcher","MessengerEditorStateManager","MessengerStateStore","MessengerStore","MessengerView"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();var h,i,j=new(c("MessengerComposerState"))({step:c("MessengerComposerSteps").NULL,recipients:c("immutable").List()});h=babelHelpers.inherits(k,c("MessengerStore"));i=h&&h.prototype;function k(){i.constructor.call(this);this.$MessengerComposerStore1=j}k.prototype.getState=function(){return this.$MessengerComposerStore1};k.prototype.__onDispatch=function(l){__p&&__p();c("MessengerDispatcher").waitFor([c("MessengerStateStore").getDispatchToken()]);var m=c("MessengerStateStore").getState().detailView,n=this.$MessengerComposerStore1.recipients,o=this.$MessengerComposerStore1.step,p=null,q=null;switch(l.type){case c("MessengerComposerActions").Types.ADD_TOKEN:if(n.some(function(v){return v.getUniqueID()===l.entry.getUniqueID()}))break;p=n.push(l.entry);break;case c("MessengerComposerActions").Types.REMOVE_TOKEN:var r=l.entry.getUniqueID(),s=n.findIndex(function(v){return v.getUniqueID()===r});if(s!==-1)p=n["delete"](s);break;case c("MessengerComposerActions").Types.FOCUS_COMPOSER:if(o===c("MessengerComposerSteps").SELECT_RECIPIENTS)q=c("MessengerComposerSteps").COMPOSE;break;case c("MessengerComposerActions").Types.FOCUS_TYPEAHEAD:if(o===c("MessengerComposerSteps").COMPOSE)q=c("MessengerComposerSteps").SELECT_RECIPIENTS;break;case c("MessengerActions").Types.REPLACE_STATE:var t=c("MessengerStateStore").getPrevState().detailView;if(t!==c("MessengerView").DETAIL.COMPOSE&&m===c("MessengerView").DETAIL.COMPOSE)q=c("MessengerComposerSteps").SELECT_RECIPIENTS;break;case c("MessengerComposerActions").Types.MOVE_DRAFT:c("MessengerEditorStateManager").set(l.threadID,c("MessengerEditorStateManager").get(c("MessengerConstants").NEW_THREAD_KEY));break;case c("MessengerComposerActions").Types.EXIT_COMPOSE_STATE:var u=c("EditorState").createEmpty();setTimeout(function(){c("MessengerEditorStateManager").set(c("MessengerConstants").NEW_THREAD_KEY,c("EditorState").forceSelection(u,u.getSelection()))},0);q=c("MessengerComposerSteps").NULL;p=c("immutable").List();break}if(p||q){this.$MessengerComposerStore1=new(c("MessengerComposerState"))({step:q||o,recipients:p||n});this.emitChange()}};f.exports=new k()}),null);
__d("MessengerThreadlistNewMessageRow.react",["cx","fbt","ix","Image.react","LinkWithHiddenURLBar.react","MercuryIDs","MercuryParticipantListRenderer","MercuryParticipants","MercuryParticipantsImage.react","MessengerActions","MessengerComposerStore","MessengerProfileImageWrapperReact.bs","MessengerView","ReactComponentWithPureRenderMixin","PureStoreBasedStateMixin","React","ShimButton.react"],(function a(b,c,d,e,f,g,h,i,j){"use strict";__p&&__p();var k=c("MessengerProfileImageWrapperReact.bs").jsComponent,l=50,m=j("86935"),n=c("React").PropTypes,o=c("React").createClass({displayName:"MessengerThreadlistNewMessageRow",mixins:[c("ReactComponentWithPureRenderMixin"),c("PureStoreBasedStateMixin")(c("MercuryParticipants"),c("MessengerComposerStore"))],propTypes:{isActive:n.bool,onClose:n.func.isRequired},statics:{calculateState:function p(){return{participants:c("MessengerComposerStore").getState().recipients.map(function(q){return c("MercuryParticipants").getOrFetch(c("MercuryIDs").getParticipantIDFromUserID(q.getUniqueID()))}).filter(function(q){return!!q})}}},render:function p(){return c("React").createElement("li",{className:"_5l-3 _1ht1"+(this.props.isActive?" _1ht2":"")},c("React").createElement(c("LinkWithHiddenURLBar.react"),{onAllClicks:this._handleClickRow,className:"_1ht5 _2il3 _5l-3"},this._renderImage(),c("React").createElement("div",{className:"_1qt4 _5l-m"},c("React").createElement("div",{className:"_1qt5 _5l-3"},c("React").createElement("div",{className:"_1ht6"},this._renderTitle()),c("React").createElement(c("ShimButton.react"),{className:"_23ct",onClick:this.props.onClose})),c("React").createElement("div",{className:"_1qt5 _5l-3"},"\xa0"))))},_renderImage:function p(){var q=this.state.participants;if(!q.isEmpty())return c("React").createElement("div",{className:"_1qt3 _5l-3"},c("React").createElement(k,{isMessengerUser:q.size===1&&q.first().is_messenger_user,size:l,showBadge:false},c("React").createElement(c("MercuryParticipantsImage.react"),{participants:q.map(function(r){return r.id}).slice(0,3).toArray(),size:l})));return c("React").createElement("div",{className:"_1qt3 _5l-3"},c("React").createElement(c("Image.react"),{height:l,src:m,width:l}))},_renderTitle:function p(){if(this.state.participants.isEmpty())return i._("New message");return i._("New message to {List of message recipients}",[i.param("List of message recipients",new(c("MercuryParticipantListRenderer"))().renderParticipantList(this.state.participants.toArray()))])},_handleClickRow:function p(q){q.preventDefault();c("MessengerActions").changeDetailView(c("MessengerView").DETAIL.COMPOSE)}});f.exports=o}),null);
__d("Keys.bs",[],(function a(b,c,d,e,f,g){"use strict";__p&&__p();var h=8,i=9,j=13,k=18,l=27,m=32,n=33,o=34,p=35,q=36,r=37,s=38,t=39,u=40,v=46,w=188,x=190,y=65,z=90,A=48,B=96,C=105;g.backspace=h;g.tab=i;g.$$return=j;g.alt=k;g.esc=l;g.space=m;g.page_up=n;g.page_down=o;g.end_=p;g.home=q;g.left=r;g.up=s;g.right=t;g.down=u;g.$$delete=v;g.comma=w;g.period=x;g.a=y;g.z=z;g.zero=A;g.numpad_0=B;g.numpad_9=C}),null);
__d("MNCommerceReportConversationDialogReact.bs",["ReasonReact.bs","MNCommerceReportConversationDialog.react"],(function a(b,c,d,e,f,g){"use strict";function h(i,j){return c("ReasonReact.bs").wrapJsForReason(c("MNCommerceReportConversationDialog.react"),{pageID:i},j)}g.make=h}),null);
__d("MessengerBlockDialogReact.bs",["cx","fbt","bs_curry","React","Utils.bs","LinkReact.bs","ReasonReact.bs","bs_js_primitive","MessengerDialogReact.bs","MessengerDialogBodyReact.bs","IgnoreMessagesTypedLogger"],(function a(b,c,d,e,f,g,h,i){"use strict";__p&&__p();var j=c("ReasonReact.bs").statelessComponent("MessengerBlockDialogReact");function k(o,p){return c("React").createElement("div",{className:"_1q73"},i._("If you want, you can also {link}",[i.param("link",c("ReasonReact.bs").element(0,0,c("LinkReact.bs").make(0,0,0,0,0,0,[p],0,0,0,0,0,0,0,["_blank"],0,i._("block {short_name_or_description} on Facebook.",[i.param("short_name_or_description",c("Utils.bs").$pipe$unknown(o,i._("this person")))]))))]))}function l(o,p,q,r,s){__p&&__p();var t=j.slice();t[9]=function(){__p&&__p();var u=function u(){c("bs_curry")._1(p,false);return c("bs_curry")._1(o,0)},v;if(q){var w=q[0];v=[[w.short_name],c("bs_js_primitive").null_undefined_to_opt(w.href)]}else v=[0,0];var x=v[1],y=v[0];if(!(r==null)){var z=new(c("IgnoreMessagesTypedLogger"))().setEvent("block_clicked").setThreadID(r).setPlatform("messengerdotcom");z.log()}return c("ReasonReact.bs").element(0,0,c("MessengerDialogReact.bs").Dialog[0](0,p,0,0,0,0,0,[c("ReasonReact.bs").element(0,0,c("MessengerDialogReact.bs").Header[0](0,0,i._("Block Messages"))),c("ReasonReact.bs").element(0,0,c("MessengerDialogBodyReact.bs").make(0,[c("React").createElement("div",{className:"_1q73"},i._("Stop getting messages and calls from {short_name_or_description} in Messenger.",[i.param("short_name_or_description",c("Utils.bs").$pipe$unknown(y,i._("this person")))])),x?k(y,x[0]):null,c("React").createElement("div",undefined,c("ReasonReact.bs").element(0,0,c("LinkReact.bs").make(0,0,0,0,0,0,["https://www.facebook.com/help/389645087895231"],0,0,0,0,0,0,0,["_blank"],0,i._("Learn more"))))])),c("ReasonReact.bs").element(0,0,c("MessengerDialogReact.bs").Footer[0](0,0,[c("ReasonReact.bs").element(0,0,c("MessengerDialogReact.bs").CancelButton[0](0,[])),c("ReasonReact.bs").element(0,0,c("MessengerDialogReact.bs").Button[0](0,[i._("Block Messages")],0,["danger"],[u],[0],0,0,[]))]))]))};return t}var m=c("ReasonReact.bs").wrapReasonForJs(j,function(o){return l(o.onBlock,o.onToggle,c("bs_js_primitive").null_undefined_to_opt(o.contact),o.threadID,[])}),n=c("Utils.bs").$pipe$unknown;g.$pipe$unknown=n;g.component=j;g.renderBlockOnFacebook=k;g.make=l;g.jsComponent=m}),null);
__d("MessengerDeleteDialogBootloaderReact.bs",["ReasonReact.bs","MessengerDeleteDialogBootloader.react"],(function a(b,c,d,e,f,g){"use strict";function h(i,j,k,l){return c("ReasonReact.bs").wrapJsForReason(c("MessengerDeleteDialogBootloader.react"),{onArchive:i,onDelete:j,onToggle:k},l)}g.make=h}),null);
__d("MessengerIgnoreDialogReact.bs",["cx","fbt","bs_curry","React","Utils.bs","ReasonReact.bs","bs_js_primitive","MercuryConfig","MessengerDialogReact.bs","MessengerDialogBodyReact.bs","IgnoreMessagesTypedLogger"],(function a(b,c,d,e,f,g,h,i){"use strict";__p&&__p();var j=c("ReasonReact.bs").statelessComponent("MessengerIgnoreDialogReact");function k(n,o,p,q,r,s){__p&&__p();var t=j.slice();t[9]=function(){var u=+c("MercuryConfig").RTCR,v=u!==0?i._("Connection Requests"):i._("Message Requests"),w=function w(){c("bs_curry")._1(n,0);return c("bs_curry")._1(o,false)},x=p?[p[0].short_name]:0;if(!(q==null)){var y=new(c("IgnoreMessagesTypedLogger"))().setEvent("ignore_clicked").setThreadID(q).setPlatform("messengerdotcom");y.log()}return c("ReasonReact.bs").element(0,0,c("MessengerDialogReact.bs").Dialog[0](0,o,0,0,0,0,0,[c("ReasonReact.bs").element(0,0,c("MessengerDialogReact.bs").Header[0](0,0,r!==0?i._("Ignore group?"):i._("Ignore this conversation?"))),c("ReasonReact.bs").element(0,0,c("MessengerDialogBodyReact.bs").make(0,[c("React").createElement("div",{className:"_1q73"},r!==0?i._("You won't be notified when someone messages this group, and the group will move to Filtered Messages. We won't tell anyone in the group that the messages have been ignored."):i._("You won't be notified when {short_name_or_description} messages you directly, and the conversation will move to {requests}. We won't tell {sameParam} that the messages have been ignored.",[i.param("short_name_or_description",c("Utils.bs").$pipe$unknown(x,i._("this person"))),i.param("requests",v),i.param("sameParam",c("Utils.bs").$pipe$unknown(x,i._("this person")))]))])),c("ReasonReact.bs").element(0,0,c("MessengerDialogReact.bs").Footer[0](0,0,[c("ReasonReact.bs").element(0,0,c("MessengerDialogReact.bs").CancelButton[0](0,[])),c("ReasonReact.bs").element(0,0,c("MessengerDialogReact.bs").Button[0](0,[i._("Ignore Messages")],0,["danger"],[w],[0],0,0,[]))]))]))};return t}var l=c("ReasonReact.bs").wrapReasonForJs(j,function(n){return k(n.onIgnore,n.onToggle,c("bs_js_primitive").null_undefined_to_opt(n.contact),n.threadID,n.isGroupChat,[])}),m=c("Utils.bs").$pipe$unknown;g.$pipe$unknown=m;g.component=j;g.make=k;g.jsComponent=l}),null);
__d("MessengerMarkSpamDialogBootloaderReact.bs",["ReasonReact.bs","MessengerMarkSpamDialogBootloader.react"],(function a(b,c,d,e,f,g){"use strict";function h(i,j,k){return c("ReasonReact.bs").wrapJsForReason(c("MessengerMarkSpamDialogBootloader.react"),{onMarkSpam:i,onToggle:j},k)}g.make=h}),null);
__d("MessengerMenuReact.bs",["ReasonReact.bs","bs_js_null_undefined","MessengerMenu.react"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();function h(n){return c("ReasonReact.bs").wrapJsForReason(c("MessengerMenu.react"),{},n)}var i=[h];function j(n,o,p,q,r){return c("ReasonReact.bs").wrapJsForReason(c("MessengerMenu.react").Item,{href:c("bs_js_null_undefined").from_opt(n),label:o,onclick:c("bs_js_null_undefined").from_opt(p),target:c("bs_js_null_undefined").from_opt(q)},r)}var k=[j];function l(n){return c("ReasonReact.bs").wrapJsForReason(c("MessengerMenu.react").Separator,{},n)}var m=[l];g.Menu=i;g.MenuItem=k;g.MenuSeparator=m}),null);
__d("MessengerMuteDialogBootloaderReact.bs",["ReasonReact.bs","MessengerMuteDialogBootloader.react"],(function a(b,c,d,e,f,g){"use strict";function h(i,j,k){return c("ReasonReact.bs").wrapJsForReason(c("MessengerMuteDialogBootloader.react"),{onMute:i,onToggle:j},k)}g.make=h}),null);
__d("MessengerPopoverMenuReact.bs",["Utils.bs","ReasonReact.bs","bs_js_null_undefined","MessengerPopoverMenu.react"],(function a(b,c,d,e,f,g){"use strict";function h(i,j,k,l,m,n,o){return c("ReasonReact.bs").wrapJsForReason(c("MessengerPopoverMenu.react"),{className:c("bs_js_null_undefined").from_opt(i),disableArrowKeyActivation:c("Utils.bs").optionBoolToNullUndefinedBoolean(j),isOpen:c("Utils.bs").optionBoolToNullUndefinedBoolean(k),menu:l,onHide:c("bs_js_null_undefined").from_opt(m),onShow:c("bs_js_null_undefined").from_opt(n)},o)}g.make=h}),null);
__d("XNFXStartForMessageThreadController",["XController"],(function a(b,c,d,e,f,g){f.exports=c("XController").create("/nfx/start_message_thread/",{thread_fbid:{type:"String",required:true},responsible_fbid:{type:"Int"},av:{type:"Int"},location:{type:"Enum",enumType:1},__asyncDialog:{type:"Int"}})}),null);
__d("MessengerThreadlistRowActionsReact.bs",["cx","fbt","Keys.bs","bs_block","bs_curry","React","Utils.bs","gkx","MercuryIDs","AsyncDialog","CurrentUser","ReasonReact.bs","joinClasses","AsyncRequest","bs_js_primitive","MessengerDialogs.bs","MercuryThreadIDMap","MessengerMenuReact.bs","MessengerBlockDialogReact.bs","MessengerPopoverMenuReact.bs","MessengerIgnoreDialogReact.bs","MessengerMuteDialogBootloaderReact.bs","XNFXStartForMessageThreadController","MessengerDeleteDialogBootloaderReact.bs","MessengerMarkSpamDialogBootloaderReact.bs","MNCommerceReportConversationDialogReact.bs"],(function aa(ba,a,ca,da,ea,b,fa,c){"use strict";__p&&__p();function d(k){if(k)return 0;else return a("MessengerDialogs.bs").removeDialog(0)}function e(k){k.preventDefault();k.stopPropagation();return 0}var f=a("ReasonReact.bs").reducerComponentWithRetainedProps("MessengerThreadlistRowActionsReact"),g="_5blh _4-0h",h="_5blh _4-0h _4-0i";function i(k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,ga,ha,E,F,G,H,ia,I,ja){__p&&__p();var J=k?k[0]:"",K=function K(){return a("MessengerDialogs.bs").showDialog(function(){return a("ReasonReact.bs").element(0,0,a("MessengerDeleteDialogBootloaderReact.bs").make(s,t,d,[]))})},L=function L(){if(o)return a("bs_curry")._1(B,0);else return a("MessengerDialogs.bs").showDialog(function(){return a("ReasonReact.bs").element(0,0,a("MessengerMuteDialogBootloaderReact.bs").make(y,d,[]))})},M=function M(){if(q)return a("bs_curry")._1(v,0);else return a("bs_curry")._1(x,0)},N=function N(){return a("MessengerDialogs.bs").showDialog(function(){return a("ReasonReact.bs").element(0,0,a("MessengerMarkSpamDialogBootloaderReact.bs").make(w,d,[]))})},O=function O(){return a("MessengerDialogs.bs").showDialog(function(){return a("ReasonReact.bs").element(0,0,a("MessengerIgnoreDialogReact.bs").make(C,d,l,I.thread_fbid,+a("MercuryIDs").isGroupChat(I.thread_id),[]))})},P=function P(){if(r)return a("bs_curry")._1(ga,0);else return a("MessengerDialogs.bs").showDialog(function(){return a("ReasonReact.bs").element(0,0,a("MessengerBlockDialogReact.bs").make(D,d,l,I.thread_fbid,[]))})},Q=function Q(){var Y=a("MercuryThreadIDMap").get();Y.getServerIDFromClientID(I.thread_id,function(Z){a("AsyncDialog").send(new(a("AsyncRequest"))(a("XNFXStartForMessageThreadController").getURIBuilder().setString("thread_fbid",Z).getURI()));return 0});return 0},R=function R(){var Y=I.other_user_fbid;if(Y==null)return 0;else return a("MessengerDialogs.bs").showDialog(function(){return a("ReasonReact.bs").element(0,0,a("MNCommerceReportConversationDialogReact.bs").make(Y,[]))})},S=function S(){return[O,P,K,M,N,L,R,Q]},T=function T(){return 0},U=function U(Y){var Z=+(Y.keyCode===a("Keys.bs").$$return);if(Z!==0)return 0;else return 2},V=function V(){return 1},W=function W(Y){return[Y==null?0:[Y]]},X=f.slice();X[8]=function(Y){var Z=Y[1],$=Y[0];if(Z[3]||Z[3]!==$[3])return 1;else return+(Z[2]!==$[2])};X[9]=function(Y){var Z=Y[2],$=Y[1];if(p){var ka=n!==0?m!==0?c._("Leave Chat"):c._("Leave Room"):c._("Leave Group"),la=c._("Ignore Messages"),ma=r!==0?c._("Unblock Messages"):c._("Block Messages"),na=a("Utils.bs").isSomeTrue(G),oa=E||a("Utils.bs").isSomeTrue(G),pa=a("Utils.bs").isSomeTrue(H),qa=a("Utils.bs").isSomeTrue(H),ra=1-+a("CurrentUser").isWorkUser()&&1-r&&(F||+(I.folder==="inbox"&&a("MercuryIDs").isGroupChat(I.thread_id)&&a("gkx")("AT4mycXtTvfXJMAqrd_BSmI0_EEB-8pOs_AaNI2VArui1ThGLeffrrAudIg_2uctK6Ji6Zom3olu5BpcCU5_nD4U"))),sa=1-+a("CurrentUser").isWorkUser()&&F,ta=a("ReasonReact.bs").element(0,0,a("MessengerMenuReact.bs").Menu[0]([E!==0?a("ReasonReact.bs").element(0,0,a("MessengerMenuReact.bs").MenuItem[0](0,o!==0?c._("Unmute"):c._("Mute"),[Z[5]],0,[])):null,na!==0?a("ReasonReact.bs").element(0,0,a("MessengerMenuReact.bs").MenuItem[0](0,c._("Rename"),z,0,[])):null,oa!==0?a("ReasonReact.bs").element(0,0,a("MessengerMenuReact.bs").MenuSeparator[0]([])):null,ha!==0?a("ReasonReact.bs").element(0,0,a("MessengerMenuReact.bs").MenuItem[0](0,ka,u,0,[])):null,a("ReasonReact.bs").element(0,0,a("MessengerMenuReact.bs").MenuItem[0](0,c._("Archive"),[s],0,[])),a("ReasonReact.bs").element(0,0,a("MessengerMenuReact.bs").MenuItem[0](0,c._("Delete"),[Z[2]],0,[])),a("ReasonReact.bs").element(0,0,a("MessengerMenuReact.bs").MenuSeparator[0]([])),a("ReasonReact.bs").element(0,0,a("MessengerMenuReact.bs").MenuItem[0](0,q!==0?c._("Mark as Read"):c._("Mark as Unread"),[Z[3]],0,[])),pa!==0?null:a("ReasonReact.bs").element(0,0,a("MessengerMenuReact.bs").MenuItem[0](0,c._("Mark as Spam"),[Z[4]],0,[])),qa!==0?a("ReasonReact.bs").element(0,0,a("MessengerMenuReact.bs").MenuItem[0](0,c._("Report..."),[Z[6]],0,[])):a("ReasonReact.bs").element(0,0,a("MessengerMenuReact.bs").MenuItem[0](0,c._("Report Spam or Abuse..."),[Z[7]],0,[])),ra!==0?a("ReasonReact.bs").element(0,0,a("MessengerMenuReact.bs").MenuItem[0](0,la,[Z[0]],0,[])):null,sa!==0?a("ReasonReact.bs").element(0,0,a("MessengerMenuReact.bs").MenuItem[0](0,ma,[Z[1]],0,[])):null])),ua=+(J===""),va=ua!==0?h:a("joinClasses")(J,h);return a("React").createElement("div",{className:"_3d85"},a("ReasonReact.bs").element(0,[a("bs_curry")._1($,W)],a("MessengerPopoverMenuReact.bs").make(0,[1],[p],ta,[a("bs_curry")._1($,V)],0,[a("React").cloneElement(a("React").createElement("div",{ref:"button",className:va,role:"button",tabIndex:0,onClick:e}),{"aria-label":c._("Conversation actions")})])))}else{var wa=+(J===""),xa=wa!==0?g:a("joinClasses")(J,g);return a("React").createElement("div",{className:"_3d85"},a("React").cloneElement(a("React").createElement("div",undefined),{"aria-label":c._("Conversation actions"),className:xa,onClick:a("bs_curry")._1($,T),onKeyUp:a("bs_curry")._1($,U),role:"button",ref:"button",tabIndex:ia}))}};X[10]=S;X[11]=p;X[12]=function(Y,ja){__p&&__p();if(typeof Y==="number")switch(Y){case 0:return a("bs_block").__(4,[[O,P,K,M,N,L,R,Q],function(){return a("bs_curry")._1(A,true)}]);case 1:return a("bs_block").__(2,[function(){return a("bs_curry")._1(A,false)}]);case 2:return 0}else{var Z=Y[0];if(Z){var $=Z[0];return a("bs_block").__(2,[function(){return $.showPopover()}])}else return 0}};return X}var j=a("ReasonReact.bs").wrapReasonForJs(f,function(k){return i(a("bs_js_primitive").null_undefined_to_opt(k.className),a("bs_js_primitive").null_undefined_to_opt(k.contact),+k.isGroupChat,+k.isJoinableThread,+k.isMuted,+k.isOpen,+k.isUnread,+k.isBlocked,k.onArchive,k.onDelete,a("bs_js_primitive").null_undefined_to_opt(k.onLeaveGroup),k.onMarkRead,k.onMarkSpam,k.onMarkUnread,k.onMute,a("bs_js_primitive").null_undefined_to_opt(k.onRename),k.onToggle,k.onUnmute,k.onIgnore,k.onBlock,k.onUnblock,+k.showLeaveGroup,+k.showMute,+k.showBlock,a("Utils.bs").nullUndefinedBooleanToOptionBool(k.showRename),a("Utils.bs").nullUndefinedBooleanToOptionBool(k.showReport),k.tabIndex,k.thread,[])});b.handleReasonDialogToggle=d;b.handleClick=e;b.component=f;b.actionButtonClassesClosed=g;b.actionButtonClassesOpen=h;b.make=i;b.jsComponent=j}),null);
__d("MessengerThreadlistRowSeenHeadReact.bs",["cx","ImageReact.bs","MercuryIDs","ReasonReact.bs","joinClasses","bs_js_primitive","MercuryMessageInfo"],(function a(b,c,d,e,f,g,h){"use strict";__p&&__p();function i(m,n,o,p){__p&&__p();var q=o.snippet_sender;if(p){var r=p[0];if(r.author===m&&n.watermark>=r.timestamp&&!c("MercuryMessageInfo").isSending(r))return 1-+c("MercuryMessageInfo").hasError(r);else return 0}else if(!(q==null)&&q===m)return+(n.watermark>=o.timestamp);else return 0}var j=c("ReasonReact.bs").statelessComponent("MessengerThreadlistRowSeenHeadReact");function k(m,n,o,p,q,r,s,t){__p&&__p();var u=m?m[0]:"",v=j.slice();v[9]=function(){__p&&__p();var w=+r.is_canonical,x=r.other_user_fbid;if(n)if(w!==0)if(x==null)return null;else if(n[0])return null;else{var y=c("MercuryIDs").getParticipantIDFromUserID(s),z=c("MercuryIDs").getParticipantIDFromUserID(x),A=q.get(z),B=p.get(z);if(!(B==null)&&!(A==null)&&i(y,A,r,o))return c("ReasonReact.bs").element(0,0,c("ImageReact.bs").make([c("joinClasses")(u,"_2_a2")],0,[B.image_src],0,[B.name],0,0,[]));else return null}else return null;else return null};return v}var l=c("ReasonReact.bs").wrapReasonForJs(j,function(m){return k(c("bs_js_primitive").null_undefined_to_opt(m.className),c("bs_js_primitive").null_undefined_to_opt(m.isHidden),c("bs_js_primitive").null_undefined_to_opt(m.lastMessage),m.participants,m.readReceipts,m.thread,m.viewer,[])});g.shouldRender=i;g.component=j;g.make=k;g.jsComponent=l}),null);
__d("MessengerThreadlistRow.react",["cx","fbt","ix","Bootloader","FBRTCCore","Image.react","immutable","ImmutableObject","LinkWithHiddenURLBar.react","MercuryBlockedParticipants.bs","MercuryConfig","MercuryIDs","MercuryMessageInfo","MercuryParticipants","MercuryThreadActions","MercuryThreadSnippet.react","MercuryThreadTimestampReact.bs","MercuryThreadTitle.react","MercuryTimestamp","MessagingTag","MessengerActions","MessengerAdminGroupUtils","MessengerButtonReact.bs","MessengerDialogs.bs","MessengerPresenceStatusUtils","MessengerMessageRequestsTypedLogger","MessengerThreadImageReact.bs","MessengerThreadlistRowActionsReact.bs","MessengerThreadlistRowSeenHeadReact.bs","MessengerStateStore","MessengerURIUtils.bs","MNAdsMessageUtils","MercuryParticipantListRenderer","React","ReactDOM","RTCCallState","RTCConfig","Tooltip","FBRTCLogger","UserAgent","CurrentUser","getPageIDFromThreadID","gkx","joinClasses","messengerRTLClasses"],(function a(b,c,d,e,f,g,h,i,j){"use strict";__p&&__p();var k,l,m=c("MercuryBlockedParticipants.bs").get(),n=c("MercuryThreadTimestampReact.bs").jsComponent,o=c("MessengerButtonReact.bs").jsComponent,p=c("MessengerThreadImageReact.bs").jsComponent,q=c("MessengerThreadlistRowActionsReact.bs").jsComponent,r=c("MessengerThreadlistRowSeenHeadReact.bs").jsComponent,s=c("FBRTCLogger").Trigger,t=c("React").PropTypes,u=50,v=j("86913"),w=j("86914"),x=function x(z){var A=void 0;switch(z){case"pending":case"other":case"inbox":case"thread":A=z;break;default:A=null}return A};k=babelHelpers.inherits(y,c("React").PureComponent);l=k&&k.prototype;function y(){__p&&__p();var z,A;for(var B=arguments.length,C=Array(B),D=0;D<B;D++)C[D]=arguments[D];return A=(z=l.constructor).call.apply(z,[this].concat(C)),this.state={actionsOpen:false,participantNames:""},this.$MessengerThreadlistRow1=0,this.$MessengerThreadlistRow2=null,this.$MessengerThreadlistRow15=function(){__p&&__p();var E=c("CurrentUser").getID(),F=c("MercuryIDs").getThreadKeyfromThreadIDUserID(this.props.thread.thread_id,E);c("MercuryThreadActions").get()["delete"](this.props.thread.thread_id);if(this.props.isActive)c("MessengerActions").selectThread(null);if(this.props.showAggregation){var G=c("MessengerStateStore").getState().threadIDs;if(G){var H=G.filter(function(I){return this.props.thread.thread_id!==I}.bind(this));c("MessengerActions").selectAggregation(H)}}new(c("MessengerMessageRequestsTypedLogger"))().setAction("message_requests_delete_request").setThreadID(c("MercuryIDs").getThreadFBIDFromThreadID(this.props.thread.thread_id)).setSurface(x(this.props.folder)).setFolderType("pending").setThreadKey(F).setEntryPoint("inbox_banner").log()}.bind(this),this.$MessengerThreadlistRow16=function(E){var F=c("CurrentUser").getID(),G=c("MercuryIDs").getThreadKeyfromThreadIDUserID(this.props.thread.thread_id,F);if(!E){c("MessengerDialogs.bs").removeDialog();new(c("MessengerMessageRequestsTypedLogger"))().setAction("message_requests_decline_cancel").setThreadID(c("MercuryIDs").getThreadFBIDFromThreadID(this.props.thread.thread_id)).setSurface(x(this.props.folder)).setFolderType("pending").setThreadKey(G).setEntryPoint("inbox_banner").log()}}.bind(this),this.$MessengerThreadlistRow3=function(E){E.preventDefault();this.props.onFocus(this.props.thread.thread_id)}.bind(this),this.$MessengerThreadlistRow4=function(E){this.$MessengerThreadlistRow1++;if(this.$MessengerThreadlistRow2)return;this.$MessengerThreadlistRow2=setTimeout(function(){this.props.onSelect&&this.props.onSelect();this.$MessengerThreadlistRow1=0;this.$MessengerThreadlistRow2=null}.bind(this),1e3)}.bind(this),this.$MessengerThreadlistRow5=function(E){this.$MessengerThreadlistRow1--;if(this.$MessengerThreadlistRow1===0){clearTimeout(this.$MessengerThreadlistRow2);this.$MessengerThreadlistRow2=null}}.bind(this),this.$MessengerThreadlistRow7=function(E){this.props.onSelect()}.bind(this),this.$MessengerThreadlistRow8=function(E){if(this.props.logClickHandler){var F=this.props.thread.is_canonical?c("MercuryIDs").getUserIDFromThreadID(this.props.thread.thread_id)||"0":this.props.thread.thread_fbid;this.props.logClickHandler&&this.props.logClickHandler(F)}}.bind(this),this.$MessengerThreadlistRow14=function(E){this.setState({actionsOpen:E})}.bind(this),this.$MessengerThreadlistRow17=function(E){E.preventDefault();E.stopPropagation();var F=window.callWindow&&!window.callWindow.closed&&window.callWindow.focus;if(F)window.callWindow.focus();else{var G=this.props.thread,H=G.rtc_call_data,I=G.thread_fbid;c("FBRTCCore").startGroupCall({conferenceName:"GROUP:"+I,hasVideo:true,serverInfoData:H.server_info_data,trigger:s.MULTIWAY_THREAD_LIST_JOIN_CALL_BUTTON})}}.bind(this),A}y.prototype.componentDidMount=function(){this.getParticipantNames()};y.prototype.componentDidUpdate=function(z){__p&&__p();if(this.props.isFocused)if(!z.isFocused)if(this.props.isActionsFocused)c("ReactDOM").findDOMNode(this.refs.actions.refs.button).focus();else c("ReactDOM").findDOMNode(this.refs.link).focus();else if(!z.isActionsFocused&&this.props.isActionsFocused)c("ReactDOM").findDOMNode(this.refs.actions.refs.button).focus();else if(z.isActionsFocused&&!this.props.isActionsFocused)c("ReactDOM").findDOMNode(this.refs.link).focus();this.getParticipantNames()};y.prototype.getParticipantNames=function(){__p&&__p();if(this.state.participantNames!=="")return;var z=this.props,A=z.thread,B=z.viewer,C=A.participants||[],D=c("MercuryIDs").getParticipantIDFromUserID(B);if(C.length>1)C=C.filter(function(F){return F!=D});var E=A.custom_nickname?{}:null;if(E)for(var F in A.custom_nickname)E[F]=A.custom_nickname[F];c("MercuryParticipants").getMulti(C,function(G){var H=C.map(function(J){return G[J]}),I=new(c("MercuryParticipantListRenderer"))().setNickname(E).renderParticipantList(H);this.setState({participantNames:I})}.bind(this))};y.prototype.render=function(){var z=this.props,A=z.isActive,B=z.isActionsFocused,C=z.isTabbable,D=z.participants,E=z.thread,F=z.viewer,G=E.unread_count>0,H=c("MessengerURIUtils.bs").getURIForThreadID(E.thread_id),I=E.name?E.name:this.state.participantNames;return c("React").createElement("li",{"aria-live":G?"polite":null,"aria-relevant":A||G?"additions text":null,onFocus:this.$MessengerThreadlistRow3,className:"_5l-3 _1ht1"+(E.folder===c("MessagingTag").PENDING?" _4as3":"")+(this.props.isActive?" _1ht2":"")+(G?" _1ht3":"")+(this.state.actionsOpen?" _13aa":"")+(this.props.isMuted?" _569x":"")+(this.props.isFocused?" _23_m":"")+(G&&c("UserAgent").isBrowser("Chrome")&&c("UserAgent").isPlatform("Mac")?" _5fx8":""),onDragEnter:A?null:this.$MessengerThreadlistRow4,onDragLeave:A?null:this.$MessengerThreadlistRow5,role:"row",ref:function(J){return J&&this.props.registerThreadRefs&&this.props.registerThreadRefs(J)}.bind(this),tabIndex:-1},c("React").createElement("div",{className:"_5l-3 _1ht5",id:this.$MessengerThreadlistRow6(E.thread_id),role:"gridcell",tabIndex:-1},c("React").createElement(c("LinkWithHiddenURLBar.react"),{href:H.toString(),onClick:this.$MessengerThreadlistRow7,onAllClicks:this.$MessengerThreadlistRow8,className:"_1ht5 _2il3 _5l-3 _3itx",s:"true",ref:"link",role:"link",tabIndex:C&&!B?0:-1},c("React").createElement("div",babelHelpers["extends"]({},c("Tooltip").propsFor(I,"right","center"),{"data-tooltip-root-class":"_33g_","aria-hidden":true,className:"_1qt3 _5l-3"}),c("React").createElement(p,{isPresenceForWork:this.props.isPresenceForWork,participants:D,size:u,thread:E,viewer:F})),c("React").createElement("div",{className:"_1qt4 _5l-m"},c("React").createElement("div",{className:"_1qt5 _5l-3"},c("React").createElement(c("MercuryThreadTitle.react"),{className:"_1ht6",showUnreadCount:false,thread:E,useShortName:false,viewer:F}),c("React").createElement("div",null,c("MNAdsMessageUtils").isAdsMessageRequest(E)?c("MNAdsMessageUtils").renderAdsMessageRequestStatus():this.$MessengerThreadlistRow9(E))),c("React").createElement("div",{className:"_1qt5 _5l-3"},c("React").createElement(c("MercuryThreadSnippet.react"),{className:c("joinClasses")("_1htf",c("messengerRTLClasses")(E.snippet,true)),participants:D,shouldRenderYou:true,thread:E,viewer:F})),this.$MessengerThreadlistRow10(),this.$MessengerThreadlistRow11()))),this.$MessengerThreadlistRow12())};y.prototype.$MessengerThreadlistRow12=function(){if(this.props.showActions===false)return null;var z=this.props,A=z.isActionsFocused,B=z.isTabbable,C=z.participants,D=z.thread,E=z.viewer,F=c("MessengerPresenceStatusUtils").getStatusFromCanonicalThread(this.props.participants,D),G=F&&F.contact,H=m.isMessageBlocked(D),I=c("MessengerAdminGroupUtils").isJoinableThread(D),J=c("MessengerAdminGroupUtils").isGroupChat(D),K=D.unread_count>0;return c("React").createElement("div",{role:"gridcell"},c("React").createElement("div",{"aria-describedby":this.$MessengerThreadlistRow6(D.thread_id),"aria-haspopup":"true","aria-label":i._("Actions"),className:"_2j6 _5l-3",tabIndex:B&&A?0:-1,role:"button"},c("React").createElement(r,{className:"_5bli",isHidden:this.state.actionsOpen,lastMessage:this.props.lastMessage,participants:C,readReceipts:this.props.readReceipts,thread:D,viewer:E}),this.$MessengerThreadlistRow13(),c("React").createElement(q,{contact:G,isGroupChat:J,isJoinableThread:I,isMuted:this.props.isMuted,isOpen:this.state.actionsOpen,isUnread:K,isBlocked:H,onArchive:this.props.onArchiveSetting,onDelete:this.props.onDelete,onLeaveGroup:this.props.onLeaveGroup,onMarkRead:this.props.onMarkRead,onMarkSpam:this.props.onMarkSpam,onMarkUnread:this.props.onMarkUnread,onMute:this.props.onMute,onToggle:this.$MessengerThreadlistRow14,onUnmute:this.props.onUnmute,onIgnore:this.props.onIgnore,onBlock:this.props.onBlock,onUnblock:this.props.onUnblock,showLeaveGroup:this.props.showLeaveGroup,showMute:true,showIgnoreGroup:c("gkx")("AT4mycXtTvfXJMAqrd_BSmI0_EEB-8pOs_AaNI2VArui1ThGLeffrrAudIg_2uctK6Ji6Zom3olu5BpcCU5_nD4U"),showBlock:D.is_canonical_user&&D.other_user_fbid&&E!==D.other_user_fbid,showReport:c("getPageIDFromThreadID")(this.props.thread.thread_id),tabIndex:-1,thread:D,ref:"actions"}),c("React").createElement("div",{className:"_56ck"})))};y.prototype.$MessengerThreadlistRow13=function(){var z=this.props.lastMessage;if(this.state.actionsOpen||!z)return null;var A=c("MercuryMessageInfo").isSending(z),B=c("MercuryMessageInfo").hasError(z);if(!A&&!B)return null;return c("React").createElement(c("Image.react"),{className:"_wtw"+(A?" _3qh2":""),src:A?w:v})};y.prototype.$MessengerThreadlistRow9=function(z){return c("React").createElement(n,{className:"_1ht7",time:z.timestamp,title:c("MercuryTimestamp").getAbsoluteTimestamp(z.timestamp),text:c("MercuryTimestamp").getRelativeTimestamp(z.timestamp)})};y.prototype.$MessengerThreadlistRow10=function(){__p&&__p();if(this.props.thread.folder!==c("MessagingTag").PENDING||!c("MercuryConfig").EPB)return null;var z=c("CurrentUser").getID(),A=c("MercuryIDs").getThreadKeyfromThreadIDUserID(this.props.thread.thread_id,z);return c("React").createElement("div",{className:"_5l-3"},c("React").createElement(o,{className:"_3yvh",type:"primary",label:i._("Accept"),onClick:function(B){__p&&__p();B.preventDefault();B.stopPropagation();if(this.props.showAggregation){var C=c("MessengerStateStore").getState().threadIDs;if(C){var D=C.filter(function(E){return this.props.thread.thread_id!==E}.bind(this));c("MessengerActions").selectAggregation(D)}}c("MercuryThreadActions").get().changeFolder(this.props.thread.thread_id,c("MessagingTag").INBOX);new(c("MessengerMessageRequestsTypedLogger"))().setAction("message_requests_accept_request").setThreadID(c("MercuryIDs").getThreadFBIDFromThreadID(this.props.thread.thread_id)).setSurface(x(this.props.folder)).setFolderType("pending").setThreadKey(A).setEntryPoint("inbox_banner").log()}.bind(this)}),c("React").createElement(o,{className:"_3yvh _1d-z",type:"faded",label:i._("Decline"),onClick:function(B){B.preventDefault();B.stopPropagation();c("Bootloader").loadModules(["MessengerDeclineDialogReact.bs"],function(C){var D=C.jsComponent,E=c("MercuryIDs").isGroupChat(this.props.thread.thread_id);c("MessengerDialogs.bs").showDialog(function(){return c("React").createElement(D,{onBlock:this.props.onBlock,onDelete:this.$MessengerThreadlistRow15,onToggle:this.$MessengerThreadlistRow16,isGroupChat:E})}.bind(this));new(c("MessengerMessageRequestsTypedLogger"))().setAction("message_requests_decline_attempt").setThreadID(c("MercuryIDs").getThreadFBIDFromThreadID(this.props.thread.thread_id)).setSurface(x(this.props.folder)).setFolderType("pending").setThreadKey(A).setEntryPoint("inbox_banner").log()}.bind(this),"MessengerThreadlistRow.react")}.bind(this)}))};y.prototype.$MessengerThreadlistRow11=function(){if(!c("RTCConfig").RtcConferencingGK||!this.props.thread.rtc_call_data||this.props.thread.rtc_call_data.call_state===c("RTCCallState").NO_ONGOING_CALL)return null;var z=window.callWindow&&!window.callWindow.closed?i._("Return to Call"):i._("Join Call");return c("React").createElement(o,{className:"_4ry5",label:z,onClick:this.$MessengerThreadlistRow17,type:"primary"})};y.prototype.$MessengerThreadlistRow6=function(z){return"row_header_id_"+z};y.propTypes={isActive:t.bool.isRequired,isActionsFocused:t.bool,isFocused:t.bool,isMuted:t.bool.isRequired,isPresenceForWork:t.bool,lastMessage:t.instanceOf(c("ImmutableObject")),logClickHandler:t.func,onArchive:t.func.isRequired,onArchiveSetting:t.func.isRequired,onDelete:t.func.isRequired,onMarkRead:t.func.isRequired,onMarkSpam:t.func.isRequired,onMarkUnread:t.func.isRequired,onMute:t.func.isRequired,onSelect:t.func.isRequired,onUnmute:t.func.isRequired,onIgnore:t.func.isRequired,onBlock:t.func.isRequired,onUnblock:t.func.isRequired,participants:t.instanceOf(c("immutable").Map).isRequired,readReceipts:t.instanceOf(c("immutable").OrderedMap).isRequired,registerThreadRefs:t.func,showAggregation:t.bool,thread:t.instanceOf(c("ImmutableObject")).isRequired,viewer:t.string.isRequired};f.exports=y}),null);
__d("MessengerConfirmBlockThreadDialogReact.bs",["fbt","ReasonReact.bs","MessengerDialogs.bs","MessengerDialogReact.bs","MessengerDialogBodyReact.bs"],(function a(b,c,d,e,f,g,h){"use strict";__p&&__p();var i=c("ReasonReact.bs").statelessComponent("MessengerConfirmBlockThreadDialogReact");function j(l,m){var n=function n(q){if(q)return 0;else return c("MessengerDialogs.bs").removeDialog(0)},o=function o(){return n(false)},p=i.slice();p[9]=function(){return c("ReasonReact.bs").element(0,0,c("MessengerDialogReact.bs").Dialog[0](0,n,0,0,0,0,0,[c("ReasonReact.bs").element(0,0,c("MessengerDialogReact.bs").Header[0](0,0,h._("You have blocked {sender name}",[h.param("sender name",l)]))),c("ReasonReact.bs").element(0,0,c("MessengerDialogBodyReact.bs").make(0,[h._("You can access people you've blocked by going to the filtered requests list.")])),c("ReasonReact.bs").element(0,0,c("MessengerDialogReact.bs").Footer[0](0,0,[c("ReasonReact.bs").element(0,0,c("MessengerDialogReact.bs").Button[0](0,[h._("OK")],0,0,[o],[1],0,0,[]))]))]))};return p}var k=c("ReasonReact.bs").wrapReasonForJs(i,function(l){return j(l.participantName,[])});g.component=i;g.make=j;g.jsComponent=k}),null);
__d("MessengerConfirmLeaveGroupDialogReact.bs",["bs_curry","bs_js_boolean","ReasonReact.bs","MessengerDialogs.bs","MessengerDialogReact.bs","MessengerAdminGroupUtils","MessengerDialogBodyReact.bs"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();var h=c("ReasonReact.bs").statelessComponent("MessengerConfirmLeaveGroupDialogReact");function i(l){if(l)return 0;else return c("MessengerDialogs.bs").removeDialog(0)}function j(l,m,n,o){var p=function p(o,r){c("bs_curry")._1(m,0);return c("MessengerDialogs.bs").removeDialog(0)},q=h.slice();q[9]=function(r){var s=c("bs_js_boolean").to_js_boolean(l),t=c("MessengerAdminGroupUtils").getLeaveGroupBodyText(s,n),u=c("MessengerAdminGroupUtils").getLeaveGroupButtonText(s,n),v=c("MessengerAdminGroupUtils").getLeaveGroupTitleText(s,n);return c("ReasonReact.bs").element(0,0,c("MessengerDialogReact.bs").Dialog[0](0,i,0,0,0,0,0,[c("ReasonReact.bs").element(0,0,c("MessengerDialogReact.bs").Header[0](0,0,v)),c("ReasonReact.bs").element(0,0,c("MessengerDialogBodyReact.bs").make(0,[t])),c("ReasonReact.bs").element(0,0,c("MessengerDialogReact.bs").Footer[0](0,0,[c("ReasonReact.bs").element(0,0,c("MessengerDialogReact.bs").CancelButton[0](0,[])),c("ReasonReact.bs").element(0,0,c("MessengerDialogReact.bs").Button[0](0,[u],0,["danger"],[c("bs_curry")._1(r[0],p)],[0],0,0,[]))]))]))};return q}var k=c("ReasonReact.bs").wrapReasonForJs(h,function(l){return j(+l.isViewerAdmin,l.onLeave,l.thread,[])});g.component=h;g.handleToggle=i;g.make=j;g.jsComponent=k}),null);
__d("MessengerThreadlistRowContainer.react",["fbt","IgnoreMessagesTypedLogger","ImmutableObject","MercuryConfig","MercuryIDs","MercuryLogMessageType","MercuryMessageActions","MercuryMessageObject","MercuryMessages","MercuryParticipants","MercuryRoger.bs","MercuryThreadActions","MercuryThreadInfo","MercuryThreadlistRowContainer.react","MercuryTriodeSourceUtil","MessagingSourceEnum","MessengerActions","MessengerDialogs.bs","MessengerConfirmLeaveGroupDialogReact.bs","MessengerConfirmBlockThreadDialogReact.bs","MessengerBlockDialogReact.bs","MessageRequestUtils","MessengerAdminGroupUtils","MessengerMessageRequestsTypedLogger","MessengerThreadlistRow.react","MessagingTag","MNPlatformTagsDataManager","ReactComponentWithPureRenderMixin","React","ReactDOM","StoreAndPropBasedStateMixin","CurrentUser"],(function a(b,c,d,e,f,g,h){"use strict";__p&&__p();var i=c("MercuryRoger.bs").get(),j=c("MessengerConfirmLeaveGroupDialogReact.bs").jsComponent,k=c("MessengerConfirmBlockThreadDialogReact.bs").jsComponent,l=c("MessengerBlockDialogReact.bs").jsComponent,m=c("React").PropTypes,n=c("React").createClass({displayName:"MessengerThreadlistRowContainer",mixins:[c("ReactComponentWithPureRenderMixin"),c("StoreAndPropBasedStateMixin")(c("MercuryMessages"),i)],propTypes:{isActive:m.bool.isRequired,isTabbable:m.bool,folder:m.string,onOverrideSelect:m.func,showAggregation:m.bool,showActions:m.bool,thread:m.instanceOf(c("ImmutableObject")).isRequired,viewer:m.string.isRequired},statics:{calculateState:function o(p){var q=c("MercuryMessages").getForFBID(p.viewer),r=p.thread.thread_id,s=q.getThreadMessagesRangeNow(r,0,1)[0];return{lastMessage:s||null,readReceipts:i.getSeenTimestamps(r)}}},componentDidUpdate:function o(p){if(this.props.isActive&&!p.isActive)this.props.onScrollIntoView(c("ReactDOM").findDOMNode(this))},render:function o(){return c("React").createElement(c("MercuryThreadlistRowContainer.react"),babelHelpers["extends"]({},this.props,{ChildClass:c("MessengerThreadlistRow.react"),isMuted:c("MercuryThreadInfo").isMuted(this.props.thread),lastMessage:this.state.lastMessage,onArchive:this._handleArchive,onArchiveSetting:this._handleArchiveFromSetting,onDelete:this._handleDelete,onLeaveGroup:this._handleLeaveGroup,onMarkRead:this._handleMarkRead,onMarkSpam:this._handleMarkSpam,onMarkUnread:this._handleMarkUnread,onMute:this._handleMute,onSelect:this._handleSelect,onUnmute:this._handleUnmute,onIgnore:this._handleIgnore,onBlock:this._handleBlockFromSettingOrDecline,onUnblock:this._handleUnblock,readReceipts:this.state.readReceipts,showActions:this.props.showActions,showLeaveGroup:this.props.thread.is_subscribed&&!this.props.thread.is_canonical}))},_handleArchiveFromSetting:function o(){var p=this.props.isActive;this._getThreadActions().archive(this.props.thread.thread_id);p&&c("MessengerActions").selectThread(null)},_handleArchive:function o(){if(c("MercuryConfig").WMBF)this._handleBlockFromSettingOrDecline();else{var p=this.props.isActive;this._getThreadActions().archive(this.props.thread.thread_id);p&&c("MessengerActions").selectThread(null)}},_handleDelete:function o(){var p=this.props.isActive;this._getThreadActions()["delete"](this.props.thread.thread_id);p&&c("MessengerActions").selectThread(null)},_handleMarkRead:function o(){this._getThreadActions().markRead(this.props.thread.thread_id)},_handleMarkSpam:function o(){var p=this.props.isActive;this._getThreadActions().markSpam(this.props.thread.thread_id);p&&c("MessengerActions").selectThread(null)},_handleMarkUnread:function o(){this._getThreadActions().markUnread(this.props.thread.thread_id)},_handleMute:function o(p){this._getThreadActions().updateMuteSetting(this.props.thread.thread_id,p)},_handleSelect:function o(){__p&&__p();var p=c("CurrentUser").getID(),q=c("MercuryIDs").getThreadKeyfromThreadIDUserID(this.props.thread.thread_id,p);if(this.props.onOverrideSelect){this.props.onOverrideSelect(this.props.thread);return}c("MessengerActions").selectThread(this.props.thread.thread_id);var r=c("MercuryIDs").getUserIDFromThreadID(this.props.thread.thread_id),s=void 0;switch(this.props.folder){case"inbox":s="inbox";break;case"pending":s="pending";break;case"other":s="other";break}if(this.props.thread.folder!==c("MessagingTag").INBOX)new(c("MessengerMessageRequestsTypedLogger"))().setAction("message_requests_thread_open").setThreadID(r).setSurface(s).setFolderType(this.props.thread.folder).setThreadKey(q).log();c("MNPlatformTagsDataManager").updateThreadTabAfterSelectThread(c("MessagingSourceEnum").MESSENGER_WEB_SEARCH,r)},_handleUnmute:function o(){this._getThreadActions().unmute(this.props.thread.thread_id)},_handleLeaveGroup:function o(){var p,q=this;if(this.props.viewer)(function(){var r=c("MessengerAdminGroupUtils").isViewerAdmin(q.props.thread.admin_ids,q.props.viewer);c("MessengerDialogs.bs").showDialog(function(){return c("React").createElement(j,{onLeave:this._onLeaveGroupConfirm,isViewerAdmin:r,thread:this.props.thread})}.bind(q))})()},_handleIgnore:function o(){var p=this.props.isActive;this._getThreadActions().changeFolder(this.props.thread.thread_id,"other");p&&c("MessengerActions").selectThread(null);new(c("IgnoreMessagesTypedLogger"))().setEvent("ignore_confirmed").setThreadID(this.props.thread.thread_fbid).setPlatform("messengerdotcom").log()},_handleBlockFromSettingOrDecline:function o(){__p&&__p();var p,q=this,r=this.props.thread.thread_id;if(c("MercuryConfig").WMBF){var p=function(){var s=c("MercuryIDs").isGroupChat(r);if(s){q._handleIgnore();return{v:void 0}}var t=c("MercuryParticipants").getNow(c("MercuryIDs").getParticipantIDFromUserID(q.props.thread.other_user_fbid)),u=t&&t.short_name||h._("sender");c("MessengerDialogs.bs").showDialog(function(){return c("React").createElement(l,{onBlock:function(){this._handleConfirmBlock(u)}.bind(this),contact:t,onToggle:this._handleBlockDialogToggle})}.bind(q))}();if(typeof p==="object")return p.v}else this._getThreadActions().blockOnMessengerDotCom(r)},_handleBlockDialogToggle:function o(){c("MessengerDialogs.bs").removeDialog()},_handleConfirmBlock:function o(p){var q=this.props.thread.thread_id;if(q)this._getThreadActions().blockIgnoreOnMessengerDotCom(this.props.isActive,q,function(){this._handleAfterBlock(p)}.bind(this))},_handleAfterBlock:function o(p){var q=this.props.thread;c("MessengerDialogs.bs").showDialog(function(){return c("React").createElement(k,{participantName:p})});var r=c("MercuryIDs").getThreadKeyfromThreadIDUserID(q.thread_id,c("CurrentUser").getID()),s=!!q&&c("MessageRequestUtils").isFiltered(q);new(c("MessengerMessageRequestsTypedLogger"))().setAction("message_requests_block_request").setThreadID(c("MercuryIDs").getThreadFBIDFromThreadID(q.thread_id)).setSurface("thread").setFolderType(s?c("MessagingTag").OTHER:c("MessagingTag").PENDING).setThreadKey(r).setEntryPoint(null).log()},_handleUnblock:function o(){this._getThreadActions().unblockOnMessengerDotCom(this.props.thread.thread_id)},_onLeaveGroupConfirm:function o(){if(!c("MercuryThreadInfo").isEmptyLocalThread(this.props.thread)){var p=this._getMessageObject().constructLogMessageObject(c("MercuryTriodeSourceUtil").getMercuryTriodeSource(),this.props.thread.thread_id,c("MercuryLogMessageType").UNSUBSCRIBE,{removed_participants:[c("MercuryIDs").getParticipantIDFromUserID(this.props.viewer)]});this._getMessageActions().send(p)}},_getThreadActions:function o(){return c("MercuryThreadActions").getForFBID(this.props.viewer)},_getMessageActions:function o(){return c("MercuryMessageActions").getForFBID(this.props.viewer)},_getMessageObject:function o(){return c("MercuryMessageObject").getForFBID(this.props.viewer)}});f.exports=n}),null);
__d("AbstractCheckboxInputReact.bs",["bs_js_boolean","ReasonReact.bs","AbstractCheckboxInput.react"],(function a(b,c,d,e,f,g){"use strict";function h(i,j,k,l){return c("ReasonReact.bs").wrapJsForReason(c("AbstractCheckboxInput.react"),{className:i,checked:c("bs_js_boolean").to_js_boolean(j),onChange:k},l)}g.make=h}),null);
__d("AbstractPopoverButtonReact.bs",["ReasonReact.bs","bs_js_null_undefined","AbstractPopoverButton.react"],(function a(b,c,d,e,f,g){"use strict";function h(i,j,k,l,m,n){return c("ReasonReact.bs").wrapJsForReason(c("AbstractPopoverButton.react"),{config:c("bs_js_null_undefined").from_opt(i),haschevron:c("bs_js_null_undefined").from_opt(j),image:c("bs_js_null_undefined").from_opt(k),label:c("bs_js_null_undefined").from_opt(l),maxwidth:c("bs_js_null_undefined").from_opt(m)},n)}g.make=h}),null);
__d("ArchiveWarningReact.bs",["cx","React","ReasonReact.bs","TooltipData","bs_js_primitive","bs_js_null_undefined"],(function a(b,c,d,e,f,g,h){"use strict";__p&&__p();var i=c("ReasonReact.bs").statelessComponent("ArchiveWarningReact");function j(l,m){var n=i.slice();n[9]=function(){var o=c("TooltipData").propsFor("All employee-to-employee conversations will be archived","above");if(l!==0){var p=c("React").createElement("i",{className:"_3olv _14lt"});return c("React").cloneElement(c("React").createElement("div",{className:"_3a61"},p),{"data-tooltip-content":c("bs_js_null_undefined").from_opt(c("bs_js_primitive").undefined_to_opt(o["data-tooltip-content"])),"data-hover":c("bs_js_null_undefined").from_opt(c("bs_js_primitive").undefined_to_opt(o["data-hover"])),"data-tooltip-position":c("bs_js_null_undefined").from_opt(c("bs_js_primitive").undefined_to_opt(o["data-tooltip-position"]))})}else return null};return n}var k=c("ReasonReact.bs").wrapReasonForJs(i,function(l){return j(+l.shown,[])});g.component=i;g.make=j;g.jsComponent=k}),null);
__d("Bootload.bs",["bs_curry"],(function a(b,c,d,e,f,g){"use strict";function h(i){var j=function j(k){return c("bs_curry")._1(i[0],function(l){return c("bs_curry")._1(k,l.bootloadable)})};return[j]}g.Create=h}),null);
__d("ChatEmojiSkinTonePreferencePickerReact.bs",["ReasonReact.bs","ChatEmojiSkinTonePreferencePicker.react"],(function a(b,c,d,e,f,g){"use strict";function h(i,j,k){return c("ReasonReact.bs").wrapJsForReason(c("ChatEmojiSkinTonePreferencePicker.react"),{currentPreference:i,onSelect:j},k)}g.make=h}),null);
__d("ChatSidebarSheetReact.bs",["ReasonReact.bs","ChatSidebarSheet.react"],(function a(b,c,d,e,f,g){"use strict";function h(i,j){return c("ReasonReact.bs").wrapJsForReason(c("ChatSidebarSheet.react"),{className:i},j)}g.make=h}),null);
__d("MercuryThreadTitleReact.bs",["Utils.bs","ReasonReact.bs","bs_js_null_undefined","MercuryThreadTitle.react"],(function a(b,c,d,e,f,g){"use strict";function h(i,j,k,l,m,n,o,p,q){return c("ReasonReact.bs").wrapJsForReason(c("MercuryThreadTitle.react"),{className:c("bs_js_null_undefined").from_opt(i),maxTitle:c("bs_js_null_undefined").from_opt(j),thread:k,viewer:l,isNewThread:c("Utils.bs").optionBoolToNullUndefinedBoolean(m),showUnreadCount:c("Utils.bs").optionBoolToNullUndefinedBoolean(n),useShortName:c("Utils.bs").optionBoolToNullUndefinedBoolean(o),useAndSeparator:c("Utils.bs").optionBoolToNullUndefinedBoolean(p)},q)}g.make=h}),null);
__d("MessageRequestLogger.bs",["MessengerMessageRequestsTypedLogger"],(function a(b,c,d,e,f,g){"use strict";function h(i,j,k){new(c("MessengerMessageRequestsTypedLogger"))().setSurface("inbox").setFolderType(k).setAction("message_requests_thread_impression").addToExtraData("threads",i).setThreadKeyList(j).log();return 0}g.logItemImpression=h}),null);
__d("MessengerChatOnOffToggleReact.bs",["cx","fbt","bs_curry","React","LinkReact.bs","bs_js_boolean","ReasonReact.bs"],(function a(b,c,d,e,f,g,h,i){"use strict";__p&&__p();var j=c("ReasonReact.bs").statelessComponent("MessengerChatOnOffToggleReact");function k(l,m,n){var o=function o(n,q){if(m)return c("bs_curry")._1(m[0],c("bs_js_boolean").to_js_boolean(1-l));else return 0},p=j.slice();p[9]=function(q){var r=l!==0?i._("Go Offline"):i._("Go Online");return c("ReasonReact.bs").element(0,0,c("LinkReact.bs").make([r],0,["tooltip"],[r],["center"],["above"],0,0,[c("bs_curry")._1(q[0],o)],0,0,0,0,0,0,0,c("React").createElement("div",{className:"_3dwl"+(l?" _337l":"")},c("React").createElement("div",{className:"_3dwf"+(l?" _3dwk":"")}))))};return p}g.component=j;g.make=k}),null);
__d("MessengerCheckboxInputReact.bs",["cx","ReasonReact.bs","AbstractCheckboxInputReact.bs"],(function a(b,c,d,e,f,g,h){"use strict";var i=c("ReasonReact.bs").statelessComponent("MessengerCheckboxInputReact");function j(k,l,m){var n=i.slice();n[9]=function(){return c("ReasonReact.bs").element(0,0,c("AbstractCheckboxInputReact.bs").make("_55sg _4ng2",k,l,[]))};return n}g.component=i;g.make=j}),null);
__d("MessengerCustomColorUtils.bs",["cssVar","CurrentUser"],(function a(b,c,d,e,f,g,h){"use strict";__p&&__p();function i(j){__p&&__p();var k=j.custom_color,l=0;if(k==null)l=1;else if(k==="")l=1;else return k;if(l===1){var m=+c("CurrentUser").isWorkUser();if(m!==0)return"#1479fb";else return"#0084ff"}}g.customColorOrBlue=i}),null);
__d("MessengerDeleteAllMenuBootloaderReact.bs",["ReasonReact.bs","MessengerDeleteAllMenuBootloader.react"],(function a(b,c,d,e,f,g){"use strict";function h(i,j,k,l,m,n){return c("ReasonReact.bs").wrapJsForReason(c("MessengerDeleteAllMenuBootloader.react"),{filter:i,folder:j,viewer:k,threadIDs:l,aggregationView:m},n)}g.make=h}),null);
__d("MessengerInfoPanelButtonReact.bs",["React"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();var h={height:"32px",width:"32px"};function i(l){return c("React").createElement("svg",{viewBox:"0 0 64 64"},c("React").createElement("g",undefined,c("React").createElement("g",undefined,c("React").createElement("path",{style:{fill:l},d:"M32,10c-12.2,0-22,9.8-22,22s9.8,22,22,22s22-9.8,22-22S44.2,10,32,10z M32,19c1.6,0,3,1.4,3,3s-1.4,3-3,3 c-1.6,0-3-1.4-3-3S30.4,19,32,19z M36,45h-2h-4h-2v-1h2V29h-2v-1h2h4v1v15h2V45z"}))))}function j(l){var m={fill:l};return c("React").createElement("svg",{style:{stroke:l},viewBox:"0 0 64 64"},c("React").createElement("g",undefined,c("React").createElement("polygon",{style:m,points:"34,44 34,29 34,28 30,28 28,28 28,29 30,29 30,44 28,44 28,45 30,45 34,45 36,45 36,44"}),c("React").createElement("circle",{style:m,cx:"32",cy:"22",r:"3"})),c("React").createElement("path",{style:{fill:"none",stroke:l,strokeMiterlimit:"10",strokeWidth:"2"},d:"M32,11c11.6,0,21,9.4,21,21s-9.4,21-21,21s-21-9.4-21-21S20.4,11,32,11z"}))}function k(l,m){return c("React").createElement("div",{style:h},m!==0?j(l):i(l))}g.svgWrapperStyle=h;g.selected=i;g.notSelected=j;g.make=k}),null);
__d("MessengerPresenceStatusReact.bs",["fbt","React","ReasonReact.bs","bs_js_primitive"],(function a(b,c,d,e,f,g,h){"use strict";__p&&__p();var i=c("ReasonReact.bs").statelessComponent("MessengerPresenceStatusReact");function j(l,m,n,o,p){__p&&__p();var q=i.slice();q[9]=function(){__p&&__p();var r,s=0;if(m!==0&&o)r=h._("Active on {platform}",[h.param("platform",o[0])]);else s=1;if(s===1)r=n?h._("Active {time} ago",[h.param("time",n[0])]):null;var t={};if(l)t.className=l[0];return c("React").createElement("span",t,r)};return q}var k=c("ReasonReact.bs").wrapReasonForJs(i,function(l){return j(c("bs_js_primitive").null_undefined_to_opt(l.className),+l.isUserActive,c("bs_js_primitive").null_undefined_to_opt(l.lastActive),c("bs_js_primitive").null_undefined_to_opt(l.platform),[])});g.component=i;g.make=j;g.jsComponent=k}),null);
__d("MessengerRTCCallButtonReact.bs",["bs_js_boolean","ReasonReact.bs","MessengerRTCCallButton.react"],(function a(b,c,d,e,f,g){"use strict";function h(i,j,k,l,m,n,o,p,q){return c("ReasonReact.bs").wrapJsForReason(c("MessengerRTCCallButton.react"),{className:i,customColor:j,isVideo:c("bs_js_boolean").to_js_boolean(k),participants:l,thread:m,threadID:n,viewer:o,calleeName:p},q)}g.make=h}),null);
__d("MontageThreadViewContainerReact.bs",["ReasonReact.bs","bs_js_null_undefined","MontageThreadViewContainer.react"],(function a(b,c,d,e,f,g){"use strict";function h(i,j,k){return c("ReasonReact.bs").wrapJsForReason(c("MontageThreadViewContainer.react"),{threadID:i,onResize:c("bs_js_null_undefined").from_opt(j)},k)}g.make=h}),null);
__d("messengerCalculateTruncationState",["Style"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();function h(i,j,k,l,m){__p&&__p();if(!l||!j)return;var n=m?m.offsetWidth:0,o=Math.ceil(.5*(i.offsetWidth+l.offsetWidth)),p=i.offsetWidth-k.offsetWidth-12;if(o<=p){c("Style").set(i,"text-align","center");c("Style").set(j,"width","auto");c("Style").set(j,"margin-left","auto")}else{if(document.body.dir==="rtl")c("Style").set(i,"text-align","right");else{c("Style").set(i,"text-align","left");c("Style").set(j,"margin-left",n+"px")}var q=Math.max(i.offsetWidth-n-k.offsetWidth-11,0);c("Style").set(j,"width",q+"px")}}f.exports=h}),null);
__d("MessengerDetailViewHeaderReact.bs",["cx","fbt","bs_curry","Event","React","Utils.bs","gkx","Bootload.bs","ReactDOM","debounce","LinkReact.bs","RTCConfig","Bootloader","bs_js_boolean","ReasonReact.bs","FBRTCSupport","bs_js_primitive","MercuryConfig","MessengerDomIDs.bs","bs_js_null_undefined","MercuryThreadInfo","ArchiveWarningReact.bs","MercuryParticipantTypes","MercuryThreadTitleReact.bs","MessengerLocalTimeReact.bs","WorkFocusModeController","MessengerCustomColorUtils.bs","MessengerJoinableModeType","MessengerWebDriverTestIDs","MessengerRTCCallButtonReact.bs","MessengerPresenceStatusReact.bs","MessengerInfoPanelButtonReact.bs","MontageThreadViewContainerReact.bs","messengerCalculateTruncationState"],(function a(b,c,d,e,f,g,h,i){"use strict";__p&&__p();var j=c("WorkFocusModeController").MessengerWorkAvailabilityStatus;function k(A){c("Bootloader").loadModules(["BootloadableMessengerUserControlsButtonReact.bs"],A,"MessengerDetailViewHeaderReact.bs");return 0}var l=[k],m=c("Bootload.bs").Create(l);function n(A){var B=c("bs_js_null_undefined").from_opt(A[0][0]),C=c("bs_js_null_undefined").from_opt(A[1][0]),D=c("bs_js_null_undefined").from_opt(A[2][0]),E=c("bs_js_null_undefined").from_opt(A[3][0]),F=c("bs_js_null_undefined").from_opt(A[4][0]);return c("messengerCalculateTruncationState")(B,C,D,E,F)}function o(A,B){B[2][3][0]=A==null?0:[c("ReactDOM").findDOMNode(A)];return 0}function p(A,B){B[2][1][0]=A==null?0:[A];return 0}function q(A,B){B[2][0][0]=A==null?0:[A];return 0}function r(A,B){B[2][2][0]=A==null?0:[A];return 0}function s(A,B){B[2][4][0]=A==null?0:[A];return 0}function t(A,B){if(A.has_montage&&c("MercuryConfig").MontageThreadViewer)return c("React").createElement("div",{ref:c("bs_curry")._1(B[0],s),className:"_1cwz"},c("ReasonReact.bs").element(0,0,c("MontageThreadViewContainerReact.bs").make(A.thread_id,0,[])));else return null}function u(A,B,C,D){__p&&__p();if(A){var E=A[0],F=+(E.contact.type===c("MercuryParticipantTypes").PAGE);if(F&&c("gkx")("AT6mUVDD74IWOTG0apJZF1LePh7SrhTQTrb19q8AoflSv5-DHG9ZPR3YfgtHmrA5yQIw4oTG7io_Cp0zzeQ4tvCvUxrq6ExcZIsaJQRg7A8JWA")){var G=D[2][5][0],H;if(G){var I=E.contact.is_messenger_blocked,J=E.contact.is_subscribed_to_page_updates,K=E.contact.fbid;H=c("ReasonReact.bs").element(0,0,c("bs_curry")._7(G[0][8],"_3xb9 _30yy",I,J,K,B,C,[]))}else H=null;return c("React").createElement("li",undefined,H)}else return null}else return null}function v(A,B){__p&&__p();var C=B.filter(function(F,G,H){if(F==null)return false;else{var D=F.fbid;if(D==null)return false;else return c("bs_js_boolean").to_js_boolean(+(D!==A))}}),D=C.count(),E=C.first();if(D!==1||E==null)return null;else return c("ReasonReact.bs").element(0,0,c("MessengerLocalTimeReact.bs").make("_5eu7",c("bs_js_primitive").null_undefined_to_opt(E.timezone),[]))}function w(A,B,C){var D=+(c("FBRTCSupport").isWebrtcSupported()&&c("FBRTCSupport").isOSSupported()),E=A?+(A[0].contact.type===c("MercuryParticipantTypes").PAGE):0,F=B?+(B[0].joinable_mode===c("MessengerJoinableModeType").JOINABLE):0,G;if(B){var H=B[0];G=+(H.participants.length>1)&&+c("MercuryThreadInfo").canReply(H)&&(+H.is_canonical||C&&+c("RTCConfig").RtcConferencingVideoGK||1-C&&c("RTCConfig").RtcConferencingGK)}else G=0;if(D&&!E&&!F)return G;else return 0}var x=c("ReasonReact.bs").reducerComponent("MessengerDetailViewHeaderReact");function y(A,B,C,D,E,F,G,H){__p&&__p();var I=function I(){if(w(A,F,0))if(F){var L=F[0],M=L.thread_id;return c("React").createElement("li",undefined,c("ReasonReact.bs").element(0,0,c("MessengerRTCCallButtonReact.bs").make("_30yy",c("MessengerCustomColorUtils.bs").customColorOrBlue(L),0,E,L,M,G,A?A[0].contact.name:"",[])))}else return null;else return null},J=function J(){__p&&__p();if(w(A,F,1))if(F){var L=F[0],M=L.thread_id,N;if(A){var O=+A[0].isUserActive;N=O!==0?"_3qfl":""}else N="";return c("React").createElement("li",undefined,c("ReasonReact.bs").element(0,0,c("MessengerRTCCallButtonReact.bs").make("_30yy",c("MessengerCustomColorUtils.bs").customColorOrBlue(L),1,E,L,M,G,A?A[0].contact.name:"",[])),c("React").createElement("div",{className:N}))}else return null;else return null},K=function K(){__p&&__p();var L;if(j==null)L=0;else{var M=+j.displayFocusBanner(G,E);L=M!==0?[j]:0}if(L)return[0,c("React").createElement(L[0],{className:"_2v6o",viewer:G,thread:c("bs_js_null_undefined").from_opt(F),participants:E})];else if(A){var N=A[0];return[0,c("ReasonReact.bs").element(0,0,c("MessengerPresenceStatusReact.bs").make(["_2v6o"],+N.isUserActive,c("bs_js_primitive").null_undefined_to_opt(N.lastActive),[N.platform],[]))]}else return[1,null]};return[x[0],x[1],x[2],x[3],function(L){c("bs_curry")._1(m[0],function(M){var N=L,O=M;N[2][5][0]=[O];return 0});return 0},function(L){return n(L[1][2])},x[6],x[7],x[8],function(L){if(F){var M=F[0],N=1-+E.isEmpty()&&+E.every(function(Q,H,R){if(Q==null)return false;else return Q.employee}),O=i._("Conversation Information"),P=K(0);return c("React").createElement("div",{ref:c("bs_curry")._1(L[0],q),className:"_5742"+(c("bs_js_boolean").to_js_boolean(P[0])?" _1_fz":"")},t(M,L),c("React").createElement("div",{key:"threadTitle",ref:c("bs_curry")._1(L[0],p),className:"_5743"},c("React").createElement("h2",{className:"_17w2",id:c("MessengerDomIDs.bs").ids.THREAD_TITLE},c("ReasonReact.bs").element(0,[c("bs_curry")._1(L[0],o)],c("MercuryThreadTitleReact.bs").make(["_3oh-"],[c("Utils.bs").$pipe$unknown(C,0)],M,G,0,0,0,0,[]))),P[1],v(G,E)),c("React").createElement("ul",{key:"buttonsContainer",ref:c("bs_curry")._1(L[0],r),className:"_fl2"},c("React").createElement("li",undefined,c("ReasonReact.bs").element(0,0,c("ArchiveWarningReact.bs").make(N,[]))),u(A,M.thread_id,G,L),I(0),J(0),c("React").createElement("li",undefined,c("React").cloneElement(c("ReasonReact.bs").element(0,0,c("LinkReact.bs").make(0,["_30yy"],0,0,0,0,0,0,[D],0,0,["button"],0,0,0,[O],[])),{"aria-expanded":B!==0?false:true,"aria-label":O,"data-testid":c("MessengerWebDriverTestIDs").INFO_PANEL_BUTTON},c("MessengerInfoPanelButtonReact.bs").make(c("MessengerCustomColorUtils.bs").customColorOrBlue(M),B)),c("React").cloneElement(c("React").createElement("div",undefined),{"aria-owns":c("MessengerDomIDs.bs").ids.THREAD_INFO_PANEL}))))}else return null},function(){return[[0],[0],[0],[0],[0],[0]]},x[11],function(H,L){return 0},function(L){var M=L[2];return[[function(){return c("Event").listen(window,"resize",c("debounce")(function(){return n(M)},20))},function(N){return N.remove()}],0]},x[14]]}var z=c("ReasonReact.bs").wrapReasonForJs(x,function(A){return y(c("bs_js_primitive").null_undefined_to_opt(A.contactData),+A.infoPanelCollapsed,c("bs_js_primitive").null_undefined_to_opt(A.maxTitle),A.onInfoPanelToggle,A.participants,c("bs_js_primitive").null_undefined_to_opt(A.thread),A.viewer,[])});g.messengerWorkAvailabilityStatus_=j;g.BootloadableMessengerUserControlsButtonReact=l;g.LoadableMessengerUserControlsButtonReact=m;g.calculateTruncationState=n;g.findMercuryTitle=o;g.findTitle=p;g.findRoot=q;g.findButtons=r;g.findMontage=s;g.renderMontageThread=t;g.renderUserControls=u;g.renderLocalTime=v;g.shouldShowCallButton=w;g.component=x;g.make=y;g.jsComponent=z}),null);
__d("MessengerDirect.bs",["ReasonReact.bs","MessengerDirect"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();var h=c("ReasonReact.bs").statelessComponent("MessengerDirect");function i(l,m){var n=h.slice();n[9]=function(){return null};return n}var j=c("MessengerDirect").module,k=j==null?i:function(l,m){return c("ReasonReact.bs").wrapJsForReason(j,{viewer:l},m)};g.component=h;g.emptyComponent=i;g.make=k}),null);
__d("MessengerFlexScrollableAreaReact.bs",["ReasonReact.bs","bs_js_null_undefined","MessengerFlexScrollableArea.react"],(function a(b,c,d,e,f,g){"use strict";function h(i,j){return c("ReasonReact.bs").wrapJsForReason(c("MessengerFlexScrollableArea.react"),{onScroll:c("bs_js_null_undefined").from_opt(i)},j)}g.make=h}),null);
__d("MessengerGraphQLSearchTypeaheadReact.bs",["Utils.bs","bs_js_boolean","ReasonReact.bs","bs_js_null_undefined","MessengerGraphQLSearchTypeahead.react"],(function a(b,c,d,e,f,g){"use strict";function h(i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C){return c("ReasonReact.bs").wrapJsForReason(c("MessengerGraphQLSearchTypeahead.react"),{className:i,enableMessageSearch:c("bs_js_boolean").to_js_boolean(j),excludeGroups:c("bs_js_boolean").to_js_boolean(k),excludePages:c("bs_js_boolean").to_js_boolean(l),hasHoverState:c("bs_js_boolean").to_js_boolean(m),hideClearButton:c("Utils.bs").optionBoolToNullUndefinedBoolean(n),hideResults:c("Utils.bs").optionBoolToNullUndefinedBoolean(o),isFocused:c("Utils.bs").optionBoolToNullUndefinedBoolean(p),onBlur:q,onChange:r,onClear:s,onFocus:t,onScrollIntoView:u,onSelect:v,placeholder:w,queryString:c("bs_js_null_undefined").from_opt(x),shouldQueryInternalBot:c("bs_js_boolean").to_js_boolean(y),shouldQueryVCEndpoint:c("bs_js_boolean").to_js_boolean(z),typeaheadViewClassName:A,viewer:B},C)}g.make=h}),null);
__d("MessengerSettingsStore",["CacheStorage","MessengerSettingsActions","MessengerStore","MessengerDotComSettingsInitialData"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();var h,i,j=new(c("CacheStorage"))("localstorage"),k="desktopNotifsEnabled";h=babelHelpers.inherits(l,c("MessengerStore"));i=h&&h.prototype;function l(){i.constructor.call(this);this.$MessengerSettingsStore1=babelHelpers["extends"]({},c("MessengerDotComSettingsInitialData"),{desktopNotifsEnabled:this.$MessengerSettingsStore2()})}l.prototype.getSettings=function(){return this.$MessengerSettingsStore1};l.prototype.$MessengerSettingsStore2=function(){return j.get(k,false)};l.prototype.$MessengerSettingsStore3=function(m){j.set(k,m)};l.prototype.__onDispatch=function(m){switch(m.type){case c("MessengerSettingsActions").Types.CHANGE_SETTINGS:this.$MessengerSettingsStore1=babelHelpers["extends"]({},this.$MessengerSettingsStore1,m.newSettings);this.emitChange();break;case c("MessengerSettingsActions").Types.CHANGE_DESKTOP_NOTIFS:this.$MessengerSettingsStore1=babelHelpers["extends"]({},this.$MessengerSettingsStore1,{desktopNotifsEnabled:m.desktopNotifsEnabled});this.$MessengerSettingsStore3(m.desktopNotifsEnabled);this.emitChange();break}};f.exports=new l()}),null);
__d("MessengerViewerCardReact.bs",["cx","React","ReasonReact.bs","joinClasses","ImageBlockReact.bs","MessengerContactImageReact.bs","MessengerChatOnOffToggleReact.bs"],(function a(b,c,d,e,f,g,h){"use strict";__p&&__p();var i=c("ReasonReact.bs").statelessComponent("MessengerViewerCardReact");function j(l,m,n,o,p){var q=l?l[0]:"",r=i.slice();r[9]=function(){if(o){var s=o[0];return c("ReasonReact.bs").element(0,0,c("ImageBlockReact.bs").make([c("joinClasses")(q,"_1u5d")],0,0,["medium"],[c("ReasonReact.bs").element(0,0,c("MessengerContactImageReact.bs").StraightJSComponent[0](["_1u5h"],0,[1],0,34,[s.image_src],0,[])),c("React").createElement("div",{className:"_1u5i"},c("React").createElement("div",{className:"_364g"},s.name)),c("ReasonReact.bs").element(0,0,c("MessengerChatOnOffToggleReact.bs").make(m,n,[]))]))}else return c("React").createElement("div",undefined)};return r}var k=34;g.imageSize=k;g.component=i;g.make=j}),null);
__d("MessengerSettingsDialogReact.bs",["cx","fbt","bs_array","bs_block","bs_curry","React","LinkReact.bs","bs_js_boolean","MercuryIDs","CurrentUser","ReasonReact.bs","EmojiActions","bs_js_primitive","EmojiStateStore","PresencePrivacy","MessengerDialogs.bs","MercuryParticipants","MessengerDialogReact.bs","SubscriptionsHandler","MessengerSpinnerReact.bs","MessengerSettingsStore","MessengerSettingsActions","MessengerViewerCardReact.bs","MessengerCheckboxInputReact.bs","MessengerDesktopNotifications","ChatEmojiSkinTonePreferencePickerReact.bs"],(function a(b,c,d,e,f,g,h,i){"use strict";__p&&__p();var j=c("ReasonReact.bs").reducerComponent("MessengerSettingsDialogReact");function k(x){if(x)return 0;else return c("MessengerDialogs.bs").removeDialog(0)}function l(){return c("MessengerDialogs.bs").removeDialog(0)}function m(x,y){var z=y[2][1];c("PresencePrivacy").setVisibility(z!==0?c("PresencePrivacy").OFFLINE:c("PresencePrivacy").ONLINE);return 0}function n(x,y){var z=x[2];if(z)return c("ReasonReact.bs").element(0,0,c("MessengerViewerCardReact.bs").make(["_3xld"],x[1],[c("bs_curry")._1(y,m)],[z[0]],[]));else return c("ReasonReact.bs").element(0,0,c("MessengerSpinnerReact.bs").make(0,0,0,[]))}function o(x,y){var z=y[4];c("MessengerSettingsActions").changeDesktopNotifs(c("bs_js_boolean").to_js_boolean(1-+y[2][3].desktopNotifsEnabled),function(){return c("bs_curry")._1(z,1)});return 0}function p(x){var y=x[2];if(y[4])return i._("You can allow Messenger to send you desktop notifications from your browser preferences.");else return c("bs_array").of_list([c("ReasonReact.bs").element(["notifications-checkox"],0,c("MessengerCheckboxInputReact.bs").make(+y[3].desktopNotifsEnabled&&y[5],c("bs_curry")._1(x[0],o),[])),[c("React").createElement("span",{key:"notifications-checkbox-label",className:"_1pr_"},i._("Desktop notifications enabled")),0]])}function q(x){if(c("MessengerDesktopNotifications").isSupported())return c("React").createElement("div",{className:"_374b"+(x[2][4]?" _2bd0":"")},c("React").createElement("div",{className:"_374c"},i._("Notifications")),c("React").createElement("div",{className:"_374d"},p(x)));else return null}function r(){if(c("CurrentUser").isWorkUser()||c("CurrentUser").isMessengerOnlyUser())return null;else return c("React").createElement("div",{className:"_374b"},c("React").createElement("div",{className:"_374c"},i._("Payments")),c("React").createElement("div",{className:"_374d"},c("ReasonReact.bs").element(0,0,c("LinkReact.bs").make(0,0,0,0,0,0,["https://secure.facebook.com/settings?tab=payments&ref=messengerdotcom_settings"],0,0,0,0,0,0,0,["_blank"],0,[i._("Manage on Facebook")]))))}function s(){if(c("CurrentUser").isWorkUser()||c("CurrentUser").isMessengerOnlyUser())return null;else return c("React").createElement("div",{className:"_374b"},c("React").createElement("div",{className:"_374c"},i._("Blocking")),c("React").createElement("div",{className:"_374d"},c("ReasonReact.bs").element(0,0,c("LinkReact.bs").make(0,0,0,0,0,0,["https://www.facebook.com/settings?tab=blocking"],0,0,0,0,0,0,0,["_blank"],0,[i._("Manage on Facebook")]))))}function t(x,y){var z=y[2][0];if(z&&x===z[0])return 0;else{c("EmojiActions").changeEmojiColor(x);return 0}}function u(x){var y=x[2][0];if(y)return c("ReasonReact.bs").element(0,0,c("ChatEmojiSkinTonePreferencePickerReact.bs").make(y[0],c("bs_curry")._1(x[0],t),[]));else return c("ReasonReact.bs").element(0,0,c("MessengerSpinnerReact.bs").make(0,0,0,[]))}function v(x){var y=x.target;c("MessengerSettingsActions").changeSettings({sound_enabled:y.checked});return 0}function w(x,y){__p&&__p();var z=j.slice();z[9]=function(A){var B=A[2];return c("ReasonReact.bs").element(0,0,c("MessengerDialogReact.bs").Dialog[0](0,k,0,0,0,["default"],[544],[c("ReasonReact.bs").element(0,0,c("MessengerDialogReact.bs").Header[0](0,0,[c("ReasonReact.bs").element(0,0,c("MessengerDialogReact.bs").Title[0](0,[i._("Settings")])),c("ReasonReact.bs").element(0,0,c("MessengerDialogReact.bs").Button[0](0,[i._("Done")],0,0,[l],[0],0,0,[]))])),c("React").createElement("div",{className:"_374b"},c("React").createElement("div",{className:"_374c"},i._("Account")),c("React").createElement("div",{className:"_374d"},n(B,A[0]))),c("React").createElement("div",{className:"_374b"},c("React").createElement("div",{className:"_374c"},i._("Sounds")),c("React").createElement("div",{className:"_374d"},c("ReasonReact.bs").element(0,0,c("MessengerCheckboxInputReact.bs").make(+B[3].sound_enabled,v,[])),c("React").createElement("span",{className:"_1pr_"},i._("Enabled")))),q(A),r(0),s(0),c("React").createElement("div",{className:"_374b"},c("React").createElement("div",{className:"_374c"},i._("Emoji")),c("React").createElement("div",{className:"_374d _5jb0"},u(A)))]))};z[10]=function(){return[[c("EmojiStateStore").getState().emojiColor],+(c("PresencePrivacy").getVisibility()===c("PresencePrivacy").ONLINE),c("bs_js_primitive").null_undefined_to_opt(c("MercuryParticipants").getOrFetch(c("MercuryIDs").getParticipantIDFromUserID(x))),c("MessengerSettingsStore").getSettings(),+c("MessengerDesktopNotifications").isDenied(),+c("MessengerDesktopNotifications").isGranted()]};z[12]=function(A,B){if(A!==0){var z=B.slice();return c("bs_block").__(0,[(z[4]=1,z)])}else return c("bs_block").__(0,[[[c("EmojiStateStore").getState().emojiColor],+(c("PresencePrivacy").getVisibility()===c("PresencePrivacy").ONLINE),c("bs_js_primitive").null_undefined_to_opt(c("MercuryParticipants").getOrFetch(c("MercuryIDs").getParticipantIDFromUserID(x))),c("MessengerSettingsStore").getSettings(),+c("MessengerDesktopNotifications").isDenied(),+c("MessengerDesktopNotifications").isGranted()]])};z[13]=function(A){__p&&__p();var B=A[4];return[[function(){var C=new(c("SubscriptionsHandler"))();C.addSubscriptions(c("PresencePrivacy").subscribe("privacy-changed",function(){return c("bs_curry")._1(B,0)}),c("PresencePrivacy").subscribe("privacy-user-presence-changed",function(){return c("bs_curry")._1(B,0)}),c("MessengerSettingsStore").addListener("change",function(){return c("bs_curry")._1(B,0)}),c("EmojiStateStore").addListener(function(){return c("bs_curry")._1(B,0)}),c("MercuryParticipants").addListener("change",function(){return c("bs_curry")._1(B,0)}));return C},function(C){C.release();return 0}],0]};return z}g.component=j;g.handleToggle=k;g.handleDone=l;g.handleTogglePresence=m;g.renderAccountSection=n;g.handleNotificationsChange=o;g.renderNotificationsContent=p;g.renderNotificationsSection=q;g.renderPaymentsSection=r;g.renderBlockingSection=s;g.handleChooseEmojiColor=t;g.renderEmojiColorSection=u;g.handleSoundChange=v;g.make=w}),null);
__d("XMessengerDotComLogoutController",["XController"],(function a(b,c,d,e,f,g){f.exports=c("XController").create("/logout/",{next:{type:"String"}})}),null);
__d("XWorkLogoutController",["XController"],(function a(b,c,d,e,f,g){f.exports=c("XController").create("/work/logout/",{next:{type:"String"}})}),null);
__d("MessengerSettingsMenuReact.bs",["cx","fbt","Run","Form","Utils.bs","goURI","LinkReact.bs","AsyncDialog","CurrentUser","ReasonReact.bs","AsyncRequest","MessagingTag","MercuryConfig","MessengerView","MercuryFilters","MessengerSpoof","MessengerConfig","MessengerActions","MessengerDialogs.bs","WebStorageMonster","MessengerMenuReact.bs","MessengerEnvironment","XWorkLogoutController","MessengerPopoverMenuReact.bs","AbstractPopoverButtonReact.bs","ServiceWorkerLoginAndLogout","MessengerSettingsDialogReact.bs","XMessengerDotComLogoutController"],(function a(b,c,d,e,f,g,h,i){"use strict";__p&&__p();function j(r){r.preventDefault();return 0}function k(){var r=+c("CurrentUser").isWorkUser();return c("ReasonReact.bs").element(0,0,c("MessengerMenuReact.bs").MenuItem[0]([r!==0?"https://www.facebook.com/workplace":"https://www.messenger.com/about"],i._("About"),0,["_blank"],[]))}function l(){var r=c("Utils.bs").$pipe$unknown(c("MercuryConfig").WorkTermsURI==null?0:[c("MercuryConfig").WorkTermsURI],"https://www.facebook.com/policies");return c("ReasonReact.bs").element(0,0,c("MessengerMenuReact.bs").MenuItem[0]([r],i._("Terms"),0,["_blank"],[]))}function m(){var r=c("Utils.bs").$pipe$unknown(c("MercuryConfig").WorkPrivacyURI==null?0:[c("MercuryConfig").WorkPrivacyURI],"https://www.facebook.com/privacy/explanation");return c("ReasonReact.bs").element(0,0,c("MessengerMenuReact.bs").MenuItem[0]([r],i._("Privacy Policy"),0,["_blank"],[]))}function n(){var r=c("Utils.bs").$pipe$unknown(c("MercuryConfig").WorkCookiesURI==null?0:[c("MercuryConfig").WorkCookiesURI],"https://www.facebook.com/help/cookies");return c("ReasonReact.bs").element(0,0,c("MessengerMenuReact.bs").MenuItem[0]([r],i._("Cookie Policy"),0,["_blank"],[]))}var o=c("ReasonReact.bs").statelessComponent("MessengerSettingsMenuReact");function p(r,s,t,u,v){__p&&__p();var w=function w(L){L.preventDefault();return c("MessengerDialogs.bs").showDialog(function(){return c("ReasonReact.bs").element(0,0,c("MessengerSettingsDialogReact.bs").make(u,[]))})},x=function x(L){L.preventDefault();var H=+(t===c("MessengerView").MASTER.RECENT);c("MessengerActions").changeMasterView(H!==0?c("MessengerView").MASTER.PEOPLE:c("MessengerView").MASTER.RECENT);return 0},y=function y(L){L.preventDefault();var H=+(s===c("MessagingTag").PENDING);c("MessengerActions").changeFolder(H!==0?c("MessagingTag").INBOX:c("MessagingTag").PENDING);return 0},z=function z(L){L.preventDefault();var H=+(s===c("MessagingTag").ACTION_ARCHIVED);c("MessengerActions").changeFolder(H!==0?c("MessagingTag").INBOX:c("MessagingTag").ACTION_ARCHIVED);return 0},A=function A(L){L.preventDefault();c("MessengerSpoof").init(function(){c("goURI")(window.location.href,true,undefined);return 0});return 0},B=function B(){c("Run").onUnload(function(){c("WebStorageMonster").cleanOnLogout(0);c("ServiceWorkerLoginAndLogout").logout();return 0});var H=+c("CurrentUser").isWorkUser();c("Form").post((H!==0?c("XWorkLogoutController"):c("XMessengerDotComLogoutController")).getURIBuilder().getURI(),{});return 0},C=function C(L){L.preventDefault();c("AsyncDialog").send(new(c("AsyncRequest"))("/ajax/bugs/report"));return 0},D=function D(L){L.preventDefault();var H=+(r===c("MercuryFilters").UNREAD);c("MessengerActions").changeFilter(H!==0?c("MercuryFilters").ALL:c("MercuryFilters").UNREAD);return 0},E=function E(){return c("ReasonReact.bs").element(0,0,c("MessengerMenuReact.bs").MenuItem[0](0,i._("Log Out"),[B],0,[]))},F=function F(){var H=+c("MercuryConfig").RTCR;return c("ReasonReact.bs").element(0,0,c("MessengerMenuReact.bs").MenuItem[0](0,H!==0?i._("Connection Requests"):i._("Message Requests"),[y],0,[]))},G=function G(){return c("ReasonReact.bs").element(0,0,c("MessengerMenuReact.bs").MenuItem[0](0,i._("Archived Threads"),[z],0,[]))},H=+c("CurrentUser").isWorkUser(),I=H!==0?"/help/work/682468881954082":"https://www.facebook.com/help/735006619902401",J=function J(){return c("ReasonReact.bs").element(0,0,c("MessengerMenuReact.bs").MenuItem[0](0,"[FB-Only] Copy Spoofs",[A],0,[]))},K=o.slice();K[9]=function(){var H=+(t===c("MessengerView").MASTER.RECENT),L=+(t===c("MessengerView").MASTER.RECENT),M=+(t===c("MessengerView").MASTER.RECENT&&s===c("MessagingTag").INBOX),N=+(r===c("MercuryFilters").UNREAD),O=+(c("MessengerEnvironment").messengerdotcom||c("CurrentUser").isWorkUser()),P=+(c("MessengerEnvironment").messengerdotcom||c("CurrentUser").isWorkUser()),Q=+(c("MessengerEnvironment").messengerdotcom||c("CurrentUser").isWorkUser()&&(c("MercuryConfig").WorkTermsURI==null?0:[c("MercuryConfig").WorkTermsURI])!==0),R=+(c("MessengerEnvironment").messengerdotcom||c("CurrentUser").isWorkUser()&&(c("MercuryConfig").WorkPrivacyURI==null?0:[c("MercuryConfig").WorkPrivacyURI])!==0),S=+(c("MessengerEnvironment").messengerdotcom||c("CurrentUser").isWorkUser()&&(c("MercuryConfig").WorkCookiesURI==null?0:[c("MercuryConfig").WorkCookiesURI])!==0),T=+c("MessengerConfig").GKSpoof,U=+(c("MessengerEnvironment").messengerdotcom||c("CurrentUser").isWorkUser()),V=+(c("MessengerEnvironment").messengerdotcom||c("CurrentUser").isWorkUser()),W=c("ReasonReact.bs").element(0,0,c("MessengerMenuReact.bs").Menu[0]([c("ReasonReact.bs").element(0,0,c("MessengerMenuReact.bs").MenuItem[0](0,i._("Settings"),[w],0,[])),c("ReasonReact.bs").element(0,0,c("MessengerMenuReact.bs").MenuSeparator[0]([])),c("ReasonReact.bs").element(0,0,c("MessengerMenuReact.bs").MenuItem[0](0,H!==0?i._("Active Contacts"):i._("Recent Messages"),[x],0,[])),L!==0?F(0):null,M!==0?G(0):null,c("ReasonReact.bs").element(0,0,c("MessengerMenuReact.bs").MenuItem[0](0,N!==0?i._("All Threads"):i._("Unread Threads"),[D],0,[])),O!==0?c("ReasonReact.bs").element(0,0,c("MessengerMenuReact.bs").MenuSeparator[0]([])):null,P!==0?k(0):null,Q!==0?l(0):null,R!==0?m(0):null,S!==0?n(0):null,c("ReasonReact.bs").element(0,0,c("MessengerMenuReact.bs").MenuSeparator[0]([])),c("ReasonReact.bs").element(0,0,c("MessengerMenuReact.bs").MenuItem[0]([I],i._("Help"),0,["_blank"],[])),c("ReasonReact.bs").element(0,0,c("MessengerMenuReact.bs").MenuItem[0](0,i._("Report a Problem"),[C],0,[])),T!==0?J(0):null,U!==0?c("ReasonReact.bs").element(0,0,c("MessengerMenuReact.bs").MenuSeparator[0]([])):null,V!==0?E(0):null])),X=i._("Settings, help and more"),Y={button:c("ReasonReact.bs").element(0,0,c("LinkReact.bs").make([X],["_30yy _2fug"],0,0,0,0,0,0,0,0,0,["button"],0,0,0,[X],[])),defaultMaxWidth:200};return c("ReasonReact.bs").element(0,0,c("MessengerPopoverMenuReact.bs").make(0,0,0,W,0,0,[c("ReasonReact.bs").element(0,0,c("AbstractPopoverButtonReact.bs").make([Y],[false],0,0,[200],[]))]))};return K}var q=c("Utils.bs").$pipe$unknown;g.preventDefault=j;g.$pipe$unknown=q;g.renderAbout=k;g.renderPolicies=l;g.renderPrivacy=m;g.renderCookies=n;g.component=o;g.make=p}),null);
__d("WorkchatNotificationsJewelBootloaderReact.bs",["ReasonReact.bs","WorkchatNotificationsJewelBootloader.react"],(function a(b,c,d,e,f,g){"use strict";function h(i){return c("ReasonReact.bs").wrapJsForReason(c("WorkchatNotificationsJewelBootloader.react"),{},i)}g.make=h}),null);
__d("WorkplaceLogoReact.bs",["cx","fbt","React","LinkReact.bs","ReasonReact.bs"],(function a(b,c,d,e,f,g,h,i){"use strict";__p&&__p();var j=c("ReasonReact.bs").statelessComponent("WorkplaceLogoReact");function k(){var l=j.slice();l[9]=function(){var m=i._("Go to Workplace News Feed");return c("ReasonReact.bs").element(0,0,c("LinkReact.bs").make([m],["_2z9u"],0,0,0,0,["/feed"],0,0,0,0,["button"],0,0,["_blank"],[m],[c("React").createElement("span",{className:"_2z9t"},m)]))};return l}g.component=j;g.make=k}),null);
__d("MessengerMasterViewHeaderReact.bs",["cx","fbt","bs_curry","React","gkx","LinkReact.bs","CurrentUser","ReasonReact.bs","MessagingTag","MercuryConfig","MessengerView","MessengerDirect.bs","MessengerActions","WorkplaceLogoReact.bs","MessengerURIConstants","MessengerSettingsMenuReact.bs","MessengerDeleteAllMenuBootloaderReact.bs","WorkchatNotificationsJewelBootloaderReact.bs"],(function a(b,c,d,e,f,g,h,i){"use strict";__p&&__p();var j=c("ReasonReact.bs").statelessComponent("MessengerMasterViewHeaderReact");function k(o){o.preventDefault();c("MessengerActions").changeDetailView(c("MessengerView").DETAIL.COMPOSE);return 0}function l(o){o.preventDefault();c("MessengerActions").changeFolder(c("MessagingTag").PENDING);return 0}function m(o,p,q,r,s,t,u,v){__p&&__p();var w=+c("MercuryConfig").RTCR,x=w!==0?i._("Back to Connection Requests"):i._("Back to Message Requests"),y=function y(H){H.preventDefault();if(q!==c("MessengerView").MASTER.RECENT)c("MessengerActions").changeMasterView(c("MessengerView").MASTER.RECENT);if(s)c("bs_curry")._1(t,0);c("MessengerActions").changeFolder(c("MessagingTag").INBOX);return 0},z=function z(){var H=s||+(p===c("MessagingTag").PENDING||p===c("MessagingTag").ACTION_ARCHIVED||q!==c("MessengerView").MASTER.RECENT),I=H!==0?y:l,J=H!==0?i._("Back to Recent Messages"):x;return c("ReasonReact.bs").element(0,0,c("LinkReact.bs").make([J],["_30yy _2oc9"],0,0,0,0,0,0,[I],0,0,["button"],0,0,0,[J],[]))},A=function A(){__p&&__p();if(p===c("MessagingTag").PENDING||s){var w=+c("MercuryConfig").RTCR;if(w!==0)return i._("Connection Requests");else return i._("Message Requests")}else if(p===c("MessagingTag").OTHER)return i._("Filtered Requests");else if(q===c("MessengerView").MASTER.PEOPLE){var H=+c("CurrentUser").isWorkUser();if(H!==0)return i._("People");else return i._("Active Now")}else if(c("CurrentUser").isWorkUser())return i._("Chat");else return i._("Messenger")},B=function B(){return c("React").createElement("div",{className:"_4kzu"},c("ReasonReact.bs").element(0,0,c("MessengerSettingsMenuReact.bs").make(o,p,q,r,[])))},C=function C(){return c("React").createElement("div",{className:"_4kzu"},c("ReasonReact.bs").element(0,0,c("MessengerDeleteAllMenuBootloaderReact.bs").make(o,p,r,u,s,[])))},D=function D(){return c("ReasonReact.bs").element(0,0,c("WorkchatNotificationsJewelBootloaderReact.bs").make([]))},E=function E(){var H=i._("New Message");return c("ReasonReact.bs").element(0,0,c("LinkReact.bs").make([H],["_30yy _2oc8"],0,0,0,0,[c("MessengerURIConstants").COMPOSE_SUBPATH],0,[k],0,0,["button"],0,0,0,[H],[]))},F=function F(){if(c("CurrentUser").isWorkUser())return+c("gkx")("AT5ad75lfUu_LEQloT_GHl5l4DgqBru4g1KtvnZgqgchaE21iYmpzSvKrpk6THSFyobb17PT_X_4ySOjfDebuqUc");else return 0},G=j.slice();G[9]=function(){var w=s||+(p!==c("MessagingTag").INBOX||q!==c("MessengerView").MASTER.RECENT),H;if(w!==0)H=z(0);else{var I=F(0);H=I!==0?D(0):B(0)}var J=(s||+(p===c("MessagingTag").PENDING||p===c("MessagingTag").OTHER))&&+c("MercuryConfig").MessengerInboxRequests,K=J!==0?C(0):E(0),L=F(0);return c("React").createElement("div",{className:"_36ic _5l-3",role:"banner"},L!==0?c("ReasonReact.bs").element(0,0,c("WorkplaceLogoReact.bs").make([])):null,H,c("ReasonReact.bs").element(0,0,c("bs_curry")._2(c("MessengerDirect.bs").make,r,[])),c("React").createElement("div",{className:"_1tqi"},A(0)),K)};return G}var n=c("ReasonReact.bs").wrapReasonForJs(j,function(o){return m(o.filter,o.folder,o.view,o.viewer,+o.aggregationView,o.onBackToRecent,o.threadIDs,[])});g.component=j;g.handleAddClick=k;g.handleFilteredRequestsBackArrowClick=l;g.make=m;g.jsComponent=n}),null);
__d("MessengerMessageRequestsInfoReact.bs",["ReasonReact.bs","MessengerMessageRequestsInfo.react"],(function a(b,c,d,e,f,g){"use strict";function h(i){return c("ReasonReact.bs").wrapJsForReason(c("MessengerMessageRequestsInfo.react"),{},i)}g.make=h}),null);
__d("MessengerThreadListGridWrapperReact.bs",["ReasonReact.bs","MessengerThreadListGridWrapper.react"],(function a(b,c,d,e,f,g){"use strict";function h(i,j){return c("ReasonReact.bs").wrapJsForReason(c("MessengerThreadListGridWrapper.react"),{label:i},j)}g.make=h}),null);
__d("MessengerThreadlistLinkRowReact.bs",["cx","fbt","React","LinkReact.bs","ReasonReact.bs"],(function a(b,c,d,e,f,g,h,i){"use strict";function j(k){return c("React").createElement("li",{className:"_5l-3 _1ht1 _2ogr"},c("React").createElement("div",{className:"_2ogs"},c("ReasonReact.bs").element(0,0,c("LinkReact.bs").make(0,["_2ogt"],0,0,0,0,0,0,[k],0,0,0,0,0,0,0,i._("See Filtered Requests")))))}g.make=j}),null);
__d("MessengerThreadlistMessageRequestsRowReact.bs",["ReasonReact.bs","MessengerThreadlistMessageRequestsRow.react"],(function a(b,c,d,e,f,g){"use strict";function h(i,j,k,l,m,n,o){return c("ReasonReact.bs").wrapJsForReason(c("MessengerThreadlistMessageRequestsRow.react"),{onAggregationClick:i,isFocused:j,onFocus:k,newMessageRequestThreads:l,aggregatedThreads:m,viewer:n},o)}g.make=h}),null);
__d("MessengerThreadlistNewMessageRowReact.bs",["bs_js_boolean","ReasonReact.bs","MessengerThreadlistNewMessageRow.react"],(function a(b,c,d,e,f,g){"use strict";function h(i,j,k){return c("ReasonReact.bs").wrapJsForReason(c("MessengerThreadlistNewMessageRow.react"),{isActive:c("bs_js_boolean").to_js_boolean(i),onClose:j},k)}g.make=h}),null);
__d("MessengerThreadlistRowContainerReact.bs",["Utils.bs","bs_js_boolean","ReasonReact.bs","bs_js_null_undefined","MessengerThreadlistRowContainer.react"],(function a(b,c,d,e,f,g){"use strict";function h(i,j,k,l,m,n,o,p,q,r,s){return c("ReasonReact.bs").wrapJsForReason(c("MessengerThreadlistRowContainer.react"),{folder:c("bs_js_null_undefined").from_opt(i),isActive:c("Utils.bs").optionBoolToBoolean(j),isFocused:c("Utils.bs").optionBoolToBoolean(k),isActionsFocused:c("Utils.bs").optionBoolToBoolean(l),isTabbable:c("Utils.bs").optionBoolToBoolean(m),onFocus:n,onScrollIntoView:o,thread:p,viewer:q,showAggregation:c("bs_js_boolean").to_js_boolean(r)},s)}g.make=h}),null);
__d("XUIButtonReact.bs",["Utils.bs","ReasonReact.bs","XUIButton.react","bs_js_null_undefined"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();function h(l){if(l)switch(l[0]){case 0:return["default"];case 1:return["special"];case 2:return["confirm"]}else return 0}function i(l){if(l)switch(l[0]){case 0:return["small"];case 1:return["medium"];case 2:return["large"];case 3:return["xlarge"];case 4:return["xxlarge"]}else return 0}function j(l){if(l)if(l[0]!==0)return["dark"];else return["light"];else return 0}function k(l,m,n,o,p,q,r,s,t,u,v,w){return c("ReasonReact.bs").wrapJsForReason(c("XUIButton.react"),{className:c("bs_js_null_undefined").from_opt(l),onClick:c("bs_js_null_undefined").from_opt(m),label:c("bs_js_null_undefined").from_opt(n),use:c("bs_js_null_undefined").from_opt(h(o)),size:c("bs_js_null_undefined").from_opt(i(p)),borderShade:c("bs_js_null_undefined").from_opt(j(q)),suppressed:c("bs_js_null_undefined").from_opt(r),href:c("bs_js_null_undefined").from_opt(s),target:c("bs_js_null_undefined").from_opt(t),disabled:c("Utils.bs").optionBoolToBoolean(u),image:c("bs_js_null_undefined").from_opt(v)},w)}g.stringOfUse=h;g.stringOfSize=i;g.stringOfBorderShade=j;g.make=k}),null);
__d("WorkChatThreadlistNewsfeedActionReact.bs",["cx","fbt","bs_block","bs_curry","React","gkx","bs_js_boolean","bs_pervasives","ReasonReact.bs","AsyncRequest","XUIButtonReact.bs"],(function a(b,c,d,e,f,g,h,i){"use strict";__p&&__p();var j=c("ReasonReact.bs").reducerComponent("WorkChatThreadlistNewsfeedActionReact");function k(){__p&&__p();var m=j.slice();m[9]=function(n){var o=n[2],p=o!==0?i._({"*":"{post count} unread posts","_1":"{post count} unread post"},[i.param("post count",c("bs_pervasives").string_of_int(o)),i.plural(o)]):i._("Go to News Feed"),q=n[2],r=q!==0?2:0,s=+c("gkx")("AT5bsDZiHMWtE2UowLAt2aHF1xqlqGKl8yICLll1Wu-J_t74abq6btJr92TeaiK_cpisH5W4HQQB08thCKN0MwcDBLaAz1ePIpoBNZzuZ0lxOg");if(s!==0)return c("React").createElement("div",{className:"_6364"+(c("bs_js_boolean").to_js_boolean(+(r===0))?" _1ngy":"")},c("ReasonReact.bs").element(0,0,c("XUIButtonReact.bs").make(0,[function(){return c("bs_curry")._1(n[4],0)}],[p],[r],0,0,0,["/feed?ref=chat_threadlist"],["_blank"],0,0,[])));else return null};m[10]=function(){return 0};m[12]=function(n,o){if(typeof n==="number")if(n!==0)return c("bs_block").__(2,[function(p){new(c("AsyncRequest"))("/ajax/litestand/newsfeed_count").setHandler(function(q){return c("bs_curry")._1(p[4],[q.payload])}).send();return 0}]);else return c("bs_block").__(0,[0]);else return c("bs_block").__(0,[n[0]])};m[13]=function(n){return[[function(){return setInterval(function(){return c("bs_curry")._1(n[4],1)},6e4)},function(o){clearInterval(o);return 0}],0]};return m}var l=6e4;g.component=j;g.updateInterval=l;g.make=k}),null);
__d("WorkChatThreadlistTabsReact.bs",["cx","fbt","React","LinkReact.bs","ReasonReact.bs","MessengerView","MercuryFilters","MessengerActions","MessengerSettingsMenuReact.bs"],(function a(b,c,d,e,f,g,h,i){"use strict";__p&&__p();var j=c("ReasonReact.bs").statelessComponent("WorkChatThreadlistTabsReact");function k(l,m,n,o,p){__p&&__p();var q=l?l[0]:c("MercuryFilters").ALL,r=m?m[0]:"",s=j.slice();s[9]=function(){var t=i._("Home"),u=i._("People");return c("React").createElement("div",{className:"_65ty"},c("React").createElement("div",{className:"_65tz"},c("ReasonReact.bs").element(0,0,c("LinkReact.bs").make([t],["_65t-"+(+(n!==c("MessengerView").MASTER.RECENT)?" _65t_":"")+(+(n===c("MessengerView").MASTER.RECENT)?" _65u0":"")],0,0,0,0,0,0,[function(){var n=c("MessengerView").MASTER.RECENT;c("MessengerActions").changeMasterView(n);return 0}],0,0,["button"],0,0,0,[t],[]))),c("React").createElement("div",{className:"_65tz"},c("ReasonReact.bs").element(0,0,c("LinkReact.bs").make([u],["_65t-"+(+(n!==c("MessengerView").MASTER.PEOPLE)?" _65u1":"")+(+(n===c("MessengerView").MASTER.PEOPLE)?" _65u2":"")],0,0,0,0,0,0,[function(){var n=c("MessengerView").MASTER.PEOPLE;c("MessengerActions").changeMasterView(n);return 0}],0,0,["button"],0,0,0,[u],[]))),c("React").createElement("div",{className:"_65tz"},c("ReasonReact.bs").element(0,0,c("MessengerSettingsMenuReact.bs").make(q,r,n,o,[]))))};return s}g.component=j;g.make=k}),null);
__d("WorkchatThreadListInviteRow.react",["cssVar","cx","fbt","Link.react","MercuryConfig","MessengerAddIconSVG.react","React","WorkInviteSource","XWorkInviteCoworkersDialogController"],(function a(b,c,d,e,f,g,h,i,j){"use strict";__p&&__p();var k,l;k=babelHelpers.inherits(m,c("React").PureComponent);l=k&&k.prototype;function m(){l.constructor.call(this);this.state={inviteURI:c("XWorkInviteCoworkersDialogController").getURIBuilder().setEnum("source",c("WorkInviteSource").WWW_CHAT_THREAD_LIST).getURI()}}m.prototype.render=function(){if(!c("MercuryConfig").ShowInviteSurface)return null;return c("React").createElement("li",{className:"_5l-3 _1q5x",role:"row",tabIndex:0},c("React").createElement("div",{className:"_5l-3 _1q5y",id:"work_thread_list_invite_row",role:"gridcell",tabIndex:-1},c("React").createElement(c("Link.react"),{href:"#",ajaxify:this.state.inviteURI,rel:"dialog",className:"_1q5y _1q61 _5l-3",s:"true",ref:"link",role:"link",tabIndex:-1},c("React").createElement("div",{className:"_5l-3 _1q60"},c("React").createElement("div",{"aria-hidden":true,className:"_1qt3 _5l-3"},c("React").createElement(c("MessengerAddIconSVG.react"),{className:"_1q5z",customColor:"#0084ff"})),c("React").createElement("div",{className:"_1qt4 _5l-m"},c("React").createElement("div",{className:"_1qt5 _5l-3"},c("React").createElement("div",{className:"_1ht6"},j._("Invite Coworkers"))))))))};f.exports=m}),null);
__d("WorkchatThreadListInviteRowReact.bs",["ReasonReact.bs","WorkchatThreadListInviteRow.react"],(function a(b,c,d,e,f,g){"use strict";function h(i){return c("ReasonReact.bs").wrapJsForReason(c("WorkchatThreadListInviteRow.react"),{},i)}g.make=h}),null);
__d("WorkTopGroupThreadsWebGraphQLQuery",["WebGraphQLQueryBase"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();f.exports=function(){__p&&__p();var h,i;h=babelHelpers.inherits(j,c("WebGraphQLQueryBase"));i=h&&h.prototype;j.__getDocID=function(){"use strict";return"1556328011149212"};j.getQueryID=function(){"use strict";return"1411641792296509"};function j(){"use strict";h.apply(this,arguments)}return j}()}),null);
__d("MercuryWorkTopGroupThreads",["EmitterSubscription","EventEmitter","ImmutableObject","KeyedCallbackManager","MercuryDispatcher","MercuryServerPayloadPreprocessor","MessengerServerPayloadTransformer.bs","MercurySingletonProvider","WorkTopGroupThreadsWebGraphQLQuery","WebGraphQL"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();var h=new(c("EventEmitter"))();function i(k){__p&&__p();this.$MercuryWorkTopGroupThreads5=function(l){if(l&&l.viewer&&l.viewer.message_threads){var m=(l.viewer.message_threads.nodes||[]).map(function(o){return c("MessengerServerPayloadTransformer.bs").transformThread(this.$MercuryWorkTopGroupThreads1,o,false)}.bind(this));if(m.length>0){var n=c("MercuryServerPayloadPreprocessor").getForFBID(this.$MercuryWorkTopGroupThreads1);n.handleUpdate({work_top_named_threads:m})}}}.bind(this);this.$MercuryWorkTopGroupThreads1=k;this.$MercuryWorkTopGroupThreads2=c("MercuryDispatcher").getForFBID(this.$MercuryWorkTopGroupThreads1);this.$MercuryWorkTopGroupThreads3=new(c("KeyedCallbackManager"))();this.$MercuryWorkTopGroupThreads4()}i.getForFBID=function(k){return j.getForFBID(k)};i.get=function(){return j.get()};i.prototype.getTopThreads=function(){return this.$MercuryWorkTopGroupThreads3.getAllResources()};i.prototype.requestPull=function(){c("WebGraphQL").exec(new(c("WorkTopGroupThreadsWebGraphQLQuery"))({limit:20})).done(this.$MercuryWorkTopGroupThreads5)};i.prototype.$MercuryWorkTopGroupThreads4=function(){__p&&__p();this.$MercuryWorkTopGroupThreads2.subscribe("update-work-group-threads",function(k,l){var m=l.work_top_named_threads;if(!m||!m.length)return;this.$MercuryWorkTopGroupThreads3.reset();var n={};m.forEach(function(o){return n[o.thread_id]=new(c("ImmutableObject"))(o)});this.$MercuryWorkTopGroupThreads3.addResourcesAndExecute(n);h.emit("change")}.bind(this))};i.addListener=function(k,l){return h.addListener(k,l)};var j=new(c("MercurySingletonProvider"))(i);f.exports=i}),null);
__d("WorkchatThreadlistGroupCarouselContainer.react",["MercuryWorkTopGroupThreads","React","SubscriptionsHandler","WorkchatThreadlistGroupCarousel"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();var h,i,j=c("React").PropTypes,k=c("WorkchatThreadlistGroupCarousel").module,l=1e3*60*60;h=babelHelpers.inherits(m,c("React").Component);i=h&&h.prototype;function m(n){i.constructor.call(this,n);this.$WorkchatThreadlistGroupCarouselContainer2=null;this.state={threads:null};this.$WorkchatThreadlistGroupCarouselContainer1=new(c("SubscriptionsHandler"))()}m.prototype.componentDidMount=function(){if(k){this.pullThreads();this.$WorkchatThreadlistGroupCarouselContainer1.addSubscriptions(c("MercuryWorkTopGroupThreads").addListener("change",function(){return this.pullThreads()}.bind(this)));this.$WorkchatThreadlistGroupCarouselContainer2=setInterval(function(){return c("MercuryWorkTopGroupThreads").get().requestPull()},l)}};m.prototype.componentWillUnmount=function(){this.$WorkchatThreadlistGroupCarouselContainer1.release();if(this.$WorkchatThreadlistGroupCarouselContainer2!==null)clearInterval(this.$WorkchatThreadlistGroupCarouselContainer2)};m.prototype.pullThreads=function(){var n=Object.values(c("MercuryWorkTopGroupThreads").get().getTopThreads());this.setState({threads:n})};m.prototype.render=function(){var n=this.state.threads;if(!k||!n||n.length===0)return null;return c("React").createElement(k,{threads:n,viewerID:this.props.viewerID})};m.propTypes={viewerID:j.string.isRequired};f.exports=m}),null);
__d("workchatThreadlistGroupCarouselContainerReact.bs",["ReasonReact.bs","WorkchatThreadlistGroupCarouselContainer.react"],(function a(b,c,d,e,f,g){"use strict";function h(i,j){return c("ReasonReact.bs").wrapJsForReason(c("WorkchatThreadlistGroupCarouselContainer.react"),{viewerID:i},j)}g.make=h}),null);
__d("MessengerThreadlistReact.bs",["cx","csx","fbt","bs_array","bs_block","bs_curry","React","Utils.bs","Parent","gkx","ReactDOM","debounce","LinkReact.bs","UserAgent","bs_caml_array","MercuryIDs","bs_pervasives","CurrentUser","ReasonReact.bs","bs_js_primitive","MessagingTag","MercuryConfig","MessengerView","MercuryFilters","MessengerActions","MercuryThreadInfo","KeyEventController","MessageRequestLogger.bs","SubscriptionsHandler","ChatSidebarSheetReact.bs","MessengerSpinnerReact.bs","MessengerTypeaheadUtils","MessengerComposerActions","MercuryTypeaheadConstants","MessengerSearchFunnelLogger","WorkChatThreadlistTabsReact.bs","MessengerNewMessagesNoticeReact.bs","MessengerThreadlistLinkRowReact.bs","MessengerFlexScrollableAreaReact.bs","WorkchatThreadListInviteRowReact.bs","MessengerMessageRequestsInfoReact.bs","MessengerThreadListGridWrapperReact.bs","MessengerGraphQLSearchTypeaheadReact.bs","MessengerSearchFunnelLoggerConstants","MessengerThreadlistRowContainerReact.bs","MessengerThreadlistNewMessageRowReact.bs","WorkChatThreadlistNewsfeedActionReact.bs","MessengerThreadlistMessageRequestsRowReact.bs","workchatThreadlistGroupCarouselContainerReact.bs"],(function aa(ba,a,ca,da,ea,b,fa,ga,c){"use strict";__p&&__p();function d(r,s,t){if(t)if(r.length>0&&s.length>0){var u=a("bs_caml_array").caml_array_get(a("bs_caml_array").caml_array_get(r,0),0),v=a("bs_caml_array").caml_array_get(a("bs_caml_array").caml_array_get(s,0),0);if(u.unread_count>0&&u.thread_id!==t[0]&&u!==v)return+a("MercuryThreadInfo").isMuted(u);else return 0}else return 0;else return 0}function e(r,s){var t=+r.ctrlKey,u=+r.metaKey,v=+r.shiftKey,w=+a("KeyEventController").filterEventTypes(r,s),x=+a("KeyEventController").filterEventTargets(r,s),y=a("Parent").bySelector(r.target,"._150g");if(t!==0||u!==0||v!==0||!(w!==0&&x!==0&&y==null))return 0;else return 1}function f(r,s){__p&&__p();var t=+r.ctrlKey,u=+r.metaKey,v=+a("UserAgent").isPlatform("Mac OS X"),w=+a("UserAgent").isPlatform("iOS"),x=+a("KeyEventController").filterEventTypes(r,s),y=a("Parent").bySelector(r.target,"._150g");if(t!==0)if(u!==0||v!==0||w!==0||!(x!==0&&y==null))return 0;else return 1;else if(u!==0)if(v!==0)if(w!==0||!(x!==0&&y==null))return 0;else return 1;else if(w!==0&&x!==0&&y==null)return 1;else return 0;else return 0}function g(r,s,t){__p&&__p();var u=t.findIndex(function(w){__p&&__p();var x=w.length;if(x!==1)if(x!==0&&r&&a("bs_caml_array").caml_array_get(w,0).thread_id===r[0])return 1;else return 0;else{var y=w[0];if(r&&y.thread_id===r[0])return 1;else return 0}}),v=a("bs_pervasives").min(a("bs_pervasives").max(u+s|0,0),t.length-1|0);return a("bs_caml_array").caml_array_get(a("bs_caml_array").caml_array_get(t,v),0).thread_id}function h(r,s){r.preventDefault();var t=s[2][4][0];if(t)return t[0].focusInput();else return 0}function i(r,s){s[2][4][0]=r==null?0:[r];return 0}function j(r,s){var t=s[2][6];if(t){a("MessengerTypeaheadUtils").scrollEntryIntoView(r,t[0]);return 0}else return 0}function k(r){r.preventDefault();a("MessengerActions").changeFolder(a("MessagingTag").OTHER);return 0}function l(r){r.preventDefault();a("MessengerActions").changeFilter(a("MercuryFilters").ALL);a("MessengerActions").changeFolder(a("MessagingTag").INBOX);return 0}function m(r,s,t,u){__p&&__p();var v=[];a("bs_array").iter(function(y){__p&&__p();var z=s[y];if(z!==undefined){var A=z[1],B=z[0];if(B==null)return 0;else{var C=a("ReactDOM").findDOMNode(B).getBoundingClientRect();if(C.top>r.top-10&&C.bottom<r.bottom+10){v.push({threadID:A.thread_id,unread:+(A.unread_count>0)});return 0}else return 0}}else return 0},Object.keys(s));if(v.length){var w=a("bs_array").map(function(y){return a("MercuryIDs").getThreadKeyfromThreadIDUserID(y.threadID,u)},v),x=w.join(",");return a("MessageRequestLogger.bs").logItemImpression(v,x,t)}else return 0}var n=a("debounce")(function(r){var s=r[1],t=r[0],u=t[6];if(u){var v=u[0].getArea().getElement().getBoundingClientRect();m(v,t[7],a("MessagingTag").PENDING,s);return m(v,t[8],a("MessagingTag").OTHER,s)}else return 0},500);function o(r,s,t,u){var v=s[2],w=v[0],x=w&&w[0]===a("bs_caml_array").caml_array_get(u,0).thread_id?true:false;return a("ReasonReact.bs").element([a("bs_caml_array").caml_array_get(u,0).thread_id],0,a("MessengerThreadlistMessageRequestsRowReact.bs").make(t,x,function(y){return a("bs_curry")._1(s[4],a("bs_block").__(3,[y]))},[],u,r,[]))}function p(r,s,t){__p&&__p();var u=t[2];if(r.folder===a("MessagingTag").PENDING){u[7][r.thread_id]=[s,r];return 0}else if(r.folder===a("MessagingTag").OTHER){u[8][r.thread_id]=[s,r];return 0}else return 0}function ha(r,s,t,u,v,w){var x=t[2],y=r&&r[0]===w.thread_id?1:0,z=x[0],A=z?1:0,B=x[0],C=B&&B[0]===w.thread_id?1:0,D=y!==0?A!==0&&C===0?0:1:C!==0?1:0,E=+(w.folder===a("MessagingTag").PENDING||w.folder===a("MessagingTag").OTHER);return a("ReasonReact.bs").element([w.thread_id],[E!==0?a("bs_curry")._1(t[0],function(F,G){return p(w,F,G)}):function(){return 0}],a("MessengerThreadlistRowContainerReact.bs").make([u],[y],[C],[x[2]],[D],function(F){return a("bs_curry")._1(t[4],a("bs_block").__(3,[F]))},a("bs_curry")._1(t[0],j),w,s,v,[]))}function ia(r,s){var t=r[1],u=r[0],v=t==null?a("MessengerSearchFunnelLoggerConstants").OTHER:t===a("MercuryTypeaheadConstants").FRIEND_TYPE?a("MessengerSearchFunnelLoggerConstants").USER_CONTACT:t===a("MercuryTypeaheadConstants").NON_FRIEND_TYPE?a("MessengerSearchFunnelLoggerConstants").USER_NON_CONTACT:t===a("MercuryTypeaheadConstants").FB4C_TYPE?a("MessengerSearchFunnelLoggerConstants").COWORKER:t===a("MercuryTypeaheadConstants").GAME_TYPE?a("MessengerSearchFunnelLoggerConstants").GAME:t===a("MercuryTypeaheadConstants").INTERNAL_BOT_PAGE_TYPE||t===a("MercuryTypeaheadConstants").COMMERCE_PAGE_TYPE||t===a("MercuryTypeaheadConstants").MEETING_ROOM_PAGE_TYPE||t===a("MercuryTypeaheadConstants").PAGE_TYPE?a("MessengerSearchFunnelLoggerConstants").PAGE:t===a("MercuryTypeaheadConstants").THREAD_TYPE?a("MessengerSearchFunnelLoggerConstants").GROUP:a("MessengerSearchFunnelLoggerConstants").OTHER;a("MessengerActions").selectThread(u,t);a("MessengerSearchFunnelLogger").logResultSelection("WWW_MESSENGER_SEARCH_SESSION_FUNNEL",s[2][3],u,v);return 0}var q=a("ReasonReact.bs").reducerComponentWithRetainedProps("MessengerThreadlistReact");function ja(r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,ma){__p&&__p();var H=function H(I,J,K){__p&&__p();var L=K[3],D=L[0],M=typeof I==="number"?I!==0?D.length-1|0:(-D.length|0)-1|0:I[0],N=+J.altKey,O=a("Parent").bySelector(J.target,"._4rv3"),P=K[2][0],Q=a("Parent").bySelector(J.target,"._1ht1"),R=0;if(N!==0)if(O==null)R=1;else{var S=L[4];if(S!==0)if(M===1&&D.length>0){a("MessengerActions").selectThread(a("bs_caml_array").caml_array_get(a("bs_caml_array").caml_array_get(D,0),0).thread_id,null);return 0}else return 0;else{var T=D.findIndex(function(V){if(V.length!==1)return 0;else{var W=V[0],N=L[2];if(N&&N[0]===W.thread_id)return 1;else return 0}});if(T!==-1){var U=a("bs_caml_array").caml_array_get(D,T+M|0);a("MessengerActions").selectThread(a("bs_caml_array").caml_array_get(U,0).thread_id);if(L[1]&&T===0&&M===-1)a("MessengerActions").changeDetailView(a("MessengerView").DETAIL.COMPOSE);if(T===(D.length-1|0))return a("bs_curry")._1(L[3],0);else return 0}else return 0}}else R=1;if(R===1)if(P&&!(Q==null)){J.preventDefault();return a("bs_curry")._1(K[4],a("bs_block").__(4,[M]))}else return 0},na=function na(I,ma){__p&&__p();I.stopPropagation();a("MessengerComposerActions").exitComposeState();if(y){var J=D.find(function(K){var L=K.length;if(L!==1)if(L!==0)return+(a("bs_js_primitive").undefined_to_opt(K.find(function(J){return+(J.unread_count===0)}))===0);else return 0;else{var M=K[0];return+(M.unread_count===0)}});a("MessengerActions").selectThread(J!==undefined?a("bs_caml_array").caml_array_get(J,0).thread_id:null,null);return 0}else return 0},oa=function oa(I,ma){I.preventDefault();return a("bs_curry")._1(A,0)},pa=function pa(w,x,G,I){__p&&__p();var J=0,K=0;if(G!==0)return null;else if(w)if(w[0]!==0)return null;else K=2;else K=2;if(K===2)if(x)if(x[0]!==0)return a("React").createElement("div",{className:"_19hf"},a("ReasonReact.bs").element(0,0,a("MessengerSpinnerReact.bs").make(0,0,0,[])));else J=1;else J=1;if(J===1)return a("React").createElement("div",{className:"_19hf"},a("ReasonReact.bs").element(0,0,a("LinkReact.bs").make(0,0,0,0,0,0,["#"],0,[a("bs_curry")._1(I[0],oa)],0,0,0,0,[-1],0,0,[c._("Show Older")])))},qa=function qa(I){__p&&__p();if(D.length)return a("ReasonReact.bs").element(0,0,a("MessengerThreadListGridWrapperReact.bs").make(c._("Conversation List"),[a("bs_array").map(function(O){if(O.length!==1)return o(E,I,F,O);else{var P=O[0];return ha(r,E,I,u,G,P)}},D)]));else{var J;if(u===a("MessagingTag").INBOX){var K=+(t===a("MercuryFilters").UNREAD);J=K!==0?c._("No unread messages found."):c._("No messages found.")}else if(u===a("MessagingTag").PENDING){var L=+a("MercuryConfig").RTCR;J=L!==0?c._("No Connection requests found."):c._("No Message requests found.")}else J=c._("No filtered requests found.");var M=+(u!==a("MessagingTag").INBOX||t!==a("MercuryFilters").ALL),N=M!==0?a("ReasonReact.bs").element(0,0,a("LinkReact.bs").make(0,0,0,0,0,0,0,0,[l],0,0,0,0,0,0,0,[c._("Return to inbox.")])):null;return a("React").createElement("div",{className:"_3blk"},J,a("React").createElement("div",{className:"_3bll"},N))}};return[q[0],q[1],q[2],function(I){__p&&__p();var J=I[3],K=I[2];if(J[5]!==u||G!==J[6])n([K,E]);var L=K[6],M=L?+L[0].isScrolledToTop():0,N=d(D,J[0],r),O=0;if(M!==0)O=1;else if(N!==0)if(B){var P=B[0],Q=K.slice(),R=+(P.length===0);Q[3]=R!==0?P:K[3];Q[5]=1;return Q}else return K;else O=1;if(O===1)if(B){var S=B[0],T=K.slice(),U=+(S.length===0);T[3]=U!==0?S:K[3];T[5]=K[5]&&1-M;return T}else return K},function(I){n([I[2],E]);return 0},function(I){var J=I[1],K=I[0],L=+(J[2][1]!==K[2][1]),M=v&&1-K[3][1],N=J[2][6];if(L!==0&&M!==0&&N){N[0].scrollToTop();return 0}else return 0},q[6],q[7],q[8],function(I){__p&&__p();var J=I[2],K=J[5]&&1-J[1],L=+a("CurrentUser").isWorkUser()&&1-J[1]&&+a("gkx")("AT58O0ueTgrNywfhkMH9fYHs8_paoL8Uj3nAzEseDtJbi75rIYW1Jld0CDq2Sj1iPDsNcWsScyu5Jv7kTxxdRT_i"),M=c._("Conversations"),N=B?1:0,O=+(u===a("MessagingTag").INBOX),P;if(O!==0){var Q=+a("CurrentUser").isWorkUser();P=a("ReasonReact.bs").element(0,[a("bs_curry")._1(I[0],i)],a("MessengerGraphQLSearchTypeaheadReact.bs").make("_5iwm"+(J[1]||+(J[3].length>0)?" _5iwn":"")+" _150g",1,0,0,0,[+(J[3]==="")&&1-N],[N],[J[1]],function(){a("MessengerSearchFunnelLogger").endFunnel("WWW_MESSENGER_SEARCH_SESSION_FUNNEL");return a("bs_curry")._1(I[4],1)},function(Y){return a("bs_curry")._1(I[4],a("bs_block").__(1,[Y.target.value]))},function(){a("MessengerSearchFunnelLogger").logClearQuery("WWW_MESSENGER_SEARCH_SESSION_FUNNEL");if(s)a("bs_curry")._1(s[0],0);return a("bs_curry")._1(I[4],2)},function(){a("MessengerSearchFunnelLogger").startFunnel("WWW_MESSENGER_SEARCH_SESSION_FUNNEL",a("MessengerSearchFunnelLoggerConstants").MESSENGER_DOT_COM,a("MessengerSearchFunnelLoggerConstants").UNIVERSAL_SEARCH);return a("bs_curry")._1(I[4],0)},a("bs_curry")._1(I[0],j),function(Y,Z){return a("bs_curry")._2(I[0],ia,[Y,Z])},Q!==0?c._("Search Workplace Chat"):c._("Search Messenger"),[J[3]],1,1,"_11_d",E,[]))}else P=null;var R=+a("CurrentUser").isWorkUser()&&1-J[1],S=+(u===a("MessagingTag").PENDING),T=+(u===a("MessagingTag").INBOX&&z.length>0),U=+(u===a("MessagingTag").PENDING),V=+a("CurrentUser").isWorkUser(),W;if(V!==0){var X=+a("gkx")("AT5ad75lfUu_LEQloT_GHl5l4DgqBru4g1KtvnZgqgchaE21iYmpzSvKrpk6THSFyobb17PT_X_4ySOjfDebuqUc");W=X!==0?a("ReasonReact.bs").element(0,0,a("WorkChatThreadlistTabsReact.bs").make([t],[u],a("MessengerView").MASTER.RECENT,E,[])):a("ReasonReact.bs").element(0,0,a("WorkChatThreadlistNewsfeedActionReact.bs").make([]))}else W=null;return a("React").createElement("div",{className:"_2xhi"},a("ReasonReact.bs").element(0,0,a("ChatSidebarSheetReact.bs").make("_p0g",[])),a("ReasonReact.bs").element(0,0,a("MessengerNewMessagesNoticeReact.bs").make(K,function(Y){Y.preventDefault();return a("bs_curry")._1(I[4],4)},0,[])),a("ReasonReact.bs").element(0,[function(Y){return a("bs_curry")._1(I[4],a("bs_block").__(0,[Y==null?0:[Y]]))}],a("MessengerFlexScrollableAreaReact.bs").make([function(){return a("bs_curry")._1(I[4],3)}],[P,R!==0?a("ReasonReact.bs").element(0,0,a("WorkchatThreadListInviteRowReact.bs").make([])):null,L!==0?a("ReasonReact.bs").element(0,0,a("workchatThreadlistGroupCarouselContainerReact.bs").make(E,[])):null,L!==0?a("React").createElement("div",undefined,a("React").createElement("span",{className:"_1p5i"},c._("Recent"))):null,S!==0?a("ReasonReact.bs").element(0,0,a("MessengerMessageRequestsInfoReact.bs").make([])):null,a("React").cloneElement(a("React").createElement("div",{className:J[1]&&1-N?"accessible_elem":"",role:"navigation"}),{"aria-label":M},T!==0?a("ReasonReact.bs").element(0,0,a("MessengerThreadlistMessageRequestsRowReact.bs").make(F,false,function(Y){return a("bs_curry")._1(I[4],a("bs_block").__(3,[Y]))},z,[],E,[])):null,v!==0?a("ReasonReact.bs").element(0,0,a("MessengerThreadlistNewMessageRowReact.bs").make(y,a("bs_curry")._1(I[0],na),[])):null,qa(I),U!==0?a("MessengerThreadlistLinkRowReact.bs").make(k):null,C?a("bs_curry")._1(C[0],0):pa(w,x,G,I))])),W)},function(){return[0,0,0,"",[0],0,0,{},{}]},[D,v,r,A,y,u,G],function(I,J){__p&&__p();if(typeof I==="number")switch(I){case 0:var K=J.slice();return a("bs_block").__(0,[(K[1]=1,K)]);case 1:var L=J.slice();return a("bs_block").__(0,[(L[1]=0,L[3]="",L)]);case 2:var M=J.slice();return a("bs_block").__(0,[(M[3]="",M)]);case 3:if(J[1])return 0;else{var N=J[6];if(N){var O=N[0],P=+O.isScrolledToBottom(),Q=+O.isScrolledToTop(),R=J[5];if(P!==0){var S=0;if(Q!==0)if(R!==0){var T=J.slice();return a("bs_block").__(3,[(T[5]=0,T),function($){a("bs_curry")._1(A,0);return n([$[2],E])}])}else S=1;else S=1;if(S===1)return a("bs_block").__(2,[function($){a("bs_curry")._1(A,0);return n([$[2],E])}])}else{var U=0;if(Q!==0)if(R!==0){var V=J.slice();return a("bs_block").__(3,[(V[5]=0,V),function($){return n([$[2],E])}])}else U=1;else U=1;if(U===1)return a("bs_block").__(2,[function($){return n([$[2],E])}])}}else return 0}break;case 4:var W=J.slice();return a("bs_block").__(3,[(W[5]=0,W),function($){var N=$[2][6];if(N){N[0].scrollToTop();return 0}else return 0}])}else switch(I.tag|0){case 0:var X=J.slice();return a("bs_block").__(1,[(X[6]=I[0],X)]);case 1:var Y=J.slice();return a("bs_block").__(0,[(Y[3]=I[0],Y)]);case 2:var Z=J.slice();return a("bs_block").__(0,[(Z[2]=I[0],Z)]);case 3:var ra=J.slice();return a("bs_block").__(0,[(ra[0]=[I[0]],ra)]);case 4:var sa=J.slice();return a("bs_block").__(0,[(sa[0]=[g(J[0],I[0],D)],sa)])}},function(I){__p&&__p();return[[function(){__p&&__p();var J=function J(P,Q){Q.preventDefault();return a("bs_curry")._1(I[4],a("bs_block").__(2,[P]))},K=new(a("SubscriptionsHandler"))(),L=[-1],M=[1],N=[-5],O=[5];K.addSubscriptions(a("KeyEventController").registerKey("UP",a("bs_curry")._1(I[0],function(P,Q){return H(L,P,Q)}),e),a("KeyEventController").registerKey("DOWN",a("bs_curry")._1(I[0],function(P,Q){return H(M,P,Q)}),e),a("KeyEventController").registerKey("PAGE_UP",a("bs_curry")._1(I[0],function(P,Q){return H(N,P,Q)})),a("KeyEventController").registerKey("PAGE_DOWN",a("bs_curry")._1(I[0],function(P,Q){return H(O,P,Q)})),a("KeyEventController").registerKey("HOME",a("bs_curry")._1(I[0],function(P,Q){return H(0,P,Q)})),a("KeyEventController").registerKey("END",a("bs_curry")._1(I[0],function(P,Q){return H(1,P,Q)})),a("KeyEventController").registerKey("LEFT",function(P){return J(0,P)}),a("KeyEventController").registerKey("RIGHT",function(P){return J(1,P)}),a("KeyEventController").registerKey("K",a("bs_curry")._1(I[0],h),f));return K},function(J){J.release();return 0}],0]},q[14]]}var ka=a("ReasonReact.bs").wrapReasonForJs(q,function(r){var s=a("Utils.bs").nullUndefinedBooleanToOptionBool(r.isComposing);return ja(a("bs_js_primitive").null_undefined_to_opt(r.activeThreadID),a("bs_js_primitive").null_undefined_to_opt(r.clearQuery),r.filter,r.folder,s?s[0]:0,a("Utils.bs").nullUndefinedBooleanToOptionBool(r.isLoaded),a("Utils.bs").nullUndefinedBooleanToOptionBool(r.isLoading),+r.isNewMessageActive,r.newMessageRequestThreads,r.onLoadMoreRequest,a("bs_js_primitive").null_undefined_to_opt(r.queryString),a("bs_js_primitive").null_undefined_to_opt(r.renderLoadMore),a("bs_array").map(function(t){return[].concat(t)},r.threads),r.viewer,r.onAggregationClick,+r.showAggregation,[])}),la=10;b.hasNewUnreadMessages=d;b.filterKeyEvent=e;b.filterPlatformSpecificModifierKey=f;b.getFocusedThreadId=g;b.handleFocusSearchBar=h;b.setSearchInputNode=i;b.handleScrollIntoView=j;b.handleFilteredRequestsClick=k;b.handleReturnToInboxClick=l;b.impressionOffset=la;b.logNodeImpressions=m;b.checkAndUpdateMessageRequestImpressions=n;b.renderAggregatedRequests=o;b.setter=p;b.renderThread=ha;b.handleSelect=ia;b.component=q;b.make=ja;b.jsComponent=ka}),null);
__d("MessengerPage",["EventEmitter","EventEmitterWithHolding","EventHolder","keyMirror","performanceAbsoluteNow"],(function a(b,c,d,e,f,g){"use strict";var h={Events:c("keyMirror")({APP_MOUNTED:null,DATA_INITIALIZED:null,JS_LOADED:null}),addRetroactiveListener:function j(k,l){return i.addRetroactiveListener(k,l)},emit:function j(k){i.emitAndHold(k,c("performanceAbsoluteNow")())},removeCurrentListener:function j(){i.removeCurrentListener()}},i=new(c("EventEmitterWithHolding"))(new(c("EventEmitter"))(),new(c("EventHolder"))());f.exports=h}),null);
__d("MercuryMessageList",["immutable","Map","setTimeoutAcrossTransitions"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();function h(i){this.$MercuryMessageList1=c("immutable").List(i||[]);this.$MercuryMessageList2()}h.prototype.append=function(i){var j;this.$MercuryMessageList1=(j=this.$MercuryMessageList1).push.apply(j,i);this.$MercuryMessageList2()};h.prototype.prepend=function(i){var j;this.$MercuryMessageList1=(j=this.$MercuryMessageList1).unshift.apply(j,i);this.$MercuryMessageList2()};h.prototype.update=function(i){var j=i.filter(function(k){return this.contains(k)}.bind(this));if(j.length===0)return;this.$MercuryMessageList1=this.$MercuryMessageList1.withMutations(function(k){j.forEach(function(l){var m=this.$MercuryMessageList3.get(l.message_id);if(m!==undefined)k.set(m,l)}.bind(this))}.bind(this))};h.prototype.reorder=function(i){this.$MercuryMessageList1=c("immutable").List(i.filter(Boolean));this.$MercuryMessageList2()};h.prototype.at=function(i){return this.$MercuryMessageList1.get(i)};h.prototype.contains=function(i){return this.$MercuryMessageList3.has(i.message_id)};h.prototype.toArray=function(){return this.$MercuryMessageList1.toArray()};h.prototype.toMap=function(){return new(c("Map"))(c("immutable").Seq(this.$MercuryMessageList1).map(function(i){return[i.message_id,i]}))};h.prototype.$MercuryMessageList2=function(){this.$MercuryMessageList3=new(c("Map"))(c("immutable").Seq(this.$MercuryMessageList1).map(function(i,j){return[i.message_id,j]}))};f.exports=h}),null);
__d("MercuryMessageStore",["MercuryAPIArgsSource","LogHistory","MercuryMessages","MercuryViewer","MercuryMessageList","SubscriptionsHandler","MercuryThreadInformer","MercuryThreadlistConstants","MercuryThreads","mixInEventEmitter","setImmediate","setTimeoutAcrossTransitions"],(function a(b,c,d,e,f,g){"use strict";__p&&__p();var h=c("MercuryThreads").get(),i=c("LogHistory").getInstance("mercury_message_store");function j(k,l,m){__p&&__p();this.$MercuryMessageStore9=k;this.$MercuryMessageStore6=new(c("MercuryMessageList"))();this.$MercuryMessageStore4=m?c("MercuryMessages").getForFBID(m):c("MercuryMessages").get();this.$MercuryMessageStore2=1;this.$MercuryMessageStore1=null;this.$MercuryMessageStore5=0;this.$MercuryMessageStore3=l||c("MercuryThreadlistConstants").RECENT_MESSAGES_LIMIT;this.$MercuryMessageStore10=m?c("MercuryThreadInformer").getForFBID(m):c("MercuryThreadInformer").get();this.$MercuryMessageStore8=new(c("SubscriptionsHandler"))();this.$MercuryMessageStore8.addSubscriptions(this.$MercuryMessageStore10.subscribe("messages-received",function(n,o){return this.$MercuryMessageStore11(o)}.bind(this)),this.$MercuryMessageStore10.subscribe("messages-updated",function(n,o){return o[this.$MercuryMessageStore9]&&this.$MercuryMessageStore12(o[this.$MercuryMessageStore9])}.bind(this)),this.$MercuryMessageStore10.subscribe("messages-reordered",function(n,o){return o[this.$MercuryMessageStore9]&&this.$MercuryMessageStore13()}.bind(this)),this.$MercuryMessageStore10.subscribe("thread-invalidated",function(n,o){return o[this.$MercuryMessageStore9]&&this.$MercuryMessageStore14()}.bind(this)));i.debug("constructed",JSON.stringify({threadID:this.$MercuryMessageStore9}));this.$MercuryMessageStore15()}j.prototype.setNewThreadID=function(k){this.$MercuryMessageStore7=k};j.prototype.destroy=function(){this.$MercuryMessageStore8&&this.$MercuryMessageStore8.release();i.debug("destroyed",JSON.stringify({threadID:this.$MercuryMessageStore9}))};j.prototype.subscribe=function(k){return this.addRetroactiveListener("updated",k)};j.prototype.fetchMoreMessages=function(){if(this.hasFetchedAll())return false;this.$MercuryMessageStore15();return true};j.prototype.hasFetchedAll=function(){if(this.$MercuryMessageStore4.hasLoadedExactlyNMessages(this.$MercuryMessageStore9,this.$MercuryMessageStore5)&&this.$MercuryMessageStore4.hasLoadedAllMessages(this.$MercuryMessageStore9))return true;return h.isNewEmptyLocalThread(this.$MercuryMessageStore9)};j.prototype.$MercuryMessageStore15=function(){var k=this.$MercuryMessageStore5+this.$MercuryMessageStore3*this.$MercuryMessageStore2;this.$MercuryMessageStore4.getThreadMessagesRange(this.$MercuryMessageStore9,0,k,this.$MercuryMessageStore16.bind(this),null,c("MercuryAPIArgsSource").MERCURY);if(this.$MercuryMessageStore2<10)this.$MercuryMessageStore2+=1;if(this.$MercuryMessageStore4.hasLoadedNMessages(this.$MercuryMessageStore9,k))c("setImmediate")(function(){this.$MercuryMessageStore13()}.bind(this))};j.prototype.$MercuryMessageStore16=function(k){if(k&&k.length){this.$MercuryMessageStore1=k[0].timestamp;this.$MercuryMessageStore5=k.length}else if(k&&!k.length&&!this.$MercuryMessageStore5)this.$MercuryMessageStore17(j.THREAD_IS_EMPTY)};j.prototype.$MercuryMessageStore11=function(k){__p&&__p();var l=[],m=k[this.$MercuryMessageStore9];if(m&&m.length)l=l.concat(m.filter(function(p){return!!p}));if(this.$MercuryMessageStore7){var n=k[this.$MercuryMessageStore7];if(n&&n.length){l=l.concat(n.filter(function(p){return!!p}));this.$MercuryMessageStore7=null}}if(l.length){this.$MercuryMessageStore6.append(l);this.$MercuryMessageStore5+=l.length;var o=l.every(function(p){return p.author!=c("MercuryViewer").getID()});this.$MercuryMessageStore17(j.MESSAGES_RECEIVED,{allFromOthers:o})}};j.prototype.$MercuryMessageStore12=function(k){this.$MercuryMessageStore6.update(this.$MercuryMessageStore4.getMessagesFromIDs(Object.keys(k)));this.$MercuryMessageStore18();this.$MercuryMessageStore17(j.MESSAGES_CHANGED)};j.prototype.$MercuryMessageStore13=function(){if(!this.$MercuryMessageStore1)return;this.$MercuryMessageStore6.reorder(this.$MercuryMessageStore4.getThreadMessagesSinceTimestamp(this.$MercuryMessageStore9,this.$MercuryMessageStore1));this.$MercuryMessageStore18();this.$MercuryMessageStore17(j.MESSAGES_REORDERED)};j.prototype.$MercuryMessageStore14=function(){this.$MercuryMessageStore6=new(c("MercuryMessageList"))();this.$MercuryMessageStore2=1;this.$MercuryMessageStore1=null;this.$MercuryMessageStore5=0;this.$MercuryMessageStore15()};j.prototype.$MercuryMessageStore17=function(k,l){var m=this.$MercuryMessageStore6.toArray();this.releaseHeldEventType("updated");this.emitAndHold("updated",babelHelpers["extends"]({messages:m,eventType:k},l))};j.prototype.$MercuryMessageStore18=function(){var k=this.$MercuryMessageStore6.at(0);if(k)this.$MercuryMessageStore1=k.timestamp};Object.assign(j,{MESSAGES_FETCHED:"fetched",MESSAGES_CHANGED:"changed",MESSAGES_RECEIVED:"received",MESSAGES_REORDERED:"reordered",THREAD_IS_EMPTY:"thread-is-empty"});c("mixInEventEmitter")(j,{updated:true});f.exports=j}),null);
__d("MercuryOrderedThreadlist",["invariant","LogHistory","MercuryActionType","MercuryAPIArgsSource","MercuryDispatcher","MercuryFilters","MercuryFolders","MercuryPayloadSource","MercuryServerRequests","MercurySingletonProvider","MercuryThreadIDMap","MessagingTag","PageMessageEnumTag","RangedCallbackManager","MercuryThreadInformer","MercuryThreads","gkx"],(function a(b,c,d,e,f,g,h){"use strict";__p&&__p();var i=c("LogHistory").getInstance("ordered_threadlist_model"),j=c("MercuryFilters").getSupportedFilters().concat([c("MercuryFilters").ALL,c("MessagingTag").GROUPS]),k=c("MercuryFolders").getSupportedFolders().concat([c("MessagingTag").SPAM,c("MessagingTag").PAGE_BACKGROUND]);l.getForFBID=function(o){return n.getForFBID(o)};l.get=function(){return n.get()};function l(o){__p&&__p();this.$MercuryOrderedThreadlist1=o;this.$MercuryOrderedThreadlist2=c("MercuryThreadIDMap").getForFBID(this.$MercuryOrderedThreadlist1);this.$MercuryOrderedThreadlist3=c("MercuryThreadInformer").getForFBID(this.$MercuryOrderedThreadlist1);this.$MercuryOrderedThreadlist4=c("MercuryThreads").getForFBID(this.$MercuryOrderedThreadlist1);this.$MercuryOrderedThreadlist5=c("MercuryDispatcher").getForFBID(this.$MercuryOrderedThreadlist1);this.$MercuryOrderedThreadlist6={};this.$MercuryOrderedThreadlist7();this.$MercuryOrderedThreadlist5.subscribe("update-threadlist",function(p,q){__p&&__p();if(!m(q))return;var r=q.ordered_threadlists;if(r&&r.length)this.$MercuryOrderedThreadlist8(r);else{var s=(q.actions||[]).filter(function(t){return t.thread_id});this.$MercuryOrderedThreadlist9(q.threads||[]);this.$MercuryOrderedThreadlist10(s)}this.$MercuryOrderedThreadlist3.updatedThreadlist()}.bind(this));this.$MercuryOrderedThreadlist5.subscribe("invalidate-global-state",function(){return this.$MercuryOrderedThreadlist11()}.bind(this))}l.prototype.getThreadlistOrderMap=function(o,p){if(!this.$MercuryOrderedThreadlist6[o][p]){j=j.concat([p]);k.forEach(function(o){this.$MercuryOrderedThreadlist6[o][p]=new(c("RangedCallbackManager"))(function(q){var r=this.$MercuryOrderedThreadlist4.getThreadMetaNow(q);return r&&r.timestamp}.bind(this),function(q,r){return r-q},this.$MercuryOrderedThreadlist2.canLinkExternally.bind(this.$MercuryOrderedThreadlist2))}.bind(this))}return this.$MercuryOrderedThreadlist6[o][p]};l.prototype.getThreadlist=function(o,p,q,r,s,t){return this.getFilteredThreadlist(o,p,q,c("MercuryFilters").ALL,r,s,t)};l.prototype.getFilteredThreadlist=function(o,p,q,r,s,t,u){__p&&__p();var v=this.getThreadlistOrderMap(q,r),w=v.executeOrEnqueue(o,p,s,t),x=v.getUnavailableResources(w),y=v.getError(o,p,t);if(x.length||y){if(v.getCurrentArraySize()<o){var z={start:o,limit:p,filter:r,resources_size:v.getCurrentArraySize()};i.warn("range_with_gap",JSON.stringify(z))}v.setError(false);this.getServerRequests().fetchThreadlistInfo(v.getCurrentArraySize(),x.length,q,r==c("MercuryFilters").ALL?null:r,u,this.$MercuryOrderedThreadlist12(v.getAllResources()))}return w};l.prototype.getServerRequests=function(){return c("MercuryServerRequests").getForFBID(this.$MercuryOrderedThreadlist1)};l.prototype.getThreadlistUntilTimestamp=function(o,p,q){q=q||c("MercuryFilters").ALL;return this.getThreadlistOrderMap(p,q).getElementsUntil(o)};l.prototype.getAvailableThreadlistNow=function(o,p){p=p||c("MercuryFilters").ALL;return this.getThreadlistOrderMap(o,p).getAllResources()};l.prototype.getThreadCount=function(o,p){p=p||c("MercuryFilters").ALL;return this.getThreadlistOrderMap(o,p).getCurrentArraySize()};l.prototype.hasLoadedThreadlist=function(o,p){p=p||c("MercuryFilters").ALL;return this.getThreadlistOrderMap(o,p).hasReachedEndOfArray()};l.prototype.unsubscribe=function(o,p,q){q=q||c("MercuryFilters").ALL;this.getThreadlistOrderMap(p,q).unsubscribe(o)};l.prototype.$MercuryOrderedThreadlist11=function(){this.$MercuryOrderedThreadlist6={};this.$MercuryOrderedThreadlist7()};l.prototype.$MercuryOrderedThreadlist7=function(){k.forEach(function(o){this.$MercuryOrderedThreadlist6[o]={};j.forEach(function(p){this.$MercuryOrderedThreadlist6[o][p]=new(c("RangedCallbackManager"))(function(q){var r=this.$MercuryOrderedThreadlist4.getThreadMetaNow(q);return r&&r.timestamp}.bind(this),function(q,r){return r-q},this.$MercuryOrderedThreadlist2.canLinkExternally.bind(this.$MercuryOrderedThreadlist2))}.bind(this))}.bind(this))};l.prototype.$MercuryOrderedThreadlist13=function(o,p,q){var r=this.$MercuryOrderedThreadlist4.getThreadMetaNow(o);return!!(r&&r.timestamp&&q&&p&&this.$MercuryOrderedThreadlist14(o)==p&&this.$MercuryOrderedThreadlist15(o).includes(q))};l.prototype.$MercuryOrderedThreadlist16=function(o,p,q){__p&&__p();var r,s=this,t=[],u=false,v=false,w=(o||[]).filter(function(A){var B=A.filter||c("MercuryFilters").ALL;return(A.folder==p||!A.folder&&p==c("MessagingTag").INBOX)&&B==q}),x=this.$MercuryOrderedThreadlist6[p][q].getAllResources(),y=void 0;w.forEach(function(A){__p&&__p();t=t.concat(A.thread_ids);if(A.error){if(A.end>x.length)v=A.error}else{var B=A.end-A.start;if(A.thread_ids.length<B)u=true}if(!y||A.end>y)y=A.end});this.$MercuryOrderedThreadlist17(t,p,q);if(u)this.$MercuryOrderedThreadlist6[p][q].setReachedEndOfArray();else if(v)this.$MercuryOrderedThreadlist6[p][q].setError(v);else{var z=this.$MercuryOrderedThreadlist6[p][q].getCurrentArraySize();if(y&&z<y)(function(){var A={},B=x.concat(t),C=B.filter(function(D){var E=A[D];A[D]=true;return E});if(C.length){i.warn("duplicate_threads",JSON.stringify({folder:p,expected_final_size:y,actual_final_size:z,duplicate_thread_ids:C}));s.getServerRequests().fetchThreadlistInfo(y,C.length,p,q==c("MercuryFilters").ALL?null:q,c("MercuryAPIArgsSource").MERCURY,s.$MercuryOrderedThreadlist12(s.$MercuryOrderedThreadlist6[p][q].getAllResources()))}})()}};l.prototype.$MercuryOrderedThreadlist8=function(o){k.forEach(function(p){j.forEach(function(q){this.$MercuryOrderedThreadlist16(o,p,q)}.bind(this))}.bind(this))};l.prototype.$MercuryOrderedThreadlist10=function(o){__p&&__p();var p={},q=this.$MercuryOrderedThreadlist4;k.forEach(function(r){p[r]={};j.forEach(function(s){p[r][s]={to_add:[],to_remove:[],to_remove_if_last_after_add:{}}})});o.forEach(function(r){__p&&__p();var s=r.thread_id;this.$MercuryOrderedThreadlist18(s,function(t){__p&&__p();this.$MercuryOrderedThreadlist19(s,function(u){__p&&__p();var v=function(){u.forEach(function(x){if(!j.includes(x))return;!!t||h(0);p[t][x].to_add.push(s);if(!this.$MercuryOrderedThreadlist6[t][x].hasReachedEndOfArray()&&!this.$MercuryOrderedThreadlist6[t][x].hasResource(s))p[t][x].to_remove_if_last_after_add[s]=true}.bind(this))}.bind(this);function w(x){!!t||h(0);if(j.includes(x))if(u.includes(x))p[t][x].to_add.push(s);else p[t][x].to_remove.push(s)}if(!t){if(r.action_type===c("MercuryActionType").CHANGE_FOLDER||r.action_type===c("MercuryActionType").CHANGE_ARCHIVED_STATUS)k.forEach(function(x){if(x!==t)j.forEach(function(y){this.$MercuryOrderedThreadlist6[x][y].removeResources([s])}.bind(this))}.bind(this));return}!!t||h(0);switch(r.action_type){case c("MercuryActionType").DELETE_THREAD:u.forEach(function(x){if(!j.includes(x))return;p[t][x].to_remove.push(s)});break;case c("MercuryActionType").CHANGE_ARCHIVED_STATUS:case c("MercuryActionType").CHANGE_FOLDER:v();break;case c("MercuryActionType").CHANGE_READ_STATUS:w(c("MessagingTag").UNREAD);break;case c("MercuryActionType").USER_GENERATED_MESSAGE:case c("MercuryActionType").LOG_MESSAGE:u.forEach(function(x){if(!j.includes(x))return;if(this.$MercuryOrderedThreadlist13(s,t,x))p[t][x].to_add.push(s)}.bind(this));break;case c("MercuryActionType").CHANGE_FLAG:w(c("PageMessageEnumTag").FLAG);break}}.bind(this))}.bind(this))}.bind(this));k.forEach(function(r){__p&&__p();j.forEach(function(s){var t=this.$MercuryOrderedThreadlist6[r][s];this.$MercuryOrderedThreadlist17(p[r][s].to_add,r,s);for(var u=t.getCurrentArraySize()-1;u>=0;u--){var v=t.getResourceAtIndex(u);if(!p[r][s].to_remove_if_last_after_add[v])break;p[r][s].to_remove.push(v)}t.removeResources(p[r][s].to_remove)}.bind(this))}.bind(this))};l.prototype.$MercuryOrderedThreadlist9=function(o){__p&&__p();var p={};k.forEach(function(q){p[q]={};j.forEach(function(r){p[q][r]=[]})});o.forEach(function(q){this.$MercuryOrderedThreadlist18(q.thread_id,function(r){this.$MercuryOrderedThreadlist19(q.thread_id,function(s){if(r)s.forEach(function(t){if(this.$MercuryOrderedThreadlist13(q.thread_id,r,t))p[r][t].push(q.thread_id)}.bind(this))}.bind(this))}.bind(this))}.bind(this));k.forEach(function(q){j.forEach(function(r){if(p[q][r].length>0)this.$MercuryOrderedThreadlist17(p[q][r],q,r)}.bind(this))}.bind(this))};l.prototype.$MercuryOrderedThreadlist17=function(o,p,q){q=q||c("MercuryFilters").ALL;this.$MercuryOrderedThreadlist6[p][q].addResources(o);k.forEach(function(r){if(r!=p)this.$MercuryOrderedThreadlist6[r][q].removeResources(o)}.bind(this))};l.prototype.$MercuryOrderedThreadlist18=function(o,p){this.$MercuryOrderedThreadlist4.getThreadMeta(o,function(q){p(this.$MercuryOrderedThreadlist14(o,q))}.bind(this))};l.prototype.$MercuryOrderedThreadlist14=function(o,p){__p&&__p();p=p||this.$MercuryOrderedThreadlist4.getThreadMetaNow(o);var q=null;if(!p)q="No thread metadata";else if(!p.folder)q="No thread folder";if(q){var r={error:q,tid:o};i.warn("no_thread_folder",JSON.stringify(r));return null}!!p||h(0);var s=p.folder;if(p.is_archived)s=c("MessagingTag").ACTION_ARCHIVED;if(this.$MercuryOrderedThreadlist6[s])return s;else return null};l.prototype.$MercuryOrderedThreadlist19=function(o,p){this.$MercuryOrderedThreadlist4.getThreadMeta(o,function(q){p(this.$MercuryOrderedThreadlist15(o,q))}.bind(this))};l.prototype.$MercuryOrderedThreadlist15=function(o,p){__p&&__p();p=p||this.$MercuryOrderedThreadlist4.getThreadMetaNow(o);var q=[c("MercuryFilters").ALL];if(!p){var r={error:"no_thread_metadata",tid:o};i.warn("no_thread_metadata",JSON.stringify(r));return[]}if(p.unread_count)q.push(c("MessagingTag").UNREAD);if(!p.is_canonical)q.push(c("MessagingTag").GROUPS);var s=p.page_thread_info;if(s&&s.flagged)q.push(c("PageMessageEnumTag").FLAG);return q};l.prototype.$MercuryOrderedThreadlist12=function(o){var p=null;if(o.length>0){var q=this.$MercuryOrderedThreadlist4.getThreadMetaNow(o[o.length-1]);p=q?q.timestamp:null}return p};function m(o){switch(o.payload_source){case c("MercuryPayloadSource").CLIENT_CHANGE_ARCHIVED_STATUS:case c("MercuryPayloadSource").CLIENT_CHANGE_PAGE_FOLLOW_UP_STATUS:case c("MercuryPayloadSource").CLIENT_CHANGE_READ_STATUS:case c("MercuryPayloadSource").CLIENT_CHANGE_FOLDER:case c("MercuryPayloadSource").CLIENT_CHANNEL_MESSAGE:case c("MercuryPayloadSource").CLIENT_DELETE_MESSAGES:case c("MercuryPayloadSource").CLIENT_DELETE_THREAD:case c("MercuryPayloadSource").CLIENT_SEND_MESSAGE:case c("MercuryPayloadSource").SERVER_SEND_MESSAGE:case c("MercuryPayloadSource").SERVER_FETCH_THREADLIST_INFO:case c("MercuryPayloadSource").SERVER_THREAD_SYNC:case c("MercuryPayloadSource").SERVER_INVALIDATE_GLOBAL_STATE:case c("MercuryPayloadSource").CLIENT_UPDATE_COMM_STATUS:return true;case c("MercuryPayloadSource").SERVER_INITIAL_DATA:return!!o.ordered_threadlists;default:return false}}var n=new(c("MercurySingletonProvider"))(l);f.exports=l}),null);
__d("MercurySearchSnippetResults",["MercuryAPIArgsSource","MercuryIDs","MercuryPayloadSource","MercuryServerPayloadPreprocessor","MercurySingletonMixin","MercuryThreadlistConstants","MercuryThreadIDMap","MessengerEnvironment","MessengerServerPayloadTransformer.bs","RangedCallbackManager","MercuryServerDispatcher"],(function a(b,c,d,e,f,g){__p&&__p();var h=c("MessengerEnvironment").messengerui?c("MercuryAPIArgsSource").MESSENGER:c("MercuryAPIArgsSource").WEBMESSENGER,i={},j={},k=null,l=c("MercuryThreadlistConstants").WEBMESSENGER_SEARCH_SNIPPET_COUNT,m=c("MercuryThreadlistConstants").WEBMESSENGER_SEARCH_SNIPPET_LIMIT,n=c("MercuryThreadlistConstants").WEBMESSENGER_SEARCH_SNIPPET_MORE;function o(x){"use strict";this.$MercurySearchSnippetResults1=x;this.$MercurySearchSnippetResults2=c("MercuryServerPayloadPreprocessor").getForFBID(x);c("MercuryServerDispatcher").registerEndpoints({"/ajax/mercury/search_snippets.php":{request_user_id:x,mode:c("MercuryServerDispatcher").IMMEDIATE,handler:function(y){this.handleUpdate(y)}.bind(this)}});this.$MercurySearchSnippetResults3=c("MercuryThreadIDMap").getForFBID(x)}o.prototype.getFBID=function(){"use strict";return this.$MercurySearchSnippetResults1};o.prototype.getThreadIDMap=function(){"use strict";return this.$MercurySearchSnippetResults3};o.prototype.getAllThreadSearchResults=function(x,y){"use strict";if(x)p(this.$MercurySearchSnippetResults1,x,m,0,y)};o.prototype.getAllLocalThreadSearchResults=function(x,y){"use strict";if(x){var z=i[x];if(z){var A=z.getCurrentArraySize();p(this.$MercurySearchSnippetResults1,x,0,A,y)}}};o.prototype.getAllThreadSearchMoreResults=function(x,y){"use strict";if(x){var z=i[x];if(z){var A=z.getCurrentArraySize();p(this.$MercurySearchSnippetResults1,x,n,A,y)}}};o.prototype.getSingleThreadSearchResults=function(x,y,z){"use strict";if(!x||!y)return;q.call(this,x,y,l,0,z)};o.prototype.getSingleThreadSearchMoreResults=function(x,y,z){"use strict";__p&&__p();if(!x||!y)return;if(!j[y])return;var A=j[y][x];if(A){var B=A.num_total_snippets,C=A.snippets_cbm.getCurrentArraySize(),D=B-C;if(D>0){var E=D>n?n:D;q.call(this,x,y,E,C,z)}}};o.prototype.countSnippetsMatchingQueryInThread=function(x,y){"use strict";var z=j[y][x];if(z)return z.num_total_snippets};o.prototype.findIndexOfSnippet=function(x,y,z,A){"use strict";var B=v(x,y),C=B.getAllResources();for(var D=0;D<C.length;D++)if(z===C[D].message_id)return D};o.prototype.findSnippetAtIndex=function(x,y,z,A){"use strict";s(x,y,z);t.call(this,x,y,z,A)};o.prototype.handleUpdate=function(x){"use strict";__p&&__p();if(x.graphql_payload){var y=(x.graphql_payload.message_threads||[]).map(function(P){return c("MessengerServerPayloadTransformer.bs").transformThread(this.$MercurySearchSnippetResults1,P,x.is_page)}.bind(this));this.$MercurySearchSnippetResults2.handleUpdate({threads:y,payload_source:c("MercuryPayloadSource").SERVER_SEARCH})}else if(x.mercury_payload)this.$MercurySearchSnippetResults2.handleUpdate(x.mercury_payload);var z=x.search_snippets||{};Object.keys(z).filter(function(C){return!!z[C]}).forEach(function(C){Object.keys(z[C]).forEach(function(H){if(!z[C][H].snippets)return;z[C][H].snippets.forEach(function(P){P.matched_keywords=r(P.matched_keywords)})})});var A=x.offset,B=[];for(var C in z){var D=z[C];for(var E in D){var F=D[E],G=x.other_user_fbid||x.thread_fbid,H=this.$MercurySearchSnippetResults3.getClientIDFromServerIDNow(E),I=F.snippets,J=v(C,H),K=J.getCurrentArraySize();if(!G){B.push(H);if(K)continue}else if(A!=K)continue;var L=j[H][C];L.num_total_snippets=F.num_total_snippets;var M=I?I.length:0;if(M>0)J.addResourcesWithoutSorting(I,K);if(!G||x.limit>M)if(J.getCurrentArraySize()==L.num_total_snippets)J.setReachedEndOfArray()}if(!G){var N=u(C),O=N.getCurrentArraySize();if(A==O){N.addResourcesWithoutSorting(B,O);if(x.limit>B.length)N.setReachedEndOfArray()}}}};function p(x,y,z,A,B){__p&&__p();if(k)if(!k.thread_id){var C=u(k.query);C.unsubscribe(k.subscriber_id);k=null}var C=u(y),D=A+z,E=C.executeOrEnqueue(0,D,function(H){var I={};for(var J=0;J<H.length;J++){var K=H[J],L=j[K][y];I[K]={num_total_snippets:L.num_total_snippets,snippets:L.snippets_cbm.getAllResources()}}var M=C.hasReachedEndOfArray();B(I,M)}),F=C.getUnavailableResources(E);if(F.length){k={query:y,thread_id:null,subscriber_id:E};var G={query:y,offset:A,limit:z+1,snippetLimit:l};G.identifier="thread_fbid";w(G,x)}}function q(x,y,z,A,B){__p&&__p();if(k)if(k.thread_id){var C=v(k.query,k.thread_id);C.unsubscribe(k.subscriber_id);k=null}var C=v(x,y),D=A+z,E=C.executeOrEnqueue(0,D,function(){var K=C.getAllResources(),D=j[y][x].num_total_snippets;B(K,D)}),F=C.getUnavailableResources(E);if(F.length){k={query:x,thread_id:y,subscriber_id:E};var G={query:x,snippetOffset:A,snippetLimit:z},H=this.getThreadIDMap().getServerIDFromClientIDNow(y),I=c("MercuryIDs").tokenize(y),J=I.type;if(J=="user")G.other_user_fbid=H;else G.thread_fbid=H;G.identifier="thread_fbid";w(G,this.getFBID())}}function r(x){if(x instanceof Array){var y={};for(var z=0;z<x.length;z++)y[z.toString()]=x[z];return y}else return x}function s(x,y,z){}function t(x,y,z,A){var B=j[y][x],C=B.snippets_cbm.getAllResources(),D=B.num_total_snippets,E=C.length;if(z<E){A(C[z].message_id);return}var F=D-E,G=F>n?n:F;q.call(this,x,y,G,E,function(H,I){t.call(this,x,y,z,A)})}function u(x){if(!i[x])i[x]=new(c("RangedCallbackManager"))();return i[x]}function v(x,y){if(!j[y])j[y]={};var z=j[y][x];if(!z){z={num_total_snippets:-1,snippets_cbm:new(c("RangedCallbackManager"))()};j[y][x]=z}return z.snippets_cbm}function w(x,y){x.client=h;c("MercuryServerDispatcher").trySend("/ajax/mercury/search_snippets.php",x,null,y)}Object.assign(o,c("MercurySingletonMixin"));f.exports=o}),null);