;/*FB_PKG_DELIM*/

__d("LSAddParticipantIdToGroupThread",["LSComputeParticipantCapabilities"],(function(a,b,c,d,e,f){function a(){var a=arguments,c=a[a.length-1],d=[],e=[];return c.sequence([function(e){return c.sequence([function(e){return c.storedProcedure(b("LSComputeParticipantCapabilities"),a[1],a[0]).then(function(a){return a=a,d[0]=a[0],a})},function(b){return c.filter(c.db.table(14).fetch([[[a[0],a[1]]]]),function(b){return c.i64.eq(b.threadKey,a[0])&&c.i64.eq(c.i64.cast([0,0]),c.i64.cast([0,0]))&&c.i64.eq(b.contactId,a[1])&&c.i64.gt(b.authorityLevel,a[9])}).next().then(function(b){var e=b.done;b.value;return e?c.db.table(14).put({threadKey:a[0],contactId:a[1],readWatermarkTimestampMs:a[2],readActionTimestampMs:a[3],deliveredWatermarkTimestampMs:a[4],nickname:a[5],normalizedSearchTerms:a[10],isAdmin:a[6],isSuperAdmin:a[13],subscribeSource:a[7],authorityLevel:a[9],participantCapabilities:d[0],groupParticipantJoinState:a[11],isModerator:a[12],threadRoles:a[14]}):0})}])},function(a){return c.resolve(e)}])}a.__sproc_name__="LSMailboxAddParticipantIdToGroupThreadStoredProcedure";a.__tables__=["participants"];e.exports=a}),null);
__d("LSClearPinnedMessages",[],(function(a,b,c,d,e,f){function a(){var a=arguments,b=a[a.length-1],c=[];return b.sequence([function(c){return b.forEach(b.db.table(205).fetch([[[a[0]]]]),function(a){return a["delete"]()})},function(a){return b.resolve(c)}])}a.__sproc_name__="LSMailboxClearPinnedMessagesStoredProcedure";a.__tables__=["msg_pinned_messages_v2"];e.exports=a}),null);
__d("LSDeleteBanner",[],(function(a,b,c,d,e,f){function a(){var a=arguments,b=a[a.length-1],c=[];return b.sequence([function(c){return b.forEach(b.filter(b.db.table(118).fetch([[[a[1],a[0]]]]),function(c){return b.i64.eq(c.threadKey,a[1])&&b.i64.eq(b.i64.cast([0,0]),b.i64.cast([0,0]))&&b.i64.eq(c.bannerId,a[0])}),function(a){return a["delete"]()})},function(a){return b.resolve(c)}])}a.__sproc_name__="LSInThreadBannerDeleteBannerStoredProcedure";a.__tables__=["in_thread_banner"];e.exports=a}),null);
__d("LSDeleteExistingMessageRanges",[],(function(a,b,c,d,e,f){function a(){var a=arguments,b=a[a.length-1],c=[];return b.sequence([function(c){return b.forEach(b.db.table(13).fetch([[[a[0]]]]),function(a){return a["delete"]()})},function(a){return b.resolve(c)}])}a.__sproc_name__="LSMailboxDeleteExistingMessageRangesStoredProcedure";a.__tables__=["messages_ranges_v2__generated"];e.exports=a}),null);
__d("LSShimHybridThreadDeleteByThreadKey.nop",["asyncToGeneratorRuntime"],(function(a,b,c,d,e,f){"use strict";a=function(){var a=b("asyncToGeneratorRuntime").asyncToGenerator(function*(a,b,c){});function c(b,c,d){return a.apply(this,arguments)}return c}();a.__nop_name__="LSShimHybridThreadDeleteByThreadKey";f["default"]=a}),66);
__d("LSHybridThreadDelete",["LSShimHybridThreadDeleteByThreadKey.nop"],(function(a,b,c,d,e,f){function a(){var a=arguments,c=a[a.length-1],d=[];return c.sequence([function(d){return c.nativeOperation(b("LSShimHybridThreadDeleteByThreadKey.nop"),a[0])},function(a){return c.resolve(d)}])}a.__sproc_name__="LSE2EEMessagingMetadataMailboxHybridThreadDeleteStoredProcedure";a.__tables__=[];e.exports=a}),null);
__d("LSInsertAttachmentCta",[],(function(a,b,c,d,e,f){function a(){var a=arguments,b=a[a.length-1],c=[];return b.sequence([function(c){return b.db.table(19).add({ctaId:a[0],attachmentFbid:a[1],attachmentIndex:a[2],threadKey:a[3],messageId:a[5],title:a[6],type_:a[7],platformToken:a[8],actionUrl:a[9],nativeUrl:a[10],urlWebviewType:a[11],actionContentBlob:a[12],enableExtensions:a[13],extensionHeightType:a[14],targetId:a[15]})},function(a){return b.resolve(c)}])}a.__sproc_name__="LSMailboxInsertAttachmentCtaStoredProcedure";a.__tables__=["attachment_ctas"];e.exports=a}),null);
__d("LSInsertBlobAttachment",[],(function(a,b,c,d,e,f){function a(){var a=arguments,b=a[a.length-1],c=[];return b.sequence([function(c){return b.sequence([function(c){return b.forEach(b.filter(b.db.table(16).fetch([[[a[27],a[32],a[34]]]]),function(c){return b.i64.eq(c.threadKey,a[27])&&b.i64.eq(b.i64.cast([0,0]),a[28])&&c.messageId===a[32]&&c.attachmentFbid===a[34]&&b.i64.lt(c.authorityLevel,a[48])&&(b.i64.eq(c.attachmentType,b.i64.cast([0,2]))||b.i64.eq(c.attachmentType,b.i64.cast([0,3]))||b.i64.eq(c.attachmentType,b.i64.cast([0,4]))||b.i64.eq(c.attachmentType,b.i64.cast([0,5]))||b.i64.eq(c.attachmentType,b.i64.cast([0,6]))||b.i64.eq(c.attachmentType,b.i64.cast([0,10]))||b.i64.eq(c.attachmentType,b.i64.cast([0,14]))||b.i64.eq(c.attachmentType,b.i64.cast([0,15])))&&b.i64.eq(c.ephemeralMediaState,void 0)&&c.isSharable===!1}),function(a){return a["delete"]()})},function(c){return b.db.table(16).add({threadKey:a[27],messageId:a[32],attachmentFbid:a[34],filename:a[0],filesize:a[1],hasMedia:a[2],isSharable:!1,playableUrl:a[3],playableUrlFallback:a[4],playableUrlExpirationTimestampMs:a[5],playableUrlMimeType:a[6],dashManifest:a[7],previewUrl:a[8],previewUrlFallback:a[9],previewUrlExpirationTimestampMs:a[10],previewUrlMimeType:a[11],miniPreview:a[13],previewWidth:a[14],previewHeight:a[15],attributionAppId:a[16],attributionAppName:a[17],attributionAppIcon:a[18],attributionAppIconFallback:a[19],attributionAppIconUrlExpirationTimestampMs:a[20],localPlayableUrl:a[21],playableDurationMs:a[22],attachmentIndex:a[23],accessibilitySummaryText:a[24],isPreviewImage:a[25],originalFileHash:a[26],attachmentType:a[29],timestampMs:a[31],offlineAttachmentId:a[33],hasXma:a[35],xmaLayoutType:a[36],xmasTemplateType:a[37],titleText:a[38],subtitleText:a[39],descriptionText:a[40],sourceText:a[41],faviconUrlExpirationTimestampMs:a[42],isBorderless:a[44],previewUrlLarge:a[45],samplingFrequencyHz:a[46],waveformData:a[47],authorityLevel:a[48]})}])},function(a){return b.resolve(c)}])}a.__sproc_name__="LSMailboxInsertBlobAttachmentStoredProcedure";a.__tables__=["attachments"];e.exports=a}),null);
__d("LSIssueInsertPersistentMenuItemsForThreadTask",["LSIssueNewTask"],(function(a,b,c,d,e,f){function a(){var a=arguments,c=a[a.length-1],d=[],e=[];return c.sequence([function(e){return d[0]=new c.Map(),d[0].set("thread_key",a[0]),d[1]=c.toJSON(d[0]),c.storedProcedure(b("LSIssueNewTask"),"insert_persistent_menu_items",c.i64.cast([0,117]),d[1],void 0,void 0,c.i64.cast([0,0]),c.i64.cast([0,0]),void 0,void 0,c.i64.cast([0,0]),c.i64.cast([0,0]))},function(a){return c.resolve(e)}])}a.__sproc_name__="LSOmnistoreSettingsIssueInsertPersistentMenuItemsForThreadTaskStoredProcedure";a.__tables__=[];e.exports=a}),null);
__d("LSSetForwardScore",[],(function(a,b,c,d,e,f){function a(){var a=arguments,b=a[a.length-1],c=[];return b.sequence([function(c){return b.forEach(b.filter(b.db.table(12).fetch([[[a[0],a[2],a[1]]]]),function(c){return b.i64.eq(c.threadKey,a[0])&&b.i64.eq(b.i64.cast([0,0]),b.i64.cast([0,0]))&&b.i64.eq(c.timestampMs,a[2])&&c.messageId===a[1]}),function(b){var c=b.update;b.item;return c({forwardScore:a[3]})})},function(a){return b.resolve(c)}])}a.__sproc_name__="LSMailboxSetForwardScoreStoredProcedure";a.__tables__=["messages"];e.exports=a}),null);
__d("LSTransportHybridParticipantUpdateReceipts",[],(function(a,b,c,d,e,f){function a(){var a=arguments,b=a[a.length-1],c=[];return b.resolve(c)}a.__sproc_name__="LSE2EEMessagingMetadataMailboxTransportHybridParticipantUpdateReceiptsStoredProcedure";a.__tables__=[];e.exports=a}),null);
__d("LSTruncateMetadataThreads.nop",["I64","LSIntEnum","Promise","ReQL","asyncToGeneratorRuntime","gkx"],(function(a,b,c,d,e,f,g){"use strict";var h,i,j;a=function(){var a=b("asyncToGeneratorRuntime").asyncToGenerator(function*(a,e){if(c("gkx")("9855")){e=a.mi_act_mapping_table.keys(new WeakMap());while(!0){var f,g=(yield e.next());if(g.done)break;yield (f=a.mi_act_mapping_table)["delete"].apply(f,g.value)}f=d("ReQL").fromTableAscending(a.threads).filter(function(a){return a.syncGroup!=null&&(i||(i=d("I64"))).equal(a.syncGroup,(j||(j=d("LSIntEnum"))).ofNumber(95))}).iterator(new WeakMap());while(!0){g=(yield f.next());if(g.done)break;yield (e=a.threads)["delete"].apply(e,g.value[0])}}return(h||(h=b("Promise"))).resolve()});function e(b,c){return a.apply(this,arguments)}return e}();a.__nop_name__="LSTruncateMetadataThreads";g["default"]=a}),98);
__d("LSTruncateMetadataThreads",["LSTruncateMetadataThreads.nop"],(function(a,b,c,d,e,f){function a(){var a=arguments,c=a[a.length-1],d=[];return c.sequence([function(a){return c.nativeOperation(b("LSTruncateMetadataThreads.nop"))},function(a){return c.resolve(d)}])}a.__sproc_name__="LSE2EEMessagingMetadataMailboxTruncateMetadataThreadsStoredProcedure";a.__tables__=[];e.exports=a}),null);
__d("LSTruncateThreadRangeTablesForSyncGroup",[],(function(a,b,c,d,e,f){function a(){var a=arguments,b=a[a.length-1],c=[];return b.sequence([function(c){return b.sequence([function(c){return b.i64.eq(a[0],b.i64.cast([0,1]))?b.forEach(b.filter(b.db.table(10).fetch(),function(a){return b.i64.eq(b.i64.cast([0,1])==null?b.i64.cast([0,1]):b.i64.cast([0,1]),b.i64.cast([0,1]))}),function(a){return a["delete"]()}):b.i64.eq(a[0],b.i64.cast([0,95]))?b.forEach(b.filter(b.db.table(10).fetch([[[b.i64.cast([0,0])],[b.i64.cast([-1,4294967295])]]]),function(a){return b.i64.eq(b.i64.cast([0,1])==null?b.i64.cast([0,1]):b.i64.cast([0,1]),b.i64.cast([0,1]))&&(b.i64.eq(a.parentThreadKey,b.i64.cast([0,0]))||b.i64.eq(a.parentThreadKey,b.i64.cast([-1,4294967295])))}),function(a){return a["delete"]()}):b.resolve(0)},function(c){return b.i64.eq(a[0],b.i64.cast([0,1]))?b.forEach(b.filter(b.db.table(247).fetch(),function(a){return b.i64.eq(a.syncGroup==null?b.i64.cast([0,1]):a.syncGroup,b.i64.cast([0,1]))}),function(a){return a["delete"]()}):b.resolve()},function(c){return b.forEach(b.db.table(198).fetch([[[a[0]]]]),function(a){return a["delete"]()})},function(c){return b.forEach(b.db.table(220).fetch([[[a[0]]]]),function(a){return a["delete"]()})}])},function(a){return b.resolve(c)}])}a.__sproc_name__="LSMailboxTruncateThreadRangeTablesForSyncGroupStoredProcedure";a.__tables__=["threads_ranges_v2__generated","filtered_threads_ranges_v3__generated","inbox_threads_ranges","sync_group_threads_ranges"];e.exports=a}),null);
__d("LSTruncateTablesForSyncGroup",["LSTruncateThreadRangeTablesForSyncGroup"],(function(a,b,c,d,e,f){function a(){var a=arguments,c=a[a.length-1],d=[];return c.sequence([function(d){return c.sequence([function(b){return c.forEach(c.filter(c.db.table(9).fetch(),function(b){return(c.i64.eq(b.syncGroup,a[0])||c.i64.eq(b.syncGroup,void 0)&&c.i64.eq(c.i64.cast([0,1]),a[0]))&&![c.i64.cast([0,17]),c.i64.cast([0,18]),c.i64.cast([0,19]),c.i64.cast([0,20]),c.i64.cast([0,21]),c.i64.cast([0,22]),c.i64.cast([0,23]),c.i64.cast([0,24]),c.i64.cast([0,25]),c.i64.cast([0,26]),c.i64.cast([0,27]),c.i64.cast([0,28])].some(function(a){return c.i64.eq(b.threadType,a)})}),function(a){return a["delete"]()})},function(d){return c.storedProcedure(b("LSTruncateThreadRangeTablesForSyncGroup"),a[0])}])},function(a){return c.resolve(d)}])}a.__sproc_name__="LSMailboxTruncateTablesForSyncGroupStoredProcedure";a.__tables__=["threads"];e.exports=a}),null);
__d("LSUpdateAttachmentItemCtaAtIndex",[],(function(a,b,c,d,e,f){function a(){var a=arguments,b=a[a.length-1],c=[];return b.sequence([function(c){return b.i64.eq(a[5],b.i64.cast([0,0]))?b.forEach(b.db.table(18).fetch([[[a[0],a[1]]]]),function(b){var c=b.update;b.item;return c({defaultCtaId:a[2],defaultCtaTitle:a[3],defaultCtaType:a[4]})}):b.i64.eq(a[5],b.i64.cast([0,1]))?b.forEach(b.db.table(18).fetch([[[a[0],a[1]]]]),function(b){var c=b.update;b.item;return c({attachmentCta1Id:a[2],cta1Title:a[3],cta1Type:a[4],cta1IconType:void 0})}):b.i64.eq(a[5],b.i64.cast([0,2]))?b.forEach(b.db.table(18).fetch([[[a[0],a[1]]]]),function(b){var c=b.update;b.item;return c({attachmentCta2Id:a[2],cta2Title:a[3],cta2Type:a[4],cta2IconType:void 0})}):b.i64.eq(a[5],b.i64.cast([0,3]))?b.forEach(b.db.table(18).fetch([[[a[0],a[1]]]]),function(b){var c=b.update;b.item;return c({attachmentCta3Id:a[2],cta3Title:a[3],cta3Type:a[4],cta3IconType:void 0})}):b.resolve(function(a){b.logger(a).warn(a)}("Unexpected CTA index"))},function(a){return b.resolve(c)}])}a.__sproc_name__="LSMailboxUpdateAttachmentItemCtaAtIndexStoredProcedure";a.__tables__=["attachment_items"];e.exports=a}),null);
__d("LSUpdateReadReceipt",[],(function(a,b,c,d,e,f){function a(){var a=arguments,b=a[a.length-1],c=[];return b.sequence([function(c){return b.forEach(b.filter(b.db.table(14).fetch([[[a[1],a[2]]]]),function(c){return b.i64.eq(c.threadKey,a[1])&&b.i64.eq(b.i64.cast([0,0]),b.i64.cast([0,0]))&&b.i64.eq(c.contactId,a[2])&&b.i64.lt(c.readWatermarkTimestampMs,a[0])}),function(c){var d=c.update;c=c.item;return d({readWatermarkTimestampMs:a[0],readActionTimestampMs:b.i64.gt(a[3],b.i64.cast([0,0]))?a[3]:c.readActionTimestampMs})})},function(a){return b.resolve(c)}])}a.__sproc_name__="LSMailboxUpdateReadReceiptStoredProcedure";a.__tables__=["participants"];e.exports=a}),null);
__d("LSShimGetServerThreadKeyFromJIDV2.nop",["ReQL","RetUtil","asyncToGeneratorRuntime"],(function(a,b,c,d,e,f,g){"use strict";a=function(){var a=b("asyncToGeneratorRuntime").asyncToGenerator(function*(a,b,c){b=(yield d("ReQL").firstAsync(d("ReQL").fromTableAscending(a.mi_act_mapping_table.index("jid")).getKeyRange(c)));return d("RetUtil").getNullableRetResult(b==null?void 0:b.serverThreadKey)});function c(b,c,d){return a.apply(this,arguments)}return c}();a.__nop_name__="LSShimGetServerThreadKeyFromJIDV2";g["default"]=a}),98);
__d("LSReplaceOptimisticThread",[],(function(a,b,c,d,e,f){function a(){var a=arguments,b=a[a.length-1],c=[];return b.sequence([function(c){return b.db.table(9).fetch([[[a[1]]]]).next().then(function(c,d){d=c.done;c=c.value;return d?b.forEach(b.filter(b.db.table(9).fetch([[[a[0]]]]),function(c){return b.i64.eq(c.threadKey,a[0])&&b.i64.le(c.authorityLevel,b.i64.cast([0,20]))}),function(c){var d=c.update;c.item;return d({threadKey:a[1],authorityLevel:b.i64.cast([0,40])})}):(c.item,b.forEach(b.db.table(9).fetch([[[a[0]]]]),function(a){return a["delete"]()}))})},function(a){return b.resolve(c)}])}a.__sproc_name__="LSMailboxReplaceOptimisticThreadStoredProcedure";a.__tables__=["threads"];e.exports=a}),null);
__d("LSUpdateOptimisticContextThreadKeys",[],(function(a,b,c,d,e,f){function a(){var a=arguments,b=a[a.length-1],c=[];return b.sequence([function(c){return b.sequence([function(c){return b.forEach(b.filter(b.db.table(32).fetch(),function(c){return b.i64.eq(c.threadKey,a[0])}),function(b){var c=b.update;b.item;return c({threadKey:a[1]})})},function(c){return b.forEach(b.filter(b.db.table(31).fetch(),function(c){return b.i64.eq(c.threadKey,a[0])}),function(b){var c=b.update;b.item;return c({threadKey:a[1]})})}])},function(a){return b.resolve(c)}])}a.__sproc_name__="LSCoreUpdateOptimisticContextThreadKeysStoredProcedure";a.__tables__=["threads_optimistic_context","messages_optimistic_context"];e.exports=a}),null);
__d("LSUpdateTaskQueueName",[],(function(a,b,c,d,e,f){function a(){var a=arguments,b=a[a.length-1],c=[];return b.sequence([function(c){return b.forEach(b.db.table(2).fetch([[[a[0]]],"queueNameTaskId"]),function(b){var c=b.update;b.item;return c({queueName:a[1]})})},function(a){return b.resolve(c)}])}a.__sproc_name__="LSCoreUpdateTaskQueueNameStoredProcedure";a.__tables__=["pending_tasks"];e.exports=a}),null);
__d("LSUpdateTaskValue",[],(function(a,b,c,d,e,f){function a(){var a=arguments,b=a[a.length-1],c=[];return b.sequence([function(c){return b.forEach(b.db.table(2).fetch([[[a[0]]],"queueNameTaskId"]),function(b){var c=b.update;b=b.item;return c({taskValue:b.taskValue.split(a[1]).join(a[2])})})},function(a){return b.resolve(c)}])}a.__sproc_name__="LSCoreUpdateTaskValueStoredProcedure";a.__tables__=["pending_tasks"];e.exports=a}),null);
__d("LSUpdateThreadAuthorityAndMapping",["LSDeleteThread","LSReplaceOptimisticThread","LSShimGetServerThreadKeyFromJIDV2.nop","LSUpdateOptimisticContextThreadKeys","LSUpdateTaskQueueName","LSUpdateTaskValue"],(function(a,b,c,d,e,f){function a(){var a=arguments,c=a[a.length-1],d=[],e=[];return c.sequence([function(e){return c.sequence([function(e){return c.nativeOperation(b("LSShimGetServerThreadKeyFromJIDV2.nop"),a[0]).then(function(a){return a=a,d[0]=a[0],a})},function(b){return c.db.table(9).fetch([[[a[1]]]]).next().then(function(a,b){b=a.done;a=a.value;return b?d[1]=!1:(a.item,d[1]=!0)})},function(b){return c.filter(c.db.table(9).fetch(),function(b){return c.i64.eq(b.threadKey,a[2])}).next().then(function(a,b){b=a.done;a=a.value;return b?d[3]=!1:(a.item,d[3]=!0)})},function(e){return d[5]=c.i64.neq(d[0],void 0),d[7]=c.i64.eq(d[0],a[2])&&d[5],!d[7]&&!(c.i64.eq(d[0],a[1])&&d[5])&&d[5]?function(a){c.logger(a).mustfix(a)}("The mi_act_mapping row did not correspond to either the authoritative or optimistic thread key."):0,c.i64.neq(a[2],void 0)?d[6]=a[2]:d[6]=c.i64.cast([0,0]),d[5]?d[7]?c.sequence([function(e){return d[1]?c.storedProcedure(b("LSDeleteThread"),a[1],!1):c.resolve()},function(a){return c.i64.neq(d[6],void 0)?c.forEach(c.db.table(9).fetch([[[d[6]]]]),function(a){var b=a.update;a.item;return b({clientThreadKey:d[6]})}):c.resolve()},function(e){return c.storedProcedure(b("LSReplaceOptimisticThread"),d[6],a[1])},function(e){return c.storedProcedure(b("LSUpdateOptimisticContextThreadKeys"),d[6],a[1])}]):d[3]?c.storedProcedure(b("LSDeleteThread"),d[6],!1):c.resolve():d[3]?d[1]?c.storedProcedure(b("LSDeleteThread"),d[6],!1):c.sequence([function(a){return c.i64.neq(d[6],void 0)?c.forEach(c.db.table(9).fetch([[[d[6]]]]),function(a){var b=a.update;a.item;return b({clientThreadKey:d[6]})}):c.resolve()},function(e){return c.storedProcedure(b("LSReplaceOptimisticThread"),d[6],a[1])},function(e){return c.storedProcedure(b("LSUpdateOptimisticContextThreadKeys"),d[6],a[1])}]):c.resolve()},function(e){return d[3]?c.sequence([function(e){return d[9]=c.i64.to_string(d[6]),d[8]=c.i64.to_string(a[1]),c.storedProcedure(b("LSUpdateTaskQueueName"),d[9],d[8])},function(a){return c.storedProcedure(b("LSUpdateTaskValue"),d[8],d[9],d[8])}]):c.resolve()}])},function(a){return c.resolve(e)}])}a.__sproc_name__="LSE2EEMessagingMetadataMailboxUpdateThreadAuthorityAndMappingStoredProcedure";a.__tables__=["threads"];e.exports=a}),null);
__d("LSUpdateThreadAuthorityAndMappingWithOTIDFromJID",["LSShimGetServerThreadKeyFromJIDV2.nop","LSUpdateThreadAuthorityAndMapping"],(function(a,b,c,d,e,f){function a(){var a=arguments,c=a[a.length-1],d=[],e=[];return c.sequence([function(e){return c.sequence([function(e){return c.nativeOperation(b("LSShimGetServerThreadKeyFromJIDV2.nop"),a[0]).then(function(a){return a=a,d[0]=a[0],a})},function(e){return c.i64.neq(d[0],a[1])?d[1]=d[0]:d[1]=void 0,c.storedProcedure(b("LSUpdateThreadAuthorityAndMapping"),a[0],a[1],d[1])}])},function(a){return c.resolve(e)}])}a.__sproc_name__="LSE2EEMessagingMetadataMailboxUpdateThreadAuthorityAndMappingWithOTIDFromJIDStoredProcedure";a.__tables__=[];e.exports=a}),null);
__d("LSUpdateThreadsRangesV2",[],(function(a,b,c,d,e,f){function a(){var a=arguments,b=a[a.length-1],c=[],d=[];return b.sequence([function(d){return b.sequence([function(c){return b.forEach(b.db.table(10).fetch([[[a[1]]]]),function(a){return a["delete"]()})},function(d){return c[8]=b.i64.gt(a[2],b.i64.cast([0,1]))&&b.i64.gt(a[3],b.i64.cast([-2147483648,0])),a[0]==="inbox"&&b.i64.eq(a[1],b.i64.cast([0,0]))&&b.i64.eq(a[4],b.i64.cast([0,1]))?b.sequence([function(d){return c[9]=a[2],c[10]=a[3],c[11]=!1,c[12]=c[8],b.forEach(b.db.table(198).fetch(),function(a){a=a.item;return c[13]=a.minLastActivityTimestampMs,c[15]=a.minThreadKey,c[14]=b.i64.lt(c[9]==null?c[13]:c[9],c[13]),c[9]=c[14]?c[13]:c[9],c[10]=c[14]?c[15]:c[10],c[11]=c[11]||a.isLoadingBefore,c[12]=c[12]||b.i64.gt(c[13],b.i64.cast([0,1]))&&b.i64.gt(c[15],b.i64.cast([-2147483648,0]))})},function(a){return a=[c[9],c[10],c[11],c[12]],c[0]=a[0],c[1]=a[1],c[2]=a[2],c[3]=a[3],a}]):b.resolve((d=[a[2],a[3],!1,c[8]],c[0]=d[0],c[1]=d[1],c[2]=d[2],c[3]=d[3],d))},function(d){return b.i64.eq(a[4],b.i64.cast([0,1]))?b.sequence([function(d){return c[9]=c[0],c[10]=c[1],c[11]=c[2],c[12]=c[3],b.forEach(b.filter(b.db.table(220).fetch(),function(c){return b.i64.eq(c.parentThreadKey,a[1])}),function(a){a=a.item;return c[13]=a.minLastActivityTimestampMs,c[15]=a.minThreadKey,c[14]=b.i64.lt(c[9]==null?c[13]:c[9],c[13]),c[9]=c[14]?c[13]:c[9],c[10]=c[14]?c[15]:c[10],c[11]=c[11]||a.isLoadingBefore,c[12]=c[12]||b.i64.gt(c[13],b.i64.cast([0,1]))&&b.i64.gt(c[15],b.i64.cast([-2147483648,0]))})},function(a){return a=[c[9],c[10],c[11],c[12]],c[4]=a[0],c[5]=a[1],c[6]=a[2],c[7]=a[3],a}]):b.resolve((d=[c[0],c[1],c[2],c[3]],c[4]=d[0],c[5]=d[1],c[6]=d[2],c[7]=d[3],d))},function(d){return b.db.table(10).add({parentThreadKey:a[1],minThreadKey:c[5]==null?b.i64.cast([-2147483648,0]):c[5],minLastActivityTimestampMs:c[4]==null?b.i64.cast([0,1]):c[4],maxLastActivityTimestampMs:b.i64.cast([0,1]),maxThreadKey:b.i64.cast([-2147483648,0]),isLoadingBefore:c[6],isLoadingAfter:!1,hasMoreBefore:c[7],hasMoreAfter:!1})}])},function(a){return b.resolve(d)}])}a.__sproc_name__="LSMailboxUpdateThreadsRangesV2StoredProcedure";a.__tables__=["threads_ranges_v2__generated","inbox_threads_ranges","sync_group_threads_ranges"];e.exports=a}),null);
__d("LSUpsertFolderSeenTimestamp",[],(function(a,b,c,d,e,f){function a(){var a=arguments,b=a[a.length-1],c=[];return b.sequence([function(c){return b.i64.gt(a[1],b.i64.cast([0,0]))?b.db.table(35).fetch([[[a[0]]]]).next().then(function(c,d){var e=c.done;c=c.value;return e?b.db.table(35).add({parentThreadKey:a[0],lastSeenRequestTimestampMs:a[1]}):(d=c.item,b.i64.lt(d.lastSeenRequestTimestampMs,a[1])?b.forEach(b.db.table(35).fetch([[[a[0]]]]),function(b){var c=b.update;b.item;return c({lastSeenRequestTimestampMs:a[1]})}):b.resolve())}):b.resolve()},function(a){return b.resolve(c)}])}a.__sproc_name__="LSMailboxUpsertFolderSeenTimestampStoredProcedure";a.__tables__=["folder_metadata"];e.exports=a}),null);
__d("LSUpsertMessage",[],(function(a,b,c,d,e,f){function a(){var a=arguments,b=a[a.length-1],c=[];return b.sequence([function(c){return b.db.table(12).fetch([[[a[9]]],"optimistic"]).next().then(function(c,d){var e=c.done;c=c.value;return e?b.db.table(12).add({threadKey:a[3],timestampMs:a[5],messageId:a[8],offlineThreadingId:a[9],authorityLevel:a[2],primarySortKey:a[6],senderId:a[10],isAdminMessage:a[12],sendStatus:a[15],sendStatusV2:a[16],text:a[0],subscriptErrorMessage:a[1],secondarySortKey:a[7],stickerId:a[11],messageRenderingType:a[13],isUnsent:a[17],unsentTimestampMs:a[18],mentionOffsets:a[19],mentionLengths:a[20],mentionIds:a[21],mentionTypes:a[22],replySourceId:a[23],replySourceType:a[24],replySourceTypeV2:a[25],replyStatus:a[26],replySnippet:a[27],replyMessageText:a[28],replyToUserId:a[29],replyMediaExpirationTimestampMs:a[30],replyMediaUrl:a[31],replyMediaPreviewWidth:a[33],replyMediaPreviewHeight:a[34],replyMediaUrlMimeType:a[35],replyMediaUrlFallback:a[36],replyCtaId:a[37],replyCtaTitle:a[38],replyAttachmentType:a[39],replyAttachmentId:a[40],replyAttachmentExtra:a[41],replyType:a[42],isForwarded:a[43],forwardScore:a[44],hasQuickReplies:a[45],adminMsgCtaId:a[46],adminMsgCtaTitle:a[47],adminMsgCtaType:a[48],cannotUnsendReason:a[49],textHasLinks:a[50],viewFlags:a[51],displayedContentTypes:a[52],viewedPluginKey:a[53],viewedPluginContext:a[54],quickReplyType:a[55],hotEmojiSize:a[56],platformXmdEncoded:a[57],replySourceTimestampMs:a[58],ephemeralDurationInSec:a[59],msUntilExpirationTs:a[60],ephemeralExpirationTs:a[61],takedownState:a[62],isCollapsed:a[63],subthreadKey:a[64],botResponseId:a[65],metadataDataclass:a[66],editCount:a[67],isPaidPartnership:a[68],adminSignatureName:a[69],adminSignatureProfileUrl:a[70],adminSignatureCreatorType:a[71],translatedText:a[72],textDialect:a[73],translatedTextDialect:a[74],scheduledTimestamp:a[75],isVideoQuickSend:a[76]}):(d=c.item,b.i64.le(d.authorityLevel,a[2])?b.db.table(12).put({threadKey:a[3],timestampMs:a[5],messageId:a[8],offlineThreadingId:a[9],authorityLevel:a[2],primarySortKey:d.primarySortKey,senderId:a[10],isAdminMessage:a[12],sendStatus:a[15],sendStatusV2:a[16],text:a[0],subscriptErrorMessage:a[1],secondarySortKey:d.secondarySortKey,stickerId:a[11],messageRenderingType:a[13],isUnsent:a[17],unsentTimestampMs:a[18],mentionOffsets:a[19],mentionLengths:a[20],mentionIds:a[21],mentionTypes:a[22],replySourceId:a[23],replySourceType:a[24],replySourceTypeV2:a[25],replyStatus:a[26],replySnippet:a[27],replyMessageText:a[28],replyToUserId:a[29],replyMediaExpirationTimestampMs:a[30],replyMediaUrl:a[31],replyMediaPreviewWidth:a[33],replyMediaPreviewHeight:a[34],replyMediaUrlMimeType:a[35],replyMediaUrlFallback:a[36],replyCtaId:a[37],replyCtaTitle:a[38],replyAttachmentType:a[39],replyAttachmentId:a[40],replyAttachmentExtra:a[41],replyType:a[42],isForwarded:a[43],forwardScore:a[44],hasQuickReplies:a[45],adminMsgCtaId:a[46],adminMsgCtaTitle:a[47],adminMsgCtaType:a[48],cannotUnsendReason:a[49],textHasLinks:a[50],viewFlags:a[51],displayedContentTypes:a[52],viewedPluginKey:a[53],viewedPluginContext:a[54],quickReplyType:a[55],hotEmojiSize:a[56],platformXmdEncoded:a[57],replySourceTimestampMs:a[58],ephemeralDurationInSec:a[59],msUntilExpirationTs:a[60],ephemeralExpirationTs:a[61],takedownState:a[62],isCollapsed:a[63],subthreadKey:a[64],botResponseId:a[65],metadataDataclass:a[66],editCount:a[67],isPaidPartnership:a[68],adminSignatureName:a[69],adminSignatureProfileUrl:a[70],adminSignatureCreatorType:a[71],translatedText:a[72],textDialect:a[73],translatedTextDialect:a[74],scheduledTimestamp:a[75],isVideoQuickSend:a[76]}):b.resolve())})},function(a){return b.resolve(c)}])}a.__sproc_name__="LSMailboxUpsertMessageStoredProcedure";a.__tables__=["messages"];e.exports=a}),null);
__d("LSWriteThreadCapabilities",[],(function(a,b,c,d,e,f){function a(){var a=arguments,b=a[a.length-1],c=[],d=[];return b.sequence([function(d){return b.db.table(9).fetch([[[a[0]]]]).next().then(function(d,e){e=d.done;d=d.value;return e?0:(d.item,c[0]=b.i64.of_float(Date.now()),b.forEach(b.db.table(9).fetch([[[a[0]]]]),function(b){var c=b.update;b.item;return c({capabilities:a[1],capabilities2:a[2],capabilities3:a[3],capabilities4:a[4],capabilities5:a[5]})}))})},function(a){return b.resolve(d)}])}a.__sproc_name__="LSMailboxWriteThreadCapabilitiesStoredProcedure";a.__tables__=["threads"];e.exports=a}),null);
__d("LSExpandedStaticDependencies",["LSAddParticipantIdToGroupThread","LSClearPinnedMessages","LSDeleteBanner","LSDeleteExistingMessageRanges","LSGetFirstAvailableAttachmentCTAID","LSHybridThreadDelete","LSInsertAttachmentCta","LSInsertAttachmentItem","LSInsertBlobAttachment","LSInsertNewMessageRange","LSIssueInsertPersistentMenuItemsForThreadTask","LSSetForwardScore","LSSetMessageDisplayedContentTypes","LSStaticDependencies","LSTransportHybridParticipantUpdateReceipts","LSTruncateMetadataThreads","LSTruncateTablesForSyncGroup","LSUpdateAttachmentItemCtaAtIndex","LSUpdateOrInsertCommunitySurfaceRange","LSUpdateOrInsertThread","LSUpdateReadReceipt","LSUpdateThreadAuthorityAndMappingWithOTIDFromJID","LSUpdateThreadsRangesV2","LSUpsertFolderSeenTimestamp","LSUpsertInboxThreadsRange","LSUpsertMessage","LSUpsertReaction","LSUpsertSyncGroupThreadsRange","LSWriteThreadCapabilities"],(function(a,b,c,d,e,f,g){"use strict";a=babelHelpers["extends"]({},c("LSStaticDependencies"),{addParticipantIdToGroupThread:c("LSAddParticipantIdToGroupThread"),clearPinnedMessages:c("LSClearPinnedMessages"),deleteBanner:c("LSDeleteBanner"),deleteExistingMessageRanges:c("LSDeleteExistingMessageRanges"),getFirstAvailableAttachmentCTAID:c("LSGetFirstAvailableAttachmentCTAID"),hybridThreadDelete:c("LSHybridThreadDelete"),insertAttachmentCta:c("LSInsertAttachmentCta"),insertAttachmentItem:c("LSInsertAttachmentItem"),insertBlobAttachment:c("LSInsertBlobAttachment"),insertNewMessageRange:c("LSInsertNewMessageRange"),issueInsertPersistentMenuItemsForThreadTask:c("LSIssueInsertPersistentMenuItemsForThreadTask"),setForwardScore:c("LSSetForwardScore"),setMessageDisplayedContentTypes:c("LSSetMessageDisplayedContentTypes"),transportHybridParticipantUpdateReceipts:c("LSTransportHybridParticipantUpdateReceipts"),truncateMetadataThreads:c("LSTruncateMetadataThreads"),truncateTablesForSyncGroup:c("LSTruncateTablesForSyncGroup"),updateAttachmentItemCtaAtIndex:c("LSUpdateAttachmentItemCtaAtIndex"),updateOrInsertCommunitySurfaceRange:c("LSUpdateOrInsertCommunitySurfaceRange"),updateOrInsertThread:c("LSUpdateOrInsertThread"),updateReadReceipt:c("LSUpdateReadReceipt"),updateThreadAuthorityAndMappingWithOTIDFromJID:c("LSUpdateThreadAuthorityAndMappingWithOTIDFromJID"),updateThreadsRangesV2:c("LSUpdateThreadsRangesV2"),upsertFolderSeenTimestamp:c("LSUpsertFolderSeenTimestamp"),upsertInboxThreadsRange:c("LSUpsertInboxThreadsRange"),upsertMessage:c("LSUpsertMessage"),upsertReaction:c("LSUpsertReaction"),upsertSyncGroupThreadsRange:c("LSUpsertSyncGroupThreadsRange"),writeThreadCapabilities:c("LSWriteThreadCapabilities")});b=a;g["default"]=b}),98);
__d("LSIssueThreadCapabilitySyncTask",[],(function(a,b,c,d,e,f){function a(){var a=arguments,b=a[a.length-1],c=[];return b.resolve(c)}a.__sproc_name__="LSMailboxIssueThreadCapabilitySyncTaskStoredProcedure";a.__tables__=[];e.exports=a}),null);
__d("LSSetHMPSStatus",[],(function(a,b,c,d,e,f){function a(){var a=arguments,b=a[a.length-1],c=[];return b.resolve(c)}a.__sproc_name__="LSMailboxSetHMPSStatusStoredProcedure";a.__tables__=[];e.exports=a}),null);
//# sourceURL=https://static.xx.fbcdn.net/rsrc.php/v4/yb/r/kdFrUFo-4iQ.js
