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,809 @@
/* Metro module 11806; source: modules/guild_onboarding_home/GuildOnboardingHomeActionCreators.tsx; dependencies: [5, 1937, 1379, 4869, 4870, 661, 694, 507, 11807, 683, 4601, 21, 2] */
function _fun90413(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#90413, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11992:6, offset: 0x020386c5, size: 293 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(5) /* metro dependency 5 */;
const impersonateStore = importDefault(1937) /* metro dependency 1937: ImpersonateStore */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const guildOnboardingHomeSettingsStore = importDefault(4869) /* metro dependency 4869: GuildOnboardingHomeSettingsStore */;
const guildOnboardingMemberActionStore = importDefault(4870) /* metro dependency 4870: GuildOnboardingMemberActionStore */;
let value = require(661) /* metro dependency 661: Constants */;
const env0_8 = value.AnalyticEvents;
const env0_9 = value.Endpoints;
value = _fun90414();
const value2 = _fun90418();
const value3 = _fun90422();
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_onboarding_home/GuildOnboardingHomeActionCreators.tsx');
exports.fetchGuildHomeSettings = value;
exports.fetchNewMemberActions = value2;
exports.clearNewMemberActions = value3;
exports.selectHomeResourceChannel = selectHomeResourceChannel;
exports.selectNewMemberActionChannel = selectNewMemberActionChannel;
exports.completeNewMemberAction = completeNewMemberAction;
}
function _fun90414() { // fn#90414, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11992:193, offset: 0x020387ea, size: 36 bytes, params: 1, frame: 12
const env0_0 = env0_3(_fun90416);
return _fun90417;
}
function _fun90418() { // fn#90418, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11992:664, offset: 0x02038937, size: 36 bytes, params: 1, frame: 12
const env0_0 = env0_3(_fun90420);
return _fun90421;
}
function _fun90422() { // fn#90422, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11992:1182, offset: 0x02038a9e, size: 36 bytes, params: 1, frame: 12
const env0_0 = env0_3(_fun90424);
return _fun90425;
}
function selectHomeResourceChannel(a0, a1) { // fn#90426, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11992:1816, offset: 0x02038bc6, size: 222 bytes, params: 3, frame: 20
var r3;
var channel;
var resourceForChannel;
var defaultImport;
const value = a2;
if (a1 != null) {
channel = ChannelStore.getChannel(a1);
resourceForChannel = GuildOnboardingHomeSettingsStore.getResourceForChannel(a0, a1);
r3 = a0 == null || ImpersonateStore.isFullServerPreview(a0);
r3 = !r3 ? channel == null : r3;
r3 = !r3 ? resourceForChannel == null : r3;
if (!r3) {
defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
defaultImport.track(AnalyticEvents.SERVER_GUIDE_CHANNEL_SELECTED, {guild_id: a0, channel_id: channel.id,
server_guide_channel_type: 'resource', channel_action_type: -1});
}
if (!(value !== undefined) || value) {
(require(4601) /* metro dependency 4601: transitionToChannel */).transitionToChannel(a1,
{navigationReplace: false});
}
}
}
function selectNewMemberActionChannel(a0, a1) { // fn#90427, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11992:2175, offset: 0x02038ca4, size: 195 bytes, params: 3, frame: 18
var defaultImport;
const channel = ChannelStore.getChannel(a1);
const actionForChannel = GuildOnboardingHomeSettingsStore.getActionForChannel(a0, a1);
let r1 = a0 == null || ImpersonateStore.isFullServerPreview(a0);
r1 = !r1 ? channel == null : r1;
r1 = !r1 ? actionForChannel == null : r1;
if (!r1) {
defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
defaultImport.track(AnalyticEvents.SERVER_GUIDE_CHANNEL_SELECTED, {guild_id: a0, channel_id: channel.id,
server_guide_channel_type: 'member action', channel_action_type: actionForChannel.actionType});
}
(require(4601) /* metro dependency 4601: transitionToChannel */).transitionToChannel(a1);
}
function completeNewMemberAction(a0, a1) { // fn#90428, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11992:2498, offset: 0x02038d67, size: 374 bytes, params: 3, frame: 22
var r11;
var channel;
var actionForChannel;
var defaultImport2;
var defaultImport3;
var track;
var SERVER_GUIDE_ACTION_COMPLETED;
var HTTP;
var post;
const defaultImport = importDefault(694) /* metro dependency 694: Dispatcher */;
let object2 = {type: 'COMPLETE_NEW_MEMBER_ACTION', guildId: a0, channelId: a1};
defaultImport.dispatch(object2);
if (!ImpersonateStore.isFullServerPreview(a0)) {
channel = ChannelStore.getChannel(a1);
actionForChannel = GuildOnboardingHomeSettingsStore.getActionForChannel(a0, a1);
if (channel != null) {
if (actionForChannel != null) {
defaultImport2 = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
var env0_0 = defaultImport2.keys(GuildOnboardingMemberActionStore.getCompletedActions(a0) ?? ({}));
r11 = GuildOnboardingHomeSettingsStore.getNewMemberActions(a0) ?? [];
defaultImport3 = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
track = defaultImport3.track;
SERVER_GUIDE_ACTION_COMPLETED = AnalyticEvents.SERVER_GUIDE_ACTION_COMPLETED;
object2 = {};
object2.guild_id = channel.guild_id;
object2.channel_id = channel.id;
object2.channel_action_type = actionForChannel.actionType;
object2.has_completed_all = r11.reduce(_fun90429, true);
Reflect.apply(track, defaultImport3, [SERVER_GUIDE_ACTION_COMPLETED, object2]);
}
}
HTTP = (require(507) /* metro dependency 507: HTTPUtils */).HTTP;
post = HTTP.post;
object2 = {};
object2.url = Endpoints.GUILD_MEMBER_ACTION_UPDATE(a0, a1);
object2.rejectWithError = true;
Reflect.apply(post, HTTP, [object2]);
}
}
function* _fun90416(a0) { // fn#90416, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11992:213, offset: 0x02038819, size: 286 bytes, params: 2, frame: 19
var object2;
var binding2;
var property;
var value4;
var HTTP;
var get;
var GUILD_HOME_SETTINGS;
var value5;
var value6;
var value7;
var value8;
var binding3;
var value9;
var settingsFromServer;
var body;
var value10;
var value11;
var error;
if (false) {
return undefined;
}
value = environment.__proto__.__proto__;
let binding = env2_1;
binding(env2_2[6]).dispatch({type: 'GUILD_HOME_SETTINGS_FETCH_START', guildId: a0});
try {
binding = env2_0;
} catch (error) {
binding = env2_1;
value = binding(env2_2[6]);
value.dispatch({type: 'GUILD_HOME_SETTINGS_FETCH_FAIL', guildId: a0});
return undefined;
}
try {
binding2 = env2_2;
} catch (error) {
binding = env2_1;
value = binding(env2_2[6]);
value.dispatch({type: 'GUILD_HOME_SETTINGS_FETCH_FAIL', guildId: a0});
return undefined;
}
try {
property = binding2[7];
} catch (error) {
binding = env2_1;
value = binding(env2_2[6]);
value.dispatch({type: 'GUILD_HOME_SETTINGS_FETCH_FAIL', guildId: a0});
return undefined;
}
try {
value4 = binding(property);
} catch (error) {
binding = env2_1;
value = binding(env2_2[6]);
value.dispatch({type: 'GUILD_HOME_SETTINGS_FETCH_FAIL', guildId: a0});
return undefined;
}
try {
HTTP = value4.HTTP;
} catch (error) {
binding = env2_1;
value = binding(env2_2[6]);
value.dispatch({type: 'GUILD_HOME_SETTINGS_FETCH_FAIL', guildId: a0});
return undefined;
}
try {
get = HTTP.get;
} catch (error) {
binding = env2_1;
value = binding(env2_2[6]);
value.dispatch({type: 'GUILD_HOME_SETTINGS_FETCH_FAIL', guildId: a0});
return undefined;
}
try {
object2 = {'url': null, 'oldFormErrors': true, 'rejectWithError': true};
} catch (error) {
binding = env2_1;
value = binding(env2_2[6]);
value.dispatch({type: 'GUILD_HOME_SETTINGS_FETCH_FAIL', guildId: a0});
return undefined;
}
try {
binding = env2_9;
} catch (error) {
binding = env2_1;
value = binding(env2_2[6]);
value.dispatch({type: 'GUILD_HOME_SETTINGS_FETCH_FAIL', guildId: a0});
return undefined;
}
try {
GUILD_HOME_SETTINGS = binding.GUILD_HOME_SETTINGS;
} catch (error) {
binding = env2_1;
value = binding(env2_2[6]);
value.dispatch({type: 'GUILD_HOME_SETTINGS_FETCH_FAIL', guildId: a0});
return undefined;
}
try {
value5 = Reflect.apply(GUILD_HOME_SETTINGS, binding, [a0]);
} catch (error) {
binding = env2_1;
value = binding(env2_2[6]);
value.dispatch({type: 'GUILD_HOME_SETTINGS_FETCH_FAIL', guildId: a0});
return undefined;
}
try {
object2.url = value5;
} catch (error) {
binding = env2_1;
value = binding(env2_2[6]);
value.dispatch({type: 'GUILD_HOME_SETTINGS_FETCH_FAIL', guildId: a0});
return undefined;
}
try {
value6 = Reflect.apply(get, HTTP, [object2]);
} catch (error) {
binding = env2_1;
value = binding(env2_2[6]);
value.dispatch({type: 'GUILD_HOME_SETTINGS_FETCH_FAIL', guildId: a0});
return undefined;
}
yield value6;
try {
value7 = undefined;
value8 = false;
} catch (error) {
binding = env2_1;
value = binding(env2_2[6]);
value.dispatch({type: 'GUILD_HOME_SETTINGS_FETCH_FAIL', guildId: a0});
return undefined;
}
if (value8) {
return value7;
}
try {
binding = env2_0;
} catch (error) {
binding = env2_1;
value = binding(env2_2[6]);
value.dispatch({type: 'GUILD_HOME_SETTINGS_FETCH_FAIL', guildId: a0});
return undefined;
}
try {
binding3 = env2_2;
} catch (error) {
binding = env2_1;
value = binding(env2_2[6]);
value.dispatch({type: 'GUILD_HOME_SETTINGS_FETCH_FAIL', guildId: a0});
return undefined;
}
try {
property = binding3[8];
} catch (error) {
binding = env2_1;
value = binding(env2_2[6]);
value.dispatch({type: 'GUILD_HOME_SETTINGS_FETCH_FAIL', guildId: a0});
return undefined;
}
try {
value9 = binding(property);
} catch (error) {
binding = env2_1;
value = binding(env2_2[6]);
value.dispatch({type: 'GUILD_HOME_SETTINGS_FETCH_FAIL', guildId: a0});
return undefined;
}
try {
settingsFromServer = value9.settingsFromServer;
} catch (error) {
binding = env2_1;
value = binding(env2_2[6]);
value.dispatch({type: 'GUILD_HOME_SETTINGS_FETCH_FAIL', guildId: a0});
return undefined;
}
try {
body = value7.body;
} catch (error) {
binding = env2_1;
value = binding(env2_2[6]);
value.dispatch({type: 'GUILD_HOME_SETTINGS_FETCH_FAIL', guildId: a0});
return undefined;
}
try {
value10 = Reflect.apply(settingsFromServer, value9, [body]);
} catch (error) {
binding = env2_1;
value = binding(env2_2[6]);
value.dispatch({type: 'GUILD_HOME_SETTINGS_FETCH_FAIL', guildId: a0});
return undefined;
}
try {
binding = env2_1;
} catch (error) {
binding = env2_1;
value = binding(env2_2[6]);
value.dispatch({type: 'GUILD_HOME_SETTINGS_FETCH_FAIL', guildId: a0});
return undefined;
}
try {
property = binding3[6];
} catch (error) {
binding = env2_1;
value = binding(env2_2[6]);
value.dispatch({type: 'GUILD_HOME_SETTINGS_FETCH_FAIL', guildId: a0});
return undefined;
}
try {
value11 = binding(property);
} catch (error) {
binding = env2_1;
value = binding(env2_2[6]);
value.dispatch({type: 'GUILD_HOME_SETTINGS_FETCH_FAIL', guildId: a0});
return undefined;
}
try {
dispatch = value11.dispatch;
} catch (error) {
binding = env2_1;
value = binding(env2_2[6]);
value.dispatch({type: 'GUILD_HOME_SETTINGS_FETCH_FAIL', guildId: a0});
return undefined;
}
try {
object2 = {};
} catch (error) {
binding = env2_1;
value = binding(env2_2[6]);
value.dispatch({type: 'GUILD_HOME_SETTINGS_FETCH_FAIL', guildId: a0});
return undefined;
}
try {
object2.type = 'GUILD_HOME_SETTINGS_FETCH_SUCCESS';
} catch (error) {
binding = env2_1;
value = binding(env2_2[6]);
value.dispatch({type: 'GUILD_HOME_SETTINGS_FETCH_FAIL', guildId: a0});
return undefined;
}
try {
object2.guildId = a0;
} catch (error) {
binding = env2_1;
value = binding(env2_2[6]);
value.dispatch({type: 'GUILD_HOME_SETTINGS_FETCH_FAIL', guildId: a0});
return undefined;
}
try {
object2.homeSettings = value10;
} catch (error) {
binding = env2_1;
value = binding(env2_2[6]);
value.dispatch({type: 'GUILD_HOME_SETTINGS_FETCH_FAIL', guildId: a0});
return undefined;
}
try {
Reflect.apply(dispatch, value11, [object2]);
} catch (error) {
binding = env2_1;
value = binding(env2_2[6]);
value.dispatch({type: 'GUILD_HOME_SETTINGS_FETCH_FAIL', guildId: a0});
return undefined;
}
return value10;
}
function* _fun90420(a0) { // fn#90420, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11992:684, offset: 0x02038966, size: 312 bytes, params: 2, frame: 19
var object2;
var binding2;
var property;
var value4;
var HTTP;
var get;
var GUILD_MEMBER_ACTIONS;
var value5;
var value6;
var value7;
var value8;
var binding3;
var value9;
var actionsFromServer;
var body;
var value10;
var value11;
var error;
if (false) {
return undefined;
}
value = environment.__proto__.__proto__;
let binding = env2_4;
if (binding.isFullServerPreview(a0)) {
return undefined;
}
env2_1(env2_2[6]).dispatch({type: 'GUILD_NEW_MEMBER_ACTIONS_FETCH_START', guildId: a0});
try {
binding = env2_0;
} catch (error) {
binding = env2_1;
value = binding(env2_2[6]);
value.dispatch({type: 'GUILD_NEW_MEMBER_ACTIONS_FETCH_FAIL', guildId: a0});
return undefined;
}
try {
binding2 = env2_2;
} catch (error) {
binding = env2_1;
value = binding(env2_2[6]);
value.dispatch({type: 'GUILD_NEW_MEMBER_ACTIONS_FETCH_FAIL', guildId: a0});
return undefined;
}
try {
property = binding2[7];
} catch (error) {
binding = env2_1;
value = binding(env2_2[6]);
value.dispatch({type: 'GUILD_NEW_MEMBER_ACTIONS_FETCH_FAIL', guildId: a0});
return undefined;
}
try {
value4 = binding(property);
} catch (error) {
binding = env2_1;
value = binding(env2_2[6]);
value.dispatch({type: 'GUILD_NEW_MEMBER_ACTIONS_FETCH_FAIL', guildId: a0});
return undefined;
}
try {
HTTP = value4.HTTP;
} catch (error) {
binding = env2_1;
value = binding(env2_2[6]);
value.dispatch({type: 'GUILD_NEW_MEMBER_ACTIONS_FETCH_FAIL', guildId: a0});
return undefined;
}
try {
get = HTTP.get;
} catch (error) {
binding = env2_1;
value = binding(env2_2[6]);
value.dispatch({type: 'GUILD_NEW_MEMBER_ACTIONS_FETCH_FAIL', guildId: a0});
return undefined;
}
try {
object2 = {'url': null, 'oldFormErrors': true, 'rejectWithError': true};
} catch (error) {
binding = env2_1;
value = binding(env2_2[6]);
value.dispatch({type: 'GUILD_NEW_MEMBER_ACTIONS_FETCH_FAIL', guildId: a0});
return undefined;
}
try {
binding = env2_9;
} catch (error) {
binding = env2_1;
value = binding(env2_2[6]);
value.dispatch({type: 'GUILD_NEW_MEMBER_ACTIONS_FETCH_FAIL', guildId: a0});
return undefined;
}
try {
GUILD_MEMBER_ACTIONS = binding.GUILD_MEMBER_ACTIONS;
} catch (error) {
binding = env2_1;
value = binding(env2_2[6]);
value.dispatch({type: 'GUILD_NEW_MEMBER_ACTIONS_FETCH_FAIL', guildId: a0});
return undefined;
}
try {
value5 = Reflect.apply(GUILD_MEMBER_ACTIONS, binding, [a0]);
} catch (error) {
binding = env2_1;
value = binding(env2_2[6]);
value.dispatch({type: 'GUILD_NEW_MEMBER_ACTIONS_FETCH_FAIL', guildId: a0});
return undefined;
}
try {
object2.url = value5;
} catch (error) {
binding = env2_1;
value = binding(env2_2[6]);
value.dispatch({type: 'GUILD_NEW_MEMBER_ACTIONS_FETCH_FAIL', guildId: a0});
return undefined;
}
try {
value6 = Reflect.apply(get, HTTP, [object2]);
} catch (error) {
binding = env2_1;
value = binding(env2_2[6]);
value.dispatch({type: 'GUILD_NEW_MEMBER_ACTIONS_FETCH_FAIL', guildId: a0});
return undefined;
}
yield value6;
try {
value7 = undefined;
value8 = false;
} catch (error) {
binding = env2_1;
value = binding(env2_2[6]);
value.dispatch({type: 'GUILD_NEW_MEMBER_ACTIONS_FETCH_FAIL', guildId: a0});
return undefined;
}
if (value8) {
return value7;
}
try {
binding = env2_0;
} catch (error) {
binding = env2_1;
value = binding(env2_2[6]);
value.dispatch({type: 'GUILD_NEW_MEMBER_ACTIONS_FETCH_FAIL', guildId: a0});
return undefined;
}
try {
binding3 = env2_2;
} catch (error) {
binding = env2_1;
value = binding(env2_2[6]);
value.dispatch({type: 'GUILD_NEW_MEMBER_ACTIONS_FETCH_FAIL', guildId: a0});
return undefined;
}
try {
property = binding3[8];
} catch (error) {
binding = env2_1;
value = binding(env2_2[6]);
value.dispatch({type: 'GUILD_NEW_MEMBER_ACTIONS_FETCH_FAIL', guildId: a0});
return undefined;
}
try {
value9 = binding(property);
} catch (error) {
binding = env2_1;
value = binding(env2_2[6]);
value.dispatch({type: 'GUILD_NEW_MEMBER_ACTIONS_FETCH_FAIL', guildId: a0});
return undefined;
}
try {
actionsFromServer = value9.actionsFromServer;
} catch (error) {
binding = env2_1;
value = binding(env2_2[6]);
value.dispatch({type: 'GUILD_NEW_MEMBER_ACTIONS_FETCH_FAIL', guildId: a0});
return undefined;
}
try {
body = value7.body;
} catch (error) {
binding = env2_1;
value = binding(env2_2[6]);
value.dispatch({type: 'GUILD_NEW_MEMBER_ACTIONS_FETCH_FAIL', guildId: a0});
return undefined;
}
try {
value10 = Reflect.apply(actionsFromServer, value9, [body]);
} catch (error) {
binding = env2_1;
value = binding(env2_2[6]);
value.dispatch({type: 'GUILD_NEW_MEMBER_ACTIONS_FETCH_FAIL', guildId: a0});
return undefined;
}
try {
binding = env2_1;
} catch (error) {
binding = env2_1;
value = binding(env2_2[6]);
value.dispatch({type: 'GUILD_NEW_MEMBER_ACTIONS_FETCH_FAIL', guildId: a0});
return undefined;
}
try {
property = binding3[6];
} catch (error) {
binding = env2_1;
value = binding(env2_2[6]);
value.dispatch({type: 'GUILD_NEW_MEMBER_ACTIONS_FETCH_FAIL', guildId: a0});
return undefined;
}
try {
value11 = binding(property);
} catch (error) {
binding = env2_1;
value = binding(env2_2[6]);
value.dispatch({type: 'GUILD_NEW_MEMBER_ACTIONS_FETCH_FAIL', guildId: a0});
return undefined;
}
try {
dispatch = value11.dispatch;
} catch (error) {
binding = env2_1;
value = binding(env2_2[6]);
value.dispatch({type: 'GUILD_NEW_MEMBER_ACTIONS_FETCH_FAIL', guildId: a0});
return undefined;
}
try {
object2 = {};
} catch (error) {
binding = env2_1;
value = binding(env2_2[6]);
value.dispatch({type: 'GUILD_NEW_MEMBER_ACTIONS_FETCH_FAIL', guildId: a0});
return undefined;
}
try {
object2.type = 'GUILD_NEW_MEMBER_ACTIONS_FETCH_SUCCESS';
} catch (error) {
binding = env2_1;
value = binding(env2_2[6]);
value.dispatch({type: 'GUILD_NEW_MEMBER_ACTIONS_FETCH_FAIL', guildId: a0});
return undefined;
}
try {
object2.guildId = a0;
} catch (error) {
binding = env2_1;
value = binding(env2_2[6]);
value.dispatch({type: 'GUILD_NEW_MEMBER_ACTIONS_FETCH_FAIL', guildId: a0});
return undefined;
}
try {
object2.memberActions = value10;
} catch (error) {
binding = env2_1;
value = binding(env2_2[6]);
value.dispatch({type: 'GUILD_NEW_MEMBER_ACTIONS_FETCH_FAIL', guildId: a0});
return undefined;
}
try {
Reflect.apply(dispatch, value11, [object2]);
} catch (error) {
binding = env2_1;
value = binding(env2_2[6]);
value.dispatch({type: 'GUILD_NEW_MEMBER_ACTIONS_FETCH_FAIL', guildId: a0});
return undefined;
}
return value10;
}
function* _fun90424(a0) { // fn#90424, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11992:1202, offset: 0x02038acd, size: 249 bytes, params: 2, frame: 19
var object2;
var binding2;
var property;
var value4;
var HTTP;
var del;
var GUILD_MEMBER_ACTIONS;
var value5;
var value6;
var value7;
var value8;
var binding3;
var value9;
var error;
if (true) {
value = environment.__proto__.__proto__;
var binding = env2_1;
var value3 = binding(env2_2[6]);
var dispatch = value3.dispatch;
Reflect.apply(dispatch, value3, [{type: 'GUILD_NEW_MEMBER_ACTIONS_DELETE_START', guildId: a0}]);
reducibleJoin3: while (true) {
reduciblePort32: while (true) {
exceptionLanding31: while (true) {
try {
binding = env2_0;
} catch (error) {
break exceptionLanding31;
}
break reducibleJoin3;
}
binding = env2_1;
value = binding(env2_2[6]);
dispatch = value.dispatch;
Reflect.apply(dispatch, value, [{type: 'GUILD_NEW_MEMBER_ACTIONS_DELETE_FAIL', guildId: a0}]);
break reduciblePort32;
}
return undefined;
}
try {
binding2 = env2_2;
} catch (error) {
break exceptionLanding31;
}
try {
property = binding2[7];
} catch (error) {
break exceptionLanding31;
}
try {
value4 = binding(property);
} catch (error) {
break exceptionLanding31;
}
try {
HTTP = value4.HTTP;
} catch (error) {
break exceptionLanding31;
}
try {
del = HTTP.del;
} catch (error) {
break exceptionLanding31;
}
try {
object2 = {'url': null, 'oldFormErrors': true, 'rejectWithError': true};
} catch (error) {
break exceptionLanding31;
}
try {
binding = env2_9;
} catch (error) {
break exceptionLanding31;
}
try {
GUILD_MEMBER_ACTIONS = binding.GUILD_MEMBER_ACTIONS;
} catch (error) {
break exceptionLanding31;
}
try {
value5 = Reflect.apply(GUILD_MEMBER_ACTIONS, binding, [a0]);
} catch (error) {
break exceptionLanding31;
}
try {
object2.url = value5;
} catch (error) {
break exceptionLanding31;
}
try {
value6 = Reflect.apply(del, HTTP, [object2]);
} catch (error) {
break exceptionLanding31;
}
yield value6;
try {
value7 = undefined;
value8 = false;
} catch (error) {
break exceptionLanding31;
}
if (value8) {
return value7;
}
try {
binding = env2_1;
} catch (error) {
break exceptionLanding31;
}
try {
binding3 = env2_2;
} catch (error) {
break exceptionLanding31;
}
try {
property = binding3[6];
} catch (error) {
break exceptionLanding31;
}
try {
value9 = binding(property);
} catch (error) {
break exceptionLanding31;
}
try {
dispatch = value9.dispatch;
} catch (error) {
break exceptionLanding31;
}
try {
object2 = {};
} catch (error) {
break exceptionLanding31;
}
try {
object2.type = 'GUILD_NEW_MEMBER_ACTIONS_DELETE_SUCCESS';
} catch (error) {
break exceptionLanding31;
}
try {
object2.guildId = a0;
} catch (error) {
break exceptionLanding31;
}
try {
Reflect.apply(dispatch, value9, [object2]);
} catch (error) {
break exceptionLanding31;
}
}
}
function _fun90429(a0, a1) { // fn#90429, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11992:2935, offset: 0x02038edd, size: 33 bytes, params: 3, frame: 12
return a0 && env0_0.includes(a1.channelId);
}
@@ -0,0 +1,311 @@
/* Metro module 4869; source: modules/guild_onboarding_home/GuildOnboardingHomeSettingsStore.tsx; dependencies: [6, 7, 15, 17, 18, 566, 694, 2] */
function _fun42629(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#42629, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5047:6, offset: 0x0113e99f, size: 415 bytes, params: 8, frame: 20
const closure = GUILD_HOME_SETTINGS_FETCH_SUCCESS;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_0 = importDefault(6) /* metro dependency 6 */;
const env0_1 = importDefault(7) /* metro dependency 7 */;
const env0_2 = importDefault(15) /* metro dependency 15 */;
const env0_3 = importDefault(17) /* metro dependency 17 */;
const env0_4 = importDefault(18) /* metro dependency 18 */;
const env0_6 = [];
const env0_7 = {};
const Set = global.Set;
let set = new Set();
const env0_9 = {};
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
_fun42635(Store).displayName = 'GuildOnboardingHomeSettingsStore';
set = new set(importDefault(694) /* metro dependency 694: Dispatcher */,
{GUILD_HOME_SETTINGS_FETCH_START: GUILD_HOME_SETTINGS_FETCH_START, GUILD_HOME_SETTINGS_FETCH_SUCCESS: closure,
GUILD_HOME_SETTINGS_FETCH_FAIL: GUILD_HOME_SETTINGS_FETCH_FAIL, GUILD_HOME_SETTINGS_UPDATE_SUCCESS: closure,
GUILD_HOME_SETTINGS_TOGGLE_ENABLED: GUILD_HOME_SETTINGS_TOGGLE_ENABLED,
GUILD_RESOURCE_CHANNEL_UPDATE_SUCCESS: GUILD_RESOURCE_CHANNEL_UPDATE_SUCCESS,
GUILD_NEW_MEMBER_ACTION_UPDATE_SUCCESS: GUILD_NEW_MEMBER_ACTION_UPDATE_SUCCESS,
GUILD_DELETE: GUILD_DELETE_42658});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_onboarding_home/GuildOnboardingHomeSettingsStore.tsx');
exports.default = set;
exports.NO_SETTINGS = {enabled: false};
}
function _isNativeReflectConstruct_42630() { // fn#42630, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5047:148, offset: 0x0113eb3e, size: 94 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
}
return (_isNativeReflectConstruct_42630_isNativeReflectConstruct = function() {
return !!result;
})();
}
function computeNewMemberActionsWithOnboarding(a0) { // fn#42633, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5047:385, offset: 0x0113eb9c, size: 58 bytes, params: 2, frame: 6
var r0;
const property = env0_7[a0];
const value2 = null;
const newMemberActions = value2 == property ? undefined : property.newMemberActions;
if (value2 == newMemberActions) {
r0 = value2;
} else {
env0_9[a0] = newMemberActions;
r0 = env0_9[a0];
}
return r0;
}
function GUILD_HOME_SETTINGS_FETCH_SUCCESS({homeSettings, guildId}) { // fn#42634, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5047:518, offset: 0x0113ebd6, size: 79 bytes, params: 2, frame: 12
if (guildId != null) {
if (homeSettings == null) {
env0_7[guildId] = env0_5;
}
env0_7[guildId] = homeSettings;
computeNewMemberActionsWithOnboarding(guildId);
env0_8.delete(guildId);
}
}
function _fun42635(a0) { // fn#42635, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5047:676, offset: 0x0113ec25, size: 308 bytes, params: 2, frame: 16
const closure = GuildOnboardingHomeSettingsStore;
env0_4(closure, a0);
return env0_1(closure, [{key: 'getSettings', value: value_42637}, {key: 'getNewMemberActions', value: value_42638},
{key: 'getActionForChannel', value: function(a0, a1) {
var r0;
var newMemberActions;
var env0_0 = a1;
var value = this.getSettings(a0);
var value2 = null;
if (value2 == value) {
r0 = value2;
} else {
newMemberActions = value.newMemberActions;
value = (value2 != newMemberActions ? newMemberActions : []).find(_fun42640);
r0 = value;
}
return r0;
}}, {key: 'hasMemberAction', value: function(a0, a1) {
return this.getActionForChannel(a0, a1) != null;
}}, {key: 'getResourceChannels', value: value_42642}, {key: 'getResourceForChannel', value: value_42643},
{key: 'getIsLoading', value: value_42645}, {key: 'getWelcomeMessage', value: value_42646}, {key: 'hasSettings',
value: value_42647}, {key: 'getEnabled', value: value_42648}, {key: 'getNewMemberAction', value: value_42649}]);
}
function GUILD_HOME_SETTINGS_FETCH_FAIL({guildId}) { // fn#42652, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5047:2640, offset: 0x0113f033, size: 29 bytes, params: 2, frame: 11
env0_8.delete(guildId);
}
function GUILD_HOME_SETTINGS_TOGGLE_ENABLED({guildId, enabled}) { // fn#42653, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5047:2795, offset: 0x0113f050, size: 44 bytes, params: 2, frame: 3
const property = env0_7[guildId];
if (property == null) {
return false;
}
property.enabled = enabled;
}
function GUILD_RESOURCE_CHANNEL_UPDATE_SUCCESS({guildId, resourceChannel}) { // fn#42654, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5047:2937, offset: 0x0113f07c, size: 124 bytes, params: 2, frame: 14
var r0;
var object2;
const property = env0_7[guildId];
if (property == null) {
return false;
}
let resourceChannels = property.resourceChannels;
property.resourceChannels = resourceChannels ?? [];
let value = property.resourceChannels.findIndex(function({channelId}) {
return channelId === resourceChannel.channelId;
});
const value2 = value !== -1;
if (value2) {
resourceChannels = property.resourceChannels;
object2 = {};
copyDataProperties(object2, resourceChannel, resourceChannel);
resourceChannels[value] = object2;
value = true;
r0 = value;
} else {
r0 = value2;
}
return r0;
}
function GUILD_NEW_MEMBER_ACTION_UPDATE_SUCCESS({guildId, action}) { // fn#42656, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5047:3246, offset: 0x0113f112, size: 121 bytes, params: 2, frame: 14
var r0;
var object2;
const property = env0_7[guildId];
if (property == null) {
return false;
}
let newMemberActions = property.newMemberActions;
property.newMemberActions = newMemberActions ?? [];
let value = property.newMemberActions.findIndex(function({channelId}) {
return channelId === action.channelId;
});
const value2 = value !== -1;
if (value2) {
newMemberActions = property.newMemberActions;
object2 = {};
copyDataProperties(object2, action, action);
newMemberActions[value] = object2;
value = true;
r0 = value;
} else {
r0 = value2;
}
return r0;
}
function GUILD_DELETE_42658({guild}) { // fn#42658, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5047:3520, offset: 0x0113f18b, size: 64 bytes, params: 2, frame: 4
if (env0_7[guild.id] == null) {
return false;
}
delete env0_7[guild.id];
delete env0_9[guild.id];
}
function value_42637(a0) { // fn#42637, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5047:1067, offset: 0x0113edca, size: 38 bytes, params: 2, frame: 5
const value = null;
return value == a0 ? value : value != env1_7[a0] ? env1_7[a0] : env1_5;
}
function value_42638(a0) { // fn#42638, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5047:1159, offset: 0x0113edf0, size: 93 bytes, params: 2, frame: 15
var r0;
var settings;
const value = null;
if (value == a0) {
r0 = value;
} else {
settings = this.getSettings(a0);
r0 = value == (value == settings ? undefined : settings.newMemberActions) ? value : value == env1_9[a0] ? computeNewMemberActionsWithOnboarding(a0) : env1_9[a0];
}
return r0;
}
function value_42639(a0, a1) { // fn#42639, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5047:1354, offset: 0x0113ee4d, size: 69 bytes, params: 3, frame: 13
var r0;
var newMemberActions;
const env0_0 = a1;
let value = this.getSettings(a0);
const value2 = null;
if (value2 == value) {
r0 = value2;
} else {
newMemberActions = value.newMemberActions;
value = (value2 != newMemberActions ? newMemberActions : []).find(function({channelId}) {
return channelId === require;
});
r0 = value;
}
return r0;
}
function value_42642(a0) { // fn#42642, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5047:1602, offset: 0x0113eeaf, size: 41 bytes, params: 2, frame: 5
return env1_7[a0]?.resourceChannels ?? env1_6;
}
function value_42643(a0, a1) { // fn#42643, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5047:1721, offset: 0x0113eed8, size: 65 bytes, params: 3, frame: 13
const env0_0 = a1;
const value = null;
if (value == a0) {
return value;
}
const resourceChannels = this.getResourceChannels(a0);
return resourceChannels === env1_6 ? value : resourceChannels.find(function({channelId}) {
return channelId === require;
});
}
function value_42645(a0) { // fn#42645, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5047:1867, offset: 0x0113ef19, size: 31 bytes, params: 2, frame: 12
var r0;
let value = a0 != null;
if (value) {
value = environment.__proto__;
value = env1_8.has(a0);
r0 = value;
} else {
r0 = value;
}
return r0;
}
function value_42646(a0) { // fn#42646, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5047:1937, offset: 0x0113ef38, size: 41 bytes, params: 2, frame: 3
var value;
var property;
if (a0 != null) {
value = environment.__proto__;
property = env1_7[a0];
value = undefined;
return property == null ? value : property.welcomeMessage;
}
}
function value_42647(a0) { // fn#42647, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5047:2039, offset: 0x0113ef61, size: 29 bytes, params: 2, frame: 4
var r0;
let value = a0 != null;
if (value) {
value = environment.__proto__;
value = env1_7[a0] != null;
r0 = value;
} else {
r0 = value;
}
return r0;
}
function value_42648(a0) { // fn#42648, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5047:2104, offset: 0x0113ef7e, size: 52 bytes, params: 2, frame: 5
var enabled;
var r0;
var property;
let value = a0 != null;
if (value) {
value = environment.__proto__;
property = env1_7[a0];
value = undefined;
enabled = property == null ? value : property.enabled;
value = enabled != null;
r0 = value && enabled;
} else {
r0 = value;
}
return r0;
}
function value_42649(a0, a1) { // fn#42649, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5047:2221, offset: 0x0113efb2, size: 100 bytes, params: 3, frame: 15
var environment;
var r2;
var r0;
var value2;
var property;
const env0_0 = a1;
const value = null;
if (value == a0) {
r0 = value;
} else if (value == a1) {
r0 = value;
} else {
value2 = environment.__proto__;
property = env1_7[a0];
r2 = value == property || value == property.newMemberActions ? undefined : property.newMemberActions.find(function({channelId}) {
return channelId === require;
});
r0 = value != r2 ? r2 : value;
}
return r0;
}
@@ -0,0 +1,462 @@
/* Metro module 11807; source: modules/guild_onboarding_home/GuildOnboardingHomeTypes.tsx; dependencies: [1379, 661, 1360, 3789, 2] */
function _fun90430(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#90430, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11993:6, offset: 0x02038efe, size: 574 bytes, params: 8, frame: 25
var object3;
const env0_0 = require;
const _arrayLikeToArray_90433 = function(a0, a1) {
var r0;
var r1;
var r2;
var value3;
var length;
var value5;
var value = undefined;
var value2 = value == null;
reducibleJoin2: while (true) {
if (value2) {
r0 = value2;
break reducibleJoin2;
}
value3 = value > a0.length;
r0 = value3;
break reducibleJoin2;
}
reducibleJoin4: while (true) {
if (r0) {
length = a0.length;
r1 = length;
break reducibleJoin4;
}
r1 = value;
break reducibleJoin4;
}
value = (0, global.Array)(r1);
var value4 = 0;
if (value4 < r1) {
r2 = value4;
reducibleLoop5: while (true) {
value[r2] = a0[r2];
value5 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
if (value5 < r1) {
r2 = value5;
continue reducibleLoop5;
}
break reducibleLoop5;
}
}
return value;
};
const closure = newMemberActionFromServer;
const closure2 = resourceChannelFromServer;
const closure3 = function(a0) {
var r2;
var r1;
var r0;
var value = a0 == null;
if (value) {
r0 = value;
} else {
value = a0.message != null;
r2 = value && a0.message.length > 0;
value = !r2;
if (r2) {
r1 = value;
} else {
value = a0.authorIds != null;
value = !(value && a0.authorIds.length > 0);
r1 = value;
}
r0 = r1;
}
return r0;
};
const closure4 = isSettingsEmpty;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const constantsModule = require(661) /* metro dependency 661: Constants */;
const env0_4 = constantsModule.ChannelTypes;
const env0_5 = constantsModule.Permissions;
object3 = {VIEW: 0};
object3[0] = 'VIEW';
object3.CHAT = 1;
object3[1] = 'CHAT';
const object4 = {DEFAULT: 0};
object4[0] = 'DEFAULT';
object4.TODO = 1;
object4[1] = 'TODO';
object4.RESOURCE = 2;
object4[2] = 'RESOURCE';
object4.RULES = 3;
object4[3] = 'RULES';
object4.UPDATES = 4;
object4[4] = 'UPDATES';
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_onboarding_home/GuildOnboardingHomeTypes.tsx');
exports.WELCOME_MESSAGE_MIN_LENGTH = 7;
exports.WELCOME_MESSAGE_MAX_LENGTH = 300;
exports.NEW_MEMBER_ACTION_TITLE_MIN_LENGTH = 7;
exports.NEW_MEMBER_ACTION_TITLE_MAX_LENGTH = 60;
exports.NEW_MEMBER_ACTION_MIN = 3;
exports.NEW_MEMBER_ACTION_MAX = 5;
exports.RESOURCE_CHANNEL_TITLE_MIN_LENGTH = 1;
exports.RESOURCE_CHANNEL_TITLE_MAX_LENGTH = 30;
exports.RESOURCE_CHANNEL_DESCRIPTION_MAX_LENGTH = 200;
exports.RESOURCE_CHANNEL_MAX = 7;
exports.NEW_MEMBER_ACTION_COMPLETE_MODAL_KEY = 'NEW_MEMBER_ACTION_COMPLETE_MODAL_KEY';
exports.CHANNEL_ACTION_BANNER_HEIGHT = 46;
exports.NewMemberActionTypes = object3;
exports.newMemberActionFromServer = closure;
exports.resourceChannelFromServer = closure2;
exports.settingsFromServer = settingsFromServer;
exports.settingsToServer = settingsToServer;
exports.actionsFromServer = function(a0) {
var propertyName;
if (a0 == null) {
return null;
}
var object = {};
for (propertyName in a0.channel_actions) {
object[propertyName] = a0.channel_actions[propertyName].completed;
}
return object;
};
exports.isWelcomeMessageEmpty = closure3;
exports.isSettingsEmpty = closure4;
exports.isSettingsValid = isSettingsValid;
exports.isChannelValidForResourceChannel = isChannelValidForResourceChannel;
exports.isChannelValidForNewMemberAction = function(a0) {
var type = a0.type;
if (ChannelTypes.GUILD_TEXT === type) {
return importAll(dependencyMap[3]).canEveryoneRole(Permissions.VIEW_CHANNEL, a0);
}
if (ChannelTypes.GUILD_ANNOUNCEMENT === type) {
return importAll(dependencyMap[3]).canEveryoneRole(Permissions.VIEW_CHANNEL, a0);
}
if (ChannelTypes.GUILD_FORUM === type) {
return importAll(dependencyMap[3]).canEveryoneRole(Permissions.VIEW_CHANNEL, a0);
}
if (ChannelTypes.GUILD_MEDIA === type) {
return importAll(dependencyMap[3]).canEveryoneRole(Permissions.VIEW_CHANNEL, a0);
}
return false;
};
exports.ChannelEditBlockTypes = object4;
}
function _createForOfIteratorHelperLoose_90431(a0, a1) { // fn#90431, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11993:154, offset: 0x0203913c, size: 372 bytes, params: 3, frame: 20
var r6;
var r9;
var r5;
var value3;
var regexp;
const env0_0 = a0;
const Symbol = global.Symbol;
let value = typeof Symbol !== 'undefined';
let r1 = value && a0[global.Symbol.iterator];
r1 = !r1 ? a0['@@iterator'] : r1;
if (r1) {
value = r1.call(a0);
return value.next.bind(value);
}
const Array = global.Array;
if (Array.isArray(a0)) {
if (r1) {
}
return _fun90432;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_90433(a0, value);
r5 = value;
} else {
value3 = ({}).toString.call(a0).slice(8, -1);
r6 = value3 === 'Object' && a0.constructor;
r9 = r6 ? a0.constructor.name : value3;
if (r9 === 'Map') {
r6 = global.Array.from(a0);
} else if (r9 === 'Set') {
r6 = global.Array.from(a0);
} else if (r9 === 'Arguments') {
value = _arrayLikeToArray_90433(a0, value);
r6 = value;
} else {
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value = _arrayLikeToArray_90433(a0, value);
r6 = value;
} else {
r6 = value;
}
}
r5 = r6;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
}
return _fun90432;
}
const TypeError = global.TypeError;
throw new TypeError('Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.');
}
function newMemberActionFromServer(a0) { // fn#90434, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11993:1134, offset: 0x020392b0, size: 140 bytes, params: 2, frame: 6
var r3;
var object3;
const object4 = {};
object4.channelId = a0.channel_id;
object4.actionType = a0.action_type;
object4.title = a0.title;
object4.description = a0.description;
let emoji = a0.emoji;
const value = null;
if (value == emoji) {
r3 = value;
} else {
object3 = {};
emoji = a0.emoji;
object3.id = emoji.id;
emoji = a0.emoji;
object3.name = emoji.name;
emoji = a0.emoji;
object3.animated = emoji.animated;
r3 = object3;
}
object4.emoji = r3;
const icon = a0.icon;
object4.icon = value != icon ? icon : value;
return object4;
}
function resourceChannelFromServer(a0) { // fn#90435, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11993:1388, offset: 0x0203933c, size: 143 bytes, params: 2, frame: 6
var object3;
const object4 = {};
object4.channelId = a0.channel_id;
object4.title = a0.title;
const description = a0.description;
const value = null;
let r3 = value != description ? description : '';
object4.description = r3;
let emoji = a0.emoji;
if (value == emoji) {
r3 = value;
} else {
object3 = {};
emoji = a0.emoji;
object3.id = emoji.id;
emoji = a0.emoji;
object3.name = emoji.name;
emoji = a0.emoji;
object3.animated = emoji.animated;
r3 = object3;
}
object4.emoji = r3;
const icon = a0.icon;
object4.icon = value != icon ? icon : value;
return object4;
}
function isSettingsEmpty(a0) { // fn#90437, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11993:1767, offset: 0x0203941f, size: 118 bytes, params: 2, frame: 15
var r3;
var r2;
var r1;
var r0;
let value = a0 == null;
if (value) {
r0 = value;
} else {
value = isWelcomeMessageEmpty(a0.welcomeMessage);
if (value) {
value = a0.newMemberActions != null;
r3 = value && a0.newMemberActions.length > 0;
value = !r3;
if (r3) {
r2 = value;
} else {
value = a0.resourceChannels != null;
value = !(value && a0.resourceChannels.length > 0);
r2 = value;
}
r1 = r2;
} else {
r1 = !!value;
}
r0 = r1;
}
return r0;
}
function settingsFromServer(a0) { // fn#90438, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11993:2838, offset: 0x02039495, size: 149 bytes, params: 2, frame: 17
if (a0 == null) {
return null;
}
const welcome_message = a0.welcome_message;
const new_member_actions = a0.new_member_actions;
const resource_channels = a0.resource_channels;
const enabled = a0.enabled;
const object2 = {};
object2.welcomeMessage = {authorIds: welcome_message.author_ids, message: welcome_message.message};
let value = new_member_actions.filter(function(a0) {
return require(dependencyMap[2]).isNotNullish(ChannelStore.getChannel(a0.channel_id));
});
object2.newMemberActions = value.map(newMemberActionFromServer);
value = resource_channels.filter(function(a0) {
return require(dependencyMap[2]).isNotNullish(ChannelStore.getChannel(a0.channel_id));
});
object2.resourceChannels = value.map(resourceChannelFromServer);
object2.enabled = enabled;
return object2;
}
function settingsToServer(a0, a1) { // fn#90441, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11993:3296, offset: 0x02039566, size: 215 bytes, params: 3, frame: 19
if (a1 == null) {
return null;
}
const welcomeMessage = a1.welcomeMessage;
const newMemberActions = a1.newMemberActions;
const resourceChannels = a1.resourceChannels;
const enabled = a1.enabled;
const object2 = {guild_id: a0};
const value = undefined;
object2.welcome_message = {author_ids: (welcomeMessage == null ? value : welcomeMessage.authorIds) ?? [],
message: (welcomeMessage == null ? value : welcomeMessage.message) ?? ''};
object2.new_member_actions = (newMemberActions ?? []).filter(function(a0) {
return require(dependencyMap[2]).isNotNullish(ChannelStore.getChannel(a0.channelId));
}).map(_fun90443);
object2.resource_channels = (resourceChannels ?? []).filter(function(a0) {
return require(dependencyMap[2]).isNotNullish(ChannelStore.getChannel(a0.channelId));
}).map(_fun90445);
object2.enabled = enabled;
return object2;
}
function isSettingsValid(a0) { // fn#90447, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11993:4659, offset: 0x0203981f, size: 325 bytes, params: 2, frame: 19
var value5;
var getChannel;
var channelId;
var value6;
var moduleValue;
var canEveryoneRole;
var VIEW_CHANNEL;
var value7;
if (a0 != null) {
var isSettingsEmptyBinding = isSettingsEmpty;
var value2 = undefined;
if (isSettingsEmptyBinding(a0)) {
return true;
}
var welcomeMessage = a0.welcomeMessage;
var message = welcomeMessage == null ? value2 : welcomeMessage.message;
if (message == null) {
return false;
}
welcomeMessage = a0.welcomeMessage;
message = welcomeMessage.message;
var length = message.length;
if (length < 7) {
return false;
}
welcomeMessage = a0.welcomeMessage;
var authorIds = welcomeMessage == null ? value2 : welcomeMessage.authorIds;
if (authorIds == null) {
return false;
}
welcomeMessage = a0.welcomeMessage;
authorIds = welcomeMessage.authorIds;
length = authorIds.length;
if (length === 0) {
return false;
}
var newMemberActions = a0.newMemberActions;
if (newMemberActions == null) {
return false;
}
newMemberActions = a0.newMemberActions;
length = newMemberActions.length;
if (length < 3) {
return false;
}
newMemberActions = a0.newMemberActions;
if (newMemberActions == null) {
return true;
}
var _createForOfIteratorHelperLoose_90431Binding = _createForOfIteratorHelperLoose_90431;
newMemberActions = a0.newMemberActions;
var value3 = _createForOfIteratorHelperLoose_90431Binding(newMemberActions);
var value4 = value3();
var done = value4.done;
if (done) {
return true;
}
var r1 = value4;
loopExit14: while (true) {
value5 = r1.value;
getChannel = ChannelStore.getChannel;
channelId = value5.channelId;
value6 = Reflect.apply(getChannel, ChannelStore, [channelId]);
if (value6 == null) {
break loopExit14;
}
moduleValue = importAll(3789) /* metro dependency 3789: PermissionUtils */;
canEveryoneRole = moduleValue.canEveryoneRole;
VIEW_CHANNEL = Permissions.VIEW_CHANNEL;
if (Reflect.apply(canEveryoneRole, moduleValue, [VIEW_CHANNEL, value6])) {
value7 = value3();
done = value7.done;
if (done) {
return true;
}
r1 = value7;
continue;
}
break loopExit14;
}
}
return false;
}
function isChannelValidForResourceChannel(a0) { // fn#90448, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11993:5277, offset: 0x02039964, size: 124 bytes, params: 2, frame: 15
var r0;
var moduleValue;
var moduleValue2;
const type = a0.type;
const GUILD_TEXT = ChannelTypes.GUILD_TEXT;
const value2 = type === GUILD_TEXT;
if (value2) {
moduleValue = importAll(3789) /* metro dependency 3789: PermissionUtils */;
r0 = !moduleValue.canEveryoneRole(Permissions.SEND_MESSAGES, a0);
} else {
r0 = value2;
}
if (r0) {
moduleValue2 = importAll(3789) /* metro dependency 3789: PermissionUtils */;
r0 = moduleValue2.canEveryoneRole(Permissions.VIEW_CHANNEL, a0);
}
return r0;
}
function _fun90443(a0) { // fn#90443, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11993:3673, offset: 0x02039679, size: 185 bytes, params: 2, frame: 8
let emoji = a0.emoji;
const value = undefined;
const id = emoji == null ? value : emoji.id;
emoji = a0.emoji;
const name = emoji == null ? value : emoji.name;
emoji = a0.emoji;
return {channel_id: a0.channelId, action_type: a0.actionType, title: a0.title, description: a0.description,
emoji: {id: id ?? value, name: name ?? value, animated: (emoji == null ? value : emoji.animated) ?? value},
icon: a0.icon ?? value};
}
function _fun90445(a0) { // fn#90445, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11993:4105, offset: 0x02039732, size: 174 bytes, params: 2, frame: 8
let emoji = a0.emoji;
const value = undefined;
const id = emoji == null ? value : emoji.id;
emoji = a0.emoji;
const name = emoji == null ? value : emoji.name;
emoji = a0.emoji;
return {channel_id: a0.channelId, title: a0.title, description: a0.description, emoji: {id: id ?? value,
name: name ?? value, animated: (emoji == null ? value : emoji.animated) ?? value}, icon: a0.icon ?? value};
}
@@ -0,0 +1,126 @@
/* Metro module 4870; source: modules/guild_onboarding_home/GuildOnboardingMemberActionStore.tsx; dependencies: [6, 7, 15, 17, 18, 566, 694, 2] */
function _fun42659(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#42659, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5048:6, offset: 0x0113f1cb, size: 369 bytes, params: 8, frame: 19
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_0 = importDefault(6) /* metro dependency 6 */;
const env0_1 = importDefault(7) /* metro dependency 7 */;
const env0_2 = importDefault(15) /* metro dependency 15 */;
const env0_3 = importDefault(17) /* metro dependency 17 */;
const env0_4 = importDefault(18) /* metro dependency 18 */;
const env0_6 = {};
const Set = global.Set;
let set = new Set();
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
_fun42663(Store).displayName = 'GuildOnboardingMemberActionStore';
set = new set(importDefault(694) /* metro dependency 694: Dispatcher */,
{GUILD_NEW_MEMBER_ACTIONS_FETCH_START: GUILD_NEW_MEMBER_ACTIONS_FETCH_START,
GUILD_NEW_MEMBER_ACTIONS_FETCH_SUCCESS: GUILD_NEW_MEMBER_ACTIONS_FETCH_SUCCESS,
GUILD_NEW_MEMBER_ACTIONS_FETCH_FAIL: GUILD_NEW_MEMBER_ACTIONS_FETCH_FAIL,
GUILD_NEW_MEMBER_ACTIONS_DELETE_SUCCESS: GUILD_NEW_MEMBER_ACTIONS_DELETE_SUCCESS,
COMPLETE_NEW_MEMBER_ACTION: COMPLETE_NEW_MEMBER_ACTION, GUILD_DELETE: GUILD_DELETE_42673});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_onboarding_home/GuildOnboardingMemberActionStore.tsx');
exports.default = set;
exports.NO_ACTIONS = {};
}
function _isNativeReflectConstruct_42660() { // fn#42660, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5048:148, offset: 0x0113f33c, size: 94 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
}
return (_isNativeReflectConstruct_42660_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun42663(a0) { // fn#42663, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5048:371, offset: 0x0113f39a, size: 116 bytes, params: 2, frame: 16
const closure = GuildOnboardingMemberActionStore;
env0_4(closure, a0);
return env0_1(closure, [{key: 'getCompletedActions', value: value_42665}, {key: 'hasCompletedActionForChannel',
value: function(a0, a1) {
var value = this.getCompletedActions(a0);
return value != null && value[a1] != null;
}}, {key: 'getState', value: value_42667}]);
}
function GUILD_NEW_MEMBER_ACTIONS_FETCH_START({guildId}) { // fn#42668, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5048:1148, offset: 0x0113f482, size: 29 bytes, params: 2, frame: 11
env0_7.add(guildId);
}
function GUILD_NEW_MEMBER_ACTIONS_FETCH_SUCCESS({memberActions, guildId}) { // fn#42669, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5048:1249, offset: 0x0113f49f, size: 66 bytes, params: 2, frame: 12
if (memberActions != null) {
env0_6[guildId] = memberActions;
env0_7.delete(guildId);
} else {
env0_6[guildId] = env0_5;
}
}
function GUILD_NEW_MEMBER_ACTIONS_FETCH_FAIL({guildId}) { // fn#42670, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5048:1392, offset: 0x0113f4e1, size: 29 bytes, params: 2, frame: 11
env0_7.delete(guildId);
}
function GUILD_NEW_MEMBER_ACTIONS_DELETE_SUCCESS({guildId}) { // fn#42671, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5048:1496, offset: 0x0113f4fe, size: 41 bytes, params: 2, frame: 4
if (env0_6[guildId] == null) {
return false;
}
delete env0_6[guildId];
}
function COMPLETE_NEW_MEMBER_ACTION({guildId, channelId}) { // fn#42672, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5048:1610, offset: 0x0113f527, size: 66 bytes, params: 2, frame: 15
const object3 = {};
copyDataProperties(object3, env0_6, channelId);
const object4 = {};
copyDataProperties(object4, env0_6[guildId], channelId);
object4[channelId] = true;
object3[guildId] = object4;
}
function GUILD_DELETE_42673({guild}) { // fn#42673, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5048:1718, offset: 0x0113f569, size: 51 bytes, params: 2, frame: 4
if (env0_6[guild.id] == null) {
return false;
}
delete env0_6[guild.id];
}
function value_42665(a0) { // fn#42665, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5048:770, offset: 0x0113f40e, size: 25 bytes, params: 2, frame: 3
const value = null;
return value == a0 ? value : env1_6[a0];
}
function value_42667(a0) { // fn#42667, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5048:950, offset: 0x0113f44e, size: 52 bytes, params: 2, frame: 12
var r0;
var object2;
var value;
if (a0 == null) {
r0 = {};
} else {
object2 = {};
value = environment.__proto__;
object2.completedActions = env1_6[a0];
object2.loading = env1_7.has(a0);
r0 = object2;
}
return r0;
}
@@ -0,0 +1,89 @@
/* Metro module 11810; source: modules/guild_onboarding_home/MemberActionUtils.tsx; dependencies: [1945, 4869, 4870, 3772, 5104, 632, 1391, 2] */
function _fun90470(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#90470, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11996:6, offset: 0x0203ad4d, size: 198 bytes, params: 8, frame: 19
let env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const guildMemberStore = importDefault(1945) /* metro dependency 1945: GuildMemberStore */;
const guildOnboardingHomeSettingsStore = importDefault(4869) /* metro dependency 4869: GuildOnboardingHomeSettingsStore */;
const guildOnboardingMemberActionStore = importDefault(4870) /* metro dependency 4870: GuildOnboardingMemberActionStore */;
const env0_6 = (require(3772) /* metro dependency 3772: GuildMemberConstants */).GuildMemberFlags;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_onboarding_home/MemberActionUtils.tsx');
exports.useMemberActionsForChannel = useMemberActionsForChannel;
exports.useNextMemberAction = useNextMemberAction;
exports.useAllActionsCompleted = function(a0) {
var env0_0 = a0;
var value2 = undefined;
var value3 = require(dependencyMap[5]).useStateFromStores([GuildMemberStore], _fun90480);
var moduleValue2 = require(dependencyMap[6]);
return moduleValue2.hasFlag((value3 == null ? value2 : value3.flags) ?? 0,
GuildMemberFlags.COMPLETED_HOME_ACTIONS);
};
}
function useMemberActionsForChannel(a0, a1) { // fn#90471, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11996:267, offset: 0x0203ae13, size: 257 bytes, params: 3, frame: 22
var r6;
var r0;
var r2;
var value5;
const env0_0 = a0;
const env0_1 = a1;
var value;
const value2 = undefined;
const value3 = (importDefault(5104) /* metro dependency 5104: useIsNewMember */)(a0);
const value4 = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([GuildOnboardingHomeSettingsStore],
_fun90472, [a0]);
const completedActions = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([GuildOnboardingMemberActionStore],
_fun90473);
if (value3) {
value = null;
r6 = value == value4 ? value2 : value4.findIndex(function({channelId}) {
return channelId === require.id;
});
value5 = 0;
r0 = value != r6 ? r6 : value5;
r2 = r0 >= value5 && value != value4 ? value4[r0] : value;
return {channelAction: r2,
completed: value != r2 && (value == completedActions ? value2 : completedActions[r2.channelId]) === true};
}
return {};
}
function useNextMemberAction(a0, a1) { // fn#90475, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11996:677, offset: 0x0203af64, size: 143 bytes, params: 3, frame: 19
const env0_0 = a0;
const env0_1 = a1;
const value2 = undefined;
const newMemberActions = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([GuildOnboardingHomeSettingsStore],
_fun90476);
const env0_2 = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([GuildOnboardingMemberActionStore],
_fun90477);
return newMemberActions == null ? value2 : newMemberActions.find(_fun90478);
}
function useAllActionsCompleted(a0) { // fn#90479, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11996:960, offset: 0x0203b02d, size: 126 bytes, params: 2, frame: 18
const env0_0 = a0;
const value2 = undefined;
const selfMember = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([GuildMemberStore],
_fun90480);
const flagUtilsModule = require(1391) /* metro dependency 1391: FlagUtils */;
const hasFlag = flagUtilsModule.hasFlag;
const r1 = (selfMember == null ? value2 : selfMember.flags) ?? 0;
const COMPLETED_HOME_ACTIONS = GuildMemberFlags.COMPLETED_HOME_ACTIONS;
return Reflect.apply(hasFlag, flagUtilsModule, [r1, COMPLETED_HOME_ACTIONS]);
}
function _fun90472() { // fn#90472, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11996:361, offset: 0x0203af14, size: 27 bytes, params: 1, frame: 11
return GuildOnboardingHomeSettingsStore.getNewMemberActions(env0_0);
}
function _fun90473() { // fn#90473, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11996:430, offset: 0x0203af2f, size: 27 bytes, params: 1, frame: 11
return GuildOnboardingMemberActionStore.getCompletedActions(env0_0);
}
function _fun90478(a0) { // fn#90478, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11996:875, offset: 0x0203aff3, size: 58 bytes, params: 2, frame: 5
return completedActions?.[a0.channelId] !== true && a0.channelId !== require;
}
function _fun90480() { // fn#90480, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11996:1035, offset: 0x0203b0ab, size: 27 bytes, params: 1, frame: 11
return GuildMemberStore.getSelfMember(env0_0);
}
@@ -0,0 +1,129 @@
/* Metro module 5103; source: modules/guild_onboarding_home/OnboardingHomeUtils.tsx; dependencies: [1937, 1379, 1867, 4869, 661, 1386, 5104, 632, 5105, 4871, 2] */
function _fun44543(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#44543, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5281:6, offset: 0x0117343e, size: 257 bytes, params: 8, frame: 19
let env0_0 = require;
const hasResourceChannels = function(a0, a1) {
var propertyName;
var propertyName2;
var property;
var value = a1.getMutableGuildChannelsForGuild(a0);
var properties = Object.keys(value);
var properties2 = 0;
var properties3 = properties.length;
if (properties === undefined) {
return false;
}
var r4 = properties2;
loopExit1: while (true) {
propertyName = properties[r4];
propertyName2 = r4 + 1;
if (propertyName === undefined) {
return false;
}
property = value[propertyName];
if (property.hasFlag(ChannelFlags.IS_GUILD_RESOURCE_CHANNEL)) {
break loopExit1;
}
r4 = propertyName2;
continue;
}
return true;
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const impersonateStore = importDefault(1937) /* metro dependency 1937: ImpersonateStore */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
const guildOnboardingHomeSettingsStore = importDefault(4869) /* metro dependency 4869: GuildOnboardingHomeSettingsStore */;
const constantsModule = require(661) /* metro dependency 661: Constants */;
const env0_7 = constantsModule.FAVORITES;
const env0_8 = constantsModule.GuildFeatures;
const env0_9 = constantsModule.ME;
const env0_10 = (require(1386) /* metro dependency 1386: ChannelConstants */).ChannelFlags;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_onboarding_home/OnboardingHomeUtils.tsx');
exports.useCanSeeOnboardingHome = function(a0) {
var env0_0 = a0;
var value2 = importDefault(dependencyMap[6])(a0);
var env0_1 = value2;
return require(dependencyMap[7]).useStateFromStores([ChannelStore, GuildStore, ImpersonateStore], _fun44547,
[a0,
value2]);
};
exports.canSeeOnboardingHome = canSeeOnboardingHome;
}
function canSeeOnboardingHomeInPreview(a0) { // fn#44544, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5281:208, offset: 0x0117353f, size: 131 bytes, params: 2, frame: 15
var features;
const id = a0.id;
var value;
let r0 = GuildOnboardingHomeSettingsStore.getNewMemberActions(id) ?? [];
const value3 = r0.length > 0;
const enabled = GuildOnboardingHomeSettingsStore.getEnabled(id);
if (value3) {
features = a0.features;
r0 = features.has(GuildFeatures.COMMUNITY);
} else {
r0 = value3;
}
if (r0) {
features = a0.features;
value = features.has(GuildFeatures.GUILD_ONBOARDING);
value = !(value && !enabled);
r0 = value;
}
return r0;
}
function useCanSeeOnboardingHome(a0) { // fn#44546, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5281:685, offset: 0x01173611, size: 118 bytes, params: 2, frame: 18
const env0_0 = a0;
return (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([ChannelStore, GuildStore,
ImpersonateStore], _fun44547, [a0, (importDefault(5104) /* metro dependency 5104: useIsNewMember */)(a0)]);
}
function canSeeOnboardingHome(a0) { // fn#44548, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5281:1065, offset: 0x0117377f, size: 277 bytes, params: 2, frame: 15
const guild = GuildStore.getGuild(a0);
const isFullServerPreview2 = ImpersonateStore.isFullServerPreview(a0);
if (guild == null) {
return false;
}
if (a0 === ME) {
return false;
}
if (a0 === FAVORITES) {
return false;
}
if (isFullServerPreview2) {
return canSeeOnboardingHomeInPreview(guild);
}
const r3 = (require(5105) /* metro dependency 5105: GuildOnboardingUtils */).isGuildOnboardingSettingsAvailable(a0) && guild.features.has(GuildFeatures.GUILD_ONBOARDING) && guild.features.has(GuildFeatures.GUILD_SERVER_GUIDE);
const features = guild.features;
const has = features.has;
const GUILD_ONBOARDING = GuildFeatures.GUILD_ONBOARDING;
let r1 = Reflect.apply(has, features, [GUILD_ONBOARDING]) && guild.features.has(GuildFeatures.GUILD_SERVER_GUIDE);
r1 = (!r1 ? r3 : r1) && guild.features.has(GuildFeatures.COMMUNITY);
return r1;
}
function _fun44547() { // fn#44547, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5281:781, offset: 0x01173687, size: 248 bytes, params: 1, frame: 18
var r0;
if (env0_0 === ME) {
return false;
}
if (env0_0 === FAVORITES) {
return false;
}
const guild = GuildStore.getGuild(env0_0);
let r1 = guild == null || !guild.features.has(GuildFeatures.COMMUNITY);
if (r1) {
r0 = !r1;
} else {
if (ImpersonateStore.isFullServerPreview(env0_0)) {
r1 = canSeeOnboardingHomeInPreview(guild);
} else {
r1 = (require(5105) /* metro dependency 5105: GuildOnboardingUtils */).isGuildOnboardingSettingsAvailable(env0_0) || !!(importDefault(4871) /* metro dependency 4871: guildHasOnboardingHome */)(guild);
r1 = r1 && (env0_1 || hasResourceChannels(env0_0, ChannelStore));
}
r0 = r1;
}
return r0;
}
@@ -0,0 +1,61 @@
/* Metro module 11805; source: modules/guild_onboarding_home/getNextResourceChannel.tsx; dependencies: [4869, 566, 2] */
function _fun90407(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#90407, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11991:6, offset: 0x020384e5, size: 127 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const guildOnboardingHomeSettingsStore = importDefault(4869) /* metro dependency 4869: GuildOnboardingHomeSettingsStore */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_onboarding_home/getNextResourceChannel.tsx');
exports.default = getCurrentAndNextResourceChannel;
exports.usePreviousAndNextResourceChannel = usePreviousAndNextResourceChannel;
}
function getCurrentAndNextResourceChannel(a0, a1) { // fn#90408, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11991:206, offset: 0x02038564, size: 104 bytes, params: 3, frame: 12
const env0_0 = a1;
const resourceChannels = GuildOnboardingHomeSettingsStore.getResourceChannels(a0);
const index = resourceChannels.findIndex(function({channelId}) {
return channelId === require;
});
return index < 0 ? [null, null] : [resourceChannels[index], resourceChannels[(index + 1) % resourceChannels.length]];
}
function usePreviousAndNextResourceChannel(a0, a1) { // fn#90410, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11991:405, offset: 0x020385cc, size: 201 bytes, params: 3, frame: 15
var r0;
var length;
var value2;
const env0_0 = a0;
const env0_1 = a1;
const fluxModule = require(566) /* metro dependency 566: flux */;
const useStateFromStores = fluxModule.useStateFromStores;
let items2 = [GuildOnboardingHomeSettingsStore];
const resourceChannels = Reflect.apply(useStateFromStores, fluxModule, [items2, _fun90411]);
let value = resourceChannels.findIndex(function({channelId}) {
return channelId === require;
});
if (value < 0) {
r0 = [null, null];
} else {
length = resourceChannels.length;
if (length <= 1) {
r0 = [null, null];
} else {
length = resourceChannels.length;
if (length === 2) {
r0 = [null, resourceChannels[1 - value]];
} else {
value2 = value - 1;
length = resourceChannels.length;
items2 = [resourceChannels[value2 % length]];
value += 1;
length = resourceChannels.length;
items2[1] = resourceChannels[value % length];
r0 = items2;
}
}
}
return r0;
}
function _fun90411() { // fn#90411, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11991:491, offset: 0x02038695, size: 27 bytes, params: 1, frame: 11
return GuildOnboardingHomeSettingsStore.getResourceChannels(env0_0);
}
@@ -0,0 +1,21 @@
/* Metro module 4871; source: modules/guild_onboarding_home/guildHasOnboardingHome.tsx; dependencies: [661, 2] */
function _fun42674(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#42674, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5049:6, offset: 0x0113f59c, size: 127 bytes, params: 8, frame: 18
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const constantsModule = require(661) /* metro dependency 661: Constants */;
const env0_0 = constantsModule.GuildFeatures;
const env0_1 = constantsModule.FAVORITES;
const env0_2 = constantsModule.ME;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_onboarding_home/guildHasOnboardingHome.tsx');
exports.default = guildHasOnboardingHome;
}
function guildHasOnboardingHome(a0) { // fn#42675, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5049:245, offset: 0x0113f61b, size: 157 bytes, params: 2, frame: 13
let r0 = a0 == null || a0.id === ME;
r0 = !r0 ? a0.id === FAVORITES : r0;
r0 = !r0 ? !a0.features.has(GuildFeatures.COMMUNITY) : r0;
r0 = !r0 ? !a0.features.has(GuildFeatures.GUILD_SERVER_GUIDE) : r0;
r0 = !r0 ? !a0.features.has(GuildFeatures.GUILD_ONBOARDING) : r0;
return !r0;
}
@@ -0,0 +1,36 @@
/* Metro module 4868; source: modules/guild_onboarding_home/hasPendingMemberAction.tsx; dependencies: [1379, 1945, 1867, 4869, 4870, 661, 3772, 4871, 1391, 2] */
function _fun42627(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#42627, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5046:6, offset: 0x0113e7ad, size: 227 bytes, params: 8, frame: 19
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const guildMemberStore = importDefault(1945) /* metro dependency 1945: GuildMemberStore */;
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
const guildOnboardingHomeSettingsStore = importDefault(4869) /* metro dependency 4869: GuildOnboardingHomeSettingsStore */;
const guildOnboardingMemberActionStore = importDefault(4870) /* metro dependency 4870: GuildOnboardingMemberActionStore */;
const env0_8 = (require(661) /* metro dependency 661: Constants */).GuildFeatures;
const env0_9 = (require(3772) /* metro dependency 3772: GuildMemberConstants */).GuildMemberFlags;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_onboarding_home/hasPendingMemberAction.tsx');
exports.hasPendingMemberAction = hasPendingMemberAction;
}
function hasPendingMemberAction(a0, a1) { // fn#42628, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5046:312, offset: 0x0113e890, size: 271 bytes, params: 3, frame: 20
var value8;
var moduleValue;
var hasFlag;
var value9;
const guild = GuildStore.getGuild(a0);
const channel = ChannelStore.getChannel(a1);
let r0 = guild != null && channel != null && (importDefault(4871) /* metro dependency 4871: guildHasOnboardingHome */)(guild) && guild.features.has(GuildFeatures.GUILD_SERVER_GUIDE);
if (r0) {
value8 = undefined;
moduleValue = importAll(1391) /* metro dependency 1391: FlagUtils */;
hasFlag = moduleValue.hasFlag;
value9 = GuildMemberStore.getSelfMember(guild.id);
r0 = !Reflect.apply(hasFlag, moduleValue, [(value9 == null ? value8 : value9.flags) ?? 0,
GuildMemberFlags.COMPLETED_HOME_ACTIONS]);
}
r0 = r0 && GuildOnboardingHomeSettingsStore.hasMemberAction(guild.id,
channel.id) && !GuildOnboardingMemberActionStore.hasCompletedActionForChannel(guild.id, channel.id);
return r0;
}
@@ -0,0 +1,122 @@
/* Metro module 11276; source: modules/guild_onboarding_home/isSelectedFromHomeChannel.native.tsx; dependencies: [4791, 1934, 1386, 4008, 4007, 2] */
function _fun86115(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#86115, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11462:6, offset: 0x01f883f4, size: 144 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importDefault(4791) /* metro dependency 4791: ChannelSectionStore */;
importDefault(1934) /* metro dependency 1934: SelectedChannelStore */;
const env0_2 = (require(1386) /* metro dependency 1386: ChannelConstants */).isGuildHomeChannel;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_onboarding_home/isSelectedFromHomeChannel.native.tsx');
exports.default = isSelectedFromHomeChannel;
}
function isSelectedFromHomeChannel(a0) { // fn#86116, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11462:258, offset: 0x01f88484, size: 380 bytes, params: 2, frame: 25
var r8;
var r0;
var getRootState;
var value3;
var moduleValue2;
var coerceMainRoute;
var routes;
var index;
var value4;
var state;
var property;
var moduleValue3;
var coerceChannelRoute;
var value5;
var params;
var channelId;
var id;
var moduleValue4;
var value6;
var value7;
var guildId;
var guild_id;
var value8;
var isGuildHomeChannelBinding;
let value = environment;
const rootNavigationRef = (require(4008) /* metro dependency 4008: RootNavigationRefNative */).getRootNavigationRef();
if (rootNavigationRef != null) {
reducibleJoin18: while (true) {
if (rootNavigationRef.isReady()) {
getRootState = rootNavigationRef.getRootState;
value3 = Reflect.apply(getRootState, rootNavigationRef, []);
if (value3 == null) {
return false;
}
moduleValue2 = require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */;
coerceMainRoute = moduleValue2.coerceMainRoute;
routes = value3.routes;
index = value3.index;
value4 = Reflect.apply(coerceMainRoute, moduleValue2, [routes[index]]);
if (value4 == null) {
return false;
}
state = value4.state;
if (state == null) {
return false;
}
index = state.index;
if (index >= 0) {
r8 = index;
reducibleLoop6: while (true) {
routes = state.routes;
property = routes[r8];
if (property != null) {
moduleValue3 = require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */;
coerceChannelRoute = moduleValue3.coerceChannelRoute;
value5 = Reflect.apply(coerceChannelRoute, moduleValue3, [property]);
reducibleJoin10: while (true) {
if (value5 == null) {
break reducibleJoin10;
}
params = value5.params;
channelId = params.channelId;
id = a0.id;
if (channelId !== id) {
break reducibleJoin10;
}
moduleValue4 = require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */;
coerceChannelRoute = moduleValue4.coerceChannelRoute;
routes = state.routes;
value6 = Reflect.apply(coerceChannelRoute, moduleValue4, [routes[r8 - 1]]);
if (value6 != null) {
break reducibleLoop6;
}
break reducibleJoin10;
}
}
value7 = typeof r8 === 'bigint' ? r8 - 1n : +r8 - 1;
if (!(value7 >= 0)) {
return false;
}
r8 = value7;
continue reducibleLoop6;
}
params = value6.params;
guildId = params.guildId;
guild_id = a0.guild_id;
value8 = guildId === guild_id;
reducibleJoin14: while (true) {
if (value8) {
isGuildHomeChannelBinding = isGuildHomeChannel;
params = value6.params;
channelId = params.channelId;
value = isGuildHomeChannelBinding(channelId);
r0 = value;
break reducibleJoin14;
}
r0 = value8;
break reducibleJoin14;
}
return r0;
}
return false;
}
break reducibleJoin18;
}
}
return false;
}
@@ -0,0 +1,222 @@
/* Metro module 14991; source: modules/guild_onboarding_home/native/GuildHomeResources.tsx; dependencies: [31, 27, 1379, 1935, 4814, 3784, 661, 33, 4501, 697, 566, 9587, 11555, 14992, 7067, 11806, 1423, 5278, 4573, 6622, 14986, 1230, 1244, 14993, 4578, 2] */
function _fun113302(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#113302, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15188:6, offset: 0x023f36a7, size: 499 bytes, params: 8, frame: 24
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
const env0_4 = value.View;
const env0_5 = value.Image;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const guildChannelStore = importDefault(1935) /* metro dependency 1935: GuildChannelStore */;
const messageStore = importDefault(4814) /* metro dependency 4814: MessageStore */;
const permissionStore = importDefault(3784) /* metro dependency 3784: PermissionStore */;
value = require(661) /* metro dependency 661: Constants */;
const env0_10 = value.Permissions;
const env0_11 = value.Routes;
value = require(33) /* metro dependency 33 */;
const env0_12 = value.jsx;
const env0_13 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
const object = {'backgroundColor': null, 'marginBottom': 8, 'padding': 12, 'borderRadius': null, 'display': 'flex',
'flexDirection': 'row', 'alignItems': 'flex-start'};
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object.backgroundColor = BACKGROUND_BASE_LOW;
object.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
const env0_14 = Reflect.apply(createStyles, value, [{container: {'paddingHorizontal': 12, 'display': 'flex',
'flexDirection': 'column', 'alignItems': 'center'}, emptyStateContainer: {'padding': 20, 'display': 'flex',
'flexDirection': 'column', 'alignItems': 'center'}, channelContainer: object, messageContent: {marginTop: 8},
textContent: {flex: 1}, thumbnail: {marginLeft: 8}, emptyStateImage: {'marginTop': 12, 'marginBottom': 20},
icon: {'width': 72, 'height': 72}}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_onboarding_home/native/GuildHomeResources.tsx');
exports.default = GuildHomeResources;
}
function ResourceChannelRow({channelId, title, icon, description}) { // fn#113303, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15188:780, offset: 0x023f389a, size: 1166 bytes, params: 2, frame: 42
var r22;
var r20;
var r6;
var resourceChannelIconURL;
var PressableOpacity;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
var items3;
var defaultImport2;
var defaultImport3;
var items2;
const ForumPostMediaThumbnail = (require(11555) /* metro dependency 11555: ForumPostMedia */).ForumPostMediaThumbnail;
var object;
var moduleValue7;
const styles = useStyles();
const channel = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], function() {
return ChannelStore.getChannel(channelId);
});
const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStores([PermissionStore], function() {
var VIEW_CHANNEL = Permissions.VIEW_CHANNEL;
return PermissionStore.can(VIEW_CHANNEL, channel);
});
const messages = (require(566) /* metro dependency 566: flux */).useStateFromStores([MessageStore], function() {
return MessageStore.getMessages(channelId);
});
const value4 = messages.first();
const value5 = (require(9587) /* metro dependency 9587: ForumPostMediaUtils */).useForumPostMediaProperties(value4,
false);
const value6 = (require(9587) /* metro dependency 9587: ForumPostMediaUtils */).useFirstMediaIsEmbed(value4, false);
const r17 = value5?.length > 0 ? value5[0] : null;
const forumPostMediaModule = require(11555) /* metro dependency 11555: ForumPostMedia */;
const useSharedMediaProps = forumPostMediaModule.useSharedMediaProps;
const shouldObscure = Reflect.apply(useSharedMediaProps, forumPostMediaModule, [{channel: channel,
media: r17}]).shouldObscure;
const value8 = (importDefault(14992) /* metro dependency 14992: useFirstMessageOrEmbedContent */)(value4);
let r5 = channel != null && messages.first() == null && !messages.loadingMore;
r5 = r5 && !messages.ready && !messages.hasFetched;
let binding = env0_3;
binding.useEffect(_fun113307, [channelId, r5]);
binding = env0_3;
const useCallback = binding.useCallback;
if (channel != null) {
if (value3) {
resourceChannelIconURL = (importDefault(1423) /* metro dependency 1423: AvatarUtils */).getResourceChannelIconURL({channelId: channel.id,
icon: icon});
r22 = description == null || description.length === 0;
PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
var pressableOpacityProps = {onPress: Reflect.apply(useCallback, binding, [_fun113308, [channel]]),
style: styles.channelContainer};
var viewBindingProps = {style: styles.textContent};
items3 = [<Text variant="heading-md/extrabold" color="mobile-text-heading-primary">{title}</Text>];
r20 = r22 && value8 != null;
if (r20) {
var textProps = {'variant': 'text-sm/normal', 'color': 'text-default', 'style': null, 'lineClamp': 3,
'ellipsizeMode': 'tail', style: styles.messageContent};
defaultImport2 = importDefault(6622) /* metro dependency 6622: MarkupUtils */;
r20 = <Text {...textProps}>{defaultImport2.parse(value8, true, {guildId: channel.guild_id,
channelId: channel.id})}</Text>;
}
items3[1] = r20;
if (r22) {
r20 = !r22;
} else {
var textProps = {'variant': 'text-sm/normal', 'color': 'text-default', 'style': null, 'lineClamp': 3,
'ellipsizeMode': 'tail', style: styles.messageContent};
defaultImport3 = importDefault(6622) /* metro dependency 6622: MarkupUtils */;
r20 = <Text {...textProps}>{defaultImport3.parse(description, true, {guildId: channel.guild_id,
channelId: channel.id})}</Text>;
}
items3[2] = r20;
items2 = [<View {...viewBindingProps}>{items3}</View>];
items2[1] = icon != null && resourceChannelIconURL != null ? <Image source={{uri: resourceChannelIconURL}} style={styles.icon} /> : null;
if (resourceChannelIconURL != null) {
r6 = null;
} else if (value4 == null) {
r6 = null;
} else if (value4 == null) {
if (r17 == null) {
r6 = null;
} else {
object = {channel: channel, media: r17, isEmbed: value6};
moduleValue7 = require(9587) /* metro dependency 9587: ForumPostMediaUtils */;
object.embedLeftBorderColor = moduleValue7.getEmbedColor(value4,
shouldObscure != null && shouldObscure);
object.firstMessageId = value4?.id;
object.containerStyle = styles.thumbnail;
r6 = <ForumPostMediaThumbnail {...object} />;
}
} else if (value4.blocked) {
r6 = null;
} else if (r17 == null) {
r6 = null;
} else {
object = {channel: channel, media: r17, isEmbed: value6};
moduleValue7 = require(9587) /* metro dependency 9587: ForumPostMediaUtils */;
object.embedLeftBorderColor = moduleValue7.getEmbedColor(value4,
shouldObscure != null && shouldObscure);
object.firstMessageId = value4?.id;
object.containerStyle = styles.thumbnail;
r6 = <ForumPostMediaThumbnail {...object} />;
}
items2[2] = r6;
return (
<PressableOpacity {...pressableOpacityProps}>
{items2}
</PressableOpacity>
);
}
}
return null;
}
function GuildHomeResources({guildId}) { // fn#113309, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15188:2627, offset: 0x023f3df5, size: 400 bytes, params: 2, frame: 26
var view;
var Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var items2;
var Button;
const styles = useStyles();
const value2 = (importDefault(14986) /* metro dependency 14986: useResourceChannels */)(guildId);
if (value2.length === 0) {
var viewBindingProps = {style: styles.emptyStateContainer};
Text = (require(4573) /* metro dependency 4573: Text */).Text;
string = intl.string;
items2 = [<Text variant="heading-xl/bold" color="mobile-text-heading-primary">{Reflect.apply(string, intl,
[t.owvC9U])}</Text>];
items2[1] = <Image style={styles.emptyStateImage} source={importDefault(14993) /* metro dependency 14993 */} />;
Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
string = intl.string;
items2[2] = <Button onPress={function() {
var value3 = GuildChannelStore.getDefaultChannel(guildId);
if (value3 != null) {
require(dependencyMap[21]).transitionTo(Routes.CHANNEL(guildId, value3.id));
}
}} text={Reflect.apply(string, intl, [t['3iCBUn']])} />;
view = <View {...viewBindingProps}>{items2}</View>;
} else {
view = <View style={styles.container}>{value2.map(_fun113311)}</View>;
}
return view;
}
function _fun113307() { // fn#113307, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15188:1338, offset: 0x023f3d69, size: 72 bytes, params: 1, frame: 13
var value2;
var defaultImport;
var fetchMessages;
var channelIdBinding;
if (env0_2) {
value2 = environment.__proto__;
defaultImport = importDefault(7067) /* metro dependency 7067: MessageActionCreators */;
fetchMessages = defaultImport.fetchMessages;
channelIdBinding = channelId;
Reflect.apply(fetchMessages, defaultImport, [{channelId: channelIdBinding, after: channelIdBinding, limit: 5}]);
}
}
function _fun113308() { // fn#113308, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15188:1430, offset: 0x023f3db1, size: 68 bytes, params: 1, frame: 13
var value2;
var moduleValue;
var selectHomeResourceChannel;
let channelBinding = channel;
if (channelBinding != null) {
value2 = environment.__proto__;
moduleValue = require(11806) /* metro dependency 11806: GuildOnboardingHomeActionCreators */;
selectHomeResourceChannel = moduleValue.selectHomeResourceChannel;
channelBinding = channel;
Reflect.apply(selectHomeResourceChannel, moduleValue, [channelBinding.guild_id, channelBinding.id]);
}
}
function _fun113311(a0) { // fn#113311, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15188:3136, offset: 0x023f3fe2, size: 92 bytes, params: 2, frame: 16
const value = environment.__proto__;
return (
<ResourceChannelRow
channelId={a0.channelId}
title={a0.title}
icon={a0.icon}
description={a0.description}
key={'resource-' + a0.channelId}
/>
);
}
@@ -0,0 +1,462 @@
/* Metro module 15718; source: modules/guild_onboarding_home/native/GuildOnboardingHomeManager.tsx; dependencies: [57, 5, 7, 6, 15, 17, 18, 1937, 1226, 1379, 1945, 1867, 3969, 4869, 4870, 3772, 1391, 5080, 15719, 1962, 11807, 676, 11806, 5103, 5104, 4860, 2] */
function _fun120664(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#120664, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15926:6, offset: 0x025329c0, size: 412 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
const env0_4 = importDefault(5) /* metro dependency 5 */;
const env0_5 = importDefault(7) /* metro dependency 7 */;
const env0_6 = importDefault(6) /* metro dependency 6 */;
const env0_7 = importDefault(15) /* metro dependency 15 */;
const env0_8 = importDefault(17) /* metro dependency 17 */;
const env0_9 = importDefault(18) /* metro dependency 18 */;
const impersonateStore = importDefault(1937) /* metro dependency 1937: ImpersonateStore */;
const authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const guildMemberStore = importDefault(1945) /* metro dependency 1945: GuildMemberStore */;
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
const selectedGuildStore = importDefault(3969) /* metro dependency 3969: SelectedGuildStore */;
const guildOnboardingHomeSettingsStore = importDefault(4869) /* metro dependency 4869: GuildOnboardingHomeSettingsStore */;
const guildOnboardingMemberActionStore = importDefault(4870) /* metro dependency 4870: GuildOnboardingMemberActionStore */;
const env0_18 = (require(3772) /* metro dependency 3772: GuildMemberConstants */).GuildMemberFlags;
let value = importDefault(4860) /* metro dependency 4860: AutomaticLifecycleManager */;
value = _fun120668(value);
value = new value();
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_onboarding_home/native/GuildOnboardingHomeManager.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_120665() { // fn#120665, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15926:281, offset: 0x02532b5c, size: 98 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
}
return (_isNativeReflectConstruct_120665_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun120668(a0) { // fn#120668, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15926:480, offset: 0x02532bbe, size: 42 bytes, params: 2, frame: 14
const closure = GuildOnboardingHomeManager;
env0_9(closure, a0);
return env0_5(closure);
}
function GuildOnboardingHomeManager(a0) { // fn#120669, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15926:492, offset: 0x02532be8, size: 396 bytes, params: 2, frame: 20
var r0;
var Reflect;
let value = copyRestArgs(0, undefined);
let binding = env1_6;
binding(this, GuildOnboardingHomeManager);
const items = [];
arraySpread(items, value, 0, items);
value = env1_8(GuildOnboardingHomeManager);
binding = env1_7;
if (_isNativeReflectConstruct_120665()) {
Reflect = global.Reflect;
value = Reflect.construct(value, items, env1_8(this).constructor);
r0 = value;
} else {
value = value.apply(this, items);
r0 = value;
}
value = binding(this, r0);
const Set = global.Set;
const value4 = Object.create(Set.prototype, {constructor: {value: Set}});
const set = new Set();
value.onboardingCompleteGuilds = set instanceof Object ? set : value4;
value.actions = {POST_CONNECTION_OPEN: POST_CONNECTION_OPEN_120670, GUILD_MEMBER_UPDATE: GUILD_MEMBER_UPDATE_120671,
GUILD_DELETE: GUILD_DELETE_120672, CHANNEL_SELECT: CHANNEL_SELECT_120673, MESSAGE_CREATE: MESSAGE_CREATE_120674,
THREAD_CREATE: THREAD_CREATE_120675};
value.handlePostConnectionOpen = handlePostConnectionOpen_120676;
value.handleGuildMemberUpdate = handleGuildMemberUpdate_120677;
value.handleGuildDelete = handleGuildDelete_120678;
value.handleChannelSelect = _fun120679();
value.handleMessageSend = handleMessageSend;
value.handleThreadCreate = handleThreadCreate;
value._completeChatAction = _fun120686();
value._getOrLoadOnboardingMemberActions = _fun120691();
value._getOrLoadOnboardingHomeSettings = _fun120695();
value._getOrLoadMemberActions = _fun120699();
return value;
}
function GuildOnboardingHomeManagerGUILD_MEMBER_UPDATE(a0) { // fn#120671, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15926:876, owner: GuildOnboardingHomeManager.GUILD_MEMBER_UPDATE, offset: 0x02532d74, size: 23 bytes, params: 2, frame: 11
return env0_0.handleGuildMemberUpdate(a0);
}
function GuildOnboardingHomeManagerMESSAGE_CREATE(a0) { // fn#120674, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15926:1005, owner: GuildOnboardingHomeManager.MESSAGE_CREATE, offset: 0x02532d8b, size: 23 bytes, params: 2, frame: 11
return env0_0.handleMessageSend(a0);
}
function GuildOnboardingHomeManagerHandlePostConnectionOpen() { // fn#120676, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15926:1100, owner: GuildOnboardingHomeManager.handlePostConnectionOpen, offset: 0x02532da2, size: 190 bytes, params: 1, frame: 26
var r8;
var flags;
var r12;
var propertyName;
var propertyName2;
var selfMember;
var moduleValue;
var hasFlag;
var value6;
var COMPLETED_HOME_ACTIONS;
var onboardingCompleteGuilds;
let value = environment.__proto__.__proto__;
const guilds = GuildStore.getGuilds();
const value4 = undefined;
for (propertyName in guilds) {
selfMember = GuildMemberStore.getSelfMember(propertyName);
moduleValue = require(1391) /* metro dependency 1391: FlagUtils */;
hasFlag = moduleValue.hasFlag;
if (selfMember == null) {
flags = value4;
continue;
}
flags = selfMember.flags;
value6 = 0;
if (flags != null) {
r12 = flags;
continue;
}
r12 = value6;
continue;
COMPLETED_HOME_ACTIONS = GuildMemberFlags.COMPLETED_HOME_ACTIONS;
if (!Reflect.apply(hasFlag, moduleValue, [r12, COMPLETED_HOME_ACTIONS])) {
r8 = propertyName2;
continue;
}
onboardingCompleteGuilds = env0_0.onboardingCompleteGuilds;
onboardingCompleteGuilds.add(propertyName);
r8 = propertyName2;
}
value = SelectedGuildStore.getGuildId();
if (value != null) {
env0_0._getOrLoadOnboardingMemberActions(value);
}
return value4;
}
function GuildOnboardingHomeManagerHandleGuildMemberUpdate({flags, user, guildId}) { // fn#120677, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15926:1379, owner: GuildOnboardingHomeManager.handleGuildMemberUpdate, offset: 0x02532e60, size: 366 bytes, params: 2, frame: 22
var r1;
var newMemberActions;
var defaultImport;
var pushLazy;
var object3;
var NEW_MEMBER_ACTION_COMPLETE_MODAL_KEY;
var object4;
const id = user.id;
let value = environment.__proto__.__proto__;
const getId = AuthenticationStore.getId;
if (id === Reflect.apply(getId, AuthenticationStore, [])) {
var onboardingCompleteGuilds = env0_0.onboardingCompleteGuilds;
if (onboardingCompleteGuilds.has(guildId)) {
return undefined;
}
var value3 = undefined;
var moduleValue = require(dependencyMap[16]);
var hasFlag = moduleValue.hasFlag;
var value4 = 0;
var r7 = flags ?? value4;
var COMPLETED_HOME_ACTIONS = GuildMemberFlags.COMPLETED_HOME_ACTIONS;
if (Reflect.apply(hasFlag, moduleValue, [r7, COMPLETED_HOME_ACTIONS])) {
env0_0.onboardingCompleteGuilds.add(guildId);
newMemberActions = GuildOnboardingHomeSettingsStore.getNewMemberActions(guildId);
r1 = (newMemberActions == null ? value3 : newMemberActions.length) ?? value4;
if (value4 === r1) {
return value3;
}
defaultImport = importDefault(dependencyMap[17]);
pushLazy = defaultImport.pushLazy;
value = require(dependencyMap[19]);
value = value(dependencyMap[18], dependencyMap.paths);
object3 = {initialPercent: (r1 - 1) / r1, numActions: r1};
NEW_MEMBER_ACTION_COMPLETE_MODAL_KEY = require(dependencyMap[20]).NEW_MEMBER_ACTION_COMPLETE_MODAL_KEY;
object4 = {};
object4.animation = require(dependencyMap[21]).ModalAnimation.FADE;
Reflect.apply(pushLazy, defaultImport, [value, object3, NEW_MEMBER_ACTION_COMPLETE_MODAL_KEY, object4]);
return undefined;
}
}
}
function GuildOnboardingHomeManagerHandleGuildDelete({guild}) { // fn#120678, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15926:1842, owner: GuildOnboardingHomeManager.handleGuildDelete, offset: 0x02532fce, size: 40 bytes, params: 2, frame: 11
env0_0.onboardingCompleteGuilds.delete(guild.id);
}
function _fun120679() { // fn#120679, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15926:1919, offset: 0x02532ff6, size: 36 bytes, params: 1, frame: 12
const env0_0 = env2_4(_fun120681);
return _fun120683;
}
function handleMessageSend({guildId, channelId, message}) { // fn#120684, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15926:2334, owner: GuildOnboardingHomeManager.handleMessageSend, offset: 0x0253312c, size: 179 bytes, params: 2, frame: 17
var id;
var r1;
var author;
var value;
var value2;
var channel;
var binding;
if (guildId != null) {
if (channelId != null) {
author = message.author;
value = undefined;
id = author == null ? value : author.id;
value2 = environment.__proto__.__proto__;
if (id === AuthenticationStore.getId()) {
channel = ChannelStore.getChannel(channelId);
r1 = channel != null && channel.isForumPost();
r1 = r1 && (channel == null ? value : channel.parent_id) != null;
if (r1) {
binding = env0_0;
binding._completeChatAction(guildId, channel.parent_id);
}
binding = env0_0;
binding._completeChatAction(guildId, channelId);
}
}
}
}
function handleThreadCreate({channel, isNewlyCreated}) { // fn#120685, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15926:2616, owner: GuildOnboardingHomeManager.handleThreadCreate, offset: 0x025331df, size: 146 bytes, params: 2, frame: 16
var r4;
var value2;
var value3;
var binding;
let r2 = isNewlyCreated && channel.parent_id != null;
const value = undefined;
if (r2) {
value2 = environment.__proto__.__proto__;
value3 = ChannelStore.getChannel(channel.parent_id);
r2 = value3 != null;
r4 = value3;
} else {
r4 = value;
}
r2 = r2 && r4.isForumLikeChannel() && channel.ownerId === AuthenticationStore.getId();
if (r2) {
binding = env0_0;
binding._completeChatAction(channel.guild_id, channel.parent_id);
}
return value;
}
function _fun120686() { // fn#120686, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15926:2830, offset: 0x02533271, size: 36 bytes, params: 1, frame: 12
const env0_0 = env2_4(_fun120688);
return _fun120690;
}
function _fun120691() { // fn#120691, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15926:3219, offset: 0x02533379, size: 36 bytes, params: 1, frame: 12
const env0_0 = env2_4(_fun120693);
return _fun120694;
}
function _fun120695() { // fn#120695, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15926:3656, offset: 0x025334a8, size: 36 bytes, params: 1, frame: 12
const env0_0 = env2_4(_fun120697);
return _fun120698;
}
function _fun120699() { // fn#120699, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15926:3963, offset: 0x02533572, size: 36 bytes, params: 1, frame: 12
const env0_0 = env2_4(_fun120701);
return _fun120702;
}
async function _fun120681({guildId, channelId}) { // fn#120681, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15926:1939, offset: 0x0253302e, size: 254 bytes, params: 2, frame: 21
var environment;
var r5;
var value13;
if (false) {
return undefined;
}
value = undefined;
await value;
if (false) {
return undefined;
}
if (guildId != null) {
if (channelId == null) {
return value;
}
await GuildOnboardingHomeManager._getOrLoadOnboardingMemberActions(guildId);
if (false) {
return undefined;
}
var memberActions = undefined.memberActions;
var completedActions = undefined.completedActions;
r5 = memberActions == null ? value : memberActions.find(function({channelId}) {
return channelId === channelId;
});
var r4 = (completedActions == null ? value : completedActions[channelId]) !== true && r5 != null;
r4 = r4 && r5.actionType === env4_0(env4_2[20]).NewMemberActionTypes.VIEW;
if (r4) {
value13 = environment.__proto__.__proto__.__proto__.__proto__;
env4_0(env4_2[22]).completeNewMemberAction(guildId, channelId);
}
}
return value;
}
function* _fun120688(a0, a1) { // fn#120688, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15926:2850, offset: 0x025332a0, size: 217 bytes, params: 3, frame: 20
var environment;
var r4;
var value9;
if (false) {
return undefined;
}
const env0_0 = a1;
value = environment.__proto__.__proto__;
yield GuildOnboardingHomeManager._getOrLoadOnboardingMemberActions(a0);
value = undefined;
if (true) {
var memberActions = value.memberActions;
var completedActions = value.completedActions;
value = undefined;
r4 = memberActions == null ? value : memberActions.find(function({channelId}) {
return channelId === require;
});
var r3 = (completedActions == null ? value : completedActions[a1]) !== true && r4 != null;
r3 = r3 && r4.actionType === env4_0(env4_2[20]).NewMemberActionTypes.CHAT;
if (r3) {
value9 = environment.__proto__.__proto__.__proto__.__proto__;
env4_0(env4_2[22]).completeNewMemberAction(a0, a1);
}
}
return value;
}
function* _fun120693(a0) { // fn#120693, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15926:3239, offset: 0x025333a8, size: 256 bytes, params: 2, frame: 19
var selfMember;
var value5;
var Promise;
var all;
var value6;
var items;
var value8;
if (false) {
return undefined;
}
value = environment.__proto__.__proto__.__proto__.__proto__;
let binding = env4_0;
if (binding(env4_2[23]).canSeeOnboardingHome(a0)) {
binding = env4_13;
selfMember = binding.getSelfMember(a0);
if (selfMember == null) {
return {};
}
binding = env4_0;
value5 = binding(env4_2[24]);
if (value5.getIsNewMember(a0)) {
Promise = global.Promise;
all = Promise.all;
value6 = environment.__proto__.__proto__;
items = [GuildOnboardingHomeManager._getOrLoadOnboardingHomeSettings(a0)];
items[1] = GuildOnboardingHomeManager._getOrLoadMemberActions(a0, selfMember);
yield Reflect.apply(all, Promise, [items]);
value8 = undefined;
if (false) {
return value8;
}
value = env4_3(value8, 2);
return {memberActions: value[0], completedActions: value[1]};
}
} else if (env4_10.isFullServerPreview(a0)) {
binding = env4_13;
selfMember = binding.getSelfMember(a0);
if (selfMember == null) {
return {};
}
binding = env4_0;
value5 = binding(env4_2[24]);
if (value5.getIsNewMember(a0)) {
Promise = global.Promise;
all = Promise.all;
value6 = environment.__proto__.__proto__;
items = [GuildOnboardingHomeManager._getOrLoadOnboardingHomeSettings(a0)];
items[1] = GuildOnboardingHomeManager._getOrLoadMemberActions(a0, selfMember);
yield Reflect.apply(all, Promise, [items]);
value8 = undefined;
if (false) {
return value8;
}
value = env4_3(value8, 2);
return {memberActions: value[0], completedActions: value[1]};
}
return {};
}
return {};
}
function* _fun120697(a0) { // fn#120697, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15926:3676, offset: 0x025334d7, size: 155 bytes, params: 2, frame: 16
if (false) {
return undefined;
}
value = environment.__proto__.__proto__.__proto__.__proto__;
let binding = env4_16;
const newMemberActions = binding.getNewMemberActions(a0);
if (newMemberActions == null) {
if (binding.getIsLoading(a0)) {
return newMemberActions;
}
binding = env4_0;
var value5 = undefined;
var value6 = binding(env4_2[24]);
var getIsNewMember = value6.getIsNewMember;
if (Reflect.apply(getIsNewMember, value6, [a0])) {
value = env4_0(env4_2[22]);
yield value.fetchGuildHomeSettings(a0);
value = undefined;
if (false) {
return value;
}
return value == null ? value5 : value.newMemberActions;
}
}
return newMemberActions;
}
function* _fun120701(a0, {flags}) { // fn#120701, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15926:3983, offset: 0x025335a1, size: 184 bytes, params: 3, frame: 20
if (false) {
return undefined;
}
value = environment.__proto__.__proto__.__proto__.__proto__;
const {completedActions, loading} = env4_17.getState(a0);
if (completedActions == null) {
if (loading) {
return completedActions;
}
var value4 = env4_0(env4_2[16]);
var hasFlag = value4.hasFlag;
var r7 = flags ?? 0;
var STARTED_HOME_ACTIONS = env4_18.STARTED_HOME_ACTIONS;
if (Reflect.apply(hasFlag, value4, [r7, STARTED_HOME_ACTIONS])) {
value = env4_0(env4_2[22]);
yield value.fetchNewMemberActions(a0);
value = undefined;
if (false) {
return value;
}
return value;
}
}
return completedActions;
}
@@ -0,0 +1,100 @@
/* Metro module 14977; source: modules/guild_onboarding_home/native/GuildOnboardingHomePage.tsx; dependencies: [31, 4107, 4869, 4870, 661, 33, 4017, 566, 5104, 11806, 683, 4863, 6593, 14978, 14979, 14984, 14988, 14989, 14991, 5103, 2] */
function _fun113236(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#113236, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15174:6, offset: 0x023f0279, size: 261 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const experimentStore = importDefault(4107) /* metro dependency 4107: ExperimentStore */;
const guildOnboardingHomeSettingsStore = importDefault(4869) /* metro dependency 4869: GuildOnboardingHomeSettingsStore */;
const env0_6 = (require(4869) /* metro dependency 4869: GuildOnboardingHomeSettingsStore */).NO_SETTINGS;
const guildOnboardingMemberActionStore = importDefault(4870) /* metro dependency 4870: GuildOnboardingMemberActionStore */;
const env0_8 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
const value = require(33) /* metro dependency 33 */;
const env0_9 = value.jsx;
const env0_10 = value.Fragment;
const env0_11 = value.jsxs;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_onboarding_home/native/GuildOnboardingHomePage.tsx');
exports.default = GuildOnboardingHomePageGuard;
}
function GuildOnboardingHomePage({guildId}) { // fn#113237, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15174:223, offset: 0x023f037e, size: 534 bytes, params: 2, frame: 28
const value3 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(-999);
const settings = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildOnboardingHomeSettingsStore],
function() {
return GuildOnboardingHomeSettingsStore.getSettings(guildId);
});
const value4 = (importDefault(5104) /* metro dependency 5104: useIsNewMember */)(guildId);
const r1 = !value4 && ((settings == null || settings.resourceChannels == null ? undefined : settings.resourceChannels.length) ?? 0) === 0;
env0_3.useEffect(_fun113239, [guildId, settings, r1]);
env0_3.useEffect(_fun113240, [guildId, r1, settings]);
return r1 ? null : ((Component) => <Component guildId={guildId} scrollValue={value3}>{((Component) => <Component guildId={guildId} hideDescription={value4} />)(importDefault(14979) /* metro dependency 14979: GuildFeedBanner */)}{value4 ? <>{((Component) => <Component guildId={guildId} />)(importDefault(14984) /* metro dependency 14984: ResourcesRow */)}{((Component) => <Component guildId={guildId} />)(importDefault(14988) /* metro dependency 14988: HomeWelcomeMessage */)}{((Component) => <Component guildId={guildId} />)(importDefault(14989) /* metro dependency 14989: GuildOnboardingNewMemberActions */)}</> : ((Component) => <Component guildId={guildId} />)(importDefault(14991) /* metro dependency 14991: GuildHomeResources */)}</Component>)(importDefault(14978) /* metro dependency 14978: OnboardingHomeScrollView */);
}
function GuildOnboardingHomePageGuard({guildId}) { // fn#113241, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15174:1196, offset: 0x023f0730, size: 160 bytes, params: 2, frame: 19
env0_3.useEffect(_fun113243, [guildId,
(require(566) /* metro dependency 566: flux */).useStateFromStores([ExperimentStore], function() {
return ExperimentStore.hasLoadedExperiments;
}), (require(5103) /* metro dependency 5103: OnboardingHomeUtils */).useCanSeeOnboardingHome(guildId)]);
return <GuildOnboardingHomePage guildId={guildId} />;
}
function _fun113239() { // fn#113239, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15174:478, offset: 0x023f05af, size: 313 bytes, params: 1, frame: 23
var length;
var value3;
var defaultImport;
var track;
var SERVER_GUIDE_VIEWED;
var object2;
var moduleValue;
var newMemberActions;
var value4;
var Object;
var resourceChannels;
var moduleValue2;
if (settings === NO_SETTINGS) {
moduleValue2 = require(11806) /* metro dependency 11806: GuildOnboardingHomeActionCreators */;
moduleValue2.fetchGuildHomeSettings(guildId);
} else if (settings != null) {
value3 = undefined;
defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
track = defaultImport.track;
SERVER_GUIDE_VIEWED = AnalyticEvents.SERVER_GUIDE_VIEWED;
object2 = {};
moduleValue = require(4863) /* metro dependency 4863: AppAnalyticsUtils */;
copyDataProperties(object2, moduleValue.collectGuildAnalyticsMetadata(guildId), undefined);
newMemberActions = settings.newMemberActions;
length = newMemberActions == null ? value3 : newMemberActions.length;
value4 = 0;
object2['num_member_actions'] = length ?? value4;
Object = global.Object;
length = Object.keys(GuildOnboardingMemberActionStore.getCompletedActions(guildId) ?? ({})).length;
object2['num_member_actions_completed'] = length;
resourceChannels = settings.resourceChannels;
length = resourceChannels == null ? value3 : resourceChannels.length;
object2['num_resource_channels'] = length ?? value4;
Reflect.apply(track, defaultImport, [SERVER_GUIDE_VIEWED, object2]);
}
}
function _fun113240() { // fn#113240, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15174:915, offset: 0x023f06e8, size: 72 bytes, params: 1, frame: 12
var value4;
var defaultImport;
if (env0_2 && settings !== NO_SETTINGS) {
value4 = environment.__proto__;
defaultImport = importDefault(6593) /* metro dependency 6593: GuildActionCreators */;
defaultImport.escapeToDefaultChannel(guildId);
}
}
function _fun113243() { // fn#113243, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15174:1372, offset: 0x023f07df, size: 61 bytes, params: 1, frame: 12
var value2;
var defaultImport;
if (hasLoadedExperiments) {
if (!env0_2) {
value2 = environment.__proto__;
defaultImport = importDefault(6593) /* metro dependency 6593: GuildActionCreators */;
defaultImport.escapeToDefaultChannel(guildId);
}
}
}
@@ -0,0 +1,238 @@
/* Metro module 14989; source: modules/guild_onboarding_home/native/GuildOnboardingNewMemberActions.tsx; dependencies: [31, 27, 6540, 1379, 1945, 1867, 3784, 4869, 4870, 661, 1881, 3772, 33, 4501, 697, 566, 4805, 1423, 11806, 5475, 3797, 4573, 1305, 11427, 5278, 1244, 11811, 14990, 1391, 14771, 2] */
function _fun113287(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#113287, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15186:6, offset: 0x023f29c3, size: 637 bytes, params: 8, frame: 22
var object2;
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 emojiStore = importDefault(6540) /* metro dependency 6540: EmojiStore */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const guildMemberStore = importDefault(1945) /* metro dependency 1945: GuildMemberStore */;
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
const permissionStore = importDefault(3784) /* metro dependency 3784: PermissionStore */;
const guildOnboardingHomeSettingsStore = importDefault(4869) /* metro dependency 4869: GuildOnboardingHomeSettingsStore */;
const guildOnboardingMemberActionStore = importDefault(4870) /* metro dependency 4870: GuildOnboardingMemberActionStore */;
const env0_12 = (require(661) /* metro dependency 661: Constants */).Permissions;
const env0_13 = (require(1881) /* metro dependency 1881: EmojiConstants */).EMOJI_URL_BASE_SIZE;
const env0_14 = (require(3772) /* metro dependency 3772: GuildMemberConstants */).GuildMemberFlags;
let value = require(33) /* metro dependency 33 */;
const env0_15 = value.jsx;
const env0_16 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
object2.actionsContainer = {paddingHorizontal: 12};
object2.actionsHeader = {'display': 'flex', 'marginBottom': 16};
const object5 = {'backgroundColor': null, 'marginBottom': 8, 'padding': 12, 'borderRadius': null, 'display': 'flex',
'flexDirection': 'row', 'alignItems': 'center'};
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object5.backgroundColor = BACKGROUND_BASE_LOW;
object5.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object2.actionContainer = object5;
object2.channelNameContainer = {'flex': 1, 'marginHorizontal': 8};
const object6 = {'width': 40, 'height': 40};
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
object2.icon = object6;
object2.emoji = {'width': 40, 'height': 40};
object2.textEmoji = {'width': 40, 'textAlign': 'center'};
const BACKGROUND_BASE_LOWEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWEST;
object2.emojiPlaceholder = {'width': 40, 'height': 40, 'backgroundColor': null, 'borderRadius': 20,
'display': 'flex', 'alignItems': 'center', 'justifyContent': 'center', backgroundColor: BACKGROUND_BASE_LOWEST};
const env0_17 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_onboarding_home/native/GuildOnboardingNewMemberActions.tsx');
exports.default = GuildOnboardingNewMemberActions;
}
function MemberActionRow({channelId, title, emoji, icon, completed}) { // fn#113288, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15186:937, offset: 0x023f2c40, size: 1110 bytes, params: 2, frame: 33
var r6;
var defaultImport3;
var getByName;
var defaultImport4;
const Icon = require(dependencyMap[22]).Icon;
const Text = require(dependencyMap[21]).Text;
var defaultImport5;
var defaultImport6;
var PressableOpacity;
var items2;
var items3;
var intl;
const styles = useStyles();
let r0 = emoji ?? ({});
const id = r0.id;
const name = r0.name;
const channel = require(dependencyMap[15]).useStateFromStores([ChannelStore], function() {
return ChannelStore.getChannel(channelId);
});
const value3 = importDefault(dependencyMap[16])(channel, true);
const value4 = require(dependencyMap[15]).useStateFromStores([PermissionStore], function() {
var VIEW_CHANNEL = Permissions.VIEW_CHANNEL;
return PermissionStore.can(VIEW_CHANNEL, channel);
});
const value5 = require(dependencyMap[15]).useStateFromStores([EmojiStore], _fun113291, [id]);
const newMemberActionIconURL = importDefault(dependencyMap[17]).getNewMemberActionIconURL({channelId: channelId,
icon: icon});
const binding = env0_3;
const useCallback = binding.useCallback;
if (channel != null) {
if (value4) {
if (newMemberActionIconURL != null) {
r6 = ((Component) => <Component style={styles.icon} source={{uri: newMemberActionIconURL}} resizeMode="contain" />)(importDefault(dependencyMap[19]));
} else if (value5 != null) {
defaultImport5 = importDefault(dependencyMap[19]);
var defaultImport5Props = {style: styles.emoji};
defaultImport6 = importDefault(dependencyMap[17]);
defaultImport5Props.source = {uri: defaultImport6.getEmojiURL({id: value5.id, animated: value5.animated,
size: EMOJI_URL_BASE_SIZE})};
defaultImport5Props.resizeMode = 'contain';
r6 = ((Component) => <Component {...defaultImport5Props} />)(defaultImport5);
} else if (name == null) {
r6 = <View style={styles.emojiPlaceholder}><Icon size={require(dependencyMap[22]).Icon.Sizes.REFRESH_SMALL_16} source={importDefault(dependencyMap[23])} /></View>;
} else {
defaultImport3 = importDefault(dependencyMap[20]);
getByName = defaultImport3.getByName;
defaultImport4 = importDefault(dependencyMap[20]);
r6 = Reflect.apply(getByName, defaultImport3, [defaultImport4.convertSurrogateToName(name,
false)]) != null ? <Text style={styles.textEmoji} variant="heading-xxl/normal">{name}</Text> : <View style={styles.emojiPlaceholder}><Icon size={require(dependencyMap[22]).Icon.Sizes.REFRESH_SMALL_16} source={importDefault(dependencyMap[23])} /></View>;
}
PressableOpacity = require(dependencyMap[24]).PressableOpacity;
var pressableOpacityProps = {onPress: Reflect.apply(useCallback, binding, [_fun113292, [channel]]),
style: styles.actionContainer};
items2 = [r6];
var viewBindingProps = {style: styles.channelNameContainer};
items3 = [<Text variant="text-md/semibold" color="mobile-text-heading-primary">{title}</Text>];
intl = require(dependencyMap[25]).intl;
items3[1] = <Text variant="text-xs/normal" color="text-muted">{intl.format(require(dependencyMap[25]).t.MkzlDL,
{channelName: value3})}</Text>;
items2[1] = <View {...viewBindingProps}>{items3}</View>;
items2[2] = <Icon disableColor size={require(dependencyMap[22]).Icon.Sizes.MEDIUM} source={importDefault(completed ? dependencyMap[26] : dependencyMap[27])} />;
r0 = <PressableOpacity {...pressableOpacityProps}>{items2}</PressableOpacity>;
} else {
r0 = null;
}
} else {
r0 = null;
}
return r0;
}
function GuildOnboardingNewMemberActions({guildId}) { // fn#113293, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15186:2477, offset: 0x023f312c, size: 850 bytes, params: 2, frame: 34
var r6;
var r0;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var items2;
var value7;
var PressableOpacity;
var items3;
const styles = useStyles();
const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildOnboardingHomeSettingsStore],
function() {
return GuildOnboardingHomeSettingsStore.getNewMemberActions(guildId);
}, [guildId]);
const completedActions = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildOnboardingMemberActionStore],
function() {
return GuildOnboardingMemberActionStore.getCompletedActions(guildId);
});
const selfMember = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildMemberStore],
function() {
return GuildMemberStore.getSelfMember(guildId);
});
const guild = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildStore], function() {
return GuildStore.getGuild(guildId);
});
const env0_3 = guild;
let binding = env0_3;
binding.useEffect(_fun113298, [completedActions, guildId, selfMember?.flags]);
binding = env0_3;
const useCallback = binding.useCallback;
if (selfMember == null) {
r0 = null;
} else if (value3 == null) {
r0 = null;
} else if (value3.length === 0) {
r0 = null;
} else {
var viewBindingProps = {style: styles.actionsContainer};
items2 = [<View style={styles.actionsHeader}><Text variant="heading-lg/bold" color="mobile-text-heading-primary">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.LhlgY9)}</Text></View>];
items2[1] = value3.map(_fun113300);
value7 = guild?.rulesChannelId != null;
if (value7) {
PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
var pressableOpacityProps = {onPress: Reflect.apply(useCallback, binding, [_fun113299, [guild]]),
style: styles.actionContainer};
items3 = [<View style={styles.emojiPlaceholder}>{((Icon) => <Icon size={(require(1305) /* metro dependency 1305: native */).Icon.Sizes.REFRESH_SMALL_16} source={importDefault(14771) /* metro dependency 14771 */} />)((require(1305) /* metro dependency 1305: native */).Icon)}</View>];
items3[1] = <View style={styles.channelNameContainer}><Text variant="text-md/semibold" color="mobile-text-heading-primary">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['K/i3iQ'])}</Text></View>;
r6 = <PressableOpacity {...pressableOpacityProps}>{items3}</PressableOpacity>;
} else {
r6 = value7;
}
items2[2] = r6;
r0 = <View {...viewBindingProps}>{items2}</View>;
}
return r0;
}
function _fun113291() { // fn#113291, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15186:1229, offset: 0x023f30bc, size: 40 bytes, params: 1, frame: 12
const idBinding = id;
const value2 = null;
return value2 != idBinding ? EmojiStore.getCustomEmojiById(id) : value2;
}
function _fun113292() { // fn#113292, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15186:1352, offset: 0x023f30e4, size: 72 bytes, params: 1, frame: 13
var value2;
var moduleValue;
if (channel != null) {
value2 = environment.__proto__;
moduleValue = require(11806) /* metro dependency 11806: GuildOnboardingHomeActionCreators */;
moduleValue.selectNewMemberActionChannel(channel.guild_id, channel.id);
}
}
function _fun113298() { // fn#113298, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15186:2805, offset: 0x023f34cf, size: 160 bytes, params: 1, frame: 17
var value5;
var moduleValue;
var value7;
var moduleValue2;
let r1 = completedActions == null && selfMember?.flags != null;
if (r1) {
value5 = environment.__proto__;
moduleValue = require(1391) /* metro dependency 1391: FlagUtils */;
r1 = moduleValue.hasFlag(selfMember.flags ?? 0, GuildMemberFlags.STARTED_HOME_ACTIONS);
}
if (r1) {
value7 = environment.__proto__;
moduleValue2 = require(11806) /* metro dependency 11806: GuildOnboardingHomeActionCreators */;
moduleValue2.fetchNewMemberActions(guildId);
}
}
function _fun113299() { // fn#113299, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15186:3008, offset: 0x023f356f, size: 102 bytes, params: 1, frame: 14
var value5;
var moduleValue;
var selectNewMemberActionChannel;
if (guild != null && guild?.rulesChannelId != null) {
value5 = environment.__proto__;
moduleValue = require(11806) /* metro dependency 11806: GuildOnboardingHomeActionCreators */;
selectNewMemberActionChannel = moduleValue.selectNewMemberActionChannel;
guildBinding = guild;
Reflect.apply(selectNewMemberActionChannel, moduleValue, [guildBinding.id, guildBinding.rulesChannelId]);
}
}
function _fun113300(a0) { // fn#113300, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15186:3389, offset: 0x023f35d5, size: 140 bytes, params: 2, frame: 19
const value = environment.__proto__;
const r6 = completedActions?.[a0.channelId];
return (
<MemberActionRow
channelId={a0.channelId}
title={a0.title}
emoji={a0.emoji}
icon={a0.icon}
completed={r6 != null && r6}
key={'member-action-' + a0.channelId}
/>
);
}
@@ -0,0 +1,181 @@
/* Metro module 14988; source: modules/guild_onboarding_home/native/HomeWelcomeMessage.tsx; dependencies: [31, 27, 1867, 1878, 4869, 33, 4501, 697, 632, 8490, 8494, 6902, 8491, 3995, 3868, 673, 8417, 1305, 8511, 4573, 4617, 9098, 2] */
function _fun113279(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#113279, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15185:6, offset: 0x023f2070, size: 619 bytes, params: 8, frame: 23
var object2;
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 guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const guildOnboardingHomeSettingsStore = importDefault(4869) /* metro dependency 4869: GuildOnboardingHomeSettingsStore */;
let value = require(33) /* metro dependency 33 */;
const env0_8 = value.jsx;
const env0_9 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
object2.relativeContainer = {position: 'relative'};
const object7 = {'marginHorizontal': 12, 'marginVertical': 16, 'borderRadius': null, 'padding': 2,
'display': 'flex', 'flexDirection': 'column'};
object7.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object2.welcomeContainer = object7;
const object8 = {'borderRadius': null, 'backgroundColor': null, 'paddingHorizontal': 12, 'paddingBottom': 12,
'paddingTop': 4};
object8.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
let BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object8.backgroundColor = BACKGROUND_BASE_LOW;
object2.welcomeContent = object8;
const object9 = {'position': 'absolute', 'zIndex': 2, 'top': 0, 'left': 28, 'width': 40, 'height': 40};
object9.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object9.backgroundColor = BACKGROUND_BASE_LOW;
object2.avatarBackground = object9;
const object10 = {'position': 'absolute', 'top': -2, 'zIndex': -1, 'left': 26, 'width': 44, 'height': 44};
object10.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
object2.avatarBorder = object10;
object2.avatar = {'position': 'absolute', 'top': 0, 'zIndex': 3, 'left': 28};
object2.adminUsernameContainer = {'display': 'flex', 'flexDirection': 'row', 'alignItems': 'center',
'marginBottom': 4, 'paddingLeft': 44};
const MOBILE_TEXT_HEADING_PRIMARY = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_TEXT_HEADING_PRIMARY;
object2.adminUsername = {color: MOBILE_TEXT_HEADING_PRIMARY, paddingLeft: 8};
const TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_DEFAULT;
object2.message = {color: TEXT_DEFAULT};
object2.icon = {marginLeft: 4};
const env0_10 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_onboarding_home/native/HomeWelcomeMessage.tsx');
exports.default = HomeWelcomeMessage;
}
function replaceUsernameVariable(a0, a1, a2) { // fn#113280, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15185:1122, offset: 0x023f22db, size: 348 bytes, params: 4, frame: 32
var r14;
var push;
var jsxRuntimeEnv0_8Binding;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
var message;
var value4;
const value = a1.split(RegExp('\\[@username\\]', 'g'));
const items2 = [];
let length = value.length;
const value3 = 0;
if (value3 < length - 1) {
for (r14 = value3; true; r14 = value4) {
push = items2.push;
jsxRuntimeEnv0_8Binding = jsxRuntimeEnv0_8;
message = a0.message;
Reflect.apply(push, items2, [<Text variant="text-sm/normal" style={message} key={r14}>{value[r14]}</Text>]);
push = items2.push;
jsxRuntimeEnv0_8Binding = jsxRuntimeEnv0_8;
message = a0.message;
Reflect.apply(push, items2,
[<Text variant="text-sm/bold" style={message} key={'' + r14 + '-user'}>{'@' + a2}</Text>]);
value4 = typeof r14 === 'bigint' ? r14 + 1n : +r14 + 1;
length = value.length;
if (!(value4 < length - 1)) {
break;
}
}
}
items2.push(<Text variant="text-sm/normal" style={a0.message} key={value.length}>{value[value.length - 1]}</Text>);
return items2;
}
function HomeWelcomeMessage({guildId}) { // fn#113281, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15185:1616, offset: 0x023f2437, size: 1187 bytes, params: 2, frame: 43
var r9;
var items4;
var object2;
const styles = useStyles();
const currentUser = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([UserStore],
function() {
return UserStore.getCurrentUser();
});
const welcomeMessage = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([GuildOnboardingHomeSettingsStore],
function() {
return GuildOnboardingHomeSettingsStore.getWelcomeMessage(guildId);
});
const user = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([UserStore],
function() {
return UserStore.getUser(welcomeMessage == null ? undefined : welcomeMessage.authorIds[0]);
});
const {theme, primaryColor,
secondaryColor} = (importDefault(8494) /* metro dependency 8494: useProfileTheme */)({user: user,
displayProfile: (importDefault(8490) /* metro dependency 8490: useDisplayProfile */)(user?.id, guildId)});
items = ['#B8CDFF', '#8CD9FF'];
const guild = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([GuildStore],
function() {
return GuildStore.getGuild(guildId);
});
const env0_3 = guild;
(require(6902) /* metro dependency 6902: subscribeGuildMembers */).useSubscribeGuildMembers({[guildId]: welcomeMessage?.authorIds ?? []},
'HomeWelcomeMessage');
env0_3.useEffect(_fun113286, [user, guild]);
const value6 = (require(3995) /* metro dependency 3995: UserUtils */).useName(currentUser);
if (welcomeMessage == null) {
return null;
}
if (currentUser == null) {
return null;
}
if (user == null) {
return null;
}
const r18 = guild != null && guild.ownerId === user.id;
const ThemeContextProvider = (require(3868) /* metro dependency 3868: native */).ThemeContextProvider;
if (user.avatarDecoration == null) {
items4 = [styles.avatarBorder];
object2 = {};
object2.backgroundColor = primaryColor != null ? (require(673) /* metro dependency 673: ColorUtils */).int2rgba(primaryColor,
1) : items[0];
items4[1] = object2;
r9 = <View style={items4} />;
} else {
r9 = null;
}
const items5 = [r9];
items5[1] = <View style={styles.avatarBackground} />;
const HeaderAvatar = importDefault(8417) /* metro dependency 8417: HeaderAvatar */;
const AvatarSizes = (require(1305) /* metro dependency 1305: native */).AvatarSizes;
const NORMAL = AvatarSizes.NORMAL;
items5[2] = <HeaderAvatar style={styles.avatar} user={user} size={NORMAL} disableStatus />;
const UserProfileGradientContainer = importDefault(8511) /* metro dependency 8511: UserProfileGradientContainer */;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
items5[3] = <UserProfileGradientContainer containerStyle={styles.welcomeContainer} primaryColor={primaryColor} secondaryColor={secondaryColor} fallbackBackground={items}><View style={styles.welcomeContent}><View style={styles.adminUsernameContainer}><Text style={styles.adminUsername} variant="text-md/semibold">{(importDefault(4617) /* metro dependency 4617: NicknameUtils */).getName(guildId,
null,
user)}</Text>{r18 ? ((Icon) => <Icon size={(require(1305) /* metro dependency 1305: native */).Icon.Sizes.REFRESH_SMALL_16} style={styles.icon} source={importDefault(9098) /* metro dependency 9098 */} disableColor />)((require(1305) /* metro dependency 1305: native */).Icon) : null}</View><Text variant="text-sm/normal">{replaceUsernameVariable(styles,
welcomeMessage.message, value6 ?? currentUser.username)}</Text></View></UserProfileGradientContainer>;
return (
<ThemeContextProvider
theme={theme}
primaryColor={primaryColor}
secondaryColor={secondaryColor}
>
<View style={styles.relativeContainer}>
{items5}
</View>
</ThemeContextProvider>
);
}
function _fun113286() { // fn#113286, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15185:2186, offset: 0x023f292d, size: 150 bytes, params: 1, frame: 19
var id;
var value3;
var value4;
var defaultImport;
var id2;
var getAvatarURL;
var value5;
if (!(user == null || user.isNonUserBot())) {
value3 = environment.__proto__;
value4 = undefined;
defaultImport = importDefault(8491) /* metro dependency 8491: maybeFetchUserProfile */;
userBinding = user;
id2 = userBinding.id;
getAvatarURL = userBinding.getAvatarURL;
id = guild == null ? value4 : guild.id;
value5 = Reflect.apply(getAvatarURL, userBinding, [id, 80]);
id = guild == null ? value4 : guild.id;
defaultImport(id2, value5, {dispatchWait: true, guildId: id});
}
}
@@ -0,0 +1,376 @@
/* Metro module 11809; source: modules/guild_onboarding_home/native/MemberActionChatInputBanner.tsx; dependencies: [57, 31, 27, 4502, 6540, 1379, 1945, 661, 1881, 33, 4501, 697, 632, 4805, 4573, 1244, 1305, 11427, 5475, 1423, 3797, 11810, 11807, 4017, 4504, 11811, 5278, 1230, 11808, 5103, 2] */
function _fun90451(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#90451, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11995:6, offset: 0x02039a9b, size: 738 bytes, params: 8, frame: 23
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
let value = importAll(31) /* metro dependency 31 */;
const env0_5 = (require(27) /* metro dependency 27 */).View;
const accessibilityStore = importDefault(4502) /* metro dependency 4502: AccessibilityStore */;
const emojiStore = importDefault(6540) /* metro dependency 6540: EmojiStore */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const guildMemberStore = importDefault(1945) /* metro dependency 1945: GuildMemberStore */;
const env0_10 = (require(661) /* metro dependency 661: Constants */).Routes;
const env0_11 = (require(1881) /* metro dependency 1881: EmojiConstants */).EMOJI_URL_BASE_SIZE;
const value2 = require(33) /* metro dependency 33 */;
const env0_12 = value2.jsx;
const env0_13 = value2.jsxs;
const env0_14 = value2.Fragment;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
object2 = {};
object2.animatedContainer = {overflow: 'hidden'};
object2.measurement = {'opacity': 0, 'position': 'absolute'};
const BACKGROUND_BASE_LOWEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWEST;
object2.container = {'display': 'flex', 'flexDirection': 'row', 'alignItems': 'center', 'backgroundColor': null,
'paddingHorizontal': 12, 'paddingVertical': 8, backgroundColor: BACKGROUND_BASE_LOWEST};
object2.text = {'flexGrow': 1, 'flexShrink': 1, 'marginLeft': 8};
object2.wrap = {'flexShrink': 1, 'flexWrap': 'wrap'};
object2.emoji = {'width': 24, 'height': 24};
object2.textEmoji = {'width': 24, 'textAlign': 'center'};
const object3 = {'width': 24, 'height': 24, 'backgroundColor': null, 'borderRadius': null, 'display': 'flex',
'alignItems': 'center', 'justifyContent': 'center'};
const BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
object3.backgroundColor = BACKGROUND_SURFACE_HIGH;
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.md;
object2.emojiPlaceholder = object3;
const BACKGROUND_BRAND = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BRAND;
object2.circle = {'display': 'flex', 'alignItems': 'center', 'justifyContent': 'center', 'height': 20, 'width': 20,
'borderRadius': 15, 'marginLeft': 8, backgroundColor: BACKGROUND_BRAND};
const WHITE = (importDefault(697) /* metro dependency 697: native */).colors.WHITE;
object2.icon = {tintColor: WHITE};
const env0_15 = Reflect.apply(createStyles, createStylesModule, [object2]);
object2 = {code: 'function MemberActionChatInputBannerTsx1(){const{useReducedMotion,height,withDelay,completed,withTiming,DECELERATED_EASING}=this.__closure;if(useReducedMotion){return{height:height.get()};}return{height:withDelay(completed?800:200,withTiming(height.get(),{duration:400,easing:DECELERATED_EASING}))};}'};
object2 = {code: 'function MemberActionChatInputBannerTsx2(){const{useReducedMotion,nextHeight,withDelay,isViewAction,completed,withTiming,DECELERATED_EASING}=this.__closure;if(useReducedMotion){return{height:nextHeight.get()};}return{height:withDelay(!isViewAction&&completed?1200:0,withTiming(nextHeight.get(),{duration:400,easing:DECELERATED_EASING}))};}'};
const value4 = value.memo(_fun90467);
value = value.memo(_fun90469);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_onboarding_home/native/MemberActionChatInputBanner.tsx');
exports.MemberActionChatInputBannerGuarded = value4;
exports.MemberActionsChatInputBannerGuardedOuter = value;
}
function ActionChannelInfo({action}) { // fn#90452, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11995:1063, offset: 0x02039d7d, size: 342 bytes, params: 2, frame: 23
var r0;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var format;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var MkzlDL;
var object2;
const useStateFromStoresModule = require(632) /* metro dependency 632: useStateFromStores */;
const useStateFromStores = useStateFromStoresModule.useStateFromStores;
let object = [ChannelStore];
const channel = Reflect.apply(useStateFromStores, useStateFromStoresModule, [object, function() {
return ChannelStore.getChannel(action.channelId);
}]);
const value2 = (importDefault(4805) /* metro dependency 4805: useChannelName */)(channel, true);
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
if (channel == null) {
format = intl.format;
MkzlDL = t.MkzlDL;
object2 = {};
object2.channelName = (require(1244) /* metro dependency 1244: indexNative */).intl.string(t.J90oLW);
r0 = {'variant': 'text-xxs/normal', 'color': 'text-default', children: Reflect.apply(format, intl, [MkzlDL,
object2])};
} else {
object = {'variant': 'text-xxs/normal', 'color': 'text-default'};
object.children = intl.format((require(1244) /* metro dependency 1244: indexNative */).t.MkzlDL,
{channelName: value2});
r0 = object;
}
return <Text {...r0} />;
}
function ChannelActionEmoji({emoji}) { // fn#90454, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11995:1488, offset: 0x02039ef2, size: 494 bytes, params: 2, frame: 24
var r0;
var defaultImport;
var getByName;
var defaultImport2;
var FastImage;
var defaultImport4;
const styles = useStyles();
const Icon = (require(1305) /* metro dependency 1305: native */).Icon;
const Icon2 = (require(1305) /* metro dependency 1305: native */).Icon;
const Sizes = Icon2.Sizes;
const REFRESH_SMALL_16 = Sizes.REFRESH_SMALL_16;
const view = <View style={styles.emojiPlaceholder}><Icon size={REFRESH_SMALL_16} source={importDefault(11427) /* metro dependency 11427 */} /></View>;
const id = emoji?.id;
const name = emoji?.name;
const value4 = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([EmojiStore],
_fun90455, [id]);
if (value4 != null) {
FastImage = importDefault(5475) /* metro dependency 5475: FastImage */;
var defaultImport3Props = {style: styles.emoji};
defaultImport4 = importDefault(1423) /* metro dependency 1423: AvatarUtils */;
defaultImport3Props.source = {uri: defaultImport4.getEmojiURL({id: value4.id, animated: value4.animated,
size: EMOJI_URL_BASE_SIZE})};
defaultImport3Props.resizeMode = 'contain';
r0 = <FastImage {...defaultImport3Props} />;
} else if (name == null) {
r0 = view;
} else {
defaultImport = importDefault(3797) /* metro dependency 3797: UnicodeEmojis */;
getByName = defaultImport.getByName;
defaultImport2 = importDefault(3797) /* metro dependency 3797: UnicodeEmojis */;
if (Reflect.apply(getByName, defaultImport, [defaultImport2.convertSurrogateToName(name, false)]) == null) {
r0 = view;
} else {
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
r0 = <Text style={styles.textEmoji} variant="heading-lg/normal">{name}</Text>;
}
}
return r0;
}
function MemberActionChatInputBanner({channel}) { // fn#90456, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11995:2739, offset: 0x0203a108, size: 1213 bytes, params: 2, frame: 32
var object2;
const styles = useStyles();
const {channelAction,
completed} = (require(11810) /* metro dependency 11810: MemberActionUtils */).useMemberActionsForChannel(channel.guild_id,
channel);
const env0_3 = completed;
const value5 = (require(11810) /* metro dependency 11810: MemberActionUtils */).useNextMemberAction(channel.guild_id,
channelAction?.channelId);
const env0_4 = value5;
const useReducedMotion = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([AccessibilityStore],
function() {
return AccessibilityStore.useReducedMotion;
});
const actionType = channelAction?.actionType;
const NewMemberActionTypes = (require(11807) /* metro dependency 11807: GuildOnboardingHomeTypes */).NewMemberActionTypes;
const VIEW = NewMemberActionTypes.VIEW;
const value6 = actionType === VIEW;
let binding = env0_4;
let useState = binding.useState;
const CHANNEL_ACTION_BANNER_HEIGHT = (require(11807) /* metro dependency 11807: GuildOnboardingHomeTypes */).CHANNEL_ACTION_BANNER_HEIGHT;
const value8 = env0_3(Reflect.apply(useState, binding, [CHANNEL_ACTION_BANNER_HEIGHT]), 2);
const property = value8[0];
const property2 = value8[1];
binding = env0_4;
useState = binding.useState;
const value11 = env0_3(Reflect.apply(useState, binding, [CHANNEL_ACTION_BANNER_HEIGHT]), 2);
const property3 = value11[0];
const property4 = value11[1];
const value12 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(0);
const value13 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(completed ? property3 : 0);
env0_4.useEffect(_fun90458, [value12, completed, value6, property]);
env0_4.useEffect(_fun90459, [value13, completed, value5, property3]);
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
let useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
let closure = MemberActionChatInputBannerG;
object2 = {useReducedMotion: useReducedMotion, height: value12};
object2.withDelay = reanimatedRexportModule.withDelay;
object2.completed = completed;
object2.withTiming = (require(4504) /* metro dependency 4504: timing */).withTiming;
const DECELERATED_EASING = (require(1305) /* metro dependency 1305: native */).DECELERATED_EASING;
object2.DECELERATED_EASING = DECELERATED_EASING;
closure.__closure = object2;
closure.__workletHash = 5585837927201;
closure.__initData = env0_16;
const value14 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
const moduleValue7 = reanimatedRexportModule;
useAnimatedStyle = moduleValue7.useAnimatedStyle;
closure = MemberActionChatInputBannerB;
object2 = {useReducedMotion: useReducedMotion, nextHeight: value13};
object2.withDelay = reanimatedRexportModule.withDelay;
object2.isViewAction = value6;
object2.completed = completed;
object2.withTiming = (require(4504) /* metro dependency 4504: timing */).withTiming;
object2.DECELERATED_EASING = DECELERATED_EASING;
closure.__closure = object2;
closure.__workletHash = 10256555667281;
closure.__initData = env0_17;
const value15 = Reflect.apply(useAnimatedStyle, moduleValue7, [closure]);
const value16 = env0_4.useCallback(_fun90462, [property2]);
const value17 = env0_4.useCallback(_fun90463, [property4]);
if (channelAction == null) {
return null;
}
closure = renderAction;
const closure2 = renderNextAction;
const jsxRuntimeEnv0_14Binding = jsxRuntimeEnv0_14;
const items2 = [<View style={styles.measurement} onLayout={value16}>{closure()}</View>];
items2[1] = !value6 && ((View) => <View style={[styles.animatedContainer,
value14]}>{closure()}</View>)((importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View);
items2[2] = completed && value5 != null ? <><View style={styles.measurement} onLayout={value17}>{closure2()}</View>{((View) => <View style={[styles.animatedContainer,
value15]}>{closure2()}</View>)((importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View)}</> : null;
return (
<>
{items2}
</>
);
}
function _fun90467({channel}) { // fn#90467, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11995:5807, offset: 0x0203abb5, size: 162 bytes, params: 2, frame: 20
return (require(11810) /* metro dependency 11810: MemberActionUtils */).useAllActionsCompleted(channel.guild_id) || (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([GuildMemberStore],
_fun90468) ? null : (require(5103) /* metro dependency 5103: OnboardingHomeUtils */).useCanSeeOnboardingHome(channel.guild_id) ? <MemberActionChatInputBanner channel={channel} /> : null;
}
function _fun90469({channel}) { // fn#90469, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11995:6118, offset: 0x0203ac8e, size: 191 bytes, params: 2, frame: 20
const {channelAction,
completed} = (require(11810) /* metro dependency 11810: MemberActionUtils */).useMemberActionsForChannel(channel.guild_id,
channel);
const value5 = (require(11810) /* metro dependency 11810: MemberActionUtils */).useNextMemberAction(channel.guild_id,
channelAction?.channelId);
const actionType = channelAction?.actionType;
const NewMemberActionTypes = (require(11807) /* metro dependency 11807: GuildOnboardingHomeTypes */).NewMemberActionTypes;
const VIEW = NewMemberActionTypes.VIEW;
return actionType !== VIEW || completed && value5 != null ? ((Component) => <Component channel={channel} />)(env0_18) : null;
}
function _fun90455() { // fn#90455, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11995:1738, offset: 0x0203a0e0, size: 40 bytes, params: 1, frame: 12
const idBinding = id;
const value2 = null;
return value2 != idBinding ? EmojiStore.getCustomEmojiById(id) : value2;
}
function _fun90458() { // fn#90458, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11995:3307, offset: 0x0203a5c5, size: 57 bytes, params: 1, frame: 12
if (completed) {
env0_11.set(0);
} else if (env0_6) {
env0_11.set(0);
} else {
env0_11.set(env0_7);
}
}
function _fun90459() { // fn#90459, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11995:3361, offset: 0x0203a5fe, size: 60 bytes, params: 1, frame: 12
if (completed) {
if (env0_4 != null) {
env0_12.set(env0_9);
} else {
env0_12.set(0);
}
} else {
env0_12.set(0);
}
}
function MemberActionChatInputBannerG() { // fn#90460, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11995:3448, owner: MemberActionChatInputBanner.G, offset: 0x0203a63a, size: 178 bytes, params: 1, frame: 22
var r3;
var value2;
var moduleValue;
var withDelay;
var moduleValue2;
var withTiming;
var object3;
var value;
const object4 = {};
if (useReducedMotion) {
object4.height = env0_11.get();
} else {
value2 = environment.__proto__;
moduleValue = require(4017) /* metro dependency 4017: ReanimatedRexport */;
withDelay = moduleValue.withDelay;
r3 = completed ? 800 : 200;
moduleValue2 = require(4504) /* metro dependency 4504: timing */;
withTiming = moduleValue2.withTiming;
value = env0_11.get();
object3 = {duration: 400};
object3.easing = (require(1305) /* metro dependency 1305: native */).DECELERATED_EASING;
object4.height = Reflect.apply(withDelay, moduleValue, [r3, Reflect.apply(withTiming, moduleValue2, [value,
object3])]);
}
return object4;
}
function MemberActionChatInputBannerB() { // fn#90461, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11995:3845, owner: MemberActionChatInputBanner.B, offset: 0x0203a6ec, size: 186 bytes, params: 1, frame: 22
var r3;
var value2;
var moduleValue;
var withDelay;
var value3;
var moduleValue2;
var withTiming;
var object3;
var value;
const object4 = {};
if (useReducedMotion) {
object4.height = env0_12.get();
} else {
value2 = environment.__proto__;
moduleValue = require(4017) /* metro dependency 4017: ReanimatedRexport */;
withDelay = moduleValue.withDelay;
value3 = 0;
r3 = env0_6 ? value3 : completed ? 1200 : value3;
moduleValue2 = require(4504) /* metro dependency 4504: timing */;
withTiming = moduleValue2.withTiming;
value = env0_12.get();
object3 = {duration: 400};
object3.easing = (require(1305) /* metro dependency 1305: native */).DECELERATED_EASING;
object4.height = Reflect.apply(withDelay, moduleValue, [r3, Reflect.apply(withTiming, moduleValue2, [value,
object3])]);
}
return object4;
}
function _fun90462({nativeEvent}) { // fn#90462, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11995:4249, offset: 0x0203a7a6, size: 36 bytes, params: 2, frame: 11
env0_8(nativeEvent.layout.height);
}
function _fun90463({nativeEvent}) { // fn#90463, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11995:4312, offset: 0x0203a7ca, size: 36 bytes, params: 2, frame: 11
env0_10(nativeEvent.layout.height);
}
function renderAction() { // fn#90464, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11995:4398, owner: MemberActionChatInputBanner.renderAction, offset: 0x0203a7ee, size: 391 bytes, params: 1, frame: 28
const value = environment.__proto__;
const stylesBinding = styles;
const container = stylesBinding.container;
const channelActionBinding = channelAction;
const items2 = [<ChannelActionEmoji emoji={channelActionBinding.emoji} />];
const text = stylesBinding.text;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const text2 = <Text variant="text-sm/medium" color="mobile-text-heading-primary" style={stylesBinding.wrap}>{channelActionBinding.title}</Text>;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
items2[1] = <View style={text}>{text2}<Text variant="text-xxs/normal" color="text-muted">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['ElGg8+'])}</Text></View>;
items2[2] = completed && ((Icon) => <Icon disableColor size={(require(1305) /* metro dependency 1305: native */).Icon.Sizes.MEDIUM} source={importDefault(11811) /* metro dependency 11811 */} />)((require(1305) /* metro dependency 1305: native */).Icon);
return (
<View style={container}>
{items2}
</View>
);
}
function renderNextAction() { // fn#90465, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11995:4836, owner: MemberActionChatInputBanner.renderNextAction, offset: 0x0203a975, size: 501 bytes, params: 1, frame: 31
var environment;
var r0;
var value3;
var PressableHighlight;
var object;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var stylesBinding;
var items2;
const value2 = null;
if (value2 == env0_4) {
r0 = value2;
} else {
value3 = environment.__proto__;
PressableHighlight = (require(5278) /* metro dependency 5278: Pressables */).PressableHighlight;
var pressableHighlightProps = {accessibilityRole: 'button', accessibilityLabel: intl.string(t.PDTjLN)};
stylesBinding = styles;
pressableHighlightProps.style = stylesBinding.container;
pressableHighlightProps.onPress = onPress_90466;
items2 = [<ChannelActionEmoji emoji={env0_4.emoji} />];
items2[1] = <View style={stylesBinding.text}>{((Text) => <Text variant="text-sm/medium" color="mobile-text-heading-primary" style={stylesBinding.wrap}>{intl.format(t['/beONw'],
{step: env0_4.title})}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)}<ActionChannelInfo action={env0_4} /></View>;
items2[2] = <View style={stylesBinding.circle}>{((Icon) => <Icon size={(require(1305) /* metro dependency 1305: native */).Icon.Sizes.REFRESH_SMALL_16} style={stylesBinding.icon} source={importDefault(11808) /* metro dependency 11808 */} />)((require(1305) /* metro dependency 1305: native */).Icon)}</View>;
r0 = <PressableHighlight {...pressableHighlightProps}>{items2}</PressableHighlight>;
}
return r0;
}
function _fun90468() { // fn#90468, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11995:5915, offset: 0x0203ac57, size: 55 bytes, params: 1, frame: 11
const value = environment.__proto__;
return GuildMemberStore.getSelfMember(channel.guild_id)?.isPending === true;
}
function renderNextActionOnPress() { // fn#90466, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11995:4996, owner: MemberActionChatInputBanner.renderNextAction.onPress, offset: 0x0203ab6a, size: 75 bytes, params: 1, frame: 15
const router_utilsModule = require(1230) /* metro dependency 1230: router_utils */;
const transitionTo = router_utilsModule.transitionTo;
const CHANNEL = Routes.CHANNEL;
return Reflect.apply(transitionTo, router_utilsModule, [Reflect.apply(CHANNEL, Routes, [channel.guild_id,
env1_4.channelId])]);
}
@@ -0,0 +1,83 @@
/* Metro module 15719; source: modules/guild_onboarding_home/native/NewMemberActionsCompletedModal.tsx; dependencies: [31, 27, 33, 4501, 697, 4017, 4504, 5080, 11807, 4573, 1244, 2] */
function _fun120703(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#120703, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15927:6, offset: 0x02533659, size: 380 bytes, params: 8, frame: 23
var object2;
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;
let value = require(33) /* metro dependency 33 */;
const env0_5 = value.jsx;
const env0_6 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {screen: {'flex': 1, 'position': 'absolute', 'width': '100%', 'height': '100%',
'backgroundColor': 'rgba(0, 0, 0, 0.8)', 'display': 'flex', 'alignItems': 'center', 'justifyContent': 'center'}};
object2.text = {marginBottom: 16};
const object5 = {};
object5.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
object5.height = 8;
const BACKGROUND_MOD_NORMAL = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_NORMAL;
object5.backgroundColor = BACKGROUND_MOD_NORMAL;
object5.width = '60%';
object2.progressBackground = object5;
const object6 = {};
const GREEN_330 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.GREEN_330;
object6.backgroundColor = GREEN_330;
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
object6.height = 8;
object2.progressForeground = object6;
const env0_7 = Reflect.apply(createStyles, value, [object2]);
object2 = {code: 'function NewMemberActionsCompletedModalTsx1(){const{withDelay,withTiming,barWidth}=this.__closure;return{width:withDelay(500,withTiming(barWidth.get()*100+"%",{duration:700}))};}'};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_onboarding_home/native/NewMemberActionsCompletedModal.tsx');
exports.default = NewMemberActionsCompleted;
}
function NewMemberActionsCompleted({initialPercent, numActions}) { // fn#120704, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15927:794, offset: 0x025337d5, size: 450 bytes, params: 2, frame: 26
const styles = useStyles();
const value2 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(initialPercent);
const binding = env0_3;
binding.useEffect(_fun120705, [value2]);
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
const closure = NewMemberActionsCompletedB;
closure.__closure = {withDelay: reanimatedRexportModule.withDelay,
withTiming: (require(4504) /* metro dependency 4504: timing */).withTiming, barWidth: value2};
closure.__workletHash = 7643178959760;
closure.__initData = env0_8;
const value3 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
binding.useEffect(function() {
global.setTimeout(_fun120708, 2500);
}, []);
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const text = <Text style={styles.text} variant="heading-xl/semibold" color="always-white">{intl.format((require(1244) /* metro dependency 1244: indexNative */).t.pGj5u2,
{count: numActions})}</Text>;
const View2 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
return (
<View style={styles.screen}>
{text}
<View style={styles.progressBackground}>
<View2 style={[styles.progressForeground, value3]} />
</View>
</View>
);
}
function NewMemberActionsCompletedB() { // fn#120706, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15927:971, owner: NewMemberActionsCompleted.b, offset: 0x02533997, size: 117 bytes, params: 1, frame: 17
const object2 = {};
let value = environment.__proto__;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const withDelay = value.withDelay;
const timingModule = require(4504) /* metro dependency 4504: timing */;
object2.width = Reflect.apply(withDelay, value, [500, timingModule.withTiming(100 * env0_0.get() + '%',
{duration: 700})]);
return object2;
}
function _fun120707() { // fn#120707, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15927:1222, offset: 0x02533a0c, size: 33 bytes, params: 1, frame: 13
global.setTimeout(function() {
return importDefault(dependencyMap[7]).popWithKey(require(dependencyMap[8]).NEW_MEMBER_ACTION_COMPLETE_MODAL_KEY);
}, 2500);
}
@@ -0,0 +1,130 @@
/* Metro module 14591; source: modules/guild_onboarding_home/native/NewMemberActionsProgress.tsx; dependencies: [31, 27, 1945, 4869, 4870, 1386, 3772, 33, 4501, 697, 4589, 632, 1391, 5278, 1230, 4573, 1244, 1305, 10787, 2] */
function _fun110341(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#110341, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14788:6, offset: 0x02375888, size: 482 bytes, params: 8, frame: 23
var object2;
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 guildMemberStore = importDefault(1945) /* metro dependency 1945: GuildMemberStore */;
const guildOnboardingHomeSettingsStore = importDefault(4869) /* metro dependency 4869: GuildOnboardingHomeSettingsStore */;
const guildOnboardingMemberActionStore = importDefault(4870) /* metro dependency 4870: GuildOnboardingMemberActionStore */;
const env0_8 = (require(1386) /* metro dependency 1386: ChannelConstants */).StaticChannelRoute;
const env0_9 = (require(3772) /* metro dependency 3772: GuildMemberConstants */).GuildMemberFlags;
let value = require(33) /* metro dependency 33 */;
const env0_10 = value.jsx;
const env0_11 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
object2.container = {padding: 16};
object2.horizontal = {'flexDirection': 'row', 'alignItems': 'center'};
object2.spaceBetween = {justifyContent: 'space-between'};
object2.spaceBelow = {marginBottom: 8};
const object3 = {};
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
object3.height = 8;
const BACKGROUND_MOD_NORMAL = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_NORMAL;
object3.backgroundColor = BACKGROUND_MOD_NORMAL;
object2.progressBackground = object3;
const object4 = {};
const STATUS_POSITIVE_BACKGROUND = (importDefault(697) /* metro dependency 697: native */).colors.STATUS_POSITIVE_BACKGROUND;
object4.backgroundColor = STATUS_POSITIVE_BACKGROUND;
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
object4.height = 8;
object2.progressForeground = object4;
const env0_12 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_onboarding_home/native/NewMemberActionsProgress.tsx');
exports.NewMemberActionsProgress = NewMemberActionsProgress;
}
function ProgressBar_110342({percent}) { // fn#110342, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14788:647, offset: 0x02375a6a, size: 173 bytes, params: 2, frame: 22
const styles = useStyles();
return (
<View style={styles.progressBackground}>
{((Component) => <Component style={[styles.progressForeground,
{width: '' + percent + '%'}]} colors={['rgba(103, 203, 134, 1)',
'rgba(59, 165, 92, 1)']} useAngle angle={-90} />)(importDefault(4589) /* metro dependency 4589 */)}
</View>
);
}
function NewMemberActionsProgress({guildId}) { // fn#110343, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14788:1006, offset: 0x02375b17, size: 866 bytes, params: 2, frame: 30
var r0;
var PressableOpacity;
var object;
var horizontal;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
var intl;
var items3;
var object3;
var items4;
const styles = useStyles();
const value3 = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([GuildOnboardingHomeSettingsStore],
function() {
return GuildOnboardingHomeSettingsStore.getNewMemberActions(guildId);
}, [guildId]);
const completedActions = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([GuildOnboardingMemberActionStore],
function() {
return GuildOnboardingMemberActionStore.getCompletedActions(guildId);
});
const selfMember = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([GuildMemberStore],
function() {
return GuildMemberStore.getSelfMember(guildId);
});
const r10 = value3?.length ?? 0;
const value6 = env0_3.useMemo(_fun110347, [completedActions, value3]);
const flagUtilsModule = require(1391) /* metro dependency 1391: FlagUtils */;
const hasFlag = flagUtilsModule.hasFlag;
const r1 = selfMember?.flags ?? 0;
const COMPLETED_HOME_ACTIONS = GuildMemberFlags.COMPLETED_HOME_ACTIONS;
if (Reflect.apply(hasFlag, flagUtilsModule, [r1, COMPLETED_HOME_ACTIONS])) {
r0 = null;
} else if (r10 === 0) {
r0 = null;
} else if (value6 + r10 === 0) {
r0 = null;
} else {
PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
var pressableOpacityProps = {'accessibilityRole': 'button', 'activeOpacity': 0.4, style: styles.container,
onPress: function() {
require(dependencyMap[14]).transitionTo(StaticChannelRoute.GUILD_HOME);
}};
object = {};
horizontal = styles.horizontal;
object.style = [horizontal, styles.spaceBetween, styles.spaceBelow];
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
items3 = [<Text variant="text-xs/bold" color="mobile-text-heading-primary">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.LhlgY9)}</Text>];
object3 = {};
horizontal = styles.horizontal;
object3.style = horizontal;
items4 = [<Text variant="text-xs/bold" color="mobile-text-heading-primary">{value6}</Text>];
items4[1] = <Text variant="text-xs/medium" color="text-default">{'/'}</Text>;
items4[2] = <Text variant="text-xs/bold" color="mobile-text-heading-primary">{r10}</Text>;
items4[3] = ((Icon) => <Icon size={(require(1305) /* metro dependency 1305: native */).Icon.Sizes.REFRESH_SMALL_16} source={importDefault(10787) /* metro dependency 10787 */} />)((require(1305) /* metro dependency 1305: native */).Icon);
items3[1] = <View {...object3}>{items4}</View>;
r0 = <PressableOpacity {...pressableOpacityProps}><View {...object}>{items3}</View><ProgressBar_110342 percent={value6 / r10 * 100 + 3} /></PressableOpacity>;
}
return r0;
}
function _fun110347() { // fn#110347, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14788:1316, offset: 0x02375eca, size: 60 bytes, params: 1, frame: 12
if (env0_1 == null) {
return 0;
}
if (completedActions == null) {
return 0;
}
const env0_0 = 0;
env0_1.forEach(_fun110348);
return env0_0;
}
function _fun110348({channelId}) { // fn#110348, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14788:1376, offset: 0x02375f06, size: 43 bytes, params: 2, frame: 2
var binding;
if (completedActions[channelId] != null) {
binding = env0_0;
env0_0 = typeof binding === 'bigint' ? binding + 1n : +binding + 1;
}
}
@@ -0,0 +1,8 @@
/* Metro module 14985; source: modules/guild_onboarding_home/native/OnboardingHomeConstants.tsx; dependencies: [2] */
function _fun113270(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#113270, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15182:6, offset: 0x023f1c6c, size: 84 bytes, params: 8, frame: 15
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_onboarding_home/native/OnboardingHomeConstants.tsx');
exports.ONBOARDING_HOME_RESOURCES_SHEET_KEY = 'OnboardingHomeResourcesSheet';
}
@@ -0,0 +1,66 @@
/* Metro module 14987; source: modules/guild_onboarding_home/native/OnboardingHomeResourcesSheet.tsx; dependencies: [31, 14985, 33, 3860, 697, 14986, 11806, 4080, 6805, 6807, 1423, 5475, 2] */
function _fun113275(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#113275, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15184:6, offset: 0x023f1ddc, size: 160 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_3 = (require(14985) /* metro dependency 14985: OnboardingHomeConstants */).ONBOARDING_HOME_RESOURCES_SHEET_KEY;
const env0_4 = (require(33) /* metro dependency 33 */).jsx;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_onboarding_home/native/OnboardingHomeResourcesSheet.tsx');
exports.default = OnboardingHomeResourcesSheet;
}
function OnboardingHomeResourcesSheet({guildId}) { // fn#113276, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15184:278, offset: 0x023f1e7c, size: 201 bytes, params: 2, frame: 19
const useTokenModule = require(3860) /* metro dependency 3860: useToken */;
const useToken = useTokenModule.useToken;
const TABLE_ROW_ICON_SIZE = (importDefault(697) /* metro dependency 697: native */).modules.mobile.TABLE_ROW_ICON_SIZE;
const env0_1 = Reflect.apply(useToken, useTokenModule, [TABLE_ROW_ICON_SIZE]);
const value2 = (importDefault(14986) /* metro dependency 14986: useResourceChannels */)(guildId);
const ActionSheet = (require(6805) /* metro dependency 6805: ActionSheetNative */).ActionSheet;
const ActionSheetRow = (require(6807) /* metro dependency 6807: ActionSheetRowNative */).ActionSheetRow;
const Group = ActionSheetRow.Group;
return (
<ActionSheet>
<Group hasIcons>
{value2.map(_fun113277)}
</Group>
</ActionSheet>
);
}
function _fun113277(a0) { // fn#113277, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15184:508, offset: 0x023f1f45, size: 208 bytes, params: 2, frame: 24
var environment;
var r6;
var binding;
const env0_0 = a0;
let value = environment.__proto__;
const value2 = undefined;
const r11 = (importDefault(1423) /* metro dependency 1423: AvatarUtils */).getResourceChannelIconURL(a0) ?? value2;
const ActionSheetRow = (require(6807) /* metro dependency 6807: ActionSheetRowNative */).ActionSheetRow;
const title = a0.title;
if (r11 != null) {
value = importDefault(5475) /* metro dependency 5475: FastImage */;
binding = env0_1;
value = ((Component) => <Component style={{width: binding, height: binding}} source={{uri: r11}} />)(value);
r6 = value;
} else {
r6 = value2;
}
return (
<ActionSheetRow
label={title}
icon={r6}
onPress={onPress_113278}
arrow
key={a0.channelId}
/>
);
}
function onPress_113278() { // fn#113278, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15184:706, offset: 0x023f2015, size: 91 bytes, params: 1, frame: 16
const channelId = env0_0.channelId;
const guildOnboardingHomeActionCreatorsModule = require(11806) /* metro dependency 11806: GuildOnboardingHomeActionCreators */;
guildOnboardingHomeActionCreatorsModule.selectHomeResourceChannel(guildId, channelId);
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet(ONBOARDING_HOME_RESOURCES_SHEET_KEY);
}
@@ -0,0 +1,52 @@
/* Metro module 14978; source: modules/guild_onboarding_home/native/OnboardingHomeScrollView.tsx; dependencies: [31, 27, 33, 4501, 697, 1585, 2] */
function _fun113244(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#113244, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15175:6, offset: 0x023f081c, size: 222 bytes, params: 8, frame: 21
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importAll(31) /* metro dependency 31 */;
const env0_3 = (require(27) /* metro dependency 27 */).ScrollView;
const env0_4 = (require(33) /* metro dependency 33 */).jsx;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
const BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
const env0_5 = Reflect.apply(createStyles, createStylesModule,
[{guildFeedBackground: {backgroundColor: BACKGROUND_SURFACE_HIGH}}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_onboarding_home/native/OnboardingHomeScrollView.tsx');
exports.default = OnboardingHomeScrollView;
}
function OnboardingHomeScrollView({guildId, headerOffset, scrollValue, children}) { // fn#113245, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15175:353, offset: 0x023f08fa, size: 314 bytes, params: 2, frame: 22
headerOffset = headerOffset === undefined ? 0 : headerOffset;
let env0_2 = undefined;
const styles = useStyles();
const binding = env0_2;
env0_2 = binding.useRef(false);
const value2 = binding.useRef(null);
const bottom = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)().bottom;
binding.useEffect(_fun113246, [guildId]);
const env0_5 = binding.useRef(true);
binding.useEffect(_fun113247, [guildId]);
return (
<ScrollView
ref={value2}
scrollIndicatorInsets={{right: 1}}
onScroll={function(a0) {
scrollValue.set(a0.nativeEvent.contentOffset.y);
}}
scrollEventThrottle={16}
style={styles.guildFeedBackground}
contentContainerStyle={binding.useMemo(function() {
return {paddingBottom: 16 + bottom, marginTop: headerOffset};
}, [bottom, headerOffset])}
>
{children}
</ScrollView>
);
}
function _fun113247() { // fn#113247, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15175:573, offset: 0x023f0a34, size: 79 bytes, params: 1, frame: 12
if (!(env0_3.current == null || env0_5.current)) {
env0_3.current.scrollTo({'animated': false, 'y': 0});
}
env0_5.current = false;
}
@@ -0,0 +1,75 @@
/* Metro module 11804; source: modules/guild_onboarding_home/native/ResourceChannelButtons.tsx; dependencies: [57, 31, 27, 33, 4501, 697, 1485, 11805, 11806, 4578, 1305, 11377, 11808, 2] */
function _fun90402(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#90402, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11990:6, offset: 0x020380c2, size: 318 bytes, params: 8, frame: 23
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
const env0_5 = (require(27) /* metro dependency 27 */).View;
let value = require(33) /* metro dependency 33 */;
const env0_6 = value.jsx;
const env0_7 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object2.wrapper = {'display': 'flex', 'flexDirection': 'row', 'padding': 12, backgroundColor: BACKGROUND_BASE_LOW};
object2.buttonWrapper = {flex: 1};
object2.spacer = {width: 8};
const WHITE = (importDefault(697) /* metro dependency 697: native */).colors.WHITE;
object2.iconColor = {color: WHITE};
const env0_8 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_onboarding_home/native/ResourceChannelButtons.tsx');
exports.default = ResourceChannelButtons;
}
function ResourceChannelButtons({channel}) { // fn#90403, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11990:376, offset: 0x02038200, size: 623 bytes, params: 2, frame: 31
var r7;
var r0;
var items2;
const value2 = (require(1485) /* metro dependency 1485 */).useNavigation();
const styles = useStyles();
const getNextResourceChannelModule = require(11805) /* metro dependency 11805: getNextResourceChannel */;
const usePreviousAndNextResourceChannel = getNextResourceChannelModule.usePreviousAndNextResourceChannel;
const value4 = env0_3(Reflect.apply(usePreviousAndNextResourceChannel, getNextResourceChannelModule,
[channel.guild_id, channel.id]), 2);
const property = value4[0];
const property2 = value4[1];
const env0_4Binding = env0_4.useCallback(_fun90404, [channel.guild_id, value2]);
if (property != null) {
var viewBindingProps = {style: styles.wrapper};
items2 = [property != null && <View style={styles.buttonWrapper}>{((Button) => <Button variant="secondary" text={property.title} icon={((Icon) => <Icon color={styles.iconColor.color} source={importDefault(11377) /* metro dependency 11377 */} />)((require(1305) /* metro dependency 1305: native */).Icon)} onPress={onPress_90405} grow />)((require(4578) /* metro dependency 4578: ButtonNative */).Button)}</View>];
r7 = property != null && property2 != null;
r7 = r7 && <View style={styles.spacer} />;
items2[1] = r7;
items2[2] = property2 != null && <View style={styles.buttonWrapper}>{((Button) => <Button text={property2.title} icon={((Icon) => <Icon color={styles.iconColor.color} source={importDefault(11808) /* metro dependency 11808 */} />)((require(1305) /* metro dependency 1305: native */).Icon)} iconPosition="end" onPress={onPress_90406} grow />)((require(4578) /* metro dependency 4578: ButtonNative */).Button)}</View>;
r0 = <View {...viewBindingProps}>{items2}</View>;
} else if (property2 == null) {
r0 = null;
} else {
var viewBindingProps = {style: styles.wrapper};
items2 = [property != null && <View style={styles.buttonWrapper}>{((Button) => <Button variant="secondary" text={property.title} icon={((Icon) => <Icon color={styles.iconColor.color} source={importDefault(11377) /* metro dependency 11377 */} />)((require(1305) /* metro dependency 1305: native */).Icon)} onPress={onPress_90405} grow />)((require(4578) /* metro dependency 4578: ButtonNative */).Button)}</View>];
r7 = property != null && property2 != null;
r7 = r7 && <View style={styles.spacer} />;
items2[1] = r7;
items2[2] = property2 != null && <View style={styles.buttonWrapper}>{((Button) => <Button text={property2.title} icon={((Icon) => <Icon color={styles.iconColor.color} source={importDefault(11808) /* metro dependency 11808 */} />)((require(1305) /* metro dependency 1305: native */).Icon)} iconPosition="end" onPress={onPress_90406} grow />)((require(4578) /* metro dependency 4578: ButtonNative */).Button)}</View>;
r0 = <View {...viewBindingProps}>{items2}</View>;
}
return r0;
}
function _fun90404(a0) { // fn#90404, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11990:558, offset: 0x0203846f, size: 68 bytes, params: 2, frame: 14
env0_1.goBack();
const guildOnboardingHomeActionCreatorsModule = require(11806) /* metro dependency 11806: GuildOnboardingHomeActionCreators */;
guildOnboardingHomeActionCreatorsModule.selectHomeResourceChannel(channel.guild_id, a0);
}
function ResourceChannelButtonsOnPress() { // fn#90405, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11990:867, owner: ResourceChannelButtons.onPress, offset: 0x020384b3, size: 25 bytes, params: 1, frame: 11
return env0_4(env0_2.channelId);
}
function ResourceChannelButtonsOnPress_90406() { // fn#90406, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11990:1105, owner: ResourceChannelButtons.onPress, offset: 0x020384cc, size: 25 bytes, params: 1, frame: 11
return env0_4(env0_3.channelId);
}
@@ -0,0 +1,76 @@
/* Metro module 14984; source: modules/guild_onboarding_home/native/ResourcesRow.tsx; dependencies: [31, 27, 14985, 33, 4501, 697, 14986, 11806, 4080, 14987, 1962, 5278, 4573, 1244, 2] */
function _fun113265(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#113265, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15181:6, offset: 0x023f18d2, size: 310 bytes, params: 8, frame: 22
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_3 = (require(27) /* metro dependency 27 */).ScrollView;
const env0_4 = (require(14985) /* metro dependency 14985: OnboardingHomeConstants */).ONBOARDING_HOME_RESOURCES_SHEET_KEY;
let value = require(33) /* metro dependency 33 */;
const env0_5 = value.jsx;
const env0_6 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
const object = {'display': 'flex', 'justifyContent': 'center', 'backgroundColor': null, 'borderRadius': null,
'marginLeft': 8, 'paddingVertical': 8, 'paddingHorizontal': 12};
const BACKGROUND_BASE_LOWEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWEST;
object.backgroundColor = BACKGROUND_BASE_LOWEST;
object.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
const env0_7 = Reflect.apply(createStyles, value, [{container: {'display': 'flex', 'flexDirection': 'row',
'paddingBottom': 8, 'marginBottom': 16}, channelItem: object}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_onboarding_home/native/ResourcesRow.tsx');
exports.default = ResourcesRow;
}
function ResourcesRow({guildId}) { // fn#113266, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15181:593, offset: 0x023f1a08, size: 323 bytes, params: 2, frame: 27
var r5;
var PressableOpacity;
var Text;
var intl;
const styles = useStyles();
const value2 = (importDefault(14986) /* metro dependency 14986: useResourceChannels */)(guildId);
const value3 = value2.length > 2;
const value5 = value2.slice(0, 2).map(_fun113267);
if (value3) {
PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
var pressableOpacityProps = {style: styles.channelItem, onPress: function() {
importDefault(dependencyMap[8]).openLazy(require(dependencyMap[10])(dependencyMap[9], dependencyMap.paths),
ONBOARDING_HOME_RESOURCES_SHEET_KEY, {guildId: guildId});
}};
Text = (require(4573) /* metro dependency 4573: Text */).Text;
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
r5 = <PressableOpacity {...pressableOpacityProps}><Text variant="text-md/medium" color="text-default">{intl.format((require(1244) /* metro dependency 1244: indexNative */).t.F6iMs4,
{count: value2.length - 2})}</Text></PressableOpacity>;
} else {
r5 = null;
}
return (
<ScrollView horizontal style={styles.container}>
{value5}
{r5}
</ScrollView>
);
}
function _fun113267(a0) { // fn#113267, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15181:736, offset: 0x023f1b4b, size: 138 bytes, params: 2, frame: 19
const env0_0 = a0;
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
const pressableOpacityProps = {style: styles.channelItem, onPress: onPress_113268};
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<PressableOpacity {...pressableOpacityProps} key={a0.channelId}>
<Text variant="text-md/medium" color="text-default">
{a0.title}
</Text>
</PressableOpacity>
);
}
function onPress_113268() { // fn#113268, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15181:796, offset: 0x023f1bd5, size: 60 bytes, params: 1, frame: 13
const channelId = env0_0.channelId;
let value = environment.__proto__.__proto__;
value = require(11806) /* metro dependency 11806: GuildOnboardingHomeActionCreators */;
value.selectHomeResourceChannel(guildId, channelId);
}
@@ -0,0 +1,179 @@
/* Metro module 14992; source: modules/guild_onboarding_home/useFirstMessageOrEmbedContent.tsx; dependencies: [2] */
function _fun113312(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#113312, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15189:6, offset: 0x023f403e, size: 109 bytes, params: 8, frame: 16
const _arrayLikeToArray_113315 = function(a0, a1) {
var r0;
var r1;
var r2;
var value3;
var length;
var value5;
var value = undefined;
var value2 = value == null;
reducibleJoin2: while (true) {
if (value2) {
r0 = value2;
break reducibleJoin2;
}
value3 = value > a0.length;
r0 = value3;
break reducibleJoin2;
}
reducibleJoin4: while (true) {
if (r0) {
length = a0.length;
r1 = length;
break reducibleJoin4;
}
r1 = value;
break reducibleJoin4;
}
value = (0, global.Array)(r1);
var value4 = 0;
if (value4 < r1) {
r2 = value4;
reducibleLoop5: while (true) {
value[r2] = a0[r2];
value5 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
if (value5 < r1) {
r2 = value5;
continue reducibleLoop5;
}
break reducibleLoop5;
}
}
return value;
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_onboarding_home/useFirstMessageOrEmbedContent.tsx');
exports.default = useFirstMessageOrEmbedContent;
}
function _createForOfIteratorHelperLoose_113313(a0, a1) { // fn#113313, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15189:46, offset: 0x023f40ab, size: 372 bytes, params: 3, frame: 20
var r6;
var r9;
var r5;
var value3;
var regexp;
const env0_0 = a0;
const Symbol = global.Symbol;
let value = typeof Symbol !== 'undefined';
let r1 = value && a0[global.Symbol.iterator];
r1 = !r1 ? a0['@@iterator'] : r1;
if (r1) {
value = r1.call(a0);
return value.next.bind(value);
}
const Array = global.Array;
if (Array.isArray(a0)) {
if (r1) {
}
return _fun113314;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_113315(a0, value);
r5 = value;
} else {
value3 = ({}).toString.call(a0).slice(8, -1);
r6 = value3 === 'Object' && a0.constructor;
r9 = r6 ? a0.constructor.name : value3;
if (r9 === 'Map') {
r6 = global.Array.from(a0);
} else if (r9 === 'Set') {
r6 = global.Array.from(a0);
} else if (r9 === 'Arguments') {
value = _arrayLikeToArray_113315(a0, value);
r6 = value;
} else {
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value = _arrayLikeToArray_113315(a0, value);
r6 = value;
} else {
r6 = value;
}
}
r5 = r6;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
}
return _fun113314;
}
const TypeError = global.TypeError;
throw new TypeError('Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.');
}
function useFirstMessageOrEmbedContent(a0) { // fn#113316, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15189:1115, offset: 0x023f421f, size: 162 bytes, params: 2, frame: 17
var length;
var r4;
var value3;
var value4;
var done;
var value5;
var rawDescription;
var value6;
if (a0 != null) {
var content = a0.content;
var value = undefined;
reducibleJoin3: while (true) {
if (content == null) {
length = value;
break reducibleJoin3;
}
length = content.length;
break reducibleJoin3;
}
if (length > 0) {
return a0.content;
}
var embeds = a0.embeds;
reducibleJoin6: while (true) {
if (embeds == null) {
length = value;
break reducibleJoin6;
}
length = embeds.length;
break reducibleJoin6;
}
if (length > 0) {
value3 = _createForOfIteratorHelperLoose_113313(a0.embeds);
value4 = value3();
done = value4.done;
reducibleJoin12: while (true) {
if (done) {
break reducibleJoin12;
}
r4 = value4;
reducibleLoop8: while (true) {
value5 = r4.value;
rawDescription = value5.rawDescription;
if (rawDescription != null) {
rawDescription = value5.rawDescription;
length = rawDescription.length;
reducibleJoin10: while (true) {
if (length > 0) {
return value5.rawDescription;
}
break reducibleJoin10;
}
}
value6 = value3();
done = value6.done;
if (done) {
break reducibleJoin12;
}
r4 = value6;
continue reducibleLoop8;
}
}
}
}
return null;
}
@@ -0,0 +1,64 @@
/* Metro module 5104; source: modules/guild_onboarding_home/useIsNewMember.tsx; dependencies: [1937, 1945, 3772, 1391, 672, 566, 2] */
function _fun44549(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#44549, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5282:6, offset: 0x01173894, size: 174 bytes, params: 8, frame: 19
let env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const impersonateStore = importDefault(1937) /* metro dependency 1937: ImpersonateStore */;
const guildMemberStore = importDefault(1945) /* metro dependency 1945: GuildMemberStore */;
const env0_5 = (require(3772) /* metro dependency 3772: GuildMemberConstants */).GuildMemberFlags;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_onboarding_home/useIsNewMember.tsx');
exports.default = function(a0) {
var env0_0 = a0;
return require(dependencyMap[5]).useStateFromStores([GuildMemberStore, ImpersonateStore], _fun44552);
};
exports.getIsNewMember = function(a0) {
return _getIsNewMember(a0, GuildMemberStore, ImpersonateStore);
};
}
function _getIsNewMember(a0, a1, a2) { // fn#44550, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5282:143, offset: 0x01173942, size: 219 bytes, params: 4, frame: 18
var r1;
var r0;
var moduleValue;
var hasFlag;
var flags;
if (a2.isFullServerPreview(a0)) {
return true;
}
let value = a1.getSelfMember(a0);
if (value == null) {
return false;
}
const selfMemberJoinedAt = a1.getSelfMemberJoinedAt(a0);
const value3 = selfMemberJoinedAt != null;
if (value3) {
moduleValue = require(1391) /* metro dependency 1391: FlagUtils */;
hasFlag = moduleValue.hasFlag;
flags = value.flags;
value = 0;
value = Reflect.apply(hasFlag, moduleValue, [flags ?? value, GuildMemberFlags.COMPLETED_HOME_ACTIONS]);
if (value) {
r1 = !value;
} else {
value = global.Date.now();
value -= selfMemberJoinedAt.getTime();
value = value < (importDefault(672) /* metro dependency 672: Durations */).Millis.WEEK;
r1 = value;
}
r0 = r1;
} else {
r0 = value3;
}
return r0;
}
function useIsNewMember(a0) { // fn#44551, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5282:515, offset: 0x01173a1d, size: 72 bytes, params: 2, frame: 15
const env0_0 = a0;
return (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildMemberStore, ImpersonateStore],
_fun44552);
}
function _fun44552() { // fn#44552, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5282:583, offset: 0x01173a65, size: 33 bytes, params: 1, frame: 15
return _getIsNewMember(env0_0, GuildMemberStore, ImpersonateStore);
}
@@ -0,0 +1,38 @@
/* Metro module 11275; source: modules/guild_onboarding_home/useIsSelectedResourceChannel.tsx; dependencies: [4791, 1379, 1934, 661, 1386, 632, 1391, 11276, 5103, 2] */
function _fun86112(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#86112, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11461:6, offset: 0x01f8822f, size: 194 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const channelSectionStore = importDefault(4791) /* metro dependency 4791: ChannelSectionStore */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const selectedChannelStore = importDefault(1934) /* metro dependency 1934: SelectedChannelStore */;
const env0_6 = (require(661) /* metro dependency 661: Constants */).EMPTY_STRING_SNOWFLAKE_ID;
const env0_7 = (require(1386) /* metro dependency 1386: ChannelConstants */).ChannelFlags;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_onboarding_home/useIsSelectedResourceChannel.tsx');
exports.default = useIsSelectedResourceChannel;
}
function useIsSelectedResourceChannel(a0) { // fn#86113, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11461:291, offset: 0x01f882f1, size: 128 bytes, params: 2, frame: 18
const env0_0 = a0;
const guild_id = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([ChannelStore,
SelectedChannelStore, ChannelSectionStore], _fun86114);
return guild_id != null && (require(5103) /* metro dependency 5103: OnboardingHomeUtils */).useCanSeeOnboardingHome(guild_id ?? EMPTY_STRING_SNOWFLAKE_ID);
}
function _fun86114() { // fn#86114, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11461:374, offset: 0x01f88371, size: 131 bytes, params: 1, frame: 17
const channel = ChannelStore.getChannel(env0_0);
if (channel != null) {
var moduleValue = require(1391) /* metro dependency 1391: FlagUtils */;
var hasFlag = moduleValue.hasFlag;
var flags = channel.flags;
var IS_GUILD_RESOURCE_CHANNEL = ChannelFlags.IS_GUILD_RESOURCE_CHANNEL;
if (Reflect.apply(hasFlag, moduleValue, [flags, IS_GUILD_RESOURCE_CHANNEL])) {
if ((importDefault(11276) /* metro dependency 11276: isSelectedFromHomeChannelNative */)(channel,
SelectedChannelStore, ChannelSectionStore)) {
return channel.guild_id;
}
return undefined;
}
}
}
@@ -0,0 +1,32 @@
/* Metro module 14986; source: modules/guild_onboarding_home/useResourceChannels.tsx; dependencies: [1379, 4869, 632, 2] */
function _fun113271(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#113271, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15183:6, offset: 0x023f1cc0, size: 130 bytes, params: 8, frame: 19
let env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const guildOnboardingHomeSettingsStore = importDefault(4869) /* metro dependency 4869: GuildOnboardingHomeSettingsStore */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_onboarding_home/useResourceChannels.tsx');
exports.default = function(a0) {
var env0_0 = a0;
return require(dependencyMap[2]).useStateFromStoresArray([GuildOnboardingHomeSettingsStore, ChannelStore],
_fun113273);
};
}
function useResourceChannels(a0) { // fn#113272, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15183:213, offset: 0x023f1d42, size: 75 bytes, params: 2, frame: 15
const env0_0 = a0;
return (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStoresArray([GuildOnboardingHomeSettingsStore,
ChannelStore], _fun113273);
}
function _fun113273() { // fn#113273, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15183:291, offset: 0x023f1d8d, size: 46 bytes, params: 1, frame: 11
var environment;
const value = environment.__proto__;
return GuildOnboardingHomeSettingsStore.getResourceChannels(env0_0).filter(_fun113274);
}
function _fun113274({channelId}) { // fn#113274, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15183:328, offset: 0x023f1dbb, size: 33 bytes, params: 2, frame: 11
const value = environment.__proto__.__proto__;
return ChannelStore.getChannel(channelId) != null;
}