Initial commit
This commit is contained in:
commit
af3b49f756
16065 files changed
+2938410
No files matched your search
@@ -0,0 +1,29 @@
|
||||
/* Metro module 11732; source: modules/app_dms/getAppDMApplication.tsx; dependencies: [4234, 5189, 1878, 2] */
|
||||
function _fun89911(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#89911, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11918:6, offset: 0x02023440, size: 138 bytes, params: 8, frame: 18
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const applicationStore = importDefault(4234) /* metro dependency 4234: ApplicationStore */;
|
||||
const userProfileStore = importDefault(5189) /* metro dependency 5189: UserProfileStore */;
|
||||
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/app_dms/getAppDMApplication.tsx');
|
||||
exports.getAppDMApplication = getAppDMApplication;
|
||||
}
|
||||
|
||||
function getAppDMApplication(a0) { // fn#89912, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11918:221, offset: 0x020234ca, size: 171 bytes, params: 2, frame: 16
|
||||
var userProfile;
|
||||
const isPrivate = a0.isPrivate();
|
||||
const value2 = undefined;
|
||||
const r1 = isPrivate ? a0.getRecipientId() : value2;
|
||||
const user = UserStore.getUser(r1);
|
||||
let r2 = (user == null ? value2 : user.bot) !== true ? value2 : r1;
|
||||
const appIdForBotUserId = ApplicationStore.getAppIdForBotUserId(r2);
|
||||
if (r2 != null) {
|
||||
userProfile = UserProfileStore.getUserProfile(r2);
|
||||
r2 = userProfile == null || userProfile.application == null ? value2 : userProfile.application.id;
|
||||
} else {
|
||||
r2 = value2;
|
||||
}
|
||||
r2 = appIdForBotUserId ?? r2;
|
||||
return ApplicationStore.getApplication(r2);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,79 @@
|
||||
/* Metro module 9726; source: modules/app_dms/native/AppDMOptionsBottomSheet.tsx; dependencies: [31, 27, 5109, 661, 33, 4501, 697, 566, 8743, 4080, 7007, 6779, 6275, 6231, 6238, 1244, 2] */
|
||||
function _fun76418(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#76418, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9912:6, offset: 0x01dceabe, size: 290 bytes, params: 8, frame: 21
|
||||
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 authorizedAppsStore = importDefault(5109) /* metro dependency 5109: AuthorizedAppsStore */;
|
||||
const env0_6 = (require(661) /* metro dependency 661: Constants */).UserSettingsSections;
|
||||
let value = require(33) /* metro dependency 33 */;
|
||||
const env0_7 = value.jsx;
|
||||
const env0_8 = value.jsxs;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
const BACKGROUND_BASE_LOWEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWEST;
|
||||
const env0_9 = Reflect.apply(createStyles, value, [{sheet: {backgroundColor: BACKGROUND_BASE_LOWEST},
|
||||
content: {'paddingLeft': 16, 'paddingRight': 16, 'paddingBottom': 24}}]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/app_dms/native/AppDMOptionsBottomSheet.tsx');
|
||||
exports.default = AppDMOptionsBottomSheet;
|
||||
}
|
||||
|
||||
function AppDMOptionsBottomSheet({userId, channel, application}) { // fn#76419, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9912:430, offset: 0x01dcebe0, size: 490 bytes, params: 2, frame: 30
|
||||
const styles = useStyles();
|
||||
const newestTokenForApplication = (require(566) /* metro dependency 566: flux */).useStateFromStores([AuthorizedAppsStore],
|
||||
function() {
|
||||
return AuthorizedAppsStore.getNewestTokenForApplication(application?.id);
|
||||
});
|
||||
const binding = newestTokenForApplication;
|
||||
const value2 = binding.useCallback(_fun76421, [channel.id, userId]);
|
||||
const value3 = binding.useCallback(_fun76422, [application, newestTokenForApplication]);
|
||||
binding.useEffect(_fun76423, []);
|
||||
const BottomSheet = (require(6275) /* metro dependency 6275: BottomSheetNative */).BottomSheet;
|
||||
const TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
|
||||
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
let string = intl.string;
|
||||
const tableRow = <TableRow label={Reflect.apply(string, intl,
|
||||
[(require(1244) /* metro dependency 1244: indexNative */).t.iXAna6])} onPress={value2} />;
|
||||
string = intl.string;
|
||||
const KUsDNI = (require(1244) /* metro dependency 1244: indexNative */).t.KUsDNI;
|
||||
return (
|
||||
<BottomSheet startExpanded backgroundStyles={styles.sheet}>
|
||||
<View style={styles.content}>
|
||||
<TableRowGroup hasIcons={false}>
|
||||
{tableRow}
|
||||
<TableRow
|
||||
label={Reflect.apply(string, intl, [KUsDNI])}
|
||||
onPress={value3}
|
||||
disabled={newestTokenForApplication == null}
|
||||
/>
|
||||
</TableRowGroup>
|
||||
</View>
|
||||
</BottomSheet>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun76421() { // fn#76421, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9912:618, offset: 0x01dcedf9, size: 80 bytes, params: 1, frame: 15
|
||||
const value = environment.__proto__;
|
||||
(importDefault(8743) /* metro dependency 8743: showUserProfileActionSheet */)({userId: userId,
|
||||
channelId: channel.id});
|
||||
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
|
||||
}
|
||||
|
||||
function _fun76422() { // fn#76422, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9912:713, offset: 0x01dcee49, size: 126 bytes, params: 1, frame: 16
|
||||
var value4;
|
||||
if (application != null && newestTokenForApplication != null) {
|
||||
value4 = environment.__proto__;
|
||||
(require(7007) /* metro dependency 7007: openUserSettings */).openUserSettings({screen: UserSettingsSections.AUTHORIZED_APP,
|
||||
|
||||
params: {oauth2Token: newestTokenForApplication}});
|
||||
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
|
||||
}
|
||||
}
|
||||
|
||||
function _fun76423() { // fn#76423, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9912:869, offset: 0x01dceec7, size: 37 bytes, params: 1, frame: 11
|
||||
const value = environment.__proto__;
|
||||
(importDefault(6779) /* metro dependency 6779: AuthorizedAppsActionCreators */).fetch();
|
||||
}
|
||||
|
||||
@@ -0,0 +1,100 @@
|
||||
/* Metro module 9707; source: modules/app_dms/useAppDMChatInputState.tsx; dependencies: [31, 7861, 4234, 5189, 4235, 1878, 661, 1909, 566, 8491, 694, 6777, 2] */
|
||||
function _fun76295(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#76295, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9893:6, offset: 0x01dc95f8, size: 340 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(7861) /* metro dependency 7861: ApplicationCommandIndexStore */).useQueryState;
|
||||
const applicationStore = importDefault(4234) /* metro dependency 4234: ApplicationStore */;
|
||||
const userProfileStore = importDefault(5189) /* metro dependency 5189: UserProfileStore */;
|
||||
const applicationRecord = importDefault(4235) /* metro dependency 4235: ApplicationRecord */;
|
||||
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
|
||||
const env0_9 = (require(661) /* metro dependency 661: Constants */).EMPTY_STRING_SNOWFLAKE_ID;
|
||||
const ApplicationCommandType = (require(1909) /* metro dependency 1909: Server */).ApplicationCommandType;
|
||||
const PRIMARY_ENTRY_POINT = ApplicationCommandType.PRIMARY_ENTRY_POINT;
|
||||
items = [PRIMARY_ENTRY_POINT];
|
||||
const CHAT = ApplicationCommandType.CHAT;
|
||||
items[1] = CHAT;
|
||||
const MESSAGE = ApplicationCommandType.MESSAGE;
|
||||
items[2] = MESSAGE;
|
||||
const USER = ApplicationCommandType.USER;
|
||||
items[3] = USER;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/app_dms/useAppDMChatInputState.tsx');
|
||||
exports.default = useAppDMChatInputState;
|
||||
}
|
||||
|
||||
function useAppDMChatInputState({context}) { // fn#76296, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9893:459, offset: 0x01dc974c, size: 503 bytes, params: 2, frame: 22
|
||||
const value = undefined;
|
||||
const env0_3 = value;
|
||||
const channel = context.channel;
|
||||
let binding = env0_3;
|
||||
const value3 = binding.useMemo(_fun76297, [channel]);
|
||||
const appIdForBotUserId = (require(566) /* metro dependency 566: flux */).useStateFromStores([ApplicationStore],
|
||||
_fun76298);
|
||||
const value4 = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserProfileStore], _fun76299);
|
||||
const r7 = appIdForBotUserId ?? (value4 == null ? value : value4.id);
|
||||
binding = env0_3;
|
||||
binding.useEffect(_fun76300, [value3, r7]);
|
||||
binding.useEffect(_fun76301, [value3 == null ? value : value3.id]);
|
||||
const value5 = useQueryState({channel: channel, type: 'channel'}, {commandTypes: env0_10}, {applicationId: r7,
|
||||
allowFetch: (value3 == null ? value : value3.id) != null,
|
||||
allowApplicationState: true}).descriptors.find(_fun76302);
|
||||
const application = value5 == null ? value : value5.application;
|
||||
const value6 = application.useMemo(_fun76303, [application]);
|
||||
const value7 = (require(6777) /* metro dependency 6777: useGetOrFetchApplications */).useGetOrFetchApplication(value6 == null ? r7 : value);
|
||||
const bot = value3 == null ? value : value3.bot;
|
||||
return {application: value6 ?? value7 ?? value, isAppDM: bot != null && bot};
|
||||
}
|
||||
|
||||
function _fun76297() { // fn#76297, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9893:539, offset: 0x01dc9943, size: 92 bytes, params: 1, frame: 14
|
||||
let channelBinding = channel;
|
||||
const value2 = null;
|
||||
if (value2 == channelBinding) {
|
||||
return value2;
|
||||
}
|
||||
if (channel.isDM() !== true) {
|
||||
return value2;
|
||||
}
|
||||
const getUser = UserStore.getUser;
|
||||
channelBinding = channel;
|
||||
const getRecipientId = channelBinding.getRecipientId;
|
||||
const value = Reflect.apply(getUser, UserStore, [Reflect.apply(getRecipientId, channelBinding, [])]);
|
||||
return value === undefined || value.bot !== true ? value2 : value;
|
||||
}
|
||||
|
||||
function _fun76298() { // fn#76298, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9893:696, offset: 0x01dc999f, size: 47 bytes, params: 1, frame: 13
|
||||
return ApplicationStore.getAppIdForBotUserId(env0_1?.id);
|
||||
}
|
||||
|
||||
function _fun76299() { // fn#76299, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9893:780, offset: 0x01dc99ce, size: 74 bytes, params: 1, frame: 16
|
||||
const value2 = undefined;
|
||||
return env0_1 === null || UserProfileStore.getUserProfile(env0_1 == null ? value2 : env0_1.id) == null ? value2 : UserProfileStore.getUserProfile(env0_1 == null ? value2 : env0_1.id).application;
|
||||
}
|
||||
|
||||
function _fun76300() { // fn#76300, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9893:931, offset: 0x01dc9a18, size: 88 bytes, params: 1, frame: 17
|
||||
var value2;
|
||||
var value3;
|
||||
if (env0_2 == null) {
|
||||
value2 = environment.__proto__;
|
||||
value3 = undefined;
|
||||
(importDefault(8491) /* metro dependency 8491: maybeFetchUserProfile */)((env0_1 == null ? value3 : env0_1.id) ?? EMPTY_STRING_SNOWFLAKE_ID,
|
||||
|
||||
value3, {withMutualGuilds: true});
|
||||
}
|
||||
}
|
||||
|
||||
function _fun76301() { // fn#76301, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9893:1045, offset: 0x01dc9a70, size: 94 bytes, params: 1, frame: 14
|
||||
var value3;
|
||||
const value2 = undefined;
|
||||
if ((env0_1 == null ? value2 : env0_1.id) != null) {
|
||||
value3 = environment.__proto__;
|
||||
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'APP_DM_OPEN',
|
||||
botUserId: env0_1.id});
|
||||
}
|
||||
return value2;
|
||||
}
|
||||
|
||||
function _fun76303() { // fn#76303, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9893:1417, offset: 0x01dc9af3, size: 42 bytes, params: 1, frame: 12
|
||||
return application != null ? ApplicationRecord.createFromServer(application) : undefined;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
/* Metro module 8869; source: modules/app_dms/useIsAppDM.tsx; dependencies: [1878, 632, 2] */
|
||||
function _fun69143(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#69143, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9054:6, offset: 0x01c6abc2, size: 114 bytes, params: 8, frame: 18
|
||||
let env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/app_dms/useIsAppDM.tsx');
|
||||
exports.default = function(a0) {
|
||||
var env0_0 = a0;
|
||||
return require(dependencyMap[1]).useStateFromStores([UserStore], _fun69145);
|
||||
};
|
||||
}
|
||||
|
||||
function useIsAppDM(a0) { // fn#69144, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9054:180, offset: 0x01c6ac34, size: 66 bytes, params: 2, frame: 14
|
||||
const env0_0 = a0;
|
||||
return (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([UserStore], _fun69145);
|
||||
}
|
||||
|
||||
function _fun69145() { // fn#69145, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9054:242, offset: 0x01c6ac76, size: 115 bytes, params: 1, frame: 14
|
||||
var value4;
|
||||
var value;
|
||||
let r0 = env0_0 != null && env0_0.isDM() && env0_0.recipients.length === 1;
|
||||
if (r0) {
|
||||
value4 = environment.__proto__;
|
||||
value = UserStore.getUser(env0_0.recipients[0]);
|
||||
value = value?.bot === true;
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
/* Metro module 11683; source: modules/app_dms/useShowTryItOutButtonInAppLauncher.tsx; dependencies: [10657, 8869, 8045, 2] */
|
||||
function _fun89539(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#89539, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11869:6, offset: 0x02012b1a, size: 103 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/app_dms/useShowTryItOutButtonInAppLauncher.tsx');
|
||||
exports.default = useShowTryItOutButtonInAppLauncher;
|
||||
}
|
||||
|
||||
function useShowTryItOutButtonInAppLauncher({context, application, botUserId}) { // fn#89540, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11869:190, offset: 0x02012b81, size: 172 bytes, params: 2, frame: 18
|
||||
var r1;
|
||||
var r0;
|
||||
const value3 = (require(10657) /* metro dependency 10657: getPrimaryAppCommand */).useIsPrimaryAppCommandUsableInAppDM({context: context,
|
||||
applicationId: application.id, botUserId: botUserId});
|
||||
const value4 = (importDefault(8869) /* metro dependency 8869: useIsAppDM */)(context.type !== 'channel' ? undefined : context.channel);
|
||||
let value = require(8045) /* metro dependency 8045: canLaunchFrame */;
|
||||
value = value.canLaunchFrame(application);
|
||||
if (value) {
|
||||
r0 = !value;
|
||||
} else {
|
||||
r1 = value3 && botUserId != null;
|
||||
r1 = r1 && !value4;
|
||||
r0 = r1;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user