/*!CK:2024100507!*//*1459375689,*/

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

__d("MercuryActionStatus",[],function a(b,c,d,e,f,g){c.__markCompiled&&c.__markCompiled();f.exports={UNSENT:0,SUCCESS:1,UNCONFIRMED:3,FAILED_UNKNOWN_REASON:4,UNABLE_TO_CONFIRM:5,RESENT:6,RESENDING:7,ERROR:10};},null);
__d("MercuryActionType",[],function a(b,c,d,e,f,g){c.__markCompiled&&c.__markCompiled();f.exports={LOG_MESSAGE:"ma-type:log-message",USER_GENERATED_MESSAGE:"ma-type:user-generated-message",ADD_GROUP_ADMINS:"ma-type:add_group_admins",REMOVE_GROUP_ADMINS:"ma-type:remove_group_admins",CHANGE_READ_STATUS:"ma-type:change_read_status",MARK_THREAD_SEEN:"ma-type:mark_thread_seen",CHANGE_MUTE_SETTINGS:"ma-type:change-mute-settings",SEND_MESSAGE:"ma-type:send-message",DELETE_MESSAGES:"ma-type:delete-messages",DELETE_THREAD:"ma-type:delete-thread",UPDATE_SNIPPET:"ma-type:update-snippet",CHANGE_ARCHIVED_STATUS:"ma-type:change-archived-status",CHANGE_FOLDER:"ma-type:change-folder",ADD_PARTICIPANTS:"ma-type:add-participants",CANCEL_ATTACHMENT_PLACEHOLDER:"ma-type:cancel-attachment-placeholder",CONFIRM_ATTACHMENT_PLACEHOLDER:"ma-type:confirm-attachment-placeholder",UNPIN_THREAD:"ma-type:unpin-thread",CHANGE_FLAG:"ma-type:change_flag",MOVE_PENDING_TO_INBOX:"ma-type:move_pending_to_inbox",UPDATE_BLOCKER_STATUS:"ma-type:update-blocker-status",UPDATE_BLOCKEE_STATUS:"ma-type:update-blockee-status",CREATE_PAGE_ADMIN_NOTE:"ma-type:create-page-admin-note",REPLACE_MESSAGE:"ma-type:replace-message",UPDATE_CUSTOM_LIKE:"ma-type:update_custom_like",UNWRAP_MESSAGE:"ma-type:unwrap-message"};},null);
__d("MercuryAPIArgsSource",[],function a(b,c,d,e,f,g){c.__markCompiled&&c.__markCompiled();f.exports={CHAT:"chat",JEWEL:"jewel",MERCURY:"mercury",MERCURYSYNC:"mercury_sync",WEBMESSENGER:"web_messenger",MESSENGER:"messenger"};},null);
__d("MercuryAttachmentContentType",[],function a(b,c,d,e,f,g){c.__markCompiled&&c.__markCompiled();f.exports={PHOTO:"attach:image",VIDEO:"attach:video",MUSIC:"attach:music",VOICE:"attach:voice",TEXT:"attach:text",MSWORD:"attach:ms:word",MSXLS:"attach:ms:xls",MSPPT:"attach:ms:ppt",ORION:"attach:orion",SHOERACK_INVITATION:"attach:shoerackinvite",UNKNOWN:"attach:unknown"};},null);
__d("MercuryAttachmentType",[],function a(b,c,d,e,f,g){c.__markCompiled&&c.__markCompiled();f.exports={ERROR:"error",FILE:"file",PHOTO:"photo",STICKER:"sticker",SHARE:"share",UNKNOWN:"unknown",VIDEO:"video",ANIMATED_IMAGE:"animated_image",EMOJI_LIKE:"emoji_like",GIFT:"gift",THIRDPARTYSTICKER:"third_party_sticker"};},null);
__d("MercuryAudioType",[],function a(b,c,d,e,f,g){c.__markCompiled&&c.__markCompiled();f.exports={AudioClip:"fb_voice_message",VoiceMessageWithTranscript:"fb_voice_message_with_transcript"};},null);
__d("MercuryErrorType",[],function a(b,c,d,e,f,g){c.__markCompiled&&c.__markCompiled();f.exports={SERVER:1,TRANSPORT:2,TIMEOUT:3};},null);
__d("MercuryGlobalActionType",[],function a(b,c,d,e,f,g){c.__markCompiled&&c.__markCompiled();f.exports={MARK_ALL_READ:"mga-type:mark-all-read"};},null);
__d("MercuryLogMessageType",[],function a(b,c,d,e,f,g){c.__markCompiled&&c.__markCompiled();f.exports={SUBSCRIBE:"log:subscribe",UNSUBSCRIBE:"log:unsubscribe",VIDEO_CALL:"log:video-call",PHONE_CALL:"log:phone-call",THREAD_NAME:"log:thread-name",THREAD_IMAGE:"log:thread-image",SERVER_ERROR:"log:error-msg",LIVE_LISTEN:"log:live-listen",WALLPAPER:"log:wallpaper",ORION:"log:orion",SWITCH_TO_WORK:"log:switch",PAGE_REPLY:"log:page-reply",GENERIC_ADMIN_TEXT:"log:generic-admin-text"};},null);
__d("MercuryPayloadSource",[],function a(b,c,d,e,f,g){c.__markCompiled&&c.__markCompiled();f.exports={UNKNOWN:"unknown",CLIENT_CHANNEL_MESSAGE:"client_channel_message",CLIENT_SEND_MESSAGE:"client_send_message",CLIENT_CHANGE_ARCHIVED_STATUS:"client_change-archived_status",CLIENT_CHANGE_FOLDER:"client_change_folder",CLIENT_CHANGE_MUTE_SETTINGS:"client_change_mute_settings",CLIENT_CHANGE_READ_STATUS:"client_change_read_status",CLIENT_CHANGE_CUSTOM_LIKE:"client_change_custom_like",CLIENT_MARK_THREAD_SEEN:"client_mark_thread_seen",CLIENT_ADD_PARTICIPANTS:"client_add_participants",CLIENT_FETCH_PARTICIPANTS:"client_fetch_participants",CLIENT_DELETE_MESSAGES:"client_delete_messages",CLIENT_DELETE_THREAD:"client_delete_thread",CLIENT_UPDATE_SNIPPET:"client_update_snippet",CLIENT_HANDLE_ERROR:"client_handle_error",CLIENT_UNPIN_THREAD:"client_unpin_thread",CLIENT_CHANGE_FLAG:"client_change_flag",CLIENT_MOVE_PENDING_TO_INBOX:"client_move_pending_to_inbox",CLIENT_CREATE_PAGE_ADMIN_NOTE:"client_create_page_admin_note",CLIENT_UNWRAP_MESSAGE:"client_unwrap_message",SERVER_INITIAL_DATA:"server_initial_data",SERVER_SEND_MESSAGE:"server_send_message",SERVER_CHANGE_ARCHIVED_STATUS:"server_change_archived_status",SERVER_CHANGE_READ_STATUS:"server_change_read_status",SERVER_MARK_FOLDER_READ:"server_mark_folder_read",SERVER_MARK_SEEN:"server_mark_seen",SERVER_FETCH_PARTICIPANTS:"server_fetch_participants",SERVER_FETCH_THREAD_INFO:"server_fetch_thread_info",SERVER_FETCH_THREADLIST_INFO:"server_fetch_threadlist_info",SERVER_STANDALONE_NOTIFICATIONS:"server_standalone_notifications",SERVER_THREAD_SYNC:"server_thread_sync",SERVER_TAB_PRESENCE:"server_tab_presence",SERVER_UNREAD_THREADS:"server_unread_threads",SERVER_SEARCH:"server_search",SERVER_CHANGE_FLAG:"server_change_flag",SERVER_INVALIDATE_THREAD_STATE:"server_invalidate_thread_state",SERVER_INVALIDATE_GLOBAL_STATE:"server_invalidate_global_state"};},null);
__d("MercurySourceType",[],function a(b,c,d,e,f,g){c.__markCompiled&&c.__markCompiled();f.exports={CHAT_ORCA:"source:chat:orca",CHAT_IPHONE:"source:chat:iphone",CHAT_JABBER:"source:chat:jabber",CHAT_MEEBO:"source:chat:meebo",CHAT_WEB:"source:chat:web",CHAT_TEST:"source:chat:test",CHAT_FORWARD_DIALOG:"source:chat:forward",CHAT:"source:chat",EMAIL:"source:email",EVENT_MESSAGE_BLAST:"source:event_message_blast",GIGABOXX_API:"source:gigaboxx:api",GIGABOXX_BLAST:"source:gigaboxx:blast",GIGABOXX_EMAIL_REPLY:"source:gigaboxx:emailreply",GIGABOXX_MOBILE:"source:gigaboxx:mobile",GIGABOXX_WAP:"source:gigaboxx:wap",GIGABOXX_WEB:"source:gigaboxx:web",LEIA:"source:leia",MESSENGER_WEB:"source:messenger:web",SAM_UFI:"source:sam:ufi",SHARE_DIALOG:"source:share:dialog",SEND_PLUGIN:"source:sendplugin",SMS:"source:sms",TEST:"source:test",TITAN_WAP:"source:titan:wap",TITAN_M_BASIC:"source:titan:m_basic",TITAN_M_FREE:"source:titan:m_free_basic",TITAN_M_JAPAN:"source:titan:m_japan",TITAN_M_MINI:"source:titan:m_mini",TITAN_M_TOUCH:"source:titan:m_touch",TITAN_M_APP:"source:titan:m_app",TITAN_M_TABLET:"source:titan:m_tablet",TITAN_M_ZERO:"source:titan:m_zero",TITAN_M_TALK:"source:titan:m_talk",TITAN_WEB:"source:titan:web",TITAN_FACEWEB_ANDROID:"source:titan:faceweb_android",TITAN_FACEWEB_BUFFY:"source:titan:faceweb_buffy",TITAN_FACEWEB_IPAD:"source:titan:faceweb_ipad",TITAN_FACEWEB_IPHONE:"source:titan:faceweb_iphone",TITAN_FACEWEB_UNKNOWN:"source:titan:faceweb_unknown",TITAN_API:"source:titan:api",TITAN_API_MOBILE:"source:titan:api_mobile",TITAN_ORCA:"source:titan:orca",TITAN_EMAIL_REPLY:"source:titan:emailreply",MOBILE:"source:mobile",PAGE_PLATFORM_API:"source:page_platform_api",UNKNOWN:"source:unknown",WEB:"source:web",HELPCENTER:"source:helpcenter",NEW_SHARE_DIALOG:"source:share:dialog:new",PAID_PROMOTION:"source:paid_promotion",BUFFY_SMS:"source:buffy:sms",WEBRTC_MOBILE:"source:webrtc:mobile",MESSENGER_COMMERCE:"source:messenger:commerce",MESSENGER_BOT:"source:bot",PAGES_PRIVATE_REPLY:"source:pages:private_reply",MESSENGER_FORWARD_DIALOG:"source:messenger:forward",MESSENGER_AD:"source:messenger:ad",MARKETPLACE:"source:marketplace",MESSENGER_LEAD_GEN:"source:messenger:lead_gen",PAGES_MESSAGE_SHORTLINK:"source:pages:message_shortlink",STICKER_SUBSCRIBE:"source:messenger:sticker_subscribe",PHOTO_TAG:"source:messenger:photo_tag"};},null);
__d("MessagingGenericAdminTextType",[],function a(b,c,d,e,f,g){c.__markCompiled&&c.__markCompiled();f.exports={CONFIRM_FRIEND_REQUEST:"confirm_friend_request",ACCEPT_PENDING_THREAD:"accept_pending_thread",RAMP_UP_WELCOME_MESSAGE:"ramp_up_welcome_message",CHANGE_THREAD_THEME:"change_thread_theme",CHANGE_THREAD_ICON:"change_thread_icon",GROUP_THREAD_CREATED:"group_thread_created",THREAD_EPHEMERAL_SEND_MODE:"thread_ephemeral_send_mode",INVITE_ACCEPTED:"invite_accepted",MESSENGER_INVITE_SENT:"messenger_invite_sent",TURN_ON_PUSH:"turn_on_push",JOURNEY_PROMPT_COLOR:"journey_prompt_color",JOURNEY_PROMPT_LIKE:"journey_prompt_like",JOURNEY_PROMPT_NICKNAME:"journey_prompt_nickname",JOURNEY_PROMPT_SETUP:"journey_prompt_setup",CHANGE_THREAD_NICKNAME:"change_thread_nickname",BOT_THREAD_SUBSCRIPTION:"bot_thread_subscription",RTC_CALL_LOG:"rtc_call_log",JOURNEY_PROMPT_BOT:"journey_prompt_bot",RIDE_ORDERED_MESSAGE:"ride_ordered_message",JOURNEY_PROMPT_NEW_SETUP:"journey_prompt_new_setup",LIGHTWEIGHT_EVENT_CREATE:"lightweight_event_create",LIGHTWEIGHT_EVENT_DELETE:"lightweight_event_delete",LIGHTWEIGHT_EVENT_NOTIFY:"lightweight_event_notify",LIGHTWEIGHT_EVENT_NOTIFY_BEFORE_EVENT:"lightweight_event_notify_before_event",LIGHTWEIGHT_EVENT_UPDATE:"lightweight_event_update",AD_MANAGE_MESSAGE:"ad_manage_message",TAGGED_PHOTO:"tagged_photo",GAME_SCORE:"game_score",M_AI_SURVEY:"m_ai_survey"};},null);
__d("MessagingTag",[],function a(b,c,d,e,f,g){c.__markCompiled&&c.__markCompiled();f.exports={GROUPS:"groups",UNREAD:"unread",FLAGGED:"flagged",ACTION_ARCHIVED:"action:archived",INBOX:"inbox",OTHER:"other",PENDING:"pending",MONTAGE:"montage",EVENT:"event",SENT:"sent",SPAM:"spam",UPDATES:"broadcasts_inbox",BCC:"header:bcc",FILTERED_CONTENT:"filtered_content",FILTERED_CONTENT_BH:"filtered_content_bh",FILTERED_CONTENT_ACCOUNT:"filtered_content_account",FILTERED_CONTENT_QUASAR:"filtered_content_quasar",FILTERED_CONTENT_INVALID_APP:"filtered_content_invalid_app",UNAVAILABLE_ATTACHMENT:"unavailable_attachment",ARCHIVED:"archived",EMAIL:"email",VOICEMAIL:"voicemail",SPAM_SPOOFING:"spam:spoofing",SPOOF_WARNING:"MTA:spoof_warning",SMS_TAG_ROOT:"SMSShortcode:",APP_ID_ROOT:"app_id:",DOMAIN_AUTH_PASS:"MTA:dmarc:pass",DOMAIN_AUTH_FAIL:"MTA:dmarc:fail",MTA_SYSTEM_MESSAGE:"MTA:system_message",EMAIL_MESSAGE:"source:email",MARKETPLACE:"marketplace"};},null);
__d("PageMessageEnumTag",[],function a(b,c,d,e,f,g){c.__markCompiled&&c.__markCompiled();f.exports={FLAG:"flag",LOW_VALUE:"low_value",SPAM_SPOOFING:"spam_spoofing"};},null);
__d("PhotoResizeModeConst",[],function a(b,c,d,e,f,g){c.__markCompiled&&c.__markCompiled();f.exports={CONTAIN:"s",COVER:"p"};},null);
__d("StoryAttachmentStyle",[],function a(b,c,d,e,f,g){c.__markCompiled&&c.__markCompiled();f.exports={FALLBACK:"fallback",SHARE:"share",OG_COMPOSER_SIMPLE:"og_composer_simple",SPORTS_MATCHUP:"sports_matchup",SHARE_LARGE_IMAGE:"share_large_image",PHOTO:"photo",COVER_PHOTO:"cover_photo",ALBUM:"album",NEW_ALBUM:"new_album",COUPON:"coupon",QUESTION:"question",ANSWER:"answer",OPTION:"option",GALLERY:"gallery",STREAM_PUBLISH:"stream_publish",MUSIC_AGGREGATION:"music_aggregation",ITEM_LIST:"list",HIGH_SCORE:"high_score",SCORE_LEADERBOARD:"score_leaderboard",FRIEND_LIST:"friend_list",CHECKIN:"checkin",POPULAR_OBJECTS:"popular_objects",AVATAR_LIST:"avatar_list",AVATAR:"avatar",AVATAR_WITH_VIDEO:"avatar_with_video",EVENT:"event",CANCELED_EVENT:"canceled_event",MINUTIAE_EVENT:"minutiae_event",EXPERIENCE:"experience",LIFE_EVENT:"life_event",TRAVEL_SLIDESHOW_LIFE_EVENT:"travel_slideshow_life_event",GIFT:"gift",IMAGE_SHARE:"image_share",ANIMATED_IMAGE_SHARE:"animated_image_share",ANIMATED_IMAGE_AUTOPLAY:"animated_image_autoplay",ANIMATED_IMAGE_VIDEO:"animated_image_video",ANIMATED_IMAGE_VIDEO_AUTOPLAY:"animated_image_video_autoplay",NOTE:"note",TOPIC:"topic",FILE_UPLOAD:"file_upload",NOTIFICATION_TARGET:"notification_target",UNAVAILABLE:"unavailable",PAGE_RECOMMENDATION:"page_recommendation",PAGE_VIDEO_PLAYLIST:"page_video_playlist",VIDEO:"video",VIDEO_INLINE:"video_inline",VIDEO_AUTOPLAY:"video_autoplay",VIDEO_SHARE:"video_share",VIDEO_SHARE_HIGHLIGHTED:"video_share_highlighted",VIDEO_SHARE_YOUTUBE:"video_share_youtube",VIDEO_DIRECT_RESPONSE:"video_direct_response",VIDEO_DIRECT_RESPONSE_AUTOPLAY:"video_direct_response_autoplay",MAP:"map",OG_MAP:"og_map",PRODUCT:"product",EXTERNAL_PRODUCT:"external_product",FITNESS_COURSE:"fitness_course",APPLICATION:"application",STICKER:"sticker",EXTERNAL_OG_PRODUCT:"external_og_product",TRAVEL_LOG:"travel_log",MULTI_SHARE:"multi_share",MULTI_SHARE_NO_END_CARD:"multi_share_no_end_card",MULTI_SHARE_SEARCH_END_CARD:"multi_share_search_end_card",YEAR_IN_REVIEW:"year_in_review",AVATAR_LARGE_COVER:"avatar_large_cover",COMMERCE_PRODUCT_ITEM:"commerce_product_item",COMMERCE_STORE:"commerce_store",THIRD_PARTY_PHOTO:"third_party_photo",PROMPT:"prompt",BIRTHDAY:"birthday",DONATIONS_CAMPAIGN:"donations_campaign",DONATE_PROMPT:"donate_prompt",DISCUSSION_CONVERSATION:"discussion_conversation",DISCUSSION_COMMENT:"discussion_comment",GROUP_SELL_PRODUCT_ITEM:"group_sell_product_item",GROUP_SELL_PRODUCT_ITEM_MARK_AS_SOLD:"group_sell_mark_as_sold",GAMETIME:"gametime",GAMETIME_PLAY:"gametime_play",GROUP_REPORTED_POST_QUEUE:"group_reported_post_queue",GROUP_PENDING_POST_QUEUE:"group_pending_post_queue",GROUP_JOIN_REQUEST_QUEUE:"group_join_request_queue",GREETING_CARD:"greeting_card",LEAD_GEN:"lead_gen",ATTACHED_STORY:"attached_story",POST_CHANNEL:"post_channel",TEXT_FOR_COLLAGE:"text_for_collage",SOUVENIR:"souvenir",SLIDESHOW:"slideshow",ORION:"orion",ORION_REQUEST:"orion_request",INSTANT_ARTICLE:"instant_article",MOMENTS_APP_INVITATION:"moments_app_invitation",MOMENTS_APP_PHOTO_REQUEST:"moments_app_photo_request",RIDE_ORDERED:"ride_ordered",RIDE_RECEIPT:"ride_receipt",BUSINESS_MESSAGE_ITEMS:"business_message_items",RETAIL_CANCELLATION:"retail_cancellation",RETAIL_PROMOTION:"retail_promotion",RETAIL_ITEM:"retail_item",RETAIL_NOW_IN_STOCK:"retail_now_in_stock",RETAIL_RECEIPT:"retail_receipt",RETAIL_SHIPMENT:"retail_shipment",RETAIL_SHIPMENT_FOR_SUPPORTED_CARRIER:"retail_shipment_for_supported_carrier",RETAIL_SHIPMENT_FOR_UNSUPPORTED_CARRIER:"retail_shipment_for_unsupported_carrier",RETAIL_SHIPMENT_TRACKING_EVENT:"retail_shipment_tracking_event",RETAIL_SHIPMENT_TRACKING_EVENT_ETA:"retail_shipment_tracking_event_eta",RETAIL_SHIPMENT_TRACKING_EVENT_IN_TRANSIT:"retail_shipment_tracking_event_in_transit",RETAIL_SHIPMENT_TRACKING_EVENT_OUT_FOR_DELIVERY:"retail_shipment_tracking_event_out_for_delivery",RETAIL_SHIPMENT_TRACKING_EVENT_DELAYED:"retail_shipment_tracking_event_delayed",RETAIL_SHIPMENT_TRACKING_EVENT_DELIVERED:"retail_shipment_tracking_event_delivered",SURVEY:"survey",MESSAGE_LOCATION:"message_location",JOB_OFFER:"job_offer",GROUP_ADD_MEMBERS:"group_add_memebers",RTC_CALL_LOG:"rtc_call_log",EVENTS_PENDING_POST_QUEUE:"events_pending_post_queue",EVENT_CALENDAR:"event_calendar",FACEPILE:"facepile",ATTRIBUTED_SHARE:"attributed_share",VIDEO_CINEMAGRAPH:"video_cinemagraph",LOCAL_CONTEXT_SHARE:"local_context_share",H_SCROLL:"h_scroll",EGO_HSCROLL:"ego_hscroll",MEDIA_QUESTION:"media_question",RICH_MEDIA:"rich_media",SQUARE_IMAGE_SHARE:"square_image_share",RETAIL_AGENT_ITEM_SUGGESTION:"retail_agent_item_suggestion",RETAIL_AGENT_ITEM_RECEIPT:"retail_agent_item_receipt",NOTE_COMPOSED:"note_composed",AVATAR_WITH_BIRTHDAY:"avatar_with_birthday",AIRLINE_FLIGHT_RESCHEDULE_UPDATE_BUBBLE:"airline_flight_reschedule_update_bubble",AIRLINE_CONFIRMATION:"airline_confirmation",AIRLINE_CHECK_IN:"airline_check_in",AIRLINE_BOARDING_PASS:"airline_boarding_pass",AIRLINE_FLIGHT_RESCHEDULE_UPDATE:"airline_flight_reschedule_update",LIGHTBOX_VIDEO:"lightbox_video",GLOBALLY_DELETED_MESSAGE_PLACEHOLDER:"globally_deleted_message_placeholder",GENIE_MESSAGE:"genie_message",MOVIE_BOT_MOVIE_LIST:"movie_bot_movie_list",MOVIE_BOT_MOVIE_SHOWTIME_LIST:"movie_bot_movie_showtime_list",AVATAR_WITH_EGO_ACTION:"avatar_with_ego_action",EVENT_TICKET:"event_ticket",VERTICAL_ATTACHMENT_LIST:"vertical_attachment_list",INSTANT_ARTICLE_LEGACY:"instant_article_legacy",FUNDRAISER_PAGE:"fundraiser_page",FINANCIAL_BILL_PAYMENT_REQUEST:"financial_bill_payment_request",GOODWILL_THROWBACK_FRIENDVERSARY_POLAROIDS_CARD:"goodwill_throwback_friendversary_polaroids_card",SAHELI_IMAGE:"saheli_image",LARGE_IMAGE_LIKE:"large_image_like",ASK_FRIENDS:"ask_friends",CULTURAL_MOMENT:"cultural_moment",TELEPHONE_CALL_LOG:"telephone_call_log",SUPER_EMOJI:"super_emoji",BOOK:"book",SUBTOPIC_CUSTOMIZATION_QUESTION:"subtopic_customization_question",SUBTOPIC_CUSTOMIZATION_OPTION:"subtopic_customization_option",RESTAURANT:"restaurant",CONNECTION_QUESTION:"connection_question",CONNECTION_QUESTION_OPTION:"connection_question_option",PYMI_ITEM:"pymi_item",GOODWILL_THROWBACK_FRIENDVERSARY_COLLAGE_CARD:"goodwill_throwback_friendversary_collage_card",CITY:"city",AVATAR_WITH_SHARE:"avatar_with_share",LIGHTWEIGHT_PLACE:"lightweight_place",QUOTED_SHARE:"quoted_share",SMS_LOG:"sms_log",CENTERED_TEXT:"centered_text",GOODWILL_THROWBACK_FRIENDVERSARY_DATA_CARD:"goodwill_throwback_friendversary_data_card",GOODWILL_THROWBACK_FACEVERSARY_COLLAGE_CARD:"goodwill_throwback_faceversary_collage_card",MESSAGE_EVENT:"message_event",MESSAGE_THREAD:"message_thread",QUOTE:"quote",VOTER_REGISTRATION_SHARE:"voter_registration_share",AIRLINE_ITINERARY:"airline_itinerary",AIRLINE_UPDATE:"airline_update",PLACE_LIST:"place_list",AIRLINE_CHECKIN_REMINDER:"airline_checkin_reminder",MINUTIAE_UNIT:"minutiae_unit",INSTANT_ARTICLE_PHOTO:"instant_article_photo",INSTANT_ARTICLE_VIDEO:"instant_article_video",PHOTO_LINK_SHARE:"photo_link_share",BUSINESS_LOCATION:"business_location",GOODWILL_WEATHER:"goodwill_weather",TRANSACTION_INVOICE:"transaction_invoice",GROUP:"group",COMMENT_PLACE_INFO:"comment_place_info",GOODWILL_THROWBACK_FRIENDVERSARY_POLAROIDS_CARD_IPB:"goodwill_throwback_friendversary_polaroids_card_ipb",GOODWILL_THROWBACK_FRIENDVERSARY_COLLAGE_CARD_IPB:"goodwill_throwback_friendversary_collage_card_ipb",FUNDRAISER_PERSON_TO_CHARITY:"fundraiser_person_to_charity",MESSAGE_LIVE_LOCATION:"message_live_location"};},null);
__d('BlueBarMinWidthWithJewel',['csx','BlueBar','DOMEventListener','DOMQuery','Locale','getElementPosition','getStyleProperty','getViewportDimensions','queryThenMutateDOM'],function a(b,c,d,e,f,g,h){if(c.__markCompiled)c.__markCompiled();g.init=function(){var i=c('BlueBar').getNavRoot();if(!i)return;var j=c('DOMQuery').scry(i,"._fmc")[0];if(!j)return;var k=function(){return c('queryThenMutateDOM')(function(){var l=c('getElementPosition')(i),m=l.x,n=l.width,o=void 0;if(c('Locale').isRTL()){o=-m;}else{var p=c('getViewportDimensions')().width;o=2*m+n-p;}if(o>0){var q=parseInt(c('getStyleProperty')(i,'width'),10),r=q-o;if(r>0)return r+'px';}return '';},function(l){j.style.width=l;},'BlueBarMinWidthWithJewel');};c('DOMEventListener').add(window,'resize',k);k();};},null);
__d('PagesMessengerThreadUtils',['invariant','MessagingTag','PageMessageEnumTag'],function a(b,c,d,e,f,g,h){if(c.__markCompiled)c.__markCompiled();var i='CUSTOM_TAG_',j={isFlagThread:function(k){if(k&&k.page_thread_info&&'flagged' in k.page_thread_info)return k.page_thread_info.flagged;return false;},isPageSpecficEnumFilter:function(k){if(k===c('PageMessageEnumTag').FLAG)return true;return false;},isCustomTagsFilter:function(k){return k.startsWith(i);},getCustomTagsFilter:function(k){return i+JSON.stringify(k.sort());},parseCustomTagsFilter:function(k){if(!this.isCustomTagsFilter(k))h(0);return JSON.parse(k.substring(i.length));},getBatchActionMenuParam:function(k){var l=false,m=false,n=false,o=false,p=false,q=false,r=false,s=false,t=false;if(k.folder===c('MessagingTag').INBOX&&!k.is_archived){l=true;o=true;if(j.isFlagThread(k)){r=true;}else q=true;if(k&&k.unread_count===0){t=true;}else s=true;}else if(k.folder===c('MessagingTag').SPAM){p=true;}else if(k.is_archived){m=true;n=true;}if(k&&k.unread_count===0){t=true;}else s=true;return {showArchive:l,showDelete:m,showUnarchive:n,showSpam:o,showUnspam:p,showFlag:q,showUnflag:r,showMarkRead:s,showMarkUnread:t,showHideContextCard:false,showShowContextCard:false};}};f.exports=j;},null);
__d('MercuryGiftSnippetRenderer',['fbt'],function a(b,c,d,e,f,g,h){'use strict';if(c.__markCompiled)c.__markCompiled();var i={renderText:function(j,k){return j?h._("You sent a valentine."):h._("{name} sent a valentine.",[h.param('name',k)]);}};f.exports=i;},null);
__d('MercurySingletonProvider',['CurrentUser','Map'],function a(b,c,d,e,f,g){'use strict';if(c.__markCompiled)c.__markCompiled();function h(i){this.$MercurySingletonProvider1=new (c('Map'))();this.$MercurySingletonProvider2=i;}h.prototype.getForFBID=function(i){if(!this.$MercurySingletonProvider1.has(i))this.$MercurySingletonProvider1.set(i,new this.$MercurySingletonProvider2(i));return this.$MercurySingletonProvider1.get(i);};h.prototype.get=function(){return this.getForFBID(c('CurrentUser').getID());};h.mock=function(i){throw new Error('MercurySingletonProvider.mock() must only be used in tests.');};f.exports=h;},null);
__d('MercurySyncDeltaTypes',[],function a(b,c,d,e,f,g){'use strict';if(c.__markCompiled)c.__markCompiled();var h={AdminAddedToGroupThread:'AdminAddedToGroupThread',AdminRemovedFromGroupThread:'AdminRemovedFromGroupThread',AdminTextMessage:'AdminTextMessage',DeliveryReceipt:'DeliveryReceipt',ForcedFetch:'ForcedFetch',MarkRead:'MarkRead',MessageDelete:'MessageDelete',NewMessage:'NewMessage',PagesManagerEvent:'PagesManagerEvent',ParticipantLeftGroupThread:'ParticipantLeftGroupThread',ParticipantsAddedToGroupThread:'ParticipantsAddedToGroupThread',ReadReceipt:'ReadReceipt',ReplaceMessage:'ReplaceMessage',RTCEventLog:'RTCEventLog',ThreadAction:'ThreadAction',ThreadDelete:'ThreadDelete',ThreadMuteSettings:'ThreadMuteSettings',ThreadName:'ThreadName'};f.exports=h;},null);
__d('MercuryAssert',['MercuryIDs'],function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();f.exports={isParticipantID:function(h){if(!c('MercuryIDs').isValid(h))throw 'bad_participant_id '+h;},allParticipantIDs:function(h){h.forEach(this.isParticipantID);},isUserParticipantID:function(h){var i=c('MercuryIDs').tokenize(h);if(i.type!='fbid')throw 'bad_user_id '+h;},isEmailParticipantID:function(h){var i=c('MercuryIDs').tokenize(h);if(i.type!='email')throw 'bad_email_id '+h;},allThreadID:function(h){h.forEach(this.isThreadID);},isThreadID:function(h){if(!c('MercuryIDs').isValid(h))throw 'bad_thread_id '+h;}};},null);
__d('MercurySingletonMixin',['CurrentUser'],function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();var h={_getInstances:function(){if(!this._instances)this._instances={};return this._instances;},get:function(){return this.getForFBID(c('CurrentUser').getID());},getForFBID:function(i){var j=this._getInstances();if(!j[i])j[i]=new this(i);return j[i];}};f.exports=h;},null);
__d('MercuryThreadInformer',['ArbiterMixin','LogHistory','MercuryAssert','MercurySingletonMixin','mapObject','mixin'],function a(b,c,d,e,f,g){'use strict';var h,i;if(c.__markCompiled)c.__markCompiled();var j=c('LogHistory').getInstance('mercury_informer');h=babelHelpers.inherits(k,c('mixin')(c('ArbiterMixin')));i=h&&h.prototype;function k(l){i.constructor.call(this);this.$MercuryThreadInformer1=l;this.$MercuryThreadInformer2={};this.$MercuryThreadInformer3={};this.$MercuryThreadInformer4={};this.$MercuryThreadInformer5={};this.$MercuryThreadInformer6=false;this.$MercuryThreadInformer7=false;this.$MercuryThreadInformer8=false;this.$MercuryThreadInformer9={};this.$MercuryThreadInformer10={};this.$MercuryThreadInformer11={};this.$MercuryThreadInformer12=0;}k.prototype.updatedThread=function(l){this.$MercuryThreadInformer3[l]=true;this.$MercuryThreadInformer13();};k.prototype.invalidatedThread=function(l){this.$MercuryThreadInformer4[l]=true;this.$MercuryThreadInformer13();};k.prototype.deletedThread=function(l){this.$MercuryThreadInformer2[l]=true;this.$MercuryThreadInformer13();};k.prototype.updatedThreadlist=function(){this.$MercuryThreadInformer6=true;this.$MercuryThreadInformer13();};k.prototype.updatedUnseenState=function(){this.$MercuryThreadInformer7=true;this.$MercuryThreadInformer13();};k.prototype.updatedUnreadState=function(){this.$MercuryThreadInformer8=true;this.$MercuryThreadInformer13();};k.prototype.changedThreadReadState=function(l,m,n){if(!this.$MercuryThreadInformer5[l]||this.$MercuryThreadInformer5[l].timestamp<n)this.$MercuryThreadInformer5[l]={mark_as_read:m,timestamp:n};this.$MercuryThreadInformer13();};k.prototype.receivedMessage=function(l){c('MercuryAssert').isThreadID(l.thread_id);var m=l.thread_id;if(!this.$MercuryThreadInformer9[m])this.$MercuryThreadInformer9[m]=[];this.$MercuryThreadInformer9[m].push(l);this.updatedThread(m);};k.prototype.reorderedMessages=function(l,m){this.$MercuryThreadInformer10[l]={source:m};this.$MercuryThreadInformer13();};k.prototype.updatedMessage=function(l,m,n){if(!this.$MercuryThreadInformer11[l])this.$MercuryThreadInformer11[l]={};this.$MercuryThreadInformer11[l][m]={source:n};this.updatedThread(l);};k.prototype.synchronizeInforms=function(l){this.$MercuryThreadInformer12++;try{l();}catch(m){throw m;}finally{this.$MercuryThreadInformer12--;this.$MercuryThreadInformer13();}};k.prototype.listen=function(l,m){return this.subscribe('threads-updated',function(n,o){if(o[l])m(l);});};k.prototype.$MercuryThreadInformer13=function(){if(!this.$MercuryThreadInformer12){var l=this.$MercuryThreadInformer2,m=this.$MercuryThreadInformer3,n=this.$MercuryThreadInformer4,o=this.$MercuryThreadInformer5,p=this.$MercuryThreadInformer6,q=this.$MercuryThreadInformer7,r=this.$MercuryThreadInformer8,s=this.$MercuryThreadInformer9,t=this.$MercuryThreadInformer10,u=this.$MercuryThreadInformer11;this.$MercuryThreadInformer2={};this.$MercuryThreadInformer3={};this.$MercuryThreadInformer4={};this.$MercuryThreadInformer5={};this.$MercuryThreadInformer6=false;this.$MercuryThreadInformer7=false;this.$MercuryThreadInformer8=false;this.$MercuryThreadInformer9={};this.$MercuryThreadInformer10={};this.$MercuryThreadInformer11={};var v=Object.keys(m);if(v.length||p)this.inform('threadlist-updated',v);if(v.length)this.$MercuryThreadInformer14('threads-updated',m);for(var w in n){this.$MercuryThreadInformer14('thread-invalidated',n);break;}for(var w in o){this.$MercuryThreadInformer14('thread-read-changed',o);break;}for(w in l){this.$MercuryThreadInformer14('threads-deleted',l);break;}if(q)this.$MercuryThreadInformer14('unseen-updated',null);if(r)this.$MercuryThreadInformer14('unread-updated',null);for(w in s){this.$MercuryThreadInformer14('messages-received',s);break;}for(w in t){this.$MercuryThreadInformer14('messages-reordered',t);break;}for(w in u){this.$MercuryThreadInformer14('messages-updated',u);break;}}};k.prototype.$MercuryThreadInformer14=function(l,m){j.debug(l,'{}');this.inform(l,m);};Object.assign(k,c('MercurySingletonMixin'));f.exports=k;},null);
__d('MercuryDispatcher',['invariant','ArbiterMixin','LogHistory','MercuryActionType','MercuryLoggingHelper','MercuryPayloadSource','MercurySingletonProvider','MercuryThreadInformer','isEmpty','mixin'],function a(b,c,d,e,f,g,h){'use strict';var i,j;if(c.__markCompiled)c.__markCompiled();var k=c('LogHistory').getInstance('mercury_dispatcher');i=babelHelpers.inherits(l,c('mixin')(c('ArbiterMixin')));j=i&&i.prototype;l.getForFBID=function(n){return m.getForFBID(n);};l.get=function(){return m.get();};function l(n){j.constructor.call(this);this.$MercuryDispatcher1=n;}l.prototype.handleUpdate=function(n){this.$MercuryDispatcher2(n);!(!!n.from_client!==!!n.preprocessed)?h(0):void 0;delete n.preprocessed;if(!c('isEmpty')(n))c('MercuryThreadInformer').getForFBID(this.$MercuryDispatcher1).synchronizeInforms(function(){if(n.payload_source===c('MercuryPayloadSource').SERVER_INVALIDATE_GLOBAL_STATE)this.inform('invalidate-global-state',{});if(n.payload_source===c('MercuryPayloadSource').SERVER_INVALIDATE_THREAD_STATE){var o=n.threads&&n.threads.length>0&&n.threads[0]&&n.threads[0].thread_id;if(o)this.inform('invalidate-thread-state',o);}if(!n.from_client)this.inform('payload-preprocessed',n);this.inform('update-thread-ids',n.newlyAddedClientIDs||{});this.inform('update-participants',n);this.inform('update-threads',n);this.inform('update-unread',n);this.inform('update-threadlist',n);this.inform('update-pinned-threads',n);this.inform('update-messages',n);this.inform('update-unseen',n);this.inform('update-typing-state',n);this.inform('update-delivery',n);this.inform('update-roger',n.roger);this.inform('update-blocked-users',n);this.inform('model-update-completed',null);}.bind(this));};l.prototype.$MercuryDispatcher2=function(n){var o=n.payload_source;if(o===c('MercuryPayloadSource').CLIENT_CHANGE_READ_STATUS||o===c('MercuryPayloadSource').CLIENT_MARK_THREAD_SEEN)return;var p={from_client:n.from_client,messages:null};if(n.actions){var q=n.actions.filter(function(r){return (r.action_type===c('MercuryActionType').USER_GENERATED_MESSAGE||r.action_type===c('MercuryActionType').LOG_MESSAGE);}).map(function(r){return {action_type:r.action_type,other_user_fbid:r.other_user_fbid,thread_fbid:r.thread_fbid,message_id:r.message_id};});if(q.length)p.messages=q;}k.debug('update:'+o,JSON.stringify(p));};var m=new (c('MercurySingletonProvider'))(l);f.exports=l;},null);
__d('MercuryFolders',['MessagingTag'],function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();var h=[c('MessagingTag').INBOX,c('MessagingTag').PENDING,c('MessagingTag').OTHER,c('MessagingTag').ACTION_ARCHIVED],i={getSupportedFolders:function(){return h.concat();},getFromMeta:function(j){var k=j.folder;if(j.is_archived)k=c('MessagingTag').ACTION_ARCHIVED;return k;}};f.exports=i;},null);
__d('FBID',[],function a(b,c,d,e,f,g){'use strict';if(c.__markCompiled)c.__markCompiled();var h={isUser:function(i){return i<2.2e+09||i>=1e+14&&i<=100099999989999||i>=8.9e+13&&i<=89999999999999||i>=6.000001e+13&&i<=60000019999999;}};f.exports=h;},null);
__d('MercuryServerRequestSingletonMixin',['CurrentUser','FBID'],function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();var h={_getInstances:function(){if(!this._instances)this._instances={};return this._instances;},get:function(){return this.getForFBID(c('CurrentUser').getID());},getForFBID:function(i){var j=this._getInstances();if(!j[i])if(c('FBID').isUser(i)){j[i]=new this(i);}else{var k;e(['MercuryPageServerRequests'],function(l){k=new l(i);});j[i]=k;}return j[i];}};f.exports=h;},null);
__d('MercuryPageServerRequests',['MercuryAPIArgsSource','MercuryAssert','MercuryServerRequests','PageMessageEnumTag','PagesMessengerThreadUtils','MercuryServerDispatcher'],function a(b,c,d,e,f,g){var h,i;if(c.__markCompiled)c.__markCompiled();var j=c('MercuryAPIArgsSource').MERCURY;h=babelHelpers.inherits(k,c('MercuryServerRequests'));i=h&&h.prototype;function k(l){'use strict';i.constructor.call(this,l);var m={'/pages/messaging/thread_tag/add/':{request_user_id:l,mode:c('MercuryServerDispatcher').BATCH_SUCCESSIVE,batch_function:this.$MercuryPageServerRequests1,handler:function(n,o){return this.__handleUpdate(n,o);}.bind(this)},'/pages/messaging/thread_tag/remove/':{request_user_id:l,mode:c('MercuryServerDispatcher').BATCH_SUCCESSIVE,batch_function:this.$MercuryPageServerRequests1,handler:function(n,o){return this.__handleUpdate(n,o);}.bind(this)},'/pages/messaging/thread_tag/list/':{request_user_id:l,mode:c('MercuryServerDispatcher').IMMEDIATE,handler:function(n,o){return this.__handleUpdate(n,o);}.bind(this)},'/pages/messaging/thread_custom_tags/list/':{request_user_id:l,mode:c('MercuryServerDispatcher').IMMEDIATE,handler:function(n,o){return this.__handleUpdate(n,o);}.bind(this)},'/pages/messaging/create_note/':{request_user_id:l,mode:c('MercuryServerDispatcher').IMMEDIATE,handler:function(n,o){return this.__handleUpdate(n,o);}.bind(this)}};c('MercuryServerDispatcher').registerEndpoints(m);}k.prototype.$MercuryPageServerRequests1=function(l,m){'use strict';var n=l?l.tag_name:m.tag_name,o=l?l.thread_ids:[],p=m?m.thread_ids:[],q=o.concat(p),r={tag_name:n,thread_ids:q};return r;};k.prototype.addThreadFlag=function(l,m){'use strict';c('MercuryAssert').isThreadID(l);this.__threadIDMap.getServerIDFromClientID(l,function(n){var o={thread_ids:[n],tag_name:c('PageMessageEnumTag').FLAG};this.__sendRequest('/pages/messaging/thread_tag/add/',o);}.bind(this));};k.prototype.createNote=function(l,m,n){'use strict';c('MercuryAssert').isThreadID(n);this.__threadIDMap.getServerIDFromClientID(n,function(o){var p={body:l,message_id:m,other_user_fbid:o};this.__sendRequest('/pages/messaging/create_note/',p);}.bind(this));};k.prototype.fetchThreadlistInfo=function(l,m,n,o,p){'use strict';var q={folder:n,offset:l,limit:m};if(c('PagesMessengerThreadUtils').isPageSpecficEnumFilter(o)){p=p||j;q.tag_name=o;this.__sendRequest('/pages/messaging/thread_tag/list/',q);return;}if(o&&c('PagesMessengerThreadUtils').isCustomTagsFilter(o)){q.custom_tags_filter=o;q.custom_tags=c('PagesMessengerThreadUtils').parseCustomTagsFilter(o);this.__sendRequest('/pages/messaging/thread_custom_tags/list/',q);return;}i.fetchThreadlistInfo.call(this,l,m,n,o,p);};k.prototype.removeThreadFlag=function(l,m){'use strict';c('MercuryAssert').isThreadID(l);this.__threadIDMap.getServerIDFromClientID(l,function(n){var o={thread_ids:[n],tag_name:c('PageMessageEnumTag').FLAG};this.__sendRequest('/pages/messaging/thread_tag/remove/',o);}.bind(this));};k.prototype.toString=function(){'use strict';return 'MercuryPageServerRequests';};f.exports=k;},null);
__d('EmojiLikeConstants',[],function a(b,c,d,e,f,g){'use strict';if(c.__markCompiled)c.__markCompiled();var h={SMALL:'small',MEDIUM:'medium',LARGE:'large'},i='hot_emoji_size',j='emoji_like',k='\uD83D\uDC4D';f.exports={size:h,TAG_PREFIX_NEW:i,TAG_PREFIX_OLD:j,THUMBS_UP_EMOJI:k};},null);
__d('MercuryTagHelper',[],function a(b,c,d,e,f,g){'use strict';if(c.__markCompiled)c.__markCompiled();var h={get:function(i,j){var k=i.find(function(l){return l.startsWith(j);});return k&&k.substr(k.indexOf(':')+1);}};f.exports=h;},null);
__d('EmojiLikeUtils',['EmoticonsList','EmoticonEmojiList','EmojiLikeConstants','MercuryConfig','MercuryTagHelper','SupportedEmoji','Utf16'],function a(b,c,d,e,f,g){'use strict';var h,i;if(c.__markCompiled)c.__markCompiled();var j=c('EmojiLikeConstants').size,k='/images/emoji/unicode/emoji_',l='/images/emoticons/',m=(h={},h[j.SMALL]='_16-2x',h[j.MEDIUM]='_64',h[j.LARGE]='_64',h),n=(i={},i[j.MEDIUM]='-2x',i),o='.png',p='emoji',q='emoticon',r=new RegExp('([\u203C\u2049\u2100-\u21FF\u2300-\u27FF'+'\u2900-\u29FF\u2B00-\u2BFF\u3000-\u30FF\u3200-\u32FF]|'+'\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDEFF])([\uFE00-\uFE0F])?'),s=new RegExp('([\u00A9\u00AE\u203C\u2049\u2100-\u21FF'+'\u2300-\u27FF\u2900-\u29FF\u2B00-\u2BFF\u3000-\u30FF\u3200-\u32FF]|'+'\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDEFF])([\uFE00-\uFE0F])?'),t=new RegExp('([\u0023\u0030-\u0039][\uFE00-\uFE0F]?'+'\u20E3|[\u261D\u270A-\u270C]\uD83C[\uDFFB-\uDFFF]|[\uD83C\uD83D]'+'[\uDC00-\uDFFF]\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDDE6-\uDDFF]\uD83C'+'[\uDDE6-\uDDFF])([\uFE00-\uFE0F])?'),u=new RegExp('(\u20E3|\uD83C[\uDFFB-\uDFFF])'+'([\uFE00-\uFE0F])?'),v=new RegExp('(\uD83C[\uDDE6-\uDDFF])'+'([\uFE00-\uFE0F])?'),w=new RegExp('([\uFE00-\uFE0F])'),x=function(ea){if(!c('MercuryConfig').BubblelessEmojiRenderingGK)return false;var fa=ea||'',ga=[],ha=null;while(fa.length>0){fa=fa.trim();if(c('MercuryConfig').MessengerNewEmojiGK){var ia=c('MercuryConfig').MessengerNewEmojiUtils;if(c('EmoticonEmojiList').noncapturingRegexp.test(fa)){ha=c('EmoticonEmojiList').noncapturingRegexp.exec(fa);var ja=c('EmoticonEmojiList').names[ha[1]],ka=c('EmoticonEmojiList').emote2emojis[ja];ga.push({emoji:ia.renderFromSize(ka,j.SMALL),type:p,title:ha[1],id:ka});fa=fa.replace(c('EmoticonEmojiList').noncapturingRegexp,'');}else{var la=s.exec(fa),ma=t.exec(fa);if(la&&la.length&&ma&&ma.length)if(la.index<ma.index){ma=null;}else la=null;if(ma&&ma.length){ha=ma[1];var na=v.exec(ha),oa='',pa='';if(na&&na.length){oa=na[1];pa=ha.replace(v,'');}else{var qa=u.exec(ha);pa=qa[1];oa=ha.replace(u,'');if(w.test(oa))oa=oa.replace(w,'');}var ra=c('Utf16').decode(oa).toString(16)+'_'+c('Utf16').decode(pa).toString(16),sa=ia.emoji[ra];if(!sa)return false;ga.push({emoji:ia.renderFromSize(ra,j.SMALL),id:ra,type:p});fa=fa.replace(t,'');}else if(la&&la.length){ha=la[1];var ta=c('Utf16').decode(ha).toString(16),ua=ia.emoji[ta];if(!ua)return false;ga.push({emoji:ia.renderFromSize(ta,j.SMALL),id:ta,type:p});fa=fa.replace(s,'');}else return false;}}else if(c('EmoticonsList').noncapturingRegexp.test(fa)){ha=c('EmoticonsList').noncapturingRegexp.exec(fa);ga.push({emoji:undefined,type:q,title:ha[1],id:c('EmoticonsList').emotes[ha[1]]});fa=fa.replace(c('EmoticonsList').noncapturingRegexp,'');}else if(r.test(fa)){var va=r.exec(fa);if(!va||!va.length)return false;ha=va[1];var wa=c('Utf16').decode(ha),xa=c('SupportedEmoji').emoji[wa];if(!xa)return false;ga.push({emoji:undefined,id:wa.toString(16),type:p});fa=fa.replace(r,'');}else return false;}return ga;};function y(ea,fa){ea.tags=[z(fa)];return ea;}function z(ea){var fa=c('MercuryConfig').WWWMessengerNewEmojiSizeTagGK?c('EmojiLikeConstants').TAG_PREFIX_NEW:c('EmojiLikeConstants').TAG_PREFIX_OLD;return fa+':'+ea;}function aa(ea){return ba(ea)!=null;}function ba(ea){if(!ea.tags)return null;var fa=c('MercuryTagHelper').get(ea.tags,c('EmojiLikeConstants').TAG_PREFIX_NEW);if(fa)return fa;return c('MercuryTagHelper').get(ea.tags,c('EmojiLikeConstants').TAG_PREFIX_OLD);}function ca(ea,fa){if(!c('SupportedEmoji').findEmoji(ea))return null;return (k+c('Utf16').decode(ea).toString(16)+m[fa]+o);}function da(ea){var fa=j.LARGE,ga=j.MEDIUM,ha=[];if(ea)ea.forEach(function(ia){if(ia.type===p){ha.push({emoji:ia.emoji,type:ia.type,title:ia.title,url:k+ia.id+m[fa]+o});}else ha.push({emoji:undefined,type:ia.type,title:ia.title,url:l+ia.id+n[ga]+o});});return ha;}f.exports={getEmojiSize:ba,getURI:ca,getSourceURIs:da,isEmojiLike:aa,richContent:x,setEmojiSize:y,EMOJI_TYPE:p,EMOTE_TYPE:q};},null);
__d('MercuryAttachment',['cx','EmojiLikeUtils','MercuryAttachmentContentType','MercuryAttachmentType','MercuryAudioType','MercuryTagHelper'],function a(b,c,d,e,f,g,h){'use strict';if(c.__markCompiled)c.__markCompiled();var i={getAttachIconClass:function(j){switch(j){case c('MercuryAttachmentContentType').PHOTO:return "_y2-";case c('MercuryAttachmentContentType').VIDEO:return "_y2_";case c('MercuryAttachmentContentType').MUSIC:return "_y30";case c('MercuryAttachmentContentType').VOICE:return "_y31";case c('MercuryAttachmentContentType').TEXT:return "_y32";case c('MercuryAttachmentContentType').MSWORD:return "_y33";case c('MercuryAttachmentContentType').MSXLS:return "_y34";case c('MercuryAttachmentContentType').MSPPT:return "_y35";}return "_y36";},getAttachIconClassByMime:function(j){if(j.startsWith('image')){return "_y2-";}else if(j.startsWith('video')){return "_y2_";}else if(j.startsWith('audio')){return "_y30";}else if(j.startsWith('text/plain')){return "_y32";}else return "_y36";},getAttachTypeByMime:function(j){if(j.startsWith('image')){return c('MercuryAttachmentContentType').PHOTO;}else if(j.startsWith('video')){return c('MercuryAttachmentContentType').VIDEO;}else if(j.startsWith('audio')){return c('MercuryAttachmentContentType').MUSIC;}else if(j.startsWith('text/plain')){return c('MercuryAttachmentContentType').TEXT;}else return c('MercuryAttachmentContentType').UNKNOWN;},convertRaw:function(j){var k=[];for(var l=0;l<j.length;l++){var m=j[l];if(m.attach_type===c('MercuryAttachmentType').PHOTO){k.push(m);}else if(m.filename){var n=i.getAttachTypeByMime(m.filetype),o={};o.attach_type=c('MercuryAttachmentType').FILE;o.name=m.filename;o.icon_type=n;o.url='';k.push(o);}}return k;},get:function(j){var k=[];if(j.attachments){k=j.attachments;}else if(j.raw_attachments)k=this.convertRaw(j.raw_attachments);var l=c('EmojiLikeUtils').getEmojiSize(j);if(l)k=k.concat([{attach_type:c('MercuryAttachmentType').EMOJI_LIKE,size:l}]);if(!(j.attachments&&j.attachments.length>0)){if(j.sticker_id)return k.concat([{attach_type:c('MercuryAttachmentType').STICKER}]);if(j.preview_attachments&&j.preview_attachments.length>0)return k.concat(j.preview_attachments);}return k;},resizeContain:function(j,k){var l=j.width/j.height,m=k.width/k.height;if(m<l){return {width:Math.ceil(Math.min(j.height*m,k.width)),height:Math.ceil(Math.min(j.height,k.height))};}else return {width:Math.ceil(Math.min(j.width,k.width)),height:Math.ceil(Math.min(j.width/m,k.height))};},isBubblePreferred:function(j){return !(this.isPhotoAttachment(j)||this.isStickerAttachment(j)||this.isVideoAttachment(j)||this.isVoiceAttachment(j));},isEphemeralAttachmentStyle:function(j){return (this.isPhotoAttachment(j)||this.isVideoAttachment(j));},isEphemeralTextStyle:function(j){return (this.isErrorAttachment(j)||this.isShareAttachment(j)||this.isFileAttachment(j));},isPhotoAttachment:function(j){return !!(j.attach_type==c('MercuryAttachmentType').PHOTO||j.attach_type==c('MercuryAttachmentType').ANIMATED_IMAGE||j.attach_type==c('MercuryAttachmentType').THIRDPARTYSTICKER||j.attach_type==c('MercuryAttachmentType').FILE&&j.preview_url);},isVideoAttachment:function(j){return j.attach_type==c('MercuryAttachmentType').VIDEO;},isShareAttachment:function(j){return j.attach_type==c('MercuryAttachmentType').SHARE;},isFileAttachment:function(j){return j.attach_type==c('MercuryAttachmentType').FILE;},isErrorAttachment:function(j){return j.attach_type==c('MercuryAttachmentType').ERROR;},isStickerAttachment:function(j){return j.attach_type==c('MercuryAttachmentType').STICKER;},isEmojiLikeAttachment:function(j){return j.attach_type===c('MercuryAttachmentType').EMOJI_LIKE;},isVoiceAttachment:function(j){if(!j.metadata)return false;return (j.metadata.type===c('MercuryAudioType').AudioClip||j.metadata.type===c('MercuryAudioType').VoiceMessageWithTranscript);},hasAttribution:function(j){return !!j.app_attribution;}};f.exports=i;},null);
__d('MercurySendErrorLogger',['Banzai','BanzaiLogger'],function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();var h=c('BanzaiLogger').create({retry:true}),i=c('Banzai').isEnabled('mercury_send_error_logging'),j={log:function(k){if(!i)return;var l={message_id:k.message_id,timestamp_client:Date.now(),error_type:k.error_data.type,error_code:k.error_data.code,error_description:k.error_data.description,is_transient:k.error_data.is_transient};h.log('MercurySendErrorLoggerConfig',l);}};f.exports=j;},null);
__d('MercuryServerPayloadPreprocessor',['invariant','CurrentEnvironment','MercuryIDs','MercuryConfig','MercuryActionStatus','MercuryActionType','MercuryAttachment','MercuryDispatcher','MercurySendErrorLogger','MercurySingletonMixin','MercuryThreadIDMap','StoryAttachmentStyle','URI'],function a(b,c,d,e,f,g,h){'use strict';if(c.__markCompiled)c.__markCompiled();function i(j){this.$MercuryServerPayloadPreprocessor1=j;this.$MercuryServerPayloadPreprocessor2=c('MercuryThreadIDMap').getForFBID(this.$MercuryServerPayloadPreprocessor1);this.$MercuryServerPayloadPreprocessor3=c('MercuryDispatcher').getForFBID(this.$MercuryServerPayloadPreprocessor1);}i.prototype.handleUpdate=function(j){var k={};!!j.from_client?h(0):void 0;(j.threads||[]).forEach(function(ca){this.$MercuryServerPayloadPreprocessor4(ca,k);var da=this.$MercuryServerPayloadPreprocessor2.getServerIDFromClientIDNow(ca.thread_id);e(['MercuryServerRequests'],function(ea){var fa=ea.getForFBID(this.$MercuryServerPayloadPreprocessor1);fa.markThreadFetched(ca.thread_id);fa.markThreadFetched(da);fa.updateLastActionTimestamp(ca.timestamp);}.bind(this));}.bind(this));(j.ordered_threadlists||[]).forEach(function(ca){var da=ca.thread_fbids||[];da=da.concat(ca.other_user_fbids||[]);ca.thread_ids=da.map(function(ea){return this.$MercuryServerPayloadPreprocessor2.getClientIDFromServerIDNow(ea.toString());}.bind(this));}.bind(this));if(j.pinned_threads&&j.pinned_threads.thread_fbids)j.pinned_threads.thread_fbids=j.pinned_threads.thread_fbids.map(function(ca){return this.$MercuryServerPayloadPreprocessor2.getClientIDFromServerIDNow(ca);}.bind(this));if(j.delivery_receipts){var l={};for(var m=j.delivery_receipts,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,r=q.other_user_fbid?c('MercuryIDs').getThreadIDFromUserID(q.other_user_fbid):this.$MercuryServerPayloadPreprocessor2.getClientIDFromServerIDNow(q.thread_fbid);l[r]=q.time;}j.delivery_receipts=l;}j.actions=j.actions||[];j.actions.forEach(function(ca){if(ca.action_type===c('MercuryActionType').SEND_MESSAGE&&ca.status===c('MercuryActionStatus').ERROR)c('MercurySendErrorLogger').log(ca);var da=null,ea=null;if(ca.other_user_fbid){ea=c('MercuryIDs').getThreadIDFromUserID(ca.other_user_fbid);da=ca.other_user_fbid;}else if(ca.thread_fbid){ea=c('MercuryIDs').getThreadIDFromThreadFBID(ca.thread_fbid);da=ca.thread_fbid;}else if(ca.thread_id){ea=c('MercuryIDs').getThreadIDFromThreadFBID(ca.thread_id);da=ca.thread_id;}else if(ca.status&&ca.status!=c('MercuryActionStatus').SUCCESS&&ca.client_thread_id){ea=ca.client_thread_id;}else h(0);da=da&&da.toString();ca.thread_id=this.$MercuryServerPayloadPreprocessor2.hasClientIDForServerID(da)?this.$MercuryServerPayloadPreprocessor2.getClientIDFromServerIDNow(da):ea;if(ca.action_type==c('MercuryActionType').SEND_MESSAGE&&ca.client_thread_id&&da){ca.thread_id=ca.client_thread_id;this.$MercuryServerPayloadPreprocessor2.forceSetServerIDToClientID(da,ca.client_thread_id);k[da]=ca.client_thread_id;}!ca.thread_id?h(0):void 0;if(!j.payload_source||!j.payload_source.startsWith('server'))e(['MercuryServerRequests'],function(fa){fa.getForFBID(this.$MercuryServerPayloadPreprocessor1).updateLastActionTimestamp(ca.timestamp);}.bind(this));}.bind(this));this.$MercuryServerPayloadPreprocessor5(j);this.$MercuryServerPayloadPreprocessor6(j);if(j.end_of_history){var s=[];for(var t=0;t<j.end_of_history.length;t++){var u=j.end_of_history[t];if(u.type=='user'){s.push('user:'+u.fbid);}else if(u.type=='thread'&&this.$MercuryServerPayloadPreprocessor2.hasClientIDForServerID(u.fbid))s.push(this.$MercuryServerPayloadPreprocessor2.getClientIDFromServerIDNow(u.fbid));}j.end_of_history=s;}if(j.roger){var v={};for(var w in j.roger){var x=Object.keys(j.roger[w]),y;if(w){y=this.$MercuryServerPayloadPreprocessor2.getClientIDFromServerIDNow(w);}else if(x.length===1)y=c('MercuryIDs').getThreadIDFromUserID(x[0]);if(y){var z=j.roger[w];v[y]={};for(var aa in z)if(z.hasOwnProperty(aa)){var ba=c('MercuryIDs').getParticipantIDFromUserID(aa);v[y][ba]=z[aa];}}}j.roger=v;}j.newlyAddedClientIDs=k;j.preprocessed=true;this.$MercuryServerPayloadPreprocessor3.handleUpdate(j);};i.prototype.$MercuryServerPayloadPreprocessor4=function(j,k){var l=j.other_user_fbid?j.other_user_fbid:j.thread_fbid;!l?h(0):void 0;var m=this.$MercuryServerPayloadPreprocessor2.getClientIDFromServerIDNow(l);if(!m){m=j.other_user_fbid?c('MercuryIDs').getThreadIDFromUserID(j.other_user_fbid):c('MercuryIDs').getThreadIDFromThreadFBID(j.thread_fbid);this.$MercuryServerPayloadPreprocessor2.setServerIDToClientID(l,m);this.$MercuryServerPayloadPreprocessor2.setDeprecatedServerIDToClientID(j.thread_id,m);k[l]=m;}j.thread_id=m;};i.prototype.$MercuryServerPayloadPreprocessor5=function(j){j.actions.forEach(function(k){if(k.action_type===c('MercuryActionType').USER_GENERATED_MESSAGE){k.attachments=k.attachments||[];k.attachments.forEach(function(l){if(c('MercuryAttachment').isShareAttachment(l)&&c('CurrentEnvironment').messengerdotcom){var m=new (c('URI'))(l.share.uri);if(!m.getDomain())l.share.uri=m.setDomain('facebook.com').setSubdomain(c('URI').getRequestURI().getSubdomain()).setProtocol('https').toString();}});}});};i.prototype.$MercuryServerPayloadPreprocessor6=function(j){if(!c('MercuryConfig').MercuryGenieRendering)return;j.actions.forEach(function(k){if(k.action_type!==c('MercuryActionType').USER_GENERATED_MESSAGE)return;var l=k;if(!l.has_attachment||!l.attachments)return;for(var m=l.attachments.length-1;m>=0;m-=1){var n=l.attachments[m];if(!n.share||!n.share.style_list||n.share.style_list[0]!=c('StoryAttachmentStyle').GENIE_MESSAGE)continue;if(n.share.target.genie_id)l.author=c('MercuryIDs').getParticipantIDFromUserID(n.share.target.genie_id);if(n.share.target&&!n.share.target.attachment){l.attachments.splice(m,1);l.has_attachment=l.attachments.length>0;}}});};Object.assign(i,c('MercurySingletonMixin'));f.exports=i;},null);
__d('MercuryMessageClientState',[],function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();var h={DO_NOT_SEND_TO_SERVER:'do_not_send_to_server',SEND_TO_SERVER:'send_to_server'};f.exports=h;},null);
__d('MercuryMessageIDs',['KeyedCallbackManager'],function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();var h=new (c('KeyedCallbackManager'))(),i={getServerIDs:function(j,k){var l=j.filter(function(n){return n.indexOf('id')===-1;}),m=function(n){var o=j.map(function(p){return n[p]?n[p]:p;});k(o);};return h.executeOrEnqueue(l,m);},addServerID:function(j,k){h.setResource(j,k);}};f.exports=i;},null);
__d("MercuryServerSendMessageQueueOptions",[],function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();function h(i,j,k,l,m,n){"use strict";this.success_handler=i;this.error_handler=j;this.transport_error_handler=k;this.timeout_handler=l;this.timeout=m;this.connection_retries=n;}f.exports=h;},null);
__d('MercuryServerSendMessageQueueSimulatedError',['AsyncRequest','AsyncResponse'],function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();var h=9999,i={create:function(j){var k=new (c('AsyncRequest'))(this.endpoint_uri).setData({message_batch:[j],client:this.client}),l=new (c('AsyncResponse'))(k,{});Object.assign(l,{error:h,silentError:false,transientError:true,request:k});return l;}};f.exports=i;},null);
__d("XMessagingSendController",["XController"],function a(b,c,d,e,f,g){c.__markCompiled&&c.__markCompiled();f.exports=c("XController").create("\/messaging\/send\/",{});},null);
__d('MercuryServerSendMessageQueue',['BanzaiODS','LogHistory','MercuryConfig','MercuryLoggingHelper','MercuryServerRequestsConfig','MercuryServerDispatcher','MercuryServerSendMessageQueueSimulatedError','XMessagingSendController'],function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();var h='/ajax/mercury/send_messages.php',i=c('LogHistory').getInstance('mercury_server_send_message_queue');function j(k,l,m,n){'use strict';this.sender_id=k;this.queue_id=l;this.$MercuryServerSendMessageQueue1=m.success_handler;this.$MercuryServerSendMessageQueue2=m.error_handler;this.$MercuryServerSendMessageQueue3=m.transport_error_handler;this.$MercuryServerSendMessageQueue4=m.timeout_handler;this.client=n;var o=null;if(c('MercuryServerRequestsConfig').msgrRegion)o={name:'X-MSGR-Region',value:c('MercuryServerRequestsConfig').msgrRegion};var p=c('MercuryConfig').MercuryUseXController?c('XMessagingSendController').getURIBuilder().getURI().toString():h,q={};q[p]={request_user_id:this.sender_id,endpoint_id:this.queue_id,mode:c('MercuryServerDispatcher').IMMEDIATE,customHeader:o,handler:this.handleSuccess.bind(this),error_handler:this.handleError.bind(this),transport_error_handler:this.handleTransportError.bind(this),timeout:m.timeout,timeout_handler:this.handleTimeout.bind(this),connection_retries:m.connection_retries};c('MercuryServerDispatcher').registerEndpoints(q);this.pending_message=null;this.queue=[];}j.prototype.enqueue=function(k){'use strict';this.queue.push(k);this.$MercuryServerSendMessageQueue5();};j.prototype.$MercuryServerSendMessageQueue5=function(){'use strict';if(this.pending_message||!this.queue.length){if(this.pending_message)this.$MercuryServerSendMessageQueue6();return;}this.pending_message=this.queue.shift();var k=c('MercuryConfig').MercuryUseXController?c('XMessagingSendController').getURIBuilder().getURI().toString():h,l=c('MercuryConfig').MercuryUseXController?babelHelpers['extends']({},this.pending_message,{client:this.client}):{message_batch:[this.pending_message],client:this.client};c('MercuryServerDispatcher').trySend(k,l,null,this.sender_id,this.queue_id);};j.prototype.$MercuryServerSendMessageQueue7=function(){'use strict';while(this.queue.length)this.$MercuryServerSendMessageQueue8(this.queue.shift());};j.prototype.$MercuryServerSendMessageQueue8=function(k){'use strict';this.$MercuryServerSendMessageQueue2(c('MercuryServerSendMessageQueueSimulatedError').create(k));i.error('mark_as_failed',JSON.stringify({fbid:this.sender_id,queue_id:this.queue_id,message:c('MercuryLoggingHelper').obfuscateMessage(k)}));};j.prototype.handleSuccess=function(k,l){'use strict';this.$MercuryServerSendMessageQueue1(k,l);this.pending_message=null;this.$MercuryServerSendMessageQueue5();};j.prototype.handleError=function(k){'use strict';this.$MercuryServerSendMessageQueue2(k);this.$MercuryServerSendMessageQueue7();this.pending_message=null;};j.prototype.handleTransportError=function(k){'use strict';this.$MercuryServerSendMessageQueue3(k);this.$MercuryServerSendMessageQueue7();this.pending_message=null;};j.prototype.handleTimeout=function(k){'use strict';this.$MercuryServerSendMessageQueue4(k);this.$MercuryServerSendMessageQueue7();this.pending_message=null;};j.prototype.$MercuryServerSendMessageQueue6=function(){'use strict';i.debug('maybe_send_next_pending_message',JSON.stringify({fbid:this.sender_id,queue_id:this.queue_id,pending_message:c('MercuryLoggingHelper').obfuscateMessage(this.pending_message),queue:this.queue.map(function(l){return c('MercuryLoggingHelper').obfuscateMessage(l);})}));var k='send_queue.delayed.queue_length.'+this.queue.length.toString();c('BanzaiODS').bumpEntityKey('chat.web',k);};f.exports=j;},null);
__d('MercuryServerSendMessageQueueRouter',['BanzaiODS','LogHistory','Map','MercuryServerSendMessageQueue','MercurySingletonMixin'],function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();var h=c('LogHistory').getInstance('mercury_server_send_message_queue_router'),i='chat.web.send_queue_router';c('BanzaiODS').setEntitySample(i,.1);function j(k){'use strict';this.fbid=k;this.queues=new (c('Map'))();}j.prototype.enqueue=function(k,l,m,n){'use strict';if(!this.queues.has(k)){this.queues.set(k,new (c('MercuryServerSendMessageQueue'))(this.fbid,k,l,m));h.debug('added queue',JSON.stringify({fbid:this.fbid,queue_id:k}));c('BanzaiODS').bumpEntityKey(i,'new_queue');}this.queues.get(k).enqueue(n);};Object.assign(j,c('MercurySingletonMixin'));f.exports=j;},null);
__d('MercuryServerRequests',['errorCode','invariant','Arbiter','AsyncResponse','BanzaiODS','ChannelConstants','CurrentUser','LogHistory','MercuryActionStatus','MercuryActionType','MercuryAPIArgsSource','MercuryAssert','MercuryDispatcher','MercuryThreadIDMap','MercuryErrorType','MercuryGlobalActionType','MercuryIDs','MercuryLogMessageType','MercuryMessageClientState','MercuryPayloadSource','MercurySendErrorLogger','MercuryServerPayloadPreprocessor','MercuryServerRequestsConfig','MercuryServerSendMessageQueueRouter','MercuryServerRequestSingletonMixin','MercurySourceType','MercuryThreadlistConstants','MercuryMessageIDs','MessagingConfig','MessagingTag','MercuryServerDispatcher','MercuryServerSendMessageQueueOptions','createObjectFrom','setTimeoutAcrossTransitions'],function a(b,c,d,e,f,g,h,i){'use strict';if(c.__markCompiled)c.__markCompiled();var j=c('LogHistory').getInstance('mercury_server'),k=c('MercuryAPIArgsSource').MERCURY,l=1000;function m(w){return w.getError()?'_'+w.getError():'';}function n(w,x){var y=babelHelpers['extends']({},w),z;if(x.threads){if(!y.threads)y.threads={};for(z in x.threads)y.threads[z]=Object.keys(c('createObjectFrom')((y.threads[z]||[]).concat(x.threads[z])));}if(x.messages){if(!y.messages)y.messages={};for(z in x.messages){if(!y.messages[z])y.messages[z]={};for(var aa in x.messages[z])if(y.messages[z][aa]){y.messages[z][aa]=r(y.messages[z][aa],x.messages[z][aa]);}else y.messages[z][aa]=x.messages[z][aa];}}y.client=w.client||x.client;return y;}function o(w,x){var y=Object.assign(c('createObjectFrom')(w.folders,true),c('createObjectFrom')(x.folders,true)),z=w.client||x.client;return {folders:Object.keys(y),client:z};}function p(w,x){for(var y in x)if(w[y]&&typeof w[y]==='object'){w[y]=r(w[y],x[y]);}else if(x[y]&&typeof x[y]==='object'){var z={};Object.assign(z,x[y]);w[y]=z;}return w;}function q(w,x){return x;}function r(w,x){var y=w.offset<x.offset?w.offset:x.offset,z=w.offset+w.limit,aa=x.offset+x.limit,ba=z>aa?z:aa,ca=ba-y,da=w.timestamp>x.timestamp?w.timestamp:x.timestamp;return {offset:y,limit:ca,timestamp:da};}function s(w,x){var y=w.client||x.client,z={ids:{},client:y};Object.assign(z.ids,w.ids,x.ids);return z;}function t(w,x){var y={},z,aa=w.client||x.client;delete w.client;delete x.client;for(z in w)Object.assign(y,c('createObjectFrom')(w[z],z));for(z in x)Object.assign(y,c('createObjectFrom')(x[z],z));var ba={client:aa};for(var ca in y){z=y[ca];if(!ba[z])ba[z]=[];ba[z].push(ca);}return ba;}function u(w,x){var y=w.client||x.client,z=c('createObjectFrom')(w.ids,true),aa=c('createObjectFrom')(x.ids,true),ba=Object.assign(z,aa);return {ids:Object.keys(ba),client:y};}function v(w){this._fbid=w;this._lastActionTimestamp=0;this._fetchingThreads={};this._sentMessagesTimestamp={};this.__threadIDMap=c('MercuryThreadIDMap').getForFBID(this._fbid);this._dispatcher=c('MercuryDispatcher').getForFBID(this._fbid);this._payloadPreprocessor=c('MercuryServerPayloadPreprocessor').getForFBID(this._fbid);this._sendMessageQueueOptions=new (c('MercuryServerSendMessageQueueOptions'))(function(x,y){return this.__handleUpdate(x,y);}.bind(this),function(x){return this._handleSendMessageError(x);}.bind(this),function(x){return this._handleSendMessageTransportError(x);}.bind(this),function(x){return this._handleSendMessageTimeout(x);}.bind(this),c('MercuryServerRequestsConfig').sendMessageTimeout,c('MessagingConfig').SEND_CONNECTION_RETRIES);this._registerEndpoints();}Object.assign(v.prototype,{fetchThreadlistInfo:function(w,x,y,z,aa){y=y||c('MessagingTag').INBOX;aa=aa||k;var ba=z?c('MercuryServerDispatcher').IMMEDIATE:null,ca={client:aa};ca[y]={offset:w,limit:x,filter:z};this.__sendRequest('/ajax/mercury/threadlist_info.php',ca,ba);},fetchPinnedThreads:function(){this.__sendRequest('/mercury/pinned_threads/',{});},fetchUnseenThreadIDs:function(w,x){x=x||k;this.fetchThreadlistInfo(c('MercuryThreadlistConstants').RECENT_THREAD_OFFSET,c('MercuryThreadlistConstants').JEWEL_THREAD_COUNT,w,null,x);},fetchUnreadThreadIDs:function(w,x){x=x||k;this.__sendRequest('/ajax/mercury/unread_threads.php',{folders:[w],client:x});},fetchMissedMessages:function(w,x,y){x=x||k;var z={last_action_timestamp:y||this._lastActionTimestamp,folders:w,client:x};setTimeout(function(){this.__sendRequest('/ajax/mercury/thread_sync.php',z);}.bind(this),l);},fetchThreadData:function(w,x){x=x||k;c('MercuryAssert').allThreadID(w);var y={threads:{},client:x},z=[],aa=[];w.forEach(function(ca){if(this._fetchingThreads[ca])return;this._fetchingThreads[ca]=true;var da=this.__threadIDMap.getServerIDFromClientIDNow(ca),ea=c('MercuryIDs').tokenize(ca);if(ea.type=='user'){z.push(ea.value);y.threads.user_ids=z;}else if(ea.type=='thread'){if(da){aa.push(da);}else aa.push(ea.value);y.threads.thread_fbids=aa;}else if(ea.type=='root'){if(da){aa.push(da);y.threads.thread_fbids=aa;}}else if(ea.type!='pending')throw new Error('Unknown thread type',ea);}.bind(this));this._dispatcher.inform("fetch-thread-data",y);for(var ba in y.threads){this.__sendRequest('/ajax/mercury/thread_info.php',y);break;}},ensureThreadIsFetched:function(w,x){x=x||k;if(!this.__threadIDMap.getClientIDFromServerIDNow(w)&&!this._fetchingThreads[w]){this._fetchingThreads[w]=true;this.__sendRequest('/ajax/mercury/thread_info.php',{threads:{thread_fbids:[w]},client:x});}},fetchThreadMessages:function(w,x,y,z,aa,ba){c('MercuryAssert').isThreadID(w);ba=ba||k;var ca,da,ea=c('MercuryIDs').tokenize(w),fa=this.__threadIDMap.getServerIDFromClientIDNow(w),ga=false;if(fa){ca=fa;da=ea.type=='user'?'user_ids':'thread_fbids';}else{ca=ea.value;switch(ea.type){case 'user':da='user_ids';ga=true;break;case 'thread':da='thread_fbids';break;}}var ha={messages:{},threads:{},client:ba};if(da){ha.messages[da]={};ha.messages[da][ca]={offset:x,timestamp:z,limit:y};if(ga)ha.threads[da]=[ca];this.__sendRequest('/ajax/mercury/thread_info.php',ha,aa);}else this.__threadIDMap.getServerIDFromClientID(w,function(ia){ha.messages.thread_fbids={};ha.messages.thread_fbids[ia]={offset:x,timestamp:z,limit:y};this.__sendRequest('/ajax/mercury/thread_info.php',ha,aa);}.bind(this));},handleThreadInfoError:function(w){var x=w.getRequest().getData(),y=[];if(x.messages){for(var z in x.messages.thread_fbids)y.push(this._createServerErrorLogMessage(this.__threadIDMap.getClientIDFromServerIDNow(z)));for(var aa in x.messages.user_ids)y.push(this._createServerErrorLogMessage('user:'+aa));for(var ba in x.messages.group_ids)y.push(this._createServerErrorLogMessage('group:'+ba));}if(y.length)this._dispatcher.handleUpdate({actions:y,from_client:true,payload_source:c('MercuryPayloadSource').CLIENT_CHANNEL_MESSAGE});if(x.threads&&(x.threads.user_ids||x.threads.group_ids||x.threads.thread_ids)){var ca=5,da=true;if(!x.retry_count){x.retry_count=0;if(x.messages)delete x.messages;}else if(x.retry_count>=ca){da=false;(x.threads.thread_ids||[]).forEach(function(fa){if(fa in this._fetchingThreads)delete this._fetchingThreads[fa];}.bind(this));}if(da){var ea=Math.pow(2,x.retry_count)*1000;c('setTimeoutAcrossTransitions')(function(){j.log('retry_thread','{}');this.__sendRequest('/ajax/mercury/thread_info.php',x);}.bind(this),ea);x.retry_count++;}}},markFolderAsRead:function(w){this.__sendRequest('/ajax/mercury/mark_folder_as_read.php',{folder:w});var x=[{action_type:c('MercuryGlobalActionType').MARK_ALL_READ,folder:w}];this._dispatcher.handleUpdate({global_actions:x,from_client:true,payload_source:c('MercuryPayloadSource').CLIENT_CHANGE_READ_STATUS});},changeThreadReadStatus:function(w,x,y,z,aa,ba){var ca;c('MercuryAssert').isThreadID(w);this.__threadIDMap.getServerIDFromClientID(w,function(da){var ea={ids:(ca={},ca[da]=x,ca),source:y,watermarkTimestamp:z,titanOriginatedThreadId:aa,shouldSendReadReceipt:ba};this.__sendRequest('/ajax/mercury/change_read_status.php',ea);}.bind(this));},changeThreadArchivedStatus:function(w,x,y){c('MercuryAssert').isThreadID(w);this.__threadIDMap.getServerIDFromClientID(w,function(z){var aa={ids:{},source:y};aa.ids[z]=x;this.__sendRequest('/ajax/mercury/change_archived_status.php',aa);}.bind(this));},changeThreadFolder:function(w,x){c('MercuryAssert').isThreadID(w);this.__threadIDMap.getServerIDFromClientID(w,function(y){var z={};z[x]=[y];this.__sendRequest('/ajax/mercury/move_thread.php',z);}.bind(this));},changeMutingOnThread:function(w,x){c('MercuryAssert').isThreadID(w);this.__threadIDMap.getServerIDFromClientID(w,function(y){this.__sendRequest('/ajax/mercury/change_mute_thread.php',{thread_fbid:y,mute_settings:x,payload_source:k});}.bind(this));},markThreadSpam:function(w,x){c('MercuryAssert').isThreadID(w);this.__threadIDMap.getServerIDFromClientID(w,function(y){this.__sendRequest('/ajax/mercury/mark_spam.php',{id:y,source:x});}.bind(this));},unmarkThreadSpam:function(w,x){c('MercuryAssert').isThreadID(w);this.__threadIDMap.getServerIDFromClientID(w,function(y){this.__sendRequest('/ajax/mercury/unmark_spam.php',{id:y,source:x});}.bind(this));},deleteThread:function(w,x){c('MercuryAssert').isThreadID(w);this.__threadIDMap.getServerIDFromClientID(w,function(y){var z={ids:[y],source:x};this.__sendRequest('/ajax/mercury/delete_thread.php',z);}.bind(this));},unpinThread:function(w){c('MercuryAssert').isThreadID(w);this.__threadIDMap.getServerIDFromClientID(w,function(x){this.__sendRequest('/mercury/unpin_thread/',{id:x});}.bind(this));},deleteMessages:function(w,x){c('MercuryMessageIDs').getServerIDs(x||[],function(y){this.__sendRequest('/ajax/mercury/delete_messages.php',{message_ids:y});}.bind(this));},sendDeliveryReceipts:function(w,x){c('MercuryMessageIDs').getServerIDs(w||[],function(y){this.__sendRequest('/ajax/mercury/delivery_receipts.php',{message_ids:y,thread_ids:x});}.bind(this));},sendNewMessage:function(w,x){x=x||k;if(!w.offline_threading_id)c('BanzaiODS').bumpEntityKey('chat.web','missing_otid_on_send');if(w.client_state&&w.client_state!==c('MercuryMessageClientState').SEND_TO_SERVER)return;var y=c('MercuryIDs').tokenize(w.thread_id),z=y.type,aa=babelHelpers['extends']({},w);aa.thread_id=null;if(z=='user'){aa.other_user_fbid=y.value;this._sendNewMessageToServer(aa,x);}else if(z=='thread'){aa.thread_fbid=y.value;this._sendNewMessageToServer(aa,x);}else if(z=='root'&&y.value==aa.offline_threading_id){aa.client_thread_id=w.thread_id;this._sendNewMessageToServer(aa,x);}else{!c('MercuryIDs').isLocalThread(w.thread_id)?i(0):void 0;this.__threadIDMap.getServerIDFromClientID(w.thread_id,function(ba){aa.thread_fbid=ba;this._sendNewMessageToServer(aa,x);}.bind(this));}},_sendNewMessageToServer:function(w,x){c('Arbiter').inform(c('ChannelConstants').ATTEMPT_RECONNECT);this._sentMessagesTimestamp[w.message_id]=Date.now();c('MercuryServerSendMessageQueueRouter').getForFBID(this._fbid).enqueue(w.other_user_fbid||w.thread_fbid||w.client_thread_id,this._sendMessageQueueOptions,x,w);},markSeen:function(){var w=this._lastActionTimestamp;this.__sendRequest('/ajax/mercury/mark_seen.php',{seen_timestamp:w});},_handleSendMessageErrorCommon:function(w,x,y,z){j.debug('handle_send_message_error_common',JSON.stringify({reliability_error_status:y,request_error_status:x}));var aa=w.getData(),ba=aa.message_batch||[aa],ca=ba.map(function(ea){var fa={action_type:c('MercuryActionType').SEND_MESSAGE,other_user_fbid:ea.other_user_fbid,thread_fbid:ea.thread_fbid,client_message_id:ea.message_id,message_id:ea.message_id,client_thread_id:ea.client_thread_id,status:x,error_data:z};return fa;});ca.forEach(function(ea){if(ea.action_type===c('MercuryActionType').SEND_MESSAGE&&ea.status===c('MercuryActionStatus').ERROR)c('MercurySendErrorLogger').log(ea);},this);var da={actions:ca,payload_source:c('MercuryPayloadSource').CLIENT_HANDLE_ERROR};this._payloadPreprocessor.handleUpdate(da);},handleSendMessageError:function(w){var x=w.getPayload(),y=null,z=null;if(x&&x.error_payload){y=c('MercuryActionStatus').UNCONFIRMED;z='send_error';}else{y=c('MercuryActionStatus').ERROR;z='request_error'+m(w);}var aa=w.error;if(aa===1404102)c('AsyncResponse').verboseErrorHandler(w);var ba=/<.*>/.test(w.getErrorDescription())?w.getErrorSummary():w.getErrorDescription();this._handleSendMessageErrorCommon(w.getRequest(),y,z,{type:c('MercuryErrorType').SERVER,code:w.getError(),description:ba,is_transient:w.isTransient()});},handleSendMessageTransportError:function(w){this._handleSendMessageErrorCommon(w.getRequest(),c('MercuryActionStatus').ERROR,'transport_error'+m(w),{type:c('MercuryErrorType').TRANSPORT,code:w.getError(),is_transient:true});},handleSendMessageTimeout:function(w){this._handleSendMessageErrorCommon(w,c('MercuryActionStatus').ERROR,'transport_timeout',{type:c('MercuryErrorType').TIMEOUT,is_transient:true});},getLastActionTimestamp:function(){return this._lastActionTimestamp;},updateLastActionTimestamp:function(w){if(w)this._lastActionTimestamp=Math.max(this._lastActionTimestamp,w);},markThreadFetched:function(w){delete this._fetchingThreads[w];},_createServerErrorLogMessage:function(w){return {action_type:c('MercuryActionType').LOG_MESSAGE,thread_id:w,message_id:w,timestamp:Date.now(),timestamp_absolute:'',timestamp_relative:'',is_unread:false,source:c('MercurySourceType').UNKNOWN,log_message_body:'',log_message_type:c('MercuryLogMessageType').SERVER_ERROR,log_message_data:{}};},_getForAsyncRequest:function(w){var x=w.getData(),y=x.request_user_id?x.request_user_id:c('CurrentUser').getID();return v.getForFBID(y);},__handleUpdate:function(w,x){this._getForAsyncRequest(x)._payloadPreprocessor.handleUpdate(w);},_handleThreadInfoError:function(w){var x=this._getForAsyncRequest(w.getRequest());x.handleThreadInfoError(w);},_handleSendMessageError:function(w){var x=this._getForAsyncRequest(w.getRequest());x.handleSendMessageError(w);},_handleSendMessageTransportError:function(w){var x=this._getForAsyncRequest(w.getRequest());x.handleSendMessageTransportError(w);},_handleSendMessageTimeout:function(w){var x=this._getForAsyncRequest(w);x.handleSendMessageTimeout(w);},_registerEndpoints:function(){var w=null;if(c('MercuryServerRequestsConfig').msgrRegion)w={name:'X-MSGR-Region',value:c('MercuryServerRequestsConfig').msgrRegion};var x={'/ajax/mercury/thread_sync.php':{request_user_id:this._fbid,mode:c('MercuryServerDispatcher').IDEMPOTENT,customHeader:w,handler:function(y,z){return this.__handleUpdate(y,z);}.bind(this),connection_retries:3},'/ajax/mercury/thread_info.php':{request_user_id:this._fbid,mode:c('MercuryServerDispatcher').BATCH_DEFERRED_MULTI,customHeader:w,batch_function:n,handler:function(y,z){return this.__handleUpdate(y,z);}.bind(this),error_handler:function(y){return this._handleThreadInfoError(y);}.bind(this)},'/ajax/mercury/mark_folder_as_read.php':{request_user_id:this._fbid,mode:c('MercuryServerDispatcher').IMMEDIATE,customHeader:w,handler:function(y,z){return this.__handleUpdate(y,z);}.bind(this)},'/ajax/mercury/change_read_status.php':{request_user_id:this._fbid,mode:c('MercuryServerDispatcher').IMMEDIATE,customHeader:w,handler:function(y,z){return this.__handleUpdate(y,z);}.bind(this)},'/ajax/mercury/mark_seen.php':{request_user_id:this._fbid,mode:c('MercuryServerDispatcher').BATCH_SUCCESSIVE,customHeader:w,batch_function:q,handler:function(y,z){return this.__handleUpdate(y,z);}.bind(this)},'/ajax/mercury/threadlist_info.php':{request_user_id:this._fbid,mode:c('MercuryServerDispatcher').BATCH_SUCCESSIVE_UNIQUE,customHeader:w,batch_function:p,handler:function(y,z){return this.__handleUpdate(y,z);}.bind(this)},'/ajax/mercury/mark_spam.php':{request_user_id:this._fbid,mode:c('MercuryServerDispatcher').IMMEDIATE,customHeader:w,handler:function(y,z){return this.__handleUpdate(y,z);}.bind(this)},'/ajax/mercury/unmark_spam.php':{request_user_id:this._fbid,mode:c('MercuryServerDispatcher').IMMEDIATE,customHeader:w,handler:function(y,z){return this.__handleUpdate(y,z);}.bind(this)},'/ajax/mercury/unread_threads.php':{request_user_id:this._fbid,mode:c('MercuryServerDispatcher').BATCH_SUCCESSIVE_UNIQUE,customHeader:w,batch_function:o,handler:function(y,z){return this.__handleUpdate(y,z);}.bind(this)},'/ajax/chat/settings.php':{request_user_id:this._fbid,mode:c('MercuryServerDispatcher').IMMEDIATE,customHeader:w},'/ajax/mercury/change_archived_status.php':{request_user_id:this._fbid,mode:c('MercuryServerDispatcher').BATCH_SUCCESSIVE,customHeader:w,batch_function:s,handler:function(y,z){return this.__handleUpdate(y,z);}.bind(this)},'/ajax/mercury/delete_thread.php':{request_user_id:this._fbid,mode:c('MercuryServerDispatcher').BATCH_SUCCESSIVE,customHeader:w,batch_function:u,handler:function(y,z){return this.__handleUpdate(y,z);}.bind(this)},'/ajax/mercury/delete_messages.php':{request_user_id:this._fbid,mode:c('MercuryServerDispatcher').IMMEDIATE,customHeader:w,handler:function(y,z){return this.__handleUpdate(y,z);}.bind(this)},'/ajax/mercury/delivery_receipts.php':{request_user_id:this._fbid,mode:c('MercuryServerDispatcher').IMMEDIATE,customHeader:w,handler:function(y,z){return this.__handleUpdate(y,z);}.bind(this)},'/ajax/mercury/move_thread.php':{request_user_id:this._fbid,mode:c('MercuryServerDispatcher').BATCH_SUCCESSIVE,customHeader:w,batch_function:t,handler:function(y,z){return this.__handleUpdate(y,z);}.bind(this)},'/ajax/mercury/change_mute_thread.php':{request_user_id:this._fbid,mode:c('MercuryServerDispatcher').IMMEDIATE,customHeader:w,handler:function(y,z){return this.__handleUpdate(y,z);}.bind(this)},'/mercury/pinned_threads/':{request_user_id:this._fbid,mode:c('MercuryServerDispatcher').BATCH_SUCCESSIVE_UNIQUE,customHeader:w,handler:function(y,z){return this.__handleUpdate(y,z);}.bind(this)},'/mercury/unpin_thread/':{request_user_id:this._fbid,mode:c('MercuryServerDispatcher').IMMEDIATE,customHeader:w,handler:function(y,z){return this.__handleUpdate(y,z);}.bind(this)}};c('MercuryServerDispatcher').registerEndpoints(x);},__sendRequest:function(w,x,y){c('MercuryServerDispatcher').trySend(w,x,y,this._fbid);}});Object.assign(v,c('MercuryServerRequestSingletonMixin'));f.exports=v;},null);
__d('MercuryThreadIDMap',['KeyedCallbackManager','MercuryAssert','MercuryIDs','MercurySingletonProvider'],function a(b,c,d,e,f,g){'use strict';if(c.__markCompiled)c.__markCompiled();function h(j){this.$MercuryThreadIDMap1=j;this.$MercuryThreadIDMap2=new (c('KeyedCallbackManager'))();this.$MercuryThreadIDMap3=new (c('KeyedCallbackManager'))();}h.getForFBID=function(j){return i.getForFBID(j);};h.get=function(){return i.get();};h.prototype.setServerIDToClientID=function(j,k){var l=this.getClientIDFromServerIDNow(j);if(l){l!==k;return;}this.forceSetServerIDToClientID(j,k);};h.prototype.forceSetServerIDToClientID=function(j,k){this.$MercuryThreadIDMap2.setResource(j,k);this.$MercuryThreadIDMap3.setResource(k,j);};h.prototype.setDeprecatedServerIDToClientID=function(j,k){if(j)this.$MercuryThreadIDMap2.setResource(j,k);};h.prototype.getClientIDFromServerIDNow=function(j){return this.$MercuryThreadIDMap2.getResource(j);};h.prototype.getClientIDFromServerID=function(j,k){this.$MercuryThreadIDMap2.executeOrEnqueue(j,k);e(['MercuryServerRequests'],function(l){l.getForFBID(this.$MercuryThreadIDMap1).ensureThreadIsFetched(j);}.bind(this));};h.prototype.getServerIDFromClientIDNow=function(j){return this.$MercuryThreadIDMap3.getResource(j);};h.prototype.getServerIDFromClientID=function(j,k){c('MercuryAssert').isThreadID(j);var l=this.$MercuryThreadIDMap3.executeOrEnqueue(j,k);e(['MercuryServerRequests'],function(m){var n=this.$MercuryThreadIDMap3.getUnavailableResources(l),o=c('MercuryIDs').tokenize(j);if(n.length&&o.type!='root')m.getForFBID(this.$MercuryThreadIDMap1).fetchThreadData(n);}.bind(this));};h.prototype.hasClientIDForServerID=function(j){return !!this.getClientIDFromServerIDNow(j);};h.prototype.convertThreadIDIfAvailable=function(j){var k=this.getClientIDFromServerIDNow(j);return k||j;};h.prototype.canLinkExternally=function(j){c('MercuryAssert').isThreadID(j);var k=c('MercuryIDs').tokenize(j);return k.type=='user'||!!this.getServerIDFromClientIDNow(j);};var i=new (c('MercurySingletonProvider'))(h);f.exports=h;},null);
__d('MercuryDisplayTimeFilterMessageRenderer',['fbt'],function a(b,c,d,e,f,g,h){'use strict';if(c.__markCompiled)c.__markCompiled();var i={renderFilteredContent:function(j){if(j.is_filtered_content_bh)return h._("This message was removed because it contains blocked or harmful links.");if(j.is_filtered_content_account)return h._("This message has been temporarily removed because the sender's account requires verification.");if(j.is_filtered_content_quasar)return h._("This message was removed because it contains blocked or harmful content.");if(j.is_filtered_content_invalid_app)return h._("This message was removed because the app it's being sent from is blocked from sending messages.");return h._("This message has been temporarily removed because the sender's account requires verification, or it was identified as abusive.");}};f.exports=i;},null);
__d('ImageSourceType',[],function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();var h={PROFILE_PICTURE:'profile_picture',IMAGE:'image'};f.exports=h;},null);
__d('ImageSourceRequest',['CurrentUser','ImageSourceType','KeyedCallbackManager','PhotoResizeModeConst','MercuryServerDispatcher','arrayContains'],function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();function h(){'use strict';this._request={fbid:null,type:null,width:null,height:null,resize_mode:null};this._callback=null;}h.prototype.setFBID=function(l){'use strict';this._request.fbid=l;return this;};h.prototype.setType=function(l){'use strict';if(!c('arrayContains')([c('ImageSourceType').PROFILE_PICTURE,c('ImageSourceType').IMAGE],l))throw new TypeError('ImageSourceRequest.setType: invalid type '+l);this._request.type=l;return this;};h.prototype.setDimensions=function(l,m){'use strict';this._request.width=l;this._request.height=m;return this;};h.prototype.setResizeMode=function(l){'use strict';if(!c('arrayContains')([c('PhotoResizeModeConst').COVER,c('PhotoResizeModeConst').CONTAIN],l))throw new TypeError('ImageSourceRequest.setResizeMode: invalid resize mode '+l);this._request.resize_mode=l;return this;};h.prototype.setCallback=function(l){'use strict';this._callback=l;return this;};h.prototype.send=function(){'use strict';if(!this._request.fbid||!this._request.width||!this._request.height||!this._request.type||!this._request.resize_mode||!this._callback)throw new Error('ImageSourceRequest: You must set all the fields');var l=j(),m=k(this._request);l.executeOrEnqueue(m,this._callback);if(l.getUnavailableResourcesFromRequest(m).length===1){c('MercuryServerDispatcher').trySend('/ajax/image_source.php',{requests:[this._request]});return true;}return false;};var i=null;function j(){if(i)return i;var l=new (c('KeyedCallbackManager'))();i=l;c('MercuryServerDispatcher').registerEndpoints({'/ajax/image_source.php':{request_user_id:c('CurrentUser').getID(),mode:c('MercuryServerDispatcher').BATCH_DEFERRED_MULTI,batch_function:function(m,n){var o;(o=m.requests).push.apply(o,n.requests);return m;},handler:function(m,n){var o=n.getData().requests;for(var p=0;p<o.length;++p)l.setResource(k(o[p]),m[p]);}}});return l;}function k(l){return [l.fbid,l.type,l.width,l.height,l.resize_mode].join('|');}f.exports=h;},null);
__d('MercuryParticipantFetcher',['LogHistory','MercuryIDs','MercuryPayloadSource','MercuryServerPayloadPreprocessor','Set','ShortProfiles','setImmediate'],function a(b,c,d,e,f,g){'use strict';if(c.__markCompiled)c.__markCompiled();var h=c('LogHistory').getInstance('short_profiles');function i(k){this.$MercuryParticipantFetcher4=c('MercuryServerPayloadPreprocessor').getForFBID(k);this.$MercuryParticipantFetcher1=false;this.$MercuryParticipantFetcher2=new (c('Set'))();this.$MercuryParticipantFetcher3=new (c('Set'))();}i.prototype.fetch=function(k){this.$MercuryParticipantFetcher5(k);this.$MercuryParticipantFetcher6();};i.prototype.fetchMulti=function(k){k.forEach(function(l){return this.$MercuryParticipantFetcher5(l);}.bind(this));this.$MercuryParticipantFetcher6();};i.prototype.$MercuryParticipantFetcher5=function(k){if(!this.$MercuryParticipantFetcher3.has(k))this.$MercuryParticipantFetcher2.add(k);};i.prototype.$MercuryParticipantFetcher6=function(){if(this.$MercuryParticipantFetcher1||this.$MercuryParticipantFetcher2.size===0)return;this.$MercuryParticipantFetcher1=true;c('setImmediate')(function(){this.$MercuryParticipantFetcher1=false;this.$MercuryParticipantFetcher2.forEach(function(k){return this.$MercuryParticipantFetcher3.add(k);}.bind(this));this.$MercuryParticipantFetcher7(this.$MercuryParticipantFetcher2,function(k){k.forEach(function(l){return this.$MercuryParticipantFetcher3['delete'](l.id);}.bind(this));this.$MercuryParticipantFetcher8(k);}.bind(this));this.$MercuryParticipantFetcher2.clear();}.bind(this));};i.prototype.$MercuryParticipantFetcher7=function(k,l){var m=[];k.forEach(function(n){var o=c('MercuryIDs').tokenize(n),p=o.type,q=o.value;p==='fbid'&&m.push(q);});if(m.length>0){c('ShortProfiles').getMulti(m,function(n){var o=[];for(var p in n)o.push(j(n[p],p));l(o);if(o.length!==m.length)h.error('server_fetch_participant_count_error',JSON.stringify({expectedIDs:m,receivedIDs:Object.keys(n)}));});h.debug('client_fetch_participants',JSON.stringify({userIDs:m}));}};i.prototype.$MercuryParticipantFetcher8=function(k){this.$MercuryParticipantFetcher4.handleUpdate({participants:k,from_client:false,payload_source:c('MercuryPayloadSource').SERVER_FETCH_PARTICIPANTS});};function j(k,l){var m=babelHelpers['extends']({gender:k.gender,fbid:k.id||l,href:k.uri,id:c('MercuryIDs').getParticipantIDFromUserID(k.id||l),image_src:k.thumbSrc,name:k.name,short_name:k.firstName,employee:k.employee,is_employee_away:k.is_employee_away,type:k.type,vanity:k.vanity,is_friend:k.is_friend,is_messenger_user:k.is_messenger_user,social_snippets:k.social_snippets,is_anonymous_crisis_support:k.isAnonymousCrisisSupport},{});if(k.officeStatus){m.officeStatus=k.officeStatus;m.officeStatusStartDate=k.officeStatusStartDate;m.officeStatusEndDate=k.officeStatusEndDate;m.officeStatusComment=k.officeStatusComment;m.officeStatusLocation=k.officeStatusLocation;}return m;}f.exports=i;},null);
__d('MercuryVanityIDMap',['Map','MercuryAssert'],function a(b,c,d,e,f,g){'use strict';if(c.__markCompiled)c.__markCompiled();var h=new (c('Map'))(),i=new (c('Map'))(),j={getID:function(k){return h.get(k);},getVanity:function(k){return i.get(k);},hasID:function(k){return i.has(k);},hasVanity:function(k){return h.has(k);},set:function(k,l){c('MercuryAssert').isParticipantID(l);h.set(k,l);i.set(l,k);}};f.exports=j;},null);
__d('MercuryParticipants',['fbt','CurrentUser','EventEmitter','ImageSourceRequest','ImageSourceType','ImmutableObject','KeyedCallbackManager','MercuryAssert','MercuryIDs','MercuryParticipantFetcher','MercuryParticipantTypes','MercuryParticipantsConstants','MercuryDispatcher','MercuryVanityIDMap','PhotoResizeModeConst','Set','createObjectFrom'],function a(b,c,d,e,f,g,h){'use strict';if(c.__markCompiled)c.__markCompiled();var i='change';function j(l){this.$MercuryParticipants1=l;this.$MercuryParticipants2=new (c('EventEmitter'))();this.$MercuryParticipants3=new (c('KeyedCallbackManager'))();this.$MercuryParticipants4=new (c('MercuryParticipantFetcher'))(this.$MercuryParticipants1);this.$MercuryParticipants5=c('MercuryDispatcher').getForFBID(this.$MercuryParticipants1);this.$MercuryParticipants5.subscribe('update-participants',function(m,n){if(n.participants&&n.participants.length>0)this.$MercuryParticipants6(n.participants);}.bind(this));this.$MercuryParticipants5.subscribe('invalidate-global-state',function(){this.$MercuryParticipants7();}.bind(this));}j.prototype.addListener=function(l,m){return this.$MercuryParticipants2.addListener(l,m);};j.prototype.getIDFromVanityOrFBID=function(l){if(!l)return null;if(c('MercuryVanityIDMap').hasVanity(l))return c('MercuryVanityIDMap').getID(l);if(/^\d+$/.test(l))return c('MercuryIDs').getParticipantIDFromUserID(l);};j.prototype.getNow=function(l){return this.$MercuryParticipants8(l);};j.prototype.getOrFetch=function(l){var m=this.$MercuryParticipants8(l);if(!m)this.$MercuryParticipants4.fetch(l);return m;};j.prototype.get=function(l,m){c('MercuryAssert').isParticipantID(l);return this.$MercuryParticipants9([l],function(n){m(n[l]);});};j.prototype.getMulti=function(l,m){return this.$MercuryParticipants9(l,m);};j.prototype.getBigImageMulti=function(l,m){c('MercuryAssert').allParticipantIDs(l);var n=c('MercuryParticipantsConstants').BIG_IMAGE_SIZE;return this.$MercuryParticipants9(l,function(o){var p={},q=0,r=new (c('Set'))(),s=function(w,x){q++;p[w]=x;if(q===l.length){m(p);if(r.size>0)this.$MercuryParticipants10(r);}}.bind(this),t=function(w,x){this.$MercuryParticipants3.setResource(w,c('ImmutableObject').set(this.$MercuryParticipants3.getResource(w),{big_image_src:x.uri}));r.add(w);s(w,x.uri);}.bind(this);for(var u in o){var v=o[u];if(!v.big_image_src){new (c('ImageSourceRequest'))().setFBID(c('MercuryIDs').getUserIDFromParticipantID(u)).setType(c('ImageSourceType').PROFILE_PICTURE).setDimensions(n,n).setResizeMode(c('PhotoResizeModeConst').COVER).setCallback(t.bind(null,u)).send();}else s(v.id,v.big_image_src);}}.bind(this));};j.prototype.getOrderedBigImageMulti=function(l,m){return this.getBigImageMulti(l,function(n){m(l.map(function(o){return n[o];}));});};j.prototype.$MercuryParticipants9=function(l,m){c('MercuryAssert').allParticipantIDs(l);var n=this.$MercuryParticipants3.executeOrEnqueue(l,m),o=this.$MercuryParticipants3.getUnavailableResources(n).filter(function(p){var q=c('MercuryIDs').tokenize(p),r=q.type,s=q.value;if(r==='email'){this.$MercuryParticipants11(p,s);return false;}if(r==='name'){this.$MercuryParticipants12(p,s);return false;}return true;}.bind(this));this.$MercuryParticipants4.fetchMulti(o);return this.$MercuryParticipants13(n);};j.prototype.$MercuryParticipants8=function(l){var m=this.$MercuryParticipants3.getResource(l);if(!m){var n=c('MercuryIDs').tokenize(l),o=n.type,p=n.value;if(o==='email')m=this.$MercuryParticipants11(l,p);if(o==='name')m=this.$MercuryParticipants12(l,p);}return m;};j.prototype.$MercuryParticipants11=function(l,m){var n=new (c('ImmutableObject'))(k(l,m));this.$MercuryParticipants3.setResource(l,n);return n;};j.prototype.$MercuryParticipants12=function(l,m){var n=new (c('ImmutableObject'))({gender:c('MercuryParticipantsConstants').UNKNOWN_GENDER,href:null,id:l,image_src:c('MercuryParticipantsConstants').EMAIL_IMAGE,big_image_src:c('MercuryParticipantsConstants').EMAIL_IMAGE,name:m,short_name:m,employee:false});this.$MercuryParticipants3.setResource(l,n);return n;};j.prototype.$MercuryParticipants10=function(l){this.$MercuryParticipants2.emit(i,l);};j.prototype.$MercuryParticipants6=function(l){var m=l.map(function(n){return n.id;});l=l.map(function(n){if(n.vanity)c('MercuryVanityIDMap').set(n.vanity,n.id);var o=this.$MercuryParticipants3.getResource(n.id);return o?c('ImmutableObject').set(o,n):new (c('ImmutableObject'))(this.$MercuryParticipants14(n));}.bind(this));this.$MercuryParticipants3.addResourcesAndExecute(c('createObjectFrom')(m,l));this.$MercuryParticipants10(new (c('Set'))(m));};j.prototype.$MercuryParticipants14=function(l){var m=l.type===c('MercuryParticipantTypes').USER||l.type===c('MercuryParticipantTypes').FRIEND;if(!m)return l;if(!l.name&&!l.href&&!l.vanity){var n=h._("Facebook User");l.name=n;l.short_name=n;}return l;};j.prototype.$MercuryParticipants13=function(l){return {remove:function(){this.$MercuryParticipants3.unsubscribe(l);}.bind(this)};};j.prototype.$MercuryParticipants7=function(){this.$MercuryParticipants3=new (c('KeyedCallbackManager'))();};function k(l,m){return {gender:c('MercuryParticipantsConstants').UNKNOWN_GENDER,href:null,id:l,image_src:c('MercuryParticipantsConstants').EMAIL_IMAGE,big_image_src:c('MercuryParticipantsConstants').EMAIL_IMAGE,name:m,short_name:m,employee:false};}f.exports=new j(c('CurrentUser').getID());},null);
__d('MercurySyncFakeDFFSender',['Arbiter','ChannelConstants','MercurySingletonProvider','MercurySyncDeltaTypes'],function a(b,c,d,e,f,g){'use strict';if(c.__markCompiled)c.__markCompiled();var h=c('ChannelConstants').getArbiterType(c('ChannelConstants').FAKE_DFF);i.getForFBID=function(k){return j.getForFBID(k);};i.get=function(){return j.get();};function i(k){this.$MercurySyncFakeDFFSender1=k;}i.prototype.sendGlobalDFF=function(){c('Arbiter').inform(h,{obj:{delta:{'class':c('MercurySyncDeltaTypes').ForcedFetch},queue:this.$MercurySyncFakeDFFSender1}});};i.prototype.sendThreadDFF=function(k,l){c('Arbiter').inform(h,{obj:{delta:{'class':c('MercurySyncDeltaTypes').ForcedFetch,threadKey:{otherUserFbId:k,threadFbId:l}},queue:this.$MercurySyncFakeDFFSender1}});};var j=new (c('MercurySingletonProvider'))(i);f.exports=i;},null);
__d('MercuryThreadInfo',['CurrentUser','MercuryIDs'],function a(b,c,d,e,f,g){'use strict';if(c.__markCompiled)c.__markCompiled();var h={canReply:function(j){return !!(j.is_subscribed&&(j.can_reply===undefined||j.can_reply)&&!j.has_email_participant&&!j.read_only&&(j.recipients_loadable||j.recipients_loadable===undefined));},getMuteSetting:function(j){return (j.mute_settings&&j.mute_settings[i(c('CurrentUser').getID())]);},isEmptyLocalThread:function(j){return (c('MercuryIDs').tokenize(j.thread_id).type==='root'&&!j.timestamp);},isMuted:function(j){return h.getMuteSetting(j)!==undefined;},isNewEmptyLocalThread:function(j){return !!(h.isEmptyLocalThread(j)&&j.participants&&j.participants.length===0);},showComposer:function(j){return !!(j.is_subscribed&&(j.composer_enabled===undefined||j.composer_enabled)&&!j.has_email_participant&&!j.read_only&&(j.recipients_loadable||j.recipients_loadable===undefined));}};function i(j){return j+'@facebook.com';}f.exports=h;},null);
__d('MessagingGiftWrapConstants',[],function a(b,c,d,e,f,g){'use strict';if(c.__markCompiled)c.__markCompiled();var h='gift_wrap',i='gift_unwrapped',j='valentines2016';f.exports={TAG_PREFIX:h,UNWRAPPED_TAG:i,VALENTINES_GIFT:j};},null);
__d('MessagingGiftWrapChecker',['MercuryConfig','MercuryTagHelper','MessagingGiftWrapConstants'],function a(b,c,d,e,f,g){'use strict';if(c.__markCompiled)c.__markCompiled();var h={shouldRenderWithGiftWrap:function(k){return !!(c('MercuryConfig').GiftWrapViewerGK&&k.tags&&i(k.tags)&&!j(k.tags));}};function i(k){return c('MercuryTagHelper').get(k,c('MessagingGiftWrapConstants').TAG_PREFIX)===c('MessagingGiftWrapConstants').VALENTINES_GIFT;}function j(k){return !!c('MercuryTagHelper').get(k,c('MessagingGiftWrapConstants').UNWRAPPED_TAG);}f.exports=h;},null);
__d('MercuryThreads',['invariant','EventEmitter','MercuryDisplayTimeFilterMessageRenderer','ImmutableObject','KeyedCallbackManager','LogHistory','Map','MercuryAPIArgsSource','MercuryActionType','MercuryAssert','MercuryAttachment','MercuryConfig','MercuryDispatcher','MercuryFolders','MercuryGiftSnippetRenderer','MercuryGlobalActionType','MercuryIDs','MercuryLogMessageType','MercuryLoggingHelper','MercuryParticipants','MercuryPayloadSource','MercuryServerRequests','MercurySingletonProvider','MercurySyncFakeDFFSender','MercuryThreadInfo','MercuryThreadInformer','MessagingGenericAdminTextType','MessagingGiftWrapChecker','MessagingTag','Set','emptyFunction','ifRequired','requireWeak','setImmediate'],function a(b,c,d,e,f,g,h){'use strict';if(c.__markCompiled)c.__markCompiled();var i=new (c('EventEmitter'))(),j=c('LogHistory').getInstance('mercury_threads');function k(m){this.$MercuryThreads1=m;this.$MercuryThreads2=c('MercuryServerRequests').getForFBID(this.$MercuryThreads1);this.$MercuryThreads3=c('MercuryThreadInformer').getForFBID(this.$MercuryThreads1);this.$MercuryThreads4=c('MercuryIDs').getParticipantIDFromUserID(this.$MercuryThreads1);this.$MercuryThreads5=c('MercuryDispatcher').getForFBID(this.$MercuryThreads1);this.$MercuryThreads6=c('MercurySyncFakeDFFSender').getForFBID(this.$MercuryThreads1);this.$MercuryThreads7=false;this.$MercuryThreads8=new (c('KeyedCallbackManager'))();this.$MercuryThreads9=new (c('Set'))();this.$MercuryThreads10=false;this.$MercuryThreads11=new (c('Set'))();this.$MercuryThreads12=new (c('Set'))();this.$MercuryThreads13();}k.getForFBID=function(m){return l.getForFBID(m);};k.get=function(){return l.get();};k.prototype.getThreadMetaNow=function(m){c('MercuryAssert').isThreadID(m);return this.$MercuryThreads8.getResource(m);};k.prototype.getOrFetch=function(m){var n=this.getThreadMetaNow(m);if(!n&&!this.$MercuryThreads12.has(m))this.$MercuryThreads11.add(m);if(this.$MercuryThreads11.size>0&&!this.$MercuryThreads10)this.$MercuryThreads14();return n;};k.prototype.$MercuryThreads14=function(){if(this.$MercuryThreads10)return;this.$MercuryThreads10=true;c('setImmediate')(function(){this.$MercuryThreads10=false;this.$MercuryThreads11.forEach(function(m){return this.$MercuryThreads12.add(m);}.bind(this));this.getMultiThreadMeta(Array.from(this.$MercuryThreads11),function(m){for(var n in m)m.hasOwnProperty(n)&&this.$MercuryThreads12['delete'](n);}.bind(this));this.$MercuryThreads11.clear();}.bind(this));};k.prototype.getThreadMeta=function(m,n,o){return this.getMultiThreadMeta([m],function(p){return n(p[m]);},o);};k.prototype.getMultiThreadMeta=function(m,n,o){c('MercuryAssert').allThreadID(m);var p=this.$MercuryThreads8.executeOrEnqueue(m,n),q=this.$MercuryThreads8.getUnavailableResources(p);if(q.length){var r=[];for(var s=0;s<q.length;s++){var t=q[s],u=c('MercuryIDs').tokenize(t),v=u.type,w=u.value;if(v=='user'){var x=c('MercuryIDs').getParticipantIDFromUserID(w);this.createNewLocalThread(t,x===this.$MercuryThreads4?[this.$MercuryThreads4]:[this.$MercuryThreads4,x]);}else r.push(t);}if(r.length)this.$MercuryThreads2.fetchThreadData(r,o);}return p;};k.addListener=function(m,n){return i.addListener(m,n);};k.prototype.unsubscribe=function(m){this.$MercuryThreads8.unsubscribe(m);};k.prototype.getCanonicalThreadToParticipant=function(m,n,o,p){var q=c('MercuryIDs').getThreadIDFromParticipantID(m);!!!q?h(0):void 0;var r=this.$MercuryThreads8.getResource(q);if(typeof r=='undefined'){r=this.createNewLocalThread(q,this.$MercuryThreads4===m?[this.$MercuryThreads4]:[this.$MercuryThreads4,m],n);!p&&this.$MercuryThreads2.fetchThreadData([q],o);}return r;};k.prototype.createNewLocalThread=function(m,n,o){var p=this.$MercuryThreads8.getResource(m);if(!p){var q=c('MercuryIDs').tokenize(m),r=q.type,s=q.value;p=new (c('ImmutableObject'))({thread_id:m,participants:Array.from(n),name:'',snippet:'',snippet_has_attachment:false,snippet_sender:null,unread_count:o?o:0,message_count:0,image_src:null,timestamp_absolute:null,timestamp_relative:null,timestamp:null,other_user_fbid:r==='user'?s:null,is_canonical_user:r=='user',is_canonical:this.$MercuryThreads15(n),is_subscribed:true,folder:c('MessagingTag').INBOX,is_archived:false});this.$MercuryThreads8.setResource(m,p);}return p;};k.prototype.isEmptyLocalThread=function(m){var n=this.$MercuryThreads8.getResource(m);if(!n)return false;return c('MercuryThreadInfo').isEmptyLocalThread(n);};k.prototype.isNewEmptyLocalThread=function(m){var n=this.$MercuryThreads8.getResource(m);if(!n)return false;return c('MercuryThreadInfo').isNewEmptyLocalThread(n);};k.prototype.$MercuryThreads16=function(m,n){if(!m||!m.length)return;var o=new (c('Map'))(),p=new (c('Map'))(),q=new (c('Map'))(),r=[];for(var s=0;s<m.length;s++){var t=m[s];if(t.is_forward)continue;var u=t.action_type;if(u==c('MercuryActionType').LOG_MESSAGE&&t.log_message_type==c('MercuryLogMessageType').SERVER_ERROR)continue;var v=!!(t.sync_id||t.is_from_iris),w=t.thread_id;c('MercuryAssert').isThreadID(w);var x=this.$MercuryThreads8.getResource(w);if(!x&&!v&&u==c('MercuryActionType').USER_GENERATED_MESSAGE){x=this.$MercuryThreads17(t);if(x.participants){this.$MercuryThreads8.setResource(w,x);}else j.debug('missing_local_participants',JSON.stringify(t));}if(!x)continue;if(u==c('MercuryActionType').LOG_MESSAGE||u==c('MercuryActionType').USER_GENERATED_MESSAGE)v=!n;if(x.server_timestamp&&t.timestamp<=x.server_timestamp&&v)continue;if(!q.has(w))q.set(w,babelHelpers['extends']({},x));this.$MercuryThreads18(q.get(w),t,n);if(u==c('MercuryActionType').USER_GENERATED_MESSAGE)o.set(w,t);if(u==c('MercuryActionType').USER_GENERATED_MESSAGE||u==c('MercuryActionType').LOG_MESSAGE)if(t&&t.timestamp&&(!p.has(w)||t.timestamp>p.get(w).timestamp))p.set(w,t);}q.forEach(function(y,z){var aa=p.get(z),ba=o.get(z);if(ba){this.$MercuryThreads19(y,ba);}else if(aa&&aa.log_message_body){var ca=babelHelpers['extends']({},aa,{body:aa.log_message_body});this.$MercuryThreads19(y,ca);}var da=y.timestamp;if(aa){if(aa.timestamp>da)Object.assign(y,{timestamp_absolute:aa.timestamp_absolute,timestamp_relative:aa.timestamp_relative,timestamp:aa.timestamp});var ea=y.server_timestamp;if(!n&&aa.timestamp>ea)y.server_timestamp=aa.timestamp;}var fa=new (c('ImmutableObject'))(y);this.$MercuryThreads8.setResource(z,fa);r.push(c('MercuryLoggingHelper').obfuscateThread(fa));}.bind(this),this);r.length&&this.$MercuryThreads7&&j.debug('threads_updated',JSON.stringify({threads:r}));};k.prototype.$MercuryThreads18=function(m,n,o){var p=n.action_type;if(p==c('MercuryActionType').USER_GENERATED_MESSAGE||p==c('MercuryActionType').LOG_MESSAGE){n.is_unread&&m.unread_count++;m.message_count++;m.is_archived=false;}switch(p){case c('MercuryActionType').DELETE_THREAD:m.message_count=0;this.$MercuryThreads20(n.thread_id);break;case c('MercuryActionType').USER_GENERATED_MESSAGE:if(m.unread_count===0&&n.author===this.$MercuryThreads4&&n.timestamp>=m.last_read_timestamp)m.last_read_timestamp=n.timestamp;if(n.offline_threading_id!==n.message_id)m.last_message_timestamp=n.timestamp;this.$MercuryThreads21(m,n.author);break;case c('MercuryActionType').SEND_MESSAGE:var q=n.log_message_type;if(q==c('MercuryLogMessageType').THREAD_IMAGE){m.image_src=n.log_message_data.image?n.log_message_data.image.preview_url:null;this.$MercuryThreads22(n.thread_id);}if(q!==c('MercuryLogMessageType').SUBSCRIBE&&q!==c('MercuryLogMessageType').UNSUBSCRIBE)m.snippet_attachments=n.attachments;break;case c('MercuryActionType').LOG_MESSAGE:var q=n.log_message_type;if(q==c('MercuryLogMessageType').SUBSCRIBE){this.$MercuryThreads23(m,n.log_message_data.added_participants);this.$MercuryThreads22(n.thread_id);}else if(q==c('MercuryLogMessageType').UNSUBSCRIBE){this.$MercuryThreads24(m,n.log_message_data.removed_participants);this.$MercuryThreads22(n.thread_id);}else if(q==c('MercuryLogMessageType').THREAD_IMAGE){if(!o)m.image_src=n.log_message_data.image?n.log_message_data.image.preview_url:null;}else if(q==c('MercuryLogMessageType').THREAD_NAME){if(m.name!==n.log_message_data.name)this.$MercuryThreads22(n.thread_id);m.name=n.log_message_data.name;}else if(q===c('MercuryLogMessageType').GENERIC_ADMIN_TEXT)this.$MercuryThreads25(m,n);break;case c('MercuryActionType').CHANGE_READ_STATUS:var r=this.$MercuryThreads26(m,n,n.mark_as_read);if(r)m.last_read_timestamp=m.last_message_timestamp;var s=!m.read_only&&m.folder===c('MessagingTag').INBOX;if(r&&o)this.$MercuryThreads2.changeThreadReadStatus(m.thread_id,n.mark_as_read,n.source,m.last_read_timestamp,m.titan_originated_thread_id,s);break;case c('MercuryActionType').CHANGE_ARCHIVED_STATUS:if(m.is_archived!=n.archived){m.is_archived=n.archived;this.$MercuryThreads22(n.thread_id);}break;case c('MercuryActionType').CHANGE_FOLDER:if(m.folder!=n.new_folder){m.folder=n.new_folder;this.$MercuryThreads22(n.thread_id);}break;case c('MercuryActionType').DELETE_MESSAGES:if(o){m.snippet='...';m.snippet_has_attachment=false;m.snippet_attachments=null;m.snippet_sender=null;this.$MercuryThreads22(n.thread_id);}else if(n.message_ids){m.message_count-=n.message_ids.length;c('ifRequired')('MercuryMessages',function(v){v=v.getForFBID(this.$MercuryThreads1);for(var w=n.message_ids,x=Array.isArray(w),y=0,w=x?w:w[typeof Symbol==='function'?Symbol.iterator:'@@iterator']();;){var z;if(x){if(y>=w.length)break;z=w[y++];}else{y=w.next();if(y.done)break;z=y.value;}var aa=z,ba=v.getMessagesFromIDs([aa]),ca=ba[0];if(ca&&ca.timestamp>m.last_read_timestamp)m.unread_count=Math.max(0,m.unread_count-1);}this.$MercuryThreads22(n.thread_id);}.bind(this),c('emptyFunction'));}break;case c('MercuryActionType').UPDATE_SNIPPET:c('ifRequired')('MercuryMessages',function(v){v=v.getForFBID(this.$MercuryThreads1);var w=0,x=1,y=v.getThreadMessagesRangeNow(n.thread_id,w,x),z=y[0];if(z){m.snippet=z.body;m.snippet_has_attachment=z.has_attachment;m.snippet_attachments=z.attachments;m.snippet_sender=z.author;}else{m.snippet='...';m.snippet_has_attachment=false;m.snippet_attachments=null;m.snippet_sender=null;v.getThreadMessagesRange(n.thread_id,w,x,function(aa){if(aa.length)this.$MercuryThreads5.handleUpdate({from_client:true,actions:[{thread_id:n.thread_id,action_type:c('MercuryActionType').UPDATE_SNIPPET,deleted_ids:n.deleted_ids}]});}.bind(this));}this.$MercuryThreads22(n.thread_id);}.bind(this),c('emptyFunction'));break;case c('MercuryActionType').UPDATE_BLOCKER_STATUS:m.can_reply=!!(!n.message_blocked&&(n.is_blocked_by_recipient===undefined||!n.is_blocked_by_recipient)&&m.is_subscribed&&!m.has_email_participant&&!m.read_only&&(m.recipients_loadable||m.recipients_loadable===undefined));this.$MercuryThreads22(n.thread_id);break;case c('MercuryActionType').UPDATE_BLOCKEE_STATUS:m.can_reply=!!(!n.got_blocked&&m.is_subscribed&&!m.has_email_participant&&!m.read_only&&(m.recipients_loadable||m.recipients_loadable===undefined));this.$MercuryThreads22(n.thread_id);break;case c('MercuryActionType').CHANGE_MUTE_SETTINGS:if(n.mute_settings!==undefined){var t=this.$MercuryThreads1+'@facebook.com';if(m.mute_settings){if(n.mute_settings){var u={};u[t]=n.mute_settings;m.mute_settings=babelHelpers['extends']({},m.mute_settings,u);}else{m.mute_settings=babelHelpers['extends']({},m.mute_settings);delete m.mute_settings[t];}this.$MercuryThreads22(m.thread_id);}}break;case c('MercuryActionType').ADD_PARTICIPANTS:this.$MercuryThreads23(m,n.participants);this.$MercuryThreads22(m.thread_id);break;case c('MercuryActionType').CHANGE_FLAG:this.$MercuryThreads27(m,n.mark_as_flag);this.$MercuryThreads22(m.thread_id);break;case c('MercuryActionType').MOVE_PENDING_TO_INBOX:this.$MercuryThreads28(m);this.$MercuryThreads22(m.thread_id);break;case c('MercuryActionType').UPDATE_CUSTOM_LIKE:m.custom_like_icon=n.custom_like;this.$MercuryThreads22(m.thread_id);break;case c('MercuryActionType').ADD_GROUP_ADMINS:m.admin_ids=m.admin_ids.concat(n.added_admin_ids.filter(function(v){return m.admin_ids.indexOf(v)===-1;}));this.$MercuryThreads22(n.thread_id);break;case c('MercuryActionType').REMOVE_GROUP_ADMINS:m.admin_ids=m.admin_ids.filter(function(v){return n.removed_admin_ids.indexOf(v)===-1;});this.$MercuryThreads22(n.thread_id);break;}};k.prototype.$MercuryThreads25=function(m,n){if(n.log_message_data&&n.log_message_data.untypedData){var o=n.log_message_data.untypedData;switch(n.log_message_data.message_type){case c('MessagingGenericAdminTextType').THREAD_EPHEMERAL_SEND_MODE:var p=parseInt(o.ttl,10);if(p!==null&&m.ephemeral_ttl_mode!==p){m.ephemeral_ttl_mode=p;this.$MercuryThreads22(n.thread_id);}break;case c('MessagingGenericAdminTextType').CHANGE_THREAD_NICKNAME:var q={};for(var r in m.custom_nickname){if(r==o.participant_id&&o.nickname.trim().length==0)continue;q[r]=m.custom_nickname[r];}if(o.nickname.trim().length>0)q[o.participant_id]=o.nickname;m.custom_nickname=q;this.$MercuryThreads22(n.thread_id);break;case c('MessagingGenericAdminTextType').CHANGE_THREAD_ICON:c('requireWeak')('MercuryThreadActions',function(t){t.getForFBID(this.$MercuryThreads1).updateCustomLike(n.thread_id,o.thread_icon);}.bind(this));break;case c('MessagingGenericAdminTextType').CHANGE_THREAD_THEME:var s=o.theme_color;if(s.length>0){m.custom_color='#'.concat(s.substring(2));}else m.custom_color=null;this.$MercuryThreads22(n.thread_id);break;}}};k.prototype.$MercuryThreads17=function(m){var n=c('MercuryIDs').tokenize(m.thread_id),o=n.type,p=n.value,q=m.specific_to_list&&this.$MercuryThreads15(m.specific_to_list);return new (c('ImmutableObject'))({thread_id:m.thread_id,participants:m.specific_to_list,name:null,snippet:m.body,snippet_has_attachment:false,snippet_attachments:[],snippet_sender:m.author,unread_count:0,message_count:0,image_src:null,timestamp_absolute:m.timestamp_absolute,timestamp_relative:m.timestamp_relative,timestamp:m.timestamp,other_user_fbid:o==='user'?p:null,is_canonical_user:o==='user',is_canonical:q,is_subscribed:true,folder:c('MessagingTag').INBOX,is_archived:false});};k.prototype.$MercuryThreads26=function(m,n,o){if(n.timestamp)this.$MercuryThreads29(m.thread_id,o,n.timestamp);if(!m||!m.thread_id)return false;if(!m.timestamp){this.$MercuryThreads9.add(m.thread_id);return false;}var p=!m.unread_count;if(o==p)return false;m.unread_count=o?0:1;this.$MercuryThreads22(m.thread_id);return true;};k.prototype.$MercuryThreads30=function(m){var n=this.$MercuryThreads8.getAllResources();for(var o in n)if(n.hasOwnProperty(o)){var p=n[o];if(p.folder==m){this.$MercuryThreads8.setResource(o,c('ImmutableObject').setProperty(p,'unread_count',0));this.$MercuryThreads22(o);}}};k.prototype.$MercuryThreads23=function(m,n){var o=new (c('Set'))(m.participants);m.participants=Array.from(m.participants);n.forEach(function(p){if(!o.has(p)){m.participants.push(p);if(p===this.$MercuryThreads4){m.is_subscribed=true;m.can_reply=true;m.composer_enabled=true;if(c('MercuryConfig').WWWSyncThreadDFFOnViewerAdd){this.$MercuryThreads6.sendThreadDFF(undefined,m.thread_fbid);}else this.$MercuryThreads2.fetchMissedMessages(c('MercuryFolders').getSupportedFolders(),c('MercuryAPIArgsSource').MERCURYSYNC,m.last_message_timestamp);}}}.bind(this));};k.prototype.$MercuryThreads24=function(m,n){var o=new (c('Set'))(n);m.participants=m.participants.filter(function(p){return !o.has(p);});m.admin_ids=m.participants.filter(function(p){return !o.has(p);});if(o.has(this.$MercuryThreads4))m.is_subscribed=false;this.$MercuryThreads2.fetchThreadData([m.thread_id]);};k.prototype.$MercuryThreads21=function(m,n){if(!m.participants){var o=JSON.stringify({thread_info:m,participant:n});j.debug('missing_participants',o);return;}var p=m.participants.indexOf(n);if(p>0)m.participants=[n].concat(m.participants.slice(0,p),m.participants.slice(p+1));};k.prototype.$MercuryThreads19=function(m,n){var o=n.body,p=n.subject,q='';if(p){p=p.toLowerCase();if(o.slice(0,p.length).toLowerCase()==p){q=o;}else if(o){q=p+' \u00B7 '+o;}else q=p;}else q=o;if(n.is_filtered_content)q=c('MercuryDisplayTimeFilterMessageRenderer').renderFilteredContent(n);if(c('MessagingGiftWrapChecker').shouldRenderWithGiftWrap(n)){var r=n.author,s=r==this.$MercuryThreads4,t=null;if(!s){t=m.custom_nickname&&m.custom_nickname[c('MercuryIDs').getUserIDFromParticipantID(r)];if(!t){var u=c('MercuryParticipants').getNow(r);if(u!=null)t=u.short_name;}}q=c('MercuryGiftSnippetRenderer').renderText(s,t);}m.snippet=q;m.snippet_has_attachment=n.has_attachment;if(n.raw_attachments&&n.raw_attachments.length>0){var v=c('MercuryAttachment').convertRaw(n.raw_attachments);m.snippet_attachments=v;}else m.snippet_attachments=n.attachments;if(n.log_message_type){m.snippet_sender=null;}else m.snippet_sender=n.author;};k.prototype.$MercuryThreads27=function(m,n){m.page_thread_info=babelHelpers['extends']({},m.page_thread_info,{flagged:n});};k.prototype.$MercuryThreads28=function(m){if(m.folder!==c('MessagingTag').PENDING)return;m.folder=c('MessagingTag').INBOX;};k.prototype.$MercuryThreads15=function(m){return m.filter(function(n){return n!=this.$MercuryThreads4;}.bind(this)).length<=1;};k.prototype.$MercuryThreads13=function(){this.$MercuryThreads5.subscribe('invalidate-thread-state',function(m,n){return this.$MercuryThreads31(n);}.bind(this));this.$MercuryThreads5.subscribe('invalidate-global-state',function(m,n){return this.$MercuryThreads32();}.bind(this));this.$MercuryThreads5.subscribe('update-threads',function(m,n){var o=(n.actions||[]).filter(function(p){return p.thread_id;});if(n.threads&&n.payload_source==c('MercuryPayloadSource').SERVER_FETCH_THREAD_INFO)n.threads.forEach(function(p){var q=p.thread_id;if(this.$MercuryThreads9.has(q)){this.$MercuryThreads9['delete'](q);if(p.unread_count)this.$MercuryThreads2.changeThreadReadStatus(p.thread_id,true);}}.bind(this));this.$MercuryThreads33(n.threads);this.$MercuryThreads16(o,n.from_client);n.threads&&n.threads.forEach(function(p){this.$MercuryThreads22(p.thread_id);}.bind(this));if(n.global_actions)n.global_actions.forEach(function(p){if(p.action_type==c('MercuryGlobalActionType').MARK_ALL_READ)this.$MercuryThreads30(p.folder);}.bind(this));if(this.$MercuryThreads7){this.$MercuryThreads7=false;i.emit('change');}}.bind(this));};k.prototype.$MercuryThreads33=function(m){if(!m||!m.length)return;var n={},o=[];m.forEach(function(p){var q=new (c('ImmutableObject'))(p);n[p.thread_id]=q;o.push(c('MercuryLoggingHelper').obfuscateThread(q));});o.length&&j.debug('threads_added',JSON.stringify({threads:o}));this.$MercuryThreads8.addResourcesAndExecute(n);};k.prototype.$MercuryThreads22=function(m){this.$MercuryThreads7=true;this.$MercuryThreads3.updatedThread(m);};k.prototype.$MercuryThreads20=function(m){this.$MercuryThreads7=true;this.$MercuryThreads3.deletedThread(m);};k.prototype.$MercuryThreads29=function(m,n,o){this.$MercuryThreads7=true;this.$MercuryThreads3.changedThreadReadState(m,n,o);};k.prototype.$MercuryThreads31=function(m){this.$MercuryThreads8.setResource(m,undefined);};k.prototype.$MercuryThreads32=function(){this.$MercuryThreads7=false;this.$MercuryThreads8=new (c('KeyedCallbackManager'))();this.$MercuryThreads9=new (c('Set'))();this.$MercuryThreads10=false;this.$MercuryThreads11=new (c('Set'))();this.$MercuryThreads12=new (c('Set'))();};var l=new (c('MercurySingletonProvider'))(k);f.exports=k;},null);
__d('MercuryUnreadState',['MercuryFolders','LogHistory','KeyedCallbackManager','MercuryActionType','MercuryDispatcher','MercuryGlobalActionType','MercurySingletonMixin','MercuryThreadlistConstants','MercuryThreadIDMap','MessagingTag','MercuryServerRequests','MercuryThreadInformer','MercuryThreads','arrayContains','createObjectFrom'],function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();var h=(c('MercuryFolders').getSupportedFolders()||[]).filter(function(z){return z!=c('MessagingTag').ACTION_ARCHIVED;}),i='unread_thread_hash',j='unseen_thread_list',k=c('MercuryThreadlistConstants').MAX_UNREAD_COUNT,l=c('LogHistory').getInstance('mercury_unread_state');function m(z){this._fbid=z;this._serverRequests=c('MercuryServerRequests').getForFBID(this._fbid);this._threadIDMap=c('MercuryThreadIDMap').getForFBID(this._fbid);this._threadInformer=c('MercuryThreadInformer').getForFBID(this._fbid);this._threads=c('MercuryThreads').getForFBID(this._fbid);this._dispatcher=c('MercuryDispatcher').getForFBID(this._fbid);this._allReadTimestamp={};this._threadReadTimestamp={};this._initialUnreadCount={};this._maxCount={};this._unreadResources={};h.forEach(function(aa){this._initialUnreadCount[aa]=0;this._maxCount[aa]=false;this._unreadResources[aa]=new (c('KeyedCallbackManager'))();}.bind(this));this._dispatcher.subscribe('update-unread',function(aa,ba){r(this,ba);var ca=ba.global_actions||[];for(var da=0;da<ca.length;da++){var ea=ca[da];if(ea.action_type==c('MercuryGlobalActionType').MARK_ALL_READ)u(this,ea.folder,ea.timestamp);}}.bind(this));this._dispatcher.subscribe('update-thread-ids',function(aa,ba){w(this,ba);}.bind(this));}Object.assign(m.prototype,{getUnreadCount:function(z){if(this.exceedsMaxCount(z)){l.error('unguarded_unread_count_fetch','{}');return 0;}return q(this,z);},exceedsMaxCount:function(z){return this._maxCount[z]||q(this,z)>k;},markFolderAsRead:function(z){if(this._maxCount[z]||q(this,z)>0)this._serverRequests.markFolderAsRead(z);},getIsThreadUnread:function(z,aa){var ba=aa||c('MessagingTag').INBOX,ca=p(this,ba);return ca&&ca[z];}});Object.assign(m,c('MercurySingletonMixin'));function n(z,aa,ba){z._unreadResources[aa].setResource(i,ba);z._unreadResources[aa].setResource(j,Object.keys(ba));}function o(z,aa,ba){var ca=z._unreadResources[aa].executeOrEnqueue(i,ba),da=z._unreadResources[aa].getUnavailableResources(ca);if(da.length)z._serverRequests.fetchUnreadThreadIDs(aa);}function p(z,aa){return z._unreadResources[aa].getResource(i);}function q(z,aa){var ba=z._unreadResources[aa].getResource(j);if(ba){return ba.length;}else return z._initialUnreadCount[aa];}function r(z,aa){var ba;(aa.unread_thread_fbids||[]).forEach(function(ca){ba=ca.folder;if(!y(ba))return;var da=ca.thread_fbids||[];da=da.concat(ca.other_user_fbids||[]);var ea=v(z,da);n(z,ba,c('createObjectFrom')(ea,true));if(ea.length>k)z._maxCount[ba]=true;z._threadInformer.updatedUnreadState();});(aa.message_counts||[]).forEach(function(ca){if(ca.unread_count===undefined)return;ba=ca.folder;if(ca.unread_count>k){z._maxCount[ba]=true;n(z,ba,{});z._threadInformer.updatedUnreadState();}else{z._initialUnreadCount[ba]=ca.unread_count;if(z._initialUnreadCount[ba]===0)n(z,ba,{});z._threadInformer.updatedUnreadState();}});(aa.actions||[]).forEach(function(ca){if(ca.is_forward)return;var da=c('MercuryActionType'),ea=ca.other_user_fbid?ca.other_user_fbid:ca.thread_fbid,fa=ca.thread_id?ca.thread_id:ea;if(ca.action_type==da.DELETE_THREAD){h.forEach(function(ha){t(z,ha,fa);});}else if(ca.action_type==da.CHANGE_ARCHIVED_STATUS||ca.action_type==da.CHANGE_FOLDER){var ga=z._threads.getThreadMetaNow(ca.thread_id);ba=c('MercuryFolders').getFromMeta(ga);if(y(ba)&&ga.unread_count>0)s(z,ba,fa);h.forEach(function(ha){if(ha!=ba)t(z,ha,fa);});}else{ba=x(z,ca);if(!y(ba))return;if(ca.action_type==da.CHANGE_READ_STATUS){if(ca.mark_as_read){t(z,ba,fa,ca.timestamp);}else s(z,ba,fa,ca.timestamp);}else if(ca.action_type==da.USER_GENERATED_MESSAGE||ca.action_type==da.LOG_MESSAGE)if(ca.is_unread)s(z,ba,fa,ca.timestamp);}});}function s(z,aa,ba,ca){if(z._maxCount[aa])return;o(z,aa,function(da){var ea=z._allReadTimestamp[aa]||0,fa=z._threadReadTimestamp[ba]||0,ga=ca||Number.POSITIVE_INFINITY;if(ga>=ea&&ga>=fa&&!da[ba]){da[ba]=ca||0;n(z,aa,da);z._threadInformer.updatedUnreadState();}});}function t(z,aa,ba,ca){if(z._maxCount[aa])return;o(z,aa,function(da){if(ca){var ea=z._threadReadTimestamp[ba];if(!ea||ea<ca)z._threadReadTimestamp[ba]=ca;}var fa=da[ba];if(ca&&typeof fa=='number'&&ca<fa)return;if(ba in da){delete da[ba];n(z,aa,da);z._threadInformer.updatedUnreadState();}});}function u(z,aa,ba){z._maxCount[aa]=false;n(z,aa,{});z._allReadTimestamp[aa]=Math.max(z._allReadTimestamp[aa]||0,ba||0);z._threadInformer.updatedUnreadState();}function v(z,aa){return aa.map(z._threadIDMap.convertThreadIDIfAvailable,z._threadIDMap);}function w(z,aa){h.forEach(function(ba){var ca=p(z,ba);if(!ca)return;for(var da in aa){var ea=aa[da];if(ca[da]){ca[ea]=ca[da];delete ca[da];}}n(z,ba,ca);});}function x(z,aa){var ba=aa.thread_id?z._threads.getThreadMetaNow(aa.thread_id):null;return ba?c('MercuryFolders').getFromMeta(ba):aa.folder;}function y(z){return c('arrayContains')(h,z);}f.exports=m;},null);
__d('MercuryLeftNav',['Arbiter','MercuryThreadInformer','MercuryUnreadState','MessagingTag','NavigationMessage'],function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();var h=c('MercuryThreadInformer').get(),i=c('MercuryUnreadState').get(),j=false;function k(){var m=i.getUnreadCount(c('MessagingTag').INBOX);c('Arbiter').inform(c('NavigationMessage').NAVIGATION_COUNT_UPDATE,{key:'inbox',hide:true});c('Arbiter').inform(c('NavigationMessage').NAVIGATION_COUNT_UPDATE,{key:'inbox',count:m});}var l={bootstrap:function(){if(j)return;h.subscribe('unread-updated',k);j=true;}};f.exports=l;},null);