2026-07-24 07:16:23 +00:00
// Module ID: 12662
// Function ID: 98232
2026-07-20 16:05:17 +00:00
// Name: _isNativeReflectConstruct
2026-07-23 10:11:24 +00:00
// Dependencies: [6, 7, 15, 17, 18, 57, 3947, 4146, 566, 686, 2]
2026-07-24 07:16:23 +00:00
// Module 12662 (_isNativeReflectConstruct)
2026-07-23 10:11:24 +00:00
import _isNativeReflectConstruct from "_isNativeReflectConstruct" ;
import closure_1 from "_isNativeReflectConstruct" ;
import _possibleConstructorReturn from "_possibleConstructorReturn" ;
import _getPrototypeOf from "_getPrototypeOf" ;
import _inherits from "_inherits" ;
import _slicedToArray from "_slicedToArray" ;
import closure_6 from "_isNativeReflectConstruct" ;
import closure_7 from "_isNativeReflectConstruct" ;
2026-07-20 16:05:17 +00:00
function _isNativeReflectConstruct() {
2026-07-23 10:11:24 +00:00
let _isNativeReflectConstruct = ! valueOf . call ( Reflect . construct ( Boolean , [ ] , ( ) = > {
2026-07-20 16:05:17 +00:00
} ) ) ;
function _isNativeReflectConstruct() {
2026-07-23 10:11:24 +00:00
return _isNativeReflectConstruct ;
2026-07-20 16:05:17 +00:00
}
const result = _isNativeReflectConstruct ( ) ;
}
2026-07-23 10:11:24 +00:00
function _createForOfIteratorHelperLoose ( iterable ) {
let _isNativeReflectConstruct = 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
_isNativeReflectConstruct = 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 clearAnimationTimer ( arg0 ) {
2026-07-23 10:11:24 +00:00
if ( null != dependencyMap [ arg0 ] ) {
2026-07-20 16:05:17 +00:00
const _clearTimeout = clearTimeout ;
2026-07-23 10:11:24 +00:00
clearTimeout ( dependencyMap [ arg0 ] ) ;
delete tmp [ tmp2 ] ;
2026-07-20 16:05:17 +00:00
}
}
function scheduleTransitionToGentleAmbient ( arg0 ) {
2026-07-23 10:11:24 +00:00
let _isNativeReflectConstruct = arg0 ;
2026-07-20 16:05:17 +00:00
clearAnimationTimer ( arg0 ) ;
closure_10 [ arg0 ] = setTimeout ( ( ) = > {
2026-07-23 10:11:24 +00:00
if ( null != outer1_9 [ _isNativeReflectConstruct ] ) {
2026-07-20 16:05:17 +00:00
const obj = { } ;
2026-07-23 10:11:24 +00:00
const merged = Object . assign ( tmp3 ) ;
obj [ "style" ] = outer1_8 . GENTLE_AMBIENT ;
outer1_9 [ _isNativeReflectConstruct ] = obj ;
outer1_12 . emitChange ( ) ;
2026-07-20 16:05:17 +00:00
}
2026-07-23 10:11:24 +00:00
delete tmp2 [ tmp ] ;
2026-07-20 16:05:17 +00:00
} , 2000 ) ;
}
function resetAllState() {
let length ;
2026-07-23 10:11:24 +00:00
const keys = Object . keys ( dependencyMap ) ;
2026-07-20 16:05:17 +00:00
let num = 0 ;
if ( 0 < keys . length ) {
do {
let _clearTimeout = clearTimeout ;
2026-07-23 10:11:24 +00:00
let tmp = dependencyMap ;
let clearTimeoutResult = clearTimeout ( dependencyMap [ keys [ num ] ] ) ;
2026-07-20 16:05:17 +00:00
num = num + 1 ;
length = keys . length ;
} while ( num < length ) ;
}
2026-07-23 10:11:24 +00:00
dependencyMap = { } ;
2026-07-20 16:05:17 +00:00
let closure_9 = { } ;
}
function updateChannelAnimationState ( arg0 , arg1 ) {
let userCount ;
2026-07-23 10:11:24 +00:00
if ( null != table [ arg0 ] ) {
userCount = tmp3 . userCount ;
2026-07-20 16:05:17 +00:00
}
let num = 0 ;
if ( null != userCount ) {
num = userCount ;
}
const bound = Math . max ( 0 , num + arg1 ) ;
if ( 0 === num ) {
if ( bound > 0 ) {
let obj = { } ;
obj . style = obj . GENTLE_AMBIENT_WITH_INTRO ;
obj . userCount = bound ;
2026-07-23 10:11:24 +00:00
table [ arg0 ] = obj ;
2026-07-20 16:05:17 +00:00
scheduleTransitionToGentleAmbient ( arg0 ) ;
let flag = true ;
}
return flag ;
}
if ( num > 0 ) {
if ( bound > num ) {
obj = { } ;
obj . style = obj . HIGH_CONTRAST ;
obj . userCount = bound ;
2026-07-23 10:11:24 +00:00
table [ arg0 ] = obj ;
2026-07-20 16:05:17 +00:00
scheduleTransitionToGentleAmbient ( arg0 ) ;
flag = true ;
}
}
if ( 0 === bound ) {
clearAnimationTimer ( arg0 ) ;
2026-07-23 10:11:24 +00:00
delete tmp2 [ tmp ] ;
2026-07-20 16:05:17 +00:00
flag = true ;
} else {
2026-07-23 10:11:24 +00:00
flag = null != tmp3 && bound !== num ;
2026-07-20 16:05:17 +00:00
if ( flag ) {
obj = { } ;
2026-07-23 10:11:24 +00:00
const merged = Object . assign ( tmp3 ) ;
2026-07-20 16:05:17 +00:00
obj [ "userCount" ] = bound ;
2026-07-23 10:11:24 +00:00
table [ arg0 ] = obj ;
2026-07-20 16:05:17 +00:00
flag = true ;
}
}
}
function handleConnectionOpenOrLogout() {
resetAllState ( ) ;
return true ;
}
let obj = { GENTLE_AMBIENT : "GENTLE_AMBIENT" , GENTLE_AMBIENT_WITH_INTRO : "GENTLE_AMBIENT_WITH_INTRO" , HIGH_CONTRAST : "HIGH_CONTRAST" } ;
let closure_9 = { } ;
let closure_10 = { } ;
2026-07-23 10:11:24 +00:00
let c11 = null ;
let tmp2 = ( ( Store ) = > {
2026-07-20 16:05:17 +00:00
class VoiceChannelAnimationStateStoreClass {
constructor ( ) {
self = this ;
tmp = VoiceChannelAnimationStateStoreClass ( this , VoiceChannelAnimationStateStoreClass ) ;
2026-07-23 10:11:24 +00:00
obj = outer1_3 ( VoiceChannelAnimationStateStoreClass ) ;
tmp2 = outer1_2 ;
if ( outer1_13 ( ) ) {
2026-07-20 16:05:17 +00:00
tmp6 = globalThis ;
_Reflect = Reflect ;
2026-07-23 10:11:24 +00:00
tmp7 = outer1_3 ;
2026-07-20 16:05:17 +00:00
tmp8 = arguments ;
2026-07-23 10:11:24 +00:00
constructResult = Reflect . construct ( obj , arguments , outer1_3 ( self ) . constructor ) ;
2026-07-20 16:05:17 +00:00
} else {
tmp3 = arguments ;
tmp4 = arguments ;
constructResult = obj ( . . . arguments ) ;
}
return tmp2 ( self , constructResult ) ;
}
}
callback2 ( VoiceChannelAnimationStateStoreClass , Store ) ;
let obj = {
key : "initialize" ,
value() {
2026-07-23 10:11:24 +00:00
this . waitFor ( outer1_7 , outer1_6 ) ;
2026-07-20 16:05:17 +00:00
}
} ;
const items = [ obj , , ] ;
obj = {
key : "getAnimationStyle" ,
value ( arg0 ) {
let style ;
2026-07-23 10:11:24 +00:00
if ( null != outer1_9 [ arg0 ] ) {
2026-07-20 16:05:17 +00:00
style = tmp . style ;
}
if ( null == style ) {
2026-07-23 10:11:24 +00:00
style = outer1_8 . GENTLE_AMBIENT ;
2026-07-20 16:05:17 +00:00
}
return style ;
}
} ;
items [ 1 ] = obj ;
obj = {
key : "getUserCount" ,
value ( arg0 ) {
let userCount ;
2026-07-23 10:11:24 +00:00
if ( null != outer1_9 [ arg0 ] ) {
2026-07-20 16:05:17 +00:00
userCount = tmp . userCount ;
}
let num = 0 ;
if ( null != userCount ) {
num = userCount ;
}
return num ;
}
} ;
items [ 2 ] = obj ;
return callback ( VoiceChannelAnimationStateStoreClass , items ) ;
2026-07-23 10:11:24 +00:00
} ) ( require ( "initialize" ) . Store ) ;
2026-07-20 16:05:17 +00:00
tmp2 . displayName = "VoiceChannelAnimationStateStore" ;
obj = {
VOICE_STATE_UPDATES : function handleVoiceStateUpdates ( voiceStates ) {
let iter3 ;
2026-07-23 10:11:24 +00:00
guildId = guildId . getGuildId ( ) ;
let tmp2 = guildId !== guildId ;
2026-07-20 16:05:17 +00:00
if ( tmp2 ) {
tmp2 = null != guildId ;
}
const obj = { } ;
const tmp4 = _createForOfIteratorHelperLoose ( voiceStates . voiceStates ) ;
const iter = tmp4 ( ) ;
let iter2 = iter ;
if ( ! iter . done ) {
do {
let value = iter2 . value ;
let tmp7 = tmp5 ;
let tmp8 = tmp6 ;
if ( value . guildId === guildId ) {
if ( null != value . oldChannelId ) {
let tmp9 = obj [ value . oldChannelId ] ;
let num = 0 ;
if ( null != tmp9 ) {
num = tmp9 ;
}
obj [ value . oldChannelId ] = num - 1 ;
2026-07-23 10:11:24 +00:00
tmp5 = tmp9 ;
2026-07-20 16:05:17 +00:00
}
tmp7 = tmp5 ;
tmp8 = tmp6 ;
if ( null != value . channelId ) {
let tmp10 = obj [ value . channelId ] ;
let num2 = 0 ;
if ( null != tmp10 ) {
num2 = tmp10 ;
}
obj [ value . channelId ] = num2 + 1 ;
tmp7 = tmp5 ;
tmp8 = tmp10 ;
}
}
iter3 = tmp4 ( ) ;
tmp5 = tmp7 ;
2026-07-23 10:11:24 +00:00
tmp6 = tmp8 ;
2026-07-20 16:05:17 +00:00
iter2 = iter3 ;
} while ( ! iter3 . done ) ;
}
const entries = Object . entries ( obj ) ;
let flag = false ;
let num3 = 0 ;
let flag2 = false ;
if ( 0 < entries . length ) {
do {
2026-07-23 10:11:24 +00:00
let tmp11 = callback3 ;
let tmp12 = callback3 ( entries [ num3 ] , 2 ) ;
let tmp13 = updateChannelAnimationState ;
if ( updateChannelAnimationState ( tmp12 [ 0 ] , tmp12 [ 1 ] ) ) {
2026-07-20 16:05:17 +00:00
flag = true ;
}
num3 = num3 + 1 ;
flag2 = flag ;
} while ( num3 < entries . length ) ;
}
return flag2 ;
} ,
CHANNEL_SELECT : function handleChannelSelect ( guildId ) {
guildId = guildId . guildId ;
2026-07-23 10:11:24 +00:00
if ( guildId === guildId ) {
2026-07-20 16:05:17 +00:00
return false ;
} else if ( null == guildId ) {
return false ;
} else {
resetAllState ( ) ;
let obj = { } ;
const _Object2 = Object ;
const values = Object . values ( voiceStates . getVoiceStates ( guildId ) ) ;
for ( let num2 = 0 ; num2 < values . length ; num2 = num2 + 1 ) {
let tmp = values [ num2 ] ;
if ( null != tmp . channelId ) {
let tmp2 = obj [ tmp . channelId ] ;
let num = 0 ;
if ( null != tmp2 ) {
num = tmp2 ;
}
obj [ tmp . channelId ] = num + 1 ;
let tmp3 = tmp2 ;
}
}
const _Object = Object ;
const entries = Object . entries ( obj ) ;
for ( let num4 = 0 ; num4 < entries . length ; num4 = num4 + 1 ) {
let tmp4 = callback3 ;
let tmp5 = callback3 ( entries [ num4 ] , 2 ) ;
let tmp7 = tmp5 [ 1 ] ;
if ( tmp7 > 0 ) {
let tmp8 = closure_9 ;
obj = { } ;
let tmp9 = obj ;
obj . style = obj . GENTLE_AMBIENT ;
obj . userCount = tmp7 ;
closure_9 [ tmp6 ] = obj ;
}
}
return true ;
}
} ,
CONNECTION_OPEN : handleConnectionOpenOrLogout ,
LOGOUT : handleConnectionOpenOrLogout
} ;
2026-07-23 10:11:24 +00:00
tmp2 = new tmp2 ( require ( "dispatcher" ) , obj ) ;
let closure_12 = tmp2 ;
let result = require ( "_possibleConstructorReturn" ) . fileFinishedImporting ( "modules/channel/VoiceChannelAnimationStateStore.tsx" ) ;
2026-07-20 16:05:17 +00:00
export default tmp2 ;
export const AnimationStyle = obj ;