2026-07-24 07:16:23 +00:00
// Module ID: 10537
// Function ID: 82207
2026-07-20 16:05:17 +00:00
// Name: _createForOfIteratorHelperLoose
2026-07-24 07:16:23 +00:00
// Dependencies: [6, 7, 15, 17, 18, 5, 4143, 1352, 1194, 1348, 4202, 1906, 1849, 10538, 1347, 653, 8227, 477, 507, 3748, 10539, 10540, 675, 10516, 10542, 10543, 4323, 491, 1832, 8012, 10467, 10510, 10544, 5463, 10546, 1212, 10547, 10515, 10548, 10856, 1881, 5482, 1207, 686, 4530, 2]
2026-07-20 16:05:17 +00:00
// Exports: getActiveAnalyticsSessionIDs, trackFrameSessionEnd, trackFrameSessionStart
2026-07-24 07:16:23 +00:00
// Module 10537 (_createForOfIteratorHelperLoose)
2026-07-23 10:11:24 +00:00
import _isNativeReflectConstruct from "_isNativeReflectConstruct" ;
import _callSuper from "_callSuper" ;
import closure_5 from "ME" ;
import set from "set" ;
import closure_7 from "_isNativeReflectConstruct" ;
import asyncGeneratorStep from "asyncGeneratorStep" ;
import closure_9 from "_isNativeReflectConstruct" ;
import { GUILD_VOCAL_CHANNEL_TYPES } from "_callSuper" ;
import closure_11 from "_isNativeReflectConstruct" ;
import closure_12 from "_isNativeReflectConstruct" ;
import closure_13 from "_isNativeReflectConstruct" ;
import closure_14 from "_isNativeReflectConstruct" ;
import closure_15 from "_isNativeReflectConstruct" ;
import closure_16 from "_isNativeReflectConstruct" ;
import _createForOfIteratorHelperLoose from "_createForOfIteratorHelperLoose" ;
import ME from "ME" ;
import tmp3 from "LifecycleManager" ;
let closure_18 ;
let closure_19 ;
let closure_20 ;
let closure_21 ;
let closure_22 ;
const 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 _isNativeReflectConstruct() {
let closure_0 = ! valueOf . call ( Reflect . construct ( Boolean , [ ] , ( ) = > {
} ) ) ;
function _isNativeReflectConstruct() {
return closure_0 ;
}
const result = _isNativeReflectConstruct ( ) ;
}
function getShelfItemTrackingProperties ( activity ) {
const obj = { } ;
let release_phase ;
if ( null != activity ) {
activity = activity . activity ;
if ( null != activity ) {
2026-07-23 10:11:24 +00:00
const obj2 = require ( 477 ) /* set */ ;
2026-07-24 07:16:23 +00:00
release_phase = activity . client_platform_config [ importDefault ( 8227 ) ( undefined , obj2 . getOS ( obj2 ) ) ] . release_phase ;
const tmp4 = importDefault ( 8227 ) ;
2026-07-20 16:05:17 +00:00
}
}
obj . releasePhase = release_phase ;
return obj ;
}
function setAwaitingAnalyticsContext ( arg0 ) {
let applicationId ;
let locations ;
let nonce ;
let source ;
( { locations , source } = arg0 ) ;
let flag = null != locations ;
( { applicationId , nonce } = arg0 ) ;
if ( ! flag ) {
flag = null != source ;
}
if ( flag ) {
const obj = { nonce , locations , source } ;
closure_24 [ applicationId ] = obj ;
flag = true ;
}
return flag ;
}
function clearAwaitingAnalyticsContextImmediate ( arg0 , arg1 ) {
2026-07-23 10:11:24 +00:00
if ( null != dependencyMap2 [ arg0 ] ) {
if ( tmp3 . nonce === arg1 ) {
delete tmp [ tmp2 ] ;
return tmp3 ;
2026-07-20 16:05:17 +00:00
}
}
}
function clearAwaitingAnalyticsContextAsync ( arg0 , arg1 ) {
2026-07-23 10:11:24 +00:00
let closure_0 = arg0 ;
let closure_1 = arg1 ;
const timerId = setTimeout ( ( ) = > outer1_32 ( closure_0 , closure_1 ) , 2000 ) ;
2026-07-20 16:05:17 +00:00
}
function handleActivityLaunchStart ( applicationId ) {
const source = applicationId . source ;
const obj = { applicationId : applicationId.applicationId , nonce : applicationId.nonce , locations : applicationId.analyticsLocations } ;
let tmp2 ;
if ( null != source ) {
tmp2 = source ;
}
obj . source = tmp2 ;
setAwaitingAnalyticsContext ( obj ) ;
}
function handleActivityClose() {
return _handleActivityClose ( . . . arguments ) ;
}
function _handleActivityClose() {
// CreateGeneratorClosureLongIndex (0x67)
const obj = callback3 ( tmp ) ;
return obj ( . . . arguments ) ;
}
function handleOpenEmbeddedActivity ( applicationId ) {
let _location ;
let embeddedActivity ;
let inviterUserId ;
let isStart ;
let participants ;
applicationId = applicationId . applicationId ;
( { isStart , participants , embeddedActivity , location : _location , inviterUserId } = applicationId ) ;
2026-07-24 07:16:23 +00:00
let obj = applicationId ( 10516 ) ;
2026-07-20 16:05:17 +00:00
obj . leaveCurrentFrame ( ) ;
2026-07-24 07:16:23 +00:00
let obj1 = applicationId ( 10542 ) ;
2026-07-20 16:05:17 +00:00
if ( obj1 . tryLaunchAsFrame ( { applicationId } ) ) {
obj = { isStart , inviterUserId } ;
2026-07-24 07:16:23 +00:00
const obj15 = applicationId ( 10543 ) ;
2026-07-23 10:11:24 +00:00
obj . channelId = applicationId ( 3748 ) . getEmbeddedActivityLocationChannelId ( _location ) ;
const obj17 = applicationId ( 3748 ) ;
obj . guildId = applicationId ( 3748 ) . getEmbeddedActivityLocationGuildId ( _location ) ;
2026-07-20 16:05:17 +00:00
obj . locationKind = _location . kind ;
( { launchId : obj16.launchId , compositeInstanceId : obj16.compositeInstanceId } = embeddedActivity ) ;
let num12 = 1 ;
if ( "location" in embeddedActivity ) {
num12 = 2 ;
}
obj . activitiesInfraVersion = num12 ;
const result = obj15 . stashPendingFrameLaunch ( applicationId , obj ) ;
2026-07-23 10:11:24 +00:00
const obj18 = applicationId ( 3748 ) ;
2026-07-20 16:05:17 +00:00
} else {
const importDefault = id . getId ( ) ;
const found = participants . find ( ( userId ) = > userId . userId === closure_1 ) ;
2026-07-23 10:11:24 +00:00
let obj2 = applicationId ( 3748 ) ;
2026-07-20 16:05:17 +00:00
const embeddedActivityLocationChannelId = obj2 . getEmbeddedActivityLocationChannelId ( _location ) ;
2026-07-23 10:11:24 +00:00
let obj3 = applicationId ( 3748 ) ;
2026-07-20 16:05:17 +00:00
const embeddedActivityLocationGuildId = obj3 . getEmbeddedActivityLocationGuildId ( _location ) ;
const channel = store . getChannel ( embeddedActivityLocationChannelId ) ;
let isFirstActivityInChannel = isStart ;
if ( isStart ) {
isFirstActivityInChannel = null != channel ;
}
if ( isFirstActivityInChannel ) {
isFirstActivityInChannel = channel . isPrivate ( ) ;
}
if ( isFirstActivityInChannel ) {
isFirstActivityInChannel = applicationId . isFirstActivityInChannel ;
}
if ( isFirstActivityInChannel ) {
isFirstActivityInChannel = null == found ;
}
if ( isFirstActivityInChannel ) {
2026-07-23 10:11:24 +00:00
const participant = importDefault ( 4323 ) . selectParticipant ( channel . id , null ) ;
const obj6 = importDefault ( 4323 ) ;
2026-07-20 16:05:17 +00:00
}
if ( null != found ) {
const mediaSessionId = store2 . getMediaSessionId ( ) ;
const compositeInstanceId = embeddedActivity . compositeInstanceId ;
let tmp17 = null == mediaSessionId ;
if ( tmp17 ) {
let isVocalResult ;
if ( null != channel ) {
isVocalResult = channel . isVocal ( ) ;
}
tmp17 = true === isVocalResult ;
}
if ( tmp17 ) {
let isPrivateResult ;
if ( null != channel ) {
isPrivateResult = channel . isPrivate ( ) ;
}
tmp17 = false === isPrivateResult ;
}
if ( null != compositeInstanceId ) {
if ( ! tmp17 ) {
2026-07-23 10:11:24 +00:00
const v4Result = applicationId ( 491 ) . v4 ( ) ;
2026-07-20 16:05:17 +00:00
let num5 = 1 ;
if ( "location" in embeddedActivity ) {
num5 = 2 ;
}
const currentUser = authStore2 . getCurrentUser ( ) ;
if ( null != currentUser ) {
const shelfActivities = store4 . getShelfActivities ( embeddedActivityLocationGuildId ) ;
const shelfOrder = store3 . getState ( ) . shelfOrder ;
obj = { applicationId , activityConfigs : shelfActivities } ;
2026-07-24 07:16:23 +00:00
const tmp65 = importDefault ( 10539 ) ( obj ) ;
2026-07-20 16:05:17 +00:00
const sum = 1 + shelfOrder . findIndex ( ( arg0 ) = > arg0 === applicationId ) ;
2026-07-24 07:16:23 +00:00
const rawThermalState = importDefault ( 10540 ) . getRawThermalState ( ) ;
2026-07-20 16:05:17 +00:00
if ( null != mediaSessionId ) {
const items = [ mediaSessionId ] ;
let items1 = items ;
} else {
items1 = [ ] ;
}
obj1 = { activitySessionId : compositeInstanceId , activityUserSessionId : v4Result , launchId : embeddedActivity.launchId , mediaSessionIds : items1 , activitiesInfraVersion : num5 } ;
closure_23 [ applicationId ] = obj1 ;
2026-07-24 07:16:23 +00:00
const obj20 = importDefault ( 10540 ) ;
2026-07-23 10:11:24 +00:00
let isNullOrEmptyResult = applicationId ( 1832 ) . isNullOrEmpty ( found . nonce ) ;
2026-07-20 16:05:17 +00:00
if ( ! isNullOrEmptyResult ) {
let nonce ;
if ( null != tmp26 ) {
nonce = tmp26 . nonce ;
}
isNullOrEmptyResult = found . nonce === nonce ;
}
2026-07-23 10:11:24 +00:00
const obj9 = applicationId ( 1832 ) ;
2026-07-20 16:05:17 +00:00
obj2 = { channel_id : embeddedActivityLocationChannelId , guild_id : embeddedActivityLocationGuildId , media_session_id : items1 [ 0 ] , activity_session_id : compositeInstanceId , application_id : applicationId } ;
let locations ;
2026-07-23 10:11:24 +00:00
if ( null != dependencyMap2 [ applicationId ] ) {
2026-07-20 16:05:17 +00:00
locations = tmp26 . locations ;
}
obj2 . location_stack = locations ;
obj2 . user_premium_tier = currentUser . premiumType ;
obj2 . raw_thermal_state = rawThermalState ;
let userParticipantCount = null ;
if ( null != channel ) {
userParticipantCount = authStore . getUserParticipantCount ( channel . id ) ;
}
obj2 . n_participants = userParticipantCount ;
obj2 . is_activity_start = isStart ;
obj2 . release_phase = getShelfItemTrackingProperties ( tmp65 ) . releasePhase ;
let shelf_rank ;
if ( null != tmp65 ) {
const activity = tmp65 . activity ;
if ( null != activity ) {
shelf_rank = activity . shelf_rank ;
}
}
obj2 . shelf_rank = shelf_rank ;
let tmp39 = null ;
if ( sum > 0 ) {
tmp39 = sum ;
}
obj2 . shelf_sorted_rank = tmp39 ;
obj2 . activity_user_session_id = v4Result ;
let type ;
if ( null != channel ) {
type = channel . type ;
}
obj2 . channel_type = type ;
let source ;
2026-07-23 10:11:24 +00:00
if ( null != dependencyMap2 [ applicationId ] ) {
2026-07-20 16:05:17 +00:00
source = tmp26 . source ;
}
obj2 . source = source ;
let commandContextType = null ;
if ( null != channel ) {
2026-07-24 07:16:23 +00:00
commandContextType = applicationId ( 8012 ) . computeCommandContextType ( channel , applicationId ) ;
const obj12 = applicationId ( 8012 ) ;
2026-07-20 16:05:17 +00:00
}
obj2 . command_context_type = commandContextType ;
obj2 . invite_inviter_id = inviterUserId ;
let interactionId ;
2026-07-23 10:11:24 +00:00
if ( null != dependencyMap2 [ applicationId ] ) {
2026-07-20 16:05:17 +00:00
interactionId = tmp26 . interactionId ;
}
obj2 . interaction_id = interactionId ;
obj2 . embedded_activity_location_kind = _location . kind ;
2026-07-23 10:11:24 +00:00
importDefault ( 675 ) . track ( constants . ACTIVITY_SESSION_JOINED , obj2 ) ;
const obj10 = importDefault ( 675 ) ;
2026-07-20 16:05:17 +00:00
obj3 = { } ;
let locations1 ;
2026-07-23 10:11:24 +00:00
if ( null != dependencyMap2 [ applicationId ] ) {
2026-07-20 16:05:17 +00:00
locations1 = tmp26 . locations ;
}
obj3 . location_stack = locations1 ;
obj3 . channel_id = embeddedActivityLocationChannelId ;
let type1 ;
if ( null != channel ) {
type1 = channel . type ;
}
obj3 . channel_type = type1 ;
obj3 . guild_id = embeddedActivityLocationGuildId ;
obj3 . application_id = applicationId ;
obj3 . instance_id = embeddedActivity . launchId ;
obj3 . initial_media_session_id = items1 [ 0 ] ;
obj3 . activity_user_session_id = v4Result ;
obj3 . raw_thermal_state = rawThermalState ;
obj3 . is_activity_start = isStart ;
let shelf_rank1 ;
if ( null != tmp65 ) {
const activity2 = tmp65 . activity ;
if ( null != activity2 ) {
shelf_rank1 = activity2 . shelf_rank ;
}
}
obj3 . shelf_rank = shelf_rank1 ;
let tmp53 = null ;
if ( sum > 0 ) {
tmp53 = sum ;
}
obj3 . shelf_sorted_rank = tmp53 ;
obj3 . activities_infra_version = num5 ;
obj3 . embedded_activity_location_kind = _location . kind ;
2026-07-23 10:11:24 +00:00
importDefault ( 675 ) . track ( constants . ACTIVITY_IFRAME_MOUNT , obj3 ) ;
const obj13 = importDefault ( 675 ) ;
2026-07-20 16:05:17 +00:00
}
2026-07-23 10:11:24 +00:00
const obj7 = applicationId ( 491 ) ;
2026-07-20 16:05:17 +00:00
}
}
}
}
}
2026-07-23 10:11:24 +00:00
( { AnalyticEvents : closure_18 , RPCCloseCodes : closure_19 , Endpoints : closure_20 , RTCConnectionStates : closure_21 , ComponentActions : closure_22 } = ME ) ;
2026-07-20 16:05:17 +00:00
let closure_23 = { } ;
let closure_24 = { } ;
let closure_25 = { } ;
2026-07-23 10:11:24 +00:00
let c26 ;
let result = require ( "_possibleConstructorReturn" ) . fileFinishedImporting ( "modules/activities/EmbeddedActivitiesManager.tsx" ) ;
2026-07-20 16:05:17 +00:00
export default tmp3 ;
export const trackFrameSessionStart = function trackFrameSessionStart ( applicationId ) {
let activitiesInfraVersion ;
let channelId ;
let compositeInstanceId ;
let guildId ;
let isStart ;
let launchId ;
let locationKind ;
2026-07-23 10:11:24 +00:00
const _require = applicationId ;
2026-07-24 07:16:23 +00:00
let obj = _require ( 10543 ) ;
2026-07-20 16:05:17 +00:00
const result = obj . consumePendingFrameLaunch ( applicationId ) ;
if ( null != result ) {
( { isStart , channelId , guildId , locationKind , launchId , compositeInstanceId , activitiesInfraVersion } = result ) ;
const currentUser = authStore2 . getCurrentUser ( ) ;
if ( null != currentUser ) {
let channel = null ;
if ( null != channelId ) {
channel = store . getChannel ( channelId ) ;
}
const mediaSessionId = store2 . getMediaSessionId ( ) ;
if ( null != mediaSessionId ) {
const items = [ mediaSessionId ] ;
let items1 = items ;
} else {
items1 = [ ] ;
}
2026-07-23 10:11:24 +00:00
let obj1 = _require ( 491 ) ;
2026-07-20 16:05:17 +00:00
const v4Result = obj1 . v4 ( ) ;
obj = { activitySessionId : compositeInstanceId , activityUserSessionId : v4Result , launchId , mediaSessionIds : items1 , activitiesInfraVersion } ;
const _Date = Date ;
obj . connectedSince = Date . now ( ) ;
obj . frameChannelId = channelId ;
obj . frameGuildId = guildId ;
obj . frameLocationKind = locationKind ;
closure_23 [ applicationId ] = obj ;
const shelfActivities = store4 . getShelfActivities ( guildId ) ;
const shelfOrder = store3 . getState ( ) . shelfOrder ;
obj = { applicationId , activityConfigs : shelfActivities } ;
2026-07-24 07:16:23 +00:00
const tmp15 = importDefault ( 10539 ) ( obj ) ;
2026-07-23 10:11:24 +00:00
const sum = 1 + shelfOrder . findIndex ( ( arg0 ) = > arg0 === closure_0 ) ;
2026-07-24 07:16:23 +00:00
const rawThermalState = importDefault ( 10540 ) . getRawThermalState ( ) ;
const obj5 = importDefault ( 10540 ) ;
2026-07-20 16:05:17 +00:00
obj1 = { channel_id : channelId , guild_id : guildId , media_session_id : items1 [ 0 ] , activity_session_id : compositeInstanceId , application_id : applicationId } ;
let locations ;
2026-07-23 10:11:24 +00:00
if ( null != dependencyMap2 [ applicationId ] ) {
2026-07-20 16:05:17 +00:00
locations = tmp20 . locations ;
}
obj1 . location_stack = locations ;
obj1 . user_premium_tier = currentUser . premiumType ;
obj1 . raw_thermal_state = rawThermalState ;
let userParticipantCount = null ;
if ( null != channel ) {
userParticipantCount = authStore . getUserParticipantCount ( channel . id ) ;
}
obj1 . n_participants = userParticipantCount ;
obj1 . is_activity_start = isStart ;
obj1 . release_phase = getShelfItemTrackingProperties ( tmp15 ) . releasePhase ;
let shelf_rank ;
if ( null != tmp15 ) {
const activity = tmp15 . activity ;
if ( null != activity ) {
shelf_rank = activity . shelf_rank ;
}
}
obj1 . shelf_rank = shelf_rank ;
let tmp27 = null ;
if ( sum > 0 ) {
tmp27 = sum ;
}
obj1 . shelf_sorted_rank = tmp27 ;
obj1 . activity_user_session_id = v4Result ;
let type ;
if ( null != channel ) {
type = channel . type ;
}
obj1 . channel_type = type ;
let source ;
2026-07-23 10:11:24 +00:00
if ( null != dependencyMap2 [ applicationId ] ) {
2026-07-20 16:05:17 +00:00
source = tmp20 . source ;
}
obj1 . source = source ;
let commandContextType = null ;
if ( null != channel ) {
2026-07-24 07:16:23 +00:00
commandContextType = _require ( 8012 ) . computeCommandContextType ( channel , applicationId ) ;
const obj8 = _require ( 8012 ) ;
2026-07-20 16:05:17 +00:00
}
obj1 . command_context_type = commandContextType ;
obj1 . invite_inviter_id = result . inviterUserId ;
let interactionId ;
2026-07-23 10:11:24 +00:00
if ( null != dependencyMap2 [ applicationId ] ) {
2026-07-20 16:05:17 +00:00
interactionId = tmp20 . interactionId ;
}
obj1 . interaction_id = interactionId ;
obj1 . embedded_activity_location_kind = locationKind ;
2026-07-23 10:11:24 +00:00
importDefault ( 675 ) . track ( constants . ACTIVITY_SESSION_JOINED , obj1 ) ;
const obj6 = importDefault ( 675 ) ;
2026-07-20 16:05:17 +00:00
const obj2 = { } ;
let locations1 ;
2026-07-23 10:11:24 +00:00
if ( null != dependencyMap2 [ applicationId ] ) {
2026-07-20 16:05:17 +00:00
locations1 = tmp20 . locations ;
}
obj2 . location_stack = locations1 ;
obj2 . channel_id = channelId ;
let type1 ;
if ( null != channel ) {
type1 = channel . type ;
}
obj2 . channel_type = type1 ;
obj2 . guild_id = guildId ;
obj2 . application_id = applicationId ;
obj2 . instance_id = launchId ;
obj2 . initial_media_session_id = items1 [ 0 ] ;
obj2 . activity_user_session_id = v4Result ;
obj2 . raw_thermal_state = rawThermalState ;
obj2 . is_activity_start = isStart ;
let shelf_rank1 ;
if ( null != tmp15 ) {
const activity2 = tmp15 . activity ;
if ( null != activity2 ) {
shelf_rank1 = activity2 . shelf_rank ;
}
}
obj2 . shelf_rank = shelf_rank1 ;
let tmp41 = null ;
if ( sum > 0 ) {
tmp41 = sum ;
}
obj2 . shelf_sorted_rank = tmp41 ;
obj2 . activities_infra_version = activitiesInfraVersion ;
obj2 . embedded_activity_location_kind = locationKind ;
2026-07-23 10:11:24 +00:00
importDefault ( 675 ) . track ( constants . ACTIVITY_IFRAME_MOUNT , obj2 ) ;
const obj9 = importDefault ( 675 ) ;
2026-07-20 16:05:17 +00:00
}
}
} ;
export const getActiveAnalyticsSessionIDs = function getActiveAnalyticsSessionIDs ( id ) {
2026-07-23 10:11:24 +00:00
return dependencyMap [ id ] ;
2026-07-20 16:05:17 +00:00
} ;
export const trackFrameSessionEnd = function trackFrameSessionEnd ( applicationId ) {
const currentUser = authStore2 . getCurrentUser ( ) ;
2026-07-23 10:11:24 +00:00
if ( null != dependencyMap [ applicationId ] ) {
2026-07-20 16:05:17 +00:00
if ( null != currentUser ) {
2026-07-23 10:11:24 +00:00
const frameChannelId = tmp3 . frameChannelId ;
let tmp5 = null ;
2026-07-20 16:05:17 +00:00
if ( null != frameChannelId ) {
2026-07-23 10:11:24 +00:00
tmp5 = frameChannelId ;
2026-07-20 16:05:17 +00:00
}
2026-07-23 10:11:24 +00:00
const frameGuildId = tmp3 . frameGuildId ;
let tmp6 = null ;
2026-07-20 16:05:17 +00:00
if ( null != frameGuildId ) {
2026-07-23 10:11:24 +00:00
tmp6 = frameGuildId ;
2026-07-20 16:05:17 +00:00
}
let channel = null ;
2026-07-23 10:11:24 +00:00
if ( null != tmp5 ) {
channel = store . getChannel ( tmp5 ) ;
2026-07-20 16:05:17 +00:00
}
2026-07-23 10:11:24 +00:00
const shelfActivities = store4 . getShelfActivities ( tmp6 ) ;
2026-07-20 16:05:17 +00:00
let obj = { applicationId , activityConfigs : shelfActivities } ;
2026-07-24 07:16:23 +00:00
const tmp13 = importDefault ( 10539 ) ( obj ) ;
const rawThermalState = importDefault ( 10540 ) . getRawThermalState ( ) ;
2026-07-20 16:05:17 +00:00
let diff = null ;
2026-07-23 10:11:24 +00:00
if ( null != tmp3 . connectedSince ) {
2026-07-20 16:05:17 +00:00
const _Date = Date ;
2026-07-23 10:11:24 +00:00
diff = Date . now ( ) - tmp3 . connectedSince ;
2026-07-20 16:05:17 +00:00
}
2026-07-24 07:16:23 +00:00
const obj2 = importDefault ( 10540 ) ;
2026-07-23 10:11:24 +00:00
obj = { channel_id : tmp5 , guild_id : tmp6 , media_session_id : tmp3.mediaSessionIds [ 0 ] , activity_session_id : tmp3.activitySessionId , application_id : applicationId , duration_ms : diff , user_premium_tier : currentUser.premiumType , raw_thermal_state : rawThermalState , release_phase : getShelfItemTrackingProperties ( tmp13 ) . releasePhase } ;
2026-07-20 16:05:17 +00:00
let shelf_rank ;
2026-07-23 10:11:24 +00:00
if ( null != tmp13 ) {
const activity = tmp13 . activity ;
2026-07-20 16:05:17 +00:00
if ( null != activity ) {
shelf_rank = activity . shelf_rank ;
}
}
obj . shelf_rank = shelf_rank ;
2026-07-23 10:11:24 +00:00
obj . activity_user_session_id = tmp3 . activityUserSessionId ;
2026-07-20 16:05:17 +00:00
let type ;
if ( null != channel ) {
type = channel . type ;
}
obj . channel_type = type ;
2026-07-23 10:11:24 +00:00
( { mediaSessionIds : obj4.media_session_ids , frameLocationKind : obj4.embedded_activity_location_kind } = tmp3 ) ;
importDefault ( 675 ) . track ( constants . ACTIVITY_SESSION_LEFT , obj ) ;
const obj3 = importDefault ( 675 ) ;
obj = { channel_id : tmp5 , guild_id : tmp6 , application_id : applicationId } ;
let tmp27 ;
if ( null != tmp3 . launchId ) {
const items = [ tmp3 . launchId ] ;
tmp27 = items ;
2026-07-20 16:05:17 +00:00
}
2026-07-23 10:11:24 +00:00
obj . instance_ids = tmp27 ;
( { mediaSessionIds : obj6.media_session_ids , activityUserSessionId : obj6.activity_user_session_id } = tmp3 ) ;
2026-07-20 16:05:17 +00:00
obj . raw_thermal_state = rawThermalState ;
obj . duration_ms = diff ;
2026-07-23 10:11:24 +00:00
obj . embedded_activity_location_kind = tmp3 . frameLocationKind ;
importDefault ( 675 ) . track ( constants . ACTIVITY_IFRAME_UNMOUNT , obj ) ;
delete tmp [ tmp2 ] ;
const obj5 = importDefault ( 675 ) ;
2026-07-20 16:05:17 +00:00
}
}
} ;