Initial commit

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

No files matched your search

@@ -0,0 +1,495 @@
/* Metro module 8120; source: modules/channel_permissions/ChannelPermissionsConstants.tsx; dependencies: [661, 1244, 8121, 1948, 8122, 2] */
function _fun65082(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#65082, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8305:6, offset: 0x01bbf6c6, size: 450 bytes, params: 8, frame: 23
var object3;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const constantsModule = require(661) /* metro dependency 661: Constants */;
const env0_3 = constantsModule.ChannelTypes;
const env0_4 = constantsModule.ChannelTypesSets;
const env0_5 = constantsModule.HelpdeskArticles;
const env0_6 = constantsModule.Permissions;
object3 = {EMPTY_STATE: 0};
object3[0] = 'EMPTY_STATE';
object3.ADMINISTRATOR = 1;
object3[1] = 'ADMINISTRATOR';
object3.ROLE = 2;
object3[2] = 'ROLE';
object3.OWNER = 3;
object3[3] = 'OWNER';
object3.MEMBER = 4;
object3[4] = 'MEMBER';
object3.USER = 5;
object3[5] = 'USER';
object3.GUILD = 6;
object3[6] = 'GUILD';
const object4 = {ROLES: 0};
object4[0] = 'ROLES';
object4.MEMBERS = 1;
object4[1] = 'MEMBERS';
object4.USERS = 2;
object4[2] = 'USERS';
object4.GUILDS = 3;
object4[3] = 'GUILDS';
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/channel_permissions/ChannelPermissionsConstants.tsx');
exports.RowType = object3;
exports.AudienceSelectorSections = object4;
exports.MEMBER_REQUEST_COUNT = 20;
exports.ADVANCED_MODE_ON_KEY = 'channelPermissionSettingsAdvancedModeOn';
exports.TrackExposureLocations = {SETTINGS_PAGE: 'settings-page', MEMBERS_LIST: 'members-list',
EMPTY_STATE: 'empty-state', CREATE_CHANNEL: 'create-channel'};
exports.SettingMode = {BASIC: 'basic', ADVANCED: 'advanced'};
exports.getChannelPermissionSpecMap = getChannelPermissionSpecMap;
}
function getChannelPermissionSpecMap(a0, a1, a2) { // fn#65083, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8305:1016, offset: 0x01bbf888, size: 10536 bytes, params: 4, frame: 29
var r1;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var property;
var defaultImport;
var format;
var WFwfSD;
var defaultImport2;
var XRxOo0;
var defaultImport4;
var defaultImport5;
var GEi6Ym;
var defaultImport6;
var defaultImport7;
var defaultImport8;
var Ij0yKX;
var intl2;
const intl3 = (require(1244) /* metro dependency 1244: indexNative */).intl;
var g5MzON;
var intl4;
const type = a0.type;
const object4 = {};
let VIEW_CHANNEL = Permissions.VIEW_CHANNEL;
const value2 = VIEW_CHANNEL.toString();
const object6 = {};
let GUILD_CATEGORY = ChannelTypes.GUILD_CATEGORY;
object6.title = type === GUILD_CATEGORY ? intl.string(t.uV83yi) : intl.string(t['W/A4Qp']);
GUILD_CATEGORY = ChannelTypes.GUILD_CATEGORY;
object6.description = a1 ? GUILD_CATEGORY === type ? t['o/vBzj'] : ChannelTypes.GUILD_VOICE === type || ChannelTypes.GUILD_STAGE_VOICE === type ? t.ejL1Wo : t['3jG0Bo'] : type === GUILD_CATEGORY ? t.SzosGs : t.M2iEy3;
VIEW_CHANNEL = Permissions.VIEW_CHANNEL;
object6.flag = VIEW_CHANNEL;
object4[value2] = object6;
let MANAGE_CHANNELS = Permissions.MANAGE_CHANNELS;
const value5 = MANAGE_CHANNELS.toString();
const object8 = {};
GUILD_CATEGORY = ChannelTypes.GUILD_CATEGORY;
object8.title = type === GUILD_CATEGORY ? intl.string(t['9qLtWs']) : intl.string(t.nAw15L);
GUILD_CATEGORY = ChannelTypes.GUILD_CATEGORY;
object8.description = GUILD_CATEGORY === type ? t.KJ2JnG : ChannelTypes.GUILD_VOICE === type ? t['+gl2ne'] : ChannelTypes.GUILD_STAGE_VOICE === type ? t.SDX669 : t.ydL28i;
MANAGE_CHANNELS = Permissions.MANAGE_CHANNELS;
object8.flag = MANAGE_CHANNELS;
object4[value5] = object8;
let MANAGE_ROLES = Permissions.MANAGE_ROLES;
const value8 = MANAGE_ROLES.toString();
const value9 = undefined;
let string = intl.string;
const ICb6am = t.ICb6am;
GUILD_CATEGORY = ChannelTypes.GUILD_CATEGORY;
const r12 = GUILD_CATEGORY === type ? t.TyyCMD : ChannelTypes.GUILD_STAGE_VOICE === type ? t.hcw4mx : t.hOMXOv;
MANAGE_ROLES = Permissions.MANAGE_ROLES;
object4[value8] = {title: Reflect.apply(string, intl, [ICb6am]), description: r12, flag: MANAGE_ROLES};
let MANAGE_WEBHOOKS = Permissions.MANAGE_WEBHOOKS;
const value10 = MANAGE_WEBHOOKS.toString();
const object11 = {};
object11.title = intl.string(t['/ADKmM']);
GUILD_CATEGORY = ChannelTypes.GUILD_CATEGORY;
object11.description = type === GUILD_CATEGORY ? t['K5+ZZ7'] : t.CYBZry;
MANAGE_WEBHOOKS = Permissions.MANAGE_WEBHOOKS;
object11.flag = MANAGE_WEBHOOKS;
object4[value10] = object11;
let CREATE_INSTANT_INVITE = Permissions.CREATE_INSTANT_INVITE;
const value11 = CREATE_INSTANT_INVITE.toString();
GUILD_CATEGORY = ChannelTypes.GUILD_CATEGORY;
const r9 = GUILD_CATEGORY === type ? t['3YFAAX'] : ChannelTypes.GUILD_VOICE === type || ChannelTypes.GUILD_STAGE_VOICE === type ? t.lUCs1n : t.q4g2aI;
CREATE_INSTANT_INVITE = Permissions.CREATE_INSTANT_INVITE;
object4[value11] = {title: intl.string(t.zJrgTG), description: r9, flag: CREATE_INSTANT_INVITE};
let SEND_MESSAGES = Permissions.SEND_MESSAGES;
const value12 = SEND_MESSAGES.toString();
const object13 = {};
let GUILD_THREADS_ONLY = ChannelTypesSets.GUILD_THREADS_ONLY;
object13.title = GUILD_THREADS_ONLY.has(type) ? intl.string(t.nJwAHX) : type === ChannelTypes.GUILD_CATEGORY ? intl.string(t.S1VOwd) : intl.string(t.T32rkC);
GUILD_CATEGORY = ChannelTypes.GUILD_CATEGORY;
if (GUILD_CATEGORY === type) {
r1 = t.IjeLuu;
} else if (ChannelTypes.GUILD_FORUM === type) {
r1 = a2 == null ? t.LG9VAi : a2.createPostsDisabled ? a0.isMediaChannel() ? t.LG9VAi : (importDefault(8121) /* metro dependency 8121: ForumPlatformUtilsNative */).getForumChannelPermissionText() : t.LG9VAi;
} else if (ChannelTypes.GUILD_MEDIA === type) {
r1 = t.LG9VAi;
} else if (ChannelTypes.GUILD_ANNOUNCEMENT === type) {
format = intl.format;
WFwfSD = t.WFwfSD;
defaultImport2 = importDefault(1948) /* metro dependency 1948: HelpdeskUtils */;
r1 = Reflect.apply(format, intl, [WFwfSD,
{articleURL: defaultImport2.getArticleURL(HelpdeskArticles.ANNOUNCEMENT_CHANNELS)}]);
} else if (ChannelTypes.GUILD_VOICE === type) {
defaultImport = importDefault(8122) /* metro dependency 8122: GuildTiVPlatformUtilsNative */;
r1 = defaultImport.getTextInVoiceSendMessageChannelPermissionText(a2 == null ? value9 : a2.sendMessagesDisabled);
} else {
r1 = t.WQ6zpT;
}
object13.description = r1;
SEND_MESSAGES = Permissions.SEND_MESSAGES;
object13.flag = SEND_MESSAGES;
object4[value12] = object13;
let EMBED_LINKS = Permissions.EMBED_LINKS;
const value19 = EMBED_LINKS.toString();
const object14 = {};
object14.title = intl.string(t['969dEL']);
GUILD_CATEGORY = ChannelTypes.GUILD_CATEGORY;
object14.description = type === GUILD_CATEGORY ? t['7zlUay'] : t.XFFhA0;
EMBED_LINKS = Permissions.EMBED_LINKS;
object14.flag = EMBED_LINKS;
object4[value19] = object14;
let ATTACH_FILES = Permissions.ATTACH_FILES;
const value20 = ATTACH_FILES.toString();
const object16 = {};
object16.title = intl.string(t['3AS4UM']);
GUILD_CATEGORY = ChannelTypes.GUILD_CATEGORY;
object16.description = type === GUILD_CATEGORY ? t.XREf9l : t.WK9r7F;
ATTACH_FILES = Permissions.ATTACH_FILES;
object16.flag = ATTACH_FILES;
object4[value20] = object16;
let ADD_REACTIONS = Permissions.ADD_REACTIONS;
const value21 = ADD_REACTIONS.toString();
GUILD_CATEGORY = ChannelTypes.GUILD_CATEGORY;
let r11 = GUILD_CATEGORY === type ? t.pZT2Zh : ChannelTypes.GUILD_VOICE === type ? t.xSSbIs : t.PVjR1Y;
ADD_REACTIONS = Permissions.ADD_REACTIONS;
object4[value21] = {title: intl.string(t.yEoJAr), description: r11, flag: ADD_REACTIONS};
let USE_EXTERNAL_EMOJIS = Permissions.USE_EXTERNAL_EMOJIS;
const value22 = USE_EXTERNAL_EMOJIS.toString();
const object17 = {};
object17.title = intl.string(t['+bxf3H']);
GUILD_CATEGORY = ChannelTypes.GUILD_CATEGORY;
object17.description = type === GUILD_CATEGORY ? t.mWAbK4 : t.Qc5vOr;
USE_EXTERNAL_EMOJIS = Permissions.USE_EXTERNAL_EMOJIS;
object17.flag = USE_EXTERNAL_EMOJIS;
object4[value22] = object17;
let USE_EXTERNAL_STICKERS = Permissions.USE_EXTERNAL_STICKERS;
const value23 = USE_EXTERNAL_STICKERS.toString();
string = intl.string;
const ERNhYf = t.ERNhYf;
GUILD_CATEGORY = ChannelTypes.GUILD_CATEGORY;
r1 = type === GUILD_CATEGORY ? t['39whJ4'] : t.VF4fZZ;
USE_EXTERNAL_STICKERS = Permissions.USE_EXTERNAL_STICKERS;
object4[value23] = {title: Reflect.apply(string, intl, [ERNhYf]), description: r1, flag: USE_EXTERNAL_STICKERS};
let MENTION_EVERYONE = Permissions.MENTION_EVERYONE;
const value24 = MENTION_EVERYONE.toString();
const GUILD_STAGE_VOICE = ChannelTypes.GUILD_STAGE_VOICE;
GUILD_CATEGORY = ChannelTypes.GUILD_CATEGORY;
MENTION_EVERYONE = Permissions.MENTION_EVERYONE;
object4[value24] = {title: type === GUILD_STAGE_VOICE ? intl.string(t.VDUAHO) : intl.string(t.Y78KGC),
description: type === GUILD_CATEGORY ? t['HOhg/B'] : type === ChannelTypes.GUILD_STAGE_VOICE ? t.rZn1oO : t['6IUSdt'],
flag: MENTION_EVERYONE};
let MANAGE_MESSAGES = Permissions.MANAGE_MESSAGES;
const value27 = MANAGE_MESSAGES.toString();
const object18 = {};
object18.title = intl.string(t['6lU9xM']);
GUILD_CATEGORY = ChannelTypes.GUILD_CATEGORY;
if (GUILD_CATEGORY === type) {
r11 = t['5R9nYh'];
} else if (ChannelTypes.GUILD_ANNOUNCEMENT === type) {
format = intl.format;
XRxOo0 = t.XRxOo0;
defaultImport4 = importDefault(1948) /* metro dependency 1948: HelpdeskUtils */;
r11 = Reflect.apply(format, intl, [XRxOo0,
{articleURL: defaultImport4.getArticleURL(HelpdeskArticles.ANNOUNCEMENT_CHANNELS)}]);
} else {
r11 = t['SeA+G9'];
}
object18.description = r11;
MANAGE_MESSAGES = Permissions.MANAGE_MESSAGES;
object18.flag = MANAGE_MESSAGES;
object4[value27] = object18;
let PIN_MESSAGES = Permissions.PIN_MESSAGES;
const value29 = PIN_MESSAGES.toString();
string = intl.string;
const Y5BI39 = t.Y5BI39;
GUILD_CATEGORY = ChannelTypes.GUILD_CATEGORY;
r1 = type === GUILD_CATEGORY ? t.gmbD87 : t['0l2EjL'];
PIN_MESSAGES = Permissions.PIN_MESSAGES;
object4[value29] = {title: Reflect.apply(string, intl, [Y5BI39]), description: r1, flag: PIN_MESSAGES};
let BYPASS_SLOWMODE = Permissions.BYPASS_SLOWMODE;
const value30 = BYPASS_SLOWMODE.toString();
GUILD_CATEGORY = ChannelTypes.GUILD_CATEGORY;
r1 = type === GUILD_CATEGORY ? t.C4t1Xu : t.Ha1xbw;
BYPASS_SLOWMODE = Permissions.BYPASS_SLOWMODE;
object4[value30] = {title: intl.string(t.kqcjeV), description: r1, flag: BYPASS_SLOWMODE};
let MANAGE_OFFICIAL_MESSAGES = Permissions.MANAGE_OFFICIAL_MESSAGES;
const value31 = MANAGE_OFFICIAL_MESSAGES.toString();
string = intl.string;
const Aj9ruN = t.Aj9ruN;
GUILD_CATEGORY = ChannelTypes.GUILD_CATEGORY;
r1 = type === GUILD_CATEGORY ? t['Pf0e/Q'] : t.qEbw4W;
MANAGE_OFFICIAL_MESSAGES = Permissions.MANAGE_OFFICIAL_MESSAGES;
object4[value31] = {title: Reflect.apply(string, intl, [Aj9ruN]), description: r1, flag: MANAGE_OFFICIAL_MESSAGES};
let READ_MESSAGE_HISTORY = Permissions.READ_MESSAGE_HISTORY;
const value32 = READ_MESSAGE_HISTORY.toString();
const object19 = {};
GUILD_THREADS_ONLY = ChannelTypesSets.GUILD_THREADS_ONLY;
const value33 = GUILD_THREADS_ONLY.has(type);
string = intl.string;
object19.title = value33 ? Reflect.apply(string, intl, [t['0RQwtn']]) : Reflect.apply(string, intl, [t.l9ufaR]);
GUILD_CATEGORY = ChannelTypes.GUILD_CATEGORY;
if (GUILD_CATEGORY === type) {
r1 = t['cJRv/g'];
} else if (ChannelTypes.GUILD_VOICE === type) {
defaultImport5 = importDefault(8122) /* metro dependency 8122: GuildTiVPlatformUtilsNative */;
r1 = defaultImport5.getTextInVoiceReadMessageHistoryChannelPermissionText(a2 == null ? value9 : a2.readMessageHistoryDisabled);
} else {
r1 = ChannelTypes.GUILD_FORUM === type || ChannelTypes.GUILD_MEDIA === type ? t.RqCc7i : t.cuMfH0;
}
object19.description = r1;
READ_MESSAGE_HISTORY = Permissions.READ_MESSAGE_HISTORY;
object19.flag = READ_MESSAGE_HISTORY;
object4[value32] = object19;
let SEND_TTS_MESSAGES = Permissions.SEND_TTS_MESSAGES;
const value37 = SEND_TTS_MESSAGES.toString();
GUILD_CATEGORY = ChannelTypes.GUILD_CATEGORY;
r1 = type === GUILD_CATEGORY ? t.b7pc9U : t.CpakGz;
SEND_TTS_MESSAGES = Permissions.SEND_TTS_MESSAGES;
object4[value37] = {title: intl.string(t.mMbwh7), description: r1, flag: SEND_TTS_MESSAGES};
let USE_APPLICATION_COMMANDS = Permissions.USE_APPLICATION_COMMANDS;
const value38 = USE_APPLICATION_COMMANDS.toString();
GUILD_CATEGORY = ChannelTypes.GUILD_CATEGORY;
r1 = type === GUILD_CATEGORY ? t['D+qW0J'] : t.ReG3gG;
USE_APPLICATION_COMMANDS = Permissions.USE_APPLICATION_COMMANDS;
object4[value38] = {title: intl.string(t.nkoPOt), description: r1, flag: USE_APPLICATION_COMMANDS};
let SEND_VOICE_MESSAGES = Permissions.SEND_VOICE_MESSAGES;
const value39 = SEND_VOICE_MESSAGES.toString();
string = intl.string;
const WlWSBT = t.WlWSBT;
GUILD_CATEGORY = ChannelTypes.GUILD_CATEGORY;
r1 = type === GUILD_CATEGORY ? t.gavGfv : t.BhEo9V;
SEND_VOICE_MESSAGES = Permissions.SEND_VOICE_MESSAGES;
object4[value39] = {title: Reflect.apply(string, intl, [WlWSBT]), description: r1, flag: SEND_VOICE_MESSAGES};
let SEND_POLLS = Permissions.SEND_POLLS;
const value40 = SEND_POLLS.toString();
string = intl.string;
const UMQ7Ww = t.UMQ7Ww;
GUILD_CATEGORY = ChannelTypes.GUILD_CATEGORY;
const r2 = type === GUILD_CATEGORY ? t['18Ya7L'] : t.ckKKIO;
SEND_POLLS = Permissions.SEND_POLLS;
object4[value40] = {title: Reflect.apply(string, intl, [UMQ7Ww]), description: r2, flag: SEND_POLLS};
let CONNECT = Permissions.CONNECT;
const value41 = CONNECT.toString();
string = intl.string;
const S0W8Z5 = t.S0W8Z5;
GUILD_CATEGORY = ChannelTypes.GUILD_CATEGORY;
let r10 = a1 ? GUILD_CATEGORY === type ? t.XcrieN : ChannelTypes.GUILD_STAGE_VOICE === type ? t.SOFNhP : ChannelTypes.GUILD_TEXT === type || ChannelTypes.GUILD_FORUM === type || ChannelTypes.GUILD_MEDIA === type ? t.LsS8xT : t.j4AyO8 : GUILD_CATEGORY === type ? t.stA0Hl : ChannelTypes.GUILD_STAGE_VOICE === type ? t['G9+Qie'] : ChannelTypes.GUILD_TEXT === type || ChannelTypes.GUILD_FORUM === type || ChannelTypes.GUILD_MEDIA === type ? t['QU/Rw8'] : t.HvG8uR;
CONNECT = Permissions.CONNECT;
object4[value41] = {title: Reflect.apply(string, intl, [S0W8Z5]), description: r10, flag: CONNECT};
let SPEAK = Permissions.SPEAK;
const value42 = SPEAK.toString();
const object21 = {};
object21.title = intl.string(t['8w1tIR']);
GUILD_CATEGORY = ChannelTypes.GUILD_CATEGORY;
object21.description = GUILD_CATEGORY === type ? t.iXhS6R : ChannelTypes.GUILD_STAGE_VOICE === type ? t.a8n741 : ChannelTypes.GUILD_TEXT === type || ChannelTypes.GUILD_FORUM === type || ChannelTypes.GUILD_MEDIA === type ? t['+VXsJI'] : t['568E6d'];
SPEAK = Permissions.SPEAK;
object21.flag = SPEAK;
object4[value42] = object21;
let STREAM = Permissions.STREAM;
const value43 = STREAM.toString();
string = intl.string;
const FlNoSV = t.FlNoSV;
GUILD_CATEGORY = ChannelTypes.GUILD_CATEGORY;
r10 = GUILD_CATEGORY === type ? t['ryG0/J'] : ChannelTypes.GUILD_TEXT === type || ChannelTypes.GUILD_FORUM === type || ChannelTypes.GUILD_MEDIA === type ? t.AuEQEC : ChannelTypes.GUILD_STAGE_VOICE === type ? t.swJcN6 : t.RY8rIc;
STREAM = Permissions.STREAM;
object4[value43] = {title: Reflect.apply(string, intl, [FlNoSV]), description: r10, flag: STREAM};
let USE_EMBEDDED_ACTIVITIES = Permissions.USE_EMBEDDED_ACTIVITIES;
const value44 = USE_EMBEDDED_ACTIVITIES.toString();
GUILD_CATEGORY = ChannelTypes.GUILD_CATEGORY;
r10 = GUILD_CATEGORY === type ? t.maNzCO : ChannelTypes.GUILD_FORUM === type || ChannelTypes.GUILD_MEDIA === type ? t.RyEwla : t.qinvMU;
USE_EMBEDDED_ACTIVITIES = Permissions.USE_EMBEDDED_ACTIVITIES;
object4[value44] = {title: intl.string(t.rLSGeh), description: r10, flag: USE_EMBEDDED_ACTIVITIES};
let USE_EXTERNAL_APPS = Permissions.USE_EXTERNAL_APPS;
const value45 = USE_EXTERNAL_APPS.toString();
const object22 = {};
object22.title = intl.string(t['3TzAk0']);
GUILD_CATEGORY = ChannelTypes.GUILD_CATEGORY;
object22.description = GUILD_CATEGORY === type ? t.bgIY3H : ChannelTypes.GUILD_FORUM === type || ChannelTypes.GUILD_MEDIA === type ? t.qPUPip : t.czqMLp;
USE_EXTERNAL_APPS = Permissions.USE_EXTERNAL_APPS;
object22.flag = USE_EXTERNAL_APPS;
object4[value45] = object22;
let USE_SOUNDBOARD = Permissions.USE_SOUNDBOARD;
const value46 = USE_SOUNDBOARD.toString();
const object23 = {};
string = intl.string;
const Bco7NG = t.Bco7NG;
object23.title = Reflect.apply(string, intl, [Bco7NG]);
GUILD_CATEGORY = ChannelTypes.GUILD_CATEGORY;
if (GUILD_CATEGORY === type) {
format = intl.format;
property = t['0kBp/0'];
defaultImport8 = importDefault(1948) /* metro dependency 1948: HelpdeskUtils */;
r10 = Reflect.apply(format, intl, [property,
{helpCenterArticle: defaultImport8.getArticleURL(HelpdeskArticles.SOUNDBOARD)}]);
} else if (ChannelTypes.GUILD_TEXT === type) {
format = intl.format;
property = t['6eYqU1'];
defaultImport7 = importDefault(1948) /* metro dependency 1948: HelpdeskUtils */;
r10 = Reflect.apply(format, intl, [property,
{helpCenterArticle: defaultImport7.getArticleURL(HelpdeskArticles.SOUNDBOARD)}]);
} else if (ChannelTypes.GUILD_FORUM === type) {
format = intl.format;
property = t['6eYqU1'];
defaultImport7 = importDefault(1948) /* metro dependency 1948: HelpdeskUtils */;
r10 = Reflect.apply(format, intl, [property,
{helpCenterArticle: defaultImport7.getArticleURL(HelpdeskArticles.SOUNDBOARD)}]);
} else if (ChannelTypes.GUILD_MEDIA === type) {
format = intl.format;
property = t['6eYqU1'];
defaultImport7 = importDefault(1948) /* metro dependency 1948: HelpdeskUtils */;
r10 = Reflect.apply(format, intl, [property,
{helpCenterArticle: defaultImport7.getArticleURL(HelpdeskArticles.SOUNDBOARD)}]);
} else {
format = intl.format;
GEi6Ym = t.GEi6Ym;
defaultImport6 = importDefault(1948) /* metro dependency 1948: HelpdeskUtils */;
r10 = Reflect.apply(format, intl, [GEi6Ym,
{helpCenterArticle: defaultImport6.getArticleURL(HelpdeskArticles.SOUNDBOARD)}]);
}
object23.description = r10;
USE_SOUNDBOARD = Permissions.USE_SOUNDBOARD;
object23.flag = USE_SOUNDBOARD;
object4[value46] = object23;
let USE_EXTERNAL_SOUNDS = Permissions.USE_EXTERNAL_SOUNDS;
const value50 = USE_EXTERNAL_SOUNDS.toString();
USE_EXTERNAL_SOUNDS = Permissions.USE_EXTERNAL_SOUNDS;
object4[value50] = {title: intl.string(t.pwaVJ6), description: t.qDpPtX, flag: USE_EXTERNAL_SOUNDS};
let USE_VAD = Permissions.USE_VAD;
const value51 = USE_VAD.toString();
const object24 = {};
object24.title = intl.string(t['08zAV7']);
GUILD_CATEGORY = ChannelTypes.GUILD_CATEGORY;
object24.description = GUILD_CATEGORY === type ? t.fUYPly : ChannelTypes.GUILD_STAGE_VOICE === type ? t.BJKqsW : ChannelTypes.GUILD_TEXT === type || ChannelTypes.GUILD_FORUM === type || ChannelTypes.GUILD_MEDIA === type ? t['3GJwsc'] : t.s2eihY;
USE_VAD = Permissions.USE_VAD;
object24.flag = USE_VAD;
object4[value51] = object24;
let PRIORITY_SPEAKER = Permissions.PRIORITY_SPEAKER;
const value52 = PRIORITY_SPEAKER.toString();
const object25 = {};
string = intl.string;
const BVK71i = t.BVK71i;
object25.title = Reflect.apply(string, intl, [BVK71i]);
GUILD_CATEGORY = ChannelTypes.GUILD_CATEGORY;
if (GUILD_CATEGORY === type) {
format = intl.format;
g5MzON = t.g5MzON;
intl4 = (require(1244) /* metro dependency 1244: indexNative */).intl;
r10 = Reflect.apply(format, intl, [g5MzON, {keybind: intl4.string(t.DkSwJ2)}]);
} else if (ChannelTypes.GUILD_TEXT === type) {
r10 = intl.format(t['4nbjL0'], {keybind: intl3.string(t.DkSwJ2)});
} else if (ChannelTypes.GUILD_FORUM === type) {
r10 = intl.format(t['4nbjL0'], {keybind: intl3.string(t.DkSwJ2)});
} else if (ChannelTypes.GUILD_MEDIA === type) {
r10 = intl.format(t['4nbjL0'], {keybind: intl3.string(t.DkSwJ2)});
} else {
format = intl.format;
Ij0yKX = t.Ij0yKX;
intl2 = (require(1244) /* metro dependency 1244: indexNative */).intl;
r10 = Reflect.apply(format, intl, [Ij0yKX, {keybind: intl2.string(t.DkSwJ2)}]);
}
object25.description = r10;
PRIORITY_SPEAKER = Permissions.PRIORITY_SPEAKER;
object25.flag = PRIORITY_SPEAKER;
object4[value52] = object25;
let MUTE_MEMBERS = Permissions.MUTE_MEMBERS;
const value56 = MUTE_MEMBERS.toString();
const object27 = {};
object27.title = intl.string(t['8EI30/']);
GUILD_CATEGORY = ChannelTypes.GUILD_CATEGORY;
object27.description = GUILD_CATEGORY === type ? t.bcuobK : ChannelTypes.GUILD_STAGE_VOICE === type ? t.EbvdH9 : ChannelTypes.GUILD_TEXT === type || ChannelTypes.GUILD_FORUM === type || ChannelTypes.GUILD_MEDIA === type ? t.KYDG2K : t.LW5C9P;
MUTE_MEMBERS = Permissions.MUTE_MEMBERS;
object27.flag = MUTE_MEMBERS;
object4[value56] = object27;
let DEAFEN_MEMBERS = Permissions.DEAFEN_MEMBERS;
const value57 = DEAFEN_MEMBERS.toString();
const object28 = {};
object28.title = intl.string(t['9L47Fr']);
GUILD_CATEGORY = ChannelTypes.GUILD_CATEGORY;
object28.description = GUILD_CATEGORY === type ? t.amZ5vn : ChannelTypes.GUILD_TEXT === type || ChannelTypes.GUILD_FORUM === type || ChannelTypes.GUILD_MEDIA === type ? t['d+i1nX'] : t.UAdIxo;
DEAFEN_MEMBERS = Permissions.DEAFEN_MEMBERS;
object28.flag = DEAFEN_MEMBERS;
object4[value57] = object28;
let MOVE_MEMBERS = Permissions.MOVE_MEMBERS;
const value58 = MOVE_MEMBERS.toString();
string = intl.string;
const YtjJPQ = t.YtjJPQ;
GUILD_CATEGORY = ChannelTypes.GUILD_CATEGORY;
r10 = GUILD_CATEGORY === type ? t.XmoyRD : ChannelTypes.GUILD_STAGE_VOICE === type ? t.bizKz6 : ChannelTypes.GUILD_TEXT === type || ChannelTypes.GUILD_FORUM === type || ChannelTypes.GUILD_MEDIA === type ? t.cbdQy2 : t.nSD1ah;
MOVE_MEMBERS = Permissions.MOVE_MEMBERS;
object4[value58] = {title: Reflect.apply(string, intl, [YtjJPQ]), description: r10, flag: MOVE_MEMBERS};
let REQUEST_TO_SPEAK = Permissions.REQUEST_TO_SPEAK;
const value59 = REQUEST_TO_SPEAK.toString();
const object31 = {};
object31.title = intl.string(t['5kicT2']);
GUILD_CATEGORY = ChannelTypes.GUILD_CATEGORY;
object31.description = type === GUILD_CATEGORY ? t.T1lMSl : t.uzlYFE;
REQUEST_TO_SPEAK = Permissions.REQUEST_TO_SPEAK;
object31.flag = REQUEST_TO_SPEAK;
object4[value59] = object31;
let MANAGE_THREADS = Permissions.MANAGE_THREADS;
const value60 = MANAGE_THREADS.toString();
GUILD_THREADS_ONLY = ChannelTypesSets.GUILD_THREADS_ONLY;
GUILD_CATEGORY = ChannelTypes.GUILD_CATEGORY;
MANAGE_THREADS = Permissions.MANAGE_THREADS;
object4[value60] = {title: GUILD_THREADS_ONLY.has(type) ? intl.string(t.ossiZD) : type === ChannelTypes.GUILD_CATEGORY ? intl.string(t.QKe7Q3) : intl.string(t.kEqgr7),
description: GUILD_CATEGORY === type ? t.S31soU : ChannelTypes.GUILD_FORUM === type || ChannelTypes.GUILD_MEDIA === type ? t['XLi/jG'] : t.yvan0j,
flag: MANAGE_THREADS};
let CREATE_PUBLIC_THREADS = Permissions.CREATE_PUBLIC_THREADS;
const value64 = CREATE_PUBLIC_THREADS.toString();
const object32 = {};
object32.title = intl.string(t['25rKnX']);
GUILD_CATEGORY = ChannelTypes.GUILD_CATEGORY;
object32.description = type === GUILD_CATEGORY ? t['+M1yLj'] : t['5SDtGB'];
CREATE_PUBLIC_THREADS = Permissions.CREATE_PUBLIC_THREADS;
object32.flag = CREATE_PUBLIC_THREADS;
object4[value64] = object32;
let CREATE_PRIVATE_THREADS = Permissions.CREATE_PRIVATE_THREADS;
const value65 = CREATE_PRIVATE_THREADS.toString();
string = intl.string;
const QwbTSa = t.QwbTSa;
GUILD_CATEGORY = ChannelTypes.GUILD_CATEGORY;
r1 = type === GUILD_CATEGORY ? t['hBS/zn'] : t.Chg2zd;
CREATE_PRIVATE_THREADS = Permissions.CREATE_PRIVATE_THREADS;
object4[value65] = {title: Reflect.apply(string, intl, [QwbTSa]), description: r1, flag: CREATE_PRIVATE_THREADS};
let SEND_MESSAGES_IN_THREADS = Permissions.SEND_MESSAGES_IN_THREADS;
const value66 = SEND_MESSAGES_IN_THREADS.toString();
const object33 = {};
GUILD_THREADS_ONLY = ChannelTypesSets.GUILD_THREADS_ONLY;
object33.title = GUILD_THREADS_ONLY.has(type) ? intl.string(t.fqhqWm) : type === ChannelTypes.GUILD_CATEGORY ? intl.string(t['5QlVGy']) : intl.string(t.fTE74g);
GUILD_CATEGORY = ChannelTypes.GUILD_CATEGORY;
object33.description = GUILD_CATEGORY === type ? t.DlIVcN : ChannelTypes.GUILD_FORUM === type || ChannelTypes.GUILD_MEDIA === type ? t.XTnrPH : t.xHO6Me;
SEND_MESSAGES_IN_THREADS = Permissions.SEND_MESSAGES_IN_THREADS;
object33.flag = SEND_MESSAGES_IN_THREADS;
object4[value66] = object33;
let MANAGE_EVENTS = Permissions.MANAGE_EVENTS;
const value70 = MANAGE_EVENTS.toString();
string = intl.string;
const HIgA5a = t.HIgA5a;
GUILD_CATEGORY = ChannelTypes.GUILD_CATEGORY;
r1 = type === GUILD_CATEGORY ? t.CP2sz4 : t['4pO/TY'];
MANAGE_EVENTS = Permissions.MANAGE_EVENTS;
object4[value70] = {title: Reflect.apply(string, intl, [HIgA5a]), description: r1, flag: MANAGE_EVENTS};
let CREATE_EVENTS = Permissions.CREATE_EVENTS;
const value71 = CREATE_EVENTS.toString();
GUILD_CATEGORY = ChannelTypes.GUILD_CATEGORY;
r1 = type === GUILD_CATEGORY ? t.XpibmC : t.sPoBLa;
CREATE_EVENTS = Permissions.CREATE_EVENTS;
object4[value71] = {title: intl.string(t.qyjZua), description: r1, flag: CREATE_EVENTS};
let SET_VOICE_CHANNEL_STATUS = Permissions.SET_VOICE_CHANNEL_STATUS;
const value72 = SET_VOICE_CHANNEL_STATUS.toString();
string = intl.string;
const VBwkUf = t.VBwkUf;
const r4 = a2 == null ? t.C6BzXx : a2.enableHangoutWindow ? t.CYcJ6H : t.C6BzXx;
SET_VOICE_CHANNEL_STATUS = Permissions.SET_VOICE_CHANNEL_STATUS;
object4[value72] = {title: Reflect.apply(string, intl, [VBwkUf]), description: r4, flag: SET_VOICE_CHANNEL_STATUS};
return object4;
}
@@ -0,0 +1,598 @@
/* Metro module 9088; source: modules/channel_permissions/ChannelPermissionsUtils.tsx; dependencies: [1383, 1422, 1939, 1945, 1878, 8120, 661, 1940, 1244, 483, 21, 3995, 1360, 3789, 9089, 1909, 4800, 2] */
function _fun71018(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#71018, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9273:6, offset: 0x01d12556, size: 675 bytes, params: 8, frame: 26
let env0_0 = require;
const isAdmin = function(a0) {
return hasPermission(a0, Permissions.ADMINISTRATOR);
};
const closure = getRoleRowData;
const closure2 = sortRoles;
const closure3 = getNoRolesRow;
const closure4 = function(a0, a1, a2, a3, a4) {
var env0_0 = a2;
var env0_1 = a3;
var env0_2 = a4;
return a1.filter(_fun71025);
};
const closure5 = function(a0, a1, a2, a3, a4) {
var env0_0 = a2;
var env0_1 = a3;
var env0_2 = a4;
return a1.filter(_fun71027);
};
const isDefaultMember = function(a0, a1) {
return isGuildOwner(a1, a0);
};
const sortMembers = function(a0, a1) {
var r0;
var value;
var property = a0.rowType;
if (property !== a1.rowType) {
r0 = a0.rowType - a1.rowType;
} else {
property = a0.name;
value = property.toLocaleLowerCase();
property = a1.name;
value = value.localeCompare(property.toLocaleLowerCase());
r0 = value;
}
return r0;
};
const closure6 = getExistingMembers;
const closure7 = flipEveryonePermission;
let Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_4 = (require(1383) /* metro dependency 1383: ChannelRecord */).isGuildVocalChannelType;
const env0_5 = (require(1422) /* metro dependency 1422: GuildRecord */).isGuildOwner;
let value = require(1939) /* metro dependency 1939: GuildRoleRecord */;
const env0_6 = value.hasPermission;
const env0_7 = value.isEveryoneRole;
const guildMemberStore = importDefault(1945) /* metro dependency 1945: GuildMemberStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const env0_10 = (require(8120) /* metro dependency 8120: ChannelPermissionsConstants */).RowType;
value = require(661) /* metro dependency 661: Constants */;
const env0_11 = value.Permissions;
const env0_12 = value.ChannelTypes;
const env0_13 = value.DEFAULT_ROLE_COLOR_HEX;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/channel_permissions/ChannelPermissionsUtils.tsx');
exports.getRoleRowData = closure;
exports.sortRoles = closure2;
exports.getNoRolesRow = closure3;
exports.isEveryoneRoleId = isEveryoneRoleId;
exports.getRolesRows = function(a0, a1, a2, a3) {
var value = a4;
var env0_0 = a2;
var env0_1 = a3;
var env0_2 = value !== undefined ? value : _fun71037;
value = a1.filter(_fun71038);
value = value.sort(sortRoles);
return value.map(_fun71039);
};
exports.getRolesRowsWithPermissionDisabled = function(a0, a1, a2, a3) {
var value = a4;
var env0_0 = a2;
var env0_1 = a3;
var env0_2 = value !== undefined ? value : _fun71041;
value = a1.filter(_fun71042);
value = value.sort(sortRoles);
return value.map(_fun71043);
};
exports.getExistingRoles = closure4;
exports.getAllExistingRolesWithPermission = closure5;
exports.getExistingRolesRows = getExistingRolesRows;
exports.getExistingRolesRowWithPermissionDisabled = getExistingRolesRowWithPermissionDisabled;
exports.getMembersRows = getMembersRows;
exports.getExistingMembers = closure6;
exports.getExistingMembersRows = function(a0, a1, a2, a3, a4) {
var env0_0 = a2;
return getExistingMembers(a0, a1, a2, a3, a4).map(_fun71053).sort(sortMembers);
};
exports.getRowTypeLabel = getRowTypeLabel;
exports.getRemoveTooltipHint = getRemoveTooltipHint;
exports.flipEveryonePermission = closure7;
exports.toggleChannelEveryonePermission = toggleChannelEveryonePermission;
exports.grantUserChannelAccess = grantUserChannelAccess;
exports.isPrivateGuildChannel = isPrivateGuildChannel;
exports.isPrivateTextChannel = isPrivateTextChannel;
exports.canCreatePrivateChannel = function(a0, a1, a2) {
var r1;
var r0;
var value = a1;
if (a0 === ChannelTypes.GUILD_TEXT) {
r0 = value;
} else if (a0 === ChannelTypes.GUILD_ANNOUNCEMENT) {
r0 = value;
} else {
r1 = !isGuildVocalChannelType(a0) && a0 !== ChannelTypes.GUILD_CATEGORY;
r1 = !r1 ? value && a2 : r1;
r0 = r1;
}
return r0;
};
exports.getPrivateChannelHintText = getPrivateChannelHintText;
exports.extractPermissionOverwrites = function(a0, a1) {
var env0_0 = a1;
var Object = global.Object;
Object.values(a0).forEach(_fun71063);
return [];
};
}
function getRoleRowData(a0) { // fn#71020, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9273:357, offset: 0x01d12817, size: 162 bytes, params: 2, frame: 18
const value = a1;
const r3 = value !== undefined ? value : false;
const r6 = isAdmin(a0) ? RowType.ADMINISTRATOR : RowType.ROLE;
const object2 = {rowType: r6};
object2.colorString = a0.colorString ?? DEFAULT_ROLE_COLOR_HEX;
object2.name = a0.name;
object2.id = a0.id;
object2.disabled = isAdmin(a0) || r3;
object2.key = '' + r6 + ':' + a0.id;
object2.tags = a0.tags;
return object2;
}
function sortRoles(a0, a1) { // fn#71021, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9273:601, offset: 0x01d128b9, size: 89 bytes, params: 3, frame: 17
var r0;
var value;
const isAdmin2 = isAdmin(a0);
const value2 = 1;
const r1 = isAdmin2 ? 0 : value2;
const r2 = isAdmin(a1) ? 0 : value2;
if (r1 !== r2) {
r0 = r1 - r2;
} else {
value = require(1940) /* metro dependency 1940: GuildRoleUtils */;
value = value.compareGuildRoles(a0, a1);
r0 = value;
}
return r0;
}
function getNoRolesRow() { // fn#71022, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9273:711, offset: 0x01d12912, size: 126 bytes, params: 1, frame: 15
var r0;
var intl;
const value = a0;
if (value !== undefined) {
r0 = value;
} else {
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
r0 = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['gnsna/']);
}
const EMPTY_STATE = RowType.EMPTY_STATE;
return [{rowType: EMPTY_STATE, colorString: DEFAULT_ROLE_COLOR_HEX, name: r0, disabled: true, id: 'EMPTY_STATE'}];
}
function canAddPermissionInChannel(a0, a1, a2, a3) { // fn#71023, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9273:860, offset: 0x01d12990, size: 135 bytes, params: 5, frame: 18
var r2;
var value;
const currentUser = UserStore.getCurrentUser();
if (currentUser == null) {
return false;
}
if (a0 == null) {
return currentUser.id !== a1;
}
const r3 = a3?.[a1] == null ? a0.permissionOverwrites[a1] : a3[a1];
const value4 = r3 == null;
if (value4) {
r2 = value4;
} else {
value = importAll(483) /* metro dependency 483: BigFlagUtils */;
value = !value.has(r3.allow, a2);
r2 = value;
}
return r2;
}
function getExistingRoles(a0, a1, a2, a3, a4) { // fn#71024, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9273:1087, offset: 0x01d12a17, size: 45 bytes, params: 6, frame: 11
const env0_0 = a2;
const env0_1 = a3;
const env0_2 = a4;
return a1.filter(_fun71025);
}
function getAllExistingRolesWithPermission(a0, a1, a2, a3, a4) { // fn#71026, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9273:1204, offset: 0x01d12a8d, size: 45 bytes, params: 6, frame: 11
const env0_0 = a2;
const env0_1 = a3;
const env0_2 = a4;
return a1.filter(_fun71027);
}
function getDisplayName_71028(a0, {id}) { // fn#71028, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9273:1456, offset: 0x01d12b6b, size: 76 bytes, params: 3, frame: 15
var r0;
var value;
const nick = GuildMemberStore.getNick(id, a0.id);
if (nick != null) {
r0 = nick;
} else {
value = importDefault(3995) /* metro dependency 3995: UserUtils */;
value = value.getName(a0);
r0 = value;
}
return r0;
}
function getMemberRowData(a0, a1) { // fn#71030, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9273:1595, offset: 0x01d12bce, size: 212 bytes, params: 3, frame: 19
const r5 = isGuildOwner(a1, a0) ? RowType.OWNER : RowType.MEMBER;
const object2 = {rowType: r5};
object2.name = getDisplayName_71028(a0, a1);
object2.username = (importDefault(3995) /* metro dependency 3995: UserUtils */).getUserTag(a0);
object2.id = a0.id;
object2.avatarURL = a0.getAvatarURL(a1.id, 24);
object2.bot = a0.bot;
object2.verifiedBot = a0.isVerifiedBot();
object2.disabled = isDefaultMember(a0, a1);
object2.key = '' + r5 + ':' + a0.id;
return object2;
}
function getExistingMembers(a0, a1, a2, a3, a4) { // fn#71032, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9273:2050, offset: 0x01d12cf5, size: 113 bytes, params: 6, frame: 14
const env0_0 = a1;
const env0_1 = a2;
const env0_2 = a3;
const env0_3 = a4;
const map = a0.map;
const getUser = UserStore.getUser;
const value2 = Reflect.apply(map, a0, [getUser]);
return value2.filter((require(1360) /* metro dependency 1360: GlobalUtils */).isNotNullish).filter(_fun71033);
}
function flipEveryonePermission(a0, a1, a2) { // fn#71034, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9273:2217, offset: 0x01d12da2, size: 210 bytes, params: 4, frame: 19
var r1;
var value;
const property = a0.permissionOverwrites[a0.guild_id];
if (property != null) {
r1 = property;
} else {
value = importAll(3789) /* metro dependency 3789: PermissionUtils */;
value = value.makeEveryoneOverwrite(a0.guild_id);
r1 = value;
}
const object2 = {};
copyDataProperties(object2, r1, undefined);
const bigFlagUtilsModule = importAll(483) /* metro dependency 483: BigFlagUtils */;
object2.deny = bigFlagUtilsModule.remove(object2.deny, a1);
const moduleValue2 = bigFlagUtilsModule;
object2.allow = moduleValue2.remove(object2.allow, a1);
if (!a2) {
value = bigFlagUtilsModule;
object2.deny = value.add(object2.deny, a1);
}
return object2;
}
function isEveryoneRoleId(a0, a1) { // fn#71035, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9273:2672, offset: 0x01d12e74, size: 48 bytes, params: 3, frame: 11
let value = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
value = value.castGuildIdAsEveryoneGuildRoleId(a0);
return value === a1;
}
function getRolesRows(a0, a1, a2, a3) { // fn#71036, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9273:2775, offset: 0x01d12ea4, size: 93 bytes, params: 5, frame: 12
let value = a4;
const env0_0 = a2;
const env0_1 = a3;
const env0_2 = value !== undefined ? value : function() {
return true;
};
value = Reflect.apply(a1.filter(_fun71038).sort, value, [sortRoles]);
return value.map(function(a0) {
return getRoleRowData(a0);
});
}
function getRolesRowsWithPermissionDisabled(a0, a1, a2, a3) { // fn#71040, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9273:2986, offset: 0x01d12f58, size: 93 bytes, params: 5, frame: 12
let value = a4;
const env0_0 = a2;
const env0_1 = a3;
const env0_2 = value !== undefined ? value : function() {
return true;
};
value = Reflect.apply(a1.filter(_fun71042).sort, value, [sortRoles]);
return value.map(function(a0) {
return getRoleRowData(a0, hasPermission(a0, importAll));
});
}
function getExistingRolesRows(a0, a1, a2, a3, a4) { // fn#71044, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9273:3318, offset: 0x01d12fda, size: 140 bytes, params: 6, frame: 20
var r0;
var getNoRolesRowBinding;
var intl;
const existingRoles = getExistingRoles(0, a1, a2, a3, a4);
const value4 = existingRoles.sort(sortRoles).map(function(a0) {
return getRoleRowData(a0);
});
if (value4.length !== 0) {
r0 = value4;
} else {
getNoRolesRowBinding = getNoRolesRow;
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
r0 = getNoRolesRowBinding(intl.string((require(1244) /* metro dependency 1244: indexNative */).t.nZfHsf));
}
return r0;
}
function getExistingRolesRowWithPermissionDisabled(a0, a1, a2, a3, a4) { // fn#71046, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9273:3559, offset: 0x01d13066, size: 147 bytes, params: 6, frame: 21
var r0;
var getNoRolesRowBinding;
var intl;
const env0_0 = a3;
const allExistingRolesWithPermission = getAllExistingRolesWithPermission(0, a1, a2, a3, a4);
const value4 = allExistingRolesWithPermission.sort(sortRoles).map(function(a0) {
return getRoleRowData(a0, hasPermission(a0, importAll));
});
if (value4.length !== 0) {
r0 = value4;
} else {
getNoRolesRowBinding = getNoRolesRow;
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
r0 = getNoRolesRowBinding(intl.string((require(1244) /* metro dependency 1244: indexNative */).t.nZfHsf));
}
return r0;
}
function getMembersRows(a0, a1, a2, a3) { // fn#71048, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9273:3818, offset: 0x01d1311e, size: 156 bytes, params: 5, frame: 16
const value = a4;
const env0_0 = a1;
const env0_1 = a2;
const env0_2 = a3;
const env0_3 = value !== undefined ? value : function() {
return true;
};
const map = a0.map;
const getUser = UserStore.getUser;
const value2 = Reflect.apply(map, a0, [getUser]);
const value5 = value2.filter((require(1360) /* metro dependency 1360: GlobalUtils */).isNotNullish).filter(_fun71050).map(function(a0) {
return getMemberRowData(a0, importDefault);
});
return value5.sort(sortMembers);
}
function getExistingMembersRows(a0, a1, a2, a3, a4) { // fn#71052, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9273:4149, offset: 0x01d1324f, size: 71 bytes, params: 6, frame: 21
const env0_0 = a2;
const value3 = getExistingMembers(a0, a1, a2, a3, a4).map(function(a0) {
return getMemberRowData(a0, importDefault);
});
return value3.sort(sortMembers);
}
function getRowTypeLabel(a0, a1) { // fn#71054, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9273:4298, offset: 0x01d132b1, size: 498 bytes, params: 3, frame: 16
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const ROLE = RowType.ROLE;
if (ROLE === a0) {
return intl.string(t.ZxoFOG);
}
const OWNER = RowType.OWNER;
if (OWNER === a0) {
return intl.string(t.NWhYJg);
}
const ADMINISTRATOR = RowType.ADMINISTRATOR;
if (ADMINISTRATOR === a0) {
return intl.string(t['dwlcc+']);
}
const MEMBER = RowType.MEMBER;
if (MEMBER === a0) {
return a1 ? intl.string(t.UAJxZi) : null;
}
const USER = RowType.USER;
if (USER === a0) {
return intl.string(t.KD6OJJ);
}
const GUILD = RowType.GUILD;
if (GUILD === a0) {
return intl.string(t['5qyruI']);
}
const EMPTY_STATE = RowType.EMPTY_STATE;
if (EMPTY_STATE === a0) {
return null;
}
}
function getRemoveTooltipHint(a0) { // fn#71055, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9273:4762, offset: 0x01d134a3, size: 318 bytes, params: 2, frame: 15
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const ROLE = RowType.ROLE;
if (ROLE === a0) {
return intl.string(t['Gzc/a8']);
}
const OWNER = RowType.OWNER;
if (OWNER === a0) {
return intl.string(t.icuNBM);
}
const ADMINISTRATOR = RowType.ADMINISTRATOR;
if (ADMINISTRATOR === a0) {
return intl.string(t.eTmN5a);
}
const MEMBER = RowType.MEMBER;
if (MEMBER === a0) {
return intl.string(t['Gzc/a8']);
}
RowType.EMPTY_STATE;
return null;
}
function toggleChannelEveryonePermission(a0, a1, a2) { // fn#71056, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9273:5174, offset: 0x01d135e1, size: 80 bytes, params: 4, frame: 18
const value2 = flipEveryonePermission(a0, a1, a2);
const value = require(9089) /* metro dependency 9089: ChannelSettingsPermissionsActionCreators */;
value.updatePermission(a0, value2.id, value2.allow, value2.deny);
}
function grantUserChannelAccess(a0, a1) { // fn#71057, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9273:5333, offset: 0x01d13631, size: 296 bytes, params: 3, frame: 22
var permissionOverwrites;
var id;
var property;
var allow;
var deny;
var add;
var value3;
var updatePermission;
var object2;
var NONE;
var savePermissionUpdates;
var value;
const currentUser = UserStore.getCurrentUser();
if (currentUser != null) {
permissionOverwrites = a0.permissionOverwrites;
id = currentUser.id;
property = permissionOverwrites[id];
if (property == null) {
object2 = {};
id = currentUser.id;
object2.id = id;
object2.type = (require(1909) /* metro dependency 1909: Server */).PermissionOverwriteType.MEMBER;
value = importAll(483) /* metro dependency 483: BigFlagUtils */;
add = value.add;
NONE = (importAll(3789) /* metro dependency 3789: PermissionUtils */).NONE;
object2.allow = Reflect.apply(add, value, [NONE, a1]);
NONE = (importAll(3789) /* metro dependency 3789: PermissionUtils */).NONE;
object2.deny = NONE;
value = require(9089) /* metro dependency 9089: ChannelSettingsPermissionsActionCreators */;
savePermissionUpdates = value.savePermissionUpdates;
id = a0.id;
return Reflect.apply(savePermissionUpdates, value, [id, [object2], true]);
}
allow = property.allow;
deny = property.deny;
value3 = (importAll(483) /* metro dependency 483: BigFlagUtils */).add(allow, a1);
value = require(9089) /* metro dependency 9089: ChannelSettingsPermissionsActionCreators */;
updatePermission = value.updatePermission;
id = property.id;
return Reflect.apply(updatePermission, value, [a0, id, value3, deny]);
}
}
function isPrivateGuildChannel(a0, a1) { // fn#71058, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9273:5737, offset: 0x01d13759, size: 119 bytes, params: 3, frame: 16
var r0;
if (a0 == null) {
return false;
}
const property = a0.permissionOverwrites[a0.guild_id];
let value = undefined;
const r2 = (a1 == null ? value : a1[a0.guild_id]) == null ? property : a1[a0.guild_id];
const value2 = r2 != null;
if (value2) {
value = importAll(483) /* metro dependency 483: BigFlagUtils */;
value = value.has(r2.deny, a0.accessPermissions);
r0 = value;
} else {
r0 = value2;
}
return r0;
}
function isPrivateTextChannel(a0) { // fn#71059, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9273:5971, offset: 0x01d137d0, size: 106 bytes, params: 2, frame: 15
var moduleValue;
const property = a0.permissionOverwrites[a0.guild_id];
let r0 = property != null && a0.type === ChannelTypes.GUILD_TEXT;
if (r0) {
moduleValue = importAll(483) /* metro dependency 483: BigFlagUtils */;
r0 = moduleValue.has(property.deny, Permissions.VIEW_CHANNEL);
}
return r0;
}
function getPrivateChannelHintText(a0) { // fn#71061, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9273:6302, offset: 0x01d1389b, size: 264 bytes, params: 2, frame: 16
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const GUILD_TEXT = ChannelTypes.GUILD_TEXT;
if (GUILD_TEXT === a0) {
return intl.format(t.ZDtA0T, {});
}
const GUILD_ANNOUNCEMENT = ChannelTypes.GUILD_ANNOUNCEMENT;
if (GUILD_ANNOUNCEMENT === a0) {
return intl.format(t.ZDtA0T, {});
}
const GUILD_VOICE = ChannelTypes.GUILD_VOICE;
if (GUILD_VOICE === a0) {
return intl.format(t.iZAMty, {});
}
const GUILD_CATEGORY = ChannelTypes.GUILD_CATEGORY;
if (GUILD_CATEGORY === a0) {
return intl.format(t.PhnARV, {});
}
return null;
}
function extractPermissionOverwrites(a0, a1) { // fn#71062, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9273:6631, offset: 0x01d139a3, size: 57 bytes, params: 3, frame: 13
const env0_0 = a1;
const Object = global.Object;
Object.values(a0).forEach(_fun71063);
return [];
}
function _fun71025(a0) { // fn#71025, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9273:1141, offset: 0x01d12a44, size: 73 bytes, params: 2, frame: 20
const value = environment.__proto__;
return isAdmin(a0) || !canAddPermissionInChannel(importDefault, a0.id, importAll, env0_2) && !isEveryoneRole(a0);
}
function _fun71027(a0) { // fn#71027, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9273:1275, offset: 0x01d12aba, size: 177 bytes, params: 2, frame: 21
var has;
var moduleValue;
var combine;
var permissions;
var property;
let value = environment.__proto__;
const isAdminBinding = isAdmin;
const value2 = undefined;
let r0 = isAdminBinding(a0) || !canAddPermissionInChannel(importDefault, a0.id, importAll,
env0_2) && !isEveryoneRole(a0);
if (!r0) {
value = importAll(483) /* metro dependency 483: BigFlagUtils */;
has = value.has;
moduleValue = importAll(483) /* metro dependency 483: BigFlagUtils */;
combine = moduleValue.combine;
permissions = a0.permissions;
property = importDefault.permissionOverwrites[a0.id];
value = Reflect.apply(has, value, [Reflect.apply(combine, moduleValue, [permissions,
property == null ? value2 : property.allow]), importAll]);
r0 = value;
}
return r0;
}
function _fun71033(a0) { // fn#71033, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9273:2151, offset: 0x01d12d66, size: 60 bytes, params: 2, frame: 20
const value = environment.__proto__;
const canAddPermissionInChannel2 = canAddPermissionInChannel(require, a0.id, importAll, env0_3);
return canAddPermissionInChannel2 ? isDefaultMember(a0, importDefault) : !canAddPermissionInChannel2;
}
function _fun71038(a0) { // fn#71038, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9273:2832, offset: 0x01d12f01, size: 87 bytes, params: 2, frame: 18
const value = environment.__proto__;
return !isAdmin(a0) && canAddPermissionInChannel(importDefault, a0.id,
importAll) && !isEveryoneRole(a0) && env0_2(a0.name);
}
function _fun71050(a0) { // fn#71050, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9273:3922, offset: 0x01d131ba, size: 122 bytes, params: 2, frame: 19
var r1;
const value = environment.__proto__;
let r0 = !isGuildOwner(importDefault, a0) && canAddPermissionInChannel(require, a0.id, importAll);
if (r0) {
r1 = env0_3(getDisplayName_71028(a0, importDefault)) || env0_3(a0.username);
r1 = !r1 ? env0_3(a0.discriminator) : r1;
r0 = r1;
}
return r0;
}
function _fun71063({row}) { // fn#71063, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9273:6715, offset: 0x01d139dc, size: 214 bytes, params: 2, frame: 17
var rowType;
var binding;
var push;
let value = row.id != null;
if (value && row.id !== '') {
rowType = row.rowType;
value = environment.__proto__;
if (rowType === RowType.ROLE) {
binding = env0_1;
push = binding.push;
value = require(4800) /* metro dependency 4800: ChannelUtils */;
Reflect.apply(push, binding, [value.permissionOverwriteForRole(row.id, require)]);
} else if (row.rowType === RowType.MEMBER) {
binding = env0_1;
push = binding.push;
value = require(4800) /* metro dependency 4800: ChannelUtils */;
Reflect.apply(push, binding, [value.permissionOverwriteForUser(row.id, require)]);
}
}
}
@@ -0,0 +1,37 @@
/* Metro module 11392; source: modules/channel_permissions/native/ChannelPermissionsUtils.tsx; dependencies: [661, 683, 4080, 9095, 1962, 11393, 2] */
function _fun87309(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#87309, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11578:6, offset: 0x01fb7d53, size: 137 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/channel_permissions/native/ChannelPermissionsUtils.tsx');
exports.openAddMembersActionSheet = openAddMembersActionSheet;
exports.openChannelMembersActionSheet = openChannelMembersActionSheet;
}
function openAddMembersActionSheet(a0) { // fn#87310, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11578:245, offset: 0x01fb7ddc, size: 171 bytes, params: 2, frame: 21
let value = a1;
const r6 = value !== undefined ? value : false;
const defaultImport = importDefault(dependencyMap[1]);
const track = defaultImport.track;
const OPEN_POPOUT = AnalyticEvents.OPEN_POPOUT;
Reflect.apply(track, defaultImport, [OPEN_POPOUT, {type: 'Grant Channel Access'}]);
const defaultImport2 = importDefault(dependencyMap[2]);
const openLazy = defaultImport2.openLazy;
value = require(dependencyMap[4]);
value = value(dependencyMap[3], dependencyMap.paths);
Reflect.apply(openLazy, defaultImport2, [value, 'channel-add-members-' + a0.id, {channel: a0, canSkip: r6}]);
}
function openChannelMembersActionSheet(a0, a1) { // fn#87311, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11578:472, offset: 0x01fb7e87, size: 159 bytes, params: 3, frame: 20
const defaultImport = importDefault(dependencyMap[1]);
const track = defaultImport.track;
const OPEN_POPOUT = AnalyticEvents.OPEN_POPOUT;
Reflect.apply(track, defaultImport, [OPEN_POPOUT, {type: 'Manage Channel Access'}]);
const defaultImport2 = importDefault(dependencyMap[2]);
const openLazy = defaultImport2.openLazy;
let value = require(dependencyMap[4]);
value = value(dependencyMap[5], dependencyMap.paths);
Reflect.apply(openLazy, defaultImport2, [value, 'channel-members-' + a0, {channelId: a0, guildId: a1}]);
}
@@ -0,0 +1,675 @@
/* Metro module 9095; source: modules/channel_permissions/native/action_sheets/AddMembersActionSheet.tsx; dependencies: [5, 29, 57, 31, 27, 1945, 1938, 1867, 1878, 8120, 1309, 482, 33, 4501, 697, 3789, 5463, 4100, 566, 9088, 3869, 1244, 1305, 4573, 9096, 6277, 8416, 9100, 6592, 9105, 4805, 4800, 9089, 3856, 4080, 6275, 6758, 4578, 2] */
function _fun71141(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#71141, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9280:6, offset: 0x01d15f9c, size: 709 bytes, params: 8, frame: 23
var object2;
const env0_0 = require;
const getFullRowId = function({rowType, id}) {
return '' + rowType + ':' + id;
};
const closure = AddMembersBody;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_4 = importDefault(5) /* metro dependency 5 */;
const env0_5 = importDefault(29) /* metro dependency 29 */;
const env0_6 = importDefault(57) /* metro dependency 57 */;
const env0_7 = importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
const env0_8 = value.View;
const env0_9 = value.ScrollView;
const guildMemberStore = importDefault(1945) /* metro dependency 1945: GuildMemberStore */;
const guildRoleStore = importDefault(1938) /* metro dependency 1938: GuildRoleStore */;
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
value = require(8120) /* metro dependency 8120: ChannelPermissionsConstants */;
const env0_14 = value.RowType;
const env0_15 = value.MEMBER_REQUEST_COUNT;
const FORM_ROW_VERTICAL_PADDING = (require(1309) /* metro dependency 1309: FormConstants */).FORM_ROW_VERTICAL_PADDING;
const env0_16 = (require(482) /* metro dependency 482: Constants */).Permissions;
value = require(33) /* metro dependency 33 */;
const env0_17 = value.jsx;
const env0_18 = value.Fragment;
const env0_19 = value.jsxs;
const env0_20 = FORM_ROW_VERTICAL_PADDING + 30;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
object2.container = {flex: 1};
const object5 = {alignItems: 'stretch'};
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object5.paddingHorizontal = PX_16;
let PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object5.paddingTop = PX_12;
object2.inputContainer = object5;
object2.tagRoleColor = {'height': 12, 'width': 12, 'borderRadius': 6};
const object6 = {'width': 16, 'height': 16};
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object2.tagAvatar = object6;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object2.emptyState = {paddingTop: PX_16};
const TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_DEFAULT;
object2.emptyStateText = {color: TEXT_DEFAULT};
PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object2.sectionRowWrapper = {paddingVertical: PX_12};
object2.adminWarning = {'marginHorizontal': 16, 'marginVertical': 8};
const env0_21 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/channel_permissions/native/action_sheets/AddMembersActionSheet.tsx');
exports.default = AddMembersActionSheet;
exports.AddMembersBody = closure;
}
function AddMembersBody(a0) { // fn#71144, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9280:1267, offset: 0x01d1628d, size: 1954 bytes, params: 2, frame: 44
var r0;
var r13;
var r5;
var rolesRows;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var object4;
var space;
var PX_16;
var EmptyState;
const channel = a0.channel;
const guild = a0.guild;
const pendingAdditions = a0.pendingAdditions;
const env0_2 = a0.setPendingAdditions;
const permission = a0.permission;
const r15 = permission !== undefined ? permission : (importAll(3789) /* metro dependency 3789: PermissionUtils */).NONE;
const inActionSheet = a0.inActionSheet;
let object = {'channel': 0, 'guild': 0, 'pendingAdditions': 0, 'setPendingAdditions': 0, 'permission': 0,
'inActionSheet': 0};
silentSetPrototypeOf(object, null, undefined);
let value = 0;
const value2 = copyDataProperties({}, a0, object, undefined);
const env0_6 = undefined;
let env0_7 = undefined;
const AddMembersBodyGetQuery = function(a0, a1) {
var r0;
var value = a0;
if (a1) {
value = value.slice(1);
r0 = value;
} else {
r0 = value;
}
return r0;
};
const closure = AddMembersBodyFilterByQuery;
const styles = useStyles();
const value5 = env0_6(env0_7.useState(false), 2);
const property = value5[value];
const value6 = 1;
const env0_5 = value5[value6];
const value8 = env0_6(env0_7.useState(''), 2);
const property2 = value8[value];
env0_7 = value8[value6];
const insets = (importDefault(5463) /* metro dependency 5463: useSafeAreaInsetsKeyboardAwareNative */)({isKeyboardAwareOnAndroid: !inActionSheet}).insets;
const permissionUtilsModule = importAll(3789) /* metro dependency 3789: PermissionUtils */;
const canEveryoneRole = permissionUtilsModule.canEveryoneRole;
const ADMINISTRATOR = Permissions.ADMINISTRATOR;
const canEveryoneRole2 = Reflect.apply(canEveryoneRole, permissionUtilsModule, [ADMINISTRATOR, guild]);
const sortedRoles = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildRoleStore],
function() {
return GuildRoleStore.getSortedRoles(guild.id);
});
const value9 = (require(566) /* metro dependency 566: flux */).useStateFromStoresArray([GuildMemberStore],
function() {
return GuildMemberStore.getMemberIds(guild.id);
});
if (property) {
r13 = [];
} else {
rolesRows = (importAll(9088) /* metro dependency 9088: ChannelPermissionsUtils */).getRolesRows(guild,
sortedRoles,
channel, r15, closure);
r0 = value === rolesRows.length && property2.trim() === '';
r0 = r0 && value6 === sortedRoles.length;
r13 = r0 ? (importAll(9088) /* metro dependency 9088: ChannelPermissionsUtils */).getNoRolesRow() : rolesRows;
}
const membersRows = (importAll(9088) /* metro dependency 9088: ChannelPermissionsUtils */).getMembersRows(value9,
channel, guild, r15, closure);
env0_7.useEffect(_fun71149, [r13.length + membersRows.length, property2]);
object = [];
r0 = r13.length > value ? [intl.string((require(1244) /* metro dependency 1244: indexNative */).t['LPJmL/'])] : [];
const items3 = [];
arraySpread(items3, membersRows, arraySpread(items3,
membersRows.length > value ? [intl.string((require(1244) /* metro dependency 1244: indexNative */).t['9Oq93m'])] : [],
arraySpread(items3, r13, arraySpread(items3, r0, value, r15), r15), r15), r15);
let r7 = r13.length > value ? value6 : value;
const value21 = r7 + r13.length - value6;
const env0_12 = (membersRows.length > value ? value21 + 2 : value21) + membersRows.length - value6;
let push = object.push;
const object5 = {};
object5.title = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['LPJmL/']);
object5.data = r13;
Reflect.apply(push, object, [object5]);
push = object.push;
const object6 = {};
object6.title = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['9Oq93m']);
object6.data = membersRows;
Reflect.apply(push, object, [object6]);
let Object = global.Object;
const value24 = Object.values(pendingAdditions).map(function({display, row}) {
var r2;
var object = {};
copyDataProperties(object, display, r2);
object['id'] = row.id;
return object;
});
const r8 = inActionSheet ? (require(6277) /* metro dependency 6277 */).BottomSheetScrollView : ScrollView;
const flashListModule = require(8416) /* metro dependency 8416: flashList */;
r7 = inActionSheet ? flashListModule.BottomSheetFlashList : flashListModule.FlashList;
const jsxRuntimeEnv0_18Binding = jsxRuntimeEnv0_18;
const TagListInputNative = importDefault(9100) /* metro dependency 9100: TagListInputNative */;
const tagListInputNativeProps = {accessibilityLabel: intl.string((require(1244) /* metro dependency 1244: indexNative */).t['5h0QOP'])};
const string = intl.string;
const TVZdKh = (require(1244) /* metro dependency 1244: indexNative */).t.TVZdKh;
tagListInputNativeProps.placeholder = Reflect.apply(string, intl, [TVZdKh]);
tagListInputNativeProps.tags = value24;
tagListInputNativeProps.onChangeText = onChangeText;
tagListInputNativeProps.onRemove = function(a0) {
var Object = global.Object;
var env0_0 = Object.keys(pendingAdditions)[a0];
setPendingAdditions(_fun71153);
};
const view = <View style={styles.inputContainer}><TagListInputNative {...tagListInputNativeProps} /></View>;
const r20 = canEveryoneRole2 && <View style={styles.adminWarning}>{((HelpMessage) => <HelpMessage messageType={(require(1305) /* metro dependency 1305: native */).HelpMessageTypes.WARNING}>{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['5f3HIC'])}</HelpMessage>)((require(1305) /* metro dependency 1305: native */).HelpMessage)}</View>;
if (property2 === '') {
var r7Props = {...value2};
r7Props['estimatedItemSize'] = env0_20;
r7Props['extraData'] = pendingAdditions;
r7Props['data'] = items3;
object4 = {};
space = (importDefault(697) /* metro dependency 697: native */).space;
PX_16 = space.PX_16;
object4.paddingHorizontal = PX_16;
space = (importDefault(697) /* metro dependency 697: native */).space;
PX_16 = space.PX_16;
object4.paddingBottom = PX_16 + insets.bottom;
r7Props['contentContainerStyle'] = object4;
r7Props['renderItem'] = AddMembersBodyRenderRow;
r7Props['keyboardShouldPersistTaps'] = 'handled';
r5 = ((Component) => <Component {...r7Props} />)(r7);
} else if (value !== r13.length) {
var r7Props = {...value2};
r7Props['estimatedItemSize'] = env0_20;
r7Props['extraData'] = pendingAdditions;
r7Props['data'] = items3;
object4 = {};
space = (importDefault(697) /* metro dependency 697: native */).space;
PX_16 = space.PX_16;
object4.paddingHorizontal = PX_16;
space = (importDefault(697) /* metro dependency 697: native */).space;
PX_16 = space.PX_16;
object4.paddingBottom = PX_16 + insets.bottom;
r7Props['contentContainerStyle'] = object4;
r7Props['renderItem'] = AddMembersBodyRenderRow;
r7Props['keyboardShouldPersistTaps'] = 'handled';
r5 = ((Component) => <Component {...r7Props} />)(r7);
} else if (value === membersRows.length) {
var r8Props = {...value2};
EmptyState = (require(1305) /* metro dependency 1305: native */).EmptyState;
value = <EmptyState Illustration={(require(9105) /* metro dependency 9105: NoResultsAlt */).NoResultsAlt} style={styles.emptyState} bodyStyle={styles.emptyStateText} body={intl.format((require(1244) /* metro dependency 1244: indexNative */).t.ErpIY3,
{query: property2})} />;
value = ((Component) => <Component {...r8Props}>{value}</Component>)(r8);
r5 = value;
} else {
var r7Props = {...value2};
r7Props['estimatedItemSize'] = env0_20;
r7Props['extraData'] = pendingAdditions;
r7Props['data'] = items3;
object4 = {};
space = (importDefault(697) /* metro dependency 697: native */).space;
PX_16 = space.PX_16;
object4.paddingHorizontal = PX_16;
space = (importDefault(697) /* metro dependency 697: native */).space;
PX_16 = space.PX_16;
object4.paddingBottom = PX_16 + insets.bottom;
r7Props['contentContainerStyle'] = object4;
r7Props['renderItem'] = AddMembersBodyRenderRow;
r7Props['keyboardShouldPersistTaps'] = 'handled';
r5 = ((Component) => <Component {...r7Props} />)(r7);
}
return (
<>
{view}
{r20}
{r5}
</>
);
}
function AddMembersActionSheet({channel, canSkip}) { // fn#71158, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9280:4626, offset: 0x01d16f6b, size: 671 bytes, params: 2, frame: 34
var r10;
var object;
var object5;
const styles = useStyles();
const [property, property2] = env0_6(env0_7.useState({}), 2);
const guild = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildStore], _fun71163);
const r16 = (importDefault(4805) /* metro dependency 4805: useChannelName */)(channel, true) ?? '';
if (guild == null) {
return null;
}
const Object = global.Object;
const value6 = Object.keys(property).length === 0;
const BottomSheet = (require(6275) /* metro dependency 6275: BottomSheetNative */).BottomSheet;
const BottomSheetTitleHeader = (require(6758) /* metro dependency 6758: BottomSheetTitleHeaderNative */).BottomSheetTitleHeader;
const object6 = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object6.title = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.dMJ3Y6);
object6.subtitle = r16;
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
if (canSkip) {
if (value6) {
object5 = {size: 'sm'};
object5.text = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['5Wxrcd']);
object5.onPress = onPress_71164;
object5.variant = 'secondary';
r10 = object5;
} else {
object = {size: 'sm'};
object.text = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.OYkgVk);
object.onPress = function() {
return _handleAddPressed.apply(this, arguments);
};
object.variant = value6 ? 'secondary' : 'primary';
object.disabled = value6;
r10 = object;
}
} else {
object = {size: 'sm'};
object.text = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.OYkgVk);
object.onPress = onPress_71165;
object.variant = value6 ? 'secondary' : 'primary';
object.disabled = value6;
r10 = object;
}
object6.trailing = <Button {...r10} />;
return (
<BottomSheet
scrollable
header={<BottomSheetTitleHeader {...object6} />}
startExpanded
>
<View style={styles.container}>
<AddMembersBody
channel={channel}
guild={guild}
permission={channel.accessPermissions}
pendingAdditions={property}
setPendingAdditions={property2}
inActionSheet
/>
</View>
</BottomSheet>
);
}
function AddMembersBodyFilterByQuery(a0) { // fn#71146, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9280:1632, owner: AddMembersBody.filterByQuery, offset: 0x01d16a4a, size: 134 bytes, params: 2, frame: 16
let value = AddMembersBodyGetQuery(env0_6.trim(), env0_4);
const RegExp = global.RegExp;
value = (importDefault(4100) /* metro dependency 4100: RegexUtils */).escape(value);
value = '' + value;
const value4 = Object.create(RegExp.prototype, {constructor: {value: RegExp}});
const regExp = new RegExp(value, 'i');
return (regExp instanceof Object ? regExp : value4).test(a0);
}
function _fun71149() { // fn#71149, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9280:2092, offset: 0x01d16b10, size: 126 bytes, params: 1, frame: 18
var value2;
var AccessibilityAnnouncer;
var announce;
var intl;
if (env0_6 !== '') {
value2 = environment.__proto__;
AccessibilityAnnouncer = (require(3869) /* metro dependency 3869: AccessibilityAnnouncerAndroid */).AccessibilityAnnouncer;
announce = AccessibilityAnnouncer.announce;
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
Reflect.apply(announce, AccessibilityAnnouncer,
[intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.ZGVL3g,
{count: env0_8}),
'polite']);
}
}
function AddMembersBodyOnChangeText(a0) { // fn#71151, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9280:2955, owner: AddMembersBody.onChangeText, offset: 0x01d16bb6, size: 118 bytes, params: 2, frame: 20
let value = a0.trim();
const value3 = value.charAt(0) === '@';
const defaultImport = importDefault(6592) /* metro dependency 6592: GuildUtils */;
const requestMembers = defaultImport.requestMembers;
const id = guild.id;
value = AddMembersBodyGetQuery(value, value3);
Reflect.apply(requestMembers, defaultImport, [id, value, MEMBER_REQUEST_COUNT]);
env0_7(a0);
env0_5(value3);
}
function AddMembersBodyOnRemove(a0) { // fn#71152, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9280:3069, owner: AddMembersBody.onRemove, offset: 0x01d16c2c, size: 58 bytes, params: 2, frame: 13
const Object = global.Object;
const env0_0 = Object.keys(pendingAdditions)[a0];
setPendingAdditions(_fun71153);
}
function AddMembersBodyRenderRow({item, index}) { // fn#71154, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9280:3719, owner: AddMembersBody.renderRow, offset: 0x01d16c9b, size: 256 bytes, params: 2, frame: 20
var environment;
var r8;
var r0;
var value;
var ChannelOverwritesCheckboxItem;
var object2;
if (typeof item === 'string') {
value = environment.__proto__;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
value = <Text style={styles.sectionRowWrapper} maxFontSizeMultiplier={2} accessibilityRole="header" variant="text-sm/semibold" color="interactive-text-default">{item}</Text>;
r0 = value;
} else {
value = environment.__proto__;
ChannelOverwritesCheckboxItem = (require(9096) /* metro dependency 9096: ChannelOverwritesItem */).ChannelOverwritesCheckboxItem;
object2 = {};
r8 = env0_9 === index || env0_11 === index;
object2.start = r8;
r8 = env0_10 === index || env0_12 === index;
object2.end = r8;
object2.item = item;
object2.guildId = guild.id;
object2.onPress = function() {
_fun71156(item);
};
value = getFullRowId(item);
object2.checked = value in pendingAdditions;
value = <ChannelOverwritesCheckboxItem {...object2} />;
r0 = value;
}
return r0;
}
function _handleAddPressed() { // fn#71159, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9280:4872, owner: AddMembersActionSheet._handleAddPressed, offset: 0x01d1720a, size: 53 bytes, params: 1, frame: 13
var environment;
const value = environment.__proto__;
return env1_4(_fun71161).apply(this, arguments);
}
function _fun71163() { // fn#71163, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9280:4768, offset: 0x01d1741a, size: 52 bytes, params: 1, frame: 13
const value = environment.__proto__;
return GuildStore.getGuild(channel?.getGuildId());
}
function AddMembersActionSheetOnPress() { // fn#71164, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9280:5628, owner: AddMembersActionSheet.onPress, offset: 0x01d1744e, size: 37 bytes, params: 1, frame: 11
const value = environment.__proto__;
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
}
function _fun71153(a0) { // fn#71153, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9280:3108, offset: 0x01d16c66, size: 53 bytes, params: 2, frame: 14
const binding = env0_0;
a0[binding];
const value = environment.__proto__.__proto__;
const binding2 = env2_5;
const items2 = [binding];
return binding2(a0, items2.map(_toPropertyKey_71142));
}
function renderRowOnPress() { // fn#71155, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9280:4056, owner: AddMembersBody.renderRow.onPress, offset: 0x01d16d9b, size: 25 bytes, params: 1, frame: 11
onPressUpdatePendingAdditions(item);
}
function* _fun71161() { // fn#71161, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9280:4929, offset: 0x01d1724a, size: 212 bytes, params: 1, frame: 18
var environment;
var binding;
var binding2;
var property;
var value5;
var savePermissionUpdates;
var id;
var value6;
var binding3;
var memberOrRoleAddedToast;
var binding4;
var hideActionSheet;
var error;
if (true) {
var items2 = [];
var env0_1 = 0;
var env0_2 = 0;
var Object = global.Object;
var values = Object.values;
value = environment.__proto__.__proto__;
Reflect.apply(values, Object, [importDefault]).forEach(_fun71162);
try {
binding = env3_0;
} catch (error) {
return undefined;
}
try {
binding2 = env3_3;
} catch (error) {
return undefined;
}
try {
property = binding2[32];
} catch (error) {
return undefined;
}
try {
value5 = binding(property);
} catch (error) {
return undefined;
}
try {
savePermissionUpdates = value5.savePermissionUpdates;
} catch (error) {
return undefined;
}
try {
} catch (error) {
return undefined;
}
try {
id = require.id;
} catch (error) {
return undefined;
}
try {
value = Reflect.apply(savePermissionUpdates, value5, [id, items2]);
} catch (error) {
return undefined;
}
yield value;
try {
value = undefined;
value6 = false;
} catch (error) {
return undefined;
}
if (value6) {
return value;
}
try {
binding = env3_0;
} catch (error) {
return undefined;
}
try {
binding3 = env3_3;
} catch (error) {
return undefined;
}
try {
property = binding3[33];
} catch (error) {
return undefined;
}
try {
value = binding(property);
} catch (error) {
return undefined;
}
try {
memberOrRoleAddedToast = value.memberOrRoleAddedToast;
} catch (error) {
return undefined;
}
try {
binding = env0_2;
} catch (error) {
return undefined;
}
try {
binding4 = env0_1;
} catch (error) {
return undefined;
}
try {
Reflect.apply(memberOrRoleAddedToast, value, [binding, binding4]);
} catch (error) {
return undefined;
}
try {
binding = env3_1;
} catch (error) {
return undefined;
}
try {
property = binding3[34];
} catch (error) {
return undefined;
}
try {
value = binding(property);
} catch (error) {
return undefined;
}
try {
hideActionSheet = value.hideActionSheet;
} catch (error) {
return undefined;
}
try {
Reflect.apply(hideActionSheet, value, []);
} catch (error) {
}
}
}
function onPressUpdatePendingAdditions(a0) { // fn#71156, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9280:4060, owner: AddMembersBody.renderRow.onPress.updatePendingAdditions, offset: 0x01d16db4, size: 57 bytes, params: 2, frame: 11
var environment;
const env0_0 = a0;
const rowType = a0.rowType;
const EMPTY_STATE = RowType.EMPTY_STATE;
if (rowType !== EMPTY_STATE) {
value = environment.__proto__.__proto__;
setPendingAdditions(_fun71157);
}
}
function _fun71162({row}) { // fn#71162, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9280:4984, offset: 0x01d1731e, size: 252 bytes, params: 2, frame: 17
var rowType;
var binding;
var push;
var permissionOverwriteForUser;
var value3;
var permissionOverwriteForRole;
var value5;
let id = row.id;
let value = id != null;
if (value && row.id !== '') {
rowType = row.rowType;
value = environment.__proto__.__proto__.__proto__.__proto__;
if (rowType === env4_14.ROLE) {
binding = env0_2;
env0_2 = typeof binding === 'bigint' ? binding + 1n : +binding + 1;
binding = env0_0;
push = binding.push;
value = env4_0(env4_3[31]);
permissionOverwriteForRole = value.permissionOverwriteForRole;
id = row.id;
value5 = environment.__proto__.__proto__.__proto__;
Reflect.apply(push, binding, [Reflect.apply(permissionOverwriteForRole, value, [id, require.type])]);
} else if (row.rowType === env4_14.MEMBER) {
binding = env0_1;
env0_1 = typeof binding === 'bigint' ? binding + 1n : +binding + 1;
binding = env0_0;
push = binding.push;
value = env4_0(env4_3[31]);
permissionOverwriteForUser = value.permissionOverwriteForUser;
id = row.id;
value3 = environment.__proto__.__proto__.__proto__;
Reflect.apply(push, binding, [Reflect.apply(permissionOverwriteForUser, value, [id, require.type])]);
}
}
}
function _fun71157(a0) { // fn#71157, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9280:4125, offset: 0x01d16ded, size: 382 bytes, params: 2, frame: 21
var r4;
var rowType;
var value5;
var object5;
const Avatar = (require(1305) /* metro dependency 1305: native */).Avatar;
var object6;
var tagAvatar;
var object7;
var binding;
const object8 = {};
copyDataProperties(object8, a0, undefined);
const getFullRowIdBinding = getFullRowId;
const value3 = undefined;
const fullRowIdBinding = getFullRowIdBinding(env0_0);
if (fullRowIdBinding in object8) {
delete object8[fullRowIdBinding];
} else {
rowType = env0_0.rowType;
if (RowType.ROLE === rowType) {
object7 = {};
binding = env0_0;
object7.text = binding.name;
value = environment.__proto__.__proto__.__proto__;
object7.icon = <View style={[styles.tagRoleColor, {backgroundColor: binding.colorString}]} />;
r4 = object7;
} else if (RowType.ADMINISTRATOR === rowType) {
object7 = {};
binding = env0_0;
object7.text = binding.name;
value = environment.__proto__.__proto__.__proto__;
object7.icon = <View style={[styles.tagRoleColor, {backgroundColor: binding.colorString}]} />;
r4 = object7;
} else if (RowType.MEMBER === rowType) {
value5 = UserStore.getUser(env0_0.id);
if (value5 != null) {
object5 = {};
object5.text = env0_0.name;
object6 = {user: value5};
value = environment.__proto__.__proto__.__proto__;
object6.guildId = guild.id;
tagAvatar = styles.tagAvatar;
object6.avatarStyle = tagAvatar;
tagAvatar = styles.tagAvatar;
object6.style = tagAvatar;
object5.icon = <Avatar {...object6} />;
r4 = object5;
} else {
r4 = value3;
}
} else if (RowType.OWNER !== rowType) {
r4 = value3;
} else {
value5 = UserStore.getUser(env0_0.id);
if (value5 != null) {
object5 = {};
object5.text = env0_0.name;
object6 = {user: value5};
value = environment.__proto__.__proto__.__proto__;
object6.guildId = guild.id;
tagAvatar = styles.tagAvatar;
object6.avatarStyle = tagAvatar;
tagAvatar = styles.tagAvatar;
object6.style = tagAvatar;
object5.icon = <Avatar {...object6} />;
r4 = object5;
} else {
r4 = value3;
}
}
if (r4 != null) {
object8[fullRowIdBinding] = {display: r4, row: env0_0};
}
}
return object8;
}
@@ -0,0 +1,168 @@
/* Metro module 11393; source: modules/channel_permissions/native/action_sheets/ChannelMembersActionSheet.tsx; dependencies: [31, 27, 1379, 1945, 1938, 1867, 3784, 661, 33, 4501, 697, 1585, 566, 1484, 4805, 9088, 1244, 6275, 6758, 5278, 4080, 8148, 11394, 7002, 7975, 11392, 10859, 1305, 6277, 9096, 4573, 2] */
function _fun87312(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#87312, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11579:6, offset: 0x01fb7f26, size: 380 bytes, params: 8, frame: 21
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;
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 guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
const permissionStore = importDefault(3784) /* metro dependency 3784: PermissionStore */;
let value = require(661) /* metro dependency 661: Constants */;
const env0_9 = value.ChannelSettingsSections;
const env0_10 = value.Permissions;
value = require(33) /* metro dependency 33 */;
const env0_11 = value.jsx;
const env0_12 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
const env0_13 = Reflect.apply(createStyles, value, [{container: {'paddingHorizontal': 16, 'flex': 1},
sectionRowWrapper: {paddingVertical: PX_12}, warning: {'margin': 16, 'marginBottom': 0}}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/channel_permissions/native/action_sheets/ChannelMembersActionSheet.tsx');
exports.default = ChannelMembersActionSheet;
}
function ChannelMembersActionSheet({channelId, guildId}) { // fn#87313, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11579:531, offset: 0x01fb80a2, size: 1293 bytes, params: 2, frame: 34
var r7;
var r9;
var PressableOpacity;
var object5;
const styles = useStyles();
const value2 = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)();
const channel = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], function() {
return ChannelStore.getChannel(channelId);
});
const {guild,
sortedGuildRoles} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([GuildStore,
GuildRoleStore], _fun87315, [channel]);
const value4 = (require(566) /* metro dependency 566: flux */).useStateFromStoresArray([GuildMemberStore],
_fun87316, [channel]);
const env0_4 = (require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation();
const value5 = (importDefault(4805) /* metro dependency 4805: useChannelName */)(channel);
if (channel == null) {
return null;
}
if (guild == null) {
return null;
}
if (sortedGuildRoles == null) {
return null;
}
const can = PermissionStore.can;
const MANAGE_ROLES = Permissions.MANAGE_ROLES;
const value6 = Reflect.apply(can, PermissionStore, [MANAGE_ROLES, channel]);
const existingRolesRows = (require(9088) /* metro dependency 9088: ChannelPermissionsUtils */).getExistingRolesRows(guild,
sortedGuildRoles, channel, channel.accessPermissions);
const existingMembersRows = (require(9088) /* metro dependency 9088: ChannelPermissionsUtils */).getExistingMembersRows(value4,
channel, guild, channel.accessPermissions);
items2 = [];
let push = items2.push;
const object4 = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
object4.title = Reflect.apply(string, intl, [(require(1244) /* metro dependency 1244: indexNative */).t['LPJmL/']]);
object4.data = existingRolesRows;
Reflect.apply(push, items2, [object4]);
push = items2.push;
const object6 = {};
object6.title = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['9Oq93m']);
object6.data = existingMembersRows;
Reflect.apply(push, items2, [object6]);
const BottomSheet = (require(6275) /* metro dependency 6275: BottomSheetNative */).BottomSheet;
const object7 = {'scrollable': true, 'header': null, 'startExpanded': true};
const BottomSheetTitleHeader = (require(6758) /* metro dependency 6758: BottomSheetTitleHeaderNative */).BottomSheetTitleHeader;
string = intl.string;
const ES4CC6 = (require(1244) /* metro dependency 1244: indexNative */).t.ES4CC6;
if (value6) {
PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
r7 = <PressableOpacity onPress={onPress_87317} accessibilityRole="button" accessibilityLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.XPDhcc)}>{((SettingsIcon) => <SettingsIcon />)((require(7002) /* metro dependency 7002: SettingsIcon */).SettingsIcon)}</PressableOpacity>;
} else {
r7 = value6;
}
object7.header = <BottomSheetTitleHeader title={Reflect.apply(string, intl,
[ES4CC6])} subtitle={'#' + value5} trailing={r7} />;
if (value6) {
const RowButton = (require(7975) /* metro dependency 7975: RowButtonNative */).RowButton;
r9 = <RowButton label={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.dMJ3Y6)} onPress={onPress_87318} icon={((GroupPlusIcon) => <GroupPlusIcon />)((require(10859) /* metro dependency 10859: GroupPlusIcon */).GroupPlusIcon)} />;
} else {
r9 = <View style={styles.warning}>{((HelpMessage) => <HelpMessage messageType={(require(1305) /* metro dependency 1305: native */).HelpMessageTypes.INFO}>{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.VOuiSj)}</HelpMessage>)((require(1305) /* metro dependency 1305: native */).HelpMessage)}</View>;
}
const BottomSheetSectionList = (require(6277) /* metro dependency 6277 */).BottomSheetSectionList;
const bottom = value2.bottom;
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
return (
<BottomSheet {...object7}>
<View style={styles.container}>
{r9}
<BottomSheetSectionList
contentContainerStyle={{paddingBottom: bottom + PX_16}}
renderItem={renderItem_87319}
renderSectionHeader={renderSectionHeader_87320}
sections={items2}
stickySectionHeadersEnabled={false}
/>
</View>
</BottomSheet>
);
}
function _fun87315() { // fn#87315, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11579:714, offset: 0x01fb85af, size: 92 bytes, params: 1, frame: 16
const value = environment.__proto__;
const getGuild = GuildStore.getGuild;
const channelBinding = channel;
const value3 = undefined;
const value5 = Reflect.apply(getGuild, GuildStore, [channelBinding == null ? value3 : channel.getGuildId()]);
return {guild: value5, sortedGuildRoles: value5 != null ? GuildRoleStore.getSortedRoles(value5.id) : value3};
}
function _fun87316() { // fn#87316, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11579:916, offset: 0x01fb860b, size: 52 bytes, params: 1, frame: 13
const value = environment.__proto__;
return GuildMemberStore.getMemberIds(channel?.getGuildId());
}
function ChannelMembersActionSheetOnPress() { // fn#87317, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11579:1540, owner: ChannelMembersActionSheet.onPress, offset: 0x01fb863f, size: 119 bytes, params: 1, frame: 18
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
const defaultImport2 = importDefault(8148) /* metro dependency 8148: ChannelSettingsActionCreators */;
const init = defaultImport2.init;
const channelIdBinding = channelId;
Reflect.apply(init, defaultImport2, [channelIdBinding]);
const channelDetailsUtilsModule = require(11394) /* metro dependency 11394: ChannelDetailsUtils */;
const navigateToChannelDetailsScreen = channelDetailsUtilsModule.navigateToChannelDetailsScreen;
const binding = env0_4;
const PERMISSIONS = ChannelSettingsSections.PERMISSIONS;
Reflect.apply(navigateToChannelDetailsScreen, channelDetailsUtilsModule, [binding, PERMISSIONS, channelIdBinding,
'channel-members-action-sheet']);
}
function ChannelMembersActionSheetOnPress_87318() { // fn#87318, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11579:1950, owner: ChannelMembersActionSheet.onPress, offset: 0x01fb86b6, size: 45 bytes, params: 1, frame: 11
let value = environment.__proto__;
value = require(11392) /* metro dependency 11392: ChannelPermissionsUtils */;
return value.openAddMembersActionSheet(channel);
}
function ChannelMembersActionSheetRenderItem({item, index, section}) { // fn#87319, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11579:2292, owner: ChannelMembersActionSheet.renderItem, offset: 0x01fb86e3, size: 132 bytes, params: 2, frame: 17
const value = environment.__proto__;
return ((Component) => <Component start={index === 0} end={index === section.data.length - 1} guildId={guildId} item={item} channelId={channelId} showType showRemove={env0_5} />)(importDefault(9096) /* metro dependency 9096: ChannelOverwritesItem */);
}
function ChannelMembersActionSheetRenderSectionHeader(a0) { // fn#87320, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11579:2461, owner: ChannelMembersActionSheet.renderSectionHeader, offset: 0x01fb8767, size: 165 bytes, params: 2, frame: 20
const {title, data} = a0.section;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
return (
<Text
style={styles.sectionRowWrapper}
maxFontSizeMultiplier={2}
accessibilityRole="header"
variant="text-sm/semibold"
color="interactive-text-default"
>
{intl.format((require(1244) /* metro dependency 1244: indexNative */).t.u8CWLl, {numberOfItems: data.length,
sectionTitle: title})}
</Text>
);
}
@@ -0,0 +1,151 @@
/* Metro module 11929; source: modules/channel_permissions/native/components/ChannelAccessInfo.tsx; dependencies: [31, 27, 1422, 1945, 1938, 33, 4501, 697, 1244, 566, 9088, 1360, 4573, 5278, 11392, 1305, 11928, 6699, 9099, 9097, 10787, 2] */
function _fun91525(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#91525, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12115:6, offset: 0x02068d4b, size: 459 bytes, params: 8, frame: 25
var object3;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(27) /* metro dependency 27 */).View;
const env0_5 = (require(1422) /* metro dependency 1422: GuildRecord */).isGuildOwner;
const guildMemberStore = importDefault(1945) /* metro dependency 1945: GuildMemberStore */;
const guildRoleStore = importDefault(1938) /* metro dependency 1938: GuildRoleStore */;
let value = require(33) /* metro dependency 33 */;
const env0_8 = value.jsx;
const env0_9 = value.jsxs;
const env0_10 = value.Fragment;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
const object4 = {'alignItems': 'center', 'backgroundColor': null, 'borderRadius': null, 'color': null,
'flexDirection': 'row', 'marginBottom': 8, 'marginTop': 8, 'padding': 16};
const BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
object4.backgroundColor = BACKGROUND_SURFACE_HIGH;
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
const TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_DEFAULT;
object4.color = TEXT_DEFAULT;
const env0_11 = Reflect.apply(createStyles, value, [{section: object4, sectionContent: {'alignItems': 'center',
'flexDirection': 'row', 'flexGrow': 1}, avatar: {marginRight: 8}, labelDetail: {marginRight: 12},
sectionIcon: {marginRight: 6}}]);
object3 = {MEMBERS: 0};
object3[0] = 'MEMBERS';
object3.ROLES = 1;
object3[1] = 'ROLES';
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/channel_permissions/native/components/ChannelAccessInfo.tsx');
exports.default = ChannelAccessInfo;
}
function ChannelAccessInfo({guild, channel}) { // fn#91526, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12115:780, offset: 0x02068f16, size: 984 bytes, params: 2, frame: 37
var object;
var binding;
var MEMBERS;
var items3;
var ROLES;
var items4;
var items5;
const closure = renderCounts;
const styles = useStyles();
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const value3 = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.li1wKf);
const value4 = (require(566) /* metro dependency 566: flux */).useStateFromStoresArray([GuildRoleStore], _fun91528,
[guild, channel]);
const existingMembers = (require(9088) /* metro dependency 9088: ChannelPermissionsUtils */).getExistingMembers(GuildMemberStore.getMemberIds(guild?.id),
channel, guild, channel.accessPermissions);
let length = value4.length;
const r22 = length === 0 && existingMembers.length === 1 && isGuildOwner(guild,
existingMembers[0]) ? existingMembers[0] : null;
const jsxRuntimeEnv0_10Binding = jsxRuntimeEnv0_10;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const text = <Text variant="eyebrow">{value3}</Text>;
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
const pressableOpacityProps = {accessibilityLabel: value3, accessibilityRole: 'button', onPress: onPress_91529,
style: styles.section};
if (r22 != null) {
items4 = [((Avatar) => <Avatar style={styles.avatar} user={r22} guildId={guild.id} size={(require(1305) /* metro dependency 1305: native */).AvatarSizes.XSMALL} />)((require(1305) /* metro dependency 1305: native */).Avatar)];
items5 = [<Text variant="text-sm/semibold">{r22.tag}</Text>];
items5[1] = <Text variant="text-xs/medium">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.rt0ERW)}</Text>;
items4[1] = <View>{items5}</View>;
object = {children: items4};
} else {
binding = env0_12;
MEMBERS = binding.MEMBERS;
length = existingMembers.length;
importDefault(11928) /* metro dependency 11928 */;
items3 = [closure(MEMBERS, length, undefined,
(require(6699) /* metro dependency 6699: GroupIcon */).GroupIcon)];
ROLES = binding.ROLES;
length = value4.length;
importDefault(9099) /* metro dependency 9099 */;
items3[1] = closure(ROLES, length, undefined,
(require(9097) /* metro dependency 9097: ShieldUserIcon */).ShieldUserIcon);
object = {children: items3};
}
const view = <View style={styles.sectionContent}>{((Fragment) => <Fragment {...object} />)(jsxRuntimeEnv0_10Binding)}</View>;
const Icon = (require(1305) /* metro dependency 1305: native */).Icon;
const iconProps = {source: importDefault(10787) /* metro dependency 10787 */};
const Icon2 = (require(1305) /* metro dependency 1305: native */).Icon;
const Sizes = Icon2.Sizes;
const SMALL = Sizes.SMALL;
iconProps.size = SMALL;
return (
<>
{text}
<PressableOpacity {...pressableOpacityProps}>
{view}
<Icon {...iconProps} />
</PressableOpacity>
</>
);
}
function renderCounts(a0, a1, a2, a3) { // fn#91527, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12115:1105, owner: ChannelAccessInfo.renderCounts, offset: 0x020692ee, size: 529 bytes, params: 5, frame: 20
var r8;
var value2;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
if (a1 === 0) {
return null;
}
const MEMBERS = env1_12.MEMBERS;
if (MEMBERS === a0) {
r8 = a1 > 100 ? intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.PR5l07,
{count: 100}) : intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.bu5sya,
{count: a1});
} else if (env1_12.ROLES === a0) {
r8 = a1 > 100 ? intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t['+OYnFQ'],
{count: 100}) : intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.T2BEtm,
{count: a1});
} else {
value2 = undefined;
(require(1360) /* metro dependency 1360: GlobalUtils */).assertNever(a0);
r8 = value2;
}
const Fragment = env1_3.Fragment;
const value8 = ((Component) => <Component size="sm" style={styles.sectionIcon} />)(a3);
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<Fragment>
{value8}
<Text style={styles.labelDetail} variant="text-sm/medium">
{r8}
</Text>
</Fragment>
);
}
function _fun91528() { // fn#91528, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12115:917, offset: 0x020694ff, size: 83 bytes, params: 1, frame: 18
let value = environment.__proto__;
const channelPermissionsUtilsModule = require(9088) /* metro dependency 9088: ChannelPermissionsUtils */;
const getExistingRoles = channelPermissionsUtilsModule.getExistingRoles;
const guildBinding = guild;
value = GuildRoleStore.getSortedRoles(guildBinding.id);
const channelBinding = channel;
return Reflect.apply(getExistingRoles, channelPermissionsUtilsModule, [guildBinding, value, channelBinding,
channelBinding.accessPermissions]);
}
function ChannelAccessInfoOnPress() { // fn#91529, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12115:1853, owner: ChannelAccessInfo.onPress, offset: 0x02069552, size: 56 bytes, params: 1, frame: 14
let value = environment.__proto__;
value = require(11392) /* metro dependency 11392: ChannelPermissionsUtils */;
const openChannelMembersActionSheet = value.openChannelMembersActionSheet;
const channelBinding = channel;
Reflect.apply(openChannelMembersActionSheet, value, [channelBinding.id, channelBinding.guild_id]);
}
@@ -0,0 +1,205 @@
/* Metro module 9096; source: modules/channel_permissions/native/components/ChannelOverwritesItem.tsx; dependencies: [31, 27, 1878, 8120, 33, 4501, 4500, 1244, 4603, 3856, 5278, 6988, 6238, 9097, 9088, 4573, 1305, 9098, 9099, 3874, 7974, 2] */
function _fun71166(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#71166, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9281:6, offset: 0x01d17473, size: 393 bytes, params: 8, frame: 22
const env0_0 = require;
const closure = ChannelOverwritesItem;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_4 = (require(27) /* metro dependency 27 */).View;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const env0_6 = (require(8120) /* metro dependency 8120: ChannelPermissionsConstants */).RowType;
const value = require(33) /* metro dependency 33 */;
const env0_7 = value.jsx;
const env0_8 = value.jsxs;
const env0_9 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({nameWrapper: {'flexDirection': 'row',
'alignItems': 'flex-end', 'marginRight': 16}, name: {paddingRight: 4}, memberName: {flexShrink: 1},
ownerIcon: {alignSelf: 'center'}, roleIcon: {'height': 30, 'width': 30}, rowRemoveIconDisabled: {opacity: 0.3}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/channel_permissions/native/components/ChannelOverwritesItem.tsx');
exports.default = closure;
exports.ChannelOverwritesCheckboxItem = ChannelOverwritesCheckboxItem;
}
function RemoveIcon({item, channelId, onRemove}) { // fn#71167, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9281:415, offset: 0x01d175fc, size: 231 bytes, params: 2, frame: 23
var r0;
var PressableOpacity;
var object2;
var disabled;
var intl;
var CircleXIcon;
const styles = useStyles();
if (channelId == null) {
r0 = null;
} else {
PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
object2 = {};
disabled = item.disabled;
object2.disabled = disabled;
object2.accessibilityRole = 'button';
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object2.accessibilityLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.N86XcP);
object2.onPress = function() {
var itemBinding;
if (onRemove != null) {
return onRemove(item);
}
itemBinding = item;
_fun71169(itemBinding.id, itemBinding.name, channelId);
};
CircleXIcon = (require(6988) /* metro dependency 6988: CircleXIcon */).CircleXIcon;
disabled = item.disabled;
r0 = <PressableOpacity {...object2}><CircleXIcon style={disabled ? styles.rowRemoveIconDisabled : undefined} /></PressableOpacity>;
}
return r0;
}
function RoleItem_71172({disabled, item, subLabel, channelId, showType, showRemove, start, end, trailing, onPress, accessibilityRole, accessibilityState, accessible}) { // fn#71172, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9281:1122, offset: 0x01d1789b, size: 285 bytes, params: 2, frame: 31
var r16;
var moduleValue;
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
const object2 = {};
const ShieldUserIcon = (require(9097) /* metro dependency 9097: ShieldUserIcon */).ShieldUserIcon;
object2.icon = <ShieldUserIcon size="lg" color={item.colorString} />;
object2.label = item.name;
if (showType) {
moduleValue = importAll(9088) /* metro dependency 9088: ChannelPermissionsUtils */;
r16 = moduleValue.getRowTypeLabel(item.rowType);
} else {
r16 = subLabel;
}
object2.subLabel = r16;
object2.start = start;
object2.end = end;
object2.trailing = showRemove ? <RemoveIcon item={item} channelId={channelId} /> : trailing;
object2.onPress = onPress;
object2.disabled = disabled;
object2.accessibilityRole = accessibilityRole;
object2.accessibilityState = accessibilityState;
object2.accessible = accessible;
return <TableRow {...object2} />;
}
function MemberItem({item, channelId, showRemove, onRemove, guildId, start, end, trailing, onPress, disabled, accessibilityRole, accessibilityState, accessible}) { // fn#71173, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9281:1590, offset: 0x01d179b8, size: 574 bytes, params: 2, frame: 37
var object2;
const styles = useStyles();
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const text = <Text style={[styles.name,
styles.memberName]} lineClamp={1} variant="text-md/semibold" color="interactive-text-active">{item.name}</Text>;
const rowType = item.rowType;
const OWNER = RowType.OWNER;
const view = <View style={styles.nameWrapper}>{text}{rowType !== OWNER ? null : ((Icon) => <Icon size={(require(1305) /* metro dependency 1305: native */).Icon.Sizes.REFRESH_SMALL_16} source={importDefault(9098) /* metro dependency 9098 */} disableColor style={styles.ownerIcon} />)((require(1305) /* metro dependency 1305: native */).Icon)}</View>;
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
object2 = {};
const Avatar = (require(1305) /* metro dependency 1305: native */).Avatar;
const avatarSource = UserStore.getUser(item.id)?.getAvatarSource(guildId);
const AvatarSizes = (require(1305) /* metro dependency 1305: native */).AvatarSizes;
const SMALL = AvatarSizes.SMALL;
object2.icon = <Avatar source={avatarSource} size={SMALL} />;
object2.label = view;
const username = item.username;
object2.subLabel = username;
object2.start = start;
object2.end = end;
object2.trailing = showRemove ? <RemoveIcon item={item} channelId={channelId} onRemove={onRemove} /> : trailing;
object2.onPress = onPress;
object2.disabled = disabled;
object2.accessibilityRole = accessibilityRole;
object2.accessibilityState = accessibilityState;
object2.accessible = accessible;
return <TableRow {...object2} />;
}
function EmptyRoleItem({item}) { // fn#71174, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9281:2413, offset: 0x01d17bf6, size: 168 bytes, params: 2, frame: 23
const styles = useStyles();
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
const Icon = (require(1305) /* metro dependency 1305: native */).Icon;
const iconProps = {source: importDefault(9099) /* metro dependency 9099 */, color: item.colorString};
const IconSizes = (require(1305) /* metro dependency 1305: native */).IconSizes;
const MEDIUM = IconSizes.MEDIUM;
iconProps.size = MEDIUM;
iconProps.style = styles.roleIcon;
return <TableRow icon={<Icon {...iconProps} />} label={item.name} />;
}
function ChannelOverwritesItem(a0) { // fn#71175, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9281:2607, offset: 0x01d17c9e, size: 217 bytes, params: 2, frame: 17
const item = a0.item;
const value = Object.create(null);
value.item = 0;
const value2 = copyDataProperties({}, a0, value, undefined);
const rowType = item.rowType;
const ADMINISTRATOR = RowType.ADMINISTRATOR;
if (ADMINISTRATOR === rowType) {
return <RoleItem_71172 item={item} {...value2} />;
}
const ROLE = RowType.ROLE;
if (ROLE === rowType) {
return <RoleItem_71172 item={item} {...value2} />;
}
const OWNER = RowType.OWNER;
if (OWNER === rowType) {
return <MemberItem item={item} {...value2} />;
}
const MEMBER = RowType.MEMBER;
if (MEMBER === rowType) {
return <MemberItem item={item} {...value2} />;
}
const EMPTY_STATE = RowType.EMPTY_STATE;
if (EMPTY_STATE === rowType) {
return <EmptyRoleItem item={item} {...value2} />;
}
return null;
}
function ChannelOverwritesCheckboxItem(a0) { // fn#71176, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9281:3055, offset: 0x01d17d77, size: 185 bytes, params: 2, frame: 22
const checked = a0.checked;
const value = Object.create(null);
value.checked = 0;
const value2 = copyDataProperties({}, a0, value, undefined);
const {accessibilityRole,
accessibilityState} = (require(3874) /* metro dependency 3874: useA11yRolesNative */).useCheckboxA11yNative({checked: checked});
const channelOverwritesItemBindingProps = {...value2};
channelOverwritesItemBindingProps['accessible'] = true;
channelOverwritesItemBindingProps['accessibilityRole'] = accessibilityRole;
channelOverwritesItemBindingProps['accessibilityState'] = accessibilityState;
const FormCheckbox = (require(7974) /* metro dependency 7974: FormCheckboxNative */).FormCheckbox;
channelOverwritesItemBindingProps['trailing'] = <FormCheckbox checked={checked} />;
return <ChannelOverwritesItem {...channelOverwritesItemBindingProps} />;
}
function RemoveIconOnPress() { // fn#71168, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9281:639, owner: RemoveIcon.onPress, offset: 0x01d176e3, size: 68 bytes, params: 1, frame: 16
if (onRemove != null) {
return onRemove(item);
}
const itemBinding = item;
removeMemberOrRole(itemBinding.id, itemBinding.name, channelId);
}
function removeMemberOrRole(a0, a1, a2) { // fn#71169, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9281:668, owner: RemoveIcon.onPress.removeMemberOrRole, offset: 0x01d17727, size: 258 bytes, params: 4, frame: 22
var environment;
const env0_0 = a0;
const env0_1 = a1;
const env0_2 = a2;
let value = environment.__proto__.__proto__;
value = require(4500) /* metro dependency 4500: AlertModalNative */;
const showConfirmModal = value.showConfirmModal;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const GuPYQB = t.GuPYQB;
Reflect.apply(showConfirmModal, value, [{key: 'remove-channel-overwrite-' + a0, title: Reflect.apply(string, intl,
[GuPYQB]), content: intl.format(t.xERCnZ, {name: a1}), confirmText: intl.string(t.fKxYb0),
onConfirm: onConfirm_71170}]);
}
function removeMemberOrRoleOnConfirm() { // fn#71170, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9281:924, owner: RemoveIcon.onPress.removeMemberOrRole.onConfirm, offset: 0x01d17829, size: 69 bytes, params: 1, frame: 14
var environment;
let value = environment.__proto__.__proto__.__proto__;
value = importDefault(4603) /* metro dependency 4603: ChannelActionCreators */;
value = value.clearPermissionOverwrite(importDefault, env0_0);
value.then(_fun71171);
}
function _fun71171() { // fn#71171, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9281:973, offset: 0x01d1786e, size: 45 bytes, params: 1, frame: 12
const value = environment.__proto__.__proto__.__proto__.__proto__;
(require(3856) /* metro dependency 3856: ToastUtils */).memberOrRoleRemovedToast(require);
}
@@ -0,0 +1,479 @@
/* Metro module 15185; source: modules/channel_permissions/native/components/EasyChannelPermissionSettings.tsx; dependencies: [57, 5, 31, 27, 15186, 1379, 1945, 1938, 1867, 3784, 3793, 1878, 8120, 661, 33, 4501, 697, 1484, 566, 9088, 9089, 9090, 1244, 4805, 4647, 9096, 3789, 4572, 6231, 6808, 1305, 6238, 10504, 11392, 5286, 4863, 8853, 9221, 15187, 15189, 2] */
function _fun116013(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#116013, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15382:6, offset: 0x02477fc1, size: 622 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 */;
let value = require(27) /* metro dependency 27 */;
const env0_7 = value.View;
const env0_8 = value.ScrollView;
const channelSettingsPermissionsStore = importDefault(15186) /* metro dependency 15186: ChannelSettingsPermissionsStore */;
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 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(8120) /* metro dependency 8120: ChannelPermissionsConstants */).SettingMode;
value = require(661) /* metro dependency 661: Constants */;
const env0_18 = value.ChannelTypes;
const env0_19 = value.Permissions;
const env0_20 = value.AnalyticEvents;
const env0_21 = value.ChannelSettingsSections;
const env0_22 = value.SettingsPaneTypes;
value = require(33) /* metro dependency 33 */;
const env0_23 = value.jsx;
const env0_24 = value.jsxs;
object2 = {BASIC: 0};
object2[0] = 'BASIC';
object2.ADVANCED = 1;
object2[1] = 'ADVANCED';
object2.MODERATORS = 2;
object2[2] = 'MODERATORS';
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
const BACKGROUND_BASE_LOWER = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWER;
object2.container = {'flex': 1, 'paddingTop': 16, backgroundColor: BACKGROUND_BASE_LOWER};
object2.content = {'marginTop': 16, 'flex': 1};
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object2.adminWarning = {marginTop: PX_12};
const env0_26 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/channel_permissions/native/components/EasyChannelPermissionSettings.tsx');
exports.default = EasyChannelPermissionSettings;
}
function ChannelPermissionSettingsBasicView({channel, privateToggleState, setPrivateToggleState}) { // fn#116014, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15382:706, offset: 0x0247822f, size: 1584 bytes, params: 2, frame: 39
const HelpMessage = (require(1305) /* metro dependency 1305: native */).HelpMessage;
let env0_6 = undefined;
const styles = useStyles();
const value3 = (require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation();
const {guild,
sortedGuildRoles} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([GuildStore,
GuildRoleStore], _fun116016);
env0_6.useLayoutEffect(_fun116017, [value3]);
const value5 = env0_6.useMemo(_fun116018, [guild, sortedGuildRoles, channel]);
if (guild == null) {
return null;
}
if (sortedGuildRoles == null) {
return null;
}
const isCategory2 = channel.isCategory();
const existingMembersRows = (importAll(9088) /* metro dependency 9088: ChannelPermissionsUtils */).getExistingMembersRows(GuildMemberStore.getMemberIds(guild?.id),
channel, guild, channel.accessPermissions);
env0_6 = _fun116019();
const value8 = _fun116023();
const isPrivateGuildChannel2 = (importAll(9088) /* metro dependency 9088: ChannelPermissionsUtils */).isPrivateGuildChannel(channel);
const permissionUtilsModule = importAll(3789) /* metro dependency 3789: PermissionUtils */;
let canEveryoneRole = permissionUtilsModule.canEveryoneRole;
const VIEW_CHANNEL = Permissions.VIEW_CHANNEL;
const canEveryoneRole2 = Reflect.apply(canEveryoneRole, permissionUtilsModule, [VIEW_CHANNEL, guild]);
const moduleValue6 = permissionUtilsModule;
canEveryoneRole = moduleValue6.canEveryoneRole;
const ADMINISTRATOR = Permissions.ADMINISTRATOR;
const canEveryoneRole3 = Reflect.apply(canEveryoneRole, moduleValue6, [ADMINISTRATOR, guild]);
const type = channel.type;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const value9 = Reflect.apply(string, intl, [t.hfbjIH]);
const GUILD_CATEGORY = ChannelTypes.GUILD_CATEGORY;
const r17 = type === GUILD_CATEGORY ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.RQUk61) : type !== ChannelTypes.GUILD_VOICE ? value9 : intl.string((require(1244) /* metro dependency 1244: indexNative */).t.cLjvKg);
const Stack = (require(4572) /* metro dependency 4572: StackNative */).Stack;
const object = {};
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object.paddingHorizontal = PX_16;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
const TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
const TableSwitchRow = (require(6808) /* metro dependency 6808: TableSwitchRowNative */).TableSwitchRow;
string = intl.string;
const items2 = [<TableRowGroup title={r17} hasIcons={false}><TableSwitchRow label={isCategory2 ? Reflect.apply(string,
intl, [t.lEPAZ5]) : Reflect.apply(string, intl,
[t.aUI70g])} value={privateToggleState} onValueChange={value8} /></TableRowGroup>];
items2[1] = canEveryoneRole3 && <View style={styles.adminWarning}><HelpMessage messageType={(require(1305) /* metro dependency 1305: native */).HelpMessageTypes.WARNING}>{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['5f3HIC'])}</HelpMessage></View>;
items2[2] = !canEveryoneRole3 && !canEveryoneRole2 && !isPrivateGuildChannel2 && <View style={styles.adminWarning}><HelpMessage messageType={(require(1305) /* metro dependency 1305: native */).HelpMessageTypes.WARNING}>{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.ZAk4Q9)}</HelpMessage></View>;
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
const CirclePlusIcon = (require(10504) /* metro dependency 10504: CirclePlusIcon */).CirclePlusIcon;
items2[3] = <TableRowGroup hasIcons><TableRow arrow icon={<CirclePlusIcon />} label={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.dMJ3Y6)} onPress={onPress_116028} /></TableRowGroup>;
string = intl.string;
const ES4CC6 = (require(1244) /* metro dependency 1244: indexNative */).t.ES4CC6;
items2[4] = <TableRowGroup title={Reflect.apply(string, intl, [ES4CC6])} hasIcons>{value5.map(function(a0) {
return ChannelPermissionSettingsBasicViewRenderRowItem(a0);
})}</TableRowGroup>;
items2[5] = <TableRowGroup hasIcons>{existingMembersRows.map(function(a0) {
return ChannelPermissionSettingsBasicViewRenderRowItem(a0);
})}</TableRowGroup>;
return (
<Stack style={object} spacing={PX_16}>
{items2}
</Stack>
);
}
function onBack() { // fn#116031, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15382:3892, offset: 0x02478d56, size: 39 bytes, params: 1, frame: 11
(importDefault(4647) /* metro dependency 4647: AlertActionCreators */).close();
return false;
}
function EasyChannelPermissionSettings({channelId, origin}) { // fn#116032, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15382:4061, offset: 0x02478d7d, size: 1018 bytes, params: 2, frame: 28
var r0;
var object3;
let env0_4 = undefined;
(require(5286) /* metro dependency 5286: useNavigatorBackPressHandlerNative */).useNavigatorBackPressHandler(onBack);
const styles = useStyles();
const channel = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], function() {
return ChannelStore.getChannel(channelId);
});
const advancedMode = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelSettingsPermissionsStore],
function() {
return ChannelSettingsPermissionsStore.advancedMode;
});
let binding = env0_6;
let useState = binding.useState;
const value4 = Reflect.apply(useState, binding,
[channel == null ? advancedMode ? env0_25.ADVANCED : env0_25.BASIC : channel.isGuildStageVoice() ? env0_25.MODERATORS : advancedMode ? env0_25.ADVANCED : env0_25.BASIC]);
binding = env0_4;
const value5 = binding(value4, 2);
let property = value5[0];
env0_4 = value5[1];
const binding3 = env0_6;
useState = binding3.useState;
const channelPermissionsUtilsModule = importAll(9088) /* metro dependency 9088: ChannelPermissionsUtils */;
const value6 = binding(Reflect.apply(useState, binding3,
[channelPermissionsUtilsModule.isPrivateGuildChannel(channel)]), 2);
const property2 = value6[0];
const property3 = value6[1];
env0_6.useEffect(function() {
var originBinding = origin;
var property = ChannelSettingsSections.OVERVIEW;
var defaultImport = importDefault(dependencyMap[35]);
var trackWithMetadata = defaultImport.trackWithMetadata;
var SETTINGS_PANE_VIEWED = AnalyticEvents.SETTINGS_PANE_VIEWED;
Reflect.apply(trackWithMetadata, defaultImport, [SETTINGS_PANE_VIEWED, {settings_type: 'channel',
origin_pane: originBinding !== property ? null : SettingsPaneTypes.CHANNEL_SETTINGS,
destination_pane: ChannelSettingsSections.PERMISSIONS}]);
}, [origin]);
const value7 = env0_6.useCallback(_fun116036, [channel]);
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
items = [intl.string((require(1244) /* metro dependency 1244: indexNative */).t['Mw/UDN'])];
items[1] = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['0a6awf']);
if (channel?.isGuildStageVoice() === true) {
items.push(intl.string((require(1244) /* metro dependency 1244: indexNative */).t.YIIUJ3));
}
const segmentedControlStateNativeModule = require(8853) /* metro dependency 8853: SegmentedControlStateNative */;
const useSegmentedControlState = segmentedControlStateNativeModule.useSegmentedControlState;
const object5 = {pageWidth: 0, defaultIndex: property, onSetActiveIndex: value7};
object5.items = items.map(function(a0) {
return {id: a0, label: a0, page: null};
});
const value9 = Reflect.apply(useSegmentedControlState, segmentedControlStateNativeModule, [object5]);
env0_6.useEffect(_fun116038, [channel, property]);
if (channel != null) {
var viewBindingProps = {style: styles.container};
object3 = {};
object3.paddingHorizontal = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
r0 = <View {...viewBindingProps}><View style={object3}>{((SegmentedControl) => <SegmentedControl state={value9} />)((require(9221) /* metro dependency 9221: SegmentedControlNative */).SegmentedControl)}</View><ScrollView style={styles.content}>{property === env0_25.BASIC ? <ChannelPermissionSettingsBasicView channel={channel} privateToggleState={property2} setPrivateToggleState={property3} /> : property === env0_25.MODERATORS ? ((Component) => <Component channel={channel} />)(importDefault(15187) /* metro dependency 15187: ViewModerators */) : ((Component) => <Component channelId={channel.id} />)(importDefault(15189) /* metro dependency 15189: ChannelSettingsPermissionsOverview */)}</ScrollView></View>;
} else {
r0 = null;
}
return r0;
}
function ChannelPermissionSettingsBasicViewRenderRowItem(a0) { // fn#116015, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15382:2394, owner: ChannelPermissionSettingsBasicView.renderRowItem, offset: 0x0247885f, size: 89 bytes, params: 2, frame: 18
let value = environment.__proto__;
value = importDefault(9096) /* metro dependency 9096: ChannelOverwritesItem */;
const channelBinding = channel;
return ((Component) => <Component item={a0} channelId={channelBinding.id} showType showRemove guildId={channelBinding.guild_id} key={a0.id} />)(value);
}
function _fun116016() { // fn#116016, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15382:888, offset: 0x024788b8, size: 79 bytes, params: 1, frame: 13
const value = environment.__proto__;
const getGuild = GuildStore.getGuild;
const channelBinding = channel;
const getGuildId = channelBinding.getGuildId;
const value3 = Reflect.apply(getGuild, GuildStore, [Reflect.apply(getGuildId, channelBinding, [])]);
return {guild: value3, sortedGuildRoles: value3 != null ? GuildRoleStore.getSortedRoles(value3.id) : undefined};
}
function _fun116017() { // fn#116017, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15382:1050, offset: 0x02478907, size: 29 bytes, params: 1, frame: 13
env0_3.setOptions({headerRight: undefined});
}
function _fun116018() { // fn#116018, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15382:1114, offset: 0x02478924, size: 88 bytes, params: 1, frame: 17
var r0;
var sortedGuildRolesBinding;
var value2;
var moduleValue;
var getExistingRolesRows;
var channelBinding;
let guildBinding = guild;
if (guildBinding == null) {
r0 = [];
} else {
sortedGuildRolesBinding = sortedGuildRoles;
if (sortedGuildRolesBinding == null) {
r0 = [];
} else {
value2 = environment.__proto__;
moduleValue = importAll(9088) /* metro dependency 9088: ChannelPermissionsUtils */;
getExistingRolesRows = moduleValue.getExistingRolesRows;
guildBinding = guild;
sortedGuildRolesBinding = sortedGuildRoles;
channelBinding = channel;
r0 = Reflect.apply(getExistingRolesRows, moduleValue, [guildBinding, sortedGuildRolesBinding,
channelBinding,
channelBinding.accessPermissions]);
}
}
return r0;
}
function _fun116019() { // fn#116019, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15382:1359, offset: 0x0247897c, size: 36 bytes, params: 1, frame: 12
const env0_0 = env1_5(_fun116021);
return _fun116022;
}
function _fun116023() { // fn#116023, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15382:1707, offset: 0x02478aaf, size: 36 bytes, params: 1, frame: 12
const env0_0 = env1_5(_fun116025);
return _fun116027;
}
function ChannelPermissionSettingsBasicViewOnPress() { // fn#116028, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15382:3630, owner: ChannelPermissionSettingsBasicView.onPress, offset: 0x02478d1d, size: 57 bytes, params: 1, frame: 12
var value2;
var moduleValue;
if (channel != null) {
value2 = environment.__proto__;
moduleValue = require(11392) /* metro dependency 11392: ChannelPermissionsUtils */;
moduleValue.openAddMembersActionSheet(channel);
}
}
function _fun116036(a0) { // fn#116036, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15382:4679, offset: 0x024791f7, size: 151 bytes, params: 2, frame: 16
var binding;
var moduleValue;
const value = environment.__proto__;
const ADVANCED = env1_25.ADVANCED;
if (a0 === ADVANCED) {
(require(9089) /* metro dependency 9089: ChannelSettingsPermissionsActionCreators */).setAdvancedMode(true);
} else {
binding = env0_5;
moduleValue = importAll(9088) /* metro dependency 9088: ChannelPermissionsUtils */;
binding(moduleValue.isPrivateGuildChannel(channel));
(require(9089) /* metro dependency 9089: ChannelSettingsPermissionsActionCreators */).setAdvancedMode(false);
}
env0_4(a0);
}
function _fun116038() { // fn#116038, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15382:5144, offset: 0x0247928e, size: 140 bytes, params: 1, frame: 18
let value = environment.__proto__;
const defaultImport = importDefault(4863) /* metro dependency 4863: AppAnalyticsUtils */;
const trackWithMetadata = defaultImport.trackWithMetadata;
const CHANNEL_PERMISSIONS_PAGE_VIEWED = AnalyticEvents.CHANNEL_PERMISSIONS_PAGE_VIEWED;
const object2 = {};
const binding = env0_3;
const BASIC = env1_25.BASIC;
object2.mode = binding === BASIC ? SettingMode.BASIC : SettingMode.ADVANCED;
value = importAll(9088) /* metro dependency 9088: ChannelPermissionsUtils */;
object2.channel_is_private = value.isPrivateGuildChannel(channel);
Reflect.apply(trackWithMetadata, defaultImport, [CHANNEL_PERMISSIONS_PAGE_VIEWED, object2]);
}
function* _fun116021() { // fn#116021, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15382:1379, offset: 0x024789ab, size: 260 bytes, params: 1, frame: 22
if (true) {
value = environment.__proto__.__proto__.__proto__;
var binding = env3_2;
var binding2 = env3_3;
var isPrivateGuildChannel2 = binding(binding2[19]).isPrivateGuildChannel(require);
var accessPermissions = require.accessPermissions;
var value6 = binding(binding2[19]).flipEveryonePermission(require, accessPermissions, isPrivateGuildChannel2);
var currentUser = env3_16.getCurrentUser();
binding = env3_14;
var can = binding.can;
var ADMINISTRATOR = env3_19.ADMINISTRATOR;
var value8 = Reflect.apply(can, binding, [ADMINISTRATOR, env2_4]);
var r4 = View || currentUser == null;
r4 = !r4 ? value8 : r4;
if (!r4) {
var value10 = env3_2(env3_3[19]);
yield value10.grantUserChannelAccess(require, accessPermissions);
if (false) {
return undefined;
}
}
value = env3_0(env3_3[20]);
yield value.savePermissionUpdates(require.id, [value6]);
}
}
function* _fun116025() { // fn#116025, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15382:1727, offset: 0x02478ade, size: 521 bytes, params: 1, frame: 23
var environment;
var r9;
var r8;
var binding;
var value7;
var binding2;
var intl;
var string;
var t;
var value10;
var computeChannelName;
var channelName;
var binding3;
var format;
var object2;
var binding4;
var value13;
var show;
if (true) {
value = environment.__proto__.__proto__;
if (require.guild_id == null) {
value7 = environment.__proto__.__proto__.__proto__;
binding = env3_0;
binding2 = env3_3;
intl = binding(binding2[22]).intl;
string = intl.string;
t = binding(binding2[22]).t;
r9 = importDefault ? Reflect.apply(string, intl, [t.vw48TT]) : Reflect.apply(string, intl, [t['47gQYL']]);
binding = env3_0;
value10 = binding(env3_3[23]);
computeChannelName = value10.computeChannelName;
binding = env3_16;
channelName = Reflect.apply(computeChannelName, value10, [require, binding, env3_15]);
binding = env3_0;
binding3 = env3_3;
intl = binding(binding3[22]).intl;
format = intl.format;
t = binding(binding3[22]).t;
r8 = importDefault ? Reflect.apply(format, intl, [t.hGzPnx,
{channelName: channelName}]) : Reflect.apply(format,
intl, [t.rKzX1E, {channelName: channelName}]);
importAll(!importDefault);
binding = env3_1;
binding4 = env3_3;
value13 = binding(binding4[24]);
show = value13.show;
object2 = {title: r9, body: r8};
binding = env3_0;
intl = binding(binding4[22]).intl;
string = intl.string;
t = binding(binding4[22]).t;
object2.cancelText = Reflect.apply(string, intl, [t['ETE/oC']]);
intl = binding(binding4[22]).intl;
string = intl.string;
t = binding(binding4[22]).t;
object2.confirmText = Reflect.apply(string, intl, [t.p89ACt]);
object2.onConfirm = env2_6;
object2.hideActionSheet = false;
object2.onCancel = onCancel_116026;
Reflect.apply(show, value13, [object2]);
} else {
if (importDefault) {
value7 = environment.__proto__.__proto__.__proto__;
binding = env3_0;
binding2 = env3_3;
intl = binding(binding2[22]).intl;
string = intl.string;
t = binding(binding2[22]).t;
r9 = importDefault ? Reflect.apply(string, intl, [t.vw48TT]) : Reflect.apply(string, intl,
[t['47gQYL']]);
binding = env3_0;
value10 = binding(env3_3[23]);
computeChannelName = value10.computeChannelName;
binding = env3_16;
channelName = Reflect.apply(computeChannelName, value10, [require, binding, env3_15]);
binding = env3_0;
binding3 = env3_3;
intl = binding(binding3[22]).intl;
format = intl.format;
t = binding(binding3[22]).t;
r8 = importDefault ? Reflect.apply(format, intl, [t.hGzPnx,
{channelName: channelName}]) : Reflect.apply(format,
intl, [t.rKzX1E, {channelName: channelName}]);
importAll(!importDefault);
binding = env3_1;
binding4 = env3_3;
value13 = binding(binding4[24]);
show = value13.show;
object2 = {title: r9, body: r8};
binding = env3_0;
intl = binding(binding4[22]).intl;
string = intl.string;
t = binding(binding4[22]).t;
object2.cancelText = Reflect.apply(string, intl, [t['ETE/oC']]);
intl = binding(binding4[22]).intl;
string = intl.string;
t = binding(binding4[22]).t;
object2.confirmText = Reflect.apply(string, intl, [t.p89ACt]);
object2.onConfirm = env2_6;
object2.hideActionSheet = false;
object2.onCancel = onCancel_116026;
Reflect.apply(show, value13, [object2]);
return undefined;
}
binding = env3_0;
var value4 = binding(env3_3[21]);
var checkChattableChannelThresholdMetAfterChannelPermissionDeny = value4.checkChattableChannelThresholdMetAfterChannelPermissionDeny;
var VIEW_CHANNEL = env3_19.VIEW_CHANNEL;
yield Reflect.apply(checkChattableChannelThresholdMetAfterChannelPermissionDeny, value4, [require,
VIEW_CHANNEL]);
var value5 = undefined;
if (false) {
return value5;
}
if (value5) {
value7 = environment.__proto__.__proto__.__proto__;
binding = env3_0;
binding2 = env3_3;
intl = binding(binding2[22]).intl;
string = intl.string;
t = binding(binding2[22]).t;
r9 = importDefault ? Reflect.apply(string, intl, [t.vw48TT]) : Reflect.apply(string, intl,
[t['47gQYL']]);
binding = env3_0;
value10 = binding(env3_3[23]);
computeChannelName = value10.computeChannelName;
binding = env3_16;
channelName = Reflect.apply(computeChannelName, value10, [require, binding, env3_15]);
binding = env3_0;
binding3 = env3_3;
intl = binding(binding3[22]).intl;
format = intl.format;
t = binding(binding3[22]).t;
r8 = importDefault ? Reflect.apply(format, intl, [t.hGzPnx,
{channelName: channelName}]) : Reflect.apply(format,
intl, [t.rKzX1E, {channelName: channelName}]);
importAll(!importDefault);
binding = env3_1;
binding4 = env3_3;
value13 = binding(binding4[24]);
show = value13.show;
object2 = {title: r9, body: r8};
binding = env3_0;
intl = binding(binding4[22]).intl;
string = intl.string;
t = binding(binding4[22]).t;
object2.cancelText = Reflect.apply(string, intl, [t['ETE/oC']]);
intl = binding(binding4[22]).intl;
string = intl.string;
t = binding(binding4[22]).t;
object2.confirmText = Reflect.apply(string, intl, [t.p89ACt]);
object2.onConfirm = env2_6;
object2.hideActionSheet = false;
object2.onCancel = onCancel_116026;
Reflect.apply(show, value13, [object2]);
return undefined;
}
}
}
}
function onCancel_116026() { // fn#116026, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15382:2293, offset: 0x02478ce7, size: 54 bytes, params: 1, frame: 13
const value3 = env4_2(env4_3[19]);
importAll(value3.isPrivateGuildChannel(require));
}