Initial commit

This commit is contained in:
janisslsm committed 2026-07-27 16:20:00 +03:00
commit af3b49f756
16065 files changed
+2938410

No files matched your search

@@ -0,0 +1,817 @@
/* Metro module 15934; source: modules/guild_settings/native/GuildSettingsModalChannels.tsx; dependencies: [6, 7, 15, 17, 18, 31, 27, 1379, 1867, 3784, 3793, 1878, 15860, 661, 33, 4501, 6597, 697, 1244, 4002, 673, 7972, 1305, 15935, 3868, 566, 6647, 4805, 5278, 1585, 4578, 6802, 9087, 10083, 15936, 15937, 15858, 11427, 13761, 3789, 6593, 4647, 5277, 15938, 5462, 8148, 1484, 44, 4584, 2] */
function _fun122895(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#122895, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16142:6, offset: 0x02579a95, size: 996 bytes, params: 8, frame: 33
var object3;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_4 = importDefault(6) /* metro dependency 6 */;
const env0_5 = importDefault(7) /* metro dependency 7 */;
const env0_6 = importDefault(15) /* metro dependency 15 */;
const env0_7 = importDefault(17) /* metro dependency 17 */;
const env0_8 = importDefault(18) /* metro dependency 18 */;
const value = importAll(31) /* metro dependency 31 */;
const value2 = require(27) /* metro dependency 27 */;
const env0_10 = value2.View;
const StyleSheet = value2.StyleSheet;
const env0_11 = value2.TouchableHighlight;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
const permissionStore = importDefault(3784) /* metro dependency 3784: PermissionStore */;
const relationshipStore = importDefault(3793) /* metro dependency 3793: RelationshipStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const guildSettingsModalChannelsStore = importDefault(15860) /* metro dependency 15860: GuildSettingsModalChannelsStore */;
const constantsModule = require(661) /* metro dependency 661: Constants */;
const env0_18 = constantsModule.ChannelTypes;
const env0_19 = constantsModule.Permissions;
const Fonts = constantsModule.Fonts;
const env0_20 = constantsModule.NULL_STRING_CHANNEL_ID;
const value4 = require(33) /* metro dependency 33 */;
const env0_21 = value4.jsx;
const env0_22 = value4.jsxs;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createLegacyClassComponentStyles = createStylesModule.createLegacyClassComponentStyles;
object3 = {};
const object5 = {};
const textStyles = importDefault(6597) /* metro dependency 6597: TextStyles */;
let PRIMARY_SEMIBOLD = Fonts.PRIMARY_SEMIBOLD;
const MOBILE_TEXT_HEADING_PRIMARY = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_TEXT_HEADING_PRIMARY;
copyDataProperties(object5, textStyles(PRIMARY_SEMIBOLD, MOBILE_TEXT_HEADING_PRIMARY, 16), undefined);
object5['textTransform'] = 'capitalize';
object3.headerRight = object5;
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object3.containerView = {flex: 1, backgroundColor: BACKGROUND_BASE_LOW};
const object6 = {};
const value7 = textStyles;
const DISPLAY_EXTRABOLD = Fonts.DISPLAY_EXTRABOLD;
let TEXT_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_SUBTLE;
copyDataProperties(object6, value7(DISPLAY_EXTRABOLD, TEXT_SUBTLE, 12, {uppercase: true}), 12);
object3.categoryText = object6;
object3.categoryView = {'paddingTop': 36, 'paddingBottom': 8};
object3.sortingCategoryView = {paddingTop: 16};
const object8 = {};
const value8 = textStyles;
PRIMARY_SEMIBOLD = Fonts.PRIMARY_SEMIBOLD;
TEXT_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_SUBTLE;
copyDataProperties(object8, value8(PRIMARY_SEMIBOLD, TEXT_SUBTLE, 14), 12);
object3.edit = object8;
object3.row = {marginTop: -StyleSheet.hairlineWidth};
object3.formRowStyle = {paddingVertical: 12};
const GREEN_360 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.GREEN_360;
object3.dropHighlight = {backgroundColor: GREEN_360, opacity: 0.3};
object3.floatingActionButtonContainer = {'position': 'absolute', 'bottom': 16, 'right': 0, 'left': 0,
'flexDirection': 'row', 'justifyContent': 'center'};
const env0_23 = Reflect.apply(createLegacyClassComponentStyles, createStylesModule, [object3]);
let PureComponent = value.PureComponent;
const value9 = _fun122909(PureComponent);
const ThemeContext = (require(3868) /* metro dependency 3868: native */).ThemeContext;
value9.contextType = ThemeContext;
PureComponent = value.PureComponent;
_fun122914(PureComponent).contextType = ThemeContext;
PureComponent = value.PureComponent;
_fun122917(PureComponent).contextType = ThemeContext;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_settings/native/GuildSettingsModalChannels.tsx');
exports.default = GuildSettingsModalChannelsConnected;
}
function _callSuper_122896(a0, a1, a2) { // fn#122896, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16142:387, offset: 0x02579e79, size: 100 bytes, params: 4, frame: 20
var r0;
var Reflect;
let value = a2;
const value3 = env0_7(a1);
const binding = env0_6;
if (_isNativeReflectConstruct_122897()) {
Reflect = global.Reflect;
value = Reflect.construct(value3, value || [], env0_7(a0).constructor);
r0 = value;
} else {
value = value3.apply(a0, value);
r0 = value;
}
return binding(a0, r0);
}
function _isNativeReflectConstruct_122897() { // fn#122897, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16142:518, offset: 0x02579edd, size: 98 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
}
return (_isNativeReflectConstruct_122897_isNativeReflectConstruct = function() {
return !!result;
})();
}
function ChannelItem({style, channelIconStyle, actionIconStyle, channel, sortingEnabled, onPress, sortHandlers}) { // fn#122900, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16142:2482, offset: 0x02579f3f, size: 783 bytes, params: 2, frame: 38
var object2;
const value3 = (require(4501) /* metro dependency 4501: createStyles */).useLegacyClassComponentStyles(env0_23);
const sharedModule = require(4002) /* metro dependency 4002: shared */;
const useThemeContext = sharedModule.useThemeContext;
const theme = Reflect.apply(useThemeContext, sharedModule, []).theme;
const value4 = (require(566) /* metro dependency 566: flux */).useStateFromStores([PermissionStore], _fun122901,
[channel]);
sortHandlers = !value4 ? undefined : sortHandlers;
const channelIcon = (require(6647) /* metro dependency 6647: ChannelUtils */).getChannelIcon(channel);
const channelIconComponent = (require(6647) /* metro dependency 6647: ChannelUtils */).getChannelIconComponent(channel);
object2 = {accessibilityRole: 'button'};
const isThemeDark2 = sharedModule.isThemeDark(theme);
const colorUtilsModule = require(673) /* metro dependency 673: ColorUtils */;
const hex2rgb = colorUtilsModule.hex2rgb;
const unsafe_rawColors = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors;
let r7 = isThemeDark2 ? Reflect.apply(hex2rgb, colorUtilsModule, [unsafe_rawColors.PRIMARY_700,
0.6]) : Reflect.apply(hex2rgb, colorUtilsModule, [unsafe_rawColors.PRIMARY_200, 0.6]);
object2.underlayColor = r7 ?? undefined;
object2.style = style;
copyDataProperties(object2, sortHandlers, undefined);
r7 = sortingEnabled ? value4 ? null : {opacity: 0.3} : null;
const FormRow = (require(7972) /* metro dependency 7972: native */).FormRow;
const formRowProps = {leading: channelIconComponent != null ? ((Component) => <Component style={channelIconStyle} size="sm" />)(channelIconComponent) : ((Icon) => <Icon size={(require(1305) /* metro dependency 1305: native */).Icon.Sizes.SMALL_20} source={channelIcon} style={channelIconStyle} />)((require(7972) /* metro dependency 7972: native */).FormRow.Icon),
style: value3.formRowStyle};
const useChannelNameModule = require(4805) /* metro dependency 4805: useChannelName */;
formRowProps.label = useChannelNameModule.computeChannelName(channel, UserStore, RelationshipStore);
formRowProps.onPress = sortingEnabled ? undefined : function() {
return onPress(channel.id);
};
formRowProps.trailing = value4 && sortingEnabled ? ((Icon) => <Icon source={importDefault(15935) /* metro dependency 15935 */} style={actionIconStyle} />)((require(7972) /* metro dependency 7972: native */).FormRow.Icon) : null;
formRowProps.numberOfLines = sortingEnabled ? 1 : undefined;
return (
<TouchableHighlight {...object2}>
<View style={r7}>
<FormRow {...formRowProps} />
</View>
</TouchableHighlight>
);
}
function isValidDrop(a0, a1) { // fn#122903, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16142:4048, offset: 0x0257a2be, size: 110 bytes, params: 3, frame: 16
return a0 != null && (a0.parentId == null ? PermissionStore.can(Permissions.MANAGE_CHANNELS,
a1) : PermissionStore.can(Permissions.MANAGE_CHANNELS, ChannelStore.getChannel(a0.parentId)));
}
function CreateButton({guild}) { // fn#122904, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16142:4186, offset: 0x0257a32c, size: 332 bytes, params: 2, frame: 24
var r0;
var Button;
var intl;
const value2 = (require(4501) /* metro dependency 4501: createStyles */).useLegacyClassComponentStyles(env0_23);
const value3 = env0_9.useMemo(function() {
return {bottom: 16 + bottom};
}, [(importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)().bottom]);
const can = PermissionStore.can;
const MANAGE_CHANNELS = Permissions.MANAGE_CHANNELS;
if (Reflect.apply(can, PermissionStore, [MANAGE_CHANNELS, guild])) {
var viewBindingProps = {style: [value2.floatingActionButtonContainer, value3]};
Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
r0 = <View {...viewBindingProps}><Button text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.CumH4u)} onPress={onPress_122906} icon={((PlusSmallIcon) => <PlusSmallIcon color="white" />)((require(10083) /* metro dependency 10083: PlusSmallIcon */).PlusSmallIcon)} /></View>;
} else {
r0 = null;
}
return r0;
}
function _fun122909(a0) { // fn#122909, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16142:1475, offset: 0x0257a608, size: 72 bytes, params: 2, frame: 15
const closure = Category;
env0_8(closure, a0);
return env0_5(closure, [{key: 'render', value: value_122911}]);
}
function _fun122914(a0) { // fn#122914, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16142:3620, offset: 0x0257a912, size: 72 bytes, params: 2, frame: 15
const closure = SectionEditAction;
env0_8(closure, a0);
return env0_5(closure, [{key: 'render', value: value_122916}]);
}
function _fun122917(a0) { // fn#122917, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16142:4937, offset: 0x0257a9fe, size: 199 bytes, params: 2, frame: 16
const closure = GuildSettingsModalChannels;
env0_8(closure, a0);
return env0_5(closure, [{key: 'componentDidMount', value: function() {
this.updateNavigation();
}}, {key: 'componentDidUpdate', value: function(a0) {
this.updateNavigation(a0);
}}, {key: 'updateNavigation', value: value_122934}, {key: 'render', value: value_122938},
{key: 'handleChannelPress', value: value_122942}, {key: 'handleSortStop', value: value_122943}]);
}
function GuildSettingsModalChannelsConnected({guildId, contentContainerStyle}) { // fn#122944, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16142:10252, offset: 0x0257baa9, size: 485 bytes, params: 2, frame: 26
const value2 = (require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation();
const guild = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildStore], function() {
return GuildStore.getGuild(guildId);
});
const channels = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildSettingsModalChannelsStore],
function() {
return GuildSettingsModalChannelsStore.channels;
});
const currentUser = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], _fun122947);
const channelList = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildSettingsModalChannelsStore],
function() {
return GuildSettingsModalChannelsStore.channelList;
});
const order = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildSettingsModalChannelsStore],
function() {
return GuildSettingsModalChannelsStore.order;
});
const sortingType = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildSettingsModalChannelsStore],
function() {
return GuildSettingsModalChannelsStore.sortingType;
});
const value3 = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)();
const binding = env0_9;
const useMemo = binding.useMemo;
return order == null || channelList == null || (channels == null || guild == null) || currentUser == null ? null : ((Component) => <Component navigation={value2} guild={guild} channels={channels} user={currentUser} channelList={channelList} order={order} sortingType={sortingType} contentContainerStyle={Reflect.apply(useMemo,
binding, [_fun122951, [contentContainerStyle, value3.bottom,
sortingType]])} fontScale={(require(4584) /* metro dependency 4584: useFontScale */).useFontScale()} />)(env0_26);
}
function _fun122901() { // fn#122901, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16142:2723, offset: 0x0257a24e, size: 112 bytes, params: 1, frame: 15
return channel.parent_id == null ? PermissionStore.canWithPartialContext(Permissions.MANAGE_CHANNELS,
{guildId: channel.guild_id}) : PermissionStore.canWithPartialContext(Permissions.MANAGE_CHANNELS,
{channelId: channel.parent_id});
}
function CreateButtonOnPress() { // fn#122906, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16142:4488, owner: CreateButton.onPress, offset: 0x0257a48e, size: 254 bytes, params: 1, frame: 20
var environment;
let value = environment.__proto__;
value = require(6802) /* metro dependency 6802: showSimpleActionSheet */;
const showSimpleActionSheet = value.showSimpleActionSheet;
const object2 = {key: 'GuildSettingsChannelsCreate'};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const CumH4u = t.CumH4u;
object2.header = {title: Reflect.apply(string, intl, [CumH4u])};
string = intl.string;
const GK18KJ = t.GK18KJ;
object2.options = [{label: intl.string(t.vHCZwr), onPress: function() {
var defaultImport = importDefault(dependencyMap[32]);
var GUILD_CATEGORY = ChannelTypes.GUILD_CATEGORY;
defaultImport.open(GUILD_CATEGORY, guild.id, null, null);
}}, {label: Reflect.apply(string, intl, [GK18KJ]), onPress: onPress_122908}];
object2.hasIcons = false;
Reflect.apply(showSimpleActionSheet, value, [object2]);
}
function Category() { // fn#122910, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16142:1487, offset: 0x0257a650, size: 42 bytes, params: 1, frame: 16
env1_4(this, Category);
return _callSuper_122896(this, Category, arguments);
}
function value_122911() { // fn#122911, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16142:1620, offset: 0x0257a67a, size: 596 bytes, params: 1, frame: 30
var environment;
const value = environment.__proto__;
const binding = env1_23;
const context = this.context;
const value2 = undefined;
const value3 = binding(context);
const {category, onPress, sortingEnabled, editStyle, actionIconStyle} = this.props;
const value4 = null;
const sortHandlers = sortingEnabled ? this.props.sortHandlers : value4;
const object3 = {accessibilityRole: 'button'};
const object4 = {name: 'activate'};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object4.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.bt75uw);
object3.accessibilityActions = [object4];
object3.onAccessibilityAction = function(a0) {
return a0.nativeEvent.actionName !== 'activate' || onPress == null ? undefined : onPress(category.id);
};
const sharedModule = require(4002) /* metro dependency 4002: shared */;
const isThemeDark2 = sharedModule.isThemeDark(this.context.theme);
const colorUtilsModule = require(673) /* metro dependency 673: ColorUtils */;
const hex2rgb = colorUtilsModule.hex2rgb;
const unsafe_rawColors = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors;
const r5 = isThemeDark2 ? Reflect.apply(hex2rgb, colorUtilsModule, [unsafe_rawColors.PRIMARY_700,
0.6]) : Reflect.apply(hex2rgb, colorUtilsModule, [unsafe_rawColors.PRIMARY_200, 0.6]);
object3.underlayColor = value4 != r5 ? r5 : value2;
copyDataProperties(object3, sortHandlers, intl);
const FormTitle = (require(7972) /* metro dependency 7972: native */).FormTitle;
return (
<TouchableHighlight {...object3}>
<View>
<FormTitle
title={category.name}
numberOfLines={1}
textStyle={value3.categoryText}
viewStyle={[value3.categoryView, sortingEnabled ? value3.sortingCategoryView : value4]}
icon={value4 != onPress ? ((Component) => <Component style={editStyle} onPress={function() {
return onPress(category.id);
}} />)(env1_25) : value4 != sortHandlers ? ((Icon) => <Icon source={importDefault(15935) /* metro dependency 15935 */} style={actionIconStyle} />)((require(1305) /* metro dependency 1305: native */).Icon) : value4}
/>
</View>
</TouchableHighlight>
);
}
function value_122916() { // fn#122916, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16142:3810, offset: 0x0257a95a, size: 164 bytes, params: 1, frame: 21
const {style, onPress} = this.props;
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
const LegacyText = (require(1305) /* metro dependency 1305: native */).LegacyText;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
return (
<PressableOpacity accessibilityRole="button" onPress={onPress}>
<LegacyText style={style}>
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.bt75uw)}
</LegacyText>
</PressableOpacity>
);
}
function GuildSettingsModalChannels(a0) { // fn#122918, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16142:4949, offset: 0x0257aac5, size: 159 bytes, params: 2, frame: 18
let value = copyRestArgs(0, undefined);
env1_4(this, GuildSettingsModalChannels);
const _callSuper_122896Binding = _callSuper_122896;
const items = [];
arraySpread(items, value, 0, undefined);
value = _callSuper_122896Binding(this, GuildSettingsModalChannels, items);
value.state = {hovering: null};
value.renderActiveDivider = renderActiveDivider;
value.renderSectionHeader = renderSectionHeader_122920;
value.renderItem = renderItem_122921;
value.handleHoverChange = handleHoverChange;
value.handleSortStart = handleSortStart;
value.handleDrop = handleDrop;
return value;
}
function value_122934(a0) { // fn#122934, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16142:8356, offset: 0x0257b54e, size: 311 bytes, params: 2, frame: 24
var environment;
var r7;
var r4;
var setOptions;
var object2;
var moduleValue;
var intl;
const value = environment.__proto__;
const binding = env1_23;
const context = this.context;
const value2 = undefined;
const env0_1 = binding(context);
const {sortingType, order, navigation, guild, channels, user} = this.props;
let r1 = a0 != null && sortingType === a0.sortingType && order === a0.order;
r1 = r1 && guild === a0.guild && channels === a0.channels;
if (!r1) {
setOptions = navigation.setOptions;
object2 = {};
object2.headerLeft = sortingType != null ? function() {
return null;
} : value2;
if (sortingType != null) {
r7 = _fun122936;
} else {
moduleValue = importAll(3789) /* metro dependency 3789: PermissionUtils */;
r7 = moduleValue.canManageACategory(user, guild, channels._categories) ? _fun122937 : value2;
}
object2.headerRight = r7;
if (sortingType != null) {
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
r4 = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.OGiMXJ);
} else {
r4 = value2;
}
object2.headerTitle = r4;
Reflect.apply(setOptions, navigation, [object2]);
}
return value2;
}
function value_122938() { // fn#122938, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16142:9032, offset: 0x0257b787, size: 355 bytes, params: 1, frame: 25
const value2 = env1_23(this.context);
const {channels, order, sortingType, guild} = this.props;
const value3 = ((a0, a1, a2) => {
var env0_0 = a0;
var env0_1 = a1;
var env0_2 = a2;
if (a0 != null) {
var env0_4 = -1;
a0._categories.forEach(_fun122940);
}
return [];
})(channels, sortingType, this.state.hovering);
const containerView = value2.containerView;
const SortableChannels = importDefault(15938) /* metro dependency 15938: SortableChannels */;
const renderSectionHeader = this.renderSectionHeader;
const renderItem = this.renderItem;
const handleDrop = this.handleDrop;
const items2 = [NULL_STRING_CHANNEL_ID];
arraySpread(items2, order, 1, order);
const sortableChannels = <SortableChannels sections={value3} sortingEnabled={sortingType != null} renderSectionHeader={renderSectionHeader} renderItem={renderItem} onRowMoved={handleDrop} order={items2} onHoverChange={this.handleHoverChange} renderActiveDivider={this.renderActiveDivider} contentContainerStyle={this.props.contentContainerStyle} fontScale={this.props.fontScale} />;
const r6 = sortingType == null && <CreateButton guild={guild} />;
const NavScrim = (require(5462) /* metro dependency 5462: NavScrimAndroid */).NavScrim;
return (
<View style={containerView}>
{sortableChannels}
{r6}
<NavScrim />
</View>
);
}
function value_122942(a0) { // fn#122942, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16142:9992, offset: 0x0257ba5b, size: 41 bytes, params: 2, frame: 12
const value = environment.__proto__;
(require(8148) /* metro dependency 8148: ChannelSettingsActionCreators */).open(a0);
}
function value_122943() { // fn#122943, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16142:10051, offset: 0x0257ba84, size: 37 bytes, params: 1, frame: 11
const value = environment.__proto__;
(importDefault(15858) /* metro dependency 15858: GuildSettingsModalChannelsActionCreators */).stopReordering();
}
function _fun122947() { // fn#122947, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16142:10507, offset: 0x0257bcb8, size: 58 bytes, params: 1, frame: 14
const value = environment.__proto__;
const currentUser = UserStore.getCurrentUser();
(importDefault(44) /* metro dependency 44 */)(currentUser != null,
'GuildSettingsModalChannelsConnected: currentUser cannot be undefined');
return currentUser;
}
function _fun122951() { // fn#122951, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16142:10823, offset: 0x0257bd1f, size: 70 bytes, params: 1, frame: 5
return sortingType == null ? [contentContainerStyle,
{paddingBottom: env0_3.bottom + 32 + 44}] : contentContainerStyle;
}
function onPressOnPress_body_122908() { // fn#122908, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16142:4776, owner: CreateButton.onPress.body, offset: 0x0257a5ce, size: 58 bytes, params: 1, frame: 16
let value = environment.__proto__.__proto__;
value = importDefault(9087) /* metro dependency 9087: CreateChannelModalActionCreators */;
value.open(null, guild.id, null, null);
}
function GuildSettingsModalChannelsRenderActiveDivider(a0, a1, a2) { // fn#122919, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16142:5138, owner: GuildSettingsModalChannels.renderActiveDivider, offset: 0x0257ab64, size: 268 bytes, params: 4, frame: 26
const value = environment.__proto__.__proto__;
const binding = env2_23;
const binding2 = env0_0;
const value3 = binding(binding2.context);
const {sortingType, order, channelList, guild} = binding2.props;
const value4 = null;
if (value4 == sortingType) {
return value4;
}
if (value4 == order) {
return value4;
}
if (value4 == channelList) {
return value4;
}
const localChannel = GuildSettingsModalChannelsStore.getLocalChannel(a1);
const r10 = value4 != a2 ? GuildSettingsModalChannelsStore.getLocalChannel(a2) : value4;
const r9 = value4 != a2 ? order.indexOf(a2) : -1;
const value9 = order.indexOf(a1);
const isValidDropBinding = isValidDrop;
const channelSortingUtilsModule = require(15936) /* metro dependency 15936: ChannelSortingUtils */;
const getDropData = channelSortingUtilsModule.getDropData;
return isValidDropBinding(Reflect.apply(getDropData, channelSortingUtilsModule, [r10, r9, localChannel, value9,
channelList]), guild) ? <View style={[value3.dropHighlight, {height: a0}]} /> : value4;
}
function GuildSettingsModalChannelsRenderSectionHeader(a0) { // fn#122920, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16142:5498, owner: GuildSettingsModalChannels.renderSectionHeader, offset: 0x0257ac70, size: 246 bytes, params: 2, frame: 22
var r0;
var object2;
const id = a0.section.category.id;
const value = environment.__proto__.__proto__;
let binding = env2_23;
const binding2 = env0_0;
const context = binding2.context;
const value3 = undefined;
const value4 = binding(context);
const {sortingType, channels} = binding2.props;
const value5 = null;
let r9 = id === 'null' ? value5 : GuildSettingsModalChannelsStore.getLocalChannel(id);
if (value5 != r9) {
binding = env2_24;
object2 = {category: r9};
r9 = value5 != sortingType && sortingType.has(ChannelTypes.GUILD_CATEGORY);
object2.sortingEnabled = r9;
object2.editStyle = value4.edit;
object2.onPress = value5 == sortingType ? env0_0.handleChannelPress : value3;
r0 = ((Component) => <Component {...object2} />)(binding);
} else {
r0 = <View style={value5 == sortingType && channels.null.length > 0 ? {marginTop: 36} : value5} />;
}
return r0;
}
function GuildSettingsModalChannelsRenderItem(a0) { // fn#122921, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16142:5841, owner: GuildSettingsModalChannels.renderItem, offset: 0x0257ad66, size: 124 bytes, params: 2, frame: 19
const {channel, sortingType} = a0.item;
const value = environment.__proto__.__proto__;
return channel != null ? <ChannelItem channel={channel} sortingEnabled={sortingType != null} onPress={env0_0.handleChannelPress} style={env2_23(env0_0.context).row} /> : <View />;
}
function handleHoverChange(a0) { // fn#122922, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16142:6032, owner: GuildSettingsModalChannels.handleHoverChange, offset: 0x0257ade2, size: 32 bytes, params: 2, frame: 12
env0_0.setState({hovering: a0});
}
function handleSortStart() { // fn#122923, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16142:6080, owner: GuildSettingsModalChannels.handleSortStart, offset: 0x0257ae02, size: 452 bytes, params: 1, frame: 21
var environment;
var push;
var object4;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const guild = env0_0.props.guild;
const items2 = [];
let value = environment.__proto__.__proto__;
const can = PermissionStore.can;
const MANAGE_CHANNELS = Permissions.MANAGE_CHANNELS;
if (Reflect.apply(can, PermissionStore, [MANAGE_CHANNELS, guild])) {
push = items2.push;
object4 = {};
object4.label = intl.string(t.ffgJrs);
object4.icon = importDefault(15937) /* metro dependency 15937 */;
object4.onPress = function() {
importDefault(dependencyMap[36]).startReordering(ChannelTypes.GUILD_CATEGORY);
};
Reflect.apply(push, items2, [object4]);
}
push = items2.push;
const object6 = {};
object6.label = intl.string(t.nIfr0Y);
object6.icon = importDefault(11427) /* metro dependency 11427 */;
object6.onPress = function() {
var defaultImport = importDefault(dependencyMap[36]);
var GUILD_TEXT = ChannelTypes.GUILD_TEXT;
var GUILD_ANNOUNCEMENT = ChannelTypes.GUILD_ANNOUNCEMENT;
var GUILD_FORUM = ChannelTypes.GUILD_FORUM;
defaultImport.startReordering(GUILD_TEXT, GUILD_ANNOUNCEMENT, GUILD_FORUM, ChannelTypes.GUILD_MEDIA);
};
Reflect.apply(push, items2, [object6]);
push = items2.push;
const object7 = {};
const string = intl.string;
const CYnO4s = t.CYnO4s;
object7.label = Reflect.apply(string, intl, [CYnO4s]);
object7.icon = importDefault(13761) /* metro dependency 13761 */;
object7.onPress = function() {
var defaultImport = importDefault(dependencyMap[36]);
var GUILD_VOICE = ChannelTypes.GUILD_VOICE;
defaultImport.startReordering(GUILD_VOICE, ChannelTypes.GUILD_STAGE_VOICE);
};
Reflect.apply(push, items2, [object7]);
value = require(6802) /* metro dependency 6802: showSimpleActionSheet */;
const showSimpleActionSheet = value.showSimpleActionSheet;
const object8 = {};
object8.title = intl.string(t['0dOFq+']);
Reflect.apply(showSimpleActionSheet, value, [{key: 'GuildSettingsChannelsSort', header: object8, options: items2,
hasIcons: true}]);
}
function handleDrop(a0) { // fn#122927, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16142:6732, owner: GuildSettingsModalChannels.handleDrop, offset: 0x0257b081, size: 735 bytes, params: 2, frame: 33
var r3;
var referenceId;
var moduleValue2;
var getDnDUpdates;
var parentId;
var value8;
var parent_id;
var closure;
var value9;
var defaultImport;
var show;
var object3;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var format;
var property;
var object4;
const {order, channels, channelList, guild} = env0_0.props;
const localChannel = GuildSettingsModalChannelsStore.getLocalChannel(order[a0.from]);
const localChannel2 = GuildSettingsModalChannelsStore.getLocalChannel(order[a0.to]);
const dropData = (require(15936) /* metro dependency 15936: ChannelSortingUtils */).getDropData(localChannel,
a0.from, localChannel2, a0.to, channelList);
const value5 = null;
if (value5 != dropData) {
if (localChannel2 !== localChannel) {
if (value5 != localChannel) {
if (value5 != localChannel2) {
if (isValidDrop(dropData, guild)) {
referenceId = dropData.referenceId;
moduleValue2 = require(15936) /* metro dependency 15936: ChannelSortingUtils */;
getDnDUpdates = moduleValue2.getDnDUpdates;
r3 = value5 != referenceId ? GuildSettingsModalChannelsStore.getLocalChannel(referenceId) : value5;
parentId = dropData.parentId;
value8 = Reflect.apply(getDnDUpdates, moduleValue2, [localChannel, r3, parentId,
channels]).filter(_fun122928);
parent_id = localChannel.parent_id;
parentId = dropData.parentId;
if (parent_id !== parentId) {
value8.find(_fun122929);
}
closure = onCancel_122930;
if (value5 != env0_2) {
value9 = ChannelStore.getChannel(env0_2.parent_id);
defaultImport = importDefault(4647) /* metro dependency 4647: AlertActionCreators */;
show = defaultImport.show;
object3 = {};
object3.title = intl.string(t.YWMtRe);
format = intl.format;
property = t['iKW+jY'];
object4 = {};
object4.channelName = (require(4805) /* metro dependency 4805: useChannelName */).computeChannelName(localChannel,
UserStore, RelationshipStore, true);
object4.categoryName = value5 != value9 ? (require(4805) /* metro dependency 4805: useChannelName */).computeChannelName(value9,
UserStore, RelationshipStore) : '';
object3.body = Reflect.apply(format, intl, [property, object4]);
object3.confirmText = intl.string(t.eW8Gy4);
object3.cancelText = intl.string(t.s4uM3b);
object3.onConfirm = onConfirm_122931;
object3.onCancel = closure;
Reflect.apply(show, defaultImport, [object3]);
} else {
closure();
}
}
}
}
}
}
}
function _fun122936() { // fn#122936, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16142:8615, offset: 0x0257b685, size: 130 bytes, params: 1, frame: 19
const HeaderActionButton = (require(5277) /* metro dependency 5277: HeaderActionButtonNative */).HeaderActionButton;
const headerRight = env0_1.headerRight;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
return (
<HeaderActionButton
textStyle={headerRight}
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.i4jeWR)}
onPress={env0_0.handleSortStop}
/>
);
}
function _fun122937() { // fn#122937, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16142:8796, offset: 0x0257b707, size: 128 bytes, params: 1, frame: 19
const HeaderActionButton = (require(5277) /* metro dependency 5277: HeaderActionButtonNative */).HeaderActionButton;
const headerRight = env0_1.headerRight;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
return (
<HeaderActionButton
textStyle={headerRight}
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['0dOFq+'])}
onPress={env0_0.handleSortStart}
/>
);
}
function getListViewData(a0, a1, a2) { // fn#122939, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16142:9129, owner: value_122938.getListViewData, offset: 0x0257b8ea, size: 74 bytes, params: 4, frame: 12
const env0_0 = a0;
const env0_1 = a1;
const env0_2 = a2;
if (a0 != null) {
a0._categories.forEach(_fun122940);
}
return [];
}
function _fun122928({id}) { // fn#122928, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16142:7061, offset: 0x0257b360, size: 141 bytes, params: 2, frame: 15
const value = environment.__proto__.__proto__.__proto__;
const channel = ChannelStore.getChannel(id);
if (channel == null) {
return false;
}
const channel2 = ChannelStore.getChannel(channel.parent_id);
const type = channel.type;
const GUILD_CATEGORY = ChannelTypes.GUILD_CATEGORY;
return type === GUILD_CATEGORY || channel2 == null ? PermissionStore.can(Permissions.MANAGE_CHANNELS,
guild) : PermissionStore.can(Permissions.MANAGE_CHANNELS, channel2);
}
function _fun122929(a0) { // fn#122929, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16142:7279, offset: 0x0257b3ed, size: 244 bytes, params: 2, frame: 21
var r2;
var moduleValue;
var areChannelsLocked;
var binding;
var value4;
var moduleValue2;
var value5;
if (a0.id !== env0_1.id) {
return false;
}
let getChannel = ChannelStore.getChannel;
let parent_id = a0.parent_id;
const value3 = Reflect.apply(getChannel, ChannelStore, [parent_id]);
if (value3 != null) {
var can = PermissionStore.can;
var MANAGE_ROLES = Permissions.MANAGE_ROLES;
if (Reflect.apply(can, PermissionStore, [MANAGE_ROLES, env0_1])) {
if (PermissionStore.can(Permissions.MANAGE_ROLES, value3)) {
moduleValue = importAll(3789) /* metro dependency 3789: PermissionUtils */;
areChannelsLocked = moduleValue.areChannelsLocked;
binding = env0_1;
value4 = Reflect.apply(areChannelsLocked, moduleValue, [binding, value3]);
moduleValue2 = importAll(3789) /* metro dependency 3789: PermissionUtils */;
areChannelsLocked = moduleValue2.areChannelsLocked;
getChannel = ChannelStore.getChannel;
parent_id = binding.parent_id;
value5 = Reflect.apply(areChannelsLocked, moduleValue2, [binding, Reflect.apply(getChannel,
ChannelStore,
[parent_id])]);
parent_id = binding.parent_id;
r2 = parent_id == null && !value4;
r2 = !r2 ? value5 && !value4 : r2;
if (r2) {
env0_2 = a0;
}
return true;
}
return true;
}
}
return true;
}
function handleDropOnCancel() { // fn#122930, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16142:7574, owner: GuildSettingsModalChannels.handleDrop.onCancel, offset: 0x0257b4e1, size: 82 bytes, params: 1, frame: 16
let value = environment.__proto__.__proto__.__proto__;
(importDefault(15858) /* metro dependency 15858: GuildSettingsModalChannelsActionCreators */).localChannelUpdate(env0_3);
value = importDefault(6593) /* metro dependency 6593: GuildActionCreators */;
value.batchChannelUpdate(env0_1.guild_id, env0_3);
}
function handleDropOnConfirm() { // fn#122931, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16142:8030, owner: GuildSettingsModalChannels.handleDrop.onConfirm, offset: 0x0257b533, size: 27 bytes, params: 1, frame: 10
env0_2.lock_permissions = true;
onCancel_122930();
}
function _fun122940({channel}) { // fn#122940, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16142:9229, offset: 0x0257b934, size: 160 bytes, params: 2, frame: 15
var environment;
var value;
var value2;
var object2;
var binding;
let id = channel.id;
if (id === 'null') {
value2 = env0_4 + 1;
object2 = {data: [], category: channel};
id = channel.id;
object2.key = id;
object2.index = value2;
binding = object2;
id = channel.id;
binding[id].forEach(_fun122941);
binding = env0_3;
binding.push(object2);
} else {
value = environment.__proto__.__proto__.__proto__;
if (PermissionStore.can(Permissions.VIEW_CHANNEL, channel)) {
value2 = env0_4 + 1;
object2 = {data: [], category: channel};
id = channel.id;
object2.key = id;
object2.index = value2;
binding = object2;
id = channel.id;
binding[id].forEach(_fun122941);
binding = env0_3;
binding.push(object2);
}
}
}
function _fun122941({channel}) { // fn#122941, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16142:9354, offset: 0x0257b9d4, size: 135 bytes, params: 2, frame: 14
var binding;
var value4;
var data;
var push;
var object2;
var id;
if (require == null || require.has(channel.type)) {
binding = env1_4;
value4 = typeof binding === 'bigint' ? binding + 1n : +binding + 1;
data = env0_0.data;
push = data.push;
object2 = {};
id = channel.id;
object2.key = id;
object2.channel = channel;
object2.sortingType = require;
id = channel.id;
object2.isHovered = importDefault === id;
object2.index = value4;
Reflect.apply(push, data, [object2]);
}
}