/*!CK:1758313293!*//*1459420385,*/

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

__d("MessageThreadViewSource",[],function a(b,c,d,e,f,g){c.__markCompiled&&c.__markCompiled();f.exports={UNSPECIFIED:"unspecified",LEGACY:"legacy",LEGACY_MESSAGES_PREVIEW:"legacy_messages_preview",REFRESH_SPRINGBOARD:"springboard",REFRESH_MESSAGETAB:"message_tab",NEW_MESSAGETAB:"new_message_tab",REFRESH_PERMALINK:"permalink",REFRESH_HIGHLANDER_JEWEL:"highlander_jewel",REFRESH_SEARCH_TYPEAHEAD:"search_typeahead",MTOUCH_MESSAGE_TAB:"mtouch_message_tab",MBASIC_MESSAGE_TAB:"mbasic_message_tab"};},null);
__d("MNCommerceErrors",[],function a(b,c,d,e,f,g){c.__markCompiled&&c.__markCompiled();f.exports={ALREADY_UNLINKED:1893001};},null);
__d("MNCommerceReplyTypes",[],function a(b,c,d,e,f,g){c.__markCompiled&&c.__markCompiled();f.exports={COMMERCE_LINK:2,COMMERCE_UNLINK:3};},null);
__d("P2PPaymentLogMessageSubtype",[],function a(b,c,d,e,f,g){c.__markCompiled&&c.__markCompiled();f.exports={SENT_IN_GROUP:"sent_in_group",CANCELED_SENDER_RISK:"canceled_sender_risk",CANCELED_DECLINED:"canceled_declined",CANCELED_RECIPIENT_RISK:"canceled_recipient_risk",CANCELED_EXPIRED:"canceled_expired",CANCELED_SAME_CARD:"canceled_same_card",CANCELED_CUSTOMER_SERVICE:"canceled_customer_service",CANCELED_CHARGEBACK:"canceled_chargeback",CANCELED_SYSTEM_FAIL:"canceled_system_fail",REQUEST_CANCELED_BY_REQUESTER:"request_canceled_by_requester",REQUEST_DECLINED_BY_REQUESTEE:"request_declined_by_requestee",REQUEST_EXPIRED:"request_expired"};},null);
__d("PageCustomTagConsts",[],function a(b,c,d,e,f,g){c.__markCompiled&&c.__markCompiled();f.exports={COLORS:{FF000000:{fill:"FFFFFFFF",border:"FF90949C"},FF8A73C9:{fill:"FFF4F1FA",border:"FF8A73C9"},FFF65569:{fill:"FFFEEEF0",border:"FFF65569"},FF5291FF:{fill:"FFEEF4FF",border:"FF5291FF"},FFFB9240:{fill:"FFFFF4EC",border:"FFFB9240"},FF72A737:{fill:"FFF6FAF1",border:"FF72A737"}}};},null);
__d("PagesManagerMessagingTabPerfEvents",[],function a(b,c,d,e,f,g){c.__markCompiled&&c.__markCompiled();f.exports={MESSAGE_TAB_WILL_RENDER:"message_tab_will_render",MESSAGE_TAB_APP_DID_RENDER:"message_tab_app_did_render",MESSAGE_TAB_THREAD_LIST_DID_RENDER:"message_tab_thread_list_did_render",MESSAGE_TAB_DETAIL_VIEW_DID_RENDER:"message_tab_detail_view_did_render",OLD_MESSAGE_TAB_WILL_RENDER:"old_message_tab_will_render",OLD_MESSAGE_TAB_DID_RENDER:"old_message_tab_did_render"};},null);
__d("PagesMessagingActionPlacement",[],function a(b,c,d,e,f,g){c.__markCompiled&&c.__markCompiled();f.exports={SPRINGBOARD_INLINE_ACTION:"springboard_inline_action",THREAD_LIST_BATCH_ACTION:"thread_list_batch_action",THREAD_ROW_ACTION_ICON:"thread_row_action_icon",MESSAGE_DIALOG_ACTION_LIST:"message_dialog_action_list",MESSAGE_DIALOG_OPENING:"message_dialog_opening",MESSAGE_DIALOG_SHOWN:"message_dialog_shown",THREAD_TITLE_BAR:"thread_title_bar",HOME_PAGE_PAGELET_INLINE_ACTION:"home_page_pagelet_inline_action",UNKNOWN:"unknown"};},null);
__d('PagesMessengerConfirmCloseThreadDialog.react',['fbt','React','XUIDialog.react','XUIDialogBody.react','XUIDialogButton.react','XUIDialogFooter.react','XUIDialogTitle.react'],function a(b,c,d,e,f,g,h){var i,j;if(c.__markCompiled)c.__markCompiled();var k=c('React').PropTypes,l=300;i=babelHelpers.inherits(m,c('React').Component);j=i&&i.prototype;function m(n){'use strict';j.constructor.call(this,n);}m.prototype.render=function(){'use strict';return (c('React').createElement(c('XUIDialog.react'),{layerHideOnBlur:false,shown:this.props.shown,width:l},c('React').createElement(c('XUIDialogTitle.react'),{showCloseButton:false},h._("Close Message Thread")),c('React').createElement(c('XUIDialogBody.react'),null,h._("You haven't sent your message yet. Do you want to leave without sending it?")),c('React').createElement(c('XUIDialogFooter.react'),null,c('React').createElement(c('XUIDialogButton.react'),{action:'cancel',label:h._("Continue Writing"),onClick:this.props.onCancel,use:'default'}),c('React').createElement(c('XUIDialogButton.react'),{action:'confirm',label:h._("Leave This Thread"),onClick:this.props.onConfirm,use:'confirm'}))));};m.propTypes={onCancel:k.func.isRequired,onConfirm:k.func.isRequired,shown:k.bool.isRequired};f.exports=m;},null);
__d('UFICreatorInfo.react',['cx','fbt','HelpLink.react','Image.react','React','URI'],function a(b,c,d,e,f,g,h,i){'use strict';if(c.__markCompiled)c.__markCompiled();var j=c('React').PropTypes,k=c('React').createClass({displayName:'UFICreatorInfo',propTypes:{creatorID:j.string.isRequired,creatorType:j.string.isRequired,creatorName:j.string.isRequired,labelType:j.string.isRequired,pageID:j.string.isRequired,profileURI:j.string},render:function(){var l,m=this.getCreatorLink();switch(this.props.labelType){case 'commented':l=i._("Commented on by {creator}",[i.param('creator',m)]);break;case 'edited_comment':l=i._("Edited by {creator}",[i.param('creator',m)]);break;case 'sent_message':l=i._("Sent by {creator}",[i.param('creator',m)]);break;case 'page_admin_note':l=i._("Noted by {creator}",[i.param('creator',m)]);break;default:return;}return (c('React').createElement('span',null,l,c('React').createElement(c('HelpLink.react'),{tooltip:this.getHelpText()})));},getCreatorLink:function(){switch(this.props.creatorType){case 'application':case 'gray_account':case 'indirect_admin':return (c('React').createElement('a',{className:'uiLinkSubtle','data-hover':'tooltip','data-tooltip-content':this.getTooltipText()},this.props.creatorName));case 'business_admin':return (c('React').createElement('a',{className:'uiLinkSubtle',href:this.props.profileURI},this.props.creatorName));case 'direct_admin':return this.getProfileLinkWithHovercard();case 'former_admin':return (c('React').createElement('span',{className:'uiLinkSubtle'},c('React').createElement(c('Image.react'),{src:'/images/privacy/cant-see.png',width:9,height:9,className:"_3-8_"}),this.getProfileLinkWithHovercard()));default:return (c('React').createElement('span',{className:'uiLinkSubtle'},this.props.creatorName));}},getTooltipText:function(){switch(this.props.creatorType){case 'application':return this.getApplicationText();case 'gray_account':return this.getGrayAccountText();case 'indirect_admin':return this.getIndirectAdminText();}},getProfileLinkWithHovercard:function(){if(!this.props.profileURI)return c('React').createElement('span',null,this.props.creatorName);var l=new (c('URI'))('/ajax/hovercard/user.php').setQueryData({id:this.props.creatorID}).addQueryData({type:'page_admin',extragetparams:JSON.stringify({directed_target_id:this.props.pageID})});return (c('React').createElement('a',{className:'uiLinkSubtle','data-hovercard':l,href:this.props.profileURI},this.props.creatorName));},getApplicationText:function(){switch(this.props.labelType){case 'commented':return i._("This was commented on by someone using {application}.",[i.param('application',this.props.creatorName)]);case 'edited_comment':return i._("This was edited by someone using {application}.",[i.param('application',this.props.creatorName)]);case 'sent_message':return i._("This was sent by someone using {application}.",[i.param('application',this.props.creatorName)]);case 'page_admin_note':return i._("This was noted by someone using {application}.",[i.param('application',this.props.creatorName)]);}},getIndirectAdminText:function(){switch(this.props.labelType){case 'commented':return i._("This was commented on by someone from {page}.",[i.param('page',this.props.creatorName)]);case 'edited_comment':return i._("This was edited by someone from {page}.",[i.param('page',this.props.creatorName)]);case 'sent_message':return i._("This was sent by someone from {page}.",[i.param('page',this.props.creatorName)]);case 'page_admin_note':return i._("This was noted by someone from {page}.",[i.param('page',this.props.creatorName)]);}},getGrayAccountText:function(){switch(this.props.labelType){case 'commented':return i._("This was commented on by someone who doesn't have a personal Facebook account.");case 'edited_comment':return i._("This was edited by someone who doesn't have a personal Facebook account.");case 'sent_message':return i._("This was sent by someone who doesn't have a personal Facebook account.");case 'page_admin_note':return i._("This was noted by someone who doesn't have a personal Facebook account.");}},getHelpText:function(){switch(this.props.labelType){case 'commented':return i._("Only people who manage this Page can see who posted a comment");case 'edited_comment':return i._("Only people who manage this Page can see who edited a comment");case 'sent_message':return i._("Only people who manage this Page can see who sent a message");case 'page_admin_note':return i._("Only people who manage this Page can see who created a note");}}});f.exports=k;},null);
__d('PagesMessengerCreatorInfo.react',['cx','React','UFICreatorInfo.react','XUIGrayText.react'],function a(b,c,d,e,f,g,h){'use strict';var i,j;if(c.__markCompiled)c.__markCompiled();var k=c('React').PropTypes;i=babelHelpers.inherits(l,c('React').Component);j=i&&i.prototype;l.prototype.render=function(){return (c('React').createElement(c('XUIGrayText.react'),{className:"_ajk"+(this.props.isNote?' '+"_45l2":''),display:'inline',shade:'light',size:'small'},c('React').createElement(c('UFICreatorInfo.react'),{creatorID:this.props.creator_info.creatorID,creatorType:this.props.creator_info.creatorType,creatorName:this.props.creator_info.creatorName,labelType:this.props.creator_info.labelType,pageID:this.props.creator_info.pageID,profileURI:this.props.creator_info.profileURI})));};function l(){i.apply(this,arguments);}l.propTypes={creator_info:k.shape({creatorID:k.string.isRequired,creatorName:k.string.isRequired,creatorType:k.string.isRequired,labelType:k.string.isRequired,pageID:k.string.isRequired,profileURI:k.string}).isRequired};f.exports=l;},null);
__d('ChatFileUploaderMixin',['SubscriptionsHandler','React'],function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();var h=c('React').PropTypes,i={propTypes:{attachmentsShelf:h.object,onFileUploaderMounted:h.func,onUploadFinished:h.func,onUpdateAttachmentsShelf:h.func,onSubmit:h.func},setUpSubscriptionsHandler:function(j){this._uploader=j;this._subscriptions=new (c('SubscriptionsHandler'))();this._subscriptions.addSubscriptions(this._uploader.subscribe(['all-uploads-completed','upload-canceled'],this._handleUploadFinished),this._uploader.subscribe('dom-updated',this._handleUpdateAttachmentsShelf),this._uploader.subscribe('submit',this._handleSubmit));this.props.onFileUploaderMounted(this._uploader);},componentWillUnmount:function(){this._subscriptions&&this._subscriptions.release();if(!this.props.uploaderIsFromHigherLevel)this._uploader&&this._uploader.destroy();},isUploading:function(){return this._uploader.isUploading();},getAttachments:function(){return this._uploader.getAttachments();},getImageFiles:function(){return this._uploader.getImageFiles();},getVideoFiles:function(){return this._uploader.getVideoFiles();},getAudioFiles:function(){return this._uploader.getAudioFiles();},getFiles:function(){return this._uploader.getFiles();},removeAttachments:function(){return this._uploader.removeAttachments();},_handleUploadFinished:function(){if(this.props.onUploadFinished){var j;(j=this.props).onUploadFinished.apply(j,arguments);}},_handleUpdateAttachmentsShelf:function(){if(this.props.onUpdateAttachmentsShelf){var j;(j=this.props).onUpdateAttachmentsShelf.apply(j,arguments);}},_handleSubmit:function(){if(this.props.onSubmit){var j;(j=this.props).onSubmit.apply(j,arguments);}}};f.exports=i;},null);
__d('PagesMessengerFileUploader.react',['cx','fbt','ix','ChatFileUploaderMixin','Image.react','InlineBlock.react','Link.react','MercuryConfig','MercuryFileUploader','React','ReactDOM'],function a(b,c,d,e,f,g,h,i,j){if(c.__markCompiled)c.__markCompiled();var k=c('React').PropTypes,l=c('React').createClass({displayName:'PagesMessengerFileUploader',mixins:[c('ChatFileUploaderMixin')],propTypes:{actionURI:k.string,iconSize:k.oneOf(['small','large'])},shouldComponentUpdate:function(m,n){return m.actionURI!=this.props.actionURI;},componentDidMount:function(){this._fileUploader=new (c('MercuryFileUploader'))(this.props.attachmentsShelf,c('ReactDOM').findDOMNode(this.refs.form),c('ReactDOM').findDOMNode(this.refs.input),c('ReactDOM').findDOMNode(this.refs.attachID));this.setUpSubscriptionsHandler(this._fileUploader);},addFiles:function(m){this._fileUploader.addDroppedFiles(m);},getDefaultProps:function(){return {actionURI:c('MercuryConfig').upload_url,iconSize:'small'};},render:function(){return (c('React').createElement('form',{action:this.props.actionURI,method:'post',ref:'form'},c('React').createElement('input',{type:'hidden',name:'attach_id',ref:'attachID'}),c('React').createElement(c('InlineBlock.react'),{className:"_m _4q60 _3rzn"},c('React').createElement(c('Link.react'),{className:"_4q61"+(this.props.iconSize==='small'?' '+"_509v":'')+(this.props.iconSize==='large'?' '+"_5njm":'')+(' '+"bizOK")},this._renderIcon()),c('React').createElement('input',{type:'file',className:"_n",name:'attachment[]',multiple:'true',ref:'input'}))));},_renderIcon:function(){if(this.props.iconSize==='small'){return (c('React').createElement(c('Image.react'),{alt:i._("File"),src:j('/images/composer/attachments/paperclip_icon.png')}));}else if(this.props.iconSize==='large')return (c('React').createElement(c('Image.react'),{alt:i._("File"),src:j('/images/pages/pages_manager/messages/composer-attach.png')}));}});f.exports=l;},null);
__d('MercuryPageMessageActions',['MercuryActionType','MercuryMessageActions','MercuryPayloadSource','MercurySingletonMixin'],function a(b,c,d,e,f,g){'use strict';var h,i;if(c.__markCompiled)c.__markCompiled();h=babelHelpers.inherits(j,c('MercuryMessageActions'));i=h&&h.prototype;function j(k){i.constructor.call(this,k);}j.prototype.createNote=function(k,l,m){this.__dispatcher.handleUpdate(this.__constructClientSingleMessagePayload({action_type:c('MercuryActionType').CREATE_PAGE_ADMIN_NOTE,message_id:m,note:k,thread_id:l},c('MercuryPayloadSource').CLIENT_CREATE_PAGE_ADMIN_NOTE));this.__serverRequests.createNote(k.body.text,m,l);};Object.assign(j,c('MercurySingletonMixin'),{_instances:{}});f.exports=j;},null);
__d('PagesMessengerTextInput.react',['cx','AbstractTextField.react','React','TextAreaControl','InputCaretUtility','joinClasses'],function a(b,c,d,e,f,g,h){if(c.__markCompiled)c.__markCompiled();var i=c('React').PropTypes,j=c('React').createClass({displayName:'PagesMessengerTextInput',_control:null,propTypes:babelHelpers['extends']({},c('AbstractTextField.react').propTypes,{onClick:i.func,onKeyUp:i.func,onPaste:i.func,onFocus:i.func,tabIndex:i.string}),componentDidMount:function(){if(this.refs.input)this._control=new (c('TextAreaControl'))(this.refs.input);},moveCaretToBeginning:function(){c('InputCaretUtility').delayedMoveCaretToBeginning(this.refs.input);},resetHeight:function(){this._control&&this._control.resetHeight();},updateHeight:function(){this._control&&this._control.updateHeight();},render:function(){var k=c('joinClasses')(this.props.className,"_58al"+(' '+"uiTextareaAutogrow"));return (c('React').createElement(c('AbstractTextField.react'),this.props,c('React').createElement('textarea',{type:'text',className:k,tabIndex:this.props.tabIndex,onClick:this.props.onClick,onKeyUp:this.props.onKeyUp,onPaste:this.props.onPaste,onFocus:this.props.onFocus,ref:'input'})));}});f.exports=j;},null);
__d('PagesMessengerSimpleMultilineComposer.react',['cx','fbt','MercuryMessageObject','MercurySourceType','MercuryPageMessageActions','PagesEventObserver','PagesEventType','PagesMessengerTextInput.react','React','ReactDOM','XUIButton.react','isEmpty'],function a(b,c,d,e,f,g,h,i){var j,k;if(c.__markCompiled)c.__markCompiled();var 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.state={value:''};this.$PagesMessengerSimpleMultilineComposer1=c('MercuryPageMessageActions').getForFBID(this.props.sourceID);this.$PagesMessengerSimpleMultilineComposer2=c('MercuryMessageObject').getForFBID(this.props.sourceID);}m.prototype.hasInput=function(){'use strict';return !!this.state.value;};m.prototype.clearInput=function(){'use strict';this.setState({value:''});};m.prototype.focusInput=function(){'use strict';c('ReactDOM').findDOMNode(this.refs.textInput).focus();};m.prototype.getConfirmButtonLabel=function(){'use strict';return i._("Send");};m.prototype.getTextInputPlaceholder=function(){'use strict';return i._("Write a message");};m.prototype.onTextInputChanged=function(event){'use strict';this.setState({value:event.target.value});};m.prototype.processSend=function(event){'use strict';var n=this.refs.textInput.props.value;if(!n)return;var o=this.$PagesMessengerSimpleMultilineComposer2.constructUserGeneratedMessageObject(n,c('MercurySourceType').TITAN_WEB,this.props.threadID,null,null);c('PagesEventObserver').logData_DEPRECATED({page_id:this.props.sourceID,event_name:c('PagesEventType').MESSAGES_DIALOG_SEND,thread_id:this.props.destinationID},null);event.preventDefault();if(this.props.allowSend()){this.$PagesMessengerSimpleMultilineComposer1.send(o);this.setState({value:''});this.props.afterSend();}};m.prototype.render=function(){'use strict';return (c('React').createElement('div',{className:"_1yn"},c('React').createElement('div',null,c('React').createElement(c('PagesMessengerTextInput.react'),{className:"_1yq"+(' '+"_32wh")+(c('isEmpty')(this.state.value)?' '+"_1yx":''),placeholder:this.getTextInputPlaceholder(),onChange:this.onTextInputChanged.bind(this),onKeyUp:this.props.onKeyUp,value:this.state.value,ref:'textInput'})),c('React').createElement('hr',{className:"_1yy"}),c('React').createElement('div',{className:"_1yz"},c('React').createElement('div',{className:"_1y-"},c('React').createElement(c('XUIButton.react'),{use:'confirm',onClick:this.processSend.bind(this),label:this.getConfirmButtonLabel()})))));};m.propTypes={afterSend:l.func.isRequired,allowSend:l.func.isRequired,destinationID:l.string.isRequired,onKeyUp:l.func.isRequired,sourceID:l.string.isRequired,threadID:l.string.isRequired};f.exports=m;},null);
__d("XPagesMessagingFindPageController",["XController"],function a(b,c,d,e,f,g){c.__markCompiled&&c.__markCompiled();f.exports=c("XController").create("\/pages\/messaging\/search\/page_name_typeahead\/",{page_id:{type:"String",required:true},value:{type:"String"}});},null);
__d('PagesMessengerNewThreadDialog.react',['cx','fbt','Event','Keys','MercuryIDs','MercuryParticipants','PagesEventObserver','PagesEventType','PagesMessengerConfirmCloseThreadDialog.react','PagesMessengerSimpleMultilineComposer.react','React','SearchableEntry','WebAsyncSearchSource','XPagesMessagingFindPageController','XUIDialog.react','XUIDialogBody.react','XUIDialogTitle.react','XUITokenizerRichToken.react','XUITypeahead.react'],function a(b,c,d,e,f,g,h,i){var j,k;if(c.__markCompiled)c.__markCompiled();var l=c('React').PropTypes,m=445,n=326;j=babelHelpers.inherits(o,c('React').Component);k=j&&j.prototype;function o(p){'use strict';k.constructor.call(this,p);this.state={typeaheadErrorMessage:null,initDialog:false,pageName:'...',query:'',selectedItem:null,showCloseConfirmationDialog:false};this.$PagesMessengerNewThreadDialog1=false;this.$PagesMessengerNewThreadDialog2=false;var q=c('XPagesMessagingFindPageController').getURIBuilder().setString('page_id',this.props.pageID).getURI(),r={uri:q};this.$PagesMessengerNewThreadDialog3=new (c('WebAsyncSearchSource'))({bootstrapRequests:[r],queryRequests:[r],getAllForEmptyQuery:true});}o.prototype.$PagesMessengerNewThreadDialog4=function(p){'use strict';c('PagesEventObserver').notify(c('PagesEventType').MESSAGES_CLOSE_PAGE_MESSAGE_DIALOG,this.props.pageID,{flowID:this.props.flowID,close_state:p});};o.prototype.$PagesMessengerNewThreadDialog5=function(){'use strict';if(this.refs.newThreadComposer.hasInput()){this.setState({showCloseConfirmationDialog:true});this.$PagesMessengerNewThreadDialog4('has_message');}else{this.$PagesMessengerNewThreadDialog6();this.props.onHide();this.$PagesMessengerNewThreadDialog4('no_message');}};o.prototype.$PagesMessengerNewThreadDialog6=function(){'use strict';this.refs.newThreadComposer.clearInput();this.setState({query:'',selectedItem:null,showCloseConfirmationDialog:false});};o.prototype.$PagesMessengerNewThreadDialog7=function(){'use strict';this.$PagesMessengerNewThreadDialog6();this.props.onHide();this.$PagesMessengerNewThreadDialog4('confirm_close');};o.prototype.$PagesMessengerNewThreadDialog8=function(){'use strict';this.setState({showCloseConfirmationDialog:false});};o.prototype.$PagesMessengerNewThreadDialog9=function(p,event){'use strict';if(c('Event').getKeyCode(event)===c('Keys').ESC)setTimeout(this.$PagesMessengerNewThreadDialog5.bind(this),0);};o.prototype.$PagesMessengerNewThreadDialog10=function(event){'use strict';if(c('Event').getKeyCode(event)===c('Keys').ESC)setTimeout(this.$PagesMessengerNewThreadDialog5.bind(this),0);};o.prototype.$PagesMessengerNewThreadDialog11=function(p){'use strict';if(!p&&this.props.shown)this.$PagesMessengerNewThreadDialog5();};o.prototype.subscribeEvents=function(){'use strict';if(this.refs.newPageMessageDialog&&!this.$PagesMessengerNewThreadDialog2){this.refs.newPageMessageDialog.layerSubscribe('key',this.$PagesMessengerNewThreadDialog9.bind(this));this.$PagesMessengerNewThreadDialog2=true;}};o.prototype.loadPageName=function(){'use strict';if(!this.$PagesMessengerNewThreadDialog1){this.$PagesMessengerNewThreadDialog1=true;c('MercuryParticipants').get(c('MercuryIDs').getParticipantIDFromUserID(this.props.pageID),function(p){this.setState({pageName:p.name});}.bind(this));}};o.prototype.componentDidUpdate=function(p,q){'use strict';if(!this.props.shown)return;this.subscribeEvents();this.loadPageName();if(!this.refs.pageTypeahead)return;var r=this.refs.pageTypeahead.getTextFieldDOM();r.style.border='0px';r.style.fontSize='14px';r.style.lineHeight='14px';if(this.props.shown&&!p.shown)this.refs.pageTypeahead.focusInput();};o.prototype.renderFrom=function(){'use strict';return (c('React').createElement('div',{className:"_1vwk"},i._("From: {pageName}",[i.param('pageName',this.state.pageName)])));};o.prototype.renderSelectedResult=function(){'use strict';if(!this.state.selectedItem)return null;return (c('React').createElement('span',{className:"_31d6"},c('React').createElement(c('XUITokenizerRichToken.react'),{entry:this.state.selectedItem,highlighted:false,label:this.state.selectedItem.getTitle(),onRemove:this.$PagesMessengerNewThreadDialog12.bind(this)})));};o.prototype.renderTypeahead=function(){'use strict';if(this.state.selectedItem)return null;return (c('React').createElement(c('XUITypeahead.react'),{className:(!this.state.selectedItem?"_1vwn":'')+(this.state.selectedItem?' '+"_29ez":'')+(' '+"_2pir"),clearable:!!this.state.selectedItem,highlightOnSelect:true,onChange:this.$PagesMessengerNewThreadDialog13.bind(this),onClear:this.$PagesMessengerNewThreadDialog12.bind(this),onSelectAttempt:this.$PagesMessengerNewThreadDialog14.bind(this),queryString:this.state.query,ref:'pageTypeahead',searchSource:this.$PagesMessengerNewThreadDialog3,selectedEntry:this.state.selectedItem,showPhoto:!!this.state.selectedItem,tallInput:false,viewStyle:'rich',xuiError:this.state.typeaheadErrorMessage}));};o.prototype.renderTo=function(){'use strict';return (c('React').createElement('div',{className:"_1vwl"},c('React').createElement('span',{className:"_1vwm"},i._("To:")),this.renderSelectedResult(),this.renderTypeahead(),c('React').createElement('span',{className:"_2f3y"},i._("Pages Only"))));};o.prototype.$PagesMessengerNewThreadDialog14=function(p){'use strict';this.refs.newThreadComposer.focusInput();this.setState({typeaheadErrorMessage:null,query:p.getTitle(),selectedItem:p});c('PagesEventObserver').notify(c('PagesEventType').MESSAGES_PAGE_MESSAGE_DIALOG_CHOOSE_RECIPIENT,this.props.pageID,{flowID:this.props.flowID,recipient:p.getUniqueID()});};o.prototype.$PagesMessengerNewThreadDialog13=function(event){'use strict';this.setState({typeaheadErrorMessage:null,query:event.target.value,selectedItem:null});};o.prototype.$PagesMessengerNewThreadDialog12=function(){'use strict';this.setState({typeaheadErrorMessage:null,query:'',selectedItem:null});setTimeout(function(){this.refs.pageTypeahead.focusInput();}.bind(this),0);};o.prototype.$PagesMessengerNewThreadDialog15=function(){'use strict';setTimeout(this.$PagesMessengerNewThreadDialog5.bind(this),0);};o.prototype.$PagesMessengerNewThreadDialog16=function(){'use strict';if(!this.state.selectedItem||this.state.selectedItem.getUniqueID().length==0){var p=i._("Please choose a page to receive your message");this.refs.pageTypeahead.focusInput();this.setState({typeaheadErrorMessage:p});return false;}c('PagesEventObserver').notify(c('PagesEventType').MESSAGES_PAGE_MESSAGE_DIALOG_SEND,this.props.pageID,{flowID:this.props.flowID,recipient:this.state.selectedItem.getUniqueID()});return true;};o.prototype.renderAttachmentShelf=function(){'use strict';return (c('React').createElement('div',{ref:'newThreadAttachmentsShelf',className:"_jz4"}));};o.prototype.renderComposer=function(){'use strict';var p=this.state.selectedItem?this.state.selectedItem.getUniqueID():'',q='user:'+p;return (c('React').createElement(c('PagesMessengerSimpleMultilineComposer.react'),{afterSend:this.$PagesMessengerNewThreadDialog15.bind(this),allowSend:this.$PagesMessengerNewThreadDialog16.bind(this),destinationID:p,onKeyUp:this.$PagesMessengerNewThreadDialog10.bind(this),ref:'newThreadComposer',sourceID:this.props.pageID,threadID:q}));};o.prototype.componentWillReceiveProps=function(p){'use strict';if(!this.state.initDialog&&p.shown)this.setState({initDialog:true});};o.prototype.renderCloseConfirmationDialog=function(){'use strict';if(!this.state.showCloseConfirmationDialog)return null;return (c('React').createElement(c('PagesMessengerConfirmCloseThreadDialog.react'),{shown:this.state.showCloseConfirmationDialog,onCancel:this.$PagesMessengerNewThreadDialog8.bind(this),onConfirm:this.$PagesMessengerNewThreadDialog7.bind(this)}));};o.prototype.render=function(){'use strict';if(!this.state.initDialog)return null;return (c('React').createElement('div',null,c('React').createElement(c('XUIDialog.react'),{layerHideOnBlur:false,ref:'newPageMessageDialog',shown:this.props.shown,onToggle:this.$PagesMessengerNewThreadDialog11.bind(this),width:m,height:n},c('React').createElement(c('XUIDialogTitle.react'),{className:"_2ga7"},i._("New Message To Page")),c('React').createElement(c('XUIDialogBody.react'),{className:"_1vwv"},this.renderFrom(),this.renderTo(),this.renderAttachmentShelf(),this.renderComposer())),this.renderCloseConfirmationDialog()));};o.propTypes={flowID:l.string,onHide:l.func.isRequired,shown:l.bool.isRequired,pageID:l.string.isRequired};f.exports=o;},null);
__d('PagesMessengerMessagePageButton.react',['ix','cx','Image.react','PagesEventObserver','PagesEventType','PagesMessengerNewThreadDialog.react','React','XUIButton.react','fbglyph'],function a(b,c,d,e,f,g,h,i){var j,k;if(c.__markCompiled)c.__markCompiled();var l=c('React').PropTypes;j=babelHelpers.inherits(m,c('React').Component);k=j&&j.prototype;m.getButtonSize=function(n){'use strict';return n.size||'medium';};function m(n){'use strict';k.constructor.call(this,n);this.state={showDialog:false};}m.prototype.$PagesMessengerMessagePageButton1=function(){'use strict';this.setState({showDialog:false});};m.prototype.$PagesMessengerMessagePageButton2=function(){'use strict';if(this.state.showDialog)return;this.setState({showDialog:true});c('PagesEventObserver').notify(c('PagesEventType').MESSAGES_OPEN_PAGE_MESSAGE_DIALOG,this.props.pageID,{flowID:this.props.flowID});};m.prototype.render=function(){'use strict';return (c('React').createElement('span',{className:!this.props.pagesCommNewMessagesTab?"_3-9a":''},c('React').createElement(c('XUIButton.react'),{className:this.props.pagesCommNewMessagesTab?"_3kr2":'',image:c('React').createElement(c('Image.react'),{src:h("\/images\/assets_DO_NOT_HARDCODE\/fb_glyphs\/plus_16_bluegray-40.png")}),label:'Message Page',onClick:this.$PagesMessengerMessagePageButton2.bind(this),size:this.props.size}),c('React').createElement(c('PagesMessengerNewThreadDialog.react'),{flowID:this.props.flowID,shown:this.state.showDialog,onHide:this.$PagesMessengerMessagePageButton1.bind(this),pageID:this.props.pageID})));};m.propTypes={flowID:l.string,pageID:l.string.isRequired,pagesCommNewMessagesTab:l.bool};f.exports=m;},null);
__d('ChatShareLinkUploader',['AsyncRequest','CSS','DOM','URLScraper','MercuryShareLinkUploader','MercuryAttachmentTemplates','Event'],function a(b,c,d,e,f,g){var h,i;if(c.__markCompiled)c.__markCompiled();h=babelHelpers.inherits(j,c('MercuryShareLinkUploader'));i=h&&h.prototype;j.prototype.__initialize=function(k,l,m,n,o){'use strict';this.$ChatShareLinkUploader1=k;this.$ChatShareLinkUploader2=l;this.$ChatShareLinkUploader3=m;this.$ChatShareLinkUploader4=false;this.$ChatShareLinkUploader5=null;this.$ChatShareLinkUploader6=n;this.$ChatShareLinkUploader7=o;this.$ChatShareLinkUploader8=false;c('Event').listen(l,'keyup',function(){!this.getInputValue().length&&this.$ChatShareLinkUploader9.enable();}.bind(this));this.$ChatShareLinkUploader9=new (c('URLScraper'))(l,n);this.$ChatShareLinkUploader9.subscribe('match',function(p,q){this.loadShare(q&&q.url);}.bind(this));this.$ChatShareLinkUploader10=1337;this.$ChatShareLinkUploader11=null;};j.prototype.getInputValue=function(){'use strict';return this.$ChatShareLinkUploader6?this.$ChatShareLinkUploader6():this.$ChatShareLinkUploader2.value;};j.prototype.getAttachData=function(){'use strict';return this.loadAttachData(this.$ChatShareLinkUploader4,this.$ChatShareLinkUploader1,this.$ChatShareLinkUploader2,this.$ChatShareLinkUploader6);};j.prototype.getShareData=function(){'use strict';if(!this.$ChatShareLinkUploader4)return null;return this.getShareDataFromStage(this.$ChatShareLinkUploader4,this.$ChatShareLinkUploader1);};j.prototype.close=function(){'use strict';this.$ChatShareLinkUploader12();this.$ChatShareLinkUploader9.disable();this.inform('closed');};j.prototype.clear=function(){'use strict';this.$ChatShareLinkUploader12();this.$ChatShareLinkUploader9.enable();};j.prototype.$ChatShareLinkUploader12=function(){'use strict';var k=this.$ChatShareLinkUploader11;delete this.$ChatShareLinkUploader11;if(k){c('DOM').remove(k);this.inform('dom-updated');}this.$ChatShareLinkUploader13();this.$ChatShareLinkUploader4=false;this.$ChatShareLinkUploader8=false;this.$ChatShareLinkUploader5&&this.$ChatShareLinkUploader5.abort();this.$ChatShareLinkUploader5=null;this.$ChatShareLinkUploader9&&this.$ChatShareLinkUploader9.reset();};j.prototype.loadShareFromParams=function(k,l){'use strict';this.$ChatShareLinkUploader8=true;this.$ChatShareLinkUploader14(new (c('AsyncRequest'))().setMethod('POST').setURI('/ajax/share_params.php').setData({chat:true,share_type:k,share_params:l}));};j.prototype.loadShare=function(k,l){'use strict';this.$ChatShareLinkUploader14(new (c('AsyncRequest'))().setMethod('POST').setURI('/ajax/share_scrape.php').setData({chat:true,extra_params:JSON.stringify(l),u:k}),k);};j.prototype.loadedFromFeed=function(){'use strict';return this.$ChatShareLinkUploader8;};j.prototype.$ChatShareLinkUploader13=function(){'use strict';return ++this.$ChatShareLinkUploader10;};j.prototype.$ChatShareLinkUploader15=function(){'use strict';return this.$ChatShareLinkUploader10;};j.prototype.$ChatShareLinkUploader14=function(k,l){'use strict';this.$ChatShareLinkUploader5&&this.$ChatShareLinkUploader5.abort();var m=c('MercuryAttachmentTemplates')[':fb:mercury:share-link-row'].build();if(this.$ChatShareLinkUploader11)c('DOM').remove(this.$ChatShareLinkUploader11);this.$ChatShareLinkUploader11=m.getRoot();c('Event').listen(m.getNode('closeFileUpload'),'click',function(event){this.close();event.kill();}.bind(this));c('DOM').appendContent(this.$ChatShareLinkUploader1,this.$ChatShareLinkUploader11);c('CSS').show(this.$ChatShareLinkUploader1);this.inform('dom-updated');var n=this.$ChatShareLinkUploader13();this.$ChatShareLinkUploader5=k.setHandler(function(o){return this.$ChatShareLinkUploader16(n,o,l);}.bind(this));this.$ChatShareLinkUploader5.send();this.inform('link-detected');};j.prototype.$ChatShareLinkUploader16=function(k,l,m){'use strict';if(this.$ChatShareLinkUploader15()!==k)return;this.$ChatShareLinkUploader5=null;c('DOM').appendContent(this.$ChatShareLinkUploader11,l.payload);this.$ChatShareLinkUploader3();this.$ChatShareLinkUploader4=true;this.inform('share-loaded');if(!this.getAttachData()){this.close();if(m&&this.getInputValue().indexOf(m)===-1)this.$ChatShareLinkUploader7(m);return;}c('CSS').addClass(this.$ChatShareLinkUploader11,'done');};function j(){'use strict';h.apply(this,arguments);}f.exports=j;},null);
__d('PagesMessengerShareLinkUploader',['ChatShareLinkUploader','emptyFunction','SubscriptionsHandler'],function a(b,c,d,e,f,g){var h,i;if(c.__markCompiled)c.__markCompiled();h=babelHelpers.inherits(j,c('ChatShareLinkUploader'));i=h&&h.prototype;function j(k,l,m,n){'use strict';i.constructor.call(this,k,l,c('emptyFunction'));this.$PagesMessengerShareLinkUploader1=new (c('SubscriptionsHandler'))();this.$PagesMessengerShareLinkUploader1.addSubscriptions(this.subscribe(['all-uploads-completed','upload-canceled'],m),this.subscribe('submit',n));}j.prototype.destroy=function(){'use strict';this.$PagesMessengerShareLinkUploader1&&this.$PagesMessengerShareLinkUploader1.release();};f.exports=j;},null);
__d("XPagesMessagingSuggestedResponseController",["XController"],function a(b,c,d,e,f,g){c.__markCompiled&&c.__markCompiled();f.exports=c("XController").create("\/pages\/messaging\/suggestedresponse\/",{});},null);
__d("XPagesMessagingSuggestedResponseFeedbackController",["XController"],function a(b,c,d,e,f,g){c.__markCompiled&&c.__markCompiled();f.exports=c("XController").create("\/pages\/messaging\/suggestedresponse\/feedback\/",{});},null);
__d('PagesMessageSuggestedResponseHandler',['invariant','ActorURI','AsyncRequest','XPagesMessagingSuggestedResponseController','XPagesMessagingSuggestedResponseFeedbackController','isEmpty'],function a(b,c,d,e,f,g,h){if(c.__markCompiled)c.__markCompiled();function i(j,k){'use strict';this.$PagesMessageSuggestedResponseHandler2=j;this.$PagesMessageSuggestedResponseHandler1=k;this.$PagesMessageSuggestedResponseHandler3=false;this.$PagesMessageSuggestedResponseHandler5=false;}i.prototype.requestSuggestedResponseAsync=function(j,k){'use strict';this.$PagesMessageSuggestedResponseHandler3=true;var l=c('XPagesMessagingSuggestedResponseController').getURIBuilder().getURI();new (c('AsyncRequest'))().setURI(c('ActorURI').create(l,this.$PagesMessageSuggestedResponseHandler1)).setData({message:this.$PagesMessageSuggestedResponseHandler2.body}).setMethod('POST').setHandler(function(m){return this.$PagesMessageSuggestedResponseHandler6(m.payload,j);}.bind(this)).setErrorHandler(k).send();};i.prototype.sendFeedback=function(j){'use strict';!this.hasReceviedSuggestedResponse()?h(0):void 0;var k=c('XPagesMessagingSuggestedResponseFeedbackController').getURIBuilder().getURI();new (c('AsyncRequest'))().setURI(c('ActorURI').create(k,this.$PagesMessageSuggestedResponseHandler1)).setMethod('POST').setData({message_id:this.$PagesMessageSuggestedResponseHandler4,accepted:j}).send();};i.prototype.$PagesMessageSuggestedResponseHandler6=function(j,k){'use strict';if(j.messageFound)this.$PagesMessageSuggestedResponseHandler4=j.messageID;k(this.$PagesMessageSuggestedResponseHandler2.message_id,j);};i.prototype.shouldBeTreatedAsRejected=function(){'use strict';return !this.getHasBeenAccepted()&&this.hasReceviedSuggestedResponse();};i.prototype.hasReceviedSuggestedResponse=function(){'use strict';return !c('isEmpty')(this.$PagesMessageSuggestedResponseHandler4);};i.prototype.alreadyRequested=function(){'use strict';return this.$PagesMessageSuggestedResponseHandler3;};i.prototype.getMessageID=function(){'use strict';return this.$PagesMessageSuggestedResponseHandler2.message_id;};i.prototype.getHasBeenAccepted=function(){'use strict';return this.$PagesMessageSuggestedResponseHandler5;};f.exports=i;},null);
__d('PagesMessengerSuggestedResponseView.react',['cx','fbt','LoadingIndicator.react','PagesMessageSuggestedResponseHandler','React','XUIGrayText.react','XUIButton.react'],function a(b,c,d,e,f,g,h,i){if(c.__markCompiled)c.__markCompiled();var j=c('React').PropTypes,k=c('React').createClass({displayName:'PagesMessengerSuggestedResponseView',propTypes:{onAccepted:j.func.isRequired,onDeclined:j.func,suggestedResponseHandler:j.instanceOf(c('PagesMessageSuggestedResponseHandler'))},getInitialState:function(){return {shouldShowResult:false,shouldShowProgress:false,responseMessage:"",witMessageId:""};},_reset:function(){this.setState(this.getInitialState());},componentWillReceiveProps:function(l){if(l.suggestedResponseHandler!==this.props.suggestedResponseHandler){this._reset();var m=l.suggestedResponseHandler;if(!m||m.alreadyRequested())return;this.setState({shouldShowProgress:true});m.requestSuggestedResponseAsync(this._onSuggestedResponseReceived,this._onSuggestedResponseError);}},_onSuggestedResponseReceived:function(l,m){if(!this._isMessageIDCurrent(l))return;this.setState({shouldShowProgress:false});if(!!m.responseMessage&&m.responseMessage.length>0)this.setState({shouldShowResult:true,responseMessage:m.responseMessage,witMessageId:m.message_id});},_onSuggestedResponseError:function(l){if(!this._isMessageIDCurrent(l))return;this.setState({shouldShowProgress:false,shouldShowResult:false});},_isMessageIDCurrent:function(l){return !!this.props.suggestedResponseHandler&&l===this.props.suggestedResponseHandler.getMessageID();},render:function(){return (c('React').createElement('div',{className:"_710"+(' '+"_2ph-")+(!this.state.shouldShowResult&&!this.state.shouldShowProgress?' '+"hidden_elem":'')},this._renderProgressPart(),this._renderSuggestionPart()));},_renderSuggestionPart:function(){return (c('React').createElement('div',{className:!this.state.shouldShowResult?"hidden_elem":''},c('React').createElement('div',{className:"_3-94"},c('React').createElement(c('XUIGrayText.react'),{shade:'light'},i._("We found a suggested reply:"))),c('React').createElement('div',{className:"_3-94"},c('React').createElement(c('XUIGrayText.react'),{shade:'dark',className:"_711"},this.state.responseMessage)),c('React').createElement('div',{className:"_712"},c('React').createElement(c('XUIGrayText.react'),{shade:'light',className:"_3-90"},i._("Do you want to use this reply?")),c('React').createElement(c('XUIButton.react'),{label:i._("No"),use:'default',className:"_3-8_",onClick:this._onDeclined}),c('React').createElement(c('XUIButton.react'),{label:i._("Yes"),use:'confirm',onClick:this._onAccepted}))));},_renderProgressPart:function(){return (c('React').createElement('div',{className:(!this.state.shouldShowProgress?"hidden_elem":'')+(' '+"_71d")},c('React').createElement(c('XUIGrayText.react'),{shade:'light'},i._("Looking for suggested responses")),c('React').createElement(c('LoadingIndicator.react'),{size:'small',color:'white',className:"_3-9a"})));},_hide:function(){this.setState({shouldShowResult:false,shouldShowProgress:false});},_onAccepted:function(){this._hide();this.props.suggestedResponseHandler&&this.props.suggestedResponseHandler.sendFeedback(true);this.props.onAccepted&&this.props.onAccepted(this.state.responseMessage);},_onDeclined:function(){this._hide();this.props.suggestedResponseHandler&&this.props.suggestedResponseHandler.sendFeedback(false);this.props.onDeclined&&this.props.onDeclined();}});f.exports=k;},null);
__d('PageCustomTagColorSelector.react',['cx','xuiglyph','ContextualLayer.react','Image.react','PageCustomTagConsts','React','XUICard.react'],function a(b,c,d,e,f,g,h,i){'use strict';var j,k;if(c.__markCompiled)c.__markCompiled();var l=c('PageCustomTagConsts').COLORS;j=babelHelpers.inherits(m,c('React').Component);k=j&&j.prototype;function m(n){k.constructor.call(this,n);this.state={openSelector:false};this.$PageCustomTagColorSelector1=this.$PageCustomTagColorSelector1.bind(this);this.$PageCustomTagColorSelector2=this.$PageCustomTagColorSelector2.bind(this);}m.prototype.$PageCustomTagColorSelector1=function(n){this.setState({openSelector:n});};m.prototype.$PageCustomTagColorSelector2=function(n){this.$PageCustomTagColorSelector1(false);this.props.onSelectColor(n);};m.prototype.$PageCustomTagColorSelector3=function(n){return '#'+l[n].border.substring(2);};m.prototype.$PageCustomTagColorSelector4=function(n){return '#'+l[n].fill.substring(2);};m.prototype.render=function(){var n='/images/pages/context_card/triangle_down/triangle_down_'+this.props.selectedColor+'.png';return (c('React').createElement('div',null,c('React').createElement(c('ContextualLayer.react'),{contextRef:function(){return this.refs.colorSelector;}.bind(this),shown:this.state.openSelector,onToggle:this.$PageCustomTagColorSelector1,position:'below',alignment:'right'},c('React').createElement('div',{className:"_2af4"},c('React').createElement('div',{className:"_2af5"}),Object.keys(l).map(function(o){return (c('React').createElement(c('XUICard.react'),{className:"_2af6",key:o,style:{borderColor:this.$PageCustomTagColorSelector3(o),backgroundColor:this.$PageCustomTagColorSelector4(o)},onClick:function(){return this.$PageCustomTagColorSelector2(o);}.bind(this)},o===this.props.selectedColor?c('React').createElement(c('Image.react'),{src:i('checkmark')}):null));}.bind(this)))),c('React').createElement('div',{className:"_2af7"+(this.state.openSelector?' '+"_2af8":''),ref:"colorSelector"},c('React').createElement(c('XUICard.react'),{className:"_2af9",style:{borderColor:this.$PageCustomTagColorSelector3(this.props.selectedColor),backgroundColor:this.$PageCustomTagColorSelector4(this.props.selectedColor)},onClick:function(){return this.$PageCustomTagColorSelector1(!this.state.openSelector);}.bind(this)},c('React').createElement(c('Image.react'),{src:n})))));};f.exports=m;},null);
__d('PageCustomTagSearchableEntry',['SearchableEntry'],function a(b,c,d,e,f,g){var h,i;if(c.__markCompiled)c.__markCompiled();h=babelHelpers.inherits(j,c('SearchableEntry'));i=h&&h.prototype;function j(k){'use strict';i.constructor.call(this,{uniqueID:k.id,title:k.name});this.$PageCustomTagSearchableEntry1=k;}j.prototype.getColor=function(){'use strict';return '#'+this.$PageCustomTagSearchableEntry1.color.substring(2);};j.prototype.getBorderColor=function(){'use strict';return '#'+this.$PageCustomTagSearchableEntry1.borderColor.substring(2);};j.prototype.getFillColor=function(){'use strict';return '#'+this.$PageCustomTagSearchableEntry1.fillColor.substring(2);};j.prototype.getData=function(){'use strict';return this.$PageCustomTagSearchableEntry1;};f.exports=j;},null);
__d('PageCustomTagSearchSource',['AbstractSearchSource','PageCustomTagSearchableEntry'],function a(b,c,d,e,f,g){var h,i;if(c.__markCompiled)c.__markCompiled();var j=3,k=[];h=babelHelpers.inherits(l,c('AbstractSearchSource'));i=h&&h.prototype;l.getInstance=function(m,n){'use strict';var o=n?1:0;k.forEach(function(p){p.setAvailableTags(m);});if(!k[o])k[o]=new l(m,n);return k[o];};function l(m,n){'use strict';i.constructor.call(this);var o=n?1:0;if(!(k[o])){this.setAvailableTags(m);this.setShowQueryAsEntry(n);}}l.prototype.setAvailableTags=function(m){'use strict';this.$PageCustomTagSearchSource1=m;};l.prototype.setShowQueryAsEntry=function(m){'use strict';this.$PageCustomTagSearchSource2=m;};l.prototype.searchImpl=function(m,n,o){'use strict';var p=[],q=false;if(m){var r=m.toLowerCase();this.$PageCustomTagSearchSource1.forEach(function(u){if(u.name.toLowerCase().indexOf(r)!==-1)p.push(u);if(m===u.name)q=true;});}else p=this.$PageCustomTagSearchSource1.slice(0,j);var s=[],t=0;if(m&&!q&&this.$PageCustomTagSearchSource2)s.push(new (c('PageCustomTagSearchableEntry'))({id:0,color:'',borderColor:'',fillColor:'',name:m,threadCount:0}));p.forEach(function(u){s.push(new (c('PageCustomTagSearchableEntry'))(u));});n(s,m);};f.exports=l;},null);
__d('PageCustomTagTypeaheadPresenter.react',['cx','ContextualLayerUpdateOnScroll','PageCustomTagSearchableEntry','React','XUITypeaheadViewItem.react','emptyFunction'],function a(b,c,d,e,f,g,h){var i,j,k,l,m,n;if(c.__markCompiled)c.__markCompiled();i=babelHelpers.inherits(o,c('React').Component);j=i&&i.prototype;o.prototype.render=function(){'use strict';var s=this.props.entry,t="_599m"+(this.props.highlighted?' '+"_599n":''),u={};if(!this.props.searchBar)u.color=this.props.highlighted?'white':s.getColor();return (c('React').createElement('li',{'aria-selected':this.props.highlighted,className:t,key:s.getUniqueID(),onMouseDown:function(v){return this.props.onSelect(s,v);}.bind(this),onMouseEnter:function(){return this.props.onHighlight(s);}.bind(this)},c('React').createElement('div',{className:"_599p _50if",style:u},s.getTitle())));};function o(){'use strict';i.apply(this,arguments);}k=babelHelpers.inherits(p,c('React').Component);l=k&&k.prototype;p.prototype.$PageCustomTagsRenderer1=function(s){'use strict';return (c('React').createElement(o,{entry:s,key:s.getUniqueID(),highlighted:s===this.props.highlightedEntry,onHighlight:this.props.onHighlight,onRenderHighlight:this.props.onRenderHighlight,onSelect:this.props.onSelect,searchBar:this.props.searchBar}));};p.prototype.render=function(){'use strict';var s=(!this.props.searchBar?"_50ig":'')+(!this.props.entries.length?' '+"_599s":'');return (c('React').createElement('ul',{className:s,onMouseLeave:function(){return this.props.removeHighlight();}.bind(this)},this.props.entries.map(function(t){return this.$PageCustomTagsRenderer1(t);}.bind(this))));};function p(){'use strict';k.apply(this,arguments);}m=babelHelpers.inherits(q,c('React').Component);n=m&&m.prototype;q.prototype.render=function(){'use strict';var s=this.props.entry;return (c('React').createElement('span',{className:"_4n1-",style:{color:s.getColor()}},s.getTitle()));};function q(){'use strict';m.apply(this,arguments);}var r={useLayer:true,layerBehaviors:{ContextualLayerUpdateOnScroll:c('ContextualLayerUpdateOnScroll')},ViewRenderer:p,TokenRenderer:q};p.defaultProps={removeHighlight:c('emptyFunction'),searchBar:false};f.exports=r;},null);
__d('PagesContextCardCustomTag.react',['cx','Image.react','React','XUICard.react'],function a(b,c,d,e,f,g,h){'use strict';var i,j;if(c.__markCompiled)c.__markCompiled();i=babelHelpers.inherits(k,c('React').Component);j=i&&i.prototype;function k(l){j.constructor.call(this,l);this.state={removed:false};this.$PagesContextCardCustomTag1=this.$PagesContextCardCustomTag1.bind(this);this.$PagesContextCardCustomTag2=this.$PagesContextCardCustomTag2.bind(this);}k.prototype.$PagesContextCardCustomTag1=function(){if(this.props.onClick)this.props.onClick(this.props.tagData);};k.prototype.$PagesContextCardCustomTag2=function(){if(this.props.hideOnRemove)this.setState({removed:true});if(this.props.onRemove)this.props.onRemove(this.props.tagData.name);};k.prototype.render=function(){if(this.props.hideOnRemove&&this.state.removed)return null;var l=this.props.tagData,m='/images/pages/context_card/cross/cross_'+l.borderColor+'.png';return (c('React').createElement(c('XUICard.react'),{className:"_1pbr"+(this.props.onClick?' '+"_2rj2":''),style:{backgroundColor:'#'+l.fillColor.substring(2),borderColor:'#'+l.borderColor.substring(2),color:'#'+l.color.substring(2)},key:l.id,onClick:this.$PagesContextCardCustomTag1},l.name,this.props.canRemove?c('React').createElement(c('Image.react'),{className:"_2rj2 _5t1r",src:m,onClick:this.$PagesContextCardCustomTag2,height:8,width:8}):null));};f.exports=k;},null);
__d('PagesContextCardCustomTagsBlock.react',['cx','fbt','PagesContextCardCustomTag.react','React'],function a(b,c,d,e,f,g,h,i){'use strict';var j,k;if(c.__markCompiled)c.__markCompiled();j=babelHelpers.inherits(l,c('React').Component);k=j&&j.prototype;function l(m){k.constructor.call(this,m);}l.prototype.render=function(){return (c('React').createElement('div',{className:"_3774"},this.props.customTags.map(function(m){return (c('React').createElement(c('PagesContextCardCustomTag.react'),{canRemove:this.props.canRemove,hideOnRemove:true,key:m.id,onClick:this.props.onClick,onRemove:this.props.onRemove,tagData:m}));}.bind(this))));};f.exports=l;},null);
__d('PagesManagerMessagingNavigationUnitKey',['MercuryFilters','MessagingTag','PageMessageEnumTag'],function a(b,c,d,e,f,g){'use strict';if(c.__markCompiled)c.__markCompiled();var h={FILTERS:{ALL:c('MercuryFilters').ALL,UNREAD:c('MercuryFilters').UNREAD,FLAGGED:c('PageMessageEnumTag').FLAG},FOLDERS:{INBOX:c('MessagingTag').INBOX,ARCHIVED:c('MessagingTag').ACTION_ARCHIVED,SPAM:c('MessagingTag').SPAM}};f.exports=h;},null);
__d('PagesEnumTag.react',['PagesContextCardCustomTag.react','React','PagesManagerMessagingNavigationUnitKey'],function a(b,c,d,e,f,g){var h,i;if(c.__markCompiled)c.__markCompiled();h=babelHelpers.inherits(j,c('React').Component);i=h&&h.prototype;function j(k){'use strict';i.constructor.call(this,k);this.$PagesEnumTag1=this.$PagesEnumTag1.bind(this);this.$PagesEnumTag2=this.$PagesEnumTag2.bind(this);}j.prototype.getTagData=function(){'use strict';var k={};if(this.props.unit.getKey()===c('PagesManagerMessagingNavigationUnitKey').FILTERS.FLAGGED){k.borderColor='FFFB9240';k.color='FFFB9240';k.fillColor='FFFFF4EC';k.id=0;}k.name=this.props.unit.getDisplayTitle();return k;};j.prototype.$PagesEnumTag1=function(){'use strict';if(this.props.onClick)this.props.onClick(this.props.unit);};j.prototype.$PagesEnumTag2=function(){'use strict';if(this.props.onRemove)this.props.onRemove();};j.prototype.render=function(){'use strict';var k=this.getTagData();return (c('React').createElement(c('PagesContextCardCustomTag.react'),{canRemove:this.props.canRemove,key:k.id,onClick:this.$PagesEnumTag1,onRemove:this.$PagesEnumTag2,tagData:k}));};f.exports=j;},null);
__d('PagesManagerPerfTypedLogger',['Banzai','GeneratedLoggerUtils','nullthrows'],function a(b,c,d,e,f,g){'use strict';if(c.__markCompiled)c.__markCompiled();function h(){this.clear();}h.prototype.log=function(){c('GeneratedLoggerUtils').log('logger:PagesManagerPerfLoggerConfig',this.$PagesManagerPerfTypedLogger1,c('Banzai').BASIC);};h.prototype.logVital=function(){c('GeneratedLoggerUtils').log('logger:PagesManagerPerfLoggerConfig',this.$PagesManagerPerfTypedLogger1,c('Banzai').VITAL);};h.prototype.clear=function(){this.$PagesManagerPerfTypedLogger1={};return this;};h.prototype.updateData=function(j){this.$PagesManagerPerfTypedLogger1=babelHelpers['extends']({},this.$PagesManagerPerfTypedLogger1,j);return this;};h.prototype.setEventName=function(j){this.$PagesManagerPerfTypedLogger1.event_name=j;return this;};h.prototype.setEventSeriesID=function(j){this.$PagesManagerPerfTypedLogger1.event_series_id=j;return this;};h.prototype.setPageID=function(j){this.$PagesManagerPerfTypedLogger1.page_id=j;return this;};h.prototype.setPerfTime=function(j){this.$PagesManagerPerfTypedLogger1.perf_time=j;return this;};h.prototype.setVC=function(j){this.$PagesManagerPerfTypedLogger1.vc=j;return this;};var i={event_name:true,event_series_id:true,page_id:true,perf_time:true,vc:true};f.exports=h;},null);
__d('MercuryPageThreadActions',['MercuryActionType','MercuryPayloadSource','MercurySingletonMixin','MercuryThreadActions'],function a(b,c,d,e,f,g){var h,i;if(c.__markCompiled)c.__markCompiled();h=babelHelpers.inherits(j,c('MercuryThreadActions'));i=h&&h.prototype;function j(k){'use strict';i.constructor.call(this,k);}j.prototype.addFlag=function(k,l){'use strict';this.batchFlag([k],l);};j.prototype.batchAddFlag=function(k,l){'use strict';k.forEach(function(m){this.__serverRequests.addThreadFlag(m,l);}.bind(this));this.__dispatcher.handleUpdate(this.$MercuryPageThreadActions1(k,true,l));};j.prototype.removeFlag=function(k,l){'use strict';this.batchRemoveFlag([k],l);};j.prototype.batchRemoveFlag=function(k,l){'use strict';k.forEach(function(m){this.__serverRequests.removeThreadFlag(m,l);}.bind(this));this.__dispatcher.handleUpdate(this.$MercuryPageThreadActions1(k,false,l));};j.prototype.$MercuryPageThreadActions1=function(k,l,m){'use strict';return this.__constructClientPayload(k,c('MercuryActionType').CHANGE_FLAG,c('MercuryPayloadSource').CLIENT_CHANGE_FLAG,{mark_as_flag:l,source:m});};Object.assign(j,c('MercurySingletonMixin'),{_instances:{}});f.exports=j;},null);
__d('MessengerErrorAttachment.react',['cx','React'],function a(b,c,d,e,f,g,h){'use strict';var i,j;if(c.__markCompiled)c.__markCompiled();i=babelHelpers.inherits(k,c('React').Component);j=i&&i.prototype;function k(l){j.constructor.call(this,l);}k.prototype.render=function(){return (c('React').createElement('div',{className:"_1o12 _52mr"},c('React').createElement('div',{className:"_1o13"},this.props.attachment.error_msg)));};f.exports=k;},null);
__d('MessengerFileAttachment.react',['cx','Link.react','ReactComponentWithPureRenderMixin','React'],function a(b,c,d,e,f,g,h){'use strict';if(c.__markCompiled)c.__markCompiled();var i=c('React').PropTypes,j=c('React').createClass({displayName:'MessengerFileAttachment',mixins:[c('ReactComponentWithPureRenderMixin')],propTypes:{attachment:i.object.isRequired},render:function(){return (c('React').createElement(c('Link.react'),{className:"_4pcn _2uf4",target:'_blank',href:this.props.attachment.url},c('React').createElement('div',{className:"_2uf5"}),this.props.attachment.name));}});f.exports=j;},null);
__d('MessengerPhoto.react',['cx','Image.react','MercuryAttachmentType','React','URI','joinClasses'],function a(b,c,d,e,f,g,h){'use strict';if(c.__markCompiled)c.__markCompiled();var i=c('React').PropTypes,j=206,k=450;function l(p){if(p.metadata){if(p.attach_type===c('MercuryAttachmentType').VIDEO)return p.metadata.inbox_preview;return new (c('URI'))('/ajax/mercury/attachments/photo.php').addQueryData({fbid:p.metadata.fbid,height:j,mode:'cover',request_user_id:p.metadata.pageid,width:j}).toString();}return null;}function m(p){if(p.preview_uploading)return {height:p.preview_height||j,src:p.preview_url,width:p.preview_width||j};var q=l(p);if(q)return babelHelpers['extends']({src:q},p.metadata.inbox_size);if(p.preview_url)return {height:p.preview_height,src:p.preview_url,width:p.preview_width};if(p.media)return p.media.playable&&p.media.animated_image?babelHelpers['extends']({},p.media.animated_image_size,{src:p.media.animated_image}):babelHelpers['extends']({},p.media.image_size,{src:p.media.image});}function n(p,q){if(p.preview_uploading)return p.preview_url?0:j;var r=p.media?m(p):{height:p.preview_height,width:p.preview_width};return Math.min(r.height*Math.min(1,k/r.width),k);}var o=c('React').createClass({displayName:'MessengerPhoto',contextTypes:{width:i.number},propTypes:{attachment:i.object.isRequired,isSingle:i.bool.isRequired,onClick:i.func},render:function(){var p=this.props.attachment,q=m(p);if(!q)return null;var r=this._getImageFromMetadata(q),s={};if(q.src)s.backgroundImage='url('+q.src+')';if(this.props.isSingle){var t=n(p,this.context);if(t)s.minHeight=t;}var u=!!this.props.attachment.app_attribution;return (c('React').createElement('div',{className:c('joinClasses')(this.props.className,"_4tsk"+(u?' '+"_mxz":'')+(this.props.isSingle&&!u?' '+"_52mr":'')+(p.preview_uploading&&!q.src?' '+"_3etv":'')),style:s,onClick:this._onClick},r,c('React').createElement('a',{className:"_4tsl",href:q.src},this.props.children)));},_onClick:function(p){p.preventDefault();if(this.props.onClick)this.props.onClick(this.props.attachment);},_getImageFromMetadata:function(p){if(this.props.attachment.preview_uploading&&!p.src)return null;if(this.props.isSingle)return c('React').createElement(c('Image.react'),{alt:'',src:p.src});return null;}});f.exports=o;},null);
__d('MessengerVideo.react',['cx','ix','Image.react','MessengerPhoto.react','ReactComponentWithPureRenderMixin','React','joinClasses'],function a(b,c,d,e,f,g,h,i){'use strict';if(c.__markCompiled)c.__markCompiled();var j=c('React').PropTypes,k=c('React').createClass({displayName:'MessengerVideo',mixins:[c('ReactComponentWithPureRenderMixin')],propTypes:{attachment:j.object.isRequired,isSingle:j.bool.isRequired,onClick:j.func},render:function(){return (c('React').createElement(c('MessengerPhoto.react'),babelHelpers['extends']({},this.props,{className:c('joinClasses')(this.props.className,"_ccq")}),c('React').createElement(c('Image.react'),{className:"_ccr",src:i('/images/chat/chat_play_icon.png')}),c('React').createElement('span',{className:"_ccs"},this._getDuration())));},_getDuration:function(){var l;if(!!this.props.attachment.metadata){l=this.props.attachment.metadata.duration;}else if(!!this.props.attachment.media)l=this.props.attachment.media.duration;return !!l?this._formatDuration(l):null;},_formatDuration:function(l){var m=l%60;return Math.floor(l/60)+':'+(m<10?'0':'')+m;}});f.exports=k;},null);
__d('MessengerPhotosGroup.react',['cx','ChatSpeakingSticker.react','MercuryAttachmentType','MessagingGiftWrap.react','MessengerPhoto.react','MessengerVideo.react','MessagesViewer','ReactComponentWithPureRenderMixin','React','Vector','joinClasses'],function a(b,c,d,e,f,g,h){'use strict';if(c.__markCompiled)c.__markCompiled();var i='empty-spacer',j=c('React').PropTypes,k=c('React').createClass({displayName:'MessengerPhotosGroup',mixins:[c('ReactComponentWithPureRenderMixin')],propTypes:{attachType:j.string,attachments:j.arrayOf(j.object).isRequired,isGiftWrapped:j.bool,message:j.object,onUnwrap:j.func},componentDidMount:function(){c('MessagesViewer').preload();},render:function(){var l=this.props.attachments,m=this._rowsFor(l);if(this.props.isGiftWrapped)m=c('React').createElement('div',null,m);return (c('React').createElement('div',babelHelpers['extends']({},this.props,{className:this._getRootClassNameFor(l)}),m,this.props.isGiftWrapped?c('React').createElement(c('MessagingGiftWrap.react'),{onUnwrap:this.props.onUnwrap}):null));},_onChildClicked:function(l){if(l.preview_uploading)return;if(l.attach_type===c('MercuryAttachmentType').VIDEO){c('MessagesViewer').renderVideo({pageID:l.metadata.pageid,rootClassName:"_1j1h",videoID:l.metadata.fbid,videoSize:new (c('Vector'))(l.metadata.dimensions.width,l.metadata.dimensions.height),videoURI:l.url});}else if(l.attach_type===c('MercuryAttachmentType').PHOTO||l.attach_type===c('MercuryAttachmentType').THIRDPARTYSTICKER||l.attach_type===c('MercuryAttachmentType').ANIMATED_IMAGE){c('MessagesViewer').bootstrapWithConfig({actorid:l.metadata.pageid,dimensions:l.metadata.dimensions,disableForward:!!l.metadata.pageid,disablePaging:this.props.attachments.length===1,endpoint:l.url,fbid:l.metadata.fbid,rootClassName:"_1j1h",snapToPhoto:true,src:l.preview_url});}else if(l.uri)window.open(l.uri);},_rowsFor:function(l){if(l.length===1)return [this._photo(l[0],true)];var m=3;if(l.length===2||l.length===4)m=2;var n=[];for(var o=0,p=l.length;o<p;o+=m){var q=l.slice(o,o+m),r=m-q.length;while(r>0){q.push({attach_type:i,key:'ghost'+r});r--;}n.push(c('React').createElement('div',{className:"_2n8g",key:o},q.map(function(s){return this._photo(s);}.bind(this))));}return n;},_photo:function(l,m){var n;if(l.deduplication_key){n=l.deduplication_key;}else if(l.metadata){n=l.metadata.fbid;}else n=l.upload_id;var o={attachment:l,isSingle:m||false,key:n,onClick:this._onChildClicked},p=this.props.attachType||l.attach_type;switch(p){case c('MercuryAttachmentType').PHOTO:case c('MercuryAttachmentType').ANIMATED_IMAGE:case c('MercuryAttachmentType').THIRDPARTYSTICKER:return c('React').createElement(c('MessengerPhoto.react'),o);case c('MercuryAttachmentType').VIDEO:if(l.metadata&&l.metadata.render_as_sticker)return (c('React').createElement(c('ChatSpeakingSticker.react'),{videoSize:l.metadata.dimensions,videoURI:l.url}));return c('React').createElement(c('MessengerVideo.react'),o);case i:return (c('React').createElement('div',{key:l.key,className:"_4tsk _4rf-"}));default:throw l.attachType+' is not handled by MessengerPhotoGroup';}},_getRootClassNameFor:function(l){var m=l.length===2||l.length===4;return c('joinClasses')(this.props.className,"_2n8h"+(l.length===1?' '+"_2n8i":'')+(m?' '+"_4ksk":'')+(l.length>1&&!m?' '+"_2n8k":''));}});f.exports=k;},null);
__d('MessengerStickerUtils',['MercuryAttachmentType'],function a(b,c,d,e,f,g){'use strict';if(c.__markCompiled)c.__markCompiled();function h(k){return !!(k&&k.attach_type===c('MercuryAttachmentType').STICKER);}function i(k){var l=k.attachments;return !!(k.is_like_preview||k.sticker_id||l&&l.length===1&&h(l[0]));}function j(k){return k.size===1&&i(k.first());}f.exports={isStickerMessageGroup:j,isStickerMessage:i,isStickerAttachment:h};},null);
__d('MessengerVoiceClipAttachment.react',['cx','MercuryAttachmentAudioClip.react','MercuryShareAttachmentRenderLocations','MessagingGiftWrap.react','ReactComponentWithPureRenderMixin','React','messengerCustomColorUtils'],function a(b,c,d,e,f,g,h){'use strict';if(c.__markCompiled)c.__markCompiled();var i=c('React').PropTypes,j=c('React').createClass({displayName:'MessengerVoiceClipAttachment',mixins:[c('ReactComponentWithPureRenderMixin')],propTypes:{attachment:i.object.isRequired,customColor:i.string,isGiftWrapped:i.bool,message:i.object.isRequired,onUnwrap:i.func},render:function(){var k=this.props.attachment,l=k.metadata.duration/1000,m=!!k.app_attribution,n={};if(this.props.customColor)n=c('messengerCustomColorUtils').customBubbleStyle(this.props.customColor,n);var o=this.props.isGiftWrapped?c('React').createElement(c('MessagingGiftWrap.react'),{onUnwrap:this.props.onUnwrap}):null;return (c('React').createElement('div',{className:"_hh7"+(' '+"_s1-")+(!!this.props.customColor?' '+"_5sxi":'')+(!m?' '+"_52mr":'')+(m?' '+"_mxz":'')+(' '+"_1fz8")+(m?' '+"_1-wa":'')+(' '+"_1nqp"),style:n},c('React').createElement(c('MercuryAttachmentAudioClip.react'),{src:k.url,duration:l,key:'audio:'+this.props.message.message_id,showHelp:false,width:200,location:c('MercuryShareAttachmentRenderLocations').MESSENGER,rootClassName:"_3czg"+(m?' '+"_4yjw":'')+(' '+"_2poz")+(' '+"_ui9")}),o));}});f.exports=j;},null);
__d('StickerActions',['BanzaiLogger','StickersDispatcher','keyMirror'],function a(b,c,d,e,f,g){'use strict';if(c.__markCompiled)c.__markCompiled();var h=c('keyMirror')({ADD_PACK:null,CLICKED_STICKER_IN_THREAD:null,HIDE_TRAY:null,REMOVE_PACK:null,REPLACE_STICKER_STATE:null,RESET_NUM_NEW_PACKS:null,SELECT_PACK:null,SELECT_STORE_PACK:null,SHOW_TRAY:null,UPDATE_TRAY_DATA:null,TRAY_DATA_READY:null,SUBSCRIBE_ASSOCIATED_PAGE:null}),i={Types:h,addPack:function(j){c('StickersDispatcher').dispatch({type:h.ADD_PACK,packID:j});},removePack:function(j){c('StickersDispatcher').dispatch({type:h.REMOVE_PACK,packID:j});},selectPack:function(j,k){if(!k)c('BanzaiLogger').log('StickersLoggerConfig',{event:'select_pack',packid:j});c('StickersDispatcher').dispatch({type:h.SELECT_PACK,packID:j});},selectStorePack:function(j){c('StickersDispatcher').dispatch({type:h.SELECT_STORE_PACK,packID:j});},resetNumNewPacks:function(){c('StickersDispatcher').dispatch({type:h.RESET_NUM_NEW_PACKS});},handleStickerClick:function(j,k){c('StickersDispatcher').dispatch({packID:j,threadID:k,type:i.Types.CLICKED_STICKER_IN_THREAD});},showStickerTray:function(j){c('StickersDispatcher').dispatch({type:i.Types.SHOW_TRAY,threadID:j});},hideStickerTray:function(){c('StickersDispatcher').dispatch({type:i.Types.HIDE_TRAY});},updateTrayData:function(){c('StickersDispatcher').dispatch({type:i.Types.UPDATE_TRAY_DATA});},loadedTrayData:function(){c('StickersDispatcher').dispatch({type:i.Types.TRAY_DATA_READY});},subscribeAssociatedPage:function(j,k){c('StickersDispatcher').dispatch({type:i.Types.SUBSCRIBE_ASSOCIATED_PAGE,packID:j,callback:k});}};f.exports=i;},null);
__d('isRetina',[],function a(b,c,d,e,f,g){'use strict';if(c.__markCompiled)c.__markCompiled();f.exports=function(){return (window.devicePixelRatio||1)>1;};},null);
__d('MessengerAttachmentRenderer',['cx','EmojiSticker.react','EmojiLikeUtils','MercuryAttachment','MercuryAttachmentType','MercuryAudioType','MercuryConfig','MercuryShareAttachment.react','MercuryShareAttachmentRenderLocations','MessagingGiftWrap.react','MessagingGiftWrapChecker','MessagingSourceEnum','MessengerErrorAttachment.react','MessengerFileAttachment.react','MessengerHotLikePreview.react','MessengerHotLikeUtils','MessengerPhotosGroup.react','MessengerStickerUtils','MessengerVoiceClipAttachment.react','React','Set','Sticker.react','StickerActions','StickerAssetType','StickerConstants','StickerImages','StickerUtils','StoryAttachmentStyle','XStickerAssetController','isRetina'],function a(b,c,d,e,f,g,h){'use strict';if(c.__markCompiled)c.__markCompiled();var i=new (c('Set'))([c('MercuryAttachmentType').ANIMATED_IMAGE,c('MercuryAttachmentType').PHOTO,c('MercuryAttachmentType').VIDEO,c('MercuryAttachmentType').THIRDPARTYSTICKER]),j=700,k='sticker:',l='giftwrap:',m=function(o){return o===Object(o);},n={getAttachmentsInsideBubble:function(o,p){var q=c('MercuryAttachment').get(o).filter(m).filter(function(r){return (!this.attachmentShouldAppearOutsideBubble(r));}.bind(this));return this._getAttachmentComponents(q,o,p);},getAttachmentsOutsideBubble:function(o,p,q,r){var s=c('MercuryAttachment').get(o).filter(m).filter(function(t){return (this.attachmentShouldAppearOutsideBubble(t));}.bind(this));return this._getAttachmentComponents(s,o,p,q,r);},_getAttachmentComponents:function(o,p,q,r,s){var t=this._getPhotosGroup(o.filter(this.isPhotoAttachment),p,s),u=o.filter(function(v){return !this.isPhotoAttachment(v);}.bind(this)).map(function(v){return this._getAttachmentComponent(v,p,q,r,s);}.bind(this));if(t)u.push(t);return u;},_getAttachmentComponent:function(o,p,q,r,s){if(c('MessengerStickerUtils').isStickerAttachment(o))return this._getStickerComponent(o,p,r,s);if(this.isEmojiLikeAttachment(o))return this._getEmojiLikeAttachment(o,p,s);if(this.isVoiceClip(o))return this._getVoiceClip(o,p,r,s);if(this.isFileAttchment(o))return this._getFileComponent(o,p);if(this.isP2P(o)||this.isShareAttachment(o))return this._getShareAttachment(o,p,q);if(this.isErrorAttachment(o))return this._getErrorAttachment(o,p);},_getStickerComponent:function(o,p,q,r){if(p.is_like_preview)return this._maybeGiftWrapSticker(c('React').createElement(c('MessengerHotLikePreview.react'),{customColor:q,customLike:p.customLike,key:'hlp:'+p.like_preview_since,since:p.like_preview_since}),p,r);var s=o.metadata;if(!s){s=c('MessengerHotLikeUtils').getMetadataForHotLike(p.sticker_id);if(!s){var t=c('StickerImages').getSticker(p.sticker_id);s=babelHelpers['extends']({},t);var u=c('StickerUtils').getScaledDimensions(t?t.height:c('StickerConstants').THREAD_SIZE,t?t.width:c('StickerConstants').THREAD_SIZE,c('StickerConstants').THREAD_SIZE),v=u.height,w=u.width;s.height=v;s.width=w;}s.stickerID=p.sticker_id;}var x=c('XStickerAssetController').getURIBuilder().setInt('sticker_id',s.stickerID),y=null,z=null;if(c('isRetina')()){y=s.paddedSpriteURI2x;z=s.spriteURI2x;}else{y=s.paddedSpriteURI;z=s.spriteURI;}var aa=s.stickerID.toString(),ba=c('React').createElement(c('Sticker.react'),{className:"_2poz"+(' '+"_ui9")+(c('MessagingGiftWrapChecker').shouldRenderWithGiftWrap(p)&&!!c('MessengerHotLikeUtils').getMetadataForHotLike(aa)?' '+"_4ue_":''),animationTrigger:'hover',customColor:q,frameCount:s.frameCount||1,frameRate:s.frameRate||c('StickerConstants').DEFAULT_FRAME_RATE,framesPerCol:s.framesPerCol||1,framesPerRow:s.framesPerRow||1,key:k+p.message_id,onStickerClick:function(ca,da){c('StickerActions').handleStickerClick(ca,p.thread_id);},packID:s.packID&&s.packID.toString(),paddedSpriteURI:y,sourceHeight:s.height,sourceURI:x.setEnum('image_type',c('StickerAssetType').IMAGE).getURI().toString(),sourceWidth:s.width,spriteURI:z,stickerID:aa});return this._maybeGiftWrapSticker(ba,p,r);},_getEmojiLikeAttachment:function(o,p,q){var r=c('MercuryConfig').MessengerNewEmojiGK&&c('MercuryConfig').MessengerNewEmojiUtils?c('MercuryConfig').MessengerNewEmojiUtils.getNewEmojiData(p.body,o.size):null,s=r?r.emoji:undefined;if(!r){var t=c('EmojiLikeUtils').getURI(p.body,o.size);if(!t)return this._getErrorAttachment(o,p);}var u=c('React').createElement(c('EmojiSticker.react'),{className:"_2poz _ui9",key:k+p.message_id,emoji:p.body,emojiImage:s,sourceURI:t?t:''});return this._maybeGiftWrapSticker(u,p,q);},_getShareAttachment:function(o,p,q){return c('React').createElement(c('MercuryShareAttachment.react'),{attachment:o.share,isSponsored:p.is_sponsored,key:'share:'+p.message_id,location:c('MercuryShareAttachmentRenderLocations').MESSENGER,maxWidth:j,messageID:p.message_id,onComponentLoaded:q,pageID:p.author,thread_id:p.thread_id});},_getVoiceClip:function(o,p,q,r){return (c('React').createElement(c('MessengerVoiceClipAttachment.react'),{attachment:o,customColor:q||undefined,isGiftWrapped:c('MessagingGiftWrapChecker').shouldRenderWithGiftWrap(p),key:'audio:'+p.message_id,message:p,onUnwrap:function(){r&&r();}}));},_getErrorAttachment:function(o,p){return (c('React').createElement(c('MessengerErrorAttachment.react'),{attachment:o,key:'error:'+p.message_id}));},_getPhotosGroup:function(o,p,q){return o.length?c('React').createElement(c('MessengerPhotosGroup.react'),{attachments:o,className:"_2poz _52mr _ui9",isGiftWrapped:c('MessagingGiftWrapChecker').shouldRenderWithGiftWrap(p)&&this._rendersWithoutAttribution(o),key:'photos:'+p.message_id,message:p,onUnwrap:function(){q&&q();}}):null;},_rendersWithoutAttribution:function(o){return o.length!=1||!c('MercuryAttachment').hasAttribution(o[0]);},_getFileComponent:function(o,p){return (c('React').createElement(c('MessengerFileAttachment.react'),{attachment:o,className:"_2poz",key:'file:'+o.url}));},attachmentShouldAppearOutsideBubble:function(o){return c('MessengerStickerUtils').isStickerAttachment(o)||this.isPhotoAttachment(o)||this.isShareAttachment(o)||this.isP2P(o)||this.isVoiceClip(o)||this.isErrorAttachment(o)||this.isEmojiLikeAttachment(o);},isPhotoAttachment:function(o){return i.has(o.attach_type);},isFileAttchment:function(o){return o.attach_type===c('MercuryAttachmentType').FILE;},isShareAttachment:function(o){return !!(this._isStoryBased(o)&&!this.isP2P(o)&&(o.share.style_list.indexOf(c('StoryAttachmentStyle').SHARE)>-1||o.share.style_list.indexOf(c('StoryAttachmentStyle').FALLBACK)>-1));},isP2P:function(o){return !!(this._isStoryBased(o)&&o.share.style_list.indexOf(c('StoryAttachmentStyle').ORION)>-1);},_isStoryBased:function(o){return !!(o.attach_type===c('MercuryAttachmentType').SHARE&&o.share&&o.share.style_list);},isEmojiLikeAttachment:function(o){return o.attach_type===c('MercuryAttachmentType').EMOJI_LIKE;},isVoiceClip:function(o){return !!o.metadata&&(o.metadata.type===c('MercuryAudioType').AudioClip||o.metadata.type===c('MercuryAudioType').VoiceMessageWithTranscript);},isVoiceClipAttachment:function(o){var p=c('MercuryAttachment').get(o).filter(m).filter(function(q){return (this.isVoiceClip(q));}.bind(this));return !!p.length;},isP2PAttachment:function(o){var p=c('MercuryAttachment').get(o).filter(function(q){return (m(q)&&this.isP2P(q));}.bind(this));return !!p.length;},isErrorAttachment:function(o){return o.attach_type===c('MercuryAttachmentType').ERROR;},_maybeGiftWrapComponentForMessage:function(o,p,q){if(!c('MessagingGiftWrapChecker').shouldRenderWithGiftWrap(p))return o;return (c('React').createElement('div',{key:l+p.message_id},o,c('React').createElement(c('MessagingGiftWrap.react'),{onUnwrap:q})));},_maybeGiftWrapSticker:function(o,p,q){if(!c('MessagingGiftWrapChecker').shouldRenderWithGiftWrap(p))return o;return (c('React').createElement('div',{key:l+p.message_id},o,c('React').createElement(c('MessagingGiftWrap.react'),{isSticker:true,onUnwrap:q})));}};f.exports=n;},null);
__d('shouldNotRenderSegoe',['MessengerConfig','UserAgent'],function a(b,c,d,e,f,g){'use strict';if(c.__markCompiled)c.__markCompiled();var h=new RegExp('[\u0530-\u05f4\u10a0-\u10ff]'),i=c('UserAgent').isBrowser('Chrome')&&c('UserAgent').isPlatform('Windows 10');f.exports=function j(k){return (!c('MessengerConfig').SegoeUIDisabled&&i&&h.test(k));};},null);
__d('MessengerBubble.react',['cx','EmojiLikeUtils','EmojiOnlyMessage.react','immutable','MercuryMessageBody.react','MessagingGiftWrap.react','ReactComponentWithPureRenderMixin','shouldNotRenderSegoe','React','joinClasses','messengerCustomColorUtils'],function a(b,c,d,e,f,g,h){'use strict';if(c.__markCompiled)c.__markCompiled();var i=c('React').PropTypes,j=c('React').createClass({displayName:'MessengerBubble',mixins:[c('ReactComponentWithPureRenderMixin')],propTypes:{attachments:i.instanceOf(c('immutable').List),body:i.string,customColor:i.string,customLike:i.object,isGiftWrapped:i.bool,isP2PAttachment:i.bool,onUnwrap:i.func,ranges:i.array,threadID:i.string},getInitialState:function(){return {emojis:undefined};},componentDidMount:function(){if(!this.props.emojis){var k=this.props.body||'',l=c('EmojiLikeUtils').richContent(k);if(l&&l.length)this.setState({emojis:l});}},render:function(){var k={};if(!this.state.emojis&&this.props.customColor)k=c('messengerCustomColorUtils').customBubbleStyle(this.props.customColor,k);if(this.state.emojis){var l=c('EmojiLikeUtils').getSourceURIs(this.state.emojis),m=c('React').createElement(c('EmojiOnlyMessage.react'),{sourceURIs:l});}else m=c('React').createElement(c('MercuryMessageBody.react'),{className:"_3oh-"+(c('shouldNotRenderSegoe')(this.props.body||'')?' '+"_2por":''),body:this.props.body,ranges:this.props.ranges,threadID:this.props.threadID,customLike:this.props.customLike});var n=this.props.isGiftWrapped?c('React').createElement(c('MessagingGiftWrap.react'),{onUnwrap:this._handleUnwrap}):null;return (c('React').createElement('div',babelHelpers['extends']({},this.props,{style:k,className:c('joinClasses')(this.props.className,"_hh7"+(' '+"_s1-")+(' '+"_52mr")+(this.props.isP2PAttachment?' '+"_4z55":'')+(!!this.state.emojis?' '+"_2f5r":'')+(!!this.state.emojis?' '+"_581a":''))}),m,this.props.attachments,n));},_handleUnwrap:function(){this.props.onUnwrap&&this.props.onUnwrap();}});f.exports=j;},null);
__d('MessengerCodePasteUtils',['cx','BanzaiODS','MessengerBubble.react','React'],function a(b,c,d,e,f,g,h){'use strict';if(c.__markCompiled)c.__markCompiled();var i=/`{3,}/;function j(l){return !!(l&&l.search(i)!==-1&&l.split('\n').length>1);}function k(l,m,n){var o=l.split(i),p=[];for(var q=0;q<o.length;q+=2){var r=o[q].trim();if(r&&r.length>0)p.push(c('React').createElement(c('MessengerBubble.react'),{key:q,body:r,className:"clearfix _3058 _ui9",ranges:m,threadID:n}));if(q+1<o.length&&o[q+1]){var s=o[q+1].split('\n'),t=s[0].replace(/[^a-zA-Z]+/g,''),u=s.slice(1).join('\n');c('BanzaiODS').bumpEntityKey('messenger_code_paste','render_bubble');p.push(c('React').createElement('div',{key:q+1,className:"_3058 _15gf _wu0 _52mr"},c('React').createElement('div',{ref:'syntaxTarget'+q,className:'language-'+t},u)));}}return p;}f.exports={containsCodeBlock:j,getCodeAndMessageBubbles:k};},null);
__d('MessengerStore',['MessengerDispatcher','mixInEventEmitter'],function a(b,c,d,e,f,g){'use strict';if(c.__markCompiled)c.__markCompiled();function h(){this.$MessengerStore1=c('MessengerDispatcher').register(this.__onDispatch.bind(this));}h.prototype.getDispatchToken=function(){return this.$MessengerStore1;};h.prototype.emitChange=function(){this.emit('change');};h.prototype.destroy=function(){c('MessengerDispatcher').unregister(this.$MessengerStore1);};c('mixInEventEmitter')(h,{change:true});f.exports=h;},null);
__d('MessengerStateStore',['MessengerActions','MessengerStore'],function a(b,c,d,e,f,g){'use strict';var h,i;if(c.__markCompiled)c.__markCompiled();h=babelHelpers.inherits(j,c('MessengerStore'));i=h&&h.prototype;function j(){i.constructor.call(this);this.$MessengerStateStore1={activeThreadID:null,detailView:null,filter:null,folder:null,masterView:null,serverThreadID:null};this.$MessengerStateStore2=babelHelpers['extends']({},this.$MessengerStateStore1);}j.prototype.getState=function(){return this.$MessengerStateStore1;};j.prototype.getPrevState=function(){return this.$MessengerStateStore2;};j.prototype.__onDispatch=function(k){switch(k.type){case c('MessengerActions').Types.REPLACE_STATE:this.$MessengerStateStore2=this.$MessengerStateStore1;this.$MessengerStateStore1=babelHelpers['extends']({activeThreadID:null,detailView:null,filter:null,folder:null,masterView:null,serverThreadID:null},k.nextState);this.emitChange();break;}};f.exports=new j();},null);
__d('MessengerAttachmentAttribution.react',['cx','ImmutableObject','MercuryAttachmentAttribution.react','React'],function a(b,c,d,e,f,g,h){'use strict';if(c.__markCompiled)c.__markCompiled();var i=c('React').PropTypes,j=c('React').createClass({displayName:'MessengerAttachmentAttribution',propTypes:{attachment:i.instanceOf(c('ImmutableObject'))},render:function(){return (c('React').createElement(c('MercuryAttachmentAttribution.react'),{attachment:this.props.attachment,className:"_2f5n _4br2"}));}});f.exports=j;},null);
__d('MessengerBubbleBlock.react',['cx','React'],function a(b,c,d,e,f,g,h){'use strict';if(c.__markCompiled)c.__markCompiled();var i=c('React').createClass({displayName:'MessengerBubbleBlock',render:function(){return (c('React').createElement('div',{className:"_52mr _4h13 _3058"},this.props.children));}});f.exports=i;},null);
__d('MessengerCodeBubble.react',['Bootloader','immutable','MessengerCodePasteUtils','ReactComponentWithPureRenderMixin','React','ReactDOM'],function a(b,c,d,e,f,g){'use strict';if(c.__markCompiled)c.__markCompiled();var h=c('React').PropTypes,i=c('React').createClass({displayName:'MessengerCodeBubble',mixins:[c('ReactComponentWithPureRenderMixin')],propTypes:{attachments:h.instanceOf(c('immutable').List),body:h.string.isRequired,ranges:h.array.isRequired,threadID:h.string.isRequired},componentDidMount:function(){c('Bootloader').loadModules(["Prism.Complete"],function(j){for(var k in this.refs){var l=c('ReactDOM').findDOMNode(this.refs[k]);j.highlightElement(l);}}.bind(this));},render:function(){var j=c('MessengerCodePasteUtils').getCodeAndMessageBubbles(this.props.body,this.props.ranges,this.props.threadID);return c('React').createElement('div',null,j);}});f.exports=i;},null);
__d('MessengerDateBreak.react',['cx','React','formatDate','joinClasses'],function a(b,c,d,e,f,g,h){if(c.__markCompiled)c.__markCompiled();var i=c('React').PropTypes,j=c('React').createClass({displayName:'MessengerDateBreak',propTypes:{date:i.instanceOf(Date).isRequired},shouldComponentUpdate:function(k){return this.props.date.getTime()!==k.date.getTime();},render:function(){var k=c('formatDate')(this.props.date,{today:'g:ia',withinWeek:'D g:ia',thisYear:'M jS, g:ia',older:'m/d/Y g:ia'});return (c('React').createElement('h4',{className:c('joinClasses')(this.props.className,"_497p _2lpt")},c('React').createElement('time',{className:"_3oh-"},k)));}});f.exports=j;},null);
__d('MessengerDialogCancelButton.react',['fbt','MessengerDialogButton.react','ReactComponentWithPureRenderMixin','React'],function a(b,c,d,e,f,g,h){'use strict';if(c.__markCompiled)c.__markCompiled();var i=c('React').createClass({displayName:'MessengerDialogCancelButton',mixins:[c('ReactComponentWithPureRenderMixin')],render:function(){return (c('React').createElement(c('MessengerDialogButton.react'),babelHelpers['extends']({action:'cancel',label:h._("Cancel"),type:'secondary'},this.props)));}});f.exports=i;},null);
__d('MessengerDeleteMessageDialog.react',['fbt','MercuryConfig','MessengerDialog.react','MessengerDialogBody.react','MessengerDialogButton.react','MessengerDialogCancelButton.react','MessengerDialogFooter.react','MessengerDialogHeader.react','ReactComponentWithPureRenderMixin','React'],function a(b,c,d,e,f,g,h){'use strict';if(c.__markCompiled)c.__markCompiled();var i=c('React').PropTypes,j=c('React').createClass({displayName:'MessengerDeleteMessageDialog',mixins:[c('ReactComponentWithPureRenderMixin')],propTypes:{isFromViewer:i.bool,onDelete:i.func,onToggle:i.func},render:function(){return (c('React').createElement(c('MessengerDialog.react'),{onToggle:this.props.onToggle},c('React').createElement(c('MessengerDialogHeader.react'),null,this._renderDialogHeaderMsg()),c('React').createElement(c('MessengerDialogBody.react'),null,this._renderDialogBodyMsg()),c('React').createElement(c('MessengerDialogFooter.react'),null,c('React').createElement(c('MessengerDialogCancelButton.react'),{onClick:this._handleCancel}),c('React').createElement(c('MessengerDialogButton.react'),{label:this._renderDialogButtonMsg(),onClick:this._handleDelete,type:'primary',use:'danger'}))));},_renderDialogHeaderMsg:function(){if(c('MercuryConfig').MessengerGlobalDeleteGK)if(this.props.isFromViewer){return h._("Delete Message?");}else return h._("Hide Message?");return h._("Delete Message");},_renderDialogBodyMsg:function(){if(c('MercuryConfig').MessengerGlobalDeleteGK)if(this.props.isFromViewer){return h._("If you delete this message, no one in this conversation can see it anymore and it can't be undone.");}else return h._("If you hide your copy of this message, you can't get it back. The other person in the conversation may still be able to see it.");return h._("Are you sure you want to delete this message?");},_renderDialogButtonMsg:function(){if(!this.props.isFromViewer&&c('MercuryConfig').MessengerGlobalDeleteGK)return h._("Hide");return h._("Delete");},_handleDelete:function(){this.props.onToggle&&this.props.onToggle(false);this.props.onDelete&&this.props.onDelete();},_handleCancel:function(){this.props.onCancel&&this.props.onCancel();}});f.exports=j;},null);
__d('MNCommerceLoggingConstants',[],function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();var h={DIALOG_SURFACE:{CHECKOUT_ORDER_CONFIG:'checkout_order_config',SHIPMENT:'shipment',RECEIPT:'receipt',UNLINK:'unlink',UNLINK_ERROR:'unlink_error',MANAGE:'manage'}};f.exports=h;},null);
__d('MNCommerceUnlinkDialog.react',['fbt','MNCommerceButton.react','MNCommerceDialog.react','MNCommerceDialogBody.react','MNCommerceDialogFooter.react','MNCommerceDialogTitle.react','React'],function a(b,c,d,e,f,g,h){'use strict';if(c.__markCompiled)c.__markCompiled();var i=c('React').PropTypes,j=c('React').createClass({displayName:'MNCommerceUnlinkDialog',propTypes:{onCancelButtonClick:i.func,onTurnOffButtonClick:i.func},render:function(){var k=h._("Cancel"),l=h._("Turn Off");return (c('React').createElement(c('MNCommerceDialog.react'),{onToggle:this.props.onToggle,shown:this.props.shown},c('React').createElement(c('MNCommerceDialogTitle.react'),{showCloseButton:false},h._("Unlink account?")),c('React').createElement(c('MNCommerceDialogBody.react'),null,c('React').createElement('div',null,h._("You can turn off updates if you didn't sign up or just don't want to get them anymore."))),c('React').createElement(c('MNCommerceDialogFooter.react'),null,c('React').createElement(c('MNCommerceButton.react'),{label:k,onClick:this.props.onCancelButtonClick,use:'default'}),c('React').createElement(c('MNCommerceButton.react'),{label:l,onClick:this.props.onTurnOffButtonClick,use:'confirm'}))));}});f.exports=j;},null);
__d('MNCommerceUnlinkErrorDialog.react',['fbt','MNCommerceAttachmentConstants','MNCommerceErrors','React','MNCommerceButton.react','MNCommerceDialog.react','MNCommerceDialogBody.react','MNCommerceDialogFooter.react','MNCommerceDialogTitle.react'],function a(b,c,d,e,f,g,h){'use strict';if(c.__markCompiled)c.__markCompiled();var i=c('React').PropTypes,j=c('React').createClass({displayName:'MNCommerceUnlinkErrorDialog',propTypes:{errorType:i.number,onOkayButtonClick:i.func},render:function(){var k=h._("OK"),l=null,m=null;switch(this.props.errorType){case c('MNCommerceErrors').ALREADY_UNLINKED:m=c('React').createElement('div',null,h._("Updates Are Already Off"));l=c('React').createElement('div',null,h._("You aren't getting updates in Messenger."));break;default:m=c('React').createElement('div',null,h._("Couldn't Turn Off Updates"));l=c('React').createElement('div',null,h._("Sorry, something went wrong. Please try again."));break;}return (c('React').createElement(c('MNCommerceDialog.react'),{onToggle:this.props.onToggle,shown:this.props.shown,width:c('MNCommerceAttachmentConstants').UNLINK_ERROR_DIALOG.WIDTH},c('React').createElement(c('MNCommerceDialogTitle.react'),null,m),c('React').createElement(c('MNCommerceDialogBody.react'),null,l),c('React').createElement(c('MNCommerceDialogFooter.react'),null,c('React').createElement(c('MNCommerceButton.react'),{label:k,onClick:this.props.onOkayButtonClick,use:'confirm'}))));}});f.exports=j;},null);
__d('MNCommerceUnlinkDialogContainer.react',['BanzaiLogger','MNCommerceDialogStateActions','MNCommerceDialogStateStore','MNCommerceLoggingConstants','MNCommerceLoggerEvents','MNCommerceUnlinkDialog.react','MNCommerceUnlinkErrorDialog.react','React'],function a(b,c,d,e,f,g){'use strict';if(c.__markCompiled)c.__markCompiled();var h=c('React').createClass({displayName:'MNCommerceUnlinkDialogContainer',render:function(){var i=c('MNCommerceDialogStateStore').getState();if(i&&i.errorType){c('BanzaiLogger').log('MessengerCommerceLoggerConfig',{event:c('MNCommerceLoggerEvents').DIALOG_LOAD_SUCCESS,debug_data:JSON.stringify({dialog_surface:c('MNCommerceLoggingConstants').DIALOG_SURFACE.UNLINK_ERROR})});return (c('React').createElement(c('MNCommerceUnlinkErrorDialog.react'),{onToggle:this._onToggle,shown:!!i,errorType:i.errorType,onOkayButtonClick:this._hideDialog}));}else{c('BanzaiLogger').log('MessengerCommerceLoggerConfig',{event:c('MNCommerceLoggerEvents').DIALOG_LOAD_SUCCESS,debug_data:JSON.stringify({dialog_surface:c('MNCommerceLoggingConstants').DIALOG_SURFACE.UNLINK})});return (c('React').createElement(c('MNCommerceUnlinkDialog.react'),{onToggle:this._onToggle,shown:!!i,onCancelButtonClick:this._hideDialog,onTurnOffButtonClick:i&&i.onTurnOffButtonClick}));}},_onToggle:function(i){if(!i)this._hideDialog();},_hideDialog:function(){c('MNCommerceDialogStateActions').hideDialog();}});f.exports=h;},null);
__d("XMNCommerceUnlinkController",["XController"],function a(b,c,d,e,f,g){c.__markCompiled&&c.__markCompiled();f.exports=c("XController").create("\/messages\/commerce\/unlink\/",{page_id:{type:"String",required:true},user_id:{type:"String",required:true}});},null);
__d('MNCommerceUnlinkDataManager',['AsyncRequest','MNCommerceDialogStateActions','MNCommerceUnlinkDialogContainer.react','XMNCommerceUnlinkController'],function a(b,c,d,e,f,g){'use strict';if(c.__markCompiled)c.__markCompiled();h.prototype.unlink=function(i,j){var k=c('XMNCommerceUnlinkController').getURIBuilder().setString('page_id',i).setString('user_id',j).getURI();new (c('AsyncRequest'))().setURI(k).setErrorHandler(this.$MNCommerceUnlinkDataManager1).send();};h.prototype.$MNCommerceUnlinkDataManager1=function(i){c('MNCommerceDialogStateActions').showDialog(c('MNCommerceUnlinkDialogContainer.react'),{errorType:i.error});};function h(){}f.exports=new h();},null);
__d('MNCommerceLogMessageUtils',['cx','fbt','invariant','BanzaiLogger','Link.react','MercuryConfig','MercuryIDs','MercuryThreads','MNCommerceLoggingConstants','MNCommerceLoggerEvents','MNCommerceDialogStateActions','MNCommerceReplyTypes','MNCommercePromotionBlockDataManager','MNCommercePromotionManageBlockDialogContainer.react','MNCommerceUnlinkDataManager','MNCommerceUnlinkDialogContainer.react','React'],function a(b,c,d,e,f,g,h,i,j){'use strict';if(c.__markCompiled)c.__markCompiled();var k=c('MercuryThreads').get();l.prototype.isCommercePageAdminMessage=function(m){return !!(m&&m.log_message_data&&(m.log_message_data.replyType===c('MNCommerceReplyTypes').COMMERCE_LINK||m.log_message_data.replyType===c('MNCommerceReplyTypes').COMMERCE_UNLINK));};l.prototype.getCommercePageManage=function(m,n){var o=null;if(c('MercuryConfig').WWWMessengerManageAdminGK){var p=function(){var r=c('MercuryIDs').getUserIDFromParticipantID(m.author),s=function(t,u){return c('MNCommercePromotionBlockDataManager').block(t,u);};c('MNCommerceDialogStateActions').showDialog(c('MNCommercePromotionManageBlockDialogContainer.react'),{pageID:r,onConfirmButtonClick:s});c('BanzaiLogger').log('MessengerCommerceLoggerConfig',{event:c('MNCommerceLoggerEvents').DIALOG_OPENED,debug_data:JSON.stringify({dialog_surface:c('MNCommerceLoggingConstants').DIALOG_SURFACE.MANAGE})});};o=c('React').createElement(c('Link.react'),{className:(!n?"_2w2m":'')+(n?' '+"_1jvn":''),onClick:p},i._("Manage"));}else if(m.log_message_data.replyType===c('MNCommerceReplyTypes').COMMERCE_LINK){var q=function(){var r=c('MercuryIDs').getUserIDFromParticipantID(m.author),s=k.getThreadMetaNow(m.thread_id);!s?j(0):void 0;var t=null;s.participants.every(function(v){if(v!==m.author){t=c('MercuryIDs').getUserIDFromParticipantID(v);return false;}return true;});var u=function(){c('MNCommerceDialogStateActions').hideDialog();c('MNCommerceUnlinkDataManager').unlink(r,t);};c('MNCommerceDialogStateActions').showDialog(c('MNCommerceUnlinkDialogContainer.react'),{onTurnOffButtonClick:u});c('BanzaiLogger').log('MessengerCommerceLoggerConfig',{event:c('MNCommerceLoggerEvents').DIALOG_OPENED,debug_data:JSON.stringify({dialog_surface:c('MNCommerceLoggingConstants').DIALOG_SURFACE.UNLINK})});};o=c('React').createElement(c('Link.react'),{className:(!n?"_2w2m":'')+(n?' '+"_1jvn":''),onClick:q},i._("Turn Off"));}return (c('React').createElement('span',null,m.log_message_body,' ',o));};function l(){}f.exports=new l();},null);
__d('P2PBigAmount.react',['cx','ix','CurrentEnvironment','Image.react','React'],function a(b,c,d,e,f,g,h,i){'use strict';if(c.__markCompiled)c.__markCompiled();var j=c('React').PropTypes,k=c('React').createClass({displayName:'P2PBigAmount',propTypes:{amount:j.string.isRequired,isPending:j.bool,size:j.oneOf(['medium','large'])},getDefaultProps:function(){return {size:'medium'};},getImage:function(){if(this.isMessengerDotCom()){if(this.props.isPending){if(this.props.size==='large'){return i('/images/p2p/message-icon-dark-gray-large.png');}else return i('/images/p2p/message-icon-dark-gray.png');}else if(this.props.size==='large'){return i('/images/p2p/message-icon-messenger-blue.png');}else return i('/images/p2p/message-icon-blue.png');}else if(this.props.isPending){if(this.props.size==='large'){return i('/images/p2p/message-icon-gray-large.png');}else return i('/images/p2p/message-icon-gray.png');}else if(this.props.size==='large'){return i('/images/p2p/message-icon-facebook-blue.png');}else return i('/images/p2p/message-icon-www-blue.png');},isMessengerDotCom:function(){return c('CurrentEnvironment').messengerdotcom;},render:function(){var l=this.props.size==='large'?'24':'16';return (c('React').createElement('div',{className:"_8j6"+(this.isMessengerDotCom()?' '+"_8j7":'')+(this.props.size==='large'?' '+"_1fv":'')},c('React').createElement('div',{className:"_8j8"},c('React').createElement(c('Image.react'),{height:l,src:this.getImage(),width:l})),c('React').createElement('div',{className:"_8jc"+(this.props.isPending?' '+"_8jd":'')+(this.props.amount.length>=8?' '+"_8je":'')+(' '+"_3oh-")},this.props.amount)));}});f.exports=k;},null);
__d('P2PGroupSendReceiptDialog.react',['cx','fbt','CurrentEnvironment','Image.react','Link.react','P2PAmountUtils','P2PButton.react','P2PBigAmount.react','P2PDialog.react','P2PDialogBody.react','P2PDialogFooter.react','P2PDialogTitle.react','P2PLinkConstants','P2PLogger','P2PPaymentLoggerEvent','P2PPaymentLoggerEventFlow','P2PText.react','React'],function a(b,c,d,e,f,g,h,i){'use strict';if(c.__markCompiled)c.__markCompiled();var j=c('React').PropTypes,k=c('React').createClass({displayName:'P2PGroupSendReceiptDialog',propTypes:{amount:j.string.isRequired,eventFlow:j.string,isGrayAmount:j.bool,onClose:j.func.isRequired,receiver:j.object.isRequired,sender:j.object.isRequired,title:j.node},getDefaultProps:function(){return {bodyText:i._("You can send money to friends in groups."),eventFlow:c('P2PPaymentLoggerEventFlow').UI_FLOW_P2P_GROUP_SEND,isGrayAmount:false,title:i._("Payment Details")};},componentDidMount:function(){this.log(c('P2PPaymentLoggerEvent').UI_ACTN_3RD_PARTY_RECEIPT_SHOWN,{raw_amount:this.props.amount});},log:function(l,m){c('P2PLogger').log(l,babelHelpers['extends']({www_event_flow:this.props.eventFlow},m));},handleClose:function(){this.log(c('P2PPaymentLoggerEvent').UI_ACTN_3RD_PARTY_RECEIPT_DISMISSED);this.props.onClose();},renderParticipantRow:function(l,m){var n;if(m){n=i._("From");}else n=i._("To");return (c('React').createElement('li',{className:"_2chg",key:l.id},c('React').createElement('div',{className:"_2chh"},c('React').createElement(c('Link.react'),{href:l.profile_uri,onClick:this.props.onClose},c('React').createElement(c('Image.react'),{height:50,src:l.picture,width:50}))),c('React').createElement('div',{className:"_2chi"},c('React').createElement(c('P2PText.react'),{type:'primary'},c('React').createElement(c('P2PText.react'),{type:'secondary'},n),l.full_name))));},render:function(){var l=c('CurrentEnvironment').messengerdotcom,m=l?380:360,n=this.props.title;return (c('React').createElement(c('P2PDialog.react'),{className:l?"_bpv":'',layerHideOnBlur:false,onToggle:this.props.onClose,width:m},c('React').createElement(c('P2PDialogTitle.react'),null,n),c('React').createElement(c('P2PDialogBody.react'),null,c('React').createElement('ul',null,this.renderParticipantRow(this.props.sender,true),this.renderParticipantRow(this.props.receiver,false)),c('React').createElement('div',{className:"_bpy"},c('React').createElement(c('P2PBigAmount.react'),{amount:c('P2PAmountUtils').sanitizeAmount(this.props.amount),isPending:this.props.isGrayAmount,size:'large'})),c('React').createElement(c('P2PText.react'),{className:"_bpt",size:'small',type:'secondary'},this.props.bodyText,' ',c('React').createElement(c('Link.react'),{className:"_1ed3",href:c('P2PLinkConstants').helpCenterURI,target:'_blank'},i._("Learn More")))),c('React').createElement(c('P2PDialogFooter.react'),null,c('React').createElement(c('P2PButton.react'),{label:i._("OK"),onClick:this.handleClose,type:'primary'}))));}});f.exports=k;},null);
__d('P2PGroupPaymentRequestReceiptDialog.react',['fbt','P2PActions','P2PPaymentLoggerEventFlow','P2PGroupSendReceiptDialog.react','React'],function a(b,c,d,e,f,g,h){'use strict';if(c.__markCompiled)c.__markCompiled();var i=c('React').PropTypes,j=c('React').createClass({displayName:'P2PGroupPaymentRequestReceiptDialog',propTypes:{amount:i.string,onClose:i.func,requestee:i.object.isRequired,requester:i.object.isRequired},render:function(){return (c('React').createElement(c('P2PGroupSendReceiptDialog.react'),{amount:this.props.amount,bodyText:h._("You can send payment requests to friends in groups"),eventFlow:c('P2PPaymentLoggerEventFlow').UI_FLOW_P2P_GROUP_REQUEST,isGrayAmount:true,onClose:this.props.onClose||c('P2PActions').hideDialog,title:h._("Payment Request Details"),receiver:this.props.requestee,sender:this.props.requester}));}});f.exports=j;},null);
__d("XP2PPaymentRequestReceiptController",["XController"],function a(b,c,d,e,f,g){c.__markCompiled&&c.__markCompiled();f.exports=c("XController").create("\/p2p\/payment_request\/",{id:{type:"String",required:true}});},null);
__d("XP2PTransactionDetailController",["XController"],function a(b,c,d,e,f,g){c.__markCompiled&&c.__markCompiled();f.exports=c("XController").create("\/p2p\/transaction\/",{id:{type:"String",required:true}});},null);
__d('P2PMercuryLogMessage.react',['cx','fbt','CurrentEnvironment','CurrentUser','Link.react','MercuryIDs','P2PGroupPaymentRequestReceiptDialog.react','P2PGroupSendReceiptDialog.react','P2PPaymentLogMessageSubtype','React','ReactLayeredComponentMixin','XP2PPaymentRequestReceiptController','XP2PTransactionDetailController'],function a(b,c,d,e,f,g,h,i){'use strict';if(c.__markCompiled)c.__markCompiled();var j=c('React').PropTypes,k=c('React').createClass({displayName:'P2PMercuryLogMessage',mixins:[c('ReactLayeredComponentMixin')],propTypes:{amount:j.string,receiver:j.object.isRequired,sender:j.object.isRequired,subtype:j.oneOf(Object.keys(c('P2PPaymentLogMessageSubtype')).map(function(l){return c('P2PPaymentLogMessageSubtype')[l];})),transferID:j.string.isRequired,threadFBID:j.string,threadID:j.string},getDefaultProps:function(){return {amount:'',sender:null,receiver:null,subtype:null};},getInitialState:function(){return {groupPaymentRequestReceiptDetailsShown:false,groupSendReceiptDetailsShown:false};},handleGroupDetailsLinkClicked:function(){this.setState({groupSendReceiptDetailsShown:true});},handleGroupPaymentRequestDetailsLinkClicked:function(){this.setState({groupPaymentRequestReceiptDetailsShown:true});},handleThirdPartyReceiptDialogClosed:function(){this.setState({groupPaymentRequestReceiptDetailsShown:false,groupSendReceiptDetailsShown:false});},isViewerSender:function(){return (c('MercuryIDs').getUserIDFromParticipantID(this.props.sender.id)===c('CurrentUser').getID());},isViewerReceiver:function(){return (c('MercuryIDs').getUserIDFromParticipantID(this.props.receiver.id)===c('CurrentUser').getID());},renderPaymentRequestDetailsLink:function(){var l=c('XP2PPaymentRequestReceiptController').getURIBuilder().setString('id',this.props.transferID).getURI();return (c('React').createElement(c('Link.react'),{className:"_kiq",href:l,target:'_blank'},i._("See details")));},renderTransferDetailsLink:function(){var l=c('XP2PTransactionDetailController').getURIBuilder().setString('id',this.props.transferID).getURI();return (c('React').createElement(c('Link.react'),{className:"_kiq",href:l,target:'_blank'},i._("See details")));},renderGroupDetailsLink:function(){return (c('React').createElement(c('Link.react'),{className:"_kiq",href:'#',onClick:this.handleGroupDetailsLinkClicked},i._("See details")));},renderGroupPaymentRequestDetailsLink:function(){return (c('React').createElement(c('Link.react'),{className:"_kiq",href:'#',onClick:this.handleGroupPaymentRequestDetailsLinkClicked},i._("See details")));},renderLayers:function(){var l={},m={full_name:this.props.receiver.name,id:this.props.receiver.id,picture:this.props.receiver.image_src,profile_uri:this.props.receiver.href},n={full_name:this.props.sender.name,id:this.props.sender.id,picture:this.props.sender.image_src,profile_uri:this.props.sender.href};if(this.state.groupSendReceiptDetailsShown){l.groupSendReceiptDetailsDialog=c('React').createElement(c('P2PGroupSendReceiptDialog.react'),{amount:this.props.amount,onClose:this.handleThirdPartyReceiptDialogClosed,receiver:m,sender:n});}else if(this.state.groupPaymentRequestReceiptDetailsShown)l.groupPaymentRequestReceiptDetailsDialog=c('React').createElement(c('P2PGroupPaymentRequestReceiptDialog.react'),{amount:this.props.amount,onClose:this.handleThirdPartyReceiptDialogClosed,requestee:m,requester:n});return l;},render:function(){var l=null,m=this.props.amount,n=this.props.subtype,o=this.isViewerSender(),p=this.isViewerReceiver(),q;if(!o&&!p){q=this.renderGroupDetailsLink();}else q=this.renderTransferDetailsLink();switch(n){case c('P2PPaymentLogMessageSubtype').SENT_IN_GROUP:l=i._("{sendername} sent {amount} to {receivername}. {details}",[i.param('sendername',this.props.sender.name),i.param('amount',m),i.param('receivername',this.props.receiver.name),i.param('details',q)]);break;case c('P2PPaymentLogMessageSubtype').CANCELED_EXPIRED:case c('P2PPaymentLogMessageSubtype').CANCELED_SAME_CARD:case c('P2PPaymentLogMessageSubtype').CANCELED_SENDER_RISK:case c('P2PPaymentLogMessageSubtype').CANCELED_RECIPIENT_RISK:case c('P2PPaymentLogMessageSubtype').CANCELED_CUSTOMER_SERVICE:if(o){l=i._("Your {amount} payment was canceled. {details}",[i.param('amount',m),i.param('details',this.renderTransferDetailsLink())]);}else if(p){l=i._("{name}'s {amount} payment was canceled. {details}",[i.param('name',this.props.sender.name),i.param('amount',m),i.param('details',this.renderTransferDetailsLink())]);}else l=i._("{sender_name}'s {amount} payment to {receiver_name} was canceled. {details}",[i.param('sender_name',this.props.sender.name),i.param('amount',m),i.param('receiver_name',this.props.receiver.name),i.param('details',q)]);l=c('React').createElement('span',{className:"_5rdx"},l);break;case c('P2PPaymentLogMessageSubtype').CANCELED_DECLINED:if(o){l=i._("{name} didn't accept your {amount} payment. {details}",[i.param('name',this.props.receiver.name),i.param('amount',m),i.param('details',this.renderTransferDetailsLink())]);}else if(p){l=i._("You didn't accept {name}'s {amount} payment. {details}",[i.param('name',this.props.sender.name),i.param('amount',m),i.param('details',this.renderTransferDetailsLink())]);}else l=i._("{receiver_name} didn't accept {sender_name}'s {amount} payment. {details}",[i.param('receiver_name',this.props.receiver.name),i.param('sender_name',this.props.sender.name),i.param('amount',m),i.param('details',q)]);l=c('React').createElement('span',{className:"_5rdx"},l);break;case c('P2PPaymentLogMessageSubtype').REQUEST_CANCELED_BY_REQUESTER:if(o){l=i._("You canceled your request for {payment request amount}. {details}",[i.param('payment request amount',m),i.param('details',this.renderPaymentRequestDetailsLink())]);}else if(p){l=i._("{sender's name} canceled their request for {payment request amount}. {details}",[i.param('sender\'s name',this.props.sender.name),i.param('payment request amount',m),i.param('details',this.renderPaymentRequestDetailsLink())]);}else l=i._("{sender's name} canceled their request for {payment request amount} from {receiver's name}. {details}",[i.param('sender\'s name',this.props.sender.name),i.param('payment request amount',m),i.param('receiver\'s name',this.props.receiver.name),i.param('details',this.renderGroupPaymentRequestDetailsLink())]);l=c('React').createElement('span',{className:"_5rdx"},l);break;case c('P2PPaymentLogMessageSubtype').REQUEST_DECLINED_BY_REQUESTEE:if(o){l=i._("{receiver's name} declined your request for {payment request amount}. {details}",[i.param('receiver\'s name',this.props.receiver.name),i.param('payment request amount',m),i.param('details',this.renderPaymentRequestDetailsLink())]);}else if(p){l=i._("You declined {sender's name}'s request for {payment request amount}. {details}",[i.param('sender\'s name',this.props.sender.name),i.param('payment request amount',m),i.param('details',this.renderPaymentRequestDetailsLink())]);}else l=i._("{receiver's name} declined {sender's name}'s request for {payment request amount}. {details}",[i.param('receiver\'s name',this.props.receiver.name),i.param('sender\'s name',this.props.sender.name),i.param('payment request amount',m),i.param('details',this.renderGroupPaymentRequestDetailsLink())]);l=c('React').createElement('span',{className:"_5rdx"},l);break;case c('P2PPaymentLogMessageSubtype').REQUEST_EXPIRED:if(o){l=i._("Your request for {payment request amount} expired so it was canceled. {details}",[i.param('payment request amount',m),i.param('details',this.renderPaymentRequestDetailsLink())]);}else if(p){l=i._("{sender's name}'s request for {payment request amount} expired so it was canceled. {details}",[i.param('sender\'s name',this.props.sender.name),i.param('payment request amount',m),i.param('details',this.renderPaymentRequestDetailsLink())]);}else l=i._("{sender's name}'s request to {receiver's name} for {payment request amount} expired so it was canceled. {details}",[i.param('sender\'s name',this.props.sender.name),i.param('receiver\'s name',this.props.receiver.name),i.param('payment request amount',m),i.param('details',this.renderGroupPaymentRequestDetailsLink())]);l=c('React').createElement('span',{className:"_5rdx"},l);break;}return (c('React').createElement('div',{className:c('CurrentEnvironment').messengerdotcom?"_5rdy":''},l));}});f.exports=k;},null);
__d('MessengerLogMessageBody.react',['fbt','immutable','ImmutableObject','MercuryIDs','MercuryParticipants','MercuryLogMessageType','P2PMercuryLogMessage.react','ReactComponentWithPureRenderMixin','React','StoreAndPropBasedStateMixin'],function a(b,c,d,e,f,g,h){if(c.__markCompiled)c.__markCompiled();var i=c('React').PropTypes,j=c('React').createClass({displayName:'MessengerLogMessageBody',_viewer:'',mixins:[c('ReactComponentWithPureRenderMixin'),c('StoreAndPropBasedStateMixin')(c('MercuryParticipants'))],propTypes:{message:i.instanceOf(c('ImmutableObject')).isRequired,viewer:i.string.isRequired},statics:{calculateState:function(k){var l=[],m=k.message,n=m.log_message_data,o=m.log_message_type;switch(o){case c('MercuryLogMessageType').SUBSCRIBE:l=n.added_participants;break;case c('MercuryLogMessageType').UNSUBSCRIBE:l=n.removed_participants;break;case c('MercuryLogMessageType').ORION:l.push(n.senderId,n.receiverId);break;}if(!l||!l.length)return {};var p=c('immutable').Map().withMutations(function(q){l.forEach(function(r){q.set(r,c('MercuryParticipants').getOrFetch(r)||{});});});return {extraParticipants:p};}},render:function(){var k=this.props.message.log_message_type;this._viewer=c('MercuryIDs').getParticipantIDFromUserID(this.props.viewer);if(this._viewer!==this.props.message.author&&k!==c('MercuryLogMessageType').ORION)return null;switch(k){case c('MercuryLogMessageType').SUBSCRIBE:return (c('React').createElement('span',null,this._renderSubscribeMessage(this.props.message)));case c('MercuryLogMessageType').UNSUBSCRIBE:return (c('React').createElement('span',null,this._renderUnsubscribeMessage(this.props.message)));case c('MercuryLogMessageType').THREAD_NAME:var l=this.props.message.log_message_data;if(!l.name)return (c('React').createElement('span',null,h._("You removed the group name.")));return (c('React').createElement('span',null,h._("You named the group {the new name of the group}.",[h.param('the new name of the group',l.name)])));case c('MercuryLogMessageType').THREAD_IMAGE:return (c('React').createElement('span',null,h._("You changed the group photo.")));case c('MercuryLogMessageType').ORION:return this._renderP2PLogMessage(this.props.message);default:return null;}},_renderP2PLogMessage:function(k){var l=k.log_message_data,m=l.senderId,n=l.receiverId,o=this.state.extraParticipants,p=o.get(m),q=o.get(n);return (c('React').createElement(c('P2PMercuryLogMessage.react'),{amount:l.formattedAmount,receiver:q,sender:p,subtype:l.subtype,threadFBID:k.thread_fbid,threadID:k.thread_id,transferID:l.transfer_id}));},_renderSubscribeMessage:function(k){var l=this._moveCurrentUserToFront(k.log_message_data.added_participants),m=this.state.extraParticipants;switch(l.length){case 1:return h._("You added {subscriber1}.",[h.param('subscriber1',m.get(l[0]).name)]);case 2:return h._("You added {subscriber1} and {subscriber2}.",[h.param('subscriber1',m.get(l[0]).name),h.param('subscriber2',m.get(l[1]).name)]);case 3:return h._("You added {subscriber1}, {subscriber2} and {subscriber3}.",[h.param('subscriber1',m.get(l[0]).name),h.param('subscriber2',m.get(l[1]).name),h.param('subscriber3',m.get(l[2]).name)]);default:var n=l.map(function(o){return m.get(o);});return h._("You added {subscriber1}, {subscriber2} and {num} other people.",[h.param('subscriber1',n[0].name),h.param('subscriber2',n[1].name),h.param('num',n.slice(2).length)]);}},_renderUnsubscribeMessage:function(k){var l=this.state.extraParticipants,m=k.log_message_data.removed_participants[0],n=l.get(m);if(!m||m===k.author){return h._("You left the conversation.");}else return h._("You removed {name} from the conversation.",[h.param('name',n.name)]);},_moveCurrentUserToFront:function(k){var l=this._viewer,m=k.indexOf(l);if(m>0){var n=k.filter(function(o){return o!==l;});return [l].concat(n);}return k;}});f.exports=j;},null);
__d('MessengerLogMessage.react',['cx','ix','Image.react','ImmutableObject','MercuryLogMessageType','MercuryMessageInfo','MercuryXMATRenderer','MessengerLogMessageBody.react','MNCommerceLogMessageUtils','React','ReactComponentWithPureRenderMixin','joinClasses'],function a(b,c,d,e,f,g,h,i){'use strict';if(c.__markCompiled)c.__markCompiled();var j=c('React').PropTypes,k=i('/images/mercury/clients/messenger/message/messageStateFailed.png'),l=c('React').createClass({displayName:'MessengerLogMessage',mixins:[c('ReactComponentWithPureRenderMixin')],propTypes:{message:j.instanceOf(c('ImmutableObject')).isRequired,viewer:j.string.isRequired},render:function(){return (c('React').createElement('div',{className:this._computeClass()},this._renderErrorState(),c('React').createElement('i',{className:"_uwa"}),c('React').createElement('span',{className:"_3oh-"},this._renderLogMessageBody())));},_renderLogMessageBody:function(){var m;if(this.props.message.log_message_type!==c('MercuryLogMessageType').ORION)m=c('MercuryXMATRenderer').renderText(this.props.message);return (this._renderMNCommerceManage()||m||c('React').createElement(c('MessengerLogMessageBody.react'),{message:this.props.message,viewer:this.props.viewer}));},_renderMNCommerceManage:function(){var m=this.props.message;if(c('MNCommerceLogMessageUtils').isCommercePageAdminMessage(m))return c('MNCommerceLogMessageUtils').getCommercePageManage(m,true);},_renderErrorState:function(){if(!c('MercuryMessageInfo').hasError(this.props.message))return null;return (c('React').createElement(c('Image.react'),{className:"_41-9",src:k}));},_computeClass:function(){var m,n=this.props.message,o=n.log_message_type===c('MercuryLogMessageType').UNSUBSCRIBE&&n.log_message_data.removed_participants.indexOf(n.author)!==-1,p=this.props.viewer;switch(n.log_message_type){case c('MercuryLogMessageType').SUBSCRIBE:m="_uwb";break;case c('MercuryLogMessageType').UNSUBSCRIBE:m=o?"_uwc":"_uwe";break;case c('MercuryLogMessageType').PHONE_CALL:m=n.log_message_data.caller.indexOf(p)!==-1?"_uwf":"_uwg";break;case c('MercuryLogMessageType').VIDEO_CALL:m=n.log_message_data.caller.indexOf(p)!==-1?"_uwh":"_uwi";break;case c('MercuryLogMessageType').THREAD_NAME:m="_uwj";break;case c('MercuryLogMessageType').THREAD_IMAGE:m="_uwk";break;case c('MercuryLogMessageType').SERVER_ERROR:m="_uwl";break;case c('MercuryLogMessageType').LIVE_LISTEN:m="_uwm";break;case c('MercuryLogMessageType').WALLPAPER:m="_uwn";break;case c('MercuryLogMessageType').ORION:m="_uwo";break;case c('MercuryLogMessageType').SWITCH_TO_WORK:m="_uwp";break;case c('MercuryLogMessageType').PAGE_REPLY:m="_uwq";break;}return c('joinClasses')("_497p"+((n.log_message_type===c('MercuryLogMessageType').PHONE_CALL||n.log_message_type===c('MercuryLogMessageType').VIDEO_CALL)&&!n.log_message_data.answered?' '+"_3no3":''),m);}});f.exports=l;},null);
__d('MessengerContextualActions.react',['cx','ContextualLayerUpdateOnScroll','LayerHideOnBlur','Link.react','React','ReactAbstractContextualDialog','ReactLayer'],function a(b,c,d,e,f,g,h){'use strict';if(c.__markCompiled)c.__markCompiled();var i=c('React').PropTypes,j=c('ReactLayer').createClass(c('ReactAbstractContextualDialog').createSpec({displayName:'MessengerContextualActionsDialog',theme:{wrapperClassName:"_hw2",arrowDimensions:{offset:12,length:12}}})),k=c('React').createClass({displayName:'MessengerContextualActions',propTypes:{onToggle:i.func},render:function(){var m=this.props,n=m.children,o=babelHelpers.objectWithoutProperties(m,['children']);return (c('React').createElement(j,babelHelpers['extends']({},o,{alignment:'center',behaviors:{ContextualLayerUpdateOnScroll:c('ContextualLayerUpdateOnScroll'),LayerHideOnBlur:c('LayerHideOnBlur')},onToggle:this.props.onToggle}),c('React').createElement('ul',{className:"_hw3"},n)));}}),l=c('React').createClass({displayName:'MessengerContextualActionsItem',propTypes:{onClick:i.func},render:function(){return (c('React').createElement('li',{className:"_hw4"},c('React').createElement(c('Link.react'),{className:"_hw5",onClick:this.props.onClick},this.props.children)));}});k.Item=l;f.exports=k;},null);
__d('MessengerMessageActionsWrapper.react',['csx','cx','fbt','invariant','DOMQuery','ImmutableObject','ReactLayeredComponentMixin','MercuryConfig','MercuryMessageActions','MercuryMessageInfo','MessengerActions','MessengerContextualActions.react','MessengerDeleteMessageDialog.react','Parent','React','ReactDOM','setImmediate'],function a(b,c,d,e,f,g,h,i,j,k){'use strict';if(c.__markCompiled)c.__markCompiled();var l=c('MessengerContextualActions.react').Item,m=c('React').PropTypes,n="_ui9",o="._ui9",p=c('React').createClass({displayName:'MessengerMessageActionsWrapper',mixins:[c('ReactLayeredComponentMixin')],propTypes:{isActive:m.bool,isDeletable:m.bool,isFromViewer:m.bool,message:m.instanceOf(c('ImmutableObject')).isRequired,onDeselect:m.func.isRequired,onSelect:m.func.isRequired},getDefaultProps:function(){return {isDeletable:true};},render:function(){return (c('React').createElement('div',babelHelpers['extends']({onContextMenu:this._handleContextMenu},this.props),this.props.children));},renderLayers:function(){if(!this.props.isDeletable||!this.props.isActive)return {};var q=c('ReactDOM').findDOMNode(this),r=q&&c('DOMQuery').scry(q,o)[0];if(!r)return {};return {contextualDialog:c('React').createElement(c('MessengerContextualActions.react'),{context:r,onToggle:this._handleActionsToggle,shown:this.props.isActive},this._renderRetry(),c('React').createElement(l,{onClick:this._handleDelete},this._renderActionItemMsg()))};},_renderActionItemMsg:function(){if(!this.props.isFromViewer&&c('MercuryConfig').MessengerGlobalDeleteGK)return j._("Hide");return j._("Delete");},_renderRetry:function(){if(!c('MercuryMessageInfo').hasError(this.props.message))return null;return (c('React').createElement(l,{onClick:this._handleRetry},j._("Try Again")));},_handleActionsToggle:function(q){!q&&this._handleDeselect();},_handleDeselect:function(){this.props.onDeselect(this.props.message.message_id);},_handleDelete:function(){var q=this.props.message;c('MessengerActions').showDialog(c('MessengerDeleteMessageDialog.react'),{onDelete:function(){c('MercuryMessageActions').get()['delete'](q.thread_id,[q.message_id]);},onToggle:this._handleDialogToggle,onCancel:this._handleDeselect,isFromViewer:this.props.isFromViewer});},_handleDialogToggle:function(q){if(!q)c('MessengerActions').hideDialog();},_handleRetry:function(){this._handleDeselect();c('MercuryMessageActions').get().resend(this.props.message);},_handleContextMenu:function(q){if(!this._shouldAllowNativeContextMenu(q))q.preventDefault();c('setImmediate')(function(){this.props.onSelect(this.props.message.message_id);}.bind(this));},_shouldAllowNativeContextMenu:function(q){!(q.target instanceof HTMLElement)?k(0):void 0;return (q.target.nodeName.toLowerCase()==='a'||window.getSelection().toString()!==''||!c('Parent').byClass(q.target,n));}});f.exports=p;},null);
__d('MessengerMessageSeenHeads.react',['cssVar','cx','fbt','Image.react','immutable','ImmutableObject','MercuryMessageInfo','MercuryTimestamp','MessengerConfig','ReactComponentWithPureRenderMixin','React','getViewportDimensions','joinClasses'],function a(b,c,d,e,f,g,h,i,j){'use strict';if(c.__markCompiled)c.__markCompiled();var k=c('React').PropTypes,l=c('MessengerConfig').MaxSeenHeadCount||8,m=c('React').createClass({displayName:'MessengerMessageSeenHeads',mixins:[c('ReactComponentWithPureRenderMixin')],propTypes:{isFromViewer:k.bool,message:k.instanceOf(c('ImmutableObject')).isRequired,nextTimestamp:k.number.isRequired,participants:k.instanceOf(c('immutable').Map).isRequired,readReceipts:k.instanceOf(c('immutable').OrderedMap).isRequired},render:function(){var o=this.props,p=o.message,q=o.nextTimestamp,r=o.participants,s=o.readReceipts;if(c('MercuryMessageInfo').isSending(p)||s.isEmpty()||c('MercuryMessageInfo').hasError(p))return null;var t=c('immutable').Seq(s).filter(function(ba,ca){return (ba>=p.timestamp&&ba<q);});if(t.isEmpty())return null;var u=this.props.isFromViewer?l:n(),v=t.count()>u+1,w=v?t.slice(0,u):t,x=w.map(function(ba,ca){var da=r.get(ca);if(!da)return null;var ea=ba?j._("Seen by {full name} at {seen time}",[j.param('full name',da.name),j.param('seen time',c('MercuryTimestamp').getPreciseTimestamp(ba))]):j._("Seen by {full name}",[j.param('full name',da.name)]);return (c('React').createElement(c('Image.react'),{alt:ea,className:"_jf2",key:ca,src:da.image_src,title:ea}));}).toArray(),y=x.length;if(!y)return null;var z=v?t.slice(u).count():0;if(z>0){var aa=t.slice(u).map(function(ba,ca){var da=r.get(ca);return da?da.name:null;}).filter(function(ba){return !!ba;}).join('\n')+' ';x.unshift(c('React').createElement('span',{className:"_jf3",key:'overflow',title:aa},'+'+z));}return (c('React').createElement('span',{className:c('joinClasses')(this.props.className,"_jf4"+(y+z===1?' '+"_jf5":''))},x));}});function n(){var o=c('getViewportDimensions')().width;if(o<parseInt("920px".replace('px',''),10))return Math.min(l,8);if(o<parseInt("1211px".replace('px',''),10))return Math.min(l,3);return l;}f.exports=m;},null);
__d('messengerRTLClasses',['cx','isRTL'],function a(b,c,d,e,f,g,h){'use strict';if(c.__markCompiled)c.__markCompiled();function i(j,k){var l=c('isRTL')(j||'');return k?l?"_4pv0":'':(!l?"direction_ltr":'')+(l?' '+"direction_rtl":'')+(!l?' '+"text_align_ltr":'')+(l?' '+"text_align_rtl":'')+(l?' '+"_4pv0":'');}f.exports=i;},null);
__d('MessengerMessage.react',['cssVar','cx','fbt','EmojiLikeUtils','MercuryDisplayTimeFilterMessageRenderer','immutable','ImmutableObject','MercuryAttachment','MercuryMessageActions','MercuryMessageDeliveryState','MercuryMessageInfo','MercuryTimestamp','MessagingGiftWrap.react','MessengerAttachmentAttribution.react','MessengerAttachmentRenderer','MessengerBubble.react','MessengerBubbleBlock.react','MessengerCodeBubble.react','MessengerCodePasteUtils','MessengerConfig','MessengerMessageActionsWrapper.react','MessengerMessageSeenHeads.react','React','emptyFunction','getViewportDimensions','joinClasses','messengerRTLClasses'],function a(b,c,d,e,f,g,h,i,j){'use strict';if(c.__markCompiled)c.__markCompiled();var k=c('React').PropTypes;function l(o){switch(o){case c('MercuryMessageDeliveryState').SENDING:return j._("Sending");case c('MercuryMessageDeliveryState').SENT:return j._("Sent");case c('MercuryMessageDeliveryState').DELIVERED:return j._("Delivered");case c('MercuryMessageDeliveryState').ERROR:return j._("Error");}return null;}var m=c('React').createClass({displayName:'MessengerMessage',propTypes:{customColor:k.string,deliveryTimestamp:k.number.isRequired,isActive:k.bool,isFromViewer:k.bool,isGiftWrapped:k.bool,isPageMessage:k.bool,message:k.instanceOf(c('ImmutableObject')).isRequired,nextTimestamp:k.number.isRequired,onAttachmentLoad:k.func.isRequired,onDeselect:k.func.isRequired,onSelect:k.func.isRequired,participants:k.instanceOf(c('immutable').Map).isRequired,readReceipts:k.instanceOf(c('immutable').OrderedMap).isRequired,showDeliveryState:k.bool},getDefaultProps:function(){return {onAttachmentLoad:c('emptyFunction')};},shouldComponentUpdate:function(o){return (o.isActive!==this.props.isActive||o.isFromViewer!==this.props.isFromViewer||o.message!==this.props.message||o.nextTimestamp!==this.props.nextTimestamp||o.showDeliveryState!==this.props.showDeliveryState||o.deliveryTimestamp!==this.props.deliveryTimestamp||!c('immutable').is(o.readReceipts,this.props.readReceipts)||!c('immutable').is(o.participants,this.props.participants)||o.customColor!==this.props.customColor);},render:function(){var o=this.props,p=o.isActive,q=o.isFromViewer,r=o.message,s=j._("{time}",[j.param('time',c('MercuryTimestamp').getPreciseTimestamp(r.timestamp))]),t=c('MessengerConfig').SentTimestampEnabled&&q?{'data-hover':'tooltip','data-tooltip-alignh':p?'right':'center','data-tooltip-content':s,'data-tooltip-position':n()}:null;return (c('React').createElement(c('MessengerMessageActionsWrapper.react'),{className:c('joinClasses')("_o46"+(' '+"_3erg")+(p?' '+"_-5k":'')+(q?' '+"_3i_m":'')+(q?' '+"_nd_":'')+(!q?' '+"_29_7":''),c('messengerRTLClasses')(r.body)),isActive:p,isDeletable:!this._isP2PAttachment()&&!this.props.isPageMessage,isFromViewer:q,message:r,onDeselect:this.props.onDeselect,onSelect:this.props.onSelect},c('React').createElement('div',{className:'clearfix'},this._renderBubble(t),this._renderAttachmentsOutsideBubble(t)),this._renderErrorState(),this._renderDeliveryState(),c('React').createElement(c('MessengerMessageSeenHeads.react'),{className:"_4jzq",isFromViewer:q,message:r,nextTimestamp:this.props.nextTimestamp,participants:this.props.participants,readReceipts:this.props.readReceipts})));},_attachmentsCanHaveTooltipWrap:function(o){return o.every(function(p){var q=p&&(p.type.displayName||p.type.name);return q!=='MercuryShareAttachment'&&q!=='MessengerPhotosGroup';});},_renderAttachmentsOutsideBubble:function(o){if(this.props.message.is_filtered_content)return null;var p=c('MessengerAttachmentRenderer').getAttachmentsOutsideBubble(this.props.message,this.props.onAttachmentLoad,this.props.isFromViewer?this.props.customColor:'',this._handleUnwrap);if(!p||!p.length)return null;if(o)p=this._attachmentsCanHaveTooltipWrap(p)?c('React').createElement('div',babelHelpers['extends']({},o,{className:"_3zvs"}),p):p.map(function(s){return (s&&c('React').cloneElement(s,o));});var q=c('React').createElement('div',{key:'renderedAttachments',className:"_3058 _15gf"},p);if(this.props.message.attachments.length===1&&c('MercuryAttachment').hasAttribution(this.props.message.attachments[0])){var r=[q,c('React').createElement(c('MessengerAttachmentAttribution.react'),{attachment:new (c('ImmutableObject'))(this.props.message.attachments[0]),key:'attribution'})];if(this.props.isGiftWrapped)r=[c('React').createElement('div',{key:'blockContentWrapper'},r),c('React').createElement(c('MessagingGiftWrap.react'),{key:'giftwrap',onUnwrap:this._handleUnwrap})];return (c('React').createElement(c('MessengerBubbleBlock.react'),null,r));}return q;},_isP2PAttachment:function(){return (c('MessengerAttachmentRenderer').isP2PAttachment(this.props.message));},_renderBubble:function(o){var p=this.props.message,q=c('immutable').List(c('MessengerAttachmentRenderer').getAttachmentsInsideBubble(p,this.props.onAttachmentLoad));if(c('MessengerCodePasteUtils').containsCodeBlock(p.body))return (c('React').createElement(c('MessengerCodeBubble.react'),{attachments:q,body:p.body,className:"_3058 _ui9",ranges:p.ranges||[],threadID:p.thread_id||''}));if(p.is_filtered_content)return (c('React').createElement('div',{className:"_3058 _wiu _52mr uiBoxYellow clearfix"},c('MercuryDisplayTimeFilterMessageRenderer').renderFilteredContent(p)));var r=p.body&&!c('EmojiLikeUtils').isEmojiLike(p);if(r||!q.isEmpty())return (c('React').createElement(c('MessengerBubble.react'),babelHelpers['extends']({attachments:q,body:p.body,className:"_3058 _ui9",customColor:this.props.isFromViewer?this.props.customColor:'',customLike:p.customLike,isGiftWrapped:this.props.isGiftWrapped,isP2PAttachment:this._isP2PAttachment(),onUnwrap:this._handleUnwrap,ranges:p.ranges,threadID:p.thread_id},o||{})));return null;},_renderDeliveryState:function(){if(!this.props.isFromViewer||!this.props.showDeliveryState||this.props.message.is_like_preview)return null;var o=c('MercuryMessageInfo').getDeliveryState(this.props.message,this.props.deliveryTimestamp);if(o===c('MercuryMessageDeliveryState').UNKNOWN)return null;var p={};if(this.props.customColor&&(o===c('MercuryMessageDeliveryState').SENT||o===c('MercuryMessageDeliveryState').SENDING||o===c('MercuryMessageDeliveryState').DELIVERED))p.color=this.props.customColor;return (c('React').createElement('span',{className:"_2her"+(o===c('MercuryMessageDeliveryState').SENDING?' '+"_4jzp":'')+(o===c('MercuryMessageDeliveryState').SENT?' '+"_3zzf":'')+(o===c('MercuryMessageDeliveryState').DELIVERED?' '+"_9ah":'')+(o===c('MercuryMessageDeliveryState').ERROR?' '+"_5ei9":''),onClick:o===c('MercuryMessageDeliveryState').ERROR?this._handleSelect:null,style:p,title:l(o)},c('React').createElement('i',{className:"_57e_"})));},_renderErrorState:function(){var o=this.props.message;if(!c('MercuryMessageInfo').hasError(o))return null;return (c('React').createElement('span',{className:"_3058 _2ygi",onClick:this._handleSelect},j._("Message couldn't be sent.")));},_handleUnwrap:function(){var o="2500ms";setTimeout(function(){return this._persistUnwrapping();}.bind(this),o.substring(0,o.length-2));},_persistUnwrapping:function(){c('MercuryMessageActions').get().unwrap(this.props.message);},_handleSelect:function(o){o.stopPropagation();this.props.onSelect(this.props.message.message_id);}});function n(){if(c('getViewportDimensions')().width<=parseInt("640px".replace('px',''),10))return 'above';return 'right';}f.exports=m;},null);
__d('MessengerPageAdminNoteList.react',['cx','fbt','LeftRight.react','MessengerBubble.react','PagesMessengerCreatorInfo.react','ReactComponentWithPureRenderMixin','React','enumerate','classWithMixins','immutable','mixin'],function a(b,c,d,e,f,g,h,i){'use strict';var j,k;if(c.__markCompiled)c.__markCompiled();var l=c('React').PropTypes;j=babelHelpers.inherits(m,c('classWithMixins')(c('React').Component,c('mixin')(c('ReactComponentWithPureRenderMixin'))));k=j&&j.prototype;m.prototype.render=function(){var n=[],o=this.calculateGroups(this.props.notes);o.forEach(function(p,q){n.push(c('React').createElement('li',{className:"_4kd2",key:'group:'+q},this.$MessengerPageAdminNoteList1(p)));}.bind(this));return (c('React').createElement('ul',{className:"_4kd3"},n));};m.prototype.$MessengerPageAdminNoteList1=function(n){var o=[];n.forEach(function(p,q){o.push(c('React').createElement('div',{className:"_4kd4",key:'note:'+q},this.$MessengerPageAdminNoteList2(p,n)));}.bind(this));return o;};m.prototype.$MessengerPageAdminNoteList2=function(n,o){var p=c('immutable').List([c('React').createElement(c('LeftRight.react'),{className:"_561k"},c('React').createElement('div',{className:"_561l"},i._("Private Note")),c('React').createElement(c('PagesMessengerCreatorInfo.react'),{key:'creator_info',creator_info:o[0].creator_info,isNote:true}))]);return (c('React').createElement('div',{className:"_o46 _3i_m _nd_"},c('React').createElement('div',{className:'clearfix'},c('React').createElement(c('MessengerBubble.react'),{body:n.body.text,attachments:p,className:"_3058 _4kd5"}))));};m.prototype.calculateGroups=function(n){var o=[],p=null,q=null,r=c('enumerate')(n),s;while(!(s=r.next()).done){var t=q&&q.value.creator_info.creatorID===s.value.creator_info.creatorID;if(!t){p=[];o.push(p);}if(p)p.push(s.value);q=s;}return o;};function m(){j.apply(this,arguments);}m.propTypes={notes:l.arrayOf(l.shape({id:l.string,body:l.object.isRequired,creator_info:l.shape({creatorID:l.string.isRequired,creatorName:l.string.isRequired,creatorType:l.string.isRequired,labelType:l.string.isRequired,pageID:l.string.isRequired,profileURI:l.string}),timestamp:l.number.isRequired})).isRequired};f.exports=m;},null);
__d('MessengerURIUtils',['MercuryIDs','MessengerStateStore','MessengerURISerializer','MessengerView'],function a(b,c,d,e,f,g){'use strict';if(c.__markCompiled)c.__markCompiled();var h={getURIForThreadID:function(i){return c('MessengerURISerializer').serialize(babelHelpers['extends']({},c('MessengerStateStore').getState(),{activeThreadID:i,detailView:c('MessengerView').DETAIL.THREAD}));},getURIForUserID:function(i){return h.getURIForThreadID(c('MercuryIDs').getThreadIDFromUserID(i));}};f.exports=h;},null);
__d('MessengerMessageGroup.react',['cx','fbt','immutable','ImmutableObject','Image.react','Link.react','MercuryConfig','MercuryIDs','MercuryParticipants','MercuryParticipantSilhouettes','MercuryTimestamp','MessagingGiftWrapChecker','MessengerActions','MessengerConfig','MessengerDateBreak.react','MessengerMessage.react','MessengerPageAdminNoteList.react','MessengerProfileImageWrapper.react','MessengerStickerUtils','MessengerURIUtils','PagesMessengerCreatorInfo.react','React','ReactDOM','StoreAndPropBasedStateMixin'],function a(b,c,d,e,f,g,h,i){'use strict';if(c.__markCompiled)c.__markCompiled();var j=c('immutable').List,k=c('immutable').OrderedMap,l=c('React').PropTypes,m=32,n=new (c('ImmutableObject'))({image_src:c('MercuryParticipantSilhouettes').neutralSilhouette,is_messenger_user:true,name:''}),o=c('React').createClass({displayName:'MessengerMessageGroup',mixins:[c('StoreAndPropBasedStateMixin')(c('MercuryParticipants'))],propTypes:{activeMessageID:l.string,deliveryTimestamp:l.number.isRequired,hasDateBreak:l.bool,isCanonical:l.bool,isFromViewer:l.bool,isPageMessage:l.bool,lastReadTimestamp:l.number.isRequired,messages:l.instanceOf(c('immutable').List).isRequired,onAttachmentLoad:l.func,nextTimestamp:l.number.isRequired,onMessageDeselect:l.func.isRequired,onMessageSelect:l.func.isRequired,readReceipts:l.instanceOf(k).isRequired,thread:l.object},statics:{calculateState:function(r){return {participants:p(r)};}},shouldComponentUpdate:function(r,s){return (this.props.activeMessageID!==r.activeMessageID||this.props.isFromViewer!==r.isFromViewer||this.props.deliveryTimestamp!==r.deliveryTimestamp||this.props.lastReadTimestamp!==r.lastReadTimestamp||!c('immutable').is(this.props.messages,r.messages)||!c('immutable').is(this.props.readReceipts,r.readReceipts)||!c('immutable').is(this.state.participants,s.participants)||!!(r.thread&&this.props.thread&&this.props.thread!==r.thread));},render:function(){return (c('React').createElement('div',null,c('React').createElement('div',{className:"_1t_p"+(' '+"clearfix")+(c('MessengerStickerUtils').isStickerMessageGroup(this.props.messages)?' '+"_5tx1":'')+(this._hasSeenHeadsAtBottom()?' '+"_35fy":'')},this._renderProfileColumn(),this._renderName(),c('React').createElement('div',{className:"_1t_s"},this._renderMessages())),this.props.isPageMessage?this._renderNotes():null));},_renderProfileColumn:function(){if(this.props.isFromViewer)return null;var r=this.props.messages.last(),s=this.state.participants.get(r.author)||n,t=i._("{name} {time}",[i.param('name',s.name),i.param('time',c('MercuryTimestamp').getPreciseTimestamp(r.timestamp))]),u=c('React').createElement(c('MessengerProfileImageWrapper.react'),{className:"_1t_r",isMessengerUser:s.is_messenger_user,size:m,showBadge:true,tooltipContent:t},c('React').createElement(c('Image.react'),{alt:s.name,src:s.image_src,height:m,width:m}));if(!this.props.isCanonical&&s.fbid){var v=c('MessengerURIUtils').getURIForUserID(s.fbid);u=c('React').createElement(c('Link.react'),{className:"_5f0v",href:v.toString(),onClick:this._handleContactSelect.bind(this,s),tabIndex:-1},u);}return (c('React').createElement('div',{className:"_1t_q"},u));},_renderMessages:function(){var r=this.props.messages.size,s=[];this.props.messages.forEach(function(t,u,v){var w=t.message_id===this.props.activeMessageID;if(w&&!(u===0&&this.props.hasDateBreak)&&!c('MessengerConfig').SentTimestampEnabled)s.push(c('React').createElement(c('MessengerDateBreak.react'),{className:"_5r8z",date:new Date(t.timestamp),key:'db:'+t.message_id}));s.push(c('React').createElement(c('MessengerMessage.react'),{customColor:this.props.thread?this.props.thread.custom_color:'',deliveryTimestamp:this.props.deliveryTimestamp,isActive:w,isFromViewer:this.props.isFromViewer,isGiftWrapped:c('MessagingGiftWrapChecker').shouldRenderWithGiftWrap(t),isPageMessage:this.props.isPageMessage,key:t.message_id,message:t,onAttachmentLoad:this.props.onAttachmentLoad,participants:this.state.participants,nextTimestamp:this._getNextTimestamp(v,r,u),onDeselect:this.props.onMessageDeselect,onSelect:this.props.onMessageSelect,readReceipts:this.props.readReceipts,showDeliveryState:t.timestamp>this.props.lastReadTimestamp,ref:t.message_id}));if(q(this.props.isPageMessage,v,u,t))s.push(c('React').createElement(c('PagesMessengerCreatorInfo.react'),{key:'creator_info:'+u,creator_info:t.creator_info}));}.bind(this));return s;},_renderNotes:function(){var r=[];this.props.messages.forEach(function(s,t,u){if(this.props.isPageMessage&&s.page_admin_notes)r.push(c('React').createElement(c('MessengerPageAdminNoteList.react'),{key:'notes:'+s.message_id,notes:s.page_admin_notes}));}.bind(this));return r;},_renderName:function(){var r=this.state.participants.get(this.props.messages.first().author);if(!r)return null;var s=r.short_name;if(this.props.thread){var t=this.props.thread.custom_nickname?this.props.thread.custom_nickname:null,u=c('MercuryIDs').getUserIDFromParticipantID(r.id);if(t&&u&&t[u]){s=t[u];if(c('MercuryConfig').MessengerNewEmojiGK&&c('MercuryConfig').MessengerTextWithEmoticonsModule){var v=c('MercuryConfig').MessengerTextWithEmoticonsModule;s=c('React').createElement(v,{renderEmoticons:true,renderEmoji:true,text:s});}}}return (c('React').createElement('h5',{className:"_ih3"+(this.props.isCanonical||this.props.isFromViewer?' '+"_-ne":'')},c('React').createElement('span',{className:"_3oh-"},s)));},getMessageElement:function(r){return c('ReactDOM').findDOMNode(this.refs[r]);},_hasSeenHeadsAtBottom:function(){var r=this.props,s=r.messages,t=r.nextTimestamp,u=r.readReceipts,v=s.last().timestamp,w=0;u.forEach(function(x){if(x>=v&&x<t)if(++w===2)return false;});return w===2;},_getNextTimestamp:function(r,s,t){return t<s-1?r.get(t+1).timestamp:this.props.nextTimestamp;},_handleContactSelect:function(r){var s=c('MercuryIDs').getThreadIDFromParticipantID(r.id);s&&c('MessengerActions').selectThread(s);}});function p(r){var s=r.messages.first().author;return c('immutable').Map().withMutations(function(t){r.readReceipts.forEach(function(u,v){t.set(v,c('MercuryParticipants').getOrFetch(v));});t.set(s,c('MercuryParticipants').getOrFetch(s));});}function q(r,s,t,u){if(!r||!u.creator_info)return false;if(t===s.size-1)return true;var v=s.get(t+1).creator_info;if(!v)return true;return u.creator_info.creatorID!==v.creatorID;}f.exports=o;},null);
__d('MessengerTypingIndicator.react',['cx','Image.react','immutable','MercuryParticipants','MercuryTypingAnimation.react','MessengerProfileImageWrapper.react','MessengerBubble.react','ReactComponentWithPureRenderMixin','React','StoreAndPropBasedStateMixin'],function a(b,c,d,e,f,g,h){if(c.__markCompiled)c.__markCompiled();var i=c('React').PropTypes,j=32,k=c('React').createClass({displayName:'MessengerTypingIndicator',mixins:[c('ReactComponentWithPureRenderMixin'),c('StoreAndPropBasedStateMixin')(c('MercuryParticipants'))],propTypes:{userID:i.string,showName:i.bool},statics:{calculateState:function(l){return {author:c('MercuryParticipants').getOrFetch(l.userID)};}},render:function(){if(!this.state.author)return null;var l=this.state.author;return (c('React').createElement('div',{className:"_1t_p _1hbw"},c('React').createElement('div',{className:"_1t_q"},c('React').createElement(c('MessengerProfileImageWrapper.react'),{className:"_1t_r",isMessengerUser:l.is_messenger_user,size:j,showBadge:true},c('React').createElement(c('Image.react'),{alt:'',src:l.image_src,height:j,width:j}))),c('React').createElement('div',{className:"_1t_s"},c('React').createElement('div',{className:"_o46 _3erg _29_7"},c('React').createElement('div',{className:'clearfix'},c('React').createElement(c('MessengerBubble.react'),{attachments:c('immutable').List([c('React').createElement(c('MercuryTypingAnimation.react'),{key:'animation'})]),body:'',className:"_3058",ref:'bubble'}))))));},getBubble:function(){return this.refs.bubble;}});f.exports=k;},null);
__d('MessengerHotLikeOutlineSVG.react',['cssVar','cx','fbt','React','joinClasses','uniqueID'],function a(b,c,d,e,f,g,h,i,j){'use strict';if(c.__markCompiled)c.__markCompiled();var k=c('React').PropTypes,l='transparent',m=j._("Thumbs Up Sign"),n=c('React').createClass({displayName:'MessengerHotLikeOutlineSVG',propTypes:{color:k.string},getInitialState:function(){return {titleId:c('uniqueID')()};},render:function(){var o=this.props.color||"#0084ff";return (c('React').createElement('div',{className:c('joinClasses')(this.props.className,"_5318")},c('React').createElement('svg',{'aria-labelledby':this.state.titleId,version:'1.1',viewBox:'-1 -1 40.16 42.24'},c('React').createElement('title',{id:this.state.titleId},m),c('React').createElement('path',{d:'M935.36,1582.44a0,0,0,0,0,0,.06,3.59,3.59,0,0,1-.72,6.53,0,0,0,0,0,0,0,3.56,3.56,0,0,1,.71,2.13,3.6,3.6,0,0,1-3,3.54, 0,0,0,0,0,0,.05,3.56,3.56,0,0,1,.38,1.61,3.61,3.61,0,0,1-3.42,3.6H910v-19.6l5.27-7.9a4,4,0,0,0,.66-2.31l-0.1-4c-0.22-2.4-.09-2.06, 1.13-2.37,2-.51,7.16,1.59,5.13,12.17h11.06A3.59,3.59,0,0,1,935.36,1582.44ZM899,1581h7v22h-7v-22Z',transform:'translate(-898.5 -1563.26)',fill:l,fillRule:'evenodd',stroke:o,strokeLinecap:'round',strokeWidth:'5%'}))));}});f.exports=n;},null);
__d('MessengerHotLikeButton.react',['cx','fbt','EmojiLikeConstants','EmojiLikeUtils','Image.react','ImmutableObject','Keys','KeyStatus','Link.react','MercuryConfig','MercuryMessageObject','MercurySourceType','MessengerHotLikePreviewEvents','MessengerHotLikeOutlineSVG.react','MessengerHotLikeUtils','ReactComponentWithPureRenderMixin','React','StickerActions','StickerConstants','joinClasses'],function a(b,c,d,e,f,g,h,i){'use strict';if(c.__markCompiled)c.__markCompiled();var j=c('MercuryMessageObject').get(),k=c('React').PropTypes,l=c('React').createClass({displayName:'MessengerHotLikeButton',mixins:[c('ReactComponentWithPureRenderMixin')],propTypes:{onMouseDown:k.func,customLike:k.object,customColor:k.string,sendSticker:k.func.isRequired,sendCustomLike:k.func,threadID:k.string,disabled:k.bool,renderSize:k.number},_popTimeout:null,_pressedSince:null,_subscription:null,componentDidMount:function(){this._subscription=c('MessengerHotLikePreviewEvents').addListener(c('MessengerHotLikePreviewEvents').FINISH_ANIMATION,function(m,n,o){if(m===this.props.threadID)if(o&&this.props.customLike&&this.props.sendCustomLike){this.props.sendCustomLike(this.props.customLike,o);}else this.props.sendSticker(n);}.bind(this));},componentWillUnmount:function(){this._subscription&&this._subscription.remove();},render:function(){var m=null,n={};if(this.props.customLike!=null){if(c('MercuryConfig').MessengerNewEmojiGK&&c('MercuryConfig').MessengerNewEmojiUtils){var o=this.props.customLike.emoji,p=c('MercuryConfig').MessengerNewEmojiUtils.getNewEmojiData(o,c('EmojiLikeConstants').size.SMALL),q=this.props.renderSize?this.props.renderSize:16;n.background='none';m=c('React').createElement(c('Image.react'),{src:p.url,style:{padding:q==16?0:3,display:'block',height:q,width:q}});}else{o=this.props.customLike.medium;if(o){n.background='none';m=c('React').createElement(c('Image.react'),{src:o,style:{display:'block',height:16,width:16}});}}}else if(this.props.customColor)m=c('React').createElement(c('MessengerHotLikeOutlineSVG.react'),{className:"_5j_p",color:this.props.customColor});return (c('React').createElement(c('Link.react'),{'aria-label':i._("Send a Like"),className:c('joinClasses')(this.props.customColor?"_5j_u":'',this.props.className),disabled:this.props.disabled,href:'#',onClick:this._handleClickEvent,onDragStart:function(r){return r.preventDefault();},onMouseDown:this._handleMouseDown,onMouseLeave:this._cancelSend,onMouseUp:this._handleMouseUp,role:'button',style:n,title:i._("Send a Like")},m));},_handleMouseDown:function(m){if(this.props.disabled||this._pressedSince){m.preventDefault();m.stopPropagation();}if(this.props.disabled||m.button!==0)return;c('StickerActions').hideStickerTray();this.props.onMouseDown&&this.props.onMouseDown();this._pressedSince=Date.now();this._informPreviewStart();this._preparePop();},_handleMouseUp:function(){if(!(this.props.threadID&&this._pressedSince))return;this._pressedSince=0;this._cancelPop();this._informPreviewStop();},_informPreviewStart:function(){c('MessengerHotLikePreviewEvents').emit(c('MessengerHotLikePreviewEvents').START,this._getFakeMessage(),this.props.threadID);},_informPreviewStop:function(){c('MessengerHotLikePreviewEvents').emit(c('MessengerHotLikePreviewEvents').STOP,this.props.threadID);},_informPreviewPop:function(){c('MessengerHotLikePreviewEvents').emit(c('MessengerHotLikePreviewEvents').POP,this.props.threadID);},_getFakeMessage:function(){var m=j.constructStickerMessageObject(c('StickerConstants').HOT_LIKE_SMALL_STICKER_ID,c('MercurySourceType').MESSENGER_WEB,this.props.threadID);j.normalizeNewMessage(m);m.is_like_preview=true;m.like_preview_since=this._pressedSince;m.customLike=this.props.customLike;m.body='';return new (c('ImmutableObject'))(m);},_preparePop:function(){this._cancelPop();this._popTimeout=setTimeout(this._informPreviewPop,c('MessengerHotLikeUtils').SizeTimes.large);},_cancelSend:function(){if(this._pressedSince){this._pressedSince=0;this._cancelPop();this._informPreviewPop();}},_cancelPop:function(){clearTimeout(this._popTimeout);},_handleClickEvent:function(m){m.stopPropagation();if(this.props.disabled)return;if(c('KeyStatus').getKeyDownCode()===c('Keys').RETURN||!this.props.threadID){var n=this.props.sendCustomLike;if(this.props.customLike&&n){n(this.props.customLike,c('MessengerHotLikeUtils').getEmojiSizeForTime(1));}else this.props.sendSticker(c('MessengerHotLikeUtils').getStickerIDForTime(1));}}});f.exports=l;},null);
__d('MercurySeenIndicator.react',['cx','MercuryDelayedRoger','MercuryIDs','React','SubscriptionsHandler'],function a(b,c,d,e,f,g,h){'use strict';if(c.__markCompiled)c.__markCompiled();var i=c('React').PropTypes,j=c('React').createClass({displayName:'MercurySeenIndicator',propTypes:{thread:i.object.isRequired,viewer:i.string.isRequired},componentDidMount:function(){this._subscriptions=new (c('SubscriptionsHandler'))();this._subscriptions.addSubscriptions(c('MercuryDelayedRoger').subscribe('state-changed',function(k,l){l[this.props.thread.thread_id]&&this.forceUpdate();}.bind(this)));},componentWillUnmount:function(){this._subscriptions&&this._subscriptions.release();},render:function(){var k=this._separateParticipants(),l=k.viewer,m=k.others,n=this._viewerLastToReply(l),o=this._seenByAll(m);return (c('React').createElement('span',{className:"_3jy5"+(n?' '+"repliedLast":'')+(n&&o?' '+"seenByAll":'')}));},_separateParticipants:function(){var k=c('MercuryIDs').getParticipantIDFromUserID(this.props.viewer),l=this.props.thread.participants.filter(function(m){return m!==k;});return {viewer:k,others:l};},_viewerLastToReply:function(k){return k===this.props.thread.snippet_sender;},_seenByAll:function(k){var l=this.props.thread.thread_id;return c('MercuryDelayedRoger').getSeenBy(l).length===k.length;}});f.exports=j;},null);
__d('MercuryThreadSnippet.react',['cx','fbt','immutable','MercuryAttachmentSnippet.react','MercuryConfig','MercuryIDs','MercuryMeMessageProcessor','MNAdsLogMessageUtils','React','TextWithEmoticons.react'],function a(b,c,d,e,f,g,h,i){'use strict';if(c.__markCompiled)c.__markCompiled();var j=c('React').PropTypes,k=c('React').createClass({displayName:'MercuryThreadSnippet',propTypes:{participants:j.instanceOf(c('immutable').Map).isRequired,shouldAlwaysRenderSender:j.bool,shouldRenderYou:j.bool,thread:j.object.isRequired,viewer:j.string.isRequired},shouldComponentUpdate:function(n,o){return (this.props.shouldRenderYou!==n.shouldRenderYou||this.props.thread!==n.thread||this.props.viewer!==n.viewer||this.props.className!==n.className||!c('immutable').is(n.participants,this.props.participants));},render:function(){return (c('React').createElement('span',{className:this.props.className},this._renderAttachmentIndicator(),this._renderSnippet()));},_renderAttachmentIndicator:function(){if(!this.props.thread.snippet||!l(this.props.thread))return null;return (c('React').createElement('span',{className:"_j0r"}));},_renderSnippet:function(){var n=this.props.thread,o=c('MercuryIDs').getParticipantIDFromUserID(this.props.viewer),p=this.props.thread.snippet,q=this.props.shouldRenderYou;if(c('MercuryMeMessageProcessor').shouldTransformSnippet(p)&&n.snippet_sender){p=c('MercuryMeMessageProcessor').transformSnippet(p,n.snippet_sender);q=false;}var r=this._renderInnerSnippet(p),s=n.participants.length;if(n.is_subscribed)s--;c('MNAdsLogMessageUtils').logAdsThreadListImpression(n);if(n.snippet_has_attachment||!n.snippet_sender)return r;if(n.snippet_sender===o){if(!q)return r;return i._("You: {conversation_snippet}",[i.param('conversation_snippet',r)]);}if(s<=1&&!this.props.shouldAlwaysRenderSender)return r;var t=this.props.participants.get(n.snippet_sender);if(!t)return r;var u=t.short_name||t.name;if(n){var v=n.custom_nickname?n.custom_nickname:null,w=c('MercuryIDs').getUserIDFromParticipantID(t.id);if(v&&w&&v[w]){u=v[w];if(c('MercuryConfig').MessengerNewEmojiGK&&c('MercuryConfig').MessengerTextWithEmoticonsModule){var x=c('MercuryConfig').MessengerTextWithEmoticonsModule;u=c('React').createElement(x,{renderEmoticons:true,renderEmoji:true,text:u});}}}if(!u)return r;return i._("{name}: {conversation_snippet}",[i.param('name',u),i.param('conversation_snippet',r)]);},_renderInnerSnippet:function(n){if(n&&n.startsWith('?OTR'))return i._("[encrypted message]");if(n){var o=c('React').createElement(c('TextWithEmoticons.react'),{renderEmoticons:true,renderEmoji:true,text:n.replace(/\r\n|[\r\n]/g,' ')});if(c('MercuryConfig').MessengerNewEmojiGK&&c('MercuryConfig').MessengerTextWithEmoticonsModule){var p=c('MercuryConfig').MessengerTextWithEmoticonsModule;o=c('React').createElement(p,{renderEmoticons:true,renderEmoji:true,text:n.replace(/\r\n|[\r\n]/g,' ')});}return o;}var q=this.props.thread;if(l(q))return (c('React').createElement(c('MercuryAttachmentSnippet.react'),{thread:q,viewer:this.props.viewer}));return null;}});function l(n){return (n.snippet_has_attachment&&n.snippet_attachments&&n.snippet_attachments.length>0);}function m(n){return !n.snippet&&l(n);}f.exports=k;},null);
__d('MercuryThreadTimestamp.react',['ReactComponentWithPureRenderMixin','React','formatDate','joinClasses'],function a(b,c,d,e,f,g){'use strict';if(c.__markCompiled)c.__markCompiled();var h=c('React').PropTypes,i=c('React').createClass({displayName:'MercuryThreadTimestamp',mixins:[c('ReactComponentWithPureRenderMixin')],propTypes:{time:h.number,title:h.string,text:h.string},render:function(){var j=this.props.time;if(!j)return c('React').createElement('abbr',null);return (c('React').createElement('abbr',{className:c('joinClasses')(this.props.className,'timestamp'),title:this.props.title||new Date(j).toLocaleDateString(),'data-utime':j/1000},this.props.text||c('formatDate')(new Date(j),'g:ia')));}});f.exports=i;},null);
__d('EmoticonUtils',['EmoticonsList','Parent'],function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();var h='emoticon_',i=c('EmoticonsList').symbols,j={getEmoteFromTarget:function(k){var l=c('Parent').byClass(k,'emoticon');if(!l)return null;var m=null;l.className.split(' ').forEach(function(n){if(n.startsWith(h))m=n.substring(h.length);});return i[m]||null;},insertEmoticon:function(k,l,m){var n=l.substring(0,m.start),o=l.substring(m.end);if(m.start>0&&!n.endsWith(' '))k=' '+k;if(!o.startsWith(' '))k+=' ';var p=n+k+o;m.start+=k.length;m.end=m.start;return {result:p,start:m.start,end:m.end};}};f.exports=j;},null);
__d('MercuryDragDropPrompt.react',['cx','fbt','React'],function a(b,c,d,e,f,g,h,i){if(c.__markCompiled)c.__markCompiled();var j=c('React').createClass({displayName:'MercuryDragDropPrompt',render:function(){return (c('React').createElement('div',{className:"_4g6x"},c('React').createElement('div',{className:"_4g6y"},c('React').createElement('div',{className:"_4g6z _4g71"},i._("Drag Links\/Files Here")),c('React').createElement('div',{className:"_4g6z _4g6- _4g6_"},i._("Drop Files Here")),c('React').createElement('div',{className:"_4g6z _4g6- _4g70"},i._("Drop Link Here")))));}});f.exports=j;},null);
__d('SelectionPosition',['Event','InputSelection','SubscriptionsHandler'],function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();function h(i){'use strict';this.$SelectionPosition1=i;this.$SelectionPosition2={start:0,end:0};this.$SelectionPosition3=new (c('SubscriptionsHandler'))();this.$SelectionPosition4=false;this.updatePos();this.enable();}h.prototype.getPos=function(){'use strict';return babelHelpers['extends']({},this.$SelectionPosition2);};h.prototype.setPos=function(i,j){'use strict';this.$SelectionPosition2={start:i,end:j};this.restore();};h.prototype.updatePos=function(){'use strict';this.$SelectionPosition2=c('InputSelection').get(this.$SelectionPosition1);};h.prototype.restore=function(){'use strict';c('InputSelection').set(this.$SelectionPosition1,this.$SelectionPosition2.start,this.$SelectionPosition2.end);};h.prototype.enable=function(){'use strict';if(!this.$SelectionPosition4){this.$SelectionPosition3.addSubscriptions(c('Event').listen(this.$SelectionPosition1,'keyup',this.updatePos.bind(this)),c('Event').listen(this.$SelectionPosition1,'click',this.updatePos.bind(this)));this.$SelectionPosition4=true;}};h.prototype.disable=function(){'use strict';if(this.$SelectionPosition4){this.$SelectionPosition3.release();this.$SelectionPosition4=false;}};f.exports=h;},null);
__d('LeftFillRightFitLayout.react',['invariant','Layout.react','React','ReactChildren'],function a(b,c,d,e,f,g,h){'use strict';var i,j;if(c.__markCompiled)c.__markCompiled();var k=c('Layout.react').Column,l=c('Layout.react').FillColumn;i=babelHelpers.inherits(m,c('React').Component);j=i&&i.prototype;function m(n){j.constructor.call(this,n);}m.prototype.$LeftFillRightFitLayout1=function(){var n=[],o=this.props.children;!(o&&o.length===2)?h(0):void 0;c('ReactChildren').forEach(this.props.children,function(p){return n.push(p);},this);return {firstChild:n[0],secondChild:n[1]};};m.prototype.render=function(){var n=this.$LeftFillRightFitLayout1();return (c('React').createElement(c('Layout.react'),{className:this.props.className,style:this.props.style},c('React').createElement(l,null,n.firstChild),c('React').createElement(k,null,n.secondChild)));};f.exports=m;},null);
__d('PagesMessengerOmnipicker.react',['cx','fbt','invariant','React','Link.react','Omnipicker.react','ComputerPanel.react','OmnipickerComputerSelector.react','OmnipickerDialog.react','OmnipickerDialogRenderer','OmnipickerPagePostedPhotosPanel.react','OmnipickerPagePostedPhotosSelector.react','OmnipickerPanelList.react','OmnipickerSelectorList.react','OmnipickerWaterfallLogger','PUWApplications','PUWSteps','WaterfallIDGenerator'],function a(b,c,d,e,f,g,h,i,j){'use strict';if(c.__markCompiled)c.__markCompiled();var k=c('React').PropTypes,l=c('React').createClass({displayName:'PagesMessengerOmnipicker',_waterfallLogger:c('OmnipickerWaterfallLogger'),_dialogRenderer:null,propTypes:{uploadURI:k.string.isRequired,onPhotosSelected:k.func.isRequired,pageID:k.string.isRequired},componentDidMount:function(){this._waterfallLogger=new (c('OmnipickerWaterfallLogger'))(c('PUWApplications').WEB_PAGES_MESSENGER,c('WaterfallIDGenerator').generate());var m={fileUploadURI:this.props.uploadURI};this._dialogRenderer=new (c('OmnipickerDialogRenderer'))(c('React').createElement(c('OmnipickerDialog.react'),{onCancel:this._onPickerCancel,title:i._("Select Photo")},c('React').createElement(c('Omnipicker.react'),{logger:this._waterfallLogger,onDoneSelecting:this._onDoneSelecting},c('React').createElement(c('OmnipickerSelectorList.react'),null,c('React').createElement(c('OmnipickerComputerSelector.react'),null),c('React').createElement(c('OmnipickerPagePostedPhotosSelector.react'),null)),c('React').createElement(c('OmnipickerPanelList.react'),null,c('React').createElement(c('ComputerPanel.react'),{config:m}),c('React').createElement(c('OmnipickerPagePostedPhotosPanel.react'),{pageID:this.props.pageID})))));},render:function(){return (c('React').createElement('div',{className:"_k6_"},c('React').createElement(c('Link.react'),{className:"_k70",onClick:this._onPickerLaunch},c('React').createElement('i',{alt:i._("Camera"),className:"_k72"}))));},_onPickerLaunch:function(){this._waterfallLogger.logStep(c('PUWSteps').CLIENT_FLOW_BEGIN);!this._dialogRenderer?j(0):void 0;this._dialogRenderer.show();},_onPickerCancel:function(){!this._dialogRenderer?j(0):void 0;this._dialogRenderer.hide();this._waterfallLogger.logStep(c('PUWSteps').CLIENT_FLOW_CANCEL);},_onDoneSelecting:function(m){!this._dialogRenderer?j(0):void 0;this._dialogRenderer.hide();this.props.onPhotosSelected(m);}});f.exports=l;},null);
__d('SavedResponsesConstants',[],function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();var h={editPanelViewMode:{LIST:'LIST',CREATE:'CREATE',EDIT:'EDIT',PERSONALIZE:'PERSONALIZE'},sortingKey:{LAST_USED:'LAST_USED',MOST_USED:'MOST_USED',LAST_CREATED:'LAST_CREATED'},browsePanelAttachModeWidth:300,editPanelDialogWidth:600,listItemImageHeight:60,listItemImageWidth:60};f.exports=h;},null);
__d('SavedResponsesActionButton.react',['cx','Image.react','React','XUIGrayText.react','joinClasses'],function a(b,c,d,e,f,g,h){'use strict';var i,j;if(c.__markCompiled)c.__markCompiled();var k=c('React').PropTypes;i=babelHelpers.inherits(l,c('React').Component);j=i&&i.prototype;function l(m,n){j.constructor.call(this,m,n);}l.prototype.render=function(){var m=c('joinClasses')("_uvx",this.props.className);return (c('React').createElement('div',{className:m,onClick:this.props.onClick},c('React').createElement(c('Image.react'),{src:this.props.image,className:"_uvy"}),c('React').createElement(c('XUIGrayText.react'),{shade:'medium',className:"_uvz"},this.props.label)));};l.propTypes={image:k.object.isRequired,label:k.string.isRequired,onClick:k.func.isRequired};f.exports=l;},null);
__d("XPagesSavedResponseImagePreviewController",["XController"],function a(b,c,d,e,f,g){c.__markCompiled&&c.__markCompiled();f.exports=c("XController").create("\/pages\/saved_responses\/image\/preview\/",{});},null);
__d('SavedResponsesImage.react',['cx','ActorURI','AsyncRequest','Image.react','LoadingIndicator.react','React','XPagesSavedResponseImagePreviewController','XUICloseButton.react','isEmpty','joinClasses'],function a(b,c,d,e,f,g,h){'use strict';var i,j;if(c.__markCompiled)c.__markCompiled();var k=c('React').PropTypes;i=babelHelpers.inherits(l,c('React').Component);j=i&&i.prototype;function l(m,n){j.constructor.call(this,m,n);this.$SavedResponsesImage1=null;this.state={currentThumbnailImageId:'',imageUrl:null,isFetchingThumbnail:false};}l.prototype.componentWillReceiveProps=function(m){if(m.imageID!==this.props.imageID)this.$SavedResponsesImage2(m.imageID);};l.prototype.componentDidMount=function(){if(this.props.imageID)this.$SavedResponsesImage2(this.props.imageID);};l.prototype.componentWillUnmount=function(){if(this.$SavedResponsesImage1&&this.$SavedResponsesImage1.abort){this.$SavedResponsesImage1.abort();this.$SavedResponsesImage1=null;}};l.prototype.render=function(){if(!this.$SavedResponsesImage3()&&!this.state.imageUrl)return null;var m="_3mgf";if(this.$SavedResponsesImage3()){m=c('joinClasses')(m,this.props.loadingClassName);}else m=c('joinClasses')(m,this.props.displayClassName);return (c('React').createElement('div',{className:this.props.className},c('React').createElement('div',{className:m},this.$SavedResponsesImage4())));};l.prototype.$SavedResponsesImage2=function(m){if(c('isEmpty')(m)){this.setState({imageUrl:null});return;}this.setState({isFetchingThumbnail:true});var n=c('XPagesSavedResponseImagePreviewController').getURIBuilder().getURI();n=c('ActorURI').create(n,this.props.pageID);this.$SavedResponsesImage1=new (c('AsyncRequest'))();this.$SavedResponsesImage1.setURI(n).setHandler(function(o){return this.$SavedResponsesImage5(o);}.bind(this)).setMethod('POST').setData({image_id:m,target_width:this.props.width,target_height:this.props.height}).send();};l.prototype.$SavedResponsesImage3=function(){return this.state.isFetchingThumbnail||!!this.props.isUploading;};l.prototype.$SavedResponsesImage4=function(){if(this.props.isUploading||this.state.isFetchingThumbnail){return (c('React').createElement(c('LoadingIndicator.react'),{size:'medium',color:'white',className:"_3mgg"}));}else if(this.state.imageUrl){return (c('React').createElement('div',null,c('React').createElement(c('XUICloseButton.react'),{className:"_3mgn"+(!this.props.shouldShowCloseButton?' '+"hidden_elem":''),size:'medium',onClick:this.props.onClose}),c('React').createElement(c('Image.react'),{src:this.state.imageUrl})));}else return null;};l.prototype.$SavedResponsesImage5=function(m){this.setState({imageUrl:m.payload.url,isFetchingThumbnail:false});};l.propTypes={displayClassName:k.string.isRequired,height:k.number.isRequired,imageID:k.string,isUploading:k.bool,loadingClassName:k.string.isRequired,onClose:k.func,pageID:k.string.isRequired,shouldShowCloseButton:k.bool.isRequired,width:k.number.isRequired};f.exports=l;},null);
__d("SavedResponsesImageUploadHelper",[],function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();function h(i,j){"use strict";this.$SavedResponsesImageUploadHelper1=i;this.$SavedResponsesImageUploadHelper2=j;}h.prototype.onUploaderMounted=function(i){"use strict";this.$SavedResponsesImageUploadHelper3=i;};h.prototype.onUploadFinished=function(){"use strict";if(!this.$SavedResponsesImageUploadHelper3)return;var i=this.$SavedResponsesImageUploadHelper3.getImageFiles().pop().toString();this.$SavedResponsesImageUploadHelper2(i);};h.prototype.onUploadStarted=function(){"use strict";this.$SavedResponsesImageUploadHelper1();};f.exports=h;},null);
__d("XPagesSavedResponseNotifyAppliedController",["XController"],function a(b,c,d,e,f,g){c.__markCompiled&&c.__markCompiled();f.exports=c("XController").create("\/pages\/saved_responses\/notify\/applied\/",{});},null);
__d("XPagesSavedResponsesAsyncController",["XController"],function a(b,c,d,e,f,g){c.__markCompiled&&c.__markCompiled();f.exports=c("XController").create("\/pages\/saved_responses\/",{page_id:{type:"Int",required:true},other_user_id:{type:"Int",required:true}});},null);
__d('SavedResponsesUtils',['invariant','ActorURI','AsyncRequest','SavedResponsesConstants','XPagesSavedResponsesAsyncController','XPagesSavedResponseNotifyAppliedController'],function a(b,c,d,e,f,g,h){if(c.__markCompiled)c.__markCompiled();var i={generateImageMetadata:function(j){return {filename:'Photo.jpg',image_id:j,filetype:'image/jpeg'};},fetchSavedResponses:function(j,k,l){var m=c('XPagesSavedResponsesAsyncController').getURIBuilder().setInt('other_user_id',k).setInt('page_id',j).getURI();m=c('ActorURI').create(m,j);new (c('AsyncRequest'))().setURI(m).setHandler(function(n){return l(n.payload.responses,n.payload.tokens);}).send();},sortSavedResponses:function(j,k){switch(k){case c('SavedResponsesConstants').sortingKey.LAST_USED:return j.slice().sort(function(l,m){return m.lastTimeUsed-l.lastTimeUsed;});case c('SavedResponsesConstants').sortingKey.MOST_USED:return j.slice().sort(function(l,m){return m.usageCount-l.usageCount;});case c('SavedResponsesConstants').sortingKey.LAST_CREATED:return j;default:h(0);}},notifySavedResponseApplied:function(j,k){var l=c('XPagesSavedResponseNotifyAppliedController').getURIBuilder().getURI();l=c('ActorURI').create(l,k);new (c('AsyncRequest'))().setURI(l).setMethod('POST').setData({response_id:j.id}).send();}};f.exports=i;},null);
__d('SavedResponsesImageUploader.react',['cx','ChatFileUploaderMixin','Image.react','MercuryConfig','MercuryFileUploader','React','ReactDOM','SavedResponsesUtils','URI','XUIGrayText.react','joinClasses'],function a(b,c,d,e,f,g,h){if(c.__markCompiled)c.__markCompiled();var i=c('React').PropTypes,j=c('React').createClass({displayName:'SavedResponsesImageUploader',mixins:[c('ChatFileUploaderMixin')],propTypes:{image:i.object.isRequired,label:i.string.isRequired,pageID:i.string},componentDidMount:function(){this._fileUploader=new (c('MercuryFileUploader'))(this.props.attachmentsShelf,c('ReactDOM').findDOMNode(this.refs.form),c('ReactDOM').findDOMNode(this.refs.input),c('ReactDOM').findDOMNode(this.refs.attachID));if(this.props.imageID)this._fileUploader.addCachedAttachments([c('SavedResponsesUtils').generateImageMetadata(this.props.imageID)]);this.setUpSubscriptionsHandler(this._fileUploader);},getActionURI:function(){return this.props.pageID?new (c('URI'))(c('MercuryConfig').upload_url).addQueryData('request_user_id',this.props.pageID).toString():c('MercuryConfig').upload_url;},getDefaultProps:function(){return {pageID:null};},componentDidUpdate:function(k,l){if(this.props.imageID){this._fileUploader.removeAttachments();this._fileUploader.addCachedAttachments([c('SavedResponsesUtils').generateImageMetadata(this.props.imageID)]);}},render:function(){var k=c('joinClasses')("_uvx",this.props.className);return (c('React').createElement('form',{action:this.getActionURI(),className:k,method:'post',ref:'form'},c('React').createElement('input',{type:'hidden',name:'attach_id',ref:'attachID'}),c('React').createElement('div',{className:"_4q60"},c('React').createElement('div',{className:"_4q61 _2d_p"},c('React').createElement(c('Image.react'),{src:this.props.image,className:"_uvy"}),c('React').createElement(c('XUIGrayText.react'),{shade:'medium',className:"_uvz"},this.props.label)),c('React').createElement('input',{type:'file',className:"_2d_q",name:'attachment[]',accept:this.props.imagesOnly?'image/*':'*',ref:'input'}))));}});f.exports=j;},null);
__d('SavedResponsesEditResponseContentView.react',['cx','fbt','ix','AbstractTextArea.react','React','SavedResponsesActionButton.react','SavedResponsesImage.react','SavedResponsesImageUploader.react','SavedResponsesImageUploadHelper','ScrollableArea.react','MacroInput.react'],function a(b,c,d,e,f,g,h,i,j){var k,l;if(c.__markCompiled)c.__markCompiled();var m=c('React').PropTypes;k=babelHelpers.inherits(n,c('React').Component);l=k&&k.prototype;n.prototype.render=function(){'use strict';var o=i._("Enter reply title here"),p=i._("Enter your message here");return (c('React').createElement('div',{className:this.props.className},c('React').createElement(c('AbstractTextArea.react'),{className:"_4451 _1vw8",onChange:function(q){return this.props.onTitleChange(q.target.value);}.bind(this),placeholder:o,value:this.props.responseTitle}),c('React').createElement('div',{className:"_38bw _57hg"},c('React').createElement(c('ScrollableArea.react'),{fade:true,shadow:true},c('React').createElement(c('MacroInput.react'),{className:"_3jv6",editorState:this.props.editorState,onChange:this.props.onContentChange,placeholder:p,readOnly:false,ref:'macroInput'}),c('React').createElement(c('SavedResponsesImage.react'),{className:"_57hh",displayClassName:"_57hn",imageID:this.props.responseImageID,isUploading:this.props.isUploadingImage,loadingClassName:"_57hi",pageID:this.props.pageID,height:250,onClose:this.props.onDeleteImage,shouldShowCloseButton:true,width:250}))),this.$SavedResponsesEditResponseContentView1()));};n.prototype.$SavedResponsesEditResponseContentView1=function(){'use strict';return (c('React').createElement('div',{className:"_57ho"},c('React').createElement(c('SavedResponsesImageUploader.react'),{className:"_3-8v",image:j('/images/mobile/glyph/photos_dark-grey_l.png'),label:i._("Add Image"),onFileUploaderMounted:function(o){return this.props.uploadHandler.onUploaderMounted(o);}.bind(this),onSubmit:function(){return this.props.uploadHandler.onUploadStarted();}.bind(this),onUploadFinished:function(){return this.props.uploadHandler.onUploadFinished();}.bind(this),pageID:this.props.pageID}),c('React').createElement(c('SavedResponsesActionButton.react'),{image:j('/images/mobile/glyph/love_dark-grey_l.png'),className:"_3-8v",label:i._("Personalize"),onClick:this.props.onPersonalize})));};function n(){'use strict';k.apply(this,arguments);}n.propTypes={editorState:m.object.isRequired,isUploadingImage:m.bool.isRequired,pageID:m.string.isRequired,responseImageID:m.string,responseTitle:m.string,onContentChange:m.func.isRequired,onDeleteImage:m.func.isRequired,onPersonalize:m.func.isRequired,onTitleChange:m.func.isRequired,uploadHandler:m.instanceOf(c('SavedResponsesImageUploadHelper')).isRequired};f.exports=n;},null);
__d('SavedResponsesFooterButton.react',['cx','Image.react','React','XUIButton.react'],function a(b,c,d,e,f,g,h){'use strict';var i,j;if(c.__markCompiled)c.__markCompiled();var k=c('React').PropTypes;i=babelHelpers.inherits(l,c('React').Component);j=i&&i.prototype;function l(m,n){j.constructor.call(this,m,n);}l.prototype.render=function(){return (c('React').createElement(c('XUIButton.react'),babelHelpers['extends']({},this.props,{className:"_3-8i"+(this.props.isHidden?' '+"hidden_elem":''),size:'large',label:this.props.label,onClick:this.props.onClick,use:this.props.use,image:this.props.image?c('React').createElement(c('Image.react'),{src:this.props.image}):null})));};l.propTypes={image:k.object,isHidden:k.bool,label:k.string.isRequired,onClick:k.func.isRequired,use:k.oneOf(['default','special','confirm'])};l.defaultProps={use:'default',isHidden:false};f.exports=l;},null);
__d('SavedResponsesMacroDetailView.react',['cx','fbt','React','ScrollableArea.react'],function a(b,c,d,e,f,g,h,i){'use strict';var j,k;if(c.__markCompiled)c.__markCompiled();var 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(){var n=this.props.macro;if(!n)return null;return (c('React').createElement(c('ScrollableArea.react'),{fade:true,shadow:true},c('React').createElement('div',null,c('React').createElement('div',{className:"_tpd"},n.key),c('React').createElement('div',{className:"_tpe"},n.description),c('React').createElement('div',{className:"_tpf"},i._("Example")),c('React').createElement('div',{className:"_tpg"},n.example))));};m.propTypes={macro:l.shape({description:l.string.isRequired,example:l.string.isRequired,key:l.string.isRequired,name:l.string.isRequired,value:l.string.isRequired})};f.exports=m;},null);
__d('SavedResponsesMacroListItem.react',['cx','ix','Image.react','React'],function a(b,c,d,e,f,g,h,i){'use strict';var j,k;if(c.__markCompiled)c.__markCompiled();var 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);this.state={isHover:false};}m.prototype.render=function(){return (c('React').createElement('div',{className:"_5y_z",'data-id':this.props.macro.key,onClick:function(){return this.$SavedResponsesMacroListItem1();}.bind(this),onMouseOut:function(){return this.$SavedResponsesMacroListItem2();}.bind(this),onMouseOver:function(){return this.$SavedResponsesMacroListItem3();}.bind(this)},c('React').createElement('div',{className:"_5y__"},this.props.macro.key),c('React').createElement('div',{className:"_5z00"+(!this.state.isHover?' '+"hidden_elem":'')},c('React').createElement(c('Image.react'),{src:i('/images/pages/macro_listitem_triangle.png')}))));};m.prototype.$SavedResponsesMacroListItem3=function(){this.props.onHover(this.props.macro);this.setState({isHover:true});};m.prototype.$SavedResponsesMacroListItem2=function(){this.setState({isHover:false});};m.prototype.$SavedResponsesMacroListItem1=function(){this.props.onSelect(this.props.macro);};m.propTypes={macro:l.shape({key:l.string.isRequired,value:l.string.isRequired}).isRequired,onHover:l.func.isRequired,onSelect:l.func.isRequired};f.exports=m;},null);
__d('SavedResponsesMacroListView.react',['React','SavedResponsesMacroListItem.react'],function a(b,c,d,e,f,g){'use strict';var h,i;if(c.__markCompiled)c.__markCompiled();var j=c('React').PropTypes;h=babelHelpers.inherits(k,c('React').Component);i=h&&h.prototype;function k(l,m){i.constructor.call(this,l,m);}k.prototype.render=function(){return (c('React').createElement('ul',null,this.$SavedResponsesMacroListView1()));};k.prototype.$SavedResponsesMacroListView1=function(){var l=[];for(var m in this.props.macros){var n=this.props.macros[m];l.push(c('React').createElement(c('SavedResponsesMacroListItem.react'),{macro:n,onHover:this.props.onMacroHover,onSelect:this.props.onMacroSelected}));}return l;};k.propTypes={macros:j.object.isRequired,onMacroHover:j.func.isRequired,onMacroSelected:j.func.isRequired};f.exports=k;},null);
__d('SavedResponsesMacroBrowseView.react',['cx','fbt','Grid.react','React','SavedResponsesFooterButton.react','SavedResponsesMacroDetailView.react','SavedResponsesMacroListView.react','ScrollableArea.react','joinClasses'],function a(b,c,d,e,f,g,h,i){var j,k;if(c.__markCompiled)c.__markCompiled();var l=c('Grid.react').GridItem,m=c('React').PropTypes;j=babelHelpers.inherits(n,c('React').Component);k=j&&j.prototype;function n(o,p){'use strict';k.constructor.call(this,o,p);this.state={activeMacro:null};}n.prototype.render=function(){'use strict';return (c('React').createElement('div',null,this.renderBodyPart(),c('React').createElement('div',{className:"_3ohz"},this.renderFooterPart())));};n.prototype.renderBodyPart=function(){'use strict';var o=c('joinClasses')("_552a",this.props.className);return (c('React').createElement('div',{className:o},c('React').createElement(c('Grid.react'),{cols:2,spacing:'none',className:"_552b"},c('React').createElement(l,{className:"_552c"},c('React').createElement('div',{className:"_552d"}),c('React').createElement(c('ScrollableArea.react'),{fade:true,shadow:true},c('React').createElement('div',{className:"_2t-k"},c('React').createElement(c('SavedResponsesMacroListView.react'),{macros:this.props.macros,onMacroSelected:this.props.onMacroSelected,onMacroHover:function(p){return this.$SavedResponsesMacroBrowseView1(p);}.bind(this)})))),c('React').createElement(l,{className:"_552e"},c('React').createElement(c('SavedResponsesMacroDetailView.react'),{macro:this.state.activeMacro})))));};n.prototype.renderFooterPart=function(){'use strict';var o=i._("Cancel");return (c('React').createElement('div',null,c('React').createElement('div',{className:"_552g"},c('React').createElement(c('SavedResponsesFooterButton.react'),{label:o,onClick:this.props.onCancel}))));};n.prototype.$SavedResponsesMacroBrowseView1=function(o){'use strict';this.setState({activeMacro:o});};n.propTypes={macros:m.object.isRequired,onCancel:m.func.isRequired,onMacroSelected:m.func.isRequired};f.exports=n;},null);
__d('SavedResponsesPanel.react',['cx','fbt','ix','Image.react','React','XUICloseButton.react','XUIDialogBody.react','XUIDialogTitle.react','XUIGrayText.react','emptyFunction'],function a(b,c,d,e,f,g,h,i,j){'use strict';var k,l;if(c.__markCompiled)c.__markCompiled();var m=c('React').PropTypes;k=babelHelpers.inherits(n,c('React').Component);l=k&&k.prototype;function n(o,p){l.constructor.call(this,o,p);}n.prototype.render=function(){return (c('React').createElement('div',{className:this.props.className},c('React').createElement(c('XUIDialogTitle.react'),{className:"_3alh",showCloseButton:false},c('React').createElement('div',{className:"_2rp7"},c('React').createElement('div',{className:"_2rp8"+(!this.props.shouldShowBackButton?' '+"hidden_elem":''),onClick:this.props.onBackButtonClicked},c('React').createElement(c('Image.react'),{src:j("/images/help/rooms/back.png"),className:"_2rp9"}),c('React').createElement(c('XUIGrayText.react'),{shade:'light',className:"_2rpa"},this.props.backButtonLabel),c('React').createElement('div',{className:"_2rpb"})),c('React').createElement('span',{className:"_5hp9"},this.props.title)),this.$SavedResponsesPanel1()),c('React').createElement(c('XUIDialogBody.react'),{className:"_2rpc"},this.props.children)));};n.prototype.$SavedResponsesPanel1=function(){var o=i._("Close");return (c('React').createElement(c('XUICloseButton.react'),{className:"_2rpe",label:o,onClick:this.props.onClose,shade:'dark',size:'medium',title:o,type:'button'}));};n.propTypes={backButtonLabel:m.string,onBackButtonClicked:m.func,onClose:m.func.isRequired,shouldShowBackButton:m.bool,title:m.string.isRequired};n.defaultProps={backButtonLabel:null,onBackButtonClicked:c('emptyFunction'),shouldShowBackButton:false};f.exports=n;},null);
__d('MacroSpan.react',['cx','DraftEntity','React','XUICloseButton.react'],function a(b,c,d,e,f,g,h){'use strict';if(c.__markCompiled)c.__markCompiled();var i=c('React').PropTypes,j=c('React').createClass({displayName:'MacroSpan',propTypes:{entityKey:i.string.isRequired,offsetKey:i.string.isRequired,onRemoveToken:i.func.isRequired,tokens:i.object.isRequired},getInitialState:function(){return {isMouseOver:false};},render:function(){var k=this._getEntityData();return (c('React').createElement('span',{className:"_vxd",onMouseEnter:this._onMouseEnter,onMouseLeave:this._onMouseLeave},c('React').createElement('span',{className:"_vxe",contentEditable:false,'data-offset-key':this.props.offsetKey,spellCheck:false},this._getContent(k),c('React').createElement(c('XUICloseButton.react'),{size:'small',className:"_vxf",onClick:this._removeToken}))));},_getContent:function(k){var l=k.key in this.props.tokens?this.props.tokens[k.key].value:k.key,m=k.key in this.props.tokens?this.props.tokens[k.key].key:k.key;return this.state.isMouseOver?m:l;},_onMouseEnter:function(){this.setState({isMouseOver:true});},_onMouseLeave:function(){this.setState({isMouseOver:false});},_removeToken:function(){this.props.onRemoveToken(this.props.offsetKey);},_getEntityData:function(){return c('DraftEntity').get(this.props.entityKey).getData();}});f.exports=j;},null);
__d('getMacrosInputDecorator',['CompositeDraftDecorator','MacroSpan.react','getEntityMatcher'],function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();function h(i,j){return new (c('CompositeDraftDecorator'))([{strategy:c('getEntityMatcher')(function(k){return k.getType()==='TOKEN';}),component:c('MacroSpan.react'),props:{onRemoveToken:j,tokens:i}}]);}f.exports=h;},null);
__d('SavedResponsesTokensUtils',['DraftEntity','createEditorStateWithEntities','getMacrosInputDecorator'],function a(b,c,d,e,f,g){'use strict';if(c.__markCompiled)c.__markCompiled();var h=new RegExp('{{(.*?)}}','ig'),i={_parseTemplateFieldTokens:function(j){var k=j,l=[],m;while(m=h.exec(k)){var n={text:m[0],offset:m.index,length:m[0].length,entity:{token:m[0],key:m[1]}};l.push(n);k=k.replace(m[0],n.text);h.lastIndex=n.offset+n.length;}if(l.length>0){if(l[0].offset===0){k=" "+k;l.forEach(function(p){p.offset++;});}var o=l[l.length-1];if(o.length+o.offset===k.length)k=k+" ";}return {ranges:l,text:k};},createTemplateFieldsEditorStateWithText:function(j,k,l){var m=i._parseTemplateFieldTokens(j),n=m.ranges,o=m.text;return c('createEditorStateWithEntities')({text:o,ranges:n,decorator:c('getMacrosInputDecorator')(l,k),entityCreationFn:function(p){return c('DraftEntity').create('TOKEN','IMMUTABLE',p);}});},prepareforSend:function(j,k){var l=j.match(/\{{(.*?)\}}/g);if(l)l.forEach(function(m){var n=m.replace('{{','').replace('}}',''),o=n in k?k[n].value:n;j=j.replace(m,o);});return j;}};f.exports=i;},null);
__d("XPagesSavedResponsesAddController",["XController"],function a(b,c,d,e,f,g){c.__markCompiled&&c.__markCompiled();f.exports=c("XController").create("\/pages\/saved_responses\/add\/",{owner_id:{type:"Int",required:true},title:{type:"String",defaultValue:""},message:{type:"String",required:true},photo_id:{type:"Int"},user_message:{type:"String"}});},null);
__d("XPagesSavedResponsesDeleteController",["XController"],function a(b,c,d,e,f,g){c.__markCompiled&&c.__markCompiled();f.exports=c("XController").create("\/pages\/saved_responses\/delete\/",{response_id:{type:"Int",required:true}});},null);
__d("XPagesSavedResponsesEditController",["XController"],function a(b,c,d,e,f,g){c.__markCompiled&&c.__markCompiled();f.exports=c("XController").create("\/pages\/saved_responses\/edit\/",{response_id:{type:"Int",required:true},title:{type:"String",defaultValue:""},message:{type:"String",required:true},photo_id:{type:"Int"},remove_photo_id:{type:"Int"}});},null);
__d('SavedResponsesEditResponseView.react',['cx','fbt','invariant','ActorURI','AsyncRequest','DraftEntity','DraftModifier','DraftOffsetKey','EditorState','PagesEventObserver','PagesEventType','React','SavedResponsesEditResponseContentView.react','SavedResponsesFooterButton.react','SavedResponsesImageUploadHelper','SavedResponsesMacroBrowseView.react','SavedResponsesPanel.react','SavedResponsesTokensUtils','SelectionState','XPagesSavedResponsesAddController','XPagesSavedResponsesDeleteController','XPagesSavedResponsesEditController','XUISpinner.react','getMacrosInputDecorator'],function a(b,c,d,e,f,g,h,i,j){var k,l;if(c.__markCompiled)c.__markCompiled();var m=c('React').PropTypes;k=babelHelpers.inherits(n,c('React').Component);l=k&&k.prototype;function n(o,p){'use strict';l.constructor.call(this,o,p);var q=!!this.props.initialResponse||false,r=!!this.props.initialResponse&&!!this.props.initialResponse.image?this.props.initialResponse.image.id:'',s=this.$SavedResponsesEditResponseView1(q);this.state={anyContent:s.getCurrentContent().hasText(),editorState:s,imageID:r,isEditing:q,isModified:false,isPersonalizing:false,isProcessing:false,isUploadingImage:false,message:s.getCurrentContent().getPlainText(),shouldShowDeleteWarning:false,shouldShowDiscardWarning:false,title:!!this.props.initialResponse?this.props.initialResponse.title:'',uploadHandler:new (c('SavedResponsesImageUploadHelper'))(function(){return this.$SavedResponsesEditResponseView2();}.bind(this),function(t){return this.$SavedResponsesEditResponseView3(t);}.bind(this))};}n.prototype.render=function(){'use strict';return (c('React').createElement(c('SavedResponsesPanel.react'),{backButtonLabel:this.$SavedResponsesEditResponseView4(),className:"_15ht",onBackButtonClicked:function(){return this.$SavedResponsesEditResponseView5();}.bind(this),onClose:this.props.onClose,shouldShowBackButton:true,title:this.$SavedResponsesEditResponseView6()},this.$SavedResponsesEditResponseView7(),c('React').createElement('div',{className:"_3ohz"},this.$SavedResponsesEditResponseView8())));};n.prototype.$SavedResponsesEditResponseView9=function(){'use strict';return i._("Cancel");};n.prototype.$SavedResponsesEditResponseView10=function(){'use strict';return i._("Delete");};n.prototype.$SavedResponsesEditResponseView11=function(){'use strict';return i._("Save reply");};n.prototype.$SavedResponsesEditResponseView7=function(){'use strict';if(this.state.isPersonalizing){return (c('React').createElement(c('SavedResponsesMacroBrowseView.react'),{className:"_1wxh",macros:this.props.supportedMacros,onCancel:function(){return this.$SavedResponsesEditResponseView12();}.bind(this),onMacroSelected:function(o){return this.$SavedResponsesEditResponseView13(o);}.bind(this)}));}else return (c('React').createElement(c('SavedResponsesEditResponseContentView.react'),{className:"_1wxh",editorState:this.state.editorState,isUploadingImage:this.state.isUploadingImage,onContentChange:function(o){return this.$SavedResponsesEditResponseView14(o);}.bind(this),onDeleteImage:function(){return this.$SavedResponsesEditResponseView15();}.bind(this),onPersonalize:function(){return this.$SavedResponsesEditResponseView16();}.bind(this),onTitleChange:function(o){this.setState({title:o,isModified:true});}.bind(this),pageID:this.props.pageID,responseImageID:this.state.imageID,responseTitle:this.state.title,uploadHandler:this.state.uploadHandler}));};n.prototype.$SavedResponsesEditResponseView8=function(){'use strict';if(this.state.isPersonalizing){return (c('React').createElement(c('SavedResponsesFooterButton.react'),{label:this.$SavedResponsesEditResponseView9(),onClick:function(){return this.$SavedResponsesEditResponseView12();}.bind(this)}));}else return this.$SavedResponsesEditResponseView17();};n.prototype.$SavedResponsesEditResponseView18=function(){'use strict';var o=i._("Continue Editing"),p=i._("Discard");return (c('React').createElement('div',null,c('React').createElement('div',{className:"_2ln1"},i._("Are you sure you want to discard your edit?")),c('React').createElement('div',{className:"_4pnp"},c('React').createElement(c('SavedResponsesFooterButton.react'),{label:p,onClick:function(){return this.$SavedResponsesEditResponseView19();}.bind(this)}),c('React').createElement(c('SavedResponsesFooterButton.react'),{label:o,onClick:function(){return this.$SavedResponsesEditResponseView20();}.bind(this),use:'confirm'}))));};n.prototype.$SavedResponsesEditResponseView21=function(){'use strict';return (c('React').createElement('div',null,c('React').createElement('div',{className:"_2ln1"},i._("Are you sure you want to delete this saved reply?")),c('React').createElement('div',{className:"_4pnp"},c('React').createElement(c('SavedResponsesFooterButton.react'),{label:this.$SavedResponsesEditResponseView10(),onClick:function(){return this.$SavedResponsesEditResponseView22();}.bind(this)}),c('React').createElement(c('SavedResponsesFooterButton.react'),{label:this.$SavedResponsesEditResponseView9(),onClick:function(){return this.$SavedResponsesEditResponseView23();}.bind(this),use:'confirm'}))));};n.prototype.$SavedResponsesEditResponseView24=function(){'use strict';return (c('React').createElement('div',null,c('React').createElement(c('SavedResponsesFooterButton.react'),{label:this.$SavedResponsesEditResponseView10(),onClick:function(){return this.$SavedResponsesEditResponseView25();}.bind(this),isHidden:!this.state.isEditing}),c('React').createElement('div',{className:"_4pnp"},c('React').createElement(c('SavedResponsesFooterButton.react'),{label:this.$SavedResponsesEditResponseView9(),onClick:function(){return this.props.onEditDone(false);}.bind(this)}),c('React').createElement(c('SavedResponsesFooterButton.react'),{disabled:!this.state.anyContent,label:this.$SavedResponsesEditResponseView11(),onClick:function(){return this.$SavedResponsesEditResponseView26();}.bind(this),use:'confirm'}),c('React').createElement(c('XUISpinner.react'),{size:'small',className:(!this.state.isProcessing?"hidden_elem":'')+(' '+"_3-91")+(' '+"_3-99")}))));};n.prototype.$SavedResponsesEditResponseView17=function(){'use strict';if(this.state.shouldShowDeleteWarning){return this.$SavedResponsesEditResponseView21();}else if(this.state.shouldShowDiscardWarning){return this.$SavedResponsesEditResponseView18();}else return this.$SavedResponsesEditResponseView24();};n.prototype.$SavedResponsesEditResponseView4=function(){'use strict';if(!this.state.isPersonalizing){return i._("List");}else return i._("Edit");};n.prototype.$SavedResponsesEditResponseView6=function(){'use strict';if(this.state.isPersonalizing){return i._("Add Personalization");}else if(this.state.isEditing){return i._("Edit Reply");}else return i._("Create Reply");};n.prototype.$SavedResponsesEditResponseView27=function(o){'use strict';var p={text:'{{'+o.name+'}}',key:o.name},q=this.state.editorState,r=q.getSelection(),s=q.getCurrentContent(),t=r.getStartKey(),u=r.getStartOffset(),v=s.getBlockForKey(t),w;if(v.getText().substr(u-1,1).trim().length>0){var x=c('DraftModifier').replaceText(s,r,' ');r=x.getSelectionAfter();w=c('DraftModifier').insertText(x,r,p.text,q.getCurrentInlineStyle(),c('DraftEntity').create('TOKEN','IMMUTABLE',p));}else w=c('DraftModifier').replaceText(s,r,p.text,q.getCurrentInlineStyle(),c('DraftEntity').create('TOKEN','IMMUTABLE',p));w=c('DraftModifier').insertText(w,w.getSelectionAfter(),' ');q=c('EditorState').push(q,w,'insert-fragment');q=c('EditorState').forceSelection(q,q.getSelection());this.$SavedResponsesEditResponseView14(q);};n.prototype.$SavedResponsesEditResponseView28=function(){'use strict';var o=this.state.editorState.getCurrentContent().getPlainText();c('PagesEventObserver').logData_DEPRECATED({event_name:c('PagesEventType').SAVED_REPLIES_EDIT_REPLY,page_id:this.props.pageID,response_content:o},null);var p=this.props.initialResponse;!!!p?j(0):void 0;var q=this.state.imageID?this.state.imageID.toString():'',r=c('XPagesSavedResponsesEditController').getURIBuilder().setInt('response_id',p.id).setString('message',o).setString('title',this.state.title);if(!q&&p.image&&p.image.id){r.setInt('remove_photo_id',p.image.id);}else r.setInt('photo_id',q);r=c('ActorURI').create(r.getURI(),this.props.pageID);new (c('AsyncRequest'))().setURI(r).setMethod('POST').setHandler(function(){return this.props.onEditDone(true);}.bind(this)).send();};n.prototype.$SavedResponsesEditResponseView29=function(){'use strict';var o=this.state.editorState.getCurrentContent().getPlainText();c('PagesEventObserver').logData_DEPRECATED({event_name:c('PagesEventType').SAVED_REPLIES_CREATE_REPLY,page_id:this.props.pageID,response_content:o},null);var p=this.state.imageID?this.state.imageID.toString():'',q=c('XPagesSavedResponsesAddController').getURIBuilder().setInt('owner_id',this.props.pageID).setString('message',o).setString('title',this.state.title).setInt('photo_id',p).getURI();q=c('ActorURI').create(q,this.props.pageID);new (c('AsyncRequest'))().setURI(q).setMethod('POST').setHandler(function(){return this.props.onEditDone(true);}.bind(this)).send();};n.prototype.$SavedResponsesEditResponseView1=function(o){'use strict';if(o&&this.props.initialResponse){var p=this.props.initialResponse.message||'';return c('SavedResponsesTokensUtils').createTemplateFieldsEditorStateWithText(p,function(q){return this.$SavedResponsesEditResponseView30(q);}.bind(this),this.props.supportedMacros);}else return c('EditorState').createEmpty(c('getMacrosInputDecorator')(this.props.supportedMacros||{},function(q){return this.$SavedResponsesEditResponseView30(q);}.bind(this)));};n.prototype.$SavedResponsesEditResponseView15=function(){'use strict';this.setState({imageID:null});};n.prototype.$SavedResponsesEditResponseView5=function(){'use strict';if(this.state.isPersonalizing){this.setState({isPersonalizing:false});}else if(this.state.isModified){this.setState({shouldShowDiscardWarning:true});}else this.props.onBackButtonClicked();};n.prototype.$SavedResponsesEditResponseView12=function(){'use strict';this.setState({isPersonalizing:false});};n.prototype.$SavedResponsesEditResponseView13=function(o){'use strict';c('PagesEventObserver').logData_DEPRECATED({event_name:c('PagesEventType').SAVED_REPLIES_PERSONALIZE,page_id:this.props.pageID},null);this.setState({isPersonalizing:false});this.$SavedResponsesEditResponseView27(o);};n.prototype.$SavedResponsesEditResponseView16=function(){'use strict';this.setState({isPersonalizing:true});this.props.onEnterPersonalizeView();};n.prototype.$SavedResponsesEditResponseView14=function(o){'use strict';this.setState({anyContent:o.getCurrentContent().hasText(),editorState:o,isModified:true});};n.prototype.$SavedResponsesEditResponseView2=function(){'use strict';c('PagesEventObserver').logData_DEPRECATED({event_name:c('PagesEventType').SAVED_REPLIES_ADD_IMAGE,page_id:this.props.pageID},null);this.setState({imageID:null,isUploadingImage:true});};n.prototype.$SavedResponsesEditResponseView3=function(o){'use strict';this.setState({imageID:o,isUploadingImage:false});};n.prototype.$SavedResponsesEditResponseView30=function(o){'use strict';var p=this.state.editorState,q=c('DraftOffsetKey').decode(o),r=q.blockKey,s=q.decoratorKey,t=p.getBlockTree(r).getIn([s]),u=new (c('SelectionState'))({anchorKey:r,anchorOffset:t.get('start'),focusKey:r,focusOffset:t.get('end'),isBackward:false,hasFocus:true}),v=c('DraftModifier').removeRange(p.getCurrentContent(),u,'forward'),w=c('EditorState').push(p,v,'remove-range');this.$SavedResponsesEditResponseView14(w);};n.prototype.$SavedResponsesEditResponseView25=function(){'use strict';this.setState({shouldShowDeleteWarning:true});};n.prototype.$SavedResponsesEditResponseView26=function(){'use strict';this.setState({isProcessing:true});this.state.isEditing?this.$SavedResponsesEditResponseView28():this.$SavedResponsesEditResponseView29();};n.prototype.$SavedResponsesEditResponseView23=function(){'use strict';this.setState({shouldShowDeleteWarning:false});};n.prototype.$SavedResponsesEditResponseView22=function(){'use strict';c('PagesEventObserver').logData_DEPRECATED({event_name:c('PagesEventType').SAVED_REPLIES_DELETE_REPLY,page_id:this.props.pageID},null);this.setState({shouldShowDeleteWarning:false,isProcessing:true});!!!this.props.initialResponse?j(0):void 0;var o=c('XPagesSavedResponsesDeleteController').getURIBuilder().setInt('response_id',this.props.initialResponse.id).getURI();new (c('AsyncRequest'))().setURI(o).setMethod('POST').setHandler(function(){return this.props.onEditDone(true);}.bind(this)).send();};n.prototype.$SavedResponsesEditResponseView19=function(){'use strict';this.props.onBackButtonClicked();};n.prototype.$SavedResponsesEditResponseView20=function(){'use strict';this.setState({shouldShowDiscardWarning:false});};n.propTypes={initialResponse:m.shape({id:m.string.isRequired,title:m.string,message:m.string,image:m.object}),onBackButtonClicked:m.func.isRequired,onClose:m.func.isRequired,onEditDone:m.func.isRequired,onEnterPersonalizeView:m.func.isRequired,pageID:m.string.isRequired,supportedMacros:m.object};f.exports=n;},null);
__d('SavedResponsesListItem.react',['cx','fbt','ClientIDs','Link.react','React','ReactDOM','SavedResponsesImage.react','SavedResponsesConstants'],function a(b,c,d,e,f,g,h,i){'use strict';if(c.__markCompiled)c.__markCompiled();var j=c('React').PropTypes,k=c('React').createClass({displayName:'SavedResponsesListItem',propTypes:{onResponseHover:j.func,onResponseSelected:j.func.isRequired,onResponseUnhover:j.func,pageID:j.string.isRequired,response:j.shape({id:j.string.isRequired,title:j.string,message:j.string.isRequired,image:j.object}),tokens:j.object.isRequired},getInitialState:function(){return {shouldShowSeeMoreLink:false,shouldLimitHeight:true};},componentDidMount:function(){this._refreshSeeMoreLink();},componentDidUpdate:function(){this._refreshSeeMoreLink();},render:function(){var l=this.props.response.image&&true;return (c('React').createElement('div',{className:"_33w3"+(l?' '+"_33w4":''),'data-id':this.props.response.id,onClick:this._onResponseSelected,onMouseEnter:this._onResponseHover,onMouseLeave:this.props.onResponseUnhover},c('React').createElement('div',{className:"_33w5"+(l?' '+"_33w6":'')+(' '+"fwb")},this.props.response.title),c('React').createElement('div',{className:"_33w7"+(this.state.shouldLimitHeight?' '+"_4en5":'')+(!this.props.response.title&&this.props.response.image?' '+"_2pid":''),ref:'message'},this.props.response.image?c('React').createElement(c('SavedResponsesImage.react'),{className:"_33w8",displayClassName:"_33w9",height:c('SavedResponsesConstants').listItemImageHeight,imageID:this.props.response.image.id,loadingClassName:"_33w9",pageID:this.props.pageID,shouldShowCloseButton:false,width:c('SavedResponsesConstants').listItemImageWidth}):null,this._processTokens(this.props.response.message)),c('React').createElement(c('Link.react'),{className:"_4en6"+(!this.state.shouldShowSeeMoreLink?' '+"hidden_elem":''),onClick:this._onShowMoreClicked},i._("See more"))));},_refreshSeeMoreLink:function(){if(this.state.shouldLimitHeight===false||this.state.shouldShowSeeMoreLink)return;var l=c('ReactDOM').findDOMNode(this.refs.message);if(l.scrollHeight>l.clientHeight)this.setState({shouldShowSeeMoreLink:true});},_processTokens:function(l){var m=0,n=0,o=/\{{(.*?)\}}/g,p=o.exec(l),q=[];while(p!=null){n=p.index;q.push(c('React').createElement('span',{key:c('ClientIDs').getNewClientID()},l.substring(m,n)));m=n+p[0].length;var r=p[1] in this.props.tokens?this.props.tokens[p[1]].value:p[1];q.push(c('React').createElement('span',{key:c('ClientIDs').getNewClientID(),className:"_-8"},r));p=o.exec(l);}q.push(c('React').createElement('span',{key:c('ClientIDs').getNewClientID()},l.substring(m,l.length)));return q;},_onResponseSelected:function(){this.props.onResponseSelected(this.props.response,this.props.tokens);},_onResponseHover:function(){this.props.onResponseHover&&this.props.onResponseHover(this.props.response,this.props.tokens);},_onShowMoreClicked:function(l){this.setState({shouldShowSeeMoreLink:false,shouldLimitHeight:false});l.stopPropagation();}});f.exports=k;},null);
__d('SavedResponsesOrderingMenu.react',['cx','fbt','ContextualDialogArrow','PopoverMenu.react','React','ReactXUIMenu','SavedResponsesConstants','XUIPopoverButton.react'],function a(b,c,d,e,f,g,h,i){'use strict';var j,k;if(c.__markCompiled)c.__markCompiled();var l=c('ReactXUIMenu').Item;j=babelHelpers.inherits(m,c('React').Component);k=j&&j.prototype;function m(n){k.constructor.call(this,n);var o=[{key:c('SavedResponsesConstants').sortingKey.MOST_USED,title:i._("Frequently used")},{key:c('SavedResponsesConstants').sortingKey.LAST_USED,title:i._("Recently used")},{key:c('SavedResponsesConstants').sortingKey.LAST_CREATED,title:i._("Recently created")}];this.$SavedResponsesOrderingMenu1=o;}m.prototype.$SavedResponsesOrderingMenu2=function(){return this.$SavedResponsesOrderingMenu1.find(function(n){return n.key===this.props.activeSortingOptionKey;}.bind(this));};m.prototype.render=function(){var n=c('React').createElement(c('ReactXUIMenu'),null,this.$SavedResponsesOrderingMenu1.map(function(o){return this.$SavedResponsesOrderingMenu3(o);}.bind(this)));return (c('React').createElement('div',{className:this.props.className},c('React').createElement('span',{className:"_4mjo"},i._("Sort by")),c('React').createElement(c('PopoverMenu.react'),{alignv:'baseline',menu:n,layerBehaviors:[c('ContextualDialogArrow')]},c('React').createElement(c('XUIPopoverButton.react'),{label:this.$SavedResponsesOrderingMenu2().title}))));};m.prototype.$SavedResponsesOrderingMenu3=function(n){return (c('React').createElement(l,{onclick:function(){return this.props.onSortingKeyChanged(n.key);}.bind(this),key:n.key},n.title));};f.exports=m;},null);
__d('SavedResponsesListViewContainer.react',['cx','fbt','Layout.react','LeftFillRightFitLayout.react','React','SavedResponsesOrderingMenu.react','XUICloseButton.react','XUITextInput.react','joinClasses'],function a(b,c,d,e,f,g,h,i){'use strict';var j,k;if(c.__markCompiled)c.__markCompiled();var l=c('Layout.react').Column,m=c('Layout.react').FillColumn,n=c('React').PropTypes;j=babelHelpers.inherits(o,c('React').Component);k=j&&j.prototype;o.prototype.render=function(){var p=c('joinClasses')("_3ohy",this.props.className);return (c('React').createElement('div',{className:p},c('React').createElement(c('LeftFillRightFitLayout.react'),{className:"_1x3h"},this.$SavedResponsesListViewContainer1(),c('React').createElement(c('SavedResponsesOrderingMenu.react'),{className:"_4b4m",activeSortingOptionKey:this.props.activeSortingOptionKey,onSortingKeyChanged:this.props.onSortingKeyChanged})),this.props.children,c('React').createElement('div',{className:"_3ohz"},this.props.footerPart)));};o.prototype.$SavedResponsesListViewContainer1=function(){return (c('React').createElement(c('Layout.react'),{className:"_4b4n"},c('React').createElement(l,null,c('React').createElement('div',{className:"_1x3i"})),c('React').createElement(m,null,c('React').createElement(c('XUITextInput.react'),{onChange:this.props.onSearchQueryChanged,ref:'inputField',placeholder:i._("Search replies"),value:this.props.searchQuery})),c('React').createElement(l,null,c('React').createElement(c('XUICloseButton.react'),{size:'small',onClick:this.props.onSearchQueryCleared,className:this.props.searchQuery.length===0?"hidden_elem":''}))));};function o(){j.apply(this,arguments);}o.propTypes={footerPart:n.object.isRequired,onSearchQueryChanged:n.func.isRequired,onSearchQueryCleared:n.func.isRequired,searchQuery:n.string.isRequired};f.exports=o;},null);
__d('SavedResponsesManageListView.react',['cx','ix','fbt','React','SavedResponsesConstants','SavedResponsesFooterButton.react','SavedResponsesListView.react','SavedResponsesListViewContainer.react','SavedResponsesPanel.react','ScrollableArea.react'],function a(b,c,d,e,f,g,h,i,j){var k,l;if(c.__markCompiled)c.__markCompiled();var m=c('React').PropTypes;k=babelHelpers.inherits(n,c('React').Component);l=k&&k.prototype;function n(o,p){'use strict';l.constructor.call(this,o,p);this.state={searchQuery:"",activeSortingOptionKey:c('SavedResponsesConstants').sortingKey.LAST_CREATED};this.$SavedResponsesManageListView1=this.$SavedResponsesManageListView1.bind(this);}n.prototype.$SavedResponsesManageListView1=function(o){'use strict';this.setState({activeSortingOptionKey:o});};n.prototype.render=function(){'use strict';return (c('React').createElement(c('SavedResponsesPanel.react'),{className:"_15ht",shouldShowBackButton:false,onClose:this.props.onClose,title:j._("Saved Replies")},c('React').createElement(c('SavedResponsesListViewContainer.react'),{footerPart:this.$SavedResponsesManageListView2(),onSearchQueryChanged:function(o){return this.$SavedResponsesManageListView3(o);}.bind(this),onSearchQueryCleared:function(){return this.$SavedResponsesManageListView4();}.bind(this),searchQuery:this.state.searchQuery,activeSortingOptionKey:this.state.activeSortingOptionKey,onSortingKeyChanged:this.$SavedResponsesManageListView1},this.$SavedResponsesManageListView5())));};n.prototype.$SavedResponsesManageListView5=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:false,onResponseSelected:this.props.onResponseSelected,pageID:this.props.pageID,responses:this.props.responses,searchQuery:this.state.searchQuery,supportedMacros:this.props.supportedMacros,sortingKey:this.state.activeSortingOptionKey}),this.$SavedResponsesManageListView6())));};n.prototype.$SavedResponsesManageListView2=function(){'use strict';var o=j._("Create Reply"),p=j._("Done");return (c('React').createElement('div',{className:"_4pnp"},c('React').createElement(c('SavedResponsesFooterButton.react'),{label:o,onClick:this.props.onCreateNewReplyClicked,image:i('/images/mobile/glyph/compose_dark-grey_m.png')}),c('React').createElement(c('SavedResponsesFooterButton.react'),{label:p,onClick:this.props.onDoneClicked})));};n.prototype.$SavedResponsesManageListView6=function(){'use strict';return (c('React').createElement('div',{className:"_4pnq"},c('React').createElement('div',{className:"_50f8"+(' '+"_4pnr")},j._("End of saved replies"))));};n.prototype.$SavedResponsesManageListView3=function(o){'use strict';this.setState({searchQuery:o.target.value});};n.prototype.$SavedResponsesManageListView4=function(){'use strict';this.setState({searchQuery:""});};n.propTypes={onClose:m.func.isRequired,onCreateNewReplyClicked:m.func.isRequired,onDoneClicked:m.func.isRequired,onResponseSelected:m.func.isRequired,otherUserID:m.string.isRequired,pageID:m.string.isRequired,responses:m.array.isRequired,supportedMacros:m.object.isRequired};f.exports=n;},null);
__d('SavedResponsesManagePanel.react',['cx','React','SavedResponsesConstants','SavedResponsesEditResponseView.react','SavedResponsesManageListView.react','SavedResponsesUtils','XUISpinner.react'],function a(b,c,d,e,f,g,h){'use strict';var i,j;if(c.__markCompiled)c.__markCompiled();var k=c('React').PropTypes;i=babelHelpers.inherits(l,c('React').Component);j=i&&i.prototype;function l(m,n){j.constructor.call(this,m,n);this.state={isLoadingResponses:true,responseToEdit:null,responses:[],supportedMacros:null,viewType:this.props.initialViewType};}l.prototype.componentWillMount=function(){this.$SavedResponsesManagePanel1();};l.prototype.render=function(){if(this.state.isLoadingResponses)return (c('React').createElement('div',{className:"_15ht"},c('React').createElement('div',{className:"_15hu"},c('React').createElement(c('XUISpinner.react'),{size:'large'}))));switch(this.state.viewType){case c('SavedResponsesConstants').editPanelViewMode.LIST:return (c('React').createElement(c('SavedResponsesManageListView.react'),{onCreateNewReplyClicked:function(){return this.$SavedResponsesManagePanel2();}.bind(this),onDoneClicked:function(){return this.$SavedResponsesManagePanel3();}.bind(this),otherUserID:this.props.otherUserID,onResponseSelected:function(m,n){return (this.$SavedResponsesManagePanel4(m,n));}.bind(this),onClose:this.props.onClose,pageID:this.props.pageID,responses:this.state.responses,supportedMacros:this.state.supportedMacros}));case c('SavedResponsesConstants').editPanelViewMode.EDIT:case c('SavedResponsesConstants').editPanelViewMode.CREATE:case c('SavedResponsesConstants').editPanelViewMode.PERSONALIZE:return (c('React').createElement(c('SavedResponsesEditResponseView.react'),{initialResponse:this.state.responseToEdit,onBackButtonClicked:function(){return this.$SavedResponsesManagePanel5(false);}.bind(this),onClose:this.props.onClose,onEditDone:function(m){return this.$SavedResponsesManagePanel5(m);}.bind(this),onEnterPersonalizeView:function(){return this.$SavedResponsesManagePanel6();}.bind(this),pageID:this.props.pageID,supportedMacros:this.state.supportedMacros}));}};l.prototype.$SavedResponsesManagePanel1=function(){this.setState({isLoadingResponses:true});c('SavedResponsesUtils').fetchSavedResponses(this.props.pageID,this.props.otherUserID,function(m,n){return (this.setState({responses:m,supportedMacros:n,isLoadingResponses:false}));}.bind(this));};l.prototype.$SavedResponsesManagePanel5=function(m){if(this.props.initialViewType===c('SavedResponsesConstants').editPanelViewMode.CREATE){this.props.onClose();return;}if(m)this.$SavedResponsesManagePanel1();this.setState({responseToEdit:null,viewType:c('SavedResponsesConstants').editPanelViewMode.LIST});};l.prototype.$SavedResponsesManagePanel2=function(){this.setState({responseToEdit:null,viewType:c('SavedResponsesConstants').editPanelViewMode.CREATE});};l.prototype.$SavedResponsesManagePanel3=function(){this.props.onClose();};l.prototype.$SavedResponsesManagePanel6=function(){this.setState({viewType:c('SavedResponsesConstants').editPanelViewMode.PERSONALIZE});};l.prototype.$SavedResponsesManagePanel4=function(m){this.setState({responseToEdit:m,viewType:c('SavedResponsesConstants').editPanelViewMode.EDIT});};l.propTypes={initialViewType:k.string,onClose:k.func.isRequired,otherUserID:k.string.isRequired,pageID:k.string.isRequired};l.defaultProps={initialViewType:c('SavedResponsesConstants').editPanelViewMode.LIST};f.exports=l;},null);
__d('PagesManagerCountDownTimer.react',['cx','fbt','React'],function a(b,c,d,e,f,g,h,i){var j,k;if(c.__markCompiled)c.__markCompiled();var l=1000;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={timeRemaining:this.$PagesManagerCountDownTimer1(this.props.expireTimestamp),isCountingDown:false};}m.prototype.componentDidMount=function(){'use strict';if(!this.state.isCountingDown)this.$PagesManagerCountDownTimer2();};m.prototype.componentWillReceiveProps=function(n){'use strict';this.setState({timeRemaining:this.$PagesManagerCountDownTimer1(n.expireTimestamp)});if(!this.state.isCountingDown)this.$PagesManagerCountDownTimer2();};m.prototype.render=function(){'use strict';return (c('React').createElement('div',{className:"_3uo9"+(this.props.isHidden?' '+"hidden_elem":'')},this.$PagesManagerCountDownTimer3()));};m.prototype.$PagesManagerCountDownTimer3=function(){'use strict';var n=Math.floor(this.state.timeRemaining/1000/60),o=this.$PagesManagerCountDownTimer4(Math.floor(n/60)),p=this.$PagesManagerCountDownTimer4(n%60);if(this.props.isNewInbox)return i._("Returning in {hours}:{minutes}",[i.param('hours',o),i.param('minutes',p)]);return i._("{hours}:{minutes} left",[i.param('hours',o),i.param('minutes',p)]);};m.prototype.$PagesManagerCountDownTimer1=function(n){'use strict';return n?n-Date.now():0;};m.prototype.$PagesManagerCountDownTimer2=function(){'use strict';this.setState({isCountingDown:true});var n=function(){var o=this.$PagesManagerCountDownTimer1(this.props.expireTimestamp);if(o>0){this.setState({timeRemaining:o});this.$PagesManagerCountDownTimer2();return;}this.setState({isCountingDown:false});this.props.onTimeup();}.bind(this);setTimeout(n,l);};m.prototype.$PagesManagerCountDownTimer4=function(n){'use strict';return ("0"+n).slice(-2);};m.defaultProps={isNewInbox:false};f.exports=m;},null);
__d('PagesManagerPerfLogger',['PagesManagerPerfTypedLogger','Set'],function a(b,c,d,e,f,g){'use strict';if(c.__markCompiled)c.__markCompiled();var h=1000;function i(){this.$PagesManagerPerfLogger1=new (c('Set'))();}i.prototype.log=function(j,k){var l=k.perfID+':'+j;if(this.$PagesManagerPerfLogger1.has(l))return;this.$PagesManagerPerfLogger1.add(l);var m=Date.now()/h-k.baseTime;new (c('PagesManagerPerfTypedLogger'))().setPageID(k.pageID).setEventName(j).setEventSeriesID(k.perfID).setPerfTime(Math.round(m)).logVital();};f.exports=new i();},null);
__d('PagesManagerActionType',['ImmutableObject','keyMirrorRecursive'],function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();var h=new (c('ImmutableObject'))(c('keyMirrorRecursive')({LIST:{FETCH:'',FETCHED:'',UPDATED:'',LOAD_MORE:'',LOADING:'',PREVENT_SCROLL:'',SELECT:'',DESELECT_ALL:'',VIEW:'',INITIAL_VIEW:'',CLEAR_INITIAL_VIEW:''},NAVIGATION_UNIT:{CHANGE:'',NOTIFICATION_COUNT_CHANGE:''},FILTER_PANEL:{TOGGLE_PANEL:''},LAYOUT:{HEIGHT_CHANGE:''},SEARCH:{TOGGLE_SEARCH:'',CHANGE_SEARCH_TERM:'',IS_SEARCHING_CHANGED:'',ADD_SEARCH_CUSTOM_TAG:'',REMOVE_SEARCH_CUSTOM_TAG:'',FETCH_CUSTOM_TAG_THREAD_COUNTS:'',UPDATE_CUSTOM_TAG_THREAD_COUNTS:''}}));f.exports=h;},null);
__d('PagesManagerDispatcher',['ReactDispatcher_DEPRECATED'],function a(b,c,d,e,f,g){'use strict';if(c.__markCompiled)c.__markCompiled();f.exports=new (c('ReactDispatcher_DEPRECATED'))();},null);
__d('PagesManagerStore',['PagesManagerActionType','FluxStore','Map','PagesManagerDispatcher'],function a(b,c,d,e,f,g){var h,i;if(c.__markCompiled)c.__markCompiled();h=babelHelpers.inherits(j,c('FluxStore'));i=h&&h.prototype;function j(k){'use strict';i.constructor.call(this,c('PagesManagerDispatcher'));this.$PagesManagerStore5=null;this.$PagesManagerStore1=0;this.$PagesManagerStore2=0;this.$PagesManagerStore3=[];this.$PagesManagerStore4=new (c('Map'))();}j.prototype.__onDispatch=function(k){'use strict';switch(k.type){case c('PagesManagerActionType').LIST.VIEW:this.$PagesManagerStore5=k.listItem;this.__emitChange();break;case c('PagesManagerActionType').LIST.SELECT:this.$PagesManagerStore7(k);this.__emitChange();break;case c('PagesManagerActionType').LAYOUT.HEIGHT_CHANGE:this.$PagesManagerStore1=k.heights.navigationHeight;this.$PagesManagerStore2=k.heights.layoutHeight;this.__emitChange();break;case c('PagesManagerActionType').LIST.DESELECT_ALL:this.$PagesManagerStore7({rowsAdded:[],rowsRemoved:this.$PagesManagerStore3,selectedRows:[]});this.__emitChange();break;case c('PagesManagerActionType').LIST.INITIAL_VIEW:this.$PagesManagerStore8(k.item);break;case c('PagesManagerActionType').LIST.CLEAR_INITIAL_VIEW:this.$PagesManagerStore6=null;break;default:return;}};j.prototype.$PagesManagerStore8=function(k){'use strict';this.$PagesManagerStore6=k;this.$PagesManagerStore5=k;};j.prototype.$PagesManagerStore7=function(k){'use strict';this.$PagesManagerStore3=k.selectedRows;k.rowsAdded.forEach(function(l){this.$PagesManagerStore4.set(l,true);}.bind(this));k.rowsRemoved.forEach(function(l){this.$PagesManagerStore4.set(l,false);}.bind(this));};j.prototype.getViewingListItem=function(){'use strict';return this.$PagesManagerStore5;};j.prototype.getInitialViewingItem=function(){'use strict';return this.$PagesManagerStore6;};j.prototype.getLayoutHeight=function(){'use strict';return this.$PagesManagerStore2;};j.prototype.getNavigationHeight=function(){'use strict';return this.$PagesManagerStore1;};j.prototype.getIsRowSelected=function(k){'use strict';return this.$PagesManagerStore4.has(k)?this.$PagesManagerStore4.get(k):false;};j.prototype.getSelectedRows=function(){'use strict';return this.$PagesManagerStore3;};j.prototype.isSelectionMode=function(){'use strict';return this.$PagesManagerStore3.length!==0;};f.exports=new j(c('PagesManagerDispatcher'));},null);
__d('PagesManagerListBatchActionContainer.react',['FluxContainer','PagesManagerStore','React'],function a(b,c,d,e,f,g){var h,i;if(c.__markCompiled)c.__markCompiled();h=babelHelpers.inherits(j,c('React').Component);i=h&&h.prototype;j.getStores=function(){'use strict';return [c('PagesManagerStore')];};j.calculateState=function(k){'use strict';var l=c('PagesManagerStore').getSelectedRows(),m=l.length>0;return {showBatchAction:m,selectedRows:l};};j.prototype.render=function(){'use strict';var k=this.props,l=k.ChildClass,m=babelHelpers.objectWithoutProperties(k,['ChildClass']);return (c('React').createElement(l,babelHelpers['extends']({},m,{selectedRows:this.state.selectedRows,showBatchAction:this.state.showBatchAction})));};function j(){'use strict';h.apply(this,arguments);}f.exports=c('FluxContainer').create(j);},null);
__d('PagesManagerAction',['PagesManagerActionType','PagesManagerDispatcher'],function a(b,c,d,e,f,g){'use strict';if(c.__markCompiled)c.__markCompiled();var h={viewListItem:function(i){c('PagesManagerDispatcher').dispatch({type:c('PagesManagerActionType').LIST.VIEW,listItem:i});},setInitialViewItem:function(i){c('PagesManagerDispatcher').dispatch({type:c('PagesManagerActionType').LIST.INITIAL_VIEW,item:i});},clearInitialViewItem:function(){c('PagesManagerDispatcher').dispatch({type:c('PagesManagerActionType').LIST.CLEAR_INITIAL_VIEW});},setHeight:function(i){c('PagesManagerDispatcher').dispatch({type:c('PagesManagerActionType').LAYOUT.HEIGHT_CHANGE,heights:i});},handleSelectionChange:function(i,j,k){c('PagesManagerDispatcher').dispatch({type:c('PagesManagerActionType').LIST.SELECT,rowsAdded:i,rowsRemoved:j,selectedRows:k});},deselectAll:function(){c('PagesManagerDispatcher').dispatch({type:c('PagesManagerActionType').LIST.DESELECT_ALL});}};f.exports=h;},null);
__d('PagesManagerResizeListener',['EventEmitter'],function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();f.exports=new (c('EventEmitter'))();},null);
__d('PagesManagerListDetailLayout.react',['cx','PagesManagerAction','PagesManagerResizeListener','React','ReactDOM','ResizeListener','SubscriptionsHandler','Vector','XUICard.react','Grid.react','joinClasses'],function a(b,c,d,e,f,g,h){var i,j;if(c.__markCompiled)c.__markCompiled();var k=c('Grid.react').GridItem,l=200;i=babelHelpers.inherits(m,c('React').Component);j=i&&i.prototype;m.getTopOffsetRelativeToView=function(n){'use strict';var o=0;do{if(!isNaN(n.offsetTop))o+=n.offsetTop;}while(n=n.offsetParent);return o;};function m(n,o){'use strict';j.constructor.call(this,n,o);this.state={top:0,height:l};}m.prototype.recalculateHeight=function(){'use strict';var n=Math.max(l,c('Vector').getViewportDimensions().y-m.getTopOffsetRelativeToView(c('ReactDOM').findDOMNode(this))-2-30);this.setState({height:n});var o=c('Vector').getElementDimensions(c('ReactDOM').findDOMNode(this.refs.navigationSection)).y;c('PagesManagerAction').setHeight({layoutHeight:n,navigationHeight:o});this.setState({top:o+8});};m.prototype.componentDidMount=function(){'use strict';this.recalculateHeight();this.$PagesManagerListDetailLayout1=new (c('SubscriptionsHandler'))();this.$PagesManagerListDetailLayout1.addSubscriptions(c('ResizeListener').add(function(){return this.recalculateHeight();}.bind(this)),c('PagesManagerResizeListener').addListener('change',function(){return this.recalculateHeight();}.bind(this)));};m.prototype.componentWillUnmount=function(){'use strict';this.$PagesManagerListDetailLayout1&&this.$PagesManagerListDetailLayout1.release();};m.prototype.render=function(){'use strict';var n=this.state.height+'px',o=this.state.top+'px',p=this.props.navigationSection===null?null:c('React').createElement('div',{className:"_2-97",ref:'navigationSection'},this.props.navigationSection);return (c('React').createElement(c('XUICard.react'),{style:{height:n}},p,c('React').createElement('div',{className:"_10ua",style:{top:o}},c('React').createElement(c('Grid.react'),{alignv:'top',className:"_10ue",cols:2},c('React').createElement(k,{className:c('joinClasses')("_10uf",this.props.listClassName)},this.props.listSection),c('React').createElement(k,{className:"_10ug"},this.props.detailSection)))));};f.exports=m;},null);
__d('PagesManagerListRowContainer.react',['FluxContainer','PagesManagerStore','React'],function a(b,c,d,e,f,g){var h,i;if(c.__markCompiled)c.__markCompiled();h=babelHelpers.inherits(j,c('React').Component);i=h&&h.prototype;j.getStores=function(){'use strict';return [c('PagesManagerStore')];};j.calculateState=function(k,l){'use strict';var m=false,n=false;if(l&&l.listItem){m=c('PagesManagerStore').getIsRowSelected(l.listItem);n=c('PagesManagerStore').getViewingListItem()===l.listItem;}var o=c('PagesManagerStore').isSelectionMode();return {selected:m,isViewing:n,selectionMode:o};};j.prototype.render=function(){'use strict';var k=this.props,l=k.ChildClass,m=babelHelpers.objectWithoutProperties(k,['ChildClass']);return (c('React').createElement(l,babelHelpers['extends']({ref:'childClass',selected:this.state.selected,isViewing:this.state.isViewing,selectionMode:this.state.selectionMode},m)));};function j(){'use strict';h.apply(this,arguments);}f.exports=c('FluxContainer').create(j,{withProps:true});},null);
__d('PagesManagerListView.react',['PagesManagerListRowContainer.react','PagesManagerAction','PagesSelectableList.react','React'],function a(b,c,d,e,f,g){var h,i;if(c.__markCompiled)c.__markCompiled();h=babelHelpers.inherits(j,c('React').Component);i=h&&h.prototype;j.prototype.$PagesManagerListView1=function(k){'use strict';c('PagesManagerAction').viewListItem(k);};j.prototype.componentWillUpdate=function(k){'use strict';if(k.navigationKey!==this.props.navigationKey){c('PagesManagerAction').deselectAll();this.refs.selectableList.clearSelection();}};function j(k){'use strict';i.constructor.call(this,k);this.state={scrollableHeight:0};}j.prototype.render=function(){'use strict';var k;if(!this.props.list.length){if(!this.props.initLoading){k=this.props.emptyView;}else k=this.$PagesManagerListView2();}else k=this.$PagesManagerListView3();return (c('React').createElement(c('PagesSelectableList.react'),{actionBarRightComponent:this.props.actionBarRightContainer,deselectAllLabel:'',selectAllLabel:this.props.selectAllLabel,enableOnVisible:this.props.hasMoreItem,forceRequestMoreRows:true,height:this.props.height,loadingIndicator:this.props.loadingMoreSpinner,onSelectionChange:this.props.onSelectionChange,onRequestMoreRows:this.props.onScroll,ref:'selectableList',scrollableAreaMode:true,scrollableAreaHasShadow:false,scrollableWidth:this.props.scrollableWidth},k));};j.prototype.$PagesManagerListView3=function(){'use strict';return this.props.list.map(function(k){return (c('React').createElement(c('PagesManagerListRowContainer.react'),babelHelpers['extends']({ChildClass:this.props.listRowContainer,listItem:k,pageID:this.props.pageID,ref:this.props.getKey(k),key:this.props.getKey(k),onViewingListItem:this.$PagesManagerListView1,type:'li'},this.props.containerProps)));}.bind(this));};j.prototype.clearSelection=function(){'use strict';this.refs.selectableList.clearSelection();};j.prototype.$PagesManagerListView2=function(){'use strict';return c('React').createElement('div',{key:'loading'});};f.exports=j;},null);
__d('PagesManagerStaticStore',[],function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();var h={_pageID:'',setPageID:function(i){this._pageID=i;},getPageID:function(){return this._pageID;}};f.exports=h;},null);
__d('PagesManagerCustomTagsActionType',['PagesManagerActionType','keyMirrorRecursive'],function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();var h=c('keyMirrorRecursive')({FETCH:null,UPDATE:null,TOGGLE_TAG_MANAGEMENT_DIALOG:null,DELETE:null,EDIT_COLOR:null},'CUSTOM_TAGS_');Object.assign(h,c('PagesManagerActionType'));f.exports=h;},null);
__d('PagesManagerCustomTagsAction',['PagesManagerCustomTagsActionType','PagesManagerDispatcher'],function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();var h={fetch:function(i){c('PagesManagerDispatcher').dispatch({pageID:i,type:c('PagesManagerCustomTagsActionType').FETCH});},toggleManageTagsDialog:function(i,j){c('PagesManagerDispatcher').dispatch({type:c('PagesManagerCustomTagsActionType').TOGGLE_TAG_MANAGEMENT_DIALOG,pageID:i,show:j});},updateCustomTagsData:function(i,j){c('PagesManagerDispatcher').dispatch({type:c('PagesManagerCustomTagsActionType').UPDATE,pageID:i,customTags:j});},deleteCustomTag:function(i,j){c('PagesManagerDispatcher').dispatch({type:c('PagesManagerCustomTagsActionType').DELETE,pageID:i,tagName:j});},editCustomTagColor:function(i,j,k){c('PagesManagerDispatcher').dispatch({type:c('PagesManagerCustomTagsActionType').EDIT_COLOR,pageID:i,tagName:j,color:k});}};f.exports=h;},null);
__d("XPagesCustomTagDeleteController",["XController"],function a(b,c,d,e,f,g){c.__markCompiled&&c.__markCompiled();f.exports=c("XController").create("\/pages\/custom_tag\/delete\/",{tag_name:{type:"String",required:true}});},null);
__d("XPagesCustomTagEditColorController",["XController"],function a(b,c,d,e,f,g){c.__markCompiled&&c.__markCompiled();f.exports=c("XController").create("\/pages\/custom_tag\/edit\/color\/",{tag_name:{type:"String",required:true},color:{type:"String",required:true}});},null);
__d("XPagesCustomTagsDataController",["XController"],function a(b,c,d,e,f,g){c.__markCompiled&&c.__markCompiled();f.exports=c("XController").create("\/pages\/custom_tags\/data\/",{});},null);
__d('PagesManagerCustomTagsStore',['ActorURI','AsyncRequest','PagesManagerCustomTagsActionType','PagesManagerDispatcher','FluxStore','immutable','Map','XPagesCustomTagsDataController','XPagesCustomTagDeleteController','XPagesCustomTagEditColorController'],function a(b,c,d,e,f,g){'use strict';var h,i;if(c.__markCompiled)c.__markCompiled();h=babelHelpers.inherits(j,c('FluxStore'));i=h&&h.prototype;function j(k){i.constructor.call(this,k);this.$PagesManagerCustomTagsStore1=new (c('Map'))();this.$PagesManagerCustomTagsStore2=false;}j.prototype.hasCustomTags=function(k){return this.$PagesManagerCustomTagsStore1.has(k);};j.prototype.getCustomTags=function(k){return c('immutable').Map(this.$PagesManagerCustomTagsStore1.get(k)||new (c('Map'))());};j.prototype.hasCustomTag=function(k,l){var m=this.$PagesManagerCustomTagsStore1.get(k);return m!==undefined&&m.has(l);};j.prototype.getIsManagingTags=function(){return this.$PagesManagerCustomTagsStore2;};j.prototype.__onDispatch=function(k){switch(k.type){case c('PagesManagerCustomTagsActionType').FETCH:new (c('AsyncRequest'))().setURI(c('ActorURI').create(c('XPagesCustomTagsDataController').getURIBuilder().getURI(),k.pageID)).setHandler(function(m){this.__dispatcher.dispatch({type:c('PagesManagerCustomTagsActionType').UPDATE,pageID:k.pageID,customTags:m.payload});}.bind(this)).send();break;case c('PagesManagerCustomTagsActionType').UPDATE:var l=this.$PagesManagerCustomTagsStore1.get(k.pageID)||new (c('Map'))();k.customTags.map(function(m){l.set(m.name,m);});this.$PagesManagerCustomTagsStore1.set(k.pageID,l);this.__emitChange();break;case c('PagesManagerCustomTagsActionType').TOGGLE_TAG_MANAGEMENT_DIALOG:this.$PagesManagerCustomTagsStore2=k.show;this.__emitChange();break;case c('PagesManagerCustomTagsActionType').DELETE:new (c('AsyncRequest'))().setURI(c('ActorURI').create(c('XPagesCustomTagDeleteController').getURIBuilder().setString('tag_name',k.tagName).getURI(),k.pageID)).setHandler(function(m){var n=this.$PagesManagerCustomTagsStore1.get(k.pageID);if(n&&n.has(k.tagName)){n['delete'](k.tagName);this.$PagesManagerCustomTagsStore1.set(k.pageID,n);this.__dispatcher.dispatch({type:c('PagesManagerCustomTagsActionType').UPDATE,pageID:k.pageID,customTags:[]});}}.bind(this)).send();break;case c('PagesManagerCustomTagsActionType').EDIT_COLOR:new (c('AsyncRequest'))().setURI(c('ActorURI').create(c('XPagesCustomTagEditColorController').getURIBuilder().setString('tag_name',k.tagName).setString('color',k.color).getURI(),k.pageID)).setHandler(function(m){this.__dispatcher.dispatch({type:c('PagesManagerCustomTagsActionType').UPDATE,pageID:k.pageID,customTags:[m.payload]});}.bind(this)).send();break;default:break;}};f.exports=new j(c('PagesManagerDispatcher'));},null);
__d('PagesManagerManageCustomTagsDialog.react',['fbt','immutable','Link.react','ObjectSort','PageCustomTagColorSelector.react','PagesContextCardCustomTag.react','PagesManagerCustomTagsAction','React','XUIDialog.react','XUIDialogBody.react','XUIDialogButton.react','XUIDialogCancelButton.react','XUIDialogFooter.react','XUIDialogTitle.react','XUISortableDataTable.react','curry','nullthrows'],function a(b,c,d,e,f,g,h){'use strict';var i,j;if(c.__markCompiled)c.__markCompiled();var k=350,l=500,m=400,n='color',o='delete',p='label',q='messages';i=babelHelpers.inherits(r,c('React').Component);j=i&&i.prototype;function r(s){j.constructor.call(this,s);this.state={deleteConfirmationDialogProps:{show:false,actionTag:null}};this.$PagesManagerManageCustomTagsDialog1=this.$PagesManagerManageCustomTagsDialog1.bind(this);this.$PagesManagerManageCustomTagsDialog2=this.$PagesManagerManageCustomTagsDialog2.bind(this);this.$PagesManagerManageCustomTagsDialog3=this.$PagesManagerManageCustomTagsDialog3.bind(this);this.$PagesManagerManageCustomTagsDialog4=this.$PagesManagerManageCustomTagsDialog4.bind(this);}r.prototype.$PagesManagerManageCustomTagsDialog5=function(){return [{id:p,label:h._("Label"),sortable:true,comparator:c('ObjectSort').getStringSortFunction(p)},{id:q,label:h._("Messages"),sortable:true,comparator:c('ObjectSort').getNumericSortFunction(q)},{id:n,label:h._("Color"),sortable:true,comparator:c('ObjectSort').getStringSortFunction(n),cellRenderer:function(s){return (c('React').createElement(c('PageCustomTagColorSelector.react'),{selectedColor:s.color,onSelectColor:c('curry')(this.$PagesManagerManageCustomTagsDialog1,s.name)}));}.bind(this)},{id:o,label:h._("Delete"),sortable:false,cellRenderer:function(s){return (c('React').createElement(c('Link.react'),{onClick:c('curry')(this.$PagesManagerManageCustomTagsDialog2,s)},h._("Delete")));}.bind(this)}];};r.prototype.$PagesManagerManageCustomTagsDialog2=function(s){this.$PagesManagerManageCustomTagsDialog4(true,s);};r.prototype.$PagesManagerManageCustomTagsDialog4=function(s,t){this.setState({deleteConfirmationDialogProps:{show:s,actionTag:s?c('nullthrows')(t):null}});};r.prototype.$PagesManagerManageCustomTagsDialog3=function(){c('PagesManagerCustomTagsAction').deleteCustomTag(this.props.pageID,c('nullthrows')(this.state.deleteConfirmationDialogProps.actionTag).name);this.$PagesManagerManageCustomTagsDialog4(false);};r.prototype.$PagesManagerManageCustomTagsDialog6=function(){return (c('React').createElement(c('XUIDialog.react'),{layerHideOnBlur:false,onToggle:function(s){return !s&&this.$PagesManagerManageCustomTagsDialog4(s);}.bind(this),shown:this.state.deleteConfirmationDialogProps.show,width:k},c('React').createElement(c('XUIDialogTitle.react'),{showCloseButton:false},h._("Delete Label?")),c('React').createElement(c('XUIDialogBody.react'),null,c('React').createElement('div',null,h._("Are you sure to delete following label ?")),c('React').createElement('div',null,this.state.deleteConfirmationDialogProps.actionTag!==null?c('React').createElement(c('PagesContextCardCustomTag.react'),{canRemove:false,tagData:this.state.deleteConfirmationDialogProps.actionTag}):null)),c('React').createElement(c('XUIDialogFooter.react'),null,c('React').createElement(c('XUIDialogCancelButton.react'),null),c('React').createElement(c('XUIDialogButton.react'),{action:'confirm',label:h._("Confirm"),onClick:this.$PagesManagerManageCustomTagsDialog3,use:'confirm'}))));};r.prototype.$PagesManagerManageCustomTagsDialog1=function(s,t){c('PagesManagerCustomTagsAction').editCustomTagColor(this.props.pageID,s,t);};r.prototype.$PagesManagerManageCustomTagsDialog7=function(){return this.props.customTags.toArray().map(function(s){var t={};t[p]=s.name;t[q]=s.threadCount;t[n]=s;t[o]=s;return t;});};r.prototype.render=function(){return (c('React').createElement(c('XUIDialog.react'),{layerHideOnBlur:false,onToggle:this.props.onToggle,shown:this.props.show,width:l},c('React').createElement(c('XUIDialogTitle.react'),{showCloseButton:false},h._("Manage Labels")),c('React').createElement(c('XUIDialogBody.react'),null,c('React').createElement(c('XUISortableDataTable.react'),{outerBorder:true,columns:this.$PagesManagerManageCustomTagsDialog5(),rows:this.$PagesManagerManageCustomTagsDialog7(),bodyHeight:m}),this.$PagesManagerManageCustomTagsDialog6()),c('React').createElement(c('XUIDialogFooter.react'),null,c('React').createElement(c('XUIDialogButton.react'),{action:'cancel',label:h._("OK"),use:'confirm'}))));};f.exports=r;},null);
__d('PagesManagerDetailContainer.react',['FluxContainer','PagesManagerStore','React'],function a(b,c,d,e,f,g){var h,i;if(c.__markCompiled)c.__markCompiled();h=babelHelpers.inherits(j,c('React').Component);i=h&&h.prototype;function j(k){'use strict';i.constructor.call(this,k);this.state={height:0,viewingListItem:null};}j.getStores=function(){'use strict';return [c('PagesManagerStore')];};j.calculateState=function(k){'use strict';var l=c('PagesManagerStore').getLayoutHeight()-c('PagesManagerStore').getNavigationHeight();return {height:l,viewingListItem:c('PagesManagerStore').getViewingListItem()};};j.prototype.render=function(){'use strict';var k=this.props,l=k.ChildContainerClass,m=babelHelpers.objectWithoutProperties(k,['ChildContainerClass']);return (c('React').createElement(l,babelHelpers['extends']({height:this.state.height,viewingListItem:this.state.viewingListItem,listItemKey:this.props.getListItemKey(this.state.viewingListItem)},m)));};f.exports=c('FluxContainer').create(j);},null);
__d('PagesManagerListContainer.react',['FluxContainer','PagesManagerAction','PagesManagerStore','React'],function a(b,c,d,e,f,g){var h,i;if(c.__markCompiled)c.__markCompiled();h=babelHelpers.inherits(j,c('React').Component);i=h&&h.prototype;function j(k){'use strict';i.constructor.call(this,k);this.state={height:0};}j.getStores=function(){'use strict';return [c('PagesManagerStore')];};j.calculateState=function(k){'use strict';var l=c('PagesManagerStore').getLayoutHeight()-c('PagesManagerStore').getNavigationHeight();return {height:l};};j.prototype.render=function(){'use strict';var k=this.props,l=k.ChildContainerClass,m=babelHelpers.objectWithoutProperties(k,['ChildContainerClass']);return (c('React').createElement(l,babelHelpers['extends']({height:this.state.height,onSelectionChange:this.$PagesManagerListContainer1},m)));};j.prototype.$PagesManagerListContainer1=function(k){var l=k.rowsAdded,m=k.rowsRemoved,n=k.selectedRows;'use strict';c('PagesManagerAction').handleSelectionChange(l,m,n);};f.exports=c('FluxContainer').create(j);},null);
__d('AbstractPagesManagerListStore',['invariant','PagesManagerActionType','FluxStore','Map'],function a(b,c,d,e,f,g,h){var i,j;if(c.__markCompiled)c.__markCompiled();i=babelHelpers.inherits(k,c('FluxStore'));j=i&&i.prototype;function k(l){'use strict';j.constructor.call(this,l);this.__hasMoreItem=new (c('Map'))();this.__isLoading=false;}k.prototype.__onDispatch=function(l){'use strict';switch(l.type){case c('PagesManagerActionType').LIST.FETCH:this.__handleListFetch(l);break;case c('PagesManagerActionType').LIST.FETCHED:case c('PagesManagerActionType').LIST.UPDATED:this.__emitChange();break;case c('PagesManagerActionType').LIST.LOADING:this.__isLoading=true;this.__emitChange();break;case c('PagesManagerActionType').NAVIGATION_UNIT.CHANGE:case c('PagesManagerActionType').SEARCH.ADD_SEARCH_CUSTOM_TAG:case c('PagesManagerActionType').SEARCH.REMOVE_SEARCH_CUSTOM_TAG:this.__handleNavigationUnitChange(l);break;default:return;}};k.prototype.__handleListFetch=function(l){'use strict';h(0);};k.prototype.__handleNavigationUnitChange=function(l){'use strict';h(0);};k.prototype.hasMoreItem=function(l){'use strict';return this.__hasMoreItem.get(l);};k.prototype.getItemList=function(l,m){'use strict';h(0);};k.prototype.isLoading=function(){'use strict';return this.__isLoading;};f.exports=k;},null);
__d('PagesManagerMessagingActionType',['PagesManagerActionType','keyMirrorRecursive'],function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();var h=c('keyMirrorRecursive')({THREAD_LEVEL:{READ_STATUS:'',ARCHIVE_STATUS:'',SPAM_STATUS:'',UPDATE_THREAD:''},MESSAGE_LEVEL:{READ_RECEIPTS:''},SET_SCROLL_HEIGHT:null,AWAY_STATE:{UPDATE:null,FETCH:null,SET:null},SET_IS_CONTEXT_CARD_HIDDEN:null,MESSAGE_SEARCH:{NAME_SEARCH_UPDATE:null,SNIPPET_SEARCH_UPDATE:null,LOAD_MORE_NAME_RESULT:null,LOAD_MORE_SNIPPET_RESULT:null},HOT_LIKE:{END:null,START:null},BAN:{RESET:null,UPDATE:null}});Object.assign(h,c('PagesManagerActionType'));f.exports=h;},null);
__d('PagesManagerMessagingAwayStatusDispatcher',['ReactDispatcher_DEPRECATED'],function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();f.exports=new (c('ReactDispatcher_DEPRECATED'))();},null);
__d('PagesManagerAwayToggleAction',['PagesManagerMessagingActionType','PagesManagerMessagingAwayStatusDispatcher'],function a(b,c,d,e,f,g){'use strict';if(c.__markCompiled)c.__markCompiled();var h={fetchStatus:function(i){c('PagesManagerMessagingAwayStatusDispatcher').dispatch({pageID:i,type:c('PagesManagerMessagingActionType').AWAY_STATE.FETCH});},setToggleStatus:function(i,j){c('PagesManagerMessagingAwayStatusDispatcher').dispatch({pageID:i,toggle:j,type:c('PagesManagerMessagingActionType').AWAY_STATE.SET});}};f.exports=h;},null);
__d('PagesManagerAwayBanner.react',['cx','fbt','ix','PagesManagerAwayToggleAction','Image.react','LeftRight.react','Link.react','PagesManagerResizeListener','PagesManagerCountDownTimer.react','React','XUIText.react'],function a(b,c,d,e,f,g,h,i,j){var k,l;if(c.__markCompiled)c.__markCompiled();var m='/help/800788243369168';k=babelHelpers.inherits(n,c('React').Component);l=k&&k.prototype;n.prototype.$PagesManagerAwayBanner1=function(){'use strict';c('PagesManagerAwayToggleAction').setToggleStatus(this.props.pageID,false);};n.prototype.componentDidUpdate=function(o){'use strict';if(o.isAway!==this.props.isAway)c('PagesManagerResizeListener').emit('change');};n.prototype.renderLeftChild=function(){'use strict';var o=this.props.expirationTimestamp*1000;return (c('React').createElement('div',null,c('React').createElement(c('Image.react'),{className:"_2fei",src:j('images/pages/pages_manager/messages/clock.png')}),c('React').createElement(c('XUIText.react'),{className:"_2fek",size:'small',display:'inline'},i._("Currently Away"),c('React').createElement('div',{className:"_2fel"},c('React').createElement(c('PagesManagerCountDownTimer.react'),{expireTimestamp:o,isHidden:!this.props.isAway,isNewInbox:true,onTimeup:function(){return this.$PagesManagerAwayBanner1();}.bind(this)})))));};n.prototype.renderRightChild=function(){'use strict';return (c('React').createElement('div',null,c('React').createElement(c('Link.react'),{className:"_2fem",href:m,target:'_blank'},i._("Learn More")),c('React').createElement(c('XUIText.react'),{className:"_2fen",onClick:function(){c('PagesManagerAwayToggleAction').setToggleStatus(this.props.pageID,false);}.bind(this)},i._("Turn Off"))));};n.prototype.render=function(){'use strict';if(!this.props.isInitialized)return c('React').createElement('div',null);return (c('React').createElement(c('LeftRight.react'),{className:"_2feo"+(!this.props.isAway?' '+"hidden_elem":'')},this.renderLeftChild(),this.renderRightChild()));};function n(){'use strict';k.apply(this,arguments);}f.exports=n;},null);
__d("XPagesAwayToggleController",["XController"],function a(b,c,d,e,f,g){c.__markCompiled&&c.__markCompiled();f.exports=c("XController").create("\/pages\/manager\/messages\/awaytoggle\/",{});},null);
__d("XPagesAwayToggleStatusController",["XController"],function a(b,c,d,e,f,g){c.__markCompiled&&c.__markCompiled();f.exports=c("XController").create("\/pages\/manager\/messages\/awaytoggle\/status\/",{});},null);
__d('PagesManagerMessagingAwayStatusStore',['ActorURI','AsyncRequest','PagesManagerMessagingActionType','FluxStore','PagesManagerMessagingAwayStatusDispatcher','XPagesAwayToggleController','XPagesAwayToggleStatusController'],function a(b,c,d,e,f,g){'use strict';var h,i;if(c.__markCompiled)c.__markCompiled();h=babelHelpers.inherits(j,c('FluxStore'));i=h&&h.prototype;function j(k){i.constructor.call(this,k);this.$PagesManagerMessagingAwayStatusStore1=false;this.$PagesManagerMessagingAwayStatusStore2=false;this.$PagesManagerMessagingAwayStatusStore3=0;}j.prototype.$PagesManagerMessagingAwayStatusStore4=function(k){var l=c('XPagesAwayToggleStatusController').getURIBuilder().getURI();l=c('ActorURI').create(l,k);new (c('AsyncRequest'))().setURI(l).setHandler(function(m){this.$PagesManagerMessagingAwayStatusStore1=m.payload.isAway;this.$PagesManagerMessagingAwayStatusStore3=m.payload.expiration;this.$PagesManagerMessagingAwayStatusStore2=true;this.__dispatcher.dispatch({type:c('PagesManagerMessagingActionType').AWAY_STATE.UPDATE});}.bind(this)).send();};j.prototype.$PagesManagerMessagingAwayStatusStore5=function(k,l){var m=c('XPagesAwayToggleController').getURIBuilder().getURI();m=c('ActorURI').create(m,k);new (c('AsyncRequest'))().setURI(m).setMethod('POST').setData({is_away:l}).setHandler(function(n){this.$PagesManagerMessagingAwayStatusStore1=n.payload.isAway;this.$PagesManagerMessagingAwayStatusStore3=n.payload.expiration;this.__dispatcher.dispatch({type:c('PagesManagerMessagingActionType').AWAY_STATE.UPDATE});}.bind(this)).send();};j.prototype.__onDispatch=function(k){switch(k.type){case c('PagesManagerMessagingActionType').AWAY_STATE.SET:this.$PagesManagerMessagingAwayStatusStore5(k.pageID,k.toggle);break;case c('PagesManagerMessagingActionType').AWAY_STATE.FETCH:this.$PagesManagerMessagingAwayStatusStore4(k.pageID);break;case c('PagesManagerMessagingActionType').AWAY_STATE.UPDATE:this.__emitChange();break;default:break;}};j.prototype.isAway=function(){return this.$PagesManagerMessagingAwayStatusStore1;};j.prototype.isInitialized=function(){return this.$PagesManagerMessagingAwayStatusStore2;};j.prototype.getExpirationTimestamp=function(){return this.$PagesManagerMessagingAwayStatusStore3;};f.exports=new j(c('PagesManagerMessagingAwayStatusDispatcher'));},null);
__d('PagesManagerAwayContainer.react',['PagesManagerMessagingAwayStatusStore','PagesManagerAwayToggleAction','FluxContainer','React'],function a(b,c,d,e,f,g){var h,i;if(c.__markCompiled)c.__markCompiled();h=babelHelpers.inherits(j,c('React').Component);i=h&&h.prototype;j.getStores=function(){'use strict';return [c('PagesManagerMessagingAwayStatusStore')];};j.calculateState=function(k,l){'use strict';return {isAway:c('PagesManagerMessagingAwayStatusStore').isAway(),isInitialized:c('PagesManagerMessagingAwayStatusStore').isInitialized(),expirationTimestamp:c('PagesManagerMessagingAwayStatusStore').getExpirationTimestamp()};};j.prototype.componentWillMount=function(){'use strict';c('PagesManagerAwayToggleAction').fetchStatus(this.props.pageID);};j.prototype.render=function(){'use strict';var k=this.props,l=k.RenderClass,m=babelHelpers.objectWithoutProperties(k,['RenderClass']);return (c('React').createElement(l,babelHelpers['extends']({},m,this.state)));};function j(){'use strict';h.apply(this,arguments);}f.exports=c('FluxContainer').create(j,{withProps:true});},null);
__d('PagesManagerMessagingComposerActionTypes',['keyMirrorRecursive'],function a(b,c,d,e,f,g){'use strict';if(c.__markCompiled)c.__markCompiled();var h=c('keyMirrorRecursive')({ATTACHMENT:{ALL_COMPLETE:'attachment/attach/complete/all',ATTACH_CACHED:'attachment/attach/cached',ATTACH_COMPLETE:'attachment/attach/complete',ATTACH_START:'attachment/attach/start',CANCEL:'attachment/cancel',DETACH:'attachment/detach',DETACH_ALL:'attachment/detach/all'},MESSAGE:{CLEAR:'message/clear',SET:'message/set'},PARTICIPANT:{SET:'participant/set'},SAVED_REPLIES:{LOADING:'saved-replies/loading',SET:'saved-replies/set'},SHARE_UPLOADER:{READY:'share-uploader/ready',CLEAR:'share-uploader/clear'},UPLOADER:{READY:'uploader/ready'}});f.exports=h;},null);
__d('PagesManagerMessagingComposerDispatcher',['ReactDispatcher_DEPRECATED'],function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();f.exports=new (c('ReactDispatcher_DEPRECATED'))();},null);
__d('PagesManagerMessagingComposerActions',['PagesManagerMessagingComposerActionTypes','PagesManagerMessagingComposerDispatcher'],function a(b,c,d,e,f,g){'use strict';if(c.__markCompiled)c.__markCompiled();var h={clearMessage:function(){c('PagesManagerMessagingComposerDispatcher').dispatch({actionType:c('PagesManagerMessagingComposerActionTypes').MESSAGE.CLEAR});},clearShareLinkUploader:function(){c('PagesManagerMessagingComposerDispatcher').dispatch({actionType:c('PagesManagerMessagingComposerActionTypes').SHARE_UPLOADER.CLEAR});},completeAllAttachments:function(){c('PagesManagerMessagingComposerDispatcher').dispatch({actionType:c('PagesManagerMessagingComposerActionTypes').ATTACHMENT.ALL_COMPLETE});},completeAttachment:function(i){c('PagesManagerMessagingComposerDispatcher').dispatch({actionType:c('PagesManagerMessagingComposerActionTypes').ATTACHMENT.ATTACH_COMPLETE,attachment:i});},detachAllAttachments:function(){c('PagesManagerMessagingComposerDispatcher').dispatch({actionType:c('PagesManagerMessagingComposerActionTypes').ATTACHMENT.DETACH_ALL});},detachAttachment:function(i){c('PagesManagerMessagingComposerDispatcher').dispatch({actionType:c('PagesManagerMessagingComposerActionTypes').ATTACHMENT.DETACH,uploadID:i});},fileUploaderReady:function(i){c('PagesManagerMessagingComposerDispatcher').dispatch({actionType:c('PagesManagerMessagingComposerActionTypes').UPLOADER.READY,uploader:i});},setIsSavedRepliesLoading:function(i){c('PagesManagerMessagingComposerDispatcher').dispatch({actionType:c('PagesManagerMessagingComposerActionTypes').SAVED_REPLIES.LOADING,isLoading:i});},setMessage:function(i){c('PagesManagerMessagingComposerDispatcher').dispatch({actionType:c('PagesManagerMessagingComposerActionTypes').MESSAGE.SET,message:i});},setParticipant:function(i){c('PagesManagerMessagingComposerDispatcher').dispatch({actionType:c('PagesManagerMessagingComposerActionTypes').PARTICIPANT.SET,participant:i});},setSavedReplies:function(i,j){c('PagesManagerMessagingComposerDispatcher').dispatch({actionType:c('PagesManagerMessagingComposerActionTypes').SAVED_REPLIES.SET,replies:i,tokens:j});},setShareLinkUploader:function(i){c('PagesManagerMessagingComposerDispatcher').dispatch({actionType:c('PagesManagerMessagingComposerActionTypes').SHARE_UPLOADER.READY,uploader:i});},startAttachment:function(i){c('PagesManagerMessagingComposerDispatcher').dispatch({actionType:c('PagesManagerMessagingComposerActionTypes').ATTACHMENT.ATTACH_START,files:i});}};f.exports=h;},null);
__d('PagesManagerMessagingComposerStore',['PagesManagerMessagingComposerActionTypes','FluxStore','Map','MercuryConfig','PagesManagerMessagingComposerDispatcher','PagesMessagingConfig','URI'],function a(b,c,d,e,f,g){'use strict';var h,i;if(c.__markCompiled)c.__markCompiled();h=babelHelpers.inherits(j,c('FluxStore'));i=h&&h.prototype;function j(k){i.constructor.call(this,k);this.$PagesManagerMessagingComposerStore1=new (c('Map'))();this.$PagesManagerMessagingComposerStore2=null;this.$PagesManagerMessagingComposerStore3=false;this.$PagesManagerMessagingComposerStore4='';this.$PagesManagerMessagingComposerStore5=null;this.$PagesManagerMessagingComposerStore6={replies:[],tokens:{}};this.$PagesManagerMessagingComposerStore7=null;}j.prototype.getAllAttachmentsMeta=function(){var k=this.$PagesManagerMessagingComposerStore8(),l=[];for(var m=this.$PagesManagerMessagingComposerStore1.values(),n=Array.isArray(m),o=0,m=n?m:m[typeof Symbol==='function'?Symbol.iterator:'@@iterator']();;){var p;if(n){if(o>=m.length)break;p=m[o++];}else{o=m.next();if(o.done)break;p=o.value;}var q=p;if(q.id&&k.indexOf(q.id)!==-1||q.isUploading)l.push(q);}return l;};j.prototype.getAttachedAttachmentIds=function(){if(this.$PagesManagerMessagingComposerStore2)return this.$PagesManagerMessagingComposerStore2.getAttachments();return [];};j.prototype.getAttachedImageIds=function(){if(this.$PagesManagerMessagingComposerStore2)return this.$PagesManagerMessagingComposerStore2.getImageFiles();return [];};j.prototype.getAttachedAnimatedImageIds=function(){if(this.$PagesManagerMessagingComposerStore2)return this.$PagesManagerMessagingComposerStore2.getAnimatedImageFiles();return [];};j.prototype.getAttachedVideoIds=function(){if(this.$PagesManagerMessagingComposerStore2)return this.$PagesManagerMessagingComposerStore2.getVideoFiles();return [];};j.prototype.getAttachedAudioFilesIds=function(){if(this.$PagesManagerMessagingComposerStore2)return this.$PagesManagerMessagingComposerStore2.getAudioFiles();return [];};j.prototype.getAttachedFilesIds=function(){if(this.$PagesManagerMessagingComposerStore2)return this.$PagesManagerMessagingComposerStore2.getFiles();return [];};j.prototype.getFileUploader=function(){return this.$PagesManagerMessagingComposerStore2;};j.prototype.getIsAttachmentUploading=function(){if(this.$PagesManagerMessagingComposerStore2)return this.$PagesManagerMessagingComposerStore2.isUploading();return false;};j.prototype.getIsSavedRepliesLoading=function(){return this.$PagesManagerMessagingComposerStore3;};j.prototype.getMessage=function(){return this.$PagesManagerMessagingComposerStore4;};j.prototype.getQuickReplyMode=function(){return c('PagesMessagingConfig').sendOnEnter;};j.prototype.getParticipant=function(){return this.$PagesManagerMessagingComposerStore5;};j.prototype.getSavedReplies=function(){return this.$PagesManagerMessagingComposerStore6;};j.prototype.getShareLink=function(){if(this.$PagesManagerMessagingComposerStore7)return this.$PagesManagerMessagingComposerStore7.getAttachData();};j.prototype.getUploadActionFromUserID=function(k){if(!k)return null;return new (c('URI'))(c('MercuryConfig').upload_url).addQueryData('request_user_id',k).toString();};j.prototype.$PagesManagerMessagingComposerStore9=function(k,l){this.$PagesManagerMessagingComposerStore1.set(l.upload_id,{id:'',isUploading:true,name:l.metadata.filename,type:l.metadata.filetype,uploadID:l.upload_id});};j.prototype.$PagesManagerMessagingComposerStore10=function(k){k.map(function(l){this.$PagesManagerMessagingComposerStore1.set(l.upload_id,{id:'',isUploading:true,name:l.metadata.name,type:l.metadata.type,uploadID:l.upload_id});}.bind(this));};j.prototype.$PagesManagerMessagingComposerStore11=function(){this.$PagesManagerMessagingComposerStore4='';};j.prototype.$PagesManagerMessagingComposerStore12=function(k){if(this.$PagesManagerMessagingComposerStore1.has(k))this.$PagesManagerMessagingComposerStore1['delete'](k);};j.prototype.$PagesManagerMessagingComposerStore13=function(){if(this.$PagesManagerMessagingComposerStore7)this.$PagesManagerMessagingComposerStore7.clear();};j.prototype.$PagesManagerMessagingComposerStore14=function(k){var l;if(this.$PagesManagerMessagingComposerStore1.has(k.upload_id)){l=this.$PagesManagerMessagingComposerStore1.get(k.upload_id);l.id=this.$PagesManagerMessagingComposerStore15(k);l.isUploading=false;this.$PagesManagerMessagingComposerStore1.set(k.upload_id,l);}};j.prototype.$PagesManagerMessagingComposerStore8=function(){if(!this.$PagesManagerMessagingComposerStore2)return [];var k=this.$PagesManagerMessagingComposerStore2;return [].concat(k.getAttachments(),k.getImageFiles(),k.getAnimatedImageFiles(),k.getVideoFiles(),k.getAudioFiles(),k.getFiles());};j.prototype.$PagesManagerMessagingComposerStore15=function(k){return k.metadata.image_id||k.metadata.gif_id||k.metadata.video_id||k.metadata.audio_id||k.metadata.file_id;};j.prototype.__onDispatch=function(k){switch(k.actionType){case c('PagesManagerMessagingComposerActionTypes').ATTACHMENT.ALL_COMPLETE:this.$PagesManagerMessagingComposerStore16();this.__emitChange();break;case c('PagesManagerMessagingComposerActionTypes').ATTACHMENT.ATTACH_COMPLETE:this.$PagesManagerMessagingComposerStore14(k.attachment);this.__emitChange();break;case c('PagesManagerMessagingComposerActionTypes').ATTACHMENT.ATTACH_START:this.$PagesManagerMessagingComposerStore10(k.files);this.__emitChange();break;case c('PagesManagerMessagingComposerActionTypes').ATTACHMENT.DETACH:this.$PagesManagerMessagingComposerStore17(k.uploadID);this.__emitChange();break;case c('PagesManagerMessagingComposerActionTypes').ATTACHMENT.DETACH_ALL:this.$PagesManagerMessagingComposerStore18();this.__emitChange();break;case c('PagesManagerMessagingComposerActionTypes').MESSAGE.CLEAR:this.$PagesManagerMessagingComposerStore11();break;case c('PagesManagerMessagingComposerActionTypes').MESSAGE.SET:this.$PagesManagerMessagingComposerStore19(k.message);this.__emitChange();break;case c('PagesManagerMessagingComposerActionTypes').PARTICIPANT.SET:this.$PagesManagerMessagingComposerStore20(k.participant);this.__emitChange();break;case c('PagesManagerMessagingComposerActionTypes').SAVED_REPLIES.LOADING:this.$PagesManagerMessagingComposerStore21(k.isLoading);this.__emitChange();break;case c('PagesManagerMessagingComposerActionTypes').SAVED_REPLIES.SET:this.$PagesManagerMessagingComposerStore22(k.replies,k.tokens);this.__emitChange();break;case c('PagesManagerMessagingComposerActionTypes').SHARE_UPLOADER.READY:this.$PagesManagerMessagingComposerStore23(k.uploader);break;case c('PagesManagerMessagingComposerActionTypes').SHARE_UPLOADER.CLEAR:this.$PagesManagerMessagingComposerStore13();break;case c('PagesManagerMessagingComposerActionTypes').UPLOADER.READY:this.$PagesManagerMessagingComposerStore24(k.uploader);this.$PagesManagerMessagingComposerStore25();break;}};j.prototype.$PagesManagerMessagingComposerStore18=function(){if(this.$PagesManagerMessagingComposerStore2){this.$PagesManagerMessagingComposerStore2.removeAttachments();this.$PagesManagerMessagingComposerStore1.clear();}};j.prototype.$PagesManagerMessagingComposerStore17=function(k){if(this.$PagesManagerMessagingComposerStore2){this.$PagesManagerMessagingComposerStore2.removeOneAttachment(k);this.$PagesManagerMessagingComposerStore12(k);}};j.prototype.$PagesManagerMessagingComposerStore16=function(){this.$PagesManagerMessagingComposerStore1.forEach(function(k,l){if(k.isUploading)this.$PagesManagerMessagingComposerStore1['delete'](k.uploadID);}.bind(this));};j.prototype.$PagesManagerMessagingComposerStore24=function(k){this.$PagesManagerMessagingComposerStore2=k;};j.prototype.$PagesManagerMessagingComposerStore21=function(k){this.$PagesManagerMessagingComposerStore3=k;};j.prototype.$PagesManagerMessagingComposerStore19=function(k){this.$PagesManagerMessagingComposerStore4=k;};j.prototype.$PagesManagerMessagingComposerStore20=function(k){this.$PagesManagerMessagingComposerStore5=k;};j.prototype.$PagesManagerMessagingComposerStore22=function(k,l){this.$PagesManagerMessagingComposerStore6={replies:k,tokens:l};};j.prototype.$PagesManagerMessagingComposerStore23=function(k){this.$PagesManagerMessagingComposerStore7=k;};j.prototype.$PagesManagerMessagingComposerStore25=function(){var k=this.$PagesManagerMessagingComposerStore2;if(k)k.subscribe('cached-file-added',this.$PagesManagerMessagingComposerStore9.bind(this));};f.exports=new j(c('PagesManagerMessagingComposerDispatcher'));},null);
__d('PagesManagerMessagingComposerAttachmentListItem.react',['cx','ix','Image.react','React','XUICloseButton.react','XUISpinner.react'],function a(b,c,d,e,f,g,h,i){'use strict';var j,k;if(c.__markCompiled)c.__markCompiled();var l=c('React').PropTypes;j=babelHelpers.inherits(m,c('React').Component);k=j&&j.prototype;function m(n){k.constructor.call(this,n);this.$PagesManagerMessagingComposerAttachmentListItem1=function(){return this.props.onDetach(this.props.uploadID);}.bind(this);}m.prototype.$PagesManagerMessagingComposerAttachmentListItem2=function(){if(this.props.type.startsWith('image')){return i('/images/pages/pages_manager/messages/photo-attachment.png');}else if(this.props.type.startsWith('video')){return i('/images/pages/pages_manager/messages/video-attachment.png');}else if(this.props.type.startsWith('audio')){return i('/images/pages/pages_manager/messages/audio-attachment.png');}else if(this.props.type.startsWith('text'))return i('/images/pages/pages_manager/messages/text-attachment.png');return i('/images/pages/pages_manager/messages/general-attachment.png');};m.prototype.$PagesManagerMessagingComposerAttachmentListItem3=function(){return (c('React').createElement(c('XUICloseButton.react'),{className:"_2uia",onClick:this.$PagesManagerMessagingComposerAttachmentListItem1}));};m.prototype.$PagesManagerMessagingComposerAttachmentListItem4=function(){return (c('React').createElement('span',{className:"_2uib"},this.props.isUploading?c('React').createElement(c('XUISpinner.react'),{size:'large'}):c('React').createElement(c('Image.react'),{src:this.$PagesManagerMessagingComposerAttachmentListItem2(),alt:this.props.type})));};m.prototype.$PagesManagerMessagingComposerAttachmentListItem5=function(){return (c('React').createElement('span',{className:"_2uic"},this.props.name));};m.prototype.render=function(){return (c('React').createElement('li',{className:"clearfix _2uid"},c('React').createElement('span',{className:"_kqe _kqf"},this.$PagesManagerMessagingComposerAttachmentListItem4()),c('React').createElement('span',{className:"_kqe _kqh"},this.$PagesManagerMessagingComposerAttachmentListItem5()),c('React').createElement('span',{className:"_kqe _kqi"},this.$PagesManagerMessagingComposerAttachmentListItem3())));};m.propTypes={attachmentID:l.string,isUploading:l.bool,key:l.string,name:l.string,onDetach:l.func,type:l.string,uploadID:l.string};f.exports=m;},null);
__d('PagesManagerMessagingComposerAttachmentList.react',['cx','PagesManagerMessagingComposerAttachmentListItem.react','React'],function a(b,c,d,e,f,g,h){'use strict';var i,j;if(c.__markCompiled)c.__markCompiled();var k=c('React').PropTypes;i=babelHelpers.inherits(l,c('React').Component);j=i&&i.prototype;function l(m){j.constructor.call(this,m);}l.prototype.$PagesManagerMessagingComposerAttachmentList1=function(m){return (c('React').createElement(c('PagesManagerMessagingComposerAttachmentListItem.react'),{isUploading:m.isUploading,key:m.uploadID,name:m.name,onDetach:this.props.onDetach,type:m.type,uploadID:m.uploadID}));};l.prototype.render=function(){if(this.props.attachments.length>0)return (c('React').createElement('ul',{className:"_27ru"},this.props.attachments.map(this.$PagesManagerMessagingComposerAttachmentList1,this)));return null;};l.propTypes={attachments:k.array.isRequired,onDetach:k.func.isRequired};l.defaultProps={attachments:[]};f.exports=l;},null);
__d("XPagesSavedResponsesImageDuplicationController",["XController"],function a(b,c,d,e,f,g){c.__markCompiled&&c.__markCompiled();f.exports=c("XController").create("\/pages\/saved_responses\/image\/duplication\/",{});},null);
__d('PagesManagerMessagingSavedRepliesListItem.react',['cx','ActorURI','AsyncRequest','LeftRight.react','React','SavedResponsesImage.react','SavedResponsesTokensUtils','SavedResponsesUtils','XPagesSavedResponsesImageDuplicationController','joinClasses'],function a(b,c,d,e,f,g,h){'use strict';var i,j;if(c.__markCompiled)c.__markCompiled();var k=c('React').PropTypes,l=53,m=53;i=babelHelpers.inherits(n,c('React').Component);j=i&&i.prototype;function n(o){j.constructor.call(this,o);this.state={isHovering:false};}n.prototype.$PagesManagerMessagingSavedRepliesListItem1=function(){if(this.props.reply.image){var o=this.props.reply.image.id;return (c('React').createElement(c('SavedResponsesImage.react'),{className:"_3-9b _wba",displayClassName:"_wba",height:l,imageID:o,loadingClassName:"_wba",pageID:this.props.pageID,shouldShowCloseButton:false,width:m}));}};n.prototype.$PagesManagerMessagingSavedRepliesListItem2=function(){if(this.props.reply.title)return (c('React').createElement('h4',{className:"_wbb"},this.props.reply.title));};n.prototype.$PagesManagerMessagingSavedRepliesListItem3=function(){var o=c('SavedResponsesTokensUtils').prepareforSend(this.props.reply.message,this.props.tokens),p=null,q,r;if(!this.props.reply.image){this.props.onClick(this.props.reply,o,p);return;}p=this.props.reply.image.id;q=c('XPagesSavedResponsesImageDuplicationController').getURIBuilder().getURI();r=c('ActorURI').create(q,this.props.pageID);new (c('AsyncRequest'))().setURI(r).setMethod('POST').setData({image_id:p}).setHandler(function(s){var t=c('SavedResponsesUtils').generateImageMetadata(''+s.payload.duplicatedImageID);this.props.onClick(this.props.reply,o,t);}.bind(this)).send();};n.prototype.$PagesManagerMessagingSavedRepliesListItem4=function(){var o=c('SavedResponsesTokensUtils').prepareforSend(this.props.reply.message,this.props.tokens);this.props.onMouseEnter(o);};n.prototype.$PagesManagerMessagingSavedRepliesListItem5=function(o){var p=0,q=0,r=/\{{(.*?)\}}/g,s=r.exec(o),t=0,u=[];while(s!=null){q=s.index;u.push(c('React').createElement('span',{key:'token:'+t},o.substring(p,q)));p=q+s[0].length;t+=1;var v=s[1] in this.props.tokens?this.props.tokens[s[1]].value:s[1];u.push(c('React').createElement('span',{className:"_3p6b",key:'token:'+t},v));s=r.exec(o);t+=1;}u.push(c('React').createElement('span',{key:'token:'+t},o.substring(p,o.length)));t+=1;return u;};n.prototype.render=function(){return (c('React').createElement('li',{className:c('joinClasses')("_2ph_ _1_2c",this.props.className),onClick:function(){return this.$PagesManagerMessagingSavedRepliesListItem3();}.bind(this),onMouseEnter:function(){return this.$PagesManagerMessagingSavedRepliesListItem4();}.bind(this),onMouseLeave:function(){return this.props.onMouseLeave();}.bind(this),ref:'replyItem'},c('React').createElement(c('LeftRight.react'),{direction:'right'},c('React').createElement('div',null,this.$PagesManagerMessagingSavedRepliesListItem2(),this.$PagesManagerMessagingSavedRepliesListItem5(this.props.reply.message)),this.$PagesManagerMessagingSavedRepliesListItem1())));};n.propTypes={className:k.string,onClick:k.func.isRequired,onMouseEnter:k.func.isRequired,onMouseLeave:k.func.isRequired,pageID:k.string.isRequired,reply:k.object.isRequired,tokens:k.object.isRequired};f.exports=n;},null);
__d('PagesManagerMessagingSavedRepliesList.react',['cx','fbt','Link.react','React','PagesManagerMessagingSavedRepliesListItem.react','ScrollableArea.react','XUISpinner.react','SavedResponsesUtils'],function a(b,c,d,e,f,g,h,i){'use strict';var j,k;if(c.__markCompiled)c.__markCompiled();var l=c('React').PropTypes;j=babelHelpers.inherits(m,c('React').Component);k=j&&j.prototype;m.prototype.$PagesManagerMessagingSavedRepliesList1=function(n){var o=this.props.filter.toLowerCase();return (n.message.toLowerCase().indexOf(o)!==-1||(n.title||'').toLowerCase().indexOf(o)!==-1);};m.prototype.render=function(){return (c('React').createElement('div',{className:"_1_25"+(this.props.isLoading?' '+"_1_26":'')+(!this.props.isLoading&&this.props.replies.length===0?' '+"_1_27":'')},this.props.isLoading?this.$PagesManagerMessagingSavedRepliesList2():null,this.$PagesManagerMessagingSavedRepliesList3()));};m.prototype.$PagesManagerMessagingSavedRepliesList4=function(){return (c('React').createElement(c('Link.react'),{onClick:function(){return this.props.onCreateNewReply();}.bind(this),className:"_1_2a"},i._("Create new reply")));};m.prototype.$PagesManagerMessagingSavedRepliesList5=function(){return (c('React').createElement('div',{className:"_2ph_ _1_28"},c('React').createElement('p',null,this.$PagesManagerMessagingSavedRepliesList6()),c('React').createElement('p',null,this.$PagesManagerMessagingSavedRepliesList4())));};m.prototype.$PagesManagerMessagingSavedRepliesList2=function(){return (c('React').createElement('div',null,c('React').createElement('div',{className:"_2ph_ _1_29"},c('React').createElement(c('XUISpinner.react'),{size:'large'}))));};m.prototype.$PagesManagerMessagingSavedRepliesList6=function(){return i._("End of saved replies");};m.prototype.$PagesManagerMessagingSavedRepliesList3=function(){var n=c('SavedResponsesUtils').sortSavedResponses(this.props.replies,this.props.sortingKey);return (c('React').createElement(c('ScrollableArea.react'),{fade:true,shadow:false,height:300},c('React').createElement('ul',{className:"_1_2b"},n.map(this.$PagesManagerMessagingSavedRepliesList7,this),c('React').createElement('li',{className:"_2ph_ _1_2c"},this.$PagesManagerMessagingSavedRepliesList5()))));};m.prototype.$PagesManagerMessagingSavedRepliesList7=function(n,o){return (c('React').createElement(c('PagesManagerMessagingSavedRepliesListItem.react'),{className:!this.$PagesManagerMessagingSavedRepliesList1(n)?"hidden_elem":'',key:o,onClick:this.props.onReplySelected,onMouseEnter:this.props.onReplyMouseEnter,onMouseLeave:this.props.onReplyMouseLeave,pageID:this.props.pageID,reply:n,tokens:this.props.tokens}));};function m(){j.apply(this,arguments);}m.defaultProps={filter:''};m.propTypes={filter:l.string,isLoading:l.bool.isRequired,onCreateNewReply:l.func.isRequired,onReplyMouseEnter:l.func.isRequired,onReplyMouseLeave:l.func.isRequired,onReplySelected:l.func.isRequired,pageID:l.string.isRequired,replies:l.array.isRequired,tokens:l.object.isRequired};f.exports=m;},null);
__d('PagesManagerMessagingSavedRepliesFlyout.react',['cx','fbt','ix','Layout.react','Image.react','LeftFillRightFitLayout.react','LeftRight.react','Link.react','PagesManagerMessagingSavedRepliesList.react','React','SavedResponsesConstants','SavedResponsesOrderingMenu.react','XUICloseButton.react','XUITextInput.react'],function a(b,c,d,e,f,g,h,i,j){'use strict';var k,l;if(c.__markCompiled)c.__markCompiled();var m=c('Layout.react').Column,n=c('Layout.react').FillColumn,o=c('React').PropTypes;k=babelHelpers.inherits(p,c('React').Component);l=k&&k.prototype;function p(q){l.constructor.call(this,q);this.state={searchQuery:'',activeSortingOptionKey:c('SavedResponsesConstants').sortingKey.MOST_USED};this.$PagesManagerMessagingSavedRepliesFlyout1=this.$PagesManagerMessagingSavedRepliesFlyout1.bind(this);}p.prototype.$PagesManagerMessagingSavedRepliesFlyout1=function(q){this.setState({activeSortingOptionKey:q});};p.prototype.$PagesManagerMessagingSavedRepliesFlyout2=function(q){var r=q.target.value;this.setState({searchQuery:r});};p.prototype.$PagesManagerMessagingSavedRepliesFlyout3=function(){this.setState({searchQuery:''});};p.prototype.render=function(){return (c('React').createElement('div',{className:"_201v"},this.$PagesManagerMessagingSavedRepliesFlyout4(),c('React').createElement(c('LeftFillRightFitLayout.react'),null,this.$PagesManagerMessagingSavedRepliesFlyout5(),c('React').createElement(c('SavedResponsesOrderingMenu.react'),{className:"_2tws",activeSortingOptionKey:this.state.activeSortingOptionKey,onSortingKeyChanged:this.$PagesManagerMessagingSavedRepliesFlyout1})),this.$PagesManagerMessagingSavedRepliesFlyout6()));};p.prototype.$PagesManagerMessagingSavedRepliesFlyout4=function(){return (c('React').createElement('div',{className:"_2ph_ _201w"},c('React').createElement(c('LeftRight.react'),null,c('React').createElement('h3',{className:"_201x"},i._("Saved Replies")),c('React').createElement(c('Link.react'),{className:'PagesManagerMessagingSavedRepliesFlyout/manageLink',onClick:this.props.onManageReplies},i._("Manage Replies")))));};p.prototype.$PagesManagerMessagingSavedRepliesFlyout6=function(){return (c('React').createElement(c('PagesManagerMessagingSavedRepliesList.react'),{filter:this.state.searchQuery,isLoading:this.props.isLoading,onCreateNewReply:this.props.onCreateNewReply,onReplyMouseEnter:this.props.onReplyMouseEnter,onReplyMouseLeave:this.props.onReplyMouseLeave,onReplySelected:this.props.onReplySelected,pageID:this.props.pageID,replies:this.props.replies,sortingKey:this.state.activeSortingOptionKey,tokens:this.props.tokens}));};p.prototype.$PagesManagerMessagingSavedRepliesFlyout5=function(){return (c('React').createElement(c('Layout.react'),{className:"_2ph_ _201y"},c('React').createElement(m,null,c('React').createElement(c('Image.react'),{className:"_201z",src:j('/images/browse/search/search-gray.png')})),c('React').createElement(n,null,c('React').createElement(c('XUITextInput.react'),{className:"_201-",onChange:this.$PagesManagerMessagingSavedRepliesFlyout2.bind(this),ref:'inputField',placeholder:i._("Search Saved Replies"),value:this.state.searchQuery})),c('React').createElement(m,null,c('React').createElement(c('XUICloseButton.react'),{size:'small',onClick:this.$PagesManagerMessagingSavedRepliesFlyout3.bind(this),className:(this.state.searchQuery.length===0?"hidden_elem":'')+(' '+"_2twt")}))));};p.propTypes={isLoading:o.bool.isRequired,onCreateNewReply:o.func.isRequired,onManageReplies:o.func.isRequired,onReplyMouseEnter:o.func.isRequired,onReplyMouseLeave:o.func.isRequired,onReplySelected:o.func.isRequired,pageID:o.string.isRequired,replies:o.array.isRequired,tokens:o.object.isRequired};f.exports=p;},null);
__d('PagesManagerMessagingSavedRepliesButton.react',['cx','fbt','ix','Image.react','Link.react','PagesEventObserver','PagesEventType','PagesManagerMessagingSavedRepliesFlyout.react','React','SavedResponsesConstants','SavedResponsesManagePanel.react','XUIContextualDialog.react','XUIDialog.react'],function a(b,c,d,e,f,g,h,i,j){'use strict';var k,l;if(c.__markCompiled)c.__markCompiled();var m=c('React').PropTypes,n=600,o=405;k=babelHelpers.inherits(p,c('React').Component);l=k&&k.prototype;function p(q){l.constructor.call(this,q);this.state={initialSavedResponsesManageViewType:c('SavedResponsesConstants').editPanelViewMode.LIST,isFlyoutShown:false,isManageDialogVisible:false};}p.prototype.$PagesManagerMessagingSavedRepliesButton1=function(){this.props.onFetchReplies();c('PagesEventObserver').notify(c('PagesEventType').SAVED_REPLIES_TOGGLE_BROWSE_VIEW,this.props.pageID,{toggle_on:!this.state.isFlyoutShown});this.setState({isFlyoutShown:!this.state.isFlyoutShown});};p.prototype.$PagesManagerMessagingSavedRepliesButton2=function(){this.props.onFetchReplies();this.setState({isManageDialogVisible:false});};p.prototype.$PagesManagerMessagingSavedRepliesButton3=function(){setTimeout(function(){c('PagesEventObserver').notify(c('PagesEventType').SAVED_REPLIES_TOGGLE_BROWSE_VIEW,this.props.pageID,{toggle_on:false});this.setState({isFlyoutShown:false});}.bind(this),0);};p.prototype.render=function(){var q=i._("Choose a Saved Reply");return (c('React').createElement('div',null,c('React').createElement(c('Link.react'),{'aria-label':this.props.showTooltip?q:null,className:"_3xmz",'data-hover':'tooltip','data-tooltip-align':'right','data-tooltip-content':this.props.showTooltip?q:null,onClick:this.$PagesManagerMessagingSavedRepliesButton1.bind(this)},c('React').createElement(c('Image.react'),{alt:'',className:"_3xm-",ref:'icon',src:j('/images/pages/pages_manager/messages/composer-saved-replies.png'),tabIndex:0})),this.$PagesManagerMessagingSavedRepliesButton4(),this.$PagesManagerMessagingSavedRepliesButton5()));};p.prototype.$PagesManagerMessagingSavedRepliesButton4=function(){if(this.state.isFlyoutShown)return (c('React').createElement(c('XUIContextualDialog.react'),{alignment:'right',className:"_3xm_",contextRef:function(){return this.refs.icon;}.bind(this),hasActionableContext:true,hideOnEscape:false,onBlur:this.$PagesManagerMessagingSavedRepliesButton3.bind(this),position:'above',ref:'flyoutDialog',shown:this.state.isFlyoutShown,width:o},c('React').createElement(c('PagesManagerMessagingSavedRepliesFlyout.react'),{isLoading:this.props.isSavedRepliesLoading,onCreateNewReply:function(){return this.setState({isManageDialogVisible:true,initialSavedResponsesManageViewType:c('SavedResponsesConstants').editPanelViewMode.CREATE});}.bind(this),onManageReplies:function(){return this.setState({isManageDialogVisible:true,initialSavedResponsesManageViewType:c('SavedResponsesConstants').editPanelViewMode.LIST});}.bind(this),onReplyMouseEnter:this.props.onReplyMouseEnter,onReplyMouseLeave:this.props.onReplyMouseLeave,onReplySelected:this.props.onReplySelected,pageID:this.props.pageID,replies:this.props.replies,tokens:this.props.tokens})));};p.prototype.$PagesManagerMessagingSavedRepliesButton5=function(){if(this.state.isManageDialogVisible)return (c('React').createElement(c('XUIDialog.react'),{layerHideOnBlur:false,ref:'managementDialog',shown:this.state.isManageDialogVisible,width:n},c('React').createElement(c('SavedResponsesManagePanel.react'),{initialViewType:this.state.initialSavedResponsesManageViewType,onClose:this.$PagesManagerMessagingSavedRepliesButton2.bind(this),otherUserID:this.props.recipientID,pageID:this.props.pageID})));};p.propTypes={isSavedRepliesLoading:m.bool.isRequired,onFetchReplies:m.func.isRequired,onReplyMouseEnter:m.func.isRequired,onReplyMouseLeave:m.func.isRequired,onReplySelected:m.func.isRequired,pageID:m.string.isRequired,recipientID:m.string.isRequired,replies:m.array.isRequired,showTooltip:m.bool,tokens:m.object.isRequired};p.defaultProps={showTooltip:true};f.exports=p;},null);
__d('PagesManagerMessagingComposerView.react',['cx','fbt','ix','PagesManagerMessagingComposerAttachmentList.react','Image.react','MercuryDragDropPrompt.react','MessengerHotLikeButton.react','PagesEventObserver','PagesEventType','PagesManagerMessagingSavedRepliesButton.react','PagesMessageSuggestedResponseHandler','PagesMessengerFileUploader.react','PagesMessengerOmnipicker.react','PagesMessengerSuggestedResponseView.react','PagesMessengerTextInput.react','React','ReactDOM','SavedResponsesUtils','UFIStickerButton.react','XUIButton.react'],function a(b,c,d,e,f,g,h,i,j){'use strict';var k,l;if(c.__markCompiled)c.__markCompiled();var m=c('React').PropTypes,n=function(){};k=babelHelpers.inherits(o,c('React').Component);l=k&&k.prototype;function o(p){l.constructor.call(this,p);this.$PagesManagerMessagingComposerView1=false;this.state={isAttachmentsButtonVisible:true,isSavedRepliesButtonVisible:true,isStickerButtonVisible:true,placeholder:''};}o.prototype.componentDidUpdate=function(p,q){if(this.props.onInitialRender&&this.props.participant&&this.refs.textInput&&!this.$PagesManagerMessagingComposerView1){this.props.onInitialRender();this.$PagesManagerMessagingComposerView1=true;}if(p&&p.message!==this.props.message)this.refs.textInput.updateHeight();};o.prototype.componentWillMount=function(){this.$PagesManagerMessagingComposerView2(this.props);};o.prototype.componentWillReceiveProps=function(p){this.$PagesManagerMessagingComposerView2(p,this.state);};o.prototype.$PagesManagerMessagingComposerView2=function(p){var q=p.attachments.length,r=p.message.length;this.setState({isSavedRepliesButtonVisible:r<1&&q<1,isStickerButtonVisible:r<1&&q<1});};o.prototype.$PagesManagerMessagingComposerView3=function(){return (this.props.canAttachFiles&&this.state.isAttachmentsButtonVisible);};o.prototype.$PagesManagerMessagingComposerView4=function(){return (this.props.canUseSavedReplies&&this.state.isSavedRepliesButtonVisible);};o.prototype.$PagesManagerMessagingComposerView5=function(){return (this.props.canUseStickers&&this.state.isStickerButtonVisible);};o.prototype.$PagesManagerMessagingComposerView6=function(p){this.props.onEmoticonSelected(p,c('ReactDOM').findDOMNode(this.refs.textInput.refs.input));};o.prototype.$PagesManagerMessagingComposerView7=function(p){p.preventDefault();this.props.onSend();};o.prototype.$PagesManagerMessagingComposerView8=function(){if(this.$PagesManagerMessagingComposerView3()){if(this.props.canUseOmnipicker)return (c('React').createElement('div',{className:"_4dvy"},c('React').createElement(c('PagesMessengerOmnipicker.react'),{onPhotosSelected:this.props.onOmnipickerPhotosSelected,uploadURI:this.props.uploaderActionURI,pageID:this.props.userID})));return (c('React').createElement('div',{className:"_4dvy"},c('React').createElement(c('PagesMessengerFileUploader.react'),{actionURI:this.props.uploaderActionURI,iconSize:'large',onFileUploaderMounted:this.props.onFileUploaderMounted,onSubmit:this.props.onFileUploaderSubmit,onUpdateAttachmentsShelf:this.props.onFileUploadUpdateUI,onUploadFinished:this.props.onFileUploadFinished,ref:'fileUploader'})));}};o.prototype.$PagesManagerMessagingComposerView9=function(){if(this.props.canAttachFiles)return (c('React').createElement(c('PagesManagerMessagingComposerAttachmentList.react'),{attachments:this.props.attachments,attachmentsUploading:this.props.attachmentsUploading,onDetach:this.props.onAttachmentDetach,ref:'attachmentList'}));};o.prototype.$PagesManagerMessagingComposerView10=function(){if(this.props.canUseHotlike&&this.props.threadID)return (c('React').createElement('span',{className:"_1z9h"},c('React').createElement(c('MessengerHotLikeButton.react'),{disabled:!this.props.threadID,sendSticker:this.props.onStickerSelected,threadID:this.props.threadID})));};o.prototype.$PagesManagerMessagingComposerView11=function(){var p=this.state.placeholder||i._("Write a reply...");return (c('React').createElement('div',{className:"_4dv-"},c('React').createElement(c('PagesMessengerTextInput.react'),{className:"_1p7p _5id1 _4dv_",onNoShiftEnter:this.props.isQuickReplyMode?function(q){return this.$PagesManagerMessagingComposerView7(q);}.bind(this):null,onFocus:this.props.onFocus,placeholder:p,onChange:this.props.onInputChange,value:this.props.message,ref:'textInput'})));};o.prototype.$PagesManagerMessagingComposerView12=function(){return (c('React').createElement('div',{className:"_6fk",ref:'linkPreview'}));};o.prototype.$PagesManagerMessagingComposerView13=function(){return (c('React').createElement('div',{className:"_4dw0"},c('React').createElement(c('Image.react'),{className:"_1cjc",src:this.props.participant.image_src})));};o.prototype.$PagesManagerMessagingComposerView14=function(){if(this.$PagesManagerMessagingComposerView4()&&this.props.recipientID)return (c('React').createElement('span',{className:"_4dw1"},c('React').createElement(c('PagesManagerMessagingSavedRepliesButton.react'),{recipientID:this.props.recipientID,isSavedRepliesLoading:this.props.isSavedRepliesLoading,onFetchReplies:this.props.onFetchReplies,onReplyMouseEnter:this.$PagesManagerMessagingComposerView15.bind(this),onReplyMouseLeave:this.$PagesManagerMessagingComposerView16.bind(this),onReplySelected:this.$PagesManagerMessagingComposerView17.bind(this),pageID:this.props.userID,replies:this.props.savedReplies.replies,showTooltip:true,tokens:this.props.savedReplies.tokens})));};o.prototype.$PagesManagerMessagingComposerView18=function(){var p=i._("Send");return (c('React').createElement('div',{className:"_4dw3"},c('React').createElement(c('XUIButton.react'),{disabled:this.props.isSendBlocked,label:p,onClick:function(q){return this.$PagesManagerMessagingComposerView7(q);}.bind(this),use:'confirm'})));};o.prototype.$PagesManagerMessagingComposerView19=function(){var p=i._("Post a sticker");if(this.$PagesManagerMessagingComposerView5())return (c('React').createElement('span',{className:"_4dw4"},c('React').createElement(c('UFIStickerButton.react'),{onStickerSelected:this.props.onStickerSelected,onEmoticonSelected:function(q){return this.$PagesManagerMessagingComposerView6(q);}.bind(this)},c('React').createElement(c('Image.react'),{alt:p,className:"_3fhi",src:j('/images/pages/pages_manager/messages/composer-stickers.png')}))));};o.prototype.$PagesManagerMessagingComposerView20=function(){return (c('React').createElement(c('PagesMessengerSuggestedResponseView.react'),{suggestedResponseHandler:this.props.suggestedResponseHandler,onAccepted:this.props.onSuggestedResponseAccept,onDeclined:this.props.onSuggestedResponseDecline}));};o.prototype.render=function(){if(!this.props.recipientID||!this.props.threadID||!this.props.participant)return c('React').createElement('div',{className:"_26ue"});return (c('React').createElement('div',{className:"__1d"},c('React').createElement(c('MercuryDragDropPrompt.react'),null),c('React').createElement('div',{className:"_4dw9"},this.$PagesManagerMessagingComposerView13(),this.$PagesManagerMessagingComposerView11(),c('React').createElement('div',{className:"_3-8o _4dwa"},this.$PagesManagerMessagingComposerView8(),this.$PagesManagerMessagingComposerView19(),this.$PagesManagerMessagingComposerView14(),this.$PagesManagerMessagingComposerView10(),this.$PagesManagerMessagingComposerView18())),c('React').createElement('div',{className:"_6fl"},this.$PagesManagerMessagingComposerView20(),this.$PagesManagerMessagingComposerView12()),this.$PagesManagerMessagingComposerView9()));};o.prototype.$PagesManagerMessagingComposerView15=function(p){this.setState({placeholder:p});};o.prototype.$PagesManagerMessagingComposerView16=function(){this.setState({placeholder:''});};o.prototype.$PagesManagerMessagingComposerView17=function(p,q,r){this.setState({placeholder:''});this.props.onReplySelected(q,r);c('PagesEventObserver').notify(c('PagesEventType').SAVED_REPLIES_APPLY_REPLY,this.props.userID);c('SavedResponsesUtils').notifySavedResponseApplied(p,this.props.userID);};o.propTypes={attachments:m.array,canAttachFiles:m.bool,canUseSavedReplies:m.bool,canUseStickers:m.bool,isQuickReplyMode:m.bool,isSavedRepliesLoading:m.bool,isSendBlocked:m.bool,message:m.string.isRequired,onAttachmentDetach:m.func,onEmoticonSelected:m.func,onFetchReplies:m.func.isRequired,onFileUploaderSubmit:m.func,onFileUploaderMounted:m.func,onFileUploadFinished:m.func,onFocus:m.func,onInitialRender:m.func,onInputChange:m.func,onSend:m.func,onStickerSelected:m.func,onSuggestedResponseAccept:m.func,onSuggestedResponseDecline:m.func,participant:m.object,recipientID:m.string,savedReplies:m.object,suggestedResponseHandler:m.instanceOf(c('PagesMessageSuggestedResponseHandler')),uploaderActionURI:m.string,userID:m.string};o.defaultProps={attachments:[],canAttachFiles:true,canUseOmnipicker:false,canUseSavedReplies:true,canUseStickers:true,isSendBlocked:false,onAttachmentDetach:n,onEmoticonSelected:n,onFileUploaderMounted:n,onFileUploaderSubmit:n,onFileUploadFinished:n,onInputChange:n,onSend:n,onStickerSelected:n,onSuggestedResponseAccept:n};f.exports=o;},null);
__d('PagesManagerMessagingMessagelistDispatcher',['ReactDispatcher_DEPRECATED'],function a(b,c,d,e,f,g){'use strict';if(c.__markCompiled)c.__markCompiled();f.exports=new (c('ReactDispatcher_DEPRECATED'))();},null);
__d('PagesManagerMessagingNUXActionTypes',['keyMirrorRecursive'],function a(b,c,d,e,f,g){'use strict';if(c.__markCompiled)c.__markCompiled();var h=c('keyMirrorRecursive')({RESET_STEP:'',SET_IS_VISIBLE:'',SET_ROOT_ELEMENT:'',SET_STEP:'',SET_SHOULD_SHOW_BANNER:'',SET_SHOULD_SHOW_CONTEXT_CARD_STEP:'',SET_DEPENDENCY_READY:{COMPOSER:'',CONTEXT_CARD:'',THREADLIST:''}});f.exports=h;},null);
__d('PagesManagerMessagingNUXDispatcher',['ReactDispatcher_DEPRECATED'],function a(b,c,d,e,f,g){'use strict';if(c.__markCompiled)c.__markCompiled();f.exports=new (c('ReactDispatcher_DEPRECATED'))();},null);
__d('PagesManagerMessagingNUXActions',['PagesManagerMessagingNUXActionTypes','PagesManagerMessagingNUXDispatcher','PagesManagerMessagingMessagelistDispatcher','PagesManagerMessagingActionType'],function a(b,c,d,e,f,g){'use strict';if(c.__markCompiled)c.__markCompiled();var h={resetStep:function(){c('PagesManagerMessagingNUXDispatcher').dispatch({actionType:c('PagesManagerMessagingNUXActionTypes').RESET_STEP});},setComposerReady:function(){c('PagesManagerMessagingNUXDispatcher').dispatch({actionType:c('PagesManagerMessagingNUXActionTypes').SET_DEPENDENCY_READY.COMPOSER});},setContextCardReady:function(){c('PagesManagerMessagingNUXDispatcher').dispatch({actionType:c('PagesManagerMessagingNUXActionTypes').SET_DEPENDENCY_READY.CONTEXT_CARD});},setThreadlistReady:function(){c('PagesManagerMessagingNUXDispatcher').dispatch({actionType:c('PagesManagerMessagingNUXActionTypes').SET_DEPENDENCY_READY.THREADLIST});},setIsVisible:function(i){c('PagesManagerMessagingNUXDispatcher').dispatch({actionType:c('PagesManagerMessagingNUXActionTypes').SET_IS_VISIBLE,isVisible:i});},setRootElement:function(i){c('PagesManagerMessagingNUXDispatcher').dispatch({actionType:c('PagesManagerMessagingNUXActionTypes').SET_ROOT_ELEMENT,rootElement:i});},setStep:function(i){c('PagesManagerMessagingNUXDispatcher').dispatch({actionType:c('PagesManagerMessagingNUXActionTypes').SET_STEP,step:i});},setShouldShowBanner:function(i){c('PagesManagerMessagingNUXDispatcher').dispatch({actionType:c('PagesManagerMessagingNUXActionTypes').SET_SHOULD_SHOW_BANNER,shouldShow:i});},setShouldShowContextCardStep:function(i){c('PagesManagerMessagingNUXDispatcher').dispatch({actionType:c('PagesManagerMessagingNUXActionTypes').SET_SHOULD_SHOW_CONTEXT_CARD_STEP,shouldShow:i});},showContextCard:function(){c('PagesManagerMessagingMessagelistDispatcher').dispatch({type:c('PagesManagerMessagingActionType').SET_IS_CONTEXT_CARD_HIDDEN,isHidden:false});}};f.exports=h;},null);
__d('PagesManagerMessagingComposerContainer.react',['DragDropTarget','EmoticonsList','EmoticonUtils','FluxContainer','MercuryIDs','MercuryMessageActions','MercuryMessageObject','MercuryParticipants','MercurySourceType','PagesEventObserver','PagesEventType','PagesManagerMessagingComposerActions','PagesManagerMessagingComposerStore','PagesManagerMessagingComposerView.react','PagesManagerMessagingNUXActions','PagesMessagingConfig','PagesMessengerShareLinkUploader','React','ReactDOM','SavedResponsesUtils','SelectionPosition','SubscriptionsHandler','emptyFunction'],function a(b,c,d,e,f,g){'use strict';var h,i;if(c.__markCompiled)c.__markCompiled();var j=c('React').PropTypes;h=babelHelpers.inherits(k,c('React').Component);i=h&&h.prototype;k.getStores=function(){return [c('PagesManagerMessagingComposerStore')];};k.calculateState=function(l,m){var n=l?l.isShareLinkUploading:false;return {attachments:c('PagesManagerMessagingComposerStore').getAllAttachmentsMeta(),isAttachmentUploading:c('PagesManagerMessagingComposerStore').getIsAttachmentUploading(),isSavedRepliesLoading:c('PagesManagerMessagingComposerStore').getIsSavedRepliesLoading(),isQuickReplyMode:c('PagesManagerMessagingComposerStore').getQuickReplyMode(),isShareLinkUploading:n,message:c('PagesManagerMessagingComposerStore').getMessage(),participant:c('PagesManagerMessagingComposerStore').getParticipant(),savedReplies:c('PagesManagerMessagingComposerStore').getSavedReplies(),uploaderActionURI:c('PagesManagerMessagingComposerStore').getUploadActionFromUserID(m.userID)};};k.prototype.$PagesManagerMessagingComposerContainer7=function(l){this.$PagesManagerMessagingComposerContainer5.addSubscriptions(l.subscribe('one-upload-completed',this.$PagesManagerMessagingComposerContainer8.bind(this)));};k.prototype.componentDidUpdate=function(l){if(this.props.recipientID&&this.props.threadID&&(!l.recipientID||!l.threadID)){c('PagesManagerMessagingNUXActions').setComposerReady();if(this.props.onInitialRender)this.props.onInitialRender();}};k.prototype.componentDidMount=function(){this.$PagesManagerMessagingComposerContainer9(this.props.userID);};k.prototype.componentWillMount=function(){this.$PagesManagerMessagingComposerContainer10(this.props);this.$PagesManagerMessagingComposerContainer5=new (c('SubscriptionsHandler'))();};k.prototype.componentWillReceiveProps=function(l){this.$PagesManagerMessagingComposerContainer10(l);if(l.threadID!==this.props.threadID){c('PagesManagerMessagingComposerActions').clearMessage();c('PagesManagerMessagingComposerActions').detachAllAttachments();}if(l.userID!==this.props.userID)this.$PagesManagerMessagingComposerContainer9(l.userID);};k.prototype.componentWillUpdate=function(l,m){if(this.props.onMessageOrAttachmentUpdate&&(m.attachments.length!==this.state.attachments.length||m.message!==this.state.message))this.props.onMessageOrAttachmentUpdate();};k.prototype.componentWillUnmount=function(){this.$PagesManagerMessagingComposerContainer5&&this.$PagesManagerMessagingComposerContainer5.release();};k.prototype.$PagesManagerMessagingComposerContainer11=function(){var l=new (c('PagesMessengerShareLinkUploader'))(c('ReactDOM').findDOMNode(this.refs.composer.refs.linkPreview),this.refs.composer.refs.textInput.refs.input,c('emptyFunction'),c('emptyFunction'));this.$PagesManagerMessagingComposerContainer5.addSubscriptions(l.subscribe('link-detected',function(){this.setState({isShareLinkUploading:true});this.props.onMessageOrAttachmentUpdate();}.bind(this)),l.subscribe('share-loaded',function(){this.setState({isShareLinkUploading:false});}.bind(this)),l.subscribe('closed',function(){this.props.onMessageOrAttachmentUpdate();}.bind(this)));if(c('PagesMessagingConfig').dragdropEnabled){this.$PagesManagerMessagingComposerContainer1=this.$PagesManagerMessagingComposerContainer1||new (c('DragDropTarget'))(c('ReactDOM').findDOMNode(this)).enable();this.$PagesManagerMessagingComposerContainer1.setOnURLDropCallback(function(m){return (l.loadShare(m));});}c('PagesManagerMessagingComposerActions').setShareLinkUploader(l);};k.prototype.$PagesManagerMessagingComposerContainer12=function(){if(this.state.isSavedRepliesLoading||!this.props.userID||!this.props.recipientID)return;c('PagesManagerMessagingComposerActions').setIsSavedRepliesLoading(true);c('SavedResponsesUtils').fetchSavedResponses(this.props.userID,this.props.recipientID,function(l,m){c('PagesManagerMessagingComposerActions').setIsSavedRepliesLoading(false);c('PagesManagerMessagingComposerActions').setSavedReplies(l,m);});};k.prototype.$PagesManagerMessagingComposerContainer10=function(l){this.$PagesManagerMessagingComposerContainer2=c('MercuryMessageObject').getForFBID(l.userID);this.$PagesManagerMessagingComposerContainer3=c('MercuryMessageActions').getForFBID(l.userID);};k.prototype.$PagesManagerMessagingComposerContainer9=function(l){var m=c('MercuryIDs').getParticipantIDFromUserID(l);c('MercuryParticipants').get(m,function(n){c('PagesManagerMessagingComposerActions').setParticipant(n);});};k.prototype.isSendBlocked=function(){if(this.state.isAttachmentUploading||this.state.isShareLinkUploading||this.state.message===''&&this.state.attachments.length<1)return true;return false;};k.prototype.$PagesManagerMessagingComposerContainer13=function(l){c('PagesManagerMessagingComposerActions').detachAttachment(l);};k.prototype.$PagesManagerMessagingComposerContainer14=function(l,m){var n=c('EmoticonsList').symbols[l];if(!n)return;this.$PagesManagerMessagingComposerContainer4=this.$PagesManagerMessagingComposerContainer4||new (c('SelectionPosition'))(m);var o=c('EmoticonUtils').insertEmoticon(n,this.state.message,this.$PagesManagerMessagingComposerContainer4.getPos());this.$PagesManagerMessagingComposerContainer4.setPos(o.start,o.end);c('PagesManagerMessagingComposerActions').setMessage(o.result);};k.prototype.$PagesManagerMessagingComposerContainer15=function(l){this.$PagesManagerMessagingComposerContainer7(l);if(c('PagesMessagingConfig').dragdropEnabled){this.$PagesManagerMessagingComposerContainer1=this.$PagesManagerMessagingComposerContainer1||new (c('DragDropTarget'))(c('ReactDOM').findDOMNode(this)).enable();this.$PagesManagerMessagingComposerContainer1.setOnFilesDropCallback(this.$PagesManagerMessagingComposerContainer16.bind(this));}c('PagesManagerMessagingComposerActions').fileUploaderReady(l);};k.prototype.$PagesManagerMessagingComposerContainer8=function(l,m){c('PagesManagerMessagingComposerActions').completeAttachment(m);};k.prototype.$PagesManagerMessagingComposerContainer17=function(l,m){c('PagesManagerMessagingComposerActions').startAttachment(m.files);c('ReactDOM').findDOMNode(this.refs.composer.refs.textInput.refs.input).focus();};k.prototype.$PagesManagerMessagingComposerContainer18=function(l){if(l==='all-uploads-completed'){c('PagesManagerMessagingComposerActions').completeAllAttachments();}else l==='upload-canceled';};k.prototype.$PagesManagerMessagingComposerContainer19=function(l){c('PagesManagerMessagingComposerActions').setMessage(l.target.value);};k.prototype.$PagesManagerMessagingComposerContainer20=function(l,m){var n=c('PagesManagerMessagingComposerStore').getFileUploader();c('PagesManagerMessagingComposerActions').detachAllAttachments();c('PagesManagerMessagingComposerActions').setMessage(l);if(m&&n)n.addCachedAttachments([m]);if(this.refs.composer&&this.refs.composer.refs.textInput)c('ReactDOM').findDOMNode(this.refs.composer.refs.textInput.refs.input).focus();};k.prototype.$PagesManagerMessagingComposerContainer21=function(l){var m=c('PagesManagerMessagingComposerStore').getFileUploader();if(m)m.addCachedAttachments(l.map(function(n){return {filename:'Photo.jpg',image_id:n.fbid,filetype:'image/jpeg'};}));};k.prototype.$PagesManagerMessagingComposerContainer22=function(){var l=this.state.message,m=c('PagesManagerMessagingComposerStore').getAttachedAttachmentIds(),n=c('PagesManagerMessagingComposerStore').getAttachedImageIds(),o=c('PagesManagerMessagingComposerStore').getAttachedAnimatedImageIds(),p=c('PagesManagerMessagingComposerStore').getAttachedVideoIds(),q=c('PagesManagerMessagingComposerStore').getAttachedAudioFilesIds(),r=c('PagesManagerMessagingComposerStore').getAttachedFilesIds(),s=c('PagesManagerMessagingComposerStore').getShareLink(),t=this.$PagesManagerMessagingComposerContainer2.constructUserGeneratedMessageObject(l,c('MercurySourceType').TITAN_WEB,this.props.threadID,null,this.props.creatorInfo);if(this.isSendBlocked()||!l&&!m.length&&!q.length&&!n.length&&!r.length&&!o.length&&!p.length&&!s)return;if(s){t.has_attachment=true;t.content_attachment=s;}if(m.length>0){t.has_attachment=true;t.raw_attachments=m;}if(n.length>0){t.image_ids=n;t.has_attachment=true;}if(o.length>0){t.gif_ids=o;t.has_attachment=true;}if(p.length>0){t.video_ids=p;t.has_attachment=true;}if(q.length>0){t.audio_ids=q;t.has_attachment=true;}if(r.length>0){t.file_ids=r;t.has_attachment;}c('PagesEventObserver').logData_DEPRECATED({page_id:this.props.user,event_name:c('PagesEventType').MESSAGES_DIALOG_SEND,thread_id:this.props.threadElementID},null);this.$PagesManagerMessagingComposerContainer3.send(t);c('PagesManagerMessagingComposerActions').detachAllAttachments();c('PagesManagerMessagingComposerActions').clearMessage();c('PagesManagerMessagingComposerActions').clearShareLinkUploader();};k.prototype.$PagesManagerMessagingComposerContainer23=function(l){var m=this.$PagesManagerMessagingComposerContainer2.constructUserGeneratedMessageObject('',c('MercurySourceType').TITAN_WEB,this.props.threadID,null,this.props.creatorInfo);m.has_attachment=true;m.sticker_id=l;this.$PagesManagerMessagingComposerContainer3.send(m);c('PagesManagerMessagingComposerActions').clearMessage();};k.prototype.$PagesManagerMessagingComposerContainer16=function(l){if(this.refs.composer&&this.refs.composer.refs.fileUploader)this.refs.composer.refs.fileUploader.addFiles(l);};k.prototype.render=function(){return (c('React').createElement(c('PagesManagerMessagingComposerView.react'),babelHelpers['extends']({},this.props,this.state,{isSendBlocked:this.isSendBlocked(),onAttachmentDetach:this.$PagesManagerMessagingComposerContainer13.bind(this),onEmoticonSelected:this.$PagesManagerMessagingComposerContainer14.bind(this),onFetchReplies:this.$PagesManagerMessagingComposerContainer12.bind(this),onFileUploaderMounted:this.$PagesManagerMessagingComposerContainer15.bind(this),onFileUploaderSubmit:this.$PagesManagerMessagingComposerContainer17.bind(this),onFileUploadFinished:this.$PagesManagerMessagingComposerContainer18.bind(this),onInitialRender:function(){return this.$PagesManagerMessagingComposerContainer11();}.bind(this),onInputChange:function(l){return this.$PagesManagerMessagingComposerContainer19(l);}.bind(this),onOmnipickerPhotosSelected:this.$PagesManagerMessagingComposerContainer21.bind(this),onReplySelected:this.$PagesManagerMessagingComposerContainer20.bind(this),onSend:function(){return this.$PagesManagerMessagingComposerContainer22();}.bind(this),onStickerSelected:this.$PagesManagerMessagingComposerContainer23.bind(this),ref:'composer'})));};function k(){h.apply(this,arguments);}k.propTypes={canUseHotlike:j.bool,creatorInfo:j.object,onInitialRender:j.func,onMessageOrAttachmentUpdate:j.func,threadElementID:j.string,threadID:j.string,userID:j.string};f.exports=c('FluxContainer').create(k,{withProps:true});},null);
__d('PagesManagerMessagingAllNavigationUnit',['fbt','PagesManagerMessagingNavigationUnitKey','PagesManagerNavigationUnit'],function a(b,c,d,e,f,g,h){'use strict';var i,j;if(c.__markCompiled)c.__markCompiled();i=babelHelpers.inherits(k,c('PagesManagerNavigationUnit'));j=i&&i.prototype;function k(){j.constructor.call(this,c('PagesManagerMessagingNavigationUnitKey').FILTERS.ALL);}k.prototype.getDisplayTitle=function(){return h._("All");};f.exports=k;},null);
__d('PagesManagerMessagingFolderNavigationUnit',['invariant','immutable','PagesManagerMessagingNavigationUnitKey','PagesManagerNavigationUnit'],function a(b,c,d,e,f,g,h){'use strict';var i,j;if(c.__markCompiled)c.__markCompiled();var k=c('immutable').List;i=babelHelpers.inherits(l,c('PagesManagerNavigationUnit'));j=i&&i.prototype;l.prototype.getSupportedFilterKeys=function(){return k([c('PagesManagerMessagingNavigationUnitKey').FILTERS.ALL]);};l.prototype.assertSupportsFilter=function(m){!(this.getSupportedFilterKeys().indexOf(m.getKey())>=0)?h(0):void 0;};function l(){i.apply(this,arguments);}f.exports=l;},null);
__d('PagesManagerMessagingArchiveNavigationUnit',['fbt','PagesManagerMessagingFolderNavigationUnit','PagesManagerMessagingNavigationUnitKey'],function a(b,c,d,e,f,g,h){'use strict';var i,j;if(c.__markCompiled)c.__markCompiled();i=babelHelpers.inherits(k,c('PagesManagerMessagingFolderNavigationUnit'));j=i&&i.prototype;function k(){j.constructor.call(this,c('PagesManagerMessagingNavigationUnitKey').FOLDERS.ARCHIVED);}k.prototype.getDisplayTitle=function(){return h._("Archived");};f.exports=k;},null);
__d('PagesManagerMessagingFlaggedNavigationUnit',['fbt','PagesManagerNavigationUnit','PagesManagerMessagingNavigationUnitKey'],function a(b,c,d,e,f,g,h){'use strict';var i,j;if(c.__markCompiled)c.__markCompiled();i=babelHelpers.inherits(k,c('PagesManagerNavigationUnit'));j=i&&i.prototype;function k(){j.constructor.call(this,c('PagesManagerMessagingNavigationUnitKey').FILTERS.FLAGGED);}k.prototype.getDisplayTitle=function(){return h._("Flagged");};f.exports=k;},null);
__d('PagesManagerMessagingUnreadCountHelper',['MercuryThreadlistConstants','MercuryUnreadState'],function a(b,c,d,e,f,g){'use strict';if(c.__markCompiled)c.__markCompiled();var h={getUnreadCount:function(i,j){var k=c('MercuryUnreadState').getForFBID(i),l=k.exceedsMaxCount(j);return l?c('MercuryThreadlistConstants').MAX_UNREAD_COUNT:k.getUnreadCount(j);}};f.exports=h;},null);
__d('PagesManagerMessagingInboxNavigationUnit',['fbt','immutable','PagesManagerMessagingFolderNavigationUnit','PagesManagerMessagingNavigationUnitKey','PagesManagerMessagingUnreadCountHelper'],function a(b,c,d,e,f,g,h){'use strict';var i,j;if(c.__markCompiled)c.__markCompiled();var k=c('immutable').List;i=babelHelpers.inherits(l,c('PagesManagerMessagingFolderNavigationUnit'));j=i&&i.prototype;function l(){j.constructor.call(this,c('PagesManagerMessagingNavigationUnitKey').FOLDERS.INBOX);}l.prototype.getDisplayTitle=function(){return h._("Inbox");};l.prototype.getSupportedFilterKeys=function(){return k([c('PagesManagerMessagingNavigationUnitKey').FILTERS.ALL,c('PagesManagerMessagingNavigationUnitKey').FILTERS.UNREAD,c('PagesManagerMessagingNavigationUnitKey').FILTERS.FLAGGED]);};l.prototype.getNotificationCount=function(m,n){return c('PagesManagerMessagingUnreadCountHelper').getUnreadCount(m,this.getKey());};f.exports=l;},null);
__d('PagesManagerMessagingLogger',['invariant','MessagingTag','PagesEventObserver','PagesEventType'],function a(b,c,d,e,f,g,h){if(c.__markCompiled)c.__markCompiled();var i='messages',j='inbox',k=':',l={logMessagesSectionViewEvent:function(m,n){var o=n||j,p=[];if(o.indexOf(':')){p=o.split(k);o=p[p.length-1];}c('PagesEventObserver').notify(c('PagesEventType').VIEW_MESSAGES,m,{section:i,subsection:o});},logPageViewFolderEvent:function(m,n,o){var event='';switch(n.getKey()){case c('MessagingTag').INBOX:event=c('PagesEventType').MESSAGES_VIEW_INBOX;break;case c('MessagingTag').ACTION_ARCHIVED:event=c('PagesEventType').MESSAGES_VIEW_ARCHIVED;break;case c('MessagingTag').SPAM:event=c('PagesEventType').MESSAGES_VIEW_SPAM;break;default:h(0);}c('PagesEventObserver').notify(event,m,{source:o});}};f.exports=l;},null);
__d('PagesManagerMessagingSpamNavigationUnit',['fbt','PagesManagerMessagingFolderNavigationUnit','PagesManagerMessagingNavigationUnitKey'],function a(b,c,d,e,f,g,h){'use strict';var i,j;if(c.__markCompiled)c.__markCompiled();i=babelHelpers.inherits(k,c('PagesManagerMessagingFolderNavigationUnit'));j=i&&i.prototype;function k(){j.constructor.call(this,c('PagesManagerMessagingNavigationUnitKey').FOLDERS.SPAM);}k.prototype.getDisplayTitle=function(){return h._("Spam");};f.exports=k;},null);
__d('PagesManagerMessagingUnreadNavigationUnit',['fbt','PagesManagerMessagingNavigationUnitKey','PagesManagerMessagingUnreadCountHelper','PagesManagerNavigationUnit'],function a(b,c,d,e,f,g,h){'use strict';var i,j;if(c.__markCompiled)c.__markCompiled();i=babelHelpers.inherits(k,c('PagesManagerNavigationUnit'));j=i&&i.prototype;function k(){j.constructor.call(this,c('PagesManagerMessagingNavigationUnitKey').FILTERS.UNREAD);}k.prototype.getDisplayTitle=function(){return h._("Unread");};k.prototype.getNotificationCount=function(l,m){if(m.activeFolder.getKey()!==c('PagesManagerMessagingNavigationUnitKey').FOLDERS.INBOX)return 0;return c('PagesManagerMessagingUnreadCountHelper').getUnreadCount(l,m.activeFolder.getKey());};f.exports=k;},null);
__d('PagesManagerMessagingFilterStore',['invariant','FluxStore','immutable','Map','MessagingTag','MessageThreadViewSource','PagesManagerActionType','PagesManagerDispatcher','PagesManagerMessagingAllNavigationUnit','PagesManagerMessagingArchiveNavigationUnit','PagesManagerMessagingFlaggedNavigationUnit','PagesManagerMessagingInboxNavigationUnit','PagesManagerMessagingLogger','PagesManagerMessagingSpamNavigationUnit','PagesManagerMessagingSearchStore','PagesManagerMessagingUnreadNavigationUnit'],function a(b,c,d,e,f,g,h){'use strict';var i,j;if(c.__markCompiled)c.__markCompiled();i=babelHelpers.inherits(k,c('FluxStore'));j=i&&i.prototype;function k(){j.constructor.call(this,c('PagesManagerDispatcher'));var l=new (c('PagesManagerMessagingInboxNavigationUnit'))(),m=new (c('PagesManagerMessagingArchiveNavigationUnit'))(),n=new (c('PagesManagerMessagingSpamNavigationUnit'))();this.$PagesManagerMessagingFilterStore2=c('immutable').List([l,m,n]);this.$PagesManagerMessagingFilterStore8=new (c('PagesManagerMessagingAllNavigationUnit'))();var o=new (c('PagesManagerMessagingUnreadNavigationUnit'))();this.$PagesManagerMessagingFilterStore1=c('immutable').List([this.$PagesManagerMessagingFilterStore8,o,new (c('PagesManagerMessagingFlaggedNavigationUnit'))()]);this.$PagesManagerMessagingFilterStore4=this.$PagesManagerMessagingFilterStore2.first();this.$PagesManagerMessagingFilterStore5=this.getFilterByKey(this.$PagesManagerMessagingFilterStore4.getSupportedFilterKeys().first());this.$PagesManagerMessagingFilterStore7=false;this.$PagesManagerMessagingFilterStore6=false;this.$PagesManagerMessagingFilterStore3=[l,o,m,n];}k.prototype.$PagesManagerMessagingFilterStore9=function(l,m){var n=l.filter(function(o){return o.getKey()===m;});!(n.size>0)?h(0):void 0;return n.first();};k.prototype.$PagesManagerMessagingFilterStore10=function(l,m){c('PagesManagerMessagingLogger').logMessagesSectionViewEvent(l,m.getKey());c('PagesManagerMessagingLogger').logPageViewFolderEvent(l,m,c('MessageThreadViewSource').NEW_MESSAGETAB);this.$PagesManagerMessagingFilterStore4=m;this.$PagesManagerMessagingFilterStore5=this.getFilterByKey(m.getSupportedFilterKeys().first());this.__emitChange();};k.prototype.$PagesManagerMessagingFilterStore11=function(l,m){if(m.getKey()===c('MessagingTag').UNREAD){this.$PagesManagerMessagingFilterStore5=m;this.$PagesManagerMessagingFilterStore4=this.$PagesManagerMessagingFilterStore2.first();}else{this.$PagesManagerMessagingFilterStore4.assertSupportsFilter(m);this.$PagesManagerMessagingFilterStore5=m;}this.__emitChange();};k.prototype.getFilterByKey=function(l){return this.$PagesManagerMessagingFilterStore9(this.$PagesManagerMessagingFilterStore1,l);};k.prototype.getAvailableFolders=function(){return this.$PagesManagerMessagingFilterStore2;};k.prototype.getAvailableFilters=function(){return c('immutable').List(this.$PagesManagerMessagingFilterStore1.filter(function(l){return this.getActiveFolder().getSupportedFilterKeys().indexOf(l.getKey())>=0;}.bind(this)));};k.prototype.getActiveFolder=function(){return this.$PagesManagerMessagingFilterStore4;};k.prototype.getActiveFilter=function(){var l=c('PagesManagerMessagingSearchStore').getCurrentSearchCustomTagNames();return this.$PagesManagerMessagingFilterStore6||l.size!==0?this.$PagesManagerMessagingFilterStore8:this.$PagesManagerMessagingFilterStore5;};k.prototype.getActiveFolderName=function(){return this.getActiveFolder().getKey();};k.prototype.getActiveFilterName=function(){return this.getActiveFilter().getKey();};k.prototype.getFolderDropDown=function(){if(this.getActiveFilterName()===c('MessagingTag').UNREAD){return this.$PagesManagerMessagingFilterStore2;}else{var l=this.$PagesManagerMessagingFilterStore3.filter(function(m){return m.getKey()!==this.$PagesManagerMessagingFilterStore4.getKey();}.bind(this));return c('immutable').List(l);}};k.prototype.getActiveFolderDropDown=function(){if(this.getActiveFilterName()===c('MessagingTag').UNREAD){return this.$PagesManagerMessagingFilterStore5;}else return this.$PagesManagerMessagingFilterStore4;};k.prototype.getUnitNotificationCountMap=function(l){var m=new (c('Map'))(),n=function(o){return m.set(o,o.getNotificationCount(l,{activeFolder:this.getActiveFolder(),activeFilter:this.getActiveFilter()}));}.bind(this);this.getAvailableFolders().map(n);this.getAvailableFilters().map(n);return m;};k.prototype.getNavigationKey=function(){return this.getActiveFolderName()+'|'+this.getActiveFilterName()+'|'+(c('PagesManagerMessagingSearchStore').getCustomTagsFilterName()||'');};k.prototype.getIsFiltering=function(){return this.$PagesManagerMessagingFilterStore7;};k.prototype.__onDispatch=function(l){switch(l.type){case c('PagesManagerActionType').NAVIGATION_UNIT.CHANGE:if(this.getAvailableFolders().indexOf(l.unit)>=0){this.$PagesManagerMessagingFilterStore10(l.pageID,l.unit);}else this.$PagesManagerMessagingFilterStore11(l.pageID,l.unit);break;case c('PagesManagerActionType').NAVIGATION_UNIT.NOTIFICATION_COUNT_CHANGE:this.__emitChange();break;case c('PagesManagerActionType').SEARCH.ADD_SEARCH_CUSTOM_TAG:case c('PagesManagerActionType').SEARCH.ROMOVE_SEARCH_CUSTOM_TAG:case c('PagesManagerActionType').SEARCH.CHANGE_SEARCH_TERM:c('PagesManagerDispatcher').waitFor([c('PagesManagerMessagingSearchStore').getDispatchToken()]);var m=c('PagesManagerMessagingSearchStore').getCurrentSearchTerm()!=='';this.$PagesManagerMessagingFilterStore7=false;if(this.$PagesManagerMessagingFilterStore6!==m){this.$PagesManagerMessagingFilterStore6=m;this.__emitChange();}break;case c('PagesManagerActionType').FILTER_PANEL.TOGGLE_PANEL:this.$PagesManagerMessagingFilterStore7=l.showPanel;this.__emitChange();}};f.exports=new k();},null);
__d('PagesMessagingSearchMode',['keyMirrorRecursive'],function a(b,c,d,e,f,g){'use strict';if(c.__markCompiled)c.__markCompiled();var h=c('keyMirrorRecursive')({ALL:'',NAME_SEARCH:'',KEYWORD_SEARCH:'',MESSAGE_SEARCH:'',NONE:''});f.exports=h;},null);
__d('PagesManagerMessagingThreadlistAction',['PagesManagerMessagingActionType','PagesManagerDispatcher','MercuryThreadlistConstants','PagesMessagingSearchMode'],function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();var h={initThreadlist:function(i){this.fetchThreadlist(i,0,c('MercuryThreadlistConstants').WEBMESSENGER_THREAD_COUNT);},fetchThreadlist:function(i,j,k){c('PagesManagerDispatcher').dispatch({offset:j,limit:k,pageID:i,type:c('PagesManagerMessagingActionType').LIST.FETCH});},updateThreadlist:function(i){c('PagesManagerDispatcher').dispatch({pageID:i,type:c('PagesManagerMessagingActionType').LIST.UPDATED});},changeSearchTerm:function(i,j,k,l){c('PagesManagerDispatcher').dispatch({type:c('PagesManagerMessagingActionType').SEARCH.CHANGE_SEARCH_TERM,searchTerm:j,pageID:i,activeFolder:k,searchMode:l});},changeIsSearchingNameStatus:function(i){c('PagesManagerDispatcher').dispatch({type:c('PagesManagerMessagingActionType').MESSAGE_SEARCH.NAME_SEARCH_UPDATE,isSearching:i});},changeIsSearchingSnippetStatus:function(i){c('PagesManagerDispatcher').dispatch({type:c('PagesManagerMessagingActionType').MESSAGE_SEARCH.SNIPPET_SEARCH_UPDATE,isSearching:i});},loadMoreNameResult:function(i,j,k){c('PagesManagerDispatcher').dispatch({type:c('PagesManagerMessagingActionType').MESSAGE_SEARCH.LOAD_MORE_NAME_RESULT,searchTerm:j,pageID:i,activeFolder:k});},loadMoreSnippetResult:function(i,j,k){c('PagesManagerDispatcher').dispatch({type:c('PagesManagerMessagingActionType').MESSAGE_SEARCH.LOAD_MORE_SNIPPET_RESULT,searchTerm:j,pageID:i,activeFolder:k});},resetSearch:function(i){h.changeSearchTerm(i,'','',c('PagesMessagingSearchMode').NONE);},addSearchCustomTag:function(i,j){c('PagesManagerDispatcher').dispatch({type:c('PagesManagerMessagingActionType').SEARCH.ADD_SEARCH_CUSTOM_TAG,pageID:i,tagName:j});},removeSearchCustomTag:function(i,j){c('PagesManagerDispatcher').dispatch({type:c('PagesManagerMessagingActionType').SEARCH.REMOVE_SEARCH_CUSTOM_TAG,pageID:i,tagName:j});},fetchCustomTagThreadCounts:function(i){c('PagesManagerDispatcher').dispatch({type:c('PagesManagerMessagingActionType').SEARCH.FETCH_CUSTOM_TAG_THREAD_COUNTS,pageID:i});},searchNameResult:function(i,j,k){c('PagesManagerDispatcher').dispatch({type:c('PagesManagerMessagingActionType').MESSAGE_SEARCH.CHANGE_NAME_SEARCH_TERM,searchTerm:j,pageID:i,activeFolder:k});},searchMessageResult:function(i,j,k){c('PagesManagerDispatcher').dispatch({type:c('PagesManagerMessagingActionType').MESSAGE_SEARCH.CHANGE_MESSAGE_SEARCH_TERM,searchTerm:j,pageID:i,activeFolder:k});}};f.exports=h;},null);
__d("XPagesCustomTagMessageThreadCountsController",["XController"],function a(b,c,d,e,f,g){c.__markCompiled&&c.__markCompiled();f.exports=c("XController").create("\/pages\/custom_tags\/message_thread_counts\/",{intersect_custom_tags:{type:"StringVector",defaultValue:[]},folder:{type:"String",defaultValue:"inbox"},key:{type:"String",required:true}});},null);
__d('PagesManagerMessagingSearchStore',['ActorURI','PagesManagerMessagingActionType','AsyncRequest','PagesManagerDispatcher','FluxStore','immutable','MercurySearchSnippetResults','MercurySearchThreadResults','MercurySearchThreadResultOrderer','MercurySearchThreadsStrategy','PagesManagerCustomTagsActionType','PagesManagerCustomTagsStore','PagesManagerMessagingFilterStore','PagesMessengerThreadUtils','PagesMessagingSearchMode','PagesManagerMessagingThreadlistAction','XPagesCustomTagMessageThreadCountsController','emptyFunction','guid','nullthrows'],function a(b,c,d,e,f,g){'use strict';var h,i;if(c.__markCompiled)c.__markCompiled();h=babelHelpers.inherits(j,c('FluxStore'));i=h&&h.prototype;function j(){i.constructor.call(this,c('PagesManagerDispatcher'));this.$PagesManagerMessagingSearchStore2='';this.$PagesManagerMessagingSearchStore3=false;this.$PagesManagerMessagingSearchStore4=false;this.$PagesManagerMessagingSearchStore5=false;this.$PagesManagerMessagingSearchStore6=false;this.$PagesManagerMessagingSearchStore7=false;this.$PagesManagerMessagingSearchStore8='';this.$PagesManagerMessagingSearchStore10=[];this.$PagesManagerMessagingSearchStore11={};this.$PagesManagerMessagingSearchStore1=[];this.$PagesManagerMessagingSearchStore9=c('PagesMessagingSearchMode').NONE;this.$PagesManagerMessagingSearchStore12={};}j.prototype.getCurrentSearchTerm=function(){return this.$PagesManagerMessagingSearchStore2;};j.prototype.getIsInSearchMode=function(){return this.$PagesManagerMessagingSearchStore5;};j.prototype.getSearchMode=function(){return this.$PagesManagerMessagingSearchStore9;};j.prototype.getThreadNameSearchResults=function(){return this.$PagesManagerMessagingSearchStore10;};j.prototype.getThreadSnippetSearchResults=function(){return this.$PagesManagerMessagingSearchStore11;};j.prototype.getIsSearchingName=function(){return this.$PagesManagerMessagingSearchStore6;};j.prototype.getIsSearchingSnippet=function(){return this.$PagesManagerMessagingSearchStore7;};j.prototype.hasMoreNameSearchResult=function(){return this.$PagesManagerMessagingSearchStore3;};j.prototype.hasMoreSnippetSearchResult=function(){return this.$PagesManagerMessagingSearchStore4;};j.prototype.getCurrentSearchCustomTagNames=function(){return c('immutable').List(this.$PagesManagerMessagingSearchStore1);};j.prototype.getCustomTagsFilterName=function(){if(this.$PagesManagerMessagingSearchStore1.length===0)return null;return c('PagesMessengerThreadUtils').getCustomTagsFilter(this.$PagesManagerMessagingSearchStore1);};j.prototype.getCurrentSearchCustomTagThreadCounts=function(){var k=this.$PagesManagerMessagingSearchStore13();if(!k||!(k in this.$PagesManagerMessagingSearchStore12))return null;return c('immutable').Map(this.$PagesManagerMessagingSearchStore12[k]);};j.prototype.$PagesManagerMessagingSearchStore14=function(k,l){return k+'|'+l;};j.prototype.$PagesManagerMessagingSearchStore13=function(){if(this.$PagesManagerMessagingSearchStore1.length==0)return null;return this.$PagesManagerMessagingSearchStore14(c('PagesManagerMessagingFilterStore').getActiveFolderName(),c('nullthrows')(this.getCustomTagsFilterName()));};j.prototype.$PagesManagerMessagingSearchStore15=function(k){var l=this.$PagesManagerMessagingSearchStore13();if(!l||l in this.$PagesManagerMessagingSearchStore12)return;new (c('AsyncRequest'))().setURI(c('ActorURI').create(c('XPagesCustomTagMessageThreadCountsController').getURIBuilder().setStringVector('intersect_custom_tags',this.$PagesManagerMessagingSearchStore1).setString('folder',c('PagesManagerMessagingFilterStore').getActiveFolderName()).setString('key',this.$PagesManagerMessagingSearchStore13()).getURI(),k)).setHandler(function(m){if(this.__dispatcher.isDispatching()){this.$PagesManagerMessagingSearchStore12[m.payload.key]=m.payload.threadCounts;if(m.payload.key===this.$PagesManagerMessagingSearchStore13())this.__emitChange();}else this.__dispatcher.dispatch({type:c('PagesManagerMessagingActionType').SEARCH.UPDATE_CUSTOM_TAG_THREAD_COUNTS,key:m.payload.key,threadCounts:m.payload.threadCounts});}.bind(this)).send();};j.prototype.__onDispatch=function(k){switch(k.type){case c('PagesManagerMessagingActionType').SEARCH.CHANGE_SEARCH_TERM:this.$PagesManagerMessagingSearchStore2=k.searchTerm;if(this.$PagesManagerMessagingSearchStore2===''){this.$PagesManagerMessagingSearchStore10=[];this.$PagesManagerMessagingSearchStore5=false;this.$PagesManagerMessagingSearchStore9=c('PagesMessagingSearchMode').NONE;}else{this.$PagesManagerMessagingSearchStore5=true;this.$PagesManagerMessagingSearchStore9=k.searchMode;this.$PagesManagerMessagingSearchStore16(k.pageID,k.searchTerm,k.activeFolder,k.searchMode);}this.__emitChange();break;case c('PagesManagerMessagingActionType').MESSAGE_SEARCH.NAME_SEARCH_UPDATE:this.$PagesManagerMessagingSearchStore6=k.isSearching;this.__emitChange();break;case c('PagesManagerMessagingActionType').MESSAGE_SEARCH.SNIPPET_SEARCH_UPDATE:this.$PagesManagerMessagingSearchStore7=k.isSearching;this.__emitChange();break;case c('PagesManagerMessagingActionType').MESSAGE_SEARCH.LOAD_MORE_NAME_RESULT:this.$PagesManagerMessagingSearchStore17(k.pageID,k.searchTerm,k.activeFolder);this.__emitChange();break;case c('PagesManagerMessagingActionType').MESSAGE_SEARCH.LOAD_MORE_SNIPPET_RESULT:this.$PagesManagerMessagingSearchStore18(k.pageID,k.searchTerm,k.activeFolder);this.__emitChange();break;case c('PagesManagerMessagingActionType').SEARCH.ADD_SEARCH_CUSTOM_TAG:c('PagesManagerDispatcher').waitFor([c('PagesManagerCustomTagsStore').getDispatchToken()]);var l=c('PagesManagerCustomTagsStore').hasCustomTag(k.pageID,k.tagName);if(l&&this.$PagesManagerMessagingSearchStore1.indexOf(k.tagName)<0){this.$PagesManagerMessagingSearchStore2='';this.$PagesManagerMessagingSearchStore5=false;this.$PagesManagerMessagingSearchStore1.push(k.tagName);this.__emitChange();}break;case c('PagesManagerMessagingActionType').SEARCH.REMOVE_SEARCH_CUSTOM_TAG:case c('PagesManagerCustomTagsActionType').DELETE:var m=this.$PagesManagerMessagingSearchStore1.indexOf(k.tagName);if(m>=0){this.$PagesManagerMessagingSearchStore1.splice(m,1);this.__emitChange();}break;case c('PagesManagerMessagingActionType').SEARCH.FETCH_CUSTOM_TAG_THREAD_COUNTS:this.$PagesManagerMessagingSearchStore15(k.pageID);break;case c('PagesManagerCustomTagsActionType').UPDATE:this.$PagesManagerMessagingSearchStore12={};this.__emitChange();break;case c('PagesManagerMessagingActionType').SEARCH.UPDATE_CUSTOM_TAG_THREAD_COUNTS:this.$PagesManagerMessagingSearchStore12[k.key]=k.threadCounts;if(k.key===this.$PagesManagerMessagingSearchStore13())this.__emitChange();break;}};j.prototype.$PagesManagerMessagingSearchStore16=function(k,l,m,n){var o=c('guid')();this.$PagesManagerMessagingSearchStore8=o;var p=c('MercurySearchThreadsStrategy').getForFBID(k),q=c('MercurySearchSnippetResults').getForFBID(k),r=c('MercurySearchThreadResultOrderer').getForFBID(k);if(n===c('PagesMessagingSearchMode').ALL||n===c('PagesMessagingSearchMode').NAME_SEARCH){this.$PagesManagerMessagingSearchStore6=true;p.search(l,function(s){this.$PagesManagerMessagingSearchStore10=r.filterThreadsInFolder(s,m);this.__emitChange();}.bind(this),function(s,t){if(o!==this.$PagesManagerMessagingSearchStore8)return;var u=r.filterThreadsInFolder(s,m);this.$PagesManagerMessagingSearchStore10=r.orderResults(this.$PagesManagerMessagingSearchStore10,[],u,m);this.$PagesManagerMessagingSearchStore3=!t;if(this.__dispatcher.isDispatching()){this.$PagesManagerMessagingSearchStore6=false;this.__emitChange();}else c('PagesManagerMessagingThreadlistAction').changeIsSearchingNameStatus(false);}.bind(this),c('emptyFunction'));}if(n===c('PagesMessagingSearchMode').ALL||n===c('PagesMessagingSearchMode').MESSAGE_SEARCH){this.$PagesManagerMessagingSearchStore7=true;q.getAllThreadSearchResults(l,function(s,t,u){this.$PagesManagerMessagingSearchStore11=this.$PagesManagerMessagingSearchStore19(t,s,m);this.$PagesManagerMessagingSearchStore4=!u;if(this.__dispatcher.isDispatching()){this.$PagesManagerMessagingSearchStore7=false;this.__emitChange();}else c('PagesManagerMessagingThreadlistAction').changeIsSearchingSnippetStatus(false);}.bind(this,r));}this.__emitChange();};j.prototype.$PagesManagerMessagingSearchStore19=function(k,l,m){var n=Object.keys(k),o=l.filterThreadsInFolder(n,m),p={};o.forEach(function(q){p[q]=k[q];});return p;};j.prototype.$PagesManagerMessagingSearchStore17=function(k,l,m){var n=c('MercurySearchThreadResults').getForFBID(k),o=c('MercurySearchThreadResultOrderer').getForFBID(k);this.$PagesManagerMessagingSearchStore6=true;n.getMoreThreadlist(l,function(p,q){var r=o.filterThreadsInFolder(p,m);this.$PagesManagerMessagingSearchStore10=r;if(this.__dispatcher.isDispatching()){this.$PagesManagerMessagingSearchStore6=false;this.__emitChange();}else c('PagesManagerMessagingThreadlistAction').changeIsSearchingNameStatus(false);}.bind(this));};j.prototype.$PagesManagerMessagingSearchStore18=function(k,l,m){var n=c('MercurySearchSnippetResults').getForFBID(k),o=c('MercurySearchThreadResultOrderer').getForFBID(k);n.getAllThreadSearchMoreResults(l,function(p,q,r){this.$PagesManagerMessagingSearchStore4=!r;this.$PagesManagerMessagingSearchStore11=this.$PagesManagerMessagingSearchStore19(q,p,m);if(this.__dispatcher.isDispatching()){this.$PagesManagerMessagingSearchStore7=false;this.__emitChange();}else c('PagesManagerMessagingThreadlistAction').changeIsSearchingSnippetStatus(false);}.bind(this,o));};f.exports=new j();},null);
__d('PagesManagerMessagingMessageDateBreak.react',['cx','MessengerDateBreak.react','React'],function a(b,c,d,e,f,g,h){var i,j;if(c.__markCompiled)c.__markCompiled();i=babelHelpers.inherits(k,c('React').Component);j=i&&i.prototype;function k(l){'use strict';j.constructor.call(this,l);}k.prototype.render=function(){'use strict';return (c('React').createElement(c('MessengerDateBreak.react'),{className:"_2hvw",date:this.props.date}));};f.exports=k;},null);
__d('PagesManagerMessagingMessageList.react',['cx','ChatTypingIndicators.react','immutable','MessengerTypingIndicator.react','MessageList.react','MessengerLogMessage.react','MessengerMessageGroup.react','MessengerSpinner.react','PagesEventObserver','PagesEventType','PagesManagerMessagingMessageDateBreak.react','React','MercuryShareAttachmentRenderLocations','ScrollableArea.react','debounce'],function a(b,c,d,e,f,g,h){var i,j;if(c.__markCompiled)c.__markCompiled();var k='message_tab';i=babelHelpers.inherits(l,c('React').Component);j=i&&i.prototype;function l(m,n){'use strict';j.constructor.call(this,m,n);this.$PagesManagerMessagingMessageList1=true;this.prevScrollTop=0;this.prevScrollHeight=0;}l.prototype.componentDidUpdate=function(m){'use strict';var n=this.props.messagelist.last()&&this.props.messagelist.last().thread_fbid,o=m.messagelist.last()&&m.messagelist.last().thread_fbid;if(m.messagelist.size===0&&this.props.messagelist.size!==0||n!=o){this.refs.scrollableArea&&this.refs.scrollableArea.getArea().scrollToBottom();}else if(this.props.messagelist.size!==m.messagelist.size)this.$PagesManagerMessagingMessageList2(this.prevScrollHeight,this.prevScrollTop);};l.prototype.$PagesManagerMessagingMessageList2=function(m,n){'use strict';if(!this.refs.scrollableArea)return;var o=this.refs.scrollableArea.getArea(),p=o.getScrollHeight()-m+n;o.setScrollTop(p,false);};l.prototype.$PagesManagerMessagingMessageList3=function(){'use strict';if(!this.refs.scrollableArea)return;var m=this.refs.scrollableArea.getArea(),n=this.prevScrollTop,o=this.prevScrollHeight;this.$PagesManagerMessagingMessageList4();if(m.isScrolledToTop()){this.props.fetchEarlierMessages();}else if(m.isScrolledToBottom()){this.$PagesManagerMessagingMessageList5();}else{if(m.getScrollTop()===n&&m.getScrollHeight()!==o)this.$PagesManagerMessagingMessageList2(o,n);this.$PagesManagerMessagingMessageList6();}};l.prototype.$PagesManagerMessagingMessageList5=function(){'use strict';if(!this.$PagesManagerMessagingMessageList1)this.$PagesManagerMessagingMessageList1=true;};l.prototype.$PagesManagerMessagingMessageList6=function(){'use strict';if(this.$PagesManagerMessagingMessageList1)this.$PagesManagerMessagingMessageList1=false;};l.prototype.$PagesManagerMessagingMessageList4=function(){'use strict';var m=this.refs.scrollableArea;this.prevScrollHeight=m?m.getArea().getScrollHeight():0;this.prevScrollTop=m?m.getArea().getScrollTop():0;};l.prototype.$PagesManagerMessagingMessageList7=function(){'use strict';var m=Math.floor(this.props.scrollHeight/130);return (c('React').createElement('div',{className:"_31m6",style:{height:this.props.scrollHeight}},c('React').createElement('div',{className:"_31m7",style:{height:130*m}},this.$PagesManagerMessagingMessageList8(m))));};l.prototype.$PagesManagerMessagingMessageList8=function(m){'use strict';var n=c('React').createElement('div',null,c('React').createElement('div',{className:"_31m8"}),c('React').createElement('div',{className:"_31ma"}),c('React').createElement('div',{className:"_31mb"}),c('React').createElement('div',{className:"_31mc"}),c('React').createElement('div',{className:"_31me"}),c('React').createElement('div',{className:"_31mf"}),c('React').createElement('div',{className:"_31mg"}),c('React').createElement('div',{className:"_31mh"}),c('React').createElement('div',{className:"_31mi"}),c('React').createElement('div',{className:"_31mj"}),c('React').createElement('div',{className:"_31mk"}),c('React').createElement('div',{className:"_31ml"}),c('React').createElement('div',{className:"_31mm"}),c('React').createElement('div',{className:"_31mn"}),c('React').createElement('div',{className:"_31mo"}),c('React').createElement('div',{className:"_31mp"}),c('React').createElement('div',{className:"_31mq"})),o=[];for(var p=0;p<m;p++)o.push(c('React').cloneElement(n,{key:'loading'+p}));return o;};l.prototype.$PagesManagerMessagingMessageList9=function(){'use strict';if(!this.props.isLoadingMore)return null;return (c('React').createElement('div',{className:"_2k8v"},c('React').createElement(c('MessengerSpinner.react'),null)));};l.prototype.$PagesManagerMessagingMessageList10=function(){'use strict';c('PagesEventObserver').notify(c('PagesEventType').MESSAGES_VIEW_THREAD,this.props.pageID,{source:k,thread_id:this.props.threadID});return (c('React').createElement('div',{className:"clearfix _1ej0 _2mpc"},c('React').createElement(c('MessageList.react'),{DateBreak:c('PagesManagerMessagingMessageDateBreak.react'),deliveryTimestamp:0,isCanonical:true,isPageMessage:true,location:c('MercuryShareAttachmentRenderLocations').MESSENGER,LogMessage:c('MessengerLogMessage.react'),MessageGroup:c('MessengerMessageGroup.react'),messages:this.props.messagelist,readReceipts:this.props.readReceipts,viewer:this.props.pageID}),c('React').createElement(c('ChatTypingIndicators.react'),{indicatorClass:c('MessengerTypingIndicator.react'),indicatorsWillShow:function(){},indicatorsDidShow:function(){this.$PagesManagerMessagingMessageList1&&this.refs.scrollableArea&&this.refs.scrollableArea.getArea().scrollToBottom();}.bind(this),rootClassName:"clearfix _17pz _4gv2",threadID:this.props.threadID,viewer:this.props.pageID})));};l.prototype.render=function(){'use strict';if(this.props.initLoading)return this.$PagesManagerMessagingMessageList7();return (c('React').createElement(c('ScrollableArea.react'),{className:"_11y7",fade:false,height:this.props.scrollHeight,onScroll:c('debounce')(function(){return this.$PagesManagerMessagingMessageList3();}.bind(this),500),ref:'scrollableArea',shadow:false},this.$PagesManagerMessagingMessageList9(),c('React').createElement('div',{className:"_14y3"},this.props.threadID?this.$PagesManagerMessagingMessageList10():c('React').createElement('div',null))));};f.exports=l;},null);
__d("XPagesBanUserStatusFetchController",["XController"],function a(b,c,d,e,f,g){c.__markCompiled&&c.__markCompiled();f.exports=c("XController").create("\/pages\/admin\/ban_user\/status\/",{page_id:{type:"FBID",required:true},user_id:{type:"FBID",required:true}});},null);
__d('PagesManagerMessagingMessagelistAction',['AsyncRequest','PagesManagerMessagingActionType','Map','PagesManagerMessagingMessagelistDispatcher','XPagesBanUserStatusFetchController'],function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();var h=c('PagesManagerMessagingActionType').LIST,i=new (c('Map'))(),j={updateMessagelist:function(k,l,m){c('PagesManagerMessagingMessagelistDispatcher').dispatch({type:h.LOADED,pageID:k,threadID:l,data:m});},setIsLoading:function(k){c('PagesManagerMessagingMessagelistDispatcher').dispatch({type:h.LOADING,isLoading:k});},setIsLoadingMore:function(k){c('PagesManagerMessagingMessagelistDispatcher').dispatch({type:h.LOAD_MORE,isLoadingMore:k});},setScrollAreaHeight:function(k){c('PagesManagerMessagingMessagelistDispatcher').dispatch({type:c('PagesManagerMessagingActionType').SET_SCROLL_HEIGHT,height:k});},updateReadReceipts:function(k,l,m){c('PagesManagerMessagingMessagelistDispatcher').dispatch({type:c('PagesManagerMessagingActionType').MESSAGE_LEVEL.READ_RECEIPTS,pageID:k,threadID:l,readReceipts:m});},updateThread:function(k,l){c('PagesManagerMessagingMessagelistDispatcher').dispatch({type:c('PagesManagerMessagingActionType').THREAD_LEVEL.UPDATE_THREAD,pageID:k,threadID:l});},setIsContextCardHidden:function(k){c('PagesManagerMessagingMessagelistDispatcher').dispatch({type:c('PagesManagerMessagingActionType').SET_IS_CONTEXT_CARD_HIDDEN,isHidden:k});},updateIsUserBanned:function(k,l,m){c('PagesManagerMessagingMessagelistDispatcher').dispatch({type:c('PagesManagerMessagingActionType').BAN.UPDATE,pageID:k,userID:l,isBanned:m});},_getBanningMapKey:function(k,l){return k+'_'+l;},fetchIsUserBanned:function(k,l){var m=this._getBanningMapKey(k,l);if(i.has(m)&&i.get(m))return;var n=c('XPagesBanUserStatusFetchController').getURIBuilder().setFBID('page_id',k).setFBID('user_id',l).getURI();new (c('AsyncRequest'))().setURI(n).setHandler(function(o){j.updateIsUserBanned(k,l,o.payload);}).send();i.set(m,true);},resetIsUserBanned:function(k,l){i.set(this._getBanningMapKey(k,l),false);}};f.exports=j;},null);
__d("XPagesContextCardSetIsHiddenController",["XController"],function a(b,c,d,e,f,g){c.__markCompiled&&c.__markCompiled();f.exports=c("XController").create("\/pages\/customer\/context_card\/set_is_hidden\/",{});},null);
__d('PagesManagerMessagingMessagelistStore',['PagesManagerMessagingActionType','AsyncRequest','FluxStore','immutable','Map','MercuryMessages','PagesManagerMessagingMessagelistDispatcher','MercuryThreadlistConstants','XPagesContextCardSetIsHiddenController'],function a(b,c,d,e,f,g){var h,i;if(c.__markCompiled)c.__markCompiled();h=babelHelpers.inherits(j,c('FluxStore'));i=h&&h.prototype;function j(){'use strict';i.constructor.call(this,c('PagesManagerMessagingMessagelistDispatcher'));this.$PagesManagerMessagingMessagelistStore1='';this.$PagesManagerMessagingMessagelistStore2=false;this.$PagesManagerMessagingMessagelistStore3=false;this.$PagesManagerMessagingMessagelistStore4=[];this.$PagesManagerMessagingMessagelistStore5=c('immutable').OrderedMap();this.$PagesManagerMessagingMessagelistStore6=0;this.$PagesManagerMessagingMessagelistStore8=new (c('Map'))();}j.prototype.__onDispatch=function(k){'use strict';switch(k.type){case c('PagesManagerMessagingActionType').LIST.LOADED:this.$PagesManagerMessagingMessagelistStore9(k);this.__emitChange();break;case c('PagesManagerMessagingActionType').LIST.LOADING:this.$PagesManagerMessagingMessagelistStore2=k.isLoading;this.__emitChange();break;case c('PagesManagerMessagingActionType').LIST.LOAD_MORE:this.$PagesManagerMessagingMessagelistStore3=k.isLoadingMore;this.__emitChange();break;case c('PagesManagerMessagingActionType').MESSAGE_LEVEL.READ_RECEIPTS:this.$PagesManagerMessagingMessagelistStore10(k);this.__emitChange();break;case c('PagesManagerMessagingActionType').SET_SCROLL_HEIGHT:var l=k.height;if(l!==this.$PagesManagerMessagingMessagelistStore6){this.$PagesManagerMessagingMessagelistStore6=l;this.__emitChange();}break;case c('PagesManagerMessagingActionType').THREAD_LEVEL.UPDATE_THREAD:this.__emitChange();break;case c('PagesManagerMessagingActionType').SET_IS_CONTEXT_CARD_HIDDEN:this.$PagesManagerMessagingMessagelistStore11(k.isHidden);this.__emitChange();break;case c('PagesManagerMessagingActionType').BAN.UPDATE:this.$PagesManagerMessagingMessagelistStore12(k.pageID,k.userID,k.isBanned);this.__emitChange();break;default:return;}};j.prototype.$PagesManagerMessagingMessagelistStore9=function(k){'use strict';this.$PagesManagerMessagingMessagelistStore2=false;this.$PagesManagerMessagingMessagelistStore1=k.threadID;this.$PagesManagerMessagingMessagelistStore4=k.data.messages;};j.prototype.$PagesManagerMessagingMessagelistStore10=function(k){'use strict';if(this.$PagesManagerMessagingMessagelistStore1!==k.threadID)this.$PagesManagerMessagingMessagelistStore4=[];this.$PagesManagerMessagingMessagelistStore1=k.threadID;this.$PagesManagerMessagingMessagelistStore5=k.readReceipts;};j.prototype.isLoading=function(){'use strict';return this.$PagesManagerMessagingMessagelistStore2;};j.prototype.isLoadingMore=function(){'use strict';return this.$PagesManagerMessagingMessagelistStore3;};j.prototype.getMessagelist=function(k,l){'use strict';var m;if(l!=this.$PagesManagerMessagingMessagelistStore1)return c('MercuryMessages').getForFBID(k).getThreadMessagesRangeNow(l,0,c('MercuryThreadlistConstants').RECENT_MESSAGES_LIMIT).reverse();return this.$PagesManagerMessagingMessagelistStore4;};j.prototype.getScrollHeight=function(){'use strict';return this.$PagesManagerMessagingMessagelistStore6;};j.prototype.getReadReceipts=function(k){'use strict';if(k!=this.$PagesManagerMessagingMessagelistStore1)return c('immutable').OrderedMap();return this.$PagesManagerMessagingMessagelistStore5;};j.prototype.isCardHidden=function(){'use strict';if(this.$PagesManagerMessagingMessagelistStore7===undefined||this.$PagesManagerMessagingMessagelistStore7===null)return null;return this.$PagesManagerMessagingMessagelistStore7;};j.prototype.$PagesManagerMessagingMessagelistStore11=function(k){'use strict';this.$PagesManagerMessagingMessagelistStore7=k;var l=c('XPagesContextCardSetIsHiddenController').getURIBuilder().getURI();new (c('AsyncRequest'))().setURI(l).setData({is_hidden:k}).send();};j.prototype.$PagesManagerMessagingMessagelistStore13=function(k,l){'use strict';return k+'_'+l;};j.prototype.getIsUserBanned=function(k,l){'use strict';return this.$PagesManagerMessagingMessagelistStore8.get(this.$PagesManagerMessagingMessagelistStore13(k,l));};j.prototype.$PagesManagerMessagingMessagelistStore12=function(k,l,m){'use strict';this.$PagesManagerMessagingMessagelistStore8.set(this.$PagesManagerMessagingMessagelistStore13(k,l),m);};f.exports=new j(c('PagesManagerMessagingMessagelistDispatcher'));},null);
__d('PagesManagerMessagingNoteComposerView.react',['cx','fbt','Image.react','PagesMessengerTextInput.react','React','XUIButton.react','isEmpty'],function a(b,c,d,e,f,g,h,i){'use strict';var j,k;if(c.__markCompiled)c.__markCompiled();var l=c('React').PropTypes;j=babelHelpers.inherits(m,c('React').Component);k=j&&j.prototype;function m(n){k.constructor.call(this,n);this.state={isQuickReplyMode:true};}m.prototype.$PagesManagerMessagingNoteComposerView1=function(n){n.preventDefault();this.props.onCreateNote();};m.prototype.$PagesManagerMessagingNoteComposerView2=function(){var n=i._("Cancel");return (c('React').createElement('div',{className:"_1vgy"},c('React').createElement(c('XUIButton.react'),{label:n,onClick:this.props.onCancelCreateNote})));};m.prototype.$PagesManagerMessagingNoteComposerView3=function(){var n=i._("Add");if(this.props.message.length>0)return (c('React').createElement('div',{className:"_1vgz"},c('React').createElement(c('XUIButton.react'),{label:n,onClick:function(o){return this.$PagesManagerMessagingNoteComposerView1(o);}.bind(this),use:'confirm'})));};m.prototype.$PagesManagerMessagingNoteComposerView4=function(){var n=i._("Add an admin note...");return (c('React').createElement('div',{className:"_4dv-"},c('React').createElement(c('PagesMessengerTextInput.react'),{className:"_1p7p"+(' '+"_5id1")+(c('isEmpty')(this.props.message)?' '+"_3197":'')+(' '+"_1vg-"),onNoShiftEnter:this.state.isQuickReplyMode?function(o){return this.$PagesManagerMessagingNoteComposerView1(o);}.bind(this):null,placeholder:n,onChange:this.props.onInputChange,value:this.props.message,ref:'textInput'})));};m.prototype.$PagesManagerMessagingNoteComposerView5=function(){return (c('React').createElement('div',{className:"_4dw0"},c('React').createElement(c('Image.react'),{className:"_1cjc",src:this.props.participant.image_src})));};m.prototype.render=function(){if(!this.props.participant)return c('React').createElement('div',{className:"_1vg_"});return (c('React').createElement('div',{className:"_1vh0"},c('React').createElement('div',{className:"_1vh1"},this.$PagesManagerMessagingNoteComposerView5(),this.$PagesManagerMessagingNoteComposerView4(),c('React').createElement('div',{className:"_4dwa"},this.$PagesManagerMessagingNoteComposerView2(),this.$PagesManagerMessagingNoteComposerView3()))));};m.propTypes={onInputChange:l.func,onCancelCreateNote:l.func,onCreateNote:l.func,participant:l.object};f.exports=m;},null);
__d('PagesManagerMessagingNoteComposerContainer.react',['MercuryIDs','MercuryMessageIDs','MercuryMessages','MercuryPageMessageActions','MercuryParticipants','PagesManagerMessagingNoteComposerView.react','React'],function a(b,c,d,e,f,g){'use strict';var h,i;if(c.__markCompiled)c.__markCompiled();var j=c('React').PropTypes;h=babelHelpers.inherits(k,c('React').Component);i=h&&h.prototype;function k(l,m){i.constructor.call(this,l,m);this.state={message:'',participant:null};}k.prototype.$PagesManagerMessagingNoteComposerContainer3=function(){this.setState({message:''});};k.prototype.componentWillMount=function(){this.$PagesManagerMessagingNoteComposerContainer4(this.props);};k.prototype.componentWillReceiveProps=function(l){this.$PagesManagerMessagingNoteComposerContainer5(l.userID);this.$PagesManagerMessagingNoteComposerContainer4(l);if(l.threadID!==this.props.threadID)this.$PagesManagerMessagingNoteComposerContainer3();if(l.userID!==this.props.userID)this.$PagesManagerMessagingNoteComposerContainer5(l.userID);};k.prototype.componentDidMount=function(){setTimeout(function(){return this.$PagesManagerMessagingNoteComposerContainer5(this.props.userID);}.bind(this),0);};k.prototype.componentWillUpdate=function(l,m){if(this.props.onMessageOrAttachmentUpdate&&m.message!==this.state.message)this.props.onMessageOrAttachmentUpdate();};k.prototype.$PagesManagerMessagingNoteComposerContainer4=function(l){var m=l.userID;this.$PagesManagerMessagingNoteComposerContainer1=c('MercuryPageMessageActions').getForFBID(m);this.$PagesManagerMessagingNoteComposerContainer2=c('MercuryMessages').getForFBID(m);};k.prototype.$PagesManagerMessagingNoteComposerContainer6=function(l){var m=l.target;this.setState({message:m.value});};k.prototype.$PagesManagerMessagingNoteComposerContainer7=function(){if(!this.props.threadID)return;var l=this.props.creatorInfo?{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}:null,m={id:null,body:{text:this.state.message},creator_info:l,timestamp:Math.floor(Date.now()/1000)};this.$PagesManagerMessagingNoteComposerContainer2.getThreadMessagesRange(this.props.threadID,0,1,function(n){if(!n.length)return;var o=n[0];if(this.$PagesManagerMessagingNoteComposerContainer2.isLocalMessage(o)){c('MercuryMessageIDs').getServerIDs([o.message_id],function(p){if(p.length){var q=p[0];this.$PagesManagerMessagingNoteComposerContainer1.createNote(m,this.props.threadID,q);}}.bind(this));}else this.$PagesManagerMessagingNoteComposerContainer1.createNote(m,this.props.threadID,o.message_id);}.bind(this));this.$PagesManagerMessagingNoteComposerContainer3();this.props.onDisablePageAdminNoteMode();};k.prototype.$PagesManagerMessagingNoteComposerContainer8=function(){this.$PagesManagerMessagingNoteComposerContainer3();this.props.onDisablePageAdminNoteMode();};k.prototype.$PagesManagerMessagingNoteComposerContainer5=function(l){var m=c('MercuryIDs').getParticipantIDFromUserID(l);c('MercuryParticipants').get(m,function(n){this.setState({participant:n});}.bind(this));};k.prototype.render=function(){return (c('React').createElement(c('PagesManagerMessagingNoteComposerView.react'),babelHelpers['extends']({},this.props,this.state,{onInputChange:function(l){return this.$PagesManagerMessagingNoteComposerContainer6(l);}.bind(this),onCreateNote:function(){return this.$PagesManagerMessagingNoteComposerContainer7();}.bind(this),onCancelCreateNote:function(){return this.$PagesManagerMessagingNoteComposerContainer8();}.bind(this)})));};k.propTypes={creatorInfo:j.object,onDisablePageAdminNoteMode:j.func.isRequired,onMessageOrAttachmentUpdate:j.func,threadID:j.string,userID:j.string.isRequired};f.exports=k;},null);
__d('PagesManagerMessagingFilterActions',['PagesManagerActionType','PagesManagerDispatcher','PagesManagerMessagingThreadlistAction','PagesManagerNavigationUnit'],function a(b,c,d,e,f,g){'use strict';if(c.__markCompiled)c.__markCompiled();var h={changeFilter:function(i,j){c('PagesManagerDispatcher').dispatch({unit:j,pageID:i,type:c('PagesManagerActionType').NAVIGATION_UNIT.CHANGE});c('PagesManagerMessagingThreadlistAction').resetSearch(i);},notifyNotificationCountChanged:function(i){c('PagesManagerDispatcher').dispatch({pageID:i,type:c('PagesManagerActionType').NAVIGATION_UNIT.NOTIFICATION_COUNT_CHANGE});},toggleFilterPanel:function(i,j){c('PagesManagerDispatcher').dispatch({pageID:i,showPanel:j,type:c('PagesManagerActionType').FILTER_PANEL.TOGGLE_PANEL});}};f.exports=h;},null);
__d('PagesManagerMessagingThreadlistStore',['AbstractPagesManagerListStore','PagesManagerActionType','MercuryOrderedThreadlist','MercuryThreadlistConstants','PagesManagerDispatcher','PagesManagerMessagingFilterStore','PagesManagerMessagingSearchStore'],function a(b,c,d,e,f,g){var h,i;if(c.__markCompiled)c.__markCompiled();h=babelHelpers.inherits(j,c('AbstractPagesManagerListStore'));i=h&&h.prototype;function j(){'use strict';i.constructor.call(this,c('PagesManagerDispatcher'));}j.prototype.$PagesManagerMessagingThreadlistStore1=function(){'use strict';return c('PagesManagerMessagingSearchStore').getCustomTagsFilterName()||c('PagesManagerMessagingFilterStore').getActiveFilterName();};j.prototype.$PagesManagerMessagingThreadlistStore2=function(k,l){'use strict';var m=c('MercuryOrderedThreadlist').getForFBID(k);return m.hasLoadedThreadlist(c('PagesManagerMessagingFilterStore').getActiveFolderName(),this.$PagesManagerMessagingThreadlistStore1())||m.getThreadCount(c('PagesManagerMessagingFilterStore').getActiveFolderName(),this.$PagesManagerMessagingThreadlistStore1())>=l;};j.prototype.$PagesManagerMessagingThreadlistStore3=function(k,l,m){'use strict';var n=c('MercuryOrderedThreadlist').getForFBID(k);n.getFilteredThreadlist(l,m+1,c('PagesManagerMessagingFilterStore').getActiveFolderName(),this.$PagesManagerMessagingThreadlistStore1(),function(o){var p=o.length>m;this.$PagesManagerMessagingThreadlistStore4(p);}.bind(this));};j.prototype.$PagesManagerMessagingThreadlistStore5=function(k){'use strict';var l=c('MercuryOrderedThreadlist').getForFBID(k);return l.getAvailableThreadlistNow(c('PagesManagerMessagingFilterStore').getActiveFolderName(),this.$PagesManagerMessagingThreadlistStore1());};j.prototype.__handleListFetch=function(k){'use strict';var l=k.pageID,m=k.offset,n=k.limit;this.__isLoading=true;var o=this.$PagesManagerMessagingThreadlistStore2(l,m+n);if(o){this.$PagesManagerMessagingThreadlistStore4(this.__hasMoreItem.get(c('PagesManagerMessagingFilterStore').getNavigationKey()));}else this.$PagesManagerMessagingThreadlistStore3(l,m,n);this.__emitChange();};j.prototype.__handleNavigationUnitChange=function(k){'use strict';c('PagesManagerDispatcher').waitFor([c('PagesManagerMessagingFilterStore').getDispatchToken(),c('PagesManagerMessagingSearchStore').getDispatchToken()]);this.__handleListFetch({pageID:k.pageID,offset:0,limit:c('MercuryThreadlistConstants').WEBMESSENGER_THREAD_COUNT});};j.prototype.$PagesManagerMessagingThreadlistStore4=function(k){'use strict';this.__isLoading=false;this.__hasMoreItem.set(c('PagesManagerMessagingFilterStore').getNavigationKey(),k);if(!this.__dispatcher.isDispatching())this.__dispatcher.dispatch({type:c('PagesManagerActionType').LIST.FETCHED});};j.prototype.getItemList=function(k){'use strict';var l=this.$PagesManagerMessagingThreadlistStore5(k),m=c('PagesManagerMessagingFilterStore').getNavigationKey();return this.hasMoreItem(m)&&l.length>0?l.slice(0,l.length-1):l;};f.exports=new j();},null);
__d('PagesManagerMessagingThreadInteractionHelper',['MercuryPageThreadActions','MercuryThreadIDMap','MercuryThreads','MessagingTag','PagesManagerMessagingFilterActions','PagesManagerMessagingFilterStore','PagesManagerMessagingMessagelistStore','PagesManagerMessagingNavigationUnitKey','PagesManagerMessagingThreadlistStore','PagesManagerStore','PagesMessagingActionPlacement','URI'],function a(b,c,d,e,f,g){'use strict';if(c.__markCompiled)c.__markCompiled();var h={_getPermalinkURI:function(i,j){var k=c('MercuryThreadIDMap').getForFBID(j).getServerIDFromClientIDNow(i),l=c('URI').getRequestURI(),m=c('MercuryThreads').getForFBID(j).getThreadMetaNow(i);l.addQueryData({threadid:k,mercurythreadid:i,timestamp:m?m.timestamp:null});return l;},_clearURLParam:function(){var i=c('URI').getRequestURI();i.removeQueryData('mercurythreadid');i.removeQueryData('threadid');i.removeQueryData('timestamp');window.history.replaceState({},null,i);},handlePermalinkUpdate:function(i,j){if(!i){this._clearURLParam();return;}var k=h._getPermalinkURI(i,j);window.history.replaceState({},null,k);},handleUnreadStateUpdate:function(i,j,k){var l=c('PagesManagerStore').getViewingListItem();if(!l)return;var m=c('MercuryThreads').getForFBID(j).getThreadMetaNow(l.toString()),n=c('PagesManagerMessagingMessagelistStore').getMessagelist(j,l.toString()),o=c('PagesManagerMessagingThreadlistStore').getItemList(j,k).length,p=c('MercuryPageThreadActions').getForFBID(j);if(m&&m.unread_count>0||n.length>0)if(k===c('MessagingTag').UNREAD&&o>1&&i!==l){p.markRead(l,c('PagesMessagingActionPlacement').MESSAGE_DIALOG_SHOWN);}else if(k===c('MessagingTag').UNREAD&&o===1){p.markRead(i,c('PagesMessagingActionPlacement').MESSAGE_DIALOG_SHOWN);c('PagesManagerMessagingFilterActions').changeFilter(j,c('PagesManagerMessagingFilterStore').getFilterByKey(c('PagesManagerMessagingNavigationUnitKey').FILTERS.ALL));}else if(k!==c('MessagingTag').UNREAD)p.markRead(i,c('PagesMessagingActionPlacement').MESSAGE_DIALOG_SHOWN);}};f.exports=h;},null);
__d("XPagesBanUserDataController",["XController"],function a(b,c,d,e,f,g){c.__markCompiled&&c.__markCompiled();f.exports=c("XController").create("\/pages\/admin\/ban_user\/",{page_id:{type:"FBID",required:true},user_ids:{type:"FBIDVector",required:true}});},null);
__d('PagesManagerMessagingBatchActionMenu.react',['cx','fbt','invariant','AsyncRequest','MercuryPageThreadActions','InsightsInfoTip.react','PagesManagerAction','PagesManagerMessagingMessagelistAction','PagesMessengerActions','PagesMessagingActionPlacement','PopoverMenu.react','React','SimpleXUIDialog','XPagesBanUserDataController','ReactXUIMenu','XUIDialogButton.react','XUIDialogCancelButton.react','XUIText.react'],function a(b,c,d,e,f,g,h,i,j){var k,l;if(c.__markCompiled)c.__markCompiled();var m=c('ReactXUIMenu').Item;k=babelHelpers.inherits(n,c('React').Component);l=k&&k.prototype;function n(o){'use strict';l.constructor.call(this,o);this.$PagesManagerMessagingBatchActionMenu1=c('MercuryPageThreadActions').getForFBID(o.pageID);}n.prototype.$PagesManagerMessagingBatchActionMenu2=function(event,o){'use strict';var p=o.item.getValue(),q=null;switch(p){case c('PagesMessengerActions').FLAG:q=this.$PagesManagerMessagingBatchActionMenu1.batchAddFlag;break;case c('PagesMessengerActions').UNFLAG:q=this.$PagesManagerMessagingBatchActionMenu1.batchRemoveFlag;break;case c('PagesMessengerActions').MARK_AS_SPAM:q=this.$PagesManagerMessagingBatchActionMenu1.batchMarkSpam;break;case c('PagesMessengerActions').MARK_AS_UNSPAM:q=this.$PagesManagerMessagingBatchActionMenu1.batchUnmarkSpam;break;case c('PagesMessengerActions').MARK_AS_READ:q=this.$PagesManagerMessagingBatchActionMenu1.batchMarkRead;break;case c('PagesMessengerActions').MARK_AS_UNREAD:q=this.$PagesManagerMessagingBatchActionMenu1.batchMarkUnread;break;case c('PagesMessengerActions').ARCHIVE:q=this.$PagesManagerMessagingBatchActionMenu1.batchArchive;break;case c('PagesMessengerActions').UNARCHIVE:q=this.$PagesManagerMessagingBatchActionMenu1.batchUnarchive;break;case c('PagesMessengerActions').DELETE_THREAD:this.$PagesManagerMessagingBatchActionMenu3();return;case c('PagesMessengerActions').HIDE_CONTEXT_CARD:this.$PagesManagerMessagingBatchActionMenu4();return;case c('PagesMessengerActions').SHOW_CONTEXT_CARD:this.$PagesManagerMessagingBatchActionMenu5();return;case c('PagesMessengerActions').SHOW_BAN_FROM_PAGE:this.$PagesManagerMessagingBatchActionMenu6();return;default:j(0);}if(q)q.call(this.$PagesManagerMessagingBatchActionMenu1,this.props.selectedRows,this.props.placement);c('PagesManagerAction').deselectAll();this.props.onSelectionClear&&this.props.onSelectionClear();};n.prototype.$PagesManagerMessagingBatchActionMenu3=function(){'use strict';var o=this.props.selectedRows.length,p=i._("Delete Messages"),q=i._("Are you sure you want to delete {number of messages}?",[i.param('number of messages',c('React').createElement('span',{className:"_50f7"},i._({"*":{"message":"{number of messages} message","messages":"{number of messages} messages"}},[i.param('number of messages',o,[0]),i['enum'](o>1?'messages':'message',{message:'message',messages:'messages'})])))]),r=i._("Delete Messages"),s=[c('React').createElement(c('XUIDialogCancelButton.react'),null),c('React').createElement(c('XUIDialogButton.react'),{action:'cancel',label:r,onClick:function(){this.$PagesManagerMessagingBatchActionMenu1.batchDelete(this.props.selectedRows,c('PagesMessagingActionPlacement').THREAD_LIST_BATCH_ACTION);}.bind(this),use:'confirm'})];c('SimpleXUIDialog').showEx(q,p,s);};n.prototype.$PagesManagerMessagingBatchActionMenu4=function(){'use strict';c('PagesManagerMessagingMessagelistAction').setIsContextCardHidden(true);};n.prototype.$PagesManagerMessagingBatchActionMenu5=function(){'use strict';c('PagesManagerMessagingMessagelistAction').setIsContextCardHidden(false);};n.prototype.$PagesManagerMessagingBatchActionMenu6=function(){'use strict';!this.props.pageID?j(0):void 0;!this.props.userID?j(0):void 0;var o=c('XPagesBanUserDataController').getURIBuilder().setFBID('page_id',this.props.pageID).setFBIDVector('user_ids',[this.props.userID]).getURI(),p=i._("Ban Person From Page"),q=i._("A person who's banned can't post, comment, like or take other actions on the Page. They won't be notified."),r=this.props.userName?i._("Would you like to ban {user name}?",[i.param('user name',c('React').createElement(c('XUIText.react'),{weight:'bold'},this.props.userName))]):i._("Would you like to ban this user?"),s=c('React').createElement('div',null,r,c('React').createElement(c('InsightsInfoTip.react'),{alignH:'center',position:'above',tip:q}));c('SimpleXUIDialog').showConfirm(s,p,function(t){if(!t)return;new (c('AsyncRequest'))().setURI(o).setHandler(function(u){if(!u.payload.success)return;c('PagesManagerMessagingMessagelistAction').resetIsUserBanned(this.props.pageID,this.props.userID);this.$PagesManagerMessagingBatchActionMenu1.batchMarkSpam(this.props.selectedRows,c('PagesMessagingActionPlacement').THREAD_LIST_BATCH_ACTION);}.bind(this)).send();}.bind(this));};n.prototype.renderMenu=function(){'use strict';return (c('React').createElement(c('ReactXUIMenu'),{onItemClick:function(event,o){return this.$PagesManagerMessagingBatchActionMenu2(event,o);}.bind(this)},this.props.inlineActionParam.showFlag?c('React').createElement(m,{value:c('PagesMessengerActions').FLAG},i._("Flag")):null,this.props.inlineActionParam.showUnflag?c('React').createElement(m,{value:c('PagesMessengerActions').UNFLAG},i._("Unflag")):null,this.props.inlineActionParam.showSpam?c('React').createElement(m,{value:c('PagesMessengerActions').MARK_AS_SPAM},i._("Mark as Spam")):null,this.props.inlineActionParam.showUnspam?c('React').createElement(m,{value:c('PagesMessengerActions').MARK_AS_UNSPAM},i._("Move to Inbox")):null,this.props.inlineActionParam.showMarkRead?c('React').createElement(m,{value:c('PagesMessengerActions').MARK_AS_READ},i._("Mark as Read")):null,this.props.inlineActionParam.showMarkUnread?c('React').createElement(m,{value:c('PagesMessengerActions').MARK_AS_UNREAD},i._(["Mark as Unread","d40d50f73da3233202117a2dc422f97d"])):null,this.props.inlineActionParam.showArchive?c('React').createElement(m,{value:c('PagesMessengerActions').ARCHIVE},i._("Archive")):null,this.props.inlineActionParam.showUnarchive?c('React').createElement(m,{value:c('PagesMessengerActions').UNARCHIVE},i._("Move to Inbox")):null,this.props.inlineActionParam.showDelete?c('React').createElement(m,{value:c('PagesMessengerActions').DELETE_THREAD},i._("Delete")):null,this.props.inlineActionParam.showHideContextCard?c('React').createElement(m,{value:c('PagesMessengerActions').HIDE_CONTEXT_CARD},i._("Hide sender info")):null,this.props.inlineActionParam.showShowContextCard?c('React').createElement(m,{value:c('PagesMessengerActions').SHOW_CONTEXT_CARD},i._("Show sender info")):null,this.props.showBanFromPage&&this.props.pageID&&this.props.userID?c('React').createElement(m,{value:c('PagesMessengerActions').SHOW_BAN_FROM_PAGE},i._("Ban From Page")):null));};n.prototype.render=function(){'use strict';return (c('React').createElement(c('PopoverMenu.react'),{alignh:this.props.alignh,className:"_1tly"+(!this.props.showBatchAction?' '+"hidden_elem":''),layerBehaviors:this.props.layerBehaviors,menu:this.renderMenu(),onHide:this.props.onHide,onShow:this.props.onShow,ref:'menu'},this.props.children));};n.defaultProps={alignh:'left'};f.exports=n;},null);
__d('PagesManagerMessagingDetailContainer.react',['cx','fbt','BootloadedComponent.react','FBID','FluxContainer','Grid.react','immutable','JSResource','MercuryMessageStore','MercuryRoger','MercuryThreadInformer','MercuryThreads','MessagingTag','MessengerConfig','PagesEventObserver','PagesEventType','PagesManagerMessagingComposerContainer.react','PagesManagerMessagingFilterStore','PagesManagerMessagingMessageList.react','PagesManagerMessagingMessagelistAction','PagesManagerMessagingMessagelistStore','PagesManagerMessagingNoteComposerContainer.react','PagesManagerMessagingTabPerfEvents','PagesManagerMessagingThreadInteractionHelper','PagesManagerMessagingThreadTitle.react','PagesManagerPerfLogger','React','ReactDOM','Set','SubscriptionsHandler','Vector','XUIButton.react','debounce'],function a(b,c,d,e,f,g,h,i){var j,k;if(c.__markCompiled)c.__markCompiled();var l=c('Grid.react').GridItem;j=babelHelpers.inherits(m,c('React').Component);k=j&&j.prototype;function m(n,o){'use strict';k.constructor.call(this,n,o);this.$PagesManagerMessagingDetailContainer6=c('MercuryRoger').getForFBID(n.pageID);this.$PagesManagerMessagingDetailContainer9=c('MercuryThreadInformer').getForFBID(n.pageID);this.$PagesManagerMessagingDetailContainer2=null;this.$PagesManagerMessagingDetailContainer4=false;this.state={isContextCardEnabled:false,isLoading:false,isLoadingMore:false,isPageAdminNoteMode:false,messaginglist:[],preventScroll:false,hideContextCard:n.config.hideContextCard,threadID:'',thread:{}};this.$PagesManagerMessagingDetailContainer7=c('debounce')(function(){if(this.props.height)this.$PagesManagerMessagingDetailContainer10(this.props.height);}.bind(this),50);}m.getStores=function(){'use strict';return [c('PagesManagerMessagingMessagelistStore')];};m.calculateState=function(n,o){'use strict';var p=[],q={},r=null;if(o.listItemKey){p=c('PagesManagerMessagingMessagelistStore').getMessagelist(o.pageID,o.listItemKey);q=c('PagesManagerMessagingMessagelistStore').getReadReceipts(o.listItemKey);r=c('MercuryThreads').getForFBID(o.pageID).getThreadMetaNow(o.listItemKey);if(r&&r.other_user_fbid&&o.config&&o.pageID)c('PagesManagerMessagingMessagelistAction').fetchIsUserBanned(o.pageID,r.other_user_fbid);}var s=c('PagesManagerMessagingMessagelistStore').isCardHidden();if(s===null)s=o.config.hideContextCard;var t=o.config.enableContextCard&&r&&r.other_user_fbid,u=o.pageID&&r&&r.other_user_fbid?c('PagesManagerMessagingMessagelistStore').getIsUserBanned(o.pageID,r.other_user_fbid):false;return {isContextCardEnabled:t,hideContextCard:s,isLoading:c('PagesManagerMessagingMessagelistStore').isLoading(),isLoadingMore:c('PagesManagerMessagingMessagelistStore').isLoadingMore(),isPageAdminNoteMode:n?n.isPageAdminNoteMode:false,isUserBanned:u,scrollHeight:c('PagesManagerMessagingMessagelistStore').getScrollHeight(),messagelist:p,readReceipts:q,threadID:o.listItemKey,thread:r};};m.prototype.$PagesManagerMessagingDetailContainer10=function(n){'use strict';var o=0;if(this.refs.threadTitle)o=c('Vector').getElementDimensions(c('ReactDOM').findDOMNode(this.refs.threadTitle)).y;var p=c('Vector').getElementDimensions(this.state.isPageAdminNoteMode?c('ReactDOM').findDOMNode(this.refs.noteComposer):c('ReactDOM').findDOMNode(this.refs.composer)).y,q=n-o-p;if(q<0)q=0;c('PagesManagerMessagingMessagelistAction').setScrollAreaHeight(q);};m.prototype.$PagesManagerMessagingDetailContainer11=function(n,o){'use strict';var p=this.$PagesManagerMessagingDetailContainer6.getSeenTimestamps(n),q=new (c('Set'))(p.keys());return p.withMutations(function(r){c('immutable').Seq(o).reverse().forEach(function(s){if(q.size===0)return false;if(!q.has(s.author))return true;r.update(s.author,function(t){return Math.max(t,s.timestamp);});q['delete'](s.author);});});};m.prototype.componentDidMount=function(){'use strict';c('PagesManagerPerfLogger').log(c('PagesManagerMessagingTabPerfEvents').MESSAGE_TAB_DETAIL_VIEW_DID_RENDER,this.props.perfParams);if(this.props.listItemKey)this.$PagesManagerMessagingDetailContainer12(this.props.listItemKey);};m.prototype.componentWillReceiveProps=function(n){'use strict';if(this.props.listItemKey!==n.listItemKey)this.$PagesManagerMessagingDetailContainer12(n.listItemKey);};m.prototype.componentWillUpdate=function(n){'use strict';if(n.height!==this.props.height)this.$PagesManagerMessagingDetailContainer10(n.height);};m.prototype.getMessageStore=function(){'use strict';return this.$PagesManagerMessagingDetailContainer5;};m.prototype.logMessageLoadingStart=function(){'use strict';var n=Date.now();this.$PagesManagerMessagingDetailContainer1=this.props.pageID+String(Math.random()).slice(2)+'/'+n;this.$PagesManagerMessagingDetailContainer3=true;c('PagesEventObserver').notify(c('PagesEventType').MESSAGES_MESSAGELIST_LOAD_START,this.props.pageID,{flowID:this.$PagesManagerMessagingDetailContainer1,page_id:this.props.pageID,loading_event_time:Date.now()});};m.prototype.logMessageLoadingEnd=function(){'use strict';if(this.$PagesManagerMessagingDetailContainer3){this.$PagesManagerMessagingDetailContainer3=false;c('PagesEventObserver').notify(c('PagesEventType').MESSAGES_MESSAGELIST_LOAD_END,this.props.pageID,{flowID:this.$PagesManagerMessagingDetailContainer1,page_id:this.props.pageID,loading_event_time:Date.now()});}};m.prototype.$PagesManagerMessagingDetailContainer12=function(n){'use strict';this.$PagesManagerMessagingDetailContainer13&&this.$PagesManagerMessagingDetailContainer13.destroy();this.$PagesManagerMessagingDetailContainer14&&this.$PagesManagerMessagingDetailContainer14.release();this.$PagesManagerMessagingDetailContainer5=new (c('MercuryMessageStore'))(n,c('MessengerConfig').MessageLoadCount,this.props.pageID);var o=c('PagesManagerMessagingMessagelistStore').getMessagelist(this.props.pageID,n);if(o.length===0){c('PagesManagerMessagingMessagelistAction').setIsLoadingMore(false);c('PagesManagerMessagingMessagelistAction').setIsLoading(true);this.logMessageLoadingStart();}var p=this.$PagesManagerMessagingDetailContainer11(n,o);c('PagesManagerMessagingMessagelistAction').updateReadReceipts(this.props.pageID,n,p);this.$PagesManagerMessagingDetailContainer14=new (c('SubscriptionsHandler'))();this.$PagesManagerMessagingDetailContainer14.addSubscriptions(this.$PagesManagerMessagingDetailContainer5.subscribe(function(q){this.logMessageLoadingEnd();c('PagesManagerMessagingMessagelistAction').setIsLoading(false);c('PagesManagerMessagingMessagelistAction').setIsLoadingMore(false);c('PagesManagerMessagingMessagelistAction').updateMessagelist(this.props.pageID,n,q);}.bind(this)),this.$PagesManagerMessagingDetailContainer9.subscribe('threads-updated',function(q,r){if(r[this.props.listItemKey])c('PagesManagerMessagingMessagelistAction').updateThread(this.props.pageID,this.props.listItemKey);}.bind(this)),this.$PagesManagerMessagingDetailContainer6.subscribe('change',function(q,r){if(r[this.props.listItemKey]){var s=c('PagesManagerMessagingMessagelistStore').getMessagelist(this.props.pageID,this.props.listItemKey),t=this.$PagesManagerMessagingDetailContainer11(this.props.listItemKey,s);c('PagesManagerMessagingMessagelistAction').updateReadReceipts(this.props.pageID,this.props.listItemKey,t);}}.bind(this)));};m.prototype.$PagesManagerMessagingDetailContainer15=function(){'use strict';var n=c('PagesManagerMessagingFilterStore').getActiveFilterName();if(!this.props.listItemKey||n===c('MessagingTag').UNREAD)return;c('PagesManagerMessagingThreadInteractionHelper').handleUnreadStateUpdate(this.props.listItemKey,this.props.pageID,n);c('PagesManagerMessagingThreadInteractionHelper').handlePermalinkUpdate(this.props.listItemKey,this.props.pageID);};m.prototype.$PagesManagerMessagingDetailContainer16=function(){'use strict';if(!this.state.isLoadingMore)if(this.getMessageStore().fetchMoreMessages()){c('PagesManagerMessagingMessagelistAction').setIsLoading(false);c('PagesManagerMessagingMessagelistAction').setIsLoadingMore(true);}};m.prototype.$PagesManagerMessagingDetailContainer17=function(){'use strict';return (c('React').createElement(c('PagesManagerMessagingMessageList.react'),babelHelpers['extends']({},this.props,{initLoading:this.state.isLoading,isLoadingMore:this.state.isLoadingMore,messagelist:c('immutable').List(this.state.messagelist),fetchEarlierMessages:function(){return this.$PagesManagerMessagingDetailContainer16();}.bind(this),readReceipts:this.state.readReceipts,scrollHeight:this.state.scrollHeight,threadID:this.state.threadID,thread:this.state.thread})));};m.prototype.$PagesManagerMessagingDetailContainer18=function(n){'use strict';if(!this.state.isContextCardEnabled)return null;var o=n;if(this.props.config.enableUpdatedUI){var p=0;if(this.refs.threadTitle)p=c('Vector').getElementDimensions(c('ReactDOM').findDOMNode(this.refs.threadTitle)).y;o+=p;}return (c('React').createElement(l,{alignv:'middle',className:"_2utd"+(this.state.hideContextCard?' '+"hidden_elem":'')},c('React').createElement(c('BootloadedComponent.react'),{bootloadPlaceholder:c('React').createElement('div',{className:"hidden_elem"}),bootloadLoader:c('JSResource')('PagesMessengerContextCardContainer.react'),pageID:this.props.pageID,userID:this.state.thread&&this.state.thread.other_user_fbid,scrollHeight:o,updatedUI:this.props.config.enableUpdatedUI})));};m.prototype.$PagesManagerMessagingDetailContainer19=function(){'use strict';if(!this.props.config.enableNotes)return null;var n=i._("Add Note");return (c('React').createElement('div',{className:"_iif"},c('React').createElement(c('XUIButton.react'),{label:n,onClick:function(o){return this.setState({isPageAdminNoteMode:true});}.bind(this)})));};m.prototype.$PagesManagerMessagingDetailContainer20=function(){'use strict';this.setState({isPageAdminNoteMode:false});};m.prototype.$PagesManagerMessagingDetailContainer21=function(){'use strict';return (this.props.config.enableComposer&&!this.state.isPageAdminNoteMode);};m.prototype.$PagesManagerMessagingDetailContainer22=function(){'use strict';return (this.props.config.enableComposer&&this.state.isPageAdminNoteMode);};m.prototype.render=function(){'use strict';return (c('React').createElement('div',null,this.props.config.enableUpdatedUI?c('React').createElement('div',null):c('React').createElement(c('PagesManagerMessagingThreadTitle.react'),{pageID:this.props.pageID,isContextCardEnabled:this.state.isContextCardEnabled,isContextCardHidden:this.state.hideContextCard,isBanFromPageEnabled:!this.state.isUserBanned,onIconClick:function(){return this.$PagesManagerMessagingDetailContainer23();}.bind(this),ref:'threadTitle',thread:this.state.thread}),c('React').createElement(c('Grid.react'),{alignv:'top',className:"_2utb",cols:this.state.isContextCardEnabled?2:1},c('React').createElement(l,{className:"_2utc"},!this.props.config.enableUpdatedUI?c('React').createElement('div',null):c('React').createElement(c('PagesManagerMessagingThreadTitle.react'),{pageID:this.props.pageID,isContextCardEnabled:this.state.isContextCardEnabled,isContextCardHidden:this.state.hideContextCard,isBanFromPageEnabled:!this.state.isUserBanned,onIconClick:function(){return this.$PagesManagerMessagingDetailContainer23();}.bind(this),ref:'threadTitle',thread:this.state.thread,updatedUI:true}),this.$PagesManagerMessagingDetailContainer17(),this.$PagesManagerMessagingDetailContainer19()),this.$PagesManagerMessagingDetailContainer18(this.state.scrollHeight)),c('React').createElement('div',{className:!this.$PagesManagerMessagingDetailContainer21()?"hidden_elem":''},c('React').createElement(c('PagesManagerMessagingComposerContainer.react'),{canUseHotlike:this.props.config.enableHotLike,canUseOmnipicker:this.props.config.enableOmnipicker,creatorInfo:this.props.config.creatorInfo,onInitialRender:function(){return this.$PagesManagerMessagingDetailContainer7();}.bind(this),onMessageOrAttachmentUpdate:function(){return this.$PagesManagerMessagingDetailContainer7();}.bind(this),onFocus:function(){return this.$PagesManagerMessagingDetailContainer15();}.bind(this),recipientID:this.state.thread?this.state.thread.other_user_fbid.toString():null,ref:'composer',threadElementID:this.state.threadID,threadID:this.state.threadID,userID:this.props.pageID})),c('React').createElement('div',{className:!this.$PagesManagerMessagingDetailContainer22()?"hidden_elem":''},c('React').createElement(c('PagesManagerMessagingNoteComposerContainer.react'),{creatorInfo:this.props.config.creatorInfo,key:'notecomposer',onDisablePageAdminNoteMode:function(){return (this.$PagesManagerMessagingDetailContainer20());}.bind(this),onMessageOrAttachmentUpdate:function(){return this.$PagesManagerMessagingDetailContainer7();}.bind(this),ref:'noteComposer',threadID:this.state.threadID,userID:this.props.pageID}))));};f.exports=c('FluxContainer').create(m,{withProps:true});},null);
__d('PagesManagerMessagingNotificationCountSubscriber',['Map','MercuryThreadInformer','PagesManagerMessagingFilterActions'],function a(b,c,d,e,f,g){'use strict';if(c.__markCompiled)c.__markCompiled();var h={_pageIDTokenMap:new (c('Map'))(),enableRealtimeNotificationCountUpdates:function(i){var j=h._pageIDTokenMap;if(j.has(i))return;var k=c('MercuryThreadInformer').getForFBID(i),l=k.subscribe('unread-updated',function(m,n){c('PagesManagerMessagingFilterActions').notifyNotificationCountChanged(i);});j.set(i,l);},disableRealtimeNotificationCountUpdates:function(i){var j=h._pageIDTokenMap;if(!j.has(i))return;var k=j.get(i);c('MercuryThreadInformer').getForFBID(i).unsubscribe(k);j['delete'](k);}};f.exports=h;},null);
__d('PagesManagerNavigationView.react',['cx','invariant','ContextualDialogArrow','ContextualLayerAutoFlip','Map','PagesManagerNavigationUnit','PopoverMenu.react','React','ReactXUIMenu','immutable'],function a(b,c,d,e,f,g,h,i){var j,k;if(c.__markCompiled)c.__markCompiled();var l=c('ReactXUIMenu').Item,m=c('immutable').List;j=babelHelpers.inherits(n,c('React').Component);k=j&&j.prototype;function n(o,p){'use strict';k.constructor.call(this,o,p);this.$PagesManagerNavigationView1=this.$PagesManagerNavigationView1.bind(this);this.$PagesManagerNavigationView2=this.$PagesManagerNavigationView2.bind(this);}n.prototype.$PagesManagerNavigationView3=function(o){'use strict';var p=this.$PagesManagerNavigationView4(o,this.props.tabbarUnits);if(p)return p;p=this.$PagesManagerNavigationView4(o,this.props.dropdownUnits);if(p)return p;i(0);};n.prototype.$PagesManagerNavigationView4=function(o,p){'use strict';var q=p.filter(function(r){return r.getKey()===o;});if(q.count()>0)return q.get(0);};n.prototype.$PagesManagerNavigationView1=function(o,p){'use strict';this.props.onUnitSelected(this.$PagesManagerNavigationView3(p.item.getValue()));};n.prototype.render=function(){'use strict';return (c('React').createElement('div',{className:"_-7a"},this.$PagesManagerNavigationView5(),this.$PagesManagerNavigationView6()));};n.prototype.$PagesManagerNavigationView2=function(o){'use strict';return (c('React').createElement(l,{key:o.getKey(),value:o.getKey()},c('React').createElement('div',{className:"_-7b"},o.getDisplayTitle())));};n.prototype.$PagesManagerNavigationView5=function(){'use strict';var o=this.props.activeDropdownUnit;if(this.props.dropdownUnits.size===0||!o)return null;var p=c('React').createElement(c('ReactXUIMenu'),{onItemClick:this.$PagesManagerNavigationView1},this.props.dropdownUnits.map(this.$PagesManagerNavigationView2));return (c('React').createElement(c('PopoverMenu.react'),{layerBehaviors:[c('ContextualDialogArrow'),c('ContextualLayerAutoFlip')],menu:p},c('React').createElement('div',{className:"_-7c"},o.getDisplayTitle())));};n.prototype.$PagesManagerNavigationView7=function(o){'use strict';var p=this.props.unitNotificationCountMap.get(o);return (c('React').createElement('div',babelHelpers['extends']({},this.props,{className:"_-7d"+(' '+"_-7e")+(o===this.props.activeTabbarUnit?' '+"_-7f":''),onClick:function(){return this.props.onUnitSelected(o);}.bind(this),key:o.getKey()}),c('React').createElement('div',{className:"_-7g _-7e"},o.getDisplayTitle().toString().toUpperCase()),c('React').createElement('div',{className:"_-7h"+(' '+"_-7e")+(p===0?' '+"hidden_elem":'')},p)));};n.prototype.$PagesManagerNavigationView6=function(){'use strict';return this.props.tabbarUnits.map(function(o){return this.$PagesManagerNavigationView7(o);}.bind(this));};f.exports=n;},null);
__d('PagesManagerMessagingFilterContainer.react',['PagesManagerMessagingFilterStore','FluxContainer','immutable','Map','PagesManagerMessagingFilterActions','PagesManagerMessagingNotificationCountSubscriber','PagesManagerNavigationUnit','PagesManagerNavigationView.react','React'],function a(b,c,d,e,f,g){'use strict';var h,i;if(c.__markCompiled)c.__markCompiled();var j=c('immutable').List;h=babelHelpers.inherits(k,c('React').Component);i=h&&h.prototype;function k(l){i.constructor.call(this,l);this.$PagesManagerMessagingFilterContainer1=function(m){c('PagesManagerMessagingFilterActions').changeFilter(this.props.pageID,m);}.bind(this);}k.getStores=function(){return [c('PagesManagerMessagingFilterStore')];};k.calculateState=function(l,m){return {activeFolder:c('PagesManagerMessagingFilterStore').getActiveFolder(),activeFilter:c('PagesManagerMessagingFilterStore').getActiveFilter(),folders:c('PagesManagerMessagingFilterStore').getAvailableFolders(),filters:c('PagesManagerMessagingFilterStore').getAvailableFilters(),unitNotificationCountMap:c('PagesManagerMessagingFilterStore').getUnitNotificationCountMap(m.pageID)};};k.prototype.componentWillMount=function(){c('PagesManagerMessagingNotificationCountSubscriber').enableRealtimeNotificationCountUpdates(this.props.pageID);};k.prototype.componentWillUnmount=function(){c('PagesManagerMessagingNotificationCountSubscriber').disableRealtimeNotificationCountUpdates(this.props.pageID);};k.prototype.render=function(){return (c('React').createElement(c('PagesManagerNavigationView.react'),{activeDropdownUnit:this.state.activeFolder,activeTabbarUnit:this.state.activeFilter,tabbarUnits:this.state.filters,dropdownUnits:this.state.folders,unitNotificationCountMap:this.state.unitNotificationCountMap,onUnitSelected:this.$PagesManagerMessagingFilterContainer1}));};f.exports=c('FluxContainer').create(k,{withProps:true});},null);
__d('PagesManagerAwayToggle.react',['cx','fbt','PagesManagerAwayToggleAction','BUISwitch.react','React','Tooltip'],function a(b,c,d,e,f,g,h,i){var j,k;if(c.__markCompiled)c.__markCompiled();j=babelHelpers.inherits(l,c('React').Component);k=j&&j.prototype;l.prototype.$PagesManagerAwayToggle1=function(m){'use strict';c('PagesManagerAwayToggleAction').setToggleStatus(this.props.pageID,m);};l.prototype.render=function(){'use strict';var m=i._("Stepping out? Set your status to Away for 12 hours. Change it if you get back sooner."),n=i._(["Away","8e0d60b5f4f0e61653bc5fce6cfff526"]);return (c('React').createElement('div',{className:"_4cdp"},c('React').createElement('div',{className:"_ast"},c('React').createElement(c('BUISwitch.react'),babelHelpers['extends']({onToggle:function(o){return this.$PagesManagerAwayToggle1(o);}.bind(this),value:this.props.isAway},c('Tooltip').propsFor(m)))),c('React').createElement('div',{className:"_asu"},n)));};function l(){'use strict';j.apply(this,arguments);}f.exports=l;},null);
__d('PagesManagerMessagingBatchActionHeader.react',['cx','fbt','PagesManagerMessagingBatchActionMenu.react','PagesMessagingActionPlacement','React','XUIPopoverButton.react'],function a(b,c,d,e,f,g,h,i){'use strict';var j,k;if(c.__markCompiled)c.__markCompiled();j=babelHelpers.inherits(l,c('React').Component);k=j&&j.prototype;l.prototype.render=function(){return (c('React').createElement(c('PagesManagerMessagingBatchActionMenu.react'),babelHelpers['extends']({layerBehaviors:[],placement:c('PagesMessagingActionPlacement').THREAD_LIST_BATCH_ACTION},this.props),c('React').createElement(c('XUIPopoverButton.react'),{className:"_3640",label:i._("Actions")})));};function l(){j.apply(this,arguments);}f.exports=l;},null);
__d('PagesManagerMessagingBatchActionHeaderContainer.react',['FluxContainer','MercuryPageThreadActions','MercuryThreads','PagesManagerMessagingNavigationUnitKey','PagesManagerMessagingBatchActionHeader.react','PagesManagerMessagingFilterStore','PagesMessengerThreadUtils','React'],function a(b,c,d,e,f,g){'use strict';var h,i;if(c.__markCompiled)c.__markCompiled();h=babelHelpers.inherits(j,c('React').Component);i=h&&h.prototype;function j(k,l){i.constructor.call(this,k,l);this.$PagesManagerMessagingBatchActionHeaderContainer1=c('MercuryPageThreadActions').getForFBID(k.pageID);}j.getStores=function(){return [c('PagesManagerMessagingFilterStore')];};j.calculateState=function(k,l){var m=c('PagesManagerMessagingFilterStore').getActiveFolderName(),n=c('PagesManagerMessagingFilterStore').getActiveFilterName(),o=c('MercuryThreads').getForFBID(l.pageID),p=false,q=false,r=false,s=false,t=false,u=false,v=false,w=false,x=false,y=0,z=0;l.selectedRows.forEach(function(ba){var ca=o.getThreadMetaNow(ba);if(c('PagesMessengerThreadUtils').isFlagThread(ca))y++;if(ca&&ca.unread_count===0)z++;});var aa=l.selectedRows.length;if(m===c('PagesManagerMessagingNavigationUnitKey').FOLDERS.INBOX&&n===c('PagesManagerMessagingNavigationUnitKey').FILTERS.ALL){p=true;s=true;u=aa-y>0;v=y>0;w=z<aa;x=z>0;}else if(m===c('PagesManagerMessagingNavigationUnitKey').FOLDERS.ARCHIVED&&n===c('PagesManagerMessagingNavigationUnitKey').FILTERS.ALL){q=true;r=true;}else if(m===c('PagesManagerMessagingNavigationUnitKey').FOLDERS.SPAM&&n===c('PagesManagerMessagingNavigationUnitKey').FILTERS.ALL){t=true;}else if(n===c('PagesManagerMessagingNavigationUnitKey').FILTERS.FLAGGED&&m===c('PagesManagerMessagingNavigationUnitKey').FOLDERS.INBOX){v=true;}else if(n===c('PagesManagerMessagingNavigationUnitKey').FILTERS.UNREAD&&m===c('PagesManagerMessagingNavigationUnitKey').FOLDERS.INBOX)w=true;return {inlineActionParam:{showArchive:p,showDelete:q,showUnarchive:r,showSpam:s,showUnspam:t,showFlag:u,showUnflag:v,showMarkRead:w,showMarkUnread:x}};};j.prototype.$PagesManagerMessagingBatchActionHeaderContainer2=function(){this.props.onSelectionClear();};j.prototype.render=function(){return (c('React').createElement(c('PagesManagerMessagingBatchActionHeader.react'),babelHelpers['extends']({onSelectionClear:function(){return this.$PagesManagerMessagingBatchActionHeaderContainer2();}.bind(this),pageID:this.props.pageID,showBatchAction:this.props.showBatchAction,selectedRows:this.props.selectedRows},this.state)));};f.exports=c('FluxContainer').create(j,{withProps:true});},null);
__d('PagesManagerMessagingFilterPanel.react',['cx','fbt','immutable','LeftRight.react','Link.react','MessengerSpinner.react','PageCustomTagSearchSource','PageCustomTagSearchableEntry','PagesContextCardCustomTag.react','PagesEnumTag.react','PagesManagerCustomTagsAction','PagesManagerManageCustomTagsDialog.react','PagesManagerMessagingFilterActions','PagesManagerMessagingThreadlistAction','React','ReactDOM','SearchableTextInput.react','ScrollableArea.react','Vector','nullthrows'],function a(b,c,d,e,f,g,h,i){'use strict';var j,k;if(c.__markCompiled)c.__markCompiled();var l=45;j=babelHelpers.inherits(m,c('React').Component);k=j&&j.prototype;function m(n){k.constructor.call(this,n);this.state={tagQuery:'',tagQueryResult:null};this.$PagesManagerMessagingFilterPanel1=this.$PagesManagerMessagingFilterPanel1.bind(this);this.$PagesManagerMessagingFilterPanel2=this.$PagesManagerMessagingFilterPanel2.bind(this);this.$PagesManagerMessagingFilterPanel3=this.$PagesManagerMessagingFilterPanel3.bind(this);this.$PagesManagerMessagingFilterPanel4=this.$PagesManagerMessagingFilterPanel4.bind(this);this.$PagesManagerMessagingFilterPanel5=this.$PagesManagerMessagingFilterPanel5.bind(this);this.$PagesManagerMessagingFilterPanel6=this.$PagesManagerMessagingFilterPanel6.bind(this);}m.prototype.$PagesManagerMessagingFilterPanel1=function(n){c('PagesManagerMessagingFilterActions').changeFilter(this.props.pageID,n);};m.prototype.$PagesManagerMessagingFilterPanel2=function(n){this.setState({tagQuery:'',tagQueryResult:null});c('PagesManagerMessagingThreadlistAction').addSearchCustomTag(this.props.pageID,n.name);};m.prototype.$PagesManagerMessagingFilterPanel7=function(){var n=this.props.height-l,o=c('ReactDOM').findDOMNode(this.refs.header);if(o!==null)n-=c('Vector').getElementDimensions(o).y;var p=c('ReactDOM').findDOMNode(this.refs.searchBar);if(p!==null)n-=c('Vector').getElementDimensions(p).y;return n;};m.prototype.$PagesManagerMessagingFilterPanel5=function(event){this.setState({tagQuery:event.target.value});};m.prototype.$PagesManagerMessagingFilterPanel3=function(n,o){if(o===this.state.tagQuery)this.setState({tagQueryResult:n.map(function(p){return p.getTitle();})});};m.prototype.$PagesManagerMessagingFilterPanel8=function(n){return (c('React').createElement(c('LeftRight.react'),{className:"_3v0k",key:n.getKey()},c('React').createElement(c('PagesEnumTag.react'),{onClick:this.$PagesManagerMessagingFilterPanel1,unit:n})));};m.prototype.$PagesManagerMessagingFilterPanel6=function(n){var o=null;if(this.props.currentSearchCustomTagNames.size!==0){if(this.props.currentSearchCustomTagThreadCounts)o=this.props.currentSearchCustomTagThreadCounts.get(n.name);}else o=n.threadCount;return (c('React').createElement(c('LeftRight.react'),{className:"_3v0k",key:n.id},c('React').createElement(c('PagesContextCardCustomTag.react'),{canRemove:false,key:n.id,tagData:n,onClick:this.$PagesManagerMessagingFilterPanel2}),c('React').createElement('span',{className:"_2-3_"},o!==null?o:c('React').createElement(c('MessengerSpinner.react'),null))));};m.prototype.$PagesManagerMessagingFilterPanel9=function(){var n=[];if(this.props.currentSearchCustomTagThreadCounts!==null){this.props.currentSearchCustomTagThreadCounts.forEach(function(o,p){n.push(this.props.customTags.get(p));}.bind(this));return n;}else this.props.customTags.forEach(function(o,p){if(!this.props.currentSearchCustomTagNames.contains(p))n.push(o);}.bind(this));return n;};m.prototype.$PagesManagerMessagingFilterPanel10=function(){var n=[],o=[];if(this.state.tagQuery!==''&&this.state.tagQueryResult!==null){o=c('nullthrows')(this.state.tagQueryResult).map(function(p){return this.$PagesManagerMessagingFilterPanel6(this.props.customTags.get(p));}.bind(this));}else{if(this.props.enumTags)this.props.enumTags.forEach(function(p){n.push(this.$PagesManagerMessagingFilterPanel8(p));}.bind(this));o=this.$PagesManagerMessagingFilterPanel9().map(function(p){return this.$PagesManagerMessagingFilterPanel6(p);}.bind(this));}return (c('React').createElement(c('ScrollableArea.react'),{className:"_3v0j",height:this.$PagesManagerMessagingFilterPanel7(),key:'tagList'},n,o));};m.prototype.$PagesManagerMessagingFilterPanel4=function(n){c('PagesManagerCustomTagsAction').toggleManageTagsDialog(this.props.pageID,n);};m.prototype.$PagesManagerMessagingFilterPanel11=function(){if(this.props.customTags.size!==0&&this.props.canManageTags)return (c('React').createElement(c('PagesManagerManageCustomTagsDialog.react'),{customTags:this.props.customTags,pageID:this.props.pageID,show:this.props.isManagingTags,onToggle:this.$PagesManagerMessagingFilterPanel4}));};m.prototype.render=function(){return (c('React').createElement('div',{className:"_5xjz",style:{height:this.props.height-l+'px'}},c('React').createElement(c('LeftRight.react'),{className:"_5xj_",ref:'header'},i._("LABELS"),this.props.canManageTags?c('React').createElement(c('Link.react'),{onClick:function(){return this.$PagesManagerMessagingFilterPanel4(true);}.bind(this)},i._("Manage")):c('React').createElement('span',null)),c('React').createElement(c('SearchableTextInput.react'),{className:"_30p_",onChange:this.$PagesManagerMessagingFilterPanel5,onEntriesFound:this.$PagesManagerMessagingFilterPanel3,placeholder:i._("Search labels..."),queryString:this.state.tagQuery,searchSource:c('PageCustomTagSearchSource').getInstance(this.$PagesManagerMessagingFilterPanel9(),false),ref:'searchBar'}),this.$PagesManagerMessagingFilterPanel10(),this.$PagesManagerMessagingFilterPanel11()));};f.exports=m;},null);
__d('PagesManagerMessagingFilterPanelContainer.react',['PagesManagerMessagingFilterStore','FluxContainer','immutable','PagesManagerCustomTagsAction','PagesManagerCustomTagsStore','PagesManagerMessagingFilterPanel.react','PagesManagerMessagingNavigationUnitKey','PagesManagerMessagingThreadlistAction','React','PagesManagerMessagingSearchStore'],function a(b,c,d,e,f,g){'use strict';var h,i;if(c.__markCompiled)c.__markCompiled();var j=c('PagesManagerMessagingNavigationUnitKey').FILTERS;h=babelHelpers.inherits(k,c('React').Component);i=h&&h.prototype;function k(l){i.constructor.call(this,l);}k.getStores=function(){return [c('PagesManagerMessagingFilterStore'),c('PagesManagerCustomTagsStore'),c('PagesManagerMessagingSearchStore')];};k.prototype.componentWillMount=function(){if(!c('PagesManagerCustomTagsStore').hasCustomTags(this.props.pageID))c('PagesManagerCustomTagsAction').fetch(this.props.pageID);};k.prototype.componentDidUpdate=function(){if(this.state.isFiltering&&this.state.currentSearchCustomTagNames.size!==0&&this.state.currentSearchCustomTagThreadCounts===null)c('PagesManagerMessagingThreadlistAction').fetchCustomTagThreadCounts(this.props.pageID);};k.calculateState=function(l,m){return {currentSearchCustomTagNames:c('PagesManagerMessagingSearchStore').getCurrentSearchCustomTagNames(),currentSearchCustomTagThreadCounts:c('PagesManagerMessagingSearchStore').getCurrentSearchCustomTagThreadCounts(),customTags:c('PagesManagerCustomTagsStore').getCustomTags(m.pageID),isManagingTags:c('PagesManagerCustomTagsStore').getIsManagingTags(),isFiltering:c('PagesManagerMessagingFilterStore').getIsFiltering()};};k.prototype.render=function(){var l=[];if(c('PagesManagerMessagingFilterStore').getActiveFilterName()===j.ALL&&this.state.currentSearchCustomTagNames.size===0){var m=c('PagesManagerMessagingFilterStore').getAvailableFilters();l=m.filter(function(n){return n.getKey()===j.FLAGGED;});}return (c('React').createElement(c('PagesManagerMessagingFilterPanel.react'),{canManageTags:this.props.enableManageTags,currentSearchCustomTagNames:this.state.currentSearchCustomTagNames,currentSearchCustomTagThreadCounts:this.state.currentSearchCustomTagThreadCounts,customTags:this.state.customTags,enumTags:l,height:this.props.height,isManagingTags:this.state.isManagingTags,pageID:this.props.pageID}));};f.exports=c('FluxContainer').create(k,{withProps:true});},null);
__d('PagesManagerMessagingFilterPanelSwitch.react',['ix','cx','fbt','ContextualDialogArrow','ContextualLayer.react','Image.react','PagesManagerMessagingFilterActions','PagesManagerMessagingFilterPanelContainer.react','React','fbglyph'],function a(b,c,d,e,f,g,h,i,j){'use strict';var k,l;if(c.__markCompiled)c.__markCompiled();k=babelHelpers.inherits(m,c('React').Component);l=k&&k.prototype;function m(n){l.constructor.call(this,n);this.$PagesManagerMessagingFilterPanelSwitch1=this.$PagesManagerMessagingFilterPanelSwitch1.bind(this);}m.prototype.$PagesManagerMessagingFilterPanelSwitch1=function(){c('PagesManagerMessagingFilterActions').toggleFilterPanel(this.props.pageID,!this.props.isFiltering);};m.prototype.render=function(){return (c('React').createElement('span',null,c('React').createElement('span',{className:"_5pwy",onClick:this.$PagesManagerMessagingFilterPanelSwitch1,ref:'contextRef'},c('React').createElement('span',{className:"_5pwz"+(this.props.isFiltering?' '+"_5px3":'')},j._("Filter")),c('React').createElement(c('Image.react'),{className:"_5px4",src:this.props.isFiltering?h("\/images\/assets_DO_NOT_HARDCODE\/fb_glyphs\/chevron-down_16_fig-black.png"):h("\/images\/assets_DO_NOT_HARDCODE\/fb_glyphs\/chevron-down_16_fig-light-30.png")})),c('React').createElement(c('ContextualLayer.react'),{alignment:'right',containerWidthMatchContext:false,contextRef:function(){return this.refs.contextRef;}.bind(this),layerBehaviors:[c('ContextualDialogArrow')],shown:this.props.isFiltering,offsetX:12,offsetY:16,position:'below'},c('React').createElement(c('PagesManagerMessagingFilterPanelContainer.react'),{pageID:this.props.pageID,height:this.props.height,enableManageTags:this.props.enableManageTags}))));};f.exports=m;},null);
__d('PagesManagerMessagingList.react',['cx','fbt','Link.react','PagesManagerListRowContainer.react','PagesManagerAction','PagesMessagingSearchMode','PagesSelectableList.react','React','emptyFunction'],function a(b,c,d,e,f,g,h,i){var j,k;if(c.__markCompiled)c.__markCompiled();j=babelHelpers.inherits(l,c('React').Component);k=j&&j.prototype;l.prototype.$PagesManagerMessagingList1=function(m){'use strict';c('PagesManagerAction').viewListItem(m);};l.prototype.$PagesManagerMessagingList2=function(){'use strict';if(!this.props.isInSearchMode){if(!this.props.list.length){if(!this.props.initLoading){return [this.props.emptyView];}else return [this.$PagesManagerMessagingList3()];}else return this.$PagesManagerMessagingList4();}else return this.$PagesManagerMessagingList5();};l.prototype.$PagesManagerMessagingList5=function(){'use strict';var m=null,n=[];switch(this.props.searchMode){case c('PagesMessagingSearchMode').MESSAGE_SEARCH:m=i._("Messages that contain '{message search term}'",[i.param('message search term',this.props.searchTerm)]);Object.keys(this.props.snippetSearchResult).forEach(function(p){n.push(c('React').createElement(c('PagesManagerListRowContainer.react'),babelHelpers['extends']({ChildClass:this.props.listRowContainer,disableCheckBox:true,listItem:p,pageID:this.props.pageID,ref:p,key:p,onViewingListItem:this.$PagesManagerMessagingList1,snippetSearchResult:this.props.snippetSearchResult[p],highlightText:this.props.searchTerm,useHighlightTitle:false,type:'li'},this.props.containerProps)));}.bind(this));break;case c('PagesMessagingSearchMode').NAME_SEARCH:m=i._("Names that contain '{message search term}'",[i.param('message search term',this.props.searchTerm)]);n=this.props.searchResult.map(function(p){return (c('React').createElement(c('PagesManagerListRowContainer.react'),babelHelpers['extends']({ChildClass:this.props.listRowContainer,disableCheckBox:true,listItem:p,pageID:this.props.pageID,ref:p,key:p,onViewingListItem:this.$PagesManagerMessagingList1,highlightText:this.props.searchTerm,useHighlightTitle:true,type:'li'},this.props.containerProps)));}.bind(this));break;}m=c('React').createElement('li',{className:"_16-z",key:'searchTitle'},m);var o=this.props.hasMoreResult?c('React').createElement('li',{className:"_2b19",key:'loadMoreResult'},c('React').createElement(c('Link.react'),{onClick:this.props.loadMore.bind(null,this.props.searchMode,this.props.searchTerm)},i._("See more results"))):c('React').createElement('li',{className:"_3o39",key:'loadMoreResult'});return [m].concat(n,[o]);};l.prototype.$PagesManagerMessagingList3=function(){'use strict';return c('React').createElement('div',{key:'loading'});};l.prototype.$PagesManagerMessagingList4=function(){'use strict';return this.props.list.map(function(m){return (c('React').createElement(c('PagesManagerListRowContainer.react'),babelHelpers['extends']({ChildClass:this.props.listRowContainer,listItem:m,pageID:this.props.pageID,ref:this.props.getKey(m),key:this.props.getKey(m),onViewingListItem:this.$PagesManagerMessagingList1,type:'li'},this.props.containerProps)));}.bind(this));};l.prototype.render=function(){'use strict';var m=this.$PagesManagerMessagingList2();return (c('React').createElement(c('PagesSelectableList.react'),{actionBarRightComponent:this.props.actionBarRightContainer,customLeftComponent:this.props.folderDropDown,deselectAllLabel:'',hideBatchAction:this.props.isInSearchMode,enableOnVisible:!this.props.isInSearchMode&&this.props.hasMoreResult,forceRequestMoreRows:!this.props.isInSearchMode,height:this.props.height,header:this.props.header,loadingIndicator:this.props.loadingMoreSpinner,onSelectionChange:this.props.onSelectionChange,onRequestMoreRows:this.props.isInSearchMode?c('emptyFunction'):this.props.onScroll,ref:'selectableList',scrollableAreaMode:true,scrollableAreaHasShadow:false,scrollableAreaOnScroll:this.props.handleScroll,scrollableWidth:this.props.scrollableWidth,selectAllLabel:this.props.selectAllLabel},m));};l.prototype.clearSelection=function(){'use strict';this.refs.selectableList.clearSelection();};function l(){'use strict';j.apply(this,arguments);}f.exports=l;},null);
__d('MercuryPageSeenIndicator.react',['cx','MercuryIDs','MercurySeenIndicator.react','React'],function a(b,c,d,e,f,g,h){'use strict';var i,j;if(c.__markCompiled)c.__markCompiled();i=babelHelpers.inherits(k,c('React').Component);j=i&&i.prototype;k.prototype.render=function(){if(this.props.snippetSearchResult){var l=this.props.snippetSearchResult.num_total_snippets;if(l===1){var m=this.props.snippetSearchResult.snippets[0].author,n=c('MercuryIDs').getParticipantIDFromUserID(this.props.viewer);if(m===n)return (c('React').createElement('span',{className:"_3jy5 repliedLast"}));}return (c('React').createElement('span',null));}else return (c('React').createElement(c('MercurySeenIndicator.react'),{thread:this.props.thread,viewer:this.props.viewer}));};function k(){i.apply(this,arguments);}f.exports=k;},null);
__d('MercuryPageThreadTitle.react',['DOM','MercuryMessageRenderer','MercuryThreadTitle.react','React','ReactDOM'],function a(b,c,d,e,f,g){'use strict';var h,i;if(c.__markCompiled)c.__markCompiled();h=babelHelpers.inherits(j,c('MercuryThreadTitle.react'));i=h&&h.prototype;j.prototype.render=function(){return (c('React').createElement('div',{className:this.props.className},c('React').createElement('span',{ref:'title'})));};j.prototype.componentDidUpdate=function(){var k=this.props.thread.name?this.$MercuryPageThreadTitle1():this.state.participantNames;if(this.props.useHighlightTitle){var l=k.toLowerCase().search(this.props.highlightText.toLowerCase()),m={};m[l]=this.props.highlightText;k=c('MercuryMessageRenderer').formatMessageBody(k,m);}c('DOM').setContent(c('ReactDOM').findDOMNode(this.refs.title),k);};function j(){h.apply(this,arguments);}j.defaultProps={isNewThread:false,showUnreadCount:false,useShortName:false,useAndSeparator:false};f.exports=j;},null);
__d('PagesManagerMessagingListRow.react',['csx','cx','fbt','ContextualDialogArrow','ContextualLayerAutoFlip','CSS','PagesManagerMessagingFilterStore','Image.react','Layout.react','Link.react','MercuryPageSeenIndicator.react','MercuryPageThreadTitle.react','MercuryThreadSnippet.react','MercuryThreadTimestamp.react','PagesContextCardCustomTag.react','PagesEnumTag.react','PagesManagerMessagingBatchActionMenu.react','PagesManagerMessagingThreadlistAction','PagesMessagingActionPlacement','PagesSelectableListRow.react','React','ReactDOM','PagesManagerMessagingNavigationUnitKey','Vector','XUIBadge.react'],function a(b,c,d,e,f,g,h,i,j){var k,l;if(c.__markCompiled)c.__markCompiled();var m=25,n=c('Layout.react').Column,o=c('Layout.react').FillColumn;k=babelHelpers.inherits(p,c('React').Component);l=k&&k.prototype;p.prototype.componentDidMount=function(){'use strict';this.$PagesManagerMessagingListRow1(0);};p.prototype.componentDidUpdate=function(q,r){'use strict';if(q.isFlagged!==this.props.isFlagged||q.selected!==this.props.selected||q.isViewing!==this.props.isViewing||this.props.customTagsData.length!==q.customTagsData.length)this.$PagesManagerMessagingListRow1(0);};p.prototype.$PagesManagerMessagingListRow1=function(q){'use strict';if(q===null)q=0;if(this.refs.tagBlock&&this.refs.tags){var r=c('Vector').getElementDimensions(c('ReactDOM').findDOMNode(this.refs.tagBlock)).x,s=c('Vector').getElementDimensions(c('ReactDOM').findDOMNode(this.refs.tags)).x;if(r+q<s){this.setState({showFadding:true});}else this.setState({showFadding:false});}};p.prototype.$PagesManagerMessagingListRow2=function(){'use strict';if(!this.props.isViewing&&!this.props.selected)this.$PagesManagerMessagingListRow1(m);};function p(q){'use strict';l.constructor.call(this,q);this.state={menuShown:false,showFadding:false};this.$PagesManagerMessagingListRow1=this.$PagesManagerMessagingListRow1.bind(this);this.$PagesManagerMessagingListRow2=this.$PagesManagerMessagingListRow2.bind(this);this.$PagesManagerMessagingListRow3=this.$PagesManagerMessagingListRow3.bind(this);}p.prototype.renderSnippetSearchResult=function(){'use strict';var q=this.props.snippetSearchResult.num_total_snippets;if(q===1){return (c('React').createElement('div',null,this.props.snippetSearchResult.snippets[0].body));}else return (c('React').createElement('div',null,j._("Found {number of messages found} Results",[j.param('number of messages found',q)])));};p.prototype.$PagesManagerMessagingListRow4=function(){'use strict';return (c('React').createElement('div',null,c('React').createElement(c('Layout.react'),null,c('React').createElement(n,null,c('React').createElement(c('MercuryPageThreadTitle.react'),{className:"_1a_3",highlightText:this.props.highlightText,showUnreadCount:false,thread:this.props.thread,useShortName:false,useHighlightTitle:this.props.useHighlightTitle,viewer:this.props.pageID})),c('React').createElement(o,null),c('React').createElement(n,{className:"_55hu"+(this.props.isFlagged?' '+"_1hog":'')},c('React').createElement(c('MercuryThreadTimestamp.react'),{time:this.props.thread.timestamp,title:this.props.thread.timestamp_absolute,text:this.props.thread.timestamp_relative}))),c('React').createElement(c('Layout.react'),{className:"_1a_6"},c('React').createElement(n,{className:"_1hgx"},c('React').createElement(c('MercuryPageSeenIndicator.react'),{snippetSearchResult:this.props.snippetSearchResult,thread:this.props.thread,viewer:this.props.pageID})),c('React').createElement(o,{className:"_1a_7"},this.props.snippetSearchResult?this.renderSnippetSearchResult():c('React').createElement(c('MercuryThreadSnippet.react'),{participants:this.props.participants,shouldRenderYou:false,thread:this.props.thread,viewer:this.props.pageID})),c('React').createElement(n,null,c('React').createElement(c('PagesManagerMessagingBatchActionMenu.react'),{alignh:'right',layerBehaviors:[c('ContextualDialogArrow'),c('ContextualLayerAutoFlip')],onHide:function(){this.setState({menuShown:false});}.bind(this),onShow:function(){this.setState({menuShown:true});}.bind(this),pageID:this.props.pageID,inlineActionParam:this.props.inlineActionParam,placement:c('PagesMessagingActionPlacement').THREAD_ROW_ACTION_ICON,selectedRows:[this.props.thread.thread_id],showBatchAction:true},c('React').createElement('span',{className:"_4hq1",onClick:function(event){return event.stopPropagation();}}))))));};p.prototype.$PagesManagerMessagingListRow3=function(q){'use strict';c('PagesManagerMessagingThreadlistAction').addSearchCustomTag(this.props.pageID,q.name);};p.prototype.$PagesManagerMessagingListRow5=function(){'use strict';if(!this.props.updatedUI&&this.props.customTagsData.length===0&&!this.props.isFlagged)return null;var q=this.props.customTagsData,r=null;if(this.props.isFlagged)r=c('React').createElement(c('PagesEnumTag.react'),{unit:c('PagesManagerMessagingFilterStore').getFilterByKey(c('PagesManagerMessagingNavigationUnitKey').FILTERS.FLAGGED)});return (c('React').createElement('div',{className:"_1woq",ref:'tagBlock'},c('React').createElement('span',{ref:'tags'},r,q.map(function(s){return (c('React').createElement(c('PagesContextCardCustomTag.react'),{key:s.name,canRemove:false,tagData:s,onClick:this.$PagesManagerMessagingListRow3}));}.bind(this))),!this.state.showFadding?c('React').createElement('span',null):c('React').createElement('span',{className:"_1wor"}),!this.state.showFadding?c('React').createElement('span',null):c('React').createElement('span',{className:"_1ytz"})));};p.prototype.$PagesManagerMessagingListRow6=function(){'use strict';return (c('React').createElement('div',{onMouseEnter:this.$PagesManagerMessagingListRow1.bind(this,0),onMouseLeave:this.$PagesManagerMessagingListRow2},this.props.imageSource?c('React').createElement(c('Image.react'),{className:"_2fp5",src:this.props.imageSource}):c('React').createElement('div',{className:"_2fp5"}),c('React').createElement('div',{className:"_55hu"},c('React').createElement(c('MercuryThreadTimestamp.react'),{time:this.props.thread.timestamp,title:this.props.thread.timestamp_absolute,text:this.props.thread.timestamp_relative})),c('React').createElement(c('PagesManagerMessagingBatchActionMenu.react'),{alignh:'right',layerBehaviors:[c('ContextualDialogArrow'),c('ContextualLayerAutoFlip')],onHide:function(){this.setState({menuShown:false});}.bind(this),onShow:function(){this.setState({menuShown:true});}.bind(this),pageID:this.props.pageID,inlineActionParam:this.props.inlineActionParam,placement:c('PagesMessagingActionPlacement').THREAD_ROW_ACTION_ICON,selectedRows:[this.props.thread.thread_id],showBatchAction:true},c('React').createElement('span',{className:"_4hq1",onClick:function(event){return event.stopPropagation();}})),c('React').createElement(c('Layout.react'),null,c('React').createElement(o,{className:"_2fp6"},c('React').createElement(c('MercuryPageThreadTitle.react'),{className:"_1a_3",highlightText:this.props.highlightText,showUnreadCount:false,thread:this.props.thread,useShortName:false,useHighlightTitle:this.props.useHighlightTitle,viewer:this.props.pageID}),c('React').createElement('div',{className:"_1a_7"},this.props.snippetSearchResult?this.renderSnippetSearchResult():c('React').createElement(c('MercuryThreadSnippet.react'),{participants:this.props.participants,shouldRenderYou:false,thread:this.props.thread,viewer:this.props.pageID})),this.$PagesManagerMessagingListRow5()),c('React').createElement(n,{className:"_2fp8"},this.props.thread.unread_count>0?c('React').createElement('div',{className:"_2fp9"},c('React').createElement(c('XUIBadge.react'),{count:this.props.thread.unread_count,maxcount:99})):c('React').createElement('div',{className:"_2fpa"},c('React').createElement(c('MercuryPageSeenIndicator.react'),{snippetSearchResult:this.props.snippetSearchResult,thread:this.props.thread,viewer:this.props.pageID}))))));};p.prototype.render=function(){'use strict';return (c('React').createElement(c('PagesSelectableListRow.react'),{disabled:this.props.disableCheckBox,onSelected:this.props.onSelected,onClick:function(event){if(c('CSS').matchesSelector(event.target.parentElement,"._4vbb"))return;this.props.onViewingListItem(this.props.listItem);}.bind(this),selected:this.props.selected,className:"_1a_0"+(this.props.isUnread?' '+"_1a_1":'')+(this.props.isViewing&&!this.props.selected?' '+"_3wxb":'')+(this.state.menuShown?' '+"_1hgw":'')+(' '+"_o3f")+(this.props.config.enableUpdatedUI?' '+"_2fpb":'')+(this.props.config.enableUpdatedUI?' '+"_1yt-":'')+(this.props.config.enableUpdatedUI&&this.props.selectionMode?' '+"_ptw":'')},c('React').createElement('div',{className:"_5x5y"+(!this.props.isFlagged||this.props.config.enableUpdatedUI?' '+"hidden_elem":'')}),this.props.config.enableUpdatedUI?this.$PagesManagerMessagingListRow6():this.$PagesManagerMessagingListRow4()));};p.defaultProps={disableCheckBox:false,useHighlightTitle:false};f.exports=p;},null);
__d('PagesManagerMessagingListRowContainer.react',['immutable','PagesManagerMessagingListRow.react','MercuryIDs','MercuryParticipants','MercuryThreads','PagesManagerCustomTagsStore','PagesManagerMessagingFilterStore','PagesManagerMessagingThreadInteractionHelper','PagesMessengerThreadUtils','React'],function a(b,c,d,e,f,g){var h,i;if(c.__markCompiled)c.__markCompiled();var j=c('immutable').Map;h=babelHelpers.inherits(k,c('React').Component);i=h&&h.prototype;function k(l){'use strict';i.constructor.call(this,l);this.$PagesManagerMessagingListRowContainer1=this.$PagesManagerMessagingListRowContainer1.bind(this);}k.prototype.componentWillMount=function(){'use strict';var l=c('MercuryThreads').getForFBID(this.props.pageID).getThreadMetaNow(this.props.listItem),m=c('MercuryIDs').getParticipantIDFromUserID(l.other_user_fbid);c('MercuryParticipants').get(m,function(n){this.setState({imageSource:n.image_src});}.bind(this));this.setState({inlineActionParam:c('PagesMessengerThreadUtils').getBatchActionMenuParam(l),thread:l,participants:j(c('immutable').Seq(l.participants).map(function(n){return [n,c('MercuryParticipants').getOrFetch(n)];}))});};k.prototype.render=function(){'use strict';var l=this.state.thread.unread_count&&this.state.thread.unread_count>0,m=this.state.thread.page_thread_info&&this.state.thread.page_thread_info.flagged,n=this.state.thread.page_thread_info&&this.state.thread.page_thread_info.customTagNames,o=c('PagesManagerCustomTagsStore').getCustomTags(this.props.pageID),p=[];(n||[]).map(function(t){if(o.has(t))p.push(o.get(t));});var q=this.props,r=q.onViewingListItem,s=babelHelpers.objectWithoutProperties(q,['onViewingListItem']);return (c('React').createElement(c('PagesManagerMessagingListRow.react'),babelHelpers['extends']({customTagsData:p,imageSource:this.state.imageSource,isFlagged:m,isUnread:l,onViewingListItem:this.$PagesManagerMessagingListRowContainer1,thread:this.state.thread},s,this.state)));};k.prototype.updateThread=function(){'use strict';var l=c('MercuryThreads').getForFBID(this.props.pageID).getThreadMetaNow(this.props.listItem);this.setState({thread:l,inlineActionParam:c('PagesMessengerThreadUtils').getBatchActionMenuParam(l)});};k.prototype.$PagesManagerMessagingListRowContainer1=function(l){'use strict';c('PagesManagerMessagingThreadInteractionHelper').handleUnreadStateUpdate(l,this.props.pageID,c('PagesManagerMessagingFilterStore').getActiveFilterName());c('PagesManagerMessagingThreadInteractionHelper').handlePermalinkUpdate(l,this.props.pageID);this.props.onViewingListItem(l);};k.defaultProps={useHighlightTitle:false};f.exports=k;},null);
__d('PagesManagerMessagingSearchInput.react',['cx','fbt','ContextualLayer.react','LayerHideOnEscape','PageCustomTagSearchableEntry','PageCustomTagTypeaheadPresenter.react','React','SearchableTextInput.react','SearchableEntry','TokenizerToken.react','joinClasses'],function a(b,c,d,e,f,g,h,i){var j,k;if(c.__markCompiled)c.__markCompiled();var 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.$PagesManagerMessagingSearchInput1=this.$PagesManagerMessagingSearchInput1.bind(this);this.$PagesManagerMessagingSearchInput2=this.$PagesManagerMessagingSearchInput2.bind(this);this.$PagesManagerMessagingSearchInput3=this.$PagesManagerMessagingSearchInput3.bind(this);this.$PagesManagerMessagingSearchInput4=this.$PagesManagerMessagingSearchInput4.bind(this);this.$PagesManagerMessagingSearchInput5=this.$PagesManagerMessagingSearchInput5.bind(this);this.$PagesManagerMessagingSearchInput6=this.$PagesManagerMessagingSearchInput6.bind(this);this.$PagesManagerMessagingSearchInput7=this.$PagesManagerMessagingSearchInput7.bind(this);this.state={query:'',showLayer:false,matchedLabels:[],highlightedEntry:{}};}m.prototype.$PagesManagerMessagingSearchInput1=function(){'use strict';this.setState({showLayer:false});};m.prototype.$PagesManagerMessagingSearchInput8=function(n,event){'use strict';this.setState({showLayer:false});switch(n){case 'message':this.props.searchMessage.call(this,event);break;case 'name':this.props.searchName.call(this,event);break;}};m.prototype.$PagesManagerMessagingSearchInput9=function(n){'use strict';return (c('React').createElement('div',{className:"_4j2v"},c('React').createElement('li',{className:"_4j2w",'data-query':this.state.query,onMouseDown:this.$PagesManagerMessagingSearchInput8.bind(this,'message')},i._("Messages that contain '{message search term}'",[i.param('message search term',this.state.query)])),c('React').createElement('li',{className:"_4j2x",'data-query':this.state.query,onMouseDown:this.$PagesManagerMessagingSearchInput8.bind(this,'name')},i._("Names that contain '{message search term}'",[i.param('message search term',this.state.query)]))));};m.prototype.$PagesManagerMessagingSearchInput10=function(n){'use strict';var o=this.state.matchedLabels.filter(function(q){return !n.hasOwnProperty(q.getUniqueID());});if(o.length==0){return c('React').createElement('div',null);}else{var p=c('PageCustomTagTypeaheadPresenter.react').ViewRenderer;return (c('React').createElement('div',null,c('React').createElement('li',{className:"_5n87"},i._("Labels")),c('React').createElement(p,{entries:o,highlightedEntry:this.state.highlightedEntry,onHighlight:this.$PagesManagerMessagingSearchInput5,removeHighlight:this.$PagesManagerMessagingSearchInput6,onSelect:this.$PagesManagerMessagingSearchInput7,searchBar:true})));}};m.prototype.$PagesManagerMessagingSearchInput11=function(n,o){'use strict';var p=this.props.TokenRenderer||c('TokenizerToken.react'),q=c('joinClasses')("_2ei6",this.props.tokenClassName);return (c('React').createElement(p,{className:q,key:n.getUniqueID(),label:n.getTitle(),entry:n,index:o,onRemove:this.props.onRemove}));};m.prototype.$PagesManagerMessagingSearchInput2=function(n){'use strict';var o=n.target.value,p=true;if(o===''){p=false;this.props.onClear();}this.setState({query:o,showLayer:p});};m.prototype.$PagesManagerMessagingSearchInput3=function(n,o){'use strict';this.setState({matchedLabels:n});};m.prototype.$PagesManagerMessagingSearchInput4=function(){'use strict';if(this.state.query!==''){this.refs.input.getTextFieldDOM().select();this.setState({showLayer:true});}};m.prototype.$PagesManagerMessagingSearchInput5=function(n){'use strict';this.setState({highlightedEntry:n});};m.prototype.$PagesManagerMessagingSearchInput6=function(){'use strict';this.setState({highlightedEntry:{}});};m.prototype.$PagesManagerMessagingSearchInput7=function(n){'use strict';this.props.addCustomTag(n);this.setState({query:''});};m.prototype.render=function(){'use strict';var n=this.props.entries&&this.props.entries.length>0,o=this.props.entries.map(this.$PagesManagerMessagingSearchInput11,this),p={},q;if(n)for(var r=0,s=this.props.entries.length;r<s;r++){var t=this.props.entries[r];q=t.getUniqueID();p[q]=true;}var u=this.props,v=u.className,w=u.placeholder,x=babelHelpers.objectWithoutProperties(u,['className','placeholder']);v=c('joinClasses')("_29s6"+(n?' '+"_29s7":''),v);w=n?'':this.props.placeholder;return (c('React').createElement('div',{className:v},c('React').createElement('div',{className:"_29s8"},o),c('React').createElement(c('SearchableTextInput.react'),babelHelpers['extends']({onBlur:this.$PagesManagerMessagingSearchInput1,onChange:this.$PagesManagerMessagingSearchInput2,onFocus:this.$PagesManagerMessagingSearchInput4,onEntriesFound:this.$PagesManagerMessagingSearchInput3,placeholder:w,queryString:this.state.query,ref:'input'},x)),this.props.contextRef&&this.props.contextRef()?c('React').createElement(c('ContextualLayer.react'),{behaviors:{LayerHideOnEscape:c('LayerHideOnEscape')},containerWidthMatchContext:true,contextRef:this.props.contextRef,shown:this.state.showLayer,position:'below'},this.$PagesManagerMessagingSearchInput9(p)):null));};m.propTypes={addCustomTag:l.func,contextRef:l.func,searchMessage:l.func,searchName:l.func,textInputClassName:String,tokenClassName:String,TokenRenderer:l.element,entries:l.arrayOf(l.instanceOf(c('SearchableEntry')))};f.exports=m;},null);
__d('PagesManagerMessagingSearchView.react',['cx','fbt','ix','AbstractTextInput.react','AbstractTokenizer.react','PagesManagerMessagingFilterStore','Image.react','immutable','PageCustomTagSearchableEntry','PageCustomTagSearchSource','PageCustomTagTypeaheadPresenter.react','PagesContextCardCustomTagsBlock.react','PagesEnumTag.react','PagesManagerMessagingFilterActions','React','PagesManagerMessagingSearchInput.react','PagesMessagingSearchMode','PagesManagerMessagingThreadlistAction','PagesManagerMessagingNavigationUnitKey','XUICloseButton.react'],function a(b,c,d,e,f,g,h,i,j){'use strict';var k,l;if(c.__markCompiled)c.__markCompiled();k=babelHelpers.inherits(m,c('React').Component);l=k&&k.prototype;function m(n,o){l.constructor.call(this,n,o);this.$PagesManagerMessagingSearchView1=function(p){c('PagesManagerMessagingThreadlistAction').changeSearchTerm(this.props.pageID,p.target.value,c('PagesManagerMessagingFilterStore').getActiveFolderName(),c('PagesMessagingSearchMode').ALL);}.bind(this);this.$PagesManagerMessagingSearchView2=function(){c('PagesManagerMessagingThreadlistAction').resetSearch(this.props.pageID);}.bind(this);this.$PagesManagerMessagingSearchView3=function(p){if(p.key==='Escape')c('PagesManagerMessagingThreadlistAction').resetSearch(this.props.pageID);}.bind(this);this.$PagesManagerMessagingSearchView4=this.$PagesManagerMessagingSearchView4.bind(this);this.$PagesManagerMessagingSearchView5=this.$PagesManagerMessagingSearchView5.bind(this);this.$PagesManagerMessagingSearchView10=this.$PagesManagerMessagingSearchView10.bind(this);this.$PagesManagerMessagingSearchView6=this.$PagesManagerMessagingSearchView6.bind(this);this.$PagesManagerMessagingSearchView8=function(p){c('PagesManagerMessagingThreadlistAction').changeSearchTerm(this.props.pageID,p.target.dataset.query,c('PagesManagerMessagingFilterStore').getActiveFolderName(),c('PagesMessagingSearchMode').NAME_SEARCH);this.setState({showLayer:false});}.bind(this);this.$PagesManagerMessagingSearchView9=function(p){c('PagesManagerMessagingThreadlistAction').changeSearchTerm(this.props.pageID,p.target.dataset.query,c('PagesManagerMessagingFilterStore').getActiveFolderName(),c('PagesMessagingSearchMode').MESSAGE_SEARCH);this.setState({showLayer:false});}.bind(this);this.$PagesManagerMessagingSearchView7=function(p){if(this.state.query!=='')this.setState({showLayer:true});}.bind(this);this.state={query:'',showLayer:false,highlightedEntry:{}};}m.prototype.$PagesManagerMessagingSearchView6=function(n){var o=n.target.value,p=true;if(o==='')p=false;this.setState({query:o,showLayer:p});};m.prototype.$PagesManagerMessagingSearchView4=function(n){c('PagesManagerMessagingThreadlistAction').addSearchCustomTag(this.props.pageID,n);};m.prototype.$PagesManagerMessagingSearchView5=function(n){c('PagesManagerMessagingThreadlistAction').removeSearchCustomTag(this.props.pageID,n);};m.prototype.$PagesManagerMessagingSearchView10=function(){c('PagesManagerMessagingFilterActions').changeFilter(this.props.pageID,c('PagesManagerMessagingFilterStore').getAvailableFilters().get(0));};m.prototype.$PagesManagerMessagingSearchView11=function(){var n=[];this.props.currentSearchCustomTagNames.toArray().map(function(o){if(this.props.customTagSearchSource.has(o))n.push(this.props.customTagSearchSource.get(o));}.bind(this));return n;};m.prototype.$PagesManagerMessagingSearchView12=function(){return this.$PagesManagerMessagingSearchView11().map(function(n){return new (c('PageCustomTagSearchableEntry'))(n);});};m.prototype.$PagesManagerMessagingSearchView13=function(){var n={};this.$PagesManagerMessagingSearchView12().map(function(o){n[o.getUniqueID()]=o;});return n;};m.prototype.$PagesManagerMessagingSearchView14=function(){var n=i._("Search messages...");if(this.props.enableSeparateSearch)n=i._("Search people and messages");if(!this.props.enableTagSearch||this.props.customTagSearchSource.count()===0){return (c('React').createElement('span',null,c('React').createElement(c('AbstractTextInput.react'),{className:"_5ptj",onChange:this.$PagesManagerMessagingSearchView1,onKeyDown:this.$PagesManagerMessagingSearchView3,placeholder:n,value:this.props.initSearchTerm}),c('React').createElement(c('XUICloseButton.react'),{className:"_3i2o",onClick:this.$PagesManagerMessagingSearchView2,size:'medium'})));}else if(this.props.enableSeparateSearch){return (c('React').createElement(c('PagesManagerMessagingSearchInput.react'),{addCustomTag:function(o){return this.$PagesManagerMessagingSearchView4(o.getTitle());}.bind(this),className:"_5ptj",contextRef:function(){return this.refs.input;}.bind(this),onClick:this.$PagesManagerMessagingSearchView7,onClear:this.$PagesManagerMessagingSearchView2,onRemove:function(o){return this.$PagesManagerMessagingSearchView5(o.getTitle());}.bind(this),placeholder:n,searchSource:c('PageCustomTagSearchSource').getInstance(this.props.customTagSearchSource.toArray(),false),searchMessage:this.$PagesManagerMessagingSearchView9,searchName:this.$PagesManagerMessagingSearchView8,entries:this.props.showTagsInSearchBox?this.$PagesManagerMessagingSearchView12():[],excludedEntries:this.$PagesManagerMessagingSearchView13(),TokenRendere:c('PageCustomTagTypeaheadPresenter.react').ViewRenderer}));}else return (c('React').createElement(c('AbstractTokenizer.react'),{className:"_5ptj",autoHighlight:false,entries:this.props.showTagsInSearchBox?this.$PagesManagerMessagingSearchView12():[],excludedEntries:this.$PagesManagerMessagingSearchView13(),onAddEntryAttempt:function(o){return this.$PagesManagerMessagingSearchView4(o.getTitle());}.bind(this),onChange:this.$PagesManagerMessagingSearchView1,onRemoveEntryAttempt:this.$PagesManagerMessagingSearchView5,placeholder:n,presenter:c('PageCustomTagTypeaheadPresenter.react'),value:this.props.initSearchTerm,searchSource:c('PageCustomTagSearchSource').getInstance(this.props.customTagSearchSource.toArray(),false),showEntriesOnFocus:true}));};m.prototype.$PagesManagerMessagingSearchView15=function(){if(this.props.showTagsInSearchBox||this.props.currentSearchCustomTagNames.toArray().length===0&&this.props.activeFilter.getKey()!==c('PagesManagerMessagingNavigationUnitKey').FILTERS.FLAGGED)return null;return (c('React').createElement('div',{className:"_4w11"},this.props.activeFilter.getKey()===c('PagesManagerMessagingNavigationUnitKey').FILTERS.FLAGGED?c('React').createElement(c('PagesEnumTag.react'),{canRemove:true,onRemove:this.$PagesManagerMessagingSearchView10,unit:this.props.activeFilter}):c('React').createElement(c('PagesContextCardCustomTagsBlock.react'),{canRemove:true,onRemove:this.$PagesManagerMessagingSearchView5,customTags:this.$PagesManagerMessagingSearchView11()})));};m.prototype.render=function(){var n={left:this.props.arrowTopX,top:this.props.arrowTopY-8};return (c('React').createElement('div',null,c('React').createElement('div',{ref:'arrow',className:"_1u5x"+(this.props.showTagsInSearchBox?' '+"hidden_elem":''),style:n}),c('React').createElement('div',{className:"_3i2n"+(this.props.enableSeparateSearch?' '+"_4m_d":'')+(!this.props.showTagsInSearchBox&&(this.props.currentSearchCustomTagNames.toArray().length>0||c('PagesManagerMessagingFilterStore').getActiveFilterName()===c('PagesManagerMessagingNavigationUnitKey').FILTERS.FLAGGED)?' '+"hidden_elem":''),ref:'input'},c('React').createElement(c('Image.react'),{className:"_5pti",src:j('/images/browse/search/search-gray.png')}),this.$PagesManagerMessagingSearchView14()),this.$PagesManagerMessagingSearchView15()));};f.exports=m;},null);
__d('PagesManagerMessagingUIActionTypes',['keyMirrorRecursive'],function a(b,c,d,e,f,g){'use strict';if(c.__markCompiled)c.__markCompiled();var h=c('keyMirrorRecursive')({SET_SEARCH_ARROW_TOP_X:'',SET_SEARCH_ARROW_TOP_Y:'',SET_SEARCH_BAR_SHADOW:''});f.exports=h;},null);
__d('PagesManagerMessagingUIStore',['PagesManagerMessagingUIActionTypes','FluxStore','PagesManagerDispatcher'],function a(b,c,d,e,f,g){var h,i;if(c.__markCompiled)c.__markCompiled();h=babelHelpers.inherits(j,c('FluxStore'));i=h&&h.prototype;function j(){'use strict';i.constructor.call(this,c('PagesManagerDispatcher'));this.$PagesManagerMessagingUIStore1=0;this.$PagesManagerMessagingUIStore2=0;this.$PagesManagerMessagingUIStore3=false;}j.prototype.__onDispatch=function(k){'use strict';switch(k.type){case c('PagesManagerMessagingUIActionTypes').SET_SEARCH_ARROW_TOP_X:this.$PagesManagerMessagingUIStore1=k.offset;this.__emitChange();break;case c('PagesManagerMessagingUIActionTypes').SET_SEARCH_ARROW_TOP_Y:this.$PagesManagerMessagingUIStore2=k.offset;this.__emitChange();break;case c('PagesManagerMessagingUIActionTypes').SET_SEARCH_BAR_SHADOW:this.$PagesManagerMessagingUIStore3=k.status;this.__emitChange();break;}};j.prototype.getSearchBarArrowTopX=function(){'use strict';return this.$PagesManagerMessagingUIStore1;};j.prototype.getSearchBarArrowTopY=function(){'use strict';return this.$PagesManagerMessagingUIStore2;};j.prototype.getSearchBarShadow=function(){'use strict';return this.$PagesManagerMessagingUIStore3;};f.exports=new j();},null);
__d('PagesManagerMessagingSearchContainer.react',['PagesManagerMessagingFilterStore','FluxContainer','immutable','PagesManagerCustomTagsAction','PagesManagerCustomTagsStore','PagesManagerMessagingSearchStore','PagesManagerMessagingSearchView.react','PagesManagerMessagingUIStore','React'],function a(b,c,d,e,f,g){'use strict';var h,i;if(c.__markCompiled)c.__markCompiled();h=babelHelpers.inherits(j,c('React').Component);i=h&&h.prototype;function j(k,l){i.constructor.call(this,k,l);}j.getStores=function(){return [c('PagesManagerMessagingFilterStore'),c('PagesManagerCustomTagsStore'),c('PagesManagerMessagingSearchStore'),c('PagesManagerMessagingUIStore')];};j.prototype.componentWillMount=function(){if(this.props.enableTagSearch&&!c('PagesManagerCustomTagsStore').hasCustomTags(this.props.pageID))c('PagesManagerCustomTagsAction').fetch(this.props.pageID);};j.calculateState=function(k,l){return {activeFilter:c('PagesManagerMessagingFilterStore').getActiveFilter(),arrowTopX:c('PagesManagerMessagingUIStore').getSearchBarArrowTopX(),arrowTopY:c('PagesManagerMessagingUIStore').getSearchBarArrowTopY(),currentSearchCustomTagNames:c('PagesManagerMessagingSearchStore').getCurrentSearchCustomTagNames(),currentSearchTerm:c('PagesManagerMessagingSearchStore').getCurrentSearchTerm(),isSearchActive:c('PagesManagerMessagingSearchStore').getIsInSearchMode(),customTagSearchSource:c('PagesManagerCustomTagsStore').getCustomTags(l.pageID)};};j.prototype.render=function(){var k=this.props,l=k.enableUpdatedUI,m=babelHelpers.objectWithoutProperties(k,['enableUpdatedUI']);return (c('React').createElement(c('PagesManagerMessagingSearchView.react'),babelHelpers['extends']({},m,{activeFilter:this.state.activeFilter,arrowTopX:this.state.arrowTopX,arrowTopY:this.state.arrowTopY,initSearchTerm:this.state.currentSearchTerm,isSearchActive:this.state.isSearchActive,customTagSearchSource:this.state.customTagSearchSource,currentSearchCustomTagNames:this.state.currentSearchCustomTagNames,showTagsInSearchBox:!l})));};f.exports=c('FluxContainer').create(j,{withProps:true});},null);
__d('PagesManagerMessagingSearchListResult.react',['cx','fbt','Link.react','PagesManagerListRowContainer.react','PagesManagerAction','PagesSelectableList.react','React','emptyFunction'],function a(b,c,d,e,f,g,h,i){var j,k;if(c.__markCompiled)c.__markCompiled();j=babelHelpers.inherits(l,c('React').Component);k=j&&j.prototype;l.prototype.$PagesManagerMessagingSearchListResult1=function(m){'use strict';c('PagesManagerAction').viewListItem(m);};l.prototype.getNameResultKey=function(m){'use strict';return 'NameResult:'+m;};l.prototype.getSnippetResultKey=function(m){'use strict';return 'SnippetResult:'+m;};l.prototype.$PagesManagerMessagingSearchListResult2=function(){'use strict';var m=c('React').createElement('li',{className:"_16-z",key:'nameSearchTitle'},i._("Names that contain '{message search term}'",[i.param('message search term',this.props.searchTerm)])),n=this.props.nameSearchResult.map(function(s){return (c('React').createElement(c('PagesManagerListRowContainer.react'),babelHelpers['extends']({ChildClass:this.props.listRowContainer,disableCheckBox:true,listItem:s,pageID:this.props.pageID,ref:this.getNameResultKey(s),key:this.getNameResultKey(s),onViewingListItem:this.$PagesManagerMessagingSearchListResult1,highlightText:this.props.searchTerm,useHighlightTitle:true,type:'li'},this.props.containerProps)));}.bind(this)),o=this.props.hasMoreNameSearchResult&&!this.props.isSearchingName?c('React').createElement('li',{className:"_16--",key:'loadMoreNameResult'},c('React').createElement(c('Link.react'),{onClick:this.props.loadMoreNameResult},i._("See more results"))):c('React').createElement('li',{className:"_3o39",key:'loadMoreNameResult'}),p=c('React').createElement('li',{className:"_16-z",key:'snippetSearchTitle'},i._("Messages that contain '{message search term}'",[i.param('message search term',this.props.searchTerm)])),q=[];Object.keys(this.props.snippetSearchResult).forEach(function(s){q.push(c('React').createElement(c('PagesManagerListRowContainer.react'),babelHelpers['extends']({ChildClass:this.props.listRowContainer,disableCheckBox:true,listItem:s,pageID:this.props.pageID,ref:this.getSnippetResultKey(s),key:this.getSnippetResultKey(s),onViewingListItem:this.$PagesManagerMessagingSearchListResult1,snippetSearchResult:this.props.snippetSearchResult[s],highlightText:this.props.searchTerm,useHighlightTitle:false,type:'li'},this.props.containerProps)));}.bind(this));var r=this.props.hasMoreSnippetSearchResult&&!this.props.isSearchingSnippet?c('React').createElement('li',{className:"_16--",key:'loadMoreSnippetResult'},c('React').createElement(c('Link.react'),{onClick:this.props.loadMoreSnippetResult},i._("See more results"))):c('React').createElement('li',{className:"_3o39",key:'loadMoreSnippetResult'});return [m].concat(n,[o,p],q,[r]);};l.prototype.render=function(){'use strict';var m=this.$PagesManagerMessagingSearchListResult2();return (c('React').createElement(c('PagesSelectableList.react'),{actionBarRightComponent:this.props.actionBarRightContainer,deselectAllLabel:'',hideBatchAction:true,enableOnVisible:false,forceRequestMoreRows:false,height:this.props.height,onSelectionChange:this.props.onSelectionChange,onRequestMoreRows:c('emptyFunction'),ref:'selectableList',scrollableAreaMode:true,scrollableAreaHasShadow:false,scrollableWidth:this.props.scrollableWidth},m));};function l(){'use strict';j.apply(this,arguments);}f.exports=l;},null);
__d('PagesManagerMessagingSeparateSearchResultView.react',['cx','fbt','Link.react','PagesManagerListRowContainer.react','PagesManagerAction','PagesSelectableList.react','PagesMessagingSearchMode','React','emptyFunction'],function a(b,c,d,e,f,g,h,i){var j,k;if(c.__markCompiled)c.__markCompiled();j=babelHelpers.inherits(l,c('React').Component);k=j&&j.prototype;l.prototype.$PagesManagerMessagingSeparateSearchResultView1=function(m){'use strict';c('PagesManagerAction').viewListItem(m);};l.prototype.$PagesManagerMessagingSeparateSearchResultView2=function(){'use strict';var m=null,n=[];switch(this.props.searchMode){case c('PagesMessagingSearchMode').MESSAGE_SEARCH:m=i._("Messages that contain '{message search term}'",[i.param('message search term',this.props.searchTerm)]);Object.keys(this.props.snippetSearchResult).forEach(function(p){n.push(c('React').createElement(c('PagesManagerListRowContainer.react'),babelHelpers['extends']({ChildClass:this.props.listRowContainer,disableCheckBox:true,listItem:p,pageID:this.props.pageID,ref:p,key:p,onViewingListItem:this.$PagesManagerMessagingSeparateSearchResultView1,snippetSearchResult:this.props.snippetSearchResult[p],highlightText:this.props.searchTerm,useHighlightTitle:false,type:'li'},this.props.containerProps)));}.bind(this));break;case c('PagesMessagingSearchMode').NAME_SEARCH:m=i._("Names that contain '{message search term}'",[i.param('message search term',this.props.searchTerm)]);n=this.props.searchResult.map(function(p){return (c('React').createElement(c('PagesManagerListRowContainer.react'),babelHelpers['extends']({ChildClass:this.props.listRowContainer,disableCheckBox:true,listItem:p,pageID:this.props.pageID,ref:p,key:p,onViewingListItem:this.$PagesManagerMessagingSeparateSearchResultView1,highlightText:this.props.searchTerm,useHighlightTitle:true,type:'li'},this.props.containerProps)));}.bind(this));break;}m=c('React').createElement('li',{className:"_16-z",key:'searchTitle'},m);var o=this.props.hasMoreResult?c('React').createElement('li',{className:"_2b19",key:'loadMoreResult'},c('React').createElement(c('Link.react'),{onClick:this.props.loadMore.bind(null,this.props.searchMode,this.props.searchTerm)},i._("See more results"))):c('React').createElement('li',{className:"_3o39",key:'loadMoreResult'});return [m].concat(n,[o]);};l.prototype.render=function(){'use strict';var m=this.$PagesManagerMessagingSeparateSearchResultView2();return (c('React').createElement(c('PagesSelectableList.react'),{actionBarRightComponent:this.props.actionBarRightContainer,deselectAllLabel:'',hideBatchAction:true,enableOnVisible:false,forceRequestMoreRows:false,height:this.props.height,onSelectionChange:this.props.onSelectionChange,onRequestMoreRows:c('emptyFunction'),ref:'selectableList',scrollableAreaMode:true,scrollableAreaHasShadow:false,scrollableWidth:this.props.scrollableWidth},m));};function l(){'use strict';j.apply(this,arguments);}f.exports=l;},null);
__d('PagesManagerMessagingUIActions',['PagesManagerMessagingUIActionTypes','PagesManagerDispatcher'],function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();var h={setSearchBarArrowTopX:function(i){c('PagesManagerDispatcher').dispatch({offset:i,type:c('PagesManagerMessagingUIActionTypes').SET_SEARCH_ARROW_TOP_X});},setSearchBarArrowTopY:function(i){c('PagesManagerDispatcher').dispatch({offset:i,type:c('PagesManagerMessagingUIActionTypes').SET_SEARCH_ARROW_TOP_Y});},setSearchBarShaddow:function(i){c('PagesManagerDispatcher').dispatch({status:i,type:c('PagesManagerMessagingUIActionTypes').SET_SEARCH_BAR_SHADOW});}};f.exports=h;},null);
__d('PagesManagerMessagingListContainer.react',['cx','fbt','PagesManagerMessagingBatchActionHeaderContainer.react','ContextualDialogArrow','ContextualLayerAutoFlip','FluxContainer','PagesManagerListBatchActionContainer.react','MercuryThreadlistConstants','MessageThreadViewSource','PagesEventObserver','PagesEventType','PagesManagerAction','PagesManagerAwayContainer.react','PagesManagerAwayToggle.react','PagesManagerListView.react','PagesManagerMessagingFilterActions','PagesManagerMessagingFilterStore','PagesManagerMessagingFilterPanelContainer.react','PagesManagerMessagingFilterPanelSwitch.react','PagesManagerMessagingList.react','PagesManagerMessagingListRowContainer.react','PagesManagerMessagingSearchContainer.react','PagesManagerMessagingLogger','PagesManagerMessagingNUXActions','PagesManagerMessagingSearchListResult.react','PagesMessagingSearchMode','PagesManagerMessagingSearchStore','PagesManagerMessagingSeparateSearchResultView.react','PagesManagerMessagingTabPerfEvents','PagesManagerMessagingThreadInteractionHelper','PagesManagerMessagingThreadlistAction','PagesManagerMessagingThreadlistStore','PagesManagerMessagingUIActions','PagesManagerMessagingUIStore','PagesManagerPerfLogger','PagesManagerStore','PopoverMenu.react','React','ReactDOM','SubscriptionsHandler','MercuryThreadInformer','Vector','XUICard.react','ReactXUIMenu','debounce','emptyFunction'],function a(b,c,d,e,f,g,h,i){var j,k;if(c.__markCompiled)c.__markCompiled();var l=50,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.$PagesManagerMessagingListContainer1=false;this.$PagesManagerMessagingListContainer2=function(){this.refs.listView.clearSelection();}.bind(this);this.$PagesManagerMessagingListContainer3=this.$PagesManagerMessagingListContainer3.bind(this);this.$PagesManagerMessagingListContainer4=this.$PagesManagerMessagingListContainer4.bind(this);this.$PagesManagerMessagingListContainer5=this.$PagesManagerMessagingListContainer5.bind(this);this.$PagesManagerMessagingListContainer6=this.$PagesManagerMessagingListContainer6.bind(this);this.$PagesManagerMessagingListContainer7=this.$PagesManagerMessagingListContainer7.bind(this);this.$PagesManagerMessagingListContainer8=this.$PagesManagerMessagingListContainer8.bind(this);}n.getStores=function(){'use strict';return [c('PagesManagerMessagingThreadlistStore'),c('PagesManagerMessagingFilterStore'),c('PagesManagerMessagingSearchStore'),c('PagesManagerMessagingUIStore')];};n.calculateSearchState=function(o,p){'use strict';var q=c('PagesManagerMessagingSearchStore').getThreadNameSearchResults(),r=c('PagesManagerMessagingSearchStore').getIsSearchingName(),s=c('PagesManagerMessagingSearchStore').hasMoreNameSearchResult(),t=c('PagesManagerMessagingSearchStore').hasMoreSnippetSearchResult(),u=c('PagesManagerMessagingSearchStore').getThreadSnippetSearchResults(),v=c('PagesManagerMessagingSearchStore').getIsSearchingSnippet();if(p.config.enableSeparateSearch){var w=[],x={},y=false,z=false;switch(c('PagesManagerMessagingSearchStore').getSearchMode()){case c('PagesMessagingSearchMode').MESSAGE_SEARCH:x=u;y=t;z=v;break;case c('PagesMessagingSearchMode').NAME_SEARCH:w=q;y=s;z=r;break;}return {hasMoreResult:y,isInSearchMode:true,isSearching:z,searchTerm:c('PagesManagerMessagingSearchStore').getCurrentSearchTerm(),searchMode:c('PagesManagerMessagingSearchStore').getSearchMode(),searchResult:w,snippetSearchResult:x};}else if(p.config.enableFullSearch){return {hasMoreNameSearchResult:s,hasMoreSnippetSearchResult:t,isInSearchMode:true,isSearchingName:r,isSearchingSnippet:v,nameSearchResult:q,threadSnippetResult:u,searchTerm:c('PagesManagerMessagingSearchStore').getCurrentSearchTerm(),searchMode:c('PagesManagerMessagingSearchStore').getSearchMode()};}else return {hasMoreItem:false,initLoading:false,isInSearchMode:true,threadIDList:q,emptyView:c('React').createElement('div',{key:'emptyView'})};};n.calsulateListState=function(o,p){'use strict';var q=c('PagesManagerMessagingThreadlistStore').getItemList(p.pageID),r=c('PagesManagerMessagingThreadlistStore').hasMoreItem(c('PagesManagerMessagingFilterStore').getNavigationKey()),s=q.findIndex(function(ba){return (ba===c('PagesManagerStore').getViewingListItem());})>=0,t=c('PagesManagerStore').getInitialViewingItem(),u=c('PagesManagerStore').getViewingListItem(),v=q.length>0,w=t&&t===u,x=!w&&(!u&&v||u&&v&&!s);if(x){var y=q[0];c('PagesManagerAction').viewListItem(y);c('PagesManagerMessagingThreadInteractionHelper').handlePermalinkUpdate(y,p.pageID);}var z=c('PagesManagerMessagingThreadlistStore').isLoading(),aa=false;if(q.length===0)aa=z;return {hasMoreItem:r,hasMoreResult:r,initLoading:aa,isInSearchMode:false,threadIDList:q,emptyView:c('React').createElement('div',{key:'emptyView'})};};n.calculateState=function(o,p){'use strict';var q=null;if(c('PagesManagerMessagingSearchStore').getIsInSearchMode()&&c('PagesManagerMessagingSearchStore').getCurrentSearchTerm().length>0){q=n.calculateSearchState(o,p);}else q=n.calsulateListState(o,p);if(o&&o.initLoading&&!q.initLoading)c('PagesManagerMessagingNUXActions').setThreadlistReady();q.isFiltering=c('PagesManagerMessagingFilterStore').getIsFiltering();q.folderDropdown=c('PagesManagerMessagingFilterStore').getFolderDropDown();q.unitNotificationCountMap=c('PagesManagerMessagingFilterStore').getUnitNotificationCountMap(p.pageID);q.showShadow=c('PagesManagerMessagingUIStore').getSearchBarShadow();return q;};n.prototype.componentDidUpdate=function(){'use strict';if(this.$PagesManagerMessagingListContainer1&&!this.state.initLoading){this.$PagesManagerMessagingListContainer1=false;c('PagesEventObserver').notify(c('PagesEventType').MESSAGES_INBOX_LOAD_END,this.props.pageID,{flowID:this.props.flowID,page_id:this.props.pageID,loading_event_time:Date.now()});}};n.prototype.componentDidMount=function(){'use strict';c('PagesManagerPerfLogger').log(c('PagesManagerMessagingTabPerfEvents').MESSAGE_TAB_THREAD_LIST_DID_RENDER,this.props.perfParams);c('PagesManagerMessagingThreadlistAction').initThreadlist(this.props.pageID);c('PagesEventObserver').notify(c('PagesEventType').MESSAGES_THREADLIST_LOAD_START,this.props.pageID,{flowID:this.props.flowID,page_id:this.props.pageID,loading_event_time:Date.now()});c('PagesManagerMessagingLogger').logPageViewFolderEvent(this.props.pageID,c('PagesManagerMessagingFilterStore').getActiveFolder(),c('MessageThreadViewSource').NEW_MESSAGETAB);this.$PagesManagerMessagingListContainer1=true;this.$PagesManagerMessagingListContainer9=c('MercuryThreadInformer').getForFBID(this.props.pageID);this.$PagesManagerMessagingListContainer10=new (c('SubscriptionsHandler'))();this.$PagesManagerMessagingListContainer10.addSubscriptions(this.$PagesManagerMessagingListContainer9.subscribe('threadlist-updated',function(o,p){return this.$PagesManagerMessagingListContainer11();}.bind(this)),this.$PagesManagerMessagingListContainer9.subscribe('threads-updated',function(o,p){return this.$PagesManagerMessagingListContainer12(Object.keys(p));}.bind(this)));this.$PagesManagerMessagingListContainer13();};n.prototype.componentWillUnmount=function(){'use strict';this.$PagesManagerMessagingListContainer10&&this.$PagesManagerMessagingListContainer10.release();};n.prototype.$PagesManagerMessagingListContainer14=function(o){'use strict';return o;};n.prototype.$PagesManagerMessagingListContainer4=function(){'use strict';c('PagesManagerMessagingThreadlistAction').loadMoreNameResult(this.props.pageID,this.state.searchTerm,c('PagesManagerMessagingFilterStore').getActiveFolderName());};n.prototype.$PagesManagerMessagingListContainer5=function(){'use strict';c('PagesManagerMessagingThreadlistAction').loadMoreSnippetResult(this.props.pageID,this.state.searchTerm,c('PagesManagerMessagingFilterStore').getActiveFolderName());};n.prototype.$PagesManagerMessagingListContainer3=function(o,p){'use strict';switch(o){case c('PagesMessagingSearchMode').NAME_SEARCH:c('PagesManagerMessagingThreadlistAction').loadMoreNameResult(this.props.pageID,p,c('PagesManagerMessagingFilterStore').getActiveFolderName());break;case c('PagesMessagingSearchMode').MESSAGE_SEARCH:c('PagesManagerMessagingThreadlistAction').loadMoreSnippetResult(this.props.pageID,p,c('PagesManagerMessagingFilterStore').getActiveFolderName());break;}};n.prototype.$PagesManagerMessagingListContainer7=function(){'use strict';var o=c('PagesManagerMessagingFilterStore').getNavigationKey();if(c('PagesManagerMessagingThreadlistStore').hasMoreItem(o)&&!c('PagesManagerMessagingThreadlistStore').isLoading()&&!this.state.isInSearchMode)c('PagesManagerMessagingThreadlistAction').fetchThreadlist(this.props.pageID,this.state.threadIDList.length,c('MercuryThreadlistConstants').WEBMESSENGER_MORE_COUNT);};n.prototype.$PagesManagerMessagingListContainer11=function(){'use strict';c('PagesManagerMessagingThreadlistAction').updateThreadlist(this.props.pageID);};n.prototype.$PagesManagerMessagingListContainer12=function(o){'use strict';o.forEach(function(p){if(this.refs.searchResult&&!this.props.config.enableSeparateSearch){var q=this.refs.searchResult.refs[this.refs.searchResult.getNameResultKey(p)];if(q)q.refs.childClass.updateThread();var r=this.refs.searchResult.refs[this.refs.searchResult.getSnippetResultKey(p)];if(r)r.refs.childClass.updateThread();return;}else if(this.refs.searchResult&&this.props.config.enableSeparateSearch){var s=this.refs.searchResult.refs[p];if(s)s.refs.childClass.updateThread();}else if(this.refs.listView){var t=this.refs.listView.refs[p];if(t)t.refs.childClass.updateThread();}}.bind(this));};n.prototype.$PagesManagerMessagingListContainer13=function(){'use strict';if(this.refs.fileMenu&&this.refs.unreadCount&&this.props.config.enableUpdatedUI){var o=c('Vector').getElementDimensions(c('ReactDOM').findDOMNode(this.refs.fileMenu)).x,p=c('Vector').getElementDimensions(c('ReactDOM').findDOMNode(this.refs.unreadCount)).x,q=c('ReactDOM').findDOMNode(this.refs.fileMenu).offsetLeft,r=q+(o-p)/2;c('PagesManagerMessagingUIActions').setSearchBarArrowTopX(r);}};n.prototype.$PagesManagerMessagingListContainer8=function(){'use strict';if(this.refs.listView.refs.selectableList.refs.scrollableArea.getArea().isScrolledToTop()){c('PagesManagerMessagingUIActions').setSearchBarShaddow(false);}else if(!c('PagesManagerMessagingUIStore').getSearchBarShadow())c('PagesManagerMessagingUIActions').setSearchBarShaddow(true);};n.prototype.$PagesManagerMessagingListContainer15=function(){'use strict';var o=null;if(this.props.config.enableUpdatedUI){o=c('React').createElement(c('PagesManagerMessagingFilterPanelSwitch.react'),{pageID:this.props.pageID,height:this.$PagesManagerMessagingListContainer16(),isFiltering:c('PagesManagerMessagingFilterStore').getIsFiltering(),enableManageTags:this.props.config.enableManageTags});}else if(this.props.config.enableAwayToggle)o=c('React').createElement(c('PagesManagerAwayContainer.react'),{pageID:this.props.pageID,RenderClass:c('PagesManagerAwayToggle.react')});return (c('React').createElement('div',null,c('React').createElement(c('PagesManagerListBatchActionContainer.react'),{ChildClass:c('PagesManagerMessagingBatchActionHeaderContainer.react'),pageID:this.props.pageID,onSelectionClear:this.$PagesManagerMessagingListContainer2}),o));};n.prototype.$PagesManagerMessagingListContainer6=function(o,p){'use strict';var q=this.state.folderDropdown.filter(function(r){return r.getKey()===p.item.getValue();});if(q.count()==0)return;c('PagesManagerMessagingFilterActions').changeFilter(this.props.pageID,q.get(0));};n.prototype.$PagesManagerMessagingListContainer17=function(o){'use strict';return (c('React').createElement(m,{key:o.getKey(),value:o.getKey()},c('React').createElement('div',{className:"_-7b"},o.getDisplayTitle())));};n.prototype.$PagesManagerMessagingListContainer18=function(){'use strict';var o=c('React').createElement(c('ReactXUIMenu'),{onItemClick:this.$PagesManagerMessagingListContainer6},this.state.folderDropdown.map(this.$PagesManagerMessagingListContainer17)),p=c('PagesManagerMessagingFilterStore').getActiveFolderDropDown(),q=this.state.unitNotificationCountMap.get(p);return (c('React').createElement(c('PopoverMenu.react'),{layerBehaviors:[c('ContextualDialogArrow'),c('ContextualLayerAutoFlip')],menu:o},c('React').createElement('div',{className:"_-7c _46l"},c('React').createElement('span',{ref:'fileMenu'},p.getDisplayTitle()),c('React').createElement('div',{className:"_-7h"+(' '+"_-7e")+(q===0?' '+"hidden_elem":''),ref:'unreadCount'},q))));};n.prototype.$PagesManagerMessagingListContainer19=function(){'use strict';if(this.props.config.enableUpdatedUI)return '';return i._("Select All");};n.prototype.$PagesManagerMessagingListContainer16=function(){'use strict';var o=c('ReactDOM').findDOMNode(this.refs.threadListHeader),p=0;if(o!==null&&!this.props.config.enableUpdatedUI)p=c('Vector').getElementDimensions(o).y;var q=c('ReactDOM').findDOMNode(this.refs.threadListFooter),r=0;if(q!==null)r=c('Vector').getElementDimensions(q).y;return this.props.height-p-r;};n.prototype.$PagesManagerMessagingListContainer20=function(){'use strict';return (c('React').createElement(c('XUICard.react'),{className:"_alj"+(!this.props.config.enableUpdatedUI?' '+"hidden_elem":''),ref:'threadListFooter'},c('React').createElement(c('PagesManagerAwayContainer.react'),{pageID:this.props.pageID,RenderClass:c('PagesManagerAwayToggle.react')})));};n.prototype.$PagesManagerMessagingListContainer21=function(){'use strict';return (c('React').createElement('div',{className:"_alk"+(!this.props.config.enableUpdatedUI?' '+"hidden_elem":'')+(this.state.showShadow?' '+"_1axm":''),ref:'threadListHeader'},c('React').createElement(c('PagesManagerMessagingSearchContainer.react'),{arrowTopPositionY:this.state.arrowTopPositionY,pageID:this.props.pageID,enableSeparateSearch:this.props.config.enableSeparateSearch,enableTagSearch:this.props.config.enableTagSearch,enableUpdatedUI:this.props.config.enableUpdatedUI})));};n.prototype.$PagesManagerMessagingListContainer22=function(){'use strict';if(this.props.config.enableUpdatedUI)return (c('React').createElement(c('PagesManagerMessagingList.react'),babelHelpers['extends']({},this.props,{actionBarRightContainer:this.$PagesManagerMessagingListContainer15(),folderDropDown:this.$PagesManagerMessagingListContainer18(),containerProps:{config:this.props.config},emptyView:this.state.emptyView,getKey:this.$PagesManagerMessagingListContainer14,handleScroll:this.$PagesManagerMessagingListContainer8,hasMoreResult:this.state.hasMoreResult,header:this.$PagesManagerMessagingListContainer21(),height:this.$PagesManagerMessagingListContainer16(),initLoading:this.state.initLoading,isFiltering:this.state.isFiltering,isInSearchMode:this.state.isInSearchMode,isSearching:this.state.isSearching,list:this.state.threadIDList,listRowContainer:c('PagesManagerMessagingListRowContainer.react'),loadMore:this.$PagesManagerMessagingListContainer3,navigationKey:c('PagesManagerMessagingFilterStore').getNavigationKey(),onScroll:this.$PagesManagerMessagingListContainer7,onSelectionChange:this.props.onSelectionChange,ref:'listView',scrollableWidth:320,selectAllLabel:this.$PagesManagerMessagingListContainer19(),searchTerm:this.state.searchTerm,searchMode:this.state.searchMode,searchResult:this.state.searchResult,snippetSearchResult:this.state.snippetSearchResult})));if(this.state.isInSearchMode&&this.props.config.enableSeparateSearch)return (c('React').createElement(c('PagesManagerMessagingSeparateSearchResultView.react'),babelHelpers['extends']({},this.props,{actionBarRightContainer:this.$PagesManagerMessagingListContainer15(),containerProps:{config:this.props.config},hasMoreResult:this.state.hasMoreResult,height:this.$PagesManagerMessagingListContainer16(),isSearching:this.state.isSearching,listRowContainer:c('PagesManagerMessagingListRowContainer.react'),loadMore:this.$PagesManagerMessagingListContainer3.bind(this),onSelectionChange:this.props.onSelectionChange,ref:'searchResult',scrollableWidth:320,searchTerm:this.state.searchTerm,searchMode:this.state.searchMode,searchResult:this.state.searchResult,snippetSearchResult:this.state.snippetSearchResult})));if(this.state.isInSearchMode&&this.props.config.enableFullSearch)return (c('React').createElement(c('PagesManagerMessagingSearchListResult.react'),babelHelpers['extends']({},this.props,{actionBarRightContainer:this.$PagesManagerMessagingListContainer15(),containerProps:{config:this.props.config},getKey:this.$PagesManagerMessagingListContainer14,hasMoreNameSearchResult:this.state.hasMoreNameSearchResult,hasMoreSnippetSearchResult:this.state.hasMoreSnippetSearchResult,height:this.$PagesManagerMessagingListContainer16(),isSearchingName:this.state.isSearchingName,isSearchingSnippet:this.state.isSearchingSnippet,listRowContainer:c('PagesManagerMessagingListRowContainer.react'),loadMoreNameResult:this.$PagesManagerMessagingListContainer4,loadMoreSnippetResult:this.$PagesManagerMessagingListContainer5,nameSearchResult:this.state.nameSearchResult,onSelectionChange:this.props.onSelectionChange,ref:'searchResult',scrollableWidth:320,searchTerm:this.state.searchTerm,snippetSearchResult:this.state.threadSnippetResult})));return (c('React').createElement(c('PagesManagerListView.react'),babelHelpers['extends']({},this.props,{selectAllLabel:this.$PagesManagerMessagingListContainer19(),actionBarRightContainer:this.$PagesManagerMessagingListContainer15(),containerProps:{config:this.props.config},emptyView:this.state.emptyView,getKey:this.$PagesManagerMessagingListContainer14,hasMoreItem:this.state.hasMoreItem,height:this.$PagesManagerMessagingListContainer16(),initLoading:this.state.initLoading,isInSearchMode:this.state.isInSearchMode,list:this.state.threadIDList,listRowContainer:c('PagesManagerMessagingListRowContainer.react'),navigationKey:c('PagesManagerMessagingFilterStore').getNavigationKey(),onScroll:this.$PagesManagerMessagingListContainer7.bind(this),onSelectionChange:this.props.onSelectionChange,ref:'listView',scrollableWidth:320})));};n.prototype.render=function(){'use strict';return (c('React').createElement('div',{className:this.props.config.enableUpdatedUI?"_1axn":''},this.$PagesManagerMessagingListContainer22(),this.$PagesManagerMessagingListContainer20()));};f.exports=c('FluxContainer').create(n,{withProps:true});},null);
__d('PagesManagerMessagingApp.react',['cx','PagesManagerAction','LeftRight.react','MercuryPagesChannelHandler','MercuryServerPayloadPreprocessor','MercurySyncPageEnvironment','PagesEventObserver','PagesEventType','PagesManagerAwayBanner.react','PagesManagerAwayContainer.react','PagesManagerDetailContainer.react','PagesManagerListContainer.react','PagesManagerListDetailLayout.react','PagesManagerMessagingDetailContainer.react','PagesManagerMessagingFilterContainer.react','PagesManagerMessagingListContainer.react','PagesManagerMessagingLogger','PagesManagerMessagingSearchContainer.react','PagesManagerMessagingTabPerfEvents','PagesManagerPerfLogger','PagesManagerStaticStore','PagesMessengerMessagePageButton.react','React','ReactDOM','PagesManagerStore'],function a(b,c,d,e,f,g,h){var i,j;if(c.__markCompiled)c.__markCompiled();c('PagesManagerStore');i=babelHelpers.inherits(k,c('React').Component);j=i&&i.prototype;function k(l,m){'use strict';j.constructor.call(this,l,m);c('PagesManagerStaticStore').setPageID(this.props.pageID);this.state={rootElement:null};this.$PagesManagerMessagingApp1=function(){this.refs.body&&this.refs.body.recalculateHeight();}.bind(this);}k.prototype.componentWillMount=function(){'use strict';c('MercuryPagesChannelHandler').getForFBID(this.props.pageID).turnOn();c('MercurySyncPageEnvironment').setUp(this.props.pageID,this.props.initSyncSequenceID);c('PagesManagerMessagingLogger').logMessagesSectionViewEvent(this.props.pageID);c('PagesEventObserver').notify(c('PagesEventType').MESSAGES_THREADLIST_LAYOUT_LOAD_START,this.props.pageID,{flowID:this.props.flowID,page_id:this.props.pageID,loading_event_time:Date.now()});if(this.props.initialThreadID)c('PagesManagerAction').setInitialViewItem(this.props.initialThreadID);};k.prototype.componentDidMount=function(){'use strict';c('PagesManagerPerfLogger').log(c('PagesManagerMessagingTabPerfEvents').MESSAGE_TAB_APP_DID_RENDER,this.props.perfParams);var l=c('MercuryServerPayloadPreprocessor').getForFBID(this.props.pageID);l.handleUpdate(this.props.config.jewelInitData);this.setState({rootElement:c('ReactDOM').findDOMNode(this)});};k.prototype.componentWillUnmount=function(){'use strict';c('MercuryPagesChannelHandler').getForFBID(this.props.pageID).turnOff();c('MercurySyncPageEnvironment').tearDown(this.props.pageID);};k.prototype.$PagesManagerMessagingApp2=function(l){'use strict';if(l)return l;return null;};k.prototype.$PagesManagerMessagingApp3=function(){'use strict';if(this.props.config.enabledPageToPageMessaging)return (c('React').createElement(c('PagesMessengerMessagePageButton.react'),{flowID:this.props.flowID,pageID:this.props.pageID,pagesCommNewMessagesTab:true,size:'large'}));return null;};k.prototype.$PagesManagerMessagingApp4=function(){'use strict';if(this.props.config.enableUpdatedUI)return c('React').createElement('div',{className:"_n4_"});return (c('React').createElement('div',{className:"_n4_"},c('React').createElement(c('LeftRight.react'),{className:"_n50"},c('React').createElement(c('PagesManagerMessagingFilterContainer.react'),{config:this.props.config,pageID:this.props.pageID}),c('React').createElement(c('LeftRight.react'),null,this.$PagesManagerMessagingApp3(),c('React').createElement(c('PagesManagerMessagingSearchContainer.react'),{pageID:this.props.pageID,enableSeparateSearch:this.props.config.enableSeparateSearch,enableTagSearch:this.props.config.enableTagSearch}))),this.$PagesManagerMessagingApp5()));};k.prototype.$PagesManagerMessagingApp6=function(){'use strict';return (c('React').createElement('div',{className:"_14vf"},c('React').createElement(c('PagesManagerListContainer.react'),{config:this.props.config,ChildContainerClass:c('PagesManagerMessagingListContainer.react'),flowID:this.props.flowID,pageID:this.props.pageID,perfParams:this.props.perfParams})));};k.prototype.$PagesManagerMessagingApp7=function(){'use strict';return (c('React').createElement('div',null,c('React').createElement(c('PagesManagerDetailContainer.react'),{config:this.props.config,pageID:this.props.pageID,ChildContainerClass:c('PagesManagerMessagingDetailContainer.react'),getListItemKey:this.$PagesManagerMessagingApp2,perfParams:this.props.perfParams})));};k.prototype.$PagesManagerMessagingApp5=function(){'use strict';if(!this.props.config.enableAwayToggle)return null;return (c('React').createElement('div',null,c('React').createElement(c('PagesManagerAwayContainer.react'),{pageID:this.props.pageID,RenderClass:c('PagesManagerAwayBanner.react')})));};k.prototype.render=function(){'use strict';return (c('React').createElement('div',null,c('React').createElement('div',{className:"_15i2"},c('React').createElement(c('PagesManagerListDetailLayout.react'),{ref:'body',detailSection:this.$PagesManagerMessagingApp7(),listClassName:"_1-9p",listSection:this.$PagesManagerMessagingApp6(),navigationSection:this.$PagesManagerMessagingApp4()}))));};f.exports=k;},null);