2026-07-27 11:26:19 +00:00
// Module ID: 10417
// Function ID: 80507
2026-07-20 16:05:17 +00:00
// Name: _createForOfIteratorHelperLoose
2026-07-27 11:26:19 +00:00
// Dependencies: [57, 31, 10418, 4218, 566, 10420, 2]
2026-07-20 16:05:17 +00:00
// Exports: default
2026-07-27 11:26:19 +00:00
// Module 10417 (_createForOfIteratorHelperLoose)
2026-07-23 10:11:24 +00:00
import _slicedToArray from "_slicedToArray" ;
import result from "result" ;
import _isNativeReflectConstruct from "_isNativeReflectConstruct" ;
import closure_5 from "_isNativeReflectConstruct" ;
let require = arg1 ;
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 ;
}
function useMissingActivities ( arg0 , arg1 ) {
2026-07-23 10:11:24 +00:00
const _require = arg0 ;
2026-07-20 16:05:17 +00:00
const dependencyMap = arg1 ;
2026-07-23 10:11:24 +00:00
let items = [ arg0 , arg1 ] ;
const tmp = first ( stateFromStoresArray . useMemo ( ( ) = > ( function getMessagesWithActivities ( closure_0 , closure_1 ) {
if ( closure_1 . isPrivate ( ) ) {
const found = closure_0 . filter ( ( application ) = > {
2026-07-20 16:05:17 +00:00
application = application . application ;
let id ;
if ( null != application ) {
id = application . id ;
}
let tmp2 = null != id ;
if ( tmp2 ) {
const activity = application . activity ;
let party_id ;
if ( null != activity ) {
party_id = activity . party_id ;
}
tmp2 = null != party_id ;
}
return tmp2 ;
} ) ;
const items = [ found , found . map ( ( id ) = > id . id ) ] ;
return items ;
} else {
2026-07-23 10:11:24 +00:00
const items1 = [ outer2_8 , outer2_7 ] ;
2026-07-20 16:05:17 +00:00
return items1 ;
}
2026-07-23 10:11:24 +00:00
} ) ( closure_0 , closure_1 ) , items ) , 2 ) ;
first = tmp [ 0 ] ;
let items1 = [ closure_5 ] ;
2026-07-20 16:05:17 +00:00
const items2 = [ first ] ;
2026-07-23 10:11:24 +00:00
stateFromStoresArray = _require ( 566 ) . useStateFromStoresArray ( items1 , ( ) = > {
let items = [ ] ;
2026-07-20 16:05:17 +00:00
const item = first . forEach ( ( author ) = > {
const items = author ;
2026-07-23 10:11:24 +00:00
if ( null != outer2_5 . findActivity ( author . author . id , ( application_id ) = > {
const application = author . application ;
2026-07-20 16:05:17 +00:00
let id ;
if ( null != application ) {
id = application . id ;
}
let tmp2 = application_id . application_id === id ;
if ( tmp2 ) {
const party = application_id . party ;
let id1 ;
if ( null != party ) {
id1 = party . id ;
}
2026-07-23 10:11:24 +00:00
const activity = author . activity ;
2026-07-20 16:05:17 +00:00
let party_id ;
if ( null != activity ) {
party_id = activity . party_id ;
}
tmp2 = id1 === party_id ;
}
return tmp2 ;
} , null , true ) ) {
items . push ( author . id ) ;
}
} ) ;
return items ;
} , items2 ) ;
const items3 = [ first , stateFromStoresArray ] ;
const items4 = [
tmp [ 1 ] ,
2026-07-23 10:11:24 +00:00
stateFromStoresArray . useMemo ( ( ) = > ( function makeActivitySubscriptions ( first , stateFromStoresArray ) {
let closure_0 = stateFromStoresArray ;
2026-07-20 16:05:17 +00:00
if ( 0 === first . length ) {
2026-07-23 10:11:24 +00:00
return outer2_6 ;
2026-07-20 16:05:17 +00:00
} else {
const items = [ ] ;
const item = first . forEach ( ( application ) = > {
application = application . application ;
if ( null != application ) {
const id = application . id ;
}
const activity = application . activity ;
if ( null != activity ) {
const party_id = activity . party_id ;
}
2026-07-23 10:11:24 +00:00
if ( ! ( application . id in closure_0 ) ) {
2026-07-20 16:05:17 +00:00
if ( null != id ) {
if ( null != party_id ) {
const timestamp = application . timestamp ;
const obj = { userId : application.author.id , applicationId : id , partyId : party_id } ;
( { id : obj.messageId , channel_id : obj.channelId } = application ) ;
obj . inviteTime = timestamp . getTime ( ) ;
items . push ( obj ) ;
}
}
}
} ) ;
return items ;
}
2026-07-23 10:11:24 +00:00
} ) ( first , stateFromStoresArray ) , items3 )
2026-07-20 16:05:17 +00:00
] ;
return items4 ;
}
let closure_6 = [ ] ;
let closure_7 = [ ] ;
let closure_8 = [ ] ;
2026-07-23 10:11:24 +00:00
const result = require ( "_isNativeReflectConstruct" ) . fileFinishedImporting ( "modules/activities/useSubscribeMissingActivities.tsx" ) ;
2026-07-20 16:05:17 +00:00
export default function useSubscribeMissingActivities ( arg0 , arg1 ) {
2026-07-23 10:11:24 +00:00
let tmp = callback ( useMissingActivities ( arg0 , arg1 ) , 2 ) ;
const require = tmp2 ;
2026-07-20 16:05:17 +00:00
const items = [ tmp [ 1 ] ] ;
const effect = React . useEffect ( ( ) = > {
let iter2 ;
let tmp2 ;
2026-07-23 10:11:24 +00:00
const tmp = outer1_9 ( tmp2 ) ;
2026-07-20 16:05:17 +00:00
let iter = tmp ( ) ;
if ( ! iter . done ) {
do {
let value = iter . value ;
2026-07-23 10:11:24 +00:00
tmp2 = outer1_4 ;
if ( ! outer1_4 . isSubscribed ( value ) ) {
let tmp3 = tmp2 ;
let tmp4 = outer1_1 ;
let obj = tmp2 ( outer1_1 [ 5 ] ) ;
2026-07-20 16:05:17 +00:00
let subscription = obj . subscribe ( value ) ;
}
iter2 = tmp ( ) ;
iter = iter2 ;
} while ( ! iter2 . done ) ;
}
} , items ) ;
const items1 = [ tmp [ 0 ] , tmp [ 1 ] ] ;
return items1 ;
} ;