This commit is contained in:
janisslsm committed 2026-07-28 01:06:53 +03:00
1 parent af3b49f756
commit 1781d25a15
22448 files changed
+2731829 -2650550

No files matched your search

@@ -1,369 +1,417 @@
/* Metro module 15213; source: components_native/channel_settings/ChannelSettingsChangeCategory.tsx; dependencies: [57, 862, 6, 7, 15, 17, 18, 31, 1379, 5098, 1867, 3784, 3793, 1878, 661, 33, 4501, 697, 5099, 11879, 3789, 6593, 4647, 1244, 4805, 6238, 6231, 7972, 4572, 4573, 3868, 566, 1484, 44, 2] */
import ClassCallCheck from '../../by-id/module-00006-ClassCallCheck.js'; /* Metro dependency 6 */
import CreateClass from '../../by-id/module-00007-CreateClass.js'; /* Metro dependency 7 */
import PossibleConstructorReturn from '../../by-id/module-00015-PossibleConstructorReturn.js'; /* Metro dependency 15 */
import Module00017 from '../../by-id/module-00017.js'; /* Metro dependency 17 */
import Inherits from '../../by-id/module-00018-Inherits.js'; /* Metro dependency 18 */
import Module00044 from '../../by-id/module-00044.js'; /* Metro dependency 44 */
import Module00057 from '../../by-id/module-00057.js'; /* Metro dependency 57 */
import Native from '../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import Module00862 from '../../by-id/module-00862.js'; /* Metro dependency 862 */
import ChannelStore from '../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import GuildStore from '../../stores/GuildStore.tsx'; /* Metro dependency 1867 */
import UserStore from '../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import PermissionStore from '../../stores/PermissionStore.tsx'; /* Metro dependency 3784 */
import RelationshipStore from '../../stores/RelationshipStore.tsx'; /* Metro dependency 3793 */
import GuildCategoryStore from '../../stores/GuildCategoryStore.tsx'; /* Metro dependency 5098 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as ConstantsModule from '../../Constants.tsx'; /* Metro dependency 661 */
import * as IndexNativeModule from '../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as UseNavigationNativeModule from '../../design/components/Navigator/native/useNavigation.native.tsx'; /* Metro dependency 1484 */
import * as NativeModule from '../../external/discord_common/js/packages/design/native.tsx'; /* Metro dependency 3868 */
import * as CreateStylesModule from '../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as StackNativeModule from '../../design/components/Stack/native/Stack.native.tsx'; /* Metro dependency 4572 */
import * as TextModule from '../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as TableRowNativeModule from '../../design/components/TableRow/native/TableRow.native.tsx'; /* Metro dependency 6238 */
import * as NativeModule2 from '../../design/void/Form/native/index.tsx'; /* Metro dependency 7972 */
import * as DragAndDropUtilsModule from '../../utils/DragAndDropUtils.tsx'; /* Metro dependency 11879 */
function _fun116362(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#116362, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15410:6, offset: 0x024866f1, size: 567 bytes, params: 8, frame: 23
var object3;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_4 = importDefault(57) /* metro dependency 57 */;
const env0_5 = importDefault(862) /* metro dependency 862 */;
const env0_6 = importDefault(6) /* metro dependency 6 */;
const env0_7 = importDefault(7) /* metro dependency 7 */;
const env0_8 = importDefault(15) /* metro dependency 15 */;
const env0_9 = importDefault(17) /* metro dependency 17 */;
const env0_10 = importDefault(18) /* metro dependency 18 */;
let value = importAll(31) /* metro dependency 31 */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const guildCategoryStore = importDefault(5098) /* metro dependency 5098: GuildCategoryStore */;
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 env0_17 = (require(661) /* metro dependency 661: Constants */).Permissions;
const value2 = require(33) /* metro dependency 33 */;
const env0_18 = value2.jsx;
const env0_19 = value2.jsxs;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createLegacyClassComponentStyles = createStylesModule.createLegacyClassComponentStyles;
object3 = {};
const object4 = {flex: 1};
const BACKGROUND_BASE_LOWER = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWER;
object4.backgroundColor = BACKGROUND_BASE_LOWER;
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object4.paddingTop = PX_16;
object3.screenContainer = object4;
const TABLE_ROW_PADDING = (importDefault(697) /* metro dependency 697: native */).modules.mobile.TABLE_ROW_PADDING;
object3.stackPadding = {paddingHorizontal: TABLE_ROW_PADDING};
const env0_20 = Reflect.apply(createLegacyClassComponentStyles, createStylesModule, [object3]);
const env0_6 = ClassCallCheck;
let value = ReactModule;
const createLegacyClassComponentStyles = CreateStylesModule.createLegacyClassComponentStyles;
object = {};
const object2 = {flex: 1};
const BACKGROUND_BASE_LOWER = (Native).colors.BACKGROUND_BASE_LOWER;
object2.backgroundColor = BACKGROUND_BASE_LOWER;
const PX_16 = (Native).space.PX_16;
object2.paddingTop = PX_16;
object.screenContainer = object2;
const TABLE_ROW_PADDING = (Native).modules.mobile.TABLE_ROW_PADDING;
object.stackPadding = {paddingHorizontal: TABLE_ROW_PADDING};
const env0_20 = Reflect.apply(createLegacyClassComponentStyles, CreateStylesModule, [object]);
const Component = value.Component;
value = _fun116366(Component);
const ThemeContext = (require(3868) /* metro dependency 3868: native */).ThemeContext;
const ThemeContext = (NativeModule).ThemeContext;
value.contextType = ThemeContext;
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/channel_settings/ChannelSettingsChangeCategory.tsx');
(FileImportTrackerModule).fileFinishedImporting('components_native/channel_settings/ChannelSettingsChangeCategory.tsx');
exports.default = ConnectedChannelSettingsChangeCategory;
}
function _isNativeReflectConstruct_116363() { // fn#116363, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15410:293, offset: 0x02486928, 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_116363_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun116366(a0) { // fn#116366, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15410:725, offset: 0x0248698a, size: 174 bytes, params: 2, frame: 16
const closure = ChannelSettingsChangeCategory;
env0_10(closure, a0);
return env0_7(closure, [{key: 'shouldComponentUpdate', value: function() {
return !this.state.submitting;
}}, {key: 'handleSetCategory', value: value_116371}, {key: 'renderCategory', value: value_116383},
{key: 'renderCategories', value: value_116385}, {key: 'render', value: value_116386}]);
}
function ConnectedChannelSettingsChangeCategory({channelId}) { // fn#116388, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15410:4270, offset: 0x02487481, size: 152 bytes, params: 2, frame: 18
const channel = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], function() {
return ChannelStore.getChannel(channelId);
});
const value2 = (require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation();
(importDefault(44) /* metro dependency 44 */)(channel != null,
'ConnectedChannelSettingsChangeCategory: channel cannot be undefined');
return ((Component) => <Component channel={channel} navigation={value2} />)(env0_21);
}
function ChannelSettingsChangeCategory(a0) { // fn#116367, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15410:737, offset: 0x02486a38, size: 270 bytes, params: 2, frame: 22
var environment;
const value = environment.__proto__;
env1_6(this, ChannelSettingsChangeCategory);
let object = [a0];
const value3 = env1_9(ChannelSettingsChangeCategory);
const value6 = env1_8(this, _isNativeReflectConstruct_116363() ? global.Reflect.construct(value3, object,
env1_9(this).constructor) : value3.apply(this, object));
const getGuild = GuildStore.getGuild;
let channel = a0.channel;
let getGuildId = channel.getGuildId;
const env0_0 = Reflect.apply(getGuild, GuildStore, [Reflect.apply(getGuildId, channel, [])]);
const getCategories = GuildCategoryStore.getCategories;
channel = a0.channel;
getGuildId = channel.getGuildId;
const value7 = Reflect.apply(getCategories, GuildCategoryStore, [Reflect.apply(getGuildId, channel, [])]);
object = {};
object.category = ChannelStore.getChannel(a0.channel.parent_id);
object.categories = value7._categories.map(function(a0) {
return a0.channel;
}).filter(_fun116369);
object.submitting = false;
value6.state = object;
return value6;
}
function value_116371(a0) { // fn#116371, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15410:1496, offset: 0x02486bd2, size: 617 bytes, params: 2, frame: 25
let value = a0;
const props = this.props;
const channel = props.channel;
const env0_2 = props.navigation;
let getChannel = ChannelStore.getChannel;
const value3 = Reflect.apply(getChannel, ChannelStore, [value]);
let getGuildId = channel.getGuildId;
const value4 = Reflect.apply(getGuildId, channel, []);
const value5 = null;
if (value5 == value4) {
throw new global.Error('ChannelSettingsChangeCategory.handleSetCategory: Invalid guild_id');
}
const r5 = value === 'null' ? value5 : value;
const getCategories = GuildCategoryStore.getCategories;
getGuildId = channel.getGuildId;
value = Reflect.apply(getCategories, GuildCategoryStore, [Reflect.apply(getGuildId, channel, [])]);
const value6 = (importDefault(5099) /* metro dependency 5099: getFlattedChannelList */)(value._categories, value,
function(a0) {
return a0.channel.type === channel.type;
});
const value7 = value6.find(function(a0) {
return a0.channel.id === channel.id;
});
if (value5 == value7) {
throw new global.Error('ChannelSettingsChangeCategory.handleSetCategory: Could not find original channel.');
}
const object2 = {};
value._categories.forEach(_fun116374);
value6.forEach(_fun116375);
const String = global.String;
object2[String(r5)].push(value7);
value = (importDefault(5099) /* metro dependency 5099: getFlattedChannelList */)(value._categories, object2);
const dragAndDropUtilsModule = require(11879) /* metro dependency 11879: DragAndDropUtils */;
value = dragAndDropUtilsModule.calculatePositionDeltas({oldOrdering: value6, newOrdering: value,
idGetter: function(a0) {
return a0.channel.id;
}, existingPositionGetter: function(a0) {
return a0.channel.position;
}});
if (value.length > 0) {
value.find(_fun116378);
} else {
value.push({id: channel.id, parent_id: r5});
}
value = importAll(3789) /* metro dependency 3789: PermissionUtils */;
let areChannelsLocked = value.areChannelsLocked;
const env0_8 = Reflect.apply(areChannelsLocked, value, [channel, value3]);
value = importAll(3789) /* metro dependency 3789: PermissionUtils */;
areChannelsLocked = value.areChannelsLocked;
getChannel = ChannelStore.getChannel;
const env0_9 = Reflect.apply(areChannelsLocked, value, [channel, Reflect.apply(getChannel, ChannelStore,
[channel.parent_id])]);
this.setState({submitting: true}, _fun116381);
}
function value_116383(a0) { // fn#116383, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15410:3074, offset: 0x0248712e, size: 87 bytes, params: 2, frame: 17
const env0_1 = a0;
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
return (
<TableRow
label={a0.name}
onPress={onPress_116384}
key={a0.id}
/>
);
}
function value_116385() { // fn#116385, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15410:3207, offset: 0x024871a2, size: 205 bytes, params: 1, frame: 18
const value = environment.__proto__;
const value3 = env1_5(this.state.categories).slice(0);
const category = this.state.category;
const value4 = null;
if (value4 != category) {
value3.splice(value3.indexOf(category), 1);
}
if (value4 != value3[0] && value3[0].id === 'null') {
value3.shift();
}
const value8 = value3.map(this.renderCategory, this);
if (value8.length > 0) {
const TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
return (
<TableRowGroup hasIcons={false}>
{value8}
</TableRowGroup>
);
} else {
return value4;
}
}
function value_116386() { // fn#116386, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15410:3488, offset: 0x0248726f, size: 530 bytes, params: 1, frame: 34
var environment;
var r19;
var intl2;
const category = this.state.category;
const value = environment.__proto__;
const property = env1_4(this.state.categories, 1)[0];
const value3 = env1_20(this.context);
const Form = (require(7972) /* metro dependency 7972: native */).Form;
const screenContainer = value3.screenContainer;
const Stack = (require(4572) /* metro dependency 4572: StackNative */).Stack;
const stackPadding = value3.stackPadding;
const PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const formatToPlainString = intl.formatToPlainString;
const OqccVl = (require(1244) /* metro dependency 1244: indexNative */).t.OqccVl;
const value4 = null;
if (value4 != category) {
r19 = category.name;
} else {
intl2 = (require(1244) /* metro dependency 1244: indexNative */).intl;
r19 = intl2.string((require(1244) /* metro dependency 1244: indexNative */).t.GSfOoo);
}
const items2 = [<Text variant="text-md/medium" color="text-muted">{Reflect.apply(formatToPlainString, intl, [OqccVl,
{categoryName: r19}])}</Text>];
items2[1] = value4 != property ? property.id !== 'null' ? value4 : value4 != category ? ((TableRowGroup) => <TableRowGroup hasIcons={false}>{((TableRow) => <TableRow label={property.name} onPress={onPress_116387} key={property.id} />)((require(6238) /* metro dependency 6238: TableRowNative */).TableRow)}</TableRowGroup>)((require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup) : value4 : value4;
items2[2] = this.renderCategories();
return (
<Form style={screenContainer}>
<Stack style={stackPadding} spacing={PX_24}>
{items2}
</Stack>
</Form>
);
}
function _fun116369(a0) { // fn#116369, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15410:1196, offset: 0x02486b46, size: 121 bytes, params: 2, frame: 15
var r0;
let value = a0.id === 'null';
if (value) {
value = environment.__proto__.__proto__;
value = PermissionStore.can(Permissions.MANAGE_CHANNELS, env0_0);
r0 = value;
} else {
r0 = value;
}
r0 = !r0 ? PermissionStore.can(Permissions.MANAGE_CHANNELS, a0) && PermissionStore.can(Permissions.VIEW_CHANNEL,
a0) : r0;
return r0;
}
function _fun116374({channel}) { // fn#116374, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15410:1989, offset: 0x02486e79, size: 30 bytes, params: 2, frame: 3
const binding = env0_5;
const id = channel.id;
const items2 = [];
binding[id] = items2;
return items2;
}
function _fun116375(a0) { // fn#116375, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15410:2028, offset: 0x02486e97, size: 90 bytes, params: 2, frame: 14
var r0;
var binding;
var String;
var parent_id;
var property;
const id = a0.channel.id;
var value;
const value2 = id !== channel.id;
if (value2) {
binding = env0_5;
String = global.String;
parent_id = a0.channel.parent_id;
value = undefined;
property = binding[String(parent_id)];
r0 = property == null ? value : property.push(a0);
} else {
r0 = value2;
}
return r0;
}
function _fun116378(a0) { // fn#116378, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15410:2347, offset: 0x02486f00, size: 45 bytes, params: 2, frame: 4
var r0;
const value2 = a0.id === channel.id;
if (value2) {
a0.parent_id = env0_0;
env0_6 = a0;
r0 = true;
} else {
r0 = value2;
}
return r0;
}
function saveUpdates() { // fn#116379, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15410:2532, owner: value_116371.saveUpdates, offset: 0x02486f2d, size: 69 bytes, params: 1, frame: 13
var environment;
let value = environment.__proto__.__proto__;
value = Reflect.apply((importDefault(6593) /* metro dependency 6593: GuildActionCreators */).batchChannelUpdate,
value, [env0_4, env0_7]);
return value.then(function() {
return navigation.pop();
});
}
function _fun116381() { // fn#116381, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15410:2620, offset: 0x02486f85, size: 398 bytes, params: 1, frame: 30
var environment;
var value2;
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;
var moduleValue;
if (env0_3 == null) {
saveUpdates();
} else if (env0_9) {
if (env0_8) {
saveUpdates();
} else {
value2 = environment.__proto__.__proto__;
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 = {};
moduleValue = require(4805) /* metro dependency 4805: useChannelName */;
object4.channelName = moduleValue.computeChannelName(channel, UserStore, RelationshipStore, true);
object4.categoryName = (require(4805) /* metro dependency 4805: useChannelName */).computeChannelName(env0_3,
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_116382;
object3.onCancel = saveUpdates;
Reflect.apply(show, defaultImport, [object3]);
function _isNativeReflectConstruct_116363() { // fn#116363, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15410:293, offset: 0x02486928, 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) {
}
} else {
saveUpdates();
return (_isNativeReflectConstruct_116363_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun116366(a0) { // fn#116366, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15410:725, offset: 0x0248698a, size: 174 bytes, params: 2, frame: 16
const ChannelSettingsChangeCategory2 = ChannelSettingsChangeCategory;
Inherits(ChannelSettingsChangeCategory2, a0);
return CreateClass(ChannelSettingsChangeCategory2, [{key: 'shouldComponentUpdate', value: function() {
return !this.state.submitting;
}}, {key: 'handleSetCategory', value: value_116371}, {key: 'renderCategory', value: value_116383},
{key: 'renderCategories', value: value_116385}, {key: 'render', value: value_116386}]);
function ChannelSettingsChangeCategory(a0) { // fn#116367, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15410:737, offset: 0x02486a38, size: 270 bytes, params: 2, frame: 22
var environment;
const value = environment.__proto__;
env1_6(this, ChannelSettingsChangeCategory);
let object = [a0];
const value3 = env1_9(ChannelSettingsChangeCategory);
const value6 = env1_8(this, _isNativeReflectConstruct_116363() ? global.Reflect.construct(value3, object,
env1_9(this).constructor) : value3.apply(this, object));
const guildStoreBinding = GuildStore;
const getGuild = guildStoreBinding.getGuild;
let channel = a0.channel;
let getGuildId = channel.getGuildId;
const env0_0 = Reflect.apply(getGuild, guildStoreBinding, [Reflect.apply(getGuildId, channel, [])]);
const guildCategoryStoreBinding = GuildCategoryStore;
const getCategories = guildCategoryStoreBinding.getCategories;
channel = a0.channel;
getGuildId = channel.getGuildId;
const value7 = Reflect.apply(getCategories, guildCategoryStoreBinding, [Reflect.apply(getGuildId, channel, [])]);
object = {};
object.category = ChannelStore.getChannel(a0.channel.parent_id);
object.categories = value7._categories.map(function(a0) {
return a0.channel;
}).filter(_fun116369);
object.submitting = false;
value6.state = object;
return value6;
function _fun116369(a0) { // fn#116369, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15410:1196, offset: 0x02486b46, size: 121 bytes, params: 2, frame: 15
var r0;
var permissionStoreBinding;
let value = a0.id === 'null';
if (value) {
value = environment.__proto__.__proto__;
permissionStoreBinding = PermissionStore;
value = permissionStoreBinding.can(Permissions.MANAGE_CHANNELS, env0_0);
r0 = value;
} else {
r0 = value;
}
r0 = !r0 ? PermissionStore.can(Permissions.MANAGE_CHANNELS, a0) && PermissionStore.can(Permissions.VIEW_CHANNEL,
a0) : r0;
return r0;
}
}
function value_116371(a0) { // fn#116371, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15410:1496, offset: 0x02486bd2, size: 617 bytes, params: 2, frame: 25
let value = a0;
const props = this.props;
const channel = props.channel;
const env0_2 = props.navigation;
let channelStoreBinding = ChannelStore;
let getChannel = channelStoreBinding.getChannel;
const value3 = Reflect.apply(getChannel, channelStoreBinding, [value]);
let getGuildId = channel.getGuildId;
const value4 = Reflect.apply(getGuildId, channel, []);
const value5 = null;
if (value5 == value4) {
throw new global.Error('ChannelSettingsChangeCategory.handleSetCategory: Invalid guild_id');
}
const r5 = value === 'null' ? value5 : value;
const guildCategoryStoreBinding = GuildCategoryStore;
const getCategories = guildCategoryStoreBinding.getCategories;
getGuildId = channel.getGuildId;
value = Reflect.apply(getCategories, guildCategoryStoreBinding, [Reflect.apply(getGuildId, channel, [])]);
const value6 = (importDefault(5099) /* metro dependency 5099: getFlattedChannelList */)(value._categories, value,
function(a0) {
return a0.channel.type === channel.type;
});
const value7 = value6.find(function(a0) {
return a0.channel.id === channel.id;
});
if (value5 == value7) {
throw new global.Error('ChannelSettingsChangeCategory.handleSetCategory: Could not find original channel.');
}
const object = {};
value._categories.forEach(_fun116374);
value6.forEach(_fun116375);
const String = global.String;
object[String(r5)].push(value7);
value = (importDefault(5099) /* metro dependency 5099: getFlattedChannelList */)(value._categories, object);
value = DragAndDropUtilsModule.calculatePositionDeltas({oldOrdering: value6, newOrdering: value,
idGetter: function(a0) {
return a0.channel.id;
}, existingPositionGetter: function(a0) {
return a0.channel.position;
}});
if (value.length > 0) {
value.find(_fun116378);
} else {
value.push({id: channel.id, parent_id: r5});
}
value = importAll(3789) /* metro dependency 3789: PermissionUtils */;
let areChannelsLocked = value.areChannelsLocked;
const env0_8 = Reflect.apply(areChannelsLocked, value, [channel, value3]);
value = importAll(3789) /* metro dependency 3789: PermissionUtils */;
areChannelsLocked = value.areChannelsLocked;
channelStoreBinding = ChannelStore;
getChannel = channelStoreBinding.getChannel;
const env0_9 = Reflect.apply(areChannelsLocked, value, [channel, Reflect.apply(getChannel, channelStoreBinding,
[channel.parent_id])]);
this.setState({submitting: true}, _fun116381);
function _fun116374({channel}) { // fn#116374, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15410:1989, offset: 0x02486e79, size: 30 bytes, params: 2, frame: 3
const id = channel.id;
const items2 = [];
Module00862[id] = items2;
return items2;
}
function _fun116375(a0) { // fn#116375, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15410:2028, offset: 0x02486e97, size: 90 bytes, params: 2, frame: 14
var r0;
var binding;
var String;
var parent_id;
var property;
const id = a0.channel.id;
var value;
const value2 = id !== channel.id;
if (value2) {
binding = Module00862;
String = global.String;
parent_id = a0.channel.parent_id;
value = undefined;
property = binding[String(parent_id)];
r0 = property == null ? value : property.push(a0);
} else {
r0 = value2;
}
return r0;
}
function _fun116378(a0) { // fn#116378, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15410:2347, offset: 0x02486f00, size: 45 bytes, params: 2, frame: 4
var r0;
const value2 = a0.id === channel.id;
if (value2) {
a0.parent_id = env0_0;
env0_6 = a0;
r0 = true;
} else {
r0 = value2;
}
return r0;
}
function saveUpdates() { // fn#116379, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15410:2532, owner: value_116371.saveUpdates, offset: 0x02486f2d, size: 69 bytes, params: 1, frame: 13
var environment;
let value = environment.__proto__.__proto__;
value = Reflect.apply((importDefault(6593) /* metro dependency 6593: GuildActionCreators */).batchChannelUpdate,
value, [Module00057, CreateClass]);
return value.then(function() {
return navigation.pop();
});
}
function _fun116381() { // fn#116381, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15410:2620, offset: 0x02486f85, size: 398 bytes, params: 1, frame: 30
var environment;
var value2;
var defaultImport;
var show;
var object;
const intl = (IndexNativeModule).intl;
const t = (IndexNativeModule).t;
var format;
var property;
var object2;
var moduleValue;
var computeChannelName;
var channelBinding;
var userStoreBinding;
var relationshipStoreBinding;
if (env0_3 == null) {
saveUpdates();
} else if (env0_9) {
if (env0_8) {
saveUpdates();
} else {
value2 = environment.__proto__.__proto__;
defaultImport = importDefault(4647) /* metro dependency 4647: AlertActionCreators */;
show = defaultImport.show;
object = {};
object.title = intl.string(t.YWMtRe);
format = intl.format;
property = t['iKW+jY'];
object2 = {};
moduleValue = require(4805) /* metro dependency 4805: useChannelName */;
computeChannelName = moduleValue.computeChannelName;
channelBinding = channel;
userStoreBinding = UserStore;
relationshipStoreBinding = RelationshipStore;
object2.channelName = Reflect.apply(computeChannelName, moduleValue, [channelBinding, userStoreBinding,
relationshipStoreBinding, true]);
object2.categoryName = (require(4805) /* metro dependency 4805: useChannelName */).computeChannelName(env0_3,
userStoreBinding, relationshipStoreBinding);
object.body = Reflect.apply(format, intl, [property, object2]);
object.confirmText = intl.string(t.eW8Gy4);
object.cancelText = intl.string(t.s4uM3b);
object.onConfirm = onConfirm_116382;
object.onCancel = saveUpdates;
Reflect.apply(show, defaultImport, [object]);
}
} else {
saveUpdates();
}
function onConfirm_116382() { // fn#116382, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15410:2962, offset: 0x02487113, size: 27 bytes, params: 1, frame: 10
env1_6.lock_permissions = true;
saveUpdates();
}
}
}
function value_116383(a0) { // fn#116383, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15410:3074, offset: 0x0248712e, size: 87 bytes, params: 2, frame: 17
const env0_1 = a0;
const TableRow = (TableRowNativeModule).TableRow;
return (
<TableRow
label={a0.name}
onPress={onPress_116384}
key={a0.id}
/>
);
function value_116383OnPress() { // fn#116384, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15410:3135, owner: value_116383.onPress, offset: 0x02487185, size: 29 bytes, params: 1, frame: 11
const binding = env0_0;
return binding.handleSetCategory(env0_1.id);
}
}
function value_116385() { // fn#116385, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15410:3207, offset: 0x024871a2, size: 205 bytes, params: 1, frame: 18
const value = environment.__proto__;
const value3 = env1_5(this.state.categories).slice(0);
const category = this.state.category;
const value4 = null;
if (value4 != category) {
value3.splice(value3.indexOf(category), 1);
}
if (value4 != value3[0] && value3[0].id === 'null') {
value3.shift();
}
const value8 = value3.map(this.renderCategory, this);
if (value8.length > 0) {
const TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
return (
<TableRowGroup hasIcons={false}>
{value8}
</TableRowGroup>
);
} else {
return value4;
}
}
function value_116386() { // fn#116386, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15410:3488, offset: 0x0248726f, size: 530 bytes, params: 1, frame: 34
var environment;
var r19;
var intl2;
const category = this.state.category;
const value = environment.__proto__;
const property = env1_4(this.state.categories, 1)[0];
const value3 = env1_20(this.context);
const Form = (NativeModule2).Form;
const screenContainer = value3.screenContainer;
const Stack = (StackNativeModule).Stack;
const stackPadding = value3.stackPadding;
const PX_24 = (Native).space.PX_24;
const Text = (TextModule).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const formatToPlainString = intl.formatToPlainString;
const OqccVl = (require(1244) /* metro dependency 1244: indexNative */).t.OqccVl;
const value4 = null;
if (value4 != category) {
r19 = category.name;
} else {
intl2 = (require(1244) /* metro dependency 1244: indexNative */).intl;
r19 = intl2.string((require(1244) /* metro dependency 1244: indexNative */).t.GSfOoo);
}
const items2 = [
<Text variant="text-md/medium" color="text-muted">
{Reflect.apply(formatToPlainString, intl, [OqccVl, {categoryName: r19}])}
</Text>,
];
items2[1] = (
value4 != property
? (
property.id !== 'null'
? value4
: (
value4 != category
? ((TableRowGroup) => <TableRowGroup hasIcons={false}>{((TableRow) => <TableRow label={property.name} onPress={onPress_116387} key={property.id} />)((require(6238) /* metro dependency 6238: TableRowNative */).TableRow)}</TableRowGroup>)((require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup)
: value4
)
)
: value4
);
items2[2] = this.renderCategories();
return (
<Form style={screenContainer}>
<Stack style={stackPadding} spacing={PX_24}>
{items2}
</Stack>
</Form>
);
function value_116386OnPress() { // fn#116387, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15410:4026, owner: value_116386.onPress, offset: 0x02487185, size: 29 bytes, params: 1, frame: 11
const binding = env0_0;
return binding.handleSetCategory(env0_1.id);
}
}
}
function ConnectedChannelSettingsChangeCategory({channelId}) { // fn#116388, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15410:4270, offset: 0x02487481, size: 152 bytes, params: 2, frame: 18
const channel = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], function() {
return ChannelStore.getChannel(channelId);
});
const value2 = (UseNavigationNativeModule).useNavigation();
(Module00044)(channel != null,
'ConnectedChannelSettingsChangeCategory: channel cannot be undefined');
return ((Component) => <Component channel={channel} navigation={value2} />)(env0_21);
}
}
function value_116383OnPress() { // fn#116384, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15410:3135, owner: value_116383.onPress, offset: 0x02487185, size: 29 bytes, params: 1, frame: 11
const binding = env0_0;
return binding.handleSetCategory(env0_1.id);
}
function onConfirm_116382() { // fn#116382, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15410:2962, offset: 0x02487113, size: 27 bytes, params: 1, frame: 10
env1_6.lock_permissions = true;
saveUpdates();
}
global.__d(_fun116362, 15213, [57, 862, 6, 7, 15, 17, 18, 31, 1379, 5098, 1867, 3784, 3793, 1878, 661, 33, 4501,
697, 5099, 11879, 3789, 6593, 4647, 1244, 4805, 6238, 6231, 7972, 4572, 4573, 3868, 566, 1484, 44,
2]) /* metro module 15213, dependencies: [57, 862, 6, 7, 15, 17, 18, 31, 1379, 5098, 1867, 3784, 3793, 1878, 661, 33, 4501, 697, 5099, 11879, 3789, 6593, 4647, 1244, 4805, 6238, 6231, 7972, 4572, 4573, 3868, 566, 1484, 44, 2] */;
@@ -1,101 +1,137 @@
/* Metro module 15216; source: components_native/channel_settings/ChannelSettingsChangeDefaultForumLayout.tsx; dependencies: [57, 31, 27, 1379, 33, 4501, 697, 8148, 7988, 1244, 1389, 7987, 15179, 8941, 4573, 6231, 5475, 15217, 15218, 566, 2] */
import Module00057 from '../../by-id/module-00057.js'; /* Metro dependency 57 */
import ChannelStore from '../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import FastImage from '../common/FastImage.tsx'; /* Metro dependency 5475 */
import ChannelSettingsActionCreators from '../../actions/ChannelSettingsActionCreators.tsx'; /* Metro dependency 8148 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as TextModule from '../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as TableRowGroupNativeModule from '../../design/components/TableRow/native/TableRowGroup.native.tsx'; /* Metro dependency 6231 */
import * as TableRadioRowNativeModule from '../../design/components/TableRow/native/TableRadioRow.native.tsx'; /* Metro dependency 7987 */
import * as TableRadioGroupNativeModule from '../../design/components/TableRow/native/TableRadioGroup.native.tsx'; /* Metro dependency 7988 */
import * as ListViewIconModule from '../../design/components/Icon/native/redesign/generated/ListViewIcon.tsx'; /* Metro dependency 8941 */
import * as GridSquareIconModule from '../../design/components/Icon/native/redesign/generated/GridSquareIcon.tsx'; /* Metro dependency 15179 */
function _fun116424(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#116424, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15413:6, offset: 0x02488a86, size: 405 bytes, params: 8, frame: 23
var object4;
const env0_0 = require;
const closure = ChannelSettingsChangeDefaultForumLayout;
const ChannelSettingsChangeDefaultForumLayout2 = ChannelSettingsChangeDefaultForumLayout;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
const env0_5 = (require(27) /* metro dependency 27 */).View;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
let value = require(33) /* metro dependency 33 */;
let value = JsxRuntimeModule;
const env0_7 = value.jsx;
const env0_8 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object4 = {};
const object5 = {flex: 1};
object = {};
const object2 = {flex: 1};
const BACKGROUND_BASE_LOWER = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWER;
object5.backgroundColor = BACKGROUND_BASE_LOWER;
object2.backgroundColor = BACKGROUND_BASE_LOWER;
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object5.paddingHorizontal = PX_16;
object2.paddingHorizontal = PX_16;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object5.paddingTop = PX_16;
object4.container = object5;
const object6 = {};
object2.paddingTop = PX_16;
object.container = object2;
const object3 = {};
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object6.paddingTop = PX_8;
object3.paddingTop = PX_8;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object6.paddingBottom = PX_16;
object4.description = object6;
object4.thumbnailImagePortrait = {alignSelf: 'center'};
const env0_9 = Reflect.apply(createStyles, value, [object4]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/channel_settings/ChannelSettingsChangeDefaultForumLayout.tsx');
object3.paddingBottom = PX_16;
object.description = object3;
object.thumbnailImagePortrait = {alignSelf: 'center'};
const env0_9 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('components_native/channel_settings/ChannelSettingsChangeDefaultForumLayout.tsx');
exports.default = ConnectedChannelSettingsChangeDefaultForumLayout;
exports.ChannelSettingsChangeDefaultForumLayout = closure;
}
exports.ChannelSettingsChangeDefaultForumLayout = ChannelSettingsChangeDefaultForumLayout2;
function ChannelSettingsChangeDefaultForumLayout({channel}) { // fn#116425, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15413:457, offset: 0x02488c1b, size: 903 bytes, params: 2, frame: 30
const styles = useStyles();
const useState = ReactModule.useState;
const value3 = Module00057(Reflect.apply(useState, ReactModule, [channel.defaultForumLayout]), 2);
const property = value3[0];
const env0_1 = value3[1];
const value4 = ReactModule.useCallback(_fun116426, [channel.id]);
const TableRadioGroup = (TableRadioGroupNativeModule).TableRadioGroup;
const object2 = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
object2.title = Reflect.apply(string, intl, [(require(1244) /* metro dependency 1244: indexNative */).t.mFMDSq]);
object2.defaultValue = property ?? (require(1389) /* metro dependency 1389: ForumLayout */).ForumLayout.LIST;
object2.onChange = value4;
object2.hasIcons = true;
const TableRadioRow = (TableRadioRowNativeModule).TableRadioRow;
const object3 = {};
const GridSquareIcon = (GridSquareIconModule).GridSquareIcon;
object3.icon = <GridSquareIcon />;
object3.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['U+rQfW']);
const ForumLayout = (require(1389) /* metro dependency 1389: ForumLayout */).ForumLayout;
let GRID = ForumLayout.GRID;
object3.value = GRID;
const tableRadioRow = <TableRadioRow {...object3} />;
const object4 = {};
const ListViewIcon = (ListViewIconModule).ListViewIcon;
object4.icon = <ListViewIcon />;
object4.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.tuHPRX);
const LIST = ForumLayout.LIST;
object4.value = LIST;
const items2 = [
<TableRadioGroup {...object2}>
{tableRadioRow}
<TableRadioRow {...object4} />
</TableRadioGroup>,
];
const Text = (TextModule).Text;
string = intl.string;
const MbX5Hu = (require(1244) /* metro dependency 1244: indexNative */).t.MbX5Hu;
items2[1] = (
<Text
style={styles.description}
variant="text-sm/medium"
color="text-muted"
>
{Reflect.apply(string, intl, [MbX5Hu])}
</Text>
);
const TableRowGroupTitle = (TableRowGroupNativeModule).TableRowGroupTitle;
items2[2] = (
<TableRowGroupTitle title={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.e4oMl4)} />
);
GRID = ForumLayout.GRID;
items2[3] = (
<FastImage
style={styles.thumbnailImagePortrait}
source={property === GRID ? importDefault(15217) /* metro dependency 15217 */ : importDefault(15218) /* metro dependency 15218 */}
/>
);
return (
<View style={styles.container}>
{items2}
</View>
);
function _fun116426(a0) { // fn#116426, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15413:604, offset: 0x02488fa2, size: 97 bytes, params: 2, frame: 19
env0_1(a0);
(ChannelSettingsActionCreators).updateChannel({defaultForumLayout: a0});
const defaultImport2 = ChannelSettingsActionCreators;
defaultImport2.saveChannel(channel.id, {defaultForumLayout: a0});
}
function ChannelSettingsChangeDefaultForumLayout({channel}) { // fn#116425, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15413:457, offset: 0x02488c1b, size: 903 bytes, params: 2, frame: 30
const styles = useStyles();
const binding = env0_4;
const useState = binding.useState;
const value3 = env0_3(Reflect.apply(useState, binding, [channel.defaultForumLayout]), 2);
const property = value3[0];
const env0_1 = value3[1];
const value4 = env0_4.useCallback(_fun116426, [channel.id]);
const TableRadioGroup = (require(7988) /* metro dependency 7988: TableRadioGroupNative */).TableRadioGroup;
const object = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
object.title = Reflect.apply(string, intl, [(require(1244) /* metro dependency 1244: indexNative */).t.mFMDSq]);
object.defaultValue = property ?? (require(1389) /* metro dependency 1389: ForumLayout */).ForumLayout.LIST;
object.onChange = value4;
object.hasIcons = true;
const TableRadioRow = (require(7987) /* metro dependency 7987: TableRadioRowNative */).TableRadioRow;
const object5 = {};
const GridSquareIcon = (require(15179) /* metro dependency 15179: GridSquareIcon */).GridSquareIcon;
object5.icon = <GridSquareIcon />;
object5.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['U+rQfW']);
const ForumLayout = (require(1389) /* metro dependency 1389: ForumLayout */).ForumLayout;
let GRID = ForumLayout.GRID;
object5.value = GRID;
const tableRadioRow = <TableRadioRow {...object5} />;
const object6 = {};
const ListViewIcon = (require(8941) /* metro dependency 8941: ListViewIcon */).ListViewIcon;
object6.icon = <ListViewIcon />;
object6.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.tuHPRX);
const LIST = ForumLayout.LIST;
object6.value = LIST;
const items2 = [<TableRadioGroup {...object}>{tableRadioRow}<TableRadioRow {...object6} /></TableRadioGroup>];
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
string = intl.string;
const MbX5Hu = (require(1244) /* metro dependency 1244: indexNative */).t.MbX5Hu;
items2[1] = <Text style={styles.description} variant="text-sm/medium" color="text-muted">{Reflect.apply(string,
intl, [MbX5Hu])}</Text>;
const TableRowGroupTitle = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroupTitle;
items2[2] = <TableRowGroupTitle title={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.e4oMl4)} />;
const FastImage = importDefault(5475) /* metro dependency 5475: FastImage */;
GRID = ForumLayout.GRID;
items2[3] = <FastImage style={styles.thumbnailImagePortrait} source={property === GRID ? importDefault(15217) /* metro dependency 15217 */ : importDefault(15218) /* metro dependency 15218 */} />;
return (
<View style={styles.container}>
{items2}
</View>
);
}
}
function ConnectedChannelSettingsChangeDefaultForumLayout({channelId}) { // fn#116427, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15413:1626, offset: 0x02489003, size: 100 bytes, params: 2, frame: 16
const channel = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], function() {
return ChannelStore.getChannel(channelId);
});
return channel == null ? null : <ChannelSettingsChangeDefaultForumLayout channel={channel} />;
}
function ConnectedChannelSettingsChangeDefaultForumLayout({channelId}) { // fn#116427, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15413:1626, offset: 0x02489003, size: 100 bytes, params: 2, frame: 16
const channel = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], function() {
return ChannelStore.getChannel(channelId);
});
return (
channel == null
? null
: (
<ChannelSettingsChangeDefaultForumLayout channel={channel} />
)
);
}
function _fun116426(a0) { // fn#116426, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15413:604, offset: 0x02488fa2, size: 97 bytes, params: 2, frame: 19
env0_1(a0);
(importDefault(8148) /* metro dependency 8148: ChannelSettingsActionCreators */).updateChannel({defaultForumLayout: a0});
const defaultImport2 = importDefault(8148) /* metro dependency 8148: ChannelSettingsActionCreators */;
defaultImport2.saveChannel(channel.id, {defaultForumLayout: a0});
}
global.__d(_fun116424, 15216, [57, 31, 27, 1379, 33, 4501, 697, 8148, 7988, 1244, 1389, 7987, 15179, 8941, 4573,
6231, 5475, 15217, 15218, 566,
2]) /* metro module 15216, dependencies: [57, 31, 27, 1379, 33, 4501, 697, 8148, 7988, 1244, 1389, 7987, 15179, 8941, 4573, 6231, 5475, 15217, 15218, 566, 2] */;
@@ -1,197 +1,210 @@
/* Metro module 15214; source: components_native/channel_settings/ChannelSettingsChangeRTCRegion.tsx; dependencies: [862, 6, 7, 15, 17, 18, 31, 1379, 15173, 33, 4501, 697, 1244, 8148, 7987, 7988, 7972, 3868, 566, 44, 2] */
import ClassCallCheck from '../../by-id/module-00006-ClassCallCheck.js'; /* Metro dependency 6 */
import CreateClass from '../../by-id/module-00007-CreateClass.js'; /* Metro dependency 7 */
import PossibleConstructorReturn from '../../by-id/module-00015-PossibleConstructorReturn.js'; /* Metro dependency 15 */
import Module00017 from '../../by-id/module-00017.js'; /* Metro dependency 17 */
import Inherits from '../../by-id/module-00018-Inherits.js'; /* Metro dependency 18 */
import Module00044 from '../../by-id/module-00044.js'; /* Metro dependency 44 */
import Native from '../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import Module00862 from '../../by-id/module-00862.js'; /* Metro dependency 862 */
import ChannelStore from '../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import RegionStore from '../../stores/RegionStore.tsx'; /* Metro dependency 15173 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as NativeModule from '../../external/discord_common/js/packages/design/native.tsx'; /* Metro dependency 3868 */
import * as CreateStylesModule from '../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as NativeModule2 from '../../design/void/Form/native/index.tsx'; /* Metro dependency 7972 */
import * as TableRadioRowNativeModule from '../../design/components/TableRow/native/TableRadioRow.native.tsx'; /* Metro dependency 7987 */
import * as TableRadioGroupNativeModule from '../../design/components/TableRow/native/TableRadioGroup.native.tsx'; /* Metro dependency 7988 */
function _fun116390(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#116390, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15411:6, offset: 0x02487519, size: 409 bytes, params: 8, frame: 23
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(862) /* metro dependency 862 */;
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 */;
let value = importAll(31) /* metro dependency 31 */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const regionStore = importDefault(15173) /* metro dependency 15173: RegionStore */;
const env0_11 = (require(33) /* metro dependency 33 */).jsx;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createLegacyClassComponentStyles = createStylesModule.createLegacyClassComponentStyles;
const object = {};
const BACKGROUND_BASE_LOWER = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWER;
object.backgroundColor = BACKGROUND_BASE_LOWER;
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object.paddingHorizontal = PX_16;
const env0_12 = Reflect.apply(createLegacyClassComponentStyles, createStylesModule, [{form: object}]);
let value = ReactModule;
const createLegacyClassComponentStyles = CreateStylesModule.createLegacyClassComponentStyles;
const object2 = {};
const BACKGROUND_BASE_LOWER = (Native).colors.BACKGROUND_BASE_LOWER;
object2.backgroundColor = BACKGROUND_BASE_LOWER;
const PX_16 = (Native).space.PX_16;
object2.paddingHorizontal = PX_16;
const env0_12 = Reflect.apply(createLegacyClassComponentStyles, CreateStylesModule, [{form: object2}]);
const PureComponent = value.PureComponent;
value = _fun116394(PureComponent);
const ThemeContext = (require(3868) /* metro dependency 3868: native */).ThemeContext;
const ThemeContext = (NativeModule).ThemeContext;
value.contextType = ThemeContext;
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/channel_settings/ChannelSettingsChangeRTCRegion.tsx');
(FileImportTrackerModule).fileFinishedImporting('components_native/channel_settings/ChannelSettingsChangeRTCRegion.tsx');
exports.default = ConnectedChannelSettingsChangeRTCRegion;
}
function _isNativeReflectConstruct_116391() { // fn#116391, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15411:202, offset: 0x024876b2, 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) {
function _isNativeReflectConstruct_116391() { // fn#116391, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15411:202, offset: 0x024876b2, 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_116391_isNativeReflectConstruct = function() {
return !!result;
})();
}
return (_isNativeReflectConstruct_116391_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun116394(a0) { // fn#116394, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15411:573, offset: 0x02487714, size: 153 bytes, params: 2, frame: 16
const closure = ChannelSettingsChangeRTCRegion;
env0_8(closure, a0);
return env0_5(closure, [{key: 'handleSetRegion', value: value_116399}, {key: 'renderRegion', value: value_116401},
{key: 'renderRegions', value: value_116402}, {key: 'render', value: value_116404}]);
}
function _fun116394(a0) { // fn#116394, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15411:573, offset: 0x02487714, size: 153 bytes, params: 2, frame: 16
const ChannelSettingsChangeRTCRegion2 = ChannelSettingsChangeRTCRegion;
Inherits(ChannelSettingsChangeRTCRegion2, a0);
return CreateClass(ChannelSettingsChangeRTCRegion2, [{key: 'handleSetRegion', value: value_116399}, {key: 'renderRegion',
value: value_116401}, {key: 'renderRegions', value: value_116402}, {key: 'render', value: value_116404}]);
function ChannelSettingsChangeRTCRegion(a0) { // fn#116395, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15411:585, offset: 0x024877ad, size: 149 bytes, params: 2, frame: 20
var r0;
var Reflect;
let value = copyRestArgs(0, undefined);
let binding = env1_4;
binding(this, ChannelSettingsChangeRTCRegion);
const items2 = [];
arraySpread(items2, value, 0, items2);
value = env1_7(ChannelSettingsChangeRTCRegion);
binding = env1_6;
if (_isNativeReflectConstruct_116391()) {
Reflect = global.Reflect;
value = Reflect.construct(value, items2, env1_7(this).constructor);
r0 = value;
} else {
value = value.apply(this, items2);
r0 = value;
}
value = binding(this, r0);
value.state = _fun116396();
return value;
function _fun116396() { // fn#116396, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15411:870, offset: 0x02487842, size: 272 bytes, params: 1, frame: 21
var push;
var value6;
var items2;
var value7;
const object = {'regions': null, 'submitting': false, 'selectedRegionId': 'AUTOMATIC_RTC_REGION'};
object.regions = [];
const value = 'AUTOMATIC_RTC_REGION';
const regionStoreBinding = RegionStore;
const getRegions = regionStoreBinding.getRegions;
const channel = env0_0.props.channel;
const getGuildId = channel.getGuildId;
const value4 = Reflect.apply(getRegions, regionStoreBinding, [Reflect.apply(getGuildId, channel, [])]);
const value5 = undefined;
const intl = require(dependencyMap[12]).intl;
const string = intl.string;
const JEmsap = require(dependencyMap[12]).t.JEmsap;
const items3 = [{'id': 'AUTOMATIC_RTC_REGION', 'name': null, 'sample_hostname': '', 'sample_port': 0, 'vip': false,
'deprecated': false, 'optimal': false, 'hidden': false, name: Reflect.apply(string, intl, [JEmsap])}];
if (value4 != null) {
push = items3.push;
value6 = value4.filter(function(a0) {
return !a0.deprecated && !a0.hidden;
});
items2 = [];
arraySpread(items2, value6, 0, dependencyMap);
apply(push, items2, items3, dependencyMap);
value7 = value4.find(_fun116398);
object.selectedRegionId = (value7 == null ? value5 : value7.id) ?? value;
}
object.regions = items3;
return object;
function _fun116398({id}) { // fn#116398, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15411:1213, offset: 0x0248796c, size: 37 bytes, params: 2, frame: 2
return id === env1_0.props.channel.rtcRegion;
}
function ConnectedChannelSettingsChangeRTCRegion({channelId}) { // fn#116405, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15411:2249, offset: 0x02487ba5, size: 125 bytes, params: 2, frame: 17
const channel = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], function() {
return ChannelStore.getChannel(channelId);
});
(importDefault(44) /* metro dependency 44 */)(channel != null,
'ConnectedChannelSettingsChangeRTCRegion: channel cannot be undefined');
return ((Component) => <Component channel={channel} />)(env0_13);
}
}
}
function value_116399(a0) { // fn#116399, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15411:1403, offset: 0x02487991, size: 131 bytes, params: 2, frame: 17
var environment;
let value = a0;
const state = this.state;
const value2 = null;
const value3 = 'AUTOMATIC_RTC_REGION';
state.selectedRegionId = value2 != value ? value : value3;
const r6 = value !== value3 ? value : value2;
value = environment.__proto__;
value = importDefault(8148) /* metro dependency 8148: ChannelSettingsActionCreators */;
value.updateChannel({rtcRegion: r6});
this.setState({submitting: true}, _fun116400);
function _fun116400() { // fn#116400, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15411:1540, offset: 0x02487a14, size: 72 bytes, params: 1, frame: 15
let value = environment.__proto__.__proto__;
value = importDefault(8148) /* metro dependency 8148: ChannelSettingsActionCreators */;
value.saveChannel(env0_0.props.channel.id, {rtcRegion: env0_1});
}
}
function value_116401(a0) { // fn#116401, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15411:1634, offset: 0x02487a5c, size: 72 bytes, params: 2, frame: 16
const TableRadioRow = (TableRadioRowNativeModule).TableRadioRow;
return (
<TableRadioRow
label={a0.name}
value={a0.id}
key={a0.id}
/>
);
}
function value_116402() { // fn#116402, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15411:1739, offset: 0x02487aa4, size: 144 bytes, params: 1, frame: 17
const value3 = env1_3(this.state.regions).slice(0);
const value4 = value3.map(this.renderRegion, this);
const TableRadioGroup = (TableRadioGroupNativeModule).TableRadioGroup;
return (
<TableRadioGroup
defaultValue={this.state.selectedRegionId}
onChange={onChange_116403}
hasIcons={false}
>
{value4}
</TableRadioGroup>
);
function value_116402OnChange(a0) { // fn#116403, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15411:1900, owner: value_116402.onChange, offset: 0x02487b34, size: 25 bytes, params: 2, frame: 11
return env0_0.handleSetRegion(a0);
}
}
function value_116404() { // fn#116404, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15411:1974, offset: 0x02487b4d, size: 88 bytes, params: 1, frame: 16
const value2 = env1_12(this.context);
const Form = (NativeModule2).Form;
return (
<Form style={value2.form}>
{this.renderRegions()}
</Form>
);
}
function ChannelSettingsChangeRTCRegion(a0) { // fn#116395, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15411:585, offset: 0x024877ad, size: 149 bytes, params: 2, frame: 20
var r0;
var Reflect;
let value = copyRestArgs(0, undefined);
let binding = env1_4;
binding(this, ChannelSettingsChangeRTCRegion);
const items2 = [];
arraySpread(items2, value, 0, items2);
value = env1_7(ChannelSettingsChangeRTCRegion);
binding = env1_6;
if (_isNativeReflectConstruct_116391()) {
Reflect = global.Reflect;
value = Reflect.construct(value, items2, env1_7(this).constructor);
r0 = value;
} else {
value = value.apply(this, items2);
r0 = value;
}
value = binding(this, r0);
value.state = _fun116396();
return value;
}
function value_116399(a0) { // fn#116399, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15411:1403, offset: 0x02487991, size: 131 bytes, params: 2, frame: 17
var environment;
let value = a0;
const state = this.state;
const value2 = null;
const value3 = 'AUTOMATIC_RTC_REGION';
state.selectedRegionId = value2 != value ? value : value3;
const r6 = value !== value3 ? value : value2;
value = environment.__proto__;
value = importDefault(8148) /* metro dependency 8148: ChannelSettingsActionCreators */;
value.updateChannel({rtcRegion: r6});
this.setState({submitting: true}, _fun116400);
}
function value_116401(a0) { // fn#116401, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15411:1634, offset: 0x02487a5c, size: 72 bytes, params: 2, frame: 16
const TableRadioRow = (require(7987) /* metro dependency 7987: TableRadioRowNative */).TableRadioRow;
return (
<TableRadioRow
label={a0.name}
value={a0.id}
key={a0.id}
/>
);
}
function value_116402() { // fn#116402, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15411:1739, offset: 0x02487aa4, size: 144 bytes, params: 1, frame: 17
const value3 = env1_3(this.state.regions).slice(0);
const value4 = value3.map(this.renderRegion, this);
const TableRadioGroup = (require(7988) /* metro dependency 7988: TableRadioGroupNative */).TableRadioGroup;
return (
<TableRadioGroup
defaultValue={this.state.selectedRegionId}
onChange={onChange_116403}
hasIcons={false}
>
{value4}
</TableRadioGroup>
);
}
function value_116404() { // fn#116404, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15411:1974, offset: 0x02487b4d, size: 88 bytes, params: 1, frame: 16
const value2 = env1_12(this.context);
const Form = (require(7972) /* metro dependency 7972: native */).Form;
return (
<Form style={value2.form}>
{this.renderRegions()}
</Form>
);
}
function _fun116396() { // fn#116396, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15411:870, offset: 0x02487842, size: 272 bytes, params: 1, frame: 21
var push;
var value6;
var items2;
var value7;
const object2 = {'regions': null, 'submitting': false, 'selectedRegionId': 'AUTOMATIC_RTC_REGION'};
object2.regions = [];
const value = 'AUTOMATIC_RTC_REGION';
const getRegions = RegionStore.getRegions;
const channel = env0_0.props.channel;
const getGuildId = channel.getGuildId;
const value4 = Reflect.apply(getRegions, RegionStore, [Reflect.apply(getGuildId, channel, [])]);
const value5 = undefined;
const intl = require(dependencyMap[12]).intl;
const string = intl.string;
const JEmsap = require(dependencyMap[12]).t.JEmsap;
const items3 = [{'id': 'AUTOMATIC_RTC_REGION', 'name': null, 'sample_hostname': '', 'sample_port': 0, 'vip': false,
'deprecated': false, 'optimal': false, 'hidden': false, name: Reflect.apply(string, intl, [JEmsap])}];
if (value4 != null) {
push = items3.push;
value6 = value4.filter(function(a0) {
return !a0.deprecated && !a0.hidden;
function ConnectedChannelSettingsChangeRTCRegion({channelId}) { // fn#116405, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15411:2249, offset: 0x02487ba5, size: 125 bytes, params: 2, frame: 17
const channel = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], function() {
return ChannelStore.getChannel(channelId);
});
items2 = [];
arraySpread(items2, value6, 0, dependencyMap);
apply(push, items2, items3, dependencyMap);
value7 = value4.find(_fun116398);
object2.selectedRegionId = (value7 == null ? value5 : value7.id) ?? value;
(Module00044)(channel != null,
'ConnectedChannelSettingsChangeRTCRegion: channel cannot be undefined');
return ((Component) => <Component channel={channel} />)(env0_13);
}
object2.regions = items3;
return object2;
}
function _fun116400() { // fn#116400, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15411:1540, offset: 0x02487a14, size: 72 bytes, params: 1, frame: 15
let value = environment.__proto__.__proto__;
value = importDefault(8148) /* metro dependency 8148: ChannelSettingsActionCreators */;
value.saveChannel(env0_0.props.channel.id, {rtcRegion: env0_1});
}
function value_116402OnChange(a0) { // fn#116403, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15411:1900, owner: value_116402.onChange, offset: 0x02487b34, size: 25 bytes, params: 2, frame: 11
return env0_0.handleSetRegion(a0);
}
function _fun116398({id}) { // fn#116398, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15411:1213, offset: 0x0248796c, size: 37 bytes, params: 2, frame: 2
return id === env1_0.props.channel.rtcRegion;
}
global.__d(_fun116390, 15214, [862, 6, 7, 15, 17, 18, 31, 1379, 15173, 33, 4501, 697, 1244, 8148, 7987, 7988, 7972,
3868, 566, 44,
2]) /* metro module 15214, dependencies: [862, 6, 7, 15, 17, 18, 31, 1379, 15173, 33, 4501, 697, 1244, 8148, 7987, 7988, 7972, 3868, 566, 44, 2] */;
@@ -1,8 +1,11 @@
/* Metro module 15174; source: components_native/channel_settings/ChannelSettingsConstants.tsx; dependencies: [2] */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun115944(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#115944, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15371:6, offset: 0x024755b3, size: 92 bytes, params: 8, frame: 16
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/channel_settings/ChannelSettingsConstants.tsx');
(FileImportTrackerModule).fileFinishedImporting('components_native/channel_settings/ChannelSettingsConstants.tsx');
exports.ChannelSettingsAutoFocusElement = {CHANNEL_NAME: 'channel-name'};
}
global.__d(_fun115944, 15174, [2]) /* metro module 15174, dependencies: [2] */;
@@ -1,205 +1,256 @@
/* Metro module 15183; source: components_native/channel_settings/ChannelSettingsInstantInvites.tsx; dependencies: [57, 31, 27, 8149, 1379, 661, 33, 4501, 697, 1585, 566, 8148, 12132, 1305, 12146, 12147, 1244, 5460, 15184, 8671, 2] */
import Module00057 from '../../by-id/module-00057.js'; /* Metro dependency 57 */
import ChannelStore from '../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import UseSafeAreaInsetsNative from '../../modules/safe_area/useSafeAreaInsets.native.tsx'; /* Metro dependency 1585 */
import ChannelSettingsStore from '../../stores/ChannelSettingsStore.tsx'; /* Metro dependency 8149 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as FluxModule from '../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as ConstantsModule from '../../Constants.tsx'; /* Metro dependency 661 */
import * as IndexNativeModule from '../../intl/index.native.tsx'; /* Metro dependency 1244 */
function _fun115996(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#115996, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15380:6, offset: 0x02477699, size: 359 bytes, params: 8, frame: 23
var object3;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
const env0_5 = (require(27) /* metro dependency 27 */).View;
const channelSettingsStore = importDefault(8149) /* metro dependency 8149: ChannelSettingsStore */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const env0_8 = (require(661) /* metro dependency 661: Constants */).ChannelSettingsSections;
let value = require(33) /* metro dependency 33 */;
let value = JsxRuntimeModule;
const env0_9 = value.jsx;
const env0_10 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object3 = {};
const object4 = {};
object = {};
const object2 = {};
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object4.paddingHorizontal = PX_16;
object2.paddingHorizontal = PX_16;
const BACKGROUND_BASE_LOWER = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWER;
object4.backgroundColor = BACKGROUND_BASE_LOWER;
object4.flex = 1;
object3.content = object4;
object2.backgroundColor = BACKGROUND_BASE_LOWER;
object2.flex = 1;
object.content = object2;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object3.gap = {height: PX_16};
const env0_11 = Reflect.apply(createStyles, value, [object3]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/channel_settings/ChannelSettingsInstantInvites.tsx');
object.gap = {height: PX_16};
const env0_11 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('components_native/channel_settings/ChannelSettingsInstantInvites.tsx');
exports.default = ConnectedChannelSettingsInstantInvites;
}
function ConnectedChannelSettingsInstantInvites() { // fn#115997, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15380:494, offset: 0x02477800, size: 845 bytes, params: 1, frame: 29
var r7;
var r1;
var r0;
var EmptyState;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var items2;
var value;
const styles = useStyles();
const bottom = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)().bottom;
const binding = env0_4;
const [property, env0_1] = env0_3(binding.useState(undefined), 2);
const value4 = binding.useCallback(_fun115998, [styles]);
const env0_2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelSettingsStore],
function() {
return ChannelSettingsStore.getChannel();
});
const {invites,
loading} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([ChannelSettingsStore],
function() {
return ChannelSettingsStore.getInvites();
});
const value8 = binding.useMemo(_fun116005, [binding.useMemo(_fun116001, [invites]),
(require(566) /* metro dependency 566: flux */).useStateFromStoresArray([ChannelStore], _fun116003)]);
items = [value8.length];
binding.useEffect(function() {
importDefault(dependencyMap[11]).setSection(ChannelSettingsSections.INSTANT_INVITES);
}, []);
const value9 = binding.useCallback(_fun116009, [value8]);
if (loading) {
if (loading) {
var viewBindingProps = {style: styles.content};
items2 = [((SceneLoadingIndicator) => <SceneLoadingIndicator />)((require(5460) /* metro dependency 5460: SceneLoadingIndicatorNative */).SceneLoadingIndicator)];
if (value8.length > 0) {
value = importDefault(15184) /* metro dependency 15184: InstantInviteSelfMeasurer */;
value = ((Component) => <Component item={value8[0]} onMeasured={value4} />)(value);
r7 = value;
} else {
r7 = null;
}
items2[1] = r7;
value = <View {...viewBindingProps}>{items2}</View>;
r1 = value;
} else if (property == null) {
var viewBindingProps = {style: styles.content};
items2 = [((SceneLoadingIndicator) => <SceneLoadingIndicator />)((require(5460) /* metro dependency 5460: SceneLoadingIndicatorNative */).SceneLoadingIndicator)];
if (value8.length > 0) {
value = importDefault(15184) /* metro dependency 15184: InstantInviteSelfMeasurer */;
value = ((Component) => <Component item={value8[0]} onMeasured={value4} />)(value);
r7 = value;
} else {
r7 = null;
}
items2[1] = r7;
value = <View {...viewBindingProps}>{items2}</View>;
r1 = value;
} else {
var viewBindingProps = {style: styles.content};
value = importDefault(8671) /* metro dependency 8671: FastestListAndroid */;
value = <View {...viewBindingProps}>{((Component) => <Component sections={items} estimatedListSize="windowSize" itemSize={property} renderItem={value9} insetStart={styles.gap.height} insetEnd={bottom} />)(value)}</View>;
r1 = value;
}
r0 = r1;
} else if (value8.length !== 0) {
if (loading) {
var viewBindingProps = {style: styles.content};
items2 = [((SceneLoadingIndicator) => <SceneLoadingIndicator />)((require(5460) /* metro dependency 5460: SceneLoadingIndicatorNative */).SceneLoadingIndicator)];
if (value8.length > 0) {
value = importDefault(15184) /* metro dependency 15184: InstantInviteSelfMeasurer */;
value = ((Component) => <Component item={value8[0]} onMeasured={value4} />)(value);
r7 = value;
} else {
r7 = null;
}
items2[1] = r7;
value = <View {...viewBindingProps}>{items2}</View>;
r1 = value;
} else if (property == null) {
var viewBindingProps = {style: styles.content};
items2 = [((SceneLoadingIndicator) => <SceneLoadingIndicator />)((require(5460) /* metro dependency 5460: SceneLoadingIndicatorNative */).SceneLoadingIndicator)];
if (value8.length > 0) {
value = importDefault(15184) /* metro dependency 15184: InstantInviteSelfMeasurer */;
value = ((Component) => <Component item={value8[0]} onMeasured={value4} />)(value);
r7 = value;
} else {
r7 = null;
}
items2[1] = r7;
value = <View {...viewBindingProps}>{items2}</View>;
r1 = value;
} else {
var viewBindingProps = {style: styles.content};
value = importDefault(8671) /* metro dependency 8671: FastestListAndroid */;
value = <View {...viewBindingProps}>{((Component) => <Component sections={items} estimatedListSize="windowSize" itemSize={property} renderItem={value9} insetStart={styles.gap.height} insetEnd={bottom} />)(value)}</View>;
r1 = value;
}
r0 = r1;
} else {
EmptyState = (require(1305) /* metro dependency 1305: native */).EmptyState;
r0 = <EmptyState lightSource={importDefault(12146) /* metro dependency 12146 */} darkSource={importDefault(12147) /* metro dependency 12147 */} title={intl.string(t['+nLJkZ'])} body={intl.string(t.F53CAc)} />;
}
return r0;
}
function _fun115998(a0) { // fn#115998, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15380:634, offset: 0x02477b4d, size: 37 bytes, params: 2, frame: 11
env0_1(a0 + styles.gap.height);
}
function _fun116001() { // fn#116001, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15380:818, offset: 0x02477b97, size: 47 bytes, params: 1, frame: 11
const Object = global.Object;
return Object.values(invites).sort(function(a0, a1) {
var r2;
var property = a0.inviter;
var value = undefined;
r2 = property == null ? value : property.username;
var value2 = '';
var value3 = (r2 ?? value2).toLowerCase();
property = a1.inviter;
return value3.localeCompare(((property == null ? value : property.username) ?? value2).toLowerCase());
});
}
function _fun116003() { // fn#116003, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15380:1082, offset: 0x02477c34, size: 67 bytes, params: 1, frame: 12
var environment;
var r0;
var value2;
var value;
if (channel != null) {
value2 = environment.__proto__;
value = ChannelStore.getSortedLinkedChannelsForGuild(channel.guild_id);
value = value.filter(function({id}) {
return id === channel.id;
function ConnectedChannelSettingsInstantInvites() { // fn#115997, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15380:494, offset: 0x02477800, size: 845 bytes, params: 1, frame: 29
var r7;
var r1;
var r0;
var EmptyState;
const intl = (IndexNativeModule).intl;
const t = (IndexNativeModule).t;
var items2;
var value;
const styles = useStyles();
const bottom = (UseSafeAreaInsetsNative)().bottom;
const [property, env0_1] = Module00057(ReactModule.useState(undefined), 2);
const value4 = ReactModule.useCallback(_fun115998, [styles]);
const useStateFromStores = FluxModule.useStateFromStores;
const channelSettingsStoreBinding = ChannelSettingsStore;
const env0_2 = Reflect.apply(useStateFromStores, FluxModule, [[channelSettingsStoreBinding], function() {
return ChannelSettingsStore.getChannel();
}]);
const {invites, loading} = FluxModule.useStateFromStoresObject([channelSettingsStoreBinding], function() {
return ChannelSettingsStore.getInvites();
});
r0 = value;
} else {
r0 = [];
const value8 = ReactModule.useMemo(_fun116005, [ReactModule.useMemo(_fun116001, [invites]),
FluxModule.useStateFromStoresArray([ChannelStore], _fun116003)]);
items = [value8.length];
ReactModule.useEffect(function() {
importDefault(dependencyMap[11]).setSection(ChannelSettingsSections.INSTANT_INVITES);
}, []);
const value9 = ReactModule.useCallback(_fun116009, [value8]);
if (loading) {
if (loading) {
var viewBindingProps = {style: styles.content};
const SceneLoadingIndicator = (require(5460) /* metro dependency 5460: SceneLoadingIndicatorNative */).SceneLoadingIndicator;
items2 = [
<SceneLoadingIndicator />,
];
if (value8.length > 0) {
value = importDefault(15184) /* metro dependency 15184: InstantInviteSelfMeasurer */;
value = ((Component) => <Component item={value8[0]} onMeasured={value4} />)(value);
r7 = value;
} else {
r7 = null;
}
items2[1] = r7;
value = (
<View {...viewBindingProps}>
{items2}
</View>
);
r1 = value;
} else if (property == null) {
var viewBindingProps = {style: styles.content};
const SceneLoadingIndicator2 = (require(5460) /* metro dependency 5460: SceneLoadingIndicatorNative */).SceneLoadingIndicator;
items2 = [
<SceneLoadingIndicator2 />,
];
if (value8.length > 0) {
value = importDefault(15184) /* metro dependency 15184: InstantInviteSelfMeasurer */;
value = ((Component) => <Component item={value8[0]} onMeasured={value4} />)(value);
r7 = value;
} else {
r7 = null;
}
items2[1] = r7;
value = (
<View {...viewBindingProps}>
{items2}
</View>
);
r1 = value;
} else {
var viewBindingProps = {style: styles.content};
value = importDefault(8671) /* metro dependency 8671: FastestListAndroid */;
value = (
<View {...viewBindingProps}>
{((Component) => <Component sections={items} estimatedListSize="windowSize" itemSize={property} renderItem={value9} insetStart={styles.gap.height} insetEnd={bottom} />)(value)}
</View>
);
r1 = value;
}
r0 = r1;
} else if (value8.length !== 0) {
if (loading) {
var viewBindingProps = {style: styles.content};
const SceneLoadingIndicator3 = (require(5460) /* metro dependency 5460: SceneLoadingIndicatorNative */).SceneLoadingIndicator;
items2 = [
<SceneLoadingIndicator3 />,
];
if (value8.length > 0) {
value = importDefault(15184) /* metro dependency 15184: InstantInviteSelfMeasurer */;
value = ((Component) => <Component item={value8[0]} onMeasured={value4} />)(value);
r7 = value;
} else {
r7 = null;
}
items2[1] = r7;
value = (
<View {...viewBindingProps}>
{items2}
</View>
);
r1 = value;
} else if (property == null) {
var viewBindingProps = {style: styles.content};
const SceneLoadingIndicator4 = (require(5460) /* metro dependency 5460: SceneLoadingIndicatorNative */).SceneLoadingIndicator;
items2 = [
<SceneLoadingIndicator4 />,
];
if (value8.length > 0) {
value = importDefault(15184) /* metro dependency 15184: InstantInviteSelfMeasurer */;
value = ((Component) => <Component item={value8[0]} onMeasured={value4} />)(value);
r7 = value;
} else {
r7 = null;
}
items2[1] = r7;
value = (
<View {...viewBindingProps}>
{items2}
</View>
);
r1 = value;
} else {
var viewBindingProps = {style: styles.content};
value = importDefault(8671) /* metro dependency 8671: FastestListAndroid */;
value = (
<View {...viewBindingProps}>
{((Component) => <Component sections={items} estimatedListSize="windowSize" itemSize={property} renderItem={value9} insetStart={styles.gap.height} insetEnd={bottom} />)(value)}
</View>
);
r1 = value;
}
r0 = r1;
} else {
EmptyState = (require(1305) /* metro dependency 1305: native */).EmptyState;
r0 = (
<EmptyState
lightSource={importDefault(12146) /* metro dependency 12146 */}
darkSource={importDefault(12147) /* metro dependency 12147 */}
title={intl.string(t['+nLJkZ'])}
body={intl.string(t.F53CAc)}
/>
);
}
return r0;
function _fun115998(a0) { // fn#115998, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15380:634, offset: 0x02477b4d, size: 37 bytes, params: 2, frame: 11
env0_1(a0 + styles.gap.height);
}
function _fun116001() { // fn#116001, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15380:818, offset: 0x02477b97, size: 47 bytes, params: 1, frame: 11
const Object = global.Object;
return Object.values(invites).sort(function(a0, a1) {
var r2;
var property = a0.inviter;
var value = undefined;
r2 = property == null ? value : property.username;
var value2 = '';
var value3 = (r2 ?? value2).toLowerCase();
property = a1.inviter;
return value3.localeCompare(((property == null ? value : property.username) ?? value2).toLowerCase());
});
}
function _fun116003() { // fn#116003, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15380:1082, offset: 0x02477c34, size: 67 bytes, params: 1, frame: 12
var environment;
var r0;
var value2;
var channelStoreBinding;
var value;
if (channel != null) {
value2 = environment.__proto__;
channelStoreBinding = ChannelStore;
value = channelStoreBinding.getSortedLinkedChannelsForGuild(channel.guild_id);
value = value.filter(function({id}) {
return id === channel.id;
});
r0 = value;
} else {
r0 = [];
}
return r0;
}
function _fun116005() { // fn#116005, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15380:1183, offset: 0x02477c91, size: 69 bytes, params: 1, frame: 15
let binding = ReactModule;
const value2 = binding.map(function(a0) {
return {type: 'invite', data: a0};
});
const items2 = [];
const value3 = arraySpread(items2, value2, 0, binding);
binding = ReactNativeModule.View;
arraySpread(items2, binding.map(function(a0) {
return {type: 'channel', data: a0};
}), value3, binding);
return items2;
}
function _fun116009(a0, a1) { // fn#116009, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15380:1375, offset: 0x02477d2c, size: 130 bytes, params: 3, frame: 15
var r0;
var value;
const property = env0_6[a1];
if (property.type === 'invite') {
value = environment.__proto__;
value = importDefault(12132) /* metro dependency 12132: InstantInvite */;
value = ((Component) => <Component invite={property.data} />)(value);
r0 = value;
} else {
value = environment.__proto__;
const LinkedChannelInvite = (require(12132) /* metro dependency 12132: InstantInvite */).LinkedChannelInvite;
value = <LinkedChannelInvite channel={property.data} />;
r0 = value;
}
return r0;
}
}
return r0;
}
function _fun116005() { // fn#116005, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15380:1183, offset: 0x02477c91, size: 69 bytes, params: 1, frame: 15
let binding = env0_4;
const value2 = binding.map(function(a0) {
return {type: 'invite', data: a0};
});
const items2 = [];
const value3 = arraySpread(items2, value2, 0, binding);
binding = env0_5;
arraySpread(items2, binding.map(function(a0) {
return {type: 'channel', data: a0};
}), value3, binding);
return items2;
}
function _fun116009(a0, a1) { // fn#116009, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15380:1375, offset: 0x02477d2c, size: 130 bytes, params: 3, frame: 15
var r0;
var value;
const property = env0_6[a1];
if (property.type === 'invite') {
value = environment.__proto__;
value = importDefault(12132) /* metro dependency 12132: InstantInvite */;
value = ((Component) => <Component invite={property.data} />)(value);
r0 = value;
} else {
value = environment.__proto__;
const LinkedChannelInvite = (require(12132) /* metro dependency 12132: InstantInvite */).LinkedChannelInvite;
value = <LinkedChannelInvite channel={property.data} />;
r0 = value;
}
return r0;
}
global.__d(_fun115996, 15183, [57, 31, 27, 8149, 1379, 661, 33, 4501, 697, 1585, 566, 8148, 12132, 1305, 12146,
12147, 1244, 5460, 15184, 8671,
2]) /* metro module 15183, dependencies: [57, 31, 27, 8149, 1379, 661, 33, 4501, 697, 1585, 566, 8148, 12132, 1305, 12146, 12147, 1244, 5460, 15184, 8671, 2] */;
@@ -1,125 +1,170 @@
/* Metro module 15200; source: components_native/channel_settings/ChannelSettingsIntegrationsOverview.tsx; dependencies: [31, 1379, 661, 33, 1484, 6777, 6231, 1244, 6238, 1305, 1423, 4501, 697, 566, 7972, 4572, 15117, 15201, 2] */
import Native from '../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import ChannelStore from '../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as ConstantsModule from '../../Constants.tsx'; /* Metro dependency 661 */
import * as IndexNativeModule from '../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as UseNavigationNativeModule from '../../design/components/Navigator/native/useNavigation.native.tsx'; /* Metro dependency 1484 */
import * as TableRowNativeModule from '../../design/components/TableRow/native/TableRow.native.tsx'; /* Metro dependency 6238 */
function _fun116242(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#116242, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15397:6, offset: 0x024826a4, size: 286 bytes, params: 8, frame: 22
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const env0_4 = (require(661) /* metro dependency 661: Constants */).ChannelSettingsSections;
let value = require(33) /* metro dependency 33 */;
ReactModule;
let value = JsxRuntimeModule;
const env0_5 = value.jsx;
const env0_6 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
const object = {flex: 1};
const BACKGROUND_BASE_LOWER = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWER;
object.backgroundColor = BACKGROUND_BASE_LOWER;
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object.paddingTop = PX_16;
const env0_7 = Reflect.apply(createStyles, value, [{screenContainer: object}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/channel_settings/ChannelSettingsIntegrationsOverview.tsx');
const object2 = {flex: 1};
const BACKGROUND_BASE_LOWER = (Native).colors.BACKGROUND_BASE_LOWER;
object2.backgroundColor = BACKGROUND_BASE_LOWER;
const PX_16 = (Native).space.PX_16;
object2.paddingTop = PX_16;
const env0_7 = Reflect.apply(createStyles, value, [{screenContainer: object2}]);
(FileImportTrackerModule).fileFinishedImporting('components_native/channel_settings/ChannelSettingsIntegrationsOverview.tsx');
exports.default = ConnectedChannelSettingsIntegrationsOverview;
}
function LinkedLobbyFormSection({channel}) { // fn#116243, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15397:175, offset: 0x024827c2, size: 380 bytes, params: 2, frame: 30
var r0;
var TableRowGroup;
var object2;
var intl;
var TableRow;
var Avatar;
var value;
const env0_1 = (require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation();
const value4 = (require(6777) /* metro dependency 6777: useGetOrFetchApplications */).useGetOrFetchApplication(channel.linkedLobby?.application_id);
if (value4 == null) {
r0 = null;
} else {
TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
object2 = {};
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object2.title = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.oAvIAg);
object2.hasIcons = true;
TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
var tableRowProps = {label: value4.name};
Avatar = (require(1305) /* metro dependency 1305: native */).Avatar;
value = importDefault(1423) /* metro dependency 1423: AvatarUtils */;
tableRowProps.icon = <Avatar source={value.getApplicationIconSource({id: value4.id,
icon: value4.icon})} size={(require(1305) /* metro dependency 1305: native */).AvatarSizes.REFRESH_MEDIUM_32} />;
tableRowProps.arrow = true;
tableRowProps.onPress = onPress_116244;
value = <TableRowGroup {...object2}><TableRow {...tableRowProps} /></TableRowGroup>;
r0 = value;
}
return r0;
}
function ConnectedChannelSettingsIntegrationsOverview({channelId, canManageWebhooks, canUnlinkLobby}) { // fn#116245, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15397:957, offset: 0x02482973, size: 748 bytes, params: 2, frame: 37
var r11;
var r9;
var r0;
var Form;
var Stack;
var object;
var space;
var TableRowGroup;
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
var object5;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var items3;
var object6;
var items2;
const env0_1 = (require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation();
const channel = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], function() {
return ChannelStore.getChannel(channelId);
});
const styles = useStyles();
if (channel == null) {
r0 = null;
} else {
Form = (require(7972) /* metro dependency 7972: native */).Form;
var formProps = {style: styles.screenContainer};
Stack = (require(4572) /* metro dependency 4572: StackNative */).Stack;
object = {};
space = (importDefault(697) /* metro dependency 697: native */).space;
object.style = {paddingHorizontal: space.PX_12};
space = (importDefault(697) /* metro dependency 697: native */).space;
object.spacing = space.PX_24;
if (canManageWebhooks) {
TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
items3 = [<TableRow label={intl.string(t.jp25Id)} subLabel={intl.string(t.mKIOkI)} icon={((WebhookIcon) => <WebhookIcon />)((require(15117) /* metro dependency 15117: WebhookIcon */).WebhookIcon)} arrow onPress={onPress_116247} />];
items3[1] = <TableRow label={intl.string(t.OrV60r)} subLabel={intl.string(t.rQREJl)} icon={((ChannelsFollowedIcon) => <ChannelsFollowedIcon />)((require(15201) /* metro dependency 15201: ChannelsFollowedIcon */).ChannelsFollowedIcon)} arrow onPress={onPress_116248} />;
r11 = <TableRowGroup hasIcons>{items3}</TableRowGroup>;
function LinkedLobbyFormSection({channel}) { // fn#116243, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15397:175, offset: 0x024827c2, size: 380 bytes, params: 2, frame: 30
var r0;
var TableRowGroup;
var object;
var intl;
var TableRow;
var Avatar;
var value;
const env0_1 = (UseNavigationNativeModule).useNavigation();
const value4 = (require(6777) /* metro dependency 6777: useGetOrFetchApplications */).useGetOrFetchApplication(channel.linkedLobby?.application_id);
if (value4 == null) {
r0 = null;
} else {
r11 = canManageWebhooks;
TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
object = {};
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object.title = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.oAvIAg);
object.hasIcons = true;
TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
var tableRowProps = {label: value4.name};
Avatar = (require(1305) /* metro dependency 1305: native */).Avatar;
value = importDefault(1423) /* metro dependency 1423: AvatarUtils */;
tableRowProps.icon = (
<Avatar
source={value.getApplicationIconSource({id: value4.id, icon: value4.icon})}
size={(require(1305) /* metro dependency 1305: native */).AvatarSizes.REFRESH_MEDIUM_32}
/>
);
tableRowProps.arrow = true;
tableRowProps.onPress = onPress_116244;
value = (
<TableRowGroup {...object}>
<TableRow {...tableRowProps} />
</TableRowGroup>
);
r0 = value;
}
items2 = [r11];
r9 = canUnlinkLobby && channel.linkedLobby != null;
r9 = r9 && <LinkedLobbyFormSection channel={channel} />;
items2[1] = r9;
r0 = <Form {...formProps}><Stack {...object}>{items2}</Stack></Form>;
return r0;
function LinkedLobbyFormSectionOnPress() { // fn#116244, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15397:628, owner: LinkedLobbyFormSection.onPress, offset: 0x0248293e, size: 53 bytes, params: 1, frame: 14
const binding = env0_1;
const push = binding.push;
const EDIT_LINKED_LOBBY = ChannelSettingsSections.EDIT_LINKED_LOBBY;
Reflect.apply(push, binding, [EDIT_LINKED_LOBBY, {channel: channel, numScreensToPop: 1}]);
}
}
return r0;
}
function LinkedLobbyFormSectionOnPress() { // fn#116244, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15397:628, owner: LinkedLobbyFormSection.onPress, offset: 0x0248293e, size: 53 bytes, params: 1, frame: 14
const binding = env0_1;
const push = binding.push;
const EDIT_LINKED_LOBBY = ChannelSettingsSections.EDIT_LINKED_LOBBY;
Reflect.apply(push, binding, [EDIT_LINKED_LOBBY, {channel: channel, numScreensToPop: 1}]);
}
function ConnectedChannelSettingsIntegrationsOverview({channelId, canManageWebhooks, canUnlinkLobby}) { // fn#116245, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15397:957, offset: 0x02482973, size: 748 bytes, params: 2, frame: 37
var r11;
var r9;
var r0;
var Form;
var Stack;
var object2;
var space;
var TableRowGroup;
const TableRow = (TableRowNativeModule).TableRow;
var object3;
const intl = (IndexNativeModule).intl;
const t = (IndexNativeModule).t;
var items3;
var object4;
var items2;
const env0_1 = (UseNavigationNativeModule).useNavigation();
const channel = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], function() {
return ChannelStore.getChannel(channelId);
});
const styles = useStyles();
if (channel == null) {
r0 = null;
} else {
Form = (require(7972) /* metro dependency 7972: native */).Form;
var formProps = {style: styles.screenContainer};
Stack = (require(4572) /* metro dependency 4572: StackNative */).Stack;
object2 = {};
space = (importDefault(697) /* metro dependency 697: native */).space;
object2.style = {paddingHorizontal: space.PX_12};
space = (importDefault(697) /* metro dependency 697: native */).space;
object2.spacing = space.PX_24;
if (canManageWebhooks) {
TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
items3 = [
<TableRow
label={intl.string(t.jp25Id)}
subLabel={intl.string(t.mKIOkI)}
icon={((WebhookIcon) => <WebhookIcon />)((require(15117) /* metro dependency 15117: WebhookIcon */).WebhookIcon)}
arrow
onPress={onPress_116247}
/>,
];
items3[1] = (
<TableRow
label={intl.string(t.OrV60r)}
subLabel={intl.string(t.rQREJl)}
icon={((ChannelsFollowedIcon) => <ChannelsFollowedIcon />)((require(15201) /* metro dependency 15201: ChannelsFollowedIcon */).ChannelsFollowedIcon)}
arrow
onPress={onPress_116248}
/>
);
r11 = (
<TableRowGroup hasIcons>
{items3}
</TableRowGroup>
);
} else {
r11 = canManageWebhooks;
}
items2 = [r11];
r9 = canUnlinkLobby && channel.linkedLobby != null;
r9 = r9 && <LinkedLobbyFormSection channel={channel} />;
items2[1] = r9;
r0 = (
<Form {...formProps}>
<Stack {...object2}>
{items2}
</Stack>
</Form>
);
}
return r0;
function ConnectedChannelSettingsIntegrationsOverviewOnPress() { // fn#116247, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15397:1540, owner: ConnectedChannelSettingsIntegrationsOverview.onPress, offset: 0x02482c5f, size: 32 bytes, params: 1, frame: 11
const binding = env0_1;
const push = binding.push;
const WEBHOOKS = ChannelSettingsSections.WEBHOOKS;
return Reflect.apply(push, binding, [WEBHOOKS]);
}
function ConnectedChannelSettingsIntegrationsOverviewOnPress() { // fn#116247, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15397:1540, owner: ConnectedChannelSettingsIntegrationsOverview.onPress, offset: 0x02482c5f, size: 32 bytes, params: 1, frame: 11
const binding = env0_1;
const push = binding.push;
const WEBHOOKS = ChannelSettingsSections.WEBHOOKS;
return Reflect.apply(push, binding, [WEBHOOKS]);
}
function ConnectedChannelSettingsIntegrationsOverviewOnPress_116248() { // fn#116248, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15397:1734, owner: ConnectedChannelSettingsIntegrationsOverview.onPress, offset: 0x02482c7f, size: 32 bytes, params: 1, frame: 11
const binding = env0_1;
const push = binding.push;
const CHANNELS_FOLLOWED = ChannelSettingsSections.CHANNELS_FOLLOWED;
return Reflect.apply(push, binding, [CHANNELS_FOLLOWED]);
}
}
function ConnectedChannelSettingsIntegrationsOverviewOnPress_116248() { // fn#116248, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15397:1734, owner: ConnectedChannelSettingsIntegrationsOverview.onPress, offset: 0x02482c7f, size: 32 bytes, params: 1, frame: 11
const binding = env0_1;
const push = binding.push;
const CHANNELS_FOLLOWED = ChannelSettingsSections.CHANNELS_FOLLOWED;
return Reflect.apply(push, binding, [CHANNELS_FOLLOWED]);
}
global.__d(_fun116242, 15200, [31, 1379, 661, 33, 1484, 6777, 6231, 1244, 6238, 1305, 1423, 4501, 697, 566, 7972,
4572, 15117, 15201,
2]) /* metro module 15200, dependencies: [31, 1379, 661, 33, 1484, 6777, 6231, 1244, 6238, 1305, 1423, 4501, 697, 566, 7972, 4572, 15117, 15201, 2] */;
@@ -1,196 +1,216 @@
/* Metro module 15171; source: components_native/channel_settings/ChannelSettingsModal.tsx; dependencies: [31, 27, 661, 9615, 33, 4501, 697, 15172, 1244, 10935, 15107, 15182, 15183, 15185, 15190, 15191, 15200, 15203, 15210, 15212, 15213, 15214, 15215, 15216, 2] */
import ChannelSettingsNotifications from './ChannelSettingsNotifications.tsx'; /* Metro dependency 10935 */
import PinsScreen from '../../modules/search/native/components/tabs/pages/messages/PinsScreen.tsx'; /* Metro dependency 15107 */
import ChatPreview from '../common/ChatPreview.tsx'; /* Metro dependency 15182 */
import ChannelSettingsInstantInvites from './ChannelSettingsInstantInvites.tsx'; /* Metro dependency 15183 */
import EasyChannelPermissionSettings from '../../modules/channel_permissions/native/components/EasyChannelPermissionSettings.tsx'; /* Metro dependency 15185 */
import ChannelSettingsPermissionsList from './ChannelSettingsPermissionsList.tsx'; /* Metro dependency 15190 */
import ChannelSettingsPermissionsOverrides from './ChannelSettingsPermissionsOverrides.tsx'; /* Metro dependency 15191 */
import ChannelSettingsIntegrationsOverview from './ChannelSettingsIntegrationsOverview.tsx'; /* Metro dependency 15200 */
import IntegrationsSettingsWebhooksOverview from '../../modules/integration_settings/native/IntegrationsSettingsWebhooksOverview.tsx'; /* Metro dependency 15203 */
import IntegrationsSettingsEditWebhook from '../../modules/integration_settings/native/IntegrationsSettingsEditWebhook.tsx'; /* Metro dependency 15210 */
import IntegrationsSettingsEditLinkedLobby from '../../modules/integration_settings/native/IntegrationsSettingsEditLinkedLobby.tsx'; /* Metro dependency 15212 */
import ChannelSettingsChangeCategory from './ChannelSettingsChangeCategory.tsx'; /* Metro dependency 15213 */
import ChannelSettingsChangeRTCRegion from './ChannelSettingsChangeRTCRegion.tsx'; /* Metro dependency 15214 */
import ChannelSettingsEditForumTag from '../../modules/forums/native/ChannelSettingsEditForumTag.tsx'; /* Metro dependency 15215 */
import ChannelSettingsChangeDefaultForumLayout from './ChannelSettingsChangeDefaultForumLayout.tsx'; /* Metro dependency 15216 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as ConstantsModule from '../../Constants.tsx'; /* Metro dependency 661 */
import * as IndexNativeModule from '../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as CreateStylesModule from '../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as SearchConstantsModule from '../../modules/search/SearchConstants.tsx'; /* Metro dependency 9615 */
function _fun115812(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#115812, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15368:6, offset: 0x0246e727, size: 325 bytes, params: 8, frame: 23
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_3 = (require(27) /* metro dependency 27 */).View;
let value = require(661) /* metro dependency 661: Constants */;
ReactModule;
let value = ConstantsModule;
const env0_4 = value.ChannelSettingsSections;
const env0_5 = value.SearchTypes;
const env0_6 = value.WebhookTypes;
const env0_7 = (require(9615) /* metro dependency 9615: SearchConstants */).SearchTabs;
const env0_8 = (require(33) /* metro dependency 33 */).jsx;
const createStyles = (require(4501) /* metro dependency 4501: createStyles */).createStyles;
object2 = {};
const createStyles = (CreateStylesModule).createStyles;
object = {};
let MOBILE_ACTIONSHEET_BACKGROUND = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_ACTIONSHEET_BACKGROUND;
object2.container = {flex: 1, backgroundColor: MOBILE_ACTIONSHEET_BACKGROUND};
object.container = {flex: 1, backgroundColor: MOBILE_ACTIONSHEET_BACKGROUND};
MOBILE_ACTIONSHEET_BACKGROUND = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_ACTIONSHEET_BACKGROUND;
object2.pinsScreen = {flex: 1, backgroundColor: MOBILE_ACTIONSHEET_BACKGROUND};
value = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/channel_settings/ChannelSettingsModal.tsx');
object.pinsScreen = {flex: 1, backgroundColor: MOBILE_ACTIONSHEET_BACKGROUND};
value = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('components_native/channel_settings/ChannelSettingsModal.tsx');
exports.useChannelSettingsScreensStyles = value;
exports.getChannelSettingsScreens = getChannelSettingsScreens;
function getChannelSettingsScreens(a0, a1, a2) { // fn#115813, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15368:570, offset: 0x0246e86c, size: 1165 bytes, params: 4, frame: 21
const env0_0 = a0;
const env0_1 = a1;
const env0_2 = a2;
const object = {};
const OVERVIEW = ChannelSettingsSections.OVERVIEW;
object[OVERVIEW] = {render: render_115814};
const NOTIFICATIONS = ChannelSettingsSections.NOTIFICATIONS;
const intl = (IndexNativeModule).intl;
let string = intl.string;
const t = (IndexNativeModule).t;
object[NOTIFICATIONS] = {title: Reflect.apply(string, intl, [t.h850Ss]), render: render_115815};
const PINNED_MESSAGES = ChannelSettingsSections.PINNED_MESSAGES;
const object4 = {};
object4.title = intl.string(t['mp1N/2']);
object4.render = render_115816;
object[PINNED_MESSAGES] = object4;
const PINNED_CHAT = ChannelSettingsSections.PINNED_CHAT;
object[PINNED_CHAT] = {postponeRender: true, render: render_115817};
const INSTANT_INVITES = ChannelSettingsSections.INSTANT_INVITES;
object[INSTANT_INVITES] = {title: intl.string(t.ngRFjZ), postponeRender: true, render: render_115818};
const PERMISSIONS = ChannelSettingsSections.PERMISSIONS;
object[PERMISSIONS] = {title: intl.string(t.xrmhRX), render: render_115819};
const NEW_PERMISSION = ChannelSettingsSections.NEW_PERMISSION;
object[NEW_PERMISSION] = {title: intl.string(t.vPHdP5), postponeRender: true, render: render_115820};
const PERMISSION_OVERRIDES = ChannelSettingsSections.PERMISSION_OVERRIDES;
string = intl.string;
const D4p9TR = t.D4p9TR;
object[PERMISSION_OVERRIDES] = {title: Reflect.apply(string, intl, [D4p9TR]), render: render_115821};
const INTEGRATIONS = ChannelSettingsSections.INTEGRATIONS;
string = intl.string;
const CIsNZw = t.CIsNZw;
object[INTEGRATIONS] = {title: Reflect.apply(string, intl, [CIsNZw]), render: render_115822};
const WEBHOOKS = ChannelSettingsSections.WEBHOOKS;
object[WEBHOOKS] = {title: intl.string(t.jp25Id), render: render_115823};
const EDIT_WEBHOOK = ChannelSettingsSections.EDIT_WEBHOOK;
const object9 = {};
object9.title = intl.string(t['6SE3L3']);
object9.render = render_115824;
object[EDIT_WEBHOOK] = object9;
const EDIT_LINKED_LOBBY = ChannelSettingsSections.EDIT_LINKED_LOBBY;
string = intl.string;
const OJknhi = t.OJknhi;
object[EDIT_LINKED_LOBBY] = {title: Reflect.apply(string, intl, [OJknhi]), render: render_115825};
const CHANNELS_FOLLOWED = ChannelSettingsSections.CHANNELS_FOLLOWED;
string = intl.string;
const OrV60r = t.OrV60r;
object[CHANNELS_FOLLOWED] = {title: Reflect.apply(string, intl, [OrV60r]), render: render_115826};
const CHANGE_CATEGORY = ChannelSettingsSections.CHANGE_CATEGORY;
const object10 = {};
object10.title = intl.string(t['+caQHK']);
object10.render = render_115827;
object[CHANGE_CATEGORY] = object10;
const CHANGE_RTC_REGION = ChannelSettingsSections.CHANGE_RTC_REGION;
const object11 = {};
object11.title = intl.string(t['Ms8bX+']);
object11.render = render_115828;
object[CHANGE_RTC_REGION] = object11;
const EDIT_FORUM_TAG = ChannelSettingsSections.EDIT_FORUM_TAG;
object[EDIT_FORUM_TAG] = {render: render_115829};
const DEFAULT_FORUM_LAYOUT = ChannelSettingsSections.DEFAULT_FORUM_LAYOUT;
const object12 = {};
object12.title = intl.string(t['kQvoC/']);
object12.render = render_115830;
object[DEFAULT_FORUM_LAYOUT] = object12;
return object;
function getChannelSettingsScreensRender(a0) { // fn#115814, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15368:640, owner: getChannelSettingsScreens.render, offset: 0x0246ecf9, size: 75 bytes, params: 2, frame: 16
const value = environment.__proto__;
return ((Component) => <Component channelId={env0_0} autoFocusElement={a0?.autoFocusElement} />)(importDefault(15172) /* metro dependency 15172: ChannelSettingsOverview */);
}
function getChannelSettingsScreensRender_115815() { // fn#115815, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15368:790, owner: getChannelSettingsScreens.render, offset: 0x0246ed44, size: 50 bytes, params: 1, frame: 14
const value = environment.__proto__;
return ((Component) => <Component channelId={env0_0} />)(ChannelSettingsNotifications);
}
function getChannelSettingsScreensRender_115816() { // fn#115816, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15368:888, owner: getChannelSettingsScreens.render, offset: 0x0246ed76, size: 131 bytes, params: 1, frame: 17
const object = {};
const GUILD_CHANNEL = SearchTypes.GUILD_CHANNEL;
object.type = GUILD_CHANNEL;
object.guildId = require;
object.channelId = env0_0;
const pinsScreen = importDefault.pinsScreen;
const PINS = SearchTabs.PINS;
return (
<View style={pinsScreen}>
<PinsScreen
searchContext={object}
tab={PINS}
isFocused
/>
</View>
);
}
function getChannelSettingsScreensRender_115817() { // fn#115817, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15368:1088, owner: getChannelSettingsScreens.render, offset: 0x0246edf9, size: 50 bytes, params: 1, frame: 14
const value = environment.__proto__;
return ((Component) => <Component channelId={env0_0} />)(ChatPreview);
}
function getChannelSettingsScreensRender_115818() { // fn#115818, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15368:1209, owner: getChannelSettingsScreens.render, offset: 0x0246ee2b, size: 39 bytes, params: 1, frame: 13
const value = environment.__proto__;
return ((Component) => <Component />)(ChannelSettingsInstantInvites);
}
function getChannelSettingsScreensRender_115819(a0) { // fn#115819, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15368:1297, owner: getChannelSettingsScreens.render, offset: 0x0246ee52, size: 65 bytes, params: 2, frame: 15
const value = environment.__proto__;
return ((Component) => <Component {...a0} {...{['channelId']: env0_0}} />)(EasyChannelPermissionSettings);
}
function getChannelSettingsScreensRender_115820(a0) { // fn#115820, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15368:1421, owner: getChannelSettingsScreens.render, offset: 0x0246ee93, size: 60 bytes, params: 2, frame: 14
const value = environment.__proto__;
return ((Component) => <Component channelId={env0_0} {...a0} />)(ChannelSettingsPermissionsList);
}
function getChannelSettingsScreensRender_115821(a0) { // fn#115821, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15368:1533, owner: getChannelSettingsScreens.render, offset: 0x0246eecf, size: 60 bytes, params: 2, frame: 14
const value = environment.__proto__;
return ((Component) => <Component channelId={env0_0} {...a0} />)(ChannelSettingsPermissionsOverrides);
}
function getChannelSettingsScreensRender_115822(a0) { // fn#115822, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15368:1637, owner: getChannelSettingsScreens.render, offset: 0x0246ef0b, size: 60 bytes, params: 2, frame: 14
const value = environment.__proto__;
return ((Component) => <Component channelId={env0_0} {...a0} />)(ChannelSettingsIntegrationsOverview);
}
function getChannelSettingsScreensRender_115823() { // fn#115823, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15368:1737, owner: getChannelSettingsScreens.render, offset: 0x0246ef47, size: 65 bytes, params: 1, frame: 15
const INCOMING = WebhookTypes.INCOMING;
return <IntegrationsSettingsWebhooksOverview channelId={env0_0} webhookType={INCOMING} />;
}
function getChannelSettingsScreensRender_115824(a0) { // fn#115824, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15368:1863, owner: getChannelSettingsScreens.render, offset: 0x0246ef88, size: 49 bytes, params: 2, frame: 14
const value = environment.__proto__;
return ((Component) => <Component {...a0} />)(IntegrationsSettingsEditWebhook);
}
function getChannelSettingsScreensRender_115825(a0) { // fn#115825, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15368:1960, owner: getChannelSettingsScreens.render, offset: 0x0246efb9, size: 49 bytes, params: 2, frame: 14
const value = environment.__proto__;
return ((Component) => <Component {...a0} />)(IntegrationsSettingsEditLinkedLobby);
}
function getChannelSettingsScreensRender_115826() { // fn#115826, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15368:2057, owner: getChannelSettingsScreens.render, offset: 0x0246efea, size: 65 bytes, params: 1, frame: 15
const CHANNEL_FOLLOWER = WebhookTypes.CHANNEL_FOLLOWER;
return <IntegrationsSettingsWebhooksOverview channelId={env0_0} webhookType={CHANNEL_FOLLOWER} />;
}
function getChannelSettingsScreensRender_115827() { // fn#115827, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15368:2194, owner: getChannelSettingsScreens.render, offset: 0x0246f02b, size: 50 bytes, params: 1, frame: 14
const value = environment.__proto__;
return ((Component) => <Component channelId={env0_0} />)(ChannelSettingsChangeCategory);
}
function getChannelSettingsScreensRender_115828() { // fn#115828, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15368:2302, owner: getChannelSettingsScreens.render, offset: 0x0246f05d, size: 50 bytes, params: 1, frame: 14
const value = environment.__proto__;
return ((Component) => <Component channelId={env0_0} />)(ChannelSettingsChangeRTCRegion);
}
function getChannelSettingsScreensRender_115829(a0) { // fn#115829, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15368:2360, owner: getChannelSettingsScreens.render, offset: 0x0246f08f, size: 60 bytes, params: 2, frame: 14
const value = environment.__proto__;
return ((Component) => <Component channelId={env0_0} {...a0} />)(ChannelSettingsEditForumTag);
}
function getChannelSettingsScreensRender_115830() { // fn#115830, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15368:2475, owner: getChannelSettingsScreens.render, offset: 0x0246f0cb, size: 50 bytes, params: 1, frame: 14
const value = environment.__proto__;
return ((Component) => <Component channelId={env0_0} />)(ChannelSettingsChangeDefaultForumLayout);
}
}
}
function getChannelSettingsScreens(a0, a1, a2) { // fn#115813, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15368:570, offset: 0x0246e86c, size: 1165 bytes, params: 4, frame: 21
const env0_0 = a0;
const env0_1 = a1;
const env0_2 = a2;
const object2 = {};
const OVERVIEW = ChannelSettingsSections.OVERVIEW;
object2[OVERVIEW] = {render: render_115814};
const NOTIFICATIONS = ChannelSettingsSections.NOTIFICATIONS;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
object2[NOTIFICATIONS] = {title: Reflect.apply(string, intl, [t.h850Ss]), render: render_115815};
const PINNED_MESSAGES = ChannelSettingsSections.PINNED_MESSAGES;
const object3 = {};
object3.title = intl.string(t['mp1N/2']);
object3.render = render_115816;
object2[PINNED_MESSAGES] = object3;
const PINNED_CHAT = ChannelSettingsSections.PINNED_CHAT;
object2[PINNED_CHAT] = {postponeRender: true, render: render_115817};
const INSTANT_INVITES = ChannelSettingsSections.INSTANT_INVITES;
object2[INSTANT_INVITES] = {title: intl.string(t.ngRFjZ), postponeRender: true, render: render_115818};
const PERMISSIONS = ChannelSettingsSections.PERMISSIONS;
object2[PERMISSIONS] = {title: intl.string(t.xrmhRX), render: render_115819};
const NEW_PERMISSION = ChannelSettingsSections.NEW_PERMISSION;
object2[NEW_PERMISSION] = {title: intl.string(t.vPHdP5), postponeRender: true, render: render_115820};
const PERMISSION_OVERRIDES = ChannelSettingsSections.PERMISSION_OVERRIDES;
string = intl.string;
const D4p9TR = t.D4p9TR;
object2[PERMISSION_OVERRIDES] = {title: Reflect.apply(string, intl, [D4p9TR]), render: render_115821};
const INTEGRATIONS = ChannelSettingsSections.INTEGRATIONS;
string = intl.string;
const CIsNZw = t.CIsNZw;
object2[INTEGRATIONS] = {title: Reflect.apply(string, intl, [CIsNZw]), render: render_115822};
const WEBHOOKS = ChannelSettingsSections.WEBHOOKS;
object2[WEBHOOKS] = {title: intl.string(t.jp25Id), render: render_115823};
const EDIT_WEBHOOK = ChannelSettingsSections.EDIT_WEBHOOK;
const object5 = {};
object5.title = intl.string(t['6SE3L3']);
object5.render = render_115824;
object2[EDIT_WEBHOOK] = object5;
const EDIT_LINKED_LOBBY = ChannelSettingsSections.EDIT_LINKED_LOBBY;
string = intl.string;
const OJknhi = t.OJknhi;
object2[EDIT_LINKED_LOBBY] = {title: Reflect.apply(string, intl, [OJknhi]), render: render_115825};
const CHANNELS_FOLLOWED = ChannelSettingsSections.CHANNELS_FOLLOWED;
string = intl.string;
const OrV60r = t.OrV60r;
object2[CHANNELS_FOLLOWED] = {title: Reflect.apply(string, intl, [OrV60r]), render: render_115826};
const CHANGE_CATEGORY = ChannelSettingsSections.CHANGE_CATEGORY;
const object6 = {};
object6.title = intl.string(t['+caQHK']);
object6.render = render_115827;
object2[CHANGE_CATEGORY] = object6;
const CHANGE_RTC_REGION = ChannelSettingsSections.CHANGE_RTC_REGION;
const object7 = {};
object7.title = intl.string(t['Ms8bX+']);
object7.render = render_115828;
object2[CHANGE_RTC_REGION] = object7;
const EDIT_FORUM_TAG = ChannelSettingsSections.EDIT_FORUM_TAG;
object2[EDIT_FORUM_TAG] = {render: render_115829};
const DEFAULT_FORUM_LAYOUT = ChannelSettingsSections.DEFAULT_FORUM_LAYOUT;
const object8 = {};
object8.title = intl.string(t['kQvoC/']);
object8.render = render_115830;
object2[DEFAULT_FORUM_LAYOUT] = object8;
return object2;
}
function getChannelSettingsScreensRender(a0) { // fn#115814, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15368:640, owner: getChannelSettingsScreens.render, offset: 0x0246ecf9, size: 75 bytes, params: 2, frame: 16
const value = environment.__proto__;
return ((Component) => <Component channelId={env0_0} autoFocusElement={a0?.autoFocusElement} />)(importDefault(15172) /* metro dependency 15172: ChannelSettingsOverview */);
}
function getChannelSettingsScreensRender_115815() { // fn#115815, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15368:790, owner: getChannelSettingsScreens.render, offset: 0x0246ed44, size: 50 bytes, params: 1, frame: 14
const value = environment.__proto__;
return ((Component) => <Component channelId={env0_0} />)(importDefault(10935) /* metro dependency 10935: ChannelSettingsNotifications */);
}
function getChannelSettingsScreensRender_115816() { // fn#115816, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15368:888, owner: getChannelSettingsScreens.render, offset: 0x0246ed76, size: 131 bytes, params: 1, frame: 17
const object2 = {};
const GUILD_CHANNEL = SearchTypes.GUILD_CHANNEL;
object2.type = GUILD_CHANNEL;
object2.guildId = require;
object2.channelId = env0_0;
const pinsScreen = importDefault.pinsScreen;
const PinsScreen = importDefault(15107) /* metro dependency 15107: PinsScreen */;
const PINS = SearchTabs.PINS;
return (
<View style={pinsScreen}>
<PinsScreen
searchContext={object2}
tab={PINS}
isFocused
/>
</View>
);
}
function getChannelSettingsScreensRender_115817() { // fn#115817, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15368:1088, owner: getChannelSettingsScreens.render, offset: 0x0246edf9, size: 50 bytes, params: 1, frame: 14
const value = environment.__proto__;
return ((Component) => <Component channelId={env0_0} />)(importDefault(15182) /* metro dependency 15182: ChatPreview */);
}
function getChannelSettingsScreensRender_115818() { // fn#115818, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15368:1209, owner: getChannelSettingsScreens.render, offset: 0x0246ee2b, size: 39 bytes, params: 1, frame: 13
const value = environment.__proto__;
return ((Component) => <Component />)(importDefault(15183) /* metro dependency 15183: ChannelSettingsInstantInvites */);
}
function getChannelSettingsScreensRender_115819(a0) { // fn#115819, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15368:1297, owner: getChannelSettingsScreens.render, offset: 0x0246ee52, size: 65 bytes, params: 2, frame: 15
const value = environment.__proto__;
return ((Component) => <Component {...a0} {...{['channelId']: env0_0}} />)(importDefault(15185) /* metro dependency 15185: EasyChannelPermissionSettings */);
}
function getChannelSettingsScreensRender_115820(a0) { // fn#115820, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15368:1421, owner: getChannelSettingsScreens.render, offset: 0x0246ee93, size: 60 bytes, params: 2, frame: 14
const value = environment.__proto__;
return ((Component) => <Component channelId={env0_0} {...a0} />)(importDefault(15190) /* metro dependency 15190: ChannelSettingsPermissionsList */);
}
function getChannelSettingsScreensRender_115821(a0) { // fn#115821, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15368:1533, owner: getChannelSettingsScreens.render, offset: 0x0246eecf, size: 60 bytes, params: 2, frame: 14
const value = environment.__proto__;
return ((Component) => <Component channelId={env0_0} {...a0} />)(importDefault(15191) /* metro dependency 15191: ChannelSettingsPermissionsOverrides */);
}
function getChannelSettingsScreensRender_115822(a0) { // fn#115822, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15368:1637, owner: getChannelSettingsScreens.render, offset: 0x0246ef0b, size: 60 bytes, params: 2, frame: 14
const value = environment.__proto__;
return ((Component) => <Component channelId={env0_0} {...a0} />)(importDefault(15200) /* metro dependency 15200: ChannelSettingsIntegrationsOverview */);
}
function getChannelSettingsScreensRender_115823() { // fn#115823, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15368:1737, owner: getChannelSettingsScreens.render, offset: 0x0246ef47, size: 65 bytes, params: 1, frame: 15
const IntegrationsSettingsWebhooksOverview = importDefault(15203) /* metro dependency 15203: IntegrationsSettingsWebhooksOverview */;
const INCOMING = WebhookTypes.INCOMING;
return <IntegrationsSettingsWebhooksOverview channelId={env0_0} webhookType={INCOMING} />;
}
function getChannelSettingsScreensRender_115824(a0) { // fn#115824, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15368:1863, owner: getChannelSettingsScreens.render, offset: 0x0246ef88, size: 49 bytes, params: 2, frame: 14
const value = environment.__proto__;
return ((Component) => <Component {...a0} />)(importDefault(15210) /* metro dependency 15210: IntegrationsSettingsEditWebhook */);
}
function getChannelSettingsScreensRender_115825(a0) { // fn#115825, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15368:1960, owner: getChannelSettingsScreens.render, offset: 0x0246efb9, size: 49 bytes, params: 2, frame: 14
const value = environment.__proto__;
return ((Component) => <Component {...a0} />)(importDefault(15212) /* metro dependency 15212: IntegrationsSettingsEditLinkedLobby */);
}
function getChannelSettingsScreensRender_115826() { // fn#115826, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15368:2057, owner: getChannelSettingsScreens.render, offset: 0x0246efea, size: 65 bytes, params: 1, frame: 15
const IntegrationsSettingsWebhooksOverview = importDefault(15203) /* metro dependency 15203: IntegrationsSettingsWebhooksOverview */;
const CHANNEL_FOLLOWER = WebhookTypes.CHANNEL_FOLLOWER;
return <IntegrationsSettingsWebhooksOverview channelId={env0_0} webhookType={CHANNEL_FOLLOWER} />;
}
function getChannelSettingsScreensRender_115827() { // fn#115827, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15368:2194, owner: getChannelSettingsScreens.render, offset: 0x0246f02b, size: 50 bytes, params: 1, frame: 14
const value = environment.__proto__;
return ((Component) => <Component channelId={env0_0} />)(importDefault(15213) /* metro dependency 15213: ChannelSettingsChangeCategory */);
}
function getChannelSettingsScreensRender_115828() { // fn#115828, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15368:2302, owner: getChannelSettingsScreens.render, offset: 0x0246f05d, size: 50 bytes, params: 1, frame: 14
const value = environment.__proto__;
return ((Component) => <Component channelId={env0_0} />)(importDefault(15214) /* metro dependency 15214: ChannelSettingsChangeRTCRegion */);
}
function getChannelSettingsScreensRender_115829(a0) { // fn#115829, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15368:2360, owner: getChannelSettingsScreens.render, offset: 0x0246f08f, size: 60 bytes, params: 2, frame: 14
const value = environment.__proto__;
return ((Component) => <Component channelId={env0_0} {...a0} />)(importDefault(15215) /* metro dependency 15215: ChannelSettingsEditForumTag */);
}
function getChannelSettingsScreensRender_115830() { // fn#115830, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15368:2475, owner: getChannelSettingsScreens.render, offset: 0x0246f0cb, size: 50 bytes, params: 1, frame: 14
const value = environment.__proto__;
return ((Component) => <Component channelId={env0_0} />)(importDefault(15216) /* metro dependency 15216: ChannelSettingsChangeDefaultForumLayout */);
}
global.__d(_fun115812, 15171, [31, 27, 661, 9615, 33, 4501, 697, 15172, 1244, 10935, 15107, 15182, 15183, 15185,
15190, 15191, 15200, 15203, 15210, 15212, 15213, 15214, 15215, 15216,
2]) /* metro module 15171, dependencies: [31, 27, 661, 9615, 33, 4501, 697, 15172, 1244, 10935, 15107, 15182, 15183, 15185, 15190, 15191, 15200, 15203, 15210, 15212, 15213, 15214, 15215, 15216, 2] */;
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
@@ -1,328 +1,344 @@
/* Metro module 15190; source: components_native/channel_settings/ChannelSettingsPermissionsList.tsx; dependencies: [57, 31, 27, 1379, 1945, 1938, 1878, 661, 33, 4501, 697, 566, 6590, 1484, 1585, 7705, 4603, 3789, 6238, 11025, 1909, 12140, 6984, 1244, 8671, 1305, 8754, 2] */
import Module00057 from '../../by-id/module-00057.js'; /* Metro dependency 57 */
import Native from '../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import ChannelStore from '../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import UseSafeAreaInsetsNative from '../../modules/safe_area/useSafeAreaInsets.native.tsx'; /* Metro dependency 1585 */
import UserStore from '../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import GuildRoleStore from '../../stores/GuildRoleStore.tsx'; /* Metro dependency 1938 */
import GuildMemberStore from '../../stores/GuildMemberStore.tsx'; /* Metro dependency 1945 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as ConstantsModule from '../../Constants.tsx'; /* Metro dependency 661 */
import * as UseNavigationNativeModule from '../../design/components/Navigator/native/useNavigation.native.tsx'; /* Metro dependency 1484 */
import * as ServerModule from '../../flow/Server.tsx'; /* Metro dependency 1909 */
import * as CreateStylesModule from '../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as SearchFieldNativeModule from '../../design/components/TextField/native/SearchField.native.tsx'; /* Metro dependency 6984 */
import * as UseScaledRowHeightModule from '../../modules/main_tabs_v2/native/shared_components/user_list/useScaledRowHeight.tsx'; /* Metro dependency 7705 */
function _fun116140(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#116140, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15387:6, offset: 0x0247c31d, size: 442 bytes, params: 8, frame: 24
var object3;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_4 = importDefault(57) /* metro dependency 57 */;
let value = importAll(31) /* metro dependency 31 */;
const env0_6 = (require(27) /* metro dependency 27 */).View;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const guildMemberStore = importDefault(1945) /* metro dependency 1945: GuildMemberStore */;
const guildRoleStore = importDefault(1938) /* metro dependency 1938: GuildRoleStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const constantsModule = require(661) /* metro dependency 661: Constants */;
const env0_11 = constantsModule.PermissionOverrideType;
const env0_12 = constantsModule.ChannelSettingsSections;
const value3 = require(33) /* metro dependency 33 */;
const env0_13 = value3.jsx;
const env0_14 = value3.jsxs;
object3 = {rows: [], sections: []};
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
object3 = {};
const object4 = {};
const BACKGROUND_BASE_LOWER = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWER;
object4.backgroundColor = BACKGROUND_BASE_LOWER;
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object4.paddingHorizontal = PX_12;
object4.flex = 1;
object3.container = object4;
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object3.containerSearchBar = {paddingVertical: PX_8};
const env0_16 = Reflect.apply(createStyles, createStylesModule, [object3]);
let value = ReactModule;
object = {rows: [], sections: []};
const createStyles = CreateStylesModule.createStyles;
object = {};
const object2 = {};
const BACKGROUND_BASE_LOWER = (Native).colors.BACKGROUND_BASE_LOWER;
object2.backgroundColor = BACKGROUND_BASE_LOWER;
const PX_12 = (Native).space.PX_12;
object2.paddingHorizontal = PX_12;
object2.flex = 1;
object.container = object2;
const PX_8 = (Native).space.PX_8;
object.containerSearchBar = {paddingVertical: PX_8};
const env0_16 = Reflect.apply(createStyles, CreateStylesModule, [object]);
value = value.memo(ChannelSettingsPermissionsList);
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/channel_settings/ChannelSettingsPermissionsList.tsx');
(FileImportTrackerModule).fileFinishedImporting('components_native/channel_settings/ChannelSettingsPermissionsList.tsx');
exports.default = value;
}
function ChannelSettingsPermissionsList({channelId, type}) { // fn#116141, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15387:498, offset: 0x0247c4d7, size: 1204 bytes, params: 2, frame: 35
var r8;
var r5;
var EmptyState;
var FastestListAndroid;
var space;
var PX_8;
let env0_5 = undefined;
const styles = useStyles();
const value3 = (require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation();
let binding = env0_5;
const [property, property2] = env0_4(binding.useState(''), 2);
const bottom = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)().bottom;
const channel = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], function() {
return ChannelStore.getChannel(channelId);
});
const {guildId,
sortedGuildRoles} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([GuildRoleStore],
_fun116143, [channel]);
const MEMBER = PermissionOverrideType.MEMBER;
const value7 = useGuildMemberData({enabled: type === MEMBER, permissionOverwrites: channel?.permissionOverwrites,
guildId: guildId, searchQuery: property});
const rows = value7.rows;
env0_5 = rows;
const sections = value7.sections;
let ROLE = PermissionOverrideType.ROLE;
const value8 = useGuildRoleData({enabled: type === ROLE, channel: channel, sortedGuildRoles: sortedGuildRoles,
searchQuery: property});
const rows2 = value8.rows;
const sections2 = value8.sections;
const {rowHeight,
rowContentHeight} = (require(7705) /* metro dependency 7705: useScaledRowHeight */).useScaledRowHeightData();
binding = env0_5;
const value11 = binding.useCallback(_fun116153, [guildId, rows, rows2, binding.useCallback(_fun116151, [channelId,
value3, type]), type, rowContentHeight]);
const SearchField = (require(6984) /* metro dependency 6984: SearchFieldNative */).SearchField;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const view = <View style={styles.containerSearchBar}><SearchField size="md" placeholder={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['5h0QOP'])} onChange={property2} isRound /></View>;
ROLE = PermissionOverrideType.ROLE;
if ((type === ROLE ? rows2.length : rows.length) !== 0) {
FastestListAndroid = importDefault(8671) /* metro dependency 8671: FastestListAndroid */;
var defaultImportProps = {sections: type !== PermissionOverrideType.ROLE ? sections : sections2,
itemSize: rowHeight, estimatedListSize: 'windowSize', renderItem: value11, wrapChildren: true};
space = (importDefault(697) /* metro dependency 697: native */).space;
PX_8 = space.PX_8;
defaultImportProps.insetStart = PX_8;
space = (importDefault(697) /* metro dependency 697: native */).space;
PX_8 = space.PX_8;
defaultImportProps.insetEnd = PX_8 + bottom;
defaultImportProps.keyboardShouldPersistTaps = 'always';
r5 = <FastestListAndroid {...defaultImportProps} />;
} else {
EmptyState = (require(1305) /* metro dependency 1305: native */).EmptyState;
var emptyStateProps = {Illustration: (require(8754) /* metro dependency 8754: NoResults */).NoResults};
ROLE = PermissionOverrideType.ROLE;
r8 = type === ROLE ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.Sojqsr) : intl.string((require(1244) /* metro dependency 1244: indexNative */).t.pYHobK);
emptyStateProps.title = r8;
ROLE = PermissionOverrideType.ROLE;
r8 = type === ROLE ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t['7gBhmO']) : intl.string((require(1244) /* metro dependency 1244: indexNative */).t.tuL9TW);
emptyStateProps.body = r8;
r5 = <EmptyState {...emptyStateProps} />;
}
return (
<View style={styles.container}>
{view}
{r5}
</View>
);
}
function _fun116143() { // fn#116143, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15387:755, offset: 0x0247c98b, size: 84 bytes, params: 1, frame: 13
var r2;
var value;
const channelBinding = channel;
const value2 = undefined;
const r1 = (channelBinding == null ? value2 : channel.getGuildId()) ?? value2;
if (r1 != null) {
value = environment.__proto__;
value = GuildRoleStore.getSortedRoles(r1);
r2 = value;
} else {
r2 = value2;
}
return {sortedGuildRoles: r2, guildId: r1};
}
function useGuildMemberData({enabled, permissionOverwrites, guildId, searchQuery}) { // fn#116144, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15387:929, owner: ChannelSettingsPermissionsList.useGuildMemberData, offset: 0x0247c9df, size: 146 bytes, params: 2, frame: 19
return env1_5.useMemo(_fun116146, [enabled, guildId,
(require(566) /* metro dependency 566: flux */).useStateFromStores([GuildMemberStore], function() {
return GuildMemberStore.getMemberVersion();
}), permissionOverwrites, searchQuery]);
}
function useGuildRoleData({enabled, channel, sortedGuildRoles, searchQuery}) { // fn#116148, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15387:1590, owner: ChannelSettingsPermissionsList.useGuildRoleData, offset: 0x0247cbd8, size: 90 bytes, params: 2, frame: 17
return env1_5.useMemo(_fun116149, [enabled, channel, sortedGuildRoles, searchQuery]);
}
function _fun116151(a0, a1) { // fn#116151, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15387:2074, offset: 0x0247cd01, size: 144 bytes, params: 3, frame: 19
var environment;
var value2;
var defaultImport;
var updatePermissionOverwrite;
var object2;
var NONE;
const env0_0 = a0;
let channelIdBinding = channelId;
if (channelIdBinding != null) {
value2 = environment.__proto__;
defaultImport = importDefault(4603) /* metro dependency 4603: ChannelActionCreators */;
updatePermissionOverwrite = defaultImport.updatePermissionOverwrite;
channelIdBinding = channelId;
object2 = {id: a0, type: a1};
NONE = (importAll(3789) /* metro dependency 3789: PermissionUtils */).NONE;
object2.allow = NONE;
NONE = (importAll(3789) /* metro dependency 3789: PermissionUtils */).NONE;
object2.deny = NONE;
Reflect.apply(updatePermissionOverwrite, defaultImport, [channelIdBinding, object2]).then(_fun116152);
}
}
function _fun116153(a0, a1) { // fn#116153, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15387:2285, offset: 0x0247cdd0, size: 354 bytes, params: 3, frame: 22
var property;
const value = a1 === 0;
let typeBinding = type;
const ROLE = PermissionOverrideType.ROLE;
const value4 = a1 === (typeBinding === ROLE ? rows.length : rows.length) - 1;
if (guildId != null) {
typeBinding = type;
if (PermissionOverrideType.ROLE === typeBinding) {
property = rows[a1];
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
return (
<TableRow
arrow
end={value4}
label={((RoleLabel) => <RoleLabel name={property.name} color={property.colorString} colors={property.colorStrings} />)((require(11025) /* metro dependency 11025: RoleLabel */).RoleLabel)}
onPress={onPress_116154}
start={value}
/>
);
}
var MEMBER = PermissionOverrideType.MEMBER;
if (MEMBER === typeBinding) {
return ((Component) => <Component arrow contentHeight={rowContentHeight} end={value4} guildId={guildId} userId={rows[a1].id} onPress={onPress_116155} start={value} />)(importDefault(12140) /* metro dependency 12140: DetailedGuildIdentityUserRow */);
}
}
return null;
}
function _fun116146() { // fn#116146, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15387:1101, offset: 0x0247ca86, size: 287 bytes, params: 1, frame: 28
var environment;
var r7;
var r14;
var r12;
var items2;
var value2;
var propertyName;
var propertyName2;
var user;
var value6;
var property2;
var value7;
var length;
var value8;
var defaultImport;
var toLowerCase;
var value9;
var username;
var value10;
var value;
if (enabled) {
if (guildId == null) {
value = environment.__proto__.__proto__;
return env2_15;
}
items2 = [];
value2 = environment.__proto__.__proto__;
for (propertyName in GuildMemberStore.getMutableAllGuildsAndMembers()[guildId]) {
user = UserStore.getUser(propertyName);
value6 = user != null;
if (!value6) {
r12 = value6;
continue;
}
if (permissionOverwrites == null) {
r14 = undefined;
continue;
}
property2 = permissionOverwrites[propertyName];
r14 = property2;
value7 = r14 == null;
r12 = value7;
if (!r12) {
continue;
}
length = searchQuery.length;
value8 = length === 0;
if (value8) {
r14 = value8;
continue;
}
defaultImport = importDefault(6590) /* metro dependency 6590 */;
value9 = searchQuery.toLowerCase();
username = user.username;
toLowerCase = username.toLowerCase;
value10 = defaultImport(value9, Reflect.apply(toLowerCase, username, []));
r14 = value10;
r12 = r14;
if (!r12) {
r7 = propertyName2;
continue;
}
items2.push(user);
r7 = propertyName2;
}
items2.sort(function(a0, a1) {
var username = a0.username;
var value = username.toLowerCase();
username = a1.username;
return value.localeCompare(username.toLowerCase());
function ChannelSettingsPermissionsList({channelId, type}) { // fn#116141, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15387:498, offset: 0x0247c4d7, size: 1204 bytes, params: 2, frame: 35
var r8;
var r5;
var EmptyState;
var FastestListAndroid;
var space;
var PX_8;
let env0_5 = undefined;
const styles = useStyles();
const value3 = (UseNavigationNativeModule).useNavigation();
let binding = env0_5;
const [property, property2] = Module00057(binding.useState(''), 2);
const bottom = (UseSafeAreaInsetsNative)().bottom;
const channel = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], function() {
return ChannelStore.getChannel(channelId);
});
length = items2.length;
return {rows: items2, sections: [length]};
}
value = environment.__proto__.__proto__;
return env2_15;
}
function _fun116149() { // fn#116149, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15387:1690, offset: 0x0247cc32, size: 87 bytes, params: 1, frame: 11
var environment;
var value;
if (enabled) {
if (sortedGuildRoles == null) {
value = environment.__proto__.__proto__;
return env2_15;
const {guildId,
sortedGuildRoles} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([GuildRoleStore],
_fun116143, [channel]);
const MEMBER = PermissionOverrideType.MEMBER;
const value7 = useGuildMemberData({enabled: type === MEMBER, permissionOverwrites: channel?.permissionOverwrites,
guildId: guildId, searchQuery: property});
const rows = value7.rows;
env0_5 = rows;
const sections = value7.sections;
let ROLE = PermissionOverrideType.ROLE;
const value8 = useGuildRoleData({enabled: type === ROLE, channel: channel, sortedGuildRoles: sortedGuildRoles,
searchQuery: property});
const rows2 = value8.rows;
const sections2 = value8.sections;
const {rowHeight,
rowContentHeight} = (UseScaledRowHeightModule).useScaledRowHeightData();
binding = env0_5;
const value11 = binding.useCallback(_fun116153, [guildId, rows, rows2, binding.useCallback(_fun116151, [channelId,
value3, type]), type, rowContentHeight]);
const SearchField = (SearchFieldNativeModule).SearchField;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const view = (
<View style={styles.containerSearchBar}>
<SearchField
size="md"
placeholder={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['5h0QOP'])}
onChange={property2}
isRound
/>
</View>
);
ROLE = PermissionOverrideType.ROLE;
if ((type === ROLE ? rows2.length : rows.length) !== 0) {
FastestListAndroid = importDefault(8671) /* metro dependency 8671: FastestListAndroid */;
var defaultImportProps = {sections: type !== PermissionOverrideType.ROLE ? sections : sections2,
itemSize: rowHeight, estimatedListSize: 'windowSize', renderItem: value11, wrapChildren: true};
space = (importDefault(697) /* metro dependency 697: native */).space;
PX_8 = space.PX_8;
defaultImportProps.insetStart = PX_8;
space = (importDefault(697) /* metro dependency 697: native */).space;
PX_8 = space.PX_8;
defaultImportProps.insetEnd = PX_8 + bottom;
defaultImportProps.keyboardShouldPersistTaps = 'always';
r5 = <FastestListAndroid {...defaultImportProps} />;
} else {
EmptyState = (require(1305) /* metro dependency 1305: native */).EmptyState;
var emptyStateProps = {Illustration: (require(8754) /* metro dependency 8754: NoResults */).NoResults};
ROLE = PermissionOverrideType.ROLE;
r8 = type === ROLE ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.Sojqsr) : intl.string((require(1244) /* metro dependency 1244: indexNative */).t.pYHobK);
emptyStateProps.title = r8;
ROLE = PermissionOverrideType.ROLE;
r8 = type === ROLE ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t['7gBhmO']) : intl.string((require(1244) /* metro dependency 1244: indexNative */).t.tuL9TW);
emptyStateProps.body = r8;
r5 = <EmptyState {...emptyStateProps} />;
}
if (channel == null) {
value = environment.__proto__.__proto__;
return env2_15;
return (
<View style={styles.container}>
{view}
{r5}
</View>
);
function _fun116143() { // fn#116143, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15387:755, offset: 0x0247c98b, size: 84 bytes, params: 1, frame: 13
var r2;
var value;
const channelBinding = channel;
const value2 = undefined;
const r1 = (channelBinding == null ? value2 : channel.getGuildId()) ?? value2;
if (r1 != null) {
value = environment.__proto__;
value = GuildRoleStore.getSortedRoles(r1);
r2 = value;
} else {
r2 = value2;
}
return {sortedGuildRoles: r2, guildId: r1};
}
value = sortedGuildRoles.filter(_fun116150);
return {rows: value, sections: [value.length]};
function useGuildMemberData({enabled, permissionOverwrites, guildId, searchQuery}) { // fn#116144, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15387:929, owner: ChannelSettingsPermissionsList.useGuildMemberData, offset: 0x0247c9df, size: 146 bytes, params: 2, frame: 19
return env1_5.useMemo(_fun116146, [enabled, guildId,
(require(566) /* metro dependency 566: flux */).useStateFromStores([GuildMemberStore], function() {
return GuildMemberStore.getMemberVersion();
}), permissionOverwrites, searchQuery]);
function _fun116146() { // fn#116146, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15387:1101, offset: 0x0247ca86, size: 287 bytes, params: 1, frame: 28
var environment;
var r7;
var r14;
var r12;
var items2;
var value2;
var propertyName;
var propertyName2;
var user;
var value6;
var property2;
var value7;
var length;
var value8;
var defaultImport;
var toLowerCase;
var value9;
var username;
var value10;
var value;
if (enabled) {
if (guildId == null) {
value = environment.__proto__.__proto__;
return env2_15;
}
items2 = [];
value2 = environment.__proto__.__proto__;
for (propertyName in GuildMemberStore.getMutableAllGuildsAndMembers()[guildId]) {
user = UserStore.getUser(propertyName);
value6 = user != null;
if (!value6) {
r12 = value6;
continue;
}
if (permissionOverwrites == null) {
r14 = undefined;
continue;
}
property2 = permissionOverwrites[propertyName];
r14 = property2;
value7 = r14 == null;
r12 = value7;
if (!r12) {
continue;
}
length = searchQuery.length;
value8 = length === 0;
if (value8) {
r14 = value8;
continue;
}
defaultImport = importDefault(6590) /* metro dependency 6590 */;
value9 = searchQuery.toLowerCase();
username = user.username;
toLowerCase = username.toLowerCase;
value10 = defaultImport(value9, Reflect.apply(toLowerCase, username, []));
r14 = value10;
r12 = r14;
if (!r12) {
r7 = propertyName2;
continue;
}
items2.push(user);
r7 = propertyName2;
}
items2.sort(function(a0, a1) {
var username = a0.username;
var value = username.toLowerCase();
username = a1.username;
return value.localeCompare(username.toLowerCase());
});
length = items2.length;
return {rows: items2, sections: [length]};
}
value = environment.__proto__.__proto__;
return env2_15;
}
}
function useGuildRoleData({enabled, channel, sortedGuildRoles, searchQuery}) { // fn#116148, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15387:1590, owner: ChannelSettingsPermissionsList.useGuildRoleData, offset: 0x0247cbd8, size: 90 bytes, params: 2, frame: 17
return env1_5.useMemo(_fun116149, [enabled, channel, sortedGuildRoles, searchQuery]);
function _fun116149() { // fn#116149, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15387:1690, offset: 0x0247cc32, size: 87 bytes, params: 1, frame: 11
var environment;
var value;
if (enabled) {
if (sortedGuildRoles == null) {
value = environment.__proto__.__proto__;
return env2_15;
}
if (channel == null) {
value = environment.__proto__.__proto__;
return env2_15;
}
value = sortedGuildRoles.filter(_fun116150);
return {rows: value, sections: [value.length]};
}
value = environment.__proto__.__proto__;
return env2_15;
function _fun116150(a0) { // fn#116150, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15387:1744, offset: 0x0247cc89, size: 120 bytes, params: 2, frame: 17
var r3;
var value3;
var defaultImport;
var value4;
var name;
const value = environment.__proto__;
const value2 = searchQuery.length !== 0;
if (value2) {
value3 = environment.__proto__.__proto__.__proto__;
defaultImport = importDefault(6590) /* metro dependency 6590 */;
value4 = searchQuery.toLowerCase();
name = a0.name;
r3 = !defaultImport(value4, name.toLowerCase());
} else {
r3 = value2;
}
return !r3 && channel.permissionOverwrites[a0.id] == null;
}
}
}
function _fun116151(a0, a1) { // fn#116151, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15387:2074, offset: 0x0247cd01, size: 144 bytes, params: 3, frame: 19
var environment;
var value2;
var defaultImport;
var updatePermissionOverwrite;
var object;
var NONE;
const env0_0 = a0;
let channelIdBinding = channelId;
if (channelIdBinding != null) {
value2 = environment.__proto__;
defaultImport = importDefault(4603) /* metro dependency 4603: ChannelActionCreators */;
updatePermissionOverwrite = defaultImport.updatePermissionOverwrite;
channelIdBinding = channelId;
object = {id: a0, type: a1};
NONE = (importAll(3789) /* metro dependency 3789: PermissionUtils */).NONE;
object.allow = NONE;
NONE = (importAll(3789) /* metro dependency 3789: PermissionUtils */).NONE;
object.deny = NONE;
Reflect.apply(updatePermissionOverwrite, defaultImport, [channelIdBinding, object]).then(_fun116152);
}
function _fun116152() { // fn#116152, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15387:2190, offset: 0x0247cd91, size: 63 bytes, params: 1, frame: 14
const binding = env1_2;
const push = binding.push;
const PERMISSION_OVERRIDES = ChannelSettingsSections.PERMISSION_OVERRIDES;
Reflect.apply(push, binding, [PERMISSION_OVERRIDES, {type: type, id: env0_0, fromCreate: true}]);
}
}
function _fun116153(a0, a1) { // fn#116153, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15387:2285, offset: 0x0247cdd0, size: 354 bytes, params: 3, frame: 22
var property;
const value = a1 === 0;
let typeBinding = type;
const ROLE = PermissionOverrideType.ROLE;
const value4 = a1 === (typeBinding === ROLE ? rows.length : rows.length) - 1;
if (guildId != null) {
typeBinding = type;
if (PermissionOverrideType.ROLE === typeBinding) {
property = rows[a1];
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
return (
<TableRow
arrow
end={value4}
label={((RoleLabel) => <RoleLabel name={property.name} color={property.colorString} colors={property.colorStrings} />)((require(11025) /* metro dependency 11025: RoleLabel */).RoleLabel)}
onPress={onPress_116154}
start={value}
/>
);
}
var MEMBER = PermissionOverrideType.MEMBER;
if (MEMBER === typeBinding) {
return ((Component) => <Component arrow contentHeight={rowContentHeight} end={value4} guildId={guildId} userId={rows[a1].id} onPress={onPress_116155} start={value} />)(importDefault(12140) /* metro dependency 12140: DetailedGuildIdentityUserRow */);
}
}
return null;
function onPress_116154() { // fn#116154, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15387:2535, offset: 0x0247cf32, size: 64 bytes, params: 1, frame: 14
const binding = env1_8;
const id = env0_0.id;
const PermissionOverwriteType = (ServerModule).PermissionOverwriteType;
const ROLE = PermissionOverwriteType.ROLE;
binding(id, ROLE);
}
function onPress_116155() { // fn#116155, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15387:2702, offset: 0x0247cf72, size: 59 bytes, params: 1, frame: 14
const binding = env1_8;
const idBinding = id;
const PermissionOverwriteType = (ServerModule).PermissionOverwriteType;
const MEMBER = PermissionOverwriteType.MEMBER;
binding(idBinding, MEMBER);
}
}
}
value = environment.__proto__.__proto__;
return env2_15;
}
function _fun116152() { // fn#116152, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15387:2190, offset: 0x0247cd91, size: 63 bytes, params: 1, frame: 14
const binding = env1_2;
const push = binding.push;
const PERMISSION_OVERRIDES = ChannelSettingsSections.PERMISSION_OVERRIDES;
Reflect.apply(push, binding, [PERMISSION_OVERRIDES, {type: type, id: env0_0, fromCreate: true}]);
}
function onPress_116154() { // fn#116154, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15387:2535, offset: 0x0247cf32, size: 64 bytes, params: 1, frame: 14
const binding = env1_8;
const id = env0_0.id;
const PermissionOverwriteType = (require(1909) /* metro dependency 1909: Server */).PermissionOverwriteType;
const ROLE = PermissionOverwriteType.ROLE;
binding(id, ROLE);
}
function onPress_116155() { // fn#116155, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15387:2702, offset: 0x0247cf72, size: 59 bytes, params: 1, frame: 14
const binding = env1_8;
const idBinding = id;
const PermissionOverwriteType = (require(1909) /* metro dependency 1909: Server */).PermissionOverwriteType;
const MEMBER = PermissionOverwriteType.MEMBER;
binding(idBinding, MEMBER);
}
function _fun116150(a0) { // fn#116150, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15387:1744, offset: 0x0247cc89, size: 120 bytes, params: 2, frame: 17
var r3;
var value3;
var defaultImport;
var value4;
var name;
const value = environment.__proto__;
const value2 = searchQuery.length !== 0;
if (value2) {
value3 = environment.__proto__.__proto__.__proto__;
defaultImport = importDefault(6590) /* metro dependency 6590 */;
value4 = searchQuery.toLowerCase();
name = a0.name;
r3 = !defaultImport(value4, name.toLowerCase());
} else {
r3 = value2;
}
return !r3 && channel.permissionOverwrites[a0.id] == null;
}
global.__d(_fun116140, 15190, [57, 31, 27, 1379, 1945, 1938, 1878, 661, 33, 4501, 697, 566, 6590, 1484, 1585, 7705,
4603, 3789, 6238, 11025, 1909, 12140, 6984, 1244, 8671, 1305, 8754,
2]) /* metro module 15190, dependencies: [57, 31, 27, 1379, 1945, 1938, 1878, 661, 33, 4501, 697, 566, 6590, 1484, 1585, 7705, 4603, 3789, 6238, 11025, 1909, 12140, 6984, 1244, 8671, 1305, 8754, 2] */;
@@ -1,38 +1,42 @@
/* Metro module 15197; source: components_native/channel_settings/ChannelSettingsPermissionsOverrideCheckbox.tsx; dependencies: [31, 27, 33, 697, 4501, 3789, 1244, 10625, 9294, 15198, 3874, 2] */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as IndexNativeModule from '../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as PermissionUtilsModule from '../../utils/PermissionUtils.tsx'; /* Metro dependency 3789 */
import * as UseA11yRolesNativeModule from '../../external/discord_common/js/packages/design/hooks/useA11yRolesNative.tsx'; /* Metro dependency 3874 */
import * as CreateStylesModule from '../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
function _fun116230(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#116230, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15394:6, offset: 0x02481d66, size: 748 bytes, params: 8, frame: 26
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const value2 = require(27) /* metro dependency 27 */;
const env0_3 = value2.Pressable;
const env0_4 = value2.View;
const env0_5 = (require(33) /* metro dependency 33 */).jsx;
let value = ReactModule;
const PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
const md = (importDefault(697) /* metro dependency 697: native */).radii.md;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
const createStyles = CreateStylesModule.createStyles;
object = {};
const object3 = {};
const object2 = {};
const BACKGROUND_BASE_LOWEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWEST;
object3.backgroundColor = BACKGROUND_BASE_LOWEST;
object3.borderRadius = md;
object2.backgroundColor = BACKGROUND_BASE_LOWEST;
object2.borderRadius = md;
const PX_32 = (importDefault(697) /* metro dependency 697: native */).space.PX_32;
object3.height = PX_32;
object3.paddingVertical = PX_4;
object3.paddingHorizontal = PX_4 / 2;
object3.flexDirection = 'row';
object.ternaryCheckBox = object3;
object2.height = PX_32;
object2.paddingVertical = PX_4;
object2.paddingHorizontal = PX_4 / 2;
object2.flexDirection = 'row';
object.ternaryCheckBox = object2;
object.iconWrapper = {borderRadius: md - PX_4, marginHorizontal: PX_4 / 2, justifyContent: 'center', height: '100%'};
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object.icon = {marginHorizontal: PX_8};
const BACKGROUND_FEEDBACK_CRITICAL = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_FEEDBACK_CRITICAL;
object.denyActive = {backgroundColor: BACKGROUND_FEEDBACK_CRITICAL};
const object4 = {};
const object5 = {};
const ICON_FEEDBACK_CRITICAL = (importDefault(697) /* metro dependency 697: native */).colors.ICON_FEEDBACK_CRITICAL;
object4.backgroundColor = ICON_FEEDBACK_CRITICAL;
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm - 2;
object.denySelected = object4;
object5.backgroundColor = ICON_FEEDBACK_CRITICAL;
object5.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm - 2;
object.denySelected = object5;
const BACKGROUND_FEEDBACK_POSITIVE = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_FEEDBACK_POSITIVE;
object.allowActive = {backgroundColor: BACKGROUND_FEEDBACK_POSITIVE};
const ICON_FEEDBACK_POSITIVE = (importDefault(697) /* metro dependency 697: native */).colors.ICON_FEEDBACK_POSITIVE;
@@ -42,160 +46,162 @@ function _fun116230(global, require, importDefault, importAll, module, exports,
const INTERACTIVE_BACKGROUND_HOVER = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_BACKGROUND_HOVER;
object.passthroughActive = {backgroundColor: INTERACTIVE_BACKGROUND_HOVER};
object.disabled = {opacity: 0.3};
const env0_6 = Reflect.apply(createStyles, createStylesModule, [object]);
const DENY = (require(3789) /* metro dependency 3789: PermissionUtils */).DENY;
const env0_6 = Reflect.apply(createStyles, CreateStylesModule, [object]);
const DENY = (PermissionUtilsModule).DENY;
object = [DENY];
const PASSTHROUGH = (require(3789) /* metro dependency 3789: PermissionUtils */).PASSTHROUGH;
const PASSTHROUGH = (PermissionUtilsModule).PASSTHROUGH;
object[1] = PASSTHROUGH;
const ALLOW = (require(3789) /* metro dependency 3789: PermissionUtils */).ALLOW;
const ALLOW = (PermissionUtilsModule).ALLOW;
object[2] = ALLOW;
value = value.memo(ChannelSettingsPermissionsOverrideCheckbox);
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/channel_settings/ChannelSettingsPermissionsOverrideCheckbox.tsx');
(FileImportTrackerModule).fileFinishedImporting('components_native/channel_settings/ChannelSettingsPermissionsOverrideCheckbox.tsx');
exports.default = value;
function getAccessibilityLabel(a0) { // fn#116231, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15394:1095, offset: 0x02482052, size: 274 bytes, params: 2, frame: 15
const intl = (IndexNativeModule).intl;
const t = (IndexNativeModule).t;
const DENY = (PermissionUtilsModule).DENY;
if (DENY === a0) {
return intl.string(t['6639O5']);
}
const ALLOW = (PermissionUtilsModule).ALLOW;
if (ALLOW === a0) {
return intl.string(t.RzDfSk);
}
const PASSTHROUGH = (PermissionUtilsModule).PASSTHROUGH;
if (PASSTHROUGH === a0) {
return intl.string(t.ujC3ZS);
}
}
function getIcon_116232(a0, a1, a2) { // fn#116232, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15394:1355, offset: 0x02482164, size: 417 bytes, params: 4, frame: 19
var SlashIcon;
var colors;
var CheckmarkLargeBoldIcon;
var DenyIcon;
const DENY = (PermissionUtilsModule).DENY;
if (DENY === a0) {
DenyIcon = (require(10625) /* metro dependency 10625: DenyIcon */).DenyIcon;
var denyIconProps = {size: 'sm', style: a2.icon};
colors = (importDefault(697) /* metro dependency 697: native */).colors;
denyIconProps.color = a1 ? colors.WHITE : colors.ICON_FEEDBACK_CRITICAL;
return <DenyIcon {...denyIconProps} />;
}
const ALLOW = (PermissionUtilsModule).ALLOW;
if (ALLOW === a0) {
CheckmarkLargeBoldIcon = (require(9294) /* metro dependency 9294: CheckmarkLargeBoldIcon */).CheckmarkLargeBoldIcon;
var checkmarkLargeBoldIconProps = {size: 'sm', style: a2.icon};
colors = (importDefault(697) /* metro dependency 697: native */).colors;
checkmarkLargeBoldIconProps.color = a1 ? colors.WHITE : colors.ICON_FEEDBACK_POSITIVE;
return <CheckmarkLargeBoldIcon {...checkmarkLargeBoldIconProps} />;
}
const PASSTHROUGH = (PermissionUtilsModule).PASSTHROUGH;
if (PASSTHROUGH === a0) {
SlashIcon = (require(15198) /* metro dependency 15198: SlashIcon */).SlashIcon;
var slashIconProps = {size: 'sm', style: a2.icon};
colors = (importDefault(697) /* metro dependency 697: native */).colors;
slashIconProps.color = a1 ? colors.WHITE : colors.INTERACTIVE_TEXT_DEFAULT;
return <SlashIcon {...slashIconProps} />;
}
return null;
}
function getPressableStyleOverrides(a0, a1, a2) { // fn#116233, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15394:1852, offset: 0x02482305, size: 157 bytes, params: 4, frame: 16
const DENY = (PermissionUtilsModule).DENY;
if (DENY === a0) {
return a1 ? a2.denySelected : a2.denyActive;
}
const ALLOW = (PermissionUtilsModule).ALLOW;
if (ALLOW === a0) {
return a1 ? a2.allowSelected : a2.allowActive;
}
const PASSTHROUGH = (PermissionUtilsModule).PASSTHROUGH;
if (PASSTHROUGH === a0) {
return a1 ? a2.passthroughSelected : a2.passthroughActive;
}
}
function OverrideOption({type, selected, styles, onPress}) { // fn#116234, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15394:2110, offset: 0x024823a2, size: 163 bytes, params: 2, frame: 22
const {accessibilityRole,
accessibilityState} = (UseA11yRolesNativeModule).useRadioA11yNative({selected: selected});
return (
<Pressable
accessibilityRole={accessibilityRole}
accessibilityLabel={getAccessibilityLabel(type)}
accessibilityState={accessibilityState}
style={style_116235}
onPress={onPress}
>
{getIcon_116232(type, selected, styles)}
</Pressable>
);
function OverrideOptionStyle({pressed}) { // fn#116235, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15394:2370, owner: OverrideOption.style, offset: 0x02482445, size: 85 bytes, params: 2, frame: 16
var r0;
var stylesBinding;
var value2;
var getPressableStyleOverridesBinding;
var typeBinding;
var items2;
let selectedBinding = selected;
if (selectedBinding) {
value2 = environment.__proto__;
getPressableStyleOverridesBinding = getPressableStyleOverrides;
typeBinding = type;
selectedBinding = selected;
stylesBinding = styles;
items2 = [getPressableStyleOverridesBinding(typeBinding, selectedBinding, stylesBinding)];
items2[1] = stylesBinding.iconWrapper;
r0 = items2;
} else if (pressed) {
value2 = environment.__proto__;
getPressableStyleOverridesBinding = getPressableStyleOverrides;
typeBinding = type;
selectedBinding = selected;
stylesBinding = styles;
items2 = [getPressableStyleOverridesBinding(typeBinding, selectedBinding, stylesBinding)];
items2[1] = stylesBinding.iconWrapper;
r0 = items2;
} else {
r0 = styles.iconWrapper;
}
return r0;
}
}
function ChannelSettingsPermissionsOverrideCheckbox({value, disabled, onValueChange}) { // fn#116236, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15394:2504, offset: 0x0248249a, size: 158 bytes, params: 2, frame: 20
disabled = !(disabled === undefined) && disabled;
const styles = useStyles();
return (
<View
style={[styles.ternaryCheckBox, disabled && styles.disabled]}
pointerEvents={disabled ? 'none' : 'auto'}
accessibilityRole="radiogroup"
>
{env0_7.map(_fun116237)}
</View>
);
function _fun116237(a0, a1) { // fn#116237, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15394:2736, offset: 0x02482538, size: 100 bytes, params: 3, frame: 17
const env0_0 = a0;
return (
<OverrideOption
type={a0}
selected={value === a0}
styles={styles}
onPress={onPress_116238}
key={'checkbox-' + a1}
/>
);
function onPress_116238() { // fn#116238, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15394:2800, offset: 0x0248259c, size: 56 bytes, params: 1, frame: 12
if (onValueChange != null && value !== env0_0) {
onValueChange(env0_0);
}
}
}
}
}
function getAccessibilityLabel(a0) { // fn#116231, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15394:1095, offset: 0x02482052, size: 274 bytes, params: 2, frame: 15
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const DENY = (require(3789) /* metro dependency 3789: PermissionUtils */).DENY;
if (DENY === a0) {
return intl.string(t['6639O5']);
}
const ALLOW = (require(3789) /* metro dependency 3789: PermissionUtils */).ALLOW;
if (ALLOW === a0) {
return intl.string(t.RzDfSk);
}
const PASSTHROUGH = (require(3789) /* metro dependency 3789: PermissionUtils */).PASSTHROUGH;
if (PASSTHROUGH === a0) {
return intl.string(t.ujC3ZS);
}
}
function getIcon_116232(a0, a1, a2) { // fn#116232, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15394:1355, offset: 0x02482164, size: 417 bytes, params: 4, frame: 19
var SlashIcon;
var colors;
var CheckmarkLargeBoldIcon;
var DenyIcon;
const DENY = (require(3789) /* metro dependency 3789: PermissionUtils */).DENY;
if (DENY === a0) {
DenyIcon = (require(10625) /* metro dependency 10625: DenyIcon */).DenyIcon;
var denyIconProps = {size: 'sm', style: a2.icon};
colors = (importDefault(697) /* metro dependency 697: native */).colors;
denyIconProps.color = a1 ? colors.WHITE : colors.ICON_FEEDBACK_CRITICAL;
return <DenyIcon {...denyIconProps} />;
}
const ALLOW = (require(3789) /* metro dependency 3789: PermissionUtils */).ALLOW;
if (ALLOW === a0) {
CheckmarkLargeBoldIcon = (require(9294) /* metro dependency 9294: CheckmarkLargeBoldIcon */).CheckmarkLargeBoldIcon;
var checkmarkLargeBoldIconProps = {size: 'sm', style: a2.icon};
colors = (importDefault(697) /* metro dependency 697: native */).colors;
checkmarkLargeBoldIconProps.color = a1 ? colors.WHITE : colors.ICON_FEEDBACK_POSITIVE;
return <CheckmarkLargeBoldIcon {...checkmarkLargeBoldIconProps} />;
}
const PASSTHROUGH = (require(3789) /* metro dependency 3789: PermissionUtils */).PASSTHROUGH;
if (PASSTHROUGH === a0) {
SlashIcon = (require(15198) /* metro dependency 15198: SlashIcon */).SlashIcon;
var slashIconProps = {size: 'sm', style: a2.icon};
colors = (importDefault(697) /* metro dependency 697: native */).colors;
slashIconProps.color = a1 ? colors.WHITE : colors.INTERACTIVE_TEXT_DEFAULT;
return <SlashIcon {...slashIconProps} />;
}
return null;
}
function getPressableStyleOverrides(a0, a1, a2) { // fn#116233, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15394:1852, offset: 0x02482305, size: 157 bytes, params: 4, frame: 16
const DENY = (require(3789) /* metro dependency 3789: PermissionUtils */).DENY;
if (DENY === a0) {
return a1 ? a2.denySelected : a2.denyActive;
}
const ALLOW = (require(3789) /* metro dependency 3789: PermissionUtils */).ALLOW;
if (ALLOW === a0) {
return a1 ? a2.allowSelected : a2.allowActive;
}
const PASSTHROUGH = (require(3789) /* metro dependency 3789: PermissionUtils */).PASSTHROUGH;
if (PASSTHROUGH === a0) {
return a1 ? a2.passthroughSelected : a2.passthroughActive;
}
}
function OverrideOption({type, selected, styles, onPress}) { // fn#116234, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15394:2110, offset: 0x024823a2, size: 163 bytes, params: 2, frame: 22
const {accessibilityRole,
accessibilityState} = (require(3874) /* metro dependency 3874: useA11yRolesNative */).useRadioA11yNative({selected: selected});
return (
<Pressable
accessibilityRole={accessibilityRole}
accessibilityLabel={getAccessibilityLabel(type)}
accessibilityState={accessibilityState}
style={style_116235}
onPress={onPress}
>
{getIcon_116232(type, selected, styles)}
</Pressable>
);
}
function ChannelSettingsPermissionsOverrideCheckbox({value, disabled, onValueChange}) { // fn#116236, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15394:2504, offset: 0x0248249a, size: 158 bytes, params: 2, frame: 20
disabled = !(disabled === undefined) && disabled;
const styles = useStyles();
return (
<View
style={[styles.ternaryCheckBox, disabled && styles.disabled]}
pointerEvents={disabled ? 'none' : 'auto'}
accessibilityRole="radiogroup"
>
{env0_7.map(_fun116237)}
</View>
);
}
function OverrideOptionStyle({pressed}) { // fn#116235, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15394:2370, owner: OverrideOption.style, offset: 0x02482445, size: 85 bytes, params: 2, frame: 16
var r0;
var stylesBinding;
var value2;
var getPressableStyleOverridesBinding;
var typeBinding;
var items2;
let selectedBinding = selected;
if (selectedBinding) {
value2 = environment.__proto__;
getPressableStyleOverridesBinding = getPressableStyleOverrides;
typeBinding = type;
selectedBinding = selected;
stylesBinding = styles;
items2 = [getPressableStyleOverridesBinding(typeBinding, selectedBinding, stylesBinding)];
items2[1] = stylesBinding.iconWrapper;
r0 = items2;
} else if (pressed) {
value2 = environment.__proto__;
getPressableStyleOverridesBinding = getPressableStyleOverrides;
typeBinding = type;
selectedBinding = selected;
stylesBinding = styles;
items2 = [getPressableStyleOverridesBinding(typeBinding, selectedBinding, stylesBinding)];
items2[1] = stylesBinding.iconWrapper;
r0 = items2;
} else {
r0 = styles.iconWrapper;
}
return r0;
}
function _fun116237(a0, a1) { // fn#116237, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15394:2736, offset: 0x02482538, size: 100 bytes, params: 3, frame: 17
const env0_0 = a0;
return (
<OverrideOption
type={a0}
selected={value === a0}
styles={styles}
onPress={onPress_116238}
key={'checkbox-' + a1}
/>
);
}
function onPress_116238() { // fn#116238, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15394:2800, offset: 0x0248259c, size: 56 bytes, params: 1, frame: 12
if (onValueChange != null && value !== env0_0) {
onValueChange(env0_0);
}
}
global.__d(_fun116230, 15197, [31, 27, 33, 697, 4501, 3789, 1244, 10625, 9294, 15198, 3874,
2]) /* metro module 15197, dependencies: [31, 27, 33, 697, 4501, 3789, 1244, 10625, 9294, 15198, 3874, 2] */;
File diff suppressed because it is too large. Load diff
@@ -1,20 +1,38 @@
/* Metro module 15189; source: components_native/channel_settings/ChannelSettingsPermissionsOverview.tsx; dependencies: [57, 5, 31, 27, 1939, 1379, 1938, 1867, 3793, 1878, 661, 33, 4501, 697, 4647, 1244, 4805, 3789, 9090, 8148, 22, 6231, 6238, 13127, 1484, 10375, 11025, 13770, 566, 1909, 12140, 1360, 5465, 9603, 4603, 2] */
import Module00005 from '../../by-id/module-00005.js'; /* Metro dependency 5 */
import Module00022 from '../../by-id/module-00022.js'; /* Metro dependency 22 */
import Module00057 from '../../by-id/module-00057.js'; /* Metro dependency 57 */
import Native from '../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import ChannelStore from '../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import GuildStore from '../../stores/GuildStore.tsx'; /* Metro dependency 1867 */
import UserStore from '../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import GuildRoleStore from '../../stores/GuildRoleStore.tsx'; /* Metro dependency 1938 */
import RelationshipStore from '../../stores/RelationshipStore.tsx'; /* Metro dependency 3793 */
import AlertActionCreators from '../../actions/AlertActionCreators.tsx'; /* Metro dependency 4647 */
import DetailedGuildIdentityUserRow from '../../modules/guild_settings/native/DetailedGuildIdentityUserRow.tsx'; /* Metro dependency 12140 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as FluxModule from '../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as ConstantsModule from '../../Constants.tsx'; /* Metro dependency 661 */
import * as IndexNativeModule from '../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as UseNavigationNativeModule from '../../design/components/Navigator/native/useNavigation.native.tsx'; /* Metro dependency 1484 */
import * as ServerModule from '../../flow/Server.tsx'; /* Metro dependency 1909 */
import * as GuildRoleRecordModule from '../../records/GuildRoleRecord.tsx'; /* Metro dependency 1939 */
import * as UseChannelNameModule from '../../modules/channel/useChannelName.tsx'; /* Metro dependency 4805 */
import * as DeprecatedLayoutAnimationModule from '../../modules/animations/native/DeprecatedLayoutAnimation.tsx'; /* Metro dependency 5465 */
import * as TableRowGroupNativeModule from '../../design/components/TableRow/native/TableRowGroup.native.tsx'; /* Metro dependency 6231 */
import * as TableRowNativeModule from '../../design/components/TableRow/native/TableRow.native.tsx'; /* Metro dependency 6238 */
import * as HeaderSharedModule from '../../modules/main_tabs_v2/native/shared_components/HeaderShared.tsx'; /* Metro dependency 9603 */
import * as PlusMediumIconModule from '../../design/components/Icon/native/redesign/generated/PlusMediumIcon.tsx'; /* Metro dependency 10375 */
import * as RoleLabelModule from '../../design/void/RoleLabel/native/RoleLabel.tsx'; /* Metro dependency 11025 */
import * as RefreshIconModule from '../../design/components/Icon/native/redesign/generated/RefreshIcon.tsx'; /* Metro dependency 13127 */
function _fun116097(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#116097, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15386:6, offset: 0x0247adba, size: 512 bytes, params: 8, frame: 22
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_4 = importDefault(57) /* metro dependency 57 */;
const env0_5 = importDefault(5) /* metro dependency 5 */;
const env0_6 = importAll(31) /* metro dependency 31 */;
const env0_7 = (require(27) /* metro dependency 27 */).View;
const env0_8 = (require(1939) /* metro dependency 1939: GuildRoleRecord */).isEveryoneRole;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const guildRoleStore = importDefault(1938) /* metro dependency 1938: GuildRoleStore */;
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
const relationshipStore = importDefault(3793) /* metro dependency 3793: RelationshipStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
let value = require(661) /* metro dependency 661: Constants */;
let value = ConstantsModule;
const env0_14 = value.PermissionOverrideType;
const env0_15 = value.ChannelSettingsSections;
value = require(33) /* metro dependency 33 */;
@@ -22,418 +40,497 @@ function _fun116097(global, require, importDefault, importAll, module, exports,
const env0_17 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object2.tableRowGroupContainer = {marginBottom: PX_16};
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object2.tableContainer = {marginHorizontal: PX_12};
const env0_18 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/channel_settings/ChannelSettingsPermissionsOverview.tsx');
object = {};
const PX_16 = (Native).space.PX_16;
object.tableRowGroupContainer = {marginBottom: PX_16};
const PX_12 = (Native).space.PX_12;
object.tableContainer = {marginHorizontal: PX_12};
const env0_18 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('components_native/channel_settings/ChannelSettingsPermissionsOverview.tsx');
exports.default = ChannelSettingsPermissionsOverview;
}
function ChannelPermissionSyncModule({channel, category, locked}) { // fn#116098, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15386:451, offset: 0x0247afba, size: 411 bytes, params: 2, frame: 27
const styles = useStyles();
const value2 = ReactModule.useCallback(_fun116099, [channel, category]);
const channelName = UseChannelNameModule.computeChannelName(category, UserStore, RelationshipStore);
const TableRowGroup = (TableRowGroupNativeModule).TableRowGroup;
const intl = (IndexNativeModule).intl;
const formatToPlainString = intl.formatToPlainString;
const t = (IndexNativeModule).t;
const r7 = locked ? Reflect.apply(formatToPlainString, intl, [t.ETJqLl,
{categoryName: channelName}]) : Reflect.apply(formatToPlainString, intl, [t.OIhm0M,
{categoryName: channelName}]);
const TableRow = (TableRowNativeModule).TableRow;
const object2 = {};
const RefreshIcon = (RefreshIconModule).RefreshIcon;
object2.icon = <RefreshIcon />;
const string = intl.string;
const NVwuHq = (IndexNativeModule).t.NVwuHq;
object2.label = Reflect.apply(string, intl, [NVwuHq]);
object2.onPress = value2;
return (
<View style={styles.tableRowGroupContainer}>
<TableRowGroup title={r7} hasIcons>
<TableRow {...object2} />
</TableRowGroup>
</View>
);
function _fun116099() { // fn#116099, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15386:548, offset: 0x0247b155, size: 364 bytes, params: 1, frame: 32
const defaultImport = AlertActionCreators;
const show = defaultImport.show;
const object = {};
const intl = (IndexNativeModule).intl;
const string = intl.string;
const t = (IndexNativeModule).t;
const YWMtRe = t.YWMtRe;
object.title = Reflect.apply(string, intl, [YWMtRe]);
const format = intl.format;
const property = t['iKW+jY'];
const object2 = {};
object2.channelName = UseChannelNameModule.computeChannelName(channel, UserStore, RelationshipStore, true);
object2.categoryName = UseChannelNameModule.computeChannelName(category, UserStore, RelationshipStore);
object.body = Reflect.apply(format, intl, [property, object2]);
object.confirmText = intl.string(t.eW8Gy4);
object.cancelText = intl.string(t.s4uM3b);
const env0_0 = env1_5(_fun116101);
object.onConfirm = onConfirm_116102;
Reflect.apply(show, defaultImport, [object]);
function* _fun116101() { // fn#116101, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15386:887, offset: 0x0247b2cc, size: 255 bytes, params: 1, frame: 21
var value5;
var binding;
var value6;
var binding2;
var value11;
var saveChannel;
var id;
var object;
if (true) {
value = environment.__proto__.__proto__;
var guild_id = importDefault.guild_id;
var object2 = {};
copyDataProperties(object2, importDefault.permissionOverwrites, undefined);
if (guild_id != null && object2[guild_id] == null) {
value5 = environment.__proto__.__proto__.__proto__;
value6 = env3_2(env3_3[17]);
object2[guild_id] = value6.makeEveryoneOverwrite(guild_id);
}
var value8 = env3_0(env3_3[18]);
yield value8.checkChattableChannelThresholdMetAfterChannelPermissionDeny(require, object2[guild_id].deny,
object2[guild_id].allow);
var value9 = undefined;
if (false) {
return value9;
}
if (value9) {
binding = env3_0;
binding2 = env3_3;
value11 = binding(binding2[19]);
saveChannel = value11.saveChannel;
id = require.id;
object = {};
binding = env3_1;
object.permissionOverwrites = binding(binding2[20]).values(object2);
Reflect.apply(saveChannel, value11, [id, object]);
}
}
}
function ChannelPermissionSyncModule({channel, category, locked}) { // fn#116098, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15386:451, offset: 0x0247afba, size: 411 bytes, params: 2, frame: 27
const styles = useStyles();
const value2 = env0_6.useCallback(_fun116099, [channel, category]);
const useChannelNameModule = require(4805) /* metro dependency 4805: useChannelName */;
const channelName = useChannelNameModule.computeChannelName(category, UserStore, RelationshipStore);
const TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const formatToPlainString = intl.formatToPlainString;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const r7 = locked ? Reflect.apply(formatToPlainString, intl, [t.ETJqLl,
{categoryName: channelName}]) : Reflect.apply(formatToPlainString, intl, [t.OIhm0M,
{categoryName: channelName}]);
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
const object = {};
const RefreshIcon = (require(13127) /* metro dependency 13127: RefreshIcon */).RefreshIcon;
object.icon = <RefreshIcon />;
const string = intl.string;
const NVwuHq = (require(1244) /* metro dependency 1244: indexNative */).t.NVwuHq;
object.label = Reflect.apply(string, intl, [NVwuHq]);
object.onPress = value2;
return (
<View style={styles.tableRowGroupContainer}>
<TableRowGroup title={r7} hasIcons>
<TableRow {...object} />
</TableRowGroup>
</View>
);
}
function onConfirm_116102() { // fn#116102, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15386:1182, offset: 0x00c3945f, size: 30 bytes, params: 1, frame: 13
return env0_0.apply(this, arguments);
}
function CategorySync({channel, category, isEditing, locked}) { // fn#116103, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15386:1636, offset: 0x0247b3cb, size: 77 bytes, params: 2, frame: 16
const value = null;
return value == category || isEditing ? value : <ChannelPermissionSyncModule channel={channel} category={category} locked={locked} />;
}
}
function AddPermission({isEditing}) { // fn#116104, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15386:1789, offset: 0x0247b418, size: 471 bytes, params: 2, frame: 29
const styles = useStyles();
const env0_0 = (require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation();
if (isEditing) {
return null;
}
const TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
const object = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object.title = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.vPHdP5);
object.hasIcons = true;
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
const PlusMediumIcon = (require(10375) /* metro dependency 10375: PlusMediumIcon */).PlusMediumIcon;
const tableRow = <TableRow icon={<PlusMediumIcon />} label={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.fVWxvT)} onPress={function() {
handleCreatePermissionOverwrite(PermissionOverrideType.ROLE);
}} />;
return (
<View style={styles.tableRowGroupContainer}>
<TableRowGroup {...object}>
{tableRow}
<TableRow
icon={<PlusMediumIcon />}
label={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.riesLt)}
onPress={function() {
handleCreatePermissionOverwrite(PermissionOverrideType.MEMBER);
}}
/>
</TableRowGroup>
</View>
);
}
function RoleRow_116108({role, isEditing, onSelect, onDelete}) { // fn#116108, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15386:2424, offset: 0x0247b655, size: 308 bytes, params: 2, frame: 26
var r4;
var CircleMinusIcon;
var intl;
const name = role.name;
const colorString = role.colorString;
const colorStrings = role.colorStrings;
const isEveryoneRole2 = isEveryoneRole(role);
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
const object2 = {};
const RoleLabel = (require(11025) /* metro dependency 11025: RoleLabel */).RoleLabel;
object2.label = <RoleLabel name={name} color={colorString} colors={colorStrings} />;
object2.arrow = !isEditing;
if (isEditing) {
if (isEveryoneRole2) {
r4 = null;
function CategorySync({channel, category, isEditing, locked}) { // fn#116103, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15386:1636, offset: 0x0247b3cb, size: 77 bytes, params: 2, frame: 16
const value = null;
return (
value == category || isEditing
? value
: (
<ChannelPermissionSyncModule
channel={channel}
category={category}
locked={locked}
/>
)
);
}
function AddPermission({isEditing}) { // fn#116104, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15386:1789, offset: 0x0247b418, size: 471 bytes, params: 2, frame: 29
const styles = useStyles();
const env0_0 = (UseNavigationNativeModule).useNavigation();
if (isEditing) {
return null;
}
const TableRowGroup = (TableRowGroupNativeModule).TableRowGroup;
const object2 = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object2.title = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.vPHdP5);
object2.hasIcons = true;
const TableRow = (TableRowNativeModule).TableRow;
const PlusMediumIcon = (PlusMediumIconModule).PlusMediumIcon;
const tableRow = (
<TableRow
icon={<PlusMediumIcon />}
label={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.fVWxvT)}
onPress={function() {
handleCreatePermissionOverwrite(PermissionOverrideType.ROLE);
}}
/>
);
return (
<View style={styles.tableRowGroupContainer}>
<TableRowGroup {...object2}>
{tableRow}
<TableRow
icon={<PlusMediumIcon />}
label={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.riesLt)}
onPress={function() {
handleCreatePermissionOverwrite(PermissionOverrideType.MEMBER);
}}
/>
</TableRowGroup>
</View>
);
function handleCreatePermissionOverwrite(a0) { // fn#116105, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15386:1881, owner: AddPermission.handleCreatePermissionOverwrite, offset: 0x0247b5ef, size: 44 bytes, params: 2, frame: 14
const binding = env0_0;
const push = binding.push;
const NEW_PERMISSION = ChannelSettingsSections.NEW_PERMISSION;
Reflect.apply(push, binding, [NEW_PERMISSION, {type: a0}]);
}
}
function RoleRow_116108({role, isEditing, onSelect, onDelete}) { // fn#116108, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15386:2424, offset: 0x0247b655, size: 308 bytes, params: 2, frame: 26
var r4;
var CircleMinusIcon;
var intl;
const name = role.name;
const colorString = role.colorString;
const colorStrings = role.colorStrings;
const isEveryoneRole2 = isEveryoneRole(role);
const TableRow = (TableRowNativeModule).TableRow;
const object = {};
const RoleLabel = (RoleLabelModule).RoleLabel;
object.label = (
<RoleLabel
name={name}
color={colorString}
colors={colorStrings}
/>
);
object.arrow = !isEditing;
if (isEditing) {
if (isEveryoneRole2) {
r4 = null;
} else {
CircleMinusIcon = (require(13770) /* metro dependency 13770: CircleMinusIcon */).CircleMinusIcon;
var circleMinusIconProps = {color: (importDefault(697) /* metro dependency 697: native */).colors.ICON_FEEDBACK_CRITICAL};
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
circleMinusIconProps.accessibilityLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.N86XcP);
r4 = <CircleMinusIcon {...circleMinusIconProps} />;
}
} else {
r4 = null;
}
object.icon = r4;
object.onPress = isEditing ? isEveryoneRole2 ? onSelect : onDelete : onSelect;
return <TableRow {...object} />;
}
function RoleOverwrites({guild, channel, isEditing, onSelectRow, onDeleteRow}) { // fn#116109, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15386:2799, offset: 0x0247b789, size: 357 bytes, params: 2, frame: 23
var moduleValue2;
const styles = useStyles();
const sortedRoles = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildRoleStore],
function() {
return GuildRoleStore.getSortedRoles(guild.id);
});
object = {};
copyDataProperties(object, channel.permissionOverwrites, undefined);
let id = guild.id;
if (object[id] == null) {
id = guild.id;
moduleValue2 = importAll(3789) /* metro dependency 3789: PermissionUtils */;
object[id] = moduleValue2.makeEveryoneOverwrite(guild.id);
}
const value2 = sortedRoles.filter(_fun116111);
const TableRowGroup = (TableRowGroupNativeModule).TableRowGroup;
const intl = (IndexNativeModule).intl;
return (
<View style={styles.tableRowGroupContainer}>
<TableRowGroup
title={intl.string((IndexNativeModule).t['LPJmL/'])}
hasIcons
>
{value2.map(_fun116112)}
</TableRowGroup>
</View>
);
function _fun116111({id}) { // fn#116111, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15386:3066, offset: 0x0247b90e, size: 78 bytes, params: 2, frame: 13
const type = Module00057[id]?.type;
const PermissionOverwriteType = (ServerModule).PermissionOverwriteType;
const ROLE = PermissionOverwriteType.ROLE;
return type === ROLE;
}
function _fun116112(a0) { // fn#116112, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15386:3314, offset: 0x0247b95c, size: 79 bytes, params: 2, frame: 16
const env0_0 = a0;
return (
<RoleRow_116108
role={a0}
isEditing={isEditing}
onSelect={onSelect_116113}
onDelete={onDelete_116114}
key={a0.id}
/>
);
function onSelect_116113() { // fn#116113, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15386:3356, offset: 0x0247b9ab, size: 28 bytes, params: 1, frame: 11
return onSelectRow(env0_0.id);
}
function onDelete_116114() { // fn#116114, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15386:3377, offset: 0x021e727a, size: 28 bytes, params: 1, frame: 11
return onDeleteRow(env0_0.id);
}
}
}
function MemberRow({guildId, user, isEditing, onSelect, onDelete}) { // fn#116115, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15386:3402, offset: 0x0247b9c7, size: 231 bytes, params: 2, frame: 22
var CircleMinusIcon;
var intl;
const defaultImportProps = {userId: user.id, guildId: guildId};
let r4 = isEditing ? onDelete : onSelect;
defaultImportProps.onPress = r4;
defaultImportProps.arrow = !isEditing;
if (isEditing) {
CircleMinusIcon = (require(13770) /* metro dependency 13770: CircleMinusIcon */).CircleMinusIcon;
var circleMinusIconProps = {color: (importDefault(697) /* metro dependency 697: native */).colors.ICON_FEEDBACK_CRITICAL};
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
circleMinusIconProps.accessibilityLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.N86XcP);
r4 = <CircleMinusIcon {...circleMinusIconProps} />;
} else {
r4 = null;
}
} else {
r4 = null;
defaultImportProps.leading = r4;
return <DetailedGuildIdentityUserRow {...defaultImportProps} />;
}
object2.icon = r4;
object2.onPress = isEditing ? isEveryoneRole2 ? onSelect : onDelete : onSelect;
return <TableRow {...object2} />;
}
function RoleOverwrites({guild, channel, isEditing, onSelectRow, onDeleteRow}) { // fn#116109, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15386:2799, offset: 0x0247b789, size: 357 bytes, params: 2, frame: 23
var object2;
var moduleValue2;
const styles = useStyles();
const sortedRoles = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildRoleStore],
function() {
return GuildRoleStore.getSortedRoles(guild.id);
});
object2 = {};
copyDataProperties(object2, channel.permissionOverwrites, undefined);
let id = guild.id;
if (object2[id] == null) {
id = guild.id;
moduleValue2 = importAll(3789) /* metro dependency 3789: PermissionUtils */;
object2[id] = moduleValue2.makeEveryoneOverwrite(guild.id);
}
const value2 = sortedRoles.filter(_fun116111);
const TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
return (
<View style={styles.tableRowGroupContainer}>
<TableRowGroup
title={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['LPJmL/'])}
hasIcons
>
{value2.map(_fun116112)}
</TableRowGroup>
</View>
);
}
function MemberRow({guildId, user, isEditing, onSelect, onDelete}) { // fn#116115, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15386:3402, offset: 0x0247b9c7, size: 231 bytes, params: 2, frame: 22
var CircleMinusIcon;
var intl;
const DetailedGuildIdentityUserRow = importDefault(12140) /* metro dependency 12140: DetailedGuildIdentityUserRow */;
const defaultImportProps = {userId: user.id, guildId: guildId};
let r4 = isEditing ? onDelete : onSelect;
defaultImportProps.onPress = r4;
defaultImportProps.arrow = !isEditing;
if (isEditing) {
CircleMinusIcon = (require(13770) /* metro dependency 13770: CircleMinusIcon */).CircleMinusIcon;
var circleMinusIconProps = {color: (importDefault(697) /* metro dependency 697: native */).colors.ICON_FEEDBACK_CRITICAL};
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
circleMinusIconProps.accessibilityLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.N86XcP);
r4 = <CircleMinusIcon {...circleMinusIconProps} />;
} else {
r4 = null;
}
defaultImportProps.leading = r4;
return <DetailedGuildIdentityUserRow {...defaultImportProps} />;
}
function MemberOverwrites({channel, isEditing, onSelectRow, onDeleteRow}) { // fn#116116, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15386:3690, offset: 0x0247baae, size: 354 bytes, params: 2, frame: 24
var r0;
var TableRowGroup;
var intl;
const env0_0 = channel.guild_id;
const permissionOverwrites = channel.permissionOverwrites;
const styles = useStyles();
const value2 = (importDefault(22) /* metro dependency 22 */)(permissionOverwrites);
const value4 = value2.filter(function({type}) {
return type === require(dependencyMap[29]).PermissionOverwriteType.MEMBER;
}).map(function(a0) {
return UserStore.getUser(a0.id);
});
const value8 = value4.filter((require(1360) /* metro dependency 1360: GlobalUtils */).isNotNullish).sortBy(function({username}) {
return username.toLowerCase();
}).value();
if (value8.length <= 0) {
r0 = null;
} else {
var viewBindingProps = {style: styles.tableRowGroupContainer};
TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
r0 = <View {...viewBindingProps}><TableRowGroup title={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['9Oq93m'])} hasIcons>{value8.map(_fun116120)}</TableRowGroup></View>;
}
return r0;
}
function ChannelSettingsPermissionsOverview({channelId}) { // fn#116123, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15386:4381, offset: 0x0247bcb5, size: 663 bytes, params: 2, frame: 26
let env0_6 = undefined;
const styles = useStyles();
const value2 = (require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation();
const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], function() {
return ChannelStore.getChannel(channelId);
}, [channelId]);
const channel = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], _fun116128);
const guild = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildStore], _fun116129);
const env0_4 = guild;
const env0_5 = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildRoleStore], _fun116130);
const value4 = env0_6.useMemo(_fun116131, [value3, channel]);
const value6 = env0_4(env0_6.useState(false), 2);
const property = value6[0];
env0_6 = property;
const env0_7 = value6[1];
env0_6.useLayoutEffect(_fun116134, [value2, property, env0_6.useCallback(_fun116132, [])]);
return value3 == null || guild == null ? null : <View style={styles.tableContainer}><CategorySync channel={value3} category={channel} isEditing={property} locked={value4} /><AddPermission isEditing={property} /><RoleOverwrites guild={guild} channel={value3} isEditing={property} onSelectRow={function(a0) {
handlePressRow(PermissionOverrideType.ROLE, a0);
}} onDeleteRow={function(a0) {
handleClearPermissionOverwrite(a0);
}} /><MemberOverwrites channel={value3} isEditing={property} onSelectRow={onSelectRow_116138} onDeleteRow={onDeleteRow_116139} /></View>;
}
function _fun116099() { // fn#116099, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15386:548, offset: 0x0247b155, size: 364 bytes, params: 1, frame: 32
const defaultImport = importDefault(4647) /* metro dependency 4647: AlertActionCreators */;
const show = defaultImport.show;
const object3 = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const YWMtRe = t.YWMtRe;
object3.title = Reflect.apply(string, intl, [YWMtRe]);
const format = intl.format;
const property = t['iKW+jY'];
const object4 = {};
const useChannelNameModule = require(4805) /* metro dependency 4805: useChannelName */;
object4.channelName = useChannelNameModule.computeChannelName(channel, UserStore, RelationshipStore, true);
const moduleValue2 = useChannelNameModule;
object4.categoryName = moduleValue2.computeChannelName(category, UserStore, RelationshipStore);
object3.body = Reflect.apply(format, intl, [property, object4]);
object3.confirmText = intl.string(t.eW8Gy4);
object3.cancelText = intl.string(t.s4uM3b);
const env0_0 = env1_5(_fun116101);
object3.onConfirm = onConfirm_116102;
Reflect.apply(show, defaultImport, [object3]);
}
function handleCreatePermissionOverwrite(a0) { // fn#116105, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15386:1881, owner: AddPermission.handleCreatePermissionOverwrite, offset: 0x0247b5ef, size: 44 bytes, params: 2, frame: 14
const binding = env0_0;
const push = binding.push;
const NEW_PERMISSION = ChannelSettingsSections.NEW_PERMISSION;
Reflect.apply(push, binding, [NEW_PERMISSION, {type: a0}]);
}
function _fun116111({id}) { // fn#116111, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15386:3066, offset: 0x0247b90e, size: 78 bytes, params: 2, frame: 13
const type = env0_4[id]?.type;
const PermissionOverwriteType = (require(1909) /* metro dependency 1909: Server */).PermissionOverwriteType;
const ROLE = PermissionOverwriteType.ROLE;
return type === ROLE;
}
function _fun116112(a0) { // fn#116112, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15386:3314, offset: 0x0247b95c, size: 79 bytes, params: 2, frame: 16
const env0_0 = a0;
return (
<RoleRow_116108
role={a0}
isEditing={isEditing}
onSelect={onSelect_116113}
onDelete={onDelete_116114}
key={a0.id}
/>
);
}
function _fun116120(a0) { // fn#116120, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15386:4163, offset: 0x0247bc5f, size: 86 bytes, params: 2, frame: 17
const env0_0 = a0;
return (
<MemberRow
guildId={guild_id}
user={a0}
isEditing={isEditing}
onSelect={onSelect_116121}
onDelete={onDelete_116122}
key={a0.id}
/>
);
}
function handlePressRow(a0, a1) { // fn#116124, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15386:4962, owner: ChannelSettingsPermissionsOverview.handlePressRow, offset: 0x0247bf4c, size: 58 bytes, params: 3, frame: 14
var binding;
var push;
if (!env0_6) {
binding = env0_1;
push = binding.push;
value = environment.__proto__;
Reflect.apply(push, binding, [ChannelSettingsSections.PERMISSION_OVERRIDES, {type: a0, id: a1}]);
}
}
function handleClearPermissionOverwrite(a0) { // fn#116125, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15386:5039, owner: ChannelSettingsPermissionsOverview.handleClearPermissionOverwrite, offset: 0x0247bf86, size: 345 bytes, params: 2, frame: 23
const env0_0 = a0;
const value2 = undefined;
const r1 = env0_5 == null ? value2 : env0_5[a0];
const user = UserStore.getUser(a0);
const r12 = r1 != null ? r1.name : user == null ? value2 : user.username;
const defaultImport = importDefault(4647) /* metro dependency 4647: AlertActionCreators */;
const show = defaultImport.show;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const formatToPlainString = intl.formatToPlainString;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
Reflect.apply(show, defaultImport, [{title: Reflect.apply(formatToPlainString, intl, [t.txPV7k, {name: r12}]),
body: intl.format(t.xERCnZ, {name: r12}), cancelText: intl.string(t.gm1Vej), confirmText: intl.string(t.p89ACt),
onConfirm: onConfirm_116126}]);
return value2;
}
function _fun116128() { // fn#116128, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15386:4573, offset: 0x0247c114, size: 47 bytes, params: 1, frame: 13
return ChannelStore.getChannel(env0_2?.parent_id);
}
function _fun116129() { // fn#116129, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15386:4655, offset: 0x0247c143, size: 47 bytes, params: 1, frame: 13
return GuildStore.getGuild(env0_2?.guild_id);
}
function _fun116130() { // fn#116130, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15386:4734, offset: 0x0247c172, size: 47 bytes, params: 1, frame: 12
return guild != null ? GuildRoleStore.getRolesSnapshot(guild.id) : undefined;
}
function _fun116131() { // fn#116131, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15386:4793, offset: 0x0247c1a1, size: 63 bytes, params: 1, frame: 14
var r0;
var value3;
var moduleValue;
const value2 = env0_2 != null;
if (value2) {
value3 = environment.__proto__;
moduleValue = importAll(3789) /* metro dependency 3789: PermissionUtils */;
r0 = moduleValue.areChannelsLocked(env0_2, channel);
} else {
r0 = value2;
}
return r0;
}
function _fun116132() { // fn#116132, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15386:4903, offset: 0x0247c1e0, size: 58 bytes, params: 1, frame: 12
var environment;
env0_7(function(a0) {
return !a0;
});
const value = environment.__proto__;
(require(5465) /* metro dependency 5465: DeprecatedLayoutAnimation */).DeprecatedLayoutAnimation();
}
function _fun116134() { // fn#116134, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15386:5541, offset: 0x0247c21a, size: 38 bytes, params: 1, frame: 12
const binding = env0_1;
binding.setOptions({headerRight: headerRight_116135});
}
function ChannelSettingsPermissionsOverviewOnSelectRow_116138(a0) { // fn#116138, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15386:6066, owner: ChannelSettingsPermissionsOverview.onSelectRow, offset: 0x0247c2fc, size: 33 bytes, params: 2, frame: 13
const handlePressRowBinding = handlePressRow;
const MEMBER = PermissionOverrideType.MEMBER;
handlePressRowBinding(MEMBER, a0);
}
function* _fun116101() { // fn#116101, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15386:887, offset: 0x0247b2cc, size: 255 bytes, params: 1, frame: 21
var value5;
var binding;
var value6;
var binding2;
var value11;
var saveChannel;
var id;
var object3;
if (true) {
value = environment.__proto__.__proto__;
var guild_id = importDefault.guild_id;
var object4 = {};
copyDataProperties(object4, importDefault.permissionOverwrites, undefined);
if (guild_id != null && object4[guild_id] == null) {
value5 = environment.__proto__.__proto__.__proto__;
value6 = env3_2(env3_3[17]);
object4[guild_id] = value6.makeEveryoneOverwrite(guild_id);
function MemberOverwrites({channel, isEditing, onSelectRow, onDeleteRow}) { // fn#116116, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15386:3690, offset: 0x0247baae, size: 354 bytes, params: 2, frame: 24
var r0;
var TableRowGroup;
var intl;
const env0_0 = channel.guild_id;
const permissionOverwrites = channel.permissionOverwrites;
const styles = useStyles();
const value2 = (Module00022)(permissionOverwrites);
const value4 = value2.filter(function({type}) {
return type === require(dependencyMap[29]).PermissionOverwriteType.MEMBER;
}).map(function(a0) {
return UserStore.getUser(a0.id);
});
const value8 = value4.filter((require(1360) /* metro dependency 1360: GlobalUtils */).isNotNullish).sortBy(function({username}) {
return username.toLowerCase();
}).value();
if (value8.length <= 0) {
r0 = null;
} else {
var viewBindingProps = {style: styles.tableRowGroupContainer};
TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
r0 = (
<View {...viewBindingProps}>
<TableRowGroup
title={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['9Oq93m'])}
hasIcons
>
{value8.map(_fun116120)}
</TableRowGroup>
</View>
);
}
var value8 = env3_0(env3_3[18]);
yield value8.checkChattableChannelThresholdMetAfterChannelPermissionDeny(require, object4[guild_id].deny,
object4[guild_id].allow);
var value9 = undefined;
if (false) {
return value9;
}
if (value9) {
binding = env3_0;
binding2 = env3_3;
value11 = binding(binding2[19]);
saveChannel = value11.saveChannel;
id = require.id;
object3 = {};
binding = env3_1;
object3.permissionOverwrites = binding(binding2[20]).values(object4);
Reflect.apply(saveChannel, value11, [id, object3]);
return r0;
function _fun116120(a0) { // fn#116120, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15386:4163, offset: 0x0247bc5f, size: 86 bytes, params: 2, frame: 17
const env0_0 = a0;
return (
<MemberRow
guildId={guild_id}
user={a0}
isEditing={isEditing}
onSelect={onSelect_116121}
onDelete={onDelete_116122}
key={a0.id}
/>
);
function onSelect_116121() { // fn#116121, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15386:4217, offset: 0x0247b9ab, size: 28 bytes, params: 1, frame: 11
return onSelectRow(env0_0.id);
}
function onDelete_116122() { // fn#116122, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15386:4238, offset: 0x021e727a, size: 28 bytes, params: 1, frame: 11
return onDeleteRow(env0_0.id);
}
}
}
function ChannelSettingsPermissionsOverview({channelId}) { // fn#116123, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15386:4381, offset: 0x0247bcb5, size: 663 bytes, params: 2, frame: 26
let env0_6 = undefined;
const styles = useStyles();
const value2 = (UseNavigationNativeModule).useNavigation();
const useStateFromStores = FluxModule.useStateFromStores;
const channelStoreBinding = ChannelStore;
const value3 = Reflect.apply(useStateFromStores, FluxModule, [[channelStoreBinding], function() {
return ChannelStore.getChannel(channelId);
}, [channelId]]);
const channel = FluxModule.useStateFromStores([channelStoreBinding], _fun116128);
const guild = FluxModule.useStateFromStores([GuildStore], _fun116129);
const guild2 = guild;
const env0_5 = FluxModule.useStateFromStores([GuildRoleStore], _fun116130);
const value4 = env0_6.useMemo(_fun116131, [value3, channel]);
const value6 = guild2(env0_6.useState(false), 2);
const property = value6[0];
env0_6 = property;
const env0_7 = value6[1];
env0_6.useLayoutEffect(_fun116134, [value2, property, env0_6.useCallback(_fun116132, [])]);
return (
value3 == null || guild == null
? null
: (
<View style={styles.tableContainer}>
<CategorySync
channel={value3}
category={channel}
isEditing={property}
locked={value4}
/>
<AddPermission isEditing={property} />
<RoleOverwrites
guild={guild}
channel={value3}
isEditing={property}
onSelectRow={function(a0) {
handlePressRow(PermissionOverrideType.ROLE, a0);
}}
onDeleteRow={function(a0) {
handleClearPermissionOverwrite(a0);
}}
/>
<MemberOverwrites
channel={value3}
isEditing={property}
onSelectRow={onSelectRow_116138}
onDeleteRow={onDeleteRow_116139}
/>
</View>
)
);
function handlePressRow(a0, a1) { // fn#116124, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15386:4962, owner: ChannelSettingsPermissionsOverview.handlePressRow, offset: 0x0247bf4c, size: 58 bytes, params: 3, frame: 14
var binding;
var push;
if (!env0_6) {
binding = env0_1;
push = binding.push;
value = environment.__proto__;
Reflect.apply(push, binding, [ChannelSettingsSections.PERMISSION_OVERRIDES, {type: a0, id: a1}]);
}
}
function handleClearPermissionOverwrite(a0) { // fn#116125, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15386:5039, owner: ChannelSettingsPermissionsOverview.handleClearPermissionOverwrite, offset: 0x0247bf86, size: 345 bytes, params: 2, frame: 23
const env0_0 = a0;
const value2 = undefined;
const r1 = env0_5 == null ? value2 : env0_5[a0];
const user = UserStore.getUser(a0);
const r12 = r1 != null ? r1.name : user == null ? value2 : user.username;
const defaultImport = AlertActionCreators;
const show = defaultImport.show;
const intl = (IndexNativeModule).intl;
const formatToPlainString = intl.formatToPlainString;
const t = (IndexNativeModule).t;
Reflect.apply(show, defaultImport, [{title: Reflect.apply(formatToPlainString, intl, [t.txPV7k, {name: r12}]),
body: intl.format(t.xERCnZ, {name: r12}), cancelText: intl.string(t.gm1Vej), confirmText: intl.string(t.p89ACt),
onConfirm: onConfirm_116126}]);
return value2;
function handleClearPermissionOverwriteOnConfirm() { // fn#116126, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15386:5416, owner: ChannelSettingsPermissionsOverview.handleClearPermissionOverwrite.onConfirm, offset: 0x0247c0df, size: 53 bytes, params: 1, frame: 14
const binding = env0_0;
let value = environment.__proto__.__proto__;
value = importDefault(4603) /* metro dependency 4603: ChannelActionCreators */;
value.clearPermissionOverwrite(channelId, binding);
}
}
function _fun116128() { // fn#116128, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15386:4573, offset: 0x0247c114, size: 47 bytes, params: 1, frame: 13
return ChannelStore.getChannel(env0_2?.parent_id);
}
function _fun116129() { // fn#116129, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15386:4655, offset: 0x0247c143, size: 47 bytes, params: 1, frame: 13
return GuildStore.getGuild(env0_2?.guild_id);
}
function _fun116130() { // fn#116130, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15386:4734, offset: 0x0247c172, size: 47 bytes, params: 1, frame: 12
return guild != null ? GuildRoleStore.getRolesSnapshot(guild.id) : undefined;
}
function _fun116131() { // fn#116131, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15386:4793, offset: 0x0247c1a1, size: 63 bytes, params: 1, frame: 14
var r0;
var value3;
var moduleValue;
const value2 = env0_2 != null;
if (value2) {
value3 = environment.__proto__;
moduleValue = importAll(3789) /* metro dependency 3789: PermissionUtils */;
r0 = moduleValue.areChannelsLocked(env0_2, channel);
} else {
r0 = value2;
}
return r0;
}
function _fun116132() { // fn#116132, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15386:4903, offset: 0x0247c1e0, size: 58 bytes, params: 1, frame: 12
var environment;
env0_7(function(a0) {
return !a0;
});
const value = environment.__proto__;
(DeprecatedLayoutAnimationModule).DeprecatedLayoutAnimation();
}
function _fun116134() { // fn#116134, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15386:5541, offset: 0x0247c21a, size: 38 bytes, params: 1, frame: 12
const binding = env0_1;
binding.setOptions({headerRight: headerRight_116135});
function headerRight_116135(a0) { // fn#116135, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15386:5572, offset: 0x0247c240, size: 155 bytes, params: 2, frame: 19
const value = environment.__proto__.__proto__;
const HeaderTextButton = (HeaderSharedModule).HeaderTextButton;
const headerTextButtonProps = {...a0};
headerTextButtonProps['onPress'] = env1_8;
const binding = env1_6;
const intl = (IndexNativeModule).intl;
const string = intl.string;
const t = (IndexNativeModule).t;
headerTextButtonProps['label'] = binding ? Reflect.apply(string, intl, [t.i4jeWR]) : Reflect.apply(string, intl,
[t.bt75uw]);
return <HeaderTextButton {...headerTextButtonProps} />;
}
}
function ChannelSettingsPermissionsOverviewOnSelectRow_116138(a0) { // fn#116138, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15386:6066, owner: ChannelSettingsPermissionsOverview.onSelectRow, offset: 0x0247c2fc, size: 33 bytes, params: 2, frame: 13
const handlePressRowBinding = handlePressRow;
const MEMBER = PermissionOverrideType.MEMBER;
handlePressRowBinding(MEMBER, a0);
}
function ChannelSettingsPermissionsOverviewOnDeleteRow_116139(a0) { // fn#116139, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15386:6108, owner: ChannelSettingsPermissionsOverview.onDeleteRow, offset: 0x02094ab3, size: 19 bytes, params: 2, frame: 11
handleClearPermissionOverwrite(a0);
}
}
}
function onSelect_116113() { // fn#116113, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15386:3356, offset: 0x0247b9ab, size: 28 bytes, params: 1, frame: 11
return onSelectRow(env0_0.id);
}
function handleClearPermissionOverwriteOnConfirm() { // fn#116126, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15386:5416, owner: ChannelSettingsPermissionsOverview.handleClearPermissionOverwrite.onConfirm, offset: 0x0247c0df, size: 53 bytes, params: 1, frame: 14
const binding = env0_0;
let value = environment.__proto__.__proto__;
value = importDefault(4603) /* metro dependency 4603: ChannelActionCreators */;
value.clearPermissionOverwrite(channelId, binding);
}
function headerRight_116135(a0) { // fn#116135, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15386:5572, offset: 0x0247c240, size: 155 bytes, params: 2, frame: 19
const value = environment.__proto__.__proto__;
const HeaderTextButton = (require(9603) /* metro dependency 9603: HeaderShared */).HeaderTextButton;
const headerTextButtonProps = {...a0};
headerTextButtonProps['onPress'] = env1_8;
const binding = env1_6;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
headerTextButtonProps['label'] = binding ? Reflect.apply(string, intl, [t.i4jeWR]) : Reflect.apply(string, intl,
[t.bt75uw]);
return <HeaderTextButton {...headerTextButtonProps} />;
}
global.__d(_fun116097, 15189, [57, 5, 31, 27, 1939, 1379, 1938, 1867, 3793, 1878, 661, 33, 4501, 697, 4647, 1244,
4805, 3789, 9090, 8148, 22, 6231, 6238, 13127, 1484, 10375, 11025, 13770, 566, 1909, 12140, 1360, 5465, 9603,
4603,
2]) /* metro module 15189, dependencies: [57, 5, 31, 27, 1939, 1379, 1938, 1867, 3793, 1878, 661, 33, 4501, 697, 4647, 1244, 4805, 3789, 9090, 8148, 22, 6231, 6238, 13127, 1484, 10375, 11025, 13770, 566, 1909, 12140, 1360, 5465, 9603, 4603, 2] */;
@@ -1,11 +1,14 @@
/* Metro module 15177; source: components_native/channel_settings/ChannelSettingsUtils.tsx; dependencies: [2] */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun115952(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#115952, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15374:6, offset: 0x02475ab4, size: 87 bytes, params: 8, frame: 15
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/channel_settings/ChannelSettingsUtils.tsx');
(FileImportTrackerModule).fileFinishedImporting('components_native/channel_settings/ChannelSettingsUtils.tsx');
exports.getIsChannelNameSettingEditable = function({canManageThread, canManageChannels, canSendMessages,
isForumPost, isThread, isChannelOwner}) {
return isForumPost && isChannelOwner ? canSendMessages : isForumPost ? canManageThread : isThread ? canManageThread || isChannelOwner : canManageChannels;
};
}
global.__d(_fun115952, 15177, [2]) /* metro module 15177, dependencies: [2] */;