Initial commit
This commit is contained in:
commit
af3b49f756
16065 files changed
+2938410
No files matched your search
@@ -0,0 +1,76 @@
|
||||
/* Metro module 10377; source: modules/user_profile/hooks/native/useCardGridLayout.tsx; dependencies: [6816, 1478, 2] */
|
||||
function _fun80398(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#80398, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10563:6, offset: 0x01e792cf, size: 142 bytes, params: 8, frame: 18
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_2 = (require(6816) /* metro dependency 6816: Constants */).PROFILE_SIDE_PADDING;
|
||||
const calculateTotalGaps = function(a0, a1) {
|
||||
return a1 * (a0 - 1);
|
||||
};
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_profile/hooks/native/useCardGridLayout.tsx');
|
||||
exports.default = useCardGridLayout;
|
||||
}
|
||||
|
||||
function useCardGridLayout() { // fn#80401, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10563:318, offset: 0x01e79392, size: 419 bytes, params: 1, frame: 25
|
||||
var r11;
|
||||
var value9;
|
||||
var value10;
|
||||
const value = a0;
|
||||
const r0 = value !== undefined ? value : {};
|
||||
let minCardSize = r0.minCardSize;
|
||||
minCardSize = minCardSize === undefined ? 150 : minCardSize;
|
||||
let maxCardSize = r0.maxCardSize;
|
||||
maxCardSize = maxCardSize === undefined ? 180 : maxCardSize;
|
||||
let gap = r0.gap;
|
||||
gap = gap === undefined ? 16 : gap;
|
||||
const containerWidth = r0.containerWidth;
|
||||
const maxWidth = r0.maxWidth;
|
||||
const sidePadding = r0.sidePadding;
|
||||
let r7 = sidePadding !== undefined ? sidePadding : PROFILE_SIDE_PADDING;
|
||||
const value2 = 1;
|
||||
const width = importDefault(dependencyMap[value2])().width;
|
||||
let Math = global.Math;
|
||||
let min = Math.min;
|
||||
const r10 = containerWidth ?? width;
|
||||
let r1 = maxWidth ?? Infinity;
|
||||
const value5 = Reflect.apply(min, Math, [r10, r1]) - 2 * r7;
|
||||
Math = global.Math;
|
||||
const max = Math.max;
|
||||
const Math2 = global.Math;
|
||||
const value7 = Reflect.apply(max, Math, [value2, Math2.floor((value5 + gap) / (minCardSize + gap))]);
|
||||
const value8 = calculateCardWidth(value2, value5, gap);
|
||||
if (value8 > maxCardSize) {
|
||||
if (value2 < value7) {
|
||||
r7 = value2;
|
||||
while (true) {
|
||||
value9 = typeof r7 === 'bigint' ? r7 + 1n : +r7 + 1;
|
||||
value10 = calculateCardWidth(value9, value5, gap);
|
||||
if (!(value10 > maxCardSize)) {
|
||||
r1 = value9;
|
||||
r11 = value10;
|
||||
break;
|
||||
}
|
||||
if (value9 < value7) {
|
||||
r7 = value9;
|
||||
continue;
|
||||
}
|
||||
r1 = value9;
|
||||
r11 = value10;
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
r1 = value2;
|
||||
r11 = value8;
|
||||
}
|
||||
} else {
|
||||
r1 = value2;
|
||||
r11 = value8;
|
||||
}
|
||||
Math = global.Math;
|
||||
min = Math.min;
|
||||
const Math3 = global.Math;
|
||||
const value11 = Reflect.apply(min, Math, [Math3.max(r11, minCardSize), maxCardSize]);
|
||||
return value11 * r1 + calculateTotalGaps(r1, gap) > value5 ? {columns: value2, cardWidth: undefined,
|
||||
rowWidth: undefined, gap: gap} : {columns: r1, cardWidth: value11, rowWidth: value11 * r1 + gap * (r1 - value2),
|
||||
gap: gap};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
/* Metro module 13199; source: modules/user_profile/hooks/native/useScrollToUserProfileEditFormSection.tsx; dependencies: [31, 27, 4502, 7623, 566, 2] */
|
||||
function _fun100726(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#100726, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13389:6, offset: 0x021f586f, size: 171 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_2 = importAll(31) /* metro dependency 31 */;
|
||||
const env0_3 = (require(27) /* metro dependency 27 */).findNodeHandle;
|
||||
const accessibilityStore = importDefault(4502) /* metro dependency 4502: AccessibilityStore */;
|
||||
const profileCustomizationNavigationStore = importDefault(7623) /* metro dependency 7623: ProfileCustomizationNavigationStore */;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_profile/hooks/native/useScrollToUserProfileEditFormSection.tsx');
|
||||
exports.default = useScrollToUserProfileEditFormSection;
|
||||
}
|
||||
|
||||
function useScrollToUserProfileEditFormSection(a0, a1) { // fn#100727, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13389:270, offset: 0x021f591a, size: 114 bytes, params: 3, frame: 16
|
||||
const env0_0 = a0;
|
||||
const env0_1 = a1;
|
||||
const binding = env0_2;
|
||||
const value2 = binding.useRef({});
|
||||
const env0_3 = (require(566) /* metro dependency 566: flux */).useStateFromStores([AccessibilityStore], function() {
|
||||
return AccessibilityStore.useReducedMotion;
|
||||
});
|
||||
binding.useEffect(_fun100729);
|
||||
return value2;
|
||||
}
|
||||
|
||||
function _fun100729() { // fn#100729, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13389:420, offset: 0x021f598c, size: 80 bytes, params: 1, frame: 15
|
||||
if (require != null && env0_2.current?.[require] != null) {
|
||||
global.setTimeout(_fun100730, 0);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun100730() { // fn#100730, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13389:493, offset: 0x021f59dc, size: 98 bytes, params: 1, frame: 16
|
||||
var environment;
|
||||
let value = environment.__proto__;
|
||||
const property = env1_2.current[require];
|
||||
value = findNodeHandle(env1_0.current);
|
||||
if (value != null) {
|
||||
if (property != null) {
|
||||
property.measureLayout(value, _fun100731);
|
||||
}
|
||||
ProfileCustomizationNavigationStore.setState({scrollPosition: null});
|
||||
}
|
||||
}
|
||||
|
||||
function _fun100731(a0, a1) { // fn#100731, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13389:570, offset: 0x021f5a3e, size: 61 bytes, params: 3, frame: 13
|
||||
const current = env2_0.current;
|
||||
if (current != null) {
|
||||
current.scrollTo({x: a0, y: a1, animated: !useReducedMotion});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
/* Metro module 10245; source: modules/user_profile/hooks/native/useTrackUserProfileActivityView.tsx; dependencies: [57, 31, 10046, 566, 2] */
|
||||
function _fun79574(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#79574, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10431:6, offset: 0x01e58ad0, size: 160 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_2 = importDefault(57) /* metro dependency 57 */;
|
||||
const value = require(31) /* metro dependency 31 */;
|
||||
const env0_3 = value.useEffect;
|
||||
const env0_4 = value.useState;
|
||||
const contentInventoryOutboxStore = importDefault(10046) /* metro dependency 10046: ContentInventoryOutboxStore */;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_profile/hooks/native/useTrackUserProfileActivityView.tsx');
|
||||
exports.default = useTrackUserProfileActivityView;
|
||||
}
|
||||
|
||||
function useTrackUserProfileActivityView({userId, onAction}) { // fn#79575, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10431:266, offset: 0x01e58b70, size: 168 bytes, params: 2, frame: 17
|
||||
const value2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([ContentInventoryOutboxStore],
|
||||
function() {
|
||||
return ContentInventoryOutboxStore.isFetchingUserOutbox(userId);
|
||||
});
|
||||
const [property, env0_2] = env0_2Binding(useState(false), 2);
|
||||
useEffect(_fun79577, [!value2 && !property, onAction]);
|
||||
}
|
||||
|
||||
function _fun79577() { // fn#79577, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10431:443, offset: 0x01e58c35, size: 48 bytes, params: 1, frame: 12
|
||||
if (env0_3) {
|
||||
onAction({action: 'VIEW_ACTIVITY_CARD'});
|
||||
env0_2(true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
/* Metro module 10379; source: modules/user_profile/hooks/native/useTrackUserProfileWishlistView.tsx; dependencies: [31, 10035, 566, 2] */
|
||||
function _fun80403(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#80403, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10565:6, offset: 0x01e795a4, size: 144 bytes, params: 8, frame: 18
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const value = require(31) /* metro dependency 31 */;
|
||||
const env0_2 = value.useEffect;
|
||||
const env0_3 = value.useRef;
|
||||
const wishlistStore = importDefault(10035) /* metro dependency 10035: WishlistStore */;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_profile/hooks/native/useTrackUserProfileWishlistView.tsx');
|
||||
exports.default = useTrackUserProfileWishlistView;
|
||||
}
|
||||
|
||||
function useTrackUserProfileWishlistView({wishlistId, onAction, productLines, isVisible}) { // fn#80404, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10565:254, offset: 0x01e79634, size: 176 bytes, params: 2, frame: 20
|
||||
isVisible = isVisible === undefined || isVisible;
|
||||
const value2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([WishlistStore], function() {
|
||||
return WishlistStore.isFetching(wishlistId);
|
||||
});
|
||||
const env0_5 = useRef(false);
|
||||
useEffect(_fun80406, [isVisible, value2, onAction, wishlistId, productLines]);
|
||||
}
|
||||
|
||||
function _fun80406() { // fn#80406, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10565:423, offset: 0x01e796ff, size: 115 bytes, params: 1, frame: 14
|
||||
if (isVisible) {
|
||||
if (!(env0_4 || env0_5.current)) {
|
||||
onAction({action: 'VIEW_WISHLIST', wishlistId: wishlistId, productLines: productLines ?? undefined});
|
||||
env0_5.current = true;
|
||||
}
|
||||
} else {
|
||||
env0_5.current = false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,114 @@
|
||||
/* Metro module 13201; source: modules/user_profile/hooks/native/useUploadAvatar.tsx; dependencies: [5, 31, 1878, 661, 1880, 632, 7882, 4080, 4660, 3802, 8403, 7613, 8400, 8402, 2] */
|
||||
function _fun100743(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#100743, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13391:6, offset: 0x021f6283, size: 239 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(5) /* metro dependency 5 */;
|
||||
const env0_4 = (require(31) /* metro dependency 31 */).useCallback;
|
||||
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
|
||||
const constantsModule = require(661) /* metro dependency 661: Constants */;
|
||||
const env0_6 = constantsModule.AnalyticsPages;
|
||||
const env0_7 = constantsModule.UPLOAD_MEDIUM_SIZE;
|
||||
const env0_8 = constantsModule.Base64GIFPrefix;
|
||||
const env0_9 = constantsModule.AnalyticsSections;
|
||||
const env0_10 = constantsModule.UpsellTypes;
|
||||
const env0_11 = (require(1880) /* metro dependency 1880: PremiumConstants */).PremiumUpsellTypes;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_profile/hooks/native/useUploadAvatar.tsx');
|
||||
exports.default = useUploadAvatar;
|
||||
}
|
||||
|
||||
function useUploadAvatar({guildId, isTryItOut, analyticsLocations}) { // fn#100744, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13391:375, offset: 0x021f6372, size: 180 bytes, params: 2, frame: 19
|
||||
isTryItOut = !(isTryItOut === undefined) && isTryItOut;
|
||||
const currentUser = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([UserStore],
|
||||
function() {
|
||||
return UserStore.getCurrentUser();
|
||||
});
|
||||
return useCallback(currentUser(_fun100748), [currentUser, guildId, isTryItOut, useCallback(function() {
|
||||
importDefault(dependencyMap[6]).handleShowUpsellAlert({initialUpsellKey: UpsellTypes.ANIMATED_AVATAR,
|
||||
analyticsLocation: {page: AnalyticsPages.USER_SETTINGS, section: AnalyticsSections.SETTINGS_OVERVIEW},
|
||||
analyticsProperties: {type: PremiumUpsellTypes.ANIMATED_USER_AVATAR_MODAL},
|
||||
analyticsLocations: analyticsLocations});
|
||||
}, [analyticsLocations])]);
|
||||
}
|
||||
|
||||
function* _fun100748() { // fn#100748, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13391:756, offset: 0x021f64ae, size: 412 bytes, params: 1, frame: 23
|
||||
var r3;
|
||||
var value7;
|
||||
var match;
|
||||
var RegExp;
|
||||
var value9;
|
||||
var value10;
|
||||
var regExp;
|
||||
var binding3;
|
||||
var value12;
|
||||
var createPendingImage;
|
||||
var pendingImage;
|
||||
var binding4;
|
||||
if (true) {
|
||||
value = environment.__proto__.__proto__;
|
||||
var binding = env2_1;
|
||||
var binding2 = env2_2;
|
||||
binding(binding2[7]).hideActionSheet();
|
||||
var value4 = binding(binding2[8]);
|
||||
var openImagePicker = value4.openImagePicker;
|
||||
var object2 = {size: env2_7};
|
||||
yield Reflect.apply(openImagePicker, value4, [object2]);
|
||||
var value5 = undefined;
|
||||
if (false) {
|
||||
return value5;
|
||||
}
|
||||
var base64 = value5.base64;
|
||||
var originalMd5 = value5.originalMd5;
|
||||
if (base64 != null) {
|
||||
value7 = environment.__proto__;
|
||||
r3 = importDefault || env2_1(env2_2[9]).canUseAnimatedAvatar(env1_3);
|
||||
match = base64.match;
|
||||
RegExp = global.RegExp;
|
||||
value9 = '^' + env2_8;
|
||||
value10 = Object.create(RegExp.prototype, {constructor: {value: RegExp}});
|
||||
regExp = new RegExp(value9, 'i');
|
||||
if (Reflect.apply(match, base64, [regExp instanceof Object ? regExp : value10]) == null) {
|
||||
binding = env2_0;
|
||||
binding3 = env2_2;
|
||||
value12 = binding(binding3[10]);
|
||||
createPendingImage = value12.createPendingImage;
|
||||
object2 = {imageUri: base64};
|
||||
object2.description = binding(binding3[10]).generateAvatarDescription();
|
||||
object2.originalMd5 = originalMd5;
|
||||
pendingImage = Reflect.apply(createPendingImage, value12, [object2]);
|
||||
binding = env2_0;
|
||||
binding4 = env2_2;
|
||||
if (importDefault) {
|
||||
binding(binding4[11]).setTryItOutAvatar(pendingImage);
|
||||
} else {
|
||||
value = binding(binding4[12]);
|
||||
value.setPendingChanges({guildId: require, avatar: pendingImage});
|
||||
value = binding(binding4[13]);
|
||||
value.announcePendingAvatarChange('set');
|
||||
}
|
||||
} else if (r3) {
|
||||
binding = env2_0;
|
||||
binding3 = env2_2;
|
||||
value12 = binding(binding3[10]);
|
||||
createPendingImage = value12.createPendingImage;
|
||||
object2 = {imageUri: base64};
|
||||
object2.description = binding(binding3[10]).generateAvatarDescription();
|
||||
object2.originalMd5 = originalMd5;
|
||||
pendingImage = Reflect.apply(createPendingImage, value12, [object2]);
|
||||
binding = env2_0;
|
||||
binding4 = env2_2;
|
||||
if (importDefault) {
|
||||
binding(binding4[11]).setTryItOutAvatar(pendingImage);
|
||||
} else {
|
||||
value = binding(binding4[12]);
|
||||
value.setPendingChanges({guildId: require, avatar: pendingImage});
|
||||
value = binding(binding4[13]);
|
||||
value.announcePendingAvatarChange('set');
|
||||
}
|
||||
} else {
|
||||
useCallback();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,65 @@
|
||||
/* Metro module 8746; source: modules/user_profile/hooks/native/useUserProfileAnalyticsProperties.tsx; dependencies: [31, 8516, 2] */
|
||||
function _fun68479(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#68479, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8931:6, offset: 0x01c505af, size: 128 bytes, params: 8, frame: 18
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_0 = importAll(31) /* metro dependency 31 */;
|
||||
const env0_1 = (require(8516) /* metro dependency 8516: Constants */).UserProfileAnalyticsTypes;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_profile/hooks/native/useUserProfileAnalyticsProperties.tsx');
|
||||
exports.default = useUserProfileAnalyticsProperties;
|
||||
}
|
||||
|
||||
function useUserProfileAnalyticsProperties({userId, user, channelId, guildId, displayProfile, guildMember, profileEffectSkuId, type}) { // fn#68480, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8931:257, offset: 0x01c5062f, size: 263 bytes, params: 2, frame: 24
|
||||
const env0_0 = userId;
|
||||
let value = undefined;
|
||||
let binding = env0_0;
|
||||
value = binding.useMemo(_fun68481, [userId, channelId, guildId, displayProfile,
|
||||
guildMember == null ? value : guildMember.avatarDecoration, user == null ? value : user.avatarDecoration,
|
||||
profileEffectSkuId, type]);
|
||||
binding = env0_0;
|
||||
return binding.useMemo(_fun68483, [guildId, value, binding.useMemo(_fun68482, [displayProfile, guildMember])]);
|
||||
}
|
||||
|
||||
function _fun68481() { // fn#68481, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8931:417, offset: 0x01c50736, size: 270 bytes, params: 1, frame: 16
|
||||
const object2 = {};
|
||||
object2.type = type ?? UserProfileAnalyticsTypes.USER_SHEET;
|
||||
object2.other_user_id = userId;
|
||||
object2.channel_id = channelId;
|
||||
object2.guild_id = guildId;
|
||||
object2.profile_has_nitro_customization = displayProfile != null && displayProfile?.hasPremiumCustomization();
|
||||
object2.profile_has_theme_color_customized = displayProfile != null && displayProfile.hasThemeColors();
|
||||
displayProfileBinding = displayProfile;
|
||||
const value6 = undefined;
|
||||
object2.profile_has_theme_animation = (displayProfileBinding == null ? value6 : displayProfile.popoutAnimationParticleType) != null;
|
||||
const Boolean = global.Boolean;
|
||||
object2.has_avatar_decoration = Boolean(guildMember == null ? value6 : guildMember.avatarDecoration) || global.Boolean(user == null ? value6 : user.avatarDecoration);
|
||||
object2.has_profile_effect = profileEffectSkuId != null;
|
||||
return object2;
|
||||
}
|
||||
|
||||
function _fun68482() { // fn#68482, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8931:956, offset: 0x01c50844, size: 163 bytes, params: 1, frame: 16
|
||||
const object2 = {};
|
||||
let Boolean = global.Boolean;
|
||||
const guildMemberBinding = guildMember;
|
||||
const value2 = undefined;
|
||||
object2.has_nickname = Boolean(guildMemberBinding == null ? value2 : guildMember.nick);
|
||||
Boolean = global.Boolean;
|
||||
object2.has_guild_member_avatar = Boolean(guildMember == null ? value2 : guildMember.avatar);
|
||||
object2.has_guild_member_banner = displayProfile == null ? value2 : displayProfile.isUsingGuildMemberBanner();
|
||||
object2.has_guild_member_bio = displayProfile == null ? value2 : displayProfile.isUsingGuildMemberBio();
|
||||
return object2;
|
||||
}
|
||||
|
||||
function _fun68483() { // fn#68483, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8931:1221, offset: 0x01c508e7, size: 45 bytes, params: 1, frame: 12
|
||||
var r0;
|
||||
var object2;
|
||||
const guildIdBinding = guildId;
|
||||
if (guildIdBinding == null) {
|
||||
r0 = env0_8;
|
||||
} else {
|
||||
object2 = {};
|
||||
copyDataProperties(object2, env0_9, copyDataProperties(object2, env0_8, guildIdBinding));
|
||||
r0 = object2;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
/* Metro module 8752; source: modules/user_profile/hooks/native/useUserProfileBannerHeight.tsx; dependencies: [6816, 1478, 2] */
|
||||
function _fun68528(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#68528, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8937:6, offset: 0x01c52944, size: 120 bytes, params: 8, frame: 18
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_2 = (require(6816) /* metro dependency 6816: Constants */).BANNER_ASPECT_RATIO;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_profile/hooks/native/useUserProfileBannerHeight.tsx');
|
||||
exports.default = function(a0) {
|
||||
var property = importDefault(dependencyMap[1])().width;
|
||||
return global.Math.round((a0 == null ? property : global.Math.min(property, a0)) / BANNER_ASPECT_RATIO);
|
||||
};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,86 @@
|
||||
/* Metro module 8497; source: modules/user_profile/hooks/native/useUserProfileColors.tsx; dependencies: [4502, 482, 4048, 6791, 566, 1357, 3860, 697, 7593, 673, 2] */
|
||||
function _fun67409(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#67409, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8682:6, offset: 0x01c21719, size: 140 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const accessibilityStore = importDefault(4502) /* metro dependency 4502: AccessibilityStore */;
|
||||
const env0_4 = (require(482) /* metro dependency 482: Constants */).ThemeTypes;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_profile/hooks/native/useUserProfileColors.tsx');
|
||||
exports.useUserProfileColors = useUserProfileColors;
|
||||
}
|
||||
|
||||
function useUserProfileColors({theme, primaryColor, secondaryColor}) { // fn#67410, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8682:243, offset: 0x01c217a5, size: 761 bytes, params: 2, frame: 27
|
||||
var object3;
|
||||
const value2 = (importDefault(4048) /* metro dependency 4048: useTheme */)();
|
||||
const value3 = (require(6791) /* metro dependency 6791: useProfileThemeValuesNative */).useProfileThemeValues(theme);
|
||||
const syncProfileThemeWithUserTheme = (require(566) /* metro dependency 566: flux */).useStateFromStores([AccessibilityStore],
|
||||
function() {
|
||||
return AccessibilityStore.syncProfileThemeWithUserTheme;
|
||||
});
|
||||
const value4 = (importDefault(1357) /* metro dependency 1357: MobileVisualRefreshExperiment */)('useUserProfileColors');
|
||||
object3 = {};
|
||||
const useTokenModule = require(3860) /* metro dependency 3860: useToken */;
|
||||
let useToken = useTokenModule.useToken;
|
||||
let USER_PROFILE_GRADIENT_BACKGROUND = (importDefault(697) /* metro dependency 697: native */).colors.USER_PROFILE_GRADIENT_BACKGROUND;
|
||||
object3.gradientFallbackBackground = Reflect.apply(useToken, useTokenModule, [USER_PROFILE_GRADIENT_BACKGROUND,
|
||||
value2]);
|
||||
const moduleValue4 = useTokenModule;
|
||||
useToken = moduleValue4.useToken;
|
||||
USER_PROFILE_GRADIENT_BACKGROUND = (importDefault(697) /* metro dependency 697: native */).colors.USER_PROFILE_GRADIENT_BACKGROUND;
|
||||
object3.gradientSecondaryBackground = Reflect.apply(useToken, moduleValue4, [USER_PROFILE_GRADIENT_BACKGROUND,
|
||||
value2]);
|
||||
const moduleValue5 = useTokenModule;
|
||||
useToken = moduleValue5.useToken;
|
||||
const USER_PROFILE_CONTAINER_BACKGROUND = (importDefault(697) /* metro dependency 697: native */).colors.USER_PROFILE_CONTAINER_BACKGROUND;
|
||||
object3.containerBackground = Reflect.apply(useToken, moduleValue5, [USER_PROFILE_CONTAINER_BACKGROUND, value2]);
|
||||
const moduleValue6 = useTokenModule;
|
||||
useToken = moduleValue6.useToken;
|
||||
const BORDER_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_MUTED;
|
||||
object3.containerBorderColor = Reflect.apply(useToken, moduleValue6, [BORDER_MUTED, value2]);
|
||||
const moduleValue7 = useTokenModule;
|
||||
useToken = moduleValue7.useToken;
|
||||
const BACKGROUND_BASE_LOWER = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWER;
|
||||
object3.avatarBackground = Reflect.apply(useToken, moduleValue7, [BACKGROUND_BASE_LOWER, value2]);
|
||||
const moduleValue8 = useTokenModule;
|
||||
useToken = moduleValue8.useToken;
|
||||
const BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
|
||||
object3.statusBackground = Reflect.apply(useToken, moduleValue8, [BACKGROUND_SURFACE_HIGH, value2]);
|
||||
const moduleValue9 = useTokenModule;
|
||||
useToken = moduleValue9.useToken;
|
||||
const BACKGROUND_MOD_NORMAL = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_NORMAL;
|
||||
const value5 = Reflect.apply(useToken, moduleValue9, [BACKGROUND_MOD_NORMAL, theme]);
|
||||
const OPACITY_WHITE_24 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.OPACITY_WHITE_24;
|
||||
const r4 = value4 ? object3.containerBackground : theme !== ThemeTypes.LIGHT ? value5 : OPACITY_WHITE_24;
|
||||
if (primaryColor == null) {
|
||||
return object3;
|
||||
}
|
||||
if (secondaryColor == null) {
|
||||
return object3;
|
||||
}
|
||||
if (value3 == null) {
|
||||
return object3;
|
||||
}
|
||||
const sectionBox = value3.sectionBox;
|
||||
const overlay = value3.overlay;
|
||||
const overlaySyncedWithUserTheme = value3.overlaySyncedWithUserTheme;
|
||||
const userProfileGradientUtilsModule = require(7593) /* metro dependency 7593: UserProfileGradientUtils */;
|
||||
const value6 = userProfileGradientUtilsModule.calculateOverlayedColor(primaryColor,
|
||||
syncProfileThemeWithUserTheme ? overlaySyncedWithUserTheme : overlay);
|
||||
const object4 = {};
|
||||
copyDataProperties(object4, object3, value2);
|
||||
object4['containerBackground'] = r4;
|
||||
let value = require(673) /* metro dependency 673: ColorUtils */;
|
||||
let int2hex = value.int2hex;
|
||||
const moduleValue11 = userProfileGradientUtilsModule;
|
||||
value = Reflect.apply(int2hex, value, [moduleValue11.calculateOverlayedColor(secondaryColor, overlay)]);
|
||||
object4['gradientSecondaryBackground'] = value;
|
||||
value = require(673) /* metro dependency 673: ColorUtils */;
|
||||
value = value.int2hex(value6);
|
||||
object4['avatarBackground'] = value;
|
||||
int2hex = (require(673) /* metro dependency 673: ColorUtils */).int2hex;
|
||||
const moduleValue12 = userProfileGradientUtilsModule;
|
||||
value = Reflect.apply(int2hex, value, [moduleValue12.calculateOverlayedColor(value6, sectionBox)]);
|
||||
object4['statusBackground'] = value;
|
||||
return object4;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
/* Metro module 8512; source: modules/user_profile/hooks/native/useUserProfileGradientColors.tsx; dependencies: [31, 4502, 566, 3868, 6791, 7593, 2] */
|
||||
function _fun67456(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#67456, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8697:6, offset: 0x01c23710, size: 133 bytes, params: 8, frame: 18
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_2 = importAll(31) /* metro dependency 31 */;
|
||||
const accessibilityStore = importDefault(4502) /* metro dependency 4502: AccessibilityStore */;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_profile/hooks/native/useUserProfileGradientColors.tsx');
|
||||
exports.useUserProfileGradientColors = useUserProfileGradientColors;
|
||||
}
|
||||
|
||||
function useUserProfileGradientColors(a0, a1, a2) { // fn#67457, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8697:247, offset: 0x01c23795, size: 213 bytes, params: 4, frame: 21
|
||||
const env0_0 = a0;
|
||||
const env0_1 = a1;
|
||||
const env0_2 = a2;
|
||||
const value2 = undefined;
|
||||
const syncProfileThemeWithUserTheme = (require(566) /* metro dependency 566: flux */).useStateFromStores([AccessibilityStore],
|
||||
function() {
|
||||
return AccessibilityStore.syncProfileThemeWithUserTheme;
|
||||
});
|
||||
const nativeModule = require(3868) /* metro dependency 3868: native */;
|
||||
const useThemeContext = nativeModule.useThemeContext;
|
||||
const value3 = (require(6791) /* metro dependency 6791: useProfileThemeValuesNative */).useProfileThemeValues(Reflect.apply(useThemeContext,
|
||||
nativeModule, []).theme);
|
||||
const value4 = value3 == null;
|
||||
return env0_2.useMemo(_fun67459, [a2, a0, a1,
|
||||
syncProfileThemeWithUserTheme ? value4 ? value2 : value3.overlaySyncedWithUserTheme : value4 ? value2 : value3.overlay]);
|
||||
}
|
||||
|
||||
function _fun67459() { // fn#67459, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8697:528, offset: 0x01c2386a, size: 191 bytes, params: 1, frame: 17
|
||||
var r4;
|
||||
var value3;
|
||||
var moduleValue;
|
||||
const value2 = null;
|
||||
if (value2 != env0_0) {
|
||||
if (value2 != env0_3) {
|
||||
value3 = environment.__proto__;
|
||||
moduleValue = require(7593) /* metro dependency 7593: UserProfileGradientUtils */;
|
||||
r4 = moduleValue.calculateOverlayedColor(env0_0, env0_3);
|
||||
} else {
|
||||
r4 = value2;
|
||||
}
|
||||
} else {
|
||||
r4 = value2;
|
||||
}
|
||||
return (require(7593) /* metro dependency 7593: UserProfileGradientUtils */).getUserProfileGradientContainerColors(r4,
|
||||
value2 != require && value2 != env0_3 ? (require(7593) /* metro dependency 7593: UserProfileGradientUtils */).calculateOverlayedColor(require,
|
||||
env0_3) : value2, importDefault);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
/* Metro module 10346; source: modules/user_profile/hooks/native/useWishlistViewerCoachmark.tsx; dependencies: [57, 31, 1365, 7013, 2] */
|
||||
function _fun80197(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#80197, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10532:6, offset: 0x01e70d11, size: 133 bytes, params: 8, frame: 18
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_2 = importDefault(57) /* metro dependency 57 */;
|
||||
const env0_3 = importAll(31) /* metro dependency 31 */;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_profile/hooks/native/useWishlistViewerCoachmark.tsx');
|
||||
exports.useWishlistViewerCoachmark = useWishlistViewerCoachmark;
|
||||
}
|
||||
|
||||
function useWishlistViewerCoachmark({isCurrentUser, shouldShowWishlistTab}) { // fn#80198, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10532:243, offset: 0x01e70d96, size: 160 bytes, params: 2, frame: 16
|
||||
const binding = env0_3;
|
||||
const useMemo = binding.useMemo;
|
||||
const value = env0_2((require(7013) /* metro dependency 7013: useSelectedDismissibleContent */).useSelectedDismissibleContent(Reflect.apply(useMemo,
|
||||
binding, [function() {
|
||||
return isCurrentUser ? [] : shouldShowWishlistTab ? [require(dependencyMap[2]).DismissibleContent.WISHLIST_MOBILE_VIEWER_COACHMARK] : [];
|
||||
}, [isCurrentUser, shouldShowWishlistTab]])), 2);
|
||||
const property = value[0];
|
||||
const property2 = value[1];
|
||||
const DismissibleContent = (require(1365) /* metro dependency 1365: dismissible_content */).DismissibleContent;
|
||||
const WISHLIST_MOBILE_VIEWER_COACHMARK = DismissibleContent.WISHLIST_MOBILE_VIEWER_COACHMARK;
|
||||
return {isVisible: property === WISHLIST_MOBILE_VIEWER_COACHMARK, markAsDismissed: property2};
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user