text: if (self.CavalryLogger) { CavalryLogger.start_js(["R3oHD"]); }
  
  __d("IntentClassifierRequestAction",[],function a(b,c,d,e,f,g){c.__markCompiled&&c.__markCompiled();f.exports={REQUEST_MESSAGE_INTENT:"REQUEST_MESSAGE_INTENT",REQUEST_THREAD_INTENT:"REQUEST_THREAD_INTENT"};},null);
  __d("MessageSettingsPreviewTab",[],function a(b,c,d,e,f,g){c.__markCompiled&&c.__markCompiled();f.exports={MESSENGER_CODE:"messenger_code",RESPONSE_ASSISTANT:"response_assistant"};},null);
  __d("MessageShareType",[],function a(b,c,d,e,f,g){c.__markCompiled&&c.__markCompiled();f.exports={IMAGE:"image",PLATFORM_SHARE_CTA:"platform_share_CTA"};},null);
  __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("NativeBookingRequestStatusUpdateAction",[],function a(b,c,d,e,f,g){c.__markCompiled&&c.__markCompiled();f.exports={ACCEPT:"accept",ADMIN_CANCEL:"admin_cancel",CREATE:"create",DECLINE:"decline",SCHEDULE:"schedule",USER_CANCEL:"user_cancel",REQUEST:"request"};},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",darkerFill:"FFBEC2C9"},FF8A73C9:{fill:"FFF4F1FA",border:"FF8A73C9",darkerFill:"FFDDD5F0"},FFF65569:{fill:"FFFEEEF0",border:"FFF65569",darkerFill:"FFFBCCD2"},FF5291FF:{fill:"FFEEF4FF",border:"FF5291FF",darkerFill:"FFC6D9FF"},FFFB9240:{fill:"FFFFF4EC",border:"FFFB9240",darkerFill:"FFFCDEC5"},FF72A737:{fill:"FFF6FAF1",border:"FF72A737",darkerFill:"FFE4F0D5"}}};},null);
  __d("PageProductTransactionOrderStatus",[],function a(b,c,d,e,f,g){c.__markCompiled&&c.__markCompiled();f.exports={AWAITING_PAYMENT_METHOD:"awaiting_payment_method",AWAITING_PAYMENT:"awaiting_payment",PAYMENT_SUBMITTED:"payment_submitted",PAYMENT_EXPIRED:"payment_expired",SHIPPED:"shipped",VOIDED:"voided",PENDING_APPROVAL:"pending_approval",PAYMENT_APPROVED:"payment_approved"};},null);
  __d("PagesAdminToolUIActionType",[],function a(b,c,d,e,f,g){c.__markCompiled&&c.__markCompiled();f.exports={CONTEXT_CARD_CLICK_ADD_NOTE:"context_card_click_add_note",CONTEXT_CARD_CLICK_CONFIRM_ADD_NOTE:"context_card_click_confirm_add_note",CONTEXT_CARD_CLICK_DELETE_NOTE:"context_card_click_delete_note",CONTEXT_CARD_CLICK_CONFIRM_DELETE_NOTE:"context_card_click_confirm_delete_note",CONTEXT_CARD_CLICK_HISTORY:"context_card_click_history",CONTEXT_CARD_CLICK_PROFILE_LINK:"context_card_click_profile_link",CONTEXT_CARD_CLICK_SHARED_MEDIA:"context_card_click_shared_media",CONTEXT_CARD_LOAD_MORE_SHARED_MEDIA:"context_card_load_more_shared_media",CONTEXT_CARD_LOAD_MORE_NOTES:"context_card_load_more_notes",CONTEXT_CARD_LOAD_MORE_HISTORY:"context_card_load_more_history",CONTEXT_CARD_CLICK_SET_CUSTOM_TAG:"context_card_click_set_custom_tag",CONTEXT_CARD_CLICK_UNSET_CUSTOM_TAG:"context_card_click_unset_custom_tag",TAG_MANAGEMENT_CLICK_DELETE_LINK:"tag_management_click_delete_link",TAG_MANAGEMENT_CLICK_CONFIRM_DELETE:"tag_management_click_confirm_delete",TAG_MANAGEMENT_CLICK_COLOR_SELECTOR:"tag_management_click_color_selector",TAG_MANAGEMENT_CLICK_CHANGE_COLOR:"tag_management_click_change_color",TAG_MANAGEMENT_CLICK_ADD_TAG:"tag_management_click_add_tag",TAG_MANAGEMENT_CLICK_MERGE_TAG:"tag_management_click_merge_tag",MESSAGE_INBOX_SWITCH_FOLDER:"message_inbox_switch_folder",MESSAGE_INBOX_TOGGLE_FILTER_PANEL:"message_inbox_toggle_filter_panel",MESSAGE_INBOX_CLICK_MANAGE_TAGS:"message_inbox_click_manage_tags",MESSAGE_INBOX_CLICK_ADD_SEARCH_TAGS:"message_inbox_click_add_search_tags",MESSAGE_INBOX_CLICK_REMOVE_SEARCH_TAGS:"message_inbox_click_remove_search_tags",MESSAGE_INBOX_CLICK_SEARCH_NAMES:"message_inbox_click_search_names",MESSAGE_INBOX_CLICK_SEARCH_MESSAGES:"message_inbox_click_search_messages",MESSAGE_INBOX_CLICK_AWAY_TOGGLE:"message_inbox_click_away_toggle",MESSAGE_INBOX_CLICK_THREAD_BLOCK:"message_inbox_click_thread_block",MESSAGE_INBOX_CLICK_SEND_MESSAGE:"message_inbox_click_send_message",MESSAGE_INBOX_CLICK_MENU_ACTION:"message_inbox_click_menu_action",HOVERCARD_CLICK_EXPAND_FULL_VIEW:"hovercard_click_expand_full_view",HOVERCARD_CLICK_SEND_MESSAGE:"hovercard_click_send_message",HOVERCARD_CLICK_SEE_CONVERSATION:"hovercard_click_see_conversation",HOVERCARD_CLICK_VIEW_PROFILE:"hovercard_click_view_profile"};},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('CommerceInvoiceCreateDialogHeader.react',['fbt','React','XUIGrayText.react','XUIText.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.$CommerceInvoiceCreateDialogHeader1=function(){var l=this.props.invoiceID;if(!l)return null;return (c('React').createElement(c('XUIText.react'),{display:'block',size:'large'},h._("Order {Part of sentence which is emphasized}",[h.param('Part of sentence which is emphasized',c('React').createElement(c('XUIText.react'),{weight:'bold'},h._("#{order_number}",[h.param('order_number',l)])))])));};k.prototype.render=function(){return (c('React').createElement('div',{className:this.props.className},this.$CommerceInvoiceCreateDialogHeader1(),c('React').createElement(c('XUIGrayText.react'),{display:'block',shade:'light',size:'medium'},h._("Order status: {statusMessage}",[h.param('statusMessage',this.props.statusMessage)]))));};f.exports=k;},null);
  __d('CommerceInvoiceCreateDialogNoteSection.react',['ix','cx','fbt','AdsTextInput.react','Image.react','Link.react','React','XUIGrayText.react','XUIText.react','fbglyph'],function a(b,c,d,e,f,g,h,i,j){'use strict';var k,l;if(c.__markCompiled)c.__markCompiled();var m=240;k=babelHelpers.inherits(n,c('React').Component);l=k&&k.prototype;function n(o){l.constructor.call(this,o);this.$CommerceInvoiceCreateDialogNoteSection1=function(){this.setState({isAddingNote:true});}.bind(this);this.state={isAddingNote:false};}n.prototype.$CommerceInvoiceCreateDialogNoteSection2=function(){if(this.state.isAddingNote||!this.props.canEdit)return null;return (c('React').createElement('div',null,c('React').createElement(c('Link.react'),{onClick:this.$CommerceInvoiceCreateDialogNoteSection1},c('React').createElement(c('Image.react'),{className:"_4blm",src:h("\/images\/assets_DO_NOT_HARDCODE\/fb_glyphs\/plus_16_fig-blue.png")}),j._("Add a Note"))));};n.prototype.$CommerceInvoiceCreateDialogNoteSection3=function(){if(!this.state.isAddingNote)return null;return (c('React').createElement(c('AdsTextInput.react'),{enforceMaxLength:true,label:j._("Note"),maxLength:m,multiline:true,onChange:this.props.onNoteChanged,placeholder:j._("Enter a note that both you and the buyer can see."),value:this.props.note}));};n.prototype.$CommerceInvoiceCreateDialogNoteSection4=function(){if(this.props.canEdit||!this.props.note)return null;return (c('React').createElement('div',null,c('React').createElement(c('XUIGrayText.react'),{display:'block',shade:'light',size:'medium'},j._("Note")),c('React').createElement(c('XUIText.react'),null,this.props.note)));};n.prototype.render=function(){return (c('React').createElement('div',{className:this.props.className},this.$CommerceInvoiceCreateDialogNoteSection2(),this.$CommerceInvoiceCreateDialogNoteSection3(),this.$CommerceInvoiceCreateDialogNoteSection4()));};f.exports=n;},null);
  __d('CommerceAddProductScrollRow.react',['cx','fbt','XUIText.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;m.prototype.render=function(){return (c('React').createElement('div',{className:"_2jjq",onClick:this.props.onClick},c('React').createElement('table',null,c('React').createElement('tr',null,c('React').createElement('td',null,c('React').createElement('div',{className:"_buh"})),c('React').createElement('td',null,c('React').createElement(c('XUIText.react'),{size:'small',className:"_buj"},i._("Add Product")))))));};function m(){j.apply(this,arguments);}m.propTypes={onClick:l.func.isRequired};f.exports=m;},null);
  __d('CommerceProductItemSearch',['ActorURI','AsyncRequest','XPagesManagerProductSearchController','Set','bind','debounce'],function a(b,c,d,e,f,g){'use strict';if(c.__markCompiled)c.__markCompiled();var h=300,i=30;function j(k,l,m,n){this.searchOrMore=c('debounce')(this.$CommerceProductItemSearch8,m||h,this);this.$CommerceProductItemSearch2=l||[];this.$CommerceProductItemSearch3=new (c('Set'))();this.$CommerceProductItemSearch5=[];this.$CommerceProductItemSearch7=n||i;this.$CommerceProductItemSearch1=c('ActorURI').create(c('XPagesManagerProductSearchController').getURIBuilder().getURI(),k);}j.prototype.$CommerceProductItemSearch8=function(k,l){if(this.$CommerceProductItemSearch6)this.$CommerceProductItemSearch6.abort();var m=k!==this.$CommerceProductItemSearch4;if(m){this.$CommerceProductItemSearch3.clear();this.$CommerceProductItemSearch5=[];this.$CommerceProductItemSearch4=k;}var n=this.$CommerceProductItemSearch2.concat(Array.from(this.$CommerceProductItemSearch3));this.$CommerceProductItemSearch6=new (c('AsyncRequest'))().setData({query:k.trim(),offset:0,limit:this.$CommerceProductItemSearch7,filter_product_group_ids:n}).setHandler(c('bind')(this,this.$CommerceProductItemSearch9,l,m)).setURI(this.$CommerceProductItemSearch1);this.$CommerceProductItemSearch6.send();};j.prototype.$CommerceProductItemSearch9=function(k,l,m){var n=m.payload.products;n.map(function(o){this.$CommerceProductItemSearch3.add(o.product_group_id);}.bind(this));this.$CommerceProductItemSearch5=this.$CommerceProductItemSearch5.concat(n);this.$CommerceProductItemSearch6=null;k(this.$CommerceProductItemSearch5,n.length!==0||l);};f.exports=j;},null);
  __d('CommerceProductItemSearchSelector.react',['ix','cx','fbt','invariant','Image.react','InfiniteScrollArea.react','CommerceAddProductScrollRow.react','CommerceProductItemSearch','LayerFadeOnHide','Link.react','ProfileImageBlockEntry.react','React','ReactDOM','XUIContextualDialog.react','XUISpinner.react','XUITextInput.react','curry','fbglyph'],function a(b,c,d,e,f,g,h,i,j,k){'use strict';var l,m;if(c.__markCompiled)c.__markCompiled();var n=c('React').PropTypes;l=babelHelpers.inherits(o,c('React').Component);m=l&&l.prototype;function o(p,q){m.constructor.call(this,p,q);this.$CommerceProductItemSearchSelector12=function(r){this.props.onProductSelected(r);this.$CommerceProductItemSearchSelector7();}.bind(this);this.$CommerceProductItemSearchSelector9=function(event){this.setState({query:event.target.value});this.$CommerceProductItemSearchSelector2(event.target.value);}.bind(this);this.$CommerceProductItemSearchSelector10=function(){if(this.state.hasNewData&&!this.state.loading)this.$CommerceProductItemSearchSelector2(this.state.query);}.bind(this);this.$CommerceProductItemSearchSelector13=function(r,s){var t={loading:false,hasNewData:s};if(s)t.products=r;this.setState(t);}.bind(this);this.$CommerceProductItemSearchSelector7=function(){this.setState({isProductListVisible:false});}.bind(this);this.$CommerceProductItemSearchSelector8=function(){if(this.props.showAsDropdownMenu&&this.state.productListDialogWidth===0)this.$CommerceProductItemSearchSelector3();this.setState({isProductListVisible:true});}.bind(this);this.$CommerceProductItemSearchSelector1=new (c('CommerceProductItemSearch'))(p.pageID);this.state={hasNewData:true,isProductListVisible:false,loading:false,products:[],productListDialogWidth:0,query:''};}o.prototype.componentDidMount=function(){this.$CommerceProductItemSearchSelector2(this.state.query);this.$CommerceProductItemSearchSelector3();};o.prototype.$CommerceProductItemSearchSelector3=function(){var p=c('ReactDOM').findDOMNode(this.refs.searchBox).offsetWidth;this.setState({productListDialogWidth:p});};o.prototype.render=function(){return c('React').createElement('div',{className:this.props.className},this.$CommerceProductItemSearchSelector4(),this.$CommerceProductItemSearchSelector5());};o.prototype.$CommerceProductItemSearchSelector6=function(){if(this.state.loading)return c('React').createElement(c('XUISpinner.react'),{size:'small'});if(!this.props.showAsDropdownMenu)return c('React').createElement(c('Image.react'),{src:h("\/images\/assets_DO_NOT_HARDCODE\/fb_glyphs\/magnifying-glass_16_bluegray-40.png")});var p=c('React').createElement(c('Image.react'),{src:h("\/images\/assets_DO_NOT_HARDCODE\/fb_glyphs\/triangle-down_16_bluegray-40.png")}),q=this.state.isProductListVisible?this.$CommerceProductItemSearchSelector7:this.$CommerceProductItemSearchSelector8;return c('React').createElement(c('Link.react'),{onClick:q},p);};o.prototype.$CommerceProductItemSearchSelector4=function(){return c('React').createElement('div',{className:"_22f5",ref:'searchBox'},c('React').createElement(c('XUITextInput.react'),{className:"_22f6",placeholder:j._("Search"),onChange:this.$CommerceProductItemSearchSelector9,onFocus:this.$CommerceProductItemSearchSelector8,ref:'input',role:'combobox',value:this.state.query}),c('React').createElement('div',{className:"_22f7"},this.$CommerceProductItemSearchSelector6()));};o.prototype.$CommerceProductItemSearchSelector5=function(){var p=null;if(this.props.canCreateProduct){!this.props.onAddProductClick?k(0):void 0;p=c('React').createElement(c('CommerceAddProductScrollRow.react'),{onClick:this.props.onAddProductClick});}var q=c('React').createElement(c('InfiniteScrollArea.react'),{distanceToEnd:1,onEndReached:this.$CommerceProductItemSearchSelector10,height:this.props.productScrollAreaHeight},p,this.state.products.map(this.$CommerceProductItemSearchSelector11,this));if(!this.props.showAsDropdownMenu)return c('React').createElement('div',{className:"_2jjp"},q);return c('React').createElement(c('XUIContextualDialog.react'),{position:'below',alignment:'right',width:this.state.productListDialogWidth,autoFocus:false,behaviors:{LayerFadeOnHide:c('LayerFadeOnHide')},shown:this.state.isProductListVisible,contextRef:function(){return this.refs.searchBox;}.bind(this),offsetY:-5},q);};o.prototype.$CommerceProductItemSearchSelector11=function(p,q){var r=p.description===''?p.price:p.price+' - '+p.description;return c('React').createElement('div',{className:"_2jjq",key:p.id,onClick:c('curry')(this.$CommerceProductItemSearchSelector12,[p])},c('React').createElement(c('ProfileImageBlockEntry.react'),{imgSrc:p.image_url,title:p.name,subtitle:r}));};o.prototype.$CommerceProductItemSearchSelector2=function(p){this.$CommerceProductItemSearchSelector1.searchOrMore(p,this.$CommerceProductItemSearchSelector13);this.setState({loading:true});};o.defaultProps={canCreateProduct:false,showAsDropdownMenu:false,productScrollAreaHeight:300};o.propTypes={canCreateProduct:n.bool,showAsDropdownMenu:n.bool,onAddProductClick:n.func,onProductSelected:n.func.isRequired,pageID:n.string.isRequired,productScrollAreaHeight:n.number};f.exports=o;},null);
  __d('CommerceInvoiceCreateDialogProductSelector.react',['ix','cx','CommerceProductItemSearchSelector.react','CurrencyInput.atlas','Image.react','LeftRight.react','Link.react','PECurrency.react','ProfileImageBlockEntry.react','React','fbglyph'],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(){var m,n;for(var o=arguments.length,p=Array(o),q=0;q<o;q++)p[q]=arguments[q];return m=(n=k.constructor).call.apply(n,[this].concat(p)),this.$CommerceInvoiceCreateDialogProductSelector1=function(r){if(!this.props.selectedProduct)return;this.props.onPriceChange(this.props.selectedProduct.id,r);}.bind(this),this.$CommerceInvoiceCreateDialogProductSelector4=function(){this.props.onProductSelected([]);}.bind(this),m;}l.prototype.$CommerceInvoiceCreateDialogProductSelector2=function(){return c('React').createElement('div',{className:"_3451"+(this.props.selectedProduct?' '+"hidden_elem":'')},c('React').createElement(c('CommerceProductItemSearchSelector.react'),{canCreateProduct:false,showAsDropdownMenu:true,onProductSelected:this.props.onProductSelected,pageID:this.props.pageID,productScrollAreaHeight:this.props.productScrollAreaHeight}));};l.prototype.$CommerceInvoiceCreateDialogProductSelector3=function(){var m=this.props.selectedProduct;if(!m)return null;var n=this.props.isEditable?c('React').createElement(c('Link.react'),{className:"_3452",onClick:this.$CommerceInvoiceCreateDialogProductSelector4},c('React').createElement(c('Image.react'),{src:h("\/images\/assets_DO_NOT_HARDCODE\/fb_glyphs\/cross_20_fig-accent.png")})):null,o=this.props.isEditable?c('React').createElement(c('CurrencyInput.atlas'),{className:"_3x5v _3x5w",currency:this.props.currency,onChange:this.$CommerceInvoiceCreateDialogProductSelector1,value:m.price}):c('React').createElement(c('PECurrency.react'),{code:this.props.currency,value:m.price*100});return c('React').createElement(c('LeftRight.react'),null,c('React').createElement('div',{className:"_3x5v _3x5x"},c('React').createElement(c('ProfileImageBlockEntry.react'),{imgSrc:m.imageURL,title:m.name})),c('React').createElement('div',{className:(!this.props.isEditable?"_5okk":'')+(' '+"_3x5-")+(' '+"_2pis")+(' '+"_2pi2")},o,n));};l.prototype.render=function(){return (c('React').createElement('div',{className:this.props.className},this.$CommerceInvoiceCreateDialogProductSelector3(),this.$CommerceInvoiceCreateDialogProductSelector2()));};f.exports=l;},null);
  __d('CommerceInvoiceCreateDialogTotalRow.react',['cx','fbt','PECurrency.react','Grid.react','React','XUIGrayText.react','XUIText.react','joinClasses'],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(){var m=i._("Buyer to select");this.props.selectedShippingOption;return (c('React').createElement('div',{className:c('joinClasses')(this.props.className,"_5hc4 clearfix")},c('React').createElement(c('Grid.react'),{className:"_5hc7",cols:2,spacing:'padding/left-12'},c('React').createElement('div',{className:"_5hc8"},c('React').createElement(c('XUIGrayText.react'),{size:'medium'},i._("Shipping"))),c('React').createElement('div',{className:"_5hco _2pim"},c('React').createElement(c('XUIGrayText.react'),{size:'medium'},m)),c('React').createElement('div',{className:"_5hc8"},c('React').createElement(c('XUIText.react'),{size:'large'},i._("Total"))),c('React').createElement('div',{className:"_5hco _2pi2"},c('React').createElement(c('XUIText.react'),{size:'large'},c('React').createElement(c('PECurrency.react'),{code:this.props.currency,value:this.props.totalCost}))))));};f.exports=l;},null);
  __d('CommerceInvoiceDetailsEditableList.react',['React','XUIGrayText.react','XUIText.react','intlList'],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.prototype.render=function(){return (c('React').createElement('div',{className:this.props.className},c('React').createElement(c('XUIGrayText.react'),{display:'block',shade:'light',size:'medium'},this.props.title),c('React').createElement(c('XUIText.react'),{display:'block'},c('intlList')(this.props.listItems.map(this.props.getOptionName),c('intlList').CONJUNCTIONS.NONE))));};function k(){h.apply(this,arguments);}k.propsTypes={className:j.string,getOptionName:j.func.isRequired,listItems:j.array.isRequired,title:j.string.isRequired};f.exports=k;},null);
  __d('CommerceAdminInvoiceDetails.react',['cx','fbt','CommerceInvoiceCreateDialogHeader.react','CommerceInvoiceCreateDialogNoteSection.react','CommerceInvoiceCreateDialogProductSelector.react','CommerceInvoiceCreateDialogTotalRow.react','CommerceInvoiceDetailsEditableList.react','React','XUINotice.react','emptyFunction'],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.$CommerceAdminInvoiceDetails1=function(){if(!this.props.errorMessage)return null;return (c('React').createElement(c('XUINotice.react'),{use:'warn'},this.props.errorMessage));};l.prototype.$CommerceAdminInvoiceDetails2=function(){return (c('React').createElement(c('CommerceInvoiceCreateDialogHeader.react'),{className:"_4kya",invoiceID:this.props.invoiceID,statusMessage:this.props.invoiceStatus}));};l.prototype.$CommerceAdminInvoiceDetails3=function(){return (c('React').createElement('div',{className:"_4kya"},c('React').createElement(c('CommerceInvoiceCreateDialogProductSelector.react'),{currency:this.props.currency,onPriceChange:this.props.onPriceChange,onProductSelected:this.props.onProductSelected,pageID:this.props.pageID,selectedProduct:this.props.selectedProducts[0],productScrollAreaHeight:this.props.productScrollAreaHeight,isEditable:this.props.canEditProducts})));};l.prototype.$CommerceAdminInvoiceDetails4=function(){return (c('React').createElement(c('CommerceInvoiceCreateDialogNoteSection.react'),{canEdit:this.props.canEditProducts,note:this.props.invoiceNote,onNoteChanged:this.props.onNoteChanged}));};l.prototype.$CommerceAdminInvoiceDetails5=function(){return (c('React').createElement('div',{className:"_30v4"},c('React').createElement(c('CommerceInvoiceDetailsEditableList.react'),{title:i._("Accepted payment methods"),listItems:this.props.paymentOptions,getOptionName:function(m){return m.name||m.description;}})));};l.prototype.$CommerceAdminInvoiceDetails6=function(){return (c('React').createElement('div',{className:"_30v4"},c('React').createElement(c('CommerceInvoiceDetailsEditableList.react'),{getOptionName:function(m){return m.name;},listItems:this.props.shippingOptions,title:i._("Accepted shipping options")})));};l.prototype.$CommerceAdminInvoiceDetails7=function(){return (c('React').createElement('div',{className:"_30v4 _4ebn"},c('React').createElement(c('CommerceInvoiceCreateDialogTotalRow.react'),{currency:this.props.currency,selectedShippingOption:this.props.selectedShippingOption,totalCost:this.props.totalCost})));};l.prototype.render=function(){return (c('React').createElement('span',null,this.$CommerceAdminInvoiceDetails1(),this.$CommerceAdminInvoiceDetails2(),this.$CommerceAdminInvoiceDetails3(),this.$CommerceAdminInvoiceDetails7(),this.$CommerceAdminInvoiceDetails4(),this.$CommerceAdminInvoiceDetails6(),this.$CommerceAdminInvoiceDetails5()));};l.defaultProps={onPriceChange:c('emptyFunction'),onProductSelected:c('emptyFunction')};f.exports=l;},null);
  __d("XCommerceTransactionInvoiceUpdateController",["XController"],function a(b,c,d,e,f,g){c.__markCompiled&&c.__markCompiled();f.exports=c("XController").create("\/commerce\/transaction-invoice\/update\/",{});},null);
  __d('CommerceInvoiceAPI',['ActorURI','AsyncRequest','XCommerceTransactionInvoiceUpdateController','emptyFunction'],function a(b,c,d,e,f,g){'use strict';if(c.__markCompiled)c.__markCompiled();var h={updateInvoiceStatus:function(i){var j=c('XCommerceTransactionInvoiceUpdateController').getURIBuilder().getURI();j=c('ActorURI').create(j,i.pageID);var k=i.onSuccess||c('emptyFunction'),l=i.onError||c('emptyFunction'),m={invoice_id:i.invoiceID,transaction_status:i.status,receipt_reject_reason:i.receiptRejectReason,shipment_tracking_no:i.shipmentTrackingNumber};new (c('AsyncRequest'))().setURI(j).setData(m).setMethod('POST').setHandler(function(n){var o=n.getPayload();k(o);}).setErrorHandler(function(n){l();}).send();}};f.exports=h;},null);
  __d('CommerceInvoiceAdminActionsTypes',['keyMirrorRecursive'],function a(b,c,d,e,f,g){'use strict';if(c.__markCompiled)c.__markCompiled();var h=c('keyMirrorRecursive')({CREATE_INVOICE_START:'',CREATE_INVOICE_SUCCESS:'',CREATE_INVOICE_FAILURE:'',HIDE_DIALOG:'',SAVE_CONFIG:'',SET_CONFIG:'',SET_INVOICE_DETAILS:'',SET_INVOICE_NOTE:'',SET_PRODUCT_PRICE:'',SET_SELECTED_PRODUCTS:'',SHOW_DIALOG:'',SHOW_MANAGE_INVOICE_DIALOG:'',UPDATE_INVOICE_STATUS_START:'',UPDATE_INVOICE_STATUS_SUCCESS:'',MANAGE_INVOICE_ERROR:'',HIDE_MANAGE_INVOICE_DIALOG:''});f.exports=h;},null);
  __d('CommerceInvoiceAdminDispatcher',['ExplicitRegistrationDispatcher'],function a(b,c,d,e,f,g){'use strict';var h,i;if(c.__markCompiled)c.__markCompiled();h=babelHelpers.inherits(j,c('ExplicitRegistrationDispatcher'));i=h&&h.prototype;function j(k){i.constructor.call(this,k);this.dispatch=this.dispatch.bind(this);}f.exports=new j({strict:true});},null);
  __d("XCommerceAdminTransactionInvoiceDetailsController",["XController"],function a(b,c,d,e,f,g){c.__markCompiled&&c.__markCompiled();f.exports=c("XController").create("\/messages\/commerce\/admin\/transaction_invoice_details\/",{invoice_id:{type:"FBID",required:true}});},null);
  __d("XCommerceTransactionInvoiceConfigController",["XController"],function a(b,c,d,e,f,g){c.__markCompiled&&c.__markCompiled();f.exports=c("XController").create("\/commerce\/transaction\/invoice\/config\/",{page_id:{type:"FBID",required:true}});},null);
  __d('CommerceInvoiceAdminActions',['fbt','CommerceInvoiceAdminActionsTypes','ActorURI','AsyncRequest','CommerceInvoiceAPI','CommerceInvoiceAdminDispatcher','XCommerceAdminTransactionInvoiceDetailsController','XCommerceTransactionInvoiceConfigController'],function a(b,c,d,e,f,g,h){'use strict';if(c.__markCompiled)c.__markCompiled();var i={setConfig:function(j){c('CommerceInvoiceAdminDispatcher').dispatch({actionType:c('CommerceInvoiceAdminActionsTypes').SET_CONFIG,config:j});},createInvoiceStart:function(){c('CommerceInvoiceAdminDispatcher').dispatch({actionType:c('CommerceInvoiceAdminActionsTypes').CREATE_INVOICE_START});},createInvoiceSuccess:function(){c('CommerceInvoiceAdminDispatcher').dispatch({actionType:c('CommerceInvoiceAdminActionsTypes').CREATE_INVOICE_SUCCESS});},createInvoiceFailure:function(j){c('CommerceInvoiceAdminDispatcher').dispatch({actionType:c('CommerceInvoiceAdminActionsTypes').CREATE_INVOICE_FAILURE,error:j});},hideDialog:function(){c('CommerceInvoiceAdminDispatcher').dispatch({actionType:c('CommerceInvoiceAdminActionsTypes').HIDE_DIALOG});},hideManageInvoiceDialog:function(){c('CommerceInvoiceAdminDispatcher').dispatch({actionType:c('CommerceInvoiceAdminActionsTypes').HIDE_MANAGE_INVOICE_DIALOG});},saveConfiguration:function(){c('CommerceInvoiceAdminDispatcher').dispatch({actionType:c('CommerceInvoiceAdminActionsTypes').SAVE_CONFIG});},setInvoiceDetails:function(j,k){c('CommerceInvoiceAdminDispatcher').dispatch({actionType:c('CommerceInvoiceAdminActionsTypes').SET_INVOICE_DETAILS,invoiceID:j,invoiceDetails:k});},setInvoiceNote:function(j){c('CommerceInvoiceAdminDispatcher').dispatch({actionType:c('CommerceInvoiceAdminActionsTypes').SET_INVOICE_NOTE,invoiceNote:j});},setProductPrice:function(j,k){c('CommerceInvoiceAdminDispatcher').dispatch({actionType:c('CommerceInvoiceAdminActionsTypes').SET_PRODUCT_PRICE,productID:j,price:k});},setSelectedProducts:function(j){c('CommerceInvoiceAdminDispatcher').dispatch({actionType:c('CommerceInvoiceAdminActionsTypes').SET_SELECTED_PRODUCTS,products:j});},showDialog:function(){c('CommerceInvoiceAdminDispatcher').dispatch({actionType:c('CommerceInvoiceAdminActionsTypes').SHOW_DIALOG});},showManageInvoiceDialog:function(j,k){c('CommerceInvoiceAdminDispatcher').dispatch({actionType:c('CommerceInvoiceAdminActionsTypes').SHOW_MANAGE_INVOICE_DIALOG,invoiceID:j,pageID:k});},updateInvoiceStatusStart:function(j,k){c('CommerceInvoiceAdminDispatcher').dispatch({actionType:c('CommerceInvoiceAdminActionsTypes').UPDATE_INVOICE_STATUS_START,invoiceID:k,pageID:j});},updateInvoiceStatusSuccess:function(j,k,l){c('CommerceInvoiceAdminDispatcher').dispatch({actionType:c('CommerceInvoiceAdminActionsTypes').UPDATE_INVOICE_STATUS_SUCCESS,invoiceID:k,pageID:j,status:l});},setManageInvoiceError:function(j,k){c('CommerceInvoiceAdminDispatcher').dispatch({actionType:c('CommerceInvoiceAdminActionsTypes').MANAGE_INVOICE_ERROR,invoiceID:j,errorMessage:k});},fetchInvoiceDetails:function(j,k){var l=c('XCommerceAdminTransactionInvoiceDetailsController').getURIBuilder().setFBID('invoice_id',k).getURI(),m=c('ActorURI').create(l,j);new (c('AsyncRequest'))().setURI(m).setHandler(function(n){var o=n.payload,p=o.items[0],q={id:p.product_item_id,imageURL:p.product_image_uri,name:p.product_name,price:p.product_price/100},r={currency:o.currency,id:o.invoice_id,pageID:o.page_id,status:o.status,statusDisplay:o.status_display,totalCost:o.total_cost,products:[q],availableShippingOptions:o.available_shipping_options,selectedShippingOption:o.selected_shipping_option,availablePaymentOptions:o.available_payment_options,selectedPaymentOption:o.selected_payment_option,receiptPhotoURL:o.receipt_photo_url,shippingAddress:o.ship_to_address,note:o.invoice_notes};i.setInvoiceDetails(k,r);}).send();},fetchConfig:function(j){var k=c('XCommerceTransactionInvoiceConfigController').getURIBuilder().setFBID('page_id',j).getURI(),l=c('ActorURI').create(k,j);new (c('AsyncRequest'))().setURI(l).setHandler(function(m){var n=m.payload,o={isOnboarded:n.isOnboarded,businessEmail:n.merchantSettings.contactEmail,paymentMethods:n.paymentOptions,shippingOptions:n.shippingOptions,merchantSettings:n.merchantSettings};i.setConfig(o);}).send();},updateInvoiceStatus:function(j,k,l){this.updateInvoiceStatusStart(j,k);c('CommerceInvoiceAPI').updateInvoiceStatus({invoiceID:k,pageID:j,status:l,onSuccess:function(){this.updateInvoiceStatusSuccess(j,k,l);}.bind(this),onError:function(){var m=h._("There was an error updating the order status");this.setManageInvoiceError(k,m);}.bind(this)});}};f.exports=i;},null);
  __d('CommerceInvoicePaymentOptionCategory',[],function a(b,c,d,e,f,g){'use strict';if(c.__markCompiled)c.__markCompiled();var h={BANK_TRANSFER:'BANK_TRANSFER',CUSTOM:'CUSTOM',PAY_ON_DELIVERY:'PAY_ON_DELIVERY'};f.exports=h;},null);
  __d('CommerceInvoiceAdminStore',['invariant','CommerceInvoiceAdminActions','CommerceInvoiceAdminActionsTypes','CommerceInvoiceAdminDispatcher','CommerceInvoicePaymentOptionCategory','FluxStore','immutable','PageProductTransactionOrderStatus','Map'],function a(b,c,d,e,f,g,h){'use strict';var i,j;if(c.__markCompiled)c.__markCompiled();var k=c('immutable').Map;i=babelHelpers.inherits(l,c('FluxStore'));j=i&&i.prototype;function l(m){j.constructor.call(this,m);this.$CommerceInvoiceAdminStore1=true;this.$CommerceInvoiceAdminStore2=false;this.$CommerceInvoiceAdminStore3=false;this.$CommerceInvoiceAdminStore4=k(new (c('Map'))());this.$CommerceInvoiceAdminStore5=false;this.$CommerceInvoiceAdminStore6=k(new (c('Map'))());this.$CommerceInvoiceAdminStore7=false;this.$CommerceInvoiceAdminStore8=null;this.$CommerceInvoiceAdminStore11='Draft';this.$CommerceInvoiceAdminStore12=k(new (c('Map'))());this.$CommerceInvoiceAdminStore13=k(new (c('Map'))());this.$CommerceInvoiceAdminStore14='';this.$CommerceInvoiceAdminStore10=null;this.$CommerceInvoiceAdminStore15();}l.prototype.$CommerceInvoiceAdminStore16=function(m){return {description:m.description,id:m.id,imageURL:m.image_url,name:m.name,permalink:m.permalink,price:m.current_price.amount/100};};l.prototype.$CommerceInvoiceAdminStore15=function(){this.$CommerceInvoiceAdminStore9=k(new (c('Map'))());this.$CommerceInvoiceAdminStore14='';};l.prototype.$CommerceInvoiceAdminStore17=function(){this.$CommerceInvoiceAdminStore8={isOnboarded:true,businessEmail:'test@test.com',paymentMethods:[{type:c('CommerceInvoicePaymentOptionCategory').BANK_TRANSFER,description:'*transfer detaile here*'}],shippingOptions:[{id:'1234',price:2000,currency:'USD',name:'UPS Ground'}],merchantSettings:{id:'1234567',defaultCurrency:'USD'}};};l.prototype.$CommerceInvoiceAdminStore18=function(m){this.$CommerceInvoiceAdminStore2=m;};l.prototype.$CommerceInvoiceAdminStore19=function(m){this.$CommerceInvoiceAdminStore3=m;};l.prototype.$CommerceInvoiceAdminStore20=function(m){this.$CommerceInvoiceAdminStore7=m;};l.prototype.$CommerceInvoiceAdminStore21=function(m){this.$CommerceInvoiceAdminStore14=m;};l.prototype.$CommerceInvoiceAdminStore22=function(m,n){var o=this.$CommerceInvoiceAdminStore9.get(m);o.price=n;this.$CommerceInvoiceAdminStore9=this.$CommerceInvoiceAdminStore9.set(m,Object.assign({},o));};l.prototype.$CommerceInvoiceAdminStore23=function(m){var n=new (c('Map'))();m.map(function(o){return n.set(o.id,this.$CommerceInvoiceAdminStore16(o));}.bind(this));this.$CommerceInvoiceAdminStore9=k(n);};l.prototype.$CommerceInvoiceAdminStore24=function(){this.$CommerceInvoiceAdminStore4=k(new (c('Map'))());this.$CommerceInvoiceAdminStore6=k(new (c('Map'))());this.$CommerceInvoiceAdminStore12=k(new (c('Map'))());};l.prototype.$CommerceInvoiceAdminStore25=function(m,n){var o=new (c('Map'))();o.set(m,n);this.$CommerceInvoiceAdminStore13=k(o);};l.prototype.__onDispatch=function(m){switch(m.actionType){case c('CommerceInvoiceAdminActionsTypes').CREATE_INVOICE_FAILURE:this.$CommerceInvoiceAdminStore20(false);this.$CommerceInvoiceAdminStore19(true);this.__emitChange();break;case c('CommerceInvoiceAdminActionsTypes').CREATE_INVOICE_START:this.$CommerceInvoiceAdminStore20(true);this.__emitChange();break;case c('CommerceInvoiceAdminActionsTypes').CREATE_INVOICE_SUCCESS:this.$CommerceInvoiceAdminStore20(false);this.$CommerceInvoiceAdminStore18(false);this.$CommerceInvoiceAdminStore19(false);this.$CommerceInvoiceAdminStore15();this.__emitChange();break;case c('CommerceInvoiceAdminActionsTypes').HIDE_DIALOG:this.$CommerceInvoiceAdminStore18(false);this.$CommerceInvoiceAdminStore19(false);this.$CommerceInvoiceAdminStore15();this.__emitChange();break;case c('CommerceInvoiceAdminActionsTypes').HIDE_MANAGE_INVOICE_DIALOG:this.$CommerceInvoiceAdminStore24();this.__emitChange();break;case c('CommerceInvoiceAdminActionsTypes').SAVE_CONFIG:this.$CommerceInvoiceAdminStore17();this.__emitChange();break;case c('CommerceInvoiceAdminActionsTypes').SET_CONFIG:this.$CommerceInvoiceAdminStore8=m.config;this.__emitChange();break;case c('CommerceInvoiceAdminActionsTypes').SET_INVOICE_DETAILS:this.$CommerceInvoiceAdminStore25(m.invoiceID,m.invoiceDetails);this.__emitChange();break;case c('CommerceInvoiceAdminActionsTypes').SET_INVOICE_NOTE:this.$CommerceInvoiceAdminStore21(m.invoiceNote);this.__emitChange();break;case c('CommerceInvoiceAdminActionsTypes').SET_PRODUCT_PRICE:this.$CommerceInvoiceAdminStore22(m.productID,m.price);this.__emitChange();break;case c('CommerceInvoiceAdminActionsTypes').SET_SELECTED_PRODUCTS:this.$CommerceInvoiceAdminStore23(m.products);this.__emitChange();break;case c('CommerceInvoiceAdminActionsTypes').SHOW_DIALOG:this.$CommerceInvoiceAdminStore18(true);this.__emitChange();break;case c('CommerceInvoiceAdminActionsTypes').SHOW_MANAGE_INVOICE_DIALOG:var n=new (c('Map'))();n.set(m.invoiceID,true);this.$CommerceInvoiceAdminStore4=k(n);c('CommerceInvoiceAdminActions').fetchInvoiceDetails(m.pageID,m.invoiceID);this.__emitChange();break;case c('CommerceInvoiceAdminActionsTypes').UPDATE_INVOICE_STATUS_START:var o=new (c('Map'))();o.set(m.invoiceID,true);this.$CommerceInvoiceAdminStore6=k(o);this.__emitChange();break;case c('CommerceInvoiceAdminActionsTypes').UPDATE_INVOICE_STATUS_SUCCESS:var p=this.$CommerceInvoiceAdminStore13.get(m.invoiceID);p.status=m.status;this.$CommerceInvoiceAdminStore25(m.invoiceID,p);this.$CommerceInvoiceAdminStore4=k(new (c('Map'))());this.$CommerceInvoiceAdminStore6=k(new (c('Map'))());this.__emitChange();break;case c('CommerceInvoiceAdminActionsTypes').MANAGE_INVOICE_ERROR:var q=new (c('Map'))();q.set(m.invoiceID,m.errorMessage);this.$CommerceInvoiceAdminStore12=k(q);this.$CommerceInvoiceAdminStore6=k(new (c('Map'))());this.__emitChange();break;}};l.prototype.getCanSaveConfig=function(){return this.$CommerceInvoiceAdminStore1;};l.prototype.getCanSendInvoice=function(){return this.$CommerceInvoiceAdminStore9.size>0;};l.prototype.getIsDialogVisible=function(){return this.$CommerceInvoiceAdminStore2;};l.prototype.getIsInvoicePendingApproval=function(m){var n=this.$CommerceInvoiceAdminStore13.get(m);return !!n&&n.status===c('PageProductTransactionOrderStatus').PENDING_APPROVAL;};l.prototype.getIsInvoiceCancelled=function(m){var n=this.$CommerceInvoiceAdminStore13.get(m);return (n&&n.status===c('PageProductTransactionOrderStatus').VOIDED);};l.prototype.getIsInvoiceFulfilled=function(m){var n=this.$CommerceInvoiceAdminStore13.get(m);return (n&&n.status===c('PageProductTransactionOrderStatus').SHIPPED);};l.prototype.getIsInvoicePaid=function(m){var n=this.$CommerceInvoiceAdminStore13.get(m);return (n&&!!n.selectedPaymentOption&&(n.status===c('PageProductTransactionOrderStatus').PAYMENT_SUBMITTED||n.status===c('PageProductTransactionOrderStatus').SHIPPED));};l.prototype.getIsManageInvoiceDialogVisible=function(m){return this.$CommerceInvoiceAdminStore4.get(m)===true;};l.prototype.getIsErrorMessageVisible=function(){return this.$CommerceInvoiceAdminStore3;};l.prototype.getIsSavingConfig=function(){return this.$CommerceInvoiceAdminStore5;};l.prototype.getIsSendingInvoice=function(){return this.$CommerceInvoiceAdminStore7;};l.prototype.getConfig=function(){return this.$CommerceInvoiceAdminStore8;};l.prototype.getInvoiceNote=function(){return this.$CommerceInvoiceAdminStore14;};l.prototype.getProductPrice=function(m){!this.$CommerceInvoiceAdminStore9.get(m)?h(0):void 0;return this.$CommerceInvoiceAdminStore9.get(m).price;};l.prototype.getSelectedProducts=function(){return this.$CommerceInvoiceAdminStore9.toArray();};l.prototype.getStatusMessage=function(){return this.$CommerceInvoiceAdminStore11;};l.prototype.getManageInvoiceErrorMessage=function(m){return this.$CommerceInvoiceAdminStore12.get(m);};l.prototype.getSelectedShippingOption=function(){return this.$CommerceInvoiceAdminStore10;};l.prototype.getIsManageInvoiceDialogLoading=function(m){var n=this.$CommerceInvoiceAdminStore6.get(m)===true;return (n||this.getInvoiceDetails(m)==null);};l.prototype.getTotalCost=function(){var m=0;this.$CommerceInvoiceAdminStore9.forEach(function(n){return m+=n.price;});return m*100;};l.prototype.getInvoiceDetails=function(m){return this.$CommerceInvoiceAdminStore13.get(m);};f.exports=new l(c('CommerceInvoiceAdminDispatcher'));},null);
  __d('CommerceInvoiceConfigDialog.react',['cx','fbt','ix','Image.react','LayerFadeOnHide','LayerHideOnBlur','React','XUIDialog.react','XUIDialogBody.react','XUIDialogButton.react','XUIDialogCancelButton.react','XUIDialogFooter.react','XUIDialogTitle.react','XUINotice.react'],function a(b,c,d,e,f,g,h,i,j){'use strict';var k,l;if(c.__markCompiled)c.__markCompiled();var m=672;k=babelHelpers.inherits(n,c('React').Component);l=k&&k.prototype;function n(o){l.constructor.call(this,o);}n.prototype.$CommerceInvoiceConfigDialog1=function(){return (c('React').createElement('span',null,i._("Invoice Settings")));};n.prototype.$CommerceInvoiceConfigDialog2=function(){if(!this.props.isErrorMessageVisible)return null;return (c('React').createElement(c('XUINotice.react'),{use:'warn'},i._("Oops, something went wrong! Your invoice settings were not saved.")));};n.prototype.$CommerceInvoiceConfigDialog3=function(){return (c('React').createElement('div',{className:"_1_bg"},this.$CommerceInvoiceConfigDialog2(),c('React').createElement(c('Image.react'),{src:j('/images/commerce/invoices/invoice-config-mock.png'),height:1062,width:624})));};n.prototype.$CommerceInvoiceConfigDialog4=function(){return (c('React').createElement('div',null,c('React').createElement(c('XUIDialogCancelButton.react'),null),c('React').createElement(c('XUIDialogButton.react'),{action:'confirm',label:i._("Save & Continue"),use:'confirm',onClick:this.props.onSave,disabled:this.props.isSendButtonDisabled})));};n.prototype.render=function(){return (c('React').createElement(c('XUIDialog.react'),{shown:this.props.isVisible,behaviors:{LayerFadeOnHide:c('LayerFadeOnHide'),LayerHideOnBlur:c('LayerHideOnBlur')},onToggle:this.props.onToggle,width:m},c('React').createElement(c('XUIDialogTitle.react'),null,this.$CommerceInvoiceConfigDialog1()),c('React').createElement(c('XUIDialogBody.react'),{useCustomPadding:true},this.$CommerceInvoiceConfigDialog3()),c('React').createElement(c('XUIDialogFooter.react'),null,this.$CommerceInvoiceConfigDialog4())));};n.defaultProps={isErrorMessageVisible:false};f.exports=n;},null);
  __d('CommerceInvoiceCreateDialog.react',['cx','fbt','CommerceAdminInvoiceDetails.react','LayerFadeOnHide','LayerHideOnBlur','React','XUIDialog.react','XUIDialogBody.react','XUIDialogButton.react','XUIDialogCancelButton.react','XUIDialogFooter.react','XUIDialogTitle.react'],function a(b,c,d,e,f,g,h,i){'use strict';var j,k;if(c.__markCompiled)c.__markCompiled();var l=556;j=babelHelpers.inherits(m,c('React').Component);k=j&&j.prototype;function m(n){k.constructor.call(this,n);}m.prototype.$CommerceInvoiceCreateDialog1=function(){return (c('React').createElement('span',null,i._("New Invoice")));};m.prototype.$CommerceInvoiceCreateDialog2=function(){var n=this.props.isErrorMessageVisible?i._("Oops, something went wrong! Your invoice was not sent."):null;return (c('React').createElement('div',{className:"_1_bg"},c('React').createElement(c('CommerceAdminInvoiceDetails.react'),{canEditProducts:true,currency:this.props.currency,invoiceNote:this.props.invoiceNote,invoiceStatus:this.props.invoiceStatus,errorMessage:n,onNoteChanged:this.props.onNoteChanged,onPriceChange:this.props.onPriceChange,onProductSelected:this.props.onProductSelected,pageID:this.props.pageID,paymentOptions:this.props.paymentOptions,productScrollAreaHeight:this.props.productScrollAreaHeight,selectedProducts:this.props.selectedProducts,selectedShippingOption:this.props.selectedShippingOption,shippingOptions:this.props.shippingOptions,totalCost:this.props.totalCost})));};m.prototype.$CommerceInvoiceCreateDialog3=function(){return (c('React').createElement('div',null,c('React').createElement(c('XUIDialogCancelButton.react'),null),c('React').createElement(c('XUIDialogButton.react'),{action:'confirm',label:i._("Send"),use:'confirm',onClick:this.props.onSend,disabled:this.props.isSendButtonDisabled})));};m.prototype.render=function(){return (c('React').createElement(c('XUIDialog.react'),{shown:this.props.isDialogVisible,behaviors:{LayerFadeOnHide:c('LayerFadeOnHide'),LayerHideOnBlur:c('LayerHideOnBlur')},onToggle:this.props.onToggle,width:l},c('React').createElement(c('XUIDialogTitle.react'),null,this.$CommerceInvoiceCreateDialog1()),c('React').createElement(c('XUIDialogBody.react'),{useCustomPadding:true},this.$CommerceInvoiceCreateDialog2()),c('React').createElement(c('XUIDialogFooter.react'),null,this.$CommerceInvoiceCreateDialog3())));};f.exports=m;},null);
  __d("XCommerceTransactionInvoiceCreateAsyncController",["XController"],function a(b,c,d,e,f,g){c.__markCompiled&&c.__markCompiled();f.exports=c("XController").create("\/commerce\/transaction-invoice\/create\/",{});},null);
  __d('CommerceInvoiceAdminDialogContainer.react',['invariant','ActorURI','AsyncRequest','CommerceInvoiceAdminActions','CommerceInvoiceAdminDispatcher','CommerceInvoiceAdminStore','CommerceInvoiceCreateDialog.react','CommerceInvoiceConfigDialog.react','FluxContainer','FluxStore','React','XCommerceTransactionInvoiceCreateAsyncController','XPagesManagerSettingsController','goURI'],function a(b,c,d,e,f,g,h){'use strict';var i,j;if(c.__markCompiled)c.__markCompiled();var k=250;i=babelHelpers.inherits(l,c('React').Component);j=i&&i.prototype;function l(){var m,n;for(var o=arguments.length,p=Array(o),q=0;q<o;q++)p[q]=arguments[q];return m=(n=j.constructor).call.apply(n,[this].concat(p)),this.$CommerceInvoiceAdminDialogContainer2=function(r,s){c('CommerceInvoiceAdminActions').setProductPrice(r,s);},this.$CommerceInvoiceAdminDialogContainer3=function(r){c('CommerceInvoiceAdminActions').setSelectedProducts(r);},this.$CommerceInvoiceAdminDialogContainer4=function(){c('CommerceInvoiceAdminActions').saveConfiguration();},this.$CommerceInvoiceAdminDialogContainer5=function(){c('CommerceInvoiceAdminActions').createInvoiceStart();var r=Math.round(this.state.selectedProducts[0].price*100),s=c('XCommerceTransactionInvoiceCreateAsyncController').getURIBuilder().getURI(),t=c('ActorURI').create(s,this.props.pageID);new (c('AsyncRequest'))().setURI(t).setMethod('POST').setData({page_id:this.props.pageID,customer_id:this.props.recipientID,product_id:this.state.selectedProducts[0].id,product_price:r,notes:this.state.invoiceNote}).setHandler(function(u){if(u.error)return c('CommerceInvoiceAdminActions').createInvoiceFailure(u);return c('CommerceInvoiceAdminActions').createInvoiceSuccess();}).setErrorHandler(function(u){return c('CommerceInvoiceAdminActions').createInvoiceFailure(u);}).send();}.bind(this),this.$CommerceInvoiceAdminDialogContainer6=function(r){if(!this.state.isDialogVisible&&r){c('CommerceInvoiceAdminActions').showDialog();}else if(this.state.isDialogVisible&&!r)c('CommerceInvoiceAdminActions').hideDialog();}.bind(this),m;}l.getStores=function(){return [c('CommerceInvoiceAdminStore')];};l.calculateState=function(m,n){var o=c('CommerceInvoiceAdminStore').getConfig(),p=o===null||o===undefined?null:o.merchantSettings.defaultCurrency;return {canSaveConfig:c('CommerceInvoiceAdminStore').getCanSaveConfig(),canSendInvoice:c('CommerceInvoiceAdminStore').getCanSendInvoice(),config:o,currency:p,invoiceNote:c('CommerceInvoiceAdminStore').getInvoiceNote(),invoiceStatus:c('CommerceInvoiceAdminStore').getStatusMessage(),isDialogVisible:c('CommerceInvoiceAdminStore').getIsDialogVisible(),isErrorMessageVisible:c('CommerceInvoiceAdminStore').getIsErrorMessageVisible(),isSavingConfig:c('CommerceInvoiceAdminStore').getIsSavingConfig(),isSendingInvoice:c('CommerceInvoiceAdminStore').getIsSendingInvoice(),price:0,selectedProducts:c('CommerceInvoiceAdminStore').getSelectedProducts(),selectedShippingOption:c('CommerceInvoiceAdminStore').getSelectedShippingOption(),totalCost:c('CommerceInvoiceAdminStore').getTotalCost()};};l.prototype.componentWillMount=function(){c('CommerceInvoiceAdminDispatcher').explicitlyRegisterStores([c('CommerceInvoiceAdminStore')]);c('CommerceInvoiceAdminActions').fetchConfig(this.props.pageID);};l.prototype.showDialog=function(){c('CommerceInvoiceAdminActions').showDialog();};l.prototype.$CommerceInvoiceAdminDialogContainer1=function(m){c('CommerceInvoiceAdminActions').setInvoiceNote(m);};l.prototype.render=function(){if(!this.state.isDialogVisible)return null;var m=this.state.config&&this.state.config.isOnboarded&&this.state.config.paymentMethods.length>0&&this.state.config.shippingOptions.length>0;if(!m){var n=c('XPagesManagerSettingsController').getURIBuilder().setString('page_token',this.props.pageID).setString('tab','shop').getURI();c('goURI')(n);return null;}!(this.state.currency!=null)?h(0):void 0;return (c('React').createElement(c('CommerceInvoiceCreateDialog.react'),{currency:this.state.currency,invoiceNote:this.state.invoiceNote,invoiceStatus:this.state.invoiceStatus,isErrorMessageVisible:this.state.isErrorMessageVisible,isDialogVisible:this.state.isDialogVisible,isSendButtonDisabled:!this.state.canSendInvoice||this.state.isSendingInvoice,onNoteChanged:this.$CommerceInvoiceAdminDialogContainer1,onPriceChange:this.$CommerceInvoiceAdminDialogContainer2,onProductSelected:this.$CommerceInvoiceAdminDialogContainer3,onSend:this.$CommerceInvoiceAdminDialogContainer5,onToggle:this.$CommerceInvoiceAdminDialogContainer6,pageID:this.props.pageID,paymentOptions:this.state.config?this.state.config.paymentMethods:[],price:this.state.price,productScrollAreaHeight:k,selectedProducts:this.state.selectedProducts,selectedShippingOption:this.state.selectedShippingOption,shippingOptions:this.state.config?this.state.config.shippingOptions:[],totalCost:this.state.totalCost}));};f.exports=c('FluxContainer').create(l,{withProps:true});},null);
  __d('CommerceInvoiceAdminButton.react',['cx','fbt','ix','CommerceInvoiceAdminDialogContainer.react','Image.react','Link.react','React','TooltipData','joinClasses'],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.$CommerceInvoiceAdminButton1=function(){this.refs.invoiceDialog.showDialog();}.bind(this);this.state={dialogIsVisible:false};}m.prototype.render=function(){var n=i._("Create Invoice"),o=c('joinClasses')("_4h_d",this.props.className);return (c('React').createElement('div',{className:o},c('React').createElement(c('Link.react'),babelHelpers['extends']({className:"_4h_e",href:'#',onClick:this.$CommerceInvoiceAdminButton1},c('TooltipData').propsFor(n)),c('React').createElement(c('Image.react'),{className:"_4h_f",src:j('/images/commerce/invoices/invoice-button-icon.png')}),c('React').createElement(c('CommerceInvoiceAdminDialogContainer.react'),{isVisible:this.state.dialogIsVisible,pageID:this.props.pageID,recipientID:this.props.recipientID,ref:'invoiceDialog'}))));};f.exports=m;},null);
  __d('FacepileRounded.react',['cx','Image.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(){var m,n;for(var o=arguments.length,p=Array(o),q=0;q<o;q++)p[q]=arguments[q];return m=(n=j.constructor).call.apply(n,[this].concat(p)),this.renderFace=function(r){return (c('React').createElement(c('Image.react'),{className:"_1shq",key:r.image_src,src:r.image_src,width:32,height:32}));},m;}l.prototype.render=function(){var m="_1shp _1shr";return (c('React').createElement('div',{className:m},c('React').createElement('div',{className:"_4qan"},this.props.profiles.map(this.renderFace)),c('React').createElement('div',{className:"_4qao"},this.props.message)));};l.propTypes={className:k.string,profiles:k.arrayOf(k.shape({image_src:k.any.isRequired})).isRequired};f.exports=l;},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';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(){var n,o;for(var p=arguments.length,q=Array(p),r=0;r<p;r++)q[r]=arguments[r];return n=(o=k.constructor).call.apply(o,[this].concat(q)),this.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));}}.bind(this),this.getTooltipText=function(){switch(this.props.creatorType){case 'application':return this.getApplicationText();case 'gray_account':return this.getGrayAccountText();case 'indirect_admin':return this.getIndirectAdminText();}}.bind(this),this.getProfileLinkWithHovercard=function(){if(!this.props.profileURI)return c('React').createElement('span',null,this.props.creatorName);var s=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':s,href:this.props.profileURI},this.props.creatorName));}.bind(this),this.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)]);}}.bind(this),this.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)]);}}.bind(this),this.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.");}}.bind(this),this.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");}}.bind(this),n;}m.prototype.render=function(){var n=void 0,o=this.getCreatorLink();switch(this.props.labelType){case 'commented':n=i._("Commented on by {creator}",[i.param('creator',o)]);break;case 'edited_comment':n=i._("Edited by {creator}",[i.param('creator',o)]);break;case 'sent_message':n=i._("Sent by {creator}",[i.param('creator',o)]);break;case 'page_admin_note':n=i._("Noted by {creator}",[i.param('creator',o)]);break;default:return;}return c('React').createElement('span',null,n,c('React').createElement(c('HelpLink.react'),{tooltip:this.getHelpText()}));};m.propTypes={creatorID:l.string.isRequired,creatorType:l.string.isRequired,creatorName:l.string.isRequired,labelType:l.string.isRequired,pageID:l.string.isRequired,profileURI:l.string};f.exports=m;},null);
  __d('PagesMessengerCreatorInfo.react',['cx','React','UFICreatorInfo.react','XUIGrayText.react'],function a(b,c,d,e,f,g,h){'use strict';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','MercuryPageServerRequests','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);this.__serverRequests=c('MercuryPageServerRequests').getForFBID(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','joinClasses'],function a(b,c,d,e,f,g,h){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(){var m,n;'use strict';for(var o=arguments.length,p=Array(o),q=0;q<o;q++)p[q]=arguments[q];return m=(n=j.constructor).call.apply(n,[this].concat(p)),this.$PagesMessengerTextInput1=null,this.resetHeight=function(){this.$PagesMessengerTextInput1&&this.$PagesMessengerTextInput1.resetHeight();}.bind(this),this.updateHeight=function(){this.$PagesMessengerTextInput1&&this.$PagesMessengerTextInput1.updateHeight();}.bind(this),m;}l.prototype.componentDidMount=function(){'use strict';if(this.refs.input)this.$PagesMessengerTextInput1=new (c('TextAreaControl'))(this.refs.input);};l.prototype.render=function(){'use strict';var m=c('joinClasses')(this.props.className,"_58al"+(' '+"uiTextareaAutogrow"));return (c('React').createElement(c('AbstractTextField.react'),this.props,c('React').createElement('textarea',{type:'text',className:m,tabIndex:this.props.tabIndex,onClick:this.props.onClick,onKeyUp:this.props.onKeyUp,onPaste:this.props.onPaste,onFocus:this.props.onFocus,ref:'input'})));};l.propTypes=babelHelpers['extends']({},c('AbstractTextField.react').propTypes,{onClick:k.func,onKeyUp:k.func,onPaste:k.func,onFocus:k.func});f.exports=l;},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','fbt','Image.react','PagesEventObserver','PagesEventType','PagesMessengerNewThreadDialog.react','React','XUIButton.react','fbglyph'],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.getButtonSize=function(o){'use strict';return o.size||'medium';};function n(o){'use strict';l.constructor.call(this,o);this.state={showDialog:false};}n.prototype.$PagesMessengerMessagePageButton1=function(){'use strict';this.setState({showDialog:false});};n.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});};n.prototype.render=function(){'use strict';var o=j._("Message Page");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:o,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})));};n.propTypes={flowID:m.string,pageID:m.string.isRequired,pagesCommNewMessagesTab:m.bool};f.exports=n;},null);
  __d("XShareScrapeAsyncController",["XController"],function a(b,c,d,e,f,g){c.__markCompiled&&c.__markCompiled();f.exports=c("XController").create("\/share_scrape\/",{});},null);
  __d('ChatShareLinkUploader',['AsyncRequest','CSS','DOM','URLScraper','MercuryShareLinkUploader','MercuryAttachmentTemplates','XShareScrapeAsyncController','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.__getLoadShareURI=function(){'use strict';return c('XShareScrapeAsyncController').getURIBuilder().getURI();};j.prototype.loadShare=function(k,l){'use strict';this.$ChatShareLinkUploader14(new (c('AsyncRequest'))(this.__getLoadShareURI()).setMethod('POST').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',['ActorURI','ChatShareLinkUploader','emptyFunction','SubscriptionsHandler','XShareScrapeAsyncController'],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,o){'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));this.actor_id=o;}j.prototype.__getLoadShareURI=function(){'use strict';return new (c('ActorURI').create)(c('XShareScrapeAsyncController').getURIBuilder().getURI(),this.actor_id);};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('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.$PagesContextCardCustomTag1=function(){if(this.props.onClick)this.props.onClick(this.props.tagData);}.bind(this);this.$PagesContextCardCustomTag2=function(event){event.stopPropagation();if(this.props.hideOnRemove)this.setState({removed:true});if(this.props.onRemove)this.props.onRemove(this.props.tagData.name);}.bind(this);this.state={removed:false};}k.prototype.genDefaultProps=function(){return {textOnly:false};};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',n={color:'#'+l.color.substring(2),backgroundColor:'none'};if(!this.props.textOnly)n.backgroundColor='#'+l.darkerFill.substring(2);return (c('React').createElement(c('XUICard.react'),{className:"_1pbr"+(this.props.onClick?' '+"_2rj2":'')+(this.props.textOnly?' '+"_49ww":''),style:n,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('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,PRIORITY:c('PageMessageEnumTag').IMPORTANT},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(){var k,l;'use strict';for(var m=arguments.length,n=Array(m),o=0;o<m;o++)n[o]=arguments[o];return k=(l=i.constructor).call.apply(l,[this].concat(n)),this.$PagesEnumTag1=function(){if(this.props.onClick)this.props.onClick(this.props.unit);}.bind(this),this.$PagesEnumTag2=function(){if(this.props.onRemove)this.props.onRemove();}.bind(this),k;}j.prototype.getTagData=function(){'use strict';var k={};if(this.props.unit.getKey()===c('PagesManagerMessagingNavigationUnitKey').FILTERS.FLAGGED||this.props.unit.getKey()===c('PagesManagerMessagingNavigationUnitKey').FILTERS.PRIORITY){k.borderColor='FFFB9240';k.color='FFFB9240';k.fillColor='FFFFF4EC';k.darkerFill='FFFCDEC5';k.id=0;}k.name=this.props.unit.getDisplayTitle();return k;};j.prototype.render=function(){'use strict';var k=this.getTagData();return (c('React').createElement(c('PagesContextCardCustomTag.react'),babelHelpers['extends']({},this.props,{key:k.id,onClick:this.$PagesEnumTag1,onRemove:this.$PagesEnumTag2,tagData:k})));};f.exports=j;},null);
  __d('BUITimeInput.react',['ix','cx','AbstractTimeInput.react','Image.react','React','XUIError.react','fbglyph','joinClasses'],function a(b,c,d,e,f,g,h,i){'use strict';if(c.__markCompiled)c.__markCompiled();var j=c('React').PropTypes,k=babelHelpers['extends']({},c('AbstractTimeInput.react').defaultProps.classNames,{columnClassNames:babelHelpers['extends']({},c('AbstractTimeInput.react').defaultProps.classNames.columnClassNames,{column:"_4nww _1jg_",columnValue:"_4nx3 _1jh3",focused:"_1jh4"}),disabled:"_4nx6 _1jh5",focused:"_1jh6",space:"_4nxh _1jh7"});function l(n){var o=n.className,p=n.height,q=n.hideIcon,r=babelHelpers.objectWithoutProperties(n,['className','height','hideIcon']),s=c('joinClasses')(o,"_4snt"+(p==='medium'?' '+"_1gdn":'')+(p==='tall'?' '+"_1gdo":'')+(p==='xtall'?' '+"_1gdp":'')),t=void 0;if(!q)if(n.disabled){t=c('React').createElement(c('Image.react'),{alt:'',src:h("\/images\/assets_DO_NOT_HARDCODE\/fb_glyphs\/clock_16_bluegray-10.png")});}else t=c('React').createElement(c('Image.react'),{alt:'',src:h("\/images\/assets_DO_NOT_HARDCODE\/fb_glyphs\/clock_16_bluegray-40.png")});return (c('React').createElement(c('XUIError.react'),r,c('React').createElement(c('AbstractTimeInput.react'),babelHelpers['extends']({},r,{className:s,classNames:k,icon:t}))));}var m=c('AbstractTimeInput.react').propTypes;l.propTypes=babelHelpers['extends']({},c('XUIError.react').propTypes,{disabled:m.disabled,height:j.oneOf(['short','medium','tall','xtall']),hideIcon:j.bool,maxValue:m.maxValue,minValue:m.minValue,onChangeValueAttempt:m.onChangeValueAttempt,value:m.value});f.exports=l;},null);
  __d('LocalDateTime',['invariant','DateTime','Instant','ISODateString','PeriodUnit','SharedDateUtils','Timezone'],function a(b,c,d,e,f,g,h){'use strict';if(c.__markCompiled)c.__markCompiled();var i=c('SharedDateUtils').divide,j=c('Timezone').UTC;function k(l,m,n,o,p,q){this.year=l;this.month=m;this.day=n;this.hour=o;this.minute=p;this.second=q;}k.apply=function(l){return new k(l.year,l.month,l.day,l.hour,l.minute,l.second);};k.create=function(l){var m=arguments.length<=1||arguments[1]===undefined?1:arguments[1],n=arguments.length<=2||arguments[2]===undefined?1:arguments[2],o=arguments.length<=3||arguments[3]===undefined?0:arguments[3],p=arguments.length<=4||arguments[4]===undefined?0:arguments[4],q=arguments.length<=5||arguments[5]===undefined?0:arguments[5];return new k(l,m,n,o,p,q);};k.now=function(l){return k.fromDateTime(c('DateTime').now(l));};k.prototype.getComponents=function(){return [this.year,this.month,this.day,this.hour,this.minute,this.second];};k.prototype.compare=function(l){var m=this.getComponents(),n=l.getComponents();for(var o=0;o<m.length;o++){var p=m[o]-n[o];if(p)return p;}return 0;};k.prototype.equals=function(l){return this.compare(l)===0;};k.prototype.isBefore=function(l){return this.compare(l)<0;};k.prototype.isAfter=function(l){return this.compare(l)>0;};k.prototype.isBeforeOrEqual=function(l){return this.compare(l)<=0;};k.prototype.isAfterOrEqual=function(l){return this.compare(l)>=0;};k.prototype.min=function(l){return this.isBefore(l)?this:l;};k.prototype.max=function(l){return this.isBefore(l)?l:this;};k.prototype.getDayOfMonth=function(){return this.day;};k.prototype.getDayOfWeek=function(){return this.toUTCDate().getUTCDay();};k.prototype.$LocalDateTime1=function(l){var m=this.toUTCDate();m.setUTCFullYear(l.year!=null?l.year:m.getUTCFullYear(),l.month!=null?l.month-1:m.getUTCMonth(),l.day!=null?l.day:m.getUTCDate());l.hour!=null&&m.setUTCHours(l.hour);l.minute!=null&&m.setUTCMinutes(l.minute);l.second!=null&&m.setUTCSeconds(l.second);return k.fromUTCDate(m);};k.prototype.set=function(l){!(l.year==null||c('Instant').wholeYearRangeInYears.since<=l.year&&l.year<c('Instant').wholeYearRangeInYears.until)?h(0):void 0;!(l.month==null||1<=l.month&&l.month<=12)?h(0):void 0;!(l.day==null||1<=l.day&&l.day<=31)?h(0):void 0;!(l.hour==null||l.hour>=0&&l.hour<=23)?h(0):void 0;!(l.minute==null||l.minute>=0&&l.minute<=59)?h(0):void 0;!(l.second==null||l.second>=0&&l.second<=59)?h(0):void 0;return this.$LocalDateTime1(l);};k.prototype.add=function(l){var m=this.toUTCDate();if(l.month||l.year){var n=m.getUTCMonth()+(l.month||0)+(l.year||0)*12;m.setUTCMonth(n);if(i(m.getUTCMonth()+1,12)[1]!==i(n+1,12)[1])m.setUTCDate(0);}l.week&&m.setUTCDate(m.getUTCDate()+7*l.week);l.day&&m.setUTCDate(m.getUTCDate()+l.day);l.hour&&m.setUTCHours(m.getUTCHours()+l.hour);l.minute&&m.setUTCMinutes(m.getUTCMinutes()+l.minute);l.second&&m.setUTCSeconds(m.getUTCSeconds()+l.second);return k.fromUTCDate(m);};k.prototype.subtract=function(l){var m={};Object.keys(l).forEach(function(n){return (m[n]=-l[n]);});return this.add(m);};k.prototype.addYears=function(l){return this.add({year:l});};k.prototype.addMonths=function(l){return this.add({month:l});};k.prototype.addWeeks=function(l){return this.add({week:l});};k.prototype.addDays=function(l){return this.add({day:l});};k.prototype.addHours=function(l){return this.add({hour:l});};k.prototype.addMinutes=function(l){return this.add({minute:l});};k.prototype.addSeconds=function(l){return this.add({second:l});};k.prototype.subtractYears=function(l){return this.subtract({year:l});};k.prototype.subtractMonths=function(l){return this.subtract({month:l});};k.prototype.subtractWeeks=function(l){return this.subtract({week:l});};k.prototype.subtractDays=function(l){return this.subtract({day:l});};k.prototype.subtractHours=function(l){return this.subtract({hour:l});};k.prototype.subtractMinutes=function(l){return this.subtract({minute:l});};k.prototype.subtractSeconds=function(l){return this.subtract({second:l});};k.prototype.startOfYear=function(){return this.floor(c('PeriodUnit').year);};k.prototype.startOfMonth=function(){return this.floor(c('PeriodUnit').month);};k.prototype.startOfWeek=function(){return this.floor(c('PeriodUnit').week);};k.prototype.startOfDay=function(){return this.floor(c('PeriodUnit').day);};k.prototype.startOfHour=function(){return this.floor(c('PeriodUnit').hour);};k.prototype.startOfMinute=function(){return this.floor(c('PeriodUnit').minute);};k.prototype.floor=function(l){var m={hour:0,minute:0,second:0};switch(l){case c('PeriodUnit').year:return this.set(babelHelpers['extends']({},m,{month:1,day:1}));case c('PeriodUnit').month:return this.set(babelHelpers['extends']({},m,{day:1}));case c('PeriodUnit').week:return this.set(m).subtractDays(this.getDayOfWeek());case c('PeriodUnit').day:return this.set(m);case c('PeriodUnit').hour:return this.set({minute:0,second:0});case c('PeriodUnit').minute:return this.set({second:0});case c('PeriodUnit').second:return this;default:h(0);}};k.prototype.ceil=function(l){var m=this.floor(l);if(this.equals(m)){return m;}else{var n={};n[l]=1;return m.add(n);}};k.prototype.format=function(l,m){return c('Instant').format(this.toInstant(j),l,m);};k.prototype.toString=function(){return this.toISOString();};k.prototype.toISOString=function(){return this.format('Y-m-dTH:i:s',{skipPatternLocalization:true});};k.fromISOString=function(l){var m=c('ISODateString').parseComponents(l),n=m.year,o=m.month,p=m.day,q=m.hour,r=m.minute,s=m.second;return k.create(n,o,p,q,r,s);};k.prototype.toUTCDate=function(){return new Date(1000*this.toInstant(j));};k.fromUTCDate=function(l){return k.create(l.getUTCFullYear(),l.getUTCMonth()+1,l.getUTCDate(),l.getUTCHours(),l.getUTCMinutes(),l.getUTCSeconds());};k.prototype.toInstant=function(l){var m=Date.UTC(this.year,this.month-1,this.day,this.hour,this.minute,this.second)/1000;return c('Instant').getParallel(m,l);};k.fromInstant=function(l,m){var n=l+c('Instant').getOffset(l,m);return k.fromUTCDate(new Date(1000*n));};k.prototype.toDateTime=function(l){return c('DateTime').create(this.toInstant(l),l);};k.fromDateTime=function(l){var m=l.getFields();return k.create(m.year,m.month,m.day,m.hour,m.minute,m.second);};k.prototype.toFBDate=function(l){return c('DateTime').fromLegacyArgs(1000*this.toInstant(l),l);};k.fromFBDate=function(l){return k.create(l.getYear(),l.getMonth(),l.getDayOfMonth(),l.getHours(),l.getMinutes(),l.getSeconds());};k.prototype.toJSON=function(){return this.toISOString();};k.prototype.fromJSON=function(l){return k.fromISOString(l);};f.exports=k;},null);
  __d('AbstractDateTimePicker.react',['LocalDate','LocalDateTime','React','TimeOfDay','Timezone','XUIError.react'],function a(b,c,d,e,f,g){'use strict';if(c.__markCompiled)c.__markCompiled();var h=c('Timezone').UTC,i=c('React').PropTypes;function j(q){var r=q.classNames||{};return (c('React').createElement('div',{className:q.className,style:q.style},c('React').createElement(c('XUIError.react'),q,c('React').createElement('div',{className:r.innerWrapper},c('React').createElement(l,q),c('React').createElement(n,q))),q.value!=null?c('React').createElement(k,{className:r.timezone,value:q.timezoneLabel}):null,q.name!=null&&q.value?c('React').createElement(m,q):null));}function k(q){return (c('React').createElement('div',{className:q.className},q.value));}function l(q){var r=q.value,s=r?new (c('LocalDate'))(r.year,r.month,r.day):null;return c('React').cloneElement(q.datePicker,{placeholder:q.datePlaceholder,disabled:q.disabled,onChange:q.onChange&&function(t){return o(q,t);},value:s});}function m(q){return (c('React').createElement('input',{type:'hidden',name:q.name,value:q.value.toISOString()}));}function n(q){var r=q.value;return c('React').cloneElement(q.timeInput,{disabled:q.disabled,maxValue:q.maxTime,minValue:q.minTime,onChangeValueAttempt:q.onChange&&function(s){return p(q,s);},value:r?c('TimeOfDay').fromLocalDateTime(r):null});}function o(q,r){if(!r){q.onChange(null);return;}var s=void 0;if(q.value){s=q.value.set({year:r.year,month:r.month,day:r.day});}else s=c('LocalDateTime').create(r.year,r.month,r.day);q.onChange(s);}function p(q,r){if(r==null){q.onChange(null);return;}var s=q.value?q.value:c('LocalDateTime').now(q.timezoneID||h);s=s.set({hour:r.hour,minute:r.minute});q.onChange(s);}j.propTypes=babelHelpers['extends']({className:i.string,classNames:i.shape({innerWrapper:i.string,staticDate:i.string,timezone:i.string}),datePlaceholder:i.string,datePicker:i.element.isRequired,disabled:i.bool,maxTime:i.instanceOf(c('TimeOfDay')),minTime:i.instanceOf(c('TimeOfDay')),name:i.string,onChange:i.func,timezoneID:i.number,timezoneLabel:i.string,timeInput:i.element.isRequired,value:i.instanceOf(c('LocalDateTime'))},c('XUIError.react').propTypes);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','MercuryPageServerRequests','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);this.__serverRequests=c('MercuryPageServerRequests').getForFBID(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('MessagingFlowerBorderChecker',['MercuryConfig','MercuryMessageCustomizations','MessageBorderType','MessageCustomizationType'],function a(b,c,d,e,f,g){'use strict';if(c.__markCompiled)c.__markCompiled();var h={shouldRenderWithFlowerBorder:function(i){return c('MercuryConfig').WWWMessengerFlowerBorderViewer&&c('MercuryMessageCustomizations').getCustomizationValue(i,c('MessageCustomizationType').BORDER)===c('MessageBorderType').FLOWERS;}};f.exports=h;},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','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').PureComponent);j=i&&i.prototype;l.prototype.render=function(){return (c('React').createElement(c('Link.react'),{className:"_4pcn _2uf4",target:'_blank',href:this.props.attachment.url},c('React').createElement('div',{className:"_2uf5"}),this.props.attachment.name));};function l(){i.apply(this,arguments);}l.propTypes={attachment:k.object.isRequired};f.exports=l;},null);
  __d('MessengerAttachmentViewer',['Bootloader','MessagesViewer','React','Run','emptyFunction'],function a(b,c,d,e,f,g){'use strict';if(c.__markCompiled)c.__markCompiled();var h={renderVideo:function(i){c('Bootloader').loadModules(["MessagingVideoViewer.react","MessengerForwardAttachmentDialog.react"],function(j,k){c('MessagesViewer').renderVideo(c('React').createElement(j,babelHelpers['extends']({},i,{forwardDialogComponent:k})));},'MessengerAttachmentViewer');},bootstrapWithConfig:function(i,j){c('Bootloader').loadModules(["SpotlightMessagesViewer","MessengerForwardAttachmentDialog.react"],function(k,l){c('MessagesViewer').renderSpotlight(i,j,k,l);},'MessengerAttachmentViewer');},preload:function(){c('Run').onAfterLoad(function(){c('Bootloader').loadModules(["MessagingVideoViewer.react","SpotlightMessagesViewer","MessengerForwardAttachmentDialog.react"],c('emptyFunction'),'MessengerAttachmentViewer');});}};f.exports=h;},null);
  __d('MessengerPhoto.react',['cx','Image.react','MercuryAttachmentType','MercuryConfig','MessengerSpinner.react','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,l=206,m=480,n=1800,o=450;function p(t,u){if(t.metadata){if(t.attach_type===c('MercuryAttachmentType').VIDEO)return t.metadata.inbox_preview;return u?t.large_preview_url:t.preview_url;}return null;}function q(t){var u=c('MercuryConfig').MessengerPhotoLargePreviewSizeMap,v=u.preview_size_large===0?m:u.preview_size_large,w=u.preview_size===0?l:u.preview_size,x=u.screen_size===0?n:u.screen_size,y=c('MercuryConfig').MessengerLargePreviewImageGK&&window.screen.width>x;if(t.preview_uploading)return y&&t.large_preview_url?{height:t.large_preview_height||v,src:t.large_preview_url,width:t.large_preview_width||v,renderLargePreview:true}:{height:t.preview_height||w,src:t.preview_url,width:t.preview_width||w};var z=p(t,y);if(z)return babelHelpers['extends']({src:z,renderLargePreview:y},t.metadata.inbox_size);if(t.preview_url)return y&&t.large_preview_url?{height:t.large_preview_height,src:t.large_preview_url,width:t.large_preview_width,renderLargePreview:true}:{height:t.preview_height,src:t.preview_url,width:t.preview_width};if(t.media)return t.media.playable&&t.media.animated_image?babelHelpers['extends']({},t.media.animated_image_size,{src:t.media.animated_image}):babelHelpers['extends']({},t.media.image_size,{src:t.media.image});}function r(t,u){if(t.preview_uploading)return t.preview_url?0:l;var v=t.media?q(t):{height:t.preview_height,width:t.preview_width};return Math.min(v.height*Math.min(1,o/v.width),o);}i=babelHelpers.inherits(s,c('React').Component);j=i&&i.prototype;function s(){var t,u;for(var v=arguments.length,w=Array(v),x=0;x<v;x++)w[x]=arguments[x];return t=(u=j.constructor).call.apply(u,[this].concat(w)),this.$MessengerPhoto2=function(y){y.preventDefault();if(c('MercuryConfig').SharedPhotoNewView){this.props.onClick(this.props.attachment.metadata.fbid);return;}if(this.props.onClick)this.props.onClick(this.props.attachment);}.bind(this),this.$MessengerPhoto1=function(y){if(this.props.attachment.preview_uploading&&!y.src)return null;if(this.props.isSingle){var z={};if(y.renderLargePreview)z.maxHeight=window.screen.height*.7;return c('React').createElement(c('Image.react'),{alt:'',style:z,src:y.src});}return null;}.bind(this),t;}s.prototype.componentDidMount=function(){var t=this.props.onAttachmentLoad;t&&t();};s.prototype.render=function(){var t=this.props.attachment,u=q(t);if(!u)return null;var v=this.$MessengerPhoto1(u),w={};if(u.src)w.backgroundImage='url('+u.src+')';if(this.props.isSingle){var x=r(t,this.context);if(x)w.minHeight=x;}var y=!!this.props.attachment.app_attribution,z=void 0;if(t.preview_uploading)z=c('React').createElement(c('MessengerSpinner.react'),null);return c('React').createElement('div',{className:c('joinClasses')(this.props.className,"_4tsk"+(y?' '+"_mxz":'')+(this.props.isSingle&&!y?' '+"_52mr":'')+(t.preview_uploading&&!u.src?' '+"_3etv":'')),style:w,onClick:this.$MessengerPhoto2},v,z,c('React').createElement('a',{className:"_4tsl",href:u.src},this.props.children));};s.contextTypes={width:k.number};s.propTypes={attachment:k.object.isRequired,isSingle:k.bool.isRequired,onAttachmentLoad:k.func,onClick:k.func};f.exports=s;},null);
  __d('MessengerPhotoViewCloseLink.react',['cx','fbt','React','TooltipLink.react'],function a(b,c,d,e,f,g,h,i){'use strict';if(c.__markCompiled)c.__markCompiled();var j=c('React').PropTypes,k=function(l){var m=c('React').createElement('span',null,i._("Press Esc to close"));return (c('React').createElement(c('TooltipLink.react'),{className:"_51ok _50-m _51an",onClick:l.onClick,tooltip:m},c('React').createElement('div',{className:"_387s"})));};k.propTypes={onClick:j.func};f.exports=k;},null);
  __d('MessengerSharedPhotosAlbumViewPhoto.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(){var l,m;for(var n=arguments.length,o=Array(n),p=0;p<n;p++)o[p]=arguments[p];return l=(m=i.constructor).call.apply(m,[this].concat(o)),this.$MessengerSharedPhotosAlbumViewPhoto1=function(){this.props.onClick(this.props.photoID);}.bind(this),l;}k.prototype.render=function(){return (c('React').createElement('a',{className:this.props.className,href:'#',onClick:this.$MessengerSharedPhotosAlbumViewPhoto1,style:{backgroundImage:'url('+this.props.uri+')'}}));};k.propTypes={className:j.string.isRequired,fbid:j.string.isRequired,onClick:j.func.isRequired,photoID:j.string,uri:j.string.isRequired};f.exports=k;},null);
  __d('MessengerSharedPhotosAlbumViewVScroll.react',['cx','Animation','MessengerSpinner.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,l=200,m=48,n=6,o=20;i=babelHelpers.inherits(p,c('React').Component);j=i&&i.prototype;function p(){var q,r;for(var s=arguments.length,t=Array(s),u=0;u<s;u++)t[u]=arguments[u];return q=(r=j.constructor).call.apply(r,[this].concat(t)),this.state={hasScrolledDown:false},this.$MessengerSharedPhotosAlbumViewVScroll1=function(){var v=this.props.sharedPhotos.edges.length,w=this.props.totalCount;if(v<m){var x=Math.min(w-v,m-v);this.props.fetchMore(x);}}.bind(this),this.$MessengerSharedPhotosAlbumViewVScroll3=function(v){var w=this.props.children.find(function(x){return x.props.photoID===v;});if(!w)return 0;return this.props.children.indexOf(w);}.bind(this),this.$MessengerSharedPhotosAlbumViewVScroll4=function(v,w){var x=Math.floor(v/n);return w/n*x;},this.$MessengerSharedPhotosAlbumViewVScroll5=function(v){if(this.refs&&this.refs.childContainer)new (c('Animation'))(this.refs.childContainer).to('scrollTop',v).duration(l).go();}.bind(this),this.$MessengerSharedPhotosAlbumViewVScroll2=function(){var v=this.props.sharedPhotos.edges.length,w=this.props.totalCount;if(this.props.allPhotosDisplayed&&this.$MessengerSharedPhotosAlbumViewVScroll6())if(v<w){var x=Math.min(w-v,m);if(!this.props.isLoadingImages)this.props.fetchMore(x);}}.bind(this),this.$MessengerSharedPhotosAlbumViewVScroll6=function(){var v=this.refs.childContainer;return v.scrollTop+v.clientHeight>=v.scrollHeight-o;}.bind(this),q;}p.prototype.componentDidMount=function(){this.$MessengerSharedPhotosAlbumViewVScroll1();this.refs.childContainer.addEventListener('scroll',function(event){this.$MessengerSharedPhotosAlbumViewVScroll2();}.bind(this));};p.prototype.componentWillUnmount=function(){this.refs.childContainer.removeEventListener('scroll',function(event){this.$MessengerSharedPhotosAlbumViewVScroll2();}.bind(this));};p.prototype.render=function(){var q=null;if(this.props.isLoadingImages)q=c('React').createElement('div',{className:"_3xo7"},c('React').createElement(c('MessengerSpinner.react'),null));if(!this.state.hasScrolledDown&&!this.props.isLoadingImages&&this.refs.scrollable){this.setState({hasScrolledDown:true});if(this.props.totalCount>m){var r=this.refs.scrollable,s=this.$MessengerSharedPhotosAlbumViewVScroll3(this.props.viewedPhoto),t=this.$MessengerSharedPhotosAlbumViewVScroll4(s,r.clientWidth);this.$MessengerSharedPhotosAlbumViewVScroll5(t);}}return (c('React').createElement('div',{className:"_3xo8",ref:'childContainer',onscroll:this.$MessengerSharedPhotosAlbumViewVScroll2,style:{height:this.props.height}},c('React').createElement('div',{className:"_3xoa",ref:'scrollable'},this.props.children,q)));};p.propTypes={allPhotosDisplayed:k.bool.isRequired,children:k.array.isRequired,fetchMore:k.func.isRequired,height:k.number.isRequired,isLoadingImages:k.bool.isRequired,onClick:k.func.isRequired,onClose:k.func.isRequired,sharedPhotos:k.object.isRequired,totalCount:k.number.isRequired,viewedPhoto:k.string.isRequired};f.exports=p;},null);
  __d('MessengerSharedPhotosAlbumView.react',['cx','fbt','MessengerSharedPhotosAlbumViewPhoto.react','MessengerSharedPhotosAlbumViewVScroll.react','MessengerPhotoViewCloseLink.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(){var n,o;for(var p=arguments.length,q=Array(p),r=0;r<p;r++)q[r]=arguments[r];return n=(o=k.constructor).call.apply(o,[this].concat(q)),this.$MessengerSharedPhotosAlbumView2=function(){this.props.onClick(this.props.viewedPhoto);}.bind(this),this.$MessengerSharedPhotosAlbumView3=function(){return (c('React').createElement('div',{className:"_3bm0 _5l-3",ref:'header'},c('React').createElement('div',{className:"_3bm1"},c('React').createElement('div',{className:"_3bm2 _3bm3",onClick:this.$MessengerSharedPhotosAlbumView2},i._("Back to photo"))),c('React').createElement('div',{className:"_3bm4"},i._("Shared Photos")),c('React').createElement(c('MessengerPhotoViewCloseLink.react'),{onClick:this.props.onCloseSharedPhotos})));}.bind(this),n;}m.prototype.$MessengerSharedPhotosAlbumView1=function(){if(this.refs.window&&this.refs.header)return this.refs.window.clientHeight-this.refs.header.clientHeight;return 0;};m.prototype.render=function(){var n="_3bly",o=this.props.sharedPhotos.edges,p=o.map(function(q){var r=q.node;return (c('React').createElement(c('MessengerSharedPhotosAlbumViewPhoto.react'),{className:n,count:this.props.sharedPhotos.edges,onClick:this.props.onClick,fbid:r.legacy_attachment_id,key:r.legacy_attachment_id,photoID:r.id,uri:r.image.uri}));}.bind(this));return (c('React').createElement('div',{className:"_3bl- _5l-3",ref:'window'},this.$MessengerSharedPhotosAlbumView3(),c('React').createElement(c('MessengerSharedPhotosAlbumViewVScroll.react'),{allPhotosDisplayed:this.props.allPhotosDisplayed,children:p,fetchMore:this.props.fetchMore,height:this.$MessengerSharedPhotosAlbumView1(),isLoadingImages:this.props.isLoadingImages,onClick:this.props.onClick,onClose:this.props.onCloseSharedPhotos,sharedPhotos:this.props.sharedPhotos,totalCount:this.props.totalCount,viewedPhoto:this.props.viewedPhoto})));};m.propTypes={allPhotosDisplayed:l.bool.isRequired,isLoadingImages:l.bool.isRequired,fetchMore:l.func.isRequired,onClick:l.func.isRequired,onCloseSharedPhotos:l.func.isRequired,sharedPhotos:l.object.isRequired,totalCount:l.number.isRequired,viewedPhoto:l.string.isRequired};f.exports=m;},null);
  __d('MessagingRecipientTypeaheadItem.react',['cx','BackgroundImage.react','ChatTypeaheadConstants','ImageBlock.react','LeftRight.react','React','SplitImage.react','MercuryThreadMetadataRawRenderer','TypeaheadViewItem','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:'MessagingRecipientTypeaheadItem',propTypes:babelHelpers['extends']({},c('TypeaheadViewItem').propTypes,{imageSize:i.number.isRequired}),mixins:[c('TypeaheadViewItem').Mixin],isThreadRecipient:function(){return this.props.entry.getType()===c('ChatTypeaheadConstants').THREAD_TYPE;},_getImage:function(){var k=this.props.entry;if(k.getType()===c('ChatTypeaheadConstants').THREAD_TYPE&&!k.getPhoto()){var l=k.getAuxiliaryData();return (c('React').createElement(c('SplitImage.react'),{size:this.props.imageSize,srcs:l.participantsToRender.map(function(m){return m.image_src;})}));}if(k.getPhoto())return (c('React').createElement(c('BackgroundImage.react'),{width:this.props.imageSize,height:this.props.imageSize,backgroundSize:'cover',src:k.getPhoto()}));return c('React').createElement('span',null);},_getThreadParticipantList:function(){if(!this.isThreadRecipient())return null;var k=this.props.entry;return c('MercuryThreadMetadataRawRenderer').renderRawParticipantList(k.getUniqueID(),k.getAuxiliaryData().participantsToRender,k.getAuxiliaryData().thread.participants.length-1,{names_renderer:c('MercuryThreadMetadataRawRenderer').renderShortNames});},_getTitle:function(){var k=this.props.entry;if(this.isThreadRecipient()&&!k.getTitle())return this._getThreadParticipantList();return k.getTitle();},_getSubtitle:function(){var k=this.props.entry;if(this.isThreadRecipient()&&!k.getTitle())return this._getThreadParticipantList();return k.getSubtitle()?k.getSubtitle().split(' \u00b7 ')[0]:null;},render:function(){var k=this._getSubtitle(),l=c('joinClasses')("_599m"+(' '+"_55xn")+(!k?' '+"_5mne":'')+(this.props.highlighted?' '+"_599n":''),this.props.className);return (c('React').createElement('li',{'aria-selected':this.props.selected,className:l,onMouseDown:this._onSelect,onMouseEnter:this._onHighlight,role:this.props.role},c('React').createElement(c('ImageBlock.react'),{spacing:'medium'},this._getImage(),c('React').createElement(c('LeftRight.react'),null,c('React').createElement('div',null,c('React').createElement('div',{className:"_55xt _599p"},this._getTitle()),c('React').createElement('div',{className:"_55z3 _599q"},k)),this.props.children))));}});f.exports=j;},null);
  __d('MessagingRecipientSelectedList.react',['cx','fbt','xuiglyph','Image.react','LeftRight.react','Map','MessagingRecipientTypeaheadItem.react','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(){var o,p;'use strict';for(var q=arguments.length,r=Array(q),s=0;s<q;s++)r[s]=arguments[s];return o=(p=l.constructor).call.apply(p,[this].concat(r)),this.$MessagingRecipientSelectedList1=function(t){var u=j({name:'cross',shade:'dark',size:'small'});return (c('React').createElement(c('MessagingRecipientTypeaheadItem.react'),{key:t.getUniqueID(),entry:t,imageSize:24,onSelect:this.props.onSelect},c('React').createElement(c('Image.react'),{className:"_1jm4",src:u})));}.bind(this),o;}n.prototype.render=function(){'use strict';var o=i._("Send to:"),p=[];this.props.entries.forEach(function(q){return p.push(this.$MessagingRecipientSelectedList1(q));}.bind(this));return (c('React').createElement('div',{className:"_1jm5"},c('React').createElement(c('LeftRight.react'),{className:"_1jm6 _2ph-"},c('React').createElement('span',null,o),c('React').createElement('span',null,this.props.entries.size)),c('React').createElement('ul',null,p)));};n.propTypes={entries:m.instanceOf(c('Map')),onSelect:m.func.isRequired};f.exports=n;},null);
  __d('MessagingRecipientTypeaheadView.react',['cx','fbt','CenteredContainer.react','Link.react','Map','MessagingRecipientTypeaheadItem.react','React','TypeaheadViewPropTypes','XUISpinner.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=32;j=babelHelpers.inherits(n,c('React').Component);k=j&&j.prototype;function n(){var o,p;'use strict';for(var q=arguments.length,r=Array(q),s=0;s<q;s++)r[s]=arguments[s];return o=(p=k.constructor).call.apply(p,[this].concat(r)),this.$MessagingRecipientTypeaheadView1=function(t){var u=t===this.props.highlightedEntry,v=this.props.selectedEntries.has(t.getUniqueID());return (c('React').createElement(c('MessagingRecipientTypeaheadItem.react'),{key:t.getUniqueID(),entry:t,highlighted:u,imageSize:m,selected:v,onSelect:this.props.onSelect,onHighlight:this.props.onHighlight,onRenderHighlight:this.props.onRenderHighlight},c('React').createElement(c('Link.react'),{'aria-checked':v,className:"_2i83"+(v?' '+"_2i85":'')+(!v?' '+"_2i86":''),href:'#',role:'checkbox',tabIndex:'0'})));}.bind(this),o;}n.prototype.render=function(){'use strict';if(this.props.entries.length===0&&!this.props.loading)return (c('React').createElement(c('CenteredContainer.react'),{className:"_2pi1"},i._("No results")));return (c('React').createElement('ul',{id:this.props.ariaOwneeID,className:"_51do",role:this.props.role},this.props.entries.map(this.$MessagingRecipientTypeaheadView1),c('React').createElement('div',{className:"_51dq"},this.props.loading?c('React').createElement(c('XUISpinner.react'),null):null)));};n.propTypes=babelHelpers['extends']({},c('TypeaheadViewPropTypes'),{selectedEntries:l.instanceOf(c('Map')),loading:l.bool});n.defaultProps={role:'listbox'};f.exports=n;},null);
  __d("XMessagingForwardAttachmentController",["XController"],function a(b,c,d,e,f,g){c.__markCompiled&&c.__markCompiled();f.exports=c("XController").create("\/mercury\/attachments\/forward\/",{});},null);
  __d("XMessengerPlatformShareCTAController",["XController"],function a(b,c,d,e,f,g){c.__markCompiled&&c.__markCompiled();f.exports=c("XController").create("\/messages\/platform\/share\/",{});},null);
  __d('MessagingForwardAttachmentDialog.react',['ix','cx','fbt','AsyncRequest','ChatSearchSource','Image.react','LayerFadeOnHide','Layout.react','Map','MessageShareType','MessagingRecipientSelectedList.react','MessagingRecipientTypeaheadView.react','React','SearchableTextInput.react','ScrollableArea.react','XMessagingForwardAttachmentController','XMessengerPlatformShareCTAController','XUIDialog.react','XUIDialogBody.react','XUIDialogButton.react','XUIDialogCancelButton.react','XUIDialogFooter.react','XUIDialogTitle.react','XUISpinner.react','fbglyph','requireWeak'],function a(b,c,d,e,f,g,h,i,j){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(){var q,r;'use strict';for(var s=arguments.length,t=Array(s),u=0;u<s;u++)t[u]=arguments[u];return q=(r=l.constructor).call.apply(r,[this].concat(t)),this.state={bootstrappedEntries:[],entries:[],loading:true,selectedEntries:new (c('Map'))(),sendError:null,sending:false,startingThreadingID:Date.now(),query:''},this.$MessagingForwardAttachmentDialog2=function(v){var w=v.getUniqueID(),x=new (c('Map'))(this.state.selectedEntries);if(x.has(w)){x['delete'](w);}else x.set(w,v);this.setState({selectedEntries:x});}.bind(this),this.$MessagingForwardAttachmentDialog3=function(v){var w=v.target.value;this.setState({loading:true,query:w});}.bind(this),this.$MessagingForwardAttachmentDialog4=function(v){this.setState({entries:v});}.bind(this),this.$MessagingForwardAttachmentDialog5=function(v){v===this.state.query&&this.setState({loading:false});}.bind(this),this.$MessagingForwardAttachmentDialog6=function(){var v={},w=this.state.startingThreadingID;this.state.selectedEntries.forEach(function(y){v[w++]=y.getUniqueID();});if(this.props.shareType===c('MessageShareType').PLATFORM_SHARE_CTA){var x=c('XMessengerPlatformShareCTAController').getURIBuilder().getURI();new (c('AsyncRequest'))(x).setMethod('POST').setHandler(this.$MessagingForwardAttachmentDialog7).setData({cta_id:this.props.attachmentID,recipient_map:v}).send();}else{x=c('XMessagingForwardAttachmentController').getURIBuilder().getURI();new (c('AsyncRequest'))(x).setMethod('POST').setHandler(this.$MessagingForwardAttachmentDialog7).setData({attachment_id:this.props.attachmentID,recipient_map:v}).send();}this.setState({sending:true,sendError:null});}.bind(this),this.$MessagingForwardAttachmentDialog7=function(v){if(v.payload.success){this.props.onClose&&this.props.onClose();this.setState({bootstrappedEntries:[],selectedEntries:new (c('Map'))(),sending:false,startingThreadID:Date.now(),query:''});return;}this.setState({sending:false,sendError:v.payload.error});}.bind(this),this.$MessagingForwardAttachmentDialog8=function(v){if(!v)this.props.onClose();}.bind(this),q;}p.prototype.componentWillMount=function(){'use strict';this.$MessagingForwardAttachmentDialog1=new (c('ChatSearchSource'))({queryRequests:[{uri:'/ajax/mercury/composer_query.php'}]});};p.prototype.componentDidMount=function(){'use strict';c('requireWeak')('OrderedFriendsList',function(q){return q.getSearchableEntries(20,function(r){this.setState({bootstrappedEntries:r,loading:false});}.bind(this));}.bind(this));};p.prototype.render=function(){'use strict';var q=j._("Send"),r=null;if(this.state.sending){r=c('React').createElement('div',null,c('React').createElement(c('XUISpinner.react'),null),c('React').createElement('span',{className:"_5s0d _3-99"},j._("Sending")));}else if(this.state.sendError){var s=h("\/images\/assets_DO_NOT_HARDCODE\/fb_glyphs\/caution-solid_16_bluegray-40.png");r=c('React').createElement('div',{className:"_5s0d"},c('React').createElement(c('Image.react'),{src:s}),c('React').createElement('span',{className:"_3-99"},this.state.sendError));}var t=j._("Search for people and groups");return (c('React').createElement(c('XUIDialog.react'),{shown:this.props.shown,behaviors:{LayerFadeOnHide:c('LayerFadeOnHide')},onToggle:this.$MessagingForwardAttachmentDialog8,width:560},c('React').createElement(c('XUIDialogTitle.react'),null,this.props.title),c('React').createElement(c('XUIDialogBody.react'),{useCustomPadding:true},c('React').createElement(c('Layout.react'),null,c('React').createElement(m,{className:"_5s0e"},c('React').createElement('div',{className:"_2ph_"},c('React').createElement(c('SearchableTextInput.react'),{className:"_5s0f autofocus",onChange:this.$MessagingForwardAttachmentDialog3,onEntriesFound:this.$MessagingForwardAttachmentDialog4,placeholder:t,queryString:this.state.query,searchSource:this.$MessagingForwardAttachmentDialog1,searchSourceOptions:{onQueryFinished:this.$MessagingForwardAttachmentDialog5}})),c('React').createElement(c('ScrollableArea.react'),{className:"_5s0g",height:400,width:360},c('React').createElement(c('MessagingRecipientTypeaheadView.react'),{entries:this.state.query?this.state.entries:this.state.bootstrappedEntries,loading:this.state.loading,selectedEntries:this.state.selectedEntries,onSelect:this.$MessagingForwardAttachmentDialog2}))),c('React').createElement(n,{className:"_5s0h"},c('React').createElement(c('ScrollableArea.react'),{height:457,shadow:false},c('React').createElement(c('MessagingRecipientSelectedList.react'),{entries:this.state.selectedEntries,onSelect:this.$MessagingForwardAttachmentDialog2}))))),c('React').createElement(c('XUIDialogFooter.react'),{leftContent:r},c('React').createElement(c('XUIDialogCancelButton.react'),{onClick:this.props.onClose}),c('React').createElement(c('XUIDialogButton.react'),{use:'confirm',disabled:!this.state.selectedEntries.size||this.state.sending,label:q,onClick:this.$MessagingForwardAttachmentDialog6}))));};p.propTypes={attachmentID:o.string.isRequired,onClose:o.func,shown:o.bool.isRequired,title:o.string.isRequired,shareType:o.string};p.defaultProps={shareType:c('MessageShareType').IMAGE};f.exports=p;},null);
  __d("XForwardingNUXSeenController",["XController"],function a(b,c,d,e,f,g){c.__markCompiled&&c.__markCompiled();f.exports=c("XController").create("\/chat\/forwarding_nux_seen\/",{});},null);
  __d('MessagingForwardingButtonNUX.react',['AsyncRequest','ChatConfig','React','XForwardingNUXSeenController','XUIAmbientNUX.react'],function a(b,c,d,e,f,g){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(){var l,m;'use strict';for(var n=arguments.length,o=Array(n),p=0;p<n;p++)o[p]=arguments[p];return l=(m=i.constructor).call.apply(m,[this].concat(o)),this.state={showNUX:!c('ChatConfig').get('seen_forwarding_nux')},this.$MessagingForwardingButtonNUX1=function(){if(!this.state.showNUX)return;c('ChatConfig').set('seen_forwarding_nux',true);new (c('AsyncRequest'))(c('XForwardingNUXSeenController').getURIBuilder().getURI()).send();this.setState({showNUX:false});}.bind(this),this.close=function(){this.$MessagingForwardingButtonNUX1();}.bind(this),l;}k.prototype.render=function(){'use strict';return c('React').createElement(c('XUIAmbientNUX.react'),{contextRef:this.props.contextRef,onCloseButtonClick:this.$MessagingForwardingButtonNUX1,position:'left',width:'auto',shown:this.state.showNUX},this.props.children);};k.propTypes={contextRef:j.func.isRequired};f.exports=k;},null);
  __d('MessengerTabIndices',[],function a(b,c,d,e,f,g){'use strict';if(c.__markCompiled)c.__markCompiled();var h={NEW_MESSAGE_TOKENIZER:9998,COMPOSER_INPUT:9999};f.exports=h;},null);
  __d('MessengerScrollableArea.react',['cx','React','ReactDOM','ScrollableArea.react','Style','UserAgent','clearImmediate','joinClasses','setImmediate','throttle'],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=20;i=babelHelpers.inherits(m,c('React').Component);j=i&&i.prototype;function m(){var o,p;for(var q=arguments.length,r=Array(q),s=0;s<q;s++)r[s]=arguments[s];return o=(p=j.constructor).call.apply(p,[this].concat(r)),n.call(this),o;}m.prototype.componentDidMount=function(){this.$MessengerScrollableArea2=c('setImmediate')(this.$MessengerScrollableArea3);this.$MessengerScrollableArea1=true;};m.prototype.componentWillUnmount=function(){c('clearImmediate')(this.$MessengerScrollableArea2);this.$MessengerScrollableArea1=false;};m.prototype.render=function(){return (c('React').createElement(c('ScrollableArea.react'),{className:c('joinClasses')("_5f0v",this.props.className),height:this.props.height,onScroll:this.$MessengerScrollableArea4,ref:'scrollable',shadow:false,tabIndex:this.props.tabIndex,width:this.props.width},this.props.children));};m.propTypes={onScroll:k.func,width:k.number};var n=function(){this.$MessengerScrollableArea1=false;this.$MessengerScrollableArea2=null;this.$MessengerScrollableArea4=c('throttle')(function(){if(this.$MessengerScrollableArea1){var o;this.props.onScroll&&(o=this.props).onScroll.apply(o,arguments);}}.bind(this),50);this.$MessengerScrollableArea3=function(){if(!c('UserAgent').isBrowser('IE'))return;var o=this.refs.scrollable.refs.wrap,p=this.refs.scrollable.refs.body;if(!p||!o)return;p=c('ReactDOM').findDOMNode(p);o=c('ReactDOM').findDOMNode(o);var q=o.offsetWidth-o.clientWidth;if(q>0)c('Style').set(p,'margin-right',-q+'px');}.bind(this);this.getArea=function(){return this.refs.scrollable.getArea();}.bind(this);this.scrollToBottom=function(){var o=this.getArea();if(o)this.scrollToPosition(o.getScrollHeight());}.bind(this);this.scrollToTop=function(o){var p=this.getArea();if(p)p.scrollToTop(!!o);}.bind(this);this.scrollToPosition=function(o){var p=this.getArea();if(!p)return;p.setScrollTop(o,false);}.bind(this);this.isScrolledToBottom=function(){return this.isScrolledToBottomWithHeight(0);}.bind(this);this.isScrolledToBottomWithHeight=function(o){var p=this.getArea();if(!p)return false;return p.getScrollTop()+p.getClientHeight()+o>=p.getScrollHeight()-l;}.bind(this);this.isScrolledToTop=function(){var o=this.getArea();if(!o)return true;return o.getScrollTop()<=l;}.bind(this);this.getScrollTop=function(){var o=this.getArea();if(!o)return 0;return o.getScrollTop();}.bind(this);};f.exports=m;},null);
  __d('MessengerContactAdapters',['immutable','ImmutableObject','MercuryTypeaheadConstants'],function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();var h={fromSearchableEntry:function(i){var j=i.getType(),k={alias:null,isMessengerUser:null,participants:null,photo:i.getPhoto(),subtitle:i.getSubtitle(),thread:null,title:i.getTitle(),type:j,uid:i.getUniqueID()},l=i.getAuxiliaryData();if(l)if(j===c('MercuryTypeaheadConstants').THREAD_TYPE){k.thread=new (c('ImmutableObject'))(l.thread);k.participants=c('immutable').Map().withMutations(function(m){l.participantsToRender.forEach(function(n){m.set(n.id,n);});});}else{k.isMessengerUser=l.isMessengerUser;k.alias=l.alias;}return new (c('ImmutableObject'))(k);},fromMercuryParticipant:function(i){return new (c('ImmutableObject'))({alias:i.alias,uid:i.id,photo:i.image_src,title:i.name,subtitle:'',type:i.type,isMessengerUser:i.is_messenger_user,href:i.href});}};f.exports=h;},null);
  __d('MessengerContactActions',['keyMirror'],function a(b,c,d,e,f,g){'use strict';if(c.__markCompiled)c.__markCompiled();f.exports=c('keyMirror')({ADD_OWNER:null,MESSAGE:null,PROFILE:null,REMOVE:null,REMOVE_OWNER:null,SELECT:null});},null);
  __d('MessengerThreadImage.react',['immutable','ImmutableObject','MercuryIDs','MercuryThreadImage.react','MessengerProfileImageWrapper.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').PureComponent);i=h&&h.prototype;function k(){var l,m;for(var n=arguments.length,o=Array(n),p=0;p<n;p++)o[p]=arguments[p];return l=(m=i.constructor).call.apply(m,[this].concat(o)),this.$MessengerThreadImage1=function(){if(!c('MercuryIDs').isCanonical(this.props.thread.thread_id)||this.props.participants.size===0)return null;var q=this.props.thread.other_user_fbid,r=c('MercuryIDs').getParticipantIDFromUserID(q),s=this.props.participants.get(r);return s&&s.is_messenger_user;}.bind(this),l;}k.prototype.render=function(){return c('React').createElement(c('MessengerProfileImageWrapper.react'),{className:this.props.className,isMessengerUser:this.$MessengerThreadImage1(),size:this.props.size,showBadge:this.props.showBadge&&c('MercuryIDs').isCanonical(this.props.thread.thread_id)},c('React').createElement(c('MercuryThreadImage.react'),{size:this.props.size,thread:this.props.thread,viewer:this.props.viewer,useBackground:true}));};k.propTypes={participants:j.instanceOf(c('immutable').Map).isRequired,showBadge:j.bool,size:j.number,thread:j.instanceOf(c('ImmutableObject')).isRequired,viewer:j.string.isRequired};k.defaultProps={showBadge:true};f.exports=k;},null);
  __d('MessengerContactListRow.react',['cx','fbt','ix','Image.react','ImageBlock.react','ImmutableObject','Link.react','MercuryConfig','MercuryTypeaheadConstants','MessengerAdminGroupUtils','MessengerContactActions','MessengerContactImage.react','MessengerTextWithEntities.react','MessengerThreadImage.react','React','ReactDOM','TextWithEntities.react','joinClasses'],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=j('/images/mercury/clients/messenger/core/Checkmark.png'),o=32;k=babelHelpers.inherits(p,c('React').PureComponent);l=k&&k.prototype;function p(){var q,r;for(var s=arguments.length,t=Array(s),u=0;u<s;u++)t[u]=arguments[u];return q=(r=l.constructor).call.apply(r,[this].concat(t)),this.state={isActionsOpen:false},this.$MessengerContactListRow2=function(v){if(this.props.actionsClass)return;v.stopPropagation();v.preventDefault();}.bind(this),this.$MessengerContactListRow1=function(v){v.stopPropagation();this.$MessengerContactListRow6(c('MessengerContactActions').SELECT,v);}.bind(this),this.$MessengerContactListRow3=function(){if(this.props.contact.photo){return (c('React').createElement(c('MessengerContactImage.react'),{className:"_5l39 _5rmm",isMessengerUser:this.props.contact.isMessengerUser,size:o,src:this.props.contact.photo}));}else if(this.props.contact.type===c('MercuryTypeaheadConstants').THREAD_TYPE)return (c('React').createElement(c('MessengerThreadImage.react'),{className:"_5l39",participants:this.props.contact.participants,size:o,thread:this.props.thread||this.props.contact.thread,viewer:this.props.viewer}));return c('React').createElement('div',{className:"_5l39"});}.bind(this),this.$MessengerContactListRow4=function(){if(this.props.contact.subtitle){var v=c('TextWithEntities.react');if(c('MercuryConfig').MessengerNewEmojiGK)v=c('MessengerTextWithEntities.react');return (c('React').createElement('div',null,c('React').createElement('div',{className:"_3q34"},c('React').createElement(v,{renderEmoji:true,renderEmoticons:true,text:this.props.contact.title})),c('React').createElement('div',{className:"_3q35"},this.props.contact.subtitle)));}else return (c('React').createElement('div',{className:"_364g"},this.props.contact.title));}.bind(this),this.$MessengerContactListRow5=function(){if(this.props.isOriginal)return (c('React').createElement('span',{className:"_5rh4"},i._("Added")));if(this.props.isInvited)return (c('React').createElement('span',{className:"_5rh4"},i._("Invited")));if(this.props.isSelected)return (c('React').createElement(c('Image.react'),{className:"_1kqm",src:n}));if(this.props.presenceStatus)return (c('React').createElement('div',{className:"_jg2"}));var v=null,w=c('MessengerAdminGroupUtils').isAdmin(this.props.adminIds,this.props.contact.uid),x=this.props.thread;if(x&&c('MessengerAdminGroupUtils').isOwner(w,x))v=c('React').createElement('span',{className:"_5qsj"},i._("Owner"));if(this.props.actionsClass){var y=this.props.actionsClass;return (c('React').createElement('div',null,v,c('React').createElement(y,{className:"_rwo",adminIds:this.props.adminIds,contact:this.props.contact,extrasEnabled:this.props.extraActionsEnabled,isOpen:this.state.isActionsOpen,onAction:this.$MessengerContactListRow6,onToggle:this.$MessengerContactListRow7,viewer:this.props.viewer})));}return v;}.bind(this),this.$MessengerContactListRow6=function(v,event){this.props.onAction&&this.props.onAction(v,event);}.bind(this),this.$MessengerContactListRow7=function(v){this.setState({isActionsOpen:v});}.bind(this),q;}p.prototype.componentDidMount=function(){if(this.props.isHighlighted&&this.props.onScrollIntoView){var q=c('ReactDOM').findDOMNode(this);this.props.onScrollIntoView&&this.props.onScrollIntoView(q);this.props.onRenderHighlight&&this.props.onRenderHighlight(q);}};p.prototype.componentDidUpdate=function(q){if(this.props.isHighlighted&&!q.isHighlighted){var r=c('ReactDOM').findDOMNode(this);this.props.onScrollIntoView&&this.props.onScrollIntoView(r);this.props.onRenderHighlight&&this.props.onRenderHighlight(r);}};p.prototype.render=function(){var q=this.props.disableRole?{}:{'aria-selected':this.props.isHighlighted,role:'option'};return c('React').createElement('li',babelHelpers['extends']({},q,{className:c('joinClasses')(this.props.className,"_5l37"+(this.props.isHighlighted?' '+"_1k1p":'')+(this.state.isActionsOpen?' '+"_rwn":''))}),c('React').createElement(c('Link.react'),{className:"_5f0v",onClick:this.$MessengerContactListRow1,onMouseDown:this.$MessengerContactListRow2,onMouseEnter:this.props.onMouseEnter,tabIndex:this.props.actionsClass?0:-1},c('React').createElement(c('ImageBlock.react'),{contentClassName:"_5l38",spacing:'medium'},this.$MessengerContactListRow3(),this.$MessengerContactListRow4(),this.$MessengerContactListRow5())));};p.propTypes={actionsClass:m.func,adminIds:m.arrayOf(m.string),className:m.string,contact:m.instanceOf(c('ImmutableObject')).isRequired,disableRole:m.bool,extraActionsEnabled:m.bool.isRequired,isHighlighted:m.bool,isInvited:m.bool,isOriginal:m.bool,isSelected:m.bool,onAction:m.func,onMouseEnter:m.func,onScrollIntoView:m.func,presenceStatus:m.bool,thread:m.instanceOf(c('ImmutableObject')),viewer:m.string.isRequired};f.exports=p;},null);
  __d('MessengerContactListRowContainer.react',['AvailableListConstants','immutable','ImmutableObject','MercuryIDs','MercuryParticipantTypes','MessengerContactActions','MessengerContactListRow.react','PresenceStatus','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').PureComponent);i=h&&h.prototype;function k(){var l,m;for(var n=arguments.length,o=Array(n),p=0;p<n;p++)o[p]=arguments[p];return l=(m=i.constructor).call.apply(m,[this].concat(o)),this.state={contact:this.props.contactAdapter(this.props.rawContact)},this.$MessengerContactListRowContainer2=function(){if(!this.props.hasHoverState)return;this.props.onHighlight&&this.props.onHighlight(this.props.rawContact);}.bind(this),this.$MessengerContactListRowContainer1=function(q,event){switch(q){case c('MessengerContactActions').SELECT:this.props.onSelect(this.props.rawContact,event);break;default:this.props.onAction&&this.props.onAction(q,this.props.rawContact);break;}}.bind(this),this.$MessengerContactListRowContainer3=function(){var q=this.state.contact;if(!this.props.showPresence||q.type!==c('MercuryParticipantTypes').FRIEND&&q.type!==c('MercuryParticipantTypes').USER)return false;var r=c('MercuryIDs').getUserIDFromParticipantID(q.uid);return c('PresenceStatus').get(r)==c('AvailableListConstants').ACTIVE;}.bind(this),l;}k.prototype.componentWillReceiveProps=function(l){if(l.rawContact!==this.props.rawContact)this.setState({contact:l.contactAdapter(l.rawContact)});};k.prototype.render=function(){return c('React').createElement(c('MessengerContactListRow.react'),{actionsClass:this.props.actionsClass,adminIds:this.props.adminIds,className:this.props.rowClassName,contact:this.state.contact,disableRole:this.props.disableRole,extraActionsEnabled:this.props.extraActionsEnabled,isHighlighted:this.props.isHighlighted,isInvited:this.props.invitedEntryIDs&&this.props.invitedEntryIDs.contains(this.state.contact.uid),isOriginal:this.props.originalEntryIDs&&this.props.originalEntryIDs.contains(this.state.contact.uid),isSelected:this.props.selectedEntryIDs&&this.props.selectedEntryIDs.contains(this.state.contact.uid),onAction:this.$MessengerContactListRowContainer1,onMouseEnter:this.$MessengerContactListRowContainer2,onRenderHighlight:this.props.onRenderHighlight,onScrollIntoView:this.props.onScrollIntoView,presenceStatus:this.$MessengerContactListRowContainer3(),thread:this.props.thread||this.state.contact.thread,viewer:this.props.viewer});};k.propTypes={actionsClass:j.func,adminIds:j.arrayOf(j.string),contactAdapter:j.func.isRequired,disableRole:j.bool,extraActionsEnabled:j.bool.isRequired,hasHoverState:j.bool,invitedEntryIDs:j.instanceOf(c('immutable').Set),isHighlighted:j.bool,onAction:j.func,onHighlight:j.func,onScrollIntoView:j.func,onSelect:j.func.isRequired,originalEntryIDs:j.instanceOf(c('immutable').Set),rawContact:j.object.isRequired,rowClassName:j.string,selectedEntryIDs:j.instanceOf(c('immutable').Set),showPresence:j.bool,thread:j.instanceOf(c('ImmutableObject')),viewer:j.string.isRequired};f.exports=k;},null);
  __d('MessengerContactList.react',['cx','fbt','MessengerContactListRowContainer.react','ImageBlock.react','immutable','ImmutableObject','MessengerSpinner.react','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('React').PropTypes;j=babelHelpers.inherits(m,c('React').PureComponent);k=j&&j.prototype;function m(){var n,o;for(var p=arguments.length,q=Array(p),r=0;r<p;r++)q[r]=arguments[r];return n=(o=k.constructor).call.apply(o,[this].concat(q)),this.$MessengerContactList1=function(s,t){return (c('React').createElement('div',{key:t,className:"_29hk"},this.$MessengerContactList4(t),c('React').createElement('ul',{id:this.props.ariaOwneeID,role:this.props.disableRole?undefined:'listbox',className:"_29hl"},s.map(function(u,v){var w=v===0?c('joinClasses')(this.props.rowClassName,"_3h3c"):this.props.rowClassName;return (c('React').createElement(c('MessengerContactListRowContainer.react'),{actionsClass:this.props.actionsClass,adminIds:this.props.adminIds,contactAdapter:this.props.contactAdapter,disableRole:this.props.disableRole,extraActionsEnabled:!!this.props.extraActionsEnabled,hasHoverState:this.props.hasHoverState,invitedEntryIDs:this.props.invitedEntryIDs,isHighlighted:this.props.highlightedEntry&&this.props.highlightedEntry.getUniqueID()===u.getUniqueID(),key:u.id||u.getUniqueID(),onAction:this.props.onAction,onHighlight:this.props.onHighlight,onRenderHighlight:this.props.onRenderHighlight,onScrollIntoView:this.props.onScrollIntoView,onSelect:this.props.onSelect,originalEntryIDs:this.props.originalEntryIDs,rawContact:u,rowClassName:w,selectedEntryIDs:this.props.selectedEntryIDs,showPresence:this.props.showPresence,thread:this.props.thread,viewer:this.props.viewer}));}.bind(this)))));}.bind(this),this.$MessengerContactList4=function(s){if(!s)return null;return (c('React').createElement('div',{className:"_225b"},s));},this.$MessengerContactList2=function(){if(!this.props.isLoading)return null;return (c('React').createElement(c('ImageBlock.react'),{className:"_225c",spacing:'medium'},c('React').createElement(c('MessengerSpinner.react'),{className:"_2i59",color:'grey'}),c('React').createElement('div',{className:"_4g0h"},i._("Searching..."))));}.bind(this),this.$MessengerContactList3=function(){if(this.props.isLoading||this.props.listSections.size>0||!this.props.queryString||this.props.queryString.length===0)return null;return (c('React').createElement('div',{className:"_3xcx"},i._("No results found")));}.bind(this),n;}m.prototype.render=function(){return c('React').createElement('div',{className:this.props.className},this.props.listSections.map(this.$MessengerContactList1).toArray(),this.$MessengerContactList2(),this.$MessengerContactList3());};m.propTypes={actionsClass:l.func,adminIds:l.arrayOf(l.string),ariaOwneeID:l.string,contactAdapter:l.func.isRequired,disableRole:l.bool,extraActionsEnabled:l.bool,hasHoverState:l.bool,highlightedEntry:l.object,invitedEntryIDs:l.instanceOf(c('immutable').Set),isLoading:l.bool,listSections:l.instanceOf(c('immutable').OrderedMap).isRequired,onAction:l.func,onHighlight:l.func,onRenderHighlight:l.func,onScrollIntoView:l.func,onSelect:l.func.isRequired,originalEntryIDs:l.instanceOf(c('immutable').Set),queryString:l.string,rowClassName:l.string,selectedEntryIDs:l.instanceOf(c('immutable').Set),showPresence:l.bool,thread:l.instanceOf(c('ImmutableObject')),viewer:l.string.isRequired};f.exports=m;},null);
  __d('MessengerTypeaheadView.react',['cx','immutable','MessengerContactAdapters','MessengerContactList.react','MessengerTypeaheadUtils','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').PureComponent);j=i&&i.prototype;l.prototype.render=function(){return (c('React').createElement(c('MessengerContactList.react'),{ariaOwneeID:this.props.ariaOwneeID,className:c('joinClasses')(this.props.className,"_5t4c"),contactAdapter:c('MessengerContactAdapters').fromSearchableEntry,hasHoverState:this.props.hasHoverState,highlightedEntry:this.props.highlightedEntry,isLoading:this.props.isLoading,listSections:c('MessengerTypeaheadUtils').buildListSections(this.props.entries,this.props.queryString),onHighlight:this.props.onHighlight,onRenderHighlight:this.props.onRenderHighlight,onScrollIntoView:this.props.onScrollIntoView,onSelect:this.props.onSelect,originalEntryIDs:this.props.originalEntryIDs,invitedEntryIDs:this.props.invitedEntryIDs,queryString:this.props.queryString,selectedEntryIDs:this.props.selectedEntryIDs,showPresence:false,viewer:this.props.viewer}));};function l(){i.apply(this,arguments);}l.propTypes={ariaOwneeID:k.string,entries:k.array.isRequired,hasHoverState:k.bool,highlightedEntry:k.object,isLoading:k.bool,onHighlight:k.func,onRenderHighlight:k.func,onScrollIntoView:k.func,onSelect:k.func,originalEntryIDs:k.instanceOf(c('immutable').Set),invitedEntryIDs:k.instanceOf(c('immutable').Set),queryString:k.string,selectedEntryIDs:k.instanceOf(c('immutable').Set),viewer:k.string.isRequired};f.exports=l;},null);
  __d('MessengerScrollableTypeaheadView.react',['MessengerScrollableArea.react','MessengerTypeaheadUtils','MessengerTypeaheadView.react','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').PureComponent);i=h&&h.prototype;function j(){var k,l;for(var m=arguments.length,n=Array(m),o=0;o<m;o++)n[o]=arguments[o];return k=(l=i.constructor).call.apply(l,[this].concat(n)),this.$MessengerScrollableTypeaheadView1=function(p){c('MessengerTypeaheadUtils').scrollEntryIntoView(p,this.refs.scrollable);}.bind(this),k;}j.prototype.render=function(){var k=this.props,l=k.className,m=k.width,n=babelHelpers.objectWithoutProperties(k,['className','width']);return c('React').createElement(c('MessengerScrollableArea.react'),{className:l,ref:'scrollable',width:m},c('React').createElement(c('MessengerTypeaheadView.react'),babelHelpers['extends']({},n,{onScrollIntoView:this.$MessengerScrollableTypeaheadView1})));};f.exports=j;},null);
  __d('MessengerTokenizerToken.react',['cx','Keys','React','SearchableEntry','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=100;i=babelHelpers.inherits(m,c('React').Component);j=i&&i.prototype;function m(){var n,o;for(var p=arguments.length,q=Array(p),r=0;r<p;r++)q[r]=arguments[r];return n=(o=j.constructor).call.apply(o,[this].concat(q)),this.$MessengerTokenizerToken1=function(event){event.stopPropagation();},this.$MessengerTokenizerToken2=function(event){if(event.keyCode===c('Keys').BACKSPACE){event.preventDefault();this.props.onRemove&&this.props.onRemove(this.props.entry);}}.bind(this),n;}m.prototype.render=function(){return c('React').createElement('span',{className:c('joinClasses')(this.props.className,"_14-8"),label:null,onClick:this.$MessengerTokenizerToken1,onKeyDown:this.$MessengerTokenizerToken2,tabIndex:this.props.index+l},c('React').createElement('span',{'aria-label':this.props.label,title:this.props.label,className:"_14-9"},this.props.label));};m.propTypes={className:k.string,entry:k.instanceOf(c('SearchableEntry')),index:k.number,label:k.string.isRequired,onRemove:k.func};f.exports=m;},null);
  __d('MessengerTokenizer.react',['cx','invariant','AbstractTokenizer.react','immutable','React','SearchableEntry','MessengerScrollableTypeaheadView.react','MessengerTokenizerToken.react','MessengerTypeaheadUtils','TypeaheadNavigation','joinClasses'],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,m=30;j=babelHelpers.inherits(n,c('React').PureComponent);k=j&&j.prototype;function n(){var p,q;for(var r=arguments.length,s=Array(r),t=0;t<r;t++)s[t]=arguments[t];return p=(q=k.constructor).call.apply(q,[this].concat(s)),o.call(this),p;}n.prototype.componentDidMount=function(){if(this.props.autoFocus)this.focusInput();};n.prototype.render=function(){return (c('React').createElement('div',{className:c('joinClasses')(this.props.className,"_14-7")},c('React').createElement(c('AbstractTokenizer.react'),{autoHighlight:this.props.hasHoverState,context:this.props.context,entries:this.props.entries.toArray(),excludeTokenEntries:!!this.state.queryString,extraTypeaheadProps:{spellCheck:false},hideViewWithEntries:this.props.hideViewWithEntries,onAddEntryAttempt:this.$MessengerTokenizer3,onEntriesFound:this.props.onEntriesFound,onQueryStringChange:this.$MessengerTokenizer4,onRemoveEntryAttempt:this.props.onRemoveEntryAttempt,onReorderEntryAttempt:this.props.onReorderEntryAttempt,navigation:{moveUp:this.$MessengerTokenizer1,moveDown:this.$MessengerTokenizer2},placeholder:this.props.placeholder,presenter:{ViewRenderer:c('MessengerScrollableTypeaheadView.react'),TokenRenderer:c('MessengerTokenizerToken.react'),alwaysVisibleOnFocus:(this.state.isLoading||this.state.isLoaded)&&!!this.state.queryString,useLayer:this.props.useLayer,extraRendererProps:babelHelpers['extends']({hasHoverState:this.props.hasHoverState,isLoading:this.state.isLoading,originalEntryIDs:this.props.originalEntryIDs,invitedEntryIDs:this.props.invitedEntryIDs,selectedEntryIDs:c('immutable').Seq(this.props.entries).map(function(p){return p.getUniqueID();}).toSet(),viewer:this.props.viewer},this.props.extraRendererProps),maxEntries:m,sortEntries:this.$MessengerTokenizer5},queryString:this.state.queryString,ref:'tokenizer',searchSource:this.props.searchSource,searchSourceOptions:{onQueryFinished:this.$MessengerTokenizer6,onQueryStarted:this.$MessengerTokenizer7,showDefaultEntries:this.props.showDefaultEntries},showEntriesOnFocus:true,tabIndex:this.props.tabIndex&&this.props.tabIndex.toString()})));};n.propTypes={autoFocus:l.bool,className:l.string,context:l.object,entries:l.instanceOf(c('immutable').List).isRequired,excludeGroups:l.bool,extraRendererProps:l.object,hasHoverState:l.bool,hideViewWithEntries:l.bool,onAddEntryAttempt:l.func.isRequired,onEntriesFound:l.func,onRemoveEntryAttempt:l.func.isRequired,onReorderEntryAttempt:l.func,originalEntryIDs:l.instanceOf(c('immutable').Set),invitedEntryIDs:l.instanceOf(c('immutable').Set),placeholder:l.string,searchSource:l.object.isRequired,tabIndex:l.number,useLayer:l.bool,viewer:l.string.isRequired};n.defaultProps={excludeGroups:false,hideViewWithEntries:true};var o=function(){this.state={isLoading:false,isLoaded:false,queryString:''};this.$MessengerTokenizer1=function(p){for(var q=arguments.length,r=Array(q>1?q-1:0),s=1;s<q;s++)r[s-1]=arguments[s];c('TypeaheadNavigation').moveUp.apply(c('TypeaheadNavigation'),[c('MessengerTypeaheadUtils').orderEntries(p,this.state.queryString)].concat(r));}.bind(this);this.$MessengerTokenizer2=function(p){for(var q=arguments.length,r=Array(q>1?q-1:0),s=1;s<q;s++)r[s-1]=arguments[s];c('TypeaheadNavigation').moveDown.apply(c('TypeaheadNavigation'),[c('MessengerTypeaheadUtils').orderEntries(p,this.state.queryString)].concat(r));}.bind(this);this.$MessengerTokenizer3=function(p){this.setState({isLoaded:false,queryString:''});var q=p.getUniqueID();if(this.props.entries.some(function(r){return (r.getUniqueID()===q);})){this.props.onRemoveEntryAttempt(p);return;}if(this.props.originalEntryIDs&&this.props.originalEntryIDs.contains(q))return;this.props.onAddEntryAttempt(p);}.bind(this);this.$MessengerTokenizer5=function(p){if(this.props.entries.size||this.props.excludeGroups)return c('MessengerTypeaheadUtils').sortEntriesWithoutGroupsOrViewer(p,this.props.viewer);return c('MessengerTypeaheadUtils').sortEntries(p,this.state.queryString);}.bind(this);this.focusInput=function(){setTimeout(function(){this.refs.tokenizer&&this.refs.tokenizer.focusInput();}.bind(this));}.bind(this);this.$MessengerTokenizer7=function(p){if(p===this.state.queryString)this.setState({isLoading:true});}.bind(this);this.$MessengerTokenizer6=function(p){if(p===this.state.queryString)this.setState({isLoaded:true,isLoading:false});}.bind(this);this.$MessengerTokenizer4=function(event){!(event.target instanceof HTMLInputElement)?i(0):void 0;this.setState({isLoaded:false,queryString:event.target.value});}.bind(this);};f.exports=n;},null);
  __d('MessengerComposeViewHeader.react',['cx','fbt','immutable','MessengerSearchSource','MessengerTokenizer.react','MessengerTypeaheadComponents','MessengerTabIndices','React','clearImmediate','joinClasses','setImmediate'],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,m=320,n=c('MessengerTypeaheadComponents').TokenizerComponent||c('MessengerTokenizer.react');j=babelHelpers.inherits(o,c('React').PureComponent);k=j&&j.prototype;function o(){var p,q;for(var r=arguments.length,s=Array(r),t=0;t<r;t++)s[t]=arguments[t];return p=(q=k.constructor).call.apply(q,[this].concat(s)),this.state={tokenizerContext:null},this.$MessengerComposeViewHeader1=null,this.$MessengerComposeViewHeader2=function(){this.$MessengerComposeViewHeader1=c('setImmediate')(function(){this.refs.tokenizer&&this.refs.tokenizer.focusInput();}.bind(this));}.bind(this),p;}o.prototype.componentDidMount=function(){this.$MessengerComposeViewHeader2();this.setState({tokenizerContext:this.refs.tokenizerContext});};o.prototype.componentDidUpdate=function(p){if(this.props.recipients!==p.recipients)this.props.onResize();};o.prototype.componentWillUnmount=function(){this.$MessengerComposeViewHeader1&&c('clearImmediate')(this.$MessengerComposeViewHeader1);};o.prototype.render=function(){var p={};if(c('MessengerTypeaheadComponents').GraphQLTypeahead){p={enableMessageSearch:false,excludeGroups:false,excludePages:false,hasHoverState:true,originalEntryIDs:c('immutable').Set(),scrollableViewClassName:"_2y8_",shouldQueryVCEndpoint:false,width:m};}else p={extraRendererProps:{className:"_2y8_",width:m},hasHoverState:true,searchSource:c('MessengerSearchSource').getForFBID(this.props.viewer)};return c('React').createElement('div',{className:c('joinClasses')("_2y8y _5l-3",this.props.className),onClick:this.$MessengerComposeViewHeader2},c('React').createElement('div',{className:"_2y8z"},i._("To:")),c('React').createElement('div',null,c('React').createElement(n,babelHelpers['extends']({className:"_2y8-",context:this.state.tokenizerContext,entries:this.props.recipients,forceHideClearButton:this.props.forceHideClearButton,onAddEntryAttempt:this.props.onAddRecipient,onClear:this.props.onClear,onRemoveEntryAttempt:this.props.onRemoveRecipient,placeholder:i._("Type the name of a person or group"),ref:'tokenizer',tabIndex:c('MessengerTabIndices').NEW_MESSAGE_TOKENIZER,useLayer:true,viewer:this.props.viewer},p)),c('React').createElement('div',{ref:'tokenizerContext'})));};o.propTypes={forceHideClearButton:l.bool.isRequired,onAddRecipient:l.func.isRequired,onClear:l.func,onRemoveRecipient:l.func.isRequired,onResize:l.func.isRequired,recipients:l.instanceOf(c('immutable').List).isRequired,viewer:l.string.isRequired};f.exports=o;},null);
  __d('MessengerDialogCancelButton.react',['fbt','MessengerDialogButton.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').PureComponent);j=i&&i.prototype;k.prototype.render=function(){return (c('React').createElement(c('MessengerDialogButton.react'),babelHelpers['extends']({action:'cancel',label:h._("Cancel"),type:'secondary'},this.props)));};function k(){i.apply(this,arguments);}f.exports=k;},null);
  __d('MessengerForwardAttachmentDialog.react',['ix','cx','fbt','AsyncRequest','CurrentUser','Image.react','immutable','LayerFadeOnHide','MessageShareType','MessengerComposeViewHeader.react','MessengerDialog.react','MessengerDialogBody.react','MessengerDialogButton.react','MessengerDialogCancelButton.react','MessengerDialogFooter.react','MessengerDialogHeader.react','MessengerDialogTitle.react','MessengerSpinner.react','React','XMessagingForwardAttachmentController','XMessengerPlatformShareCTAController','emptyFunction','fbglyph'],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(){var o,p;'use strict';for(var q=arguments.length,r=Array(q),s=0;s<q;s++)r[s]=arguments[s];return o=(p=l.constructor).call.apply(p,[this].concat(r)),this.state={recipients:c('immutable').List(),sendError:null,sending:false,startingThreadingID:Date.now()},this.$MessengerForwardAttachmentDialog3=function(t){this.setState({recipients:this.state.recipients.push(t)});}.bind(this),this.$MessengerForwardAttachmentDialog4=function(t){var u=this.state.recipients;this.setState({recipients:u['delete'](u.indexOf(t))});}.bind(this),this.$MessengerForwardAttachmentDialog2=function(){this.setState({recipients:c('immutable').List()});}.bind(this),this.$MessengerForwardAttachmentDialog5=function(){var t={},u=this.state.startingThreadingID;this.state.recipients.forEach(function(w){t[u++]=w.getUniqueID();});if(this.props.shareType===c('MessageShareType').PLATFORM_SHARE_CTA){var v=c('XMessengerPlatformShareCTAController').getURIBuilder().getURI();new (c('AsyncRequest'))(v).setMethod('POST').setHandler(this.$MessengerForwardAttachmentDialog6).setData({cta_id:this.props.attachmentID,recipient_map:t}).send();}else{v=c('XMessagingForwardAttachmentController').getURIBuilder().getURI();new (c('AsyncRequest'))(v).setMethod('POST').setHandler(this.$MessengerForwardAttachmentDialog6).setData({attachment_id:this.props.attachmentID,recipient_map:t}).send();}this.setState({sending:true,sendError:null});}.bind(this),this.$MessengerForwardAttachmentDialog6=function(t){if(t.payload.success){this.props.onClose&&this.props.onClose();this.setState({recipients:c('immutable').List(),sending:false,startingThreadingID:Date.now()});return;}this.setState({sending:false,sendError:t.payload.error});}.bind(this),this.$MessengerForwardAttachmentDialog1=function(t){if(!t)this.props.onClose&&this.props.onClose();}.bind(this),o;}n.prototype.getDefaultProps=function(){'use strict';return {shareType:c('MessageShareType').IMAGE};};n.prototype.render=function(){'use strict';var o=j._("Send"),p;if(this.state.sending){p=c('React').createElement('div',null,c('React').createElement(c('MessengerSpinner.react'),null),c('React').createElement('span',{className:"_1e1n _3-99"},j._("Sending")));}else if(this.state.sendError){var q=h("\/images\/assets_DO_NOT_HARDCODE\/fb_glyphs\/caution-solid_16_bluegray-40.png");p=c('React').createElement('div',{className:"_1e1n"},c('React').createElement(c('Image.react'),{src:q}),c('React').createElement('span',{className:"_3-99"},this.state.sendError));}return c('React').createElement(c('MessengerDialog.react'),{shown:this.props.shown,behaviors:{LayerFadeOnHide:c('LayerFadeOnHide')},onToggle:this.$MessengerForwardAttachmentDialog1,width:560},c('React').createElement(c('MessengerDialogHeader.react'),null,c('React').createElement(c('MessengerDialogTitle.react'),null,this.props.title)),c('React').createElement(c('MessengerDialogBody.react'),null,c('React').createElement(c('MessengerComposeViewHeader.react'),{className:"_1e1o",forceHideClearButton:false,onClear:this.$MessengerForwardAttachmentDialog2,onAddRecipient:this.$MessengerForwardAttachmentDialog3,onRemoveRecipient:this.$MessengerForwardAttachmentDialog4,onResize:c('emptyFunction'),recipients:this.state.recipients,viewer:c('CurrentUser').getID()})),c('React').createElement(c('MessengerDialogFooter.react'),{leftContent:p},c('React').createElement(c('MessengerDialogCancelButton.react'),{onClick:this.props.onClose}),c('React').createElement(c('MessengerDialogButton.react'),{action:'confirm',disabled:!this.state.recipients.size||this.state.sending,label:o,onClick:this.$MessengerForwardAttachmentDialog5,type:'primary'})));};n.propTypes={attachmentID:m.string.isRequired,onClose:m.func,shown:m.bool.isRequired,title:m.string.isRequired,shareType:m.string};f.exports=n;},null);
  __d('MessengerPhotoViewBottomBar.react',['cx','React'],function a(b,c,d,e,f,g,h){'use strict';if(c.__markCompiled)c.__markCompiled();var i=function(j){return (c('React').createElement('div',{className:"_51an _50-m _16zz"},j.children));};f.exports=i;},null);
  __d('MessengerPhotoViewHScroll.react',['cx','Animation','MessengerSpinner.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,l=200,m=80;i=babelHelpers.inherits(n,c('React').Component);j=i&&i.prototype;function n(){var o,p;for(var q=arguments.length,r=Array(q),s=0;s<q;s++)r[s]=arguments[s];return o=(p=j.constructor).call.apply(p,[this].concat(r)),this.$MessengerPhotoViewHScroll3=function(){if(!this.props.isLoadingImages)return null;return (c('React').createElement('div',{className:"_2n20"},c('React').createElement(c('MessengerSpinner.react'),null)));}.bind(this),this.$MessengerPhotoViewHScroll2=function(){var t=this.props,u=t.children,v=c('React').Children.count(u);return c('React').Children.map(u,function(w,x){var y={paddingLeft:0,paddingRight:0},z=(t.width-m)/2;if(x<v-1)y.paddingRight=0;if(x===0)y.paddingLeft=z;if(x===v-1)y.paddingRight=z;var aa=this.$MessengerPhotoViewHScroll4.bind(null,w);return (c('React').createElement('div',{className:"_4dy9",key:x,onClick:aa,style:y},w));}.bind(this));}.bind(this),this.$MessengerPhotoViewHScroll4=function(t){this.props.onScroll(t.props.photoID);this.props.fetchMore(t.props.photoID);var u=this.$MessengerPhotoViewHScroll1(t.props.photoID);this.$MessengerPhotoViewHScroll5(u);}.bind(this),this.$MessengerPhotoViewHScroll5=function(t){var u=this.$MessengerPhotoViewHScroll6(t);this.setState({scrollLeft:u});}.bind(this),this.$MessengerPhotoViewHScroll6=function(t){var u=this.$MessengerPhotoViewHScroll1(this.props.photoID);if(t===u)return this.state.scrollLeft;var v=t*m;return v;}.bind(this),this.$MessengerPhotoViewHScroll1=function(t){var u=this.props.children.find(function(v){return v.props.photoID===t;});if(!u)return -1;return this.props.children.indexOf(u);}.bind(this),o;}n.prototype.componentWillReceiveProps=function(o){if(o&&o.photoID!==this.props.photoID)this.setState({scrollLeft:this.$MessengerPhotoViewHScroll1(o.photoID)*m});};n.prototype.render=function(){var o=this.props;if(!o.isLoadingImages&&this.refs&&this.refs.childContainer)new (c('Animation'))(this.refs.childContainer).to('scrollLeft',this.state.scrollLeft).duration(l).go();var p={overflow:'hidden',width:o.width};return c('React').createElement('div',{className:"_452h",style:{width:o.width}},c('React').createElement('div',{className:"_452m",ref:'childContainer',style:p},c('React').createElement('div',{className:"_452n"},this.$MessengerPhotoViewHScroll2(),this.$MessengerPhotoViewHScroll3())));};n.propTypes={fetchMore:k.func.isRequired,isLoadingImages:k.bool,onScroll:k.func.isRequired,photoID:k.string.isRequired,width:k.number.isRequired};f.exports=n;},null);
  __d('MessengerSharedPhoto.react',['cx','MercuryConfig','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').PureComponent);j=i&&i.prototype;function l(){var m,n;for(var o=arguments.length,p=Array(o),q=0;q<o;q++)p[q]=arguments[q];return m=(n=j.constructor).call.apply(n,[this].concat(p)),this.$MessengerSharedPhoto1=function(){this.props.onClick(c('MercuryConfig').SharedPhotoNewView?this.props.photoID:this.props.fbid);}.bind(this),m;}l.prototype.render=function(){return c('React').createElement('a',{className:this.props.className,href:'#',onClick:this.$MessengerSharedPhoto1,style:{backgroundImage:'url('+this.props.uri+')'}});};l.propTypes={className:k.string.isRequired,fbid:k.string.isRequired,onClick:k.func.isRequired,photoID:k.string,uri:k.string.isRequired};f.exports=l;},null);
  __d('MessengerPhotoViewBottomScrollable.react',['cx','MessengerPhotoViewHScroll.react','MessengerSharedPhoto.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(){var m,n;for(var o=arguments.length,p=Array(o),q=0;q<o;q++)p[q]=arguments[q];return m=(n=j.constructor).call.apply(n,[this].concat(p)),this.state={photoID:''},this.$MessengerPhotoViewBottomScrollable1=function(r){if(this.state.photoID!==r.id)this.setState({photoID:r.id});}.bind(this),m;}l.prototype.componentWillReceiveProps=function(m){if(m.photoID!=this.state.photoID)this.setState({photoID:m.photoID});};l.prototype.render=function(){var m=this.props.sharedPhotos.edges;if(this.props.sharedArray)m=this.props.sharedArray;var n=m.length,o="_5l-3 _42rk",p=m.slice(0,n).map(function(q){var r=q.node;return c('React').createElement(c('MessengerSharedPhoto.react'),{className:"_42rl"+(this.state.photoID!==r.id?' '+"_q1a":''),fbid:r.legacy_attachment_id,key:r.legacy_attachment_id,onClick:function(){return this.$MessengerPhotoViewBottomScrollable1(r);}.bind(this),photoID:r.id,uri:r.image.uri});}.bind(this));return c('React').createElement('div',{className:o,ref:'scrollable'},c('React').createElement(c('MessengerPhotoViewHScroll.react'),{fetchMore:this.props.fetchMore,isLoadingImages:this.props.isLoadingImages,onScroll:this.props.onScroll,photoID:this.state.photoID,width:this.props.width},p));};l.propTypes={fetchMore:k.func,isLoadingImages:k.bool,onScroll:k.func.isRequired,photoID:k.string,width:k.number};f.exports=l;},null);
  __d('MessengerPhotoInfoDialog.react',['cx','fbt','MessengerContactImage.react','MessengerDialog.react','MessengerDialogButton.react','MessengerDialogHeader.react','MessengerDialogTitle.react','MessengerActions','MessengerSpinner.react','MercuryIDs','MercuryTimestamp','MercuryParticipants','React','Relay','RelayQL'],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,m=54;j=babelHelpers.inherits(n,c('React').Component);k=j&&j.prototype;function n(){var o,p;for(var q=arguments.length,r=Array(q),s=0;s<q;s++)r[s]=arguments[s];return o=(p=k.constructor).call.apply(p,[this].concat(r)),this.$MessengerPhotoInfoDialog4=function(){var t=this.props.fullMedia.exif_data,u='';if(t){if(t.aperture)u=t.aperture+' ';if(t.focal_length){var v=t.focal_length.split('/'),w=parseInt(v[0],10)/(parseInt(v[1],10)||1);u+=w+'mm ';}if(t.iso)u+='ISO '+t.iso;}if(!u.length)return null;return (c('React').createElement('div',{className:"_2zn1"},c('React').createElement('div',{className:"_2zn2"},i._("Camera")),c('React').createElement('div',{className:"_2zn4"},c('React').createElement('div',{className:"_2zn5"},t.model||'Camera'),c('React').createElement('div',{className:"_2zn6"},u))));}.bind(this),this.$MessengerPhotoInfoDialog3=function(){var t=this.props.fullMedia,u='';if(t.filesize>1e+06){u=(t.filesize/1e+06).toFixed(2)+'MB';}else if(t.filesize>1000){u=(t.filesize/1000).toFixed(2)+'KB';}else if(t.filesize>0)u=t.filesize+'B';var v=t.__typename==='MessageImage'?(t.original_dimensions.x*t.original_dimensions.y/1e+06).toFixed(2)+'MP':'';return (c('React').createElement('div',{className:"_2zn1"},c('React').createElement('div',{className:"_2zn2"},i._("Details")),c('React').createElement('div',{className:"_2zn4"},c('React').createElement('div',{className:"_2zn5"},t.filename),c('React').createElement('div',{className:"_2zn6"},v+' '+t.original_dimensions.x+' x '+t.original_dimensions.y+' '+u))));}.bind(this),this.$MessengerPhotoInfoDialog2=function(event){event.preventDefault();this.props.showHeader();c('MessengerActions').hideDialog();}.bind(this),this.$MessengerPhotoInfoDialog1=function(t){if(!t){this.props.showHeader();c('MessengerActions').hideDialog();}}.bind(this),this.showProfilePic=function(){var t=this.props.fullMedia;if(!t){return c('React').createElement(c('MessengerSpinner.react'),null);}else{var u=c('MercuryIDs').getParticipantIDFromUserID(t.creator.id),v=c('MercuryParticipants').getNow(u);if(v&&v.is_messenger_user!=null)return (c('React').createElement(c('MessengerContactImage.react'),{isMessengerUser:v.is_messenger_user,size:m,src:v.big_image_src||v.image_src}));return c('React').createElement(c('MessengerSpinner.react'),null);}}.bind(this),o;}n.prototype.render=function(){var o=this.props.fullMedia;return c('React').createElement(c('MessengerDialog.react'),{onToggle:this.$MessengerPhotoInfoDialog1,ref:'dialog',type:'default',width:504},c('React').createElement(c('MessengerDialogHeader.react'),null,c('React').createElement(c('MessengerDialogTitle.react'),null,i._("Info")),c('React').createElement(c('MessengerDialogButton.react'),{action:'cancel',label:i._("Done"),onClick:this.$MessengerPhotoInfoDialog2,type:'primary'})),c('React').createElement('div',{className:"_2zn1"},c('React').createElement('div',{className:"_2zn2"},i._("Uploaded by")),c('React').createElement('div',{className:"_2zn4"},c('React').createElement('div',{className:"_2zn5"},o.creator.name),c('React').createElement('div',{className:"_2zn6"},c('MercuryTimestamp').getPreciseTimestamp(o.creation_time*1000))),c('React').createElement('div',{className:"_2zn7"},this.showProfilePic())),this.$MessengerPhotoInfoDialog3(),this.$MessengerPhotoInfoDialog4());};n.propTypes={photoID:l.string,viewer:l.string,showHeader:l.func.isRequired};f.exports=c('Relay').createContainer(n,{fragments:{fullMedia:function(o){return function(){return {children:[{fieldName:'__typename',kind:'Field',metadata:{isRequisite:true},type:'String'},{fieldName:'id',kind:'Field',metadata:{isRequisite:true},type:'ID'},{children:[{fieldName:'creation_time',kind:'Field',metadata:{},type:'Time'},{children:[{fieldName:'id',kind:'Field',metadata:{isRequisite:true},type:'ID'},{fieldName:'name',kind:'Field',metadata:{},type:'String'},{fieldName:'__typename',kind:'Field',metadata:{isGenerated:true,isRequisite:true},type:'String'}],fieldName:'creator',kind:'Field',metadata:{canHaveSubselections:true,inferredRootCallName:'node',inferredPrimaryKey:'id',isAbstract:true},type:'Actor'},{fieldName:'filename',kind:'Field',metadata:{},type:'String'},{children:[{fieldName:'x',kind:'Field',metadata:{},type:'Float'},{fieldName:'y',kind:'Field',metadata:{},type:'Float'}],fieldName:'original_dimensions',kind:'Field',metadata:{canHaveSubselections:true},type:'Vect2'},{fieldName:'filesize',kind:'Field',metadata:{},type:'Int'},{children:[{fieldName:'iso',kind:'Field',metadata:{},type:'Int'},{fieldName:'aperture',kind:'Field',metadata:{},type:'String'},{fieldName:'focal_length',kind:'Field',metadata:{},type:'String'},{fieldName:'model',kind:'Field',metadata:{},type:'String'}],fieldName:'exif_data',kind:'Field',metadata:{canHaveSubselections:true},type:'MessageImageExifData'},{fieldName:'id',kind:'Field',metadata:{isGenerated:true,isRequisite:true},type:'ID'}],id:c('RelayQL').__id(),kind:'Fragment',metadata:{},name:'MessageImage',type:'MessageImage'},{children:[{fieldName:'creation_time',kind:'Field',metadata:{},type:'Time'},{children:[{fieldName:'id',kind:'Field',metadata:{isRequisite:true},type:'ID'},{fieldName:'name',kind:'Field',metadata:{},type:'String'},{fieldName:'__typename',kind:'Field',metadata:{isGenerated:true,isRequisite:true},type:'String'}],fieldName:'creator',kind:'Field',metadata:{canHaveSubselections:true,inferredRootCallName:'node',inferredPrimaryKey:'id',isAbstract:true},type:'Actor'},{fieldName:'filename',kind:'Field',metadata:{},type:'String'},{children:[{fieldName:'x',kind:'Field',metadata:{},type:'Float'},{fieldName:'y',kind:'Field',metadata:{},type:'Float'}],fieldName:'original_dimensions',kind:'Field',metadata:{canHaveSubselections:true},type:'Vect2'},{fieldName:'id',kind:'Field',metadata:{isGenerated:true,isRequisite:true},type:'ID'}],id:c('RelayQL').__id(),kind:'Fragment',metadata:{},name:'MessageVideo',type:'MessageVideo'}],id:c('RelayQL').__id(),kind:'Fragment',metadata:{isAbstract:true},name:'MessengerPhotoInfoDialog_react_FullMediaRelayQL',type:'Node'};}();}}});},null);
  __d('SpotlightMessagesViewerContainerRoute',['RelayRoute','RelayQL'],function a(b,c,d,e,f,g){'use strict';var h,i;if(c.__markCompiled)c.__markCompiled();h=babelHelpers.inherits(j,c('RelayRoute'));i=h&&h.prototype;function j(){h.apply(this,arguments);}j.routeName='SpotlightMessagesViewerContainerRoute';j.paramDefinition={photoID:{type:'String',required:true}};j.queries={fullMedia:function(k){return function(l){return {calls:[{kind:'Call',metadata:{type:'ID!'},name:'id',value:{kind:'CallVariable',callVariableName:'photoID'}}],children:[].concat.apply([],[{fieldName:'id',kind:'Field',metadata:{isGenerated:true,isRequisite:true},type:'ID'},{fieldName:'__typename',kind:'Field',metadata:{isGenerated:true,isRequisite:true},type:'String'},c('RelayQL').__frag(l)]),fieldName:'node',kind:'Query',metadata:{isAbstract:true,identifyingArgName:'id',identifyingArgType:'ID!'},name:'SpotlightMessagesViewerContainerRoute',type:'Node'};}(k.getFragment('fullMedia'));}};f.exports=j;},null);
  __d('MessengerPhotoInfoDialogContainer.react',['MessengerPhotoInfoDialog.react','RelayRootContainer','SpotlightMessagesViewerContainerRoute','React'],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:'MessengerPhotoInfoDialogContainer',proptypes:{viewer:h.string,photoID:h.string.isRequired,showHeader:h.func.isRequired},render:function(){var j=new (c('SpotlightMessagesViewerContainerRoute'))({photoID:this.props.photoID});return (c('React').createElement(c('RelayRootContainer'),{Component:c('MessengerPhotoInfoDialog.react'),route:j,renderFetched:function(k){return (c('React').createElement(c('MessengerPhotoInfoDialog.react'),babelHelpers['extends']({},k,{photoID:this.props.photoID,showHeader:this.props.showHeader,viewer:this.props.viewer})));}.bind(this)}));}});f.exports=i;},null);
  __d('SpotlightViewerBottomBarLink',['cx','Link.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;k.prototype.render=function(){'use strict';var l=this.props.className||"_4_8j _4_8k";return (c('React').createElement(c('Link.react'),babelHelpers['extends']({},this.props,{className:l}),this.props.children));};function k(){'use strict';i.apply(this,arguments);}f.exports=k;},null);
  __d('MessengerPhotoViewHeader.react',['cx','fbt','MessengerActions','MessengerPhotoInfoDialogContainer.react','React','SpotlightViewerBottomBarLink','MessengerPhotoViewCloseLink.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').PureComponent);k=j&&j.prototype;function m(){var n,o;for(var p=arguments.length,q=Array(p),r=0;r<p;r++)q[r]=arguments[r];return n=(o=k.constructor).call.apply(o,[this].concat(q)),this.$MessengerPhotoViewHeader3=function(){c('MessengerActions').showDialog(c('MessengerPhotoInfoDialogContainer.react'),{photoID:this.props.photoID,showHeader:this.props.showHeader,viewer:this.props.viewer});}.bind(this),this.$MessengerPhotoViewHeader2=function(){return (c('React').createElement(c('MessengerPhotoViewCloseLink.react'),{onClick:this.props.onClose}));}.bind(this),this.$MessengerPhotoViewHeader1=function(){var s;if(!this.props.disableForward)s=c('React').createElement(c('SpotlightViewerBottomBarLink'),{className:"_3c1o _3oo2 _3oon",onClick:this.props.showForwardDialog,ref:'forwardButton'},i._("Forward"));return (c('React').createElement('div',{key:'buttonsContainer',ref:'buttons'},c('React').createElement(c('SpotlightViewerBottomBarLink'),{ajaxify:this.props.url,className:"_3c1o _3ooo _3oon",rel:'async'},i._("Download")),s,c('React').createElement('div',{className:"_3c1k _3oon _3c1o",onClick:this.$MessengerPhotoViewHeader3,ref:'moreInfo'},i._("Info"))));}.bind(this),n;}m.prototype.render=function(){return c('React').createElement('div',{className:"_51an _50-m _3c1i _5l-3",role:'banner'},this.$MessengerPhotoViewHeader1(),this.$MessengerPhotoViewHeader2());};m.propTypes={disableForward:l.bool,onClose:l.func,photoID:l.string,showForwardDialog:l.func,url:l.object,viewer:l.string};f.exports=m;},null);
  __d("XMessagingVideoAttachmentController",["XController"],function a(b,c,d,e,f,g){c.__markCompiled&&c.__markCompiled();f.exports=c("XController").create("\/mercury\/attachments\/video\/",{video_id:{type:"String",required:true},video_container_id:{type:"String",required:true},width:{type:"Int",required:true},height:{type:"Int",required:true}});},null);
  __d('MessengerVideoPlayer.react',['cx','AsyncRequest','MessengerSpinner.react','React','XMessagingVideoAttachmentController','guid'],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:'MessengerVideoPlayer',_domID:String,propTypes:{videoData:i.object},shouldComponentUpdate:function(k){return !this.props.videoData||k.videoData.id!==this.props.videoData.id;},componentWillMount:function(){this._domID=c('guid')();},render:function(){if(!this.props.videoData)return null;this._loadVideoPlayer();return (c('React').createElement('div',{className:"_4-od _51an",id:this._domID},c('React').createElement(c('MessengerSpinner.react'),{color:'blue',ref:'spinner',size:c('MessengerSpinner.react').Sizes.LARGE})));},_loadVideoPlayer:function(){var k=this.props.videoData;if(k){var l=c('XMessagingVideoAttachmentController').getURIBuilder().setString('video_id',k.legacy_attachment_id).setString('video_container_id',this._domID).setInt('width',k.original_dimensions.x).setInt('height',k.original_dimensions.y).getURI();new (c('AsyncRequest'))().setMethod('GET').setStatusElement(this.refs.spinner).setURI(l).setReadOnly(true).setHandler(function(m){}).send();}}});f.exports=j;},null);
  __d('SpotlightMessagesViewerPagers.react',['cx','LeftRight.react','Link.react','React'],function a(b,c,d,e,f,g,h){'use strict';if(c.__markCompiled)c.__markCompiled();var i=function(j){return (c('React').createElement(c('LeftRight.react'),null,c('React').createElement(c('Link.react'),{className:"_4-oa _2bbb _50-m"}),c('React').createElement(c('Link.react'),{className:"_4-oa _2bbc _50-m"})));};f.exports=i;},null);
  __d("XMessagingPhotoDownloadController",["XController"],function a(b,c,d,e,f,g){c.__markCompiled&&c.__markCompiled();f.exports=c("XController").create("\/mercury\/attachments\/photo\/",{photo_id:{type:"String",required:true}});},null);
  __d('SpotlightMessagesViewer2',['cx','fbt','ActorURI','ArbiterMixin','CurrentEnvironment','KeyEventController','MessagingForwardAttachmentDialog.react','MessagingForwardingButtonNUX.react','MessengerForwardAttachmentDialog.react','MessengerPhotoViewBottomBar.react','MessengerPhotoViewBottomScrollable.react','MessengerPhotoViewHeader.react','MessengerVideoPlayer.react','React','ReactDOM','ReactFragment','Relay','RelayQL','SpotlightViewer','SpotlightViewerAutoResize','SpotlightViewerBehaviorsMixin','SpotlightViewerDimensionMixin','SpotlightViewerImage','SpotlightMessagesViewerPagers.react','SpotlightViewerThumbnailMixin','SpotlightViewport','SubscriptionsHandler','XMessagingPhotoDownloadController'],function a(b,c,d,e,f,g,h,i){'use strict';if(c.__markCompiled)c.__markCompiled();var j=c('React').createClass({displayName:'SpotlightMessagesViewer2',_subscriptions:c('SubscriptionsHandler'),mixins:[c('ArbiterMixin'),c('SpotlightViewerBehaviorsMixin'),c('SpotlightViewerDimensionMixin'),c('SpotlightViewerThumbnailMixin')],behaviors:[c('SpotlightViewerAutoResize')],componentWillUnmount:function(){this._subscriptions&&this._subscriptions.release();this._subscriptions=null;},componentWillReceiveProps:function(k){if(k.photoID!==this.props.photoID)this.setState({open:k.open,photoData:k.fullMedia,photoID:k.photoID});},componentDidMount:function(){this.setState({photoData:this.props.fullMedia,photoID:this.props.photoID,width:c('ReactDOM').findDOMNode(this.refs.photoviewheader).offsetWidth});},getInitialState:function(){this._enableKeyEvents();return {isLoadingImage:false,open:true,photoData:null,photoID:'',showForward:false,width:900};},getIndex:function(){var k=this.props.sharedPhotos.edges,l=k.find(function(m){var n=m.node;return n.id===this.state.photoID;}.bind(this));if(!l)return -1;return k.indexOf(l);},getLegacyID:function(){var k=this.props.sharedPhotos.edges,l=k.find(function(m){var n=m.node;return n.id===this.state.photoID;}.bind(this));if(!l)return '';return l.node.legacy_attachment_id;},close:function(){if(!this._isOpen())return;this.setState({open:false},function(){return this.inform('close');}.bind(this));this.props.onClosePhotoView();},renderLayers:function(){if(this.props.disableForward)return null;var k=i._("Forward in separate messages"),l=c('CurrentEnvironment').messengerdotcom?c('MessengerForwardAttachmentDialog.react'):c('MessagingForwardAttachmentDialog.react');return c('ReactFragment').create({forwardDialog:c('React').createElement(l,{attachmentID:String(this.getLegacyID()),onClose:this._hideForwardDialog,shown:this.state.showForward,title:k}),forwardButtonNUX:c('React').createElement(c('MessagingForwardingButtonNUX.react'),{contextRef:function(){return this.refs.forwardButton;}.bind(this),ref:'forwardNUX'},i._("Send this image to other people in separate messages."))});},render:function(){var k=this.getMedia(),l=this.getStageDimensions(),m=this.state.isLoadingImages||this.props.useloadingindicator&&!this.state.photoData,n=c('React').createElement('div',null,this._renderTopBar(),this.props.disablepaging?null:c('React').createElement(c('SpotlightMessagesViewerPagers.react'),null),this._renderBottomSection());return (c('React').createElement('span',null,c('React').createElement(c('SpotlightViewer'),{className:"_53vs",onHide:this.close,open:this.state.open,ref:'spotlightViewer',rootClassName:this.props.rootClassName},c('React').createElement(c('SpotlightViewport'),{active:false,media:k,onClick:this._handleClickViewport,ref:'viewport',showLoadingIndicator:m,stageDimensions:l,useWidth:true},n)),this.renderLayers()));},_renderTopBar:function(){var k=c('XMessagingPhotoDownloadController').getURIBuilder().setString('photo_id',String(this.getLegacyID())).getURI();if(this.props.actorid)k=c('ActorURI').create(k,this.props.actorid);return (c('React').createElement(c('MessengerPhotoViewHeader.react'),{ref:'photoviewheader',disableForward:this.props.disableForward,onClose:this.props.onCloseSharedPhotos,photoID:this.props.photoID,url:k,showForwardDialog:this._showForwardDialog,showHeader:this._showHeader}));},_renderBottomSection:function(){return (c('React').createElement(c('MessengerPhotoViewBottomBar.react'),null,c('React').createElement(c('MessengerPhotoViewBottomScrollable.react'),{fetchMore:this.props.fetchMore,isLoadingImages:this.props.isLoadingImages,onScroll:this._scrollPhotoStrip,photoID:this.state.photoID,sharedPhotos:this.props.sharedPhotos,width:this.state.width}),c('React').createElement('div',{className:"_2n5a",onClick:this.props.openAlbum},c('React').createElement('div',{className:"_2n5b"}))));},_enableKeyEvents:function(){this._subscriptions=new (c('SubscriptionsHandler'))();this._subscriptions.addSubscriptions(c('KeyEventController').registerKey('LEFT',function(){this._handleClickViewport(false);return false;}.bind(this)),c('KeyEventController').registerKey('RIGHT',function(){this._handleClickViewport(true);return false;}.bind(this)));},_getVideo:function(){return c('React').createElement(c('MessengerVideoPlayer.react'),{videoData:this.state.photoData});},_getMedia:function(k,l){return (c('React').createElement(c('SpotlightViewerImage'),{dimensions:l.imageDimensions,ref:'image',src:k.uri}));},_showForwardDialog:function(){this.setState({showForward:true});this.refs.forwardNUX.close();},_hideForwardDialog:function(){this.setState({showForward:false});this._showHeader();},_showHeader:function(){this.refs.viewport.makeActive();},_isOpen:function(){return this.state.open;},_scrollPhotoStrip:function(k){this.setState({photoID:k},function(){this.props.loadImage(this.state.photoID);}.bind(this));},_handleClickViewport:function(k){var l,m=this,n=this.getIndex(),o=k?n+1:n-1;if(o>=this.props.sharedPhotos.edges.length)o=0;if(o>=0)(function(){var p=m.props.sharedPhotos.edges[o].node.id;m.setState({photoID:p},function(){this.props.loadImage(this.state.photoID);if(k)this.props.fetchMore(p);}.bind(m));})();}});f.exports=c('Relay').createContainer(j,{fragments:{fullMedia:function(k){return function(){return {children:[{fieldName:'__typename',kind:'Field',metadata:{isRequisite:true},type:'String'},{fieldName:'id',kind:'Field',metadata:{isGenerated:true,isRequisite:true},type:'ID'},{children:[{fieldName:'id',kind:'Field',metadata:{isRequisite:true},type:'ID'},{fieldName:'legacy_attachment_id',kind:'Field',metadata:{},type:'ID'},{alias:'image1',calls:[{kind:'Call',metadata:{},name:'width',value:{kind:'CallValue',callValue:960}},{kind:'Call',metadata:{},name:'height',value:{kind:'CallValue',callValue:960}}],children:[{fieldName:'width',kind:'Field',metadata:{},type:'Int'},{fieldName:'height',kind:'Field',metadata:{},type:'Int'},{fieldName:'uri',kind:'Field',metadata:{},type:'Url'}],fieldName:'image',kind:'Field',metadata:{canHaveSubselections:true},type:'Image'},{alias:'image2',calls:[{kind:'Call',metadata:{},name:'width',value:{kind:'CallValue',callValue:2048}},{kind:'Call',metadata:{},name:'height',value:{kind:'CallValue',callValue:2048}}],children:[{fieldName:'width',kind:'Field',metadata:{},type:'Int'},{fieldName:'height',kind:'Field',metadata:{},type:'Int'},{fieldName:'uri',kind:'Field',metadata:{},type:'Url'}],fieldName:'image',kind:'Field',metadata:{canHaveSubselections:true},type:'Image'}],id:c('RelayQL').__id(),kind:'Fragment',metadata:{},name:'MessageImage',type:'MessageImage'},{children:[{fieldName:'id',kind:'Field',metadata:{isRequisite:true},type:'ID'},{fieldName:'legacy_attachment_id',kind:'Field',metadata:{},type:'ID'},{alias:'image1',calls:[{kind:'Call',metadata:{},name:'width',value:{kind:'CallValue',callValue:960}},{kind:'Call',metadata:{},name:'height',value:{kind:'CallValue',callValue:960}}],children:[{fieldName:'width',kind:'Field',metadata:{},type:'Int'},{fieldName:'height',kind:'Field',metadata:{},type:'Int'},{fieldName:'uri',kind:'Field',metadata:{},type:'Url'}],fieldName:'image',kind:'Field',metadata:{canHaveSubselections:true},type:'Image'},{alias:'image2',calls:[{kind:'Call',metadata:{},name:'width',value:{kind:'CallValue',callValue:2048}},{kind:'Call',metadata:{},name:'height',value:{kind:'CallValue',callValue:2048}}],children:[{fieldName:'width',kind:'Field',metadata:{},type:'Int'},{fieldName:'height',kind:'Field',metadata:{},type:'Int'},{fieldName:'uri',kind:'Field',metadata:{},type:'Url'}],fieldName:'image',kind:'Field',metadata:{canHaveSubselections:true},type:'Image'},{children:[{fieldName:'x',kind:'Field',metadata:{},type:'Float'},{fieldName:'y',kind:'Field',metadata:{},type:'Float'}],fieldName:'original_dimensions',kind:'Field',metadata:{canHaveSubselections:true},type:'Vect2'},{fieldName:'url',kind:'Field',metadata:{},type:'Url'},{children:[{fieldName:'id',kind:'Field',metadata:{isRequisite:true},type:'ID'},{fieldName:'__typename',kind:'Field',metadata:{isGenerated:true,isRequisite:true},type:'String'}],fieldName:'creator',kind:'Field',metadata:{canHaveSubselections:true,inferredRootCallName:'node',inferredPrimaryKey:'id',isAbstract:true},type:'Actor'}],id:c('RelayQL').__id(),kind:'Fragment',metadata:{},name:'MessageVideo',type:'MessageVideo'}],id:c('RelayQL').__id(),kind:'Fragment',metadata:{isAbstract:true},name:'SpotlightMessagesViewer__FullMediaRelayQL',type:'Node'};}();}}});},null);
  __d('MessengerThreadSharedPhotos2.react',['cx','MercuryConfig','MessengerSharedPhotosAlbumView.react','React','SpotlightViewer','SpotlightMessagesViewer2'],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(){var m,n;for(var o=arguments.length,p=Array(o),q=0;q<o;q++)p[q]=arguments[q];return m=(n=j.constructor).call.apply(n,[this].concat(p)),this.state={photoView:this.props.findID,albumView:false,isLoadingImages:false,fullMedia:this.props.fullMedia},this.$MessengerThreadSharedPhotos21=function(){this.setState({albumView:this.state.photoView,photoView:null,fullMedia:null});}.bind(this),this.$MessengerThreadSharedPhotos22=function(){this.setState({albumView:null});}.bind(this),this.$MessengerThreadSharedPhotos23=function(r){var s=this.props.sharedPhotos.edges,t=s.find(function(u){var v=u.node;return v.id===r;});this.setState({albumView:null,photoView:r,fullMedia:t.node});}.bind(this),this.$MessengerThreadSharedPhotos24=function(){this.setState({photoView:null,fullMedia:null});}.bind(this),this.$MessengerThreadSharedPhotos26=function(r){var s=this.props.sharedPhotos.edges,t=s.find(function(u){var v=u.node;return v.id===r;});this.setState({photoView:r,fullMedia:t.node});}.bind(this),m;}l.prototype.componentDidMount=function(){this.props.fetchMorePhotos(this.props.findID);};l.prototype.$MessengerThreadSharedPhotos25=function(){var m=this.props.sharedPhotos;return c('React').createElement(c('SpotlightMessagesViewer2'),{disablepaging:m.edges.length===1,fetchMore:this.props.fetchMorePhotos,fullMedia:this.state.fullMedia,isLoadingImages:this.props.isLoadingImages,loadImage:this.$MessengerThreadSharedPhotos26,onClosePhotoView:this.$MessengerThreadSharedPhotos24,onCloseSharedPhotos:this.props.onCloseSharedPhotos,open:true,openAlbum:this.$MessengerThreadSharedPhotos21,photoID:this.state.photoView,reverse:false,sharedPhotos:m,snapToPhoto:true,thumbsrc:this.props.uri});};l.prototype.$MessengerThreadSharedPhotos27=function(){return c('React').createElement(c('SpotlightViewer'),{className:"_3ode",onHide:this.$MessengerThreadSharedPhotos22,open:true,ref:'spotlightViewer'},c('React').createElement(c('MessengerSharedPhotosAlbumView.react'),{allPhotosDisplayed:true,fetchMore:this.props.fetchMoreAlbum,isLoadingImages:this.props.isLoadingImages,onClick:this.$MessengerThreadSharedPhotos23,onCloseSharedPhotos:this.props.onCloseSharedPhotos,sharedPhotos:this.props.sharedPhotos,totalCount:this.props.totalCount,viewedPhoto:this.state.albumView}));};l.prototype.render=function(){var m=c('MercuryConfig').SharedPhotoNewView&&this.state.photoView?this.$MessengerThreadSharedPhotos25():null,n=c('MercuryConfig').SharedPhotoNewView&&this.state.albumView?this.$MessengerThreadSharedPhotos27():null;return (c('React').createElement('div',null,n,m));};l.propTypes={disablepaging:k.bool,fullMedia:k.object,fetchMoreAlbum:k.func,fetchMorePhotos:k.func,findID:k.string,findFBID:k.string,isLoadingImages:k.bool,loadImage:k.func,onCloseSharedPhotos:k.func,openSharedPhotos:k.func,sharedPhotos:k.object,totalCount:k.number,uri:k.string};f.exports=l;},null);
  __d('MessengerThreadSharedPhotosContainer.react',['MessengerThreadSharedPhotos2.react','React','Relay','RelayQL','SpotlightMessagesViewer2','Vector'],function a(b,c,d,e,f,g){'use strict';var h,i;if(c.__markCompiled)c.__markCompiled();var j=c('React').PropTypes,k=80,l=10;h=babelHelpers.inherits(m,c('React').Component);i=h&&h.prototype;function m(){var n,o;for(var p=arguments.length,q=Array(p),r=0;r<p;r++)q[r]=arguments[r];return n=(o=i.constructor).call.apply(o,[this].concat(q)),this.state={isLoadingImages:false},this.$MessengerThreadSharedPhotosContainer3=function(s){var t=c('Vector').getViewportDimensions().x,u=this.props.sharedPhotos.message_shared_photo_and_video.edges,v=u.length,w=u.find(function(aa){var ba=aa.node;return ba.id===s;});if(!w)return;var x=u.indexOf(w),y=(v-x)*k;if(y>t/2)return;var z=Math.ceil((t/2-y)/k);if(!this.state.isLoadingImages)this.$MessengerThreadSharedPhotosContainer2(z);}.bind(this),this.$MessengerThreadSharedPhotosContainer2=function(s){this.setState({isLoadingImages:true},function(){this.props.relay.setVariables({count:this.props.relay.variables.count+s},function(t){if(t.done||t.aborted)this.setState({isLoadingImages:false});}.bind(this));}.bind(this));}.bind(this),n;}m.prototype.componentDidMount=function(){this.$MessengerThreadSharedPhotosContainer1();};m.prototype.componentDidUpdate=function(){this.$MessengerThreadSharedPhotosContainer1();};m.prototype.$MessengerThreadSharedPhotosContainer1=function(){var n=this.props.sharedPhotos.message_shared_photo_and_video.edges,o=n.find(function(q){var r=q.node;return r.legacy_attachment_id==this.props.findID;}.bind(this)),p=this.props.relay.variables.count;if(!o&&!this.state.isLoadingImages&&p<this.props.totalCount)this.$MessengerThreadSharedPhotosContainer2(l);};m.prototype.render=function(){var n=this.props.sharedPhotos.message_shared_photo_and_video.edges,o=n.find(function(p){var q=p.node;return q.legacy_attachment_id==this.props.findID;}.bind(this));if(!o)return null;return c('React').createElement(c('MessengerThreadSharedPhotos2.react'),{disablepaging:this.props.totalCount==1,fullMedia:o.node,fetchMorePhotos:this.$MessengerThreadSharedPhotosContainer3,fetchMoreAlbum:this.$MessengerThreadSharedPhotosContainer2,findID:o.node.id,findFBID:o.node.legacy_attachment_id,isLoadingImages:this.state.isLoadingImages,loadImage:this.props.loadImage,onCloseSharedPhotos:this.props.onCloseSharedPhotos,openSharedPhotos:this.props.openSharedPhotos,sharedPhotos:this.props.sharedPhotos.message_shared_photo_and_video,totalCount:this.props.totalCount,uri:o.node.image.uri});};m.propsTypes={findID:j.string,loadImage:j.func,onCloseSharedPhotos:j.func,openSharedPhotos:j.func,relay:j.object,sharedPhotos:j.object,totalCount:j.number};f.exports=c('Relay').createContainer(m,{initialVariables:{count:l},fragments:{sharedPhotos:function(){return function(n){return {children:[{calls:[{kind:'Call',metadata:{},name:'first',value:{kind:'CallVariable',callVariableName:'count'}}],children:[{children:[{children:[].concat.apply([],[{fieldName:'__typename',kind:'Field',metadata:{isGenerated:true,isRequisite:true},type:'String'},{children:[{fieldName:'id',kind:'Field',metadata:{isRequisite:true},type:'ID'},{fieldName:'legacy_attachment_id',kind:'Field',metadata:{},type:'ID'},{children:[{fieldName:'uri',kind:'Field',metadata:{},type:'Url'}],fieldName:'image',kind:'Field',metadata:{canHaveSubselections:true},type:'Image'}],id:c('RelayQL').__id(),kind:'Fragment',metadata:{},name:'MessageImage',type:'MessageImage'},{children:[{fieldName:'id',kind:'Field',metadata:{isRequisite:true},type:'ID'},{fieldName:'legacy_attachment_id',kind:'Field',metadata:{},type:'ID'},{children:[{fieldName:'uri',kind:'Field',metadata:{},type:'Url'}],fieldName:'image',kind:'Field',metadata:{canHaveSubselections:true},type:'Image'}],id:c('RelayQL').__id(),kind:'Fragment',metadata:{},name:'MessageVideo',type:'MessageVideo'},c('RelayQL').__frag(n),{children:[{fieldName:'id',kind:'Field',metadata:{isGenerated:true,isRequisite:true},type:'ID'},{fieldName:'__typename',kind:'Field',metadata:{isGenerated:true,isRequisite:true},type:'String'}],id:c('RelayQL').__id(),kind:'Fragment',metadata:{isAbstract:true},name:'IdFragment',type:'Node'}]),fieldName:'node',kind:'Field',metadata:{canHaveSubselections:true,inferredRootCallName:'node',inferredPrimaryKey:'id',isAbstract:true,isRequisite:true},type:'MessageSharedPhotoAndVideo'},{fieldName:'cursor',kind:'Field',metadata:{isGenerated:true,isRequisite:true},type:'ID'}],fieldName:'edges',kind:'Field',metadata:{canHaveSubselections:true,isPlural:true},type:'MessageSharedPhotoAndVideoEdge'},{children:[{fieldName:'has_next_page',kind:'Field',metadata:{isGenerated:true,isRequisite:true},type:'Boolean'},{fieldName:'has_previous_page',kind:'Field',metadata:{isGenerated:true,isRequisite:true},type:'Boolean'}],fieldName:'page_info',kind:'Field',metadata:{canHaveSubselections:true,isGenerated:true,isRequisite:true},type:'PageInfo'}],fieldName:'message_shared_photo_and_video',kind:'Field',metadata:{canHaveSubselections:true,isConnection:true,isFindable:true},type:'MessageSharedPhotoAndVideoConnection'},{fieldName:'id',kind:'Field',metadata:{isGenerated:true,isRequisite:true},type:'ID'}],id:c('RelayQL').__id(),kind:'Fragment',metadata:{},name:'MessengerThreadSharedPhotosContainer_react_SharedPhotosRelayQL',type:'MessageThread'};}(c('SpotlightMessagesViewer2').getFragment('fullMedia'));}}});},null);
  __d('MessengerVideo.react',['cx','ix','Image.react','MessengerPhoto.react','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('React').PropTypes;j=babelHelpers.inherits(m,c('React').PureComponent);k=j&&j.prototype;function m(){var n,o;for(var p=arguments.length,q=Array(p),r=0;r<p;r++)q[r]=arguments[r];return n=(o=k.constructor).call.apply(o,[this].concat(q)),this.$MessengerVideo1=function(){var s=void 0;if(!!this.props.attachment.metadata){s=this.props.attachment.metadata.duration;}else if(!!this.props.attachment.media)s=this.props.attachment.media.duration;return !!s?this.$MessengerVideo2(s):null;}.bind(this),this.$MessengerVideo2=function(s){var t=s%60;return Math.floor(s/60)+':'+(t<10?'0':'')+t;},n;}m.prototype.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.$MessengerVideo1()));};m.propTypes={attachment:l.object.isRequired,isSingle:l.bool.isRequired,onClick:l.func};f.exports=m;},null);
  __d('MessengerPhotosGroup.react',['cx','ChatSpeakingSticker.react','MercuryAttachmentType','MercuryConfig','MercuryIDs','MessagingGiftWrap.react','MessagingFlowerBorder.react','MessengerAttachmentViewer','MessengerPhoto.react','MessengerSharedPhotosContainerRoute','MessengerVideo.react','MessagesViewerSetID','React','RelayRootContainer','MessengerThreadSharedPhotosContainer.react','URI','Vector','joinClasses'],function a(b,c,d,e,f,g,h){'use strict';var i,j;if(c.__markCompiled)c.__markCompiled();var k='empty-spacer',l=c('React').PropTypes;i=babelHelpers.inherits(m,c('React').PureComponent);j=i&&i.prototype;function m(){var n,o;for(var p=arguments.length,q=Array(p),r=0;r<p;r++)q[r]=arguments[r];return n=(o=j.constructor).call.apply(o,[this].concat(q)),this.state={findID:null},this.$MessengerPhotosGroup4=function(s){this.setState({findID:s});}.bind(this),this.$MessengerPhotosGroup5=function(){this.setState({findID:null});}.bind(this),this.$MessengerPhotosGroup6=function(s){if(s.preview_uploading)return;if(s.attach_type===c('MercuryAttachmentType').VIDEO){c('MessengerAttachmentViewer').renderVideo({pageID:s.metadata.pageid,rootClassName:"_1j1h",videoID:s.metadata.fbid,videoSize:new (c('Vector'))(s.metadata.dimensions.width,s.metadata.dimensions.height),videoURI:s.url});}else if(s.attach_type===c('MercuryAttachmentType').PHOTO||s.attach_type===c('MercuryAttachmentType').THIRDPARTYSTICKER||s.attach_type===c('MercuryAttachmentType').ANIMATED_IMAGE){var t=this.props.attachments.length===1,u=s.url,v=null;if(!this.props.isXMA&&s.attach_type===c('MercuryAttachmentType').PHOTO&&this.props.count){var w=this.props.count,x=this.props.message,y=x&&x.thread_fbid;if(x&&!y)y=c('MercuryIDs').getThreadFBIDFromThreadID(x.thread_id);t=w===1;u=new (c('URI'))('/ajax/messaging/attachments/sharedphotos.php').setQueryData({thread_id:y,image_id:s.metadata.fbid});v=c('MessagesViewerSetID').MESSAGES_VIEW_ALL_IN_THREAD;}c('MessengerAttachmentViewer').bootstrapWithConfig({actorid:s.metadata.pageid,dimensions:s.metadata.dimensions,disableForward:!!s.metadata.pageid,disablePaging:t,endpoint:u,fbid:s.metadata.fbid,rootClassName:"_1j1h",setID:v,snapToPhoto:true,src:s.preview_url});}else if(s.uri)window.open(s.uri);}.bind(this),this.$MessengerPhotosGroup1=function(s){if(s.length===1)return [this.$MessengerPhotosGroup7(s[0],true)];var t=3;if(s.length===2||s.length===4)t=2;var u=[];for(var v=0,w=s.length;v<w;v+=t){var x=s.slice(v,v+t),y=t-x.length;while(y>0){x.push({attach_type:k,key:'ghost'+y});y--;}u.push(c('React').createElement('div',{className:"_2n8g",key:v},x.map(function(z){return this.$MessengerPhotosGroup7(z);}.bind(this))));}return u;}.bind(this),this.$MessengerPhotosGroup7=function(s,t){var u=void 0;if(s.deduplication_key){u=s.deduplication_key;}else if(s.metadata){u=s.metadata.fbid;}else u=s.upload_id;var v={attachment:s,isSingle:t||false,key:u,onAttachmentLoad:this.props.onAttachmentLoad,onClick:c('MercuryConfig').SharedPhotoNewView?this.$MessengerPhotosGroup4:this.$MessengerPhotosGroup6},w=this.props.attachType||s.attach_type;switch(w){case c('MercuryAttachmentType').PHOTO:case c('MercuryAttachmentType').ANIMATED_IMAGE:case c('MercuryAttachmentType').THIRDPARTYSTICKER:return c('React').createElement(c('MessengerPhoto.react'),v);case c('MercuryAttachmentType').VIDEO:if(s.metadata&&s.metadata.render_as_sticker)return (c('React').createElement(c('ChatSpeakingSticker.react'),{videoSize:s.metadata.dimensions,videoURI:s.url}));return c('React').createElement(c('MessengerVideo.react'),v);case k:return (c('React').createElement('div',{key:s.key,className:"_4tsk _4rf-"}));default:throw s.attachType+' is not handled by MessengerPhotoGroup';}}.bind(this),this.$MessengerPhotosGroup3=function(s){var t=s.length===2||s.length===4;return c('joinClasses')(this.props.className,"_2n8h"+(s.length===1?' '+"_2n8i":'')+(t?' '+"_4ksk":'')+(s.length>1&&!t?' '+"_2n8k":''));}.bind(this),n;}m.prototype.componentDidMount=function(){c('MessengerAttachmentViewer').preload();};m.prototype.render=function(){var n=this.props.attachments,o=this.$MessengerPhotosGroup1(n);if(this.props.isGiftWrapped)o=c('React').createElement('div',null,o);var p=c('MercuryConfig').SharedPhotoNewView&&this.state.findID?this.$MessengerPhotosGroup2():null;return c('React').createElement('div',babelHelpers['extends']({},this.props,{className:this.$MessengerPhotosGroup3(n)}),p,o,this.props.isGiftWrapped?c('React').createElement(c('MessagingGiftWrap.react'),{onUnwrap:this.props.onUnwrap}):null,this.props.hasFlowerBorder?c('React').createElement(c('MessagingFlowerBorder.react'),{offset:-10}):null);};m.prototype.$MessengerPhotosGroup2=function(){var n=this.props.message,o=n&&n.thread_fbid;if(n&&!o)o=c('MercuryIDs').getThreadFBIDFromThreadID(n.thread_id);var p=new (c('MessengerSharedPhotosContainerRoute'))({threadFBID:o});return c('React').createElement(c('RelayRootContainer'),{Component:c('MessengerThreadSharedPhotosContainer.react'),route:p,renderFetched:function(q){return c('React').createElement(c('MessengerThreadSharedPhotosContainer.react'),babelHelpers['extends']({},q,{findID:this.state.findID,onCloseSharedPhotos:this.$MessengerPhotosGroup5,openSharedPhotos:this.$MessengerPhotosGroup4,loadImage:this.$MessengerPhotosGroup4,totalCount:this.props.count}));}.bind(this)});};m.propTypes={attachments:l.arrayOf(l.object).isRequired,attachType:l.string,count:l.number,hasFlowerBorder:l.bool,isGiftWrapped:l.bool,isXMA:l.bool,message:l.object,onAttachmentLoad:l.func,onUnwrap:l.func};f.exports=m;},null);
  __d('MessengerPhotosGroupContainer.react',['MercuryConfig','MessengerPhotosGroup.react','React','Relay','RelayQL'],function a(b,c,d,e,f,g){'use strict';var h,i;if(c.__markCompiled)c.__markCompiled();var j=c('React').PropTypes,k=10;h=babelHelpers.inherits(l,c('React').Component);i=h&&h.prototype;l.prototype.render=function(){var m=this.props,n=m.message,o=m.onAttachmentLoad,p=m.sharedPhotos;if(!n||!n.thread_fbid&&!n.thread_id||!p)return null;var q=c('MercuryConfig').SharedPhotoNewView?p.message_shared_photo_and_video:p.message_images;if((!q.page_info||!q.page_info.has_next_page)&&q.count===0)return (c('React').createElement(c('MessengerPhotosGroup.react'),{attachments:this.props.attachments,attachType:this.props.attachType,count:q.count,hasFlowerBorder:this.props.hasFlowerBorder,isGiftWrapped:this.props.isGiftWrapped,message:n,onAttachmentLoad:o,onUnwrap:this.props.onUnwrap}));return (c('React').createElement(c('MessengerPhotosGroup.react'),{attachments:this.props.attachments,attachType:this.props.attachType,count:q.count,hasFlowerBorder:this.props.hasFlowerBorder,isGiftWrapped:this.props.isGiftWrapped,message:n,onAttachmentLoad:o,onUnwrap:this.props.onUnwrap}));};function l(){h.apply(this,arguments);}l.propTypes={attachments:j.arrayOf(j.object).isRequired,attachType:j.string,hasFlowerBorder:j.bool,isGiftWrapped:j.bool,message:j.object,onAttachmentLoad:j.func,onUnwrap:j.func,sharedPhotos:j.object};f.exports=c('Relay').createContainer(l,{initialVariables:{count:k,newViewGK:false},fragments:{sharedPhotos:function(m){return function(){return {children:[{calls:[{kind:'Call',metadata:{},name:'first',value:{kind:'CallVariable',callVariableName:'count'}}],children:[{children:[{fieldName:'has_next_page',kind:'Field',metadata:{isRequisite:true},type:'Boolean'},{fieldName:'has_previous_page',kind:'Field',metadata:{isGenerated:true,isRequisite:true},type:'Boolean'}],fieldName:'page_info',kind:'Field',metadata:{canHaveSubselections:true},type:'PageInfo'},{fieldName:'count',kind:'Field',metadata:{},type:'Int'}],directives:[{kind:'Directive',name:'skip',args:[{name:'if',value:{kind:'CallVariable',callVariableName:'newViewGK'}}]}],fieldName:'message_images',kind:'Field',metadata:{canHaveSubselections:true,isConnection:true,isFindable:true},type:'MessageImagesConnection'},{calls:[{kind:'Call',metadata:{},name:'first',value:{kind:'CallVariable',callVariableName:'count'}}],children:[{children:[{fieldName:'has_next_page',kind:'Field',metadata:{isRequisite:true},type:'Boolean'},{fieldName:'has_previous_page',kind:'Field',metadata:{isGenerated:true,isRequisite:true},type:'Boolean'}],fieldName:'page_info',kind:'Field',metadata:{canHaveSubselections:true},type:'PageInfo'},{fieldName:'count',kind:'Field',metadata:{},type:'Int'}],directives:[{kind:'Directive',name:'include',args:[{name:'if',value:{kind:'CallVariable',callVariableName:'newViewGK'}}]}],fieldName:'message_shared_photo_and_video',kind:'Field',metadata:{canHaveSubselections:true,isConnection:true,isFindable:true},type:'MessageSharedPhotoAndVideoConnection'},{fieldName:'id',kind:'Field',metadata:{isGenerated:true,isRequisite:true},type:'ID'}],id:c('RelayQL').__id(),kind:'Fragment',metadata:{},name:'MessengerPhotosGroupContainer_react_SharedPhotosRelayQL',type:'MessageThread'};}();}}});},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','MessagingFlowerBorder.react','React','messengerCustomColorUtils'],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').PureComponent);j=i&&i.prototype;l.prototype.render=function(){var m=this.props.attachment,n=m.metadata.duration/1000,o=!!m.app_attribution,p={};if(this.props.customColor)p=c('messengerCustomColorUtils').customBubbleStyle(this.props.customColor,p);var q=this.props.isGiftWrapped?c('React').createElement(c('MessagingGiftWrap.react'),{onUnwrap:this.props.onUnwrap}):null,r=this.props.hasFlowerBorder?c('React').createElement(c('MessagingFlowerBorder.react'),{offset:-10}):null;return (c('React').createElement('div',{className:"_hh7"+(' '+"_s1-")+(!!this.props.customColor?' '+"_5sxi":'')+(!o?' '+"_52mr":'')+(o?' '+"_mxz":'')+(' '+"_1fz8")+(o?' '+"_1-wa":'')+(' '+"_1nqp"),style:p},c('React').createElement(c('MercuryAttachmentAudioClip.react'),{src:m.url,duration:n,key:'audio:'+this.props.message.message_id,showHelp:false,width:200,location:c('MercuryShareAttachmentRenderLocations').MESSENGER,rootClassName:"_3czg"+(o?' '+"_4yjw":'')+(' '+"_2poz")+(' '+"_ui9")}),q,r));};function l(){i.apply(this,arguments);}l.propTypes={attachment:k.object.isRequired,customColor:k.string,isGiftWrapped:k.bool,message:k.object.isRequired,onUnwrap:k.func};f.exports=l;},null);
  __d('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','EmojiLikeCxData','EmojiLikeUtils','EmojiSticker.react','MercuryAttachment','MercuryAttachmentType','MercuryAudioType','MercuryConfig','MercuryIDs','MercuryShareAttachment.react','MercuryShareAttachmentRenderLocations','MessagingFlowerBorder.react','MessagingFlowerBorderChecker','MessagingGiftWrap.react','MessagingGiftWrapChecker','MessengerErrorAttachment.react','MessengerFileAttachment.react','MessengerFromViewerUtils','MessengerHotLikePreview.react','MessengerHotLikeUtils','MessengerPhotosGroup.react','MessengerPhotosGroupContainer.react','MessengerSharedPhotosContainerRoute','MessengerStickerUtils','MessengerVoiceClipAttachment.react','React','RelayRootContainer','Set','Sticker.react','StickerAssetType','StickerConstants','StickerImages','StickerInterfaces','StickersActions','StickersStoreController','StickersPackInTray','StickerUtils','StoryAttachmentStyle','XStickerAssetController','isRetina','wrapNullableForReact'],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='photos_container:',n='share:',o=function(q){return q===Object(q);},p={getAttachmentsInsideBubble:function(q,r){var s=c('MercuryAttachment').get(q).filter(o).filter(function(t){return (!this.attachmentShouldAppearOutsideBubble(t));}.bind(this));return this._getAttachmentComponents(s,q,r);},getAttachmentsOutsideBubble:function(q,r,s,t){var u=c('MercuryAttachment').get(q).filter(o).filter(function(v){return (this.attachmentShouldAppearOutsideBubble(v));}.bind(this));return this._getAttachmentComponents(u,q,r,s,t);},_getAttachmentComponents:function(q,r,s,t,u){var v=this._getPhotosGroup(q.filter(this.isPhotoAttachment),r,s,u),w=q.filter(function(x){return !this.isPhotoAttachment(x);}.bind(this)).map(function(x){return this._getAttachmentComponent(x,r,s,t,u);}.bind(this));if(v)w.push(v);return w;},_getAttachmentComponent:function(q,r,s,t,u){if(c('MessengerStickerUtils').isStickerAttachment(q))return this._getStickerComponent(q,r,t,u);if(this.isEmojiLikeAttachment(q))return this._getEmojiLikeAttachment(q,r,u);if(this.isVoiceClip(q))return this._getVoiceClip(q,r,t,u);if(this.isFileAttchment(q))return this._getFileComponent(q,r);if(this.isP2P(q)||this.isShareAttachment(q))return this._getShareAttachment(q,r,s);if(this.isErrorAttachment(q))return this._getErrorAttachment(q,r);},_getStickerComponent:function(q,r,s,t){if(r.is_like_preview)return this._maybeGiftWrapSticker(c('React').createElement(c('MessengerHotLikePreview.react'),{customColor:s,customLike:r.customLike,key:'hlp:'+r.like_preview_since,since:r.like_preview_since}),r,t);var u=q.metadata;if(!u){u=c('MessengerHotLikeUtils').getMetadataForHotLike(r.sticker_id);if(!u){var v=c('StickerImages').getSticker(r.sticker_id);u=babelHelpers['extends']({},v);var w=c('StickerUtils').getScaledDimensions(v?v.height:c('StickerConstants').THREAD_SIZE,v?v.width:c('StickerConstants').THREAD_SIZE,c('StickerConstants').THREAD_SIZE),x=w.height,y=w.width;u.height=x;u.width=y;}u.stickerID=r.sticker_id;}var z=c('XStickerAssetController').getURIBuilder().setInt('sticker_id',u.stickerID),aa=null,ba=null;if(c('isRetina')()){aa=u.paddedSpriteURI2x;ba=u.spriteURI2x;}else{aa=u.paddedSpriteURI;ba=u.spriteURI;}var ca=u.stickerID.toString(),da=c('React').createElement(c('Sticker.react'),{className:"_2poz"+(' '+"_ui9")+(c('MessagingGiftWrapChecker').shouldRenderWithGiftWrap(r)&&!!c('MessengerHotLikeUtils').getMetadataForHotLike(ca)?' '+"_4ue_":''),animationTrigger:'hover',customColor:s,frameCount:u.frameCount||1,frameRate:u.frameRate||c('StickerConstants').DEFAULT_FRAME_RATE,framesPerCol:u.framesPerCol||1,framesPerRow:u.framesPerRow||1,key:k+r.message_id,onStickerClick:function(ea,fa){c('StickersPackInTray').onIsPackInTray(ea,c('StickerInterfaces').MESSAGES,function(ga){if(ga.in_sticker_tray){c('StickersActions').selectTrayPack(ea);c('StickersActions').showStickerFlyout(r.thread_id);}else c('StickersStoreController').showStore(ea);});},packID:u.packID&&u.packID.toString(),paddedSpriteURI:aa,sourceHeight:u.height,sourceURI:z.setEnum('image_type',c('StickerAssetType').IMAGE).getURI().toString(),sourceWidth:u.width,spriteURI:ba,stickerID:ca});return this._maybeGiftWrapSticker(da,r,t);},_getEmojiLikeAttachment:function(q,r,s){var t=c('MercuryConfig').MessengerNewEmojiGK?c('EmojiLikeCxData').getNewEmojiData(r.body,q.size):null,u=t?t.emoji:undefined;if(!t){var v=c('EmojiLikeUtils').getURI(r.body,q.size);if(!v)return this._getErrorAttachment(q,r);}var w=c('React').createElement(c('EmojiSticker.react'),{className:"_2poz _ui9",key:k+r.message_id,emoji:r.body,emojiImage:u,sourceURI:v?v:''});return this._maybeGiftWrapSticker(w,r,s);},_getShareAttachment:function(q,r,s){var t=null;if(r&&r.platform_xmd)t=JSON.parse(r.platform_xmd);return c('React').createElement(c('MercuryShareAttachment.react'),{attachment:q.share,isSponsored:r.is_sponsored,key:n+r.message_id,location:c('MercuryShareAttachmentRenderLocations').MESSENGER,maxWidth:j,messageID:r.message_id,mnMessageType:t&&t.template_type,onComponentLoaded:s,pageID:r.author,threadID:r.thread_id});},_getVoiceClip:function(q,r,s,t){s=c('MessengerFromViewerUtils').isFromViewer(r)?s||undefined:undefined;return (c('React').createElement(c('MessengerVoiceClipAttachment.react'),{attachment:q,customColor:s,isGiftWrapped:c('MessagingGiftWrapChecker').shouldRenderWithGiftWrap(r),hasFlowerBorder:c('MessagingFlowerBorderChecker').shouldRenderWithFlowerBorder(r),key:'audio:'+r.message_id,message:r,onUnwrap:function(){t&&t();}}));},_getErrorAttachment:function(q,r){return (c('React').createElement(c('MessengerErrorAttachment.react'),{attachment:q,key:'error:'+r.message_id}));},_getPhotosGroup:function(q,r,s,t){if(!q.length)return null;var u=r&&r.thread_fbid;if(r&&!u)u=c('MercuryIDs').isLocalThread(r.thread_id)?null:c('MercuryIDs').getThreadFBIDFromThreadID(r.thread_id);var v=u?new (c('MessengerSharedPhotosContainerRoute'))({newViewGK:c('MercuryConfig').SharedPhotoNewView,threadFBID:u}):null,w=c('MessagingFlowerBorderChecker').shouldRenderWithFlowerBorder(r),x=c('MessagingGiftWrapChecker').shouldRenderWithGiftWrap(r)&&this._rendersWithoutAttribution(q),y=c('React').createElement(c('MessengerPhotosGroup.react'),{attachments:q,className:"_2poz _52mr _ui9",count:q.length,hasFlowerBorder:w,isGiftWrapped:x,key:'photos:'+r.message_id,message:r,onUnwrap:function(){t&&t();}});return (!v||q.length===1&&c('MercuryAttachment').hasAttribution(q[0])||this._hasPagePhotoAttachment(q)||!c('MercuryConfig').MessengerNavigateThreadPhotosGK?y:c('React').createElement(c('RelayRootContainer'),{Component:c('MessengerPhotosGroupContainer.react'),key:m+r.message_id,renderLoading:function(){return y;},route:v,renderFetched:function(z){return (c('React').createElement(c('MessengerPhotosGroupContainer.react'),babelHelpers['extends']({},z,{attachments:q,className:"_2poz _52mr _ui9",hasFlowerBorder:w,isGiftWrapped:x,key:'photos:'+r.message_id,message:r,onUnwrap:function(){t&&t();},onAttachmentLoad:s,threadFBID:u})));}}));},_rendersWithoutAttribution:function(q){return q.length!=1||!c('MercuryAttachment').hasAttribution(q[0]);},_getFileComponent:function(q,r){return (c('React').createElement(c('MessengerFileAttachment.react'),{attachment:q,className:"_2poz",key:'file:'+q.url}));},_hasPagePhotoAttachment:function(q){return q.some(function(r){return (r.metadata&&r.metadata.pageid);});},attachmentShouldAppearOutsideBubble:function(q){return c('MessengerStickerUtils').isStickerAttachment(q)||this.isPhotoAttachment(q)||this.isShareAttachment(q)||this.isP2P(q)||this.isVoiceClip(q)||this.isErrorAttachment(q)||this.isEmojiLikeAttachment(q);},isPhotoAttachment:function(q){return i.has(q.attach_type);},isRenderedPhotosAttachment:function(q){return !!(q.key&&q.key.startsWith(m));},isRenderedShareAttachment:function(q){return !!(q.key&&q.key.startsWith(n));},isFileAttchment:function(q){return q.attach_type===c('MercuryAttachmentType').FILE;},isShareAttachment:function(q){return !!(this._isStoryBased(q)&&!this.isP2P(q)&&(q.share.style_list.indexOf(c('StoryAttachmentStyle').SHARE)>-1||q.share.style_list.indexOf(c('StoryAttachmentStyle').FALLBACK)>-1));},isP2P:function(q){return !!(this._isStoryBased(q)&&q.share.style_list.indexOf(c('StoryAttachmentStyle').ORION)>-1);},_isStoryBased:function(q){return !!(q.attach_type===c('MercuryAttachmentType').SHARE&&q.share&&q.share.style_list);},isEmojiLikeAttachment:function(q){return q.attach_type===c('MercuryAttachmentType').EMOJI_LIKE;},isVoiceClip:function(q){return !!q.metadata&&(q.metadata.type===c('MercuryAudioType').AudioClip||q.metadata.type===c('MercuryAudioType').VoiceMessageWithTranscript);},isVoiceClipAttachment:function(q){var r=c('MercuryAttachment').get(q).filter(o).filter(function(s){return (this.isVoiceClip(s));}.bind(this));return !!r.length;},isP2PAttachment:function(q){var r=c('MercuryAttachment').get(q).filter(function(s){return (o(s)&&this.isP2P(s));}.bind(this));return !!r.length;},isErrorAttachment:function(q){return q.attach_type===c('MercuryAttachmentType').ERROR;},_maybeGiftWrapComponentForMessage:function(q,r,s){var t=c('MessagingGiftWrapChecker').shouldRenderWithGiftWrap(r),u=c('MessagingFlowerBorderChecker').shouldRenderWithFlowerBorder(r);if(!t&&!u)return q;return (c('React').createElement('div',{key:l+r.message_id},q,t?c('React').createElement(c('MessagingGiftWrap.react'),{onUnwrap:c('wrapNullableForReact')(s)}):null,u?c('React').createElement(c('MessagingFlowerBorder.react'),{offset:-10}):null));},_maybeGiftWrapSticker:function(q,r,s){var t=c('MessagingGiftWrapChecker').shouldRenderWithGiftWrap(r),u=c('MessagingFlowerBorderChecker').shouldRenderWithFlowerBorder(r);if(!t&&!u)return q;return (c('React').createElement('div',{key:l+r.message_id},q,t?c('React').createElement(c('MessagingGiftWrap.react'),{isSticker:true,onUnwrap:c('wrapNullableForReact')(s)}):null,u?c('React').createElement(c('MessagingFlowerBorder.react'),{offset:-10}):null));}};f.exports=p;},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','MessagingFlowerBorder.react','MessagingGiftWrap.react','React','joinClasses','messengerCustomColorUtils','shouldNotRenderSegoe'],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').PureComponent);j=i&&i.prototype;function l(){var m,n;for(var o=arguments.length,p=Array(o),q=0;q<o;q++)p[q]=arguments[q];return m=(n=j.constructor).call.apply(n,[this].concat(p)),this.state={emojis:undefined},this.$MessengerBubble1=function(){this.props.onUnwrap&&this.props.onUnwrap();}.bind(this),m;}l.prototype.componentDidMount=function(){if(!this.props.emojis){var m=this.props.body||'',n=c('EmojiLikeUtils').richContent(m);if(n&&n.length)this.setState({emojis:n});}};l.prototype.render=function(){var m={};if(!this.state.emojis&&this.props.customColor)m=c('messengerCustomColorUtils').customBubbleStyle(this.props.customColor,m);if(this.state.emojis){var n=c('EmojiLikeUtils').getSourceURIs(this.state.emojis),o=c('React').createElement(c('EmojiOnlyMessage.react'),{sourceURIs:n});}else o=c('React').createElement(c('MercuryMessageBody.react'),{className:"_3oh-"+(c('shouldNotRenderSegoe')(this.props.body||'')?' '+"_2por":''),body:this.props.body,ranges:this.props.ranges,metaRanges:this.props.metaRanges,threadID:this.props.threadID,customLike:this.props.customLike});var p=this.props.isGiftWrapped?c('React').createElement(c('MessagingGiftWrap.react'),{onUnwrap:this.$MessengerBubble1}):null,q=this.props.hasFlowerBorder?c('React').createElement(c('MessagingFlowerBorder.react'),{offset:-10}):null;return c('React').createElement('div',babelHelpers['extends']({},this.props,{style:m,className:c('joinClasses')(this.props.className,"_hh7"+(' '+"_s1-")+(' '+"_52mr")+(this.props.isP2PAttachment?' '+"_4z55":'')+(!!this.state.emojis?' '+"_2f5r":'')+(!!this.state.emojis?' '+"_581a":''))}),o,this.props.attachments,p,q);};l.propTypes={attachments:k.instanceOf(c('immutable').List),body:k.string,customColor:k.string,customLike:k.object,hasFlowerBorder:k.bool,isGiftWrapped:k.bool,isP2PAttachment:k.bool,metaRanges:k.array,onUnwrap:k.func,ranges:k.array,threadID:k.string};f.exports=l;},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,o){var p=l.split(i),q=[];for(var r=0;r<p.length;r+=2){var s=p[r].trim();if(s&&s.length>0)q.push(c('React').createElement(c('MessengerBubble.react'),{key:r,body:s,customColor:o||undefined,className:"clearfix _3058 _ui9",ranges:m,threadID:n}));if(r+1<p.length&&p[r+1]){var t=p[r+1].split('\n'),u=t[0].replace(/[^a-zA-Z]+/g,''),v=t.slice(1).join('\n');c('BanzaiODS').bumpEntityKey('messenger_code_paste','render_bubble');q.push(c('React').createElement('div',{key:r+1,className:"_3058 _15gf _wu0 _52mr"},c('React').createElement('div',{ref:'syntaxTarget'+r,className:'language-'+u},v)));}}return q;}f.exports={containsCodeBlock:j,getCodeAndMessageBubbles:k};},null);
  __d('MessengerAttachmentAttribution.react',['cx','ImmutableObject','MercuryAttachmentAttribution.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;l.prototype.render=function(){return (c('React').createElement(c('MercuryAttachmentAttribution.react'),{attachment:this.props.attachment,className:"_2f5n _4br2"}));};function l(){i.apply(this,arguments);}l.propTypes={attachment:k.instanceOf(c('ImmutableObject'))};f.exports=l;},null);
  __d('MessengerBubbleBlock.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;k.prototype.render=function(){return (c('React').createElement('div',{className:"_52mr _4h13 _3058"},this.props.children));};function k(){i.apply(this,arguments);}f.exports=k;},null);
  __d('MessengerCodeBubble.react',['Bootloader','immutable','MessengerCodePasteUtils','React','ReactDOM'],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').PureComponent);i=h&&h.prototype;k.prototype.componentDidMount=function(){c('Bootloader').loadModules(["Prism.Complete"],function(l){for(var m in this.refs){var n=c('ReactDOM').findDOMNode(this.refs[m]);l.highlightElement(n);}}.bind(this),'MessengerCodeBubble.react');};k.prototype.render=function(){var l=c('MessengerCodePasteUtils').getCodeAndMessageBubbles(this.props.body,this.props.ranges,this.props.threadID,this.props.customColor);return c('React').createElement('div',null,l);};function k(){h.apply(this,arguments);}k.propTypes={attachments:j.instanceOf(c('immutable').List),body:j.string.isRequired,customColor:j.string,ranges:j.array.isRequired,threadID:j.string.isRequired};f.exports=k;},null);
  __d('MessengerDateBreak.react',['cx','React','formatDate','joinClasses'],function a(b,c,d,e,f,g,h){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.shouldComponentUpdate=function(m){'use strict';return this.props.date.getTime()!==m.date.getTime();};l.prototype.render=function(){'use strict';var m=c('formatDate')(this.props.date,{today:'g:ia',withinWeek:'D g:ia',thisYear:'M jS, g:ia',older:'m/d/Y g:ia'});return (c('React').createElement('h4',{className:c('joinClasses')(this.props.className,"_497p _2lpt")},c('React').createElement('time',{className:"_3oh-"},m)));};function l(){'use strict';i.apply(this,arguments);}l.propTypes={date:k.instanceOf(Date).isRequired};f.exports=l;},null);
  __d('MessengerDeleteMessageDialog.react',['fbt','MercuryConfig','MessengerDialog.react','MessengerDialogBody.react','MessengerDialogButton.react','MessengerDialogCancelButton.react','MessengerDialogFooter.react','MessengerDialogHeader.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').PureComponent);j=i&&i.prototype;function l(){var m,n;for(var o=arguments.length,p=Array(o),q=0;q<o;q++)p[q]=arguments[q];return m=(n=j.constructor).call.apply(n,[this].concat(p)),this.$MessengerDeleteMessageDialog1=function(){if(c('MercuryConfig').MessengerGlobalDeleteGK)if(this.props.isFromViewer){return h._("Delete Message?");}else return h._("Hide Message?");return h._("Delete Message");}.bind(this),this.$MessengerDeleteMessageDialog2=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?");}.bind(this),this.$MessengerDeleteMessageDialog4=function(){if(!this.props.isFromViewer&&c('MercuryConfig').MessengerGlobalDeleteGK)return h._("Hide");return h._("Delete");}.bind(this),this.$MessengerDeleteMessageDialog5=function(){this.props.onToggle&&this.props.onToggle(false);this.props.onDelete&&this.props.onDelete();}.bind(this),this.$MessengerDeleteMessageDialog3=function(){this.props.onCancel&&this.props.onCancel();}.bind(this),m;}l.prototype.render=function(){return c('React').createElement(c('MessengerDialog.react'),{onToggle:this.props.onToggle},c('React').createElement(c('MessengerDialogHeader.react'),null,this.$MessengerDeleteMessageDialog1()),c('React').createElement(c('MessengerDialogBody.react'),null,this.$MessengerDeleteMessageDialog2()),c('React').createElement(c('MessengerDialogFooter.react'),null,c('React').createElement(c('MessengerDialogCancelButton.react'),{onClick:this.$MessengerDeleteMessageDialog3}),c('React').createElement(c('MessengerDialogButton.react'),{label:this.$MessengerDeleteMessageDialog4(),onClick:this.$MessengerDeleteMessageDialog5,type:'primary',use:'danger'})));};l.propTypes={isFromViewer:k.bool,onDelete:k.func,onToggle:k.func};f.exports=l;},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';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(){var m=h._("Cancel"),n=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:m,onClick:this.props.onCancelButtonClick,use:'default'}),c('React').createElement(c('MNCommerceButton.react'),{label:n,onClick:this.props.onTurnOffButtonClick,use:'confirm'}))));};function l(){i.apply(this,arguments);}l.propTypes={onCancelButtonClick:k.func,onTurnOffButtonClick:k.func};f.exports=l;},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';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(){var m=h._("OK"),n=null,o=null;switch(this.props.errorType){case c('MNCommerceErrors').ALREADY_UNLINKED:o=c('React').createElement('div',null,h._("Updates Are Already Off"));n=c('React').createElement('div',null,h._("You aren't getting updates in Messenger."));break;default:o=c('React').createElement('div',null,h._("Couldn't Turn Off Updates"));n=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,o),c('React').createElement(c('MNCommerceDialogBody.react'),null,n),c('React').createElement(c('MNCommerceDialogFooter.react'),null,c('React').createElement(c('MNCommerceButton.react'),{label:m,onClick:this.props.onOkayButtonClick,use:'confirm'}))));};function l(){i.apply(this,arguments);}l.propTypes={errorType:k.number,onOkayButtonClick:k.func};f.exports=l;},null);
  __d('MNCommerceUnlinkDialogContainer.react',['BanzaiLogger','MNCommerceDialogStateActions','MNCommerceDialogStateStore','MNCommerceLoggingConstants','MNCommerceLoggerEvents','MNCommerceUnlinkDialog.react','MNCommerceUnlinkErrorDialog.react','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(){var k,l;for(var m=arguments.length,n=Array(m),o=0;o<m;o++)n[o]=arguments[o];return k=(l=i.constructor).call.apply(l,[this].concat(n)),this.$MNCommerceUnlinkDialogContainer1=function(p){if(!p)this.$MNCommerceUnlinkDialogContainer2();}.bind(this),this.$MNCommerceUnlinkDialogContainer2=function(){c('MNCommerceDialogStateActions').hideDialog();},k;}j.prototype.render=function(){var k=c('MNCommerceDialogStateStore').getState();if(k&&k.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.$MNCommerceUnlinkDialogContainer1,shown:!!k,errorType:k.errorType,onOkayButtonClick:this.$MNCommerceUnlinkDialogContainer2});}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.$MNCommerceUnlinkDialogContainer1,shown:!!k,onCancelButtonClick:this.$MNCommerceUnlinkDialogContainer2,onTurnOffButtonClick:k&&k.onTurnOffButtonClick});}};f.exports=j;},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('MercuryXMATRenderer',['fbt','invariant','MercuryConfig','MercuryIDs','MercuryParticipants','MessagingGenericAdminTextType','MessengerTextWithEntities.react','MNAdsMessageUtils','React','TextWithEntities.react','FacepileRounded.react'],function a(b,c,d,e,f,g,h,i){'use strict';if(c.__markCompiled)c.__markCompiled();var j={renderText:function(k){var l=null;if(c('MercuryConfig').MessengerNewEmojiGK){l=c('React').createElement(c('MessengerTextWithEntities.react'),{renderEmoji:true,renderEmoticons:true,text:k.log_message_body});}else l=c('React').createElement(c('TextWithEntities.react'),{renderEmoji:true,renderEmoticons:true,text:k.log_message_body});switch(k.log_message_data.message_type){case c('MessagingGenericAdminTextType').TURN_ON_PUSH:var m=k.log_message_data.untypedData&&k.log_message_data.untypedData.recipient_id,n=m&&c('MercuryParticipants').getNow(c('MercuryIDs').getParticipantIDFromUserID(m)),o=c('MercuryIDs').getUserIDFromParticipantID(k.author);!!!o?i(0):void 0;var p=c('MercuryParticipants').getNow(c('MercuryIDs').getParticipantIDFromUserID(o));if(o!==k.other_user_fbid){if(n){l=h._("You asked {admin-text-message} to turn on notifications for Messenger on mobile.",[h.param('admin-text-message',n.name)]);}else l=h._("You asked a contact to turn on notifications for Messenger on mobile.");}else if(p){l=h._("{admin-text-message} asked you to turn on notifications for Messenger on mobile.",[h.param('admin-text-message',p.name)]);}else l=h._("A contact asked you to turn on notifications for Messenger on mobile.");break;case c('MessagingGenericAdminTextType').JOURNEY_PROMPT_COLOR:l=h._("You need to be on the latest version of Messenger on a mobile device to pick a color for this conversation.");break;case c('MessagingGenericAdminTextType').JOURNEY_PROMPT_NICKNAME:var q=null,r=c('MercuryIDs').getUserIDFromParticipantID(k.author);if(k.other_user_fbid&&r!==k.other_user_fbid){var s=c('MercuryIDs').getParticipantIDFromUserID(k.other_user_fbid);q=c('MercuryParticipants').getOrFetch(s);}if(q&&q.short_name){l=h._("You need to be on the latest version of Messenger on a mobile device to set a nickname for {admin-text-message} .",[h.param('admin-text-message',q.short_name)]);}else l=h._("You need to be on the latest version of Messenger on a mobile device to set a nickname for yourself.");break;case c('MessagingGenericAdminTextType').JOURNEY_PROMPT_LIKE:l=h._("You need to be on the latest version of Messenger on a mobile device to pick an emoji for this conversation.");break;case c('MessagingGenericAdminTextType').JOURNEY_PROMPT_BOT:l=h._("You need to be on the latest version of Messenger on a mobile device to add a subscription to this conversation.");break;case c('MessagingGenericAdminTextType').ADS_WELCOME_MSG:break;case c('MessagingGenericAdminTextType').AD_MANAGE_MESSAGE:if(c('MNAdsMessageUtils').isAdsAdminMessage(k))l=c('MNAdsMessageUtils').getAdsPageManage(k,false);break;case c('MessagingGenericAdminTextType').CONFIRM_FRIEND_REQUEST:var t=k.log_message_data.untypedData.friend_request_recipient,u=k.log_message_data.untypedData.friend_request_sender,v=c('MercuryParticipants').getNow(c('MercuryIDs').getParticipantIDFromUserID(t)),w=c('MercuryParticipants').getNow(c('MercuryIDs').getParticipantIDFromUserID(u));if(w!=null&&v!=null)l=c('React').createElement(c('FacepileRounded.react'),{profiles:[v,w],message:k.log_message_body});break;case c('MessagingGenericAdminTextType').THREAD_JOINABLE_PROMOTION_TEXT:l=h._("Want more people to join? Share your room.");break;default:break;}return c('React').createElement('span',null,l);}};f.exports=j;},null);
  __d('P2PBigAmount.react',['cx','ix','CurrentEnvironment','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(){var n,o;for(var p=arguments.length,q=Array(p),r=0;r<p;r++)q[r]=arguments[r];return n=(o=k.constructor).call.apply(o,[this].concat(q)),this.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');}.bind(this),this.isMessengerDotCom=function(){return c('CurrentEnvironment').messengerdotcom;},n;}m.prototype.render=function(){var n=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:n,src:this.getImage(),width:n})),c('React').createElement('div',{className:"_8jc"+(this.props.isPending?' '+"_8jd":'')+(this.props.amount.length>=8?' '+"_8je":'')+(' '+"_3oh-")},this.props.amount)));};m.propTypes={amount:l.string.isRequired,isPending:l.bool,size:l.oneOf(['medium','large'])};m.defaultProps={size:'medium'};f.exports=m;},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';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(){var n,o;for(var p=arguments.length,q=Array(p),r=0;r<p;r++)q[r]=arguments[r];return n=(o=k.constructor).call.apply(o,[this].concat(q)),this.log=function(s,t){c('P2PLogger').log(s,babelHelpers['extends']({www_event_flow:this.props.eventFlow},t));}.bind(this),this.handleClose=function(){this.log(c('P2PPaymentLoggerEvent').UI_ACTN_3RD_PARTY_RECEIPT_DISMISSED);this.props.onClose();}.bind(this),this.renderParticipantRow=function(s,t){var u=void 0;if(t){u=i._("From");}else u=i._("To");return (c('React').createElement('li',{className:"_2chg",key:s.id},c('React').createElement('div',{className:"_2chh"},c('React').createElement(c('Link.react'),{href:s.profile_uri,onClick:this.props.onClose},c('React').createElement(c('Image.react'),{height:50,src:s.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'},u),s.full_name))));}.bind(this),n;}m.prototype.componentDidMount=function(){this.log(c('P2PPaymentLoggerEvent').UI_ACTN_3RD_PARTY_RECEIPT_SHOWN,{raw_amount:this.props.amount});};m.prototype.render=function(){var n=c('CurrentEnvironment').messengerdotcom,o=n?380:360,p=this.props.title;return (c('React').createElement(c('P2PDialog.react'),{className:n?"_bpv":'',layerHideOnBlur:false,onToggle:this.props.onClose,width:o},c('React').createElement(c('P2PDialogTitle.react'),null,p),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'}))));};m.propTypes={amount:l.string.isRequired,eventFlow:l.string,isGrayAmount:l.bool,onClose:l.func.isRequired,receiver:l.object.isRequired,sender:l.object.isRequired,title:l.node};m.defaultProps={bodyText:i._("You can send money to friends in groups."),eventFlow:c('P2PPaymentLoggerEventFlow').UI_FLOW_P2P_GROUP_SEND,isGrayAmount:false,title:i._("Payment Details")};f.exports=m;},null);
  __d('P2PGroupPaymentRequestReceiptDialog.react',['fbt','P2PActions','P2PPaymentLoggerEventFlow','P2PGroupSendReceiptDialog.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;l.prototype.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}));};function l(){i.apply(this,arguments);}l.propTypes={amount:k.string,onClose:k.func,requestee:k.object.isRequired,requester:k.object.isRequired};f.exports=l;},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_DEPRECATED','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_DEPRECATED')],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=void 0;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','MessengerAdminGroupUtils','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:{thread:i.instanceOf(c('ImmutableObject')),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,m=c('MessengerAdminGroupUtils').isJoinableThread(this.props.thread);if(m){if(!l.name)return (c('React').createElement('span',null,h._("You removed the room name.")));return (c('React').createElement('span',null,h._("You named the room {the new name of the group}.",[h.param('the new name of the group',l.name)])));}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('MessengerMeLogMessageBody.react',['ImmutableObject','MercuryConfig','MercuryMeMessageProcessor','MessengerTextWithEntities.react','React','TextWithEntities.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').PureComponent);i=h&&h.prototype;function k(){var l,m;for(var n=arguments.length,o=Array(n),p=0;p<n;p++)o[p]=arguments[p];return l=(m=i.constructor).call.apply(m,[this].concat(o)),this.state={messageText:''},l;}k.prototype.componentDidMount=function(){this.componentWillReceiveProps(this.props);};k.prototype.componentWillReceiveProps=function(l){if(c('MercuryMeMessageProcessor').shouldTransformSnippet(l.message.body))c('MercuryMeMessageProcessor').transformSnippet(l.message.body,l.message.author,l.thread,function(m){this.setState({messageText:m});}.bind(this));};k.prototype.render=function(){var l=c('TextWithEntities.react');if(c('MercuryConfig').MessengerNewEmojiGK)l=c('MessengerTextWithEntities.react');return (c('React').createElement(l,{renderEmoji:true,renderEmoticons:true,text:this.state.messageText}));};k.propTypes={message:j.instanceOf(c('ImmutableObject')).isRequired,thread:j.object};f.exports=k;},null);
  __d('MessengerLogMessage.react',['cx','ix','Image.react','ImmutableObject','MercuryLogMessageType','MessengerMeLogMessageBody.react','MercuryMeMessageProcessor','MercuryMessageInfo','MercuryXMATRenderer','MessengerLogMessageBody.react','MNCommerceLogMessageUtils','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('React').PropTypes,m=i('/images/mercury/clients/messenger/message/messageStateFailed.png');j=babelHelpers.inherits(n,c('React').PureComponent);k=j&&j.prototype;function n(){var o,p;for(var q=arguments.length,r=Array(q),s=0;s<q;s++)r[s]=arguments[s];return o=(p=k.constructor).call.apply(p,[this].concat(r)),this.$MessengerLogMessage3=function(){var t=void 0;if(c('MercuryMeMessageProcessor').shouldTransform(this.props.message))return (c('React').createElement(c('MessengerMeLogMessageBody.react'),{message:this.props.message,thread:this.props.thread}));if(this.props.message.log_message_type!==c('MercuryLogMessageType').ORION)t=c('MercuryXMATRenderer').renderText(this.props.message);return (this.$MessengerLogMessage4()||t||c('React').createElement(c('MessengerLogMessageBody.react'),{message:this.props.message,viewer:this.props.viewer,thread:this.props.thread}));}.bind(this),this.$MessengerLogMessage4=function(){var t=this.props.message;if(c('MNCommerceLogMessageUtils').isCommercePageAdminMessage(t))return c('MNCommerceLogMessageUtils').getCommercePageManage(t,true);return null;}.bind(this),this.$MessengerLogMessage2=function(){if(!c('MercuryMessageInfo').hasError(this.props.message))return null;return (c('React').createElement(c('Image.react'),{className:"_41-9",src:m}));}.bind(this),this.$MessengerLogMessage1=function(){var t=void 0,u=this.props.message,v=u.log_message_type===c('MercuryLogMessageType').UNSUBSCRIBE&&u.log_message_data.removed_participants.indexOf(u.author)!==-1,w=this.props.viewer;switch(u.log_message_type){case c('MercuryLogMessageType').SUBSCRIBE:t="_uwb";break;case c('MercuryLogMessageType').UNSUBSCRIBE:t=v?"_uwc":"_uwe";break;case c('MercuryLogMessageType').PHONE_CALL:t=u.log_message_data.caller.indexOf(w)!==-1?"_uwf":"_uwg";break;case c('MercuryLogMessageType').VIDEO_CALL:t=u.log_message_data.caller.indexOf(w)!==-1?"_uwh":"_uwi";break;case c('MercuryLogMessageType').THREAD_NAME:t="_uwj";break;case c('MercuryLogMessageType').THREAD_IMAGE:t="_uwk";break;case c('MercuryLogMessageType').SERVER_ERROR:t="_uwl";break;case c('MercuryLogMessageType').LIVE_LISTEN:t="_uwm";break;case c('MercuryLogMessageType').WALLPAPER:t="_uwn";break;case c('MercuryLogMessageType').ORION:t="_uwo";break;case c('MercuryLogMessageType').SWITCH_TO_WORK:t="_uwp";break;case c('MercuryLogMessageType').PAGE_REPLY:t="_uwq";break;}return c('joinClasses')("_497p"+((u.log_message_type===c('MercuryLogMessageType').PHONE_CALL||u.log_message_type===c('MercuryLogMessageType').VIDEO_CALL)&&!u.log_message_data.answered?' '+"_3no3":''),t);}.bind(this),o;}n.prototype.render=function(){return c('React').createElement('div',{className:this.$MessengerLogMessage1()},this.$MessengerLogMessage2(),c('React').createElement('i',{className:"_uwa"}),c('React').createElement('span',{className:"_3oh-"},this.$MessengerLogMessage3()));};n.propTypes={message:l.instanceOf(c('ImmutableObject')).isRequired,viewer:l.string.isRequired};f.exports=n;},null);
  __d('MessengerContextualActions.react',['cx','ContextualLayerUpdateOnScroll','LayerHideOnBlur','Link.react','React','ReactAbstractContextualDialog','ReactLayer'],function a(b,c,d,e,f,g,h){'use strict';var i,j,k,l;if(c.__markCompiled)c.__markCompiled();var m=c('React').PropTypes,n=c('ReactLayer').createClass(c('ReactAbstractContextualDialog').createSpec({displayName:'MessengerContextualActionsDialog',theme:{wrapperClassName:"_hw2",arrowDimensions:{offset:12,length:12}}}));i=babelHelpers.inherits(o,c('React').Component);j=i&&i.prototype;o.prototype.render=function(){var q=this.props,r=q.children,s=babelHelpers.objectWithoutProperties(q,['children']);return (c('React').createElement(n,babelHelpers['extends']({alignment:'center',behaviors:{ContextualLayerUpdateOnScroll:c('ContextualLayerUpdateOnScroll'),LayerHideOnBlur:c('LayerHideOnBlur')}},s,{onToggle:this.props.onToggle}),c('React').createElement('ul',{className:"_hw3"},r)));};function o(){i.apply(this,arguments);}o.propTypes={onToggle:m.func};o.Item=p;k=babelHelpers.inherits(p,c('React').Component);l=k&&k.prototype;p.prototype.render=function(){return (c('React').createElement('li',{className:"_hw4"},c('React').createElement(c('Link.react'),{className:"_hw5",onClick:this.props.onClick},this.props.children)));};function p(){k.apply(this,arguments);}p.propTypes={onClick:m.func};f.exports=o;},null);
  __d('MessengerSaveMessageDialog.react',['fbt','CollectionCurationReferrerTags','CollectionCurationReferrerParamNames','Link.react','MessengerDialog.react','MessengerDialogBody.react','MessengerDialogHeader.react','React','URI','setTimeout','clearTimeout'],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').PureComponent);j=i&&i.prototype;function l(){var m,n;for(var o=arguments.length,p=Array(o),q=0;q<o;q++)p[q]=arguments[q];return m=(n=j.constructor).call.apply(n,[this].concat(p)),this.state={closeTimeout:null},m;}l.prototype.render=function(){var m={};m[c('CollectionCurationReferrerParamNames').CLICK_REF]=c('CollectionCurationReferrerTags').MESSENGER_DOT_COM_SAVE_CONFIRMATION;var n=new (c('URI'))('https://www.facebook.com/saved/').setQueryData(m);return (c('React').createElement(c('MessengerDialog.react'),{onToggle:this.props.onToggle},c('React').createElement(c('MessengerDialogHeader.react'),null,h._("Saving to Facebook")),c('React').createElement(c('MessengerDialogBody.react'),null,c('React').createElement(c('Link.react'),{href:n,target:'blank'},h._("View your saved items")))));};l.prototype.componentDidMount=function(){var m=c('setTimeout')(function(){this.props.onToggle(false);}.bind(this),2000);this.setState({closeTimeout:m});};l.prototype.componentWillUnmount=function(){c('clearTimeout')(this.state.closeTimeout);};l.propTypes={onToggle:k.func.isRequired};f.exports=l;},null);
  __d('MessengerURIUtils',['MercuryIDs','MessengerURISerializer','MessengerView','URI'],function a(b,c,d,e,f,g){'use strict';if(c.__markCompiled)c.__markCompiled();var h={getURIForThreadID:function(i){var j=c('MessengerURISerializer').deserialize(new (c('URI'))(window.location.href));return c('MessengerURISerializer').serialize(babelHelpers['extends']({},j,{activeThreadID:i,detailView:c('MessengerView').DETAIL.THREAD,query:j.queryAll?j.query:undefined}));},getURIForUserID:function(i){return h.getURIForThreadID(c('MercuryIDs').getThreadIDFromUserID(i));},getURIForMessageID:function(i){return new (c('URI'))('/m/'+i);}};f.exports=h;},null);
  __d('SaveMessageUtils',['immutable','StoryAttachmentStyle'],function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();var h=c('immutable').Set.of(c('StoryAttachmentStyle').FALLBACK,c('StoryAttachmentStyle').SHARE,c('StoryAttachmentStyle').EVENT,c('StoryAttachmentStyle').ATTACHED_STORY,c('StoryAttachmentStyle').MUSIC_AGGREGATION,c('StoryAttachmentStyle').AVATAR),i={isSavableMessageAttachment:function(j){for(var k=0;k<j.length;k++)if(!h.has(j[k]))return false;return true;}};f.exports=i;},null);
  __d("XMessengerDotComSaveController",["XController"],function a(b,c,d,e,f,g){c.__markCompiled&&c.__markCompiled();f.exports=c("XController").create("\/save\/message\/",{});},null);
  __d('MessengerMessageActionsWrapper.react',['csx','cx','fbt','invariant','DOMQuery','FBClipboardLink.react','ImmutableObject','ReactLayeredComponentMixin_DEPRECATED','MercuryConfig','MercuryMessageActions','MercuryMessageInfo','MessengerActions','MessengerContextualActions.react','MessengerDeleteMessageDialog.react','Parent','React','ReactDOM','AsyncRequest','CollectionsDisplaySurface','CollectionCurationMechanisms','List.react','MessengerConfig','MessengerDotComSaveModule','MessengerSaveMessageDialog.react','MessengerURIUtils','SaveMessageUtils','SavedStateActions','URLMatcher','XMessengerDotComSaveController','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_DEPRECATED')],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 {};var s=[];s.push(c('React').createElement(l,{key:'delete',onClick:this._handleDelete},this._renderActionItemMsg()));if(this._canSaveMessage())s.push(c('React').createElement(l,{key:'save',onClick:this._handleSave},this._renderSaveItemMsg()));if(c('MessengerConfig').ShowMessageLinks)s.push(c('React').createElement(l,{key:'perma-link',onClick:this._handleLink},this._renderLinkItemMsg()));return {contextualDialog:c('React').createElement(c('MessengerContextualActions.react'),{context:r,onToggle:this._handleActionsToggle,shown:this.props.isActive},this._renderRetry(),c('React').createElement(c('List.react'),{direction:'horizontal'},s))};},_renderActionItemMsg:function(){if(!this.props.isFromViewer&&c('MercuryConfig').MessengerGlobalDeleteGK)return j._("Hide");return j._("Delete");},_renderSaveItemMsg:function(){return j._("Save to Facebook");},_renderLinkItemMsg:function(){var q=c('MessengerURIUtils').getURIForMessageID(this.props.message.message_id).getQualifiedURIBase().toString(),r=j._("Copy Link");return (c('React').createElement(c('FBClipboardLink.react'),{suppress:true,tooltip:'',value:q},r));},_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});},_canSaveMessage:function(){var q=this.props.message;if(c('MessengerDotComSaveModule').enabled_attachment_save&&this._isSavableMessageAttachment())return true;if(c('MessengerDotComSaveModule').enabled_video_save&&q.attachments&&q.attachments.length>0&&q.attachments[0].share.media.playable)return true;if(c('MessengerDotComSaveModule').enabled_inline_save){var r=c('URLMatcher').match(q.body);if(r!=null&&r.length>0)return true;}return false;},_handleLink:function(){this._handleActionsToggle(false);},_isSavableMessageAttachment:function(){var q=this.props.message.attachments;if(!q||q.length===0)return false;for(var r=0;r<q.length;r++){var s=q[r],t=s.share.style_list,u=c('SaveMessageUtils').isSavableMessageAttachment(t);if(!u)return false;}return true;},_handleSave:function(){var q=this.props.message,r=c('CollectionsDisplaySurface').MESSENGER_DOT_COM_MESSAGE,s=c('CollectionCurationMechanisms').RIGHT_CLICK;new (c('AsyncRequest'))().setURI(c('XMessengerDotComSaveController').getURIBuilder().getURI()).setData({action:c('SavedStateActions').SAVE,surface:r,mechanism:s,message_id:q.message_id}).send();c('MessengerActions').showDialog(c('MessengerSaveMessageDialog.react'),{onToggle:this._handleDialogToggle});this._handleActionsToggle(false);},_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','React','getViewportDimensions','joinClasses'],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=c('MessengerConfig').MaxSeenHeadCount||8;k=babelHelpers.inherits(o,c('React').PureComponent);l=k&&k.prototype;o.prototype.render=function(){var q=this.props,r=q.message,s=q.nextTimestamp,t=q.participants,u=q.readReceipts;if(c('MercuryMessageInfo').isSending(r)||u.isEmpty()||c('MercuryMessageInfo').hasError(r))return null;var v=c('immutable').Seq(u).filter(function(da,ea){return (da.watermark>=r.timestamp&&da.watermark<s);}).sort(function(da,ea){return da.action-ea.action;});if(v.isEmpty())return null;var w=this.props.isFromViewer?n:p(),x=v.count()>w+1,y=x?v.slice(0,w):v,z=y.map(function(da,ea){var fa=t.get(ea);if(!fa)return null;var ga=da?j._("Seen by {full name} at {seen time}",[j.param('full name',fa.name),j.param('seen time',c('MercuryTimestamp').getPreciseTimestamp(da.action))]):j._("Seen by {full name}",[j.param('full name',fa.name)]);return (c('React').createElement(c('Image.react'),{alt:ga,className:"_jf2",key:ea,src:fa.image_src,title:ga}));}).toArray(),aa=z.length;if(!aa)return null;var ba=x?v.slice(w).count():0;if(ba>0){var ca=v.slice(w).map(function(da,ea){var fa=t.get(ea);return fa?fa.name:null;}).filter(function(da){return !!da;}).join('\n')+' ';z.unshift(c('React').createElement('span',{className:"_jf3",key:'overflow',title:ca},'+'+ba));}return (c('React').createElement('span',{className:c('joinClasses')(this.props.className,"_jf4"+(aa+ba===1?' '+"_jf5":''))},z));};function o(){k.apply(this,arguments);}o.propTypes={isFromViewer:m.bool,message:m.instanceOf(c('ImmutableObject')).isRequired,nextTimestamp:m.number.isRequired,participants:m.instanceOf(c('immutable').Map).isRequired,readReceipts:m.instanceOf(c('immutable').OrderedMap).isRequired};function p(){var q=c('getViewportDimensions')().width;if(q<parseInt("920px".replace('px',''),10))return Math.min(n,8);if(q<parseInt("1211px".replace('px',''),10))return Math.min(n,3);return n;}f.exports=o;},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','MercuryConfig','MercuryMessageActions','MercuryMessageCustomizations','MercuryMessageDeliveryState','MercuryMessageError.react','MercuryMessageInfo','MercuryTimestamp','MessageBorderType','MessageCustomizationType','MessagingGiftWrap.react','MessengerAttachmentAttribution.react','MessengerAttachmentRenderer','MessengerBubble.react','MessengerBubbleBlock.react','MessengerCodeBubble.react','MessengerCodePasteUtils','MessengerConfig','MessengerMessageActionsWrapper.react','MessengerMessageSeenHeads.react','MNCommerceMessageType','React','TooltipData','emptyFunction','getViewportDimensions','joinClasses','messengerRTLClasses'],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;function n(q){switch(q){case c('MercuryMessageDeliveryState').SENDING:return j._("Sending");case c('MercuryMessageDeliveryState').SENT:return j._("Sent");case c('MercuryMessageDeliveryState').DELIVERED:return j._("Delivered");case c('MercuryMessageDeliveryState').ERROR:return j._("Error");}return null;}k=babelHelpers.inherits(o,c('React').Component);l=k&&k.prototype;function o(){var q,r;for(var s=arguments.length,t=Array(s),u=0;u<s;u++)t[u]=arguments[u];return q=(r=l.constructor).call.apply(r,[this].concat(t)),this.$MessengerMessage6=function(v){return v.every(function(w){if(!w)return true;var x=c('MessengerAttachmentRenderer').isRenderedPhotosAttachment(w),y=c('MessengerAttachmentRenderer').isRenderedShareAttachment(w);return !y&&!x;});},this.$MessengerMessage3=function(v){if(this.props.message.is_filtered_content)return null;if(this.props.message.commerce_message_type===c('MNCommerceMessageType').RIDE_INTENT)return null;var w=c('MessengerAttachmentRenderer').getAttachmentsOutsideBubble(this.props.message,this.props.onAttachmentLoad,this.props.customColor,this.$MessengerMessage7);if(!w||!w.length)return null;if(v)w=this.$MessengerMessage6(w)?c('React').createElement('div',babelHelpers['extends']({},v,{className:"_3zvs"}),w):w.map(function(z){return (z&&c('React').cloneElement(z,v));});var x=c('React').createElement('div',{key:'renderedAttachments',className:"_3058 _15gf"},w);if(this.props.message.attachments.length===1&&c('MercuryAttachment').hasAttribution(this.props.message.attachments[0])){var y=[x,c('React').createElement(c('MessengerAttachmentAttribution.react'),{attachment:new (c('ImmutableObject'))(this.props.message.attachments[0]),key:'attribution'})];if(this.props.isGiftWrapped)y=[c('React').createElement('div',{key:'blockContentWrapper'},y),c('React').createElement(c('MessagingGiftWrap.react'),{key:'giftwrap',onUnwrap:this.$MessengerMessage7})];return (c('React').createElement(c('MessengerBubbleBlock.react'),null,y));}return x;}.bind(this),this.$MessengerMessage1=function(){return (c('MessengerAttachmentRenderer').isP2PAttachment(this.props.message));}.bind(this),this.$MessengerMessage2=function(v){var w=this.props.message,x=c('immutable').List(c('MessengerAttachmentRenderer').getAttachmentsInsideBubble(w,this.props.onAttachmentLoad));if(c('MessengerCodePasteUtils').containsCodeBlock(w.body))return (c('React').createElement(c('MessengerCodeBubble.react'),{attachments:x,body:w.body,customColor:this.props.isFromViewer?this.props.customColor:'',className:"_3058 _ui9",ranges:w.ranges||[],threadID:w.thread_id||''}));if(w.is_filtered_content)return (c('React').createElement('div',{className:"_3058 _wiu _52mr uiBoxYellow clearfix"},c('MercuryDisplayTimeFilterMessageRenderer').renderFilteredContent(w)));var y=w.body&&!c('EmojiLikeUtils').isEmojiLike(w);if(y||!x.isEmpty())return (c('React').createElement(c('MessengerBubble.react'),babelHelpers['extends']({attachments:x,body:w.body,className:"_3058 _ui9",customColor:this.props.isFromViewer?this.props.customColor:'',customLike:w.customLike,hasFlowerBorder:c('MercuryConfig').WWWMessengerFlowerBorderViewer&&c('MercuryMessageCustomizations').getCustomizationValue(w,c('MessageCustomizationType').BORDER)===c('MessageBorderType').FLOWERS,isGiftWrapped:this.props.isGiftWrapped,isP2PAttachment:this.$MessengerMessage1(),onUnwrap:this.$MessengerMessage7,ranges:w.ranges,metaRanges:w.meta_ranges,threadID:w.thread_id},v||{})));return null;}.bind(this),this.$MessengerMessage5=function(){if(!this.props.isFromViewer||!this.props.showDeliveryState||this.props.message.is_like_preview)return null;var v=c('MercuryMessageInfo').getDeliveryState(this.props.message,this.props.deliveryTimestamp);if(v===c('MercuryMessageDeliveryState').UNKNOWN)return null;var w={};if(this.props.customColor&&(v===c('MercuryMessageDeliveryState').SENT||v===c('MercuryMessageDeliveryState').SENDING||v===c('MercuryMessageDeliveryState').DELIVERED))w.color=this.props.customColor;return (c('React').createElement('span',{className:"_2her"+(v===c('MercuryMessageDeliveryState').SENDING?' '+"_4jzp":'')+(v===c('MercuryMessageDeliveryState').SENT?' '+"_3zzf":'')+(v===c('MercuryMessageDeliveryState').DELIVERED?' '+"_9ah":'')+(v===c('MercuryMessageDeliveryState').ERROR?' '+"_5ei9":''),onClick:this.$MessengerMessage8,style:w,title:n(v)},c('React').createElement('i',{className:"_57e_"})));}.bind(this),this.$MessengerMessage4=function(){var v=this.props.message;if(!c('MercuryMessageInfo').hasError(v))return null;return (c('React').createElement(c('MercuryMessageError.react'),{className:"_3058 _2ygi",message:v,authorFBID:this.props.authorFBID}));}.bind(this),this.$MessengerMessage7=function(){var v="2500ms";setTimeout(function(){return this.$MessengerMessage9();}.bind(this),v.substring(0,v.length-2));}.bind(this),this.$MessengerMessage9=function(){c('MercuryMessageActions').get().unwrap(this.props.message);}.bind(this),this.$MessengerMessage8=function(v){v.stopPropagation();this.props.onSelect(this.props.message.message_id);}.bind(this),q;}o.prototype.shouldComponentUpdate=function(q){return q.isActive!==this.props.isActive||q.isFromViewer!==this.props.isFromViewer||q.message!==this.props.message||q.nextTimestamp!==this.props.nextTimestamp||q.showDeliveryState!==this.props.showDeliveryState||q.deliveryTimestamp!==this.props.deliveryTimestamp||!c('immutable').is(q.readReceipts,this.props.readReceipts)||!c('immutable').is(q.participants,this.props.participants)||q.customColor!==this.props.customColor;};o.prototype.render=function(){var q=this.props,r=q.isActive,s=q.isFromViewer,t=q.message,u=j._("{time}",[j.param('time',c('MercuryTimestamp').getPreciseTimestamp(t.timestamp))]),v=c('MessengerConfig').SentTimestampEnabled&&s?Object.assign({'data-tooltip-alignh':r?'right':'center'},c('TooltipData').propsFor(u,p())):null;return c('React').createElement(c('MessengerMessageActionsWrapper.react'),{className:c('joinClasses')("clearfix"+(' '+"_o46")+(' '+"_3erg")+(r?' '+"_-5k":'')+(s?' '+"_3i_m":'')+(s?' '+"_nd_":'')+(!s?' '+"_29_7":'')+(t.isSelected?' '+"_3xsz":''),c('messengerRTLClasses')(t.body)),isActive:r,isDeletable:!this.$MessengerMessage1()&&!this.props.isPageMessage,isFromViewer:s,message:t,onDeselect:this.props.onDeselect,onSelect:this.props.onSelect},c('React').createElement('div',{className:'clearfix'},this.$MessengerMessage2(v),this.$MessengerMessage3(v)),this.$MessengerMessage4(),this.$MessengerMessage5(),c('React').createElement(c('MessengerMessageSeenHeads.react'),{className:"_4jzq",isFromViewer:s,message:t,nextTimestamp:this.props.nextTimestamp,participants:this.props.participants,readReceipts:this.props.readReceipts}));};o.propTypes={customColor:m.string,deliveryTimestamp:m.number.isRequired,isActive:m.bool,isFromViewer:m.bool,isGiftWrapped:m.bool,isPageMessage:m.bool,message:m.instanceOf(c('ImmutableObject')).isRequired,nextTimestamp:m.number.isRequired,onAttachmentLoad:m.func.isRequired,onDeselect:m.func.isRequired,onSelect:m.func.isRequired,participants:m.instanceOf(c('immutable').Map).isRequired,readReceipts:m.instanceOf(c('immutable').OrderedMap).isRequired,showDeliveryState:m.bool,authorFBID:m.string};o.defaultProps={onAttachmentLoad:c('emptyFunction')};function p(){if(c('getViewportDimensions')().width<=parseInt("640px".replace('px',''),10))return 'above';return 'right';}f.exports=o;},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=void 0;while(!(s=r.next()).done){var t=q&&q.value.creator_info.creatorID===s.value.creator_info.creatorID;if(!t){p=[];o.push(p);}if(p)p.push(s.value);q=s;}return o;};function m(){j.apply(this,arguments);}m.propTypes={notes:l.arrayOf(l.shape({id:l.string,body:l.object.isRequired,creator_info:l.shape({creatorID:l.string.isRequired,creatorName:l.string.isRequired,creatorType:l.string.isRequired,labelType:l.string.isRequired,pageID:l.string.isRequired,profileURI:l.string}),timestamp:l.number.isRequired})).isRequired};f.exports=m;},null);
  __d('MessengerMessageGroup.react',['cx','fbt','immutable','ImmutableObject','Image.react','Link.react','MercuryConfig','MercuryIDs','MercuryParticipants','MercuryParticipantSilhouettes','MercuryTimestamp','MessagingGiftWrapChecker','MessengerActions','MessengerConfig','MessengerDateBreak.react','MessengerMessage.react','MessengerPageAdminNoteList.react','MessengerProfileImageWrapper.react','MessengerStickerUtils','MessengerTextWithEmoticons.react','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,pageCustomAction:l.func},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}));var x=this.props.isPageMessage&&this.props.pageCustomAction?this.props.pageCustomAction:null;if(x)s.push(c('React').createElement('h4',{key:'page_action'+t.message_id},c('React').createElement(x,{message:t})));var y=c('MercuryIDs').getUserIDFromParticipantID(this.props.author);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,messageActionsWrapper:this.props.messageActionWrapper,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,authorFBID:y==null?undefined:y}));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)s=c('React').createElement(c('MessengerTextWithEmoticons.react'),{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,s){s&&s.preventDefault();var t=c('MercuryIDs').getThreadIDFromParticipantID(r.id);t&&c('MessengerActions').selectThread(t);}});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('MercurySeenIndicator.react',['cx','MercuryDelayedRoger','MercuryIDs','React','SubscriptionsHandler'],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(){var m,n;for(var o=arguments.length,p=Array(o),q=0;q<o;q++)p[q]=arguments[q];return m=(n=j.constructor).call.apply(n,[this].concat(p)),this.$MercurySeenIndicator3=function(){var r=c('MercuryIDs').getParticipantIDFromUserID(this.props.viewer),s=this.props.thread.participants.filter(function(t){return t!==r;});return {viewer:r,others:s};}.bind(this),this.$MercurySeenIndicator4=function(r){return r===this.props.thread.snippet_sender;}.bind(this),this.$MercurySeenIndicator5=function(r){var s=this.props.thread.thread_id;return this.$MercurySeenIndicator1.getSeenBy(s).length===r.length;}.bind(this),m;}l.prototype.componentWillMount=function(){this.$MercurySeenIndicator1=c('MercuryDelayedRoger').getForFBID(this.props.viewer);};l.prototype.componentDidMount=function(){this.$MercurySeenIndicator2=new (c('SubscriptionsHandler'))();this.$MercurySeenIndicator2.addSubscriptions(this.$MercurySeenIndicator1.subscribe('state-changed',function(m,n){n[this.props.thread.thread_id]&&this.forceUpdate();}.bind(this)));};l.prototype.componentWillUnmount=function(){this.$MercurySeenIndicator2&&this.$MercurySeenIndicator2.release();};l.prototype.render=function(){var m=this.$MercurySeenIndicator3(),n=m.viewer,o=m.others,p=this.$MercurySeenIndicator4(n),q=this.$MercurySeenIndicator5(o);return c('React').createElement('span',{className:"_3jy5"+(p?' '+"repliedLast":'')+(p&&q?' '+"seenByAll":'')});};l.propTypes={thread:k.object.isRequired,viewer:k.string.isRequired};f.exports=l;},null);
  __d('MercuryThreadSnippet.react',['cx','fbt','immutable','ImmutableObject','MercuryAttachmentSnippet.react','MercuryConfig','MercuryIDs','MercuryMeMessageProcessor','MessengerMeLogMessageBody.react','MessengerTextWithEmoticons.react','MNAdsLogMessageUtils','React','TextWithEmoticons.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(){var p,q;for(var r=arguments.length,s=Array(r),t=0;t<r;t++)s[t]=arguments[t];return p=(q=k.constructor).call.apply(q,[this].concat(s)),this.$MercuryThreadSnippet1=function(){if(!this.props.thread.snippet||!n(this.props.thread))return null;return (c('React').createElement('span',{className:"_j0r"}));}.bind(this),this.$MercuryThreadSnippet2=function(){var u=this.props.thread,v=c('MercuryIDs').getParticipantIDFromUserID(this.props.viewer),w=this.props.thread.snippet,x=this.props.shouldRenderYou;if(c('MercuryMeMessageProcessor').shouldTransformSnippet(w)&&u.snippet_sender)return (c('React').createElement(c('MessengerMeLogMessageBody.react'),{message:new (c('ImmutableObject'))({author:u.snippet_sender,body:u.snippet}),thread:u}));if(u.snippetCount!=null)return i._({"*":"{number} results","268435456":"1 result"},[i.plural(u.snippetCount,'number')]);var y=this.$MercuryThreadSnippet3(w),z=u.participants.length;if(u.is_subscribed)z--;c('MNAdsLogMessageUtils').logAdsThreadListImpression(u);if(u.snippet_has_attachment||!u.snippet_sender)return y;if(u.snippet_sender===v){if(!x)return y;return i._("You: {conversation_snippet}",[i.param('conversation_snippet',y)]);}if(z<=1&&!this.props.shouldAlwaysRenderSender)return y;var aa=this.props.participants.get(u.snippet_sender);if(!aa)return y;var ba=aa.short_name||aa.name;if(u){var ca=u.custom_nickname?u.custom_nickname:null,da=c('MercuryIDs').getUserIDFromParticipantID(aa.id);if(ca&&da&&ca[da]){ba=ca[da];if(c('MercuryConfig').MessengerNewEmojiGK)ba=c('React').createElement(c('MessengerTextWithEmoticons.react'),{renderEmoticons:true,renderEmoji:true,text:ba});}}if(!ba)return y;return i._("{name}: {conversation_snippet}",[i.param('name',ba),i.param('conversation_snippet',y)]);}.bind(this),this.$MercuryThreadSnippet3=function(u){if(u&&u.startsWith('?OTR'))return i._("[encrypted message]");if(u){var v=c('React').createElement(c('TextWithEmoticons.react'),{renderEmoticons:true,renderEmoji:true,text:u.replace(/\r\n|[\r\n]/g,' ')});if(c('MercuryConfig').MessengerNewEmojiGK)v=c('React').createElement(c('MessengerTextWithEmoticons.react'),{renderEmoticons:true,renderEmoji:true,text:u.replace(/\r\n|[\r\n]/g,' ')});return v;}var w=this.props.thread;if(n(w))return (c('React').createElement(c('MercuryAttachmentSnippet.react'),{thread:w,viewer:this.props.viewer}));return null;}.bind(this),p;}m.prototype.shouldComponentUpdate=function(p,q){return this.props.shouldRenderYou!==p.shouldRenderYou||this.props.thread!==p.thread||this.props.viewer!==p.viewer||this.props.className!==p.className||!c('immutable').is(p.participants,this.props.participants);};m.prototype.render=function(){return c('React').createElement('span',{className:this.props.className},this.$MercuryThreadSnippet1(),this.$MercuryThreadSnippet2());};m.propTypes={participants:l.instanceOf(c('immutable').Map).isRequired,shouldAlwaysRenderSender:l.bool,shouldRenderYou:l.bool,thread:l.object.isRequired,viewer:l.string.isRequired};function n(p){return (p.snippet_has_attachment&&p.snippet_attachments&&p.snippet_attachments.length>0);}function o(p){return !p.snippet&&n(p);}f.exports=m;},null);
  __d('MercuryThreadTimestamp.react',['React','formatDate','joinClasses'],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').PureComponent);i=h&&h.prototype;k.prototype.render=function(){var l=this.props.time;if(!l)return c('React').createElement('abbr',null);return (c('React').createElement('abbr',{className:c('joinClasses')(this.props.className,'timestamp'),title:this.props.title||new Date(l).toLocaleDateString(),'data-utime':l/1000},this.props.text||c('formatDate')(new Date(l),'g:ia')));};function k(){h.apply(this,arguments);}k.propTypes={time:j.number,title:j.string,text:j.string};f.exports=k;},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('MercuryPageOrderedThreadlist',['MercuryOrderedThreadlist','MercurySingletonProvider','MessagingTag','MercuryFilters'],function a(b,c,d,e,f,g){'use strict';var h,i;if(c.__markCompiled)c.__markCompiled();h=babelHelpers.inherits(j,c('MercuryOrderedThreadlist'));i=h&&h.prototype;j.getForFBID=function(l){return k.getForFBID(l);};j.get=function(){return k.get();};function j(l){i.constructor.call(this,l);}j.prototype.addNonPriorityThreadsWithoutSort=function(l){var m=this.getThreadlistOrderMap(c('MessagingTag').INBOX,c('MercuryFilters').NONPRIORITY);m.addResourcesWithoutSorting(l,m.getCurrentArraySize());};var k=new (c('MercurySingletonProvider'))(j);f.exports=j;},null);
  __d('MercuryPagesChannelHandlerDEPRECATED',['ChannelConstants','MercuryActionType','MercuryChannelHandlerDEPRECATED','MercuryConfig','MercuryPayloadSource','MercurySingletonProvider','MessagingEvent','MessagingRealtimeConstants'],function a(b,c,d,e,f,g){'use strict';var h,i;if(c.__markCompiled)c.__markCompiled();h=babelHelpers.inherits(j,c('MercuryChannelHandlerDEPRECATED'));i=h&&h.prototype;j.get=function(){return k.get();};j.getForFBID=function(l){return k.getForFBID(l);};j.prototype.__markAsSeen=function(l,m){if(this.isPayloadForCurrentInstance(m))i.__markAsSeen.call(this,l,m);};j.prototype.__handleMessagingPayload=function(l,m){if(this.isPayloadForCurrentInstance(m))i.__handleMessagingPayload.call(this,l,m);};j.prototype.getRouting=function(){return {pages_messaging:this.__handleMessagingPayload};};j.prototype.__getMessagingPayloadType=function(){return c('ChannelConstants').getArbiterType('pages_messaging');};j.prototype.__getMercuryPayloadType=function(){return '';};j.prototype.__getInboxPayloadType=function(){return '';};j.prototype.isPayloadForCurrentInstance=function(l){var m=l.obj[c('MessagingRealtimeConstants').VIEWER_FBID]+'',n=i.getInstanceFBID.call(this)+'';return m===n;};function j(){h.apply(this,arguments);}var k=new (c('MercurySingletonProvider'))(j);f.exports=j;},null);
  __d('MercuryDragDropPrompt.react',['cx','fbt','React'],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.render=function(){'use strict';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")))));};function l(){'use strict';j.apply(this,arguments);}f.exports=l;},null);
  __d('MercurySyncPageEnvironment',['Arbiter','ChannelInitialData','ChannelManager','MercurySyncDeltaHandler'],function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();'use strict';function h(j,k){if(Object.keys(c('ChannelInitialData')).length===0&&JSON.stringify(c('ChannelInitialData'))===JSON.stringify({}))return;if(!k)k=0;c('MercurySyncDeltaHandler').getForFBID(j);c('ChannelManager').subscribeIrisQueue(j,k.toString());c('Arbiter').inform('MercurySyncDeltaHandler/initSeqID',{fbid:j,seqID:k});}function i(j){}f.exports={setUp:h,tearDown:i};},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('PageCustomerConstants',['keyMirror'],function a(b,c,d,e,f,g){'use strict';if(c.__markCompiled)c.__markCompiled();var h={ActionTypes:c('keyMirror')({UPDATE_CUSTOMER_ACTIONS:null,UPDATE_CUSTOMER_DATA:null,UPDATE_CUSTOMER_ADMIN_NOTES_DATA:null,UPDATE_MORE_SHARED_PHOTOS:null,UPDATED_CUSTOMER_TAG_NAMES:null,FETCH_CUSTOMER_DATA:null,FETCH_CUSTOMER_ACTIONS_DATA:null,FETCH_MORE_SHARED_PHOTOS:null,RESET:null,RESET_UI:null,QUERY_TAGS:null,SET_TAG:null,UNSET_TAG:null,SHOW_MORE_HISTORY:null,SHOW_MORE_NOTES:null,SHOW_STORY_PREVIEW:null,HIDE_STORY_PREVIEW:null,TOGGLE_EDIT_NOTE_DIALOG:null,TOGGLE_DELETE_NOTE_DIALOG:null,TOGGLE_FULL_VIEW:null,ADD_NOTE:null,EDIT_NOTE:null,DELETE_NOTE:null,DRAFT_NOTE:null}),PayloadSources:c('keyMirror')({SERVER_ACTION:null,VIEW_ACTION:null}),ContextCardLocations:c('keyMirror')({HOVERCARD_LOCATION:null,INBOX_LOCATION:null})};f.exports=h;},null);
  __d('PageCustomerDispatcher',['Dispatcher_DEPRECATED','PageCustomerConstants'],function a(b,c,d,e,f,g){'use strict';var h,i;if(c.__markCompiled)c.__markCompiled();var j=c('PageCustomerConstants').PayloadSources,k=[];h=babelHelpers.inherits(l,c('Dispatcher_DEPRECATED'));i=h&&h.prototype;l.prototype.$PageCustomerDispatcher1=function(){var m=k;k=[];m.forEach(function(n){return n();});k.length=0;};l.prototype.addPostDispatchCallback=function(m){if(this.isDispatching()){k.push(m);}else m();};l.prototype.handleServerAction=function(m){this.addPostDispatchCallback(function(){var n={source:j.SERVER_ACTION,action:m};this.dispatch(n);this.$PageCustomerDispatcher1();}.bind(this));};l.prototype.handleViewAction=function(m){this.addPostDispatchCallback(function(){var n={source:j.VIEW_ACTION,action:m};this.dispatch(n);this.$PageCustomerDispatcher1();}.bind(this));};function l(){h.apply(this,arguments);}f.exports=new l();},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:'',SWITCH_PRIORITY:''},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('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_MERGE_LABELS:null,TOGGLE_TAG_MANAGEMENT_DIALOG:null,CREATE:null,DELETE:null,EDIT_COLOR:null,MERGE:null},'CUSTOM_TAGS_');Object.assign(h,c('PagesManagerActionType'));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('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});},toggleMergeLabelsSection:function(i,j){c('PagesManagerDispatcher').dispatch({type:c('PagesManagerCustomTagsActionType').TOGGLE_MERGE_LABELS,pageID:i,show:j});},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});},createCustomTag:function(i,j,k){c('PagesManagerDispatcher').dispatch({type:c('PagesManagerCustomTagsActionType').CREATE,pageID:i,tagName:j,color:k});},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});},mergeCustomTag:function(i,j,k){c('PagesManagerDispatcher').dispatch({type:c('PagesManagerCustomTagsActionType').MERGE,pageID:i,tagName:j,oldTags:k});}};f.exports=h;},null);
  __d('PagesManagerLogger',['immutable','PagesAdminToolUIActionType','PagesEventObserver','PagesEventType'],function a(b,c,d,e,f,g){'use strict';if(c.__markCompiled)c.__markCompiled();var h=c('immutable').Map,i=new h(c('PagesAdminToolUIActionType')).toArray();j.prototype.$PagesManagerLogger1=function(k){if(i.indexOf(k)<0)return false;return true;};j.prototype.$PagesManagerLogger2=function(k,l,m,n){if(!this.$PagesManagerLogger1(l))return;var o=n||{};o.action_type=l;c('PagesEventObserver').notify(k,m,o);};j.prototype.logContextCardUIAction=function(k,l,m){this.$PagesManagerLogger2(c('PagesEventType').PAGES_ADMIN_TOOL_CONTEXT_CARD_UI_ACTION,k,l,m);};j.prototype.logManageTagUIAction=function(k,l,m){this.$PagesManagerLogger2(c('PagesEventType').PAGES_ADMIN_TOOL_MANAGE_TAG_UI_ACTION,k,l,m);};j.prototype.logMessageInboxUIAction=function(k,l,m){this.$PagesManagerLogger2(c('PagesEventType').PAGES_ADMIN_TOOL_MESSAGE_INBOX_UI_ACTION,k,l,m);};j.prototype.logHovercardUIAction=function(k,l,m){this.$PagesManagerLogger2(c('PagesEventType').PAGES_ADMIN_TOOL_HOVERCARD_UI_ACTION,k,l,m);};function j(){}f.exports=new j();},null);
  __d('PageCustomerActions',['cx','PageCustomerConstants','ActorURI','MercuryAttachmentType','MercuryAttachmentViewer','MercuryIDs','MercuryPageThreadActions','MessagesViewerSetID','PageCustomerDispatcher','PagesAdminToolUIActionType','PagesManagerLogger','PagesManagerCustomTagsAction','URI','Vector'],function a(b,c,d,e,f,g,h){'use strict';if(c.__markCompiled)c.__markCompiled();var i=c('PageCustomerConstants').ActionTypes,j='/ajax/messaging/attachments/sharedphotos.php',k={toggleContextCardDialog:function(l,m){c('PageCustomerDispatcher').handleViewAction({actionType:i.TOGGLE_FULL_VIEW,pageID:l,userID:m});},resetData:function(l){c('PageCustomerDispatcher').handleViewAction({actionType:i.RESET,pageID:l});},fetchCustomerData:function(l,m){c('PageCustomerDispatcher').handleViewAction({actionType:i.FETCH_CUSTOMER_DATA,pageID:l,userID:m});},fetchCustomerActionsData:function(l,m){c('PageCustomerDispatcher').handleViewAction({actionType:i.FETCH_CUSTOMER_ACTIONS_DATA,pageID:l,userID:m});},fetchMoreSharedPhotos:function(l,m,n){c('PageCustomerDispatcher').handleViewAction({actionType:i.FETCH_MORE_SHARED_PHOTOS,pageID:l,userID:m,shouldLoadAllImages:n});},resetUI:function(l,m){c('PageCustomerDispatcher').handleViewAction({actionType:i.RESET_UI,pageID:l,userID:m});},clickPhotoFullView:function(l,m,n){switch(n.media_type){case c('MercuryAttachmentType').VIDEO:var o=n.dim.split(',');c('MercuryAttachmentViewer').renderVideo({disableForward:true,rootClassName:"_1j1h",videoID:n.fbid,videoSize:new (c('Vector'))(o[0],o[1]),videoURI:n.src_uri});break;case c('MercuryAttachmentType').ANIMATED_IMAGE:case c('MercuryAttachmentType').PHOTO:var p=c('ActorURI').create(new (c('URI'))(j).setQueryData({thread_id:m,image_id:n.fbid}),l);c('MercuryAttachmentViewer').bootstrapWithConfig({actorid:l,dimensions:n.dim,disableForward:true,disablePaging:true,endpoint:p,fbid:n.fbid,setID:c('MessagesViewerSetID').MESSAGES_VIEW_ALL_IN_THREAD,snapToPhoto:true,src:n.src_uri});break;}c('PagesManagerLogger').logContextCardUIAction(c('PagesAdminToolUIActionType').CONTEXT_CARD_CLICK_SHARED_MEDIA,l,{fbid:n.fbid,media_type:n.media_type});},clickProfileLink:function(l,m){c('PagesManagerLogger').logContextCardUIAction(c('PagesAdminToolUIActionType').CONTEXT_CARD_CLICK_PROFILE_LINK,l);},queryTags:function(l,m,n){c('PageCustomerDispatcher').handleViewAction({actionType:i.QUERY_TAGS,pageID:l,userID:m,query:n});},setTag:function(l,m,n){c('PageCustomerDispatcher').handleViewAction({actionType:i.SET_TAG,pageID:l,userID:m,tagName:n});},unsetTag:function(l,m,n){c('PageCustomerDispatcher').handleViewAction({actionType:i.UNSET_TAG,pageID:l,userID:m,tagName:n});},unflag:function(l,m){c('MercuryPageThreadActions').getForFBID(l).removeFlag(c('MercuryIDs').getThreadIDFromUserID(m),'context_card');},updateCustomTagsData:function(l,m){c('PagesManagerCustomTagsAction').updateCustomTagsData(l,m);},showMoreHistory:function(l,m){c('PageCustomerDispatcher').handleViewAction({actionType:i.SHOW_MORE_HISTORY,pageID:l,userID:m});},showMoreNotes:function(l,m){c('PageCustomerDispatcher').handleViewAction({actionType:i.SHOW_MORE_NOTES,pageID:l,userID:m});},showStoryPreview:function(l,m,n){c('PageCustomerDispatcher').handleViewAction({actionType:i.SHOW_STORY_PREVIEW,pageID:l,userID:m,storyToken:n});},hideStoryPreview:function(l,m){c('PageCustomerDispatcher').handleViewAction({actionType:i.HIDE_STORY_PREVIEW,pageID:l,userID:m});},toggleEditNoteDialog:function(l,m,n,o){c('PageCustomerDispatcher').handleViewAction({actionType:i.TOGGLE_EDIT_NOTE_DIALOG,pageID:l,userID:m,noteID:o,showEditNoteDialog:n});},toggleDeleteNoteDialog:function(l,m,n,o){c('PageCustomerDispatcher').handleViewAction({actionType:i.TOGGLE_DELETE_NOTE_DIALOG,pageID:l,userID:m,noteID:n,showDeleteNoteDialog:o});},addNote:function(l,m,n){c('PageCustomerDispatcher').handleViewAction({actionType:i.ADD_NOTE,pageID:l,userID:m,noteBody:n});},editNote:function(l,m,n,o){c('PageCustomerDispatcher').handleViewAction({actionType:i.EDIT_NOTE,pageID:l,userID:m,noteID:n,noteBody:o});},deleteNote:function(l,m,n){c('PageCustomerDispatcher').handleViewAction({actionType:i.DELETE_NOTE,pageID:l,userID:m,noteID:n});},draftNote:function(l,m,n){c('PageCustomerDispatcher').handleViewAction({actionType:i.DRAFT_NOTE,pageID:l,userID:m,noteDraft:n});}};f.exports=k;},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';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(){var m,n;for(var o=arguments.length,p=Array(o),q=0;q<o;q++)p[q]=arguments[q];return m=(n=j.constructor).call.apply(n,[this].concat(p)),this.state={isMouseOver:false},this.$MacroSpan4=function(r){var s=r.key in this.props.tokens?this.props.tokens[r.key].value:r.key,t=r.key in this.props.tokens?this.props.tokens[r.key].key:r.key;return this.state.isMouseOver?t:s;}.bind(this),this.$MacroSpan2=function(){this.setState({isMouseOver:true});}.bind(this),this.$MacroSpan3=function(){this.setState({isMouseOver:false});}.bind(this),this.$MacroSpan5=function(){this.props.onRemoveToken(this.props.offsetKey);}.bind(this),this.$MacroSpan1=function(){return c('DraftEntity').get(this.props.entityKey).getData();}.bind(this),m;}l.prototype.render=function(){var m=this.$MacroSpan1();return c('React').createElement('span',{className:"_vxd",onMouseEnter:this.$MacroSpan2,onMouseLeave:this.$MacroSpan3},c('React').createElement('span',{className:"_vxe",contentEditable:false,'data-offset-key':this.props.offsetKey,spellCheck:false},this.$MacroSpan4(m),c('React').createElement(c('XUICloseButton.react'),{size:'small',className:"_vxf",onClick:this.$MacroSpan5})));};l.propTypes={entityKey:k.string.isRequired,offsetKey:k.string.isRequired,onRemoveToken:k.func.isRequired,tokens:k.object.isRequired};f.exports=l;},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=void 0;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});var o=this.props.initialResponse;!!!o?j(0):void 0;var p=c('XPagesSavedResponsesDeleteController').getURIBuilder().setInt('response_id',o.id).getURI();new (c('AsyncRequest'))().setURI(p).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';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(){var n,o;for(var p=arguments.length,q=Array(p),r=0;r<p;r++)q[r]=arguments[r];return n=(o=k.constructor).call.apply(o,[this].concat(q)),this.state={shouldShowSeeMoreLink:false,shouldLimitHeight:true},this.$SavedResponsesListItem1=function(){if(this.state.shouldLimitHeight===false||this.state.shouldShowSeeMoreLink)return;var s=c('ReactDOM').findDOMNode(this.refs.message);if(s.scrollHeight>s.clientHeight)this.setState({shouldShowSeeMoreLink:true});}.bind(this),this.$SavedResponsesListItem4=function(s){var t=0,u=0,v=/\{{(.*?)\}}/g,w=v.exec(s),x=[];while(w!=null){u=w.index;x.push(c('React').createElement('span',{key:c('ClientIDs').getNewClientID()},s.substring(t,u)));t=u+w[0].length;var y=w[1] in this.props.tokens?this.props.tokens[w[1]].value:w[1];x.push(c('React').createElement('span',{key:c('ClientIDs').getNewClientID(),className:"_-8"},y));w=v.exec(s);}x.push(c('React').createElement('span',{key:c('ClientIDs').getNewClientID()},s.substring(t,s.length)));return x;}.bind(this),this.$SavedResponsesListItem2=function(){this.props.onResponseSelected(this.props.response,this.props.tokens);}.bind(this),this.$SavedResponsesListItem3=function(){this.props.onResponseHover&&this.props.onResponseHover(this.props.response,this.props.tokens);}.bind(this),this.$SavedResponsesListItem5=function(s){this.setState({shouldShowSeeMoreLink:false,shouldLimitHeight:false});s.stopPropagation();}.bind(this),n;}m.prototype.componentDidMount=function(){this.$SavedResponsesListItem1();};m.prototype.componentDidUpdate=function(){this.$SavedResponsesListItem1();};m.prototype.render=function(){var n=this.props.response.image&&true;return c('React').createElement('div',{className:"_33w3"+(n?' '+"_33w4":''),'data-id':this.props.response.id,onClick:this.$SavedResponsesListItem2,onMouseEnter:this.$SavedResponsesListItem3,onMouseLeave:this.props.onResponseUnhover},c('React').createElement('div',{className:"_33w5"+(n?' '+"_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.$SavedResponsesListItem4(this.props.response.message)),c('React').createElement(c('Link.react'),{className:"_4en6"+(!this.state.shouldShowSeeMoreLink?' '+"hidden_elem":''),onClick:this.$SavedResponsesListItem5},i._("See more")));};m.propTypes={onResponseHover:l.func,onResponseSelected:l.func.isRequired,onResponseUnhover:l.func,pageID:l.string.isRequired,response:l.shape({id:l.string.isRequired,title:l.string,message:l.string.isRequired,image:l.object}),tokens:l.object.isRequired};f.exports=m;},null);
  __d('SavedResponsesListView.react',['cx','React','SavedResponsesListItem.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);}l.prototype.render=function(){if(this.props.isLoadingResponses)return (c('React').createElement('div',{className:"_e19"},c('React').createElement(c('XUISpinner.react'),{size:'large'})));var m=this.props.searchQuery.trim().toLowerCase(),n=function(p){return (p.message.toLowerCase().indexOf(m)!==-1||(p.title||'').toLowerCase().indexOf(m)!==-1);},o=c('SavedResponsesUtils').sortSavedResponses(this.props.responses,this.props.sortingKey);return (c('React').createElement('ul',{className:this.props.shouldAdjustRightMargin?"_e1a":''},o.filter(n).map(function(p){return (c('React').createElement(c('SavedResponsesListItem.react'),{key:p.id,onResponseHover:this.props.onResponseHover,onResponseSelected:this.props.onResponseSelected,onResponseUnhover:this.props.onResponseUnhover,pageID:this.props.pageID,response:p,tokens:this.props.supportedMacros}));}.bind(this))));};l.propTypes={isLoadingResponses:k.bool.isRequired,onResponseHover:k.func,onResponseSelected:k.func.isRequired,onResponseUnhover:k.func,pageID:k.string.isRequired,responses:k.array.isRequired,searchQuery:k.string.isRequired,shouldAdjustRightMargin:k.bool};f.exports=l;},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.$SavedResponsesManageListView1=function(q){this.setState({activeSortingOptionKey:q});}.bind(this);this.state={searchQuery:"",activeSortingOptionKey:c('SavedResponsesConstants').sortingKey.LAST_CREATED};}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','React'],function a(b,c,d,e,f,g,h){var i,j;if(c.__markCompiled)c.__markCompiled();var k=1000;i=babelHelpers.inherits(l,c('React').Component);j=i&&i.prototype;function l(m,n){'use strict';j.constructor.call(this,m,n);this.$PagesManagerCountDownTimer2=function(){this.setState({isCountingDown:true});var o=function(){var p=this.$PagesManagerCountDownTimer1(this.props.expireTimestamp);if(p>0){this.setState({timeRemaining:p});this.$PagesManagerCountDownTimer2();return;}this.setState({isCountingDown:false});this.props.onTimeup();}.bind(this);setTimeout(o,k);}.bind(this);this.state={timeRemaining:this.$PagesManagerCountDownTimer1(this.props.expireTimestamp),isCountingDown:false};}l.prototype.componentDidMount=function(){'use strict';if(!this.state.isCountingDown)this.$PagesManagerCountDownTimer2();};l.prototype.componentWillReceiveProps=function(m){'use strict';this.setState({timeRemaining:this.$PagesManagerCountDownTimer1(m.expireTimestamp)});if(!this.state.isCountingDown)this.$PagesManagerCountDownTimer2();};l.prototype.render=function(){'use strict';return c('React').createElement('div',{className:"_3uo9"+(this.props.isHidden?' '+"hidden_elem":'')},this.$PagesManagerCountDownTimer3());};l.prototype.$PagesManagerCountDownTimer3=function(){'use strict';var m=Math.floor(this.state.timeRemaining/1000/60),n=this.$PagesManagerCountDownTimer4(Math.floor(m/60)),o=this.$PagesManagerCountDownTimer4(m%60);return c('React').createElement('span',null,n+':'+o);};l.prototype.$PagesManagerCountDownTimer1=function(m){'use strict';return m?m-Date.now():0;};l.prototype.$PagesManagerCountDownTimer4=function(m){'use strict';return ("0"+m).slice(-2);};f.exports=l;},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('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("XPagesCustomTagCreateController",["XController"],function a(b,c,d,e,f,g){c.__markCompiled&&c.__markCompiled();f.exports=c("XController").create("\/pages\/custom_tag\/create\/",{tag_name:{type:"String",required:true},color:{type:"String"}});},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("XPagesCustomTagMergeController",["XController"],function a(b,c,d,e,f,g){c.__markCompiled&&c.__markCompiled();f.exports=c("XController").create("\/pages\/custom_tag\/merge\/",{tag_name:{type:"String",required:true},old_tags:{type:"StringSet",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','PageCustomerActions','XPagesCustomTagsDataController','XPagesCustomTagCreateController','XPagesCustomTagDeleteController','XPagesCustomTagEditColorController','XPagesCustomTagMergeController'],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;this.$PagesManagerCustomTagsStore3=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.getIsMergingLabels=function(){return this.$PagesManagerCustomTagsStore2;};j.prototype.getIsManagingTags=function(){return this.$PagesManagerCustomTagsStore3;};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_MERGE_LABELS:this.$PagesManagerCustomTagsStore2=k.show;this.__emitChange();break;case c('PagesManagerCustomTagsActionType').TOGGLE_TAG_MANAGEMENT_DIALOG:this.$PagesManagerCustomTagsStore3=k.show;this.$PagesManagerCustomTagsStore2=false;this.__emitChange();break;case c('PagesManagerCustomTagsActionType').CREATE:new (c('AsyncRequest'))().setURI(c('ActorURI').create(c('XPagesCustomTagCreateController').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],hasTagListUpdated:true});}.bind(this)).send();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:[],hasTagListUpdated:true});}}.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],hasTagListUpdated:true});}.bind(this)).send();break;case c('PagesManagerCustomTagsActionType').MERGE:new (c('AsyncRequest'))().setURI(c('ActorURI').create(c('XPagesCustomTagMergeController').getURIBuilder().setString('tag_name',k.tagName).setStringSet('old_tags',k.oldTags).getURI(),k.pageID)).setHandler(function(m){var n=this.$PagesManagerCustomTagsStore1.get(k.pageID);k.oldTags.forEach(function(o){if(n&&n.has(o)&&o!==k.tagName)n['delete'](o);});this.$PagesManagerCustomTagsStore1.set(k.pageID,n);this.__dispatcher.dispatch({type:c('PagesManagerCustomTagsActionType').UPDATE,pageID:k.pageID,customTags:[m.payload],hasTagListUpdated:true});c('PageCustomerActions').resetData(k.pageID);}.bind(this)).send();break;default:break;}};f.exports=new j(c('PagesManagerDispatcher'));},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.$PageCustomTagColorSelector1=function(o){this.props.onToggleSelector(o);this.setState({openSelector:o});}.bind(this);this.$PageCustomTagColorSelector2=function(o){this.props.onSelectColor(o);this.setState({openSelector:false});}.bind(this);this.state={openSelector:false};}m.prototype.$PageCustomTagColorSelector3=function(n){return '#'+l[n].border.substring(2);};m.prototype.$PageCustomTagColorSelector4=function(n){return '#'+l[n].fill.substring(2);};m.prototype.$PageCustomTagColorSelector5=function(n){var o=null;if(n==='FF000000'){o=i('checkmark');}else o='/images/pages/context_card/checkmark/checkmark_'+n+'.png';return c('React').createElement(c('Image.react'),{src:o});};m.prototype.render=function(){var n='/images/pages/context_card/triangle_down/triangle_down_'+this.props.selectedColor+'.png';return (c('React').createElement('span',null,c('React').createElement('div',{className:"_1fj6"+(this.state.openSelector?' '+"_1fj7":''),ref:'colorSelector'},c('React').createElement(c('XUICard.react'),{className:"_1fjd",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}))),c('React').createElement(c('ContextualLayer.react'),{contextRef:function(){return this.refs.colorSelector;}.bind(this),shown:this.state.openSelector,onToggle:function(o){return !o&&this.$PageCustomTagColorSelector1;}.bind(this),position:'below',alignment:'left'},c('React').createElement('div',{className:"_1fj8"},c('React').createElement('div',{className:"_1fjb"}),Object.keys(l).map(function(o){return (c('React').createElement(c('XUICard.react'),{className:"_1fjc",key:o,style:{borderColor:this.$PageCustomTagColorSelector3(o),backgroundColor:this.$PageCustomTagColorSelector4(o)},onClick:function(){return this.$PageCustomTagColorSelector2(o);}.bind(this)},o===this.props.selectedColor?this.$PageCustomTagColorSelector5(o):null));}.bind(this))))));};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.getFBID=function(){'use strict';return this.$PageCustomTagSearchableEntry1.id;};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;if(!k[o]){k[o]=new l(m,n);}else k[o].setAvailableTags(m);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}));p.forEach(function(u){s.push(new (c('PageCustomTagSearchableEntry'))(u));});n(s,m);};f.exports=l;},null);
  __d('PageCustomTagTypeaheadPresenter.react',['cx','fbt','ContextualLayerUpdateOnScroll','LeftRight.react','PageCustomTagSearchableEntry','React','XUITypeaheadViewItem.react','emptyFunction'],function a(b,c,d,e,f,g,h,i){var j,k,l,m,n,o;if(c.__markCompiled)c.__markCompiled();j=babelHelpers.inherits(p,c('React').Component);k=j&&j.prototype;p.prototype.render=function(){'use strict';var t=this.props.entry,u="_599m"+(this.props.highlighted?' '+"_599n":''),v={};if(!this.props.searchBar)v.color=this.props.highlighted?'white':t.getColor();var w=!t.getFBID();return (c('React').createElement('li',{'aria-selected':this.props.highlighted,className:u,key:t.getUniqueID(),onMouseDown:function(x){return this.props.onSelect(t,x);}.bind(this),onMouseEnter:function(){return this.props.onHighlight(t);}.bind(this)},c('React').createElement(c('LeftRight.react'),null,c('React').createElement('div',{style:v},t.getTitle()),w?c('React').createElement('div',{className:"_507"},i._("+ New Label")):null)));};function p(){'use strict';j.apply(this,arguments);}l=babelHelpers.inherits(q,c('React').Component);m=l&&l.prototype;q.prototype.$PageCustomTagsRenderer1=function(t){'use strict';return (c('React').createElement(p,{entry:t,key:t.getUniqueID(),highlighted:t===this.props.highlightedEntry,onHighlight:this.props.onHighlight,onRenderHighlight:this.props.onRenderHighlight,onSelect:this.props.onSelect,searchBar:this.props.searchBar}));};q.prototype.render=function(){'use strict';var t=(!this.props.searchBar?"_50ig":'')+(!this.props.entries.length?' '+"_599s":'');return (c('React').createElement('ul',{className:t,onMouseLeave:function(){return this.props.removeHighlight();}.bind(this)},this.props.entries.map(function(u){return this.$PageCustomTagsRenderer1(u);}.bind(this))));};function q(){'use strict';l.apply(this,arguments);}n=babelHelpers.inherits(r,c('React').Component);o=n&&n.prototype;r.prototype.render=function(){'use strict';var t=this.props.entry;return (c('React').createElement('span',{className:"_4n1-",style:{color:t.getColor()}},t.getTitle()));};function r(){'use strict';n.apply(this,arguments);}var s={useLayer:true,layerBehaviors:{ContextualLayerUpdateOnScroll:c('ContextualLayerUpdateOnScroll')},ViewRenderer:q,TokenRenderer:r};q.defaultProps={removeHighlight:c('emptyFunction'),searchBar:false};f.exports=s;},null);
  __d('PagesManagerManageCustomTagsDialog.react',['cx','fbt','immutable','LeftRight.react','Link.react','ObjectSort','PageCustomTagColorSelector.react','PagesAdminToolUIActionType','PagesContextCardCustomTag.react','PagesManagerCustomTagsAction','PagesManagerLogger','PagesSelectableListCheckbox.react','React','ScrollableArea.react','XUIButton.react','XUIDialog.react','XUIDialogBody.react','XUIDialogButton.react','XUIDialogCancelButton.react','XUIDialogFooter.react','XUIDialogTitle.react','XUISortableDataTable.react','XUITextInput.react','curry','nullthrows'],function a(b,c,d,e,f,g,h,i){'use strict';var j,k;if(c.__markCompiled)c.__markCompiled();var l=350,m=500,n=225,o=25,p=5;j=babelHelpers.inherits(q,c('React').Component);k=j&&j.prototype;function q(r){k.constructor.call(this,r);this.$PagesManagerManageCustomTagsDialog1=function(s){c('PagesManagerLogger').logManageTagUIAction(c('PagesAdminToolUIActionType').TAG_MANAGEMENT_CLICK_DELETE_LINK,this.props.pageID,{fbid:s.id,tag_name:s.name});if(this.state.selectedRows.indexOf(s.name)>=0)this.$PagesManagerManageCustomTagsDialog2(s.name);this.$PagesManagerManageCustomTagsDialog3(true,s);}.bind(this);this.$PagesManagerManageCustomTagsDialog3=function(s,t){this.setState({deleteConfirmationDialogProps:{show:s,actionTag:s?c('nullthrows')(t):null}});}.bind(this);this.$PagesManagerManageCustomTagsDialog4=function(){var s=c('nullthrows')(this.state.deleteConfirmationDialogProps.actionTag);c('PagesManagerLogger').logManageTagUIAction(c('PagesAdminToolUIActionType').TAG_MANAGEMENT_CLICK_CONFIRM_DELETE,this.props.pageID,{fbid:s.id,tag_name:s.name});c('PagesManagerCustomTagsAction').deleteCustomTag(this.props.pageID,s.name);this.$PagesManagerManageCustomTagsDialog3(false);}.bind(this);this.$PagesManagerManageCustomTagsDialog6=function(s,t){c('PagesManagerLogger').logManageTagUIAction(c('PagesAdminToolUIActionType').TAG_MANAGEMENT_CLICK_CHANGE_COLOR,this.props.pageID,{fbid:s.id,tagName:s.name});c('PagesManagerCustomTagsAction').editCustomTagColor(this.props.pageID,s.name,t);}.bind(this);this.$PagesManagerManageCustomTagsDialog7=function(s){c('PagesManagerLogger').logManageTagUIAction(c('PagesAdminToolUIActionType').TAG_MANAGEMENT_CLICK_COLOR_SELECTOR,this.props.pageID,{show:s});}.bind(this);this.$PagesManagerManageCustomTagsDialog8=function(event){this.setState({tagNameInputValue:event.target.value});}.bind(this);this.$PagesManagerManageCustomTagsDialog9=function(event){this.setState({mergeTagNameInputValue:event.target.value});}.bind(this);this.$PagesManagerManageCustomTagsDialog10=function(){c('PagesManagerLogger').logManageTagUIAction(c('PagesAdminToolUIActionType').TAG_MANAGEMENT_CLICK_ADD_TAG,this.props.pageID,{tag_name:this.state.tagNameInputValue});c('PagesManagerCustomTagsAction').createCustomTag(this.props.pageID,this.state.tagNameInputValue);this.setState({tagNameInputValue:''});}.bind(this);this.$PagesManagerManageCustomTagsDialog11=function(){c('PagesManagerLogger').logManageTagUIAction(c('PagesAdminToolUIActionType').TAG_MANAGEMENT_CLICK_MERGE_TAG,this.props.pageID,{tag_name:this.state.mergeTagNameInputValue});c('PagesManagerCustomTagsAction').mergeCustomTag(this.props.pageID,this.state.mergeTagNameInputValue,this.state.selectedRows);this.$PagesManagerManageCustomTagsDialog12(false);this.setState({mergeTagNameInputValue:'',selectedRows:[]});}.bind(this);this.$PagesManagerManageCustomTagsDialog13=function(s){this.setState({hoveredTag:s});}.bind(this);this.$PagesManagerManageCustomTagsDialog15=function(s){if(this.state.selectedRows.indexOf(s)>=0){this.$PagesManagerManageCustomTagsDialog2(s);}else this.$PagesManagerManageCustomTagsDialog14(s);}.bind(this);this.$PagesManagerManageCustomTagsDialog12=function(s){c('PagesManagerCustomTagsAction').toggleMergeLabelsSection(this.props.pageID,s);}.bind(this);this.state={deleteConfirmationDialogProps:{show:false,actionTag:null},tagNameInputValue:'',mergeTagNameInputValue:'',selectedRows:[],hoveredTag:''};}q.prototype.$PagesManagerManageCustomTagsDialog5=function(){return c('React').createElement(c('XUIDialog.react'),{layerHideOnBlur:false,onToggle:function(r){return !r&&this.$PagesManagerManageCustomTagsDialog3(r);}.bind(this),shown:this.state.deleteConfirmationDialogProps.show,width:l},c('React').createElement(c('XUIDialogTitle.react'),{showCloseButton:false},i._("Delete Label?")),c('React').createElement(c('XUIDialogBody.react'),null,i._("Are you sure to delete label \"{label name}\"?",[i.param('label name',this.state.deleteConfirmationDialogProps.actionTag!==null?this.state.deleteConfirmationDialogProps.actionTag.name:null)])),c('React').createElement(c('XUIDialogFooter.react'),null,c('React').createElement(c('XUIDialogCancelButton.react'),null),c('React').createElement(c('XUIDialogButton.react'),{action:'confirm',label:i._("Confirm"),onClick:this.$PagesManagerManageCustomTagsDialog4,use:'confirm'})));};q.prototype.$PagesManagerManageCustomTagsDialog2=function(r){var s=this.state.selectedRows,t=this.state.selectedRows.indexOf(r);s.splice(t,1);this.setState({selectedRows:s});};q.prototype.$PagesManagerManageCustomTagsDialog14=function(r){var s=this.state.selectedRows;s.push(r);this.setState({selectedRows:s});};q.prototype.$PagesManagerManageCustomTagsDialog16=function(r){if(this.state.hoveredTag===r||this.state.selectedRows.indexOf(r)>=0)return c('React').createElement(c('PagesSelectableListCheckbox.react'),{checked:this.state.selectedRows.indexOf(r)>=0,className:"_54un",onChange:c('curry')(this.$PagesManagerManageCustomTagsDialog15,r)});return null;};q.prototype.$PagesManagerManageCustomTagsDialog17=function(){return c('React').createElement('div',{className:"_42xa"},c('React').createElement(c('XUITextInput.react'),{className:"_42xc",placeholder:i._("Name the new combined label..."),xuiError:this.$PagesManagerManageCustomTagsDialog18(),onChange:this.$PagesManagerManageCustomTagsDialog9,value:this.state.mergeTagNameInputValue,maxLength:o}),c('React').createElement(c('XUIButton.react'),{className:"_42xd",label:i._("Combine"),disabled:this.$PagesManagerManageCustomTagsDialog18()||this.state.mergeTagNameInputValue===''||this.state.selectedRows.length<2,use:'confirm',onClick:this.$PagesManagerManageCustomTagsDialog11}));};q.prototype.$PagesManagerManageCustomTagsDialog19=function(){return c('React').createElement('div',{className:"_5hry"},c('React').createElement(c('XUITextInput.react'),{className:"_5hrz",placeholder:i._("Add a label for products, services or common questions..."),xuiError:this.$PagesManagerManageCustomTagsDialog20(),onChange:this.$PagesManagerManageCustomTagsDialog8,value:this.state.tagNameInputValue,maxLength:o}),c('React').createElement(c('XUIButton.react'),{className:"_5hr-",label:i._("Add"),disabled:this.$PagesManagerManageCustomTagsDialog20()||this.state.tagNameInputValue==='',use:'confirm',onClick:this.$PagesManagerManageCustomTagsDialog10}));};q.prototype.$PagesManagerManageCustomTagsDialog21=function(){if(this.props.customTags.size===0)return null;var r=c('React').createElement('div',{className:"_31fn"},this.props.customTags.toArray().map(function(s){return c('React').createElement(c('LeftRight.react'),{className:"_2zxg",key:s.id,onMouseEnter:c('curry')(this.$PagesManagerManageCustomTagsDialog13,s.name),onMouseLeave:c('curry')(this.$PagesManagerManageCustomTagsDialog13,'')},c('React').createElement('div',null,this.$PagesManagerManageCustomTagsDialog16(s.name),c('React').createElement(c('PageCustomTagColorSelector.react'),{selectedColor:s.color,onSelectColor:function(t){return this.$PagesManagerManageCustomTagsDialog6(s,t);}.bind(this),onToggleSelector:this.$PagesManagerManageCustomTagsDialog7}),c('React').createElement(c('PagesContextCardCustomTag.react'),{canRemove:false,tagData:s})),c('React').createElement(c('Link.react'),{onClick:c('curry')(this.$PagesManagerManageCustomTagsDialog1,s)},i._("Delete")));}.bind(this)));if(this.props.customTags.size>p)return c('React').createElement(c('ScrollableArea.react'),{height:n},r);return r;};q.prototype.$PagesManagerManageCustomTagsDialog20=function(){if(this.props.customTags.has(this.state.tagNameInputValue))return i._("Label name must be unique.");if(this.state.tagNameInputValue.indexOf(':')!==-1)return i._("Label name can not contain ':'.");return null;};q.prototype.$PagesManagerManageCustomTagsDialog18=function(){if(this.state.mergeTagNameInputValue.indexOf(':')!==-1)return i._("Label name can not contain ':'.");return null;};q.prototype.render=function(){var r=this.props.isMergingLabels&&this.state.selectedRows.length>1?this.$PagesManagerManageCustomTagsDialog17():this.$PagesManagerManageCustomTagsDialog19();return (c('React').createElement(c('XUIDialog.react'),{layerHideOnBlur:false,onToggle:this.props.onToggle,shown:this.props.show,width:m},c('React').createElement(c('XUIDialogTitle.react'),{showCloseButton:false},i._("Add & Manage Labels")),c('React').createElement(c('XUIDialogBody.react'),null,c('React').createElement('div',{className:"_5hrx"},i._("Labels help you track and find conversations. Create your own labels and apply them to people based on what they messaged you about.")),c('React').createElement('div',{className:(this.state.selectedRows.length<2||this.props.isMergingLabels?"hidden_elem":'')+(' '+"_54uo")},c('React').createElement(c('XUIButton.react'),{className:"_54up",label:i._("Combine"),use:'confirm',onClick:c('curry')(this.$PagesManagerManageCustomTagsDialog12,true)})),this.$PagesManagerManageCustomTagsDialog21(),this.$PagesManagerManageCustomTagsDialog5(),r),c('React').createElement(c('XUIDialogFooter.react'),null,c('React').createElement(c('XUIDialogButton.react'),{action:'cancel',label:i._("Close"),use:'confirm'}))));};f.exports=q;},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,SET_APPOINTMENT_BANNER_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},CLASSIFIER:{INITIALIZE_STORE:null,CHECK_FOR_INTENT:null,NOTIFY_INTENT_CLASSIFIED:null,NOTIFY_NOTIFICATION_HEIGHT_CHANGED:null,REJECT_NOTIFICATION_REQUEST:null,ACCEPT_NOTIFICATION_REQUEST:null,THREAD_INTENT_UPDATED:null,VERIFY_INTENT: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','PagesAdminToolUIActionType','PagesManagerLogger'],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('PagesManagerLogger').logMessageInboxUIAction(c('PagesAdminToolUIActionType').MESSAGE_INBOX_CLICK_AWAY_TOGGLE,i,{away: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('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('PagesManagerMessagingClassifierActions',['PagesManagerMessagingMessagelistDispatcher','PagesManagerMessagingActionType'],function a(b,c,d,e,f,g){'use strict';if(c.__markCompiled)c.__markCompiled();var h=c('PagesManagerMessagingActionType').CLASSIFIER,i={ActionTypes:h,checkForIntent:function(j,k,l){c('PagesManagerMessagingMessagelistDispatcher').dispatch({type:h.CHECK_FOR_INTENT,message:j,userID:k,pageID:l});},initializeStore:function(j,k){c('PagesManagerMessagingMessagelistDispatcher').dispatch({type:h.INITIALIZE_STORE,config:j,pageID:k});},notifyIntentClassified:function(j){c('PagesManagerMessagingMessagelistDispatcher').dispatch({type:h.NOTIFY_INTENT_CLASSIFIED,intent:j});},notifyNotificationHeightChanged:function(j){c('PagesManagerMessagingMessagelistDispatcher').dispatch({type:h.NOTIFY_NOTIFICATION_HEIGHT_CHANGED,height:j});},rejectNotificationRequest:function(j,k){c('PagesManagerMessagingMessagelistDispatcher').dispatch({type:h.REJECT_NOTIFICATION_REQUEST,intent:j,pageID:k});},acceptNotificationRequest:function(j,k){c('PagesManagerMessagingMessagelistDispatcher').dispatch({type:h.ACCEPT_NOTIFICATION_REQUEST,intent:j,pageID:k});},notifyThreadIntentUpdated:function(j,k){c('PagesManagerMessagingMessagelistDispatcher').dispatch({type:h.THREAD_INTENT_UPDATED,context:k,pageID:j});},verifyIntentClassification:function(j,k,l){c('PagesManagerMessagingMessagelistDispatcher').dispatch({type:h.VERIFY_INTENT,messageID:j,message:k,result:l});}};f.exports=i;},null);
  __d('NativeComponentFlowBookingRequestMutation',['Relay','RelayMutationType'],function a(b,c,d,e,f,g){'use strict';var h,i;if(c.__markCompiled)c.__markCompiled();h=babelHelpers.inherits(j,c('Relay').Mutation);i=h&&h.prototype;j.prototype.getMutation=function(){return function(){return {calls:[{kind:'Call',metadata:{},name:'native_booking_request_status_update',value:{kind:'CallVariable',callVariableName:'input'}}],children:[{fieldName:'client_mutation_id',kind:'Field',metadata:{isGenerated:true,isRequisite:true},type:'ID'}],kind:'Mutation',metadata:{inputType:'NativeBookingRequestStatusUpdateData!'},name:'NativeComponentFlowBookingRequestMutation',responseType:'NativeBookingRequestStatusUpdateResponsePayload'};}();};j.prototype.getVariables=function(){return {action:this.props.action,actor_id:this.props.actor_id,request_id:this.props.request_id,suggested_time:this.props.suggested_time};};j.prototype.getFatQuery=function(){return function(){return {children:[{children:[{fieldName:'id',kind:'Field',metadata:{isGenerated:true,isRequisite:true},type:'ID'}],fieldName:'request',kind:'Field',metadata:{canHaveSubselections:true,inferredRootCallName:'node',inferredPrimaryKey:'id'},type:'NativeComponentFlowBookingRequest'}],id:c('Relay').QL.__id(),kind:'Fragment',metadata:{},name:'NativeComponentFlowBookingRequestMutationRelayQL',type:'NativeComponentFlowRequestRescheduleResponsePayload'};}();};j.prototype.getConfigs=function(){return [{type:c('RelayMutationType').FIELDS_CHANGE,fieldIDs:{request:this.props.request_id}}];};function j(){h.apply(this,arguments);}j.fragments={request:function(){return function(){return {children:[{fieldName:'booking_status',kind:'Field',metadata:{},type:'PagesPlatformNativeBookingStatus'},{fieldName:'start_time',kind:'Field',metadata:{},type:'Time'},{fieldName:'id',kind:'Field',metadata:{isGenerated:true,isRequisite:true},type:'ID'}],id:c('Relay').QL.__id(),kind:'Fragment',metadata:{},name:'NativeComponentFlowBookingRequestMutation_RequestRelayQL',type:'NativeComponentFlowBookingRequest'};}();}};f.exports=j;},null);
  __d('PagesManagerMessagingAppointmentDialogDetailPane.react',['cx','fbt','invariant','AbstractTextArea.react','BUIDateTimePicker.react','DateTime','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('DateTime').localNow(),n=m.timezoneID;k=babelHelpers.inherits(o,c('React').Component);l=k&&k.prototype;function o(p){l.constructor.call(this,p);this.state={dateTime:m};}o.prototype.$PagesManagerMessagingAppointmentDialogDetailPane1=function(){var p=this.props.appointment;if(!p)return null;var q=null,r=c('DateTime').localCreate(p.start_time);switch(p.booking_status){case 'PENDING':q="_zck";break;case 'CONFIRMED':q="_zcn";break;default:j(0);}return (c('React').createElement('div',{className:"_zcq"},c('React').createElement('div',{className:"_3-96"},c('React').createElement('div',{className:"_zcr"},i._("Service")),c('React').createElement('div',{className:"_zcs"},p.product_item.name,c('React').createElement('span',{className:"_zct"},p.product_item.experimental_freeform_price))),c('React').createElement('div',{className:"_3-96"},c('React').createElement('div',{className:"_zcr"},i._("Appointment")),c('React').createElement('div',{className:"_zcs"},r.format('l, F jS, g:ia'))),c('React').createElement('div',{className:"_3-96"},c('React').createElement('div',{className:"_zcr"},i._("Status")),c('React').createElement('div',{className:q},p.status)),c('React').createElement('div',{className:"_3-96"},c('React').createElement('div',{className:"_zcr"},i._("Notes")),c('React').createElement(c('AbstractTextArea.react'),{className:"_zcu",onChange:function(){},placeholder:i._("Add notes about this appointment. These will not be visible to the person.")}))));};o.prototype.$PagesManagerMessagingAppointmentDialogDetailPane2=function(){var p=this.props.appointment;if(!p)return null;return (c('React').createElement('div',{className:"_zcq"},c('React').createElement('div',{className:"_3-96"},c('React').createElement('div',{className:"_zcr"},i._("Service")),c('React').createElement('div',{className:"_zcs"},p.product_item.name,c('React').createElement('span',{className:"_zct"},p.product_item.experimental_freeform_price))),c('React').createElement('div',{className:"_3-96"},c('React').createElement('div',{className:"_zcr"},i._("{user name}' availability",[i.param('user name',this.props.appointment.user.name)])),p.user_availability),c('React').createElement('div',{className:"_zcv"},c('React').createElement('div',{className:"_3-95"},i._("Propose a time for the appointment")),c('React').createElement(c('BUIDateTimePicker.react'),{height:'tall',onChange:function(q){if(this.props.onSelectedDateTimeChange)this.props.onSelectedDateTimeChange(q);this.setState({dateTime:q});}.bind(this),timezoneID:n,value:this.state.dateTime}))));};o.prototype.render=function(){switch(this.props.appointment.booking_status){case 'PENDING':case 'CONFIRMED':return this.$PagesManagerMessagingAppointmentDialogDetailPane1();case 'REQUESTED':case 'DECLINED':return this.$PagesManagerMessagingAppointmentDialogDetailPane2();}return null;};f.exports=o;},null);
  __d('PagesManagerMessagingAppointmentDialogNavItem.react',['cx','fbt','DateTime','Link.react','React'],function a(b,c,d,e,f,g,h,i){'use strict';if(c.__markCompiled)c.__markCompiled();var j=function(k){var l=k.appointment;if(!l)return null;var m=null,n=null;switch(l.booking_status){case 'PENDING':m=c('React').createElement('span',{className:"_2qum"},k.appointment.status);n=c('DateTime').localCreate(l.start_time).format('l, F jS, g:ia');break;case 'CONFIRMED':m=c('React').createElement('span',{className:"_2qun"},k.appointment.status);n=c('DateTime').localCreate(l.start_time).format('l, F jS, g:ia');break;case 'REQUESTED':case 'DECLINED':var o=c('DateTime').localCreate(l.requested_time).format('l, F jS, g:ia');n=i._("Sent on {time of the request was sent}",[i.param('time of the request was sent',o)]);break;default:m=null;}return (c('React').createElement('div',{className:"_2quo"},c('React').createElement(c('Link.react'),{className:"_2qur",onClick:function(){return k.onClick(l);}},c('React').createElement('div',{className:"_2qus"},l.product_item.name),c('React').createElement('div',{className:"_2quw"},n)),m));};f.exports=j;},null);
  __d('PagesManagerMessagingAppointmentDialog.react',['cx','fbt','DateTime','LayerFadeOnHide','LayerHideOnEscape','NativeBookingRequestStatusUpdateAction','NativeComponentFlowBookingRequestMutation','PagesManagerMessagingAppointmentDialogDetailPane.react','PagesManagerMessagingAppointmentDialogNavItem.react','React','Relay','XUIDialog.react','XUIDialogBody.react','XUIDialogButton.react','XUIDialogFooter.react','XUIDialogTitle.react'],function a(b,c,d,e,f,g,h,i){'use strict';var j,k;if(c.__markCompiled)c.__markCompiled();var l=400;j=babelHelpers.inherits(m,c('React').Component);k=j&&j.prototype;function m(o){k.constructor.call(this,o);n.call(this);var p=o.appointments.length===1?o.appointments[0]:null;this.state={currentAppointment:p,selectedDateTime:null};}m.prototype.$PagesManagerMessagingAppointmentDialog4=function(){var o=this.state.currentAppointment;if(!o)return null;if(o.booking_status==='PENDING'||o.booking_status==='CONFIRMED'){return (c('React').createElement(c('XUIDialogFooter.react'),null,c('React').createElement(c('XUIDialogButton.react'),{action:'button',label:i._("Cancel Appointment"),onClick:this.$PagesManagerMessagingAppointmentDialog1}),c('React').createElement(c('XUIDialogButton.react'),{action:'button',label:i._("Done"),onClick:this.$PagesManagerMessagingAppointmentDialog2,use:'confirm'})));}else if(o.booking_status==='REQUESTED'||o.booking_status==='DECLINED')return (c('React').createElement(c('XUIDialogFooter.react'),null,c('React').createElement(c('XUIDialogButton.react'),{action:'button',label:i._("Schedule an Appointment"),onClick:this.$PagesManagerMessagingAppointmentDialog3,use:'confirm'})));return null;};m.prototype.render=function(){if(!this.props.dialogShown)return null;var o=null;if(!this.state.currentAppointment){var p=this.props.appointments.map(function(q){return (c('React').createElement(c('PagesManagerMessagingAppointmentDialogNavItem.react'),{appointment:q,key:q.id,onClick:function(r){return this.setState({currentAppointment:r});}.bind(this)}));}.bind(this));o=c('React').createElement('div',{className:"_25xb"},p);}else o=c('React').createElement(c('PagesManagerMessagingAppointmentDialogDetailPane.react'),{appointment:this.state.currentAppointment,onSelectedDateTimeChange:function(q){return this.setState({selectedDateTime:q});}.bind(this)});return (c('React').createElement(c('XUIDialog.react'),{behaviors:{LayerFadeOnHide:c('LayerFadeOnHide'),LayerHideOnEscape:c('LayerHideOnEscape')},causalElementRef:this.props.causalElementRef,onToggle:function(q){return this.props.onToggle(q);}.bind(this),shown:this.props.dialogShown,width:l},c('React').createElement(c('XUIDialogTitle.react'),null,i._("Schedule Appointment")),c('React').createElement(c('XUIDialogBody.react'),null,o),this.$PagesManagerMessagingAppointmentDialog4()));};var n=function(){this.$PagesManagerMessagingAppointmentDialog1=function(){var o=this.state.currentAppointment;if(!o)return;c('Relay').Store.commitUpdate(new (c('NativeComponentFlowBookingRequestMutation'))({action:c('NativeBookingRequestStatusUpdateAction').ADMIN_CANCEL,actor_id:this.props.actorID,request_id:o.id,suggested_time:o.start_time}));this.setState({currentAppointment:null});this.props.onToggle(false);}.bind(this);this.$PagesManagerMessagingAppointmentDialog2=function(){this.setState({currentAppointment:null});this.props.onToggle(false);}.bind(this);this.$PagesManagerMessagingAppointmentDialog3=function(){var o=this.state,p=o.currentAppointment,q=o.selectedDateTime;if(!p||!q)return;c('Relay').Store.commitUpdate(new (c('NativeComponentFlowBookingRequestMutation'))({action:c('NativeBookingRequestStatusUpdateAction').SCHEDULE,actor_id:this.props.actorID,request_id:p.id,suggested_time:q.getUnixTimestampSeconds()}));this.setState({currentAppointment:null});this.props.onToggle(false);}.bind(this);};f.exports=m;},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});},setHotLikeEnd:function(){c('PagesManagerMessagingMessagelistDispatcher').dispatch({type:c('PagesManagerMessagingActionType').HOT_LIKE.END});},setHotLikeStart:function(k){c('PagesManagerMessagingMessagelistDispatcher').dispatch({type:c('PagesManagerMessagingActionType').HOT_LIKE.START,preview:k});},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});},setAppointmentBannerHeight:function(k){c('PagesManagerMessagingMessagelistDispatcher').dispatch({type:c('PagesManagerMessagingActionType').SET_APPOINTMENT_BANNER_HEIGHT,appointmentBannerHeight:k});},setAppointmentScheduleBannerHeight:function(k){c('PagesManagerMessagingMessagelistDispatcher').dispatch({type:c('PagesManagerMessagingActionType').SET_APPOINTMENT_BANNER_HEIGHT,appointmentBannerHeight:k});},setAppointmentStatusBannerHeight:function(k){c('PagesManagerMessagingMessagelistDispatcher').dispatch({type:c('PagesManagerMessagingActionType').SET_APPOINTMENT_BANNER_HEIGHT,appointmentBannerHeight: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,l){c('PagesManagerMessagingMessagelistDispatcher').dispatch({type:c('PagesManagerMessagingActionType').SET_IS_CONTEXT_CARD_HIDDEN,pageID:k,isHidden:l});},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('PagesManagerMessagingAppointmentBannerContainer.react',['cx','fbt','PagesManagerMessagingMessagelistAction','DateTime','Image.react','Layout.react','Link.react','PagesManagerMessagingAppointmentDialog.react','NativeComponentFlowBookingRequestMutation','React','ReactDOM','Relay','fbglyph','getByPath'],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=100;j=babelHelpers.inherits(o,c('React').Component);k=j&&j.prototype;function o(p){k.constructor.call(this,p);this.state={dialogShown:false,dialogAppointments:[]};}o.prototype.componentWillMount=function(){this.props.relay.setVariables({pageID:this.props.pageID,count:n});};o.prototype.componentWillReceiveProps=function(p){this.props.relay.setVariables({pageID:p.pageID,count:n});};o.prototype.$PagesManagerMessagingAppointmentBanner1=function(p){return (p.booking_status==='REQUESTED'||p.booking_status==='DECLINED');};o.prototype.$PagesManagerMessagingAppointmentBanner2=function(p){return (p.booking_status==='PENDING'||p.booking_status==='CONFIRMED');};o.prototype.$PagesManagerMessagingAppointmentBanner3=function(p){return this.$PagesManagerMessagingAppointmentBanner1(p)||this.$PagesManagerMessagingAppointmentBanner2(p);};o.prototype.$PagesManagerMessagingAppointmentBanner4=function(p,q){if(p.length===0)return null;var r=c('getByPath')(this.props,['user','native_booking_request','edges']);if(!r||r.length===0)return null;var s=[];r.forEach(function(t){if(this.$PagesManagerMessagingAppointmentBanner3(t.node))s.push(t.node);}.bind(this));if(q)return (c('React').createElement(c('Link.react'),{className:"_1hgm _1hgn",onClick:function(){this.setState({dialogShown:true,dialogAppointments:s});}.bind(this),role:'button'},c('React').createElement('span',{className:"_1hgo _1hgp"},i._({"*":"{user name} requested {number} appointments","268435456":"{user name} requested 1  appointment "},[i.param('user name',this.props.user.name),i.plural(p.length,'number')])),c('React').createElement('span',{className:"_2pis _1hgq"},i._("Schedule an Appointment"))));return (c('React').createElement(c('Link.react'),{className:"_1hgn",onClick:function(){this.setState({dialogShown:true,dialogAppointments:s});}.bind(this),role:'button'},c('React').createElement('div',{className:"_3-8t _2pi3 _1hgn _1hgp"},i._({"*":"{user name} requested {number} appointments","268435456":"{user name} requested 1  appointments "},[i.param('user name',this.props.user.name),i.plural(p.length,'number')])),c('React').createElement('div',{className:"_2ph- _1hgr"},i._("Schedule an Appointment"))));};o.prototype.$PagesManagerMessagingAppointmentBanner5=function(p){if(p.length===0)return null;if(p.length===1){var q=p[0],r=c('DateTime').localCreate(q.start_time),s=null;switch(q.booking_status){case 'PENDING':s="_1hgs";break;case 'COMFIRMED':s="_1hgt";break;}return (c('React').createElement(c('Link.react'),{className:"_1hgm",onClick:function(){this.setState({dialogShown:true,dialogAppointments:p});}.bind(this),role:'button'},c('React').createElement('span',{className:"_2pii _1hgp"},r.format('l, F jS, g:ia')),c('React').createElement('span',{className:"_2pii _1hgu _1hgv"},q.product_item.name),c('React').createElement('span',{className:s},q.status),c('React').createElement('span',null)));}return (c('React').createElement(c('Link.react'),{className:"_1hgm _1hgp",onClick:function(){this.setState({dialogShown:true,dialogAppointments:p});}.bind(this),role:'button'},i._({"*":"You sent {number} appointments","268435456":"You sent 1  appointments "},[i.plural(p.length,'number')])));};o.prototype.$PagesManagerMessagingAppointmentBanner6=function(){if(!this.state.dialogShown||this.state.dialogAppointments.length===0)return null;return (c('React').createElement(c('PagesManagerMessagingAppointmentDialog.react'),{actorID:this.props.viewer.actor.id,appointments:this.state.dialogAppointments,causalElementRef:function(){return this;}.bind(this),dialogShown:this.state.dialogShown,onToggle:function(p){return this.setState({dialogShown:p});}.bind(this)}));};o.prototype.render=function(){var p=c('getByPath')(this.props,['user','native_booking_request','edges']);if(!p||p.length===0)return null;var q=[],r=[];p.forEach(function(s){if(this.$PagesManagerMessagingAppointmentBanner1(s.node)){q.push(s.node);}else if(this.$PagesManagerMessagingAppointmentBanner2(s.node))r.push(s.node);}.bind(this));return (c('React').createElement('div',{className:"_1hgy",ref:function(s){if(s&&c('ReactDOM').findDOMNode(s)){c('PagesManagerMessagingMessagelistAction').setAppointmentBannerHeight(c('ReactDOM').findDOMNode(s).clientHeight);}else c('PagesManagerMessagingMessagelistAction').setAppointmentBannerHeight(0);}},this.$PagesManagerMessagingAppointmentBanner6(),this.$PagesManagerMessagingAppointmentBanner4(q,r.length!==0),this.$PagesManagerMessagingAppointmentBanner5(r)));};f.exports=c('Relay').createContainer(o,{initialVariables:{pageID:'0',count:n},fragments:{user:function(){return function(p){return {children:[{fieldName:'name',kind:'Field',metadata:{},type:'String'},{calls:[{kind:'Call',metadata:{},name:'requests_on_page',value:{kind:'CallVariable',callVariableName:'pageID'}},{kind:'Call',metadata:{},name:'first',value:{kind:'CallVariable',callVariableName:'count'}}],children:[{children:[{children:[].concat.apply([],[{fieldName:'booking_status',kind:'Field',metadata:{},type:'PagesPlatformNativeBookingStatus'},{fieldName:'id',kind:'Field',metadata:{isRequisite:true},type:'ID'},{children:[{fieldName:'experimental_freeform_price',kind:'Field',metadata:{},type:'String'},{fieldName:'name',kind:'Field',metadata:{},type:'String'},{fieldName:'id',kind:'Field',metadata:{isGenerated:true,isRequisite:true},type:'ID'}],fieldName:'product_item',kind:'Field',metadata:{canHaveSubselections:true,inferredRootCallName:'node',inferredPrimaryKey:'id'},type:'ProductItem'},{fieldName:'requested_time',kind:'Field',metadata:{},type:'Time'},{fieldName:'start_time',kind:'Field',metadata:{},type:'Time'},{fieldName:'status',kind:'Field',metadata:{},type:'String'},{fieldName:'user_availability',kind:'Field',metadata:{},type:'String'},{children:[{fieldName:'name',kind:'Field',metadata:{},type:'String'},{fieldName:'id',kind:'Field',metadata:{isGenerated:true,isRequisite:true},type:'ID'}],fieldName:'user',kind:'Field',metadata:{canHaveSubselections:true,inferredRootCallName:'node',inferredPrimaryKey:'id'},type:'User'},c('Relay').QL.__frag(p)]),fieldName:'node',kind:'Field',metadata:{canHaveSubselections:true,inferredRootCallName:'node',inferredPrimaryKey:'id',isRequisite:true},type:'NativeComponentFlowBookingRequest'},{fieldName:'cursor',kind:'Field',metadata:{isGenerated:true,isRequisite:true},type:'ID'}],fieldName:'edges',kind:'Field',metadata:{canHaveSubselections:true,isPlural:true},type:'NativeBookingRequestsEdge'},{children:[{fieldName:'has_next_page',kind:'Field',metadata:{isGenerated:true,isRequisite:true},type:'Boolean'},{fieldName:'has_previous_page',kind:'Field',metadata:{isGenerated:true,isRequisite:true},type:'Boolean'}],fieldName:'page_info',kind:'Field',metadata:{canHaveSubselections:true,isGenerated:true,isRequisite:true},type:'PageInfo'}],fieldName:'native_booking_request',kind:'Field',metadata:{canHaveSubselections:true,isConnection:true},type:'NativeBookingRequestsConnection'},{fieldName:'id',kind:'Field',metadata:{isGenerated:true,isRequisite:true},type:'ID'}],id:c('Relay').QL.__id(),kind:'Fragment',metadata:{},name:'PagesManagerMessagingAppointmentBannerContainer_react_UserRelayQL',type:'User'};}(c('NativeComponentFlowBookingRequestMutation').getFragment('request'));},viewer:function(){return function(){return {children:[{children:[{fieldName:'id',kind:'Field',metadata:{isRequisite:true},type:'ID'},{fieldName:'__typename',kind:'Field',metadata:{isGenerated:true,isRequisite:true},type:'String'}],fieldName:'actor',kind:'Field',metadata:{canHaveSubselections:true,inferredRootCallName:'node',inferredPrimaryKey:'id',isAbstract:true},type:'Actor'}],id:c('Relay').QL.__id(),kind:'Fragment',metadata:{},name:'PagesManagerMessagingAppointmentBannerContainer_react_ViewerRelayQL',type:'Viewer'};}();}}});},null);
  __d('PagesManagerMessagingAppointmentBannerRoute',['Relay'],function a(b,c,d,e,f,g){'use strict';var h,i;if(c.__markCompiled)c.__markCompiled();h=babelHelpers.inherits(j,c('Relay').Route);i=h&&h.prototype;function j(){h.apply(this,arguments);}j.paramDefinitions={userID:{type:'String',required:true}};j.queries={user:function(k){return function(l){return {calls:[{kind:'Call',metadata:{type:'ID!'},name:'id',value:{kind:'CallVariable',callVariableName:'userID'}}],children:[].concat.apply([],[{fieldName:'id',kind:'Field',metadata:{isGenerated:true,isRequisite:true},type:'ID'},{fieldName:'__typename',kind:'Field',metadata:{isGenerated:true,isRequisite:true},type:'String'},c('Relay').QL.__frag(l)]),fieldName:'node',kind:'Query',metadata:{isAbstract:true,identifyingArgName:'id',identifyingArgType:'ID!'},name:'PagesManagerMessagingAppointmentBannerRoute',type:'Node'};}(k.getFragment('user'));},viewer:function(k){return function(l){return {children:[].concat.apply([],[c('Relay').QL.__frag(l)]),fieldName:'viewer',kind:'Query',metadata:{},name:'PagesManagerMessagingAppointmentBannerRoute',type:'Viewer'};}(k.getFragment('viewer'));}};j.routeName='PagesManagerMessagingAppointmentBannerRoute';f.exports=j;},null);
  __d('PagesManagerMessagingAppointmentBannerRoot.react',['PagesManagerMessagingAppointmentBannerContainer.react','PagesManagerMessagingAppointmentBannerRoute','React','RelayRootContainer'],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;j.prototype.render=function(){if(!this.props.pageID||!this.props.userID)return null;return (c('React').createElement(c('RelayRootContainer'),{Component:c('PagesManagerMessagingAppointmentBannerContainer.react'),renderFetched:function(k){return (c('React').createElement(c('PagesManagerMessagingAppointmentBannerContainer.react'),babelHelpers['extends']({},this.props,k)));}.bind(this),route:new (c('PagesManagerMessagingAppointmentBannerRoute'))({userID:this.props.userID})}));};function j(){h.apply(this,arguments);}f.exports=j;},null);
  __d('PagesMessagingIntent',[],function a(b,c,d,e,f,g){'use strict';if(c.__markCompiled)c.__markCompiled();f.exports={PRICE:'#prices',HOURS:'#hours',APPOINTMENT:'#appointment',LOCATION:'#location',PAYMENTS:'#payments',PURCHASE:'#purchase',CONTACT:'#contact',AVAILABILITY:'#availability',DELIVERY:'#delivery',SUPPORT:'#support',PRODUCT_INQUIRY:'#product_inquiry',COMPLAINTS:'#complaints',EXCHANGE_REFUND:'#exchange_refund',SOLICITATION:'#solicitation',THANKS:'#thanks'};},null);
  __d('PagesManagerMessagingClassifierUtil',['fbt','FbtResult','PagesMessagingIntent'],function a(b,c,d,e,f,g,h){'use strict';if(c.__markCompiled)c.__markCompiled();var i={getIntentDescription:function(j){switch(j){case c('PagesMessagingIntent').PRICE:return h._("Pricing");case c('PagesMessagingIntent').HOURS:return h._("Business Hours");case c('PagesMessagingIntent').DELIVERY:return h._("Delivery");case c('PagesMessagingIntent').APPOINTMENT:return h._("Appointment or Booking");case c('PagesMessagingIntent').LOCATION:return h._("Location");case c('PagesMessagingIntent').PAYMENTS:return h._("Payment");case c('PagesMessagingIntent').PURCHASE:return h._("Purchasing");case c('PagesMessagingIntent').CONTACT:return h._("Getting In Touch");case c('PagesMessagingIntent').EXCHANGE_REFUND:return h._("Exchange or Refund");case c('PagesMessagingIntent').AVAILABILITY:return h._("Availability");case c('PagesMessagingIntent').THANKS:return h._("Thanks");case c('PagesMessagingIntent').PRODUCT_INQUIRY:return h._("Product Inquiry");case c('PagesMessagingIntent').COMPLAINTS:return h._("Complaints");case c('PagesMessagingIntent').SOLICITATION:return h._("Solicitation");case c('PagesMessagingIntent').SUPPORT:return h._("Support");default:throw new Error('invalid intent provided');}}};f.exports=i;},null);
  __d('PagesManagerMessagingThreadIntentTaggingSubscription',['invariant','GraphQLSubscription','Relay'],function a(b,c,d,e,f,g,h){'use strict';var i,j;if(c.__markCompiled)c.__markCompiled();i=babelHelpers.inherits(k,c('GraphQLSubscription'));j=i&&i.prototype;function k(l,m){j.constructor.call(this,{page_id:l},function(n){var o=n.pages_inbox_intent_tagging_subscribe.context;m({intent:o.last_classified_intent,messageID:o.last_classified_message_id,userID:o.user.id,isVerified:o.is_last_classification_verified,score:o.last_classified_score});});}k.prototype.getSubscriptionQuery=function(l){!('page_id' in l)?h(0):void 0;return function(){return {calls:[{kind:'Call',metadata:{},name:'pages_inbox_intent_tagging_subscribe',value:{kind:'CallVariable',callVariableName:'input'}}],children:[{children:[{fieldName:'last_classified_intent',kind:'Field',metadata:{},type:'String'},{fieldName:'last_classified_message_id',kind:'Field',metadata:{},type:'ID'},{fieldName:'is_last_classification_verified',kind:'Field',metadata:{},type:'Boolean'},{fieldName:'last_classified_score',kind:'Field',metadata:{},type:'Int'},{children:[{fieldName:'id',kind:'Field',metadata:{isRequisite:true},type:'ID'}],fieldName:'user',kind:'Field',metadata:{canHaveSubselections:true,inferredRootCallName:'node',inferredPrimaryKey:'id'},type:'User'},{fieldName:'id',kind:'Field',metadata:{isGenerated:true,isRequisite:true},type:'ID'}],fieldName:'context',kind:'Field',metadata:{canHaveSubselections:true,inferredRootCallName:'node',inferredPrimaryKey:'id'},type:'PageThreadAutomationContext'},{fieldName:'client_subscription_id',kind:'Field',metadata:{isGenerated:true,isRequisite:true},type:'ID'}],kind:'Subscription',metadata:{inputType:'PagesInboxIntentTaggingSubscribeData!'},name:'PagesManagerMessagingThreadIntentTaggingSubscription',responseType:'PagesInboxIntentTaggingSubscribeResponsePayload'};}();};k.prototype.getQueryParams=function(l){return {page_id:l.page_id};};f.exports=k;},null);
  __d("XPagesMessagingIntentClassifierController",["XController"],function a(b,c,d,e,f,g){c.__markCompiled&&c.__markCompiled();f.exports=c("XController").create("\/pages\/messaging\/intent\/classify\/",{});},null);
  __d("XPagesMessagingIntentNotificationController",["XController"],function a(b,c,d,e,f,g){c.__markCompiled&&c.__markCompiled();f.exports=c("XController").create("\/pages\/messaging\/intent\/notify\/",{});},null);
  __d("XPagesMessagingIntentVerificationController",["XController"],function a(b,c,d,e,f,g){c.__markCompiled&&c.__markCompiled();f.exports=c("XController").create("\/pages\/messaging\/intent\/verify\/",{});},null);
  __d('PagesManagerMessagingClassifierStore',['invariant','PagesManagerMessagingClassifierActions','AsyncRequest','PagesManagerMessagingClassifierUtil','PagesManagerMessagingMessagelistDispatcher','FluxStore','IntentClassifierRequestAction','Map','RelayGraphQLSubscriber','RelayGraphQLSubscriptionNetworkLayer','PagesManagerMessagingThreadIntentTaggingSubscription','XDliteGraphQLSkywalkerController','XPagesMessagingIntentClassifierController','XPagesMessagingIntentNotificationController','XPagesMessagingIntentVerificationController'],function a(b,c,d,e,f,g,h){'use strict';var i,j;if(c.__markCompiled)c.__markCompiled();var k=c('PagesManagerMessagingClassifierActions').ActionTypes;i=babelHelpers.inherits(l,c('FluxStore'));j=i&&i.prototype;function l(){j.constructor.call(this,c('PagesManagerMessagingMessagelistDispatcher'));this.$PagesManagerMessagingClassifierStore1=false;this.$PagesManagerMessagingClassifierStore2=false;this.$PagesManagerMessagingClassifierStore3=null;this.$PagesManagerMessagingClassifierStore4=null;this.$PagesManagerMessagingClassifierStore5=0;this.$PagesManagerMessagingClassifierStore6=new (c('Map'))();this.$PagesManagerMessagingClassifierStore8=new (c('Map'))();}l.prototype.getIntentDescriptionByMessageID=function(m){var n=this.$PagesManagerMessagingClassifierStore8.get(m);return n?c('PagesManagerMessagingClassifierUtil').getIntentDescription(n.intent).toLowerCase():null;};l.prototype.getLastIntent=function(){return this.$PagesManagerMessagingClassifierStore3;};l.prototype.getShouldShowNotification=function(){return false;};l.prototype.getNotificationAreaHeight=function(){return this.$PagesManagerMessagingClassifierStore5;};l.prototype.getIsClassifierEnabled=function(){return false;};l.prototype.getIsClassifierVerificationEnabled=function(){return this.$PagesManagerMessagingClassifierStore2;};l.prototype.getIntentOnThread=function(m,n){if(!this.$PagesManagerMessagingClassifierStore1)return null;var o=this.$PagesManagerMessagingClassifierStore9(m,n);if(this.$PagesManagerMessagingClassifierStore6.has(o)){var p=this.$PagesManagerMessagingClassifierStore6.get(o);if(p)return c('PagesManagerMessagingClassifierUtil').getIntentDescription(p.intent);return null;}this.$PagesManagerMessagingClassifierStore10(n,m);this.$PagesManagerMessagingClassifierStore6.set(o,null);return null;};l.prototype.__onDispatch=function(m){var n=true;switch(m.type){case k.INITIALIZE_STORE:this.$PagesManagerMessagingClassifierStore11(m.config,m.pageID);break;case k.CHECK_FOR_INTENT:n=this.$PagesManagerMessagingClassifierStore12(m.message,m.userID,m.pageID);break;case k.NOTIFY_INTENT_CLASSIFIED:this.$PagesManagerMessagingClassifierStore3=m.intent;break;case k.NOTIFY_NOTIFICATION_HEIGHT_CHANGED:this.$PagesManagerMessagingClassifierStore5=m.height;break;case k.REJECT_NOTIFICATION_REQUEST:this.$PagesManagerMessagingClassifierStore3=null;this.$PagesManagerMessagingClassifierStore13(m.intent,m.pageID,false);break;case k.ACCEPT_NOTIFICATION_REQUEST:this.$PagesManagerMessagingClassifierStore3=null;this.$PagesManagerMessagingClassifierStore13(m.intent,m.pageID,true);break;case k.THREAD_INTENT_UPDATED:this.$PagesManagerMessagingClassifierStore14(m.pageID,m.context);break;case k.VERIFY_INTENT:this.$PagesManagerMessagingClassifierStore15(m.messageID,m.message,m.result);break;default:n=false;break;}if(n)this.__emitChange();};l.prototype.$PagesManagerMessagingClassifierStore11=function(m,n){this.$PagesManagerMessagingClassifierStore1=m.enableSubjecLineTagging;this.$PagesManagerMessagingClassifierStore2=m.enableClassifierVerification;if(this.$PagesManagerMessagingClassifierStore1){c('RelayGraphQLSubscriptionNetworkLayer').injectGraphQLSubscriber(c('RelayGraphQLSubscriber')(c('XDliteGraphQLSkywalkerController').getURIBuilder().getURI()));this.$PagesManagerMessagingClassifierStore7=new (c('PagesManagerMessagingThreadIntentTaggingSubscription'))(n,function(o){c('PagesManagerMessagingClassifierActions').notifyThreadIntentUpdated(n,o);});}};l.prototype.$PagesManagerMessagingClassifierStore16=function(m,n,o){this.$PagesManagerMessagingClassifierStore4=m;var p=c('XPagesMessagingIntentClassifierController').getURIBuilder().getURI();new (c('AsyncRequest'))().setURI(p).setMethod('POST').setData({page_id:o,user_id:n,message:m,action:c('IntentClassifierRequestAction').REQUEST_MESSAGE_INTENT}).setHandler(function(q){return (c('PagesManagerMessagingClassifierActions').notifyIntentClassified(q.payload.intent));}).send();};l.prototype.$PagesManagerMessagingClassifierStore10=function(m,n){var o=c('XPagesMessagingIntentClassifierController').getURIBuilder().getURI();new (c('AsyncRequest'))().setURI(o).setMethod('POST').setData({page_id:n,user_id:m,action:c('IntentClassifierRequestAction').REQUEST_THREAD_INTENT}).setHandler(function(p){c('PagesManagerMessagingClassifierActions').notifyThreadIntentUpdated(n,p.payload);}).send();};l.prototype.$PagesManagerMessagingClassifierStore13=function(m,n,o){var p=c('XPagesMessagingIntentNotificationController').getURIBuilder().getURI();new (c('AsyncRequest'))().setURI(p).setMethod('POST').setData({page_id:n,intent:m,enable_notifier:o}).send();};l.prototype.$PagesManagerMessagingClassifierStore12=function(m,n,o){if(!m){this.$PagesManagerMessagingClassifierStore4=null;this.$PagesManagerMessagingClassifierStore3=null;return true;}if(this.$PagesManagerMessagingClassifierStore17&&m!==this.$PagesManagerMessagingClassifierStore4){this.$PagesManagerMessagingClassifierStore16(m,n,o);return true;}else return false;};l.prototype.$PagesManagerMessagingClassifierStore15=function(m,n,o){var p=this.$PagesManagerMessagingClassifierStore8.get(m);!p?h(0):void 0;var q=c('XPagesMessagingIntentVerificationController').getURIBuilder().getURI();new (c('AsyncRequest'))().setURI(q).setMethod('POST').setData({page_id:p.pageID,user_id:p.userID,intent:p.intent,is_correct:o,message_id:m,score:p.score,message:n}).send();this.$PagesManagerMessagingClassifierStore8['delete'](m);if(!o)this.$PagesManagerMessagingClassifierStore6.set(this.$PagesManagerMessagingClassifierStore9(p.pageID,p.userID),null);};l.prototype.$PagesManagerMessagingClassifierStore14=function(m,n){var o=n.userID,p=n.messageID,q=n.isVerified,r=n.intent,s=n.score,t=r?{intent:r,pageID:m,userID:o,score:s}:null;this.$PagesManagerMessagingClassifierStore6.set(this.$PagesManagerMessagingClassifierStore9(m,o),t);if(t&&!q)this.$PagesManagerMessagingClassifierStore8.set(p,t);};l.prototype.$PagesManagerMessagingClassifierStore9=function(m,n){return m+':'+n;};f.exports=new l();},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=void 0;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=void 0,r=void 0;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.$PagesManagerMessagingSavedRepliesFlyout1=function(r){this.setState({activeSortingOptionKey:r});}.bind(this);this.state={searchQuery:'',activeSortingOptionKey:c('SavedResponsesConstants').sortingKey.MOST_USED};}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',['cssVar','cx','fbt','ix','PagesManagerMessagingComposerAttachmentList.react','CommerceInvoiceAdminButton.react','Image.react','MercuryDragDropPrompt.react','MercuryShareAttachmentRenderLocations','MessengerHotLikeButton.react','PagesAdminToolUIActionType','PagesEventObserver','PagesEventType','PagesManagerLogger','PagesManagerMessagingSavedRepliesButton.react','PagesMessagingPerfTypedLogger','PagesMessageSuggestedResponseHandler','PagesMessengerFileUploader.react','PagesMessengerOmnipicker.react','PagesMessengerSuggestedResponseView.react','PagesMessengerTextInput.react','React','ReactDOM','SavedResponsesUtils','TooltipData','UFIStickerButton.react','XUIButton.react','Grid.react'],function a(b,c,d,e,f,g,h,i,j,k){'use strict';var l,m;if(c.__markCompiled)c.__markCompiled();var n=c('React').PropTypes,o=function(){},p=c('Grid.react').GridItem;l=babelHelpers.inherits(q,c('React').Component);m=l&&l.prototype;function q(r){m.constructor.call(this,r);this.$PagesManagerMessagingComposerView1=false;this.state={isAttachmentsButtonVisible:true,isSavedRepliesButtonVisible:true,isStickerButtonVisible:true,placeholder:''};}q.prototype.componentDidUpdate=function(r,s){if(this.props.onInitialRender&&this.props.participant&&this.refs.textInput&&!this.$PagesManagerMessagingComposerView1){this.props.onInitialRender();this.$PagesManagerMessagingComposerView1=true;}if(r&&r.message!==this.props.message)this.refs.textInput.updateHeight();};q.prototype.componentWillMount=function(){this.$PagesManagerMessagingComposerView2(this.props);};q.prototype.componentWillReceiveProps=function(r){this.$PagesManagerMessagingComposerView2(r,this.state);};q.prototype.$PagesManagerMessagingComposerView2=function(r){var s=r.attachments.length,t=r.message.length;this.setState({isSavedRepliesButtonVisible:t<1&&s<1,isStickerButtonVisible:t<1&&s<1});};q.prototype.$PagesManagerMessagingComposerView3=function(){return (this.props.canAttachFiles&&this.state.isAttachmentsButtonVisible);};q.prototype.$PagesManagerMessagingComposerView4=function(){return (this.props.canUseSavedReplies&&this.state.isSavedRepliesButtonVisible);};q.prototype.$PagesManagerMessagingComposerView5=function(){return (this.props.canUseStickers&&this.state.isStickerButtonVisible);};q.prototype.$PagesManagerMessagingComposerView6=function(r){this.props.onEmoticonSelected(r,c('ReactDOM').findDOMNode(this.refs.textInput.refs.input));};q.prototype.$PagesManagerMessagingComposerView7=function(r){r.preventDefault();var s=Date.now();c('PagesManagerLogger').logMessageInboxUIAction(c('PagesAdminToolUIActionType').MESSAGE_INBOX_CLICK_SEND_MESSAGE,this.props.userID);new (c('PagesMessagingPerfTypedLogger'))().setPageID(this.props.userID).setEventName(c('PagesEventType').MESSAGES_SEND_MESSAGE_JS_START).logVital();this.props.onSend(s);};q.prototype.$PagesManagerMessagingComposerView8=function(){if(!this.$PagesManagerMessagingComposerView3())return null;var r=j._("Send a file");if(this.props.canUseOmnipicker)return (c('React').createElement('div',babelHelpers['extends']({className:"_4dvy"},c('TooltipData').propsFor(r,'above')),c('React').createElement(c('PagesMessengerOmnipicker.react'),{onPhotosSelected:this.props.onOmnipickerPhotosSelected,uploadURI:this.props.uploaderActionURI,pageID:this.props.userID})));return (c('React').createElement('div',babelHelpers['extends']({className:"_4dvy"},c('TooltipData').propsFor(r)),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'})));};q.prototype.$PagesManagerMessagingComposerView9=function(){if(!this.props.canAttachFiles)return null;return (c('React').createElement(c('PagesManagerMessagingComposerAttachmentList.react'),{attachments:this.props.attachments,attachmentsUploading:this.props.attachmentsUploading,onDetach:this.props.onAttachmentDetach,ref:'attachmentList'}));};q.prototype.$PagesManagerMessagingComposerView10=function(){if(this.props.threadID&&this.props.message.length<1&&this.props.attachments.length<1){var r=this.props.threadID;return (c('React').createElement('span',{className:"_1z9h"},c('React').createElement(c('MessengerHotLikeButton.react'),{customColor:"#0084ff",disabled:!this.props.threadID,location:c('MercuryShareAttachmentRenderLocations').PAGES_INBOX,sendSticker:this.props.onStickerSelected,renderSize:24,threadID:r})));}return null;};q.prototype.$PagesManagerMessagingComposerView11=function(){var r=this.state.placeholder||j._("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(s){return this.$PagesManagerMessagingComposerView7(s);}.bind(this):null,onFocus:this.props.onFocus,placeholder:r,onChange:this.props.onInputChange,value:this.props.message,ref:'textInput'})));};q.prototype.$PagesManagerMessagingComposerView12=function(){return (c('React').createElement('div',{className:"_6fk",ref:'linkPreview'}));};q.prototype.$PagesManagerMessagingComposerView13=function(){return (c('React').createElement('div',{className:"_4dw0"},c('React').createElement(c('Image.react'),{className:"_1cjc",src:this.props.participant.image_src})));};q.prototype.$PagesManagerMessagingComposerView14=function(){if(!this.$PagesManagerMessagingComposerView4()||!this.props.recipientID)return null;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})));};q.prototype.$PagesManagerMessagingComposerView18=function(){var r=j._("Send");return (c('React').createElement('div',{className:"_4dw3"+(this.props.message.length<1&&this.props.attachments.length<1?' '+"hidden_elem":'')},c('React').createElement(c('XUIButton.react'),{disabled:this.props.isSendBlocked,label:r,onClick:function(s){return this.$PagesManagerMessagingComposerView7(s);}.bind(this),use:'confirm'})));};q.prototype.$PagesManagerMessagingComposerView19=function(){if(!this.$PagesManagerMessagingComposerView5())return null;var r=j._("Post a sticker");return (c('React').createElement('span',{className:"_4dw4"},c('React').createElement(c('UFIStickerButton.react'),{onStickerSelected:this.props.onStickerSelected,onEmoticonSelected:function(s){return this.$PagesManagerMessagingComposerView6(s);}.bind(this)},c('React').createElement(c('Image.react'),{alt:r,className:"_3fhi",src:k('/images/pages/pages_manager/messages/composer-stickers.png')}))));};q.prototype.$PagesManagerMessagingComposerView20=function(){if(!this.props.shouldShowCommerceInvoiceButton||this.props.recipientID==null)return null;return (c('React').createElement('div',{className:"_3w8o"},c('React').createElement(c('CommerceInvoiceAdminButton.react'),{pageID:this.props.userID,recipientID:this.props.recipientID})));};q.prototype.$PagesManagerMessagingComposerView21=function(){return (c('React').createElement(c('PagesMessengerSuggestedResponseView.react'),{suggestedResponseHandler:this.props.suggestedResponseHandler,onAccepted:this.props.onSuggestedResponseAccept,onDeclined:this.props.onSuggestedResponseDecline}));};q.prototype.render=function(){if(!this.props.recipientID||!this.props.threadID||!this.props.participant){return c('React').createElement('div',{className:"__1d"});}else if(this.props.isBlocked&&this.props.enableBlockedComposer){new (c('PagesMessagingPerfTypedLogger'))().setPageID(this.props.userID).setEventName(c('PagesEventType').COMPOSER_BLOCKED_WITH_WARNING).log();return (c('React').createElement(p,{alignv:'middle',className:"_50wh"},c('React').createElement('div',{className:"_50wn"},j._("Your Page is no longer able to send messages to this person."))));}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.$PagesManagerMessagingComposerView20(),this.$PagesManagerMessagingComposerView8(),this.$PagesManagerMessagingComposerView19(),this.$PagesManagerMessagingComposerView14(),this.$PagesManagerMessagingComposerView10(),this.$PagesManagerMessagingComposerView18())),c('React').createElement('div',{className:"_6fl"},this.$PagesManagerMessagingComposerView21(),this.$PagesManagerMessagingComposerView12()),this.$PagesManagerMessagingComposerView9()));};q.prototype.$PagesManagerMessagingComposerView15=function(r){this.setState({placeholder:r});};q.prototype.$PagesManagerMessagingComposerView16=function(){this.setState({placeholder:''});};q.prototype.$PagesManagerMessagingComposerView17=function(r,s,t){this.setState({placeholder:''});this.props.onReplySelected(s,t);c('PagesEventObserver').notify(c('PagesEventType').SAVED_REPLIES_APPLY_REPLY,this.props.userID);c('SavedResponsesUtils').notifySavedResponseApplied(r,this.props.userID);};q.propTypes={attachments:n.array,canAttachFiles:n.bool,canUseSavedReplies:n.bool,canUseStickers:n.bool,isQuickReplyMode:n.bool,isSavedRepliesLoading:n.bool,isSendBlocked:n.bool,message:n.string.isRequired,onAttachmentDetach:n.func,onEmoticonSelected:n.func,onFetchReplies:n.func.isRequired,onFileUploaderSubmit:n.func,onFileUploaderMounted:n.func,onFileUploadFinished:n.func,onFocus:n.func,onInitialRender:n.func,onInputChange:n.func,onSend:n.func,onStickerSelected:n.func,onSuggestedResponseAccept:n.func,onSuggestedResponseDecline:n.func,participant:n.object,recipientID:n.string,savedReplies:n.object,suggestedResponseHandler:n.instanceOf(c('PagesMessageSuggestedResponseHandler')),uploaderActionURI:n.string,userID:n.string};q.defaultProps={attachments:[],canAttachFiles:true,canUseOmnipicker:false,canUseSavedReplies:true,canUseStickers:true,isSendBlocked:false,onAttachmentDetach:o,onEmoticonSelected:o,onFileUploaderMounted:o,onFileUploaderSubmit:o,onFileUploadFinished:o,onInputChange:o,onSend:o,onStickerSelected:o,onSuggestedResponseAccept:o,shouldShowCommerceInvoiceButton:false};f.exports=q;},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});}};f.exports=h;},null);
  __d("XPagesMessagingBlockController",["XController"],function a(b,c,d,e,f,g){c.__markCompiled&&c.__markCompiled();f.exports=c("XController").create("\/pages\/message\/isblocked\/",{recipient_id:{type:"String",required:true}});},null);
  __d('PagesManagerMessagingComposerContainer.react',['invariant','AsyncRequest','DragDropTarget','EmoticonsList','EmoticonUtils','FluxContainer','MercuryIDs','MercuryPageMessageActions','MercuryMessageObject','MercuryParticipants','MercurySourceType','PagesEventObserver','PagesEventType','PagesManagerMessagingComposerActions','PagesManagerMessagingComposerStore','PagesManagerMessagingComposerView.react','PagesManagerMessagingNUXActions','PagesMessagingConfig','PagesMessagingPerfTypedLogger','PagesMessengerShareLinkUploader','React','ReactDOM','SavedResponsesUtils','SelectionPosition','SubscriptionsHandler','XPagesMessagingBlockController','emptyFunction','ActorURI'],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.getStores=function(){return [c('PagesManagerMessagingComposerStore')];};l.calculateState=function(m,n){var o=m?m.isShareLinkUploading:false,p=m?m.isBlocked:false;return {attachments:c('PagesManagerMessagingComposerStore').getAllAttachmentsMeta(),isAttachmentUploading:c('PagesManagerMessagingComposerStore').getIsAttachmentUploading(),isSavedRepliesLoading:c('PagesManagerMessagingComposerStore').getIsSavedRepliesLoading(),isQuickReplyMode:c('PagesManagerMessagingComposerStore').getQuickReplyMode(),isShareLinkUploading:o,message:c('PagesManagerMessagingComposerStore').getMessage(),participant:c('PagesManagerMessagingComposerStore').getParticipant(),savedReplies:c('PagesManagerMessagingComposerStore').getSavedReplies(),uploaderActionURI:c('PagesManagerMessagingComposerStore').getUploadActionFromUserID(n.userID),isBlocked:p};};l.prototype.$PagesManagerMessagingComposerContainer7=function(m){this.$PagesManagerMessagingComposerContainer5.addSubscriptions(m.subscribe('one-upload-completed',this.$PagesManagerMessagingComposerContainer8.bind(this)));};l.prototype.componentDidUpdate=function(m){if(this.props.recipientID&&this.props.threadID&&(!m.recipientID||!m.threadID)){c('PagesManagerMessagingNUXActions').setComposerReady();if(this.props.onInitialRender)this.props.onInitialRender();}if(this.props.enableBlockedComposer&&this.props.recipientID!==null&&this.props.recipientID!==m.recipientID)this.isRecipientBlocked(this.props.recipientID);};l.prototype.componentDidMount=function(){this.$PagesManagerMessagingComposerContainer9(this.props.userID);};l.prototype.componentWillMount=function(){this.$PagesManagerMessagingComposerContainer10(this.props);this.$PagesManagerMessagingComposerContainer5=new (c('SubscriptionsHandler'))();};l.prototype.componentWillReceiveProps=function(m){this.$PagesManagerMessagingComposerContainer10(m);if(m.threadID!==this.props.threadID){c('PagesManagerMessagingComposerActions').clearMessage();c('PagesManagerMessagingComposerActions').detachAllAttachments();}if(m.userID!==this.props.userID)this.$PagesManagerMessagingComposerContainer9(m.userID);};l.prototype.componentWillUpdate=function(m,n){if(this.props.onMessageOrAttachmentUpdate&&(n.attachments.length!==this.state.attachments.length||n.message!==this.state.message))this.props.onMessageOrAttachmentUpdate();};l.prototype.componentWillUnmount=function(){this.$PagesManagerMessagingComposerContainer5&&this.$PagesManagerMessagingComposerContainer5.release();};l.prototype.$PagesManagerMessagingComposerContainer11=function(){var m=new (c('PagesMessengerShareLinkUploader'))(c('ReactDOM').findDOMNode(this.refs.composer.refs.linkPreview),this.refs.composer.refs.textInput.refs.input,c('emptyFunction'),c('emptyFunction'),this.props.userID);this.$PagesManagerMessagingComposerContainer5.addSubscriptions(m.subscribe('link-detected',function(){this.setState({isShareLinkUploading:true});this.props.onMessageOrAttachmentUpdate();}.bind(this)),m.subscribe('share-loaded',function(){this.setState({isShareLinkUploading:false});}.bind(this)),m.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(n){return (m.loadShare(n));});}c('PagesManagerMessagingComposerActions').setShareLinkUploader(m);};l.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(m,n){c('PagesManagerMessagingComposerActions').setIsSavedRepliesLoading(false);c('PagesManagerMessagingComposerActions').setSavedReplies(m,n);});};l.prototype.$PagesManagerMessagingComposerContainer10=function(m){var n=m.userID;!n?h(0):void 0;this.$PagesManagerMessagingComposerContainer2=c('MercuryMessageObject').getForFBID(n);this.$PagesManagerMessagingComposerContainer3=c('MercuryPageMessageActions').getForFBID(n);};l.prototype.$PagesManagerMessagingComposerContainer9=function(m){var n=c('MercuryIDs').getParticipantIDFromUserID(m);c('MercuryParticipants').get(n,function(o){c('PagesManagerMessagingComposerActions').setParticipant(o);});};l.prototype.isSendBlocked=function(){if(this.state.isAttachmentUploading||this.state.isShareLinkUploading||this.state.message===''&&this.state.attachments.length<1)return true;return false;};l.prototype.isRecipientBlocked=function(m){var n=c('ActorURI').create(c('XPagesMessagingBlockController').getURIBuilder().setString('recipient_id',m).getURI(),this.props.userID);new (c('AsyncRequest'))().setURI(n).setHandler(function(o){var p=o.payload;this.setState({isBlocked:p});return;}.bind(this)).send();};l.prototype.$PagesManagerMessagingComposerContainer13=function(m){c('PagesManagerMessagingComposerActions').detachAttachment(m);};l.prototype.$PagesManagerMessagingComposerContainer14=function(m,n){var o=c('EmoticonsList').symbols[m];if(!o)return;this.$PagesManagerMessagingComposerContainer4=this.$PagesManagerMessagingComposerContainer4||new (c('SelectionPosition'))(n);var p=c('EmoticonUtils').insertEmoticon(o,this.state.message,this.$PagesManagerMessagingComposerContainer4.getPos());this.$PagesManagerMessagingComposerContainer4.setPos(p.start,p.end);c('PagesManagerMessagingComposerActions').setMessage(p.result);};l.prototype.$PagesManagerMessagingComposerContainer15=function(m){this.$PagesManagerMessagingComposerContainer7(m);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(m);};l.prototype.$PagesManagerMessagingComposerContainer8=function(m,n){c('PagesManagerMessagingComposerActions').completeAttachment(n);};l.prototype.$PagesManagerMessagingComposerContainer17=function(m,n){c('PagesManagerMessagingComposerActions').startAttachment(n.files);if(this.refs.composer&&this.refs.composer.refs.textInput&&this.refs.composer.refs.textInput.refs.input)c('ReactDOM').findDOMNode(this.refs.composer.refs.textInput.refs.input).focus();};l.prototype.$PagesManagerMessagingComposerContainer18=function(m){if(m==='all-uploads-completed'){c('PagesManagerMessagingComposerActions').completeAllAttachments();}else m==='upload-canceled';};l.prototype.$PagesManagerMessagingComposerContainer19=function(m){c('PagesManagerMessagingComposerActions').setMessage(m.target.value);};l.prototype.$PagesManagerMessagingComposerContainer20=function(m,n){var o=c('PagesManagerMessagingComposerStore').getFileUploader();c('PagesManagerMessagingComposerActions').detachAllAttachments();c('PagesManagerMessagingComposerActions').setMessage(m);if(n&&o)o.addCachedAttachments([n]);if(this.refs.composer&&this.refs.composer.refs.textInput)c('ReactDOM').findDOMNode(this.refs.composer.refs.textInput.refs.input).focus();};l.prototype.$PagesManagerMessagingComposerContainer21=function(m){var n=c('PagesManagerMessagingComposerStore').getFileUploader();if(n)n.addCachedAttachments(m.map(function(o){return {filename:'Photo.jpg',image_id:o.fbid,filetype:'image/jpeg'};}));};l.prototype.$PagesManagerMessagingComposerContainer22=function(m){try{this.$PagesManagerMessagingComposerContainer23(m);}catch(n){new (c('PagesMessagingPerfTypedLogger'))().setPageID(this.props.userID).setEventName(c('PagesEventType').MESSAGES_SEND_MESSAGE_JS_EXCEPTION).setExceptionMessage(n.message).setStack(n.stack).logVital();}};l.prototype.$PagesManagerMessagingComposerContainer23=function(m){var n=this.state.message,o=c('PagesManagerMessagingComposerStore').getAttachedAttachmentIds(),p=c('PagesManagerMessagingComposerStore').getAttachedImageIds(),q=c('PagesManagerMessagingComposerStore').getAttachedAnimatedImageIds(),r=c('PagesManagerMessagingComposerStore').getAttachedVideoIds(),s=c('PagesManagerMessagingComposerStore').getAttachedAudioFilesIds(),t=c('PagesManagerMessagingComposerStore').getAttachedFilesIds(),u=c('PagesManagerMessagingComposerStore').getShareLink(),v=this.$PagesManagerMessagingComposerContainer2.constructUserGeneratedMessageObject(n,c('MercurySourceType').TITAN_WEB,this.props.threadID,null,this.props.creatorInfo);if(this.isSendBlocked()||!n&&!o.length&&!s.length&&!p.length&&!t.length&&!q.length&&!r.length&&!u)return;if(u){v.has_attachment=true;v.content_attachment=u;}if(o.length>0){v.has_attachment=true;v.raw_attachments=o;}if(p.length>0){v.image_ids=p;v.has_attachment=true;}if(q.length>0){v.gif_ids=q;v.has_attachment=true;}if(r.length>0){v.video_ids=r;v.has_attachment=true;}if(s.length>0){v.audio_ids=s;v.has_attachment=true;}if(t.length>0){v.file_ids=t;v.has_attachment=true;}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(v);c('PagesManagerMessagingComposerActions').detachAllAttachments();c('PagesManagerMessagingComposerActions').clearMessage();c('PagesManagerMessagingComposerActions').clearShareLinkUploader();new (c('PagesMessagingPerfTypedLogger'))().setPageID(this.props.userID).setEventName(c('PagesEventType').MESSAGES_SEND_MESSAGE_JS_END).setPerfTime(Date.now()-m).logVital();};l.prototype.$PagesManagerMessagingComposerContainer24=function(m){var n=this.$PagesManagerMessagingComposerContainer2.constructUserGeneratedMessageObject('',c('MercurySourceType').TITAN_WEB,this.props.threadID,null,this.props.creatorInfo);n.has_attachment=true;n.sticker_id=m;this.$PagesManagerMessagingComposerContainer3.send(n);c('PagesManagerMessagingComposerActions').clearMessage();};l.prototype.$PagesManagerMessagingComposerContainer16=function(m){if(this.refs.composer&&this.refs.composer.refs.fileUploader)this.refs.composer.refs.fileUploader.addFiles(m);};l.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(m){return this.$PagesManagerMessagingComposerContainer19(m);}.bind(this),onOmnipickerPhotosSelected:this.$PagesManagerMessagingComposerContainer21.bind(this),onReplySelected:this.$PagesManagerMessagingComposerContainer20.bind(this),onSend:function(m){return this.$PagesManagerMessagingComposerContainer22(m);}.bind(this),onStickerSelected:this.$PagesManagerMessagingComposerContainer24.bind(this),ref:'composer'})));};function l(){i.apply(this,arguments);}l.propTypes={creatorInfo:k.object,onInitialRender:k.func,onMessageOrAttachmentUpdate:k.func,shouldShowCommerceInvoiceButton:k.bool,threadElementID:k.string,threadID:k.string,userID:k.string};f.exports=c('FluxContainer').create(l,{withProps:true});},null);
  __d('PagesManagerNavigationUnit',['invariant'],function a(b,c,d,e,f,g,h){'use strict';if(c.__markCompiled)c.__markCompiled();function i(j){this.$PagesManagerNavigationUnit1=j;}i.prototype.getDisplayTitle=function(){h(0);};i.prototype.getKey=function(){return this.$PagesManagerNavigationUnit1;};i.prototype.getNotificationCount=function(j,k){return 0;};f.exports=i;},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','PagesManagerMessagingNavigationUnitKey'],function a(b,c,d,e,f,g,h){'use strict';var i,j;if(c.__markCompiled)c.__markCompiled();var k='inbox|all|';i=babelHelpers.inherits(l,c('FluxStore'));j=i&&i.prototype;function l(){j.constructor.call(this,c('PagesManagerDispatcher'));var m=new (c('PagesManagerMessagingInboxNavigationUnit'))(),n=new (c('PagesManagerMessagingArchiveNavigationUnit'))(),o=new (c('PagesManagerMessagingSpamNavigationUnit'))();this.$PagesManagerMessagingFilterStore2=c('immutable').List([m,n,o]);this.$PagesManagerMessagingFilterStore8=new (c('PagesManagerMessagingAllNavigationUnit'))();var p=new (c('PagesManagerMessagingUnreadNavigationUnit'))();this.$PagesManagerMessagingFilterStore1=c('immutable').List([this.$PagesManagerMessagingFilterStore8,p,new (c('PagesManagerMessagingFlaggedNavigationUnit'))()]);this.$PagesManagerMessagingFilterStore4=this.$PagesManagerMessagingFilterStore2.first();this.$PagesManagerMessagingFilterStore5=this.getFilterByKey(this.$PagesManagerMessagingFilterStore4.getSupportedFilterKeys().first());this.$PagesManagerMessagingFilterStore7=false;this.$PagesManagerMessagingFilterStore6=false;this.$PagesManagerMessagingFilterStore3=[m,p,n,o];}l.prototype.$PagesManagerMessagingFilterStore9=function(m,n){var o=m.filter(function(p){return p.getKey()===n;});!(o.size>0)?h(0):void 0;return o.first();};l.prototype.$PagesManagerMessagingFilterStore10=function(m,n){c('PagesManagerMessagingLogger').logMessagesSectionViewEvent(m,n.getKey());c('PagesManagerMessagingLogger').logPageViewFolderEvent(m,n,c('MessageThreadViewSource').NEW_MESSAGETAB);this.$PagesManagerMessagingFilterStore4=n;this.$PagesManagerMessagingFilterStore5=this.getFilterByKey(n.getSupportedFilterKeys().first());this.__emitChange();};l.prototype.$PagesManagerMessagingFilterStore11=function(m,n){if(n.getKey()===c('MessagingTag').UNREAD){this.$PagesManagerMessagingFilterStore5=n;this.$PagesManagerMessagingFilterStore4=this.$PagesManagerMessagingFilterStore2.first();}else{this.$PagesManagerMessagingFilterStore4.assertSupportsFilter(n);this.$PagesManagerMessagingFilterStore5=n;}this.__emitChange();};l.prototype.getFilterByKey=function(m){return this.$PagesManagerMessagingFilterStore9(this.$PagesManagerMessagingFilterStore1,m);};l.prototype.getAvailableFolders=function(){return this.$PagesManagerMessagingFilterStore2;};l.prototype.getAvailableFilters=function(){return c('immutable').List(this.$PagesManagerMessagingFilterStore1.filter(function(m){return this.getActiveFolder().getSupportedFilterKeys().indexOf(m.getKey())>=0;}.bind(this)));};l.prototype.getActiveFolder=function(){return this.$PagesManagerMessagingFilterStore4;};l.prototype.getActiveFilter=function(){var m=c('PagesManagerMessagingSearchStore').getCurrentSearchCustomTagNames();return this.$PagesManagerMessagingFilterStore6||m.size!==0&&this.$PagesManagerMessagingFilterStore5.getKey()!==c('PagesManagerMessagingNavigationUnitKey').FILTERS.FLAGGED?this.$PagesManagerMessagingFilterStore8:this.$PagesManagerMessagingFilterStore5;};l.prototype.getActiveFolderName=function(){return this.getActiveFolder().getKey();};l.prototype.getActiveFilterName=function(){return this.getActiveFilter().getKey();};l.prototype.getFolderDropDown=function(){if(this.getActiveFilterName()===c('MessagingTag').UNREAD){return this.$PagesManagerMessagingFilterStore2;}else{var m=this.$PagesManagerMessagingFilterStore3.filter(function(n){return n.getKey()!==this.$PagesManagerMessagingFilterStore4.getKey();}.bind(this));return c('immutable').List(m);}};l.prototype.getActiveFolderDropDown=function(){if(this.getActiveFilterName()===c('MessagingTag').UNREAD){return this.$PagesManagerMessagingFilterStore5;}else return this.$PagesManagerMessagingFilterStore4;};l.prototype.getUnitNotificationCountMap=function(m){var n=new (c('Map'))(),o=function(p){return n.set(p,p.getNotificationCount(m,{activeFolder:this.getActiveFolder(),activeFilter:this.getActiveFilter()}));}.bind(this);this.getAvailableFolders().map(o);this.getAvailableFilters().map(o);return n;};l.prototype.getNavigationKey=function(){return this.getActiveFolderName()+'|'+this.getActiveFilterName()+'|'+(c('PagesManagerMessagingSearchStore').getCustomTagsFilterName()||'');};l.prototype.getIsInboxAll=function(){return this.getNavigationKey()===k;};l.prototype.getIsFiltering=function(){return this.$PagesManagerMessagingFilterStore7;};l.prototype.__onDispatch=function(m){switch(m.type){case c('PagesManagerActionType').NAVIGATION_UNIT.CHANGE:if(this.getAvailableFolders().indexOf(m.unit)>=0){this.$PagesManagerMessagingFilterStore10(m.pageID,m.unit);}else this.$PagesManagerMessagingFilterStore11(m.pageID,m.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.REMOVE_SEARCH_CUSTOM_TAG:case c('PagesManagerActionType').SEARCH.CHANGE_SEARCH_TERM:c('PagesManagerDispatcher').waitFor([c('PagesManagerMessagingSearchStore').getDispatchToken()]);var n=c('PagesManagerMessagingSearchStore').getCurrentSearchTerm()!=='';this.$PagesManagerMessagingFilterStore7=false;if(this.$PagesManagerMessagingFilterStore6!==n){this.$PagesManagerMessagingFilterStore6=n;this.__emitChange();}break;case c('PagesManagerActionType').FILTER_PANEL.TOGGLE_PANEL:this.$PagesManagerMessagingFilterStore7=m.showPanel;this.__emitChange();}};f.exports=new l();},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','PagesAdminToolUIActionType','PagesManagerLogger','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});},switchPriorityView:function(i){c('PagesManagerDispatcher').dispatch({isPriorityOn:i,type:c('PagesManagerMessagingActionType').LIST.SWITCH_PRIORITY});},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,k){c('PagesManagerLogger').logMessageInboxUIAction(c('PagesAdminToolUIActionType').MESSAGE_INBOX_CLICK_ADD_SEARCH_TAGS,i,{tag_name:j,position:k});c('PagesManagerDispatcher').dispatch({type:c('PagesManagerMessagingActionType').SEARCH.ADD_SEARCH_CUSTOM_TAG,pageID:i,tagName:j});},removeSearchCustomTag:function(i,j,k){c('PagesManagerLogger').logMessageInboxUIAction(c('PagesAdminToolUIActionType').MESSAGE_INBOX_CLICK_REMOVE_SEARCH_TAGS,i,{tag_name:j,position:k});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},enum_tag:{type:"Enum",enumType:1}});},null);
  __d('PagesManagerMessagingSearchStore',['ActorURI','PagesManagerMessagingActionType','AsyncRequest','PagesManagerDispatcher','FluxStore','immutable','Map','MercurySearchSnippetResults','MercurySearchThreadResults','MercurySearchThreadResultOrderer','MercurySearchThreadsStrategy','PageMessageEnumTag','PagesManagerCustomTagsActionType','PagesManagerCustomTagsStore','PagesManagerMessagingFilterStore','PagesMessengerThreadUtils','PagesMessagingSearchMode','PagesManagerMessagingThreadlistAction','PagesManagerMessagingNavigationUnitKey','XPagesCustomTagMessageThreadCountsController','emptyFunction','guid'],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,c('PagesManagerMessagingFilterStore').getActiveFilterName()===c('PagesManagerMessagingNavigationUnitKey').FILTERS.FLAGGED);};j.prototype.getCurrentSearchCustomTagThreadCounts=function(){var k=this.$PagesManagerMessagingSearchStore13();if(!k||!(k in this.$PagesManagerMessagingSearchStore12))return null;return c('immutable').OrderedMap(this.$PagesManagerMessagingSearchStore12[k]);};j.prototype.$PagesManagerMessagingSearchStore14=function(k,l){return k+'|'+l;};j.prototype.$PagesManagerMessagingSearchStore13=function(){return this.$PagesManagerMessagingSearchStore14(c('PagesManagerMessagingFilterStore').getActiveFolderName(),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).setEnum('enum_tag',c('PagesManagerMessagingFilterStore').getActiveFilterName()===c('PagesManagerMessagingNavigationUnitKey').FILTERS.FLAGGED?c('PageMessageEnumTag').FLAG:null).setString('folder',c('PagesManagerMessagingFilterStore').getActiveFolderName()).setString('key',this.$PagesManagerMessagingSearchStore13()).getURI(),k)).setHandler(function(m){var n=m.payload.threadCounts,o=Object.keys(n).sort(function(q,r){return n[r]-n[q];}),p=new (c('Map'))();o.map(function(q){p.set(q,n[q]);});if(this.__dispatcher.isDispatching()){this.$PagesManagerMessagingSearchStore12[m.payload.key]=p;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:p});}.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={};if(k.hasTagListUpdated)this.$PagesManagerMessagingSearchStore15(k.pageID);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('PagesManagerMessagingIntentNotificationView.react',['cx','ix','fbt','invariant','PagesManagerMessagingClassifierActions','Image.react','LeftRight.react','React','XUIButton.react','joinClasses'],function a(b,c,d,e,f,g,h,i,j,k){'use strict';var l,m;if(c.__markCompiled)c.__markCompiled();l=babelHelpers.inherits(n,c('React').Component);m=l&&l.prototype;function n(){var o,p;for(var q=arguments.length,r=Array(q),s=0;s<q;s++)r[s]=arguments[s];return o=(p=m.constructor).call.apply(p,[this].concat(r)),this.$PagesManagerMessagingIntentNotificationView1=function(){var t=this.props.intent;!t?k(0):void 0;c('PagesManagerMessagingClassifierActions').acceptNotificationRequest(t,this.props.pageID);}.bind(this),this.$PagesManagerMessagingIntentNotificationView2=function(){var t=this.props.intent;!t?k(0):void 0;c('PagesManagerMessagingClassifierActions').rejectNotificationRequest(t,this.props.pageID);}.bind(this),o;}n.prototype.render=function(){return (c('React').createElement('div',{className:c('joinClasses')(this.props.className,!this.props.intent||!this.props.isClassifierEnabled?"hidden_elem":'')},c('React').createElement('div',{className:"_4xtl"},c('React').createElement(c('LeftRight.react'),{direction:'left'},c('React').createElement(c('Image.react'),{src:i('/images/pages/happy-robot.png')}),c('React').createElement('div',{className:"_4xtm"},c('React').createElement('div',{className:"_4xtn _4xto"},j._("Can We Help?")),c('React').createElement('div',null,j._("We think you received a message about {intent}. Would you like us to automatically label the thread next time you receive a message about {intent}?",[j.param('intent',c('React').createElement('span',{className:"_4xtn"},this.props.intent))])))),c('React').createElement('div',{className:"_4xtp"},c('React').createElement(c('XUIButton.react'),{label:j._("No Thanks"),use:'default',onClick:this.$PagesManagerMessagingIntentNotificationView1,size:'large'}),c('React').createElement(c('XUIButton.react'),{label:j._("Label for Me"),use:'confirm',onClick:this.$PagesManagerMessagingIntentNotificationView2,size:'large'})))));};f.exports=n;},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','ActorURI','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=false;this.$PagesManagerMessagingMessagelistStore6=[];this.$PagesManagerMessagingMessagelistStore7=c('immutable').OrderedMap();this.$PagesManagerMessagingMessagelistStore8=0;this.$PagesManagerMessagingMessagelistStore10=new (c('Map'))();this.$PagesManagerMessagingMessagelistStore11=0;}j.prototype.__onDispatch=function(k){'use strict';switch(k.type){case c('PagesManagerMessagingActionType').LIST.LOADED:this.$PagesManagerMessagingMessagelistStore12(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.$PagesManagerMessagingMessagelistStore13(k);this.__emitChange();break;case c('PagesManagerMessagingActionType').SET_SCROLL_HEIGHT:var l=k.height;if(l!==this.$PagesManagerMessagingMessagelistStore8){this.$PagesManagerMessagingMessagelistStore8=l;this.__emitChange();}break;case c('PagesManagerMessagingActionType').SET_APPOINTMENT_BANNER_HEIGHT:this.$PagesManagerMessagingMessagelistStore11=k.appointmentBannerHeight;this.__emitChange();break;case c('PagesManagerMessagingActionType').THREAD_LEVEL.UPDATE_THREAD:this.__emitChange();break;case c('PagesManagerMessagingActionType').SET_IS_CONTEXT_CARD_HIDDEN:this.$PagesManagerMessagingMessagelistStore14(k.pageID,k.isHidden);this.__emitChange();break;case c('PagesManagerMessagingActionType').HOT_LIKE.END:this.$PagesManagerMessagingMessagelistStore4=false;this.$PagesManagerMessagingMessagelistStore5=null;break;case c('PagesManagerMessagingActionType').HOT_LIKE.START:this.$PagesManagerMessagingMessagelistStore4=true;this.$PagesManagerMessagingMessagelistStore5=k.preview;this.__emitChange();break;case c('PagesManagerMessagingActionType').BAN.UPDATE:this.$PagesManagerMessagingMessagelistStore15(k.pageID,k.userID,k.isBanned);this.__emitChange();break;default:return;}};j.prototype.$PagesManagerMessagingMessagelistStore12=function(k){'use strict';this.$PagesManagerMessagingMessagelistStore2=false;this.$PagesManagerMessagingMessagelistStore1=k.threadID;this.$PagesManagerMessagingMessagelistStore6=k.data.messages;};j.prototype.$PagesManagerMessagingMessagelistStore13=function(k){'use strict';if(this.$PagesManagerMessagingMessagelistStore1!==k.threadID)this.$PagesManagerMessagingMessagelistStore6=[];this.$PagesManagerMessagingMessagelistStore1=k.threadID;this.$PagesManagerMessagingMessagelistStore7=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();if(this.$PagesManagerMessagingMessagelistStore4&&this.$PagesManagerMessagingMessagelistStore5){m=this.$PagesManagerMessagingMessagelistStore6.slice();if(this.$PagesManagerMessagingMessagelistStore5)m.push(this.$PagesManagerMessagingMessagelistStore5);return m;}return this.$PagesManagerMessagingMessagelistStore6;};j.prototype.getScrollHeight=function(){'use strict';return this.$PagesManagerMessagingMessagelistStore8;};j.prototype.getReadReceipts=function(k){'use strict';if(k!=this.$PagesManagerMessagingMessagelistStore1)return c('immutable').OrderedMap();return this.$PagesManagerMessagingMessagelistStore7;};j.prototype.isCardHidden=function(){'use strict';if(this.$PagesManagerMessagingMessagelistStore9===undefined||this.$PagesManagerMessagingMessagelistStore9===null)return null;return this.$PagesManagerMessagingMessagelistStore9;};j.prototype.getAppointmentBannerHeight=function(){'use strict';return this.$PagesManagerMessagingMessagelistStore11;};j.prototype.$PagesManagerMessagingMessagelistStore14=function(k,l){'use strict';this.$PagesManagerMessagingMessagelistStore9=l;var m=c('ActorURI').create(c('XPagesContextCardSetIsHiddenController').getURIBuilder().getURI(),k);new (c('AsyncRequest'))().setURI(m).setData({is_hidden:l}).setMethod('POST').send();};j.prototype.$PagesManagerMessagingMessagelistStore16=function(k,l){'use strict';return k+'_'+l;};j.prototype.getIsUserBanned=function(k,l){'use strict';return this.$PagesManagerMessagingMessagelistStore10.get(this.$PagesManagerMessagingMessagelistStore16(k,l));};j.prototype.$PagesManagerMessagingMessagelistStore15=function(k,l,m){'use strict';this.$PagesManagerMessagingMessagelistStore10.set(this.$PagesManagerMessagingMessagelistStore16(k,l),m);};f.exports=new j(c('PagesManagerMessagingMessagelistDispatcher'));},null);
  __d('PagesManagerMessagingIntentNotificationContainer.react',['cx','PagesManagerMessagingClassifierActions','PagesManagerMessagingClassifierStore','FluxContainer','PagesManagerMessagingMessagelistStore','PagesManagerMessagingIntentNotificationView.react','React','ReactDOM','Vector'],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.getStores=function(l){return [c('PagesManagerMessagingClassifierStore'),c('PagesManagerMessagingMessagelistStore')];};k.calculateState=function(l,m){var n=null,o=m.activeThreadID,p=c('PagesManagerMessagingClassifierStore').getIsClassifierEnabled();if(o&&p){var q=c('PagesManagerMessagingMessagelistStore').getMessagelist(m.pageID,o);if(q.length>0)n=q[q.length-1];}if(n&&n.other_user_fbid!==m.pageID&&(!l||l.lastMessage!==n))c('PagesManagerMessagingClassifierActions').checkForIntent(n.body,n.other_user_fbid,m.pageID);return {isClassifierEnabled:p,shouldShow:c('PagesManagerMessagingClassifierStore').getShouldShowNotification(),lastMessage:n,lastIntent:c('PagesManagerMessagingClassifierStore').getLastIntent()};};function k(l){j.constructor.call(this,l);}k.prototype.componentDidUpdate=function(){c('PagesManagerMessagingClassifierActions').notifyNotificationHeightChanged(c('Vector').getElementDimensions(c('ReactDOM').findDOMNode(this.refs.notification)).y);};k.prototype.render=function(){return (c('React').createElement(c('PagesManagerMessagingIntentNotificationView.react'),{intent:this.state.lastIntent,className:"_2lu4",ref:'notification',isClassifierEnabled:this.state.isClassifierEnabled,pageID:this.props.pageID}));};f.exports=c('FluxContainer').create(k,{withProps:true,pure:true});},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('PagesManagerMessagingIntentVerifier.react',['cx','fbt','PagesManagerMessagingClassifierActions','Link.react','React','joinClasses'],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(){var m,n;for(var o=arguments.length,p=Array(o),q=0;q<o;q++)p[q]=arguments[q];return m=(n=k.constructor).call.apply(n,[this].concat(p)),this.$PagesManagerMessagingIntentVerifier1=function(r){c('PagesManagerMessagingClassifierActions').verifyIntentClassification(this.props.messageID,this.props.message,false);r.stopPropagation();}.bind(this),this.$PagesManagerMessagingIntentVerifier2=function(r){c('PagesManagerMessagingClassifierActions').verifyIntentClassification(this.props.messageID,this.props.message,true);r.stopPropagation();}.bind(this),m;}l.prototype.render=function(){return (c('React').createElement('div',{className:c('joinClasses')(this.props.className,"_45zu")},c('React').createElement('span',null,i._("Is this about {intent}?",[i.param('intent',this.props.intent)])),c('React').createElement(c('Link.react'),{onClick:this.$PagesManagerMessagingIntentVerifier2},i._("Yes")),c('React').createElement(c('Link.react'),{onClick:this.$PagesManagerMessagingIntentVerifier1},i._("No"))));};f.exports=l;},null);
  __d('PagesManagerMessagingIntentVerificationContainer.react',['PagesManagerMessagingClassifierStore','FluxContainer','PagesManagerMessagingIntentVerifier.react','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;j.getStores=function(k){return [c('PagesManagerMessagingClassifierStore')];};j.calculateState=function(k,l){return {intentDescription:c('PagesManagerMessagingClassifierStore').getIntentDescriptionByMessageID(l.message.message_id),isFeatureEnabled:c('PagesManagerMessagingClassifierStore').getIsClassifierVerificationEnabled()};};function j(k){i.constructor.call(this,k);}j.prototype.render=function(){var k=this.state.intentDescription;if(!k||!this.state.isFeatureEnabled)return null;return (c('React').createElement(c('PagesManagerMessagingIntentVerifier.react'),{intent:k,messageID:this.props.message.message_id,message:this.props.message.body}));};f.exports=c('FluxContainer').create(j,{withProps:true,pure:true});},null);
  __d('PagesManagerMessagingMessageGroup.react',['MessengerMessageGroup.react','PagesManagerMessagingIntentVerificationContainer.react','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;j.prototype.render=function(){return (c('React').createElement(c('MessengerMessageGroup.react'),babelHelpers['extends']({},this.props,{pageCustomAction:c('PagesManagerMessagingIntentVerificationContainer.react')})));};function j(){h.apply(this,arguments);}f.exports=j;},null);
  __d('PagesManagerMessagingMessageList.react',['cx','ChatTypingIndicators.react','immutable','MessageList.react','MessengerLogMessage.react','MessengerMessageGroup.react','MessengerSpinner.react','MessengerTypingIndicator.react','PagesEventObserver','PagesEventType','PagesManagerMessagingMessageDateBreak.react','PagesManagerMessagingMessageGroup.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('PagesManagerMessagingMessageGroup.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('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('PagesManagerMessagingPriorityNavigationUnit',['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.PRIORITY);}k.prototype.getDisplayTitle=function(){return h._("Priority View");};f.exports=k;},null);
  __d('PagesManagerMessagingPriorityStore',['FluxStore','MercuryFilters','MercuryPageOrderedThreadlist','PagesManagerActionType','PagesManagerDispatcher','PagesManagerMessagingPriorityNavigationUnit','PagesManagerMessagingInboxNavigationUnit','PagesManagerMessagingAllNavigationUnit'],function a(b,c,d,e,f,g){'use strict';var h,i;if(c.__markCompiled)c.__markCompiled();var j=new (c('PagesManagerMessagingInboxNavigationUnit'))(),k=new (c('PagesManagerMessagingPriorityNavigationUnit'))(),l=new (c('PagesManagerMessagingAllNavigationUnit'))();h=babelHelpers.inherits(m,c('FluxStore'));i=h&&h.prototype;function m(){i.constructor.call(this,c('PagesManagerDispatcher'));this.$PagesManagerMessagingPriorityStore1=true;this.$PagesManagerMessagingPriorityStore2=true;this.$PagesManagerMessagingPriorityStore3=false;this.$PagesManagerMessagingPriorityStore4=false;this.$PagesManagerMessagingPriorityStore5=0;}m.prototype.__onDispatch=function(n){switch(n.type){case c('PagesManagerActionType').LIST.FETCH:if(this.$PagesManagerMessagingPriorityStore4)this.$PagesManagerMessagingPriorityStore6(n);break;case c('PagesManagerActionType').LIST.LOADING:if(this.$PagesManagerMessagingPriorityStore4){this.$PagesManagerMessagingPriorityStore3=true;this.__emitChange();}break;case c('PagesManagerActionType').LIST.SWITCH_PRIORITY:this.$PagesManagerMessagingPriorityStore4=n.isPriorityOn;break;default:return;}};m.prototype.$PagesManagerMessagingPriorityStore7=function(n,o,p){var q=c('MercuryPageOrderedThreadlist').getForFBID(n);q.getFilteredThreadlist(o,p+1,j.getKey(),k.getKey(),function(r){var s=r.length>p;this.$PagesManagerMessagingPriorityStore8(s);}.bind(this));};m.prototype.$PagesManagerMessagingPriorityStore9=function(n,o,p){var q=c('MercuryPageOrderedThreadlist').getForFBID(n),r=q.getAvailableThreadlistNow(j.getKey(),k.getKey());q.getFilteredThreadlist(this.$PagesManagerMessagingPriorityStore5,p+1,j.getKey(),l.getKey(),function(s){var t=s.length>p;s=t?s.slice(0,-1):s;s=this.$PagesManagerMessagingPriorityStore10(s,r);q.addNonPriorityThreadsWithoutSort(s);this.$PagesManagerMessagingPriorityStore5+=p;this.$PagesManagerMessagingPriorityStore11(t);}.bind(this));return;};m.prototype.$PagesManagerMessagingPriorityStore12=function(n){var o=c('MercuryPageOrderedThreadlist').getForFBID(n);return o.getAvailableThreadlistNow(j.getKey(),k.getKey());};m.prototype.$PagesManagerMessagingPriorityStore13=function(n){if(this.$PagesManagerMessagingPriorityStore2)return [];var o=c('MercuryPageOrderedThreadlist').getForFBID(n);return o.getAvailableThreadlistNow(j.getKey(),c('MercuryFilters').NONPRIORITY);};m.prototype.$PagesManagerMessagingPriorityStore6=function(n){var o=n.pageID,p=n.offset,q=n.limit;this.$PagesManagerMessagingPriorityStore3=true;if(this.$PagesManagerMessagingPriorityStore2){var r=this.$PagesManagerMessagingPriorityStore14(o,p+q);if(r){this.$PagesManagerMessagingPriorityStore8(this.$PagesManagerMessagingPriorityStore2);}else this.$PagesManagerMessagingPriorityStore7(o,p,q);}else{var s=this.$PagesManagerMessagingPriorityStore15(o,this.$PagesManagerMessagingPriorityStore5+q);if(s){this.$PagesManagerMessagingPriorityStore11(this.$PagesManagerMessagingPriorityStore1);}else this.$PagesManagerMessagingPriorityStore9(o,p,q);}};m.prototype.$PagesManagerMessagingPriorityStore14=function(n,o){var p=c('MercuryPageOrderedThreadlist').getForFBID(n);return p.getThreadCount(j.getKey(),k.getKey())>=o;};m.prototype.$PagesManagerMessagingPriorityStore15=function(n,o){var p=c('MercuryPageOrderedThreadlist').getForFBID(n);return p.hasLoadedThreadlist(j.getKey(),l.getKey())||p.getThreadCount(j.getKey(),l.getKey())>=o;};m.prototype.$PagesManagerMessagingPriorityStore8=function(n){this.$PagesManagerMessagingPriorityStore3=false;this.$PagesManagerMessagingPriorityStore2=n;if(!this.__dispatcher.isDispatching())this.__dispatcher.dispatch({type:c('PagesManagerActionType').LIST.FETCHED});};m.prototype.$PagesManagerMessagingPriorityStore11=function(n){this.$PagesManagerMessagingPriorityStore3=false;this.$PagesManagerMessagingPriorityStore1=n;if(!this.__dispatcher.isDispatching())this.__dispatcher.dispatch({type:c('PagesManagerActionType').LIST.FETCHED});};m.prototype.$PagesManagerMessagingPriorityStore10=function(n,o){return n.filter(function(p){return !o.includes(p);});};m.prototype.getIsPriorityMode=function(){return this.$PagesManagerMessagingPriorityStore4;};m.prototype.getPriorityItemList=function(n){var o=this.$PagesManagerMessagingPriorityStore12(n);return this.$PagesManagerMessagingPriorityStore2&&o.length>0?o.slice(0,o.length-1):o;};m.prototype.getNonPriorityItemList=function(n){var o=this.$PagesManagerMessagingPriorityStore13(n);return this.$PagesManagerMessagingPriorityStore1&&o.length>0?o.slice(0,o.length-1):o;};m.prototype.hasMorePriorityItem=function(){return this.$PagesManagerMessagingPriorityStore2;};m.prototype.hasMoreNonPriorityItem=function(){return this.$PagesManagerMessagingPriorityStore1;};m.prototype.isLoading=function(){return this.$PagesManagerMessagingPriorityStore3;};f.exports=new m();},null);
  __d('PagesManagerMessagingThreadlistStore',['AbstractPagesManagerListStore','PagesManagerActionType','MercuryPageOrderedThreadlist','MercuryThreadlistConstants','PagesManagerDispatcher','PagesManagerMessagingFilterStore','PagesManagerMessagingPriorityStore','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.__onDispatch=function(k){'use strict';var l=c('PagesManagerMessagingPriorityStore').getIsPriorityMode();switch(k.type){case c('PagesManagerActionType').LIST.FETCH:if(!l)this.__handleListFetch(k);break;case c('PagesManagerActionType').LIST.LOADING:if(!l){this.__isLoading=true;this.__emitChange();}break;default:i.__onDispatch.call(this,k);}};j.prototype.$PagesManagerMessagingThreadlistStore1=function(){'use strict';return c('PagesManagerMessagingSearchStore').getCustomTagsFilterName()||c('PagesManagerMessagingFilterStore').getActiveFilterName();};j.prototype.$PagesManagerMessagingThreadlistStore2=function(k,l){'use strict';var m=c('MercuryPageOrderedThreadlist').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('MercuryPageOrderedThreadlist').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('MercuryPageOrderedThreadlist').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,timestamp:m?m.timestamp:null});return l;},_clearURLParam:function(){var i=c('URI').getRequestURI();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('PagesManagerMessagingBatchActionMenu.react',['cx','fbt','invariant','AsyncRequest','MercuryPageThreadActions','InsightsInfoTip.react','PagesAdminToolUIActionType','PagesManagerAction','PagesManagerLogger','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();c('PagesManagerLogger').logMessageInboxUIAction(c('PagesAdminToolUIActionType').MESSAGE_INBOX_CLICK_MENU_ACTION,this.props.pageID,{menu_action:p,position:this.props.placement});var q=null,r=false;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;r=true;break;case c('PagesMessengerActions').MARK_AS_UNSPAM:q=this.$PagesManagerMessagingBatchActionMenu1.batchUnmarkSpam;r=true;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;r=true;break;case c('PagesMessengerActions').UNARCHIVE:q=this.$PagesManagerMessagingBatchActionMenu1.batchUnarchive;r=true;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();if(r===true)c('PagesManagerAction').viewListItem(null);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'),{key:'cancel'}),c('React').createElement(c('XUIDialogButton.react'),{action:'cancel',key:'submit',label:r,onClick:function(){this.$PagesManagerMessagingBatchActionMenu1.batchDelete(this.props.selectedRows,c('PagesMessagingActionPlacement').THREAD_LIST_BATCH_ACTION);c('PagesManagerAction').deselectAll();c('PagesManagerAction').viewListItem(null);this.props.onSelectionClear&&this.props.onSelectionClear();}.bind(this),use:'confirm'})];c('SimpleXUIDialog').showEx(q,p,s);};n.prototype.$PagesManagerMessagingBatchActionMenu4=function(){'use strict';c('PagesManagerMessagingMessagelistAction').setIsContextCardHidden(this.props.pageID,true);};n.prototype.$PagesManagerMessagingBatchActionMenu5=function(){'use strict';c('PagesManagerMessagingMessagelistAction').setIsContextCardHidden(this.props.pageID,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('PagesManagerMessagingThreadTitle.react',['cx','fbt','ix','ContextualDialogArrow','ContextualLayerAutoFlip','Image.react','InlineBlock.react','LeftRight.react','Link.react','MercuryIDs','MercuryParticipants','MercuryThreadTitle.react','PagesManagerMessagingBatchActionMenu.react','PagesMessengerThreadUtils','PagesMessagingActionPlacement','MercuryParticipantListRenderer','XUIPopoverButton.react','React'],function a(b,c,d,e,f,g,h,i,j){var k,l;if(c.__markCompiled)c.__markCompiled();k=babelHelpers.inherits(m,c('React').Component);l=k&&k.prototype;function m(n){'use strict';l.constructor.call(this,n);this.state={href:'',userName:null,imageSource:null,menuShown:false};}m.prototype.$PagesManagerMessagingThreadTitle1=function(n){'use strict';if(n&&n.other_user_fbid){var o=c('MercuryIDs').getParticipantIDFromUserID(n.other_user_fbid);c('MercuryParticipants').get(o,function(p){var q=new (c('MercuryParticipantListRenderer'))().renderParticipantList([p]);this.setState({userName:q,href:p.href,imageSource:p.image_src});}.bind(this));}};m.prototype.componentWillMount=function(){'use strict';this.$PagesManagerMessagingThreadTitle1(this.props.thread);};m.prototype.componentWillReceiveProps=function(n){'use strict';this.$PagesManagerMessagingThreadTitle1(n.thread);};m.prototype.$PagesManagerMessagingThreadTitle2=function(){'use strict';return (c('React').createElement('div',null,this.state.imageSource?c('React').createElement(c('Image.react'),{className:"_3stv",src:this.state.imageSource}):c('React').createElement('div',{className:"_3stv"}),c('React').createElement(c('InlineBlock.react'),{className:"_3ak8 _3-9a"},c('React').createElement(c('MercuryThreadTitle.react'),{className:"_174p",thread:this.props.thread,viewer:this.props.pageID,showUnreadCount:false}),c('React').createElement(c('Link.react'),{href:this.state.href?this.state.href:'',target:'_blank'},i._("View Profile")))));};m.prototype.render=function(){'use strict';if(this.props.thread===null||this.props.thread===undefined)return c('React').createElement('div',{className:"_174o"});var n=c('PagesMessengerThreadUtils').getBatchActionMenuParam(this.props.thread);n.showMarkRead=false;n.showMarkUnread=false;n.showHideContextCard=this.props.isContextCardEnabled&&!this.props.isContextCardHidden;n.showShowContextCard=this.props.isContextCardEnabled&&this.props.isContextCardHidden;var o=c('React').createElement(c('XUIPopoverButton.react'),{label:i._("Actions")});return (c('React').createElement(c('LeftRight.react'),{className:"_3stw"},this.$PagesManagerMessagingThreadTitle2(),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:n,placement:c('PagesMessagingActionPlacement').THREAD_TITLE_BAR,selectedRows:[this.props.thread&&this.props.thread.thread_id],showBanFromPage:this.props.isBanFromPageEnabled,showBatchAction:true,userID:this.props.thread?this.props.thread.other_user_fbid:null,userName:this.state?this.state.userName:null},o)));};f.exports=m;},null);
  __d('PagesManagerMessagingDetailContainer.react',['cx','BootloadedComponent.react','FluxContainer','Grid.react','immutable','JSResource','MercuryMessageStore','MercuryRoger','MercuryThreadInformer','MercuryThreads','MessagingTag','MessengerConfig','MessengerHotLikePreviewEvents','PagesEventType','PagesManagerMessagingAppointmentBannerRoot.react','PagesManagerMessagingClassifierStore','PagesManagerMessagingComposerContainer.react','PagesManagerMessagingFilterStore','PagesManagerMessagingIntentNotificationContainer.react','PagesManagerMessagingMessageList.react','PagesManagerMessagingMessagelistAction','PagesManagerMessagingMessagelistStore','PagesManagerMessagingTabPerfEvents','PagesManagerMessagingThreadInteractionHelper','PagesManagerMessagingThreadTitle.react','PagesManagerPerfLogger','PagesMessagingPerfTypedLogger','React','ReactDOM','Set','SubscriptionsHandler','Vector','debounce'],function a(b,c,d,e,f,g,h){var i,j;if(c.__markCompiled)c.__markCompiled();var k=c('Grid.react').GridItem;i=babelHelpers.inherits(l,c('React').Component);j=i&&i.prototype;function l(m,n){'use strict';j.constructor.call(this,m,n);this.$PagesManagerMessagingDetailContainer6=c('MercuryRoger').getForFBID(m.pageID);this.$PagesManagerMessagingDetailContainer10=c('MercuryThreadInformer').getForFBID(m.pageID);this.$PagesManagerMessagingDetailContainer2=null;this.$PagesManagerMessagingDetailContainer4=false;this.state={appointmentBannerHeight:0,isContextCardEnabled:false,isLoading:false,isLoadingMore:false,messaginglist:[],preventScroll:false,hideContextCard:m.config.hideContextCard,threadID:'',thread:{}};this.$PagesManagerMessagingDetailContainer7=c('debounce')(function(){if(this.props.height)this.$PagesManagerMessagingDetailContainer11(this.props.height);}.bind(this),50);}l.getStores=function(){'use strict';return [c('PagesManagerMessagingMessagelistStore'),c('PagesManagerMessagingClassifierStore')];};l.calculateState=function(m,n){'use strict';var o=[],p={},q=null;if(n.listItemKey){o=c('PagesManagerMessagingMessagelistStore').getMessagelist(n.pageID,n.listItemKey);p=c('PagesManagerMessagingMessagelistStore').getReadReceipts(n.listItemKey);q=c('MercuryThreads').getForFBID(n.pageID).getThreadMetaNow(n.listItemKey);if(q&&q.other_user_fbid&&n.config&&n.pageID)c('PagesManagerMessagingMessagelistAction').fetchIsUserBanned(n.pageID,q.other_user_fbid);}var r=c('PagesManagerMessagingMessagelistStore').isCardHidden();if(r===null)r=n.config.hideContextCard;var s=n.config.enableContextCard&&q&&q.other_user_fbid,t=n.pageID&&q&&q.other_user_fbid?c('PagesManagerMessagingMessagelistStore').getIsUserBanned(n.pageID,q.other_user_fbid):false;return {appointmentBannerHeight:c('PagesManagerMessagingMessagelistStore').getAppointmentBannerHeight(),isContextCardEnabled:s,hideContextCard:r,isLoading:c('PagesManagerMessagingMessagelistStore').isLoading(),isLoadingMore:c('PagesManagerMessagingMessagelistStore').isLoadingMore(),isUserBanned:t,scrollHeight:c('PagesManagerMessagingMessagelistStore').getScrollHeight()-c('PagesManagerMessagingClassifierStore').getNotificationAreaHeight(),messagelist:o,readReceipts:p,threadID:n.listItemKey,thread:q};};l.prototype.$PagesManagerMessagingDetailContainer11=function(m){'use strict';var n=0;if(this.refs.threadTitle)n=c('Vector').getElementDimensions(c('ReactDOM').findDOMNode(this.refs.threadTitle)).y;var o=c('Vector').getElementDimensions(c('ReactDOM').findDOMNode(this.refs.composer)).y,p=m-n-o-this.state.appointmentBannerHeight;if(p<0)p=0;c('PagesManagerMessagingMessagelistAction').setScrollAreaHeight(p);};l.prototype.$PagesManagerMessagingDetailContainer12=function(m,n){'use strict';var o=this.$PagesManagerMessagingDetailContainer6.getSeenTimestamps(m),p=new (c('Set'))(o.keys());return o.withMutations(function(q){c('immutable').Seq(n).reverse().forEach(function(r){if(p.size===0)return false;if(!p.has(r.author))return true;q.update(r.author,function(s){if(!s||s.watermark<=r.timestamp)return {watermark:r.timestamp,action:r.timestamp};return s;});p['delete'](r.author);});});};l.prototype.componentDidMount=function(){'use strict';c('PagesManagerPerfLogger').log(c('PagesManagerMessagingTabPerfEvents').MESSAGE_TAB_DETAIL_VIEW_DID_RENDER,this.props.perfParams);if(this.props.listItemKey)this.$PagesManagerMessagingDetailContainer13(this.props.listItemKey);};l.prototype.componentWillReceiveProps=function(m){'use strict';if(this.props.listItemKey!==m.listItemKey&&m.listItemKey!==null)this.$PagesManagerMessagingDetailContainer13(m.listItemKey);};l.prototype.componentWillUpdate=function(m,n){'use strict';if(m.height!==this.props.height)this.$PagesManagerMessagingDetailContainer11(m.height);};l.prototype.componentDidUpdate=function(m,n){'use strict';if(n.appointmentBannerHeight!==this.state.appointmentBannerHeight)this.$PagesManagerMessagingDetailContainer11(this.props.height);};l.prototype.getMessageStore=function(){'use strict';return this.$PagesManagerMessagingDetailContainer5;};l.prototype.logMessageLoadingStart=function(m){'use strict';this.$PagesManagerMessagingDetailContainer3=true;this.$PagesManagerMessagingDetailContainer1=Date.now();this.$PagesManagerMessagingDetailContainer9=m;new (c('PagesMessagingPerfTypedLogger'))().setPageID(this.props.pageID).setEventName(c('PagesEventType').MESSAGES_MESSAGELIST_LOAD_START).log();};l.prototype.logMessageLoadingEnd=function(){'use strict';if(this.$PagesManagerMessagingDetailContainer3&&this.$PagesManagerMessagingDetailContainer9===this.props.listItemKey){this.$PagesManagerMessagingDetailContainer3=false;new (c('PagesMessagingPerfTypedLogger'))().setPageID(this.props.pageID).setEventName(c('PagesEventType').MESSAGES_MESSAGELIST_LOAD_END).setPerfTime(Date.now()-this.$PagesManagerMessagingDetailContainer1).log();}};l.prototype.$PagesManagerMessagingDetailContainer13=function(m){'use strict';this.$PagesManagerMessagingDetailContainer14&&this.$PagesManagerMessagingDetailContainer14.destroy();this.$PagesManagerMessagingDetailContainer15&&this.$PagesManagerMessagingDetailContainer15.release();this.$PagesManagerMessagingDetailContainer5=new (c('MercuryMessageStore'))(m,c('MessengerConfig').MessageLoadCount,this.props.pageID);var n=c('PagesManagerMessagingMessagelistStore').getMessagelist(this.props.pageID,m);if(n.length===0){c('PagesManagerMessagingMessagelistAction').setIsLoadingMore(false);c('PagesManagerMessagingMessagelistAction').setIsLoading(true);this.logMessageLoadingStart(m);}var o=this.$PagesManagerMessagingDetailContainer12(m,n);c('PagesManagerMessagingMessagelistAction').updateReadReceipts(this.props.pageID,m,o);this.$PagesManagerMessagingDetailContainer15=new (c('SubscriptionsHandler'))();this.$PagesManagerMessagingDetailContainer15.addSubscriptions(this.$PagesManagerMessagingDetailContainer5.subscribe(function(p){this.logMessageLoadingEnd();c('PagesManagerMessagingMessagelistAction').setIsLoading(false);c('PagesManagerMessagingMessagelistAction').setIsLoadingMore(false);c('PagesManagerMessagingMessagelistAction').updateMessagelist(this.props.pageID,m,p);}.bind(this)),this.$PagesManagerMessagingDetailContainer10.subscribe('threads-updated',function(p,q){if(q[this.props.listItemKey])c('PagesManagerMessagingMessagelistAction').updateThread(this.props.pageID,this.props.listItemKey);}.bind(this)),this.$PagesManagerMessagingDetailContainer6.subscribe('change',function(p,q){if(q[this.props.listItemKey]){var r=c('PagesManagerMessagingMessagelistStore').getMessagelist(this.props.pageID,this.props.listItemKey),s=this.$PagesManagerMessagingDetailContainer12(this.props.listItemKey,r);c('PagesManagerMessagingMessagelistAction').updateReadReceipts(this.props.pageID,this.props.listItemKey,s);}}.bind(this)),c('MessengerHotLikePreviewEvents').addListener(c('MessengerHotLikePreviewEvents').START,function(p,q){if(m==q)c('PagesManagerMessagingMessagelistAction').setHotLikeStart(p);}),c('MessengerHotLikePreviewEvents').addListener(c('MessengerHotLikePreviewEvents').STOP,function(p){if(m==p)c('PagesManagerMessagingMessagelistAction').setHotLikeEnd();}));};l.prototype.$PagesManagerMessagingDetailContainer16=function(){'use strict';var m=c('PagesManagerMessagingFilterStore').getActiveFilterName();if(!this.props.listItemKey||m===c('MessagingTag').UNREAD)return;c('PagesManagerMessagingThreadInteractionHelper').handleUnreadStateUpdate(this.props.listItemKey,this.props.pageID,m);c('PagesManagerMessagingThreadInteractionHelper').handlePermalinkUpdate(this.props.listItemKey,this.props.pageID);};l.prototype.$PagesManagerMessagingDetailContainer17=function(){'use strict';if(!this.state.isLoadingMore)if(this.getMessageStore().fetchMoreMessages()){c('PagesManagerMessagingMessagelistAction').setIsLoading(false);c('PagesManagerMessagingMessagelistAction').setIsLoadingMore(true);}};l.prototype.$PagesManagerMessagingDetailContainer18=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.$PagesManagerMessagingDetailContainer17();}.bind(this),readReceipts:this.state.readReceipts,scrollHeight:this.state.scrollHeight,threadID:this.state.threadID,thread:this.state.thread})));};l.prototype.$PagesManagerMessagingDetailContainer19=function(m){'use strict';if(!this.state.isContextCardEnabled)return null;var n=m,o=0;if(this.refs.threadTitle)o=c('Vector').getElementDimensions(c('ReactDOM').findDOMNode(this.refs.threadTitle)).y;n+=o;return (c('React').createElement(k,{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').__setRef('PagesManagerMessagingDetailContainer.react'),pageID:this.props.pageID,userID:this.state.thread&&this.state.thread.other_user_fbid,scrollHeight:n,updatedUI:true})));};l.prototype.$PagesManagerMessagingDetailContainer20=function(){'use strict';if(!this.props.config.enableComposer)return null;return (c('React').createElement('div',null,c('React').createElement(c('PagesManagerMessagingComposerContainer.react'),{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.$PagesManagerMessagingDetailContainer16();}.bind(this),recipientID:this.state.thread?this.state.thread.other_user_fbid.toString():null,ref:'composer',shouldShowCommerceInvoiceButton:this.props.config.shouldShowCommerceInvoiceButton,threadElementID:this.state.threadID,threadID:this.state.threadID,userID:this.props.pageID,enableBlockedComposer:this.props.config.enableBlockedComposer})));};l.prototype.$PagesManagerMessagingDetailContainer21=function(){'use strict';if(!this.props.config.enableBookingFlow)return null;return (c('React').createElement('div',null,c('React').createElement(c('PagesManagerMessagingAppointmentBannerRoot.react'),{pageID:this.props.pageID,userID:this.state.thread&&this.state.thread.other_user_fbid})));};l.prototype.render=function(){'use strict';return (c('React').createElement('div',null,c('React').createElement(c('Grid.react'),{alignv:'top',className:"_2utb",cols:this.state.isContextCardEnabled?2:1},c('React').createElement(k,{className:"_2utc"},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.$PagesManagerMessagingDetailContainer22();}.bind(this),ref:'threadTitle',thread:this.state.thread}),this.$PagesManagerMessagingDetailContainer21(),this.$PagesManagerMessagingDetailContainer18(),c('React').createElement(c('PagesManagerMessagingIntentNotificationContainer.react'),{refs:'intentNotification',pageID:this.props.pageID,activeThreadID:this.props.listItemKey})),this.$PagesManagerMessagingDetailContainer19(this.state.scrollHeight)),this.$PagesManagerMessagingDetailContainer20()));};f.exports=c('FluxContainer').create(l,{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(){var o,p;'use strict';for(var q=arguments.length,r=Array(q),s=0;s<q;s++)r[s]=arguments[s];return o=(p=k.constructor).call.apply(p,[this].concat(r)),this.$PagesManagerNavigationView1=function(t,u){this.props.onUnitSelected(this.$PagesManagerNavigationView3(u.item.getValue()));}.bind(this),this.$PagesManagerNavigationView2=function(t){return (c('React').createElement(l,{key:t.getKey(),value:t.getKey()},c('React').createElement('div',{className:"_-7b"},t.getDisplayTitle())));},o;}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.render=function(){'use strict';return c('React').createElement('div',{className:"_-7a"},this.$PagesManagerNavigationView5(),this.$PagesManagerNavigationView6());};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','PagesAdminToolUIActionType','PagesManagerLogger','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('PagesManagerLogger').logMessageInboxUIAction(c('PagesAdminToolUIActionType').MESSAGE_INBOX_SWITCH_FOLDER,this.props.pageID,{folder:m.getKey(),position:'filter_section'});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','PagesManagerCountDownTimer.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(){'use strict';if(this.props.isAway)c('PagesManagerAwayToggleAction').setToggleStatus(this.props.pageID,false);};l.prototype.$PagesManagerAwayToggle2=function(m){'use strict';if(m!==this.props.isAway)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"]),o=0;if(this.props.expirationTimestamp)o=this.props.expirationTimestamp*1000;var p=c('React').createElement(c('PagesManagerCountDownTimer.react'),{expireTimestamp:o,isHidden:!this.props.isAway,onTimeup:function(){return this.$PagesManagerAwayToggle1();}.bind(this)});return (c('React').createElement('div',{className:"_4cdp"},c('React').createElement('div',{className:"_ast"},c('React').createElement(c('BUISwitch.react'),babelHelpers['extends']({onToggle:function(q){return this.$PagesManagerAwayToggle2(q);}.bind(this),value:this.props.isAway},c('Tooltip').propsFor(m)))),c('React').createElement('div',{className:"_asu"+(this.props.isAway?' '+"_2eyq":'')},n),p));};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',['ix','cx','fbt','Image.react','immutable','InlineBlock.react','LeftRight.react','Link.react','MessengerSpinner.react','PageCustomTagSearchSource','PageCustomTagSearchableEntry','PagesAdminToolUIActionType','PagesContextCardCustomTag.react','PagesEnumTag.react','PagesManagerCustomTagsAction','PagesManagerLogger','PagesManagerManageCustomTagsDialog.react','PagesManagerMessagingFilterActions','PagesManagerMessagingThreadlistAction','React','ReactDOM','SearchableTextInput.react','ScrollableArea.react','Vector','fbglyph','nullthrows','PagesManagerMessagingNavigationUnitKey'],function a(b,c,d,e,f,g,h,i,j){'use strict';var k,l;if(c.__markCompiled)c.__markCompiled();var m=c('PagesManagerMessagingNavigationUnitKey').FILTERS,n=45,o=130;k=babelHelpers.inherits(p,c('React').Component);l=k&&k.prototype;function p(q){l.constructor.call(this,q);this.$PagesManagerMessagingFilterPanel1=function(r){c('PagesManagerMessagingFilterActions').changeFilter(this.props.pageID,r);}.bind(this);this.$PagesManagerMessagingFilterPanel2=function(){c('PagesManagerMessagingFilterActions').changeFilter(this.props.pageID,this.props.defaultFilter);}.bind(this);this.$PagesManagerMessagingFilterPanel3=function(r){this.setState({tagQuery:'',tagQueryResult:null});c('PagesManagerMessagingThreadlistAction').addSearchCustomTag(this.props.pageID,r.name,'filter_panel');}.bind(this);this.$PagesManagerMessagingFilterPanel4=function(r){this.setState({tagQuery:'',tagQueryResult:null});c('PagesManagerMessagingThreadlistAction').removeSearchCustomTag(this.props.pageID,r.name,'filter_panel');}.bind(this);this.$PagesManagerMessagingFilterPanel6=function(event){this.setState({tagQuery:event.target.value});}.bind(this);this.$PagesManagerMessagingFilterPanel7=function(r,s){if(s===this.state.tagQuery)this.setState({tagQueryResult:r.map(function(t){return t.getTitle();})});}.bind(this);this.$PagesManagerMessagingFilterPanel14=function(){c('PagesManagerLogger').logMessageInboxUIAction(c('PagesAdminToolUIActionType').MESSAGE_INBOX_CLICK_MANAGE_TAGS,this.props.pageID);this.$PagesManagerMessagingFilterPanel15(true);}.bind(this);this.$PagesManagerMessagingFilterPanel15=function(r){c('PagesManagerCustomTagsAction').toggleManageTagsDialog(this.props.pageID,r);}.bind(this);this.state={tagQuery:'',tagQueryResult:null};}p.prototype.$PagesManagerMessagingFilterPanel5=function(){var q=this.props.height-n,r=c('ReactDOM').findDOMNode(this.refs.header);if(r!==null)q-=c('Vector').getElementDimensions(r).y;var s=c('ReactDOM').findDOMNode(this.refs.searchBar);if(s!==null)q-=c('Vector').getElementDimensions(s).y;return q-o;};p.prototype.$PagesManagerMessagingFilterPanel8=function(q){return c('React').createElement('div',{className:"_3v0k",key:q.getKey()},c('React').createElement(c('Image.react'),{className:"__o0",src:h("\/images\/assets_DO_NOT_HARDCODE\/fb_glyphs\/checkmark_16_bluegray-40.png")}),c('React').createElement(c('PagesEnumTag.react'),{onClick:this.$PagesManagerMessagingFilterPanel1,unit:q,textOnly:true}),c('React').createElement(c('Link.react'),{className:"__o1",onClick:this.$PagesManagerMessagingFilterPanel2},j._("Remove")));};p.prototype.$PagesManagerMessagingFilterPanel9=function(q){return c('React').createElement('div',{className:"_3v0k",key:q.getKey()},c('React').createElement(c('PagesEnumTag.react'),{onClick:this.$PagesManagerMessagingFilterPanel1,unit:q,textOnly:true}));};p.prototype.$PagesManagerMessagingFilterPanel10=function(q){return c('React').createElement('div',{className:"_3v0k",key:q.id},c('React').createElement(c('Image.react'),{className:"__o0",src:h("\/images\/assets_DO_NOT_HARDCODE\/fb_glyphs\/checkmark_16_bluegray-40.png")}),c('React').createElement(c('PagesContextCardCustomTag.react'),{canRemove:false,key:q.id,tagData:q,textOnly:true}),c('React').createElement(c('Link.react'),{className:"__o1",onClick:function(){return this.$PagesManagerMessagingFilterPanel4(q);}.bind(this)},j._("Remove")));};p.prototype.$PagesManagerMessagingFilterPanel11=function(q){var r=null;if(this.props.currentSearchCustomTagThreadCounts)r=this.props.currentSearchCustomTagThreadCounts.get(q.name);return c('React').createElement('div',{className:"_3v0k",key:q.id},c('React').createElement(c('PagesContextCardCustomTag.react'),{canRemove:false,key:q.id,tagData:q,onClick:this.$PagesManagerMessagingFilterPanel3,textOnly:true}),c('React').createElement('span',{className:"_2-3_"},r!==null?r:c('React').createElement(c('MessengerSpinner.react'),null)));};p.prototype.$PagesManagerMessagingFilterPanel12=function(){var q=[],r=[],s=[],t=this.state.tagQuery!==''&&this.state.tagQueryResult!==null;if(this.props.activeFilter.getKey()===m.FLAGGED)q.push(this.$PagesManagerMessagingFilterPanel8(this.props.activeFilter));this.props.currentSearchCustomTagNames.map(function(u){if(!t||c('nullthrows')(this.state.tagQueryResult).indexOf(u)>=0)q.push(this.$PagesManagerMessagingFilterPanel10(this.props.customTags.get(u)));}.bind(this));if(this.state.tagQuery!==''&&this.state.tagQueryResult!==null){c('nullthrows')(this.state.tagQueryResult).map(function(u){if(!this.props.currentSearchCustomTagNames.contains(u))s.push(this.$PagesManagerMessagingFilterPanel11(this.props.customTags.get(u)));}.bind(this));}else{if(this.props.enumTags)this.props.enumTags.forEach(function(u){if(u.getKey()!==this.props.activeFilter.getKey())r.push(this.$PagesManagerMessagingFilterPanel9(u));}.bind(this));if(this.props.currentSearchCustomTagThreadCounts!==null)this.props.currentSearchCustomTagThreadCounts.forEach(function(u,v){if(!this.props.currentSearchCustomTagNames.contains(v))s.push(this.$PagesManagerMessagingFilterPanel11(this.props.customTags.get(v)));}.bind(this));this.props.customTags.forEach(function(u,v){if(!this.props.currentSearchCustomTagNames.contains(v)&&(this.props.currentSearchCustomTagThreadCounts===null||v in this.props.currentSearchCustomTagThreadCounts))s.push(this.$PagesManagerMessagingFilterPanel11(this.props.customTags.get(v)));}.bind(this));}return c('React').createElement(c('ScrollableArea.react'),{className:"_3v0j",height:this.$PagesManagerMessagingFilterPanel5(),key:'tagList'},q,r,s);};p.prototype.$PagesManagerMessagingFilterPanel13=function(){return c('React').createElement(c('InlineBlock.react'),null,c('React').createElement(c('Image.react'),{src:'/images/pages/context_card/tag.png'}),c('React').createElement(c('InlineBlock.react'),{className:"_106m"},c('React').createElement('div',{className:"_106n"},j._("About Labels")),j._("Labels help you track and find conversations. Create your own labels and apply them to people based on what they messaged you about.")));};p.prototype.$PagesManagerMessagingFilterPanel16=function(){return (c('React').createElement(c('PagesManagerManageCustomTagsDialog.react'),{customTags:this.props.customTags,pageID:this.props.pageID,show:this.props.isManagingTags,onToggle:this.$PagesManagerMessagingFilterPanel15,isMergingLabels:this.props.isMergingLabels}));};p.prototype.render=function(){return (c('React').createElement('div',{className:"_5xjz",style:{height:this.props.height-n+'px'}},c('React').createElement(c('LeftRight.react'),{className:"_5xj_",ref:'header'},j._("LABELS"),c('React').createElement(c('Link.react'),{onClick:this.$PagesManagerMessagingFilterPanel14},j._("Add & Manage"))),c('React').createElement(c('SearchableTextInput.react'),{className:"_30p_",onChange:this.$PagesManagerMessagingFilterPanel6,onEntriesFound:this.$PagesManagerMessagingFilterPanel7,placeholder:j._("Search your labels..."),queryString:this.state.tagQuery,searchSource:c('PageCustomTagSearchSource').getInstance(this.props.customTags.toArray(),false),ref:'searchBar'}),this.$PagesManagerMessagingFilterPanel12(),this.$PagesManagerMessagingFilterPanel16(),this.$PagesManagerMessagingFilterPanel13()));};f.exports=p;},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(l,m){if(this.state.isFiltering&&!m.isFiltering&&this.state.currentSearchCustomTagThreadCounts===null)c('PagesManagerMessagingThreadlistAction').fetchCustomTagThreadCounts(this.props.pageID);};k.calculateState=function(l,m){return {activeFilter:c('PagesManagerMessagingFilterStore').getActiveFilter(),currentSearchCustomTagNames:c('PagesManagerMessagingSearchStore').getCurrentSearchCustomTagNames(),currentSearchCustomTagThreadCounts:c('PagesManagerMessagingSearchStore').getCurrentSearchCustomTagThreadCounts(),customTags:c('PagesManagerCustomTagsStore').getCustomTags(m.pageID),isManagingTags:c('PagesManagerCustomTagsStore').getIsManagingTags(),isFiltering:c('PagesManagerMessagingFilterStore').getIsFiltering(),isMergingLabels:c('PagesManagerCustomTagsStore').getIsMergingLabels()};};k.prototype.render=function(){var l=c('PagesManagerMessagingFilterStore').getAvailableFilters(),m=[],n=l.get(0);if(c('PagesManagerMessagingFilterStore').getActiveFilterName()===j.ALL)m=l.filter(function(o){return o.getKey()===j.FLAGGED;});return (c('React').createElement(c('PagesManagerMessagingFilterPanel.react'),{activeFilter:this.state.activeFilter,currentSearchCustomTagNames:this.state.currentSearchCustomTagNames,currentSearchCustomTagThreadCounts:this.state.currentSearchCustomTagThreadCounts,customTags:this.state.customTags,defaultFilter:n,enumTags:m,height:this.props.height,isManagingTags:this.state.isManagingTags,pageID:this.props.pageID,isMergingLabels:this.state.isMergingLabels}));};f.exports=c('FluxContainer').create(k,{withProps:true});},null);
  __d('PagesManagerMessagingFilterPanelSwitch.react',['ix','cx','fbt','AsyncRequest','ContextualDialogArrow','ContextualLayer.react','Image.react','PagesAdminToolUIActionType','PagesManagerLogger','PagesManagerMessagingFilterActions','PagesManagerMessagingFilterPanelContainer.react','React','XBasicFBNuxDismissController','XUIAmbientNUX.react','fbglyph'],function a(b,c,d,e,f,g,h,i,j){'use strict';var k,l;if(c.__markCompiled)c.__markCompiled();var m=4152;k=babelHelpers.inherits(n,c('React').Component);l=k&&k.prototype;function n(o){l.constructor.call(this,o);this.$PagesManagerMessagingFilterPanelSwitch1=function(){var p=c('XBasicFBNuxDismissController').getURIBuilder().setInt('nux_id',m).getURI();new (c('AsyncRequest'))().setURI(p).send();this.setState({showNUX:false});}.bind(this);this.$PagesManagerMessagingFilterPanelSwitch2=function(){c('PagesManagerLogger').logMessageInboxUIAction(c('PagesAdminToolUIActionType').MESSAGE_INBOX_TOGGLE_FILTER_PANEL,this.props.pageID,{show:!this.props.isFiltering});c('PagesManagerMessagingFilterActions').toggleFilterPanel(this.props.pageID,!this.props.isFiltering);}.bind(this);this.state={showNUX:this.props.showNUX};}n.prototype.$PagesManagerMessagingFilterPanelSwitch3=function(){return (c('React').createElement(c('XUIAmbientNUX.react'),{contextRef:function(){return this.refs.contextRef;}.bind(this),onCloseButtonClick:this.$PagesManagerMessagingFilterPanelSwitch1,position:'above',shown:this.state.showNUX,width:'auto'},j._("Now You can filter your inbox by labels.")));};n.prototype.render=function(){return (c('React').createElement('span',null,c('React').createElement('span',{className:"_5pwy",onClick:this.$PagesManagerMessagingFilterPanelSwitch2,ref:'contextRef'},c('React').createElement('span',{className:"_5pwz"+(this.props.isFiltering?' '+"_5px3":'')},j._("Filter By")),c('React').createElement(c('Image.react'),{className:"_5px4",src:this.props.isFiltering?h("\/images\/assets_DO_NOT_HARDCODE\/fb_glyphs\/cross_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,enablePriorityView:this.props.enablePriorityView})),this.$PagesManagerMessagingFilterPanelSwitch3()));};f.exports=n;},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&&(!this.props.priorityList||!this.props.priorityList.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';var m=this.props.list.map(function(q){return (c('React').createElement(c('PagesManagerListRowContainer.react'),babelHelpers['extends']({ChildClass:this.props.listRowContainer,listItem:q,pageID:this.props.pageID,ref:this.props.getKey(q),key:this.props.getKey(q),onViewingListItem:this.$PagesManagerMessagingList1,type:'li'},this.props.containerProps)));}.bind(this));if(!this.props.isInPriorityMode||!this.props.priorityList)return m;var n=this.props.priorityList.map(function(q){return (c('React').createElement(c('PagesManagerListRowContainer.react'),babelHelpers['extends']({ChildClass:this.props.listRowContainer,listItem:q,pageID:this.props.pageID,ref:this.props.getKey(q),key:this.props.getKey(q),onViewingListItem:this.$PagesManagerMessagingList1,type:'li'},this.props.containerProps)));}.bind(this)),o=c('React').createElement('li',{className:"_16-z",key:'priorityTitle'},i._("Unread and Important messages"));if(this.props.list.length){var p=c('React').createElement('li',{className:"_16-z",key:'otherTitle'},i._("Other messages"));return [o].concat(n,[p],m);}return [o].concat(n);};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||this.props.isFilteringByTag,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('PagesManagerMessagingThreadIntentView.react',['cx','React','joinClasses'],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:c('joinClasses')(!this.props.intentDescription||this.props.isThreadReplied&&this.props.isThreadSeen?"hidden_elem":'',this.props.className)},c('React').createElement('div',{className:"_5jsx"}),c('React').createElement('span',null,this.props.intentDescription)));};f.exports=k;},null);
  __d('PagesManagerMessagingThreadIntentContainer.react',['cx','FluxContainer','MercuryIDs','PagesManagerMessagingClassifierStore','PagesManagerMessagingThreadIntentView.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.getStores=function(l){return [c('PagesManagerMessagingClassifierStore')];};k.calculateState=function(l,m){var n=m.thread.snippet_sender;return {intent:c('PagesManagerMessagingClassifierStore').getIntentOnThread(m.pageID,m.userID),isThreadReplied:n?c('MercuryIDs').tokenize(n).value===m.pageID:false,isThreadSeen:m.thread.unread_count===0};};function k(l){j.constructor.call(this,l);}k.prototype.render=function(){if(this.state.isThreadReplied&&this.state.isThreadSeen)return null;return (c('React').createElement(c('PagesManagerMessagingThreadIntentView.react'),{className:"_o2k",intentDescription:this.state.intent,isThreadReplied:this.state.isThreadReplied,isThreadSeen:this.state.isThreadSeen}));};f.exports=c('FluxContainer').create(k,{withProps:true,pure:true});},null);
  __d('PagesManagerMessagingListRow.react',['csx','cx','fbt','ContextualDialogArrow','ContextualLayerAutoFlip','CSS','PagesManagerMessagingFilterStore','Image.react','Layout.react','MercuryPageSeenIndicator.react','MercuryPageThreadTitle.react','MercuryThreadSnippet.react','MercuryThreadTimestamp.react','PagesAdminToolUIActionType','PagesContextCardCustomTag.react','PagesEnumTag.react','PagesManagerLogger','PagesManagerMessagingBatchActionMenu.react','PagesManagerMessagingThreadIntentContainer.react','PagesMessagingActionPlacement','PagesSelectableListRow.react','React','PagesManagerMessagingNavigationUnitKey','XUIBadge.react'],function a(b,c,d,e,f,g,h,i,j){var k,l;if(c.__markCompiled)c.__markCompiled();var m=c('Layout.react').Column,n=c('Layout.react').FillColumn;k=babelHelpers.inherits(o,c('React').Component);l=k&&k.prototype;function o(p){'use strict';l.constructor.call(this,p);this.state={menuShown:false,showFadding:false};}o.prototype.renderSnippetSearchResult=function(){'use strict';var p=this.props.snippetSearchResult.num_total_snippets;if(p===1){return (c('React').createElement('div',{className:"_3f6a"},this.props.snippetSearchResult.snippets[0].body));}else return (c('React').createElement('div',{className:"_3f6a"},j._("Found {number of messages found} Results",[j.param('number of messages found',p)])));};o.prototype.$PagesManagerMessagingListRow1=function(){'use strict';var p=this.props.customTagsData,q=null;if(this.props.isFlagged)q=c('React').createElement(c('PagesEnumTag.react'),{canRemove:false,unit:c('PagesManagerMessagingFilterStore').getFilterByKey(c('PagesManagerMessagingNavigationUnitKey').FILTERS.FLAGGED)});return (c('React').createElement('div',{className:"_1woq",ref:'tagBlock'},c('React').createElement('div',{ref:'tags',className:"_4pbm"},q,p.map(function(r){return (c('React').createElement(c('PagesContextCardCustomTag.react'),{key:r.name,canRemove:false,tagData:r}));})),c('React').createElement('span',{className:"_1wor"})));};o.prototype.$PagesManagerMessagingListRow2=function(){'use strict';return (c('React').createElement('div',null,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(n,{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"},c('React').createElement(c('PagesManagerMessagingThreadIntentContainer.react'),{pageID:this.props.pageID,userID:this.props.thread.other_user_fbid,thread:this.props.thread}),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.$PagesManagerMessagingListRow1()),c('React').createElement(m,{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}))))));};o.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;c('PagesManagerLogger').logMessageInboxUIAction(c('PagesAdminToolUIActionType').MESSAGE_INBOX_CLICK_THREAD_BLOCK,this.props.pageID);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")+(' '+"_1yt-")+(this.props.selectionMode?' '+"_ptw":'')},this.$PagesManagerMessagingListRow2()));};o.defaultProps={disableCheckBox:false,useHighlightTitle:false};f.exports=o;},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(){var l,m;'use strict';for(var n=arguments.length,o=Array(n),p=0;p<n;p++)o[p]=arguments[p];return l=(m=i.constructor).call.apply(m,[this].concat(o)),this.$PagesManagerMessagingListRowContainer1=function(q){c('PagesManagerMessagingThreadInteractionHelper').handleUnreadStateUpdate(q,this.props.pageID,c('PagesManagerMessagingFilterStore').getActiveFilterName());c('PagesManagerMessagingThreadInteractionHelper').handlePermalinkUpdate(q,this.props.pageID);this.props.onViewingListItem(q);}.bind(this),l;}k.prototype.componentWillMount=function(){'use strict';var l=c('MercuryThreads').getForFBID(this.props.pageID).getThreadMetaNow(this.props.listItem);if(l.other_user_fbid){var 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';if(this.state.thread.other_user_fbid===null)return c('React').createElement('div',null);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.defaultProps={useHighlightTitle:false};f.exports=k;},null);
  __d("XPageMessageSettingsPreviewController",["XController"],function a(b,c,d,e,f,g){c.__markCompiled&&c.__markCompiled();f.exports=c("XController").create("\/pages\/messaging\/settings\/preview_dialog\/",{page_id:{type:"FBID",required:true},tab:{type:"Enum",defaultValue:"messenger_code",enumType:1},__asyncDialog:{type:"Int"}});},null);
  __d('PagesManagerMessagingMessengerCodeLink.react',['ix','cx','fbt','AsyncRequest','Image.react','Link.react','MessageSettingsPreviewTab','React','TooltipData','XBasicFBNuxDismissController','XPageMessageSettingsPreviewController','XUIAmbientNUX.react','fbglyph','joinClasses'],function a(b,c,d,e,f,g,h,i,j){var k,l;if(c.__markCompiled)c.__markCompiled();var m=4156,n=4198;k=babelHelpers.inherits(o,c('React').Component);l=k&&k.prototype;function o(p){'use strict';l.constructor.call(this,p);this.state={isMessengerCodeNuxShown:this.props.showMessengerCodeNux,isResponseAssistantNuxShown:this.props.showResponseAssistantNux};}o.prototype.$PagesManagerMessagingMessengerCodeLink1=function(p){'use strict';return function(){var q=c('XBasicFBNuxDismissController').getURIBuilder().setInt('nux_id',p).getURI();new (c('AsyncRequest'))().setURI(q).send();switch(p){case m:this.setState({isMessengerCodeNuxShown:false});break;case n:this.setState({isResponseAssistantNuxShown:false});break;}}.bind(this);};o.prototype.$PagesManagerMessagingMessengerCodeLink2=function(p){'use strict';var q=void 0,r=void 0;switch(p){case m:q=this.state.isMessengerCodeNuxShown;r=j._("Download and share your Messenger Code");break;case n:q=this.state.isResponseAssistantNuxShown;r=j._("Get started with Response Assistant");break;}return (c('React').createElement(c('XUIAmbientNUX.react'),{contextRef:function(){return this.refs.codeLink;}.bind(this),hasActionableContext:true,onCloseButtonClick:this.$PagesManagerMessagingMessengerCodeLink1(p),position:'above',shown:q,width:'auto'},r));};o.prototype.render=function(){'use strict';var p=j._("View Response Assistant and Messenger Code"),q=c('XPageMessageSettingsPreviewController').getURIBuilder().setFBID('page_id',this.props.pageID);if(this.state.isResponseAssistantNuxShown)q=q.setEnum('tab',c('MessageSettingsPreviewTab').RESPONSE_ASSISTANT);var r=c('joinClasses')("_59k4",this.props.className);return (c('React').createElement('div',{className:r},c('React').createElement(c('Link.react'),babelHelpers['extends']({ajaxify:q.getURI(),className:"_4d6o",ref:'codeLink',rel:'dialog'},c('TooltipData').propsFor(p)),c('React').createElement(c('Image.react'),{src:h("\/images\/assets_DO_NOT_HARDCODE\/fb_glyphs\/info-solid_20_fig-light-20.png")})),this.state.isMessengerCodeNuxShown?this.$PagesManagerMessagingMessengerCodeLink2(m):null,this.state.isResponseAssistantNuxShown?this.$PagesManagerMessagingMessengerCodeLink2(n):null));};f.exports=o;},null);
  __d('PagesManagerMessagingSearchInput.react',['cx','fbt','ContextualLayer.react','LayerHideOnEscape','PageCustomTagSearchableEntry','PageCustomTagTypeaheadPresenter.react','React','SearchableTextInput.react','SearchableEntry','TokenizerToken.react','XUICloseButton.react','isEmpty','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=function(){this.setState({showLayer:false});}.bind(this);this.$PagesManagerMessagingSearchInput9=function(p){var q=p.target.value,r=true;if(q===''){r=false;this.props.onClear();}this.setState({query:q,showLayer:r});}.bind(this);this.$PagesManagerMessagingSearchInput10=function(){this.setState({query:''});this.props.onClear();}.bind(this);this.$PagesManagerMessagingSearchInput11=function(p,q){this.setState({matchedLabels:p});}.bind(this);this.$PagesManagerMessagingSearchInput12=function(){if(this.state.query!==''){this.refs.input.getTextFieldDOM().select();this.setState({showLayer:true});}}.bind(this);this.$PagesManagerMessagingSearchInput5=function(p){this.setState({highlightedEntry:p});}.bind(this);this.$PagesManagerMessagingSearchInput6=function(){this.setState({highlightedEntry:{}});}.bind(this);this.$PagesManagerMessagingSearchInput7=function(p){this.props.addCustomTag(p);this.setState({query:''});}.bind(this);this.state={query:'',showLayer:false,matchedLabels:[],highlightedEntry:{}};}m.prototype.$PagesManagerMessagingSearchInput2=function(n,o,event){'use strict';this.setState({showLayer:false});switch(n){case 'message':this.props.searchMessage.call(this,o);break;case 'name':this.props.searchName.call(this,o);break;}};m.prototype.$PagesManagerMessagingSearchInput3=function(n){'use strict';return c('React').createElement('div',{className:"_4j2v"},c('React').createElement('li',{className:"_4j2w",onMouseDown:this.$PagesManagerMessagingSearchInput2.bind(this,'message',this.state.query)},i._("Messages that contain '{message search term}'",[i.param('message search term',this.state.query)])),c('React').createElement('li',{className:"_4j2x",onMouseDown:this.$PagesManagerMessagingSearchInput2.bind(this,'name',this.state.query)},i._("Names that contain '{message search term}'",[i.param('message search term',this.state.query)])));};m.prototype.$PagesManagerMessagingSearchInput4=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.$PagesManagerMessagingSearchInput8=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.render=function(){'use strict';var n=this.props.entries&&this.props.entries.length>0,o=this.props.entries.map(this.$PagesManagerMessagingSearchInput8,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.$PagesManagerMessagingSearchInput9,onFocus:this.$PagesManagerMessagingSearchInput12,onEntriesFound:this.$PagesManagerMessagingSearchInput11,placeholder:w,queryString:this.state.query,ref:'input'},x)),c('React').createElement(c('XUICloseButton.react'),{className:"_3i2o"+(c('isEmpty')(this.state.query)?' '+"hidden_elem":''),onClick:this.$PagesManagerMessagingSearchInput10,size:'medium'}),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.$PagesManagerMessagingSearchInput3(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','PagesAdminToolUIActionType','PagesContextCardCustomTag.react','PagesEnumTag.react','PagesManagerLogger','PagesManagerMessagingFilterActions','PagesManagerMessagingSearchInput.react','React','PagesMessagingSearchMode','PagesManagerMessagingThreadlistAction','PagesManagerMessagingNavigationUnitKey','XUICloseButton.react','emptyFunction'],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.$PagesManagerMessagingSearchView5=function(p){var q=p.target.value,r=true;if(q==='')r=false;this.setState({query:q,showLayer:r});}.bind(this);this.$PagesManagerMessagingSearchView4=function(p){c('PagesManagerMessagingThreadlistAction').removeSearchCustomTag(this.props.pageID,p,'search_block');}.bind(this);this.$PagesManagerMessagingSearchView9=function(){c('PagesManagerMessagingFilterActions').changeFilter(this.props.pageID,c('PagesManagerMessagingFilterStore').getAvailableFilters().get(0));}.bind(this);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.$PagesManagerMessagingSearchView7=function(p){c('PagesManagerLogger').logMessageInboxUIAction(c('PagesAdminToolUIActionType').MESSAGE_INBOX_CLICK_SEARCH_NAMES,this.props.pageID,{query:p});c('PagesManagerMessagingThreadlistAction').changeSearchTerm(this.props.pageID,p,c('PagesManagerMessagingFilterStore').getActiveFolderName(),c('PagesMessagingSearchMode').NAME_SEARCH);this.setState({showLayer:false});}.bind(this);this.$PagesManagerMessagingSearchView8=function(p){c('PagesManagerLogger').logMessageInboxUIAction(c('PagesAdminToolUIActionType').MESSAGE_INBOX_CLICK_SEARCH_MESSAGES,this.props.pageID,{query:p});c('PagesManagerMessagingThreadlistAction').changeSearchTerm(this.props.pageID,p,c('PagesManagerMessagingFilterStore').getActiveFolderName(),c('PagesMessagingSearchMode').MESSAGE_SEARCH);this.setState({showLayer:false});}.bind(this);this.$PagesManagerMessagingSearchView6=function(p){if(this.state.query!=='')this.setState({showLayer:true});}.bind(this);this.state={query:'',showLayer:false,highlightedEntry:{}};}m.prototype.$PagesManagerMessagingSearchView10=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.$PagesManagerMessagingSearchView11=function(){var n=i._("Search people and messages");return (c('React').createElement(c('PagesManagerMessagingSearchInput.react'),{addCustomTag:c('emptyFunction'),className:"_5ptj",contextRef:function(){return this.refs.input;}.bind(this),onClick:this.$PagesManagerMessagingSearchView6,onClear:this.$PagesManagerMessagingSearchView2,onRemove:c('emptyFunction'),placeholder:n,searchMessage:this.$PagesManagerMessagingSearchView8,searchName:this.$PagesManagerMessagingSearchView7,entries:[],excludedEntries:[],TokenRendere:c('PageCustomTagTypeaheadPresenter.react').ViewRenderer,searchSource:c('PageCustomTagSearchSource').getInstance([],false)}));};m.prototype.$PagesManagerMessagingSearchView12=function(){if(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.$PagesManagerMessagingSearchView9,unit:this.props.activeFilter}):null,this.$PagesManagerMessagingSearchView10().map(function(n){return (c('React').createElement(c('PagesContextCardCustomTag.react'),{canRemove:true,hideOnRemove:true,key:n.id,onRemove:this.$PagesManagerMessagingSearchView4,tagData:n}));}.bind(this))));};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.currentSearchCustomTagNames.toArray().length>0||c('PagesManagerMessagingFilterStore').getActiveFilterName()===c('PagesManagerMessagingNavigationUnitKey').FILTERS.FLAGGED||this.props.isSearchActive?' '+"hidden_elem":''),style:n}),c('React').createElement('div',{className:"_3i2n"+(' '+"_4m_d")+(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.$PagesManagerMessagingSearchView11()),this.$PagesManagerMessagingSearchView12()));};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(!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(){return (c('React').createElement(c('PagesManagerMessagingSearchView.react'),babelHelpers['extends']({},this.props,{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})));};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','ix','PagesManagerMessagingBatchActionHeaderContainer.react','ContextualDialogArrow','ContextualLayerAutoFlip','FluxContainer','Image.react','immutable','LeftRight.react','PagesManagerListBatchActionContainer.react','MercuryThreadlistConstants','MessageThreadViewSource','PagesAdminToolUIActionType','PagesEventObserver','PagesEventType','PagesManagerAction','PagesManagerAwayContainer.react','PagesManagerAwayToggle.react','PagesManagerListView.react','PagesManagerLogger','PagesManagerMessagingFilterActions','PagesManagerMessagingFilterStore','PagesManagerMessagingFilterPanelSwitch.react','PagesManagerMessagingList.react','PagesManagerMessagingListRowContainer.react','PagesManagerMessagingLogger','PagesManagerMessagingMessengerCodeLink.react','PagesManagerMessagingNUXActions','PagesManagerMessagingPriorityStore','PagesManagerMessagingSearchContainer.react','PagesManagerMessagingSearchListResult.react','PagesMessagingSearchMode','PagesManagerMessagingSearchStore','PagesManagerMessagingSeparateSearchResultView.react','PagesManagerMessagingTabPerfEvents','PagesManagerMessagingThreadInteractionHelper','PagesManagerMessagingThreadlistAction','PagesManagerMessagingThreadlistStore','PagesManagerMessagingUIActions','PagesManagerMessagingUIStore','PagesManagerPerfLogger','PagesManagerStore','PopoverMenu.react','React','ReactDOM','SubscriptionsHandler','MercuryThreadInformer','PagesManagerMessagingNavigationUnitKey','Vector','XUICard.react','ReactXUIMenu','debounce','emptyFunction'],function a(b,c,d,e,f,g,h,i,j){var k,l;if(c.__markCompiled)c.__markCompiled();var m=50,n=c('ReactXUIMenu').Item;k=babelHelpers.inherits(o,c('React').Component);l=k&&k.prototype;function o(p){'use strict';l.constructor.call(this,p);this.$PagesManagerMessagingListContainer10=function(){c('PagesManagerMessagingThreadlistAction').loadMoreNameResult(this.props.pageID,this.state.searchTerm,c('PagesManagerMessagingFilterStore').getActiveFolderName());}.bind(this);this.$PagesManagerMessagingListContainer11=function(){c('PagesManagerMessagingThreadlistAction').loadMoreSnippetResult(this.props.pageID,this.state.searchTerm,c('PagesManagerMessagingFilterStore').getActiveFolderName());}.bind(this);this.$PagesManagerMessagingListContainer12=function(q,r){switch(q){case c('PagesMessagingSearchMode').NAME_SEARCH:c('PagesManagerMessagingThreadlistAction').loadMoreNameResult(this.props.pageID,r,c('PagesManagerMessagingFilterStore').getActiveFolderName());break;case c('PagesMessagingSearchMode').MESSAGE_SEARCH:c('PagesManagerMessagingThreadlistAction').loadMoreSnippetResult(this.props.pageID,r,c('PagesManagerMessagingFilterStore').getActiveFolderName());break;}}.bind(this);this.$PagesManagerMessagingListContainer13=function(){var q=c('PagesManagerMessagingFilterStore').getNavigationKey(),r=!this.state.isInPriorityMode&&c('PagesManagerMessagingThreadlistStore').hasMoreItem(q)&&!c('PagesManagerMessagingThreadlistStore').isLoading(),s=this.state.isInPriorityMode&&c('PagesManagerMessagingPriorityStore').hasMoreNonPriorityItem()&&!c('PagesManagerMessagingPriorityStore').isLoading();if((r||s)&&!this.state.isInSearchMode){var t=this.state.isInPriorityMode?this.state.threadIDList.length+this.state.priorityThreadIDList.length:this.state.threadIDList.length;c('PagesManagerMessagingThreadlistAction').fetchThreadlist(this.props.pageID,t,c('MercuryThreadlistConstants').WEBMESSENGER_MORE_COUNT);}}.bind(this);this.$PagesManagerMessagingListContainer14=function(){if(this.refs.listView.refs.selectableList.refs.scrollableArea.getArea().isScrolledToTop()){c('PagesManagerMessagingUIActions').setSearchBarShaddow(false);}else if(!c('PagesManagerMessagingUIStore').getSearchBarShadow())c('PagesManagerMessagingUIActions').setSearchBarShaddow(true);}.bind(this);this.$PagesManagerMessagingListContainer17=function(q,r){var s=this.state.folderDropdown.filter(function(u){return u.getKey()===r.item.getValue();});if(s.count()==0)return;var t=s.get(0);c('PagesManagerLogger').logMessageInboxUIAction(c('PagesAdminToolUIActionType').MESSAGE_INBOX_SWITCH_FOLDER,this.props.pageID,{folder:t.getKey(),position:'dropdown'});c('PagesManagerMessagingFilterActions').changeFilter(this.props.pageID,t);}.bind(this);this.$PagesManagerMessagingListContainer1=false;this.$PagesManagerMessagingListContainer2=function(){this.refs.listView.clearSelection();}.bind(this);}o.getStores=function(){'use strict';return [c('PagesManagerMessagingThreadlistStore'),c('PagesManagerMessagingPriorityStore'),c('PagesManagerMessagingFilterStore'),c('PagesManagerMessagingSearchStore'),c('PagesManagerMessagingUIStore')];};o.calculateSearchState=function(p,q){'use strict';var r=c('PagesManagerMessagingSearchStore').getThreadNameSearchResults(),s=c('PagesManagerMessagingSearchStore').getIsSearchingName(),t=c('PagesManagerMessagingSearchStore').hasMoreNameSearchResult(),u=c('PagesManagerMessagingSearchStore').hasMoreSnippetSearchResult(),v=c('PagesManagerMessagingSearchStore').getThreadSnippetSearchResults(),w=c('PagesManagerMessagingSearchStore').getIsSearchingSnippet(),x=[],y={},z=false,aa=false;switch(c('PagesManagerMessagingSearchStore').getSearchMode()){case c('PagesMessagingSearchMode').MESSAGE_SEARCH:y=v;z=u;aa=w;break;case c('PagesMessagingSearchMode').NAME_SEARCH:x=r;z=t;aa=s;break;}return {hasMoreResult:z,isInSearchMode:true,isSearching:aa,searchTerm:c('PagesManagerMessagingSearchStore').getCurrentSearchTerm(),searchMode:c('PagesManagerMessagingSearchStore').getSearchMode(),searchResult:x,snippetSearchResult:y};};o.calsulateListState=function(p,q){'use strict';var r=q.config.enablePriorityInbox&&c('PagesManagerMessagingFilterStore').getIsInboxAll(),s=r?c('PagesManagerMessagingPriorityStore').getNonPriorityItemList(q.pageID):c('PagesManagerMessagingThreadlistStore').getItemList(q.pageID),t=r?c('PagesManagerMessagingPriorityStore').getPriorityItemList(q.pageID):null,u=r?c('PagesManagerMessagingPriorityStore').hasMoreNonPriorityItem():c('PagesManagerMessagingThreadlistStore').hasMoreItem(c('PagesManagerMessagingFilterStore').getNavigationKey()),v=s.findIndex(function(ea){return ea===c('PagesManagerStore').getViewingListItem();})>=0,w=c('PagesManagerStore').getInitialViewingItem(),x=c('PagesManagerStore').getViewingListItem(),y=s.length>0,z=w&&w===x,aa=!z&&(!x&&y||x&&y&&!v);if(aa){var ba=s[0];c('PagesManagerAction').viewListItem(ba);c('PagesManagerMessagingThreadInteractionHelper').handlePermalinkUpdate(ba,q.pageID);}var ca=r?c('PagesManagerMessagingPriorityStore').isLoading():c('PagesManagerMessagingThreadlistStore').isLoading(),da=false;if(s.length===0)da=ca;if(!p||p.isInPriorityMode!==r)c('PagesManagerMessagingThreadlistAction').switchPriorityView(r);return {hasMoreItem:u,hasMoreResult:u,initLoading:da,isInPriorityMode:r,isInSearchMode:false,threadIDList:s,priorityThreadIDList:t};};o.calculateState=function(p,q){'use strict';var r=null;if(c('PagesManagerMessagingSearchStore').getIsInSearchMode()&&c('PagesManagerMessagingSearchStore').getCurrentSearchTerm().length>0){r=o.calculateSearchState(p,q);}else r=o.calsulateListState(p,q);if(p&&p.initLoading&&!r.initLoading)c('PagesManagerMessagingNUXActions').setThreadlistReady();r.isFiltering=c('PagesManagerMessagingFilterStore').getIsFiltering();r.folderDropdown=c('PagesManagerMessagingFilterStore').getFolderDropDown();r.unitNotificationCountMap=c('PagesManagerMessagingFilterStore').getUnitNotificationCountMap(q.pageID);r.showShadow=c('PagesManagerMessagingUIStore').getSearchBarShadow();r.currentSearchCustomTagNames=c('PagesManagerMessagingSearchStore').getCurrentSearchCustomTagNames();r.activeFilter=c('PagesManagerMessagingFilterStore').getActiveFilter();return r;};o.prototype.$PagesManagerMessagingListContainer3=function(){'use strict';return this.state.currentSearchCustomTagNames.size!==0||this.state.activeFilter.getKey()===c('PagesManagerMessagingNavigationUnitKey').FILTERS.FLAGGED;};o.prototype.componentDidUpdate=function(p,q){'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()});}if(this.state.isFiltering!==q.isFiltering||this.state.activeFilter!==q.activeFilter||this.state.currentSearchCustomTagNames.size===0&&q.currentSearchCustomTagNames.size!==0)this.$PagesManagerMessagingListContainer4();};o.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.$PagesManagerMessagingListContainer5=c('MercuryThreadInformer').getForFBID(this.props.pageID);this.$PagesManagerMessagingListContainer6=new (c('SubscriptionsHandler'))();this.$PagesManagerMessagingListContainer6.addSubscriptions(this.$PagesManagerMessagingListContainer5.subscribe('threadlist-updated',function(p,q){return this.$PagesManagerMessagingListContainer7();}.bind(this)),this.$PagesManagerMessagingListContainer5.subscribe('threads-updated',function(p,q){return this.$PagesManagerMessagingListContainer8(Object.keys(q));}.bind(this)));this.$PagesManagerMessagingListContainer4();};o.prototype.componentWillUnmount=function(){'use strict';this.$PagesManagerMessagingListContainer6&&this.$PagesManagerMessagingListContainer6.release();};o.prototype.$PagesManagerMessagingListContainer9=function(p){'use strict';return p;};o.prototype.$PagesManagerMessagingListContainer7=function(){'use strict';c('PagesManagerMessagingThreadlistAction').updateThreadlist(this.props.pageID);};o.prototype.$PagesManagerMessagingListContainer8=function(p){'use strict';p.forEach(function(q){if(this.refs.searchResult){var r=this.refs.searchResult.refs[q];if(r)r.refs.childClass.updateThread();}else if(this.refs.listView){var s=this.refs.listView.refs[q];if(s)s.refs.childClass.updateThread();}}.bind(this));};o.prototype.$PagesManagerMessagingListContainer4=function(){'use strict';if(this.refs.fileMenu&&this.refs.unreadCount){var p=0;if(this.state.isFiltering){var q=c('Vector').getElementDimensions(c('ReactDOM').findDOMNode(this.refs.filterSwitch)).x,r=c('ReactDOM').findDOMNode(this.refs.filterSwitch).offsetLeft;p=r+q-4;}else{var s=c('Vector').getElementDimensions(c('ReactDOM').findDOMNode(this.refs.fileMenu)).x,t=c('Vector').getElementDimensions(c('ReactDOM').findDOMNode(this.refs.unreadCount)).x,u=c('ReactDOM').findDOMNode(this.refs.fileMenu).offsetLeft;p=u+(s-t)/2;}c('PagesManagerMessagingUIActions').setSearchBarArrowTopX(p);}};o.prototype.$PagesManagerMessagingListContainer15=function(){'use strict';var p=c('React').createElement(c('PagesManagerMessagingFilterPanelSwitch.react'),{pageID:this.props.pageID,ref:'filterSwitch',height:this.$PagesManagerMessagingListContainer16(),isFiltering:c('PagesManagerMessagingFilterStore').getIsFiltering(),enableManageTags:this.props.config.enableManageTags,showNUX:this.props.config.showFilterNUX});return c('React').createElement('div',null,c('React').createElement(c('PagesManagerListBatchActionContainer.react'),{ChildClass:c('PagesManagerMessagingBatchActionHeaderContainer.react'),pageID:this.props.pageID,onSelectionClear:this.$PagesManagerMessagingListContainer2}),p);};o.prototype.$PagesManagerMessagingListContainer18=function(p){'use strict';return (c('React').createElement(n,{key:p.getKey(),value:p.getKey()},c('React').createElement('div',{className:"_-7b"},p.getDisplayTitle())));};o.prototype.$PagesManagerMessagingListContainer19=function(){'use strict';var p=c('React').createElement(c('ReactXUIMenu'),{onItemClick:this.$PagesManagerMessagingListContainer17},this.state.folderDropdown.map(this.$PagesManagerMessagingListContainer18)),q=c('PagesManagerMessagingFilterStore').getActiveFolderDropDown(),r=this.state.unitNotificationCountMap.get(q);return (c('React').createElement(c('PopoverMenu.react'),{layerBehaviors:[c('ContextualDialogArrow'),c('ContextualLayerAutoFlip')],menu:p},c('React').createElement('div',{className:"_-7c _46l"},c('React').createElement('span',{ref:'fileMenu'},q.getDisplayTitle()),c('React').createElement('div',{className:"_-7h"+(' '+"_-7e")+(r===0?' '+"hidden_elem":''),ref:'unreadCount'},r))));};o.prototype.$PagesManagerMessagingListContainer20=function(){'use strict';return '';};o.prototype.$PagesManagerMessagingListContainer16=function(){'use strict';var p=c('ReactDOM').findDOMNode(this.refs.threadListHeader),q=c('ReactDOM').findDOMNode(this.refs.threadListFooter),r=0;if(q!==null)r=c('Vector').getElementDimensions(q).y;return this.props.height-r;};o.prototype.$PagesManagerMessagingListContainer21=function(){'use strict';return (c('React').createElement(c('XUICard.react'),{className:"_alj",ref:'threadListFooter'},c('React').createElement(c('LeftRight.react'),null,c('React').createElement(c('PagesManagerAwayContainer.react'),{pageID:this.props.pageID,RenderClass:c('PagesManagerAwayToggle.react')}),c('React').createElement(c('PagesManagerMessagingMessengerCodeLink.react'),{className:"_h38",pageID:this.props.pageID,showMessengerCodeNux:this.props.config.shouldShowMessengerCodeNUX,showResponseAssistantNux:this.props.config.shouldShowResponseAssistantNUX}))));};o.prototype.$PagesManagerMessagingListContainer22=function(){'use strict';return (c('React').createElement('div',{className:(this.state.isFiltering?"_4f_9":'')+(' '+"_alk")+(this.state.showShadow?' '+"_1axm":''),ref:'threadListHeader'},c('React').createElement(c('PagesManagerMessagingSearchContainer.react'),{arrowTopPositionY:this.state.arrowTopPositionY,pageID:this.props.pageID})));};o.prototype.$PagesManagerMessagingListContainer23=function(){'use strict';if(this.$PagesManagerMessagingListContainer3())return (c('React').createElement('div',{className:"_3-8-",key:'emptyView'},c('React').createElement(c('Image.react'),{className:"_5gxr",src:j('/images/pages/pages_manager/messages/gray_label.png')}),c('React').createElement('div',{className:"_5gxs"},i._("No conversations match the labels you selected"))));return c('React').createElement('div',{key:'emptyView'});};o.prototype.$PagesManagerMessagingListContainer24=function(){'use strict';return (c('React').createElement(c('PagesManagerMessagingList.react'),babelHelpers['extends']({},this.props,{actionBarRightContainer:this.$PagesManagerMessagingListContainer15(),folderDropDown:this.$PagesManagerMessagingListContainer19(),containerProps:{config:this.props.config},emptyView:this.$PagesManagerMessagingListContainer23(),getKey:this.$PagesManagerMessagingListContainer9,handleScroll:this.$PagesManagerMessagingListContainer14,hasMoreResult:this.state.hasMoreResult,header:this.$PagesManagerMessagingListContainer22(),height:this.$PagesManagerMessagingListContainer16(),initLoading:this.state.initLoading,isFiltering:this.state.isFiltering,isInPriorityMode:this.state.isInPriorityMode,isInSearchMode:this.state.isInSearchMode,isSearching:this.state.isSearching,isFilteringByTag:this.$PagesManagerMessagingListContainer3(),list:this.state.threadIDList,listRowContainer:c('PagesManagerMessagingListRowContainer.react'),loadMore:this.$PagesManagerMessagingListContainer12,navigationKey:c('PagesManagerMessagingFilterStore').getNavigationKey(),onScroll:this.$PagesManagerMessagingListContainer13,onSelectionChange:this.props.onSelectionChange,priorityList:this.state.priorityThreadIDList,ref:'listView',scrollableWidth:320,selectAllLabel:this.$PagesManagerMessagingListContainer20(),searchTerm:this.state.searchTerm,searchMode:this.state.searchMode,searchResult:this.state.searchResult,snippetSearchResult:this.state.snippetSearchResult})));};o.prototype.render=function(){'use strict';return (c('React').createElement('div',null,this.$PagesManagerMessagingListContainer24(),this.$PagesManagerMessagingListContainer21()));};f.exports=c('FluxContainer').create(o,{withProps:true});},null);
  __d('PagesManagerMessagingApp.react',['cx','PagesManagerAction','LeftRight.react','MercuryPagesChannelHandlerDEPRECATED','MercuryServerPayloadPreprocessor','MercurySyncPageEnvironment','PagesEventObserver','PagesEventType','PagesManagerAwayBanner.react','PagesManagerAwayContainer.react','PagesManagerDetailContainer.react','PagesManagerListContainer.react','PagesManagerListDetailLayout.react','PagesManagerMessagingClassifierActions','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('MercuryPagesChannelHandlerDEPRECATED').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)});c('PagesManagerMessagingClassifierActions').initializeStore(this.props.config,this.props.pageID);};k.prototype.componentWillUnmount=function(){'use strict';c('MercuryPagesChannelHandlerDEPRECATED').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';return c('React').createElement('div',{className:"_n4_"});};k.prototype.$PagesManagerMessagingApp5=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.$PagesManagerMessagingApp6=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.$PagesManagerMessagingApp7=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.$PagesManagerMessagingApp6(),listClassName:"_1-9p",listSection:this.$PagesManagerMessagingApp5(),navigationSection:this.$PagesManagerMessagingApp4()}))));};f.exports=k;},null);