text: if (self.CavalryLogger) { CavalryLogger.start_js(["B7CoB"]); }
  
  __d("PagesMessagingConst",[],(function a(b,c,d,e,f,g){f.exports={UNANSWERED_FILTER:"unanswered"};}),null);
  __d("MercuryAttachmentConstants",[],(function a(b,c,d,e,f,g){var h={SIDE_LENGTH:9};f.exports=h;}),null);
  __d('MercuryAttachmentError.react',['fbt','XUINotice.react','XUIText.react','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(c('XUINotice.react'),{use:'warn'},c('React').createElement(c('XUIText.react'),{size:'small'},h._("This attachment could not be loaded."))));};function k(){i.apply(this,arguments);}f.exports=k;}),null);
  __d('MercuryAttachmentFile.react',['ix','cx','fbt','Image.react','LeftRight.react','Link.react','MercuryAttachment','React','joinClasses'],(function a(b,c,d,e,f,g,h,i,j){'use strict';var k,l,m=c('React').PropTypes;k=babelHelpers.inherits(n,c('React').PureComponent);l=k&&k.prototype;n.prototype.componentDidMount=function(){this.props.onAttachmentLoad&&this.props.onAttachmentLoad();};n.prototype.$MercuryAttachmentFile1=function(){if(this.props.open_url){var o={url:(this.props.url||'').toString(),shimhash:this.props.shimhash};return (c('React').createElement('div',{className:"_59gs"},c('React').createElement(c('Link.react'),{target:'_blank',href:this.props.open_url},j._("open")),' ','\u00B7',' ',c('React').createElement(c('Link.react'),{href:o,s:this.props.isSafeToSkipShim?'1':''},j._("download"))));}return c('React').createElement('div',null);};n.prototype.render=function(){var o=c('joinClasses')(c('MercuryAttachment').getAttachIconClass(this.props.type),"_59go _59gq");if(this.props.url){var p={url:(this.props.url||'').toString(),shimhash:this.props.shimhash};return (c('React').createElement(c('LeftRight.react'),{className:o},c('React').createElement(c('Link.react'),{href:p,s:this.props.isSafeToSkipShim?'1':''},c('React').createElement(c('LeftRight.react'),null,c('React').createElement(c('Image.react'),{src:h("86988")}),c('React').createElement('span',{className:"_59gp"},this.props.name))),this.$MercuryAttachmentFile1()));}return (c('React').createElement(c('LeftRight.react'),{className:o},c('React').createElement(c('Image.react'),{src:h("86988")}),c('React').createElement('span',{className:"_59gp"},this.props.name)));};function n(){k.apply(this,arguments);}n.propTypes={isSafeToSkipShim:m.bool,name:m.string.isRequired,onAttachmentLoad:m.func,open_url:m.string,rel:m.string,shimhash:m.string,type:m.string.isRequired,url:m.string};f.exports=n;}),null);
  __d('MercuryAttachmentMalicious.react',['fbt','XUINotice.react','XUIText.react','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(c('XUINotice.react'),{use:'warn'},c('React').createElement(c('XUIText.react'),{size:'small'},h._("This attachment has been marked as malicious."))));};function k(){i.apply(this,arguments);}f.exports=k;}),null);
  __d('ChatImageArrowDirection',['keyMirror'],(function a(b,c,d,e,f,g){'use strict';var h=c('keyMirror')({BOTH:null,LEFT:null,RIGHT:null});f.exports=h;}),null);
  __d('ChatImageWithArrow.react',['cx','ChatImageArrowDirection','Link.react','MercuryAttachmentConstants','React','XUISpinner.react','joinClasses'],(function a(b,c,d,e,f,g,h){'use strict';var i,j,k=c('React').PropTypes,l=30,m=15;i=babelHelpers.inherits(n,c('React').Component);j=i&&i.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=j.constructor).call.apply(o,[this].concat(r)),this.$ChatImageWithArrow3=function(){return Math.max(this.props.width,m);}.bind(this),this.$ChatImageWithArrow6=function(){return Math.max(this.props.height,l);}.bind(this),this.$ChatImageWithArrow5=function(t){if(this.props.onClick)return (c('React').createElement(c('Link.react'),{onClick:this.props.onClick},t));return t;}.bind(this),this.$ChatImageWithArrow7=function(t,u,v,w){if(u===c('ChatImageArrowDirection').LEFT){return 'translate('+v+'px, '+w+'px)'+'rotate(45deg)';}else return 'translate('+(t-v)+'px, '+w+'px)'+'rotate(45deg)';},this.$ChatImageWithArrow8=function(t,u,v,w){if(u===c('ChatImageArrowDirection').LEFT){return 'rotate(-45deg)'+'translate(-'+(this.$ChatImageWithArrow1+v)+'px,'+'-'+w+'px)';}else return 'rotate(-45deg)'+'translate(-'+(t-v)+'px, -'+w+'px)';}.bind(this),this.$ChatImageWithArrow4=function(){var t={width:this.props.sideLength,height:this.props.sideLength};if(this.props.source)t.backgroundImage='url('+this.props.source+')';var u={width:this.props.sideLength,height:this.props.sideLength};if(this.props.source)u.opacity=0;var v={width:this.$ChatImageWithArrow3(),height:this.$ChatImageWithArrow6()};if(this.props.source){v.backgroundImage='url('+this.props.source+')';v.backgroundSize='cover';}return (c('React').createElement('div',{className:"_4yp6"},c('React').createElement('div',{className:"_4ypb _3_om",style:v},c('React').createElement(c('XUISpinner.react'),{size:'small'}))));}.bind(this),p;}n.prototype.render=function(){this.$ChatImageWithArrow1=Math.floor(this.props.sideLength/Math.sqrt(2));this.$ChatImageWithArrow2=Math.ceil(this.$ChatImageWithArrow3()+this.$ChatImageWithArrow1);if(this.props.isLoading)return this.$ChatImageWithArrow4();var o=c('joinClasses')("_4yp6"+(this.props.round?' '+"_3lk2":''),this.props.rootClassName);return this.$ChatImageWithArrow5(c('React').createElement('div',{className:o},c('React').createElement('div',{className:"_52kr"+(this.props.round?' '+"_3_om":''),style:{width:this.$ChatImageWithArrow3(),height:this.$ChatImageWithArrow6()}},c('React').createElement('div',{className:"_4yp9",style:{backgroundImage:'url('+this.props.source+')',width:this.$ChatImageWithArrow3(),height:this.$ChatImageWithArrow6()}}))));};n.propTypes={arrowDirection:k.oneOf(Object.keys(c('ChatImageArrowDirection'))),onClick:k.func,height:k.number.isRequired,isLoading:k.bool,round:k.bool,rootClassName:k.string,sideLength:k.number,source:k.string,width:k.number.isRequired};n.defaultProps={sideLength:c('MercuryAttachmentConstants').SIDE_LENGTH,isLoading:false,round:false};f.exports=n;}),null);
  __d('MercuryAttachmentPhoto.react',['ChatImageArrowDirection','ChatImageWithArrow.react','MercuryAttachmentViewer','MercuryConfig','MercuryIDs','MercuryMessageInfo','MessagesViewerSetID','React','SpotlightMercurySharedMediaViewer.react','URI','getPageIDFromThreadID'],(function a(b,c,d,e,f,g){'use strict';var h,i,j=c('React').PropTypes;h=babelHelpers.inherits(k,c('React').Component);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={newSharedPhotosView:false},this.$MercuryAttachmentPhoto1=function(q){var r=this.props.image,s=true;if(!this.props.hasAttribution&&this.props.count)s=this.props.count===1;var t=this.props.message,u=t.thread_fbid?t.thread_fbid:c('MercuryIDs').getThreadFBIDFromThreadID(t.thread_id),v=new (c('URI'))('/ajax/messaging/attachments/sharedphotos.php').setQueryData({thread_id:u,image_id:r.metadata.fbid}),w=c('MessagesViewerSetID').MESSAGES_VIEW_ALL_IN_THREAD;c('MercuryAttachmentViewer').bootstrapWithConfig({dimensions:r.metadata.dimensions,disablePaging:s,endpoint:v,fbid:r.metadata.fbid,setID:w,src:r.preview_url},null);}.bind(this),this.$MercuryAttachmentPhoto2=function(){var q=this.props.image;if(q&&q.metadata)this.setState({newSharedPhotosView:q.metadata.fbid});}.bind(this),this.$MercuryAttachmentPhoto3=function(){this.setState({newSharedPhotosView:null});}.bind(this),m;}k.prototype.componentDidMount=function(){c('MercuryAttachmentViewer').preload();this.props.onAttachmentLoad&&this.props.onAttachmentLoad(this.props.height);};k.prototype.$MercuryAttachmentPhoto4=function(){var l=this.props.message.thread_fbid||this.props.message.thread_id&&c('MercuryIDs').getThreadFBIDFromThreadID(this.props.message.thread_id);return (c('React').createElement(c('SpotlightMercurySharedMediaViewer.react'),{onClosePhotoView:this.$MercuryAttachmentPhoto3,photoID:String(this.state.newSharedPhotosView),rootClassName:'',threadID:l,disableForward:false,enableShareToFB:true}));};k.prototype.render=function(){var l=c('MercuryMessageInfo').isInbound(this.props.message),m=!!c('getPageIDFromThreadID')(this.props.message.thread_id),n=!this.props.hasAttribution&&!m?this.$MercuryAttachmentPhoto2:this.$MercuryAttachmentPhoto1,o=this.state.newSharedPhotosView?this.$MercuryAttachmentPhoto4():null;return (c('React').createElement('div',null,o,c('React').createElement(c('ChatImageWithArrow.react'),{arrowDirection:l?c('ChatImageArrowDirection').LEFT:c('ChatImageArrowDirection').RIGHT,source:this.props.image.preview_url,height:this.props.height,width:this.props.width,onClick:n,round:!!this.props.round,isLoading:!!this.props.image.preview_uploading})));};k.propTypes={hasAttribution:j.bool,height:j.number,image:j.object.isRequired,message:j.object.isRequired,onAttachmentLoad:j.func,round:j.bool,width:j.number};f.exports=k;}),null);
  __d('ChatGridImage.react',['cx','Link.react','React'],(function a(b,c,d,e,f,g,h){'use strict';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.$ChatGridImage1=function(){this.props.metadata?this.props.onClick(String(this.props.metadata.fbid)):this.props.onClick();}.bind(this),n;}l.prototype.render=function(){if(this.props.isLoading)return c('React').createElement('div',{className:"_4ypb",style:{width:this.props.size,height:this.props.size}});return c('React').createElement(c('Link.react'),{onClick:this.$ChatGridImage1},c('React').createElement('div',{className:"_332l",style:{backgroundImage:'url('+this.props.source+')',width:this.props.size,height:this.props.size}}));};l.propTypes={isLoading:k.bool,metadata:k.object,onClick:k.func,size:k.number.isRequired,source:k.string};f.exports=l;}),null);
  __d('MercuryAttachmentPhotoGrid.react',['cx','ChatGridImage.react','Grid.react','MercuryAttachmentType','MercuryAttachmentViewer','MercuryIDs','MessagesViewerSetID','React','SpotlightMercurySharedMediaViewer.react','URI','getPageIDFromThreadID'],(function a(b,c,d,e,f,g,h){'use strict';var i,j,k=c('Grid.react').GridItem,l=c('React').PropTypes;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.state={newSharedPhotosView:null},this.$MercuryAttachmentPhotoGrid1=function(s,t){var u=this.props.count,v=this.props.message,w=v.thread_fbid?v.thread_fbid:c('MercuryIDs').getThreadFBIDFromThreadID(v.thread_id),x=new (c('URI'))('/ajax/messaging/attachments/sharedphotos.php').setQueryData({thread_id:w,image_id:s.metadata&&s.metadata.fbid}),y=c('MessagesViewerSetID').MESSAGES_VIEW_ALL_IN_THREAD;return (function(z){c('MercuryAttachmentViewer').bootstrapWithConfig({dimensions:s.metadata.dimensions,disablePaging:t||u===1,endpoint:x,fbid:s.metadata.fbid,setID:y,src:s.preview_url},null);});}.bind(this),this.$MercuryAttachmentPhotoGrid2=function(s){if(s)this.setState({newSharedPhotosView:s});}.bind(this),this.$MercuryAttachmentPhotoGrid3=function(){this.setState({newSharedPhotosView:null});}.bind(this),o;}m.prototype.componentDidMount=function(){c('MercuryAttachmentViewer').preload();};m.prototype.$MercuryAttachmentPhotoGrid4=function(){var n=this.props.message.thread_fbid||this.props.message.thread_id&&c('MercuryIDs').getThreadFBIDFromThreadID(this.props.message.thread_id);return (c('React').createElement(c('SpotlightMercurySharedMediaViewer.react'),{onClosePhotoView:this.$MercuryAttachmentPhotoGrid3,photoID:String(this.state.newSharedPhotosView),rootClassName:'',threadID:n,disableForward:false}));};m.prototype.render=function(){var n=this.props.images,o=n.length,p=o==2||o==4?2:3,q=Math.floor(this.props.size/p),r=[],s=n.some(function(x){return x.attach_type===c('MercuryAttachmentType').ANIMATED_IMAGE;}),t=this.state.newSharedPhotosView?this.$MercuryAttachmentPhotoGrid4():null,u=!!c('getPageIDFromThreadID')(this.props.message.thread_id);for(var v=0;v<n.length;v++){var w=!u?this.$MercuryAttachmentPhotoGrid2:this.$MercuryAttachmentPhotoGrid1(n[v],s);r.push(c('React').createElement(k,{key:v},c('React').createElement(c('ChatGridImage.react'),{isLoading:!!n[v].preview_uploading,onClick:w,metadata:n[v].metadata,size:q,source:n[v].preview_url})));}return (c('React').createElement('div',null,t,c('React').createElement(c('Grid.react'),{cols:p,className:"_5b2w",spacing:"_5b2x",alignh:'right'},r)));};m.propTypes={images:l.arrayOf(l.object).isRequired,size:l.number.isRequired,message:l.object.isRequired};f.exports=m;}),null);
  __d('ChatAttachmentAttribution.react',['cx','ImmutableObject','MercuryAttachmentAttribution.react','React'],(function a(b,c,d,e,f,g,h){'use strict';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(){return (c('React').createElement(c('MercuryAttachmentAttribution.react'),{attachment:this.props.attachment,className:"_1ekr _4i_6"}));};function l(){i.apply(this,arguments);}l.propTypes={attachment:k.instanceOf(c('ImmutableObject')),onAttachmentLoad:k.func};f.exports=l;}),null);
  __d('MercuryAttachmentVideo.react',['cx','ix','ChatAttachmentAttribution.react','ChatImageWithArrow.react','ChatSpeakingSticker.react','CenteredContainer.react','FBOverlayBase.react','FBOverlayContainer.react','FBOverlayElement.react','Image.react','ImmutableObject','MercuryAttachment','MercuryAttachmentViewer','MessengerVideoPlayer.react','React','SpotlightMercurySharedMediaViewer.react','Vector','getPageIDFromThreadID','joinClasses'],(function a(b,c,d,e,f,g,h,i){var j,k,l=c('React').PropTypes;j=babelHelpers.inherits(m,c('React').Component);k=j&&j.prototype;function m(){var n,o;'use strict';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.state={newSharedPhotosView:null},this.$MercuryAttachmentVideo1=function(){var s=this.props.duration,t=Math.floor(s/60),u=s%60;if(u<10)return t+':0'+u;return t+':'+u;}.bind(this),this.openViewer=function(){var s=this.props,t=s.pageID,u=s.videoID,v=s.videoSize,w=s.videoURI;v=new (c('Vector'))(v.width,v.height);c('MercuryAttachmentViewer').renderVideo({pageID:t,videoID:u,videoSize:v,videoURI:w});}.bind(this),this.$MercuryAttachmentVideo2=function(){if(this.props.videoID)this.setState({newSharedPhotosView:this.props.videoID});}.bind(this),this.$MercuryAttachmentVideo3=function(){this.setState({newSharedPhotosView:null});}.bind(this),this.$MercuryAttachmentVideo5=function(){if(this.props.isChat){return (c('React').createElement('div',null,c('React').createElement(c('ChatImageWithArrow.react'),{height:this.props.thumbSize.height,key:'previewImage',round:true,source:this.props.thumbnail,width:this.props.thumbSize.width}),c('React').createElement(c('ChatAttachmentAttribution.react'),{attachment:this.props.attachment,key:'chatAttribution'})));}else return (c('React').createElement(c('Image.react'),{height:this.props.thumbSize.height,width:this.props.thumbSize.width,src:this.props.thumbnail}));}.bind(this),this.$MercuryAttachmentVideo6=function(){if(this.props.isChat)return {};return this.props.thumbSize;}.bind(this),o;}m.prototype.componentDidMount=function(){'use strict';this.props.onAttachmentLoad&&this.props.onAttachmentLoad();c('MercuryAttachmentViewer').preload();};m.prototype.$MercuryAttachmentVideo4=function(){'use strict';return c('React').createElement(c('SpotlightMercurySharedMediaViewer.react'),{onClosePhotoView:this.$MercuryAttachmentVideo3,photoID:this.state.newSharedPhotosView,rootClassName:'',threadID:this.props.threadFBID,disableForward:false});};m.prototype.$MercuryAttachmentVideo7=function(n,o){'use strict';if(!n.legacy_attachment_id)return null;return (c('React').createElement(c('MessengerVideoPlayer.react'),{attachment:this.props.attachment,videoData:n,isInThread:true,isVisible:this.props.isVisible,onClick:o,className:c('joinClasses')(this.props.className,"_n4o"+(' '+"_3_om")+(' '+"_1wno"))}));};m.prototype.$MercuryAttachmentVideo8=function(n){'use strict';var o=this.props.thumbSize,p={x:o.width,y:o.height};return {legacy_attachment_id:this.props.videoID,original_dimensions:p,start_muted:true,no_fullscreen:true,hide_controls_on_finish:true,url:this.props.videoURI};};m.prototype.render=function(){'use strict';if(this.props.attachment.metadata&&this.props.attachment.metadata.render_as_sticker&&this.props.isChat)return (c('React').createElement(c('ChatSpeakingSticker.react'),{videoURI:this.props.videoURI,videoSize:this.props.videoSize}));var n=!!c('getPageIDFromThreadID')(this.props.threadID),o=!n?this.$MercuryAttachmentVideo2:this.openViewer,p=this.state.newSharedPhotosView&&this.props.threadFBID?this.$MercuryAttachmentVideo4():null,q=c('MercuryAttachment').hasAttribution(this.props.attachment),r="clearfix"+(' '+"_zow")+(' '+"_59go")+(q?' '+"_4yjw":'')+(this.props.isChat?' '+"_3ds5":''),s=this.$MercuryAttachmentVideo8(this.props.attachment),t=this.$MercuryAttachmentVideo7(s,o),u=t?t:c('React').createElement(c('FBOverlayContainer.react'),{className:r,key:'overlayContainer',onClick:o,style:this.$MercuryAttachmentVideo6()},c('React').createElement(c('FBOverlayBase.react'),null,this.$MercuryAttachmentVideo5()),c('React').createElement(c('FBOverlayElement.react'),null,c('React').createElement('div',{className:(!this.props.isChat?"_zox":'')+(q?' '+"_jt3":'')},c('React').createElement('span',{className:"_zoz"},this.$MercuryAttachmentVideo1()))),c('React').createElement(c('FBOverlayElement.react'),null,c('React').createElement(c('CenteredContainer.react'),{className:q?"_jt3":'',vertical:true},c('React').createElement(c('Image.react'),{src:i("27983")}))));if(this.props.isChat)return (c('React').createElement('div',null,p,u));return (c('React').createElement('div',null,p,u,c('React').createElement(c('ChatAttachmentAttribution.react'),{attachment:this.props.attachment,key:'inboxAttribution'})));};m.propTypes={attachment:l.instanceOf(c('ImmutableObject')),duration:l.number.isRequired,isChat:l.bool,isVisible:l.bool,threadID:l.string,threadFBID:l.string,name:l.string.isRequired,onAttachmentLoad:l.func,pageID:l.number,thumbSize:l.shape({height:l.number,width:l.number}).isRequired,thumbnail:l.string.isRequired,videoSize:l.shape({height:l.number,width:l.number}).isRequired,videoID:l.string.isRequired,videoURI:l.string.isRequired};f.exports=m;}),null);
  __d("XMessagingSetPreferencesController",["XController"],(function a(b,c,d,e,f,g){f.exports=c("XController").create("\/messaging\/preferences\/",{send_on_enter:{type:"Bool",defaultValue:false}});}),null);
  __d('PagesManagerMessagesInterface',['ge','Animation','Arbiter','AsyncRequest','MercuryThreadActions','XMessagingSetPreferencesController'],(function a(b,c,d,e,f,g){var h='PagesManagerMessagesInterface',i={applyIfVisibleOnPage:function j(k,l){var m=c('ge')(k);if(m)l(m);},changeThreadSpamStatus:function j(k,l,m){if(m){c('MercuryThreadActions').getForFBID(k).markSpam(l,'PagesManagerInterface');}else c('MercuryThreadActions').getForFBID(k).unmarkSpam(l,'PagesManagerInterface');},changeThreadArchivedStatus:function j(k,l,m,n){if(m){c('MercuryThreadActions').getForFBID(k).archive(l,h);}else c('MercuryThreadActions').getForFBID(k).unarchive(l,h);},changeThreadReadStatus:function j(k,l,m,n){if(m){c('MercuryThreadActions').getForFBID(k).markRead(l,h);}else c('MercuryThreadActions').getForFBID(k).markUnread(l,h);},hideElement:function j(k){new (c('Animation'))(k).to('opacity',0).duration(150).hide().go();},notifyUpdateCompleted:function j(){c('Arbiter').inform('PagesManagerLayout/refreshSection',{section:'messages'});},updateUnreadCount:function j(k){c('Arbiter').inform('pagesManagerMessaging/messageUnreadCountUpdated',{metricCount:k});c('Arbiter').inform('PagesManagerLayout/updateCount',{count:k,section:'messages'});c('Arbiter').inform('PagesManagerLayout/updateCount',{count:k,section:'messages',subsection:'inbox'});},updatePreferences:function j(k){var l=c('XMessagingSetPreferencesController').getURIBuilder().setBool('send_on_enter',k.sendOnEnter).getURI();new (c('AsyncRequest'))(l).send();}};f.exports=i;}),null);
  __d('PagesMessengerButtonSet.react',['cx','fbt','Arbiter','AsyncRequest','MercuryThreads','MessagingTag','PagesManagerMessagesInterface','PagesMessagingActionPlacement','PopoverMenu.react','XUIPopoverButton.react','React','ReactXUIMenu','XUIDialog.react','XUIDialogBody.react','XUIDialogButton.react','XUIDialogCancelButton.react','XUIDialogFooter.react','XUIDialogTitle.react','XNFXStartForMessageThreadController'],(function a(b,c,d,e,f,g,h,i){var j,k,l=c('React').PropTypes,m=c('ReactXUIMenu').Item;j=babelHelpers.inherits(n,c('React').Component);k=j&&j.prototype;function n(o){'use strict';k.constructor.call(this,o);this.$PagesMessengerButtonSet2=function(p,q){if(!q.item.isDisabled()){var r=q.item.getValue(),s=true;if('mark_as_unread'===r){this.$PagesMessengerButtonSet3();}else if('archive_thread_toggle'===r){this.$PagesMessengerButtonSet4();}else if('report_message'===r){this.$PagesMessengerButtonSet5();}else if('spam_thread_toggle'===r){this.$PagesMessengerButtonSet6();}else if('delete'===r){this.props.onDeleteMessageAction(false);s=false;}else if('delete_thread'===r){this.setState({showDeleteAllMessagesDialog:true});s=false;}if(s)c('Arbiter').inform('PagesMessengerThread/hideMessageThread');}}.bind(this);this.$PagesMessengerButtonSet3=function(){c('PagesManagerMessagesInterface').changeThreadReadStatus(this.props.user,this.props.threadElementID,false,c('PagesMessagingActionPlacement').MESSAGE_DIALOG_ACTION_LIST);}.bind(this);this.$PagesMessengerButtonSet4=function(){c('PagesManagerMessagesInterface').changeThreadArchivedStatus(this.props.user,this.props.threadElementID,!this.isArchived(),c('PagesMessagingActionPlacement').MESSAGE_DIALOG_ACTION_LIST);}.bind(this);this.$PagesMessengerButtonSet5=function(){var p=c('XNFXStartForMessageThreadController').getURIBuilder().setString('thread_fbid',this.props.threadElementID).setInt('av',this.props.user).getURI();new (c('AsyncRequest'))().setURI(p).send();}.bind(this);this.$PagesMessengerButtonSet6=function(){c('PagesManagerMessagesInterface').changeThreadSpamStatus(this.props.user,this.props.threadElementID,!this.isSpam());}.bind(this);this.renderAuxButtonSet=function(){var p=this.isArchived()?i._("Unarchive"):i._("Archive"),q=c('React').createElement(m,{key:'archive_thread_toggle',value:'archive_thread_toggle'},p),r=this.isSpam()?i._("Not Spam"):i._("Mark as Spam"),s=c('React').createElement(m,{key:'spam_thread_toggle',value:'spam_thread_toggle'},r),t=[];if(!this.isSpam())t.push(q);if(this.props.allowReport)t.push(c('React').createElement(m,{key:'report_message',value:'report_message'},i._("Report")));if(!this.isArchived())t.push(s);var u=c('React').createElement(c('ReactXUIMenu'),{onItemClick:this.$PagesMessengerButtonSet2},c('React').createElement(m,{value:'mark_as_unread'},i._(["Mark as Unread","d40d50f73da3233202117a2dc422f97d"])),t,c('React').createElement(m,{value:'delete',disabled:this.props.isDeleteButtonDisabled},i._("Delete Selected")),c('React').createElement(m,{value:'delete_thread'},i._("Delete All")));return u;}.bind(this);this.isSpam=function(){return this.state.currentFolder===c('MessagingTag').SPAM;}.bind(this);this.isArchived=function(){return this.state.currentFolder===c('MessagingTag').ARCHIVED;}.bind(this);this.renderDeleteAllMessagesConfirmationDialog=function(){return (c('React').createElement(c('XUIDialog.react'),{width:360,shown:this.state.showDeleteAllMessagesDialog,onToggle:this.$PagesMessengerButtonSet7},c('React').createElement(c('XUIDialogTitle.react'),null,i._("Delete all messages?")),c('React').createElement('div',{className:"_4asv"},c('React').createElement(c('XUIDialogBody.react'),null,i._("Are you sure you want to delete all messages?")),c('React').createElement(c('XUIDialogFooter.react'),null,c('React').createElement(c('XUIDialogCancelButton.react'),{onClick:this.$PagesMessengerButtonSet8}),c('React').createElement(c('XUIDialogButton.react'),{use:'confirm',label:i._("Delete Messages"),onClick:this.$PagesMessengerButtonSet9})))));}.bind(this);this.$PagesMessengerButtonSet9=function(){this.setState({showDeleteAllMessagesDialog:false});this.props.onDeleteMessageAction(true);c('Arbiter').inform('PagesMessengerThread/hideMessageThread');}.bind(this);this.$PagesMessengerButtonSet8=function(){this.setState({showDeleteAllMessagesDialog:false});}.bind(this);this.$PagesMessengerButtonSet7=function(p){if(!p)this.$PagesMessengerButtonSet8();}.bind(this);this.$PagesMessengerButtonSet1=c('MercuryThreads').getForFBID(o.user);this.state={currentFolder:o.folder,showDeleteAllMessagesDialog:false};}n.prototype.render=function(){'use strict';return c('React').createElement('div',null,c('React').createElement(c('PopoverMenu.react'),{alignh:'right',menu:this.renderAuxButtonSet()},c('React').createElement(c('XUIPopoverButton.react'),{label:i._("Actions")})),this.renderDeleteAllMessagesConfirmationDialog());};n.propTypes={isDeleteButtonDisabled:l.bool.isRequired,user:l.string.isRequired,threadID:l.string.isRequired,threadElementID:l.string.isRequired,folder:l.string.isRequired,onDeleteMessageAction:l.func.isRequired,allowReport:l.bool.isRequired};f.exports=n;}),null);
  __d('PagesMessengerInfoButton.react',['cx','fbt','Link.react','PopoverMenu.react','React','ReactMenu','XUIMenuSeparator.react'],(function a(b,c,d,e,f,g,h,i){var j,k,l=c('ReactMenu').Item,m='/help/contact/1024405850920269',n='/help/988319821208361';j=babelHelpers.inherits(o,c('React').Component);k=j&&j.prototype;o.prototype.render=function(){'use strict';var p=c('React').createElement(c('ReactMenu'),null,c('React').createElement(l,{href:n,target:'_blank'},i._("Visit Help Center")),c('React').createElement(c('XUIMenuSeparator.react'),null),c('React').createElement(l,{href:m,target:'_blank'},i._("Send Feedback")));return (c('React').createElement(c('PopoverMenu.react'),{className:"_jrs",menu:p},c('React').createElement(c('Link.react'),{className:"_jrt"})));};function o(){'use strict';j.apply(this,arguments);}f.exports=o;}),null);
  __d('PagesMessengerPageAdminNoteButton.react',['cx','fbt','Link.react','React'],(function a(b,c,d,e,f,g,h,i){'use strict';var j,k,l=c('React').PropTypes;j=babelHelpers.inherits(m,c('React').Component);k=j&&j.prototype;m.prototype.render=function(){var n=i._("Create an admin note");return (c('React').createElement(c('Link.react'),{'aria-label':n,className:"_lxz",'data-hover':'tooltip','data-tooltip-alignh':'center','data-tooltip-content':n,onClick:this.props.onClick}));};function m(){j.apply(this,arguments);}m.propTypes={onClick:l.func};f.exports=m;}),null);
  __d('PagesMessengerComposer.react',['cx','fbt','ChatPhotoUploader.react','DragDropTarget','EmoticonsList','EmoticonUtils','ImageBlock.react','MercuryPageMessageActions','MercuryConfig','MercuryDragDropPrompt.react','MercuryParticipants','React','ReactDOM','Run','PagesManagerMessagesInterface','PagesMessengerInfoButton.react','PagesMessageSuggestedResponseHandler','PagesMessengerSuggestedResponseView.react','PagesMessengerFileUploader.react','PagesMessengerShareLinkUploader','PagesMessengerTextInput.react','Image.react','MercuryIDs','MercuryMessageIDs','MercuryMessageObject','MercuryMessages','MercurySourceType','URI','XUICheckboxInput.react','XUIButton.react','PagesMessagingConfig','PagesEventObserver','PagesEventType','PagesMessengerPageAdminNoteButton.react','SelectionPosition','SavedResponsesUtils','UFIStickerButton.react','joinClasses'],(function a(b,c,d,e,f,g,h,i){var j,k,l=c('React').PropTypes;j=babelHelpers.inherits(m,c('React').Component);k=j&&j.prototype;function m(n){'use strict';k.constructor.call(this,n);this.hasInput=function(){return !!this.state.value;}.bind(this);this.clearInput=function(){this.setState({value:''});}.bind(this);this.focusInput=function(){if(this.refs.textInput)c('ReactDOM').findDOMNode(this.refs.textInput).focus();}.bind(this);this.$PagesMessengerComposer4=function(){if(this.props.focusOnUpdate)this.focusInput();}.bind(this);this.setUpShareLinkUploader=function(){if(this.refs.linkPreview&&this.refs.textInput)this.setState({shareLinkUploader:new (c('PagesMessengerShareLinkUploader'))(c('ReactDOM').findDOMNode(this.refs.linkPreview),this.refs.textInput.refs.input,function(){return this.$PagesMessengerComposer5;}.bind(this),function(){return this.$PagesMessengerComposer6;}.bind(this),this.props.user)});}.bind(this);this.processConfirm=function(o){if(this.state.isPageAdminNoteMode){this.processCreateNote(o);}else this.processSend(o);}.bind(this);this.processCreateNote=function(o){if(this.hasEnteredText()){var p={creatorID:this.props.creatorInfo.creatorID,creatorType:this.props.creatorInfo.creatorType,creatorName:this.props.creatorInfo.creatorName,labelType:'page_admin_note',pageID:this.props.creatorInfo.pageID,profileURI:this.props.creatorInfo.profileURI},q={id:null,body:this.state.value,creator_info:p,timestamp:Math.floor(Date.now()/1000)};this.$PagesMessengerComposer3.getThreadMessagesRange(this.props.threadID,0,1,function(r){if(!r.length)return;var s=r[0];if(this.$PagesMessengerComposer3.isLocalMessage(s)){c('MercuryMessageIDs').getServerIDs([s.message_id],function(t){if(t.length){var u=t[0];this.$PagesMessengerComposer2.createNote(q,this.props.threadID,u);}}.bind(this));}else this.$PagesMessengerComposer2.createNote(q,this.props.threadID,s.message_id);}.bind(this));o.preventDefault();this.clearInput();this.setState({isPageAdminNoteMode:!this.state.isPageAdminNoteMode});}}.bind(this);this.processSend=function(o){var p=this.refs.textInput.refs.input.value,q=[],r=[],s=[],t=[],u=[],v=[];q=this.$PagesMessengerComposer8.getAttachments();r=this.$PagesMessengerComposer8.getImageFiles();s=this.$PagesMessengerComposer8.getAnimatedImageFiles();t=this.$PagesMessengerComposer8.getVideoFiles();u=this.$PagesMessengerComposer8.getAudioFiles();v=this.$PagesMessengerComposer8.getFiles();var w=this.state.shareLinkUploader.getAttachData();if(this.$PagesMessengerComposer9()){this.$PagesMessengerComposer10();o.preventDefault();return;}if(!p&&!q.length&&!r.length&&!t.length&&!v.length&&!w)return;var x=this.$PagesMessengerComposer1.constructUserGeneratedMessageObject(p,c('MercurySourceType').TITAN_WEB,this.props.threadID,null,this.props.creatorInfo);if(w){x.has_attachment=true;x.content_attachment=w;}if(q.length>0){x.has_attachment=true;x.raw_attachments=q;}if(r.length>0){x.image_ids=r;x.has_attachment=true;}if(s.length>0){x.gif_ids=s;x.has_attachment=true;}if(t.length>0){x.video_ids=t;x.has_attachment=true;}if(u.length>0){x.audio_ids=u;x.has_attachment=true;}if(v.length>0){x.file_ids=v;x.has_attachment;}c('PagesEventObserver').logData_DEPRECATED({page_id:this.props.user,event_name:c('PagesEventType').MESSAGES_DIALOG_SEND,thread_id:this.props.threadElementID},null);var y=this.props.suggestedResponseHandler;if(y&&y.shouldBeTreatedAsRejected())y.sendFeedback(false);this.props.onBeforeSend();this.$PagesMessengerComposer2.send(x);this.$PagesMessengerComposer8.removeAttachments();this.state.shareLinkUploader.clear();o.preventDefault();this.setState({value:''});}.bind(this);this.onChange=function(o){this.setState({value:o.target.value});}.bind(this);this.$PagesMessengerComposer9=function(){return this.$PagesMessengerComposer8.isUploading();}.bind(this);this.$PagesMessengerComposer10=function(){this.props.displayErrorMessage(true);}.bind(this);this.$PagesMessengerComposer5=function(){if(this.$PagesMessengerComposer11)if(this.$PagesMessengerComposer9())return;this.$PagesMessengerComposer11=false;this.props.displayErrorMessage(false);}.bind(this);this.setSavedResponse=function(o,p){if(this.$PagesMessengerComposer8)this.$PagesMessengerComposer8.removeAttachments();if(p)this.$PagesMessengerComposer8.addCachedAttachments([c('SavedResponsesUtils').generateImageMetadata(p)]);this.setState({value:o},this.refs.textInput.resetHeight);}.bind(this);this.setPlaceholderText=function(o){this.setState({temporaryPlaceholder:o},this.refs.textInput.resetHeight);}.bind(this);this.$PagesMessengerComposer6=function(){c('ReactDOM').findDOMNode(this.refs.textInput).focus();}.bind(this);this.setFileUploader=function(o){this.$PagesMessengerComposer8=o;}.bind(this);this.$PagesMessengerComposer19=function(event){var o=event.target.checked;this.setState({isQuickReplyMode:o});c('PagesMessagingConfig').sendOnEnter=o;c('PagesManagerMessagesInterface').updatePreferences({sendOnEnter:o});}.bind(this);this.$PagesMessengerComposer15=function(o,p){var q=this.$PagesMessengerComposer1.constructUserGeneratedMessageObject('',c('MercurySourceType').TITAN_WEB,this.props.threadID,null,this.props.creatorInfo);this.props.onBeforeSend();this.$PagesMessengerComposer2.addAttachmentPlaceholder(q,p.upload_id,p);}.bind(this);this.$PagesMessengerComposer12=function(o,event){var p=this.$PagesMessengerComposer1.constructUserGeneratedMessageObject('',c('MercurySourceType').TITAN_WEB,this.props.threadID,null,this.props.creatorInfo);p.has_attachment=true;p.sticker_id=o;this.props.onBeforeSend();this.$PagesMessengerComposer2.send(p);}.bind(this);this.$PagesMessengerComposer13=function(o){var p=c('EmoticonsList').symbols[o];if(!p)return;var q=this.refs.textInput.refs.input;this.$PagesMessengerComposer20=this.$PagesMessengerComposer20||new (c('SelectionPosition'))(q);var r=this.state.value||'',s=c('EmoticonUtils').insertEmoticon(p,r,this.$PagesMessengerComposer20.getPos());this.$PagesMessengerComposer20.setPos(s.start,s.end);this.setState({value:s.result});}.bind(this);this.$PagesMessengerComposer16=function(o,p){this.props.onBeforeSend();this.$PagesMessengerComposer2.confirmAttachmentPlaceholder(p.upload_id,p);}.bind(this);this.$PagesMessengerComposer17=function(o,p){this.$PagesMessengerComposer2.cancelAttachmentPlaceholder(p.upload_id,p);}.bind(this);this.$PagesMessengerComposer14=function(){return new (c('URI'))(c('MercuryConfig').upload_url).addQueryData('request_user_id',this.props.user).toString();}.bind(this);this.$PagesMessengerComposer18=function(){this.clearInput();this.setState({isPageAdminNoteMode:!this.state.isPageAdminNoteMode});}.bind(this);this.getConfirmButtonLabel=function(){if(this.state.isPageAdminNoteMode){return i._("Note");}else return i._("Reply");}.bind(this);this.getDefaultPlaceholder=function(){if(this.state.isPageAdminNoteMode){return i._("Add an admin note...");}else return i._("Write a reply...");}.bind(this);this.getSendOnEnterText=function(){if(this.state.isPageAdminNoteMode){return i._("Press Enter to create note");}else return i._("Press Enter to send");}.bind(this);this.$PagesMessengerComposer1=c('MercuryMessageObject').getForFBID(n.user);this.$PagesMessengerComposer2=c('MercuryPageMessageActions').getForFBID(n.user);this.$PagesMessengerComposer3=c('MercuryMessages').getForFBID(n.user);this.state={currentParticipant:null,isQuickReplyMode:c('PagesMessagingConfig').sendOnEnter,isPageAdminNoteMode:false,shareLinkUploader:null,temporaryPlaceholder:null};}m.prototype.componentWillMount=function(){'use strict';var n=c('MercuryIDs').getParticipantIDFromUserID(this.props.user);c('MercuryParticipants').get(n,function(o){this.setState({currentParticipant:o});}.bind(this));};m.prototype.componentDidMount=function(){'use strict';this.setUpShareLinkUploader();if(c('PagesMessagingConfig').dragdropEnabled)new (c('DragDropTarget'))(c('ReactDOM').findDOMNode(this)).setOnFilesDropCallback(function(n){var o=this.refs.fileUploader;if(o)o.addFiles(n);}.bind(this)).setOnURLDropCallback(function(n){var o=this.state.shareLinkUploader;if(o)o.loadShare(n);}.bind(this)).enable();this.$PagesMessengerComposer4();this.$PagesMessengerComposer7=c('Run').onBeforeUnload(function(){return this.hasInput()?i._("You haven't sent your message yet. Do you want to leave without sending it?"):null;}.bind(this));};m.prototype.componentDidUpdate=function(){'use strict';if(!this.state.shareLinkUploader)this.setUpShareLinkUploader();this.$PagesMessengerComposer4();};m.prototype.componentWillUnmount=function(){'use strict';this.$PagesMessengerComposer7&&this.$PagesMessengerComposer7.remove();this.state.shareLinkUploader&&this.state.shareLinkUploader.destroy();};m.prototype.render=function(){'use strict';if(!this.state.currentParticipant)return c('React').createElement('div',null);var n=this.state.temporaryPlaceholder?this.state.temporaryPlaceholder:this.getDefaultPlaceholder(),o=this.props.isSavedResponsesBrowsePanelOn?i._("Hide saved replies"):i._("Show saved replies");return c('React').createElement('div',babelHelpers['extends']({},this.props,{className:c('joinClasses')(this.props.className,"_5id0 _1ia")}),c('React').createElement(c('MercuryDragDropPrompt.react'),null),c('React').createElement(c('ImageBlock.react'),null,c('React').createElement('a',{className:"_5icz"},c('React').createElement(c('Image.react'),{src:this.state.currentParticipant.image_src,className:"_5ic-"})),c('React').createElement('div',{className:"_5tbe"},c('React').createElement(c('PagesMessengerTextInput.react'),{className:"_5id1",onNoShiftEnter:this.state.isQuickReplyMode?this.processConfirm:null,placeholder:n,onChange:this.onChange,onKeyUp:this.props.onKeyUp,value:this.state.value,ref:'textInput'}),c('React').createElement(c('PagesMessengerSuggestedResponseView.react'),{suggestedResponseHandler:this.props.suggestedResponseHandler,onAccepted:function(p){this.setState({value:p});}.bind(this)}),c('React').createElement('div',{className:"_oan",ref:'linkPreview'}))),c('React').createElement('div',{className:"_2w65"},c('React').createElement('div',{className:"_2w66"},this.props.isSavedResponseEnabled?c('React').createElement(c('XUIButton.react'),{onClick:this.props.onSavedResponsesButtonClicked,label:o}):null,c('React').createElement(c('XUIButton.react'),{use:'confirm',onClick:this.processConfirm,label:this.getConfirmButtonLabel()})),c('React').createElement('div',{className:"_5tbf"},c('PagesMessagingConfig').feedbackFormEnabled?c('React').createElement(c('PagesMessengerInfoButton.react'),null):null,c('PagesMessagingConfig').stickersEnabled?c('React').createElement(c('UFIStickerButton.react'),{onStickerSelected:this.$PagesMessengerComposer12,onEmoticonSelected:this.$PagesMessengerComposer13}):null,c('React').createElement(c('ChatPhotoUploader.react'),{customUI:true,imageClassName:"hidden_elem",linkClassName:"_6gb _6ge",className:"_6gd _1_18",actionURI:this.$PagesMessengerComposer14(),onSubmit:this.$PagesMessengerComposer15,onAllUploadsComplete:this.$PagesMessengerComposer16,onLastUploadFail:this.$PagesMessengerComposer17}),this.props.attachmentsShelf?c('React').createElement(c('PagesMessengerFileUploader.react'),{actionURI:this.$PagesMessengerComposer14(),attachmentsShelf:c('ReactDOM').findDOMNode(this.props.attachmentsShelf),onUploadFinished:this.$PagesMessengerComposer5,onFileUploaderMounted:this.setFileUploader,onSubmit:function(){return this.$PagesMessengerComposer6;}.bind(this),ref:'fileUploader'}):null,this.props.isPageAdminNoteEnabled?c('React').createElement(c('PagesMessengerPageAdminNoteButton.react'),{onClick:this.$PagesMessengerComposer18}):null,c('React').createElement('div',{className:"_29hw"},c('React').createElement(c('XUICheckboxInput.react'),{className:"_2w68",checked:this.state.isQuickReplyMode,onChange:this.$PagesMessengerComposer19}),c('React').createElement('div',{className:"_2w67"},this.getSendOnEnterText())))));};m.propTypes={user:l.string.isRequired,threadID:l.string.isRequired,threadElementID:l.string.isRequired,onBeforeSend:l.func.isRequired,onKeyUp:l.func,otherUserID:l.string,creatorInfo:l.object,attachmentsShelf:l.object,displayErrorMessage:l.func.isRequired,suggestedResponseHandler:l.instanceOf(c('PagesMessageSuggestedResponseHandler')),isSuggestedResponseEnabled:l.bool.isRequired,isSavedResponseEnabled:l.bool.isRequired,isPageAdminNoteEnabled:l.bool.isRequired,isSavedResponsesBrowsePanelOn:l.bool,onSavedResponsesButtonClicked:l.func.isRequired,focusOnUpdate:l.bool};m.defaultProps={initialValue:"",isSavedResponsesBrowsePanelOn:false,focusOnUpdate:true};f.exports=m;}),null);
  __d('MercuryAttachmentRenderer',['cx','MercuryAttachmentAudioClip.react','ChatAttachmentAttribution.react','EmojiSticker.react','ImmutableObject','MercuryAttachment','MercuryAttachmentFile.react','MercuryAttachmentPhoto.react','MercuryAttachmentPhotoGrid.react','MercuryAttachmentVideo.react','MercuryIDs','MercuryShareAttachment.react','MercuryShareAttachmentRenderLocations','MessagingGiftWrapChecker','MessengerFromViewerUtils','MessengerHotLikeUtils','MessengerSupportedEmojiUtils','MessengerWebDriverTestIDs','React','Sticker.react','StickerAssetType','StickerConstants','XStickerAssetController'],(function a(b,c,d,e,f,g,h){'use strict';var i=12,j={renderFile:function k(l,m,n){return (c('React').createElement(c('MercuryAttachmentFile.react'),{isSafeToSkipShim:l.url_skipshim,name:l.name,onAttachmentLoad:n,open_url:m?null:l.open_url,rel:l.rel,shimhash:l.url_shimhash,type:l.icon_type,url:l.url}));},renderAudioClip:function k(l,m,n,o,p){var q=l.metadata.duration/1000,r=m?c('MercuryShareAttachmentRenderLocations').CHAT:c('MercuryShareAttachmentRenderLocations').WEB_INBOX,s=100,t=m?160:400,u=100;if(q>=5)u=(1-Math.pow(10,(q-5)/-30))*(t-s)+s;return [c('React').createElement(c('MercuryAttachmentAudioClip.react'),{customColor:n,duration:l.metadata.duration/1000,isChat:m,isFromViewer:c('MessengerFromViewerUtils').isFromViewer(o),location:r,key:'audioClip',onAttachmentLoad:p,rootClassName:c('MercuryAttachment').hasAttribution(l)?"_4yjw":'',showHelp:false,src:l.url,width:u}),c('React').createElement(c('ChatAttachmentAttribution.react'),{attachment:new (c('ImmutableObject'))(l),key:'audioAttribution',onAttachmentLoad:p})];},renderVideo:function k(l,m,n,o,p){var q=m?l.metadata.chat_size:l.metadata.inbox_size,r=m?l.metadata.chat_preview:l.metadata.inbox_preview;if(!q||!r)return null;var s=n&&(n.thread_fbid||n.thread_id&&c('MercuryIDs').getThreadFBIDFromThreadID(n.thread_id));return (c('React').createElement('div',null,c('React').createElement(c('MercuryAttachmentVideo.react'),{attachment:new (c('ImmutableObject'))(l),duration:l.metadata.duration,isChat:m,isVisible:p,threadID:n&&n.thread_id,threadFBID:s,name:l.name,onAttachmentLoad:o,pageID:l.metadata.pageid,thumbSize:q,thumbnail:r,videoSize:l.metadata.dimensions,videoID:l.metadata.fbid,videoURI:l.url})));},constructStickerComponent:function k(l,m,n,o,p,q){var r=o?'chatScrolled/':'messengerScrolled/';r+=l.thread_id;if(!m){m=c('MessengerHotLikeUtils').getMetadataForHotLike(l.sticker_id);if(!m){var s={},t={height:c('StickerConstants').THREAD_SIZE,width:c('StickerConstants').THREAD_SIZE},u=t.height,v=t.width;s.height=u;s.width=v;s.stickerID=l.sticker_id;s.spriteURI='';s.spriteURI2x='';s.paddedSpriteURI='';s.paddedSpriteURI2x='';m=s;}}var w=null;if(m.stickerID){w=m.stickerID.toString();}else if(l.sticker_id)w=l.sticker_id.toString();var x=null;if(m.packID)x=m.packID.toString();var y=c('XStickerAssetController').getURIBuilder().setInt('sticker_id',w),z=null,aa=null;if(window.devicePixelRatio&&window.devicePixelRatio>1){aa=m.paddedSpriteURI2x;z=m.spriteURI2x;}else{aa=m.paddedSpriteURI;z=m.spriteURI;}var ba=!!c('MessengerHotLikeUtils').getMetadataForHotLike(w)&&c('MessagingGiftWrapChecker').shouldRenderWithGiftWrap(l);return (c('React').createElement(c('Sticker.react'),{animationTrigger:'hover',className:ba?"_3m7x":'',customColor:q,frameCount:m.frameCount||1,frameRate:m.frameRate||83,framesPerCol:m.framesPerCol||1,framesPerRow:m.framesPerRow||1,onAttachmentLoad:p,onStickerClick:n,packID:x,paddedSpriteURI:aa,sourceHeight:m.height,sourceURI:y.setEnum('image_type',c('StickerAssetType').IMAGE).getURI().toString(),sourceWidth:m.width,spriteURI:z,stickerID:w,subscribedThreadID:r,testID:c('MessengerWebDriverTestIDs').STICKER}));},constructEmojiLikeAttachment:function k(l,m,n){var o=c('MessengerSupportedEmojiUtils').getNewEmojiData(m.body,l.size),p=o?o.emoji:undefined;if(!o)return null;return (c('React').createElement(c('EmojiSticker.react'),{className:"_2poz _ui9",key:'sticker:'+m.message_id,emoji:m.body,emojiImage:p,sourceURI:'',onAttachmentLoad:n}));},renderPhotoAttachments:function k(l,m,n,o){var p=l.length;if(!p)return null;var q=m&&m.thread_fbid;if(m&&!q)q=c('MercuryIDs').isLocalThread(m.thread_id)?null:c('MercuryIDs').getThreadFBIDFromThreadID(m.thread_id);if(p===1){var r=l[0],s=c('MercuryAttachment').resizeContain({width:n-i,height:n},{width:r.preview_width,height:r.preview_height});return (c('React').createElement('div',{className:"_55pk"+(' '+"_59go")+(c('MercuryAttachment').hasAttribution(r)?' '+"_4yjw":'')},c('React').createElement(c('MercuryAttachmentPhoto.react'),{image:r,width:s.width,hasAttribution:c('MercuryAttachment').hasAttribution(r),height:s.height,message:m,onAttachmentLoad:o,round:true}),c('React').createElement(c('ChatAttachmentAttribution.react'),{attachment:new (c('ImmutableObject'))(l[0])})));}return (c('React').createElement('div',{className:"_55pk"},c('React').createElement(c('MercuryAttachmentPhotoGrid.react'),{images:l,size:n,message:m})));},sortAttachmentsStablyByType:function k(l){var m=[c('MercuryAttachment').isEmojiLikeAttachment,c('MercuryAttachment').isPhotoAttachment,c('MercuryAttachment').isShareAttachment,c('MercuryAttachment').isFileAttachment,c('MercuryAttachment').isErrorAttachment];m.push(function(o){return true;});var n=m.map(function(o){return [];});l.forEach(function(o){for(var p=0;p<m.length;p++)if(m[p](o)){n[p].push(o);break;}});return Array.prototype.concat.apply([],n);},constructStoryBasedShareAttachment:function k(l,m,n,o,p,q){var r=n?c('MercuryShareAttachmentRenderLocations').CHAT:c('MercuryShareAttachmentRenderLocations').WEB_INBOX,s={maxWidth:o},t=null;if(l&&l.platform_xmd)t=JSON.parse(l.platform_xmd);return (c('React').createElement('div',{className:"_3_om"+(n?' '+"_3cpq":''),style:s},c('React').createElement(c('MercuryShareAttachment.react'),{attachment:m.share,isSponsored:l.is_sponsored,isVisible:q,location:r,maxWidth:o,messageID:l.message_id,mnMessageType:t&&t.template_type,onComponentLoaded:p,pageID:l.author,threadID:l.thread_id})));}};f.exports=j;}),null);
  __d('MercuryAttachments.react',['cx','MercuryAttachmentRenderer','ImmutableObject','MercuryAttachment','MercuryAttachmentMalicious.react','MercuryAttachmentError.react','MessagingFlowerBorder.react','MessagingGiftWrap.react','MessengerHotLikePreview.react','MessengerWebDriverTestIDs','MNCommerceMessageType','React','SubscriptionsHandler','emptyFunction','joinClasses'],(function a(b,c,d,e,f,g,h){'use strict';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.$MercuryAttachments1=function(r){this.props.onAttachmentLoad&&this.props.onAttachmentLoad(r);}.bind(this),this.$MercuryAttachments2=null,n;}l.prototype.componentDidMount=function(){this.$MercuryAttachments2=new (c('SubscriptionsHandler'))();};l.prototype.componentWillUnmount=function(){this.$MercuryAttachments2&&this.$MercuryAttachments2.release();};l.prototype.$MercuryAttachments3=function(m){if(c('MercuryAttachment').isStickerAttachment(m)){return c('MercuryAttachmentRenderer').constructStickerComponent(this.props.message,this.props.attachments[0].metadata,this.props.onStickerClick,this.props.isChat,this.$MercuryAttachments1,this.props.customColor);}else if(c('MercuryAttachment').isEmojiLikeAttachment(m)){var n=c('MercuryAttachmentRenderer').constructEmojiLikeAttachment(m,this.props.message,this.$MercuryAttachments1);return n?n:c('React').createElement(c('MercuryAttachmentError.react'),null);}else if(c('MercuryAttachment').isVoiceAttachment(m)){return c('MercuryAttachmentRenderer').renderAudioClip(this.props.attachments[0],this.props.isChat,this.props.customColor,this.props.message,this.$MercuryAttachments1);}else if(c('MercuryAttachment').isVideoAttachment(m)){return c('MercuryAttachmentRenderer').renderVideo(m,this.props.isChat,this.props.message,this.$MercuryAttachments1,this.props.isVisible);}else if(c('MercuryAttachment').isShareAttachment(m)){return c('MercuryAttachmentRenderer').constructStoryBasedShareAttachment(this.props.message,m,this.props.isChat,this.props.maxWidth,this.$MercuryAttachments1,this.props.isVisible);}else if(c('MercuryAttachment').isFileAttachment(m)){return c('MercuryAttachmentRenderer').renderFile(m,this.props.isChat,this.$MercuryAttachments1);}else if(c('MercuryAttachment').isErrorAttachment(m))return c('React').createElement(c('MercuryAttachmentError.react'),null);return c('React').createElement(c('MercuryAttachmentMalicious.react'),null);};l.prototype.render=function(){if(this.props.message.is_like_preview)return (c('React').createElement(c('MessengerHotLikePreview.react'),{isChat:this.props.isChat,key:'hlp:'+this.props.message.like_preview_since,since:this.props.message.like_preview_since,customLike:this.props.message.customLike,customColor:this.props.customColor}));if(this.props.attachments.length===0)return c('React').createElement('div',this.props);if(this.props.message.commerce_message_type===c('MNCommerceMessageType').RIDE_INTENT)return c('React').createElement('div',this.props);var m=c('MercuryAttachmentRenderer').renderPhotoAttachments(this.props.attachments.filter(c('MercuryAttachment').isPhotoAttachment),this.props.message,this.props.maxWidth,this.$MercuryAttachments1),n=c('MercuryAttachmentRenderer').sortAttachmentsStablyByType(this.props.attachments.filter(function(p){return !c('MercuryAttachment').isPhotoAttachment(p);})).map(function(p,q){return (c('React').createElement('span',{key:q},this.$MercuryAttachments3(p)));}.bind(this)),o=this.props.hasFlowerBorder?c('joinClasses')("_337n",this.props.className):this.props.className;return (c('React').createElement('div',babelHelpers['extends']({},this.props,{className:o,'data-testid':c('MessengerWebDriverTestIDs').ATTACHMENT_ROOT}),m,n,this.props.afterDecorators,this.props.renderProgressBar&&this.props.renderProgressBar()));};l.propTypes={afterDecorators:k.arrayOf(k.element),attachments:k.array.isRequired,customColor:k.string,customLike:k.object,maxWidth:k.number.isRequired,message:k.instanceOf(c('ImmutableObject')).isRequired,isChat:k.bool,isVisible:k.bool,onAttachmentLoad:k.func,onStickerClick:k.func,onUnwrap:k.func};l.defaultProps={isChat:false,onAttachmentLoad:c('emptyFunction'),onStickerClick:c('emptyFunction')};f.exports=l;}),null);
  __d('PagesMessengerMessage.react',['cx','HovercardLink','Image.react','ImageBlock.react','ImmutableObject','Layout.react','LeftRight.react','MercuryLogMessage.react','MercuryActionType','MercuryAttachment','MercuryAttachments.react','MercuryIDs','MercuryMessageBody.react','MercuryMessageError.react','MercuryParticipants','PagesMessengerCreatorInfo.react','React','TooltipLink.react','XUICheckboxInput.react','XUIGrayText.react','formatDate'],(function a(b,c,d,e,f,g,h){'use strict';var i,j,k=c('React').PropTypes,l=c('Layout.react').Column,m=c('Layout.react').FillColumn,n=406,o=94,p=200;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.state={participant:{}},this.isLogMessage=function(){return this.props.message.action_type===c('MercuryActionType').LOG_MESSAGE;}.bind(this),this.renderParticipantName=function(){var w=c('MercuryIDs').getUserIDFromParticipantID(this.state.participant.id),x=c('HovercardLink').constructEndpoint({id:w}).toString(),y=null;if(this.state.participant.href){y=c('React').createElement('a',{href:this.state.participant.href,'data-hovercard':x},this.state.participant.name);}else y=this.state.participant.name;var z=new Date(this.props.message.timestamp);return (c('React').createElement(c('LeftRight.react'),null,c('React').createElement('div',null,c('React').createElement('div',{className:"_5hpc"},y),this.renderCreatorInfo()),this.renderMessageDate(z)));}.bind(this),this.renderMessageDate=function(w){var x=new Date();if(x.getFullYear()===w.getFullYear()){return (c('React').createElement(c('TooltipLink.react'),{className:"_5icy",tooltip:c('React').createElement('span',null,c('formatDate')(w,'M d, Y g:ia'))},c('formatDate')(w,'M jS, g:ia')));}else return (c('React').createElement(c('XUIGrayText.react'),{shade:'light',size:'small',className:"_5icy"},c('formatDate')(w,'M d, Y g:ia')));},this.renderParticipantImage=function(){if(this.isLogMessage())return (c('React').createElement('div',{className:"_5icz"},c('React').createElement('div',{className:"_17y6"})));if(this.state.participant.href)return (c('React').createElement('a',{className:"_5icz",href:this.state.participant.href},c('React').createElement(c('Image.react'),{src:this.state.participant.image_src,className:"_5ic-"})));return (c('React').createElement('div',{className:"_5icz"},c('React').createElement(c('Image.react'),{src:this.state.participant.image_src,className:"_5ic-"})));}.bind(this),this.renderMessage=function(){if(this.isLogMessage())return c('React').createElement('div',null);var w=c('MercuryAttachment').get(this.props.message),x=null,y=this.props.customDialogWidth?this.props.customDialogWidth-o:n;if(w.length>0)x=c('React').createElement(c('MercuryAttachments.react'),{className:"_ksr",maxWidth:y,message:new (c('ImmutableObject'))(this.props.message),attachments:w});return (c('React').createElement('div',null,c('React').createElement(c('MercuryMessageBody.react'),{className:"_3qi9",body:this.props.message.body}),x,c('React').createElement(c('MercuryMessageError.react'),{message:new (c('ImmutableObject'))(this.props.message),authorFBID:this.props.user})));}.bind(this),this.renderCreatorInfo=function(){if(this.props.message.creator_info)return (c('React').createElement(c('PagesMessengerCreatorInfo.react'),{creator_info:this.props.message.creator_info}));}.bind(this),this.renderLogMessage=function(){var w=new Date(this.props.message.timestamp);return (c('React').createElement(c('LeftRight.react'),{className:"_17y7"},c('React').createElement(c('MercuryLogMessage.react'),{maxWidth:Math.floor(this.props.customDialogWidth-p),message:new (c('ImmutableObject'))(this.props.message)}),this.renderMessageDate(w)));}.bind(this),s;}q.prototype.componentWillMount=function(){c('MercuryParticipants').get(this.props.message.author,function(r){this.setState({participant:r});}.bind(this));};q.prototype.render=function(){if(!this.state.participant.id)return c('React').createElement('div',null);return (c('React').createElement('div',{className:"_5hpb"},c('React').createElement(c('Layout.react'),null,c('React').createElement(l,null,c('React').createElement(c('XUICheckboxInput.react'),{className:"_1mtg"+(this.isLogMessage()?' '+"invisible_elem":''),onChange:this.props.messageCheckStatusChangedHandler,value:this.props.message.message_id})),c('React').createElement(m,null,c('React').createElement(c('ImageBlock.react'),null,this.renderParticipantImage(),c('React').createElement('div',null,this.isLogMessage()?this.renderLogMessage():this.renderParticipantName(),this.renderMessage()))))));};q.propTypes={customDialogWidth:k.number.isRequired,messageCheckStatusChangedHandler:k.func.isRequired,user:k.string.isRequired,message:k.object.isRequired};q.defaultProps={customDialogWidth:500};f.exports=q;}),null);
  __d('MercurySeenByAll',['CSS','DataStore','MercuryDelayedRoger','DOM','MercuryIDs','MercuryViewer','MercuryThreads'],(function a(b,c,d,e,f,g){var h=c('MercuryDelayedRoger').get(),i=c('MercuryThreads').get(),j={},k={updateOnSeenChange:function m(n,o,p){j[n.tagName]=true;c('DataStore').set(n,'thread-id',o.thread_id);c('CSS').addClass(n,'seenByListener');l(n,o,p);}};function l(m,n,o){var p=null;if(o){p=c('MercuryIDs').getParticipantIDFromUserID(o);}else p=c('MercuryViewer').getID();var q=n.participants.filter(function(s){return s!==p;}),r=n.participants.length>0&&n.participants[0]===p;c('CSS').conditionClass(m,'repliedLast',r);c('CSS').conditionClass(m,'seenByAll',r&&h.getSeenBy(n.thread_id).length===q.length);}h.subscribe('state-changed',function(m,n){for(var o in j){var p=c('DOM').scry(document.body,o+'.seenByListener');for(var q=0;q<p.length;q++){var r=p[q],s=c('DataStore').get(r,'thread-id');if(n[s])i.getThreadMeta(s,function(t){l(r,t);});}}});f.exports=k;}),null);
  __d('MercuryThreadMetadataRenderer',['cx','fbt','CSS','DOM','DOMEmoji','DOMEmote','JSLogger','MercuryAttachmentType','MercuryIDs','MercuryMessageSourceTags','MercurySingletonProvider','MercuryThreadImage.react','MercuryThreadIDMap','MercuryThreadMetadataRawRenderer','MercuryThreadTitle.react','MercuryTimestamp','MNAdsLogMessageUtils','MNAdsMessageUtils','MercuryParticipants','React','ReactDOM','MercurySeenByAll','MercuryServerRequests','Style','MercuryThreads','Tooltip','URI','WorkModeConfig','arrayContains','createArrayFromMixed','formatDate','transformTextToDOM'],(function a(b,c,d,e,f,g,h,i){'use strict';var j=c('JSLogger').create('wm_timestamp');function k(p){this.$MercuryThreadMetadataRenderer1=p;this.$MercuryThreadMetadataRenderer2=c('MercuryServerRequests').getForFBID(p);this.$MercuryThreadMetadataRenderer3=c('MercuryThreads').getForFBID(p);this.$MercuryThreadMetadataRenderer4=c('MercuryThreadIDMap').getForFBID(p);}k.getForFBID=function(p){return o.getForFBID(p);};k.get=function(){return o.get();};k.prototype.renderTimestamp=function(p,q,r,s){if(s){if(!q){j.warn('no_title');q=new Date(s).toLocaleDateString();}p.setAttribute('title',q.toString());p.setAttribute('data-utime',(s/1000).toString());if(!r){j.warn('no_display');r=c('formatDate')(new Date(s),'g:ia');}c('DOM').setContent(p,r);c('CSS').show(p);}};k.prototype.renderMessageSourceTags=function(p,q,r,s){var t='',u='',v='';if(c('arrayContains')(r,c('MercuryMessageSourceTags').MESSENGER)){v="_9g";if(!c('WorkModeConfig').is_work_user){t=i._("Sent from Messenger");u=new (c('URI'))('/mobile/messenger');}else{t=i._("Sent from Work Chat");u=new (c('URI'))('https://work.fb.com/workchat/');}}else if(c('arrayContains')(r,c('MercuryMessageSourceTags').MOBILE)){t=i._("Sent from Mobile");u=new (c('URI'))('/mobile/');v="_9j";}else if(c('arrayContains')(r,c('MercuryMessageSourceTags').CHAT)){t=i._("Sent from chat");v="_9h";}else if(c('arrayContains')(r,c('MercuryMessageSourceTags').EMAIL)){if(s){t=i._("Sent from {email}",[i.param('email',s)]);}else t=i._("Sent from email");v="_9i";}if(v){c('Tooltip').set(p,t);c('CSS').addClass(q,v);if(u){p.setAttribute('href',u);}else p.removeAttribute('href');}else c('CSS').hide(p);};k.prototype.renderSpoofWarning=function(p,q,r){if(q){c('CSS').addClass(p,"_sa");c('Tooltip').set(p,i._("Unable to confirm {name_or_email} as the sender.",[i.param('name_or_email',r.name)]));}};k.prototype.renderChatSpoofWarning=function(p,q,r){if(q)c('DOM').appendContent(p,i._("Unable to confirm {name_or_email} as the sender.",[i.param('name_or_email',r.name)]));};k.prototype.renderAdsMessageRequestStatus=function(p,q){if(q)c('ReactDOM').render(q,p);c('CSS').show(p);};k.prototype.renderCoreThreadlist=function(p,q,r,s,t){s=s||{};this.renderThreadImage(p,q.getNode('image'));var u=q.getNode('accessibleName'),v=[q.getNode('name')];if(u)v.push(u);this.$MercuryThreadMetadataRenderer5(p,v,s);if(p.folder&&t)n(q.getNode('folderBadge'),p.folder);var w=q.getNode('timestamp');if(c('MNAdsMessageUtils').isAdsMessageRequest(p)){this.renderAdsMessageRequestStatus(w,c('MNAdsMessageUtils').renderAdsMessageRequestStatus());}else this.renderTimestamp(w,String(c('MercuryTimestamp').getAbsoluteTimestamp(p.timestamp)),String(c('MercuryTimestamp').getRelativeTimestamp(p.timestamp)),p.timestamp);this.renderSnippet(p,q.getNode('snippet'));m(q,p);r(q,p);};k.prototype.renderAndSeparatedParticipantList=function(p,q,r){r=r||{};r.last_separator_uses_and=true;this.$MercuryThreadMetadataRenderer3.getThreadMeta(p,function(s){this.$MercuryThreadMetadataRenderer5(s,q,r);}.bind(this));};k.prototype.renderSnippet=function(p,q){var r=false,s=c('DOM').create('span');c('CSS').addClass(s,"_3jy5");c('DOM').appendContent(q,s);c('MercurySeenByAll').updateOnSeenChange(s,p,this.$MercuryThreadMetadataRenderer1);c('MNAdsLogMessageUtils').logAdsThreadListImpression(p);var t=p.snippet;if(t){if(p.snippet_attachments&&p.snippet_attachments.length>0)c('DOM').appendContent(q,c('DOM').create('span',{className:"_j0r"}));if(t.substr(0,4)=='?OTR'){t=i._("[encrypted message]");}else t=t.replace(/\r\n|[\r\n]/g," ");t=c('transformTextToDOM')(t,[c('DOMEmoji').params({renderInMessenger:true}),c('DOMEmote').params({renderInMessenger:true})]);}else if(p.snippet_attachments&&p.snippet_attachments.length){r=true;t=c('DOM').create('span');e(['MercuryAttachmentSnippet.react'],function(w){c('ReactDOM').render(c('React').createElement(w,{thread:p,viewer:this.$MercuryThreadMetadataRenderer1}),t);}.bind(this));}var u=p.participants.length;if(p.is_subscribed)u--;var v=p.snippet_sender;if(!r&&v&&c('MercuryIDs').getParticipantIDFromUserID(this.$MercuryThreadMetadataRenderer1)!=v&&u>1){c('MercuryParticipants').get(v,function(w){if(w.short_name){c('DOM').appendContent(q,i._("{name}: {conversation_snippet}",[i.param('name',w.short_name),i.param('conversation_snippet',c('DOM').create('span',null,t))]));}else c('DOM').appendContent(q,t);});}else c('DOM').appendContent(q,t);};k.prototype.renderThreadImage=function(p,q){c('ReactDOM').render(c('React').createElement(c('MercuryThreadImage.react'),{thread:p,viewer:this.$MercuryThreadMetadataRenderer1}),q);};k.prototype.renderParticipantList=function(p,q,r,s){return c('MercuryThreadMetadataRawRenderer').renderRawParticipantList(this.$MercuryThreadMetadataRenderer4.getServerIDFromClientIDNow(p),q,r,s);};k.prototype.renderThreadNameAndParticipantList=function(p,q,r,s){var t=c('MercuryThreadMetadataRawRenderer').renderRawParticipantList(this.$MercuryThreadMetadataRenderer4.getServerIDFromClientIDNow(p),q,r,s),u=this.$MercuryThreadMetadataRenderer3.getThreadMetaNow(p);if(!u)return null;if(!u.name)return t;return i._("{conversation_name} [with {participant_list}]",[i.param('conversation_name',u.name),i.param('participant_list',t)]);};k.prototype.renderParticipantCount=function(p,q){return c('MercuryThreadMetadataRawRenderer').renderRawParticipantCount(q);};k.prototype.$MercuryThreadMetadataRenderer5=function(p,q,r){q=c('createArrayFromMixed')(q);var s=this.$MercuryThreadMetadataRenderer1;if(p.name){q.forEach(function(u){c('ReactDOM').render(c('React').createElement(c('MercuryThreadTitle.react'),{thread:p,viewer:s,showUnreadCount:!!r.show_unread_count}),u);});return;}var t=p.participants;if(p.participants.length>1)t=p.participants.filter(function(u){return u!=c('MercuryIDs').getParticipantIDFromUserID(s);});c('MercuryParticipants').getMulti(t,function(u){c('MercuryThreadMetadataRawRenderer').renderParticipantListWithNoThreadName(this.$MercuryThreadMetadataRenderer4.getServerIDFromClientIDNow(p.thread_id),p,t,u,q,r);}.bind(this));};function l(p){if(!p.snippet_attachments)return [];return p.snippet_attachments.filter(function(q){return q.attach_type===c('MercuryAttachmentType').PHOTO;});}function m(p,q){var r=l(q);if(r.length===0)return;var s=r[0].thumbnail_url;if(!s)return;var t=r.length==1?'snippet-thumbnail-single':'snippet-thumbnail-multiple',u=p.getNode(t);if(!u)return;var v=c('DOM').find(u,'i');c('Style').set(v,'background-image','url('+s+')');c('CSS').show(u);}function n(p,q){c('createArrayFromMixed')(p).forEach(function(r){c('DOM').setContent(r,q);});}var o=new (c('MercurySingletonProvider'))(k);f.exports=k;}),null);
  __d('SavedResponsesBrowseListView.react',['cx','fbt','Link.react','PagesEventObserver','PagesEventType','React','SavedResponsesConstants','SavedResponsesFooterButton.react','SavedResponsesListView.react','SavedResponsesListViewContainer.react','SavedResponsesUtils','ScrollableArea.react'],(function a(b,c,d,e,f,g,h,i){var j,k,l=c('React').PropTypes;j=babelHelpers.inherits(m,c('React').Component);k=j&&j.prototype;function m(n,o){'use strict';k.constructor.call(this,n,o);this.state={isDataReady:false,isFetching:false,responses:[],searchQuery:"",tokens:null};}m.prototype.componentDidMount=function(){'use strict';this.refreshSavedResponsesList();};m.prototype.render=function(){'use strict';return (c('React').createElement(c('SavedResponsesListViewContainer.react'),{footerPart:this.$SavedResponsesBrowseListView1(),onSearchQueryChanged:function(n){return this.$SavedResponsesBrowseListView2(n);}.bind(this),onSearchQueryCleared:function(){return this.$SavedResponsesBrowseListView3();}.bind(this),searchQuery:this.state.searchQuery},this.$SavedResponsesBrowseListView4()));};m.prototype.refreshSavedResponsesList=function(){'use strict';if(this.state.isFetching)return;this.setState({isFetching:true});c('SavedResponsesUtils').fetchSavedResponses(this.props.pageID,this.props.otherUserID,function(n,o){return (this.setState({isDataReady:true,isFetching:false,responses:n,tokens:o}));}.bind(this));};m.prototype.$SavedResponsesBrowseListView4=function(){'use strict';return (c('React').createElement('div',{className:"_4pno"},c('React').createElement(c('ScrollableArea.react'),{fade:true,shadow:true},c('React').createElement(c('SavedResponsesListView.react'),{isLoadingResponses:!this.state.isDataReady,onResponseHover:this.props.onResponseHover,onResponseSelected:this.props.onResponseSelected,onResponseUnhover:this.props.onResponseUnhover,pageID:this.props.pageID,responses:this.state.responses,searchQuery:this.state.searchQuery,supportedMacros:this.state.tokens,sortingKey:c('SavedResponsesConstants').sortingKey.MOST_USED}),this.$SavedResponsesBrowseListView5())));};m.prototype.$SavedResponsesBrowseListView1=function(){'use strict';var n=i._("Manage Replies");return (c('React').createElement('div',{className:"_4pnp"},c('React').createElement(c('SavedResponsesFooterButton.react'),{label:n,onClick:function(){return this.$SavedResponsesBrowseListView6();}.bind(this)})));};m.prototype.$SavedResponsesBrowseListView5=function(){'use strict';return (c('React').createElement('div',{className:"_4pnq"},c('React').createElement('div',{className:"_50f8"+(' '+"_4pnr")},i._("End of saved replies")),c('React').createElement(c('Link.react'),{onClick:function(){return this.$SavedResponsesBrowseListView7();}.bind(this),className:"_4pnr"+(' '+"_4pns")+(' '+"_50f8")},i._("Create new reply"))));};m.prototype.$SavedResponsesBrowseListView2=function(n){'use strict';this.setState({searchQuery:n.target.value});};m.prototype.$SavedResponsesBrowseListView3=function(){'use strict';this.setState({searchQuery:""});};m.prototype.$SavedResponsesBrowseListView6=function(){'use strict';c('PagesEventObserver').logData_DEPRECATED({event_name:c('PagesEventType').SAVED_REPLIES_MANAGE_REPLIES,page_id:this.props.pageID},null);this.props.onManageSavedResponses();};m.prototype.$SavedResponsesBrowseListView7=function(){'use strict';c('PagesEventObserver').logData_DEPRECATED({event_name:c('PagesEventType').SAVED_REPLIES_CREATE_REPLY_FROM_BROWSE_VIEW,page_id:this.props.pageID},null);this.props.onCreateNewSavedResponse();};m.propTypes={onCreateNewSavedResponse:l.func.isRequired,onManageSavedResponses:l.func.isRequired,onResponseHover:l.func.isRequired,onResponseSelected:l.func.isRequired,onResponseUnhover:l.func.isRequired,otherUserID:l.string.isRequired,pageID:l.string.isRequired};f.exports=m;}),null);
  __d('SavedResponsesBrowsePanel.react',['cx','fbt','PagesEventObserver','PagesEventType','React','SavedResponsesBrowseListView.react','SavedResponsesPanel.react'],(function a(b,c,d,e,f,g,h,i){'use strict';var j,k,l=c('React').PropTypes;j=babelHelpers.inherits(m,c('React').Component);k=j&&j.prototype;function m(n,o){k.constructor.call(this,n,o);}m.prototype.render=function(){return (c('React').createElement(c('SavedResponsesPanel.react'),{className:"_33oq",onClose:this.props.onClose,title:this.getTitle()},this.renderBody()));};m.prototype.getTitle=function(){return i._("Saved Replies");};m.prototype.refreshSavedResponsesList=function(){this.refs.savedResponsesListView&&this.refs.savedResponsesListView.refreshSavedResponsesList();};m.prototype.renderBody=function(){return (c('React').createElement(c('SavedResponsesBrowseListView.react'),{onCreateNewSavedResponse:this.props.onCreateNewSavedResponse,onManageSavedResponses:this.props.onManageSavedResponses,onResponseHover:this.props.onResponseHover,onResponseSelected:function(n,o){return (this.$SavedResponsesBrowsePanel1(n,o));}.bind(this),onResponseUnhover:this.props.onResponseUnhover,otherUserID:this.props.otherUserID,pageID:this.props.pageID,ref:'savedResponsesListView'}));};m.prototype.$SavedResponsesBrowsePanel2=function(){c('PagesEventObserver').logData_DEPRECATED({event_name:c('PagesEventType').SAVED_REPLIES_CLOSE_BROWSE_VIEW,page_id:this.props.pageID},null);this.props.onClose();};m.prototype.$SavedResponsesBrowsePanel1=function(n,o){c('PagesEventObserver').logData_DEPRECATED({event_name:c('PagesEventType').SAVED_REPLIES_APPLY_REPLY,page_id:this.props.pageID},null);this.props.onResponseSelected(n,o);};m.propTypes={onClose:l.func.isRequired,onCreateNewSavedResponse:l.func.isRequired,onManageSavedResponses:l.func.isRequired,onResponseHover:l.func.isRequired,onResponseSelected:l.func.isRequired,onResponseUnhover:l.func.isRequired,otherUserID:l.string.isRequired,pageID:l.string.isRequired};f.exports=m;}),null);
  __d('PagesMessengerThreadDialogMixin',['cx','fbt','ActorURI','AsyncRequest','ChatTypingIndicators.react','Event','Grid.react','HovercardLink','immutable','Keys','LoadingIndicator.react','MercuryIDs','MercuryMessages','MercuryPageThreadActions','MercuryPayloadSource','MercuryRoger','MercuryThreadInformer','MessageList.react','MessengerCollapsedLogMessageGroup.react','MessengerDateBreak.react','MessengerLogMessage.react','MessengerMessageGroup.react','messengerPresenceStatusReact','MessengerPresenceStatusUtils','MessengerTypingIndicator.react','PagesEventObserver','PagesEventType','PagesMessagingActionPlacement','PagesMessengerButtonSet.react','PagesMessengerComposer.react','PagesMessengerConfirmCloseThreadDialog.react','PagesMessengerMessage.react','PagesMessengerThreadUtils','MercuryParticipants','React','MercuryShareAttachmentRenderLocations','SavedResponsesBrowsePanel.react','SavedResponsesConstants','SavedResponsesManagePanel.react','SavedResponsesTokensUtils','ScrollableArea.react','Set','URI','XPagesSavedResponsesImageDuplicationController','XUIAbstractGlyphButton.react','XUICloseButton.react','XUIDialog.react','XUIDialogBody.react','XUIDialogTitle.react','emptyFunction','getViewportDimensions'],(function a(b,c,d,e,f,g,h,i){var j=c('messengerPresenceStatusReact').comp,k=c('Grid.react').GridItem,l=c('React').PropTypes,m=10,n=10,o=500,p=318,q=.7,r={propTypes:{basePermalinkURI:l.string.isRequired,enableSuggestedResponse:l.bool.isRequired,flowID:l.string,pagesMessengerComposerProps:l.shape({isPageAdminNoteEnabled:l.bool.isRequired,isSavedResponseEnabled:l.bool.isRequired}).isRequired,threadID:l.string.isRequired,userID:l.string,disableComposer:l.bool},getDefaultProps:function s(){return {basePermalinkURI:"",disableComposer:true};},getInitialState:function s(){return {_mercuryRoger:c('MercuryRoger').getForFBID(this.props.userID),_messages:c('MercuryMessages').getForFBID(this.props.userID),_threadActions:c('MercuryPageThreadActions').getForFBID(this.props.userID),_threadInformer:c('MercuryThreadInformer').getForFBID(this.props.userID),hovercardLink:'',immutableMessages:c('immutable').List(),initDialog:false,initialSavedResponsesManageViewType:c('SavedResponsesConstants').editPanelViewMode.LIST,isMessengerComposerOn:true,isSavedResponsesBrowsePanelOn:this.props.pagesMessengerComposerProps.isSavedResponseEnabled,loadingMessages:false,messages:[],moreMessages:false,serverThreadID:null,showCloseDialog:false,thread:null,threadDialogExpanded:false};},getPermalinkURI:function s(){var t=c('URI').getRequestURI();if(this.props.basePermalinkURI)t=t.setPath(this.props.basePermalinkURI);t.addQueryData({index:this.props.index,threadid:this.state.serverThreadID,timestamp:this.state.thread.timestamp});return t;},_addURLParam:function s(){window.history.replaceState({},null,this.getPermalinkURI());},_clearURLParam:function s(){var t=c('URI').getRequestURI();t.removeQueryData('index');t.removeQueryData('threadid');t.removeQueryData('timestamp');window.history.replaceState({},null,t);},_displayErrorMessage:function s(t){var u=c('React').createElement('div',{className:"_jbx"},i._("Please wait until the upload is complete before you send your message."));if(t){this.setState({errorMessage:u});}else this.setState({errorMessage:null});},_fetchMessages:function s(t,u){if(!t||this.state.loadingMessages)return;this.setState({loadingMessages:true});this.state._messages.getThreadMessagesRange(this.props.threadID,this.state.messages.length,t+1,function(v){var w=v.length>t,x=w?v.slice(1):v;if(v.length){this._oldTimestamp=v[0].timestamp;}else this._oldTimestamp=0;u=u||c('emptyFunction');v=x.concat(this.state.messages);this._setMessageState(v);this.setState({moreMessages:w,loadingMessages:false},u);this._updateSuggestedResponse&&this._updateSuggestedResponse();if(this.state.messages.length<=m){this._scrollToBottom();}else this._maintainScrollView(this._prevScrollHeight,this._prevScrollTop);this._setPrevScroll();}.bind(this));},_fetchEarlierMessages:function s(){this._setPreventScroll();this._fetchMessages(n);},_getComposerSize:function s(){if(this.state.threadDialogExpanded){var t=c('getViewportDimensions')();return {height:q*t.height,width:q*t.width};}else return {height:p,width:o};},_calculateReceipts:function s(t){var u=this.state._mercuryRoger.getSeenTimestamps(this.props.threadID),v=new (c('Set'))(u.keys());return u.withMutations(function(w){var x=t?t:this.state.messages;c('immutable').Seq(x).reverse().forEach(function(y){if(v.size===0)return false;if(!v.has(y.author))return;w.update(y.author,function(z){if(!z||z.watermark<=y.timestamp)return {watermark:y.timestamp,action:y.timestamp};return z;});v['delete'](y.author);});}.bind(this));},_maintainScrollView:function s(t,u){if(!this.refs.scrollContainer)return;var v=this.refs.scrollContainer.getArea(),w=v.getScrollHeight()-t+u;v.setScrollTop(w,false);},_openMessageDialog:function s(event){if(this.state.showDialog)return;c('PagesEventObserver').logData_DEPRECATED({event_name:c('PagesEventType').MESSAGES_VIEW_THREAD,page_id:this.props.userID,source:this.props.source,thread_id:this.state.serverThreadID});this.setState({showDialog:true,initDialog:true});if(this.state.messages.length===0){c('PagesEventObserver').logData_DEPRECATED({event_name:c('PagesEventType').MESSAGES_MESSAGELIST_LOAD_START,flowID:this.props.flowID,page_id:this.props.userID,subsection:this.props.folder,loading_event_time:Date.now()});this._fetchMessages(n,this.logGotMessageEvent);}this.refs.savedResponsesBrowsePanel&&this.refs.savedResponsesBrowsePanel.refreshSavedResponsesList();this._addURLParam();},_onDeleteMessageAction:function s(t){if(t){this.state._threadActions['delete'](this.props.threadID);}else{this.state._messageActions['delete'](this.props.threadID,Object.keys(this.state.selectedMessages),c('MercuryPayloadSource').CLIENT_DELETE_MESSAGES);this.setState({selectedMessages:{}});}this._updateDeleteActionState();},_onScroll:function s(){if(!this.refs.scrollContainer)return;var t=this.refs.scrollContainer.getArea(),u=this._prevScrollTop,v=this._prevScrollHeight;this._setPrevScroll();if(t.isScrolledToTop()){this._fetchEarlierMessages();}else if(t.isScrolledToBottom()){this._setAllowScroll();}else{if(t.getScrollTop()===u&&t.getScrollHeight()!==v)this._maintainScrollView(v,u);this._setPreventScroll();}},componentWillMount:function s(){this.setState({readReceipts:this._calculateReceipts()});this.state._mercuryRoger.subscribe('change',function(t,u){u[this.props.threadID]&&this.state.initDialog&&this.setState({readReceipts:this._calculateReceipts()});}.bind(this));this._messagesReceivedToken=this.state._threadInformer.subscribe('messages-received',function(t,u){if(this._shouldHandleMessageReceived&&!this._shouldHandleMessageReceived())return;var v=u[this.props.threadID];if(!v||!v.length)return;this._setMessageState(this.state.messages.concat(v),function(){this._afterThreadReceived&&this._afterThreadReceived();}.bind(this));}.bind(this));this._messagesReorderToken=this.state._threadInformer.subscribe('messages-reordered',function(t,u){var v=this.state._messages.getThreadMessagesSinceTimestamp(this.props.threadID,this._oldTimestamp);this._setMessageState(v);}.bind(this));this._messagesUpdatedToken=this.state._threadInformer.subscribe('messages-updated',function(t,u){var v=u[this.props.threadID];if(v){var w=this.state._messages.getMessagesFromIDs(Object.keys(v));if(w.length>0)this._updateMessages(w);}}.bind(this));},componentWillUnmount:function s(){this.state._threadInformer.unsubscribe(this._messagesReceivedToken);this.state._threadInformer.unsubscribe(this._messagesReorderToken);this.state._threadInformer.unsubscribe(this._messagesUpdatedToken);},componentDidUpdate:function s(t,u){if(!this.state.showDialog)return;if(!u.showDialog&&this.state.showDialog&&this.state.messages.length){var v=this.refs.scrollContainer.getArea();v.setScrollTop(this._prevScrollHeight);}if(this.refs.threadDialog)setTimeout(this.refs.threadDialog.layer.updatePosition.bind(this.refs.threadDialog.layer));if(this.refs.threadDialog&&!this._threadDialogSubscribed){this.refs.threadDialog.layerSubscribe('key',this._onDialogKey);this._threadDialogSubscribed=true;}this.renderDialogTitle();},componentWillUpdate:function s(t,u){if(u.messages!=this.state.messages)this.setState({readReceipts:this._calculateReceipts(u.messages)});if(!this.state.initDialog&&u.initDialog){this.setState({hovercardLink:c('HovercardLink').constructEndpoint({id:this.state.thread.other_user_fbid})});c('MercuryParticipants').get(c('MercuryIDs').getParticipantIDFromUserID(this.state.thread.other_user_fbid),function(v){var w;this.setState({participants:c('immutable').Map((w={},w[v.id]=v,w))});}.bind(this));}},_onDialogKey:function s(t,event){if(c('Event').getKeyCode(event)===c('Keys').ESC)setTimeout(this._onCloseButton);},_onComposerKey:function s(event){if(c('Event').getKeyCode(event)===c('Keys').ESC)setTimeout(this._onCloseButton);},_logExpandedWindow:function s(){if(this.state.threadDialogExpanded)c('PagesEventObserver').logData_DEPRECATED({page_id:this.props.userID,event_name:c('PagesEventType').MESSAGES_DIALOG_EXPAND_WINDOW,source:this.props.source,thread_id:this.state.serverThreadID});},_onToggleDialogSize:function s(){this.setState({threadDialogExpanded:!this.state.threadDialogExpanded},this._logExpandedWindow);},_onToggleDialog:function s(t){if(!this.props.disableComposer&&this.refs.composer.hasInput()){this.setState({showCloseDialog:true});}else this._onToggleDialogNoComposerCheck(t);if(!t){this._clearURLParam();this.state._threadActions.markRead(this.props.threadID,c('PagesMessagingActionPlacement').MESSAGE_DIALOG_OPENING);}},_onToggleDialogNoComposerCheck:function s(t){this.setState({threadDialogExpanded:!t?false:this.state.threadDialogExpanded,showDialog:t,showCloseDialog:false},this._logExpandedWindow);},_onCloseButton:function s(){this._onToggleDialog(false);},_onCloseSavedResponsesBrowsePanel:function s(){this.setState({isSavedResponsesBrowsePanelOn:false});},_onConfirmCloseButton:function s(){if(!this.props.disableComposer)this.refs.composer.clearInput();this._onToggleDialogNoComposerCheck(false);},_onCancelCloseButton:function s(){this.setState({showCloseDialog:false});},_onSavedResponseSelected:function s(t,u){if(this.props.disableComposer)return;if(t.image){var v=c('XPagesSavedResponsesImageDuplicationController').getURIBuilder().getURI();v=c('ActorURI').create(v,this.props.userID);new (c('AsyncRequest'))().setURI(v).setMethod('POST').setData({image_id:t.image.id}).setHandler(function(w){var x=w.payload.duplicatedImageID;this.refs.composer.setSavedResponse(c('SavedResponsesTokensUtils').prepareforSend(t.message,u),x);}.bind(this)).send();}else this.refs.composer.setSavedResponse(c('SavedResponsesTokensUtils').prepareforSend(t.message,u),null);},_onSavedResponseHover:function s(t,u){if(!this.props.disableComposer){var v=c('SavedResponsesTokensUtils').prepareforSend(t.message,u);this.refs.composer.setPlaceholderText(v);}},_onSavedResponseUnhover:function s(){if(!this.props.disableComposer)this.refs.composer.setPlaceholderText(null);},_onMessageCheckStatusChanged:function s(event){var t=this.state.selectedMessages;if(event.target.checked){t[event.target.value]=true;}else delete t[event.target.value];this.setState({selectedMessages:t});this._updateDeleteActionState();},_scrollToBottom:function s(){if(!this.state.allowScroll||!this.refs.scrollContainer)return false;var t=this.refs.scrollContainer.getArea();t.scrollToBottom(false);return true;},_setAllowScroll:function s(){if(!this.state.allowScroll)this.setState({allowScroll:true});},_setMessageState:function s(t,u){u=u||c('emptyFunction');this.setState({immutableMessages:c('immutable').List(t),messages:t},u);},_setPreventScroll:function s(){if(this.state.allowScroll)this.setState({allowScroll:false});},_setPrevScroll:function s(){var t=this.refs.scrollContainer;this._prevScrollHeight=t?t.getArea().getScrollHeight():0;this._prevScrollTop=t?t.getArea().getScrollTop():0;},_updateMessages:function s(t,u){var v=this.state.messages;t.forEach(function(w){var x=this.state.messages.findIndex(function(y){return y.message_id===w.message_id;});if(x)v[x]=w;}.bind(this));this._setMessageState(v,u);this._maintainScrollView(this._prevScrollHeight,this._prevScrollTop);this._setPrevScroll();},_updateDeleteActionState:function s(){if(Object.keys(this.state.selectedMessages).length===0){this.setState({isDeleteButtonDisabled:true});}else this.setState({isDeleteButtonDisabled:false});},_onSavedResponsesButtonClicked:function s(){c('PagesEventObserver').logData_DEPRECATED({event_name:c('PagesEventType').SAVED_REPLIES_TOGGLE_BROWSE_VIEW,page_id:this.props.pageID,toggle_on:!this.state.isSavedResponsesBrowsePanelOn});this.setState({isSavedResponsesBrowsePanelOn:!this.state.isSavedResponsesBrowsePanelOn});},_onManageSavedResponses:function s(){this.setState({isSavedResponsesManagePanelOn:true,isSavedResponsesBrowsePanelOn:false,isMessengerComposerOn:false,initialSavedResponsesManageViewType:c('SavedResponsesConstants').editPanelViewMode.LIST});},_onCreateNewSavedResponse:function s(){this.setState({isSavedResponsesManagePanelOn:true,isSavedResponsesBrowsePanelOn:false,isMessengerComposerOn:false,initialSavedResponsesManageViewType:c('SavedResponsesConstants').editPanelViewMode.CREATE});},_getTotalDialogWidth:function s(t){if(this.state.isSavedResponsesBrowsePanelOn){return t.width+c('SavedResponsesConstants').browsePanelAttachModeWidth;}else if(this.state.isSavedResponsesManagePanelOn){return c('SavedResponsesConstants').editPanelDialogWidth;}else return t.width;},_onCloseSavedResponsesManagePanel:function s(){this.setState({isSavedResponsesManagePanelOn:false,isSavedResponsesBrowsePanelOn:true,isMessengerComposerOn:true});},logGotMessageEvent:function s(){c('PagesEventObserver').logData_DEPRECATED({page_id:this.props.userID,event_name:c('PagesEventType').MESSAGES_DIALOG_GOTMESSAGES,thread_id:this.state.serverThreadID,message_count:this.state.messages.length});c('PagesEventObserver').logData_DEPRECATED({event_name:c('PagesEventType').MESSAGES_MESSAGELIST_LOAD_END,flowID:this.props.flowID,page_id:this.props.userID,subsection:this.props.folder,loading_event_time:Date.now()});},renderActionsButton:function s(){return (c('React').createElement('div',{className:"_5vuo"},c('React').createElement(c('PagesMessengerButtonSet.react'),{isDeleteButtonDisabled:this.state.isDeleteButtonDisabled,user:this.props.userID,onDeleteMessageAction:this._onDeleteMessageAction,threadID:this.props.threadID,threadElementID:this.state.serverThreadID,folder:this.props.folder,thread:this.state.thread,allowReport:this.props.allowReport})));},renderExpandButton:function s(){var t=this.state.threadDialogExpanded?i._("Exit expanded view"):i._("Enter expanded view"),u=i._("Toggle expanded view");return (c('React').createElement(c('XUIAbstractGlyphButton.react'),{className:(this.state.threadDialogExpanded?"_5bwk":'')+(!this.state.threadDialogExpanded?' '+"_5bwl":''),'data-hover':'tooltip','data-tooltip-alignh':'center','data-tooltip-content':t,label:u,onClick:this._onToggleDialogSize,ref:'expandButton',size:'medium',title:u,type:'button'}));},renderAttachmentShelf:function s(){return (c('React').createElement('div',{ref:'attachmentsShelf',className:"_jz4"}));},renderErrorMessage:function s(){return c('React').createElement('div',null,this.state.errorMessage);},renderComposer:function s(){if(this.props.disableComposer)return null;return (c('React').createElement(c('PagesMessengerComposer.react'),babelHelpers['extends']({},this.props.pagesMessengerComposerProps,{attachmentsShelf:this.refs.attachmentsShelf,creatorInfo:this.props.creatorInfo,displayErrorMessage:this._displayErrorMessage,fileAttachmentEnabled:true,linkPreviewEnabled:true,onBeforeSend:this._setAllowScroll,onKeyUp:this._onComposerKey,otherUserID:this.state.thread.other_user_fbid.toString(),ref:'composer',threadID:this.props.threadID,threadElementID:this.state.serverThreadID,user:this.props.userID,suggestedResponseHandler:this.state.suggestedResponseHandler,isSuggestedResponseEnabled:this.props.enableSuggestedResponse,isSavedResponsesBrowsePanelOn:this.state.isSavedResponsesBrowsePanelOn,onSavedResponsesButtonClicked:this._onSavedResponsesButtonClicked})));},renderCloseButton:function s(){var t=i._("Close"),u=i._("Press Esc to close");return (c('React').createElement(c('XUICloseButton.react'),{label:t,onClick:this._onCloseButton,shade:'dark',size:'medium',title:t,tooltip:u,type:'button'}));},renderComposerPart:function s(t){return (c('React').createElement('div',null,c('React').createElement(c('XUIDialogTitle.react'),{className:"_3alh",showCloseButton:false},c('React').createElement('div',null,c('React').createElement('a',{className:"_5hp9",ref:'shortThreadName','data-hovercard':this.state.hovercardLink}),this.renderPresenceStatus()),this.renderActionsButton(),this.renderExpandButton(),this.renderCloseButton()),c('React').createElement(c('XUIDialogBody.react'),{className:c('PagesMessengerThreadUtils').isFlagThread(this.state.thread)?"_5s71":'',useCustomPadding:true},c('React').createElement(c('ScrollableArea.react'),{height:t.height,onScroll:this._onScroll,ref:'scrollContainer',width:t.width},this.renderLoadingMessages(),this.renderMessages())),this.renderErrorMessage(),this.renderAttachmentShelf(),this.renderComposer()));},renderDialogContent:function s(t){return (c('React').createElement('div',null,this.renderSavedResponsesManagePanel(),this.renderComposerAndBrowsePanel(t)));},renderSavedResponsesManagePanel:function s(){if(this.state.isSavedResponsesManagePanelOn){return (c('React').createElement(c('SavedResponsesManagePanel.react'),{onClose:this._onCloseSavedResponsesManagePanel,pageID:this.props.userID,otherUserID:this.state.thread.other_user_fbid.toString(),initialViewType:this.state.initialSavedResponsesManageViewType}));}else return null;},renderSavedResponsesBrowserPanel:function s(){if(!this.state.isSavedResponsesBrowsePanelOn)return null;return (c('React').createElement(c('SavedResponsesBrowsePanel.react'),{onClose:this._onCloseSavedResponsesBrowsePanel,otherUserID:this.state.thread.other_user_fbid.toString(),onManageSavedResponses:this._onManageSavedResponses,onCreateNewSavedResponse:this._onCreateNewSavedResponse,onResponseSelected:this._onSavedResponseSelected,onResponseHover:function(t,u){return this._onSavedResponseHover(t,u);}.bind(this),onResponseUnhover:this._onSavedResponseUnhover,pageID:this.props.userID,ref:'savedResponsesBrowsePanel'}));},renderComposerAndBrowsePanel:function s(t){var u={maxWidth:t.width};return (c('React').createElement(c('Grid.react'),{cols:2,spacing:'none',className:(!this.state.isMessengerComposerOn?"hidden_elem":'')+(' '+"_5b17")},c('React').createElement(k,{className:"_jz7"+(!this.state.isSavedResponsesBrowsePanelOn?' '+"hidden_elem":'')},this.renderSavedResponsesBrowserPanel()),c('React').createElement(k,{style:u,className:"_jz7"+(!this.state.isMessengerComposerOn?' '+"hidden_elem":'')},this.renderComposerPart(t))));},renderLayers:function s(){if(!this.state.initDialog)return null;var t=this._getComposerSize();return {threadDialog:c('React').createElement(c('XUIDialog.react'),{layerHideOnBlur:false,ref:'threadDialog',shown:this.state.showDialog,width:this._getTotalDialogWidth(t)},this.renderDialogContent(t)),closeThreadDialog:c('React').createElement(c('PagesMessengerConfirmCloseThreadDialog.react'),{shown:this.state.showCloseDialog,onCancel:this._onCancelCloseButton,onConfirm:this._onConfirmCloseButton})};},renderLoadingMessages:function s(){if(this.state.loadingMessages)return (c('React').createElement('div',{className:"_3oly _2ph-"},c('React').createElement(c('LoadingIndicator.react'),{size:'medium',color:'white'})));},renderMessages:function s(){if(!this.state.messages)return null;return (c('React').createElement('div',{className:"_511c _1ej0 _2mpc"},c('React').createElement(c('MessageList.react'),{DateBreak:c('MessengerDateBreak.react'),deliveryTimestamp:0,isCanonical:true,isPageMessage:true,location:c('MercuryShareAttachmentRenderLocations').MESSENGER,LogMessage:c('MessengerLogMessage.react'),CollapsedLogMessageGroup:c('MessengerCollapsedLogMessageGroup.react'),MessageGroup:c('MessengerMessageGroup.react'),messages:this.state.immutableMessages,readReceipts:this.state.readReceipts,viewer:this.props.userID}),c('React').createElement(c('ChatTypingIndicators.react'),{indicatorClass:c('MessengerTypingIndicator.react'),indicatorsWillShow:function t(){},indicatorsDidShow:function(){this.refs.scrollContainer&&this.refs.scrollContainer.getArea().scrollToBottom();}.bind(this),rootClassName:"clearfix _17pz _4gv2",threadID:this.props.threadID,viewer:this.props.userID})));},renderMessage:function s(t){return (c('React').createElement(c('PagesMessengerMessage.react'),{customDialogWidth:this._getComposerSize().width,user:this.props.userID,message:t,key:t.message_id,messageCheckStatusChangedHandler:this._onMessageCheckStatusChanged}));},renderPresenceStatus:function s(t){if(!this.state.participants)return null;var u=c('MessengerPresenceStatusUtils').getStatusFromCanonicalThread(this.state.participants,this.state.thread);if(!u)return null;return (c('React').createElement(j,{className:"_2v6o _8m4",isUserActive:u.isUserActive,lastActive:u.lastActive,platform:u.platform}));}};f.exports=r;}),null);
  __d("XPagesMessagingPreferredAudienceXController",["XController"],(function a(b,c,d,e,f,g){f.exports=c("XController").create("\/pages\/messaging\/preferred_audience\/",{page_id:{type:"Int",required:true},other_user_id:{type:"Int",required:true}});}),null);
  __d("XPagesPreferredAudienceDialogController",["XController"],(function a(b,c,d,e,f,g){f.exports=c("XController").create("\/pages\/preferred_audience_dialog\/",{user_id:{type:"Int",required:true}});}),null);
  __d('PagesMessengerThreadRow.react',['cx','fbt','invariant','AsyncRequest','ActorURI','AdsTargetingTogglerSafeMixin','DOM','Image.react','Link.react','PagesAdminToolUIActionType','PagesManagerLogger','PagesMessagingActionPlacement','MessagingTag','MercuryIDs','MercuryMessageActions','MercuryThreadIDMap','MercuryThreadImage.react','MercuryThreadMetadataRawRenderer','MercuryThreadMetadataRenderer','MercuryThreads','MercuryTimestamp','MercuryMessageRenderer','PagesMessengerActions','PagesMessageSuggestedResponseHandler','PagesMessengerThreadUtils','PagesMessengerThreadDialogMixin','MercuryParticipants','React','ReactDOM','ReactLayeredComponentMixin_DEPRECATED','Token.react','XPagesMessagingPreferredAudienceXController','XPagesPreferredAudienceDialogController','XUICheckboxInput.react','XUIText.react','emptyFunction'],(function a(b,c,d,e,f,g,h,i,j){var k=c('React').PropTypes,l=36,m=c('React').createClass({displayName:'PagesMessengerThreadRow',mixins:[c('ReactLayeredComponentMixin_DEPRECATED'),c('AdsTargetingTogglerSafeMixin'),c('PagesMessengerThreadDialogMixin')],propTypes:{checkBoxDisable:k.bool,creatorInfo:k.object,folder:k.string.isRequired,index:k.number,onCheckBoxChanged:k.func,selected:k.bool.isRequired,showActionButton:k.bool.isRequired,showDialog:k.bool.isRequired,source:k.string.isRequired,allowReport:k.bool.isRequired},getDefaultProps:function n(){return {allowReport:false,checkBoxDisable:false,enableSuggestedResponse:false,onCheckBoxChanged:c('emptyFunction'),pagesMessengerComposerProps:{isPageAdminNoteEnabled:false,isSavedResponseEnabled:false},selected:false,showActionButton:false,showDialog:false};},getInitialState:function n(){return {_threads:c('MercuryThreads').getForFBID(this.props.userID),_messageActions:c('MercuryMessageActions').getForFBID(this.props.userID),_threadMetadataRenderer:c('MercuryThreadMetadataRenderer').getForFBID(this.props.userID),_threadIDMap:c('MercuryThreadIDMap').getForFBID(this.props.userID),checkBoxSelected:false,selected:this.props.selected,selectedMessages:[],allowScroll:true,isDeleteButtonDisabled:true,showDialog:false,errorMessage:null,suggestedResponseHandler:null};},_updateSuggestedResponse:function n(){if(!this.props.enableSuggestedResponse||!this.state.messages.length)return;var o=this.state.messages[this.state.messages.length-1];if(o&&c('MercuryIDs').getUserIDFromParticipantID(o.author)===this.props.userID){this.setState({suggestedResponseHandler:null});return;}this.setState({suggestedResponseHandler:new (c('PagesMessageSuggestedResponseHandler'))(o,this.props.userID)});},getServerThreadID:function n(o){var p=this.state._threadIDMap.getServerIDFromClientIDNow(o);return p?p:'user:'+o;},componentWillMount:function n(){this._prevScrollHeight=0;this._prevScrollTop=0;this.setState({serverThreadID:this.getServerThreadID(this.props.threadID)});this.state._threads.getThreadMeta(this.props.threadID,function(o){this.setState({thread:o});}.bind(this));},componentDidMount:function n(){var o=this.state.thread;this.renderThreadMeta(o,{});if(this.props.showDialog)this._openMessageDialog();},componentWillReceiveProps:function n(o){if(o.selected!=this.props.selected){this.props.onCheckBoxChanged(this.props.threadID,o.selected,this.state.thread);this.setState({checkBoxSelected:o.selected});}},componentWillUnmount:function n(){this.props.onCheckBoxChanged(this.props.threadID,false,this.state.thread);if(this._image)c('ReactDOM').unmountComponentAtNode(c('ReactDOM').findDOMNode(this.refs.image));},_onCheckBoxChange:function n(event){this.setState({checkBoxSelected:event.currentTarget.checked});this.props.onCheckBoxChanged(this.props.threadID,event.currentTarget.checked,this.state.thread);},_onInlineIconClick:function n(event){var o,p=event.target.getAttribute('data-key');switch(p){case c('PagesMessengerActions').ARCHIVE:o=this.state._threadActions.archive;break;case c('PagesMessengerActions').MARK_AS_READ:o=this.state._threadActions.markRead;break;case c('PagesMessengerActions').MARK_AS_UNREAD:o=this.state._threadActions.markUnread;break;default:j(0);}o.call(this.state._threadActions,this.props.threadID,c('PagesMessagingActionPlacement').SPRINGBOARD_INLINE_ACTION);c('PagesManagerLogger').logMessageInboxUIAction(c('PagesAdminToolUIActionType').MESSAGE_INBOX_CLICK_MENU_ACTION,this.props.pageID,{menu_action:p,position:c('PagesMessagingActionPlacement').SPRINGBOARD_INLINE_ACTION});event.preventDefault();event.stopPropagation();},updateThread:function n(){this.state._threads.getThreadMeta(this.props.threadID,function(o){this.setState({thread:o});var p=c('MercuryTimestamp').getFormatedTimestamp(o.timestamp),q={timestamp_absolute:p.absolute,timestamp_relative:p.relative,timestamp:o.timestamp};this.renderThreadMeta(o,{custom_timestamp:q});}.bind(this));},renderThreadMeta:function n(o,p){p=p||{};c('DOM').setContent(c('ReactDOM').findDOMNode(this.refs.snippet),null);this.state._threadMetadataRenderer.renderSnippet(o,c('ReactDOM').findDOMNode(this.refs.snippet));this.state._threadMetadataRenderer.renderAndSeparatedParticipantList(this.props.threadID,c('ReactDOM').findDOMNode(this.refs.core),{show_unread_count:true});this._image=c('ReactDOM').render(c('React').createElement(c('MercuryThreadImage.react'),{size:l,thread:o,viewer:this.props.userID}),c('ReactDOM').findDOMNode(this.refs.image));var q=p.custom_timestamp?p.custom_timestamp:o;this.state._threadMetadataRenderer.renderTimestamp(c('ReactDOM').findDOMNode(this.refs.timestamp),q.timestamp_absolute,q.timestamp_relative,q.timestamp);},renderDialogTitle:function n(){if(!this.refs.shortThreadName||this._dialogThreadNameRendered)return;this.state._threadMetadataRenderer.renderAndSeparatedParticipantList(this.props.threadID,c('ReactDOM').findDOMNode(this.refs.shortThreadName),{names_renderer:c('MercuryThreadMetadataRawRenderer').renderShortNames,check_length:true});this._dialogThreadNameRendered=true;},renderActionButton:function n(){if(!this.props.showActionButton||this.props.folder!=c('MessagingTag').INBOX)return null;var o=null,p=null,q=true;if(this.state.thread.unread_count>0){o=i._("Mark as Read");p="_4k83";}else{q=false;o=i._("Mark as Unread");p="_4k84";}return (c('React').createElement('div',{className:"_54rz"},c('React').createElement('div',{'aria-label':o,className:p,'data-hover':'tooltip','data-key':q?c('PagesMessengerActions').MARK_AS_READ:c('PagesMessengerActions').MARK_AS_UNREAD,'data-tooltip-content':o,onClick:this._onInlineIconClick,role:'button',tabIndex:'0'}),c('React').createElement('div',{'aria-label':i._("Archive"),className:"_4k82",'data-hover':'tooltip','data-key':c('PagesMessengerActions').ARCHIVE,'data-tooltip-content':i._("Archive"),onClick:this._onInlineIconClick,role:'button',tabIndex:'0'})));},_shouldHandleMessageReceived:function n(){return this.state.initDialog;},_openPreferredAudienceDialog:function n(event){new (c('AsyncRequest'))().setURI(c('XPagesPreferredAudienceDialogController').getURIBuilder().setInt('user_id',this.props.userID).getURI()).send();event.preventDefault();event.stopPropagation();},_afterThreadReceived:function n(){if(this._scrollToBottom()&&this.state.showDialog)this.state._threadActions.markRead(this.props.threadID,c('PagesMessagingActionPlacement').MESSAGE_DIALOG_SHOWN);this._updateSuggestedResponse();},render:function n(){var o=(this.state.thread.unread_count>0&&!this.state.checkBoxSelected?"_4k85":'')+(this.state.checkBoxSelected?' '+"_ib2":'')+(' '+"_5dxh")+(c('PagesMessengerThreadUtils').isFlagThread(this.state.thread)?' '+"_1md7":'');return (c('React').createElement('li',{className:o},c('React').createElement('div',{className:"_50jh"},c('React').createElement(c('XUICheckboxInput.react'),{checked:this.state.checkBoxSelected,disabled:this.props.checkBoxDisable,className:"_ib3",onChange:this._onCheckBoxChange}),c('React').createElement('a',{href:this.getPermalinkURI(),onClick:function p(q){q.preventDefault();}},c('React').createElement('div',{className:"_3iqj",onClick:this._openMessageDialog,role:'presentation'},c('React').createElement('div',{className:"_3iqk"},c('React').createElement('div',{ref:'image',className:"_50ji"}),c('React').createElement('div',{className:"_50jk"},c('React').createElement(c('XUIText.react'),{ref:'core',weight:'bold',className:"_3gdp"}),c('React').createElement('div',{ref:'snippet',className:"_50jm"}))),c('React').createElement('div',{className:"rfloat"},this.state.enablePreferredAudience?c('React').createElement('span',{className:"_587a",onClick:this._openPreferredAudienceDialog,role:'presentation'},c('React').createElement(c('Token.react'),{label:'Preferred Audience'})):null,c('React').createElement('div',{ref:'timestamp',className:"_50jo"}),this.renderActionButton()))))));}});f.exports=m;}),null);
  __d('PagesMessengerStore',['invariant','PagesMessengerActions','EventEmitter','PagesMessengerDispatcher'],(function a(b,c,d,e,f,g,h){var i,j;i=babelHelpers.inherits(k,c('EventEmitter'));j=i&&i.prototype;function k(){'use strict';j.constructor.call(this);this.$PagesMessengerStore1=true;this.$PagesMessengerStore2=c('PagesMessengerDispatcher').register(this.$PagesMessengerStore3.bind(this));}k.prototype.$PagesMessengerStore3=function(l){'use strict';switch(l.action.actionType){case c('PagesMessengerActions').ONVISIBLE_INIT:this.setVisible(l.visible);break;case c('PagesMessengerActions').ONVISIBLE_RESET:this.resetOnVisible();break;default:h(0);}};k.prototype.setVisible=function(l){'use strict';this.$PagesMessengerStore1=!l;};k.prototype.resetOnVisible=function(){'use strict';if(this.$PagesMessengerStore1){this.emit(c('PagesMessengerActions').ONVISIBLE_RESET);this.setVisible(false);}};f.exports=new k();}),null);
  __d('PagesMessengerThreadlistMixin',['cx','fbt','invariant','ix','PagesMessengerActions','Image.react','MessagingTag','MercuryFilters','MercuryIDs','MercuryPageOrderedThreadlist','MercuryPagesChannelHandlerDEPRECATED','MercuryServerPayloadPreprocessor','MercuryThreadInformer','MercuryThreadlistConstants','MercuryThreads','PagesEventObserver','PagesEventType','PagesMessengerDispatcher','PagesMessengerStore','React','SubscriptionsHandler','XUISpinner.react','XUIText.react','emptyFunction','PagesMessagingConst'],(function a(b,c,d,e,f,g,h,i,j,k){var l=c('React').PropTypes,m=c('PagesMessagingConst').UNANSWERED_FILTER,n=10,o={propTypes:{creatorInfo:l.object,folder:l.oneOf([c('MessagingTag').ARCHIVED,c('MessagingTag').INBOX,c('MessagingTag').OTHER,c('MessagingTag').SPAM]).isRequired,initialData:l.object,pageID:l.string.isRequired,source:l.string.isRequired,initialClientFilter:l.string,flowID:l.string},getDefaultProps:function p(){return {folder:c('MessagingTag').INBOX,initialClientFilter:c('MercuryFilters').ALL};},getInitialState:function p(){c('MercuryPagesChannelHandlerDEPRECATED').getForFBID(this.props.pageID).turnOn();return {filter:c('MercuryFilters').ALL,clientFilter:this.props.initialClientFilter,loadingThreads:false,moreThreads:false,_mercuryThreads:c('MercuryThreads').getForFBID(this.props.pageID),_orderedThreadlist:new (c('MercuryPageOrderedThreadlist'))(this.props.pageID),_payloadPreprocessor:c('MercuryServerPayloadPreprocessor').getForFBID(this.props.pageID),_threadInformer:c('MercuryThreadInformer').getForFBID(this.props.pageID),threads:[],clientFilteredThreads:[]};},fetchMoreThreads:function p(q,r,s,t){this._fetchThreads(q,r,s,t,false);},refetchThreads:function p(q,r,s,t,u){this._fetchThreads(q,r,s,t,true,u);},fetchThreadUntilThreadFound:function p(q,r,s,t){this._fetchCount=1;this._fetchThreads(0,q,r,s,true,this.fetchThreadIfNoGivenThread);},fetchThreadIfNoGivenThread:function p(){this._fetchCount++;var q=this.state.threads.findIndex(function(r){return r===this.props.threadID;}.bind(this));if(q<0&&this._fetchCount<n)this._fetchThreads(this.state.threads.length,c('MercuryThreadlistConstants').WEBMESSENGER_THREAD_COUNT,this.getMercuryFolder(this.props.folder),this.state.filter,false,this.fetchThreadIfNoGivenThread);},applyClientFilters:function p(q){if(this.state.clientFilter!==m)return;this.state._mercuryThreads.getMultiThreadMeta(q,function(r){var s=[];Object.keys(r).forEach(function(t){var u=r[t];if(!u.snippet_sender)return;var v=c('MercuryIDs').getUserIDFromParticipantID(u.snippet_sender);if(v!==this.props.pageID)s.push(t);}.bind(this));this.setState({clientFilteredThreads:s});}.bind(this));},getMercuryFolder:function p(q){return q===c('MessagingTag').ARCHIVED?c('MessagingTag').ACTION_ARCHIVED:q;},logPageLoadEndEvent:function p(){var event;switch(this.props.folder){case c('MessagingTag').INBOX:event=c('PagesEventType').MESSAGES_INBOX_LOAD_END;break;case c('MessagingTag').ARCHIVED:event=c('PagesEventType').MESSAGES_ARCHIVED_LOAD_END;break;case c('MessagingTag').SPAM:event=c('PagesEventType').MESSAGES_SPAM_LOAD_END;break;case c('MessagingTag').OTHER:event=c('PagesEventType').MESSAGES_OTHER_LOAD_END;break;default:j(0);break;}c('PagesEventObserver').logData_DEPRECATED({event_name:event,page_id:this.props.pageID,source:this.props.source,flowID:this.props.flowID,loading_event_time:Date.now()});event=c('PagesEventType').MESSAGES_EMPTY_THREAD_LOADED;var q={subsection:this.props.folder};if(this.state.threads.length===0)c('PagesEventObserver').notify(event,this.props.pageID,q);},logPageEvent:function p(){var event;switch(this.props.folder){case c('MessagingTag').INBOX:event=c('PagesEventType').MESSAGES_VIEW_INBOX;break;case c('MessagingTag').ARCHIVED:event=c('PagesEventType').MESSAGES_VIEW_ARCHIVED;break;case c('MessagingTag').SPAM:event=c('PagesEventType').MESSAGES_VIEW_SPAM;break;case c('MessagingTag').OTHER:event=c('PagesEventType').MESSAGES_VIEW_OTHER;break;default:j(0);break;}c('PagesEventObserver').logData_DEPRECATED({event_name:event,page_id:this.props.pageID,source:this.props.source});},updateThreads:function p(){var q=this.state.threads.length,r=this.state._orderedThreadlist.getThreadlistUntilTimestamp(q<c('MercuryThreadlistConstants').WEBMESSENGER_THREAD_COUNT?0:this._oldTimestamp,this.getMercuryFolder(this.props.folder),this.state.filter);this.applyClientFilters(r);this.setState({threads:r});},_fetchThreads:function p(q,r,s,t,u,v){if(this.state.loadingThreads)return;this.setState({loadingThreads:true});v=v||c('emptyFunction');this.state._orderedThreadlist.getFilteredThreadlist(q,r+1,s,t,function(w,x){var y=x.length>r,z=y?x.slice(0,r):x;if(z.length>0){this.state._mercuryThreads.getThreadMeta(z[z.length-1],function(ba){this._oldTimestamp=ba.timestamp;}.bind(this));}else this._oldTimestamp=0;var aa=u?z:this.state.threads.concat(z);this.applyClientFilters(aa);this.setState({loadingThreads:false,moreThreads:y,threads:aa},w);}.bind(this,v));},componentWillMount:function p(){this.logPageEvent();this._threadListUpdatedToken=this.state._threadInformer.subscribe('threadlist-updated',this.updateThreads);this._threadsUpatedToken=this.state._threadInformer.subscribe('threads-updated',function(q,r){for(var s in r)if(this.refs[s])this.refs[s].updateThread();}.bind(this));},componentWillUpdate:function p(q,r){if(r.filter!==this.state.filter)c('PagesMessengerDispatcher').handleUpdateFromViewAction({actionType:c('PagesMessengerActions').ONVISIBLE_RESET});},componentWillUnmount:function p(){c('MercuryPagesChannelHandlerDEPRECATED').getForFBID(this.props.pageID).turnOff();this.state._threadInformer.unsubscribe(this._threadListUpdatedToken);this.state._threadInformer.unsubscribe(this._threadsUpatedToken);this._subscriptions.release();},componentDidMount:function p(){this._subscriptions=new (c('SubscriptionsHandler'))();this._subscriptions.addSubscriptions(c('PagesMessengerStore').addListener(c('PagesMessengerActions').ONVISIBLE_RESET,function(){if(this.refs.onvisible)this.refs.onvisible.reset();}.bind(this)));},renderEmptyThreads:function p(){var q=null;switch(this.props.folder){case c('MessagingTag').ARCHIVED:q=i._("You have no archived messages.");break;case c('MessagingTag').INBOX:q=i._("You have no messages in your inbox.");break;case c('MessagingTag').SPAM:q=i._("You have no messages in your spam folder.");break;case c('MessagingTag').OTHER:q=i._("You have no messages in your other folder.");break;default:break;}return (c('React').createElement('div',{className:"_5swj _2pi1"},c('React').createElement('div',null,c('React').createElement(c('Image.react'),{className:"_5we3",src:k("94999")})),c('React').createElement('div',null,c('React').createElement(c('XUIText.react'),{weight:'bold'},q))));},renderInitialLoadingSpinner:function p(){return (c('React').createElement('div',{className:"_3oly _2ph-"},c('React').createElement(c('XUISpinner.react'),{background:'light',size:'large',paused:false})));},renderLoadingMoreThreadSpinner:function p(){if(this.state.loadingThreads&&this.state.threads.length)return (c('React').createElement('div',{className:"_3oly _2ph-"},c('React').createElement(c('XUISpinner.react'),{background:'light',size:'small',paused:false})));return c('React').createElement('div',null);}};f.exports=o;}),null);
  __d('PagesMessengerSpringboardThreadlist.react',['cx','List.react','MercurySyncPageEnvironment','MercuryThreadlistConstants','PagesMessengerThreadlistMixin','PagesMessengerThreadRow.react','React','ScrollableArea.react','debounce','PagesMessagingConst'],(function a(b,c,d,e,f,g,h){var i=c('React').PropTypes,j=c('PagesMessagingConst').UNANSWERED_FILTER,k=350,l=c('React').createClass({displayName:'PagesMessengerSpringboardThreadlist',mixins:[c('PagesMessengerThreadlistMixin')],propTypes:{basePermalinkURI:i.string.isRequired,disableComposer:i.bool.isRequired},componentWillMount:function m(){c('MercurySyncPageEnvironment').setUp(this.props.pageID,this.props.initSyncSequenceID);this.refetchThreads(c('MercuryThreadlistConstants').RECENT_THREAD_OFFSET,c('MercuryThreadlistConstants').JEWEL_MORE_COUNT,this.getMercuryFolder(this.props.folder),this.state.filter);},componentWillUMount:function m(){c('MercurySyncPageEnvironment').tearDown(this.props.pageID);},_onScroll:function m(){if(!this.state.moreThreads)return;this.fetchMoreThreads(this.state.threads.length,c('MercuryThreadlistConstants').JEWEL_MORE_COUNT,this.getMercuryFolder(this.props.folder),this.state.filter);},renderThreadList:function m(){if(!this.state.threads.length)if(this.state.loadingThreads){return this.renderInitialLoadingSpinner();}else return this.renderEmptyThreads();var n=this.state.clientFilter===j?this.state.clientFilteredThreads:this.state.threads,o=n.map(this.renderThread);return (c('React').createElement(c('ScrollableArea.react'),{className:"_1w6z _1uni",height:k,onScroll:c('debounce')(this._onScroll),scrollbar:'nofade',shadow:false},c('React').createElement(c('List.react'),{spacing:'none'},o),this.renderLoadingMoreThreadSpinner()));},renderThread:function m(n,o){return (c('React').createElement(c('PagesMessengerThreadRow.react'),{basePermalinkURI:this.props.basePermalinkURI,disableComposer:this.props.disableComposer,folder:this.props.folder,index:o,key:n,ref:n,showActionButton:true,source:this.props.source,springboard:true,threadID:n,userID:this.props.pageID}));},render:function m(){return this.renderThreadList();}});f.exports=l;}),null);