2026-07-25 08:10:48 +00:00
// Module ID: 1908
2026-07-27 11:26:19 +00:00
// Function ID: 21433
2026-07-20 16:05:17 +00:00
// Name: _isNativeReflectConstruct
2026-07-25 08:10:48 +00:00
// Dependencies: [6, 7, 15, 17, 18, 1909, 1351, 3758, 1352, 1194, 1348, 1918, 1838, 3759, 3768, 1850, 653, 1841, 22, 4321, 483, 3764, 566, 686, 2]
2026-07-20 16:05:17 +00:00
2026-07-25 08:10:48 +00:00
// Module 1908 (_isNativeReflectConstruct)
2026-07-23 10:11:24 +00:00
import _isNativeReflectConstruct from "_isNativeReflectConstruct" ;
import createFavoritesChannelRecord from "createFavoritesChannelRecord" ;
import closure_6 from "_isNativeReflectConstruct" ;
2026-07-25 08:10:48 +00:00
import isFavoritesGuildId from "isFavoritesGuildId" ;
2026-07-23 10:11:24 +00:00
import apply from "apply" ;
import closure_9 from "_isNativeReflectConstruct" ;
import closure_10 from "_isNativeReflectConstruct" ;
import { createFavoritesChannelRecord as closure_11 } from "createFavoritesChannelRecord" ;
import _callSuper from "_callSuper" ;
import closure_15 from "_isNativeReflectConstruct" ;
import closure_16 from "_isNativeReflectConstruct" ;
import closure_17 from "_isNativeReflectConstruct" ;
import _createForOfIteratorHelperLoose from "_createForOfIteratorHelperLoose" ;
import closure_19 from "_isNativeReflectConstruct" ;
import closure_20 from "_isNativeReflectConstruct" ;
import closure_21 from "_isNativeReflectConstruct" ;
import ME from "ME" ;
2026-07-20 16:05:17 +00:00
let ChannelTypes ;
2026-07-23 10:11:24 +00:00
let closure_12 ;
let closure_13 ;
let closure_14 ;
let closure_22 ;
let closure_24 ;
let closure_25 ;
const require = arg1 ;
2026-07-20 16:05:17 +00:00
function _isNativeReflectConstruct() {
let closure_0 = ! valueOf . call ( Reflect . construct ( Boolean , [ ] , ( ) = > {
} ) ) ;
function _isNativeReflectConstruct() {
return closure_0 ;
}
const result = _isNativeReflectConstruct ( ) ;
}
2026-07-23 10:11:24 +00:00
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 createGuildChannelList ( NULL_STRING_GUILD_ID ) {
2026-07-23 10:11:24 +00:00
const items = [ _callSuper ] ;
return { id : NULL_STRING_GUILD_ID , [ closure_26 ] : [ ] , [ closure_27 ] : [ ] , [ closure_23 . GUILD_CATEGORY ] : items , [ "count" ] : 0 } ;
2026-07-20 16:05:17 +00:00
}
function comparator ( comparator , comparator2 ) {
return comparator . comparator - comparator2 . comparator ;
}
function getChannelsForGuild ( id ) {
2026-07-25 08:10:48 +00:00
let obj = require ( 1841 ) /* isFavoritesGuildId */ ;
obj = { } ;
if ( obj . isFavoritesGuildId ( id ) ) {
2026-07-23 10:11:24 +00:00
favoriteChannels = favoriteChannels . getFavoriteChannels ( ) ;
2026-07-25 08:10:48 +00:00
for ( const key10022 in favoriteChannels ) {
let tmp11 = key10022 ;
2026-07-23 10:11:24 +00:00
let tmp12 = store ;
2026-07-25 08:10:48 +00:00
let channel = store . getChannel ( key10022 ) ;
2026-07-20 16:05:17 +00:00
if ( null == channel ) {
continue ;
} else {
2026-07-23 10:11:24 +00:00
let tmp8 = callback3 ;
2026-07-25 08:10:48 +00:00
let tmp9 = callback3 ( favoriteChannels , favoriteChannels [ key10022 ] , channel ) ;
2026-07-20 16:05:17 +00:00
obj = { channel : tmp9 , comparator : tmp9.position } ;
2026-07-25 08:10:48 +00:00
obj [ key10022 ] = obj ;
2026-07-23 10:11:24 +00:00
continue ;
2026-07-20 16:05:17 +00:00
}
continue ;
}
return obj ;
} else {
const mutableGuildChannelsForGuild = store . getMutableGuildChannelsForGuild ( id ) ;
2026-07-25 08:10:48 +00:00
for ( const key10015 in mutableGuildChannelsForGuild ) {
let tmp10 = key10015 ;
let obj1 = { channel : mutableGuildChannelsForGuild [ key10015 ] , comparator : mutableGuildChannelsForGuild [ key10015 ] . position } ;
obj [ key10015 ] = obj1 ;
2026-07-23 10:11:24 +00:00
continue ;
2026-07-20 16:05:17 +00:00
}
return obj ;
}
}
function rebuildChannels ( id ) {
2026-07-23 10:11:24 +00:00
let closure_0 = id ;
2026-07-20 16:05:17 +00:00
id = id . id ;
const tmp = getChannelsForGuild ( id ) ;
2026-07-23 10:11:24 +00:00
const item = id ( 22 ) . forEach ( tmp , ( channel ) = > {
2026-07-20 16:05:17 +00:00
channel = channel . channel ;
2026-07-23 10:11:24 +00:00
count . count = count . count + 1 ;
2026-07-20 16:05:17 +00:00
let type = channel . type ;
2026-07-23 10:11:24 +00:00
if ( outer1_12 ( type ) ) {
type = outer1_26 ;
} else if ( outer1_14 ( type ) ) {
type = outer1_27 ;
}
if ( channel . type === outer1_23 . GUILD_DIRECTORY ) {
if ( null == outer1_33 [ id ] ) {
outer1_33 [ id ] = [ ] ;
2026-07-20 16:05:17 +00:00
}
2026-07-23 10:11:24 +00:00
let arr = outer1_33 [ id ] ;
2026-07-20 16:05:17 +00:00
arr = arr . push ( channel ) ;
}
2026-07-23 10:11:24 +00:00
if ( null != count [ type ] ) {
arr = count [ type ] . push ( channel ) ;
const arr2 = count [ type ] ;
2026-07-20 16:05:17 +00:00
}
} ) ;
return id ;
}
function resetAllGuildChannels() {
let closure_29 = { } ;
let closure_33 = { } ;
let closure_30 = { } ;
let closure_31 = { } ;
2026-07-23 10:11:24 +00:00
if ( null != c28 ) {
rebuildGuildChannels ( c28 ) ;
2026-07-20 16:05:17 +00:00
}
}
function rebuildGuildChannels ( guildId ) {
const tmp = createGuildChannelList ( guildId ) ;
closure_29 [ guildId ] = tmp ;
closure_33 [ guildId ] = [ ] ;
rebuildChannels ( tmp ) ;
2026-07-23 10:11:24 +00:00
const sorted = tmp [ SELECTABLE ] . sort ( comparator ) ;
const sorted1 = tmp [ VOCAL ] . sort ( comparator ) ;
const sorted2 = tmp [ ChannelTypes . GUILD_CATEGORY ] . sort ( comparator ) ;
( function rebuildDisambiguations ( id ) {
let obj = { } ;
outer1_30 [ id . id ] = obj ;
2026-07-20 16:05:17 +00:00
let closure_1 = { } ;
2026-07-23 10:11:24 +00:00
const item = id [ outer1_26 ] . forEach ( ( channel ) = > {
2026-07-20 16:05:17 +00:00
channel = channel . channel ;
2026-07-25 08:10:48 +00:00
let obj = outer2_0 ( outer2_3 [ 19 ] ) ;
2026-07-23 10:11:24 +00:00
const channelName = obj . computeChannelName ( channel , outer2_21 , outer2_20 ) ;
2026-07-20 16:05:17 +00:00
let tmp2 = null ;
2026-07-23 10:11:24 +00:00
if ( hasOwnProperty . call ( table , channelName ) ) {
tmp2 = table [ channelName ] ;
2026-07-20 16:05:17 +00:00
}
if ( null == tmp2 ) {
2026-07-23 10:11:24 +00:00
table [ channelName ] = 1 ;
2026-07-20 16:05:17 +00:00
let sum = channelName ;
} else {
2026-07-23 10:11:24 +00:00
table [ channelName ] = tmp2 + 1 ;
2026-07-20 16:05:17 +00:00
const _HermesInternal = HermesInternal ;
sum = channelName + "~" + tmp2 ;
}
obj = { id : channel.id , name : sum } ;
obj [ channel . id ] = obj ;
} ) ;
2026-07-23 10:11:24 +00:00
} ) ( tmp ) ;
( function rebuildGuildElevatedPermissions ( guildId ) {
const currentUser = outer1_21 . getCurrentUser ( ) ;
const guild = outer1_18 . getGuild ( guildId ) ;
2026-07-20 16:05:17 +00:00
if ( null == guild ) {
2026-07-23 10:11:24 +00:00
let tmp7 = outer1_29 [ guildId ] ;
if ( null == tmp7 ) {
tmp7 = outer1_45 ( guildId ) ;
2026-07-20 16:05:17 +00:00
}
2026-07-23 10:11:24 +00:00
const tmp12 = outer1_39 ( tmp7 [ outer1_26 ] ) ;
let iter = tmp12 ( ) ;
2026-07-20 16:05:17 +00:00
if ( iter . done ) {
2026-07-23 10:11:24 +00:00
const tmp15 = outer1_39 ( tmp7 [ outer1_27 ] ) ;
let iter3 = tmp15 ( ) ;
2026-07-20 16:05:17 +00:00
let flag = false ;
if ( ! iter3 . done ) {
flag = true ;
2026-07-23 10:11:24 +00:00
while ( ! outer1_46 ( currentUser , iter3 . value . channel ) ) {
let iter4 = tmp15 ( ) ;
2026-07-20 16:05:17 +00:00
iter3 = iter4 ;
flag = false ;
if ( iter4 . done ) {
break ;
}
}
}
} else {
flag = true ;
2026-07-23 10:11:24 +00:00
while ( ! outer1_46 ( currentUser , iter . value . channel ) ) {
let iter2 = tmp12 ( ) ;
2026-07-20 16:05:17 +00:00
iter = iter2 ;
break ;
}
}
} else {
flag = true ;
}
if ( flag ) {
2026-07-23 10:11:24 +00:00
tmp17 [ guildId ] = true ;
2026-07-20 16:05:17 +00:00
} else {
2026-07-23 10:11:24 +00:00
delete tmp [ tmp2 ] ;
2026-07-20 16:05:17 +00:00
}
2026-07-23 10:11:24 +00:00
} ) ( guildId ) ;
2026-07-20 16:05:17 +00:00
return tmp ;
}
function handleGuildUpdates ( guild ) {
const id = guild . guild . id ;
if ( null == id ) {
return false ;
} else {
closure_29 [ id ] = undefined ;
2026-07-23 10:11:24 +00:00
if ( c28 === id ) {
2026-07-20 16:05:17 +00:00
rebuildGuildChannels ( id ) ;
}
}
}
function handleChannelUpdate ( channel ) {
const guild_id = channel . channel . guild_id ;
if ( null == guild_id ) {
return false ;
} else {
closure_29 [ guild_id ] = undefined ;
2026-07-23 10:11:24 +00:00
if ( guild_id === c28 ) {
2026-07-20 16:05:17 +00:00
rebuildGuildChannels ( guild_id ) ;
}
}
}
function handleGuildRoleUpdate ( guildId ) {
guildId = guildId . guildId ;
closure_29 [ guildId ] = undefined ;
2026-07-23 10:11:24 +00:00
if ( guildId === c28 ) {
2026-07-20 16:05:17 +00:00
rebuildGuildChannels ( guildId ) ;
}
}
function hasElevatedPermissions ( id ) {
2026-07-23 10:11:24 +00:00
let obj = importAll ( 483 ) ;
2026-07-20 16:05:17 +00:00
obj = { user : id , context : arg1 , checkElevated : false } ;
2026-07-25 08:10:48 +00:00
return obj . hasAny ( importAll ( 3764 ) . computePermissions ( obj ) , closure_25 ) ;
2026-07-20 16:05:17 +00:00
}
function updateSelectedVoiceChannel ( getGuildId ) {
let closure_32 = arg1 ;
let guildId ;
if ( null != getGuildId ) {
guildId = getGuildId . getGuildId ( ) ;
}
let tmp2 = null ;
if ( null != guildId ) {
tmp2 = guildId ;
}
let flag = null != tmp2 ;
if ( flag ) {
closure_29 [ tmp2 ] = undefined ;
flag = true ;
2026-07-23 10:11:24 +00:00
if ( tmp2 === c28 ) {
2026-07-20 16:05:17 +00:00
rebuildGuildChannels ( tmp2 ) ;
flag = true ;
}
}
return flag ;
}
function handleFavoritesUpdate() {
rebuildGuildChannels ( closure_22 ) ;
}
2026-07-23 10:11:24 +00:00
( { isGuildSelectableChannelType : closure_12 , GUILD_NON_CATEGORY_CHANNEL_TYPES : closure_13 , isGuildVocalChannelType : closure_14 } = _callSuper ) ;
( { FAVORITES : closure_22 , ChannelTypes } = ME ) ;
( { Permissions : closure_24 , ElevatedPermissions : closure_25 } = ME ) ;
const SELECTABLE = "SELECTABLE" ;
const VOCAL = "VOCAL" ;
let c28 = null ;
2026-07-20 16:05:17 +00:00
let closure_29 = { } ;
let closure_30 = { } ;
let closure_31 = { } ;
2026-07-23 10:11:24 +00:00
let c32 = null ;
2026-07-20 16:05:17 +00:00
let closure_33 = { } ;
2026-07-23 10:11:24 +00:00
_callSuper = { comparator : - 1 , channel : _callSuper.createChannelRecord ( _callSuper ) } ;
_callSuper = { id : ME.NULL_STRING_CHANNEL_ID , type : ChannelTypes . GUILD_CATEGORY , name : "Uncategorized" } ;
let closure_35 = createGuildChannelList ( ME . NULL_STRING_GUILD_ID ) ;
2026-07-20 16:05:17 +00:00
let closure_36 = [ ] ;
let closure_37 = { } ;
2026-07-23 10:11:24 +00:00
let tmp3 = ( ( Store ) = > {
2026-07-20 16:05:17 +00:00
class GuildChannelStore {
constructor ( ) {
self = this ;
2026-07-23 10:11:24 +00:00
tmp = outer1_4 ( this , GuildChannelStore ) ;
obj = outer1_7 ( GuildChannelStore ) ;
tmp2 = outer1_6 ;
if ( outer1_38 ( ) ) {
2026-07-20 16:05:17 +00:00
tmp6 = globalThis ;
_Reflect = Reflect ;
2026-07-23 10:11:24 +00:00
tmp7 = outer1_7 ;
2026-07-20 16:05:17 +00:00
tmp8 = arguments ;
2026-07-23 10:11:24 +00:00
constructResult = Reflect . construct ( obj , arguments , outer1_7 ( self ) . constructor ) ;
2026-07-20 16:05:17 +00:00
} else {
tmp3 = arguments ;
tmp4 = arguments ;
constructResult = obj ( . . . arguments ) ;
}
return tmp2 ( self , constructResult ) ;
}
}
callback2 ( GuildChannelStore , Store ) ;
let obj = {
key : "initialize" ,
value() {
2026-07-23 10:11:24 +00:00
this . waitFor ( outer1_15 , outer1_16 , outer1_10 , outer1_9 , outer1_17 , outer1_18 , outer1_19 , outer1_21 ) ;
const items = [ outer1_10 ] ;
this . syncWith ( items , outer1_48 ) ;
2026-07-20 16:05:17 +00:00
}
} ;
2026-07-23 10:11:24 +00:00
let items = [ obj , , , , , , , , , , , , , , , ] ;
2026-07-20 16:05:17 +00:00
obj = {
key : "getAllGuilds" ,
value() {
2026-07-23 10:11:24 +00:00
return outer1_29 ;
2026-07-20 16:05:17 +00:00
}
} ;
items [ 1 ] = obj ;
obj = {
key : "getChannels" ,
value ( arg0 ) {
if ( null != arg0 ) {
2026-07-23 10:11:24 +00:00
let tmp3 = outer1_29 [ arg0 ] ;
2026-07-20 16:05:17 +00:00
if ( null == tmp3 ) {
2026-07-23 10:11:24 +00:00
tmp3 = outer1_45 ( arg0 ) ;
2026-07-20 16:05:17 +00:00
}
let tmp = tmp3 ;
} else {
2026-07-23 10:11:24 +00:00
tmp = outer1_35 ;
2026-07-20 16:05:17 +00:00
}
return tmp ;
}
} ;
items [ 2 ] = obj ;
items [ 3 ] = {
key : "getFirstChannelOfType" ,
value ( arg0 , arg1 , arg2 ) {
const found = this . getChannels ( arg0 ) [ arg2 ] . find ( arg1 ) ;
let channel = null ;
if ( null != found ) {
channel = found . channel ;
}
return channel ;
}
} ;
items [ 4 ] = {
key : "getFirstChannel" ,
value ( arg0 , id ) {
let flag = arg2 ;
const self = this ;
if ( arg2 === undefined ) {
flag = false ;
}
2026-07-23 10:11:24 +00:00
let firstChannelOfType = self . getFirstChannelOfType ( arg0 , id , outer1_26 ) ;
2026-07-20 16:05:17 +00:00
if ( null == firstChannelOfType ) {
let firstChannelOfType1 = null ;
if ( flag ) {
2026-07-23 10:11:24 +00:00
firstChannelOfType1 = self . getFirstChannelOfType ( arg0 , id , outer1_27 ) ;
2026-07-20 16:05:17 +00:00
}
firstChannelOfType = firstChannelOfType1 ;
}
return firstChannelOfType ;
}
} ;
items [ 5 ] = {
key : "getDefaultChannel" ,
value ( arg0 ) {
let flag = arg1 ;
let VIEW_CHANNEL = arg2 ;
const self = this ;
if ( arg1 === undefined ) {
flag = false ;
}
if ( VIEW_CHANNEL === undefined ) {
2026-07-23 10:11:24 +00:00
VIEW_CHANNEL = outer1_24 . VIEW_CHANNEL ;
2026-07-20 16:05:17 +00:00
}
2026-07-23 10:11:24 +00:00
return self . getFirstChannel ( arg0 , ( channel ) = > outer2_19 . can ( VIEW_CHANNEL , channel . channel ) , flag ) ;
2026-07-20 16:05:17 +00:00
}
} ;
items [ 6 ] = {
key : "getSFWDefaultChannel" ,
value ( arg0 ) {
let flag = arg1 ;
let VIEW_CHANNEL = arg2 ;
const self = this ;
if ( arg1 === undefined ) {
flag = false ;
}
if ( VIEW_CHANNEL === undefined ) {
2026-07-23 10:11:24 +00:00
VIEW_CHANNEL = outer1_24 . VIEW_CHANNEL ;
2026-07-20 16:05:17 +00:00
}
2026-07-23 10:11:24 +00:00
return self . getFirstChannel ( arg0 , ( channel ) = > outer2_19 . can ( VIEW_CHANNEL , channel . channel ) && ! channel . channel . nsfw , flag ) ;
2026-07-20 16:05:17 +00:00
}
} ;
items [ 7 ] = {
key : "getSelectableChannelIds" ,
value ( arg0 ) {
2026-07-23 10:11:24 +00:00
return this . getChannels ( arg0 ) [ outer1_26 ] . map ( ( channel ) = > channel . channel . id ) ;
2026-07-20 16:05:17 +00:00
}
} ;
items [ 8 ] = {
key : "getSelectableChannels" ,
value ( arg0 ) {
2026-07-23 10:11:24 +00:00
return this . getChannels ( arg0 ) [ outer1_26 ] ;
2026-07-20 16:05:17 +00:00
}
} ;
items [ 9 ] = {
key : "getVocalChannelIds" ,
value ( arg0 ) {
2026-07-23 10:11:24 +00:00
return this . getChannels ( arg0 ) [ outer1_27 ] . map ( ( channel ) = > channel . channel . id ) ;
2026-07-20 16:05:17 +00:00
}
} ;
items [ 10 ] = {
key : "getDirectoryChannelIds" ,
value ( arg0 ) {
let mapped ;
2026-07-23 10:11:24 +00:00
if ( null != outer1_33 [ arg0 ] ) {
2026-07-20 16:05:17 +00:00
mapped = arr . map ( ( channel ) = > channel . channel . id ) ;
}
if ( null == mapped ) {
2026-07-23 10:11:24 +00:00
mapped = outer1_36 ;
2026-07-20 16:05:17 +00:00
}
return mapped ;
}
} ;
items [ 11 ] = {
key : "hasSelectableChannel" ,
value ( arg0 , arg1 ) {
const selectableChannelIds = this . getSelectableChannelIds ( arg0 ) ;
return selectableChannelIds . includes ( arg1 ) ;
}
} ;
items [ 12 ] = {
key : "hasElevatedPermissions" ,
value ( arg0 ) {
2026-07-23 10:11:24 +00:00
return outer1_31 [ arg0 ] || false ;
2026-07-20 16:05:17 +00:00
}
} ;
items [ 13 ] = {
key : "hasChannels" ,
value ( arg0 ) {
return this . getChannels ( arg0 ) . count > 0 ;
}
} ;
items [ 14 ] = {
key : "hasCategories" ,
value ( arg0 ) {
2026-07-23 10:11:24 +00:00
return this . getChannels ( arg0 ) [ outer1_23 . GUILD_CATEGORY ] . length > 1 ;
2026-07-20 16:05:17 +00:00
}
} ;
items [ 15 ] = {
key : "getTextChannelNameDisambiguations" ,
value ( arg0 ) {
if ( null == arg0 ) {
2026-07-23 10:11:24 +00:00
const tmp2 = outer1_37 ;
2026-07-20 16:05:17 +00:00
}
return tmp2 ;
}
} ;
return callback ( GuildChannelStore , items ) ;
2026-07-23 10:11:24 +00:00
} ) ( require ( "initialize" ) . Store ) ;
2026-07-20 16:05:17 +00:00
tmp3 . displayName = "GuildChannelStore" ;
2026-07-23 10:11:24 +00:00
tmp3 = new tmp3 ( require ( "dispatcher" ) , {
2026-07-20 16:05:17 +00:00
BACKGROUND_SYNC : resetAllGuildChannels ,
CHANNEL_SELECT : function handleChannelSelect ( guildId ) {
guildId = guildId . guildId ;
let tmp = null ;
if ( null != guildId ) {
tmp = guildId ;
}
2026-07-23 10:11:24 +00:00
let c28 = tmp ;
2026-07-20 16:05:17 +00:00
let tmp2 = null != guildId ;
if ( tmp2 ) {
2026-07-23 10:11:24 +00:00
if ( null == table [ guildId ] ) {
2026-07-20 16:05:17 +00:00
rebuildGuildChannels ( guildId ) ;
}
tmp2 = tmp4 ;
}
return tmp2 ;
} ,
CONNECTION_OPEN : resetAllGuildChannels ,
OVERLAY_INITIALIZE : resetAllGuildChannels ,
CACHE_LOADED_LAZY : resetAllGuildChannels ,
GUILD_CREATE : handleGuildUpdates ,
GUILD_UPDATE : handleGuildUpdates ,
GUILD_DELETE : function handleGuildDelete ( arg0 ) {
2026-07-23 10:11:24 +00:00
delete tmp3 [ tmp2 ] ;
delete tmp3 [ tmp2 ] ;
delete tmp3 [ tmp2 ] ;
delete tmp [ tmp2 ] ;
2026-07-20 16:05:17 +00:00
return true ;
} ,
GUILD_MEMBER_UPDATE : function handleGuildMemberUpdate ( guildId ) {
guildId = guildId . guildId ;
if ( id . getId ( ) !== guildId . user . id ) {
return false ;
} else {
closure_29 [ guildId ] = undefined ;
2026-07-23 10:11:24 +00:00
if ( guildId === c28 ) {
2026-07-20 16:05:17 +00:00
rebuildGuildChannels ( guildId ) ;
}
}
} ,
CHANNEL_CREATE : handleChannelUpdate ,
CHANNEL_DELETE : handleChannelUpdate ,
CHANNEL_UPDATES : function handleChannelUpdates ( channels ) {
let iter3 ;
const tmp = _createForOfIteratorHelperLoose ( channels . channels ) ;
const iter = tmp ( ) ;
let iter2 = iter ;
let flag = false ;
let flag2 = false ;
if ( ! iter . done ) {
do {
let guild_id = iter2 . value . guild_id ;
if ( null != guild_id ) {
let tmp2 = closure_29 ;
closure_29 [ guild_id ] = undefined ;
2026-07-23 10:11:24 +00:00
let tmp3 = c28 ;
2026-07-20 16:05:17 +00:00
flag = true ;
2026-07-23 10:11:24 +00:00
if ( c28 === guild_id ) {
let tmp4 = rebuildGuildChannels ;
let tmp5 = rebuildGuildChannels ( guild_id ) ;
2026-07-20 16:05:17 +00:00
flag = true ;
}
}
iter3 = tmp ( ) ;
iter2 = iter3 ;
flag2 = flag ;
} while ( ! iter3 . done ) ;
}
return flag2 ;
} ,
GUILD_ROLE_CREATE : handleGuildRoleUpdate ,
GUILD_ROLE_UPDATE : handleGuildRoleUpdate ,
GUILD_ROLE_DELETE : handleGuildRoleUpdate ,
IMPERSONATE_UPDATE : handleGuildRoleUpdate ,
IMPERSONATE_STOP : handleGuildRoleUpdate ,
VOICE_CHANNEL_SELECT : function handleVoiceChannelSelect ( channelId ) {
channelId = channelId . channelId ;
if ( null == channelId ) {
2026-07-23 10:11:24 +00:00
if ( null != c32 ) {
let tmp2 = updateSelectedVoiceChannel ( store . getChannel ( c32 ) , null ) ;
2026-07-20 16:05:17 +00:00
}
return tmp2 ;
}
tmp2 = updateSelectedVoiceChannel ( store . getChannel ( channelId ) , channelId ) ;
} ,
VOICE_CHANNEL_STATUS_UPDATE : function handleVoiceChannelStatusUpdate ( id ) {
const basicChannel = store . getBasicChannel ( id . id ) ;
if ( tmp2 ) {
rebuildGuildChannels ( basicChannel . guild_id ) ;
}
} ,
VOICE_STATE_UPDATES : function handleVoiceStateUpdates ( voiceStates ) {
voiceStates = voiceStates . voiceStates ;
return voiceStates . reduce ( ( arg0 , channelId ) = > {
channelId = channelId . channelId ;
let tmp = arg0 ;
2026-07-23 10:11:24 +00:00
if ( outer1_15 . getSessionId ( ) === channelId . sessionId ) {
tmp = outer1_47 ( outer1_16 . getChannel ( channelId ) , channelId ) || arg0 ;
const tmp4 = outer1_47 ( outer1_16 . getChannel ( channelId ) , channelId ) || arg0 ;
2026-07-20 16:05:17 +00:00
}
return tmp ;
} , false ) ;
}
} ) ;
2026-07-23 10:11:24 +00:00
let result = require ( "_possibleConstructorReturn" ) . fileFinishedImporting ( "stores/GuildChannelStore.tsx" ) ;
2026-07-20 16:05:17 +00:00
export default tmp3 ;
export const GUILD_SELECTABLE_CHANNELS_KEY = "SELECTABLE" ;
export const GUILD_VOCAL_CHANNELS_KEY = "VOCAL" ;