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,153 +1,210 @@
/* Metro module 10485; source: modules/user_profile/native/UserProfileIncomingFriendRequest.tsx; dependencies: [31, 27, 33, 4501, 697, 8496, 8514, 6771, 10486, 4617, 6777, 4573, 1244, 1305, 1423, 10487, 4578, 2] */
import Native from '../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import NicknameUtils from '../../../utils/NicknameUtils.tsx'; /* Metro dependency 4617 */
import UseAnalyticsLocations from '../../app_analytics/useAnalyticsLocations.tsx'; /* Metro dependency 6771 */
import UserProfileSharedStyles from './UserProfileSharedStyles.tsx'; /* Metro dependency 8496 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as TextModule from '../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as ButtonNativeModule from '../../../design/components/Button/native/Button.native.tsx'; /* Metro dependency 4578 */
import * as UseGetOrFetchApplicationsModule from '../../applications/useGetOrFetchApplications.tsx'; /* Metro dependency 6777 */
import * as UserProfileAnalyticsContextModule from '../UserProfileAnalyticsContext.tsx'; /* Metro dependency 8514 */
import * as UseFriendRequestActionsModule from '../../people/hooks/useFriendRequestActions.tsx'; /* Metro dependency 10486 */
function _fun81139(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#81139, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10671:6, offset: 0x01e9b237, size: 289 bytes, params: 8, frame: 22
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;
let value = require(33) /* metro dependency 33 */;
let value = JsxRuntimeModule;
const env0_5 = value.jsx;
const env0_6 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
const BORDER_STRONG = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_STRONG;
const BORDER_STRONG = (Native).colors.BORDER_STRONG;
const env0_7 = Reflect.apply(createStyles, value, [{container: {'rowGap': 16, 'flexDirection': 'column'},
buttons: {'flexDirection': 'row', 'columnGap': 12}, gameIcon: {paddingTop: 2},
friendRequestNote: {borderWidth: 1, borderColor: BORDER_STRONG}}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_profile/native/UserProfileIncomingFriendRequest.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/user_profile/native/UserProfileIncomingFriendRequest.tsx');
exports.default = UserProfileIncomingFriendRequest;
}
function UserProfileIncomingFriendRequest({user, channelId, guildId, isGameRelationship, applicationId, style, showUserProfile}) { // fn#81140, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10671:470, offset: 0x01e9b358, size: 968 bytes, params: 2, frame: 34
var r0;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
var object3;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var format;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var items2;
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
var string;
var items3;
let value = undefined;
isGameRelationship = !(isGameRelationship === value) && isGameRelationship;
const styles = useStyles();
const value4 = (importDefault(8496) /* metro dependency 8496: UserProfileSharedStyles */)();
const userProfileAnalyticsContextModule = require(8514) /* metro dependency 8514: UserProfileAnalyticsContext */;
const useUserProfileAnalyticsContext = userProfileAnalyticsContextModule.useUserProfileAnalyticsContext;
const trackUserProfileAction = Reflect.apply(useUserProfileAnalyticsContext, userProfileAnalyticsContextModule,
[]).trackUserProfileAction;
const newestAnalyticsLocation = (importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */)().newestAnalyticsLocation;
const useFriendRequestActionsModule = require(10486) /* metro dependency 10486: useFriendRequestActions */;
const useFriendRequestActions = useFriendRequestActionsModule.useFriendRequestActions;
const object4 = {};
object4.userId = user.id;
object4.applicationId = applicationId;
object4.isGameRelationship = isGameRelationship;
object4.location = newestAnalyticsLocation;
object4.onConfirm = showUserProfile;
object4.onCancel = showUserProfile;
const value5 = Reflect.apply(useFriendRequestActions, useFriendRequestActionsModule, [object4]);
const acceptFriendRequest = value5.acceptFriendRequest;
const env0_3 = acceptFriendRequest;
const cancelFriendRequest = value5.cancelFriendRequest;
const value6 = (importDefault(4617) /* metro dependency 4617: NicknameUtils */).useName(guildId, channelId, user);
const binding = env0_3;
const value7 = binding.useCallback(_fun81141, [acceptFriendRequest, isGameRelationship, trackUserProfileAction]);
const value8 = binding.useCallback(_fun81142, [cancelFriendRequest, isGameRelationship, trackUserProfileAction]);
const value10 = applicationId != null;
const value11 = (require(6777) /* metro dependency 6777: useGetOrFetchApplications */).useGetOrFetchApplication(applicationId);
if (value10) {
if (value11 == null) {
r0 = null;
function UserProfileIncomingFriendRequest({user, channelId, guildId, isGameRelationship, applicationId, style, showUserProfile}) { // fn#81140, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10671:470, offset: 0x01e9b358, size: 968 bytes, params: 2, frame: 34
var r0;
const Text = (TextModule).Text;
var object;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var format;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var items2;
const Button = (ButtonNativeModule).Button;
var string;
var items3;
let value = undefined;
isGameRelationship = !(isGameRelationship === value) && isGameRelationship;
const styles = useStyles();
const value4 = (UserProfileSharedStyles)();
const useUserProfileAnalyticsContext = UserProfileAnalyticsContextModule.useUserProfileAnalyticsContext;
const trackUserProfileAction = Reflect.apply(useUserProfileAnalyticsContext, UserProfileAnalyticsContextModule,
[]).trackUserProfileAction;
const newestAnalyticsLocation = (UseAnalyticsLocations)().newestAnalyticsLocation;
const useFriendRequestActions = UseFriendRequestActionsModule.useFriendRequestActions;
const object2 = {};
object2.userId = user.id;
object2.applicationId = applicationId;
object2.isGameRelationship = isGameRelationship;
object2.location = newestAnalyticsLocation;
object2.onConfirm = showUserProfile;
object2.onCancel = showUserProfile;
const value5 = Reflect.apply(useFriendRequestActions, UseFriendRequestActionsModule, [object2]);
const acceptFriendRequest = value5.acceptFriendRequest;
const acceptFriendRequest2 = acceptFriendRequest;
const cancelFriendRequest = value5.cancelFriendRequest;
const value6 = (NicknameUtils).useName(guildId, channelId, user);
const binding = acceptFriendRequest2;
const value7 = binding.useCallback(_fun81141, [acceptFriendRequest, isGameRelationship, trackUserProfileAction]);
const value8 = binding.useCallback(_fun81142, [cancelFriendRequest, isGameRelationship, trackUserProfileAction]);
const value10 = applicationId != null;
const value11 = (UseGetOrFetchApplicationsModule).useGetOrFetchApplication(applicationId);
if (value10) {
if (value11 == null) {
r0 = null;
} else {
var viewProps = {style: [styles.container, value4.card, style]};
object = {'variant': 'text-sm/semibold', 'color': 'text-default'};
format = intl.format;
if (value10) {
object.children = Reflect.apply(format, intl, [isGameRelationship ? t.syHjLL : t.V15uUI,
{username: value6,
applicationName: value11 == null ? value : value11.name, applicationIcon: applicationIcon}]);
} else {
object.children = Reflect.apply(format, intl,
[(require(1244) /* metro dependency 1244: indexNative */).t.uIomXw,
{username: value6}]);
}
items2 = [
<Text {...object} />,
];
items2[1] = ((Component) => <Component userId={user.id} styles={styles.friendRequestNote} analyticsLocation="User Profile" />)(importDefault(10487) /* metro dependency 10487: FriendRequestNote */);
var viewBinding2Props = {style: styles.buttons};
string = intl.string;
items3 = [
<Button
size="sm"
variant="primary"
text={Reflect.apply(string, intl, [t.Zcibdf])}
onPress={value7}
/>,
];
string = intl.string;
items3[1] = (
<Button
size="sm"
variant="secondary"
text={Reflect.apply(string, intl, [t.xuio0C])}
onPress={value8}
/>
);
items2[2] = (
<View {...viewBinding2Props}>
{items3}
</View>
);
value = (
<View {...viewProps}>
{items2}
</View>
);
r0 = value;
}
} else {
var viewProps = {style: [styles.container, value4.card, style]};
object3 = {'variant': 'text-sm/semibold', 'color': 'text-default'};
object = {'variant': 'text-sm/semibold', 'color': 'text-default'};
format = intl.format;
if (value10) {
object3.children = Reflect.apply(format, intl, [isGameRelationship ? t.syHjLL : t.V15uUI,
{username: value6,
object.children = Reflect.apply(format, intl, [isGameRelationship ? t.syHjLL : t.V15uUI, {username: value6,
applicationName: value11 == null ? value : value11.name, applicationIcon: applicationIcon}]);
} else {
object3.children = Reflect.apply(format, intl,
object.children = Reflect.apply(format, intl,
[(require(1244) /* metro dependency 1244: indexNative */).t.uIomXw,
{username: value6}]);
}
items2 = [<Text {...object3} />];
items2 = [
<Text {...object} />,
];
items2[1] = ((Component) => <Component userId={user.id} styles={styles.friendRequestNote} analyticsLocation="User Profile" />)(importDefault(10487) /* metro dependency 10487: FriendRequestNote */);
var viewBinding2Props = {style: styles.buttons};
string = intl.string;
items3 = [<Button size="sm" variant="primary" text={Reflect.apply(string, intl,
[t.Zcibdf])} onPress={value7} />];
items3 = [
<Button
size="sm"
variant="primary"
text={Reflect.apply(string, intl, [t.Zcibdf])}
onPress={value7}
/>,
];
string = intl.string;
items3[1] = <Button size="sm" variant="secondary" text={Reflect.apply(string, intl,
[t.xuio0C])} onPress={value8} />;
items2[2] = <View {...viewBinding2Props}>{items3}</View>;
value = <View {...viewProps}>{items2}</View>;
items3[1] = (
<Button
size="sm"
variant="secondary"
text={Reflect.apply(string, intl, [t.xuio0C])}
onPress={value8}
/>
);
items2[2] = (
<View {...viewBinding2Props}>
{items3}
</View>
);
value = (
<View {...viewProps}>
{items2}
</View>
);
r0 = value;
}
} else {
var viewProps = {style: [styles.container, value4.card, style]};
object3 = {'variant': 'text-sm/semibold', 'color': 'text-default'};
format = intl.format;
if (value10) {
object3.children = Reflect.apply(format, intl, [isGameRelationship ? t.syHjLL : t.V15uUI, {username: value6,
applicationName: value11 == null ? value : value11.name, applicationIcon: applicationIcon}]);
} else {
object3.children = Reflect.apply(format, intl,
[(require(1244) /* metro dependency 1244: indexNative */).t.uIomXw,
{username: value6}]);
return r0;
function _fun81141() { // fn#81141, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10671:944, offset: 0x01e9b720, size: 49 bytes, params: 1, frame: 13
acceptFriendRequest();
trackUserProfileAction({action: isGameRelationship ? 'ACCEPT_GAME_FRIEND_REQUEST' : 'ACCEPT_FRIEND_REQUEST'});
}
items2 = [<Text {...object3} />];
items2[1] = ((Component) => <Component userId={user.id} styles={styles.friendRequestNote} analyticsLocation="User Profile" />)(importDefault(10487) /* metro dependency 10487: FriendRequestNote */);
var viewBinding2Props = {style: styles.buttons};
string = intl.string;
items3 = [<Button size="sm" variant="primary" text={Reflect.apply(string, intl,
[t.Zcibdf])} onPress={value7} />];
string = intl.string;
items3[1] = <Button size="sm" variant="secondary" text={Reflect.apply(string, intl,
[t.xuio0C])} onPress={value8} />;
items2[2] = <View {...viewBinding2Props}>{items3}</View>;
value = <View {...viewProps}>{items2}</View>;
r0 = value;
function _fun81142() { // fn#81142, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10671:1048, offset: 0x01e9b751, size: 49 bytes, params: 1, frame: 13
cancelFriendRequest();
trackUserProfileAction({action: isGameRelationship ? 'IGNORE_GAME_FRIEND_REQUEST' : 'IGNORE_FRIEND_REQUEST'});
}
function applicationIcon() { // fn#81143, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10671:1452, owner: UserProfileIncomingFriendRequest.applicationIcon, offset: 0x01e9b782, size: 172 bytes, params: 1, frame: 23
var r0;
var value3;
var Avatar;
var object;
var defaultImport;
var getApplicationIconSource;
var id;
const value2 = null;
if (value2 == env0_5) {
r0 = value2;
} else {
value3 = environment.__proto__;
Avatar = (require(1305) /* metro dependency 1305: native */).Avatar;
object = {};
defaultImport = importDefault(1423) /* metro dependency 1423: AvatarUtils */;
getApplicationIconSource = defaultImport.getApplicationIconSource;
id = env0_5.id;
object.source = Reflect.apply(getApplicationIconSource, defaultImport, [{id: id, icon: env0_5.icon}]);
object.size = (require(1305) /* metro dependency 1305: native */).AvatarSizes.XXSMALL;
object.style = styles.gameIcon;
id = env0_5.id;
r0 = <Avatar {...object} key={id} />;
}
return r0;
}
}
return r0;
}
function _fun81141() { // fn#81141, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10671:944, offset: 0x01e9b720, size: 49 bytes, params: 1, frame: 13
acceptFriendRequest();
trackUserProfileAction({action: isGameRelationship ? 'ACCEPT_GAME_FRIEND_REQUEST' : 'ACCEPT_FRIEND_REQUEST'});
}
function _fun81142() { // fn#81142, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10671:1048, offset: 0x01e9b751, size: 49 bytes, params: 1, frame: 13
cancelFriendRequest();
trackUserProfileAction({action: isGameRelationship ? 'IGNORE_GAME_FRIEND_REQUEST' : 'IGNORE_FRIEND_REQUEST'});
}
function applicationIcon() { // fn#81143, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10671:1452, owner: UserProfileIncomingFriendRequest.applicationIcon, offset: 0x01e9b782, size: 172 bytes, params: 1, frame: 23
var r0;
var value3;
var Avatar;
var object2;
var defaultImport;
var getApplicationIconSource;
var id;
const value2 = null;
if (value2 == env0_5) {
r0 = value2;
} else {
value3 = environment.__proto__;
Avatar = (require(1305) /* metro dependency 1305: native */).Avatar;
object2 = {};
defaultImport = importDefault(1423) /* metro dependency 1423: AvatarUtils */;
getApplicationIconSource = defaultImport.getApplicationIconSource;
id = env0_5.id;
object2.source = Reflect.apply(getApplicationIconSource, defaultImport, [{id: id, icon: env0_5.icon}]);
object2.size = (require(1305) /* metro dependency 1305: native */).AvatarSizes.XXSMALL;
object2.style = styles.gameIcon;
id = env0_5.id;
r0 = <Avatar {...object2} key={id} />;
}
return r0;
}
global.__d(_fun81139, 10485, [31, 27, 33, 4501, 697, 8496, 8514, 6771, 10486, 4617, 6777, 4573, 1244, 1305, 1423,
10487, 4578,
2]) /* metro module 10485, dependencies: [31, 27, 33, 4501, 697, 8496, 8514, 6771, 10486, 4617, 6777, 4573, 1244, 1305, 1423, 10487, 4578, 2] */;