Initial commit
This commit is contained in:
commit
af3b49f756
16065 files changed
+2938410
No files matched your search
@@ -0,0 +1,555 @@
|
||||
/* Metro module 9090; source: modules/guild_onboarding/DefaultChannelThresholdUtils.tsx; dependencies: [5, 1867, 6603, 5106, 661, 6602, 5105, 483, 4647, 1244, 2] */
|
||||
function _fun71077(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#71077, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9275:6, offset: 0x01d13efe, size: 296 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const _arrayLikeToArray_71080 = 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 isChattableChannelThresholdMetAfterChannelChange = function() {
|
||||
return _isChattableChannelThresholdMetAfterChannelChange.apply(this, arguments);
|
||||
};
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_4 = importDefault(5) /* metro dependency 5 */;
|
||||
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
|
||||
const guildOnboardingPromptsStore = importDefault(6603) /* metro dependency 6603: GuildOnboardingPromptsStore */;
|
||||
const env0_7 = (require(5106) /* metro dependency 5106: GuildOnboardingPromptsConstants */).NUM_DEFAULT_CHATTABLE_CHANNELS_MIN;
|
||||
const constantsModule = require(661) /* metro dependency 661: Constants */;
|
||||
const env0_8 = constantsModule.GuildFeatures;
|
||||
constantsModule.GuildSettingsSections;
|
||||
const env0_9 = constantsModule.Permissions;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_onboarding/DefaultChannelThresholdUtils.tsx');
|
||||
exports.isDefaultChannelThresholdMetAfterDelete = function() {
|
||||
return _isDefaultChannelThresholdMetAfterDelete.apply(this, arguments);
|
||||
};
|
||||
exports.checkChattableChannelThresholdMetAfterChannelPermissionDeny = function() {
|
||||
return _checkChattableChannelThresholdMetAfterChannelPermissionDeny.apply(this, arguments);
|
||||
};
|
||||
}
|
||||
|
||||
function _createForOfIteratorHelperLoose_71078(a0, a1) { // fn#71078, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9275:247, offset: 0x01d14026, 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 _fun71079;
|
||||
}
|
||||
value = undefined;
|
||||
if (a0) {
|
||||
if (typeof a0 === 'string') {
|
||||
value = _arrayLikeToArray_71080(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_71080(a0, value);
|
||||
r6 = value;
|
||||
} else {
|
||||
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
|
||||
if (regexp.test(r9)) {
|
||||
value = _arrayLikeToArray_71080(a0, value);
|
||||
r6 = value;
|
||||
} else {
|
||||
r6 = value;
|
||||
}
|
||||
}
|
||||
r5 = r6;
|
||||
}
|
||||
} else {
|
||||
r5 = value;
|
||||
}
|
||||
if (r5) {
|
||||
if (r5) {
|
||||
}
|
||||
return _fun71079;
|
||||
}
|
||||
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 _isDefaultChannelThresholdMetAfterDelete() { // fn#71081, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9275:1157, offset: 0x01d1419a, size: 50 bytes, params: 1, frame: 14
|
||||
return env0_4(_fun71083).apply(this, arguments);
|
||||
}
|
||||
|
||||
function _isChattableChannelThresholdMetAfterChannelChange() { // fn#71085, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9275:1552, offset: 0x01d14221, size: 50 bytes, params: 1, frame: 14
|
||||
return env0_4(_fun71087).apply(this, arguments);
|
||||
}
|
||||
|
||||
function _checkChattableChannelThresholdMetAfterChannelPermissionDeny() { // fn#71089, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9275:2596, offset: 0x01d14522, size: 50 bytes, params: 1, frame: 14
|
||||
return env0_4(_fun71091).apply(this, arguments);
|
||||
}
|
||||
|
||||
function* _fun71083(a0, a1) { // fn#71083, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9275:1260, offset: 0x01d141d7, size: 74 bytes, params: 3, frame: 17
|
||||
if (false) {
|
||||
return undefined;
|
||||
}
|
||||
value = a0 == null;
|
||||
if (!value) {
|
||||
value = environment.__proto__.__proto__;
|
||||
yield env2_13(a0, a1, {'removingView': true, 'removingChat': true});
|
||||
value = undefined;
|
||||
if (false) {
|
||||
return value;
|
||||
}
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
function* _fun71087(a0, a1, a2) { // fn#71087, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9275:1673, offset: 0x01d1425e, size: 653 bytes, params: 4, frame: 36
|
||||
var environment;
|
||||
var r1;
|
||||
var r16;
|
||||
var r20;
|
||||
var r6;
|
||||
var features;
|
||||
var has;
|
||||
var GUILD_ONBOARDING;
|
||||
var value5;
|
||||
var shouldFetchPrompts;
|
||||
var value6;
|
||||
var fetchOnboardingPrompts;
|
||||
var value7;
|
||||
var value8;
|
||||
var getDefaultChannelIds;
|
||||
var value9;
|
||||
var isAdvancedMode;
|
||||
var items4;
|
||||
var binding2;
|
||||
var getOnboardingPromptsForOnboarding;
|
||||
var value10;
|
||||
var value11;
|
||||
var done;
|
||||
var value12;
|
||||
var required;
|
||||
var options;
|
||||
var value13;
|
||||
var value14;
|
||||
var value15;
|
||||
var channelIds;
|
||||
var push;
|
||||
var items2;
|
||||
var value16;
|
||||
var value17;
|
||||
var Set;
|
||||
var items3;
|
||||
var prototype;
|
||||
var value18;
|
||||
var set;
|
||||
var value19;
|
||||
var includes;
|
||||
var removingChat;
|
||||
var removingView;
|
||||
var value20;
|
||||
var value21;
|
||||
var value22;
|
||||
var getMinimumSetOfDefaultChannelIds;
|
||||
var length;
|
||||
if (false) {
|
||||
return undefined;
|
||||
}
|
||||
const env0_0 = a1;
|
||||
value = environment.__proto__.__proto__;
|
||||
let binding = env2_5;
|
||||
const guild = binding.getGuild(a0);
|
||||
if (guild != null) {
|
||||
if (guild != null) {
|
||||
features = guild.features;
|
||||
reducibleJoin5: while (true) {
|
||||
if (features == null) {
|
||||
r1 = undefined;
|
||||
break reducibleJoin5;
|
||||
}
|
||||
has = features.has;
|
||||
GUILD_ONBOARDING = env2_8.GUILD_ONBOARDING;
|
||||
value5 = Reflect.apply(has, features, [GUILD_ONBOARDING]);
|
||||
r1 = value5;
|
||||
break reducibleJoin5;
|
||||
}
|
||||
reducibleJoin6: while (true) {
|
||||
if (r1) {
|
||||
binding = env2_6;
|
||||
shouldFetchPrompts = binding.shouldFetchPrompts;
|
||||
if (Reflect.apply(shouldFetchPrompts, binding, [a0])) {
|
||||
value6 = env2_0(env2_3[5]);
|
||||
fetchOnboardingPrompts = value6.fetchOnboardingPrompts;
|
||||
yield Reflect.apply(fetchOnboardingPrompts, value6, [a0]);
|
||||
value7 = undefined;
|
||||
value8 = false;
|
||||
reducibleJoin10: while (true) {
|
||||
if (value8) {
|
||||
return value7;
|
||||
}
|
||||
break reducibleJoin10;
|
||||
}
|
||||
}
|
||||
binding = env2_6;
|
||||
getDefaultChannelIds = binding.getDefaultChannelIds;
|
||||
value9 = Reflect.apply(getDefaultChannelIds, binding, [a0]);
|
||||
binding = env2_6;
|
||||
isAdvancedMode = binding.isAdvancedMode;
|
||||
reducibleJoin19: while (true) {
|
||||
if (Reflect.apply(isAdvancedMode, binding, [a0])) {
|
||||
items4 = [];
|
||||
binding = env2_10;
|
||||
binding2 = env2_6;
|
||||
getOnboardingPromptsForOnboarding = binding2.getOnboardingPromptsForOnboarding;
|
||||
value10 = binding(Reflect.apply(getOnboardingPromptsForOnboarding, binding2, [a0]));
|
||||
value11 = value10();
|
||||
done = value11.done;
|
||||
if (!done) {
|
||||
r16 = value11;
|
||||
reducibleLoop12: while (true) {
|
||||
value12 = r16.value;
|
||||
required = value12.required;
|
||||
reducibleJoin17: while (true) {
|
||||
if (!required) {
|
||||
break reducibleJoin17;
|
||||
}
|
||||
binding = env2_10;
|
||||
options = value12.options;
|
||||
value13 = binding(options);
|
||||
value14 = value13();
|
||||
done = value14.done;
|
||||
if (done) {
|
||||
break reducibleJoin17;
|
||||
}
|
||||
r20 = value14;
|
||||
reducibleLoop14: while (true) {
|
||||
value15 = r20.value;
|
||||
channelIds = value15.channelIds;
|
||||
reducibleJoin16: while (true) {
|
||||
if (channelIds == null) {
|
||||
break reducibleJoin16;
|
||||
}
|
||||
push = items4.push;
|
||||
channelIds = value15.channelIds;
|
||||
items2 = [];
|
||||
arraySpread(items2, channelIds, 0, undefined);
|
||||
apply(push, items2, items4, undefined);
|
||||
break reducibleJoin16;
|
||||
}
|
||||
value16 = value13();
|
||||
done = value16.done;
|
||||
if (done) {
|
||||
break reducibleJoin17;
|
||||
}
|
||||
r20 = value16;
|
||||
continue reducibleLoop14;
|
||||
}
|
||||
}
|
||||
value17 = value10();
|
||||
done = value17.done;
|
||||
if (done) {
|
||||
break reducibleLoop12;
|
||||
}
|
||||
r16 = value17;
|
||||
continue reducibleLoop12;
|
||||
}
|
||||
}
|
||||
Set = global.Set;
|
||||
items3 = [];
|
||||
arraySpread(items3, items4, arraySpread(items3, value9, 0, undefined), undefined);
|
||||
prototype = Set.prototype;
|
||||
value18 = Object.create(prototype, {constructor: {value: Set}});
|
||||
set = new Set();
|
||||
value19 = set instanceof Object ? set : value18;
|
||||
items4 = [];
|
||||
arraySpread(items4, value19, 0, undefined);
|
||||
r6 = items4;
|
||||
break reducibleJoin19;
|
||||
}
|
||||
r6 = value9;
|
||||
break reducibleJoin19;
|
||||
}
|
||||
includes = r6.includes;
|
||||
if (Reflect.apply(includes, r6, [a1])) {
|
||||
removingChat = a2.removingChat;
|
||||
if (!removingChat) {
|
||||
removingView = a2.removingView;
|
||||
reducibleJoin24: while (true) {
|
||||
if (!removingView) {
|
||||
return true;
|
||||
}
|
||||
break reducibleJoin24;
|
||||
}
|
||||
}
|
||||
binding = env2_6;
|
||||
getDefaultChannelIds = binding.getDefaultChannelIds;
|
||||
value20 = Reflect.apply(getDefaultChannelIds, binding, [a0]);
|
||||
binding = env2_6;
|
||||
isAdvancedMode = binding.isAdvancedMode;
|
||||
if (Reflect.apply(isAdvancedMode, binding, [a0])) {
|
||||
binding = env2_6;
|
||||
getOnboardingPromptsForOnboarding = binding.getOnboardingPromptsForOnboarding;
|
||||
value21 = Reflect.apply(getOnboardingPromptsForOnboarding, binding, [a0]);
|
||||
r6 = value21;
|
||||
} else {
|
||||
r6 = [];
|
||||
}
|
||||
binding = env2_0;
|
||||
value22 = binding(env2_3[6]);
|
||||
getMinimumSetOfDefaultChannelIds = value22.getMinimumSetOfDefaultChannelIds;
|
||||
length = Reflect.apply(getMinimumSetOfDefaultChannelIds, value22, [a0, value20, r6,
|
||||
_fun71088]).length;
|
||||
return !(length < env2_7);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
break reducibleJoin6;
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
function* _fun71091(a0, a1, a2) { // fn#71091, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9275:2739, offset: 0x01d1455f, size: 759 bytes, params: 4, frame: 27
|
||||
var r11;
|
||||
var r10;
|
||||
var r2;
|
||||
var r13;
|
||||
var value5;
|
||||
var binding;
|
||||
var binding2;
|
||||
var value6;
|
||||
var filter;
|
||||
var value7;
|
||||
var binding3;
|
||||
var deny;
|
||||
var value8;
|
||||
var value11;
|
||||
var value15;
|
||||
var value16;
|
||||
var value18;
|
||||
var value19;
|
||||
var isAdvancedMode2;
|
||||
var value21;
|
||||
var binding4;
|
||||
var value24;
|
||||
var show;
|
||||
var intl;
|
||||
var string;
|
||||
var t;
|
||||
var binding5;
|
||||
var format;
|
||||
let value = a1;
|
||||
if (false) {
|
||||
return undefined;
|
||||
}
|
||||
const guildId = a0.getGuildId();
|
||||
if (guildId != null) {
|
||||
if (a2 == null) {
|
||||
r11 = value;
|
||||
} else {
|
||||
value5 = environment.__proto__.__proto__;
|
||||
binding = env2_2;
|
||||
binding2 = env2_3;
|
||||
value6 = binding(binding2[7]);
|
||||
filter = value6.filter;
|
||||
value7 = binding(binding2[7]);
|
||||
value = Reflect.apply(filter, value6, [value, value7.invert(a2)]);
|
||||
r11 = value;
|
||||
}
|
||||
var property = a0.permissionOverwrites[guildId];
|
||||
if (property != null) {
|
||||
value = environment.__proto__.__proto__;
|
||||
binding = env2_2;
|
||||
binding3 = env2_3;
|
||||
value = binding(binding3[7]);
|
||||
filter = value.filter;
|
||||
deny = property.deny;
|
||||
value8 = binding(binding3[7]);
|
||||
value = Reflect.apply(filter, value, [deny, value8.invert(property.allow)]);
|
||||
r10 = value;
|
||||
} else {
|
||||
value = environment.__proto__.__proto__;
|
||||
value = env2_2(env2_3[7]);
|
||||
value = value.deserialize(0);
|
||||
r10 = value;
|
||||
}
|
||||
var object2 = {};
|
||||
value = environment.__proto__.__proto__;
|
||||
binding = env2_2;
|
||||
var value9 = binding(env2_3[7]);
|
||||
var has = value9.has;
|
||||
var VIEW_CHANNEL = env2_9.VIEW_CHANNEL;
|
||||
var value10 = Reflect.apply(has, value9, [r11, VIEW_CHANNEL]);
|
||||
if (value10) {
|
||||
value11 = env2_2(env2_3[7]);
|
||||
r2 = !value11.has(r10, env2_9.VIEW_CHANNEL);
|
||||
} else {
|
||||
r2 = value10;
|
||||
}
|
||||
object2.removingView = r2;
|
||||
var value13 = false;
|
||||
object2.removingChat = value13;
|
||||
var isForumLikeChannel2 = a0.isForumLikeChannel();
|
||||
binding = env2_2;
|
||||
var value14 = binding(env2_3[7]);
|
||||
has = value14.has;
|
||||
binding = env2_9;
|
||||
if (isForumLikeChannel2) {
|
||||
value18 = Reflect.apply(has, value14, [r11, binding.SEND_MESSAGES_IN_THREADS]);
|
||||
if (value18) {
|
||||
value19 = env2_2(env2_3[7]);
|
||||
r2 = !value19.has(r10, env2_9.SEND_MESSAGES_IN_THREADS);
|
||||
} else {
|
||||
r2 = value18;
|
||||
}
|
||||
object2.removingChat = r2;
|
||||
} else {
|
||||
value15 = Reflect.apply(has, value14, [r11, binding.SEND_MESSAGES]);
|
||||
if (value15) {
|
||||
value16 = env2_2(env2_3[7]);
|
||||
r13 = !value16.has(r10, env2_9.SEND_MESSAGES);
|
||||
} else {
|
||||
r13 = value15;
|
||||
}
|
||||
object2.removingChat = r13;
|
||||
}
|
||||
if (object2.removingChat) {
|
||||
binding = env2_6;
|
||||
isAdvancedMode2 = binding.isAdvancedMode(guildId);
|
||||
binding = env2_13;
|
||||
yield binding(guildId, a0.id, object2);
|
||||
value21 = undefined;
|
||||
if (false) {
|
||||
return value21;
|
||||
}
|
||||
if (value21) {
|
||||
r2 = !!value21;
|
||||
} else {
|
||||
binding = env2_1;
|
||||
binding4 = env2_3;
|
||||
value24 = binding(binding4[8]);
|
||||
show = value24.show;
|
||||
object2 = {};
|
||||
binding = env2_0;
|
||||
intl = binding(binding4[9]).intl;
|
||||
string = intl.string;
|
||||
t = binding(binding4[9]).t;
|
||||
object2.title = Reflect.apply(string, intl, [t.ut7sq0]);
|
||||
binding = env2_0;
|
||||
binding5 = env2_3;
|
||||
intl = binding(binding5[9]).intl;
|
||||
format = intl.format;
|
||||
t = binding(binding5[9]).t;
|
||||
object2.body = isAdvancedMode2 ? Reflect.apply(format, intl, [t.w9Oz5K, {}]) : Reflect.apply(format,
|
||||
intl,
|
||||
[t['5sm9rH'], {}]);
|
||||
Reflect.apply(show, value24, [object2]);
|
||||
r2 = value13;
|
||||
}
|
||||
return r2;
|
||||
}
|
||||
if (object2.removingView) {
|
||||
binding = env2_6;
|
||||
isAdvancedMode2 = binding.isAdvancedMode(guildId);
|
||||
binding = env2_13;
|
||||
yield binding(guildId, a0.id, object2);
|
||||
value21 = undefined;
|
||||
if (false) {
|
||||
return value21;
|
||||
}
|
||||
if (value21) {
|
||||
r2 = !!value21;
|
||||
} else {
|
||||
binding = env2_1;
|
||||
binding4 = env2_3;
|
||||
value24 = binding(binding4[8]);
|
||||
show = value24.show;
|
||||
object2 = {};
|
||||
binding = env2_0;
|
||||
intl = binding(binding4[9]).intl;
|
||||
string = intl.string;
|
||||
t = binding(binding4[9]).t;
|
||||
object2.title = Reflect.apply(string, intl, [t.ut7sq0]);
|
||||
binding = env2_0;
|
||||
binding5 = env2_3;
|
||||
intl = binding(binding5[9]).intl;
|
||||
format = intl.format;
|
||||
t = binding(binding5[9]).t;
|
||||
object2.body = isAdvancedMode2 ? Reflect.apply(format, intl, [t.w9Oz5K, {}]) : Reflect.apply(format,
|
||||
intl,
|
||||
[t['5sm9rH'], {}]);
|
||||
Reflect.apply(show, value24, [object2]);
|
||||
r2 = value13;
|
||||
}
|
||||
return r2;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
function _fun71088(a0) { // fn#71088, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9275:2515, offset: 0x01d144eb, size: 55 bytes, params: 2, frame: 13
|
||||
var r0;
|
||||
let value = a0 !== require;
|
||||
if (value) {
|
||||
value = environment.__proto__.__proto__.__proto__;
|
||||
value = env3_0(env3_3[6]);
|
||||
value = value.isChattableChannelId(a0);
|
||||
r0 = value;
|
||||
} else {
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,61 @@
|
||||
/* Metro module 5108; source: modules/guild_onboarding/DefaultChannelUtils.tsx; dependencies: [1936, 1379, 661, 483, 566, 3789, 2] */
|
||||
function _fun44630(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#44630, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5286:6, offset: 0x01175a90, size: 189 bytes, params: 8, frame: 19
|
||||
let env0_0 = require;
|
||||
const getDefaultPermissionsForChannel = function(a0) {
|
||||
return a0 == null ? Permissions.VIEW_CHANNEL : ChannelTypesSets.GUILD_VOCAL.has(a0.type) ? importAll(dependencyMap[3]).combine(Permissions.VIEW_CHANNEL,
|
||||
|
||||
Permissions.CONNECT) : Permissions.VIEW_CHANNEL;
|
||||
};
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const gatedChannelStore = importDefault(1936) /* metro dependency 1936: GatedChannelStore */;
|
||||
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
|
||||
const constantsModule = require(661) /* metro dependency 661: Constants */;
|
||||
const env0_5 = constantsModule.ChannelTypesSets;
|
||||
const env0_6 = constantsModule.Permissions;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_onboarding/DefaultChannelUtils.tsx');
|
||||
exports.useCanChannelBeDefault = function(a0, a1) {
|
||||
var env0_0 = a0;
|
||||
var env0_1 = a1;
|
||||
return require(dependencyMap[4]).useStateFromStores([GatedChannelStore, ChannelStore], _fun44633);
|
||||
};
|
||||
exports.canChannelBeDefault = canChannelBeDefault;
|
||||
}
|
||||
|
||||
function useCanChannelBeDefault(a0, a1) { // fn#44632, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5286:413, offset: 0x01175bbc, size: 79 bytes, params: 3, frame: 15
|
||||
const env0_0 = a0;
|
||||
const env0_1 = a1;
|
||||
return (require(566) /* metro dependency 566: flux */).useStateFromStores([GatedChannelStore, ChannelStore],
|
||||
_fun44633);
|
||||
}
|
||||
|
||||
function canChannelBeDefault(a0, a1) { // fn#44634, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5286:640, offset: 0x01175c67, size: 101 bytes, params: 3, frame: 17
|
||||
var r0;
|
||||
var moduleValue;
|
||||
const defaultPermissionsForChannel = getDefaultPermissionsForChannel(ChannelStore.getChannel(a1));
|
||||
const isChannelGated2 = GatedChannelStore.isChannelGated(a0, a1);
|
||||
if (isChannelGated2) {
|
||||
r0 = isChannelGated2;
|
||||
} else {
|
||||
moduleValue = importAll(3789) /* metro dependency 3789: PermissionUtils */;
|
||||
r0 = moduleValue.canEveryoneRole(defaultPermissionsForChannel, ChannelStore.getChannel(a1));
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function _fun44633() { // fn#44633, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5286:491, offset: 0x01175c0b, size: 92 bytes, params: 1, frame: 17
|
||||
var r0;
|
||||
let value = environment.__proto__;
|
||||
const channel = ChannelStore.getChannel(require);
|
||||
const defaultPermissionsForChannel = getDefaultPermissionsForChannel(channel);
|
||||
const isChannelGated2 = GatedChannelStore.isChannelGated(env0_0, require);
|
||||
if (isChannelGated2) {
|
||||
r0 = isChannelGated2;
|
||||
} else {
|
||||
value = importAll(3789) /* metro dependency 3789: PermissionUtils */;
|
||||
value = value.canEveryoneRole(defaultPermissionsForChannel, channel);
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,361 @@
|
||||
/* Metro module 6606; source: modules/guild_onboarding/GuildOnboardingActionCreators.tsx; dependencies: [5, 57, 1937, 1379, 1945, 1878, 6603, 661, 3772, 4865, 507, 694, 1216, 6607, 22, 5105, 1360, 6608, 683, 4863, 5097, 21, 1391, 6609, 6614, 2] */
|
||||
function _fun52099(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#52099, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6784:6, offset: 0x0131ed02, size: 413 bytes, params: 8, frame: 20
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const closure = _updateOnboardingResponses;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(5) /* metro dependency 5 */;
|
||||
const env0_4 = importDefault(57) /* metro dependency 57 */;
|
||||
const impersonateStore = importDefault(1937) /* metro dependency 1937: ImpersonateStore */;
|
||||
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
|
||||
const guildMemberStore = importDefault(1945) /* metro dependency 1945: GuildMemberStore */;
|
||||
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
|
||||
const guildOnboardingPromptsStore = importDefault(6603) /* metro dependency 6603: GuildOnboardingPromptsStore */;
|
||||
const constantsModule = require(661) /* metro dependency 661: Constants */;
|
||||
const env0_10 = constantsModule.AnalyticEvents;
|
||||
const env0_11 = constantsModule.AnalyticsPages;
|
||||
const env0_12 = constantsModule.Endpoints;
|
||||
const env0_13 = (require(3772) /* metro dependency 3772: GuildMemberConstants */).GuildMemberFlags;
|
||||
const env0_14 = (require(4865) /* metro dependency 4865: ReadStateConstants */).ReadStateTypes;
|
||||
object2 = {selectOption: selectOption};
|
||||
object2.updateOnboardingResponses = (importDefault(22) /* metro dependency 22 */).debounce(closure, 1000);
|
||||
object2.updateRolesLocal = updateRolesLocal;
|
||||
object2.completeOnboarding = completeOnboarding;
|
||||
object2.onboardExistingMember = onboardExistingMember;
|
||||
object2.finishOnboarding = finishOnboarding;
|
||||
object2.setUserOnboardingStep = setUserOnboardingStep;
|
||||
object2.resetOnboarding = resetOnboarding;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_onboarding/GuildOnboardingActionCreators.tsx');
|
||||
exports.default = object2;
|
||||
}
|
||||
|
||||
function _updateOnboardingResponses(a0) { // fn#52100, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6784:282, offset: 0x0131ee9f, size: 402 bytes, params: 2, frame: 21
|
||||
var put;
|
||||
var object7;
|
||||
var object8;
|
||||
var post;
|
||||
var object9;
|
||||
var object10;
|
||||
let value = a1;
|
||||
const env0_0 = a0;
|
||||
let r1 = value !== undefined ? value : false;
|
||||
if (ImpersonateStore.isFullServerPreview(a0)) {
|
||||
return undefined;
|
||||
}
|
||||
const r5 = r1 ? GuildOnboardingPromptsStore.getOnboardingPromptsForOnboarding(a0) : GuildOnboardingPromptsStore.getOnboardingPrompts(a0);
|
||||
const env0_1 = GuildOnboardingPromptsStore.getOnboardingResponses(a0);
|
||||
const value5 = r5.map(function({options}) {
|
||||
return options.filter(_fun52102);
|
||||
}).flat();
|
||||
const object11 = {};
|
||||
const object12 = {};
|
||||
r5.forEach(_fun52103);
|
||||
const HTTP = (require(507) /* metro dependency 507: HTTPUtils */).HTTP;
|
||||
if (r1) {
|
||||
post = HTTP.post;
|
||||
object9 = {};
|
||||
object9.url = Endpoints.GUILD_ONBOARDING_RESPONSES(a0);
|
||||
object10 = {};
|
||||
object10.onboarding_responses = value5.map(function(a0) {
|
||||
return a0.id;
|
||||
});
|
||||
object10.onboarding_prompts_seen = object11;
|
||||
object10.onboarding_responses_seen = object12;
|
||||
object9.body = object10;
|
||||
object9.rejectWithError = true;
|
||||
value = Reflect.apply(post, HTTP, [object9]);
|
||||
value = value.then(_fun52106);
|
||||
value = value.catch(_fun52107);
|
||||
r1 = value;
|
||||
} else {
|
||||
put = HTTP.put;
|
||||
object7 = {};
|
||||
object7.url = Endpoints.GUILD_ONBOARDING_RESPONSES(a0);
|
||||
object8 = {};
|
||||
object8.onboarding_responses = value5.map(_fun52108);
|
||||
object8.onboarding_prompts_seen = object11;
|
||||
object8.onboarding_responses_seen = object12;
|
||||
object7.body = object8;
|
||||
object7.rejectWithError = false;
|
||||
value = Reflect.apply(put, HTTP, [object7]);
|
||||
value = value.then(_fun52109);
|
||||
value = value.catch(_fun52110);
|
||||
r1 = value;
|
||||
}
|
||||
return r1;
|
||||
}
|
||||
|
||||
function selectOption(a0, a1, a2, a3) { // fn#52111, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6784:1619, offset: 0x0131f1e9, size: 187 bytes, params: 5, frame: 20
|
||||
var r3;
|
||||
var defaultImport;
|
||||
var without;
|
||||
var defaultImport2;
|
||||
var value;
|
||||
const onboardingPrompt = GuildOnboardingPromptsStore.getOnboardingPrompt(a1);
|
||||
if (onboardingPrompt != null) {
|
||||
if (onboardingPrompt.singleSelect) {
|
||||
defaultImport = importDefault(22) /* metro dependency 22 */;
|
||||
without = defaultImport.without;
|
||||
defaultImport2 = importDefault(22) /* metro dependency 22 */;
|
||||
r3 = Reflect.apply(without, defaultImport, [defaultImport2.map(onboardingPrompt.options, 'id'), a2]);
|
||||
} else {
|
||||
r3 = [];
|
||||
}
|
||||
value = importDefault(694) /* metro dependency 694: Dispatcher */;
|
||||
value.dispatch({type: 'GUILD_ONBOARDING_SELECT_OPTION', guildId: a0, promptId: a1, optionId: a2, selected: a3,
|
||||
removedOptionIds: r3});
|
||||
}
|
||||
}
|
||||
|
||||
function updateRolesLocal(a0, a1, a2) { // fn#52112, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6784:1973, offset: 0x0131f2a4, size: 293 bytes, params: 4, frame: 23
|
||||
var dispatch;
|
||||
var defaultImport;
|
||||
var difference;
|
||||
var defaultImport2;
|
||||
var moduleValue;
|
||||
var updateImpersonatedRoles;
|
||||
var defaultImport3;
|
||||
var value;
|
||||
const selfMember = GuildMemberStore.getSelfMember(a0);
|
||||
const value3 = undefined;
|
||||
const r9 = (selfMember == null ? value3 : selfMember.roles) ?? [];
|
||||
if (ImpersonateStore.isViewingRoles(a0)) {
|
||||
moduleValue = require(6607) /* metro dependency 6607: ImpersonateActionCreators */;
|
||||
updateImpersonatedRoles = moduleValue.updateImpersonatedRoles;
|
||||
value = importDefault(22) /* metro dependency 22 */;
|
||||
difference = value.difference;
|
||||
defaultImport3 = importDefault(22) /* metro dependency 22 */;
|
||||
Reflect.apply(updateImpersonatedRoles, moduleValue, [a0, Reflect.apply(difference, value,
|
||||
[defaultImport3.union(r9,
|
||||
a1), a2])]);
|
||||
} else if (a1.length > 0 || a2.length > 0) {
|
||||
value = importDefault(694) /* metro dependency 694: Dispatcher */;
|
||||
dispatch = value.dispatch;
|
||||
defaultImport = importDefault(22) /* metro dependency 22 */;
|
||||
difference = defaultImport.difference;
|
||||
defaultImport2 = importDefault(22) /* metro dependency 22 */;
|
||||
Reflect.apply(dispatch, value, [{type: 'GUILD_MEMBER_UPDATE_LOCAL', guildId: a0,
|
||||
roles: Reflect.apply(difference,
|
||||
defaultImport, [defaultImport2.union(r9, a1), a2]), addedRoleIds: a1, removedRoleIds: a2}]);
|
||||
}
|
||||
return value3;
|
||||
}
|
||||
|
||||
function completeOnboarding(a0, a1) { // fn#52113, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6784:2346, offset: 0x0131f3c9, size: 1129 bytes, params: 3, frame: 38
|
||||
var flags;
|
||||
var updateImpersonatedData;
|
||||
var moduleValue11;
|
||||
var updateImpersonatedRoles;
|
||||
var Array;
|
||||
var currentUser;
|
||||
var value22;
|
||||
var moduleValue12;
|
||||
const length = a1.length;
|
||||
let value = 0;
|
||||
const value2 = null;
|
||||
const r20 = length > value ? a1[a1.length - 1] : value2;
|
||||
const selectedOptions = GuildOnboardingPromptsStore.getSelectedOptions(a0);
|
||||
const value5 = undefined;
|
||||
const selectedRoleIds = (require(5105) /* metro dependency 5105: GuildOnboardingUtils */).getSelectedRoleIds(selectedOptions);
|
||||
const selectedChannelIds = (require(5105) /* metro dependency 5105: GuildOnboardingUtils */).getSelectedChannelIds(selectedOptions);
|
||||
const getEnabled = GuildOnboardingPromptsStore.getEnabled;
|
||||
let r9 = Reflect.apply(getEnabled, GuildOnboardingPromptsStore,
|
||||
[a0]) ? GuildOnboardingPromptsStore.getDefaultChannelIds(a0) : [];
|
||||
const value10 = env0_4((require(5105) /* metro dependency 5105: GuildOnboardingUtils */).getChannelCoverageForOnboarding(a0,
|
||||
a1, r9), 2);
|
||||
const property = value10[value];
|
||||
const property2 = value10[1];
|
||||
const items = [];
|
||||
arraySpread(items, r9, arraySpread(items, selectedChannelIds, value, undefined), undefined);
|
||||
const value11 = items.map(function(a0) {
|
||||
return ChannelStore.getChannel(a0);
|
||||
});
|
||||
const value12 = value11.filter((require(1360) /* metro dependency 1360: GlobalUtils */).isNotNullish);
|
||||
const useFlattenedChannelsModule = require(6608) /* metro dependency 6608: useFlattenedChannels */;
|
||||
const getFlattenedChannels = useFlattenedChannelsModule.getFlattenedChannels;
|
||||
const Set = global.Set;
|
||||
const value13 = Object.create(Set.prototype, {constructor: {value: Set}});
|
||||
const set = new Set();
|
||||
const length2 = Reflect.apply(getFlattenedChannels, useFlattenedChannelsModule, [a0,
|
||||
set instanceof Object ? set : value13, value12, true]).length;
|
||||
const r16 = value2 == r20 ? [] : r20.options.map(function(a0) {
|
||||
return a0.id;
|
||||
});
|
||||
const connections = GuildOnboardingPromptsStore.getConnections(a0);
|
||||
const providerConnectionState = (require(5105) /* metro dependency 5105: GuildOnboardingUtils */).getProviderConnectionState(connections);
|
||||
const applicationConnectionState = (require(5105) /* metro dependency 5105: GuildOnboardingUtils */).getApplicationConnectionState(connections);
|
||||
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
|
||||
const track = defaultImport.track;
|
||||
const GUILD_ONBOARDING_STEP_COMPLETED = AnalyticEvents.GUILD_ONBOARDING_STEP_COMPLETED;
|
||||
const object3 = {};
|
||||
const appAnalyticsUtilsModule = require(4863) /* metro dependency 4863: AppAnalyticsUtils */;
|
||||
copyDataProperties(object3, appAnalyticsUtilsModule.collectGuildAnalyticsMetadata(a0), value12);
|
||||
object3['step'] = a1.length - 1;
|
||||
object3['options_selected'] = value2 == r20 ? value : selectedOptions.filter(_fun52116).length;
|
||||
object3['skipped'] = r16.length > value;
|
||||
object3['back'] = false;
|
||||
object3['in_onboarding'] = true;
|
||||
object3['is_final_step'] = true;
|
||||
object3['roles_granted'] = selectedRoleIds.size;
|
||||
object3['channels_granted'] = length2;
|
||||
object3['guild_onboarding_covered_channel_ids'] = property.map(function(a0) {
|
||||
return a0.id;
|
||||
});
|
||||
object3['guild_onboarding_uncovered_channel_ids'] = property2.map(function(a0) {
|
||||
return a0.id;
|
||||
});
|
||||
object3['provider_connections_connected'] = providerConnectionState.connected;
|
||||
object3['provider_connections_not_connected'] = providerConnectionState.notConnected;
|
||||
object3['application_connections_connected'] = applicationConnectionState.connected;
|
||||
object3['application_connections_not_connected'] = applicationConnectionState.notConnected;
|
||||
Reflect.apply(track, defaultImport, [GUILD_ONBOARDING_STEP_COMPLETED, object3]);
|
||||
const readStateActionCreatorsModule = require(5097) /* metro dependency 5097: ReadStateActionCreators */;
|
||||
const ackGuildFeature = readStateActionCreatorsModule.ackGuildFeature;
|
||||
const GUILD_ONBOARDING_QUESTION = ReadStateTypes.GUILD_ONBOARDING_QUESTION;
|
||||
const defaultImport2 = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
|
||||
const fromTimestamp = defaultImport2.fromTimestamp;
|
||||
const Date = global.Date;
|
||||
Reflect.apply(ackGuildFeature, readStateActionCreatorsModule, [a0, GUILD_ONBOARDING_QUESTION,
|
||||
Reflect.apply(fromTimestamp, defaultImport2, [Date.now()])]);
|
||||
_updateOnboardingResponses(a0, true);
|
||||
if (ImpersonateStore.isFullServerPreview(a0)) {
|
||||
(require(6607) /* metro dependency 6607: ImpersonateActionCreators */).updateImpersonatedChannels(a0, items,
|
||||
[]);
|
||||
(require(6607) /* metro dependency 6607: ImpersonateActionCreators */).updateImpersonatedData(a0,
|
||||
{optInEnabled: true});
|
||||
moduleValue11 = require(6607) /* metro dependency 6607: ImpersonateActionCreators */;
|
||||
updateImpersonatedRoles = moduleValue11.updateImpersonatedRoles;
|
||||
Array = global.Array;
|
||||
Reflect.apply(updateImpersonatedRoles, moduleValue11, [a0, Array.from(selectedRoleIds)]);
|
||||
currentUser = UserStore.getCurrentUser();
|
||||
if (value2 != currentUser) {
|
||||
value22 = GuildMemberStore.getMember(a0, currentUser.id);
|
||||
flags = value2 == value22 ? value5 : value22.flags;
|
||||
r9 = value2 != flags ? flags : value;
|
||||
value = require(6607) /* metro dependency 6607: ImpersonateActionCreators */;
|
||||
updateImpersonatedData = value.updateImpersonatedData;
|
||||
moduleValue12 = require(1391) /* metro dependency 1391: FlagUtils */;
|
||||
Reflect.apply(updateImpersonatedData, value, [a0, {memberOptions: {flags: moduleValue12.setFlag(r9,
|
||||
GuildMemberFlags.COMPLETED_ONBOARDING, true)}}]);
|
||||
}
|
||||
}
|
||||
return value5;
|
||||
}
|
||||
|
||||
function onboardExistingMember(a0, a1) { // fn#52119, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6784:3994, offset: 0x0131f848, size: 188 bytes, params: 3, frame: 19
|
||||
var moduleValue;
|
||||
var bulkOptInChannels;
|
||||
const Set = global.Set;
|
||||
let set = new Set(a1);
|
||||
const getEnabled = GuildOnboardingPromptsStore.getEnabled;
|
||||
(Reflect.apply(getEnabled, GuildOnboardingPromptsStore,
|
||||
[a0]) ? GuildOnboardingPromptsStore.getDefaultChannelIds(a0) : []).forEach(_fun52120);
|
||||
if (set.size > 0) {
|
||||
moduleValue = require(6609) /* metro dependency 6609: OptInChannelsActionCreators */;
|
||||
bulkOptInChannels = moduleValue.bulkOptInChannels;
|
||||
set = global.Array.from(set);
|
||||
Reflect.apply(bulkOptInChannels, moduleValue, [a0, set, true, {page: AnalyticsPages.GUILD_ONBOARDING}]);
|
||||
}
|
||||
}
|
||||
|
||||
function finishOnboarding(a0) { // fn#52121, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6784:4192, offset: 0x0131f904, size: 56 bytes, params: 2, frame: 13
|
||||
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'GUILD_ONBOARDING_COMPLETE',
|
||||
guildId: a0});
|
||||
}
|
||||
|
||||
function setUserOnboardingStep(a0, a1) { // fn#52122, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6784:4277, offset: 0x0131f93c, size: 64 bytes, params: 3, frame: 13
|
||||
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'GUILD_ONBOARDING_SET_STEP',
|
||||
guildId: a0, step: a1});
|
||||
}
|
||||
|
||||
function resetOnboarding(a0) { // fn#52123, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6784:4392, offset: 0x0131f97c, size: 34 bytes, params: 2, frame: 11
|
||||
const env0_0 = a0;
|
||||
return env0_3(_fun52125)();
|
||||
}
|
||||
|
||||
function _fun52101({options}) { // fn#52101, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6784:468, offset: 0x0131f031, size: 27 bytes, params: 2, frame: 11
|
||||
return options.filter(_fun52102);
|
||||
}
|
||||
|
||||
function _fun52103({id, options}) { // fn#52103, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6784:548, offset: 0x0131f067, size: 62 bytes, params: 2, frame: 13
|
||||
const binding = env0_2;
|
||||
const Date = global.Date;
|
||||
binding[id] = Date.now();
|
||||
options.forEach(_fun52104);
|
||||
}
|
||||
|
||||
function _fun52106(a0) { // fn#52106, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6784:801, offset: 0x0131f0cb, size: 123 bytes, params: 2, frame: 13
|
||||
var value;
|
||||
var dispatch;
|
||||
var object2;
|
||||
let body = a0.body;
|
||||
if (body != null) {
|
||||
value = environment.__proto__;
|
||||
value = importDefault(694) /* metro dependency 694: Dispatcher */;
|
||||
dispatch = value.dispatch;
|
||||
object2 = {type: 'GUILD_ONBOARDING_UPDATE_RESPONSES_SUCCESS'};
|
||||
object2.guildId = env0_0;
|
||||
body = a0.body;
|
||||
object2.options = body.onboarding_responses;
|
||||
body = a0.body;
|
||||
object2.prompts_seen = body.onboarding_prompts_seen;
|
||||
body = a0.body;
|
||||
object2.options_seen = body.onboarding_responses_seen;
|
||||
Reflect.apply(dispatch, value, [object2]);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun52107(a0) { // fn#52107, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6784:1035, offset: 0x0131f146, size: 41 bytes, params: 2, frame: 11
|
||||
const value = environment.__proto__;
|
||||
return (importDefault(1216) /* metro dependency 1216: SentryUtilsNative */).captureException(a0);
|
||||
}
|
||||
|
||||
function _fun52110(a0) { // fn#52110, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6784:1484, offset: 0x0131f16f, size: 122 bytes, params: 2, frame: 20
|
||||
let value = environment.__proto__;
|
||||
value = importDefault(1216) /* metro dependency 1216: SentryUtilsNative */;
|
||||
const captureException = value.captureException;
|
||||
const Error = global.Error;
|
||||
const value3 = 'Failed to update onboarding responses for guild ' + env0_0 + ': ' + a0.statusCode;
|
||||
const value4 = Object.create(Error.prototype, {constructor: {value: Error}});
|
||||
const error = new Error(value3, {cause: a0});
|
||||
Reflect.apply(captureException, value, [error instanceof Object ? error : value4]);
|
||||
}
|
||||
|
||||
function* _fun52125() { // fn#52125, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6784:4398, offset: 0x0131f9a7, size: 191 bytes, params: 1, frame: 21
|
||||
if (true) {
|
||||
value = environment.__proto__.__proto__;
|
||||
var binding = env2_8;
|
||||
var currentUser = binding.getCurrentUser();
|
||||
if (currentUser != null) {
|
||||
binding = env2_7;
|
||||
var r9 = binding.getMember(require, currentUser.id)?.flags ?? 0;
|
||||
binding = env2_0;
|
||||
var binding2 = env2_2;
|
||||
var value8 = binding(binding2[24]);
|
||||
var updateGuildSelfMember = value8.updateGuildSelfMember;
|
||||
var value9 = binding(binding2[22]);
|
||||
var setFlag = value9.setFlag;
|
||||
var COMPLETED_ONBOARDING = env2_13.COMPLETED_ONBOARDING;
|
||||
yield Reflect.apply(updateGuildSelfMember, value8, [require, {flags: Reflect.apply(setFlag, value9, [r9,
|
||||
COMPLETED_ONBOARDING, false])}]);
|
||||
if (false) {
|
||||
return undefined;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function _fun52102({id}) { // fn#52102, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6784:489, offset: 0x0131f04c, size: 27 bytes, params: 2, frame: 11
|
||||
return env1_1.includes(id);
|
||||
}
|
||||
|
||||
function _fun52104({id}) { // fn#52104, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6784:590, offset: 0x0131f0a5, size: 38 bytes, params: 2, frame: 11
|
||||
let value = environment.__proto__;
|
||||
const binding = env1_3;
|
||||
const Date = global.Date;
|
||||
value = Date.now();
|
||||
binding[id] = value;
|
||||
return value;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,216 @@
|
||||
/* Metro module 6602; source: modules/guild_onboarding/GuildOnboardingPromptsActionCreators.tsx; dependencies: [5, 1226, 1945, 1867, 6603, 5106, 661, 3772, 683, 4863, 694, 507, 1391, 2] */
|
||||
function _fun52023(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#52023, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6780:6, offset: 0x0131d382, size: 349 bytes, params: 8, frame: 21
|
||||
const env0_0 = require;
|
||||
const closure = fetchOnboardingPrompts;
|
||||
const closure2 = startOnboarding;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(5) /* metro dependency 5 */;
|
||||
const authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
|
||||
const guildMemberStore = importDefault(1945) /* metro dependency 1945: GuildMemberStore */;
|
||||
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
|
||||
const guildOnboardingPromptsStore = importDefault(6603) /* metro dependency 6603: GuildOnboardingPromptsStore */;
|
||||
const env0_8 = (require(5106) /* metro dependency 5106: GuildOnboardingPromptsConstants */).serverApiResponseToClientState;
|
||||
const constantsModule = require(661) /* metro dependency 661: Constants */;
|
||||
const env0_9 = constantsModule.AnalyticEvents;
|
||||
const env0_10 = constantsModule.Endpoints;
|
||||
const env0_11 = constantsModule.GuildFeatures;
|
||||
const env0_12 = (require(3772) /* metro dependency 3772: GuildMemberConstants */).GuildMemberFlags;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_onboarding/GuildOnboardingPromptsActionCreators.tsx');
|
||||
exports.loadOnboardingPrompts = loadOnboardingPrompts;
|
||||
exports.fetchOnboardingPrompts = closure;
|
||||
exports.maybeFetchOnboardingPrompts = function() {
|
||||
return _maybeFetchOnboardingPrompts.apply(this, arguments);
|
||||
};
|
||||
exports.startOnboarding = closure2;
|
||||
exports.CONNECTIONS_STEP = -3;
|
||||
}
|
||||
|
||||
function fetchOnboardingPrompts(a0) { // fn#52024, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6780:275, offset: 0x0131d4df, size: 141 bytes, params: 2, frame: 18
|
||||
var object2;
|
||||
const env0_0 = a0;
|
||||
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'GUILD_ONBOARDING_PROMPTS_FETCH_START',
|
||||
guildId: a0});
|
||||
const HTTP = (require(507) /* metro dependency 507: HTTPUtils */).HTTP;
|
||||
const get = HTTP.get;
|
||||
object2 = {};
|
||||
object2.url = Endpoints.GUILD_ONBOARDING(a0);
|
||||
object2.rejectWithError = false;
|
||||
return Reflect.apply(get, HTTP, [object2]).then(_fun52025, _fun52027);
|
||||
}
|
||||
|
||||
function _maybeFetchOnboardingPrompts() { // fn#52028, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6780:688, offset: 0x0131d622, size: 48 bytes, params: 1, frame: 14
|
||||
return env0_3(_fun52030).apply(this, arguments);
|
||||
}
|
||||
|
||||
function startOnboarding(a0) { // fn#52033, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6780:1388, offset: 0x0131d816, size: 56 bytes, params: 2, frame: 13
|
||||
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'GUILD_ONBOARDING_START', guildId: a0});
|
||||
}
|
||||
|
||||
function _trackOnboardingDirectJoin(a0) { // fn#52034, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6780:1486, offset: 0x0131d84e, size: 210 bytes, params: 2, frame: 24
|
||||
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
|
||||
let track = defaultImport.track;
|
||||
const GUILD_ONBOARDING_STEP_VIEWED = AnalyticEvents.GUILD_ONBOARDING_STEP_VIEWED;
|
||||
let object2 = {};
|
||||
const appAnalyticsUtilsModule = require(4863) /* metro dependency 4863: AppAnalyticsUtils */;
|
||||
copyDataProperties(object2, appAnalyticsUtilsModule.collectGuildAnalyticsMetadata(a0), undefined);
|
||||
object2['step'] = env0_13;
|
||||
object2['required'] = true;
|
||||
Reflect.apply(track, defaultImport, [GUILD_ONBOARDING_STEP_VIEWED, object2]);
|
||||
const defaultImport2 = defaultImport;
|
||||
track = defaultImport2.track;
|
||||
const GUILD_ONBOARDING_STEP_COMPLETED = AnalyticEvents.GUILD_ONBOARDING_STEP_COMPLETED;
|
||||
object2 = {};
|
||||
const moduleValue2 = appAnalyticsUtilsModule;
|
||||
copyDataProperties(object2, moduleValue2.collectGuildAnalyticsMetadata(a0), 'required');
|
||||
object2['step'] = env0_13;
|
||||
object2['skipped'] = false;
|
||||
object2['is_final_step'] = true;
|
||||
object2['in_onboarding'] = true;
|
||||
Reflect.apply(track, defaultImport2, [GUILD_ONBOARDING_STEP_COMPLETED, object2]);
|
||||
}
|
||||
|
||||
function loadOnboardingPrompts(a0) { // fn#52035, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6780:1907, offset: 0x0131d920, size: 113 bytes, params: 2, frame: 17
|
||||
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
|
||||
const track = defaultImport.track;
|
||||
const GUILD_ONBOARDING_LOADED = AnalyticEvents.GUILD_ONBOARDING_LOADED;
|
||||
const object2 = {};
|
||||
const value = require(4863) /* metro dependency 4863: AppAnalyticsUtils */;
|
||||
copyDataProperties(object2, value.collectGuildAnalyticsMetadata(a0), value);
|
||||
object2['has_new_prompts'] = false;
|
||||
object2['number_of_prompts'] = 0;
|
||||
Reflect.apply(track, defaultImport, [GUILD_ONBOARDING_LOADED, object2]);
|
||||
}
|
||||
|
||||
function _fun52025({body}) { // fn#52025, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6780:464, offset: 0x0131d56c, size: 106 bytes, params: 2, frame: 15
|
||||
var environment;
|
||||
let value = environment.__proto__;
|
||||
const value2 = serverApiResponseToClientState(body);
|
||||
const env0_0 = value2;
|
||||
const dispatch = (importDefault(694) /* metro dependency 694: Dispatcher */).dispatch;
|
||||
const object2 = {type: 'GUILD_ONBOARDING_PROMPTS_FETCH_SUCCESS'};
|
||||
const binding = env0_0;
|
||||
object2.guildId = binding;
|
||||
copyDataProperties(object2, value2, binding);
|
||||
value = Reflect.apply(dispatch, value, [object2]);
|
||||
return value.then(_fun52026);
|
||||
}
|
||||
|
||||
function _fun52027(a0) { // fn#52027, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6780:602, offset: 0x0131d5e5, size: 61 bytes, params: 2, frame: 12
|
||||
const value = environment.__proto__;
|
||||
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'GUILD_ONBOARDING_PROMPTS_FETCH_FAILURE',
|
||||
guildId: env0_0});
|
||||
return a0;
|
||||
}
|
||||
|
||||
function* _fun52030(a0) { // fn#52030, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6780:767, offset: 0x0131d65b, size: 429 bytes, params: 2, frame: 21
|
||||
var environment;
|
||||
var r1;
|
||||
var r2;
|
||||
var shouldFetchPrompts2;
|
||||
var onboardingPrompts;
|
||||
var value10;
|
||||
var Array;
|
||||
if (false) {
|
||||
return undefined;
|
||||
}
|
||||
value = environment.__proto__.__proto__;
|
||||
let binding = env2_4;
|
||||
const id = binding.getId();
|
||||
binding = env2_0;
|
||||
const value4 = undefined;
|
||||
const value5 = binding(env2_2[12]);
|
||||
const hasFlag = value5.hasFlag;
|
||||
const member = env2_5.getMember(a0, id);
|
||||
const flags = member == null ? value4 : member.flags;
|
||||
const value7 = 0;
|
||||
const r7 = flags ?? value7;
|
||||
const COMPLETED_ONBOARDING = env2_12.COMPLETED_ONBOARDING;
|
||||
const hasFlag2 = Reflect.apply(hasFlag, value5, [r7, COMPLETED_ONBOARDING]);
|
||||
const guild = env2_6.getGuild(a0);
|
||||
if (guild == null) {
|
||||
return global.Promise.resolve();
|
||||
}
|
||||
const features = guild.features;
|
||||
const has = features.has;
|
||||
const GUILD_ONBOARDING = env2_11.GUILD_ONBOARDING;
|
||||
if (Reflect.apply(has, features, [GUILD_ONBOARDING])) {
|
||||
binding = env2_7;
|
||||
shouldFetchPrompts2 = binding.shouldFetchPrompts(a0);
|
||||
binding = env2_7;
|
||||
onboardingPrompts = binding.getOnboardingPrompts(a0);
|
||||
if (shouldFetchPrompts2) {
|
||||
yield env2_14(a0);
|
||||
value10 = undefined;
|
||||
if (false) {
|
||||
return value10;
|
||||
}
|
||||
Array = global.Array;
|
||||
if (Array.isArray(value10)) {
|
||||
if (value10.every(function(a0) {
|
||||
return !a0.inOnboarding;
|
||||
})) {
|
||||
env2_17(a0);
|
||||
r2 = global.Promise.resolve();
|
||||
} else if (hasFlag2) {
|
||||
r2 = value10;
|
||||
} else {
|
||||
env2_16(a0);
|
||||
r2 = value10;
|
||||
}
|
||||
} else if (hasFlag2) {
|
||||
r2 = value10;
|
||||
} else {
|
||||
env2_16(a0);
|
||||
r2 = value10;
|
||||
}
|
||||
return r2;
|
||||
}
|
||||
if (onboardingPrompts.length > value7) {
|
||||
if (onboardingPrompts.every(_fun52031)) {
|
||||
env2_17(a0);
|
||||
r1 = global.Promise.resolve();
|
||||
} else {
|
||||
if (!hasFlag2) {
|
||||
env2_16(a0);
|
||||
}
|
||||
r1 = global.Promise.resolve();
|
||||
}
|
||||
return r1;
|
||||
}
|
||||
yield env2_14(a0);
|
||||
value10 = undefined;
|
||||
if (false) {
|
||||
return value10;
|
||||
}
|
||||
Array = global.Array;
|
||||
if (Array.isArray(value10)) {
|
||||
if (value10.every(_fun52032)) {
|
||||
env2_17(a0);
|
||||
r2 = global.Promise.resolve();
|
||||
} else if (hasFlag2) {
|
||||
r2 = value10;
|
||||
} else {
|
||||
env2_16(a0);
|
||||
r2 = value10;
|
||||
}
|
||||
} else if (hasFlag2) {
|
||||
r2 = value10;
|
||||
} else {
|
||||
env2_16(a0);
|
||||
r2 = value10;
|
||||
}
|
||||
return r2;
|
||||
}
|
||||
const Promise = global.Promise;
|
||||
return Promise.resolve();
|
||||
}
|
||||
|
||||
function _fun52026() { // fn#52026, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6780:583, offset: 0x0131d5d6, size: 15 bytes, params: 1, frame: 1
|
||||
return env0_0.prompts;
|
||||
}
|
||||
|
||||
function _fun52031({inOnboarding}) { // fn#52031, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6780:1080, offset: 0x0131d808, size: 14 bytes, params: 2, frame: 1
|
||||
return !inOnboarding;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,453 @@
|
||||
/* Metro module 5106; source: modules/guild_onboarding/GuildOnboardingPromptsConstants.tsx; dependencies: [57, 29, 661, 644, 1244, 1861, 2] */
|
||||
function _fun44608(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#44608, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5284:6, offset: 0x01174d00, size: 776 bytes, params: 8, frame: 29
|
||||
var object5;
|
||||
const env0_0 = require;
|
||||
const _arrayLikeToArray_44611 = 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 = getDefaultPrompt;
|
||||
const closure2 = function(a0) {
|
||||
var object = {id: a0.id};
|
||||
object.options = a0.options.map(_fun44614);
|
||||
object.title = a0.title;
|
||||
object.singleSelect = a0.single_select;
|
||||
object.disabled = a0.disabled;
|
||||
object.required = a0.required;
|
||||
object.inOnboarding = a0.in_onboarding;
|
||||
object.type = a0.type;
|
||||
return object;
|
||||
};
|
||||
const closure3 = getConnectionIdentifier;
|
||||
const closure4 = validateOnboardingConnection;
|
||||
const env0_3 = ['id'];
|
||||
const env0_4 = ['id'];
|
||||
let Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_5 = importDefault(57) /* metro dependency 57 */;
|
||||
const env0_6 = importDefault(29) /* metro dependency 29 */;
|
||||
const PlatformTypes = (require(661) /* metro dependency 661: Constants */).PlatformTypes;
|
||||
object5 = {CUSTOMIZE: 0};
|
||||
object5[0] = 'CUSTOMIZE';
|
||||
object5.BROWSE = 1;
|
||||
object5[1] = 'BROWSE';
|
||||
const object6 = {MULTIPLE_CHOICE: 0};
|
||||
object6[0] = 'MULTIPLE_CHOICE';
|
||||
object6.DROPDOWN = 1;
|
||||
object6[1] = 'DROPDOWN';
|
||||
const object7 = {ONBOARDING_DEFAULT: 0};
|
||||
object7[0] = 'ONBOARDING_DEFAULT';
|
||||
object7.ONBOARDING_ADVANCED = 1;
|
||||
object7[1] = 'ONBOARDING_ADVANCED';
|
||||
const object8 = {APPLICATION: 0};
|
||||
object8[0] = 'APPLICATION';
|
||||
object8.PROVIDER_CONNECTED_ACCOUNT = 1;
|
||||
object8[1] = 'PROVIDER_CONNECTED_ACCOUNT';
|
||||
const Set = global.Set;
|
||||
const PLAYSTATION_STAGING = PlatformTypes.PLAYSTATION_STAGING;
|
||||
const CONTACTS = PlatformTypes.CONTACTS;
|
||||
const DOMAIN = PlatformTypes.DOMAIN;
|
||||
const TWITTER_LEGACY = PlatformTypes.TWITTER_LEGACY;
|
||||
const MASTODON = PlatformTypes.MASTODON;
|
||||
const INSTAGRAM = PlatformTypes.INSTAGRAM;
|
||||
const LEAGUE_OF_LEGENDS = PlatformTypes.LEAGUE_OF_LEGENDS;
|
||||
const SKYPE = PlatformTypes.SKYPE;
|
||||
const set = new Set([PLAYSTATION_STAGING, CONTACTS, DOMAIN, TWITTER_LEGACY, MASTODON, INSTAGRAM, LEAGUE_OF_LEGENDS,
|
||||
SKYPE]);
|
||||
Object = global.Object;
|
||||
const env0_10 = Object.values(PlatformTypes).filter(_fun44617);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_onboarding/GuildOnboardingPromptsConstants.tsx');
|
||||
exports.MAX_PROMPT_TITLE_LENGTH = 100;
|
||||
exports.MAX_PROMPT_OPTION_TITLE_LENGTH = 50;
|
||||
exports.MAX_PROMPT_OPTION_DESCRIPTION_LENGTH = 100;
|
||||
exports.MAX_NUM_PROMPTS = 15;
|
||||
exports.MULTIPLE_CHOICE_MAX_NUM_OPTIONS = 12;
|
||||
exports.DROPDOWN_MAX_NUM_OPTIONS = 50;
|
||||
exports.MAX_DEFAULT_CHANNEL_IDS = 25;
|
||||
exports.MAX_NUMBER_OF_ONBOARDING_CONNECTIONS = 10;
|
||||
exports.MAX_CONNECTION_DESCRIPTION_LENGTH = 100;
|
||||
exports.MAX_NUMBER_OF_ONBOARDING_PROMPTS_IN_ONBOARDING = 4;
|
||||
exports.NUM_DEFAULT_CHATTABLE_CHANNELS_MIN = 1;
|
||||
exports.ONBOARDING_PROMPT_TYPE_SWITCH_THRESHOLD = 13;
|
||||
exports.GuildOnboardingTab = object5;
|
||||
exports.OnboardingPromptType = object6;
|
||||
exports.GuildOnboardingMode = object7;
|
||||
exports.OnboardingConnectionType = object8;
|
||||
exports.isDefaultPrompt = isDefaultPrompt;
|
||||
exports.getDefaultPrompt = closure;
|
||||
exports.getEmptyPrompt = getEmptyPrompt;
|
||||
exports.clientPromptToServerPrompt = function(a0) {
|
||||
var object = {id: a0.id};
|
||||
object.options = a0.options.map(_fun44621);
|
||||
object.title = a0.title;
|
||||
object.single_select = a0.singleSelect;
|
||||
object.disabled = a0.disabled;
|
||||
object.required = a0.required;
|
||||
object.in_onboarding = a0.inOnboarding;
|
||||
object.type = a0.type;
|
||||
return object;
|
||||
};
|
||||
exports.serverPromptToClientPrompt = closure2;
|
||||
exports.serverApiResponseToClientState = serverApiResponseToClientState;
|
||||
exports.isEmojiEmpty = function(a0) {
|
||||
return a0 == null || a0.id == null && a0.name == null;
|
||||
};
|
||||
exports.EXCLUDED_ONBOARDING_PLATFORM_TYPES = set;
|
||||
exports.getConnectionIdentifier = closure3;
|
||||
exports.parseConnectionIdentifier = parseConnectionIdentifier;
|
||||
exports.validateOnboardingConnection = closure4;
|
||||
exports.validateOnboardingConnections = validateOnboardingConnections;
|
||||
}
|
||||
|
||||
function _createForOfIteratorHelperLoose_44609(a0, a1) { // fn#44609, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5284:167, offset: 0x01175008, size: 370 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 _fun44610;
|
||||
}
|
||||
value = undefined;
|
||||
if (a0) {
|
||||
if (typeof a0 === 'string') {
|
||||
value = _arrayLikeToArray_44611(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_44611(a0, value);
|
||||
r6 = value;
|
||||
} else {
|
||||
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
|
||||
if (regexp.test(r9)) {
|
||||
value = _arrayLikeToArray_44611(a0, value);
|
||||
r6 = value;
|
||||
} else {
|
||||
r6 = value;
|
||||
}
|
||||
}
|
||||
r5 = r6;
|
||||
}
|
||||
} else {
|
||||
r5 = value;
|
||||
}
|
||||
if (r5) {
|
||||
if (r5) {
|
||||
}
|
||||
return _fun44610;
|
||||
}
|
||||
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 getDefaultPrompt() { // fn#44612, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5284:1505, offset: 0x0117517a, size: 142 bytes, params: 1, frame: 16
|
||||
const object2 = {'id': null, 'title': null, 'options': null, 'singleSelect': false, 'required': false,
|
||||
'inOnboarding': true};
|
||||
const String = global.String;
|
||||
const Date = global.Date;
|
||||
object2.id = String(Date.now());
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
object2.title = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.vY91C9);
|
||||
object2.options = [];
|
||||
const MULTIPLE_CHOICE = env0_7.MULTIPLE_CHOICE;
|
||||
object2.type = MULTIPLE_CHOICE;
|
||||
return object2;
|
||||
}
|
||||
|
||||
function serverPromptToClientPrompt({id, options, title, single_select, disabled, required, in_onboarding, type}) { // fn#44613, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5284:1687, offset: 0x01175208, size: 102 bytes, params: 2, frame: 13
|
||||
const object2 = {};
|
||||
object2.id = id;
|
||||
object2.options = options.map(function(a0) {
|
||||
return {id: a0.id, channelIds: a0.channel_ids, roleIds: a0.role_ids, emoji: a0.emoji, title: a0.title,
|
||||
description: a0.description ?? ''};
|
||||
});
|
||||
object2.title = title;
|
||||
object2.singleSelect = single_select;
|
||||
object2.disabled = disabled;
|
||||
object2.required = required;
|
||||
object2.inOnboarding = in_onboarding;
|
||||
object2.type = type;
|
||||
return object2;
|
||||
}
|
||||
|
||||
function getConnectionIdentifier(a0) { // fn#44615, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5284:2200, offset: 0x011752c1, size: 90 bytes, params: 2, frame: 12
|
||||
const connection_type = a0.connection_type;
|
||||
const APPLICATION = env0_8.APPLICATION;
|
||||
return connection_type === APPLICATION ? 'app:' + a0.application_id : 'provider:' + a0.provider_id;
|
||||
}
|
||||
|
||||
function validateOnboardingConnection(a0) { // fn#44616, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5284:2331, offset: 0x0117531b, size: 439 bytes, params: 2, frame: 16
|
||||
var moduleValue;
|
||||
var isNullOrEmpty;
|
||||
var binding;
|
||||
var moduleValue2;
|
||||
const items2 = [];
|
||||
let connection_type = a0.connection_type;
|
||||
var value;
|
||||
const APPLICATION = env0_8.APPLICATION;
|
||||
if (connection_type === APPLICATION) {
|
||||
connection_type = a0.connection_type;
|
||||
if (env0_8.APPLICATION === connection_type) {
|
||||
moduleValue2 = require(1861) /* metro dependency 1861: StringUtils */;
|
||||
isNullOrEmpty = moduleValue2.isNullOrEmpty;
|
||||
if (Reflect.apply(isNullOrEmpty, moduleValue2, [a0.application_id])) {
|
||||
items2.push('Application ID is required for application connections');
|
||||
}
|
||||
value = require(1861) /* metro dependency 1861: StringUtils */;
|
||||
isNullOrEmpty = value.isNullOrEmpty;
|
||||
if (!Reflect.apply(isNullOrEmpty, value, [a0.provider_id])) {
|
||||
items2.push('Platform ID not allowed for application connections');
|
||||
}
|
||||
} else if (env0_8.PROVIDER_CONNECTED_ACCOUNT === connection_type) {
|
||||
moduleValue = require(1861) /* metro dependency 1861: StringUtils */;
|
||||
isNullOrEmpty = moduleValue.isNullOrEmpty;
|
||||
if (Reflect.apply(isNullOrEmpty, moduleValue, [a0.provider_id])) {
|
||||
items2.push('Platform ID is required for platform connections');
|
||||
} else {
|
||||
binding = env0_10;
|
||||
if (!binding.includes(a0.provider_id)) {
|
||||
items2.push('Invalid platform ID');
|
||||
}
|
||||
}
|
||||
value = require(1861) /* metro dependency 1861: StringUtils */;
|
||||
isNullOrEmpty = value.isNullOrEmpty;
|
||||
if (!Reflect.apply(isNullOrEmpty, value, [a0.application_id])) {
|
||||
items2.push('Application ID not allowed for platform connections');
|
||||
}
|
||||
} else {
|
||||
a0.connection_type;
|
||||
}
|
||||
} else {
|
||||
connection_type = a0.connection_type;
|
||||
if (connection_type !== env0_8.PROVIDER_CONNECTED_ACCOUNT) {
|
||||
items2.push('Invalid connection type');
|
||||
return items2;
|
||||
}
|
||||
connection_type = a0.connection_type;
|
||||
if (env0_8.APPLICATION === connection_type) {
|
||||
moduleValue2 = require(1861) /* metro dependency 1861: StringUtils */;
|
||||
isNullOrEmpty = moduleValue2.isNullOrEmpty;
|
||||
if (Reflect.apply(isNullOrEmpty, moduleValue2, [a0.application_id])) {
|
||||
items2.push('Application ID is required for application connections');
|
||||
}
|
||||
value = require(1861) /* metro dependency 1861: StringUtils */;
|
||||
isNullOrEmpty = value.isNullOrEmpty;
|
||||
if (!Reflect.apply(isNullOrEmpty, value, [a0.provider_id])) {
|
||||
items2.push('Platform ID not allowed for application connections');
|
||||
}
|
||||
} else if (env0_8.PROVIDER_CONNECTED_ACCOUNT === connection_type) {
|
||||
moduleValue = require(1861) /* metro dependency 1861: StringUtils */;
|
||||
isNullOrEmpty = moduleValue.isNullOrEmpty;
|
||||
if (Reflect.apply(isNullOrEmpty, moduleValue, [a0.provider_id])) {
|
||||
items2.push('Platform ID is required for platform connections');
|
||||
} else {
|
||||
binding = env0_10;
|
||||
if (!binding.includes(a0.provider_id)) {
|
||||
items2.push('Invalid platform ID');
|
||||
}
|
||||
}
|
||||
value = require(1861) /* metro dependency 1861: StringUtils */;
|
||||
isNullOrEmpty = value.isNullOrEmpty;
|
||||
if (!Reflect.apply(isNullOrEmpty, value, [a0.application_id])) {
|
||||
items2.push('Application ID not allowed for platform connections');
|
||||
}
|
||||
} else {
|
||||
a0.connection_type;
|
||||
}
|
||||
}
|
||||
if (a0.description != null && a0.description.length > 100) {
|
||||
items2.push('Description must be 100 characters or less');
|
||||
}
|
||||
return items2;
|
||||
}
|
||||
|
||||
function _fun44617(a0) { // fn#44617, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5284:2185, offset: 0x011754d2, size: 25 bytes, params: 2, frame: 11
|
||||
const binding = env0_9;
|
||||
return !binding.has(a0);
|
||||
}
|
||||
|
||||
function isDefaultPrompt(a0) { // fn#44618, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5284:3877, offset: 0x011754eb, size: 98 bytes, params: 2, frame: 15
|
||||
if (a0.options.length > 0) {
|
||||
return false;
|
||||
}
|
||||
const defaultPrompt = getDefaultPrompt();
|
||||
defaultPrompt.id;
|
||||
const binding = env0_6;
|
||||
const value3 = binding(defaultPrompt, env0_3);
|
||||
a0.id;
|
||||
return (importDefault(644) /* metro dependency 644 */)(value3, binding(a0, env0_4));
|
||||
}
|
||||
|
||||
function getEmptyPrompt(a0) { // fn#44619, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5284:4069, offset: 0x0117554d, size: 87 bytes, params: 2, frame: 12
|
||||
const object2 = {'id': null, 'title': '', 'options': null, 'singleSelect': false, 'required': false};
|
||||
const String = global.String;
|
||||
const Date = global.Date;
|
||||
object2.id = String(Date.now());
|
||||
object2.options = [];
|
||||
object2.inOnboarding = a0;
|
||||
const MULTIPLE_CHOICE = env0_7.MULTIPLE_CHOICE;
|
||||
object2.type = MULTIPLE_CHOICE;
|
||||
return object2;
|
||||
}
|
||||
|
||||
function clientPromptToServerPrompt({id, options, title, singleSelect, disabled, required, inOnboarding, type}) { // fn#44620, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5284:4243, offset: 0x011755a4, size: 102 bytes, params: 2, frame: 13
|
||||
const object2 = {};
|
||||
object2.id = id;
|
||||
object2.options = options.map(_fun44621);
|
||||
object2.title = title;
|
||||
object2.single_select = singleSelect;
|
||||
object2.disabled = disabled;
|
||||
object2.required = required;
|
||||
object2.in_onboarding = inOnboarding;
|
||||
object2.type = type;
|
||||
return object2;
|
||||
}
|
||||
|
||||
function serverApiResponseToClientState({prompts, default_channel_ids, responses, mode, enabled, onboarding_prompts_seen, onboarding_responses_seen, below_requirements, connections}) { // fn#44622, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5284:4801, offset: 0x0117569b, size: 151 bytes, params: 2, frame: 13
|
||||
return {prompts: prompts.map(serverPromptToClientPrompt), defaultChannelIds: default_channel_ids,
|
||||
responses: responses ?? [], mode: mode, enabled: enabled,
|
||||
onboardingPromptsSeen: onboarding_prompts_seen ?? ({}),
|
||||
onboardingResponsesSeen: onboarding_responses_seen ?? ({}), belowRequirements: below_requirements,
|
||||
connections: connections ?? []};
|
||||
}
|
||||
|
||||
function parseConnectionIdentifier(a0) { // fn#44624, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5284:5435, offset: 0x01175758, size: 147 bytes, params: 2, frame: 16
|
||||
let value = a0.split(':');
|
||||
value = env0_5(value, 2);
|
||||
const property = value[0];
|
||||
const property2 = value[1];
|
||||
return property !== 'app' || property2 === undefined ? property !== 'provider' || property2 === undefined || property2 === '' ? null : {type: env0_8.PROVIDER_CONNECTED_ACCOUNT,
|
||||
providerId: property2} : property2 !== '' ? {type: env0_8.APPLICATION,
|
||||
applicationId: property2} : property !== 'provider' || property2 === undefined || property2 === '' ? null : {type: env0_8.PROVIDER_CONNECTED_ACCOUNT,
|
||||
providerId: property2};
|
||||
}
|
||||
|
||||
function validateOnboardingConnections(a0) { // fn#44625, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5284:5772, offset: 0x011757eb, size: 143 bytes, params: 2, frame: 21
|
||||
var r2;
|
||||
var value5;
|
||||
var value6;
|
||||
var property;
|
||||
var value7;
|
||||
const Set = global.Set;
|
||||
const set = new Set();
|
||||
const closure = validateOnboardingConnections_loop;
|
||||
const value3 = _createForOfIteratorHelperLoose_44609(a0.entries());
|
||||
const value4 = value3();
|
||||
let done = value4.done;
|
||||
if (!done) {
|
||||
for (r2 = value4; true; r2 = value7) {
|
||||
value5 = r2.value;
|
||||
value6 = env0_5(value5, 2);
|
||||
property = value6[0];
|
||||
var env0_2 = value6[1];
|
||||
closure(property);
|
||||
value7 = value3();
|
||||
done = value7.done;
|
||||
if (done) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return [];
|
||||
}
|
||||
|
||||
function _fun44621(a0) { // fn#44621, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5284:4320, offset: 0x0117560a, size: 145 bytes, params: 2, frame: 7
|
||||
const object2 = {};
|
||||
object2.id = a0.id;
|
||||
object2.channel_ids = a0.channelIds;
|
||||
object2.role_ids = a0.roleIds;
|
||||
let emoji = a0.emoji;
|
||||
object2.emoji = emoji;
|
||||
emoji = a0.emoji;
|
||||
const value = undefined;
|
||||
object2.emoji_id = emoji == null ? value : emoji.id;
|
||||
emoji = a0.emoji;
|
||||
object2.emoji_name = emoji == null ? value : emoji.name;
|
||||
emoji = a0.emoji;
|
||||
object2.emoji_animated = emoji == null ? value : emoji.animated;
|
||||
object2.title = a0.title;
|
||||
object2.description = a0.description;
|
||||
return object2;
|
||||
}
|
||||
|
||||
function validateOnboardingConnections_loop(a0) { // fn#44626, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5284:5845, owner: validateOnboardingConnections._loop, offset: 0x0117587a, size: 146 bytes, params: 2, frame: 18
|
||||
var environment;
|
||||
const env0_0 = a0;
|
||||
let value = environment.__proto__;
|
||||
const value3 = validateOnboardingConnection(env0_2);
|
||||
let binding = env0_0;
|
||||
const push = binding.push;
|
||||
const value4 = value3.map(_fun44627);
|
||||
const items2 = [];
|
||||
arraySpread(items2, value4, 0, value3);
|
||||
apply(push, items2, binding, value3);
|
||||
value = getConnectionIdentifier(env0_2);
|
||||
binding = env0_1;
|
||||
if (binding.has(value)) {
|
||||
env0_0.push('Duplicate connection configuration');
|
||||
}
|
||||
env0_1.add(value);
|
||||
}
|
||||
|
||||
function _fun44627(a0) { // fn#44627, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5284:5912, offset: 0x0117590c, size: 51 bytes, params: 2, frame: 15
|
||||
return 'Connection ' + (env0_0 + 1) + ': ' + a0;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,506 @@
|
||||
/* 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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,131 @@
|
||||
/* Metro module 6599; source: modules/guild_onboarding/GuildOnboardingStore.tsx; dependencies: [6, 7, 15, 17, 18, 661, 566, 694, 2] */
|
||||
function _fun52002(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#52002, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6777:6, offset: 0x012ea17e, size: 448 bytes, params: 8, frame: 21
|
||||
const closure = isOnboarding;
|
||||
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 */;
|
||||
let value = require(661) /* metro dependency 661: Constants */;
|
||||
const env0_5 = value.ME;
|
||||
const env0_6 = value.FAVORITES;
|
||||
let env0_8 = {};
|
||||
let env0_9 = {};
|
||||
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
|
||||
_fun52007(Store).displayName = 'GuildOnboardingStore';
|
||||
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */, {LOGOUT: function() {
|
||||
env0_8 = {};
|
||||
env0_9 = {};
|
||||
}, GUILD_DELETE: GUILD_DELETE_52014, GUILD_ONBOARDING_START: GUILD_ONBOARDING_START,
|
||||
GUILD_ONBOARDING_PROMPTS_FETCH_SUCCESS: GUILD_ONBOARDING_PROMPTS_FETCH_SUCCESS,
|
||||
GUILD_ONBOARDING_PROMPTS_FETCH_FAILURE: GUILD_ONBOARDING_PROMPTS_FETCH_FAILURE,
|
||||
GUILD_ONBOARDING_COMPLETE: GUILD_ONBOARDING_COMPLETE, GUILD_ONBOARDING_SET_STEP: GUILD_ONBOARDING_SET_STEP,
|
||||
CONNECTION_OPEN: function() {
|
||||
env0_9 = {};
|
||||
}});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_onboarding/GuildOnboardingStore.tsx');
|
||||
exports.default = value;
|
||||
exports.GuildOnboardingStatus = {STARTED: 'started', READY: 'ready', COMPLETED: 'completed',
|
||||
NOT_APPLICABLE: 'not_applicable'};
|
||||
exports.isOnboarding = closure;
|
||||
}
|
||||
|
||||
function _isNativeReflectConstruct_52003() { // fn#52003, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6777:179, offset: 0x012ea33e, 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_52003_isNativeReflectConstruct = function() {
|
||||
return !!result;
|
||||
})();
|
||||
}
|
||||
|
||||
function isOnboarding(a0) { // fn#52006, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6777:498, offset: 0x012ea39c, size: 59 bytes, params: 2, frame: 13
|
||||
return a0 != null && [env0_7.STARTED, env0_7.READY].includes(a0);
|
||||
}
|
||||
|
||||
function _fun52007(a0) { // fn#52007, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6777:591, offset: 0x012ea3d7, size: 143 bytes, params: 2, frame: 16
|
||||
const closure = GuildOnboardingStore;
|
||||
env0_4(closure, a0);
|
||||
return env0_1(closure, [{key: 'shouldShowOnboarding', value: value_52009}, {key: 'getOnboardingStatus',
|
||||
value: value_52010}, {key: 'resetOnboardingStatus', value: value_52011}, {key: 'getCurrentOnboardingStep',
|
||||
value: value_52012}]);
|
||||
}
|
||||
|
||||
function GUILD_DELETE_52014({guild}) { // fn#52014, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6777:1343, offset: 0x012ea4f8, size: 41 bytes, params: 2, frame: 4
|
||||
delete env0_8[guild.id];
|
||||
delete env0_9[guild.id];
|
||||
}
|
||||
|
||||
function GUILD_ONBOARDING_START({guildId}) { // fn#52015, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6777:1430, offset: 0x012ea521, size: 33 bytes, params: 2, frame: 3
|
||||
const binding = env0_8;
|
||||
const STARTED = env0_7.STARTED;
|
||||
binding[guildId] = STARTED;
|
||||
}
|
||||
|
||||
function GUILD_ONBOARDING_PROMPTS_FETCH_SUCCESS({guildId, enabled}) { // fn#52016, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6777:1529, offset: 0x012ea542, size: 75 bytes, params: 2, frame: 5
|
||||
const property = env0_8[guildId];
|
||||
const STARTED = env0_7.STARTED;
|
||||
if (property !== STARTED) {
|
||||
return false;
|
||||
}
|
||||
const binding = env0_8;
|
||||
const binding2 = env0_7;
|
||||
binding[guildId] = enabled ? binding2.READY : binding2.NOT_APPLICABLE;
|
||||
}
|
||||
|
||||
function GUILD_ONBOARDING_PROMPTS_FETCH_FAILURE({guildId}) { // fn#52017, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6777:1688, offset: 0x012ea58d, size: 33 bytes, params: 2, frame: 3
|
||||
const binding = env0_8;
|
||||
const NOT_APPLICABLE = env0_7.NOT_APPLICABLE;
|
||||
binding[guildId] = NOT_APPLICABLE;
|
||||
}
|
||||
|
||||
function GUILD_ONBOARDING_COMPLETE({guildId}) { // fn#52018, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6777:1785, offset: 0x012ea5ae, size: 33 bytes, params: 2, frame: 3
|
||||
const binding = env0_8;
|
||||
const COMPLETED = env0_7.COMPLETED;
|
||||
binding[guildId] = COMPLETED;
|
||||
}
|
||||
|
||||
function GUILD_ONBOARDING_SET_STEP({guildId, step}) { // fn#52019, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6777:1876, offset: 0x012ea5cf, size: 29 bytes, params: 2, frame: 3
|
||||
env0_9[guildId] = step;
|
||||
}
|
||||
|
||||
function value_52009(a0) { // fn#52009, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6777:931, offset: 0x012ea466, size: 55 bytes, params: 2, frame: 12
|
||||
const value = environment.__proto__;
|
||||
return a0 !== ME && a0 !== FAVORITES && !!isOnboarding(env1_8[a0]);
|
||||
}
|
||||
|
||||
function value_52011(a0) { // fn#52011, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6777:1081, offset: 0x012ea49d, size: 40 bytes, params: 2, frame: 4
|
||||
const binding = env1_8;
|
||||
const STARTED = env1_7.STARTED;
|
||||
binding[a0] = STARTED;
|
||||
env1_9[a0] = 'cover';
|
||||
}
|
||||
|
||||
function value_52012(a0) { // fn#52012, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6777:1161, offset: 0x012ea4c5, size: 32 bytes, params: 2, frame: 3
|
||||
const value = environment.__proto__;
|
||||
return env1_9[a0] ?? 'cover';
|
||||
}
|
||||
|
||||
@@ -0,0 +1,833 @@
|
||||
/* Metro module 5105; source: modules/guild_onboarding/GuildOnboardingUtils.tsx; dependencies: [1379, 5040, 1935, 1867, 3784, 5106, 661, 3772, 566, 1391, 5107, 5108, 3789, 1360, 628, 1861, 5109, 2] */
|
||||
function _fun44554(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#44554, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5283:6, offset: 0x01173aa3, size: 556 bytes, params: 8, frame: 21
|
||||
let env0_0 = require;
|
||||
const _arrayLikeToArray_44557 = 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 = isChattableChannel;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
|
||||
const connectedAccountsStore = importDefault(5040) /* metro dependency 5040: ConnectedAccountsStore */;
|
||||
const guildChannelStore = importDefault(1935) /* metro dependency 1935: GuildChannelStore */;
|
||||
const env0_7 = (require(1935) /* metro dependency 1935: GuildChannelStore */).GUILD_SELECTABLE_CHANNELS_KEY;
|
||||
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
|
||||
const permissionStore = importDefault(3784) /* metro dependency 3784: PermissionStore */;
|
||||
const env0_10 = (require(5106) /* metro dependency 5106: GuildOnboardingPromptsConstants */).OnboardingConnectionType;
|
||||
const constantsModule = require(661) /* metro dependency 661: Constants */;
|
||||
const env0_11 = constantsModule.GuildFeatures;
|
||||
const env0_12 = constantsModule.Permissions;
|
||||
const env0_13 = (require(3772) /* metro dependency 3772: GuildMemberConstants */).GuildMemberFlags;
|
||||
const Date = global.Date;
|
||||
const date = new Date(1682488800000);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_onboarding/GuildOnboardingUtils.tsx');
|
||||
exports.ONBOARDING_EPOCH = date;
|
||||
exports.useGuildOnboardingSettingsAvailable = function(a0) {
|
||||
var env0_0 = a0;
|
||||
return require(dependencyMap[8]).useStateFromStores([GuildStore, PermissionStore], _fun44572);
|
||||
};
|
||||
exports.isGuildOnboardingSettingsAvailable = isGuildOnboardingSettingsAvailable;
|
||||
exports.isBlockedByOnboarding = isBlockedByOnboarding;
|
||||
exports.showRulesInOnboarding = showRulesInOnboarding;
|
||||
exports.getChannelCoverageForOnboarding = getChannelCoverageForOnboarding;
|
||||
exports.useChannelCoverageForOnboarding = useChannelCoverageForOnboarding;
|
||||
exports.isChattableChannelId = isChattableChannelId;
|
||||
exports.isChattableChannel = closure;
|
||||
exports.useIsChattableChannel = function(a0) {
|
||||
var env0_0 = a0;
|
||||
return require(dependencyMap[8]).useStateFromStores([ChannelStore], _fun44583);
|
||||
};
|
||||
exports.getMinimumSetOfDefaultChannelIds = getMinimumSetOfDefaultChannelIds;
|
||||
exports.getChattableDefaultChannels = getChattableDefaultChannels;
|
||||
exports.useChattableDefaultChannels = function(a0, a1) {
|
||||
var env0_0 = a0;
|
||||
var env0_1 = a1;
|
||||
return require(dependencyMap[8]).useStateFromStores([GuildChannelStore], _fun44597, [a0, a1],
|
||||
areStatesEqual_44570);
|
||||
};
|
||||
exports.getSelectedRoleIds = function(a0) {
|
||||
var Set = global.Set;
|
||||
var value = a0.map(_fun44599);
|
||||
value = value.flat();
|
||||
value = value.filter(require(dependencyMap[13]).isNotNullish);
|
||||
var value3 = Object.create(Set.prototype, {constructor: {value: Set}});
|
||||
value = new Set(value);
|
||||
return value instanceof Object ? value : value3;
|
||||
};
|
||||
exports.getSelectedChannelIds = function(a0) {
|
||||
var Set = global.Set;
|
||||
var value = a0.map(_fun44601);
|
||||
value = value.flat();
|
||||
value = value.filter(require(dependencyMap[13]).isNotNullish);
|
||||
var value3 = Object.create(Set.prototype, {constructor: {value: Set}});
|
||||
value = new Set(value);
|
||||
return value instanceof Object ? value : value3;
|
||||
};
|
||||
exports.getProviderConnectionState = function(a0) {
|
||||
a0.filter(_fun44603).forEach(_fun44604);
|
||||
return {connected: [], notConnected: []};
|
||||
};
|
||||
exports.getApplicationConnectionState = function(a0) {
|
||||
var value = a0.filter(_fun44606);
|
||||
var env0_2 = require(dependencyMap[16]).default;
|
||||
var env0_3 = require(dependencyMap[16]).FetchState;
|
||||
value.forEach(_fun44607);
|
||||
return {connected: [], notConnected: []};
|
||||
};
|
||||
}
|
||||
|
||||
function _createForOfIteratorHelperLoose_44555(a0, a1) { // fn#44555, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5283:300, offset: 0x01173ccf, size: 370 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 _fun44556;
|
||||
}
|
||||
value = undefined;
|
||||
if (a0) {
|
||||
if (typeof a0 === 'string') {
|
||||
value = _arrayLikeToArray_44557(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_44557(a0, value);
|
||||
r6 = value;
|
||||
} else {
|
||||
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
|
||||
if (regexp.test(r9)) {
|
||||
value = _arrayLikeToArray_44557(a0, value);
|
||||
r6 = value;
|
||||
} else {
|
||||
r6 = value;
|
||||
}
|
||||
}
|
||||
r5 = r6;
|
||||
}
|
||||
} else {
|
||||
r5 = value;
|
||||
}
|
||||
if (r5) {
|
||||
if (r5) {
|
||||
}
|
||||
return _fun44556;
|
||||
}
|
||||
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 getChannelCoverage(a0, a1, a2) { // fn#44558, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5283:1237, offset: 0x01173e41, size: 132 bytes, params: 4, frame: 14
|
||||
const Set = global.Set;
|
||||
let set = new Set();
|
||||
a0.forEach(function({options}) {
|
||||
options.forEach(_fun44560);
|
||||
});
|
||||
a1.forEach(_fun44562);
|
||||
set = a2.filter(_fun44563);
|
||||
const items2 = [set.filter(_fun44564)];
|
||||
items2[1] = set.filter(_fun44565);
|
||||
return items2;
|
||||
}
|
||||
|
||||
function isChattableChannel(a0) { // fn#44566, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5283:1630, offset: 0x01173ffe, size: 148 bytes, params: 2, frame: 18
|
||||
var r1;
|
||||
var r0;
|
||||
var moduleValue;
|
||||
var canChannelBeDefault2;
|
||||
var isForumChannel2;
|
||||
var moduleValue2;
|
||||
var canEveryoneRole;
|
||||
const value = a0 != null;
|
||||
if (value) {
|
||||
moduleValue = require(5108) /* metro dependency 5108: DefaultChannelUtils */;
|
||||
canChannelBeDefault2 = moduleValue.canChannelBeDefault(a0.guild_id, a0.id);
|
||||
if (canChannelBeDefault2) {
|
||||
isForumChannel2 = a0.isForumChannel();
|
||||
moduleValue2 = importAll(3789) /* metro dependency 3789: PermissionUtils */;
|
||||
canEveryoneRole = moduleValue2.canEveryoneRole;
|
||||
r1 = isForumChannel2 ? Reflect.apply(canEveryoneRole, moduleValue2, [Permissions.SEND_MESSAGES_IN_THREADS,
|
||||
a0]) : Reflect.apply(canEveryoneRole, moduleValue2, [Permissions.SEND_MESSAGES, a0]);
|
||||
} else {
|
||||
r1 = !!canChannelBeDefault2;
|
||||
}
|
||||
r0 = r1;
|
||||
} else {
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function getFlattenedDefaultChannels(a0, a1) { // fn#44567, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5283:1851, offset: 0x01174092, size: 287 bytes, params: 3, frame: 25
|
||||
var r10;
|
||||
var r9;
|
||||
var r3;
|
||||
var closure;
|
||||
var value6;
|
||||
var channel;
|
||||
var moduleValue;
|
||||
var canChannelBeDefault;
|
||||
var guild_id;
|
||||
var id;
|
||||
var includes;
|
||||
var isCategory;
|
||||
var isThread;
|
||||
var parent_id;
|
||||
var value7;
|
||||
var push;
|
||||
var value8;
|
||||
const value = a2;
|
||||
const value2 = a3;
|
||||
reducibleJoin2: while (true) {
|
||||
if (value !== undefined) {
|
||||
r10 = value;
|
||||
break reducibleJoin2;
|
||||
}
|
||||
closure = function(a0) {
|
||||
return a0;
|
||||
};
|
||||
r10 = closure;
|
||||
break reducibleJoin2;
|
||||
}
|
||||
reducibleJoin4: while (true) {
|
||||
if (value2 !== undefined) {
|
||||
r9 = value2;
|
||||
break reducibleJoin4;
|
||||
}
|
||||
closure = function() {
|
||||
return true;
|
||||
};
|
||||
r9 = closure;
|
||||
break reducibleJoin4;
|
||||
}
|
||||
const items2 = [];
|
||||
const value4 = _createForOfIteratorHelperLoose_44555(GuildChannelStore.getChannels(a0)[GUILD_SELECTABLE_CHANNELS_KEY]);
|
||||
const value5 = value4();
|
||||
let done = value5.done;
|
||||
if (!done) {
|
||||
r3 = value5;
|
||||
reducibleLoop5: while (true) {
|
||||
value6 = r3.value;
|
||||
channel = value6.channel;
|
||||
moduleValue = require(5108) /* metro dependency 5108: DefaultChannelUtils */;
|
||||
canChannelBeDefault = moduleValue.canChannelBeDefault;
|
||||
guild_id = channel.guild_id;
|
||||
id = channel.id;
|
||||
reducibleJoin13: while (true) {
|
||||
if (Reflect.apply(canChannelBeDefault, moduleValue, [guild_id, id])) {
|
||||
includes = a1.includes;
|
||||
id = channel.id;
|
||||
if (Reflect.apply(includes, a1, [id])) {
|
||||
isCategory = channel.isCategory;
|
||||
if (!Reflect.apply(isCategory, channel, [])) {
|
||||
value7 = r10(channel);
|
||||
if (r9(value7)) {
|
||||
push = items2.push;
|
||||
Reflect.apply(push, items2, [value7]);
|
||||
break reducibleJoin13;
|
||||
}
|
||||
break reducibleJoin13;
|
||||
}
|
||||
}
|
||||
isThread = channel.isThread;
|
||||
if (Reflect.apply(isThread, channel, [])) {
|
||||
break reducibleJoin13;
|
||||
}
|
||||
parent_id = channel.parent_id;
|
||||
if (parent_id == null) {
|
||||
break reducibleJoin13;
|
||||
}
|
||||
includes = a1.includes;
|
||||
parent_id = channel.parent_id;
|
||||
if (Reflect.apply(includes, a1, [parent_id])) {
|
||||
value7 = r10(channel);
|
||||
if (r9(value7)) {
|
||||
push = items2.push;
|
||||
Reflect.apply(push, items2, [value7]);
|
||||
break reducibleJoin13;
|
||||
}
|
||||
break reducibleJoin13;
|
||||
}
|
||||
break reducibleJoin13;
|
||||
}
|
||||
break reducibleJoin13;
|
||||
}
|
||||
value8 = value4();
|
||||
done = value8.done;
|
||||
if (done) {
|
||||
break reducibleLoop5;
|
||||
}
|
||||
r3 = value8;
|
||||
continue reducibleLoop5;
|
||||
}
|
||||
}
|
||||
return items2;
|
||||
}
|
||||
|
||||
function areStatesEqual_44570(a0, a1) { // fn#44570, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5283:2201, offset: 0x011741b1, size: 142 bytes, params: 3, frame: 18
|
||||
var r1;
|
||||
var value2;
|
||||
let value = a0[0].length === a1[0].length;
|
||||
let r0 = value && a0[1].length === a1[1].length;
|
||||
if (r0) {
|
||||
value2 = (importDefault(628) /* metro dependency 628: shallowEqual */)(a0[0], a1[0]);
|
||||
if (value2) {
|
||||
value = importDefault(628) /* metro dependency 628: shallowEqual */;
|
||||
value = value(a0[1], a1[1]);
|
||||
r1 = value;
|
||||
} else {
|
||||
r1 = value2;
|
||||
}
|
||||
r0 = r1;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function useGuildOnboardingSettingsAvailable(a0) { // fn#44571, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5283:2480, offset: 0x0117423f, size: 72 bytes, params: 2, frame: 15
|
||||
const env0_0 = a0;
|
||||
return (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildStore, PermissionStore], _fun44572);
|
||||
}
|
||||
|
||||
function isGuildOnboardingSettingsAvailable(a0) { // fn#44573, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5283:2747, offset: 0x01174307, size: 124 bytes, params: 2, frame: 16
|
||||
const guild = GuildStore.getGuild(a0);
|
||||
const r3 = guild == null || !guild.features.has(GuildFeatures.COMMUNITY);
|
||||
const value5 = !r3;
|
||||
let can = PermissionStore.can;
|
||||
const MANAGE_GUILD = Permissions.MANAGE_GUILD;
|
||||
const value6 = Reflect.apply(can, PermissionStore, [MANAGE_GUILD, guild]);
|
||||
can = PermissionStore.can;
|
||||
const MANAGE_ROLES = Permissions.MANAGE_ROLES;
|
||||
return (r3 ? value5 : value6) && Reflect.apply(can, PermissionStore, [MANAGE_ROLES, guild]);
|
||||
}
|
||||
|
||||
function isBlockedByOnboarding(a0, a1) { // fn#44574, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5283:2950, offset: 0x01174383, size: 235 bytes, params: 3, frame: 16
|
||||
var r2;
|
||||
var r0;
|
||||
var joinedAt;
|
||||
var Date;
|
||||
var value2;
|
||||
var date;
|
||||
var moduleValue;
|
||||
var hasFlag2;
|
||||
var moduleValue2;
|
||||
if (a0 != null) {
|
||||
var features = a0.features;
|
||||
var has = features.has;
|
||||
var value;
|
||||
var GUILD_ONBOARDING = GuildFeatures.GUILD_ONBOARDING;
|
||||
if (Reflect.apply(has, features, [GUILD_ONBOARDING])) {
|
||||
if (a1 == null) {
|
||||
return false;
|
||||
}
|
||||
joinedAt = a1.joinedAt;
|
||||
if (joinedAt == null) {
|
||||
return false;
|
||||
}
|
||||
Date = global.Date;
|
||||
joinedAt = a1.joinedAt;
|
||||
value2 = Object.create(Date.prototype, {constructor: {value: Date}});
|
||||
date = new Date();
|
||||
if ((date instanceof Object ? date : value2) < env0_14) {
|
||||
return false;
|
||||
}
|
||||
r2 = a1.flags ?? 0;
|
||||
moduleValue = importAll(1391) /* metro dependency 1391: FlagUtils */;
|
||||
hasFlag2 = moduleValue.hasFlag(r2, GuildMemberFlags.STARTED_ONBOARDING);
|
||||
if (hasFlag2) {
|
||||
moduleValue2 = importAll(1391) /* metro dependency 1391: FlagUtils */;
|
||||
r0 = !moduleValue2.hasFlag(r2, GuildMemberFlags.COMPLETED_ONBOARDING);
|
||||
} else {
|
||||
r0 = hasFlag2;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function showRulesInOnboarding(a0, a1) { // fn#44575, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5283:3269, offset: 0x0117446e, size: 88 bytes, params: 3, frame: 14
|
||||
let r0 = a0 != null && a0.features.has(GuildFeatures.MEMBER_VERIFICATION_MANUAL_APPROVAL) && a0.features.has(GuildFeatures.MEMBER_VERIFICATION_GATE_ENABLED);
|
||||
r0 = !r0 && a1 != null;
|
||||
return r0;
|
||||
}
|
||||
|
||||
function getChannelCoverageForOnboarding(a0, a1, a2) { // fn#44576, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5283:3474, offset: 0x011744c6, size: 67 bytes, params: 4, frame: 15
|
||||
return getChannelCoverage(a1, a2,
|
||||
GuildChannelStore.getChannels(a0)[GUILD_SELECTABLE_CHANNELS_KEY].map(function(a0) {
|
||||
return a0.channel;
|
||||
}));
|
||||
}
|
||||
|
||||
function useChannelCoverageForOnboarding(a0, a1, a2) { // fn#44578, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5283:3633, offset: 0x01174513, size: 104 bytes, params: 4, frame: 18
|
||||
const env0_0 = a0;
|
||||
const getChannelCoverageBinding = getChannelCoverage;
|
||||
const fluxModule = require(566) /* metro dependency 566: flux */;
|
||||
const useStateFromStores = fluxModule.useStateFromStores;
|
||||
return getChannelCoverageBinding(a1, a2, Reflect.apply(useStateFromStores, fluxModule, [[GuildChannelStore],
|
||||
_fun44579])[GUILD_SELECTABLE_CHANNELS_KEY].map(function(a0) {
|
||||
return a0.channel;
|
||||
}));
|
||||
}
|
||||
|
||||
function isChattableChannelId(a0) { // fn#44581, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5283:3820, offset: 0x01174596, size: 33 bytes, params: 2, frame: 12
|
||||
return isChattableChannel(ChannelStore.getChannel(a0));
|
||||
}
|
||||
|
||||
function useIsChattableChannel(a0) { // fn#44582, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5283:3963, offset: 0x011745b7, size: 64 bytes, params: 2, frame: 14
|
||||
const env0_0 = a0;
|
||||
return (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], _fun44583);
|
||||
}
|
||||
|
||||
function getMinimumSetOfDefaultChannelIds(a0, a1, a2) { // fn#44584, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5283:4160, offset: 0x0117463e, size: 82 bytes, params: 4, frame: 19
|
||||
let value = a3;
|
||||
const env0_0 = a0;
|
||||
value = getFlattenedDefaultChannels(a0, a1, function(a0) {
|
||||
return a0.id;
|
||||
}, value !== undefined ? value : function() {
|
||||
return true;
|
||||
});
|
||||
a2.forEach(_fun44587);
|
||||
return value;
|
||||
}
|
||||
|
||||
function getChattableDefaultChannels(a0, a1) { // fn#44592, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5283:4649, offset: 0x01174793, size: 143 bytes, params: 3, frame: 18
|
||||
var r5;
|
||||
var value5;
|
||||
var channel;
|
||||
var id;
|
||||
var value6;
|
||||
const flattenedDefaultChannels = getFlattenedDefaultChannels(a0, a1);
|
||||
const object2 = {};
|
||||
let value = _createForOfIteratorHelperLoose_44555(GuildChannelStore.getChannels(a0)[GUILD_SELECTABLE_CHANNELS_KEY]);
|
||||
const value4 = value();
|
||||
let done = value4.done;
|
||||
if (!done) {
|
||||
for (r5 = value4; true; r5 = value6) {
|
||||
value5 = r5.value;
|
||||
channel = value5.channel;
|
||||
id = channel.id;
|
||||
object2[id] = value5;
|
||||
value6 = value();
|
||||
done = value6.done;
|
||||
if (done) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
value = flattenedDefaultChannels.map(function(a0) {
|
||||
return a0.id;
|
||||
});
|
||||
value = ((a0, a1) => {
|
||||
var env0_0 = a1;
|
||||
return a0.filter(_fun44594);
|
||||
})(value, object2);
|
||||
return [value, flattenedDefaultChannels];
|
||||
}
|
||||
|
||||
function useChattableDefaultChannels(a0, a1) { // fn#44596, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5283:5038, offset: 0x0117486d, size: 94 bytes, params: 3, frame: 19
|
||||
const env0_0 = a0;
|
||||
const env0_1 = a1;
|
||||
return (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildChannelStore], _fun44597, [a0, a1],
|
||||
areStatesEqual_44570);
|
||||
}
|
||||
|
||||
function getSelectedRoleIds(a0) { // fn#44598, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5283:5574, offset: 0x01174a29, size: 101 bytes, params: 2, frame: 14
|
||||
const Set = global.Set;
|
||||
let value = a0.map(function(a0) {
|
||||
return a0.roleIds;
|
||||
});
|
||||
value = value.flat();
|
||||
value = value.filter((require(1360) /* metro dependency 1360: GlobalUtils */).isNotNullish);
|
||||
const value3 = Object.create(Set.prototype, {constructor: {value: Set}});
|
||||
const set = new Set(value);
|
||||
return set instanceof Object ? set : value3;
|
||||
}
|
||||
|
||||
function getSelectedChannelIds(a0) { // fn#44600, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5283:5707, offset: 0x01174a99, size: 101 bytes, params: 2, frame: 14
|
||||
const Set = global.Set;
|
||||
let value = a0.map(function(a0) {
|
||||
return a0.channelIds;
|
||||
});
|
||||
value = value.flat();
|
||||
value = value.filter((require(1360) /* metro dependency 1360: GlobalUtils */).isNotNullish);
|
||||
const value3 = Object.create(Set.prototype, {constructor: {value: Set}});
|
||||
const set = new Set(value);
|
||||
return set instanceof Object ? set : value3;
|
||||
}
|
||||
|
||||
function getProviderConnectionState(a0) { // fn#44602, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5283:5851, offset: 0x01174b09, size: 65 bytes, params: 2, frame: 13
|
||||
a0.filter(_fun44603).forEach(_fun44604);
|
||||
return {connected: [], notConnected: []};
|
||||
}
|
||||
|
||||
function getApplicationConnectionState(a0) { // fn#44605, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5283:6192, offset: 0x01174be4, size: 118 bytes, params: 2, frame: 17
|
||||
const value = a0.filter(_fun44606);
|
||||
const env0_2 = (require(5109) /* metro dependency 5109: AuthorizedAppsStore */).default;
|
||||
const env0_3 = (require(5109) /* metro dependency 5109: AuthorizedAppsStore */).FetchState;
|
||||
value.forEach(_fun44607);
|
||||
return {connected: [], notConnected: []};
|
||||
}
|
||||
|
||||
function _fun44559({options}) { // fn#44559, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5283:1297, offset: 0x01173ec5, size: 29 bytes, params: 2, frame: 11
|
||||
options.forEach(function(a0) {
|
||||
var r1;
|
||||
var r3;
|
||||
var channelIds;
|
||||
var value = a0 == null;
|
||||
var value2 = undefined;
|
||||
if (value) {
|
||||
r1 = value;
|
||||
r3 = value2;
|
||||
} else {
|
||||
channelIds = a0.channelIds;
|
||||
r1 = channelIds == null;
|
||||
r3 = channelIds;
|
||||
}
|
||||
if (!r1) {
|
||||
r3.forEach(_fun44561);
|
||||
}
|
||||
return value2;
|
||||
});
|
||||
}
|
||||
|
||||
function _fun44563(a0) { // fn#44563, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5283:1437, offset: 0x01173f2d, size: 70 bytes, params: 2, frame: 13
|
||||
let value = a0.isCategory();
|
||||
let r0 = !value && !a0.isThread();
|
||||
if (r0) {
|
||||
value = environment.__proto__;
|
||||
value = !(importDefault(5107) /* metro dependency 5107: isRoleRequired */)(a0);
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function _fun44564(a0) { // fn#44564, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5283:1504, offset: 0x01173f73, size: 68 bytes, params: 2, frame: 13
|
||||
const binding = env0_0;
|
||||
return binding.has(a0.id) || a0.parent_id != null && env0_0.has(a0.parent_id);
|
||||
}
|
||||
|
||||
function _fun44565(a0) { // fn#44565, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5283:1570, offset: 0x01173fb7, size: 71 bytes, params: 2, frame: 13
|
||||
const binding = env0_0;
|
||||
return !(binding.has(a0.id) || a0.parent_id != null && env0_0.has(a0.parent_id));
|
||||
}
|
||||
|
||||
function _fun44572() { // fn#44572, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5283:2570, offset: 0x01174287, size: 128 bytes, params: 1, frame: 16
|
||||
const value = environment.__proto__;
|
||||
const guild = GuildStore.getGuild(env0_0);
|
||||
const r3 = guild == null || !guild.features.has(GuildFeatures.COMMUNITY);
|
||||
const value6 = !r3;
|
||||
let can = PermissionStore.can;
|
||||
const MANAGE_GUILD = Permissions.MANAGE_GUILD;
|
||||
const value7 = Reflect.apply(can, PermissionStore, [MANAGE_GUILD, guild]);
|
||||
can = PermissionStore.can;
|
||||
const MANAGE_ROLES = Permissions.MANAGE_ROLES;
|
||||
return (r3 ? value6 : value7) && Reflect.apply(can, PermissionStore, [MANAGE_ROLES, guild]);
|
||||
}
|
||||
|
||||
function _fun44579() { // fn#44579, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5283:3744, offset: 0x0117457b, size: 27 bytes, params: 1, frame: 11
|
||||
return GuildChannelStore.getChannels(env0_0);
|
||||
}
|
||||
|
||||
function _fun44583() { // fn#44583, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5283:4037, offset: 0x011745f7, size: 71 bytes, params: 1, frame: 13
|
||||
const value = environment.__proto__;
|
||||
const channel = ChannelStore.getChannel(env0_0);
|
||||
return (require(1360) /* metro dependency 1360: GlobalUtils */).isNotNullish(channel) && isChattableChannel(channel);
|
||||
}
|
||||
|
||||
function _fun44587(a0) { // fn#44587, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5283:4287, offset: 0x01174690, size: 139 bytes, params: 2, frame: 21
|
||||
var environment;
|
||||
var value;
|
||||
var getFlattenedDefaultChannelsBinding;
|
||||
var binding;
|
||||
var options;
|
||||
var property;
|
||||
var value2;
|
||||
var items2;
|
||||
var flattenedDefaultChannelsBinding;
|
||||
var value5;
|
||||
var push;
|
||||
if (a0.required) {
|
||||
value = environment.__proto__;
|
||||
getFlattenedDefaultChannelsBinding = getFlattenedDefaultChannels;
|
||||
binding = env0_0;
|
||||
options = a0.options;
|
||||
property = options[0];
|
||||
value2 = property == null;
|
||||
flattenedDefaultChannelsBinding = getFlattenedDefaultChannelsBinding(binding,
|
||||
(value2 ? undefined : property.channelIds) ?? [], function(a0) {
|
||||
return a0.id;
|
||||
});
|
||||
options = a0.options;
|
||||
value5 = options.reduce(_fun44589, flattenedDefaultChannelsBinding);
|
||||
binding = env0_2;
|
||||
push = binding.push;
|
||||
items2 = [];
|
||||
arraySpread(items2, value5, 0, value2);
|
||||
apply(push, items2, binding, value2);
|
||||
}
|
||||
}
|
||||
|
||||
function filterChattableChannels(a0, a1) { // fn#44593, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5283:4851, owner: getChattableDefaultChannels.filterChattableChannels, offset: 0x01174822, size: 29 bytes, params: 3, frame: 11
|
||||
const env0_0 = a1;
|
||||
return a0.filter(_fun44594);
|
||||
}
|
||||
|
||||
function _fun44597() { // fn#44597, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5283:5120, offset: 0x011748cb, size: 350 bytes, params: 1, frame: 26
|
||||
var r3;
|
||||
var r12;
|
||||
var r13;
|
||||
var r11;
|
||||
var value6;
|
||||
var moduleValue;
|
||||
var canChannelBeDefault;
|
||||
var channel;
|
||||
var guild_id;
|
||||
var id;
|
||||
var canChannelBeDefault2;
|
||||
var has;
|
||||
var value7;
|
||||
var isCategory;
|
||||
var value8;
|
||||
var isThread2;
|
||||
var value9;
|
||||
var parent_id;
|
||||
var value10;
|
||||
var value11;
|
||||
var push;
|
||||
var isChattableChannelBinding;
|
||||
var value12;
|
||||
const items3 = [];
|
||||
const items2 = [];
|
||||
const object2 = {};
|
||||
const value4 = _createForOfIteratorHelperLoose_44555(GuildChannelStore.getChannels(env0_0)[GUILD_SELECTABLE_CHANNELS_KEY]);
|
||||
const value5 = value4();
|
||||
let done = value5.done;
|
||||
if (!done) {
|
||||
r3 = value5;
|
||||
while (true) {
|
||||
value6 = r3.value;
|
||||
moduleValue = require(5108) /* metro dependency 5108: DefaultChannelUtils */;
|
||||
canChannelBeDefault = moduleValue.canChannelBeDefault;
|
||||
channel = value6.channel;
|
||||
guild_id = channel.guild_id;
|
||||
channel = value6.channel;
|
||||
id = channel.id;
|
||||
canChannelBeDefault2 = Reflect.apply(canChannelBeDefault, moduleValue, [guild_id, id]);
|
||||
if (canChannelBeDefault2) {
|
||||
has = require.has;
|
||||
channel = value6.channel;
|
||||
value7 = Reflect.apply(has, require, [channel.id]);
|
||||
if (!value7) {
|
||||
r12 = value7;
|
||||
continue;
|
||||
}
|
||||
channel = value6.channel;
|
||||
isCategory = channel.isCategory;
|
||||
value8 = !Reflect.apply(isCategory, channel, []);
|
||||
r12 = value8;
|
||||
if (r12) {
|
||||
continue;
|
||||
}
|
||||
channel = value6.channel;
|
||||
isThread2 = channel.isThread();
|
||||
value9 = !isThread2;
|
||||
if (isThread2) {
|
||||
r13 = value9;
|
||||
continue;
|
||||
}
|
||||
channel = value6.channel;
|
||||
parent_id = channel.parent_id;
|
||||
value10 = parent_id != null;
|
||||
r13 = value10;
|
||||
if (!r13) {
|
||||
continue;
|
||||
}
|
||||
has = require.has;
|
||||
channel = value6.channel;
|
||||
parent_id = channel.parent_id;
|
||||
value11 = Reflect.apply(has, require, [parent_id]);
|
||||
r13 = value11;
|
||||
r12 = r13;
|
||||
r11 = r12;
|
||||
} else {
|
||||
r11 = canChannelBeDefault2;
|
||||
}
|
||||
if (!r11) {
|
||||
continue;
|
||||
}
|
||||
channel = value6.channel;
|
||||
id = channel.id;
|
||||
object2[id] = value6;
|
||||
push = items3.push;
|
||||
channel = value6.channel;
|
||||
Reflect.apply(push, items3, [channel]);
|
||||
isChattableChannelBinding = isChattableChannel;
|
||||
channel = value6.channel;
|
||||
if (!isChattableChannelBinding(channel)) {
|
||||
continue;
|
||||
}
|
||||
push = items2.push;
|
||||
channel = value6.channel;
|
||||
id = channel.id;
|
||||
Reflect.apply(push, items2, [id]);
|
||||
value12 = value4();
|
||||
done = value12.done;
|
||||
if (done) {
|
||||
break;
|
||||
}
|
||||
r3 = value12;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
return [items2, items3];
|
||||
}
|
||||
|
||||
function _fun44603(a0) { // fn#44603, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5283:5906, offset: 0x01174b4a, size: 37 bytes, params: 2, frame: 3
|
||||
const connection_type = a0.connection_type;
|
||||
const value = environment.__proto__;
|
||||
const PROVIDER_CONNECTED_ACCOUNT = OnboardingConnectionType.PROVIDER_CONNECTED_ACCOUNT;
|
||||
return connection_type === PROVIDER_CONNECTED_ACCOUNT && a0.provider_id;
|
||||
}
|
||||
|
||||
function _fun44604({provider_id}) { // fn#44604, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5283:6003, offset: 0x01174b6f, size: 117 bytes, params: 2, frame: 14
|
||||
let value = environment.__proto__;
|
||||
const stringUtilsModule = require(1861) /* metro dependency 1861: StringUtils */;
|
||||
if (!stringUtilsModule.isNullOrEmpty(provider_id)) {
|
||||
value = ConnectedAccountsStore.getAccount(null, provider_id);
|
||||
if (value == null) {
|
||||
env0_1.push(provider_id);
|
||||
} else if (value.revoked) {
|
||||
env0_1.push(provider_id);
|
||||
} else {
|
||||
env0_0.push(provider_id);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function _fun44606(a0) { // fn#44606, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5283:6250, offset: 0x01174c5a, size: 37 bytes, params: 2, frame: 3
|
||||
const connection_type = a0.connection_type;
|
||||
const value = environment.__proto__;
|
||||
const APPLICATION = OnboardingConnectionType.APPLICATION;
|
||||
return connection_type === APPLICATION && a0.application_id;
|
||||
}
|
||||
|
||||
function _fun44607({application_id}) { // fn#44607, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5283:6378, offset: 0x01174c7f, size: 129 bytes, params: 2, frame: 14
|
||||
var binding;
|
||||
let value = environment.__proto__;
|
||||
value = require(1861) /* metro dependency 1861: StringUtils */;
|
||||
if (!value.isNullOrEmpty(application_id)) {
|
||||
binding = env0_2;
|
||||
if (binding.getFetchStateForApplication(application_id) !== FetchState.FETCHED) {
|
||||
env0_1.push(application_id);
|
||||
} else if (binding.getNewestTokenForApplication(application_id) != null) {
|
||||
env0_0.push(application_id);
|
||||
} else {
|
||||
env0_1.push(application_id);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function _fun44560(a0) { // fn#44560, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5283:1320, offset: 0x01173ee2, size: 51 bytes, params: 2, frame: 14
|
||||
var r1;
|
||||
var r3;
|
||||
var channelIds;
|
||||
const value = a0 == null;
|
||||
const value2 = undefined;
|
||||
if (value) {
|
||||
r1 = value;
|
||||
r3 = value2;
|
||||
} else {
|
||||
channelIds = a0.channelIds;
|
||||
r1 = channelIds == null;
|
||||
r3 = channelIds;
|
||||
}
|
||||
if (!r1) {
|
||||
r3.forEach(_fun44561);
|
||||
}
|
||||
return value2;
|
||||
}
|
||||
|
||||
function _fun44589(a0, a1) { // fn#44589, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5283:4439, offset: 0x0117471b, size: 81 bytes, params: 3, frame: 18
|
||||
const value = a0;
|
||||
if (a1.channelIds == null) {
|
||||
return [];
|
||||
}
|
||||
const flattenedDefaultChannels = getFlattenedDefaultChannels(env1_0, a1.channelIds, function(a0) {
|
||||
return a0.id;
|
||||
}, _fun44591);
|
||||
return flattenedDefaultChannels.length < value.length ? flattenedDefaultChannels : value;
|
||||
}
|
||||
|
||||
function _fun44594(a0) { // fn#44594, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5283:4906, offset: 0x0117483f, size: 46 bytes, params: 2, frame: 13
|
||||
const value = environment.__proto__.__proto__;
|
||||
return isChattableChannel(require[a0]?.channel);
|
||||
}
|
||||
|
||||
function _fun44561(a0) { // fn#44561, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5283:1374, offset: 0x01173f15, size: 24 bytes, params: 2, frame: 11
|
||||
env2_0.add(a0);
|
||||
}
|
||||
|
||||
function _fun44591(a0) { // fn#44591, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5283:4538, offset: 0x0117476c, size: 39 bytes, params: 2, frame: 12
|
||||
const value = environment.__proto__.__proto__;
|
||||
return env2_1(a0) && !env2_2.includes(a0);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,52 @@
|
||||
/* Metro module 6604; source: modules/guild_onboarding/LandingAssetUtils.tsx; dependencies: [2] */
|
||||
function _fun52089(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#52089, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6782:6, offset: 0x0131e9b8, size: 85 bytes, params: 8, frame: 15
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_onboarding/LandingAssetUtils.tsx');
|
||||
exports.default = function(a0, a1, a2) {
|
||||
var env0_0 = a0;
|
||||
var env0_1 = a2;
|
||||
a0.assets[0].p = a1;
|
||||
var index = a0.layers.findIndex(_fun52091);
|
||||
var env0_2 = index;
|
||||
a0.layers[index].shapes[0].it.forEach(_fun52092);
|
||||
return a0;
|
||||
};
|
||||
}
|
||||
|
||||
function replaceFlagIconAndFlagColor(a0, a1, a2) { // fn#52090, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6782:182, offset: 0x0131ea0d, size: 104 bytes, params: 4, frame: 14
|
||||
const env0_0 = a0;
|
||||
const env0_1 = a2;
|
||||
a0.assets[0].p = a1;
|
||||
a0.layers[a0.layers.findIndex(function(a0) {
|
||||
return a0.nm === 'flag';
|
||||
})].shapes[0].it.forEach(_fun52092);
|
||||
return a0;
|
||||
}
|
||||
|
||||
function _fun52092(a0, a1) { // fn#52092, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6782:328, offset: 0x0131ea87, size: 229 bytes, params: 3, frame: 17
|
||||
var c;
|
||||
var items2;
|
||||
var value;
|
||||
let it = env0_0.layers[env0_2].shapes[0].it;
|
||||
if (it[a1].ty === 'gr') {
|
||||
it = env0_0.layers[env0_2].shapes[0].it;
|
||||
it = it[a1].it;
|
||||
if (it.findIndex(function(a0) {
|
||||
return a0.ty === 'fl';
|
||||
}) >= 0) {
|
||||
c = env0_0.layers[env0_2].shapes[0].it[a1].it[1].c;
|
||||
value = importDefault.map(_fun52094);
|
||||
items2 = [];
|
||||
value = arraySpread(items2, value, 0, it);
|
||||
items2[value] = 1;
|
||||
value + 1;
|
||||
c.k = items2;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function _fun52094(a0) { // fn#52094, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6782:489, offset: 0x0131eb80, size: 15 bytes, params: 2, frame: 2
|
||||
return a0 / 256;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,306 @@
|
||||
/* Metro module 6598; source: modules/guild_onboarding/doGuildOnboarding.native.tsx; dependencies: [5, 27, 3969, 6599, 6600, 661, 6601, 4080, 5080, 6593, 6602, 1423, 1852, 6604, 6605, 6606, 6615, 1962, 1230, 2] */
|
||||
function _fun51984(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#51984, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6776:6, offset: 0x012e9b3b, size: 304 bytes, params: 8, frame: 20
|
||||
let env0_0 = require;
|
||||
const closure = function(a0) {
|
||||
var env0_0 = a0;
|
||||
_fun51993(a0);
|
||||
var Promise = global.Promise;
|
||||
var value = Object.create(Promise.prototype, {constructor: {value: Promise}});
|
||||
var value2 = new Promise(_fun51995);
|
||||
return value2 instanceof Object ? value2 : value;
|
||||
};
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(5) /* metro dependency 5 */;
|
||||
const env0_4 = (require(27) /* metro dependency 27 */).NativeModules;
|
||||
const selectedGuildStore = importDefault(3969) /* metro dependency 3969: SelectedGuildStore */;
|
||||
const guildOnboardingStore = importDefault(6599) /* metro dependency 6599: GuildOnboardingStore */;
|
||||
const env0_7 = (require(6600) /* metro dependency 6600: GuildOnboardingConstants */).GUILD_ONBOARDING_MODAL_KEY;
|
||||
const constantsModule = require(661) /* metro dependency 661: Constants */;
|
||||
const env0_8 = constantsModule.GuildFeatures;
|
||||
const env0_9 = constantsModule.Routes;
|
||||
const getBaseAnimationData = function() {
|
||||
var JSON = global.JSON;
|
||||
var JSON2 = global.JSON;
|
||||
return JSON.parse(JSON2.stringify(require(dependencyMap[6])));
|
||||
};
|
||||
const env0_11 = {};
|
||||
const env0_12 = {};
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_onboarding/doGuildOnboarding.native.tsx');
|
||||
exports.default = function() {
|
||||
return _doGuildOnboarding.apply(this, arguments);
|
||||
};
|
||||
exports.openAndWaitForOnboarding = closure;
|
||||
exports.discardOnboardingPromise = discardOnboardingPromise;
|
||||
exports.isOnboardingActiveForGuild = isOnboardingActiveForGuild;
|
||||
}
|
||||
|
||||
function _doGuildOnboarding() { // fn#51985, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6776:297, offset: 0x012e9c6b, size: 48 bytes, params: 1, frame: 14
|
||||
return env0_3(_fun51987).apply(this, arguments);
|
||||
}
|
||||
|
||||
function _fetchLandingAsset() { // fn#51989, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6776:773, offset: 0x012e9e0b, size: 48 bytes, params: 1, frame: 14
|
||||
return env0_3(_fun51991).apply(this, arguments);
|
||||
}
|
||||
|
||||
function openAndWaitForOnboarding(a0) { // fn#51992, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6776:1169, offset: 0x012e9f50, size: 56 bytes, params: 2, frame: 12
|
||||
const env0_0 = a0;
|
||||
waitForOnboardingCompleted(a0);
|
||||
const Promise = global.Promise;
|
||||
const value = Object.create(Promise.prototype, {constructor: {value: Promise}});
|
||||
const promise = new Promise(_fun51995);
|
||||
return promise instanceof Object ? promise : value;
|
||||
}
|
||||
|
||||
function discardOnboardingPromise(a0) { // fn#52000, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6776:1874, offset: 0x012ea156, size: 18 bytes, params: 2, frame: 2
|
||||
delete env0_11[a0];
|
||||
}
|
||||
|
||||
function isOnboardingActiveForGuild(a0) { // fn#52001, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6776:1953, offset: 0x012ea168, size: 22 bytes, params: 2, frame: 2
|
||||
return env0_11[a0] != null;
|
||||
}
|
||||
|
||||
async function _fun51987({guildId}) { // fn#51987, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6776:356, offset: 0x012e9cad, size: 320 bytes, params: 2, frame: 18
|
||||
var environment;
|
||||
var value11;
|
||||
var value14;
|
||||
if (true) {
|
||||
await undefined;
|
||||
if (false) {
|
||||
return undefined;
|
||||
}
|
||||
value = environment.__proto__.__proto__;
|
||||
var binding = env2_1;
|
||||
var binding2 = env2_2;
|
||||
binding(binding2[7]).hideActionSheet();
|
||||
binding(binding2[8]).popAll();
|
||||
var value6 = env2_0(binding2[9]);
|
||||
await value6.waitForGuild(guildId);
|
||||
if (false) {
|
||||
return undefined;
|
||||
}
|
||||
var features = undefined.features;
|
||||
var has = features.has;
|
||||
var GUILD_ONBOARDING = env2_8.GUILD_ONBOARDING;
|
||||
if (Reflect.apply(has, features, [GUILD_ONBOARDING]) && undefined.features.has(env2_8.COMMUNITY)) {
|
||||
binding = env2_0;
|
||||
value11 = binding(env2_2[10]);
|
||||
await value11.maybeFetchOnboardingPrompts(guildId);
|
||||
if (false) {
|
||||
return undefined;
|
||||
}
|
||||
binding = env2_6;
|
||||
if (binding.shouldShowOnboarding(guildId)) {
|
||||
binding = env2_12;
|
||||
await fetchLandingAsset(undefined);
|
||||
value14 = undefined;
|
||||
if (false) {
|
||||
return value14;
|
||||
}
|
||||
binding[guildId] = value14;
|
||||
binding = env2_15;
|
||||
await binding(undefined.id);
|
||||
return undefined;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function* _fun51991({id, icon}) { // fn#51991, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6776:832, offset: 0x012e9e44, size: 268 bytes, params: 2, frame: 22
|
||||
var ImageManager;
|
||||
var getAvatarBase64;
|
||||
var value6;
|
||||
var value7;
|
||||
var value8;
|
||||
var getDominantColors;
|
||||
var value9;
|
||||
var value10;
|
||||
var value11;
|
||||
var binding3;
|
||||
var property;
|
||||
var value12;
|
||||
var value13;
|
||||
var concat;
|
||||
var value14;
|
||||
var value15;
|
||||
var error;
|
||||
if (false) {
|
||||
return undefined;
|
||||
}
|
||||
value = environment.__proto__.__proto__;
|
||||
let binding = env2_1;
|
||||
const binding2 = env2_2;
|
||||
const value3 = binding(binding2[11]);
|
||||
const getGuildIconSource = value3.getGuildIconSource;
|
||||
const object2 = {};
|
||||
object2.id = id;
|
||||
object2.icon = icon;
|
||||
object2.canAnimate = false;
|
||||
object2.size = 96 / binding(binding2[12])();
|
||||
const value5 = Reflect.apply(getGuildIconSource, value3, [object2]);
|
||||
try {
|
||||
binding = env2_4;
|
||||
} catch (error) {
|
||||
return env2_10();
|
||||
}
|
||||
try {
|
||||
ImageManager = binding.ImageManager;
|
||||
} catch (error) {
|
||||
return env2_10();
|
||||
}
|
||||
try {
|
||||
getAvatarBase64 = ImageManager.getAvatarBase64;
|
||||
} catch (error) {
|
||||
return env2_10();
|
||||
}
|
||||
try {
|
||||
value6 = Reflect.apply(getAvatarBase64, ImageManager, [value5]);
|
||||
} catch (error) {
|
||||
return env2_10();
|
||||
}
|
||||
yield value6;
|
||||
try {
|
||||
value7 = undefined;
|
||||
value8 = false;
|
||||
} catch (error) {
|
||||
return env2_10();
|
||||
}
|
||||
if (value8) {
|
||||
return value7;
|
||||
}
|
||||
try {
|
||||
binding = env2_4;
|
||||
} catch (error) {
|
||||
return env2_10();
|
||||
}
|
||||
try {
|
||||
ImageManager = binding.ImageManager;
|
||||
} catch (error) {
|
||||
return env2_10();
|
||||
}
|
||||
try {
|
||||
getDominantColors = ImageManager.getDominantColors;
|
||||
} catch (error) {
|
||||
return env2_10();
|
||||
}
|
||||
try {
|
||||
value9 = Reflect.apply(getDominantColors, ImageManager, [value5]);
|
||||
} catch (error) {
|
||||
return env2_10();
|
||||
}
|
||||
yield value9;
|
||||
try {
|
||||
value10 = undefined;
|
||||
value11 = false;
|
||||
} catch (error) {
|
||||
return env2_10();
|
||||
}
|
||||
if (value11) {
|
||||
return value10;
|
||||
}
|
||||
try {
|
||||
binding = env2_1;
|
||||
} catch (error) {
|
||||
return env2_10();
|
||||
}
|
||||
try {
|
||||
binding3 = env2_2;
|
||||
} catch (error) {
|
||||
return env2_10();
|
||||
}
|
||||
try {
|
||||
property = binding3[13];
|
||||
} catch (error) {
|
||||
return env2_10();
|
||||
}
|
||||
try {
|
||||
value12 = binding(property);
|
||||
} catch (error) {
|
||||
return env2_10();
|
||||
}
|
||||
try {
|
||||
binding = env2_10;
|
||||
} catch (error) {
|
||||
return env2_10();
|
||||
}
|
||||
try {
|
||||
value13 = binding();
|
||||
} catch (error) {
|
||||
return env2_10();
|
||||
}
|
||||
try {
|
||||
} catch (error) {
|
||||
return env2_10();
|
||||
}
|
||||
try {
|
||||
} catch (error) {
|
||||
return env2_10();
|
||||
}
|
||||
try {
|
||||
value14 = Reflect.apply(concat, 'data:image/png;base64,', [value7]);
|
||||
} catch (error) {
|
||||
return env2_10();
|
||||
}
|
||||
try {
|
||||
property = value10[0];
|
||||
} catch (error) {
|
||||
return env2_10();
|
||||
}
|
||||
try {
|
||||
value15 = value12(value13, value14, property);
|
||||
} catch (error) {
|
||||
return env2_10();
|
||||
}
|
||||
return value15;
|
||||
}
|
||||
|
||||
function waitForOnboardingCompleted(a0) { // fn#51993, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6776:1213, owner: openAndWaitForOnboarding.waitForOnboardingCompleted, offset: 0x012e9f88, size: 62 bytes, params: 2, frame: 13
|
||||
var environment;
|
||||
const env0_0 = a0;
|
||||
let value = environment.__proto__;
|
||||
value = require(6605) /* metro dependency 6605: doGuildOnboardingHelpers */;
|
||||
value = value.waitForOnboardingCompletion(a0);
|
||||
value.then(_fun51994);
|
||||
}
|
||||
|
||||
function _fun51995(a0) { // fn#51995, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6776:1388, offset: 0x012ea013, size: 176 bytes, params: 2, frame: 20
|
||||
var environment;
|
||||
const value = environment.__proto__;
|
||||
let binding = env1_11;
|
||||
if (binding[env0_0] == null) {
|
||||
env1_11[env0_0] = a0;
|
||||
}
|
||||
const defaultImport = importDefault(dependencyMap[8]);
|
||||
const pushLazy = defaultImport.pushLazy;
|
||||
const value3 = require(dependencyMap[17])(dependencyMap[16], dependencyMap.paths);
|
||||
binding = env0_0;
|
||||
Reflect.apply(pushLazy, defaultImport, [value3, {guildId: binding, backShouldLeaveGuild: true,
|
||||
onFinish: function() {
|
||||
}, landingAnimation: env1_12[binding], isFirstOpen: true}, GUILD_ONBOARDING_MODAL_KEY]).then(_fun51997);
|
||||
}
|
||||
|
||||
function fetchLandingAsset() { // fn#51988, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6776:609, offset: 0x012e9ded, size: 30 bytes, params: 1, frame: 13
|
||||
return env3_14.apply(this, arguments);
|
||||
}
|
||||
|
||||
function _fun51994() { // fn#51994, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6776:1298, offset: 0x012e9fc6, size: 77 bytes, params: 1, frame: 12
|
||||
const value = environment.__proto__.__proto__;
|
||||
let binding = env2_11;
|
||||
const property = binding[env0_0];
|
||||
if (property != null) {
|
||||
property();
|
||||
}
|
||||
binding = env2_11;
|
||||
const binding2 = env0_0;
|
||||
delete binding[binding2];
|
||||
(importDefault(6606) /* metro dependency 6606: GuildOnboardingActionCreators */).finishOnboarding(binding2);
|
||||
}
|
||||
|
||||
function _fun51997() { // fn#51997, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6776:1552, offset: 0x012ea0c3, size: 84 bytes, params: 1, frame: 13
|
||||
var moduleValue;
|
||||
if (SelectedGuildStore.getGuildId() !== env1_0) {
|
||||
moduleValue = require(1230) /* metro dependency 1230: router_utils */;
|
||||
moduleValue.transitionTo(Routes.CHANNEL(env1_0));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,55 @@
|
||||
/* Metro module 6605; source: modules/guild_onboarding/doGuildOnboardingHelpers.tsx; dependencies: [1945, 3772, 1391, 6606, 2] */
|
||||
function _fun52095(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#52095, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6783:6, offset: 0x0131eb8f, size: 138 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 env0_4 = (require(3772) /* metro dependency 3772: GuildMemberConstants */).GuildMemberFlags;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_onboarding/doGuildOnboardingHelpers.tsx');
|
||||
exports.waitForOnboardingCompletion = function(a0) {
|
||||
var env0_0 = a0;
|
||||
var Promise = global.Promise;
|
||||
var value = Object.create(Promise.prototype, {constructor: {value: Promise}});
|
||||
var value2 = new Promise(_fun52097);
|
||||
return value2 instanceof Object ? value2 : value;
|
||||
};
|
||||
}
|
||||
|
||||
function waitForOnboardingCompletion(a0) { // fn#52096, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6783:250, offset: 0x0131ec19, size: 44 bytes, params: 2, frame: 11
|
||||
let env0_0 = a0;
|
||||
const Promise = global.Promise;
|
||||
const value = Object.create(Promise.prototype, {constructor: {value: Promise}});
|
||||
const promise = new Promise(function(a0) {
|
||||
var env0_0 = a0;
|
||||
GuildMemberStore.addConditionalChangeListener(_fun52098);
|
||||
});
|
||||
return promise instanceof Object ? promise : value;
|
||||
}
|
||||
|
||||
function _fun52097(a0) { // fn#52097, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6783:310, offset: 0x0131ec45, size: 36 bytes, params: 2, frame: 11
|
||||
const env0_0 = a0;
|
||||
GuildMemberStore.addConditionalChangeListener(_fun52098);
|
||||
}
|
||||
|
||||
function _fun52098() { // fn#52098, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6783:346, offset: 0x0131ec69, size: 153 bytes, params: 1, frame: 18
|
||||
var r0;
|
||||
let value = environment.__proto__.__proto__;
|
||||
const selfMember = GuildMemberStore.getSelfMember(env1_0);
|
||||
const value4 = undefined;
|
||||
const flagUtilsModule = require(1391) /* metro dependency 1391: FlagUtils */;
|
||||
const hasFlag = flagUtilsModule.hasFlag;
|
||||
const r4 = (selfMember == null ? value4 : selfMember.flags) ?? 0;
|
||||
const COMPLETED_ONBOARDING = GuildMemberFlags.COMPLETED_ONBOARDING;
|
||||
const hasFlag2 = Reflect.apply(hasFlag, flagUtilsModule, [r4, COMPLETED_ONBOARDING]);
|
||||
if (hasFlag2) {
|
||||
value = importDefault(6606) /* metro dependency 6606: GuildOnboardingActionCreators */;
|
||||
value.finishOnboarding(env1_0);
|
||||
env0_0();
|
||||
value = false;
|
||||
r0 = value;
|
||||
} else {
|
||||
r0 = !hasFlag2;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,80 @@
|
||||
/* Metro module 6770; source: modules/guild_onboarding/native/ApplicationConnectionCard.tsx; dependencies: [31, 4234, 661, 33, 566, 6771, 6772, 1244, 6774, 6780, 683, 4863, 6785, 2] */
|
||||
function _fun53320(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#53320, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6948:6, offset: 0x01345ca6, size: 178 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 applicationStore = importDefault(4234) /* metro dependency 4234: ApplicationStore */;
|
||||
const env0_5 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
|
||||
const env0_6 = (require(33) /* metro dependency 33 */).jsx;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_onboarding/native/ApplicationConnectionCard.tsx');
|
||||
exports.default = ApplicationConnectionCard;
|
||||
}
|
||||
|
||||
function ApplicationConnectionCard({connection, guildId, location}) { // fn#53321, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6948:261, offset: 0x01345d58, size: 478 bytes, params: 2, frame: 29
|
||||
var r10;
|
||||
var intl;
|
||||
const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStores([ApplicationStore], _fun53322,
|
||||
[connection.application_id]);
|
||||
const env0_3 = value3;
|
||||
const analyticsLocations = (importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */)(location).analyticsLocations;
|
||||
let binding = env0_3;
|
||||
binding.useEffect(_fun53323, [value3, connection.application_id]);
|
||||
const name = value3?.name;
|
||||
if (name != null) {
|
||||
r10 = name;
|
||||
} else {
|
||||
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
r10 = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.cgPbaZ);
|
||||
}
|
||||
const {hasAlreadyLinked, canStartAuthorization, startAuthorization,
|
||||
fetched} = (importDefault(6774) /* metro dependency 6774: useStartAuthorize */)(value3);
|
||||
const GameIcon = importDefault(6780) /* metro dependency 6780: GameIcon */;
|
||||
const GameIconSizes = (require(6780) /* metro dependency 6780: GameIcon */).GameIconSizes;
|
||||
const SMALL = GameIconSizes.SMALL;
|
||||
const gameIcon = <GameIcon game={value3} size={SMALL} />;
|
||||
binding = env0_3;
|
||||
const useCallback = binding.useCallback;
|
||||
return ((Component) => <Component displayName={r10} description={connection.description} icon={gameIcon} isLoading={!fetched} isConnected={hasAlreadyLinked} canConnect={canStartAuthorization} onConnect={Reflect.apply(useCallback,
|
||||
binding, [_fun53325, [startAuthorization, guildId, connection.application_id, location,
|
||||
analyticsLocations]])} />)(importDefault(6785) /* metro dependency 6785: ConnectionCardView */);
|
||||
}
|
||||
|
||||
function _fun53322() { // fn#53322, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6948:373, offset: 0x01345f36, size: 52 bytes, params: 1, frame: 12
|
||||
const application_id = connection.application_id;
|
||||
const value2 = null;
|
||||
return value2 != application_id ? ApplicationStore.getApplication(connection.application_id) : value2;
|
||||
}
|
||||
|
||||
function _fun53323() { // fn#53323, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6948:506, offset: 0x01345f6a, size: 163 bytes, params: 1, frame: 13
|
||||
var environment;
|
||||
var value7;
|
||||
var moduleValue;
|
||||
let r1 = env0_3 != null || connection.application_id == null;
|
||||
r1 = !r1 ? ApplicationStore.isFetchingApplication(connection.application_id) : r1;
|
||||
r1 = !r1 ? ApplicationStore.didFetchingApplicationFail(connection.application_id) : r1;
|
||||
if (!r1) {
|
||||
value7 = environment.__proto__;
|
||||
moduleValue = require(6772) /* metro dependency 6772: ApplicationActionCreators */;
|
||||
moduleValue.fetchApplication(connection.application_id).catch(function() {
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function _fun53325() { // fn#53325, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6948:963, offset: 0x0134600d, size: 170 bytes, params: 1, frame: 18
|
||||
let value = environment.__proto__;
|
||||
const value2 = undefined;
|
||||
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
|
||||
const track = defaultImport.track;
|
||||
const GUILD_ONBOARDING_CONNECTION_CLICKED = AnalyticEvents.GUILD_ONBOARDING_CONNECTION_CLICKED;
|
||||
const object2 = {};
|
||||
value = require(4863) /* metro dependency 4863: AppAnalyticsUtils */;
|
||||
copyDataProperties(object2, value.collectGuildAnalyticsMetadata(guildId), value);
|
||||
object2['connection_type'] = 'application';
|
||||
object2['application_id'] = connection.application_id ?? value2;
|
||||
object2['location'] = location;
|
||||
Reflect.apply(track, defaultImport, [GUILD_ONBOARDING_CONNECTION_CLICKED, object2]);
|
||||
startAuthorization({analyticsLocations: analyticsLocations});
|
||||
return value2;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,129 @@
|
||||
/* Metro module 11350; source: modules/guild_onboarding/native/ChannelsAndRolesModal.tsx; dependencies: [57, 31, 27, 1867, 5106, 33, 4501, 697, 632, 6941, 8853, 1244, 9221, 11351, 11357, 9883, 2] */
|
||||
function _fun86914(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#86914, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11536:6, offset: 0x01fa75c5, size: 358 bytes, params: 8, frame: 22
|
||||
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;
|
||||
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
|
||||
const env0_7 = (require(5106) /* metro dependency 5106: GuildOnboardingPromptsConstants */).GuildOnboardingTab;
|
||||
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 = {};
|
||||
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
|
||||
object2.screen = {flex: 1, backgroundColor: BACKGROUND_BASE_LOW};
|
||||
const object4 = {};
|
||||
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
|
||||
object4.paddingHorizontal = PX_12;
|
||||
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object4.paddingTop = PX_16;
|
||||
object2.tabBar = object4;
|
||||
const env0_10 = Reflect.apply(createStyles, value, [object2]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_onboarding/native/ChannelsAndRolesModal.tsx');
|
||||
exports.default = ChannelsAndRolesModal;
|
||||
}
|
||||
|
||||
function ChannelsAndRolesScreen({guildId, defaultTab}) { // fn#86915, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11536:368, offset: 0x01fa772b, size: 631 bytes, params: 2, frame: 27
|
||||
var object2;
|
||||
var r5;
|
||||
var value;
|
||||
const styles = useStyles();
|
||||
const useStateFromStoresModule = require(632) /* metro dependency 632: useStateFromStores */;
|
||||
const useStateFromStores = useStateFromStoresModule.useStateFromStores;
|
||||
const value2 = (importDefault(6941) /* metro dependency 6941: useGuildOnboardingAvailable */)(Reflect.apply(useStateFromStores,
|
||||
useStateFromStoresModule, [[GuildStore], function() {
|
||||
return GuildStore.getGuild(guildId);
|
||||
}]));
|
||||
const binding = undefined;
|
||||
const useState = binding.useState;
|
||||
const value5 = undefined(Reflect.apply(useState, binding,
|
||||
[defaultTab ?? (value2 ? GuildOnboardingTab.CUSTOMIZE : GuildOnboardingTab.BROWSE)]), 2);
|
||||
const property = value5[0];
|
||||
const property2 = value5[1];
|
||||
const segmentedControlStateNativeModule = require(8853) /* metro dependency 8853: SegmentedControlStateNative */;
|
||||
const useSegmentedControlState = segmentedControlStateNativeModule.useSegmentedControlState;
|
||||
object2 = {pageWidth: 0, defaultIndex: property, onSetActiveIndex: property2};
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
let string = intl.string;
|
||||
const F1VixV = (require(1244) /* metro dependency 1244: indexNative */).t.F1VixV;
|
||||
const items3 = [Reflect.apply(string, intl, [F1VixV])];
|
||||
string = intl.string;
|
||||
const MWmtj8 = (require(1244) /* metro dependency 1244: indexNative */).t.MWmtj8;
|
||||
items3[1] = Reflect.apply(string, intl, [MWmtj8]);
|
||||
object2.items = items3.map(function(a0) {
|
||||
return {id: a0, label: a0, page: null};
|
||||
});
|
||||
const value7 = Reflect.apply(useSegmentedControlState, segmentedControlStateNativeModule, [object2]);
|
||||
value7.useEffect(_fun86918, [value2, property, value7]);
|
||||
const items2 = [value2 ? <View style={styles.tabBar}>{((SegmentedControl) => <SegmentedControl state={value7} />)((require(9221) /* metro dependency 9221: SegmentedControlNative */).SegmentedControl)}</View> : null];
|
||||
const CUSTOMIZE = GuildOnboardingTab.CUSTOMIZE;
|
||||
if (property === CUSTOMIZE) {
|
||||
value = importDefault(11351) /* metro dependency 11351: CustomizeCommunity */;
|
||||
value = ((Component) => <Component setTab={property2} guildId={guildId} />)(value);
|
||||
r5 = value;
|
||||
} else {
|
||||
value = importDefault(11357) /* metro dependency 11357: ChannelBrowser */;
|
||||
value = ((Component) => <Component guildId={guildId} />)(value);
|
||||
r5 = value;
|
||||
}
|
||||
items2[1] = r5;
|
||||
return (
|
||||
<View style={styles.screen}>
|
||||
{items2}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function ChannelsAndRolesModal({guildId, defaultTab}) { // fn#86919, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11536:1168, offset: 0x01fa79fc, size: 224 bytes, params: 2, frame: 20
|
||||
const value2 = (importDefault(6941) /* metro dependency 6941: useGuildOnboardingAvailable */)((require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([GuildStore],
|
||||
function() {
|
||||
return GuildStore.getGuild(guildId);
|
||||
}));
|
||||
const ModalStackNavigator = importDefault(9883) /* metro dependency 9883: ModalStackNavigator */;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const string = intl.string;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
return (
|
||||
<ModalStackNavigator
|
||||
screenKey="channelAndRolesModal"
|
||||
title={value2 ? Reflect.apply(string, intl, [t.h9mGOP]) : Reflect.apply(string, intl, [t.et6wav])}
|
||||
render={render_86921}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun86918() { // fn#86918, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11536:803, offset: 0x01fa79a2, size: 90 bytes, params: 1, frame: 14
|
||||
var r0;
|
||||
var value2;
|
||||
var value4;
|
||||
var BROWSE;
|
||||
var setActiveIndex;
|
||||
let binding = env0_1;
|
||||
if (binding) {
|
||||
r0 = binding;
|
||||
} else {
|
||||
binding = env0_2;
|
||||
value2 = environment.__proto__;
|
||||
r0 = binding !== GuildOnboardingTab.CUSTOMIZE;
|
||||
}
|
||||
if (!r0) {
|
||||
binding = env0_3;
|
||||
value4 = environment.__proto__;
|
||||
BROWSE = GuildOnboardingTab.BROWSE;
|
||||
binding(BROWSE);
|
||||
binding = env0_4;
|
||||
setActiveIndex = binding.setActiveIndex;
|
||||
BROWSE = GuildOnboardingTab.BROWSE;
|
||||
Reflect.apply(setActiveIndex, binding, [BROWSE, false]);
|
||||
}
|
||||
}
|
||||
|
||||
function ChannelsAndRolesModalRender() { // fn#86921, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11536:1443, owner: ChannelsAndRolesModal.render, offset: 0x01fa7adc, size: 43 bytes, params: 1, frame: 14
|
||||
return <ChannelsAndRolesScreen guildId={guildId} defaultTab={defaultTab} />;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
/* Metro module 6769; source: modules/guild_onboarding/native/ConnectionCard.tsx; dependencies: [31, 5106, 33, 6770, 6786, 2] */
|
||||
function _fun53318(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#53318, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6947:6, offset: 0x01345b68, size: 154 bytes, params: 8, frame: 18
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
importAll(31) /* metro dependency 31 */;
|
||||
const env0_2 = (require(5106) /* metro dependency 5106: GuildOnboardingPromptsConstants */).OnboardingConnectionType;
|
||||
const env0_3 = (require(33) /* metro dependency 33 */).jsx;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_onboarding/native/ConnectionCard.tsx');
|
||||
exports.default = ConnectionCard;
|
||||
}
|
||||
|
||||
function ConnectionCard({connection, guildId, location}) { // fn#53319, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6947:247, offset: 0x01345c02, size: 164 bytes, params: 2, frame: 18
|
||||
const connection_type = connection.connection_type;
|
||||
const APPLICATION = OnboardingConnectionType.APPLICATION;
|
||||
if (APPLICATION === connection_type) {
|
||||
return ((Component) => <Component connection={connection} guildId={guildId} location={location} />)(importDefault(6770) /* metro dependency 6770: ApplicationConnectionCard */);
|
||||
}
|
||||
const PROVIDER_CONNECTED_ACCOUNT = OnboardingConnectionType.PROVIDER_CONNECTED_ACCOUNT;
|
||||
if (PROVIDER_CONNECTED_ACCOUNT === connection_type) {
|
||||
return ((Component) => <Component connection={connection} guildId={guildId} location={location} />)(importDefault(6786) /* metro dependency 6786: ProviderConnectionCard */);
|
||||
}
|
||||
connection.connection_type;
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,72 @@
|
||||
/* Metro module 6785; source: modules/guild_onboarding/native/ConnectionCardView.tsx; dependencies: [31, 27, 33, 4501, 697, 4573, 1244, 4073, 4578, 2] */
|
||||
function _fun53429(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#53429, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6963:6, offset: 0x013489c3, size: 502 bytes, params: 8, frame: 23
|
||||
var object3;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
importAll(31) /* metro dependency 31 */;
|
||||
let value = require(27) /* metro dependency 27 */;
|
||||
const env0_2 = value.View;
|
||||
const env0_3 = value.ActivityIndicator;
|
||||
value = require(33) /* metro dependency 33 */;
|
||||
const env0_4 = value.jsx;
|
||||
const env0_5 = value.jsxs;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
object3 = {};
|
||||
const object4 = {};
|
||||
const BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
|
||||
object4.backgroundColor = BACKGROUND_SURFACE_HIGH;
|
||||
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.md;
|
||||
object4.borderWidth = 1;
|
||||
const BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
|
||||
object4.borderColor = BORDER_SUBTLE;
|
||||
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object4.padding = PX_16;
|
||||
let PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
|
||||
object4.marginBottom = PX_12;
|
||||
object4.flexDirection = 'row';
|
||||
object4.alignItems = 'center';
|
||||
object4.justifyContent = 'space-between';
|
||||
object3.card = object4;
|
||||
PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
|
||||
object3.leftContent = {'flexDirection': 'row', 'alignItems': 'center', 'flex': 1, marginRight: PX_12};
|
||||
PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
|
||||
object3.icon = {'width': 32, 'height': 32, 'marginRight': null, 'justifyContent': 'center', 'alignItems': 'center',
|
||||
marginRight: PX_12};
|
||||
object3.textContent = {flex: 1};
|
||||
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
object3.connectedStatus = {'flexDirection': 'row', 'alignItems': 'center', gap: PX_8};
|
||||
const env0_6 = Reflect.apply(createStyles, value, [object3]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_onboarding/native/ConnectionCardView.tsx');
|
||||
exports.default = ConnectionCardView;
|
||||
}
|
||||
|
||||
function ConnectionCardView({displayName, description, icon, isLoading, isConnected, canConnect, onConnect}) { // fn#53430, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6963:872, offset: 0x01348bb9, size: 644 bytes, params: 2, frame: 29
|
||||
var r5;
|
||||
var Button;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
var value;
|
||||
const styles = useStyles();
|
||||
const view = <View style={styles.icon}>{icon}</View>;
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
const view2 = <View style={styles.leftContent}>{view}<View style={styles.textContent}><Text variant="text-md/medium" color="text-strong">{displayName}</Text>{description != null && description.length > 0 && <Text variant="text-sm/normal" color="text-subtle">{description}</Text>}</View></View>;
|
||||
if (isLoading) {
|
||||
r5 = <ActivityIndicator size="small" />;
|
||||
} else if (isConnected) {
|
||||
var viewBinding2Props = {style: styles.connectedStatus};
|
||||
value = <Text variant="text-sm/medium" color="text-feedback-positive">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['LV+CXH'])}</Text>;
|
||||
value = <View {...viewBinding2Props}>{value}{((CircleCheckIcon) => <CircleCheckIcon size="sm" color="status-positive" />)((require(4073) /* metro dependency 4073: CircleCheckIcon */).CircleCheckIcon)}</View>;
|
||||
r5 = value;
|
||||
} else {
|
||||
Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
|
||||
r5 = <Button variant="primary" size="sm" onPress={onConnect} text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.S0W8Z5)} disabled={!canConnect} />;
|
||||
}
|
||||
return (
|
||||
<View style={styles.card}>
|
||||
{view2}
|
||||
{r5}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,672 @@
|
||||
/* Metro module 11351; source: modules/guild_onboarding/native/CustomizeCommunity.tsx; dependencies: [31, 27, 6540, 1867, 4605, 3969, 6603, 5106, 661, 1881, 4865, 33, 4501, 697, 6597, 3866, 4048, 566, 11352, 11353, 1305, 1244, 4573, 5105, 6734, 6769, 6789, 1585, 11354, 6602, 5097, 6606, 6739, 1423, 1360, 3860, 4017, 4504, 11355, 4080, 6744, 1962, 5278, 6759, 6735, 2] */
|
||||
function _fun86922(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#86922, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11537:6, offset: 0x01fa7b07, size: 1741 bytes, params: 8, frame: 32
|
||||
var object2;
|
||||
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 env0_6 = value.ScrollView;
|
||||
const emojiStore = importDefault(6540) /* metro dependency 6540: EmojiStore */;
|
||||
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
|
||||
const readStateStore = importDefault(4605) /* metro dependency 4605: ReadStateStore */;
|
||||
const selectedGuildStore = importDefault(3969) /* metro dependency 3969: SelectedGuildStore */;
|
||||
const guildOnboardingPromptsStore = importDefault(6603) /* metro dependency 6603: GuildOnboardingPromptsStore */;
|
||||
value = require(5106) /* metro dependency 5106: GuildOnboardingPromptsConstants */;
|
||||
const env0_12 = value.GuildOnboardingTab;
|
||||
const env0_13 = value.OnboardingPromptType;
|
||||
const Fonts = (require(661) /* metro dependency 661: Constants */).Fonts;
|
||||
const env0_14 = (require(1881) /* metro dependency 1881: EmojiConstants */).EMOJI_URL_BASE_SIZE;
|
||||
const env0_15 = (require(4865) /* metro dependency 4865: ReadStateConstants */).ReadStateTypes;
|
||||
value = require(33) /* metro dependency 33 */;
|
||||
const env0_16 = value.jsx;
|
||||
const env0_17 = value.jsxs;
|
||||
const env0_18 = value.Fragment;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
object2 = {};
|
||||
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object2.container = {paddingHorizontal: PX_16};
|
||||
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object2.sheetTitle = {marginTop: PX_16};
|
||||
const object3 = {position: 'relative'};
|
||||
const BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
|
||||
object3.backgroundColor = BACKGROUND_SURFACE_HIGH;
|
||||
let PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
|
||||
object3.marginTop = PX_12;
|
||||
PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
|
||||
object3.padding = PX_12;
|
||||
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.md;
|
||||
object3.borderWidth = 2;
|
||||
object3.borderStyle = 'solid';
|
||||
object2.promptContainer = object3;
|
||||
PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
|
||||
object2.titleContainer = {'flexDirection': 'row', 'alignItems': 'center', marginBottom: PX_12};
|
||||
const object5 = {};
|
||||
const textStyles = importDefault(6597) /* metro dependency 6597: TextStyles */;
|
||||
const PRIMARY_SEMIBOLD = Fonts.PRIMARY_SEMIBOLD;
|
||||
let MOBILE_TEXT_HEADING_PRIMARY = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_TEXT_HEADING_PRIMARY;
|
||||
copyDataProperties(object5, textStyles(PRIMARY_SEMIBOLD, MOBILE_TEXT_HEADING_PRIMARY, 16), undefined);
|
||||
object2.prompt = object5;
|
||||
object2.badge = {'position': 'absolute', 'top': -6, 'right': -6};
|
||||
object2.badgeText = {fontWeight: 'bold'};
|
||||
const object7 = {};
|
||||
object7.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
|
||||
const BACKGROUND_BASE_LOWEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWEST;
|
||||
object7.backgroundColor = BACKGROUND_BASE_LOWEST;
|
||||
let PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
object7.padding = PX_8;
|
||||
const PX_32 = (importDefault(697) /* metro dependency 697: native */).space.PX_32;
|
||||
object7.paddingRight = PX_32;
|
||||
object7.minHeight = 48;
|
||||
PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
|
||||
object7.marginBottom = PX_12;
|
||||
object7.display = 'flex';
|
||||
object7.flexDirection = 'row';
|
||||
object7.flexWrap = 'wrap';
|
||||
object7.alignItems = 'center';
|
||||
object7.position = 'relative';
|
||||
object2.dropdownContainer = object7;
|
||||
const object12 = {};
|
||||
PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
|
||||
object12.marginVertical = PX_12;
|
||||
let PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
|
||||
object12.marginLeft = PX_4;
|
||||
object2.emptyDropdownText = object12;
|
||||
const object14 = {};
|
||||
object14.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
|
||||
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
|
||||
object14.backgroundColor = BACKGROUND_BASE_LOW;
|
||||
object14.padding = 6;
|
||||
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
object14.marginRight = PX_8;
|
||||
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
object14.marginTop = PX_8;
|
||||
object14.display = 'flex';
|
||||
object14.flexDirection = 'row';
|
||||
object14.alignItems = 'center';
|
||||
object2.dropdownPill = object14;
|
||||
object2.emojiContainer = {'display': 'flex', 'alignItems': 'center'};
|
||||
const object17 = {position: 'absolute'};
|
||||
PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
|
||||
object17.right = PX_4;
|
||||
PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
|
||||
object17.top = PX_12;
|
||||
object2.dropdownIconContainer = object17;
|
||||
object2.dropdownIcon = {'height': 32, 'width': 32};
|
||||
object2.optionTextEmoji = {'fontSize': 18, 'lineHeight': 22, 'marginRight': 6};
|
||||
object2.optionImageEmoji = {'height': 22, 'width': 22, 'marginRight': 6};
|
||||
PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
|
||||
object2.helpText = {marginTop: PX_4};
|
||||
const object18 = {};
|
||||
const PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
|
||||
object18.marginTop = PX_24;
|
||||
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object18.marginBottom = PX_16;
|
||||
object18.height = 1;
|
||||
const BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
|
||||
object18.backgroundColor = BORDER_SUBTLE;
|
||||
object2.sectionSeparator = object18;
|
||||
object2.emptyContainer = {'height': 400, 'display': 'flex', 'alignItems': 'center', 'justifyContent': 'center'};
|
||||
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object2.emptyContainerImage = {'width': 120, 'height': 80, marginBottom: PX_16};
|
||||
const object19 = {};
|
||||
const value3 = textStyles;
|
||||
const DISPLAY_SEMIBOLD = Fonts.DISPLAY_SEMIBOLD;
|
||||
MOBILE_TEXT_HEADING_PRIMARY = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_TEXT_HEADING_PRIMARY;
|
||||
copyDataProperties(object19, value3(DISPLAY_SEMIBOLD, MOBILE_TEXT_HEADING_PRIMARY, 18), undefined);
|
||||
PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
|
||||
object19['marginBottom'] = PX_4;
|
||||
object2.emptyContainerHeader = object19;
|
||||
const object20 = {};
|
||||
const value4 = textStyles;
|
||||
const DISPLAY_MEDIUM = Fonts.DISPLAY_MEDIUM;
|
||||
const TEXT_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_SUBTLE;
|
||||
copyDataProperties(object20, value4(DISPLAY_MEDIUM, TEXT_SUBTLE, 14), undefined);
|
||||
object2.emptyContainerSubheader = object20;
|
||||
PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
|
||||
object2.connectionsContainer = {marginTop: PX_12};
|
||||
PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
|
||||
object2.connectionsPromptContainer = {marginTop: PX_12};
|
||||
PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
|
||||
object2.connectionsTitle = {marginBottom: PX_4};
|
||||
const env0_19 = Reflect.apply(createStyles, value, [object2]);
|
||||
object2 = {code: 'function CustomizeCommunityTsx1(){const{isNew,brandColor,withSequence,withTiming,Easing,withDelay}=this.__closure;const rawBorderColor=isNew?brandColor+"FF":brandColor+"00";const borderColor=withSequence(withTiming(rawBorderColor,{duration:1,easing:Easing.in(Easing.ease)}),withDelay(500,withTiming(brandColor+"00",{duration:300,easing:Easing.out(Easing.ease)})));return{borderColor:borderColor};}'};
|
||||
object2 = {code: 'function CustomizeCommunityTsx2(){const{isNew,brandColor,withSequence,withTiming,Easing,withDelay}=this.__closure;const rawBorderColor=isNew?brandColor+"FF":brandColor+"00";const borderColor=withSequence(withTiming(rawBorderColor,{duration:1,easing:Easing.in(Easing.ease)}),withDelay(500,withTiming(brandColor+"00",{duration:300,easing:Easing.out(Easing.ease)})));return{borderColor:borderColor};}'};
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_onboarding/native/CustomizeCommunity.tsx');
|
||||
exports.default = CustomizeCommunity;
|
||||
}
|
||||
|
||||
function EmptyCustomizeCommunity({setTab}) { // fn#86923, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11537:2605, offset: 0x01fa81d4, size: 436 bytes, params: 2, frame: 27
|
||||
const styles = useStyles();
|
||||
const isThemeDark2 = require(dependencyMap[15]).isThemeDark(importDefault(dependencyMap[16])());
|
||||
const env0_1 = require(dependencyMap[17]).useStateFromStores([SelectedGuildStore], function() {
|
||||
return SelectedGuildStore.getGuildId();
|
||||
});
|
||||
const items2 = [<Image style={styles.emptyContainerImage} source={importDefault(isThemeDark2 ? dependencyMap[18] : dependencyMap[19])} />];
|
||||
const LegacyText = require(dependencyMap[20]).LegacyText;
|
||||
const intl = require(dependencyMap[21]).intl;
|
||||
items2[1] = <LegacyText style={styles.emptyContainerHeader}>{intl.string(require(dependencyMap[21]).t.leKHQz)}</LegacyText>;
|
||||
items2[2] = <LegacyText style={styles.emptyContainerSubheader}>{intl.format(require(dependencyMap[21]).t['jH+ktB'],
|
||||
{onBrowseChannels: onBrowseChannels})}</LegacyText>;
|
||||
return (
|
||||
<View style={styles.emptyContainer}>
|
||||
{items2}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function PromptTitle({item}) { // fn#86926, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11537:3116, offset: 0x01fa83c4, size: 204 bytes, params: 2, frame: 22
|
||||
const styles = useStyles();
|
||||
const LegacyText = (require(1305) /* metro dependency 1305: native */).LegacyText;
|
||||
return (
|
||||
<View style={styles.titleContainer}>
|
||||
<LegacyText style={styles.prompt} accessibilityRole="header">
|
||||
{item.title}
|
||||
{item.required ? ((Text) => <Text variant="text-md/bold" color="text-feedback-critical">{' '}{'*'}</Text>)((require(4573) /* metro dependency 4573: Text */).Text) : null}
|
||||
</LegacyText>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function PromptHelpText({guildId, prompt, selectedOptionIds}) { // fn#86927, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11537:3397, offset: 0x01fa8490, size: 376 bytes, params: 2, frame: 21
|
||||
const styles = useStyles();
|
||||
const guild = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildStore], function() {
|
||||
return GuildStore.getGuild(guildId);
|
||||
});
|
||||
const r2 = prompt == null || prompt.options == null ? undefined : prompt.options.filter(function(a0) {
|
||||
return selectedOptionIds.includes(a0.id);
|
||||
});
|
||||
let binding = env0_3;
|
||||
let useMemo = binding.useMemo;
|
||||
const value5 = Reflect.apply(useMemo, binding, [_fun86930, [r2]]);
|
||||
binding = env0_3;
|
||||
useMemo = binding.useMemo;
|
||||
const {helpText,
|
||||
helpTextAdditional} = (importDefault(6734) /* metro dependency 6734: usePromptHelpText */)({guild: guild,
|
||||
prompt: prompt, selectedRoleIds: value5, selectedChannelIds: Reflect.apply(useMemo, binding, [_fun86931, [r2]]),
|
||||
itemHook: itemHook});
|
||||
if (helpText !== '') {
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
return (
|
||||
<Text
|
||||
style={styles.helpText}
|
||||
variant="text-xs/medium"
|
||||
color="text-default"
|
||||
>
|
||||
{helpText}
|
||||
{' '}
|
||||
{helpTextAdditional}
|
||||
</Text>
|
||||
);
|
||||
} else if (helpTextAdditional === '') {
|
||||
return null;
|
||||
} else {
|
||||
const Text2 = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
return (
|
||||
<Text2
|
||||
style={styles.helpText}
|
||||
variant="text-xs/medium"
|
||||
color="text-default"
|
||||
>
|
||||
{helpText}
|
||||
{' '}
|
||||
{helpTextAdditional}
|
||||
</Text2>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
function ConnectionsPrompt({guildId}) { // fn#86933, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11537:4100, offset: 0x01fa86f5, size: 382 bytes, params: 2, frame: 28
|
||||
var r0;
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
var string;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
var items2;
|
||||
const styles = useStyles();
|
||||
const connections = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildOnboardingPromptsStore],
|
||||
function() {
|
||||
return GuildOnboardingPromptsStore.getConnections(guildId);
|
||||
});
|
||||
if (connections.length === 0) {
|
||||
r0 = null;
|
||||
} else {
|
||||
var viewBindingProps = {style: styles.connectionsPromptContainer};
|
||||
string = intl.string;
|
||||
items2 = [<Text style={styles.connectionsTitle} variant="text-md/semibold" color="mobile-text-heading-primary">{Reflect.apply(string,
|
||||
|
||||
intl, [t.eDVMrA])}</Text>];
|
||||
string = intl.string;
|
||||
items2[1] = <Text variant="text-xs/medium" color="text-muted">{Reflect.apply(string, intl, [t.BozOXu])}</Text>;
|
||||
items2[2] = <View style={styles.connectionsContainer}>{connections.map(_fun86935)}</View>;
|
||||
r0 = <View {...viewBindingProps}>{items2}</View>;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function DropdownOption_86936({option}) { // fn#86936, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11537:4694, offset: 0x01fa88e2, size: 432 bytes, params: 2, frame: 29
|
||||
var Emoji;
|
||||
const styles = useStyles();
|
||||
const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStores([EmojiStore], _fun86937);
|
||||
let r6 = option.emoji?.id != null || option.emoji?.name != null;
|
||||
if (r6) {
|
||||
var viewBinding2Props = {style: styles.emojiContainer};
|
||||
Emoji = importDefault(6739) /* metro dependency 6739: Emoji */;
|
||||
r6 = <View {...viewBinding2Props}><Emoji textEmojiStyle={styles.optionTextEmoji} fastImageStyle={styles.optionImageEmoji} src={value3 != null ? (importDefault(1423) /* metro dependency 1423: AvatarUtils */).getEmojiURL({id: value3.id,
|
||||
|
||||
animated: value3.animated,
|
||||
size: EMOJI_URL_BASE_SIZE}) : undefined} name={option.emoji?.name ?? ''} /></View>;
|
||||
}
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
return (
|
||||
<View style={styles.dropdownPill}>
|
||||
{r6}
|
||||
<Text variant="text-md/semibold">
|
||||
{option.title}
|
||||
</Text>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function DropdownPrompt_86938({guildId, prompt}) { // fn#86938, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11537:5763, offset: 0x01fa8ae4, size: 998 bytes, params: 2, frame: 33
|
||||
var object2;
|
||||
var r6;
|
||||
var TextBadge;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const styles = useStyles();
|
||||
let isNew = prompt.isNew;
|
||||
const value2 = (require(566) /* metro dependency 566: flux */).useStateFromStoresArray([GuildOnboardingPromptsStore],
|
||||
function() {
|
||||
return GuildOnboardingPromptsStore.getOnboardingResponsesForPrompt(guildId, prompt.id);
|
||||
});
|
||||
const env0_3 = value2;
|
||||
const value3 = value2.map(function(a0) {
|
||||
var env0_0 = a0;
|
||||
return prompt.options.find(_fun86941);
|
||||
});
|
||||
const value4 = value3.filter((require(1360) /* metro dependency 1360: GlobalUtils */).isNotNullish);
|
||||
const useTokenModule = require(3860) /* metro dependency 3860: useToken */;
|
||||
const useToken = useTokenModule.useToken;
|
||||
const BACKGROUND_BRAND = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BRAND;
|
||||
const value5 = Reflect.apply(useToken, useTokenModule, [BACKGROUND_BRAND]);
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
|
||||
const closure = DropdownPrompt_86938C;
|
||||
object2 = {isNew: isNew, brandColor: value5};
|
||||
object2.withSequence = reanimatedRexportModule.withSequence;
|
||||
object2.withTiming = (require(4504) /* metro dependency 4504: timing */).withTiming;
|
||||
const Easing = reanimatedRexportModule.Easing;
|
||||
object2.Easing = Easing;
|
||||
object2.withDelay = reanimatedRexportModule.withDelay;
|
||||
closure.__closure = object2;
|
||||
closure.__workletHash = 16609373875235;
|
||||
closure.__initData = env0_20;
|
||||
const value6 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
|
||||
const value7 = env0_3.useCallback(_fun86943, [guildId, prompt,
|
||||
(importDefault(11355) /* metro dependency 11355: useBatchUpdateSelectOption */)(guildId).handleSelectOption,
|
||||
value2.length]);
|
||||
const View2 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
|
||||
const items4 = [styles.promptContainer, value6];
|
||||
isNew = prompt.isNew;
|
||||
if (isNew) {
|
||||
TextBadge = (require(1305) /* metro dependency 1305: native */).TextBadge;
|
||||
r6 = <TextBadge color={(require(1305) /* metro dependency 1305: native */).BadgeColors.BRAND} text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.y2b7CA)} style={styles.badge} textStyle={styles.badgeText} />;
|
||||
} else {
|
||||
r6 = isNew;
|
||||
}
|
||||
const items2 = [r6];
|
||||
items2[1] = <PromptTitle item={prompt} />;
|
||||
const PressableHighlight = (require(5278) /* metro dependency 5278: Pressables */).PressableHighlight;
|
||||
const items3 = [value4.length === 0 && ((Text) => <Text style={styles.emptyDropdownText} variant="text-sm/normal" color="text-muted">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.GmSvdA)}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)];
|
||||
items3[1] = value4.map(_fun86945);
|
||||
items3[2] = <View style={styles.dropdownIconContainer}><Image style={styles.dropdownIcon} source={importDefault(6759) /* metro dependency 6759 */} /></View>;
|
||||
items2[2] = <PressableHighlight style={styles.dropdownContainer} onPress={value7}>{items3}</PressableHighlight>;
|
||||
items2[3] = <PromptHelpText guildId={guildId} prompt={prompt} selectedOptionIds={value2} />;
|
||||
return (
|
||||
<View2 style={items4}>
|
||||
{items2}
|
||||
</View2>
|
||||
);
|
||||
}
|
||||
|
||||
function MultipleChoicePrompt_86946({guildId, prompt}) { // fn#86946, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11537:7906, offset: 0x01fa9164, size: 631 bytes, params: 2, frame: 28
|
||||
var object2;
|
||||
var r7;
|
||||
var TextBadge;
|
||||
var intl;
|
||||
const styles = useStyles();
|
||||
let isNew = prompt.isNew;
|
||||
const value2 = (require(566) /* metro dependency 566: flux */).useStateFromStoresArray([GuildOnboardingPromptsStore],
|
||||
function() {
|
||||
return GuildOnboardingPromptsStore.getOnboardingResponsesForPrompt(guildId, prompt.id);
|
||||
});
|
||||
const env0_4 = (importDefault(11355) /* metro dependency 11355: useBatchUpdateSelectOption */)(guildId).handleSelectOption;
|
||||
const useTokenModule = require(3860) /* metro dependency 3860: useToken */;
|
||||
const useToken = useTokenModule.useToken;
|
||||
const BACKGROUND_BRAND = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BRAND;
|
||||
const value3 = Reflect.apply(useToken, useTokenModule, [BACKGROUND_BRAND]);
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
|
||||
const closure = MultipleChoicePrompt_86946O;
|
||||
object2 = {isNew: isNew, brandColor: value3};
|
||||
object2.withSequence = reanimatedRexportModule.withSequence;
|
||||
object2.withTiming = (require(4504) /* metro dependency 4504: timing */).withTiming;
|
||||
const Easing = reanimatedRexportModule.Easing;
|
||||
object2.Easing = Easing;
|
||||
object2.withDelay = reanimatedRexportModule.withDelay;
|
||||
closure.__closure = object2;
|
||||
closure.__workletHash = 12802766002208;
|
||||
closure.__initData = env0_21;
|
||||
const value4 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
|
||||
const View = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
|
||||
const items3 = [styles.promptContainer, value4];
|
||||
isNew = prompt.isNew;
|
||||
if (isNew) {
|
||||
TextBadge = (require(1305) /* metro dependency 1305: native */).TextBadge;
|
||||
var textBadgeProps = {color: (require(1305) /* metro dependency 1305: native */).BadgeColors.BRAND};
|
||||
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
textBadgeProps.text = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.y2b7CA);
|
||||
textBadgeProps.style = styles.badge;
|
||||
textBadgeProps.textStyle = styles.badgeText;
|
||||
r7 = <TextBadge {...textBadgeProps} />;
|
||||
} else {
|
||||
r7 = isNew;
|
||||
}
|
||||
const items2 = [r7];
|
||||
items2[1] = <PromptTitle item={prompt} />;
|
||||
const options = prompt.options;
|
||||
items2[2] = options.map(_fun86949);
|
||||
items2[3] = <PromptHelpText guildId={guildId} prompt={prompt} selectedOptionIds={value2} />;
|
||||
return (
|
||||
<View style={items3}>
|
||||
{items2}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function CustomizeCommunity({guildId, setTab}) { // fn#86951, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11537:9266, offset: 0x01fa95f9, size: 1023 bytes, params: 2, frame: 36
|
||||
var r7;
|
||||
var scrollView;
|
||||
var object;
|
||||
var jsxRuntimeEnv0_18Binding;
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
var items4;
|
||||
var map;
|
||||
var items2;
|
||||
var value10;
|
||||
var string;
|
||||
var items3;
|
||||
var object3;
|
||||
const styles = useStyles();
|
||||
const bottom = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)().bottom;
|
||||
const value2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([ReadStateStore], function() {
|
||||
return ReadStateStore.hasUnread(guildId, ReadStateTypes.GUILD_ONBOARDING_QUESTION);
|
||||
});
|
||||
const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildStore], _fun86953);
|
||||
const {onboardingPromptsRaw, newOnboardingPrompts, onboardingPromptsWithNewAnswers, newAnswersCount,
|
||||
onboardingPrompts} = (importDefault(11354) /* metro dependency 11354: useSortedOnboardingPrompts */)(guildId);
|
||||
env0_3.useEffect(_fun86954, [guildId, value2, value3]);
|
||||
env0_3.useEffect(function() {
|
||||
if (guildId != null) {
|
||||
return _fun86956;
|
||||
}
|
||||
}, [guildId]);
|
||||
const value5 = env0_3.useCallback(_fun86957, [guildId]);
|
||||
let length = onboardingPromptsRaw.length;
|
||||
if (length === 0) {
|
||||
var scrollViewBindingProps = {style: styles.container};
|
||||
object3 = {};
|
||||
object3.paddingBottom = bottom + (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
scrollViewBindingProps.contentContainerStyle = object3;
|
||||
scrollView = <ScrollView {...scrollViewBindingProps}><EmptyCustomizeCommunity setTab={setTab} /></ScrollView>;
|
||||
} else {
|
||||
var scrollViewBindingProps = {style: styles.container};
|
||||
object = {};
|
||||
object.paddingBottom = bottom + (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
scrollViewBindingProps.contentContainerStyle = object;
|
||||
length = newOnboardingPrompts.length;
|
||||
r7 = length > 0 || onboardingPromptsWithNewAnswers.length > 0;
|
||||
if (r7) {
|
||||
jsxRuntimeEnv0_18Binding = jsxRuntimeEnv0_18;
|
||||
items4 = [<Text style={styles.sheetTitle} variant="text-md/medium" color="mobile-text-heading-primary">{intl.format((require(1244) /* metro dependency 1244: indexNative */).t.iB5Gqe,
|
||||
|
||||
|
||||
{count: newOnboardingPrompts.length + newAnswersCount})}</Text>];
|
||||
map = newOnboardingPrompts.map;
|
||||
items4[1] = Reflect.apply(map, newOnboardingPrompts, [value5]);
|
||||
map = onboardingPromptsWithNewAnswers.map;
|
||||
items4[2] = Reflect.apply(map, onboardingPromptsWithNewAnswers, [value5]);
|
||||
items4[3] = <View style={styles.sectionSeparator} />;
|
||||
r7 = <>{items4}</>;
|
||||
}
|
||||
items2 = [r7];
|
||||
length = onboardingPrompts.length;
|
||||
value10 = length > 0;
|
||||
if (value10) {
|
||||
jsxRuntimeEnv0_18Binding = jsxRuntimeEnv0_18;
|
||||
string = intl.string;
|
||||
items3 = [<Text style={styles.sheetTitle} variant="text-md/medium" color="mobile-text-heading-primary">{Reflect.apply(string,
|
||||
|
||||
|
||||
intl, [t.BGkaer])}</Text>];
|
||||
string = intl.string;
|
||||
items3[1] = <Text variant="text-xs/medium" color="text-muted">{Reflect.apply(string, intl,
|
||||
[t.r6Vm8T])}</Text>;
|
||||
items3[2] = onboardingPrompts.map(value5);
|
||||
r7 = <>{items3}</>;
|
||||
} else {
|
||||
r7 = value10;
|
||||
}
|
||||
items2[1] = r7;
|
||||
items2[2] = <ConnectionsPrompt guildId={guildId} />;
|
||||
scrollView = <ScrollView {...scrollViewBindingProps}>{items2}</ScrollView>;
|
||||
}
|
||||
return scrollView;
|
||||
}
|
||||
|
||||
function onBrowseChannels() { // fn#86925, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11537:3082, owner: EmptyCustomizeCommunity.onBrowseChannels, offset: 0x01fa839b, size: 41 bytes, params: 1, frame: 11
|
||||
var setTabBinding;
|
||||
if (guildId != null) {
|
||||
setTabBinding = setTab;
|
||||
value = environment.__proto__;
|
||||
setTabBinding(GuildOnboardingTab.BROWSE);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun86930() { // fn#86930, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11537:3613, offset: 0x01fa8608, size: 85 bytes, params: 1, frame: 13
|
||||
return env0_2 != null ? (require(5105) /* metro dependency 5105: GuildOnboardingUtils */).getSelectedRoleIds(env0_2) : new global.Set();
|
||||
}
|
||||
|
||||
function _fun86931() { // fn#86931, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11537:3683, offset: 0x01fa865d, size: 85 bytes, params: 1, frame: 13
|
||||
return env0_2 != null ? (require(5105) /* metro dependency 5105: GuildOnboardingUtils */).getSelectedChannelIds(env0_2) : new global.Set();
|
||||
}
|
||||
|
||||
function itemHook(a0, a1) { // fn#86932, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11537:3820, owner: PromptHelpText.itemHook, offset: 0x01fa86b2, size: 67 bytes, params: 3, frame: 15
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
return (
|
||||
<Text
|
||||
variant="text-xs/medium"
|
||||
color="mobile-text-heading-primary"
|
||||
key={a1}
|
||||
>
|
||||
{a0}
|
||||
</Text>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun86935(a0, a1) { // fn#86935, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11537:4604, offset: 0x01fa888e, size: 84 bytes, params: 3, frame: 17
|
||||
let value = environment.__proto__;
|
||||
value = importDefault(6769) /* metro dependency 6769: ConnectionCard */;
|
||||
const guildIdBinding = guildId;
|
||||
const CHANNELS_AND_ROLES = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).CHANNELS_AND_ROLES;
|
||||
return ((Component) => <Component connection={a0} guildId={guildIdBinding} location={CHANNELS_AND_ROLES} key={a1} />)(value);
|
||||
}
|
||||
|
||||
function _fun86937() { // fn#86937, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11537:4783, offset: 0x01fa8a92, size: 82 bytes, params: 1, frame: 14
|
||||
const emoji = option.emoji;
|
||||
const value2 = null;
|
||||
const value3 = undefined;
|
||||
return value2 != (value2 == emoji ? value3 : emoji.id) ? EmojiStore.getUsableCustomEmojiById(value2 == option.emoji ? value3 : option.emoji.id) : value2;
|
||||
}
|
||||
|
||||
function _fun86940(a0) { // fn#86940, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11537:5928, offset: 0x01fa8eef, size: 41 bytes, params: 2, frame: 11
|
||||
const env0_0 = a0;
|
||||
return prompt.options.find(_fun86941);
|
||||
}
|
||||
|
||||
function DropdownPrompt_86938C() { // fn#86942, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11537:6079, owner: DropdownPrompt_86938.c, offset: 0x01fa8f18, size: 321 bytes, params: 1, frame: 27
|
||||
const isNewBinding = isNew;
|
||||
const binding = env0_4;
|
||||
const r9 = isNewBinding ? '' + binding + 'FF' : '' + binding + '00';
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
const withSequence = reanimatedRexportModule.withSequence;
|
||||
const timingModule = require(4504) /* metro dependency 4504: timing */;
|
||||
let withTiming = timingModule.withTiming;
|
||||
const object = {duration: 1};
|
||||
const Easing = reanimatedRexportModule.Easing;
|
||||
const Easing2 = reanimatedRexportModule.Easing;
|
||||
object.easing = Easing.in(Easing2.ease);
|
||||
const value5 = Reflect.apply(withTiming, timingModule, [r9, object]);
|
||||
const moduleValue3 = reanimatedRexportModule;
|
||||
const withDelay = moduleValue3.withDelay;
|
||||
const moduleValue4 = timingModule;
|
||||
withTiming = moduleValue4.withTiming;
|
||||
let value = '' + env0_4 + '00';
|
||||
const out = Easing.out;
|
||||
const Easing3 = reanimatedRexportModule.Easing;
|
||||
value = Reflect.apply(withTiming, moduleValue4, [value, {duration: 300, easing: Reflect.apply(out, Easing,
|
||||
[Easing3.ease])}]);
|
||||
return {borderColor: Reflect.apply(withSequence, reanimatedRexportModule, [value5, Reflect.apply(withDelay,
|
||||
moduleValue3, [500, value])])};
|
||||
}
|
||||
|
||||
function _fun86943() { // fn#86943, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11537:6613, offset: 0x01fa9059, size: 144 bytes, params: 1, frame: 17
|
||||
var environment;
|
||||
let value = environment.__proto__;
|
||||
const defaultImport = importDefault(dependencyMap[39]);
|
||||
const openLazy = defaultImport.openLazy;
|
||||
value = require(dependencyMap[41]);
|
||||
value = value(dependencyMap[40], dependencyMap.paths);
|
||||
const promptBinding = prompt;
|
||||
Reflect.apply(openLazy, defaultImport, [value, 'DropdownOptions', {guildId: guildId, promptId: promptBinding.id,
|
||||
onSelect: onSelect_86944, canBeNew: !promptBinding.isNew, returnToCustomize: true}]);
|
||||
}
|
||||
|
||||
function _fun86945(a0) { // fn#86945, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11537:7299, offset: 0x01fa913f, size: 37 bytes, params: 2, frame: 15
|
||||
return <DropdownOption_86936 option={a0} key={a0.id} />;
|
||||
}
|
||||
|
||||
function MultipleChoicePrompt_86946O() { // fn#86948, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11537:8187, owner: MultipleChoicePrompt_86946.o, offset: 0x01fa93db, size: 321 bytes, params: 1, frame: 27
|
||||
const isNewBinding = isNew;
|
||||
const binding = env0_5;
|
||||
const r9 = isNewBinding ? '' + binding + 'FF' : '' + binding + '00';
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
const withSequence = reanimatedRexportModule.withSequence;
|
||||
const timingModule = require(4504) /* metro dependency 4504: timing */;
|
||||
let withTiming = timingModule.withTiming;
|
||||
const object = {duration: 1};
|
||||
const Easing = reanimatedRexportModule.Easing;
|
||||
const Easing2 = reanimatedRexportModule.Easing;
|
||||
object.easing = Easing.in(Easing2.ease);
|
||||
const value5 = Reflect.apply(withTiming, timingModule, [r9, object]);
|
||||
const moduleValue3 = reanimatedRexportModule;
|
||||
const withDelay = moduleValue3.withDelay;
|
||||
const moduleValue4 = timingModule;
|
||||
withTiming = moduleValue4.withTiming;
|
||||
let value = '' + env0_5 + '00';
|
||||
const out = Easing.out;
|
||||
const Easing3 = reanimatedRexportModule.Easing;
|
||||
value = Reflect.apply(withTiming, moduleValue4, [value, {duration: 300, easing: Reflect.apply(out, Easing,
|
||||
[Easing3.ease])}]);
|
||||
return {borderColor: Reflect.apply(withSequence, reanimatedRexportModule, [value5, Reflect.apply(withDelay,
|
||||
moduleValue3, [500, value])])};
|
||||
}
|
||||
|
||||
function _fun86949(a0) { // fn#86949, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11537:8919, offset: 0x01fa951c, size: 131 bytes, params: 2, frame: 20
|
||||
var environment;
|
||||
const env0_0 = a0;
|
||||
let value = environment.__proto__;
|
||||
value = importDefault(6735) /* metro dependency 6735: GuildOnboardingPromptOptionButton */;
|
||||
const binding = env0_3;
|
||||
return ((Component) => <Component guildId={guildId} option={a0} selected={binding.includes(a0.id)} onSelect={onSelect_86950} suppressMemberCount canBeNew={!prompt.isNew} key={a0.id} />)(value);
|
||||
}
|
||||
|
||||
function _fun86953() { // fn#86953, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11537:9465, offset: 0x01fa9a1e, size: 44 bytes, params: 1, frame: 11
|
||||
const value = environment.__proto__;
|
||||
return GuildStore.getGuild(guildId)?.latestOnboardingQuestionId;
|
||||
}
|
||||
|
||||
function _fun86954() { // fn#86954, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11537:9701, offset: 0x01fa9a4a, size: 95 bytes, params: 1, frame: 13
|
||||
var value4;
|
||||
var moduleValue;
|
||||
if (guildId != null && (GuildOnboardingPromptsStore.shouldFetchPrompts(guildId) || env0_1)) {
|
||||
value4 = environment.__proto__;
|
||||
moduleValue = require(6602) /* metro dependency 6602: GuildOnboardingPromptsActionCreators */;
|
||||
moduleValue.fetchOnboardingPrompts(guildId);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun86955() { // fn#86955, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11537:9804, offset: 0x01fa9aa9, size: 28 bytes, params: 1, frame: 2
|
||||
if (guildId != null) {
|
||||
return _fun86956;
|
||||
}
|
||||
}
|
||||
|
||||
function _fun86957(a0) { // fn#86957, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11537:9973, offset: 0x01fa9b28, size: 127 bytes, params: 2, frame: 17
|
||||
const type = a0.type;
|
||||
const MULTIPLE_CHOICE = OnboardingPromptType.MULTIPLE_CHOICE;
|
||||
if (MULTIPLE_CHOICE === type) {
|
||||
return (
|
||||
<MultipleChoicePrompt_86946
|
||||
guildId={guildId}
|
||||
prompt={a0}
|
||||
key={a0.id}
|
||||
/>
|
||||
);
|
||||
}
|
||||
const DROPDOWN = OnboardingPromptType.DROPDOWN;
|
||||
if (DROPDOWN === type) {
|
||||
return (
|
||||
<DropdownPrompt_86938
|
||||
guildId={guildId}
|
||||
prompt={a0}
|
||||
key={a0.id}
|
||||
/>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
function onSelect_86944(a0, a1) { // fn#86944, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11537:6712, offset: 0x01fa90e9, size: 86 bytes, params: 3, frame: 15
|
||||
var value6;
|
||||
const value = a1;
|
||||
if (!(!value && prompt.required && env1_3.length === 1)) {
|
||||
value6 = environment.__proto__;
|
||||
handleSelectOption(prompt, a0, value != null && value);
|
||||
}
|
||||
}
|
||||
|
||||
function onSelect_86950(a0) { // fn#86950, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11537:8988, offset: 0x01fa959f, size: 90 bytes, params: 2, frame: 16
|
||||
var value7;
|
||||
const value = a0;
|
||||
if (!(!value && prompt.required && env1_3.length === 1)) {
|
||||
value7 = environment.__proto__;
|
||||
handleSelectOption(prompt, env0_0, value != null && value);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun86956() { // fn#86956, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11537:9826, offset: 0x01fa9ac5, size: 99 bytes, params: 1, frame: 19
|
||||
const value = environment.__proto__.__proto__;
|
||||
const readStateActionCreatorsModule = require(5097) /* metro dependency 5097: ReadStateActionCreators */;
|
||||
const ackGuildFeature = readStateActionCreatorsModule.ackGuildFeature;
|
||||
const guildIdBinding = guildId;
|
||||
const GUILD_ONBOARDING_QUESTION = ReadStateTypes.GUILD_ONBOARDING_QUESTION;
|
||||
Reflect.apply(ackGuildFeature, readStateActionCreatorsModule, [guildIdBinding, GUILD_ONBOARDING_QUESTION,
|
||||
GuildOnboardingPromptsStore.ackIdForGuild(guildIdBinding)]);
|
||||
(importDefault(6606) /* metro dependency 6606: GuildOnboardingActionCreators */).updateOnboardingResponses(guildIdBinding);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,146 @@
|
||||
/* Metro module 6744; source: modules/guild_onboarding/native/DropdownOptionsActionSheet.tsx; dependencies: [31, 27, 6540, 6603, 1881, 33, 4501, 632, 6739, 1423, 1305, 1244, 4573, 6745, 1585, 4080, 6758, 6275, 6277, 4578, 2] */
|
||||
function _fun53207(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#53207, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6922:6, offset: 0x0134123d, size: 353 bytes, params: 8, frame: 20
|
||||
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 guildOnboardingPromptsStore = importDefault(6603) /* metro dependency 6603: GuildOnboardingPromptsStore */;
|
||||
const env0_7 = (require(1881) /* metro dependency 1881: EmojiConstants */).EMOJI_URL_BASE_SIZE;
|
||||
const value = require(33) /* metro dependency 33 */;
|
||||
const env0_8 = value.jsx;
|
||||
const env0_9 = value.jsxs;
|
||||
const env0_10 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({optionTextEmoji: {'fontSize': 24,
|
||||
'lineHeight': 24, 'paddingTop': 5}, optionImageEmoji: {'height': 24, 'width': 24},
|
||||
newBadge: {fontWeight: 'bold'}, labelRow: {'display': 'flex', 'flexDirection': 'row',
|
||||
'justifyContent': 'space-between', 'alignItems': 'center'}, closeButtonWrapper: {'marginTop': 16,
|
||||
'marginHorizontal': 16}});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_onboarding/native/DropdownOptionsActionSheet.tsx');
|
||||
exports.default = DropdownOptionsActionSheet;
|
||||
}
|
||||
|
||||
function DropdownOptionRow({option, responses, onSelect, canBeNew}) { // fn#53208, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6922:499, offset: 0x0134139e, size: 714 bytes, params: 2, frame: 30
|
||||
var r15;
|
||||
var r6;
|
||||
var r5;
|
||||
var defaultImport;
|
||||
var TextBadge;
|
||||
var intl;
|
||||
const styles = useStyles();
|
||||
const value3 = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([EmojiStore],
|
||||
_fun53209);
|
||||
const value4 = responses.includes(option.id);
|
||||
const value5 = env0_3.useCallback(_fun53210, [onSelect, option, value4]);
|
||||
if (option.emoji?.id != null) {
|
||||
defaultImport = importDefault(6739) /* metro dependency 6739: Emoji */;
|
||||
var defaultImportProps = {textEmojiStyle: styles.optionTextEmoji, fastImageStyle: styles.optionImageEmoji};
|
||||
r15 = value3 != null ? (importDefault(1423) /* metro dependency 1423: AvatarUtils */).getEmojiURL({id: value3.id,
|
||||
|
||||
animated: value3.animated, size: EMOJI_URL_BASE_SIZE}) : undefined;
|
||||
defaultImportProps.src = r15;
|
||||
r15 = option.emoji?.name ?? '';
|
||||
defaultImportProps.name = r15;
|
||||
r6 = <View style={{'display': 'flex',
|
||||
'alignItems': 'center'}}>{((Component) => <Component {...defaultImportProps} />)(defaultImport)}</View>;
|
||||
} else if (option.emoji?.name != null) {
|
||||
defaultImport = importDefault(6739) /* metro dependency 6739: Emoji */;
|
||||
var defaultImportProps = {textEmojiStyle: styles.optionTextEmoji, fastImageStyle: styles.optionImageEmoji};
|
||||
r15 = value3 != null ? (importDefault(1423) /* metro dependency 1423: AvatarUtils */).getEmojiURL({id: value3.id,
|
||||
|
||||
animated: value3.animated, size: EMOJI_URL_BASE_SIZE}) : undefined;
|
||||
defaultImportProps.src = r15;
|
||||
r15 = option.emoji?.name ?? '';
|
||||
defaultImportProps.name = r15;
|
||||
r6 = <View style={{'display': 'flex',
|
||||
'alignItems': 'center'}}>{((Component) => <Component {...defaultImportProps} />)(defaultImport)}</View>;
|
||||
} else {
|
||||
r6 = null;
|
||||
}
|
||||
if (canBeNew) {
|
||||
if (option.isUnseen) {
|
||||
TextBadge = (require(1305) /* metro dependency 1305: native */).TextBadge;
|
||||
var textBadgeProps = {color: (require(1305) /* metro dependency 1305: native */).BadgeColors.BRAND};
|
||||
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
textBadgeProps.text = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.y2b7CA);
|
||||
textBadgeProps.textStyle = styles.newBadge;
|
||||
r5 = <TextBadge {...textBadgeProps} />;
|
||||
} else {
|
||||
r5 = null;
|
||||
}
|
||||
} else {
|
||||
r5 = null;
|
||||
}
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
return ((Component) => <Component label={<View style={styles.labelRow}><Text variant="text-md/normal">{option.title}</Text>{r5}</View>} selected={value4} leading={r6} trailing={r5} onPress={value5} />)(importDefault(6745) /* metro dependency 6745: FormCheckboxRow */);
|
||||
}
|
||||
|
||||
function DropdownOptionsActionSheet({guildId, promptId, canBeNew, onSelect}) { // fn#53211, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6922:1584, offset: 0x013416d6, size: 625 bytes, params: 2, frame: 32
|
||||
const styles = useStyles();
|
||||
const bottom = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)().bottom;
|
||||
const onboardingPrompt = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([GuildOnboardingPromptsStore],
|
||||
function() {
|
||||
return GuildOnboardingPromptsStore.getOnboardingPrompt(promptId);
|
||||
});
|
||||
const env0_4 = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStoresArray([GuildOnboardingPromptsStore],
|
||||
function() {
|
||||
return GuildOnboardingPromptsStore.getOnboardingResponsesForPrompt(guildId, promptId);
|
||||
});
|
||||
const value2 = onSelect.useCallback(_fun53214, []);
|
||||
if (onboardingPrompt == null) {
|
||||
return null;
|
||||
}
|
||||
const BottomSheetTitleHeader = (require(6758) /* metro dependency 6758: BottomSheetTitleHeaderNative */).BottomSheetTitleHeader;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
let string = intl.string;
|
||||
let E2ICbC = (require(1244) /* metro dependency 1244: indexNative */).t.E2ICbC;
|
||||
const bottomSheetTitleHeader = <BottomSheetTitleHeader title={Reflect.apply(string, intl, [E2ICbC])} />;
|
||||
const BottomSheet = (require(6275) /* metro dependency 6275: BottomSheetNative */).BottomSheet;
|
||||
const BottomSheetScrollView = (require(6277) /* metro dependency 6277 */).BottomSheetScrollView;
|
||||
const object = {paddingBottom: bottom};
|
||||
const CardSection = (require(1305) /* metro dependency 1305: native */).CardSection;
|
||||
string = intl.string;
|
||||
E2ICbC = (require(1244) /* metro dependency 1244: indexNative */).t.E2ICbC;
|
||||
const cardSection = <CardSection accessibilityRole="radiogroup" accessibilityLabel={Reflect.apply(string, intl,
|
||||
[E2ICbC])}>{onboardingPrompt.options.map(_fun53215)}</CardSection>;
|
||||
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
|
||||
return (
|
||||
<BottomSheet scrollable header={bottomSheetTitleHeader}>
|
||||
<BottomSheetScrollView contentContainerStyle={object}>
|
||||
{cardSection}
|
||||
<View style={styles.closeButtonWrapper}>
|
||||
<Button
|
||||
onPress={value2}
|
||||
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.cpT0Cq)}
|
||||
grow
|
||||
/>
|
||||
</View>
|
||||
</BottomSheetScrollView>
|
||||
</BottomSheet>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun53209() { // fn#53209, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6922:624, offset: 0x01341668, size: 82 bytes, params: 1, frame: 14
|
||||
const emoji = option.emoji;
|
||||
const value2 = null;
|
||||
const value3 = undefined;
|
||||
return value2 != (value2 == emoji ? value3 : emoji.id) ? EmojiStore.getUsableCustomEmojiById(value2 == option.emoji ? value3 : option.emoji.id) : value2;
|
||||
}
|
||||
|
||||
function _fun53210() { // fn#53210, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6922:784, offset: 0x013416ba, size: 28 bytes, params: 1, frame: 13
|
||||
onSelect(option, !env0_2);
|
||||
}
|
||||
|
||||
function _fun53215(a0) { // fn#53215, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6922:2297, offset: 0x013419a7, size: 80 bytes, params: 2, frame: 17
|
||||
const Boolean = global.Boolean;
|
||||
return (
|
||||
<DropdownOptionRow
|
||||
option={a0}
|
||||
responses={env0_4}
|
||||
onSelect={onSelect}
|
||||
canBeNew={Boolean(canBeNew)}
|
||||
key={a0.id}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,311 @@
|
||||
/* Metro module 6790; source: modules/guild_onboarding/native/GuildOnboardingCompleted.tsx; dependencies: [31, 27, 4502, 1938, 1867, 1878, 6603, 33, 4501, 697, 1484, 566, 6736, 3868, 6791, 1423, 1852, 1360, 4017, 4504, 5475, 6618, 4573, 1244, 1305, 6792, 6819, 3738, 6822, 2] */
|
||||
function _fun53451(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#53451, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6968:6, offset: 0x0134b5bc, size: 747 bytes, params: 8, frame: 26
|
||||
var object2;
|
||||
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 StyleSheet = value.StyleSheet;
|
||||
const env0_4 = value.View;
|
||||
const accessibilityStore = importDefault(4502) /* metro dependency 4502: AccessibilityStore */;
|
||||
const guildRoleStore = importDefault(1938) /* metro dependency 1938: GuildRoleStore */;
|
||||
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
|
||||
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
|
||||
const guildOnboardingPromptsStore = importDefault(6603) /* metro dependency 6603: GuildOnboardingPromptsStore */;
|
||||
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 = {screen: {'flex': 1, 'position': 'relative'}, container: {'backgroundColor': 'rgba(0, 0, 0, 0.5)',
|
||||
'paddingHorizontal': 24, 'display': 'flex', 'justifyContent': 'center', 'flexGrow': 1}};
|
||||
const BACKGROUND_BASE_LOWEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWEST;
|
||||
object2.containerWithoutSplash = {backgroundColor: BACKGROUND_BASE_LOWEST};
|
||||
object2.backgroundImage = {'position': 'absolute', 'width': '100%', 'height': '100%'};
|
||||
object2.title = {};
|
||||
object2.subtitle = {marginTop: 16};
|
||||
const object3 = {'marginTop': 24, 'padding': 16, 'paddingBottom': 32};
|
||||
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
|
||||
const BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
|
||||
object3.backgroundColor = BACKGROUND_SURFACE_HIGH;
|
||||
object2.card = object3;
|
||||
object2.username = {marginTop: 16};
|
||||
object2.rolesHeader = {marginTop: 8};
|
||||
object2.roles = {'marginTop': 12, 'display': 'flex', 'flexDirection': 'row', 'flexWrap': 'wrap'};
|
||||
object2.role = {marginRight: 8};
|
||||
const object5 = {'paddingHorizontal': 8, 'height': 28, 'borderRadius': null, 'display': 'flex',
|
||||
'justifyContent': 'center'};
|
||||
object5.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
|
||||
object5.borderWidth = StyleSheet.hairlineWidth;
|
||||
let BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
|
||||
object5.borderColor = BORDER_SUBTLE;
|
||||
object2.roleOverflow = object5;
|
||||
const object6 = {'marginTop': 24, 'borderColor': null, 'borderWidth': 2, 'borderRadius': null, 'padding': 12,
|
||||
'display': 'flex', 'flexDirection': 'row', 'alignItems': 'center'};
|
||||
BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
|
||||
object6.borderColor = BORDER_SUBTLE;
|
||||
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
|
||||
object2.animation = object6;
|
||||
object2.wave = {transform: [{translateX: 24}, {rotate: '5deg'}]};
|
||||
object2.animationText = {'flexGrow': 1, 'marginLeft': 8};
|
||||
const env0_12 = Reflect.apply(createStyles, value, [object2]);
|
||||
object2 = {code: "function GuildOnboardingCompletedTsx1(){const{withSequence,withTiming,withDelay,ANIMATION_DURATION,Easing,useReducedMotion}=this.__closure;const opacity=withSequence(withTiming(0,{duration:0}),withDelay(ANIMATION_DURATION,withTiming(0.5,{duration:ANIMATION_DURATION})),withTiming(1,{duration:ANIMATION_DURATION,easing:Easing.out(Easing.ease)}));const scale=withSequence(withTiming(1,{duration:0}),withDelay(ANIMATION_DURATION,withTiming(1.5,{duration:ANIMATION_DURATION,easing:Easing.out(Easing.ease)})),withTiming(1,{duration:useReducedMotion?1:ANIMATION_DURATION,easing:Easing.out(Easing.ease)}));const rawRotation=withSequence(withTiming('0deg',{duration:0}),withDelay(ANIMATION_DURATION,withTiming('-2deg',{duration:ANIMATION_DURATION})),withTiming('-5deg',{duration:ANIMATION_DURATION}));return{opacity:opacity,transform:[{rotate:rawRotation},{scale:scale}]};}"};
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_onboarding/native/GuildOnboardingCompleted.tsx');
|
||||
exports.default = GuildOnboardingCompleted;
|
||||
}
|
||||
|
||||
function GuildOnboardingCompleted({guildId, prompts, completeOnboarding, onClose}) { // fn#53452, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6968:2290, offset: 0x0134b8a7, size: 2256 bytes, params: 2, frame: 49
|
||||
var object7;
|
||||
var r18;
|
||||
var defaultImport;
|
||||
var getGuildSplashURL;
|
||||
var object4;
|
||||
const styles = useStyles();
|
||||
const env0_3 = styles;
|
||||
const value3 = (require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation();
|
||||
const currentUser = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() {
|
||||
return UserStore.getCurrentUser();
|
||||
});
|
||||
const guild = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildStore], function() {
|
||||
return GuildStore.getGuild(guildId);
|
||||
});
|
||||
const value4 = (importDefault(6736) /* metro dependency 6736: useGuildRoleMemberCounts */)(guildId);
|
||||
const nativeModule = require(3868) /* metro dependency 3868: native */;
|
||||
const useThemeContext = nativeModule.useThemeContext;
|
||||
object7 = {backgroundColor: (require(6791) /* metro dependency 6791: useProfileThemeValuesNative */).useProfileThemeValues(Reflect.apply(useThemeContext,
|
||||
nativeModule, []).theme)?.rolePillBackgroundColor};
|
||||
if (guild != null) {
|
||||
defaultImport = importDefault(1423) /* metro dependency 1423: AvatarUtils */;
|
||||
getGuildSplashURL = defaultImport.getGuildSplashURL;
|
||||
object4 = {};
|
||||
object4.id = guild.id;
|
||||
object4.splash = guild.splash;
|
||||
object4.size = 400 * (importDefault(1852) /* metro dependency 1852: getDevicePixelRatioNative */)();
|
||||
r18 = Reflect.apply(getGuildSplashURL, defaultImport, [object4]);
|
||||
} else {
|
||||
r18 = null;
|
||||
}
|
||||
const env0_7 = (require(566) /* metro dependency 566: flux */).useStateFromStoresArray([GuildOnboardingPromptsStore],
|
||||
function() {
|
||||
return GuildOnboardingPromptsStore.getOnboardingResponses(guildId);
|
||||
}, [guildId]);
|
||||
const value11 = prompts.map(function(a0) {
|
||||
return a0.options;
|
||||
}).flat().filter(_fun53457);
|
||||
const binding = env0_3;
|
||||
const {numSharedRoleMembers, allSelectedRoleIds} = binding.useMemo(_fun53458, [value4, value11]);
|
||||
const value13 = (require(566) /* metro dependency 566: flux */).useStateFromStoresArray([GuildRoleStore],
|
||||
function() {
|
||||
return GuildRoleStore.getManyRoles(guildId, allSelectedRoleIds);
|
||||
}, [allSelectedRoleIds, guildId]);
|
||||
binding.useLayoutEffect(_fun53462, [value3]);
|
||||
binding.useEffect(function() {
|
||||
global.setTimeout(_fun53465, 3600);
|
||||
}, [completeOnboarding, onClose]);
|
||||
const useReducedMotion = (require(566) /* metro dependency 566: flux */).useStateFromStores([AccessibilityStore],
|
||||
function() {
|
||||
return AccessibilityStore.useReducedMotion;
|
||||
});
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
|
||||
const closure = GuildOnboardingCompletedB;
|
||||
const object5 = {};
|
||||
object5.withSequence = reanimatedRexportModule.withSequence;
|
||||
object5.withTiming = (require(4504) /* metro dependency 4504: timing */).withTiming;
|
||||
object5.withDelay = reanimatedRexportModule.withDelay;
|
||||
object5.ANIMATION_DURATION = 400;
|
||||
const Easing = reanimatedRexportModule.Easing;
|
||||
object5.Easing = Easing;
|
||||
object5.useReducedMotion = useReducedMotion;
|
||||
closure.__closure = object5;
|
||||
closure.__workletHash = 8282245217026;
|
||||
closure.__initData = env0_13;
|
||||
const value14 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
|
||||
if (currentUser == null) {
|
||||
return null;
|
||||
}
|
||||
if (guild == null) {
|
||||
return null;
|
||||
}
|
||||
const value15 = value13.length - 3;
|
||||
const r6 = r18 != null ? ((Component) => <Component source={{uri: r18}} style={styles.backgroundImage} />)(importDefault(5475) /* metro dependency 5475: FastImage */) : null;
|
||||
const SafeAreaPaddingView = (require(6618) /* metro dependency 6618: SafeAreaView */).SafeAreaPaddingView;
|
||||
const items10 = [styles.container];
|
||||
items10[1] = r18 == null ? styles.containerWithoutSplash : null;
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
const value17 = 'always-white';
|
||||
const r13 = r18 == null ? 'mobile-text-heading-primary' : value17;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const string = intl.string;
|
||||
const PFWIYe = (require(1244) /* metro dependency 1244: indexNative */).t.PFWIYe;
|
||||
const items11 = [<Text style={styles.title} accessibilityRole="header" variant="heading-xxl/extrabold" color={r13}>{Reflect.apply(string,
|
||||
intl, [PFWIYe])}</Text>];
|
||||
items11[1] = <Text style={styles.subtitle} accessibilityRole="header" variant="text-md/medium" color={r18 == null ? 'text-muted' : value17}>{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.og4NNr)}</Text>;
|
||||
const Avatar = (require(1305) /* metro dependency 1305: native */).Avatar;
|
||||
const AvatarSizes = (require(1305) /* metro dependency 1305: native */).AvatarSizes;
|
||||
const XXLARGE = AvatarSizes.XXLARGE;
|
||||
const items12 = [<Avatar size={XXLARGE} user={currentUser} guildId={guildId} animate={false} />];
|
||||
const object6 = {'style': null, 'variant': 'heading-xl/semibold', 'color': 'mobile-text-heading-primary'};
|
||||
let username = styles.username;
|
||||
object6.style = username;
|
||||
username = currentUser.username;
|
||||
items12[1] = <Text {...object6}>{username}</Text>;
|
||||
items12[2] = numSharedRoleMembers > 0 ? <Text style={styles.rolesHeader} variant="text-sm/normal" color="text-muted">{intl.format((require(1244) /* metro dependency 1244: indexNative */).t.l1Jc1n,
|
||||
{numSharedRoleMembers: numSharedRoleMembers})}</Text> : null;
|
||||
items12[3] = <View style={styles.roles}>{value13.slice(0,
|
||||
3).map(_fun53468)}{value15 > 0 ? <View style={[styles.roleOverflow,
|
||||
object7]}><Text variant="heading-deprecated-12/semibold" color="mobile-text-heading-primary">{'+' + value15}</Text></View> : null}</View>;
|
||||
const View2 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
|
||||
const items15 = [styles.animation, value14];
|
||||
const GuildIcon = importDefault(6819) /* metro dependency 6819: GuildIcon */;
|
||||
const GuildIconSizes = (require(6819) /* metro dependency 6819: GuildIcon */).GuildIconSizes;
|
||||
const LARGE = GuildIconSizes.LARGE;
|
||||
const items16 = [<GuildIcon guild={guild} size={LARGE} />];
|
||||
const format = intl.format;
|
||||
const FXREhf = (require(1244) /* metro dependency 1244: indexNative */).t.FXREhf;
|
||||
items16[1] = <View style={styles.animationText}><Text variant="text-sm/medium" color="mobile-text-heading-primary">{Reflect.apply(format,
|
||||
intl, [FXREhf,
|
||||
{guildName: guild.name}])}</Text><Text variant="text-xs/normal" color="text-muted">{'' + (importDefault(3738) /* metro dependency 3738 */)().format('LL')}</Text></View>;
|
||||
items16[2] = ((Component) => <Component source={importDefault(6822) /* metro dependency 6822 */} style={styles.wave} />)(importDefault(5475) /* metro dependency 5475: FastImage */);
|
||||
items12[4] = <View2 style={items15}>{items16}</View2>;
|
||||
items11[2] = <View style={styles.card}>{items12}</View>;
|
||||
return (
|
||||
<View style={styles.screen}>
|
||||
{r6}
|
||||
<SafeAreaPaddingView bottom style={items10}>
|
||||
<View>
|
||||
{items11}
|
||||
</View>
|
||||
</SafeAreaPaddingView>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun53457({id}) { // fn#53457, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6968:2882, offset: 0x0134c1bf, size: 27 bytes, params: 2, frame: 11
|
||||
return env0_7.includes(id);
|
||||
}
|
||||
|
||||
function _fun53458() { // fn#53458, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6968:2917, offset: 0x0134c1da, size: 174 bytes, params: 1, frame: 18
|
||||
var r2;
|
||||
var Math;
|
||||
var max;
|
||||
var value6;
|
||||
var items2;
|
||||
const value3 = env0_8.map(function(a0) {
|
||||
return a0.roleIds;
|
||||
}).flat();
|
||||
const value5 = value3.filter((require(1360) /* metro dependency 1360: GlobalUtils */).isNotNullish);
|
||||
let value = 0;
|
||||
if (env0_6 != null) {
|
||||
if (value5.length > value) {
|
||||
Math = global.Math;
|
||||
max = Math.max;
|
||||
value6 = value5.map(_fun53460);
|
||||
items2 = [];
|
||||
arraySpread(items2, value6, value, value);
|
||||
value = apply(max, items2, Math, value);
|
||||
r2 = value;
|
||||
} else {
|
||||
r2 = value;
|
||||
}
|
||||
} else {
|
||||
r2 = value;
|
||||
}
|
||||
return {numSharedRoleMembers: r2, allSelectedRoleIds: value5};
|
||||
}
|
||||
|
||||
function _fun53462() { // fn#53462, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6968:3266, offset: 0x0134c2c6, size: 36 bytes, params: 1, frame: 12
|
||||
env0_4.setOptions({headerLeft: function() {
|
||||
return null;
|
||||
}});
|
||||
}
|
||||
|
||||
function _fun53464() { // fn#53464, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6968:3327, offset: 0x0134c2ea, size: 31 bytes, params: 1, frame: 13
|
||||
global.setTimeout(function() {
|
||||
completeOnboarding();
|
||||
onClose();
|
||||
}, 3600);
|
||||
}
|
||||
|
||||
function GuildOnboardingCompletedB() { // fn#53467, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6968:3472, owner: GuildOnboardingCompleted.B, offset: 0x0134c32f, size: 649 bytes, params: 1, frame: 31
|
||||
var object2;
|
||||
let value = environment.__proto__;
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
let withSequence = reanimatedRexportModule.withSequence;
|
||||
const timingModule = require(4504) /* metro dependency 4504: timing */;
|
||||
let withTiming = timingModule.withTiming;
|
||||
const value2 = Reflect.apply(withTiming, timingModule, [0, {duration: 0}]);
|
||||
const moduleValue3 = reanimatedRexportModule;
|
||||
let withDelay = moduleValue3.withDelay;
|
||||
const moduleValue4 = timingModule;
|
||||
withTiming = moduleValue4.withTiming;
|
||||
const value3 = 400;
|
||||
const value4 = Reflect.apply(withDelay, moduleValue3, [value3, Reflect.apply(withTiming, moduleValue4, [0.5,
|
||||
{duration: value3}])]);
|
||||
const moduleValue5 = timingModule;
|
||||
withTiming = moduleValue5.withTiming;
|
||||
object2 = {duration: value3};
|
||||
const Easing = reanimatedRexportModule.Easing;
|
||||
let out = Easing.out;
|
||||
const Easing2 = reanimatedRexportModule.Easing;
|
||||
object2.easing = Reflect.apply(out, Easing, [Easing2.ease]);
|
||||
const value5 = 1;
|
||||
const value6 = Reflect.apply(withSequence, reanimatedRexportModule, [value2, value4, Reflect.apply(withTiming,
|
||||
moduleValue5, [value5, object2])]);
|
||||
const moduleValue6 = reanimatedRexportModule;
|
||||
withSequence = moduleValue6.withSequence;
|
||||
const value7 = timingModule.withTiming(value5, {duration: 0});
|
||||
const moduleValue8 = reanimatedRexportModule;
|
||||
withDelay = moduleValue8.withDelay;
|
||||
const moduleValue9 = timingModule;
|
||||
withTiming = moduleValue9.withTiming;
|
||||
object2 = {duration: value3};
|
||||
out = Easing.out;
|
||||
const Easing3 = reanimatedRexportModule.Easing;
|
||||
object2.easing = Reflect.apply(out, Easing, [Easing3.ease]);
|
||||
const value8 = Reflect.apply(withDelay, moduleValue8, [value3, Reflect.apply(withTiming, moduleValue9, [1.5,
|
||||
object2])]);
|
||||
const moduleValue10 = timingModule;
|
||||
withTiming = moduleValue10.withTiming;
|
||||
object2 = {};
|
||||
object2.duration = useReducedMotion ? value5 : value3;
|
||||
out = Easing.out;
|
||||
const Easing4 = reanimatedRexportModule.Easing;
|
||||
object2.easing = Reflect.apply(out, Easing, [Easing4.ease]);
|
||||
value = Reflect.apply(withSequence, moduleValue6, [value7, value8, Reflect.apply(withTiming, moduleValue10, [value5,
|
||||
object2])]);
|
||||
object2 = {opacity: value6};
|
||||
const moduleValue11 = reanimatedRexportModule;
|
||||
withSequence = moduleValue11.withSequence;
|
||||
const value10 = timingModule.withTiming('0deg', {duration: 0});
|
||||
const moduleValue13 = reanimatedRexportModule;
|
||||
withDelay = moduleValue13.withDelay;
|
||||
const moduleValue14 = timingModule;
|
||||
const value11 = Reflect.apply(withDelay, moduleValue13, [value3, moduleValue14.withTiming('-2deg',
|
||||
{duration: value3})]);
|
||||
const moduleValue15 = timingModule;
|
||||
object2.transform = [{rotate: Reflect.apply(withSequence, moduleValue11, [value10, value11,
|
||||
moduleValue15.withTiming('-5deg', {duration: value3})])}, {scale: value}];
|
||||
return object2;
|
||||
}
|
||||
|
||||
function _fun53468(a0) { // fn#53468, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6968:5492, offset: 0x0134c5b8, size: 112 bytes, params: 2, frame: 19
|
||||
const viewBindingProps = {style: styles.role};
|
||||
const RoleItem = (require(6792) /* metro dependency 6792: UserProfileRolesCard */).RoleItem;
|
||||
return (
|
||||
<View {...viewBindingProps} key={a0.id}>
|
||||
<RoleItem
|
||||
role={a0}
|
||||
guildId={guild.id}
|
||||
disableInteraction
|
||||
/>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun53460(a0) { // fn#53460, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6968:3054, offset: 0x0134c288, size: 30 bytes, params: 2, frame: 3
|
||||
const value = environment.__proto__;
|
||||
return env1_6[a0] ?? 0;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,409 @@
|
||||
/* Metro module 6768; source: modules/guild_onboarding/native/GuildOnboardingConnectionPrompt.tsx; dependencies: [31, 27, 6616, 5109, 5040, 1867, 6603, 5106, 6600, 661, 33, 4501, 5314, 697, 1484, 1585, 566, 5105, 683, 4863, 6602, 6618, 4573, 1244, 6769, 6789, 4578, 2] */
|
||||
function _fun53304(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#53304, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6946:6, offset: 0x01344d2a, size: 788 bytes, params: 8, frame: 23
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const _arrayLikeToArray_53307 = 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});
|
||||
const env0_3 = importAll(31) /* metro dependency 31 */;
|
||||
let value = require(27) /* metro dependency 27 */;
|
||||
const env0_4 = value.View;
|
||||
const env0_5 = value.ScrollView;
|
||||
const memberVerificationFormStore = importDefault(6616) /* metro dependency 6616: MemberVerificationFormStore */;
|
||||
const authorizedAppsStore = importDefault(5109) /* metro dependency 5109: AuthorizedAppsStore */;
|
||||
const connectedAccountsStore = importDefault(5040) /* metro dependency 5040: ConnectedAccountsStore */;
|
||||
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
|
||||
const guildOnboardingPromptsStore = importDefault(6603) /* metro dependency 6603: GuildOnboardingPromptsStore */;
|
||||
const env0_11 = (require(5106) /* metro dependency 5106: GuildOnboardingPromptsConstants */).OnboardingConnectionType;
|
||||
const env0_12 = (require(6600) /* metro dependency 6600: GuildOnboardingConstants */).GuildOnboardingModalStates;
|
||||
const env0_13 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
|
||||
value = require(33) /* metro dependency 33 */;
|
||||
const env0_14 = value.jsx;
|
||||
const env0_15 = value.jsxs;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
object2 = {};
|
||||
object2.flex = {flex: 1};
|
||||
const object5 = {'display': 'flex', 'flex': 1, 'flexGrow': 1};
|
||||
const NAV_BAR_HEIGHT = (require(5314) /* metro dependency 5314: NavigatorConstantsNative */).NAV_BAR_HEIGHT;
|
||||
object5.marginTop = NAV_BAR_HEIGHT;
|
||||
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object5.marginBottom = PX_16;
|
||||
let BACKGROUND_BASE_LOWER = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWER;
|
||||
object5.backgroundColor = BACKGROUND_BASE_LOWER;
|
||||
object2.container = object5;
|
||||
const object6 = {'display': 'flex', 'flexGrow': 1};
|
||||
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object6.paddingHorizontal = PX_16;
|
||||
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object6.paddingTop = PX_16;
|
||||
BACKGROUND_BASE_LOWER = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWER;
|
||||
object6.backgroundColor = BACKGROUND_BASE_LOWER;
|
||||
object2.scrollContainer = object6;
|
||||
const PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
|
||||
object2.header = {marginBottom: PX_24};
|
||||
let PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
object2.title = {marginBottom: PX_8};
|
||||
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
object2.description = {marginTop: PX_8};
|
||||
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
object2.connectionsList = {marginTop: PX_8};
|
||||
const object7 = {'display': 'flex', 'flexDirection': 'column', 'justifyContent': 'flex-end', 'alignItems': 'center',
|
||||
'bottom': 0, 'paddingBottom': null, 'position': 'absolute', 'width': '100%'};
|
||||
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
object7.paddingBottom = PX_8;
|
||||
BACKGROUND_BASE_LOWER = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWER;
|
||||
object7.backgroundColor = BACKGROUND_BASE_LOWER;
|
||||
object2.footer = object7;
|
||||
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object2.footerContent = {width: '100%', paddingHorizontal: PX_16};
|
||||
const env0_16 = Reflect.apply(createStyles, value, [object2]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_onboarding/native/GuildOnboardingConnectionPrompt.tsx');
|
||||
exports.default = GuildOnboardingConnectionPrompt;
|
||||
}
|
||||
|
||||
function _createForOfIteratorHelperLoose_53305(a0, a1) { // fn#53305, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6946:325, offset: 0x0134503e, size: 370 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 _fun53306;
|
||||
}
|
||||
value = undefined;
|
||||
if (a0) {
|
||||
if (typeof a0 === 'string') {
|
||||
value = _arrayLikeToArray_53307(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_53307(a0, value);
|
||||
r6 = value;
|
||||
} else {
|
||||
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
|
||||
if (regexp.test(r9)) {
|
||||
value = _arrayLikeToArray_53307(a0, value);
|
||||
r6 = value;
|
||||
} else {
|
||||
r6 = value;
|
||||
}
|
||||
}
|
||||
r5 = r6;
|
||||
}
|
||||
} else {
|
||||
r5 = value;
|
||||
}
|
||||
if (r5) {
|
||||
if (r5) {
|
||||
}
|
||||
return _fun53306;
|
||||
}
|
||||
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 GuildOnboardingConnectionPrompt({guildId, onComplete, isLastStep}) { // fn#53308, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6946:2199, offset: 0x013451b0, size: 1348 bytes, params: 2, frame: 39
|
||||
var r16;
|
||||
var object3;
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
var string;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
var items4;
|
||||
var items6;
|
||||
var object9;
|
||||
var Button;
|
||||
var value;
|
||||
const styles = useStyles();
|
||||
const value2 = (require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation();
|
||||
const env0_3 = value2;
|
||||
const bottom = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)().bottom;
|
||||
const value3 = 64 + bottom;
|
||||
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
const value4 = value3 + PX_8;
|
||||
const binding = env0_3;
|
||||
const env0_4 = binding.useRef(false);
|
||||
const connections = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildOnboardingPromptsStore],
|
||||
function() {
|
||||
return GuildOnboardingPromptsStore.getConnections(guildId);
|
||||
});
|
||||
const value5 = (require(566) /* metro dependency 566: flux */).useStateFromStoresArray([GuildOnboardingPromptsStore],
|
||||
function() {
|
||||
return GuildOnboardingPromptsStore.getOnboardingPromptsForOnboarding(guildId);
|
||||
});
|
||||
const guild = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildStore], function() {
|
||||
return GuildStore.getGuild(guildId);
|
||||
});
|
||||
const rulesPrompt = (require(566) /* metro dependency 566: flux */).useStateFromStores([MemberVerificationFormStore],
|
||||
function() {
|
||||
return MemberVerificationFormStore.getRulesPrompt(guildId);
|
||||
});
|
||||
const value6 = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildOnboardingPromptsStore],
|
||||
function() {
|
||||
return GuildOnboardingPromptsStore.isLoading();
|
||||
});
|
||||
const value7 = (require(566) /* metro dependency 566: flux */).useStateFromStores([AuthorizedAppsStore,
|
||||
ConnectedAccountsStore], _fun53314, [connections]);
|
||||
binding.useEffect(_fun53315, [guildId, value6, connections]);
|
||||
const value8 = binding.useCallback(_fun53316, [value5.length, guild, rulesPrompt, value2, onComplete, connections,
|
||||
value7, isLastStep, guildId]);
|
||||
const SafeAreaPaddingView = (require(6618) /* metro dependency 6618: SafeAreaView */).SafeAreaPaddingView;
|
||||
const safeAreaPaddingViewProps = {top: true, style: [styles.flex, styles.container]};
|
||||
if (value6) {
|
||||
safeAreaPaddingViewProps.children = <View style={[styles.flex, {'justifyContent': 'center',
|
||||
'alignItems': 'center'}]}><Text variant="text-md/normal" color="text-muted">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.ZTNur7)}</Text></View>;
|
||||
} else {
|
||||
var viewBindingProps = {style: styles.flex};
|
||||
var scrollViewProps = {contentContainerStyle: [styles.scrollContainer, {paddingBottom: value4}]};
|
||||
var viewBindingProps2 = {style: styles.header};
|
||||
string = intl.string;
|
||||
items4 = [<Text style={styles.title} accessibilityRole="header" variant="heading-xl/semibold" color="mobile-text-heading-primary">{Reflect.apply(string,
|
||||
|
||||
intl, [t.eDVMrA])}</Text>];
|
||||
string = intl.string;
|
||||
items4[1] = <Text style={styles.description} variant="text-md/normal" color="text-muted">{Reflect.apply(string,
|
||||
intl, [t.BozOXu])}</Text>;
|
||||
items6 = [<ScrollView {...scrollViewProps}><View {...viewBindingProps2}>{items4}</View><View style={styles.connectionsList}>{connections.map(_fun53317)}</View></ScrollView>];
|
||||
var viewProps = {style: [styles.footer, styles.footerContent, {paddingBottom: bottom}]};
|
||||
Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
|
||||
var buttonProps = {variant: value7 || isLastStep ? 'primary' : 'secondary', size: 'md'};
|
||||
string = intl.string;
|
||||
if (isLastStep) {
|
||||
value = Reflect.apply(string, intl, [t['8SuVoE']]);
|
||||
value = '' + value + ' 🎉';
|
||||
r16 = value;
|
||||
} else {
|
||||
r16 = value7 ? Reflect.apply(string, intl, [t.PDTjLN]) : Reflect.apply(string, intl, [t['5Wxrcd']]);
|
||||
}
|
||||
buttonProps.text = r16;
|
||||
buttonProps.onPress = value8;
|
||||
buttonProps.grow = true;
|
||||
items6[1] = <View {...viewProps}><Button {...buttonProps} /></View>;
|
||||
safeAreaPaddingViewProps.children = <View {...viewBindingProps}>{items6}</View>;
|
||||
}
|
||||
return <SafeAreaPaddingView {...safeAreaPaddingViewProps} />;
|
||||
}
|
||||
|
||||
function _fun53314() { // fn#53314, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6946:2739, offset: 0x01345773, size: 208 bytes, params: 1, frame: 20
|
||||
var r2;
|
||||
var value5;
|
||||
var connection_type;
|
||||
var APPLICATION;
|
||||
var PROVIDER_CONNECTED_ACCOUNT;
|
||||
var provider_id;
|
||||
var getAccount;
|
||||
var value6;
|
||||
var revoked;
|
||||
var getNewestTokenForApplication;
|
||||
var application_id;
|
||||
var value7;
|
||||
const value3 = _createForOfIteratorHelperLoose_53305(connections);
|
||||
const value4 = value3();
|
||||
let done = value4.done;
|
||||
if (!done) {
|
||||
r2 = value4;
|
||||
reducibleLoop1: while (true) {
|
||||
value5 = r2.value;
|
||||
connection_type = value5.connection_type;
|
||||
APPLICATION = OnboardingConnectionType.APPLICATION;
|
||||
if (connection_type === APPLICATION) {
|
||||
getNewestTokenForApplication = AuthorizedAppsStore.getNewestTokenForApplication;
|
||||
application_id = value5.application_id;
|
||||
reducibleJoin8: while (true) {
|
||||
if (Reflect.apply(getNewestTokenForApplication, AuthorizedAppsStore, [application_id]) != null) {
|
||||
return true;
|
||||
}
|
||||
break reducibleJoin8;
|
||||
}
|
||||
} else {
|
||||
connection_type = value5.connection_type;
|
||||
PROVIDER_CONNECTED_ACCOUNT = OnboardingConnectionType.PROVIDER_CONNECTED_ACCOUNT;
|
||||
reducibleJoin8: while (true) {
|
||||
if (connection_type !== PROVIDER_CONNECTED_ACCOUNT) {
|
||||
break reducibleJoin8;
|
||||
}
|
||||
provider_id = value5.provider_id;
|
||||
if (provider_id == null) {
|
||||
break reducibleJoin8;
|
||||
}
|
||||
getAccount = ConnectedAccountsStore.getAccount;
|
||||
provider_id = value5.provider_id;
|
||||
value6 = Reflect.apply(getAccount, ConnectedAccountsStore, [null, provider_id]);
|
||||
if (value6 == null) {
|
||||
break reducibleJoin8;
|
||||
}
|
||||
revoked = value6.revoked;
|
||||
if (!revoked) {
|
||||
return true;
|
||||
}
|
||||
break reducibleJoin8;
|
||||
}
|
||||
}
|
||||
value7 = value3();
|
||||
done = value7.done;
|
||||
if (done) {
|
||||
return false;
|
||||
}
|
||||
r2 = value7;
|
||||
continue reducibleLoop1;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function _fun53315() { // fn#53315, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6946:3106, offset: 0x01345843, size: 301 bytes, params: 1, frame: 22
|
||||
var connectionsBinding;
|
||||
var value2;
|
||||
var moduleValue;
|
||||
var getProviderConnectionState;
|
||||
var value3;
|
||||
var applicationConnectionState;
|
||||
var defaultImport;
|
||||
var track;
|
||||
var GUILD_ONBOARDING_STEP_VIEWED;
|
||||
var object2;
|
||||
var moduleValue3;
|
||||
var connected;
|
||||
var notConnected;
|
||||
if (!env0_9) {
|
||||
if (connections.length !== 0) {
|
||||
if (!env0_4.current) {
|
||||
value2 = environment.__proto__;
|
||||
moduleValue = require(5105) /* metro dependency 5105: GuildOnboardingUtils */;
|
||||
getProviderConnectionState = moduleValue.getProviderConnectionState;
|
||||
connectionsBinding = connections;
|
||||
value3 = Reflect.apply(getProviderConnectionState, moduleValue, [connectionsBinding]);
|
||||
applicationConnectionState = (require(5105) /* metro dependency 5105: GuildOnboardingUtils */).getApplicationConnectionState(connectionsBinding);
|
||||
defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
|
||||
track = defaultImport.track;
|
||||
GUILD_ONBOARDING_STEP_VIEWED = AnalyticEvents.GUILD_ONBOARDING_STEP_VIEWED;
|
||||
object2 = {};
|
||||
moduleValue3 = require(4863) /* metro dependency 4863: AppAnalyticsUtils */;
|
||||
copyDataProperties(object2, moduleValue3.collectGuildAnalyticsMetadata(guildId), moduleValue3);
|
||||
object2['step'] = (require(6602) /* metro dependency 6602: GuildOnboardingPromptsActionCreators */).CONNECTIONS_STEP;
|
||||
object2['required'] = false;
|
||||
connected = value3.connected;
|
||||
object2['provider_connections_connected'] = connected;
|
||||
notConnected = value3.notConnected;
|
||||
object2['provider_connections_not_connected'] = notConnected;
|
||||
connected = applicationConnectionState.connected;
|
||||
object2['application_connections_connected'] = connected;
|
||||
notConnected = applicationConnectionState.notConnected;
|
||||
object2['application_connections_not_connected'] = notConnected;
|
||||
Reflect.apply(track, defaultImport, [GUILD_ONBOARDING_STEP_VIEWED, object2]);
|
||||
env0_4.current = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function _fun53316() { // fn#53316, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6946:3612, offset: 0x01345970, size: 420 bytes, params: 1, frame: 24
|
||||
var moduleValue4;
|
||||
var binding;
|
||||
const guildOnboardingUtilsModule = require(5105) /* metro dependency 5105: GuildOnboardingUtils */;
|
||||
const getProviderConnectionState = guildOnboardingUtilsModule.getProviderConnectionState;
|
||||
const connectionsBinding = connections;
|
||||
const value3 = Reflect.apply(getProviderConnectionState, guildOnboardingUtilsModule, [connectionsBinding]);
|
||||
const applicationConnectionState = guildOnboardingUtilsModule.getApplicationConnectionState(connectionsBinding);
|
||||
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
|
||||
const track = defaultImport.track;
|
||||
const GUILD_ONBOARDING_STEP_COMPLETED = AnalyticEvents.GUILD_ONBOARDING_STEP_COMPLETED;
|
||||
const object2 = {};
|
||||
const appAnalyticsUtilsModule = require(4863) /* metro dependency 4863: AppAnalyticsUtils */;
|
||||
copyDataProperties(object2, appAnalyticsUtilsModule.collectGuildAnalyticsMetadata(guildId), appAnalyticsUtilsModule);
|
||||
const CONNECTIONS_STEP = (require(6602) /* metro dependency 6602: GuildOnboardingPromptsActionCreators */).CONNECTIONS_STEP;
|
||||
object2['step'] = CONNECTIONS_STEP;
|
||||
object2['skipped'] = !env0_10;
|
||||
object2['back'] = false;
|
||||
object2['options_selected'] = 0;
|
||||
object2['in_onboarding'] = true;
|
||||
object2['is_final_step'] = isLastStep;
|
||||
object2['provider_connections_connected'] = value3.connected;
|
||||
object2['provider_connections_not_connected'] = value3.notConnected;
|
||||
object2['application_connections_connected'] = applicationConnectionState.connected;
|
||||
object2['application_connections_not_connected'] = applicationConnectionState.notConnected;
|
||||
Reflect.apply(track, defaultImport, [GUILD_ONBOARDING_STEP_COMPLETED, object2]);
|
||||
if (env0_6.length > 0) {
|
||||
binding = env0_3;
|
||||
binding.push(GuildOnboardingModalStates.PROMPT, {currentPrompt: 0});
|
||||
} else {
|
||||
moduleValue4 = guildOnboardingUtilsModule;
|
||||
if (moduleValue4.showRulesInOnboarding(guild, rulesPrompt)) {
|
||||
binding = env0_3;
|
||||
binding.push(GuildOnboardingModalStates.RULES);
|
||||
} else {
|
||||
onComplete();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function _fun53317(a0, a1) { // fn#53317, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6946:5050, offset: 0x01345b14, size: 84 bytes, params: 3, frame: 17
|
||||
let value = environment.__proto__;
|
||||
value = importDefault(6769) /* metro dependency 6769: ConnectionCard */;
|
||||
const guildIdBinding = guildId;
|
||||
const GUILD_ONBOARDING = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).GUILD_ONBOARDING;
|
||||
return ((Component) => <Component connection={a0} guildId={guildIdBinding} location={GUILD_ONBOARDING} key={a1} />)(value);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
/* Metro module 6600; source: modules/guild_onboarding/native/GuildOnboardingConstants.tsx; dependencies: [2] */
|
||||
function _fun52021(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#52021, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6778:6, offset: 0x012ea5ec, size: 150 bytes, params: 8, frame: 16
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_onboarding/native/GuildOnboardingConstants.tsx');
|
||||
exports.GUILD_ONBOARDING_MODAL_KEY = 'GUILD_ONBOARDING_MODAL_KEY';
|
||||
exports.CHANNELS_AND_ROLES_MODAL_KEY = 'CHANNELS_AND_ROLES_MODAL_KEY';
|
||||
exports.GuildOnboardingModalStates = {COVER: 'cover', PROMPT: 'prompt', CONNECTIONS: 'connections',
|
||||
COMPLETED: 'completed', RULES: 'rules'};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,145 @@
|
||||
/* Metro module 15720; source: modules/guild_onboarding/native/GuildOnboardingManager.tsx; dependencies: [7, 6, 15, 17, 18, 1945, 1867, 3969, 661, 3772, 6598, 1391, 4860, 2] */
|
||||
function _fun120709(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#120709, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15928:6, offset: 0x02533a69, size: 332 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(7) /* metro dependency 7 */;
|
||||
const env0_4 = importDefault(6) /* metro dependency 6 */;
|
||||
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 guildMemberStore = importDefault(1945) /* metro dependency 1945: GuildMemberStore */;
|
||||
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
|
||||
const selectedGuildStore = importDefault(3969) /* metro dependency 3969: SelectedGuildStore */;
|
||||
const env0_11 = (require(661) /* metro dependency 661: Constants */).GuildFeatures;
|
||||
const env0_12 = (require(3772) /* metro dependency 3772: GuildMemberConstants */).GuildMemberFlags;
|
||||
let value = importDefault(4860) /* metro dependency 4860: AutomaticLifecycleManager */;
|
||||
value = _fun120713(value);
|
||||
value = new value();
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_onboarding/native/GuildOnboardingManager.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
function _isNativeReflectConstruct_120710() { // fn#120710, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15928:229, offset: 0x02533bb5, 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_120710_isNativeReflectConstruct = function() {
|
||||
return !!result;
|
||||
})();
|
||||
}
|
||||
|
||||
function _fun120713(a0) { // fn#120713, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15928:446, offset: 0x02533c17, size: 42 bytes, params: 2, frame: 14
|
||||
const closure = GuildOnboardingManager;
|
||||
env0_7(closure, a0);
|
||||
return env0_3(closure);
|
||||
}
|
||||
|
||||
function GuildOnboardingManager(a0) { // fn#120714, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15928:458, offset: 0x02533c41, size: 228 bytes, params: 2, frame: 20
|
||||
var r0;
|
||||
var Reflect;
|
||||
let value = copyRestArgs(0, undefined);
|
||||
let binding = env1_4;
|
||||
binding(this, GuildOnboardingManager);
|
||||
const items = [];
|
||||
arraySpread(items, value, 0, items);
|
||||
value = env1_6(GuildOnboardingManager);
|
||||
binding = env1_5;
|
||||
if (_isNativeReflectConstruct_120710()) {
|
||||
Reflect = global.Reflect;
|
||||
value = Reflect.construct(value, items, env1_6(this).constructor);
|
||||
r0 = value;
|
||||
} else {
|
||||
value = value.apply(this, items);
|
||||
r0 = value;
|
||||
}
|
||||
value = binding(this, r0);
|
||||
value.actions = {CHANNEL_SELECT: CHANNEL_SELECT_120715, GUILD_DELETE: GUILD_DELETE_120716,
|
||||
POST_CONNECTION_OPEN: POST_CONNECTION_OPEN_120717};
|
||||
value.handleConnectionOpen = handleConnectionOpen_120718;
|
||||
value.handleChannelSelect = handleChannelSelect_120719;
|
||||
value.handleGuildDelete = handleGuildDelete_120720;
|
||||
value._openOnboardingIfIncomplete = _openOnboardingIfIncomplete;
|
||||
return value;
|
||||
}
|
||||
|
||||
function GuildOnboardingManagerHandleConnectionOpen() { // fn#120718, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15928:877, owner: GuildOnboardingManager.handleConnectionOpen, offset: 0x02533d25, size: 79 bytes, params: 1, frame: 13
|
||||
const value2 = null;
|
||||
const r3 = value2 != env2_13 ? env2_13 : SelectedGuildStore.getGuildId();
|
||||
const r1 = value2 != r3 ? r3 : value2;
|
||||
if (value2 != r1) {
|
||||
env0_0._openOnboardingIfIncomplete(r1);
|
||||
}
|
||||
}
|
||||
|
||||
function GuildOnboardingManagerHandleChannelSelect({guildId, channelId}) { // fn#120719, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15928:997, owner: GuildOnboardingManager.handleChannelSelect, offset: 0x02533d74, size: 102 bytes, params: 2, frame: 14
|
||||
var value4;
|
||||
let r1 = env2_13 === guildId && env2_14 === channelId;
|
||||
if (!r1) {
|
||||
value4 = null;
|
||||
r1 = value4 != channelId ? channelId : value4;
|
||||
r1 = value4 != guildId ? guildId : value4;
|
||||
if (value4 != r1) {
|
||||
env0_0._openOnboardingIfIncomplete(r1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function GuildOnboardingManagerHandleGuildDelete({guild}) { // fn#120720, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15928:1138, owner: GuildOnboardingManager.handleGuildDelete, offset: 0x02533dda, size: 51 bytes, params: 2, frame: 12
|
||||
let value = environment.__proto__.__proto__;
|
||||
value = require(6598) /* metro dependency 6598: doGuildOnboardingNative */;
|
||||
value.discardOnboardingPromise(guild.id);
|
||||
}
|
||||
|
||||
function _openOnboardingIfIncomplete(a0) { // fn#120721, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15928:1223, owner: GuildOnboardingManager._openOnboardingIfIncomplete, offset: 0x02533e0d, size: 252 bytes, params: 2, frame: 19
|
||||
var r1;
|
||||
var features;
|
||||
var selfMember;
|
||||
var value4;
|
||||
var moduleValue;
|
||||
var moduleValue2;
|
||||
const value = environment.__proto__.__proto__;
|
||||
const guild = GuildStore.getGuild(a0);
|
||||
if (guild != null) {
|
||||
features = guild.features;
|
||||
if (features.has(GuildFeatures.GUILD_ONBOARDING)) {
|
||||
selfMember = GuildMemberStore.getSelfMember(a0);
|
||||
value4 = selfMember != null;
|
||||
if (value4) {
|
||||
moduleValue = require(1391) /* metro dependency 1391: FlagUtils */;
|
||||
r1 = !moduleValue.hasFlag(selfMember.flags ?? 0, GuildMemberFlags.COMPLETED_ONBOARDING);
|
||||
} else {
|
||||
r1 = value4;
|
||||
}
|
||||
if (r1) {
|
||||
moduleValue2 = require(1391) /* metro dependency 1391: FlagUtils */;
|
||||
r1 = moduleValue2.hasFlag(selfMember.flags ?? 0, GuildMemberFlags.STARTED_ONBOARDING);
|
||||
}
|
||||
if (r1) {
|
||||
(importDefault(6598) /* metro dependency 6598: doGuildOnboardingNative */)({guildId: a0});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,190 @@
|
||||
/* Metro module 6615; source: modules/guild_onboarding/native/GuildOnboardingModal.tsx; dependencies: [31, 6616, 1379, 1867, 1934, 6603, 6600, 661, 33, 1230, 6617, 5282, 6768, 5105, 6790, 6620, 566, 6606, 6717, 5280, 1244, 2] */
|
||||
function _fun52259(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#52259, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6793:6, offset: 0x01324130, size: 301 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const headerTitle = function() {
|
||||
return null;
|
||||
};
|
||||
const headerRight = function() {
|
||||
return null;
|
||||
};
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importAll(31) /* metro dependency 31 */;
|
||||
const memberVerificationFormStore = importDefault(6616) /* metro dependency 6616: MemberVerificationFormStore */;
|
||||
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
|
||||
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
|
||||
const selectedChannelStore = importDefault(1934) /* metro dependency 1934: SelectedChannelStore */;
|
||||
const guildOnboardingPromptsStore = importDefault(6603) /* metro dependency 6603: GuildOnboardingPromptsStore */;
|
||||
const env0_9 = (require(6600) /* metro dependency 6600: GuildOnboardingConstants */).GuildOnboardingModalStates;
|
||||
const constantsModule = require(661) /* metro dependency 661: Constants */;
|
||||
const env0_10 = constantsModule.GuildFeatures;
|
||||
const env0_11 = constantsModule.Routes;
|
||||
const env0_12 = (require(33) /* metro dependency 33 */).jsx;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_onboarding/native/GuildOnboardingModal.tsx');
|
||||
exports.default = GuildOnboardingModal;
|
||||
}
|
||||
|
||||
function getScreens_52262(a0) { // fn#52262, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6793:316, offset: 0x0132425d, size: 366 bytes, params: 2, frame: 19
|
||||
const guildId = a0.guildId;
|
||||
const env0_1 = a0.prompts;
|
||||
a0.connections;
|
||||
const env0_2 = a0.selectOption;
|
||||
const env0_3 = a0.completeOnboarding;
|
||||
const env0_4 = a0.onFinish;
|
||||
const env0_5 = a0.onClose;
|
||||
const env0_6 = a0.landingAnimation;
|
||||
const env0_7 = a0.isFirstOpen;
|
||||
const env0_8 = a0.backShouldLeaveGuild;
|
||||
const env0_9 = GuildStore.getGuild(guildId);
|
||||
const env0_10 = MemberVerificationFormStore.getRulesPrompt(guildId);
|
||||
const object2 = {};
|
||||
const PROMPT = GuildOnboardingModalStates.PROMPT;
|
||||
const headerTitleBinding = headerTitle;
|
||||
const headerRightBinding = headerRight;
|
||||
object2[PROMPT] = {fullscreen: true, headerTitle: headerTitleBinding, headerRight: headerRightBinding,
|
||||
render: render_52263};
|
||||
const CONNECTIONS = GuildOnboardingModalStates.CONNECTIONS;
|
||||
const object4 = {fullscreen: true, headerTitle: headerTitleBinding, headerRight: headerRightBinding};
|
||||
object4.headerLeft = (require(5282) /* metro dependency 5282: NavigatorHeaderNative */).getHeaderCloseButton(_fun52264);
|
||||
object4.render = render_52265;
|
||||
object2[CONNECTIONS] = object4;
|
||||
const COMPLETED = GuildOnboardingModalStates.COMPLETED;
|
||||
object2[COMPLETED] = {fullscreen: true, headerTitle: headerTitleBinding, headerRight: headerRightBinding,
|
||||
render: render_52266};
|
||||
const RULES = GuildOnboardingModalStates.RULES;
|
||||
object2[RULES] = {fullscreen: true, headerTitle: headerTitleBinding, headerRight: headerRightBinding,
|
||||
render: render_52268};
|
||||
return object2;
|
||||
}
|
||||
|
||||
function GuildOnboardingModal({guildId, onFinish, onClose, landingAnimation, isFirstOpen, backShouldLeaveGuild}) { // fn#52269, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6793:1652, offset: 0x01324648, size: 490 bytes, params: 2, frame: 27
|
||||
const env0_3 = landingAnimation;
|
||||
const value2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildStore], _fun52270);
|
||||
const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStoresArray([GuildOnboardingPromptsStore],
|
||||
function() {
|
||||
return GuildOnboardingPromptsStore.getOnboardingPromptsForOnboarding(guildId);
|
||||
});
|
||||
const connections = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildOnboardingPromptsStore],
|
||||
function() {
|
||||
return GuildOnboardingPromptsStore.getConnections(guildId);
|
||||
});
|
||||
const binding = env0_3;
|
||||
const value4 = binding.useCallback(_fun52273, [guildId]);
|
||||
const value5 = binding.useCallback(_fun52274, [guildId, value3]);
|
||||
binding.useEffect(_fun52275, [guildId, value2]);
|
||||
const value6 = binding.useMemo(_fun52276, [guildId, value3, connections, value4, value5, onFinish, onClose,
|
||||
landingAnimation, isFirstOpen, backShouldLeaveGuild]);
|
||||
const r4 = isFirstOpen && connections.length > 0 ? GuildOnboardingModalStates.CONNECTIONS : GuildOnboardingModalStates.PROMPT;
|
||||
const Navigator = (require(5280) /* metro dependency 5280: NavigatorNative */).Navigator;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
return (
|
||||
<Navigator
|
||||
screens={value6}
|
||||
initialRouteName={r4}
|
||||
headerBackTitle={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['13/7kX'])}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
function getScreens_52262Render(a0) { // fn#52263, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6793:609, owner: getScreens_52262.render, offset: 0x013243cb, size: 141 bytes, params: 2, frame: 18
|
||||
const value = environment.__proto__;
|
||||
return ((Component) => <Component guildId={guildId} currentPromptIdx={a0?.currentPrompt ?? 0} prompts={prompts} selectOption={selectOption} onClose={onClose} landingAnimation={landingAnimation} isFirstOpen={isFirstOpen} backShouldLeaveGuild={backShouldLeaveGuild} />)(importDefault(6617) /* metro dependency 6617: GuildOnboardingPrompts */);
|
||||
}
|
||||
|
||||
function _fun52264() { // fn#52264, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6793:932, offset: 0x01324458, size: 203 bytes, params: 1, frame: 17
|
||||
var onCloseBinding;
|
||||
var guildIdBinding;
|
||||
var channel;
|
||||
var moduleValue;
|
||||
var moduleValue2;
|
||||
if (backShouldLeaveGuild) {
|
||||
guildIdBinding = guildId;
|
||||
onCloseBinding = onClose;
|
||||
value = environment.__proto__;
|
||||
channel = ChannelStore.getChannel(SelectedChannelStore.getLastSelectedChannelId());
|
||||
if (channel == null) {
|
||||
moduleValue = require(1230) /* metro dependency 1230: router_utils */;
|
||||
moduleValue.transitionTo(Routes.ME, {navigationReplace: true});
|
||||
} else if (channel.guild_id !== guildIdBinding) {
|
||||
moduleValue2 = require(1230) /* metro dependency 1230: router_utils */;
|
||||
moduleValue2.transitionTo(Routes.CHANNEL(channel.guild_id, channel.id));
|
||||
} else {
|
||||
moduleValue = require(1230) /* metro dependency 1230: router_utils */;
|
||||
moduleValue.transitionTo(Routes.ME, {navigationReplace: true});
|
||||
}
|
||||
onCloseBinding();
|
||||
} else {
|
||||
onClose();
|
||||
}
|
||||
}
|
||||
|
||||
function getScreens_52262Render_52265() { // fn#52265, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6793:1149, owner: getScreens_52262.render, offset: 0x01324523, size: 125 bytes, params: 1, frame: 19
|
||||
var r5;
|
||||
let value = environment.__proto__;
|
||||
const GuildOnboardingConnectionPrompt = importDefault(6768) /* metro dependency 6768: GuildOnboardingConnectionPrompt */;
|
||||
const guildIdBinding = guildId;
|
||||
const value3 = prompts.length === 0;
|
||||
if (value3) {
|
||||
value = require(5105) /* metro dependency 5105: GuildOnboardingUtils */;
|
||||
value = !value.showRulesInOnboarding(env0_9, env0_10);
|
||||
r5 = value;
|
||||
} else {
|
||||
r5 = value3;
|
||||
}
|
||||
return (
|
||||
<GuildOnboardingConnectionPrompt
|
||||
guildId={guildIdBinding}
|
||||
isLastStep={r5}
|
||||
onComplete={completeOnboarding}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
function getScreens_52262Render_52266() { // fn#52266, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6793:1337, owner: getScreens_52262.render, offset: 0x013245a0, size: 80 bytes, params: 1, frame: 15
|
||||
var environment;
|
||||
const value = environment.__proto__;
|
||||
return ((Component) => <Component guildId={guildId} prompts={prompts} completeOnboarding={completeOnboarding} onClose={function() {
|
||||
onClose();
|
||||
onFinish();
|
||||
}} />)(importDefault(6790) /* metro dependency 6790: GuildOnboardingCompleted */);
|
||||
}
|
||||
|
||||
function getScreens_52262Render_52268() { // fn#52268, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6793:1499, owner: getScreens_52262.render, offset: 0x01324607, size: 65 bytes, params: 1, frame: 15
|
||||
const RulesPrompt = (require(6620) /* metro dependency 6620: GuildOnboardingPrompt */).RulesPrompt;
|
||||
return <RulesPrompt guildId={guildId} onClose={onClose} />;
|
||||
}
|
||||
|
||||
function _fun52270() { // fn#52270, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6793:1811, offset: 0x01324832, size: 97 bytes, params: 1, frame: 14
|
||||
const value = environment.__proto__;
|
||||
const guild = GuildStore.getGuild(guildId);
|
||||
return guild != null && (guild.features.has(GuildFeatures.MEMBER_VERIFICATION_GATE_ENABLED) && !guild.features.has(GuildFeatures.MEMBER_VERIFICATION_MANUAL_APPROVAL));
|
||||
}
|
||||
|
||||
function _fun52273(a0, a1, a2) { // fn#52273, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6793:2127, offset: 0x013248c9, size: 56 bytes, params: 4, frame: 18
|
||||
let value = environment.__proto__;
|
||||
value = importDefault(6606) /* metro dependency 6606: GuildOnboardingActionCreators */;
|
||||
value.selectOption(guildId, a0, a1, a2);
|
||||
}
|
||||
|
||||
function _fun52274() { // fn#52274, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6793:2192, offset: 0x01324901, size: 50 bytes, params: 1, frame: 14
|
||||
let value = environment.__proto__;
|
||||
value = importDefault(6606) /* metro dependency 6606: GuildOnboardingActionCreators */;
|
||||
value.completeOnboarding(guildId, env0_7);
|
||||
}
|
||||
|
||||
function _fun52275() { // fn#52275, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6793:2252, offset: 0x01324933, size: 54 bytes, params: 1, frame: 12
|
||||
var value2;
|
||||
var defaultImport;
|
||||
if (env0_6) {
|
||||
value2 = environment.__proto__;
|
||||
defaultImport = importDefault(6717) /* metro dependency 6717: MemberVerificationActionCreators */;
|
||||
defaultImport.fetchVerificationForm(guildId);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun52276() { // fn#52276, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6793:2320, offset: 0x01324969, size: 110 bytes, params: 1, frame: 12
|
||||
return getScreens_52262({guildId: guildId, prompts: env0_7, connections: connections, selectOption: env0_9,
|
||||
completeOnboarding: env0_10, onFinish: onFinish, onClose: onClose, landingAnimation: landingAnimation,
|
||||
isFirstOpen: isFirstOpen, backShouldLeaveGuild: backShouldLeaveGuild});
|
||||
}
|
||||
|
||||
@@ -0,0 +1,454 @@
|
||||
/* Metro module 6620; source: modules/guild_onboarding/native/GuildOnboardingPrompt.tsx; dependencies: [57, 31, 27, 6540, 6616, 1867, 6603, 6600, 1881, 33, 4501, 5314, 697, 1484, 566, 1585, 4048, 4002, 4000, 6618, 6621, 4573, 1244, 4578, 6717, 4589, 676, 5105, 6734, 674, 3860, 6735, 6739, 1423, 4080, 6744, 1962, 5278, 6759, 2] */
|
||||
function _fun52324(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#52324, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6798:6, offset: 0x01326e9b, size: 1046 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 */;
|
||||
let value = require(27) /* metro dependency 27 */;
|
||||
const env0_5 = value.Image;
|
||||
const env0_6 = value.View;
|
||||
const env0_7 = value.ScrollView;
|
||||
const env0_8 = value.FlatList;
|
||||
const emojiStore = importDefault(6540) /* metro dependency 6540: EmojiStore */;
|
||||
const memberVerificationFormStore = importDefault(6616) /* metro dependency 6616: MemberVerificationFormStore */;
|
||||
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
|
||||
const guildOnboardingPromptsStore = importDefault(6603) /* metro dependency 6603: GuildOnboardingPromptsStore */;
|
||||
const env0_13 = (require(6600) /* metro dependency 6600: GuildOnboardingConstants */).GuildOnboardingModalStates;
|
||||
const env0_14 = (require(1881) /* metro dependency 1881: EmojiConstants */).EMOJI_URL_BASE_SIZE;
|
||||
value = require(33) /* metro dependency 33 */;
|
||||
const env0_15 = value.jsx;
|
||||
const env0_16 = value.jsxs;
|
||||
const env0_17 = value.Fragment;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
object2 = {};
|
||||
object2.flex = {flex: 1};
|
||||
const object4 = {'display': 'flex', 'flex': 1, 'flexGrow': 1, 'marginTop': null, 'marginBottom': 16};
|
||||
const NAV_BAR_HEIGHT = (require(5314) /* metro dependency 5314: NavigatorConstantsNative */).NAV_BAR_HEIGHT;
|
||||
object4.marginTop = NAV_BAR_HEIGHT;
|
||||
let BACKGROUND_BASE_LOWER = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWER;
|
||||
object4.backgroundColor = BACKGROUND_BASE_LOWER;
|
||||
object2.container = object4;
|
||||
BACKGROUND_BASE_LOWER = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWER;
|
||||
object2.scrollContainer = {'display': 'flex', 'flexGrow': 1, 'justifyContent': 'center', 'paddingHorizontal': 16,
|
||||
'paddingTop': 0, backgroundColor: BACKGROUND_BASE_LOWER};
|
||||
object2.scrollContainerGradient = {'position': 'absolute', 'height': 48, 'width': '100%', 'left': 0, 'top': -48};
|
||||
object2.promptHeader = {'display': 'flex', 'flexDirection': 'row', 'alignItems': 'center', 'marginBottom': 8};
|
||||
const object6 = {'flexShrink': 0, 'marginHorizontal': 8, 'color': null, 'backgroundColor': null, 'width': 4,
|
||||
'height': 4};
|
||||
let BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
|
||||
object6.color = BORDER_SUBTLE;
|
||||
BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
|
||||
object6.backgroundColor = BORDER_SUBTLE;
|
||||
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
|
||||
object2.requiredSeparator = object6;
|
||||
object2.countText = {};
|
||||
object2.title = {marginBottom: 32};
|
||||
object2.helpText = {'marginTop': 8, 'marginBottom': 8, 'textAlign': 'center'};
|
||||
BACKGROUND_BASE_LOWER = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWER;
|
||||
object2.footer = {'display': 'flex', 'flexDirection': 'column', 'justifyContent': 'flex-end',
|
||||
'alignItems': 'center', 'bottom': 0, 'paddingBottom': 8, 'position': 'absolute', 'width': '100%',
|
||||
backgroundColor: BACKGROUND_BASE_LOWER};
|
||||
object2.footerText = {'paddingHorizontal': 16, 'paddingBottom': 8, 'paddingTop': 8};
|
||||
object2.footerContent = {'width': '100%', 'paddingHorizontal': 16};
|
||||
object2.optionTextEmoji = {'fontSize': 18, 'lineHeight': 22, 'marginRight': 6};
|
||||
object2.optionImageEmoji = {'height': 22, 'width': 22, 'marginRight': 6};
|
||||
object2.emojiContainer = {'display': 'flex', 'alignItems': 'center'};
|
||||
const object7 = {'borderRadius': null, 'backgroundColor': null, 'padding': 8, 'paddingRight': 32, 'minHeight': 48,
|
||||
'display': 'flex', 'flexDirection': 'row', 'flexWrap': 'wrap', 'alignItems': 'center', 'position': 'relative'};
|
||||
object7.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
|
||||
const BACKGROUND_BASE_LOWEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWEST;
|
||||
object7.backgroundColor = BACKGROUND_BASE_LOWEST;
|
||||
object2.dropdownContainer = object7;
|
||||
object2.emptyDropdownText = {marginTop: 16};
|
||||
const object9 = {'borderRadius': null, 'backgroundColor': null, 'padding': 6, 'marginRight': 8, 'marginTop': 8,
|
||||
'display': 'flex', 'flexDirection': 'row', 'alignItems': 'center'};
|
||||
object9.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
|
||||
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
|
||||
object9.backgroundColor = BACKGROUND_BASE_LOW;
|
||||
object2.dropdownPill = object9;
|
||||
object2.dropdownIconContainer = {'position': 'absolute', 'right': 4, 'top': 8};
|
||||
object2.dropdownIcon = {'height': 32, 'width': 32};
|
||||
const env0_18 = Reflect.apply(createStyles, value, [object2]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_onboarding/native/GuildOnboardingPrompt.tsx');
|
||||
exports.RulesPrompt = RulesPrompt;
|
||||
exports.MultipleChoicePrompt = MultipleChoicePrompt;
|
||||
exports.DropdownPrompt = DropdownPrompt;
|
||||
}
|
||||
|
||||
function PromptHeader({currentPrompt, numberOfPrompts, currentPromptIndex}) { // fn#52325, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6798:2141, offset: 0x013272b1, size: 492 bytes, params: 2, frame: 33
|
||||
var r11;
|
||||
var jsxRuntimeEnv0_17Binding2;
|
||||
var items2;
|
||||
const styles = useStyles();
|
||||
const jsxRuntimeEnv0_17Binding = jsxRuntimeEnv0_17;
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const text = <Text style={styles.countText} variant="text-sm/medium" color="text-muted">{intl.format((require(1244) /* metro dependency 1244: indexNative */).t.isV0NW,
|
||||
{currentQuestion: currentPromptIndex + 1, questionCount: numberOfPrompts})}</Text>;
|
||||
if (currentPrompt != null) {
|
||||
if (currentPrompt.required) {
|
||||
jsxRuntimeEnv0_17Binding2 = jsxRuntimeEnv0_17;
|
||||
items2 = [<View style={styles.requiredSeparator} />];
|
||||
items2[1] = <Text variant="text-sm/medium" color="text-brand">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.Ur8Vrt)}</Text>;
|
||||
r11 = <>{items2}</>;
|
||||
} else {
|
||||
r11 = null;
|
||||
}
|
||||
} else {
|
||||
r11 = null;
|
||||
}
|
||||
return (
|
||||
<>
|
||||
<View style={styles.promptHeader}>
|
||||
{text}
|
||||
{r11}
|
||||
</View>
|
||||
<Text
|
||||
style={styles.title}
|
||||
accessibilityRole="header"
|
||||
variant="heading-xl/semibold"
|
||||
color="mobile-text-heading-primary"
|
||||
>
|
||||
{currentPrompt.title}
|
||||
</Text>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
function PromptFooter({guildId, currentPrompt, selectedOptionIds, handleOnPress, lastPrompt}) { // fn#52326, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6798:2794, offset: 0x0132749d, size: 1134 bytes, params: 2, frame: 36
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
const styles = useStyles();
|
||||
const guild = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildStore], function() {
|
||||
return GuildStore.getGuild(guildId);
|
||||
});
|
||||
const r18 = selectedOptionIds.length === 0 && !(currentPrompt != null && currentPrompt.required);
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const string = intl.string;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
const r14 = lastPrompt ? '' + Reflect.apply(string, intl, [t['8SuVoE']]) + ' 🎉' : r18 ? Reflect.apply(string, intl,
|
||||
[t['5Wxrcd']]) : Reflect.apply(string, intl, [t.PDTjLN]);
|
||||
const r12 = selectedOptionIds.length === 0 && currentPrompt?.required;
|
||||
let r11 = currentPrompt == null || currentPrompt.options == null ? undefined : currentPrompt.options.filter(function(a0) {
|
||||
return selectedOptionIds.includes(a0.id);
|
||||
});
|
||||
const {helpText,
|
||||
helpTextAdditional} = (importDefault(6734) /* metro dependency 6734: usePromptHelpText */)({guild: guild,
|
||||
prompt: currentPrompt, selectedRoleIds: env0_4.useMemo(_fun52329, [r11]),
|
||||
selectedChannelIds: env0_4.useMemo(_fun52330, [r11]), itemHook: formattedNameHighlight});
|
||||
const defaultImport2 = importDefault(674) /* metro dependency 674 */;
|
||||
const useTokenModule = require(3860) /* metro dependency 3860: useToken */;
|
||||
let useToken = useTokenModule.useToken;
|
||||
let BACKGROUND_BASE_LOWER = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWER;
|
||||
const value17 = defaultImport2(Reflect.apply(useToken, useTokenModule, [BACKGROUND_BASE_LOWER])).alpha(0);
|
||||
items3 = [value17.hex()];
|
||||
const defaultImport3 = defaultImport2;
|
||||
const moduleValue3 = useTokenModule;
|
||||
useToken = moduleValue3.useToken;
|
||||
BACKGROUND_BASE_LOWER = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWER;
|
||||
const value20 = defaultImport3(Reflect.apply(useToken, moduleValue3, [BACKGROUND_BASE_LOWER])).alpha(1);
|
||||
items3[1] = value20.hex();
|
||||
const defaultImport4 = importDefault(4589) /* metro dependency 4589 */;
|
||||
const items2 = [styles.scrollContainerGradient];
|
||||
const {START, END} = (require(676) /* metro dependency 676: ConstantsIOS */).VerticalGradient;
|
||||
const defaultImport42 = ((Component) => <Component style={items2} start={START} end={END} colors={items3} pointerEvents="none" />)(defaultImport4);
|
||||
r11 = r12 ? <Text style={styles.helpText} variant="text-xs/medium" color="text-default">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.dA1dSf)}</Text> : null;
|
||||
const r10 = helpText !== '' ? <Text style={styles.helpText} variant="text-xs/medium" color="text-default">{helpText}{' '}{helpTextAdditional}</Text> : helpTextAdditional === '' ? null : <Text style={styles.helpText} variant="text-xs/medium" color="text-default">{helpText}{' '}{helpTextAdditional}</Text>;
|
||||
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
|
||||
const value24 = 'primary';
|
||||
return (
|
||||
<View style={styles.footer}>
|
||||
{defaultImport42}
|
||||
<View style={styles.footerContent}>
|
||||
{r11}
|
||||
{r10}
|
||||
<Button
|
||||
variant={r18 ? lastPrompt ? value24 : 'secondary' : value24}
|
||||
size="md"
|
||||
grow
|
||||
text={r14}
|
||||
onPress={handleOnPress}
|
||||
disabled={r12}
|
||||
/>
|
||||
</View>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function formattedNameHighlight(a0, a1) { // fn#52331, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6798:4297, offset: 0x013279d0, size: 67 bytes, params: 3, frame: 15
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
return (
|
||||
<Text
|
||||
variant="text-xs/medium"
|
||||
color="mobile-text-heading-primary"
|
||||
key={a1}
|
||||
>
|
||||
{a0}
|
||||
</Text>
|
||||
);
|
||||
}
|
||||
|
||||
function DropdownOption({option}) { // fn#52332, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6798:4434, offset: 0x01327a13, size: 369 bytes, params: 2, frame: 28
|
||||
const styles = useStyles();
|
||||
const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStores([EmojiStore], _fun52333);
|
||||
const view = <View style={styles.emojiContainer}>{((Component) => <Component textEmojiStyle={styles.optionTextEmoji} fastImageStyle={styles.optionImageEmoji} src={value3 != null ? (importDefault(1423) /* metro dependency 1423: AvatarUtils */).getEmojiURL({id: value3.id,
|
||||
animated: value3.animated,
|
||||
size: EMOJI_URL_BASE_SIZE}) : undefined} name={option.emoji?.name ?? ''} />)(importDefault(6739) /* metro dependency 6739: Emoji */)}</View>;
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
return (
|
||||
<View style={styles.dropdownPill}>
|
||||
{view}
|
||||
<Text variant="text-md/semibold">
|
||||
{option.title}
|
||||
</Text>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function RulesPrompt({guildId}) { // fn#52334, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6798:5108, offset: 0x01327bd6, size: 1107 bytes, params: 2, frame: 36
|
||||
var r9;
|
||||
var r0;
|
||||
var PRIMARY_130;
|
||||
var PRIMARY_600;
|
||||
var SafeAreaPaddingView;
|
||||
var flex;
|
||||
var object3;
|
||||
var items3;
|
||||
var object5;
|
||||
var Text;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
var string;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
var items5;
|
||||
var Button;
|
||||
var items6;
|
||||
const VerticalGradient = (require(676) /* metro dependency 676: ConstantsIOS */).VerticalGradient;
|
||||
var value;
|
||||
const styles = useStyles();
|
||||
const env0_1 = (require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation();
|
||||
const fluxModule = require(566) /* metro dependency 566: flux */;
|
||||
let useStateFromStores = fluxModule.useStateFromStores;
|
||||
let object = [MemberVerificationFormStore];
|
||||
const rulesPrompt = Reflect.apply(useStateFromStores, fluxModule, [object, function() {
|
||||
return MemberVerificationFormStore.getRulesPrompt(guildId);
|
||||
}]);
|
||||
const env0_3 = fluxModule.useStateFromStores([GuildStore], _fun52336);
|
||||
const bottom = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)().bottom;
|
||||
const value2 = 64 + bottom + 8;
|
||||
const moduleValue4 = fluxModule;
|
||||
useStateFromStores = moduleValue4.useStateFromStores;
|
||||
const [property, env0_5] = env0_3(Reflect.apply(useStateFromStores, moduleValue4, [[MemberVerificationFormStore],
|
||||
function() {
|
||||
return MemberVerificationFormStore.get(guildId);
|
||||
}]).useState(false), 2);
|
||||
const isThemeDark2 = (require(4002) /* metro dependency 4002: shared */).isThemeDark((importDefault(4048) /* metro dependency 4048: useTheme */)());
|
||||
const colorUtilsModule = require(4000) /* metro dependency 4000: ColorUtils */;
|
||||
const hexWithOpacity = colorUtilsModule.hexWithOpacity;
|
||||
let unsafe_rawColors = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors;
|
||||
if (isThemeDark2) {
|
||||
PRIMARY_600 = unsafe_rawColors.PRIMARY_600;
|
||||
object = [Reflect.apply(hexWithOpacity, colorUtilsModule, [PRIMARY_600, 0])];
|
||||
unsafe_rawColors = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors;
|
||||
PRIMARY_600 = unsafe_rawColors.PRIMARY_600;
|
||||
object[1] = PRIMARY_600;
|
||||
r9 = object;
|
||||
} else {
|
||||
PRIMARY_130 = unsafe_rawColors.PRIMARY_130;
|
||||
object = [Reflect.apply(hexWithOpacity, colorUtilsModule, [PRIMARY_130, 0])];
|
||||
unsafe_rawColors = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors;
|
||||
PRIMARY_130 = unsafe_rawColors.PRIMARY_130;
|
||||
object[1] = PRIMARY_130;
|
||||
r9 = object;
|
||||
}
|
||||
if (rulesPrompt == null) {
|
||||
r0 = null;
|
||||
} else {
|
||||
SafeAreaPaddingView = (require(6618) /* metro dependency 6618: SafeAreaView */).SafeAreaPaddingView;
|
||||
object = {top: true};
|
||||
flex = styles.flex;
|
||||
object.style = [flex, styles.container];
|
||||
object3 = {};
|
||||
flex = styles.flex;
|
||||
object3.style = flex;
|
||||
items3 = [<FlatList contentContainerStyle={[styles.scrollContainer,
|
||||
{paddingBottom: value2}]} data={[0]} renderItem={renderItem_52338} onEndReached={onEndReached} />];
|
||||
var viewProps = {style: [styles.footer, styles.footerContent, {paddingBottom: bottom}]};
|
||||
Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
string = intl.string;
|
||||
items5 = [<Text style={styles.footerText} variant="text-xs/medium">{property ? Reflect.apply(string, intl,
|
||||
[t.arAe3I]) : Reflect.apply(string, intl, [t.D0CVAc])}</Text>];
|
||||
Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
|
||||
items5[1] = <Button variant="primary" size="md" grow disabled={!property} text={intl.string(t['0KL0ot'])} onPress={onPress_52340} />;
|
||||
items3[1] = <View {...viewProps}>{items5}</View>;
|
||||
items6 = [<View {...object3}>{items3}</View>];
|
||||
value = importDefault(4589) /* metro dependency 4589 */;
|
||||
items6[1] = ((Component) => <Component style={[styles.scrollContainerGradient,
|
||||
{bottom: value2}]} start={VerticalGradient.START} end={VerticalGradient.END} colors={r9} pointerEvents="none" />)(value);
|
||||
value = <SafeAreaPaddingView {...object}>{items6}</SafeAreaPaddingView>;
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function MultipleChoicePrompt({guildId, currentPrompt, lastPrompt, currentPromptIndex, numberOfPrompts, selectOption, handleOnPress}) { // fn#52341, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6798:6646, offset: 0x01328165, size: 391 bytes, params: 2, frame: 29
|
||||
const styles = useStyles();
|
||||
return (
|
||||
<>
|
||||
<ScrollView
|
||||
contentContainerStyle={[styles.scrollContainer,
|
||||
{paddingBottom: 64 + (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)().bottom + 48 + 48,
|
||||
position: 'relative'}]}
|
||||
>
|
||||
<PromptHeader
|
||||
currentPrompt={currentPrompt}
|
||||
numberOfPrompts={numberOfPrompts}
|
||||
currentPromptIndex={currentPromptIndex}
|
||||
/>
|
||||
<View>
|
||||
{currentPrompt.options.map(_fun52343)}
|
||||
</View>
|
||||
</ScrollView>
|
||||
<PromptFooter
|
||||
guildId={guildId}
|
||||
currentPrompt={currentPrompt}
|
||||
selectedOptionIds={(require(566) /* metro dependency 566: flux */).useStateFromStoresArray([GuildOnboardingPromptsStore],
|
||||
_fun52342, [guildId, currentPrompt])}
|
||||
handleOnPress={handleOnPress}
|
||||
lastPrompt={lastPrompt}
|
||||
/>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
function DropdownPrompt({guildId, currentPrompt, lastPrompt, currentPromptIndex, numberOfPrompts, selectOption, handleOnPress}) { // fn#52345, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6798:7403, offset: 0x013283cb, size: 694 bytes, params: 2, frame: 39
|
||||
const styles = useStyles();
|
||||
const bottom = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)().bottom;
|
||||
const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStoresArray([GuildOnboardingPromptsStore],
|
||||
_fun52346, [guildId, currentPrompt]);
|
||||
const r22 = currentPrompt == null || currentPrompt.options == null ? undefined : currentPrompt.options.filter(_fun52347);
|
||||
const value5 = env0_4.useCallback(_fun52348, [guildId, currentPrompt.id, selectOption]);
|
||||
const jsxRuntimeEnv0_17Binding = jsxRuntimeEnv0_17;
|
||||
const items2 = [styles.scrollContainer];
|
||||
items2[1] = {paddingBottom: 64 + bottom + 48 + 48, position: 'relative'};
|
||||
const promptHeader = <PromptHeader currentPrompt={currentPrompt} numberOfPrompts={numberOfPrompts} currentPromptIndex={currentPromptIndex} />;
|
||||
const PressableHighlight = (require(5278) /* metro dependency 5278: Pressables */).PressableHighlight;
|
||||
const items4 = [r22.length === 0 && ((Text) => <Text style={styles.emptyDropdownText} variant="text-sm/normal" color="text-muted">{'No answers selected.'}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)];
|
||||
items4[1] = r22.map(_fun52350);
|
||||
items4[2] = <View style={styles.dropdownIconContainer}><Image style={styles.dropdownIcon} source={importDefault(6759) /* metro dependency 6759 */} /></View>;
|
||||
return (
|
||||
<>
|
||||
<ScrollView contentContainerStyle={items2}>
|
||||
{promptHeader}
|
||||
<View>
|
||||
<PressableHighlight style={styles.dropdownContainer} onPress={value5}>
|
||||
{items4}
|
||||
</PressableHighlight>
|
||||
</View>
|
||||
</ScrollView>
|
||||
<PromptFooter
|
||||
guildId={guildId}
|
||||
currentPrompt={currentPrompt}
|
||||
selectedOptionIds={value3}
|
||||
handleOnPress={handleOnPress}
|
||||
lastPrompt={lastPrompt}
|
||||
/>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun52329() { // fn#52329, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6798:3269, offset: 0x01327926, size: 85 bytes, params: 1, frame: 13
|
||||
return env0_2 != null ? (require(5105) /* metro dependency 5105: GuildOnboardingUtils */).getSelectedRoleIds(env0_2) : new global.Set();
|
||||
}
|
||||
|
||||
function _fun52330() { // fn#52330, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6798:3339, offset: 0x0132797b, size: 85 bytes, params: 1, frame: 13
|
||||
return env0_2 != null ? (require(5105) /* metro dependency 5105: GuildOnboardingUtils */).getSelectedChannelIds(env0_2) : new global.Set();
|
||||
}
|
||||
|
||||
function _fun52333() { // fn#52333, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6798:4519, offset: 0x01327b84, size: 82 bytes, params: 1, frame: 14
|
||||
const emoji = option.emoji;
|
||||
const value2 = null;
|
||||
const value3 = undefined;
|
||||
return value2 != (value2 == emoji ? value3 : emoji.id) ? EmojiStore.getUsableCustomEmojiById(value2 == option.emoji ? value3 : option.emoji.id) : value2;
|
||||
}
|
||||
|
||||
function _fun52336() { // fn#52336, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6798:5275, offset: 0x01328044, size: 44 bytes, params: 1, frame: 11
|
||||
const value = environment.__proto__;
|
||||
return GuildStore.getGuild(guildId)?.rulesChannelId;
|
||||
}
|
||||
|
||||
function RulesPromptRenderItem() { // fn#52338, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6798:5921, owner: RulesPrompt.renderItem, offset: 0x0132808a, size: 65 bytes, params: 1, frame: 15
|
||||
const value = environment.__proto__;
|
||||
return ((Component) => <Component rules={rulesPrompt.values} rulesChannelId={env0_3} />)(importDefault(6621) /* metro dependency 6621: TermsFieldList */);
|
||||
}
|
||||
|
||||
function RulesPromptOnPress() { // fn#52340, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6798:6339, owner: RulesPrompt.onPress, offset: 0x013280dd, size: 136 bytes, params: 1, frame: 18
|
||||
var value2;
|
||||
var defaultImport;
|
||||
var submitVerificationForm;
|
||||
var guildIdBinding;
|
||||
var object3;
|
||||
var object4;
|
||||
var binding;
|
||||
if (env0_4 != null) {
|
||||
value2 = environment.__proto__;
|
||||
defaultImport = importDefault(6717) /* metro dependency 6717: MemberVerificationActionCreators */;
|
||||
submitVerificationForm = defaultImport.submitVerificationForm;
|
||||
guildIdBinding = guildId;
|
||||
object3 = {};
|
||||
copyDataProperties(object3, env0_4, undefined);
|
||||
object4 = {};
|
||||
copyDataProperties(object4, rulesPrompt, undefined);
|
||||
object4['response'] = true;
|
||||
object3['formFields'] = [object4];
|
||||
Reflect.apply(submitVerificationForm, defaultImport, [guildIdBinding, object3]);
|
||||
binding = env0_1;
|
||||
binding.push(GuildOnboardingModalStates.COMPLETED);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun52342() { // fn#52342, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6798:6858, offset: 0x013282ec, size: 53 bytes, params: 1, frame: 14
|
||||
return currentPrompt != null ? GuildOnboardingPromptsStore.getOnboardingResponsesForPrompt(guildId,
|
||||
currentPrompt.id) : [];
|
||||
}
|
||||
|
||||
function _fun52343(a0) { // fn#52343, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6798:7151, offset: 0x01328321, size: 116 bytes, params: 2, frame: 18
|
||||
var environment;
|
||||
const env0_0 = a0;
|
||||
let value = environment.__proto__;
|
||||
value = importDefault(6735) /* metro dependency 6735: GuildOnboardingPromptOptionButton */;
|
||||
const valueProps = {option: a0, guildId: guildId, onSelect: onSelect};
|
||||
const binding = env0_3;
|
||||
const value3 = binding.includes(a0.id);
|
||||
valueProps.selected = value3 != null && value3;
|
||||
return ((Component) => <Component {...valueProps} key={a0.id} />)(value);
|
||||
}
|
||||
|
||||
function _fun52347({id}) { // fn#52347, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6798:7724, offset: 0x01328681, size: 27 bytes, params: 2, frame: 11
|
||||
return env0_3.includes(id);
|
||||
}
|
||||
|
||||
function _fun52348() { // fn#52348, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6798:7763, offset: 0x0132869c, size: 119 bytes, params: 1, frame: 17
|
||||
var environment;
|
||||
let value = environment.__proto__;
|
||||
const defaultImport = importDefault(dependencyMap[34]);
|
||||
const openLazy = defaultImport.openLazy;
|
||||
value = require(dependencyMap[36]);
|
||||
value = value(dependencyMap[35], dependencyMap.paths);
|
||||
Reflect.apply(openLazy, defaultImport, [value, 'DropdownOptions', {guildId: guildId, promptId: currentPrompt.id,
|
||||
onSelect: function(a0, a1) {
|
||||
var value = a1;
|
||||
return selectOption(currentPrompt.id, a0.id, value != null && value);
|
||||
}}]);
|
||||
}
|
||||
|
||||
function _fun52350(a0) { // fn#52350, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6798:8341, offset: 0x01328745, size: 37 bytes, params: 2, frame: 15
|
||||
return <DropdownOption option={a0} key={a0.id} />;
|
||||
}
|
||||
|
||||
function onSelect(a0) { // fn#52344, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6798:7208, offset: 0x01328395, size: 54 bytes, params: 2, frame: 16
|
||||
const value = a0;
|
||||
return selectOption(currentPrompt.id, env0_0.id, value != null && value);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,390 @@
|
||||
/* Metro module 6735; source: modules/guild_onboarding/native/GuildOnboardingPromptOptionButton.tsx; dependencies: [57, 31, 27, 4502, 6540, 1881, 33, 4501, 697, 566, 4017, 4504, 4577, 6736, 1244, 3860, 3874, 5278, 6739, 1423, 4573, 6742, 1305, 2] */
|
||||
function _fun53153(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#53153, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6913:6, offset: 0x0133f1ab, size: 573 bytes, params: 8, frame: 23
|
||||
var object3;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(57) /* metro dependency 57 */;
|
||||
const env0_4 = importAll(31) /* metro dependency 31 */;
|
||||
const env0_5 = (require(27) /* metro dependency 27 */).View;
|
||||
const accessibilityStore = importDefault(4502) /* metro dependency 4502: AccessibilityStore */;
|
||||
const emojiStore = importDefault(6540) /* metro dependency 6540: EmojiStore */;
|
||||
const env0_8 = (require(1881) /* metro dependency 1881: EmojiConstants */).EMOJI_URL_BASE_SIZE;
|
||||
let value = require(33) /* metro dependency 33 */;
|
||||
const env0_9 = value.jsx;
|
||||
const env0_10 = value.jsxs;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
object3 = {};
|
||||
const object4 = {'borderRadius': null, 'borderWidth': 2, 'borderStyle': 'solid', 'marginBottom': 8};
|
||||
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.md;
|
||||
object3.container = object4;
|
||||
object3.optionButton = {'paddingVertical': 12, 'paddingHorizontal': 16, 'display': 'flex', 'flexDirection': 'row',
|
||||
'alignItems': 'center'};
|
||||
object3.optionTextEmoji = {'fontSize': 24, 'lineHeight': 24, 'marginRight': 12, 'paddingTop': 5};
|
||||
object3.optionImageEmoji = {'height': 24, 'width': 24, 'marginRight': 12};
|
||||
object3.optionText = {flexShrink: 1};
|
||||
let BACKGROUND_BRAND = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BRAND;
|
||||
object3.checkIcon = {'position': 'absolute', 'top': -6, 'right': -6, 'width': 20, 'height': 20,
|
||||
'backgroundColor': null, 'borderRadius': 10, 'display': 'flex', 'alignItems': 'center',
|
||||
'justifyContent': 'center', backgroundColor: BACKGROUND_BRAND};
|
||||
object3.newBadgeWrapper = {'position': 'absolute', 'top': -6, 'right': -6};
|
||||
object3.newBadge = {fontWeight: 'bold'};
|
||||
BACKGROUND_BRAND = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BRAND;
|
||||
object3.roleCount = {'position': 'absolute', 'top': -6, 'right': 24, 'paddingVertical': 2, 'paddingHorizontal': 6,
|
||||
'backgroundColor': null, 'borderRadius': 10, 'display': 'flex', 'alignItems': 'center',
|
||||
'justifyContent': 'center', backgroundColor: BACKGROUND_BRAND};
|
||||
const env0_11 = Reflect.apply(createStyles, value, [object3]);
|
||||
object3 = {code: 'function GuildOnboardingPromptOptionButtonTsx1(){const{selected,withTiming,Easing,useReducedMotion,withSequence,withSpring}=this.__closure;const rawOpacity=selected?1:0;const opacity=withTiming(rawOpacity,{duration:150,easing:Easing.out(Easing.ease)});const rawScale=selected?1:0.7;const scale=useReducedMotion?rawScale:withSequence(withSpring(rawScale*1.2,{stiffness:80,damping:6,mass:0.3}),withSpring(rawScale,{stiffness:80,damping:6,mass:0.3}));return{opacity:opacity,transform:[{scale:scale}]};}'};
|
||||
object3 = {code: 'function GuildOnboardingPromptOptionButtonTsx2(){const{showMemberCount,withDelay,withTiming,Easing,useReducedMotion}=this.__closure;const rawOpacity=showMemberCount?1:0;const opacity=withDelay(showMemberCount?400:0,withTiming(rawOpacity,{duration:150,easing:Easing.out(Easing.ease)}));const rawTranslate=showMemberCount?0:16;const translateX=useReducedMotion?rawTranslate:withDelay(showMemberCount?400:0,withTiming(rawTranslate,{duration:200,easing:Easing.out(Easing.ease)}));return{opacity:opacity,transform:[{translateX:translateX}]};}'};
|
||||
object3 = {code: "function GuildOnboardingPromptOptionButtonTsx3(){const{useReducedMotion,Easing,withTiming,selected,selectedBorderColor,isNew,unselectedBrandBorderColor,unselectedBorderColor,selectedBackgroundColor}=this.__closure;const timing=useReducedMotion?{duration:0}:{duration:200,easing:Easing.out(Easing.ease)};return{borderColor:withTiming(selected?selectedBorderColor:isNew?unselectedBrandBorderColor:unselectedBorderColor,timing),backgroundColor:withTiming(selected?selectedBackgroundColor:'transparent',timing)};}"};
|
||||
object3 = {code: 'function GuildOnboardingPromptOptionButtonTsx4(){const{useReducedMotion,scale}=this.__closure;return useReducedMotion?{}:{transform:[{scale:scale.get()}]};}'};
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_onboarding/native/GuildOnboardingPromptOptionButton.tsx');
|
||||
exports.default = PromptOptionButton;
|
||||
}
|
||||
|
||||
function PromptOptionButton({guildId, option, selected, onSelect, suppressMemberCount, canBeNew}) { // fn#53154, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6913:2931, offset: 0x0133f3e8, size: 2519 bytes, params: 2, frame: 43
|
||||
var r23;
|
||||
var r24;
|
||||
var Math;
|
||||
var max;
|
||||
var value8;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
var Emoji;
|
||||
var TextBadge;
|
||||
const env0_3 = suppressMemberCount;
|
||||
const env0_12 = undefined;
|
||||
const env0_13 = undefined;
|
||||
const styles = useStyles();
|
||||
const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStores([EmojiStore], _fun53155);
|
||||
const useReducedMotion = (require(566) /* metro dependency 566: flux */).useStateFromStores([AccessibilityStore],
|
||||
function() {
|
||||
return AccessibilityStore.useReducedMotion;
|
||||
});
|
||||
const env0_4 = useReducedMotion;
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
let useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
|
||||
let closure = PromptOptionButtonD;
|
||||
object = {selected: selected};
|
||||
object.withTiming = (require(4504) /* metro dependency 4504: timing */).withTiming;
|
||||
const Easing = reanimatedRexportModule.Easing;
|
||||
object.Easing = Easing;
|
||||
object.useReducedMotion = useReducedMotion;
|
||||
object.withSequence = reanimatedRexportModule.withSequence;
|
||||
object.withSpring = (require(4577) /* metro dependency 4577: spring */).withSpring;
|
||||
closure.__closure = object;
|
||||
closure.__workletHash = 8281627194581;
|
||||
closure.__initData = env0_12;
|
||||
const value4 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
|
||||
if ((importDefault(6736) /* metro dependency 6736: useGuildRoleMemberCounts */)(guildId) == null) {
|
||||
r23 = 0;
|
||||
} else if (option.roleIds == null) {
|
||||
r23 = 0;
|
||||
} else {
|
||||
Math = global.Math;
|
||||
max = Math.max;
|
||||
value8 = option.roleIds.map(_fun53158);
|
||||
object = [];
|
||||
arraySpread(object, value8, 0, undefined);
|
||||
r23 = apply(max, object, Math, undefined);
|
||||
}
|
||||
const binding = env0_4;
|
||||
const [property, env0_7] = env0_3(binding.useState(false), 2);
|
||||
const env0_8 = binding.useRef(null);
|
||||
binding.useEffect(_fun53159, [property]);
|
||||
const moduleValue4 = reanimatedRexportModule;
|
||||
useAnimatedStyle = moduleValue4.useAnimatedStyle;
|
||||
closure = PromptOptionButtonK;
|
||||
object = {showMemberCount: property};
|
||||
object.withDelay = reanimatedRexportModule.withDelay;
|
||||
object.withTiming = (require(4504) /* metro dependency 4504: timing */).withTiming;
|
||||
object.Easing = Easing;
|
||||
object.useReducedMotion = useReducedMotion;
|
||||
closure.__closure = object;
|
||||
closure.__workletHash = 9518487706997;
|
||||
closure.__initData = env0_13;
|
||||
const value12 = Reflect.apply(useAnimatedStyle, moduleValue4, [closure]);
|
||||
const value13 = reanimatedRexportModule.useSharedValue(1);
|
||||
const r29 = canBeNew && option.isUnseen;
|
||||
const value16 = env0_4.useMemo(_fun53163,
|
||||
[(option == null || option.emoji == null ? undefined : option.emoji.id) != null || (option == null || option.emoji == null ? undefined : option.emoji.name) != null,
|
||||
option.emoji?.name, option.title, option.description]);
|
||||
const useTokenModule = require(3860) /* metro dependency 3860: useToken */;
|
||||
let useToken = useTokenModule.useToken;
|
||||
const BACKGROUND_BRAND = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BRAND;
|
||||
const value17 = Reflect.apply(useToken, useTokenModule, [BACKGROUND_BRAND]);
|
||||
const moduleValue7 = useTokenModule;
|
||||
useToken = moduleValue7.useToken;
|
||||
const BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
|
||||
const value18 = Reflect.apply(useToken, moduleValue7, [BORDER_SUBTLE]);
|
||||
const moduleValue8 = useTokenModule;
|
||||
useToken = moduleValue8.useToken;
|
||||
const BORDER_STRONG = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_STRONG;
|
||||
const value19 = Reflect.apply(useToken, moduleValue8, [BORDER_STRONG]);
|
||||
const env0_14 = value19;
|
||||
const moduleValue9 = useTokenModule;
|
||||
useToken = moduleValue9.useToken;
|
||||
const BACKGROUND_BASE_LOWEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWEST;
|
||||
const value20 = Reflect.apply(useToken, moduleValue9, [BACKGROUND_BASE_LOWEST]);
|
||||
const env0_15 = value20;
|
||||
const moduleValue10 = reanimatedRexportModule;
|
||||
useAnimatedStyle = moduleValue10.useAnimatedStyle;
|
||||
closure = PromptOptionButtonL;
|
||||
object = {useReducedMotion: useReducedMotion};
|
||||
object.Easing = Easing;
|
||||
object.withTiming = (require(4504) /* metro dependency 4504: timing */).withTiming;
|
||||
object.selected = selected;
|
||||
object.selectedBorderColor = value19;
|
||||
object.isNew = r29;
|
||||
object.unselectedBrandBorderColor = value17;
|
||||
object.unselectedBorderColor = value18;
|
||||
object.selectedBackgroundColor = value20;
|
||||
closure.__closure = object;
|
||||
closure.__workletHash = 17180171486485;
|
||||
closure.__initData = env0_14;
|
||||
const value21 = Reflect.apply(useAnimatedStyle, moduleValue10, [closure]);
|
||||
const moduleValue11 = reanimatedRexportModule;
|
||||
useAnimatedStyle = moduleValue11.useAnimatedStyle;
|
||||
closure = PromptOptionButtonX;
|
||||
closure.__closure = {useReducedMotion: useReducedMotion, scale: value13};
|
||||
closure.__workletHash = 319662489785;
|
||||
closure.__initData = env0_15;
|
||||
const value22 = Reflect.apply(useAnimatedStyle, moduleValue11, [closure]);
|
||||
const {accessibilityRole,
|
||||
accessibilityState} = (require(3874) /* metro dependency 3874: useA11yRolesNative */).useCheckboxA11yNative({checked: selected});
|
||||
const View2 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
|
||||
const items2 = [value22, value21];
|
||||
items2[2] = styles.container;
|
||||
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
|
||||
const pressableOpacityProps2 = {activeOpacity: 0.6, style: [styles.optionButton], onPress: onPress_53166,
|
||||
onPressIn: onPressIn_53167, onPressOut: onPressOut_53168, accessibilityRole: accessibilityRole,
|
||||
accessibilityState: accessibilityState, accessibilityLabel: value16,
|
||||
accessibilityHint: suppressMemberCount || r23 <= 0 ? undefined : intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.iyXfAn,
|
||||
{memberCount: r23})};
|
||||
let r16 = (option == null || option.emoji == null ? undefined : option.emoji.id) != null || (option == null || option.emoji == null ? undefined : option.emoji.name) != null;
|
||||
if (r16) {
|
||||
Emoji = importDefault(6739) /* metro dependency 6739: Emoji */;
|
||||
var defaultImportProps = {textEmojiStyle: styles.optionTextEmoji, fastImageStyle: styles.optionImageEmoji};
|
||||
r24 = value3 != null ? (importDefault(1423) /* metro dependency 1423: AvatarUtils */).getEmojiURL({id: value3.id,
|
||||
|
||||
animated: value3.animated, size: EMOJI_URL_BASE_SIZE}) : undefined;
|
||||
defaultImportProps.src = r24;
|
||||
r24 = (option == null || option.emoji == null ? undefined : option.emoji.name) ?? '';
|
||||
defaultImportProps.name = r24;
|
||||
r16 = <View style={{'display': 'flex', 'alignItems': 'center'}}><Emoji {...defaultImportProps} /></View>;
|
||||
}
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
const items5 = [<PressableOpacity {...pressableOpacityProps2}>{r16}<View style={styles.optionText}><Text variant="text-md/semibold" color="mobile-text-heading-primary">{option.title}</Text>{option.description != null && option.description.length > 0 && <Text variant="text-xs/medium" color="text-default">{option.description}</Text>}</View></PressableOpacity>];
|
||||
items5[1] = r23 > 0 ? ((View) => <View accessible={false} importantForAccessibility="no-hide-descendants" accessibilityElementsHidden style={[styles.roleCount,
|
||||
value12]}><Text variant="text-xs/semibold" color="always-white">{intl.format((require(1244) /* metro dependency 1244: indexNative */).t.EgKsZA,
|
||||
{memberCount: r23})}</Text></View>)((importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View) : null;
|
||||
const View4 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
|
||||
const items7 = [styles.checkIcon, value4];
|
||||
const CheckmarkSmallIcon = (require(6742) /* metro dependency 6742: CheckmarkSmallIcon */).CheckmarkSmallIcon;
|
||||
const WHITE = (importDefault(697) /* metro dependency 697: native */).colors.WHITE;
|
||||
items5[2] = <View4 style={items7}><CheckmarkSmallIcon size="xs" color={WHITE} /></View4>;
|
||||
let r5 = canBeNew && !selected && option.isUnseen;
|
||||
if (r5) {
|
||||
TextBadge = (require(1305) /* metro dependency 1305: native */).TextBadge;
|
||||
r5 = <TextBadge color={(require(1305) /* metro dependency 1305: native */).BadgeColors.BRAND} text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.y2b7CA)} style={styles.newBadgeWrapper} textStyle={styles.newBadge} />;
|
||||
}
|
||||
items5[3] = r5;
|
||||
return (
|
||||
<View2 style={items2}>
|
||||
{items5}
|
||||
</View2>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun53155() { // fn#53155, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6913:3096, offset: 0x0133fdbf, size: 108 bytes, params: 1, frame: 16
|
||||
const optionBinding = option;
|
||||
const value2 = null;
|
||||
const value3 = undefined;
|
||||
return value2 != (value2 == optionBinding || value2 == option.emoji ? value3 : option.emoji.id) ? EmojiStore.getUsableCustomEmojiById(value2 == option || value2 == option.emoji ? value3 : option.emoji.id) : value2;
|
||||
}
|
||||
|
||||
function PromptOptionButtonD() { // fn#53157, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6913:3329, owner: PromptOptionButton.D, offset: 0x0133fe3a, size: 286 bytes, params: 1, frame: 23
|
||||
var object2;
|
||||
var r1;
|
||||
var withSequence;
|
||||
var value9;
|
||||
var moduleValue3;
|
||||
var value;
|
||||
const r6 = selected ? 1 : 0;
|
||||
const timingModule = require(4504) /* metro dependency 4504: timing */;
|
||||
const withTiming = timingModule.withTiming;
|
||||
const Easing = (require(4017) /* metro dependency 4017: ReanimatedRexport */).Easing;
|
||||
const out = Easing.out;
|
||||
const Easing2 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).Easing;
|
||||
const value5 = Reflect.apply(withTiming, timingModule, [r6, {duration: 150, easing: Reflect.apply(out, Easing,
|
||||
[Easing2.ease])}]);
|
||||
const r9 = selected ? 1 : 0.7;
|
||||
object2 = {opacity: value5};
|
||||
if (useReducedMotion) {
|
||||
r1 = r9;
|
||||
} else {
|
||||
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
withSequence = value.withSequence;
|
||||
value9 = (require(4577) /* metro dependency 4577: spring */).withSpring(1.2 * r9, {'stiffness': 80,
|
||||
'damping': 6,
|
||||
'mass': 0.3});
|
||||
moduleValue3 = require(4577) /* metro dependency 4577: spring */;
|
||||
value = Reflect.apply(withSequence, value, [value9, moduleValue3.withSpring(r9, {'stiffness': 80, 'damping': 6,
|
||||
'mass': 0.3})]);
|
||||
r1 = value;
|
||||
}
|
||||
object2.transform = [{scale: r1}];
|
||||
return object2;
|
||||
}
|
||||
|
||||
function _fun53159() { // fn#53159, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6913:3995, offset: 0x0133ff58, size: 60 bytes, params: 1, frame: 15
|
||||
if (env0_6) {
|
||||
env0_8.current = global.setTimeout(_fun53160, 3000);
|
||||
return _fun53161;
|
||||
}
|
||||
}
|
||||
|
||||
function PromptOptionButtonK() { // fn#53162, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6913:4163, owner: PromptOptionButton.K, offset: 0x0133ffe0, size: 344 bytes, params: 1, frame: 26
|
||||
var object4;
|
||||
var r6;
|
||||
var moduleValue3;
|
||||
var object2;
|
||||
var value;
|
||||
const value2 = 0;
|
||||
const r10 = env0_6 ? 1 : value2;
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
let withDelay = reanimatedRexportModule.withDelay;
|
||||
let r1 = env0_6 ? 400 : value2;
|
||||
const timingModule = require(4504) /* metro dependency 4504: timing */;
|
||||
let withTiming = timingModule.withTiming;
|
||||
const Easing = reanimatedRexportModule.Easing;
|
||||
const out = Easing.out;
|
||||
const Easing2 = reanimatedRexportModule.Easing;
|
||||
const value6 = Reflect.apply(withDelay, reanimatedRexportModule, [r1, Reflect.apply(withTiming, timingModule, [r10,
|
||||
{duration: 150, easing: Reflect.apply(out, Easing, [Easing2.ease])}])]);
|
||||
const r9 = env0_6 ? value2 : 16;
|
||||
object4 = {opacity: value6};
|
||||
if (useReducedMotion) {
|
||||
r1 = r9;
|
||||
} else {
|
||||
moduleValue3 = reanimatedRexportModule;
|
||||
withDelay = moduleValue3.withDelay;
|
||||
r6 = env0_6 ? 400 : value2;
|
||||
value = require(4504) /* metro dependency 4504: timing */;
|
||||
withTiming = value.withTiming;
|
||||
object2 = {duration: 200};
|
||||
object2.easing = Easing.out((require(4017) /* metro dependency 4017: ReanimatedRexport */).Easing.ease);
|
||||
value = Reflect.apply(withDelay, moduleValue3, [r6, Reflect.apply(withTiming, value, [r9, object2])]);
|
||||
r1 = value;
|
||||
}
|
||||
object4.transform = [{translateX: r1}];
|
||||
return object4;
|
||||
}
|
||||
|
||||
function _fun53163() { // fn#53163, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6913:4814, offset: 0x01340138, size: 422 bytes, params: 1, frame: 18
|
||||
var name;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
var value4;
|
||||
var value5;
|
||||
const binding = env0_11;
|
||||
const optionBinding = option;
|
||||
if (binding) {
|
||||
name = optionBinding.emoji?.name;
|
||||
value4 = '';
|
||||
value5 = (name ?? value4).replace(RegExp('^:|:$', 'g'), value4);
|
||||
return option.description == null ? intl.formatToPlainString(t.rBPpAN, {emojiName: value5,
|
||||
title: option.title}) : option.description.length > 0 ? intl.formatToPlainString(t.nSzqkg,
|
||||
{emojiName: value5,
|
||||
title: option.title, description: option.description}) : intl.formatToPlainString(t.rBPpAN,
|
||||
{emojiName: value5,
|
||||
title: option.title});
|
||||
}
|
||||
return optionBinding.description == null ? option.title : option.description.length > 0 ? intl.formatToPlainString(t.U4lDOC,
|
||||
{title: option.title, description: option.description}) : option.title;
|
||||
}
|
||||
|
||||
function PromptOptionButtonL() { // fn#53164, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6913:5607, owner: PromptOptionButton.L, offset: 0x013402de, size: 222 bytes, params: 1, frame: 19
|
||||
var r4;
|
||||
var object2;
|
||||
var value2;
|
||||
var Easing;
|
||||
if (useReducedMotion) {
|
||||
r4 = {duration: 0};
|
||||
} else {
|
||||
object2 = {duration: 200};
|
||||
value2 = environment.__proto__;
|
||||
Easing = (require(4017) /* metro dependency 4017: ReanimatedRexport */).Easing;
|
||||
object2.easing = Easing.out((require(4017) /* metro dependency 4017: ReanimatedRexport */).Easing.ease);
|
||||
r4 = object2;
|
||||
}
|
||||
object2 = {};
|
||||
const timingModule = require(4504) /* metro dependency 4504: timing */;
|
||||
object2.borderColor = timingModule.withTiming(selected ? env0_14 : env0_10 ? env0_12 : env0_13, r4);
|
||||
const moduleValue2 = timingModule;
|
||||
object2.backgroundColor = moduleValue2.withTiming(selected ? env0_15 : 'transparent', r4);
|
||||
return object2;
|
||||
}
|
||||
|
||||
function PromptOptionButtonX() { // fn#53165, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6913:6108, owner: PromptOptionButton.X, offset: 0x013403bc, size: 50 bytes, params: 1, frame: 11
|
||||
var object;
|
||||
var object3;
|
||||
if (useReducedMotion) {
|
||||
object = {};
|
||||
} else {
|
||||
object3 = {};
|
||||
object3.scale = env0_9.get();
|
||||
object = {transform: [object3]};
|
||||
}
|
||||
return object;
|
||||
}
|
||||
|
||||
function PromptOptionButtonOnPress() { // fn#53166, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6913:6483, owner: PromptOptionButton.onPress, offset: 0x013403ee, size: 46 bytes, params: 1, frame: 12
|
||||
onSelect(!selected);
|
||||
if (!suppressMemberCount) {
|
||||
env0_7(!selected);
|
||||
}
|
||||
}
|
||||
|
||||
function PromptOptionButtonOnPressIn() { // fn#53167, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6913:6514, owner: PromptOptionButton.onPressIn, offset: 0x0134041c, size: 181 bytes, params: 1, frame: 23
|
||||
const binding = env0_9;
|
||||
const set = binding.set;
|
||||
let value = environment.__proto__;
|
||||
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
const withSequence = value.withSequence;
|
||||
const timingModule = require(4504) /* metro dependency 4504: timing */;
|
||||
let withTiming = timingModule.withTiming;
|
||||
const value2 = Reflect.apply(withTiming, timingModule, [1, {duration: 0}]);
|
||||
const moduleValue2 = timingModule;
|
||||
withTiming = moduleValue2.withTiming;
|
||||
const Easing = (require(4017) /* metro dependency 4017: ReanimatedRexport */).Easing;
|
||||
const out = Easing.out;
|
||||
const Easing2 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).Easing;
|
||||
Reflect.apply(set, binding, [Reflect.apply(withSequence, value, [value2, Reflect.apply(withTiming, moduleValue2,
|
||||
[1.02, {duration: 200, easing: Reflect.apply(out, Easing, [Easing2.ease])}])])]);
|
||||
}
|
||||
|
||||
function PromptOptionButtonOnPressOut() { // fn#53168, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6913:6687, owner: PromptOptionButton.onPressOut, offset: 0x013404d1, size: 122 bytes, params: 1, frame: 20
|
||||
const binding = env0_9;
|
||||
const set = binding.set;
|
||||
let value = environment.__proto__;
|
||||
value = require(4504) /* metro dependency 4504: timing */;
|
||||
const withTiming = value.withTiming;
|
||||
const Easing = (require(4017) /* metro dependency 4017: ReanimatedRexport */).Easing;
|
||||
const out = Easing.out;
|
||||
const Easing2 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).Easing;
|
||||
Reflect.apply(set, binding, [Reflect.apply(withTiming, value, [1, {duration: 100, easing: Reflect.apply(out, Easing,
|
||||
[Easing2.ease])}])]);
|
||||
}
|
||||
|
||||
function _fun53160() { // fn#53160, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6913:4034, offset: 0x0133ff94, size: 30 bytes, params: 1, frame: 12
|
||||
env1_7(false);
|
||||
env1_8.current = null;
|
||||
}
|
||||
|
||||
function _fun53161() { // fn#53161, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6913:4067, offset: 0x0133ffb2, size: 46 bytes, params: 1, frame: 11
|
||||
if (env1_8.current != null) {
|
||||
global.clearTimeout(env1_8.current);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,673 @@
|
||||
/* Metro module 6617; source: modules/guild_onboarding/native/GuildOnboardingPrompts.tsx; dependencies: [57, 5, 31, 27, 4502, 6616, 1379, 1867, 1934, 6603, 5106, 6600, 661, 33, 1230, 4501, 5314, 697, 1475, 4000, 5475, 4589, 676, 566, 1585, 1484, 4017, 6606, 5105, 1423, 1852, 683, 4863, 4504, 5282, 6618, 6620, 1360, 6760, 4573, 1244, 6766, 2] */
|
||||
function _fun52289(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#52289, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6795:6, offset: 0x01324d6c, size: 904 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 = importDefault(5) /* metro dependency 5 */;
|
||||
const env0_5 = importAll(31) /* metro dependency 31 */;
|
||||
let value = require(27) /* metro dependency 27 */;
|
||||
const env0_6 = value.StyleSheet;
|
||||
const env0_7 = value.View;
|
||||
const accessibilityStore = importDefault(4502) /* metro dependency 4502: AccessibilityStore */;
|
||||
const memberVerificationFormStore = importDefault(6616) /* metro dependency 6616: MemberVerificationFormStore */;
|
||||
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
|
||||
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
|
||||
const selectedChannelStore = importDefault(1934) /* metro dependency 1934: SelectedChannelStore */;
|
||||
const guildOnboardingPromptsStore = importDefault(6603) /* metro dependency 6603: GuildOnboardingPromptsStore */;
|
||||
const env0_14 = (require(5106) /* metro dependency 5106: GuildOnboardingPromptsConstants */).OnboardingPromptType;
|
||||
const env0_15 = (require(6600) /* metro dependency 6600: GuildOnboardingConstants */).GuildOnboardingModalStates;
|
||||
value = require(661) /* metro dependency 661: Constants */;
|
||||
const env0_16 = value.AnalyticEvents;
|
||||
const env0_17 = value.MarketingURLs;
|
||||
const env0_18 = value.Routes;
|
||||
value = require(33) /* metro dependency 33 */;
|
||||
const env0_19 = value.jsx;
|
||||
const env0_20 = value.Fragment;
|
||||
const env0_21 = value.jsxs;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
object2 = {};
|
||||
object2.flex = {flex: 1};
|
||||
const object4 = {'display': 'flex', 'flex': 1, 'flexGrow': 1};
|
||||
const NAV_BAR_HEIGHT = (require(5314) /* metro dependency 5314: NavigatorConstantsNative */).NAV_BAR_HEIGHT;
|
||||
object4.marginTop = NAV_BAR_HEIGHT;
|
||||
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object4.marginBottom = PX_16;
|
||||
const BACKGROUND_BASE_LOWER = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWER;
|
||||
object4.backgroundColor = BACKGROUND_BASE_LOWER;
|
||||
object2.container = object4;
|
||||
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object2.subtitle = {marginBottom: PX_16, opacity: 0.8};
|
||||
object2.onboardingTitle = {textAlign: 'center'};
|
||||
const object5 = {'position': 'absolute', 'paddingHorizontal': null, 'display': 'flex', 'justifyContent': 'center',
|
||||
'width': '100%'};
|
||||
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object5.paddingHorizontal = PX_16;
|
||||
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object5.marginBottom = PX_16;
|
||||
object2.onboardingPolicy = object5;
|
||||
object2.onboardingPolicyText = {textAlign: 'center'};
|
||||
object2.landingOverlay = {'position': 'absolute', 'width': '100%', 'height': '100%', 'display': 'flex',
|
||||
'justifyContent': 'center'};
|
||||
object2.artWrapper = {'height': 350, 'position': 'relative', 'display': 'flex', 'flexDirection': 'row',
|
||||
'alignItems': 'center', 'justifyContent': 'center'};
|
||||
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object2.landingBody = {'alignItems': 'center', 'marginTop': -24, paddingHorizontal: PX_16};
|
||||
object2.backgroundImage = {'position': 'absolute', 'height': '50%', 'width': '100%', 'top': 0};
|
||||
object2.backgroundColorGradient = {'position': 'absolute', 'height': '100%', 'width': '100%', 'top': 0};
|
||||
object2.darkColorGradient = {'position': 'absolute', 'height': '100%', 'width': '100%', 'top': 0};
|
||||
const env0_22 = Reflect.apply(createStyles, value, [object2]);
|
||||
object2 = {code: 'function GuildOnboardingPromptsTsx1(){const{showPrompts,withTiming,Easing,useReducedMotion}=this.__closure;const rawOpacity=showPrompts.get()?0:1;const opacity=withTiming(rawOpacity,{duration:300,easing:Easing.out(Easing.ease)});const rawTranslateY=!useReducedMotion&&showPrompts.get()?-80:0;const translateY=withTiming(rawTranslateY,{duration:300,easing:Easing.out(Easing.ease)});return{opacity:opacity,transform:[{translateY:translateY}]};}'};
|
||||
object2 = {code: 'function GuildOnboardingPromptsTsx2(){const{showPrompts,withDelay,withTiming,Easing,useReducedMotion}=this.__closure;const rawOpacity=showPrompts.get()?0:1;const opacity=withDelay(200,withTiming(rawOpacity,{duration:300,easing:Easing.out(Easing.ease)}));const rawTranslateY=!useReducedMotion&&showPrompts.get()?-80:0;const translateY=withDelay(200,withTiming(rawTranslateY,{duration:300,easing:Easing.out(Easing.ease)}));return{opacity:opacity,transform:[{translateY:translateY}]};}'};
|
||||
object2 = {code: 'function GuildOnboardingPromptsTsx3(){const{showPrompts,withDelay,withTiming,Easing}=this.__closure;const rawOpacity=showPrompts.get()?0:1;const opacity=withDelay(200,withTiming(rawOpacity,{duration:300,easing:Easing.out(Easing.ease)}));return{opacity:opacity};}'};
|
||||
object2 = {code: 'function GuildOnboardingPromptsTsx4(){const{showPrompts,withDelay,withTiming,Easing}=this.__closure;const rawOpacity=showPrompts.get()?0:1;const opacity=withDelay(200,withTiming(rawOpacity,{duration:300,easing:Easing.out(Easing.ease)}));return{opacity:opacity};}'};
|
||||
object2 = {code: 'function GuildOnboardingPromptsTsx5(){const{showPrompts,withDelay,withTiming,Easing,useReducedMotion}=this.__closure;const rawOpacity=showPrompts.get()?1:0;const opacity=withDelay(600,withTiming(rawOpacity,{duration:300,easing:Easing.out(Easing.ease)}));const rawTranslateY=!useReducedMotion&&!showPrompts.get()?80:0;const translateY=withDelay(600,withTiming(rawTranslateY,{duration:300,easing:Easing.out(Easing.ease)}));return{opacity:opacity,transform:[{translateY:translateY}]};}'};
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_onboarding/native/GuildOnboardingPrompts.tsx');
|
||||
exports.default = GuildOnboardingPrompt;
|
||||
}
|
||||
|
||||
function _getBackgroundGradientColor() { // fn#52290, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6795:1432, offset: 0x013250f4, size: 48 bytes, params: 1, frame: 14
|
||||
return env0_4(_fun52292).apply(this, arguments);
|
||||
}
|
||||
|
||||
function BackgroundImageGradient({splashUrl, color}) { // fn#52293, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6795:1685, offset: 0x013251b7, size: 266 bytes, params: 2, frame: 23
|
||||
const styles = useStyles();
|
||||
const jsxRuntimeEnv0_20Binding = jsxRuntimeEnv0_20;
|
||||
const value2 = ((Component) => <Component source={{uri: splashUrl}} style={[styles.backgroundImage]} resizeMode="cover" />)(importDefault(5475) /* metro dependency 5475: FastImage */);
|
||||
const defaultImport2 = importDefault(4589) /* metro dependency 4589 */;
|
||||
const {START, END} = (require(676) /* metro dependency 676: ConstantsIOS */).VerticalGradient;
|
||||
let value = require(4000) /* metro dependency 4000: ColorUtils */;
|
||||
value = value.hexWithOpacity(color, 0.16);
|
||||
return (
|
||||
<>
|
||||
{value2}
|
||||
{((Component) => <Component style={styles.backgroundColorGradient} start={START} end={END} colors={[value,
|
||||
color]} />)(defaultImport2)}
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
function GuildOnboardingPrompt({guildId, currentPromptIdx, prompts, selectOption, onClose, landingAnimation, isFirstOpen, backShouldLeaveGuild}) { // fn#52294, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6795:4074, offset: 0x013252c1, size: 3095 bytes, params: 2, frame: 48
|
||||
var r34;
|
||||
var r23;
|
||||
var r18;
|
||||
var moduleValue8;
|
||||
var defaultImport;
|
||||
var getGuildSplashURL;
|
||||
var type;
|
||||
var moduleValue14;
|
||||
const env0_3 = onClose;
|
||||
const styles = useStyles();
|
||||
const fluxModule = require(566) /* metro dependency 566: flux */;
|
||||
let useStateFromStores = fluxModule.useStateFromStores;
|
||||
let object = [MemberVerificationFormStore];
|
||||
const rulesPrompt = Reflect.apply(useStateFromStores, fluxModule, [object, function() {
|
||||
return MemberVerificationFormStore.getRulesPrompt(guildId);
|
||||
}]);
|
||||
const env0_5 = rulesPrompt;
|
||||
const useReducedMotion = fluxModule.useStateFromStores([AccessibilityStore], function() {
|
||||
return AccessibilityStore.useReducedMotion;
|
||||
});
|
||||
const bottom = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)().bottom;
|
||||
const moduleValue3 = fluxModule;
|
||||
useStateFromStores = moduleValue3.useStateFromStores;
|
||||
const value3 = Reflect.apply(useStateFromStores, moduleValue3, [[GuildOnboardingPromptsStore], function() {
|
||||
return GuildOnboardingPromptsStore.getConnections(guildId);
|
||||
}]).length > 0;
|
||||
let r1 = isFirstOpen && currentPromptIdx === 0 && !value3;
|
||||
const value6 = (require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation();
|
||||
const value7 = prompts.length > 0;
|
||||
const property = prompts[currentPromptIdx];
|
||||
const value8 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(!r1);
|
||||
let binding = env0_5;
|
||||
const value9 = binding.useCallback(_fun52298, [guildId, prompts]);
|
||||
const guild = fluxModule.useStateFromStores([GuildStore], function() {
|
||||
return GuildStore.getGuild(guildId);
|
||||
});
|
||||
const value10 = fluxModule.useStateFromStoresArray([GuildOnboardingPromptsStore], _fun52300, [guildId, property]);
|
||||
const env0_16 = value10.length === 0 && property?.required;
|
||||
const value13 = currentPromptIdx + 1 >= prompts.length;
|
||||
if (value13) {
|
||||
moduleValue8 = require(5105) /* metro dependency 5105: GuildOnboardingUtils */;
|
||||
r34 = !moduleValue8.showRulesInOnboarding(guild, rulesPrompt);
|
||||
} else {
|
||||
r34 = value13;
|
||||
}
|
||||
binding = env0_5;
|
||||
const useState = binding.useState;
|
||||
let PRIMARY_800 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.PRIMARY_800;
|
||||
const value16 = env0_3(Reflect.apply(useState, binding, [PRIMARY_800]), 2);
|
||||
const property2 = value16[0];
|
||||
const env0_18 = value16[1];
|
||||
if (guild != null) {
|
||||
defaultImport = importDefault(1423) /* metro dependency 1423: AvatarUtils */;
|
||||
getGuildSplashURL = defaultImport.getGuildSplashURL;
|
||||
object = {};
|
||||
object.id = guild.id;
|
||||
object.splash = guild.splash;
|
||||
object.size = 400 * (importDefault(1852) /* metro dependency 1852: getDevicePixelRatioNative */)();
|
||||
r23 = Reflect.apply(getGuildSplashURL, defaultImport, [object]);
|
||||
} else {
|
||||
r23 = null;
|
||||
}
|
||||
binding = env0_5;
|
||||
binding.useEffect(_fun52301, [r23]);
|
||||
binding.useEffect(_fun52304, [guildId, value7, rulesPrompt, r1]);
|
||||
binding.useEffect(_fun52305, [value8, r1, value7, value3, onClose, value9, guildId]);
|
||||
binding.useEffect(_fun52307, [r1, value7, onClose]);
|
||||
r1 = value7 && prompts[0].required;
|
||||
binding = env0_5;
|
||||
binding.useEffect(_fun52308, [guildId, r1, currentPromptIdx]);
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
let useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
|
||||
let closure = GuildOnboardingPromptSt;
|
||||
object = {showPrompts: value8};
|
||||
object.withTiming = (require(4504) /* metro dependency 4504: timing */).withTiming;
|
||||
const Easing = reanimatedRexportModule.Easing;
|
||||
object.Easing = Easing;
|
||||
object.useReducedMotion = useReducedMotion;
|
||||
closure.__closure = object;
|
||||
closure.__workletHash = 6820086589932;
|
||||
closure.__initData = env0_24;
|
||||
const value20 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
|
||||
const moduleValue10 = reanimatedRexportModule;
|
||||
useAnimatedStyle = moduleValue10.useAnimatedStyle;
|
||||
closure = GuildOnboardingPromptRt;
|
||||
object = {showPrompts: value8};
|
||||
object.withDelay = reanimatedRexportModule.withDelay;
|
||||
object.withTiming = (require(4504) /* metro dependency 4504: timing */).withTiming;
|
||||
object.Easing = Easing;
|
||||
object.useReducedMotion = useReducedMotion;
|
||||
closure.__closure = object;
|
||||
closure.__workletHash = 3034833873876;
|
||||
closure.__initData = env0_25;
|
||||
const value21 = Reflect.apply(useAnimatedStyle, moduleValue10, [closure]);
|
||||
const moduleValue11 = reanimatedRexportModule;
|
||||
useAnimatedStyle = moduleValue11.useAnimatedStyle;
|
||||
closure = GuildOnboardingPromptLt;
|
||||
object = {showPrompts: value8};
|
||||
object.withDelay = reanimatedRexportModule.withDelay;
|
||||
object.withTiming = (require(4504) /* metro dependency 4504: timing */).withTiming;
|
||||
object.Easing = Easing;
|
||||
closure.__closure = object;
|
||||
closure.__workletHash = 2795589385440;
|
||||
closure.__initData = env0_26;
|
||||
const value22 = Reflect.apply(useAnimatedStyle, moduleValue11, [closure]);
|
||||
const moduleValue12 = reanimatedRexportModule;
|
||||
useAnimatedStyle = moduleValue12.useAnimatedStyle;
|
||||
closure = GuildOnboardingPromptCt;
|
||||
object = {showPrompts: value8};
|
||||
object.withDelay = reanimatedRexportModule.withDelay;
|
||||
object.withTiming = (require(4504) /* metro dependency 4504: timing */).withTiming;
|
||||
object.Easing = Easing;
|
||||
closure.__closure = object;
|
||||
closure.__workletHash = 13481450530727;
|
||||
closure.__initData = env0_27;
|
||||
const value23 = Reflect.apply(useAnimatedStyle, moduleValue12, [closure]);
|
||||
const moduleValue13 = reanimatedRexportModule;
|
||||
useAnimatedStyle = moduleValue13.useAnimatedStyle;
|
||||
closure = GuildOnboardingPromptDt;
|
||||
object = {showPrompts: value8};
|
||||
object.withDelay = reanimatedRexportModule.withDelay;
|
||||
object.withTiming = (require(4504) /* metro dependency 4504: timing */).withTiming;
|
||||
object.Easing = Easing;
|
||||
object.useReducedMotion = useReducedMotion;
|
||||
closure.__closure = object;
|
||||
closure.__workletHash = 14018549800735;
|
||||
closure.__initData = env0_28;
|
||||
const value24 = Reflect.apply(useAnimatedStyle, moduleValue13, [closure]);
|
||||
closure = handleOnPress;
|
||||
binding.useLayoutEffect(_fun52315, [value6, currentPromptIdx, value10, guildId, prompts, onClose,
|
||||
backShouldLeaveGuild, value3]);
|
||||
object = {style: styles.flex};
|
||||
const SafeAreaPaddingView = (require(6618) /* metro dependency 6618: SafeAreaView */).SafeAreaPaddingView;
|
||||
const items2 = [styles.flex];
|
||||
items2[1] = styles.container;
|
||||
const View2 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
|
||||
const items3 = [styles.flex, value24];
|
||||
if (value7) {
|
||||
if (property == null) {
|
||||
r18 = null;
|
||||
} else {
|
||||
type = property.type;
|
||||
if (OnboardingPromptType.MULTIPLE_CHOICE === type) {
|
||||
const MultipleChoicePrompt = (require(6620) /* metro dependency 6620: GuildOnboardingPrompt */).MultipleChoicePrompt;
|
||||
r18 = <MultipleChoicePrompt guildId={guildId} currentPrompt={property} lastPrompt={r34} currentPromptIndex={currentPromptIdx} numberOfPrompts={prompts.length} selectOption={selectOption} handleOnPress={closure} />;
|
||||
} else if (OnboardingPromptType.DROPDOWN === type) {
|
||||
const DropdownPrompt = (require(6620) /* metro dependency 6620: GuildOnboardingPrompt */).DropdownPrompt;
|
||||
r18 = <DropdownPrompt guildId={guildId} currentPrompt={property} lastPrompt={r34} currentPromptIndex={currentPromptIdx} numberOfPrompts={prompts.length} selectOption={selectOption} handleOnPress={closure} />;
|
||||
} else {
|
||||
moduleValue14 = require(1360) /* metro dependency 1360: GlobalUtils */;
|
||||
moduleValue14.assertNever(property.type);
|
||||
r18 = undefined;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
r18 = null;
|
||||
}
|
||||
const safeAreaPaddingView = <SafeAreaPaddingView top bottom style={items2}><View2 style={items3}>{r18}</View2></SafeAreaPaddingView>;
|
||||
const absoluteFill = StyleSheet.absoluteFill;
|
||||
const View3 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
|
||||
const items5 = [styles.flex];
|
||||
items5[1] = styles.landingOverlay;
|
||||
const View4 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
|
||||
const items6 = [styles.landingOverlay, value23];
|
||||
const r13 = r23 != null ? <BackgroundImageGradient splashUrl={r23} color={property2} /> : null;
|
||||
const defaultImport2 = importDefault(4589) /* metro dependency 4589 */;
|
||||
const {START, END} = (require(676) /* metro dependency 676: ConstantsIOS */).VerticalGradient;
|
||||
const colorUtilsModule = require(4000) /* metro dependency 4000: ColorUtils */;
|
||||
const hexWithOpacity = colorUtilsModule.hexWithOpacity;
|
||||
PRIMARY_800 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.PRIMARY_800;
|
||||
const items8 = [Reflect.apply(hexWithOpacity, colorUtilsModule, [PRIMARY_800, 0.5])];
|
||||
PRIMARY_800 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.PRIMARY_800;
|
||||
items8[1] = PRIMARY_800;
|
||||
const items9 = [<View4 style={items6}>{r13}{((Component) => <Component style={styles.darkColorGradient} start={START} end={END} colors={items8} />)(defaultImport2)}</View4>];
|
||||
const View5 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
|
||||
items9[1] = <View5 style={[styles.artWrapper,
|
||||
value20]}>{((Component) => <Component source={landingAnimation} autoPlay={!useReducedMotion} style={{width: '100%'}} />)(importDefault(6760) /* metro dependency 6760: LottieAnimationView */)}</View5>;
|
||||
const View6 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
|
||||
const items11 = [styles.landingBody, value21];
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
let format = intl.format;
|
||||
const O2bQlD = (require(1244) /* metro dependency 1244: indexNative */).t.O2bQlD;
|
||||
items9[2] = <View6 style={items11}><Text style={styles.subtitle} variant="text-md/semibold" color="always-white">{Reflect.apply(format,
|
||||
intl, [O2bQlD,
|
||||
{guildName: guild?.name ?? ''}])}</Text><Text style={styles.onboardingTitle} accessibilityRole="header" variant="heading-xl/semibold" color="always-white">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['Alcl/e'])}</Text></View6>;
|
||||
const view = <View3 style={items5} pointerEvents="none">{items9}</View3>;
|
||||
const View7 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
|
||||
const items14 = [styles.onboardingPolicy, value22];
|
||||
items14[2] = {bottom: bottom};
|
||||
const TextWithIOSLinkWorkaround = (require(6766) /* metro dependency 6766: TextWithIOSLinkWorkaround */).TextWithIOSLinkWorkaround;
|
||||
format = intl.format;
|
||||
const kI6UoD = (require(1244) /* metro dependency 1244: indexNative */).t.kI6UoD;
|
||||
const PRIVACY = MarketingURLs.PRIVACY;
|
||||
return (
|
||||
<View {...object}>
|
||||
{safeAreaPaddingView}
|
||||
<View style={absoluteFill} pointerEvents="none">
|
||||
{view}
|
||||
<View7 style={items14} pointerEvents="auto">
|
||||
<TextWithIOSLinkWorkaround
|
||||
style={styles.onboardingPolicyText}
|
||||
variant="heading-sm/normal"
|
||||
color="text-default"
|
||||
>
|
||||
{Reflect.apply(format, intl, [kI6UoD, {privacyLink: PRIVACY}])}
|
||||
</TextWithIOSLinkWorkaround>
|
||||
</View7>
|
||||
</View>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function* _fun52292(a0) { // fn#52292, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6795:1509, offset: 0x0132512d, size: 138 bytes, params: 2, frame: 19
|
||||
if (false) {
|
||||
return undefined;
|
||||
}
|
||||
value = environment.__proto__.__proto__;
|
||||
const value3 = env2_0(env2_2[18]);
|
||||
const getPaletteForAvatar = value3.getPaletteForAvatar;
|
||||
yield Reflect.apply(getPaletteForAvatar, value3, [a0]);
|
||||
const value4 = undefined;
|
||||
if (false) {
|
||||
return value4;
|
||||
}
|
||||
const value6 = env2_3(value4[0], 3);
|
||||
return env2_0(env2_2[19]).rgbToHex(value6[0], value6[1], value6[2]);
|
||||
}
|
||||
|
||||
function _fun52298() { // fn#52298, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6795:4560, offset: 0x01325f0e, size: 50 bytes, params: 1, frame: 14
|
||||
let value = environment.__proto__;
|
||||
value = importDefault(6606) /* metro dependency 6606: GuildOnboardingActionCreators */;
|
||||
value.completeOnboarding(guildId, prompts);
|
||||
}
|
||||
|
||||
function _fun52300() { // fn#52300, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6795:4702, offset: 0x01325f5b, size: 53 bytes, params: 1, frame: 14
|
||||
return env0_11 != null ? GuildOnboardingPromptsStore.getOnboardingResponsesForPrompt(guildId, env0_11.id) : [];
|
||||
}
|
||||
|
||||
function _fun52301() { // fn#52301, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6795:5050, offset: 0x01325f90, size: 50 bytes, params: 1, frame: 12
|
||||
if (env0_19 != null) {
|
||||
(function() {
|
||||
return _getBackgroundGradientColor.apply(this, arguments);
|
||||
})(env0_19).then(_fun52303);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun52304() { // fn#52304, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6795:5205, offset: 0x01325fe0, size: 224 bytes, params: 1, frame: 26
|
||||
var value2;
|
||||
var defaultImport;
|
||||
var track;
|
||||
var GUILD_ONBOARDING_STEP_VIEWED;
|
||||
var object2;
|
||||
var moduleValue;
|
||||
var collectGuildAnalyticsMetadata;
|
||||
var guildIdBinding;
|
||||
var defaultImport2;
|
||||
var GUILD_ONBOARDING_STEP_COMPLETED;
|
||||
var moduleValue2;
|
||||
if (env0_8) {
|
||||
value2 = environment.__proto__;
|
||||
defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
|
||||
track = defaultImport.track;
|
||||
GUILD_ONBOARDING_STEP_VIEWED = AnalyticEvents.GUILD_ONBOARDING_STEP_VIEWED;
|
||||
object2 = {};
|
||||
moduleValue = require(4863) /* metro dependency 4863: AppAnalyticsUtils */;
|
||||
collectGuildAnalyticsMetadata = moduleValue.collectGuildAnalyticsMetadata;
|
||||
guildIdBinding = guildId;
|
||||
copyDataProperties(object2, Reflect.apply(collectGuildAnalyticsMetadata, moduleValue, [guildIdBinding]),
|
||||
undefined);
|
||||
object2['step'] = -1;
|
||||
object2['required'] = true;
|
||||
Reflect.apply(track, defaultImport, [GUILD_ONBOARDING_STEP_VIEWED, object2]);
|
||||
defaultImport2 = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
|
||||
track = defaultImport2.track;
|
||||
GUILD_ONBOARDING_STEP_COMPLETED = AnalyticEvents.GUILD_ONBOARDING_STEP_COMPLETED;
|
||||
object2 = {};
|
||||
moduleValue2 = require(4863) /* metro dependency 4863: AppAnalyticsUtils */;
|
||||
collectGuildAnalyticsMetadata = moduleValue2.collectGuildAnalyticsMetadata;
|
||||
copyDataProperties(object2, Reflect.apply(collectGuildAnalyticsMetadata, moduleValue2, [guildIdBinding]),
|
||||
'required');
|
||||
object2['step'] = -1;
|
||||
object2['skipped'] = env0_10;
|
||||
object2['is_final_step'] = false;
|
||||
object2['in_onboarding'] = true;
|
||||
Reflect.apply(track, defaultImport2, [GUILD_ONBOARDING_STEP_COMPLETED, object2]);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun52305() { // fn#52305, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6795:5504, offset: 0x013260c0, size: 43 bytes, params: 1, frame: 13
|
||||
if (env0_8) {
|
||||
global.setTimeout(_fun52306, 2000);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun52307() { // fn#52307, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6795:5604, offset: 0x0132611f, size: 31 bytes, params: 1, frame: 10
|
||||
if (!(env0_8 || env0_10)) {
|
||||
onClose();
|
||||
}
|
||||
}
|
||||
|
||||
function _fun52308() { // fn#52308, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6795:5667, offset: 0x0132613e, size: 125 bytes, params: 1, frame: 19
|
||||
var value2;
|
||||
var defaultImport;
|
||||
var track;
|
||||
var GUILD_ONBOARDING_STEP_VIEWED;
|
||||
var object2;
|
||||
var moduleValue;
|
||||
if (currentPromptIdx === 0) {
|
||||
value2 = environment.__proto__;
|
||||
defaultImport = importDefault(dependencyMap[31]);
|
||||
track = defaultImport.track;
|
||||
GUILD_ONBOARDING_STEP_VIEWED = AnalyticEvents.GUILD_ONBOARDING_STEP_VIEWED;
|
||||
object2 = {};
|
||||
moduleValue = require(dependencyMap[32]);
|
||||
copyDataProperties(object2, moduleValue.collectGuildAnalyticsMetadata(guildId), dependencyMap);
|
||||
object2['step'] = 0;
|
||||
object2['required'] = env0_20;
|
||||
Reflect.apply(track, defaultImport, [GUILD_ONBOARDING_STEP_VIEWED, object2]);
|
||||
}
|
||||
}
|
||||
|
||||
function GuildOnboardingPromptSt() { // fn#52309, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6795:5857, owner: GuildOnboardingPrompt.st, offset: 0x013261bb, size: 273 bytes, params: 1, frame: 23
|
||||
var object2;
|
||||
const r6 = env0_12.get() ? 0 : 1;
|
||||
const timingModule = require(4504) /* metro dependency 4504: timing */;
|
||||
let withTiming = timingModule.withTiming;
|
||||
const Easing = (require(4017) /* metro dependency 4017: ReanimatedRexport */).Easing;
|
||||
let out = Easing.out;
|
||||
const Easing2 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).Easing;
|
||||
const value6 = Reflect.apply(withTiming, timingModule, [r6, {duration: 300, easing: Reflect.apply(out, Easing,
|
||||
[Easing2.ease])}]);
|
||||
const value7 = 0;
|
||||
const r5 = useReducedMotion ? value7 : env0_12.get() ? -80 : value7;
|
||||
object2 = {opacity: value6};
|
||||
const value = timingModule;
|
||||
withTiming = value.withTiming;
|
||||
out = Easing.out;
|
||||
const Easing3 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).Easing;
|
||||
object2.transform = [{translateY: Reflect.apply(withTiming, value, [r5, {duration: 300, easing: Reflect.apply(out,
|
||||
Easing, [Easing3.ease])}])}];
|
||||
return object2;
|
||||
}
|
||||
|
||||
function GuildOnboardingPromptRt() { // fn#52310, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6795:6312, owner: GuildOnboardingPrompt.rt, offset: 0x013262cc, size: 318 bytes, params: 1, frame: 25
|
||||
var object2;
|
||||
let r8 = env0_12.get() ? 0 : 1;
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
let withDelay = reanimatedRexportModule.withDelay;
|
||||
const timingModule = require(4504) /* metro dependency 4504: timing */;
|
||||
let withTiming = timingModule.withTiming;
|
||||
const Easing = reanimatedRexportModule.Easing;
|
||||
let out = Easing.out;
|
||||
const Easing2 = reanimatedRexportModule.Easing;
|
||||
const value7 = Reflect.apply(withDelay, reanimatedRexportModule, [200, Reflect.apply(withTiming, timingModule, [r8,
|
||||
{duration: 300, easing: Reflect.apply(out, Easing, [Easing2.ease])}])]);
|
||||
const value8 = 0;
|
||||
r8 = useReducedMotion ? value8 : env0_12.get() ? -80 : value8;
|
||||
object2 = {opacity: value7};
|
||||
const value = reanimatedRexportModule;
|
||||
withDelay = value.withDelay;
|
||||
const moduleValue3 = timingModule;
|
||||
withTiming = moduleValue3.withTiming;
|
||||
out = Easing.out;
|
||||
const Easing3 = reanimatedRexportModule.Easing;
|
||||
object2.transform = [{translateY: Reflect.apply(withDelay, value, [200, Reflect.apply(withTiming, moduleValue3, [r8,
|
||||
{duration: 300, easing: Reflect.apply(out, Easing, [Easing3.ease])}])])}];
|
||||
return object2;
|
||||
}
|
||||
|
||||
function GuildOnboardingPromptLt() { // fn#52311, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6795:6844, owner: GuildOnboardingPrompt.lt, offset: 0x0132640a, size: 159 bytes, params: 1, frame: 22
|
||||
const r6 = env0_12.get() ? 0 : 1;
|
||||
let value = environment.__proto__;
|
||||
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
const withDelay = value.withDelay;
|
||||
const timingModule = require(4504) /* metro dependency 4504: timing */;
|
||||
const withTiming = timingModule.withTiming;
|
||||
const Easing = (require(4017) /* metro dependency 4017: ReanimatedRexport */).Easing;
|
||||
const out = Easing.out;
|
||||
const Easing2 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).Easing;
|
||||
return {opacity: Reflect.apply(withDelay, value, [200, Reflect.apply(withTiming, timingModule, [r6, {duration: 300,
|
||||
easing: Reflect.apply(out, Easing, [Easing2.ease])}])])};
|
||||
}
|
||||
|
||||
function GuildOnboardingPromptDt() { // fn#52313, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6795:7550, owner: GuildOnboardingPrompt.dt, offset: 0x013264a9, size: 316 bytes, params: 1, frame: 26
|
||||
var object2;
|
||||
const value2 = env0_12.get();
|
||||
const value3 = 0;
|
||||
const r9 = value2 ? 1 : value3;
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
let withDelay = reanimatedRexportModule.withDelay;
|
||||
const timingModule = require(4504) /* metro dependency 4504: timing */;
|
||||
let withTiming = timingModule.withTiming;
|
||||
const Easing = reanimatedRexportModule.Easing;
|
||||
let out = Easing.out;
|
||||
const Easing2 = reanimatedRexportModule.Easing;
|
||||
const value7 = Reflect.apply(withDelay, reanimatedRexportModule, [600, Reflect.apply(withTiming, timingModule, [r9,
|
||||
{duration: 300, easing: Reflect.apply(out, Easing, [Easing2.ease])}])]);
|
||||
const r8 = useReducedMotion || env0_12.get() ? value3 : 80;
|
||||
object2 = {opacity: value7};
|
||||
const value = reanimatedRexportModule;
|
||||
withDelay = value.withDelay;
|
||||
const moduleValue3 = timingModule;
|
||||
withTiming = moduleValue3.withTiming;
|
||||
out = Easing.out;
|
||||
const Easing3 = reanimatedRexportModule.Easing;
|
||||
object2.transform = [{translateY: Reflect.apply(withDelay, value, [600, Reflect.apply(withTiming, moduleValue3, [r8,
|
||||
{duration: 300, easing: Reflect.apply(out, Easing, [Easing3.ease])}])])}];
|
||||
return object2;
|
||||
}
|
||||
|
||||
function handleOnPress() { // fn#52314, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6795:8060, owner: GuildOnboardingPrompt.handleOnPress, offset: 0x013265e5, size: 494 bytes, params: 1, frame: 23
|
||||
var value2;
|
||||
var defaultImport;
|
||||
var track;
|
||||
var GUILD_ONBOARDING_STEP_COMPLETED;
|
||||
var object2;
|
||||
var moduleValue;
|
||||
var currentPromptIdxBinding;
|
||||
var length;
|
||||
var defaultImport2;
|
||||
var GUILD_ONBOARDING_STEP_VIEWED;
|
||||
var moduleValue2;
|
||||
var value3;
|
||||
var moduleValue3;
|
||||
var binding;
|
||||
if (!env0_16) {
|
||||
value2 = environment.__proto__;
|
||||
if (env0_17) {
|
||||
binding = env0_9;
|
||||
binding.push(GuildOnboardingModalStates.COMPLETED);
|
||||
} else {
|
||||
defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
|
||||
track = defaultImport.track;
|
||||
GUILD_ONBOARDING_STEP_COMPLETED = AnalyticEvents.GUILD_ONBOARDING_STEP_COMPLETED;
|
||||
object2 = {};
|
||||
moduleValue = require(4863) /* metro dependency 4863: AppAnalyticsUtils */;
|
||||
copyDataProperties(object2, moduleValue.collectGuildAnalyticsMetadata(guildId), undefined);
|
||||
object2['step'] = currentPromptIdx;
|
||||
length = env0_15.length;
|
||||
object2['options_selected'] = length;
|
||||
length = env0_15.length;
|
||||
object2['skipped'] = length === 0;
|
||||
object2['back'] = false;
|
||||
object2['in_onboarding'] = true;
|
||||
object2['is_final_step'] = false;
|
||||
Reflect.apply(track, defaultImport, [GUILD_ONBOARDING_STEP_COMPLETED, object2]);
|
||||
length = prompts.length;
|
||||
if (currentPromptIdxBinding < length - 1) {
|
||||
defaultImport2 = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
|
||||
track = defaultImport2.track;
|
||||
GUILD_ONBOARDING_STEP_VIEWED = AnalyticEvents.GUILD_ONBOARDING_STEP_VIEWED;
|
||||
object2 = {};
|
||||
moduleValue2 = require(4863) /* metro dependency 4863: AppAnalyticsUtils */;
|
||||
copyDataProperties(object2, moduleValue2.collectGuildAnalyticsMetadata(guildId), true);
|
||||
currentPromptIdxBinding = currentPromptIdx;
|
||||
object2['step'] = currentPromptIdxBinding + 1;
|
||||
object2['required'] = prompts[currentPromptIdxBinding + 1].required;
|
||||
Reflect.apply(track, defaultImport2, [GUILD_ONBOARDING_STEP_VIEWED, object2]);
|
||||
}
|
||||
value3 = currentPromptIdx + 1;
|
||||
length = prompts.length;
|
||||
if (value3 < length) {
|
||||
binding = env0_9;
|
||||
binding.push(GuildOnboardingModalStates.PROMPT, {currentPrompt: currentPromptIdx + 1});
|
||||
} else {
|
||||
moduleValue3 = require(5105) /* metro dependency 5105: GuildOnboardingUtils */;
|
||||
if (moduleValue3.showRulesInOnboarding(guild, rulesPrompt)) {
|
||||
binding = env0_9;
|
||||
binding.push(GuildOnboardingModalStates.RULES);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function _fun52315() { // fn#52315, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6795:8559, offset: 0x013267d3, size: 199 bytes, params: 1, frame: 16
|
||||
const r3 = currentPromptIdx !== 0 || result ? currentPromptIdx !== 0 ? (require(5282) /* metro dependency 5282: NavigatorHeaderNative */).getHeaderBackButton(_fun52317,
|
||||
true) : result ? (require(5282) /* metro dependency 5282: NavigatorHeaderNative */).getHeaderBackButton(_fun52316,
|
||||
true) : (require(5282) /* metro dependency 5282: NavigatorHeaderNative */).getHeaderBackButton(_fun52317,
|
||||
true) : (require(5282) /* metro dependency 5282: NavigatorHeaderNative */).getHeaderCloseButton(_fun52318);
|
||||
const binding = env0_9;
|
||||
binding.setOptions({headerLeft: r3});
|
||||
}
|
||||
|
||||
function _fun52306() { // fn#52306, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6795:5524, offset: 0x013260eb, size: 52 bytes, params: 1, frame: 11
|
||||
if (env1_10) {
|
||||
env1_12.set(true);
|
||||
} else {
|
||||
onClose();
|
||||
env1_13();
|
||||
}
|
||||
}
|
||||
|
||||
function _fun52316() { // fn#52316, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6795:8620, offset: 0x0132689a, size: 178 bytes, params: 1, frame: 19
|
||||
let value = environment.__proto__.__proto__;
|
||||
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
|
||||
const track = defaultImport.track;
|
||||
const GUILD_ONBOARDING_STEP_COMPLETED = AnalyticEvents.GUILD_ONBOARDING_STEP_COMPLETED;
|
||||
const object2 = {};
|
||||
value = require(4863) /* metro dependency 4863: AppAnalyticsUtils */;
|
||||
copyDataProperties(object2, value.collectGuildAnalyticsMetadata(guildId), undefined);
|
||||
object2['step'] = 0;
|
||||
object2['skipped'] = false;
|
||||
object2['back'] = true;
|
||||
object2['options_selected'] = env1_15.length;
|
||||
object2['in_onboarding'] = true;
|
||||
object2['is_final_step'] = false;
|
||||
Reflect.apply(track, defaultImport, [GUILD_ONBOARDING_STEP_COMPLETED, object2]);
|
||||
env1_9.pop();
|
||||
}
|
||||
|
||||
function _fun52317() { // fn#52317, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6795:8852, offset: 0x0132694c, size: 274 bytes, params: 1, frame: 28
|
||||
let value = environment.__proto__.__proto__;
|
||||
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
|
||||
let track = defaultImport.track;
|
||||
const GUILD_ONBOARDING_STEP_COMPLETED = AnalyticEvents.GUILD_ONBOARDING_STEP_COMPLETED;
|
||||
let object2 = {};
|
||||
value = require(4863) /* metro dependency 4863: AppAnalyticsUtils */;
|
||||
const collectGuildAnalyticsMetadata = value.collectGuildAnalyticsMetadata;
|
||||
const guildIdBinding = guildId;
|
||||
copyDataProperties(object2, Reflect.apply(collectGuildAnalyticsMetadata, value, [guildIdBinding]), undefined);
|
||||
const currentPromptIdxBinding = currentPromptIdx;
|
||||
object2['step'] = currentPromptIdxBinding;
|
||||
object2['skipped'] = false;
|
||||
object2['back'] = true;
|
||||
const length = env1_15.length;
|
||||
object2['options_selected'] = length;
|
||||
object2['in_onboarding'] = true;
|
||||
object2['is_final_step'] = false;
|
||||
Reflect.apply(track, defaultImport, [GUILD_ONBOARDING_STEP_COMPLETED, object2]);
|
||||
value = defaultImport;
|
||||
track = value.track;
|
||||
const GUILD_ONBOARDING_STEP_VIEWED = AnalyticEvents.GUILD_ONBOARDING_STEP_VIEWED;
|
||||
object2 = {};
|
||||
const appAnalyticsUtilsModule = require(4863) /* metro dependency 4863: AppAnalyticsUtils */;
|
||||
copyDataProperties(object2, appAnalyticsUtilsModule.collectGuildAnalyticsMetadata(guildIdBinding), length);
|
||||
object2['step'] = currentPromptIdxBinding - 1;
|
||||
object2['required'] = prompts[currentPromptIdxBinding - 1].required;
|
||||
Reflect.apply(track, value, [GUILD_ONBOARDING_STEP_VIEWED, object2]);
|
||||
env1_9.pop();
|
||||
}
|
||||
|
||||
function _fun52318() { // fn#52318, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6795:9213, offset: 0x01326a5e, size: 338 bytes, params: 1, frame: 20
|
||||
var onCloseBinding;
|
||||
var channel;
|
||||
var moduleValue2;
|
||||
var moduleValue3;
|
||||
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
|
||||
const track = defaultImport.track;
|
||||
const GUILD_ONBOARDING_STEP_COMPLETED = AnalyticEvents.GUILD_ONBOARDING_STEP_COMPLETED;
|
||||
const object2 = {};
|
||||
const appAnalyticsUtilsModule = require(4863) /* metro dependency 4863: AppAnalyticsUtils */;
|
||||
copyDataProperties(object2, appAnalyticsUtilsModule.collectGuildAnalyticsMetadata(guildId), undefined);
|
||||
object2['step'] = 0;
|
||||
object2['skipped'] = true;
|
||||
object2['back'] = false;
|
||||
object2['options_selected'] = 0;
|
||||
object2['in_onboarding'] = true;
|
||||
object2['is_final_step'] = false;
|
||||
Reflect.apply(track, defaultImport, [GUILD_ONBOARDING_STEP_COMPLETED, object2]);
|
||||
if (backShouldLeaveGuild) {
|
||||
guildIdBinding = guildId;
|
||||
onCloseBinding = onClose;
|
||||
channel = ChannelStore.getChannel(SelectedChannelStore.getLastSelectedChannelId());
|
||||
if (channel == null) {
|
||||
moduleValue2 = require(1230) /* metro dependency 1230: router_utils */;
|
||||
moduleValue2.transitionTo(Routes.ME, {navigationReplace: true});
|
||||
} else if (channel.guild_id !== guildIdBinding) {
|
||||
moduleValue3 = require(1230) /* metro dependency 1230: router_utils */;
|
||||
moduleValue3.transitionTo(Routes.CHANNEL(channel.guild_id, channel.id));
|
||||
} else {
|
||||
moduleValue2 = require(1230) /* metro dependency 1230: router_utils */;
|
||||
moduleValue2.transitionTo(Routes.ME, {navigationReplace: true});
|
||||
}
|
||||
onCloseBinding();
|
||||
} else {
|
||||
onClose();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,108 @@
|
||||
/* Metro module 6786; source: modules/guild_onboarding/native/ProviderConnectionCard.tsx; dependencies: [5, 31, 661, 33, 4048, 4915, 1244, 6787, 683, 4863, 1423, 4002, 1305, 4056, 6785, 2] */
|
||||
function _fun53431(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#53431, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6964:6, offset: 0x01348e3d, size: 178 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 env0_4 = importAll(31) /* metro dependency 31 */;
|
||||
const env0_5 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
|
||||
const env0_6 = (require(33) /* metro dependency 33 */).jsx;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_onboarding/native/ProviderConnectionCard.tsx');
|
||||
exports.default = ProviderConnectionCard;
|
||||
}
|
||||
|
||||
function ProviderConnectionCard({connection, guildId, location}) { // fn#53432, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6964:258, offset: 0x01348eef, size: 422 bytes, params: 2, frame: 26
|
||||
var r10;
|
||||
var defaultImport;
|
||||
var intl;
|
||||
const value3 = (importDefault(4048) /* metro dependency 4048: useTheme */)();
|
||||
const env0_3 = value3;
|
||||
if (connection.provider_id != null) {
|
||||
defaultImport = importDefault(4915) /* metro dependency 4915: Platforms */;
|
||||
r10 = defaultImport.get(connection.provider_id)?.name;
|
||||
} else {
|
||||
r10 = null;
|
||||
}
|
||||
if (r10 == null) {
|
||||
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
r10 = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.NzCoRx);
|
||||
}
|
||||
const value7 = (require(6787) /* metro dependency 6787: useStartProviderConnection */).useStartProviderConnection(connection.provider_id);
|
||||
const hasConnection = value7.hasConnection;
|
||||
const canConnect = value7.canConnect;
|
||||
const startConnection = value7.startConnection;
|
||||
const env0_4 = startConnection;
|
||||
const loading = value7.loading;
|
||||
const binding = env0_4;
|
||||
const useCallback = binding.useCallback;
|
||||
return ((Component) => <Component displayName={r10} description={connection.description} icon={binding.useMemo(_fun53435,
|
||||
[connection.provider_id,
|
||||
value3])} isLoading={loading} isConnected={hasConnection} canConnect={canConnect} onConnect={Reflect.apply(useCallback,
|
||||
binding, [env0_3(_fun53434), [startConnection, guildId, connection.provider_id,
|
||||
location]])} />)(importDefault(6785) /* metro dependency 6785: ConnectionCardView */);
|
||||
}
|
||||
|
||||
function* _fun53434() { // fn#53434, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6964:611, offset: 0x0134909e, size: 192 bytes, params: 1, frame: 19
|
||||
if (false) {
|
||||
return undefined;
|
||||
}
|
||||
value = environment.__proto__.__proto__;
|
||||
const binding = env2_1;
|
||||
const binding2 = env2_2;
|
||||
const value3 = undefined;
|
||||
const value4 = binding(binding2[8]);
|
||||
const track = value4.track;
|
||||
const GUILD_ONBOARDING_CONNECTION_CLICKED = env2_5.GUILD_ONBOARDING_CONNECTION_CLICKED;
|
||||
const object2 = {};
|
||||
value = env2_0(binding2[9]);
|
||||
copyDataProperties(object2, value.collectGuildAnalyticsMetadata(importDefault), value);
|
||||
object2['connection_type'] = 'provider';
|
||||
object2['provider_id'] = require.provider_id ?? value3;
|
||||
object2['location'] = dependencyMap;
|
||||
Reflect.apply(track, value4, [GUILD_ONBOARDING_CONNECTION_CLICKED, object2]);
|
||||
yield env1_4('Guild Onboarding');
|
||||
return value3;
|
||||
}
|
||||
|
||||
function _fun53435() { // fn#53435, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6964:878, offset: 0x0134915e, size: 299 bytes, params: 1, frame: 19
|
||||
var icon;
|
||||
var r4;
|
||||
var value3;
|
||||
var value4;
|
||||
var defaultImport;
|
||||
var value5;
|
||||
var moduleValue;
|
||||
var makeSource;
|
||||
var value;
|
||||
const provider_id = connection.provider_id;
|
||||
const value2 = null;
|
||||
if (value2 != provider_id) {
|
||||
value3 = environment.__proto__;
|
||||
value4 = undefined;
|
||||
defaultImport = importDefault(4915) /* metro dependency 4915: Platforms */;
|
||||
value5 = defaultImport.get(connection.provider_id);
|
||||
moduleValue = require(1423) /* metro dependency 1423: AvatarUtils */;
|
||||
makeSource = moduleValue.makeSource;
|
||||
icon = value2 == value5 ? value4 : value5.icon;
|
||||
if (value2 != icon) {
|
||||
value = (require(4002) /* metro dependency 4002: shared */).isThemeDark(env0_3);
|
||||
icon = value5.icon;
|
||||
r4 = value ? icon.darkPNG : icon.lightPNG;
|
||||
} else {
|
||||
r4 = value2;
|
||||
}
|
||||
value = Reflect.apply(makeSource, moduleValue, [r4]);
|
||||
const Icon = (require(1305) /* metro dependency 1305: native */).Icon;
|
||||
return (
|
||||
<Icon
|
||||
source={value}
|
||||
style={{'width': 32, 'height': 32}}
|
||||
disableColor
|
||||
/>
|
||||
);
|
||||
}
|
||||
value = environment.__proto__;
|
||||
const LinkIcon = (require(4056) /* metro dependency 4056: LinkIcon */).LinkIcon;
|
||||
return <LinkIcon size="lg" color="text-subtle" />;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,261 @@
|
||||
/* Metro module 11355; source: modules/guild_onboarding/useBatchUpdateSelectOption.tsx; dependencies: [31, 4864, 6603, 670, 694, 22, 1360, 11356, 566, 6606, 1391, 2] */
|
||||
function _fun86965(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#86965, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11541:6, offset: 0x01fa9e30, size: 192 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 userGuildSettingsStore = importDefault(4864) /* metro dependency 4864: UserGuildSettingsStore */;
|
||||
const guildOnboardingPromptsStore = importDefault(6603) /* metro dependency 6603: GuildOnboardingPromptsStore */;
|
||||
const env0_6 = (require(670) /* metro dependency 670: UserSettingsConstants */).ChannelNotificationSettingsFlags;
|
||||
const env0_7 = {};
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_onboarding/useBatchUpdateSelectOption.tsx');
|
||||
exports.default = useBatchUpdateSelectOption;
|
||||
}
|
||||
|
||||
function useBatchUpdateSelectOption(a0) { // fn#86967, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11541:382, offset: 0x01fa9f26, size: 172 bytes, params: 2, frame: 18
|
||||
var object2;
|
||||
const env0_0 = a0;
|
||||
const value2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildOnboardingPromptsStore],
|
||||
_fun86968, [a0]);
|
||||
const binding = env0_3;
|
||||
binding.useEffect(_fun86969, [a0]);
|
||||
binding.useEffect(_fun86971, [a0, value2]);
|
||||
object2 = {};
|
||||
object2.handleSelectOption = binding.useCallback(_fun86972, [a0]);
|
||||
return object2;
|
||||
}
|
||||
|
||||
function _fun86968() { // fn#86968, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11541:459, offset: 0x01fa9fd2, size: 39 bytes, params: 1, frame: 12
|
||||
return GuildOnboardingPromptsStore.getPendingResponseOptions(env0_0) ?? env1_7;
|
||||
}
|
||||
|
||||
function _fun86969() { // fn#86969, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11541:549, offset: 0x01fa9ff9, size: 32 bytes, params: 1, frame: 11
|
||||
resetStoreState(env0_0);
|
||||
return _fun86970;
|
||||
}
|
||||
|
||||
function _fun86971() { // fn#86971, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11541:616, offset: 0x01faa030, size: 96 bytes, params: 1, frame: 13
|
||||
var value4;
|
||||
if (env0_1 != null && global.Object.keys(env0_1).length !== 0) {
|
||||
value4 = environment.__proto__;
|
||||
(importDefault(6606) /* metro dependency 6606: GuildOnboardingActionCreators */).updateOnboardingResponses(env0_0);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun86972(a0, a1, a2) { // fn#86972, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11541:738, offset: 0x01faa090, size: 297 bytes, params: 4, frame: 26
|
||||
var object2;
|
||||
var environment;
|
||||
let value = environment.__proto__;
|
||||
const getOnboardingResponses = GuildOnboardingPromptsStore.getOnboardingResponses;
|
||||
const binding = env0_0;
|
||||
const value3 = Reflect.apply(getOnboardingResponses, GuildOnboardingPromptsStore, [binding]);
|
||||
const {addedRoleIds, removedRoleIds} = getRoles_86973(a0, a1, a2, value3);
|
||||
const {addedChannelIds, removedChannelIds} = getChannels_86979({guildId: binding, prompt: a0, option: a1,
|
||||
selected: a2, responses: value3});
|
||||
object2 = {};
|
||||
copyDataProperties(object2, addedChannelIds.reduce(_fun86985, {}), a2);
|
||||
copyDataProperties(object2, removedChannelIds.reduce(_fun86986, {}), a2);
|
||||
value = importDefault(6606) /* metro dependency 6606: GuildOnboardingActionCreators */;
|
||||
value.selectOption(binding, a0.id, a1.id, a2);
|
||||
value = importDefault(694) /* metro dependency 694: Dispatcher */;
|
||||
value.dispatch({type: 'USER_GUILD_SETTINGS_CHANNEL_UPDATE_BULK', guildId: binding, overrides: object2});
|
||||
(importDefault(6606) /* metro dependency 6606: GuildOnboardingActionCreators */).updateRolesLocal(binding,
|
||||
addedRoleIds, removedRoleIds);
|
||||
}
|
||||
|
||||
function _fun86970() { // fn#86970, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11541:573, offset: 0x01faa019, size: 23 bytes, params: 1, frame: 11
|
||||
resetStoreState(env1_0);
|
||||
}
|
||||
|
||||
function getRoles_86973(a0, a1, a2, a3) { // fn#86973, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11541:784, offset: 0x01faa1b9, size: 449 bytes, params: 5, frame: 22
|
||||
var environment;
|
||||
var r6;
|
||||
var roleIds;
|
||||
var r4;
|
||||
var r1;
|
||||
var r2;
|
||||
var filter;
|
||||
var value;
|
||||
var value2;
|
||||
var value3;
|
||||
const isNotNullish = (require(1360) /* metro dependency 1360: GlobalUtils */).isNotNullish;
|
||||
var difference;
|
||||
var value7;
|
||||
var value8;
|
||||
var defaultImport2;
|
||||
var value9;
|
||||
var defaultImport3;
|
||||
const env0_0 = a1;
|
||||
const env0_1 = a3;
|
||||
if (a0.singleSelect) {
|
||||
if (a2) {
|
||||
value = a0.options.find(function(a0) {
|
||||
return importAll.includes(a0.id);
|
||||
});
|
||||
value7 = environment.__proto__.__proto__;
|
||||
value8 = undefined;
|
||||
defaultImport2 = importDefault(22) /* metro dependency 22 */;
|
||||
difference = defaultImport2.difference;
|
||||
roleIds = a1.roleIds;
|
||||
r6 = roleIds ?? [];
|
||||
roleIds = value == null ? value8 : value.roleIds;
|
||||
value9 = Reflect.apply(difference, defaultImport2, [r6, roleIds ?? []]);
|
||||
defaultImport3 = importDefault(22) /* metro dependency 22 */;
|
||||
difference = defaultImport3.difference;
|
||||
roleIds = value == null ? value8 : value.roleIds;
|
||||
r4 = roleIds ?? [];
|
||||
roleIds = a1.roleIds;
|
||||
value = Reflect.apply(difference, defaultImport3, [r4, roleIds ?? []]);
|
||||
r1 = value;
|
||||
r2 = value9;
|
||||
} else if (a2) {
|
||||
r6 = a1.roleIds ?? [];
|
||||
r1 = [];
|
||||
r2 = r6;
|
||||
} else {
|
||||
value = a0.options.filter(_fun86975);
|
||||
value2 = value.filter(_fun86976);
|
||||
value = value.map(_fun86977);
|
||||
value = value.flat();
|
||||
filter = value.filter;
|
||||
value3 = environment.__proto__.__proto__;
|
||||
value = Reflect.apply(filter, value, [isNotNullish]);
|
||||
value = (importDefault(22) /* metro dependency 22 */).difference(value,
|
||||
value2.map(_fun86978).flat().filter(isNotNullish));
|
||||
r1 = value;
|
||||
r2 = [];
|
||||
}
|
||||
} else if (a2) {
|
||||
r6 = a1.roleIds ?? [];
|
||||
r1 = [];
|
||||
r2 = r6;
|
||||
} else {
|
||||
value = a0.options.filter(_fun86975);
|
||||
value2 = value.filter(_fun86976);
|
||||
value = value.map(_fun86977);
|
||||
value = value.flat();
|
||||
filter = value.filter;
|
||||
value3 = environment.__proto__.__proto__;
|
||||
value = Reflect.apply(filter, value, [isNotNullish]);
|
||||
value = (importDefault(22) /* metro dependency 22 */).difference(value,
|
||||
value2.map(_fun86978).flat().filter(isNotNullish));
|
||||
r1 = value;
|
||||
r2 = [];
|
||||
}
|
||||
return {addedRoleIds: r2, removedRoleIds: r1};
|
||||
}
|
||||
|
||||
function getChannels_86979({guildId, prompt, option, selected, responses}) { // fn#86979, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11541:1441, offset: 0x01faa394, size: 554 bytes, params: 2, frame: 24
|
||||
var r13;
|
||||
var environment;
|
||||
var r7;
|
||||
var channelIds;
|
||||
var r4;
|
||||
var r1;
|
||||
var r2;
|
||||
var filter;
|
||||
var value;
|
||||
var value2;
|
||||
var value3;
|
||||
const isNotNullish = (require(1360) /* metro dependency 1360: GlobalUtils */).isNotNullish;
|
||||
var items;
|
||||
var difference;
|
||||
var value7;
|
||||
var value8;
|
||||
var defaultImport2;
|
||||
var value9;
|
||||
var value10;
|
||||
var defaultImport3;
|
||||
var push;
|
||||
if (prompt.singleSelect) {
|
||||
if (selected) {
|
||||
value = prompt.options.find(function(a0) {
|
||||
return responses.includes(a0.id);
|
||||
});
|
||||
value7 = environment.__proto__.__proto__;
|
||||
value8 = undefined;
|
||||
defaultImport2 = importDefault(22) /* metro dependency 22 */;
|
||||
difference = defaultImport2.difference;
|
||||
channelIds = option.channelIds;
|
||||
r7 = channelIds ?? [];
|
||||
value9 = value == null;
|
||||
channelIds = value9 ? value8 : value.channelIds;
|
||||
value10 = Reflect.apply(difference, defaultImport2, [r7, channelIds ?? []]);
|
||||
defaultImport3 = importDefault(22) /* metro dependency 22 */;
|
||||
difference = defaultImport3.difference;
|
||||
channelIds = value == null ? value8 : value.channelIds;
|
||||
r4 = channelIds ?? [];
|
||||
channelIds = option.channelIds;
|
||||
value = Reflect.apply(difference, defaultImport3, [r4, channelIds ?? []]);
|
||||
r1 = value;
|
||||
r2 = value10;
|
||||
r13 = value9;
|
||||
} else if (selected) {
|
||||
r7 = option.channelIds ?? [];
|
||||
r1 = [];
|
||||
r2 = r7;
|
||||
} else {
|
||||
value = prompt.options.filter(_fun86981);
|
||||
value2 = value.filter(_fun86982);
|
||||
value = value.map(_fun86983);
|
||||
value = value.flat();
|
||||
filter = value.filter;
|
||||
value3 = environment.__proto__.__proto__;
|
||||
value = Reflect.apply(filter, value, [isNotNullish]);
|
||||
value = (importDefault(22) /* metro dependency 22 */).difference(value,
|
||||
value2.map(_fun86984).flat().filter(isNotNullish));
|
||||
r1 = value;
|
||||
r2 = [];
|
||||
}
|
||||
} else if (selected) {
|
||||
r7 = option.channelIds ?? [];
|
||||
r1 = [];
|
||||
r2 = r7;
|
||||
} else {
|
||||
value = prompt.options.filter(_fun86981);
|
||||
value2 = value.filter(_fun86982);
|
||||
value = value.map(_fun86983);
|
||||
value = value.flat();
|
||||
filter = value.filter;
|
||||
value3 = environment.__proto__.__proto__;
|
||||
value = Reflect.apply(filter, value, [isNotNullish]);
|
||||
value = (importDefault(22) /* metro dependency 22 */).difference(value,
|
||||
value2.map(_fun86984).flat().filter(isNotNullish));
|
||||
r1 = value;
|
||||
r2 = [];
|
||||
}
|
||||
value = environment.__proto__.__proto__;
|
||||
const optInOnboardingUtilsModule = require(11356) /* metro dependency 11356: OptInOnboardingUtils */;
|
||||
if (optInOnboardingUtilsModule.hasNotSetUpChannelOptIn(guildId)) {
|
||||
push = r2.push;
|
||||
value = GuildOnboardingPromptsStore.getDefaultChannelIds(guildId);
|
||||
items = [];
|
||||
arraySpread(items, value, 0, r13);
|
||||
apply(push, items, r2, r13);
|
||||
}
|
||||
return {addedChannelIds: r2, removedChannelIds: r1};
|
||||
}
|
||||
|
||||
function _fun86985(a0, a1) { // fn#86985, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11541:2312, offset: 0x01faa5be, size: 91 bytes, params: 3, frame: 18
|
||||
const channelIdFlags = UserGuildSettingsStore.getChannelIdFlags(env1_0, a1);
|
||||
const flagUtilsModule = require(1391) /* metro dependency 1391: FlagUtils */;
|
||||
const setFlag = flagUtilsModule.setFlag;
|
||||
const OPT_IN_ENABLED = ChannelNotificationSettingsFlags.OPT_IN_ENABLED;
|
||||
a0[a1] = {flags: Reflect.apply(setFlag, flagUtilsModule, [channelIdFlags, OPT_IN_ENABLED, true])};
|
||||
return a0;
|
||||
}
|
||||
|
||||
function _fun86986(a0, a1) { // fn#86986, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11541:2432, offset: 0x01faa619, size: 91 bytes, params: 3, frame: 18
|
||||
const channelIdFlags = UserGuildSettingsStore.getChannelIdFlags(env1_0, a1);
|
||||
const flagUtilsModule = require(1391) /* metro dependency 1391: FlagUtils */;
|
||||
const setFlag = flagUtilsModule.setFlag;
|
||||
const OPT_IN_ENABLED = ChannelNotificationSettingsFlags.OPT_IN_ENABLED;
|
||||
a0[a1] = {flags: Reflect.apply(setFlag, flagUtilsModule, [channelIdFlags, OPT_IN_ENABLED, false])};
|
||||
return a0;
|
||||
}
|
||||
|
||||
function _fun86976({id}) { // fn#86976, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11541:1185, offset: 0x01faa37a, size: 26 bytes, params: 2, frame: 2
|
||||
const id = require.id;
|
||||
return id !== id;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,220 @@
|
||||
/* Metro module 6608; source: modules/guild_onboarding/useFlattenedChannels.tsx; dependencies: [1379, 22, 1360, 566, 2] */
|
||||
function _fun52143(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#52143, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6786:6, offset: 0x013202ef, size: 151 bytes, params: 8, frame: 20
|
||||
const env0_0 = require;
|
||||
const _arrayLikeToArray_52146 = 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 = getFlattenedChannels;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_onboarding/useFlattenedChannels.tsx');
|
||||
exports.getFlattenedChannels = closure;
|
||||
exports.useFlattenedChannels = useFlattenedChannels;
|
||||
}
|
||||
|
||||
function _createForOfIteratorHelperLoose_52144(a0, a1) { // fn#52144, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6786:110, offset: 0x01320386, size: 370 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 _fun52145;
|
||||
}
|
||||
value = undefined;
|
||||
if (a0) {
|
||||
if (typeof a0 === 'string') {
|
||||
value = _arrayLikeToArray_52146(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_52146(a0, value);
|
||||
r6 = value;
|
||||
} else {
|
||||
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
|
||||
if (regexp.test(r9)) {
|
||||
value = _arrayLikeToArray_52146(a0, value);
|
||||
r6 = value;
|
||||
} else {
|
||||
r6 = value;
|
||||
}
|
||||
}
|
||||
r5 = r6;
|
||||
}
|
||||
} else {
|
||||
r5 = value;
|
||||
}
|
||||
if (r5) {
|
||||
if (r5) {
|
||||
}
|
||||
return _fun52145;
|
||||
}
|
||||
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 getFlattenedChannels(a0, a1, a2) { // fn#52147, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6786:1020, offset: 0x013204f8, size: 410 bytes, params: 4, frame: 21
|
||||
var r0;
|
||||
var r2;
|
||||
var value21;
|
||||
var value22;
|
||||
let value = a3;
|
||||
const env0_0 = a1;
|
||||
const env0_1 = a2;
|
||||
reducibleJoin2: while (true) {
|
||||
if (value !== undefined) {
|
||||
r0 = value;
|
||||
break reducibleJoin2;
|
||||
}
|
||||
value = false;
|
||||
r0 = value;
|
||||
break reducibleJoin2;
|
||||
}
|
||||
const defaultImport = importDefault(22) /* metro dependency 22 */;
|
||||
const getMutableGuildChannelsForGuild = ChannelStore.getMutableGuildChannelsForGuild;
|
||||
const env0_3 = defaultImport(Reflect.apply(getMutableGuildChannelsForGuild, ChannelStore,
|
||||
[a0])).values().groupBy('parent_id').value();
|
||||
const value7 = defaultImport(a2).map(function(a0) {
|
||||
return a0.isCategory() ? a0.id : a0.parent_id;
|
||||
});
|
||||
const filter = value7.filter;
|
||||
const isNotNullish = (require(1360) /* metro dependency 1360: GlobalUtils */).isNotNullish;
|
||||
const value14 = Reflect.apply(filter, value7, [isNotNullish]).uniq().map(function(a0) {
|
||||
return ChannelStore.getChannel(a0);
|
||||
}).filter(isNotNullish).sortBy('position').value();
|
||||
const Set = global.Set;
|
||||
const set = new Set(value14.map(function(a0) {
|
||||
return a0.id;
|
||||
}));
|
||||
const value19 = defaultImport.sortBy(a2.filter(_fun52151), function(a0) {
|
||||
var value = a0.isGuildVocal();
|
||||
var position = a0.position;
|
||||
return value ? position + 10000 : position;
|
||||
});
|
||||
const closure = getFlattenedChannels_loop;
|
||||
value = _createForOfIteratorHelperLoose_52144(value14);
|
||||
const value20 = value();
|
||||
let done = value20.done;
|
||||
if (!done) {
|
||||
r2 = value20;
|
||||
reducibleLoop3: while (true) {
|
||||
value21 = r2.value;
|
||||
closure(value21);
|
||||
value22 = value();
|
||||
done = value22.done;
|
||||
if (done) {
|
||||
break reducibleLoop3;
|
||||
}
|
||||
r2 = value22;
|
||||
continue reducibleLoop3;
|
||||
}
|
||||
}
|
||||
return value19;
|
||||
}
|
||||
|
||||
function useFlattenedChannels(a0, a1) { // fn#52156, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6786:1921, offset: 0x013207f8, size: 85 bytes, params: 3, frame: 15
|
||||
const value = a2;
|
||||
const env0_0 = a0;
|
||||
const env0_1 = a1;
|
||||
const env0_2 = value !== undefined ? value : false;
|
||||
return (require(566) /* metro dependency 566: flux */).useStateFromStoresArray([ChannelStore], _fun52157);
|
||||
}
|
||||
|
||||
function _fun52151(a0) { // fn#52151, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6786:1367, offset: 0x013206c7, size: 62 bytes, params: 2, frame: 13
|
||||
return !(a0.isCategory() || a0.parent_id != null && env0_4.has(a0.parent_id));
|
||||
}
|
||||
|
||||
function getFlattenedChannels_loop(a0) { // fn#52153, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6786:1513, owner: getFlattenedChannels._loop, offset: 0x0132072b, size: 178 bytes, params: 2, frame: 17
|
||||
const env0_0 = a0;
|
||||
if (!env0_2) {
|
||||
env0_5.push(a0);
|
||||
}
|
||||
let r5 = require.has(a0.id) ? env0_3[a0.id] : importDefault.filter(_fun52154);
|
||||
const defaultImport = importDefault(22) /* metro dependency 22 */;
|
||||
const sortBy = defaultImport.sortBy;
|
||||
r5 = r5 ?? [];
|
||||
const value4 = Reflect.apply(sortBy, defaultImport, [r5, function(a0) {
|
||||
var value = a0.isGuildVocal();
|
||||
var position = a0.position;
|
||||
return value ? position + 10000 : position;
|
||||
}]);
|
||||
const binding = env0_5;
|
||||
const push = binding.push;
|
||||
const items2 = [];
|
||||
arraySpread(items2, value4, 0, null);
|
||||
apply(push, items2, binding, null);
|
||||
}
|
||||
|
||||
function _fun52157() { // fn#52157, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6786:2006, offset: 0x0132084d, size: 106 bytes, params: 1, frame: 19
|
||||
const Array = global.Array;
|
||||
const value3 = Array.from(require).map(function(a0) {
|
||||
return ChannelStore.getChannel(a0);
|
||||
});
|
||||
return getFlattenedChannels(env0_0, require,
|
||||
value3.filter((require(1360) /* metro dependency 1360: GlobalUtils */).isNotNullish), env0_2);
|
||||
}
|
||||
|
||||
function _fun52154({parent_id}) { // fn#52154, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6786:1574, offset: 0x013207dd, size: 27 bytes, params: 2, frame: 2
|
||||
return parent_id === env0_0.id;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
/* Metro module 6941; source: modules/guild_onboarding/useGuildOnboardingAvailable.tsx; dependencies: [1937, 661, 566, 2] */
|
||||
function _fun55178(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#55178, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7119:6, offset: 0x0137807a, size: 145 bytes, params: 8, frame: 18
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const impersonateStore = importDefault(1937) /* metro dependency 1937: ImpersonateStore */;
|
||||
const env0_3 = (require(661) /* metro dependency 661: Constants */).GuildFeatures;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_onboarding/useGuildOnboardingAvailable.tsx');
|
||||
exports.default = useGuildOnboardingAvailable;
|
||||
exports.isGuildOnboardingAvailable = isGuildOnboardingAvailable;
|
||||
}
|
||||
|
||||
function useGuildOnboardingAvailable(a0) { // fn#55179, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7119:230, offset: 0x0137810b, size: 107 bytes, params: 2, frame: 17
|
||||
const env0_0 = a0;
|
||||
return (require(566) /* metro dependency 566: flux */).useStateFromStores([ImpersonateStore],
|
||||
_fun55180) || (a0 == null ? undefined : a0.features.has(GuildFeatures.GUILD_ONBOARDING_HAS_PROMPTS));
|
||||
}
|
||||
|
||||
function isGuildOnboardingAvailable(a0) { // fn#55181, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7119:528, offset: 0x013781cc, size: 89 bytes, params: 2, frame: 14
|
||||
if (a0 == null) {
|
||||
return false;
|
||||
}
|
||||
let r0 = ImpersonateStore.isFullServerPreview(a0.id) && ImpersonateStore.isOnboardingEnabled(a0.id);
|
||||
r0 = !r0 ? a0.features.has(GuildFeatures.GUILD_ONBOARDING_HAS_PROMPTS) : r0;
|
||||
return r0;
|
||||
}
|
||||
|
||||
function _fun55180() { // fn#55180, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7119:309, offset: 0x01378176, size: 86 bytes, params: 1, frame: 12
|
||||
if (env0_0?.id == null) {
|
||||
return false;
|
||||
}
|
||||
const isFullServerPreview = ImpersonateStore.isFullServerPreview;
|
||||
const binding = env0_0;
|
||||
return Reflect.apply(isFullServerPreview, ImpersonateStore,
|
||||
[binding.id]) && ImpersonateStore.isOnboardingEnabled(binding.id);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,385 @@
|
||||
/* Metro module 6734; source: modules/guild_onboarding/usePromptHelpText.tsx; dependencies: [1379, 1938, 3784, 3793, 1878, 661, 1244, 566, 4805, 2] */
|
||||
function _fun53137(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#53137, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6912:6, offset: 0x0133e95d, size: 220 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
|
||||
const guildRoleStore = importDefault(1938) /* metro dependency 1938: GuildRoleStore */;
|
||||
const permissionStore = importDefault(3784) /* metro dependency 3784: PermissionStore */;
|
||||
const relationshipStore = importDefault(3793) /* metro dependency 3793: RelationshipStore */;
|
||||
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
|
||||
const env0_7 = (require(661) /* metro dependency 661: Constants */).Permissions;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_onboarding/usePromptHelpText.tsx');
|
||||
exports.default = usePromptHelpText;
|
||||
exports.useCustomizeCommunityPromptHelpText = useCustomizeCommunityPromptHelpText;
|
||||
}
|
||||
|
||||
function formatRoleString(a0, a1, a2) { // fn#53138, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6912:168, offset: 0x0133ea39, size: 186 bytes, params: 4, frame: 20
|
||||
var r2;
|
||||
var r0;
|
||||
var intl;
|
||||
var format;
|
||||
var t;
|
||||
var object2;
|
||||
var Math;
|
||||
var max;
|
||||
let length = a0.length;
|
||||
if (length === 0) {
|
||||
r0 = '';
|
||||
} else {
|
||||
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
format = intl.format;
|
||||
t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
r2 = a2 ? t.cJZxWf : t.Kj5GIT;
|
||||
object2 = {};
|
||||
length = a0.length;
|
||||
object2.count = length;
|
||||
Math = global.Math;
|
||||
max = Math.max;
|
||||
length = a0.length;
|
||||
object2.extraCount = Reflect.apply(max, Math, [length - 2, 0]);
|
||||
object2.role1 = a0[0];
|
||||
object2.role2 = a0[1];
|
||||
object2.itemHook = a1;
|
||||
r0 = Reflect.apply(format, intl, [r2, object2]);
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function usePromptHelpText({guild, prompt, selectedRoleIds, selectedChannelIds, itemHook}) { // fn#53139, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6912:455, offset: 0x0133eaf3, size: 534 bytes, params: 2, frame: 28
|
||||
var r2;
|
||||
var r7;
|
||||
var r1;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
var value8;
|
||||
var format;
|
||||
var Rj841R;
|
||||
var Math;
|
||||
var max;
|
||||
let value = undefined;
|
||||
const id = guild == null ? value : guild.id;
|
||||
const fluxModule = require(566) /* metro dependency 566: flux */;
|
||||
let useStateFromStoresArray = fluxModule.useStateFromStoresArray;
|
||||
const value3 = Reflect.apply(useStateFromStoresArray, fluxModule, [[GuildRoleStore], _fun53140, [id,
|
||||
selectedRoleIds]]);
|
||||
const moduleValue2 = fluxModule;
|
||||
useStateFromStoresArray = moduleValue2.useStateFromStoresArray;
|
||||
object = [ChannelStore];
|
||||
object[1] = UserStore;
|
||||
object[2] = RelationshipStore;
|
||||
object[3] = PermissionStore;
|
||||
const value4 = Reflect.apply(useStateFromStoresArray, moduleValue2, [object, _fun53141]);
|
||||
const value5 = value3.map(function({name}) {
|
||||
return '@' + name;
|
||||
});
|
||||
if (prompt == null) {
|
||||
r2 = intl.string(t.JshhEl);
|
||||
} else if (prompt.singleSelect) {
|
||||
r2 = '';
|
||||
} else {
|
||||
r2 = intl.string(t.JshhEl);
|
||||
}
|
||||
let length = value4.length;
|
||||
if (length !== 0) {
|
||||
length = value4.length;
|
||||
value8 = '';
|
||||
if (length > 0) {
|
||||
length = value4.length;
|
||||
if (length === 0) {
|
||||
r7 = value8;
|
||||
} else {
|
||||
format = intl.format;
|
||||
Rj841R = t.Rj841R;
|
||||
object = {};
|
||||
length = value4.length;
|
||||
object.count = length;
|
||||
Math = global.Math;
|
||||
max = Math.max;
|
||||
length = value4.length;
|
||||
object.extraCount = Reflect.apply(max, Math, [length - 2, 0]);
|
||||
object.channel1 = value4[0];
|
||||
object.channel2 = value4[1];
|
||||
object.itemHook = itemHook;
|
||||
r7 = Reflect.apply(format, intl, [Rj841R, object]);
|
||||
}
|
||||
length = value5.length;
|
||||
r1 = length > 0 ? formatRoleString(value5, itemHook, true) : value8;
|
||||
r2 = r7;
|
||||
} else {
|
||||
r1 = value8;
|
||||
}
|
||||
} else {
|
||||
length = value5.length;
|
||||
if (length > 0) {
|
||||
value = formatRoleString(value5, itemHook);
|
||||
r1 = '';
|
||||
r2 = value;
|
||||
} else {
|
||||
length = value4.length;
|
||||
value8 = '';
|
||||
if (length > 0) {
|
||||
length = value4.length;
|
||||
if (length === 0) {
|
||||
r7 = value8;
|
||||
} else {
|
||||
format = intl.format;
|
||||
Rj841R = t.Rj841R;
|
||||
object = {};
|
||||
length = value4.length;
|
||||
object.count = length;
|
||||
Math = global.Math;
|
||||
max = Math.max;
|
||||
length = value4.length;
|
||||
object.extraCount = Reflect.apply(max, Math, [length - 2, 0]);
|
||||
object.channel1 = value4[0];
|
||||
object.channel2 = value4[1];
|
||||
object.itemHook = itemHook;
|
||||
r7 = Reflect.apply(format, intl, [Rj841R, object]);
|
||||
}
|
||||
length = value5.length;
|
||||
r1 = length > 0 ? formatRoleString(value5, itemHook, true) : value8;
|
||||
r2 = r7;
|
||||
} else {
|
||||
r1 = value8;
|
||||
}
|
||||
}
|
||||
}
|
||||
return {helpText: r2, helpTextAdditional: r1};
|
||||
}
|
||||
|
||||
function useCustomizeCommunityPromptHelpText({guild, prompt, selectedRoleIds, selectedChannelIds, itemHook}) { // fn#53146, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6912:1320, offset: 0x0133ee19, size: 840 bytes, params: 2, frame: 26
|
||||
var r1;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
var format;
|
||||
var WewRHM;
|
||||
var Math;
|
||||
var max;
|
||||
var ZKywGU;
|
||||
var vdtNYa;
|
||||
const id = guild?.id;
|
||||
const fluxModule = require(566) /* metro dependency 566: flux */;
|
||||
let useStateFromStoresArray = fluxModule.useStateFromStoresArray;
|
||||
const value3 = Reflect.apply(useStateFromStoresArray, fluxModule, [[GuildRoleStore], _fun53147, [id,
|
||||
selectedRoleIds]]);
|
||||
const moduleValue2 = fluxModule;
|
||||
useStateFromStoresArray = moduleValue2.useStateFromStoresArray;
|
||||
object = [ChannelStore];
|
||||
object[1] = UserStore;
|
||||
object[2] = RelationshipStore;
|
||||
object[3] = PermissionStore;
|
||||
const value4 = Reflect.apply(useStateFromStoresArray, moduleValue2, [object, _fun53148]);
|
||||
const value5 = value3.map(function({name}) {
|
||||
return '@' + name;
|
||||
});
|
||||
if (prompt == null) {
|
||||
r1 = intl.string(t.JshhEl);
|
||||
} else if (prompt.singleSelect) {
|
||||
r1 = '';
|
||||
} else {
|
||||
r1 = intl.string(t.JshhEl);
|
||||
}
|
||||
let length = value4.length;
|
||||
if (length !== 0) {
|
||||
length = value4.length;
|
||||
if (length > 0) {
|
||||
length = value5.length;
|
||||
if (length === 0) {
|
||||
format = intl.format;
|
||||
ZKywGU = t.ZKywGU;
|
||||
object = {};
|
||||
length = value4.length;
|
||||
object.count = length;
|
||||
Math = global.Math;
|
||||
max = Math.max;
|
||||
length = value4.length;
|
||||
object.extraCount = Reflect.apply(max, Math, [length - 2, 0]);
|
||||
object.channel1 = value4[0];
|
||||
object.channel2 = value4[1];
|
||||
object.itemHook = itemHook;
|
||||
r1 = Reflect.apply(format, intl, [ZKywGU, object]);
|
||||
} else {
|
||||
length = value4.length;
|
||||
if (length > 0 && value5.length > 0) {
|
||||
format = intl.format;
|
||||
WewRHM = t.WewRHM;
|
||||
object = {};
|
||||
length = value4.length;
|
||||
object.channelCount = length;
|
||||
Math = global.Math;
|
||||
max = Math.max;
|
||||
length = value4.length;
|
||||
object.extraChannelCount = Reflect.apply(max, Math, [length - 2, 0]);
|
||||
object.channel1 = value4[0];
|
||||
object.channel2 = value4[1];
|
||||
object.itemHook = itemHook;
|
||||
length = value5.length;
|
||||
object.roleCount = length;
|
||||
Math = global.Math;
|
||||
max = Math.max;
|
||||
length = value5.length;
|
||||
object.extraRoleCount = Reflect.apply(max, Math, [length - 2, 0]);
|
||||
object.role1 = value5[0];
|
||||
object.role2 = value5[1];
|
||||
r1 = Reflect.apply(format, intl, [WewRHM, object]);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
length = value4.length;
|
||||
if (length > 0 && value5.length > 0) {
|
||||
format = intl.format;
|
||||
WewRHM = t.WewRHM;
|
||||
object = {};
|
||||
length = value4.length;
|
||||
object.channelCount = length;
|
||||
Math = global.Math;
|
||||
max = Math.max;
|
||||
length = value4.length;
|
||||
object.extraChannelCount = Reflect.apply(max, Math, [length - 2, 0]);
|
||||
object.channel1 = value4[0];
|
||||
object.channel2 = value4[1];
|
||||
object.itemHook = itemHook;
|
||||
length = value5.length;
|
||||
object.roleCount = length;
|
||||
Math = global.Math;
|
||||
max = Math.max;
|
||||
length = value5.length;
|
||||
object.extraRoleCount = Reflect.apply(max, Math, [length - 2, 0]);
|
||||
object.role1 = value5[0];
|
||||
object.role2 = value5[1];
|
||||
r1 = Reflect.apply(format, intl, [WewRHM, object]);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
length = value5.length;
|
||||
if (length > 0) {
|
||||
format = intl.format;
|
||||
vdtNYa = t.vdtNYa;
|
||||
object = {};
|
||||
length = value5.length;
|
||||
object.count = length;
|
||||
Math = global.Math;
|
||||
max = Math.max;
|
||||
length = value5.length;
|
||||
object.extraCount = Reflect.apply(max, Math, [length - 2, 0]);
|
||||
object.role1 = value5[0];
|
||||
object.role2 = value5[1];
|
||||
object.itemHook = itemHook;
|
||||
r1 = Reflect.apply(format, intl, [vdtNYa, object]);
|
||||
} else {
|
||||
length = value4.length;
|
||||
if (length > 0) {
|
||||
length = value5.length;
|
||||
if (length === 0) {
|
||||
format = intl.format;
|
||||
ZKywGU = t.ZKywGU;
|
||||
object = {};
|
||||
length = value4.length;
|
||||
object.count = length;
|
||||
Math = global.Math;
|
||||
max = Math.max;
|
||||
length = value4.length;
|
||||
object.extraCount = Reflect.apply(max, Math, [length - 2, 0]);
|
||||
object.channel1 = value4[0];
|
||||
object.channel2 = value4[1];
|
||||
object.itemHook = itemHook;
|
||||
r1 = Reflect.apply(format, intl, [ZKywGU, object]);
|
||||
} else {
|
||||
length = value4.length;
|
||||
if (length > 0 && value5.length > 0) {
|
||||
format = intl.format;
|
||||
WewRHM = t.WewRHM;
|
||||
object = {};
|
||||
length = value4.length;
|
||||
object.channelCount = length;
|
||||
Math = global.Math;
|
||||
max = Math.max;
|
||||
length = value4.length;
|
||||
object.extraChannelCount = Reflect.apply(max, Math, [length - 2, 0]);
|
||||
object.channel1 = value4[0];
|
||||
object.channel2 = value4[1];
|
||||
object.itemHook = itemHook;
|
||||
length = value5.length;
|
||||
object.roleCount = length;
|
||||
Math = global.Math;
|
||||
max = Math.max;
|
||||
length = value5.length;
|
||||
object.extraRoleCount = Reflect.apply(max, Math, [length - 2, 0]);
|
||||
object.role1 = value5[0];
|
||||
object.role2 = value5[1];
|
||||
r1 = Reflect.apply(format, intl, [WewRHM, object]);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
length = value4.length;
|
||||
if (length > 0 && value5.length > 0) {
|
||||
format = intl.format;
|
||||
WewRHM = t.WewRHM;
|
||||
object = {};
|
||||
length = value4.length;
|
||||
object.channelCount = length;
|
||||
Math = global.Math;
|
||||
max = Math.max;
|
||||
length = value4.length;
|
||||
object.extraChannelCount = Reflect.apply(max, Math, [length - 2, 0]);
|
||||
object.channel1 = value4[0];
|
||||
object.channel2 = value4[1];
|
||||
object.itemHook = itemHook;
|
||||
length = value5.length;
|
||||
object.roleCount = length;
|
||||
Math = global.Math;
|
||||
max = Math.max;
|
||||
length = value5.length;
|
||||
object.extraRoleCount = Reflect.apply(max, Math, [length - 2, 0]);
|
||||
object.role1 = value5[0];
|
||||
object.role2 = value5[1];
|
||||
r1 = Reflect.apply(format, intl, [WewRHM, object]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return {helpText: r1, helpTextAdditional: ''};
|
||||
}
|
||||
|
||||
function _fun53140() { // fn#53140, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6912:617, offset: 0x0133ed09, size: 48 bytes, params: 1, frame: 14
|
||||
return id != null ? GuildRoleStore.getManyRoles(id, selectedRoleIds) : [];
|
||||
}
|
||||
|
||||
function _fun53141() { // fn#53141, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6912:705, offset: 0x0133ed39, size: 74 bytes, params: 1, frame: 12
|
||||
const Array = global.Array;
|
||||
let value = Array.from(selectedChannelIds);
|
||||
value = value.map(function(a0) {
|
||||
return ChannelStore.getChannel(a0);
|
||||
});
|
||||
value = value.filter(_fun53143);
|
||||
return value.map(function(a0) {
|
||||
return require(dependencyMap[8]).computeChannelName(a0, UserStore, RelationshipStore, true);
|
||||
});
|
||||
}
|
||||
|
||||
function _fun53148() { // fn#53148, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6912:1588, offset: 0x0133f161, size: 74 bytes, params: 1, frame: 12
|
||||
const Array = global.Array;
|
||||
let value = Array.from(selectedChannelIds);
|
||||
value = value.map(function(a0) {
|
||||
return ChannelStore.getChannel(a0);
|
||||
});
|
||||
value = value.filter(_fun53150);
|
||||
return value.map(function(a0) {
|
||||
return require(dependencyMap[8]).computeChannelName(a0, UserStore, RelationshipStore, true);
|
||||
});
|
||||
}
|
||||
|
||||
function _fun53143(a0) { // fn#53143, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6912:757, offset: 0x0133ed99, size: 43 bytes, params: 2, frame: 14
|
||||
var r0;
|
||||
let value = a0 != null;
|
||||
if (value) {
|
||||
value = environment.__proto__.__proto__;
|
||||
value = PermissionStore.can(Permissions.VIEW_CHANNEL, a0);
|
||||
r0 = value;
|
||||
} else {
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,90 @@
|
||||
/* Metro module 11354; source: modules/guild_onboarding/useSortedOnboardingPrompts.tsx; dependencies: [31, 6603, 632, 2] */
|
||||
function _fun86960(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#86960, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11540:6, offset: 0x01fa9c33, size: 133 bytes, params: 8, frame: 18
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_2 = importAll(31) /* metro dependency 31 */;
|
||||
const guildOnboardingPromptsStore = importDefault(6603) /* metro dependency 6603: GuildOnboardingPromptsStore */;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_onboarding/useSortedOnboardingPrompts.tsx');
|
||||
exports.default = useSortedOnboardingPrompts;
|
||||
}
|
||||
|
||||
function useSortedOnboardingPrompts(a0) { // fn#86961, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11540:215, offset: 0x01fa9cb8, size: 101 bytes, params: 2, frame: 15
|
||||
const env0_0 = a0;
|
||||
return env0_2.useMemo(_fun86963,
|
||||
[(require(632) /* metro dependency 632: useStateFromStores */).useStateFromStoresArray([GuildOnboardingPromptsStore],
|
||||
_fun86962)]);
|
||||
}
|
||||
|
||||
function _fun86962() { // fn#86962, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11540:297, offset: 0x01fa9d1d, size: 27 bytes, params: 1, frame: 11
|
||||
return GuildOnboardingPromptsStore.getEnabledOnboardingPrompts(env0_0);
|
||||
}
|
||||
|
||||
function _fun86963() { // fn#86963, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11540:354, offset: 0x01fa9d38, size: 237 bytes, params: 1, frame: 22
|
||||
var r7;
|
||||
var r8;
|
||||
var r10;
|
||||
var r1;
|
||||
var property;
|
||||
var isNew;
|
||||
var hasNewAnswers;
|
||||
var inOnboarding;
|
||||
var options;
|
||||
var filter;
|
||||
var value3;
|
||||
var value4;
|
||||
const items5 = [];
|
||||
const items2 = [];
|
||||
const items3 = [];
|
||||
const items4 = [];
|
||||
let length = env0_1.length;
|
||||
const value2 = 0;
|
||||
if (value2 < length) {
|
||||
r7 = value2;
|
||||
r8 = value2;
|
||||
while (true) {
|
||||
property = env0_1[r7];
|
||||
isNew = property.isNew;
|
||||
if (!isNew) {
|
||||
hasNewAnswers = property.hasNewAnswers;
|
||||
if (hasNewAnswers) {
|
||||
items2.push(property);
|
||||
options = property.options;
|
||||
filter = options.filter;
|
||||
value3 = r8 + Reflect.apply(filter, options, [function(a0) {
|
||||
return a0.isUnseen;
|
||||
}]).length;
|
||||
r10 = value3;
|
||||
break;
|
||||
}
|
||||
inOnboarding = property.inOnboarding;
|
||||
if (inOnboarding) {
|
||||
items4.push(property);
|
||||
r10 = r8;
|
||||
break;
|
||||
}
|
||||
items3.push(property);
|
||||
r10 = r8;
|
||||
break;
|
||||
}
|
||||
items5.push(property);
|
||||
r10 = r8;
|
||||
value4 = typeof r7 === 'bigint' ? r7 + 1n : +r7 + 1;
|
||||
length = env0_1.length;
|
||||
if (value4 < length) {
|
||||
r7 = value4;
|
||||
r8 = r10;
|
||||
continue;
|
||||
}
|
||||
r1 = r10;
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
r1 = value2;
|
||||
}
|
||||
const object2 = {onboardingPromptsRaw: env0_1, newOnboardingPrompts: items5,
|
||||
onboardingPromptsWithNewAnswers: items2, newAnswersCount: r1};
|
||||
object2.onboardingPrompts = items3.concat(items4);
|
||||
return object2;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user