507 lines
23 KiB
TypeScript
507 lines
23 KiB
TypeScript
/* Metro module 6603; source: modules/guild_onboarding/GuildOnboardingPromptsStore.tsx; dependencies: [6, 7, 15, 17, 18, 1937, 1379, 6599, 5106, 5108, 22, 672, 21, 566, 694, 2] */
|
|
function _fun52037(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#52037, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6781:6, offset: 0x0131d991, size: 553 bytes, params: 8, frame: 20
|
|
let env0_0 = require;
|
|
const convertPromptsToTracked = function(a0, a1, a2) {
|
|
var env0_0 = a1;
|
|
var env0_1 = a2;
|
|
return a0.map(_fun52042);
|
|
};
|
|
const closure = GUILD_ONBOARDING_PROMPTS_LOCAL_UPDATE;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
const env0_3 = importDefault(6) /* metro dependency 6 */;
|
|
const env0_4 = importDefault(7) /* metro dependency 7 */;
|
|
const env0_5 = importDefault(15) /* metro dependency 15 */;
|
|
const env0_6 = importDefault(17) /* metro dependency 17 */;
|
|
const env0_7 = importDefault(18) /* metro dependency 18 */;
|
|
const impersonateStore = importDefault(1937) /* metro dependency 1937: ImpersonateStore */;
|
|
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
|
|
const guildOnboardingStore = importDefault(6599) /* metro dependency 6599: GuildOnboardingStore */;
|
|
const env0_11 = (require(6599) /* metro dependency 6599: GuildOnboardingStore */).GuildOnboardingStatus;
|
|
const env0_12 = (require(5106) /* metro dependency 5106: GuildOnboardingPromptsConstants */).GuildOnboardingMode;
|
|
let env0_13 = {};
|
|
const env0_14 = {};
|
|
const env0_15 = {};
|
|
const env0_17 = [];
|
|
const env0_18 = [];
|
|
const env0_19 = [];
|
|
const env0_20 = [];
|
|
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
|
|
let value = _fun52048(Store);
|
|
value.displayName = 'GuildOnboardingPromptsStore';
|
|
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */, {CONNECTION_OPEN: function() {
|
|
env0_16 = false;
|
|
env0_13 = {};
|
|
}, GUILD_DELETE: GUILD_DELETE_52076, GUILD_ONBOARDING_PROMPTS_FETCH_START: function() {
|
|
env0_16 = true;
|
|
}, GUILD_ONBOARDING_PROMPTS_FETCH_SUCCESS: GUILD_ONBOARDING_PROMPTS_FETCH_SUCCESS_52078,
|
|
GUILD_ONBOARDING_PROMPTS_FETCH_FAILURE: function() {
|
|
env0_16 = false;
|
|
}, GUILD_ONBOARDING_SELECT_OPTION: GUILD_ONBOARDING_SELECT_OPTION_52082,
|
|
GUILD_ONBOARDING_UPDATE_RESPONSES_SUCCESS: GUILD_ONBOARDING_UPDATE_RESPONSES_SUCCESS,
|
|
GUILD_ONBOARDING_PROMPTS_LOCAL_UPDATE: closure, GUILD_SETTINGS_ONBOARDING_PROMPTS_SAVE_SUCCESS: closure,
|
|
GUILD_SETTINGS_DEFAULT_CHANNELS_SAVE_SUCCESS: GUILD_SETTINGS_DEFAULT_CHANNELS_SAVE_SUCCESS,
|
|
GUILD_SETTINGS_ONBOARDING_CONNECTIONS_SAVE_SUCCESS: GUILD_SETTINGS_ONBOARDING_CONNECTIONS_SAVE_SUCCESS,
|
|
GUILD_SETTINGS_ONBOARDING_SET_MODE: GUILD_SETTINGS_ONBOARDING_SET_MODE});
|
|
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_onboarding/GuildOnboardingPromptsStore.tsx');
|
|
exports.default = value;
|
|
}
|
|
|
|
function _isNativeReflectConstruct_52038() { // fn#52038, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6781:240, offset: 0x0131dbba, 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_52038_isNativeReflectConstruct = function() {
|
|
return !!result;
|
|
})();
|
|
}
|
|
|
|
function convertPromptsToTracked(a0, a1, a2) { // fn#52041, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6781:457, offset: 0x0131dc18, size: 36 bytes, params: 4, frame: 11
|
|
const env0_0 = a1;
|
|
const env0_1 = a2;
|
|
return a0.map(_fun52042);
|
|
}
|
|
|
|
function GUILD_ONBOARDING_PROMPTS_LOCAL_UPDATE({guildId, updates}) { // fn#52043, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6781:739, offset: 0x0131dced, size: 208 bytes, params: 2, frame: 21
|
|
let r7 = updates.onboardingPromptsSeen ?? env0_13[guildId]?.onboardingPromptsSeen;
|
|
r7 = r7 ?? ({});
|
|
let r6 = updates.onboardingResponsesSeen ?? env0_13[guildId]?.onboardingResponsesSeen;
|
|
r6 = r6 ?? ({});
|
|
const convertPromptsToTrackedBinding = convertPromptsToTracked;
|
|
let r2 = updates.prompts ?? env0_13[guildId]?.prompts;
|
|
r2 = r2 ?? [];
|
|
const value3 = convertPromptsToTrackedBinding(r2, r7, r6);
|
|
const binding = env0_13;
|
|
const object2 = {};
|
|
copyDataProperties(object2, binding[guildId], undefined);
|
|
copyDataProperties(object2, updates, undefined);
|
|
object2['prompts'] = value3;
|
|
binding[guildId] = object2;
|
|
}
|
|
|
|
function mergePendingResponses(a0, a1) { // fn#52044, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6781:1138, offset: 0x0131ddbd, size: 175 bytes, params: 3, frame: 18
|
|
var object2;
|
|
var Object;
|
|
var value2;
|
|
var value3;
|
|
var binding;
|
|
const env0_0 = a0;
|
|
const env0_1 = a1;
|
|
if (env0_14[a0] != null) {
|
|
object2 = {};
|
|
Object = global.Object;
|
|
value2 = Object.keys(env0_14[a0]);
|
|
value2.forEach(_fun52045);
|
|
env0_14[a0] = object2;
|
|
value3 = a1.filter(_fun52046);
|
|
Object = global.Object;
|
|
Object.keys(object2).forEach(_fun52047);
|
|
binding = env0_13;
|
|
object2 = {};
|
|
copyDataProperties(object2, binding[a0], value2);
|
|
object2['responses'] = value3;
|
|
binding[a0] = object2;
|
|
}
|
|
}
|
|
|
|
function _fun52048(a0) { // fn#52048, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6781:1474, offset: 0x0131df41, size: 440 bytes, params: 2, frame: 16
|
|
const closure = GuildOnboardingPromptsStore;
|
|
env0_7(closure, a0);
|
|
return env0_4(closure, [{key: 'initialize', value: function() {
|
|
this.waitFor(ChannelStore, GuildOnboardingStore, ImpersonateStore);
|
|
}}, {key: 'getOnboardingPromptsForOnboarding', value: value_52051}, {key: 'getOnboardingPrompts',
|
|
value: value_52052}, {key: 'getOnboardingResponses', value: value_52053}, {key: 'getSelectedOptions',
|
|
value: function(a0) {
|
|
var env0_0 = this.getOnboardingResponses(a0);
|
|
var value = this.getOnboardingPrompts(a0);
|
|
value = value.map(_fun52055);
|
|
value = value.flat();
|
|
return value.filter(_fun52056);
|
|
}}, {key: 'getOnboardingResponsesForPrompt', value: value_52057}, {key: 'getEnabledOnboardingPrompts',
|
|
value: value_52060}, {key: 'getDefaultChannelIds', value: value_52061}, {key: 'getEnabled', value: value_52062},
|
|
{key: 'getOnboardingPrompt', value: value_52063}, {key: 'isLoading', value: value_52066},
|
|
{key: 'shouldFetchPrompts', value: value_52067}, {key: 'getPendingResponseOptions', value: value_52068},
|
|
{key: 'ackIdForGuild', value: value_52069}, {key: 'lastFetchedAt', value: value_52072}, {key: 'isAdvancedMode',
|
|
value: value_52073}, {key: 'getConnections', value: value_52074}]);
|
|
}
|
|
|
|
function GUILD_DELETE_52076({guild}) { // fn#52076, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6781:4150, offset: 0x0131e599, size: 54 bytes, params: 2, frame: 4
|
|
delete env0_13[guild.id];
|
|
delete env0_14[guild.id];
|
|
delete env0_15[guild.id];
|
|
}
|
|
|
|
function GUILD_ONBOARDING_PROMPTS_FETCH_SUCCESS_52078({guildId, prompts, defaultChannelIds, enabled, responses, onboardingPromptsSeen, onboardingResponsesSeen, mode, belowRequirements, connections}) { // fn#52078, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6781:4339, offset: 0x0131e5dc, size: 267 bytes, params: 2, frame: 26
|
|
const onboardingStatus = GuildOnboardingStore.getOnboardingStatus(guildId);
|
|
const READY = GuildOnboardingStatus.READY;
|
|
const value3 = onboardingStatus === READY;
|
|
const value4 = convertPromptsToTracked(prompts, onboardingPromptsSeen, onboardingResponsesSeen);
|
|
let binding = env0_13;
|
|
const object2 = {enabled: enabled, mode: mode, belowRequirements: belowRequirements, prompts: value4};
|
|
object2.onboardingPrompts = value4.filter(function(a0) {
|
|
return a0.inOnboarding;
|
|
});
|
|
object2.defaultChannelIds = defaultChannelIds.filter(_fun52080);
|
|
object2.responses = value3 ? [] : responses;
|
|
object2.onboardingPromptsSeen = onboardingPromptsSeen;
|
|
object2.onboardingResponsesSeen = onboardingResponsesSeen;
|
|
object2.connections = connections ?? [];
|
|
binding[guildId] = object2;
|
|
if (!value3) {
|
|
mergePendingResponses(guildId, responses);
|
|
}
|
|
binding = env0_15;
|
|
const Date = global.Date;
|
|
binding[guildId] = Date.now();
|
|
}
|
|
|
|
function GUILD_ONBOARDING_SELECT_OPTION_52082({guildId, optionId, selected, removedOptionIds}) { // fn#52082, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6781:5005, offset: 0x0131e730, size: 309 bytes, params: 2, frame: 21
|
|
var r11;
|
|
var r1;
|
|
var r0;
|
|
var value3;
|
|
var defaultImport;
|
|
var defaultImport2;
|
|
var binding;
|
|
var object2;
|
|
const isFullServerPreview2 = ImpersonateStore.isFullServerPreview(guildId);
|
|
if (isFullServerPreview2) {
|
|
r0 = !!isFullServerPreview2;
|
|
} else {
|
|
value3 = env0_13[guildId] != null;
|
|
if (value3) {
|
|
if (removedOptionIds != null && removedOptionIds.length > 0) {
|
|
defaultImport = importDefault(22) /* metro dependency 22 */;
|
|
defaultImport.pullAll(env0_13[guildId].responses, removedOptionIds);
|
|
r11 = defaultImport;
|
|
}
|
|
if (selected) {
|
|
env0_13[guildId].responses.push(optionId);
|
|
} else {
|
|
defaultImport2 = importDefault(22) /* metro dependency 22 */;
|
|
defaultImport2.pull(env0_13[guildId].responses, optionId);
|
|
r11 = defaultImport2;
|
|
}
|
|
if (env0_14[guildId] == null) {
|
|
env0_14[guildId] = {};
|
|
}
|
|
env0_14[guildId][optionId] = selected;
|
|
if (removedOptionIds != null) {
|
|
removedOptionIds.forEach(_fun52083);
|
|
}
|
|
binding = env0_14;
|
|
object2 = {};
|
|
copyDataProperties(object2, binding[guildId], r11);
|
|
binding[guildId] = object2;
|
|
r1 = true;
|
|
} else {
|
|
r1 = value3;
|
|
}
|
|
r0 = r1;
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
function GUILD_ONBOARDING_UPDATE_RESPONSES_SUCCESS({guildId, options, prompts_seen, options_seen}) { // fn#52084, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6781:5377, offset: 0x0131e882, size: 150 bytes, params: 2, frame: 19
|
|
mergePendingResponses(guildId, options);
|
|
const property = env0_13[guildId];
|
|
if (property == null) {
|
|
return false;
|
|
}
|
|
const value2 = convertPromptsToTracked(property.prompts, prompts_seen, options_seen);
|
|
const binding = env0_13;
|
|
const object2 = {};
|
|
copyDataProperties(object2, property, undefined);
|
|
object2['prompts'] = value2;
|
|
object2['onboardingPrompts'] = value2.filter(function(a0) {
|
|
return a0.inOnboarding;
|
|
});
|
|
object2['onboardingPromptsSeen'] = prompts_seen;
|
|
object2['onboardingResponsesSeen'] = options_seen;
|
|
binding[guildId] = object2;
|
|
}
|
|
|
|
function GUILD_SETTINGS_DEFAULT_CHANNELS_SAVE_SUCCESS({guildId, channelIds}) { // fn#52086, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6781:5848, offset: 0x0131e918, size: 51 bytes, params: 2, frame: 14
|
|
const binding = env0_13;
|
|
const object2 = {};
|
|
copyDataProperties(object2, binding[guildId], channelIds);
|
|
object2['defaultChannelIds'] = channelIds;
|
|
binding[guildId] = object2;
|
|
}
|
|
|
|
function GUILD_SETTINGS_ONBOARDING_CONNECTIONS_SAVE_SUCCESS({guildId, connections}) { // fn#52087, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6781:5998, offset: 0x0131e94b, size: 69 bytes, params: 2, frame: 14
|
|
if (env0_13[guildId] == null) {
|
|
return false;
|
|
}
|
|
const binding = env0_13;
|
|
const object2 = {};
|
|
copyDataProperties(object2, binding[guildId], connections);
|
|
object2['connections'] = connections;
|
|
binding[guildId] = object2;
|
|
}
|
|
|
|
function GUILD_SETTINGS_ONBOARDING_SET_MODE({guildId, mode}) { // fn#52088, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6781:6146, offset: 0x0131e990, size: 40 bytes, params: 2, frame: 3
|
|
const property = env0_13[guildId];
|
|
if (property != null) {
|
|
property.mode = mode;
|
|
}
|
|
}
|
|
|
|
function _fun52042(a0) { // fn#52042, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6781:511, offset: 0x0131dc3c, size: 177 bytes, params: 2, frame: 23
|
|
var r13;
|
|
var r4;
|
|
var r9;
|
|
var r5;
|
|
var property;
|
|
var id;
|
|
var value3;
|
|
var push;
|
|
var object3;
|
|
var value4;
|
|
const items2 = [];
|
|
let options = a0.options;
|
|
let length = options.length;
|
|
let value = 0;
|
|
const value2 = false;
|
|
if (value < length) {
|
|
r4 = value2;
|
|
r9 = value;
|
|
while (true) {
|
|
options = a0.options;
|
|
property = options[r9];
|
|
id = property.id;
|
|
value = importDefault[id] == null;
|
|
if (value) {
|
|
value3 = true;
|
|
r4 = value3;
|
|
}
|
|
push = items2.push;
|
|
object3 = {};
|
|
value4 = copyDataProperties(object3, property, property);
|
|
object3['isUnseen'] = value;
|
|
Reflect.apply(push, items2, [object3]);
|
|
value = typeof r9 === 'bigint' ? r9 + 1n : +r9 + 1;
|
|
options = a0.options;
|
|
length = options.length;
|
|
if (value < length) {
|
|
r9 = value;
|
|
continue;
|
|
}
|
|
r5 = r4;
|
|
r13 = value4;
|
|
break;
|
|
}
|
|
} else {
|
|
r5 = value2;
|
|
}
|
|
const object4 = {};
|
|
copyDataProperties(object4, a0, r13);
|
|
object4['options'] = items2;
|
|
object4['hasNewAnswers'] = r5;
|
|
object4['isNew'] = require[a0.id] == null;
|
|
return object4;
|
|
}
|
|
|
|
function _fun52045(a0) { // fn#52045, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6781:1225, offset: 0x0131de6c, size: 116 bytes, params: 2, frame: 13
|
|
var value2;
|
|
if (require.includes(a0)) {
|
|
if (require.includes(a0) && env1_14[env0_0][a0] === false) {
|
|
env0_2[a0] = false;
|
|
}
|
|
} else {
|
|
value2 = environment.__proto__;
|
|
if (env1_14[env0_0][a0]) {
|
|
env0_2[a0] = true;
|
|
} else if (require.includes(a0) && env1_14[env0_0][a0] === false) {
|
|
env0_2[a0] = false;
|
|
}
|
|
}
|
|
}
|
|
|
|
function _fun52046(a0) { // fn#52046, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6781:1326, offset: 0x0131dee0, size: 39 bytes, params: 2, frame: 4
|
|
return env0_2[a0] == null || env0_2[a0] === true;
|
|
}
|
|
|
|
function _fun52047(a0) { // fn#52047, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6781:1377, offset: 0x0131df07, size: 58 bytes, params: 2, frame: 13
|
|
if (!(env0_2[a0] !== true || require.includes(a0))) {
|
|
env0_3.push(a0);
|
|
}
|
|
}
|
|
|
|
function value_52051(a0) { // fn#52051, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6781:1919, offset: 0x0131e11c, size: 41 bytes, params: 2, frame: 5
|
|
return env1_13[a0]?.onboardingPrompts ?? env1_17;
|
|
}
|
|
|
|
function value_52052(a0) { // fn#52052, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6781:2038, offset: 0x0131e145, size: 41 bytes, params: 2, frame: 5
|
|
return env1_13[a0]?.prompts ?? env1_17;
|
|
}
|
|
|
|
function value_52053(a0) { // fn#52053, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6781:2149, offset: 0x0131e16e, size: 104 bytes, params: 2, frame: 15
|
|
const value = environment.__proto__;
|
|
return ImpersonateStore.isFullServerPreview(a0) ? global.Array.from(ImpersonateStore.getOnboardingResponses(a0) ?? env1_18) : env1_13[a0]?.responses ?? env1_18;
|
|
}
|
|
|
|
function value_52054(a0) { // fn#52054, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6781:2339, offset: 0x0131e1d6, size: 76 bytes, params: 2, frame: 12
|
|
const env0_0 = this.getOnboardingResponses(a0);
|
|
let value = this.getOnboardingPrompts(a0);
|
|
value = value.map(function(a0) {
|
|
return a0.options;
|
|
});
|
|
value = value.flat();
|
|
return value.filter(_fun52056);
|
|
}
|
|
|
|
function value_52057(a0, a1) { // fn#52057, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6781:2528, offset: 0x0131e247, size: 137 bytes, params: 3, frame: 17
|
|
var environment;
|
|
var r1;
|
|
const env0_0 = a1;
|
|
let value = environment.__proto__;
|
|
const property = env1_13[a0];
|
|
if (property == null) {
|
|
return env1_18;
|
|
}
|
|
const value2 = property.prompts.find(function({id}) {
|
|
return id === require;
|
|
});
|
|
if (value2 == null) {
|
|
r1 = env1_18;
|
|
} else {
|
|
value = importDefault(22) /* metro dependency 22 */;
|
|
value = value.intersection(value2.options.map(function(a0) {
|
|
return a0.id;
|
|
}), this.getOnboardingResponses(a0));
|
|
r1 = value;
|
|
}
|
|
return r1;
|
|
}
|
|
|
|
function value_52060(a0) { // fn#52060, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6781:2748, offset: 0x0131e2d0, size: 90 bytes, params: 2, frame: 14
|
|
const property = env1_13[a0];
|
|
return ImpersonateStore.isFullServerPreview(a0) ? property?.prompts ?? env1_17 : property == null ? env1_17 : property.enabled && property.prompts != null ? property.prompts : env1_17;
|
|
}
|
|
|
|
function value_52061(a0) { // fn#52061, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6781:2926, offset: 0x0131e32a, size: 41 bytes, params: 2, frame: 5
|
|
return env1_13[a0]?.defaultChannelIds ?? env1_19;
|
|
}
|
|
|
|
function value_52062(a0) { // fn#52062, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6781:3035, offset: 0x0131e353, size: 66 bytes, params: 2, frame: 13
|
|
var enabled;
|
|
var r0;
|
|
let value = environment.__proto__;
|
|
const isFullServerPreview2 = ImpersonateStore.isFullServerPreview(a0);
|
|
const property = env1_13[a0];
|
|
if (isFullServerPreview2) {
|
|
r0 = property != null;
|
|
} else {
|
|
value = undefined;
|
|
enabled = property == null ? value : property.enabled;
|
|
value = enabled != null;
|
|
r0 = value && enabled;
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
function value_52063(a0) { // fn#52063, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6781:3178, offset: 0x0131e395, size: 77 bytes, params: 2, frame: 12
|
|
var environment;
|
|
const env0_0 = a0;
|
|
const Object = global.Object;
|
|
const values = Object.values;
|
|
let value = environment.__proto__;
|
|
value = Reflect.apply(values, Object, [env1_13]);
|
|
value = value.map(function(a0) {
|
|
return a0.prompts;
|
|
});
|
|
value = value.flat();
|
|
return value.find(_fun52065);
|
|
}
|
|
|
|
function value_52067(a0) { // fn#52067, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6781:3340, offset: 0x0131e3ed, size: 105 bytes, params: 2, frame: 13
|
|
let value = a1;
|
|
const r2 = value !== undefined ? value : (importDefault(672) /* metro dependency 672: Durations */).Millis.HOUR;
|
|
value = environment.__proto__;
|
|
if (env1_16) {
|
|
return false;
|
|
}
|
|
const property = env1_15[a0];
|
|
return property == null || global.Date.now() - property > r2;
|
|
}
|
|
|
|
function value_52069(a0) { // fn#52069, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6781:3525, offset: 0x0131e456, size: 50 bytes, params: 2, frame: 12
|
|
const enabledOnboardingPrompts = this.getEnabledOnboardingPrompts(a0);
|
|
const env0_0 = '0';
|
|
enabledOnboardingPrompts.forEach(_fun52070);
|
|
return env0_0;
|
|
}
|
|
|
|
function value_52073(a0) { // fn#52073, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6781:3795, offset: 0x0131e528, size: 53 bytes, params: 2, frame: 5
|
|
var r0;
|
|
let value = a0 != null;
|
|
if (value) {
|
|
value = environment.__proto__;
|
|
value = env1_13[a0]?.mode === GuildOnboardingMode.ONBOARDING_ADVANCED;
|
|
r0 = value;
|
|
} else {
|
|
r0 = value;
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
function value_52074(a0) { // fn#52074, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6781:3914, offset: 0x0131e55d, size: 41 bytes, params: 2, frame: 5
|
|
return env1_13[a0]?.connections ?? env1_20;
|
|
}
|
|
|
|
function _fun52080(a0) { // fn#52080, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6781:4726, offset: 0x0131e6f2, size: 49 bytes, params: 2, frame: 13
|
|
let value = environment.__proto__;
|
|
value = require(5108) /* metro dependency 5108: DefaultChannelUtils */;
|
|
return value.canChannelBeDefault(guildId, a0);
|
|
}
|
|
|
|
function _fun52083(a0) { // fn#52083, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6781:5299, offset: 0x0131e865, size: 29 bytes, params: 2, frame: 3
|
|
env1_14[guildId][a0] = false;
|
|
return false;
|
|
}
|
|
|
|
function _fun52070(a0) { // fn#52070, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6781:3603, offset: 0x0131e488, size: 91 bytes, params: 2, frame: 16
|
|
var environment;
|
|
a0.options.forEach(_fun52071);
|
|
let value = environment.__proto__.__proto__;
|
|
const compare = (importDefault(21) /* metro dependency 21: SnowflakeUtils */).compare;
|
|
let id = a0.id;
|
|
value = Reflect.apply(compare, value, [id, env0_0]);
|
|
if (value > 0) {
|
|
id = a0.id;
|
|
}
|
|
}
|
|
|
|
function _fun52071(a0) { // fn#52071, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6781:3626, offset: 0x0131e4e3, size: 69 bytes, params: 2, frame: 16
|
|
let value = environment.__proto__.__proto__.__proto__;
|
|
const compare = (importDefault(21) /* metro dependency 21: SnowflakeUtils */).compare;
|
|
let id = a0.id;
|
|
value = Reflect.apply(compare, value, [id, env1_0]);
|
|
if (value > 0) {
|
|
id = a0.id;
|
|
}
|
|
}
|
|
|