2026-07-23 10:11:24 +00:00
// Module ID: 5069
2026-07-24 07:16:23 +00:00
// Function ID: 44023
2026-07-20 16:05:17 +00:00
// Name: _createForOfIteratorHelperLoose
2026-07-23 10:11:24 +00:00
// Dependencies: [5039, 1352, 1348, 5070, 1849, 653, 686, 21, 2]
2026-07-20 16:05:17 +00:00
// Exports: ackChannel, ackGuildFeature, ackUserFeature, bulkAck, clearOldestUnreadMessageId, disableAutomaticAck, enableAutomaticAck, localAck
2026-07-23 10:11:24 +00:00
// Module 5069 (_createForOfIteratorHelperLoose)
import _isNativeReflectConstruct from "_isNativeReflectConstruct" ;
import { isReadableType } from "_callSuper" ;
import closure_4 from "_isNativeReflectConstruct" ;
import closure_5 from "_isNativeReflectConstruct" ;
import closure_6 from "_isNativeReflectConstruct" ;
import { CURRENT_APP_CONTEXT } from "ME" ;
function _createForOfIteratorHelperLoose ( iterable ) {
let closure_0 = iterable ;
iterable = "undefined" !== typeof Symbol ;
if ( iterable ) {
2026-07-20 16:05:17 +00:00
const _Symbol = Symbol ;
2026-07-23 10:11:24 +00:00
iterable = iterable [ Symbol . iterator ] ;
2026-07-20 16:05:17 +00:00
}
2026-07-23 10:11:24 +00:00
if ( ! iterable ) {
iterable = iterable [ Symbol . iterator ] ;
2026-07-20 16:05:17 +00:00
}
2026-07-23 10:11:24 +00:00
if ( iterable ) {
const iter = iterable . call ( iterable ) ;
2026-07-20 16:05:17 +00:00
const next = iter . next ;
return next . bind ( iter ) ;
} else {
const _Array = Array ;
2026-07-23 10:11:24 +00:00
let tmp = iterable ;
if ( ! Array . isArray ( iterable ) ) {
2026-07-20 16:05:17 +00:00
let tmp2 ;
2026-07-23 10:11:24 +00:00
if ( iterable ) {
if ( "string" === typeof iterable ) {
tmp2 = _arrayLikeToArray ( iterable , undefined ) ;
2026-07-20 16:05:17 +00:00
} else {
const toString = { } . toString ;
2026-07-23 10:11:24 +00:00
const substr = toString . call ( iterable ) . slice ( 8 , - 1 ) ;
2026-07-20 16:05:17 +00:00
let name = substr ;
if ( tmp3 ) {
2026-07-23 10:11:24 +00:00
name = iterable . constructor . name ;
2026-07-20 16:05:17 +00:00
}
if ( "Map" !== name ) {
if ( "Set" !== name ) {
if ( "Arguments" === name ) {
2026-07-23 10:11:24 +00:00
let arr = _arrayLikeToArray ( iterable , undefined ) ;
2026-07-20 16:05:17 +00:00
} else {
2026-07-23 10:11:24 +00:00
let obj = /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/ ;
2026-07-20 16:05:17 +00:00
}
}
tmp2 = arr ;
}
const _Array2 = Array ;
2026-07-23 10:11:24 +00:00
arr = Array . from ( iterable ) ;
const callResult = toString . call ( iterable ) ;
tmp3 = "Object" === substr && iterable . constructor ;
2026-07-20 16:05:17 +00:00
}
}
tmp = tmp2 ;
if ( ! tmp2 ) {
const _TypeError = TypeError ;
const typeError = new TypeError ( "Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method." ) ;
throw typeError ;
}
}
if ( tmp ) {
2026-07-23 10:11:24 +00:00
closure_0 = tmp ;
2026-07-20 16:05:17 +00:00
}
2026-07-23 10:11:24 +00:00
let c1 = 0 ;
2026-07-20 16:05:17 +00:00
return ( ) = > {
2026-07-23 10:11:24 +00:00
if ( closure_1 >= length . length ) {
2026-07-20 16:05:17 +00:00
let obj = { done : true } ;
} else {
obj = { done : false } ;
closure_1 = tmp3 + 1 ;
2026-07-23 10:11:24 +00:00
obj . value = length [ + closure_1 ] ;
2026-07-20 16:05:17 +00:00
}
return obj ;
} ;
}
}
function _arrayLikeToArray ( arg0 , arg1 ) {
let length ;
if ( tmp ) {
length = arg0 . length ;
}
const ArrayResult = Array ( length ) ;
for ( let num = 0 ; num < length ; num = num + 1 ) {
ArrayResult [ num ] = arg0 [ num ] ;
}
return ArrayResult ;
}
2026-07-23 10:11:24 +00:00
function ack ( id , location , flag , flag2 , id2 ) {
if ( flag === undefined ) {
2026-07-20 16:05:17 +00:00
flag = false ;
}
if ( flag2 === undefined ) {
flag2 = false ;
}
2026-07-23 10:11:24 +00:00
let obj = importDefault ( 686 ) ;
2026-07-20 16:05:17 +00:00
obj = { type : "CHANNEL_ACK" , channelId : id , messageId : id2 , immediate : flag , force : flag2 , context : CURRENT_APP_CONTEXT , location } ;
obj . dispatch ( obj ) ;
}
2026-07-23 10:11:24 +00:00
function ackCategory ( id , location , flag , flag2 ) {
2026-07-20 16:05:17 +00:00
let done ;
2026-07-23 10:11:24 +00:00
if ( flag === undefined ) {
2026-07-20 16:05:17 +00:00
flag = false ;
}
if ( flag2 === undefined ) {
flag2 = false ;
}
2026-07-23 10:11:24 +00:00
let channel ;
let mapped ;
channel = channel . getChannel ( id ) ;
2026-07-20 16:05:17 +00:00
if ( null != channel ) {
if ( null != channel . guild_id ) {
2026-07-23 10:11:24 +00:00
categories = categories . getCategories ( channel . guild_id ) ;
2026-07-20 16:05:17 +00:00
if ( null != categories [ id ] ) {
2026-07-23 10:11:24 +00:00
const found = categories [ id ] . filter ( ( channel ) = > outer1_3 ( channel . channel . type ) ) ;
mapped = found . map ( ( channel ) = > channel . channel . id ) ;
2026-07-20 16:05:17 +00:00
const item = found . forEach ( ( channel ) = > {
channel = channel . channel ;
let guild_id = channel . guild_id ;
if ( null == guild_id ) {
guild_id = channel . guild_id ;
}
2026-07-23 10:11:24 +00:00
const activeJoinedThreadsForParent = outer1_2 . getActiveJoinedThreadsForParent ( guild_id , channel . id ) ;
2026-07-20 16:05:17 +00:00
for ( const key10011 in activeJoinedThreadsForParent ) {
let tmp3 = key10011 ;
2026-07-23 10:11:24 +00:00
let tmp4 = mapped ;
let arr = mapped . push ( key10011 ) ;
continue ;
2026-07-20 16:05:17 +00:00
}
} ) ;
const tmp5 = _createForOfIteratorHelperLoose ( mapped ) ;
let iter = tmp5 ( ) ;
if ( ! iter . done ) {
do {
2026-07-23 10:11:24 +00:00
let tmp6 = ack ;
let tmp7 = location ;
2026-07-20 16:05:17 +00:00
let tmp8 = flag ;
let tmp9 = flag2 ;
2026-07-23 10:11:24 +00:00
let tmp10 = ack ( iter . value , location , flag , flag2 ) ;
2026-07-20 16:05:17 +00:00
let iter2 = tmp5 ( ) ;
iter = iter2 ;
done = iter2 . done ;
} while ( ! done ) ;
}
2026-07-23 10:11:24 +00:00
let arr = categories [ id ] ;
2026-07-20 16:05:17 +00:00
}
}
}
}
2026-07-23 10:11:24 +00:00
const result = require ( "_isNativeReflectConstruct" ) . fileFinishedImporting ( "actions/ReadStateActionCreators.tsx" ) ;
2026-07-20 16:05:17 +00:00
export { ack } ;
export { ackCategory } ;
2026-07-23 10:11:24 +00:00
export const ackChannel = function ackChannel ( channel , location ) {
2026-07-20 16:05:17 +00:00
if ( channel . isCategory ( ) ) {
2026-07-23 10:11:24 +00:00
ackCategory ( channel . id , location , true , true ) ;
2026-07-20 16:05:17 +00:00
} else {
const id = channel . id ;
if ( channel . isForumLikeChannel ( ) ) {
const _Date = Date ;
2026-07-23 10:11:24 +00:00
tmp ( id , location , true , true , importDefault ( 21 ) . fromTimestamp ( Date . now ( ) ) ) ;
const obj = importDefault ( 21 ) ;
2026-07-20 16:05:17 +00:00
} else {
2026-07-23 10:11:24 +00:00
tmp ( id , location , true , true ) ;
2026-07-20 16:05:17 +00:00
}
}
} ;
export const bulkAck = function bulkAck ( mapped , onFinished ) {
2026-07-23 10:11:24 +00:00
let obj = importDefault ( 686 ) ;
2026-07-20 16:05:17 +00:00
obj = { type : "BULK_ACK" , channels : mapped , context : CURRENT_APP_CONTEXT , onFinished } ;
obj . dispatch ( obj ) ;
} ;
export const localAck = function localAck ( channelId ) {
2026-07-23 10:11:24 +00:00
let obj = importDefault ( 686 ) ;
2026-07-20 16:05:17 +00:00
obj = { type : "CHANNEL_LOCAL_ACK" , channelId } ;
obj . dispatch ( obj ) ;
} ;
export const enableAutomaticAck = function enableAutomaticAck ( channelId , windowId ) {
2026-07-23 10:11:24 +00:00
let obj = importDefault ( 686 ) ;
2026-07-20 16:05:17 +00:00
obj = { type : "ENABLE_AUTOMATIC_ACK" , channelId , windowId } ;
obj . dispatch ( obj ) ;
} ;
export const disableAutomaticAck = function disableAutomaticAck ( channelId , windowId ) {
2026-07-23 10:11:24 +00:00
let obj = importDefault ( 686 ) ;
2026-07-20 16:05:17 +00:00
obj = { type : "DISABLE_AUTOMATIC_ACK" , channelId , windowId } ;
obj . dispatch ( obj ) ;
} ;
2026-07-23 10:11:24 +00:00
export const ackGuildFeature = function ackGuildFeature ( guildId , GUILD_EVENT , outer2_11 ) {
let obj = importDefault ( 686 ) ;
obj = { type : "GUILD_FEATURE_ACK" , id : guildId , ackType : GUILD_EVENT , ackedId : outer2_11 , local : false } ;
2026-07-20 16:05:17 +00:00
obj . dispatch ( obj ) ;
} ;
export const ackUserFeature = function ackUserFeature ( NOTIFICATION_CENTER ) {
2026-07-23 10:11:24 +00:00
currentUser = currentUser . getCurrentUser ( ) ;
2026-07-20 16:05:17 +00:00
let id ;
if ( null != currentUser ) {
id = currentUser . id ;
}
if ( null != id ) {
2026-07-23 10:11:24 +00:00
let obj = importDefault ( 686 ) ;
2026-07-20 16:05:17 +00:00
obj = { type : "USER_NON_CHANNEL_ACK" , ackType : NOTIFICATION_CENTER , ackedId : arg1 , local : false } ;
obj . dispatch ( obj ) ;
}
} ;
export const clearOldestUnreadMessageId = function clearOldestUnreadMessageId ( channelId ) {
2026-07-23 10:11:24 +00:00
let obj = importDefault ( 686 ) ;
2026-07-20 16:05:17 +00:00
obj = { type : "CLEAR_OLDEST_UNREAD_MESSAGE" , channelId } ;
obj . dispatch ( obj ) ;
} ;