This commit is contained in:
janisslsm committed 2026-07-28 01:06:53 +03:00
1 parent af3b49f756
commit 1781d25a15
22448 files changed
+2731829 -2650550

No files matched your search

@@ -1,8 +1,10 @@
/* Metro module 7082; source: modules/applications/message_embed/MessageEmbedConstants.tsx; dependencies: [2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 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');
(FileImportTrackerModule).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',
@@ -11,3 +13,4 @@ function _fun56518(global, require, importDefault, importAll, module, exports, d
exports.AppMessageEmbedState = {ACTIVE: 'active', DEAD: 'dead'};
}
global.__d(_fun56518, 7082, [2]) /* metro module 7082, dependencies: [2] */;
@@ -1,41 +1,45 @@
/* Metro module 10541; source: modules/applications/message_embed/native/createActivityMessageEmbed.tsx; dependencies: [10536, 9468, 2] */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as CustomActivityLinkUtilsModule from '../../../activities/utils/CustomActivityLinkUtils.tsx'; /* Metro dependency 9468 */
import * as CreateAppMessageEmbedModule from './createAppMessageEmbed.tsx'; /* Metro dependency 10536 */
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');
(FileImportTrackerModule).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 createAppMessageEmbed = CreateAppMessageEmbedModule.createAppMessageEmbed;
let object = {theme: theme, embedUrl: embedUrl, message: message, app: app};
const appMessageEmbed = Reflect.apply(createAppMessageEmbed, CreateAppMessageEmbedModule, [object]);
if (appMessageEmbed == null) {
return null;
}
const linkId = params.linkId;
if (linkId == null) {
return appMessageEmbed;
}
let value = CustomActivityLinkUtilsModule;
value = value.getOrFetchCustomActivityLink(app.id, linkId);
if (value == null) {
r2 = null;
} else {
object = {};
copyDataProperties(object, appMessageEmbed, theme);
object['title'] = app.name;
object['header'] = value.title;
object['info'] = value.description;
object['bannerRatio'] = 'bot';
value = value.getAssetURL();
object['staticBannerSrc'] = value ?? null;
object['tagline'] = null;
r2 = object;
}
return r2;
}
}
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;
}
global.__d(_fun81307, 10541, [10536, 9468, 2]) /* metro module 10541, dependencies: [10536, 9468, 2] */;
@@ -1,168 +1,181 @@
/* 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] */
import Module00057 from '../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import URLUtils from '../../../../utils/URLUtils.tsx'; /* Metro dependency 1471 */
import UserStore from '../../../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import ApplicationStore from '../../ApplicationStore.tsx'; /* Metro dependency 4234 */
import ApplicationAssetsStore from '../../ApplicationAssetsStore.tsx'; /* Metro dependency 6874 */
import GetEmbedThemeColors from '../../../messages/native/renderer/row_data/embeds/getEmbedThemeColors.tsx'; /* Metro dependency 8189 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as IndexNativeModule from '../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as AppLauncherNativeConstantsModule from '../../../app_launcher/native/AppLauncherNativeConstants.tsx'; /* Metro dependency 1483 */
import * as ApplicationAssetsStoreModule from '../../ApplicationAssetsStore.tsx'; /* Metro dependency 6874 */
import * as CodedLinksConstantsModule from '../../../messages/native/renderer/row_data/embeds/coded_links/CodedLinksConstants.tsx'; /* Metro dependency 9859 */
import * as CodedLinksTypesModule from '../../../messages/native/renderer/row_data/embeds/coded_links/CodedLinksTypes.tsx'; /* Metro dependency 10538 */
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');
(FileImportTrackerModule).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);
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);
}
return {state: 'unavailable'};
const object = {};
copyDataProperties(object, baseColors, r9);
const AppMessageEmbedDisplayType = require(dependencyMap[10]).AppMessageEmbedDisplayType;
const BLOCKED = AppMessageEmbedDisplayType.BLOCKED;
object['displayType'] = BLOCKED;
object['appId'] = '';
object['messageId'] = message.id;
object['title'] = null;
object['header'] = intl.string(t.bZBN64);
object['info'] = r4;
object['tagline'] = null;
object['iconSrc'] = null;
object['staticBannerSrc'] = null;
object['bannerRatio'] = 'bot';
object['actions'] = [];
object['embedUrl'] = null;
const APP_MESSAGE_EMBED = CodedLinkExtendedType.APP_MESSAGE_EMBED;
object['extendedType'] = APP_MESSAGE_EMBED;
object['gradientColors'] = [];
object['type'] = null;
object['headerText'] = null;
return object;
}
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;
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 object;
const application = ApplicationStore.getApplication(appId);
if (application == null) {
if (ApplicationStore.isFetchingApplication(appId) === false) {
(require(6772) /* metro dependency 6772: ApplicationActionCreators */).fetchApplication(appId);
}
return {state: 'unavailable'};
}
if (applicationAssetFetchState === FetchState.FETCHING) {
return null;
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) {
object = {state: 'blocked'};
object.model = createBlockedAppMessageEmbed({theme: theme, message: message,
visibility: applicationEmbedVisibility});
r1 = object;
} else {
r1 = {state: 'display', app: application};
}
value4 = null;
r10 = value4 == maxParticipants ? intl.string(t.RjceQU) : maxParticipants > 0 ? intl.formatToPlainString(t.z8EAJW,
{count: maxParticipants}) : intl.string(t.RjceQU);
items = [];
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 = (IndexNativeModule).intl;
const t = (IndexNativeModule).t;
var items2;
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 object;
const AppMessageEmbedDisplayType = (CodedLinksTypesModule).AppMessageEmbedDisplayType;
const baseColors = (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) {
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});
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);
items2 = [];
if (isEmbeddedApp2) {
moduleValue2 = require(8045) /* metro dependency 8045: canLaunchFrame */;
if (moduleValue2.canLaunchFrame(app)) {
items2.push({id: 'play_frame', label: intl.string(t.RscU7I)});
} else {
items.push({id: 'play_in_dm', label: intl.string(t.JeK1Wg)});
playInContext = (require(9466) /* metro dependency 9466: getPlayInContext */).getPlayInContext(id,
channel_id);
instanceId = playInContext.instanceId;
isCurrentlyInInstance = playInContext.isCurrentlyInInstance;
if (playInContext.canLaunchInChannel) {
items2.push({id: 'play_in_channel',
label: isCurrentlyInInstance ? intl.string(t.DPfdsq) : value4 == instanceId ? intl.string(t.RscU7I) : intl.string(t.VJlc0S),
disabled: isCurrentlyInInstance});
} else {
items2.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};
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 = Module00057(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 {
@@ -172,75 +185,75 @@ function createAppMessageEmbed({theme, embedUrl, message, app}) { // fn#81293, s
staticBannerSrc: userBannerURL} : {'bannerRatio': 'bot',
'staticBannerSrc': null};
}
} else if (value4 == bot2) {
r14 = {'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);
object = {};
copyDataProperties(object, baseColors, undefined);
copyDataProperties(object, r14, undefined);
object['displayType'] = AppMessageEmbedDisplayType.DISPLAY;
id = app.id;
object['appId'] = id;
id = message.id;
object['messageId'] = id;
object['title'] = value4;
object['header'] = name;
object['info'] = value11;
object['tagline'] = r10;
object['iconSrc'] = r9;
object['actions'] = items2;
object['embedUrl'] = embedUrl;
object['extendedType'] = CodedLinkExtendedType.APP_MESSAGE_EMBED;
} 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});
value4 = null;
r10 = value4 == maxParticipants ? intl.string(t.RjceQU) : maxParticipants > 0 ? intl.formatToPlainString(t.z8EAJW,
{count: maxParticipants}) : intl.string(t.RjceQU);
items2 = [];
if (isEmbeddedApp2) {
moduleValue2 = require(8045) /* metro dependency 8045: canLaunchFrame */;
if (moduleValue2.canLaunchFrame(app)) {
items2.push({id: 'play_frame', label: intl.string(t.RscU7I)});
} else {
items.push({id: 'play_in_dm', label: intl.string(t.JeK1Wg)});
playInContext = (require(9466) /* metro dependency 9466: getPlayInContext */).getPlayInContext(id,
channel_id);
instanceId = playInContext.instanceId;
isCurrentlyInInstance = playInContext.isCurrentlyInInstance;
if (playInContext.canLaunchInChannel) {
items2.push({id: 'play_in_channel',
label: isCurrentlyInInstance ? intl.string(t.DPfdsq) : value4 == instanceId ? intl.string(t.RscU7I) : intl.string(t.VJlc0S),
disabled: isCurrentlyInInstance});
} else {
items2.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};
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 = Module00057(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 {
@@ -250,128 +263,124 @@ function createAppMessageEmbed({theme, embedUrl, message, app}) { // fn#81293, s
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);
object = {};
copyDataProperties(object, baseColors, undefined);
copyDataProperties(object, r14, undefined);
object['displayType'] = AppMessageEmbedDisplayType.DISPLAY;
object['appId'] = app.id;
object['messageId'] = message.id;
object['title'] = value4;
object['header'] = name;
object['info'] = value11;
object['tagline'] = r10;
object['iconSrc'] = r9;
object['actions'] = items2;
object['embedUrl'] = embedUrl;
object['extendedType'] = CodedLinkExtendedType.APP_MESSAGE_EMBED;
}
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;
object['gradientColors'] = appGradientColors;
object['type'] = value4;
object['headerText'] = value4;
return object;
}
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) {
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 object;
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 = 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;
object = {};
object.appId = a0.appId;
object.channelId = channel_id;
object.analyticsLocations = [(importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).APP_MESSAGE_EMBED];
object.referrerId = r5;
object.customId = r4;
Reflect.apply(joinOrStartActivityInChannel, moduleValue3, [object]);
} 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;
object = {};
object.appId = a0.appId;
bot = application.bot;
object.botId = bot.id;
APP_MESSAGE_EMBED = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).APP_MESSAGE_EMBED;
object.analyticsLocations = [APP_MESSAGE_EMBED];
APP_MESSAGE_EMBED = (require(5068) /* metro dependency 5068: ApplicationCommandTypes */).CommandOrigin.APP_MESSAGE_EMBED;
object.commandOrigin = APP_MESSAGE_EMBED;
object.referrerId = r5;
object.customId = r4;
Reflect.apply(launchActivityInBotDM, moduleValue2, [object]);
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) {
if (actionId === 'play_frame') {
(importDefault(8087) /* metro dependency 8087: FramesActionCreatorsNative */).launchFrame({applicationId: a0.appId});
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);
if (actionId === 'view_in_app_launcher') {
bestActiveInput = (require(4015) /* metro dependency 4015: ChatInputUtils */).getBestActiveInput();
if (bestActiveInput != null) {
openCustomKeyboard = bestActiveInput.openCustomKeyboard;
object = {};
object.type = (require(1583) /* metro dependency 1583: KeyboardTypes */).KeyboardTypes.APP_LAUNCHER;
object.context = {initialRouteName: AppLauncherRouteName.APPLICATION_VIEW, initiallyExpanded: true,
applicationId: a0.appId, referrerId: r5, customId: r4};
Reflect.apply(openCustomKeyboard, bestActiveInput, [object]);
}
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;
}
return value3;
}
global.__d(_fun81290, 10536, [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]) /* metro module 10536, 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] */;
@@ -1,75 +1,79 @@
/* Metro module 10540; source: modules/applications/message_embed/native/utils/joinOrStartActivityInChannel.tsx; dependencies: [5, 1378, 1379, 1934, 8111, 7860, 8091, 2] */
import Module00005 from '../../../../../by-id/module-00005.js'; /* Metro dependency 5 */
import EmbeddedActivitiesStore from '../../../../activities/EmbeddedActivitiesStore.tsx'; /* Metro dependency 1378 */
import ChannelStore from '../../../../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import SelectedChannelStore from '../../../../../stores/SelectedChannelStore.tsx'; /* Metro dependency 1934 */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 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');
(FileImportTrackerModule).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;
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 Module00005(_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 object;
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;
object = {channelId: channelId, applicationId: appId, isStart: compositeInstanceId == null};
binding = env2_1;
object.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;
object = {channelId: channelId, applicationId: appId, isStart: compositeInstanceId == null};
object.embeddedActivitiesManager = env2_1(binding2[6])();
}
object.analyticsLocations = analyticsLocations;
object.customId = customId;
object.referrerId = referrerId;
await Reflect.apply(runPrimaryAppCommandOrJoinEmbeddedActivity, value11, [object]);
}
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]);
}
}
global.__d(_fun81301, 10540, [5, 1378, 1379, 1934, 8111, 7860, 8091,
2]) /* metro module 10540, dependencies: [5, 1378, 1379, 1934, 8111, 7860, 8091, 2] */;
@@ -1,4 +1,7 @@
/* Metro module 10539; source: modules/applications/message_embed/native/utils/nativeAppMessageEmbedUtil.tsx; dependencies: [4000, 697, 8372, 8373, 1423, 2] */
import AvatarUtils from '../../../../../utils/AvatarUtils.tsx'; /* Metro dependency 1423 */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 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;
@@ -7,50 +10,52 @@ function _fun81298(global, require, importDefault, importAll, module, exports, d
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];
items2 = [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');
items2[1] = Reflect.apply(hexToRgba, value, [PRIMARY_760]);
(FileImportTrackerModule).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;
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;
}
return r1;
(require(8372) /* metro dependency 8372: useAvatarColor */).maybeFetchColors(a0);
}
(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 = AvatarUtils;
value = value.getApplicationIconURL({id: a0, icon: a1, bot: a2, fallbackAvatar: false});
const value2 = null;
return value2 != value ? value : value2;
}
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;
}
global.__d(_fun81298, 10539, [4000, 697, 8372, 8373, 1423,
2]) /* metro module 10539, dependencies: [4000, 697, 8372, 8373, 1423, 2] */;
@@ -1,18 +1,22 @@
/* Metro module 7084; source: modules/applications/message_embed/utils/activityBookmarkUtils.tsx; dependencies: [1471, 2] */
import URLUtils from '../../../../utils/URLUtils.tsx'; /* Metro dependency 1471 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 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');
(FileImportTrackerModule).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 = (URLUtils).toURLSafe(a0);
const object = {};
object.referrerId = (value2 == null ? value : value2.searchParams.get('referrer_id')) ?? value;
object.customId = (value2 == null ? value : value2.searchParams.get('custom_id')) ?? value;
object.linkId = (value2 == null ? value : value2.searchParams.get('link_id')) ?? value;
return object;
}
}
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;
}
global.__d(_fun56523, 7084, [1471, 2]) /* metro module 7084, dependencies: [1471, 2] */;
@@ -1,74 +1,87 @@
/* Metro module 9466; source: modules/applications/message_embed/utils/getPlayInContext.tsx; dependencies: [1378, 1934, 566, 9467, 2] */
import EmbeddedActivitiesStore from '../../../activities/EmbeddedActivitiesStore.tsx'; /* Metro dependency 1378 */
import SelectedChannelStore from '../../../../stores/SelectedChannelStore.tsx'; /* Metro dependency 1934 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as GetEmbeddedActivityLaunchabilityModule from '../../../activities/utils/getEmbeddedActivityLaunchability.tsx'; /* Metro dependency 9467 */
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');
(FileImportTrackerModule).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 = GetEmbeddedActivityLaunchabilityModule;
value = value.useEmbeddedActivityLaunchability(channelId);
const EmbeddedActivityLaunchability = (GetEmbeddedActivityLaunchabilityModule).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 _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;
function _fun73615({applicationId}) { // fn#73615, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9652:433, offset: 0x01d73155, size: 21 bytes, params: 2, frame: 2
return applicationId === env1_0;
}
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;
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 _fun73618({applicationId}) { // fn#73618, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9652:1307, offset: 0x01198930, size: 21 bytes, params: 2, frame: 2
return applicationId === env0_0;
}
}
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;
}
global.__d(_fun73611, 9466, [1378, 1934, 566, 9467,
2]) /* metro module 9466, dependencies: [1378, 1934, 566, 9467, 2] */;
@@ -1,63 +1,70 @@
/* Metro module 7086; source: modules/applications/message_embed/web/appMessageEmbedTracking.tsx; dependencies: [31, 661, 683, 7087, 7088, 2] */
import AnalyticsUtils from '../../../../utils/AnalyticsUtils.tsx'; /* Metro dependency 683 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as ConstantsModule from '../../../../Constants.tsx'; /* Metro dependency 661 */
import * as AppMessageEmbedTrackingConfigModule from './appMessageEmbedTrackingConfig.tsx'; /* Metro dependency 7087 */
import * as UseIntersectionObserverModule from '../../../../external/discord_common/js/shared/hooks/useIntersectionObserver.tsx'; /* Metro dependency 7088 */
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 trackAppEmbedViewed2 = 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');
(FileImportTrackerModule).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.trackAppEmbedViewed = trackAppEmbedViewed2;
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});
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 = 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 = 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 = (AppMessageEmbedTrackingConfigModule).trackingConfigWithDefaults(a0);
const env0_1 = ReactModule.useRef(false);
return (UseIntersectionObserverModule).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});
}
}
}
}
global.__d(_fun56527, 7086, [31, 661, 683, 7087, 7088,
2]) /* metro module 7086, dependencies: [31, 661, 683, 7087, 7088, 2] */;
@@ -1,28 +1,31 @@
/* Metro module 7087; source: modules/applications/message_embed/web/appMessageEmbedTrackingConfig.tsx; dependencies: [1226, 7082, 2] */
import AuthenticationStore from '../../../../stores/AuthenticationStore.tsx'; /* Metro dependency 1226 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as MessageEmbedConstantsModule from '../MessageEmbedConstants.tsx'; /* Metro dependency 7082 */
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');
(FileImportTrackerModule).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 object = {};
const value = undefined;
object.id = (a0 == null ? value : a0.id) ?? '0';
object.linkType = (a0 == null ? value : a0.linkType) ?? LinkType.UNKNOWN;
object.referrerId = (a0 == null ? value : a0.referrerId) ?? AuthenticationStore.getId();
object.activityCustomId = a0 == null ? value : a0.activityCustomId;
object.onView = a0 == null ? value : a0.onView;
object.onLinkCopied = a0 == null ? value : a0.onLinkCopied;
object.guildId = a0 == null ? value : a0.guildId;
object.channelId = a0 == null ? value : a0.channelId;
object.messageId = a0 == null ? value : a0.messageId;
const isDeadEnd = a0 == null ? value : a0.isDeadEnd;
object.isDeadEnd = isDeadEnd != null && isDeadEnd;
object.appEmbedState = a0 == null ? value : a0.appEmbedState;
return object;
}
}
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;
}
global.__d(_fun56533, 7087, [1226, 7082, 2]) /* metro module 7087, dependencies: [1226, 7082, 2] */;