Initial commit

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

No files matched your search

@@ -0,0 +1,815 @@
/* Metro module 6772; source: modules/applications/ApplicationActionCreators.tsx; dependencies: [5, 6773, 4235, 4234, 661, 694, 507, 566, 2] */
function _fun53334(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#53334, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6950:6, offset: 0x0134639b, size: 361 bytes, params: 8, frame: 22
var object2;
const env0_0 = require;
const closure = function() {
return _fetchApplication.apply(this, arguments);
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(5) /* metro dependency 5 */;
const applicationDirectoryApplicationsStore = importDefault(6773) /* metro dependency 6773: ApplicationDirectoryApplicationsStore */;
const applicationRecord = importDefault(4235) /* metro dependency 4235: ApplicationRecord */;
let value = importDefault(4234) /* metro dependency 4234: ApplicationStore */;
const constantsModule = require(661) /* metro dependency 661: Constants */;
const env0_7 = constantsModule.Endpoints;
const env0_8 = constantsModule.NOOP;
const QueryIds = constantsModule.QueryIds;
object2 = {createApplication: function({name, guildId, type, teamId}) {
return teamId(_fun53340)();
}, getApplicationsForGuild: getApplicationsForGuild, transferApplication: transferApplication,
fetchApplications: fetchApplications_53348, fetchApplication: closure};
const fluxModule = require(566) /* metro dependency 566: flux */;
const createFetchStore = fluxModule.createFetchStore;
const APPLICATIONS = QueryIds.APPLICATIONS;
value = Reflect.apply(createFetchStore, fluxModule, [value, {getQueryId: APPLICATIONS, get: get_53355,
load: load_53356, getIsLoading: getIsLoading_53357}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/applications/ApplicationActionCreators.tsx');
exports.default = object2;
exports.fetchApplication = closure;
exports.useApplication = value;
exports.useApplicationWithLoggedOutContext = useApplicationWithLoggedOutContext;
}
function _fetchApplication() { // fn#53336, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6950:259, offset: 0x01346504, size: 48 bytes, params: 1, frame: 14
return env0_3(_fun53338).apply(this, arguments);
}
function createApplication({name, guildId, type, teamId}) { // fn#53339, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6950:762, offset: 0x01346678, size: 67 bytes, params: 2, frame: 11
return teamId(_fun53341)();
}
function getApplicationsForGuild(a0) { // fn#53342, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6950:1058, offset: 0x01346793, size: 81 bytes, params: 2, frame: 15
let value = a1;
const env0_0 = a0;
const r4 = value !== undefined ? value : {};
const env0_1 = r4.includeTeam;
value = Object.create(null);
value.includeTeam = 0;
const env0_2 = copyDataProperties({}, r4, value, r4);
return env0_3(_fun53344)();
}
function transferApplication({applicationId, teamId}) { // fn#53345, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6950:1319, offset: 0x013468a7, size: 49 bytes, params: 2, frame: 11
return env0_3(_fun53347)();
}
function fetchApplications_53348(a0) { // fn#53348, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6950:1575, offset: 0x01346989, size: 47 bytes, params: 2, frame: 12
const value = a1;
const env0_0 = a0;
const env0_1 = !(value !== undefined) || value;
return env0_3(_fun53350)();
}
function get_53355(a0) { // fn#53355, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6950:2385, offset: 0x01346c0c, size: 66 bytes, params: 2, frame: 14
var r0;
var application;
const value = null;
if (value != a0) {
if (ApplicationStore.isHydrated(a0)) {
application = ApplicationStore.getApplication(a0);
r0 = value != application ? application : value;
} else {
r0 = value;
}
} else {
r0 = value;
}
return r0;
}
function load_53356(a0) { // fn#53356, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6950:2471, offset: 0x01346c4e, size: 61 bytes, params: 2, frame: 15
return a0 != null ? fetchApplication(a0, false).then(NOOP) : global.Promise.resolve();
}
function getIsLoading_53357(a0) { // fn#53357, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6950:2544, offset: 0x01346c8b, size: 32 bytes, params: 2, frame: 12
return a0 != null && ApplicationStore.isFetchingApplication(a0);
}
function useApplicationWithLoggedOutContext(a0) { // fn#53358, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6950:2777, offset: 0x01346cab, size: 134 bytes, params: 2, frame: 21
const env0_0 = a0;
const value2 = undefined;
const {data, isLoading, error} = env0_9(a0);
const fluxModule = require(566) /* metro dependency 566: flux */;
const useStateFromStores = fluxModule.useStateFromStores;
return {app: Reflect.apply(useStateFromStores, fluxModule, [[ApplicationDirectoryApplicationsStore], _fun53359, [a0,
data]]), isLoading: isLoading, error: error ?? value2};
}
async function _fun53338(a0) { // fn#53338, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6950:316, offset: 0x01346546, size: 306 bytes, params: 2, frame: 22
var object4;
var binding2;
var property;
var value6;
var HTTP;
var get;
var APPLICATION_PUBLIC;
var value7;
var object3;
var value8;
var value9;
var value10;
var binding3;
var value11;
var body;
var error;
let value = a1;
if (false) {
return undefined;
}
const r1 = value !== undefined ? value : false;
await undefined;
if (false) {
return undefined;
}
value = environment.__proto__.__proto__;
let binding = env2_1;
binding(env2_2[5]).dispatch({type: 'APPLICATION_FETCH', applicationId: a0});
try {
binding = env2_0;
} catch (error) {
binding = env2_1;
value = binding(env2_2[5]);
value.dispatch({type: 'APPLICATION_FETCH_FAIL', applicationId: a0});
throw error;
}
try {
binding2 = env2_2;
} catch (error) {
binding = env2_1;
value = binding(env2_2[5]);
value.dispatch({type: 'APPLICATION_FETCH_FAIL', applicationId: a0});
throw error;
}
try {
property = binding2[6];
} catch (error) {
binding = env2_1;
value = binding(env2_2[5]);
value.dispatch({type: 'APPLICATION_FETCH_FAIL', applicationId: a0});
throw error;
}
try {
value6 = binding(property);
} catch (error) {
binding = env2_1;
value = binding(env2_2[5]);
value.dispatch({type: 'APPLICATION_FETCH_FAIL', applicationId: a0});
throw error;
}
try {
HTTP = value6.HTTP;
} catch (error) {
binding = env2_1;
value = binding(env2_2[5]);
value.dispatch({type: 'APPLICATION_FETCH_FAIL', applicationId: a0});
throw error;
}
try {
get = HTTP.get;
} catch (error) {
binding = env2_1;
value = binding(env2_2[5]);
value.dispatch({type: 'APPLICATION_FETCH_FAIL', applicationId: a0});
throw error;
}
try {
object4 = {};
} catch (error) {
binding = env2_1;
value = binding(env2_2[5]);
value.dispatch({type: 'APPLICATION_FETCH_FAIL', applicationId: a0});
throw error;
}
try {
binding = env2_7;
} catch (error) {
binding = env2_1;
value = binding(env2_2[5]);
value.dispatch({type: 'APPLICATION_FETCH_FAIL', applicationId: a0});
throw error;
}
try {
APPLICATION_PUBLIC = binding.APPLICATION_PUBLIC;
} catch (error) {
binding = env2_1;
value = binding(env2_2[5]);
value.dispatch({type: 'APPLICATION_FETCH_FAIL', applicationId: a0});
throw error;
}
try {
value7 = Reflect.apply(APPLICATION_PUBLIC, binding, [a0]);
} catch (error) {
binding = env2_1;
value = binding(env2_2[5]);
value.dispatch({type: 'APPLICATION_FETCH_FAIL', applicationId: a0});
throw error;
}
try {
object4.url = value7;
} catch (error) {
binding = env2_1;
value = binding(env2_2[5]);
value.dispatch({type: 'APPLICATION_FETCH_FAIL', applicationId: a0});
throw error;
}
try {
object3 = {};
} catch (error) {
binding = env2_1;
value = binding(env2_2[5]);
value.dispatch({type: 'APPLICATION_FETCH_FAIL', applicationId: a0});
throw error;
}
try {
object3.with_guild = r1;
} catch (error) {
binding = env2_1;
value = binding(env2_2[5]);
value.dispatch({type: 'APPLICATION_FETCH_FAIL', applicationId: a0});
throw error;
}
try {
object4.query = object3;
} catch (error) {
binding = env2_1;
value = binding(env2_2[5]);
value.dispatch({type: 'APPLICATION_FETCH_FAIL', applicationId: a0});
throw error;
}
try {
object4.oldFormErrors = true;
} catch (error) {
binding = env2_1;
value = binding(env2_2[5]);
value.dispatch({type: 'APPLICATION_FETCH_FAIL', applicationId: a0});
throw error;
}
try {
object4.signal = a2;
} catch (error) {
binding = env2_1;
value = binding(env2_2[5]);
value.dispatch({type: 'APPLICATION_FETCH_FAIL', applicationId: a0});
throw error;
}
try {
object4.rejectWithError = false;
} catch (error) {
binding = env2_1;
value = binding(env2_2[5]);
value.dispatch({type: 'APPLICATION_FETCH_FAIL', applicationId: a0});
throw error;
}
try {
value8 = Reflect.apply(get, HTTP, [object4]);
} catch (error) {
binding = env2_1;
value = binding(env2_2[5]);
value.dispatch({type: 'APPLICATION_FETCH_FAIL', applicationId: a0});
throw error;
}
await value8;
try {
value9 = undefined;
value10 = false;
} catch (error) {
binding = env2_1;
value = binding(env2_2[5]);
value.dispatch({type: 'APPLICATION_FETCH_FAIL', applicationId: a0});
throw error;
}
if (value10) {
return value9;
}
try {
binding = env2_1;
} catch (error) {
binding = env2_1;
value = binding(env2_2[5]);
value.dispatch({type: 'APPLICATION_FETCH_FAIL', applicationId: a0});
throw error;
}
try {
binding3 = env2_2;
} catch (error) {
binding = env2_1;
value = binding(env2_2[5]);
value.dispatch({type: 'APPLICATION_FETCH_FAIL', applicationId: a0});
throw error;
}
try {
property = binding3[5];
} catch (error) {
binding = env2_1;
value = binding(env2_2[5]);
value.dispatch({type: 'APPLICATION_FETCH_FAIL', applicationId: a0});
throw error;
}
try {
value11 = binding(property);
} catch (error) {
binding = env2_1;
value = binding(env2_2[5]);
value.dispatch({type: 'APPLICATION_FETCH_FAIL', applicationId: a0});
throw error;
}
try {
dispatch = value11.dispatch;
} catch (error) {
binding = env2_1;
value = binding(env2_2[5]);
value.dispatch({type: 'APPLICATION_FETCH_FAIL', applicationId: a0});
throw error;
}
try {
object4 = {'type': 'APPLICATION_FETCH_SUCCESS', 'application': null, 'isHydrated': true};
} catch (error) {
binding = env2_1;
value = binding(env2_2[5]);
value.dispatch({type: 'APPLICATION_FETCH_FAIL', applicationId: a0});
throw error;
}
try {
body = value9.body;
} catch (error) {
binding = env2_1;
value = binding(env2_2[5]);
value.dispatch({type: 'APPLICATION_FETCH_FAIL', applicationId: a0});
throw error;
}
try {
object4.application = body;
} catch (error) {
binding = env2_1;
value = binding(env2_2[5]);
value.dispatch({type: 'APPLICATION_FETCH_FAIL', applicationId: a0});
throw error;
}
try {
Reflect.apply(dispatch, value11, [object4]);
} catch (error) {
binding = env2_1;
value = binding(env2_2[5]);
value.dispatch({type: 'APPLICATION_FETCH_FAIL', applicationId: a0});
throw error;
}
try {
body = value9.body;
} catch (error) {
binding = env2_1;
value = binding(env2_2[5]);
value.dispatch({type: 'APPLICATION_FETCH_FAIL', applicationId: a0});
throw error;
}
return body;
}
function* _fun53341() { // fn#53341, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6950:803, offset: 0x013466c4, size: 207 bytes, params: 1, frame: 17
if (false) {
return undefined;
}
value = environment.__proto__.__proto__;
const HTTP = env2_0(env2_2[6]).HTTP;
const post = HTTP.post;
const APPLICATIONS = env2_7.APPLICATIONS;
yield Reflect.apply(post, HTTP, [{url: APPLICATIONS, body: {name: require, type: dependencyMap,
guild_id: importDefault, team_id: env1_3}, rejectWithError: false}]);
const value4 = undefined;
if (false) {
return value4;
}
const body = value4.body;
if (importDefault != null && dependencyMap != null) {
value = env2_1(env2_2[5]);
value.dispatch({type: 'APPLICATION_FETCH_SUCCESS', application: body});
}
return body;
}
function* _fun53344() { // fn#53344, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6950:1090, offset: 0x013467ed, size: 186 bytes, params: 1, frame: 19
if (false) {
return undefined;
}
value = environment.__proto__.__proto__;
let binding = env2_0;
const HTTP = binding(env2_2[6]).HTTP;
const get = HTTP.get;
const object3 = {};
binding = env2_7;
object3.url = binding.GUILD_APPLICATIONS(require);
const object4 = {};
copyDataProperties(object4, dependencyMap, binding);
object4['include_team'] = importDefault;
object3.query = object4;
object3.rejectWithError = false;
yield Reflect.apply(get, HTTP, [object3]);
const value4 = undefined;
if (false) {
return value4;
}
const body = value4.body;
value = env2_1(env2_2[5]);
value.dispatch({type: 'APPLICATIONS_FETCH_SUCCESS', applications: body});
return body;
}
function* _fun53347() { // fn#53347, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6950:1352, offset: 0x013468e1, size: 168 bytes, params: 1, frame: 18
if (false) {
return undefined;
}
value = environment.__proto__.__proto__;
const HTTP = env2_0(env2_2[6]).HTTP;
const post = HTTP.post;
const object2 = {};
object2.url = env2_7.APPLICATION_OWNER_TRANSFER(require);
object2.body = {team_id: importDefault};
object2.rejectWithError = false;
yield Reflect.apply(post, HTTP, [object2]);
const value4 = undefined;
if (false) {
return value4;
}
const body = value4.body;
value = env2_1(env2_2[5]);
value.dispatch({type: 'APPLICATION_FETCH_SUCCESS', application: body});
return body;
}
function* _fun53350() { // fn#53350, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6950:1588, offset: 0x013469c1, size: 462 bytes, params: 1, frame: 24
var object2;
var environment;
var r5;
var binding2;
var property;
var value4;
var HTTP;
var get;
var APPLICATIONS_PUBLIC;
var URLSearchParams;
var map;
var closure;
var value5;
var prototype;
var uRLSearchParams;
var value7;
var toString;
var value8;
var value9;
var value10;
var value11;
var error;
var status;
if (true) {
var env0_0;
value = environment.__proto__;
r5 = importDefault ? require : require.filter(_fun53351);
if (r5.length > 0) {
value = environment.__proto__.__proto__;
var binding = env2_1;
var value3 = binding(env2_2[5]);
var dispatch = value3.dispatch;
Reflect.apply(dispatch, value3, [{type: 'APPLICATIONS_FETCH', applicationIds: r5}]);
try {
binding = env2_0;
} catch (error) {
status = error.status;
if (status === 429) {
throw error;
}
binding = env2_1;
value = binding(env2_2[5]);
value.dispatch({type: 'APPLICATIONS_FETCH_FAIL', applicationIds: r5});
throw error;
}
try {
binding2 = env2_2;
} catch (error) {
status = error.status;
if (status === 429) {
throw error;
}
binding = env2_1;
value = binding(env2_2[5]);
value.dispatch({type: 'APPLICATIONS_FETCH_FAIL', applicationIds: r5});
throw error;
}
try {
property = binding2[6];
} catch (error) {
status = error.status;
if (status === 429) {
throw error;
}
binding = env2_1;
value = binding(env2_2[5]);
value.dispatch({type: 'APPLICATIONS_FETCH_FAIL', applicationIds: r5});
throw error;
}
try {
value4 = binding(property);
} catch (error) {
status = error.status;
if (status === 429) {
throw error;
}
binding = env2_1;
value = binding(env2_2[5]);
value.dispatch({type: 'APPLICATIONS_FETCH_FAIL', applicationIds: r5});
throw error;
}
try {
HTTP = value4.HTTP;
} catch (error) {
status = error.status;
if (status === 429) {
throw error;
}
binding = env2_1;
value = binding(env2_2[5]);
value.dispatch({type: 'APPLICATIONS_FETCH_FAIL', applicationIds: r5});
throw error;
}
try {
get = HTTP.get;
} catch (error) {
status = error.status;
if (status === 429) {
throw error;
}
binding = env2_1;
value = binding(env2_2[5]);
value.dispatch({type: 'APPLICATIONS_FETCH_FAIL', applicationIds: r5});
throw error;
}
try {
object2 = {};
} catch (error) {
status = error.status;
if (status === 429) {
throw error;
}
binding = env2_1;
value = binding(env2_2[5]);
value.dispatch({type: 'APPLICATIONS_FETCH_FAIL', applicationIds: r5});
throw error;
}
try {
binding = env2_7;
} catch (error) {
status = error.status;
if (status === 429) {
throw error;
}
binding = env2_1;
value = binding(env2_2[5]);
value.dispatch({type: 'APPLICATIONS_FETCH_FAIL', applicationIds: r5});
throw error;
}
try {
APPLICATIONS_PUBLIC = binding.APPLICATIONS_PUBLIC;
} catch (error) {
status = error.status;
if (status === 429) {
throw error;
}
binding = env2_1;
value = binding(env2_2[5]);
value.dispatch({type: 'APPLICATIONS_FETCH_FAIL', applicationIds: r5});
throw error;
}
try {
object2.url = APPLICATIONS_PUBLIC;
} catch (error) {
status = error.status;
if (status === 429) {
throw error;
}
binding = env2_1;
value = binding(env2_2[5]);
value.dispatch({type: 'APPLICATIONS_FETCH_FAIL', applicationIds: r5});
throw error;
}
try {
URLSearchParams = global.URLSearchParams;
} catch (error) {
status = error.status;
if (status === 429) {
throw error;
}
binding = env2_1;
value = binding(env2_2[5]);
value.dispatch({type: 'APPLICATIONS_FETCH_FAIL', applicationIds: r5});
throw error;
}
try {
map = r5.map;
} catch (error) {
status = error.status;
if (status === 429) {
throw error;
}
binding = env2_1;
value = binding(env2_2[5]);
value.dispatch({type: 'APPLICATIONS_FETCH_FAIL', applicationIds: r5});
throw error;
}
try {
closure = function(a0) {
return ['application_ids', a0];
};
} catch (error) {
status = error.status;
if (status === 429) {
throw error;
}
binding = env2_1;
value = binding(env2_2[5]);
value.dispatch({type: 'APPLICATIONS_FETCH_FAIL', applicationIds: r5});
throw error;
}
try {
value5 = Reflect.apply(map, r5, [closure]);
} catch (error) {
status = error.status;
if (status === 429) {
throw error;
}
binding = env2_1;
value = binding(env2_2[5]);
value.dispatch({type: 'APPLICATIONS_FETCH_FAIL', applicationIds: r5});
throw error;
}
try {
prototype = URLSearchParams.prototype;
} catch (error) {
status = error.status;
if (status === 429) {
throw error;
}
binding = env2_1;
value = binding(env2_2[5]);
value.dispatch({type: 'APPLICATIONS_FETCH_FAIL', applicationIds: r5});
throw error;
}
try {
} catch (error) {
status = error.status;
if (status === 429) {
throw error;
}
binding = env2_1;
value = binding(env2_2[5]);
value.dispatch({type: 'APPLICATIONS_FETCH_FAIL', applicationIds: r5});
throw error;
}
try {
uRLSearchParams = new URLSearchParams();
} catch (error) {
status = error.status;
if (status === 429) {
throw error;
}
binding = env2_1;
value = binding(env2_2[5]);
value.dispatch({type: 'APPLICATIONS_FETCH_FAIL', applicationIds: r5});
throw error;
}
try {
value7 = uRLSearchParams instanceof Object ? uRLSearchParams : undefined;
} catch (error) {
status = error.status;
if (status === 429) {
throw error;
}
binding = env2_1;
value = binding(env2_2[5]);
value.dispatch({type: 'APPLICATIONS_FETCH_FAIL', applicationIds: r5});
throw error;
}
try {
toString = value7.toString;
} catch (error) {
status = error.status;
if (status === 429) {
throw error;
}
binding = env2_1;
value = binding(env2_2[5]);
value.dispatch({type: 'APPLICATIONS_FETCH_FAIL', applicationIds: r5});
throw error;
}
try {
value8 = Reflect.apply(toString, value7, []);
} catch (error) {
status = error.status;
if (status === 429) {
throw error;
}
binding = env2_1;
value = binding(env2_2[5]);
value.dispatch({type: 'APPLICATIONS_FETCH_FAIL', applicationIds: r5});
throw error;
}
try {
object2.query = value8;
} catch (error) {
status = error.status;
if (status === 429) {
throw error;
}
binding = env2_1;
value = binding(env2_2[5]);
value.dispatch({type: 'APPLICATIONS_FETCH_FAIL', applicationIds: r5});
throw error;
}
try {
object2.oldFormErrors = true;
} catch (error) {
status = error.status;
if (status === 429) {
throw error;
}
binding = env2_1;
value = binding(env2_2[5]);
value.dispatch({type: 'APPLICATIONS_FETCH_FAIL', applicationIds: r5});
throw error;
}
try {
object2.rejectWithError = false;
} catch (error) {
status = error.status;
if (status === 429) {
throw error;
}
binding = env2_1;
value = binding(env2_2[5]);
value.dispatch({type: 'APPLICATIONS_FETCH_FAIL', applicationIds: r5});
throw error;
}
try {
value9 = Reflect.apply(get, HTTP, [object2]);
} catch (error) {
status = error.status;
if (status === 429) {
throw error;
}
binding = env2_1;
value = binding(env2_2[5]);
value.dispatch({type: 'APPLICATIONS_FETCH_FAIL', applicationIds: r5});
throw error;
}
yield value9;
try {
value10 = undefined;
value11 = false;
} catch (error) {
status = error.status;
if (status === 429) {
throw error;
}
binding = env2_1;
value = binding(env2_2[5]);
value.dispatch({type: 'APPLICATIONS_FETCH_FAIL', applicationIds: r5});
throw error;
}
if (value11) {
return value10;
}
var body = value10.body;
var Set = global.Set;
var value12 = body.map(function(a0) {
return a0.id;
});
prototype = Set.prototype;
var value13 = Object.create(prototype, {constructor: {value: Set}});
var set = new Set(value12);
env0_0 = set instanceof Object ? set : value13;
var value15 = r5.filter(_fun53354);
binding = env2_1;
value = binding(env2_2[5]);
dispatch = value.dispatch;
body = value10.body;
Reflect.apply(dispatch, value, [{type: 'APPLICATIONS_FETCH_SUCCESS', applications: body,
unknownApplicationIds: value15, isHydrated: true}]);
}
}
}
function _fun53359() { // fn#53359, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6950:2911, offset: 0x01346d31, size: 62 bytes, params: 1, frame: 14
if (data == null) {
var application = ApplicationDirectoryApplicationsStore.getApplication(env0_0);
if (application != null) {
return ApplicationRecord.createFromServer(application);
}
}
return data;
}
function _fun53351(a0) { // fn#53351, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6950:1627, offset: 0x01346b8f, size: 106 bytes, params: 2, frame: 13
const value = environment.__proto__.__proto__.__proto__;
let r0 = env3_6.getApplication(a0) != null && env3_6.isHydrated(a0);
r0 = !r0 && !env3_6.isFetchingApplication(a0) && !env3_6.didFetchingApplicationFail(a0) && a0.length > 0;
return r0;
}
@@ -0,0 +1,197 @@
/* Metro module 6874; source: modules/applications/ApplicationAssetsStore.tsx; dependencies: [6, 7, 15, 17, 18, 22, 566, 694, 2] */
function _fun54455(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#54455, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7052:6, offset: 0x01365c9e, size: 374 bytes, params: 8, frame: 21
var object2;
const closure = EMBEDDED_ACTIVITY_FETCH_SHELF_SUCCESS_54459;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(6) /* metro dependency 6 */;
const env0_3 = importDefault(7) /* metro dependency 7 */;
const env0_4 = importDefault(15) /* metro dependency 15 */;
const env0_5 = importDefault(17) /* metro dependency 17 */;
const env0_6 = importDefault(18) /* metro dependency 18 */;
object2 = {NOT_FETCHED: 0};
object2[0] = 'NOT_FETCHED';
object2.FETCHING = 1;
object2[1] = 'FETCHING';
object2.FETCH_SUCCESS = 2;
object2[2] = 'FETCH_SUCCESS';
const env0_8 = {};
const env0_9 = {};
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
let value = _fun54460(Store);
value.displayName = 'ApplicationAssetsStore';
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */,
{APPLICATION_ASSETS_FETCH: APPLICATION_ASSETS_FETCH,
APPLICATION_ASSETS_FETCH_SUCCESS: APPLICATION_ASSETS_FETCH_SUCCESS,
APPLICATION_ASSETS_UPDATE: APPLICATION_ASSETS_UPDATE, EMBEDDED_ACTIVITY_FETCH_SHELF_SUCCESS: closure,
DEVELOPER_ACTIVITY_SHELF_FETCH_SUCCESS: closure});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/applications/ApplicationAssetsStore.tsx');
exports.default = value;
exports.FetchState = object2;
}
function _isNativeReflectConstruct_54456() { // fn#54456, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7052:148, offset: 0x01365e14, 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_54456_isNativeReflectConstruct = function() {
return !!result;
})();
}
function DEVELOPER_ACTIVITY_SHELF_FETCH_SUCCESS({assets}) { // fn#54459, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7052:480, offset: 0x01365e72, size: 157 bytes, params: 2, frame: 28
var r16;
var propertyName;
var property;
var FETCH_SUCCESS;
var binding;
var object3;
var defaultImport;
var value2;
var Date;
const object4 = {};
copyDataProperties(object4, env0_8, undefined);
for (propertyName in assets) {
property = assets[propertyName];
FETCH_SUCCESS = env0_7.FETCH_SUCCESS;
object4[propertyName] = FETCH_SUCCESS;
binding = env0_9;
object3 = {};
defaultImport = importDefault(22) /* metro dependency 22 */;
value2 = defaultImport.keyBy(property, 'name');
if (value2 != null) {
r16 = value2;
continue;
}
object3.assets = {};
Date = global.Date;
object3.lastUpdated = Date.now();
binding[propertyName] = object3;
}
}
function _fun54460(a0) { // fn#54460, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7052:690, offset: 0x01365f0f, size: 116 bytes, params: 2, frame: 16
const closure = ApplicationAssetsStore;
env0_6(closure, a0);
return env0_3(closure, [{key: 'getApplicationAssetFetchState', value: value_54462}, {key: 'getFetchingIds',
value: value_54463}, {key: 'getApplicationAssets', value: value_54466}]);
}
function APPLICATION_ASSETS_FETCH({applicationId}) { // fn#54467, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7052:1389, offset: 0x01366054, size: 47 bytes, params: 2, frame: 13
const object2 = {};
copyDataProperties(object2, env0_8, applicationId);
const FETCHING = env0_7.FETCHING;
object2[applicationId] = FETCHING;
}
function APPLICATION_ASSETS_FETCH_SUCCESS({applicationId}) { // fn#54468, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7052:1504, offset: 0x01366083, size: 47 bytes, params: 2, frame: 13
const object2 = {};
copyDataProperties(object2, env0_8, applicationId);
const FETCH_SUCCESS = env0_7.FETCH_SUCCESS;
object2[applicationId] = FETCH_SUCCESS;
}
function APPLICATION_ASSETS_UPDATE({applicationId, assets}) { // fn#54469, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7052:1624, offset: 0x013660b2, size: 121 bytes, params: 2, frame: 17
var value;
var binding;
var object2;
if (assets != null) {
binding = env0_9;
object2 = {};
value = importDefault(22) /* metro dependency 22 */;
value = value.keyBy(assets, 'name');
object2.assets = value ?? ({});
object2.lastUpdated = global.Date.now();
binding[applicationId] = object2;
} else {
delete env0_9[applicationId];
}
}
function value_54463() { // fn#54463, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7052:1135, offset: 0x01365fa3, size: 73 bytes, params: 1, frame: 14
var environment;
const Object = global.Object;
const entries = Object.entries;
let value = environment.__proto__;
value = Reflect.apply(entries, Object, [env1_8]);
const value3 = value.filter(_fun54464).map(function(a0) {
var iterator = a0[Symbol.iterator]();
var item2 = iterator.next();
var item = item2.value;
item2 = item2.done ? undefined : iterator;
var value = undefined;
var value2 = item2 === value;
var r0 = value2 ? value : item;
if (!value2) {
item2.return();
}
return r0;
});
const items2 = [];
arraySpread(items2, value3, 0, value);
return items2;
}
function _fun54464(a0) { // fn#54464, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7052:1182, offset: 0x01365fec, size: 104 bytes, params: 2, frame: 10
var r1;
var r2;
var r4;
var item3;
var value3;
const iterator = a0[Symbol.iterator]();
const iterator2 = iterator.next;
let value = undefined;
let item2 = Reflect.apply(iterator2, iterator, []);
let item = item2.value;
item2 = item2.done ? undefined : iterator;
const value2 = item2 === value;
if (value2) {
}
if (value2) {
r1 = item2;
r2 = value2;
r4 = value;
} else {
item3 = Reflect.apply(iterator2, item2, []);
item = item3.value;
item3 = item3.done ? undefined : item2;
value3 = item3 === value;
if (value3) {
r1 = item3;
r2 = value3;
r4 = value;
} else {
r1 = item3;
r2 = value3;
r4 = item;
}
}
if (!r2) {
r1.return();
}
value = environment.__proto__.__proto__;
const FETCHING = env2_7.FETCHING;
return r4 === FETCHING;
}
@@ -0,0 +1,46 @@
/* Metro module 4238; source: modules/applications/ApplicationConstants.tsx; dependencies: [2] */
function _fun35043(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#35043, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4409:6, offset: 0x01069e8a, size: 501 bytes, params: 8, frame: 22
var object3;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
object3 = {DEPRECATED_GAME: 1};
object3[1] = 'DEPRECATED_GAME';
object3.TICKETED_EVENTS = 3;
object3[3] = 'TICKETED_EVENTS';
object3.GUILD_ROLE_SUBSCRIPTIONS = 4;
object3[4] = 'GUILD_ROLE_SUBSCRIPTIONS';
object3.GAME = 5;
object3[5] = 'GAME';
object3.NON_GAME_DETECTABLE = 6;
object3[6] = 'NON_GAME_DETECTABLE';
const object4 = {BOT: 0};
object4[0] = 'BOT';
object4.SERVER = 1;
object4[1] = 'SERVER';
object4.SYSTEM_DM = 2;
object4[2] = 'SYSTEM_DM';
object4.OFFICIAL = 3;
object4[3] = 'OFFICIAL';
object4.STAFF_ONLY_DM = 4;
object4[4] = 'STAFF_ONLY_DM';
object4.NOT_STAFF_WARNING = 5;
object4[5] = 'NOT_STAFF_WARNING';
object4.ORIGINAL_POSTER = 6;
object4[6] = 'ORIGINAL_POSTER';
object4.AI = 7;
object4[7] = 'AI';
const Set = global.Set;
const set = new Set(['1211781489931452447', '1211780388607885393', '1166579889915310151']);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/applications/ApplicationConstants.tsx');
exports.ApplicationTypes = object3;
exports.BotTagTypes = object4;
exports.FREQUENCY_ITEM_LIMIT = 100;
exports.DISCORD_WAGONS_APPLICATION_ID = '1211781489931452447';
exports.DISCORD_WAGONS_QA_APPLICATION_ID = '1211780388607885393';
exports.DISCORD_WAGONS_DEV_APPLICATION_ID = '1166579889915310151';
exports.INSTALL_LESS_APP_IDS = ['1102741339122188349', '1211781489931452447', '1211780388607885393',
'1166579889915310151', '1276239071764680926', '1257458870390099989', '1247266306231898122',
'1245013453329141861', '1230632401701699617', '1098316259562635386'];
exports.OBEY_SILENT_HARDWARE_SWITCH_APP_IDS = set;
}
@@ -0,0 +1,160 @@
/* Metro module 11663; source: modules/applications/ApplicationFrecencyHooks.tsx; dependencies: [31, 7862, 670, 1362, 566, 21, 5065, 2] */
function _fun89409(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#89409, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11849:6, offset: 0x0200cba2, size: 159 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 applicationFrecencyStore = importDefault(7862) /* metro dependency 7862: ApplicationFrecencyStore */;
const env0_5 = (require(670) /* metro dependency 670: UserSettingsConstants */).UserSettingsTypes;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/applications/ApplicationFrecencyHooks.tsx');
exports.useSortApplicationsViaFrecency = useSortApplicationsViaFrecency;
}
function useSortApplicationsViaFrecency(a0, a1) { // fn#89410, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11849:262, offset: 0x0200cc41, size: 247 bytes, params: 3, frame: 18
const env0_0 = a0;
const env0_1 = a1;
const binding = env0_3;
binding.useEffect(function() {
var FrecencyUserSettingsActionCreators = require(dependencyMap[3]).FrecencyUserSettingsActionCreators;
FrecencyUserSettingsActionCreators.loadIfUncached(UserSettingsTypes.FRECENCY_AND_FAVORITES_SETTINGS);
}, []);
const applicationFrecencyWithoutLoadingLatest = (require(566) /* metro dependency 566: flux */).useStateFromStores([ApplicationFrecencyStore],
function() {
return ApplicationFrecencyStore.getApplicationFrecencyWithoutLoadingLatest();
});
const value = binding.useMemo(_fun89413, [a0, a1]);
return binding.useMemo(_fun89423, [binding.useMemo(_fun89419, [value, applicationFrecencyWithoutLoadingLatest,
binding.useMemo(_fun89416, [a0, a1])]), value, applicationFrecencyWithoutLoadingLatest, a1]);
}
function _fun89413() { // fn#89413, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11849:528, offset: 0x0200cd81, size: 59 bytes, params: 1, frame: 12
return require == null || require.length === 0 ? env0_0 : env0_0.map(_fun89414);
}
function _fun89416() { // fn#89416, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11849:685, offset: 0x0200ce2f, size: 43 bytes, params: 1, frame: 12
return require?.filter(_fun89417);
}
function _fun89419() { // fn#89419, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11849:778, offset: 0x0200cea0, size: 161 bytes, params: 1, frame: 17
var r6;
var r5;
var binding;
if (env0_4 != null) {
env0_4.forEach(_fun89420);
}
applicationFrecencyWithoutLoadingLatest.compute();
if (env0_4 == null) {
r5 = undefined;
} else {
binding = env0_4;
r5 = binding.map(_fun89421);
r6 = binding;
}
r5 = r5 ?? [];
binding = env0_3;
const items3 = [];
arraySpread(items3, binding, 0, r6);
const push = items3.push;
const items2 = [];
arraySpread(items2, r5, 0, r6);
apply(push, items2, items3, r6);
items3.sort(_fun89422);
return items3;
}
function _fun89423() { // fn#89423, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11849:1243, offset: 0x0200d04e, size: 167 bytes, params: 1, frame: 17
if (require != null) {
require.forEach(_fun89424);
}
let binding = env0_3;
binding.forEach(_fun89425);
binding = env0_0;
const env0_2 = (binding == null || binding.application == null ? undefined : binding.application.id) ?? '';
binding = env0_5;
let value = binding.filter(_fun89426);
const items2 = [];
value = arraySpread(items2, value, 0, undefined);
arraySpread(items2, binding.filter(_fun89427), value, undefined);
return items2;
}
function _fun89414(a0) { // fn#89414, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11849:563, offset: 0x0200cdbc, size: 84 bytes, params: 2, frame: 15
var environment;
const env0_0 = a0;
const object2 = {};
copyDataProperties(object2, a0, undefined);
const value = environment.__proto__;
const r1 = require?.some(_fun89415);
object2['isUserApp'] = r1 != null && r1;
return object2;
}
function _fun89417(a0) { // fn#89417, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11849:714, offset: 0x0200ce5a, size: 39 bytes, params: 2, frame: 11
const env0_0 = a0;
const binding = env1_0;
return !binding.some(_fun89418);
}
function _fun89420(a0) { // fn#89420, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11849:809, offset: 0x0200cf41, size: 112 bytes, params: 2, frame: 16
let value = environment.__proto__.__proto__;
value = Reflect.apply((importDefault(21) /* metro dependency 21: SnowflakeUtils */).extractTimestamp, value,
[a0.id]);
const getEntry = applicationFrecencyWithoutLoadingLatest.getEntry;
if (Reflect.apply(getEntry, applicationFrecencyWithoutLoadingLatestBinding, [a0.application.id]) == null) {
applicationFrecencyWithoutLoadingLatestBinding = applicationFrecencyWithoutLoadingLatest;
applicationFrecencyWithoutLoadingLatestBinding.track(a0.application.id, {timestamp: value});
}
}
function _fun89421({application}) { // fn#89421, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11849:978, offset: 0x0200cfb1, size: 49 bytes, params: 2, frame: 13
const value = environment.__proto__.__proto__;
return (require(5065) /* metro dependency 5065: ApplicationCommandUtils */).getApplicationCommandSection(application,
true);
}
function _fun89422(a0, a1) { // fn#89422, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11849:1081, offset: 0x0200cfe2, size: 108 bytes, params: 3, frame: 16
let value = environment.__proto__;
const score = applicationFrecencyWithoutLoadingLatest.getScore(a1.id);
const value3 = 0;
const r4 = score ?? value3;
value = applicationFrecencyWithoutLoadingLatest.getScore(a0.id);
value = r4 - (value ?? value3);
return value3 !== value ? value : a0.name.localeCompare(a1.name);
}
function _fun89424(a0) { // fn#89424, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11849:1280, offset: 0x0200d0f5, size: 81 bytes, params: 2, frame: 14
let value = environment.__proto__.__proto__;
value = Reflect.apply((importDefault(21) /* metro dependency 21: SnowflakeUtils */).extractTimestamp, value,
[a0.id]);
if (env0_1 == null || value > env0_1) {
env0_0 = a0;
}
}
function _fun89425(a0) { // fn#89425, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11849:1361, offset: 0x0200d146, size: 130 bytes, params: 2, frame: 18
const Math = global.Math;
const max = Math.max;
let value = environment.__proto__;
value = applicationFrecencyWithoutLoadingLatest.getEntry(a0.id);
const value2 = undefined;
const r7 = (value == null ? value2 : value.recentUses) ?? [];
const items2 = [];
arraySpread(items2, r7, 0, r7);
if (env0_1 == null || apply(max, items2, Math, r7) > env0_1) {
env0_0 = a0;
}
return value2;
}
function _fun89427({id}) { // fn#89427, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11849:1596, offset: 0x0200d1c8, size: 21 bytes, params: 2, frame: 2
return id !== env0_2;
}
function _fun89415({application}) { // fn#89415, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11849:627, offset: 0x0200ce10, size: 31 bytes, params: 2, frame: 2
return application.id === env0_0.id;
}
function _fun89418({id}) { // fn#89418, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11849:726, offset: 0x0200ce81, size: 31 bytes, params: 2, frame: 2
return id === env0_0.application.id;
}
@@ -0,0 +1,175 @@
/* Metro module 7862; source: modules/applications/ApplicationFrecencyStore.tsx; dependencies: [6, 7, 15, 17, 18, 1378, 1348, 4238, 670, 1909, 4393, 22, 566, 694, 2] */
function _fun62889(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#62889, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8040:6, offset: 0x01b6bc09, size: 539 bytes, params: 8, frame: 20
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(6) /* metro dependency 6 */;
const env0_3 = importDefault(7) /* metro dependency 7 */;
const env0_4 = importDefault(15) /* metro dependency 15 */;
const env0_5 = importDefault(17) /* metro dependency 17 */;
const env0_6 = importDefault(18) /* metro dependency 18 */;
const embeddedActivitiesStore = importDefault(1378) /* metro dependency 1378: EmbeddedActivitiesStore */;
const userSettingsProtoStore = importDefault(1348) /* metro dependency 1348: UserSettingsProtoStore */;
const FREQUENCY_ITEM_LIMIT = (require(4238) /* metro dependency 4238: ApplicationConstants */).FREQUENCY_ITEM_LIMIT;
const env0_9 = (require(670) /* metro dependency 670: UserSettingsConstants */).UserSettingsTypes;
const ApplicationCommandType = (require(1909) /* metro dependency 1909: Server */).ApplicationCommandType;
const CHAT = ApplicationCommandType.CHAT;
object = [CHAT];
const PRIMARY_ENTRY_POINT = ApplicationCommandType.PRIMARY_ENTRY_POINT;
object[1] = PRIMARY_ENTRY_POINT;
object = {pendingUsages: []};
let value = importDefault(4393) /* metro dependency 4393: Frecency */;
value = new value({computeBonus: function() {
return 100;
}, lookupKey: function(a0) {
return a0;
}, afterCompute: function() {
}, numFrequentlyItems: FREQUENCY_ITEM_LIMIT});
const PersistedStore = (importDefault(566) /* metro dependency 566: flux */).PersistedStore;
value = _fun62900(PersistedStore);
value.displayName = 'ApplicationFrecencyStore';
value.persistKey = 'ApplicationFrecency';
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */,
{APPLICATION_COMMAND_USED: APPLICATION_COMMAND_USED, EMBEDDED_ACTIVITY_OPEN: function({applicationId}) {
trackApplicationUsage(applicationId);
}, USER_SETTINGS_PROTO_UPDATE: USER_SETTINGS_PROTO_UPDATE_62910});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/applications/ApplicationFrecencyStore.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_62890() { // fn#62890, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8040:227, offset: 0x01b6be24, 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_62890_isNativeReflectConstruct = function() {
return !!result;
})();
}
function trackApplicationUsage(a0) { // fn#62893, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8040:632, offset: 0x01b6be82, size: 86 bytes, params: 2, frame: 15
const pendingUsages = env0_11.pendingUsages;
const push = pendingUsages.push;
const object2 = {key: a0};
const Date = global.Date;
object2.timestamp = Date.now();
Reflect.apply(push, pendingUsages, [object2]);
env0_12.track(a0);
env0_12.compute();
}
function handleUserSettingsProtoStoreChange_62894() { // fn#62894, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8040:740, offset: 0x01b6bed8, size: 111 bytes, params: 1, frame: 17
const applicationFrecency = UserSettingsProtoStore.frecencyWithoutFetchingLatest.applicationFrecency;
const value2 = undefined;
const r7 = (applicationFrecency == null ? value2 : applicationFrecency.applications) ?? ({});
const binding = env0_12;
binding.overwriteHistory((importDefault(22) /* metro dependency 22 */).mapValues(r7, function(a0) {
var r3;
var object = {};
copyDataProperties(object, a0, r3);
var value = a0.recentUses.map(global.Number);
value = value.filter(_fun62896);
object['recentUses'] = value;
return object;
}), env0_11.pendingUsages);
return value2;
}
function _fun62900(a0) { // fn#62900, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8040:1026, offset: 0x01b6bf8a, size: 185 bytes, params: 2, frame: 16
const closure = ApplicationFrecencyStore;
env0_6(closure, a0);
return env0_3(closure, [{key: 'initialize', value: value_62902}, {key: 'getState', value: value_62903},
{key: 'hasPendingUsage', value: value_62904}, {key: 'getApplicationFrecencyWithoutLoadingLatest',
value: value_62905}, {key: 'getScoreWithoutLoadingLatest', value: value_62906},
{key: 'getTopApplicationsWithoutLoadingLatest', value: value_62907}]);
}
function APPLICATION_COMMAND_USED({command}) { // fn#62908, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8040:2006, offset: 0x01b6c0db, size: 104 bytes, params: 2, frame: 14
var r1;
var r0;
var getLaunchState;
var applicationId;
var value4;
var trackApplicationUsageBinding;
var value;
const binding = env0_10;
const value2 = binding.includes(command.type);
if (value2) {
getLaunchState = EmbeddedActivitiesStore.getLaunchState;
applicationId = command.applicationId;
value4 = Reflect.apply(getLaunchState, EmbeddedActivitiesStore, [applicationId]);
r1 = value4 == null || !value4.isLaunching;
if (r1) {
trackApplicationUsageBinding = trackApplicationUsage;
applicationId = command.applicationId;
value = undefined;
trackApplicationUsageBinding(applicationId);
r1 = value;
}
r0 = r1;
} else {
r0 = !!value2;
}
return r0;
}
function USER_SETTINGS_PROTO_UPDATE_62910({settings, wasSaved}) { // fn#62910, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8040:2332, offset: 0x01b6c15b, size: 62 bytes, params: 2, frame: 4
const type = settings.type;
const FRECENCY_AND_FAVORITES_SETTINGS = UserSettingsTypes.FRECENCY_AND_FAVORITES_SETTINGS;
if (type === FRECENCY_AND_FAVORITES_SETTINGS) {
if (wasSaved) {
env0_11.pendingUsages = [];
return undefined;
}
}
return false;
}
function _fun62895(a0) { // fn#62895, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8040:936, offset: 0x01b6bf47, size: 67 bytes, params: 2, frame: 13
const object2 = {};
copyDataProperties(object2, a0, undefined);
const recentUses = a0.recentUses;
const map = recentUses.map;
const Number = global.Number;
let value = Reflect.apply(map, recentUses, [Number]);
value = value.filter(function(a0) {
return a0 > 0;
});
object2['recentUses'] = value;
return object2;
}
function value_62902(a0) { // fn#62902, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8040:1376, offset: 0x01b6c043, size: 74 bytes, params: 2, frame: 14
var value;
if (a0 != null) {
value = environment.__proto__;
env1_11 = a0;
}
this.waitFor(EmbeddedActivitiesStore, UserSettingsProtoStore);
this.syncWith([UserSettingsProtoStore], handleUserSettingsProtoStoreChange_62894);
}
function value_62906(a0) { // fn#62906, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8040:1715, offset: 0x01b6c0a7, size: 37 bytes, params: 2, frame: 11
const value = environment.__proto__;
return env1_12.getScore(a0) ?? 0;
}
@@ -0,0 +1,32 @@
/* Metro module 8447; source: modules/applications/ApplicationInteractionInfoUtils.tsx; dependencies: [1909, 2] */
function _fun67020(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#67020, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8632:6, offset: 0x01c1308b, size: 109 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/applications/ApplicationInteractionInfoUtils.tsx');
exports.canViewInteractionInfo = function(a0) {
return a0.interactionMetadata != null;
};
exports.isPrimaryEntryPointCommandMessage = function(a0) {
var r6;
var r0;
var property = a0.interactionMetadata;
var value = undefined;
if (property == null) {
r6 = value;
} else {
property = property.type;
r6 = property;
}
var value3 = r6 === require(dependencyMap[0]).InteractionTypes.APPLICATION_COMMAND;
if (value3) {
property = a0.interactionMetadata;
value = (property == null ? value : property.command_type) === require(dependencyMap[0]).ApplicationCommandType.PRIMARY_ENTRY_POINT;
r0 = value;
} else {
r0 = value3;
}
return r0;
};
}
@@ -0,0 +1,15 @@
/* Metro module 8753; source: modules/applications/ApplicationPresenceUtils.tsx; dependencies: [1379, 2] */
function _fun68530(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#68530, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8938:6, offset: 0x01c52a19, size: 106 bytes, params: 8, frame: 17
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/applications/ApplicationPresenceUtils.tsx');
exports.shouldDisableUserPresenceInChannel = shouldDisableUserPresenceInChannel;
}
function shouldDisableUserPresenceInChannel(a0, a1) { // fn#68531, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8938:226, offset: 0x01c52a83, size: 90 bytes, params: 3, frame: 14
const env0_0 = a0;
const channel = ChannelStore.getChannel(a1);
return channel != null && a0.bot && channel.isPrivate() && channel.rawRecipients.find(_fun68532) == null;
}
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,68 @@
/* Metro module 9345; source: modules/applications/disclosures.tsx; dependencies: [5, 661, 507, 9346, 1244, 2] */
function _fun72960(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#72960, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9531:6, offset: 0x01d5abd9, size: 208 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(5) /* metro dependency 5 */;
const env0_3 = (require(661) /* metro dependency 661: Constants */).Endpoints;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/applications/disclosures.tsx');
const ApplicationDisclosureType = (require(9346) /* metro dependency 9346: applications */).ApplicationDisclosureType;
exports.ApplicationDisclosure = ApplicationDisclosureType;
exports.getDisclosures = function() {
return _getDisclosures.apply(this, arguments);
};
exports.ackDisclosures = function() {
return _ackDisclosures.apply(this, arguments);
};
exports.getTextForDisclosure = getTextForDisclosure;
}
function _getDisclosures() { // fn#72961, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9531:126, offset: 0x01d5aca9, size: 50 bytes, params: 1, frame: 14
return env0_2(_fun72963).apply(this, arguments);
}
function _ackDisclosures() { // fn#72964, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9531:423, offset: 0x01d5ad87, size: 50 bytes, params: 1, frame: 14
return env0_2(_fun72966).apply(this, arguments);
}
function getTextForDisclosure(a0) { // fn#72969, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9531:954, offset: 0x01d5ae33, size: 199 bytes, params: 2, frame: 15
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const ApplicationDisclosureType = (require(9346) /* metro dependency 9346: applications */).ApplicationDisclosureType;
const IP_LOCATION = ApplicationDisclosureType.IP_LOCATION;
if (IP_LOCATION === a0) {
return intl.string(t['6wPmjo']);
}
const DISPLAYS_ADVERTISEMENTS = ApplicationDisclosureType.DISPLAYS_ADVERTISEMENTS;
if (DISPLAYS_ADVERTISEMENTS === a0) {
return intl.string(t['/uOMKZ']);
}
return null;
}
function* _fun72963(a0) { // fn#72963, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9531:179, offset: 0x01d5ace6, size: 161 bytes, params: 2, frame: 13
if (false) {
return undefined;
}
value = environment.__proto__.__proto__;
const value3 = env2_3.APPLICATION_DISCLOSURES(a0);
const HTTP = env2_0(env2_1[2]).HTTP;
const get = HTTP.get;
yield Reflect.apply(get, HTTP, [{'url': null, 'retries': 3, 'rejectWithError': false, url: value3}]);
value = undefined;
if (false) {
return value;
}
return {disclosures: value.body.disclosures, ackedDisclosures: value.body.acked_disclosures,
allAcked: value.body.all_acked};
}
function* _fun72966(a0, a1) { // fn#72966, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9531:476, offset: 0x01d5adc4, size: 111 bytes, params: 3, frame: 15
if (true) {
value = environment.__proto__.__proto__;
var value3 = env2_3.APPLICATION_DISCLOSURES(a0);
var HTTP = env2_0(env2_1[2]).HTTP;
yield HTTP.post({url: value3, body: {disclosures: a1}, rejectWithError: false});
}
}
@@ -0,0 +1,21 @@
/* Metro module 11948; source: modules/applications/getApplicationFromBotUserId.tsx; dependencies: [5189, 661, 566, 2] */
function _fun91699(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#91699, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12134:6, offset: 0x0206e63b, size: 136 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const userProfileStore = importDefault(5189) /* metro dependency 5189: UserProfileStore */;
const env0_3 = (require(661) /* metro dependency 661: Constants */).EMPTY_STRING_SNOWFLAKE_ID;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/applications/getApplicationFromBotUserId.tsx');
exports.default = useGetApplicationFromBotUserId;
}
function useGetApplicationFromBotUserId(a0) { // fn#91700, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12134:238, offset: 0x0206e6c3, size: 78 bytes, params: 2, frame: 15
const env0_0 = a0;
return (require(566) /* metro dependency 566: flux */).useStateFromStores([UserProfileStore],
_fun91701) ?? undefined;
}
function _fun91701() { // fn#91701, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12134:319, offset: 0x0206e711, size: 70 bytes, params: 1, frame: 16
return env0_0 === null || UserProfileStore.getUserProfile(env0_0 ?? EMPTY_STRING_SNOWFLAKE_ID) == null ? undefined : UserProfileStore.getUserProfile(env0_0 ?? EMPTY_STRING_SNOWFLAKE_ID).application;
}
@@ -0,0 +1,58 @@
/* Metro module 8809; source: modules/applications/getApplicationInstallURL.tsx; dependencies: [661, 2] */
function _fun68859(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#68859, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8994:6, offset: 0x01c5f8a3, size: 122 bytes, params: 8, frame: 18
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_0 = (require(661) /* metro dependency 661: Constants */).Routes;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/applications/getApplicationInstallURL.tsx');
exports.getActivityLaunchURL = getActivityLaunchURL;
exports.getApplicationInstallURL = getApplicationInstallURL;
}
function getActivityLaunchURL({applicationId, customId, referrerId, linkId}) { // fn#68860, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8994:219, offset: 0x01c5f91d, size: 203 bytes, params: 2, frame: 20
const URL = global.URL;
const uRL = new URL(Routes.ACTIVITY_DETAILS(applicationId),
'' + global.location.protocol + '//' + global.location.host);
const searchParams = uRL.searchParams;
if (linkId != null) {
searchParams.set('link_id', linkId);
}
if (referrerId != null) {
searchParams.set('referrer_id', referrerId);
}
if (customId != null) {
searchParams.set('custom_id', customId);
}
return uRL.toString();
}
function getApplicationInstallURL({id, customInstallUrl, installParams, integrationTypesConfig}) { // fn#68861, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8994:534, offset: 0x01c5f9e8, size: 275 bytes, params: 2, frame: 22
var permissions;
var scopes;
if (customInstallUrl != null) {
return customInstallUrl;
}
const URLSearchParams = global.URLSearchParams;
let uRLSearchParams = new URLSearchParams();
uRLSearchParams.set('client_id', id);
if (installParams != null) {
if (!(integrationTypesConfig != null && global.Object.values(integrationTypesConfig).some(function(a0) {
var value = undefined;
return (a0 == null ? value : a0.oauth2_install_params) != null || (a0 == null ? value : a0.oauth2InstallParams) != null;
}))) {
permissions = installParams.permissions;
scopes = installParams.scopes;
if (permissions != null) {
uRLSearchParams.set('permissions', permissions);
}
if (scopes != null) {
uRLSearchParams.set('scope', scopes.join(' '));
}
}
}
const protocol = global.location.protocol;
const host = global.location.host;
const OAUTH2_AUTHORIZE = Routes.OAUTH2_AUTHORIZE;
uRLSearchParams = uRLSearchParams.toString();
return '' + protocol + '//' + host + OAUTH2_AUTHORIZE + '?' + uRLSearchParams;
}
@@ -0,0 +1,11 @@
/* Metro module 12125; source: modules/applications/getBotTagFromUser.tsx; dependencies: [4238, 2] */
function _fun93043(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#93043, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12311:6, offset: 0x020a410c, size: 109 bytes, params: 8, frame: 18
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_0 = (require(4238) /* metro dependency 4238: ApplicationConstants */).BotTagTypes;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/applications/getBotTagFromUser.tsx');
exports.getBotTagTypeFromUser = function(a0) {
return a0.isSystemUser() ? BotTagTypes.SYSTEM_DM : a0.bot ? BotTagTypes.BOT : undefined;
};
}
@@ -0,0 +1,121 @@
/* Metro module 10658; source: modules/applications/installApplicationOnDemandIfNeeded.native.tsx; dependencies: [5, 4235, 4234, 661, 8063, 6772, 8042, 4863, 4015, 8870, 2] */
function _fun81978(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#81978, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10844:6, offset: 0x01ee60b7, size: 179 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(5) /* metro dependency 5 */;
const applicationRecord = importDefault(4235) /* metro dependency 4235: ApplicationRecord */;
const applicationStore = importDefault(4234) /* metro dependency 4234: ApplicationStore */;
const env0_5 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/applications/installApplicationOnDemandIfNeeded.native.tsx');
exports.installApplicationOnDemandIfNeeded = function() {
return _installApplicationOnDemandIfNeeded.apply(this, arguments);
};
}
function _installApplicationOnDemandIfNeeded() { // fn#81979, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10844:151, offset: 0x01ee616a, size: 50 bytes, params: 1, frame: 14
return env0_2(_fun81981).apply(this, arguments);
}
async function _fun81981({applicationId, channel, commandIntegrationTypes, appLauncherContext}) { // fn#81981, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10844:244, offset: 0x01ee61b0, size: 458 bytes, params: 2, frame: 22
var r10;
var scopes;
var Promise;
var application;
var value8;
var value9;
var USER_INSTALL;
var promise;
if (false) {
return undefined;
}
await undefined;
if (false) {
return undefined;
}
let binding = env2_0;
const value6 = binding(env2_1[4]);
if (value6.shouldInstallApplicationOnDemand({applicationId: applicationId, channel: channel,
commandIntegrationTypes: commandIntegrationTypes})) {
binding = env2_4;
application = binding.getApplication(applicationId);
if (application != null) {
r10 = application;
USER_INSTALL = env2_0(env2_1[6]).ApplicationIntegrationType.USER_INSTALL;
scopes = r10 == null || r10.integrationTypesConfig == null || (r10.integrationTypesConfig[USER_INSTALL] == null || r10.integrationTypesConfig[USER_INSTALL].oauth2InstallParams == null) ? value : r10.integrationTypesConfig[USER_INSTALL].oauth2InstallParams.scopes;
if (appLauncherContext != null) {
value = env2_0(env2_1[7]);
value.trackWithMetadata(env2_5.APP_LAUNCHER_OAUTH2_AUTHORIZE_OPENED, {application_id: applicationId,
location: appLauncherContext.location, section_name: appLauncherContext.sectionName,
source: appLauncherContext.entrypoint});
}
Promise = global.Promise;
value = Object.create(Promise.prototype, {constructor: {value: Promise}});
promise = new Promise(_fun81982);
return promise instanceof Object ? promise : value;
}
binding = env2_0;
value8 = binding(env2_1[5]);
await value8.fetchApplication(applicationId);
value9 = undefined;
if (false) {
return value9;
}
binding = env2_3;
r10 = binding.createFromServer(value9);
binding = env2_0;
USER_INSTALL = binding(env2_1[6]).ApplicationIntegrationType.USER_INSTALL;
scopes = r10 == null || r10.integrationTypesConfig == null || (r10.integrationTypesConfig[USER_INSTALL] == null || r10.integrationTypesConfig[USER_INSTALL].oauth2InstallParams == null) ? value : r10.integrationTypesConfig[USER_INSTALL].oauth2InstallParams.scopes;
if (appLauncherContext != null) {
value = env2_0(env2_1[7]);
value.trackWithMetadata(env2_5.APP_LAUNCHER_OAUTH2_AUTHORIZE_OPENED, {application_id: applicationId,
location: appLauncherContext.location, section_name: appLauncherContext.sectionName,
source: appLauncherContext.entrypoint});
}
Promise = global.Promise;
value = Object.create(Promise.prototype, {constructor: {value: Promise}});
promise = new Promise(_fun81982);
return promise instanceof Object ? promise : value;
}
Promise = global.Promise;
return Promise.resolve({isAuthorized: true});
}
function _fun81982(a0) { // fn#81982, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10844:930, offset: 0x01ee637a, size: 113 bytes, params: 2, frame: 15
var environment;
const env0_0 = a0;
const value = environment.__proto__.__proto__.__proto__;
const binding = env3_0;
const binding2 = env3_1;
binding(binding2[8]).dismissKeyboard();
binding(binding2[9]).openOAuth2Modal({clientId: applicationId, integrationType: USER_INSTALL, scopes: scopes,
callback: callback_81983});
}
function callback_81983({location}) { // fn#81983, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10844:1032, offset: 0x01ee63eb, size: 172 bytes, params: 2, frame: 15
var value;
var appLauncherContextBinding;
var value2;
var value3;
var trackWithMetadata;
var APP_LAUNCHER_OAUTH2_AUTHORIZE_SUCCEEDED;
if (location != null) {
value = environment.__proto__;
appLauncherContextBinding = appLauncherContext;
if (appLauncherContextBinding != null) {
value2 = environment.__proto__.__proto__.__proto__.__proto__;
value3 = env4_0(env4_1[7]);
trackWithMetadata = value3.trackWithMetadata;
APP_LAUNCHER_OAUTH2_AUTHORIZE_SUCCEEDED = env4_5.APP_LAUNCHER_OAUTH2_AUTHORIZE_SUCCEEDED;
appLauncherContextBinding = appLauncherContext;
Reflect.apply(trackWithMetadata, value3, [APP_LAUNCHER_OAUTH2_AUTHORIZE_SUCCEEDED,
{application_id: applicationId,
location: appLauncherContextBinding.location, section_name: appLauncherContextBinding.sectionName,
source: appLauncherContextBinding.entrypoint}]);
}
env0_0({isAuthorized: true});
} else {
env0_0({isAuthorized: false});
}
}
@@ -0,0 +1,38 @@
/* Metro module 10573; source: modules/applications/isSocialLayerApplication.tsx; dependencies: [661, 7504, 4121, 2] */
function _fun81574(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#81574, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10759:6, offset: 0x01ed4b76, size: 134 bytes, params: 8, frame: 19
const env0_0 = require;
const closure = isSocialLayerApplication;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = (require(661) /* metro dependency 661: Constants */).ApplicationFlags;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/applications/isSocialLayerApplication.tsx');
exports.default = closure;
exports.isSocialLayerSDKAuthorization = isSocialLayerSDKAuthorization;
}
function isSocialLayerApplication(a0) { // fn#81575, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10759:123, offset: 0x01ed4bfc, size: 94 bytes, params: 2, frame: 16
var r0;
var moduleValue2;
const applicationFlagUtilsModule = require(7504) /* metro dependency 7504: ApplicationFlagUtils */;
const hasApplicationFlag = applicationFlagUtilsModule.hasApplicationFlag;
const SOCIAL_LAYER_INTEGRATION_LIMITED = ApplicationFlags.SOCIAL_LAYER_INTEGRATION_LIMITED;
const hasApplicationFlag2 = Reflect.apply(hasApplicationFlag, applicationFlagUtilsModule, [a0,
SOCIAL_LAYER_INTEGRATION_LIMITED]);
if (hasApplicationFlag2) {
r0 = hasApplicationFlag2;
} else {
moduleValue2 = applicationFlagUtilsModule;
r0 = moduleValue2.hasApplicationFlag(a0, ApplicationFlags.SOCIAL_LAYER_INTEGRATION);
}
return r0;
}
function isSocialLayerSDKAuthorization(a0, a1) { // fn#81576, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10759:440, offset: 0x01ed4c5a, size: 45 bytes, params: 3, frame: 12
return isSocialLayerApplication(a0) && a1.some(_fun81577);
}
function _fun81577(a0) { // fn#81577, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10759:528, offset: 0x01ed4c87, size: 41 bytes, params: 2, frame: 11
const value = environment.__proto__;
return (require(4121) /* metro dependency 4121: scopes */).isSocialLayerUmbrellaScope(a0);
}
@@ -0,0 +1,13 @@
/* Metro module 7082; source: modules/applications/message_embed/MessageEmbedConstants.tsx; dependencies: [2] */
function _fun56518(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#56518, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7260:6, offset: 0x013ca3d8, size: 232 bytes, params: 8, frame: 17
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/applications/message_embed/MessageEmbedConstants.tsx');
exports.LinkType = {ACTIVITY: 'activity', APP_DISCOVERY: 'app_discovery', OAUTH: 'oauth',
CUSTOM_ACTIVITY_LINK: 'custom_activity_link', ACTIVITY_INVITE: 'activity_invite',
ACTIVITY_INSTANCE: 'activity_instance', RICH_PRESENCE_INVITE: 'rich_presence_invite',
LEGACY_RICH_PRESENCE_INVITE: 'legacy_rich_presence_invite', REQUEST_TO_STREAM: 'request_to_stream',
UNKNOWN: 'unknown'};
exports.AppMessageEmbedState = {ACTIVE: 'active', DEAD: 'dead'};
}
@@ -0,0 +1,41 @@
/* Metro module 10541; source: modules/applications/message_embed/native/createActivityMessageEmbed.tsx; dependencies: [10536, 9468, 2] */
function _fun81307(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#81307, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10727:6, offset: 0x01ec88d7, size: 96 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/applications/message_embed/native/createActivityMessageEmbed.tsx');
exports.createActivityMessageEmbed = createActivityMessageEmbed;
}
function createActivityMessageEmbed({theme, embedUrl, message, app, params}) { // fn#81308, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10727:227, offset: 0x01ec8937, size: 272 bytes, params: 2, frame: 19
var r2;
const createAppMessageEmbedModule = require(10536) /* metro dependency 10536: createAppMessageEmbed */;
const createAppMessageEmbed = createAppMessageEmbedModule.createAppMessageEmbed;
let object2 = {theme: theme, embedUrl: embedUrl, message: message, app: app};
const appMessageEmbed = Reflect.apply(createAppMessageEmbed, createAppMessageEmbedModule, [object2]);
if (appMessageEmbed == null) {
return null;
}
const linkId = params.linkId;
if (linkId == null) {
return appMessageEmbed;
}
let value = require(9468) /* metro dependency 9468: CustomActivityLinkUtils */;
value = value.getOrFetchCustomActivityLink(app.id, linkId);
if (value == null) {
r2 = null;
} else {
object2 = {};
copyDataProperties(object2, appMessageEmbed, theme);
object2['title'] = app.name;
object2['header'] = value.title;
object2['info'] = value.description;
object2['bannerRatio'] = 'bot';
value = value.getAssetURL();
object2['staticBannerSrc'] = value ?? null;
object2['tagline'] = null;
r2 = object2;
}
return r2;
}
@@ -0,0 +1,377 @@
/* Metro module 10536; source: modules/applications/message_embed/native/createAppMessageEmbed.tsx; dependencies: [57, 1878, 6874, 4234, 1483, 9859, 6772, 10537, 8189, 1244, 10538, 8046, 6873, 8045, 9466, 10539, 1423, 1471, 10540, 6789, 9527, 5068, 8087, 4015, 1583, 8870, 6797, 3856, 1360, 2] */
function _fun81290(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#81290, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10722:6, offset: 0x01ec75aa, size: 280 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const applicationAssetsStore = importDefault(6874) /* metro dependency 6874: ApplicationAssetsStore */;
const env0_6 = (require(6874) /* metro dependency 6874: ApplicationAssetsStore */).FetchState;
const applicationStore = importDefault(4234) /* metro dependency 4234: ApplicationStore */;
const env0_8 = (require(1483) /* metro dependency 1483: AppLauncherNativeConstants */).AppLauncherRouteName;
const env0_9 = (require(9859) /* metro dependency 9859: CodedLinksConstants */).CodedLinkExtendedType;
const env0_10 = ['embedded_cover'];
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/applications/message_embed/native/createAppMessageEmbed.tsx');
exports.getAppLinkGateResult = getAppLinkGateResult;
exports.createAppMessageEmbed = createAppMessageEmbed;
exports.handleTapAppMessageEmbed = handleTapAppMessageEmbed;
}
function createBlockedAppMessageEmbed({theme, message, visibility}) { // fn#81291, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10722:241, offset: 0x01ec76c2, size: 478 bytes, params: 2, frame: 19
var r9;
var r4;
const intl = require(dependencyMap[9]).intl;
const t = require(dependencyMap[9]).t;
const baseColors = importDefault(dependencyMap[8])(theme).baseColors;
const ApplicationEmbedVisibility = require(dependencyMap[7]).ApplicationEmbedVisibility;
const BLOCK_UNDERAGE = ApplicationEmbedVisibility.BLOCK_UNDERAGE;
if (visibility === BLOCK_UNDERAGE) {
r4 = intl.string(t.LPOzxB);
r9 = dependencyMap;
} else {
r4 = intl.string(t.NIZyKq);
}
const object2 = {};
copyDataProperties(object2, baseColors, r9);
const AppMessageEmbedDisplayType = require(dependencyMap[10]).AppMessageEmbedDisplayType;
const BLOCKED = AppMessageEmbedDisplayType.BLOCKED;
object2['displayType'] = BLOCKED;
object2['appId'] = '';
object2['messageId'] = message.id;
object2['title'] = null;
object2['header'] = intl.string(t.bZBN64);
object2['info'] = r4;
object2['tagline'] = null;
object2['iconSrc'] = null;
object2['staticBannerSrc'] = null;
object2['bannerRatio'] = 'bot';
object2['actions'] = [];
object2['embedUrl'] = null;
const APP_MESSAGE_EMBED = CodedLinkExtendedType.APP_MESSAGE_EMBED;
object2['extendedType'] = APP_MESSAGE_EMBED;
object2['gradientColors'] = [];
object2['type'] = null;
object2['headerText'] = null;
return object2;
}
function getAppLinkGateResult({appId, channel, message, theme}) { // fn#81292, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10722:931, offset: 0x01ec78a0, size: 274 bytes, params: 2, frame: 24
var r1;
var object2;
const application = ApplicationStore.getApplication(appId);
if (application == null) {
if (ApplicationStore.isFetchingApplication(appId) === false) {
(require(6772) /* metro dependency 6772: ApplicationActionCreators */).fetchApplication(appId);
}
return {state: 'unavailable'};
}
const applicationEmbedVisibility = (require(10537) /* metro dependency 10537: getApplicationEmbedVisibility */).getApplicationEmbedVisibility(application.contentClassification,
UserStore.getCurrentUser()?.nsfwAllowed, channel);
const ApplicationEmbedVisibility = (require(10537) /* metro dependency 10537: getApplicationEmbedVisibility */).ApplicationEmbedVisibility;
const DISPLAY = ApplicationEmbedVisibility.DISPLAY;
if (applicationEmbedVisibility !== DISPLAY) {
object2 = {state: 'blocked'};
object2.model = createBlockedAppMessageEmbed({theme: theme, message: message,
visibility: applicationEmbedVisibility});
r1 = object2;
} else {
r1 = {state: 'display', app: application};
}
return r1;
}
function createAppMessageEmbed({theme, embedUrl, message, app}) { // fn#81293, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10722:1443, offset: 0x01ec79b2, size: 1428 bytes, params: 2, frame: 34
var r10;
var r9;
var r6;
var r14;
var r1;
var applicationAssetFetchState;
var value4;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var items;
var moduleValue2;
var playInContext;
var instanceId;
var isCurrentlyInInstance;
var value11;
var id2;
var bot2;
var moduleValue4;
var assetIds;
var property;
var userBannerURL;
var appGradientColors;
var object2;
const AppMessageEmbedDisplayType = (require(10538) /* metro dependency 10538: CodedLinksTypes */).AppMessageEmbedDisplayType;
const baseColors = (importDefault(8189) /* metro dependency 8189: getEmbedThemeColors */)(theme).baseColors;
const channel_id = message.channel_id;
let id = app.id;
const name = app.name;
const bot = app.bot;
const tags = app.tags;
const maxParticipants = app.maxParticipants;
const icon = app.icon;
const appLauncherUtilsModule = require(8046) /* metro dependency 8046: AppLauncherUtils */;
const isEmbeddedApp2 = appLauncherUtilsModule.isEmbeddedApp(app);
if (isEmbeddedApp2) {
applicationAssetFetchState = ApplicationAssetsStore.getApplicationAssetFetchState(id);
if (applicationAssetFetchState === FetchState.NOT_FETCHED) {
(require(6873) /* metro dependency 6873: ApplicationAssetUtils */).fetchAssetIds(id, env0_10);
return null;
}
if (applicationAssetFetchState === FetchState.FETCHING) {
return null;
}
value4 = null;
r10 = value4 == maxParticipants ? intl.string(t.RjceQU) : maxParticipants > 0 ? intl.formatToPlainString(t.z8EAJW,
{count: maxParticipants}) : intl.string(t.RjceQU);
items = [];
if (isEmbeddedApp2) {
moduleValue2 = require(8045) /* metro dependency 8045: canLaunchFrame */;
if (moduleValue2.canLaunchFrame(app)) {
items.push({id: 'play_frame', label: intl.string(t.RscU7I)});
} else {
playInContext = (require(9466) /* metro dependency 9466: getPlayInContext */).getPlayInContext(id,
channel_id);
instanceId = playInContext.instanceId;
isCurrentlyInInstance = playInContext.isCurrentlyInInstance;
if (playInContext.canLaunchInChannel) {
items.push({id: 'play_in_channel',
label: isCurrentlyInInstance ? intl.string(t.DPfdsq) : value4 == instanceId ? intl.string(t.RscU7I) : intl.string(t.VJlc0S),
disabled: isCurrentlyInInstance});
} else {
items.push({id: 'play_in_dm', label: intl.string(t.JeK1Wg)});
}
}
}
value11 = tags.join(' ∙ ');
id2 = app.id;
bot2 = app.bot;
moduleValue4 = appLauncherUtilsModule;
if (moduleValue4.isEmbeddedApp(app)) {
assetIds = (require(6873) /* metro dependency 6873: ApplicationAssetUtils */).getAssetIds(id2, env0_10);
property = env0_3(value4 != assetIds ? assetIds : [], 1)[0];
r6 = value4 != property ? (require(6873) /* metro dependency 6873: ApplicationAssetUtils */).getAssetImage(id2,
property, 512) : value4;
if (value4 != r6) {
r14 = {bannerRatio: 'activity', staticBannerSrc: r6};
} else if (value4 == bot2) {
r14 = {'bannerRatio': 'bot', 'staticBannerSrc': null};
} else {
userBannerURL = (require(1423) /* metro dependency 1423: AvatarUtils */).getUserBannerURL({id: bot2.id,
banner: bot2.banner, size: 512, canAnimate: false});
r14 = value4 != userBannerURL ? {bannerRatio: 'bot',
staticBannerSrc: userBannerURL} : {'bannerRatio': 'bot',
'staticBannerSrc': null};
}
} else if (value4 == bot2) {
r14 = {'bannerRatio': 'bot', 'staticBannerSrc': null};
} else {
userBannerURL = (require(1423) /* metro dependency 1423: AvatarUtils */).getUserBannerURL({id: bot2.id,
banner: bot2.banner, size: 512, canAnimate: false});
r14 = value4 != userBannerURL ? {bannerRatio: 'bot',
staticBannerSrc: userBannerURL} : {'bannerRatio': 'bot',
'staticBannerSrc': null};
}
r9 = value4 != icon ? (require(10539) /* metro dependency 10539: nativeAppMessageEmbedUtil */).getAppIconSrc(id,
icon, bot) : value4;
r1 = value4 != r9 ? r9 : r14.staticBannerSrc;
appGradientColors = (require(10539) /* metro dependency 10539: nativeAppMessageEmbedUtil */).getAppGradientColors(value4 != r1 ? r1 : undefined);
object2 = {};
copyDataProperties(object2, baseColors, undefined);
copyDataProperties(object2, r14, undefined);
object2['displayType'] = AppMessageEmbedDisplayType.DISPLAY;
id = app.id;
object2['appId'] = id;
id = message.id;
object2['messageId'] = id;
object2['title'] = value4;
object2['header'] = name;
object2['info'] = value11;
object2['tagline'] = r10;
object2['iconSrc'] = r9;
object2['actions'] = items;
object2['embedUrl'] = embedUrl;
object2['extendedType'] = CodedLinkExtendedType.APP_MESSAGE_EMBED;
} else {
value4 = null;
r10 = value4 == maxParticipants ? intl.string(t.RjceQU) : maxParticipants > 0 ? intl.formatToPlainString(t.z8EAJW,
{count: maxParticipants}) : intl.string(t.RjceQU);
items = [];
if (isEmbeddedApp2) {
moduleValue2 = require(8045) /* metro dependency 8045: canLaunchFrame */;
if (moduleValue2.canLaunchFrame(app)) {
items.push({id: 'play_frame', label: intl.string(t.RscU7I)});
} else {
playInContext = (require(9466) /* metro dependency 9466: getPlayInContext */).getPlayInContext(id,
channel_id);
instanceId = playInContext.instanceId;
isCurrentlyInInstance = playInContext.isCurrentlyInInstance;
if (playInContext.canLaunchInChannel) {
items.push({id: 'play_in_channel',
label: isCurrentlyInInstance ? intl.string(t.DPfdsq) : value4 == instanceId ? intl.string(t.RscU7I) : intl.string(t.VJlc0S),
disabled: isCurrentlyInInstance});
} else {
items.push({id: 'play_in_dm', label: intl.string(t.JeK1Wg)});
}
}
}
value11 = tags.join(' ∙ ');
id2 = app.id;
bot2 = app.bot;
moduleValue4 = require(8046) /* metro dependency 8046: AppLauncherUtils */;
if (moduleValue4.isEmbeddedApp(app)) {
assetIds = (require(6873) /* metro dependency 6873: ApplicationAssetUtils */).getAssetIds(id2, env0_10);
property = env0_3(value4 != assetIds ? assetIds : [], 1)[0];
r6 = value4 != property ? (require(6873) /* metro dependency 6873: ApplicationAssetUtils */).getAssetImage(id2,
property, 512) : value4;
if (value4 != r6) {
r14 = {bannerRatio: 'activity', staticBannerSrc: r6};
} else if (value4 == bot2) {
r14 = {'bannerRatio': 'bot', 'staticBannerSrc': null};
} else {
userBannerURL = (require(1423) /* metro dependency 1423: AvatarUtils */).getUserBannerURL({id: bot2.id,
banner: bot2.banner, size: 512, canAnimate: false});
r14 = value4 != userBannerURL ? {bannerRatio: 'bot',
staticBannerSrc: userBannerURL} : {'bannerRatio': 'bot',
'staticBannerSrc': null};
}
} else if (value4 == bot2) {
r14 = {'bannerRatio': 'bot', 'staticBannerSrc': null};
} else {
userBannerURL = (require(1423) /* metro dependency 1423: AvatarUtils */).getUserBannerURL({id: bot2.id,
banner: bot2.banner, size: 512, canAnimate: false});
r14 = value4 != userBannerURL ? {bannerRatio: 'bot',
staticBannerSrc: userBannerURL} : {'bannerRatio': 'bot',
'staticBannerSrc': null};
}
r9 = value4 != icon ? (require(10539) /* metro dependency 10539: nativeAppMessageEmbedUtil */).getAppIconSrc(id,
icon, bot) : value4;
r1 = value4 != r9 ? r9 : r14.staticBannerSrc;
appGradientColors = (require(10539) /* metro dependency 10539: nativeAppMessageEmbedUtil */).getAppGradientColors(value4 != r1 ? r1 : undefined);
object2 = {};
copyDataProperties(object2, baseColors, undefined);
copyDataProperties(object2, r14, undefined);
object2['displayType'] = AppMessageEmbedDisplayType.DISPLAY;
object2['appId'] = app.id;
object2['messageId'] = message.id;
object2['title'] = value4;
object2['header'] = name;
object2['info'] = value11;
object2['tagline'] = r10;
object2['iconSrc'] = r9;
object2['actions'] = items;
object2['embedUrl'] = embedUrl;
object2['extendedType'] = CodedLinkExtendedType.APP_MESSAGE_EMBED;
}
object2['gradientColors'] = appGradientColors;
object2['type'] = value4;
object2['headerText'] = value4;
return object2;
}
function handleTapAppMessageEmbed(a0) { // fn#81294, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10722:3253, offset: 0x01ec7f46, size: 890 bytes, params: 2, frame: 21
var bot;
var object2;
var bestActiveInput;
var openCustomKeyboard;
var moduleValue2;
var launchActivityInBotDM;
var APP_MESSAGE_EMBED;
var channel_id;
var moduleValue3;
var joinOrStartActivityInChannel;
var value;
const application = ApplicationStore.getApplication(a0.appId);
const value3 = undefined;
const defaultImport = importDefault(1471) /* metro dependency 1471: URLUtils */;
const value4 = defaultImport.toURLSafe(a0.embedUrl);
let r5 = value4 == null ? value3 : value4.searchParams.get('referrer_id');
r5 = r5 ?? a0.message.author.id;
const r4 = (value4 == null ? value3 : value4.searchParams.get('custom_id')) ?? value3;
const actionId = a0.actionId;
if (actionId === 'play_in_channel') {
channel_id = a0.message.channel_id;
moduleValue3 = require(10540) /* metro dependency 10540: joinOrStartActivityInChannel */;
joinOrStartActivityInChannel = moduleValue3.joinOrStartActivityInChannel;
object2 = {};
object2.appId = a0.appId;
object2.channelId = channel_id;
object2.analyticsLocations = [(importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).APP_MESSAGE_EMBED];
object2.referrerId = r5;
object2.customId = r4;
Reflect.apply(joinOrStartActivityInChannel, moduleValue3, [object2]);
} else {
if (actionId === 'play_in_dm') {
bot = application == null ? value3 : application.bot;
if (bot == null) {
return value3;
}
moduleValue2 = require(9527) /* metro dependency 9527: AppLauncherPlayUtils */;
launchActivityInBotDM = moduleValue2.launchActivityInBotDM;
object2 = {};
object2.appId = a0.appId;
bot = application.bot;
object2.botId = bot.id;
APP_MESSAGE_EMBED = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).APP_MESSAGE_EMBED;
object2.analyticsLocations = [APP_MESSAGE_EMBED];
APP_MESSAGE_EMBED = (require(5068) /* metro dependency 5068: ApplicationCommandTypes */).CommandOrigin.APP_MESSAGE_EMBED;
object2.commandOrigin = APP_MESSAGE_EMBED;
object2.referrerId = r5;
object2.customId = r4;
Reflect.apply(launchActivityInBotDM, moduleValue2, [object2]);
return value3;
}
if (actionId === 'play_frame') {
(importDefault(8087) /* metro dependency 8087: FramesActionCreatorsNative */).launchFrame({applicationId: a0.appId});
return value3;
}
if (actionId === 'view_in_app_launcher') {
bestActiveInput = (require(4015) /* metro dependency 4015: ChatInputUtils */).getBestActiveInput();
if (bestActiveInput != null) {
openCustomKeyboard = bestActiveInput.openCustomKeyboard;
object2 = {};
object2.type = (require(1583) /* metro dependency 1583: KeyboardTypes */).KeyboardTypes.APP_LAUNCHER;
object2.context = {initialRouteName: AppLauncherRouteName.APPLICATION_VIEW, initiallyExpanded: true,
applicationId: a0.appId, referrerId: r5, customId: r4};
Reflect.apply(openCustomKeyboard, bestActiveInput, [object2]);
}
return value3;
}
if (actionId === 'add_app') {
if (application == null) {
return value3;
}
(require(8870) /* metro dependency 8870: ApplicationUtils */).installApplication({applicationId: application.id,
customInstallUrl: application.customInstallUrl, installParams: application.installParams,
integrationTypesConfig: application.integrationTypesConfig, source: 'app_message_embed'});
return value3;
}
if (actionId === 'link_copied') {
value = require(6797) /* metro dependency 6797: ClipboardUtilsNative */;
value.copy(a0.embedUrl);
value = require(3856) /* metro dependency 3856: ToastUtils */;
value.presentLinkCopied();
} else {
value = require(1360) /* metro dependency 1360: GlobalUtils */;
value.assertNever(a0.actionId);
}
}
return value3;
}
@@ -0,0 +1,75 @@
/* Metro module 10540; source: modules/applications/message_embed/native/utils/joinOrStartActivityInChannel.tsx; dependencies: [5, 1378, 1379, 1934, 8111, 7860, 8091, 2] */
function _fun81301(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#81301, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10726:6, offset: 0x01ec8670, size: 177 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 embeddedActivitiesStore = importDefault(1378) /* metro dependency 1378: EmbeddedActivitiesStore */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const selectedChannelStore = importDefault(1934) /* metro dependency 1934: SelectedChannelStore */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/applications/message_embed/native/utils/joinOrStartActivityInChannel.tsx');
exports.joinOrStartActivityInChannel = function() {
return _joinOrStartActivityInChannel.apply(this, arguments);
};
}
function _joinOrStartActivityInChannel() { // fn#81302, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10726:136, offset: 0x01ec8721, size: 50 bytes, params: 1, frame: 14
return env0_3(_fun81304).apply(this, arguments);
}
async function _fun81304({appId, channelId, analyticsLocations, customId, referrerId}) { // fn#81304, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10726:217, offset: 0x01ec8767, size: 368 bytes, params: 2, frame: 26
var compositeInstanceId;
var r4;
var value10;
var binding2;
var value11;
var runPrimaryAppCommandOrJoinEmbeddedActivity;
var object2;
var channel;
if (true) {
await undefined;
if (false) {
return undefined;
}
var binding = env2_4;
var selfEmbeddedActivityForChannel = binding.getSelfEmbeddedActivityForChannel(channelId);
if ((selfEmbeddedActivityForChannel == null ? value : selfEmbeddedActivityForChannel.applicationId) !== appId) {
binding = env2_4;
value10 = binding.getEmbeddedActivitiesForChannel(channelId).filter(function({applicationId}) {
return applicationId === appId;
});
compositeInstanceId = value10.length > 0 ? value10[0].compositeInstanceId : value;
binding = env2_0;
binding2 = env2_2;
value11 = binding(binding2[5]);
runPrimaryAppCommandOrJoinEmbeddedActivity = value11.runPrimaryAppCommandOrJoinEmbeddedActivity;
object2 = {channelId: channelId, applicationId: appId, isStart: compositeInstanceId == null};
binding = env2_1;
object2.embeddedActivitiesManager = binding(binding2[6])();
} else {
if (env2_6.getVoiceChannelId() === channelId) {
binding = env2_5;
channel = binding.getChannel(channelId);
r4 = (channel == null ? value : channel.guild_id) ?? null;
binding = env2_1;
binding(env2_2[4])(r4, selfEmbeddedActivityForChannel.location);
return true;
}
value10 = env2_4.getEmbeddedActivitiesForChannel(channelId).filter(function({applicationId}) {
return applicationId === appId;
});
compositeInstanceId = value10.length > 0 ? value10[0].compositeInstanceId : value;
binding = env2_0;
binding2 = env2_2;
value11 = binding(binding2[5]);
runPrimaryAppCommandOrJoinEmbeddedActivity = value11.runPrimaryAppCommandOrJoinEmbeddedActivity;
object2 = {channelId: channelId, applicationId: appId, isStart: compositeInstanceId == null};
object2.embeddedActivitiesManager = env2_1(binding2[6])();
}
object2.analyticsLocations = analyticsLocations;
object2.customId = customId;
object2.referrerId = referrerId;
await Reflect.apply(runPrimaryAppCommandOrJoinEmbeddedActivity, value11, [object2]);
}
}
@@ -0,0 +1,56 @@
/* Metro module 10539; source: modules/applications/message_embed/native/utils/nativeAppMessageEmbedUtil.tsx; dependencies: [4000, 697, 8372, 8373, 1423, 2] */
function _fun81298(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#81298, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10725:6, offset: 0x01ec8471, size: 217 bytes, params: 8, frame: 21
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = require(4000) /* metro dependency 4000: ColorUtils */;
let hexToRgba = value.hexToRgba;
let PRIMARY_760 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.PRIMARY_760;
value = Reflect.apply(hexToRgba, value, [PRIMARY_760]);
items = [value];
value = require(4000) /* metro dependency 4000: ColorUtils */;
hexToRgba = value.hexToRgba;
PRIMARY_760 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.PRIMARY_760;
items[1] = Reflect.apply(hexToRgba, value, [PRIMARY_760]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/applications/message_embed/native/utils/nativeAppMessageEmbedUtil.tsx');
exports.getAppGradientColors = getAppGradientColors;
exports.getAppIconSrc = getAppIconSrc;
}
function getAppGradientColors(a0) { // fn#81299, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10725:358, offset: 0x01ec854a, size: 213 bytes, params: 2, frame: 18
var r1;
var heroColors;
var primaryColor;
var secondaryColor;
var items2;
var value;
const binding = env0_3;
if (a0 != null) {
if ((require(8372) /* metro dependency 8372: useAvatarColor */).hasFetchedColors(a0)) {
heroColors = (require(8373) /* metro dependency 8373: useHeroColors */).getHeroColors(a0);
primaryColor = heroColors.primaryColor;
secondaryColor = heroColors.secondaryColor;
if ((primaryColor === '#000000' && secondaryColor === '#000000') !== false) {
r1 = binding;
} else {
value = require(4000) /* metro dependency 4000: ColorUtils */;
value = value.hexToRgba(primaryColor);
items2 = [value];
value = require(4000) /* metro dependency 4000: ColorUtils */;
items2[1] = value.hexToRgba(secondaryColor);
r1 = items2;
}
return r1;
}
(require(8372) /* metro dependency 8372: useAvatarColor */).maybeFetchColors(a0);
}
return binding;
}
function getAppIconSrc(a0, a1, a2) { // fn#81300, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10725:648, offset: 0x01ec861f, size: 81 bytes, params: 4, frame: 12
let value = importDefault(1423) /* metro dependency 1423: AvatarUtils */;
value = value.getApplicationIconURL({id: a0, icon: a1, bot: a2, fallbackAvatar: false});
const value2 = null;
return value2 != value ? value : value2;
}
@@ -0,0 +1,18 @@
/* Metro module 7084; source: modules/applications/message_embed/utils/activityBookmarkUtils.tsx; dependencies: [1471, 2] */
function _fun56523(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#56523, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7262:6, offset: 0x013ca7f5, size: 97 bytes, params: 8, frame: 17
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/applications/message_embed/utils/activityBookmarkUtils.tsx');
exports.extractActivityBookmarkParams = extractActivityBookmarkParams;
}
function extractActivityBookmarkParams(a0) { // fn#56524, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7262:224, offset: 0x013ca856, size: 182 bytes, params: 2, frame: 16
const value = undefined;
const value2 = (importDefault(1471) /* metro dependency 1471: URLUtils */).toURLSafe(a0);
const object2 = {};
object2.referrerId = (value2 == null ? value : value2.searchParams.get('referrer_id')) ?? value;
object2.customId = (value2 == null ? value : value2.searchParams.get('custom_id')) ?? value;
object2.linkId = (value2 == null ? value : value2.searchParams.get('link_id')) ?? value;
return object2;
}
@@ -0,0 +1,74 @@
/* Metro module 9466; source: modules/applications/message_embed/utils/getPlayInContext.tsx; dependencies: [1378, 1934, 566, 9467, 2] */
function _fun73611(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#73611, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9652:6, offset: 0x01d72f43, size: 145 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const embeddedActivitiesStore = importDefault(1378) /* metro dependency 1378: EmbeddedActivitiesStore */;
const selectedChannelStore = importDefault(1934) /* metro dependency 1934: SelectedChannelStore */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/applications/message_embed/utils/getPlayInContext.tsx');
exports.usePlayInContext = usePlayInContext;
exports.getPlayInContext = getPlayInContext;
}
function usePlayInContext(a0) { // fn#73612, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9652:230, offset: 0x01d72fd4, size: 288 bytes, params: 2, frame: 21
const env0_0 = a0;
const value2 = undefined;
const channelId = (require(566) /* metro dependency 566: flux */).useStateFromStores([SelectedChannelStore],
function() {
return SelectedChannelStore.getChannelId();
});
const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStores([EmbeddedActivitiesStore],
_fun73614);
const compositeInstanceId = value3 == null ? value2 : value3.compositeInstanceId;
const location = value3 == null ? value2 : value3.location;
const currentEmbeddedActivity = (require(566) /* metro dependency 566: flux */).useStateFromStores([EmbeddedActivitiesStore],
function() {
return EmbeddedActivitiesStore.getCurrentEmbeddedActivity();
});
let value = require(9467) /* metro dependency 9467: getEmbeddedActivityLaunchability */;
value = value.useEmbeddedActivityLaunchability(channelId);
const EmbeddedActivityLaunchability = (require(9467) /* metro dependency 9467: getEmbeddedActivityLaunchability */).EmbeddedActivityLaunchability;
const CAN_LAUNCH = EmbeddedActivityLaunchability.CAN_LAUNCH;
return {currentChannelId: channelId, instanceId: compositeInstanceId, instanceLocation: location,
isCurrentlyInInstance: compositeInstanceId != null && (currentEmbeddedActivity == null ? value2 : currentEmbeddedActivity.compositeInstanceId) === compositeInstanceId,
canLaunchInChannel: value === CAN_LAUNCH};
}
function getPlayInContext(a0, a1) { // fn#73617, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9652:900, offset: 0x01d7317d, size: 328 bytes, params: 3, frame: 18
var r2;
const EmbeddedActivityLaunchability = (require(9467) /* metro dependency 9467: getEmbeddedActivityLaunchability */).EmbeddedActivityLaunchability;
let value = a1;
const env0_0 = a0;
const r8 = value ?? SelectedChannelStore.getChannelId();
if (r8 == null) {
return {'currentChannelId': null, 'instanceId': null, 'instanceLocation': null, 'isCurrentlyInInstance': false,
'canLaunchInChannel': false};
}
if (r8 != null) {
value = require(9467) /* metro dependency 9467: getEmbeddedActivityLaunchability */;
value = value.getEmbeddedActivityLaunchabilityForChannel(r8);
r2 = value;
} else {
r2 = EmbeddedActivityLaunchability.NO_CHANNEL;
}
const value2 = undefined;
const CAN_LAUNCH = EmbeddedActivityLaunchability.CAN_LAUNCH;
const value4 = EmbeddedActivitiesStore.getEmbeddedActivitiesForChannel(r8).filter(_fun73618);
const r6 = value4.length > 0 ? value4[0] : value2;
const compositeInstanceId = r6 == null ? value2 : r6.compositeInstanceId;
const location = r6 == null ? value2 : r6.location;
value = EmbeddedActivitiesStore.getCurrentEmbeddedActivity();
return {currentChannelId: r8, instanceId: compositeInstanceId, instanceLocation: location,
isCurrentlyInInstance: compositeInstanceId != null && (value == null ? value2 : value.compositeInstanceId) === compositeInstanceId,
canLaunchInChannel: r2 === CAN_LAUNCH};
}
function _fun73614() { // fn#73614, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9652:354, offset: 0x01d73107, size: 78 bytes, params: 1, frame: 13
if (channelId == null) {
return null;
}
let value = EmbeddedActivitiesStore.getEmbeddedActivitiesForChannel(channelId);
value = value.filter(_fun73615);
return value.length > 0 ? value[0] : undefined;
}
@@ -0,0 +1,63 @@
/* Metro module 7086; source: modules/applications/message_embed/web/appMessageEmbedTracking.tsx; dependencies: [31, 661, 683, 7087, 7088, 2] */
function _fun56527(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#56527, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7264:6, offset: 0x013caa13, size: 324 bytes, params: 8, frame: 19
const env0_0 = require;
const closure = trackAppEmbedViewed;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/applications/message_embed/web/appMessageEmbedTracking.tsx');
exports.ClickArea = {VIEW: 'view', PLAY: 'play', CLOUD_PLAY: 'cloud_play', JOIN: 'join', ADD_APP: 'add_app',
JOIN_SERVER: 'join_server', INVITE: 'invite', SYNC: 'sync', CONTENT: 'content', BANNER: 'banner',
STREAM: 'stream', CONNECT_ACCOUNT: 'connect_account'};
exports.trackAppEmbedClick = trackAppEmbedClick;
exports.trackAppEmbedViewed = closure;
exports.useTrackAppEmbedViewed = useTrackAppEmbedViewed;
exports.trackAppEmbedLinkSent = function(a0, a1, a2, a3) {
var defaultImport = importDefault(dependencyMap[2]);
var APP_EMBED_LINK_SENT = AnalyticEvents.APP_EMBED_LINK_SENT;
defaultImport.track(APP_EMBED_LINK_SENT, {application_id: a0, link_type: a1, referrer_id: a2, custom_id: a3});
};
}
function trackAppEmbedViewed({appId, linkType, referrerId, customId, guildId, channelId, messageId, appEmbedState}) { // fn#56528, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7264:399, offset: 0x013cab57, size: 138 bytes, params: 2, frame: 22
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
const track = defaultImport.track;
const APP_EMBED_VIEWED = AnalyticEvents.APP_EMBED_VIEWED;
Reflect.apply(track, defaultImport, [APP_EMBED_VIEWED, {application_id: appId, link_type: linkType,
referrer_id: referrerId, custom_id: customId, guild_id: guildId, channel_id: channelId, message_id: messageId,
app_embed_state: appEmbedState}]);
}
function trackAppEmbedClick({applicationId, linkType, area, referrerId, customId, isDeadEnd, messageId}) { // fn#56529, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7264:805, offset: 0x013cabe1, size: 130 bytes, params: 2, frame: 21
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
const track = defaultImport.track;
const APP_EMBED_CLICKED = AnalyticEvents.APP_EMBED_CLICKED;
Reflect.apply(track, defaultImport, [APP_EMBED_CLICKED, {application_id: applicationId, link_type: linkType,
area: area, referrer_id: referrerId, custom_id: customId, is_dead_end: isDeadEnd, message_id: messageId}]);
}
function useTrackAppEmbedViewed(a0) { // fn#56530, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7264:1112, offset: 0x013cac63, size: 96 bytes, params: 2, frame: 17
const env0_0 = (require(7087) /* metro dependency 7087: appMessageEmbedTrackingConfig */).trackingConfigWithDefaults(a0);
const env0_1 = env0_3.useRef(false);
return (require(7088) /* metro dependency 7088: useIntersectionObserver */).useIsVisible(_fun56531, undefined);
}
function _fun56531(a0) { // fn#56531, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7264:1235, offset: 0x013cacc3, size: 177 bytes, params: 2, frame: 12
var binding;
var trackAppEmbedViewedBinding;
let value = a0;
if (!env0_1.current && value) {
env0_1.current = true;
if (env0_0.onView != null) {
env0_0.onView();
}
value = environment.__proto__;
trackAppEmbedViewedBinding = trackAppEmbedViewed;
binding = env0_0;
trackAppEmbedViewedBinding({appId: binding.id, linkType: binding.linkType, referrerId: binding.referrerId,
customId: binding.activityCustomId, guildId: binding.guildId, channelId: binding.channelId,
messageId: binding.messageId, appEmbedState: binding.appEmbedState});
}
}
@@ -0,0 +1,28 @@
/* Metro module 7087; source: modules/applications/message_embed/web/appMessageEmbedTrackingConfig.tsx; dependencies: [1226, 7082, 2] */
function _fun56533(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#56533, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7265:6, offset: 0x013cadc6, size: 126 bytes, params: 8, frame: 18
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
const env0_1 = (require(7082) /* metro dependency 7082: MessageEmbedConstants */).LinkType;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/applications/message_embed/web/appMessageEmbedTrackingConfig.tsx');
exports.trackingConfigWithDefaults = trackingConfigWithDefaults;
}
function trackingConfigWithDefaults(a0) { // fn#56534, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7265:260, offset: 0x013cae44, size: 285 bytes, params: 2, frame: 14
const object2 = {};
const value = undefined;
object2.id = (a0 == null ? value : a0.id) ?? '0';
object2.linkType = (a0 == null ? value : a0.linkType) ?? LinkType.UNKNOWN;
object2.referrerId = (a0 == null ? value : a0.referrerId) ?? AuthenticationStore.getId();
object2.activityCustomId = a0 == null ? value : a0.activityCustomId;
object2.onView = a0 == null ? value : a0.onView;
object2.onLinkCopied = a0 == null ? value : a0.onLinkCopied;
object2.guildId = a0 == null ? value : a0.guildId;
object2.channelId = a0 == null ? value : a0.channelId;
object2.messageId = a0 == null ? value : a0.messageId;
const isDeadEnd = a0 == null ? value : a0.isDeadEnd;
object2.isDeadEnd = isDeadEnd != null && isDeadEnd;
object2.appEmbedState = a0 == null ? value : a0.appEmbedState;
return object2;
}
@@ -0,0 +1,136 @@
/* Metro module 11204; source: modules/applications/native/AppInteractionInfoActionSheet.tsx; dependencies: [31, 27, 1885, 1867, 1878, 33, 4501, 1585, 11205, 8042, 566, 8061, 6819, 4573, 1244, 5278, 8743, 1305, 6275, 2] */
function _fun85612(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#85612, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11390:6, offset: 0x01f7570e, size: 286 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 env0_4 = (require(27) /* metro dependency 27 */).View;
const userRecord = importDefault(1885) /* metro dependency 1885: UserRecord */;
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
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({itemContainer: {'flexDirection': 'row',
'paddingVertical': 12, 'paddingHorizontal': 16, 'alignItems': 'center'}, itemLabel: {'flexDirection': 'column',
'alignItems': 'flex-start', 'paddingLeft': 12}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/applications/native/AppInteractionInfoActionSheet.tsx');
exports.default = AppInteractionInfoActionSheet;
}
function AppInteractionInfoActionSheet({message, guildId, onBack}) { // fn#85613, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11390:480, offset: 0x01f7582c, size: 1537 bytes, params: 2, frame: 37
var r17;
var r6;
var r5;
var userRecord;
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
var items5;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
var username;
var items2;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var format;
var ShLXXB;
var items3;
var items4;
var object2;
var items6;
var items7;
let env0_3 = undefined;
const styles = useStyles();
const bottom = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)().bottom;
const binding = env0_3;
const useMemo = binding.useMemo;
let object = [onBack];
const value3 = Reflect.apply(useMemo, binding, [_fun85614, object]);
let interactionMetadata = message.interactionMetadata;
const r1 = interactionMetadata == null ? undefined : interactionMetadata.authorizing_integration_owners[(require(8042) /* metro dependency 8042: ApplicationIntegrationType */).ApplicationIntegrationType.USER_INSTALL];
interactionMetadata = message.interactionMetadata;
env0_3 = interactionMetadata == null ? undefined : interactionMetadata.authorizing_integration_owners[(require(8042) /* metro dependency 8042: ApplicationIntegrationType */).ApplicationIntegrationType.GUILD_INSTALL];
interactionMetadata = message.interactionMetadata;
const env0_4 = interactionMetadata == null ? undefined : interactionMetadata.user.id;
const user2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], _fun85615);
const guild = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildStore], _fun85616);
const user = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() {
return UserStore.getUser(id);
});
env0_3.useEffect(_fun85618, [user2, r1]);
if (user != null) {
r17 = user;
} else {
userRecord = new UserRecord(message.interactionMetadata?.user);
}
if (guild != null) {
var viewBindingProps = {style: styles.itemContainer};
items3 = [((Component) => <Component guild={guild} size={(require(6819) /* metro dependency 6819: GuildIcon */).GuildIconSizes.SMALL_32} />)(importDefault(6819) /* metro dependency 6819: GuildIcon */)];
var viewBindingProps2 = {style: styles.itemLabel};
items4 = [<Text variant="text-md/semibold" color="mobile-text-heading-primary">{guild.name}</Text>];
items4[1] = <Text variant="text-xs/medium" color="text-subtle">{intl.format((require(1244) /* metro dependency 1244: indexNative */).t.ShLXXB,
{application: message.author.username})}</Text>;
items3[1] = <View {...viewBindingProps2}>{items4}</View>;
r6 = <View {...viewBindingProps}>{items3}</View>;
} else if (user2 != null) {
object = {onPress: onPress_85619};
var viewBindingProps = {style: styles.itemContainer};
items5 = [((Avatar) => <Avatar user={user2} size={(require(1305) /* metro dependency 1305: native */).AvatarSizes.REFRESH_MEDIUM_32} guildId={guildId} />)((require(1305) /* metro dependency 1305: native */).Avatar)];
var viewBindingProps2 = {style: styles.itemLabel};
username = user2.username;
items2 = [<Text variant="text-md/semibold" color="mobile-text-heading-primary">{username}</Text>];
format = intl.format;
ShLXXB = (require(1244) /* metro dependency 1244: indexNative */).t.ShLXXB;
username = message.author.username;
items2[1] = <Text variant="text-xs/medium" color="text-subtle">{Reflect.apply(format, intl, [ShLXXB,
{application: username}])}</Text>;
items5[1] = <View {...viewBindingProps2}>{items2}</View>;
r6 = <PressableOpacity {...object}><View {...viewBindingProps}>{items5}</View></PressableOpacity>;
} else {
r6 = null;
}
const BottomSheet = (require(6275) /* metro dependency 6275: BottomSheetNative */).BottomSheet;
const object3 = {paddingBottom: bottom};
if (r17 != null) {
object2 = {onPress: onPress_85620};
var viewBindingProps = {style: styles.itemContainer};
items6 = [((Avatar) => <Avatar user={r17} size={(require(1305) /* metro dependency 1305: native */).AvatarSizes.REFRESH_MEDIUM_32} guildId={guildId} />)((require(1305) /* metro dependency 1305: native */).Avatar)];
var viewBindingProps2 = {style: styles.itemLabel};
items7 = [<Text variant="text-md/semibold" color="mobile-text-heading-primary">{r17.username}</Text>];
items7[1] = <Text variant="text-xs/medium" color="text-subtle">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['04gxNg'])}</Text>;
items6[1] = <View {...viewBindingProps2}>{items7}</View>;
r5 = <PressableOpacity {...object2}><View {...viewBindingProps}>{items6}</View></PressableOpacity>;
} else {
r5 = null;
}
return (
<BottomSheet header={value3} bodyStyles={object3}>
{r6}
{r5}
</BottomSheet>
);
}
function _fun85614() { // fn#85614, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11390:601, offset: 0x01f75e2d, size: 51 bytes, params: 1, frame: 14
const value = environment.__proto__;
return ((Component) => <Component onBack={onBack} />)(importDefault(11205) /* metro dependency 11205: ContextMenuSubmenuActionSheetHeader */);
}
function _fun85618() { // fn#85618, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11390:1107, offset: 0x01f75e96, size: 71 bytes, params: 1, frame: 12
var value4;
if (user == null && env0_2 != null) {
value4 = environment.__proto__;
(require(8061) /* metro dependency 8061: UserActionCreators */).getUser(env0_2);
}
}
function AppInteractionInfoActionSheetOnPress() { // fn#85619, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11390:1681, owner: AppInteractionInfoActionSheet.onPress, offset: 0x01f75edd, size: 63 bytes, params: 1, frame: 13
const value = environment.__proto__;
return (importDefault(8743) /* metro dependency 8743: showUserProfileActionSheet */)({userId: user.id,
channelId: message.channel_id});
}
function AppInteractionInfoActionSheetOnPress_85620() { // fn#85620, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11390:2268, owner: AppInteractionInfoActionSheet.onPress, offset: 0x01f75f1c, size: 63 bytes, params: 1, frame: 13
const value = environment.__proto__;
return (importDefault(8743) /* metro dependency 8743: showUserProfileActionSheet */)({userId: user.id,
channelId: message.channel_id});
}
@@ -0,0 +1,98 @@
/* Metro module 8706; source: modules/applications/native/BotTag.tsx; dependencies: [31, 27, 4238, 33, 4501, 697, 1244, 8707, 4573, 2] */
function _fun68373(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#68373, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8891:6, offset: 0x01c4c41c, size: 426 bytes, params: 8, frame: 25
var object3;
const env0_0 = require;
const closure = getBotLabel;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_3 = (require(27) /* metro dependency 27 */).View;
const BotTagTypes = (require(4238) /* metro dependency 4238: ApplicationConstants */).BotTagTypes;
let value = require(33) /* metro dependency 33 */;
const env0_5 = value.jsx;
const env0_6 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object3 = {};
const object4 = {'paddingLeft': 4, 'paddingRight': 4, 'borderRadius': null, 'display': 'flex',
'flexDirection': 'row', 'justifyContent': 'center', 'alignItems': 'center', 'gap': 1};
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
object3.tag = object4;
object3.verifiedTagLeftPadding = {paddingLeft: 1};
let BACKGROUND_BRAND = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BRAND;
object3.tagNormal = {backgroundColor: BACKGROUND_BRAND};
let WHITE = (importDefault(697) /* metro dependency 697: native */).colors.WHITE;
object3.tagInverted = {backgroundColor: WHITE};
WHITE = (importDefault(697) /* metro dependency 697: native */).colors.WHITE;
object3.tagTextNormal = {color: WHITE};
BACKGROUND_BRAND = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BRAND;
object3.tagTextInverted = {color: BACKGROUND_BRAND};
const env0_7 = Reflect.apply(createStyles, value, [object3]);
const closure2 = BotTag;
closure2.Types = BotTagTypes;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/applications/native/BotTag.tsx');
exports.default = closure2;
exports.getBotLabel = closure;
}
function getBotLabel() { // fn#68374, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8891:593, offset: 0x01c4c5c6, size: 254 bytes, params: 1, frame: 16
var r0;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const value = a0;
const r2 = value !== undefined ? value : BotTagTypes.BOT;
const SYSTEM_DM = BotTagTypes.SYSTEM_DM;
if (SYSTEM_DM === r2) {
r0 = intl.string(t.lKQ7Wt);
} else if (BotTagTypes.OFFICIAL === r2) {
r0 = intl.string(t.lKQ7Wt);
} else if (BotTagTypes.SERVER === r2) {
r0 = intl.string(t.PuJGuM);
} else {
BotTagTypes.BOT;
r0 = intl.string(t['9RNkeF']);
}
return r0;
}
function BotTag({invertColor, type = BotTagTypes.BOT, style, verified}) { // fn#68375, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8891:865, offset: 0x01c4c6c4, size: 640 bytes, params: 2, frame: 26
var r6;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
invertColor = !(invertColor === undefined) && invertColor;
const styles = useStyles();
const botLabel = getBotLabel(type);
const OFFICIAL = BotTagTypes.OFFICIAL;
const r2 = type === OFFICIAL || type === BotTagTypes.SYSTEM_DM;
const r0 = verified || r2;
if (r0) {
const CheckmarkSmallBoldIcon = (require(8707) /* metro dependency 8707: CheckmarkSmallBoldIcon */).CheckmarkSmallBoldIcon;
r6 = <CheckmarkSmallBoldIcon size="xs" color={(importDefault(697) /* metro dependency 697: native */).colors.WHITE} />;
} else {
r6 = null;
}
const r12 = invertColor ? styles.tagInverted : styles.tagNormal;
const r10 = invertColor ? styles.tagTextInverted : styles.tagTextNormal;
const verifiedTagLeftPadding = r6 != null ? styles.verifiedTagLeftPadding : null;
const r4 = r2 ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t['7s687k']) : r0 ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.g76OcH) : type === BotTagTypes.SERVER ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t['39trQT']) : intl.string((require(1244) /* metro dependency 1244: indexNative */).t.qwJHjo);
const items2 = [styles.tag, r12, style, verifiedTagLeftPadding];
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<View
style={items2}
accessible
accessibilityRole="image"
accessibilityLabel={r4}
>
{r6}
<Text
variant="text-xs/semibold"
lineClamp={1}
maxFontSizeMultiplier={2}
style={[r10]}
>
{botLabel}
</Text>
</View>
);
}
@@ -0,0 +1,137 @@
/* Metro module 11364; source: modules/applications/useGetOrFetchApplicationBatched.tsx; dependencies: [6, 7, 31, 4234, 4041, 22, 6772, 566, 2] */
function _fun87131(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#87131, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11550:6, offset: 0x01fb0c8f, size: 223 bytes, params: 8, frame: 20
let env0_0 = require;
const closure = useRequestApplication;
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 = importAll(31) /* metro dependency 31 */;
const applicationStore = importDefault(4234) /* metro dependency 4234: ApplicationStore */;
let value = _fun87134();
value = new value();
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/applications/useGetOrFetchApplicationBatched.tsx');
exports.useRequestApplication = closure;
exports.useGetOrFetchApplicationBatched = function(a0) {
var env0_0 = a0;
useRequestApplication(a0);
return require(dependencyMap[7]).useStateFromStores([ApplicationStore], _fun87144, [a0]);
};
}
function useRequestApplication(a0) { // fn#87132, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11550:938, offset: 0x01fb0d6e, size: 46 bytes, params: 2, frame: 14
const env0_0 = a0;
env0_5.useEffect(_fun87133, [a0]);
}
function _fun87134() { // fn#87134, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11550:142, offset: 0x01fb0dd5, size: 84 bytes, params: 1, frame: 15
return env0_4(ApplicationFetchManager, [{key: 'request', value: function(a0) {
var r1;
var value;
var value2;
var property = this._pending;
if (!property.has(a0)) {
property = this._lastFetchedAttempted;
value = property.get(a0);
value2 = value != null;
if (value2) {
value = global.Date.now() - value;
value = value < 60000;
r1 = value;
} else {
r1 = value2;
}
if (!r1) {
property = this._pending;
property.add(a0);
property = this._flushHandler;
property.delay(false);
}
}
}}, {key: '_flush', value: value_87138}]);
}
function useGetOrFetchApplicationBatched(a0) { // fn#87143, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11550:1197, offset: 0x01fb10fb, size: 84 bytes, params: 2, frame: 17
const env0_0 = a0;
useRequestApplication(a0);
return (require(566) /* metro dependency 566: flux */).useStateFromStores([ApplicationStore], _fun87144, [a0]);
}
function _fun87133() { // fn#87133, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11550:985, offset: 0x01fb0d9c, size: 57 bytes, params: 1, frame: 12
var value4;
if (env0_0 != null && env0_0 !== '') {
value4 = environment.__proto__;
env1_7.request(env0_0);
}
}
function ApplicationFetchManager() { // fn#87135, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11550:163, offset: 0x01fb0e29, size: 161 bytes, params: 1, frame: 16
var environment;
const value = environment.__proto__;
env1_3(this, ApplicationFetchManager);
const Map = global.Map;
const value3 = Object.create(Map.prototype, {constructor: {value: Map}});
const map = new Map();
this._lastFetchedAttempted = map instanceof Object ? map : value3;
const Set = global.Set;
const value5 = Object.create(Set.prototype, {constructor: {value: Set}});
const set = new Set();
this._pending = set instanceof Object ? set : value5;
const DelayedCall = (require(4041) /* metro dependency 4041: Timers */).DelayedCall;
this._flushHandler = new DelayedCall(32, _fun87136);
}
function value_87138() { // fn#87138, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11550:559, offset: 0x01fb0f45, size: 227 bytes, params: 1, frame: 16
var environment;
var value;
this._pending.forEach(_fun87139);
this._pending.clear();
const items2 = [];
const items3 = [];
[].forEach(_fun87140);
if (items2.length > 0) {
value = environment.__proto__;
value = importDefault(22) /* metro dependency 22 */;
value = value.chunk(items2, 20);
value.forEach(_fun87141);
}
if (items3.length > 0) {
value = environment.__proto__;
value = importDefault(22) /* metro dependency 22 */;
value = value.chunk(items3, 20);
value.forEach(_fun87142);
}
}
function _fun87144() { // fn#87144, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11550:1305, offset: 0x01fb114f, size: 56 bytes, params: 1, frame: 13
const value2 = null;
return value2 != env0_0 ? env0_0 === '' ? value2 : ApplicationStore.getApplication(env0_0) : value2;
}
function _fun87139(a0) { // fn#87139, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11550:602, offset: 0x01fb1028, size: 62 bytes, params: 2, frame: 15
const _lastFetchedAttempted = env0_0._lastFetchedAttempted;
const set = _lastFetchedAttempted.set;
const Date = global.Date;
Reflect.apply(set, _lastFetchedAttempted, [a0, Date.now()]);
env0_1.push(a0);
}
function _fun87140(a0) { // fn#87140, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11550:711, offset: 0x01fb1066, size: 61 bytes, params: 2, frame: 12
const value = environment.__proto__.__proto__;
if (ApplicationStore.didFetchingApplicationFail(a0)) {
env0_3.push(a0);
} else {
env0_2.push(a0);
}
}
function _fun87141(a0) { // fn#87141, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11550:811, offset: 0x01fb10a3, size: 44 bytes, params: 2, frame: 14
const value = environment.__proto__.__proto__;
(importDefault(6772) /* metro dependency 6772: ApplicationActionCreators */).fetchApplications(a0, false);
}
function _fun87142(a0) { // fn#87142, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11550:891, offset: 0x01fb10cf, size: 44 bytes, params: 2, frame: 14
const value = environment.__proto__.__proto__;
(importDefault(6772) /* metro dependency 6772: ApplicationActionCreators */).fetchApplications(a0, true);
}
@@ -0,0 +1,76 @@
/* Metro module 6777; source: modules/applications/useGetOrFetchApplications.tsx; dependencies: [31, 4234, 628, 6772, 22, 1360, 566, 2] */
function _fun53390(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#53390, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6955:6, offset: 0x0134787f, size: 150 bytes, params: 8, frame: 20
const env0_0 = require;
const closure = useGetOrFetchApplications;
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 */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/applications/useGetOrFetchApplications.tsx');
exports.default = closure;
exports.useGetOrFetchApplication = useGetOrFetchApplication;
}
function useGetOrFetchApplications(a0) { // fn#53391, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6955:116, offset: 0x01347915, size: 136 bytes, params: 2, frame: 17
const value = a1;
const env0_0 = a0;
const r2 = !(value !== undefined) || value;
const env0_2 = env0_3.useRef([]);
env0_3.useEffect(_fun53392, [a0, r2]);
return (require(566) /* metro dependency 566: flux */).useStateFromStoresArray([ApplicationStore], _fun53393);
}
function useGetOrFetchApplication(a0) { // fn#53395, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6955:596, offset: 0x01347a98, size: 58 bytes, params: 2, frame: 15
let value = a1;
value = useGetOrFetchApplications(a0 != null ? [a0] : [], !(value !== undefined) || value);
return value[0];
}
function _fun53392() { // fn#53392, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6955:198, offset: 0x0134799d, size: 191 bytes, params: 1, frame: 19
var r1;
var value2;
var moduleValue;
var value4;
var defaultImport;
var fetchApplications;
var defaultImport2;
var value5;
let binding = env0_1;
if (binding) {
value2 = environment.__proto__;
moduleValue = require(628) /* metro dependency 628: shallowEqual */;
r1 = !moduleValue.areArraysShallowEqual(env0_0, env0_2.current);
} else {
r1 = binding;
}
if (r1) {
value4 = environment.__proto__;
defaultImport = importDefault(6772) /* metro dependency 6772: ApplicationActionCreators */;
fetchApplications = defaultImport.fetchApplications;
defaultImport2 = importDefault(22) /* metro dependency 22 */;
binding = env0_0;
value5 = defaultImport2(binding);
Reflect.apply(fetchApplications, defaultImport,
[value5.filter((require(1360) /* metro dependency 1360: GlobalUtils */).isNotNullish).uniq().value(),
false]);
env0_2.current = binding;
}
}
function _fun53393() { // fn#53393, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6955:396, offset: 0x01347a5c, size: 26 bytes, params: 1, frame: 11
return env0_0.map(_fun53394);
}
function _fun53394(a0) { // fn#53394, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6955:407, offset: 0x01347a76, size: 34 bytes, params: 2, frame: 12
var r0;
let value = undefined;
if (a0 != null) {
value = environment.__proto__.__proto__;
value = ApplicationStore.getApplication(a0);
r0 = value;
} else {
r0 = value;
}
return r0;
}
@@ -0,0 +1,272 @@
/* Metro module 16016; source: modules/applications/useGuildApplication.tsx; dependencies: [5, 57, 31, 4234, 566, 6772, 4131, 2] */
function _fun123812(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#123812, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16224:6, offset: 0x0259c5eb, size: 169 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 = importDefault(57) /* metro dependency 57 */;
const env0_5 = importAll(31) /* metro dependency 31 */;
const applicationStore = importDefault(4234) /* metro dependency 4234: ApplicationStore */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/applications/useGuildApplication.tsx');
exports.default = useGuildApplication;
}
function useGuildApplication(a0, a1) { // fn#123813, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16224:227, offset: 0x0259c694, size: 280 bytes, params: 3, frame: 24
const env0_0 = a0;
const env0_1 = a1;
const guildApplication = (require(566) /* metro dependency 566: flux */).useStateFromStores([ApplicationStore],
_fun123814);
const binding = env0_5;
let useState = binding.useState;
const value2 = Reflect.apply(useState, binding, [guildApplication == null]);
const binding2 = env0_4;
const value3 = binding2(value2, 2);
const property = value3[0];
const env0_3 = value3[1];
useState = binding.useState;
const value4 = binding2(Reflect.apply(useState, binding, []), 2);
const property2 = value4[0];
var env0_4 = value4[1];
useState = binding.useState;
const value5 = binding2(Reflect.apply(useState, binding, [false]), 2);
const property3 = value5[0];
const env0_6 = value5[1];
const useCallback = binding.useCallback;
let value = env0_3(_fun123816);
value = Reflect.apply(useCallback, binding, [value, [guildApplication, a1, a0]]);
binding.useEffect(_fun123817, [property3, value]);
return {application: guildApplication, error: property2, loading: property};
}
function _fun123814() { // fn#123814, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16224:299, offset: 0x0259c7ac, size: 34 bytes, params: 1, frame: 13
return ApplicationStore.getGuildApplication(env0_0, require);
}
function* _fun123816() { // fn#123816, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16224:474, offset: 0x0259c7d9, size: 236 bytes, params: 1, frame: 18
var value;
var value2;
var value3;
var binding;
var binding2;
var property;
var value4;
var getApplicationsForGuild;
var object2;
var value5;
var value6;
var value7;
var error;
var binding3;
var binding4;
var value8;
var APIError;
var prototype;
var aPIError;
var value10;
exceptionLanding39: while (true) {
value = undefined;
value2 = false;
if (value2) {
return value;
}
value = environment.__proto__;
if (dependencyMap == null) {
reducibleJoin38: while (true) {
if (require == null) {
break reducibleJoin38;
}
ApplicationStore(true);
env1_3(true);
value3 = environment.__proto__.__proto__;
reducibleJoin6: while (true) {
reduciblePort37: while (true) {
exceptionLanding22: while (true) {
try {
try {
binding = env2_1;
} catch (error) {
break exceptionLanding22;
}
} catch (error) {
break exceptionLanding39;
}
break reducibleJoin6;
}
try {
binding = env1_4;
} catch (error) {
break exceptionLanding39;
}
try {
binding3 = env2_0;
} catch (error) {
break exceptionLanding39;
}
try {
binding4 = env2_2;
} catch (error) {
break exceptionLanding39;
}
try {
property = binding4[6];
} catch (error) {
break exceptionLanding39;
}
try {
value8 = binding3(property);
} catch (error) {
break exceptionLanding39;
}
try {
APIError = value8.APIError;
} catch (error) {
break exceptionLanding39;
}
try {
prototype = APIError.prototype;
} catch (error) {
break exceptionLanding39;
}
try {
} catch (error) {
break exceptionLanding39;
}
try {
aPIError = new APIError();
} catch (error) {
break exceptionLanding39;
}
try {
value10 = aPIError instanceof Object ? aPIError : undefined;
} catch (error) {
break exceptionLanding39;
}
try {
binding(value10);
} catch (error) {
break exceptionLanding39;
}
break reduciblePort37;
}
env1_3(false);
break reducibleJoin38;
}
try {
try {
binding2 = env2_2;
} catch (error) {
break exceptionLanding22;
}
} catch (error) {
break exceptionLanding39;
}
try {
try {
property = binding2[5];
} catch (error) {
break exceptionLanding22;
}
} catch (error) {
break exceptionLanding39;
}
try {
try {
value4 = binding(property);
} catch (error) {
break exceptionLanding22;
}
} catch (error) {
break exceptionLanding39;
}
try {
try {
getApplicationsForGuild = value4.getApplicationsForGuild;
} catch (error) {
break exceptionLanding22;
}
} catch (error) {
break exceptionLanding39;
}
try {
try {
} catch (error) {
break exceptionLanding22;
}
} catch (error) {
break exceptionLanding39;
}
try {
try {
object2 = {};
} catch (error) {
break exceptionLanding22;
}
} catch (error) {
break exceptionLanding39;
}
try {
try {
} catch (error) {
break exceptionLanding22;
}
} catch (error) {
break exceptionLanding39;
}
try {
try {
object2.type = importDefault;
} catch (error) {
break exceptionLanding22;
}
} catch (error) {
break exceptionLanding39;
}
try {
try {
object2.includeTeam = true;
} catch (error) {
break exceptionLanding22;
}
} catch (error) {
break exceptionLanding39;
}
try {
try {
value5 = Reflect.apply(getApplicationsForGuild, value4, [require, object2]);
} catch (error) {
break exceptionLanding22;
}
} catch (error) {
break exceptionLanding39;
}
yield value5;
try {
try {
value6 = undefined;
value7 = false;
} catch (error) {
break exceptionLanding22;
}
} catch (error) {
break exceptionLanding39;
}
if (value7) {
env1_3(false);
return value6;
}
env1_3(false);
break reducibleJoin38;
}
}
return undefined;
}
env1_3(false);
throw error;
}
function _fun123817() { // fn#123817, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16224:673, offset: 0x0259c8c5, size: 24 bytes, params: 1, frame: 9
if (!env0_5) {
env0_7();
}
}
@@ -0,0 +1,20 @@
/* Metro module 9393; source: modules/applications/useIsSocialLayerParentApplication.tsx; dependencies: [31, 661, 7504, 2] */
function _fun73259(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#73259, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9579:6, offset: 0x01d654b9, size: 153 bytes, params: 8, frame: 19
const env0_0 = require;
const closure = function(a0) {
return require(dependencyMap[2]).hasApplicationFlag(a0, ApplicationFlags.PARENT);
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importAll(31) /* metro dependency 31 */;
const env0_3 = (require(661) /* metro dependency 661: Constants */).ApplicationFlags;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/applications/useIsSocialLayerParentApplication.tsx');
exports.default = useIsSocialLayerParentApplication;
exports.getIsSocialLayerParentApplication = closure;
}
function useIsSocialLayerParentApplication(a0) { // fn#73261, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9579:327, offset: 0x01d65586, size: 44 bytes, params: 2, frame: 14
const env0_0 = a0;
return env0_2.useMemo(_fun73262, [a0]);
}
@@ -0,0 +1,54 @@
/* Metro module 7504; source: modules/applications/utils/ApplicationFlagUtils.tsx; dependencies: [4235, 483, 2] */
function _fun60510(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#60510, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7682:6, offset: 0x01704c7a, size: 130 bytes, params: 8, frame: 18
const closure = getApplicationFlags;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const applicationRecord = importDefault(4235) /* metro dependency 4235: ApplicationRecord */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/applications/utils/ApplicationFlagUtils.tsx');
exports.getApplicationFlags = closure;
exports.hasApplicationFlag = hasApplicationFlag;
}
function getApplicationFlags(a0) { // fn#60511, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7682:106, offset: 0x01704cfc, size: 242 bytes, params: 2, frame: 15
var r4;
var r3;
var r2;
var r0;
var value;
var deserialize;
if (a0 == null) {
value = importAll(483) /* metro dependency 483: BigFlagUtils */;
value = value.deserialize(0);
r0 = value;
} else {
value = a0 != null;
if (value) {
r3 = a0 instanceof ApplicationRecord || 'flags' in a0 && typeof a0.flags === 'bigint';
if (!r3) {
r4 = 'flags' in a0 && a0.flags != null;
r4 = r4 && typeof a0.flags === 'object';
r4 = r4 && 'parts' in a0.flags;
r3 = r4;
}
r2 = r3;
} else {
r2 = value;
}
if (r2) {
r0 = a0.flags;
} else {
value = importAll(483) /* metro dependency 483: BigFlagUtils */;
deserialize = value.deserialize;
r0 = a0.flags_new ?? a0.flags ?? 0;
value = Reflect.apply(deserialize, value, [r0]);
r0 = value;
}
}
return r0;
}
function hasApplicationFlag(a0, a1) { // fn#60512, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7682:588, offset: 0x01704dee, size: 53 bytes, params: 3, frame: 14
const bigFlagUtilsModule = importAll(483) /* metro dependency 483: BigFlagUtils */;
return bigFlagUtilsModule.has(getApplicationFlags(a0), a1);
}
@@ -0,0 +1,62 @@
/* Metro module 8063; source: modules/applications/utils/ApplicationInstallUtils.tsx; dependencies: [7861, 5066, 8042, 2] */
function _fun64013(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#64013, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8241:6, offset: 0x01b993f5, size: 160 bytes, params: 8, frame: 19
const env0_0 = require;
const closure = function({customInstallUrl, installParams, integrationTypesConfig}) {
var r0;
var r1;
var value = customInstallUrl != null;
r0 = value || installParams != null;
if (!r0) {
value = integrationTypesConfig != null;
if (value) {
value = global.Object.values(integrationTypesConfig);
value = value.some(_fun64015);
r1 = value;
} else {
r1 = value;
}
r0 = r1;
}
return r0;
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const applicationCommandIndexStore = importDefault(7861) /* metro dependency 7861: ApplicationCommandIndexStore */;
const env0_3 = (require(5066) /* metro dependency 5066: ApplicationCommandConstants */).BuiltInSectionId;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/applications/utils/ApplicationInstallUtils.tsx');
exports.canInstallApplication = closure;
exports.isAppUserInstallable = isAppUserInstallable;
exports.shouldInstallApplicationOnDemand = shouldInstallApplicationOnDemand;
}
function canInstallApplication({customInstallUrl, installParams, integrationTypesConfig}) { // fn#64014, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8241:133, offset: 0x01b99495, size: 85 bytes, params: 2, frame: 13
var r1;
let value = customInstallUrl != null;
let r0 = value || installParams != null;
if (!r0) {
value = integrationTypesConfig != null;
if (value) {
value = global.Object.values(integrationTypesConfig);
value = value.some(function(a0) {
var value = undefined;
return (a0 == null ? value : a0.oauth2_install_params) != null || (a0 == null ? value : a0.oauth2InstallParams) != null;
});
r1 = value;
} else {
r1 = value;
}
r0 = r1;
}
return r0;
}
function isAppUserInstallable({customInstallUrl, installParams, integrationTypesConfig}) { // fn#64016, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8241:539, offset: 0x01b9951a, size: 102 bytes, params: 2, frame: 14
return canInstallApplication({customInstallUrl: customInstallUrl, installParams: installParams,
integrationTypesConfig: integrationTypesConfig}) && integrationTypesConfig != null && (require(8042) /* metro dependency 8042: ApplicationIntegrationType */).ApplicationIntegrationType.USER_INSTALL in integrationTypesConfig;
}
function shouldInstallApplicationOnDemand({applicationId, channel, commandIntegrationTypes}) { // fn#64017, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8241:823, offset: 0x01b99580, size: 188 bytes, params: 2, frame: 17
return !(commandIntegrationTypes != null && !commandIntegrationTypes.includes((require(8042) /* metro dependency 8042: ApplicationIntegrationType */).ApplicationIntegrationType.USER_INSTALL)) && (!(applicationId === BuiltInSectionId.BUILT_IN) && (!ApplicationCommandIndexStore.hasUserStateApplication(applicationId) && (channel == null || !ApplicationCommandIndexStore.hasContextStateApplication({applicationId: applicationId,
channelId: channel.id, guildId: channel.guild_id}))));
}
@@ -0,0 +1,30 @@
/* Metro module 10537; source: modules/applications/utils/getApplicationEmbedVisibility.tsx; dependencies: [5203, 5205, 2] */
function _fun81295(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#81295, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10723:6, offset: 0x01ec82c0, size: 142 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/applications/utils/getApplicationEmbedVisibility.tsx');
exports.ApplicationEmbedVisibility = {DISPLAY: 'display', BLOCK_UNDERAGE: 'block_underage',
BLOCK_CHANNEL_RESTRICTION: 'block_channel_restriction'};
exports.getApplicationEmbedVisibility = getApplicationEmbedVisibility;
}
function getApplicationEmbedVisibility(a0, a1, a2) { // fn#81296, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10723:391, offset: 0x01ec834e, size: 191 bytes, params: 4, frame: 18
var r0;
var moduleValue;
var contentClassificationToAgeRestriction;
var object2;
if (a0 == null) {
r0 = env0_2.DISPLAY;
} else {
moduleValue = require(5203) /* metro dependency 5203: ContentClassificationToAgeRestriction */;
contentClassificationToAgeRestriction = moduleValue.contentClassificationToAgeRestriction;
object2 = {};
object2.type = (require(5203) /* metro dependency 5203: ContentClassificationToAgeRestriction */).ContentClassificationVariant.MINIMAL;
object2.data = a0;
r0 = Reflect.apply(contentClassificationToAgeRestriction, moduleValue,
[object2]) !== (require(5205) /* metro dependency 5205: AgeRestrictionStatus */).AgeRestrictionStatus.ADULT ? env0_2.DISPLAY : a1 !== true ? env0_2.BLOCK_UNDERAGE : a2.isPrivate() || a2.nsfw ? env0_2.DISPLAY : env0_2.BLOCK_CHANNEL_RESTRICTION;
}
return r0;
}
@@ -0,0 +1,37 @@
/* Metro module 8040; source: modules/applications/utils/isApplicationAgeRestricted.tsx; dependencies: [4234, 8041, 5203, 5205, 2] */
function _fun63740(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#63740, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8218:6, offset: 0x01b8f005, size: 133 bytes, params: 8, frame: 20
const env0_0 = require;
const closure = isAgeRestrictedContentClassification;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const applicationStore = importDefault(4234) /* metro dependency 4234: ApplicationStore */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/applications/utils/isApplicationAgeRestricted.tsx');
exports.default = function(a0) {
if (importDefault(dependencyMap[1]).getConfig({location: 'isApplicationAgeRestricted'}).enabled) {
return isAgeRestrictedContentClassification(ApplicationStore.getApplication(a0)?.contentClassification);
}
return false;
};
exports.isAgeRestrictedContentClassification = closure;
}
function isAgeRestrictedContentClassification(a0) { // fn#63741, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8218:106, offset: 0x01b8f08a, size: 109 bytes, params: 2, frame: 17
var r0;
var contentClassificationToAgeRestriction;
var object2;
let value = a0 != null;
if (value) {
value = require(5203) /* metro dependency 5203: ContentClassificationToAgeRestriction */;
contentClassificationToAgeRestriction = value.contentClassificationToAgeRestriction;
object2 = {};
object2.type = (require(5203) /* metro dependency 5203: ContentClassificationToAgeRestriction */).ContentClassificationVariant.MINIMAL;
object2.data = a0;
value = Reflect.apply(contentClassificationToAgeRestriction, value, [object2]);
value = value === (require(5205) /* metro dependency 5205: AgeRestrictionStatus */).AgeRestrictionStatus.ADULT;
r0 = value;
} else {
r0 = value;
}
return r0;
}