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,37 +1,48 @@
/* Metro module 10095; source: modules/collectibles/native/AvatarDecorationProductPreview.tsx; dependencies: [31, 27, 33, 4501, 7594, 7609, 1244, 1305, 2] */
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 CreateStylesModule from '../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as UseCurrentUserModule from '../hooks/useCurrentUser.tsx'; /* Metro dependency 7594 */
import * as UseShopProductItemsModule from '../hooks/useShopProductItems.tsx'; /* Metro dependency 7609 */
function _fun78855(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#78855, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10281:6, offset: 0x01e3830b, size: 199 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_2 = (require(27) /* metro dependency 27 */).View;
const env0_3 = (require(33) /* metro dependency 33 */).jsx;
const env0_4 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({fullSizePreview: {'flex': 1,
ReactModule;
const env0_4 = (CreateStylesModule).createStyles({fullSizePreview: {'flex': 1,
'alignItems': 'center', 'justifyContent': 'center'}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/AvatarDecorationProductPreview.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/native/AvatarDecorationProductPreview.tsx');
exports.default = _default_78856;
}
function _default_78856({product}) { // fn#78856, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10281:237, offset: 0x01e383d2, size: 284 bytes, params: 2, frame: 23
var r0;
var intl;
const styles = useStyles();
const value2 = (require(7594) /* metro dependency 7594: useCurrentUser */).useCurrentUser();
const useShopProductItemsModule = require(7609) /* metro dependency 7609: useShopProductItems */;
const useShopProductItems = useShopProductItemsModule.useShopProductItems;
const firstAvatarDecoration = Reflect.apply(useShopProductItems, useShopProductItemsModule,
[product]).firstAvatarDecoration;
if (firstAvatarDecoration == null) {
r0 = null;
} else {
var viewBindingProps = {'style': null, 'pointerEvents': 'box-none', 'accessibilityLabel': null,
'accessibilityRole': 'image', 'accessible': true, style: styles.fullSizePreview};
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
viewBindingProps.accessibilityLabel = intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.Do2lxE,
{a11y_text: firstAvatarDecoration.label});
r0 = <View {...viewBindingProps}>{((Avatar) => <Avatar user={value2} guildId={undefined} size={(require(1305) /* metro dependency 1305: native */).AvatarSizes.GIFT_START} avatarDecoration={firstAvatarDecoration} animate />)((require(1305) /* metro dependency 1305: native */).Avatar)}</View>;
function _default_78856({product}) { // fn#78856, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10281:237, offset: 0x01e383d2, size: 284 bytes, params: 2, frame: 23
var r0;
var intl;
const styles = useStyles();
const value2 = (UseCurrentUserModule).useCurrentUser();
const useShopProductItems = UseShopProductItemsModule.useShopProductItems;
const firstAvatarDecoration = Reflect.apply(useShopProductItems, UseShopProductItemsModule,
[product]).firstAvatarDecoration;
if (firstAvatarDecoration == null) {
r0 = null;
} else {
var viewBindingProps = {'style': null, 'pointerEvents': 'box-none', 'accessibilityLabel': null,
'accessibilityRole': 'image', 'accessible': true, style: styles.fullSizePreview};
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
viewBindingProps.accessibilityLabel = intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.Do2lxE,
{a11y_text: firstAvatarDecoration.label});
r0 = (
<View {...viewBindingProps}>
{((Avatar) => <Avatar user={value2} guildId={undefined} size={(require(1305) /* metro dependency 1305: native */).AvatarSizes.GIFT_START} avatarDecoration={firstAvatarDecoration} animate />)((require(1305) /* metro dependency 1305: native */).Avatar)}
</View>
);
}
return r0;
}
return r0;
}
global.__d(_fun78855, 10095, [31, 27, 33, 4501, 7594, 7609, 1244, 1305,
2]) /* metro module 10095, dependencies: [31, 27, 33, 4501, 7594, 7609, 1244, 1305, 2] */;
@@ -1,47 +1,57 @@
/* Metro module 7596; source: modules/collectibles/native/AvatarDecorationSampleV2.tsx; dependencies: [31, 27, 33, 4501, 697, 44, 1904, 7597, 7598, 2] */
import Module00044 from '../../../by-id/module-00044.js'; /* Metro dependency 44 */
import Native from '../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
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 CollectiblesItemTypeModule from '../../../external/discord_common/js/shared/shared-constants/CollectiblesItemType.tsx'; /* Metro dependency 1904 */
import * as CreateStylesModule from '../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
function _fun60917(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#60917, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7774:6, offset: 0x01714d1b, size: 233 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
ReactModule;
let value = ReactNativeModule;
const env0_3 = value.Image;
const env0_4 = value.View;
value = require(33) /* metro dependency 33 */;
const env0_5 = value.jsx;
const env0_6 = value.Fragment;
const env0_7 = value.jsxs;
const env0_8 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(_fun60918);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/AvatarDecorationSampleV2.tsx');
const env0_8 = (CreateStylesModule).createStyles(_fun60918);
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/native/AvatarDecorationSampleV2.tsx');
exports.default = _default_60919;
exports.avatarPlaceholderSizeRatio = 0.8333333333333334;
function _fun60918(a0) { // fn#60918, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7774:217, offset: 0x01714e04, size: 142 bytes, params: 2, frame: 14
const BACKGROUND_BASE_LOWER = (Native).colors.BACKGROUND_BASE_LOWER;
return {avatar: {position: 'absolute', height: a0 * 0.8333333333333334, width: a0 * 0.8333333333333334,
borderRadius: a0 * 0.8333333333333334 / 2, opacity: 0.8, backgroundColor: BACKGROUND_BASE_LOWER}, solidAvatar: {opacity: 1}, avatarDecoration: {position: 'absolute'}};
}
function _default_60919({item, size, avatarSource, animate, threeTierBundle}) { // fn#60919, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7774:431, offset: 0x01714e92, size: 333 bytes, params: 2, frame: 27
const styles = useStyles(size);
const defaultImport = Module00044;
const type = item.type;
const CollectiblesItemType = (CollectiblesItemTypeModule).CollectiblesItemType;
const AVATAR_DECORATION = CollectiblesItemType.AVATAR_DECORATION;
defaultImport(type === AVATAR_DECORATION, 'Item must be Avatar Decoration');
return (
<>
<Image
style={[styles.avatar, (avatarSource != null || threeTierBundle === true) && styles.solidAvatar]}
resizeMode="contain"
source={avatarSource ?? (importDefault(7597) /* metro dependency 7597 */)}
accessible={false}
/>
<View style={styles.avatarDecoration} accessibilityLabel={item.label}>
{((Component) => <Component avatarDecoration={item} size={size} animate={animate} />)(importDefault(7598) /* metro dependency 7598: CutoutableAvatarDecoration */)}
</View>
</>
);
}
}
function _fun60918(a0) { // fn#60918, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7774:217, offset: 0x01714e04, size: 142 bytes, params: 2, frame: 14
const BACKGROUND_BASE_LOWER = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWER;
return {avatar: {position: 'absolute', height: a0 * 0.8333333333333334, width: a0 * 0.8333333333333334,
borderRadius: a0 * 0.8333333333333334 / 2, opacity: 0.8, backgroundColor: BACKGROUND_BASE_LOWER}, solidAvatar: {opacity: 1}, avatarDecoration: {position: 'absolute'}};
}
function _default_60919({item, size, avatarSource, animate, threeTierBundle}) { // fn#60919, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7774:431, offset: 0x01714e92, size: 333 bytes, params: 2, frame: 27
const styles = useStyles(size);
const defaultImport = importDefault(44) /* metro dependency 44 */;
const type = item.type;
const CollectiblesItemType = (require(1904) /* metro dependency 1904: CollectiblesItemType */).CollectiblesItemType;
const AVATAR_DECORATION = CollectiblesItemType.AVATAR_DECORATION;
defaultImport(type === AVATAR_DECORATION, 'Item must be Avatar Decoration');
return (
<>
<Image
style={[styles.avatar, (avatarSource != null || threeTierBundle === true) && styles.solidAvatar]}
resizeMode="contain"
source={avatarSource ?? (importDefault(7597) /* metro dependency 7597 */)}
accessible={false}
/>
<View style={styles.avatarDecoration} accessibilityLabel={item.label}>
{((Component) => <Component avatarDecoration={item} size={size} animate={animate} />)(importDefault(7598) /* metro dependency 7598: CutoutableAvatarDecoration */)}
</View>
</>
);
}
global.__d(_fun60917, 7596, [31, 27, 33, 4501, 697, 44, 1904, 7597, 7598,
2]) /* metro module 7596, dependencies: [31, 27, 33, 4501, 697, 44, 1904, 7597, 7598, 2] */;
@@ -1,11 +1,17 @@
/* Metro module 10091; source: modules/collectibles/native/BundleProductDetailsActionSheetPreview.tsx; dependencies: [57, 31, 27, 33, 4501, 697, 10092, 5321, 5134, 10093, 4573, 1244, 2] */
import Module00057 from '../../../by-id/module-00057.js'; /* Metro dependency 57 */
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 TextModule from '../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as CollectiblesUtilsModule from '../CollectiblesUtils.tsx'; /* Metro dependency 5134 */
import * as Module05321Module from '../../../by-id/module-05321.js'; /* Metro dependency 5321 */
import * as IndividualProductPreviewModule from './IndividualProductPreview.tsx'; /* Metro dependency 10093 */
function _fun78835(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#78835, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10277:6, offset: 0x01e36dc3, size: 654 bytes, params: 8, frame: 23
var object7;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
let value = require(31) /* metro dependency 31 */;
let value = ReactModule;
const env0_4 = value.useCallback;
const env0_5 = value.useLayoutEffect;
const env0_6 = value.useMemo;
@@ -19,147 +25,165 @@ function _fun78835(global, require, importDefault, importAll, module, exports, d
const env0_12 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object7 = {};
const object8 = {};
object = {};
const object2 = {};
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object8.paddingTop = PX_16;
object2.paddingTop = PX_16;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object8.paddingBottom = PX_16;
object2.paddingBottom = PX_16;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object8.gap = PX_16;
object7.previewContainer = object8;
const object9 = {'width': 56, 'height': 56, 'borderRadius': null, 'backgroundColor': null, 'overflow': 'hidden'};
object9.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object2.gap = PX_16;
object.previewContainer = object2;
const object3 = {'width': 56, 'height': 56, 'borderRadius': null, 'backgroundColor': null, 'overflow': 'hidden'};
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
const BACKGROUND_MOD_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_SUBTLE;
object9.backgroundColor = BACKGROUND_MOD_SUBTLE;
object7.bundleThumbnail = object9;
const object10 = {'position': 'absolute', 'top': -2, 'left': -2, 'right': -2, 'bottom': -2, 'borderRadius': null,
object3.backgroundColor = BACKGROUND_MOD_SUBTLE;
object.bundleThumbnail = object3;
const object4 = {'position': 'absolute', 'top': -2, 'left': -2, 'right': -2, 'bottom': -2, 'borderRadius': null,
'borderWidth': 2};
object10.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm + 2;
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm + 2;
const BORDER_STRONG = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_STRONG;
object10.borderColor = BORDER_STRONG;
object7.selectedRing = object10;
const object11 = {flexDirection: 'row'};
object4.borderColor = BORDER_STRONG;
object.selectedRing = object4;
const object5 = {flexDirection: 'row'};
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object11.gap = PX_12;
object5.gap = PX_12;
const PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object11.paddingVertical = PX_4;
object11.paddingHorizontal = 2;
object7.bundleThumbnailRow = object11;
const object12 = {};
object5.paddingVertical = PX_4;
object5.paddingHorizontal = 2;
object.bundleThumbnailRow = object5;
const object6 = {};
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object12.paddingHorizontal = PX_16;
object6.paddingHorizontal = PX_16;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object12.gap = PX_16;
object7.bundleContainer = object12;
object6.gap = PX_16;
object.bundleContainer = object6;
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object7.bundleInfoContainer = {gap: PX_8};
const env0_13 = Reflect.apply(createStyles, value, [object7]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/BundleProductDetailsActionSheetPreview.tsx');
object.bundleInfoContainer = {gap: PX_8};
const env0_13 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/native/BundleProductDetailsActionSheetPreview.tsx');
exports.default = _default_78838;
}
function BundleThumbnail({item, index, isSelected, setSelected, label}) { // fn#78836, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10277:941, offset: 0x01e37051, size: 246 bytes, params: 2, frame: 23
const value2 = useCallback(function() {
return setSelected(index);
}, [setSelected, index]);
const styles = useStyles();
return (
<Pressable
role="radio"
{...{['aria-checked']: isSelected}}
onPress={value2}
{...{['aria-label']: label}}
>
<View style={styles.bundleThumbnail}>
{((Component) => <Component item={item} size={56} />)(importDefault(10092) /* metro dependency 10092: CollectiblesItemMiniPreview */)}
</View>
{isSelected && <View style={styles.selectedRing} pointerEvents="none" />}
</Pressable>
);
}
function _default_78838({product, width, handlePreviewPress, onTrackPress, onActiveItemChange}) { // fn#78838, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10277:1239, offset: 0x01e37147, size: 944 bytes, params: 2, frame: 37
var object2;
var r4;
const styles = useStyles();
const value4 = useState(0);
const binding = env0_3;
const value5 = binding(value4, 2);
let property = value5[0];
const property2 = value5[1];
const [property3, property4] = binding(useState(product.skuId), 2);
const value7 = useMemo(_fun78839, []);
const items2 = product.items;
const bundledProducts = product.bundledProducts;
if (product.skuId === property3) {
r4 = property;
} else {
property4(product.skuId);
property2(0);
r4 = 0;
function BundleThumbnail({item, index, isSelected, setSelected, label}) { // fn#78836, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10277:941, offset: 0x01e37051, size: 246 bytes, params: 2, frame: 23
const value2 = useCallback(function() {
return setSelected(index);
}, [setSelected, index]);
const styles = useStyles();
return (
<Pressable
role="radio"
{...{['aria-checked']: isSelected}}
onPress={value2}
{...{['aria-label']: label}}
>
<View style={styles.bundleThumbnail}>
{((Component) => <Component item={item} size={56} />)(importDefault(10092) /* metro dependency 10092: CollectiblesItemMiniPreview */)}
</View>
{isSelected && <View style={styles.selectedRing} pointerEvents="none" />}
</Pressable>
);
}
property = items2[r4];
useLayoutEffect(_fun78840, [property, onActiveItemChange]);
const r14 = bundledProducts?.[r4]?.name ?? property.skuId;
const collectibleTypeLabel = (require(5134) /* metro dependency 5134: CollectiblesUtils */).getCollectibleTypeLabel(property.type);
object2 = {skuId: property.skuId, type: property.type, items: [property]};
const IndividualProductPreview = (require(10093) /* metro dependency 10093: IndividualProductPreview */).IndividualProductPreview;
const individualProductPreview = <IndividualProductPreview product={object2} width={width} handlePreviewPress={handlePreviewPress} onTrackPress={onTrackPress} />;
let bundleInfoContainer = styles.bundleInfoContainer;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const text = <Text variant="heading-xl/bold">{product.name}</Text>;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const view = <View style={bundleInfoContainer}>{text}<Text variant="text-sm/medium" color="text-default">{intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t['/0Yndu'],
{num: items2.length})}</Text></View>;
bundleInfoContainer = styles.bundleInfoContainer;
const GestureDetector = (require(5321) /* metro dependency 5321 */).GestureDetector;
const scrollViewBindingProps = {'horizontal': true, 'showsHorizontalScrollIndicator': false,
'contentContainerStyle': null, 'role': 'radiogroup', contentContainerStyle: styles.bundleThumbnailRow};
scrollViewBindingProps['aria-label'] = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.cTbdgu);
return (
<View style={styles.previewContainer}>
{individualProductPreview}
<View style={styles.bundleContainer}>
{view}
<View style={bundleInfoContainer}>
<GestureDetector gesture={value7}>
<ScrollView {...scrollViewBindingProps}>
{items2.map(_fun78841)}
</ScrollView>
</GestureDetector>
<Text variant="text-sm/medium" color="text-default">
{r14}
{collectibleTypeLabel != null && <Text variant="text-sm/medium" color="text-muted">{' - ' + collectibleTypeLabel}</Text>}
</Text>
function _default_78838({product, width, handlePreviewPress, onTrackPress, onActiveItemChange}) { // fn#78838, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10277:1239, offset: 0x01e37147, size: 944 bytes, params: 2, frame: 37
var r4;
const styles = useStyles();
const value4 = useState(0);
const value5 = Module00057(value4, 2);
let property = value5[0];
const property2 = value5[1];
const [property3, property4] = Module00057(useState(product.skuId), 2);
const value7 = useMemo(_fun78839, []);
const items2 = product.items;
const bundledProducts = product.bundledProducts;
if (product.skuId === property3) {
r4 = property;
} else {
property4(product.skuId);
property2(0);
r4 = 0;
}
property = items2[r4];
useLayoutEffect(_fun78840, [property, onActiveItemChange]);
const r14 = bundledProducts?.[r4]?.name ?? property.skuId;
const collectibleTypeLabel = (CollectiblesUtilsModule).getCollectibleTypeLabel(property.type);
object = {skuId: property.skuId, type: property.type, items: [property]};
const IndividualProductPreview = (IndividualProductPreviewModule).IndividualProductPreview;
const individualProductPreview = (
<IndividualProductPreview
product={object}
width={width}
handlePreviewPress={handlePreviewPress}
onTrackPress={onTrackPress}
/>
);
let bundleInfoContainer = styles.bundleInfoContainer;
const Text = (TextModule).Text;
const text = (
<Text variant="heading-xl/bold">
{product.name}
</Text>
);
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const view = (
<View style={bundleInfoContainer}>
{text}
<Text variant="text-sm/medium" color="text-default">
{intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t['/0Yndu'],
{num: items2.length})}
</Text>
</View>
);
bundleInfoContainer = styles.bundleInfoContainer;
const GestureDetector = (Module05321Module).GestureDetector;
const scrollViewBindingProps = {'horizontal': true, 'showsHorizontalScrollIndicator': false,
'contentContainerStyle': null, 'role': 'radiogroup', contentContainerStyle: styles.bundleThumbnailRow};
scrollViewBindingProps['aria-label'] = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.cTbdgu);
return (
<View style={styles.previewContainer}>
{individualProductPreview}
<View style={styles.bundleContainer}>
{view}
<View style={bundleInfoContainer}>
<GestureDetector gesture={value7}>
<ScrollView {...scrollViewBindingProps}>
{items2.map(_fun78841)}
</ScrollView>
</GestureDetector>
<Text variant="text-sm/medium" color="text-default">
{r14}
{collectibleTypeLabel != null && <Text variant="text-sm/medium" color="text-muted">{' - ' + collectibleTypeLabel}</Text>}
</Text>
</View>
</View>
</View>
</View>
);
}
);
function _fun78839() { // fn#78839, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10277:1403, offset: 0x01e374f7, size: 56 bytes, params: 1, frame: 11
const value = environment.__proto__;
const Gesture = (Module05321Module).Gesture;
return Gesture.Native().disallowInterruption(true);
}
function _fun78839() { // fn#78839, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10277:1403, offset: 0x01e374f7, size: 56 bytes, params: 1, frame: 11
const value = environment.__proto__;
const Gesture = (require(5321) /* metro dependency 5321 */).Gesture;
return Gesture.Native().disallowInterruption(true);
}
function _fun78840() { // fn#78840, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10277:1545, offset: 0x01e3752f, size: 32 bytes, params: 1, frame: 11
if (onActiveItemChange != null) {
onActiveItemChange(env0_4);
}
}
function _fun78841(a0, a1) { // fn#78841, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10277:2427, offset: 0x01e3754f, size: 118 bytes, params: 3, frame: 20
return (
<BundleThumbnail
item={a0}
index={a1}
isSelected={a1 === Module00057}
setSelected={env0_1}
label={(bundledProducts == null || bundledProducts[a1] == null ? undefined : bundledProducts[a1].name) ?? a0.skuId}
key={a0.skuId}
/>
);
}
function _fun78840() { // fn#78840, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10277:1545, offset: 0x01e3752f, size: 32 bytes, params: 1, frame: 11
if (onActiveItemChange != null) {
onActiveItemChange(env0_4);
}
}
function _fun78841(a0, a1) { // fn#78841, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10277:2427, offset: 0x01e3754f, size: 118 bytes, params: 3, frame: 20
return (
<BundleThumbnail
item={a0}
index={a1}
isSelected={a1 === env0_3}
setSelected={env0_1}
label={(bundledProducts == null || bundledProducts[a1] == null ? undefined : bundledProducts[a1].name) ?? a0.skuId}
key={a0.skuId}
/>
);
}
global.__d(_fun78835, 10091, [57, 31, 27, 33, 4501, 697, 10092, 5321, 5134, 10093, 4573, 1244,
2]) /* metro module 10091, dependencies: [57, 31, 27, 33, 4501, 697, 10092, 5321, 5134, 10093, 4573, 1244, 2] */;
@@ -1,160 +1,221 @@
/* Metro module 8470; source: modules/collectibles/native/BundleSampleV2.tsx; dependencies: [31, 27, 8471, 33, 5475, 4501, 697, 44, 1904, 1901, 8472, 7596, 8482, 1305, 8487, 2] */
import ProfileEffectSampleV2 from './ProfileEffectSampleV2.tsx'; /* Metro dependency 8472 */
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 CreateStylesModule from '../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as CollectiblesPreviewConstantsModule from './CollectiblesPreviewConstants.tsx'; /* Metro dependency 8471 */
import * as CollectiblesMobileFlexibleBundlesExperimentModule from '../experiments/CollectiblesMobileFlexibleBundlesExperiment.tsx'; /* Metro dependency 8487 */
function _fun67262(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#67262, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8655:6, offset: 0x01c1bc70, size: 470 bytes, params: 8, frame: 26
var object7;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
ReactModule;
let value = ReactNativeModule;
const StyleSheet = value.StyleSheet;
const env0_3 = value.View;
const env0_4 = (require(8471) /* metro dependency 8471: CollectiblesPreviewConstants */).BUNDLE_PREVIEW_CONFIG;
value = require(33) /* metro dependency 33 */;
const env0_5 = value.jsx;
const env0_6 = value.jsxs;
const create = StyleSheet.create;
object7 = {};
const object8 = {};
copyDataProperties(object8, StyleSheet.absoluteFillObject, undefined);
object8['overflow'] = 'hidden';
object7.container = object8;
const object9 = {};
copyDataProperties(object9, StyleSheet.absoluteFillObject, undefined);
object9['overflow'] = 'hidden';
object9['justifyContent'] = 'center';
object9['alignItems'] = 'center';
object7.bgBleedClip = object9;
const object10 = {};
copyDataProperties(object10, StyleSheet.absoluteFillObject, undefined);
object10['opacity'] = 0.8;
object7.bgMutedWrap = object10;
object7.bgImage = {'width': '100%', 'height': '100%'};
const object11 = {};
copyDataProperties(object11, StyleSheet.absoluteFillObject, undefined);
object11['overflow'] = 'hidden';
object11['justifyContent'] = 'center';
object11['alignItems'] = 'center';
object7.fgClip = object11;
const object12 = {};
copyDataProperties(object12, StyleSheet.absoluteFillObject, undefined);
object7.fgImage = object12;
const env0_7 = Reflect.apply(create, StyleSheet, [object7]);
const env0_8 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(_fun67266);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/BundleSampleV2.tsx');
exports.default = _default_67267;
}
function BundleStaticPreviewContent({previewAssets, disableBackground, mutedBackground}) { // fn#67263, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8655:197, offset: 0x01c1be46, size: 402 bytes, params: 2, frame: 26
var r4;
const bgStatic = previewAssets.bgStatic;
const fgStatic = previewAssets.fgStatic;
let value = null;
const r9 = value != bgStatic ? ((Component) => <Component source={{uri: bgStatic}} style={env0_7.bgImage} resizeMode="cover" accessibilityElementsHidden importantForAccessibility="no-hide-descendants" />)(importDefault(5475) /* metro dependency 5475: FastImage */) : value;
const container = env0_7.container;
const r5 = !disableBackground && value != r9 && <View style={env0_7.bgBleedClip} pointerEvents="none">{mutedBackground ? <View style={env0_7.bgMutedWrap} pointerEvents="none">{r9}</View> : r9}</View>;
value = value != fgStatic;
if (value) {
var viewBinding4Props = {style: env0_7.fgClip, pointerEvents: 'none'};
value = importDefault(5475) /* metro dependency 5475: FastImage */;
value = <View {...viewBinding4Props}>{((Component) => <Component source={{uri: fgStatic}} style={env0_7.fgImage} resizeMode="cover" accessibilityElementsHidden importantForAccessibility="no-hide-descendants" />)(value)}</View>;
r4 = value;
} else {
r4 = value;
}
return (
<View style={container}>
{r5}
{r4}
</View>
);
}
function BundleSampleV2Composed({deco, pfx, nameplate, size}) { // fn#67264, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8655:2307, offset: 0x01c1bfd8, size: 567 bytes, params: 2, frame: 29
var r12;
size = size === undefined ? 'small' : size;
const styles = useStyles(size);
if (nameplate != null) {
(importDefault(44) /* metro dependency 44 */)(nameplate.type === (require(1904) /* metro dependency 1904: CollectiblesItemType */).CollectiblesItemType.NAMEPLATE,
'Item must be Nameplate');
r12 = (require(1901) /* metro dependency 1901: utils */).getNameplateData(nameplate);
} else {
r12 = undefined;
}
const property = BUNDLE_PREVIEW_CONFIG[size];
const r17 = r12 != null ? property.avatarDecorationSizeTriple : property.avatarDecorationSize;
const items2 = [<View style={styles.pfx}>{((Component) => <Component item={pfx} />)(importDefault(8472) /* metro dependency 8472: ProfileEffectSampleV2 */)}</View>];
items2[1] = <View style={[r12 != null ? styles.avatarWithNameplate : styles.avatar]}>{((Component) => <Component item={deco} size={r17} threeTierBundle={r12 != null} />)(importDefault(7596) /* metro dependency 7596: AvatarDecorationSampleV2 */)}</View>;
items2[2] = r12 != null ? <View style={styles.nameplate}>{((NameplateDummyUserPreview) => <NameplateDummyUserPreview width={property.nameplatePreviewWidth} avatarSize={size === 'large' ? (require(1305) /* metro dependency 1305: native */).AvatarSizes.NORMAL : (require(1305) /* metro dependency 1305: native */).AvatarSizes.XSMALL_20} nameplate={r12} />)((require(8482) /* metro dependency 8482: NameplateDummyUserPreview */).NameplateDummyUserPreview)}</View> : null;
return (
<View style={styles.bundle}>
{items2}
</View>
);
}
function BundleSampleV2StaticPreview({previewAssets, disableStaticBackground, mutedStaticBackground, composedFallbackProps, exposureLocation}) { // fn#67265, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8655:3006, offset: 0x01c1c20f, size: 134 bytes, params: 2, frame: 18
const collectiblesMobileFlexibleBundlesExperimentModule = require(8487) /* metro dependency 8487: CollectiblesMobileFlexibleBundlesExperiment */;
const useCollectiblesMobileFlexibleBundlesExperiment = collectiblesMobileFlexibleBundlesExperimentModule.useCollectiblesMobileFlexibleBundlesExperiment;
return Reflect.apply(useCollectiblesMobileFlexibleBundlesExperiment,
collectiblesMobileFlexibleBundlesExperimentModule,
[exposureLocation]).enabled ? <BundleStaticPreviewContent previewAssets={previewAssets} disableBackground={disableStaticBackground} mutedBackground={mutedStaticBackground} /> : <BundleSampleV2Composed {...composedFallbackProps} />;
}
function _fun67266(a0) { // fn#67266, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8655:1267, offset: 0x01c1c295, size: 554 bytes, params: 2, frame: 18
const property = BUNDLE_PREVIEW_CONFIG[a0];
object = {};
const object2 = {};
copyDataProperties(object2, StyleSheet.absoluteFillObject, undefined);
object2['overflow'] = 'hidden';
object.container = object2;
const object3 = {};
copyDataProperties(object3, StyleSheet.absoluteFillObject, undefined);
object3['overflow'] = 'hidden';
object3['justifyContent'] = 'center';
object3['alignItems'] = 'center';
object.bgBleedClip = object3;
const object4 = {};
copyDataProperties(object4, StyleSheet.absoluteFillObject, undefined);
object4['opacity'] = 0.8;
object.bgMutedWrap = object4;
object.bgImage = {'width': '100%', 'height': '100%'};
const object5 = {};
object5.width = property.bundleWidth;
object5.height = property.bundleHeight;
object5.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
object4.bundle = object5;
const object6 = {position: 'absolute'};
object6.top = property.pfxTop;
object6.left = property.pfxLeft;
object6.width = property.pfxWidth;
object6.height = property.pfxHeight;
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object6.backgroundColor = BACKGROUND_BASE_LOW;
object6.transform = [{rotate: '-8deg'}];
object6.zIndex = 0;
object6.overflow = 'hidden';
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
object4.pfx = object6;
object4.avatar = {'position': 'absolute', 'top': null, 'right': null, 'transform': null, 'zIndex': 1,
'alignItems': 'center', 'justifyContent': 'center', top: property.avatarTop, right: property.avatarRight,
transform: [{rotate: '8deg'}]};
const object8 = {'position': 'absolute', 'top': null, 'right': null, 'transform': null, 'zIndex': 1,
'alignItems': 'center', 'justifyContent': 'center'};
object8.top = property.avatarWithNameplateTop;
object8.right = property.avatarWithNameplateRight;
object8.transform = [{rotate: '8deg'}];
let BLACK = (importDefault(697) /* metro dependency 697: native */).colors.BLACK;
object8.shadowColor = BLACK;
object8.shadowOffset = {'width': 0, 'height': 4};
object8.shadowOpacity = 0.5;
object8.shadowRadius = 4;
object4.avatarWithNameplate = object8;
const object10 = {'position': 'absolute', 'bottom': null, 'marginHorizontal': 10, 'width': '90%',
'backgroundColor': null, 'zIndex': 2};
object10.bottom = property.nameplateBottom;
const BACKGROUND_BASE_LOWER = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWER;
object10.backgroundColor = BACKGROUND_BASE_LOWER;
object10.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
BLACK = (importDefault(697) /* metro dependency 697: native */).colors.BLACK;
object10.shadowColor = BLACK;
object10.shadowOffset = {'width': 0, 'height': 4};
object10.shadowOpacity = 0.5;
object10.shadowRadius = 4;
object4.nameplate = object10;
return object4;
}
copyDataProperties(object5, StyleSheet.absoluteFillObject, undefined);
object5['overflow'] = 'hidden';
object5['justifyContent'] = 'center';
object5['alignItems'] = 'center';
object.fgClip = object5;
const object6 = {};
copyDataProperties(object6, StyleSheet.absoluteFillObject, undefined);
object.fgImage = object6;
const env0_7 = Reflect.apply(create, StyleSheet, [object]);
const env0_8 = (CreateStylesModule).createStyles(_fun67266);
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/native/BundleSampleV2.tsx');
exports.default = _default_67267;
function BundleStaticPreviewContent({previewAssets, disableBackground, mutedBackground}) { // fn#67263, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8655:197, offset: 0x01c1be46, size: 402 bytes, params: 2, frame: 26
var r4;
const bgStatic = previewAssets.bgStatic;
const fgStatic = previewAssets.fgStatic;
let value = null;
const r9 = (
value != bgStatic
? ((Component) => <Component source={{uri: bgStatic}} style={env0_7.bgImage} resizeMode="cover" accessibilityElementsHidden importantForAccessibility="no-hide-descendants" />)(importDefault(5475) /* metro dependency 5475: FastImage */)
: value
);
const container = env0_7.container;
const r5 = !disableBackground && value != r9 && <View style={env0_7.bgBleedClip} pointerEvents="none">{mutedBackground ? <View style={env0_7.bgMutedWrap} pointerEvents="none">{r9}</View> : r9}</View>;
value = value != fgStatic;
if (value) {
var viewBinding4Props = {style: env0_7.fgClip, pointerEvents: 'none'};
value = importDefault(5475) /* metro dependency 5475: FastImage */;
value = (
<View {...viewBinding4Props}>
{((Component) => <Component source={{uri: fgStatic}} style={env0_7.fgImage} resizeMode="cover" accessibilityElementsHidden importantForAccessibility="no-hide-descendants" />)(value)}
</View>
);
r4 = value;
} else {
r4 = value;
}
return (
<View style={container}>
{r5}
{r4}
</View>
);
}
function BundleSampleV2Composed({deco, pfx, nameplate, size}) { // fn#67264, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8655:2307, offset: 0x01c1bfd8, size: 567 bytes, params: 2, frame: 29
var r12;
size = size === undefined ? 'small' : size;
const styles = useStyles(size);
if (nameplate != null) {
(importDefault(44) /* metro dependency 44 */)(nameplate.type === (require(1904) /* metro dependency 1904: CollectiblesItemType */).CollectiblesItemType.NAMEPLATE,
'Item must be Nameplate');
r12 = (require(1901) /* metro dependency 1901: utils */).getNameplateData(nameplate);
} else {
r12 = undefined;
}
const property = BUNDLE_PREVIEW_CONFIG[size];
const r17 = r12 != null ? property.avatarDecorationSizeTriple : property.avatarDecorationSize;
const items2 = [
<View style={styles.pfx}>
{((Component) => <Component item={pfx} />)(ProfileEffectSampleV2)}
</View>,
];
items2[1] = (
<View style={[r12 != null ? styles.avatarWithNameplate : styles.avatar]}>
{((Component) => <Component item={deco} size={r17} threeTierBundle={r12 != null} />)(importDefault(7596) /* metro dependency 7596: AvatarDecorationSampleV2 */)}
</View>
);
items2[2] = (
r12 != null
? (
<View style={styles.nameplate}>
{((NameplateDummyUserPreview) => <NameplateDummyUserPreview width={property.nameplatePreviewWidth} avatarSize={size === 'large' ? (require(1305) /* metro dependency 1305: native */).AvatarSizes.NORMAL : (require(1305) /* metro dependency 1305: native */).AvatarSizes.XSMALL_20} nameplate={r12} />)((require(8482) /* metro dependency 8482: NameplateDummyUserPreview */).NameplateDummyUserPreview)}
</View>
)
: null
);
return (
<View style={styles.bundle}>
{items2}
</View>
);
}
function BundleSampleV2StaticPreview({previewAssets, disableStaticBackground, mutedStaticBackground, composedFallbackProps, exposureLocation}) { // fn#67265, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8655:3006, offset: 0x01c1c20f, size: 134 bytes, params: 2, frame: 18
const useCollectiblesMobileFlexibleBundlesExperiment = CollectiblesMobileFlexibleBundlesExperimentModule.useCollectiblesMobileFlexibleBundlesExperiment;
return (
Reflect.apply(useCollectiblesMobileFlexibleBundlesExperiment, CollectiblesMobileFlexibleBundlesExperimentModule,
[exposureLocation]).enabled
? (
<BundleStaticPreviewContent
previewAssets={previewAssets}
disableBackground={disableStaticBackground}
mutedBackground={mutedStaticBackground}
/>
)
: (
<BundleSampleV2Composed {...composedFallbackProps} />
)
);
}
function _fun67266(a0) { // fn#67266, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8655:1267, offset: 0x01c1c295, size: 554 bytes, params: 2, frame: 18
const property = BUNDLE_PREVIEW_CONFIG[a0];
const object = {};
const object2 = {};
object2.width = property.bundleWidth;
object2.height = property.bundleHeight;
object2.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
object.bundle = object2;
const object3 = {position: 'absolute'};
object3.top = property.pfxTop;
object3.left = property.pfxLeft;
object3.width = property.pfxWidth;
object3.height = property.pfxHeight;
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object3.backgroundColor = BACKGROUND_BASE_LOW;
object3.transform = [{rotate: '-8deg'}];
object3.zIndex = 0;
object3.overflow = 'hidden';
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
object.pfx = object3;
object.avatar = {'position': 'absolute', 'top': null, 'right': null, 'transform': null, 'zIndex': 1,
'alignItems': 'center', 'justifyContent': 'center', top: property.avatarTop, right: property.avatarRight,
transform: [{rotate: '8deg'}]};
const object7 = {'position': 'absolute', 'top': null, 'right': null, 'transform': null, 'zIndex': 1,
'alignItems': 'center', 'justifyContent': 'center'};
object7.top = property.avatarWithNameplateTop;
object7.right = property.avatarWithNameplateRight;
object7.transform = [{rotate: '8deg'}];
let BLACK = (importDefault(697) /* metro dependency 697: native */).colors.BLACK;
object7.shadowColor = BLACK;
object7.shadowOffset = {'width': 0, 'height': 4};
object7.shadowOpacity = 0.5;
object7.shadowRadius = 4;
object.avatarWithNameplate = object7;
const object9 = {'position': 'absolute', 'bottom': null, 'marginHorizontal': 10, 'width': '90%',
'backgroundColor': null, 'zIndex': 2};
object9.bottom = property.nameplateBottom;
const BACKGROUND_BASE_LOWER = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWER;
object9.backgroundColor = BACKGROUND_BASE_LOWER;
object9.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
BLACK = (importDefault(697) /* metro dependency 697: native */).colors.BLACK;
object9.shadowColor = BLACK;
object9.shadowOffset = {'width': 0, 'height': 4};
object9.shadowOpacity = 0.5;
object9.shadowRadius = 4;
object.nameplate = object9;
return object;
}
function _default_67267({deco, pfx, nameplate, size, previewAssets, disableStaticBackground, mutedStaticBackground, exposureLocation}) { // fn#67267, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8655:3361, offset: 0x01c1c4bf, size: 201 bytes, params: 2, frame: 19
size = size === undefined ? 'small' : size;
disableStaticBackground = !(disableStaticBackground === undefined) && disableStaticBackground;
mutedStaticBackground = !(mutedStaticBackground === undefined) && mutedStaticBackground;
exposureLocation = exposureLocation === undefined ? 'CollectiblesShopCardAssetTileV2' : exposureLocation;
return (
previewAssets?.fgStatic != null
? (
<BundleSampleV2StaticPreview
previewAssets={previewAssets}
disableStaticBackground={disableStaticBackground}
mutedStaticBackground={mutedStaticBackground}
composedFallbackProps={object}
exposureLocation={exposureLocation}
/>
)
: (
<BundleSampleV2Composed
deco={deco}
pfx={pfx}
nameplate={nameplate}
size={size}
/>
)
);
}
function _default_67267({deco, pfx, nameplate, size, previewAssets, disableStaticBackground, mutedStaticBackground, exposureLocation}) { // fn#67267, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8655:3361, offset: 0x01c1c4bf, size: 201 bytes, params: 2, frame: 19
size = size === undefined ? 'small' : size;
disableStaticBackground = !(disableStaticBackground === undefined) && disableStaticBackground;
mutedStaticBackground = !(mutedStaticBackground === undefined) && mutedStaticBackground;
exposureLocation = exposureLocation === undefined ? 'CollectiblesShopCardAssetTileV2' : exposureLocation;
return previewAssets?.fgStatic != null ? <BundleSampleV2StaticPreview previewAssets={previewAssets} disableStaticBackground={disableStaticBackground} mutedStaticBackground={mutedStaticBackground} composedFallbackProps={object} exposureLocation={exposureLocation} /> : <BundleSampleV2Composed deco={deco} pfx={pfx} nameplate={nameplate} size={size} />;
}
global.__d(_fun67262, 8470, [31, 27, 8471, 33, 5475, 4501, 697, 44, 1904, 1901, 8472, 7596, 8482, 1305, 8487,
2]) /* metro module 8470, dependencies: [31, 27, 8471, 33, 5475, 4501, 697, 44, 1904, 1901, 8472, 7596, 8482, 1305, 8487, 2] */;
@@ -1,146 +1,175 @@
/* Metro module 8413; source: modules/collectibles/native/CollectiblesBadges.tsx; dependencies: [31, 27, 1880, 33, 4501, 697, 4573, 1244, 7962, 6705, 7954, 2] */
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 IndexNativeModule from '../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as PremiumConstantsModule from '../../premium/PremiumConstants.tsx'; /* Metro dependency 1880 */
import * as TextModule from '../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
function _fun66835(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#66835, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8598:6, offset: 0x01c0bb4c, size: 597 bytes, params: 8, frame: 23
var object3;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_3 = (require(27) /* metro dependency 27 */).View;
const env0_4 = (require(1880) /* metro dependency 1880: PremiumConstants */).PremiumTypes;
let value = require(33) /* metro dependency 33 */;
ReactModule;
let value = JsxRuntimeModule;
const env0_5 = value.jsx;
const env0_6 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object3 = {};
const object5 = {};
object = {};
const object2 = {};
const BACKGROUND_BRAND = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BRAND;
object5.backgroundColor = BACKGROUND_BRAND;
object5.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
object5.paddingHorizontal = 6;
object5.paddingVertical = 2;
object3.newIconBadge = object5;
object3.newIconBadgeText = {textTransform: 'uppercase'};
const object8 = {};
object2.backgroundColor = BACKGROUND_BRAND;
object2.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
object2.paddingHorizontal = 6;
object2.paddingVertical = 2;
object.newIconBadge = object2;
object.newIconBadgeText = {textTransform: 'uppercase'};
const object4 = {};
const WHITE = (importDefault(697) /* metro dependency 697: native */).colors.WHITE;
object8.backgroundColor = WHITE;
object8.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.md;
object4.backgroundColor = WHITE;
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.md;
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object8.paddingHorizontal = PX_8;
object4.paddingHorizontal = PX_8;
const PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object8.paddingVertical = PX_4;
object3.limitedTimeBadge = object8;
object3.limitedTimeBadgeText = {textTransform: 'uppercase'};
const object9 = {};
object4.paddingVertical = PX_4;
object.limitedTimeBadge = object4;
object.limitedTimeBadgeText = {textTransform: 'uppercase'};
const object6 = {};
const ICON_OVERLAY_DARK = (importDefault(697) /* metro dependency 697: native */).colors.ICON_OVERLAY_DARK;
object9.backgroundColor = ICON_OVERLAY_DARK;
object9.padding = 5;
object9.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
object3.lockIconBadge = object9;
const object10 = {'backgroundColor': null, 'flexDirection': 'row', 'paddingHorizontal': 5, 'paddingVertical': 3,
object6.backgroundColor = ICON_OVERLAY_DARK;
object6.padding = 5;
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
object.lockIconBadge = object6;
const object7 = {'backgroundColor': null, 'flexDirection': 'row', 'paddingHorizontal': 5, 'paddingVertical': 3,
'borderRadius': null, 'alignItems': 'center', 'gap': 2};
const PREMIUM_TIER_2_PINK_FOR_GRADIENTS_2 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.PREMIUM_TIER_2_PINK_FOR_GRADIENTS_2;
object10.backgroundColor = PREMIUM_TIER_2_PINK_FOR_GRADIENTS_2;
object10.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
object3.newLockIconBadge = object10;
object3.newLockIconBadgeText = {textTransform: 'uppercase'};
const env0_7 = Reflect.apply(createStyles, value, [object3]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/CollectiblesBadges.tsx');
object7.backgroundColor = PREMIUM_TIER_2_PINK_FOR_GRADIENTS_2;
object7.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
object.newLockIconBadge = object7;
object.newLockIconBadgeText = {textTransform: 'uppercase'};
const env0_7 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/native/CollectiblesBadges.tsx');
exports.NewBadge = NewBadge;
exports.LockBadge = LockBadge;
exports.PremiumBadge = PremiumBadge;
exports.LimitedTimeBadge = LimitedTimeBadge;
}
function NewBadge({style}) { // fn#66836, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8598:1047, offset: 0x01c0bda1, size: 171 bytes, params: 2, frame: 20
const styles = useStyles();
const items2 = [styles.newIconBadge, style];
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
return (
<View style={items2}>
<Text
variant="text-sm/bold"
color="white"
style={styles.newIconBadgeText}
>
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.y2b7CA)}
</Text>
</View>
);
}
function LockBadge({isNew, style}) { // fn#66837, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8598:1259, offset: 0x01c0be4c, size: 410 bytes, params: 2, frame: 23
var r0;
var PremiumFeaturesBackground;
var items3;
var Text;
var intl;
isNew = !(isNew === undefined) && isNew;
var value;
const styles = useStyles();
if (isNew) {
PremiumFeaturesBackground = importDefault(7962) /* metro dependency 7962: PremiumFeaturesBackground */;
var defaultImportProps = {premiumType: PremiumTypes.TIER_2, style: [styles.newLockIconBadge, style]};
const LockIcon = (require(6705) /* metro dependency 6705: LockIcon */).LockIcon;
value = <LockIcon size="xxs" color={(importDefault(697) /* metro dependency 697: native */).colors.WHITE} />;
items3 = [value];
Text = (require(4573) /* metro dependency 4573: Text */).Text;
var textProps = {'variant': 'text-xs/bold', 'color': 'white', style: styles.newLockIconBadgeText};
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
items3[1] = <Text {...textProps}>{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.y2b7CA)}</Text>;
value = <PremiumFeaturesBackground {...defaultImportProps}>{items3}</PremiumFeaturesBackground>;
r0 = value;
} else {
r0 = <View style={[styles.lockIconBadge,
style]}>{((LockIcon) => <LockIcon size="sm" color={(importDefault(697) /* metro dependency 697: native */).colors.WHITE} />)((require(6705) /* metro dependency 6705: LockIcon */).LockIcon)}</View>;
function NewBadge({style}) { // fn#66836, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8598:1047, offset: 0x01c0bda1, size: 171 bytes, params: 2, frame: 20
const styles = useStyles();
const items2 = [styles.newIconBadge, style];
const Text = (TextModule).Text;
const intl = (IndexNativeModule).intl;
return (
<View style={items2}>
<Text
variant="text-sm/bold"
color="white"
style={styles.newIconBadgeText}
>
{intl.string((IndexNativeModule).t.y2b7CA)}
</Text>
</View>
);
}
return r0;
}
function PremiumBadge({isNew, style}) { // fn#66838, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8598:1685, offset: 0x01c0bfe6, size: 410 bytes, params: 2, frame: 23
var r0;
var PremiumFeaturesBackground;
var items3;
var Text;
var intl;
isNew = !(isNew === undefined) && isNew;
var value;
const styles = useStyles();
if (isNew) {
PremiumFeaturesBackground = importDefault(7962) /* metro dependency 7962: PremiumFeaturesBackground */;
var defaultImportProps = {premiumType: PremiumTypes.TIER_2, style: [styles.newLockIconBadge, style]};
const NitroWheelIcon = (require(7954) /* metro dependency 7954: NitroWheelIcon */).NitroWheelIcon;
value = <NitroWheelIcon size="xxs" color={(importDefault(697) /* metro dependency 697: native */).colors.WHITE} />;
items3 = [value];
Text = (require(4573) /* metro dependency 4573: Text */).Text;
var textProps = {'variant': 'text-xs/bold', 'color': 'white', style: styles.newLockIconBadgeText};
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
items3[1] = <Text {...textProps}>{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.y2b7CA)}</Text>;
value = <PremiumFeaturesBackground {...defaultImportProps}>{items3}</PremiumFeaturesBackground>;
r0 = value;
} else {
r0 = <View style={[styles.lockIconBadge,
style]}>{((NitroWheelIcon) => <NitroWheelIcon size="sm" color={(importDefault(697) /* metro dependency 697: native */).colors.WHITE} />)((require(7954) /* metro dependency 7954: NitroWheelIcon */).NitroWheelIcon)}</View>;
function LockBadge({isNew, style}) { // fn#66837, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8598:1259, offset: 0x01c0be4c, size: 410 bytes, params: 2, frame: 23
var r0;
var PremiumFeaturesBackground;
var items3;
var Text;
var intl;
isNew = !(isNew === undefined) && isNew;
var value;
const styles = useStyles();
if (isNew) {
PremiumFeaturesBackground = importDefault(7962) /* metro dependency 7962: PremiumFeaturesBackground */;
var defaultImportProps = {premiumType: PremiumTypes.TIER_2, style: [styles.newLockIconBadge, style]};
const LockIcon = (require(6705) /* metro dependency 6705: LockIcon */).LockIcon;
value = <LockIcon size="xxs" color={(importDefault(697) /* metro dependency 697: native */).colors.WHITE} />;
items3 = [value];
Text = (require(4573) /* metro dependency 4573: Text */).Text;
var textProps = {'variant': 'text-xs/bold', 'color': 'white', style: styles.newLockIconBadgeText};
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
items3[1] = (
<Text {...textProps}>
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.y2b7CA)}
</Text>
);
value = (
<PremiumFeaturesBackground {...defaultImportProps}>
{items3}
</PremiumFeaturesBackground>
);
r0 = value;
} else {
r0 = (
<View style={[styles.lockIconBadge, style]}>
{((LockIcon) => <LockIcon size="sm" color={(importDefault(697) /* metro dependency 697: native */).colors.WHITE} />)((require(6705) /* metro dependency 6705: LockIcon */).LockIcon)}
</View>
);
}
return r0;
}
function PremiumBadge({isNew, style}) { // fn#66838, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8598:1685, offset: 0x01c0bfe6, size: 410 bytes, params: 2, frame: 23
var r0;
var PremiumFeaturesBackground;
var items3;
var Text;
var intl;
isNew = !(isNew === undefined) && isNew;
var value;
const styles = useStyles();
if (isNew) {
PremiumFeaturesBackground = importDefault(7962) /* metro dependency 7962: PremiumFeaturesBackground */;
var defaultImportProps = {premiumType: PremiumTypes.TIER_2, style: [styles.newLockIconBadge, style]};
const NitroWheelIcon = (require(7954) /* metro dependency 7954: NitroWheelIcon */).NitroWheelIcon;
value = <NitroWheelIcon size="xxs" color={(importDefault(697) /* metro dependency 697: native */).colors.WHITE} />;
items3 = [value];
Text = (require(4573) /* metro dependency 4573: Text */).Text;
var textProps = {'variant': 'text-xs/bold', 'color': 'white', style: styles.newLockIconBadgeText};
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
items3[1] = (
<Text {...textProps}>
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.y2b7CA)}
</Text>
);
value = (
<PremiumFeaturesBackground {...defaultImportProps}>
{items3}
</PremiumFeaturesBackground>
);
r0 = value;
} else {
r0 = (
<View style={[styles.lockIconBadge, style]}>
{((NitroWheelIcon) => <NitroWheelIcon size="sm" color={(importDefault(697) /* metro dependency 697: native */).colors.WHITE} />)((require(7954) /* metro dependency 7954: NitroWheelIcon */).NitroWheelIcon)}
</View>
);
}
return r0;
}
function LimitedTimeBadge({style}) { // fn#66839, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8598:2129, offset: 0x01c0c180, size: 173 bytes, params: 2, frame: 20
const styles = useStyles();
const items2 = [styles.limitedTimeBadge, style];
const Text = (TextModule).Text;
const intl = (IndexNativeModule).intl;
return (
<View style={items2}>
<Text
variant="text-xs/bold"
color="black"
style={styles.limitedTimeBadgeText}
>
{intl.string((IndexNativeModule).t['h/uBCR'])}
</Text>
</View>
);
}
return r0;
}
function LimitedTimeBadge({style}) { // fn#66839, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8598:2129, offset: 0x01c0c180, size: 173 bytes, params: 2, frame: 20
const styles = useStyles();
const items2 = [styles.limitedTimeBadge, style];
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
return (
<View style={items2}>
<Text
variant="text-xs/bold"
color="black"
style={styles.limitedTimeBadgeText}
>
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['h/uBCR'])}
</Text>
</View>
);
}
global.__d(_fun66835, 8413, [31, 27, 1880, 33, 4501, 697, 4573, 1244, 7962, 6705, 7954,
2]) /* metro module 8413, dependencies: [31, 27, 1880, 33, 4501, 697, 4573, 1244, 7962, 6705, 7954, 2] */;
@@ -1,67 +1,74 @@
/* Metro module 14057; source: modules/collectibles/native/CollectiblesCoachmarkScrollDismissContext.tsx; dependencies: [31, 482, 33, 2] */
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 JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as ConstantsModule from '../../../external/discord_common/js/shared/Constants.tsx'; /* Metro dependency 482 */
function _fun106599(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#106599, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14254:6, offset: 0x022e2891, size: 196 bytes, params: 8, frame: 18
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const value = importAll(31) /* metro dependency 31 */;
const env0_1 = (require(482) /* metro dependency 482: Constants */).NOOP;
const env0_2 = (require(33) /* metro dependency 33 */).jsx;
const env0_3 = value.createContext({registerDismiss: function() {
const env0_3 = ReactModule.createContext({registerDismiss: function() {
return NOOP;
}, handleDismissCoachmarkOnScroll: undefined});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/CollectiblesCoachmarkScrollDismissContext.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/native/CollectiblesCoachmarkScrollDismissContext.tsx');
exports.useCollectiblesCoachmarkScrollDismissContext = useCollectiblesCoachmarkScrollDismissContext;
exports.CollectiblesCoachmarkScrollDismissProvider = CollectiblesCoachmarkScrollDismissProvider;
}
function useCollectiblesCoachmarkScrollDismissContext() { // fn#106601, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14254:374, offset: 0x01010b37, size: 24 bytes, params: 1, frame: 11
return env0_0.useContext(env0_3);
}
function CollectiblesCoachmarkScrollDismissProvider({children}) { // fn#106602, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14254:499, offset: 0x022e2955, size: 163 bytes, params: 2, frame: 17
const binding = env0_0;
var env0_0 = binding.useRef(null);
const env0_1 = binding.useRef(null);
const value2 = binding.useCallback(_fun106603, []);
const value3 = binding.useCallback(_fun106605, []);
const env0_3 = value3;
const value4 = binding.useMemo(_fun106606, [value2, value3]);
const Provider = env0_3.Provider;
return (
<Provider value={value4}>
{children}
</Provider>
);
}
function _fun106603(a0) { // fn#106603, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14254:620, offset: 0x022e29f8, size: 43 bytes, params: 2, frame: 4
a0.current = a0;
env0_1.current = null;
return _fun106604;
}
function _fun106605(a0) { // fn#106605, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14254:727, offset: 0x022e2a54, size: 137 bytes, params: 2, frame: 15
var contentOffset;
var Math;
const current = env0_0.current;
if (current != null) {
contentOffset = a0.nativeEvent.contentOffset;
if (env0_1.current != null) {
Math = global.Math;
if (Math.abs(contentOffset.x - env0_1.current) >= 16) {
env0_0.current = null;
env0_1.current = null;
current();
function CollectiblesCoachmarkScrollDismissProvider({children}) { // fn#106602, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14254:499, offset: 0x022e2955, size: 163 bytes, params: 2, frame: 17
const binding = env0_0;
var env0_0 = binding.useRef(null);
const env0_1 = binding.useRef(null);
const value2 = binding.useCallback(_fun106603, []);
const value3 = binding.useCallback(_fun106605, []);
const env0_3 = value3;
const value4 = binding.useMemo(_fun106606, [value2, value3]);
const Provider = env0_3.Provider;
return (
<Provider value={value4}>
{children}
</Provider>
);
function _fun106603(a0) { // fn#106603, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14254:620, offset: 0x022e29f8, size: 43 bytes, params: 2, frame: 4
a0.current = a0;
env0_1.current = null;
return _fun106604;
function _fun106604() { // fn#106604, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14254:651, offset: 0x022e2a23, size: 49 bytes, params: 1, frame: 3
if (env1_0.current === env0_0) {
env1_0.current = null;
env1_1.current = null;
}
}
} else {
env0_1.current = contentOffset.x;
}
function _fun106605(a0) { // fn#106605, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14254:727, offset: 0x022e2a54, size: 137 bytes, params: 2, frame: 15
var contentOffset;
var Math;
const current = env0_0.current;
if (current != null) {
contentOffset = a0.nativeEvent.contentOffset;
if (env0_1.current != null) {
Math = global.Math;
if (Math.abs(contentOffset.x - env0_1.current) >= 16) {
env0_0.current = null;
env0_1.current = null;
current();
}
} else {
env0_1.current = contentOffset.x;
}
}
}
function _fun106606() { // fn#106606, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14254:916, offset: 0x022e2add, size: 25 bytes, params: 1, frame: 3
return {registerDismiss: JsxRuntimeModule.jsx, handleDismissCoachmarkOnScroll: env0_3};
}
}
}
function _fun106606() { // fn#106606, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14254:916, offset: 0x022e2add, size: 25 bytes, params: 1, frame: 3
return {registerDismiss: env0_2, handleDismissCoachmarkOnScroll: env0_3};
}
function _fun106604() { // fn#106604, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14254:651, offset: 0x022e2a23, size: 49 bytes, params: 1, frame: 3
if (env1_0.current === env0_0) {
env1_0.current = null;
env1_1.current = null;
}
}
global.__d(_fun106599, 14057, [31, 482, 33, 2]) /* metro module 14057, dependencies: [31, 482, 33, 2] */;
@@ -1,154 +1,199 @@
/* Metro module 8410; source: modules/collectibles/native/CollectiblesEditUserProfileListItems.tsx; dependencies: [31, 27, 1878, 663, 33, 4501, 697, 5278, 4081, 4082, 1305, 8411, 4573, 1244, 6771, 5120, 4080, 8412, 8413, 566, 3802, 8405, 5134, 2] */
import UserStore from '../../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import PremiumUtils from '../../../utils/PremiumUtils.tsx'; /* Metro dependency 3802 */
import ActionSheetActionCreators from '../../action_sheet/native/ActionSheetActionCreators.tsx'; /* Metro dependency 4080 */
import UseAnalyticsLocations from '../../app_analytics/useAnalyticsLocations.tsx'; /* Metro dependency 6771 */
import UseCollectiblesData from '../hooks/useCollectiblesData.tsx'; /* Metro dependency 8405 */
import Module08411 from '../../../by-id/module-08411.js'; /* Metro dependency 8411 */
import Module08412 from '../../../by-id/module-08412.js'; /* Metro dependency 8412 */
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 CollectiblesShopConstantsModule from '../CollectiblesShopConstants.tsx'; /* Metro dependency 663 */
import * as IndexNativeModule from '../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as NativeModule from '../../../design/void/native.tsx'; /* Metro dependency 1305 */
import * as TextModule from '../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as CollectiblesActionCreatorsModule from '../CollectiblesActionCreators.tsx'; /* Metro dependency 5120 */
import * as PressablesModule from '../../../design/void/Pressables/native/Pressables.tsx'; /* Metro dependency 5278 */
import * as CollectiblesBadgesModule from './CollectiblesBadges.tsx'; /* Metro dependency 8413 */
function _fun66825(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#66825, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8595:6, offset: 0x01c0b2e9, size: 478 bytes, params: 8, frame: 23
var object3;
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 userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const env0_6 = (require(663) /* metro dependency 663: CollectiblesShopConstants */).CollectiblesMobileShopScreen;
let value = require(33) /* metro dependency 33 */;
let value = JsxRuntimeModule;
const env0_7 = value.jsx;
const env0_8 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object3 = {};
const object4 = {'borderWidth': 2, 'borderColor': null, 'borderRadius': null, 'backgroundColor': null,
object = {};
const object2 = {'borderWidth': 2, 'borderColor': null, 'borderRadius': null, 'backgroundColor': null,
'alignItems': 'center', 'justifyContent': 'center', 'marginTop': 10};
const BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
object4.borderColor = BORDER_SUBTLE;
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object2.borderColor = BORDER_SUBTLE;
object2.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
const BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
object4.backgroundColor = BACKGROUND_SURFACE_HIGH;
object3.item = object4;
object2.backgroundColor = BACKGROUND_SURFACE_HIGH;
object.item = object2;
const BUTTON_OUTLINE_BRAND_BORDER_ACTIVE = (importDefault(697) /* metro dependency 697: native */).colors.BUTTON_OUTLINE_BRAND_BORDER_ACTIVE;
object3.selected = {borderColor: BUTTON_OUTLINE_BRAND_BORDER_ACTIVE};
object3.optionCell = {'justifyContent': 'center', 'alignItems': 'center'};
object3.optionCellText = {marginTop: 4};
object3.newIcon = {'position': 'absolute', 'top': -12, 'right': 5};
object3.lockIcon = {'position': 'absolute', 'top': -12, 'right': -10};
const env0_9 = Reflect.apply(createStyles, value, [object3]);
const closure = EditCollectibleListItem;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/CollectiblesEditUserProfileListItems.tsx');
exports.EditCollectibleListItem = closure;
object.selected = {borderColor: BUTTON_OUTLINE_BRAND_BORDER_ACTIVE};
object.optionCell = {'justifyContent': 'center', 'alignItems': 'center'};
object.optionCellText = {marginTop: 4};
object.newIcon = {'position': 'absolute', 'top': -12, 'right': 5};
object.lockIcon = {'position': 'absolute', 'top': -12, 'right': -10};
const env0_9 = Reflect.apply(createStyles, value, [object]);
const EditCollectibleListItem2 = EditCollectibleListItem;
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/native/CollectiblesEditUserProfileListItems.tsx');
exports.EditCollectibleListItem = EditCollectibleListItem2;
exports.EditCollectiblesListItemNone = EditCollectiblesListItemNone;
exports.EditCollectiblesListItemShop = EditCollectiblesListItemShop;
exports.EditCollectiblesListItemProduct = EditCollectiblesListItemProduct;
}
function EditCollectibleListItem({size, isSelected, children, style, onPress, onLongPress, accessibilityLabel, accessibilityRole}) { // fn#66826, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8595:705, offset: 0x01c0b4c7, size: 222 bytes, params: 2, frame: 24
accessibilityRole = accessibilityRole === undefined ? 'button' : accessibilityRole;
const styles = useStyles();
const PressableOpacity = (PressablesModule).PressableOpacity;
return (
<PressableOpacity
disabled={isSelected}
onPress={function() {
require(dependencyMap[8]).triggerHapticFeedback(importDefault(dependencyMap[9]).IMPACT_LIGHT);
onPress();
}}
onLongPress={onLongPress}
accessibilityRole={accessibilityRole}
accessibilityLabel={accessibilityLabel}
accessibilityState={{selected: isSelected}}
>
<View style={[styles.item, isSelected ? styles.selected : null, {width: size, height: size}, style]}>
{children}
</View>
</PressableOpacity>
);
}
function EditCollectibleListItem({size, isSelected, children, style, onPress, onLongPress, accessibilityLabel, accessibilityRole}) { // fn#66826, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8595:705, offset: 0x01c0b4c7, size: 222 bytes, params: 2, frame: 24
accessibilityRole = accessibilityRole === undefined ? 'button' : accessibilityRole;
const styles = useStyles();
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
return (
<PressableOpacity
disabled={isSelected}
onPress={function() {
require(dependencyMap[8]).triggerHapticFeedback(importDefault(dependencyMap[9]).IMPACT_LIGHT);
onPress();
}}
onLongPress={onLongPress}
accessibilityRole={accessibilityRole}
accessibilityLabel={accessibilityLabel}
accessibilityState={{selected: isSelected}}
>
<View style={[styles.item, isSelected ? styles.selected : null, {width: size, height: size}, style]}>
{children}
</View>
</PressableOpacity>
);
}
function EditCollectiblesListItemNone(a0) { // fn#66828, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8595:1305, offset: 0x01c0b5ec, size: 287 bytes, params: 2, frame: 24
const styles = useStyles();
const editCollectibleListItemBindingProps = {style: styles.optionCell, ...a0};
const Icon = (NativeModule).Icon;
const iconProps = {source: Module08411};
const IconSizes = (NativeModule).IconSizes;
const LARGE = IconSizes.LARGE;
iconProps.size = LARGE;
const icon = <Icon {...iconProps} />;
const Text = (TextModule).Text;
const asDefault = a0.asDefault;
const intl = (IndexNativeModule).intl;
const string = intl.string;
const t = (IndexNativeModule).t;
return (
<EditCollectibleListItem {...editCollectibleListItemBindingProps}>
{icon}
<Text
variant="text-sm/medium"
color="mobile-text-heading-primary"
style={styles.optionCellText}
>
{asDefault ? Reflect.apply(string, intl, [t.CHf9iJ]) : Reflect.apply(string, intl, [t.PoWNfe])}
</Text>
</EditCollectibleListItem>
);
}
function EditCollectiblesListItemNone(a0) { // fn#66828, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8595:1305, offset: 0x01c0b5ec, size: 287 bytes, params: 2, frame: 24
const styles = useStyles();
const editCollectibleListItemBindingProps = {style: styles.optionCell, ...a0};
const Icon = (require(1305) /* metro dependency 1305: native */).Icon;
const iconProps = {source: importDefault(8411) /* metro dependency 8411 */};
const IconSizes = (require(1305) /* metro dependency 1305: native */).IconSizes;
const LARGE = IconSizes.LARGE;
iconProps.size = LARGE;
const icon = <Icon {...iconProps} />;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const asDefault = a0.asDefault;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
return (
<EditCollectibleListItem {...editCollectibleListItemBindingProps}>
{icon}
function EditCollectiblesListItemShop(a0) { // fn#66829, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8595:1691, offset: 0x01c0b70b, size: 403 bytes, params: 2, frame: 24
const analyticsSource = a0.analyticsSource;
const value = Object.create(null);
value.analyticsSource = 0;
const value2 = copyDataProperties({}, a0, value, undefined);
const styles = useStyles();
const analyticsLocations = (UseAnalyticsLocations)(analyticsSource).analyticsLocations;
const useCallback = ReactModule.useCallback;
const editCollectibleListItemBindingProps = {style: styles.optionCell, isSelected: false,
onPress: Reflect.apply(useCallback, ReactModule, [_fun66830, [analyticsLocations, analyticsSource]]), ...value2};
const Icon = (NativeModule).Icon;
const object2 = {source: Module08412};
const IconSizes = (NativeModule).IconSizes;
const LARGE = IconSizes.LARGE;
object2.size = LARGE;
const items2 = [
<Icon {...object2} />,
];
const Text = (TextModule).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
items2[1] = (
<Text
variant="text-sm/medium"
color="mobile-text-heading-primary"
style={styles.optionCellText}
>
{asDefault ? Reflect.apply(string, intl, [t.CHf9iJ]) : Reflect.apply(string, intl, [t.PoWNfe])}
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.pWG4ze)}
</Text>
</EditCollectibleListItem>
);
}
);
const NewBadge = (CollectiblesBadgesModule).NewBadge;
items2[2] = <NewBadge style={styles.newIcon} />;
return (
<EditCollectibleListItem {...editCollectibleListItemBindingProps}>
{items2}
</EditCollectibleListItem>
);
function _fun66830() { // fn#66830, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8595:1780, offset: 0x01c0b89e, size: 102 bytes, params: 1, frame: 16
const value = environment.__proto__;
const openCollectiblesShopMobile = CollectiblesActionCreatorsModule.openCollectiblesShopMobile;
const FEATURED_PAGE = CollectiblesMobileShopScreen.FEATURED_PAGE;
Reflect.apply(openCollectiblesShopMobile, CollectiblesActionCreatorsModule,
[{analyticsLocations: analyticsLocations, analyticsSource: analyticsSource, screen: FEATURED_PAGE}]);
(ActionSheetActionCreators).hideActionSheet();
}
function EditCollectiblesListItemShop(a0) { // fn#66829, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8595:1691, offset: 0x01c0b70b, size: 403 bytes, params: 2, frame: 24
const analyticsSource = a0.analyticsSource;
const value = Object.create(null);
value.analyticsSource = 0;
const value2 = copyDataProperties({}, a0, value, undefined);
const styles = useStyles();
const analyticsLocations = (importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */)(analyticsSource).analyticsLocations;
const binding = env0_3;
const useCallback = binding.useCallback;
const editCollectibleListItemBindingProps = {style: styles.optionCell, isSelected: false,
onPress: Reflect.apply(useCallback, binding, [_fun66830, [analyticsLocations, analyticsSource]]), ...value2};
const Icon = (require(1305) /* metro dependency 1305: native */).Icon;
const object = {source: importDefault(8412) /* metro dependency 8412 */};
const IconSizes = (require(1305) /* metro dependency 1305: native */).IconSizes;
const LARGE = IconSizes.LARGE;
object.size = LARGE;
const items2 = [<Icon {...object} />];
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
items2[1] = <Text variant="text-sm/medium" color="mobile-text-heading-primary" style={styles.optionCellText}>{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.pWG4ze)}</Text>;
const NewBadge = (require(8413) /* metro dependency 8413: CollectiblesBadges */).NewBadge;
items2[2] = <NewBadge style={styles.newIcon} />;
return (
<EditCollectibleListItem {...editCollectibleListItemBindingProps}>
{items2}
</EditCollectibleListItem>
);
}
}
function EditCollectiblesListItemProduct(a0) { // fn#66831, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8595:2308, offset: 0x01c0b904, size: 444 bytes, params: 2, frame: 27
const isSelected = a0.isSelected;
const isTryItOut = a0.isTryItOut;
const skuId = a0.skuId;
const children = a0.children;
const object2 = {'isSelected': 0, 'isTryItOut': 0, 'skuId': 0, 'children': 0};
const value = null;
silentSetPrototypeOf(object2, value, undefined);
const value2 = copyDataProperties({}, a0, object2, skuId);
const styles = useStyles();
const currentUser = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() {
return UserStore.getCurrentUser();
});
const canUseCollectibles2 = (importDefault(3802) /* metro dependency 3802: PremiumUtils */).canUseCollectibles(currentUser);
const {product, purchase} = (importDefault(8405) /* metro dependency 8405: useCollectiblesData */)(skuId);
const isProductNew2 = (require(5134) /* metro dependency 5134: CollectiblesUtils */).isProductNew(skuId);
const r14 = (require(5134) /* metro dependency 5134: CollectiblesUtils */).isPremiumCollectiblesProduct(product) || (require(5134) /* metro dependency 5134: CollectiblesUtils */).isPremiumCollectiblesPurchase(purchase);
return (
<EditCollectibleListItem isSelected={isSelected} {...value2}>
{children}
{value != purchase || r14 ? r14 ? isTryItOut ? value : value == purchase ? ((PremiumBadge) => <PremiumBadge style={styles.lockIcon} isNew={isProductNew2} />)((require(8413) /* metro dependency 8413: CollectiblesBadges */).PremiumBadge) : canUseCollectibles2 ? value : ((PremiumBadge) => <PremiumBadge style={styles.lockIcon} isNew={isProductNew2} />)((require(8413) /* metro dependency 8413: CollectiblesBadges */).PremiumBadge) : value : ((LockBadge) => <LockBadge style={styles.lockIcon} isNew={isProductNew2} />)((require(8413) /* metro dependency 8413: CollectiblesBadges */).LockBadge)}
</EditCollectibleListItem>
);
}
function EditCollectiblesListItemProduct(a0) { // fn#66831, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8595:2308, offset: 0x01c0b904, size: 444 bytes, params: 2, frame: 27
const isSelected = a0.isSelected;
const isTryItOut = a0.isTryItOut;
const skuId = a0.skuId;
const children = a0.children;
const object = {'isSelected': 0, 'isTryItOut': 0, 'skuId': 0, 'children': 0};
const value = null;
silentSetPrototypeOf(object, value, undefined);
const value2 = copyDataProperties({}, a0, object, skuId);
const styles = useStyles();
const currentUser = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() {
return UserStore.getCurrentUser();
});
const canUseCollectibles2 = (PremiumUtils).canUseCollectibles(currentUser);
const {product, purchase} = (UseCollectiblesData)(skuId);
const isProductNew2 = (require(5134) /* metro dependency 5134: CollectiblesUtils */).isProductNew(skuId);
const r14 = (require(5134) /* metro dependency 5134: CollectiblesUtils */).isPremiumCollectiblesProduct(product) || (require(5134) /* metro dependency 5134: CollectiblesUtils */).isPremiumCollectiblesPurchase(purchase);
return (
<EditCollectibleListItem isSelected={isSelected} {...value2}>
{children}
{
value != purchase || r14
? (
r14
? (
isTryItOut
? value
: (
value == purchase
? ((PremiumBadge) => <PremiumBadge style={styles.lockIcon} isNew={isProductNew2} />)((require(8413) /* metro dependency 8413: CollectiblesBadges */).PremiumBadge)
: (
canUseCollectibles2
? value
: ((PremiumBadge) => <PremiumBadge style={styles.lockIcon} isNew={isProductNew2} />)((require(8413) /* metro dependency 8413: CollectiblesBadges */).PremiumBadge)
)
)
)
: value
)
: ((LockBadge) => <LockBadge style={styles.lockIcon} isNew={isProductNew2} />)((require(8413) /* metro dependency 8413: CollectiblesBadges */).LockBadge)
}
</EditCollectibleListItem>
);
}
function _fun66830() { // fn#66830, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8595:1780, offset: 0x01c0b89e, size: 102 bytes, params: 1, frame: 16
const value = environment.__proto__;
const collectiblesActionCreatorsModule = require(5120) /* metro dependency 5120: CollectiblesActionCreators */;
const openCollectiblesShopMobile = collectiblesActionCreatorsModule.openCollectiblesShopMobile;
const FEATURED_PAGE = CollectiblesMobileShopScreen.FEATURED_PAGE;
Reflect.apply(openCollectiblesShopMobile, collectiblesActionCreatorsModule,
[{analyticsLocations: analyticsLocations, analyticsSource: analyticsSource, screen: FEATURED_PAGE}]);
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
}
global.__d(_fun66825, 8410, [31, 27, 1878, 663, 33, 4501, 697, 5278, 4081, 4082, 1305, 8411, 4573, 1244, 6771, 5120,
4080, 8412, 8413, 566, 3802, 8405, 5134,
2]) /* metro module 8410, dependencies: [31, 27, 1878, 663, 33, 4501, 697, 5278, 4081, 4082, 1305, 8411, 4573, 1244, 6771, 5120, 4080, 8412, 8413, 566, 3802, 8405, 5134, 2] */;
@@ -1,90 +1,97 @@
/* Metro module 10092; source: modules/collectibles/native/CollectiblesItemMiniPreview.tsx; dependencies: [31, 27, 5126, 1902, 5127, 5128, 8504, 8471, 33, 697, 4501, 7596, 10031, 5475, 10032, 8474, 1901, 8483, 2] */
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 NameplateRecordModule from '../records/NameplateRecord.tsx'; /* Metro dependency 1902 */
import * as AvatarDecorationRecordModule from '../records/AvatarDecorationRecord.tsx'; /* Metro dependency 5126 */
import * as ProfileEffectRecordModule from '../records/ProfileEffectRecord.tsx'; /* Metro dependency 5127 */
import * as ProfileFrameRecordModule from '../records/ProfileFrameRecord.tsx'; /* Metro dependency 5128 */
import * as CollectiblesPreviewConstantsModule from './CollectiblesPreviewConstants.tsx'; /* Metro dependency 8471 */
import * as ProfileFrameConstantsModule from '../profile_frames/native/ProfileFrameConstants.tsx'; /* Metro dependency 8504 */
function _fun78842(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#78842, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10278:6, offset: 0x01e375c5, size: 561 bytes, params: 8, frame: 25
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_3 = (require(27) /* metro dependency 27 */).View;
const env0_4 = (require(5126) /* metro dependency 5126: AvatarDecorationRecord */).isAvatarDecorationRecord;
const env0_5 = (require(1902) /* metro dependency 1902: NameplateRecord */).isNameplateRecord;
const env0_6 = (require(5127) /* metro dependency 5127: ProfileEffectRecord */).isProfileEffectRecord;
const env0_7 = (require(5128) /* metro dependency 5128: ProfileFrameRecord */).isProfileFrameRecord;
const env0_8 = (require(8504) /* metro dependency 8504: ProfileFrameConstants */).PROFILE_FRAME_ASPECT_RATIO;
const SAMPLE_PROFILE_ASPECT_RATIO = (require(8471) /* metro dependency 8471: CollectiblesPreviewConstants */).SAMPLE_PROFILE_ASPECT_RATIO;
let value = require(33) /* metro dependency 33 */;
ReactModule;
const SAMPLE_PROFILE_ASPECT_RATIO = (CollectiblesPreviewConstantsModule).SAMPLE_PROFILE_ASPECT_RATIO;
let value = JsxRuntimeModule;
const env0_9 = value.jsx;
const env0_10 = value.jsxs;
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {tile: {'overflow': 'hidden', 'alignItems': 'center', 'justifyContent': 'center'}};
object2.framePreview = {'width': '100%', 'height': '100%', 'paddingVertical': null, 'overflow': 'hidden',
object = {tile: {'overflow': 'hidden', 'alignItems': 'center', 'justifyContent': 'center'}};
object.framePreview = {'width': '100%', 'height': '100%', 'paddingVertical': null, 'overflow': 'hidden',
'alignItems': 'center', 'justifyContent': 'center', paddingVertical: PX_8};
const object4 = {'overflow': 'hidden', 'width': '100%', 'height': '100%'};
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object2.profileEffect = object4;
object2.sampleProfile = {aspectRatio: SAMPLE_PROFILE_ASPECT_RATIO, width: '100%'};
const object6 = {overflow: 'hidden'};
object6.borderTopRightRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
object6.borderBottomRightRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
object2.nameplate = object6;
object2.nameplateTile = {alignItems: 'flex-start'};
object2.nameplateStrip = {'width': '90%', 'aspectRatio': 1.6, 'position': 'relative'};
const env0_12 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/CollectiblesItemMiniPreview.tsx');
const object3 = {'overflow': 'hidden', 'width': '100%', 'height': '100%'};
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object.profileEffect = object3;
object.sampleProfile = {aspectRatio: SAMPLE_PROFILE_ASPECT_RATIO, width: '100%'};
const object5 = {overflow: 'hidden'};
object5.borderTopRightRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
object5.borderBottomRightRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
object.nameplate = object5;
object.nameplateTile = {alignItems: 'flex-start'};
object.nameplateStrip = {'width': '90%', 'aspectRatio': 1.6, 'position': 'relative'};
const env0_12 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/native/CollectiblesItemMiniPreview.tsx');
exports.default = CollectiblesItemMiniPreview;
function CollectiblesItemMiniPreview({item, size}) { // fn#78843, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10278:940, offset: 0x01e377f6, size: 665 bytes, params: 2, frame: 26
var object;
var items2;
var value;
const styles = useStyles();
const items3 = [styles.tile];
items3[1] = {width: size, height: size};
if (isAvatarDecorationRecord(item)) {
return (
<View style={items3}>
{((Component) => <Component item={item} size={0.75 * size} />)(importDefault(7596) /* metro dependency 7596: AvatarDecorationSampleV2 */)}
</View>
);
}
if (isProfileFrameRecord(item)) {
return (
<View style={items3}>
<View style={styles.framePreview}>
{((Component) => <Component profileFrame={item} previewWidth={size * PROFILE_FRAME_ASPECT_RATIO} previewHeight={size - 2 * PX_8} profileBackgroundColor={(importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW} />)(importDefault(10031) /* metro dependency 10031: ProfileFrameSamplePreview */)}
</View>
</View>
);
}
if (isProfileEffectRecord(item)) {
object = {style: items3};
var viewBindingProps = {'style': null, 'accessible': false, 'importantForAccessibility': 'no',
style: styles.profileEffect};
value = importDefault(5475) /* metro dependency 5475: FastImage */;
value = ((Component) => <Component source={{uri: importDefault(10032) /* metro dependency 10032: sample_profile_small2xPng */}} style={styles.sampleProfile} resizeMode="cover" />)(value);
items2 = [value];
value = importDefault(8474) /* metro dependency 8474: ProfileEffect */;
items2[1] = ((Component) => <Component skuId={item.skuId} bannerAdjustment={0} useThumbnail />)(value);
return (
<View {...object}>
<View {...viewBindingProps}>
{items2}
</View>
</View>
);
}
if (isNameplateRecord(item)) {
return (
<View style={[items3, styles.nameplateTile]}>
<View style={styles.nameplateStrip}>
{((Component) => <Component nameplate={(require(1901) /* metro dependency 1901: utils */).getNameplateData(item)} fullOpacity style={styles.nameplate} />)(importDefault(8483) /* metro dependency 8483: Nameplate */)}
</View>
</View>
);
}
return null;
}
}
function CollectiblesItemMiniPreview({item, size}) { // fn#78843, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10278:940, offset: 0x01e377f6, size: 665 bytes, params: 2, frame: 26
var object2;
var items2;
var value;
const styles = useStyles();
const items = [styles.tile];
items[1] = {width: size, height: size};
if (isAvatarDecorationRecord(item)) {
return (
<View style={items}>
{((Component) => <Component item={item} size={0.75 * size} />)(importDefault(7596) /* metro dependency 7596: AvatarDecorationSampleV2 */)}
</View>
);
}
if (isProfileFrameRecord(item)) {
return (
<View style={items}>
<View style={styles.framePreview}>
{((Component) => <Component profileFrame={item} previewWidth={size * PROFILE_FRAME_ASPECT_RATIO} previewHeight={size - 2 * PX_8} profileBackgroundColor={(importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW} />)(importDefault(10031) /* metro dependency 10031: ProfileFrameSamplePreview */)}
</View>
</View>
);
}
if (isProfileEffectRecord(item)) {
object2 = {style: items};
var viewBindingProps = {'style': null, 'accessible': false, 'importantForAccessibility': 'no',
style: styles.profileEffect};
value = importDefault(5475) /* metro dependency 5475: FastImage */;
value = ((Component) => <Component source={{uri: importDefault(10032) /* metro dependency 10032: sample_profile_small2xPng */}} style={styles.sampleProfile} resizeMode="cover" />)(value);
items2 = [value];
value = importDefault(8474) /* metro dependency 8474: ProfileEffect */;
items2[1] = ((Component) => <Component skuId={item.skuId} bannerAdjustment={0} useThumbnail />)(value);
return (
<View {...object2}>
<View {...viewBindingProps}>
{items2}
</View>
</View>
);
}
if (isNameplateRecord(item)) {
return (
<View style={[items, styles.nameplateTile]}>
<View style={styles.nameplateStrip}>
{((Component) => <Component nameplate={(require(1901) /* metro dependency 1901: utils */).getNameplateData(item)} fullOpacity style={styles.nameplate} />)(importDefault(8483) /* metro dependency 8483: Nameplate */)}
</View>
</View>
);
}
return null;
}
global.__d(_fun78842, 10092, [31, 27, 5126, 1902, 5127, 5128, 8504, 8471, 33, 697, 4501, 7596, 10031, 5475, 10032,
8474, 1901, 8483,
2]) /* metro module 10092, dependencies: [31, 27, 5126, 1902, 5127, 5128, 8504, 8471, 33, 697, 4501, 7596, 10031, 5475, 10032, 8474, 1901, 8483, 2] */;
@@ -1,196 +1,249 @@
/* Metro module 15298; source: modules/collectibles/native/CollectiblesMobileAnnouncementActionSheet.tsx; dependencies: [31, 27, 663, 6276, 1376, 33, 4501, 697, 1478, 6277, 1585, 4017, 15299, 4573, 1244, 15300, 5120, 6789, 6275, 15302, 15303, 5473, 4578, 2] */
import UseWindowDimensionsNative from '../../screen/useWindowDimensions.native.tsx'; /* Metro dependency 1478 */
import UseSafeAreaInsetsNative from '../../safe_area/useSafeAreaInsets.native.tsx'; /* Metro dependency 1585 */
import ReanimatedRexport from '../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import AnalyticsLocation from '../../app_analytics/AnalyticsLocation.tsx'; /* Metro dependency 6789 */
import Announcement_sheet_framePng from '../../../external/discord_assets/assets/collectibles/frames/announcement_sheet_frame.png.js'; /* Metro dependency 15299 */
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 CollectiblesShopConstantsModule from '../CollectiblesShopConstants.tsx'; /* Metro dependency 663 */
import * as DismissibleContentConstantsModule from '../../dismissible_content/DismissibleContentConstants.tsx'; /* Metro dependency 1376 */
import * as ReanimatedRexportModule from '../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
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 CollectiblesActionCreatorsModule from '../CollectiblesActionCreators.tsx'; /* Metro dependency 5120 */
import * as NativeModule from '../../../design/assets/native.tsx'; /* Metro dependency 5473 */
import * as BottomSheetNativeModule from '../../../design/components/Sheet/native/BottomSheet.native.tsx'; /* Metro dependency 6275 */
import * as ActionSheetConstantsModule from '../../action_sheet/native/ActionSheetConstants.tsx'; /* Metro dependency 6276 */
import * as Module06277Module from '../../../by-id/module-06277.js'; /* Metro dependency 6277 */
import * as UseProfileFramesMarketingModule from '../hooks/useProfileFramesMarketing.tsx'; /* Metro dependency 15300 */
function _fun116984(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#116984, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15495:6, offset: 0x0249ebb0, size: 609 bytes, params: 8, frame: 24
var object5;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
let value = ReactNativeModule;
const env0_4 = value.Image;
const StyleSheet = value.StyleSheet;
const env0_5 = value.View;
const env0_6 = (require(663) /* metro dependency 663: CollectiblesShopConstants */).CollectiblesMobileShopScreen;
const env0_7 = (require(6276) /* metro dependency 6276: ActionSheetConstants */).ACTION_SHEET_MAX_WIDTH;
const env0_8 = (require(1376) /* metro dependency 1376: DismissibleContentConstants */).ContentDismissActionType;
value = require(33) /* metro dependency 33 */;
const env0_9 = value.jsx;
const env0_10 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object5 = {};
const object6 = {};
copyDataProperties(object6, StyleSheet.absoluteFillObject, undefined);
object6['pointerEvents'] = 'none';
object5.mascotContainer = object6;
const object7 = {};
copyDataProperties(object7, StyleSheet.absoluteFillObject, undefined);
object5.mascotLayer = object7;
object5.mascotImage = {'width': '100%', 'aspectRatio': 1.8324022346368716};
object5.framePreviewImage = {'width': '100%', 'aspectRatio': 2.75, 'resizeMode': 'contain'};
object5.eaFramePreviewImage = {'width': '100%', 'aspectRatio': 3.25, 'resizeMode': 'contain'};
const object8 = {};
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object8.padding = PX_16;
const PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
object8.paddingTop = PX_24;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object8.gap = PX_16;
object5.container = object8;
object5.headerText = {textAlign: 'center'};
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object5.featureRow = {'flexDirection': 'row', 'alignItems': 'center', gap: PX_16};
object5.featureText = {flex: 1};
const PX_32 = (importDefault(697) /* metro dependency 697: native */).space.PX_32;
object5.featureRows = {gap: PX_32};
const env0_11 = Reflect.apply(createStyles, value, [object5]);
object5 = {code: 'function CollectiblesMobileAnnouncementActionSheetTsx1(){const{animatedPosition,safeAreaTop,MASCOT_SAFE_AREA_NUDGE}=this.__closure;return{transform:[{translateY:animatedPosition.get()+safeAreaTop-MASCOT_SAFE_AREA_NUDGE}]};}'};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/CollectiblesMobileAnnouncementActionSheet.tsx');
exports.default = CollectiblesMobileAnnouncementActionSheet;
}
function CatEarsBackdrop() { // fn#116985, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15495:1111, offset: 0x0249ee11, size: 443 bytes, params: 1, frame: 24
const styles = useStyles();
const width = (importDefault(1478) /* metro dependency 1478: useWindowDimensionsNative */)().width;
const moduleValue = require(6277) /* metro dependency 6277 */;
const useBottomSheet = moduleValue.useBottomSheet;
const animatedPosition = Reflect.apply(useBottomSheet, moduleValue, []).animatedPosition;
const top = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)().top;
const Math = global.Math;
const value2 = Math.min(width, ACTION_SHEET_MAX_WIDTH);
const value3 = (width - value2) / 2;
const value4 = value2 / 1200;
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
const closure = function() {
var object2 = {};
object2.translateY = animatedPosition.get() + top - 60;
return {transform: [object2]};
};
closure.__closure = {animatedPosition: animatedPosition, safeAreaTop: top, MASCOT_SAFE_AREA_NUDGE: 60};
closure.__workletHash = 6274760278164;
closure.__initData = env0_12;
const value5 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
const View2 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
const value6 = -(56 * value4);
return (
<View2 style={[styles.mascotContainer, {left: value3, right: value3}, value5]}>
<View style={[styles.mascotLayer, {top: -138 * value4, left: value6, right: value6}]}>
<Image
source={{uri: importDefault(15299) /* metro dependency 15299: announcement_sheet_framePng */}}
style={styles.mascotImage}
accessibilityElementsHidden
importantForAccessibility="no-hide-descendants"
/>
</View>
</View2>
);
}
function FeatureRow({icon, text}) { // fn#116987, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15495:1746, offset: 0x0249f002, size: 133 bytes, params: 2, frame: 20
const styles = useStyles();
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<View style={styles.featureRow}>
{icon}
<Text
variant="text-sm/medium"
color="text-subtle"
style={styles.featureText}
>
{text}
</Text>
</View>
);
}
function CollectiblesMobileAnnouncementActionSheet({markAsDismissed}) { // fn#116988, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15495:2052, offset: 0x0249f087, size: 1080 bytes, params: 2, frame: 36
const styles = useStyles();
const value2 = (require(15300) /* metro dependency 15300: useProfileFramesMarketing */).useProfileFramesMarketing('CollectiblesMobileAnnouncementActionSheet');
let showEaPremiumMarketing = value2.showEaPremiumMarketing;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const r22 = showEaPremiumMarketing ? Reflect.apply(string, intl, [t['7cmcJI']]) : Reflect.apply(string, intl,
[t.MkVbBY]);
const showGiftingMarketing = value2.showGiftingMarketing;
showEaPremiumMarketing = value2.showEaPremiumMarketing;
const showEaNonPremiumMarketing = value2.showEaNonPremiumMarketing;
string = intl.string;
const r20 = showGiftingMarketing ? Reflect.apply(string, intl,
[t['/4bQuG']]) : showEaPremiumMarketing ? Reflect.apply(string, intl,
[t['5UI+bw']]) : showEaNonPremiumMarketing ? Reflect.apply(string, intl, [t['4a7pVU']]) : Reflect.apply(string,
intl, [t['+9vaAT']]);
const binding = env0_3;
const env0_1 = binding.useRef(false);
const env0_2 = binding.useRef(markAsDismissed);
binding.useEffect(_fun116989, [markAsDismissed]);
binding.useEffect(function() {
return _fun116991;
}, []);
const value9 = binding.useCallback(_fun116992, [markAsDismissed]);
const value10 = binding.useCallback(_fun116993, [markAsDismissed]);
const value11 = binding.useMemo(_fun116994, []);
const BottomSheet = (require(6275) /* metro dependency 6275: BottomSheetNative */).BottomSheet;
const object = {};
object.uri = value2.isEarlyAccess ? importDefault(15302) /* metro dependency 15302: announcement_key_1Png */ : importDefault(15303) /* metro dependency 15303: mobile_announcementPng */;
const items3 = [<Image source={object} style={value2.isEarlyAccess ? styles.eaFramePreviewImage : styles.framePreviewImage} accessibilityElementsHidden importantForAccessibility="no-hide-descendants" />];
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
items3[1] = <Text variant="heading-xl/bold" color="text-strong" accessibilityRole="header" style={styles.headerText}>{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.vRCvqo)}</Text>;
const PaintIllocon = (require(5473) /* metro dependency 5473: native */).PaintIllocon;
const items2 = [<FeatureRow icon={<PaintIllocon size={32} />} text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['6ZWB0C'])} />];
const HeartIllocon = (require(5473) /* metro dependency 5473: native */).HeartIllocon;
items2[1] = <FeatureRow icon={<HeartIllocon size={32} />} text={r22} />;
const ShopIllocon = (require(5473) /* metro dependency 5473: native */).ShopIllocon;
items2[2] = <FeatureRow icon={<ShopIllocon size={32} />} text={r20} />;
items3[2] = <View style={styles.featureRows}>{items2}</View>;
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
string = intl.string;
const S9hXPI = (require(1244) /* metro dependency 1244: indexNative */).t.S9hXPI;
items3[3] = <Button size="lg" text={Reflect.apply(string, intl, [S9hXPI])} onPress={value9} />;
return (
<BottomSheet onDismiss={value10} backdropChildren={value11}>
<View style={styles.container}>
{items3}
</View>
</BottomSheet>
);
}
function _fun116990() { // fn#116990, offset: 0x0249f4bf, size: 11 bytes, params: 1, frame: 1
return _fun116991;
}
function _fun116992() { // fn#116992, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15495:2816, offset: 0x0249f4f8, size: 125 bytes, params: 1, frame: 15
env0_1.current = true;
const markAsDismissedBinding = markAsDismissed;
const PRIMARY = ContentDismissActionType.PRIMARY;
markAsDismissedBinding(PRIMARY);
const collectiblesActionCreatorsModule = require(5120) /* metro dependency 5120: CollectiblesActionCreators */;
const openCollectiblesShopMobile = collectiblesActionCreatorsModule.openCollectiblesShopMobile;
object = {};
const object2 = {};
const FEATURED_PAGE = CollectiblesMobileShopScreen.FEATURED_PAGE;
object2.screen = FEATURED_PAGE;
object2.analyticsLocations = [];
const ACTION_SHEET = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).ACTION_SHEET;
object2.analyticsSource = ACTION_SHEET;
Reflect.apply(openCollectiblesShopMobile, collectiblesActionCreatorsModule, [object2]);
}
function _fun116993() { // fn#116993, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15495:2993, offset: 0x0249f575, size: 41 bytes, params: 1, frame: 11
env0_1.current = true;
const markAsDismissedBinding = markAsDismissed;
const USER_DISMISS = ContentDismissActionType.USER_DISMISS;
markAsDismissedBinding(USER_DISMISS);
}
function _fun116991() { // fn#116991, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15495:2747, offset: 0x0249f4ca, size: 46 bytes, params: 1, frame: 11
var binding;
let current = env1_1.current;
if (!current) {
binding = env1_2;
current = binding.current;
value = environment.__proto__.__proto__;
Reflect.apply(current, binding, [ContentDismissActionType.AUTO_DISMISS]);
copyDataProperties(object2, StyleSheet.absoluteFillObject, undefined);
object2['pointerEvents'] = 'none';
object.mascotContainer = object2;
const object3 = {};
copyDataProperties(object3, StyleSheet.absoluteFillObject, undefined);
object.mascotLayer = object3;
object.mascotImage = {'width': '100%', 'aspectRatio': 1.8324022346368716};
object.framePreviewImage = {'width': '100%', 'aspectRatio': 2.75, 'resizeMode': 'contain'};
object.eaFramePreviewImage = {'width': '100%', 'aspectRatio': 3.25, 'resizeMode': 'contain'};
const object4 = {};
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object4.padding = PX_16;
const PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
object4.paddingTop = PX_24;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object4.gap = PX_16;
object.container = object4;
object.headerText = {textAlign: 'center'};
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object.featureRow = {'flexDirection': 'row', 'alignItems': 'center', gap: PX_16};
object.featureText = {flex: 1};
const PX_32 = (importDefault(697) /* metro dependency 697: native */).space.PX_32;
object.featureRows = {gap: PX_32};
const env0_11 = Reflect.apply(createStyles, value, [object]);
object = {code: 'function CollectiblesMobileAnnouncementActionSheetTsx1(){const{animatedPosition,safeAreaTop,MASCOT_SAFE_AREA_NUDGE}=this.__closure;return{transform:[{translateY:animatedPosition.get()+safeAreaTop-MASCOT_SAFE_AREA_NUDGE}]};}'};
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/native/CollectiblesMobileAnnouncementActionSheet.tsx');
exports.default = CollectiblesMobileAnnouncementActionSheet;
function CatEarsBackdrop() { // fn#116985, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15495:1111, offset: 0x0249ee11, size: 443 bytes, params: 1, frame: 24
const styles = useStyles();
const width = (UseWindowDimensionsNative)().width;
const useBottomSheet = Module06277Module.useBottomSheet;
const animatedPosition = Reflect.apply(useBottomSheet, Module06277Module, []).animatedPosition;
const top = (UseSafeAreaInsetsNative)().top;
const Math = global.Math;
const value2 = Math.min(width, ACTION_SHEET_MAX_WIDTH);
const value3 = (width - value2) / 2;
const value4 = value2 / 1200;
const useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle;
const closure = function() {
var object2 = {};
object2.translateY = animatedPosition.get() + top - 60;
return {transform: [object2]};
};
closure.__closure = {animatedPosition: animatedPosition, safeAreaTop: top, MASCOT_SAFE_AREA_NUDGE: 60};
closure.__workletHash = 6274760278164;
closure.__initData = env0_12;
const value5 = Reflect.apply(useAnimatedStyle, ReanimatedRexportModule, [closure]);
const View2 = (ReanimatedRexport).View;
const value6 = -(56 * value4);
return (
<View2 style={[styles.mascotContainer, {left: value3, right: value3}, value5]}>
<View style={[styles.mascotLayer, {top: -138 * value4, left: value6, right: value6}]}>
<Image
source={{uri: Announcement_sheet_framePng}}
style={styles.mascotImage}
accessibilityElementsHidden
importantForAccessibility="no-hide-descendants"
/>
</View>
</View2>
);
}
function FeatureRow({icon, text}) { // fn#116987, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15495:1746, offset: 0x0249f002, size: 133 bytes, params: 2, frame: 20
const styles = useStyles();
const Text = (TextModule).Text;
return (
<View style={styles.featureRow}>
{icon}
<Text
variant="text-sm/medium"
color="text-subtle"
style={styles.featureText}
>
{text}
</Text>
</View>
);
}
function CollectiblesMobileAnnouncementActionSheet({markAsDismissed}) { // fn#116988, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15495:2052, offset: 0x0249f087, size: 1080 bytes, params: 2, frame: 36
const styles = useStyles();
const value2 = (UseProfileFramesMarketingModule).useProfileFramesMarketing('CollectiblesMobileAnnouncementActionSheet');
let showEaPremiumMarketing = value2.showEaPremiumMarketing;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const r22 = showEaPremiumMarketing ? Reflect.apply(string, intl, [t['7cmcJI']]) : Reflect.apply(string, intl,
[t.MkVbBY]);
const showGiftingMarketing = value2.showGiftingMarketing;
showEaPremiumMarketing = value2.showEaPremiumMarketing;
const showEaNonPremiumMarketing = value2.showEaNonPremiumMarketing;
string = intl.string;
const r20 = showGiftingMarketing ? Reflect.apply(string, intl,
[t['/4bQuG']]) : showEaPremiumMarketing ? Reflect.apply(string, intl,
[t['5UI+bw']]) : showEaNonPremiumMarketing ? Reflect.apply(string, intl, [t['4a7pVU']]) : Reflect.apply(string,
intl, [t['+9vaAT']]);
const env0_1 = ReactModule.useRef(false);
const env0_2 = ReactModule.useRef(markAsDismissed);
ReactModule.useEffect(_fun116989, [markAsDismissed]);
ReactModule.useEffect(function() {
return _fun116991;
}, []);
const value9 = ReactModule.useCallback(_fun116992, [markAsDismissed]);
const value10 = ReactModule.useCallback(_fun116993, [markAsDismissed]);
const value11 = ReactModule.useMemo(_fun116994, []);
const BottomSheet = (BottomSheetNativeModule).BottomSheet;
const object2 = {};
object2.uri = value2.isEarlyAccess ? importDefault(15302) /* metro dependency 15302: announcement_key_1Png */ : importDefault(15303) /* metro dependency 15303: mobile_announcementPng */;
const items3 = [
<Image
source={object2}
style={value2.isEarlyAccess ? styles.eaFramePreviewImage : styles.framePreviewImage}
accessibilityElementsHidden
importantForAccessibility="no-hide-descendants"
/>,
];
const Text = (TextModule).Text;
items3[1] = (
<Text
variant="heading-xl/bold"
color="text-strong"
accessibilityRole="header"
style={styles.headerText}
>
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.vRCvqo)}
</Text>
);
const PaintIllocon = (NativeModule).PaintIllocon;
const items2 = [
<FeatureRow
icon={<PaintIllocon size={32} />}
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['6ZWB0C'])}
/>,
];
const HeartIllocon = (NativeModule).HeartIllocon;
items2[1] = <FeatureRow icon={<HeartIllocon size={32} />} text={r22} />;
const ShopIllocon = (NativeModule).ShopIllocon;
items2[2] = <FeatureRow icon={<ShopIllocon size={32} />} text={r20} />;
items3[2] = (
<View style={styles.featureRows}>
{items2}
</View>
);
const Button = (ButtonNativeModule).Button;
string = intl.string;
const S9hXPI = (require(1244) /* metro dependency 1244: indexNative */).t.S9hXPI;
items3[3] = (
<Button
size="lg"
text={Reflect.apply(string, intl, [S9hXPI])}
onPress={value9}
/>
);
return (
<BottomSheet onDismiss={value10} backdropChildren={value11}>
<View style={styles.container}>
{items3}
</View>
</BottomSheet>
);
function _fun116989() { // fn#116989, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15495:2706, offset: 0x010cb3d0, size: 21 bytes, params: 1, frame: 2
env0_2.current = markAsDismissed;
}
function _fun116990() { // fn#116990, offset: 0x0249f4bf, size: 11 bytes, params: 1, frame: 1
return _fun116991;
function _fun116991() { // fn#116991, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15495:2747, offset: 0x0249f4ca, size: 46 bytes, params: 1, frame: 11
var binding;
let current = env1_1.current;
if (!current) {
binding = env1_2;
current = binding.current;
value = environment.__proto__.__proto__;
Reflect.apply(current, binding, [ContentDismissActionType.AUTO_DISMISS]);
}
}
}
function _fun116992() { // fn#116992, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15495:2816, offset: 0x0249f4f8, size: 125 bytes, params: 1, frame: 15
env0_1.current = true;
const markAsDismissedBinding = markAsDismissed;
const PRIMARY = ContentDismissActionType.PRIMARY;
markAsDismissedBinding(PRIMARY);
const openCollectiblesShopMobile = CollectiblesActionCreatorsModule.openCollectiblesShopMobile;
const object = {};
const FEATURED_PAGE = CollectiblesMobileShopScreen.FEATURED_PAGE;
object.screen = FEATURED_PAGE;
object.analyticsLocations = [];
const ACTION_SHEET = (AnalyticsLocation).ACTION_SHEET;
object.analyticsSource = ACTION_SHEET;
Reflect.apply(openCollectiblesShopMobile, CollectiblesActionCreatorsModule, [object]);
}
function _fun116993() { // fn#116993, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15495:2993, offset: 0x0249f575, size: 41 bytes, params: 1, frame: 11
env0_1.current = true;
const markAsDismissedBinding = markAsDismissed;
const USER_DISMISS = ContentDismissActionType.USER_DISMISS;
markAsDismissedBinding(USER_DISMISS);
}
function _fun116994() { // fn#116994, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15495:3049, offset: 0x01d70d8a, size: 23 bytes, params: 1, frame: 13
return <CatEarsBackdrop />;
}
}
}
global.__d(_fun116984, 15298, [31, 27, 663, 6276, 1376, 33, 4501, 697, 1478, 6277, 1585, 4017, 15299, 4573, 1244,
15300, 5120, 6789, 6275, 15302, 15303, 5473, 4578,
2]) /* metro module 15298, dependencies: [31, 27, 663, 6276, 1376, 33, 4501, 697, 1478, 6277, 1585, 4017, 15299, 4573, 1244, 15300, 5120, 6789, 6275, 15302, 15303, 5473, 4578, 2] */;
@@ -1,8 +1,10 @@
/* Metro module 8471; source: modules/collectibles/native/CollectiblesPreviewConstants.tsx; dependencies: [2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun67268(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#67268, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8656:6, offset: 0x01c1c588, size: 134 bytes, params: 8, frame: 15
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/CollectiblesPreviewConstants.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/native/CollectiblesPreviewConstants.tsx');
exports.SAMPLE_PROFILE_ASPECT_RATIO = 0.5113636363636364;
exports.BUNDLE_PREVIEW_CONFIG = {small: {'bundleWidth': 140, 'bundleHeight': 280, 'pfxWidth': 80, 'pfxHeight': 120,
'pfxTop': 70, 'pfxLeft': 16, 'avatarTop': 130, 'avatarRight': 40, 'avatarWithNameplateTop': 110,
@@ -13,3 +15,4 @@ function _fun67268(global, require, importDefault, importAll, module, exports, d
'nameplatePreviewWidth': 130, 'avatarDecorationSize': 140, 'avatarDecorationSizeTriple': 140}};
}
global.__d(_fun67268, 8471, [2]) /* metro module 8471, dependencies: [2] */;
@@ -1,50 +1,55 @@
/* Metro module 14084; source: modules/collectibles/native/CollectiblesProgressiveImage.tsx; dependencies: [31, 27, 33, 4017, 4504, 2] */
import ReanimatedRexport from '../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
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 ReanimatedRexportModule from '../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
function _fun106716(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#106716, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14281:6, offset: 0x022e8012, size: 169 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const value = require(27) /* metro dependency 27 */;
const env0_3 = value.View;
const env0_4 = value.StyleSheet;
const env0_5 = (require(33) /* metro dependency 33 */).jsx;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/CollectiblesProgressiveImage.tsx');
ReactModule;
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/native/CollectiblesProgressiveImage.tsx');
exports.CollectiblesProgressiveImage = CollectiblesProgressiveImage;
function CollectiblesProgressiveImage(a0) { // fn#106717, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14281:277, offset: 0x022e80bb, size: 204 bytes, params: 2, frame: 22
const source = a0.source;
const style = a0.style;
const value = Object.create(null);
value.source = 0;
value.style = 0;
const value2 = copyDataProperties({}, a0, value, undefined);
const value4 = (ReanimatedRexportModule).useSharedValue(0);
const Image = (ReanimatedRexport).Image;
const imageProps = {...value2};
imageProps['source'] = source;
const object2 = {};
copyDataProperties(object2, StyleSheet.absoluteFillObject, value);
object2['opacity'] = value4;
imageProps['style'] = object2;
imageProps['onLoad'] = CollectiblesProgressiveImageOnLoad;
return (
<View style={style}>
<Image {...imageProps} />
</View>
);
function CollectiblesProgressiveImageOnLoad() { // fn#106718, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14281:481, owner: CollectiblesProgressiveImage.onLoad, offset: 0x022e8187, size: 125 bytes, params: 1, frame: 20
const binding = env0_0;
const set = binding.set;
let value = environment.__proto__;
value = require(4504) /* metro dependency 4504: timing */;
const withTiming = value.withTiming;
const Easing = (ReanimatedRexportModule).Easing;
const inOut = Easing.inOut;
const Easing2 = (ReanimatedRexportModule).Easing;
Reflect.apply(set, binding, [Reflect.apply(withTiming, value, [1, {duration: 500, easing: Reflect.apply(inOut,
Easing, [Easing2.ease])}])]);
}
}
}
function CollectiblesProgressiveImage(a0) { // fn#106717, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14281:277, offset: 0x022e80bb, size: 204 bytes, params: 2, frame: 22
const source = a0.source;
const style = a0.style;
const value = Object.create(null);
value.source = 0;
value.style = 0;
const value2 = copyDataProperties({}, a0, value, undefined);
const value4 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(0);
const Image = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).Image;
const imageProps = {...value2};
imageProps['source'] = source;
const object = {};
copyDataProperties(object, StyleSheet.absoluteFillObject, value);
object['opacity'] = value4;
imageProps['style'] = object;
imageProps['onLoad'] = CollectiblesProgressiveImageOnLoad;
return (
<View style={style}>
<Image {...imageProps} />
</View>
);
}
function CollectiblesProgressiveImageOnLoad() { // fn#106718, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14281:481, owner: CollectiblesProgressiveImage.onLoad, offset: 0x022e8187, size: 125 bytes, params: 1, frame: 20
const binding = env0_0;
const set = binding.set;
let value = environment.__proto__;
value = require(4504) /* metro dependency 4504: timing */;
const withTiming = value.withTiming;
const Easing = (require(4017) /* metro dependency 4017: ReanimatedRexport */).Easing;
const inOut = Easing.inOut;
const Easing2 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).Easing;
Reflect.apply(set, binding, [Reflect.apply(withTiming, value, [1, {duration: 500, easing: Reflect.apply(inOut,
Easing, [Easing2.ease])}])]);
}
global.__d(_fun106716, 14084, [31, 27, 33, 4017, 4504,
2]) /* metro module 14084, dependencies: [31, 27, 33, 4017, 4504, 2] */;
@@ -1,179 +1,186 @@
/* Metro module 10062; source: modules/collectibles/native/CollectiblesShopCardAssetTileV2.tsx; dependencies: [57, 31, 27, 663, 33, 10020, 697, 4501, 9294, 6705, 5133, 1904, 7609, 10030, 8470, 5475, 10063, 10064, 7596, 8472, 10031, 10050, 4000, 3860, 10021, 2] */
import Module00057 from '../../../by-id/module-00057.js'; /* Metro dependency 57 */
import Native from '../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
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 CollectiblesShopConstantsModule from '../CollectiblesShopConstants.tsx'; /* Metro dependency 663 */
import * as CollectiblesItemTypeModule from '../../../external/discord_common/js/shared/shared-constants/CollectiblesItemType.tsx'; /* Metro dependency 1904 */
import * as UseTokenModule from '../../../design/tokens/native/useToken.tsx'; /* Metro dependency 3860 */
import * as ColorUtilsModule from '../../../utils/ColorUtils.tsx'; /* Metro dependency 4000 */
import * as CreateStylesModule from '../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as CollectiblesProductUtilsModule from '../utils/CollectiblesProductUtils.tsx'; /* Metro dependency 5133 */
import * as LockIconModule from '../../../design/components/Icon/native/redesign/generated/LockIcon.tsx'; /* Metro dependency 6705 */
import * as UseShopProductItemsModule from '../hooks/useShopProductItems.tsx'; /* Metro dependency 7609 */
import * as CheckmarkLargeBoldIconModule from '../../../design/components/Icon/native/redesign/generated/CheckmarkLargeBoldIcon.tsx'; /* Metro dependency 9294 */
import * as CollectiblesShopCardV2Module from './CollectiblesShopCardV2.tsx'; /* Metro dependency 10020 */
function _fun78656(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#78656, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10248:6, offset: 0x01e2fc7b, size: 625 bytes, params: 8, frame: 27
var object4;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
let value = importAll(31) /* metro dependency 31 */;
const value2 = require(27) /* metro dependency 27 */;
const StyleSheet = value2.StyleSheet;
const env0_4 = value2.View;
const env0_5 = (require(663) /* metro dependency 663: CollectiblesShopConstants */).EXTERNAL_PRODUCT_SKU_IDS;
const value3 = require(33) /* metro dependency 33 */;
const env0_6 = value3.jsx;
const env0_7 = value3.jsxs;
const COLLECTIBLES_SHOP_CARD_HEIGHT = (require(10020) /* metro dependency 10020: CollectiblesShopCardV2 */).COLLECTIBLES_SHOP_CARD_HEIGHT;
let value = ReactModule;
const StyleSheet = ReactNativeModule.StyleSheet;
const COLLECTIBLES_SHOP_CARD_HEIGHT = (CollectiblesShopCardV2Module).COLLECTIBLES_SHOP_CARD_HEIGHT;
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
const value4 = COLLECTIBLES_SHOP_CARD_HEIGHT - 2 * PX_16;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
object4 = {};
const object5 = {'display': 'flex', 'justifyContent': 'center', 'alignItems': 'center', 'overflow': 'hidden',
const createStyles = CreateStylesModule.createStyles;
object = {};
const object2 = {'display': 'flex', 'justifyContent': 'center', 'alignItems': 'center', 'overflow': 'hidden',
'height': '100%', 'width': '100%'};
object5.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object4.assetContainer = object5;
const object6 = {};
copyDataProperties(object6, StyleSheet.absoluteFillObject, undefined);
object6['justifyContent'] = 'center';
object6['alignItems'] = 'center';
object6['width'] = '100%';
object6['height'] = '75%';
object4.overlayContainer = object6;
object2.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object.assetContainer = object2;
const object3 = {};
copyDataProperties(object3, StyleSheet.absoluteFillObject, undefined);
object3['justifyContent'] = 'center';
object3['alignItems'] = 'center';
object3['width'] = '100%';
object3['height'] = '75%';
object.overlayContainer = object3;
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object4.profileEffectContainer = {'width': '100%', 'height': '100%', backgroundColor: BACKGROUND_BASE_LOW};
object4.profileFrameContainer = {'width': '100%', 'height': null, 'alignItems': 'center', height: value4};
object4.externalProductImage = {'width': 80, 'height': 80, 'resizeMode': 'contain'};
object4.purchasedOrDisabled = {opacity: 0.4};
object.profileEffectContainer = {'width': '100%', 'height': '100%', backgroundColor: BACKGROUND_BASE_LOW};
object.profileFrameContainer = {'width': '100%', 'height': null, 'alignItems': 'center', height: value4};
object.externalProductImage = {'width': 80, 'height': 80, 'resizeMode': 'contain'};
object.purchasedOrDisabled = {opacity: 0.4};
const ICON_STRONG = (importDefault(697) /* metro dependency 697: native */).colors.ICON_STRONG;
object4.overlayIcon = {'position': 'absolute', 'opacity': 1, 'color': null, 'fontWeight': 'bold',
color: ICON_STRONG};
const env0_9 = Reflect.apply(createStyles, createStylesModule, [object4]);
object.overlayIcon = {'position': 'absolute', 'opacity': 1, 'color': null, 'fontWeight': 'bold', color: ICON_STRONG};
const env0_9 = Reflect.apply(createStyles, CreateStylesModule, [object]);
value = value.memo(_fun78662);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/CollectiblesShopCardAssetTileV2.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/native/CollectiblesShopCardAssetTileV2.tsx');
exports.default = value;
}
function PurchasedAssetOverlay() { // fn#78657, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10248:946, offset: 0x01e2feec, size: 97 bytes, params: 1, frame: 17
const styles = useStyles();
const CheckmarkLargeBoldIcon = (CheckmarkLargeBoldIconModule).CheckmarkLargeBoldIcon;
return (
<View style={styles.overlayContainer}>
<CheckmarkLargeBoldIcon size="lg" style={styles.overlayIcon} />
</View>
);
}
function PurchasedAssetOverlay() { // fn#78657, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10248:946, offset: 0x01e2feec, size: 97 bytes, params: 1, frame: 17
const styles = useStyles();
const CheckmarkLargeBoldIcon = (require(9294) /* metro dependency 9294: CheckmarkLargeBoldIcon */).CheckmarkLargeBoldIcon;
return (
<View style={styles.overlayContainer}>
<CheckmarkLargeBoldIcon size="lg" style={styles.overlayIcon} />
</View>
);
}
function DisabledAssetOverlay() { // fn#78658, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10248:1097, offset: 0x01e2ff4d, size: 97 bytes, params: 1, frame: 17
const styles = useStyles();
const LockIcon = (LockIconModule).LockIcon;
return (
<View style={styles.overlayContainer}>
<LockIcon size="lg" style={styles.overlayIcon} />
</View>
);
}
function DisabledAssetOverlay() { // fn#78658, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10248:1097, offset: 0x01e2ff4d, size: 97 bytes, params: 1, frame: 17
const styles = useStyles();
const LockIcon = (require(6705) /* metro dependency 6705: LockIcon */).LockIcon;
return (
<View style={styles.overlayContainer}>
<LockIcon size="lg" style={styles.overlayIcon} />
</View>
);
}
function ProductPreview({product, isPurchased, isDisabled, disableBundleStaticBackground, muteBundleStaticBackground}) { // fn#78659, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10248:1228, offset: 0x01e2ffae, size: 298 bytes, params: 2, frame: 23
const styles = useStyles();
const productType = (CollectiblesProductUtilsModule).getProductType(product);
const CollectiblesItemType = (require(1904) /* metro dependency 1904: CollectiblesItemType */).CollectiblesItemType;
const PROFILE_EFFECT = CollectiblesItemType.PROFILE_EFFECT;
return (
<View
style={[styles.overlayContainer, (isPurchased || isDisabled) && styles.purchasedOrDisabled,
{height: productType === PROFILE_EFFECT || productType === (require(1904) /* metro dependency 1904: CollectiblesItemType */).CollectiblesItemType.PROFILE_FRAME ? '100%' : product.type !== (require(1904) /* metro dependency 1904: CollectiblesItemType */).CollectiblesItemType.BUNDLE ? '75%' : '100%'}]}
renderToHardwareTextureAndroid
needsOffscreenAlphaCompositing
>
<ProductPreviewInner
product={product}
disableBundleStaticBackground={disableBundleStaticBackground}
muteBundleStaticBackground={muteBundleStaticBackground}
/>
</View>
);
}
function ProductPreview({product, isPurchased, isDisabled, disableBundleStaticBackground, muteBundleStaticBackground}) { // fn#78659, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10248:1228, offset: 0x01e2ffae, size: 298 bytes, params: 2, frame: 23
const styles = useStyles();
const productType = (require(5133) /* metro dependency 5133: CollectiblesProductUtils */).getProductType(product);
const CollectiblesItemType = (require(1904) /* metro dependency 1904: CollectiblesItemType */).CollectiblesItemType;
const PROFILE_EFFECT = CollectiblesItemType.PROFILE_EFFECT;
return (
<View
style={[styles.overlayContainer, (isPurchased || isDisabled) && styles.purchasedOrDisabled,
{height: productType === PROFILE_EFFECT || productType === (require(1904) /* metro dependency 1904: CollectiblesItemType */).CollectiblesItemType.PROFILE_FRAME ? '100%' : product.type !== (require(1904) /* metro dependency 1904: CollectiblesItemType */).CollectiblesItemType.BUNDLE ? '75%' : '100%'}]}
renderToHardwareTextureAndroid
needsOffscreenAlphaCompositing
>
<ProductPreviewInner
product={product}
disableBundleStaticBackground={disableBundleStaticBackground}
muteBundleStaticBackground={muteBundleStaticBackground}
/>
</View>
);
}
function ProductPreviewInner({product, disableBundleStaticBackground, muteBundleStaticBackground}) { // fn#78660, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10248:1807, offset: 0x01e300d8, size: 895 bytes, params: 2, frame: 29
const styles = useStyles();
const {firstProfileEffect, firstAvatarDecoration,
firstNameplate} = (require(7609) /* metro dependency 7609: useShopProductItems */).useShopProductItems(product);
let type = product.type;
const CollectiblesItemType = (require(1904) /* metro dependency 1904: CollectiblesItemType */).CollectiblesItemType;
const BUNDLE = CollectiblesItemType.BUNDLE;
if (type === BUNDLE) {
var moduleValue2 = require(10030) /* metro dependency 10030: bundleUtils */;
if (moduleValue2.isValidCollectiblesBundle(product)) {
return ((Component) => <Component deco={firstAvatarDecoration} pfx={firstProfileEffect} nameplate={firstNameplate} size="small" previewAssets={product.previewAssets} disableStaticBackground={disableBundleStaticBackground} mutedStaticBackground={muteBundleStaticBackground} />)(importDefault(8470) /* metro dependency 8470: BundleSampleV2 */);
function ProductPreviewInner({product, disableBundleStaticBackground, muteBundleStaticBackground}) { // fn#78660, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10248:1807, offset: 0x01e300d8, size: 895 bytes, params: 2, frame: 29
const styles = useStyles();
const {firstProfileEffect, firstAvatarDecoration,
firstNameplate} = (UseShopProductItemsModule).useShopProductItems(product);
let type = product.type;
const CollectiblesItemType = (CollectiblesItemTypeModule).CollectiblesItemType;
const BUNDLE = CollectiblesItemType.BUNDLE;
if (type === BUNDLE) {
var moduleValue2 = require(10030) /* metro dependency 10030: bundleUtils */;
if (moduleValue2.isValidCollectiblesBundle(product)) {
return ((Component) => <Component deco={firstAvatarDecoration} pfx={firstProfileEffect} nameplate={firstNameplate} size="small" previewAssets={product.previewAssets} disableStaticBackground={disableBundleStaticBackground} mutedStaticBackground={muteBundleStaticBackground} />)(importDefault(8470) /* metro dependency 8470: BundleSampleV2 */);
}
}
let skuId = product.skuId;
const ORB_PROFILE_BADGE = EXTERNAL_PRODUCT_SKU_IDS.ORB_PROFILE_BADGE;
if (skuId === ORB_PROFILE_BADGE) {
return ((Component) => <Component source={{uri: importDefault(10063) /* metro dependency 10063: orb_profile_badge_icon2xPng */}} style={styles.externalProductImage} />)(importDefault(5475) /* metro dependency 5475: FastImage */);
}
skuId = product.skuId;
const FRACTIONAL_PREMIUM = EXTERNAL_PRODUCT_SKU_IDS.FRACTIONAL_PREMIUM;
if (skuId === FRACTIONAL_PREMIUM) {
return ((Component) => <Component source={{uri: importDefault(10064) /* metro dependency 10064: mobile_fraction_nitro_2xPng */}} style={styles.externalProductImage} />)(importDefault(5475) /* metro dependency 5475: FastImage */);
}
const property = Module00057(product.items, 1)[0];
type = property?.type;
const AVATAR_DECORATION = CollectiblesItemType.AVATAR_DECORATION;
if (AVATAR_DECORATION === type) {
return ((Component) => <Component item={property} size={100} />)(importDefault(7596) /* metro dependency 7596: AvatarDecorationSampleV2 */);
}
const PROFILE_EFFECT = CollectiblesItemType.PROFILE_EFFECT;
if (PROFILE_EFFECT === type) {
return (
<View style={styles.profileEffectContainer}>
{((Component) => <Component item={property} hideBackground />)(importDefault(8472) /* metro dependency 8472: ProfileEffectSampleV2 */)}
</View>
);
}
const PROFILE_FRAME = CollectiblesItemType.PROFILE_FRAME;
if (PROFILE_FRAME === type) {
return (
<View style={styles.profileFrameContainer}>
{((Component) => <Component profileFrame={property} previewWidth={(require(10020) /* metro dependency 10020: CollectiblesShopCardV2 */).COLLECTIBLES_SHOP_CARD_WIDTH - (importDefault(697) /* metro dependency 697: native */).space.PX_32} previewHeight={env0_8} profileBackgroundColor={(importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW} />)(importDefault(10031) /* metro dependency 10031: ProfileFrameSamplePreview */)}
</View>
);
}
const NAMEPLATE = CollectiblesItemType.NAMEPLATE;
if (NAMEPLATE === type) {
return ((Component) => <Component item={property} />)(importDefault(10050) /* metro dependency 10050: NameplateCardPreview */);
}
return null;
}
let skuId = product.skuId;
const ORB_PROFILE_BADGE = EXTERNAL_PRODUCT_SKU_IDS.ORB_PROFILE_BADGE;
if (skuId === ORB_PROFILE_BADGE) {
return ((Component) => <Component source={{uri: importDefault(10063) /* metro dependency 10063: orb_profile_badge_icon2xPng */}} style={styles.externalProductImage} />)(importDefault(5475) /* metro dependency 5475: FastImage */);
}
skuId = product.skuId;
const FRACTIONAL_PREMIUM = EXTERNAL_PRODUCT_SKU_IDS.FRACTIONAL_PREMIUM;
if (skuId === FRACTIONAL_PREMIUM) {
return ((Component) => <Component source={{uri: importDefault(10064) /* metro dependency 10064: mobile_fraction_nitro_2xPng */}} style={styles.externalProductImage} />)(importDefault(5475) /* metro dependency 5475: FastImage */);
}
const property = env0_3(product.items, 1)[0];
type = property?.type;
const AVATAR_DECORATION = CollectiblesItemType.AVATAR_DECORATION;
if (AVATAR_DECORATION === type) {
return ((Component) => <Component item={property} size={100} />)(importDefault(7596) /* metro dependency 7596: AvatarDecorationSampleV2 */);
}
const PROFILE_EFFECT = CollectiblesItemType.PROFILE_EFFECT;
if (PROFILE_EFFECT === type) {
function AssetTileInternal({children, solidBackground}) { // fn#78661, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10248:3107, offset: 0x01e30457, size: 215 bytes, params: 2, frame: 23
solidBackground = !(solidBackground === undefined) && solidBackground;
const styles = useStyles();
const hexToRgbaString = ColorUtilsModule.hexToRgbaString;
const hexWithOpacity = ColorUtilsModule.hexWithOpacity;
const useToken = UseTokenModule.useToken;
const BACKGROUND_BASE_LOW = (Native).colors.BACKGROUND_BASE_LOW;
return (
<View style={styles.profileEffectContainer}>
{((Component) => <Component item={property} hideBackground />)(importDefault(8472) /* metro dependency 8472: ProfileEffectSampleV2 */)}
<View
style={[styles.assetContainer, {backgroundColor: Reflect.apply(hexToRgbaString, ColorUtilsModule,
[Reflect.apply(hexWithOpacity, ColorUtilsModule, [Reflect.apply(useToken, UseTokenModule,
[BACKGROUND_BASE_LOW]), solidBackground ? 1 : 0.8])])}]}
importantForAccessibility="no-hide-descendants"
accessibilityElementsHidden
>
{children}
</View>
);
}
const PROFILE_FRAME = CollectiblesItemType.PROFILE_FRAME;
if (PROFILE_FRAME === type) {
function _fun78662({product, isPurchased, solidBackground, isDisabled, disableBundleStaticBackground, muteBundleStaticBackground}) { // fn#78662, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10248:3429, offset: 0x01e3052e, size: 230 bytes, params: 2, frame: 22
return (
<View style={styles.profileFrameContainer}>
{((Component) => <Component profileFrame={property} previewWidth={(require(10020) /* metro dependency 10020: CollectiblesShopCardV2 */).COLLECTIBLES_SHOP_CARD_WIDTH - (importDefault(697) /* metro dependency 697: native */).space.PX_32} previewHeight={env0_8} profileBackgroundColor={(importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW} />)(importDefault(10031) /* metro dependency 10031: ProfileFrameSamplePreview */)}
</View>
<AssetTileInternal solidBackground={solidBackground}>
<ProductPreview
product={(require(5133) /* metro dependency 5133: CollectiblesProductUtils */).getSelectedProduct(product,
(require(10021) /* metro dependency 10021: useDefaultVariantIndex */).useDefaultVariantIndex(product))}
isPurchased={isPurchased}
isDisabled={isDisabled}
disableBundleStaticBackground={disableBundleStaticBackground}
muteBundleStaticBackground={muteBundleStaticBackground}
/>
{isPurchased && <PurchasedAssetOverlay />}
{isDisabled && !isPurchased && <DisabledAssetOverlay />}
</AssetTileInternal>
);
}
const NAMEPLATE = CollectiblesItemType.NAMEPLATE;
if (NAMEPLATE === type) {
return ((Component) => <Component item={property} />)(importDefault(10050) /* metro dependency 10050: NameplateCardPreview */);
}
return null;
}
function AssetTileInternal({children, solidBackground}) { // fn#78661, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10248:3107, offset: 0x01e30457, size: 215 bytes, params: 2, frame: 23
solidBackground = !(solidBackground === undefined) && solidBackground;
const styles = useStyles();
const colorUtilsModule = require(4000) /* metro dependency 4000: ColorUtils */;
const hexToRgbaString = colorUtilsModule.hexToRgbaString;
const moduleValue2 = colorUtilsModule;
const hexWithOpacity = moduleValue2.hexWithOpacity;
const useTokenModule = require(3860) /* metro dependency 3860: useToken */;
const useToken = useTokenModule.useToken;
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
return (
<View
style={[styles.assetContainer, {backgroundColor: Reflect.apply(hexToRgbaString, colorUtilsModule,
[Reflect.apply(hexWithOpacity, moduleValue2, [Reflect.apply(useToken, useTokenModule,
[BACKGROUND_BASE_LOW]), solidBackground ? 1 : 0.8])])}]}
importantForAccessibility="no-hide-descendants"
accessibilityElementsHidden
>
{children}
</View>
);
}
function _fun78662({product, isPurchased, solidBackground, isDisabled, disableBundleStaticBackground, muteBundleStaticBackground}) { // fn#78662, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10248:3429, offset: 0x01e3052e, size: 230 bytes, params: 2, frame: 22
return (
<AssetTileInternal solidBackground={solidBackground}>
<ProductPreview
product={(require(5133) /* metro dependency 5133: CollectiblesProductUtils */).getSelectedProduct(product,
(require(10021) /* metro dependency 10021: useDefaultVariantIndex */).useDefaultVariantIndex(product))}
isPurchased={isPurchased}
isDisabled={isDisabled}
disableBundleStaticBackground={disableBundleStaticBackground}
muteBundleStaticBackground={muteBundleStaticBackground}
/>
{isPurchased && <PurchasedAssetOverlay />}
{isDisabled && !isPurchased && <DisabledAssetOverlay />}
</AssetTileInternal>
);
}
global.__d(_fun78656, 10062, [57, 31, 27, 663, 33, 10020, 697, 4501, 9294, 6705, 5133, 1904, 7609, 10030, 8470,
5475, 10063, 10064, 7596, 8472, 10031, 10050, 4000, 3860, 10021,
2]) /* metro module 10062, dependencies: [57, 31, 27, 663, 33, 10020, 697, 4501, 9294, 6705, 5133, 1904, 7609, 10030, 8470, 5475, 10063, 10064, 7596, 8472, 10031, 10050, 4000, 3860, 10021, 2] */;
@@ -1,327 +1,448 @@
/* Metro module 10065; source: modules/collectibles/native/CollectiblesShopCardCardDetailsV2.tsx; dependencies: [31, 27, 5140, 661, 33, 4501, 697, 10021, 5133, 10066, 5134, 10069, 10075, 4573, 1244, 10076, 477, 10078, 7954, 7594, 10054, 1904, 3802, 3860, 4000, 10080, 566, 4589, 10081, 2] */
import Native from '../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import defaultImport2 from '../../../by-id/module-04589-LinearGradient.js'; /* Metro dependency 4589 */
import IAPStoreAndroid from '../../../stores/native/IAPStore.android.tsx'; /* Metro dependency 5140 */
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 ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
import * as UseTokenModule from '../../../design/tokens/native/useToken.tsx'; /* Metro dependency 3860 */
import * as ColorUtilsModule from '../../../utils/ColorUtils.tsx'; /* Metro dependency 4000 */
import * as CreateStylesModule from '../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as TextModule from '../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as CollectiblesProductUtilsModule from '../utils/CollectiblesProductUtils.tsx'; /* Metro dependency 5133 */
import * as CollectiblesUtilsModule from '../CollectiblesUtils.tsx'; /* Metro dependency 5134 */
import * as UseCurrentUserModule from '../hooks/useCurrentUser.tsx'; /* Metro dependency 7594 */
import * as UseDefaultVariantIndexModule from '../hooks/useDefaultVariantIndex.tsx'; /* Metro dependency 10021 */
import * as CollectiblesUtilsModule2 from './CollectiblesUtils.tsx'; /* Metro dependency 10066 */
import * as HooksModule from '../../virtual_currency/hooks/index.tsx'; /* Metro dependency 10069 */
import * as GetProductNameModule from '../utils/getProductName.tsx'; /* Metro dependency 10080 */
function _fun78665(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#78665, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10251:6, offset: 0x01e306e2, size: 482 bytes, params: 8, frame: 27
var object3;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(27) /* metro dependency 27 */).View;
const iapStoreAndroid = importDefault(5140) /* metro dependency 5140: IAPStoreAndroid */;
const env0_6 = (require(661) /* metro dependency 661: Constants */).VerticalGradient;
const value2 = require(33) /* metro dependency 33 */;
const env0_7 = value2.jsx;
const env0_8 = value2.jsxs;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
object3 = {};
const object4 = {'position': 'absolute', 'height': '45%', 'width': '100%', 'padding': 10, 'flex': 1, 'bottom': 0,
let value = ReactModule;
const createStyles = CreateStylesModule.createStyles;
object = {};
const object2 = {'position': 'absolute', 'height': '45%', 'width': '100%', 'padding': 10, 'flex': 1, 'bottom': 0,
'overflow': 'hidden', 'borderBottomLeftRadius': null, 'borderBottomRightRadius': null, 'display': 'flex',
'flexDirection': 'column', 'justifyContent': 'flex-end'};
object4.borderBottomLeftRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object4.borderBottomRightRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object3.regularMetadataContainer = object4;
object3.assetName = {marginBottom: 4};
object2.borderBottomLeftRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object2.borderBottomRightRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object.regularMetadataContainer = object2;
object.assetName = {marginBottom: 4};
const PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object3.priceVariantsContainer = {'display': 'flex', 'flexDirection': 'row', 'justifyContent': 'space-between',
object.priceVariantsContainer = {'display': 'flex', 'flexDirection': 'row', 'justifyContent': 'space-between',
'alignItems': 'center', 'width': '100%', gap: PX_4};
object3.priceDescription = {'display': 'flex', 'flexDirection': 'row', 'alignItems': 'center', 'flex': 1};
object3.text = {flexShrink: 1};
object3.discountPercentage = {paddingLeft: 3};
object3.wheelIcon = {'marginTop': 0, 'marginRight': 3};
object3.androidTextPadding = {paddingBottom: 2};
const env0_9 = Reflect.apply(createStyles, createStylesModule, [object3]);
object.priceDescription = {'display': 'flex', 'flexDirection': 'row', 'alignItems': 'center', 'flex': 1};
object.text = {flexShrink: 1};
object.discountPercentage = {paddingLeft: 3};
object.wheelIcon = {'marginTop': 0, 'marginRight': 3};
object.androidTextPadding = {paddingBottom: 2};
const env0_9 = Reflect.apply(createStyles, CreateStylesModule, [object]);
value.memo(_fun78666).displayName = 'PriceDescription';
value = value.memo(_fun78670);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/CollectiblesShopCardCardDetailsV2.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/native/CollectiblesShopCardCardDetailsV2.tsx');
exports.default = value;
}
function _fun78666({product, hasShopDiscount, discountSource, styles, collectibleProductState, isFetchingGoogleSkus, preferVCPrice, isDisabled}) { // fn#78666, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10251:869, offset: 0x01e308c4, size: 1878 bytes, params: 2, frame: 32
var r8;
var r1;
var items2;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
var object2;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var formatToPlainString;
var W4DfeF;
var amount;
var items3;
var items4;
var items5;
var value13;
var items6;
var value;
const selectedProduct = (require(5133) /* metro dependency 5133: CollectiblesProductUtils */).getSelectedProduct(product,
(require(10021) /* metro dependency 10021: useDefaultVariantIndex */).useDefaultVariantIndex(product));
const formattedPriceForCollectiblesProduct = (require(10066) /* metro dependency 10066: CollectiblesUtils */).getFormattedPriceForCollectiblesProduct(selectedProduct,
hasShopDiscount, true);
const binding = env0_3;
const useMemo = binding.useMemo;
let object = [selectedProduct, hasShopDiscount];
const value6 = Reflect.apply(useMemo, binding, [_fun78667, object]);
const value7 = binding.useMemo(_fun78668, [selectedProduct, hasShopDiscount]);
const hooksModule = require(10069) /* metro dependency 10069: hooks */;
const useFetchVirtualCurrencyBalance = hooksModule.useFetchVirtualCurrencyBalance;
const balance = Reflect.apply(useFetchVirtualCurrencyBalance, hooksModule, []).balance;
const value8 = binding.useMemo(_fun78669, [balance, value6]);
if (isFetchingGoogleSkus) {
if (formattedPriceForCollectiblesProduct == null) {
const CollectiblesShopPricePlaceholder = (require(10075) /* metro dependency 10075: CollectiblesShopPricePlaceholder */).CollectiblesShopPricePlaceholder;
return <CollectiblesShopPricePlaceholder />;
function _fun78666({product, hasShopDiscount, discountSource, styles, collectibleProductState, isFetchingGoogleSkus, preferVCPrice, isDisabled}) { // fn#78666, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10251:869, offset: 0x01e308c4, size: 1878 bytes, params: 2, frame: 32
var r8;
var r1;
var items2;
const Text = (TextModule).Text;
var object3;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var formatToPlainString;
var W4DfeF;
var amount;
var items3;
var items4;
var items5;
var value13;
var items6;
var value;
const selectedProduct = (CollectiblesProductUtilsModule).getSelectedProduct(product,
(UseDefaultVariantIndexModule).useDefaultVariantIndex(product));
const formattedPriceForCollectiblesProduct = (CollectiblesUtilsModule2).getFormattedPriceForCollectiblesProduct(selectedProduct,
hasShopDiscount, true);
const binding = env0_3;
const useMemo = binding.useMemo;
let object = [selectedProduct, hasShopDiscount];
const value6 = Reflect.apply(useMemo, binding, [_fun78667, object]);
const value7 = binding.useMemo(_fun78668, [selectedProduct, hasShopDiscount]);
const useFetchVirtualCurrencyBalance = HooksModule.useFetchVirtualCurrencyBalance;
const balance = Reflect.apply(useFetchVirtualCurrencyBalance, HooksModule, []).balance;
const value8 = binding.useMemo(_fun78669, [balance, value6]);
if (isFetchingGoogleSkus) {
if (formattedPriceForCollectiblesProduct == null) {
const CollectiblesShopPricePlaceholder = (require(10075) /* metro dependency 10075: CollectiblesShopPricePlaceholder */).CollectiblesShopPricePlaceholder;
return <CollectiblesShopPricePlaceholder />;
}
}
}
if (collectibleProductState === 'partiallyOwnedBundle') {
return (
<View style={styles.priceDescription}>
<Text
variant="text-xs/semibold"
color="mobile-text-heading-primary"
lineClamp={1}
style={styles.text}
>
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.BEjTij)}
</Text>
</View>
);
}
if (collectibleProductState === 'purchased') {
return (
<View style={styles.priceDescription}>
<Text
variant="text-xs/semibold"
color="mobile-text-heading-primary"
lineClamp={1}
style={styles.text}
>
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['6cfuDj'])}
</Text>
</View>
);
}
if (collectibleProductState === 'nitroUpsell') {
return (
<View style={styles.priceDescription}>
<Text
variant="text-xs/semibold"
color="mobile-text-heading-primary"
lineClamp={1}
style={styles.text}
>
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.sEAnVH)}
</Text>
</View>
);
}
if (collectibleProductState === 'nitroClaim') {
return (
<View style={styles.priceDescription}>
<Text
variant="text-xs/semibold"
color="mobile-text-heading-primary"
lineClamp={1}
style={styles.text}
>
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.rt69oo)}
</Text>
</View>
);
}
if (isDisabled) {
r1 = <View style={styles.priceDescription}><Text variant="text-xs/semibold" color="mobile-text-heading-primary" lineClamp={1} style={styles.text}>{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.wu4gyV)}</Text></View>;
} else {
if (value6 == null) {
object = {};
object.style = styles.priceDescription;
r8 = hasShopDiscount && (discountSource === (require(5134) /* metro dependency 5134: CollectiblesUtils */).ShopDiscountSource.THIRDPARTY ? ((TagIcon) => <TagIcon size="xs" color="mobile-text-heading-primary" style={styles.wheelIcon} />)((require(10078) /* metro dependency 10078: TagIcon */).TagIcon) : ((NitroWheelIcon) => <NitroWheelIcon size="xs" color="mobile-text-heading-primary" style={styles.wheelIcon} />)((require(7954) /* metro dependency 7954: NitroWheelIcon */).NitroWheelIcon));
items4 = [r8];
items5 = [styles.text];
items5[1] = (require(477) /* metro dependency 477: PlatformUtils */).isAndroid() && styles.androidTextPadding;
items4[1] = <Text variant="text-xs/semibold" color="mobile-text-heading-primary" lineClamp={1} style={items5}>{formattedPriceForCollectiblesProduct}</Text>;
value13 = value7 > 0;
if (value13) {
items6 = [styles.discountPercentage];
items6[1] = styles.text;
value = require(477) /* metro dependency 477: PlatformUtils */;
items6[2] = value.isAndroid() ? styles.androidTextPadding : undefined;
value = <Text style={items6} color="text-feedback-positive" variant="text-xs/semibold" lineClamp={1}>{'-' + value7 + '%'}</Text>;
r8 = value;
} else {
r8 = value13;
}
items4[2] = r8;
object.children = items4;
r1 = object;
} else if (balance == null) {
object = {};
object.style = styles.priceDescription;
r8 = hasShopDiscount && (discountSource === (require(5134) /* metro dependency 5134: CollectiblesUtils */).ShopDiscountSource.THIRDPARTY ? ((TagIcon) => <TagIcon size="xs" color="mobile-text-heading-primary" style={styles.wheelIcon} />)((require(10078) /* metro dependency 10078: TagIcon */).TagIcon) : ((NitroWheelIcon) => <NitroWheelIcon size="xs" color="mobile-text-heading-primary" style={styles.wheelIcon} />)((require(7954) /* metro dependency 7954: NitroWheelIcon */).NitroWheelIcon));
items4 = [r8];
items5 = [styles.text];
items5[1] = (require(477) /* metro dependency 477: PlatformUtils */).isAndroid() && styles.androidTextPadding;
items4[1] = <Text variant="text-xs/semibold" color="mobile-text-heading-primary" lineClamp={1} style={items5}>{formattedPriceForCollectiblesProduct}</Text>;
value13 = value7 > 0;
if (value13) {
items6 = [styles.discountPercentage];
items6[1] = styles.text;
value = require(477) /* metro dependency 477: PlatformUtils */;
items6[2] = value.isAndroid() ? styles.androidTextPadding : undefined;
value = <Text style={items6} color="text-feedback-positive" variant="text-xs/semibold" lineClamp={1}>{'-' + value7 + '%'}</Text>;
r8 = value;
} else {
r8 = value13;
}
items4[2] = r8;
object.children = items4;
r1 = object;
} else if (preferVCPrice === true) {
object = {};
object.style = [styles.priceDescription, {opacity: value8 !== false ? 1 : 0.5}];
const OrbsIcon = (require(10076) /* metro dependency 10076: OrbsIcon */).OrbsIcon;
value = <OrbsIcon size="xxs" color="mobile-text-heading-primary" style={styles.wheelIcon} />;
items2 = [value];
object2 = {'variant': 'text-xs/semibold', 'color': 'mobile-text-heading-primary', 'lineClamp': 1};
formatToPlainString = intl.formatToPlainString;
W4DfeF = (require(1244) /* metro dependency 1244: indexNative */).t.W4DfeF;
amount = value6.amount;
object2.accessibilityLabel = Reflect.apply(formatToPlainString, intl, [W4DfeF, {orbAmount: amount}]);
items3 = [styles.text];
value = require(477) /* metro dependency 477: PlatformUtils */;
value = value.isAndroid();
items3[1] = value && styles.androidTextPadding;
object2.style = items3;
amount = value6.amount;
items2[1] = <Text {...object2}>{amount}</Text>;
object.children = items2;
r1 = object;
} else if (value8) {
object = {};
object.style = [styles.priceDescription, {opacity: value8 !== false ? 1 : 0.5}];
const OrbsIcon2 = (require(10076) /* metro dependency 10076: OrbsIcon */).OrbsIcon;
value = <OrbsIcon2 size="xxs" color="mobile-text-heading-primary" style={styles.wheelIcon} />;
items2 = [value];
object2 = {'variant': 'text-xs/semibold', 'color': 'mobile-text-heading-primary', 'lineClamp': 1};
formatToPlainString = intl.formatToPlainString;
W4DfeF = (require(1244) /* metro dependency 1244: indexNative */).t.W4DfeF;
amount = value6.amount;
object2.accessibilityLabel = Reflect.apply(formatToPlainString, intl, [W4DfeF, {orbAmount: amount}]);
items3 = [styles.text];
value = require(477) /* metro dependency 477: PlatformUtils */;
value = value.isAndroid();
items3[1] = value && styles.androidTextPadding;
object2.style = items3;
amount = value6.amount;
items2[1] = <Text {...object2}>{amount}</Text>;
object.children = items2;
r1 = object;
} else if (formattedPriceForCollectiblesProduct != null) {
object = {};
object.style = styles.priceDescription;
r8 = hasShopDiscount && (discountSource === (require(5134) /* metro dependency 5134: CollectiblesUtils */).ShopDiscountSource.THIRDPARTY ? ((TagIcon) => <TagIcon size="xs" color="mobile-text-heading-primary" style={styles.wheelIcon} />)((require(10078) /* metro dependency 10078: TagIcon */).TagIcon) : ((NitroWheelIcon) => <NitroWheelIcon size="xs" color="mobile-text-heading-primary" style={styles.wheelIcon} />)((require(7954) /* metro dependency 7954: NitroWheelIcon */).NitroWheelIcon));
items4 = [r8];
items5 = [styles.text];
items5[1] = (require(477) /* metro dependency 477: PlatformUtils */).isAndroid() && styles.androidTextPadding;
items4[1] = <Text variant="text-xs/semibold" color="mobile-text-heading-primary" lineClamp={1} style={items5}>{formattedPriceForCollectiblesProduct}</Text>;
value13 = value7 > 0;
if (value13) {
items6 = [styles.discountPercentage];
items6[1] = styles.text;
value = require(477) /* metro dependency 477: PlatformUtils */;
items6[2] = value.isAndroid() ? styles.androidTextPadding : undefined;
value = <Text style={items6} color="text-feedback-positive" variant="text-xs/semibold" lineClamp={1}>{'-' + value7 + '%'}</Text>;
r8 = value;
} else {
r8 = value13;
}
items4[2] = r8;
object.children = items4;
r1 = object;
if (collectibleProductState === 'partiallyOwnedBundle') {
return (
<View style={styles.priceDescription}>
<Text
variant="text-xs/semibold"
color="mobile-text-heading-primary"
lineClamp={1}
style={styles.text}
>
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.BEjTij)}
</Text>
</View>
);
}
if (collectibleProductState === 'purchased') {
return (
<View style={styles.priceDescription}>
<Text
variant="text-xs/semibold"
color="mobile-text-heading-primary"
lineClamp={1}
style={styles.text}
>
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['6cfuDj'])}
</Text>
</View>
);
}
if (collectibleProductState === 'nitroUpsell') {
return (
<View style={styles.priceDescription}>
<Text
variant="text-xs/semibold"
color="mobile-text-heading-primary"
lineClamp={1}
style={styles.text}
>
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.sEAnVH)}
</Text>
</View>
);
}
if (collectibleProductState === 'nitroClaim') {
return (
<View style={styles.priceDescription}>
<Text
variant="text-xs/semibold"
color="mobile-text-heading-primary"
lineClamp={1}
style={styles.text}
>
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.rt69oo)}
</Text>
</View>
);
}
if (isDisabled) {
r1 = (
<View style={styles.priceDescription}>
<Text
variant="text-xs/semibold"
color="mobile-text-heading-primary"
lineClamp={1}
style={styles.text}
>
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.wu4gyV)}
</Text>
</View>
);
} else {
object = {};
object.style = [styles.priceDescription, {opacity: value8 !== false ? 1 : 0.5}];
const OrbsIcon3 = (require(10076) /* metro dependency 10076: OrbsIcon */).OrbsIcon;
value = <OrbsIcon3 size="xxs" color="mobile-text-heading-primary" style={styles.wheelIcon} />;
items2 = [value];
object2 = {'variant': 'text-xs/semibold', 'color': 'mobile-text-heading-primary', 'lineClamp': 1};
formatToPlainString = intl.formatToPlainString;
W4DfeF = (require(1244) /* metro dependency 1244: indexNative */).t.W4DfeF;
amount = value6.amount;
object2.accessibilityLabel = Reflect.apply(formatToPlainString, intl, [W4DfeF, {orbAmount: amount}]);
items3 = [styles.text];
value = require(477) /* metro dependency 477: PlatformUtils */;
value = value.isAndroid();
items3[1] = value && styles.androidTextPadding;
object2.style = items3;
amount = value6.amount;
items2[1] = <Text {...object2}>{amount}</Text>;
object.children = items2;
r1 = object;
if (value6 == null) {
object = {};
object.style = styles.priceDescription;
r8 = hasShopDiscount && (discountSource === (require(5134) /* metro dependency 5134: CollectiblesUtils */).ShopDiscountSource.THIRDPARTY ? ((TagIcon) => <TagIcon size="xs" color="mobile-text-heading-primary" style={styles.wheelIcon} />)((require(10078) /* metro dependency 10078: TagIcon */).TagIcon) : ((NitroWheelIcon) => <NitroWheelIcon size="xs" color="mobile-text-heading-primary" style={styles.wheelIcon} />)((require(7954) /* metro dependency 7954: NitroWheelIcon */).NitroWheelIcon));
items4 = [r8];
items5 = [styles.text];
items5[1] = (require(477) /* metro dependency 477: PlatformUtils */).isAndroid() && styles.androidTextPadding;
items4[1] = (
<Text
variant="text-xs/semibold"
color="mobile-text-heading-primary"
lineClamp={1}
style={items5}
>
{formattedPriceForCollectiblesProduct}
</Text>
);
value13 = value7 > 0;
if (value13) {
items6 = [styles.discountPercentage];
items6[1] = styles.text;
value = require(477) /* metro dependency 477: PlatformUtils */;
items6[2] = value.isAndroid() ? styles.androidTextPadding : undefined;
value = (
<Text
style={items6}
color="text-feedback-positive"
variant="text-xs/semibold"
lineClamp={1}
>
{'-' + value7 + '%'}
</Text>
);
r8 = value;
} else {
r8 = value13;
}
items4[2] = r8;
object.children = items4;
r1 = object;
} else if (balance == null) {
object = {};
object.style = styles.priceDescription;
r8 = hasShopDiscount && (discountSource === (require(5134) /* metro dependency 5134: CollectiblesUtils */).ShopDiscountSource.THIRDPARTY ? ((TagIcon) => <TagIcon size="xs" color="mobile-text-heading-primary" style={styles.wheelIcon} />)((require(10078) /* metro dependency 10078: TagIcon */).TagIcon) : ((NitroWheelIcon) => <NitroWheelIcon size="xs" color="mobile-text-heading-primary" style={styles.wheelIcon} />)((require(7954) /* metro dependency 7954: NitroWheelIcon */).NitroWheelIcon));
items4 = [r8];
items5 = [styles.text];
items5[1] = (require(477) /* metro dependency 477: PlatformUtils */).isAndroid() && styles.androidTextPadding;
items4[1] = (
<Text
variant="text-xs/semibold"
color="mobile-text-heading-primary"
lineClamp={1}
style={items5}
>
{formattedPriceForCollectiblesProduct}
</Text>
);
value13 = value7 > 0;
if (value13) {
items6 = [styles.discountPercentage];
items6[1] = styles.text;
value = require(477) /* metro dependency 477: PlatformUtils */;
items6[2] = value.isAndroid() ? styles.androidTextPadding : undefined;
value = (
<Text
style={items6}
color="text-feedback-positive"
variant="text-xs/semibold"
lineClamp={1}
>
{'-' + value7 + '%'}
</Text>
);
r8 = value;
} else {
r8 = value13;
}
items4[2] = r8;
object.children = items4;
r1 = object;
} else if (preferVCPrice === true) {
object = {};
object.style = [styles.priceDescription, {opacity: value8 !== false ? 1 : 0.5}];
const OrbsIcon = (require(10076) /* metro dependency 10076: OrbsIcon */).OrbsIcon;
value = (
<OrbsIcon
size="xxs"
color="mobile-text-heading-primary"
style={styles.wheelIcon}
/>
);
items2 = [value];
object3 = {'variant': 'text-xs/semibold', 'color': 'mobile-text-heading-primary', 'lineClamp': 1};
formatToPlainString = intl.formatToPlainString;
W4DfeF = (require(1244) /* metro dependency 1244: indexNative */).t.W4DfeF;
amount = value6.amount;
object3.accessibilityLabel = Reflect.apply(formatToPlainString, intl, [W4DfeF, {orbAmount: amount}]);
items3 = [styles.text];
value = require(477) /* metro dependency 477: PlatformUtils */;
value = value.isAndroid();
items3[1] = value && styles.androidTextPadding;
object3.style = items3;
amount = value6.amount;
items2[1] = (
<Text {...object3}>
{amount}
</Text>
);
object.children = items2;
r1 = object;
} else if (value8) {
object = {};
object.style = [styles.priceDescription, {opacity: value8 !== false ? 1 : 0.5}];
const OrbsIcon2 = (require(10076) /* metro dependency 10076: OrbsIcon */).OrbsIcon;
value = (
<OrbsIcon2
size="xxs"
color="mobile-text-heading-primary"
style={styles.wheelIcon}
/>
);
items2 = [value];
object3 = {'variant': 'text-xs/semibold', 'color': 'mobile-text-heading-primary', 'lineClamp': 1};
formatToPlainString = intl.formatToPlainString;
W4DfeF = (require(1244) /* metro dependency 1244: indexNative */).t.W4DfeF;
amount = value6.amount;
object3.accessibilityLabel = Reflect.apply(formatToPlainString, intl, [W4DfeF, {orbAmount: amount}]);
items3 = [styles.text];
value = require(477) /* metro dependency 477: PlatformUtils */;
value = value.isAndroid();
items3[1] = value && styles.androidTextPadding;
object3.style = items3;
amount = value6.amount;
items2[1] = (
<Text {...object3}>
{amount}
</Text>
);
object.children = items2;
r1 = object;
} else if (formattedPriceForCollectiblesProduct != null) {
object = {};
object.style = styles.priceDescription;
r8 = hasShopDiscount && (discountSource === (require(5134) /* metro dependency 5134: CollectiblesUtils */).ShopDiscountSource.THIRDPARTY ? ((TagIcon) => <TagIcon size="xs" color="mobile-text-heading-primary" style={styles.wheelIcon} />)((require(10078) /* metro dependency 10078: TagIcon */).TagIcon) : ((NitroWheelIcon) => <NitroWheelIcon size="xs" color="mobile-text-heading-primary" style={styles.wheelIcon} />)((require(7954) /* metro dependency 7954: NitroWheelIcon */).NitroWheelIcon));
items4 = [r8];
items5 = [styles.text];
items5[1] = (require(477) /* metro dependency 477: PlatformUtils */).isAndroid() && styles.androidTextPadding;
items4[1] = (
<Text
variant="text-xs/semibold"
color="mobile-text-heading-primary"
lineClamp={1}
style={items5}
>
{formattedPriceForCollectiblesProduct}
</Text>
);
value13 = value7 > 0;
if (value13) {
items6 = [styles.discountPercentage];
items6[1] = styles.text;
value = require(477) /* metro dependency 477: PlatformUtils */;
items6[2] = value.isAndroid() ? styles.androidTextPadding : undefined;
value = (
<Text
style={items6}
color="text-feedback-positive"
variant="text-xs/semibold"
lineClamp={1}
>
{'-' + value7 + '%'}
</Text>
);
r8 = value;
} else {
r8 = value13;
}
items4[2] = r8;
object.children = items4;
r1 = object;
} else {
object = {};
object.style = [styles.priceDescription, {opacity: value8 !== false ? 1 : 0.5}];
const OrbsIcon3 = (require(10076) /* metro dependency 10076: OrbsIcon */).OrbsIcon;
value = (
<OrbsIcon3
size="xxs"
color="mobile-text-heading-primary"
style={styles.wheelIcon}
/>
);
items2 = [value];
object3 = {'variant': 'text-xs/semibold', 'color': 'mobile-text-heading-primary', 'lineClamp': 1};
formatToPlainString = intl.formatToPlainString;
W4DfeF = (require(1244) /* metro dependency 1244: indexNative */).t.W4DfeF;
amount = value6.amount;
object3.accessibilityLabel = Reflect.apply(formatToPlainString, intl, [W4DfeF, {orbAmount: amount}]);
items3 = [styles.text];
value = require(477) /* metro dependency 477: PlatformUtils */;
value = value.isAndroid();
items3[1] = value && styles.androidTextPadding;
object3.style = items3;
amount = value6.amount;
items2[1] = (
<Text {...object3}>
{amount}
</Text>
);
object.children = items2;
r1 = object;
}
value = <View {...r1} />;
r1 = value;
}
value = <View {...r1} />;
r1 = value;
return r1;
function _fun78667() { // fn#78667, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10251:1152, offset: 0x01e3101a, size: 61 bytes, params: 1, frame: 13
const value = environment.__proto__;
return (CollectiblesProductUtilsModule).getProductOrbPrice({product: env0_1,
hasShopDiscount: hasShopDiscount});
}
function _fun78668() { // fn#78668, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10251:1235, offset: 0x01e31057, size: 56 bytes, params: 1, frame: 13
let value = environment.__proto__;
value = require(5134) /* metro dependency 5134: CollectiblesUtils */;
const getProductDiscount = value.getProductDiscount;
return Reflect.apply(getProductDiscount, value, [env0_1, hasShopDiscount]).discountPercentage;
}
function _fun78669() { // fn#78669, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10251:1364, offset: 0x01e3108f, size: 51 bytes, params: 1, frame: 4
const value2 = null;
return value2 == env0_2 || value2 == balance ? value2 : env0_2.amount <= balance;
}
}
return r1;
}
function _fun78670({product, collectibleProductState, preferVCPrice, isDisabled, hidePrice}) { // fn#78670, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10251:3732, offset: 0x01e310c2, size: 765 bytes, params: 2, frame: 31
var r5;
var items4;
var value;
const styles = useStyles();
const value2 = (require(7594) /* metro dependency 7594: useCurrentUser */).useCurrentUser();
const r20 = (importDefault(3802) /* metro dependency 3802: PremiumUtils */).canUseShopDiscounts(value2) || (require(10054) /* metro dependency 10054: useCanPurchaseFrames */).useIsProfileFramesEarlyAccessPhase('CollectiblesShopCardCardDetailsV2') && (require(5133) /* metro dependency 5133: CollectiblesProductUtils */).getProductType(product) === (require(1904) /* metro dependency 1904: CollectiblesItemType */).CollectiblesItemType.PROFILE_FRAME;
const shopDiscountSource = (require(5134) /* metro dependency 5134: CollectiblesUtils */).getShopDiscountSource(value2);
const useTokenModule = require(3860) /* metro dependency 3860: useToken */;
const useToken = useTokenModule.useToken;
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
const value7 = Reflect.apply(useToken, useTokenModule, [BACKGROUND_BASE_LOW]);
const colorUtilsModule = require(4000) /* metro dependency 4000: ColorUtils */;
let hexToRgbaString = colorUtilsModule.hexToRgbaString;
const moduleValue7 = colorUtilsModule;
const value8 = Reflect.apply(hexToRgbaString, colorUtilsModule, [moduleValue7.hexWithOpacity(value7, 0.9)]);
const moduleValue8 = colorUtilsModule;
hexToRgbaString = moduleValue8.hexToRgbaString;
const moduleValue9 = colorUtilsModule;
const value9 = Reflect.apply(hexToRgbaString, moduleValue8, [moduleValue9.hexWithOpacity(value7, 0)]);
const productName = (require(10080) /* metro dependency 10080: getProductName */).getProductName(product);
const value11 = (require(566) /* metro dependency 566: flux */).useStateFromStores([IAPStoreAndroid], function() {
return IAPStoreAndroid.isFetchingGoogleSkus();
});
const defaultImport2 = importDefault(4589) /* metro dependency 4589 */;
const items3 = [styles.regularMetadataContainer];
const items2 = [value9, value8, value7];
const {START, END} = VerticalGradient;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const text = <Text style={styles.assetName} variant="heading-sm/bold" color="mobile-text-heading-primary" lineClamp={1} accessibilityRole="header">{productName}</Text>;
if (hidePrice) {
r5 = !hidePrice;
} else {
var viewBindingProps = {style: styles.priceVariantsContainer};
items4 = [((Component) => <Component product={product} hasShopDiscount={r20} discountSource={shopDiscountSource} styles={styles} collectibleProductState={collectibleProductState} isFetchingGoogleSkus={value11} preferVCPrice={preferVCPrice} isDisabled={isDisabled} />)(env0_10)];
value = importDefault(10081) /* metro dependency 10081: CollectiblesShopCardVariants */;
items4[1] = ((Component) => <Component product={product} />)(value);
value = <View {...viewBindingProps}>{items4}</View>;
r5 = value;
function _fun78670({product, collectibleProductState, preferVCPrice, isDisabled, hidePrice}) { // fn#78670, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10251:3732, offset: 0x01e310c2, size: 765 bytes, params: 2, frame: 31
var r5;
var items4;
var value;
const styles = useStyles();
const value2 = (UseCurrentUserModule).useCurrentUser();
const r20 = (importDefault(3802) /* metro dependency 3802: PremiumUtils */).canUseShopDiscounts(value2) || (require(10054) /* metro dependency 10054: useCanPurchaseFrames */).useIsProfileFramesEarlyAccessPhase('CollectiblesShopCardCardDetailsV2') && (require(5133) /* metro dependency 5133: CollectiblesProductUtils */).getProductType(product) === (require(1904) /* metro dependency 1904: CollectiblesItemType */).CollectiblesItemType.PROFILE_FRAME;
const shopDiscountSource = (CollectiblesUtilsModule).getShopDiscountSource(value2);
const useToken = UseTokenModule.useToken;
const BACKGROUND_BASE_LOW = (Native).colors.BACKGROUND_BASE_LOW;
const value7 = Reflect.apply(useToken, UseTokenModule, [BACKGROUND_BASE_LOW]);
let hexToRgbaString = ColorUtilsModule.hexToRgbaString;
const value8 = Reflect.apply(hexToRgbaString, ColorUtilsModule, [ColorUtilsModule.hexWithOpacity(value7, 0.9)]);
hexToRgbaString = ColorUtilsModule.hexToRgbaString;
const value9 = Reflect.apply(hexToRgbaString, ColorUtilsModule, [ColorUtilsModule.hexWithOpacity(value7, 0)]);
const productName = (GetProductNameModule).getProductName(product);
const value11 = (require(566) /* metro dependency 566: flux */).useStateFromStores([IAPStoreAndroid], function() {
return IAPStoreAndroid.isFetchingGoogleSkus();
});
const items3 = [styles.regularMetadataContainer];
const items2 = [value9, value8, value7];
const {START, END} = VerticalGradient;
const Text = (TextModule).Text;
const text = (
<Text
style={styles.assetName}
variant="heading-sm/bold"
color="mobile-text-heading-primary"
lineClamp={1}
accessibilityRole="header"
>
{productName}
</Text>
);
if (hidePrice) {
r5 = !hidePrice;
} else {
var viewBindingProps = {style: styles.priceVariantsContainer};
items4 = [
((Component) => <Component product={product} hasShopDiscount={r20} discountSource={shopDiscountSource} styles={styles} collectibleProductState={collectibleProductState} isFetchingGoogleSkus={value11} preferVCPrice={preferVCPrice} isDisabled={isDisabled} />)(env0_10),
];
value = importDefault(10081) /* metro dependency 10081: CollectiblesShopCardVariants */;
items4[1] = ((Component) => <Component product={product} />)(value);
value = (
<View {...viewBindingProps}>
{items4}
</View>
);
r5 = value;
}
return ((Component) => <Component style={items3} colors={items2} locations={[0, 0.4,
1]} start={START} end={END}>{text}{r5}</Component>)(defaultImport2);
}
return ((Component) => <Component style={items3} colors={items2} locations={[0, 0.4,
1]} start={START} end={END}>{text}{r5}</Component>)(defaultImport2);
}
function _fun78667() { // fn#78667, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10251:1152, offset: 0x01e3101a, size: 61 bytes, params: 1, frame: 13
const value = environment.__proto__;
return (require(5133) /* metro dependency 5133: CollectiblesProductUtils */).getProductOrbPrice({product: env0_1,
hasShopDiscount: hasShopDiscount});
}
function _fun78668() { // fn#78668, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10251:1235, offset: 0x01e31057, size: 56 bytes, params: 1, frame: 13
let value = environment.__proto__;
value = require(5134) /* metro dependency 5134: CollectiblesUtils */;
const getProductDiscount = value.getProductDiscount;
return Reflect.apply(getProductDiscount, value, [env0_1, hasShopDiscount]).discountPercentage;
}
function _fun78669() { // fn#78669, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10251:1364, offset: 0x01e3108f, size: 51 bytes, params: 1, frame: 4
const value2 = null;
return value2 == env0_2 || value2 == balance ? value2 : env0_2.amount <= balance;
}
global.__d(_fun78665, 10065, [31, 27, 5140, 661, 33, 4501, 697, 10021, 5133, 10066, 5134, 10069, 10075, 4573, 1244,
10076, 477, 10078, 7954, 7594, 10054, 1904, 3802, 3860, 4000, 10080, 566, 4589, 10081,
2]) /* metro module 10065, dependencies: [31, 27, 5140, 661, 33, 4501, 697, 10021, 5133, 10066, 5134, 10069, 10075, 4573, 1244, 10076, 477, 10078, 7954, 7594, 10054, 1904, 3802, 3860, 4000, 10080, 566, 4589, 10081, 2] */;
@@ -1,267 +1,342 @@
/* Metro module 10020; source: modules/collectibles/native/CollectiblesShopCardV2.tsx; dependencies: [31, 27, 1310, 663, 33, 4501, 697, 10021, 5133, 10022, 7594, 10024, 10027, 1244, 3857, 6771, 10051, 10053, 10054, 566, 4002, 5278, 5134, 1904, 7954, 4573, 10056, 10057, 10062, 10065, 10023, 4080, 10085, 10153, 10154, 3802, 10060, 10106, 10155, 6518, 491, 2] */
import ThemeStore from '../../user_settings/ThemeStore.tsx'; /* Metro dependency 1310 */
import PremiumUtils from '../../../utils/PremiumUtils.tsx'; /* Metro dependency 3802 */
import ToastActionCreators from '../../toast/native/ToastActionCreators.tsx'; /* Metro dependency 3857 */
import ActionSheetActionCreators from '../../action_sheet/native/ActionSheetActionCreators.tsx'; /* Metro dependency 4080 */
import UseInitialValue from '../../../hooks/useInitialValue.tsx'; /* Metro dependency 6518 */
import UseAnalyticsLocations from '../../app_analytics/useAnalyticsLocations.tsx'; /* Metro dependency 6771 */
import UseWishlistNUXActionSheet from './useWishlistNUXActionSheet.tsx'; /* Metro dependency 10027 */
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 CollectiblesShopConstantsModule from '../CollectiblesShopConstants.tsx'; /* Metro dependency 663 */
import * as CollectiblesItemTypeModule from '../../../external/discord_common/js/shared/shared-constants/CollectiblesItemType.tsx'; /* Metro dependency 1904 */
import * as CreateStylesModule from '../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as CollectiblesProductUtilsModule from '../utils/CollectiblesProductUtils.tsx'; /* Metro dependency 5133 */
import * as CollectiblesUtilsModule from '../CollectiblesUtils.tsx'; /* Metro dependency 5134 */
import * as PressablesModule from '../../../design/void/Pressables/native/Pressables.tsx'; /* Metro dependency 5278 */
import * as UseCurrentUserModule from '../hooks/useCurrentUser.tsx'; /* Metro dependency 7594 */
import * as UseDefaultVariantIndexModule from '../hooks/useDefaultVariantIndex.tsx'; /* Metro dependency 10021 */
import * as UseTrackShopCardImpressionModule from './hooks/useTrackShopCardImpression.tsx'; /* Metro dependency 10022 */
import * as CollectiblesAnalyticsContextModule from '../CollectiblesAnalyticsContext.tsx'; /* Metro dependency 10023 */
import * as CollectiblesWishlistUtilsModule from '../../wishlists/CollectiblesWishlistUtils.tsx'; /* Metro dependency 10024 */
import * as UseTrackShopCardClickModule from '../hooks/useTrackShopCardClick.tsx'; /* Metro dependency 10051 */
import * as UseWishlistButtonStateModule from '../hooks/useWishlistButtonState.tsx'; /* Metro dependency 10053 */
import * as UseCanPurchaseFramesModule from '../hooks/useCanPurchaseFrames.tsx'; /* Metro dependency 10054 */
import * as UseProductPurchaseStateModule from '../hooks/useProductPurchaseState.tsx'; /* Metro dependency 10060 */
import * as UseProductDisableStateModule from '../hooks/useProductDisableState.tsx'; /* Metro dependency 10106 */
import * as CollectiblesShopCardImpressionMobileExperimentModule from '../experiments/CollectiblesShopCardImpressionMobileExperiment.tsx'; /* Metro dependency 10153 */
import * as UseTrackProductCardImpressionModule from '../hooks/useTrackProductCardImpression.tsx'; /* Metro dependency 10154 */
function _fun78263(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#78263, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10206:6, offset: 0x01e22fb6, size: 627 bytes, params: 8, frame: 26
var object3;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const value2 = require(27) /* metro dependency 27 */;
const PixelRatio = value2.PixelRatio;
const env0_4 = value2.View;
const themeStore = importDefault(1310) /* metro dependency 1310: ThemeStore */;
const env0_6 = (require(663) /* metro dependency 663: CollectiblesShopConstants */).ShopCtaEnum;
const value3 = require(33) /* metro dependency 33 */;
const env0_7 = value3.jsx;
const env0_8 = value3.jsxs;
let value = ReactModule;
const PixelRatio = ReactNativeModule.PixelRatio;
const r3 = PixelRatio.getFontScale() >= 1.78 ? 302 : 170;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
object3 = {};
const object5 = {'position': 'relative', 'height': null, 'width': 150, 'display': 'flex', 'borderWidth': 1,
const createStyles = CreateStylesModule.createStyles;
object = {};
const object2 = {'position': 'relative', 'height': null, 'width': 150, 'display': 'flex', 'borderWidth': 1,
'borderColor': null, 'borderRadius': null, 'overflow': 'hidden'};
object5.height = r3;
object2.height = r3;
const BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
object5.borderColor = BORDER_SUBTLE;
object5.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object3.card = object5;
object3.topRowOverlay = {'position': 'absolute', 'top': 6, 'left': 6, 'right': 6, 'zIndex': 2, 'display': 'flex',
object2.borderColor = BORDER_SUBTLE;
object2.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object.card = object2;
object.topRowOverlay = {'position': 'absolute', 'top': 6, 'left': 6, 'right': 6, 'zIndex': 2, 'display': 'flex',
'flexDirection': 'row', 'gap': 4, 'justifyContent': 'space-between', 'alignItems': 'flex-start'};
object3.badge = {flexShrink: 1};
const object6 = {};
object.badge = {flexShrink: 1};
const object4 = {};
const PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object6.paddingHorizontal = PX_4;
object6.paddingVertical = 1.5;
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
object6.flexShrink = 1;
object3.badgePill = object6;
object3.badgeOverrideText = {textTransform: 'uppercase'};
object4.paddingHorizontal = PX_4;
object4.paddingVertical = 1.5;
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
object4.flexShrink = 1;
object.badgePill = object4;
object.badgeOverrideText = {textTransform: 'uppercase'};
const WHITE = (importDefault(697) /* metro dependency 697: native */).colors.WHITE;
object3.badgePillDarkMode = {backgroundColor: WHITE};
object.badgePillDarkMode = {backgroundColor: WHITE};
const BADGE_BACKGROUND_BRAND = (importDefault(697) /* metro dependency 697: native */).colors.BADGE_BACKGROUND_BRAND;
object3.badgePillLightMode = {backgroundColor: BADGE_BACKGROUND_BRAND};
object3.wishlistButton = {'marginLeft': 'auto', 'flexShrink': 0};
const env0_9 = Reflect.apply(createStyles, createStylesModule, [object3]);
object.badgePillLightMode = {backgroundColor: BADGE_BACKGROUND_BRAND};
object.wishlistButton = {'marginLeft': 'auto', 'flexShrink': 0};
const env0_9 = Reflect.apply(createStyles, CreateStylesModule, [object]);
value = value.memo(_fun78274);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/CollectiblesShopCardV2.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/native/CollectiblesShopCardV2.tsx');
exports.default = value;
exports.COLLECTIBLES_SHOP_CARD_HEIGHT = r3;
exports.COLLECTIBLES_SHOP_CARD_WIDTH = 150;
exports.COLLECTIBLES_SHOP_CARD_MAX_WIDTH = 180;
exports.COLLECTIBLES_SHOP_CARD_GAP = 16;
}
function CollectiblesShopCardInternalV2({product, onPress, unpublishedAt, collectibleProductState, solidBackground, preferVCPrice, isDisabled, cardWidth, cardStyle, hideWishlistButton, hidePrice, isShopCardImpressionEnabled, disableBundleStaticBackground, muteBundleStaticBackground}) { // fn#78264, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10206:977, offset: 0x01e23229, size: 1734 bytes, params: 2, frame: 46
var r4;
var r20;
var object6;
isDisabled = !(isDisabled === undefined) && isDisabled;
hideWishlistButton = !(hideWishlistButton === undefined) && hideWishlistButton;
hidePrice = !(hidePrice === undefined) && hidePrice;
isShopCardImpressionEnabled = !(isShopCardImpressionEnabled === undefined) && isShopCardImpressionEnabled;
const styles = useStyles();
const selectedProduct = (require(5133) /* metro dependency 5133: CollectiblesProductUtils */).getSelectedProduct(product,
(require(10021) /* metro dependency 10021: useDefaultVariantIndex */).useDefaultVariantIndex(product));
const value4 = (require(10022) /* metro dependency 10022: useTrackShopCardImpression */).useTrackShopCardImpression(product,
selectedProduct, isShopCardImpressionEnabled);
const r34 = cardWidth != null ? {width: cardWidth} : {width: 150};
const value6 = (require(7594) /* metro dependency 7594: useCurrentUser */).useCurrentUser();
const isWishlistableCollectiblesProduct2 = (require(10024) /* metro dependency 10024: CollectiblesWishlistUtils */).isWishlistableCollectiblesProduct(selectedProduct);
const {shouldShowWishlistNUXActionSheet,
showWishlistNUXActionSheet} = (importDefault(10027) /* metro dependency 10027: useWishlistNUXActionSheet */)();
const env0_3 = showWishlistNUXActionSheet;
let binding = env0_3;
const value8 = binding.useCallback(_fun78265, [shouldShowWishlistNUXActionSheet, showWishlistNUXActionSheet,
selectedProduct]);
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const F8FvUy = (require(1244) /* metro dependency 1244: indexNative */).t.F8FvUy;
const value10 = binding.useCallback(_fun78266, [Reflect.apply(string, intl, [F8FvUy])]);
const value11 = (require(10051) /* metro dependency 10051: useTrackShopCardClick */).useTrackShopCardClick({product: product,
analyticsLocations: (importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */)().analyticsLocations});
const {isWishlisted, isBusy,
handleToggle} = (require(10053) /* metro dependency 10053: useWishlistButtonState */).useWishlistButtonState({userId: value6.id,
skuId: selectedProduct.skuId, onAddSuccess: value8, onError: value10});
const value13 = collectibleProductState === 'purchased';
const r1 = value13 || hideWishlistButton;
const value14 = !r1;
const value15 = !isWishlistableCollectiblesProduct2;
const r0 = (r1 ? value14 : !value15) && !isBusy;
binding = env0_3;
const value18 = binding.useMemo(_fun78267, [r0, isWishlisted]);
const value19 = binding.useCallback(_fun78268, [handleToggle]);
const value20 = (require(10054) /* metro dependency 10054: useCanPurchaseFrames */).useIsProfileFramesEarlyAccessPhase('CollectiblesShopCardV2');
const value21 = (require(566) /* metro dependency 566: flux */).useStateFromStores([ThemeStore], function() {
return require(dependencyMap[20]).isThemeDark(ThemeStore.theme);
});
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
const pressableOpacityProps = {ref: value4, style: [styles.card, r34, cardStyle], onPress: onPress_78270,
activeOpacity: 0.8, accessibilityRole: 'button', accessibilityActions: value18, onAccessibilityAction: value19};
const shouldShowLimitedTimeBadge2 = (require(5134) /* metro dependency 5134: CollectiblesUtils */).shouldShowLimitedTimeBadge(unpublishedAt);
const badgeOverride = product.badgeOverride;
const productType = (require(5133) /* metro dependency 5133: CollectiblesProductUtils */).getProductType(product);
const CollectiblesItemType = (require(1904) /* metro dependency 1904: CollectiblesItemType */).CollectiblesItemType;
const PROFILE_FRAME = CollectiblesItemType.PROFILE_FRAME;
if (product.hideBadge) {
r20 = null;
} else {
if (productType === PROFILE_FRAME && value20) {
r4 = <View style={[styles.badgePill,
value21 ? styles.badgePillDarkMode : styles.badgePillLightMode]} accessibilityLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['1m6qcO'])}>{((NitroWheelIcon) => <NitroWheelIcon size="xs" color={value21 ? 'black' : 'white'} />)((require(7954) /* metro dependency 7954: NitroWheelIcon */).NitroWheelIcon)}</View>;
} else if (badgeOverride != null) {
r4 = <View style={[styles.badgePill,
value21 ? styles.badgePillDarkMode : styles.badgePillLightMode]}>{((Text) => <Text variant="text-xs/bold" color={value21 ? 'black' : 'white'} allowFontScaling={false} style={styles.badgeOverrideText} lineClamp={1}>{badgeOverride}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)}</View>;
} else if (shouldShowLimitedTimeBadge2) {
r4 = ((Component) => <Component unpublishedAt={unpublishedAt} style={styles.badge} />)(importDefault(10056) /* metro dependency 10056: LimitedTimeBadge */);
} else if (collectibleProductState !== 'nitroClaim') {
r4 = null;
function CollectiblesShopCardInternalV2({product, onPress, unpublishedAt, collectibleProductState, solidBackground, preferVCPrice, isDisabled, cardWidth, cardStyle, hideWishlistButton, hidePrice, isShopCardImpressionEnabled, disableBundleStaticBackground, muteBundleStaticBackground}) { // fn#78264, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10206:977, offset: 0x01e23229, size: 1734 bytes, params: 2, frame: 46
var r4;
var r20;
var object;
isDisabled = !(isDisabled === undefined) && isDisabled;
hideWishlistButton = !(hideWishlistButton === undefined) && hideWishlistButton;
hidePrice = !(hidePrice === undefined) && hidePrice;
isShopCardImpressionEnabled = !(isShopCardImpressionEnabled === undefined) && isShopCardImpressionEnabled;
const styles = useStyles();
const selectedProduct = (CollectiblesProductUtilsModule).getSelectedProduct(product,
(UseDefaultVariantIndexModule).useDefaultVariantIndex(product));
const value4 = (UseTrackShopCardImpressionModule).useTrackShopCardImpression(product,
selectedProduct, isShopCardImpressionEnabled);
const r34 = cardWidth != null ? {width: cardWidth} : {width: 150};
const value6 = (UseCurrentUserModule).useCurrentUser();
const isWishlistableCollectiblesProduct2 = (CollectiblesWishlistUtilsModule).isWishlistableCollectiblesProduct(selectedProduct);
const {shouldShowWishlistNUXActionSheet,
showWishlistNUXActionSheet} = (UseWishlistNUXActionSheet)();
const showWishlistNUXActionSheet2 = showWishlistNUXActionSheet;
let binding = showWishlistNUXActionSheet2;
const value8 = binding.useCallback(_fun78265, [shouldShowWishlistNUXActionSheet, showWishlistNUXActionSheet,
selectedProduct]);
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const F8FvUy = (require(1244) /* metro dependency 1244: indexNative */).t.F8FvUy;
const value10 = binding.useCallback(_fun78266, [Reflect.apply(string, intl, [F8FvUy])]);
const value11 = (UseTrackShopCardClickModule).useTrackShopCardClick({product: product,
analyticsLocations: (UseAnalyticsLocations)().analyticsLocations});
const {isWishlisted, isBusy,
handleToggle} = (UseWishlistButtonStateModule).useWishlistButtonState({userId: value6.id,
skuId: selectedProduct.skuId, onAddSuccess: value8, onError: value10});
const value13 = collectibleProductState === 'purchased';
const r1 = value13 || hideWishlistButton;
const value14 = !r1;
const value15 = !isWishlistableCollectiblesProduct2;
const r0 = (r1 ? value14 : !value15) && !isBusy;
binding = showWishlistNUXActionSheet2;
const value18 = binding.useMemo(_fun78267, [r0, isWishlisted]);
const value19 = binding.useCallback(_fun78268, [handleToggle]);
const value20 = (UseCanPurchaseFramesModule).useIsProfileFramesEarlyAccessPhase('CollectiblesShopCardV2');
const value21 = (require(566) /* metro dependency 566: flux */).useStateFromStores([ThemeStore], function() {
return require(dependencyMap[20]).isThemeDark(ThemeStore.theme);
});
const PressableOpacity = (PressablesModule).PressableOpacity;
const pressableOpacityProps = {ref: value4, style: [styles.card, r34, cardStyle], onPress: onPress_78270,
activeOpacity: 0.8, accessibilityRole: 'button', accessibilityActions: value18, onAccessibilityAction: value19};
const shouldShowLimitedTimeBadge2 = (CollectiblesUtilsModule).shouldShowLimitedTimeBadge(unpublishedAt);
const badgeOverride = product.badgeOverride;
const productType = (CollectiblesProductUtilsModule).getProductType(product);
const CollectiblesItemType = (CollectiblesItemTypeModule).CollectiblesItemType;
const PROFILE_FRAME = CollectiblesItemType.PROFILE_FRAME;
if (product.hideBadge) {
r20 = null;
} else {
const NitroWheelIcon = (require(7954) /* metro dependency 7954: NitroWheelIcon */).NitroWheelIcon;
r4 = <NitroWheelIcon color="mobile-text-heading-primary" />;
if (productType === PROFILE_FRAME && value20) {
r4 = (
<View
style={[styles.badgePill, value21 ? styles.badgePillDarkMode : styles.badgePillLightMode]}
accessibilityLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['1m6qcO'])}
>
{((NitroWheelIcon) => <NitroWheelIcon size="xs" color={value21 ? 'black' : 'white'} />)((require(7954) /* metro dependency 7954: NitroWheelIcon */).NitroWheelIcon)}
</View>
);
} else if (badgeOverride != null) {
r4 = (
<View style={[styles.badgePill, value21 ? styles.badgePillDarkMode : styles.badgePillLightMode]}>
{((Text) => <Text variant="text-xs/bold" color={value21 ? 'black' : 'white'} allowFontScaling={false} style={styles.badgeOverrideText} lineClamp={1}>{badgeOverride}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)}
</View>
);
} else if (shouldShowLimitedTimeBadge2) {
r4 = ((Component) => <Component unpublishedAt={unpublishedAt} style={styles.badge} />)(importDefault(10056) /* metro dependency 10056: LimitedTimeBadge */);
} else if (collectibleProductState !== 'nitroClaim') {
r4 = null;
} else {
const NitroWheelIcon = (require(7954) /* metro dependency 7954: NitroWheelIcon */).NitroWheelIcon;
r4 = <NitroWheelIcon color="mobile-text-heading-primary" />;
}
r20 = r4;
}
r20 = r4;
return (
<PressableOpacity {...pressableOpacityProps}>
{
r20 != null
? (
<View style={styles.topRowOverlay}>
{r20}
{
r1
? value14
: ((WishlistButtonBase) => <WishlistButtonBase style={styles.wishlistButton} isWishlisted={isWishlisted} onPress={handleToggle} busy={isBusy} disabled={value15} accessibilityHidden onTrackPress={value11} />)((require(10057) /* metro dependency 10057: WishlistButton */).WishlistButtonBase)
}
</View>
)
: (
r1
? null
: (
<View style={styles.topRowOverlay}>
{r20}
{
r1
? value14
: ((WishlistButtonBase) => <WishlistButtonBase style={styles.wishlistButton} isWishlisted={isWishlisted} onPress={handleToggle} busy={isBusy} disabled={value15} accessibilityHidden onTrackPress={value11} />)((require(10057) /* metro dependency 10057: WishlistButton */).WishlistButtonBase)
}
</View>
)
)
}
{((Component) => <Component solidBackground={solidBackground} product={product} isPurchased={value13 || collectibleProductState === 'partiallyOwnedBundle'} isDisabled={isDisabled} disableBundleStaticBackground={disableBundleStaticBackground} muteBundleStaticBackground={muteBundleStaticBackground} />)(importDefault(10062) /* metro dependency 10062: CollectiblesShopCardAssetTileV2 */)}
{((Component) => <Component product={product} collectibleProductState={collectibleProductState} preferVCPrice={preferVCPrice} isDisabled={isDisabled} hidePrice={hidePrice} />)(importDefault(10065) /* metro dependency 10065: CollectiblesShopCardCardDetailsV2 */)}
</PressableOpacity>
);
function _fun78265() { // fn#78265, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10206:1590, offset: 0x01e238ef, size: 29 bytes, params: 1, frame: 11
if (shouldShowWishlistNUXActionSheet) {
showWishlistNUXActionSheet(env0_1);
}
}
function _fun78266() { // fn#78266, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10206:1673, offset: 0x01e2390c, size: 61 bytes, params: 1, frame: 13
const value = environment.__proto__;
(ToastActionCreators).open({key: 'WISHLIST_ERROR',
content: ReactNativeModule.View});
}
function _fun78267() { // fn#78267, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10206:2020, offset: 0x01e23949, size: 125 bytes, params: 1, frame: 17
var r0;
var isWishlistedBinding;
var intl;
var string;
var t;
var value;
if (JsxRuntimeModule.jsxs) {
isWishlistedBinding = isWishlisted;
value = environment.__proto__;
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
string = intl.string;
t = (require(1244) /* metro dependency 1244: indexNative */).t;
r0 = [{name: 'toggleWishlist', label: isWishlistedBinding ? Reflect.apply(string, intl,
[t.yr9TTf]) : Reflect.apply(string, intl, [t['8DkMEQ']])}];
} else {
r0 = undefined;
}
return r0;
}
function _fun78268({nativeEvent}) { // fn#78268, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10206:2176, offset: 0x01e239c6, size: 42 bytes, params: 2, frame: 9
if (nativeEvent.actionName === 'toggleWishlist') {
handleToggle();
}
}
function CollectiblesShopCardInternalV2OnPress() { // fn#78270, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10206:2450, owner: CollectiblesShopCardInternalV2.onPress, offset: 0x01e23a20, size: 47 bytes, params: 1, frame: 12
const binding = env0_5;
const OPEN_DETAILS = ShopCtaEnum.OPEN_DETAILS;
binding(OPEN_DETAILS);
if (onPress != null) {
onPress();
}
}
}
return (
<PressableOpacity {...pressableOpacityProps}>
{r20 != null ? <View style={styles.topRowOverlay}>{r20}{r1 ? value14 : ((WishlistButtonBase) => <WishlistButtonBase style={styles.wishlistButton} isWishlisted={isWishlisted} onPress={handleToggle} busy={isBusy} disabled={value15} accessibilityHidden onTrackPress={value11} />)((require(10057) /* metro dependency 10057: WishlistButton */).WishlistButtonBase)}</View> : r1 ? null : <View style={styles.topRowOverlay}>{r20}{r1 ? value14 : ((WishlistButtonBase) => <WishlistButtonBase style={styles.wishlistButton} isWishlisted={isWishlisted} onPress={handleToggle} busy={isBusy} disabled={value15} accessibilityHidden onTrackPress={value11} />)((require(10057) /* metro dependency 10057: WishlistButton */).WishlistButtonBase)}</View>}
{((Component) => <Component solidBackground={solidBackground} product={product} isPurchased={value13 || collectibleProductState === 'partiallyOwnedBundle'} isDisabled={isDisabled} disableBundleStaticBackground={disableBundleStaticBackground} muteBundleStaticBackground={muteBundleStaticBackground} />)(importDefault(10062) /* metro dependency 10062: CollectiblesShopCardAssetTileV2 */)}
{((Component) => <Component product={product} collectibleProductState={collectibleProductState} preferVCPrice={preferVCPrice} isDisabled={isDisabled} hidePrice={hidePrice} />)(importDefault(10065) /* metro dependency 10065: CollectiblesShopCardCardDetailsV2 */)}
</PressableOpacity>
);
}
function CollectiblesShopCardV2Inner({product, unpublishedAt, solidBackground, preferVCPrice, cardWidth, cardStyle, hideWishlistButton, hidePrice, onPress, disableBundleStaticBackground, muteBundleStaticBackground}) { // fn#78271, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10206:3806, offset: 0x01e23a4f, size: 715 bytes, params: 2, frame: 35
var r0;
var value;
const value2 = (require(10021) /* metro dependency 10021: useDefaultVariantIndex */).useDefaultVariantIndex(product);
const selectedProduct = (require(5133) /* metro dependency 5133: CollectiblesProductUtils */).getSelectedProduct(product,
value2);
const analyticsLocations = (importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */)().analyticsLocations;
const value4 = (require(10023) /* metro dependency 10023: CollectiblesAnalyticsContext */).useCollectiblesAnalyticsContext();
const env0_3 = value4;
const binding = env0_3;
const useCallback = binding.useCallback;
const r18 = onPress ?? Reflect.apply(useCallback, binding, [_fun78272, [analyticsLocations, product, value2,
value4]]);
const value6 = (require(10153) /* metro dependency 10153: CollectiblesShopCardImpressionMobileExperiment */).useIsShopCardImpressionMobileEnabled('CollectiblesShopCardV2');
const useTrackProductCardImpressionModule = require(10154) /* metro dependency 10154: useTrackProductCardImpression */;
const useTrackProductCardImpression = useTrackProductCardImpressionModule.useTrackProductCardImpression;
const handleCardVisibilityChange = Reflect.apply(useTrackProductCardImpression, useTrackProductCardImpressionModule,
[product.skuId]).handleCardVisibilityChange;
const canUseCollectibles2 = (importDefault(3802) /* metro dependency 3802: PremiumUtils */).canUseCollectibles((require(7594) /* metro dependency 7594: useCurrentUser */).useCurrentUser());
const {isPurchased,
isPartiallyOwnedBundle} = (require(10060) /* metro dependency 10060: useProductPurchaseState */).useProductPurchaseState(selectedProduct);
const useProductDisableStateModule = require(10106) /* metro dependency 10106: useProductDisableState */;
const useProductDisableState = useProductDisableStateModule.useProductDisableState;
const isDisabled = Reflect.apply(useProductDisableState, useProductDisableStateModule,
[selectedProduct.skuId]).isDisabled;
const isPremiumCollectiblesProduct2 = (require(5134) /* metro dependency 5134: CollectiblesUtils */).isPremiumCollectiblesProduct(selectedProduct);
const isFreeCollectiblesProduct2 = (require(5134) /* metro dependency 5134: CollectiblesUtils */).isFreeCollectiblesProduct(selectedProduct);
const collectiblesShopCardInternalV2 = <CollectiblesShopCardInternalV2 product={product} onPress={r18} collectibleProductState={env0_3.useMemo(_fun78273,
[isFreeCollectiblesProduct2 || isPremiumCollectiblesProduct2 && canUseCollectibles2, isPartiallyOwnedBundle,
isPurchased,
isPremiumCollectiblesProduct2 && !canUseCollectibles2 && !isFreeCollectiblesProduct2])} unpublishedAt={unpublishedAt} solidBackground={solidBackground} preferVCPrice={preferVCPrice} isDisabled={isDisabled} cardWidth={cardWidth} cardStyle={cardStyle} hideWishlistButton={hideWishlistButton} hidePrice={hidePrice} isShopCardImpressionEnabled={value6} disableBundleStaticBackground={disableBundleStaticBackground} muteBundleStaticBackground={muteBundleStaticBackground} />;
if (value6) {
r0 = collectiblesShopCardInternalV2;
} else {
value = importDefault(10155) /* metro dependency 10155: VisibilitySensor */;
value = ((Component) => <Component onChange={handleCardVisibilityChange}>{collectiblesShopCardInternalV2}</Component>)(value);
r0 = value;
}
return r0;
}
function _fun78274(a0) { // fn#78274, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10206:5342, offset: 0x01e23dd7, size: 140 bytes, params: 2, frame: 19
if (a0 == null) {
throwTypeError(a0, "Cannot destructure 'undefined' or 'null'.", undefined);
throw undefined;
}
const value = copyDataProperties({}, a0, undefined, undefined);
const value3 = (importDefault(6518) /* metro dependency 6518: useInitialValue */)(_fun78275);
const CollectiblesAnalyticsProvider = (require(10023) /* metro dependency 10023: CollectiblesAnalyticsContext */).CollectiblesAnalyticsProvider;
return (
<CollectiblesAnalyticsProvider newValue={value3}>
<CollectiblesShopCardV2Inner {...value} />
</CollectiblesAnalyticsProvider>
);
}
function _fun78265() { // fn#78265, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10206:1590, offset: 0x01e238ef, size: 29 bytes, params: 1, frame: 11
if (shouldShowWishlistNUXActionSheet) {
showWishlistNUXActionSheet(env0_1);
}
}
function _fun78266() { // fn#78266, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10206:1673, offset: 0x01e2390c, size: 61 bytes, params: 1, frame: 13
const value = environment.__proto__;
(importDefault(3857) /* metro dependency 3857: ToastActionCreators */).open({key: 'WISHLIST_ERROR',
content: env0_4});
}
function CollectiblesShopCardV2Inner({product, unpublishedAt, solidBackground, preferVCPrice, cardWidth, cardStyle, hideWishlistButton, hidePrice, onPress, disableBundleStaticBackground, muteBundleStaticBackground}) { // fn#78271, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10206:3806, offset: 0x01e23a4f, size: 715 bytes, params: 2, frame: 35
var r0;
var value;
const value2 = (UseDefaultVariantIndexModule).useDefaultVariantIndex(product);
const selectedProduct = (CollectiblesProductUtilsModule).getSelectedProduct(product,
value2);
const analyticsLocations = (UseAnalyticsLocations)().analyticsLocations;
const value4 = (CollectiblesAnalyticsContextModule).useCollectiblesAnalyticsContext();
const env0_3 = value4;
const binding = env0_3;
const useCallback = binding.useCallback;
const r18 = onPress ?? Reflect.apply(useCallback, binding, [_fun78272, [analyticsLocations, product, value2,
value4]]);
const value6 = (CollectiblesShopCardImpressionMobileExperimentModule).useIsShopCardImpressionMobileEnabled('CollectiblesShopCardV2');
const useTrackProductCardImpression = UseTrackProductCardImpressionModule.useTrackProductCardImpression;
const handleCardVisibilityChange = Reflect.apply(useTrackProductCardImpression, UseTrackProductCardImpressionModule,
[product.skuId]).handleCardVisibilityChange;
const canUseCollectibles2 = (PremiumUtils).canUseCollectibles((UseCurrentUserModule).useCurrentUser());
const {isPurchased,
isPartiallyOwnedBundle} = (UseProductPurchaseStateModule).useProductPurchaseState(selectedProduct);
const useProductDisableState = UseProductDisableStateModule.useProductDisableState;
const isDisabled = Reflect.apply(useProductDisableState, UseProductDisableStateModule,
[selectedProduct.skuId]).isDisabled;
const isPremiumCollectiblesProduct2 = (CollectiblesUtilsModule).isPremiumCollectiblesProduct(selectedProduct);
const isFreeCollectiblesProduct2 = (CollectiblesUtilsModule).isFreeCollectiblesProduct(selectedProduct);
const collectiblesShopCardInternalV2 = (
<CollectiblesShopCardInternalV2
product={product}
onPress={r18}
collectibleProductState={env0_3.useMemo(_fun78273,
[isFreeCollectiblesProduct2 || isPremiumCollectiblesProduct2 && canUseCollectibles2,
isPartiallyOwnedBundle, isPurchased,
isPremiumCollectiblesProduct2 && !canUseCollectibles2 && !isFreeCollectiblesProduct2])}
unpublishedAt={unpublishedAt}
solidBackground={solidBackground}
preferVCPrice={preferVCPrice}
isDisabled={isDisabled}
cardWidth={cardWidth}
cardStyle={cardStyle}
hideWishlistButton={hideWishlistButton}
hidePrice={hidePrice}
isShopCardImpressionEnabled={value6}
disableBundleStaticBackground={disableBundleStaticBackground}
muteBundleStaticBackground={muteBundleStaticBackground}
/>
);
if (value6) {
r0 = collectiblesShopCardInternalV2;
} else {
value = importDefault(10155) /* metro dependency 10155: VisibilitySensor */;
value = ((Component) => <Component onChange={handleCardVisibilityChange}>{collectiblesShopCardInternalV2}</Component>)(value);
r0 = value;
}
return r0;
function _fun78272() { // fn#78272, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10206:4168, offset: 0x01e23d1a, size: 120 bytes, params: 1, frame: 15
const value = environment.__proto__;
const value2 = undefined;
(ActionSheetActionCreators).hideActionSheet();
(require(10085) /* metro dependency 10085: openProductDetailsActionSheet */).openProductDetailsActionSheet({product: product,
initialVariantIndex: env0_1, analyticsLocations: analyticsLocations, shopAnalyticsContext: env0_3 ?? value2});
return value2;
}
function _fun78267() { // fn#78267, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10206:2020, offset: 0x01e23949, size: 125 bytes, params: 1, frame: 17
var r0;
var isWishlistedBinding;
var intl;
var string;
var t;
var value;
if (env0_8) {
isWishlistedBinding = isWishlisted;
value = environment.__proto__;
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
string = intl.string;
t = (require(1244) /* metro dependency 1244: indexNative */).t;
r0 = [{name: 'toggleWishlist', label: isWishlistedBinding ? Reflect.apply(string, intl,
[t.yr9TTf]) : Reflect.apply(string, intl, [t['8DkMEQ']])}];
} else {
r0 = undefined;
}
return r0;
}
function _fun78268({nativeEvent}) { // fn#78268, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10206:2176, offset: 0x01e239c6, size: 42 bytes, params: 2, frame: 9
if (nativeEvent.actionName === 'toggleWishlist') {
handleToggle();
}
}
function _fun78273() { // fn#78273, offset: 0x01e23d92, size: 69 bytes, params: 1, frame: 3
if (isPurchased === true) {
return 'purchased';
}
if (isPartiallyOwnedBundle === true) {
return 'partiallyOwnedBundle';
}
if (CollectiblesShopConstantsModule.ShopCtaEnum === true) {
return 'nitroUpsell';
}
if (JsxRuntimeModule.jsx === true) {
return 'nitroClaim';
}
return null;
}
function CollectiblesShopCardInternalV2OnPress() { // fn#78270, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10206:2450, owner: CollectiblesShopCardInternalV2.onPress, offset: 0x01e23a20, size: 47 bytes, params: 1, frame: 12
const binding = env0_5;
const OPEN_DETAILS = ShopCtaEnum.OPEN_DETAILS;
binding(OPEN_DETAILS);
if (onPress != null) {
onPress();
}
}
function _fun78272() { // fn#78272, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10206:4168, offset: 0x01e23d1a, size: 120 bytes, params: 1, frame: 15
const value = environment.__proto__;
const value2 = undefined;
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
(require(10085) /* metro dependency 10085: openProductDetailsActionSheet */).openProductDetailsActionSheet({product: product,
initialVariantIndex: env0_1, analyticsLocations: analyticsLocations, shopAnalyticsContext: env0_3 ?? value2});
return value2;
}
function _fun78274(a0) { // fn#78274, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10206:5342, offset: 0x01e23dd7, size: 140 bytes, params: 2, frame: 19
if (a0 == null) {
throwTypeError(a0, "Cannot destructure 'undefined' or 'null'.", undefined);
throw undefined;
}
const value = copyDataProperties({}, a0, undefined, undefined);
const value3 = (UseInitialValue)(_fun78275);
const CollectiblesAnalyticsProvider = (CollectiblesAnalyticsContextModule).CollectiblesAnalyticsProvider;
return (
<CollectiblesAnalyticsProvider newValue={value3}>
<CollectiblesShopCardV2Inner {...value} />
</CollectiblesAnalyticsProvider>
);
function _fun78275() { // fn#78275, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10206:5369, offset: 0x01e23e63, size: 44 bytes, params: 1, frame: 12
const object = {};
const value = environment.__proto__;
object.cardId = (require(491) /* metro dependency 491 */).v4();
return object;
}
function _fun78273() { // fn#78273, offset: 0x01e23d92, size: 69 bytes, params: 1, frame: 3
if (isPurchased === true) {
return 'purchased';
}
if (isPartiallyOwnedBundle === true) {
return 'partiallyOwnedBundle';
}
if (env0_6 === true) {
return 'nitroUpsell';
}
if (env0_7 === true) {
return 'nitroClaim';
}
return null;
}
function _fun78275() { // fn#78275, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10206:5369, offset: 0x01e23e63, size: 44 bytes, params: 1, frame: 12
const object2 = {};
const value = environment.__proto__;
object2.cardId = (require(491) /* metro dependency 491 */).v4();
return object2;
}
global.__d(_fun78263, 10020, [31, 27, 1310, 663, 33, 4501, 697, 10021, 5133, 10022, 7594, 10024, 10027, 1244, 3857,
6771, 10051, 10053, 10054, 566, 4002, 5278, 5134, 1904, 7954, 4573, 10056, 10057, 10062, 10065, 10023, 4080,
10085, 10153, 10154, 3802, 10060, 10106, 10155, 6518, 491,
2]) /* metro module 10020, dependencies: [31, 27, 1310, 663, 33, 4501, 697, 10021, 5133, 10022, 7594, 10024, 10027, 1244, 3857, 6771, 10051, 10053, 10054, 566, 4002, 5278, 5134, 1904, 7954, 4573, 10056, 10057, 10062, 10065, 10023, 4080, 10085, 10153, 10154, 3802, 10060, 10106, 10155, 6518, 491, 2] */;
@@ -1,129 +1,137 @@
/* Metro module 10081; source: modules/collectibles/native/CollectiblesShopCardVariants.tsx; dependencies: [31, 27, 33, 4501, 697, 10060, 10082, 6742, 10083, 10021, 5133, 2] */
import Native from '../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import UseIsVariantColorLight from '../hooks/useIsVariantColorLight.tsx'; /* Metro dependency 10082 */
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 CreateStylesModule from '../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as CollectiblesProductUtilsModule from '../utils/CollectiblesProductUtils.tsx'; /* Metro dependency 5133 */
import * as CheckmarkSmallIconModule from '../../../design/components/Icon/native/redesign/generated/CheckmarkSmallIcon.tsx'; /* Metro dependency 6742 */
import * as UseDefaultVariantIndexModule from '../hooks/useDefaultVariantIndex.tsx'; /* Metro dependency 10021 */
import * as UseProductPurchaseStateModule from '../hooks/useProductPurchaseState.tsx'; /* Metro dependency 10060 */
import * as PlusSmallIconModule from '../../../design/components/Icon/native/redesign/generated/PlusSmallIcon.tsx'; /* Metro dependency 10083 */
function _fun78775(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#78775, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10267:6, offset: 0x01e33e88, size: 316 bytes, params: 8, frame: 23
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const env0_3 = (require(27) /* metro dependency 27 */).View;
const value2 = require(33) /* metro dependency 33 */;
const env0_4 = value2.jsx;
const env0_5 = value2.jsxs;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
const PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
const env0_6 = Reflect.apply(createStyles, createStylesModule, [{variantsContainer: {'display': 'flex',
let value = ReactModule;
const createStyles = CreateStylesModule.createStyles;
const PX_4 = (Native).space.PX_4;
const env0_6 = Reflect.apply(createStyles, CreateStylesModule, [{variantsContainer: {'display': 'flex',
'flexDirection': 'row', 'alignItems': 'center', paddingStart: PX_4}}]);
const env0_7 = createStylesModule.createStyles(_fun78776);
const env0_7 = CreateStylesModule.createStyles(_fun78776);
value = value.memo(_fun78780);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/CollectiblesShopCardVariants.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/native/CollectiblesShopCardVariants.tsx');
exports.default = value;
}
function _fun78776(a0) { // fn#78776, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10267:305, offset: 0x01e33fc4, size: 244 bytes, params: 2, frame: 17
const object = {};
const object2 = {'marginStart': null, 'width': 14, 'height': 14, 'borderWidth': 1, 'borderColor': null,
'borderRadius': null, 'justifyContent': 'center', 'alignItems': 'center'};
const PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object2.marginStart = -PX_4;
const value2 = 1;
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object2.borderColor = BACKGROUND_BASE_LOW;
object2.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
object.variantOption = object2;
const object3 = {'width': '100%', 'height': '100%', 'justifyContent': 'center', 'alignItems': 'center'};
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
object3.borderWidth = a0 ? value2 : 0;
const BUTTON_OUTLINE_PRIMARY_TEXT = (importDefault(697) /* metro dependency 697: native */).colors.BUTTON_OUTLINE_PRIMARY_TEXT;
object3.borderColor = BUTTON_OUTLINE_PRIMARY_TEXT;
object.variantOptionInner = object3;
const ICON_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.ICON_MUTED;
object.variantOverflowInner = {backgroundColor: ICON_MUTED};
return object;
}
function _fun78776(a0) { // fn#78776, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10267:305, offset: 0x01e33fc4, size: 244 bytes, params: 2, frame: 17
const object4 = {};
const object5 = {'marginStart': null, 'width': 14, 'height': 14, 'borderWidth': 1, 'borderColor': null,
'borderRadius': null, 'justifyContent': 'center', 'alignItems': 'center'};
const PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object5.marginStart = -PX_4;
const value2 = 1;
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object5.borderColor = BACKGROUND_BASE_LOW;
object5.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
object4.variantOption = object5;
const object6 = {'width': '100%', 'height': '100%', 'justifyContent': 'center', 'alignItems': 'center'};
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
object6.borderWidth = a0 ? value2 : 0;
const BUTTON_OUTLINE_PRIMARY_TEXT = (importDefault(697) /* metro dependency 697: native */).colors.BUTTON_OUTLINE_PRIMARY_TEXT;
object6.borderColor = BUTTON_OUTLINE_PRIMARY_TEXT;
object4.variantOptionInner = object6;
const ICON_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.ICON_MUTED;
object4.variantOverflowInner = {backgroundColor: ICON_MUTED};
return object4;
}
function VariantOption({variant, zIndex, isSelected}) { // fn#78777, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10267:796, offset: 0x01e340b8, size: 191 bytes, params: 2, frame: 20
const styles = useStyles(isSelected);
const useProductPurchaseStateModule = require(10060) /* metro dependency 10060: useProductPurchaseState */;
const useProductPurchaseState = useProductPurchaseStateModule.useProductPurchaseState;
return (
<View style={[styles.variantOption, {zIndex: zIndex}]}>
<View style={[styles.variantOptionInner, {backgroundColor: variant.variantValue}]}>
{Reflect.apply(useProductPurchaseState, useProductPurchaseStateModule,
[variant]).isPurchased && <VariantCheckmark variant={variant} />}
</View>
</View>
);
}
function VariantCheckmark({variant}) { // fn#78778, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10267:1083, offset: 0x01e34177, size: 128 bytes, params: 2, frame: 17
const value2 = (importDefault(10082) /* metro dependency 10082: useIsVariantColorLight */)(variant);
const CheckmarkSmallIcon = (require(6742) /* metro dependency 6742: CheckmarkSmallIcon */).CheckmarkSmallIcon;
const colors = (importDefault(697) /* metro dependency 697: native */).colors;
return <CheckmarkSmallIcon color={value2 ? colors.BLACK : colors.WHITE} size="xxs" />;
}
function VariantOverflowOption(a0) { // fn#78779, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10267:1239, offset: 0x01e341f7, size: 193 bytes, params: 2, frame: 19
const zIndex = a0.zIndex;
const styles = useStyles(a0.isSelected);
const items3 = [styles.variantOption];
items3[1] = {zIndex: zIndex};
const items2 = [styles.variantOptionInner];
items2[1] = styles.variantOverflowInner;
const PlusSmallIcon = (require(10083) /* metro dependency 10083: PlusSmallIcon */).PlusSmallIcon;
const WHITE = (importDefault(697) /* metro dependency 697: native */).colors.WHITE;
return (
<View style={items3}>
<View style={items2}>
<PlusSmallIcon color={WHITE} size="xxs" />
</View>
</View>
);
}
function _fun78780({product}) { // fn#78780, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10267:1480, offset: 0x01e342b8, size: 248 bytes, params: 2, frame: 23
var r5;
var variants;
var length;
var value3;
var value4;
var value5;
var items2;
const styles = useStyles();
const value2 = (require(10021) /* metro dependency 10021: useDefaultVariantIndex */).useDefaultVariantIndex(product);
const collectiblesProductUtilsModule = require(5133) /* metro dependency 5133: CollectiblesProductUtils */;
const getIsVariantProduct = collectiblesProductUtilsModule.getIsVariantProduct;
if (Reflect.apply(getIsVariantProduct, collectiblesProductUtilsModule, [product])) {
variants = product.variants;
length = variants.length;
value3 = 4;
value4 = 3;
r5 = length > value3 ? value4 : length;
var viewBindingProps = {style: styles.variantsContainer};
variants = product.variants;
value5 = 0;
items2 = [variants.slice(value5, r5).map(_fun78781)];
r5 = r5 !== length && <VariantOverflowOption isSelected={value2 >= value4} zIndex={value2 >= value4 ? value3 : value5} />;
items2[1] = r5;
function VariantOption({variant, zIndex, isSelected}) { // fn#78777, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10267:796, offset: 0x01e340b8, size: 191 bytes, params: 2, frame: 20
const styles = useStyles(isSelected);
const useProductPurchaseState = UseProductPurchaseStateModule.useProductPurchaseState;
return (
<View {...viewBindingProps}>
{items2}
<View style={[styles.variantOption, {zIndex: zIndex}]}>
<View style={[styles.variantOptionInner, {backgroundColor: variant.variantValue}]}>
{Reflect.apply(useProductPurchaseState, UseProductPurchaseStateModule,
[variant]).isPurchased && <VariantCheckmark variant={variant} />}
</View>
</View>
);
}
return null;
}
function _fun78781(a0, a1) { // fn#78781, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10267:1699, offset: 0x01e343b0, size: 91 bytes, params: 3, frame: 18
const value = environment.__proto__;
const binding = env0_0;
const Math = global.Math;
return (
<VariantOption
variant={a0}
isSelected={a1 === binding}
zIndex={4 - Math.abs(binding - a1)}
key={a0.variantValue}
/>
);
function VariantCheckmark({variant}) { // fn#78778, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10267:1083, offset: 0x01e34177, size: 128 bytes, params: 2, frame: 17
const value2 = (UseIsVariantColorLight)(variant);
const CheckmarkSmallIcon = (CheckmarkSmallIconModule).CheckmarkSmallIcon;
const colors = (Native).colors;
return <CheckmarkSmallIcon color={value2 ? colors.BLACK : colors.WHITE} size="xxs" />;
}
function VariantOverflowOption(a0) { // fn#78779, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10267:1239, offset: 0x01e341f7, size: 193 bytes, params: 2, frame: 19
const zIndex = a0.zIndex;
const styles = useStyles(a0.isSelected);
const items3 = [styles.variantOption];
items3[1] = {zIndex: zIndex};
const items2 = [styles.variantOptionInner];
items2[1] = styles.variantOverflowInner;
const PlusSmallIcon = (PlusSmallIconModule).PlusSmallIcon;
const WHITE = (Native).colors.WHITE;
return (
<View style={items3}>
<View style={items2}>
<PlusSmallIcon color={WHITE} size="xxs" />
</View>
</View>
);
}
function _fun78780({product}) { // fn#78780, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10267:1480, offset: 0x01e342b8, size: 248 bytes, params: 2, frame: 23
var r5;
var variants;
var length;
var value3;
var value4;
var value5;
var items2;
const styles = useStyles();
const value2 = (UseDefaultVariantIndexModule).useDefaultVariantIndex(product);
const getIsVariantProduct = CollectiblesProductUtilsModule.getIsVariantProduct;
if (Reflect.apply(getIsVariantProduct, CollectiblesProductUtilsModule, [product])) {
variants = product.variants;
length = variants.length;
value3 = 4;
value4 = 3;
r5 = length > value3 ? value4 : length;
var viewBindingProps = {style: styles.variantsContainer};
variants = product.variants;
value5 = 0;
items2 = [variants.slice(value5, r5).map(_fun78781)];
r5 = r5 !== length && <VariantOverflowOption isSelected={value2 >= value4} zIndex={value2 >= value4 ? value3 : value5} />;
items2[1] = r5;
return (
<View {...viewBindingProps}>
{items2}
</View>
);
}
return null;
function _fun78781(a0, a1) { // fn#78781, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10267:1699, offset: 0x01e343b0, size: 91 bytes, params: 3, frame: 18
const value = environment.__proto__;
const binding = env0_0;
const Math = global.Math;
return (
<VariantOption
variant={a0}
isSelected={a1 === binding}
zIndex={4 - Math.abs(binding - a1)}
key={a0.variantValue}
/>
);
}
}
}
global.__d(_fun78775, 10081, [31, 27, 33, 4501, 697, 10060, 10082, 6742, 10083, 10021, 5133,
2]) /* metro module 10081, dependencies: [31, 27, 33, 4501, 697, 10060, 10082, 6742, 10083, 10021, 5133, 2] */;
@@ -1,85 +1,97 @@
/* Metro module 14064; source: modules/collectibles/native/CollectiblesShopCardsGrid.tsx; dependencies: [31, 27, 5121, 33, 4501, 10020, 10023, 14063, 22, 2] */
import CollectiblesCategoryStore from '../CollectiblesCategoryStore.tsx'; /* Metro dependency 5121 */
import CollectiblesShopCardV2 from './CollectiblesShopCardV2.tsx'; /* Metro dependency 10020 */
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 CollectiblesShopCardV2Module from './CollectiblesShopCardV2.tsx'; /* Metro dependency 10020 */
import * as CollectiblesAnalyticsContextModule from '../CollectiblesAnalyticsContext.tsx'; /* Metro dependency 10023 */
import * as UseCardLayoutModule from './hooks/useCardLayout.tsx'; /* Metro dependency 14063 */
function _fun106626(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#106626, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14261:6, offset: 0x022e3411, size: 269 bytes, params: 8, frame: 20
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
let value = ReactNativeModule;
const env0_4 = value.View;
const env0_5 = value.ScrollView;
const collectiblesCategoryStore = importDefault(5121) /* metro dependency 5121: CollectiblesCategoryStore */;
const env0_7 = (require(33) /* metro dependency 33 */).jsx;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
const COLLECTIBLES_SHOP_CARD_GAP = (require(10020) /* metro dependency 10020: CollectiblesShopCardV2 */).COLLECTIBLES_SHOP_CARD_GAP;
const COLLECTIBLES_SHOP_CARD_GAP = (CollectiblesShopCardV2Module).COLLECTIBLES_SHOP_CARD_GAP;
const env0_8 = Reflect.apply(createStyles, value, [{rowContainer: {'justifyContent': 'center',
'flexDirection': 'row', gap: COLLECTIBLES_SHOP_CARD_GAP}}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/CollectiblesShopCardsGrid.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/native/CollectiblesShopCardsGrid.tsx');
exports.default = _default_106629;
function ShopCardGridItem({product, index, cardWidth, preferVCPrice, unpublishedAt, disableBundleStaticBackground, muteBundleStaticBackground}) { // fn#106627, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14261:305, offset: 0x022e351e, size: 188 bytes, params: 2, frame: 22
const value2 = ReactModule.useMemo(function() {
return {tilePosition: index};
}, [index]);
const CollectiblesAnalyticsProvider = (CollectiblesAnalyticsContextModule).CollectiblesAnalyticsProvider;
return (
<CollectiblesAnalyticsProvider newValue={value2}>
{((Component) => <Component unpublishedAt={unpublishedAt} product={product} cardWidth={cardWidth} preferVCPrice={preferVCPrice} disableBundleStaticBackground={disableBundleStaticBackground} muteBundleStaticBackground={muteBundleStaticBackground} />)(CollectiblesShopCardV2)}
</CollectiblesAnalyticsProvider>
);
}
function _default_106629({products, accessibilityLabel, category, preferVCPrice, scrollEnabled, onScroll, paddingTop, paddingBottom, disableBundleStaticBackground, muteBundleStaticBackground}) { // fn#106629, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14261:688, offset: 0x022e35ea, size: 309 bytes, params: 2, frame: 24
scrollEnabled = !(scrollEnabled === undefined) && scrollEnabled;
const env0_5 = useStyles();
const value2 = (UseCardLayoutModule).useCardLayout();
const columns = value2.columns;
const env0_7 = value2.cardWidth;
const value3 = disableBundleStaticBackground.useMemo(_fun106630, [products, columns]);
const COLLECTIBLES_SHOP_CARD_GAP = (CollectiblesShopCardV2Module).COLLECTIBLES_SHOP_CARD_GAP;
return (
<ScrollView
accessibilityLabel={accessibilityLabel}
accessibilityRole="list"
scrollEnabled={scrollEnabled}
showsVerticalScrollIndicator={false}
onScroll={onScroll}
contentContainerStyle={{
gap: COLLECTIBLES_SHOP_CARD_GAP,
paddingTop: paddingTop,
paddingBottom: paddingBottom,
}}
>
{value3.map(_fun106631)}
</ScrollView>
);
function _fun106630() { // fn#106630, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14261:948, offset: 0x022e371f, size: 50 bytes, params: 1, frame: 13
let value = environment.__proto__;
value = importDefault(22) /* metro dependency 22 */;
return value.chunk(products, columns);
}
function _fun106631(a0, a1) { // fn#106631, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14261:1204, offset: 0x022e3751, size: 74 bytes, params: 3, frame: 17
const env0_0 = a1;
return (
<View style={styles.rowContainer} key={a1}>
{a0.map(_fun106632)}
</View>
);
function _fun106632(a0, a1) { // fn#106632, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14261:1253, offset: 0x022e379b, size: 161 bytes, params: 3, frame: 19
return (
<ShopCardGridItem
product={a0}
index={require * columns + a1}
cardWidth={cardWidth}
unpublishedAt={(category ?? CollectiblesCategoryStore.getCategoryForProduct(a0.skuId))?.unpublishedAt}
preferVCPrice={preferVCPrice}
disableBundleStaticBackground={disableBundleStaticBackground}
muteBundleStaticBackground={muteBundleStaticBackground}
key={a0.skuId}
/>
);
}
}
}
}
function ShopCardGridItem({product, index, cardWidth, preferVCPrice, unpublishedAt, disableBundleStaticBackground, muteBundleStaticBackground}) { // fn#106627, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14261:305, offset: 0x022e351e, size: 188 bytes, params: 2, frame: 22
const value2 = env0_3.useMemo(function() {
return {tilePosition: index};
}, [index]);
const CollectiblesAnalyticsProvider = (require(10023) /* metro dependency 10023: CollectiblesAnalyticsContext */).CollectiblesAnalyticsProvider;
return (
<CollectiblesAnalyticsProvider newValue={value2}>
{((Component) => <Component unpublishedAt={unpublishedAt} product={product} cardWidth={cardWidth} preferVCPrice={preferVCPrice} disableBundleStaticBackground={disableBundleStaticBackground} muteBundleStaticBackground={muteBundleStaticBackground} />)(importDefault(10020) /* metro dependency 10020: CollectiblesShopCardV2 */)}
</CollectiblesAnalyticsProvider>
);
}
function _default_106629({products, accessibilityLabel, category, preferVCPrice, scrollEnabled, onScroll, paddingTop, paddingBottom, disableBundleStaticBackground, muteBundleStaticBackground}) { // fn#106629, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14261:688, offset: 0x022e35ea, size: 309 bytes, params: 2, frame: 24
scrollEnabled = !(scrollEnabled === undefined) && scrollEnabled;
const env0_5 = useStyles();
const value2 = (require(14063) /* metro dependency 14063: useCardLayout */).useCardLayout();
const columns = value2.columns;
const env0_7 = value2.cardWidth;
const value3 = disableBundleStaticBackground.useMemo(_fun106630, [products, columns]);
const COLLECTIBLES_SHOP_CARD_GAP = (require(10020) /* metro dependency 10020: CollectiblesShopCardV2 */).COLLECTIBLES_SHOP_CARD_GAP;
return (
<ScrollView
accessibilityLabel={accessibilityLabel}
accessibilityRole="list"
scrollEnabled={scrollEnabled}
showsVerticalScrollIndicator={false}
onScroll={onScroll}
contentContainerStyle={{gap: COLLECTIBLES_SHOP_CARD_GAP, paddingTop: paddingTop,
paddingBottom: paddingBottom}}
>
{value3.map(_fun106631)}
</ScrollView>
);
}
function _fun106630() { // fn#106630, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14261:948, offset: 0x022e371f, size: 50 bytes, params: 1, frame: 13
let value = environment.__proto__;
value = importDefault(22) /* metro dependency 22 */;
return value.chunk(products, columns);
}
function _fun106631(a0, a1) { // fn#106631, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14261:1204, offset: 0x022e3751, size: 74 bytes, params: 3, frame: 17
const env0_0 = a1;
return (
<View style={styles.rowContainer} key={a1}>
{a0.map(_fun106632)}
</View>
);
}
function _fun106632(a0, a1) { // fn#106632, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14261:1253, offset: 0x022e379b, size: 161 bytes, params: 3, frame: 19
return (
<ShopCardGridItem
product={a0}
index={require * columns + a1}
cardWidth={cardWidth}
unpublishedAt={(category ?? CollectiblesCategoryStore.getCategoryForProduct(a0.skuId))?.unpublishedAt}
preferVCPrice={preferVCPrice}
disableBundleStaticBackground={disableBundleStaticBackground}
muteBundleStaticBackground={muteBundleStaticBackground}
key={a0.skuId}
/>
);
}
global.__d(_fun106626, 14064, [31, 27, 5121, 33, 4501, 10020, 10023, 14063, 22,
2]) /* metro module 14064, dependencies: [31, 27, 5121, 33, 4501, 10020, 10023, 14063, 22, 2] */;
@@ -1,13 +1,28 @@
/* Metro module 10116; source: modules/collectibles/native/CollectiblesShopCheckoutDetails.tsx; dependencies: [31, 27, 663, 8471, 33, 4501, 697, 8481, 5475, 10117, 8498, 10031, 7609, 8487, 10030, 8470, 1901, 8483, 1904, 664, 10064, 10063, 7596, 1244, 4573, 5133, 10066, 10118, 7594, 3802, 10080, 2] */
import PremiumUtils from '../../../utils/PremiumUtils.tsx'; /* Metro dependency 3802 */
import UseProfileEffect from '../profile_effects/useProfileEffect.tsx'; /* Metro dependency 8481 */
import Nameplate from '../nameplates/native/Nameplate.tsx'; /* Metro dependency 8483 */
import UseMaybeFetchProfileFrame from '../profile_frames/useMaybeFetchProfileFrame.tsx'; /* Metro dependency 8498 */
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 CollectiblesShopConstantsModule from '../CollectiblesShopConstants.tsx'; /* Metro dependency 663 */
import * as FractionalPremiumSKUsModule from '../../../external/discord_common/js/shared/shared-constants/FractionalPremiumSKUs.tsx'; /* Metro dependency 664 */
import * as IndexNativeModule from '../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as UtilsModule from '../nameplates/utils.tsx'; /* Metro dependency 1901 */
import * as CollectiblesItemTypeModule from '../../../external/discord_common/js/shared/shared-constants/CollectiblesItemType.tsx'; /* Metro dependency 1904 */
import * as TextModule from '../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as UseCurrentUserModule from '../hooks/useCurrentUser.tsx'; /* Metro dependency 7594 */
import * as UseShopProductItemsModule from '../hooks/useShopProductItems.tsx'; /* Metro dependency 7609 */
import * as CollectiblesPreviewConstantsModule from './CollectiblesPreviewConstants.tsx'; /* Metro dependency 8471 */
import * as CollectiblesMobileFlexibleBundlesExperimentModule from '../experiments/CollectiblesMobileFlexibleBundlesExperiment.tsx'; /* Metro dependency 8487 */
import * as GetProductNameModule from '../utils/getProductName.tsx'; /* Metro dependency 10080 */
function _fun78973(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#78973, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10302:6, offset: 0x01e3f2b9, size: 939 bytes, params: 8, frame: 24
var object5;
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 env0_5 = (require(663) /* metro dependency 663: CollectiblesShopConstants */).EXTERNAL_PRODUCT_SKU_IDS;
let value = require(8471) /* metro dependency 8471: CollectiblesPreviewConstants */;
let value = CollectiblesPreviewConstantsModule;
const env0_6 = value.BUNDLE_PREVIEW_CONFIG;
const SAMPLE_PROFILE_ASPECT_RATIO = value.SAMPLE_PROFILE_ASPECT_RATIO;
value = require(33) /* metro dependency 33 */;
@@ -15,37 +30,37 @@ function _fun78973(global, require, importDefault, importAll, module, exports, d
const env0_8 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
let createStyles = value.createStyles;
object5 = {externalProductImage: {'width': 45, 'height': 45}};
const object6 = {'alignItems': 'center', 'justifyContent': 'center', 'overflow': 'hidden'};
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
object5.bundlePreviewContainer = object6;
object5.bundlePreviewScale = {'overflow': 'hidden', 'alignItems': 'center', 'justifyContent': 'center'};
const object9 = {};
object9.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
object9.flexDirection = 'column';
object = {externalProductImage: {'width': 45, 'height': 45}};
let object2 = {'alignItems': 'center', 'justifyContent': 'center', 'overflow': 'hidden'};
object2.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
object.bundlePreviewContainer = object2;
object.bundlePreviewScale = {'overflow': 'hidden', 'alignItems': 'center', 'justifyContent': 'center'};
const object3 = {};
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
object3.flexDirection = 'column';
const BACKGROUND_MOD_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_SUBTLE;
object9.backgroundColor = BACKGROUND_MOD_SUBTLE;
object5.productContainer = object9;
const object11 = {'flexDirection': 'row', 'alignItems': 'center', 'justifyContent': 'space-between'};
object3.backgroundColor = BACKGROUND_MOD_SUBTLE;
object.productContainer = object3;
const object4 = {'flexDirection': 'row', 'alignItems': 'center', 'justifyContent': 'space-between'};
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object11.paddingHorizontal = PX_16;
object4.paddingHorizontal = PX_16;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object11.paddingVertical = PX_16;
object5.productDetailsContainer = object11;
object5.productPreviewContainer = {'justifyContent': 'center', 'alignItems': 'center'};
object4.paddingVertical = PX_16;
object.productDetailsContainer = object4;
object.productPreviewContainer = {'justifyContent': 'center', 'alignItems': 'center'};
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object5.productDetails = {'display': 'flex', 'flexDirection': 'row', 'alignItems': 'center', gap: PX_12};
object.productDetails = {'display': 'flex', 'flexDirection': 'row', 'alignItems': 'center', gap: PX_12};
const PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object5.productDetailsTextContainer = {gap: PX_4};
const object12 = {'height': 36, 'backgroundColor': null, 'justifyContent': 'center'};
object.productDetailsTextContainer = {gap: PX_4};
const object7 = {'height': 36, 'backgroundColor': null, 'justifyContent': 'center'};
const BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
object12.backgroundColor = BACKGROUND_SURFACE_HIGH;
object7.backgroundColor = BACKGROUND_SURFACE_HIGH;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object12.paddingHorizontal = PX_16;
object12.borderBottomLeftRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
object12.borderBottomRightRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
object5.errorContainer = object12;
const env0_9 = Reflect.apply(createStyles, value, [object5]);
object7.paddingHorizontal = PX_16;
object7.borderBottomLeftRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
object7.borderBottomRightRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
object.errorContainer = object7;
const env0_9 = Reflect.apply(createStyles, value, [object]);
const env0_10 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(function(a0) {
var object2 = {borderWidth: 2};
var property = importDefault(dependencyMap[6]).colors;
@@ -56,329 +71,395 @@ function _fun78973(global, require, importDefault, importAll, module, exports, d
});
value = require(4501) /* metro dependency 4501: createStyles */;
createStyles = value.createStyles;
const object13 = {'position': 'relative', 'width': '100%', 'height': '100%', 'borderRadius': null,
const object8 = {'position': 'relative', 'width': '100%', 'height': '100%', 'borderRadius': null,
'overflow': 'hidden'};
object13.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
const env0_11 = Reflect.apply(createStyles, value, [{profileEffectContainer: object13,
object8.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
const env0_11 = Reflect.apply(createStyles, value, [{profileEffectContainer: object8,
profileEffect: {'position': 'absolute', 'width': '100%', 'aspectRatio': null, 'top': 0,
aspectRatio: SAMPLE_PROFILE_ASPECT_RATIO}}]);
value = require(4501) /* metro dependency 4501: createStyles */;
createStyles = value.createStyles;
const object14 = {};
object14.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
const env0_12 = Reflect.apply(createStyles, value, [{nameplate: object14}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/CollectiblesShopCheckoutDetails.tsx');
const object10 = {};
object10.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
const env0_12 = Reflect.apply(createStyles, value, [{nameplate: object10}]);
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/native/CollectiblesShopCheckoutDetails.tsx');
exports.default = CollectiblesShopCheckoutDetails;
}
function ProfileEffectAssetPreview({item}) { // fn#78974, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10302:1758, offset: 0x01e3f664, size: 250 bytes, params: 2, frame: 25
var r0;
var FastImage;
var object2;
var accessibilityLabel;
var profileEffect;
var items2;
var value;
const styles = useStyles();
const value2 = (UseProfileEffect)(item.skuId);
if (value2 == null) {
r0 = null;
} else {
var viewBindingProps = {style: styles.profileEffectContainer};
FastImage = importDefault(5475) /* metro dependency 5475: FastImage */;
object2 = {uri: importDefault(10117) /* metro dependency 10117: sample_profile_smallPng */};
accessibilityLabel = value2.accessibilityLabel;
profileEffect = styles.profileEffect;
items2 = [
<FastImage
source={object2}
alt={accessibilityLabel}
style={profileEffect}
resizeMode="cover"
/>,
];
value = importDefault(5475) /* metro dependency 5475: FastImage */;
profileEffect = styles.profileEffect;
items2[1] = ((Component) => <Component style={profileEffect} source={{uri: value2.thumbnailPreviewSrc}} alt={value2.title} resizeMode="cover" />)(value);
value = (
<View {...viewBindingProps}>
{items2}
</View>
);
r0 = value;
}
return r0;
}
function ProfileEffectAssetPreview({item}) { // fn#78974, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10302:1758, offset: 0x01e3f664, size: 250 bytes, params: 2, frame: 25
var r0;
var FastImage;
var object;
var accessibilityLabel;
var profileEffect;
var items2;
var value;
const styles = useStyles();
const value2 = (importDefault(8481) /* metro dependency 8481: useProfileEffect */)(item.skuId);
if (value2 == null) {
r0 = null;
} else {
var viewBindingProps = {style: styles.profileEffectContainer};
FastImage = importDefault(5475) /* metro dependency 5475: FastImage */;
object = {uri: importDefault(10117) /* metro dependency 10117: sample_profile_smallPng */};
accessibilityLabel = value2.accessibilityLabel;
profileEffect = styles.profileEffect;
items2 = [<FastImage source={object} alt={accessibilityLabel} style={profileEffect} resizeMode="cover" />];
value = importDefault(5475) /* metro dependency 5475: FastImage */;
profileEffect = styles.profileEffect;
items2[1] = ((Component) => <Component style={profileEffect} source={{uri: value2.thumbnailPreviewSrc}} alt={value2.title} resizeMode="cover" />)(value);
value = <View {...viewBindingProps}>{items2}</View>;
r0 = value;
function ProfileFrameAssetPreview({item, width, height}) { // fn#78975, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10302:2102, offset: 0x01e3f75e, size: 146 bytes, params: 2, frame: 19
var r0;
var value;
const value2 = (UseMaybeFetchProfileFrame)(item.skuId,
'CollectiblesShopCheckoutDetails');
if (value2 == null) {
r0 = null;
} else {
value = importDefault(10031) /* metro dependency 10031: ProfileFrameSamplePreview */;
value = ((Component) => <Component profileFrame={value2} previewWidth={width} previewHeight={height} profileBackgroundColor={(importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW} />)(value);
r0 = value;
}
return r0;
}
return r0;
}
function ProfileFrameAssetPreview({item, width, height}) { // fn#78975, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10302:2102, offset: 0x01e3f75e, size: 146 bytes, params: 2, frame: 19
var r0;
var value;
const value2 = (importDefault(8498) /* metro dependency 8498: useMaybeFetchProfileFrame */)(item.skuId,
'CollectiblesShopCheckoutDetails');
if (value2 == null) {
r0 = null;
} else {
value = importDefault(10031) /* metro dependency 10031: ProfileFrameSamplePreview */;
value = ((Component) => <Component profileFrame={value2} previewWidth={width} previewHeight={height} profileBackgroundColor={(importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW} />)(value);
r0 = value;
}
return r0;
}
function BundleAssetPreview({product, width, height}) { // fn#78976, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10302:2359, offset: 0x01e3f7f0, size: 466 bytes, params: 2, frame: 27
var r0;
var object2;
var value;
const styles = useStyles();
const {firstProfileEffect, firstAvatarDecoration,
firstNameplate} = (UseShopProductItemsModule).useShopProductItems(product);
const useCollectiblesMobileFlexibleBundlesExperiment = CollectiblesMobileFlexibleBundlesExperimentModule.useCollectiblesMobileFlexibleBundlesExperiment;
const enabled = Reflect.apply(useCollectiblesMobileFlexibleBundlesExperiment,
CollectiblesMobileFlexibleBundlesExperimentModule, ['CollectiblesShopCheckoutDetails']).enabled;
const bundleWidth = BUNDLE_PREVIEW_CONFIG.small.bundleWidth;
const bundleWidth2 = bundleWidth;
const r7 = enabled ? bundleWidth : global.Math.round(1.1494252873563218 * bundleWidth);
const value4 = width / r7;
let binding = bundleWidth2;
let useMemo = binding.useMemo;
let object = [styles.bundlePreviewContainer, width, height];
const value5 = Reflect.apply(useMemo, binding, [function() {
return [styles.bundlePreviewContainer, {width: width, height: height}];
}, object]);
binding = bundleWidth2;
useMemo = binding.useMemo;
if ((require(10030) /* metro dependency 10030: bundleUtils */).isValidCollectiblesBundle(product)) {
object = {style: value5};
object2 = {style: Reflect.apply(useMemo, binding, [_fun78978, [styles.bundlePreviewScale, bundleWidth, r7,
value4]])};
value = importDefault(8470) /* metro dependency 8470: BundleSampleV2 */;
value = (
<View {...object}>
<View {...object2}>
{((Component) => <Component deco={firstAvatarDecoration} pfx={firstProfileEffect} nameplate={firstNameplate} previewAssets={product.previewAssets} disableStaticBackground size="small" exposureLocation="CollectiblesShopCheckoutDetails" />)(value)}
</View>
</View>
);
r0 = value;
} else {
r0 = null;
}
return r0;
function _fun78978() { // fn#78978, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10302:2806, offset: 0x01e3f9ef, size: 68 bytes, params: 1, frame: 4
return [styles.bundlePreviewScale, {width: bundleWidth, height: ReactNativeModule.View, transform: [{scale: CollectiblesShopConstantsModule.EXTERNAL_PRODUCT_SKU_IDS}]}];
}
function BundleAssetPreview({product, width, height}) { // fn#78976, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10302:2359, offset: 0x01e3f7f0, size: 466 bytes, params: 2, frame: 27
var r0;
var object3;
var value;
const styles = useStyles();
const {firstProfileEffect, firstAvatarDecoration,
firstNameplate} = (require(7609) /* metro dependency 7609: useShopProductItems */).useShopProductItems(product);
const collectiblesMobileFlexibleBundlesExperimentModule = require(8487) /* metro dependency 8487: CollectiblesMobileFlexibleBundlesExperiment */;
const useCollectiblesMobileFlexibleBundlesExperiment = collectiblesMobileFlexibleBundlesExperimentModule.useCollectiblesMobileFlexibleBundlesExperiment;
const enabled = Reflect.apply(useCollectiblesMobileFlexibleBundlesExperiment,
collectiblesMobileFlexibleBundlesExperimentModule, ['CollectiblesShopCheckoutDetails']).enabled;
const bundleWidth = BUNDLE_PREVIEW_CONFIG.small.bundleWidth;
const env0_3 = bundleWidth;
const r7 = enabled ? bundleWidth : global.Math.round(1.1494252873563218 * bundleWidth);
const value4 = width / r7;
let binding = env0_3;
let useMemo = binding.useMemo;
let object = [styles.bundlePreviewContainer, width, height];
const value5 = Reflect.apply(useMemo, binding, [function() {
return [styles.bundlePreviewContainer, {width: width, height: height}];
}, object]);
binding = env0_3;
useMemo = binding.useMemo;
if ((require(10030) /* metro dependency 10030: bundleUtils */).isValidCollectiblesBundle(product)) {
object = {style: value5};
object3 = {style: Reflect.apply(useMemo, binding, [_fun78978, [styles.bundlePreviewScale, bundleWidth, r7,
value4]])};
value = importDefault(8470) /* metro dependency 8470: BundleSampleV2 */;
value = <View {...object}><View {...object3}>{((Component) => <Component deco={firstAvatarDecoration} pfx={firstProfileEffect} nameplate={firstNameplate} previewAssets={product.previewAssets} disableStaticBackground size="small" exposureLocation="CollectiblesShopCheckoutDetails" />)(value)}</View></View>;
r0 = value;
} else {
r0 = null;
}
return r0;
}
function NameplateAssetPreview({item}) { // fn#78979, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10302:3163, offset: 0x01e3fa33, size: 110 bytes, params: 2, frame: 16
const styles = useStyles();
return ((Component) => <Component nameplate={(require(1901) /* metro dependency 1901: utils */).getNameplateData(item)} fullOpacity isSquarePreview style={styles.nameplate} />)(importDefault(8483) /* metro dependency 8483: Nameplate */);
}
function NameplateAssetPreview({item}) { // fn#78979, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10302:3163, offset: 0x01e3fa33, size: 110 bytes, params: 2, frame: 16
const styles = useStyles();
return ((Component) => <Component nameplate={(UtilsModule).getNameplateData(item)} fullOpacity isSquarePreview style={styles.nameplate} />)(Nameplate);
}
function CollectibleProductPreview({product, recipientUser}) { // fn#78980, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10302:3330, offset: 0x01e3faa1, size: 230 bytes, params: 2, frame: 22
const styles = useStyles();
const type = product.type;
const CollectiblesItemType = (require(1904) /* metro dependency 1904: CollectiblesItemType */).CollectiblesItemType;
const PROFILE_EFFECT = CollectiblesItemType.PROFILE_EFFECT;
const r9 = type === PROFILE_EFFECT ? 42 : product.type !== (require(1904) /* metro dependency 1904: CollectiblesItemType */).CollectiblesItemType.PROFILE_FRAME ? 55 : 42;
return (
<View style={[styles.productPreviewContainer, {height: 55, width: r9}]}>
<CollectibleProductPreviewContent
product={product}
width={r9}
height={55}
userAvatarSource={recipientUser?.getAvatarSource(undefined, false, r9)}
/>
</View>
);
}
function CollectibleProductPreviewContent({product, width, height, userAvatarSource}) { // fn#78981, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10302:3730, offset: 0x01e3fb87, size: 638 bytes, params: 2, frame: 21
const styles = useStyles();
const FractionalPremiumSKUsSets = (require(664) /* metro dependency 664: FractionalPremiumSKUs */).FractionalPremiumSKUsSets;
const ALL = FractionalPremiumSKUsSets.ALL;
const has = ALL.has;
let skuId = product.skuId;
if (Reflect.apply(has, ALL, [skuId])) {
return ((Component) => <Component source={{uri: importDefault(10064) /* metro dependency 10064: mobile_fraction_nitro_2xPng */}} style={styles.externalProductImage} />)(importDefault(5475) /* metro dependency 5475: FastImage */);
}
skuId = product.skuId;
const ORB_PROFILE_BADGE = EXTERNAL_PRODUCT_SKU_IDS.ORB_PROFILE_BADGE;
if (skuId === ORB_PROFILE_BADGE) {
return ((Component) => <Component source={{uri: importDefault(10063) /* metro dependency 10063: orb_profile_badge_icon2xPng */}} style={styles.externalProductImage} />)(importDefault(5475) /* metro dependency 5475: FastImage */);
}
const type = product.type;
const CollectiblesItemType = (require(1904) /* metro dependency 1904: CollectiblesItemType */).CollectiblesItemType;
const AVATAR_DECORATION = CollectiblesItemType.AVATAR_DECORATION;
if (AVATAR_DECORATION === type) {
return ((Component) => <Component item={product.items[0]} size={width} avatarSource={userAvatarSource} animate={false} />)(importDefault(7596) /* metro dependency 7596: AvatarDecorationSampleV2 */);
}
const PROFILE_EFFECT = CollectiblesItemType.PROFILE_EFFECT;
if (PROFILE_EFFECT === type) {
return <ProfileEffectAssetPreview item={product.items[0]} />;
}
const NAMEPLATE = CollectiblesItemType.NAMEPLATE;
if (NAMEPLATE === type) {
return <NameplateAssetPreview item={product.items[0]} />;
}
const PROFILE_FRAME = CollectiblesItemType.PROFILE_FRAME;
if (PROFILE_FRAME === type) {
function CollectibleProductPreview({product, recipientUser}) { // fn#78980, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10302:3330, offset: 0x01e3faa1, size: 230 bytes, params: 2, frame: 22
const styles = useStyles();
const type = product.type;
const CollectiblesItemType = (require(1904) /* metro dependency 1904: CollectiblesItemType */).CollectiblesItemType;
const PROFILE_EFFECT = CollectiblesItemType.PROFILE_EFFECT;
const r9 = type === PROFILE_EFFECT ? 42 : product.type !== (require(1904) /* metro dependency 1904: CollectiblesItemType */).CollectiblesItemType.PROFILE_FRAME ? 55 : 42;
return (
<ProfileFrameAssetPreview
item={product.items[0]}
width={width}
height={height}
/>
<View style={[styles.productPreviewContainer, {height: 55, width: r9}]}>
<CollectibleProductPreviewContent
product={product}
width={r9}
height={55}
userAvatarSource={recipientUser?.getAvatarSource(undefined, false, r9)}
/>
</View>
);
}
const BUNDLE = CollectiblesItemType.BUNDLE;
if (BUNDLE === type) {
return (
<BundleAssetPreview
product={product}
width={width}
height={height}
/>
function CollectibleProductPreviewContent({product, width, height, userAvatarSource}) { // fn#78981, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10302:3730, offset: 0x01e3fb87, size: 638 bytes, params: 2, frame: 21
const styles = useStyles();
const FractionalPremiumSKUsSets = (FractionalPremiumSKUsModule).FractionalPremiumSKUsSets;
const ALL = FractionalPremiumSKUsSets.ALL;
const has = ALL.has;
let skuId = product.skuId;
if (Reflect.apply(has, ALL, [skuId])) {
return ((Component) => <Component source={{uri: importDefault(10064) /* metro dependency 10064: mobile_fraction_nitro_2xPng */}} style={styles.externalProductImage} />)(importDefault(5475) /* metro dependency 5475: FastImage */);
}
skuId = product.skuId;
const ORB_PROFILE_BADGE = EXTERNAL_PRODUCT_SKU_IDS.ORB_PROFILE_BADGE;
if (skuId === ORB_PROFILE_BADGE) {
return ((Component) => <Component source={{uri: importDefault(10063) /* metro dependency 10063: orb_profile_badge_icon2xPng */}} style={styles.externalProductImage} />)(importDefault(5475) /* metro dependency 5475: FastImage */);
}
const type = product.type;
const CollectiblesItemType = (CollectiblesItemTypeModule).CollectiblesItemType;
const AVATAR_DECORATION = CollectiblesItemType.AVATAR_DECORATION;
if (AVATAR_DECORATION === type) {
return ((Component) => <Component item={product.items[0]} size={width} avatarSource={userAvatarSource} animate={false} />)(importDefault(7596) /* metro dependency 7596: AvatarDecorationSampleV2 */);
}
const PROFILE_EFFECT = CollectiblesItemType.PROFILE_EFFECT;
if (PROFILE_EFFECT === type) {
return <ProfileEffectAssetPreview item={product.items[0]} />;
}
const NAMEPLATE = CollectiblesItemType.NAMEPLATE;
if (NAMEPLATE === type) {
return <NameplateAssetPreview item={product.items[0]} />;
}
const PROFILE_FRAME = CollectiblesItemType.PROFILE_FRAME;
if (PROFILE_FRAME === type) {
return (
<ProfileFrameAssetPreview
item={product.items[0]}
width={width}
height={height}
/>
);
}
const BUNDLE = CollectiblesItemType.BUNDLE;
if (BUNDLE === type) {
return (
<BundleAssetPreview
product={product}
width={width}
height={height}
/>
);
}
return null;
}
function ProductDetails({product, recipientUser}) { // fn#78982, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10302:4638, offset: 0x01e3fe05, size: 379 bytes, params: 2, frame: 28
var view;
var items3;
const Text = (TextModule).Text;
var items2;
const styles = useStyles();
const value2 = ReactModule.useMemo(_fun78983, [product.type, product.skuId]);
if (value2 == null) {
view = (
<View style={styles.productDetails}>
<Text variant="text-md/semibold">
{product.name}
</Text>
</View>
);
} else {
var viewBindingProps = {style: styles.productDetails};
items3 = [
<CollectibleProductPreview product={product} recipientUser={recipientUser} />,
];
var viewBinding2Props = {style: styles.productDetailsTextContainer};
items2 = [
<Text variant="text-md/semibold">
{product.name}
</Text>,
];
items2[1] = (
<Text variant="text-sm/medium">
{value2}
</Text>
);
items3[1] = (
<View {...viewBinding2Props}>
{items2}
</View>
);
view = (
<View {...viewBindingProps}>
{items3}
</View>
);
}
return view;
function _fun78983() { // fn#78983, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10302:4714, offset: 0x01e3ff80, size: 684 bytes, params: 1, frame: 15
const intl = (IndexNativeModule).intl;
const t = (IndexNativeModule).t;
const FractionalPremiumSKUsSets = (FractionalPremiumSKUsModule).FractionalPremiumSKUsSets;
const ALL = FractionalPremiumSKUsSets.ALL;
const has = ALL.has;
let skuId = product.skuId;
if (Reflect.apply(has, ALL, [skuId])) {
return intl.string(t.DFMPWS);
}
skuId = product.skuId;
const ORB_PROFILE_BADGE = EXTERNAL_PRODUCT_SKU_IDS.ORB_PROFILE_BADGE;
if (skuId === ORB_PROFILE_BADGE) {
return intl.string(t['0+rBWT']);
}
const type = product.type;
const CollectiblesItemType = (CollectiblesItemTypeModule).CollectiblesItemType;
const AVATAR_DECORATION = CollectiblesItemType.AVATAR_DECORATION;
if (AVATAR_DECORATION === type) {
return intl.string(t['7v0T9P']);
}
const PROFILE_EFFECT = CollectiblesItemType.PROFILE_EFFECT;
if (PROFILE_EFFECT === type) {
return intl.string(t.wR5wOo);
}
const NAMEPLATE = CollectiblesItemType.NAMEPLATE;
if (NAMEPLATE === type) {
return intl.string(t.x5CoXR);
}
const PROFILE_FRAME = CollectiblesItemType.PROFILE_FRAME;
if (PROFILE_FRAME === type) {
return intl.string(t.GWrZOd);
}
const BUNDLE = CollectiblesItemType.BUNDLE;
if (BUNDLE === type) {
return intl.string(t.Zr5tjn);
}
return null;
}
}
function ProductPriceAmountTag({product, hasShopDiscount, useOrbPrice}) { // fn#78984, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10302:5822, offset: 0x01e4022c, size: 198 bytes, params: 2, frame: 17
var r0;
var value;
const {orbPrice, priceText} = ReactModule.useMemo(_fun78985, [product, hasShopDiscount, useOrbPrice]);
if (useOrbPrice) {
value = undefined;
value = ((Component) => <Component orbAmount={orbPrice == null ? value : orbPrice.amount} />)(importDefault(10118) /* metro dependency 10118: OrbCheckoutAmountTag */);
r0 = value;
} else {
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
r0 = (
<Text variant="text-md/semibold">
{priceText}
</Text>
);
}
return r0;
function _fun78985() { // fn#78985, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10302:5915, offset: 0x01e402f2, size: 126 bytes, params: 1, frame: 19
var r1;
var r2;
var value3;
var moduleValue;
var value4;
var productOrbPrice;
if (useOrbPrice) {
value4 = undefined;
productOrbPrice = (require(5133) /* metro dependency 5133: CollectiblesProductUtils */).getProductOrbPrice({product: product,
hasShopDiscount: hasShopDiscount});
r1 = value4;
r2 = productOrbPrice;
} else {
value3 = undefined;
moduleValue = require(10066) /* metro dependency 10066: CollectiblesUtils */;
r1 = moduleValue.getFormattedPriceForCollectiblesProduct(product, hasShopDiscount, true);
r2 = value3;
}
return {orbPrice: r2, priceText: r1};
}
}
function CollectiblesShopCheckoutDetails({product, recipientUser, isValidRecipient, useOrbPrice, isGift}) { // fn#78987, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10302:6342, offset: 0x01e403de, size: 507 bytes, params: 2, frame: 28
var Text;
var intl;
isValidRecipient = !(isValidRecipient === undefined) && isValidRecipient;
useOrbPrice = !(useOrbPrice === undefined) && useOrbPrice;
isGift = !(isGift === undefined) && isGift;
const styles = useStyles();
const styles2 = useStyles(isValidRecipient);
const canUseShopDiscounts2 = (PremiumUtils).canUseShopDiscounts((UseCurrentUserModule).useCurrentUser());
const value3 = ReactModule.useMemo(_fun78988, [product, useOrbPrice, canUseShopDiscounts2]);
const items2 = [styles.productContainer];
items2[1] = isGift && styles2.giftProductContainer;
const view = (
<View
style={styles.productDetailsContainer}
accessibilityLabel={value3}
accessible
>
<ProductDetails product={product} recipientUser={recipientUser} />
<ProductPriceAmountTag
product={product}
hasShopDiscount={canUseShopDiscounts2}
useOrbPrice={useOrbPrice}
/>
</View>
);
let r5 = isGift && !isValidRecipient;
if (r5) {
var viewBinding3Props = {style: styles.errorContainer};
Text = (require(4573) /* metro dependency 4573: Text */).Text;
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
r5 = (
<View {...viewBinding3Props}>
<Text variant="text-xs/semibold" color="text-feedback-critical">
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['3YfczA'])}
</Text>
</View>
);
}
return (
<View style={items2}>
{view}
{r5}
</View>
);
function _fun78988() { // fn#78988, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10302:6555, offset: 0x01e405d9, size: 275 bytes, params: 1, frame: 22
var r3;
var amount;
var intl;
var formatToPlainString;
var W4DfeF;
let value = environment.__proto__;
const value2 = undefined;
const productNameAndTypeLabel = (GetProductNameModule).getProductNameAndTypeLabel(product);
if (useOrbPrice) {
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
formatToPlainString = intl.formatToPlainString;
W4DfeF = (require(1244) /* metro dependency 1244: indexNative */).t.W4DfeF;
value = require(5133) /* metro dependency 5133: CollectiblesProductUtils */;
value = value.getProductOrbPrice({product: product, hasShopDiscount: env0_2});
amount = value == null ? value2 : value.amount;
value = '';
value = Reflect.apply(formatToPlainString, intl, [W4DfeF, {orbAmount: amount ?? value}]);
r3 = value;
} else {
value = require(10066) /* metro dependency 10066: CollectiblesUtils */;
value = value.getFormattedPriceForCollectiblesProduct(product, env0_2, true);
r3 = value ?? '';
}
return '' + productNameAndTypeLabel + ', ' + r3;
}
}
return null;
}
function ProductDetails({product, recipientUser}) { // fn#78982, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10302:4638, offset: 0x01e3fe05, size: 379 bytes, params: 2, frame: 28
var view;
var items3;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
var items2;
const styles = useStyles();
const value2 = env0_3.useMemo(_fun78983, [product.type, product.skuId]);
if (value2 == null) {
view = <View style={styles.productDetails}><Text variant="text-md/semibold">{product.name}</Text></View>;
} else {
var viewBindingProps = {style: styles.productDetails};
items3 = [<CollectibleProductPreview product={product} recipientUser={recipientUser} />];
var viewBinding2Props = {style: styles.productDetailsTextContainer};
items2 = [<Text variant="text-md/semibold">{product.name}</Text>];
items2[1] = <Text variant="text-sm/medium">{value2}</Text>;
items3[1] = <View {...viewBinding2Props}>{items2}</View>;
view = <View {...viewBindingProps}>{items3}</View>;
}
return view;
}
function ProductPriceAmountTag({product, hasShopDiscount, useOrbPrice}) { // fn#78984, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10302:5822, offset: 0x01e4022c, size: 198 bytes, params: 2, frame: 17
var r0;
var value;
const {orbPrice, priceText} = env0_3.useMemo(_fun78985, [product, hasShopDiscount, useOrbPrice]);
if (useOrbPrice) {
value = undefined;
value = ((Component) => <Component orbAmount={orbPrice == null ? value : orbPrice.amount} />)(importDefault(10118) /* metro dependency 10118: OrbCheckoutAmountTag */);
r0 = value;
} else {
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
r0 = <Text variant="text-md/semibold">{priceText}</Text>;
}
return r0;
}
function CollectiblesShopCheckoutDetails({product, recipientUser, isValidRecipient, useOrbPrice, isGift}) { // fn#78987, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10302:6342, offset: 0x01e403de, size: 507 bytes, params: 2, frame: 28
var Text;
var intl;
isValidRecipient = !(isValidRecipient === undefined) && isValidRecipient;
useOrbPrice = !(useOrbPrice === undefined) && useOrbPrice;
isGift = !(isGift === undefined) && isGift;
const styles = useStyles();
const styles2 = useStyles(isValidRecipient);
const canUseShopDiscounts2 = (importDefault(3802) /* metro dependency 3802: PremiumUtils */).canUseShopDiscounts((require(7594) /* metro dependency 7594: useCurrentUser */).useCurrentUser());
const value3 = env0_3.useMemo(_fun78988, [product, useOrbPrice, canUseShopDiscounts2]);
const items2 = [styles.productContainer];
items2[1] = isGift && styles2.giftProductContainer;
const view = <View style={styles.productDetailsContainer} accessibilityLabel={value3} accessible><ProductDetails product={product} recipientUser={recipientUser} /><ProductPriceAmountTag product={product} hasShopDiscount={canUseShopDiscounts2} useOrbPrice={useOrbPrice} /></View>;
let r5 = isGift && !isValidRecipient;
if (r5) {
var viewBinding3Props = {style: styles.errorContainer};
Text = (require(4573) /* metro dependency 4573: Text */).Text;
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
r5 = <View {...viewBinding3Props}><Text variant="text-xs/semibold" color="text-feedback-critical">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['3YfczA'])}</Text></View>;
}
return (
<View style={items2}>
{view}
{r5}
</View>
);
}
function _fun78978() { // fn#78978, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10302:2806, offset: 0x01e3f9ef, size: 68 bytes, params: 1, frame: 4
return [styles.bundlePreviewScale, {width: bundleWidth, height: env0_4, transform: [{scale: env0_5}]}];
}
function _fun78983() { // fn#78983, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10302:4714, offset: 0x01e3ff80, size: 684 bytes, params: 1, frame: 15
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const FractionalPremiumSKUsSets = (require(664) /* metro dependency 664: FractionalPremiumSKUs */).FractionalPremiumSKUsSets;
const ALL = FractionalPremiumSKUsSets.ALL;
const has = ALL.has;
let skuId = product.skuId;
if (Reflect.apply(has, ALL, [skuId])) {
return intl.string(t.DFMPWS);
}
skuId = product.skuId;
const ORB_PROFILE_BADGE = EXTERNAL_PRODUCT_SKU_IDS.ORB_PROFILE_BADGE;
if (skuId === ORB_PROFILE_BADGE) {
return intl.string(t['0+rBWT']);
}
const type = product.type;
const CollectiblesItemType = (require(1904) /* metro dependency 1904: CollectiblesItemType */).CollectiblesItemType;
const AVATAR_DECORATION = CollectiblesItemType.AVATAR_DECORATION;
if (AVATAR_DECORATION === type) {
return intl.string(t['7v0T9P']);
}
const PROFILE_EFFECT = CollectiblesItemType.PROFILE_EFFECT;
if (PROFILE_EFFECT === type) {
return intl.string(t.wR5wOo);
}
const NAMEPLATE = CollectiblesItemType.NAMEPLATE;
if (NAMEPLATE === type) {
return intl.string(t.x5CoXR);
}
const PROFILE_FRAME = CollectiblesItemType.PROFILE_FRAME;
if (PROFILE_FRAME === type) {
return intl.string(t.GWrZOd);
}
const BUNDLE = CollectiblesItemType.BUNDLE;
if (BUNDLE === type) {
return intl.string(t.Zr5tjn);
}
return null;
}
function _fun78985() { // fn#78985, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10302:5915, offset: 0x01e402f2, size: 126 bytes, params: 1, frame: 19
var r1;
var r2;
var value3;
var moduleValue;
var value4;
var productOrbPrice;
if (useOrbPrice) {
value4 = undefined;
productOrbPrice = (require(5133) /* metro dependency 5133: CollectiblesProductUtils */).getProductOrbPrice({product: product,
hasShopDiscount: hasShopDiscount});
r1 = value4;
r2 = productOrbPrice;
} else {
value3 = undefined;
moduleValue = require(10066) /* metro dependency 10066: CollectiblesUtils */;
r1 = moduleValue.getFormattedPriceForCollectiblesProduct(product, hasShopDiscount, true);
r2 = value3;
}
return {orbPrice: r2, priceText: r1};
}
function _fun78988() { // fn#78988, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10302:6555, offset: 0x01e405d9, size: 275 bytes, params: 1, frame: 22
var r3;
var amount;
var intl;
var formatToPlainString;
var W4DfeF;
let value = environment.__proto__;
const value2 = undefined;
const productNameAndTypeLabel = (require(10080) /* metro dependency 10080: getProductName */).getProductNameAndTypeLabel(product);
if (useOrbPrice) {
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
formatToPlainString = intl.formatToPlainString;
W4DfeF = (require(1244) /* metro dependency 1244: indexNative */).t.W4DfeF;
value = require(5133) /* metro dependency 5133: CollectiblesProductUtils */;
value = value.getProductOrbPrice({product: product, hasShopDiscount: env0_2});
amount = value == null ? value2 : value.amount;
value = '';
value = Reflect.apply(formatToPlainString, intl, [W4DfeF, {orbAmount: amount ?? value}]);
r3 = value;
} else {
value = require(10066) /* metro dependency 10066: CollectiblesUtils */;
value = value.getFormattedPriceForCollectiblesProduct(product, env0_2, true);
r3 = value ?? '';
}
return '' + productNameAndTypeLabel + ', ' + r3;
}
global.__d(_fun78973, 10116, [31, 27, 663, 8471, 33, 4501, 697, 8481, 5475, 10117, 8498, 10031, 7609, 8487, 10030,
8470, 1901, 8483, 1904, 664, 10064, 10063, 7596, 1244, 4573, 5133, 10066, 10118, 7594, 3802, 10080,
2]) /* metro module 10116, dependencies: [31, 27, 663, 8471, 33, 4501, 697, 8481, 5475, 10117, 8498, 10031, 7609, 8487, 10030, 8470, 1901, 8483, 1904, 664, 10064, 10063, 7596, 1244, 4573, 5133, 10066, 10118, 7594, 3802, 10080, 2] */;
@@ -1,119 +1,132 @@
/* Metro module 14912; source: modules/collectibles/native/CollectiblesShopEntryButton.tsx; dependencies: [57, 31, 5174, 1376, 33, 7013, 1365, 14908, 10358, 1244, 14913, 632, 12712, 5154, 10357, 2] */
import Module00057 from '../../../by-id/module-00057.js'; /* Metro dependency 57 */
import CollectiblesMarketingsStore from '../CollectiblesMarketingsStore.tsx'; /* Metro dependency 5174 */
import YouScreenNavIcon from '../../main_tabs_v2/native/tabs/you/YouScreenNavIcon.tsx'; /* Metro dependency 14908 */
import MobileShopButtonCoachmark from './MobileShopButtonCoachmark.tsx'; /* Metro dependency 14913 */
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 JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as IndexNativeModule from '../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as Dismissible_contentModule from '../../../external/discord_common/js/packages/protos/discord_protos/discord_users/v1/dismissible_content.tsx'; /* Metro dependency 1365 */
import * as DismissibleContentConstantsModule from '../../dismissible_content/DismissibleContentConstants.tsx'; /* Metro dependency 1376 */
import * as UseSelectedDismissibleContentModule from '../../dismissible_content/hooks/useSelectedDismissibleContent.tsx'; /* Metro dependency 7013 */
import * as ShopIconModule from '../../../design/components/Icon/native/redesign/generated/ShopIcon.tsx'; /* Metro dependency 10358 */
function _fun112817(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#112817, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15109:6, offset: 0x023dd215, size: 222 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 */;
importAll(31) /* metro dependency 31 */;
const collectiblesMarketingsStore = importDefault(5174) /* metro dependency 5174: CollectiblesMarketingsStore */;
const env0_5 = (require(1376) /* metro dependency 1376: DismissibleContentConstants */).ContentDismissActionType;
const value = require(33) /* metro dependency 33 */;
const env0_6 = value.jsx;
const env0_7 = value.Fragment;
const env0_8 = value.jsxs;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/CollectiblesShopEntryButton.tsx');
ReactModule;
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/native/CollectiblesShopEntryButton.tsx');
exports.default = CollectiblesShopEntryButton;
}
function CoachmarkVariant({marketing, navigateToShop, shopButtonRef}) { // fn#112818, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15109:201, offset: 0x023dd2f3, size: 362 bytes, params: 2, frame: 31
const useSelectedDismissibleContentModule = require(7013) /* metro dependency 7013: useSelectedDismissibleContent */;
const useSelectedVersionedDismissibleContent = useSelectedDismissibleContentModule.useSelectedVersionedDismissibleContent;
const DismissibleContent = (require(1365) /* metro dependency 1365: dismissible_content */).DismissibleContent;
let COLLECTIBLES_SHOP_ENTRY_MARKETING = DismissibleContent.COLLECTIBLES_SHOP_ENTRY_MARKETING;
const value3 = env0_3(Reflect.apply(useSelectedVersionedDismissibleContent, useSelectedDismissibleContentModule,
[COLLECTIBLES_SHOP_ENTRY_MARKETING, marketing.version, undefined, true]), 2);
const property = value3[0];
const property2 = value3[1];
COLLECTIBLES_SHOP_ENTRY_MARKETING = DismissibleContent.COLLECTIBLES_SHOP_ENTRY_MARKETING;
const value4 = property === COLLECTIBLES_SHOP_ENTRY_MARKETING;
const jsxRuntimeEnv0_7Binding = jsxRuntimeEnv0_7;
const YouScreenNavIcon = importDefault(14908) /* metro dependency 14908: YouScreenNavIcon */;
const ShopIcon = (require(10358) /* metro dependency 10358: ShopIcon */).ShopIcon;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
return (
<>
<YouScreenNavIcon
ref={shopButtonRef}
IconComponent={ShopIcon}
accessibilityLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.pWG4ze)}
onPress={onPress_112819}
showRedDot={value4}
/>
{((Component) => <Component marketing={marketing} shopButtonRef={shopButtonRef} navigateToShop={navigateToShop} visible={value4} onDismiss={property2} />)(importDefault(14913) /* metro dependency 14913: MobileShopButtonCoachmark */)}
</>
);
}
function CollectiblesShopEntryButton({navigateToShop, shopButtonRef}) { // fn#112820, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15109:868, offset: 0x023dd48b, size: 534 bytes, params: 2, frame: 24
var COLLECTIBLES_SHOP_ENTRY_MARKETING;
var version;
var SelectedVersionedDismissibleContent;
var value;
const marketingBySurface = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([CollectiblesMarketingsStore],
function() {
return CollectiblesMarketingsStore.getMarketingBySurface(require(dependencyMap[12]).CollectiblesMarketingSurface.MOBILE_SHOP_BUTTON);
});
let r1 = marketingBySurface != null && 'dismissibleContent' in marketingBySurface && marketingBySurface.dismissibleContent === (require(1365) /* metro dependency 1365: dismissible_content */).DismissibleContent.COLLECTIBLES_SHOP_ENTRY_MARKETING;
const type = marketingBySurface?.type;
const CollectiblesMarketingType = (require(5154) /* metro dependency 5154: CollectiblesMarketingType */).CollectiblesMarketingType;
const COACHMARK = CollectiblesMarketingType.COACHMARK;
if (type === COACHMARK) {
function CoachmarkVariant({marketing, navigateToShop, shopButtonRef}) { // fn#112818, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15109:201, offset: 0x023dd2f3, size: 362 bytes, params: 2, frame: 31
const useSelectedVersionedDismissibleContent = UseSelectedDismissibleContentModule.useSelectedVersionedDismissibleContent;
const DismissibleContent = (Dismissible_contentModule).DismissibleContent;
let COLLECTIBLES_SHOP_ENTRY_MARKETING = DismissibleContent.COLLECTIBLES_SHOP_ENTRY_MARKETING;
const value3 = Module00057(Reflect.apply(useSelectedVersionedDismissibleContent, UseSelectedDismissibleContentModule,
[COLLECTIBLES_SHOP_ENTRY_MARKETING, marketing.version, undefined, true]), 2);
const property = value3[0];
const property2 = value3[1];
COLLECTIBLES_SHOP_ENTRY_MARKETING = DismissibleContent.COLLECTIBLES_SHOP_ENTRY_MARKETING;
const value4 = property === COLLECTIBLES_SHOP_ENTRY_MARKETING;
const jsxRuntimeEnv0_7Binding = jsxRuntimeEnv0_7;
const ShopIcon = (ShopIconModule).ShopIcon;
const intl = (IndexNativeModule).intl;
return (
<CoachmarkVariant
marketing={marketingBySurface}
navigateToShop={navigateToShop}
shopButtonRef={shopButtonRef}
/>
<>
<YouScreenNavIcon
ref={shopButtonRef}
IconComponent={ShopIcon}
accessibilityLabel={intl.string((IndexNativeModule).t.pWG4ze)}
onPress={onPress_112819}
showRedDot={value4}
/>
{((Component) => <Component marketing={marketing} shopButtonRef={shopButtonRef} navigateToShop={navigateToShop} visible={value4} onDismiss={property2} />)(MobileShopButtonCoachmark)}
</>
);
function CoachmarkVariantOnPress() { // fn#112819, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15109:635, owner: CoachmarkVariant.onPress, offset: 0x023dd45d, size: 46 bytes, params: 1, frame: 12
var binding;
var value2;
if (result) {
binding = env0_1;
value2 = environment.__proto__;
binding(ContentDismissActionType.TAKE_ACTION);
}
navigateToShop();
}
}
const closure = children_112822;
if (r1) {
SelectedVersionedDismissibleContent = (require(10357) /* metro dependency 10357: SelectedDismissibleContent */).SelectedVersionedDismissibleContent;
COLLECTIBLES_SHOP_ENTRY_MARKETING = marketingBySurface?.type !== (require(5154) /* metro dependency 5154: CollectiblesMarketingType */).CollectiblesMarketingType.BADGE ? null : (require(1365) /* metro dependency 1365: dismissible_content */).DismissibleContent.COLLECTIBLES_SHOP_ENTRY_MARKETING;
version = marketingBySurface?.version;
value = 0;
value = <SelectedVersionedDismissibleContent contentType={COLLECTIBLES_SHOP_ENTRY_MARKETING} latestVersion={version ?? value}>{closure}</SelectedVersionedDismissibleContent>;
r1 = value;
} else {
r1 = ((Component) => <Component contentTypes={marketingBySurface?.type !== (require(5154) /* metro dependency 5154: CollectiblesMarketingType */).CollectiblesMarketingType.BADGE ? [] : marketingBySurface?.dismissibleContent != null ? [marketingBySurface.dismissibleContent] : []}>{closure}</Component>)(importDefault(10357) /* metro dependency 10357: SelectedDismissibleContent */);
}
return r1;
}
function CoachmarkVariantOnPress() { // fn#112819, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15109:635, owner: CoachmarkVariant.onPress, offset: 0x023dd45d, size: 46 bytes, params: 1, frame: 12
var binding;
var value2;
if (result) {
binding = env0_1;
value2 = environment.__proto__;
binding(ContentDismissActionType.TAKE_ACTION);
}
navigateToShop();
}
function CollectiblesShopEntryButton({navigateToShop, shopButtonRef}) { // fn#112820, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15109:868, offset: 0x023dd48b, size: 534 bytes, params: 2, frame: 24
var COLLECTIBLES_SHOP_ENTRY_MARKETING;
var version;
var SelectedVersionedDismissibleContent;
var value;
const marketingBySurface = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([CollectiblesMarketingsStore],
function() {
return CollectiblesMarketingsStore.getMarketingBySurface(require(dependencyMap[12]).CollectiblesMarketingSurface.MOBILE_SHOP_BUTTON);
});
let r1 = marketingBySurface != null && 'dismissibleContent' in marketingBySurface && marketingBySurface.dismissibleContent === (require(1365) /* metro dependency 1365: dismissible_content */).DismissibleContent.COLLECTIBLES_SHOP_ENTRY_MARKETING;
const type = marketingBySurface?.type;
const CollectiblesMarketingType = (require(5154) /* metro dependency 5154: CollectiblesMarketingType */).CollectiblesMarketingType;
const COACHMARK = CollectiblesMarketingType.COACHMARK;
if (type === COACHMARK) {
return (
<CoachmarkVariant
marketing={marketingBySurface}
navigateToShop={navigateToShop}
shopButtonRef={shopButtonRef}
/>
);
}
const children_1128222 = children_112822;
if (r1) {
SelectedVersionedDismissibleContent = (require(10357) /* metro dependency 10357: SelectedDismissibleContent */).SelectedVersionedDismissibleContent;
COLLECTIBLES_SHOP_ENTRY_MARKETING = marketingBySurface?.type !== (require(5154) /* metro dependency 5154: CollectiblesMarketingType */).CollectiblesMarketingType.BADGE ? null : (require(1365) /* metro dependency 1365: dismissible_content */).DismissibleContent.COLLECTIBLES_SHOP_ENTRY_MARKETING;
version = marketingBySurface?.version;
value = 0;
value = (
<SelectedVersionedDismissibleContent
contentType={COLLECTIBLES_SHOP_ENTRY_MARKETING}
latestVersion={version ?? value}
>
{children_1128222}
</SelectedVersionedDismissibleContent>
);
r1 = value;
} else {
r1 = ((Component) => <Component contentTypes={marketingBySurface?.type !== (require(5154) /* metro dependency 5154: CollectiblesMarketingType */).CollectiblesMarketingType.BADGE ? [] : marketingBySurface?.dismissibleContent != null ? [marketingBySurface.dismissibleContent] : []}>{children_1128222}</Component>)(importDefault(10357) /* metro dependency 10357: SelectedDismissibleContent */);
}
return r1;
function CollectiblesShopEntryButtonChildren({visibleContent, markAsDismissed}) { // fn#112822, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15109:1351, owner: CollectiblesShopEntryButton.children, offset: 0x023dd6d7, size: 174 bytes, params: 2, frame: 20
const shopButtonRefBinding = shopButtonRef;
const ShopIcon = (ShopIconModule).ShopIcon;
const intl = (IndexNativeModule).intl;
return (
<YouScreenNavIcon
ref={shopButtonRefBinding}
IconComponent={ShopIcon}
accessibilityLabel={intl.string((IndexNativeModule).t.pWG4ze)}
onPress={onPress_112823}
showRedDot={visibleContent != null}
/>
);
function childrenOnPress_112823() { // fn#112823, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15109:1504, owner: CollectiblesShopEntryButton.children.onPress, offset: 0x023dd785, size: 50 bytes, params: 1, frame: 12
var markAsDismissedBinding;
navigateToShop();
if (visibleContent != null) {
markAsDismissedBinding = markAsDismissed;
value = environment.__proto__.__proto__;
markAsDismissedBinding(ContentDismissActionType.PRIMARY);
}
}
function CollectiblesShopEntryButtonChildren({visibleContent, markAsDismissed}) { // fn#112822, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15109:1351, owner: CollectiblesShopEntryButton.children, offset: 0x023dd6d7, size: 174 bytes, params: 2, frame: 20
const YouScreenNavIcon = importDefault(14908) /* metro dependency 14908: YouScreenNavIcon */;
const shopButtonRefBinding = shopButtonRef;
const ShopIcon = (require(10358) /* metro dependency 10358: ShopIcon */).ShopIcon;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
return (
<YouScreenNavIcon
ref={shopButtonRefBinding}
IconComponent={ShopIcon}
accessibilityLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.pWG4ze)}
onPress={onPress_112823}
showRedDot={visibleContent != null}
/>
);
}
}
function childrenOnPress_112823() { // fn#112823, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15109:1504, owner: CollectiblesShopEntryButton.children.onPress, offset: 0x023dd785, size: 50 bytes, params: 1, frame: 12
var markAsDismissedBinding;
navigateToShop();
if (visibleContent != null) {
markAsDismissedBinding = markAsDismissed;
value = environment.__proto__.__proto__;
markAsDismissedBinding(ContentDismissActionType.PRIMARY);
}
}
global.__d(_fun112817, 14912, [57, 31, 5174, 1376, 33, 7013, 1365, 14908, 10358, 1244, 14913, 632, 12712, 5154,
10357,
2]) /* metro module 14912, dependencies: [57, 31, 5174, 1376, 33, 7013, 1365, 14908, 10358, 1244, 14913, 632, 12712, 5154, 10357, 2] */;
@@ -1,30 +1,53 @@
/* Metro module 14079; source: modules/collectibles/native/CollectiblesShopFeaturedPage.tsx; dependencies: [31, 27, 663, 33, 4501, 1305, 8754, 1244, 14054, 2] */
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 CollectiblesShopConstantsModule from '../CollectiblesShopConstants.tsx'; /* Metro dependency 663 */
import * as NativeModule from '../../../design/void/native.tsx'; /* Metro dependency 1305 */
import * as CreateStylesModule from '../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
function _fun106695(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#106695, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14276:6, offset: 0x022e71b0, size: 227 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_3 = (require(27) /* metro dependency 27 */).View;
const env0_4 = (require(663) /* metro dependency 663: CollectiblesShopConstants */).CollectiblesMobileShopScreen;
const env0_5 = (require(33) /* metro dependency 33 */).jsx;
const env0_6 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({container: {'flex': 1,
ReactModule;
const env0_6 = (CreateStylesModule).createStyles({container: {'flex': 1,
'justifyContent': 'center', 'alignItems': 'center'}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/CollectiblesShopFeaturedPage.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/native/CollectiblesShopFeaturedPage.tsx');
exports.default = _default_106696;
}
function _default_106696({shopBlock, fetchShopHomeError, framesBannerBlock}) { // fn#106696, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14276:270, offset: 0x022e7293, size: 258 bytes, params: 2, frame: 21
var r0;
const EmptyState = (require(1305) /* metro dependency 1305: native */).EmptyState;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const styles = useStyles();
if (fetchShopHomeError !== null) {
r0 = <View style={styles.container}><EmptyState style={{marginTop: 42}} Illustration={(require(8754) /* metro dependency 8754: NoResults */).NoResults} body={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.eAn6z2)} /></View>;
} else if (shopBlock === undefined) {
r0 = <View style={styles.container}><EmptyState style={{marginTop: 42}} Illustration={(require(8754) /* metro dependency 8754: NoResults */).NoResults} body={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.eAn6z2)} /></View>;
} else {
r0 = ((Component) => <Component block={shopBlock} screen={CollectiblesMobileShopScreen.FEATURED_PAGE} framesBannerBlock={framesBannerBlock} />)(importDefault(14054) /* metro dependency 14054: ShopBlockItem */);
function _default_106696({shopBlock, fetchShopHomeError, framesBannerBlock}) { // fn#106696, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14276:270, offset: 0x022e7293, size: 258 bytes, params: 2, frame: 21
var r0;
const EmptyState = (NativeModule).EmptyState;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const styles = useStyles();
if (fetchShopHomeError !== null) {
r0 = (
<View style={styles.container}>
<EmptyState
style={{marginTop: 42}}
Illustration={(require(8754) /* metro dependency 8754: NoResults */).NoResults}
body={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.eAn6z2)}
/>
</View>
);
} else if (shopBlock === undefined) {
r0 = (
<View style={styles.container}>
<EmptyState
style={{marginTop: 42}}
Illustration={(require(8754) /* metro dependency 8754: NoResults */).NoResults}
body={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.eAn6z2)}
/>
</View>
);
} else {
r0 = ((Component) => <Component block={shopBlock} screen={CollectiblesMobileShopScreen.FEATURED_PAGE} framesBannerBlock={framesBannerBlock} />)(importDefault(14054) /* metro dependency 14054: ShopBlockItem */);
}
return r0;
}
return r0;
}
global.__d(_fun106695, 14079, [31, 27, 663, 33, 4501, 1305, 8754, 1244, 14054,
2]) /* metro module 14079, dependencies: [31, 27, 663, 33, 4501, 1305, 8754, 1244, 14054, 2] */;
@@ -1,59 +1,98 @@
/* Metro module 12168; source: modules/collectibles/native/CollectiblesShopGiftBadgePostPurchaseModal.tsx; dependencies: [31, 27, 33, 4501, 697, 1585, 5080, 5120, 6789, 6258, 1244, 5312, 4573, 2320, 10468, 2] */
import Native from '../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import UseSafeAreaInsetsNative from '../../safe_area/useSafeAreaInsets.native.tsx'; /* Metro dependency 1585 */
import ModalActionCreators from '../../../actions/ModalActionCreators.tsx'; /* Metro dependency 5080 */
import GiftBadgePostPurchase from '../../premium/native/gifting/GiftBadgePostPurchase.tsx'; /* Metro dependency 10468 */
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 IndexNativeModule from '../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as CreateStylesModule from '../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as TextModule from '../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as XSmallIconModule from '../../../design/components/Icon/native/redesign/generated/XSmallIcon.tsx'; /* Metro dependency 5312 */
import * as ModalScreenNativeModule from '../../../design/components/Modal/native/ModalScreen.native.tsx'; /* Metro dependency 6258 */
function _fun93261(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#93261, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12354:6, offset: 0x020acca6, size: 215 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
let value = ReactNativeModule;
const env0_4 = value.Pressable;
const env0_5 = value.View;
value = require(33) /* metro dependency 33 */;
const env0_6 = value.jsx;
const env0_7 = value.jsxs;
const env0_8 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(_fun93262);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/CollectiblesShopGiftBadgePostPurchaseModal.tsx');
const env0_8 = (CreateStylesModule).createStyles(_fun93262);
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/native/CollectiblesShopGiftBadgePostPurchaseModal.tsx');
exports.default = CollectiblesShopGiftBadgePostPurchaseModal;
function _fun93262(a0) { // fn#93262, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12354:190, offset: 0x020acd7d, size: 142 bytes, params: 2, frame: 15
const object = {};
object.header = {'position': 'absolute', 'top': 0, 'left': 0, 'right': 0, 'height': null, 'paddingTop': null,
'zIndex': 1, 'flexDirection': 'row', 'alignItems': 'center', 'justifyContent': 'center', height: a0 + 56,
paddingTop: a0};
const PX_16 = (Native).space.PX_16;
object.closeButton = {'position': 'absolute', 'left': 0, 'top': null, 'bottom': 0, 'paddingHorizontal': null,
'justifyContent': 'center', top: a0, paddingHorizontal: PX_16};
const MOBILE_TEXT_HEADING_PRIMARY = (Native).colors.MOBILE_TEXT_HEADING_PRIMARY;
object.closeIcon = {tintColor: MOBILE_TEXT_HEADING_PRIMARY};
return object;
}
function CollectiblesShopGiftBadgePostPurchaseModal({giftBadgeProgress}) { // fn#93263, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12354:649, offset: 0x020ace0b, size: 441 bytes, params: 2, frame: 28
const styles = useStyles((UseSafeAreaInsetsNative)().top);
const value2 = ReactModule.useCallback(_fun93264, []);
const value3 = ReactModule.useCallback(function() {
var moduleValue = require(dependencyMap[7]);
var object = {};
var GIFTING_BADGE_POST_PURCHASE = importDefault(dependencyMap[8]).GIFTING_BADGE_POST_PURCHASE;
object.analyticsLocations = [GIFTING_BADGE_POST_PURCHASE];
object.analyticsSource = importDefault(dependencyMap[8]).GIFTING_BADGE_POST_PURCHASE;
moduleValue.openCollectiblesShopMobile(object);
}, []);
const ModalScreen = (ModalScreenNativeModule).ModalScreen;
const intl = (IndexNativeModule).intl;
const string = intl.string;
const cpT0Cq = (IndexNativeModule).t.cpT0Cq;
const XSmallIcon = (XSmallIconModule).XSmallIcon;
let value = (
<Pressable
onPress={value2}
accessibilityRole="button"
accessibilityLabel={Reflect.apply(string, intl, [cpT0Cq])}
style={styles.closeButton}
>
<XSmallIcon size="md" style={styles.closeIcon} />
</Pressable>
);
const Text = (TextModule).Text;
value = (
<View style={styles.header}>
{value}
<Text
accessibilityRole="header"
{...{'aria-level': '1'}}
lineClamp={1}
variant="redesign/heading-18/bold"
color="mobile-text-heading-primary"
>
{intl.string((importDefault(2320) /* metro dependency 2320: GiftingBadgeMessages */).roVAey)}
</Text>
</View>
);
return (
<ModalScreen>
{value}
{((Component) => <Component currentProgress={giftBadgeProgress} onSendGift={value3} />)(GiftBadgePostPurchase)}
</ModalScreen>
);
function _fun93264() { // fn#93264, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12354:768, offset: 0x020acfc4, size: 37 bytes, params: 1, frame: 11
const value = environment.__proto__;
(ModalActionCreators).pop();
}
}
}
function _fun93262(a0) { // fn#93262, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12354:190, offset: 0x020acd7d, size: 142 bytes, params: 2, frame: 15
const object2 = {};
object2.header = {'position': 'absolute', 'top': 0, 'left': 0, 'right': 0, 'height': null, 'paddingTop': null,
'zIndex': 1, 'flexDirection': 'row', 'alignItems': 'center', 'justifyContent': 'center', height: a0 + 56,
paddingTop: a0};
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object2.closeButton = {'position': 'absolute', 'left': 0, 'top': null, 'bottom': 0, 'paddingHorizontal': null,
'justifyContent': 'center', top: a0, paddingHorizontal: PX_16};
const MOBILE_TEXT_HEADING_PRIMARY = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_TEXT_HEADING_PRIMARY;
object2.closeIcon = {tintColor: MOBILE_TEXT_HEADING_PRIMARY};
return object2;
}
function CollectiblesShopGiftBadgePostPurchaseModal({giftBadgeProgress}) { // fn#93263, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12354:649, offset: 0x020ace0b, size: 441 bytes, params: 2, frame: 28
const styles = useStyles((importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)().top);
const binding = env0_3;
const value2 = binding.useCallback(_fun93264, []);
const value3 = binding.useCallback(function() {
var moduleValue = require(dependencyMap[7]);
var object = {};
var GIFTING_BADGE_POST_PURCHASE = importDefault(dependencyMap[8]).GIFTING_BADGE_POST_PURCHASE;
object.analyticsLocations = [GIFTING_BADGE_POST_PURCHASE];
object.analyticsSource = importDefault(dependencyMap[8]).GIFTING_BADGE_POST_PURCHASE;
moduleValue.openCollectiblesShopMobile(object);
}, []);
const ModalScreen = (require(6258) /* metro dependency 6258: ModalScreenNative */).ModalScreen;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const cpT0Cq = (require(1244) /* metro dependency 1244: indexNative */).t.cpT0Cq;
const XSmallIcon = (require(5312) /* metro dependency 5312: XSmallIcon */).XSmallIcon;
let value = <Pressable onPress={value2} accessibilityRole="button" accessibilityLabel={Reflect.apply(string, intl,
[cpT0Cq])} style={styles.closeButton}><XSmallIcon size="md" style={styles.closeIcon} /></Pressable>;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
value = <View style={styles.header}>{value}<Text accessibilityRole="header" {...{'aria-level': '1'}} lineClamp={1} variant="redesign/heading-18/bold" color="mobile-text-heading-primary">{intl.string((importDefault(2320) /* metro dependency 2320: GiftingBadgeMessages */).roVAey)}</Text></View>;
return (
<ModalScreen>
{value}
{((Component) => <Component currentProgress={giftBadgeProgress} onSendGift={value3} />)(importDefault(10468) /* metro dependency 10468: GiftBadgePostPurchase */)}
</ModalScreen>
);
}
global.__d(_fun93261, 12168, [31, 27, 33, 4501, 697, 1585, 5080, 5120, 6789, 6258, 1244, 5312, 4573, 2320, 10468,
2]) /* metro module 12168, dependencies: [31, 27, 33, 4501, 697, 1585, 5080, 5120, 6789, 6258, 1244, 5312, 4573, 2320, 10468, 2] */;
@@ -1,92 +1,102 @@
/* Metro module 7632; source: modules/collectibles/native/CollectiblesShopGiftModal.tsx; dependencies: [31, 5121, 661, 33, 7633, 7634, 7635, 566, 6771, 6789, 1861, 5120, 3815, 7636, 1244, 7637, 10116, 12156, 2] */
import CollectiblesCategoryStore from '../CollectiblesCategoryStore.tsx'; /* Metro dependency 5121 */
import UseAnalyticsLocations from '../../app_analytics/useAnalyticsLocations.tsx'; /* Metro dependency 6771 */
import AnalyticsLocation from '../../app_analytics/AnalyticsLocation.tsx'; /* Metro dependency 6789 */
import CollectiblesShopCheckoutDetails from './CollectiblesShopCheckoutDetails.tsx'; /* Metro dependency 10116 */
import CollectiblesShopGiftPurchaseSection from './CollectiblesShopGiftPurchaseSection.tsx'; /* Metro dependency 12156 */
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 JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
import * as StringUtilsModule from '../../../utils/StringUtils.tsx'; /* Metro dependency 1861 */
import * as GiftingBadgeExperimentModule from '../../premium/gifting/experiments/GiftingBadgeExperiment.tsx'; /* Metro dependency 7633 */
function _fun61135(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#61135, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7810:6, offset: 0x0171b533, size: 178 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 collectiblesCategoryStore = importDefault(5121) /* metro dependency 5121: CollectiblesCategoryStore */;
const env0_5 = (require(661) /* metro dependency 661: Constants */).COLLECTIBLES_APPLICATION_ID;
const env0_6 = (require(33) /* metro dependency 33 */).jsx;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/CollectiblesShopGiftModal.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/native/CollectiblesShopGiftModal.tsx');
exports.default = CollectiblesShopGiftModal;
}
function CollectiblesShopGiftModal({skuId, analyticsLocations, lockedRecipientUser, onGiftModalDismiss, giftingOrigin}) { // fn#61136, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7810:270, offset: 0x0171b5e5, size: 537 bytes, params: 2, frame: 29
var r1;
var r0;
var UnsupportedFeatureModal;
var intl;
const GiftingBadgeExperiment = (require(7633) /* metro dependency 7633: GiftingBadgeExperiment */).GiftingBadgeExperiment;
const useConfig = GiftingBadgeExperiment.useConfig;
const enabled = Reflect.apply(useConfig, GiftingBadgeExperiment, [{location: 'CollectiblesShopGiftModal'}]).enabled;
let binding = env0_3;
binding.useEffect(_fun61137, [enabled]);
const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStores([CollectiblesCategoryStore],
function() {
return CollectiblesCategoryStore.getProduct(skuId);
}, [skuId]);
var env0_3 = value3;
const defaultImport = importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */;
object = [];
const value4 = arraySpread(object, analyticsLocations, 0, undefined);
const COLLECTIBLES_MOBILE_GIFT_MODAL = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).COLLECTIBLES_MOBILE_GIFT_MODAL;
object[value4] = COLLECTIBLES_MOBILE_GIFT_MODAL;
value4 + 1;
analyticsLocations = defaultImport(object).analyticsLocations;
skuId = value3?.skuId;
binding = env0_3;
const useCallback = binding.useCallback;
if (value3 == null) {
r0 = null;
} else {
if ((require(3815) /* metro dependency 3815: BillingPlatformUtils */).isCollectibleGiftingSupported()) {
r1 = ((Component) => <Component skuId={value3.skuId} applicationId={COLLECTIBLES_APPLICATION_ID} analyticsLocations={analyticsLocations} lockedRecipientUser={lockedRecipientUser} onGiftModalDismiss={onGiftModalDismiss} giftingOrigin={giftingOrigin} validateRecipient={Reflect.apply(useCallback,
binding, [_fun61139,
[skuId]])} renderProductDetails={renderProductDetails} renderPurchaseSection={renderPurchaseSection} />)(importDefault(7637) /* metro dependency 7637: UnifiedGiftModal */);
function CollectiblesShopGiftModal({skuId, analyticsLocations, lockedRecipientUser, onGiftModalDismiss, giftingOrigin}) { // fn#61136, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7810:270, offset: 0x0171b5e5, size: 537 bytes, params: 2, frame: 29
var r1;
var r0;
var UnsupportedFeatureModal;
var intl;
const GiftingBadgeExperiment = (GiftingBadgeExperimentModule).GiftingBadgeExperiment;
const useConfig = GiftingBadgeExperiment.useConfig;
const enabled = Reflect.apply(useConfig, GiftingBadgeExperiment, [{location: 'CollectiblesShopGiftModal'}]).enabled;
let binding = env0_3;
binding.useEffect(_fun61137, [enabled]);
const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStores([CollectiblesCategoryStore],
function() {
return CollectiblesCategoryStore.getProduct(skuId);
}, [skuId]);
var env0_3 = value3;
const defaultImport = UseAnalyticsLocations;
object = [];
const value4 = arraySpread(object, analyticsLocations, 0, undefined);
const COLLECTIBLES_MOBILE_GIFT_MODAL = (AnalyticsLocation).COLLECTIBLES_MOBILE_GIFT_MODAL;
object[value4] = COLLECTIBLES_MOBILE_GIFT_MODAL;
value4 + 1;
analyticsLocations = defaultImport(object).analyticsLocations;
skuId = value3?.skuId;
binding = env0_3;
const useCallback = binding.useCallback;
if (value3 == null) {
r0 = null;
} else {
UnsupportedFeatureModal = importDefault(7636) /* metro dependency 7636: UnsupportedFeatureModal */;
object = {onDismiss: onGiftModalDismiss};
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object.title = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['JCFN/y']);
r1 = <UnsupportedFeatureModal {...object} />;
if ((require(3815) /* metro dependency 3815: BillingPlatformUtils */).isCollectibleGiftingSupported()) {
r1 = ((Component) => <Component skuId={value3.skuId} applicationId={COLLECTIBLES_APPLICATION_ID} analyticsLocations={analyticsLocations} lockedRecipientUser={lockedRecipientUser} onGiftModalDismiss={onGiftModalDismiss} giftingOrigin={giftingOrigin} validateRecipient={Reflect.apply(useCallback,
binding, [_fun61139,
[skuId]])} renderProductDetails={renderProductDetails} renderPurchaseSection={renderPurchaseSection} />)(importDefault(7637) /* metro dependency 7637: UnifiedGiftModal */);
} else {
UnsupportedFeatureModal = importDefault(7636) /* metro dependency 7636: UnsupportedFeatureModal */;
object = {onDismiss: onGiftModalDismiss};
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object.title = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['JCFN/y']);
r1 = <UnsupportedFeatureModal {...object} />;
}
r0 = r1;
}
r0 = r1;
return r0;
function _fun61137() { // fn#61137, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7810:504, offset: 0x0171b7fe, size: 74 bytes, params: 1, frame: 14
var value;
if (enabled) {
value = environment.__proto__;
value = require(7634) /* metro dependency 7634: BadgeDirectoryActionCreators */;
value.fetchBadge((require(7635) /* metro dependency 7635: BadgeId */).BadgeId.GIFTING);
}
}
function _fun61139(a0) { // fn#61139, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7810:745, offset: 0x0171b863, size: 109 bytes, params: 2, frame: 15
var r0;
let value = environment.__proto__;
if (StringUtilsModule.isNullOrEmpty(skuId)) {
r0 = global.Promise.resolve(false);
} else {
value = require(5120) /* metro dependency 5120: CollectiblesActionCreators */;
value = value.validateCollectiblesRecipient(a0, skuId);
r0 = value;
}
return r0;
}
function renderProductDetails({recipientUser, isValidRecipient}) { // fn#61140, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7810:1068, owner: CollectiblesShopGiftModal.renderProductDetails, offset: 0x0171b8d0, size: 83 bytes, params: 2, frame: 16
const value = environment.__proto__;
return ((Component) => <Component product={env0_3} recipientUser={recipientUser} isValidRecipient={isValidRecipient} isGift />)(CollectiblesShopCheckoutDetails);
}
function renderPurchaseSection({isPurchaseDisabled, giftOptions, baseAnalyticsFields}) { // fn#61141, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7810:1199, owner: CollectiblesShopGiftModal.renderPurchaseSection, offset: 0x0171b923, size: 96 bytes, params: 2, frame: 18
const value = environment.__proto__;
return ((Component) => <Component product={env0_3} isPurchaseDisabled={isPurchaseDisabled} giftOptions={giftOptions} baseAnalyticsFields={baseAnalyticsFields} giftingOrigin={giftingOrigin} />)(CollectiblesShopGiftPurchaseSection);
}
}
return r0;
}
function _fun61137() { // fn#61137, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7810:504, offset: 0x0171b7fe, size: 74 bytes, params: 1, frame: 14
var value;
if (enabled) {
value = environment.__proto__;
value = require(7634) /* metro dependency 7634: BadgeDirectoryActionCreators */;
value.fetchBadge((require(7635) /* metro dependency 7635: BadgeId */).BadgeId.GIFTING);
}
}
function _fun61139(a0) { // fn#61139, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7810:745, offset: 0x0171b863, size: 109 bytes, params: 2, frame: 15
var r0;
let value = environment.__proto__;
const stringUtilsModule = require(1861) /* metro dependency 1861: StringUtils */;
if (stringUtilsModule.isNullOrEmpty(skuId)) {
r0 = global.Promise.resolve(false);
} else {
value = require(5120) /* metro dependency 5120: CollectiblesActionCreators */;
value = value.validateCollectiblesRecipient(a0, skuId);
r0 = value;
}
return r0;
}
function CollectiblesShopGiftModalRenderProductDetails({recipientUser, isValidRecipient}) { // fn#61140, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7810:1068, owner: CollectiblesShopGiftModal.renderProductDetails, offset: 0x0171b8d0, size: 83 bytes, params: 2, frame: 16
const value = environment.__proto__;
return ((Component) => <Component product={env0_3} recipientUser={recipientUser} isValidRecipient={isValidRecipient} isGift />)(importDefault(10116) /* metro dependency 10116: CollectiblesShopCheckoutDetails */);
}
function CollectiblesShopGiftModalRenderPurchaseSection({isPurchaseDisabled, giftOptions, baseAnalyticsFields}) { // fn#61141, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7810:1199, owner: CollectiblesShopGiftModal.renderPurchaseSection, offset: 0x0171b923, size: 96 bytes, params: 2, frame: 18
const value = environment.__proto__;
return ((Component) => <Component product={env0_3} isPurchaseDisabled={isPurchaseDisabled} giftOptions={giftOptions} baseAnalyticsFields={baseAnalyticsFields} giftingOrigin={giftingOrigin} />)(importDefault(12156) /* metro dependency 12156: CollectiblesShopGiftPurchaseSection */);
}
global.__d(_fun61135, 7632, [31, 5121, 661, 33, 7633, 7634, 7635, 566, 6771, 6789, 1861, 5120, 3815, 7636, 1244,
7637, 10116, 12156,
2]) /* metro module 7632, dependencies: [31, 5121, 661, 33, 7633, 7634, 7635, 566, 6771, 6789, 1861, 5120, 3815, 7636, 1244, 7637, 10116, 12156, 2] */;
@@ -1,13 +1,28 @@
/* Metro module 12156; source: modules/collectibles/native/CollectiblesShopGiftPurchaseSection.tsx; dependencies: [57, 31, 27, 7670, 661, 1880, 33, 4501, 697, 5463, 7633, 566, 7635, 6771, 10147, 694, 5080, 4496, 12157, 1962, 683, 10396, 6766, 1244, 4578, 10109, 2] */
import Module00057 from '../../../by-id/module-00057.js'; /* Metro dependency 57 */
import AnalyticsUtils from '../../../utils/AnalyticsUtils.tsx'; /* Metro dependency 683 */
import Native from '../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import AlertActionCreators from '../../../actions/native/AlertActionCreators.tsx'; /* Metro dependency 4496 */
import ModalActionCreators from '../../../actions/ModalActionCreators.tsx'; /* Metro dependency 5080 */
import UseSafeAreaInsetsKeyboardAwareNative from '../../safe_area/useSafeAreaInsetsKeyboardAware.native.tsx'; /* Metro dependency 5463 */
import BadgeDirectoryStore from '../../badges/BadgeDirectoryStore.tsx'; /* Metro dependency 7670 */
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 FluxModule from '../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
import * as CreateStylesModule from '../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as ButtonNativeModule from '../../../design/components/Button/native/Button.native.tsx'; /* Metro dependency 4578 */
import * as TextWithIOSLinkWorkaroundModule from '../../a11y/native/TextWithIOSLinkWorkaround.tsx'; /* Metro dependency 6766 */
import * as GiftingBadgeExperimentModule from '../../premium/gifting/experiments/GiftingBadgeExperiment.tsx'; /* Metro dependency 7633 */
import * as BadgeIdModule from '../../../external/discord_common/js/shared/shared-constants/BadgeId.tsx'; /* Metro dependency 7635 */
import * as NativePaymentContextModule from '../../payments/native/NativePaymentContext.tsx'; /* Metro dependency 10109 */
function _fun93231(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#93231, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12342:6, offset: 0x020ab65b, size: 364 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 env0_4 = importAll(31) /* metro dependency 31 */;
const env0_5 = (require(27) /* metro dependency 27 */).View;
const badgeDirectoryStore = importDefault(7670) /* metro dependency 7670: BadgeDirectoryStore */;
let value = require(661) /* metro dependency 661: Constants */;
let value = ConstantsModule;
const env0_7 = value.AnalyticEvents;
const env0_8 = value.MarketingURLs;
value = require(1880) /* metro dependency 1880: PremiumConstants */;
@@ -16,176 +31,198 @@ function _fun93231(global, require, importDefault, importAll, module, exports, d
value = require(33) /* metro dependency 33 */;
const env0_11 = value.jsx;
const env0_12 = value.jsxs;
const env0_13 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(_fun93243);
const env0_13 = (CreateStylesModule).createStyles(_fun93243);
object = {NOT_STARTED: 'not_started', PURCHASING: 'purchasing', SUCCEEDED: 'succeeded', FAILED: 'failed'};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/CollectiblesShopGiftPurchaseSection.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/native/CollectiblesShopGiftPurchaseSection.tsx');
exports.default = WrappedCollectiblesShopGiftPurchaseSection;
}
function CollectiblesShopGiftPurchaseSection({product, isPurchaseDisabled, giftOptions, baseAnalyticsFields, giftingOrigin}) { // fn#93232, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12342:686, offset: 0x020ab7c7, size: 855 bytes, params: 2, frame: 31
const styles = useStyles((importDefault(5463) /* metro dependency 5463: useSafeAreaInsetsKeyboardAwareNative */)().insets.bottom);
const GiftingBadgeExperiment = (require(7633) /* metro dependency 7633: GiftingBadgeExperiment */).GiftingBadgeExperiment;
const useConfig = GiftingBadgeExperiment.useConfig;
const enabled = Reflect.apply(useConfig, GiftingBadgeExperiment,
[{location: 'CollectiblesShopGiftPurchaseSection'}]).enabled;
const value2 = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([BadgeDirectoryStore],
_fun93233);
const nextTier = value2.nextTier;
const giftsToNextTier = value2.giftsToNextTier;
const env0_4 = value2.badgeProgress;
const binding = env0_4;
const useState = binding.useState;
const NOT_STARTED = env0_14.NOT_STARTED;
const value4 = giftingOrigin(Reflect.apply(useState, binding, [NOT_STARTED]), 2);
const property = value4[0];
const env0_6 = value4[1];
const env0_7 = (importDefault(10147) /* metro dependency 10147: useMobileCollectiblesPurchaseSKUAndroid */)({product: product,
analyticsLocations: (importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */)().analyticsLocations,
onPurchaseComplete: onPurchaseComplete, onPurchaseError: onPurchaseError, onPurchasePending: function() {
}, giftParams: {isGift: true, options: giftOptions}});
env0_4.useEffect(function() {
return _fun93241;
}, []);
const items2 = [enabled && nextTier != null ? ((Component) => <Component giftsToNextTier={giftsToNextTier} nextTierName={nextTier.name ?? ''} nextTierIcon={nextTier.simple_icon_url} />)(importDefault(10396) /* metro dependency 10396: GiftingBadgeProgressBanner */) : null];
const TextWithIOSLinkWorkaround = (require(6766) /* metro dependency 6766: TextWithIOSLinkWorkaround */).TextWithIOSLinkWorkaround;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const format = intl.format;
const rsEdd2 = (require(1244) /* metro dependency 1244: indexNative */).t.rsEdd2;
const object = {};
const intl2 = (require(1244) /* metro dependency 1244: indexNative */).intl;
object.buyButtonLabel = intl2.string((require(1244) /* metro dependency 1244: indexNative */).t.ouo4FK);
const PAID_TERMS = MarketingURLs.PAID_TERMS;
object.paidServiceTermURL = PAID_TERMS;
const PAID_TERMS_VIRTUAL_GOODS = MarketingURLs.PAID_TERMS_VIRTUAL_GOODS;
object.virtualGoodsURL = PAID_TERMS_VIRTUAL_GOODS;
items2[1] = <TextWithIOSLinkWorkaround variant="text-xs/normal" style={styles.disclaimer}>{Reflect.apply(format,
intl, [rsEdd2, object])}</TextWithIOSLinkWorkaround>;
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
const PURCHASING = env0_14.PURCHASING;
items2[2] = <Button disabled={isPurchaseDisabled} loading={property === PURCHASING} variant="active" text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.ouo4FK)} onPress={onPress_93242} />;
return (
<View style={styles.container}>
{items2}
</View>
);
}
function _fun93243(a0) { // fn#93243, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12342:289, offset: 0x020abe3b, size: 195 bytes, params: 2, frame: 17
const object = {};
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object.paddingBottom = PX_12 + a0;
const PX_122 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object.paddingTop = PX_122;
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object.paddingHorizontal = PX_16;
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object.gap = PX_8;
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object.backgroundColor = BACKGROUND_BASE_LOW;
const SHADOW_TOP_HIGH = (importDefault(697) /* metro dependency 697: native */).shadows.SHADOW_TOP_HIGH;
copyDataProperties(object, SHADOW_TOP_HIGH, PX_12);
return {container: object, disclaimer: {includeFontPadding: true}};
}
function WrappedCollectiblesShopGiftPurchaseSection({product, isPurchaseDisabled, giftOptions, baseAnalyticsFields, giftingOrigin}) { // fn#93244, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12342:2765, offset: 0x020abefe, size: 139 bytes, params: 2, frame: 21
const NativePaymentContextProvider = (require(10109) /* metro dependency 10109: NativePaymentContext */).NativePaymentContextProvider;
return (
<NativePaymentContextProvider skuIDs={[]} activeSubscription={null}>
<CollectiblesShopGiftPurchaseSection
product={product}
isPurchaseDisabled={isPurchaseDisabled}
giftOptions={giftOptions}
baseAnalyticsFields={baseAnalyticsFields}
giftingOrigin={giftingOrigin}
function CollectiblesShopGiftPurchaseSection({product, isPurchaseDisabled, giftOptions, baseAnalyticsFields, giftingOrigin}) { // fn#93232, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12342:686, offset: 0x020ab7c7, size: 855 bytes, params: 2, frame: 31
const styles = useStyles((UseSafeAreaInsetsKeyboardAwareNative)().insets.bottom);
const GiftingBadgeExperiment = (GiftingBadgeExperimentModule).GiftingBadgeExperiment;
const useConfig = GiftingBadgeExperiment.useConfig;
const enabled = Reflect.apply(useConfig, GiftingBadgeExperiment,
[{location: 'CollectiblesShopGiftPurchaseSection'}]).enabled;
const value2 = (FluxModule).useStateFromStoresObject([BadgeDirectoryStore],
_fun93233);
const nextTier = value2.nextTier;
const giftsToNextTier = value2.giftsToNextTier;
const badgeProgress = value2.badgeProgress;
const binding = badgeProgress;
const useState = binding.useState;
const NOT_STARTED = env0_14.NOT_STARTED;
const value4 = giftingOrigin(Reflect.apply(useState, binding, [NOT_STARTED]), 2);
const property = value4[0];
const env0_6 = value4[1];
const env0_7 = (importDefault(10147) /* metro dependency 10147: useMobileCollectiblesPurchaseSKUAndroid */)({product: product,
analyticsLocations: (importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */)().analyticsLocations,
onPurchaseComplete: onPurchaseComplete_93234, onPurchaseError: onPurchaseError_93238,
onPurchasePending: function() {
}, giftParams: {isGift: true, options: giftOptions}});
badgeProgress.useEffect(function() {
return _fun93241;
}, []);
const items2 = [
enabled && nextTier != null
? ((Component) => <Component giftsToNextTier={giftsToNextTier} nextTierName={nextTier.name ?? ''} nextTierIcon={nextTier.simple_icon_url} />)(importDefault(10396) /* metro dependency 10396: GiftingBadgeProgressBanner */)
: null,
];
const TextWithIOSLinkWorkaround = (TextWithIOSLinkWorkaroundModule).TextWithIOSLinkWorkaround;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const format = intl.format;
const rsEdd2 = (require(1244) /* metro dependency 1244: indexNative */).t.rsEdd2;
const object2 = {};
const intl2 = (require(1244) /* metro dependency 1244: indexNative */).intl;
object2.buyButtonLabel = intl2.string((require(1244) /* metro dependency 1244: indexNative */).t.ouo4FK);
const PAID_TERMS = MarketingURLs.PAID_TERMS;
object2.paidServiceTermURL = PAID_TERMS;
const PAID_TERMS_VIRTUAL_GOODS = MarketingURLs.PAID_TERMS_VIRTUAL_GOODS;
object2.virtualGoodsURL = PAID_TERMS_VIRTUAL_GOODS;
items2[1] = (
<TextWithIOSLinkWorkaround variant="text-xs/normal" style={styles.disclaimer}>
{Reflect.apply(format, intl, [rsEdd2, object2])}
</TextWithIOSLinkWorkaround>
);
const Button = (ButtonNativeModule).Button;
const PURCHASING = env0_14.PURCHASING;
items2[2] = (
<Button
disabled={isPurchaseDisabled}
loading={property === PURCHASING}
variant="active"
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.ouo4FK)}
onPress={onPress_93242}
/>
</NativePaymentContextProvider>
);
}
);
return (
<View style={styles.container}>
{items2}
</View>
);
function _fun93233() { // fn#93233, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12342:999, offset: 0x020abb1e, size: 157 bytes, params: 1, frame: 17
const object = {};
let value = environment.__proto__;
let badgeDirectoryStoreBinding = BadgeDirectoryStore;
const getNextTier = badgeDirectoryStoreBinding.getNextTier;
const value2 = undefined;
const BadgeId = (BadgeIdModule).BadgeId;
let GIFTING = BadgeId.GIFTING;
object.nextTier = Reflect.apply(getNextTier, badgeDirectoryStoreBinding, [GIFTING]);
badgeDirectoryStoreBinding = BadgeDirectoryStore;
const getRemainingToNextTier = badgeDirectoryStoreBinding.getRemainingToNextTier;
GIFTING = BadgeId.GIFTING;
object.giftsToNextTier = Reflect.apply(getRemainingToNextTier, badgeDirectoryStoreBinding, [GIFTING]);
badgeDirectoryStoreBinding = BadgeDirectoryStore;
const getSingleRequirementProgress = badgeDirectoryStoreBinding.getSingleRequirementProgress;
GIFTING = BadgeId.GIFTING;
value = Reflect.apply(getSingleRequirementProgress, badgeDirectoryStoreBinding, [GIFTING]);
object.badgeProgress = value == null ? value2 : value.current;
return object;
}
function _fun93233() { // fn#93233, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12342:999, offset: 0x020abb1e, size: 157 bytes, params: 1, frame: 17
const object2 = {};
let value = environment.__proto__;
const getNextTier = BadgeDirectoryStore.getNextTier;
const value2 = undefined;
const BadgeId = (require(7635) /* metro dependency 7635: BadgeId */).BadgeId;
let GIFTING = BadgeId.GIFTING;
object2.nextTier = Reflect.apply(getNextTier, BadgeDirectoryStore, [GIFTING]);
const getRemainingToNextTier = BadgeDirectoryStore.getRemainingToNextTier;
GIFTING = BadgeId.GIFTING;
object2.giftsToNextTier = Reflect.apply(getRemainingToNextTier, BadgeDirectoryStore, [GIFTING]);
const getSingleRequirementProgress = BadgeDirectoryStore.getSingleRequirementProgress;
GIFTING = BadgeId.GIFTING;
value = Reflect.apply(getSingleRequirementProgress, BadgeDirectoryStore, [GIFTING]);
object2.badgeProgress = value == null ? value2 : value.current;
return object2;
}
function CollectiblesShopGiftPurchaseSectionOnPurchaseComplete() { // fn#93234, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12342:1431, owner: CollectiblesShopGiftPurchaseSection.onPurchaseComplete, offset: 0x020abbbb, size: 277 bytes, params: 1, frame: 18
var environment;
var value6;
if (!(giftOptions.recipient_id == null || giftingOrigin !== GiftingOrigin.USER_PROFILE_WISHLIST && giftingOrigin !== GiftingOrigin.DM_CHANNEL_WISHLIST)) {
value6 = environment.__proto__;
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'WISHLIST_GIFT_SENT',
skuId: product.skuId, recipientId: giftOptions.recipient_id});
}
const binding = env0_6;
const SUCCEEDED = env1_14.SUCCEEDED;
binding(SUCCEEDED);
(ModalActionCreators).pop();
const defaultImport3 = AlertActionCreators;
defaultImport3.openLazy({importer: importer_93235});
const defaultImport4 = AnalyticsUtils;
const track = defaultImport4.track;
const PAYMENT_FLOW_SUCCEEDED = AnalyticEvents.PAYMENT_FLOW_SUCCEEDED;
Reflect.apply(track, defaultImport4, [PAYMENT_FLOW_SUCCEEDED, baseAnalyticsFields]);
function onPurchaseCompleteImporter() { // fn#93235, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12342:1660, owner: CollectiblesShopGiftPurchaseSection.onPurchaseComplete.importer, offset: 0x020abcd0, size: 64 bytes, params: 1, frame: 13
var environment;
let value = environment.__proto__.__proto__;
value = require(dependencyMap[19]);
value = value(dependencyMap[18], dependencyMap.paths);
return value.then(function({default: env0_0}) {
return _fun93237;
});
function _fun93236({default: env0_0}) { // fn#93236, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12342:1694, offset: 0x020abd10, size: 23 bytes, params: 2, frame: 2
return _fun93237;
function _fun93237(a0) { // fn#93237, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12342:1709, offset: 0x020abd27, size: 79 bytes, params: 2, frame: 16
return ((Component) => <Component giftStyle={giftOptions.gift_style ?? PremiumGiftStyles.STANDARD_BOX} giftBadgeProgress={badgeProgress} {...a0} />)(env0_0);
}
}
}
}
function CollectiblesShopGiftPurchaseSectionOnPurchaseError() { // fn#93238, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12342:1873, owner: CollectiblesShopGiftPurchaseSection.onPurchaseError, offset: 0x020abd76, size: 74 bytes, params: 1, frame: 15
const binding = env0_6;
const FAILED = env1_14.FAILED;
binding(FAILED);
const defaultImport = AnalyticsUtils;
const track = defaultImport.track;
const PAYMENT_FLOW_FAILED = AnalyticEvents.PAYMENT_FLOW_FAILED;
Reflect.apply(track, defaultImport, [PAYMENT_FLOW_FAILED, baseAnalyticsFields]);
}
function _fun93240() { // fn#93240, offset: 0x020abdc0, size: 11 bytes, params: 1, frame: 1
return _fun93241;
function _fun93241() { // fn#93241, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12342:2015, offset: 0x020abdcb, size: 75 bytes, params: 1, frame: 14
var defaultImport;
const binding = env1_5;
const SUCCEEDED = env2_14.SUCCEEDED;
if (binding !== SUCCEEDED) {
defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
defaultImport.track(AnalyticEvents.PAYMENT_FLOW_CANCELED, baseAnalyticsFields);
}
}
}
function CollectiblesShopGiftPurchaseSectionOnPress() { // fn#93242, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12342:2622, owner: CollectiblesShopGiftPurchaseSection.onPress, offset: 0x020abe16, size: 37 bytes, params: 1, frame: 12
const binding = env0_6;
const PURCHASING = env1_14.PURCHASING;
binding(PURCHASING);
env0_7();
}
function CollectiblesShopGiftPurchaseSectionOnPurchaseComplete() { // fn#93234, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12342:1431, owner: CollectiblesShopGiftPurchaseSection.onPurchaseComplete, offset: 0x020abbbb, size: 277 bytes, params: 1, frame: 18
var environment;
var value6;
if (!(giftOptions.recipient_id == null || giftingOrigin !== GiftingOrigin.USER_PROFILE_WISHLIST && giftingOrigin !== GiftingOrigin.DM_CHANNEL_WISHLIST)) {
value6 = environment.__proto__;
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'WISHLIST_GIFT_SENT',
skuId: product.skuId, recipientId: giftOptions.recipient_id});
}
const binding = env0_6;
const SUCCEEDED = env1_14.SUCCEEDED;
binding(SUCCEEDED);
(importDefault(5080) /* metro dependency 5080: ModalActionCreators */).pop();
const defaultImport3 = importDefault(4496) /* metro dependency 4496: AlertActionCreators */;
defaultImport3.openLazy({importer: importer_93235});
const defaultImport4 = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
const track = defaultImport4.track;
const PAYMENT_FLOW_SUCCEEDED = AnalyticEvents.PAYMENT_FLOW_SUCCEEDED;
Reflect.apply(track, defaultImport4, [PAYMENT_FLOW_SUCCEEDED, baseAnalyticsFields]);
}
function CollectiblesShopGiftPurchaseSectionOnPurchaseError() { // fn#93238, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12342:1873, owner: CollectiblesShopGiftPurchaseSection.onPurchaseError, offset: 0x020abd76, size: 74 bytes, params: 1, frame: 15
const binding = env0_6;
const FAILED = env1_14.FAILED;
binding(FAILED);
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
const track = defaultImport.track;
const PAYMENT_FLOW_FAILED = AnalyticEvents.PAYMENT_FLOW_FAILED;
Reflect.apply(track, defaultImport, [PAYMENT_FLOW_FAILED, baseAnalyticsFields]);
}
function _fun93240() { // fn#93240, offset: 0x020abdc0, size: 11 bytes, params: 1, frame: 1
return _fun93241;
}
function CollectiblesShopGiftPurchaseSectionOnPress() { // fn#93242, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12342:2622, owner: CollectiblesShopGiftPurchaseSection.onPress, offset: 0x020abe16, size: 37 bytes, params: 1, frame: 12
const binding = env0_6;
const PURCHASING = env1_14.PURCHASING;
binding(PURCHASING);
env0_7();
}
function onPurchaseCompleteImporter() { // fn#93235, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12342:1660, owner: CollectiblesShopGiftPurchaseSection.onPurchaseComplete.importer, offset: 0x020abcd0, size: 64 bytes, params: 1, frame: 13
var environment;
let value = environment.__proto__.__proto__;
value = require(dependencyMap[19]);
value = value(dependencyMap[18], dependencyMap.paths);
return value.then(function({default: env0_0}) {
return _fun93237;
});
}
function _fun93241() { // fn#93241, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12342:2015, offset: 0x020abdcb, size: 75 bytes, params: 1, frame: 14
var defaultImport;
const binding = env1_5;
const SUCCEEDED = env2_14.SUCCEEDED;
if (binding !== SUCCEEDED) {
defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
defaultImport.track(AnalyticEvents.PAYMENT_FLOW_CANCELED, baseAnalyticsFields);
function _fun93243(a0) { // fn#93243, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12342:289, offset: 0x020abe3b, size: 195 bytes, params: 2, frame: 17
const object2 = {};
const PX_12 = (Native).space.PX_12;
object2.paddingBottom = PX_12 + a0;
const PX_122 = (Native).space.PX_12;
object2.paddingTop = PX_122;
const PX_16 = (Native).space.PX_16;
object2.paddingHorizontal = PX_16;
const PX_8 = (Native).space.PX_8;
object2.gap = PX_8;
const BACKGROUND_BASE_LOW = (Native).colors.BACKGROUND_BASE_LOW;
object2.backgroundColor = BACKGROUND_BASE_LOW;
const SHADOW_TOP_HIGH = (Native).shadows.SHADOW_TOP_HIGH;
copyDataProperties(object2, SHADOW_TOP_HIGH, PX_12);
return {container: object2, disclaimer: {includeFontPadding: true}};
}
function WrappedCollectiblesShopGiftPurchaseSection({product, isPurchaseDisabled, giftOptions, baseAnalyticsFields, giftingOrigin}) { // fn#93244, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12342:2765, offset: 0x020abefe, size: 139 bytes, params: 2, frame: 21
const NativePaymentContextProvider = (NativePaymentContextModule).NativePaymentContextProvider;
return (
<NativePaymentContextProvider skuIDs={[]} activeSubscription={null}>
<CollectiblesShopGiftPurchaseSection
product={product}
isPurchaseDisabled={isPurchaseDisabled}
giftOptions={giftOptions}
baseAnalyticsFields={baseAnalyticsFields}
giftingOrigin={giftingOrigin}
/>
</NativePaymentContextProvider>
);
}
}
function _fun93236({default: env0_0}) { // fn#93236, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12342:1694, offset: 0x020abd10, size: 23 bytes, params: 2, frame: 2
return _fun93237;
}
function _fun93237(a0) { // fn#93237, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12342:1709, offset: 0x020abd27, size: 79 bytes, params: 2, frame: 16
return ((Component) => <Component giftStyle={giftOptions.gift_style ?? PremiumGiftStyles.STANDARD_BOX} giftBadgeProgress={badgeProgress} {...a0} />)(env0_0);
}
global.__d(_fun93231, 12156, [57, 31, 27, 7670, 661, 1880, 33, 4501, 697, 5463, 7633, 566, 7635, 6771, 10147, 694,
5080, 4496, 12157, 1962, 683, 10396, 6766, 1244, 4578, 10109,
2]) /* metro module 12156, dependencies: [57, 31, 27, 7670, 661, 1880, 33, 4501, 697, 5463, 7633, 566, 7635, 6771, 10147, 694, 5080, 4496, 12157, 1962, 683, 10396, 6766, 1244, 4578, 10109, 2] */;
@@ -1,83 +1,111 @@
/* Metro module 14053; source: modules/collectibles/native/CollectiblesShopOrbsPage.tsx; dependencies: [31, 27, 5121, 663, 33, 4501, 6771, 10023, 14042, 4080, 10085, 1305, 8754, 1244, 14046, 14054, 2] */
import CollectiblesCategoryStore from '../CollectiblesCategoryStore.tsx'; /* Metro dependency 5121 */
import UseAnalyticsLocations from '../../app_analytics/useAnalyticsLocations.tsx'; /* Metro dependency 6771 */
import ShopBlockItem from './ShopBlockItem.tsx'; /* Metro dependency 14054 */
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 CollectiblesShopConstantsModule from '../CollectiblesShopConstants.tsx'; /* Metro dependency 663 */
import * as NativeModule from '../../../design/void/native.tsx'; /* Metro dependency 1305 */
import * as CreateStylesModule from '../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as CollectiblesAnalyticsContextModule from '../CollectiblesAnalyticsContext.tsx'; /* Metro dependency 10023 */
import * as UseCollectiblesShopDeepLinkPropsModule from './useCollectiblesShopDeepLinkProps.tsx'; /* Metro dependency 14042 */
function _fun106572(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#106572, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14250:6, offset: 0x022e0984, size: 247 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(27) /* metro dependency 27 */).View;
const collectiblesCategoryStore = importDefault(5121) /* metro dependency 5121: CollectiblesCategoryStore */;
const env0_6 = (require(663) /* metro dependency 663: CollectiblesShopConstants */).CollectiblesMobileShopScreen;
const env0_7 = (require(33) /* metro dependency 33 */).jsx;
const env0_8 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({container: {'display': 'flex',
const env0_8 = (CreateStylesModule).createStyles({container: {'display': 'flex',
'flex': 1}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/CollectiblesShopOrbsPage.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/native/CollectiblesShopOrbsPage.tsx');
exports.default = _default_106573;
}
function _default_106573({shopBlocks, fetchShopHomeError, onRenderFirstOrbsItem}) { // fn#106573, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14250:253, offset: 0x022e0a7b, size: 427 bytes, params: 2, frame: 23
var r0;
const EmptyState = (require(1305) /* metro dependency 1305: native */).EmptyState;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var value;
const styles = useStyles();
const analyticsLocations = (importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */)().analyticsLocations;
const value2 = (require(10023) /* metro dependency 10023: CollectiblesAnalyticsContext */).useCollectiblesAnalyticsContext();
const value3 = (require(14042) /* metro dependency 14042: useCollectiblesShopDeepLinkProps */).useCollectiblesShopDeepLinkProps({});
const initialProductSkuId = value3.initialProductSkuId;
initialProductSkuId.useEffect(_fun106574, [initialProductSkuId, value3.initialVariantIndex,
value3.initialCategorySkuId, analyticsLocations, value2]);
if (fetchShopHomeError !== null) {
r0 = <View style={styles.container}><EmptyState style={{marginTop: 42}} Illustration={(require(8754) /* metro dependency 8754: NoResults */).NoResults} body={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.eAn6z2)} /></View>;
} else if (shopBlocks.length === 0) {
r0 = <View style={styles.container}><EmptyState style={{marginTop: 42}} Illustration={(require(8754) /* metro dependency 8754: NoResults */).NoResults} body={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.eAn6z2)} /></View>;
} else {
value = importDefault(14046) /* metro dependency 14046: ShopFlashList */;
value = ((Component) => <Component data={shopBlocks} renderItem={renderItem_106576} />)(value);
r0 = value;
}
return r0;
}
function _fun106574() { // fn#106574, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14250:542, offset: 0x022e0c26, size: 198 bytes, params: 1, frame: 16
var environment;
var r5;
var value2;
var value3;
var value4;
if (initialProductSkuId != null) {
if (initialCategorySkuId != null) {
value2 = environment.__proto__;
value3 = CollectiblesCategoryStore.getCategory(initialCategorySkuId);
value4 = undefined;
r5 = value3 == null ? value4 : value3.products.find(function({skuId}) {
return skuId === initialProductSkuId;
});
if (r5 != null) {
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
(require(10085) /* metro dependency 10085: openProductDetailsActionSheet */).openProductDetailsActionSheet({product: r5,
initialVariantIndex: initialVariantIndex, analyticsLocations: analyticsLocations,
shopAnalyticsContext: env0_2 ?? value4});
function _default_106573({shopBlocks, fetchShopHomeError, onRenderFirstOrbsItem}) { // fn#106573, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14250:253, offset: 0x022e0a7b, size: 427 bytes, params: 2, frame: 23
var r0;
const EmptyState = (NativeModule).EmptyState;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var value;
const styles = useStyles();
const analyticsLocations = (UseAnalyticsLocations)().analyticsLocations;
const value2 = (CollectiblesAnalyticsContextModule).useCollectiblesAnalyticsContext();
const value3 = (UseCollectiblesShopDeepLinkPropsModule).useCollectiblesShopDeepLinkProps({});
const initialProductSkuId = value3.initialProductSkuId;
initialProductSkuId.useEffect(_fun106574, [initialProductSkuId, value3.initialVariantIndex,
value3.initialCategorySkuId, analyticsLocations, value2]);
if (fetchShopHomeError !== null) {
r0 = (
<View style={styles.container}>
<EmptyState
style={{marginTop: 42}}
Illustration={(require(8754) /* metro dependency 8754: NoResults */).NoResults}
body={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.eAn6z2)}
/>
</View>
);
} else if (shopBlocks.length === 0) {
r0 = (
<View style={styles.container}>
<EmptyState
style={{marginTop: 42}}
Illustration={(require(8754) /* metro dependency 8754: NoResults */).NoResults}
body={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.eAn6z2)}
/>
</View>
);
} else {
value = importDefault(14046) /* metro dependency 14046: ShopFlashList */;
value = ((Component) => <Component data={shopBlocks} renderItem={renderItem_106576} />)(value);
r0 = value;
}
return r0;
function _fun106574() { // fn#106574, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14250:542, offset: 0x022e0c26, size: 198 bytes, params: 1, frame: 16
var environment;
var r5;
var value2;
var collectiblesCategoryStoreBinding;
var value3;
var value4;
if (initialProductSkuId != null) {
if (initialCategorySkuId != null) {
value2 = environment.__proto__;
collectiblesCategoryStoreBinding = CollectiblesCategoryStore;
value3 = collectiblesCategoryStoreBinding.getCategory(initialCategorySkuId);
value4 = undefined;
r5 = value3 == null ? value4 : value3.products.find(function({skuId}) {
return skuId === initialProductSkuId;
});
if (r5 != null) {
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
(require(10085) /* metro dependency 10085: openProductDetailsActionSheet */).openProductDetailsActionSheet({product: r5,
initialVariantIndex: initialVariantIndex, analyticsLocations: analyticsLocations,
shopAnalyticsContext: env0_2 ?? value4});
}
}
}
}
function _default_106573RenderItem(a0) { // fn#106576, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14250:1038, owner: _default_106573.renderItem, offset: 0x022e0cec, size: 98 bytes, params: 2, frame: 15
const item = a0.item;
if (a0.index === 0) {
onRenderFirstOrbsItem();
}
const ORBS = CollectiblesMobileShopScreen.ORBS;
return (
<ShopBlockItem
block={item}
screen={ORBS}
preferVCPrice
/>
);
}
}
}
function _default_106573RenderItem(a0) { // fn#106576, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14250:1038, owner: _default_106573.renderItem, offset: 0x022e0cec, size: 98 bytes, params: 2, frame: 15
const item = a0.item;
if (a0.index === 0) {
onRenderFirstOrbsItem();
}
const ShopBlockItem = importDefault(14054) /* metro dependency 14054: ShopBlockItem */;
const ORBS = CollectiblesMobileShopScreen.ORBS;
return (
<ShopBlockItem
block={item}
screen={ORBS}
preferVCPrice
/>
);
}
global.__d(_fun106572, 14053, [31, 27, 5121, 663, 33, 4501, 6771, 10023, 14042, 4080, 10085, 1305, 8754, 1244,
14046, 14054,
2]) /* metro module 14053, dependencies: [31, 27, 5121, 663, 33, 4501, 6771, 10023, 14042, 4080, 10085, 1305, 8754, 1244, 14046, 14054, 2] */;
@@ -1,43 +1,55 @@
/* Metro module 10075; source: modules/collectibles/native/CollectiblesShopPricePlaceholder.tsx; dependencies: [31, 33, 4501, 697, 4017, 4504, 2] */
import ReanimatedRexport from '../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
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 JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as ReanimatedRexportModule from '../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import * as CreateStylesModule from '../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as TimingModule from '../../../design/animation/reanimated/timing/timing.tsx'; /* Metro dependency 4504 */
function _fun78761(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#78761, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10261:6, offset: 0x01e336f2, size: 256 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(33) /* metro dependency 33 */).jsx;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
const object3 = {'height': 16, 'flex': 1};
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
const createStyles = CreateStylesModule.createStyles;
const object2 = {'height': 16, 'flex': 1};
object2.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
const REDESIGN_BUTTON_TERTIARY_BACKGROUND = (importDefault(697) /* metro dependency 697: native */).colors.REDESIGN_BUTTON_TERTIARY_BACKGROUND;
object3.backgroundColor = REDESIGN_BUTTON_TERTIARY_BACKGROUND;
const env0_5 = Reflect.apply(createStyles, createStylesModule, [{skeletonContainer: object3}]);
object2.backgroundColor = REDESIGN_BUTTON_TERTIARY_BACKGROUND;
const env0_5 = Reflect.apply(createStyles, CreateStylesModule, [{skeletonContainer: object2}]);
object = {code: 'function CollectiblesShopPricePlaceholderTsx1(){const{opacity}=this.__closure;return{opacity:opacity.get()};}'};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/CollectiblesShopPricePlaceholder.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/native/CollectiblesShopPricePlaceholder.tsx');
exports.CollectiblesShopPricePlaceholder = CollectiblesShopPricePlaceholder;
function CollectiblesShopPricePlaceholder({style}) { // fn#78762, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10261:534, offset: 0x01e337f2, size: 221 bytes, params: 2, frame: 22
const styles = useStyles();
const value2 = (ReanimatedRexportModule).useSharedValue(0.3);
ReactModule.useEffect(_fun78763, [value2]);
const useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle;
const CollectiblesShopPricePlaceholder_2 = CollectiblesShopPricePlaceholder_;
CollectiblesShopPricePlaceholder_2.__closure = {opacity: value2};
CollectiblesShopPricePlaceholder_2.__workletHash = 10107093534072;
CollectiblesShopPricePlaceholder_2.__initData = env0_6;
const value3 = Reflect.apply(useAnimatedStyle, ReanimatedRexportModule, [CollectiblesShopPricePlaceholder_2]);
const View = (ReanimatedRexport).View;
return <View style={[styles.skeletonContainer, style, value3]} />;
function _fun78763() { // fn#78763, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10261:600, offset: 0x01e338cf, size: 103 bytes, params: 1, frame: 19
const binding = env0_0;
const set = binding.set;
let value = environment.__proto__;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
Reflect.apply(set, binding, [value.withRepeat((TimingModule).withTiming(1,
{duration: 650}), -1, true)]);
}
function CollectiblesShopPricePlaceholder_() { // fn#78764, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10261:719, owner: CollectiblesShopPricePlaceholder._, offset: 0x01d2f35e, size: 24 bytes, params: 1, frame: 10
const object = {};
object.opacity = env0_0.get();
return object;
}
}
}
function CollectiblesShopPricePlaceholder({style}) { // fn#78762, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10261:534, offset: 0x01e337f2, size: 221 bytes, params: 2, frame: 22
const styles = useStyles();
const value2 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(0.3);
env0_3.useEffect(_fun78763, [value2]);
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
const closure = CollectiblesShopPricePlaceholder_;
closure.__closure = {opacity: value2};
closure.__workletHash = 10107093534072;
closure.__initData = env0_6;
const value3 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
const View = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
return <View style={[styles.skeletonContainer, style, value3]} />;
}
function _fun78763() { // fn#78763, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10261:600, offset: 0x01e338cf, size: 103 bytes, params: 1, frame: 19
const binding = env0_0;
const set = binding.set;
let value = environment.__proto__;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
Reflect.apply(set, binding, [value.withRepeat((require(4504) /* metro dependency 4504: timing */).withTiming(1,
{duration: 650}), -1, true)]);
}
global.__d(_fun78761, 10075, [31, 33, 4501, 697, 4017, 4504,
2]) /* metro module 10075, dependencies: [31, 33, 4501, 697, 4017, 4504, 2] */;
File diff suppressed because it is too large. Load diff
@@ -1,122 +1,144 @@
/* Metro module 14083; source: modules/collectibles/native/CollectiblesShopViewAllCategoryItems.tsx; dependencies: [31, 27, 663, 661, 33, 4501, 697, 7591, 6771, 6789, 1585, 14049, 4017, 4577, 683, 5183, 10023, 10109, 14084, 14085, 14064, 1244, 2] */
import AnalyticsUtils from '../../../utils/AnalyticsUtils.tsx'; /* Metro dependency 683 */
import Native from '../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import UseSafeAreaInsetsNative from '../../safe_area/useSafeAreaInsets.native.tsx'; /* Metro dependency 1585 */
import ReanimatedRexport from '../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import UseAnalyticsLocations from '../../app_analytics/useAnalyticsLocations.tsx'; /* Metro dependency 6771 */
import AnalyticsLocation from '../../app_analytics/AnalyticsLocation.tsx'; /* Metro dependency 6789 */
import UseCollectiblesShopStylesNative from '../useCollectiblesShopStyles.native.tsx'; /* Metro dependency 7591 */
import CollectiblesShopCardsGrid from './CollectiblesShopCardsGrid.tsx'; /* Metro dependency 14064 */
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 ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
import * as CollectiblesShopConstantsModule from '../CollectiblesShopConstants.tsx'; /* Metro dependency 663 */
import * as IndexNativeModule from '../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as ReanimatedRexportModule from '../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import * as CreateStylesModule from '../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as CollectiblesPerfLoggingModule from '../utils/CollectiblesPerfLogging.tsx'; /* Metro dependency 5183 */
import * as UseAnalyticsLocationsModule from '../../app_analytics/useAnalyticsLocations.tsx'; /* Metro dependency 6771 */
import * as CollectiblesAnalyticsContextModule from '../CollectiblesAnalyticsContext.tsx'; /* Metro dependency 10023 */
import * as NativePaymentContextModule from '../../payments/native/NativePaymentContext.tsx'; /* Metro dependency 10109 */
import * as UseFilteredAndSortedProductsModule from './hooks/useFilteredAndSortedProducts.tsx'; /* Metro dependency 14049 */
import * as CollectiblesProgressiveImageModule from './CollectiblesProgressiveImage.tsx'; /* Metro dependency 14084 */
function _fun106711(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#106711, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14280:6, offset: 0x022e79b7, size: 353 bytes, params: 8, frame: 24
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const value2 = require(27) /* metro dependency 27 */;
const env0_4 = value2.View;
const env0_5 = value2.StyleSheet;
const env0_6 = (require(663) /* metro dependency 663: CollectiblesShopConstants */).CollectiblesMobileShopScreen;
const env0_7 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
const value3 = require(33) /* metro dependency 33 */;
const env0_8 = value3.jsx;
const env0_9 = value3.jsxs;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
object2 = {};
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object2.rootContainer = {flex: 1, backgroundColor: BACKGROUND_BASE_LOW};
const BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
object2.border = {height: 1, backgroundColor: BORDER_SUBTLE};
const env0_10 = Reflect.apply(createStyles, createStylesModule, [object2]);
object2 = {code: 'function CollectiblesShopViewAllCategoryItemsTsx1(){const{borderOpacity}=this.__closure;return{opacity:borderOpacity.get()};}'};
let value = ReactModule;
const createStyles = CreateStylesModule.createStyles;
object = {};
const BACKGROUND_BASE_LOW = (Native).colors.BACKGROUND_BASE_LOW;
object.rootContainer = {flex: 1, backgroundColor: BACKGROUND_BASE_LOW};
const BORDER_SUBTLE = (Native).colors.BORDER_SUBTLE;
object.border = {height: 1, backgroundColor: BORDER_SUBTLE};
const env0_10 = Reflect.apply(createStyles, CreateStylesModule, [object]);
object = {code: 'function CollectiblesShopViewAllCategoryItemsTsx1(){const{borderOpacity}=this.__closure;return{opacity:borderOpacity.get()};}'};
value = value.memo(_fun106712);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/CollectiblesShopViewAllCategoryItems.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/native/CollectiblesShopViewAllCategoryItems.tsx');
exports.default = value;
function _fun106712({category, analyticsContext}) { // fn#106712, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14280:541, offset: 0x022e7b18, size: 923 bytes, params: 2, frame: 36
const styles = useStyles();
const mobileBgUrl = category.mobileBgUrl;
const logoUrl = category.logoUrl;
const backgroundColors = (UseCollectiblesShopStylesNative)(category.styles).backgroundColors;
const defaultImport2 = UseAnalyticsLocations;
const COLLECTIBLES_SHOP_INDEX_PAGE = (AnalyticsLocation).COLLECTIBLES_SHOP_INDEX_PAGE;
const analyticsLocations = defaultImport2([COLLECTIBLES_SHOP_INDEX_PAGE]).analyticsLocations;
const bottom = (UseSafeAreaInsetsNative)().bottom;
const value3 = (UseFilteredAndSortedProductsModule).useFilteredAndSortedProducts({products: category.products});
const value4 = (ReanimatedRexportModule).useSharedValue(0);
const binding = value4;
const value5 = binding.useCallback(_fun106713, [value4]);
const useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle;
const __1067142 = __106714;
__1067142.__closure = {borderOpacity: value4};
__1067142.__workletHash = 2446209469388;
__1067142.__initData = env0_11;
const value6 = Reflect.apply(useAnimatedStyle, ReanimatedRexportModule, [__1067142]);
binding.useEffect(_fun106715, [analyticsContext?.sessionId, analyticsLocations, category.name]);
const AnalyticsLocationProvider = (UseAnalyticsLocationsModule).AnalyticsLocationProvider;
const CollectiblesAnalyticsProvider = (CollectiblesAnalyticsContextModule).CollectiblesAnalyticsProvider;
const object3 = {};
copyDataProperties(object3, analyticsContext, mobileBgUrl);
object3['pageCategory'] = category.name;
const NativePaymentContextProvider = (NativePaymentContextModule).NativePaymentContextProvider;
const CollectiblesProgressiveImage = (CollectiblesProgressiveImageModule).CollectiblesProgressiveImage;
const items2 = [
<CollectiblesProgressiveImage source={{uri: mobileBgUrl}} style={StyleSheet.absoluteFill} />,
];
items2[1] = ((Component) => <Component logoUrl={logoUrl} buttonColor={backgroundColors == null ? undefined : backgroundColors.label.toHexString()} categoryName={category.name} />)(importDefault(14085) /* metro dependency 14085: CollectiblesShopViewAllCategoryItemsHeader */);
const View2 = (ReanimatedRexport).View;
items2[2] = <View2 style={[styles.border, value6]} />;
const object4 = {category: category, products: value3, scrollEnabled: true, onScroll: value5};
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object4.paddingTop = PX_16;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object4.paddingBottom = bottom + PX_16;
object4.muteBundleStaticBackground = true;
const intl = (IndexNativeModule).intl;
const formatToPlainString = intl.formatToPlainString;
const FNtLb3 = (IndexNativeModule).t.FNtLb3;
object4.accessibilityLabel = Reflect.apply(formatToPlainString, intl, [FNtLb3, {category: category.name}]);
items2[3] = <CollectiblesShopCardsGrid {...object4} />;
return (
<AnalyticsLocationProvider value={analyticsLocations}>
<CollectiblesAnalyticsProvider newValue={object3}>
<NativePaymentContextProvider skuIDs={[]} activeSubscription={null}>
<View style={styles.rootContainer}>
{items2}
</View>
</NativePaymentContextProvider>
</CollectiblesAnalyticsProvider>
</AnalyticsLocationProvider>
);
function _fun106713({nativeEvent}) { // fn#106713, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14280:858, offset: 0x022e7eb3, size: 89 bytes, params: 2, frame: 15
const binding = env0_3;
const set = binding.set;
let value = environment.__proto__;
value = require(4577) /* metro dependency 4577: spring */;
Reflect.apply(set, binding, [value.withSpring(nativeEvent.contentOffset.y > 5 ? 1 : 0)]);
}
function __106714() { // fn#106714, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14280:965, offset: 0x01de68e5, size: 24 bytes, params: 1, frame: 10
const object = {};
object.opacity = env0_3.get();
return object;
}
function _fun106715() { // fn#106715, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14280:1099, offset: 0x022e7f0c, size: 262 bytes, params: 1, frame: 20
const value2 = undefined;
const defaultImport = AnalyticsUtils;
const track = defaultImport.track;
const COLLECTIBLES_SHOP_VIEWED = AnalyticEvents.COLLECTIBLES_SHOP_VIEWED;
let object = {};
object.location_stack = analyticsLocations;
object.page_session_id = analyticsContext == null ? value2 : analyticsContext.sessionId;
const COLLECTIBLES_SHOP = (AnalyticsLocation).COLLECTIBLES_SHOP;
object.source = COLLECTIBLES_SHOP;
object.page_type = 'index';
object.category = category.name;
Reflect.apply(track, defaultImport, [COLLECTIBLES_SHOP_VIEWED, object]);
const trackShopPerf = CollectiblesPerfLoggingModule.trackShopPerf;
object = {};
object.sessionId = analyticsContext == null ? value2 : analyticsContext.sessionId;
const CollectiblesShopPerfCheckpoint = CollectiblesPerfLoggingModule.CollectiblesShopPerfCheckpoint;
const SHOP_MOUNTED = CollectiblesShopPerfCheckpoint.SHOP_MOUNTED;
object.checkpoint = SHOP_MOUNTED;
const SHOP_ALL = CollectiblesMobileShopScreen.SHOP_ALL;
object.tab = SHOP_ALL;
object.unpublishedCategoriesShown = false;
object.cacheDisabled = false;
Reflect.apply(trackShopPerf, CollectiblesPerfLoggingModule, [object]);
return value2;
}
}
}
function _fun106712({category, analyticsContext}) { // fn#106712, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14280:541, offset: 0x022e7b18, size: 923 bytes, params: 2, frame: 36
const styles = useStyles();
const mobileBgUrl = category.mobileBgUrl;
const logoUrl = category.logoUrl;
const backgroundColors = (importDefault(7591) /* metro dependency 7591: useCollectiblesShopStylesNative */)(category.styles).backgroundColors;
const defaultImport2 = importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */;
const COLLECTIBLES_SHOP_INDEX_PAGE = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).COLLECTIBLES_SHOP_INDEX_PAGE;
const analyticsLocations = defaultImport2([COLLECTIBLES_SHOP_INDEX_PAGE]).analyticsLocations;
const bottom = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)().bottom;
const value3 = (require(14049) /* metro dependency 14049: useFilteredAndSortedProducts */).useFilteredAndSortedProducts({products: category.products});
const value4 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(0);
const binding = value4;
const value5 = binding.useCallback(_fun106713, [value4]);
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
const closure = __106714;
closure.__closure = {borderOpacity: value4};
closure.__workletHash = 2446209469388;
closure.__initData = env0_11;
const value6 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
binding.useEffect(_fun106715, [analyticsContext?.sessionId, analyticsLocations, category.name]);
const AnalyticsLocationProvider = (require(6771) /* metro dependency 6771: useAnalyticsLocations */).AnalyticsLocationProvider;
const CollectiblesAnalyticsProvider = (require(10023) /* metro dependency 10023: CollectiblesAnalyticsContext */).CollectiblesAnalyticsProvider;
const object = {};
copyDataProperties(object, analyticsContext, mobileBgUrl);
object['pageCategory'] = category.name;
const NativePaymentContextProvider = (require(10109) /* metro dependency 10109: NativePaymentContext */).NativePaymentContextProvider;
const CollectiblesProgressiveImage = (require(14084) /* metro dependency 14084: CollectiblesProgressiveImage */).CollectiblesProgressiveImage;
const items2 = [<CollectiblesProgressiveImage source={{uri: mobileBgUrl}} style={StyleSheet.absoluteFill} />];
items2[1] = ((Component) => <Component logoUrl={logoUrl} buttonColor={backgroundColors == null ? undefined : backgroundColors.label.toHexString()} categoryName={category.name} />)(importDefault(14085) /* metro dependency 14085: CollectiblesShopViewAllCategoryItemsHeader */);
const View2 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
items2[2] = <View2 style={[styles.border, value6]} />;
const CollectiblesShopCardsGrid = importDefault(14064) /* metro dependency 14064: CollectiblesShopCardsGrid */;
const object2 = {category: category, products: value3, scrollEnabled: true, onScroll: value5};
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object2.paddingTop = PX_16;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object2.paddingBottom = bottom + PX_16;
object2.muteBundleStaticBackground = true;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const formatToPlainString = intl.formatToPlainString;
const FNtLb3 = (require(1244) /* metro dependency 1244: indexNative */).t.FNtLb3;
object2.accessibilityLabel = Reflect.apply(formatToPlainString, intl, [FNtLb3, {category: category.name}]);
items2[3] = <CollectiblesShopCardsGrid {...object2} />;
return (
<AnalyticsLocationProvider value={analyticsLocations}>
<CollectiblesAnalyticsProvider newValue={object}>
<NativePaymentContextProvider skuIDs={[]} activeSubscription={null}>
<View style={styles.rootContainer}>
{items2}
</View>
</NativePaymentContextProvider>
</CollectiblesAnalyticsProvider>
</AnalyticsLocationProvider>
);
}
function _fun106713({nativeEvent}) { // fn#106713, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14280:858, offset: 0x022e7eb3, size: 89 bytes, params: 2, frame: 15
const binding = env0_3;
const set = binding.set;
let value = environment.__proto__;
value = require(4577) /* metro dependency 4577: spring */;
Reflect.apply(set, binding, [value.withSpring(nativeEvent.contentOffset.y > 5 ? 1 : 0)]);
}
function _fun106715() { // fn#106715, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14280:1099, offset: 0x022e7f0c, size: 262 bytes, params: 1, frame: 20
const value2 = undefined;
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
const track = defaultImport.track;
const COLLECTIBLES_SHOP_VIEWED = AnalyticEvents.COLLECTIBLES_SHOP_VIEWED;
let object2 = {};
object2.location_stack = analyticsLocations;
object2.page_session_id = analyticsContext == null ? value2 : analyticsContext.sessionId;
const COLLECTIBLES_SHOP = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).COLLECTIBLES_SHOP;
object2.source = COLLECTIBLES_SHOP;
object2.page_type = 'index';
object2.category = category.name;
Reflect.apply(track, defaultImport, [COLLECTIBLES_SHOP_VIEWED, object2]);
const collectiblesPerfLoggingModule = require(5183) /* metro dependency 5183: CollectiblesPerfLogging */;
const trackShopPerf = collectiblesPerfLoggingModule.trackShopPerf;
object2 = {};
object2.sessionId = analyticsContext == null ? value2 : analyticsContext.sessionId;
const CollectiblesShopPerfCheckpoint = collectiblesPerfLoggingModule.CollectiblesShopPerfCheckpoint;
const SHOP_MOUNTED = CollectiblesShopPerfCheckpoint.SHOP_MOUNTED;
object2.checkpoint = SHOP_MOUNTED;
const SHOP_ALL = CollectiblesMobileShopScreen.SHOP_ALL;
object2.tab = SHOP_ALL;
object2.unpublishedCategoriesShown = false;
object2.cacheDisabled = false;
Reflect.apply(trackShopPerf, collectiblesPerfLoggingModule, [object2]);
return value2;
}
global.__d(_fun106711, 14083, [31, 27, 663, 661, 33, 4501, 697, 7591, 6771, 6789, 1585, 14049, 4017, 4577, 683,
5183, 10023, 10109, 14084, 14085, 14064, 1244,
2]) /* metro module 14083, dependencies: [31, 27, 663, 661, 33, 4501, 697, 7591, 6771, 6789, 1585, 14049, 4017, 4577, 683, 5183, 10023, 10109, 14084, 14085, 14064, 1244, 2] */;
@@ -1,46 +1,71 @@
/* Metro module 14085; source: modules/collectibles/native/CollectiblesShopViewAllCategoryItemsHeader.tsx; dependencies: [31, 27, 7553, 33, 4501, 1484, 9603, 9607, 1244, 2] */
import Module09607 from '../../../by-id/module-09607.js'; /* Metro dependency 9607 */
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 UseNavigationNativeModule from '../../../design/components/Navigator/native/useNavigation.native.tsx'; /* Metro dependency 1484 */
import * as CreateStylesModule from '../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as YouBarConstantsModule from '../../main_tabs_v2/native/YouBarConstants.tsx'; /* Metro dependency 7553 */
import * as HeaderSharedModule from '../../main_tabs_v2/native/shared_components/HeaderShared.tsx'; /* Metro dependency 9603 */
function _fun106719(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#106719, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14282:6, offset: 0x022e8204, size: 288 bytes, params: 8, frame: 21
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
ReactModule;
let value = ReactNativeModule;
const env0_3 = value.Image;
const env0_4 = value.View;
const env0_5 = (require(7553) /* metro dependency 7553: YouBarConstants */).useYouBarSettingsCustomHeaderPaddingTop;
value = require(33) /* metro dependency 33 */;
const env0_6 = value.jsx;
const env0_7 = value.jsxs;
const env0_8 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({headerContainer: {'flexDirection': 'row',
const env0_8 = (CreateStylesModule).createStyles({headerContainer: {'flexDirection': 'row',
'justifyContent': 'space-between', 'alignItems': 'center', 'paddingBottom': 12, 'paddingLeft': 8},
backButton: {flex: 1}, logo: {'flex': 2, 'height': 36}, dummyRightButton: {flex: 1}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/CollectiblesShopViewAllCategoryItemsHeader.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/native/CollectiblesShopViewAllCategoryItemsHeader.tsx');
exports.default = CollectiblesShopViewAllCategoryItemsHeader;
function CollectiblesShopViewAllCategoryItemsHeader({logoUrl, buttonColor, categoryName}) { // fn#106720, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14282:544, offset: 0x022e8324, size: 410 bytes, params: 2, frame: 28
const env0_0 = (UseNavigationNativeModule).useStackNavigation();
const styles = useStyles();
const value2 = useYouBarSettingsCustomHeaderPaddingTop('CollectiblesShopViewAllCategoryItemsHeader');
const object2 = {};
copyDataProperties(object2, styles.headerContainer, undefined);
object2['paddingTop'] = value2;
const HeaderIconButton = (HeaderSharedModule).HeaderIconButton;
const headerIconButtonProps = {source: Module09607, color: buttonColor};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
headerIconButtonProps.accessibilityLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['13/7kX']);
headerIconButtonProps.onPress = onPress_106721;
const items2 = [
<View style={styles.backButton}>
<HeaderIconButton {...headerIconButtonProps} />
</View>,
];
const object4 = {uri: logoUrl};
const formatToPlainString = intl.formatToPlainString;
const FNtLb3 = (require(1244) /* metro dependency 1244: indexNative */).t.FNtLb3;
items2[1] = (
<Image
resizeMode="contain"
style={styles.logo}
source={object4}
accessibilityLabel={Reflect.apply(formatToPlainString, intl, [FNtLb3, {category: categoryName}])}
accessibilityRole="header"
/>
);
items2[2] = <View style={styles.dummyRightButton} />;
return (
<View style={object2}>
{items2}
</View>
);
function CollectiblesShopViewAllCategoryItemsHeaderOnPress() { // fn#106721, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14282:945, owner: CollectiblesShopViewAllCategoryItemsHeader.onPress, offset: 0x022e84be, size: 21 bytes, params: 1, frame: 9
env0_0.goBack();
}
}
}
function CollectiblesShopViewAllCategoryItemsHeader({logoUrl, buttonColor, categoryName}) { // fn#106720, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14282:544, offset: 0x022e8324, size: 410 bytes, params: 2, frame: 28
const env0_0 = (require(1484) /* metro dependency 1484: useNavigationNative */).useStackNavigation();
const styles = useStyles();
const value2 = useYouBarSettingsCustomHeaderPaddingTop('CollectiblesShopViewAllCategoryItemsHeader');
const object = {};
copyDataProperties(object, styles.headerContainer, undefined);
object['paddingTop'] = value2;
const HeaderIconButton = (require(9603) /* metro dependency 9603: HeaderShared */).HeaderIconButton;
const headerIconButtonProps = {source: importDefault(9607) /* metro dependency 9607 */, color: buttonColor};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
headerIconButtonProps.accessibilityLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['13/7kX']);
headerIconButtonProps.onPress = onPress_106721;
const items2 = [<View style={styles.backButton}><HeaderIconButton {...headerIconButtonProps} /></View>];
const object3 = {uri: logoUrl};
const formatToPlainString = intl.formatToPlainString;
const FNtLb3 = (require(1244) /* metro dependency 1244: indexNative */).t.FNtLb3;
items2[1] = <Image resizeMode="contain" style={styles.logo} source={object3} accessibilityLabel={Reflect.apply(formatToPlainString,
intl, [FNtLb3, {category: categoryName}])} accessibilityRole="header" />;
items2[2] = <View style={styles.dummyRightButton} />;
return (
<View style={object}>
{items2}
</View>
);
}
global.__d(_fun106719, 14085, [31, 27, 7553, 33, 4501, 1484, 9603, 9607, 1244,
2]) /* metro module 14085, dependencies: [31, 27, 7553, 33, 4501, 1484, 9603, 9607, 1244, 2] */;
@@ -1,4 +1,11 @@
/* Metro module 10066; source: modules/collectibles/native/CollectiblesUtils.tsx; dependencies: [661, 5137, 3815, 5140, 5134, 5133, 10067, 10068, 2] */
import IAPStoreAndroid from '../../../stores/native/IAPStore.android.tsx'; /* Metro dependency 5140 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
import * as BillingPlatformUtilsModule from '../../device/BillingPlatformUtils.tsx'; /* Metro dependency 3815 */
import * as CollectiblesProductUtilsModule from '../utils/CollectiblesProductUtils.tsx'; /* Metro dependency 5133 */
import * as CollectiblesUtilsModule from '../CollectiblesUtils.tsx'; /* Metro dependency 5134 */
function _fun78672(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#78672, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10252:6, offset: 0x01e313d2, size: 230 bytes, params: 8, frame: 18
const env0_0 = require;
const _arrayLikeToArray_78675 = function(a0, a1) {
@@ -46,17 +53,16 @@ function _fun78672(global, require, importDefault, importAll, module, exports, d
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = (require(661) /* metro dependency 661: Constants */).PriceSetAssignmentPurchaseTypes;
const closure = extractPriceByPurchaseTypes_78676;
const closure2 = isGPlaySynced;
const extractPriceByPurchaseTypes_786762 = extractPriceByPurchaseTypes_78676;
const isGPlaySynced2 = isGPlaySynced;
const hasAtLeastOneGPlaySynced = function({products}) {
products = products.filter(_fun78680).length;
return products > 0;
};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/CollectiblesUtils.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/native/CollectiblesUtils.tsx');
exports.getFormattedPriceForCollectiblesProduct = getFormattedPriceForCollectiblesProduct_78681;
exports.extractPriceByPurchaseTypes = closure;
exports.isGPlaySynced = closure2;
exports.extractPriceByPurchaseTypes = extractPriceByPurchaseTypes_786762;
exports.isGPlaySynced = isGPlaySynced2;
exports.filterGPlaySyncedCategories = function(a0) {
var r2;
var value5;
@@ -96,76 +102,89 @@ function _fun78672(global, require, importDefault, importAll, module, exports, d
object.isPreviewMode = true;
return object;
};
}
function _createForOfIteratorHelperLoose_78673(a0, a1) { // fn#78673, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10252:143, offset: 0x01e314b8, size: 372 bytes, params: 3, frame: 20
var r6;
var r9;
var r5;
var value3;
var regexp;
const env0_0 = a0;
const Symbol = global.Symbol;
let value = typeof Symbol !== 'undefined';
let r1 = value && a0[global.Symbol.iterator];
r1 = !r1 ? a0['@@iterator'] : r1;
if (r1) {
value = r1.call(a0);
return value.next.bind(value);
}
const Array = global.Array;
if (Array.isArray(a0)) {
function _createForOfIteratorHelperLoose_78673(a0, a1) { // fn#78673, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10252:143, offset: 0x01e314b8, size: 372 bytes, params: 3, frame: 20
var r6;
var r9;
var r5;
var value3;
var regexp;
const env0_0 = a0;
const Symbol = global.Symbol;
let value = typeof Symbol !== 'undefined';
let r1 = value && a0[global.Symbol.iterator];
r1 = !r1 ? a0['@@iterator'] : r1;
if (r1) {
value = r1.call(a0);
return value.next.bind(value);
}
return _fun78674;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_78675(a0, value);
r5 = value;
} else {
value3 = ({}).toString.call(a0).slice(8, -1);
r6 = value3 === 'Object' && a0.constructor;
r9 = r6 ? a0.constructor.name : value3;
if (r9 === 'Map') {
r6 = global.Array.from(a0);
} else if (r9 === 'Set') {
r6 = global.Array.from(a0);
} else if (r9 === 'Arguments') {
const Array = global.Array;
if (Array.isArray(a0)) {
if (r1) {
}
return _fun78674;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_78675(a0, value);
r6 = value;
r5 = value;
} else {
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value3 = ({}).toString.call(a0).slice(8, -1);
r6 = value3 === 'Object' && a0.constructor;
r9 = r6 ? a0.constructor.name : value3;
if (r9 === 'Map') {
r6 = global.Array.from(a0);
} else if (r9 === 'Set') {
r6 = global.Array.from(a0);
} else if (r9 === 'Arguments') {
value = _arrayLikeToArray_78675(a0, value);
r6 = value;
} else {
r6 = value;
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value = _arrayLikeToArray_78675(a0, value);
r6 = value;
} else {
r6 = value;
}
}
r5 = r6;
}
r5 = r6;
} else {
r5 = value;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
if (r5) {
}
return _fun78674;
}
const TypeError = global.TypeError;
throw new TypeError('Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.');
function _fun78674() { // fn#78674, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10252:714, offset: 0x00c39d73, size: 69 bytes, params: 1, frame: 5
return env0_1 >= env0_0.length ? {done: true} : {done: false,
value: env0_0[typeof env0_1 === 'bigint' ? env0_1 : +env0_1]};
}
return _fun78674;
}
const TypeError = global.TypeError;
throw new TypeError('Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.');
}
function extractPriceByPurchaseTypes_78676(a0, a1) { // fn#78676, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10252:1085, offset: 0x01e3162c, size: 225 bytes, params: 3, frame: 17
var getProduct;
var googleSkuIds;
var value;
const value2 = undefined;
const billingPlatformUtilsModule = require(3815) /* metro dependency 3815: BillingPlatformUtils */;
if (billingPlatformUtilsModule.isGooglePlayBillingSupported()) {
if (a1 === PriceSetAssignmentPurchaseTypes.MOBILE) {
}
function extractPriceByPurchaseTypes_78676(a0, a1) { // fn#78676, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10252:1085, offset: 0x01e3162c, size: 225 bytes, params: 3, frame: 17
var getProduct;
var googleSkuIds;
var value;
const value2 = undefined;
if (BillingPlatformUtilsModule.isGooglePlayBillingSupported()) {
if (a1 === PriceSetAssignmentPurchaseTypes.MOBILE) {
value = importDefault(5140) /* metro dependency 5140: IAPStoreAndroid */;
getProduct = value.getProduct;
googleSkuIds = a0.googleSkuIds;
value = Reflect.apply(getProduct, value, [googleSkuIds == null ? value2 : googleSkuIds[a1]]);
return value != null ? {amount: value.price, currency: value.currencyCode, priceString: value.priceString,
tax: 0,
taxInclusive: false} : value2;
}
if (a1 !== PriceSetAssignmentPurchaseTypes.MOBILE_PREMIUM_TIER_2) {
return null;
}
value = importDefault(5140) /* metro dependency 5140: IAPStoreAndroid */;
getProduct = value.getProduct;
googleSkuIds = a0.googleSkuIds;
@@ -174,85 +193,98 @@ function extractPriceByPurchaseTypes_78676(a0, a1) { // fn#78676, source: /ci/bu
tax: 0,
taxInclusive: false} : value2;
}
if (a1 !== PriceSetAssignmentPurchaseTypes.MOBILE_PREMIUM_TIER_2) {
return null;
}
value = importDefault(5140) /* metro dependency 5140: IAPStoreAndroid */;
getProduct = value.getProduct;
googleSkuIds = a0.googleSkuIds;
value = Reflect.apply(getProduct, value, [googleSkuIds == null ? value2 : googleSkuIds[a1]]);
return value != null ? {amount: value.price, currency: value.currencyCode, priceString: value.priceString,
tax: 0,
taxInclusive: false} : value2;
return (CollectiblesUtilsModule).extractPriceByPurchaseTypes(a0, a1);
}
return (require(5134) /* metro dependency 5134: CollectiblesUtils */).extractPriceByPurchaseTypes(a0, a1);
}
function isGPlaySynced(a0) { // fn#78677, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10252:1434, offset: 0x01e3170d, size: 205 bytes, params: 2, frame: 18
const value2 = undefined;
const collectiblesProductUtilsModule = require(5133) /* metro dependency 5133: CollectiblesProductUtils */;
const getIsVariantProduct = collectiblesProductUtilsModule.getIsVariantProduct;
if (Reflect.apply(getIsVariantProduct, collectiblesProductUtilsModule, [a0])) {
return a0.variants.every(function(a0) {
function isGPlaySynced(a0) { // fn#78677, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10252:1434, offset: 0x01e3170d, size: 205 bytes, params: 2, frame: 18
const value2 = undefined;
const getIsVariantProduct = CollectiblesProductUtilsModule.getIsVariantProduct;
if (Reflect.apply(getIsVariantProduct, CollectiblesProductUtilsModule, [a0])) {
return a0.variants.every(function(a0) {
return isGPlaySynced(a0);
});
}
const defaultImport = IAPStoreAndroid;
let getProduct = defaultImport.getProduct;
let googleSkuIds = a0.googleSkuIds;
const value3 = Reflect.apply(getProduct, defaultImport,
[googleSkuIds == null ? value2 : googleSkuIds[PriceSetAssignmentPurchaseTypes.MOBILE]]);
const defaultImport2 = defaultImport;
getProduct = defaultImport2.getProduct;
googleSkuIds = a0.googleSkuIds;
return value3 != null && Reflect.apply(getProduct, defaultImport2,
[googleSkuIds == null ? value2 : googleSkuIds[PriceSetAssignmentPurchaseTypes.MOBILE_PREMIUM_TIER_2]]) != null;
}
function hasAtLeastOneGPlaySynced({products}) { // fn#78679, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10252:1729, offset: 0x01e317da, size: 41 bytes, params: 2, frame: 11
return products.filter(function(a0) {
return isGPlaySynced(a0);
}).length > 0;
function _fun78680(a0) { // fn#78680, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10252:1751, offset: 0x00dfcfe0, size: 19 bytes, params: 2, frame: 11
return isGPlaySynced(a0);
}
}
function getFormattedPriceForCollectiblesProduct_78681(a0, a1, a2) { // fn#78681, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10252:1909, offset: 0x01e31803, size: 148 bytes, params: 4, frame: 15
var r0;
var r1;
var value;
const value2 = extractPriceByPurchaseTypes_78676(a0,
a2 ? a1 ? PriceSetAssignmentPurchaseTypes.MOBILE_PREMIUM_TIER_2 : PriceSetAssignmentPurchaseTypes.MOBILE : a1 ? PriceSetAssignmentPurchaseTypes.PREMIUM_TIER_2 : PriceSetAssignmentPurchaseTypes.DEFAULT);
const value3 = null;
if (value3 == value2) {
r0 = value3;
} else {
if (value3 != value2.priceString) {
r1 = value2.priceString;
} else {
value = require(5137) /* metro dependency 5137: PriceUtils */;
value = value.formatPrice(value2.amount, value2.currency);
r1 = value;
}
r0 = r1;
}
return r0;
}
function filterHiddenCategories(a0) { // fn#78683, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10252:2440, offset: 0x01e318f9, size: 24 bytes, params: 2, frame: 11
return a0.filter(function(a0) {
var r0;
var unpublishedAt;
var value2;
var value = a0.unpublishedAt == null;
if (value) {
r0 = value;
} else {
unpublishedAt = a0.unpublishedAt;
value2 = new global.Date();
value2 = unpublishedAt > value2;
r0 = value2;
}
r0 = r0 && a0.products.length > 0;
return r0;
});
}
const defaultImport = importDefault(5140) /* metro dependency 5140: IAPStoreAndroid */;
let getProduct = defaultImport.getProduct;
let googleSkuIds = a0.googleSkuIds;
const value3 = Reflect.apply(getProduct, defaultImport,
[googleSkuIds == null ? value2 : googleSkuIds[PriceSetAssignmentPurchaseTypes.MOBILE]]);
const defaultImport2 = defaultImport;
getProduct = defaultImport2.getProduct;
googleSkuIds = a0.googleSkuIds;
return value3 != null && Reflect.apply(getProduct, defaultImport2,
[googleSkuIds == null ? value2 : googleSkuIds[PriceSetAssignmentPurchaseTypes.MOBILE_PREMIUM_TIER_2]]) != null;
}
function hasAtLeastOneGPlaySynced({products}) { // fn#78679, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10252:1729, offset: 0x01e317da, size: 41 bytes, params: 2, frame: 11
return products.filter(function(a0) {
return isGPlaySynced(a0);
}).length > 0;
}
function getFormattedPriceForCollectiblesProduct_78681(a0, a1, a2) { // fn#78681, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10252:1909, offset: 0x01e31803, size: 148 bytes, params: 4, frame: 15
function _fun78684(a0) { // fn#78684, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10252:2453, offset: 0x01e31911, size: 81 bytes, params: 2, frame: 12
var r0;
var r1;
var value;
const value2 = extractPriceByPurchaseTypes_78676(a0,
a2 ? a1 ? PriceSetAssignmentPurchaseTypes.MOBILE_PREMIUM_TIER_2 : PriceSetAssignmentPurchaseTypes.MOBILE : a1 ? PriceSetAssignmentPurchaseTypes.PREMIUM_TIER_2 : PriceSetAssignmentPurchaseTypes.DEFAULT);
const value3 = null;
if (value3 == value2) {
r0 = value3;
var date;
let unpublishedAt = a0.unpublishedAt;
const value = unpublishedAt == null;
if (value) {
r0 = value;
} else {
if (value3 != value2.priceString) {
r1 = value2.priceString;
} else {
value = require(5137) /* metro dependency 5137: PriceUtils */;
value = value.formatPrice(value2.amount, value2.currency);
r1 = value;
}
r0 = r1;
unpublishedAt = a0.unpublishedAt;
date = new global.Date();
date = unpublishedAt > date;
r0 = date;
}
r0 = r0 && a0.products.length > 0;
return r0;
}
function filterHiddenCategories(a0) { // fn#78683, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10252:2440, offset: 0x01e318f9, size: 24 bytes, params: 2, frame: 11
return a0.filter(function(a0) {
var r0;
var unpublishedAt;
var value2;
var value = a0.unpublishedAt == null;
if (value) {
r0 = value;
} else {
unpublishedAt = a0.unpublishedAt;
value2 = new global.Date();
value2 = unpublishedAt > value2;
r0 = value2;
}
r0 = r0 && a0.products.length > 0;
return r0;
});
}
global.__d(_fun78672, 10066, [661, 5137, 3815, 5140, 5134, 5133, 10067, 10068,
2]) /* metro module 10066, dependencies: [661, 5137, 3815, 5140, 5134, 5133, 10067, 10068, 2] */;
@@ -1,14 +1,18 @@
/* Metro module 14080; source: modules/collectibles/native/DebugLogView.tsx; dependencies: [31, 27, 4649, 5144, 33, 4501, 697, 566, 4573, 2] */
import DevSettingsStore from '../../devtools/dev_settings/DevSettingsStore.tsx'; /* Metro dependency 4649 */
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 TextModule from '../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
function _fun106697(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#106697, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14277:6, offset: 0x022e7395, size: 382 bytes, params: 8, frame: 21
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
let value = ReactNativeModule;
const env0_3 = value.View;
const env0_4 = value.ScrollView;
const env0_5 = value.TouchableOpacity;
const devSettingsStore = importDefault(4649) /* metro dependency 4649: DevSettingsStore */;
value = require(5144) /* metro dependency 5144: CollectiblesDebugStore */;
const env0_7 = value.useCollectiblesDebugStore;
const env0_8 = value.addDebugLog;
@@ -17,90 +21,108 @@ function _fun106697(global, require, importDefault, importAll, module, exports,
const env0_10 = value.jsx;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
const object = {'backgroundColor': '#ff0000', 'paddingHorizontal': 8, 'paddingVertical': 2};
object.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
const object2 = {'backgroundColor': '#ff0000', 'paddingHorizontal': 8, 'paddingVertical': 2};
object2.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
const env0_11 = Reflect.apply(createStyles, value, [{debugLogContainer: {'backgroundColor': 'rgba(0, 0, 0, 0.8)',
'padding': 10, 'maxHeight': 350, 'width': '100%', 'position': 'absolute', 'bottom': 0, 'left': 0, 'right': 0,
'zIndex': 9999, 'borderTopWidth': 1, 'borderTopColor': '#ff0000'}, debugLogHeader: {'flexDirection': 'row',
'justifyContent': 'space-between', 'alignItems': 'center', 'marginBottom': 5},
debugLogText: {'color': '#00ff00', 'fontSize': 12, 'marginBottom': 2, 'fontFamily': 'monospace'},
clearButton: object, clearButtonText: {'color': '#ffffff', 'fontSize': 10, 'fontWeight': 'bold'}}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/DebugLogView.tsx');
clearButton: object2, clearButtonText: {'color': '#ffffff', 'fontSize': 10, 'fontWeight': 'bold'}}]);
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/native/DebugLogView.tsx');
exports.default = _default_106698;
}
function _default_106698() { // fn#106698, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14277:838, offset: 0x022e7513, size: 521 bytes, params: 1, frame: 27
var slice;
var Math;
var max;
var value4;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
var object;
var items2;
const value2 = useCollectiblesDebugStore(function(a0) {
return a0.logs;
});
const env0_1 = useCollectiblesDebugStore(function(a0) {
return a0.clearLogs;
});
const styles = useStyles();
const env0_2 = styles;
const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStores([DevSettingsStore], function() {
return DevSettingsStore.get('shop_show_debug_overlay');
});
const binding = env0_2;
const useEffect = binding.useEffect;
let length = value2.length;
Reflect.apply(useEffect, binding, [_fun106702, [length, value3]]);
if (value3) {
length = value2.length;
if (length === 0) {
return null;
}
slice = value2.slice;
Math = global.Math;
max = Math.max;
length = value2.length;
value4 = Reflect.apply(slice, value2, [Reflect.apply(max, Math, [0, length - 10])]);
var viewBindingProps = {style: styles.debugLogContainer};
var viewBindingProps2 = {style: styles.debugLogHeader};
object = {};
copyDataProperties(object, styles.debugLogText, undefined);
object['color'] = '#ffffff';
length = value2.length;
items2 = [<Text variant="text-xs/normal" style={object}>{'Debug Log ('}{length}{' entries)'}</Text>];
items2[1] = <TouchableOpacity onPress={onPress_106703} style={styles.clearButton}><Text variant="text-xs/bold" style={styles.clearButtonText}>{'Clear'}</Text></TouchableOpacity>;
return (
<View {...viewBindingProps}>
<View {...viewBindingProps2}>
{items2}
function _default_106698() { // fn#106698, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14277:838, offset: 0x022e7513, size: 521 bytes, params: 1, frame: 27
var slice;
var Math;
var max;
var value4;
const Text = (TextModule).Text;
var object2;
var items2;
const value2 = useCollectiblesDebugStore(function(a0) {
return a0.logs;
});
const env0_1 = useCollectiblesDebugStore(function(a0) {
return a0.clearLogs;
});
const styles = useStyles();
const styles2 = styles;
const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStores([DevSettingsStore], function() {
return DevSettingsStore.get('shop_show_debug_overlay');
});
const binding = styles2;
const useEffect = binding.useEffect;
let length = value2.length;
Reflect.apply(useEffect, binding, [_fun106702, [length, value3]]);
if (value3) {
length = value2.length;
if (length === 0) {
return null;
}
slice = value2.slice;
Math = global.Math;
max = Math.max;
length = value2.length;
value4 = Reflect.apply(slice, value2, [Reflect.apply(max, Math, [0, length - 10])]);
var viewBindingProps = {style: styles.debugLogContainer};
var viewBindingProps2 = {style: styles.debugLogHeader};
object2 = {};
copyDataProperties(object2, styles.debugLogText, undefined);
object2['color'] = '#ffffff';
length = value2.length;
items2 = [
<Text variant="text-xs/normal" style={object2}>
{'Debug Log ('}
{length}
{' entries)'}
</Text>,
];
items2[1] = (
<TouchableOpacity onPress={onPress_106703} style={styles.clearButton}>
<Text variant="text-xs/bold" style={styles.clearButtonText}>
{'Clear'}
</Text>
</TouchableOpacity>
);
return (
<View {...viewBindingProps}>
<View {...viewBindingProps2}>
{items2}
</View>
<ScrollView>
{value4.map(_fun106704)}
</ScrollView>
</View>
<ScrollView>
{value4.map(_fun106704)}
</ScrollView>
</View>
);
);
}
return null;
function _fun106702() { // fn#106702, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14277:981, offset: 0x022e774b, size: 52 bytes, params: 1, frame: 11
if (env0_0.length === 0 && env0_3) {
value = environment.__proto__;
addDebugLog('Debug log initialized');
}
}
function _default_106698OnPress() { // fn#106703, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14277:1344, owner: _default_106698.onPress, offset: 0x00de925a, size: 15 bytes, params: 1, frame: 9
env0_1();
}
function _fun106704(a0, a1) { // fn#106704, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14277:1491, offset: 0x022e777f, size: 82 bytes, params: 3, frame: 15
const Text = (TextModule).Text;
return (
<Text
variant="text-xs/normal"
style={styles.debugLogText}
key={a1}
>
{a0}
</Text>
);
}
}
return null;
}
function _fun106702() { // fn#106702, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14277:981, offset: 0x022e774b, size: 52 bytes, params: 1, frame: 11
if (env0_0.length === 0 && env0_3) {
value = environment.__proto__;
addDebugLog('Debug log initialized');
}
}
function _fun106704(a0, a1) { // fn#106704, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14277:1491, offset: 0x022e777f, size: 82 bytes, params: 3, frame: 15
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<Text
variant="text-xs/normal"
style={styles.debugLogText}
key={a1}
>
{a0}
</Text>
);
}
global.__d(_fun106697, 14080, [31, 27, 4649, 5144, 33, 4501, 697, 566, 4573,
2]) /* metro module 14080, dependencies: [31, 27, 4649, 5144, 33, 4501, 697, 566, 4573, 2] */;
@@ -1,112 +1,116 @@
/* Metro module 8415; source: modules/collectibles/native/EditCollectiblesPickerList.tsx; dependencies: [57, 31, 27, 33, 4501, 8409, 4573, 22, 8416, 2] */
import Module00057 from '../../../by-id/module-00057.js'; /* Metro dependency 57 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as Module00022Module from '../../../by-id/module-00022.js'; /* Metro dependency 22 */
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 CreateStylesModule from '../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as TextModule from '../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as UseCollectibleListLayoutModule from './useCollectibleListLayout.tsx'; /* Metro dependency 8409 */
function _fun66844(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#66844, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8600:6, offset: 0x01c0c897, size: 329 bytes, params: 8, frame: 21
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(57) /* metro dependency 57 */;
const value = importAll(31) /* metro dependency 31 */;
const value2 = require(27) /* metro dependency 27 */;
const env0_4 = value2.ActivityIndicator;
const env0_5 = value2.View;
const env0_6 = (require(33) /* metro dependency 33 */).jsx;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
const GUTTER_SIZE = (require(8409) /* metro dependency 8409: useCollectibleListLayout */).GUTTER_SIZE;
const env0_7 = Reflect.apply(createStyles, createStylesModule, [{list: {'flex': 1, 'marginTop': 12},
const createStyles = CreateStylesModule.createStyles;
const GUTTER_SIZE = (UseCollectibleListLayoutModule).GUTTER_SIZE;
const env0_7 = Reflect.apply(createStyles, CreateStylesModule, [{list: {'flex': 1, 'marginTop': 12},
listContent: {paddingBottom: 88}, loadingContainer: {'paddingVertical': 80, 'alignItems': 'center'},
header: {'paddingHorizontal': null, 'paddingTop': 10, 'paddingBottom': 5, paddingHorizontal: GUTTER_SIZE}}]);
const env0_8 = value.memo(_fun66845);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/EditCollectiblesPickerList.tsx');
const env0_8 = ReactModule.memo(_fun66845);
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/native/EditCollectiblesPickerList.tsx');
exports.EditCollectiblesPickerList = EditCollectiblesPickerList;
}
function _fun66845({header}) { // fn#66845, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8600:400, offset: 0x01c0c9e0, size: 102 bytes, params: 2, frame: 17
const styles = useStyles();
const Heading = (TextModule).Heading;
return (
<View style={styles.header}>
<Heading variant="heading-sm/medium" color="mobile-text-heading-primary">
{header}
</Heading>
</View>
);
}
function _fun66845({header}) { // fn#66845, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8600:400, offset: 0x01c0c9e0, size: 102 bytes, params: 2, frame: 17
const styles = useStyles();
const Heading = (require(4573) /* metro dependency 4573: Text */).Heading;
return (
<View style={styles.header}>
<Heading variant="heading-sm/medium" color="mobile-text-heading-primary">
{header}
</Heading>
</View>
);
}
function EditCollectiblesPickerList({sections, selectedSkuId, renderRow, estimatedItemSize, isFetching, contentContainerStyle}) { // fn#66846, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8600:689, offset: 0x01c0ca46, size: 512 bytes, params: 2, frame: 27
var object2;
const env0_2 = renderRow;
isFetching = !(isFetching === undefined) && isFetching;
const env0_3 = isFetching;
const styles = useStyles();
let binding = env0_3;
const [property, env0_4] = env0_2(binding.useState(0), 2);
const value5 = binding.useCallback(_fun66847, []);
const r2 = property > 0 ? (property - 4 * (require(8409) /* metro dependency 8409: useCollectibleListLayout */).GUTTER_SIZE) / (require(8409) /* metro dependency 8409: useCollectibleListLayout */).ROW_SIZE : 0;
binding = env0_3;
const value8 = binding.useMemo(function() {
var isFetchingBinding = isFetching;
var items = [];
if (!isFetchingBinding) {
var env0_0 = items;
sections.forEach(_fun66849);
function EditCollectiblesPickerList({sections, selectedSkuId, renderRow, estimatedItemSize, isFetching, contentContainerStyle}) { // fn#66846, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8600:689, offset: 0x01c0ca46, size: 512 bytes, params: 2, frame: 27
const renderRow2 = renderRow;
isFetching = !(isFetching === undefined) && isFetching;
const isFetching2 = isFetching;
const styles = useStyles();
let binding = isFetching2;
const [property, env0_4] = renderRow2(binding.useState(0), 2);
const value5 = binding.useCallback(_fun66847, []);
const r2 = property > 0 ? (property - 4 * (require(8409) /* metro dependency 8409: useCollectibleListLayout */).GUTTER_SIZE) / (require(8409) /* metro dependency 8409: useCollectibleListLayout */).ROW_SIZE : 0;
binding = isFetching2;
const value8 = binding.useMemo(function() {
var isFetchingBinding = isFetching;
var items = [];
if (!isFetchingBinding) {
var env0_0 = items;
sections.forEach(_fun66849);
}
return items;
}, [sections, isFetching]);
const value9 = binding.useCallback(_fun66851, [renderRow, r2, selectedSkuId]);
const value10 = binding.useCallback(function(a0) {
return a0.type;
}, []);
const value11 = binding.useCallback(function(a0) {
return a0.key;
}, []);
object = {};
if (isFetching) {
object.style = styles.loadingContainer;
object.children = <ActivityIndicator animating size="large" />;
} else {
object.style = styles.list;
object.children = ((BottomSheetFlashList) => <BottomSheetFlashList data={value8} renderItem={value9} getItemType={value10} keyExtractor={value11} extraData={selectedSkuId} estimatedItemSize={estimatedItemSize} contentContainerStyle={contentContainerStyle ?? styles.listContent} onLayout={value5} keyboardShouldPersistTaps="always" />)((require(8416) /* metro dependency 8416: flashList */).BottomSheetFlashList);
}
return items;
}, [sections, isFetching]);
const value9 = binding.useCallback(_fun66851, [renderRow, r2, selectedSkuId]);
const value10 = binding.useCallback(function(a0) {
return a0.type;
}, []);
const value11 = binding.useCallback(function(a0) {
return a0.key;
}, []);
object2 = {};
if (isFetching) {
object2.style = styles.loadingContainer;
object2.children = <ActivityIndicator animating size="large" />;
} else {
object2.style = styles.list;
object2.children = ((BottomSheetFlashList) => <BottomSheetFlashList data={value8} renderItem={value9} getItemType={value10} keyExtractor={value11} extraData={selectedSkuId} estimatedItemSize={estimatedItemSize} contentContainerStyle={contentContainerStyle ?? styles.listContent} onLayout={value5} keyboardShouldPersistTaps="always" />)((require(8416) /* metro dependency 8416: flashList */).BottomSheetFlashList);
return <View {...object} />;
function _fun66847({nativeEvent}) { // fn#66847, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8600:893, offset: 0x01c0cc46, size: 36 bytes, params: 2, frame: 11
env0_4(nativeEvent.layout.width);
}
function _fun66848() { // fn#66848, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8600:1003, offset: 0x01c0cc6a, size: 45 bytes, params: 1, frame: 12
if (!isFetching) {
sections.forEach(_fun66849);
}
return [];
function _fun66849(a0) { // fn#66849, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8600:1049, offset: 0x01c0cc97, size: 159 bytes, params: 2, frame: 17
var environment;
const env0_0 = a0;
env0_0.push({type: 'header', key: 'header-' + a0.section, header: a0.header});
let value = environment.__proto__.__proto__;
const chunk = (Module00022Module).chunk;
const items2 = a0.items;
const ROW_SIZE = (UseCollectibleListLayoutModule).ROW_SIZE;
value = Reflect.apply(chunk, value, [items2, ROW_SIZE]);
value.forEach(_fun66850);
function _fun66850(a0, a1) { // fn#66850, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8600:1168, offset: 0x01c0cd36, size: 89 bytes, params: 3, frame: 18
env1_0.push({type: 'row', key: 'row-' + env0_0.section + '-' + a1, items: a0});
}
}
}
function _fun66851({item}) { // fn#66851, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8600:1267, offset: 0x01c0cd8f, size: 99 bytes, params: 2, frame: 14
var r0;
var value;
if (item.type === 'header') {
value = environment.__proto__;
value = ((Component) => <Component header={item.header} />)(env1_8);
r0 = value;
} else {
r0 = renderRow({items: item.items, size: ReactNativeModule.View, selectedSkuId: selectedSkuId});
}
return r0;
}
}
return <View {...object2} />;
}
function _fun66847({nativeEvent}) { // fn#66847, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8600:893, offset: 0x01c0cc46, size: 36 bytes, params: 2, frame: 11
env0_4(nativeEvent.layout.width);
}
function _fun66848() { // fn#66848, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8600:1003, offset: 0x01c0cc6a, size: 45 bytes, params: 1, frame: 12
if (!isFetching) {
sections.forEach(_fun66849);
}
return [];
}
function _fun66851({item}) { // fn#66851, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8600:1267, offset: 0x01c0cd8f, size: 99 bytes, params: 2, frame: 14
var r0;
var value;
if (item.type === 'header') {
value = environment.__proto__;
value = ((Component) => <Component header={item.header} />)(env1_8);
r0 = value;
} else {
r0 = renderRow({items: item.items, size: env0_5, selectedSkuId: selectedSkuId});
}
return r0;
}
function _fun66849(a0) { // fn#66849, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8600:1049, offset: 0x01c0cc97, size: 159 bytes, params: 2, frame: 17
var environment;
const env0_0 = a0;
env0_0.push({type: 'header', key: 'header-' + a0.section, header: a0.header});
let value = environment.__proto__.__proto__;
const chunk = (require(22) /* metro dependency 22 */).chunk;
const items2 = a0.items;
const ROW_SIZE = (require(8409) /* metro dependency 8409: useCollectibleListLayout */).ROW_SIZE;
value = Reflect.apply(chunk, value, [items2, ROW_SIZE]);
value.forEach(_fun66850);
}
function _fun66850(a0, a1) { // fn#66850, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8600:1168, offset: 0x01c0cd36, size: 89 bytes, params: 3, frame: 18
env1_0.push({type: 'row', key: 'row-' + env0_0.section + '-' + a1, items: a0});
}
global.__d(_fun66844, 8415, [57, 31, 27, 33, 4501, 8409, 4573, 22, 8416,
2]) /* metro module 8415, dependencies: [57, 31, 27, 33, 4501, 8409, 4573, 22, 8416, 2] */;
@@ -1,52 +1,64 @@
/* Metro module 14068; source: modules/collectibles/native/FeaturedBlock.tsx; dependencies: [31, 27, 33, 697, 4501, 10023, 14069, 6771, 6789, 2] */
import Native from '../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import UseAnalyticsLocations from '../../app_analytics/useAnalyticsLocations.tsx'; /* Metro dependency 6771 */
import AnalyticsLocation from '../../app_analytics/AnalyticsLocation.tsx'; /* Metro dependency 6789 */
import FeaturedCategorySubblock from './FeaturedCategorySubblock.tsx'; /* Metro dependency 14069 */
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 CreateStylesModule from '../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as UseAnalyticsLocationsModule from '../../app_analytics/useAnalyticsLocations.tsx'; /* Metro dependency 6771 */
import * as CollectiblesAnalyticsContextModule from '../CollectiblesAnalyticsContext.tsx'; /* Metro dependency 10023 */
function _fun106654(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#106654, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14265:6, offset: 0x022e4be7, size: 285 bytes, params: 8, frame: 21
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_3 = (require(27) /* metro dependency 27 */).View;
const env0_4 = (require(33) /* metro dependency 33 */).jsx;
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
const env0_5 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({container: {'display': 'flex',
ReactModule;
const PX_16 = (Native).space.PX_16;
const PX_12 = (Native).space.PX_12;
const env0_5 = (CreateStylesModule).createStyles({container: {'display': 'flex',
'width': '100%', 'flexDirection': 'row', 'flexWrap': 'wrap', gap: PX_12, paddingHorizontal: PX_16},
featuredSubblock: {'flex': 1, 'flexBasis': 400, 'maxWidth': '100%'}});
const Subblocks = function({featuredBlock, style}) {
featuredBlock = featuredBlock.subblocks;
return featuredBlock.map(_fun106656);
};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/FeaturedBlock.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/native/FeaturedBlock.tsx');
exports.default = _default_106657;
function Subblocks({featuredBlock, style}) { // fn#106655, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14265:371, offset: 0x022e4d04, size: 45 bytes, params: 2, frame: 11
return featuredBlock.subblocks.map(_fun106656);
function _fun106656(a0, a1) { // fn#106656, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14265:417, offset: 0x022e4d31, size: 124 bytes, params: 3, frame: 20
const value = environment.__proto__;
const CollectiblesAnalyticsProvider = (CollectiblesAnalyticsContextModule).CollectiblesAnalyticsProvider;
return (
<CollectiblesAnalyticsProvider newValue={{tilePosition: a1}} key={a1}>
<View style={style}>
{((Component) => <Component subblock={a0} />)(FeaturedCategorySubblock)}
</View>
</CollectiblesAnalyticsProvider>
);
}
}
function _default_106657({featuredBlock}) { // fn#106657, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14265:563, offset: 0x022e4dad, size: 164 bytes, params: 2, frame: 19
const styles = useStyles();
const defaultImport = UseAnalyticsLocations;
const COLLECTIBLES_SHOP_FEATURED_BLOCK = (AnalyticsLocation).COLLECTIBLES_SHOP_FEATURED_BLOCK;
const analyticsLocations = defaultImport(COLLECTIBLES_SHOP_FEATURED_BLOCK).analyticsLocations;
const AnalyticsLocationProvider = (UseAnalyticsLocationsModule).AnalyticsLocationProvider;
return (
<AnalyticsLocationProvider value={analyticsLocations}>
<View style={styles.container}>
<Subblocks featuredBlock={featuredBlock} style={styles.featuredSubblock} />
</View>
</AnalyticsLocationProvider>
);
}
}
function Subblocks({featuredBlock, style}) { // fn#106655, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14265:371, offset: 0x022e4d04, size: 45 bytes, params: 2, frame: 11
return featuredBlock.subblocks.map(_fun106656);
}
function _default_106657({featuredBlock}) { // fn#106657, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14265:563, offset: 0x022e4dad, size: 164 bytes, params: 2, frame: 19
const styles = useStyles();
const defaultImport = importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */;
const COLLECTIBLES_SHOP_FEATURED_BLOCK = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).COLLECTIBLES_SHOP_FEATURED_BLOCK;
const analyticsLocations = defaultImport(COLLECTIBLES_SHOP_FEATURED_BLOCK).analyticsLocations;
const AnalyticsLocationProvider = (require(6771) /* metro dependency 6771: useAnalyticsLocations */).AnalyticsLocationProvider;
return (
<AnalyticsLocationProvider value={analyticsLocations}>
<View style={styles.container}>
<Subblocks featuredBlock={featuredBlock} style={styles.featuredSubblock} />
</View>
</AnalyticsLocationProvider>
);
}
function _fun106656(a0, a1) { // fn#106656, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14265:417, offset: 0x022e4d31, size: 124 bytes, params: 3, frame: 20
const value = environment.__proto__;
const CollectiblesAnalyticsProvider = (require(10023) /* metro dependency 10023: CollectiblesAnalyticsContext */).CollectiblesAnalyticsProvider;
return (
<CollectiblesAnalyticsProvider newValue={{tilePosition: a1}} key={a1}>
<View style={style}>
{((Component) => <Component subblock={a0} />)(importDefault(14069) /* metro dependency 14069: FeaturedCategorySubblock */)}
</View>
</CollectiblesAnalyticsProvider>
);
}
global.__d(_fun106654, 14068, [31, 27, 33, 697, 4501, 10023, 14069, 6771, 6789,
2]) /* metro module 14068, dependencies: [31, 27, 33, 697, 4501, 10023, 14069, 6771, 6789, 2] */;
@@ -1,111 +1,126 @@
/* Metro module 14069; source: modules/collectibles/native/FeaturedCategorySubblock.tsx; dependencies: [31, 27, 5121, 663, 661, 33, 4501, 1484, 10023, 566, 10154, 10155, 5278, 1244, 697, 683, 5120, 6789, 5134, 8413, 2] */
import AnalyticsUtils from '../../../utils/AnalyticsUtils.tsx'; /* Metro dependency 683 */
import CollectiblesCategoryStore from '../CollectiblesCategoryStore.tsx'; /* Metro dependency 5121 */
import VisibilitySensor from './VisibilitySensor.tsx'; /* Metro dependency 10155 */
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 ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
import * as CollectiblesShopConstantsModule from '../CollectiblesShopConstants.tsx'; /* Metro dependency 663 */
import * as IndexNativeModule from '../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as UseNavigationNativeModule from '../../../design/components/Navigator/native/useNavigation.native.tsx'; /* Metro dependency 1484 */
import * as CreateStylesModule from '../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as PressablesModule from '../../../design/void/Pressables/native/Pressables.tsx'; /* Metro dependency 5278 */
import * as CollectiblesAnalyticsContextModule from '../CollectiblesAnalyticsContext.tsx'; /* Metro dependency 10023 */
import * as UseTrackProductCardImpressionModule from '../hooks/useTrackProductCardImpression.tsx'; /* Metro dependency 10154 */
function _fun106658(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#106658, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14266:6, offset: 0x022e4e51, size: 319 bytes, params: 8, frame: 20
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_3 = (require(27) /* metro dependency 27 */).Image;
const collectiblesCategoryStore = importDefault(5121) /* metro dependency 5121: CollectiblesCategoryStore */;
const env0_5 = (require(663) /* metro dependency 663: CollectiblesShopConstants */).CollectiblesMobileShopScreen;
let value = require(661) /* metro dependency 661: Constants */;
ReactModule;
let value = ConstantsModule;
const env0_6 = value.AnalyticEvents;
const env0_7 = value.UserSettingsSections;
value = require(33) /* metro dependency 33 */;
const env0_8 = value.jsx;
const env0_9 = value.jsxs;
const env0_10 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({container: {position: 'relative'},
const env0_10 = (CreateStylesModule).createStyles({container: {position: 'relative'},
bannerImage: {'width': '100%', 'aspectRatio': 2.237580993520518, 'resizeMode': 'contain'},
limitedTimeBadge: {'position': 'absolute', 'bottom': '68%', 'left': '3%', 'zIndex': 1}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/FeaturedCategorySubblock.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/native/FeaturedCategorySubblock.tsx');
exports.default = _default_106659;
}
function _default_106659({subblock}) { // fn#106659, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14266:466, offset: 0x022e4f90, size: 660 bytes, params: 2, frame: 32
var r11;
var date;
const styles = useStyles();
const env0_1 = (require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation();
const env0_2 = (require(10023) /* metro dependency 10023: CollectiblesAnalyticsContext */).useCollectiblesAnalyticsContext();
const assetUrl = subblock.assetUrl;
const categoryByStoreListingId = (require(566) /* metro dependency 566: flux */).useStateFromStores([CollectiblesCategoryStore],
function() {
return CollectiblesCategoryStore.getCategoryByStoreListingId(subblock.categoryStoreListingId);
});
const useTrackProductCardImpressionModule = require(10154) /* metro dependency 10154: useTrackProductCardImpression */;
const useTrackProductCardImpression = useTrackProductCardImpressionModule.useTrackProductCardImpression;
const handleCardVisibilityChange = Reflect.apply(useTrackProductCardImpression, useTrackProductCardImpressionModule,
[subblock.categoryStoreListingId, 'mobile_home', 'featured_block']).handleCardVisibilityChange;
const r2 = subblock.unpublishedAt ?? categoryByStoreListingId?.unpublishedAt;
if (r2 != null) {
date = new global.Date(r2);
} else {
r11 = null;
}
const VisibilitySensor = importDefault(10155) /* metro dependency 10155: VisibilitySensor */;
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
const object = {'accessibilityRole': 'button', 'accessibilityLabel': null, 'accessibilityHint': null,
'activeOpacity': 0.8, 'androidRippleConfig': null, 'hitSlop': 8};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const formatToPlainString = intl.formatToPlainString;
const FNtLb3 = (require(1244) /* metro dependency 1244: indexNative */).t.FNtLb3;
object.accessibilityLabel = Reflect.apply(formatToPlainString, intl, [FNtLb3, {category: subblock.name}]);
const string = intl.string;
const F8ma9x = (require(1244) /* metro dependency 1244: indexNative */).t.F8ma9x;
object.accessibilityHint = Reflect.apply(string, intl, [F8ma9x]);
const object3 = {};
object3.radius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
object.androidRippleConfig = object3;
object.onPress = onPress_106661;
object.style = styles.container;
const items2 = [assetUrl != null && <Image source={{uri: assetUrl}} style={styles.bannerImage} />];
items2[1] = (require(5134) /* metro dependency 5134: CollectiblesUtils */).shouldShowLimitedTimeBadge(r11) && ((LimitedTimeBadge) => <LimitedTimeBadge style={styles.limitedTimeBadge} />)((require(8413) /* metro dependency 8413: CollectiblesBadges */).LimitedTimeBadge);
return (
<VisibilitySensor onChange={handleCardVisibilityChange}>
<PressableOpacity {...object}>
{items2}
</PressableOpacity>
</VisibilitySensor>
);
}
function _default_106659OnPress() { // fn#106661, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14266:1212, owner: _default_106659.onPress, offset: 0x022e5247, size: 395 bytes, params: 1, frame: 20
var binding;
var moduleValue;
var openCollectiblesShopMobile;
var COLLECTIBLES_SHOP;
const value2 = undefined;
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
const track = defaultImport.track;
const COLLECTIBLES_SHOP_ELEMENT_CLICKED = AnalyticEvents.COLLECTIBLES_SHOP_ELEMENT_CLICKED;
let object2 = {};
object2.collectibles_shop_session_id = env0_2 == null ? value2 : env0_2.sessionId;
object2.sku_id = subblock.categoryStoreListingId;
object2.page_type = 'mobile_home';
object2.page_section = env0_2 == null ? value2 : env0_2.pageSection;
object2.page_category = env0_2 == null ? value2 : env0_2.pageCategory;
object2.tile_type = 'FEATURED_BLOCK';
const String = global.String;
object2.tile_position = String(env0_2 == null ? value2 : env0_2.tilePosition);
object2.cta_name = null;
Reflect.apply(track, defaultImport, [COLLECTIBLES_SHOP_ELEMENT_CLICKED, object2]);
if (categoryByStoreListingId != null) {
if (categoryByStoreListingId.isOrbsExclusive) {
moduleValue = require(5120) /* metro dependency 5120: CollectiblesActionCreators */;
openCollectiblesShopMobile = moduleValue.openCollectiblesShopMobile;
object2 = {};
COLLECTIBLES_SHOP = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).COLLECTIBLES_SHOP;
object2.analyticsLocations = [COLLECTIBLES_SHOP];
COLLECTIBLES_SHOP = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).COLLECTIBLES_SHOP;
object2.analyticsSource = COLLECTIBLES_SHOP;
object2.screen = CollectiblesMobileShopScreen.ORBS;
Reflect.apply(openCollectiblesShopMobile, moduleValue, [object2]);
function _default_106659({subblock}) { // fn#106659, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14266:466, offset: 0x022e4f90, size: 660 bytes, params: 2, frame: 32
var r11;
var date;
const styles = useStyles();
const env0_1 = (UseNavigationNativeModule).useNavigation();
const env0_2 = (CollectiblesAnalyticsContextModule).useCollectiblesAnalyticsContext();
const assetUrl = subblock.assetUrl;
const categoryByStoreListingId = (require(566) /* metro dependency 566: flux */).useStateFromStores([CollectiblesCategoryStore],
function() {
return CollectiblesCategoryStore.getCategoryByStoreListingId(subblock.categoryStoreListingId);
});
const useTrackProductCardImpression = UseTrackProductCardImpressionModule.useTrackProductCardImpression;
const handleCardVisibilityChange = Reflect.apply(useTrackProductCardImpression, UseTrackProductCardImpressionModule,
[subblock.categoryStoreListingId, 'mobile_home', 'featured_block']).handleCardVisibilityChange;
const r2 = subblock.unpublishedAt ?? categoryByStoreListingId?.unpublishedAt;
if (r2 != null) {
date = new global.Date(r2);
} else {
binding = env0_1;
binding.push(UserSettingsSections.COLLECTIBLES_SHOP_VIEW_ALL_CATEGORY_ITEMS,
{category: categoryByStoreListingId,
analyticsContext: env0_2});
r11 = null;
}
const PressableOpacity = (PressablesModule).PressableOpacity;
const object2 = {'accessibilityRole': 'button', 'accessibilityLabel': null, 'accessibilityHint': null,
'activeOpacity': 0.8, 'androidRippleConfig': null, 'hitSlop': 8};
const intl = (IndexNativeModule).intl;
const formatToPlainString = intl.formatToPlainString;
const FNtLb3 = (IndexNativeModule).t.FNtLb3;
object2.accessibilityLabel = Reflect.apply(formatToPlainString, intl, [FNtLb3, {category: subblock.name}]);
const string = intl.string;
const F8ma9x = (IndexNativeModule).t.F8ma9x;
object2.accessibilityHint = Reflect.apply(string, intl, [F8ma9x]);
const object4 = {};
object4.radius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
object2.androidRippleConfig = object4;
object2.onPress = onPress_106661;
object2.style = styles.container;
const items2 = [
assetUrl != null && <Image source={{uri: assetUrl}} style={styles.bannerImage} />,
];
items2[1] = (require(5134) /* metro dependency 5134: CollectiblesUtils */).shouldShowLimitedTimeBadge(r11) && ((LimitedTimeBadge) => <LimitedTimeBadge style={styles.limitedTimeBadge} />)((require(8413) /* metro dependency 8413: CollectiblesBadges */).LimitedTimeBadge);
return (
<VisibilitySensor onChange={handleCardVisibilityChange}>
<PressableOpacity {...object2}>
{items2}
</PressableOpacity>
</VisibilitySensor>
);
function _default_106659OnPress() { // fn#106661, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14266:1212, owner: _default_106659.onPress, offset: 0x022e5247, size: 395 bytes, params: 1, frame: 20
var binding;
var moduleValue;
var openCollectiblesShopMobile;
var COLLECTIBLES_SHOP;
const value2 = undefined;
const defaultImport = AnalyticsUtils;
const track = defaultImport.track;
const COLLECTIBLES_SHOP_ELEMENT_CLICKED = AnalyticEvents.COLLECTIBLES_SHOP_ELEMENT_CLICKED;
let object = {};
object.collectibles_shop_session_id = env0_2 == null ? value2 : env0_2.sessionId;
object.sku_id = subblock.categoryStoreListingId;
object.page_type = 'mobile_home';
object.page_section = env0_2 == null ? value2 : env0_2.pageSection;
object.page_category = env0_2 == null ? value2 : env0_2.pageCategory;
object.tile_type = 'FEATURED_BLOCK';
const String = global.String;
object.tile_position = String(env0_2 == null ? value2 : env0_2.tilePosition);
object.cta_name = null;
Reflect.apply(track, defaultImport, [COLLECTIBLES_SHOP_ELEMENT_CLICKED, object]);
if (categoryByStoreListingId != null) {
if (categoryByStoreListingId.isOrbsExclusive) {
moduleValue = require(5120) /* metro dependency 5120: CollectiblesActionCreators */;
openCollectiblesShopMobile = moduleValue.openCollectiblesShopMobile;
object = {};
COLLECTIBLES_SHOP = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).COLLECTIBLES_SHOP;
object.analyticsLocations = [COLLECTIBLES_SHOP];
COLLECTIBLES_SHOP = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).COLLECTIBLES_SHOP;
object.analyticsSource = COLLECTIBLES_SHOP;
object.screen = CollectiblesMobileShopScreen.ORBS;
Reflect.apply(openCollectiblesShopMobile, moduleValue, [object]);
} else {
binding = env0_1;
binding.push(UserSettingsSections.COLLECTIBLES_SHOP_VIEW_ALL_CATEGORY_ITEMS,
{category: categoryByStoreListingId,
analyticsContext: env0_2});
}
}
return value2;
}
}
return value2;
}
global.__d(_fun106658, 14069, [31, 27, 5121, 663, 661, 33, 4501, 1484, 10023, 566, 10154, 10155, 5278, 1244, 697,
683, 5120, 6789, 5134, 8413,
2]) /* metro module 14069, dependencies: [31, 27, 5121, 663, 661, 33, 4501, 1484, 10023, 566, 10154, 10155, 5278, 1244, 697, 683, 5120, 6789, 5134, 8413, 2] */;
@@ -1,28 +1,36 @@
/* Metro module 14065; source: modules/collectibles/native/FeaturedFirstCardCoachmarkAnchor.tsx; dependencies: [31, 27, 33, 14066, 2] */
import WishlistButtonCoachmark from './WishlistButtonCoachmark.tsx'; /* Metro dependency 14066 */
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 */
function _fun106633(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#106633, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14262:6, offset: 0x022e383c, size: 168 bytes, params: 8, frame: 18
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 */).View;
const value = require(33) /* metro dependency 33 */;
const env0_4 = value.jsx;
const env0_5 = value.jsxs;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/FeaturedFirstCardCoachmarkAnchor.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/native/FeaturedFirstCardCoachmarkAnchor.tsx');
exports.default = FeaturedFirstCardCoachmarkAnchor;
function FeaturedFirstCardCoachmarkAnchor({children}) { // fn#106634, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14262:256, offset: 0x022e38e4, size: 146 bytes, params: 2, frame: 19
const value2 = ReactModule.useRef(null);
return (
<View collapsable={false}>
<View
ref={value2}
style={{
'position': 'absolute',
'top': 0,
'right': 6,
'width': 32,
'height': 32,
}}
collapsable={false}
/>
{children}
{((Component) => <Component anchorRef={value2} />)(WishlistButtonCoachmark)}
</View>
);
}
}
function FeaturedFirstCardCoachmarkAnchor({children}) { // fn#106634, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14262:256, offset: 0x022e38e4, size: 146 bytes, params: 2, frame: 19
const value2 = env0_2.useRef(null);
return (
<View collapsable={false}>
<View
ref={value2}
style={{'position': 'absolute', 'top': 0, 'right': 6, 'width': 32, 'height': 32}}
collapsable={false}
/>
{children}
{((Component) => <Component anchorRef={value2} />)(importDefault(14066) /* metro dependency 14066: WishlistButtonCoachmark */)}
</View>
);
}
global.__d(_fun106633, 14065, [31, 27, 33, 14066, 2]) /* metro module 14065, dependencies: [31, 27, 33, 14066, 2] */;
+213 -154
View File
@@ -1,181 +1,240 @@
/* Metro module 14070; source: modules/collectibles/native/FeedBlock.tsx; dependencies: [31, 27, 4502, 1310, 5078, 663, 661, 33, 4501, 697, 566, 4002, 14058, 14071, 14049, 5120, 6789, 6771, 1244, 4573, 5278, 4080, 14072, 1962, 4068, 4578, 14062, 14073, 477, 7601, 14074, 5475, 14075, 14076, 2] */
import ThemeStore from '../../user_settings/ThemeStore.tsx'; /* Metro dependency 1310 */
import AccessibilityStore from '../../a11y/AccessibilityStore.tsx'; /* Metro dependency 4502 */
import ConsentStore from '../../../stores/ConsentStore.tsx'; /* Metro dependency 5078 */
import UseAnalyticsLocations from '../../app_analytics/useAnalyticsLocations.tsx'; /* Metro dependency 6771 */
import AnalyticsLocation from '../../app_analytics/AnalyticsLocation.tsx'; /* Metro dependency 6789 */
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 ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
import * as CollectiblesShopConstantsModule from '../CollectiblesShopConstants.tsx'; /* Metro dependency 663 */
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 UseAnalyticsLocationsModule from '../../app_analytics/useAnalyticsLocations.tsx'; /* Metro dependency 6771 */
import * as UseFilteredAndSortedProductsModule from './hooks/useFilteredAndSortedProducts.tsx'; /* Metro dependency 14049 */
import * as ShopHomeSortTypeModule from '../../../external/discord_common/js/shared/shared-constants/ShopHomeSortType.tsx'; /* Metro dependency 14071 */
function _fun106662(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#106662, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14267:6, offset: 0x022e53d2, size: 537 bytes, params: 8, frame: 22
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
let value = ReactNativeModule;
const env0_4 = value.Image;
const env0_5 = value.View;
const accessibilityStore = importDefault(4502) /* metro dependency 4502: AccessibilityStore */;
const themeStore = importDefault(1310) /* metro dependency 1310: ThemeStore */;
const consentStore = importDefault(5078) /* metro dependency 5078: ConsentStore */;
const env0_9 = (require(663) /* metro dependency 663: CollectiblesShopConstants */).CollectiblesMobileShopScreen;
const env0_10 = (require(661) /* metro dependency 661: Constants */).Consents;
value = require(33) /* metro dependency 33 */;
const env0_11 = value.jsx;
const env0_12 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
object = {};
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object2.feedContainer = {'display': 'flex', 'flexDirection': 'column', 'height': '100%', gap: PX_16};
const object4 = {'display': 'flex', 'flexDirection': 'row', 'flexWrap': 'wrap', 'justifyContent': 'space-between',
object.feedContainer = {'display': 'flex', 'flexDirection': 'column', 'height': '100%', gap: PX_16};
const object3 = {'display': 'flex', 'flexDirection': 'row', 'flexWrap': 'wrap', 'justifyContent': 'space-between',
'alignItems': 'center'};
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object4.gap = PX_12;
object3.gap = PX_12;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object4.paddingHorizontal = PX_16;
object2.feedHeader = object4;
object3.paddingHorizontal = PX_16;
object.feedHeader = object3;
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object2.feedTitle = {'display': 'flex', 'flexDirection': 'row', 'alignItems': 'center', 'flexShrink': 1, gap: PX_8};
object.feedTitle = {'display': 'flex', 'flexDirection': 'row', 'alignItems': 'center', 'flexShrink': 1, gap: PX_8};
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object2.feedFooter = {'display': 'flex', 'gap': null, 'flexDirection': 'column', 'justifyContent': 'center',
object.feedFooter = {'display': 'flex', 'gap': null, 'flexDirection': 'column', 'justifyContent': 'center',
'alignItems': 'center', gap: PX_16};
object2.feedFooterImage = {'width': '100%', 'resizeMode': 'cover'};
object2.feedFooterOrbImage = {'width': '100%', 'alignSelf': 'center', 'resizeMode': 'contain', 'height': 130};
const env0_13 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/FeedBlock.tsx');
object.feedFooterImage = {'width': '100%', 'resizeMode': 'cover'};
object.feedFooterOrbImage = {'width': '100%', 'alignSelf': 'center', 'resizeMode': 'contain', 'height': 130};
const env0_13 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/native/FeedBlock.tsx');
exports.default = _default_106663;
}
function _default_106663({feedBlock, screen, preferVCPrice, disableBundleStaticBackground}) { // fn#106663, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14267:911, offset: 0x022e55eb, size: 1576 bytes, params: 2, frame: 41
var r18;
var r9;
var r13;
var r12;
var PressableOpacity;
var object;
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
var object8;
var object2;
var object3;
var value;
const styles = useStyles();
const value2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([ThemeStore], function() {
return require(dependencyMap[11]).isThemeDark(ThemeStore.theme);
});
const {feedProducts, isPersonalized} = env0_3.useMemo(_fun106666, [feedBlock.sortedSkuIds,
(importDefault(14058) /* metro dependency 14058: useGetProductsFromSkus */)(),
(require(566) /* metro dependency 566: flux */).useStateFromStores([ConsentStore], function() {
return ConsentStore.hasConsented(Consents.PERSONALIZATION);
})]);
const value6 = (require(14049) /* metro dependency 14049: useFilteredAndSortedProducts */).useFilteredAndSortedProducts({products: feedProducts,
maxProducts: 36, screen: screen});
const closure = function() {
var moduleValue = require(dependencyMap[15]);
var object = {};
var COLLECTIBLES_MOBILE_SHOP_ALL_BUTTON = importDefault(dependencyMap[16]).COLLECTIBLES_MOBILE_SHOP_ALL_BUTTON;
object.analyticsLocations = [COLLECTIBLES_MOBILE_SHOP_ALL_BUTTON];
object.analyticsSource = importDefault(dependencyMap[16]).COLLECTIBLES_MOBILE_SHOP_ALL_BUTTON;
object.screen = CollectiblesMobileShopScreen.SHOP_ALL;
moduleValue.openCollectiblesShopMobile(object);
};
const ORBS = CollectiblesMobileShopScreen.ORBS;
const value7 = screen === ORBS;
const useReducedMotion = (require(566) /* metro dependency 566: flux */).useStateFromStores([AccessibilityStore],
function() {
return AccessibilityStore.useReducedMotion;
});
const defaultImport = importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */;
const COLLECTIBLES_SHOP_POPULAR_PICKS = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).COLLECTIBLES_SHOP_POPULAR_PICKS;
const analyticsLocations = defaultImport(COLLECTIBLES_SHOP_POPULAR_PICKS).analyticsLocations;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const r15 = isPersonalized ? Reflect.apply(string, intl, [t.NSv5KV]) : Reflect.apply(string, intl, [t.ivaAA7]);
const AnalyticsLocationProvider = (require(6771) /* metro dependency 6771: useAnalyticsLocations */).AnalyticsLocationProvider;
const Heading = (require(4573) /* metro dependency 4573: Text */).Heading;
const heading = <Heading variant="heading-lg/semibold">{r15}</Heading>;
if (isPersonalized) {
PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
object = {onPress: onPress_106669, hitSlop: 14};
object['aria-label'] = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.hvVgAZ);
r18 = <PressableOpacity {...object}>{((CircleInformationIcon) => <CircleInformationIcon size="xs" />)((require(4068) /* metro dependency 4068: CircleInformationIcon */).CircleInformationIcon)}</PressableOpacity>;
} else {
r18 = isPersonalized;
}
const view = <View style={styles.feedTitle}>{heading}{r18}</View>;
if (value7) {
r9 = !value7;
} else {
r9 = <Button onPress={closure} text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.xFcotU)} variant="primary" size="sm" />;
}
const items3 = [<View style={styles.feedHeader}>{view}{r9}</View>];
items3[1] = ((Component) => <Component products={value6} loadingCardsNum={36} preferVCPrice={preferVCPrice} accessibilityLabel={r15} disableBundleStaticBackground={disableBundleStaticBackground} />)(importDefault(14062) /* metro dependency 14062: FeedProductList */);
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
string = intl.string;
const Yr70c4 = (require(1244) /* metro dependency 1244: indexNative */).t.Yr70c4;
const items4 = [<Text variant="heading-lg/bold" accessibilityRole="header">{Reflect.apply(string, intl,
[Yr70c4])}</Text>];
string = intl.string;
const AfrvRD = (require(1244) /* metro dependency 1244: indexNative */).t.AfrvRD;
items4[1] = <Button onPress={closure} text={Reflect.apply(string, intl, [AfrvRD])} variant="primary" size="md" />;
if (value7) {
if (useReducedMotion) {
object3 = {};
object3.uri = importDefault(14073) /* metro dependency 14073: orb_coachmark_asset_2xPng */;
r13 = <Image source={object3} style={styles.feedFooterOrbImage} accessibilityElementsHidden importantForAccessibility="no-hide-descendants" />;
} else if ((require(477) /* metro dependency 477: PlatformUtils */).isAndroid()) {
value = importDefault(7601) /* metro dependency 7601: APNGDecorationNativeComponent */;
value = ((Component) => <Component url={importDefault(14074) /* metro dependency 14074: orb_coachmark_asset_2x_animatedPng */} autoplay style={styles.feedFooterOrbImage} accessibilityElementsHidden importantForAccessibility="no-hide-descendants" />)(value);
r13 = value;
function _default_106663({feedBlock, screen, preferVCPrice, disableBundleStaticBackground}) { // fn#106663, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14267:911, offset: 0x022e55eb, size: 1576 bytes, params: 2, frame: 41
var r18;
var r9;
var r13;
var r12;
var PressableOpacity;
var object5;
const Button = (ButtonNativeModule).Button;
var object2;
var object6;
var object7;
var value;
const styles = useStyles();
const value2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([ThemeStore], function() {
return require(dependencyMap[11]).isThemeDark(ThemeStore.theme);
});
const {feedProducts, isPersonalized} = ReactModule.useMemo(_fun106666, [feedBlock.sortedSkuIds,
(importDefault(14058) /* metro dependency 14058: useGetProductsFromSkus */)(),
(require(566) /* metro dependency 566: flux */).useStateFromStores([ConsentStore], function() {
return ConsentStore.hasConsented(Consents.PERSONALIZATION);
})]);
const value6 = (UseFilteredAndSortedProductsModule).useFilteredAndSortedProducts({products: feedProducts,
maxProducts: 36, screen: screen});
const closure = function() {
var moduleValue = require(dependencyMap[15]);
var object = {};
var COLLECTIBLES_MOBILE_SHOP_ALL_BUTTON = importDefault(dependencyMap[16]).COLLECTIBLES_MOBILE_SHOP_ALL_BUTTON;
object.analyticsLocations = [COLLECTIBLES_MOBILE_SHOP_ALL_BUTTON];
object.analyticsSource = importDefault(dependencyMap[16]).COLLECTIBLES_MOBILE_SHOP_ALL_BUTTON;
object.screen = CollectiblesMobileShopScreen.SHOP_ALL;
moduleValue.openCollectiblesShopMobile(object);
};
const ORBS = CollectiblesMobileShopScreen.ORBS;
const value7 = screen === ORBS;
const useReducedMotion = (require(566) /* metro dependency 566: flux */).useStateFromStores([AccessibilityStore],
function() {
return AccessibilityStore.useReducedMotion;
});
const defaultImport = UseAnalyticsLocations;
const COLLECTIBLES_SHOP_POPULAR_PICKS = (AnalyticsLocation).COLLECTIBLES_SHOP_POPULAR_PICKS;
const analyticsLocations = defaultImport(COLLECTIBLES_SHOP_POPULAR_PICKS).analyticsLocations;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const r15 = isPersonalized ? Reflect.apply(string, intl, [t.NSv5KV]) : Reflect.apply(string, intl, [t.ivaAA7]);
const AnalyticsLocationProvider = (UseAnalyticsLocationsModule).AnalyticsLocationProvider;
const Heading = (TextModule).Heading;
const heading = (
<Heading variant="heading-lg/semibold">
{r15}
</Heading>
);
if (isPersonalized) {
PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
object5 = {onPress: onPress_106669, hitSlop: 14};
object5['aria-label'] = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.hvVgAZ);
r18 = (
<PressableOpacity {...object5}>
{((CircleInformationIcon) => <CircleInformationIcon size="xs" />)((require(4068) /* metro dependency 4068: CircleInformationIcon */).CircleInformationIcon)}
</PressableOpacity>
);
} else {
value = importDefault(5475) /* metro dependency 5475: FastImage */;
value = ((Component) => <Component source={{uri: importDefault(14074) /* metro dependency 14074: orb_coachmark_asset_2x_animatedPng */}} enableAnimation resizeMode="contain" style={styles.feedFooterOrbImage} accessibilityElementsHidden importantForAccessibility="no-hide-descendants" />)(value);
r13 = value;
r18 = isPersonalized;
}
r12 = r13;
} else {
object2 = {};
if (value2) {
object2.source = require(14075) /* metro dependency 14075 */;
object2.style = styles.feedFooterImage;
object2.accessibilityElementsHidden = true;
object2.importantForAccessibility = 'no-hide-descendants';
} else {
object2.source = require(14076) /* metro dependency 14076 */;
object2.style = styles.feedFooterImage;
object2.accessibilityElementsHidden = true;
object2.importantForAccessibility = 'no-hide-descendants';
}
r12 = <Image {...object2} />;
}
items4[2] = r12;
items3[2] = <View style={styles.feedFooter}>{items4}</View>;
return (
<AnalyticsLocationProvider value={analyticsLocations}>
<View style={styles.feedContainer}>
{items3}
const view = (
<View style={styles.feedTitle}>
{heading}
{r18}
</View>
</AnalyticsLocationProvider>
);
}
);
if (value7) {
r9 = !value7;
} else {
r9 = (
<Button
onPress={closure}
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.xFcotU)}
variant="primary"
size="sm"
/>
);
}
const items3 = [
<View style={styles.feedHeader}>
{view}
{r9}
</View>,
];
items3[1] = ((Component) => <Component products={value6} loadingCardsNum={36} preferVCPrice={preferVCPrice} accessibilityLabel={r15} disableBundleStaticBackground={disableBundleStaticBackground} />)(importDefault(14062) /* metro dependency 14062: FeedProductList */);
const Text = (TextModule).Text;
string = intl.string;
const Yr70c4 = (require(1244) /* metro dependency 1244: indexNative */).t.Yr70c4;
const items4 = [
<Text variant="heading-lg/bold" accessibilityRole="header">
{Reflect.apply(string, intl, [Yr70c4])}
</Text>,
];
string = intl.string;
const AfrvRD = (require(1244) /* metro dependency 1244: indexNative */).t.AfrvRD;
items4[1] = (
<Button
onPress={closure}
text={Reflect.apply(string, intl, [AfrvRD])}
variant="primary"
size="md"
/>
);
if (value7) {
if (useReducedMotion) {
object7 = {};
object7.uri = importDefault(14073) /* metro dependency 14073: orb_coachmark_asset_2xPng */;
r13 = (
<Image
source={object7}
style={styles.feedFooterOrbImage}
accessibilityElementsHidden
importantForAccessibility="no-hide-descendants"
/>
);
} else if ((require(477) /* metro dependency 477: PlatformUtils */).isAndroid()) {
value = importDefault(7601) /* metro dependency 7601: APNGDecorationNativeComponent */;
value = ((Component) => <Component url={importDefault(14074) /* metro dependency 14074: orb_coachmark_asset_2x_animatedPng */} autoplay style={styles.feedFooterOrbImage} accessibilityElementsHidden importantForAccessibility="no-hide-descendants" />)(value);
r13 = value;
} else {
value = importDefault(5475) /* metro dependency 5475: FastImage */;
value = ((Component) => <Component source={{uri: importDefault(14074) /* metro dependency 14074: orb_coachmark_asset_2x_animatedPng */}} enableAnimation resizeMode="contain" style={styles.feedFooterOrbImage} accessibilityElementsHidden importantForAccessibility="no-hide-descendants" />)(value);
r13 = value;
}
r12 = r13;
} else {
object6 = {};
if (value2) {
object6.source = require(14075) /* metro dependency 14075 */;
object6.style = styles.feedFooterImage;
object6.accessibilityElementsHidden = true;
object6.importantForAccessibility = 'no-hide-descendants';
} else {
object6.source = require(14076) /* metro dependency 14076 */;
object6.style = styles.feedFooterImage;
object6.accessibilityElementsHidden = true;
object6.importantForAccessibility = 'no-hide-descendants';
}
r12 = <Image {...object6} />;
}
items4[2] = r12;
items3[2] = (
<View style={styles.feedFooter}>
{items4}
</View>
);
return (
<AnalyticsLocationProvider value={analyticsLocations}>
<View style={styles.feedContainer}>
{items3}
</View>
</AnalyticsLocationProvider>
);
function _fun106666() { // fn#106666, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14267:1168, offset: 0x022e5c61, size: 186 bytes, params: 1, frame: 17
const ShopHomeSortType = (ShopHomeSortTypeModule).ShopHomeSortType;
let sortedSkuIds = feedBlock.sortedSkuIds;
const value2 = undefined;
let r5 = sortedSkuIds == null ? value2 : sortedSkuIds[ShopHomeSortType.RECOMMENDED];
r5 = r5 ?? [];
sortedSkuIds = feedBlock.sortedSkuIds;
let r3 = sortedSkuIds == null ? value2 : sortedSkuIds[ShopHomeSortType.POPULAR];
r3 = r3 ?? [];
const r1 = env0_1 && r5.length > 0;
const object = {};
r3 = r1 ? r5 : r3;
object.feedProducts = env0_2(r3);
object.isPersonalized = r1;
return object;
}
function _fun106666() { // fn#106666, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14267:1168, offset: 0x022e5c61, size: 186 bytes, params: 1, frame: 17
const ShopHomeSortType = (require(14071) /* metro dependency 14071: ShopHomeSortType */).ShopHomeSortType;
let sortedSkuIds = feedBlock.sortedSkuIds;
const value2 = undefined;
let r5 = sortedSkuIds == null ? value2 : sortedSkuIds[ShopHomeSortType.RECOMMENDED];
r5 = r5 ?? [];
sortedSkuIds = feedBlock.sortedSkuIds;
let r3 = sortedSkuIds == null ? value2 : sortedSkuIds[ShopHomeSortType.POPULAR];
r3 = r3 ?? [];
const r1 = env0_1 && r5.length > 0;
const object2 = {};
r3 = r1 ? r5 : r3;
object2.feedProducts = env0_2(r3);
object2.isPersonalized = r1;
return object2;
}
function _default_106663OnPress_106669() { // fn#106669, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14267:2262, owner: _default_106663.onPress, offset: 0x022e5d89, size: 82 bytes, params: 1, frame: 16
let value = environment.__proto__;
const defaultImport = importDefault(dependencyMap[21]);
const openLazy = defaultImport.openLazy;
value = require(dependencyMap[23]);
value = value(dependencyMap[22], dependencyMap.paths);
return Reflect.apply(openLazy, defaultImport, [value, 'PersonalizationDisclaimerActionSheet', {}]);
}
}
function _default_106663OnPress_106669() { // fn#106669, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14267:2262, owner: _default_106663.onPress, offset: 0x022e5d89, size: 82 bytes, params: 1, frame: 16
let value = environment.__proto__;
const defaultImport = importDefault(dependencyMap[21]);
const openLazy = defaultImport.openLazy;
value = require(dependencyMap[23]);
value = value(dependencyMap[22], dependencyMap.paths);
return Reflect.apply(openLazy, defaultImport, [value, 'PersonalizationDisclaimerActionSheet', {}]);
}
global.__d(_fun106662, 14070, [31, 27, 4502, 1310, 5078, 663, 661, 33, 4501, 697, 566, 4002, 14058, 14071, 14049,
5120, 6789, 6771, 1244, 4573, 5278, 4080, 14072, 1962, 4068, 4578, 14062, 14073, 477, 7601, 14074, 5475, 14075,
14076,
2]) /* metro module 14070, dependencies: [31, 27, 4502, 1310, 5078, 663, 661, 33, 4501, 697, 566, 4002, 14058, 14071, 14049, 5120, 6789, 6771, 1244, 4573, 5278, 4080, 14072, 1962, 4068, 4578, 14062, 14073, 477, 7601, 14074, 5475, 14075, 14076, 2] */;
@@ -1,87 +1,94 @@
/* Metro module 14062; source: modules/collectibles/native/FeedProductList.tsx; dependencies: [31, 27, 33, 4501, 10020, 14063, 14056, 14064, 2] */
import SkeletonCard from './SkeletonCard.tsx'; /* Metro dependency 14056 */
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 CreateStylesModule from '../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as CollectiblesShopCardV2Module from './CollectiblesShopCardV2.tsx'; /* Metro dependency 10020 */
import * as UseCardLayoutModule from './hooks/useCardLayout.tsx'; /* Metro dependency 14063 */
function _fun106617(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#106617, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14259:6, offset: 0x022e2da7, size: 293 bytes, params: 8, frame: 21
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_3 = (require(27) /* metro dependency 27 */).View;
const env0_4 = (require(33) /* metro dependency 33 */).jsx;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
const COLLECTIBLES_SHOP_CARD_GAP = (require(10020) /* metro dependency 10020: CollectiblesShopCardV2 */).COLLECTIBLES_SHOP_CARD_GAP;
const env0_5 = Reflect.apply(createStyles, createStylesModule, [{skeletonGrid: {'flex': 1, 'alignItems': 'center'},
ReactModule;
const createStyles = CreateStylesModule.createStyles;
const COLLECTIBLES_SHOP_CARD_GAP = (CollectiblesShopCardV2Module).COLLECTIBLES_SHOP_CARD_GAP;
const env0_5 = Reflect.apply(createStyles, CreateStylesModule, [{skeletonGrid: {'flex': 1, 'alignItems': 'center'},
skeletonRow: {flexDirection: 'row', gap: COLLECTIBLES_SHOP_CARD_GAP, paddingBottom: COLLECTIBLES_SHOP_CARD_GAP,
paddingHorizontal: COLLECTIBLES_SHOP_CARD_GAP}}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/FeedProductList.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/native/FeedProductList.tsx');
exports.default = FeedProductList;
}
function SkeletonGrid({loadingCardsNum, accessibilityLabel}) { // fn#106618, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14259:390, offset: 0x022e2ecc, size: 196 bytes, params: 2, frame: 19
var r1;
var value4;
const styles = useStyles();
const value2 = (require(14063) /* metro dependency 14063: useCardLayout */).useCardLayout();
const columns = value2.columns;
const env0_3 = value2.cardWidth;
const env0_4 = value2.rowWidth;
if (0 < loadingCardsNum) {
for (r1 = 0; true; r1 = value4) {
SkeletonGrid_loop(r1);
value4 = r1 + columns;
if (!(value4 < loadingCardsNum)) {
break;
function SkeletonGrid({loadingCardsNum, accessibilityLabel}) { // fn#106618, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14259:390, offset: 0x022e2ecc, size: 196 bytes, params: 2, frame: 19
var r1;
var value4;
const styles = useStyles();
const value2 = (UseCardLayoutModule).useCardLayout();
const columns = value2.columns;
const env0_3 = value2.cardWidth;
const env0_4 = value2.rowWidth;
if (0 < loadingCardsNum) {
for (r1 = 0; true; r1 = value4) {
SkeletonGrid_loop(r1);
value4 = r1 + columns;
if (!(value4 < loadingCardsNum)) {
break;
}
}
}
return (
<View
style={styles.skeletonGrid}
accessibilityRole="list"
accessibilityLabel={accessibilityLabel}
accessibilityState={{busy: true}}
accessible
/>
);
function SkeletonGrid_loop(a0) { // fn#106619, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14259:525, owner: SkeletonGrid._loop, offset: 0x022e2f90, size: 182 bytes, params: 2, frame: 21
const env0_0 = a0;
const Array = global.Array;
const from = Array.from;
const object = {};
const Math = global.Math;
object.length = Math.min(columns, loadingCardsNum - a0);
env0_5.push(<View style={[styles.skeletonRow, {width: rowWidth}]} key={'row-' + a0}>{Reflect.apply(from, Array,
[object]).map(_fun106620)}</View>);
function _fun106620(a0, a1) { // fn#106620, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14259:585, offset: 0x022e3046, size: 121 bytes, params: 3, frame: 19
const cardWidthBinding = cardWidth;
const COLLECTIBLES_SHOP_CARD_GAP = (CollectiblesShopCardV2Module).COLLECTIBLES_SHOP_CARD_GAP;
return (
<SkeletonCard
width={cardWidthBinding}
style={{marginBottom: COLLECTIBLES_SHOP_CARD_GAP}}
key={'' + env0_0 + '-' + a1}
/>
);
}
}
}
return (
<View
style={styles.skeletonGrid}
accessibilityRole="list"
accessibilityLabel={accessibilityLabel}
accessibilityState={{busy: true}}
accessible
/>
);
}
function FeedProductList(a0) { // fn#106621, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14259:1003, offset: 0x022e30bf, size: 133 bytes, params: 2, frame: 18
var r0;
var value;
const products = a0.products;
const loadingCardsNum = a0.loadingCardsNum;
const preferVCPrice = a0.preferVCPrice;
const accessibilityLabel = a0.accessibilityLabel;
if (products.length === 0) {
r0 = <SkeletonGrid loadingCardsNum={loadingCardsNum} accessibilityLabel={accessibilityLabel} />;
} else {
value = importDefault(14064) /* metro dependency 14064: CollectiblesShopCardsGrid */;
value = ((Component) => <Component products={products} preferVCPrice={preferVCPrice} accessibilityLabel={accessibilityLabel} disableBundleStaticBackground={a0.disableBundleStaticBackground} />)(value);
r0 = value;
function FeedProductList(a0) { // fn#106621, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14259:1003, offset: 0x022e30bf, size: 133 bytes, params: 2, frame: 18
var r0;
var value;
const products = a0.products;
const loadingCardsNum = a0.loadingCardsNum;
const preferVCPrice = a0.preferVCPrice;
const accessibilityLabel = a0.accessibilityLabel;
if (products.length === 0) {
r0 = <SkeletonGrid loadingCardsNum={loadingCardsNum} accessibilityLabel={accessibilityLabel} />;
} else {
value = importDefault(14064) /* metro dependency 14064: CollectiblesShopCardsGrid */;
value = ((Component) => <Component products={products} preferVCPrice={preferVCPrice} accessibilityLabel={accessibilityLabel} disableBundleStaticBackground={a0.disableBundleStaticBackground} />)(value);
r0 = value;
}
return r0;
}
return r0;
}
function SkeletonGrid_loop(a0) { // fn#106619, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14259:525, owner: SkeletonGrid._loop, offset: 0x022e2f90, size: 182 bytes, params: 2, frame: 21
const env0_0 = a0;
const Array = global.Array;
const from = Array.from;
const object2 = {};
const Math = global.Math;
object2.length = Math.min(columns, loadingCardsNum - a0);
env0_5.push(<View style={[styles.skeletonRow, {width: rowWidth}]} key={'row-' + a0}>{Reflect.apply(from, Array,
[object2]).map(_fun106620)}</View>);
}
function _fun106620(a0, a1) { // fn#106620, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14259:585, offset: 0x022e3046, size: 121 bytes, params: 3, frame: 19
const SkeletonCard = importDefault(14056) /* metro dependency 14056: SkeletonCard */;
const cardWidthBinding = cardWidth;
const COLLECTIBLES_SHOP_CARD_GAP = (require(10020) /* metro dependency 10020: CollectiblesShopCardV2 */).COLLECTIBLES_SHOP_CARD_GAP;
return (
<SkeletonCard
width={cardWidthBinding}
style={{marginBottom: COLLECTIBLES_SHOP_CARD_GAP}}
key={'' + env0_0 + '-' + a1}
/>
);
}
global.__d(_fun106617, 14062, [31, 27, 33, 4501, 10020, 14063, 14056, 14064,
2]) /* metro module 14062, dependencies: [31, 27, 33, 4501, 10020, 14063, 14056, 14064, 2] */;
@@ -1,168 +1,230 @@
/* Metro module 10144; source: modules/collectibles/native/FractionalNitroCollectedActionSheet.tsx; dependencies: [31, 27, 661, 1880, 33, 4501, 697, 5475, 10145, 10064, 4048, 5178, 4002, 7316, 7317, 4573, 1244, 1948, 3853, 6275, 7046, 5278, 10139, 4578, 4080, 6515, 2] */
import Native from '../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import HelpdeskUtils from '../../../utils/HelpdeskUtils.tsx'; /* Metro dependency 1948 */
import Linking from '../../../lib/native/Linking.tsx'; /* Metro dependency 3853 */
import UseTheme from '../../../hooks/useTheme.tsx'; /* Metro dependency 4048 */
import ActionSheetActionCreators from '../../action_sheet/native/ActionSheetActionCreators.tsx'; /* Metro dependency 4080 */
import FastImage2 from '../../../components_native/common/FastImage.tsx'; /* Metro dependency 5475 */
import Mobile_fraction_nitro_2xPng from '../../../external/discord_assets/assets/orbs/mobile_fraction_nitro_2x.png.js'; /* Metro dependency 10064 */
import Module10145 from '../../../by-id/module-10145.js'; /* Metro dependency 10145 */
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 ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
import * as IndexNativeModule from '../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as PremiumConstantsModule from '../../premium/PremiumConstants.tsx'; /* Metro dependency 1880 */
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 CollectiblesUtilsModule from '../utils/CollectiblesUtils.tsx'; /* Metro dependency 5178 */
import * as PressablesModule from '../../../design/void/Pressables/native/Pressables.tsx'; /* Metro dependency 5278 */
import * as BottomSheetNativeModule from '../../../design/components/Sheet/native/BottomSheet.native.tsx'; /* Metro dependency 6275 */
import * as ActionSheetHeaderBarNativeModule from '../../../design/components/Sheet/native/ActionSheetHeaderBar.native.tsx'; /* Metro dependency 6515 */
import * as CircleQuestionIconModule from '../../../design/components/Icon/native/redesign/generated/CircleQuestionIcon.tsx'; /* Metro dependency 10139 */
function _fun79078(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#79078, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10330:6, offset: 0x01e43e5b, size: 627 bytes, params: 8, frame: 25
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
let value = ReactNativeModule;
const env0_4 = value.ActivityIndicator;
const env0_5 = value.View;
const env0_6 = (require(661) /* metro dependency 661: Constants */).HelpdeskArticles;
const env0_7 = (require(1880) /* metro dependency 1880: PremiumConstants */).PremiumTypes;
value = require(33) /* metro dependency 33 */;
const env0_8 = value.jsx;
const env0_9 = value.jsxs;
const env0_10 = value.Fragment;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
object = {};
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object2.body = {flex: 1, padding: PX_16};
object.body = {flex: 1, padding: PX_16};
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object2.content = {'flex': 1, 'gap': null, 'alignItems': 'center', gap: PX_16};
object.content = {'flex': 1, 'gap': null, 'alignItems': 'center', gap: PX_16};
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object2.buttonContainer = {'flex': 1, 'gap': null, 'alignSelf': 'stretch', gap: PX_16};
object2.description = {textAlign: 'center'};
object2.header = {'height': 112, 'justifyContent': 'center', 'alignItems': 'center', 'overflow': 'hidden'};
object2.fractionNitroIcon = {'width': 68, 'height': 68, 'position': 'absolute', 'top': '50%', 'left': '50%',
object.buttonContainer = {'flex': 1, 'gap': null, 'alignSelf': 'stretch', gap: PX_16};
object.description = {textAlign: 'center'};
object.header = {'height': 112, 'justifyContent': 'center', 'alignItems': 'center', 'overflow': 'hidden'};
object.fractionNitroIcon = {'width': 68, 'height': 68, 'position': 'absolute', 'top': '50%', 'left': '50%',
transform: [{translateX: -34}, {translateY: -34}]};
const object3 = {'position': 'absolute', 'right': null, 'top': null, 'width': 32, 'height': 32,
const object4 = {'position': 'absolute', 'right': null, 'top': null, 'width': 32, 'height': 32,
'backgroundColor': null, 'justifyContent': 'center'};
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object3.right = PX_16;
object4.right = PX_16;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object3.top = PX_16;
object4.top = PX_16;
const CONTROL_OVERLAY_SECONDARY_BACKGROUND_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.CONTROL_OVERLAY_SECONDARY_BACKGROUND_DEFAULT;
object3.backgroundColor = CONTROL_OVERLAY_SECONDARY_BACKGROUND_DEFAULT;
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
object3.alignItems = 'center';
object2.questionIconContainer = object3;
object2.questionIcon = {'width': 18, 'height': 18};
const env0_11 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/FractionalNitroCollectedActionSheet.tsx');
object4.backgroundColor = CONTROL_OVERLAY_SECONDARY_BACKGROUND_DEFAULT;
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
object4.alignItems = 'center';
object.questionIconContainer = object4;
object.questionIcon = {'width': 18, 'height': 18};
const env0_11 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/native/FractionalNitroCollectedActionSheet.tsx');
exports.default = FractionalNitroCollectedActionSheet;
}
function NitroAcquiredHeader() { // fn#79079, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10330:973, offset: 0x01e440ce, size: 157 bytes, params: 1, frame: 22
const styles = useStyles();
return (
<View style={styles.header}>
{((Component) => <Component source={Module10145} />)(FastImage2)}
{((Component) => <Component source={{uri: Mobile_fraction_nitro_2xPng}} style={styles.fractionNitroIcon} />)(FastImage2)}
</View>
);
}
function NitroAcquiredHeader() { // fn#79079, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10330:973, offset: 0x01e440ce, size: 157 bytes, params: 1, frame: 22
const styles = useStyles();
return (
<View style={styles.header}>
{((Component) => <Component source={importDefault(10145) /* metro dependency 10145 */} />)(importDefault(5475) /* metro dependency 5475: FastImage */)}
{((Component) => <Component source={{uri: importDefault(10064) /* metro dependency 10064: mobile_fraction_nitro_2xPng */}} style={styles.fractionNitroIcon} />)(importDefault(5475) /* metro dependency 5475: FastImage */)}
</View>
);
}
function FractionalNitroCollectedActionSheet({consumed, onPressExplorePerks, onPressViewCredits}) { // fn#79080, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10330:1254, offset: 0x01e4416b, size: 946 bytes, params: 2, frame: 38
var r9;
var items3;
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
var object;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var items4;
const styles = useStyles();
const value2 = (importDefault(4048) /* metro dependency 4048: useTheme */)();
const value3 = (require(5178) /* metro dependency 5178: CollectiblesUtils */).useFetchFractionalPremiumInfo();
const isLoading = value3.isLoading;
const isFractionalPremiumActive = value3.isFractionalPremiumActive;
const env0_3 = isFractionalPremiumActive;
const expiresAt = value3.expiresAt;
const binding = env0_3;
const value4 = binding.useMemo(_fun79081, [consumed, value2]);
const value5 = binding.useMemo(_fun79082, [consumed, expiresAt, isFractionalPremiumActive, styles.description]);
const value6 = binding.useCallback(_fun79083, []);
const BottomSheet = (require(6275) /* metro dependency 6275: BottomSheetNative */).BottomSheet;
const jsxRuntimeEnv0_10Binding = jsxRuntimeEnv0_10;
const r10 = consumed ? ((Component) => <Component premiumType={PremiumTypes.TIER_2} />)(importDefault(7046) /* metro dependency 7046: PremiumPlanActionSheetHeader */) : <NitroAcquiredHeader />;
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
const CircleQuestionIcon = (require(10139) /* metro dependency 10139: CircleQuestionIcon */).CircleQuestionIcon;
const WHITE = (importDefault(697) /* metro dependency 697: native */).colors.WHITE;
const items2 = [<>{r10}<PressableOpacity style={styles.questionIconContainer} onPress={value6}><CircleQuestionIcon style={styles.questionIcon} color={WHITE} /></PressableOpacity></>];
if (isLoading) {
r9 = <ActivityIndicator size="large" />;
} else {
var viewBinding2Props = {style: styles.content};
items3 = [value4, value5];
var viewBinding3Props = {style: styles.buttonContainer};
object = {size: 'lg'};
string = intl.string;
if (consumed) {
object.text = Reflect.apply(string, intl, [t.ERKK6v]);
object.onPress = onPressExplorePerks;
function FractionalNitroCollectedActionSheet({consumed, onPressExplorePerks, onPressViewCredits}) { // fn#79080, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10330:1254, offset: 0x01e4416b, size: 946 bytes, params: 2, frame: 38
var r9;
var items3;
const Button = (ButtonNativeModule).Button;
var object2;
const intl = (IndexNativeModule).intl;
var string;
const t = (IndexNativeModule).t;
var items4;
const styles = useStyles();
const value2 = (UseTheme)();
const value3 = (CollectiblesUtilsModule).useFetchFractionalPremiumInfo();
const isLoading = value3.isLoading;
const isFractionalPremiumActive = value3.isFractionalPremiumActive;
const isFractionalPremiumActive2 = isFractionalPremiumActive;
const expiresAt = value3.expiresAt;
const binding = isFractionalPremiumActive2;
const value4 = binding.useMemo(_fun79081, [consumed, value2]);
const value5 = binding.useMemo(_fun79082, [consumed, expiresAt, isFractionalPremiumActive, styles.description]);
const value6 = binding.useCallback(_fun79083, []);
const BottomSheet = (BottomSheetNativeModule).BottomSheet;
const jsxRuntimeEnv0_10Binding = jsxRuntimeEnv0_10;
const r10 = (
consumed
? ((Component) => <Component premiumType={PremiumTypes.TIER_2} />)(importDefault(7046) /* metro dependency 7046: PremiumPlanActionSheetHeader */)
: (
<NitroAcquiredHeader />
)
);
const PressableOpacity = (PressablesModule).PressableOpacity;
const CircleQuestionIcon = (CircleQuestionIconModule).CircleQuestionIcon;
const WHITE = (Native).colors.WHITE;
const items2 = [
<>
{r10}
<PressableOpacity style={styles.questionIconContainer} onPress={value6}>
<CircleQuestionIcon style={styles.questionIcon} color={WHITE} />
</PressableOpacity>
</>,
];
if (isLoading) {
r9 = <ActivityIndicator size="large" />;
} else {
object.text = Reflect.apply(string, intl, [t['Jr6N+s']]);
object.onPress = onPressViewCredits;
var viewBinding2Props = {style: styles.content};
items3 = [value4, value5];
var viewBinding3Props = {style: styles.buttonContainer};
object2 = {size: 'lg'};
string = intl.string;
if (consumed) {
object2.text = Reflect.apply(string, intl, [t.ERKK6v]);
object2.onPress = onPressExplorePerks;
} else {
object2.text = Reflect.apply(string, intl, [t['Jr6N+s']]);
object2.onPress = onPressViewCredits;
}
items4 = [
<Button {...object2} />,
];
string = intl.string;
items4[1] = (
<Button
size="lg"
variant="secondary"
text={Reflect.apply(string, intl, [t.TkTvBz])}
onPress={onPress_79084}
/>
);
items3[2] = (
<View {...viewBinding3Props}>
{items4}
</View>
);
r9 = (
<View {...viewBinding2Props}>
{items3}
</View>
);
}
items4 = [<Button {...object} />];
string = intl.string;
items4[1] = <Button size="lg" variant="secondary" text={Reflect.apply(string, intl,
[t.TkTvBz])} onPress={onPress_79084} />;
items3[2] = <View {...viewBinding3Props}>{items4}</View>;
r9 = <View {...viewBinding2Props}>{items3}</View>;
items2[1] = (
<View style={styles.body}>
{r9}
</View>
);
const ActionSheetHeaderBar = (ActionSheetHeaderBarNativeModule).ActionSheetHeaderBar;
items2[2] = <ActionSheetHeaderBar variant="floating" />;
return (
<BottomSheet handleDisabled>
{items2}
</BottomSheet>
);
function _fun79081() { // fn#79081, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10330:1493, offset: 0x01e4451d, size: 223 bytes, params: 1, frame: 20
var r0;
var Text;
var intl;
var FastImage;
var value;
if (consumed) {
FastImage = importDefault(5475) /* metro dependency 5475: FastImage */;
value = (require(4002) /* metro dependency 4002: shared */).isThemeDark(env0_2);
value = (
<FastImage
source={value ? importDefault(7316) /* metro dependency 7316 */ : importDefault(7317) /* metro dependency 7317 */}
/>
);
r0 = value;
} else {
Text = (require(4573) /* metro dependency 4573: Text */).Text;
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
r0 = (
<Text variant="heading-lg/bold" color="text-default">
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.g5W1g8)}
</Text>
);
}
return r0;
}
function _fun79082() { // fn#79082, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10330:1697, offset: 0x01e445fc, size: 325 bytes, params: 1, frame: 24
const value = environment.__proto__;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const formatToPlainString = intl.formatToPlainString;
const Cz1G97 = (require(1244) /* metro dependency 1244: indexNative */).t.Cz1G97;
const value2 = Reflect.apply(formatToPlainString, intl, [Cz1G97, {days: 3}]);
const Text = (TextModule).Text;
const consumedBinding = consumed;
const textProps = {'variant': 'text-md/normal', 'color': 'text-default', style: styles.description};
if (consumedBinding) {
textProps.children = intl.format((require(1244) /* metro dependency 1244: indexNative */).t['93PGOI'],
{duration: value2, expirationDate: expiresAt});
} else {
textProps.children = isFractionalPremiumActive ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.fBmhE9) : intl.format((require(1244) /* metro dependency 1244: indexNative */).t['8fyBPf'],
{duration: value2});
}
return <Text {...textProps} />;
}
function _fun79083() { // fn#79083, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10330:2163, offset: 0x01e44741, size: 71 bytes, params: 1, frame: 14
const value = environment.__proto__;
const defaultImport = HelpdeskUtils;
const getArticleURL = defaultImport.getArticleURL;
const FRACTIONAL_PREMIUM_ABOUT = HelpdeskArticles.FRACTIONAL_PREMIUM_ABOUT;
(Linking).openURL(Reflect.apply(getArticleURL, defaultImport,
[FRACTIONAL_PREMIUM_ABOUT]));
}
function FractionalNitroCollectedActionSheetOnPress() { // fn#79084, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10330:2935, owner: FractionalNitroCollectedActionSheet.onPress, offset: 0x01e44788, size: 37 bytes, params: 1, frame: 11
const value = environment.__proto__;
return (ActionSheetActionCreators).hideActionSheet();
}
}
items2[1] = <View style={styles.body}>{r9}</View>;
const ActionSheetHeaderBar = (require(6515) /* metro dependency 6515: ActionSheetHeaderBarNative */).ActionSheetHeaderBar;
items2[2] = <ActionSheetHeaderBar variant="floating" />;
return (
<BottomSheet handleDisabled>
{items2}
</BottomSheet>
);
}
function _fun79081() { // fn#79081, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10330:1493, offset: 0x01e4451d, size: 223 bytes, params: 1, frame: 20
var r0;
var Text;
var intl;
var FastImage;
var value;
if (consumed) {
FastImage = importDefault(5475) /* metro dependency 5475: FastImage */;
value = (require(4002) /* metro dependency 4002: shared */).isThemeDark(env0_2);
value = <FastImage source={value ? importDefault(7316) /* metro dependency 7316 */ : importDefault(7317) /* metro dependency 7317 */} />;
r0 = value;
} else {
Text = (require(4573) /* metro dependency 4573: Text */).Text;
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
r0 = <Text variant="heading-lg/bold" color="text-default">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.g5W1g8)}</Text>;
}
return r0;
}
function _fun79082() { // fn#79082, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10330:1697, offset: 0x01e445fc, size: 325 bytes, params: 1, frame: 24
const value = environment.__proto__;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const formatToPlainString = intl.formatToPlainString;
const Cz1G97 = (require(1244) /* metro dependency 1244: indexNative */).t.Cz1G97;
const value2 = Reflect.apply(formatToPlainString, intl, [Cz1G97, {days: 3}]);
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const consumedBinding = consumed;
const textProps = {'variant': 'text-md/normal', 'color': 'text-default', style: styles.description};
if (consumedBinding) {
textProps.children = intl.format((require(1244) /* metro dependency 1244: indexNative */).t['93PGOI'],
{duration: value2, expirationDate: expiresAt});
} else {
textProps.children = isFractionalPremiumActive ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.fBmhE9) : intl.format((require(1244) /* metro dependency 1244: indexNative */).t['8fyBPf'],
{duration: value2});
}
return <Text {...textProps} />;
}
function _fun79083() { // fn#79083, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10330:2163, offset: 0x01e44741, size: 71 bytes, params: 1, frame: 14
const value = environment.__proto__;
const defaultImport = importDefault(1948) /* metro dependency 1948: HelpdeskUtils */;
const getArticleURL = defaultImport.getArticleURL;
const FRACTIONAL_PREMIUM_ABOUT = HelpdeskArticles.FRACTIONAL_PREMIUM_ABOUT;
(importDefault(3853) /* metro dependency 3853: Linking */).openURL(Reflect.apply(getArticleURL, defaultImport,
[FRACTIONAL_PREMIUM_ABOUT]));
}
function FractionalNitroCollectedActionSheetOnPress() { // fn#79084, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10330:2935, owner: FractionalNitroCollectedActionSheet.onPress, offset: 0x01e44788, size: 37 bytes, params: 1, frame: 11
const value = environment.__proto__;
return (importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
}
global.__d(_fun79078, 10144, [31, 27, 661, 1880, 33, 4501, 697, 5475, 10145, 10064, 4048, 5178, 4002, 7316, 7317,
4573, 1244, 1948, 3853, 6275, 7046, 5278, 10139, 4578, 4080, 6515,
2]) /* metro module 10144, dependencies: [31, 27, 661, 1880, 33, 4501, 697, 5475, 10145, 10064, 4048, 5178, 4002, 7316, 7317, 4573, 1244, 1948, 3853, 6275, 7046, 5278, 10139, 4578, 4080, 6515, 2] */;
@@ -1,76 +1,89 @@
/* Metro module 10098; source: modules/collectibles/native/FractionalNitroPreview.tsx; dependencies: [31, 27, 661, 33, 4501, 697, 1244, 4589, 5475, 10099, 10100, 6742, 4573, 2] */
import Native from '../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import LinearGradient from '../../../by-id/module-04589-LinearGradient.js'; /* Metro dependency 4589 */
import FastImage from '../../../components_native/common/FastImage.tsx'; /* Metro dependency 5475 */
import Fn_pdp_preview_headerPng from '../../../external/discord_assets/assets/orbs/fn_pdp_preview_header.png.js'; /* Metro dependency 10099 */
import NitroIcon from './NitroIcon.tsx'; /* Metro dependency 10100 */
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 ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
import * as IndexNativeModule from '../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as TextModule from '../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as CheckmarkSmallIconModule from '../../../design/components/Icon/native/redesign/generated/CheckmarkSmallIcon.tsx'; /* Metro dependency 6742 */
function _fun78867(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#78867, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10284:6, offset: 0x01e39117, size: 452 bytes, params: 8, frame: 22
var object3;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_3 = (require(27) /* metro dependency 27 */).View;
const env0_4 = (require(661) /* metro dependency 661: Constants */).VerticalGradient;
let value = require(33) /* metro dependency 33 */;
ReactModule;
let value = JsxRuntimeModule;
const env0_5 = value.jsx;
const env0_6 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object3 = {};
const object4 = {'flexDirection': 'column', 'alignItems': 'center', 'justifyContent': 'center', 'padding': null,
object = {};
const object2 = {'flexDirection': 'column', 'alignItems': 'center', 'justifyContent': 'center', 'padding': null,
'borderRadius': null, 'overflow': 'hidden', 'alignSelf': 'center'};
const PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
object4.padding = PX_24;
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
object2.padding = PX_24;
object2.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object4.gap = PX_16;
object3.container = object4;
object3.gradient = {'position': 'absolute', 'top': 0, 'left': 0, 'right': 0, 'bottom': 0};
object3.headerImage = {'width': 211, 'height': 157, 'resizeMode': 'cover'};
object3.nitroIconContainer = {alignSelf: 'flex-start'};
object2.gap = PX_16;
object.container = object2;
object.gradient = {'position': 'absolute', 'top': 0, 'left': 0, 'right': 0, 'bottom': 0};
object.headerImage = {'width': 211, 'height': 157, 'resizeMode': 'cover'};
object.nitroIconContainer = {alignSelf: 'flex-start'};
let PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object3.benefits = {'display': 'flex', 'flexDirection': 'column', gap: PX_8};
object.benefits = {'display': 'flex', 'flexDirection': 'column', gap: PX_8};
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object3.benefitRow = {'display': 'flex', 'flexDirection': 'row', 'gap': null, 'alignItems': 'center', gap: PX_8};
const env0_7 = Reflect.apply(createStyles, value, [object3]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/FractionalNitroPreview.tsx');
object.benefitRow = {'display': 'flex', 'flexDirection': 'row', 'gap': null, 'alignItems': 'center', gap: PX_8};
const env0_7 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/native/FractionalNitroPreview.tsx');
exports.FractionalNitroPreview = FractionalNitroPreview;
}
function FractionalNitroPreview() { // fn#78868, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10284:839, offset: 0x01e392db, size: 418 bytes, params: 1, frame: 24
const styles = useStyles();
const E1NP2x = (require(1244) /* metro dependency 1244: indexNative */).t.E1NP2x;
const items2 = [E1NP2x];
items2[1] = (require(1244) /* metro dependency 1244: indexNative */).t.kpMomJ;
items2[2] = (require(1244) /* metro dependency 1244: indexNative */).t.xT1Vfn;
items2[3] = (require(1244) /* metro dependency 1244: indexNative */).t.myyAEr;
items2[4] = (require(1244) /* metro dependency 1244: indexNative */).t.zTk8Ul;
const defaultImport = importDefault(4589) /* metro dependency 4589 */;
const {START, END} = VerticalGradient;
return (
<View style={styles.container}>
{((Component) => <Component colors={['#000000',
'#36266d']} start={START} end={END} style={styles.gradient} />)(defaultImport)}
{((Component) => <Component source={{uri: importDefault(10099) /* metro dependency 10099: fn_pdp_preview_headerPng */}} style={styles.headerImage} />)(importDefault(5475) /* metro dependency 5475: FastImage */)}
<View style={styles.nitroIconContainer}>
{((Component) => <Component />)(importDefault(10100) /* metro dependency 10100: NitroIcon */)}
function FractionalNitroPreview() { // fn#78868, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10284:839, offset: 0x01e392db, size: 418 bytes, params: 1, frame: 24
const styles = useStyles();
const E1NP2x = (require(1244) /* metro dependency 1244: indexNative */).t.E1NP2x;
const items2 = [E1NP2x];
items2[1] = (require(1244) /* metro dependency 1244: indexNative */).t.kpMomJ;
items2[2] = (require(1244) /* metro dependency 1244: indexNative */).t.xT1Vfn;
items2[3] = (require(1244) /* metro dependency 1244: indexNative */).t.myyAEr;
items2[4] = (require(1244) /* metro dependency 1244: indexNative */).t.zTk8Ul;
const defaultImport = LinearGradient;
const {START, END} = VerticalGradient;
return (
<View style={styles.container}>
{((Component) => <Component colors={['#000000',
'#36266d']} start={START} end={END} style={styles.gradient} />)(defaultImport)}
{((Component) => <Component source={{uri: Fn_pdp_preview_headerPng}} style={styles.headerImage} />)(FastImage)}
<View style={styles.nitroIconContainer}>
{((Component) => <Component />)(NitroIcon)}
</View>
<View style={styles.benefits}>
{items2.map(_fun78869)}
</View>
</View>
<View style={styles.benefits}>
{items2.map(_fun78869)}
</View>
</View>
);
}
);
function _fun78869(a0, a1) { // fn#78869, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10284:1220, offset: 0x01e3947d, size: 200 bytes, params: 3, frame: 21
let value = environment.__proto__;
const CheckmarkSmallIcon = (CheckmarkSmallIconModule).CheckmarkSmallIcon;
const WHITE = (Native).colors.WHITE;
value = <CheckmarkSmallIcon color={WHITE} />;
const Text = (TextModule).Text;
return (
<View style={styles.benefitRow} key={a1}>
{value}
<Text variant="text-sm/medium" color="always-white">
{(IndexNativeModule).intl.string(a0)}
</Text>
</View>
);
}
}
function _fun78869(a0, a1) { // fn#78869, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10284:1220, offset: 0x01e3947d, size: 200 bytes, params: 3, frame: 21
let value = environment.__proto__;
const CheckmarkSmallIcon = (require(6742) /* metro dependency 6742: CheckmarkSmallIcon */).CheckmarkSmallIcon;
const WHITE = (importDefault(697) /* metro dependency 697: native */).colors.WHITE;
value = <CheckmarkSmallIcon color={WHITE} />;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<View style={styles.benefitRow} key={a1}>
{value}
<Text variant="text-sm/medium" color="always-white">
{(require(1244) /* metro dependency 1244: indexNative */).intl.string(a0)}
</Text>
</View>
);
}
global.__d(_fun78867, 10098, [31, 27, 661, 33, 4501, 697, 1244, 4589, 5475, 10099, 10100, 6742, 4573,
2]) /* metro module 10098, dependencies: [31, 27, 661, 33, 4501, 697, 1244, 4589, 5475, 10099, 10100, 6742, 4573, 2] */;
@@ -1,12 +1,20 @@
/* Metro module 10089; source: modules/collectibles/native/FramesEarlyAccessBadge.tsx; dependencies: [57, 31, 27, 33, 4501, 697, 4048, 1244, 8544, 4002, 7954, 4573, 10054, 6517, 2] */
import Module00057 from '../../../by-id/module-00057.js'; /* Metro dependency 57 */
import UseTheme from '../../../hooks/useTheme.tsx'; /* Metro dependency 4048 */
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 IndexNativeModule from '../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as SharedModule from '../../../design/shared.tsx'; /* Metro dependency 4002 */
import * as TextModule from '../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as NitroWheelIconModule from '../../../design/components/Icon/native/redesign/generated/NitroWheelIcon.tsx'; /* Metro dependency 7954 */
import * as UseTooltipNativeModule from '../../../design/components/Tooltip/native/useTooltip.native.tsx'; /* Metro dependency 8544 */
function _fun78814(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#78814, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10275:6, offset: 0x01e35e74, size: 437 bytes, params: 8, frame: 23
var object3;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
let value = ReactNativeModule;
const env0_5 = value.Pressable;
const env0_6 = value.View;
value = require(33) /* metro dependency 33 */;
@@ -15,122 +23,135 @@ function _fun78814(global, require, importDefault, importAll, module, exports, d
const env0_9 = {'top': 14, 'bottom': 14, 'left': 14, 'right': 14};
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object3 = {};
const object4 = {'flexDirection': 'row', 'alignItems': 'center', 'borderRadius': null, 'paddingVertical': 2};
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
object = {};
const object2 = {'flexDirection': 'row', 'alignItems': 'center', 'borderRadius': null, 'paddingVertical': 2};
object2.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
let PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object4.paddingHorizontal = PX_8;
object3.pillBase = object4;
object2.paddingHorizontal = PX_8;
object.pillBase = object2;
const CONTROL_OVERLAY_PRIMARY_BACKGROUND_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.CONTROL_OVERLAY_PRIMARY_BACKGROUND_DEFAULT;
object3.pillDark = {backgroundColor: CONTROL_OVERLAY_PRIMARY_BACKGROUND_DEFAULT};
object.pillDark = {backgroundColor: CONTROL_OVERLAY_PRIMARY_BACKGROUND_DEFAULT};
const BADGE_BACKGROUND_BRAND = (importDefault(697) /* metro dependency 697: native */).colors.BADGE_BACKGROUND_BRAND;
object3.pillLight = {backgroundColor: BADGE_BACKGROUND_BRAND};
object.pillLight = {backgroundColor: BADGE_BACKGROUND_BRAND};
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object3.text = {marginLeft: PX_8, textTransform: 'uppercase'};
const env0_10 = Reflect.apply(createStyles, value, [object3]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/FramesEarlyAccessBadge.tsx');
object.text = {marginLeft: PX_8, textTransform: 'uppercase'};
const env0_10 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/native/FramesEarlyAccessBadge.tsx');
exports.default = _default_78824;
}
function BadgeWithTooltip({tooltipPosition}) { // fn#78815, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10275:610, offset: 0x01e36029, size: 596 bytes, params: 2, frame: 25
const value2 = (importDefault(4048) /* metro dependency 4048: useTheme */)();
const styles = useStyles();
const binding = env0_4;
const value3 = binding.useRef(null);
const [property, env0_2] = env0_3(binding.useState(false), 2);
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const value6 = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['L9B+ZZ']);
const value7 = binding.useCallback(_fun78816, []);
const useMemo = binding.useMemo;
(require(8544) /* metro dependency 8544: useTooltipNative */).useTooltip(value3, Reflect.apply(useMemo, binding,
[_fun78817, [tooltipPosition, value6, property, value7]]));
binding.useEffect(_fun78818, [property]);
const value9 = binding.useCallback(_fun78821, []);
const isThemeDark2 = (require(4002) /* metro dependency 4002: shared */).isThemeDark(value2);
const r7 = isThemeDark2 ? styles.pillDark : styles.pillLight;
const r10 = isThemeDark2 ? 'control-overlay-primary-text-default' : 'white';
const value12 = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['1m6qcO']);
const pressableBindingProps = {ref: value3, onPress: value9, hitSlop: env0_9, accessibilityRole: 'button',
accessibilityLabel: value12, accessibilityHint: value6, style: [styles.pillBase, r7]};
const NitroWheelIcon = (require(7954) /* metro dependency 7954: NitroWheelIcon */).NitroWheelIcon;
const nitroWheelIcon = <NitroWheelIcon size="xs" color={r10} />;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<Pressable {...pressableBindingProps}>
{nitroWheelIcon}
<Text
variant="text-sm/bold"
color={r10}
style={styles.text}
>
{value12}
</Text>
</Pressable>
);
}
function StaticBadge() { // fn#78823, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10275:1443, offset: 0x01e362f6, size: 303 bytes, params: 1, frame: 22
const value2 = (importDefault(4048) /* metro dependency 4048: useTheme */)();
const styles = useStyles();
const isThemeDark2 = (require(4002) /* metro dependency 4002: shared */).isThemeDark(value2);
const r7 = isThemeDark2 ? styles.pillDark : styles.pillLight;
const r10 = isThemeDark2 ? 'control-overlay-primary-text-default' : 'white';
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const value5 = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['1m6qcO']);
const items2 = [styles.pillBase, r7];
const NitroWheelIcon = (require(7954) /* metro dependency 7954: NitroWheelIcon */).NitroWheelIcon;
const nitroWheelIcon = <NitroWheelIcon size="xs" color={r10} />;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<View accessibilityLabel={value5} style={items2}>
{nitroWheelIcon}
<Text
variant="text-sm/bold"
color={r10}
style={styles.text}
>
{value5}
</Text>
</View>
);
}
function _default_78824({location, tooltipPosition, inheritLayerScope, disablePressable}) { // fn#78824, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10275:1814, offset: 0x01e36425, size: 200 bytes, params: 2, frame: 19
tooltipPosition = tooltipPosition === undefined ? 'top' : tooltipPosition;
inheritLayerScope = !(inheritLayerScope === undefined) && inheritLayerScope;
disablePressable = !(disablePressable === undefined) && disablePressable;
if ((require(10054) /* metro dependency 10054: useCanPurchaseFrames */).useIsProfileFramesEarlyAccessPhase(location)) {
if (disablePressable) {
return <StaticBadge />;
} else if (inheritLayerScope) {
return <BadgeWithTooltip tooltipPosition={tooltipPosition} />;
} else {
const LayerScope = (require(6517) /* metro dependency 6517: LayerScopeNative */).LayerScope;
return (
<LayerScope zIndex={3}>
<BadgeWithTooltip tooltipPosition={tooltipPosition} />
</LayerScope>
);
function BadgeWithTooltip({tooltipPosition}) { // fn#78815, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10275:610, offset: 0x01e36029, size: 596 bytes, params: 2, frame: 25
const value2 = (UseTheme)();
const styles = useStyles();
const value3 = ReactModule.useRef(null);
const [property, env0_2] = Module00057(ReactModule.useState(false), 2);
const intl = (IndexNativeModule).intl;
const value6 = intl.string((IndexNativeModule).t['L9B+ZZ']);
const value7 = ReactModule.useCallback(_fun78816, []);
const useMemo = ReactModule.useMemo;
(UseTooltipNativeModule).useTooltip(value3, Reflect.apply(useMemo, ReactModule,
[_fun78817, [tooltipPosition, value6, property, value7]]));
ReactModule.useEffect(_fun78818, [property]);
const value9 = ReactModule.useCallback(_fun78821, []);
const isThemeDark2 = (SharedModule).isThemeDark(value2);
const r7 = isThemeDark2 ? styles.pillDark : styles.pillLight;
const r10 = isThemeDark2 ? 'control-overlay-primary-text-default' : 'white';
const value12 = intl.string((IndexNativeModule).t['1m6qcO']);
const pressableBindingProps = {ref: value3, onPress: value9, hitSlop: env0_9, accessibilityRole: 'button',
accessibilityLabel: value12, accessibilityHint: value6, style: [styles.pillBase, r7]};
const NitroWheelIcon = (NitroWheelIconModule).NitroWheelIcon;
const nitroWheelIcon = <NitroWheelIcon size="xs" color={r10} />;
const Text = (TextModule).Text;
return (
<Pressable {...pressableBindingProps}>
{nitroWheelIcon}
<Text
variant="text-sm/bold"
color={r10}
style={styles.text}
>
{value12}
</Text>
</Pressable>
);
function _fun78816() { // fn#78816, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10275:773, offset: 0x016b4188, size: 18 bytes, params: 1, frame: 11
env0_2(false);
}
} else {
return null;
function _fun78817() { // fn#78817, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10275:803, offset: 0x01e3627d, size: 40 bytes, params: 1, frame: 3
return {position: tooltipPosition, label: Module00057, visible: env0_1, onPress: ReactModule};
}
function _fun78818() { // fn#78818, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10275:899, offset: 0x01e362a5, size: 56 bytes, params: 1, frame: 14
if (env0_1) {
var env0_0 = global.setTimeout(_fun78819, 3000);
return _fun78820;
}
function _fun78819() { // fn#78819, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10275:928, offset: 0x010d036b, size: 18 bytes, params: 1, frame: 11
env1_2(false);
}
function _fun78820() { // fn#78820, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10275:952, offset: 0x016d7e7e, size: 24 bytes, params: 1, frame: 11
return global.clearTimeout(env0_0);
}
}
function _fun78821() { // fn#78821, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10275:1001, offset: 0x01e362dd, size: 25 bytes, params: 1, frame: 11
env0_2(function(a0) {
return !a0;
});
}
}
}
function _fun78817() { // fn#78817, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10275:803, offset: 0x01e3627d, size: 40 bytes, params: 1, frame: 3
return {position: tooltipPosition, label: env0_3, visible: env0_1, onPress: env0_4};
}
function _fun78818() { // fn#78818, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10275:899, offset: 0x01e362a5, size: 56 bytes, params: 1, frame: 14
if (env0_1) {
var env0_0 = global.setTimeout(_fun78819, 3000);
return _fun78820;
function StaticBadge() { // fn#78823, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10275:1443, offset: 0x01e362f6, size: 303 bytes, params: 1, frame: 22
const value2 = (UseTheme)();
const styles = useStyles();
const isThemeDark2 = (SharedModule).isThemeDark(value2);
const r7 = isThemeDark2 ? styles.pillDark : styles.pillLight;
const r10 = isThemeDark2 ? 'control-overlay-primary-text-default' : 'white';
const intl = (IndexNativeModule).intl;
const value5 = intl.string((IndexNativeModule).t['1m6qcO']);
const items2 = [styles.pillBase, r7];
const NitroWheelIcon = (NitroWheelIconModule).NitroWheelIcon;
const nitroWheelIcon = <NitroWheelIcon size="xs" color={r10} />;
const Text = (TextModule).Text;
return (
<View accessibilityLabel={value5} style={items2}>
{nitroWheelIcon}
<Text
variant="text-sm/bold"
color={r10}
style={styles.text}
>
{value5}
</Text>
</View>
);
}
function _default_78824({location, tooltipPosition, inheritLayerScope, disablePressable}) { // fn#78824, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10275:1814, offset: 0x01e36425, size: 200 bytes, params: 2, frame: 19
tooltipPosition = tooltipPosition === undefined ? 'top' : tooltipPosition;
inheritLayerScope = !(inheritLayerScope === undefined) && inheritLayerScope;
disablePressable = !(disablePressable === undefined) && disablePressable;
if ((require(10054) /* metro dependency 10054: useCanPurchaseFrames */).useIsProfileFramesEarlyAccessPhase(location)) {
if (disablePressable) {
return <StaticBadge />;
} else if (inheritLayerScope) {
return <BadgeWithTooltip tooltipPosition={tooltipPosition} />;
} else {
const LayerScope = (require(6517) /* metro dependency 6517: LayerScopeNative */).LayerScope;
return (
<LayerScope zIndex={3}>
<BadgeWithTooltip tooltipPosition={tooltipPosition} />
</LayerScope>
);
}
} else {
return null;
}
}
}
function _fun78821() { // fn#78821, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10275:1001, offset: 0x01e362dd, size: 25 bytes, params: 1, frame: 11
env0_2(function(a0) {
return !a0;
});
}
global.__d(_fun78814, 10089, [57, 31, 27, 33, 4501, 697, 4048, 1244, 8544, 4002, 7954, 4573, 10054, 6517,
2]) /* metro module 10089, dependencies: [57, 31, 27, 33, 4501, 697, 4048, 1244, 8544, 4002, 7954, 4573, 10054, 6517, 2] */;
@@ -1,15 +1,38 @@
/* Metro module 14055; source: modules/collectibles/native/FramesHeroBlock.tsx; dependencies: [31, 27, 5121, 663, 661, 33, 10020, 4501, 697, 14056, 14057, 1484, 10023, 566, 4048, 10154, 14058, 14049, 6771, 6789, 683, 4002, 14060, 14061, 10155, 10089, 4589, 4573, 4578, 1244, 9480, 6533, 5278, 6818, 6517, 14062, 8416, 14065, 2] */
import AnalyticsUtils from '../../../utils/AnalyticsUtils.tsx'; /* Metro dependency 683 */
import Native from '../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import UseTheme from '../../../hooks/useTheme.tsx'; /* Metro dependency 4048 */
import CollectiblesCategoryStore from '../CollectiblesCategoryStore.tsx'; /* Metro dependency 5121 */
import UseAnalyticsLocations from '../../app_analytics/useAnalyticsLocations.tsx'; /* Metro dependency 6771 */
import AnalyticsLocation from '../../app_analytics/AnalyticsLocation.tsx'; /* Metro dependency 6789 */
import CollectiblesShopCardV2 from './CollectiblesShopCardV2.tsx'; /* Metro dependency 10020 */
import FramesEarlyAccessBadge from './FramesEarlyAccessBadge.tsx'; /* Metro dependency 10089 */
import VisibilitySensor from './VisibilitySensor.tsx'; /* Metro dependency 10155 */
import SkeletonCard from './SkeletonCard.tsx'; /* Metro dependency 14056 */
import UseGetProductsFromSkus from '../hooks/useGetProductsFromSkus.tsx'; /* Metro dependency 14058 */
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 CollectiblesShopConstantsModule from '../CollectiblesShopConstants.tsx'; /* Metro dependency 663 */
import * as UseNavigationNativeModule from '../../../design/components/Navigator/native/useNavigation.native.tsx'; /* Metro dependency 1484 */
import * as CreateStylesModule from '../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as TextModule from '../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as LayerScopeNativeModule from '../../../design/components/Layers/native/LayerScope.native.tsx'; /* Metro dependency 6517 */
import * as QuestContentModule from '../../../external/discord_common/js/shared/shared-constants/QuestContent.tsx'; /* Metro dependency 6533 */
import * as UseAnalyticsLocationsModule from '../../app_analytics/useAnalyticsLocations.tsx'; /* Metro dependency 6771 */
import * as CollectiblesShopCardV2Module from './CollectiblesShopCardV2.tsx'; /* Metro dependency 10020 */
import * as CollectiblesAnalyticsContextModule from '../CollectiblesAnalyticsContext.tsx'; /* Metro dependency 10023 */
import * as UseTrackProductCardImpressionModule from '../hooks/useTrackProductCardImpression.tsx'; /* Metro dependency 10154 */
import * as UseFilteredAndSortedProductsModule from './hooks/useFilteredAndSortedProducts.tsx'; /* Metro dependency 14049 */
import * as CollectiblesCoachmarkScrollDismissContextModule from './CollectiblesCoachmarkScrollDismissContext.tsx'; /* Metro dependency 14057 */
function _fun106582(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#106582, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14252:6, offset: 0x022e1367, size: 1123 bytes, params: 8, frame: 28
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
let value = ReactNativeModule;
const env0_4 = value.Image;
const env0_5 = value.View;
const collectiblesCategoryStore = importDefault(5121) /* metro dependency 5121: CollectiblesCategoryStore */;
const env0_7 = (require(663) /* metro dependency 663: CollectiblesShopConstants */).CollectiblesMobileShopScreen;
value = require(661) /* metro dependency 661: Constants */;
const env0_8 = value.AnalyticEvents;
const env0_9 = value.UserSettingsSections;
@@ -18,288 +41,387 @@ function _fun106582(global, require, importDefault, importAll, module, exports,
const env0_11 = value.jsx;
const env0_12 = value.Fragment;
const env0_13 = value.jsxs;
const COLLECTIBLES_SHOP_CARD_WIDTH = (require(10020) /* metro dependency 10020: CollectiblesShopCardV2 */).COLLECTIBLES_SHOP_CARD_WIDTH;
const COLLECTIBLES_SHOP_CARD_WIDTH = (CollectiblesShopCardV2Module).COLLECTIBLES_SHOP_CARD_WIDTH;
value = 0.75 * COLLECTIBLES_SHOP_CARD_WIDTH;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
object2 = {};
object2.heroContainer = {width: '100%'};
const object7 = {'position': 'absolute', 'top': null, 'left': 0, 'right': 0, 'paddingHorizontal': null,
const createStyles = CreateStylesModule.createStyles;
object = {};
object.heroContainer = {width: '100%'};
const object3 = {'position': 'absolute', 'top': null, 'left': 0, 'right': 0, 'paddingHorizontal': null,
'alignItems': 'flex-start', 'zIndex': 2};
let PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
object7.top = PX_24;
object3.top = PX_24;
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object7.paddingHorizontal = PX_16;
object2.framesBadgeContainer = object7;
const object8 = {'marginTop': -250, 'paddingTop': 240, 'paddingBottom': null, 'paddingHorizontal': null,
object3.paddingHorizontal = PX_16;
object.framesBadgeContainer = object3;
const object4 = {'marginTop': -250, 'paddingTop': 240, 'paddingBottom': null, 'paddingHorizontal': null,
'flexDirection': 'row', 'alignItems': 'center', 'borderRadius': null, 'overflow': 'hidden', 'zIndex': 0};
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object8.paddingBottom = PX_16;
object4.paddingBottom = PX_16;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object8.paddingHorizontal = PX_16;
object8.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
object2.framesBannerWrapper = object8;
const object9 = {'position': 'absolute', 'top': 0, 'left': 0, 'right': 0, 'bottom': 0, 'resizeMode': 'stretch'};
object9.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
object2.framesBannerBackgroundImage = object9;
const object10 = {flex: 1};
object4.paddingHorizontal = PX_16;
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
object.framesBannerWrapper = object4;
const object5 = {'position': 'absolute', 'top': 0, 'left': 0, 'right': 0, 'bottom': 0, 'resizeMode': 'stretch'};
object5.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
object.framesBannerBackgroundImage = object5;
const object6 = {flex: 1};
let PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object10.paddingRight = PX_4;
object6.paddingRight = PX_4;
PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
object10.marginTop = PX_24;
object2.framesBannerTextContainer = object10;
object6.marginTop = PX_24;
object.framesBannerTextContainer = object6;
PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object2.framesBannerTitle = {marginBottom: PX_4};
object.framesBannerTitle = {marginBottom: PX_4};
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object2.framesBannerForegroundImage = {'width': 125, 'height': 125, 'resizeMode': 'contain',
object.framesBannerForegroundImage = {'width': 125, 'height': 125, 'resizeMode': 'contain',
transform: [{translateY: PX_16}]};
object2.heroBannerContainer = {'position': 'absolute', 'top': 0, 'left': 0, 'width': '100%', 'maxHeight': null,
object.heroBannerContainer = {'position': 'absolute', 'top': 0, 'left': 0, 'width': '100%', 'maxHeight': null,
'aspectRatio': 1.4883720930232558, maxHeight: 240 + value};
object2.heroBannerImage = {'width': '100%', 'height': '100%', 'resizeMode': 'cover'};
object2.orbsBackgroundGradient = {'position': 'absolute', 'top': 0, 'left': 0, 'bottom': 0, 'right': 0};
object2.heroInfoContainer = {'display': 'flex', 'justifyContent': 'center', 'flex': 1, 'minWidth': '100%',
object.heroBannerImage = {'width': '100%', 'height': '100%', 'resizeMode': 'cover'};
object.orbsBackgroundGradient = {'position': 'absolute', 'top': 0, 'left': 0, 'bottom': 0, 'right': 0};
object.heroInfoContainer = {'display': 'flex', 'justifyContent': 'center', 'flex': 1, 'minWidth': '100%',
'maxHeight': 240, 'aspectRatio': 2.2};
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object2.innerContainer = {'flexDirection': 'row', 'alignItems': 'center', 'justifyContent': 'space-between',
object.innerContainer = {'flexDirection': 'row', 'alignItems': 'center', 'justifyContent': 'space-between',
'paddingHorizontal': null, 'width': '100%', 'height': '100%', paddingHorizontal: PX_16};
object2.heroLogoContainer = {'flex': 1, 'maxWidth': '80%', 'maxHeight': '80%'};
object2.heroLogo = {'resizeMode': 'contain', 'maxHeight': '100%', 'maxWidth': '100%', 'aspectRatio': 1};
const object11 = {};
object.heroLogoContainer = {'flex': 1, 'maxWidth': '80%', 'maxHeight': '80%'};
object.heroLogo = {'resizeMode': 'contain', 'maxHeight': '100%', 'maxWidth': '100%', 'aspectRatio': 1};
const object12 = {};
const CONTROL_OVERLAY_SECONDARY_BACKGROUND_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.CONTROL_OVERLAY_SECONDARY_BACKGROUND_DEFAULT;
object11.backgroundColor = CONTROL_OVERLAY_SECONDARY_BACKGROUND_DEFAULT;
object12.backgroundColor = CONTROL_OVERLAY_SECONDARY_BACKGROUND_DEFAULT;
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object11.padding = PX_8;
object11.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
object2.heroViewAllIcon = object11;
const object14 = {};
object12.padding = PX_8;
object12.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
object.heroViewAllIcon = object12;
const object13 = {};
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object14.paddingHorizontal = PX_16;
object14.alignItems = 'flex-start';
object13.paddingHorizontal = PX_16;
object13.alignItems = 'flex-start';
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object14.gap = PX_16;
object2.orbsInnerContainer = object14;
object2.orbsTitle = {'fontSize': 24, 'lineHeight': 30};
object2.productCardsContainer = {zIndex: 1};
const object16 = {flexDirection: 'row'};
object13.gap = PX_16;
object.orbsInnerContainer = object13;
object.orbsTitle = {'fontSize': 24, 'lineHeight': 30};
object.productCardsContainer = {zIndex: 1};
const object15 = {flexDirection: 'row'};
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object16.gap = PX_12;
object15.gap = PX_12;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object16.paddingHorizontal = PX_16;
object2.skeletonContainer = object16;
const env0_14 = Reflect.apply(createStyles, createStylesModule, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/FramesHeroBlock.tsx');
object15.paddingHorizontal = PX_16;
object.skeletonContainer = object15;
const env0_14 = Reflect.apply(createStyles, CreateStylesModule, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/native/FramesHeroBlock.tsx');
exports.default = _default_106585;
}
function SkeletonLoading({accessibilityLabel}) { // fn#106583, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14252:2274, offset: 0x022e17ca, size: 129 bytes, params: 2, frame: 17
const styles = useStyles();
const Array = global.Array;
return (
<View
style={styles.skeletonContainer}
accessibilityRole="list"
accessibilityLabel={accessibilityLabel}
accessibilityState={{busy: true}}
accessible
>
{Array.from({length: 10}).map(_fun106584)}
</View>
);
}
function _default_106585({heroBlock, bannerBlock, preferVCPrice, screen}) { // fn#106585, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14252:2555, offset: 0x022e1890, size: 2683 bytes, params: 2, frame: 49
var r21;
var r26;
var r14;
var length;
var jsxRuntimeEnv0_12Binding;
var PressableOpacity;
var object11;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var object;
var items4;
var items5;
var items6;
var FlashList;
var object27;
const COLLECTIBLES_SHOP_CARD_WIDTH = (require(10020) /* metro dependency 10020: CollectiblesShopCardV2 */).COLLECTIBLES_SHOP_CARD_WIDTH;
var space;
var PX_12;
var FeedProductList;
var object31;
const collectiblesCoachmarkScrollDismissContextModule = require(14057) /* metro dependency 14057: CollectiblesCoachmarkScrollDismissContext */;
const useCollectiblesCoachmarkScrollDismissContext = collectiblesCoachmarkScrollDismissContextModule.useCollectiblesCoachmarkScrollDismissContext;
const handleDismissCoachmarkOnScroll = Reflect.apply(useCollectiblesCoachmarkScrollDismissContext,
collectiblesCoachmarkScrollDismissContextModule, []).handleDismissCoachmarkOnScroll;
const env0_2 = (require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation();
const env0_3 = (require(10023) /* metro dependency 10023: CollectiblesAnalyticsContext */).useCollectiblesAnalyticsContext();
let r30 = heroBlock.mobileHeroUrl ?? heroBlock.heroBannerUrl;
const heroLogoUrl = heroBlock.heroLogoUrl;
const category = (require(566) /* metro dependency 566: flux */).useStateFromStores([CollectiblesCategoryStore],
function() {
return CollectiblesCategoryStore.getCategory(heroBlock.categorySkuId);
});
let r17 = category != null && category.isOrbsExclusive;
const value3 = (importDefault(4048) /* metro dependency 4048: useTheme */)();
const useTrackProductCardImpressionModule = require(10154) /* metro dependency 10154: useTrackProductCardImpression */;
const useTrackProductCardImpression = useTrackProductCardImpressionModule.useTrackProductCardImpression;
const handleCardVisibilityChange = Reflect.apply(useTrackProductCardImpression, useTrackProductCardImpressionModule,
[heroBlock.categoryStoreListingId, 'mobile_home', 'hero_block']).handleCardVisibilityChange;
const styles = useStyles();
const value6 = (require(14049) /* metro dependency 14049: useFilteredAndSortedProducts */).useFilteredAndSortedProducts({products: env0_3.useMemo(_fun106587,
[heroBlock.rankedSkuIds, (importDefault(14058) /* metro dependency 14058: useGetProductsFromSkus */)()]),
bypassAndroidUnsyncedFilter: r17});
const FEATURED_PAGE = CollectiblesMobileShopScreen.FEATURED_PAGE;
const env0_6 = screen === FEATURED_PAGE;
const defaultImport = importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */;
const COLLECTIBLES_SHOP_HERO = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).COLLECTIBLES_SHOP_HERO;
const analyticsLocations = defaultImport(COLLECTIBLES_SHOP_HERO).analyticsLocations;
if (category === undefined) {
return null;
}
const r32 = heroBlock.mobileTitle ?? heroBlock.title;
const r33 = heroBlock.mobileSummary ?? heroBlock.summary;
r30 = r17 ? (require(4002) /* metro dependency 4002: shared */).isThemeDark(value3) ? importDefault(14060) /* metro dependency 14060: header_darkJpg */ : importDefault(14061) /* metro dependency 14061: header_lightJpg */ : r30;
const AnalyticsLocationProvider = (require(6771) /* metro dependency 6771: useAnalyticsLocations */).AnalyticsLocationProvider;
const VisibilitySensor = importDefault(10155) /* metro dependency 10155: VisibilitySensor */;
const items2 = [<View style={styles.framesBadgeContainer}>{((Component) => <Component location="CollectiblesShop" disablePressable />)(importDefault(10089) /* metro dependency 10089: FramesEarlyAccessBadge */)}</View>];
items2[1] = <View style={styles.heroBannerContainer}>{r30 != null && <>{r17 && ((Component) => <Component colors={['rgba(39, 30, 173, 0.3)',
'transparent']} start={VerticalGradient.START} end={VerticalGradient.END} style={styles.orbsBackgroundGradient} />)(importDefault(4589) /* metro dependency 4589 */)}<Image style={[styles.heroBannerImage]} source={{uri: r30}} /></>}</View>;
if (r17) {
var viewBinding6Props = {style: styles.orbsInnerContainer};
r26 = r32 != null && <Text variant="display-md" color="mobile-text-heading-primary" style={styles.orbsTitle}>{r32}</Text>;
items5 = [r26];
r26 = r33 != null && r33 !== '';
r26 = r26 && <Text variant="text-md/medium">{r33}</Text>;
items5[1] = r26;
items6 = [<View>{items5}</View>];
items6[1] = ((Button) => <Button variant="tertiary" shrink grow={false} size="sm" text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.ynollq)} onPress={onPress_106588} />)((require(4578) /* metro dependency 4578: ButtonNative */).Button);
r14 = <View {...viewBinding6Props}>{items6}</View>;
} else {
PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
var pressableOpacityProps = {'accessibilityRole': 'button', 'accessibilityLabel': null,
'accessibilityHint': null,
'activeOpacity': 0.6, 'androidRippleConfig': null, 'hitSlop': 8,
accessibilityLabel: intl.formatToPlainString(t.FNtLb3, {category: category.name}),
accessibilityHint: intl.string(t.F8ma9x)};
object = {};
object.radius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
pressableOpacityProps.androidRippleConfig = object;
pressableOpacityProps.onPress = onPress_106589;
var viewBinding3Props = {style: styles.innerContainer};
items4 = [heroLogoUrl != null && <View style={styles.heroLogoContainer}><Image style={styles.heroLogo} source={{uri: heroLogoUrl}} /></View>];
items4[1] = <View style={styles.heroViewAllIcon}>{((ChevronSmallRightIcon) => <ChevronSmallRightIcon size="sm" color="white" />)((require(6818) /* metro dependency 6818: ChevronSmallRightIcon */).ChevronSmallRightIcon)}</View>;
r14 = <PressableOpacity {...pressableOpacityProps} key={category.storeListingId}><View {...viewBinding3Props}>{items4}</View></PressableOpacity>;
}
items2[2] = <View style={styles.heroInfoContainer}>{r14}</View>;
const LayerScope = (require(6517) /* metro dependency 6517: LayerScopeNative */).LayerScope;
if (r17) {
FeedProductList = importDefault(14062) /* metro dependency 14062: FeedProductList */;
length = value6.length;
length = length === 0 ? 4 : value6.length;
r17 = <FeedProductList products={value6} loadingCardsNum={length} preferVCPrice={preferVCPrice} accessibilityLabel={intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.FNtLb3,
{category: category.name})} />;
} else {
jsxRuntimeEnv0_12Binding = jsxRuntimeEnv0_12;
if (value6.length === 0) {
r21 = <SkeletonLoading accessibilityLabel={intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.FNtLb3,
{category: category.name})} />;
} else {
FlashList = (require(8416) /* metro dependency 8416: flashList */).FlashList;
var flashListProps = {'horizontal': true, 'accessibilityLabel': null, 'accessibilityRole': 'list',
accessibilityLabel: intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.FNtLb3,
{category: category.name}), data: value6, onScroll: handleDismissCoachmarkOnScroll,
renderItem: renderItem_106590, decelerationRate: 'fast'};
space = (importDefault(697) /* metro dependency 697: native */).space;
PX_12 = space.PX_12;
flashListProps.snapToInterval = COLLECTIBLES_SHOP_CARD_WIDTH + PX_12;
space = (importDefault(697) /* metro dependency 697: native */).space;
PX_12 = space.PX_12;
flashListProps.estimatedItemSize = COLLECTIBLES_SHOP_CARD_WIDTH + PX_12;
flashListProps.showsHorizontalScrollIndicator = false;
flashListProps.ListHeaderComponent = ListHeaderComponent;
flashListProps.ListFooterComponent = ListFooterComponent;
flashListProps.ItemSeparatorComponent = ItemSeparatorComponent;
r21 = <FlashList {...flashListProps} />;
function SkeletonLoading({accessibilityLabel}) { // fn#106583, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14252:2274, offset: 0x022e17ca, size: 129 bytes, params: 2, frame: 17
const styles = useStyles();
const Array = global.Array;
return (
<View
style={styles.skeletonContainer}
accessibilityRole="list"
accessibilityLabel={accessibilityLabel}
accessibilityState={{busy: true}}
accessible
>
{Array.from({length: 10}).map(_fun106584)}
</View>
);
function _fun106584(a0, a1) { // fn#106584, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14252:2476, offset: 0x022e184b, size: 69 bytes, params: 3, frame: 17
const COLLECTIBLES_SHOP_CARD_WIDTH = (CollectiblesShopCardV2Module).COLLECTIBLES_SHOP_CARD_WIDTH;
return <SkeletonCard width={COLLECTIBLES_SHOP_CARD_WIDTH} key={a1} />;
}
r17 = <>{r21}</>;
}
items2[3] = <View style={styles.productCardsContainer}><LayerScope>{r17}</LayerScope></View>;
const items7 = [bannerBlock.mobileBackgroundImage != null && <Image style={styles.framesBannerBackgroundImage} source={{uri: bannerBlock.mobileBackgroundImage}} />];
var Text = (require(4573) /* metro dependency 4573: Text */).Text;
items7[1] = <View style={styles.framesBannerTextContainer}><Text variant="text-lg/bold" color="control-overlay-secondary-text-default" style={styles.framesBannerTitle}>{bannerBlock.title}</Text><Text variant="text-sm/normal" color="control-overlay-secondary-text-default">{bannerBlock.body}</Text></View>;
items7[2] = bannerBlock.mobileForegroundImage != null && <Image style={styles.framesBannerForegroundImage} source={{uri: bannerBlock.mobileForegroundImage}} />;
items2[4] = <View style={styles.framesBannerWrapper}>{items7}</View>;
return (
<AnalyticsLocationProvider value={analyticsLocations}>
<VisibilitySensor onChange={handleCardVisibilityChange}>
<View style={styles.heroContainer}>
{items2}
function _default_106585({heroBlock, bannerBlock, preferVCPrice, screen}) { // fn#106585, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14252:2555, offset: 0x022e1890, size: 2683 bytes, params: 2, frame: 49
var r21;
var r26;
var r14;
var length;
var jsxRuntimeEnv0_12Binding;
var PressableOpacity;
var object;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var object5;
var items4;
var items5;
var items6;
var FlashList;
var object3;
const COLLECTIBLES_SHOP_CARD_WIDTH = (CollectiblesShopCardV2Module).COLLECTIBLES_SHOP_CARD_WIDTH;
var space;
var PX_12;
var FeedProductList;
var object4;
const useCollectiblesCoachmarkScrollDismissContext = CollectiblesCoachmarkScrollDismissContextModule.useCollectiblesCoachmarkScrollDismissContext;
const handleDismissCoachmarkOnScroll = Reflect.apply(useCollectiblesCoachmarkScrollDismissContext,
CollectiblesCoachmarkScrollDismissContextModule, []).handleDismissCoachmarkOnScroll;
const env0_2 = (UseNavigationNativeModule).useNavigation();
const env0_3 = (CollectiblesAnalyticsContextModule).useCollectiblesAnalyticsContext();
let r30 = heroBlock.mobileHeroUrl ?? heroBlock.heroBannerUrl;
const heroLogoUrl = heroBlock.heroLogoUrl;
const category = (require(566) /* metro dependency 566: flux */).useStateFromStores([CollectiblesCategoryStore],
function() {
return CollectiblesCategoryStore.getCategory(heroBlock.categorySkuId);
});
let r17 = category != null && category.isOrbsExclusive;
const value3 = (UseTheme)();
const useTrackProductCardImpression = UseTrackProductCardImpressionModule.useTrackProductCardImpression;
const handleCardVisibilityChange = Reflect.apply(useTrackProductCardImpression, UseTrackProductCardImpressionModule,
[heroBlock.categoryStoreListingId, 'mobile_home', 'hero_block']).handleCardVisibilityChange;
const styles = useStyles();
const value6 = (UseFilteredAndSortedProductsModule).useFilteredAndSortedProducts({products: env0_3.useMemo(_fun106587,
[heroBlock.rankedSkuIds, (UseGetProductsFromSkus)()]),
bypassAndroidUnsyncedFilter: r17});
const FEATURED_PAGE = CollectiblesMobileShopScreen.FEATURED_PAGE;
const env0_6 = screen === FEATURED_PAGE;
const defaultImport = UseAnalyticsLocations;
const COLLECTIBLES_SHOP_HERO = (AnalyticsLocation).COLLECTIBLES_SHOP_HERO;
const analyticsLocations = defaultImport(COLLECTIBLES_SHOP_HERO).analyticsLocations;
if (category === undefined) {
return null;
}
const r32 = heroBlock.mobileTitle ?? heroBlock.title;
const r33 = heroBlock.mobileSummary ?? heroBlock.summary;
r30 = r17 ? (require(4002) /* metro dependency 4002: shared */).isThemeDark(value3) ? importDefault(14060) /* metro dependency 14060: header_darkJpg */ : importDefault(14061) /* metro dependency 14061: header_lightJpg */ : r30;
const AnalyticsLocationProvider = (UseAnalyticsLocationsModule).AnalyticsLocationProvider;
const items2 = [
<View style={styles.framesBadgeContainer}>
{((Component) => <Component location="CollectiblesShop" disablePressable />)(FramesEarlyAccessBadge)}
</View>,
];
items2[1] = (
<View style={styles.heroBannerContainer}>
{r30 != null && <>{r17 && ((Component) => <Component colors={['rgba(39, 30, 173, 0.3)',
'transparent']} start={VerticalGradient.START} end={VerticalGradient.END} style={styles.orbsBackgroundGradient} />)(importDefault(4589) /* metro dependency 4589 */)}<Image style={[styles.heroBannerImage]} source={{uri: r30}} /></>}
</View>
);
if (r17) {
var viewBinding6Props = {style: styles.orbsInnerContainer};
r26 = r32 != null && <Text variant="display-md" color="mobile-text-heading-primary" style={styles.orbsTitle}>{r32}</Text>;
items5 = [r26];
r26 = r33 != null && r33 !== '';
r26 = r26 && <Text variant="text-md/medium">{r33}</Text>;
items5[1] = r26;
items6 = [
<View>
{items5}
</View>,
];
items6[1] = ((Button) => <Button variant="tertiary" shrink grow={false} size="sm" text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.ynollq)} onPress={onPress_106588} />)((require(4578) /* metro dependency 4578: ButtonNative */).Button);
r14 = (
<View {...viewBinding6Props}>
{items6}
</View>
</VisibilitySensor>
</AnalyticsLocationProvider>
);
}
);
} else {
PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
var pressableOpacityProps = {'accessibilityRole': 'button', 'accessibilityLabel': null,
'accessibilityHint': null,
'activeOpacity': 0.6, 'androidRippleConfig': null, 'hitSlop': 8,
accessibilityLabel: intl.formatToPlainString(t.FNtLb3, {category: category.name}),
accessibilityHint: intl.string(t.F8ma9x)};
object5 = {};
object5.radius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
pressableOpacityProps.androidRippleConfig = object5;
pressableOpacityProps.onPress = onPress_106589;
var viewBinding3Props = {style: styles.innerContainer};
items4 = [
heroLogoUrl != null && <View style={styles.heroLogoContainer}><Image style={styles.heroLogo} source={{uri: heroLogoUrl}} /></View>,
];
items4[1] = (
<View style={styles.heroViewAllIcon}>
{((ChevronSmallRightIcon) => <ChevronSmallRightIcon size="sm" color="white" />)((require(6818) /* metro dependency 6818: ChevronSmallRightIcon */).ChevronSmallRightIcon)}
</View>
);
r14 = (
<PressableOpacity {...pressableOpacityProps} key={category.storeListingId}>
<View {...viewBinding3Props}>
{items4}
</View>
</PressableOpacity>
);
}
items2[2] = (
<View style={styles.heroInfoContainer}>
{r14}
</View>
);
const LayerScope = (LayerScopeNativeModule).LayerScope;
if (r17) {
FeedProductList = importDefault(14062) /* metro dependency 14062: FeedProductList */;
length = value6.length;
length = length === 0 ? 4 : value6.length;
r17 = (
<FeedProductList
products={value6}
loadingCardsNum={length}
preferVCPrice={preferVCPrice}
accessibilityLabel={intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.FNtLb3,
{category: category.name})}
/>
);
} else {
jsxRuntimeEnv0_12Binding = jsxRuntimeEnv0_12;
if (value6.length === 0) {
r21 = (
<SkeletonLoading
accessibilityLabel={intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.FNtLb3,
{category: category.name})}
/>
);
} else {
FlashList = (require(8416) /* metro dependency 8416: flashList */).FlashList;
var flashListProps = {'horizontal': true, 'accessibilityLabel': null, 'accessibilityRole': 'list',
accessibilityLabel: intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.FNtLb3,
{category: category.name}), data: value6, onScroll: handleDismissCoachmarkOnScroll,
renderItem: renderItem_106590, decelerationRate: 'fast'};
space = (importDefault(697) /* metro dependency 697: native */).space;
PX_12 = space.PX_12;
flashListProps.snapToInterval = COLLECTIBLES_SHOP_CARD_WIDTH + PX_12;
space = (importDefault(697) /* metro dependency 697: native */).space;
PX_12 = space.PX_12;
flashListProps.estimatedItemSize = COLLECTIBLES_SHOP_CARD_WIDTH + PX_12;
flashListProps.showsHorizontalScrollIndicator = false;
flashListProps.ListHeaderComponent = ListHeaderComponent_106591;
flashListProps.ListFooterComponent = ListFooterComponent_106592;
flashListProps.ItemSeparatorComponent = ItemSeparatorComponent_106593;
r21 = <FlashList {...flashListProps} />;
}
r17 = (
<>
{r21}
</>
);
}
items2[3] = (
<View style={styles.productCardsContainer}>
<LayerScope>
{r17}
</LayerScope>
</View>
);
const items7 = [
bannerBlock.mobileBackgroundImage != null && <Image style={styles.framesBannerBackgroundImage} source={{uri: bannerBlock.mobileBackgroundImage}} />,
];
var Text = (TextModule).Text;
items7[1] = (
<View style={styles.framesBannerTextContainer}>
<Text
variant="text-lg/bold"
color="control-overlay-secondary-text-default"
style={styles.framesBannerTitle}
>
{bannerBlock.title}
</Text>
<Text variant="text-sm/normal" color="control-overlay-secondary-text-default">
{bannerBlock.body}
</Text>
</View>
);
items7[2] = bannerBlock.mobileForegroundImage != null && <Image style={styles.framesBannerForegroundImage} source={{uri: bannerBlock.mobileForegroundImage}} />;
items2[4] = (
<View style={styles.framesBannerWrapper}>
{items7}
</View>
);
return (
<AnalyticsLocationProvider value={analyticsLocations}>
<VisibilitySensor onChange={handleCardVisibilityChange}>
<View style={styles.heroContainer}>
{items2}
</View>
</VisibilitySensor>
</AnalyticsLocationProvider>
);
function _fun106587() { // fn#106587, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14252:3108, offset: 0x022e232c, size: 26 bytes, params: 1, frame: 11
return env0_5(heroBlock.rankedSkuIds);
}
function _default_106585OnPress() { // fn#106588, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14252:4376, owner: _default_106585.onPress, offset: 0x022e2346, size: 76 bytes, params: 1, frame: 15
let value = environment.__proto__;
value = require(9480) /* metro dependency 9480: QuestUtilsNative */;
const openQuestHome = value.openQuestHome;
const QuestContent = (require(6533) /* metro dependency 6533: QuestContent */).QuestContent;
const ORBS_SHOP_HERO_CTA = QuestContent.ORBS_SHOP_HERO_CTA;
Reflect.apply(openQuestHome, value, [{mergeExistingRoutes: true, fromContent: ORBS_SHOP_HERO_CTA}]);
}
function _default_106585OnPress() { // fn#106588, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14252:4376, owner: _default_106585.onPress, offset: 0x022e2346, size: 76 bytes, params: 1, frame: 15
let value = environment.__proto__;
value = require(9480) /* metro dependency 9480: QuestUtilsNative */;
const openQuestHome = value.openQuestHome;
const QuestContent = (QuestContentModule).QuestContent;
const ORBS_SHOP_HERO_CTA = QuestContent.ORBS_SHOP_HERO_CTA;
Reflect.apply(openQuestHome, value, [{mergeExistingRoutes: true, fromContent: ORBS_SHOP_HERO_CTA}]);
}
function _default_106585OnPress_106589() { // fn#106589, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14252:4774, owner: _default_106585.onPress, offset: 0x022e2392, size: 266 bytes, params: 1, frame: 21
const categoryBinding = category;
const value3 = undefined;
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
const track = defaultImport.track;
const COLLECTIBLES_SHOP_ELEMENT_CLICKED = AnalyticEvents.COLLECTIBLES_SHOP_ELEMENT_CLICKED;
const object2 = {};
object2.collectibles_shop_session_id = env0_3 == null ? value3 : env0_3.sessionId;
object2.sku_id = heroBlock.categoryStoreListingId;
object2.page_type = 'mobile_home';
object2.page_section = env0_3 == null ? value3 : env0_3.pageSection;
object2.page_category = env0_3 == null ? value3 : env0_3.pageCategory;
object2.tile_type = 'HERO_BLOCK';
const String = global.String;
object2.tile_position = String(env0_3 == null ? value3 : env0_3.tilePosition);
object2.cta_name = null;
Reflect.apply(track, defaultImport, [COLLECTIBLES_SHOP_ELEMENT_CLICKED, object2]);
const binding = env0_2;
const push = binding.push;
const COLLECTIBLES_SHOP_VIEW_ALL_CATEGORY_ITEMS = UserSettingsSections.COLLECTIBLES_SHOP_VIEW_ALL_CATEGORY_ITEMS;
Reflect.apply(push, binding, [COLLECTIBLES_SHOP_VIEW_ALL_CATEGORY_ITEMS, {category: categoryBinding,
analyticsContext: env0_3}]);
return value3;
}
function _default_106585OnPress_106589() { // fn#106589, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14252:4774, owner: _default_106585.onPress, offset: 0x022e2392, size: 266 bytes, params: 1, frame: 21
const categoryBinding = category;
const value3 = undefined;
const defaultImport = AnalyticsUtils;
const track = defaultImport.track;
const COLLECTIBLES_SHOP_ELEMENT_CLICKED = AnalyticEvents.COLLECTIBLES_SHOP_ELEMENT_CLICKED;
const object = {};
object.collectibles_shop_session_id = env0_3 == null ? value3 : env0_3.sessionId;
object.sku_id = heroBlock.categoryStoreListingId;
object.page_type = 'mobile_home';
object.page_section = env0_3 == null ? value3 : env0_3.pageSection;
object.page_category = env0_3 == null ? value3 : env0_3.pageCategory;
object.tile_type = 'HERO_BLOCK';
const String = global.String;
object.tile_position = String(env0_3 == null ? value3 : env0_3.tilePosition);
object.cta_name = null;
Reflect.apply(track, defaultImport, [COLLECTIBLES_SHOP_ELEMENT_CLICKED, object]);
const binding = env0_2;
const push = binding.push;
const COLLECTIBLES_SHOP_VIEW_ALL_CATEGORY_ITEMS = UserSettingsSections.COLLECTIBLES_SHOP_VIEW_ALL_CATEGORY_ITEMS;
Reflect.apply(push, binding, [COLLECTIBLES_SHOP_VIEW_ALL_CATEGORY_ITEMS, {category: categoryBinding,
analyticsContext: env0_3}]);
return value3;
}
function _default_106585RenderItem({item, index}) { // fn#106590, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14252:6041, owner: _default_106585.renderItem, offset: 0x022e249c, size: 198 bytes, params: 2, frame: 21
var r5;
let value = environment.__proto__;
const value3 = ((Component) => <Component solidBackground product={item} unpublishedAt={category.unpublishedAt} preferVCPrice={preferVCPrice} />)(CollectiblesShopCardV2);
const CollectiblesAnalyticsProvider = (CollectiblesAnalyticsContextModule).CollectiblesAnalyticsProvider;
const object2 = {tilePosition: index};
if (index !== 0) {
r5 = value3;
} else if (env0_6) {
value = importDefault(14065) /* metro dependency 14065: FeaturedFirstCardCoachmarkAnchor */;
value = ((Component) => <Component>{value3}</Component>)(value);
r5 = value;
} else {
r5 = value3;
}
return (
<CollectiblesAnalyticsProvider newValue={object2} key={item.skuId}>
{r5}
</CollectiblesAnalyticsProvider>
);
}
function _default_106585ListHeaderComponent() { // fn#106591, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14252:6512, owner: _default_106585.ListHeaderComponent, offset: 0x022e2562, size: 63 bytes, params: 1, frame: 16
const PX_16 = (Native).space.PX_16;
return <View style={{width: PX_16}} />;
}
function _default_106585ListFooterComponent() { // fn#106592, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14252:6577, owner: _default_106585.ListFooterComponent, offset: 0x022e2562, size: 63 bytes, params: 1, frame: 16
const PX_16 = (Native).space.PX_16;
return <View style={{width: PX_16}} />;
}
function _default_106585ItemSeparatorComponent() { // fn#106593, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14252:6645, owner: _default_106585.ItemSeparatorComponent, offset: 0x022e25a1, size: 64 bytes, params: 1, frame: 16
const PX_12 = (Native).space.PX_12;
return <View style={{width: PX_12}} />;
}
function _default_106585RenderItem({item, index}) { // fn#106590, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14252:6041, owner: _default_106585.renderItem, offset: 0x022e249c, size: 198 bytes, params: 2, frame: 21
var r5;
let value = environment.__proto__;
const value3 = ((Component) => <Component solidBackground product={item} unpublishedAt={category.unpublishedAt} preferVCPrice={preferVCPrice} />)(importDefault(10020) /* metro dependency 10020: CollectiblesShopCardV2 */);
const CollectiblesAnalyticsProvider = (require(10023) /* metro dependency 10023: CollectiblesAnalyticsContext */).CollectiblesAnalyticsProvider;
const object = {tilePosition: index};
if (index !== 0) {
r5 = value3;
} else if (env0_6) {
value = importDefault(14065) /* metro dependency 14065: FeaturedFirstCardCoachmarkAnchor */;
value = ((Component) => <Component>{value3}</Component>)(value);
r5 = value;
} else {
r5 = value3;
}
return (
<CollectiblesAnalyticsProvider newValue={object} key={item.skuId}>
{r5}
</CollectiblesAnalyticsProvider>
);
}
global.__d(_fun106582, 14055, [31, 27, 5121, 663, 661, 33, 10020, 4501, 697, 14056, 14057, 1484, 10023, 566, 4048,
10154, 14058, 14049, 6771, 6789, 683, 4002, 14060, 14061, 10155, 10089, 4589, 4573, 4578, 1244, 9480, 6533,
5278, 6818, 6517, 14062, 8416, 14065,
2]) /* metro module 14055, dependencies: [31, 27, 5121, 663, 661, 33, 10020, 4501, 697, 14056, 14057, 1484, 10023, 566, 4048, 10154, 14058, 14049, 6771, 6789, 683, 4002, 14060, 14061, 10155, 10089, 4589, 4573, 4578, 1244, 9480, 6533, 5278, 6818, 6517, 14062, 8416, 14065, 2] */;
@@ -1,11 +1,21 @@
/* Metro module 14077; source: modules/collectibles/native/FramesProductShelfBlock.tsx; dependencies: [31, 27, 33, 4501, 697, 14057, 6771, 6789, 14058, 14049, 10023, 10020, 10089, 4573, 6517, 8416, 2] */
import UseAnalyticsLocations from '../../app_analytics/useAnalyticsLocations.tsx'; /* Metro dependency 6771 */
import AnalyticsLocation from '../../app_analytics/AnalyticsLocation.tsx'; /* Metro dependency 6789 */
import CollectiblesShopCardV2 from './CollectiblesShopCardV2.tsx'; /* Metro dependency 10020 */
import UseGetProductsFromSkus from '../hooks/useGetProductsFromSkus.tsx'; /* Metro dependency 14058 */
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 CollectiblesShopCardV2Module from './CollectiblesShopCardV2.tsx'; /* Metro dependency 10020 */
import * as CollectiblesAnalyticsContextModule from '../CollectiblesAnalyticsContext.tsx'; /* Metro dependency 10023 */
import * as UseFilteredAndSortedProductsModule from './hooks/useFilteredAndSortedProducts.tsx'; /* Metro dependency 14049 */
import * as CollectiblesCoachmarkScrollDismissContextModule from './CollectiblesCoachmarkScrollDismissContext.tsx'; /* Metro dependency 14057 */
function _fun106679(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#106679, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14274:6, offset: 0x022e6333, size: 504 bytes, params: 8, frame: 23
var object4;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
let value = ReactNativeModule;
const env0_4 = value.Image;
const env0_5 = value.View;
value = require(33) /* metro dependency 33 */;
@@ -13,108 +23,149 @@ function _fun106679(global, require, importDefault, importAll, module, exports,
const env0_7 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object4 = {};
const object5 = {width: '100%'};
object = {};
const object2 = {width: '100%'};
let PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
object5.marginTop = PX_24;
object2.marginTop = PX_24;
PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
object5.paddingTop = PX_24;
object2.paddingTop = PX_24;
PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
object5.paddingBottom = PX_24;
object5.overflow = 'hidden';
object4.container = object5;
object4.backgroundImage = {'position': 'absolute', 'top': 0, 'left': 0, 'bottom': 0, 'minWidth': '100%',
object2.paddingBottom = PX_24;
object2.overflow = 'hidden';
object.container = object2;
object.backgroundImage = {'position': 'absolute', 'top': 0, 'left': 0, 'bottom': 0, 'minWidth': '100%',
'aspectRatio': 2.5, 'resizeMode': 'cover'};
const object6 = {};
const object3 = {};
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object6.paddingHorizontal = PX_16;
object3.paddingHorizontal = PX_16;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object6.marginBottom = PX_16;
object3.marginBottom = PX_16;
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object6.gap = PX_8;
object6.alignItems = 'flex-start';
object6.zIndex = 1;
object4.header = object6;
object3.gap = PX_8;
object3.alignItems = 'flex-start';
object3.zIndex = 1;
object.header = object3;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object4.listEdgeSpacer = {width: PX_16};
object.listEdgeSpacer = {width: PX_16};
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object4.listItemSeparator = {width: PX_12};
const env0_8 = Reflect.apply(createStyles, value, [object4]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/FramesProductShelfBlock.tsx');
object.listItemSeparator = {width: PX_12};
const env0_8 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/native/FramesProductShelfBlock.tsx');
exports.default = _default_106682;
}
function ListEdgeSpacer() { // fn#106680, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14274:677, offset: 0x022e652b, size: 41 bytes, params: 1, frame: 14
const styles = useStyles();
return <View style={styles.listEdgeSpacer} />;
}
function ListItemSeparator() { // fn#106681, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14274:748, offset: 0x022e6554, size: 41 bytes, params: 1, frame: 14
const styles = useStyles();
return <View style={styles.listItemSeparator} />;
}
function _default_106682({block, preferVCPrice}) { // fn#106682, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14274:813, offset: 0x022e657d, size: 762 bytes, params: 2, frame: 35
var r0;
var AnalyticsLocationProvider;
var items3;
var items2;
var Text;
var title;
var LayerScope;
var FlashList;
var object8;
const COLLECTIBLES_SHOP_CARD_WIDTH = (require(10020) /* metro dependency 10020: CollectiblesShopCardV2 */).COLLECTIBLES_SHOP_CARD_WIDTH;
const styles = useStyles();
const collectiblesCoachmarkScrollDismissContextModule = require(14057) /* metro dependency 14057: CollectiblesCoachmarkScrollDismissContext */;
const useCollectiblesCoachmarkScrollDismissContext = collectiblesCoachmarkScrollDismissContextModule.useCollectiblesCoachmarkScrollDismissContext;
const handleDismissCoachmarkOnScroll = Reflect.apply(useCollectiblesCoachmarkScrollDismissContext,
collectiblesCoachmarkScrollDismissContextModule, []).handleDismissCoachmarkOnScroll;
const defaultImport = importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */;
const COLLECTIBLES_SHOP_SHELF = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).COLLECTIBLES_SHOP_SHELF;
const analyticsLocations = defaultImport(COLLECTIBLES_SHOP_SHELF).analyticsLocations;
const value2 = (importDefault(14058) /* metro dependency 14058: useGetProductsFromSkus */)();
const binding = env0_3;
const useMemo = binding.useMemo;
let object = [block.rankedSkuIds, value2];
const value4 = (require(14049) /* metro dependency 14049: useFilteredAndSortedProducts */).useFilteredAndSortedProducts({products: Reflect.apply(useMemo,
binding, [_fun106683, object])});
if (value4.length === 0) {
r0 = null;
} else {
AnalyticsLocationProvider = (require(6771) /* metro dependency 6771: useAnalyticsLocations */).AnalyticsLocationProvider;
object = {value: analyticsLocations};
var viewBindingProps = {style: styles.container};
items3 = [block.mobileBackgroundImage != null && <Image style={styles.backgroundImage} source={{uri: block.mobileBackgroundImage}} />];
var viewBinding2Props = {style: styles.header};
items2 = [((Component) => <Component location="FramesProductShelfBlock" tooltipPosition="bottom" />)(importDefault(10089) /* metro dependency 10089: FramesEarlyAccessBadge */)];
Text = (require(4573) /* metro dependency 4573: Text */).Text;
title = block.title;
items2[1] = <Text variant="text-sm/semibold" color="always-white">{title}</Text>;
items3[1] = <View {...viewBinding2Props}>{items2}</View>;
LayerScope = (require(6517) /* metro dependency 6517: LayerScopeNative */).LayerScope;
FlashList = (require(8416) /* metro dependency 8416: flashList */).FlashList;
title = block.title;
items3[2] = <LayerScope><FlashList horizontal accessibilityRole="list" accessibilityLabel={title} data={value4} keyExtractor={binding.useCallback(function(a0) {
return a0.skuId;
}, [])} onScroll={handleDismissCoachmarkOnScroll} renderItem={binding.useCallback(_fun106684,
[preferVCPrice])} decelerationRate="fast" snapToInterval={COLLECTIBLES_SHOP_CARD_WIDTH + (importDefault(697) /* metro dependency 697: native */).space.PX_12} estimatedItemSize={COLLECTIBLES_SHOP_CARD_WIDTH} showsHorizontalScrollIndicator={false} ListHeaderComponent={ListEdgeSpacer} ListFooterComponent={ListEdgeSpacer} ItemSeparatorComponent={ListItemSeparator} /></LayerScope>;
r0 = <AnalyticsLocationProvider {...object}><View {...viewBindingProps}>{items3}</View></AnalyticsLocationProvider>;
function ListEdgeSpacer() { // fn#106680, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14274:677, offset: 0x022e652b, size: 41 bytes, params: 1, frame: 14
const styles = useStyles();
return <View style={styles.listEdgeSpacer} />;
}
return r0;
}
function _fun106683() { // fn#106683, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14274:1028, offset: 0x022e6877, size: 26 bytes, params: 1, frame: 11
return env0_2(block.rankedSkuIds);
}
function _fun106684({item, index}) { // fn#106684, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14274:1141, offset: 0x022e6891, size: 115 bytes, params: 2, frame: 18
const value = environment.__proto__;
const CollectiblesAnalyticsProvider = (require(10023) /* metro dependency 10023: CollectiblesAnalyticsContext */).CollectiblesAnalyticsProvider;
return (
<CollectiblesAnalyticsProvider newValue={{tilePosition: index}}>
{((Component) => <Component product={item} preferVCPrice={preferVCPrice} />)(importDefault(10020) /* metro dependency 10020: CollectiblesShopCardV2 */)}
</CollectiblesAnalyticsProvider>
);
function ListItemSeparator() { // fn#106681, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14274:748, offset: 0x022e6554, size: 41 bytes, params: 1, frame: 14
const styles = useStyles();
return <View style={styles.listItemSeparator} />;
}
function _default_106682({block, preferVCPrice}) { // fn#106682, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14274:813, offset: 0x022e657d, size: 762 bytes, params: 2, frame: 35
var r0;
var AnalyticsLocationProvider;
var items3;
var items2;
var Text;
var title;
var LayerScope;
var FlashList;
var object2;
const COLLECTIBLES_SHOP_CARD_WIDTH = (CollectiblesShopCardV2Module).COLLECTIBLES_SHOP_CARD_WIDTH;
const styles = useStyles();
const useCollectiblesCoachmarkScrollDismissContext = CollectiblesCoachmarkScrollDismissContextModule.useCollectiblesCoachmarkScrollDismissContext;
const handleDismissCoachmarkOnScroll = Reflect.apply(useCollectiblesCoachmarkScrollDismissContext,
CollectiblesCoachmarkScrollDismissContextModule, []).handleDismissCoachmarkOnScroll;
const defaultImport = UseAnalyticsLocations;
const COLLECTIBLES_SHOP_SHELF = (AnalyticsLocation).COLLECTIBLES_SHOP_SHELF;
const analyticsLocations = defaultImport(COLLECTIBLES_SHOP_SHELF).analyticsLocations;
const value2 = (UseGetProductsFromSkus)();
const useMemo = ReactModule.useMemo;
let object = [block.rankedSkuIds, value2];
const value4 = (UseFilteredAndSortedProductsModule).useFilteredAndSortedProducts({products: Reflect.apply(useMemo,
ReactModule, [_fun106683, object])});
if (value4.length === 0) {
r0 = null;
} else {
AnalyticsLocationProvider = (require(6771) /* metro dependency 6771: useAnalyticsLocations */).AnalyticsLocationProvider;
object = {value: analyticsLocations};
var viewBindingProps = {style: styles.container};
items3 = [
block.mobileBackgroundImage != null && <Image style={styles.backgroundImage} source={{uri: block.mobileBackgroundImage}} />,
];
var viewBinding2Props = {style: styles.header};
items2 = [
((Component) => <Component location="FramesProductShelfBlock" tooltipPosition="bottom" />)(importDefault(10089) /* metro dependency 10089: FramesEarlyAccessBadge */),
];
Text = (require(4573) /* metro dependency 4573: Text */).Text;
title = block.title;
items2[1] = (
<Text variant="text-sm/semibold" color="always-white">
{title}
</Text>
);
items3[1] = (
<View {...viewBinding2Props}>
{items2}
</View>
);
LayerScope = (require(6517) /* metro dependency 6517: LayerScopeNative */).LayerScope;
FlashList = (require(8416) /* metro dependency 8416: flashList */).FlashList;
title = block.title;
items3[2] = (
<LayerScope>
<FlashList
horizontal
accessibilityRole="list"
accessibilityLabel={title}
data={value4}
keyExtractor={ReactModule.useCallback(function(a0) {
return a0.skuId;
}, [])}
onScroll={handleDismissCoachmarkOnScroll}
renderItem={ReactModule.useCallback(_fun106684, [preferVCPrice])}
decelerationRate="fast"
snapToInterval={COLLECTIBLES_SHOP_CARD_WIDTH + (importDefault(697) /* metro dependency 697: native */).space.PX_12}
estimatedItemSize={COLLECTIBLES_SHOP_CARD_WIDTH}
showsHorizontalScrollIndicator={false}
ListHeaderComponent={ListEdgeSpacer}
ListFooterComponent={ListEdgeSpacer}
ItemSeparatorComponent={ListItemSeparator}
/>
</LayerScope>
);
r0 = (
<AnalyticsLocationProvider {...object}>
<View {...viewBindingProps}>
{items3}
</View>
</AnalyticsLocationProvider>
);
}
return r0;
function _fun106683() { // fn#106683, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14274:1028, offset: 0x022e6877, size: 26 bytes, params: 1, frame: 11
return env0_2(block.rankedSkuIds);
}
function _fun106684({item, index}) { // fn#106684, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14274:1141, offset: 0x022e6891, size: 115 bytes, params: 2, frame: 18
const value = environment.__proto__;
const CollectiblesAnalyticsProvider = (CollectiblesAnalyticsContextModule).CollectiblesAnalyticsProvider;
return (
<CollectiblesAnalyticsProvider newValue={{tilePosition: index}}>
{((Component) => <Component product={item} preferVCPrice={preferVCPrice} />)(CollectiblesShopCardV2)}
</CollectiblesAnalyticsProvider>
);
}
}
}
global.__d(_fun106679, 14077, [31, 27, 33, 4501, 697, 14057, 6771, 6789, 14058, 14049, 10023, 10020, 10089, 4573,
6517, 8416,
2]) /* metro module 14077, dependencies: [31, 27, 33, 4501, 697, 14057, 6771, 6789, 14058, 14049, 10023, 10020, 10089, 4573, 6517, 8416, 2] */;
+362 -260
View File
@@ -1,15 +1,38 @@
/* Metro module 14067; source: modules/collectibles/native/HeroBlock.tsx; dependencies: [31, 27, 5121, 663, 661, 33, 10020, 4501, 697, 14056, 14057, 1484, 10023, 566, 4048, 10154, 3860, 4000, 14058, 14049, 6771, 6789, 683, 4002, 14060, 14061, 10155, 4589, 4573, 4578, 1244, 9480, 6533, 5278, 6818, 6517, 14062, 8416, 14065, 2] */
import AnalyticsUtils from '../../../utils/AnalyticsUtils.tsx'; /* Metro dependency 683 */
import Native from '../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import UseTheme from '../../../hooks/useTheme.tsx'; /* Metro dependency 4048 */
import CollectiblesCategoryStore from '../CollectiblesCategoryStore.tsx'; /* Metro dependency 5121 */
import UseAnalyticsLocations from '../../app_analytics/useAnalyticsLocations.tsx'; /* Metro dependency 6771 */
import AnalyticsLocation from '../../app_analytics/AnalyticsLocation.tsx'; /* Metro dependency 6789 */
import CollectiblesShopCardV2 from './CollectiblesShopCardV2.tsx'; /* Metro dependency 10020 */
import VisibilitySensor from './VisibilitySensor.tsx'; /* Metro dependency 10155 */
import SkeletonCard from './SkeletonCard.tsx'; /* Metro dependency 14056 */
import UseGetProductsFromSkus from '../hooks/useGetProductsFromSkus.tsx'; /* Metro dependency 14058 */
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 CollectiblesShopConstantsModule from '../CollectiblesShopConstants.tsx'; /* Metro dependency 663 */
import * as UseNavigationNativeModule from '../../../design/components/Navigator/native/useNavigation.native.tsx'; /* Metro dependency 1484 */
import * as UseTokenModule from '../../../design/tokens/native/useToken.tsx'; /* Metro dependency 3860 */
import * as ColorUtilsModule from '../../../utils/ColorUtils.tsx'; /* Metro dependency 4000 */
import * as CreateStylesModule from '../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as LayerScopeNativeModule from '../../../design/components/Layers/native/LayerScope.native.tsx'; /* Metro dependency 6517 */
import * as QuestContentModule from '../../../external/discord_common/js/shared/shared-constants/QuestContent.tsx'; /* Metro dependency 6533 */
import * as UseAnalyticsLocationsModule from '../../app_analytics/useAnalyticsLocations.tsx'; /* Metro dependency 6771 */
import * as CollectiblesShopCardV2Module from './CollectiblesShopCardV2.tsx'; /* Metro dependency 10020 */
import * as CollectiblesAnalyticsContextModule from '../CollectiblesAnalyticsContext.tsx'; /* Metro dependency 10023 */
import * as UseTrackProductCardImpressionModule from '../hooks/useTrackProductCardImpression.tsx'; /* Metro dependency 10154 */
import * as UseFilteredAndSortedProductsModule from './hooks/useFilteredAndSortedProducts.tsx'; /* Metro dependency 14049 */
import * as CollectiblesCoachmarkScrollDismissContextModule from './CollectiblesCoachmarkScrollDismissContext.tsx'; /* Metro dependency 14057 */
function _fun106642(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#106642, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14264:6, offset: 0x022e3c6a, size: 786 bytes, params: 8, frame: 24
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
let value = ReactNativeModule;
const env0_4 = value.Image;
const env0_5 = value.View;
const collectiblesCategoryStore = importDefault(5121) /* metro dependency 5121: CollectiblesCategoryStore */;
const env0_7 = (require(663) /* metro dependency 663: CollectiblesShopConstants */).CollectiblesMobileShopScreen;
value = require(661) /* metro dependency 661: Constants */;
const env0_8 = value.AnalyticEvents;
const env0_9 = value.UserSettingsSections;
@@ -18,279 +41,358 @@ function _fun106642(global, require, importDefault, importAll, module, exports,
const env0_11 = value.jsx;
const env0_12 = value.Fragment;
const env0_13 = value.jsxs;
const COLLECTIBLES_SHOP_CARD_WIDTH = (require(10020) /* metro dependency 10020: CollectiblesShopCardV2 */).COLLECTIBLES_SHOP_CARD_WIDTH;
const COLLECTIBLES_SHOP_CARD_WIDTH = (CollectiblesShopCardV2Module).COLLECTIBLES_SHOP_CARD_WIDTH;
value = 0.75 * COLLECTIBLES_SHOP_CARD_WIDTH;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
object2 = {};
object2.heroContainer = {width: '100%'};
object2.heroBannerContainer = {'position': 'absolute', 'top': 0, 'left': 0, 'width': '100%', 'maxHeight': null,
const createStyles = CreateStylesModule.createStyles;
object = {};
object.heroContainer = {width: '100%'};
object.heroBannerContainer = {'position': 'absolute', 'top': 0, 'left': 0, 'width': '100%', 'maxHeight': null,
'aspectRatio': 1.4883720930232558, maxHeight: 240 + value};
object2.heroBannerImage = {'width': '100%', 'height': '100%', 'resizeMode': 'cover'};
object2.orbsBackgroundGradient = {'position': 'absolute', 'top': 0, 'left': 0, 'bottom': 0, 'right': 0};
object2.fadeOutGradient = {'position': 'absolute', 'bottom': 0, 'height': '50%', 'width': '100%', 'zIndex': 1};
object2.heroInfoContainer = {'display': 'flex', 'justifyContent': 'center', 'flex': 1, 'minWidth': '100%',
object.heroBannerImage = {'width': '100%', 'height': '100%', 'resizeMode': 'cover'};
object.orbsBackgroundGradient = {'position': 'absolute', 'top': 0, 'left': 0, 'bottom': 0, 'right': 0};
object.fadeOutGradient = {'position': 'absolute', 'bottom': 0, 'height': '50%', 'width': '100%', 'zIndex': 1};
object.heroInfoContainer = {'display': 'flex', 'justifyContent': 'center', 'flex': 1, 'minWidth': '100%',
'maxHeight': 240, 'aspectRatio': 2.2};
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object2.innerContainer = {'flexDirection': 'row', 'alignItems': 'center', 'justifyContent': 'space-between',
object.innerContainer = {'flexDirection': 'row', 'alignItems': 'center', 'justifyContent': 'space-between',
'paddingHorizontal': null, 'width': '100%', 'height': '100%', paddingHorizontal: PX_16};
object2.heroLogoContainer = {'flex': 1, 'maxWidth': '80%', 'maxHeight': '80%'};
object2.heroLogo = {'resizeMode': 'contain', 'maxHeight': '100%', 'maxWidth': '100%', 'aspectRatio': 1};
const object3 = {};
object.heroLogoContainer = {'flex': 1, 'maxWidth': '80%', 'maxHeight': '80%'};
object.heroLogo = {'resizeMode': 'contain', 'maxHeight': '100%', 'maxWidth': '100%', 'aspectRatio': 1};
const object5 = {};
const CONTROL_OVERLAY_SECONDARY_BACKGROUND_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.CONTROL_OVERLAY_SECONDARY_BACKGROUND_DEFAULT;
object3.backgroundColor = CONTROL_OVERLAY_SECONDARY_BACKGROUND_DEFAULT;
object5.backgroundColor = CONTROL_OVERLAY_SECONDARY_BACKGROUND_DEFAULT;
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object3.padding = PX_8;
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
object2.heroViewAllIcon = object3;
const object4 = {};
object5.padding = PX_8;
object5.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
object.heroViewAllIcon = object5;
const object6 = {};
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object4.paddingHorizontal = PX_16;
object4.alignItems = 'flex-start';
object6.paddingHorizontal = PX_16;
object6.alignItems = 'flex-start';
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object4.gap = PX_16;
object2.orbsInnerContainer = object4;
object2.orbsTitle = {'fontSize': 24, 'lineHeight': 30};
object2.productCardsContainer = {zIndex: 1};
const object7 = {flexDirection: 'row'};
object6.gap = PX_16;
object.orbsInnerContainer = object6;
object.orbsTitle = {'fontSize': 24, 'lineHeight': 30};
object.productCardsContainer = {zIndex: 1};
const object8 = {flexDirection: 'row'};
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object7.gap = PX_12;
object8.gap = PX_12;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object7.paddingHorizontal = PX_16;
object2.skeletonContainer = object7;
const env0_14 = Reflect.apply(createStyles, createStylesModule, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/HeroBlock.tsx');
object8.paddingHorizontal = PX_16;
object.skeletonContainer = object8;
const env0_14 = Reflect.apply(createStyles, CreateStylesModule, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/native/HeroBlock.tsx');
exports.default = _default_106645;
}
function SkeletonLoading_106643({accessibilityLabel}) { // fn#106643, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14264:1585, offset: 0x022e3f7c, size: 129 bytes, params: 2, frame: 17
const styles = useStyles();
const Array = global.Array;
return (
<View
style={styles.skeletonContainer}
accessibilityRole="list"
accessibilityLabel={accessibilityLabel}
accessibilityState={{busy: true}}
accessible
>
{Array.from({length: 10}).map(_fun106644)}
</View>
);
}
function _default_106645({heroBlock, preferVCPrice, screen}) { // fn#106645, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14264:1866, offset: 0x022e3ffd, size: 2510 bytes, params: 2, frame: 50
var r18;
var r11;
var r28;
var r15;
var length;
var jsxRuntimeEnv0_12Binding;
var items2;
var PressableOpacity;
var object11;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var object;
var items5;
var items6;
var items7;
var FlashList;
var object27;
const COLLECTIBLES_SHOP_CARD_WIDTH = (require(10020) /* metro dependency 10020: CollectiblesShopCardV2 */).COLLECTIBLES_SHOP_CARD_WIDTH;
var space;
var PX_12;
var FeedProductList;
var object31;
const collectiblesCoachmarkScrollDismissContextModule = require(14057) /* metro dependency 14057: CollectiblesCoachmarkScrollDismissContext */;
const useCollectiblesCoachmarkScrollDismissContext = collectiblesCoachmarkScrollDismissContextModule.useCollectiblesCoachmarkScrollDismissContext;
const handleDismissCoachmarkOnScroll = Reflect.apply(useCollectiblesCoachmarkScrollDismissContext,
collectiblesCoachmarkScrollDismissContextModule, []).handleDismissCoachmarkOnScroll;
const env0_2 = (require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation();
const env0_3 = (require(10023) /* metro dependency 10023: CollectiblesAnalyticsContext */).useCollectiblesAnalyticsContext();
let r32 = heroBlock.mobileHeroUrl ?? heroBlock.heroBannerUrl;
const heroLogoUrl = heroBlock.heroLogoUrl;
const category = (require(566) /* metro dependency 566: flux */).useStateFromStores([CollectiblesCategoryStore],
function() {
return CollectiblesCategoryStore.getCategory(heroBlock.categorySkuId);
});
let r16 = category != null && category.isOrbsExclusive;
const value3 = (importDefault(4048) /* metro dependency 4048: useTheme */)();
const useTrackProductCardImpressionModule = require(10154) /* metro dependency 10154: useTrackProductCardImpression */;
const useTrackProductCardImpression = useTrackProductCardImpressionModule.useTrackProductCardImpression;
const handleCardVisibilityChange = Reflect.apply(useTrackProductCardImpression, useTrackProductCardImpressionModule,
[heroBlock.categoryStoreListingId, 'mobile_home', 'hero_block']).handleCardVisibilityChange;
const styles = useStyles();
const useTokenModule = require(3860) /* metro dependency 3860: useToken */;
let useToken = useTokenModule.useToken;
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
const value4 = Reflect.apply(useToken, useTokenModule, [BACKGROUND_BASE_LOW]);
const colorUtilsModule = require(4000) /* metro dependency 4000: ColorUtils */;
const hexToRgbaString = colorUtilsModule.hexToRgbaString;
const moduleValue8 = colorUtilsModule;
const value5 = Reflect.apply(hexToRgbaString, colorUtilsModule, [moduleValue8.hexWithOpacity(value4, 0)]);
const moduleValue9 = useTokenModule;
useToken = moduleValue9.useToken;
const BACKGROUND_BASE_LOWEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWEST;
const value6 = Reflect.apply(useToken, moduleValue9, [BACKGROUND_BASE_LOWEST]);
const value9 = (require(14049) /* metro dependency 14049: useFilteredAndSortedProducts */).useFilteredAndSortedProducts({products: env0_3.useMemo(_fun106647,
[heroBlock.rankedSkuIds, (importDefault(14058) /* metro dependency 14058: useGetProductsFromSkus */)()]),
bypassAndroidUnsyncedFilter: r16});
const FEATURED_PAGE = CollectiblesMobileShopScreen.FEATURED_PAGE;
const env0_6 = screen === FEATURED_PAGE;
const defaultImport = importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */;
const COLLECTIBLES_SHOP_HERO = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).COLLECTIBLES_SHOP_HERO;
const analyticsLocations = defaultImport(COLLECTIBLES_SHOP_HERO).analyticsLocations;
if (category === undefined) {
return null;
}
const r33 = heroBlock.mobileTitle ?? heroBlock.title;
const r34 = heroBlock.mobileSummary ?? heroBlock.summary;
r32 = r16 ? (require(4002) /* metro dependency 4002: shared */).isThemeDark(value3) ? importDefault(14060) /* metro dependency 14060: header_darkJpg */ : importDefault(14061) /* metro dependency 14061: header_lightJpg */ : r32;
const AnalyticsLocationProvider = (require(6771) /* metro dependency 6771: useAnalyticsLocations */).AnalyticsLocationProvider;
const VisibilitySensor = importDefault(10155) /* metro dependency 10155: VisibilitySensor */;
const value10 = r32 != null;
if (value10) {
jsxRuntimeEnv0_12Binding = jsxRuntimeEnv0_12;
items2 = [r16 && ((Component) => <Component colors={['rgba(39, 30, 173, 0.3)',
'transparent']} start={VerticalGradient.START} end={VerticalGradient.END} style={styles.orbsBackgroundGradient} />)(importDefault(4589) /* metro dependency 4589 */)];
items2[1] = <Image style={[styles.heroBannerImage]} source={{uri: r32}} />;
items2[2] = ((Component) => <Component colors={[value5,
value6]} start={VerticalGradient.START} end={VerticalGradient.END} style={styles.fadeOutGradient} />)(importDefault(4589) /* metro dependency 4589 */);
r11 = <>{items2}</>;
} else {
r11 = value10;
}
const items4 = [<View style={styles.heroBannerContainer}>{r11}</View>];
if (r16) {
var viewBinding6Props = {style: styles.orbsInnerContainer};
r28 = r33 != null && ((Text) => <Text variant="display-md" color="mobile-text-heading-primary" style={styles.orbsTitle}>{r33}</Text>)((require(4573) /* metro dependency 4573: Text */).Text);
items6 = [r28];
r28 = r34 != null && r34 !== '';
r28 = r28 && ((Text) => <Text variant="text-md/medium">{r34}</Text>)((require(4573) /* metro dependency 4573: Text */).Text);
items6[1] = r28;
items7 = [<View>{items6}</View>];
items7[1] = ((Button) => <Button variant="tertiary" shrink grow={false} size="sm" text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.ynollq)} onPress={onPress_106648} />)((require(4578) /* metro dependency 4578: ButtonNative */).Button);
r15 = <View {...viewBinding6Props}>{items7}</View>;
} else {
PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
var pressableOpacityProps = {'accessibilityRole': 'button', 'accessibilityLabel': null,
'accessibilityHint': null,
'activeOpacity': 0.6, 'androidRippleConfig': null, 'hitSlop': 8,
accessibilityLabel: intl.formatToPlainString(t.FNtLb3, {category: category.name}),
accessibilityHint: intl.string(t.F8ma9x)};
object = {};
object.radius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
pressableOpacityProps.androidRippleConfig = object;
pressableOpacityProps.onPress = onPress_106649;
var viewBinding3Props = {style: styles.innerContainer};
items5 = [heroLogoUrl != null && <View style={styles.heroLogoContainer}><Image style={styles.heroLogo} source={{uri: heroLogoUrl}} /></View>];
items5[1] = <View style={styles.heroViewAllIcon}>{((ChevronSmallRightIcon) => <ChevronSmallRightIcon size="sm" color="white" />)((require(6818) /* metro dependency 6818: ChevronSmallRightIcon */).ChevronSmallRightIcon)}</View>;
r15 = <PressableOpacity {...pressableOpacityProps} key={category.storeListingId}><View {...viewBinding3Props}>{items5}</View></PressableOpacity>;
}
items4[1] = <View style={styles.heroInfoContainer}>{r15}</View>;
const LayerScope = (require(6517) /* metro dependency 6517: LayerScopeNative */).LayerScope;
if (r16) {
FeedProductList = importDefault(14062) /* metro dependency 14062: FeedProductList */;
length = value9.length;
length = length === 0 ? 4 : value9.length;
r16 = <FeedProductList products={value9} loadingCardsNum={length} preferVCPrice={preferVCPrice} accessibilityLabel={intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.FNtLb3,
{category: category.name})} />;
} else {
jsxRuntimeEnv0_12Binding = jsxRuntimeEnv0_12;
if (value9.length === 0) {
r18 = <SkeletonLoading_106643 accessibilityLabel={intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.FNtLb3,
{category: category.name})} />;
} else {
FlashList = (require(8416) /* metro dependency 8416: flashList */).FlashList;
var flashListProps = {'horizontal': true, 'accessibilityLabel': null, 'accessibilityRole': 'list',
accessibilityLabel: intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.FNtLb3,
{category: category.name}), data: value9, onScroll: handleDismissCoachmarkOnScroll,
renderItem: renderItem_106650, decelerationRate: 'fast'};
space = (importDefault(697) /* metro dependency 697: native */).space;
PX_12 = space.PX_12;
flashListProps.snapToInterval = COLLECTIBLES_SHOP_CARD_WIDTH + PX_12;
space = (importDefault(697) /* metro dependency 697: native */).space;
PX_12 = space.PX_12;
flashListProps.estimatedItemSize = COLLECTIBLES_SHOP_CARD_WIDTH + PX_12;
flashListProps.showsHorizontalScrollIndicator = false;
flashListProps.ListHeaderComponent = ListHeaderComponent;
flashListProps.ListFooterComponent = ListFooterComponent;
flashListProps.ItemSeparatorComponent = ItemSeparatorComponent;
r18 = <FlashList {...flashListProps} />;
function SkeletonLoading_106643({accessibilityLabel}) { // fn#106643, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14264:1585, offset: 0x022e3f7c, size: 129 bytes, params: 2, frame: 17
const styles = useStyles();
const Array = global.Array;
return (
<View
style={styles.skeletonContainer}
accessibilityRole="list"
accessibilityLabel={accessibilityLabel}
accessibilityState={{busy: true}}
accessible
>
{Array.from({length: 10}).map(_fun106644)}
</View>
);
function _fun106644(a0, a1) { // fn#106644, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14264:1787, offset: 0x022e184b, size: 69 bytes, params: 3, frame: 17
const COLLECTIBLES_SHOP_CARD_WIDTH = (CollectiblesShopCardV2Module).COLLECTIBLES_SHOP_CARD_WIDTH;
return <SkeletonCard width={COLLECTIBLES_SHOP_CARD_WIDTH} key={a1} />;
}
r16 = <>{r18}</>;
}
items4[2] = <View style={styles.productCardsContainer}><LayerScope>{r16}</LayerScope></View>;
return (
<AnalyticsLocationProvider value={analyticsLocations}>
<VisibilitySensor onChange={handleCardVisibilityChange}>
<View style={styles.heroContainer}>
{items4}
function _default_106645({heroBlock, preferVCPrice, screen}) { // fn#106645, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14264:1866, offset: 0x022e3ffd, size: 2510 bytes, params: 2, frame: 50
var r18;
var r11;
var r28;
var r15;
var length;
var jsxRuntimeEnv0_12Binding;
var items2;
var PressableOpacity;
var object;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var object5;
var items5;
var items6;
var items7;
var FlashList;
var object3;
const COLLECTIBLES_SHOP_CARD_WIDTH = (CollectiblesShopCardV2Module).COLLECTIBLES_SHOP_CARD_WIDTH;
var space;
var PX_12;
var FeedProductList;
var object4;
const useCollectiblesCoachmarkScrollDismissContext = CollectiblesCoachmarkScrollDismissContextModule.useCollectiblesCoachmarkScrollDismissContext;
const handleDismissCoachmarkOnScroll = Reflect.apply(useCollectiblesCoachmarkScrollDismissContext,
CollectiblesCoachmarkScrollDismissContextModule, []).handleDismissCoachmarkOnScroll;
const env0_2 = (UseNavigationNativeModule).useNavigation();
const env0_3 = (CollectiblesAnalyticsContextModule).useCollectiblesAnalyticsContext();
let r32 = heroBlock.mobileHeroUrl ?? heroBlock.heroBannerUrl;
const heroLogoUrl = heroBlock.heroLogoUrl;
const category = (require(566) /* metro dependency 566: flux */).useStateFromStores([CollectiblesCategoryStore],
function() {
return CollectiblesCategoryStore.getCategory(heroBlock.categorySkuId);
});
let r16 = category != null && category.isOrbsExclusive;
const value3 = (UseTheme)();
const useTrackProductCardImpression = UseTrackProductCardImpressionModule.useTrackProductCardImpression;
const handleCardVisibilityChange = Reflect.apply(useTrackProductCardImpression, UseTrackProductCardImpressionModule,
[heroBlock.categoryStoreListingId, 'mobile_home', 'hero_block']).handleCardVisibilityChange;
const styles = useStyles();
let useToken = UseTokenModule.useToken;
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
const value4 = Reflect.apply(useToken, UseTokenModule, [BACKGROUND_BASE_LOW]);
const hexToRgbaString = ColorUtilsModule.hexToRgbaString;
const value5 = Reflect.apply(hexToRgbaString, ColorUtilsModule, [ColorUtilsModule.hexWithOpacity(value4, 0)]);
useToken = UseTokenModule.useToken;
const BACKGROUND_BASE_LOWEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWEST;
const value6 = Reflect.apply(useToken, UseTokenModule, [BACKGROUND_BASE_LOWEST]);
const value9 = (UseFilteredAndSortedProductsModule).useFilteredAndSortedProducts({products: env0_3.useMemo(_fun106647,
[heroBlock.rankedSkuIds, (UseGetProductsFromSkus)()]),
bypassAndroidUnsyncedFilter: r16});
const FEATURED_PAGE = CollectiblesMobileShopScreen.FEATURED_PAGE;
const env0_6 = screen === FEATURED_PAGE;
const defaultImport = UseAnalyticsLocations;
const COLLECTIBLES_SHOP_HERO = (AnalyticsLocation).COLLECTIBLES_SHOP_HERO;
const analyticsLocations = defaultImport(COLLECTIBLES_SHOP_HERO).analyticsLocations;
if (category === undefined) {
return null;
}
const r33 = heroBlock.mobileTitle ?? heroBlock.title;
const r34 = heroBlock.mobileSummary ?? heroBlock.summary;
r32 = r16 ? (require(4002) /* metro dependency 4002: shared */).isThemeDark(value3) ? importDefault(14060) /* metro dependency 14060: header_darkJpg */ : importDefault(14061) /* metro dependency 14061: header_lightJpg */ : r32;
const AnalyticsLocationProvider = (UseAnalyticsLocationsModule).AnalyticsLocationProvider;
const value10 = r32 != null;
if (value10) {
jsxRuntimeEnv0_12Binding = jsxRuntimeEnv0_12;
items2 = [
r16 && ((Component) => <Component colors={['rgba(39, 30, 173, 0.3)',
'transparent']} start={VerticalGradient.START} end={VerticalGradient.END} style={styles.orbsBackgroundGradient} />)(importDefault(4589) /* metro dependency 4589 */),
];
items2[1] = <Image style={[styles.heroBannerImage]} source={{uri: r32}} />;
items2[2] = ((Component) => <Component colors={[value5,
value6]} start={VerticalGradient.START} end={VerticalGradient.END} style={styles.fadeOutGradient} />)(importDefault(4589) /* metro dependency 4589 */);
r11 = (
<>
{items2}
</>
);
} else {
r11 = value10;
}
const items4 = [
<View style={styles.heroBannerContainer}>
{r11}
</View>,
];
if (r16) {
var viewBinding6Props = {style: styles.orbsInnerContainer};
r28 = r33 != null && ((Text) => <Text variant="display-md" color="mobile-text-heading-primary" style={styles.orbsTitle}>{r33}</Text>)((require(4573) /* metro dependency 4573: Text */).Text);
items6 = [r28];
r28 = r34 != null && r34 !== '';
r28 = r28 && ((Text) => <Text variant="text-md/medium">{r34}</Text>)((require(4573) /* metro dependency 4573: Text */).Text);
items6[1] = r28;
items7 = [
<View>
{items6}
</View>,
];
items7[1] = ((Button) => <Button variant="tertiary" shrink grow={false} size="sm" text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.ynollq)} onPress={onPress_106648} />)((require(4578) /* metro dependency 4578: ButtonNative */).Button);
r15 = (
<View {...viewBinding6Props}>
{items7}
</View>
</VisibilitySensor>
</AnalyticsLocationProvider>
);
}
);
} else {
PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
var pressableOpacityProps = {'accessibilityRole': 'button', 'accessibilityLabel': null,
'accessibilityHint': null,
'activeOpacity': 0.6, 'androidRippleConfig': null, 'hitSlop': 8,
accessibilityLabel: intl.formatToPlainString(t.FNtLb3, {category: category.name}),
accessibilityHint: intl.string(t.F8ma9x)};
object5 = {};
object5.radius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
pressableOpacityProps.androidRippleConfig = object5;
pressableOpacityProps.onPress = onPress_106649;
var viewBinding3Props = {style: styles.innerContainer};
items5 = [
heroLogoUrl != null && <View style={styles.heroLogoContainer}><Image style={styles.heroLogo} source={{uri: heroLogoUrl}} /></View>,
];
items5[1] = (
<View style={styles.heroViewAllIcon}>
{((ChevronSmallRightIcon) => <ChevronSmallRightIcon size="sm" color="white" />)((require(6818) /* metro dependency 6818: ChevronSmallRightIcon */).ChevronSmallRightIcon)}
</View>
);
r15 = (
<PressableOpacity {...pressableOpacityProps} key={category.storeListingId}>
<View {...viewBinding3Props}>
{items5}
</View>
</PressableOpacity>
);
}
items4[1] = (
<View style={styles.heroInfoContainer}>
{r15}
</View>
);
const LayerScope = (LayerScopeNativeModule).LayerScope;
if (r16) {
FeedProductList = importDefault(14062) /* metro dependency 14062: FeedProductList */;
length = value9.length;
length = length === 0 ? 4 : value9.length;
r16 = (
<FeedProductList
products={value9}
loadingCardsNum={length}
preferVCPrice={preferVCPrice}
accessibilityLabel={intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.FNtLb3,
{category: category.name})}
/>
);
} else {
jsxRuntimeEnv0_12Binding = jsxRuntimeEnv0_12;
if (value9.length === 0) {
r18 = (
<SkeletonLoading_106643
accessibilityLabel={intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.FNtLb3,
{category: category.name})}
/>
);
} else {
FlashList = (require(8416) /* metro dependency 8416: flashList */).FlashList;
var flashListProps = {'horizontal': true, 'accessibilityLabel': null, 'accessibilityRole': 'list',
accessibilityLabel: intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.FNtLb3,
{category: category.name}), data: value9, onScroll: handleDismissCoachmarkOnScroll,
renderItem: renderItem_106650, decelerationRate: 'fast'};
space = (importDefault(697) /* metro dependency 697: native */).space;
PX_12 = space.PX_12;
flashListProps.snapToInterval = COLLECTIBLES_SHOP_CARD_WIDTH + PX_12;
space = (importDefault(697) /* metro dependency 697: native */).space;
PX_12 = space.PX_12;
flashListProps.estimatedItemSize = COLLECTIBLES_SHOP_CARD_WIDTH + PX_12;
flashListProps.showsHorizontalScrollIndicator = false;
flashListProps.ListHeaderComponent = ListHeaderComponent_106651;
flashListProps.ListFooterComponent = ListFooterComponent_106652;
flashListProps.ItemSeparatorComponent = ItemSeparatorComponent_106653;
r18 = <FlashList {...flashListProps} />;
}
r16 = (
<>
{r18}
</>
);
}
items4[2] = (
<View style={styles.productCardsContainer}>
<LayerScope>
{r16}
</LayerScope>
</View>
);
return (
<AnalyticsLocationProvider value={analyticsLocations}>
<VisibilitySensor onChange={handleCardVisibilityChange}>
<View style={styles.heroContainer}>
{items4}
</View>
</VisibilitySensor>
</AnalyticsLocationProvider>
);
function _fun106647() { // fn#106647, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14264:2577, offset: 0x022e232c, size: 26 bytes, params: 1, frame: 11
return env0_5(heroBlock.rankedSkuIds);
}
function _default_106645OnPress() { // fn#106648, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14264:3813, owner: _default_106645.onPress, offset: 0x022e49cb, size: 76 bytes, params: 1, frame: 15
let value = environment.__proto__;
value = require(9480) /* metro dependency 9480: QuestUtilsNative */;
const openQuestHome = value.openQuestHome;
const QuestContent = (require(6533) /* metro dependency 6533: QuestContent */).QuestContent;
const ORBS_SHOP_HERO_CTA = QuestContent.ORBS_SHOP_HERO_CTA;
Reflect.apply(openQuestHome, value, [{mergeExistingRoutes: true, fromContent: ORBS_SHOP_HERO_CTA}]);
}
function _default_106645OnPress() { // fn#106648, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14264:3813, owner: _default_106645.onPress, offset: 0x022e49cb, size: 76 bytes, params: 1, frame: 15
let value = environment.__proto__;
value = require(9480) /* metro dependency 9480: QuestUtilsNative */;
const openQuestHome = value.openQuestHome;
const QuestContent = (QuestContentModule).QuestContent;
const ORBS_SHOP_HERO_CTA = QuestContent.ORBS_SHOP_HERO_CTA;
Reflect.apply(openQuestHome, value, [{mergeExistingRoutes: true, fromContent: ORBS_SHOP_HERO_CTA}]);
}
function _default_106645OnPress_106649() { // fn#106649, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14264:4211, owner: _default_106645.onPress, offset: 0x022e4a17, size: 266 bytes, params: 1, frame: 21
const categoryBinding = category;
const value3 = undefined;
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
const track = defaultImport.track;
const COLLECTIBLES_SHOP_ELEMENT_CLICKED = AnalyticEvents.COLLECTIBLES_SHOP_ELEMENT_CLICKED;
const object2 = {};
object2.collectibles_shop_session_id = env0_3 == null ? value3 : env0_3.sessionId;
object2.sku_id = heroBlock.categoryStoreListingId;
object2.page_type = 'mobile_home';
object2.page_section = env0_3 == null ? value3 : env0_3.pageSection;
object2.page_category = env0_3 == null ? value3 : env0_3.pageCategory;
object2.tile_type = 'HERO_BLOCK';
const String = global.String;
object2.tile_position = String(env0_3 == null ? value3 : env0_3.tilePosition);
object2.cta_name = null;
Reflect.apply(track, defaultImport, [COLLECTIBLES_SHOP_ELEMENT_CLICKED, object2]);
const binding = env0_2;
const push = binding.push;
const COLLECTIBLES_SHOP_VIEW_ALL_CATEGORY_ITEMS = UserSettingsSections.COLLECTIBLES_SHOP_VIEW_ALL_CATEGORY_ITEMS;
Reflect.apply(push, binding, [COLLECTIBLES_SHOP_VIEW_ALL_CATEGORY_ITEMS, {category: categoryBinding,
analyticsContext: env0_3}]);
return value3;
}
function _default_106645OnPress_106649() { // fn#106649, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14264:4211, owner: _default_106645.onPress, offset: 0x022e4a17, size: 266 bytes, params: 1, frame: 21
const categoryBinding = category;
const value3 = undefined;
const defaultImport = AnalyticsUtils;
const track = defaultImport.track;
const COLLECTIBLES_SHOP_ELEMENT_CLICKED = AnalyticEvents.COLLECTIBLES_SHOP_ELEMENT_CLICKED;
const object = {};
object.collectibles_shop_session_id = env0_3 == null ? value3 : env0_3.sessionId;
object.sku_id = heroBlock.categoryStoreListingId;
object.page_type = 'mobile_home';
object.page_section = env0_3 == null ? value3 : env0_3.pageSection;
object.page_category = env0_3 == null ? value3 : env0_3.pageCategory;
object.tile_type = 'HERO_BLOCK';
const String = global.String;
object.tile_position = String(env0_3 == null ? value3 : env0_3.tilePosition);
object.cta_name = null;
Reflect.apply(track, defaultImport, [COLLECTIBLES_SHOP_ELEMENT_CLICKED, object]);
const binding = env0_2;
const push = binding.push;
const COLLECTIBLES_SHOP_VIEW_ALL_CATEGORY_ITEMS = UserSettingsSections.COLLECTIBLES_SHOP_VIEW_ALL_CATEGORY_ITEMS;
Reflect.apply(push, binding, [COLLECTIBLES_SHOP_VIEW_ALL_CATEGORY_ITEMS, {category: categoryBinding,
analyticsContext: env0_3}]);
return value3;
}
function _default_106645RenderItem({item, index}) { // fn#106650, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14264:5478, owner: _default_106645.renderItem, offset: 0x022e4b21, size: 198 bytes, params: 2, frame: 21
var r5;
let value = environment.__proto__;
const value3 = ((Component) => <Component solidBackground product={item} unpublishedAt={category.unpublishedAt} preferVCPrice={preferVCPrice} />)(CollectiblesShopCardV2);
const CollectiblesAnalyticsProvider = (CollectiblesAnalyticsContextModule).CollectiblesAnalyticsProvider;
const object2 = {tilePosition: index};
if (index !== 0) {
r5 = value3;
} else if (env0_6) {
value = importDefault(14065) /* metro dependency 14065: FeaturedFirstCardCoachmarkAnchor */;
value = ((Component) => <Component>{value3}</Component>)(value);
r5 = value;
} else {
r5 = value3;
}
return (
<CollectiblesAnalyticsProvider newValue={object2} key={item.skuId}>
{r5}
</CollectiblesAnalyticsProvider>
);
}
function _default_106645ListHeaderComponent() { // fn#106651, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14264:5949, owner: _default_106645.ListHeaderComponent, offset: 0x022e2562, size: 63 bytes, params: 1, frame: 16
const PX_16 = (Native).space.PX_16;
return <View style={{width: PX_16}} />;
}
function _default_106645ListFooterComponent() { // fn#106652, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14264:6014, owner: _default_106645.ListFooterComponent, offset: 0x022e2562, size: 63 bytes, params: 1, frame: 16
const PX_16 = (Native).space.PX_16;
return <View style={{width: PX_16}} />;
}
function _default_106645ItemSeparatorComponent() { // fn#106653, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14264:6082, owner: _default_106645.ItemSeparatorComponent, offset: 0x022e25a1, size: 64 bytes, params: 1, frame: 16
const PX_12 = (Native).space.PX_12;
return <View style={{width: PX_12}} />;
}
function _default_106645RenderItem({item, index}) { // fn#106650, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14264:5478, owner: _default_106645.renderItem, offset: 0x022e4b21, size: 198 bytes, params: 2, frame: 21
var r5;
let value = environment.__proto__;
const value3 = ((Component) => <Component solidBackground product={item} unpublishedAt={category.unpublishedAt} preferVCPrice={preferVCPrice} />)(importDefault(10020) /* metro dependency 10020: CollectiblesShopCardV2 */);
const CollectiblesAnalyticsProvider = (require(10023) /* metro dependency 10023: CollectiblesAnalyticsContext */).CollectiblesAnalyticsProvider;
const object = {tilePosition: index};
if (index !== 0) {
r5 = value3;
} else if (env0_6) {
value = importDefault(14065) /* metro dependency 14065: FeaturedFirstCardCoachmarkAnchor */;
value = ((Component) => <Component>{value3}</Component>)(value);
r5 = value;
} else {
r5 = value3;
}
return (
<CollectiblesAnalyticsProvider newValue={object} key={item.skuId}>
{r5}
</CollectiblesAnalyticsProvider>
);
}
global.__d(_fun106642, 14067, [31, 27, 5121, 663, 661, 33, 10020, 4501, 697, 14056, 14057, 1484, 10023, 566, 4048,
10154, 3860, 4000, 14058, 14049, 6771, 6789, 683, 4002, 14060, 14061, 10155, 4589, 4573, 4578, 1244, 9480, 6533,
5278, 6818, 6517, 14062, 8416, 14065,
2]) /* metro module 14067, dependencies: [31, 27, 5121, 663, 661, 33, 10020, 4501, 697, 14056, 14057, 1484, 10023, 566, 4048, 10154, 3860, 4000, 14058, 14049, 6771, 6789, 683, 4002, 14060, 14061, 10155, 4589, 4573, 4578, 1244, 9480, 6533, 5278, 6818, 6517, 14062, 8416, 14065, 2] */;
@@ -1,11 +1,22 @@
/* Metro module 10093; source: modules/collectibles/native/IndividualProductPreview.tsx; dependencies: [31, 27, 663, 33, 4501, 697, 4589, 7594, 8488, 10094, 10095, 10096, 1904, 10098, 10101, 2] */
import Native from '../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import LinearGradient from '../../../by-id/module-04589-LinearGradient.js'; /* Metro dependency 4589 */
import ProfileEffectUserPreview from '../profile_effects/native/previews/ProfileEffectUserPreview.tsx'; /* Metro dependency 8488 */
import ProfileFrameUserPreview from '../profile_frames/native/previews/ProfileFrameUserPreview.tsx'; /* Metro dependency 10094 */
import AvatarDecorationProductPreview from './AvatarDecorationProductPreview.tsx'; /* Metro dependency 10095 */
import NameplateProductPreview from '../nameplates/native/NameplateProductPreview.tsx'; /* Metro dependency 10096 */
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 CollectiblesItemTypeModule from '../../../external/discord_common/js/shared/shared-constants/CollectiblesItemType.tsx'; /* Metro dependency 1904 */
import * as UseCurrentUserModule from '../hooks/useCurrentUser.tsx'; /* Metro dependency 7594 */
function _fun78844(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#78844, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10279:6, offset: 0x01e37a8f, size: 478 bytes, params: 8, frame: 23
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
ReactModule;
let value = ReactNativeModule;
const env0_3 = value.Pressable;
const StyleSheet = value.StyleSheet;
const env0_4 = value.View;
@@ -17,143 +28,158 @@ function _fun78844(global, require, importDefault, importAll, module, exports, d
const env0_8 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object2.collectiblePreview = {'marginTop': null, 'position': 'relative', 'height': 280, marginTop: PX_12};
object2.profilePreviewContainer = {'position': 'relative', 'flex': 1, 'alignItems': 'center', 'overflow': 'hidden'};
object2.profilePreview = {width: '66%'};
const object3 = {};
copyDataProperties(object3, StyleSheet.absoluteFillObject, undefined);
object3['bottom'] = -1;
object3['pointerEvents'] = 'none';
const MOBILE_ACTIONSHEET_BACKGROUND = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_ACTIONSHEET_BACKGROUND;
object3['color'] = MOBILE_ACTIONSHEET_BACKGROUND;
object2.profilePreviewGradient = object3;
const env0_9 = Reflect.apply(createStyles, value, [object2]);
const closure = ProfileEffectPreview;
const closure2 = AvatarDecorationPreview;
const closure3 = NameplatePreview;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/IndividualProductPreview.tsx');
exports.ProfileEffectPreview = closure;
exports.AvatarDecorationPreview = closure2;
exports.NameplatePreview = closure3;
object = {};
const PX_12 = (Native).space.PX_12;
object.collectiblePreview = {'marginTop': null, 'position': 'relative', 'height': 280, marginTop: PX_12};
object.profilePreviewContainer = {'position': 'relative', 'flex': 1, 'alignItems': 'center', 'overflow': 'hidden'};
object.profilePreview = {width: '66%'};
const object4 = {};
copyDataProperties(object4, StyleSheet.absoluteFillObject, undefined);
object4['bottom'] = -1;
object4['pointerEvents'] = 'none';
const MOBILE_ACTIONSHEET_BACKGROUND = (Native).colors.MOBILE_ACTIONSHEET_BACKGROUND;
object4['color'] = MOBILE_ACTIONSHEET_BACKGROUND;
object.profilePreviewGradient = object4;
const env0_9 = Reflect.apply(createStyles, value, [object]);
const ProfileEffectPreview2 = ProfileEffectPreview;
const AvatarDecorationPreview2 = AvatarDecorationPreview;
const NameplatePreview2 = NameplatePreview;
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/native/IndividualProductPreview.tsx');
exports.ProfileEffectPreview = ProfileEffectPreview2;
exports.AvatarDecorationPreview = AvatarDecorationPreview2;
exports.NameplatePreview = NameplatePreview2;
exports.IndividualProductPreview = IndividualProductPreview;
}
function ProfilePreviewWrapper({handlePreviewPress, onTrackPress, children}) { // fn#78845, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10279:615, offset: 0x01e37c6d, size: 263 bytes, params: 2, frame: 24
const styles = useStyles();
return (
<Pressable onPress={onPress_78846} style={styles.collectiblePreview}>
<View style={styles.profilePreviewContainer}>
{children}
{((Component) => <Component style={styles.profilePreviewGradient} start={{'x': 0,
'y': 0.6}} end={{'x': 0, 'y': 1}} colors={['' + styles.profilePreviewGradient.color + '00',
styles.profilePreviewGradient.color]} />)(importDefault(4589) /* metro dependency 4589 */)}
</View>
</Pressable>
);
}
function ProfileEffectPreview({profileEffect, profileEffectRestartKey, width, handlePreviewPress, onTrackPress}) { // fn#78847, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10279:1017, offset: 0x01e37daf, size: 160 bytes, params: 2, frame: 22
const styles = useStyles();
return (
<ProfilePreviewWrapper handlePreviewPress={handlePreviewPress} onTrackPress={onTrackPress}>
{((Component) => <Component user={(require(7594) /* metro dependency 7594: useCurrentUser */).useCurrentUser()} profileEffect={profileEffect} profileEffectRestartKey={profileEffectRestartKey} maxWidth={width} style={styles.profilePreview} />)(importDefault(8488) /* metro dependency 8488: ProfileEffectUserPreview */)}
</ProfilePreviewWrapper>
);
}
function ProfileFramePreview({profileFrame, width, handlePreviewPress, onTrackPress}) { // fn#78848, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10279:1342, offset: 0x01e37e4f, size: 149 bytes, params: 2, frame: 21
const styles = useStyles();
return (
<ProfilePreviewWrapper handlePreviewPress={handlePreviewPress} onTrackPress={onTrackPress}>
{((Component) => <Component profileFrame={profileFrame} user={(require(7594) /* metro dependency 7594: useCurrentUser */).useCurrentUser()} maxWidth={width} style={styles.profilePreview} />)(importDefault(10094) /* metro dependency 10094: ProfileFrameUserPreview */)}
</ProfilePreviewWrapper>
);
}
function AvatarDecorationPreview({product, handlePreviewPress, onTrackPress}) { // fn#78849, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10279:1617, offset: 0x01e37ee4, size: 120 bytes, params: 2, frame: 17
const styles = useStyles();
return (
<Pressable onPress={onPress_78850} style={styles.collectiblePreview}>
{((Component) => <Component product={product} />)(importDefault(10095) /* metro dependency 10095: AvatarDecorationProductPreview */)}
</Pressable>
);
}
function NameplatePreview({product}) { // fn#78851, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10279:1833, offset: 0x01e37f5c, size: 87 bytes, params: 2, frame: 17
const styles = useStyles();
return (
<View style={styles.collectiblePreview}>
{((Component) => <Component product={product} />)(importDefault(10096) /* metro dependency 10096: NameplateProductPreview */)}
</View>
);
}
function IndividualProductPreview({product, width, handlePreviewPress, onTrackPress}) { // fn#78852, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10279:2182, offset: 0x01e37fb3, size: 494 bytes, params: 2, frame: 20
const type = product.type;
const CollectiblesItemType = (require(1904) /* metro dependency 1904: CollectiblesItemType */).CollectiblesItemType;
const NAMEPLATE = CollectiblesItemType.NAMEPLATE;
if (NAMEPLATE === type) {
return <NameplatePreview product={product} />;
}
const PROFILE_EFFECT = CollectiblesItemType.PROFILE_EFFECT;
if (PROFILE_EFFECT === type) {
function ProfilePreviewWrapper({handlePreviewPress, onTrackPress, children}) { // fn#78845, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10279:615, offset: 0x01e37c6d, size: 263 bytes, params: 2, frame: 24
const styles = useStyles();
return (
<ProfileEffectPreview
profileEffect={product.items[0]}
width={width}
handlePreviewPress={handlePreviewPress}
onTrackPress={onTrackPress}
/>
<Pressable onPress={onPress_78846} style={styles.collectiblePreview}>
<View style={styles.profilePreviewContainer}>
{children}
{((Component) => <Component style={styles.profilePreviewGradient} start={{'x': 0,
'y': 0.6}} end={{'x': 0, 'y': 1}} colors={['' + styles.profilePreviewGradient.color + '00',
styles.profilePreviewGradient.color]} />)(LinearGradient)}
</View>
</Pressable>
);
}
const PROFILE_FRAME = CollectiblesItemType.PROFILE_FRAME;
if (PROFILE_FRAME === type) {
return (
<ProfileFramePreview
profileFrame={product.items[0]}
width={width}
handlePreviewPress={handlePreviewPress}
onTrackPress={onTrackPress}
/>
);
}
const AVATAR_DECORATION = CollectiblesItemType.AVATAR_DECORATION;
if (AVATAR_DECORATION === type) {
return (
<AvatarDecorationPreview
product={product}
handlePreviewPress={handlePreviewPress}
onTrackPress={onTrackPress}
/>
);
}
const EXTERNAL_SKU = CollectiblesItemType.EXTERNAL_SKU;
if (EXTERNAL_SKU === type) {
if (product.skuId === EXTERNAL_PRODUCT_SKU_IDS.FRACTIONAL_PREMIUM) {
const FractionalNitroPreview = (require(10098) /* metro dependency 10098: FractionalNitroPreview */).FractionalNitroPreview;
return <FractionalNitroPreview />;
} else if (product.skuId !== EXTERNAL_PRODUCT_SKU_IDS.ORB_PROFILE_BADGE) {
return null;
} else {
const OrbBadgePreview = (require(10101) /* metro dependency 10101: OrbBadgePreview */).OrbBadgePreview;
return <OrbBadgePreview />;
function ProfilePreviewWrapperOnPress() { // fn#78846, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10279:698, owner: ProfilePreviewWrapper.onPress, offset: 0x01e37d74, size: 59 bytes, params: 1, frame: 13
var value2;
let onTrackPressBinding = onTrackPress;
if (onTrackPressBinding != null) {
onTrackPressBinding = onTrackPress;
value2 = environment.__proto__;
onTrackPressBinding(ShopCtaEnum.FULL_PROFILE_PREVIEW);
}
if (handlePreviewPress != null) {
handlePreviewPress();
}
}
}
return null;
}
function ProfilePreviewWrapperOnPress() { // fn#78846, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10279:698, owner: ProfilePreviewWrapper.onPress, offset: 0x01e37d74, size: 59 bytes, params: 1, frame: 13
var value2;
let onTrackPressBinding = onTrackPress;
if (onTrackPressBinding != null) {
onTrackPressBinding = onTrackPress;
value2 = environment.__proto__;
onTrackPressBinding(ShopCtaEnum.FULL_PROFILE_PREVIEW);
function ProfileEffectPreview({profileEffect, profileEffectRestartKey, width, handlePreviewPress, onTrackPress}) { // fn#78847, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10279:1017, offset: 0x01e37daf, size: 160 bytes, params: 2, frame: 22
const styles = useStyles();
return (
<ProfilePreviewWrapper handlePreviewPress={handlePreviewPress} onTrackPress={onTrackPress}>
{((Component) => <Component user={(UseCurrentUserModule).useCurrentUser()} profileEffect={profileEffect} profileEffectRestartKey={profileEffectRestartKey} maxWidth={width} style={styles.profilePreview} />)(ProfileEffectUserPreview)}
</ProfilePreviewWrapper>
);
}
if (handlePreviewPress != null) {
handlePreviewPress();
function ProfileFramePreview({profileFrame, width, handlePreviewPress, onTrackPress}) { // fn#78848, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10279:1342, offset: 0x01e37e4f, size: 149 bytes, params: 2, frame: 21
const styles = useStyles();
return (
<ProfilePreviewWrapper handlePreviewPress={handlePreviewPress} onTrackPress={onTrackPress}>
{((Component) => <Component profileFrame={profileFrame} user={(UseCurrentUserModule).useCurrentUser()} maxWidth={width} style={styles.profilePreview} />)(ProfileFrameUserPreview)}
</ProfilePreviewWrapper>
);
}
function AvatarDecorationPreview({product, handlePreviewPress, onTrackPress}) { // fn#78849, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10279:1617, offset: 0x01e37ee4, size: 120 bytes, params: 2, frame: 17
const styles = useStyles();
return (
<Pressable onPress={onPress_78850} style={styles.collectiblePreview}>
{((Component) => <Component product={product} />)(AvatarDecorationProductPreview)}
</Pressable>
);
function AvatarDecorationPreviewOnPress() { // fn#78850, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10279:1699, owner: AvatarDecorationPreview.onPress, offset: 0x01e37d74, size: 59 bytes, params: 1, frame: 13
var value2;
let onTrackPressBinding = onTrackPress;
if (onTrackPressBinding != null) {
onTrackPressBinding = onTrackPress;
value2 = environment.__proto__;
onTrackPressBinding(ShopCtaEnum.FULL_PROFILE_PREVIEW);
}
if (handlePreviewPress != null) {
handlePreviewPress();
}
}
}
function NameplatePreview({product}) { // fn#78851, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10279:1833, offset: 0x01e37f5c, size: 87 bytes, params: 2, frame: 17
const styles = useStyles();
return (
<View style={styles.collectiblePreview}>
{((Component) => <Component product={product} />)(NameplateProductPreview)}
</View>
);
}
function IndividualProductPreview({product, width, handlePreviewPress, onTrackPress}) { // fn#78852, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10279:2182, offset: 0x01e37fb3, size: 494 bytes, params: 2, frame: 20
const type = product.type;
const CollectiblesItemType = (CollectiblesItemTypeModule).CollectiblesItemType;
const NAMEPLATE = CollectiblesItemType.NAMEPLATE;
if (NAMEPLATE === type) {
return <NameplatePreview product={product} />;
}
const PROFILE_EFFECT = CollectiblesItemType.PROFILE_EFFECT;
if (PROFILE_EFFECT === type) {
return (
<ProfileEffectPreview
profileEffect={product.items[0]}
width={width}
handlePreviewPress={handlePreviewPress}
onTrackPress={onTrackPress}
/>
);
}
const PROFILE_FRAME = CollectiblesItemType.PROFILE_FRAME;
if (PROFILE_FRAME === type) {
return (
<ProfileFramePreview
profileFrame={product.items[0]}
width={width}
handlePreviewPress={handlePreviewPress}
onTrackPress={onTrackPress}
/>
);
}
const AVATAR_DECORATION = CollectiblesItemType.AVATAR_DECORATION;
if (AVATAR_DECORATION === type) {
return (
<AvatarDecorationPreview
product={product}
handlePreviewPress={handlePreviewPress}
onTrackPress={onTrackPress}
/>
);
}
const EXTERNAL_SKU = CollectiblesItemType.EXTERNAL_SKU;
if (EXTERNAL_SKU === type) {
if (product.skuId === EXTERNAL_PRODUCT_SKU_IDS.FRACTIONAL_PREMIUM) {
const FractionalNitroPreview = (require(10098) /* metro dependency 10098: FractionalNitroPreview */).FractionalNitroPreview;
return <FractionalNitroPreview />;
} else if (product.skuId !== EXTERNAL_PRODUCT_SKU_IDS.ORB_PROFILE_BADGE) {
return null;
} else {
const OrbBadgePreview = (require(10101) /* metro dependency 10101: OrbBadgePreview */).OrbBadgePreview;
return <OrbBadgePreview />;
}
}
return null;
}
}
global.__d(_fun78844, 10093, [31, 27, 663, 33, 4501, 697, 4589, 7594, 8488, 10094, 10095, 10096, 1904, 10098, 10101,
2]) /* metro module 10093, dependencies: [31, 27, 663, 33, 4501, 697, 4589, 7594, 8488, 10094, 10095, 10096, 1904, 10098, 10101, 2] */;
@@ -1,22 +1,37 @@
/* Metro module 10104; source: modules/collectibles/native/InlinePriceTag.tsx; dependencies: [31, 27, 5140, 663, 661, 33, 4501, 697, 4573, 10076, 1244, 7594, 5134, 3802, 10105, 10106, 10066, 10107, 566, 10054, 1904, 10075, 477, 10078, 7954, 2] */
import Native from '../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import PremiumUtils from '../../../utils/PremiumUtils.tsx'; /* Metro dependency 3802 */
import IAPStoreAndroid from '../../../stores/native/IAPStore.android.tsx'; /* Metro dependency 5140 */
import UseOpenNitroSubscribeActionSheet from './useOpenNitroSubscribeActionSheet.tsx'; /* Metro dependency 10105 */
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 PlatformUtilsModule from '../../../utils/PlatformUtils.tsx'; /* Metro dependency 477 */
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
import * as CollectiblesShopConstantsModule from '../CollectiblesShopConstants.tsx'; /* Metro dependency 663 */
import * as TextModule from '../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as CollectiblesUtilsModule from '../CollectiblesUtils.tsx'; /* Metro dependency 5134 */
import * as UseCurrentUserModule from '../hooks/useCurrentUser.tsx'; /* Metro dependency 7594 */
import * as NitroWheelIconModule from '../../../design/components/Icon/native/redesign/generated/NitroWheelIcon.tsx'; /* Metro dependency 7954 */
import * as UseCanPurchaseFramesModule from '../hooks/useCanPurchaseFrames.tsx'; /* Metro dependency 10054 */
import * as UseProductDisableStateModule from '../hooks/useProductDisableState.tsx'; /* Metro dependency 10106 */
import * as UseVirtualCurrencyDataModule from './hooks/useVirtualCurrencyData.tsx'; /* Metro dependency 10107 */
function _fun78887(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#78887, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10290:6, offset: 0x01e3a516, size: 578 bytes, params: 8, frame: 24
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
ReactModule;
let value = ReactNativeModule;
const env0_3 = value.Pressable;
const env0_4 = value.View;
const iapStoreAndroid = importDefault(5140) /* metro dependency 5140: IAPStoreAndroid */;
const env0_6 = (require(663) /* metro dependency 663: CollectiblesShopConstants */).ShopCtaEnum;
const env0_7 = (require(661) /* metro dependency 661: Constants */).AnalyticsSections;
value = require(33) /* metro dependency 33 */;
const env0_8 = value.jsx;
const env0_9 = value.Fragment;
const env0_10 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
const PX_8 = (Native).space.PX_8;
const env0_11 = Reflect.apply(createStyles, value, [{priceTag: {'flexDirection': 'row', 'alignItems': 'center'},
strikedPrice: {'textDecorationLine': 'line-through', 'textDecorationStyle': 'solid', 'opacity': 0.7},
regularPrice: {}, nitroIcon: {'width': 20, 'height': 20, 'marginLeft': 8, 'marginRight': 4},
@@ -27,265 +42,363 @@ function _fun78887(global, require, importDefault, importAll, module, exports, d
'flexDirection': 'row', 'alignItems': 'center', marginTop: PX_8}, androidTextPadding: {paddingBottom: 2},
orbsIcon: {marginRight: 4}, disabled: {opacity: 0.5}}]);
const env0_14 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(_fun78890);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/InlinePriceTag.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/native/InlinePriceTag.tsx');
exports.default = InlinePriceTag;
}
function PriceTag({priceFormatted, style, color, icon, variant, accessibilityLabel}) { // fn#78888, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10290:976, offset: 0x01e3a758, size: 174 bytes, params: 2, frame: 24
color = color === undefined ? 'interactive-text-active' : color;
variant = variant === undefined ? 'text-md/medium' : variant;
const styles = useStyles();
const jsxRuntimeEnv0_9Binding = jsxRuntimeEnv0_9;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<>
{icon}
<Text
variant={variant}
style={[styles.priceTag, style]}
color={color}
accessibilityLabel={accessibilityLabel}
>
{priceFormatted}
</Text>
</>
);
}
function OrbsPriceTag({vcData, isProductDisabled}) { // fn#78889, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10290:1236, offset: 0x01e3a806, size: 329 bytes, params: 2, frame: 25
var r6;
var r0;
var object3;
var canAfford;
var object5;
var intl;
var formatToPlainString;
var property;
var object6;
const styles = useStyles();
let price = vcData.price;
if (price == null) {
r0 = null;
} else {
object3 = {};
canAfford = vcData.canAfford;
r6 = canAfford ? isProductDisabled : !canAfford;
r6 = r6 && styles.disabled;
object3.style = [styles.priceTagRow, r6];
object5 = {};
price = vcData.price;
object5.priceFormatted = price == null ? undefined : price.amount.toString();
object5.variant = 'text-md/semibold';
object5.icon = ((OrbsIcon) => <OrbsIcon color="interactive-text-active" size="sm" style={styles.orbsIcon} />)((require(10076) /* metro dependency 10076: OrbsIcon */).OrbsIcon);
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
formatToPlainString = intl.formatToPlainString;
property = (require(1244) /* metro dependency 1244: indexNative */).t['a/Y8PK'];
object6 = {};
price = vcData.price;
object6.orbAmount = price == null ? undefined : price.amount.toString();
object5.accessibilityLabel = Reflect.apply(formatToPlainString, intl, [property, object6]);
r0 = <View {...object3}><PriceTag {...object5} /></View>;
function PriceTag({priceFormatted, style, color, icon, variant, accessibilityLabel}) { // fn#78888, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10290:976, offset: 0x01e3a758, size: 174 bytes, params: 2, frame: 24
color = color === undefined ? 'interactive-text-active' : color;
variant = variant === undefined ? 'text-md/medium' : variant;
const styles = useStyles();
const jsxRuntimeEnv0_9Binding = jsxRuntimeEnv0_9;
const Text = (TextModule).Text;
return (
<>
{icon}
<Text
variant={variant}
style={[styles.priceTag, style]}
color={color}
accessibilityLabel={accessibilityLabel}
>
{priceFormatted}
</Text>
</>
);
}
return r0;
}
function _fun78890() { // fn#78890, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10290:1727, offset: 0x01e3a94f, size: 150 bytes, params: 1, frame: 16
const object = {'backgroundColor': 'rgba(46, 204, 113, 0.25)', 'flexDirection': 'row', 'flexShrink': 1,
'borderRadius': null, 'paddingHorizontal': 6, 'marginLeft': 6};
const value2 = undefined;
object.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs - 1;
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
object.paddingTop = platformUtilsModule.isAndroid() ? 0 : value2;
const value = platformUtilsModule;
object.paddingBottom = value.isAndroid() ? 2 : value2;
return {discount: object};
}
function OrbsPriceTag({vcData, isProductDisabled}) { // fn#78889, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10290:1236, offset: 0x01e3a806, size: 329 bytes, params: 2, frame: 25
var r6;
var r0;
var object;
var canAfford;
var object2;
var intl;
var formatToPlainString;
var property;
var object4;
const styles = useStyles();
let price = vcData.price;
if (price == null) {
r0 = null;
} else {
object = {};
canAfford = vcData.canAfford;
r6 = canAfford ? isProductDisabled : !canAfford;
r6 = r6 && styles.disabled;
object.style = [styles.priceTagRow, r6];
object2 = {};
price = vcData.price;
object2.priceFormatted = price == null ? undefined : price.amount.toString();
object2.variant = 'text-md/semibold';
object2.icon = ((OrbsIcon) => <OrbsIcon color="interactive-text-active" size="sm" style={styles.orbsIcon} />)((require(10076) /* metro dependency 10076: OrbsIcon */).OrbsIcon);
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
formatToPlainString = intl.formatToPlainString;
property = (require(1244) /* metro dependency 1244: indexNative */).t['a/Y8PK'];
object4 = {};
price = vcData.price;
object4.orbAmount = price == null ? undefined : price.amount.toString();
object2.accessibilityLabel = Reflect.apply(formatToPlainString, intl, [property, object4]);
r0 = (
<View {...object}>
<PriceTag {...object2} />
</View>
);
}
return r0;
}
function BundleDiscountV2({product, eligibleForShopDiscount}) { // fn#78891, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10290:1991, offset: 0x01e3a9e5, size: 184 bytes, params: 2, frame: 19
const styles = useStyles();
const collectiblesUtilsModule = require(5134) /* metro dependency 5134: CollectiblesUtils */;
const getProductDiscount = collectiblesUtilsModule.getProductDiscount;
const discountPercentage = Reflect.apply(getProductDiscount, collectiblesUtilsModule, [product,
eligibleForShopDiscount]).discountPercentage;
return discountPercentage <= 0 ? null : <View style={styles.discount}>{((Text) => <Text variant="text-md/normal" color="text-feedback-positive">{'-'}{discountPercentage}{'%'}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)}</View>;
}
function _fun78890() { // fn#78890, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10290:1727, offset: 0x01e3a94f, size: 150 bytes, params: 1, frame: 16
const object2 = {'backgroundColor': 'rgba(46, 204, 113, 0.25)', 'flexDirection': 'row', 'flexShrink': 1,
'borderRadius': null, 'paddingHorizontal': 6, 'marginLeft': 6};
const value2 = undefined;
object2.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs - 1;
object2.paddingTop = PlatformUtilsModule.isAndroid() ? 0 : value2;
object2.paddingBottom = PlatformUtilsModule.isAndroid() ? 2 : value2;
return {discount: object2};
}
function InlinePriceTag({product, onTrackPress}) { // fn#78892, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10290:2334, offset: 0x01e3aa9d, size: 1471 bytes, params: 2, frame: 41
var r11;
var r12;
var r10;
var value10;
var formattedPriceForCollectiblesProduct;
var object;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var items3;
var moduleValue9;
const NitroWheelIcon = (require(7954) /* metro dependency 7954: NitroWheelIcon */).NitroWheelIcon;
var items2;
var items4;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
var moduleValue10;
var items5;
const styles = useStyles();
const value3 = (require(7594) /* metro dependency 7594: useCurrentUser */).useCurrentUser();
const shopDiscountSource = (require(5134) /* metro dependency 5134: CollectiblesUtils */).getShopDiscountSource(value3);
const canUseShopDiscounts2 = (importDefault(3802) /* metro dependency 3802: PremiumUtils */).canUseShopDiscounts(value3);
const defaultImport2 = importDefault(10105) /* metro dependency 10105: useOpenNitroSubscribeActionSheet */;
const SHOP_PRODUCT_DETAILS = AnalyticsSections.SHOP_PRODUCT_DETAILS;
const env0_2 = defaultImport2(SHOP_PRODUCT_DETAILS);
const useProductDisableStateModule = require(10106) /* metro dependency 10106: useProductDisableState */;
const useProductDisableState = useProductDisableStateModule.useProductDisableState;
const isDisabled = Reflect.apply(useProductDisableState, useProductDisableStateModule, [product.skuId]).isDisabled;
const formattedPriceForCollectiblesProduct2 = (require(10066) /* metro dependency 10066: CollectiblesUtils */).getFormattedPriceForCollectiblesProduct(product,
false, true);
const value6 = (require(10107) /* metro dependency 10107: useVirtualCurrencyData */).useVirtualCurrencyData(product,
canUseShopDiscounts2);
const value7 = (require(566) /* metro dependency 566: flux */).useStateFromStores([IAPStoreAndroid], function() {
return IAPStoreAndroid.isFetchingGoogleSkus();
});
const value8 = (require(10054) /* metro dependency 10054: useCanPurchaseFrames */).useIsProfileFramesEarlyAccessPhase('InlinePriceTag');
let type = product.type;
const CollectiblesItemType = (require(1904) /* metro dependency 1904: CollectiblesItemType */).CollectiblesItemType;
const PROFILE_FRAME = CollectiblesItemType.PROFILE_FRAME;
const r2 = type === PROFILE_FRAME && value8;
if (value7) {
if (formattedPriceForCollectiblesProduct2 == null) {
const CollectiblesShopPricePlaceholder = (require(10075) /* metro dependency 10075: CollectiblesShopPricePlaceholder */).CollectiblesShopPricePlaceholder;
return <CollectiblesShopPricePlaceholder />;
function BundleDiscountV2({product, eligibleForShopDiscount}) { // fn#78891, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10290:1991, offset: 0x01e3a9e5, size: 184 bytes, params: 2, frame: 19
const styles = useStyles();
const getProductDiscount = CollectiblesUtilsModule.getProductDiscount;
const discountPercentage = Reflect.apply(getProductDiscount, CollectiblesUtilsModule, [product,
eligibleForShopDiscount]).discountPercentage;
return (
discountPercentage <= 0
? null
: (
<View style={styles.discount}>
{((Text) => <Text variant="text-md/normal" color="text-feedback-positive">{'-'}{discountPercentage}{'%'}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)}
</View>
)
);
}
function InlinePriceTag({product, onTrackPress}) { // fn#78892, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10290:2334, offset: 0x01e3aa9d, size: 1471 bytes, params: 2, frame: 41
var r11;
var r12;
var r10;
var value10;
var formattedPriceForCollectiblesProduct;
var object2;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var items3;
var moduleValue9;
const NitroWheelIcon = (NitroWheelIconModule).NitroWheelIcon;
var items2;
var items4;
const Text = (TextModule).Text;
var moduleValue10;
var items5;
const styles = useStyles();
const value3 = (UseCurrentUserModule).useCurrentUser();
const shopDiscountSource = (require(5134) /* metro dependency 5134: CollectiblesUtils */).getShopDiscountSource(value3);
const canUseShopDiscounts2 = (PremiumUtils).canUseShopDiscounts(value3);
const defaultImport2 = UseOpenNitroSubscribeActionSheet;
const SHOP_PRODUCT_DETAILS = AnalyticsSections.SHOP_PRODUCT_DETAILS;
const env0_2 = defaultImport2(SHOP_PRODUCT_DETAILS);
const useProductDisableState = UseProductDisableStateModule.useProductDisableState;
const isDisabled = Reflect.apply(useProductDisableState, UseProductDisableStateModule, [product.skuId]).isDisabled;
const formattedPriceForCollectiblesProduct2 = (require(10066) /* metro dependency 10066: CollectiblesUtils */).getFormattedPriceForCollectiblesProduct(product,
false, true);
const value6 = (UseVirtualCurrencyDataModule).useVirtualCurrencyData(product,
canUseShopDiscounts2);
const value7 = (require(566) /* metro dependency 566: flux */).useStateFromStores([IAPStoreAndroid], function() {
return IAPStoreAndroid.isFetchingGoogleSkus();
});
const value8 = (UseCanPurchaseFramesModule).useIsProfileFramesEarlyAccessPhase('InlinePriceTag');
let type = product.type;
const CollectiblesItemType = (require(1904) /* metro dependency 1904: CollectiblesItemType */).CollectiblesItemType;
const PROFILE_FRAME = CollectiblesItemType.PROFILE_FRAME;
const r2 = type === PROFILE_FRAME && value8;
if (value7) {
if (formattedPriceForCollectiblesProduct2 == null) {
const CollectiblesShopPricePlaceholder = (require(10075) /* metro dependency 10075: CollectiblesShopPricePlaceholder */).CollectiblesShopPricePlaceholder;
return <CollectiblesShopPricePlaceholder />;
}
value10 = null;
if (value10 == formattedPriceForCollectiblesProduct2) {
return (
value10 != value6.price
? (
<OrbsPriceTag vcData={value6} isProductDisabled={isDisabled} />
)
: value10
);
}
r11 = canUseShopDiscounts2 || r2;
formattedPriceForCollectiblesProduct = (require(10066) /* metro dependency 10066: CollectiblesUtils */).getFormattedPriceForCollectiblesProduct(product,
true, true);
var viewBindingProps = {style: styles.container};
var viewBindingProps2 = {style: styles.priceTagColumn};
var viewBindingProps3 = {style: styles.priceTagRow};
object2 = {priceFormatted: formattedPriceForCollectiblesProduct2};
r12 = r11 ? undefined : 'heading-md/semibold';
object2.variant = r12;
r12 = r11 ? styles.strikedPrice : styles.regularPrice;
object2.style = r12;
object2.color = 'interactive-text-active';
object2.accessibilityLabel = intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.sPvyr8,
{price: formattedPriceForCollectiblesProduct2});
items3 = [
<PriceTag {...object2} />,
];
r12 = (
product.type !== (require(1904) /* metro dependency 1904: CollectiblesItemType */).CollectiblesItemType.BUNDLE || canUseShopDiscounts2
? value10
: (
<BundleDiscountV2 product={product} eligibleForShopDiscount={canUseShopDiscounts2} />
)
);
items3[1] = r12;
r12 = value10 != formattedPriceForCollectiblesProduct && r11;
if (r12) {
var priceTagProps = {'priceFormatted': null, 'variant': 'text-md/medium',
'color': 'interactive-text-active',
priceFormatted: formattedPriceForCollectiblesProduct,
accessibilityLabel: intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.kWkpdG,
{price: formattedPriceForCollectiblesProduct})};
moduleValue9 = require(477) /* metro dependency 477: PlatformUtils */;
priceTagProps.style = moduleValue9.isAndroid() ? styles.androidTextPadding : undefined;
priceTagProps.icon = (
shopDiscountSource === (require(5134) /* metro dependency 5134: CollectiblesUtils */).ShopDiscountSource.THIRDPARTY
? ((TagIcon) => <TagIcon color="interactive-text-active" style={styles.nitroIcon} />)((require(10078) /* metro dependency 10078: TagIcon */).TagIcon)
: (
<NitroWheelIcon color="interactive-text-active" style={styles.nitroIcon} />
)
);
r12 = <PriceTag {...priceTagProps} />;
}
items3[2] = r12;
items2 = [
<View {...viewBindingProps3}>
{items3}
</View>,
];
r10 = value10 != formattedPriceForCollectiblesProduct && !r11;
if (r10) {
var viewBinding2Props = {style: styles.priceTagRow};
var pressableBindingProps = {onPress: onPress_78894, style: styles.subscribeNowPressable,
accessibilityRole: 'button'};
items4 = [
<NitroWheelIcon color="interactive-text-default" style={[styles.nitroIcon,
styles.nitroIconSubscribeNow]} />,
];
moduleValue10 = require(477) /* metro dependency 477: PlatformUtils */;
items4[1] = (
<Text
variant="text-md/normal"
color="interactive-text-default"
style={moduleValue10.isAndroid() ? styles.androidTextPadding : undefined}
>
{intl.format((require(1244) /* metro dependency 1244: indexNative */).t.Kxw2LT,
{price: formattedPriceForCollectiblesProduct, subscribeNowHook: subscribeNowHook})}
</Text>
);
r10 = (
<View {...viewBinding2Props}>
<Pressable {...pressableBindingProps}>
{items4}
</Pressable>
</View>
);
}
items2[1] = r10;
items5 = [
<View {...viewBindingProps2}>
{items2}
</View>,
];
items5[1] = value10 != value6.price && <OrbsPriceTag vcData={value6} isProductDisabled={isDisabled} />;
return (
<View {...viewBindingProps}>
{items5}
</View>
);
}
value10 = null;
if (value10 == formattedPriceForCollectiblesProduct2) {
return value10 != value6.price ? <OrbsPriceTag vcData={value6} isProductDisabled={isDisabled} /> : value10;
return (
value10 != value6.price
? (
<OrbsPriceTag vcData={value6} isProductDisabled={isDisabled} />
)
: value10
);
}
r11 = canUseShopDiscounts2 || r2;
formattedPriceForCollectiblesProduct = (require(10066) /* metro dependency 10066: CollectiblesUtils */).getFormattedPriceForCollectiblesProduct(product,
true, true);
var viewBindingProps = {style: styles.container};
var viewBindingProps2 = {style: styles.priceTagColumn};
var viewBindingProps3 = {style: styles.priceTagRow};
object = {priceFormatted: formattedPriceForCollectiblesProduct2};
r12 = r11 ? undefined : 'heading-md/semibold';
object.variant = r12;
r12 = r11 ? styles.strikedPrice : styles.regularPrice;
object.style = r12;
object.color = 'interactive-text-active';
object.accessibilityLabel = intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.sPvyr8,
{price: formattedPriceForCollectiblesProduct2});
items3 = [<PriceTag {...object} />];
r12 = product.type !== (require(1904) /* metro dependency 1904: CollectiblesItemType */).CollectiblesItemType.BUNDLE || canUseShopDiscounts2 ? value10 : <BundleDiscountV2 product={product} eligibleForShopDiscount={canUseShopDiscounts2} />;
items3[1] = r12;
items3 = [
<PriceTag
priceFormatted={formattedPriceForCollectiblesProduct2}
variant={r11 ? undefined : 'heading-md/semibold'}
style={r11 ? styles.strikedPrice : styles.regularPrice}
color="interactive-text-active"
accessibilityLabel={intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.sPvyr8,
{price: formattedPriceForCollectiblesProduct2})}
/>,
];
type = product.type;
const BUNDLE = CollectiblesItemType.BUNDLE;
items3[1] = (
type !== BUNDLE || canUseShopDiscounts2
? value10
: (
<BundleDiscountV2 product={product} eligibleForShopDiscount={canUseShopDiscounts2} />
)
);
r12 = value10 != formattedPriceForCollectiblesProduct && r11;
if (r12) {
var priceTagProps = {'priceFormatted': null, 'variant': 'text-md/medium',
'color': 'interactive-text-active',
var priceTagProps = {'priceFormatted': null, 'variant': 'text-md/medium', 'color': 'interactive-text-active',
priceFormatted: formattedPriceForCollectiblesProduct,
accessibilityLabel: intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.kWkpdG,
{price: formattedPriceForCollectiblesProduct})};
moduleValue9 = require(477) /* metro dependency 477: PlatformUtils */;
priceTagProps.style = moduleValue9.isAndroid() ? styles.androidTextPadding : undefined;
priceTagProps.icon = shopDiscountSource === (require(5134) /* metro dependency 5134: CollectiblesUtils */).ShopDiscountSource.THIRDPARTY ? ((TagIcon) => <TagIcon color="interactive-text-active" style={styles.nitroIcon} />)((require(10078) /* metro dependency 10078: TagIcon */).TagIcon) : <NitroWheelIcon color="interactive-text-active" style={styles.nitroIcon} />;
priceTagProps.icon = (
shopDiscountSource === (require(5134) /* metro dependency 5134: CollectiblesUtils */).ShopDiscountSource.THIRDPARTY
? ((TagIcon) => <TagIcon color="interactive-text-active" style={styles.nitroIcon} />)((require(10078) /* metro dependency 10078: TagIcon */).TagIcon)
: (
<NitroWheelIcon color="interactive-text-active" style={styles.nitroIcon} />
)
);
r12 = <PriceTag {...priceTagProps} />;
}
items3[2] = r12;
items2 = [<View {...viewBindingProps3}>{items3}</View>];
const view = (
<View style={styles.priceTagRow}>
{items3}
</View>
);
r10 = value10 != formattedPriceForCollectiblesProduct && !r11;
if (r10) {
var viewBinding2Props = {style: styles.priceTagRow};
var pressableBindingProps = {onPress: onPress_78894, style: styles.subscribeNowPressable,
accessibilityRole: 'button'};
items4 = [<NitroWheelIcon color="interactive-text-default" style={[styles.nitroIcon,
styles.nitroIconSubscribeNow]} />];
items4 = [
<NitroWheelIcon color="interactive-text-default" style={[styles.nitroIcon,
styles.nitroIconSubscribeNow]} />,
];
moduleValue10 = require(477) /* metro dependency 477: PlatformUtils */;
items4[1] = <Text variant="text-md/normal" color="interactive-text-default" style={moduleValue10.isAndroid() ? styles.androidTextPadding : undefined}>{intl.format((require(1244) /* metro dependency 1244: indexNative */).t.Kxw2LT,
{price: formattedPriceForCollectiblesProduct, subscribeNowHook: subscribeNowHook})}</Text>;
r10 = <View {...viewBinding2Props}><Pressable {...pressableBindingProps}>{items4}</Pressable></View>;
items4[1] = (
<Text
variant="text-md/normal"
color="interactive-text-default"
style={moduleValue10.isAndroid() ? styles.androidTextPadding : undefined}
>
{intl.format((require(1244) /* metro dependency 1244: indexNative */).t.Kxw2LT,
{price: formattedPriceForCollectiblesProduct, subscribeNowHook: subscribeNowHook})}
</Text>
);
r10 = (
<View {...viewBinding2Props}>
<Pressable {...pressableBindingProps}>
{items4}
</Pressable>
</View>
);
}
items2[1] = r10;
items5 = [<View {...viewBindingProps2}>{items2}</View>];
items5[1] = value10 != value6.price && <OrbsPriceTag vcData={value6} isProductDisabled={isDisabled} />;
return (
<View {...viewBindingProps}>
{items5}
<View style={styles.container}>
<View style={styles.priceTagColumn}>
{view}
{r10}
</View>
{value10 != value6.price && <OrbsPriceTag vcData={value6} isProductDisabled={isDisabled} />}
</View>
);
function InlinePriceTagOnPress() { // fn#78894, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10290:4040, owner: InlinePriceTag.onPress, offset: 0x01e3b05c, size: 49 bytes, params: 1, frame: 12
var value2;
let onTrackPressBinding = onTrackPress;
if (onTrackPressBinding != null) {
onTrackPressBinding = onTrackPress;
value2 = environment.__proto__;
onTrackPressBinding(ShopCtaEnum.SUBSCRIBE_NOW);
}
env0_2();
}
function subscribeNowHook(a0, a1) { // fn#78895, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10290:4454, owner: InlinePriceTag.subscribeNowHook, offset: 0x01e3b08d, size: 82 bytes, params: 3, frame: 15
const Text = (TextModule).Text;
return (
<Text
variant="text-md/normal"
style={styles.underline}
key={a1}
>
{a0}
</Text>
);
}
}
value10 = null;
if (value10 == formattedPriceForCollectiblesProduct2) {
return value10 != value6.price ? <OrbsPriceTag vcData={value6} isProductDisabled={isDisabled} /> : value10;
}
r11 = canUseShopDiscounts2 || r2;
formattedPriceForCollectiblesProduct = (require(10066) /* metro dependency 10066: CollectiblesUtils */).getFormattedPriceForCollectiblesProduct(product,
true, true);
items3 = [<PriceTag priceFormatted={formattedPriceForCollectiblesProduct2} variant={r11 ? undefined : 'heading-md/semibold'} style={r11 ? styles.strikedPrice : styles.regularPrice} color="interactive-text-active" accessibilityLabel={intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.sPvyr8,
{price: formattedPriceForCollectiblesProduct2})} />];
type = product.type;
const BUNDLE = CollectiblesItemType.BUNDLE;
items3[1] = type !== BUNDLE || canUseShopDiscounts2 ? value10 : <BundleDiscountV2 product={product} eligibleForShopDiscount={canUseShopDiscounts2} />;
r12 = value10 != formattedPriceForCollectiblesProduct && r11;
if (r12) {
var priceTagProps = {'priceFormatted': null, 'variant': 'text-md/medium', 'color': 'interactive-text-active',
priceFormatted: formattedPriceForCollectiblesProduct,
accessibilityLabel: intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.kWkpdG,
{price: formattedPriceForCollectiblesProduct})};
moduleValue9 = require(477) /* metro dependency 477: PlatformUtils */;
priceTagProps.style = moduleValue9.isAndroid() ? styles.androidTextPadding : undefined;
priceTagProps.icon = shopDiscountSource === (require(5134) /* metro dependency 5134: CollectiblesUtils */).ShopDiscountSource.THIRDPARTY ? ((TagIcon) => <TagIcon color="interactive-text-active" style={styles.nitroIcon} />)((require(10078) /* metro dependency 10078: TagIcon */).TagIcon) : <NitroWheelIcon color="interactive-text-active" style={styles.nitroIcon} />;
r12 = <PriceTag {...priceTagProps} />;
}
items3[2] = r12;
const view = <View style={styles.priceTagRow}>{items3}</View>;
r10 = value10 != formattedPriceForCollectiblesProduct && !r11;
if (r10) {
var viewBinding2Props = {style: styles.priceTagRow};
var pressableBindingProps = {onPress: onPress_78894, style: styles.subscribeNowPressable,
accessibilityRole: 'button'};
items4 = [<NitroWheelIcon color="interactive-text-default" style={[styles.nitroIcon,
styles.nitroIconSubscribeNow]} />];
moduleValue10 = require(477) /* metro dependency 477: PlatformUtils */;
items4[1] = <Text variant="text-md/normal" color="interactive-text-default" style={moduleValue10.isAndroid() ? styles.androidTextPadding : undefined}>{intl.format((require(1244) /* metro dependency 1244: indexNative */).t.Kxw2LT,
{price: formattedPriceForCollectiblesProduct, subscribeNowHook: subscribeNowHook})}</Text>;
r10 = <View {...viewBinding2Props}><Pressable {...pressableBindingProps}>{items4}</Pressable></View>;
}
return (
<View style={styles.container}>
<View style={styles.priceTagColumn}>
{view}
{r10}
</View>
{value10 != value6.price && <OrbsPriceTag vcData={value6} isProductDisabled={isDisabled} />}
</View>
);
}
function InlinePriceTagOnPress() { // fn#78894, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10290:4040, owner: InlinePriceTag.onPress, offset: 0x01e3b05c, size: 49 bytes, params: 1, frame: 12
var value2;
let onTrackPressBinding = onTrackPress;
if (onTrackPressBinding != null) {
onTrackPressBinding = onTrackPress;
value2 = environment.__proto__;
onTrackPressBinding(ShopCtaEnum.SUBSCRIBE_NOW);
}
env0_2();
}
function subscribeNowHook(a0, a1) { // fn#78895, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10290:4454, owner: InlinePriceTag.subscribeNowHook, offset: 0x01e3b08d, size: 82 bytes, params: 3, frame: 15
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<Text
variant="text-md/normal"
style={styles.underline}
key={a1}
>
{a0}
</Text>
);
}
global.__d(_fun78887, 10104, [31, 27, 5140, 663, 661, 33, 4501, 697, 4573, 10076, 1244, 7594, 5134, 3802, 10105,
10106, 10066, 10107, 566, 10054, 1904, 10075, 477, 10078, 7954,
2]) /* metro module 10104, dependencies: [31, 27, 5140, 663, 661, 33, 4501, 697, 4573, 10076, 1244, 7594, 5134, 3802, 10105, 10106, 10066, 10107, 566, 10054, 1904, 10075, 477, 10078, 7954, 2] */;
@@ -1,81 +1,86 @@
/* Metro module 10056; source: modules/collectibles/native/LimitedTimeBadge.tsx; dependencies: [31, 27, 1949, 1310, 33, 4501, 697, 1244, 566, 4002, 7054, 4573, 2] */
import ThemeStore from '../../user_settings/ThemeStore.tsx'; /* Metro dependency 1310 */
import LocaleStore from '../../user_settings/LocaleStore.tsx'; /* Metro dependency 1949 */
import UseCountdown from '../../../hooks/useCountdown.tsx'; /* Metro dependency 7054 */
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 FluxModule from '../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as CreateStylesModule from '../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as TextModule from '../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
function _fun78619(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#78619, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10242:6, offset: 0x01e2e23e, size: 329 bytes, params: 8, frame: 22
var object3;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_3 = (require(27) /* metro dependency 27 */).View;
const localeStore = importDefault(1949) /* metro dependency 1949: LocaleStore */;
const themeStore = importDefault(1310) /* metro dependency 1310: ThemeStore */;
const env0_6 = (require(33) /* metro dependency 33 */).jsx;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
object3 = {};
const object4 = {'borderRadius': null, 'paddingHorizontal': 8, 'paddingVertical': 2};
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.md;
object3.root = object4;
ReactModule;
const createStyles = CreateStylesModule.createStyles;
object = {};
const object2 = {'borderRadius': null, 'paddingHorizontal': 8, 'paddingVertical': 2};
object2.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.md;
object.root = object2;
const WHITE = (importDefault(697) /* metro dependency 697: native */).colors.WHITE;
object3.backgroundDarkMode = {backgroundColor: WHITE};
object.backgroundDarkMode = {backgroundColor: WHITE};
const BACKGROUND_MOD_STRONG = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_STRONG;
object3.backgroundLightMode = {backgroundColor: BACKGROUND_MOD_STRONG};
const env0_7 = Reflect.apply(createStyles, createStylesModule, [object3]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/LimitedTimeBadge.tsx');
object.backgroundLightMode = {backgroundColor: BACKGROUND_MOD_STRONG};
const env0_7 = Reflect.apply(createStyles, CreateStylesModule, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/native/LimitedTimeBadge.tsx');
exports.default = _default_78620;
}
function _default_78620({unpublishedAt, style}) { // fn#78620, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10242:396, offset: 0x01e2e387, size: 814 bytes, params: 2, frame: 25
var r7;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var value5;
const styles = useStyles();
const fluxModule = require(566) /* metro dependency 566: flux */;
let useStateFromStores = fluxModule.useStateFromStores;
const value2 = Reflect.apply(useStateFromStores, fluxModule, [[ThemeStore], function() {
return require(dependencyMap[9]).isThemeDark(ThemeStore.theme);
}]);
const moduleValue2 = fluxModule;
useStateFromStores = moduleValue2.useStateFromStores;
const value3 = ['en-US', 'en-GB'].includes(Reflect.apply(useStateFromStores, moduleValue2, [[LocaleStore],
function() {
return LocaleStore.locale;
}]));
const {days, hours} = (importDefault(7054) /* metro dependency 7054: useCountdown */)(unpublishedAt, 1000,
undefined, true);
if (value3) {
r7 = days > 1 ? intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.DkxLY0,
{days: days}) : days <= 1 && hours > 0 ? intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.WJieZ2,
{hours: hours}) : intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.WJieZ2,
{hours: 0});
} else {
string = intl.string;
value5 = days + Reflect.apply(string, intl, [t.QJyuxY]);
string = intl.string;
r7 = days > 1 ? value5 : days <= 1 && hours > 0 ? hours + Reflect.apply(string, intl,
[t['1LyF1h']]) : '0' + intl.string((require(1244) /* metro dependency 1244: indexNative */).t['1LyF1h']);
function _default_78620({unpublishedAt, style}) { // fn#78620, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10242:396, offset: 0x01e2e387, size: 814 bytes, params: 2, frame: 25
var r7;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var value5;
const styles = useStyles();
let useStateFromStores = FluxModule.useStateFromStores;
const value2 = Reflect.apply(useStateFromStores, FluxModule, [[ThemeStore], function() {
return require(dependencyMap[9]).isThemeDark(ThemeStore.theme);
}]);
useStateFromStores = FluxModule.useStateFromStores;
const value3 = ['en-US', 'en-GB'].includes(Reflect.apply(useStateFromStores, FluxModule, [[LocaleStore],
function() {
return LocaleStore.locale;
}]));
const {days, hours} = (UseCountdown)(unpublishedAt, 1000,
undefined, true);
if (value3) {
r7 = days > 1 ? intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.DkxLY0,
{days: days}) : days <= 1 && hours > 0 ? intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.WJieZ2,
{hours: hours}) : intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.WJieZ2,
{hours: 0});
} else {
string = intl.string;
value5 = days + Reflect.apply(string, intl, [t.QJyuxY]);
string = intl.string;
r7 = days > 1 ? value5 : days <= 1 && hours > 0 ? hours + Reflect.apply(string, intl,
[t['1LyF1h']]) : '0' + intl.string((require(1244) /* metro dependency 1244: indexNative */).t['1LyF1h']);
}
const items2 = [styles.root];
items2[1] = value2 ? styles.backgroundDarkMode : styles.backgroundLightMode;
items2[2] = style;
const Text = (TextModule).Text;
const r9 = value2 ? 'black' : 'white';
const formatToPlainString = intl.formatToPlainString;
const TlZULM = (require(1244) /* metro dependency 1244: indexNative */).t.TlZULM;
return (
<View style={items2}>
<Text
color={r9}
variant="text-xs/bold"
accessibilityLabel={Reflect.apply(formatToPlainString, intl, [TlZULM, {daysLeft: days}])}
allowFontScaling={false}
>
{r7}
</Text>
</View>
);
}
const items2 = [styles.root];
items2[1] = value2 ? styles.backgroundDarkMode : styles.backgroundLightMode;
items2[2] = style;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const r9 = value2 ? 'black' : 'white';
const formatToPlainString = intl.formatToPlainString;
const TlZULM = (require(1244) /* metro dependency 1244: indexNative */).t.TlZULM;
return (
<View style={items2}>
<Text
color={r9}
variant="text-xs/bold"
accessibilityLabel={Reflect.apply(formatToPlainString, intl, [TlZULM, {daysLeft: days}])}
allowFontScaling={false}
>
{r7}
</Text>
</View>
);
}
global.__d(_fun78619, 10056, [31, 27, 1949, 1310, 33, 4501, 697, 1244, 566, 4002, 7054, 4573,
2]) /* metro module 10056, dependencies: [31, 27, 1949, 1310, 33, 4501, 697, 1244, 566, 4002, 7054, 4573, 2] */;
@@ -1,103 +1,109 @@
/* Metro module 14913; source: modules/collectibles/native/MobileShopButtonCoachmark.tsx; dependencies: [31, 27, 1376, 33, 4501, 697, 14901, 1244, 8543, 2] */
import Native from '../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
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 DismissibleContentConstantsModule from '../../dismissible_content/DismissibleContentConstants.tsx'; /* Metro dependency 1376 */
import * as CreateStylesModule from '../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as UseCoachmarkNativeModule from '../../../design/components/Coachmark/native/useCoachmark.native.tsx'; /* Metro dependency 8543 */
function _fun112824(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#112824, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15110:6, offset: 0x023dd7b7, size: 281 bytes, params: 8, frame: 22
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 */).Image;
const env0_4 = (require(1376) /* metro dependency 1376: DismissibleContentConstants */).ContentDismissActionType;
const env0_5 = (require(33) /* metro dependency 33 */).jsx;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
const object = {'height': 80, 'width': 80};
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object.marginTop = PX_8;
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object.marginBottom = -PX_16;
const env0_6 = Reflect.apply(createStyles, createStylesModule, [{image: object}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/MobileShopButtonCoachmark.tsx');
const createStyles = CreateStylesModule.createStyles;
const object2 = {'height': 80, 'width': 80};
const PX_8 = (Native).space.PX_8;
object2.marginTop = PX_8;
const PX_16 = (Native).space.PX_16;
object2.marginBottom = -PX_16;
const env0_6 = Reflect.apply(createStyles, CreateStylesModule, [{image: object2}]);
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/native/MobileShopButtonCoachmark.tsx');
exports.default = MobileShopButtonCoachmark;
}
function MobileShopButtonCoachmark({marketing, shopButtonRef, navigateToShop, visible, onDismiss}) { // fn#112825, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15110:388, offset: 0x023dd8d0, size: 327 bytes, params: 2, frame: 23
const visible2 = visible;
const styles = useStyles();
const assetLight = marketing.assetLight;
const binding = visible2;
const env0_6 = binding.useRef(false);
const value2 = binding.useCallback(_fun112826, [onDismiss, navigateToShop]);
const value3 = binding.useCallback(_fun112827, [onDismiss]);
const env0_9 = binding.useRef(onDismiss);
binding.useEffect(_fun112828);
binding.useEffect(function() {
return _fun112830;
}, []);
const useMemo = binding.useMemo;
(UseCoachmarkNativeModule).useCoachmark(shopButtonRef, Reflect.apply(useMemo,
binding, [_fun112831, [marketing.title, marketing.body, marketing.buttonLabel, visible, assetLight,
styles.image, value2, value3]]));
return null;
function _fun112826() { // fn#112826, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15110:550, offset: 0x023dda17, size: 49 bytes, params: 1, frame: 12
env0_6.current = true;
const onDismissBinding = onDismiss;
const TAKE_ACTION = ContentDismissActionType.TAKE_ACTION;
onDismissBinding(TAKE_ACTION);
navigateToShop();
}
function MobileShopButtonCoachmark({marketing, shopButtonRef, navigateToShop, visible, onDismiss}) { // fn#112825, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15110:388, offset: 0x023dd8d0, size: 327 bytes, params: 2, frame: 23
const env0_2 = visible;
const styles = useStyles();
const assetLight = marketing.assetLight;
const binding = env0_2;
const env0_6 = binding.useRef(false);
const value2 = binding.useCallback(_fun112826, [onDismiss, navigateToShop]);
const value3 = binding.useCallback(_fun112827, [onDismiss]);
const env0_9 = binding.useRef(onDismiss);
binding.useEffect(_fun112828);
binding.useEffect(function() {
return _fun112830;
}, []);
const useMemo = binding.useMemo;
(require(8543) /* metro dependency 8543: useCoachmarkNative */).useCoachmark(shopButtonRef, Reflect.apply(useMemo,
binding, [_fun112831, [marketing.title, marketing.body, marketing.buttonLabel, visible, assetLight,
styles.image, value2, value3]]));
return null;
}
function _fun112827() { // fn#112827, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15110:615, offset: 0x023dda48, size: 41 bytes, params: 1, frame: 11
env0_6.current = true;
const onDismissBinding = onDismiss;
const USER_DISMISS = ContentDismissActionType.USER_DISMISS;
onDismissBinding(USER_DISMISS);
}
function _fun112826() { // fn#112826, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15110:550, offset: 0x023dda17, size: 49 bytes, params: 1, frame: 12
env0_6.current = true;
const onDismissBinding = onDismiss;
const TAKE_ACTION = ContentDismissActionType.TAKE_ACTION;
onDismissBinding(TAKE_ACTION);
navigateToShop();
}
function _fun112828() { // fn#112828, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15110:685, offset: 0x023dda71, size: 21 bytes, params: 1, frame: 2
env0_9.current = onDismiss;
}
function _fun112827() { // fn#112827, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15110:615, offset: 0x023dda48, size: 41 bytes, params: 1, frame: 11
env0_6.current = true;
const onDismissBinding = onDismiss;
const USER_DISMISS = ContentDismissActionType.USER_DISMISS;
onDismissBinding(USER_DISMISS);
}
function _fun112829() { // fn#112829, offset: 0x023dda86, size: 11 bytes, params: 1, frame: 1
return _fun112830;
function _fun112830() { // fn#112830, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15110:722, offset: 0x023dda91, size: 46 bytes, params: 1, frame: 11
var binding;
let current = env1_6.current;
if (!current) {
binding = env1_9;
current = binding.current;
value = environment.__proto__.__proto__;
Reflect.apply(current, binding, [ContentDismissActionType.AUTO_DISMISS]);
}
}
function _fun112828() { // fn#112828, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15110:685, offset: 0x023dda71, size: 21 bytes, params: 1, frame: 2
env0_9.current = onDismiss;
}
}
function _fun112829() { // fn#112829, offset: 0x023dda86, size: 11 bytes, params: 1, frame: 1
return _fun112830;
}
function _fun112831() { // fn#112831, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15110:787, offset: 0x023ddabf, size: 205 bytes, params: 1, frame: 17
var intl;
const object = {};
const marketingBinding = marketing;
object.title = marketingBinding.title;
object.description = marketingBinding.body;
object.visible = visible;
let r2 = (require(14901) /* metro dependency 14901: YouNavFloatingExperiment */).isYouNavFloating() ? 'top' : 'bottom';
object.position = r2;
object.renderImgComponent = renderImgComponent_112832;
const buttonLabel = marketing.buttonLabel;
if (buttonLabel != null) {
r2 = buttonLabel;
} else {
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
r2 = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.fYfGgK);
}
object.buttonLabel = r2;
object.buttonVariant = 'secondary';
object.onButtonPress = env0_7;
object.onDismiss = env0_8;
return object;
function renderImgComponent_112832() { // fn#112832, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15110:918, offset: 0x023ddb8c, size: 54 bytes, params: 1, frame: 14
return <Image style={styles.image} source={{uri: assetLight}} />;
}
}
function _fun112831() { // fn#112831, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15110:787, offset: 0x023ddabf, size: 205 bytes, params: 1, frame: 17
var intl;
const object2 = {};
const marketingBinding = marketing;
object2.title = marketingBinding.title;
object2.description = marketingBinding.body;
object2.visible = visible;
let r2 = (require(14901) /* metro dependency 14901: YouNavFloatingExperiment */).isYouNavFloating() ? 'top' : 'bottom';
object2.position = r2;
object2.renderImgComponent = renderImgComponent_112832;
const buttonLabel = marketing.buttonLabel;
if (buttonLabel != null) {
r2 = buttonLabel;
} else {
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
r2 = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.fYfGgK);
}
object2.buttonLabel = r2;
object2.buttonVariant = 'secondary';
object2.onButtonPress = env0_7;
object2.onDismiss = env0_8;
return object2;
}
function _fun112830() { // fn#112830, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15110:722, offset: 0x023dda91, size: 46 bytes, params: 1, frame: 11
var binding;
let current = env1_6.current;
if (!current) {
binding = env1_9;
current = binding.current;
value = environment.__proto__.__proto__;
Reflect.apply(current, binding, [ContentDismissActionType.AUTO_DISMISS]);
}
}
function renderImgComponent_112832() { // fn#112832, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15110:918, offset: 0x023ddb8c, size: 54 bytes, params: 1, frame: 14
return <Image style={styles.image} source={{uri: assetLight}} />;
}
global.__d(_fun112824, 14913, [31, 27, 1376, 33, 4501, 697, 14901, 1244, 8543,
2]) /* metro module 14913, dependencies: [31, 27, 1376, 33, 4501, 697, 14901, 1244, 8543, 2] */;
@@ -1,20 +1,26 @@
/* Metro module 10100; source: modules/collectibles/native/NitroIcon.tsx; dependencies: [31, 33, 7744, 2] */
import Module07744 from '../../../by-id/module-07744.js'; /* Metro dependency 7744 */
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 JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as Module07744Module from '../../../by-id/module-07744.js'; /* Metro dependency 7744 */
function _fun78871(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#78871, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10286:6, offset: 0x01e395ac, size: 138 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_3 = (require(33) /* metro dependency 33 */).jsx;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/NitroIcon.tsx');
ReactModule;
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/native/NitroIcon.tsx');
exports.default = NitroIcon;
function NitroIcon({width, height, color}) { // fn#78872, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10286:203, offset: 0x01e39636, size: 146 bytes, params: 2, frame: 19
width = width === undefined ? 106 : width;
height = height === undefined ? 26 : height;
color = color === undefined ? '#ffffff' : color;
const defaultImport = Module07744;
const Path = (Module07744Module).Path;
return ((Component) => <Component width={width} height={height} viewBox="0 0 106 26"><Path fill={color} d="M98.83,8.65L97.58,17.08C97.29,19.08,95.05,20,92.98,20C91.06,20,89.17,19.08,89.42,17.26L90.67,8.65C90.95,6.76,93.2,5.8,95.26,5.8C97.33,5.8,99.11,6.76,98.83,8.65M96.25,0L82.82,0C82.48,0,82.19,0.25,82.14,0.59L81.48,5.05C81.42,5.46,81.75,5.84,82.17,5.84L84.62,5.84C84.87,5.84,85.04,6.09,84.94,6.31C84.63,7.03,84.41,7.81,84.29,8.65L83.04,17.26C82.22,23.03,87.03,25.91,92.27,25.91C97.76,25.91,103.14,23.03,103.96,17.26L105.21,8.65C106.01,3,101.37,0.12,96.25,0M15.58,11.79L15.65,15.97C15.65,16.06,15.59,16.14,15.51,16.16L14.08,11.11C14.08,11.11,14.08,11.1,14.08,11.09L9.66,0.78C9.55,0.52,9.3,0.36,9.03,0.36L4.03,0.36C3.68,0.36,3.39,0.61,3.34,0.95L0.01,24.77C-0.05,25.18,0.27,25.55,0.69,25.55L5.67,25.55C6.02,25.55,6.31,25.3,6.36,24.96L7.66,15.49C7.67,15.49,7.67,15.48,7.67,15.47L7.59,10.61L7.74,10.57L9.23,15.61C9.23,15.62,9.24,15.63,9.24,15.63L13.37,25.14C13.48,25.39,13.73,25.55,14,25.55L19.4,25.55C19.74,25.55,20.03,25.3,20.08,24.96L23.42,1.14C23.47,0.73,23.15,0.36,22.73,0.36L17.78,0.36C17.44,0.36,17.15,0.61,17.1,0.95L15.58,11.77C15.58,11.77,15.58,11.78,15.58,11.79M25.22,25.55L30.2,25.55C30.55,25.55,30.84,25.3,30.89,24.96L34.22,1.14C34.28,0.73,33.96,0.36,33.54,0.36L28.55,0.36C28.21,0.36,27.92,0.61,27.87,0.95L24.54,24.77C24.48,25.18,24.8,25.55,25.22,25.55M37.59,0.91L36.94,5.37C36.87,5.78,37.2,6.16,37.62,6.16L42.83,6.16C43.25,6.16,43.58,6.53,43.52,6.94L41.06,24.77C41.01,25.18,41.33,25.55,41.75,25.55L46.8,25.55C47.15,25.55,47.44,25.3,47.49,24.96L50,6.75C50.04,6.41,50.34,6.16,50.68,6.16L56.29,6.16C56.63,6.16,56.92,5.91,56.97,5.57L57.62,1.11C57.69,0.69,57.36,0.32,56.94,0.32L38.27,0.32C37.93,0.32,37.64,0.57,37.59,0.91M72.92,9.15C72.74,10.61,71.6,12.06,69.64,12.06L66.69,12.06C66.27,12.06,65.95,11.69,66.01,11.28L66.63,6.89C66.68,6.55,66.97,6.3,67.31,6.3L70.46,6.3C72.35,6.3,73.09,7.62,72.92,9.15M71.17,0.36L61.68,0.36C61.34,0.36,61.05,0.61,61,0.95L57.67,24.77C57.61,25.18,57.93,25.55,58.35,25.55L63.4,25.55C63.75,25.55,64.04,25.3,64.09,24.96L65.07,17.84C65.09,17.67,65.24,17.55,65.41,17.55L66.06,17.55C66.18,17.55,66.29,17.61,66.35,17.7L71.18,25.23C71.31,25.43,71.53,25.55,71.76,25.55L78,25.55C78.56,25.55,78.89,24.92,78.57,24.47L73.51,17.24C73.38,17.06,73.45,16.82,73.64,16.73C76.87,15.15,78.75,13.54,79.37,9.04C80.08,3.13,76.37,0.36,71.17,0.36Z" /></Component>)(defaultImport);
}
}
function NitroIcon({width, height, color}) { // fn#78872, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10286:203, offset: 0x01e39636, size: 146 bytes, params: 2, frame: 19
width = width === undefined ? 106 : width;
height = height === undefined ? 26 : height;
color = color === undefined ? '#ffffff' : color;
const defaultImport = importDefault(7744) /* metro dependency 7744 */;
const Path = (require(7744) /* metro dependency 7744 */).Path;
return ((Component) => <Component width={width} height={height} viewBox="0 0 106 26"><Path fill={color} d="M98.83,8.65L97.58,17.08C97.29,19.08,95.05,20,92.98,20C91.06,20,89.17,19.08,89.42,17.26L90.67,8.65C90.95,6.76,93.2,5.8,95.26,5.8C97.33,5.8,99.11,6.76,98.83,8.65M96.25,0L82.82,0C82.48,0,82.19,0.25,82.14,0.59L81.48,5.05C81.42,5.46,81.75,5.84,82.17,5.84L84.62,5.84C84.87,5.84,85.04,6.09,84.94,6.31C84.63,7.03,84.41,7.81,84.29,8.65L83.04,17.26C82.22,23.03,87.03,25.91,92.27,25.91C97.76,25.91,103.14,23.03,103.96,17.26L105.21,8.65C106.01,3,101.37,0.12,96.25,0M15.58,11.79L15.65,15.97C15.65,16.06,15.59,16.14,15.51,16.16L14.08,11.11C14.08,11.11,14.08,11.1,14.08,11.09L9.66,0.78C9.55,0.52,9.3,0.36,9.03,0.36L4.03,0.36C3.68,0.36,3.39,0.61,3.34,0.95L0.01,24.77C-0.05,25.18,0.27,25.55,0.69,25.55L5.67,25.55C6.02,25.55,6.31,25.3,6.36,24.96L7.66,15.49C7.67,15.49,7.67,15.48,7.67,15.47L7.59,10.61L7.74,10.57L9.23,15.61C9.23,15.62,9.24,15.63,9.24,15.63L13.37,25.14C13.48,25.39,13.73,25.55,14,25.55L19.4,25.55C19.74,25.55,20.03,25.3,20.08,24.96L23.42,1.14C23.47,0.73,23.15,0.36,22.73,0.36L17.78,0.36C17.44,0.36,17.15,0.61,17.1,0.95L15.58,11.77C15.58,11.77,15.58,11.78,15.58,11.79M25.22,25.55L30.2,25.55C30.55,25.55,30.84,25.3,30.89,24.96L34.22,1.14C34.28,0.73,33.96,0.36,33.54,0.36L28.55,0.36C28.21,0.36,27.92,0.61,27.87,0.95L24.54,24.77C24.48,25.18,24.8,25.55,25.22,25.55M37.59,0.91L36.94,5.37C36.87,5.78,37.2,6.16,37.62,6.16L42.83,6.16C43.25,6.16,43.58,6.53,43.52,6.94L41.06,24.77C41.01,25.18,41.33,25.55,41.75,25.55L46.8,25.55C47.15,25.55,47.44,25.3,47.49,24.96L50,6.75C50.04,6.41,50.34,6.16,50.68,6.16L56.29,6.16C56.63,6.16,56.92,5.91,56.97,5.57L57.62,1.11C57.69,0.69,57.36,0.32,56.94,0.32L38.27,0.32C37.93,0.32,37.64,0.57,37.59,0.91M72.92,9.15C72.74,10.61,71.6,12.06,69.64,12.06L66.69,12.06C66.27,12.06,65.95,11.69,66.01,11.28L66.63,6.89C66.68,6.55,66.97,6.3,67.31,6.3L70.46,6.3C72.35,6.3,73.09,7.62,72.92,9.15M71.17,0.36L61.68,0.36C61.34,0.36,61.05,0.61,61,0.95L57.67,24.77C57.61,25.18,57.93,25.55,58.35,25.55L63.4,25.55C63.75,25.55,64.04,25.3,64.09,24.96L65.07,17.84C65.09,17.67,65.24,17.55,65.41,17.55L66.06,17.55C66.18,17.55,66.29,17.61,66.35,17.7L71.18,25.23C71.31,25.43,71.53,25.55,71.76,25.55L78,25.55C78.56,25.55,78.89,24.92,78.57,24.47L73.51,17.24C73.38,17.06,73.45,16.82,73.64,16.73C76.87,15.15,78.75,13.54,79.37,9.04C80.08,3.13,76.37,0.36,71.17,0.36Z" /></Component>)(defaultImport);
}
global.__d(_fun78871, 10100, [31, 33, 7744, 2]) /* metro module 10100, dependencies: [31, 33, 7744, 2] */;
@@ -1,172 +1,214 @@
/* Metro module 10122; source: modules/collectibles/native/OrbBadgeCollectedModal.tsx; dependencies: [31, 27, 4502, 33, 4501, 697, 5282, 5080, 10069, 10123, 566, 5475, 10142, 9543, 10143, 6618, 10063, 4573, 1244, 4578, 7613, 10066, 5280, 2] */
import AccessibilityStore from '../../a11y/AccessibilityStore.tsx'; /* Metro dependency 4502 */
import ModalActionCreators from '../../../actions/ModalActionCreators.tsx'; /* Metro dependency 5080 */
import Orb_profile_badge_icon2xPng from '../../../external/discord_assets/assets/orbs/orb_profile_badge_icon-2x.png.js'; /* Metro dependency 10063 */
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 IndexNativeModule from '../../../intl/index.native.tsx'; /* Metro dependency 1244 */
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 NavigatorNativeModule from '../../../design/components/Navigator/native/Navigator.native.tsx'; /* Metro dependency 5280 */
import * as NavigatorHeaderNativeModule from '../../../design/components/Navigator/native/NavigatorHeader.native.tsx'; /* Metro dependency 5282 */
import * as SafeAreaViewModule from '../../../components_native/common/SafeAreaView.tsx'; /* Metro dependency 6618 */
import * as CollectiblesUtilsModule from './CollectiblesUtils.tsx'; /* Metro dependency 10066 */
import * as HooksModule from '../../virtual_currency/hooks/index.tsx'; /* Metro dependency 10069 */
import * as NativeModule from '../../virtual_currency/native/index.tsx'; /* Metro dependency 10123 */
function _fun79002(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#79002, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10308:6, offset: 0x01e40cd1, size: 522 bytes, params: 8, frame: 24
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
let value = ReactNativeModule;
const StyleSheet = value.StyleSheet;
const env0_4 = value.View;
const accessibilityStore = importDefault(4502) /* metro dependency 4502: AccessibilityStore */;
value = require(33) /* metro dependency 33 */;
const env0_6 = value.jsx;
const env0_7 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
object2.root = {flex: 1};
const object4 = {};
copyDataProperties(object4, StyleSheet.absoluteFillObject, undefined);
object2.background = object4;
object2.orbBadge = {'width': 172, 'height': 172, 'alignSelf': 'center'};
object2.main = {flex: 1};
const object6 = {'paddingTop': '50%', 'padding': null, 'flex': 1, 'justifyContent': 'space-between'};
object = {};
object.root = {flex: 1};
const object3 = {};
copyDataProperties(object3, StyleSheet.absoluteFillObject, undefined);
object.background = object3;
object.orbBadge = {'width': 172, 'height': 172, 'alignSelf': 'center'};
object.main = {flex: 1};
const object5 = {'paddingTop': '50%', 'padding': null, 'flex': 1, 'justifyContent': 'space-between'};
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object6.padding = PX_16;
object5.padding = PX_16;
let PX_32 = (importDefault(697) /* metro dependency 697: native */).space.PX_32;
object6.gap = PX_32;
object2.body = object6;
object5.gap = PX_32;
object.body = object5;
PX_32 = (importDefault(697) /* metro dependency 697: native */).space.PX_32;
object2.bottomContainer = {'alignSelf': 'flex-end', 'alignItems': 'stretch', 'gap': null, 'width': '100%',
object.bottomContainer = {'alignSelf': 'flex-end', 'alignItems': 'stretch', 'gap': null, 'width': '100%',
gap: PX_32};
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object2.textContainer = {alignItems: 'center', gap: PX_8};
object2.text = {textAlign: 'center'};
object.textContainer = {alignItems: 'center', gap: PX_8};
object.text = {textAlign: 'center'};
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object2.buttonsContainer = {alignItems: 'stretch', gap: PX_16};
const env0_8 = Reflect.apply(createStyles, value, [object2]);
object2 = {ROOT: 'ROOT'};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/OrbBadgeCollectedModal.tsx');
object.buttonsContainer = {alignItems: 'stretch', gap: PX_16};
const env0_8 = Reflect.apply(createStyles, value, [object]);
object = {ROOT: 'ROOT'};
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/native/OrbBadgeCollectedModal.tsx');
exports.default = OrbBadgeCollectedModal;
}
function OrbBadgeCollectedRootScreen({modalKey, onPressViewBadge}) { // fn#79003, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10308:1185, offset: 0x01e40edb, size: 1049 bytes, params: 2, frame: 41
var r5;
var VideoComponent;
var object;
const styles = useStyles();
const useReducedMotion = (require(566) /* metro dependency 566: flux */).useStateFromStores([AccessibilityStore],
function() {
return AccessibilityStore.useReducedMotion;
});
const value2 = env0_3.useCallback(function() {
onPressViewBadge();
}, [onPressViewBadge]);
const value3 = env0_3.useCallback(_fun79006, [modalKey]);
if (useReducedMotion) {
r5 = ((Component) => <Component source={{uri: importDefault(10142) /* metro dependency 10142: quest_reward_mobile_bg_staticPng */}} style={styles.background} />)(importDefault(5475) /* metro dependency 5475: FastImage */);
} else {
VideoComponent = (require(9543) /* metro dependency 9543: Video */).VideoComponent;
object = {};
object.uri = importDefault(10143) /* metro dependency 10143: quest_reward_mobile_bgMp4 */;
r5 = <VideoComponent source={object} poster={importDefault(10142) /* metro dependency 10142: quest_reward_mobile_bg_staticPng */} style={styles.background} resizeMode="contain" muted pauseWhileAppInactive paused={false} />;
}
const SafeAreaPaddingView = (require(6618) /* metro dependency 6618: SafeAreaView */).SafeAreaPaddingView;
const value6 = ((Component) => <Component source={{uri: importDefault(10063) /* metro dependency 10063: orb_profile_badge_icon2xPng */}} style={styles.orbBadge} />)(importDefault(5475) /* metro dependency 5475: FastImage */);
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
let text = styles.text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const Bal8Cv = (require(1244) /* metro dependency 1244: indexNative */).t.Bal8Cv;
const text2 = <Text variant="heading-xl/bold" color="always-white" style={text}>{Reflect.apply(string, intl,
[Bal8Cv])}</Text>;
text = styles.text;
string = intl.string;
const B25MUf = (require(1244) /* metro dependency 1244: indexNative */).t.B25MUf;
const view = <View style={styles.textContainer}>{text2}<Text variant="text-sm/medium" color="always-white" style={text}>{Reflect.apply(string,
intl, [B25MUf])}</Text></View>;
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
return (
<View style={styles.root}>
{r5}
<SafeAreaPaddingView
style={styles.main}
top
bottom
left
right
function OrbBadgeCollectedRootScreen({modalKey, onPressViewBadge}) { // fn#79003, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10308:1185, offset: 0x01e40edb, size: 1049 bytes, params: 2, frame: 41
var r5;
var VideoComponent;
var object2;
const styles = useStyles();
const useReducedMotion = (require(566) /* metro dependency 566: flux */).useStateFromStores([AccessibilityStore],
function() {
return AccessibilityStore.useReducedMotion;
});
const value2 = ReactModule.useCallback(function() {
onPressViewBadge();
}, [onPressViewBadge]);
const value3 = ReactModule.useCallback(_fun79006, [modalKey]);
if (useReducedMotion) {
r5 = ((Component) => <Component source={{uri: importDefault(10142) /* metro dependency 10142: quest_reward_mobile_bg_staticPng */}} style={styles.background} />)(importDefault(5475) /* metro dependency 5475: FastImage */);
} else {
VideoComponent = (require(9543) /* metro dependency 9543: Video */).VideoComponent;
object2 = {};
object2.uri = importDefault(10143) /* metro dependency 10143: quest_reward_mobile_bgMp4 */;
r5 = (
<VideoComponent
source={object2}
poster={importDefault(10142) /* metro dependency 10142: quest_reward_mobile_bg_staticPng */}
style={styles.background}
resizeMode="contain"
muted
pauseWhileAppInactive
paused={false}
/>
);
}
const SafeAreaPaddingView = (SafeAreaViewModule).SafeAreaPaddingView;
const value6 = ((Component) => <Component source={{uri: Orb_profile_badge_icon2xPng}} style={styles.orbBadge} />)(importDefault(5475) /* metro dependency 5475: FastImage */);
const Text = (TextModule).Text;
let text = styles.text;
const intl = (IndexNativeModule).intl;
let string = intl.string;
const Bal8Cv = (IndexNativeModule).t.Bal8Cv;
const text2 = (
<Text
variant="heading-xl/bold"
color="always-white"
style={text}
>
<View style={styles.body}>
{value6}
<View style={styles.bottomContainer}>
{view}
<View style={styles.buttonsContainer}>
<Button
onPress={value2}
variant="primary"
size="lg"
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.uYLGci)}
/>
<Button
onPress={value3}
variant="secondary"
size="lg"
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['6gF4aS'])}
/>
{Reflect.apply(string, intl, [Bal8Cv])}
</Text>
);
text = styles.text;
string = intl.string;
const B25MUf = (IndexNativeModule).t.B25MUf;
const view = (
<View style={styles.textContainer}>
{text2}
<Text
variant="text-sm/medium"
color="always-white"
style={text}
>
{Reflect.apply(string, intl, [B25MUf])}
</Text>
</View>
);
const Button = (ButtonNativeModule).Button;
return (
<View style={styles.root}>
{r5}
<SafeAreaPaddingView
style={styles.main}
top
bottom
left
right
>
<View style={styles.body}>
{value6}
<View style={styles.bottomContainer}>
{view}
<View style={styles.buttonsContainer}>
<Button
onPress={value2}
variant="primary"
size="lg"
text={intl.string((IndexNativeModule).t.uYLGci)}
/>
<Button
onPress={value3}
variant="secondary"
size="lg"
text={intl.string((IndexNativeModule).t['6gF4aS'])}
/>
</View>
</View>
</View>
</View>
</SafeAreaPaddingView>
</View>
);
}
function screens(a0, a1, a2) { // fn#79007, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10308:736, offset: 0x01e41321, size: 98 bytes, params: 4, frame: 5
const env0_0 = a0;
const env0_1 = a1;
const env0_2 = a2;
const ROOT = env0_9.ROOT;
return {[ROOT]: {'render': null, 'ignoreKeyboard': true, 'fullscreen': true, 'headerLeft': null,
'headerRight': null, 'title': '', render: render_79008, headerLeft: headerLeft_79009,
headerRight: headerRight_79012}};
}
function OrbBadgeCollectedModal({modalKey, onPressViewBadge, orbBalancePriorToPurchase}) { // fn#79013, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10308:2521, offset: 0x01e4149a, size: 125 bytes, params: 2, frame: 19
env0_3.useEffect(_fun79014, []);
const Navigator = (require(5280) /* metro dependency 5280: NavigatorNative */).Navigator;
const navigatorProps = {screens: screens(modalKey, onPressViewBadge, orbBalancePriorToPurchase)};
const ROOT = env0_9.ROOT;
navigatorProps.initialRouteName = ROOT;
return <Navigator {...navigatorProps} />;
}
function _fun79006() { // fn#79006, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10308:1375, offset: 0x01e412f4, size: 45 bytes, params: 1, frame: 12
let value = environment.__proto__;
value = importDefault(5080) /* metro dependency 5080: ModalActionCreators */;
value.popWithKey(modalKey);
}
function screensRender() { // fn#79008, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10308:764, owner: screens.render, offset: 0x01e41383, size: 44 bytes, params: 1, frame: 14
return <OrbBadgeCollectedRootScreen modalKey={env0_0} onPressViewBadge={require} />;
}
function screensHeaderLeft() { // fn#79009, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10308:874, owner: screens.headerLeft, offset: 0x01e413af, size: 25 bytes, params: 1, frame: 11
return HeaderLeft(env0_0);
}
function screensHeaderRight() { // fn#79012, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10308:1013, owner: screens.headerRight, offset: 0x01e41440, size: 90 bytes, params: 1, frame: 16
const hooksModule = require(10069) /* metro dependency 10069: hooks */;
const useFetchVirtualCurrencyBalance = hooksModule.useFetchVirtualCurrencyBalance;
const balance = Reflect.apply(useFetchVirtualCurrencyBalance, hooksModule, []).balance;
const BalanceWidgetPill = (require(10123) /* metro dependency 10123: native */).BalanceWidgetPill;
return <BalanceWidgetPill initialRenderedBalance={importDefault} balance={balance} />;
}
function _fun79014() { // fn#79014, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10308:2634, offset: 0x01e41517, size: 75 bytes, params: 1, frame: 15
let value = environment.__proto__;
value = require(7613) /* metro dependency 7613: UserProfileActionCreators */;
value.pinUserProfileBadgesOnClient([(require(10066) /* metro dependency 10066: CollectiblesUtils */).createOrbProfileBadge()],
600);
}
function HeaderLeft(a0) { // fn#79010, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10308:878, owner: screens.headerLeft.HeaderLeft, offset: 0x01e413c8, size: 75 bytes, params: 2, frame: 14
const env0_0 = a0;
return ((Component) => <Component tintColor="white" />)((require(5282) /* metro dependency 5282: NavigatorHeaderNative */).getHeaderCloseButton(_fun79011));
}
function _fun79011() { // fn#79011, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10308:937, offset: 0x01e41413, size: 45 bytes, params: 1, frame: 11
const value = environment.__proto__.__proto__.__proto__;
return (importDefault(5080) /* metro dependency 5080: ModalActionCreators */).popWithKey(env0_0);
</SafeAreaPaddingView>
</View>
);
function _fun79006() { // fn#79006, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10308:1375, offset: 0x01e412f4, size: 45 bytes, params: 1, frame: 12
let value = environment.__proto__;
value = importDefault(5080) /* metro dependency 5080: ModalActionCreators */;
value.popWithKey(modalKey);
}
}
function screens(a0, a1, a2) { // fn#79007, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10308:736, offset: 0x01e41321, size: 98 bytes, params: 4, frame: 5
const env0_0 = a0;
const env0_1 = a1;
const env0_2 = a2;
const ROOT = env0_9.ROOT;
return {[ROOT]: {'render': null, 'ignoreKeyboard': true, 'fullscreen': true, 'headerLeft': null,
'headerRight': null, 'title': '', render: render_79008, headerLeft: headerLeft_79009,
headerRight: headerRight_79012}};
function screensRender() { // fn#79008, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10308:764, owner: screens.render, offset: 0x01e41383, size: 44 bytes, params: 1, frame: 14
return <OrbBadgeCollectedRootScreen modalKey={env0_0} onPressViewBadge={require} />;
}
function screensHeaderLeft() { // fn#79009, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10308:874, owner: screens.headerLeft, offset: 0x01e413af, size: 25 bytes, params: 1, frame: 11
return HeaderLeft(env0_0);
function HeaderLeft(a0) { // fn#79010, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10308:878, owner: screens.headerLeft.HeaderLeft, offset: 0x01e413c8, size: 75 bytes, params: 2, frame: 14
const env0_0 = a0;
return ((Component) => <Component tintColor="white" />)((NavigatorHeaderNativeModule).getHeaderCloseButton(_fun79011));
function _fun79011() { // fn#79011, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10308:937, offset: 0x01e41413, size: 45 bytes, params: 1, frame: 11
const value = environment.__proto__.__proto__.__proto__;
return (ModalActionCreators).popWithKey(env0_0);
}
}
}
function screensHeaderRight() { // fn#79012, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10308:1013, owner: screens.headerRight, offset: 0x01e41440, size: 90 bytes, params: 1, frame: 16
const useFetchVirtualCurrencyBalance = HooksModule.useFetchVirtualCurrencyBalance;
const balance = Reflect.apply(useFetchVirtualCurrencyBalance, HooksModule, []).balance;
const BalanceWidgetPill = (NativeModule).BalanceWidgetPill;
return <BalanceWidgetPill initialRenderedBalance={importDefault} balance={balance} />;
}
}
function OrbBadgeCollectedModal({modalKey, onPressViewBadge, orbBalancePriorToPurchase}) { // fn#79013, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10308:2521, offset: 0x01e4149a, size: 125 bytes, params: 2, frame: 19
ReactModule.useEffect(_fun79014, []);
const Navigator = (NavigatorNativeModule).Navigator;
const navigatorProps = {screens: screens(modalKey, onPressViewBadge, orbBalancePriorToPurchase)};
const ROOT = env0_9.ROOT;
navigatorProps.initialRouteName = ROOT;
return <Navigator {...navigatorProps} />;
function _fun79014() { // fn#79014, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10308:2634, offset: 0x01e41517, size: 75 bytes, params: 1, frame: 15
let value = environment.__proto__;
value = require(7613) /* metro dependency 7613: UserProfileActionCreators */;
value.pinUserProfileBadgesOnClient([(CollectiblesUtilsModule).createOrbProfileBadge()],
600);
}
}
}
global.__d(_fun79002, 10122, [31, 27, 4502, 33, 4501, 697, 5282, 5080, 10069, 10123, 566, 5475, 10142, 9543, 10143,
6618, 10063, 4573, 1244, 4578, 7613, 10066, 5280,
2]) /* metro module 10122, dependencies: [31, 27, 4502, 33, 4501, 697, 5282, 5080, 10069, 10123, 566, 5475, 10142, 9543, 10143, 6618, 10063, 4573, 1244, 4578, 7613, 10066, 5280, 2] */;
@@ -1,32 +1,41 @@
/* Metro module 10101; source: modules/collectibles/native/OrbBadgePreview.tsx; dependencies: [31, 27, 33, 4501, 7594, 8489, 10066, 1244, 2] */
import UserProfilePreview from '../../user_profile/native/UserProfilePreview.tsx'; /* Metro dependency 8489 */
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 IndexNativeModule from '../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as CreateStylesModule from '../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as UseCurrentUserModule from '../hooks/useCurrentUser.tsx'; /* Metro dependency 7594 */
import * as CollectiblesUtilsModule from './CollectiblesUtils.tsx'; /* Metro dependency 10066 */
function _fun78873(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#78873, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10287:6, offset: 0x01e396c8, size: 205 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_3 = (require(27) /* metro dependency 27 */).View;
const env0_4 = (require(33) /* metro dependency 33 */).jsx;
const env0_5 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({container: {'flex': 1,
ReactModule;
const env0_5 = (CreateStylesModule).createStyles({container: {'flex': 1,
'justifyContent': 'center', 'alignItems': 'center'}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/OrbBadgePreview.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/native/OrbBadgePreview.tsx');
exports.OrbBadgePreview = OrbBadgePreview;
function OrbBadgePreview() { // fn#78874, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10287:321, offset: 0x01e39795, size: 197 bytes, params: 1, frame: 20
const styles = useStyles();
const value2 = (UseCurrentUserModule).useCurrentUser();
const items2 = [(CollectiblesUtilsModule).createOrbProfileBadge()];
const intl = (IndexNativeModule).intl;
return (
<View style={styles.container}>
<UserProfilePreview
compact
user={value2}
additionalBadges={items2}
accessibilityLabel={intl.string((IndexNativeModule).t.bxcI6Y)}
/>
</View>
);
}
}
function OrbBadgePreview() { // fn#78874, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10287:321, offset: 0x01e39795, size: 197 bytes, params: 1, frame: 20
const styles = useStyles();
const value2 = (require(7594) /* metro dependency 7594: useCurrentUser */).useCurrentUser();
const UserProfilePreview = importDefault(8489) /* metro dependency 8489: UserProfilePreview */;
const items2 = [(require(10066) /* metro dependency 10066: CollectiblesUtils */).createOrbProfileBadge()];
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
return (
<View style={styles.container}>
<UserProfilePreview
compact
user={value2}
additionalBadges={items2}
accessibilityLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.bxcI6Y)}
/>
</View>
);
}
global.__d(_fun78873, 10101, [31, 27, 33, 4501, 7594, 8489, 10066, 1244,
2]) /* metro module 10101, dependencies: [31, 27, 33, 4501, 7594, 8489, 10066, 1244, 2] */;
@@ -1,17 +1,21 @@
/* Metro module 10497; source: modules/collectibles/native/OrbsBadgeCoachmark.tsx; dependencies: [31, 27, 33, 4501, 10498, 1244, 4008, 8543, 2] */
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 CreateStylesModule from '../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
function _fun81200(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#81200, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10683:6, offset: 0x01e9e0c2, size: 276 bytes, params: 8, frame: 20
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
let value = ReactNativeModule;
const env0_4 = value.View;
const env0_5 = value.Image;
const env0_6 = (require(33) /* metro dependency 33 */).jsx;
const env0_7 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({coachmarkImageContainer: {'alignItems': 'center',
const env0_7 = (CreateStylesModule).createStyles({coachmarkImageContainer: {'alignItems': 'center',
'justifyContent': 'center'}, coachmarkImage: {'width': 80, 'height': 80},
coachmarkDescription: {marginBottom: -10}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/OrbsBadgeCoachmark.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/native/OrbsBadgeCoachmark.tsx');
exports.default = function(a0) {
var r5;
var badgeRef = a0.badgeRef;
@@ -22,49 +26,54 @@ function _fun81200(global, require, importDefault, importAll, module, exports, d
return null;
};
exports.useOrbsBadgeCoachmark = useOrbsBadgeCoachmark;
}
function OrbsBadgeCoachmarkImg() { // fn#81201, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10683:321, offset: 0x01e9e1d6, size: 101 bytes, params: 1, frame: 21
const styles = useStyles();
const object = {};
object.uri = importDefault(10498) /* metro dependency 10498: orbs_badge_assetPng */;
return (
<View style={styles.coachmarkImageContainer}>
<Image source={object} style={styles.coachmarkImage} />
</View>
);
}
function useOrbsBadgeCoachmark({disabled}) { // fn#81203, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10683:682, offset: 0x01e9e283, size: 87 bytes, params: 2, frame: 16
const styles = useStyles();
const binding = env0_3;
const useMemo = binding.useMemo;
return disabled ? null : {props: Reflect.apply(useMemo, binding, [_fun81204, [disabled,
styles.coachmarkDescription]])};
}
function _fun81204() { // fn#81204, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10683:750, offset: 0x01e9e2da, size: 153 bytes, params: 1, frame: 18
const object2 = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object2.title = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['4ivm+P']);
object2.description = <View style={styles.coachmarkDescription} />;
object2.position = 'bottom';
object2.visible = !disabled;
object2.onDismiss = onDismiss_81205;
object2.renderImgComponent = renderImgComponent_81206;
return object2;
}
function onDismiss_81205() { // fn#81205, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10683:890, offset: 0x01e9e373, size: 78 bytes, params: 1, frame: 13
let value = environment.__proto__.__proto__;
value = require(4008) /* metro dependency 4008: RootNavigationRefNative */;
value = value.getRootNavigationRef();
if (value != null) {
if (value.isReady()) {
value.setParams({showOrbsBadgeCoachmark: undefined});
return undefined;
}
function OrbsBadgeCoachmarkImg() { // fn#81201, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10683:321, offset: 0x01e9e1d6, size: 101 bytes, params: 1, frame: 21
const styles = useStyles();
const object2 = {};
object2.uri = importDefault(10498) /* metro dependency 10498: orbs_badge_assetPng */;
return (
<View style={styles.coachmarkImageContainer}>
<Image source={object2} style={styles.coachmarkImage} />
</View>
);
}
return false;
function useOrbsBadgeCoachmark({disabled}) { // fn#81203, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10683:682, offset: 0x01e9e283, size: 87 bytes, params: 2, frame: 16
const styles = useStyles();
const useMemo = ReactModule.useMemo;
return disabled ? null : {props: Reflect.apply(useMemo, ReactModule, [_fun81204, [disabled,
styles.coachmarkDescription]])};
function _fun81204() { // fn#81204, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10683:750, offset: 0x01e9e2da, size: 153 bytes, params: 1, frame: 18
const object = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object.title = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['4ivm+P']);
object.description = <View style={styles.coachmarkDescription} />;
object.position = 'bottom';
object.visible = !disabled;
object.onDismiss = onDismiss_81205;
object.renderImgComponent = renderImgComponent_81206;
return object;
function onDismiss_81205() { // fn#81205, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10683:890, offset: 0x01e9e373, size: 78 bytes, params: 1, frame: 13
let value = environment.__proto__.__proto__;
value = require(4008) /* metro dependency 4008: RootNavigationRefNative */;
value = value.getRootNavigationRef();
if (value != null) {
if (value.isReady()) {
value.setParams({showOrbsBadgeCoachmark: undefined});
return undefined;
}
}
return false;
}
function renderImgComponent_81206() { // fn#81206, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10683:1031, offset: 0x01e9e3c1, size: 23 bytes, params: 1, frame: 13
return <OrbsBadgeCoachmarkImg />;
}
}
}
}
global.__d(_fun81200, 10497, [31, 27, 33, 4501, 10498, 1244, 4008, 8543,
2]) /* metro module 10497, dependencies: [31, 27, 33, 4501, 10498, 1244, 4008, 8543, 2] */;
@@ -1,60 +1,92 @@
/* Metro module 14072; source: modules/collectibles/native/PersonalizationDisclaimerActionSheet.tsx; dependencies: [31, 661, 33, 4501, 697, 3853, 1948, 6275, 4573, 1244, 6261, 4578, 6249, 4080, 2] */
import Native from '../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import ActionSheetActionCreators from '../../action_sheet/native/ActionSheetActionCreators.tsx'; /* Metro dependency 4080 */
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 JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
import * as IndexNativeModule from '../../../intl/index.native.tsx'; /* Metro dependency 1244 */
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 LinkExternalSmallIconModule from '../../../design/components/Icon/native/redesign/generated/LinkExternalSmallIcon.tsx'; /* Metro dependency 6249 */
import * as ButtonGroupNativeModule from '../../../design/components/ButtonGroup/native/ButtonGroup.native.tsx'; /* Metro dependency 6261 */
import * as BottomSheetNativeModule from '../../../design/components/Sheet/native/BottomSheet.native.tsx'; /* Metro dependency 6275 */
function _fun106671(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#106671, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14269:6, offset: 0x022e5e65, size: 276 bytes, params: 8, frame: 22
var object2;
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(661) /* metro dependency 661: Constants */).HelpdeskArticles;
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;
object2 = {};
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object2.container = {paddingHorizontal: PX_16};
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object2.header = {'paddingVertical': null, 'alignSelf': 'center', 'textAlign': 'center', paddingVertical: PX_8};
const env0_7 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/PersonalizationDisclaimerActionSheet.tsx');
object = {};
const PX_16 = (Native).space.PX_16;
object.container = {paddingHorizontal: PX_16};
const PX_8 = (Native).space.PX_8;
object.header = {'paddingVertical': null, 'alignSelf': 'center', 'textAlign': 'center', paddingVertical: PX_8};
const env0_7 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/native/PersonalizationDisclaimerActionSheet.tsx');
exports.default = _default_106672;
function _default_106672() { // fn#106672, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14269:327, offset: 0x022e5f79, size: 500 bytes, params: 1, frame: 29
const styles = useStyles();
const value2 = ReactModule.useCallback(function() {
importDefault(dependencyMap[5]).openURL(importDefault(dependencyMap[6]).getArticleURL(HelpdeskArticles.DATA_USED_FOR_RECOMMENDED));
}, []);
const BottomSheet = (BottomSheetNativeModule).BottomSheet;
const Text = (TextModule).Text;
const intl = (IndexNativeModule).intl;
let string = intl.string;
const text = (
<Text
variant="heading-md/medium"
color="mobile-text-heading-primary"
accessibilityRole="header"
style={styles.header}
>
{Reflect.apply(string, intl, [(IndexNativeModule).t.euks4U])}
</Text>
);
const ButtonGroup = (ButtonGroupNativeModule).ButtonGroup;
const Button = (ButtonNativeModule).Button;
string = intl.string;
const hvVgAZ = (IndexNativeModule).t.hvVgAZ;
const LinkExternalSmallIcon = (LinkExternalSmallIconModule).LinkExternalSmallIcon;
const WHITE = (Native).colors.WHITE;
const button = (
<Button
size="lg"
text={Reflect.apply(string, intl, [hvVgAZ])}
onPress={value2}
icon={<LinkExternalSmallIcon color={WHITE} />}
iconPosition="end"
/>
);
string = intl.string;
const WAI6xu = (IndexNativeModule).t.WAI6xu;
return (
<BottomSheet contentStyles={styles.container}>
{text}
<ButtonGroup>
{button}
<Button
variant="tertiary"
size="lg"
text={Reflect.apply(string, intl, [WAI6xu])}
onPress={onPress_106674}
/>
</ButtonGroup>
</BottomSheet>
);
function _default_106672OnPress() { // fn#106674, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14269:979, owner: _default_106672.onPress, offset: 0x022e61b4, size: 37 bytes, params: 1, frame: 11
const value = environment.__proto__;
return (ActionSheetActionCreators).hideActionSheet();
}
}
}
function _default_106672() { // fn#106672, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14269:327, offset: 0x022e5f79, size: 500 bytes, params: 1, frame: 29
const styles = useStyles();
const value2 = env0_3.useCallback(function() {
importDefault(dependencyMap[5]).openURL(importDefault(dependencyMap[6]).getArticleURL(HelpdeskArticles.DATA_USED_FOR_RECOMMENDED));
}, []);
const BottomSheet = (require(6275) /* metro dependency 6275: BottomSheetNative */).BottomSheet;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const text = <Text variant="heading-md/medium" color="mobile-text-heading-primary" accessibilityRole="header" style={styles.header}>{Reflect.apply(string,
intl, [(require(1244) /* metro dependency 1244: indexNative */).t.euks4U])}</Text>;
const ButtonGroup = (require(6261) /* metro dependency 6261: ButtonGroupNative */).ButtonGroup;
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
string = intl.string;
const hvVgAZ = (require(1244) /* metro dependency 1244: indexNative */).t.hvVgAZ;
const LinkExternalSmallIcon = (require(6249) /* metro dependency 6249: LinkExternalSmallIcon */).LinkExternalSmallIcon;
const WHITE = (importDefault(697) /* metro dependency 697: native */).colors.WHITE;
const button = <Button size="lg" text={Reflect.apply(string, intl,
[hvVgAZ])} onPress={value2} icon={<LinkExternalSmallIcon color={WHITE} />} iconPosition="end" />;
string = intl.string;
const WAI6xu = (require(1244) /* metro dependency 1244: indexNative */).t.WAI6xu;
return (
<BottomSheet contentStyles={styles.container}>
{text}
<ButtonGroup>
{button}
<Button
variant="tertiary"
size="lg"
text={Reflect.apply(string, intl, [WAI6xu])}
onPress={onPress_106674}
/>
</ButtonGroup>
</BottomSheet>
);
}
global.__d(_fun106671, 14072, [31, 661, 33, 4501, 697, 3853, 1948, 6275, 4573, 1244, 6261, 4578, 6249, 4080,
2]) /* metro module 14072, dependencies: [31, 661, 33, 4501, 697, 3853, 1948, 6275, 4573, 1244, 6261, 4578, 6249, 4080, 2] */;
@@ -1,19 +1,47 @@
/* Metro module 10086; source: modules/collectibles/native/ProductDetailsActionSheet.tsx; dependencies: [57, 31, 27, 663, 661, 482, 33, 4501, 697, 4582, 3868, 4002, 1244, 8999, 1904, 7594, 8743, 10085, 7334, 6771, 6789, 5133, 10087, 10088, 10023, 8742, 480, 7609, 683, 10054, 6275, 6277, 10057, 10089, 1305, 10090, 10102, 10108, 10109, 7335, 10111, 477, 2] */
import Module00057 from '../../../by-id/module-00057.js'; /* Metro dependency 57 */
import AnalyticsUtils from '../../../utils/AnalyticsUtils.tsx'; /* Metro dependency 683 */
import Native from '../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import UseAnalyticsLocations from '../../app_analytics/useAnalyticsLocations.tsx'; /* Metro dependency 6771 */
import AnalyticsLocation from '../../app_analytics/AnalyticsLocation.tsx'; /* Metro dependency 6789 */
import UseTrackImpression from '../../app_analytics/useTrackImpression.tsx'; /* Metro dependency 8742 */
import ShowUserProfileActionSheet from '../../user_profile/native/showUserProfileActionSheet.tsx'; /* Metro dependency 8743 */
import WishlistButton from './WishlistButton.tsx'; /* Metro dependency 10057 */
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 AnalyticsUtilsModule from '../../../external/discord_common/js/packages/analytics-utils/AnalyticsUtils.tsx'; /* Metro dependency 480 */
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
import * as CollectiblesShopConstantsModule from '../CollectiblesShopConstants.tsx'; /* Metro dependency 663 */
import * as NativeModule from '../../../design/void/native.tsx'; /* Metro dependency 1305 */
import * as CollectiblesItemTypeModule from '../../../external/discord_common/js/shared/shared-constants/CollectiblesItemType.tsx'; /* Metro dependency 1904 */
import * as NativeModule2 from '../../../external/discord_common/js/packages/design/native.tsx'; /* Metro dependency 3868 */
import * as SharedModule from '../../../design/shared.tsx'; /* Metro dependency 4002 */
import * as ButtonConstantsNativeModule from '../../../design/components/Button/native/ButtonConstants.native.tsx'; /* Metro dependency 4582 */
import * as CollectiblesProductUtilsModule from '../utils/CollectiblesProductUtils.tsx'; /* Metro dependency 5133 */
import * as BottomSheetNativeModule from '../../../design/components/Sheet/native/BottomSheet.native.tsx'; /* Metro dependency 6275 */
import * as Module06277Module from '../../../by-id/module-06277.js'; /* Metro dependency 6277 */
import * as UseAnalyticsLocationsModule from '../../app_analytics/useAnalyticsLocations.tsx'; /* Metro dependency 6771 */
import * as ACOMExperimentsModule from '../../billing/native/ACOMExperiments.tsx'; /* Metro dependency 7334 */
import * as UseCurrentUserModule from '../hooks/useCurrentUser.tsx'; /* Metro dependency 7594 */
import * as UseShopProductItemsModule from '../hooks/useShopProductItems.tsx'; /* Metro dependency 7609 */
import * as EyeIconModule from '../../../design/components/Icon/native/redesign/generated/EyeIcon.tsx'; /* Metro dependency 8999 */
import * as CollectiblesAnalyticsContextModule from '../CollectiblesAnalyticsContext.tsx'; /* Metro dependency 10023 */
import * as UseCanPurchaseFramesModule from '../hooks/useCanPurchaseFrames.tsx'; /* Metro dependency 10054 */
import * as OpenProductDetailsActionSheetModule from './openProductDetailsActionSheet.tsx'; /* Metro dependency 10085 */
import * as UseTrackPdpClickModule from '../hooks/useTrackPdpClick.tsx'; /* Metro dependency 10087 */
import * as UsePreviewCollectbilesProductModule from '../hooks/usePreviewCollectbilesProduct.tsx'; /* Metro dependency 10088 */
import * as NativePaymentContextModule from '../../payments/native/NativePaymentContext.tsx'; /* Metro dependency 10109 */
function _fun78790(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#78790, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10272:6, offset: 0x01e34767, size: 809 bytes, params: 8, frame: 26
var object6;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
let value = require(31) /* metro dependency 31 */;
let value = ReactModule;
const env0_5 = value.useCallback;
const env0_6 = value.useMemo;
value = require(27) /* metro dependency 27 */;
const env0_7 = value.Pressable;
const env0_8 = value.View;
const env0_9 = (require(663) /* metro dependency 663: CollectiblesShopConstants */).ShopCtaEnum;
const env0_10 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
value = require(482) /* metro dependency 482: Constants */;
const env0_11 = value.PaymentGateways;
const env0_12 = value.ThemeTypes;
@@ -24,270 +52,287 @@ function _fun78790(global, require, importDefault, importAll, module, exports, d
const env0_16 = {};
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object6 = {container: {'position': 'relative', 'flex': 1}};
const object7 = {'position': 'absolute', 'top': 0, 'right': null, 'zIndex': 2, 'flexDirection': 'row'};
object = {container: {'position': 'relative', 'flex': 1}};
const object2 = {'position': 'absolute', 'top': 0, 'right': null, 'zIndex': 2, 'flexDirection': 'row'};
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object7.right = PX_16;
object2.right = PX_16;
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object7.gap = PX_8;
object6.actionButtons = object7;
const object8 = {'width': null, 'height': null, 'alignItems': 'center', 'justifyContent': 'center',
object2.gap = PX_8;
object.actionButtons = object2;
const object3 = {'width': null, 'height': null, 'alignItems': 'center', 'justifyContent': 'center',
'borderRadius': null, 'borderWidth': 1};
const MEDIUM_BUTTON_HEIGHT = (require(4582) /* metro dependency 4582: ButtonConstantsNative */).MEDIUM_BUTTON_HEIGHT;
object8.width = MEDIUM_BUTTON_HEIGHT;
object8.height = MEDIUM_BUTTON_HEIGHT;
object8.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
const MEDIUM_BUTTON_HEIGHT = (ButtonConstantsNativeModule).MEDIUM_BUTTON_HEIGHT;
object3.width = MEDIUM_BUTTON_HEIGHT;
object3.height = MEDIUM_BUTTON_HEIGHT;
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
const CONTROL_SECONDARY_BORDER_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.CONTROL_SECONDARY_BORDER_DEFAULT;
object8.borderColor = CONTROL_SECONDARY_BORDER_DEFAULT;
object6.previewProfileButton = object8;
const object9 = {};
object9.backgroundColor = (require(3868) /* metro dependency 3868: native */).setColorOpacity('white', 0.72);
object6.previewProfileButtonLight = object9;
const object10 = {};
object10.backgroundColor = (require(3868) /* metro dependency 3868: native */).setColorOpacity('white', 0.62);
object6.previewProfileButtonLightPressed = object10;
object3.borderColor = CONTROL_SECONDARY_BORDER_DEFAULT;
object.previewProfileButton = object3;
const object4 = {};
object4.backgroundColor = (require(3868) /* metro dependency 3868: native */).setColorOpacity('white', 0.72);
object.previewProfileButtonLight = object4;
const object5 = {};
object5.backgroundColor = (require(3868) /* metro dependency 3868: native */).setColorOpacity('white', 0.62);
object.previewProfileButtonLightPressed = object5;
const CONTROL_OVERLAY_SECONDARY_BACKGROUND_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.CONTROL_OVERLAY_SECONDARY_BACKGROUND_DEFAULT;
object6.previewProfileButtonDark = {backgroundColor: CONTROL_OVERLAY_SECONDARY_BACKGROUND_DEFAULT};
object.previewProfileButtonDark = {backgroundColor: CONTROL_OVERLAY_SECONDARY_BACKGROUND_DEFAULT};
const CONTROL_OVERLAY_SECONDARY_BACKGROUND_ACTIVE = (importDefault(697) /* metro dependency 697: native */).colors.CONTROL_OVERLAY_SECONDARY_BACKGROUND_ACTIVE;
object6.previewProfileButtonDarkPressed = {backgroundColor: CONTROL_OVERLAY_SECONDARY_BACKGROUND_ACTIVE};
object.previewProfileButtonDarkPressed = {backgroundColor: CONTROL_OVERLAY_SECONDARY_BACKGROUND_ACTIVE};
const BORDER_STRONG = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_STRONG;
object6.previewProfileButtonMidnight = {borderColor: BORDER_STRONG};
object.previewProfileButtonMidnight = {borderColor: BORDER_STRONG};
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object6.badgeWrapper = {'position': 'absolute', 'top': 0, 'left': null, 'zIndex': 2, left: PX_16};
const env0_17 = Reflect.apply(createStyles, value, [object6]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/ProductDetailsActionSheet.tsx');
object.badgeWrapper = {'position': 'absolute', 'top': 0, 'left': null, 'zIndex': 2, left: PX_16};
const env0_17 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/native/ProductDetailsActionSheet.tsx');
exports.default = ProductDetailsActionSheet;
}
function PreviewProfileTrigger({handlePreviewPress, onTrackPress}) { // fn#78791, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10272:1284, offset: 0x01e34a90, size: 376 bytes, params: 2, frame: 19
const styles = useStyles();
const nativeModule = NativeModule2;
const useThemeContext = nativeModule.useThemeContext;
const theme = Reflect.apply(useThemeContext, nativeModule, []).theme;
const isThemeLight2 = (SharedModule).isThemeLight(theme);
const MIDNIGHT = ThemeTypes.MIDNIGHT;
const result = theme === MIDNIGHT;
const env0_4 = isThemeLight2 ? styles.previewProfileButtonLight : styles.previewProfileButtonDark;
const env0_5 = isThemeLight2 ? styles.previewProfileButtonLightPressed : styles.previewProfileButtonDarkPressed;
const binding = env0_4;
const useCallback = binding.useCallback;
let object = [handlePreviewPress, onTrackPress];
object = {style: style_78793, onPress: Reflect.apply(useCallback, binding, [function() {
onTrackPress(ShopCtaEnum.FULL_PROFILE_PREVIEW_BUTTON);
handlePreviewPress();
}, object]), accessibilityRole: 'button'};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object.accessibilityLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['3Qcx6K']);
const EyeIcon = (EyeIconModule).EyeIcon;
const INTERACTIVE_ICON_DEFAULT = (Native).colors.INTERACTIVE_ICON_DEFAULT;
return (
<Pressable {...object}>
<EyeIcon size="md" color={INTERACTIVE_ICON_DEFAULT} />
</Pressable>
);
function PreviewProfileTriggerStyle({pressed}) { // fn#78793, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10272:1661, owner: PreviewProfileTrigger.style, offset: 0x01e34c2d, size: 72 bytes, params: 2, frame: 5
return [styles.previewProfileButton, env0_4, result && styles.previewProfileButtonMidnight, pressed && env0_5];
}
function PreviewProfileTrigger({handlePreviewPress, onTrackPress}) { // fn#78791, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10272:1284, offset: 0x01e34a90, size: 376 bytes, params: 2, frame: 19
const styles = useStyles();
const nativeModule = require(3868) /* metro dependency 3868: native */;
const useThemeContext = nativeModule.useThemeContext;
const theme = Reflect.apply(useThemeContext, nativeModule, []).theme;
const isThemeLight2 = (require(4002) /* metro dependency 4002: shared */).isThemeLight(theme);
const MIDNIGHT = ThemeTypes.MIDNIGHT;
const result = theme === MIDNIGHT;
const env0_4 = isThemeLight2 ? styles.previewProfileButtonLight : styles.previewProfileButtonDark;
const env0_5 = isThemeLight2 ? styles.previewProfileButtonLightPressed : styles.previewProfileButtonDarkPressed;
const binding = env0_4;
const useCallback = binding.useCallback;
let object = [handlePreviewPress, onTrackPress];
object = {style: style_78793, onPress: Reflect.apply(useCallback, binding, [function() {
onTrackPress(ShopCtaEnum.FULL_PROFILE_PREVIEW_BUTTON);
handlePreviewPress();
}, object]), accessibilityRole: 'button'};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object.accessibilityLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['3Qcx6K']);
const EyeIcon = (require(8999) /* metro dependency 8999: EyeIcon */).EyeIcon;
const INTERACTIVE_ICON_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_ICON_DEFAULT;
return (
<Pressable {...object}>
<EyeIcon size="md" color={INTERACTIVE_ICON_DEFAULT} />
</Pressable>
);
}
function ProductDetailsActionSheetInner({product, initialVariantIndex, analyticsLocations = [], paymentGateway}) { // fn#78794, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10272:1930, offset: 0x01e34c75, size: 2090 bytes, params: 2, frame: 48
const Spacer = (require(1305) /* metro dependency 1305: native */).Spacer;
var r8;
var r24;
initialVariantIndex = initialVariantIndex === undefined ? 0 : initialVariantIndex;
let env0_3 = undefined;
let env0_4 = undefined;
const OTPACOMOrderExperiment = (require(7334) /* metro dependency 7334: ACOMExperiments */).OTPACOMOrderExperiment;
const useConfig = OTPACOMOrderExperiment.useConfig;
const enabled = Reflect.apply(useConfig, OTPACOMOrderExperiment,
[{location: 'ProductDetailsActionSheetInner'}]).enabled;
const styles = useStyles();
let binding = env0_4;
const value4 = binding.useRef(null);
const value5 = env0_4.useRef(null);
const defaultImport = importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */;
let object = [];
const value6 = arraySpread(object, analyticsLocations, 0, undefined);
const COLLECTIBLES_SHOP_PROFILE_PREVIEW = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).COLLECTIBLES_SHOP_PROFILE_PREVIEW;
object[value6] = COLLECTIBLES_SHOP_PROFILE_PREVIEW;
value6 + 1;
analyticsLocations = defaultImport(object).analyticsLocations;
binding = env0_4;
let useState = binding.useState;
const value8 = env0_3(Reflect.apply(useState, binding, [true]), 2);
var property = value8[0];
const property2 = value8[1];
env0_3 = property2;
const value9 = useMemo(_fun78795, [product]);
const [property3, property4] = env0_3(env0_4.useState(initialVariantIndex), 2);
const selectedProduct = (require(5133) /* metro dependency 5133: CollectiblesProductUtils */).getSelectedProduct(product,
property3);
const value13 = (require(10087) /* metro dependency 10087: useTrackPdpClick */).useTrackPdpClick({skuId: selectedProduct.skuId,
productSkuIds: value9, analyticsLocations: analyticsLocations});
env0_4 = value13;
const [property5, property6] = env0_3(env0_4.useState(undefined), 2);
binding = env0_4;
useState = binding.useState;
const value17 = env0_3(Reflect.apply(useState, binding, [selectedProduct.skuId]), 2);
if (selectedProduct.skuId === value17[0]) {
r8 = property5;
} else {
value17[1](selectedProduct.skuId);
property6(undefined);
r8 = undefined;
}
(require(10088) /* metro dependency 10088: usePreviewCollectbilesProduct */).usePreviewCollectibleProduct(selectedProduct,
property, r8);
const value18 = (require(10023) /* metro dependency 10023: CollectiblesAnalyticsContext */).useCollectiblesAnalyticsContext();
const defaultImport2 = importDefault(8742) /* metro dependency 8742: useTrackImpression */;
object = {};
const ImpressionTypes = (require(480) /* metro dependency 480: AnalyticsUtils */).ImpressionTypes;
const HALFSHEET = ImpressionTypes.HALFSHEET;
object.type = HALFSHEET;
const ImpressionNames = (require(480) /* metro dependency 480: AnalyticsUtils */).ImpressionNames;
const SHOP_PRODUCT_DETAIL = ImpressionNames.SHOP_PRODUCT_DETAIL;
object.name = SHOP_PRODUCT_DETAIL;
object.properties = {sku_id: selectedProduct.skuId, location_stack: analyticsLocations, card_id: value18?.cardId,
position_in_section: value18?.tilePosition, shop_session_id: value18?.sessionId, product_sku_ids: value9};
defaultImport2(object);
let r4 = value18 ?? undefined;
const value19 = useHandlePreviewPress({product: product, variantIndex: property3,
analyticsLocations: analyticsLocations, setShouldReset: property2, shopAnalyticsContext: r4});
const env0_6 = (require(7609) /* metro dependency 7609: useShopProductItems */).useShopProductItems(product);
let type = product.type;
const CollectiblesItemType = (require(1904) /* metro dependency 1904: CollectiblesItemType */).CollectiblesItemType;
const BUNDLE = CollectiblesItemType.BUNDLE;
const value20 = type === BUNDLE;
var [property, property9] = env0_3(env0_4.useState(_fun78799), 2);
const value23 = useCallback(_fun78800, []);
const r6 = value20 ? property : selectedProduct.type;
const value24 = r6 != null;
if (value24) {
r4 = r6 === (require(1904) /* metro dependency 1904: CollectiblesItemType */).CollectiblesItemType.PROFILE_EFFECT || r6 === (require(1904) /* metro dependency 1904: CollectiblesItemType */).CollectiblesItemType.PROFILE_FRAME;
r4 = !r4 ? r6 === (require(1904) /* metro dependency 1904: CollectiblesItemType */).CollectiblesItemType.AVATAR_DECORATION : r4;
r24 = r4;
} else {
r24 = value24;
function ProductDetailsActionSheetInner({product, initialVariantIndex, analyticsLocations = [], paymentGateway}) { // fn#78794, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10272:1930, offset: 0x01e34c75, size: 2090 bytes, params: 2, frame: 48
const Spacer = (NativeModule).Spacer;
var r8;
var r24;
initialVariantIndex = initialVariantIndex === undefined ? 0 : initialVariantIndex;
let env0_3 = undefined;
let env0_4 = undefined;
const OTPACOMOrderExperiment = (ACOMExperimentsModule).OTPACOMOrderExperiment;
const useConfig = OTPACOMOrderExperiment.useConfig;
const enabled = Reflect.apply(useConfig, OTPACOMOrderExperiment,
[{location: 'ProductDetailsActionSheetInner'}]).enabled;
const styles = useStyles();
let binding = env0_4;
const value4 = binding.useRef(null);
const value5 = env0_4.useRef(null);
const defaultImport = UseAnalyticsLocations;
let object = [];
const value6 = arraySpread(object, analyticsLocations, 0, undefined);
const COLLECTIBLES_SHOP_PROFILE_PREVIEW = (AnalyticsLocation).COLLECTIBLES_SHOP_PROFILE_PREVIEW;
object[value6] = COLLECTIBLES_SHOP_PROFILE_PREVIEW;
value6 + 1;
analyticsLocations = defaultImport(object).analyticsLocations;
binding = env0_4;
let useState = binding.useState;
const value8 = env0_3(Reflect.apply(useState, binding, [true]), 2);
var property = value8[0];
const property2 = value8[1];
env0_3 = property2;
const value9 = useMemo(_fun78795, [product]);
const [property3, property4] = env0_3(env0_4.useState(initialVariantIndex), 2);
const selectedProduct = (CollectiblesProductUtilsModule).getSelectedProduct(product,
property3);
const value13 = (UseTrackPdpClickModule).useTrackPdpClick({skuId: selectedProduct.skuId,
productSkuIds: value9, analyticsLocations: analyticsLocations});
env0_4 = value13;
const [property5, property6] = env0_3(env0_4.useState(undefined), 2);
binding = env0_4;
useState = binding.useState;
const value17 = env0_3(Reflect.apply(useState, binding, [selectedProduct.skuId]), 2);
if (selectedProduct.skuId === value17[0]) {
r8 = property5;
} else {
value17[1](selectedProduct.skuId);
property6(undefined);
r8 = undefined;
}
(UsePreviewCollectbilesProductModule).usePreviewCollectibleProduct(selectedProduct,
property, r8);
const value18 = (CollectiblesAnalyticsContextModule).useCollectiblesAnalyticsContext();
const defaultImport2 = UseTrackImpression;
object = {};
const ImpressionTypes = (AnalyticsUtilsModule).ImpressionTypes;
const HALFSHEET = ImpressionTypes.HALFSHEET;
object.type = HALFSHEET;
const ImpressionNames = (AnalyticsUtilsModule).ImpressionNames;
const SHOP_PRODUCT_DETAIL = ImpressionNames.SHOP_PRODUCT_DETAIL;
object.name = SHOP_PRODUCT_DETAIL;
object.properties = {sku_id: selectedProduct.skuId, location_stack: analyticsLocations, card_id: value18?.cardId,
position_in_section: value18?.tilePosition, shop_session_id: value18?.sessionId, product_sku_ids: value9};
defaultImport2(object);
let r4 = value18 ?? undefined;
const value19 = useHandlePreviewPress({product: product, variantIndex: property3,
analyticsLocations: analyticsLocations, setShouldReset: property2, shopAnalyticsContext: r4});
const env0_6 = (UseShopProductItemsModule).useShopProductItems(product);
let type = product.type;
const CollectiblesItemType = (require(1904) /* metro dependency 1904: CollectiblesItemType */).CollectiblesItemType;
const BUNDLE = CollectiblesItemType.BUNDLE;
const value20 = type === BUNDLE;
var [property, property9] = env0_3(env0_4.useState(_fun78799), 2);
const value23 = useCallback(_fun78800, []);
const r6 = value20 ? property : selectedProduct.type;
const value24 = r6 != null;
if (value24) {
r4 = r6 === (require(1904) /* metro dependency 1904: CollectiblesItemType */).CollectiblesItemType.PROFILE_EFFECT || r6 === (require(1904) /* metro dependency 1904: CollectiblesItemType */).CollectiblesItemType.PROFILE_FRAME;
r4 = !r4 ? r6 === (require(1904) /* metro dependency 1904: CollectiblesItemType */).CollectiblesItemType.AVATAR_DECORATION : r4;
r24 = r4;
} else {
r24 = value24;
}
const value28 = useCallback(_fun78801, [product, property2]);
env0_4.useEffect(_fun78802, [analyticsLocations, product.skuId]);
const hideBadge = product.hideBadge;
const value29 = (UseCanPurchaseFramesModule).useIsProfileFramesEarlyAccessPhase('ProductDetailsActionSheet');
type = selectedProduct.type;
const PROFILE_FRAME = CollectiblesItemType.PROFILE_FRAME;
let r9 = type === PROFILE_FRAME && value29 && !hideBadge;
const AnalyticsLocationProvider = (UseAnalyticsLocationsModule).AnalyticsLocationProvider;
const BottomSheet = (BottomSheetNativeModule).BottomSheet;
const bottomSheetProps = {'scrollable': true, 'startExpanded': true, onExpand: onExpand, onDismiss: onDismiss_78804,
ref: value4};
const BottomSheetScrollView = (Module06277Module).BottomSheetScrollView;
r24 = r24 && <PreviewProfileTrigger handlePreviewPress={value19} onTrackPress={value13} />;
const items2 = [
<View style={styles.actionButtons}>
{r24}
{((Component) => <Component selectedProduct={selectedProduct} size="md" onTrackPress={value13} />)(WishlistButton)}
</View>,
];
r9 = r9 && <><View style={styles.badgeWrapper}>{((Component) => <Component location="ProductDetailsActionSheet" disablePressable />)(importDefault(10089) /* metro dependency 10089: FramesEarlyAccessBadge */)}</View><Spacer size={(importDefault(697) /* metro dependency 697: native */).space.PX_16} /></>;
items2[1] = r9;
items2[2] = ((Component) => <Component product={selectedProduct} handlePreviewPress={value19} onTrackPress={value13} onBundleActiveItemTypeChange={property9} onBundleActiveItemChange={value23} />)(importDefault(10090) /* metro dependency 10090: ProductDetailsActionSheetPreview */);
items2[3] = ((Component) => <Component product={selectedProduct} onTrackPress={value13} />)(importDefault(10102) /* metro dependency 10102: ProductDetailsActionSheetInfo */);
items2[4] = ((Component) => <Component product={product} selectedVariantIndex={property3} onVariantSelect={property4} />)(importDefault(10108) /* metro dependency 10108: ProductDetailsActionSheetVariants */);
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
items2[5] = <Spacer size={PX_16} />;
const bottomSheetScrollView = (
<BottomSheetScrollView
scrollsToTop={false}
style={styles.container}
ref={value5}
>
{items2}
</BottomSheetScrollView>
);
const NativePaymentContextProvider = (NativePaymentContextModule).NativePaymentContextProvider;
return (
<AnalyticsLocationProvider value={analyticsLocations}>
<BottomSheet {...bottomSheetProps}>
{bottomSheetScrollView}
<NativePaymentContextProvider skuIDs={[]} activeSubscription={null}>
{((Component) => <Component paymentGateway={paymentGateway} waitAndCreateOrder={enabled && paymentGateway === PaymentGateways.APPLE_ADVANCED_COMMERCE} skuIds={[selectedProduct.skuId]} isGift={false} activeSubscription={null} key={selectedProduct.skuId}>{((Component) => <Component onBuy={value28} product={selectedProduct} analyticsLocations={analyticsLocations} onTrackPress={value13} />)(importDefault(10111) /* metro dependency 10111: ProductDetailsActionSheetPurchaseSection */)}</Component>)(importDefault(7335) /* metro dependency 7335: NativeCheckoutStoreProvider */)}
</NativePaymentContextProvider>
</BottomSheet>
</AnalyticsLocationProvider>
);
function _fun78795() { // fn#78795, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10272:2315, offset: 0x01e3549f, size: 45 bytes, params: 1, frame: 11
const value = environment.__proto__;
return (CollectiblesProductUtilsModule).getProductSkuIds(product);
}
function useHandlePreviewPress({product, variantIndex, analyticsLocations, shopAnalyticsContext, setShouldReset}) { // fn#78796, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10272:3038, owner: ProductDetailsActionSheetInner.useHandlePreviewPress, offset: 0x01e354cc, size: 151 bytes, params: 2, frame: 19
return env1_4.useCallback(_fun78797, [product, variantIndex, setShouldReset,
(UseCurrentUserModule).useCurrentUser().id, analyticsLocations,
shopAnalyticsContext]);
function _fun78797() { // fn#78797, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10272:3212, offset: 0x01e35563, size: 91 bytes, params: 1, frame: 13
setShouldReset(false);
(ShowUserProfileActionSheet)({userId: env0_5.id,
isPreviewingChanges: true, sourceAnalyticsLocations: analyticsLocations, onClose: onClose_78798});
function onClose_78798() { // fn#78798, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10272:3303, offset: 0x01e355be, size: 79 bytes, params: 1, frame: 13
const value = environment.__proto__.__proto__.__proto__;
return (OpenProductDetailsActionSheetModule).openProductDetailsActionSheet({product: product,
initialVariantIndex: variantIndex, analyticsLocations: analyticsLocations,
shopAnalyticsContext: shopAnalyticsContext});
}
}
}
function _fun78799() { // fn#78799, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10272:3648, offset: 0x01e3560d, size: 180 bytes, params: 1, frame: 13
const CollectiblesItemType = (CollectiblesItemTypeModule).CollectiblesItemType;
if (env0_7) {
return env0_6.firstProfileEffect != null ? CollectiblesItemType.PROFILE_EFFECT : env0_6.firstAvatarDecoration != null ? CollectiblesItemType.AVATAR_DECORATION : env0_6.firstNameplate != null ? CollectiblesItemType.NAMEPLATE : undefined;
}
}
function _fun78800(a0) { // fn#78800, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10272:3919, offset: 0x01e356c1, size: 33 bytes, params: 2, frame: 12
env0_5(a0);
env0_8(a0.type);
}
function _fun78801() { // fn#78801, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10272:4179, offset: 0x01e356e2, size: 66 bytes, params: 1, frame: 13
const type = product.type;
const CollectiblesItemType = (CollectiblesItemTypeModule).CollectiblesItemType;
const BUNDLE = CollectiblesItemType.BUNDLE;
if (type === BUNDLE) {
env0_3(false);
}
}
function _fun78802() { // fn#78802, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10272:4259, offset: 0x01e35724, size: 86 bytes, params: 1, frame: 16
const defaultImport = AnalyticsUtils;
const track = defaultImport.track;
const OPEN_MODAL = AnalyticEvents.OPEN_MODAL;
Reflect.apply(track, defaultImport, [OPEN_MODAL, {type: 'Collectibles Shop Details Modal', location_stack: env0_1,
sku_id: product.skuId}]);
}
function onExpand() { // fn#78803, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10272:4667, owner: ProductDetailsActionSheetInner.onExpand, offset: 0x01e3577a, size: 45 bytes, params: 1, frame: 13
return env0_2.current?.scrollToEnd({animated: true});
}
function ProductDetailsActionSheetInnerOnDismiss() { // fn#78804, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10272:4752, owner: ProductDetailsActionSheetInner.onDismiss, offset: 0x01e357a7, size: 29 bytes, params: 1, frame: 11
const binding = env0_4;
const CLOSE_DETAIL = ShopCtaEnum.CLOSE_DETAIL;
return binding(CLOSE_DETAIL);
}
}
const value28 = useCallback(_fun78801, [product, property2]);
env0_4.useEffect(_fun78802, [analyticsLocations, product.skuId]);
const hideBadge = product.hideBadge;
const value29 = (require(10054) /* metro dependency 10054: useCanPurchaseFrames */).useIsProfileFramesEarlyAccessPhase('ProductDetailsActionSheet');
type = selectedProduct.type;
const PROFILE_FRAME = CollectiblesItemType.PROFILE_FRAME;
let r9 = type === PROFILE_FRAME && value29 && !hideBadge;
const AnalyticsLocationProvider = (require(6771) /* metro dependency 6771: useAnalyticsLocations */).AnalyticsLocationProvider;
const BottomSheet = (require(6275) /* metro dependency 6275: BottomSheetNative */).BottomSheet;
const bottomSheetProps = {'scrollable': true, 'startExpanded': true, onExpand: onExpand, onDismiss: onDismiss_78804,
ref: value4};
const BottomSheetScrollView = (require(6277) /* metro dependency 6277 */).BottomSheetScrollView;
r24 = r24 && <PreviewProfileTrigger handlePreviewPress={value19} onTrackPress={value13} />;
const items2 = [<View style={styles.actionButtons}>{r24}{((Component) => <Component selectedProduct={selectedProduct} size="md" onTrackPress={value13} />)(importDefault(10057) /* metro dependency 10057: WishlistButton */)}</View>];
r9 = r9 && <><View style={styles.badgeWrapper}>{((Component) => <Component location="ProductDetailsActionSheet" disablePressable />)(importDefault(10089) /* metro dependency 10089: FramesEarlyAccessBadge */)}</View><Spacer size={(importDefault(697) /* metro dependency 697: native */).space.PX_16} /></>;
items2[1] = r9;
items2[2] = ((Component) => <Component product={selectedProduct} handlePreviewPress={value19} onTrackPress={value13} onBundleActiveItemTypeChange={property9} onBundleActiveItemChange={value23} />)(importDefault(10090) /* metro dependency 10090: ProductDetailsActionSheetPreview */);
items2[3] = ((Component) => <Component product={selectedProduct} onTrackPress={value13} />)(importDefault(10102) /* metro dependency 10102: ProductDetailsActionSheetInfo */);
items2[4] = ((Component) => <Component product={product} selectedVariantIndex={property3} onVariantSelect={property4} />)(importDefault(10108) /* metro dependency 10108: ProductDetailsActionSheetVariants */);
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
items2[5] = <Spacer size={PX_16} />;
const bottomSheetScrollView = <BottomSheetScrollView scrollsToTop={false} style={styles.container} ref={value5}>{items2}</BottomSheetScrollView>;
const NativePaymentContextProvider = (require(10109) /* metro dependency 10109: NativePaymentContext */).NativePaymentContextProvider;
return (
<AnalyticsLocationProvider value={analyticsLocations}>
<BottomSheet {...bottomSheetProps}>
{bottomSheetScrollView}
<NativePaymentContextProvider skuIDs={[]} activeSubscription={null}>
{((Component) => <Component paymentGateway={paymentGateway} waitAndCreateOrder={enabled && paymentGateway === PaymentGateways.APPLE_ADVANCED_COMMERCE} skuIds={[selectedProduct.skuId]} isGift={false} activeSubscription={null} key={selectedProduct.skuId}>{((Component) => <Component onBuy={value28} product={selectedProduct} analyticsLocations={analyticsLocations} onTrackPress={value13} />)(importDefault(10111) /* metro dependency 10111: ProductDetailsActionSheetPurchaseSection */)}</Component>)(importDefault(7335) /* metro dependency 7335: NativeCheckoutStoreProvider */)}
</NativePaymentContextProvider>
</BottomSheet>
</AnalyticsLocationProvider>
);
}
function ProductDetailsActionSheetWithOrderCTX(a0) { // fn#78805, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10272:5798, offset: 0x01e357c4, size: 93 bytes, params: 2, frame: 15
return (
<ProductDetailsActionSheetInner
{...a0}
{...{['paymentGateway']: (require(477) /* metro dependency 477: PlatformUtils */).isIOS() ? PaymentGateways.APPLE_ADVANCED_COMMERCE : PaymentGateways.GOOGLE}}
/>
);
}
function ProductDetailsActionSheet(a0) { // fn#78806, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10272:5977, offset: 0x01e35821, size: 121 bytes, params: 2, frame: 18
const shopAnalyticsContext = a0.shopAnalyticsContext;
const r5 = shopAnalyticsContext !== undefined ? shopAnalyticsContext : env0_16;
const value = Object.create(null);
value.shopAnalyticsContext = 0;
const value2 = copyDataProperties({}, a0, value, undefined);
const CollectiblesAnalyticsProvider = (require(10023) /* metro dependency 10023: CollectiblesAnalyticsContext */).CollectiblesAnalyticsProvider;
return (
<CollectiblesAnalyticsProvider newValue={r5}>
<ProductDetailsActionSheetWithOrderCTX {...value2} />
</CollectiblesAnalyticsProvider>
);
}
function PreviewProfileTriggerStyle({pressed}) { // fn#78793, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10272:1661, owner: PreviewProfileTrigger.style, offset: 0x01e34c2d, size: 72 bytes, params: 2, frame: 5
return [styles.previewProfileButton, env0_4, result && styles.previewProfileButtonMidnight, pressed && env0_5];
}
function _fun78795() { // fn#78795, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10272:2315, offset: 0x01e3549f, size: 45 bytes, params: 1, frame: 11
const value = environment.__proto__;
return (require(5133) /* metro dependency 5133: CollectiblesProductUtils */).getProductSkuIds(product);
}
function useHandlePreviewPress({product, variantIndex, analyticsLocations, shopAnalyticsContext, setShouldReset}) { // fn#78796, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10272:3038, owner: ProductDetailsActionSheetInner.useHandlePreviewPress, offset: 0x01e354cc, size: 151 bytes, params: 2, frame: 19
return env1_4.useCallback(_fun78797, [product, variantIndex, setShouldReset,
(require(7594) /* metro dependency 7594: useCurrentUser */).useCurrentUser().id, analyticsLocations,
shopAnalyticsContext]);
}
function _fun78799() { // fn#78799, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10272:3648, offset: 0x01e3560d, size: 180 bytes, params: 1, frame: 13
const CollectiblesItemType = (require(1904) /* metro dependency 1904: CollectiblesItemType */).CollectiblesItemType;
if (env0_7) {
return env0_6.firstProfileEffect != null ? CollectiblesItemType.PROFILE_EFFECT : env0_6.firstAvatarDecoration != null ? CollectiblesItemType.AVATAR_DECORATION : env0_6.firstNameplate != null ? CollectiblesItemType.NAMEPLATE : undefined;
function ProductDetailsActionSheetWithOrderCTX(a0) { // fn#78805, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10272:5798, offset: 0x01e357c4, size: 93 bytes, params: 2, frame: 15
return (
<ProductDetailsActionSheetInner
{...a0}
{...{['paymentGateway']: (require(477) /* metro dependency 477: PlatformUtils */).isIOS() ? PaymentGateways.APPLE_ADVANCED_COMMERCE : PaymentGateways.GOOGLE}}
/>
);
}
}
function _fun78800(a0) { // fn#78800, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10272:3919, offset: 0x01e356c1, size: 33 bytes, params: 2, frame: 12
env0_5(a0);
env0_8(a0.type);
}
function _fun78801() { // fn#78801, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10272:4179, offset: 0x01e356e2, size: 66 bytes, params: 1, frame: 13
const type = product.type;
const CollectiblesItemType = (require(1904) /* metro dependency 1904: CollectiblesItemType */).CollectiblesItemType;
const BUNDLE = CollectiblesItemType.BUNDLE;
if (type === BUNDLE) {
env0_3(false);
function ProductDetailsActionSheet(a0) { // fn#78806, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10272:5977, offset: 0x01e35821, size: 121 bytes, params: 2, frame: 18
const shopAnalyticsContext = a0.shopAnalyticsContext;
const r5 = shopAnalyticsContext !== undefined ? shopAnalyticsContext : env0_16;
const value = Object.create(null);
value.shopAnalyticsContext = 0;
const value2 = copyDataProperties({}, a0, value, undefined);
const CollectiblesAnalyticsProvider = (CollectiblesAnalyticsContextModule).CollectiblesAnalyticsProvider;
return (
<CollectiblesAnalyticsProvider newValue={r5}>
<ProductDetailsActionSheetWithOrderCTX {...value2} />
</CollectiblesAnalyticsProvider>
);
}
}
function _fun78802() { // fn#78802, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10272:4259, offset: 0x01e35724, size: 86 bytes, params: 1, frame: 16
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
const track = defaultImport.track;
const OPEN_MODAL = AnalyticEvents.OPEN_MODAL;
Reflect.apply(track, defaultImport, [OPEN_MODAL, {type: 'Collectibles Shop Details Modal', location_stack: env0_1,
sku_id: product.skuId}]);
}
function onExpand() { // fn#78803, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10272:4667, owner: ProductDetailsActionSheetInner.onExpand, offset: 0x01e3577a, size: 45 bytes, params: 1, frame: 13
return env0_2.current?.scrollToEnd({animated: true});
}
function ProductDetailsActionSheetInnerOnDismiss() { // fn#78804, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10272:4752, owner: ProductDetailsActionSheetInner.onDismiss, offset: 0x01e357a7, size: 29 bytes, params: 1, frame: 11
const binding = env0_4;
const CLOSE_DETAIL = ShopCtaEnum.CLOSE_DETAIL;
return binding(CLOSE_DETAIL);
}
function _fun78797() { // fn#78797, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10272:3212, offset: 0x01e35563, size: 91 bytes, params: 1, frame: 13
setShouldReset(false);
(importDefault(8743) /* metro dependency 8743: showUserProfileActionSheet */)({userId: env0_5.id,
isPreviewingChanges: true, sourceAnalyticsLocations: analyticsLocations, onClose: onClose_78798});
}
function onClose_78798() { // fn#78798, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10272:3303, offset: 0x01e355be, size: 79 bytes, params: 1, frame: 13
const value = environment.__proto__.__proto__.__proto__;
return (require(10085) /* metro dependency 10085: openProductDetailsActionSheet */).openProductDetailsActionSheet({product: product,
initialVariantIndex: variantIndex, analyticsLocations: analyticsLocations,
shopAnalyticsContext: shopAnalyticsContext});
}
global.__d(_fun78790, 10086, [57, 31, 27, 663, 661, 482, 33, 4501, 697, 4582, 3868, 4002, 1244, 8999, 1904, 7594,
8743, 10085, 7334, 6771, 6789, 5133, 10087, 10088, 10023, 8742, 480, 7609, 683, 10054, 6275, 6277, 10057, 10089,
1305, 10090, 10102, 10108, 10109, 7335, 10111, 477,
2]) /* metro module 10086, dependencies: [57, 31, 27, 663, 661, 482, 33, 4501, 697, 4582, 3868, 4002, 1244, 8999, 1904, 7594, 8743, 10085, 7334, 6771, 6789, 5133, 10087, 10088, 10023, 8742, 480, 7609, 683, 10054, 6275, 6277, 10057, 10089, 1305, 10090, 10102, 10108, 10109, 7335, 10111, 477, 2] */;
@@ -1,101 +1,136 @@
/* Metro module 10102; source: modules/collectibles/native/ProductDetailsActionSheetInfo.tsx; dependencies: [27, 33, 4501, 697, 10103, 4573, 5134, 10060, 1244, 10104, 8487, 1904, 10030, 2] */
import Native from '../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
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 JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as CollectiblesItemTypeModule from '../../../external/discord_common/js/shared/shared-constants/CollectiblesItemType.tsx'; /* Metro dependency 1904 */
import * as TextModule from '../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as CollectiblesUtilsModule from '../CollectiblesUtils.tsx'; /* Metro dependency 5134 */
import * as CollectiblesMobileFlexibleBundlesExperimentModule from '../experiments/CollectiblesMobileFlexibleBundlesExperiment.tsx'; /* Metro dependency 8487 */
import * as UseProductPurchaseStateModule from '../hooks/useProductPurchaseState.tsx'; /* Metro dependency 10060 */
import * as UseProductDescriptionModule from '../hooks/useProductDescription.tsx'; /* Metro dependency 10103 */
function _fun78875(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#78875, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10288:6, offset: 0x01e3985a, size: 325 bytes, params: 8, frame: 23
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = (require(27) /* metro dependency 27 */).View;
let value = require(33) /* metro dependency 33 */;
let value = JsxRuntimeModule;
const env0_4 = value.jsx;
const env0_5 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
const object = {};
const PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
object.marginTop = PX_24;
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object.marginHorizontal = PX_16;
object.flexDirection = 'column';
object.gap = 20;
const env0_6 = Reflect.apply(createStyles, value, [{title: {marginBottom: 2}, body: object,
const object2 = {};
const PX_24 = (Native).space.PX_24;
object2.marginTop = PX_24;
const PX_16 = (Native).space.PX_16;
object2.marginHorizontal = PX_16;
object2.flexDirection = 'column';
object2.gap = 20;
const env0_6 = Reflect.apply(createStyles, value, [{title: {marginBottom: 2}, body: object2,
bundleBody: {marginTop: 0}, description: {'flexDirection': 'column', 'gap': 6}}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/ProductDetailsActionSheetInfo.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/native/ProductDetailsActionSheetInfo.tsx');
exports.default = _default_78879;
}
function ProductNameAndDescription({product}) { // fn#78876, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10288:385, offset: 0x01e3999f, size: 195 bytes, params: 2, frame: 22
const styles = useStyles();
const value2 = (require(10103) /* metro dependency 10103: useProductDescription */).useProductDescription(product);
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<View style={styles.description}>
<Text
variant="heading-xl/bold"
color="mobile-text-heading-primary"
style={styles.title}
accessibilityRole="header"
>
{product.name}
</Text>
<Text variant="text-md/medium" color="text-default">
{value2}
</Text>
</View>
);
}
function ProductPurchaseStatus({product, onTrackPress}) { // fn#78877, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10288:726, offset: 0x01e39a62, size: 369 bytes, params: 2, frame: 23
var r4;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var value;
const isPremiumCollectiblesProduct2 = (require(5134) /* metro dependency 5134: CollectiblesUtils */).isPremiumCollectiblesProduct(product);
const {isPurchased,
isPartiallyOwnedBundle} = (require(10060) /* metro dependency 10060: useProductPurchaseState */).useProductPurchaseState(product);
if (isPurchased) {
r4 = <Text variant="text-md/semibold" color="interactive-text-active">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['6cfuDj'])}</Text>;
} else if (isPartiallyOwnedBundle) {
r4 = <Text variant="text-md/semibold" color="interactive-text-active">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.BEjTij)}</Text>;
} else if (isPremiumCollectiblesProduct2) {
r4 = !isPremiumCollectiblesProduct2;
} else {
value = importDefault(10104) /* metro dependency 10104: InlinePriceTag */;
value = ((Component) => <Component product={product} onTrackPress={onTrackPress} />)(value);
r4 = value;
function ProductNameAndDescription({product}) { // fn#78876, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10288:385, offset: 0x01e3999f, size: 195 bytes, params: 2, frame: 22
const styles = useStyles();
const value2 = (UseProductDescriptionModule).useProductDescription(product);
const Text = (TextModule).Text;
return (
<View style={styles.description}>
<Text
variant="heading-xl/bold"
color="mobile-text-heading-primary"
style={styles.title}
accessibilityRole="header"
>
{product.name}
</Text>
<Text variant="text-md/medium" color="text-default">
{value2}
</Text>
</View>
);
}
return (
<View>
{r4}
</View>
);
}
function BundleProductDetailsActionSheetInfo({product, onTrackPress}) { // fn#78878, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10288:1240, offset: 0x01e39bd3, size: 190 bytes, params: 2, frame: 21
const styles = useStyles();
const collectiblesMobileFlexibleBundlesExperimentModule = require(8487) /* metro dependency 8487: CollectiblesMobileFlexibleBundlesExperiment */;
const useCollectiblesMobileFlexibleBundlesExperiment = collectiblesMobileFlexibleBundlesExperimentModule.useCollectiblesMobileFlexibleBundlesExperiment;
const enabled = Reflect.apply(useCollectiblesMobileFlexibleBundlesExperiment,
collectiblesMobileFlexibleBundlesExperimentModule, ['BundleProductDetailsActionSheetInfo']).enabled;
return (
<View style={[styles.body, enabled && styles.bundleBody]}>
{!enabled && <ProductNameAndDescription product={product} />}
<ProductPurchaseStatus product={product} onTrackPress={onTrackPress} />
</View>
);
}
function _default_78879({product, onTrackPress}) { // fn#78879, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10288:1549, offset: 0x01e39c91, size: 217 bytes, params: 2, frame: 21
var r0;
var moduleValue;
const styles = useStyles();
const type = product.type;
const CollectiblesItemType = (require(1904) /* metro dependency 1904: CollectiblesItemType */).CollectiblesItemType;
const BUNDLE = CollectiblesItemType.BUNDLE;
if (type !== BUNDLE) {
r0 = <View style={styles.body}><ProductNameAndDescription product={product} /><ProductPurchaseStatus product={product} onTrackPress={onTrackPress} /></View>;
} else {
moduleValue = require(10030) /* metro dependency 10030: bundleUtils */;
r0 = moduleValue.isValidCollectiblesBundle(product) ? <BundleProductDetailsActionSheetInfo product={product} onTrackPress={onTrackPress} /> : <View style={styles.body}><ProductNameAndDescription product={product} /><ProductPurchaseStatus product={product} onTrackPress={onTrackPress} /></View>;
function ProductPurchaseStatus({product, onTrackPress}) { // fn#78877, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10288:726, offset: 0x01e39a62, size: 369 bytes, params: 2, frame: 23
var r4;
const Text = (TextModule).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var value;
const isPremiumCollectiblesProduct2 = (CollectiblesUtilsModule).isPremiumCollectiblesProduct(product);
const {isPurchased,
isPartiallyOwnedBundle} = (UseProductPurchaseStateModule).useProductPurchaseState(product);
if (isPurchased) {
r4 = (
<Text variant="text-md/semibold" color="interactive-text-active">
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['6cfuDj'])}
</Text>
);
} else if (isPartiallyOwnedBundle) {
r4 = (
<Text variant="text-md/semibold" color="interactive-text-active">
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.BEjTij)}
</Text>
);
} else if (isPremiumCollectiblesProduct2) {
r4 = !isPremiumCollectiblesProduct2;
} else {
value = importDefault(10104) /* metro dependency 10104: InlinePriceTag */;
value = ((Component) => <Component product={product} onTrackPress={onTrackPress} />)(value);
r4 = value;
}
return (
<View>
{r4}
</View>
);
}
return r0;
function BundleProductDetailsActionSheetInfo({product, onTrackPress}) { // fn#78878, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10288:1240, offset: 0x01e39bd3, size: 190 bytes, params: 2, frame: 21
const styles = useStyles();
const useCollectiblesMobileFlexibleBundlesExperiment = CollectiblesMobileFlexibleBundlesExperimentModule.useCollectiblesMobileFlexibleBundlesExperiment;
const enabled = Reflect.apply(useCollectiblesMobileFlexibleBundlesExperiment,
CollectiblesMobileFlexibleBundlesExperimentModule, ['BundleProductDetailsActionSheetInfo']).enabled;
return (
<View style={[styles.body, enabled && styles.bundleBody]}>
{!enabled && <ProductNameAndDescription product={product} />}
<ProductPurchaseStatus product={product} onTrackPress={onTrackPress} />
</View>
);
}
function _default_78879({product, onTrackPress}) { // fn#78879, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10288:1549, offset: 0x01e39c91, size: 217 bytes, params: 2, frame: 21
var r0;
var moduleValue;
const styles = useStyles();
const type = product.type;
const CollectiblesItemType = (CollectiblesItemTypeModule).CollectiblesItemType;
const BUNDLE = CollectiblesItemType.BUNDLE;
if (type !== BUNDLE) {
r0 = (
<View style={styles.body}>
<ProductNameAndDescription product={product} />
<ProductPurchaseStatus product={product} onTrackPress={onTrackPress} />
</View>
);
} else {
moduleValue = require(10030) /* metro dependency 10030: bundleUtils */;
r0 = (
moduleValue.isValidCollectiblesBundle(product)
? (
<BundleProductDetailsActionSheetInfo product={product} onTrackPress={onTrackPress} />
)
: (
<View style={styles.body}>
<ProductNameAndDescription product={product} />
<ProductPurchaseStatus product={product} onTrackPress={onTrackPress} />
</View>
)
);
}
return r0;
}
}
global.__d(_fun78875, 10102, [27, 33, 4501, 697, 10103, 4573, 5134, 10060, 1244, 10104, 8487, 1904, 10030,
2]) /* metro module 10102, dependencies: [27, 33, 4501, 697, 10103, 4573, 5134, 10060, 1244, 10104, 8487, 1904, 10030, 2] */;
@@ -1,198 +1,240 @@
/* Metro module 10090; source: modules/collectibles/native/ProductDetailsActionSheetPreview.tsx; dependencies: [57, 31, 27, 663, 33, 4501, 697, 1904, 8487, 10091, 7609, 1244, 10093, 8853, 8861, 9221, 10030, 2] */
import Module00057 from '../../../by-id/module-00057.js'; /* Metro dependency 57 */
import Native from '../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
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 CollectiblesShopConstantsModule from '../CollectiblesShopConstants.tsx'; /* Metro dependency 663 */
import * as CollectiblesItemTypeModule from '../../../external/discord_common/js/shared/shared-constants/CollectiblesItemType.tsx'; /* Metro dependency 1904 */
import * as UseShopProductItemsModule from '../hooks/useShopProductItems.tsx'; /* Metro dependency 7609 */
import * as CollectiblesMobileFlexibleBundlesExperimentModule from '../experiments/CollectiblesMobileFlexibleBundlesExperiment.tsx'; /* Metro dependency 8487 */
import * as SegmentedControlStateNativeModule from '../../../design/components/SegmentedControl/native/SegmentedControlState.native.tsx'; /* Metro dependency 8853 */
import * as SegmentedControlPagesNativeModule from '../../../design/components/SegmentedControl/native/SegmentedControlPages.native.tsx'; /* Metro dependency 8861 */
import * as SegmentedControlNativeModule from '../../../design/components/SegmentedControl/native/SegmentedControl.native.tsx'; /* Metro dependency 9221 */
function _fun78825(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#78825, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10276:6, offset: 0x01e364ed, size: 446 bytes, params: 8, frame: 23
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
let value = require(31) /* metro dependency 31 */;
let value = ReactModule;
const env0_4 = value.useCallback;
const env0_5 = value.useMemo;
const env0_6 = value.useState;
const env0_7 = (require(27) /* metro dependency 27 */).View;
const env0_8 = (require(663) /* metro dependency 663: CollectiblesShopConstants */).ShopCtaEnum;
value = require(33) /* metro dependency 33 */;
const env0_9 = value.jsx;
const env0_10 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
const object4 = {};
const BACKGROUND_MOD_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_SUBTLE;
object4.borderBottomColor = BACKGROUND_MOD_SUBTLE;
object4.borderBottomWidth = 1;
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object4.paddingBottom = PX_16;
object4.flex = 1;
const env0_11 = Reflect.apply(createStyles, value, [{previewContainer: {flex: 1}, previewDivider: object4}]);
object2 = {};
const CollectiblesItemType = (require(1904) /* metro dependency 1904: CollectiblesItemType */).CollectiblesItemType;
const object3 = {};
const BACKGROUND_MOD_SUBTLE = (Native).colors.BACKGROUND_MOD_SUBTLE;
object3.borderBottomColor = BACKGROUND_MOD_SUBTLE;
object3.borderBottomWidth = 1;
const PX_16 = (Native).space.PX_16;
object3.paddingBottom = PX_16;
object3.flex = 1;
const env0_11 = Reflect.apply(createStyles, value, [{previewContainer: {flex: 1}, previewDivider: object3}]);
object = {};
const CollectiblesItemType = (CollectiblesItemTypeModule).CollectiblesItemType;
const PROFILE_EFFECT = CollectiblesItemType.PROFILE_EFFECT;
object2.profile = PROFILE_EFFECT;
object.profile = PROFILE_EFFECT;
const AVATAR_DECORATION = CollectiblesItemType.AVATAR_DECORATION;
object2.decoration = AVATAR_DECORATION;
object.decoration = AVATAR_DECORATION;
const NAMEPLATE = CollectiblesItemType.NAMEPLATE;
object2.nameplate = NAMEPLATE;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/ProductDetailsActionSheetPreview.tsx');
object.nameplate = NAMEPLATE;
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/native/ProductDetailsActionSheetPreview.tsx');
exports.default = _default_78833;
}
function BundleProductPreview({product, width, handlePreviewPress, onTrackPress, onActiveItemChange, onActiveItemTypeChange}) { // fn#78826, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10276:590, offset: 0x01e366ab, size: 218 bytes, params: 2, frame: 23
var r0;
var value;
const styles = useStyles();
const collectiblesMobileFlexibleBundlesExperimentModule = require(8487) /* metro dependency 8487: CollectiblesMobileFlexibleBundlesExperiment */;
const useCollectiblesMobileFlexibleBundlesExperiment = collectiblesMobileFlexibleBundlesExperimentModule.useCollectiblesMobileFlexibleBundlesExperiment;
if (Reflect.apply(useCollectiblesMobileFlexibleBundlesExperiment, collectiblesMobileFlexibleBundlesExperimentModule,
['ProductDetailsActionSheetPreview']).enabled) {
value = importDefault(10091) /* metro dependency 10091: BundleProductDetailsActionSheetPreview */;
value = ((Component) => <Component product={product} width={width} handlePreviewPress={handlePreviewPress} onTrackPress={onTrackPress} onActiveItemChange={onActiveItemChange} />)(value);
r0 = value;
} else {
r0 = <View style={styles.previewDivider}><BundlePreview product={product} width={width} handlePreviewPress={handlePreviewPress} onTrackPress={onTrackPress} onActiveItemTypeChange={onActiveItemTypeChange} /></View>;
function BundleProductPreview({product, width, handlePreviewPress, onTrackPress, onActiveItemChange, onActiveItemTypeChange}) { // fn#78826, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10276:590, offset: 0x01e366ab, size: 218 bytes, params: 2, frame: 23
var r0;
var value;
const styles = useStyles();
const useCollectiblesMobileFlexibleBundlesExperiment = CollectiblesMobileFlexibleBundlesExperimentModule.useCollectiblesMobileFlexibleBundlesExperiment;
if (Reflect.apply(useCollectiblesMobileFlexibleBundlesExperiment, CollectiblesMobileFlexibleBundlesExperimentModule,
['ProductDetailsActionSheetPreview']).enabled) {
value = importDefault(10091) /* metro dependency 10091: BundleProductDetailsActionSheetPreview */;
value = ((Component) => <Component product={product} width={width} handlePreviewPress={handlePreviewPress} onTrackPress={onTrackPress} onActiveItemChange={onActiveItemChange} />)(value);
r0 = value;
} else {
r0 = (
<View style={styles.previewDivider}>
<BundlePreview
product={product}
width={width}
handlePreviewPress={handlePreviewPress}
onTrackPress={onTrackPress}
onActiveItemTypeChange={onActiveItemTypeChange}
/>
</View>
);
}
return r0;
}
return r0;
}
function BundlePreview({product, width, handlePreviewPress, onTrackPress, onActiveItemTypeChange}) { // fn#78827, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10276:1052, offset: 0x01e36785, size: 429 bytes, params: 2, frame: 23
const env0_3 = onTrackPress;
const value2 = (require(7609) /* metro dependency 7609: useShopProductItems */).useShopProductItems(product);
const [property, env0_7] = env0_3(useState(0), 2);
const value6 = (require(8853) /* metro dependency 8853: SegmentedControlStateNative */).useSegmentedControlState({items: useMemo(_fun78828,
[product, width, handlePreviewPress, value2, onTrackPress, property]), pageWidth: width, defaultIndex: 0,
onPageChange: onPageChange_78830, onSetActiveIndex: onSetActiveIndex_78832});
const SegmentedControlPages = (require(8861) /* metro dependency 8861: SegmentedControlPagesNative */).SegmentedControlPages;
const segmentedControlPages = <SegmentedControlPages state={value6} />;
const object = {};
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object.paddingHorizontal = PX_16;
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object.paddingTop = PX_12;
const SegmentedControl = (require(9221) /* metro dependency 9221: SegmentedControlNative */).SegmentedControl;
return (
<View>
{segmentedControlPages}
<View style={object}>
<SegmentedControl state={value6} variant="default" />
function BundlePreview({product, width, handlePreviewPress, onTrackPress, onActiveItemTypeChange}) { // fn#78827, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10276:1052, offset: 0x01e36785, size: 429 bytes, params: 2, frame: 23
const onTrackPress2 = onTrackPress;
const value2 = (UseShopProductItemsModule).useShopProductItems(product);
const [property, env0_7] = onTrackPress2(useState(0), 2);
const value6 = (SegmentedControlStateNativeModule).useSegmentedControlState({items: useMemo(_fun78828,
[product, width, handlePreviewPress, value2, onTrackPress, property]), pageWidth: width, defaultIndex: 0,
onPageChange: onPageChange, onSetActiveIndex: onSetActiveIndex_78832});
const SegmentedControlPages = (SegmentedControlPagesNativeModule).SegmentedControlPages;
const segmentedControlPages = <SegmentedControlPages state={value6} />;
const object2 = {};
const PX_16 = (Native).space.PX_16;
object2.paddingHorizontal = PX_16;
const PX_12 = (Native).space.PX_12;
object2.paddingTop = PX_12;
const SegmentedControl = (SegmentedControlNativeModule).SegmentedControl;
return (
<View>
{segmentedControlPages}
<View style={object2}>
<SegmentedControl state={value6} variant="default" />
</View>
</View>
</View>
);
}
function _default_78833({product, handlePreviewPress, onTrackPress, onBundleActiveItemTypeChange, onBundleActiveItemChange}) { // fn#78833, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10276:2476, offset: 0x01e36c42, size: 349 bytes, params: 2, frame: 26
const styles = useStyles();
const [property, env0_0] = env0_3(useState(0), 2);
const value4 = useCallback(_fun78834, []);
const type = product.type;
const CollectiblesItemType = (require(1904) /* metro dependency 1904: CollectiblesItemType */).CollectiblesItemType;
const BUNDLE = CollectiblesItemType.BUNDLE;
let r4 = type === BUNDLE && (require(10030) /* metro dependency 10030: bundleUtils */).isValidCollectiblesBundle(product);
r4 = r4 ? <BundleProductPreview product={product} width={property} handlePreviewPress={handlePreviewPress} onTrackPress={onTrackPress} onActiveItemChange={onBundleActiveItemChange} onActiveItemTypeChange={onBundleActiveItemTypeChange} /> : <View style={styles.previewDivider}>{((IndividualProductPreview) => <IndividualProductPreview product={product} width={property} handlePreviewPress={handlePreviewPress} onTrackPress={onTrackPress} />)((require(10093) /* metro dependency 10093: IndividualProductPreview */).IndividualProductPreview)}</View>;
return (
<View style={styles.previewContainer} onLayout={value4}>
{r4}
</View>
);
}
function _fun78828() { // fn#78828, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10276:1210, offset: 0x01e36932, size: 536 bytes, params: 1, frame: 21
var environment;
var r1;
var r0;
var object;
var value3;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var object2;
var value4;
var object4;
var value5;
const firstProfileEffect = env0_5.firstProfileEffect;
const value2 = null;
if (value2 != firstProfileEffect) {
object = {};
value3 = environment.__proto__;
object.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['s+YSgo']);
object.id = 'profile';
object.page = ((ProfileEffectPreview) => <ProfileEffectPreview profileEffect={env0_5.firstProfileEffect} profileEffectRestartKey={env0_6} width={width} handlePreviewPress={handlePreviewPress} onTrackPress={onTrackPress} />)((require(10093) /* metro dependency 10093: IndividualProductPreview */).ProfileEffectPreview);
r1 = object;
} else {
r1 = value2;
}
object = [r1];
if (value2 != env0_5.firstAvatarDecoration) {
object2 = {};
value4 = environment.__proto__;
object2.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.aVCcr8);
object2.id = 'decoration';
object2.page = ((AvatarDecorationPreview) => <AvatarDecorationPreview product={product} handlePreviewPress={handlePreviewPress} onTrackPress={onTrackPress} />)((require(10093) /* metro dependency 10093: IndividualProductPreview */).AvatarDecorationPreview);
r1 = object2;
} else {
r1 = value2;
}
object[1] = r1;
if (value2 != env0_5.firstNameplate) {
object4 = {};
value5 = environment.__proto__;
object4.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.HNnSVZ);
object4.id = 'nameplate';
object4.page = ((NameplatePreview) => <NameplatePreview product={product} />)((require(10093) /* metro dependency 10093: IndividualProductPreview */).NameplatePreview);
r0 = object4;
} else {
r0 = value2;
}
object[2] = r0;
return object.filter(function(a0) {
return a0 != null;
});
}
function BundlePreviewOnPageChange(a0) { // fn#78830, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10276:1904, owner: BundlePreview.onPageChange, offset: 0x01e36b4a, size: 60 bytes, params: 2, frame: 13
const property = env0_8[a0];
const value2 = undefined;
if ((property == null ? value2 : property.id) === 'profile') {
env0_7(function(a0) {
return a0 + 1;
});
}
return value2;
}
function BundlePreviewOnSetActiveIndex(a0) { // fn#78832, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10276:1986, owner: BundlePreview.onSetActiveIndex, offset: 0x01e36b86, size: 188 bytes, params: 2, frame: 14
var value3;
var onTrackPressBinding;
let property = env0_8[a0];
const value2 = undefined;
const id = property == null ? value2 : property.id;
if (id != null) {
value3 = environment.__proto__;
property = env1_12[id];
if (property != null) {
if (onActiveItemTypeChange != null) {
onActiveItemTypeChange(property);
);
function _fun78828() { // fn#78828, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10276:1210, offset: 0x01e36932, size: 536 bytes, params: 1, frame: 21
var environment;
var r1;
var r0;
var object;
var value3;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var object3;
var value4;
var object5;
var value5;
const firstProfileEffect = env0_5.firstProfileEffect;
const value2 = null;
if (value2 != firstProfileEffect) {
object = {};
value3 = environment.__proto__;
object.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['s+YSgo']);
object.id = 'profile';
object.page = ((ProfileEffectPreview) => <ProfileEffectPreview profileEffect={env0_5.firstProfileEffect} profileEffectRestartKey={env0_6} width={width} handlePreviewPress={handlePreviewPress} onTrackPress={onTrackPress} />)((require(10093) /* metro dependency 10093: IndividualProductPreview */).ProfileEffectPreview);
r1 = object;
} else {
r1 = value2;
}
object = [r1];
if (value2 != env0_5.firstAvatarDecoration) {
object3 = {};
value4 = environment.__proto__;
object3.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.aVCcr8);
object3.id = 'decoration';
object3.page = ((AvatarDecorationPreview) => <AvatarDecorationPreview product={product} handlePreviewPress={handlePreviewPress} onTrackPress={onTrackPress} />)((require(10093) /* metro dependency 10093: IndividualProductPreview */).AvatarDecorationPreview);
r1 = object3;
} else {
r1 = value2;
}
object[1] = r1;
if (value2 != env0_5.firstNameplate) {
object5 = {};
value5 = environment.__proto__;
object5.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.HNnSVZ);
object5.id = 'nameplate';
object5.page = ((NameplatePreview) => <NameplatePreview product={product} />)((require(10093) /* metro dependency 10093: IndividualProductPreview */).NameplatePreview);
r0 = object5;
} else {
r0 = value2;
}
object[2] = r0;
return object.filter(function(a0) {
return a0 != null;
});
}
function onPageChange(a0) { // fn#78830, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10276:1904, owner: BundlePreview.onPageChange, offset: 0x01e36b4a, size: 60 bytes, params: 2, frame: 13
const property = CollectiblesShopConstantsModule.ShopCtaEnum[a0];
const value2 = undefined;
if ((property == null ? value2 : property.id) === 'profile') {
env0_7(function(a0) {
return a0 + 1;
});
}
return value2;
}
function BundlePreviewOnSetActiveIndex(a0) { // fn#78832, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10276:1986, owner: BundlePreview.onSetActiveIndex, offset: 0x01e36b86, size: 188 bytes, params: 2, frame: 14
var value3;
var onTrackPressBinding;
let property = CollectiblesShopConstantsModule.ShopCtaEnum[a0];
const value2 = undefined;
const id = property == null ? value2 : property.id;
if (id != null) {
value3 = environment.__proto__;
property = env1_12[id];
if (property != null) {
if (onActiveItemTypeChange != null) {
onActiveItemTypeChange(property);
}
}
}
if (id === 'profile') {
onTrackPressBinding = onTrackPress;
if (onTrackPressBinding != null) {
onTrackPressBinding = onTrackPress;
value = environment.__proto__;
onTrackPressBinding(ShopCtaEnum.BUNDLE_VIEW_PROFILE_EFFECT);
}
} else if (id === 'decoration') {
onTrackPressBinding = onTrackPress;
if (onTrackPressBinding != null) {
onTrackPressBinding = onTrackPress;
value = environment.__proto__;
onTrackPressBinding(ShopCtaEnum.BUNDLE_VIEW_AVATAR_DECORATION);
}
} else if (id === 'nameplate') {
onTrackPressBinding = onTrackPress;
if (onTrackPressBinding != null) {
onTrackPressBinding = onTrackPress;
value = environment.__proto__;
onTrackPressBinding(ShopCtaEnum.BUNDLE_VIEW_NAMEPLATE);
}
}
return value2;
}
}
if (id === 'profile') {
onTrackPressBinding = onTrackPress;
if (onTrackPressBinding != null) {
onTrackPressBinding = onTrackPress;
value = environment.__proto__;
onTrackPressBinding(ShopCtaEnum.BUNDLE_VIEW_PROFILE_EFFECT);
}
} else if (id === 'decoration') {
onTrackPressBinding = onTrackPress;
if (onTrackPressBinding != null) {
onTrackPressBinding = onTrackPress;
value = environment.__proto__;
onTrackPressBinding(ShopCtaEnum.BUNDLE_VIEW_AVATAR_DECORATION);
}
} else if (id === 'nameplate') {
onTrackPressBinding = onTrackPress;
if (onTrackPressBinding != null) {
onTrackPressBinding = onTrackPress;
value = environment.__proto__;
onTrackPressBinding(ShopCtaEnum.BUNDLE_VIEW_NAMEPLATE);
function _default_78833({product, handlePreviewPress, onTrackPress, onBundleActiveItemTypeChange, onBundleActiveItemChange}) { // fn#78833, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10276:2476, offset: 0x01e36c42, size: 349 bytes, params: 2, frame: 26
const styles = useStyles();
const [property, env0_0] = Module00057(useState(0), 2);
const value4 = useCallback(_fun78834, []);
const type = product.type;
const CollectiblesItemType = (CollectiblesItemTypeModule).CollectiblesItemType;
const BUNDLE = CollectiblesItemType.BUNDLE;
let r4 = type === BUNDLE && (require(10030) /* metro dependency 10030: bundleUtils */).isValidCollectiblesBundle(product);
r4 = (
r4
? (
<BundleProductPreview
product={product}
width={property}
handlePreviewPress={handlePreviewPress}
onTrackPress={onTrackPress}
onActiveItemChange={onBundleActiveItemChange}
onActiveItemTypeChange={onBundleActiveItemTypeChange}
/>
)
: (
<View style={styles.previewDivider}>
{((IndividualProductPreview) => <IndividualProductPreview product={product} width={property} handlePreviewPress={handlePreviewPress} onTrackPress={onTrackPress} />)((require(10093) /* metro dependency 10093: IndividualProductPreview */).IndividualProductPreview)}
</View>
)
);
return (
<View style={styles.previewContainer} onLayout={value4}>
{r4}
</View>
);
function _fun78834({nativeEvent}) { // fn#78834, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10276:2631, offset: 0x01e36d9f, size: 36 bytes, params: 2, frame: 11
env0_0(nativeEvent.layout.width);
}
}
return value2;
}
global.__d(_fun78825, 10090, [57, 31, 27, 663, 33, 4501, 697, 1904, 8487, 10091, 7609, 1244, 10093, 8853, 8861,
9221, 10030,
2]) /* metro module 10090, dependencies: [57, 31, 27, 663, 33, 4501, 697, 1904, 8487, 10091, 7609, 1244, 10093, 8853, 8861, 9221, 10030, 2] */;
File diff suppressed because it is too large. Load diff
@@ -1,124 +1,147 @@
/* Metro module 10108; source: modules/collectibles/native/ProductDetailsActionSheetVariants.tsx; dependencies: [31, 27, 33, 4501, 697, 10060, 5278, 1244, 10082, 6742, 5133, 4573, 2] */
import Native from '../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import UseIsVariantColorLight from '../hooks/useIsVariantColorLight.tsx'; /* Metro dependency 10082 */
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 PressablesModule from '../../../design/void/Pressables/native/Pressables.tsx'; /* Metro dependency 5278 */
import * as CheckmarkSmallIconModule from '../../../design/components/Icon/native/redesign/generated/CheckmarkSmallIcon.tsx'; /* Metro dependency 6742 */
import * as UseProductPurchaseStateModule from '../hooks/useProductPurchaseState.tsx'; /* Metro dependency 10060 */
function _fun78905(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#78905, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10294:6, offset: 0x01e3b4e1, size: 443 bytes, params: 8, frame: 23
var object3;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_3 = (require(27) /* metro dependency 27 */).View;
let value = require(33) /* metro dependency 33 */;
ReactModule;
let value = JsxRuntimeModule;
const env0_4 = value.jsx;
const env0_5 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object3 = {};
const object4 = {'flex': 1, 'display': 'flex', 'flexDirection': 'column'};
object = {};
const object2 = {'flex': 1, 'display': 'flex', 'flexDirection': 'column'};
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object4.marginTop = PX_16;
object2.marginTop = PX_16;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object4.marginHorizontal = PX_16;
object2.marginHorizontal = PX_16;
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object4.gap = PX_8;
object3.container = object4;
object2.gap = PX_8;
object.container = object2;
let PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object3.headerRow = {'flexDirection': 'row', 'alignItems': 'center', gap: PX_12};
object.headerRow = {'flexDirection': 'row', 'alignItems': 'center', gap: PX_12};
PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object3.variantsContainer = {'display': 'flex', 'flexWrap': 'wrap', 'flexDirection': 'row', 'alignItems': 'center',
object.variantsContainer = {'display': 'flex', 'flexWrap': 'wrap', 'flexDirection': 'row', 'alignItems': 'center',
gap: PX_12};
object3.text = {'flexGrow': 1, 'flexShrink': 1, 'minWidth': 28};
const env0_6 = Reflect.apply(createStyles, value, [object3]);
object.text = {'flexGrow': 1, 'flexShrink': 1, 'minWidth': 28};
const env0_6 = Reflect.apply(createStyles, value, [object]);
const env0_7 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(_fun78906);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/ProductDetailsActionSheetVariants.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/native/ProductDetailsActionSheetVariants.tsx');
exports.default = _default_78909;
}
function _fun78906(a0) { // fn#78906, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10294:577, offset: 0x01e3b69c, size: 188 bytes, params: 2, frame: 16
const object4 = {};
const object5 = {'width': 28, 'height': 28, 'borderRadius': null, 'justifyContent': 'center',
'alignItems': 'center', 'borderWidth': 1};
object5.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
const colors = (importDefault(697) /* metro dependency 697: native */).colors;
object5.borderColor = a0 ? colors.BUTTON_OUTLINE_PRIMARY_TEXT : colors.BORDER_STRONG;
object4.variantOption = object5;
const object6 = {'width': '100%', 'height': '100%', 'justifyContent': 'center', 'alignItems': 'center',
'borderRadius': null, 'borderWidth': 1};
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object6.borderColor = BACKGROUND_BASE_LOW;
object4.variantOptionInner = object6;
return object4;
}
function VariantOption_78907({variant, isSelected, onSelect}) { // fn#78907, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10294:998, offset: 0x01e3b758, size: 302 bytes, params: 2, frame: 25
var r5;
var intl;
const styles = useStyles(isSelected);
const useProductPurchaseStateModule = require(10060) /* metro dependency 10060: useProductPurchaseState */;
const useProductPurchaseState = useProductPurchaseStateModule.useProductPurchaseState;
const isPurchased = Reflect.apply(useProductPurchaseState, useProductPurchaseStateModule, [variant]).isPurchased;
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
if (isPurchased) {
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
r5 = intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t['SfQB4+'],
{variantLabel: variant.name});
} else {
r5 = variant.name;
function _fun78906(a0) { // fn#78906, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10294:577, offset: 0x01e3b69c, size: 188 bytes, params: 2, frame: 16
const object = {};
const object2 = {'width': 28, 'height': 28, 'borderRadius': null, 'justifyContent': 'center',
'alignItems': 'center', 'borderWidth': 1};
object2.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
const colors = (importDefault(697) /* metro dependency 697: native */).colors;
object2.borderColor = a0 ? colors.BUTTON_OUTLINE_PRIMARY_TEXT : colors.BORDER_STRONG;
object.variantOption = object2;
const object3 = {'width': '100%', 'height': '100%', 'justifyContent': 'center', 'alignItems': 'center',
'borderRadius': null, 'borderWidth': 1};
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object3.borderColor = BACKGROUND_BASE_LOW;
object.variantOptionInner = object3;
return object;
}
return (
<PressableOpacity
accessibilityRole="button"
accessibilityLabel={r5}
accessibilityState={{selected: isSelected}}
onPress={onSelect}
style={styles.variantOption}
>
<View style={[styles.variantOptionInner, {backgroundColor: variant.variantValue}]}>
{isPurchased && <VariantCheckmark_78908 variant={variant} />}
</View>
</PressableOpacity>
);
}
function VariantCheckmark_78908({variant}) { // fn#78908, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10294:1470, offset: 0x01e3b886, size: 128 bytes, params: 2, frame: 17
const value2 = (importDefault(10082) /* metro dependency 10082: useIsVariantColorLight */)(variant);
const CheckmarkSmallIcon = (require(6742) /* metro dependency 6742: CheckmarkSmallIcon */).CheckmarkSmallIcon;
const colors = (importDefault(697) /* metro dependency 697: native */).colors;
return <CheckmarkSmallIcon color={value2 ? colors.BLACK : colors.WHITE} size="md" />;
}
function _default_78909({product, selectedVariantIndex, onVariantSelect}) { // fn#78909, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10294:1612, offset: 0x01e3b906, size: 408 bytes, params: 2, frame: 29
var r0;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
var intl;
var items2;
var variants;
const styles = useStyles();
if ((require(5133) /* metro dependency 5133: CollectiblesProductUtils */).getIsVariantProduct(product)) {
var viewBindingProps = {style: styles.container};
var viewBindingProps2 = {style: styles.headerRow};
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
items2 = [<Text variant="text-md/bold" color="mobile-text-heading-primary">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.wbgaj6)}</Text>];
variants = product.variants;
items2[1] = variants.length > selectedVariantIndex && <Text variant="text-md/medium" color="text-default" lineClamp={1} style={styles.text}>{product.variants[selectedVariantIndex].variantLabel}</Text>;
variants = product.variants;
r0 = <View {...viewBindingProps}><View {...viewBindingProps2}>{items2}</View><View style={styles.variantsContainer}>{variants.map(_fun78910)}</View></View>;
} else {
r0 = null;
function VariantOption_78907({variant, isSelected, onSelect}) { // fn#78907, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10294:998, offset: 0x01e3b758, size: 302 bytes, params: 2, frame: 25
var r5;
var intl;
const styles = useStyles(isSelected);
const useProductPurchaseState = UseProductPurchaseStateModule.useProductPurchaseState;
const isPurchased = Reflect.apply(useProductPurchaseState, UseProductPurchaseStateModule, [variant]).isPurchased;
const PressableOpacity = (PressablesModule).PressableOpacity;
if (isPurchased) {
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
r5 = intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t['SfQB4+'],
{variantLabel: variant.name});
} else {
r5 = variant.name;
}
return (
<PressableOpacity
accessibilityRole="button"
accessibilityLabel={r5}
accessibilityState={{selected: isSelected}}
onPress={onSelect}
style={styles.variantOption}
>
<View style={[styles.variantOptionInner, {backgroundColor: variant.variantValue}]}>
{isPurchased && <VariantCheckmark_78908 variant={variant} />}
</View>
</PressableOpacity>
);
}
return r0;
}
function _fun78910(a0, a1) { // fn#78910, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10294:2115, offset: 0x01e3ba9e, size: 74 bytes, params: 3, frame: 17
const env0_0 = a1;
return (
<VariantOption_78907
variant={a0}
isSelected={selectedVariantIndex === a1}
onSelect={function() {
return onVariantSelect(require);
}}
key={a0.variantValue}
/>
);
function VariantCheckmark_78908({variant}) { // fn#78908, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10294:1470, offset: 0x01e3b886, size: 128 bytes, params: 2, frame: 17
const value2 = (UseIsVariantColorLight)(variant);
const CheckmarkSmallIcon = (CheckmarkSmallIconModule).CheckmarkSmallIcon;
const colors = (Native).colors;
return <CheckmarkSmallIcon color={value2 ? colors.BLACK : colors.WHITE} size="md" />;
}
function _default_78909({product, selectedVariantIndex, onVariantSelect}) { // fn#78909, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10294:1612, offset: 0x01e3b906, size: 408 bytes, params: 2, frame: 29
var r0;
const Text = (TextModule).Text;
var intl;
var items2;
var variants;
const styles = useStyles();
if ((require(5133) /* metro dependency 5133: CollectiblesProductUtils */).getIsVariantProduct(product)) {
var viewBindingProps = {style: styles.container};
var viewBindingProps2 = {style: styles.headerRow};
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
items2 = [
<Text variant="text-md/bold" color="mobile-text-heading-primary">
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.wbgaj6)}
</Text>,
];
variants = product.variants;
items2[1] = variants.length > selectedVariantIndex && <Text variant="text-md/medium" color="text-default" lineClamp={1} style={styles.text}>{product.variants[selectedVariantIndex].variantLabel}</Text>;
variants = product.variants;
r0 = (
<View {...viewBindingProps}>
<View {...viewBindingProps2}>
{items2}
</View>
<View style={styles.variantsContainer}>
{variants.map(_fun78910)}
</View>
</View>
);
} else {
r0 = null;
}
return r0;
function _fun78910(a0, a1) { // fn#78910, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10294:2115, offset: 0x01e3ba9e, size: 74 bytes, params: 3, frame: 17
const env0_0 = a1;
return (
<VariantOption_78907
variant={a0}
isSelected={selectedVariantIndex === a1}
onSelect={function() {
return onVariantSelect(require);
}}
key={a0.variantValue}
/>
);
}
}
}
global.__d(_fun78905, 10108, [31, 27, 33, 4501, 697, 10060, 5278, 1244, 10082, 6742, 5133, 4573,
2]) /* metro module 10108, dependencies: [31, 27, 33, 4501, 697, 10060, 5278, 1244, 10082, 6742, 5133, 4573, 2] */;
@@ -1,22 +1,41 @@
/* Metro module 7589; source: modules/collectibles/native/ProductPurchaseSuccessActionCreators.tsx; dependencies: [5, 5080, 7590, 1962, 2] */
import Module00005 from '../../../by-id/module-00005.js'; /* Metro dependency 5 */
import ModalActionCreators from '../../../actions/ModalActionCreators.tsx'; /* Metro dependency 5080 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun60863(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#60863, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7767:6, offset: 0x0171227e, size: 145 bytes, params: 8, frame: 19
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(5) /* metro dependency 5 */;
object2 = {open: open_60864, close: close_60867};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/ProductPurchaseSuccessActionCreators.tsx');
exports.default = object2;
object = {open: open_60864, close: close_60867};
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/native/ProductPurchaseSuccessActionCreators.tsx');
exports.default = object;
exports.MODAL_KEY = 'ShopProductPurchaseSuccessModal';
function open_60864(a0) { // fn#60864, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7767:145, offset: 0x0171230f, size: 65 bytes, params: 2, frame: 16
const defaultImport = ModalActionCreators;
defaultImport.pushLazy(Module00005(_fun60866), a0, 'ShopProductPurchaseSuccessModal');
function* _fun60866() { // fn#60866, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7767:173, offset: 0x01712359, size: 74 bytes, params: 1, frame: 14
if (false) {
return undefined;
}
value = environment.__proto__.__proto__;
const binding = env2_0;
const binding2 = env2_2;
yield binding(binding2[3])(binding2[2], binding2.paths);
value = undefined;
if (false) {
return value;
}
return value.default;
}
}
function close_60867() { // fn#60867, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7767:238, offset: 0x017123a3, size: 44 bytes, params: 1, frame: 12
(ModalActionCreators).popWithKey('ShopProductPurchaseSuccessModal');
}
}
function open_60864(a0) { // fn#60864, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7767:145, offset: 0x0171230f, size: 65 bytes, params: 2, frame: 16
const defaultImport = importDefault(5080) /* metro dependency 5080: ModalActionCreators */;
defaultImport.pushLazy(env0_3(_fun60866), a0, 'ShopProductPurchaseSuccessModal');
}
function close_60867() { // fn#60867, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7767:238, offset: 0x017123a3, size: 44 bytes, params: 1, frame: 12
(importDefault(5080) /* metro dependency 5080: ModalActionCreators */).popWithKey('ShopProductPurchaseSuccessModal');
}
global.__d(_fun60863, 7589, [5, 5080, 7590, 1962,
2]) /* metro module 7589, dependencies: [5, 5080, 7590, 1962, 2] */;
File diff suppressed because it is too large. Load diff
@@ -1,37 +1,49 @@
/* Metro module 8472; source: modules/collectibles/native/ProfileEffectSampleV2.tsx; dependencies: [27, 8471, 33, 4501, 697, 5475, 8473, 8474, 2] */
import Native from '../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
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 JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as CollectiblesPreviewConstantsModule from './CollectiblesPreviewConstants.tsx'; /* Metro dependency 8471 */
function _fun67269(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#67269, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8657:6, offset: 0x01c1c60e, size: 304 bytes, params: 8, frame: 23
var object2;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = (require(27) /* metro dependency 27 */).View;
const SAMPLE_PROFILE_ASPECT_RATIO = (require(8471) /* metro dependency 8471: CollectiblesPreviewConstants */).SAMPLE_PROFILE_ASPECT_RATIO;
let value = require(33) /* metro dependency 33 */;
const SAMPLE_PROFILE_ASPECT_RATIO = (CollectiblesPreviewConstantsModule).SAMPLE_PROFILE_ASPECT_RATIO;
let value = JsxRuntimeModule;
const env0_3 = value.jsx;
const env0_4 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {profileContainer: {'position': 'absolute', 'display': 'flex', 'height': '100%', 'width': '100%'}};
const BACKGROUND_MOD_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_SUBTLE;
object2.profileBackground = {backgroundColor: BACKGROUND_MOD_SUBTLE};
object2.sampleProfileImage = {aspectRatio: SAMPLE_PROFILE_ASPECT_RATIO};
const BORDER_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_MUTED;
object2.profileBorder = {'position': 'absolute', 'height': '100%', 'width': '100%', 'borderWidth': 1,
object = {profileContainer: {'position': 'absolute', 'display': 'flex', 'height': '100%', 'width': '100%'}};
const BACKGROUND_MOD_SUBTLE = (Native).colors.BACKGROUND_MOD_SUBTLE;
object.profileBackground = {backgroundColor: BACKGROUND_MOD_SUBTLE};
object.sampleProfileImage = {aspectRatio: SAMPLE_PROFILE_ASPECT_RATIO};
const BORDER_MUTED = (Native).colors.BORDER_MUTED;
object.profileBorder = {'position': 'absolute', 'height': '100%', 'width': '100%', 'borderWidth': 1,
borderColor: BORDER_MUTED};
const env0_5 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/ProfileEffectSampleV2.tsx');
const env0_5 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/native/ProfileEffectSampleV2.tsx');
exports.default = _default_67270;
function _default_67270({item, hideBackground}) { // fn#67270, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8657:517, offset: 0x01c1c73e, size: 278 bytes, params: 2, frame: 24
hideBackground = !(hideBackground === undefined) && hideBackground;
const styles = useStyles();
const value2 = !hideBackground;
return (
<View style={[styles.profileContainer, hideBackground ? value2 : styles.profileBackground]}>
{((Component) => <Component style={[styles.sampleProfileImage]} source={{uri: importDefault(8473) /* metro dependency 8473: sample_profilePng */}} accessible={false} resizeMode="cover" />)(importDefault(5475) /* metro dependency 5475: FastImage */)}
{
hideBackground
? value2
: (
<View style={styles.profileBorder} />
)
}
{((Component) => <Component skuId={item.skuId} bannerAdjustment={0} useThumbnail />)(importDefault(8474) /* metro dependency 8474: ProfileEffect */)}
</View>
);
}
}
function _default_67270({item, hideBackground}) { // fn#67270, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8657:517, offset: 0x01c1c73e, size: 278 bytes, params: 2, frame: 24
hideBackground = !(hideBackground === undefined) && hideBackground;
const styles = useStyles();
const value2 = !hideBackground;
return (
<View style={[styles.profileContainer, hideBackground ? value2 : styles.profileBackground]}>
{((Component) => <Component style={[styles.sampleProfileImage]} source={{uri: importDefault(8473) /* metro dependency 8473: sample_profilePng */}} accessible={false} resizeMode="cover" />)(importDefault(5475) /* metro dependency 5475: FastImage */)}
{hideBackground ? value2 : <View style={styles.profileBorder} />}
{((Component) => <Component skuId={item.skuId} bannerAdjustment={0} useThumbnail />)(importDefault(8474) /* metro dependency 8474: ProfileEffect */)}
</View>
);
}
global.__d(_fun67269, 8472, [27, 8471, 33, 4501, 697, 5475, 8473, 8474,
2]) /* metro module 8472, dependencies: [27, 8471, 33, 4501, 697, 5475, 8473, 8474, 2] */;
+188 -147
View File
@@ -1,178 +1,219 @@
/* Metro module 14078; source: modules/collectibles/native/ShelfBlock.tsx; dependencies: [31, 27, 5121, 663, 661, 33, 4501, 697, 1484, 10023, 14057, 6771, 6789, 566, 14058, 14049, 5120, 10020, 4573, 4578, 1244, 6517, 8416, 2] */
import Native from '../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import CollectiblesCategoryStore from '../CollectiblesCategoryStore.tsx'; /* Metro dependency 5121 */
import UseAnalyticsLocations from '../../app_analytics/useAnalyticsLocations.tsx'; /* Metro dependency 6771 */
import AnalyticsLocation from '../../app_analytics/AnalyticsLocation.tsx'; /* Metro dependency 6789 */
import CollectiblesShopCardV2 from './CollectiblesShopCardV2.tsx'; /* Metro dependency 10020 */
import UseGetProductsFromSkus from '../hooks/useGetProductsFromSkus.tsx'; /* Metro dependency 14058 */
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 FluxModule from '../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
import * as CollectiblesShopConstantsModule from '../CollectiblesShopConstants.tsx'; /* Metro dependency 663 */
import * as UseNavigationNativeModule from '../../../design/components/Navigator/native/useNavigation.native.tsx'; /* Metro dependency 1484 */
import * as TextModule from '../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as LayerScopeNativeModule from '../../../design/components/Layers/native/LayerScope.native.tsx'; /* Metro dependency 6517 */
import * as UseAnalyticsLocationsModule from '../../app_analytics/useAnalyticsLocations.tsx'; /* Metro dependency 6771 */
import * as FlashListModule from '../../../external/discord_common/js/packages/flash-list/index.jsx'; /* Metro dependency 8416 */
import * as CollectiblesShopCardV2Module from './CollectiblesShopCardV2.tsx'; /* Metro dependency 10020 */
import * as CollectiblesAnalyticsContextModule from '../CollectiblesAnalyticsContext.tsx'; /* Metro dependency 10023 */
import * as UseFilteredAndSortedProductsModule from './hooks/useFilteredAndSortedProducts.tsx'; /* Metro dependency 14049 */
import * as CollectiblesCoachmarkScrollDismissContextModule from './CollectiblesCoachmarkScrollDismissContext.tsx'; /* Metro dependency 14057 */
function _fun106686(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#106686, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14275:6, offset: 0x022e6904, size: 634 bytes, params: 8, frame: 23
var object5;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
let value = ReactNativeModule;
const env0_4 = value.Image;
const env0_5 = value.View;
const collectiblesCategoryStore = importDefault(5121) /* metro dependency 5121: CollectiblesCategoryStore */;
const env0_7 = (require(663) /* metro dependency 663: CollectiblesShopConstants */).CollectiblesMobileShopScreen;
const env0_8 = (require(661) /* metro dependency 661: Constants */).UserSettingsSections;
value = require(33) /* metro dependency 33 */;
const env0_9 = value.jsx;
const env0_10 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object5 = {};
const object6 = {width: '100%'};
object = {};
const object2 = {width: '100%'};
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object6.paddingTop = PX_16;
object2.paddingTop = PX_16;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object6.paddingBottom = PX_16;
object5.container = object6;
const object7 = {};
object2.paddingBottom = PX_16;
object.container = object2;
const object3 = {};
let PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
object7.marginTop = PX_24;
object3.marginTop = PX_24;
PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
object7.paddingTop = PX_24;
object3.paddingTop = PX_24;
PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
object7.paddingBottom = PX_24;
object7.overflow = 'hidden';
object5.containerWithBackground = object7;
object5.backgroundImage = {'position': 'absolute', 'top': 0, 'left': 0, 'bottom': 0, 'minWidth': '100%',
object3.paddingBottom = PX_24;
object3.overflow = 'hidden';
object.containerWithBackground = object3;
object.backgroundImage = {'position': 'absolute', 'top': 0, 'left': 0, 'bottom': 0, 'minWidth': '100%',
'aspectRatio': 2.5, 'resizeMode': 'cover'};
const object8 = {'flexDirection': 'row', 'alignItems': 'center', 'justifyContent': 'space-between'};
const object4 = {'flexDirection': 'row', 'alignItems': 'center', 'justifyContent': 'space-between'};
let PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object8.gap = PX_12;
object4.gap = PX_12;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object8.paddingHorizontal = PX_16;
object4.paddingHorizontal = PX_16;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object8.marginBottom = PX_16;
object8.zIndex = 1;
object5.header = object8;
object5.headingWrapper = {flexShrink: 1};
object4.marginBottom = PX_16;
object4.zIndex = 1;
object.header = object4;
object.headingWrapper = {flexShrink: 1};
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object5.listEdgeSpacer = {width: PX_16};
object.listEdgeSpacer = {width: PX_16};
PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object5.listItemSeparator = {width: PX_12};
const env0_11 = Reflect.apply(createStyles, value, [object5]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/ShelfBlock.tsx');
object.listItemSeparator = {width: PX_12};
const env0_11 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/native/ShelfBlock.tsx');
exports.default = _default_106689;
}
function ListEdgeSpacer_106687() { // fn#106687, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14275:926, offset: 0x022e6b7e, size: 41 bytes, params: 1, frame: 14
const styles = useStyles();
return <View style={styles.listEdgeSpacer} />;
}
function ListItemSeparator_106688() { // fn#106688, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14275:997, offset: 0x022e6ba7, size: 41 bytes, params: 1, frame: 14
const styles = useStyles();
return <View style={styles.listItemSeparator} />;
}
function _default_106689({block, preferVCPrice}) { // fn#106689, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14275:1062, offset: 0x022e6bd0, size: 1134 bytes, params: 2, frame: 39
var Button;
var intl;
const styles = useStyles();
const value3 = (require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation();
const value4 = (require(10023) /* metro dependency 10023: CollectiblesAnalyticsContext */).useCollectiblesAnalyticsContext();
const env0_3 = value4;
const collectiblesCoachmarkScrollDismissContextModule = require(14057) /* metro dependency 14057: CollectiblesCoachmarkScrollDismissContext */;
const useCollectiblesCoachmarkScrollDismissContext = collectiblesCoachmarkScrollDismissContextModule.useCollectiblesCoachmarkScrollDismissContext;
const handleDismissCoachmarkOnScroll = Reflect.apply(useCollectiblesCoachmarkScrollDismissContext,
collectiblesCoachmarkScrollDismissContextModule, []).handleDismissCoachmarkOnScroll;
const defaultImport = importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */;
const COLLECTIBLES_SHOP_SHELF = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).COLLECTIBLES_SHOP_SHELF;
const analyticsLocations = defaultImport(COLLECTIBLES_SHOP_SHELF).analyticsLocations;
const value5 = (require(566) /* metro dependency 566: flux */).useStateFromStores([CollectiblesCategoryStore],
_fun106690);
const value6 = (importDefault(14058) /* metro dependency 14058: useGetProductsFromSkus */)();
const binding = env0_3;
const value8 = (require(14049) /* metro dependency 14049: useFilteredAndSortedProducts */).useFilteredAndSortedProducts({products: binding.useMemo(_fun106691,
[block.rankedSkuIds, value6])});
const value9 = binding.useCallback(_fun106692, [value5, value3, value4]);
const value10 = binding.useCallback(_fun106693, [block.name, preferVCPrice]);
const value11 = binding.useCallback(function(a0) {
return a0.skuId;
}, []);
if (value8.length === 0) {
return null;
function ListEdgeSpacer_106687() { // fn#106687, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14275:926, offset: 0x022e6b7e, size: 41 bytes, params: 1, frame: 14
const styles = useStyles();
return <View style={styles.listEdgeSpacer} />;
}
const value12 = block.mobileBackgroundImage != null;
items = [styles.container];
items[1] = value12 && styles.containerWithBackground;
const AnalyticsLocationProvider = (require(6771) /* metro dependency 6771: useAnalyticsLocations */).AnalyticsLocationProvider;
const object2 = {style: items};
items = [value12 && block.mobileBackgroundImage != null && <Image style={styles.backgroundImage} source={{uri: block.mobileBackgroundImage}} />];
const Heading = (require(4573) /* metro dependency 4573: Text */).Heading;
const view = <View style={styles.headingWrapper}><Heading variant="text-md/semibold" style={value12 ? {color: block.titleColor ?? '#ffffff'} : undefined}>{block.name}</Heading></View>;
let r12 = block.showButton && value5 != null;
if (r12) {
Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
var buttonProps = {'variant': null, 'size': 'sm', 'shrink': true, 'grow': false,
variant: value12 ? 'primary-overlay' : 'secondary'};
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
buttonProps.text = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.xFcotU);
buttonProps.onPress = value9;
r12 = <Button {...buttonProps} />;
function ListItemSeparator_106688() { // fn#106688, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14275:997, offset: 0x022e6ba7, size: 41 bytes, params: 1, frame: 14
const styles = useStyles();
return <View style={styles.listItemSeparator} />;
}
items[1] = <View style={styles.header}>{view}{r12}</View>;
const LayerScope = (require(6517) /* metro dependency 6517: LayerScopeNative */).LayerScope;
const FlashList = (require(8416) /* metro dependency 8416: flashList */).FlashList;
const flashListProps = {'horizontal': true, 'accessibilityRole': 'list', accessibilityLabel: block.name,
data: value8, keyExtractor: value11, onScroll: handleDismissCoachmarkOnScroll, renderItem: value10,
decelerationRate: 'fast'};
const COLLECTIBLES_SHOP_CARD_WIDTH = (require(10020) /* metro dependency 10020: CollectiblesShopCardV2 */).COLLECTIBLES_SHOP_CARD_WIDTH;
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
flashListProps.snapToInterval = COLLECTIBLES_SHOP_CARD_WIDTH + PX_12;
flashListProps.estimatedItemSize = COLLECTIBLES_SHOP_CARD_WIDTH;
flashListProps.showsHorizontalScrollIndicator = false;
flashListProps.ListHeaderComponent = ListEdgeSpacer_106687;
flashListProps.ListFooterComponent = ListEdgeSpacer_106687;
flashListProps.ItemSeparatorComponent = ListItemSeparator_106688;
items[2] = <LayerScope><FlashList {...flashListProps} /></LayerScope>;
return (
<AnalyticsLocationProvider value={analyticsLocations}>
<View {...object2}>
{items}
</View>
</AnalyticsLocationProvider>
);
}
function _fun106690() { // fn#106690, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14275:1362, offset: 0x022e703e, size: 54 bytes, params: 1, frame: 12
return block.categorySkuId != null ? CollectiblesCategoryStore.getCategory(block.categorySkuId) : undefined;
}
function _fun106692() { // fn#106692, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14275:1568, offset: 0x022e7074, size: 187 bytes, params: 1, frame: 19
var isOrbsExclusive;
var value2;
var binding;
var object2;
var openCollectiblesShopMobile;
var COLLECTIBLES_SHOP;
var value;
if (env0_4 != null) {
isOrbsExclusive = env0_4.isOrbsExclusive;
value2 = environment.__proto__;
if (isOrbsExclusive) {
value = require(5120) /* metro dependency 5120: CollectiblesActionCreators */;
openCollectiblesShopMobile = value.openCollectiblesShopMobile;
object2 = {};
COLLECTIBLES_SHOP = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).COLLECTIBLES_SHOP;
object2.analyticsLocations = [COLLECTIBLES_SHOP];
COLLECTIBLES_SHOP = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).COLLECTIBLES_SHOP;
object2.analyticsSource = COLLECTIBLES_SHOP;
object2.screen = CollectiblesMobileShopScreen.ORBS;
Reflect.apply(openCollectiblesShopMobile, value, [object2]);
} else {
binding = env0_2;
binding.push(UserSettingsSections.COLLECTIBLES_SHOP_VIEW_ALL_CATEGORY_ITEMS, {category: env0_4,
analyticsContext: env0_3});
function _default_106689({block, preferVCPrice}) { // fn#106689, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14275:1062, offset: 0x022e6bd0, size: 1134 bytes, params: 2, frame: 39
var Button;
var intl;
const styles = useStyles();
const value3 = (UseNavigationNativeModule).useNavigation();
const value4 = (CollectiblesAnalyticsContextModule).useCollectiblesAnalyticsContext();
const env0_3 = value4;
const useCollectiblesCoachmarkScrollDismissContext = CollectiblesCoachmarkScrollDismissContextModule.useCollectiblesCoachmarkScrollDismissContext;
const handleDismissCoachmarkOnScroll = Reflect.apply(useCollectiblesCoachmarkScrollDismissContext,
CollectiblesCoachmarkScrollDismissContextModule, []).handleDismissCoachmarkOnScroll;
const defaultImport = UseAnalyticsLocations;
const COLLECTIBLES_SHOP_SHELF = (AnalyticsLocation).COLLECTIBLES_SHOP_SHELF;
const analyticsLocations = defaultImport(COLLECTIBLES_SHOP_SHELF).analyticsLocations;
const value5 = (FluxModule).useStateFromStores([CollectiblesCategoryStore],
_fun106690);
const value6 = (UseGetProductsFromSkus)();
const binding = env0_3;
const value8 = (UseFilteredAndSortedProductsModule).useFilteredAndSortedProducts({products: binding.useMemo(_fun106691,
[block.rankedSkuIds, value6])});
const value9 = binding.useCallback(_fun106692, [value5, value3, value4]);
const value10 = binding.useCallback(_fun106693, [block.name, preferVCPrice]);
const value11 = binding.useCallback(function(a0) {
return a0.skuId;
}, []);
if (value8.length === 0) {
return null;
}
const value12 = block.mobileBackgroundImage != null;
items2 = [styles.container];
items2[1] = value12 && styles.containerWithBackground;
const AnalyticsLocationProvider = (UseAnalyticsLocationsModule).AnalyticsLocationProvider;
const object = {style: items2};
items2 = [
value12 && block.mobileBackgroundImage != null && <Image style={styles.backgroundImage} source={{uri: block.mobileBackgroundImage}} />,
];
const Heading = (TextModule).Heading;
const view = (
<View style={styles.headingWrapper}>
<Heading variant="text-md/semibold" style={value12 ? {color: block.titleColor ?? '#ffffff'} : undefined}>
{block.name}
</Heading>
</View>
);
let r12 = block.showButton && value5 != null;
if (r12) {
Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
var buttonProps = {'variant': null, 'size': 'sm', 'shrink': true, 'grow': false,
variant: value12 ? 'primary-overlay' : 'secondary'};
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
buttonProps.text = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.xFcotU);
buttonProps.onPress = value9;
r12 = <Button {...buttonProps} />;
}
items2[1] = (
<View style={styles.header}>
{view}
{r12}
</View>
);
const LayerScope = (LayerScopeNativeModule).LayerScope;
const FlashList = (FlashListModule).FlashList;
const flashListProps = {'horizontal': true, 'accessibilityRole': 'list', accessibilityLabel: block.name,
data: value8, keyExtractor: value11, onScroll: handleDismissCoachmarkOnScroll, renderItem: value10,
decelerationRate: 'fast'};
const COLLECTIBLES_SHOP_CARD_WIDTH = (CollectiblesShopCardV2Module).COLLECTIBLES_SHOP_CARD_WIDTH;
const PX_12 = (Native).space.PX_12;
flashListProps.snapToInterval = COLLECTIBLES_SHOP_CARD_WIDTH + PX_12;
flashListProps.estimatedItemSize = COLLECTIBLES_SHOP_CARD_WIDTH;
flashListProps.showsHorizontalScrollIndicator = false;
flashListProps.ListHeaderComponent = ListEdgeSpacer_106687;
flashListProps.ListFooterComponent = ListEdgeSpacer_106687;
flashListProps.ItemSeparatorComponent = ListItemSeparator_106688;
items2[2] = (
<LayerScope>
<FlashList {...flashListProps} />
</LayerScope>
);
return (
<AnalyticsLocationProvider value={analyticsLocations}>
<View {...object}>
{items2}
</View>
</AnalyticsLocationProvider>
);
function _fun106690() { // fn#106690, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14275:1362, offset: 0x022e703e, size: 54 bytes, params: 1, frame: 12
return block.categorySkuId != null ? CollectiblesCategoryStore.getCategory(block.categorySkuId) : undefined;
}
function _fun106691() { // fn#106691, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14275:1454, offset: 0x022e232c, size: 26 bytes, params: 1, frame: 11
return env0_5(block.rankedSkuIds);
}
function _fun106692() { // fn#106692, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14275:1568, offset: 0x022e7074, size: 187 bytes, params: 1, frame: 19
var isOrbsExclusive;
var value2;
var binding;
var object;
var openCollectiblesShopMobile;
var COLLECTIBLES_SHOP;
var value;
if (env0_4 != null) {
isOrbsExclusive = env0_4.isOrbsExclusive;
value2 = environment.__proto__;
if (isOrbsExclusive) {
value = require(5120) /* metro dependency 5120: CollectiblesActionCreators */;
openCollectiblesShopMobile = value.openCollectiblesShopMobile;
object = {};
COLLECTIBLES_SHOP = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).COLLECTIBLES_SHOP;
object.analyticsLocations = [COLLECTIBLES_SHOP];
COLLECTIBLES_SHOP = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).COLLECTIBLES_SHOP;
object.analyticsSource = COLLECTIBLES_SHOP;
object.screen = CollectiblesMobileShopScreen.ORBS;
Reflect.apply(openCollectiblesShopMobile, value, [object]);
} else {
binding = env0_2;
binding.push(UserSettingsSections.COLLECTIBLES_SHOP_VIEW_ALL_CATEGORY_ITEMS, {category: env0_4,
analyticsContext: env0_3});
}
}
}
function _fun106693({item, index}) { // fn#106693, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14275:1858, offset: 0x022e712f, size: 129 bytes, params: 2, frame: 19
const value = environment.__proto__;
const CollectiblesAnalyticsProvider = (CollectiblesAnalyticsContextModule).CollectiblesAnalyticsProvider;
return (
<CollectiblesAnalyticsProvider newValue={{tilePosition: index, pageSection: block.name}}>
{((Component) => <Component product={item} preferVCPrice={preferVCPrice} />)(CollectiblesShopCardV2)}
</CollectiblesAnalyticsProvider>
);
}
}
}
function _fun106693({item, index}) { // fn#106693, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14275:1858, offset: 0x022e712f, size: 129 bytes, params: 2, frame: 19
const value = environment.__proto__;
const CollectiblesAnalyticsProvider = (require(10023) /* metro dependency 10023: CollectiblesAnalyticsContext */).CollectiblesAnalyticsProvider;
return (
<CollectiblesAnalyticsProvider newValue={{tilePosition: index, pageSection: block.name}}>
{((Component) => <Component product={item} preferVCPrice={preferVCPrice} />)(importDefault(10020) /* metro dependency 10020: CollectiblesShopCardV2 */)}
</CollectiblesAnalyticsProvider>
);
}
global.__d(_fun106686, 14078, [31, 27, 5121, 663, 661, 33, 4501, 697, 1484, 10023, 14057, 6771, 6789, 566, 14058,
14049, 5120, 10020, 4573, 4578, 1244, 6517, 8416,
2]) /* metro module 14078, dependencies: [31, 27, 5121, 663, 661, 33, 4501, 697, 1484, 10023, 14057, 6771, 6789, 566, 14058, 14049, 5120, 10020, 4573, 4578, 1244, 6517, 8416, 2] */;
@@ -1,100 +1,110 @@
/* Metro module 14054; source: modules/collectibles/native/ShopBlockItem.tsx; dependencies: [31, 27, 5121, 33, 4501, 697, 566, 5161, 10023, 14055, 14067, 14068, 14070, 14077, 14078, 2] */
import Native from '../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import CollectiblesCategoryStore from '../CollectiblesCategoryStore.tsx'; /* Metro dependency 5121 */
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 FluxModule from '../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as CreateStylesModule from '../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as ShopBlockTypeModule from '../../../external/discord_common/js/shared/shared-constants/ShopBlockType.tsx'; /* Metro dependency 5161 */
import * as CollectiblesAnalyticsContextModule from '../CollectiblesAnalyticsContext.tsx'; /* Metro dependency 10023 */
function _fun106577(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#106577, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14251:6, offset: 0x022e0d4e, size: 240 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 collectiblesCategoryStore = importDefault(5121) /* metro dependency 5121: CollectiblesCategoryStore */;
const env0_6 = (require(33) /* metro dependency 33 */).jsx;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
const env0_7 = Reflect.apply(createStyles, createStylesModule, [{shopBlockSpacing: {marginTop: PX_16}}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/ShopBlockItem.tsx');
const createStyles = CreateStylesModule.createStyles;
const PX_16 = (Native).space.PX_16;
const env0_7 = Reflect.apply(createStyles, CreateStylesModule, [{shopBlockSpacing: {marginTop: PX_16}}]);
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/native/ShopBlockItem.tsx');
exports.default = _default_106578;
}
function _default_106578({block, screen, preferVCPrice, framesBannerBlock}) { // fn#106578, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14251:229, offset: 0x022e0e3e, size: 1073 bytes, params: 2, frame: 26
var r4;
const CollectiblesAnalyticsProvider = (require(10023) /* metro dependency 10023: CollectiblesAnalyticsContext */).CollectiblesAnalyticsProvider;
var value;
const styles = useStyles();
const value2 = env0_3.useMemo(_fun106581, [block,
(require(566) /* metro dependency 566: flux */).useStateFromStores([CollectiblesCategoryStore], function() {
return CollectiblesCategoryStore.categories;
}).size, (require(566) /* metro dependency 566: flux */).useStateFromStores([CollectiblesCategoryStore],
function() {
return CollectiblesCategoryStore.products;
}).size]);
const type = block.type;
const ShopBlockType = (require(5161) /* metro dependency 5161: ShopBlockType */).ShopBlockType;
const HERO = ShopBlockType.HERO;
if (HERO === type) {
if (framesBannerBlock != null) {
value = importDefault(14055) /* metro dependency 14055: FramesHeroBlock */;
value = ((Component) => <Component heroBlock={block} bannerBlock={framesBannerBlock} preferVCPrice={preferVCPrice} screen={screen} key={value2} />)(value);
r4 = value;
} else {
value = importDefault(14067) /* metro dependency 14067: HeroBlock */;
value = ((Component) => <Component heroBlock={block} preferVCPrice={preferVCPrice} screen={screen} key={value2} />)(value);
r4 = value;
function _default_106578({block, screen, preferVCPrice, framesBannerBlock}) { // fn#106578, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14251:229, offset: 0x022e0e3e, size: 1073 bytes, params: 2, frame: 26
var r4;
const CollectiblesAnalyticsProvider = (CollectiblesAnalyticsContextModule).CollectiblesAnalyticsProvider;
var value;
const styles = useStyles();
const useStateFromStores = FluxModule.useStateFromStores;
const collectiblesCategoryStoreBinding = CollectiblesCategoryStore;
const value2 = ReactModule.useMemo(_fun106581, [block, Reflect.apply(useStateFromStores, FluxModule,
[[collectiblesCategoryStoreBinding], function() {
return CollectiblesCategoryStore.categories;
}]).size, FluxModule.useStateFromStores([collectiblesCategoryStoreBinding], function() {
return CollectiblesCategoryStore.products;
}).size]);
const type = block.type;
const ShopBlockType = (require(5161) /* metro dependency 5161: ShopBlockType */).ShopBlockType;
const HERO = ShopBlockType.HERO;
if (HERO === type) {
if (framesBannerBlock != null) {
value = importDefault(14055) /* metro dependency 14055: FramesHeroBlock */;
value = ((Component) => <Component heroBlock={block} bannerBlock={framesBannerBlock} preferVCPrice={preferVCPrice} screen={screen} key={value2} />)(value);
r4 = value;
} else {
value = importDefault(14067) /* metro dependency 14067: HeroBlock */;
value = ((Component) => <Component heroBlock={block} preferVCPrice={preferVCPrice} screen={screen} key={value2} />)(value);
r4 = value;
}
return (
<CollectiblesAnalyticsProvider newValue={{pageSection: 'top 4'}}>
{r4}
</CollectiblesAnalyticsProvider>
);
}
return (
<CollectiblesAnalyticsProvider newValue={{pageSection: 'top 4'}}>
{r4}
</CollectiblesAnalyticsProvider>
);
const FEATURED = ShopBlockType.FEATURED;
if (FEATURED === type) {
return (
<CollectiblesAnalyticsProvider newValue={{pageSection: 'featured_block'}}>
<View style={styles.shopBlockSpacing} key={value2}>
{((Component) => <Component featuredBlock={block} />)(importDefault(14068) /* metro dependency 14068: FeaturedBlock */)}
</View>
</CollectiblesAnalyticsProvider>
);
}
const FEED = ShopBlockType.FEED;
if (FEED === type) {
return (
<CollectiblesAnalyticsProvider newValue={{pageSection: 'popular picks'}}>
<View style={styles.shopBlockSpacing}>
{((Component) => <Component feedBlock={block} screen={screen} preferVCPrice={preferVCPrice} disableBundleStaticBackground key={value2} />)(importDefault(14070) /* metro dependency 14070: FeedBlock */)}
</View>
</CollectiblesAnalyticsProvider>
);
}
const FRAMES_PRODUCT_SHELF = ShopBlockType.FRAMES_PRODUCT_SHELF;
if (FRAMES_PRODUCT_SHELF === type) {
return (
<CollectiblesAnalyticsProvider newValue={{pageSection: 'frames_product_shelf'}}>
{((Component) => <Component block={block} preferVCPrice={preferVCPrice} key={value2} />)(importDefault(14077) /* metro dependency 14077: FramesProductShelfBlock */)}
</CollectiblesAnalyticsProvider>
);
}
const SHELF = ShopBlockType.SHELF;
if (SHELF === type) {
return (
<CollectiblesAnalyticsProvider newValue={{pageSection: block.name}}>
<View style={styles.shopBlockSpacing}>
{((Component) => <Component block={block} preferVCPrice={preferVCPrice} key={value2} />)(importDefault(14078) /* metro dependency 14078: ShelfBlock */)}
</View>
</CollectiblesAnalyticsProvider>
);
}
const WIDE_BANNER = ShopBlockType.WIDE_BANNER;
if (WIDE_BANNER !== type) {
(require(5161) /* metro dependency 5161: ShopBlockType */).ShopBlockType.FRAMES_BANNER;
}
return null;
function _fun106581() { // fn#106581, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14251:415, offset: 0x022e128d, size: 218 bytes, params: 1, frame: 17
const type = block.type;
const ShopBlockType = (ShopBlockTypeModule).ShopBlockType;
const HERO = ShopBlockType.HERO;
return type === HERO ? 'hero-' + block.categoryStoreListingId : block.type === ShopBlockType.REWARD_HERO ? 'reward-hero-' + block.categoryStoreListingId : '' + categories.size + '-' + products.size;
}
}
const FEATURED = ShopBlockType.FEATURED;
if (FEATURED === type) {
return (
<CollectiblesAnalyticsProvider newValue={{pageSection: 'featured_block'}}>
<View style={styles.shopBlockSpacing} key={value2}>
{((Component) => <Component featuredBlock={block} />)(importDefault(14068) /* metro dependency 14068: FeaturedBlock */)}
</View>
</CollectiblesAnalyticsProvider>
);
}
const FEED = ShopBlockType.FEED;
if (FEED === type) {
return (
<CollectiblesAnalyticsProvider newValue={{pageSection: 'popular picks'}}>
<View style={styles.shopBlockSpacing}>
{((Component) => <Component feedBlock={block} screen={screen} preferVCPrice={preferVCPrice} disableBundleStaticBackground key={value2} />)(importDefault(14070) /* metro dependency 14070: FeedBlock */)}
</View>
</CollectiblesAnalyticsProvider>
);
}
const FRAMES_PRODUCT_SHELF = ShopBlockType.FRAMES_PRODUCT_SHELF;
if (FRAMES_PRODUCT_SHELF === type) {
return (
<CollectiblesAnalyticsProvider newValue={{pageSection: 'frames_product_shelf'}}>
{((Component) => <Component block={block} preferVCPrice={preferVCPrice} key={value2} />)(importDefault(14077) /* metro dependency 14077: FramesProductShelfBlock */)}
</CollectiblesAnalyticsProvider>
);
}
const SHELF = ShopBlockType.SHELF;
if (SHELF === type) {
return (
<CollectiblesAnalyticsProvider newValue={{pageSection: block.name}}>
<View style={styles.shopBlockSpacing}>
{((Component) => <Component block={block} preferVCPrice={preferVCPrice} key={value2} />)(importDefault(14078) /* metro dependency 14078: ShelfBlock */)}
</View>
</CollectiblesAnalyticsProvider>
);
}
const WIDE_BANNER = ShopBlockType.WIDE_BANNER;
if (WIDE_BANNER !== type) {
(require(5161) /* metro dependency 5161: ShopBlockType */).ShopBlockType.FRAMES_BANNER;
}
return null;
}
function _fun106581() { // fn#106581, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14251:415, offset: 0x022e128d, size: 218 bytes, params: 1, frame: 17
const type = block.type;
const ShopBlockType = (require(5161) /* metro dependency 5161: ShopBlockType */).ShopBlockType;
const HERO = ShopBlockType.HERO;
return type === HERO ? 'hero-' + block.categoryStoreListingId : block.type === ShopBlockType.REWARD_HERO ? 'reward-hero-' + block.categoryStoreListingId : '' + categories.size + '-' + products.size;
}
global.__d(_fun106577, 14054, [31, 27, 5121, 33, 4501, 697, 566, 5161, 10023, 14055, 14067, 14068, 14070, 14077,
14078,
2]) /* metro module 14054, dependencies: [31, 27, 5121, 33, 4501, 697, 566, 5161, 10023, 14055, 14067, 14068, 14070, 14077, 14078, 2] */;
@@ -1,179 +1,201 @@
/* Metro module 14048; source: modules/collectibles/native/ShopCategory.tsx; dependencies: [31, 27, 663, 661, 33, 10020, 4501, 697, 6771, 1484, 14049, 14042, 14047, 10023, 4080, 10085, 5120, 6789, 5278, 1244, 6818, 8416, 2] */
import UseAnalyticsLocations from '../../app_analytics/useAnalyticsLocations.tsx'; /* Metro dependency 6771 */
import CollectiblesShopCardV2 from './CollectiblesShopCardV2.tsx'; /* Metro dependency 10020 */
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 ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
import * as CollectiblesShopConstantsModule from '../CollectiblesShopConstants.tsx'; /* Metro dependency 663 */
import * as UseNavigationNativeModule from '../../../design/components/Navigator/native/useNavigation.native.tsx'; /* Metro dependency 1484 */
import * as CreateStylesModule from '../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as PressablesModule from '../../../design/void/Pressables/native/Pressables.tsx'; /* Metro dependency 5278 */
import * as ChevronSmallRightIconModule from '../../../design/components/Icon/native/redesign/generated/ChevronSmallRightIcon.tsx'; /* Metro dependency 6818 */
import * as FlashListModule from '../../../external/discord_common/js/packages/flash-list/index.jsx'; /* Metro dependency 8416 */
import * as CollectiblesShopCardV2Module from './CollectiblesShopCardV2.tsx'; /* Metro dependency 10020 */
import * as CollectiblesAnalyticsContextModule from '../CollectiblesAnalyticsContext.tsx'; /* Metro dependency 10023 */
import * as UseCollectiblesShopDeepLinkPropsModule from './useCollectiblesShopDeepLinkProps.tsx'; /* Metro dependency 14042 */
import * as UseScrollToInitialIndexOnceModule from './hooks/useScrollToInitialIndexOnce.tsx'; /* Metro dependency 14047 */
import * as UseFilteredAndSortedProductsModule from './hooks/useFilteredAndSortedProducts.tsx'; /* Metro dependency 14049 */
function _fun106532(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#106532, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14245:6, offset: 0x022df63b, size: 545 bytes, params: 8, frame: 25
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
let value = ReactNativeModule;
const env0_4 = value.Image;
const env0_5 = value.View;
const env0_6 = (require(663) /* metro dependency 663: CollectiblesShopConstants */).CollectiblesMobileShopScreen;
const env0_7 = (require(661) /* metro dependency 661: Constants */).UserSettingsSections;
value = require(33) /* metro dependency 33 */;
const env0_8 = value.jsx;
const env0_9 = value.jsxs;
const COLLECTIBLES_SHOP_CARD_HEIGHT = (require(10020) /* metro dependency 10020: CollectiblesShopCardV2 */).COLLECTIBLES_SHOP_CARD_HEIGHT;
const COLLECTIBLES_SHOP_CARD_HEIGHT = (CollectiblesShopCardV2Module).COLLECTIBLES_SHOP_CARD_HEIGHT;
value = 100 + COLLECTIBLES_SHOP_CARD_HEIGHT;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
object2 = {};
const createStyles = CreateStylesModule.createStyles;
object = {};
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object2.categoryContainer = {marginTop: PX_16, marginBottom: 24, height: value};
const object4 = {'display': 'flex', 'flexDirection': 'row', 'justifyContent': 'flex-end', 'alignItems': 'center',
object.categoryContainer = {marginTop: PX_16, marginBottom: 24, height: value};
const object3 = {'display': 'flex', 'flexDirection': 'row', 'justifyContent': 'flex-end', 'alignItems': 'center',
'marginBottom': 16, 'marginHorizontal': 16, 'borderRadius': null, 'overflow': 'hidden', 'borderWidth': 1,
'height': 84, 'padding': 20};
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object2.categoryHeader = object4;
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object.categoryHeader = object3;
const PRIMARY_660 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.PRIMARY_660;
object2.categoryHeaderBorderDark = {borderColor: PRIMARY_660};
object.categoryHeaderBorderDark = {borderColor: PRIMARY_660};
const BACKGROUND_BASE_LOWEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWEST;
object2.categoryHeaderBorderLight = {borderColor: BACKGROUND_BASE_LOWEST};
object2.imageBackground = {'resizeMode': 'cover', 'top': 0, 'bottom': 0, 'left': 0, 'right': 0,
object.categoryHeaderBorderLight = {borderColor: BACKGROUND_BASE_LOWEST};
object.imageBackground = {'resizeMode': 'cover', 'top': 0, 'bottom': 0, 'left': 0, 'right': 0,
'position': 'absolute'};
const object5 = {};
const object6 = {};
const CONTROL_OVERLAY_SECONDARY_BACKGROUND_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.CONTROL_OVERLAY_SECONDARY_BACKGROUND_DEFAULT;
object5.backgroundColor = CONTROL_OVERLAY_SECONDARY_BACKGROUND_DEFAULT;
object5.padding = 6;
object5.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
object2.viewAllIcon = object5;
const env0_10 = Reflect.apply(createStyles, createStylesModule, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/ShopCategory.tsx');
object6.backgroundColor = CONTROL_OVERLAY_SECONDARY_BACKGROUND_DEFAULT;
object6.padding = 6;
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
object.viewAllIcon = object6;
const env0_10 = Reflect.apply(createStyles, CreateStylesModule, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/native/ShopCategory.tsx');
exports.CATEGORY_CONTAINER_HEIGHT = value;
exports.CATEGORY_CONTAINER_BOTTOM_MARGIN = 24;
exports.ShopCategory = ShopCategory;
}
function Spacing() { // fn#106533, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14245:976, offset: 0x022df85c, size: 36 bytes, params: 1, frame: 14
return <View style={{width: 12}} />;
}
function HeaderAndFooterSpacing() { // fn#106534, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14245:1027, offset: 0x022df880, size: 36 bytes, params: 1, frame: 14
return <View style={{width: 16}} />;
}
function ShopCategory({index, category, isDarkTheme}) { // fn#106535, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14245:1217, offset: 0x022df8a4, size: 1145 bytes, params: 2, frame: 39
var object7;
const analyticsLocations = (importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */)().analyticsLocations;
const styles = useStyles();
const env0_2 = (require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation();
const products = category.products;
const env0_3 = category.unpublishedAt;
const value2 = (require(14049) /* metro dependency 14049: useFilteredAndSortedProducts */).useFilteredAndSortedProducts({products: products,
bypassAndroidUnsyncedFilter: category.isOrbsExclusive});
const mobileBannerUrl = category.mobileBannerUrl;
const {productIndex, initialProductSkuId,
initialVariantIndex} = (require(14042) /* metro dependency 14042: useCollectiblesShopDeepLinkProps */).useCollectiblesShopDeepLinkProps({products: value2});
const value4 = env0_3.useRef(null);
const useScrollToInitialIndexOnceModule = require(14047) /* metro dependency 14047: useScrollToInitialIndexOnce */;
const useScrollToInitialIndexOnce = useScrollToInitialIndexOnceModule.useScrollToInitialIndexOnce;
object7 = {shouldScroll: productIndex != null && productIndex > 0, initialScrollIndex: productIndex,
flashListRef: value4};
const INITIAL_SCROLL_DELAY_MS = useScrollToInitialIndexOnceModule.INITIAL_SCROLL_DELAY_MS;
object7.afterMs = INITIAL_SCROLL_DELAY_MS;
Reflect.apply(useScrollToInitialIndexOnce, useScrollToInitialIndexOnceModule, [object7]);
env0_3.useEffect(_fun106536, [initialProductSkuId, initialVariantIndex, value2, analyticsLocations,
(require(10023) /* metro dependency 10023: CollectiblesAnalyticsContext */).useCollectiblesAnalyticsContext()]);
const CollectiblesAnalyticsProvider = (require(10023) /* metro dependency 10023: CollectiblesAnalyticsContext */).CollectiblesAnalyticsProvider;
const object3 = {categoryPosition: index};
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
const pressableOpacityProps = {style: [styles.categoryHeader,
isDarkTheme ? styles.categoryHeaderBorderDark : styles.categoryHeaderBorderLight], accessibilityRole: 'button'};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let formatToPlainString = intl.formatToPlainString;
let FNtLb3 = (require(1244) /* metro dependency 1244: indexNative */).t.FNtLb3;
pressableOpacityProps.accessibilityLabel = Reflect.apply(formatToPlainString, intl, [FNtLb3,
{category: category.name}]);
const string = intl.string;
const F8ma9x = (require(1244) /* metro dependency 1244: indexNative */).t.F8ma9x;
pressableOpacityProps.accessibilityHint = Reflect.apply(string, intl, [F8ma9x]);
pressableOpacityProps.activeOpacity = 0.8;
const object4 = {};
object4.radius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
pressableOpacityProps.androidRippleConfig = object4;
pressableOpacityProps.hitSlop = 8;
pressableOpacityProps.onPress = onPress_106538;
const r11 = mobileBannerUrl != null && <Image source={{uri: mobileBannerUrl}} style={styles.imageBackground} />;
const ChevronSmallRightIcon = (require(6818) /* metro dependency 6818: ChevronSmallRightIcon */).ChevronSmallRightIcon;
const pressableOpacity = <PressableOpacity {...pressableOpacityProps} key={category.storeListingId}>{r11}<View style={styles.viewAllIcon}><ChevronSmallRightIcon size="sm" color="white" /></View></PressableOpacity>;
const FlashList = (require(8416) /* metro dependency 8416: flashList */).FlashList;
const object5 = {ref: value4, horizontal: true};
formatToPlainString = intl.formatToPlainString;
FNtLb3 = (require(1244) /* metro dependency 1244: indexNative */).t.FNtLb3;
object5.accessibilityLabel = Reflect.apply(formatToPlainString, intl, [FNtLb3, {category: category.name}]);
object5.accessibilityRole = 'list';
object5.data = value2;
object5.renderItem = renderItem_106539;
object5.decelerationRate = 'fast';
const COLLECTIBLES_SHOP_CARD_WIDTH = (require(10020) /* metro dependency 10020: CollectiblesShopCardV2 */).COLLECTIBLES_SHOP_CARD_WIDTH;
object5.snapToInterval = COLLECTIBLES_SHOP_CARD_WIDTH + 12;
object5.estimatedItemSize = COLLECTIBLES_SHOP_CARD_WIDTH + 12;
object5.showsHorizontalScrollIndicator = false;
object5.ListHeaderComponent = HeaderAndFooterSpacing;
object5.ListFooterComponent = HeaderAndFooterSpacing;
object5.ItemSeparatorComponent = Spacing;
object5.initialScrollIndex = productIndex;
return (
<CollectiblesAnalyticsProvider newValue={object3}>
<View style={styles.categoryContainer}>
{pressableOpacity}
<FlashList {...object5} key={'category-flashlist-' + index + '-' + category.storeListingId} />
</View>
</CollectiblesAnalyticsProvider>
);
}
function _fun106536() { // fn#106536, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14245:1819, offset: 0x022dfd1d, size: 157 bytes, params: 1, frame: 16
var environment;
var value4;
var value5;
const initialProductSkuIdBinding = initialProductSkuId;
const value2 = null;
const r5 = value2 != initialProductSkuIdBinding ? env0_4.find(function({skuId}) {
return skuId === initialProductSkuId;
}) : value2;
if (value2 != r5) {
value4 = environment.__proto__;
value5 = undefined;
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
(require(10085) /* metro dependency 10085: openProductDetailsActionSheet */).openProductDetailsActionSheet({product: r5,
initialVariantIndex: initialVariantIndex, analyticsLocations: analyticsLocations,
shopAnalyticsContext: value2 != env0_7 ? env0_7 : value5});
function Spacing() { // fn#106533, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14245:976, offset: 0x022df85c, size: 36 bytes, params: 1, frame: 14
return <View style={{width: 12}} />;
}
}
function ShopCategoryOnPress() { // fn#106538, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14245:2550, owner: ShopCategory.onPress, offset: 0x022dfdcf, size: 170 bytes, params: 1, frame: 19
var binding;
var object2;
var openCollectiblesShopMobile;
var COLLECTIBLES_SHOP;
var value;
const categoryBinding = category;
if (categoryBinding.isOrbsExclusive) {
value = require(5120) /* metro dependency 5120: CollectiblesActionCreators */;
openCollectiblesShopMobile = value.openCollectiblesShopMobile;
object2 = {};
COLLECTIBLES_SHOP = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).COLLECTIBLES_SHOP;
object2.analyticsLocations = [COLLECTIBLES_SHOP];
COLLECTIBLES_SHOP = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).COLLECTIBLES_SHOP;
object2.analyticsSource = COLLECTIBLES_SHOP;
object2.screen = CollectiblesMobileShopScreen.ORBS;
Reflect.apply(openCollectiblesShopMobile, value, [object2]);
} else {
binding = env0_2;
binding.push(UserSettingsSections.COLLECTIBLES_SHOP_VIEW_ALL_CATEGORY_ITEMS, {category: categoryBinding,
analyticsContext: env0_7});
function HeaderAndFooterSpacing() { // fn#106534, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14245:1027, offset: 0x022df880, size: 36 bytes, params: 1, frame: 14
return <View style={{width: 16}} />;
}
function ShopCategory({index, category, isDarkTheme}) { // fn#106535, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14245:1217, offset: 0x022df8a4, size: 1145 bytes, params: 2, frame: 39
var object6;
const analyticsLocations = (UseAnalyticsLocations)().analyticsLocations;
const styles = useStyles();
const env0_2 = (UseNavigationNativeModule).useNavigation();
const products = category.products;
const unpublishedAt = category.unpublishedAt;
const value2 = (UseFilteredAndSortedProductsModule).useFilteredAndSortedProducts({products: products,
bypassAndroidUnsyncedFilter: category.isOrbsExclusive});
const mobileBannerUrl = category.mobileBannerUrl;
const {productIndex, initialProductSkuId,
initialVariantIndex} = (UseCollectiblesShopDeepLinkPropsModule).useCollectiblesShopDeepLinkProps({products: value2});
const value4 = unpublishedAt.useRef(null);
const useScrollToInitialIndexOnce = UseScrollToInitialIndexOnceModule.useScrollToInitialIndexOnce;
object6 = {shouldScroll: productIndex != null && productIndex > 0, initialScrollIndex: productIndex,
flashListRef: value4};
const INITIAL_SCROLL_DELAY_MS = UseScrollToInitialIndexOnceModule.INITIAL_SCROLL_DELAY_MS;
object6.afterMs = INITIAL_SCROLL_DELAY_MS;
Reflect.apply(useScrollToInitialIndexOnce, UseScrollToInitialIndexOnceModule, [object6]);
unpublishedAt.useEffect(_fun106536, [initialProductSkuId, initialVariantIndex, value2, analyticsLocations,
(CollectiblesAnalyticsContextModule).useCollectiblesAnalyticsContext()]);
const CollectiblesAnalyticsProvider = (CollectiblesAnalyticsContextModule).CollectiblesAnalyticsProvider;
const object = {categoryPosition: index};
const PressableOpacity = (PressablesModule).PressableOpacity;
const pressableOpacityProps = {style: [styles.categoryHeader,
isDarkTheme ? styles.categoryHeaderBorderDark : styles.categoryHeaderBorderLight], accessibilityRole: 'button'};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let formatToPlainString = intl.formatToPlainString;
let FNtLb3 = (require(1244) /* metro dependency 1244: indexNative */).t.FNtLb3;
pressableOpacityProps.accessibilityLabel = Reflect.apply(formatToPlainString, intl, [FNtLb3,
{category: category.name}]);
const string = intl.string;
const F8ma9x = (require(1244) /* metro dependency 1244: indexNative */).t.F8ma9x;
pressableOpacityProps.accessibilityHint = Reflect.apply(string, intl, [F8ma9x]);
pressableOpacityProps.activeOpacity = 0.8;
const object2 = {};
object2.radius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
pressableOpacityProps.androidRippleConfig = object2;
pressableOpacityProps.hitSlop = 8;
pressableOpacityProps.onPress = onPress_106538;
const r11 = mobileBannerUrl != null && <Image source={{uri: mobileBannerUrl}} style={styles.imageBackground} />;
const ChevronSmallRightIcon = (ChevronSmallRightIconModule).ChevronSmallRightIcon;
const pressableOpacity = (
<PressableOpacity {...pressableOpacityProps} key={category.storeListingId}>
{r11}
<View style={styles.viewAllIcon}>
<ChevronSmallRightIcon size="sm" color="white" />
</View>
</PressableOpacity>
);
const FlashList = (FlashListModule).FlashList;
const object4 = {ref: value4, horizontal: true};
formatToPlainString = intl.formatToPlainString;
FNtLb3 = (require(1244) /* metro dependency 1244: indexNative */).t.FNtLb3;
object4.accessibilityLabel = Reflect.apply(formatToPlainString, intl, [FNtLb3, {category: category.name}]);
object4.accessibilityRole = 'list';
object4.data = value2;
object4.renderItem = renderItem_106539;
object4.decelerationRate = 'fast';
const COLLECTIBLES_SHOP_CARD_WIDTH = (CollectiblesShopCardV2Module).COLLECTIBLES_SHOP_CARD_WIDTH;
object4.snapToInterval = COLLECTIBLES_SHOP_CARD_WIDTH + 12;
object4.estimatedItemSize = COLLECTIBLES_SHOP_CARD_WIDTH + 12;
object4.showsHorizontalScrollIndicator = false;
object4.ListHeaderComponent = HeaderAndFooterSpacing;
object4.ListFooterComponent = HeaderAndFooterSpacing;
object4.ItemSeparatorComponent = Spacing;
object4.initialScrollIndex = productIndex;
return (
<CollectiblesAnalyticsProvider newValue={object}>
<View style={styles.categoryContainer}>
{pressableOpacity}
<FlashList {...object4} key={'category-flashlist-' + index + '-' + category.storeListingId} />
</View>
</CollectiblesAnalyticsProvider>
);
function _fun106536() { // fn#106536, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14245:1819, offset: 0x022dfd1d, size: 157 bytes, params: 1, frame: 16
var environment;
var value4;
var value5;
const initialProductSkuIdBinding = initialProductSkuId;
const value2 = null;
const r5 = value2 != initialProductSkuIdBinding ? env0_4.find(function({skuId}) {
return skuId === initialProductSkuId;
}) : value2;
if (value2 != r5) {
value4 = environment.__proto__;
value5 = undefined;
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
(require(10085) /* metro dependency 10085: openProductDetailsActionSheet */).openProductDetailsActionSheet({product: r5,
initialVariantIndex: initialVariantIndex, analyticsLocations: analyticsLocations,
shopAnalyticsContext: value2 != ConstantsModule.UserSettingsSections ? ConstantsModule.UserSettingsSections : value5});
}
}
function ShopCategoryOnPress() { // fn#106538, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14245:2550, owner: ShopCategory.onPress, offset: 0x022dfdcf, size: 170 bytes, params: 1, frame: 19
var binding;
var object;
var openCollectiblesShopMobile;
var COLLECTIBLES_SHOP;
var value;
const categoryBinding = category;
if (categoryBinding.isOrbsExclusive) {
value = require(5120) /* metro dependency 5120: CollectiblesActionCreators */;
openCollectiblesShopMobile = value.openCollectiblesShopMobile;
object = {};
COLLECTIBLES_SHOP = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).COLLECTIBLES_SHOP;
object.analyticsLocations = [COLLECTIBLES_SHOP];
COLLECTIBLES_SHOP = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).COLLECTIBLES_SHOP;
object.analyticsSource = COLLECTIBLES_SHOP;
object.screen = CollectiblesMobileShopScreen.ORBS;
Reflect.apply(openCollectiblesShopMobile, value, [object]);
} else {
binding = env0_2;
binding.push(UserSettingsSections.COLLECTIBLES_SHOP_VIEW_ALL_CATEGORY_ITEMS, {category: categoryBinding,
analyticsContext: ConstantsModule.UserSettingsSections});
}
}
function ShopCategoryRenderItem({item, index}) { // fn#106539, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14245:3166, owner: ShopCategory.renderItem, offset: 0x022dfe79, size: 121 bytes, params: 2, frame: 19
const value = environment.__proto__;
const CollectiblesAnalyticsProvider = (CollectiblesAnalyticsContextModule).CollectiblesAnalyticsProvider;
return (
<CollectiblesAnalyticsProvider newValue={{tilePosition: index}} key={item.skuId}>
{((Component) => <Component product={item} unpublishedAt={unpublishedAt} />)(CollectiblesShopCardV2)}
</CollectiblesAnalyticsProvider>
);
}
}
}
function ShopCategoryRenderItem({item, index}) { // fn#106539, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14245:3166, owner: ShopCategory.renderItem, offset: 0x022dfe79, size: 121 bytes, params: 2, frame: 19
const value = environment.__proto__;
const CollectiblesAnalyticsProvider = (require(10023) /* metro dependency 10023: CollectiblesAnalyticsContext */).CollectiblesAnalyticsProvider;
return (
<CollectiblesAnalyticsProvider newValue={{tilePosition: index}} key={item.skuId}>
{((Component) => <Component product={item} unpublishedAt={unpublishedAt} />)(importDefault(10020) /* metro dependency 10020: CollectiblesShopCardV2 */)}
</CollectiblesAnalyticsProvider>
);
}
global.__d(_fun106532, 14048, [31, 27, 663, 661, 33, 10020, 4501, 697, 6771, 1484, 14049, 14042, 14047, 10023, 4080,
10085, 5120, 6789, 5278, 1244, 6818, 8416,
2]) /* metro module 14048, dependencies: [31, 27, 663, 661, 33, 10020, 4501, 697, 6771, 1484, 14049, 14042, 14047, 10023, 4080, 10085, 5120, 6789, 5278, 1244, 6818, 8416, 2] */;
@@ -1,64 +1,70 @@
/* Metro module 14905; source: modules/collectibles/native/ShopCoachmark.tsx; dependencies: [31, 1376, 33, 4501, 1305, 14901, 697, 1244, 8543, 2] */
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 JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as NativeModule from '../../../design/void/native.tsx'; /* Metro dependency 1305 */
import * as DismissibleContentConstantsModule from '../../dismissible_content/DismissibleContentConstants.tsx'; /* Metro dependency 1376 */
import * as CreateStylesModule from '../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as UseCoachmarkNativeModule from '../../../design/components/Coachmark/native/useCoachmark.native.tsx'; /* Metro dependency 8543 */
import * as YouNavFloatingExperimentModule from '../../main_tabs_v2/native/tabs/you/YouNavFloatingExperiment.tsx'; /* Metro dependency 14901 */
function _fun112776(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#112776, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15102:6, offset: 0x023daf07, size: 217 bytes, params: 8, frame: 20
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(1376) /* metro dependency 1376: DismissibleContentConstants */).ContentDismissActionType;
const env0_5 = (require(33) /* metro dependency 33 */).jsx;
const env0_6 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({image: {marginTop: 12}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/ShopCoachmark.tsx');
const env0_6 = (CreateStylesModule).createStyles({image: {marginTop: 12}});
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/native/ShopCoachmark.tsx');
exports.default = ShopCoachmark;
function CoachmarkImg_112777({source, decorationAsset}) { // fn#112777, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15102:202, offset: 0x023dafe0, size: 118 bytes, params: 2, frame: 19
const styles = useStyles();
const Avatar = (NativeModule).Avatar;
const object2 = {asset: decorationAsset};
const AvatarSizes = (NativeModule).AvatarSizes;
const XXLARGE = AvatarSizes.XXLARGE;
return (
<Avatar
style={styles.image}
source={source}
avatarDecoration={object2}
size={XXLARGE}
/>
);
}
function ShopCoachmark({buttonRef, markAsDismissed, visible, title, description, avatarSrc, decorationAsset, navigateToShop, renderImgComponent}) { // fn#112778, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15102:463, offset: 0x023db056, size: 188 bytes, params: 2, frame: 23
const binding = description;
const useMemo = binding.useMemo;
(UseCoachmarkNativeModule).useCoachmark(buttonRef, Reflect.apply(useMemo,
binding, [_fun112779, [avatarSrc, decorationAsset, description, renderImgComponent, markAsDismissed, title,
visible, navigateToShop]]));
return null;
function _fun112779() { // fn#112779, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15102:636, offset: 0x023db112, size: 270 bytes, params: 1, frame: 17
const object = {};
object.title = title;
object.description = description;
object.onDismiss = function() {
markAsDismissed(ContentDismissActionType.USER_DISMISS);
};
object.visible = visible;
const value3 = undefined;
object.position = YouNavFloatingExperimentModule.isYouNavFloating() ? 'top' : 'bottom';
const PX_12 = YouNavFloatingExperimentModule.isYouNavFloating() ? (importDefault(697) /* metro dependency 697: native */).space.PX_12 : value3;
object.offsetY = PX_12;
object.renderImgComponent = renderImgComponent ?? _fun112781;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object.buttonLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.fYfGgK);
object.buttonVariant = 'primary';
object.onButtonPress = navigateToShop;
return object;
function _fun112781() { // fn#112781, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15102:850, offset: 0x023db23d, size: 43 bytes, params: 1, frame: 14
return <CoachmarkImg_112777 source={avatarSrc} decorationAsset={decorationAsset} />;
}
}
}
}
function CoachmarkImg_112777({source, decorationAsset}) { // fn#112777, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15102:202, offset: 0x023dafe0, size: 118 bytes, params: 2, frame: 19
const styles = useStyles();
const Avatar = (require(1305) /* metro dependency 1305: native */).Avatar;
const object = {asset: decorationAsset};
const AvatarSizes = (require(1305) /* metro dependency 1305: native */).AvatarSizes;
const XXLARGE = AvatarSizes.XXLARGE;
return (
<Avatar
style={styles.image}
source={source}
avatarDecoration={object}
size={XXLARGE}
/>
);
}
function ShopCoachmark({buttonRef, markAsDismissed, visible, title, description, avatarSrc, decorationAsset, navigateToShop, renderImgComponent}) { // fn#112778, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15102:463, offset: 0x023db056, size: 188 bytes, params: 2, frame: 23
const binding = description;
const useMemo = binding.useMemo;
(require(8543) /* metro dependency 8543: useCoachmarkNative */).useCoachmark(buttonRef, Reflect.apply(useMemo,
binding, [_fun112779, [avatarSrc, decorationAsset, description, renderImgComponent, markAsDismissed, title,
visible, navigateToShop]]));
return null;
}
function _fun112779() { // fn#112779, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15102:636, offset: 0x023db112, size: 270 bytes, params: 1, frame: 17
const object2 = {};
object2.title = title;
object2.description = description;
object2.onDismiss = function() {
markAsDismissed(ContentDismissActionType.USER_DISMISS);
};
object2.visible = visible;
const value3 = undefined;
const youNavFloatingExperimentModule = require(14901) /* metro dependency 14901: YouNavFloatingExperiment */;
object2.position = youNavFloatingExperimentModule.isYouNavFloating() ? 'top' : 'bottom';
const moduleValue2 = youNavFloatingExperimentModule;
const PX_12 = moduleValue2.isYouNavFloating() ? (importDefault(697) /* metro dependency 697: native */).space.PX_12 : value3;
object2.offsetY = PX_12;
object2.renderImgComponent = renderImgComponent ?? _fun112781;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object2.buttonLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.fYfGgK);
object2.buttonVariant = 'primary';
object2.onButtonPress = navigateToShop;
return object2;
}
function _fun112781() { // fn#112781, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15102:850, offset: 0x023db23d, size: 43 bytes, params: 1, frame: 14
return <CoachmarkImg_112777 source={avatarSrc} decorationAsset={decorationAsset} />;
}
global.__d(_fun112776, 14905, [31, 1376, 33, 4501, 1305, 14901, 697, 1244, 8543,
2]) /* metro module 14905, dependencies: [31, 1376, 33, 4501, 1305, 14901, 697, 1244, 8543, 2] */;
@@ -1,57 +1,67 @@
/* Metro module 14046; source: modules/collectibles/native/ShopFlashList.tsx; dependencies: [31, 33, 4501, 697, 14047, 8416, 14048, 1305, 8754, 1244, 2] */
import Native from '../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
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 JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as IndexNativeModule from '../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as NativeModule from '../../../design/void/native.tsx'; /* Metro dependency 1305 */
import * as CreateStylesModule from '../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as FlashListModule from '../../../external/discord_common/js/packages/flash-list/index.jsx'; /* Metro dependency 8416 */
import * as NoResultsModule from '../../../design/components/Illustration/native/redesign/generated/NoResults.tsx'; /* Metro dependency 8754 */
import * as UseScrollToInitialIndexOnceModule from './hooks/useScrollToInitialIndexOnce.tsx'; /* Metro dependency 14047 */
import * as ShopCategoryModule from './ShopCategory.tsx'; /* Metro dependency 14048 */
function _fun106525(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#106525, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14243:6, offset: 0x022df27e, size: 211 bytes, params: 8, frame: 21
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(33) /* metro dependency 33 */).jsx;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
const BACKGROUND_BASE_LOWEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWEST;
const env0_4 = Reflect.apply(createStyles, createStylesModule,
const createStyles = CreateStylesModule.createStyles;
const BACKGROUND_BASE_LOWEST = (Native).colors.BACKGROUND_BASE_LOWEST;
const env0_4 = Reflect.apply(createStyles, CreateStylesModule,
[{contentContainer: {backgroundColor: BACKGROUND_BASE_LOWEST}}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/ShopFlashList.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/native/ShopFlashList.tsx');
exports.default = _default_106527;
function ShopEmptyState() { // fn#106526, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14243:234, offset: 0x022df351, size: 132 bytes, params: 1, frame: 18
const EmptyState = (NativeModule).EmptyState;
const NoResults = (NoResultsModule).NoResults;
const intl = (IndexNativeModule).intl;
return (
<EmptyState
style={{marginTop: 42}}
Illustration={NoResults}
body={intl.string((IndexNativeModule).t.eAn6z2)}
/>
);
}
function _default_106527({data, renderItem, initialScrollIndex}) { // fn#106527, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14243:366, offset: 0x022df3d5, size: 245 bytes, params: 2, frame: 22
const value2 = ReactModule.useRef(null);
const styles = useStyles();
const useScrollToInitialIndexOnce = UseScrollToInitialIndexOnceModule.useScrollToInitialIndexOnce;
const object = {};
object.shouldScroll = initialScrollIndex != null && initialScrollIndex > 0;
object.initialScrollIndex = initialScrollIndex;
object.flashListRef = value2;
const INITIAL_SCROLL_DELAY_MS = UseScrollToInitialIndexOnceModule.INITIAL_SCROLL_DELAY_MS;
object.afterMs = INITIAL_SCROLL_DELAY_MS;
Reflect.apply(useScrollToInitialIndexOnce, UseScrollToInitialIndexOnceModule, [object]);
const FlashList = (FlashListModule).FlashList;
const CATEGORY_CONTAINER_HEIGHT = (ShopCategoryModule).CATEGORY_CONTAINER_HEIGHT;
return (
<FlashList
ref={value2}
data={data}
renderItem={renderItem}
showsVerticalScrollIndicator={false}
estimatedItemSize={CATEGORY_CONTAINER_HEIGHT + 40}
ListEmptyComponent={ShopEmptyState}
initialScrollIndex={initialScrollIndex}
contentContainerStyle={styles.contentContainer}
/>
);
}
}
function ShopEmptyState() { // fn#106526, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14243:234, offset: 0x022df351, size: 132 bytes, params: 1, frame: 18
const EmptyState = (require(1305) /* metro dependency 1305: native */).EmptyState;
const NoResults = (require(8754) /* metro dependency 8754: NoResults */).NoResults;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
return (
<EmptyState
style={{marginTop: 42}}
Illustration={NoResults}
body={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.eAn6z2)}
/>
);
}
function _default_106527({data, renderItem, initialScrollIndex}) { // fn#106527, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14243:366, offset: 0x022df3d5, size: 245 bytes, params: 2, frame: 22
const value2 = env0_2.useRef(null);
const styles = useStyles();
const useScrollToInitialIndexOnceModule = require(14047) /* metro dependency 14047: useScrollToInitialIndexOnce */;
const useScrollToInitialIndexOnce = useScrollToInitialIndexOnceModule.useScrollToInitialIndexOnce;
const object2 = {};
object2.shouldScroll = initialScrollIndex != null && initialScrollIndex > 0;
object2.initialScrollIndex = initialScrollIndex;
object2.flashListRef = value2;
const INITIAL_SCROLL_DELAY_MS = useScrollToInitialIndexOnceModule.INITIAL_SCROLL_DELAY_MS;
object2.afterMs = INITIAL_SCROLL_DELAY_MS;
Reflect.apply(useScrollToInitialIndexOnce, useScrollToInitialIndexOnceModule, [object2]);
const FlashList = (require(8416) /* metro dependency 8416: flashList */).FlashList;
const CATEGORY_CONTAINER_HEIGHT = (require(14048) /* metro dependency 14048: ShopCategory */).CATEGORY_CONTAINER_HEIGHT;
return (
<FlashList
ref={value2}
data={data}
renderItem={renderItem}
showsVerticalScrollIndicator={false}
estimatedItemSize={CATEGORY_CONTAINER_HEIGHT + 40}
ListEmptyComponent={ShopEmptyState}
initialScrollIndex={initialScrollIndex}
contentContainerStyle={styles.contentContainer}
/>
);
}
global.__d(_fun106525, 14046, [31, 33, 4501, 697, 14047, 8416, 14048, 1305, 8754, 1244,
2]) /* metro module 14046, dependencies: [31, 33, 4501, 697, 14047, 8416, 14048, 1305, 8754, 1244, 2] */;
@@ -1,10 +1,15 @@
/* Metro module 14056; source: modules/collectibles/native/SkeletonCard.tsx; dependencies: [31, 33, 4501, 697, 10020, 4017, 4504, 2] */
import ReanimatedRexport from '../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
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 JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as ReanimatedRexportModule from '../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import * as TimingModule from '../../../design/animation/reanimated/timing/timing.tsx'; /* Metro dependency 4504 */
function _fun106594(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#106594, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14253:6, offset: 0x022e25e1, size: 191 bytes, params: 8, frame: 18
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(33) /* metro dependency 33 */).jsx;
const env0_5 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(function(a0, a1) {
var object2 = {width: a0, height: a1};
object2.backgroundColor = importDefault(dependencyMap[3]).colors.BORDER_SUBTLE;
@@ -12,32 +17,39 @@ function _fun106594(global, require, importDefault, importAll, module, exports,
return {skeletonCard: object2};
});
object = {code: 'function SkeletonCardTsx1(){const{opacity}=this.__closure;return{opacity:opacity.get()};}'};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/SkeletonCard.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/native/SkeletonCard.tsx');
exports.default = _default_106596;
function _default_106596({width = require(dependencyMap[4]).COLLECTIBLES_SHOP_CARD_WIDTH, height, style}) { // fn#106596, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14253:374, offset: 0x022e26f9, size: 305 bytes, params: 2, frame: 22
const styles = useStyles(width,
height ?? (require(10020) /* metro dependency 10020: CollectiblesShopCardV2 */).COLLECTIBLES_SHOP_CARD_HEIGHT);
const value2 = (ReanimatedRexportModule).useSharedValue(0.3);
ReactModule.useEffect(_fun106597, [value2]);
const useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle;
const _default_106596Y2 = _default_106596Y;
_default_106596Y2.__closure = {opacity: value2};
_default_106596Y2.__workletHash = 5620456625640;
_default_106596Y2.__initData = env0_6;
const value3 = Reflect.apply(useAnimatedStyle, ReanimatedRexportModule, [_default_106596Y2]);
const View = (ReanimatedRexport).View;
return <View style={[styles.skeletonCard, style, value3]} />;
function _fun106597() { // fn#106597, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14253:547, offset: 0x022e282a, size: 103 bytes, params: 1, frame: 19
const binding = env0_0;
const set = binding.set;
let value = environment.__proto__;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
Reflect.apply(set, binding, [value.withRepeat((TimingModule).withTiming(1,
{duration: 650}), -1, true)]);
}
function _default_106596Y() { // fn#106598, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14253:666, owner: _default_106596.y, offset: 0x01d2f35e, size: 24 bytes, params: 1, frame: 10
const object = {};
object.opacity = env0_0.get();
return object;
}
}
}
function _default_106596({width = require(dependencyMap[4]).COLLECTIBLES_SHOP_CARD_WIDTH, height, style}) { // fn#106596, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14253:374, offset: 0x022e26f9, size: 305 bytes, params: 2, frame: 22
const styles = useStyles(width,
height ?? (require(10020) /* metro dependency 10020: CollectiblesShopCardV2 */).COLLECTIBLES_SHOP_CARD_HEIGHT);
const value2 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(0.3);
env0_3.useEffect(_fun106597, [value2]);
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
const closure = _default_106596Y;
closure.__closure = {opacity: value2};
closure.__workletHash = 5620456625640;
closure.__initData = env0_6;
const value3 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
const View = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
return <View style={[styles.skeletonCard, style, value3]} />;
}
function _fun106597() { // fn#106597, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14253:547, offset: 0x022e282a, size: 103 bytes, params: 1, frame: 19
const binding = env0_0;
const set = binding.set;
let value = environment.__proto__;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
Reflect.apply(set, binding, [value.withRepeat((require(4504) /* metro dependency 4504: timing */).withTiming(1,
{duration: 650}), -1, true)]);
}
global.__d(_fun106594, 14056, [31, 33, 4501, 697, 10020, 4017, 4504,
2]) /* metro module 14056, dependencies: [31, 33, 4501, 697, 10020, 4017, 4504, 2] */;
@@ -1,55 +1,63 @@
/* Metro module 10152; source: modules/collectibles/native/UnlockWithNitroButton.tsx; dependencies: [31, 5140, 5145, 663, 33, 566, 5143, 10105, 1244, 4579, 4573, 7954, 2] */
import IAPStoreAndroid from '../../../stores/native/IAPStore.android.tsx'; /* Metro dependency 5140 */
import CollectiblesPurchaseStore from '../CollectiblesPurchaseStore.tsx'; /* Metro dependency 5145 */
import UseOpenNitroSubscribeActionSheet from './useOpenNitroSubscribeActionSheet.tsx'; /* Metro dependency 10105 */
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 JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as FluxModule from '../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as CollectiblesShopConstantsModule from '../CollectiblesShopConstants.tsx'; /* Metro dependency 663 */
import * as BaseTextButtonNativeModule from '../../../design/components/Button/native/BaseTextButton.native.tsx'; /* Metro dependency 4579 */
import * as NitroWheelIconModule from '../../../design/components/Icon/native/redesign/generated/NitroWheelIcon.tsx'; /* Metro dependency 7954 */
function _fun79117(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#79117, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10338:6, offset: 0x01e4597b, size: 192 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const iapStoreAndroid = importDefault(5140) /* metro dependency 5140: IAPStoreAndroid */;
const collectiblesPurchaseStore = importDefault(5145) /* metro dependency 5145: CollectiblesPurchaseStore */;
const env0_5 = (require(663) /* metro dependency 663: CollectiblesShopConstants */).ShopCtaEnum;
const env0_6 = (require(33) /* metro dependency 33 */).jsx;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/UnlockWithNitroButton.tsx');
ReactModule;
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/native/UnlockWithNitroButton.tsx');
exports.UnlockWithNitroButton = UnlockWithNitroButton;
}
function UnlockWithNitroButton({shouldShrink, onTrackPress, text}) { // fn#79118, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10338:272, offset: 0x01e45a3b, size: 404 bytes, params: 2, frame: 23
var r7;
var intl;
shouldShrink = !(shouldShrink === undefined) && shouldShrink;
const value4 = (FluxModule).useStateFromStores([CollectiblesPurchaseStore,
IAPStoreAndroid], _fun79119);
const env0_1 = (UseOpenNitroSubscribeActionSheet)();
if (text != null) {
r7 = text;
} else {
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
r7 = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.sEAnVH);
}
const BaseTextButton = (BaseTextButtonNativeModule).BaseTextButton;
object = {textElement: shouldShrink ? ((Text) => <Text variant="text-xs/semibold" color="always-white" allowFontScaling={false}>{r7}</Text>)((require(4573) /* metro dependency 4573: Text */).Text) : undefined,
text: shouldShrink ? undefined : r7, accessibilityLabel: r7, variant: 'primary',
size: shouldShrink ? 'sm' : 'md', grow: true};
const NitroWheelIcon = (NitroWheelIconModule).NitroWheelIcon;
object.icon = <NitroWheelIcon size="sm" color="white" />;
object.onPress = onPress_79120;
object.disabled = value4;
return <BaseTextButton {...object} />;
function _fun79119() { // fn#79119, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10338:358, offset: 0x01e45bcf, size: 73 bytes, params: 1, frame: 14
const value = environment.__proto__;
return CollectiblesPurchaseStore.isClaiming != null || IAPStoreAndroid.isPurchasingProduct((require(5143) /* metro dependency 5143: ProductIdsAndroid */).ProductIds.GENERIC_CONSUMABLE);
}
function UnlockWithNitroButtonOnPress() { // fn#79120, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10338:805, owner: UnlockWithNitroButton.onPress, offset: 0x01e45c18, size: 49 bytes, params: 1, frame: 12
var value2;
let onTrackPressBinding = onTrackPress;
if (onTrackPressBinding != null) {
onTrackPressBinding = onTrackPress;
value2 = environment.__proto__;
onTrackPressBinding(ShopCtaEnum.UNLOCK_WITH_NITRO);
}
env0_1();
}
function UnlockWithNitroButton({shouldShrink, onTrackPress, text}) { // fn#79118, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10338:272, offset: 0x01e45a3b, size: 404 bytes, params: 2, frame: 23
var object2;
var r7;
var intl;
shouldShrink = !(shouldShrink === undefined) && shouldShrink;
const value4 = (require(566) /* metro dependency 566: flux */).useStateFromStores([CollectiblesPurchaseStore,
IAPStoreAndroid], _fun79119);
const env0_1 = (importDefault(10105) /* metro dependency 10105: useOpenNitroSubscribeActionSheet */)();
if (text != null) {
r7 = text;
} else {
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
r7 = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.sEAnVH);
}
const BaseTextButton = (require(4579) /* metro dependency 4579: BaseTextButtonNative */).BaseTextButton;
object2 = {textElement: shouldShrink ? ((Text) => <Text variant="text-xs/semibold" color="always-white" allowFontScaling={false}>{r7}</Text>)((require(4573) /* metro dependency 4573: Text */).Text) : undefined,
text: shouldShrink ? undefined : r7, accessibilityLabel: r7, variant: 'primary',
size: shouldShrink ? 'sm' : 'md', grow: true};
const NitroWheelIcon = (require(7954) /* metro dependency 7954: NitroWheelIcon */).NitroWheelIcon;
object2.icon = <NitroWheelIcon size="sm" color="white" />;
object2.onPress = onPress_79120;
object2.disabled = value4;
return <BaseTextButton {...object2} />;
}
function _fun79119() { // fn#79119, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10338:358, offset: 0x01e45bcf, size: 73 bytes, params: 1, frame: 14
const value = environment.__proto__;
return CollectiblesPurchaseStore.isClaiming != null || IAPStoreAndroid.isPurchasingProduct((require(5143) /* metro dependency 5143: ProductIdsAndroid */).ProductIds.GENERIC_CONSUMABLE);
}
function UnlockWithNitroButtonOnPress() { // fn#79120, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10338:805, owner: UnlockWithNitroButton.onPress, offset: 0x01e45c18, size: 49 bytes, params: 1, frame: 12
var value2;
let onTrackPressBinding = onTrackPress;
if (onTrackPressBinding != null) {
onTrackPressBinding = onTrackPress;
value2 = environment.__proto__;
onTrackPressBinding(ShopCtaEnum.UNLOCK_WITH_NITRO);
}
env0_1();
}
global.__d(_fun79117, 10152, [31, 5140, 5145, 663, 33, 566, 5143, 10105, 1244, 4579, 4573, 7954,
2]) /* metro module 10152, dependencies: [31, 5140, 5145, 663, 33, 566, 5143, 10105, 1244, 4579, 4573, 7954, 2] */;
@@ -1,84 +1,89 @@
/* Metro module 10155; source: modules/collectibles/native/VisibilitySensor.tsx; dependencies: [31, 27, 33, 1478, 2] */
import React from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import UseWindowDimensionsNative from '../../screen/useWindowDimensions.native.tsx'; /* Metro dependency 1478 */
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 */
function _fun79131(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#79131, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10341:6, offset: 0x01e461ac, size: 192 bytes, params: 8, frame: 19
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = require(31) /* metro dependency 31 */;
let value = ReactModule;
const env0_2 = value.useEffect;
const env0_3 = value.useRef;
const env0_4 = importDefault(31) /* metro dependency 31 */;
const env0_5 = (require(27) /* metro dependency 27 */).View;
value = require(33) /* metro dependency 33 */;
const env0_6 = value.jsx;
const env0_7 = value.jsxs;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/VisibilitySensor.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/native/VisibilitySensor.tsx');
exports.default = _default_79132;
}
function _default_79132({children, onChange}) { // fn#79132, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10341:192, offset: 0x01e4626c, size: 235 bytes, params: 2, frame: 21
const value2 = useRef(null);
const env0_2 = useRef(false);
const {width, height} = (UseWindowDimensionsNative)();
const height2 = height;
const env0_5 = useRef(null);
useEffect(_fun79137, [height2.useCallback(_fun79133, [onChange]), height, width]);
return (
<View collapsable={false} ref={value2}>
{children}
<View />
</View>
);
function _fun79133(a0, a1) { // fn#79133, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10341:302, offset: 0x01e46357, size: 77 bytes, params: 3, frame: 14
const env0_0 = a0;
const env0_1 = a1;
if (env0_5.current === null) {
env0_5.current = global.setInterval(_fun79134, 1000);
}
function _fun79134() { // fn#79134, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10341:352, offset: 0x01e463a4, size: 51 bytes, params: 1, frame: 11
if (env1_1.current !== null) {
env1_1.current.measure(_fun79135);
}
function _fun79135(a0, a1, a2, a3, a4, a5) { // fn#79135, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10341:394, offset: 0x01e463d7, size: 102 bytes, params: 7, frame: 13
var r2;
let value = a5 + a3 > 0;
if (value) {
value = environment.__proto__;
value = a5 < require;
r2 = value;
} else {
r2 = value;
}
if (r2) {
value = environment.__proto__;
value = a4 < env1_0;
r2 = value;
}
r2 = r2 && a4 + a2 > 0;
value = environment.__proto__.__proto__;
if (r2 !== env2_2.current) {
env2_2.current = r2;
onChange(r2);
}
}
function _default_79132({children, onChange}) { // fn#79132, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10341:192, offset: 0x01e4626c, size: 235 bytes, params: 2, frame: 21
const value2 = useRef(null);
const env0_2 = useRef(false);
const {width, height} = (importDefault(1478) /* metro dependency 1478: useWindowDimensionsNative */)();
const env0_4 = height;
const env0_5 = useRef(null);
useEffect(_fun79137, [env0_4.useCallback(_fun79133, [onChange]), height, width]);
return (
<View collapsable={false} ref={value2}>
{children}
<View />
</View>
);
}
}
function _fun79133(a0, a1) { // fn#79133, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10341:302, offset: 0x01e46357, size: 77 bytes, params: 3, frame: 14
const env0_0 = a0;
const env0_1 = a1;
if (env0_5.current === null) {
env0_5.current = global.setInterval(_fun79134, 1000);
}
}
}
function stopWatching() { // fn#79136, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10341:504, owner: _default_79132.stopWatching, offset: 0x01e4643d, size: 52 bytes, params: 1, frame: 13
var clearInterval;
var binding;
if (env0_5.current !== null) {
clearInterval = global.clearInterval;
binding = env0_5;
clearInterval(binding.current);
binding.current = null;
}
}
function stopWatching() { // fn#79136, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10341:504, owner: _default_79132.stopWatching, offset: 0x01e4643d, size: 52 bytes, params: 1, frame: 13
var clearInterval;
var binding;
if (env0_5.current !== null) {
clearInterval = global.clearInterval;
binding = env0_5;
clearInterval(binding.current);
binding.current = null;
}
}
function _fun79137() { // fn#79137, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10341:580, offset: 0x01e46471, size: 29 bytes, params: 1, frame: 14
env0_6(width, height);
return stopWatching;
}
function _fun79137() { // fn#79137, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10341:580, offset: 0x01e46471, size: 29 bytes, params: 1, frame: 14
env0_6(width, height);
return stopWatching;
}
function _fun79134() { // fn#79134, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10341:352, offset: 0x01e463a4, size: 51 bytes, params: 1, frame: 11
if (env1_1.current !== null) {
env1_1.current.measure(_fun79135);
}
}
function _fun79135(a0, a1, a2, a3, a4, a5) { // fn#79135, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10341:394, offset: 0x01e463d7, size: 102 bytes, params: 7, frame: 13
var r2;
let value = a5 + a3 > 0;
if (value) {
value = environment.__proto__;
value = a5 < require;
r2 = value;
} else {
r2 = value;
}
if (r2) {
value = environment.__proto__;
value = a4 < env1_0;
r2 = value;
}
r2 = r2 && a4 + a2 > 0;
value = environment.__proto__.__proto__;
if (r2 !== env2_2.current) {
env2_2.current = r2;
onChange(r2);
}
}
global.__d(_fun79131, 10155, [31, 27, 33, 1478, 2]) /* metro module 10155, dependencies: [31, 27, 33, 1478, 2] */;
@@ -1,382 +1,434 @@
/* Metro module 10057; source: modules/collectibles/native/WishlistButton.tsx; dependencies: [5, 57, 31, 27, 1226, 1878, 663, 482, 33, 4017, 4582, 4501, 697, 3868, 6817, 4002, 3875, 4504, 4577, 4581, 10058, 8663, 566, 10027, 1244, 3857, 10053, 10060, 10024, 2] */
import Module00005 from '../../../by-id/module-00005.js'; /* Metro dependency 5 */
import Module00057 from '../../../by-id/module-00057.js'; /* Metro dependency 57 */
import Native from '../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import AuthenticationStore from '../../../stores/AuthenticationStore.tsx'; /* Metro dependency 1226 */
import UserStore from '../../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import ToastActionCreators from '../../toast/native/ToastActionCreators.tsx'; /* Metro dependency 3857 */
import ReanimatedRexport from '../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import UseWishlistNUXActionSheet from './useWishlistNUXActionSheet.tsx'; /* Metro dependency 10027 */
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 ConstantsModule from '../../../external/discord_common/js/shared/Constants.tsx'; /* Metro dependency 482 */
import * as CollectiblesShopConstantsModule from '../CollectiblesShopConstants.tsx'; /* Metro dependency 663 */
import * as IndexNativeModule from '../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as NativeModule from '../../../external/discord_common/js/packages/design/native.tsx'; /* Metro dependency 3868 */
import * as AccessibilityPreferencesContextModule from '../../../external/discord_common/js/packages/design/components/AccessibilityPreferencesContext/AccessibilityPreferencesContext.tsx'; /* Metro dependency 3875 */
import * as SharedModule from '../../../design/shared.tsx'; /* Metro dependency 4002 */
import * as ReanimatedRexportModule from '../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import * as CreateStylesModule from '../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as TimingModule from '../../../design/animation/reanimated/timing/timing.tsx'; /* Metro dependency 4504 */
import * as SpringModule from '../../../design/animation/reanimated/spring/spring.tsx'; /* Metro dependency 4577 */
import * as SpringPresetsModule from '../../../design/animation/reanimated/spring/springPresets.tsx'; /* Metro dependency 4581 */
import * as ButtonConstantsNativeModule from '../../../design/components/Button/native/ButtonConstants.native.tsx'; /* Metro dependency 4582 */
import * as IconSizeModule from '../../../design/components/Icon/IconSize.tsx'; /* Metro dependency 6817 */
import * as HeartIconModule from '../../../design/components/Icon/native/redesign/generated/HeartIcon.tsx'; /* Metro dependency 8663 */
import * as UseWishlistButtonStateModule from '../hooks/useWishlistButtonState.tsx'; /* Metro dependency 10053 */
import * as HeartOutlineIconModule from '../../../design/components/Icon/native/redesign/generated/HeartOutlineIcon.tsx'; /* Metro dependency 10058 */
import * as UseProductPurchaseStateModule from '../hooks/useProductPurchaseState.tsx'; /* Metro dependency 10060 */
function _fun78623(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#78623, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10243:6, offset: 0x01e2e6e5, size: 567 bytes, params: 8, frame: 25
var object2;
const env0_0 = require;
const closure = WishlistButtonBase;
const closure2 = WishlistButton;
const WishlistButtonBase2 = WishlistButtonBase;
const WishlistButton2 = WishlistButton;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(5) /* metro dependency 5 */;
const env0_4 = importDefault(57) /* metro dependency 57 */;
const env0_5 = importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
let value = ReactNativeModule;
const env0_6 = value.Pressable;
const env0_7 = value.View;
const authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const env0_10 = (require(663) /* metro dependency 663: CollectiblesShopConstants */).ShopCtaEnum;
const env0_11 = (require(482) /* metro dependency 482: Constants */).ThemeTypes;
value = require(33) /* metro dependency 33 */;
const env0_12 = value.jsx;
const env0_13 = value.jsxs;
object2 = {duration: 400};
const Easing = (require(4017) /* metro dependency 4017: ReanimatedRexport */).Easing;
object2.easing = Easing.bezier(0.67, 0, 0.26, 1);
object2 = {};
const SMALL_BUTTON_HEIGHT = (require(4582) /* metro dependency 4582: ButtonConstantsNative */).SMALL_BUTTON_HEIGHT;
object2.sm = SMALL_BUTTON_HEIGHT;
const MEDIUM_BUTTON_HEIGHT = (require(4582) /* metro dependency 4582: ButtonConstantsNative */).MEDIUM_BUTTON_HEIGHT;
object2.md = MEDIUM_BUTTON_HEIGHT;
object = {duration: 400};
const Easing = (ReanimatedRexportModule).Easing;
object.easing = Easing.bezier(0.67, 0, 0.26, 1);
object = {};
const SMALL_BUTTON_HEIGHT = (ButtonConstantsNativeModule).SMALL_BUTTON_HEIGHT;
object.sm = SMALL_BUTTON_HEIGHT;
const MEDIUM_BUTTON_HEIGHT = (ButtonConstantsNativeModule).MEDIUM_BUTTON_HEIGHT;
object.md = MEDIUM_BUTTON_HEIGHT;
const env0_16 = {'sm': 'sm', 'md': 'md'};
const env0_17 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(_fun78642);
object2 = {code: 'function WishlistButtonTsx1(done){const{runOnJS,setIsClickAnimating}=this.__closure;if(done){runOnJS(setIsClickAnimating)(false);}}'};
object2 = {code: "function WishlistButtonTsx2(){const{styles,withSpring,showFilled,SUBTLE_SPRING}=this.__closure;return{...styles.animationFill,opacity:withSpring(showFilled?0:1,SUBTLE_SPRING,'animate-always'),transform:[{scale:withSpring(showFilled?0.9:1,SUBTLE_SPRING,'animate-always')}]};}"};
object2 = {code: "function WishlistButtonTsx3(){const{animationFillProgress,styles,withSpring,showFilled,SUBTLE_SPRING,interpolate,Extrapolation}=this.__closure;const progress=animationFillProgress.get();return{...styles.animationFill,opacity:withSpring(showFilled?1:0,SUBTLE_SPRING,'animate-always'),transform:[{scale:interpolate(progress,[0,0.625,1],[0,1.35,1],Extrapolation.CLAMP)}]};}"};
object2 = {code: 'function WishlistButtonTsx4(){const{animationFillProgress,styles,showFilled,interpolate,Extrapolation}=this.__closure;const progress=animationFillProgress.get();return{...styles.animationFill,opacity:showFilled?interpolate(progress,[0,0.7],[1,0],Extrapolation.CLAMP):0,transform:[{scale:interpolate(progress,[0,0.625,1],[0,1.35,1],Extrapolation.CLAMP)}]};}'};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/WishlistButton.tsx');
const env0_17 = (CreateStylesModule).createStyles(_fun78642);
object = {code: 'function WishlistButtonTsx1(done){const{runOnJS,setIsClickAnimating}=this.__closure;if(done){runOnJS(setIsClickAnimating)(false);}}'};
object = {code: "function WishlistButtonTsx2(){const{styles,withSpring,showFilled,SUBTLE_SPRING}=this.__closure;return{...styles.animationFill,opacity:withSpring(showFilled?0:1,SUBTLE_SPRING,'animate-always'),transform:[{scale:withSpring(showFilled?0.9:1,SUBTLE_SPRING,'animate-always')}]};}"};
object = {code: "function WishlistButtonTsx3(){const{animationFillProgress,styles,withSpring,showFilled,SUBTLE_SPRING,interpolate,Extrapolation}=this.__closure;const progress=animationFillProgress.get();return{...styles.animationFill,opacity:withSpring(showFilled?1:0,SUBTLE_SPRING,'animate-always'),transform:[{scale:interpolate(progress,[0,0.625,1],[0,1.35,1],Extrapolation.CLAMP)}]};}"};
object = {code: 'function WishlistButtonTsx4(){const{animationFillProgress,styles,showFilled,interpolate,Extrapolation}=this.__closure;const progress=animationFillProgress.get();return{...styles.animationFill,opacity:showFilled?interpolate(progress,[0,0.7],[1,0],Extrapolation.CLAMP):0,transform:[{scale:interpolate(progress,[0,0.625,1],[0,1.35,1],Extrapolation.CLAMP)}]};}'};
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/native/WishlistButton.tsx');
exports.default = CollectiblesWishlistButton;
exports.WishlistButtonBase = closure;
exports.WishlistButton = closure2;
}
function WishlistButtonBase({isWishlisted, onPress, busy, disabled, accessibilityLabel, accessibilityHidden, style, size, onTrackPress}) { // fn#78624, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10243:2358, offset: 0x01e2e91c, size: 1480 bytes, params: 2, frame: 34
var object4;
accessibilityHidden = !(accessibilityHidden === undefined) && accessibilityHidden;
size = size === undefined ? 'sm' : size;
const env0_5 = onTrackPress;
const styles = useStyles(size);
const ICON_SIZE = (require(6817) /* metro dependency 6817: IconSize */).ICON_SIZE;
const property = ICON_SIZE[env0_16[size]];
const nativeModule = require(3868) /* metro dependency 3868: native */;
const useThemeContext = nativeModule.useThemeContext;
const theme = Reflect.apply(useThemeContext, nativeModule, []).theme;
const isThemeLight2 = (require(4002) /* metro dependency 4002: shared */).isThemeLight(theme);
const MIDNIGHT = ThemeTypes.MIDNIGHT;
const env0_7 = theme === MIDNIGHT;
const env0_8 = isThemeLight2 ? styles.light : styles.dark;
const env0_9 = isThemeLight2 ? styles.lightPressed : styles.darkPressed;
const binding = env0_5;
const useContext = binding.useContext;
const AccessibilityPreferencesContext = (require(3875) /* metro dependency 3875: AccessibilityPreferencesContext */).AccessibilityPreferencesContext;
const enabled = Reflect.apply(useContext, binding, [AccessibilityPreferencesContext]).reducedMotion.enabled;
const [property2, env0_12] = style(env0_5.useState(false), 2);
const r21 = isWishlisted || property2;
const value9 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(isWishlisted ? 1 : 0);
const value10 = env0_5.useCallback(_fun78625, [busy, onPress, isWishlisted, enabled, property2, onTrackPress]);
env0_5.useEffect(_fun78626, [isWishlisted, property2, value9]);
env0_5.useEffect(_fun78627, [property2, value9]);
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
let useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
let closure = WishlistButtonBaseJ;
object4 = {styles: styles};
object4.withSpring = (require(4577) /* metro dependency 4577: spring */).withSpring;
object4.showFilled = r21;
const SUBTLE_SPRING = (require(4581) /* metro dependency 4581: springPresets */).SUBTLE_SPRING;
object4.SUBTLE_SPRING = SUBTLE_SPRING;
closure.__closure = object4;
closure.__workletHash = 1357254413161;
closure.__initData = env0_19;
const value11 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
const moduleValue5 = reanimatedRexportModule;
useAnimatedStyle = moduleValue5.useAnimatedStyle;
closure = WishlistButtonBaseY;
object4 = {animationFillProgress: value9, styles: styles};
object4.withSpring = (require(4577) /* metro dependency 4577: spring */).withSpring;
object4.showFilled = r21;
object4.SUBTLE_SPRING = SUBTLE_SPRING;
object4.interpolate = reanimatedRexportModule.interpolate;
const Extrapolation = reanimatedRexportModule.Extrapolation;
object4.Extrapolation = Extrapolation;
closure.__closure = object4;
closure.__workletHash = 15039903885060;
closure.__initData = env0_20;
const value12 = Reflect.apply(useAnimatedStyle, moduleValue5, [closure]);
const moduleValue6 = reanimatedRexportModule;
useAnimatedStyle = moduleValue6.useAnimatedStyle;
closure = WishlistButtonBaseK;
object4 = {animationFillProgress: value9, styles: styles, showFilled: r21};
object4.interpolate = reanimatedRexportModule.interpolate;
object4.Extrapolation = Extrapolation;
closure.__closure = object4;
closure.__workletHash = 12429379889426;
closure.__initData = env0_21;
const value13 = Reflect.apply(useAnimatedStyle, moduleValue6, [closure]);
const pressableBindingProps = {style: style_78634, onPress: value10, disabled: disabled,
accessibilityRole: accessibilityHidden ? 'none' : 'togglebutton',
accessibilityLabel: accessibilityHidden ? undefined : accessibilityLabel,
accessibilityState: accessibilityHidden ? undefined : {checked: isWishlisted, busy: busy, disabled: disabled},
accessibilityElementsHidden: accessibilityHidden,
importantForAccessibility: accessibilityHidden ? 'no-hide-descendants' : 'auto'};
const items3 = [styles.iconContainer];
items3[1] = {width: property, height: property};
const View2 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
const HeartOutlineIcon = (require(10058) /* metro dependency 10058: HeartOutlineIcon */).HeartOutlineIcon;
const object2 = {size: env0_16[size]};
const INTERACTIVE_ICON_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_ICON_DEFAULT;
object2.color = INTERACTIVE_ICON_DEFAULT;
const items2 = [<View2 style={value11} pointerEvents="none"><HeartOutlineIcon {...object2} /></View2>];
const View3 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
const HeartIcon = (require(8663) /* metro dependency 8663: HeartIcon */).HeartIcon;
const object3 = {size: env0_16[size]};
const RED_NEW_50 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.RED_NEW_50;
object3.color = RED_NEW_50;
items2[1] = <View3 style={value12} pointerEvents="none"><HeartIcon {...object3} /></View3>;
const View4 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
items2[2] = <View4 style={value13} pointerEvents="none"><HeartIcon size={env0_16[size]} color="white" /></View4>;
return (
<Pressable {...pressableBindingProps}>
<View style={items3}>
{items2}
</View>
</Pressable>
);
}
function WishlistButton(a0) { // fn#78635, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10243:5419, offset: 0x01e2f3be, size: 561 bytes, params: 2, frame: 31
const skuId = a0.skuId;
const product = a0.product;
const onPress = a0.onPress;
const onTrackPress = a0.onTrackPress;
const object2 = {'skuId': 0, 'product': 0, 'onPress': 0, 'onTrackPress': 0};
const value = null;
silentSetPrototypeOf(object2, value, undefined);
const value2 = copyDataProperties({}, a0, object2, undefined);
const id = (require(566) /* metro dependency 566: flux */).useStateFromStores([AuthenticationStore], function() {
return AuthenticationStore.getId();
});
const currentUser = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() {
return UserStore.getCurrentUser();
});
const value4 = (importDefault(10027) /* metro dependency 10027: useWishlistNUXActionSheet */)();
const shouldShowWishlistNUXActionSheet = value4.shouldShowWishlistNUXActionSheet;
const env0_3 = shouldShowWishlistNUXActionSheet;
const showWishlistNUXActionSheet = value4.showWishlistNUXActionSheet;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const value5 = intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t['7kFjeK'],
{productName: product.name});
let binding = env0_5;
let useCallback = binding.useCallback;
const value6 = Reflect.apply(useCallback, binding, [function() {
if (shouldShowWishlistNUXActionSheet) {
showWishlistNUXActionSheet(product);
}
}, [shouldShowWishlistNUXActionSheet, showWishlistNUXActionSheet, product]]);
const string = intl.string;
const F8FvUy = (require(1244) /* metro dependency 1244: indexNative */).t.F8FvUy;
const value7 = Reflect.apply(string, intl, [F8FvUy]);
var env0_5 = value7;
const {isWishlisted, isBusy,
handleToggle} = (require(10053) /* metro dependency 10053: useWishlistButtonState */).useWishlistButtonState({userId: id,
skuId: skuId, onAddSuccess: value6, onError: env0_5.useCallback(_fun78639, [value7])});
binding = env0_5;
useCallback = binding.useCallback;
return value == currentUser ? value : <WishlistButtonBase isWishlisted={isWishlisted} onPress={Reflect.apply(useCallback,
binding, [env0_3(_fun78641), [onPress, onTrackPress, isWishlisted,
handleToggle]])} busy={isBusy} accessibilityLabel={value5} {...value2} />;
}
function _fun78642(a0) { // fn#78642, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10243:422, offset: 0x01e2f6d1, size: 363 bytes, params: 2, frame: 21
const object5 = {};
const object6 = {'width': null, 'height': null, 'display': 'flex', 'alignItems': 'center',
'justifyContent': 'center', 'borderRadius': null, 'borderWidth': 1};
const binding = env0_15;
object6.width = binding[a0];
object6.height = binding[a0];
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
const CONTROL_SECONDARY_BORDER_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.CONTROL_SECONDARY_BORDER_DEFAULT;
object6.borderColor = CONTROL_SECONDARY_BORDER_DEFAULT;
object5.button = object6;
const object7 = {};
object7.backgroundColor = (require(3868) /* metro dependency 3868: native */).setColorOpacity('white', 0.72);
object5.light = object7;
const object8 = {};
object8.backgroundColor = (require(3868) /* metro dependency 3868: native */).setColorOpacity('white', 0.62);
object5.lightPressed = object8;
const CONTROL_OVERLAY_SECONDARY_BACKGROUND_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.CONTROL_OVERLAY_SECONDARY_BACKGROUND_DEFAULT;
object5.dark = {backgroundColor: CONTROL_OVERLAY_SECONDARY_BACKGROUND_DEFAULT};
const CONTROL_OVERLAY_SECONDARY_BACKGROUND_ACTIVE = (importDefault(697) /* metro dependency 697: native */).colors.CONTROL_OVERLAY_SECONDARY_BACKGROUND_ACTIVE;
object5.darkPressed = {backgroundColor: CONTROL_OVERLAY_SECONDARY_BACKGROUND_ACTIVE};
const BORDER_STRONG = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_STRONG;
object5.midnight = {borderColor: BORDER_STRONG};
object5.disabled = {opacity: 0.5};
object5.iconContainer = {'position': 'relative', 'alignItems': 'center', 'justifyContent': 'center'};
object5.animationFill = {'position': 'absolute', 'inset': 0, 'alignItems': 'center', 'justifyContent': 'center'};
return object5;
}
function CollectiblesWishlistButton(a0) { // fn#78643, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10243:6369, offset: 0x01e2f83c, size: 166 bytes, params: 2, frame: 21
const selectedProduct = a0.selectedProduct;
const onTrackPress = a0.onTrackPress;
const value = null;
const value2 = Object.create(value);
value2.selectedProduct = 0;
value2.onTrackPress = 0;
const value3 = copyDataProperties({}, a0, value2, undefined);
const skuId = selectedProduct.skuId;
const useProductPurchaseStateModule = require(10060) /* metro dependency 10060: useProductPurchaseState */;
const useProductPurchaseState = useProductPurchaseStateModule.useProductPurchaseState;
return Reflect.apply(useProductPurchaseState, useProductPurchaseStateModule,
[selectedProduct]).isPurchased ? value : <WishlistButton skuId={skuId} product={selectedProduct} disabled={!(require(10024) /* metro dependency 10024: CollectiblesWishlistUtils */).isWishlistableCollectiblesProduct(selectedProduct)} onTrackPress={onTrackPress} {...value3} />;
}
function _fun78625() { // fn#78625, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10243:2857, offset: 0x01e2eee4, size: 140 bytes, params: 1, frame: 14
var onTrackPressBinding;
var isWishlistedBinding;
var value2;
if (!busy) {
onTrackPressBinding = onTrackPress;
if (onTrackPressBinding != null) {
onTrackPressBinding = onTrackPress;
isWishlistedBinding = isWishlisted;
value2 = environment.__proto__;
onTrackPressBinding(isWishlistedBinding ? ShopCtaEnum.REMOVE_FROM_WISHLIST : ShopCtaEnum.ADD_TO_WISHLIST);
}
if (isWishlisted) {
if (isWishlisted && env0_11) {
env0_12(false);
exports.WishlistButtonBase = WishlistButtonBase2;
exports.WishlistButton = WishlistButton2;
function WishlistButtonBase({isWishlisted, onPress, busy, disabled, accessibilityLabel, accessibilityHidden, style, size, onTrackPress}) { // fn#78624, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10243:2358, offset: 0x01e2e91c, size: 1480 bytes, params: 2, frame: 34
var object6;
accessibilityHidden = !(accessibilityHidden === undefined) && accessibilityHidden;
size = size === undefined ? 'sm' : size;
const onTrackPress2 = onTrackPress;
const styles = useStyles(size);
const ICON_SIZE = (IconSizeModule).ICON_SIZE;
const property = ICON_SIZE[env0_16[size]];
const useThemeContext = NativeModule.useThemeContext;
const theme = Reflect.apply(useThemeContext, NativeModule, []).theme;
const isThemeLight2 = (SharedModule).isThemeLight(theme);
const MIDNIGHT = ThemeTypes.MIDNIGHT;
const env0_7 = theme === MIDNIGHT;
const env0_8 = isThemeLight2 ? styles.light : styles.dark;
const env0_9 = isThemeLight2 ? styles.lightPressed : styles.darkPressed;
const binding = onTrackPress2;
const useContext = binding.useContext;
const AccessibilityPreferencesContext = (AccessibilityPreferencesContextModule).AccessibilityPreferencesContext;
const enabled = Reflect.apply(useContext, binding, [AccessibilityPreferencesContext]).reducedMotion.enabled;
const [property2, env0_12] = style(onTrackPress2.useState(false), 2);
const r21 = isWishlisted || property2;
const value9 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(isWishlisted ? 1 : 0);
const value10 = onTrackPress2.useCallback(_fun78625, [busy, onPress, isWishlisted, enabled, property2,
onTrackPress]);
onTrackPress2.useEffect(_fun78626, [isWishlisted, property2, value9]);
onTrackPress2.useEffect(_fun78627, [property2, value9]);
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
let useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
let closure = WishlistButtonBaseJ;
object6 = {styles: styles};
object6.withSpring = (require(4577) /* metro dependency 4577: spring */).withSpring;
object6.showFilled = r21;
const SUBTLE_SPRING = (SpringPresetsModule).SUBTLE_SPRING;
object6.SUBTLE_SPRING = SUBTLE_SPRING;
closure.__closure = object6;
closure.__workletHash = 1357254413161;
closure.__initData = env0_19;
const value11 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
const moduleValue5 = reanimatedRexportModule;
useAnimatedStyle = moduleValue5.useAnimatedStyle;
closure = WishlistButtonBaseY;
object6 = {animationFillProgress: value9, styles: styles};
object6.withSpring = (require(4577) /* metro dependency 4577: spring */).withSpring;
object6.showFilled = r21;
object6.SUBTLE_SPRING = SUBTLE_SPRING;
object6.interpolate = reanimatedRexportModule.interpolate;
const Extrapolation = reanimatedRexportModule.Extrapolation;
object6.Extrapolation = Extrapolation;
closure.__closure = object6;
closure.__workletHash = 15039903885060;
closure.__initData = env0_20;
const value12 = Reflect.apply(useAnimatedStyle, moduleValue5, [closure]);
const moduleValue6 = reanimatedRexportModule;
useAnimatedStyle = moduleValue6.useAnimatedStyle;
closure = WishlistButtonBaseK;
object6 = {animationFillProgress: value9, styles: styles, showFilled: r21};
object6.interpolate = reanimatedRexportModule.interpolate;
object6.Extrapolation = Extrapolation;
closure.__closure = object6;
closure.__workletHash = 12429379889426;
closure.__initData = env0_21;
const value13 = Reflect.apply(useAnimatedStyle, moduleValue6, [closure]);
const pressableBindingProps = {style: style_78634, onPress: value10, disabled: disabled,
accessibilityRole: accessibilityHidden ? 'none' : 'togglebutton',
accessibilityLabel: accessibilityHidden ? undefined : accessibilityLabel,
accessibilityState: accessibilityHidden ? undefined : {checked: isWishlisted, busy: busy, disabled: disabled},
accessibilityElementsHidden: accessibilityHidden,
importantForAccessibility: accessibilityHidden ? 'no-hide-descendants' : 'auto'};
const items3 = [styles.iconContainer];
items3[1] = {width: property, height: property};
const View2 = (ReanimatedRexport).View;
const HeartOutlineIcon = (HeartOutlineIconModule).HeartOutlineIcon;
const object = {size: env0_16[size]};
const INTERACTIVE_ICON_DEFAULT = (Native).colors.INTERACTIVE_ICON_DEFAULT;
object.color = INTERACTIVE_ICON_DEFAULT;
const items2 = [
<View2 style={value11} pointerEvents="none">
<HeartOutlineIcon {...object} />
</View2>,
];
const View3 = (ReanimatedRexport).View;
const HeartIcon = (HeartIconModule).HeartIcon;
const object5 = {size: env0_16[size]};
const RED_NEW_50 = (Native).unsafe_rawColors.RED_NEW_50;
object5.color = RED_NEW_50;
items2[1] = (
<View3 style={value12} pointerEvents="none">
<HeartIcon {...object5} />
</View3>
);
const View4 = (ReanimatedRexport).View;
items2[2] = (
<View4 style={value13} pointerEvents="none">
<HeartIcon size={env0_16[size]} color="white" />
</View4>
);
return (
<Pressable {...pressableBindingProps}>
<View style={items3}>
{items2}
</View>
</Pressable>
);
function _fun78625() { // fn#78625, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10243:2857, offset: 0x01e2eee4, size: 140 bytes, params: 1, frame: 14
var onTrackPressBinding;
var isWishlistedBinding;
var value2;
if (!busy) {
onTrackPressBinding = onTrackPress;
if (onTrackPressBinding != null) {
onTrackPressBinding = onTrackPress;
isWishlistedBinding = isWishlisted;
value2 = environment.__proto__;
onTrackPressBinding(isWishlistedBinding ? ShopCtaEnum.REMOVE_FROM_WISHLIST : ShopCtaEnum.ADD_TO_WISHLIST);
}
if (isWishlisted) {
if (isWishlisted && ConstantsModule.ThemeTypes) {
env0_12(false);
}
} else if (enabled) {
if (isWishlisted && ConstantsModule.ThemeTypes) {
env0_12(false);
}
} else {
env0_12(true);
}
if (onPress != null) {
onPress();
}
}
} else if (enabled) {
if (isWishlisted && env0_11) {
env0_12(false);
}
function _fun78626() { // fn#78626, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10243:2988, offset: 0x01e2ef70, size: 40 bytes, params: 1, frame: 12
var binding;
if (!ConstantsModule.ThemeTypes) {
binding = env0_14;
binding.set(isWishlisted ? 1 : 0);
}
} else {
env0_12(true);
}
if (onPress != null) {
onPress();
function _fun78627() { // fn#78627, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10243:3033, offset: 0x01e2ef98, size: 67 bytes, params: 1, frame: 12
if (ConstantsModule.ThemeTypes) {
env0_14.set(0);
var env0_0 = global.requestAnimationFrame(_fun78628);
return _fun78630;
}
function _fun78628() { // fn#78628, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10243:3082, offset: 0x01e2efdb, size: 147 bytes, params: 1, frame: 24
const binding = env1_14;
const set = binding.set;
const withTiming = TimingModule.withTiming;
const binding2 = env2_14;
const t_786292 = t_78629;
const object = {};
object.runOnJS = (require(4017) /* metro dependency 4017: ReanimatedRexport */).runOnJS;
object.setIsClickAnimating = env1_12;
t_786292.__closure = object;
t_786292.__workletHash = 13061953734403;
t_786292.__initData = env2_18;
Reflect.apply(set, binding, [Reflect.apply(withTiming, TimingModule, [1, binding2, 'animate-always', t_786292])]);
function t_78629(a0) { // fn#78629, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10243:3144, offset: 0x01e2f06e, size: 59 bytes, params: 2, frame: 12
var value;
var runOnJS;
var value2;
if (a0) {
value = environment.__proto__.__proto__.__proto__;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
runOnJS = value.runOnJS;
value2 = environment.__proto__.__proto__;
value = Reflect.apply(runOnJS, value, [env2_12]);
value(false);
}
}
}
function _fun78630() { // fn#78630, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10243:3301, offset: 0x01e2f0a9, size: 24 bytes, params: 1, frame: 11
return global.cancelAnimationFrame(env0_0);
}
}
}
}
function _fun78626() { // fn#78626, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10243:2988, offset: 0x01e2ef70, size: 40 bytes, params: 1, frame: 12
var binding;
if (!env0_11) {
binding = env0_14;
binding.set(isWishlisted ? 1 : 0);
}
}
function _fun78627() { // fn#78627, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10243:3033, offset: 0x01e2ef98, size: 67 bytes, params: 1, frame: 12
if (env0_11) {
env0_14.set(0);
var env0_0 = global.requestAnimationFrame(_fun78628);
return _fun78630;
}
}
function WishlistButtonBaseJ() { // fn#78631, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10243:3380, owner: WishlistButtonBase.J, offset: 0x01e2f0c1, size: 202 bytes, params: 1, frame: 24
const object2 = {};
copyDataProperties(object2, styles.animationFill, undefined);
const springModule = require(4577) /* metro dependency 4577: spring */;
const withSpring = springModule.withSpring;
const value3 = 1;
const r11 = env0_13 ? 0 : value3;
const SUBTLE_SPRING = (require(4581) /* metro dependency 4581: springPresets */).SUBTLE_SPRING;
object2['opacity'] = Reflect.apply(withSpring, springModule, [r11, SUBTLE_SPRING, 'animate-always']);
const moduleValue2 = springModule;
object2['transform'] = [{scale: moduleValue2.withSpring(env0_13 ? 0.9 : value3, SUBTLE_SPRING, 'animate-always')}];
return object2;
}
function WishlistButtonBaseY() { // fn#78632, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10243:3753, owner: WishlistButtonBase.Y, offset: 0x01e2f18b, size: 220 bytes, params: 1, frame: 21
const value2 = env0_14.get();
const object2 = {};
copyDataProperties(object2, styles.animationFill, undefined);
const springModule = require(4577) /* metro dependency 4577: spring */;
const withSpring = springModule.withSpring;
const r5 = env0_13 ? 1 : 0;
const SUBTLE_SPRING = (require(4581) /* metro dependency 4581: springPresets */).SUBTLE_SPRING;
object2['opacity'] = Reflect.apply(withSpring, springModule, [r5, SUBTLE_SPRING, 'animate-always']);
const value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const interpolate = value.interpolate;
const Extrapolation = (require(4017) /* metro dependency 4017: ReanimatedRexport */).Extrapolation;
const CLAMP = Extrapolation.CLAMP;
object2['transform'] = [{scale: Reflect.apply(interpolate, value, [value2, [0, 0.625, 1], [0, 1.35, 1], CLAMP])}];
return object2;
}
function WishlistButtonBaseK() { // fn#78633, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10243:4249, owner: WishlistButtonBase.K, offset: 0x01e2f267, size: 243 bytes, params: 1, frame: 20
var r2;
const Extrapolation = (require(4017) /* metro dependency 4017: ReanimatedRexport */).Extrapolation;
const value2 = env0_14.get();
const object2 = {};
copyDataProperties(object2, styles.animationFill, undefined);
let value = 0;
if (env0_13) {
value = environment.__proto__;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
value = value.interpolate(value2, [0, 0.7], [1, 0], Extrapolation.CLAMP);
r2 = value;
} else {
r2 = value;
}
object2['opacity'] = r2;
value = environment.__proto__;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const interpolate = value.interpolate;
const CLAMP = Extrapolation.CLAMP;
object2['transform'] = [{scale: Reflect.apply(interpolate, value, [value2, [0, 0.625, 1], [0, 1.35, 1], CLAMP])}];
return object2;
}
function WishlistButtonBaseStyle({pressed}) { // fn#78634, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10243:4665, owner: WishlistButtonBase.style, offset: 0x01e2f35a, size: 100 bytes, params: 2, frame: 5
return [styles.button, env0_8, env0_7 && styles.midnight, pressed && env0_9, disabled && styles.disabled, style];
}
function _fun78639() { // fn#78639, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10243:5869, offset: 0x01e2f61f, size: 61 bytes, params: 1, frame: 13
const value = environment.__proto__;
(importDefault(3857) /* metro dependency 3857: ToastActionCreators */).open({key: 'WISHLIST_ERROR',
content: env0_5});
}
function* _fun78641() { // fn#78641, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10243:6072, offset: 0x01e2f667, size: 106 bytes, params: 1, frame: 15
var value3;
var binding;
if (true) {
value = environment.__proto__;
if (dependencyMap != null) {
value3 = environment.__proto__.__proto__;
binding = env2_10;
dependencyMap(Pressable ? binding.REMOVE_FROM_WISHLIST : binding.ADD_TO_WISHLIST);
function WishlistButtonBaseJ() { // fn#78631, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10243:3380, owner: WishlistButtonBase.J, offset: 0x01e2f0c1, size: 202 bytes, params: 1, frame: 24
const object = {};
copyDataProperties(object, styles.animationFill, undefined);
const withSpring = SpringModule.withSpring;
const value3 = 1;
const r11 = env0_13 ? 0 : value3;
const SUBTLE_SPRING = (SpringPresetsModule).SUBTLE_SPRING;
object['opacity'] = Reflect.apply(withSpring, SpringModule, [r11, SUBTLE_SPRING, 'animate-always']);
object['transform'] = [{scale: SpringModule.withSpring(env0_13 ? 0.9 : value3, SUBTLE_SPRING, 'animate-always')}];
return object;
}
if (importDefault != null) {
importDefault();
function WishlistButtonBaseY() { // fn#78632, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10243:3753, owner: WishlistButtonBase.Y, offset: 0x01e2f18b, size: 220 bytes, params: 1, frame: 21
const value2 = env0_14.get();
const object = {};
copyDataProperties(object, styles.animationFill, undefined);
const withSpring = SpringModule.withSpring;
const r5 = env0_13 ? 1 : 0;
const SUBTLE_SPRING = (SpringPresetsModule).SUBTLE_SPRING;
object['opacity'] = Reflect.apply(withSpring, SpringModule, [r5, SUBTLE_SPRING, 'animate-always']);
const interpolate = ReanimatedRexportModule.interpolate;
const Extrapolation = (ReanimatedRexportModule).Extrapolation;
const CLAMP = Extrapolation.CLAMP;
object['transform'] = [{scale: Reflect.apply(interpolate, ReanimatedRexportModule, [value2, [0, 0.625, 1], [0, 1.35, 1], CLAMP])}];
return object;
}
yield View();
function WishlistButtonBaseK() { // fn#78633, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10243:4249, owner: WishlistButtonBase.K, offset: 0x01e2f267, size: 243 bytes, params: 1, frame: 20
var r2;
const Extrapolation = (require(4017) /* metro dependency 4017: ReanimatedRexport */).Extrapolation;
const value2 = env0_14.get();
const object = {};
copyDataProperties(object, styles.animationFill, undefined);
let value = 0;
if (env0_13) {
value = environment.__proto__;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
value = value.interpolate(value2, [0, 0.7], [1, 0], Extrapolation.CLAMP);
r2 = value;
} else {
r2 = value;
}
object['opacity'] = r2;
value = environment.__proto__;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const interpolate = value.interpolate;
const CLAMP = Extrapolation.CLAMP;
object['transform'] = [{scale: Reflect.apply(interpolate, value, [value2, [0, 0.625, 1], [0, 1.35, 1], CLAMP])}];
return object;
}
function WishlistButtonBaseStyle({pressed}) { // fn#78634, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10243:4665, owner: WishlistButtonBase.style, offset: 0x01e2f35a, size: 100 bytes, params: 2, frame: 5
return [styles.button, env0_8, env0_7 && styles.midnight, pressed && env0_9, disabled && styles.disabled, style];
}
}
}
function _fun78628() { // fn#78628, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10243:3082, offset: 0x01e2efdb, size: 147 bytes, params: 1, frame: 24
const binding = env1_14;
const set = binding.set;
const timingModule = require(4504) /* metro dependency 4504: timing */;
const withTiming = timingModule.withTiming;
const binding2 = env2_14;
const closure = t_78629;
const object2 = {};
object2.runOnJS = (require(4017) /* metro dependency 4017: ReanimatedRexport */).runOnJS;
object2.setIsClickAnimating = env1_12;
closure.__closure = object2;
closure.__workletHash = 13061953734403;
closure.__initData = env2_18;
Reflect.apply(set, binding, [Reflect.apply(withTiming, timingModule, [1, binding2, 'animate-always', closure])]);
}
function WishlistButton(a0) { // fn#78635, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10243:5419, offset: 0x01e2f3be, size: 561 bytes, params: 2, frame: 31
const skuId = a0.skuId;
const product = a0.product;
const onPress = a0.onPress;
const onTrackPress = a0.onTrackPress;
const object = {'skuId': 0, 'product': 0, 'onPress': 0, 'onTrackPress': 0};
const value = null;
silentSetPrototypeOf(object, value, undefined);
const value2 = copyDataProperties({}, a0, object, undefined);
const id = (require(566) /* metro dependency 566: flux */).useStateFromStores([AuthenticationStore], function() {
return AuthenticationStore.getId();
});
const currentUser = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() {
return UserStore.getCurrentUser();
});
const value4 = (UseWishlistNUXActionSheet)();
const shouldShowWishlistNUXActionSheet = value4.shouldShowWishlistNUXActionSheet;
const shouldShowWishlistNUXActionSheet2 = shouldShowWishlistNUXActionSheet;
const showWishlistNUXActionSheet = value4.showWishlistNUXActionSheet;
const intl = (IndexNativeModule).intl;
const value5 = intl.formatToPlainString((IndexNativeModule).t['7kFjeK'],
{productName: product.name});
let binding = env0_5;
let useCallback = binding.useCallback;
const value6 = Reflect.apply(useCallback, binding, [function() {
if (shouldShowWishlistNUXActionSheet) {
showWishlistNUXActionSheet(product);
}
}, [shouldShowWishlistNUXActionSheet, showWishlistNUXActionSheet, product]]);
const string = intl.string;
const F8FvUy = (IndexNativeModule).t.F8FvUy;
const value7 = Reflect.apply(string, intl, [F8FvUy]);
var env0_5 = value7;
const {isWishlisted, isBusy,
handleToggle} = (UseWishlistButtonStateModule).useWishlistButtonState({userId: id,
skuId: skuId, onAddSuccess: value6, onError: env0_5.useCallback(_fun78639, [value7])});
binding = env0_5;
useCallback = binding.useCallback;
return (
value == currentUser
? value
: (
<WishlistButtonBase
isWishlisted={isWishlisted}
onPress={Reflect.apply(useCallback, binding, [shouldShowWishlistNUXActionSheet2(_fun78641),
[onPress, onTrackPress, isWishlisted, handleToggle]])}
busy={isBusy}
accessibilityLabel={value5}
{...value2}
/>
)
);
function _fun78639() { // fn#78639, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10243:5869, offset: 0x01e2f61f, size: 61 bytes, params: 1, frame: 13
const value = environment.__proto__;
(ToastActionCreators).open({key: 'WISHLIST_ERROR',
content: env0_5});
}
function _fun78630() { // fn#78630, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10243:3301, offset: 0x01e2f0a9, size: 24 bytes, params: 1, frame: 11
return global.cancelAnimationFrame(env0_0);
}
function* _fun78641() { // fn#78641, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10243:6072, offset: 0x01e2f667, size: 106 bytes, params: 1, frame: 15
var value3;
var binding;
if (true) {
value = environment.__proto__;
if (dependencyMap != null) {
value3 = environment.__proto__.__proto__;
binding = env2_10;
dependencyMap(Pressable ? binding.REMOVE_FROM_WISHLIST : binding.ADD_TO_WISHLIST);
}
if (importDefault != null) {
importDefault();
}
yield View();
}
}
function t_78629(a0) { // fn#78629, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10243:3144, offset: 0x01e2f06e, size: 59 bytes, params: 2, frame: 12
var value;
var runOnJS;
var value2;
if (a0) {
value = environment.__proto__.__proto__.__proto__;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
runOnJS = value.runOnJS;
value2 = environment.__proto__.__proto__;
value = Reflect.apply(runOnJS, value, [env2_12]);
value(false);
}
function _fun78642(a0) { // fn#78642, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10243:422, offset: 0x01e2f6d1, size: 363 bytes, params: 2, frame: 21
const object = {};
const object2 = {'width': null, 'height': null, 'display': 'flex', 'alignItems': 'center',
'justifyContent': 'center', 'borderRadius': null, 'borderWidth': 1};
const binding = env0_15;
object2.width = binding[a0];
object2.height = binding[a0];
object2.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
const CONTROL_SECONDARY_BORDER_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.CONTROL_SECONDARY_BORDER_DEFAULT;
object2.borderColor = CONTROL_SECONDARY_BORDER_DEFAULT;
object.button = object2;
const object3 = {};
object3.backgroundColor = (require(3868) /* metro dependency 3868: native */).setColorOpacity('white', 0.72);
object.light = object3;
const object4 = {};
object4.backgroundColor = (require(3868) /* metro dependency 3868: native */).setColorOpacity('white', 0.62);
object.lightPressed = object4;
const CONTROL_OVERLAY_SECONDARY_BACKGROUND_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.CONTROL_OVERLAY_SECONDARY_BACKGROUND_DEFAULT;
object.dark = {backgroundColor: CONTROL_OVERLAY_SECONDARY_BACKGROUND_DEFAULT};
const CONTROL_OVERLAY_SECONDARY_BACKGROUND_ACTIVE = (importDefault(697) /* metro dependency 697: native */).colors.CONTROL_OVERLAY_SECONDARY_BACKGROUND_ACTIVE;
object.darkPressed = {backgroundColor: CONTROL_OVERLAY_SECONDARY_BACKGROUND_ACTIVE};
const BORDER_STRONG = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_STRONG;
object.midnight = {borderColor: BORDER_STRONG};
object.disabled = {opacity: 0.5};
object.iconContainer = {'position': 'relative', 'alignItems': 'center', 'justifyContent': 'center'};
object.animationFill = {'position': 'absolute', 'inset': 0, 'alignItems': 'center', 'justifyContent': 'center'};
return object;
}
function CollectiblesWishlistButton(a0) { // fn#78643, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10243:6369, offset: 0x01e2f83c, size: 166 bytes, params: 2, frame: 21
const selectedProduct = a0.selectedProduct;
const onTrackPress = a0.onTrackPress;
const value = null;
const value2 = Object.create(value);
value2.selectedProduct = 0;
value2.onTrackPress = 0;
const value3 = copyDataProperties({}, a0, value2, undefined);
const skuId = selectedProduct.skuId;
const useProductPurchaseState = UseProductPurchaseStateModule.useProductPurchaseState;
return (
Reflect.apply(useProductPurchaseState, UseProductPurchaseStateModule, [selectedProduct]).isPurchased
? value
: (
<WishlistButton
skuId={skuId}
product={selectedProduct}
disabled={!(require(10024) /* metro dependency 10024: CollectiblesWishlistUtils */).isWishlistableCollectiblesProduct(selectedProduct)}
onTrackPress={onTrackPress}
{...value3}
/>
)
);
}
}
global.__d(_fun78623, 10057, [5, 57, 31, 27, 1226, 1878, 663, 482, 33, 4017, 4582, 4501, 697, 3868, 6817, 4002,
3875, 4504, 4577, 4581, 10058, 8663, 566, 10027, 1244, 3857, 10053, 10060, 10024,
2]) /* metro module 10057, dependencies: [5, 57, 31, 27, 1226, 1878, 663, 482, 33, 4017, 4582, 4501, 697, 3868, 6817, 4002, 3875, 4504, 4577, 4581, 10058, 8663, 566, 10027, 1244, 3857, 10053, 10060, 10024, 2] */;
@@ -1,73 +1,81 @@
/* Metro module 14066; source: modules/collectibles/native/WishlistButtonCoachmark.tsx; dependencies: [57, 31, 1376, 10027, 1365, 7013, 14057, 1244, 8543, 2] */
import Module00057 from '../../../by-id/module-00057.js'; /* Metro dependency 57 */
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 IndexNativeModule from '../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as Dismissible_contentModule from '../../../external/discord_common/js/packages/protos/discord_protos/discord_users/v1/dismissible_content.tsx'; /* Metro dependency 1365 */
import * as DismissibleContentConstantsModule from '../../dismissible_content/DismissibleContentConstants.tsx'; /* Metro dependency 1376 */
import * as UseSelectedDismissibleContentModule from '../../dismissible_content/hooks/useSelectedDismissibleContent.tsx'; /* Metro dependency 7013 */
import * as UseCoachmarkNativeModule from '../../../design/components/Coachmark/native/useCoachmark.native.tsx'; /* Metro dependency 8543 */
import * as UseWishlistNUXActionSheetModule from './useWishlistNUXActionSheet.tsx'; /* Metro dependency 10027 */
import * as CollectiblesCoachmarkScrollDismissContextModule from './CollectiblesCoachmarkScrollDismissContext.tsx'; /* Metro dependency 14057 */
function _fun106635(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#106635, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14263:6, offset: 0x022e3976, size: 155 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 */;
const env0_4 = (require(1376) /* metro dependency 1376: DismissibleContentConstants */).ContentDismissActionType;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/WishlistButtonCoachmark.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/native/WishlistButtonCoachmark.tsx');
exports.default = WishlistButtonCoachmark;
}
function WishlistButtonCoachmark({anchorRef}) { // fn#106636, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14263:250, offset: 0x022e3a11, size: 289 bytes, params: 2, frame: 21
const value2 = (require(10027) /* metro dependency 10027: useWishlistNUXActionSheet */).useHasNeverWishlisted();
const binding = env0_3;
const useMemo = binding.useMemo;
let value = env0_2((require(7013) /* metro dependency 7013: useSelectedDismissibleContent */).useSelectedDismissibleContent(Reflect.apply(useMemo,
binding, [_fun106637, [value2]])), 2);
const property = value[0];
const property2 = value[1];
const DismissibleContent = (require(1365) /* metro dependency 1365: dismissible_content */).DismissibleContent;
const WISHLIST_MOBILE_NUX_PRODUCT_CARD_COACHMARK = DismissibleContent.WISHLIST_MOBILE_NUX_PRODUCT_CARD_COACHMARK;
value = property === WISHLIST_MOBILE_NUX_PRODUCT_CARD_COACHMARK;
const collectiblesCoachmarkScrollDismissContextModule = require(14057) /* metro dependency 14057: CollectiblesCoachmarkScrollDismissContext */;
const useCollectiblesCoachmarkScrollDismissContext = collectiblesCoachmarkScrollDismissContextModule.useCollectiblesCoachmarkScrollDismissContext;
binding.useEffect(function() {
if (result) {
return registerDismiss(_fun106639);
function WishlistButtonCoachmark({anchorRef}) { // fn#106636, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14263:250, offset: 0x022e3a11, size: 289 bytes, params: 2, frame: 21
const value2 = (UseWishlistNUXActionSheetModule).useHasNeverWishlisted();
const useMemo = ReactModule.useMemo;
let value = Module00057((UseSelectedDismissibleContentModule).useSelectedDismissibleContent(Reflect.apply(useMemo,
ReactModule, [_fun106637, [value2]])), 2);
const property = value[0];
const property2 = value[1];
const DismissibleContent = (Dismissible_contentModule).DismissibleContent;
const WISHLIST_MOBILE_NUX_PRODUCT_CARD_COACHMARK = DismissibleContent.WISHLIST_MOBILE_NUX_PRODUCT_CARD_COACHMARK;
value = property === WISHLIST_MOBILE_NUX_PRODUCT_CARD_COACHMARK;
const useCollectiblesCoachmarkScrollDismissContext = CollectiblesCoachmarkScrollDismissContextModule.useCollectiblesCoachmarkScrollDismissContext;
ReactModule.useEffect(function() {
if (result) {
return registerDismiss(_fun106639);
}
}, [value, Reflect.apply(useCollectiblesCoachmarkScrollDismissContext,
CollectiblesCoachmarkScrollDismissContextModule, []).registerDismiss, property2]);
value = ReactModule.useMemo(_fun106640, [value, property2]);
(UseCoachmarkNativeModule).useCoachmark(anchorRef, value);
return null;
function _fun106637() { // fn#106637, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14263:349, offset: 0x022e3b32, size: 66 bytes, params: 1, frame: 12
return env0_0 ? [(require(1365) /* metro dependency 1365: dismissible_content */).DismissibleContent.WISHLIST_MOBILE_NUX_PRODUCT_CARD_COACHMARK] : [];
}
}, [value, Reflect.apply(useCollectiblesCoachmarkScrollDismissContext,
collectiblesCoachmarkScrollDismissContextModule, []).registerDismiss, property2]);
value = binding.useMemo(_fun106640, [value, property2]);
(require(8543) /* metro dependency 8543: useCoachmarkNative */).useCoachmark(anchorRef, value);
return null;
}
function _fun106637() { // fn#106637, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14263:349, offset: 0x022e3b32, size: 66 bytes, params: 1, frame: 12
return env0_0 ? [(require(1365) /* metro dependency 1365: dismissible_content */).DismissibleContent.WISHLIST_MOBILE_NUX_PRODUCT_CARD_COACHMARK] : [];
}
function _fun106638() { // fn#106638, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14263:664, offset: 0x022e3b74, size: 34 bytes, params: 1, frame: 11
if (result) {
return registerDismiss(_fun106639);
}
function _fun106639() { // fn#106639, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14263:684, offset: 0x022e3b96, size: 29 bytes, params: 1, frame: 11
const binding = env1_1;
const INDIRECT_ACTION = ContentDismissActionType.INDIRECT_ACTION;
return binding(INDIRECT_ACTION);
}
}
function _fun106640() { // fn#106640, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14263:739, offset: 0x022e3bb3, size: 154 bytes, params: 1, frame: 16
const object = {};
const intl = (IndexNativeModule).intl;
let string = intl.string;
const t = (IndexNativeModule).t;
object.title = Reflect.apply(string, intl, [t['47Rhc3']]);
string = intl.string;
const PXjA0b = t.PXjA0b;
object.description = Reflect.apply(string, intl, [PXjA0b]);
object.position = 'top';
object.visible = result;
object.onDismiss = onDismiss_106641;
return object;
function onDismiss_106641() { // fn#106641, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14263:877, offset: 0x022e3c4d, size: 29 bytes, params: 1, frame: 11
const binding = env1_1;
const USER_DISMISS = ContentDismissActionType.USER_DISMISS;
return binding(USER_DISMISS);
}
}
function _fun106638() { // fn#106638, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14263:664, offset: 0x022e3b74, size: 34 bytes, params: 1, frame: 11
if (result) {
return registerDismiss(_fun106639);
}
}
function _fun106640() { // fn#106640, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14263:739, offset: 0x022e3bb3, size: 154 bytes, params: 1, frame: 16
const object2 = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
object2.title = Reflect.apply(string, intl, [t['47Rhc3']]);
string = intl.string;
const PXjA0b = t.PXjA0b;
object2.description = Reflect.apply(string, intl, [PXjA0b]);
object2.position = 'top';
object2.visible = result;
object2.onDismiss = onDismiss_106641;
return object2;
}
function _fun106639() { // fn#106639, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14263:684, offset: 0x022e3b96, size: 29 bytes, params: 1, frame: 11
const binding = env1_1;
const INDIRECT_ACTION = ContentDismissActionType.INDIRECT_ACTION;
return binding(INDIRECT_ACTION);
}
function onDismiss_106641() { // fn#106641, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14263:877, offset: 0x022e3c4d, size: 29 bytes, params: 1, frame: 11
const binding = env1_1;
const USER_DISMISS = ContentDismissActionType.USER_DISMISS;
return binding(USER_DISMISS);
}
global.__d(_fun106635, 14066, [57, 31, 1376, 10027, 1365, 7013, 14057, 1244, 8543,
2]) /* metro module 14066, dependencies: [57, 31, 1376, 10027, 1365, 7013, 14057, 1244, 8543, 2] */;
@@ -1,116 +1,162 @@
/* Metro module 10028; source: modules/collectibles/native/WishlistNUXAddedItemActionSheet.tsx; dependencies: [57, 31, 27, 1878, 8516, 33, 4501, 697, 566, 1904, 4080, 8743, 6789, 10029, 6275, 10033, 4573, 1244, 6261, 4578, 2] */
import Module00057 from '../../../by-id/module-00057.js'; /* Metro dependency 57 */
import UserStore from '../../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import ActionSheetActionCreators from '../../action_sheet/native/ActionSheetActionCreators.tsx'; /* Metro dependency 4080 */
import WishlistItemCardBase from '../../wishlists/native/WishlistItemCardBase.tsx'; /* Metro dependency 10033 */
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 CollectiblesItemTypeModule from '../../../external/discord_common/js/shared/shared-constants/CollectiblesItemType.tsx'; /* Metro dependency 1904 */
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 ButtonGroupNativeModule from '../../../design/components/ButtonGroup/native/ButtonGroup.native.tsx'; /* Metro dependency 6261 */
import * as BottomSheetNativeModule from '../../../design/components/Sheet/native/BottomSheet.native.tsx'; /* Metro dependency 6275 */
import * as ConstantsModule from '../../user_profile/Constants.tsx'; /* Metro dependency 8516 */
function _fun78327(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#78327, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10214:6, offset: 0x01e2596e, size: 386 bytes, params: 8, frame: 23
var object4;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
const env0_5 = (require(27) /* metro dependency 27 */).View;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const env0_7 = (require(8516) /* metro dependency 8516: Constants */).UserProfileSections;
let value = require(33) /* metro dependency 33 */;
let value = JsxRuntimeModule;
const env0_8 = value.jsx;
const env0_9 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object4 = {};
const object5 = {alignItems: 'center'};
object = {};
const object2 = {alignItems: 'center'};
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object5.padding = PX_16;
object2.padding = PX_16;
const PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
object5.gap = PX_24;
object4.container = object5;
const object6 = {alignItems: 'center'};
object2.gap = PX_24;
object.container = object2;
const object3 = {alignItems: 'center'};
let PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object6.paddingHorizontal = PX_8;
object3.paddingHorizontal = PX_8;
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object6.gap = PX_8;
object4.textContainer = object6;
object4.subtitle = {textAlign: 'center'};
const env0_10 = Reflect.apply(createStyles, value, [object4]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/WishlistNUXAddedItemActionSheet.tsx');
object3.gap = PX_8;
object.textContainer = object3;
object.subtitle = {textAlign: 'center'};
const env0_10 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/native/WishlistNUXAddedItemActionSheet.tsx');
exports.default = WishlistNUXAddedItemActionSheet;
}
function WishlistNUXAddedItemActionSheet({product}) { // fn#78328, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10214:542, offset: 0x01e25af0, size: 759 bytes, params: 2, frame: 31
const styles = useStyles();
const value2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() {
return UserStore.getCurrentUser();
}, []);
const binding = env0_4;
const value3 = binding.useMemo(_fun78330, [product]);
const value4 = binding.useCallback(_fun78331, []);
const value5 = binding.useCallback(_fun78332, [value2]);
const value6 = binding.useCallback(_fun78333, [value3]);
const BottomSheet = (require(6275) /* metro dependency 6275: BottomSheetNative */).BottomSheet;
let value = importDefault(10033) /* metro dependency 10033: WishlistItemCardBase */;
value = ((Component) => <Component renderPreview={value6} />)(value);
const items2 = [value];
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
value = <Text variant="heading-lg/extrabold" color="text-strong" accessibilityRole="header">{Reflect.apply(string,
intl, [(require(1244) /* metro dependency 1244: indexNative */).t['3T2jbf']])}</Text>;
string = intl.string;
const SXb73A = (require(1244) /* metro dependency 1244: indexNative */).t.SXb73A;
items2[1] = <View style={styles.textContainer}>{value}<Text variant="text-md/normal" color="text-default" style={styles.subtitle}>{Reflect.apply(string,
intl, [SXb73A])}</Text></View>;
const ButtonGroup = (require(6261) /* metro dependency 6261: ButtonGroupNative */).ButtonGroup;
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
value = <Button text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.tM4PUv)} onPress={value4} size="lg" variant="primary" grow />;
string = intl.string;
const TxBQzD = (require(1244) /* metro dependency 1244: indexNative */).t.TxBQzD;
items2[2] = <ButtonGroup direction="horizontal">{value}<Button text={Reflect.apply(string, intl,
[TxBQzD])} onPress={value5} variant="secondary" size="lg" grow /></ButtonGroup>;
return (
<BottomSheet>
<View style={styles.container}>
{items2}
function WishlistNUXAddedItemActionSheet({product}) { // fn#78328, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10214:542, offset: 0x01e25af0, size: 759 bytes, params: 2, frame: 31
const styles = useStyles();
const value2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() {
return UserStore.getCurrentUser();
}, []);
const value3 = ReactModule.useMemo(_fun78330, [product]);
const value4 = ReactModule.useCallback(_fun78331, []);
const value5 = ReactModule.useCallback(_fun78332, [value2]);
const value6 = ReactModule.useCallback(_fun78333, [value3]);
const BottomSheet = (BottomSheetNativeModule).BottomSheet;
let value = WishlistItemCardBase;
value = ((Component) => <Component renderPreview={value6} />)(value);
const items2 = [value];
const Text = (TextModule).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
value = (
<Text
variant="heading-lg/extrabold"
color="text-strong"
accessibilityRole="header"
>
{Reflect.apply(string, intl, [(require(1244) /* metro dependency 1244: indexNative */).t['3T2jbf']])}
</Text>
);
string = intl.string;
const SXb73A = (require(1244) /* metro dependency 1244: indexNative */).t.SXb73A;
items2[1] = (
<View style={styles.textContainer}>
{value}
<Text
variant="text-md/normal"
color="text-default"
style={styles.subtitle}
>
{Reflect.apply(string, intl, [SXb73A])}
</Text>
</View>
</BottomSheet>
);
}
);
const ButtonGroup = (ButtonGroupNativeModule).ButtonGroup;
const Button = (ButtonNativeModule).Button;
value = (
<Button
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.tM4PUv)}
onPress={value4}
size="lg"
variant="primary"
grow
/>
);
string = intl.string;
const TxBQzD = (require(1244) /* metro dependency 1244: indexNative */).t.TxBQzD;
items2[2] = (
<ButtonGroup direction="horizontal">
{value}
<Button
text={Reflect.apply(string, intl, [TxBQzD])}
onPress={value5}
variant="secondary"
size="lg"
grow
/>
</ButtonGroup>
);
return (
<BottomSheet>
<View style={styles.container}>
{items2}
</View>
</BottomSheet>
);
function _fun78330() { // fn#78330, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10214:681, offset: 0x01e25de7, size: 150 bytes, params: 1, frame: 15
const type = product.type;
const value3 = undefined;
const CollectiblesItemType = (CollectiblesItemTypeModule).CollectiblesItemType;
const BUNDLE = CollectiblesItemType.BUNDLE;
if (type === BUNDLE) {
productBinding = product;
return {type: 'bundle', items: productBinding.items, previewAssets: productBinding.previewAssets};
}
const property = env1_3(product.items, 1)[0];
return property == null ? value3 : {type: 'single', item: property};
}
function _fun78330() { // fn#78330, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10214:681, offset: 0x01e25de7, size: 150 bytes, params: 1, frame: 15
const type = product.type;
const value3 = undefined;
const CollectiblesItemType = (require(1904) /* metro dependency 1904: CollectiblesItemType */).CollectiblesItemType;
const BUNDLE = CollectiblesItemType.BUNDLE;
if (type === BUNDLE) {
productBinding = product;
return {type: 'bundle', items: productBinding.items, previewAssets: productBinding.previewAssets};
}
const property = env1_3(product.items, 1)[0];
return property == null ? value3 : {type: 'single', item: property};
}
function _fun78331() { // fn#78331, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10214:891, offset: 0x01e25e7d, size: 37 bytes, params: 1, frame: 11
const value = environment.__proto__;
(ActionSheetActionCreators).hideActionSheet();
}
function _fun78331() { // fn#78331, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10214:891, offset: 0x01e25e7d, size: 37 bytes, params: 1, frame: 11
const value = environment.__proto__;
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
}
function _fun78332() { // fn#78332, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10214:946, offset: 0x01e25ea2, size: 136 bytes, params: 1, frame: 15
var defaultImport2;
var object;
(ActionSheetActionCreators).hideAllActionSheets();
if (env0_1 != null) {
defaultImport2 = importDefault(8743) /* metro dependency 8743: showUserProfileActionSheet */;
object = {};
object.userId = env0_1.id;
object.sourceAnalyticsLocations = [(importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).COLLECTIBLES_SHOP];
object.initialSection = UserProfileSections.WISHLIST;
defaultImport2(object);
}
}
function _fun78332() { // fn#78332, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10214:946, offset: 0x01e25ea2, size: 136 bytes, params: 1, frame: 15
var defaultImport2;
var object2;
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideAllActionSheets();
if (env0_1 != null) {
defaultImport2 = importDefault(8743) /* metro dependency 8743: showUserProfileActionSheet */;
object2 = {};
object2.userId = env0_1.id;
object2.sourceAnalyticsLocations = [(importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).COLLECTIBLES_SHOP];
object2.initialSection = UserProfileSections.WISHLIST;
defaultImport2(object2);
}
}
function _fun78333() { // fn#78333, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10214:1119, offset: 0x01e25f2a, size: 70 bytes, params: 1, frame: 15
const value2 = null;
if (value2 == env0_2) {
return value2;
} else {
const CollectiblesPreview = (require(10029) /* metro dependency 10029: SKUPreview */).CollectiblesPreview;
return <CollectiblesPreview collectiblesItemData={env0_2} />;
}
}
function _fun78333() { // fn#78333, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10214:1119, offset: 0x01e25f2a, size: 70 bytes, params: 1, frame: 15
const value2 = null;
if (value2 == env0_2) {
return value2;
} else {
const CollectiblesPreview = (require(10029) /* metro dependency 10029: SKUPreview */).CollectiblesPreview;
return <CollectiblesPreview collectiblesItemData={env0_2} />;
}
}
global.__d(_fun78327, 10028, [57, 31, 27, 1878, 8516, 33, 4501, 697, 566, 1904, 4080, 8743, 6789, 10029, 6275,
10033, 4573, 1244, 6261, 4578,
2]) /* metro module 10028, dependencies: [57, 31, 27, 1878, 8516, 33, 4501, 697, 566, 1904, 4080, 8743, 6789, 10029, 6275, 10033, 4573, 1244, 6261, 4578, 2] */;
@@ -1,50 +1,64 @@
/* Metro module 7598; source: modules/collectibles/native/components/CutoutableAvatarDecoration.tsx; dependencies: [31, 27, 4502, 33, 632, 1423, 477, 7599, 7601, 5475, 2] */
import AccessibilityStore from '../../../a11y/AccessibilityStore.tsx'; /* Metro dependency 4502 */
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 UseStateFromStoresModule from '../../../../external/discord_common/js/packages/flux/useStateFromStores.tsx'; /* Metro dependency 632 */
import * as AvatarUtilsModule from '../../../../utils/AvatarUtils.tsx'; /* Metro dependency 1423 */
function _fun60921(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#60921, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7776:6, offset: 0x01715025, size: 177 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(27) /* metro dependency 27 */).View;
const accessibilityStore = importDefault(4502) /* metro dependency 4502: AccessibilityStore */;
const env0_6 = (require(33) /* metro dependency 33 */).jsx;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/components/CutoutableAvatarDecoration.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/native/components/CutoutableAvatarDecoration.tsx');
exports.default = CutoutableAvatarDecoration;
}
function CutoutableAvatarDecoration({size, avatarDecoration, decorationStyle, animate, cutout}) { // fn#60922, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7776:259, offset: 0x017150d6, size: 536 bytes, params: 2, frame: 25
var r1;
var r2;
var r0;
var moduleValue2;
const env0_3 = animate;
var value;
const useStateFromStoresModule = require(632) /* metro dependency 632: useStateFromStores */;
const useStateFromStores = useStateFromStoresModule.useStateFromStores;
let object = [AccessibilityStore];
const useReducedMotion = Reflect.apply(useStateFromStores, useStateFromStoresModule, [object, function() {
return AccessibilityStore.useReducedMotion;
}]);
const {shouldAnimate, avatarDecorationUrl, style, sizeStyle, source} = env0_3.useMemo(_fun60924, [animate, size,
avatarDecoration, decorationStyle, useReducedMotion]);
if (avatarDecoration == null) {
r0 = null;
} else if (avatarDecorationUrl == null) {
r0 = null;
} else {
moduleValue2 = require(477) /* metro dependency 477: PlatformUtils */;
if (moduleValue2.isAndroid()) {
if (shouldAnimate) {
if (cutout != null) {
function CutoutableAvatarDecoration({size, avatarDecoration, decorationStyle, animate, cutout}) { // fn#60922, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7776:259, offset: 0x017150d6, size: 536 bytes, params: 2, frame: 25
var r1;
var r2;
var r0;
var moduleValue2;
const animate2 = animate;
var value;
const useStateFromStores = UseStateFromStoresModule.useStateFromStores;
let object = [AccessibilityStore];
const useReducedMotion = Reflect.apply(useStateFromStores, UseStateFromStoresModule, [object, function() {
return AccessibilityStore.useReducedMotion;
}]);
const {shouldAnimate, avatarDecorationUrl, style, sizeStyle, source} = animate2.useMemo(_fun60924, [animate, size,
avatarDecoration, decorationStyle, useReducedMotion]);
if (avatarDecoration == null) {
r0 = null;
} else if (avatarDecorationUrl == null) {
r0 = null;
} else {
moduleValue2 = require(477) /* metro dependency 477: PlatformUtils */;
if (moduleValue2.isAndroid()) {
if (shouldAnimate) {
if (cutout != null) {
value = importDefault(7599) /* metro dependency 7599: ClipView */;
value = ((Component) => <Component style={style} cutouts={cutout.nativeCutouts}>{((Component) => <Component url={avatarDecorationUrl} style={sizeStyle} />)(importDefault(7601) /* metro dependency 7601: APNGDecorationNativeComponent */)}</Component>)(value);
r2 = value;
} else {
object = {style: style, pointerEvents: 'none'};
value = importDefault(7601) /* metro dependency 7601: APNGDecorationNativeComponent */;
value = (
<View {...object}>
{((Component) => <Component url={avatarDecorationUrl} style={sizeStyle} />)(value)}
</View>
);
r2 = value;
}
r1 = r2;
} else if (cutout != null) {
value = importDefault(7599) /* metro dependency 7599: ClipView */;
value = ((Component) => <Component style={style} cutouts={cutout.nativeCutouts}>{((Component) => <Component url={avatarDecorationUrl} style={sizeStyle} />)(importDefault(7601) /* metro dependency 7601: APNGDecorationNativeComponent */)}</Component>)(value);
r2 = value;
value = ((Component) => <Component style={style} cutouts={cutout.nativeCutouts}>{((Component) => <Component source={source} style={sizeStyle} />)(importDefault(5475) /* metro dependency 5475: FastImage */)}</Component>)(value);
r1 = value;
} else {
object = {style: style, pointerEvents: 'none'};
value = importDefault(7601) /* metro dependency 7601: APNGDecorationNativeComponent */;
value = <View {...object}>{((Component) => <Component url={avatarDecorationUrl} style={sizeStyle} />)(value)}</View>;
r2 = value;
value = importDefault(5475) /* metro dependency 5475: FastImage */;
value = ((Component) => <Component source={source} style={style} />)(value);
r1 = value;
}
r1 = r2;
} else if (cutout != null) {
value = importDefault(7599) /* metro dependency 7599: ClipView */;
value = ((Component) => <Component style={style} cutouts={cutout.nativeCutouts}>{((Component) => <Component source={source} style={sizeStyle} />)(importDefault(5475) /* metro dependency 5475: FastImage */)}</Component>)(value);
@@ -54,29 +68,23 @@ function CutoutableAvatarDecoration({size, avatarDecoration, decorationStyle, an
value = ((Component) => <Component source={source} style={style} />)(value);
r1 = value;
}
} else if (cutout != null) {
value = importDefault(7599) /* metro dependency 7599: ClipView */;
value = ((Component) => <Component style={style} cutouts={cutout.nativeCutouts}>{((Component) => <Component source={source} style={sizeStyle} />)(importDefault(5475) /* metro dependency 5475: FastImage */)}</Component>)(value);
r1 = value;
} else {
value = importDefault(5475) /* metro dependency 5475: FastImage */;
value = ((Component) => <Component source={source} style={style} />)(value);
r1 = value;
r0 = r1;
}
r0 = r1;
return r0;
function _fun60924() { // fn#60924, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7776:437, offset: 0x017152ee, size: 175 bytes, params: 1, frame: 15
const r1 = animate && !useReducedMotion && avatarDecoration != null;
const getAvatarDecorationURL = AvatarUtilsModule.getAvatarDecorationURL;
const sizeBinding = size;
const value5 = Reflect.apply(getAvatarDecorationURL, AvatarUtilsModule, [{avatarDecoration: avatarDecoration,
canAnimate: r1, size: sizeBinding}]);
return {avatarDecorationUrl: value5, sizeStyle: {width: sizeBinding, height: sizeBinding},
style: [{width: sizeBinding, height: sizeBinding}, decorationStyle], shouldAnimate: r1,
source: {uri: value5 ?? ''}};
}
}
return r0;
}
function _fun60924() { // fn#60924, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7776:437, offset: 0x017152ee, size: 175 bytes, params: 1, frame: 15
const r1 = animate && !useReducedMotion && avatarDecoration != null;
const avatarUtilsModule = require(1423) /* metro dependency 1423: AvatarUtils */;
const getAvatarDecorationURL = avatarUtilsModule.getAvatarDecorationURL;
const sizeBinding = size;
const value5 = Reflect.apply(getAvatarDecorationURL, avatarUtilsModule, [{avatarDecoration: avatarDecoration,
canAnimate: r1, size: sizeBinding}]);
return {avatarDecorationUrl: value5, sizeStyle: {width: sizeBinding, height: sizeBinding},
style: [{width: sizeBinding, height: sizeBinding}, decorationStyle], shouldAnimate: r1,
source: {uri: value5 ?? ''}};
}
global.__d(_fun60921, 7598, [31, 27, 4502, 33, 632, 1423, 477, 7599, 7601, 5475,
2]) /* metro module 7598, dependencies: [31, 27, 4502, 33, 632, 1423, 477, 7599, 7601, 5475, 2] */;
@@ -1,4 +1,7 @@
/* Metro module 14063; source: modules/collectibles/native/hooks/useCardLayout.tsx; dependencies: [10020, 1478, 2] */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as CollectiblesShopCardV2Module from '../CollectiblesShopCardV2.tsx'; /* Metro dependency 10020 */
function _fun106622(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#106622, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14260:6, offset: 0x022e3144, size: 125 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
@@ -7,66 +10,71 @@ function _fun106622(global, require, importDefault, importAll, module, exports,
var COLLECTIBLES_SHOP_CARD_GAP = require(dependencyMap[0]).COLLECTIBLES_SHOP_CARD_GAP;
return a1 + COLLECTIBLES_SHOP_CARD_GAP * (a0 - 1);
};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/hooks/useCardLayout.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/native/hooks/useCardLayout.tsx');
exports.useCardLayout = useCardLayout;
}
function useCardLayout() { // fn#106625, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14260:324, offset: 0x022e31f6, size: 539 bytes, params: 1, frame: 26
var r0;
var r32;
var r15;
var value11;
var value12;
const value2 = 1;
const width = importDefault(dependencyMap[value2])().width;
const r2 = width >= 320 ? 2 : value2;
const value4 = 2;
if (r2 < value4) {
return {columns: r2, cardWidth: undefined, rowWidth: undefined};
function calculateCardWidth_106624(a0, a1, a2) { // fn#106624, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14260:184, offset: 0x01e79370, size: 34 bytes, params: 4, frame: 13
return (a1 - calculateTotalGaps_106623(a0, a2)) / a0;
}
const r6 = width >= 768 ? 4 : value4;
const COLLECTIBLES_SHOP_CARD_WIDTH = (require(10020) /* metro dependency 10020: CollectiblesShopCardV2 */).COLLECTIBLES_SHOP_CARD_WIDTH;
const value6 = COLLECTIBLES_SHOP_CARD_WIDTH * r2;
const COLLECTIBLES_SHOP_CARD_GAP = (require(10020) /* metro dependency 10020: CollectiblesShopCardV2 */).COLLECTIBLES_SHOP_CARD_GAP;
const value7 = width - (value6 + COLLECTIBLES_SHOP_CARD_GAP * (r2 - value2));
const r3 = value7 < value4 * COLLECTIBLES_SHOP_CARD_GAP ? global.Math.max(4,
value7) : value4 * COLLECTIBLES_SHOP_CARD_GAP;
const value10 = calculateCardWidth_106624(r2, width, r3);
const COLLECTIBLES_SHOP_CARD_MAX_WIDTH = (require(10020) /* metro dependency 10020: CollectiblesShopCardV2 */).COLLECTIBLES_SHOP_CARD_MAX_WIDTH;
if (value10 > COLLECTIBLES_SHOP_CARD_MAX_WIDTH) {
if (r2 < r6) {
r0 = r2;
while (true) {
value11 = typeof r0 === 'bigint' ? r0 + 1n : +r0 + 1;
value12 = calculateCardWidth_106624(value11, width, r3);
if (!(value12 > COLLECTIBLES_SHOP_CARD_MAX_WIDTH)) {
function useCardLayout() { // fn#106625, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14260:324, offset: 0x022e31f6, size: 539 bytes, params: 1, frame: 26
var r0;
var r32;
var r15;
var value11;
var value12;
const value2 = 1;
const width = importDefault(dependencyMap[value2])().width;
const r2 = width >= 320 ? 2 : value2;
const value4 = 2;
if (r2 < value4) {
return {columns: r2, cardWidth: undefined, rowWidth: undefined};
}
const r6 = width >= 768 ? 4 : value4;
const COLLECTIBLES_SHOP_CARD_WIDTH = (CollectiblesShopCardV2Module).COLLECTIBLES_SHOP_CARD_WIDTH;
const value6 = COLLECTIBLES_SHOP_CARD_WIDTH * r2;
const COLLECTIBLES_SHOP_CARD_GAP = (CollectiblesShopCardV2Module).COLLECTIBLES_SHOP_CARD_GAP;
const value7 = width - (value6 + COLLECTIBLES_SHOP_CARD_GAP * (r2 - value2));
const r3 = value7 < value4 * COLLECTIBLES_SHOP_CARD_GAP ? global.Math.max(4,
value7) : value4 * COLLECTIBLES_SHOP_CARD_GAP;
const value10 = calculateCardWidth_106624(r2, width, r3);
const COLLECTIBLES_SHOP_CARD_MAX_WIDTH = (CollectiblesShopCardV2Module).COLLECTIBLES_SHOP_CARD_MAX_WIDTH;
if (value10 > COLLECTIBLES_SHOP_CARD_MAX_WIDTH) {
if (r2 < r6) {
r0 = r2;
while (true) {
value11 = typeof r0 === 'bigint' ? r0 + 1n : +r0 + 1;
value12 = calculateCardWidth_106624(value11, width, r3);
if (!(value12 > COLLECTIBLES_SHOP_CARD_MAX_WIDTH)) {
r32 = value11;
r15 = value12;
break;
}
if (value11 < r6) {
r0 = value11;
continue;
}
r32 = value11;
r15 = value12;
break;
}
if (value11 < r6) {
r0 = value11;
continue;
}
r32 = value11;
r15 = value12;
break;
} else {
r32 = r2;
r15 = value10;
}
} else {
r32 = r2;
r15 = value10;
}
} else {
r32 = r2;
r15 = value10;
const Math = global.Math;
const min = Math.min;
const Math2 = global.Math;
const value14 = Reflect.apply(min, Math, [Math2.max(r15, COLLECTIBLES_SHOP_CARD_WIDTH),
COLLECTIBLES_SHOP_CARD_MAX_WIDTH]);
return value14 * r32 + calculateTotalGaps_106623(r32, r3) > width && r32 > value2 ? {columns: value2,
cardWidth: undefined, rowWidth: undefined} : {columns: r32, cardWidth: value14,
rowWidth: value14 * r32 + COLLECTIBLES_SHOP_CARD_GAP * (r32 - value2) + r3};
}
const Math = global.Math;
const min = Math.min;
const Math2 = global.Math;
const value14 = Reflect.apply(min, Math, [Math2.max(r15, COLLECTIBLES_SHOP_CARD_WIDTH),
COLLECTIBLES_SHOP_CARD_MAX_WIDTH]);
return value14 * r32 + calculateTotalGaps_106623(r32, r3) > width && r32 > value2 ? {columns: value2,
cardWidth: undefined, rowWidth: undefined} : {columns: r32, cardWidth: value14,
rowWidth: value14 * r32 + COLLECTIBLES_SHOP_CARD_GAP * (r32 - value2) + r3};
}
global.__d(_fun106622, 14063, [10020, 1478, 2]) /* metro module 14063, dependencies: [10020, 1478, 2] */;
@@ -1,74 +1,81 @@
/* Metro module 14049; source: modules/collectibles/native/hooks/useFilteredAndSortedProducts.tsx; dependencies: [31, 1878, 663, 14050, 14051, 14052, 566, 3802, 5133, 2] */
import UserStore from '../../../../stores/UserStore.tsx'; /* Metro dependency 1878 */
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 CollectiblesShopConstantsModule from '../../CollectiblesShopConstants.tsx'; /* Metro dependency 663 */
import * as CollectiblesProductUtilsModule from '../../utils/CollectiblesProductUtils.tsx'; /* Metro dependency 5133 */
import * as UseBadBundleFilterModule from '../../hooks/useBadBundleFilter.tsx'; /* Metro dependency 14050 */
import * as UseAndroidUnsyncedFilterModule from '../useAndroidUnsyncedFilter.tsx'; /* Metro dependency 14051 */
function _fun106540(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#106540, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14246:6, offset: 0x022dfef2, size: 170 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 userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const env0_5 = (require(663) /* metro dependency 663: CollectiblesShopConstants */).CollectiblesMobileShopScreen;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/hooks/useFilteredAndSortedProducts.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/native/hooks/useFilteredAndSortedProducts.tsx');
exports.useFilteredAndSortedProducts = useFilteredAndSortedProducts;
}
function usePriceFilter(a0) { // fn#106541, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14246:170, offset: 0x022dff9c, size: 145 bytes, params: 2, frame: 18
const ORBS = CollectiblesMobileShopScreen.ORBS;
const value2 = a0 === ORBS;
const currentUser = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() {
return UserStore.getCurrentUser();
});
return ReactModule.useCallback(function(a0) {
var r0;
var value = a0;
if (result) {
value = value.filter(_fun106544);
r0 = value;
} else {
r0 = value;
}
return r0;
}, [value2, (importDefault(3802) /* metro dependency 3802: PremiumUtils */).canUseShopDiscounts(currentUser)]);
function _fun106543(a0) { // fn#106543, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14246:305, offset: 0x022e002d, size: 37 bytes, params: 2, frame: 12
var r0;
let value = a0;
if (result) {
value = value.filter(_fun106544);
r0 = value;
} else {
r0 = value;
}
return r0;
function _fun106544(a0) { // fn#106544, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14246:320, offset: 0x022e0052, size: 66 bytes, params: 2, frame: 12
let value = environment.__proto__.__proto__;
const getProductOrbPrice = (CollectiblesProductUtilsModule).getProductOrbPrice;
value = Reflect.apply(getProductOrbPrice, value, [{product: a0, hasShopDiscount: env1_1}]);
return value != null;
}
function usePriceFilter(a0) { // fn#106541, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14246:170, offset: 0x022dff9c, size: 145 bytes, params: 2, frame: 18
const ORBS = CollectiblesMobileShopScreen.ORBS;
const value2 = a0 === ORBS;
const currentUser = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() {
return UserStore.getCurrentUser();
});
return env0_3.useCallback(function(a0) {
var r0;
var value = a0;
if (result) {
value = value.filter(_fun106544);
r0 = value;
} else {
r0 = value;
}
return r0;
}, [value2, (importDefault(3802) /* metro dependency 3802: PremiumUtils */).canUseShopDiscounts(currentUser)]);
}
function useFilteredAndSortedProducts({products, maxProducts, bypassAndroidUnsyncedFilter, screen}) { // fn#106545, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14246:531, offset: 0x022e0094, size: 224 bytes, params: 2, frame: 22
const value2 = (require(14050) /* metro dependency 14050: useBadBundleFilter */).useBadBundleFilter();
const env0_3 = value2;
const value3 = (require(14051) /* metro dependency 14051: useAndroidUnsyncedFilter */).useAndroidUnsyncedFilter();
const value4 = usePriceFilter(screen);
const binding = env0_3;
let value = binding.useMemo(_fun106546, [value2, value3, products, bypassAndroidUnsyncedFilter, value4]);
value = (require(14052) /* metro dependency 14052: usePurchasedProductsSort */).usePurchasedProductsSort(value);
return binding.useMemo(_fun106549, [value, maxProducts]);
}
function _fun106543(a0) { // fn#106543, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14246:305, offset: 0x022e002d, size: 37 bytes, params: 2, frame: 12
var r0;
let value = a0;
if (result) {
value = value.filter(_fun106544);
r0 = value;
} else {
r0 = value;
}
return r0;
}
function _fun106546() { // fn#106546, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14246:706, offset: 0x022e0174, size: 74 bytes, params: 1, frame: 13
const items2 = [bypassAndroidUnsyncedFilter ? function(a0) {
return a0;
} : env0_4, env0_3, env0_5];
return items2.reduce(function(a0, a1) {
return a1(a0);
}, products);
}
function useFilteredAndSortedProducts({products, maxProducts, bypassAndroidUnsyncedFilter, screen}) { // fn#106545, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14246:531, offset: 0x022e0094, size: 224 bytes, params: 2, frame: 22
const value2 = (UseBadBundleFilterModule).useBadBundleFilter();
const env0_3 = value2;
const value3 = (UseAndroidUnsyncedFilterModule).useAndroidUnsyncedFilter();
const value4 = usePriceFilter(screen);
const binding = env0_3;
let value = binding.useMemo(_fun106546, [value2, value3, products, bypassAndroidUnsyncedFilter, value4]);
value = (require(14052) /* metro dependency 14052: usePurchasedProductsSort */).usePurchasedProductsSort(value);
return binding.useMemo(_fun106549, [value, maxProducts]);
function _fun106546() { // fn#106546, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14246:706, offset: 0x022e0174, size: 74 bytes, params: 1, frame: 13
const items2 = [bypassAndroidUnsyncedFilter ? function(a0) {
return a0;
} : env0_4, env0_3, CollectiblesShopConstantsModule.CollectiblesMobileShopScreen];
return items2.reduce(function(a0, a1) {
return a1(a0);
}, products);
}
function _fun106549() { // fn#106549, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14246:836, offset: 0x022e01be, size: 42 bytes, params: 1, frame: 14
return maxProducts != null ? env0_6.slice(0, maxProducts) : env0_6;
}
function _fun106549() { // fn#106549, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14246:836, offset: 0x022e01be, size: 42 bytes, params: 1, frame: 14
return maxProducts != null ? env0_6.slice(0, maxProducts) : env0_6;
}
}
function _fun106544(a0) { // fn#106544, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14246:320, offset: 0x022e0052, size: 66 bytes, params: 2, frame: 12
let value = environment.__proto__.__proto__;
const getProductOrbPrice = (require(5133) /* metro dependency 5133: CollectiblesProductUtils */).getProductOrbPrice;
value = Reflect.apply(getProductOrbPrice, value, [{product: a0, hasShopDiscount: env1_1}]);
return value != null;
}
global.__d(_fun106540, 14049, [31, 1878, 663, 14050, 14051, 14052, 566, 3802, 5133,
2]) /* metro module 14049, dependencies: [31, 1878, 663, 14050, 14051, 14052, 566, 3802, 5133, 2] */;
@@ -1,34 +1,37 @@
/* Metro module 10147; source: modules/collectibles/native/hooks/useMobileCollectiblesPurchaseSKU.android.tsx; dependencies: [1878, 661, 566, 3802, 10148, 2] */
import UserStore from '../../../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../../../../Constants.tsx'; /* Metro dependency 661 */
function _fun79096(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#79096, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10333:6, offset: 0x01e44d30, size: 140 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const env0_4 = (require(661) /* metro dependency 661: Constants */).PriceSetAssignmentPurchaseTypes;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/hooks/useMobileCollectiblesPurchaseSKU.android.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/native/hooks/useMobileCollectiblesPurchaseSKU.android.tsx');
exports.default = _default_79097;
function _default_79097(a0) { // fn#79097, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10333:157, offset: 0x01e44dbc, size: 253 bytes, params: 2, frame: 20
const product = a0.product;
let value = null;
const value2 = Object.create(value);
value2.product = 0;
const value3 = copyDataProperties({}, a0, value2, undefined);
const currentUser = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() {
return UserStore.getCurrentUser();
});
const r7 = (importDefault(3802) /* metro dependency 3802: PremiumUtils */).canUseShopDiscounts(currentUser) ? PriceSetAssignmentPurchaseTypes.MOBILE_PREMIUM_TIER_2 : PriceSetAssignmentPurchaseTypes.MOBILE;
const googleSkuIds = product.googleSkuIds;
const r6 = value != googleSkuIds ? googleSkuIds : {};
const r4 = value == currentUser ? value : value != r6[r7] ? r6[r7] : value;
value = importDefault(10148) /* metro dependency 10148: useMobilePurchaseSKUAndroid */;
object = {};
copyDataProperties(object, value3, value2);
object['skuId'] = product.skuId;
object['platformSkuId'] = r4;
object['isFreeForStaffSelfPurchase'] = true;
return value(object);
}
}
function _default_79097(a0) { // fn#79097, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10333:157, offset: 0x01e44dbc, size: 253 bytes, params: 2, frame: 20
var object2;
const product = a0.product;
let value = null;
const value2 = Object.create(value);
value2.product = 0;
const value3 = copyDataProperties({}, a0, value2, undefined);
const currentUser = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() {
return UserStore.getCurrentUser();
});
const r7 = (importDefault(3802) /* metro dependency 3802: PremiumUtils */).canUseShopDiscounts(currentUser) ? PriceSetAssignmentPurchaseTypes.MOBILE_PREMIUM_TIER_2 : PriceSetAssignmentPurchaseTypes.MOBILE;
const googleSkuIds = product.googleSkuIds;
const r6 = value != googleSkuIds ? googleSkuIds : {};
const r4 = value == currentUser ? value : value != r6[r7] ? r6[r7] : value;
value = importDefault(10148) /* metro dependency 10148: useMobilePurchaseSKUAndroid */;
object2 = {};
copyDataProperties(object2, value3, value2);
object2['skuId'] = product.skuId;
object2['platformSkuId'] = r4;
object2['isFreeForStaffSelfPurchase'] = true;
return value(object2);
}
global.__d(_fun79096, 10147, [1878, 661, 566, 3802, 10148,
2]) /* metro module 10147, dependencies: [1878, 661, 566, 3802, 10148, 2] */;
@@ -1,30 +1,33 @@
/* Metro module 14047; source: modules/collectibles/native/hooks/useScrollToInitialIndexOnce.tsx; dependencies: [31, 2] */
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 */
function _fun106528(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#106528, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14244:6, offset: 0x022df4ca, size: 115 bytes, params: 8, frame: 17
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_0 = importAll(31) /* metro dependency 31 */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/hooks/useScrollToInitialIndexOnce.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/native/hooks/useScrollToInitialIndexOnce.tsx');
exports.INITIAL_SCROLL_DELAY_MS = 100;
exports.useScrollToInitialIndexOnce = useScrollToInitialIndexOnce;
}
function useScrollToInitialIndexOnce({initialScrollIndex, shouldScroll, flashListRef, afterMs}) { // fn#106529, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14244:265, offset: 0x022df53d, size: 121 bytes, params: 2, frame: 18
const env0_0 = initialScrollIndex;
afterMs = afterMs === undefined ? 100 : afterMs;
const binding = env0_0;
const env0_4 = binding.useRef(false);
binding.useEffect(_fun106530, [shouldScroll, initialScrollIndex, afterMs, flashListRef]);
}
function _fun106530() { // fn#106530, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14244:402, offset: 0x022df5b6, size: 83 bytes, params: 1, frame: 13
if (initialScrollIndex != null && shouldScroll && !env0_4.current) {
env0_4.current = true;
global.setTimeout(function() {
var current = flashListRef.current;
if (current != null) {
current.scrollToIndex({animated: true, index: initialScrollIndex});
function useScrollToInitialIndexOnce({initialScrollIndex, shouldScroll, flashListRef, afterMs}) { // fn#106529, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14244:265, offset: 0x022df53d, size: 121 bytes, params: 2, frame: 18
const initialScrollIndex2 = initialScrollIndex;
afterMs = afterMs === undefined ? 100 : afterMs;
const binding = initialScrollIndex2;
const env0_4 = binding.useRef(false);
binding.useEffect(_fun106530, [shouldScroll, initialScrollIndex, afterMs, flashListRef]);
function _fun106530() { // fn#106530, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14244:402, offset: 0x022df5b6, size: 83 bytes, params: 1, frame: 13
if (initialScrollIndex != null && shouldScroll && !env0_4.current) {
env0_4.current = true;
global.setTimeout(function() {
var current = flashListRef.current;
if (current != null) {
current.scrollToIndex({animated: true, index: initialScrollIndex});
}
}, afterMs);
}
}, afterMs);
}
}
}
global.__d(_fun106528, 14047, [31, 2]) /* metro module 14047, dependencies: [31, 2] */;
@@ -1,4 +1,17 @@
/* Metro module 10022; source: modules/collectibles/native/hooks/useTrackShopCardImpression.tsx; dependencies: [31, 661, 10023, 6771, 1478, 7594, 3802, 5134, 683, 8742, 480, 5133, 2] */
import AnalyticsUtils from '../../../../utils/AnalyticsUtils.tsx'; /* Metro dependency 683 */
import UseWindowDimensionsNative from '../../../screen/useWindowDimensions.native.tsx'; /* Metro dependency 1478 */
import PremiumUtils from '../../../../utils/PremiumUtils.tsx'; /* Metro dependency 3802 */
import UseAnalyticsLocations from '../../../app_analytics/useAnalyticsLocations.tsx'; /* Metro dependency 6771 */
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 AnalyticsUtilsModule from '../../../../external/discord_common/js/packages/analytics-utils/AnalyticsUtils.tsx'; /* Metro dependency 480 */
import * as ConstantsModule from '../../../../Constants.tsx'; /* Metro dependency 661 */
import * as CollectiblesUtilsModule from '../../CollectiblesUtils.tsx'; /* Metro dependency 5134 */
import * as UseCurrentUserModule from '../../hooks/useCurrentUser.tsx'; /* Metro dependency 7594 */
import * as UseTrackImpressionModule from '../../../app_analytics/useTrackImpression.tsx'; /* Metro dependency 8742 */
import * as CollectiblesAnalyticsContextModule from '../../CollectiblesAnalyticsContext.tsx'; /* Metro dependency 10023 */
function _fun78280(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#78280, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10208:6, offset: 0x01e23fcc, size: 165 bytes, params: 8, frame: 18
const env0_0 = require;
const trackOnConsecutiveVisibility = function(a0, a1, a2, a3) {
@@ -14,10 +27,145 @@ function _fun78280(global, require, importDefault, importAll, module, exports, d
};
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/collectibles/native/hooks/useTrackShopCardImpression.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/native/hooks/useTrackShopCardImpression.tsx');
exports.useTrackShopCardImpression = useTrackShopCardImpression;
function useTrackShopCardImpression(a0, a1, a2) { // fn#78283, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10208:540, offset: 0x01e24164, size: 622 bytes, params: 4, frame: 27
const env0_0 = a0;
const env0_1 = a1;
const env0_2 = a2;
const value2 = undefined;
const value3 = (CollectiblesAnalyticsContextModule).useCollectiblesAnalyticsContext();
const env0_3 = value3;
const analyticsLocations = (UseAnalyticsLocations)().analyticsLocations;
const {width, height} = (UseWindowDimensionsNative)();
const value5 = (UseCurrentUserModule).useCurrentUser();
const canUseCollectibles2 = (PremiumUtils).canUseCollectibles(value5);
const shopDiscountSource = (CollectiblesUtilsModule).getShopDiscountSource(value5);
const binding = env0_3;
const value7 = binding.useRef(null);
const env0_10 = binding.useRef(null);
const env0_11 = binding.useRef({windowWidth: width, windowHeight: height});
const env0_12 = binding.useRef(false);
const env0_13 = binding.useRef(false);
const env0_14 = binding.useRef(false);
const env0_15 = binding.useRef(false);
binding.useEffect(_fun78284, [width, height]);
env0_3.useEffect(_fun78287, [a2, binding.useCallback(_fun78285, [canUseCollectibles2,
value3 == null ? value2 : value3.sessionId, value3 == null ? value2 : value3.tilePosition,
value3 == null ? value2 : value3.pageCategory, value3 == null ? value2 : value3.pageSection,
value3 == null ? value2 : value3.categoryPosition, a0]), env0_3.useCallback(_fun78286, [a0, a1,
value3 == null ? value2 : value3.cardId, value3 == null ? value2 : value3.sessionId,
value3 == null ? value2 : value3.tilePosition, analyticsLocations, shopDiscountSource])]);
return value7;
function _fun78284() { // fn#78284, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10208:939, offset: 0x01e243d2, size: 37 bytes, params: 1, frame: 4
env0_11.current = {windowWidth: width, windowHeight: height};
}
function _fun78285() { // fn#78285, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10208:1015, offset: 0x01e243f7, size: 390 bytes, params: 1, frame: 21
var r9;
var r5;
var value3;
var moduleValue;
var value6;
var moduleValue2;
const value2 = null;
if (value2 != env0_0) {
value3 = environment.__proto__;
moduleValue = require(5134) /* metro dependency 5134: CollectiblesUtils */;
r9 = moduleValue.getPriceForCollectiblesProduct(env0_0, env0_7, true);
} else {
r9 = value2;
}
const value5 = undefined;
if (value2 != env0_0) {
value6 = environment.__proto__;
moduleValue2 = require(5134) /* metro dependency 5134: CollectiblesUtils */;
r5 = moduleValue2.getStrikeThroughPriceAmountForCollectiblesProduct(env0_0, env0_7, true);
} else {
r5 = value5;
}
const defaultImport = AnalyticsUtils;
const track = defaultImport.track;
const COLLECTIBLES_TILE_IMPRESSION = AnalyticEvents.COLLECTIBLES_TILE_IMPRESSION;
const object = {};
object.collectibles_shop_session_id = value2 == env0_3 ? value5 : env0_3.sessionId;
object.sku_id = env0_0.skuId;
object.display_price = value2 == r9 ? value5 : r9.amount;
object.display_price_currency = value2 == r9 ? value5 : r9.currency.toString();
object.display_price_strikethrough = r5;
object.position = value2 == env0_3 ? value5 : env0_3.tilePosition;
object.page_category = value2 == env0_3 ? value5 : env0_3.pageCategory;
object.page_section = value2 == env0_3 ? value5 : env0_3.pageSection;
object.category_position = value2 == env0_3 ? value5 : env0_3.categoryPosition;
object.type = 'product';
Reflect.apply(track, defaultImport, [COLLECTIBLES_TILE_IMPRESSION, object]);
return value5;
}
function _fun78286() { // fn#78286, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10208:1784, offset: 0x01e2457d, size: 290 bytes, params: 1, frame: 21
const value = environment.__proto__;
const value2 = undefined;
const trackImpression = UseTrackImpressionModule.trackImpression;
const object = {};
const ImpressionNames = (AnalyticsUtilsModule).ImpressionNames;
const SHOP_CARD = ImpressionNames.SHOP_CARD;
object.name = SHOP_CARD;
const ImpressionTypes = (AnalyticsUtilsModule).ImpressionTypes;
const VIEW = ImpressionTypes.VIEW;
object.type = VIEW;
const object2 = {};
object2.sku_id = require.skuId;
object2.card_id = env0_3 == null ? value2 : env0_3.cardId;
object2.shop_session_id = env0_3 == null ? value2 : env0_3.sessionId;
object2.position_in_section = env0_3 == null ? value2 : env0_3.tilePosition;
object2.product_sku_ids = (require(5133) /* metro dependency 5133: CollectiblesProductUtils */).getProductSkuIds(env0_0);
object2.location_stack = analyticsLocations;
object2.discount_source = (require(5134) /* metro dependency 5134: CollectiblesUtils */).getAnalyticsShopDiscountSource(env0_8);
object.properties = object2;
Reflect.apply(trackImpression, UseTrackImpressionModule, [object, false, true]);
return value2;
}
function _fun78287() { // fn#78287, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10208:2284, offset: 0x01e2469f, size: 64 bytes, params: 1, frame: 15
if (importDefault) {
env0_10.current = global.setInterval(_fun78288, 1000);
return _fun78290;
}
function _fun78288() { // fn#78288, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10208:2324, offset: 0x01e246df, size: 51 bytes, params: 1, frame: 11
if (env1_9.current != null) {
env1_9.current.measure(_fun78289);
}
function _fun78289(a0, a1, a2, a3, a4, a5) { // fn#78289, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10208:2365, offset: 0x01e24712, size: 147 bytes, params: 7, frame: 26
const {windowWidth, windowHeight} = env2_11.current;
const isVisibleAtThresholdBinding = isVisibleAtThreshold;
const isVisibleAtThreshold2 = isVisibleAtThresholdBinding(a4, a5, a2, a3, windowWidth, windowHeight, 0);
const isVisibleAtThreshold3 = isVisibleAtThresholdBinding(a4, a5, a2, a3, windowWidth, windowHeight, 0.5);
const trackOnConsecutiveVisibilityBinding = trackOnConsecutiveVisibility;
trackOnConsecutiveVisibilityBinding(isVisibleAtThreshold2, env2_12, env2_13, env2_16);
trackOnConsecutiveVisibilityBinding(isVisibleAtThreshold3, env2_14, env2_15, env2_17);
}
}
function _fun78290() { // fn#78290, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10208:2593, offset: 0x01e247a5, size: 94 bytes, params: 1, frame: 14
var clearInterval;
var binding;
if (env1_10.current !== null) {
clearInterval = global.clearInterval;
binding = env1_10;
clearInterval(binding.current);
binding.current = null;
}
env1_12.current = false;
env1_13.current = false;
env1_14.current = false;
env1_15.current = false;
}
}
}
}
function isVisibleAtThreshold(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#78282, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10208:247, offset: 0x01e240b5, size: 175 bytes, params: 8, frame: 21
@@ -37,141 +185,5 @@ function isVisibleAtThreshold(global, require, importDefault, importAll, module,
return value3 > 0 && value > 0 && value / value3 >= dependencyMap;
}
function useTrackShopCardImpression(a0, a1, a2) { // fn#78283, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10208:540, offset: 0x01e24164, size: 622 bytes, params: 4, frame: 27
const env0_0 = a0;
const env0_1 = a1;
const env0_2 = a2;
const value2 = undefined;
const value3 = (require(10023) /* metro dependency 10023: CollectiblesAnalyticsContext */).useCollectiblesAnalyticsContext();
const env0_3 = value3;
const analyticsLocations = (importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */)().analyticsLocations;
const {width, height} = (importDefault(1478) /* metro dependency 1478: useWindowDimensionsNative */)();
const value5 = (require(7594) /* metro dependency 7594: useCurrentUser */).useCurrentUser();
const canUseCollectibles2 = (importDefault(3802) /* metro dependency 3802: PremiumUtils */).canUseCollectibles(value5);
const shopDiscountSource = (require(5134) /* metro dependency 5134: CollectiblesUtils */).getShopDiscountSource(value5);
const binding = env0_3;
const value7 = binding.useRef(null);
const env0_10 = binding.useRef(null);
const env0_11 = binding.useRef({windowWidth: width, windowHeight: height});
const env0_12 = binding.useRef(false);
const env0_13 = binding.useRef(false);
const env0_14 = binding.useRef(false);
const env0_15 = binding.useRef(false);
binding.useEffect(_fun78284, [width, height]);
env0_3.useEffect(_fun78287, [a2, binding.useCallback(_fun78285, [canUseCollectibles2,
value3 == null ? value2 : value3.sessionId, value3 == null ? value2 : value3.tilePosition,
value3 == null ? value2 : value3.pageCategory, value3 == null ? value2 : value3.pageSection,
value3 == null ? value2 : value3.categoryPosition, a0]), env0_3.useCallback(_fun78286, [a0, a1,
value3 == null ? value2 : value3.cardId, value3 == null ? value2 : value3.sessionId,
value3 == null ? value2 : value3.tilePosition, analyticsLocations, shopDiscountSource])]);
return value7;
}
function _fun78284() { // fn#78284, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10208:939, offset: 0x01e243d2, size: 37 bytes, params: 1, frame: 4
env0_11.current = {windowWidth: width, windowHeight: height};
}
function _fun78285() { // fn#78285, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10208:1015, offset: 0x01e243f7, size: 390 bytes, params: 1, frame: 21
var r9;
var r5;
var value3;
var moduleValue;
var value6;
var moduleValue2;
const value2 = null;
if (value2 != env0_0) {
value3 = environment.__proto__;
moduleValue = require(5134) /* metro dependency 5134: CollectiblesUtils */;
r9 = moduleValue.getPriceForCollectiblesProduct(env0_0, env0_7, true);
} else {
r9 = value2;
}
const value5 = undefined;
if (value2 != env0_0) {
value6 = environment.__proto__;
moduleValue2 = require(5134) /* metro dependency 5134: CollectiblesUtils */;
r5 = moduleValue2.getStrikeThroughPriceAmountForCollectiblesProduct(env0_0, env0_7, true);
} else {
r5 = value5;
}
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
const track = defaultImport.track;
const COLLECTIBLES_TILE_IMPRESSION = AnalyticEvents.COLLECTIBLES_TILE_IMPRESSION;
const object2 = {};
object2.collectibles_shop_session_id = value2 == env0_3 ? value5 : env0_3.sessionId;
object2.sku_id = env0_0.skuId;
object2.display_price = value2 == r9 ? value5 : r9.amount;
object2.display_price_currency = value2 == r9 ? value5 : r9.currency.toString();
object2.display_price_strikethrough = r5;
object2.position = value2 == env0_3 ? value5 : env0_3.tilePosition;
object2.page_category = value2 == env0_3 ? value5 : env0_3.pageCategory;
object2.page_section = value2 == env0_3 ? value5 : env0_3.pageSection;
object2.category_position = value2 == env0_3 ? value5 : env0_3.categoryPosition;
object2.type = 'product';
Reflect.apply(track, defaultImport, [COLLECTIBLES_TILE_IMPRESSION, object2]);
return value5;
}
function _fun78286() { // fn#78286, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10208:1784, offset: 0x01e2457d, size: 290 bytes, params: 1, frame: 21
const value = environment.__proto__;
const value2 = undefined;
const useTrackImpressionModule = require(8742) /* metro dependency 8742: useTrackImpression */;
const trackImpression = useTrackImpressionModule.trackImpression;
const object3 = {};
const ImpressionNames = (require(480) /* metro dependency 480: AnalyticsUtils */).ImpressionNames;
const SHOP_CARD = ImpressionNames.SHOP_CARD;
object3.name = SHOP_CARD;
const ImpressionTypes = (require(480) /* metro dependency 480: AnalyticsUtils */).ImpressionTypes;
const VIEW = ImpressionTypes.VIEW;
object3.type = VIEW;
const object4 = {};
object4.sku_id = require.skuId;
object4.card_id = env0_3 == null ? value2 : env0_3.cardId;
object4.shop_session_id = env0_3 == null ? value2 : env0_3.sessionId;
object4.position_in_section = env0_3 == null ? value2 : env0_3.tilePosition;
object4.product_sku_ids = (require(5133) /* metro dependency 5133: CollectiblesProductUtils */).getProductSkuIds(env0_0);
object4.location_stack = analyticsLocations;
object4.discount_source = (require(5134) /* metro dependency 5134: CollectiblesUtils */).getAnalyticsShopDiscountSource(env0_8);
object3.properties = object4;
Reflect.apply(trackImpression, useTrackImpressionModule, [object3, false, true]);
return value2;
}
function _fun78287() { // fn#78287, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10208:2284, offset: 0x01e2469f, size: 64 bytes, params: 1, frame: 15
if (importDefault) {
env0_10.current = global.setInterval(_fun78288, 1000);
return _fun78290;
}
}
function _fun78288() { // fn#78288, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10208:2324, offset: 0x01e246df, size: 51 bytes, params: 1, frame: 11
if (env1_9.current != null) {
env1_9.current.measure(_fun78289);
}
}
function _fun78290() { // fn#78290, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10208:2593, offset: 0x01e247a5, size: 94 bytes, params: 1, frame: 14
var clearInterval;
var binding;
if (env1_10.current !== null) {
clearInterval = global.clearInterval;
binding = env1_10;
clearInterval(binding.current);
binding.current = null;
}
env1_12.current = false;
env1_13.current = false;
env1_14.current = false;
env1_15.current = false;
}
function _fun78289(a0, a1, a2, a3, a4, a5) { // fn#78289, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10208:2365, offset: 0x01e24712, size: 147 bytes, params: 7, frame: 26
const {windowWidth, windowHeight} = env2_11.current;
const isVisibleAtThresholdBinding = isVisibleAtThreshold;
const isVisibleAtThreshold2 = isVisibleAtThresholdBinding(a4, a5, a2, a3, windowWidth, windowHeight, 0);
const isVisibleAtThreshold3 = isVisibleAtThresholdBinding(a4, a5, a2, a3, windowWidth, windowHeight, 0.5);
const trackOnConsecutiveVisibilityBinding = trackOnConsecutiveVisibility;
trackOnConsecutiveVisibilityBinding(isVisibleAtThreshold2, env2_12, env2_13, env2_16);
trackOnConsecutiveVisibilityBinding(isVisibleAtThreshold3, env2_14, env2_15, env2_17);
}
global.__d(_fun78280, 10022, [31, 661, 10023, 6771, 1478, 7594, 3802, 5134, 683, 8742, 480, 5133,
2]) /* metro module 10022, dependencies: [31, 661, 10023, 6771, 1478, 7594, 3802, 5134, 683, 8742, 480, 5133, 2] */;
@@ -1,27 +1,30 @@
/* Metro module 10107; source: modules/collectibles/native/hooks/useVirtualCurrencyData.tsx; dependencies: [31, 5133, 10069, 2] */
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 CollectiblesProductUtilsModule from '../../utils/CollectiblesProductUtils.tsx'; /* Metro dependency 5133 */
import * as HooksModule from '../../../virtual_currency/hooks/index.tsx'; /* Metro dependency 10069 */
function _fun78902(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#78902, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10293:6, offset: 0x01e3b3ab, size: 114 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 */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/hooks/useVirtualCurrencyData.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/native/hooks/useVirtualCurrencyData.tsx');
exports.useVirtualCurrencyData = useVirtualCurrencyData;
function useVirtualCurrencyData(a0, a1) { // fn#78903, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10293:225, offset: 0x01e3b41d, size: 145 bytes, params: 3, frame: 18
const productOrbPrice = (CollectiblesProductUtilsModule).getProductOrbPrice({product: a0,
hasShopDiscount: a1});
const useFetchVirtualCurrencyBalance = HooksModule.useFetchVirtualCurrencyBalance;
const balance = Reflect.apply(useFetchVirtualCurrencyBalance, HooksModule, []).balance;
const useMemo = ReactModule.useMemo;
return {price: productOrbPrice, balance: balance, canAfford: Reflect.apply(useMemo, ReactModule, [_fun78904,
[productOrbPrice, balance]])};
function _fun78904() { // fn#78904, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10293:361, offset: 0x01e3b4ae, size: 51 bytes, params: 1, frame: 4
const value2 = null;
return value2 == env0_0 || value2 == balance ? value2 : env0_0.amount <= balance;
}
}
}
function useVirtualCurrencyData(a0, a1) { // fn#78903, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10293:225, offset: 0x01e3b41d, size: 145 bytes, params: 3, frame: 18
const productOrbPrice = (require(5133) /* metro dependency 5133: CollectiblesProductUtils */).getProductOrbPrice({product: a0,
hasShopDiscount: a1});
const hooksModule = require(10069) /* metro dependency 10069: hooks */;
const useFetchVirtualCurrencyBalance = hooksModule.useFetchVirtualCurrencyBalance;
const balance = Reflect.apply(useFetchVirtualCurrencyBalance, hooksModule, []).balance;
const binding = env0_2;
const useMemo = binding.useMemo;
return {price: productOrbPrice, balance: balance, canAfford: Reflect.apply(useMemo, binding, [_fun78904,
[productOrbPrice, balance]])};
}
function _fun78904() { // fn#78904, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10293:361, offset: 0x01e3b4ae, size: 51 bytes, params: 1, frame: 4
const value2 = null;
return value2 == env0_0 || value2 == balance ? value2 : env0_0.amount <= balance;
}
global.__d(_fun78902, 10107, [31, 5133, 10069, 2]) /* metro module 10107, dependencies: [31, 5133, 10069, 2] */;
@@ -1,19 +1,22 @@
/* Metro module 7631; source: modules/collectibles/native/openGiftModal.tsx; dependencies: [5080, 7632, 1962, 2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun61133(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#61133, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7809:6, offset: 0x0171b43c, size: 101 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/collectibles/native/openGiftModal.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/native/openGiftModal.tsx');
exports.openShopGiftModal = openShopGiftModal;
function openShopGiftModal({navigationParams, skuId, analyticsLocations, lockedRecipientUser, onGiftModalDismiss, giftingOrigin}) { // fn#61134, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7809:191, offset: 0x0171b4a1, size: 146 bytes, params: 2, frame: 23
const defaultImport = importDefault(dependencyMap[0]);
const pushLazy = defaultImport.pushLazy;
let value = require(dependencyMap[2]);
value = value(dependencyMap[1], dependencyMap.paths);
Reflect.apply(pushLazy, defaultImport, [value, {skuId: skuId, analyticsLocations: analyticsLocations,
lockedRecipientUser: lockedRecipientUser, onGiftModalDismiss: onGiftModalDismiss, giftingOrigin: giftingOrigin},
'Shop Gift Modal', navigationParams]);
}
}
function openShopGiftModal({navigationParams, skuId, analyticsLocations, lockedRecipientUser, onGiftModalDismiss, giftingOrigin}) { // fn#61134, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7809:191, offset: 0x0171b4a1, size: 146 bytes, params: 2, frame: 23
const defaultImport = importDefault(dependencyMap[0]);
const pushLazy = defaultImport.pushLazy;
let value = require(dependencyMap[2]);
value = value(dependencyMap[1], dependencyMap.paths);
Reflect.apply(pushLazy, defaultImport, [value, {skuId: skuId, analyticsLocations: analyticsLocations,
lockedRecipientUser: lockedRecipientUser, onGiftModalDismiss: onGiftModalDismiss, giftingOrigin: giftingOrigin},
'Shop Gift Modal', navigationParams]);
}
global.__d(_fun61133, 7631, [5080, 7632, 1962, 2]) /* metro module 7631, dependencies: [5080, 7632, 1962, 2] */;
@@ -1,21 +1,25 @@
/* Metro module 10085; source: modules/collectibles/native/openProductDetailsActionSheet.tsx; dependencies: [5133, 5120, 4080, 10086, 1962, 2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun78788(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#78788, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10271:6, offset: 0x01e345fd, size: 115 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/collectibles/native/openProductDetailsActionSheet.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/native/openProductDetailsActionSheet.tsx');
exports.PRODUCT_DETAILS_ACTION_SHEET_KEY = 'Shop Product Preview';
exports.openProductDetailsActionSheet = openProductDetailsActionSheet;
function openProductDetailsActionSheet({product, initialVariantIndex, analyticsLocations, shopAnalyticsContext}, a1) { // fn#78789, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10271:285, offset: 0x01e34670, size: 247 bytes, params: 3, frame: 22
initialVariantIndex = initialVariantIndex === undefined ? 0 : initialVariantIndex;
const isVariantProduct = require(dependencyMap[0]).getIsVariantProduct(product);
const r7 = isVariantProduct && initialVariantIndex < product.variants.length ? initialVariantIndex : 0;
require(dependencyMap[1]).productDetailsOpened(isVariantProduct ? product.variants[r7].skuId : product.skuId);
const defaultImport = importDefault(dependencyMap[2]);
defaultImport.openLazy(require(dependencyMap[4])(dependencyMap[3], dependencyMap.paths), 'Shop Product Preview',
{product: product, initialVariantIndex: r7, analyticsLocations: analyticsLocations,
shopAnalyticsContext: shopAnalyticsContext}, a1);
}
}
function openProductDetailsActionSheet({product, initialVariantIndex, analyticsLocations, shopAnalyticsContext}, a1) { // fn#78789, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10271:285, offset: 0x01e34670, size: 247 bytes, params: 3, frame: 22
initialVariantIndex = initialVariantIndex === undefined ? 0 : initialVariantIndex;
const isVariantProduct = require(dependencyMap[0]).getIsVariantProduct(product);
const r7 = isVariantProduct && initialVariantIndex < product.variants.length ? initialVariantIndex : 0;
require(dependencyMap[1]).productDetailsOpened(isVariantProduct ? product.variants[r7].skuId : product.skuId);
const defaultImport = importDefault(dependencyMap[2]);
defaultImport.openLazy(require(dependencyMap[4])(dependencyMap[3], dependencyMap.paths), 'Shop Product Preview',
{product: product, initialVariantIndex: r7, analyticsLocations: analyticsLocations,
shopAnalyticsContext: shopAnalyticsContext}, a1);
}
global.__d(_fun78788, 10085, [5133, 5120, 4080, 10086, 1962,
2]) /* metro module 10085, dependencies: [5133, 5120, 4080, 10086, 1962, 2] */;
@@ -1,216 +1,309 @@
/* Metro module 14261; source: modules/collectibles/native/tooling/CollectiblesTool.tsx; dependencies: [57, 31, 27, 5121, 5145, 33, 4501, 697, 10020, 632, 7675, 4573, 14262, 1305, 4579, 7589, 2] */
import Module00057 from '../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import Native from '../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import CollectiblesCategoryStore from '../../CollectiblesCategoryStore.tsx'; /* Metro dependency 5121 */
import CollectiblesPurchaseStore from '../../CollectiblesPurchaseStore.tsx'; /* Metro dependency 5145 */
import UseFetchCollectiblesCategoriesAndPurchases from '../../hooks/useFetchCollectiblesCategoriesAndPurchases.tsx'; /* Metro dependency 7675 */
import CollectiblesShopCardV2 from '../CollectiblesShopCardV2.tsx'; /* Metro dependency 10020 */
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 UseStateFromStoresModule from '../../../../external/discord_common/js/packages/flux/useStateFromStores.tsx'; /* Metro dependency 632 */
import * as NativeModule from '../../../../design/void/native.tsx'; /* Metro dependency 1305 */
import * as TextModule from '../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as ShopSkipCategoriesFilterModule from './ShopSkipCategoriesFilter.tsx'; /* Metro dependency 14262 */
function _fun107867(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#107867, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14458:6, offset: 0x0230bdfe, size: 1195 bytes, params: 8, frame: 25
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
let value = ReactNativeModule;
const env0_5 = value.ScrollView;
const env0_6 = value.View;
const collectiblesCategoryStore = importDefault(5121) /* metro dependency 5121: CollectiblesCategoryStore */;
const collectiblesPurchaseStore = importDefault(5145) /* metro dependency 5145: CollectiblesPurchaseStore */;
value = require(33) /* metro dependency 33 */;
const env0_9 = value.jsx;
const env0_10 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
object = {};
let BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object2.container = {flex: 1, backgroundColor: BACKGROUND_BASE_LOW};
const object5 = {};
object.container = {flex: 1, backgroundColor: BACKGROUND_BASE_LOW};
const object3 = {};
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object5.padding = PX_16;
object3.padding = PX_16;
let PX_32 = (importDefault(697) /* metro dependency 697: native */).space.PX_32;
object5.paddingBottom = PX_32;
object2.scrollContainer = object5;
const object6 = {};
object3.paddingBottom = PX_32;
object.scrollContainer = object3;
const object4 = {};
const BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
object6.backgroundColor = BACKGROUND_SURFACE_HIGH;
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
object4.backgroundColor = BACKGROUND_SURFACE_HIGH;
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object6.padding = PX_16;
object4.padding = PX_16;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object6.marginBottom = PX_16;
object6.borderWidth = 1;
object4.marginBottom = PX_16;
object4.borderWidth = 1;
let BORDER_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_MUTED;
object6.borderColor = BORDER_MUTED;
object2.section = object6;
object4.borderColor = BORDER_MUTED;
object.section = object4;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object2.sectionHeader = {'flexDirection': 'row', 'alignItems': 'center', marginBottom: PX_16};
object.sectionHeader = {'flexDirection': 'row', 'alignItems': 'center', marginBottom: PX_16};
let TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_DEFAULT;
object2.sectionTitle = {flex: 1, color: TEXT_DEFAULT};
object.sectionTitle = {flex: 1, color: TEXT_DEFAULT};
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object2.inputContainer = {marginBottom: PX_16};
const object7 = {};
object.inputContainer = {marginBottom: PX_16};
const object8 = {};
BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object7.backgroundColor = BACKGROUND_BASE_LOW;
object7.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.md;
object7.borderWidth = 1;
object8.backgroundColor = BACKGROUND_BASE_LOW;
object8.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.md;
object8.borderWidth = 1;
BORDER_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_MUTED;
object7.borderColor = BORDER_MUTED;
object8.borderColor = BORDER_MUTED;
const PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object7.padding = PX_4;
object2.inputWrapper = object7;
const object10 = {};
object8.padding = PX_4;
object.inputWrapper = object8;
const object9 = {};
let PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object10.marginBottom = PX_8;
object9.marginBottom = PX_8;
TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_DEFAULT;
object10.color = TEXT_DEFAULT;
object10.fontWeight = '600';
object2.inputLabel = object10;
object9.color = TEXT_DEFAULT;
object9.fontWeight = '600';
object.inputLabel = object9;
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object2.statusText = {'marginTop': null, 'fontSize': 12, 'fontWeight': '500', marginTop: PX_8};
object.statusText = {'marginTop': null, 'fontSize': 12, 'fontWeight': '500', marginTop: PX_8};
const TEXT_FEEDBACK_POSITIVE = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_FEEDBACK_POSITIVE;
object2.statusSuccess = {color: TEXT_FEEDBACK_POSITIVE};
object.statusSuccess = {color: TEXT_FEEDBACK_POSITIVE};
const TEXT_FEEDBACK_CRITICAL = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_FEEDBACK_CRITICAL;
object2.statusError = {color: TEXT_FEEDBACK_CRITICAL};
object.statusError = {color: TEXT_FEEDBACK_CRITICAL};
let TEXT_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_MUTED;
object2.statusLoading = {color: TEXT_MUTED};
object.statusLoading = {color: TEXT_MUTED};
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object2.previewContainer = {marginBottom: PX_16};
const object11 = {backgroundColor: '#23a55a'};
object11.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.md;
object.previewContainer = {marginBottom: PX_16};
const object13 = {backgroundColor: '#23a55a'};
object13.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.md;
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object11.paddingVertical = PX_12;
object11.alignItems = 'center';
object2.previewButton = object11;
const object12 = {};
object13.paddingVertical = PX_12;
object13.alignItems = 'center';
object.previewButton = object13;
const object14 = {};
const BACKGROUND_MOD_NORMAL = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_NORMAL;
object12.backgroundColor = BACKGROUND_MOD_NORMAL;
object12.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.md;
object12.borderWidth = 2;
object12.borderStyle = 'dashed';
object14.backgroundColor = BACKGROUND_MOD_NORMAL;
object14.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.md;
object14.borderWidth = 2;
object14.borderStyle = 'dashed';
BORDER_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_MUTED;
object12.borderColor = BORDER_MUTED;
object14.borderColor = BORDER_MUTED;
PX_32 = (importDefault(697) /* metro dependency 697: native */).space.PX_32;
object12.padding = PX_32;
object12.alignItems = 'center';
object12.justifyContent = 'center';
object12.minHeight = 120;
object2.placeholder = object12;
object14.padding = PX_32;
object14.alignItems = 'center';
object14.justifyContent = 'center';
object14.minHeight = 120;
object.placeholder = object14;
TEXT_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_MUTED;
object2.placeholderText = {'color': null, 'textAlign': 'center', 'fontSize': 14, color: TEXT_MUTED};
const env0_11 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/tooling/CollectiblesTool.tsx');
object.placeholderText = {'color': null, 'textAlign': 'center', 'fontSize': 14, color: TEXT_MUTED};
const env0_11 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/native/tooling/CollectiblesTool.tsx');
exports.default = _default_107872;
}
function UnpurchasedCollectiblesShopCardV2(a0) { // fn#107868, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14458:1841, offset: 0x0230c2a9, size: 119 bytes, params: 2, frame: 18
const binding = env0_4;
const [property, env0_0] = env0_3(binding.useState(0), 2);
binding.useLayoutEffect(_fun107869, []);
return ((Component) => <Component {...a0} key={property} />)(importDefault(10020) /* metro dependency 10020: CollectiblesShopCardV2 */);
}
function _default_107872() { // fn#107872, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14458:2060, offset: 0x0230c386, size: 1614 bytes, params: 1, frame: 39
const styles = useStyles();
const categories = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([CollectiblesCategoryStore],
function() {
return CollectiblesCategoryStore.categories;
});
const r5 = categories.size > 0 && (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([CollectiblesPurchaseStore],
function() {
return CollectiblesPurchaseStore.purchases;
}).size > 0 && (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([CollectiblesCategoryStore],
function() {
return CollectiblesCategoryStore.lastSuccessfulFetch;
}) != null;
const value5 = (importDefault(7675) /* metro dependency 7675: useFetchCollectiblesCategoriesAndPurchases */)({'logPerf': false,
'stalePurchasesOK': true, noOp: r5});
let r14 = r5 || !value5.isFetching && (r5 ? categories : value5.categories).size > 0;
const binding = env0_4;
let useState = binding.useState;
const value8 = Reflect.apply(useState, binding, ['']);
const binding2 = env0_3;
const value9 = binding2(value8, 2);
const property = value9[0];
const property2 = value9[1];
useState = binding.useState;
const value10 = binding2(Reflect.apply(useState, binding, [null]), 2);
const property3 = value10[0];
var env0_3 = value10[1];
useState = binding.useState;
const value11 = binding2(Reflect.apply(useState, binding, [null]), 2);
const property4 = value11[0];
var env0_4 = value11[1];
binding.useEffect(_fun107876, [property, r14]);
let section = styles.section;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const view = <View style={styles.sectionHeader}><Text variant="heading-md/semibold" style={styles.sectionTitle}>{'Shop Settings'}</Text></View>;
const ShopSkipCategoriesFilter = (require(14262) /* metro dependency 14262: ShopSkipCategoriesFilter */).ShopSkipCategoriesFilter;
const items2 = [<View style={section}>{view}<ShopSkipCategoriesFilter /></View>];
section = styles.section;
const view2 = <View style={styles.sectionHeader}><Text variant="heading-md/semibold" style={styles.sectionTitle}>{'Product Configuration'}</Text></View>;
const items4 = [<Text variant="text-md/semibold" style={styles.inputLabel}>{'Primary Product SKU ID'}</Text>];
const TextInput = (require(1305) /* metro dependency 1305: native */).TextInput;
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
items4[1] = <View style={styles.inputWrapper}><TextInput value={property} onChangeText={property2} placeholder="Enter product SKU ID (e.g., 1366494385482502184)" returnKeyType="done" style={{fontSize: 14,
padding: PX_12}} /></View>;
items4[2] = !r14 && property.trim() !== '' && <Text variant="text-xs/normal" style={[styles.statusText,
styles.statusLoading]}>{'Loading products...'}</Text>;
r14 = r14 && property.trim() !== '' && property3 == null && <Text variant="text-xs/normal" style={[styles.statusText,
styles.statusError]}>{'Product not found'}</Text>;
items4[3] = r14;
items4[4] = property3 != null && <Text variant="text-xs/normal" style={[styles.statusText,
styles.statusSuccess]}>{'Found: '}{property3.name}</Text>;
items2[1] = <View style={section}>{view2}<View style={styles.inputContainer}>{items4}</View></View>;
items2[2] = <View style={styles.section}><View style={styles.sectionHeader}><Text variant="heading-md/semibold" style={styles.sectionTitle}>{'Product Preview'}</Text></View>{property3 == null ? <View style={styles.placeholder}><Text variant="text-sm/normal" style={styles.placeholderText}>{'Enter a valid product SKU ID above'}{'\n'}{'to see the product preview'}</Text></View> : property4 != null ? <View><View style={styles.previewContainer}><UnpurchasedCollectiblesShopCardV2 product={property3} /></View>{((BaseTextButton) => <BaseTextButton pillStyle={styles.previewButton} text="Show Collectibles Modal" onPress={onPress_107877} />)((require(4579) /* metro dependency 4579: BaseTextButtonNative */).BaseTextButton)}</View> : <View style={styles.placeholder}><Text variant="text-sm/normal" style={styles.placeholderText}>{'Enter a valid product SKU ID above'}{'\n'}{'to see the product preview'}</Text></View>}</View>;
return (
<View style={styles.container}>
<ScrollView contentContainerStyle={styles.scrollContainer} showsVerticalScrollIndicator={false}>
{items2}
</ScrollView>
</View>
);
}
function _fun107869() { // fn#107869, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14458:1914, offset: 0x0230c320, size: 68 bytes, params: 1, frame: 12
const env0_0 = CollectiblesPurchaseStore.getPurchase;
CollectiblesPurchaseStore.getPurchase = function() {
};
CollectiblesPurchaseStore.emitChange();
env0_0(1);
return function() {
CollectiblesPurchaseStore.getPurchase = getPurchase;
CollectiblesPurchaseStore.emitChange();
};
}
function _fun107876() { // fn#107876, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14458:2522, offset: 0x0230ca01, size: 151 bytes, params: 1, frame: 14
var value3;
var product;
var categoryForProduct;
if (env0_1.trim() !== '') {
if (env0_0) {
value3 = environment.__proto__;
product = CollectiblesCategoryStore.getProduct(env0_1);
categoryForProduct = CollectiblesCategoryStore.getCategoryForProduct(env0_1);
if (product == null) {
env0_3(null);
env0_4(null);
} else if (categoryForProduct != null) {
env0_3(product);
env0_4(categoryForProduct);
} else {
env0_3(null);
env0_4(null);
}
return undefined;
function UnpurchasedCollectiblesShopCardV2(a0) { // fn#107868, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14458:1841, offset: 0x0230c2a9, size: 119 bytes, params: 2, frame: 18
const [property, env0_0] = Module00057(ReactModule.useState(0), 2);
ReactModule.useLayoutEffect(_fun107869, []);
return ((Component) => <Component {...a0} key={property} />)(CollectiblesShopCardV2);
function _fun107869() { // fn#107869, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14458:1914, offset: 0x0230c320, size: 68 bytes, params: 1, frame: 12
let collectiblesPurchaseStoreBinding = CollectiblesPurchaseStore;
const getPurchase = collectiblesPurchaseStoreBinding.getPurchase;
collectiblesPurchaseStoreBinding.getPurchase = function() {
};
collectiblesPurchaseStoreBinding.emitChange();
getPurchase(1);
return function() {
var collectiblesPurchaseStoreBinding = CollectiblesPurchaseStore;
collectiblesPurchaseStoreBinding.getPurchase = getPurchase;
collectiblesPurchaseStoreBinding.emitChange();
};
}
}
env0_3(null);
env0_4(null);
}
function _default_107872OnPress() { // fn#107877, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14458:4304, owner: _default_107872.onPress, offset: 0x0230ca98, size: 71 bytes, params: 1, frame: 12
var value2;
var defaultImport;
if (env0_2 != null) {
value2 = environment.__proto__;
defaultImport = importDefault(7589) /* metro dependency 7589: ProductPurchaseSuccessActionCreators */;
defaultImport.open({product: env0_2, useCategoryImage: true});
function _default_107872() { // fn#107872, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14458:2060, offset: 0x0230c386, size: 1614 bytes, params: 1, frame: 39
const styles = useStyles();
const useStateFromStores = UseStateFromStoresModule.useStateFromStores;
const collectiblesCategoryStoreBinding = CollectiblesCategoryStore;
const categories = Reflect.apply(useStateFromStores, UseStateFromStoresModule, [[collectiblesCategoryStoreBinding],
function() {
return CollectiblesCategoryStore.categories;
}]);
const r5 = categories.size > 0 && UseStateFromStoresModule.useStateFromStores([CollectiblesPurchaseStore],
function() {
return CollectiblesPurchaseStore.purchases;
}).size > 0 && UseStateFromStoresModule.useStateFromStores([collectiblesCategoryStoreBinding], function() {
return CollectiblesCategoryStore.lastSuccessfulFetch;
}) != null;
const value5 = (UseFetchCollectiblesCategoriesAndPurchases)({'logPerf': false,
'stalePurchasesOK': true, noOp: r5});
let r14 = r5 || !value5.isFetching && (r5 ? categories : value5.categories).size > 0;
const binding = env0_4;
let useState = binding.useState;
const value8 = Reflect.apply(useState, binding, ['']);
const binding2 = env0_3;
const value9 = binding2(value8, 2);
const property = value9[0];
const property2 = value9[1];
useState = binding.useState;
const value10 = binding2(Reflect.apply(useState, binding, [null]), 2);
const property3 = value10[0];
var env0_3 = value10[1];
useState = binding.useState;
const value11 = binding2(Reflect.apply(useState, binding, [null]), 2);
const property4 = value11[0];
var env0_4 = value11[1];
binding.useEffect(_fun107876, [property, r14]);
let section = styles.section;
const Text = (TextModule).Text;
const view = (
<View style={styles.sectionHeader}>
<Text variant="heading-md/semibold" style={styles.sectionTitle}>
{'Shop Settings'}
</Text>
</View>
);
const ShopSkipCategoriesFilter = (ShopSkipCategoriesFilterModule).ShopSkipCategoriesFilter;
const items2 = [
<View style={section}>
{view}
<ShopSkipCategoriesFilter />
</View>,
];
section = styles.section;
const view2 = (
<View style={styles.sectionHeader}>
<Text variant="heading-md/semibold" style={styles.sectionTitle}>
{'Product Configuration'}
</Text>
</View>
);
const items4 = [
<Text variant="text-md/semibold" style={styles.inputLabel}>
{'Primary Product SKU ID'}
</Text>,
];
const TextInput = (NativeModule).TextInput;
const PX_12 = (Native).space.PX_12;
items4[1] = (
<View style={styles.inputWrapper}>
<TextInput
value={property}
onChangeText={property2}
placeholder="Enter product SKU ID (e.g., 1366494385482502184)"
returnKeyType="done"
style={{fontSize: 14, padding: PX_12}}
/>
</View>
);
items4[2] = !r14 && property.trim() !== '' && <Text variant="text-xs/normal" style={[styles.statusText,
styles.statusLoading]}>{'Loading products...'}</Text>;
r14 = r14 && property.trim() !== '' && property3 == null && <Text variant="text-xs/normal" style={[styles.statusText,
styles.statusError]}>{'Product not found'}</Text>;
items4[3] = r14;
items4[4] = property3 != null && <Text variant="text-xs/normal" style={[styles.statusText,
styles.statusSuccess]}>{'Found: '}{property3.name}</Text>;
items2[1] = (
<View style={section}>
{view2}
<View style={styles.inputContainer}>
{items4}
</View>
</View>
);
items2[2] = (
<View style={styles.section}>
<View style={styles.sectionHeader}>
<Text variant="heading-md/semibold" style={styles.sectionTitle}>
{'Product Preview'}
</Text>
</View>
{
property3 == null
? (
<View style={styles.placeholder}>
<Text variant="text-sm/normal" style={styles.placeholderText}>
{'Enter a valid product SKU ID above'}
{'\n'}
{'to see the product preview'}
</Text>
</View>
)
: (
property4 != null
? (
<View>
<View style={styles.previewContainer}>
<UnpurchasedCollectiblesShopCardV2 product={property3} />
</View>
{((BaseTextButton) => <BaseTextButton pillStyle={styles.previewButton} text="Show Collectibles Modal" onPress={onPress_107877} />)((require(4579) /* metro dependency 4579: BaseTextButtonNative */).BaseTextButton)}
</View>
)
: (
<View style={styles.placeholder}>
<Text variant="text-sm/normal" style={styles.placeholderText}>
{'Enter a valid product SKU ID above'}
{'\n'}
{'to see the product preview'}
</Text>
</View>
)
)
}
</View>
);
return (
<View style={styles.container}>
<ScrollView contentContainerStyle={styles.scrollContainer} showsVerticalScrollIndicator={false}>
{items2}
</ScrollView>
</View>
);
function _fun107876() { // fn#107876, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14458:2522, offset: 0x0230ca01, size: 151 bytes, params: 1, frame: 14
var value3;
var collectiblesCategoryStoreBinding;
var product;
var categoryForProduct;
if (env0_1.trim() !== '') {
if (env0_0) {
value3 = environment.__proto__;
collectiblesCategoryStoreBinding = CollectiblesCategoryStore;
product = collectiblesCategoryStoreBinding.getProduct(env0_1);
categoryForProduct = collectiblesCategoryStoreBinding.getCategoryForProduct(env0_1);
if (product == null) {
env0_3(null);
env0_4(null);
} else if (categoryForProduct != null) {
env0_3(product);
env0_4(categoryForProduct);
} else {
env0_3(null);
env0_4(null);
}
return undefined;
}
}
env0_3(null);
env0_4(null);
}
function _default_107872OnPress() { // fn#107877, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14458:4304, owner: _default_107872.onPress, offset: 0x0230ca98, size: 71 bytes, params: 1, frame: 12
var value2;
var defaultImport;
if (env0_2 != null) {
value2 = environment.__proto__;
defaultImport = importDefault(7589) /* metro dependency 7589: ProductPurchaseSuccessActionCreators */;
defaultImport.open({product: env0_2, useCategoryImage: true});
}
}
}
}
global.__d(_fun107867, 14261, [57, 31, 27, 5121, 5145, 33, 4501, 697, 10020, 632, 7675, 4573, 14262, 1305, 4579,
7589,
2]) /* metro module 14261, dependencies: [57, 31, 27, 5121, 5145, 33, 4501, 697, 10020, 632, 7675, 4573, 14262, 1305, 4579, 7589, 2] */;
@@ -1,88 +1,121 @@
/* Metro module 14262; source: modules/collectibles/native/tooling/ShopSkipCategoriesFilter.tsx; dependencies: [31, 27, 5121, 33, 4501, 697, 566, 4572, 4573, 5120, 2] */
import CollectiblesCategoryStore from '../../CollectiblesCategoryStore.tsx'; /* Metro dependency 5121 */
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 StackNativeModule from '../../../../design/components/Stack/native/Stack.native.tsx'; /* Metro dependency 4572 */
import * as TextModule from '../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
function _fun107878(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#107878, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14459:6, offset: 0x0230cadf, size: 458 bytes, params: 8, frame: 22
var object3;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
ReactModule;
let value = ReactNativeModule;
const env0_2 = value.View;
const env0_3 = value.Pressable;
const collectiblesCategoryStore = importDefault(5121) /* metro dependency 5121: CollectiblesCategoryStore */;
value = require(33) /* metro dependency 33 */;
const env0_5 = value.jsx;
const env0_6 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object3 = {};
const object4 = {};
object = {};
const object2 = {};
let PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object4.paddingVertical = PX_12;
object2.paddingVertical = PX_12;
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object4.paddingHorizontal = PX_16;
object3.container = object4;
object2.paddingHorizontal = PX_16;
object.container = object2;
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object3.label = {marginBottom: PX_8};
object.label = {marginBottom: PX_8};
PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object3.stepperContainer = {'flexDirection': 'row', 'alignItems': 'center', gap: PX_12};
const object6 = {'width': 32, 'height': 32, 'borderRadius': null, 'backgroundColor': null,
object.stepperContainer = {'flexDirection': 'row', 'alignItems': 'center', gap: PX_12};
const object5 = {'width': 32, 'height': 32, 'borderRadius': null, 'backgroundColor': null,
'justifyContent': 'center', 'alignItems': 'center'};
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
object5.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
const CONTROL_OVERLAY_SECONDARY_BACKGROUND_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.CONTROL_OVERLAY_SECONDARY_BACKGROUND_DEFAULT;
object6.backgroundColor = CONTROL_OVERLAY_SECONDARY_BACKGROUND_DEFAULT;
object3.stepperButton = object6;
object3.stepperButtonDisabled = {opacity: 0.5};
object3.valueText = {'minWidth': 40, 'textAlign': 'center'};
const env0_7 = Reflect.apply(createStyles, value, [object3]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/tooling/ShopSkipCategoriesFilter.tsx');
object5.backgroundColor = CONTROL_OVERLAY_SECONDARY_BACKGROUND_DEFAULT;
object.stepperButton = object5;
object.stepperButtonDisabled = {opacity: 0.5};
object.valueText = {'minWidth': 40, 'textAlign': 'center'};
const env0_7 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/native/tooling/ShopSkipCategoriesFilter.tsx');
exports.ShopSkipCategoriesFilter = ShopSkipCategoriesFilter;
}
function ShopSkipCategoriesFilter() { // fn#107879, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14459:798, offset: 0x0230cca9, size: 516 bytes, params: 1, frame: 31
const styles = useStyles();
const skipNumCategories = (require(566) /* metro dependency 566: flux */).useStateFromStores([CollectiblesCategoryStore],
function() {
return CollectiblesCategoryStore.skipNumCategories;
});
const value2 = skipNumCategories <= 0;
const value3 = skipNumCategories >= 100;
const Stack = (StackNativeModule).Stack;
const Text = (TextModule).Text;
const text = (
<Text variant="text-md/normal" style={styles.label}>
{'Hide first # of categories'}
</Text>
);
const items3 = [
<Pressable
style={[styles.stepperButton, value2 && styles.stepperButtonDisabled]}
onPress={onPress_107881}
disabled={value2}
>
<Text variant="text-lg/semibold">
{'−'}
</Text>
</Pressable>,
];
items3[1] = (
<Text variant="text-md/semibold" style={styles.valueText}>
{skipNumCategories}
</Text>
);
items3[2] = (
<Pressable
style={[styles.stepperButton, value3 && styles.stepperButtonDisabled]}
onPress={onPress_107882}
disabled={value3}
>
<Text variant="text-lg/semibold">
{'+'}
</Text>
</Pressable>
);
return (
<View style={styles.container}>
<Stack spacing={8}>
{text}
<View style={styles.stepperContainer}>
{items3}
</View>
</Stack>
</View>
);
function ShopSkipCategoriesFilterOnPress() { // fn#107881, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14459:1164, owner: ShopSkipCategoriesFilter.onPress, offset: 0x0230cebc, size: 64 bytes, params: 1, frame: 12
var value2;
var moduleValue;
if (skipNumCategories > 0) {
value2 = environment.__proto__;
moduleValue = require(5120) /* metro dependency 5120: CollectiblesActionCreators */;
moduleValue.setSkipNumCategories(skipNumCategories - 1);
}
}
function ShopSkipCategoriesFilter() { // fn#107879, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14459:798, offset: 0x0230cca9, size: 516 bytes, params: 1, frame: 31
const styles = useStyles();
const skipNumCategories = (require(566) /* metro dependency 566: flux */).useStateFromStores([CollectiblesCategoryStore],
function() {
return CollectiblesCategoryStore.skipNumCategories;
});
const value2 = skipNumCategories <= 0;
const value3 = skipNumCategories >= 100;
const Stack = (require(4572) /* metro dependency 4572: StackNative */).Stack;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const text = <Text variant="text-md/normal" style={styles.label}>{'Hide first # of categories'}</Text>;
const items3 = [<Pressable style={[styles.stepperButton,
value2 && styles.stepperButtonDisabled]} onPress={onPress_107881} disabled={value2}><Text variant="text-lg/semibold">{'−'}</Text></Pressable>];
items3[1] = <Text variant="text-md/semibold" style={styles.valueText}>{skipNumCategories}</Text>;
items3[2] = <Pressable style={[styles.stepperButton,
value3 && styles.stepperButtonDisabled]} onPress={onPress_107882} disabled={value3}><Text variant="text-lg/semibold">{'+'}</Text></Pressable>;
return (
<View style={styles.container}>
<Stack spacing={8}>
{text}
<View style={styles.stepperContainer}>
{items3}
</View>
</Stack>
</View>
);
}
function ShopSkipCategoriesFilterOnPress_107882() { // fn#107882, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14459:1429, owner: ShopSkipCategoriesFilter.onPress, offset: 0x0230cefc, size: 65 bytes, params: 1, frame: 12
var value2;
var moduleValue;
if (skipNumCategories < 100) {
value2 = environment.__proto__;
moduleValue = require(5120) /* metro dependency 5120: CollectiblesActionCreators */;
moduleValue.setSkipNumCategories(skipNumCategories + 1);
}
}
function ShopSkipCategoriesFilterOnPress() { // fn#107881, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14459:1164, owner: ShopSkipCategoriesFilter.onPress, offset: 0x0230cebc, size: 64 bytes, params: 1, frame: 12
var value2;
var moduleValue;
if (skipNumCategories > 0) {
value2 = environment.__proto__;
moduleValue = require(5120) /* metro dependency 5120: CollectiblesActionCreators */;
moduleValue.setSkipNumCategories(skipNumCategories - 1);
}
}
function ShopSkipCategoriesFilterOnPress_107882() { // fn#107882, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14459:1429, owner: ShopSkipCategoriesFilter.onPress, offset: 0x0230cefc, size: 65 bytes, params: 1, frame: 12
var value2;
var moduleValue;
if (skipNumCategories < 100) {
value2 = environment.__proto__;
moduleValue = require(5120) /* metro dependency 5120: CollectiblesActionCreators */;
moduleValue.setSkipNumCategories(skipNumCategories + 1);
}
}
global.__d(_fun107878, 14262, [31, 27, 5121, 33, 4501, 697, 566, 4572, 4573, 5120,
2]) /* metro module 14262, dependencies: [31, 27, 5121, 33, 4501, 697, 566, 4572, 4573, 5120, 2] */;
@@ -1,50 +1,54 @@
/* Metro module 14051; source: modules/collectibles/native/useAndroidUnsyncedFilter.tsx; dependencies: [31, 4649, 5140, 566, 3815, 10066, 2] */
import DevSettingsStore from '../../devtools/dev_settings/DevSettingsStore.tsx'; /* Metro dependency 4649 */
import IAPStoreAndroid from '../../../stores/native/IAPStore.android.tsx'; /* Metro dependency 5140 */
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 FluxModule from '../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as BillingPlatformUtilsModule from '../../device/BillingPlatformUtils.tsx'; /* Metro dependency 3815 */
import * as CollectiblesUtilsModule from './CollectiblesUtils.tsx'; /* Metro dependency 10066 */
function _fun106556(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#106556, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14248:6, offset: 0x022e04f5, size: 151 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = (require(31) /* metro dependency 31 */).useCallback;
const devSettingsStore = importDefault(4649) /* metro dependency 4649: DevSettingsStore */;
const iapStoreAndroid = importDefault(5140) /* metro dependency 5140: IAPStoreAndroid */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/useAndroidUnsyncedFilter.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/native/useAndroidUnsyncedFilter.tsx');
exports.useAndroidUnsyncedFilter = useAndroidUnsyncedFilter;
}
function useAndroidUnsyncedFilter() { // fn#106557, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14248:255, offset: 0x022e058c, size: 135 bytes, params: 1, frame: 19
let useStateFromStores = FluxModule.useStateFromStores;
const value2 = Reflect.apply(useStateFromStores, FluxModule, [[IAPStoreAndroid], function() {
return IAPStoreAndroid.isFetchingGoogleSkus();
}]);
useStateFromStores = FluxModule.useStateFromStores;
return useCallback(_fun106560, [value2, Reflect.apply(useStateFromStores, FluxModule, [[DevSettingsStore],
function() {
return DevSettingsStore.get('bypass_google_sku_sync');
}])]);
function _fun106560(a0) { // fn#106560, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14248:411, offset: 0x022e063f, size: 88 bytes, params: 2, frame: 12
var r0;
let value = a0;
if (BillingPlatformUtilsModule.isGooglePlayBillingSupported()) {
if (env0_1) {
r0 = value;
} else if (env0_0) {
r0 = value;
} else {
value = value.filter(_fun106561);
r0 = value;
}
} else {
r0 = value;
}
return r0;
function _fun106561(a0) { // fn#106561, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14248:472, offset: 0x022e0697, size: 41 bytes, params: 2, frame: 11
const value = environment.__proto__.__proto__;
return (CollectiblesUtilsModule).isGPlaySynced(a0);
}
function useAndroidUnsyncedFilter() { // fn#106557, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14248:255, offset: 0x022e058c, size: 135 bytes, params: 1, frame: 19
const fluxModule = require(566) /* metro dependency 566: flux */;
let useStateFromStores = fluxModule.useStateFromStores;
const value2 = Reflect.apply(useStateFromStores, fluxModule, [[IAPStoreAndroid], function() {
return IAPStoreAndroid.isFetchingGoogleSkus();
}]);
const moduleValue2 = fluxModule;
useStateFromStores = moduleValue2.useStateFromStores;
return useCallback(_fun106560, [value2, Reflect.apply(useStateFromStores, moduleValue2, [[DevSettingsStore],
function() {
return DevSettingsStore.get('bypass_google_sku_sync');
}])]);
}
function _fun106560(a0) { // fn#106560, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14248:411, offset: 0x022e063f, size: 88 bytes, params: 2, frame: 12
var r0;
let value = a0;
const billingPlatformUtilsModule = require(3815) /* metro dependency 3815: BillingPlatformUtils */;
if (billingPlatformUtilsModule.isGooglePlayBillingSupported()) {
if (env0_1) {
r0 = value;
} else if (env0_0) {
r0 = value;
} else {
value = value.filter(_fun106561);
r0 = value;
}
} else {
r0 = value;
}
return r0;
}
function _fun106561(a0) { // fn#106561, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14248:472, offset: 0x022e0697, size: 41 bytes, params: 2, frame: 11
const value = environment.__proto__.__proto__;
return (require(10066) /* metro dependency 10066: CollectiblesUtils */).isGPlaySynced(a0);
}
global.__d(_fun106556, 14051, [31, 4649, 5140, 566, 3815, 10066,
2]) /* metro module 14051, dependencies: [31, 4649, 5140, 566, 3815, 10066, 2] */;
@@ -1,9 +1,11 @@
/* Metro module 7595; source: modules/collectibles/native/useAvatarDecorationPreviewSizes.tsx; dependencies: [1478, 7596, 2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun60915(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#60915, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7773:6, offset: 0x01714c47, size: 101 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/collectibles/native/useAvatarDecorationPreviewSizes.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/native/useAvatarDecorationPreviewSizes.tsx');
exports.useAvatarDecorationPreviewSizes = function() {
var {width, height} = importDefault(dependencyMap[0])();
var Math = global.Math;
@@ -14,3 +16,4 @@ function _fun60915(global, require, importDefault, importAll, module, exports, d
};
}
global.__d(_fun60915, 7595, [1478, 7596, 2]) /* metro module 7595, dependencies: [1478, 7596, 2] */;
@@ -1,26 +1,27 @@
/* Metro module 8409; source: modules/collectibles/native/useCollectibleListLayout.tsx; dependencies: [57, 31, 2] */
import Module00057 from '../../../by-id/module-00057.js'; /* Metro dependency 57 */
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 */
function _fun66822(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#66822, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8594:6, offset: 0x01c0b1c4, size: 163 bytes, params: 8, frame: 18
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_0 = importDefault(57) /* metro dependency 57 */;
const value = require(31) /* metro dependency 31 */;
const env0_1 = value.useCallback;
const env0_2 = value.useState;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/useCollectibleListLayout.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/native/useCollectibleListLayout.tsx');
exports.default = _default_66823;
exports.GUTTER_SIZE = 16;
exports.ROW_SIZE = 3;
exports.COLLECTIBLE_ROW_HEIGHT = 114;
function _default_66823() { // fn#66823, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8594:154, offset: 0x01c0b267, size: 80 bytes, params: 1, frame: 16
const [property, env0_0] = env0_0Binding(useState(0), 2);
const object = {size: property};
object.onLayout = useCallback(_fun66824, []);
return object;
function _fun66824({nativeEvent}) { // fn#66824, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8594:219, offset: 0x01c0b2b7, size: 50 bytes, params: 2, frame: 12
env0_0((nativeEvent.layout.width - 64) / 3);
}
}
}
function _default_66823() { // fn#66823, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8594:154, offset: 0x01c0b267, size: 80 bytes, params: 1, frame: 16
const [property, env0_0] = env0_0Binding(useState(0), 2);
const object2 = {size: property};
object2.onLayout = useCallback(_fun66824, []);
return object2;
}
function _fun66824({nativeEvent}) { // fn#66824, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8594:219, offset: 0x01c0b2b7, size: 50 bytes, params: 2, frame: 12
env0_0((nativeEvent.layout.width - 64) / 3);
}
global.__d(_fun66822, 8409, [57, 31, 2]) /* metro module 8409, dependencies: [57, 31, 2] */;
@@ -1,113 +1,119 @@
/* Metro module 14042; source: modules/collectibles/native/useCollectiblesShopDeepLinkProps.tsx; dependencies: [31, 5121, 5146, 566, 5133, 2] */
import CollectiblesCategoryStore from '../CollectiblesCategoryStore.tsx'; /* Metro dependency 5121 */
import CollectiblesShopStore from '../CollectiblesShopStore.tsx'; /* Metro dependency 5146 */
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 FluxModule from '../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
function _fun106495(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#106495, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14239:6, offset: 0x022de107, size: 157 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = (require(31) /* metro dependency 31 */).useMemo;
const collectiblesCategoryStore = importDefault(5121) /* metro dependency 5121: CollectiblesCategoryStore */;
const collectiblesShopStore = importDefault(5146) /* metro dependency 5146: CollectiblesShopStore */;
const env0_5 = {};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/useCollectiblesShopDeepLinkProps.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/native/useCollectiblesShopDeepLinkProps.tsx');
exports.useCollectiblesShopDeepLinkProps = useCollectiblesShopDeepLinkProps;
}
function useCollectiblesShopDeepLinkProps({categories, products}) { // fn#106496, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14239:272, offset: 0x022de1a4, size: 162 bytes, params: 2, frame: 18
const value2 = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([CollectiblesCategoryStore,
CollectiblesShopStore], _fun106497);
return useMemo(_fun106499, [value2.initialBaseProductSkuId, value2.initialVariantIndex, value2.initialCategorySkuId,
products, categories]);
}
function _fun106497() { // fn#106497, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14239:348, offset: 0x022de246, size: 236 bytes, params: 1, frame: 21
var environment;
var r1;
var r2;
var skuId;
var value4;
var Math;
var max;
var variants;
const value = environment.__proto__;
const initialProductSkuId = CollectiblesShopStore.initialProductSkuId;
const product = CollectiblesCategoryStore.getProduct(initialProductSkuId);
const value3 = 0;
if (product != null) {
if (product.variantGroupStoreListingId != null) {
value4 = CollectiblesCategoryStore.getProductByStoreListingId(product.variantGroupStoreListingId);
if (value4 != null && (require(5133) /* metro dependency 5133: CollectiblesProductUtils */).getIsVariantProduct(value4)) {
skuId = value4.skuId;
Math = global.Math;
max = Math.max;
variants = value4.variants;
r1 = Reflect.apply(max, Math, [value3, variants.findIndex(function({skuId}) {
return skuId === initialProductSkuId;
})]);
r2 = skuId;
function useCollectiblesShopDeepLinkProps({categories, products}) { // fn#106496, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14239:272, offset: 0x022de1a4, size: 162 bytes, params: 2, frame: 18
const value2 = (FluxModule).useStateFromStoresObject([CollectiblesCategoryStore,
CollectiblesShopStore], _fun106497);
return useMemo(_fun106499, [value2.initialBaseProductSkuId, value2.initialVariantIndex, value2.initialCategorySkuId,
products, categories]);
function _fun106497() { // fn#106497, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14239:348, offset: 0x022de246, size: 236 bytes, params: 1, frame: 21
var environment;
var r1;
var r2;
var skuId;
var value4;
var Math;
var max;
var variants;
const value = environment.__proto__;
const initialProductSkuId = CollectiblesShopStore.initialProductSkuId;
const product = CollectiblesCategoryStore.getProduct(initialProductSkuId);
const value3 = 0;
if (product != null) {
if (product.variantGroupStoreListingId != null) {
collectiblesCategoryStoreBinding = CollectiblesCategoryStore;
value4 = collectiblesCategoryStoreBinding.getProductByStoreListingId(product.variantGroupStoreListingId);
if (value4 != null && (require(5133) /* metro dependency 5133: CollectiblesProductUtils */).getIsVariantProduct(value4)) {
skuId = value4.skuId;
Math = global.Math;
max = Math.max;
variants = value4.variants;
r1 = Reflect.apply(max, Math, [value3, variants.findIndex(function({skuId}) {
return skuId === initialProductSkuId;
})]);
r2 = skuId;
} else {
r1 = value3;
r2 = initialProductSkuId;
}
} else {
r1 = value3;
r2 = initialProductSkuId;
}
} else {
r1 = value3;
r2 = initialProductSkuId;
}
} else {
r1 = value3;
r2 = initialProductSkuId;
return {initialCategorySkuId: CollectiblesCategoryStore.getCategoryForProduct(initialProductSkuId)?.skuId,
initialBaseProductSkuId: r2, initialVariantIndex: r1};
}
} else {
r1 = value3;
r2 = initialProductSkuId;
function _fun106499() { // fn#106499, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14239:847, offset: 0x022de332, size: 191 bytes, params: 1, frame: 20
var environment;
var r4;
var r1;
var r0;
var object;
var productsBinding;
var value2;
var Math;
var max;
var value;
if (initialBaseProductSkuId == null) {
value = environment.__proto__;
r0 = env1_5;
} else if (initialCategorySkuId == null) {
value = environment.__proto__;
r0 = env1_5;
} else {
object = {};
object.initialProductSkuId = initialBaseProductSkuId;
object.initialVariantIndex = initialVariantIndex;
object.initialCategorySkuId = initialCategorySkuId;
productsBinding = products;
value2 = undefined;
if (productsBinding != null) {
Math = global.Math;
r4 = Math.max(0, products.findIndex(function({skuId}) {
return skuId === initialBaseProductSkuId;
}));
} else {
r4 = value2;
}
object.productIndex = r4;
if (categories != null) {
Math = global.Math;
max = Math.max;
value = categories.findIndex(_fun106501);
value = Reflect.apply(max, Math, [0, value]);
r1 = value;
} else {
r1 = value2;
}
object.categoryIndex = r1;
r0 = object;
}
return r0;
function _fun106501({skuId}) { // fn#106501, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14239:1054, offset: 0x022de3f1, size: 21 bytes, params: 2, frame: 2
return skuId === initialCategorySkuId;
}
}
}
return {initialCategorySkuId: CollectiblesCategoryStore.getCategoryForProduct(initialProductSkuId)?.skuId,
initialBaseProductSkuId: r2, initialVariantIndex: r1};
}
function _fun106499() { // fn#106499, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14239:847, offset: 0x022de332, size: 191 bytes, params: 1, frame: 20
var environment;
var r4;
var r1;
var r0;
var object2;
var productsBinding;
var value2;
var Math;
var max;
var value;
if (initialBaseProductSkuId == null) {
value = environment.__proto__;
r0 = env1_5;
} else if (initialCategorySkuId == null) {
value = environment.__proto__;
r0 = env1_5;
} else {
object2 = {};
object2.initialProductSkuId = initialBaseProductSkuId;
object2.initialVariantIndex = initialVariantIndex;
object2.initialCategorySkuId = initialCategorySkuId;
productsBinding = products;
value2 = undefined;
if (productsBinding != null) {
Math = global.Math;
r4 = Math.max(0, products.findIndex(function({skuId}) {
return skuId === initialBaseProductSkuId;
}));
} else {
r4 = value2;
}
object2.productIndex = r4;
if (categories != null) {
Math = global.Math;
max = Math.max;
value = categories.findIndex(_fun106501);
value = Reflect.apply(max, Math, [0, value]);
r1 = value;
} else {
r1 = value2;
}
object2.categoryIndex = r1;
r0 = object2;
}
return r0;
}
function _fun106501({skuId}) { // fn#106501, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14239:1054, offset: 0x022de3f1, size: 21 bytes, params: 2, frame: 2
return skuId === initialCategorySkuId;
}
global.__d(_fun106495, 14042, [31, 5121, 5146, 566, 5133,
2]) /* metro module 14042, dependencies: [31, 5121, 5146, 566, 5133, 2] */;
@@ -1,279 +1,292 @@
/* Metro module 14043; source: modules/collectibles/native/useCollectiblesShopHeader.tsx; dependencies: [31, 27, 1878, 663, 661, 6528, 8516, 33, 4501, 697, 10358, 4573, 1244, 566, 10070, 5120, 6789, 6742, 4080, 10135, 1962, 683, 9480, 6531, 5080, 8743, 10123, 8341, 8663, 8811, 14044, 1484, 5176, 2] */
import AnalyticsUtils from '../../../utils/AnalyticsUtils.tsx'; /* Metro dependency 683 */
import UserStore from '../../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import ActionSheetActionCreators from '../../action_sheet/native/ActionSheetActionCreators.tsx'; /* Metro dependency 4080 */
import AnalyticsLocation from '../../app_analytics/AnalyticsLocation.tsx'; /* Metro dependency 6789 */
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 ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
import * as CollectiblesShopConstantsModule from '../CollectiblesShopConstants.tsx'; /* Metro dependency 663 */
import * as IndexNativeModule from '../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as CreateStylesModule from '../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as TextModule from '../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as QuestConstantsModule from '../../quests/QuestConstants.tsx'; /* Metro dependency 6528 */
import * as QuestTypesModule from '../../quests/QuestTypes.tsx'; /* Metro dependency 6531 */
import * as IconButtonNativeModule from '../../../design/components/Button/native/IconButton.native.tsx'; /* Metro dependency 8341 */
import * as ConstantsModule2 from '../../user_profile/Constants.tsx'; /* Metro dependency 8516 */
import * as ContextMenuNativeModule from '../../../design/components/ContextMenu/native/ContextMenu.native.tsx'; /* Metro dependency 8811 */
import * as QuestUtilsNativeModule from '../../quests/native/QuestUtils.native.tsx'; /* Metro dependency 9480 */
import * as UseFetchVirtualCurrencyBalanceModule from '../../virtual_currency/hooks/useFetchVirtualCurrencyBalance.tsx'; /* Metro dependency 10070 */
import * as NativeModule from '../../virtual_currency/native/index.tsx'; /* Metro dependency 10123 */
import * as ShopIconModule from '../../../design/components/Icon/native/redesign/generated/ShopIcon.tsx'; /* Metro dependency 10358 */
import * as MenuIconModule from '../../../design/components/Icon/native/redesign/generated/MenuIcon.tsx'; /* Metro dependency 14044 */
function _fun106502(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#106502, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14240:6, offset: 0x022de406, size: 331 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(27) /* metro dependency 27 */).View;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const env0_6 = (require(663) /* metro dependency 663: CollectiblesShopConstants */).CollectiblesMobileShopScreen;
const env0_7 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
const env0_8 = (require(6528) /* metro dependency 6528: QuestConstants */).RewardFilterTypes;
const env0_9 = (require(8516) /* metro dependency 8516: Constants */).UserProfileSections;
const value = require(33) /* metro dependency 33 */;
const env0_10 = value.jsx;
const env0_11 = value.jsxs;
const env0_12 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(_fun106503);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/useCollectiblesShopHeader.tsx');
const env0_12 = (CreateStylesModule).createStyles(_fun106503);
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/native/useCollectiblesShopHeader.tsx');
exports.default = _default_106518;
}
function _fun106503(a0) { // fn#106503, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14240:304, offset: 0x022de551, size: 224 bytes, params: 2, frame: 17
const object3 = {};
const object5 = {'width': '100%', 'flexDirection': 'row', 'alignItems': 'center'};
const value = undefined;
let PX_8 = a0 ? (importDefault(697) /* metro dependency 697: native */).space.PX_8 : value;
object5.marginTop = PX_8;
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object5.paddingLeft = PX_8;
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object5.gap = PX_8;
object3.headerTitleContainer = object5;
object3.headerTitle = {flexShrink: 1};
const object6 = {'flexDirection': 'row', 'justifyContent': 'flex-end', 'alignItems': 'center'};
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object6.gap = PX_8;
PX_8 = a0 ? (importDefault(697) /* metro dependency 697: native */).space.PX_8 : value;
object6.marginTop = PX_8;
object3.headerRightContainer = object6;
return object3;
}
function CollectiblesShopHeaderTitle({currentScreen, youBarEnabled}) { // fn#106504, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14240:686, offset: 0x022de631, size: 301 bytes, params: 2, frame: 23
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const styles = useStyles(youBarEnabled);
const ShopIcon = (require(10358) /* metro dependency 10358: ShopIcon */).ShopIcon;
const shopIcon = <ShopIcon size="md" color="icon-strong" />;
const Heading = (require(4573) /* metro dependency 4573: Text */).Heading;
const ORBS = CollectiblesMobileShopScreen.ORBS;
return (
<View style={styles.headerTitleContainer}>
{shopIcon}
<Heading
variant="redesign/heading-18/bold"
color="mobile-text-heading-primary"
maxFontSizeMultiplier={2}
lineClamp={1}
style={styles.headerTitle}
>
{currentScreen === ORBS ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.ElYQFS) : intl.string((require(1244) /* metro dependency 1244: indexNative */).t.pWG4ze)}
</Heading>
</View>
);
}
function CollectiblesShopHeaderRight({currentScreen, youBarEnabled}) { // fn#106505, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14240:1120, offset: 0x022de75e, size: 606 bytes, params: 2, frame: 29
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const styles = useStyles(youBarEnabled);
const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() {
return UserStore.getCurrentUser();
}, []);
const useFetchVirtualCurrencyBalanceModule = require(10070) /* metro dependency 10070: useFetchVirtualCurrencyBalance */;
const useFetchVirtualCurrencyBalance = useFetchVirtualCurrencyBalanceModule.useFetchVirtualCurrencyBalance;
const balance = Reflect.apply(useFetchVirtualCurrencyBalance, useFetchVirtualCurrencyBalanceModule, []).balance;
const binding = env0_3;
const value4 = binding.useMemo(_fun106507, [currentScreen]);
const value5 = binding.useCallback(_fun106511, [balance]);
const value6 = binding.useCallback(_fun106516, [currentScreen, value3?.id]);
const BalanceWidgetPillButton = (require(10123) /* metro dependency 10123: native */).BalanceWidgetPillButton;
const balanceWidgetPillButton = <BalanceWidgetPillButton balance={balance} onPress={value5} />;
const r6 = value3 != null && ((IconButton) => <IconButton accessibilityLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['7lZ31J'])} variant="tertiary" size="sm" icon={((HeartIcon) => <HeartIcon size="sm" color="redesign-button-tertiary-text" />)((require(8663) /* metro dependency 8663: HeartIcon */).HeartIcon)} onPress={value6} />)((require(8341) /* metro dependency 8341: IconButtonNative */).IconButton);
const ContextMenu = (require(8811) /* metro dependency 8811: ContextMenuNative */).ContextMenu;
return (
<View style={styles.headerRightContainer}>
{balanceWidgetPillButton}
{r6}
<ContextMenu
items={value4}
align="below"
title={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.nSFuC0)}
keyboardShouldPersistTaps="handled"
key={currentScreen}
>
{children_106517}
</ContextMenu>
</View>
);
}
function _default_106518() { // fn#106518, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14240:4071, offset: 0x022df096, size: 142 bytes, params: 1, frame: 17
const value = a0;
env0_3.useLayoutEffect(_fun106519,
[(require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation(),
(value !== undefined ? value : {}).currentScreen,
(require(5176) /* metro dependency 5176: YouBarExperiment */).useYouBarEnabled('CollectiblesShopHeader')]);
}
function _fun106507() { // fn#106507, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14240:1297, offset: 0x022de9bc, size: 395 bytes, params: 1, frame: 19
let object2 = {};
const value2 = undefined;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
object2.label = Reflect.apply(string, intl, [t['xNiB/O']]);
object2.action = function() {
var moduleValue = require(dependencyMap[15]);
var object = {};
var COLLECTIBLES_SHOP_MOBILE_FEATURED_PAGE_MENU_ITEM = importDefault(dependencyMap[16]).COLLECTIBLES_SHOP_MOBILE_FEATURED_PAGE_MENU_ITEM;
object.analyticsLocations = [COLLECTIBLES_SHOP_MOBILE_FEATURED_PAGE_MENU_ITEM];
object.analyticsSource = importDefault(dependencyMap[16]).COLLECTIBLES_SHOP_MOBILE_FEATURED_PAGE_MENU_ITEM;
object.screen = CollectiblesMobileShopScreen.FEATURED_PAGE;
moduleValue.openCollectiblesShopMobile(object);
};
let currentScreenBinding = currentScreen;
const FEATURED_PAGE = CollectiblesMobileShopScreen.FEATURED_PAGE;
let CheckmarkSmallIcon = currentScreenBinding !== FEATURED_PAGE ? value2 : (require(6742) /* metro dependency 6742: CheckmarkSmallIcon */).CheckmarkSmallIcon;
object2.trailingIndicator = CheckmarkSmallIcon;
const items2 = [object2];
object2 = {};
string = intl.string;
const RSyoZu = t.RSyoZu;
object2.label = Reflect.apply(string, intl, [RSyoZu]);
object2.action = function() {
var moduleValue = require(dependencyMap[15]);
var object = {};
var COLLECTIBLES_SHOP_MOBILE_SHOP_ALL_MENU_ITEM = importDefault(dependencyMap[16]).COLLECTIBLES_SHOP_MOBILE_SHOP_ALL_MENU_ITEM;
object.analyticsLocations = [COLLECTIBLES_SHOP_MOBILE_SHOP_ALL_MENU_ITEM];
object.analyticsSource = importDefault(dependencyMap[16]).COLLECTIBLES_SHOP_MOBILE_SHOP_ALL_MENU_ITEM;
object.screen = CollectiblesMobileShopScreen.SHOP_ALL;
moduleValue.openCollectiblesShopMobile(object);
};
currentScreenBinding = currentScreen;
const SHOP_ALL = CollectiblesMobileShopScreen.SHOP_ALL;
CheckmarkSmallIcon = currentScreenBinding !== SHOP_ALL ? value2 : (require(6742) /* metro dependency 6742: CheckmarkSmallIcon */).CheckmarkSmallIcon;
object2.trailingIndicator = CheckmarkSmallIcon;
items2[1] = object2;
object2 = {};
string = intl.string;
const EBYkzk = t.EBYkzk;
object2.label = Reflect.apply(string, intl, [EBYkzk]);
object2.action = function() {
var moduleValue = require(dependencyMap[15]);
var object = {};
var COLLECTIBLES_SHOP_MOBILE_ORBS_MENU_ITEM = importDefault(dependencyMap[16]).COLLECTIBLES_SHOP_MOBILE_ORBS_MENU_ITEM;
object.analyticsLocations = [COLLECTIBLES_SHOP_MOBILE_ORBS_MENU_ITEM];
object.analyticsSource = importDefault(dependencyMap[16]).COLLECTIBLES_SHOP_MOBILE_ORBS_MENU_ITEM;
object.screen = CollectiblesMobileShopScreen.ORBS;
moduleValue.openCollectiblesShopMobile(object);
};
currentScreenBinding = currentScreen;
const ORBS = CollectiblesMobileShopScreen.ORBS;
CheckmarkSmallIcon = currentScreenBinding !== ORBS ? value2 : (require(6742) /* metro dependency 6742: CheckmarkSmallIcon */).CheckmarkSmallIcon;
object2.trailingIndicator = CheckmarkSmallIcon;
items2[2] = object2;
return items2;
}
function _fun106511() { // fn#106511, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14240:2320, offset: 0x022dec91, size: 234 bytes, params: 1, frame: 23
const defaultImport = importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */;
const openLazy = defaultImport.openLazy;
const object2 = {};
object2.balance = balance;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const SymzJC = t.SymzJC;
object2.primaryButtonConfig = {buttonText: Reflect.apply(string, intl, [SymzJC]),
onButtonPress: onButtonPress_106514};
const object4 = {};
object4.buttonText = intl.string(t['/g10LC']);
object4.onButtonPress = onButtonPress_106515;
object2.secondaryButtonConfig = object4;
const COLLECTIBLES_SHOP = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).COLLECTIBLES_SHOP;
object2.source = COLLECTIBLES_SHOP;
Reflect.apply(openLazy, defaultImport, [_fun106512, 'BalanceWidgetActionSheet', object2]);
}
function _fun106516() { // fn#106516, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14240:3095, offset: 0x022deef2, size: 204 bytes, params: 1, frame: 19
var value3;
var defaultImport;
var object2;
var defaultImport3;
const value2 = undefined;
if ((env0_1 == null ? value2 : env0_1.id) != null) {
value3 = environment.__proto__;
defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
defaultImport.track(AnalyticEvents.COLLECTIBLES_SHOP_ELEMENT_CLICKED, {cta_name: 'wishlist header button',
page_type: currentScreen});
(importDefault(5080) /* metro dependency 5080: ModalActionCreators */).popAll();
defaultImport3 = importDefault(8743) /* metro dependency 8743: showUserProfileActionSheet */;
object2 = {};
object2.userId = env0_1.id;
object2.sourceAnalyticsLocations = [(importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).COLLECTIBLES_SHOP];
object2.initialSection = UserProfileSections.WISHLIST;
defaultImport3(object2);
function _fun106503(a0) { // fn#106503, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14240:304, offset: 0x022de551, size: 224 bytes, params: 2, frame: 17
const object = {};
const object2 = {'width': '100%', 'flexDirection': 'row', 'alignItems': 'center'};
const value = undefined;
let PX_8 = a0 ? (importDefault(697) /* metro dependency 697: native */).space.PX_8 : value;
object2.marginTop = PX_8;
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object2.paddingLeft = PX_8;
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object2.gap = PX_8;
object.headerTitleContainer = object2;
object.headerTitle = {flexShrink: 1};
const object4 = {'flexDirection': 'row', 'justifyContent': 'flex-end', 'alignItems': 'center'};
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object4.gap = PX_8;
PX_8 = a0 ? (importDefault(697) /* metro dependency 697: native */).space.PX_8 : value;
object4.marginTop = PX_8;
object.headerRightContainer = object4;
return object;
}
return value2;
}
function CollectiblesShopHeaderRightChildren(a0) { // fn#106517, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14240:3838, owner: CollectiblesShopHeaderRight.children, offset: 0x022defbe, size: 216 bytes, params: 2, frame: 19
const ref = a0.ref;
const value = Object.create(null);
value.ref = 0;
const value2 = copyDataProperties({}, a0, value, undefined);
const IconButton = (require(8341) /* metro dependency 8341: IconButtonNative */).IconButton;
const iconButtonProps = {ref: ref, ...value2};
iconButtonProps['variant'] = 'tertiary';
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
iconButtonProps['accessibilityLabel'] = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.nSFuC0);
iconButtonProps['size'] = 'sm';
const MenuIcon = (require(14044) /* metro dependency 14044: MenuIcon */).MenuIcon;
iconButtonProps['icon'] = <MenuIcon size="sm" color="redesign-button-tertiary-text" />;
return <IconButton {...iconButtonProps} />;
}
function CollectiblesShopHeaderTitle({currentScreen, youBarEnabled}) { // fn#106504, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14240:686, offset: 0x022de631, size: 301 bytes, params: 2, frame: 23
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const styles = useStyles(youBarEnabled);
const ShopIcon = (ShopIconModule).ShopIcon;
const shopIcon = <ShopIcon size="md" color="icon-strong" />;
const Heading = (TextModule).Heading;
const ORBS = CollectiblesMobileShopScreen.ORBS;
return (
<View style={styles.headerTitleContainer}>
{shopIcon}
<Heading
variant="redesign/heading-18/bold"
color="mobile-text-heading-primary"
maxFontSizeMultiplier={2}
lineClamp={1}
style={styles.headerTitle}
>
{currentScreen === ORBS ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.ElYQFS) : intl.string((require(1244) /* metro dependency 1244: indexNative */).t.pWG4ze)}
</Heading>
</View>
);
}
function _fun106519() { // fn#106519, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14240:4200, offset: 0x022df124, size: 50 bytes, params: 1, frame: 13
const binding = env0_1;
binding.setOptions({headerTitle: headerTitle_106520, headerRight: headerRight_106521});
}
function CollectiblesShopHeaderRight({currentScreen, youBarEnabled}) { // fn#106505, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14240:1120, offset: 0x022de75e, size: 606 bytes, params: 2, frame: 29
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const styles = useStyles(youBarEnabled);
const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() {
return UserStore.getCurrentUser();
}, []);
const useFetchVirtualCurrencyBalance = UseFetchVirtualCurrencyBalanceModule.useFetchVirtualCurrencyBalance;
const balance = Reflect.apply(useFetchVirtualCurrencyBalance, UseFetchVirtualCurrencyBalanceModule, []).balance;
const value4 = ReactModule.useMemo(_fun106507, [currentScreen]);
const value5 = ReactModule.useCallback(_fun106511, [balance]);
const value6 = ReactModule.useCallback(_fun106516, [currentScreen, value3?.id]);
const BalanceWidgetPillButton = (NativeModule).BalanceWidgetPillButton;
const balanceWidgetPillButton = <BalanceWidgetPillButton balance={balance} onPress={value5} />;
const r6 = value3 != null && ((IconButton) => <IconButton accessibilityLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['7lZ31J'])} variant="tertiary" size="sm" icon={((HeartIcon) => <HeartIcon size="sm" color="redesign-button-tertiary-text" />)((require(8663) /* metro dependency 8663: HeartIcon */).HeartIcon)} onPress={value6} />)((require(8341) /* metro dependency 8341: IconButtonNative */).IconButton);
const ContextMenu = (ContextMenuNativeModule).ContextMenu;
return (
<View style={styles.headerRightContainer}>
{balanceWidgetPillButton}
{r6}
<ContextMenu
items={value4}
align="below"
title={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.nSFuC0)}
keyboardShouldPersistTaps="handled"
key={currentScreen}
>
{children_106517}
</ContextMenu>
</View>
);
function _fun106507() { // fn#106507, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14240:1297, offset: 0x022de9bc, size: 395 bytes, params: 1, frame: 19
let object = {};
const value2 = undefined;
const intl = (IndexNativeModule).intl;
let string = intl.string;
const t = (IndexNativeModule).t;
object.label = Reflect.apply(string, intl, [t['xNiB/O']]);
object.action = function() {
var moduleValue = require(dependencyMap[15]);
var object = {};
var COLLECTIBLES_SHOP_MOBILE_FEATURED_PAGE_MENU_ITEM = importDefault(dependencyMap[16]).COLLECTIBLES_SHOP_MOBILE_FEATURED_PAGE_MENU_ITEM;
object.analyticsLocations = [COLLECTIBLES_SHOP_MOBILE_FEATURED_PAGE_MENU_ITEM];
object.analyticsSource = importDefault(dependencyMap[16]).COLLECTIBLES_SHOP_MOBILE_FEATURED_PAGE_MENU_ITEM;
object.screen = CollectiblesMobileShopScreen.FEATURED_PAGE;
moduleValue.openCollectiblesShopMobile(object);
};
let currentScreenBinding = currentScreen;
const FEATURED_PAGE = CollectiblesMobileShopScreen.FEATURED_PAGE;
let CheckmarkSmallIcon = currentScreenBinding !== FEATURED_PAGE ? value2 : (require(6742) /* metro dependency 6742: CheckmarkSmallIcon */).CheckmarkSmallIcon;
object.trailingIndicator = CheckmarkSmallIcon;
const items2 = [object];
object = {};
string = intl.string;
const RSyoZu = t.RSyoZu;
object.label = Reflect.apply(string, intl, [RSyoZu]);
object.action = function() {
var moduleValue = require(dependencyMap[15]);
var object = {};
var COLLECTIBLES_SHOP_MOBILE_SHOP_ALL_MENU_ITEM = importDefault(dependencyMap[16]).COLLECTIBLES_SHOP_MOBILE_SHOP_ALL_MENU_ITEM;
object.analyticsLocations = [COLLECTIBLES_SHOP_MOBILE_SHOP_ALL_MENU_ITEM];
object.analyticsSource = importDefault(dependencyMap[16]).COLLECTIBLES_SHOP_MOBILE_SHOP_ALL_MENU_ITEM;
object.screen = CollectiblesMobileShopScreen.SHOP_ALL;
moduleValue.openCollectiblesShopMobile(object);
};
currentScreenBinding = currentScreen;
const SHOP_ALL = CollectiblesMobileShopScreen.SHOP_ALL;
CheckmarkSmallIcon = currentScreenBinding !== SHOP_ALL ? value2 : (require(6742) /* metro dependency 6742: CheckmarkSmallIcon */).CheckmarkSmallIcon;
object.trailingIndicator = CheckmarkSmallIcon;
items2[1] = object;
object = {};
string = intl.string;
const EBYkzk = t.EBYkzk;
object.label = Reflect.apply(string, intl, [EBYkzk]);
object.action = function() {
var moduleValue = require(dependencyMap[15]);
var object = {};
var COLLECTIBLES_SHOP_MOBILE_ORBS_MENU_ITEM = importDefault(dependencyMap[16]).COLLECTIBLES_SHOP_MOBILE_ORBS_MENU_ITEM;
object.analyticsLocations = [COLLECTIBLES_SHOP_MOBILE_ORBS_MENU_ITEM];
object.analyticsSource = importDefault(dependencyMap[16]).COLLECTIBLES_SHOP_MOBILE_ORBS_MENU_ITEM;
object.screen = CollectiblesMobileShopScreen.ORBS;
moduleValue.openCollectiblesShopMobile(object);
};
currentScreenBinding = currentScreen;
const ORBS = CollectiblesMobileShopScreen.ORBS;
CheckmarkSmallIcon = currentScreenBinding !== ORBS ? value2 : (require(6742) /* metro dependency 6742: CheckmarkSmallIcon */).CheckmarkSmallIcon;
object.trailingIndicator = CheckmarkSmallIcon;
items2[2] = object;
return items2;
}
function _fun106512() { // fn#106512, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14240:2344, offset: 0x022ded7b, size: 64 bytes, params: 1, frame: 13
var environment;
let value = environment.__proto__.__proto__;
value = require(dependencyMap[20]);
value = value(dependencyMap[19], dependencyMap.paths);
return value.then(function(a0) {
return a0.default;
});
}
function _fun106511() { // fn#106511, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14240:2320, offset: 0x022dec91, size: 234 bytes, params: 1, frame: 23
const defaultImport = ActionSheetActionCreators;
const openLazy = defaultImport.openLazy;
const object = {};
object.balance = balance;
const intl = (IndexNativeModule).intl;
const string = intl.string;
const t = (IndexNativeModule).t;
const SymzJC = t.SymzJC;
object.primaryButtonConfig = {buttonText: Reflect.apply(string, intl, [SymzJC]),
onButtonPress: onButtonPress_106514};
const object3 = {};
object3.buttonText = intl.string(t['/g10LC']);
object3.onButtonPress = onButtonPress_106515;
object.secondaryButtonConfig = object3;
const COLLECTIBLES_SHOP = (AnalyticsLocation).COLLECTIBLES_SHOP;
object.source = COLLECTIBLES_SHOP;
Reflect.apply(openLazy, defaultImport, [_fun106512, 'BalanceWidgetActionSheet', object]);
function _fun106512() { // fn#106512, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14240:2344, offset: 0x022ded7b, size: 64 bytes, params: 1, frame: 13
var environment;
let value = environment.__proto__.__proto__;
value = require(dependencyMap[20]);
value = value(dependencyMap[19], dependencyMap.paths);
return value.then(function(a0) {
return a0.default;
});
}
function onButtonPress_106514() { // fn#106514, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14240:2518, offset: 0x022dedbb, size: 195 bytes, params: 1, frame: 18
var object2;
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
const track = defaultImport.track;
const ORB_BALANCE_ACTION_SHEET_ACTION = AnalyticEvents.ORB_BALANCE_ACTION_SHEET_ACTION;
const COLLECTIBLES_SHOP = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).COLLECTIBLES_SHOP;
Reflect.apply(track, defaultImport, [ORB_BALANCE_ACTION_SHEET_ACTION, {type: 'GO_TO_QUEST_HOME',
source: COLLECTIBLES_SHOP, balance: balance}]);
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
const questUtilsNativeModule = require(9480) /* metro dependency 9480: QuestUtilsNative */;
const openQuestHome = questUtilsNativeModule.openQuestHome;
object2 = {mergeExistingRoutes: true};
const VIRTUAL_CURRENCY = RewardFilterTypes.VIRTUAL_CURRENCY;
object2.filter = VIRTUAL_CURRENCY;
const QuestContent = (require(6531) /* metro dependency 6531: QuestTypes */).QuestContent;
const ORBS_BALANCE_MENU = QuestContent.ORBS_BALANCE_MENU;
object2.fromContent = ORBS_BALANCE_MENU;
Reflect.apply(openQuestHome, questUtilsNativeModule, [object2]);
}
function onButtonPress_106514() { // fn#106514, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14240:2518, offset: 0x022dedbb, size: 195 bytes, params: 1, frame: 18
const defaultImport = AnalyticsUtils;
const track = defaultImport.track;
const ORB_BALANCE_ACTION_SHEET_ACTION = AnalyticEvents.ORB_BALANCE_ACTION_SHEET_ACTION;
const COLLECTIBLES_SHOP = (AnalyticsLocation).COLLECTIBLES_SHOP;
Reflect.apply(track, defaultImport, [ORB_BALANCE_ACTION_SHEET_ACTION, {type: 'GO_TO_QUEST_HOME',
source: COLLECTIBLES_SHOP, balance: balance}]);
(ActionSheetActionCreators).hideActionSheet();
const openQuestHome = QuestUtilsNativeModule.openQuestHome;
object = {mergeExistingRoutes: true};
const VIRTUAL_CURRENCY = RewardFilterTypes.VIRTUAL_CURRENCY;
object.filter = VIRTUAL_CURRENCY;
const QuestContent = (QuestTypesModule).QuestContent;
const ORBS_BALANCE_MENU = QuestContent.ORBS_BALANCE_MENU;
object.fromContent = ORBS_BALANCE_MENU;
Reflect.apply(openQuestHome, QuestUtilsNativeModule, [object]);
}
function onButtonPress_106515() { // fn#106515, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14240:2890, offset: 0x022dee7e, size: 116 bytes, params: 1, frame: 17
let value = environment.__proto__.__proto__;
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
const track = defaultImport.track;
const ORB_BALANCE_ACTION_SHEET_ACTION = AnalyticEvents.ORB_BALANCE_ACTION_SHEET_ACTION;
const COLLECTIBLES_SHOP = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).COLLECTIBLES_SHOP;
value = environment.__proto__;
Reflect.apply(track, defaultImport, [ORB_BALANCE_ACTION_SHEET_ACTION, {type: 'GO_BACK', source: COLLECTIBLES_SHOP,
balance: balance}]);
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
}
function onButtonPress_106515() { // fn#106515, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14240:2890, offset: 0x022dee7e, size: 116 bytes, params: 1, frame: 17
let value = environment.__proto__.__proto__;
const defaultImport = AnalyticsUtils;
const track = defaultImport.track;
const ORB_BALANCE_ACTION_SHEET_ACTION = AnalyticEvents.ORB_BALANCE_ACTION_SHEET_ACTION;
const COLLECTIBLES_SHOP = (AnalyticsLocation).COLLECTIBLES_SHOP;
value = environment.__proto__;
Reflect.apply(track, defaultImport, [ORB_BALANCE_ACTION_SHEET_ACTION, {type: 'GO_BACK', source: COLLECTIBLES_SHOP,
balance: balance}]);
(ActionSheetActionCreators).hideActionSheet();
}
function headerTitle_106520() { // fn#106520, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14240:4231, offset: 0x022df156, size: 44 bytes, params: 1, frame: 14
return <CollectiblesShopHeaderTitle currentScreen={currentScreen} youBarEnabled={env1_2} />;
}
}
function _fun106516() { // fn#106516, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14240:3095, offset: 0x022deef2, size: 204 bytes, params: 1, frame: 19
var value3;
var defaultImport;
var object;
var defaultImport3;
const value2 = undefined;
if ((env0_1 == null ? value2 : env0_1.id) != null) {
value3 = environment.__proto__;
defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
defaultImport.track(AnalyticEvents.COLLECTIBLES_SHOP_ELEMENT_CLICKED, {cta_name: 'wishlist header button',
page_type: currentScreen});
(importDefault(5080) /* metro dependency 5080: ModalActionCreators */).popAll();
defaultImport3 = importDefault(8743) /* metro dependency 8743: showUserProfileActionSheet */;
object = {};
object.userId = env0_1.id;
object.sourceAnalyticsLocations = [(importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).COLLECTIBLES_SHOP];
object.initialSection = UserProfileSections.WISHLIST;
defaultImport3(object);
}
return value2;
}
function CollectiblesShopHeaderRightChildren(a0) { // fn#106517, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14240:3838, owner: CollectiblesShopHeaderRight.children, offset: 0x022defbe, size: 216 bytes, params: 2, frame: 19
const ref = a0.ref;
const value = Object.create(null);
value.ref = 0;
const value2 = copyDataProperties({}, a0, value, undefined);
const IconButton = (IconButtonNativeModule).IconButton;
const iconButtonProps = {ref: ref, ...value2};
iconButtonProps['variant'] = 'tertiary';
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
iconButtonProps['accessibilityLabel'] = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.nSFuC0);
iconButtonProps['size'] = 'sm';
const MenuIcon = (MenuIconModule).MenuIcon;
iconButtonProps['icon'] = <MenuIcon size="sm" color="redesign-button-tertiary-text" />;
return <IconButton {...iconButtonProps} />;
}
}
function _default_106518() { // fn#106518, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14240:4071, offset: 0x022df096, size: 142 bytes, params: 1, frame: 17
const value = a0;
ReactModule.useLayoutEffect(_fun106519,
[(require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation(),
(value !== undefined ? value : {}).currentScreen,
(require(5176) /* metro dependency 5176: YouBarExperiment */).useYouBarEnabled('CollectiblesShopHeader')]);
function _fun106519() { // fn#106519, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14240:4200, offset: 0x022df124, size: 50 bytes, params: 1, frame: 13
const binding = env0_1;
binding.setOptions({headerTitle: headerTitle_106520, headerRight: headerRight_106521});
function headerTitle_106520() { // fn#106520, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14240:4231, offset: 0x022df156, size: 44 bytes, params: 1, frame: 14
return <CollectiblesShopHeaderTitle currentScreen={currentScreen} youBarEnabled={env1_2} />;
}
function headerRight_106521() { // fn#106521, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14240:4312, offset: 0x022df182, size: 44 bytes, params: 1, frame: 14
return <CollectiblesShopHeaderRight currentScreen={currentScreen} youBarEnabled={env1_2} />;
}
}
}
function headerRight_106521() { // fn#106521, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14240:4312, offset: 0x022df182, size: 44 bytes, params: 1, frame: 14
return <CollectiblesShopHeaderRight currentScreen={currentScreen} youBarEnabled={env1_2} />;
}
global.__d(_fun106502, 14043, [31, 27, 1878, 663, 661, 6528, 8516, 33, 4501, 697, 10358, 4573, 1244, 566, 10070,
5120, 6789, 6742, 4080, 10135, 1962, 683, 9480, 6531, 5080, 8743, 10123, 8341, 8663, 8811, 14044, 1484, 5176,
2]) /* metro module 14043, dependencies: [31, 27, 1878, 663, 661, 6528, 8516, 33, 4501, 697, 10358, 4573, 1244, 566, 10070, 5120, 6789, 6742, 4080, 10135, 1962, 683, 9480, 6531, 5080, 8743, 10123, 8341, 8663, 8811, 14044, 1484, 5176, 2] */;
@@ -1,329 +1,337 @@
/* Metro module 10146; source: modules/collectibles/native/useHandleBuyNow.tsx; dependencies: [5, 57, 31, 661, 3, 10147, 5120, 4080, 7589, 1581, 6906, 3817, 3857, 1244, 2] */
import Logger from '../../debug/Logger.tsx'; /* Metro dependency 3 */
import Module00005 from '../../../by-id/module-00005.js'; /* Metro dependency 5 */
import Module00057 from '../../../by-id/module-00057.js'; /* Metro dependency 57 */
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 */
function _fun79086(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#79086, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10332:6, offset: 0x01e447f3, size: 225 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(5) /* metro dependency 5 */;
const env0_4 = importDefault(57) /* metro dependency 57 */;
const env0_5 = importAll(31) /* metro dependency 31 */;
const env0_6 = (require(661) /* metro dependency 661: Constants */).Routes;
let value = importDefault(3) /* metro dependency 3: Logger */;
let value = Logger;
value = new value('useHandleBuyNow');
const closure = useHandleBuyNow;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/useHandleBuyNow.tsx');
exports.default = closure;
exports.useHandleBuyNow = closure;
}
const useHandleBuyNow2 = useHandleBuyNow;
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/native/useHandleBuyNow.tsx');
exports.default = useHandleBuyNow2;
exports.useHandleBuyNow = useHandleBuyNow2;
function useHandleBuyNow({product, analyticsLocations, onBuy, orderId}) { // fn#79087, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10332:195, offset: 0x01e448d4, size: 255 bytes, params: 2, frame: 21
const [property, env0_3] = Module00057(ReactModule.useState(false), 2);
const value4 = (importDefault(10147) /* metro dependency 10147: useMobileCollectiblesPurchaseSKUAndroid */)({product: product,
analyticsLocations: analyticsLocations, onPurchaseComplete: function() {
return _onPurchaseComplete.apply(this, arguments);
}, onPurchaseError: onPurchaseError_79092, onPurchasePending: function() {
}, orderId: orderId});
const useCallback = ReactModule.useCallback;
return {handleBuyNow: Reflect.apply(useCallback, ReactModule, [env0_3(_fun79095), [value4, property, onBuy,
product.skuId]]), isBuying: property};
function _onPurchaseComplete() { // fn#79088, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10332:546, owner: useHandleBuyNow._onPurchaseComplete, offset: 0x01e449d3, size: 53 bytes, params: 1, frame: 13
var environment;
const value = environment.__proto__;
return env1_3(_fun79090).apply(this, arguments);
function* _fun79090() { // fn#79090, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10332:607, offset: 0x01e44a13, size: 149 bytes, params: 1, frame: 16
if (true) {
value = environment.__proto__.__proto__.__proto__;
var binding = env3_0;
var value3 = binding(env3_2[6]);
yield value3.fetchCollectiblesPurchases();
if (false) {
return undefined;
}
env2_3(false);
binding = env3_1;
var binding2 = env3_2;
binding(binding2[7]).hideActionSheet();
value = binding(binding2[8]);
value.open({product: require, useCategoryImage: true});
}
}
function useHandleBuyNow({product, analyticsLocations, onBuy, orderId}) { // fn#79087, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10332:195, offset: 0x01e448d4, size: 255 bytes, params: 2, frame: 21
const binding = env0_5;
const [property, env0_3] = env0_4(binding.useState(false), 2);
const value4 = (importDefault(10147) /* metro dependency 10147: useMobileCollectiblesPurchaseSKUAndroid */)({product: product,
analyticsLocations: analyticsLocations, onPurchaseComplete: function() {
return _onPurchaseComplete.apply(this, arguments);
}, onPurchaseError: onPurchaseError, onPurchasePending: function() {
}, orderId: orderId});
const useCallback = binding.useCallback;
return {handleBuyNow: Reflect.apply(useCallback, binding, [env0_3(_fun79095), [value4, property, onBuy,
product.skuId]]), isBuying: property};
}
}
function _onPurchaseComplete() { // fn#79088, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10332:546, owner: useHandleBuyNow._onPurchaseComplete, offset: 0x01e449d3, size: 53 bytes, params: 1, frame: 13
var environment;
const value = environment.__proto__;
return env1_3(_fun79090).apply(this, arguments);
}
function useHandleBuyNowOnPurchaseError() { // fn#79092, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10332:451, owner: useHandleBuyNow.onPurchaseError, offset: 0x01e44aa8, size: 18 bytes, params: 1, frame: 11
env0_3(false);
}
function* _fun79095() { // fn#79095, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10332:803, offset: 0x01e44ac5, size: 619 bytes, params: 1, frame: 21
var binding;
var value3;
var isMetaQuest;
var value4;
var value5;
var value6;
var value7;
var value8;
var error;
var error2;
var JSON;
var stringify;
var value9;
var HermesInternal;
var concat;
var captureBillingException;
var object2;
var skuId;
var COLLECTIBLES_SHOP;
var value10;
var value11;
var binding2;
var property;
var value12;
var redirectWithHandoffToken;
var value13;
var value14;
var value15;
var binding3;
var value16;
var hideActionSheet;
var error3;
var value17;
var binding4;
var value18;
var value19;
var binding5;
var open;
var intl;
var string;
var t;
let value = undefined;
if (false) {
return value;
}
reduciblePort53: while (true) {
exceptionLanding52: while (true) {
exceptionLanding20: while (true) {
value = environment.__proto__.__proto__;
function* _fun79095() { // fn#79095, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10332:803, offset: 0x01e44ac5, size: 619 bytes, params: 1, frame: 21
var binding;
var value3;
var isMetaQuest;
var value4;
var value5;
var value6;
var value7;
var value8;
var error;
var error2;
var JSON;
var stringify;
var value9;
var HermesInternal;
var concat;
var captureBillingException;
var object;
var skuId;
var COLLECTIBLES_SHOP;
var value10;
var value11;
var binding2;
var property;
var value12;
var redirectWithHandoffToken;
var value13;
var value14;
var value15;
var binding3;
var value16;
var hideActionSheet;
var error3;
var value17;
var binding4;
var value18;
var value19;
var binding5;
var open;
var intl;
var string;
var t;
let value = undefined;
if (false) {
return value;
}
reduciblePort53: while (true) {
exceptionLanding52: while (true) {
exceptionLanding20: while (true) {
value = environment.__proto__.__proto__;
binding = env2_0;
value3 = binding(env2_2[9]);
isMetaQuest = value3.isMetaQuest;
if (Reflect.apply(isMetaQuest, value3, [])) {
try {
binding = env2_6;
} catch (error) {
break exceptionLanding52;
}
try {
COLLECTIBLES_SHOP = binding.COLLECTIBLES_SHOP;
} catch (error) {
break exceptionLanding52;
}
value10 = environment.__proto__;
try {
} catch (error) {
break exceptionLanding52;
}
try {
skuId = require.skuId;
} catch (error) {
break exceptionLanding52;
}
try {
HermesInternal = global.HermesInternal;
} catch (error) {
break exceptionLanding52;
}
try {
concat = HermesInternal.concat;
} catch (error) {
break exceptionLanding52;
}
try {
value11 = '' + COLLECTIBLES_SHOP + '#itemSkuId=' + skuId;
} catch (error) {
break exceptionLanding52;
}
try {
binding = env2_1;
} catch (error) {
break exceptionLanding52;
}
try {
binding2 = env2_2;
} catch (error) {
break exceptionLanding52;
}
try {
property = binding2[10];
} catch (error) {
break exceptionLanding52;
}
try {
value12 = binding(property);
} catch (error) {
break exceptionLanding52;
}
try {
redirectWithHandoffToken = value12.redirectWithHandoffToken;
} catch (error) {
break exceptionLanding52;
}
try {
object = {};
} catch (error) {
break exceptionLanding52;
}
try {
object.forceExternalBrowser = true;
} catch (error) {
break exceptionLanding52;
}
try {
value13 = Reflect.apply(redirectWithHandoffToken, value12, [value11, object]);
} catch (error) {
break exceptionLanding52;
}
yield value13;
try {
value14 = undefined;
value15 = false;
} catch (error) {
break exceptionLanding52;
}
if (value15) {
return value14;
}
try {
binding = env2_1;
} catch (error) {
break exceptionLanding52;
}
try {
binding3 = env2_2;
} catch (error) {
break exceptionLanding52;
}
try {
property = binding3[7];
} catch (error) {
break exceptionLanding52;
}
try {
value16 = binding(property);
} catch (error) {
break exceptionLanding52;
}
try {
hideActionSheet = value16.hideActionSheet;
} catch (error) {
break exceptionLanding52;
}
try {
Reflect.apply(hideActionSheet, value16, []);
} catch (error) {
break exceptionLanding52;
}
break reduciblePort53;
}
value4 = environment.__proto__;
try {
} catch (error) {
break exceptionLanding20;
}
if (dependencyMap) {
break reduciblePort53;
}
try {
binding = env1_3;
} catch (error) {
break exceptionLanding20;
}
try {
binding(true);
} catch (error) {
break exceptionLanding20;
}
try {
binding = env1_4;
} catch (error) {
break exceptionLanding20;
}
try {
value5 = binding();
} catch (error) {
break exceptionLanding20;
}
yield value5;
try {
value6 = undefined;
value7 = false;
} catch (error) {
break exceptionLanding20;
}
if (value7) {
return value6;
}
try {
} catch (error) {
break exceptionLanding20;
}
try {
value8 = importDefault == null;
} catch (error) {
break exceptionLanding20;
}
if (value8) {
break reduciblePort53;
}
try {
} catch (error) {
break exceptionLanding20;
}
try {
importDefault();
} catch (error) {
break exceptionLanding20;
}
break reduciblePort53;
}
env1_3(false);
binding = env2_7;
error2 = binding.error;
JSON = global.JSON;
stringify = JSON.stringify;
value9 = Reflect.apply(stringify, JSON, [error]);
HermesInternal = global.HermesInternal;
concat = HermesInternal.concat;
Reflect.apply(error2, binding, ['Error running purchase: ' + value9]);
binding = env2_0;
value = binding(env2_2[11]);
captureBillingException = value.captureBillingException;
skuId = require.skuId;
Reflect.apply(captureBillingException, value, [error, {tags: {source: 'useHandleBuyNow', skuId: skuId}}]);
break reduciblePort53;
}
binding = env2_7;
error3 = binding.error;
JSON = global.JSON;
stringify = JSON.stringify;
value17 = Reflect.apply(stringify, JSON, [error]);
HermesInternal = global.HermesInternal;
concat = HermesInternal.concat;
Reflect.apply(error3, binding, ['Error performing web handoff: ' + value17]);
binding = env2_0;
value3 = binding(env2_2[9]);
isMetaQuest = value3.isMetaQuest;
if (Reflect.apply(isMetaQuest, value3, [])) {
try {
binding = env2_6;
} catch (error) {
break exceptionLanding52;
}
try {
COLLECTIBLES_SHOP = binding.COLLECTIBLES_SHOP;
} catch (error) {
break exceptionLanding52;
}
value10 = environment.__proto__;
try {
} catch (error) {
break exceptionLanding52;
}
try {
skuId = require.skuId;
} catch (error) {
break exceptionLanding52;
}
try {
HermesInternal = global.HermesInternal;
} catch (error) {
break exceptionLanding52;
}
try {
concat = HermesInternal.concat;
} catch (error) {
break exceptionLanding52;
}
try {
value11 = '' + COLLECTIBLES_SHOP + '#itemSkuId=' + skuId;
} catch (error) {
break exceptionLanding52;
}
try {
binding = env2_1;
} catch (error) {
break exceptionLanding52;
}
try {
binding2 = env2_2;
} catch (error) {
break exceptionLanding52;
}
try {
property = binding2[10];
} catch (error) {
break exceptionLanding52;
}
try {
value12 = binding(property);
} catch (error) {
break exceptionLanding52;
}
try {
redirectWithHandoffToken = value12.redirectWithHandoffToken;
} catch (error) {
break exceptionLanding52;
}
try {
object2 = {};
} catch (error) {
break exceptionLanding52;
}
try {
object2.forceExternalBrowser = true;
} catch (error) {
break exceptionLanding52;
}
try {
value13 = Reflect.apply(redirectWithHandoffToken, value12, [value11, object2]);
} catch (error) {
break exceptionLanding52;
}
yield value13;
try {
value14 = undefined;
value15 = false;
} catch (error) {
break exceptionLanding52;
}
if (value15) {
return value14;
}
try {
binding = env2_1;
} catch (error) {
break exceptionLanding52;
}
try {
binding3 = env2_2;
} catch (error) {
break exceptionLanding52;
}
try {
property = binding3[7];
} catch (error) {
break exceptionLanding52;
}
try {
value16 = binding(property);
} catch (error) {
break exceptionLanding52;
}
try {
hideActionSheet = value16.hideActionSheet;
} catch (error) {
break exceptionLanding52;
}
try {
Reflect.apply(hideActionSheet, value16, []);
} catch (error) {
break exceptionLanding52;
}
break reduciblePort53;
}
value4 = environment.__proto__;
try {
} catch (error) {
break exceptionLanding20;
}
if (dependencyMap) {
break reduciblePort53;
}
try {
binding = env1_3;
} catch (error) {
break exceptionLanding20;
}
try {
binding(true);
} catch (error) {
break exceptionLanding20;
}
try {
binding = env1_4;
} catch (error) {
break exceptionLanding20;
}
try {
value5 = binding();
} catch (error) {
break exceptionLanding20;
}
yield value5;
try {
value6 = undefined;
value7 = false;
} catch (error) {
break exceptionLanding20;
}
if (value7) {
return value6;
}
try {
} catch (error) {
break exceptionLanding20;
}
try {
value8 = importDefault == null;
} catch (error) {
break exceptionLanding20;
}
if (value8) {
break reduciblePort53;
}
try {
} catch (error) {
break exceptionLanding20;
}
try {
importDefault();
} catch (error) {
break exceptionLanding20;
}
binding4 = env2_2;
value18 = binding(binding4[11]);
captureBillingException = value18.captureBillingException;
value19 = environment.__proto__;
skuId = require.skuId;
Reflect.apply(captureBillingException, value18, [error, {tags: {source: 'useHandleBuyNow', skuId: skuId}}]);
binding5 = env2_1;
value = binding5(binding4[12]);
open = value.open;
intl = binding(binding4[13]).intl;
string = intl.string;
t = binding(binding4[13]).t;
Reflect.apply(open, value, [{key: 'SHOP_ITEM_HANDOFF_ERROR', content: Reflect.apply(string, intl,
[t['rTU7/z']])}]);
break reduciblePort53;
}
env1_3(false);
binding = env2_7;
error2 = binding.error;
JSON = global.JSON;
stringify = JSON.stringify;
value9 = Reflect.apply(stringify, JSON, [error]);
HermesInternal = global.HermesInternal;
concat = HermesInternal.concat;
Reflect.apply(error2, binding, ['Error running purchase: ' + value9]);
binding = env2_0;
value = binding(env2_2[11]);
captureBillingException = value.captureBillingException;
skuId = require.skuId;
Reflect.apply(captureBillingException, value, [error, {tags: {source: 'useHandleBuyNow', skuId: skuId}}]);
break reduciblePort53;
}
binding = env2_7;
error3 = binding.error;
JSON = global.JSON;
stringify = JSON.stringify;
value17 = Reflect.apply(stringify, JSON, [error]);
HermesInternal = global.HermesInternal;
concat = HermesInternal.concat;
Reflect.apply(error3, binding, ['Error performing web handoff: ' + value17]);
binding = env2_0;
binding4 = env2_2;
value18 = binding(binding4[11]);
captureBillingException = value18.captureBillingException;
value19 = environment.__proto__;
skuId = require.skuId;
Reflect.apply(captureBillingException, value18, [error, {tags: {source: 'useHandleBuyNow', skuId: skuId}}]);
binding5 = env2_1;
value = binding5(binding4[12]);
open = value.open;
intl = binding(binding4[13]).intl;
string = intl.string;
t = binding(binding4[13]).t;
Reflect.apply(open, value, [{key: 'SHOP_ITEM_HANDOFF_ERROR', content: Reflect.apply(string, intl,
[t['rTU7/z']])}]);
break reduciblePort53;
}
}
function* _fun79090() { // fn#79090, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10332:607, offset: 0x01e44a13, size: 149 bytes, params: 1, frame: 16
if (true) {
value = environment.__proto__.__proto__.__proto__;
var binding = env3_0;
var value3 = binding(env3_2[6]);
yield value3.fetchCollectiblesPurchases();
if (false) {
return undefined;
}
env2_3(false);
binding = env3_1;
var binding2 = env3_2;
binding(binding2[7]).hideActionSheet();
value = binding(binding2[8]);
value.open({product: require, useCategoryImage: true});
}
}
global.__d(_fun79086, 10146, [5, 57, 31, 661, 3, 10147, 5120, 4080, 7589, 1581, 6906, 3817, 3857, 1244,
2]) /* metro module 10146, dependencies: [5, 57, 31, 661, 3, 10147, 5120, 4080, 7589, 1581, 6906, 3817, 3857, 1244, 2] */;
@@ -1,497 +1,501 @@
/* Metro module 10149; source: modules/collectibles/native/useHandleClaim.tsx; dependencies: [5, 31, 5120, 4080, 7589, 3857, 1244, 2] */
import Module00005 from '../../../by-id/module-00005.js'; /* Metro dependency 5 */
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 */
function _fun79109(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#79109, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10335:6, offset: 0x01e455da, size: 137 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 = importAll(31) /* metro dependency 31 */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/useHandleClaim.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/native/useHandleClaim.tsx');
exports.useHandleClaim = useHandleClaim;
}
function useHandleClaim({product}) { // fn#79110, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10335:213, offset: 0x01e45663, size: 68 bytes, params: 2, frame: 16
const object = {};
object.handleClaim = ReactModule.useCallback(Module00005(_fun79112), [product]);
return object;
function* _fun79112() { // fn#79112, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10335:259, offset: 0x01e456b2, size: 280 bytes, params: 1, frame: 18
var binding;
var binding2;
var property;
var value3;
var claimPremiumCollectiblesProduct;
var skuId;
var value5;
var value6;
var value7;
var binding3;
var value8;
var hideActionSheet;
var value9;
var open;
var object;
var value10;
var fetchCollectiblesPurchases;
var error;
var binding4;
var value11;
var intl;
var string;
var t;
var CKsXk3;
if (true) {
value = environment.__proto__.__proto__;
try {
binding = env2_0;
} catch (error) {
binding = env2_1;
binding4 = env2_2;
value11 = binding(binding4[5]);
open = value11.open;
binding = env2_0;
intl = binding(binding4[6]).intl;
string = intl.string;
t = binding(binding4[6]).t;
CKsXk3 = t.CKsXk3;
Reflect.apply(open, value11, [{key: 'collectible shop claim error', content: Reflect.apply(string, intl,
[CKsXk3])}]);
return undefined;
}
try {
binding2 = env2_2;
} catch (error) {
binding = env2_1;
binding4 = env2_2;
value11 = binding(binding4[5]);
open = value11.open;
binding = env2_0;
intl = binding(binding4[6]).intl;
string = intl.string;
t = binding(binding4[6]).t;
CKsXk3 = t.CKsXk3;
Reflect.apply(open, value11, [{key: 'collectible shop claim error', content: Reflect.apply(string, intl,
[CKsXk3])}]);
return undefined;
}
try {
property = binding2[2];
} catch (error) {
binding = env2_1;
binding4 = env2_2;
value11 = binding(binding4[5]);
open = value11.open;
binding = env2_0;
intl = binding(binding4[6]).intl;
string = intl.string;
t = binding(binding4[6]).t;
CKsXk3 = t.CKsXk3;
Reflect.apply(open, value11, [{key: 'collectible shop claim error', content: Reflect.apply(string, intl,
[CKsXk3])}]);
return undefined;
}
try {
value3 = binding(property);
} catch (error) {
binding = env2_1;
binding4 = env2_2;
value11 = binding(binding4[5]);
open = value11.open;
binding = env2_0;
intl = binding(binding4[6]).intl;
string = intl.string;
t = binding(binding4[6]).t;
CKsXk3 = t.CKsXk3;
Reflect.apply(open, value11, [{key: 'collectible shop claim error', content: Reflect.apply(string, intl,
[CKsXk3])}]);
return undefined;
}
try {
claimPremiumCollectiblesProduct = value3.claimPremiumCollectiblesProduct;
} catch (error) {
binding = env2_1;
binding4 = env2_2;
value11 = binding(binding4[5]);
open = value11.open;
binding = env2_0;
intl = binding(binding4[6]).intl;
string = intl.string;
t = binding(binding4[6]).t;
CKsXk3 = t.CKsXk3;
Reflect.apply(open, value11, [{key: 'collectible shop claim error', content: Reflect.apply(string, intl,
[CKsXk3])}]);
return undefined;
}
try {
} catch (error) {
binding = env2_1;
binding4 = env2_2;
value11 = binding(binding4[5]);
open = value11.open;
binding = env2_0;
intl = binding(binding4[6]).intl;
string = intl.string;
t = binding(binding4[6]).t;
CKsXk3 = t.CKsXk3;
Reflect.apply(open, value11, [{key: 'collectible shop claim error', content: Reflect.apply(string, intl,
[CKsXk3])}]);
return undefined;
}
try {
skuId = require.skuId;
} catch (error) {
binding = env2_1;
binding4 = env2_2;
value11 = binding(binding4[5]);
open = value11.open;
binding = env2_0;
intl = binding(binding4[6]).intl;
string = intl.string;
t = binding(binding4[6]).t;
CKsXk3 = t.CKsXk3;
Reflect.apply(open, value11, [{key: 'collectible shop claim error', content: Reflect.apply(string, intl,
[CKsXk3])}]);
return undefined;
}
try {
value5 = Reflect.apply(claimPremiumCollectiblesProduct, value3, [skuId]);
} catch (error) {
binding = env2_1;
binding4 = env2_2;
value11 = binding(binding4[5]);
open = value11.open;
binding = env2_0;
intl = binding(binding4[6]).intl;
string = intl.string;
t = binding(binding4[6]).t;
CKsXk3 = t.CKsXk3;
Reflect.apply(open, value11, [{key: 'collectible shop claim error', content: Reflect.apply(string, intl,
[CKsXk3])}]);
return undefined;
}
yield value5;
try {
value6 = undefined;
value7 = false;
} catch (error) {
binding = env2_1;
binding4 = env2_2;
value11 = binding(binding4[5]);
open = value11.open;
binding = env2_0;
intl = binding(binding4[6]).intl;
string = intl.string;
t = binding(binding4[6]).t;
CKsXk3 = t.CKsXk3;
Reflect.apply(open, value11, [{key: 'collectible shop claim error', content: Reflect.apply(string, intl,
[CKsXk3])}]);
return undefined;
}
if (value7) {
return value6;
}
try {
binding = env2_1;
} catch (error) {
binding = env2_1;
binding4 = env2_2;
value11 = binding(binding4[5]);
open = value11.open;
binding = env2_0;
intl = binding(binding4[6]).intl;
string = intl.string;
t = binding(binding4[6]).t;
CKsXk3 = t.CKsXk3;
Reflect.apply(open, value11, [{key: 'collectible shop claim error', content: Reflect.apply(string, intl,
[CKsXk3])}]);
return undefined;
}
try {
binding3 = env2_2;
} catch (error) {
binding = env2_1;
binding4 = env2_2;
value11 = binding(binding4[5]);
open = value11.open;
binding = env2_0;
intl = binding(binding4[6]).intl;
string = intl.string;
t = binding(binding4[6]).t;
CKsXk3 = t.CKsXk3;
Reflect.apply(open, value11, [{key: 'collectible shop claim error', content: Reflect.apply(string, intl,
[CKsXk3])}]);
return undefined;
}
try {
property = binding3[3];
} catch (error) {
binding = env2_1;
binding4 = env2_2;
value11 = binding(binding4[5]);
open = value11.open;
binding = env2_0;
intl = binding(binding4[6]).intl;
string = intl.string;
t = binding(binding4[6]).t;
CKsXk3 = t.CKsXk3;
Reflect.apply(open, value11, [{key: 'collectible shop claim error', content: Reflect.apply(string, intl,
[CKsXk3])}]);
return undefined;
}
try {
value8 = binding(property);
} catch (error) {
binding = env2_1;
binding4 = env2_2;
value11 = binding(binding4[5]);
open = value11.open;
binding = env2_0;
intl = binding(binding4[6]).intl;
string = intl.string;
t = binding(binding4[6]).t;
CKsXk3 = t.CKsXk3;
Reflect.apply(open, value11, [{key: 'collectible shop claim error', content: Reflect.apply(string, intl,
[CKsXk3])}]);
return undefined;
}
try {
hideActionSheet = value8.hideActionSheet;
} catch (error) {
binding = env2_1;
binding4 = env2_2;
value11 = binding(binding4[5]);
open = value11.open;
binding = env2_0;
intl = binding(binding4[6]).intl;
string = intl.string;
t = binding(binding4[6]).t;
CKsXk3 = t.CKsXk3;
Reflect.apply(open, value11, [{key: 'collectible shop claim error', content: Reflect.apply(string, intl,
[CKsXk3])}]);
return undefined;
}
try {
Reflect.apply(hideActionSheet, value8, []);
} catch (error) {
binding = env2_1;
binding4 = env2_2;
value11 = binding(binding4[5]);
open = value11.open;
binding = env2_0;
intl = binding(binding4[6]).intl;
string = intl.string;
t = binding(binding4[6]).t;
CKsXk3 = t.CKsXk3;
Reflect.apply(open, value11, [{key: 'collectible shop claim error', content: Reflect.apply(string, intl,
[CKsXk3])}]);
return undefined;
}
try {
property = binding3[4];
} catch (error) {
binding = env2_1;
binding4 = env2_2;
value11 = binding(binding4[5]);
open = value11.open;
binding = env2_0;
intl = binding(binding4[6]).intl;
string = intl.string;
t = binding(binding4[6]).t;
CKsXk3 = t.CKsXk3;
Reflect.apply(open, value11, [{key: 'collectible shop claim error', content: Reflect.apply(string, intl,
[CKsXk3])}]);
return undefined;
}
try {
value9 = binding(property);
} catch (error) {
binding = env2_1;
binding4 = env2_2;
value11 = binding(binding4[5]);
open = value11.open;
binding = env2_0;
intl = binding(binding4[6]).intl;
string = intl.string;
t = binding(binding4[6]).t;
CKsXk3 = t.CKsXk3;
Reflect.apply(open, value11, [{key: 'collectible shop claim error', content: Reflect.apply(string, intl,
[CKsXk3])}]);
return undefined;
}
try {
open = value9.open;
} catch (error) {
binding = env2_1;
binding4 = env2_2;
value11 = binding(binding4[5]);
open = value11.open;
binding = env2_0;
intl = binding(binding4[6]).intl;
string = intl.string;
t = binding(binding4[6]).t;
CKsXk3 = t.CKsXk3;
Reflect.apply(open, value11, [{key: 'collectible shop claim error', content: Reflect.apply(string, intl,
[CKsXk3])}]);
return undefined;
}
try {
object = {};
} catch (error) {
binding = env2_1;
binding4 = env2_2;
value11 = binding(binding4[5]);
open = value11.open;
binding = env2_0;
intl = binding(binding4[6]).intl;
string = intl.string;
t = binding(binding4[6]).t;
CKsXk3 = t.CKsXk3;
Reflect.apply(open, value11, [{key: 'collectible shop claim error', content: Reflect.apply(string, intl,
[CKsXk3])}]);
return undefined;
}
try {
} catch (error) {
binding = env2_1;
binding4 = env2_2;
value11 = binding(binding4[5]);
open = value11.open;
binding = env2_0;
intl = binding(binding4[6]).intl;
string = intl.string;
t = binding(binding4[6]).t;
CKsXk3 = t.CKsXk3;
Reflect.apply(open, value11, [{key: 'collectible shop claim error', content: Reflect.apply(string, intl,
[CKsXk3])}]);
return undefined;
}
try {
object.product = require;
} catch (error) {
binding = env2_1;
binding4 = env2_2;
value11 = binding(binding4[5]);
open = value11.open;
binding = env2_0;
intl = binding(binding4[6]).intl;
string = intl.string;
t = binding(binding4[6]).t;
CKsXk3 = t.CKsXk3;
Reflect.apply(open, value11, [{key: 'collectible shop claim error', content: Reflect.apply(string, intl,
[CKsXk3])}]);
return undefined;
}
try {
object.useCategoryImage = true;
} catch (error) {
binding = env2_1;
binding4 = env2_2;
value11 = binding(binding4[5]);
open = value11.open;
binding = env2_0;
intl = binding(binding4[6]).intl;
string = intl.string;
t = binding(binding4[6]).t;
CKsXk3 = t.CKsXk3;
Reflect.apply(open, value11, [{key: 'collectible shop claim error', content: Reflect.apply(string, intl,
[CKsXk3])}]);
return undefined;
}
try {
Reflect.apply(open, value9, [object]);
} catch (error) {
binding = env2_1;
binding4 = env2_2;
value11 = binding(binding4[5]);
open = value11.open;
binding = env2_0;
intl = binding(binding4[6]).intl;
string = intl.string;
t = binding(binding4[6]).t;
CKsXk3 = t.CKsXk3;
Reflect.apply(open, value11, [{key: 'collectible shop claim error', content: Reflect.apply(string, intl,
[CKsXk3])}]);
return undefined;
}
try {
binding = env2_0;
} catch (error) {
binding = env2_1;
binding4 = env2_2;
value11 = binding(binding4[5]);
open = value11.open;
binding = env2_0;
intl = binding(binding4[6]).intl;
string = intl.string;
t = binding(binding4[6]).t;
CKsXk3 = t.CKsXk3;
Reflect.apply(open, value11, [{key: 'collectible shop claim error', content: Reflect.apply(string, intl,
[CKsXk3])}]);
return undefined;
}
try {
property = binding3[2];
} catch (error) {
binding = env2_1;
binding4 = env2_2;
value11 = binding(binding4[5]);
open = value11.open;
binding = env2_0;
intl = binding(binding4[6]).intl;
string = intl.string;
t = binding(binding4[6]).t;
CKsXk3 = t.CKsXk3;
Reflect.apply(open, value11, [{key: 'collectible shop claim error', content: Reflect.apply(string, intl,
[CKsXk3])}]);
return undefined;
}
try {
value10 = binding(property);
} catch (error) {
binding = env2_1;
binding4 = env2_2;
value11 = binding(binding4[5]);
open = value11.open;
binding = env2_0;
intl = binding(binding4[6]).intl;
string = intl.string;
t = binding(binding4[6]).t;
CKsXk3 = t.CKsXk3;
Reflect.apply(open, value11, [{key: 'collectible shop claim error', content: Reflect.apply(string, intl,
[CKsXk3])}]);
return undefined;
}
try {
fetchCollectiblesPurchases = value10.fetchCollectiblesPurchases;
} catch (error) {
binding = env2_1;
binding4 = env2_2;
value11 = binding(binding4[5]);
open = value11.open;
binding = env2_0;
intl = binding(binding4[6]).intl;
string = intl.string;
t = binding(binding4[6]).t;
CKsXk3 = t.CKsXk3;
Reflect.apply(open, value11, [{key: 'collectible shop claim error', content: Reflect.apply(string, intl,
[CKsXk3])}]);
return undefined;
}
try {
Reflect.apply(fetchCollectiblesPurchases, value10, []);
} catch (error) {
binding = env2_1;
binding4 = env2_2;
value11 = binding(binding4[5]);
open = value11.open;
binding = env2_0;
intl = binding(binding4[6]).intl;
string = intl.string;
t = binding(binding4[6]).t;
CKsXk3 = t.CKsXk3;
Reflect.apply(open, value11, [{key: 'collectible shop claim error', content: Reflect.apply(string, intl,
[CKsXk3])}]);
}
}
}
function useHandleClaim({product}) { // fn#79110, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10335:213, offset: 0x01e45663, size: 68 bytes, params: 2, frame: 16
const object2 = {};
object2.handleClaim = env0_4.useCallback(env0_3(_fun79112), [product]);
return object2;
}
function* _fun79112() { // fn#79112, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10335:259, offset: 0x01e456b2, size: 280 bytes, params: 1, frame: 18
var binding;
var binding2;
var property;
var value3;
var claimPremiumCollectiblesProduct;
var skuId;
var value5;
var value6;
var value7;
var binding3;
var value8;
var hideActionSheet;
var value9;
var open;
var object2;
var value10;
var fetchCollectiblesPurchases;
var error;
var binding4;
var value11;
var intl;
var string;
var t;
var CKsXk3;
if (true) {
value = environment.__proto__.__proto__;
try {
binding = env2_0;
} catch (error) {
binding = env2_1;
binding4 = env2_2;
value11 = binding(binding4[5]);
open = value11.open;
binding = env2_0;
intl = binding(binding4[6]).intl;
string = intl.string;
t = binding(binding4[6]).t;
CKsXk3 = t.CKsXk3;
Reflect.apply(open, value11, [{key: 'collectible shop claim error', content: Reflect.apply(string, intl,
[CKsXk3])}]);
return undefined;
}
try {
binding2 = env2_2;
} catch (error) {
binding = env2_1;
binding4 = env2_2;
value11 = binding(binding4[5]);
open = value11.open;
binding = env2_0;
intl = binding(binding4[6]).intl;
string = intl.string;
t = binding(binding4[6]).t;
CKsXk3 = t.CKsXk3;
Reflect.apply(open, value11, [{key: 'collectible shop claim error', content: Reflect.apply(string, intl,
[CKsXk3])}]);
return undefined;
}
try {
property = binding2[2];
} catch (error) {
binding = env2_1;
binding4 = env2_2;
value11 = binding(binding4[5]);
open = value11.open;
binding = env2_0;
intl = binding(binding4[6]).intl;
string = intl.string;
t = binding(binding4[6]).t;
CKsXk3 = t.CKsXk3;
Reflect.apply(open, value11, [{key: 'collectible shop claim error', content: Reflect.apply(string, intl,
[CKsXk3])}]);
return undefined;
}
try {
value3 = binding(property);
} catch (error) {
binding = env2_1;
binding4 = env2_2;
value11 = binding(binding4[5]);
open = value11.open;
binding = env2_0;
intl = binding(binding4[6]).intl;
string = intl.string;
t = binding(binding4[6]).t;
CKsXk3 = t.CKsXk3;
Reflect.apply(open, value11, [{key: 'collectible shop claim error', content: Reflect.apply(string, intl,
[CKsXk3])}]);
return undefined;
}
try {
claimPremiumCollectiblesProduct = value3.claimPremiumCollectiblesProduct;
} catch (error) {
binding = env2_1;
binding4 = env2_2;
value11 = binding(binding4[5]);
open = value11.open;
binding = env2_0;
intl = binding(binding4[6]).intl;
string = intl.string;
t = binding(binding4[6]).t;
CKsXk3 = t.CKsXk3;
Reflect.apply(open, value11, [{key: 'collectible shop claim error', content: Reflect.apply(string, intl,
[CKsXk3])}]);
return undefined;
}
try {
} catch (error) {
binding = env2_1;
binding4 = env2_2;
value11 = binding(binding4[5]);
open = value11.open;
binding = env2_0;
intl = binding(binding4[6]).intl;
string = intl.string;
t = binding(binding4[6]).t;
CKsXk3 = t.CKsXk3;
Reflect.apply(open, value11, [{key: 'collectible shop claim error', content: Reflect.apply(string, intl,
[CKsXk3])}]);
return undefined;
}
try {
skuId = require.skuId;
} catch (error) {
binding = env2_1;
binding4 = env2_2;
value11 = binding(binding4[5]);
open = value11.open;
binding = env2_0;
intl = binding(binding4[6]).intl;
string = intl.string;
t = binding(binding4[6]).t;
CKsXk3 = t.CKsXk3;
Reflect.apply(open, value11, [{key: 'collectible shop claim error', content: Reflect.apply(string, intl,
[CKsXk3])}]);
return undefined;
}
try {
value5 = Reflect.apply(claimPremiumCollectiblesProduct, value3, [skuId]);
} catch (error) {
binding = env2_1;
binding4 = env2_2;
value11 = binding(binding4[5]);
open = value11.open;
binding = env2_0;
intl = binding(binding4[6]).intl;
string = intl.string;
t = binding(binding4[6]).t;
CKsXk3 = t.CKsXk3;
Reflect.apply(open, value11, [{key: 'collectible shop claim error', content: Reflect.apply(string, intl,
[CKsXk3])}]);
return undefined;
}
yield value5;
try {
value6 = undefined;
value7 = false;
} catch (error) {
binding = env2_1;
binding4 = env2_2;
value11 = binding(binding4[5]);
open = value11.open;
binding = env2_0;
intl = binding(binding4[6]).intl;
string = intl.string;
t = binding(binding4[6]).t;
CKsXk3 = t.CKsXk3;
Reflect.apply(open, value11, [{key: 'collectible shop claim error', content: Reflect.apply(string, intl,
[CKsXk3])}]);
return undefined;
}
if (value7) {
return value6;
}
try {
binding = env2_1;
} catch (error) {
binding = env2_1;
binding4 = env2_2;
value11 = binding(binding4[5]);
open = value11.open;
binding = env2_0;
intl = binding(binding4[6]).intl;
string = intl.string;
t = binding(binding4[6]).t;
CKsXk3 = t.CKsXk3;
Reflect.apply(open, value11, [{key: 'collectible shop claim error', content: Reflect.apply(string, intl,
[CKsXk3])}]);
return undefined;
}
try {
binding3 = env2_2;
} catch (error) {
binding = env2_1;
binding4 = env2_2;
value11 = binding(binding4[5]);
open = value11.open;
binding = env2_0;
intl = binding(binding4[6]).intl;
string = intl.string;
t = binding(binding4[6]).t;
CKsXk3 = t.CKsXk3;
Reflect.apply(open, value11, [{key: 'collectible shop claim error', content: Reflect.apply(string, intl,
[CKsXk3])}]);
return undefined;
}
try {
property = binding3[3];
} catch (error) {
binding = env2_1;
binding4 = env2_2;
value11 = binding(binding4[5]);
open = value11.open;
binding = env2_0;
intl = binding(binding4[6]).intl;
string = intl.string;
t = binding(binding4[6]).t;
CKsXk3 = t.CKsXk3;
Reflect.apply(open, value11, [{key: 'collectible shop claim error', content: Reflect.apply(string, intl,
[CKsXk3])}]);
return undefined;
}
try {
value8 = binding(property);
} catch (error) {
binding = env2_1;
binding4 = env2_2;
value11 = binding(binding4[5]);
open = value11.open;
binding = env2_0;
intl = binding(binding4[6]).intl;
string = intl.string;
t = binding(binding4[6]).t;
CKsXk3 = t.CKsXk3;
Reflect.apply(open, value11, [{key: 'collectible shop claim error', content: Reflect.apply(string, intl,
[CKsXk3])}]);
return undefined;
}
try {
hideActionSheet = value8.hideActionSheet;
} catch (error) {
binding = env2_1;
binding4 = env2_2;
value11 = binding(binding4[5]);
open = value11.open;
binding = env2_0;
intl = binding(binding4[6]).intl;
string = intl.string;
t = binding(binding4[6]).t;
CKsXk3 = t.CKsXk3;
Reflect.apply(open, value11, [{key: 'collectible shop claim error', content: Reflect.apply(string, intl,
[CKsXk3])}]);
return undefined;
}
try {
Reflect.apply(hideActionSheet, value8, []);
} catch (error) {
binding = env2_1;
binding4 = env2_2;
value11 = binding(binding4[5]);
open = value11.open;
binding = env2_0;
intl = binding(binding4[6]).intl;
string = intl.string;
t = binding(binding4[6]).t;
CKsXk3 = t.CKsXk3;
Reflect.apply(open, value11, [{key: 'collectible shop claim error', content: Reflect.apply(string, intl,
[CKsXk3])}]);
return undefined;
}
try {
property = binding3[4];
} catch (error) {
binding = env2_1;
binding4 = env2_2;
value11 = binding(binding4[5]);
open = value11.open;
binding = env2_0;
intl = binding(binding4[6]).intl;
string = intl.string;
t = binding(binding4[6]).t;
CKsXk3 = t.CKsXk3;
Reflect.apply(open, value11, [{key: 'collectible shop claim error', content: Reflect.apply(string, intl,
[CKsXk3])}]);
return undefined;
}
try {
value9 = binding(property);
} catch (error) {
binding = env2_1;
binding4 = env2_2;
value11 = binding(binding4[5]);
open = value11.open;
binding = env2_0;
intl = binding(binding4[6]).intl;
string = intl.string;
t = binding(binding4[6]).t;
CKsXk3 = t.CKsXk3;
Reflect.apply(open, value11, [{key: 'collectible shop claim error', content: Reflect.apply(string, intl,
[CKsXk3])}]);
return undefined;
}
try {
open = value9.open;
} catch (error) {
binding = env2_1;
binding4 = env2_2;
value11 = binding(binding4[5]);
open = value11.open;
binding = env2_0;
intl = binding(binding4[6]).intl;
string = intl.string;
t = binding(binding4[6]).t;
CKsXk3 = t.CKsXk3;
Reflect.apply(open, value11, [{key: 'collectible shop claim error', content: Reflect.apply(string, intl,
[CKsXk3])}]);
return undefined;
}
try {
object2 = {};
} catch (error) {
binding = env2_1;
binding4 = env2_2;
value11 = binding(binding4[5]);
open = value11.open;
binding = env2_0;
intl = binding(binding4[6]).intl;
string = intl.string;
t = binding(binding4[6]).t;
CKsXk3 = t.CKsXk3;
Reflect.apply(open, value11, [{key: 'collectible shop claim error', content: Reflect.apply(string, intl,
[CKsXk3])}]);
return undefined;
}
try {
} catch (error) {
binding = env2_1;
binding4 = env2_2;
value11 = binding(binding4[5]);
open = value11.open;
binding = env2_0;
intl = binding(binding4[6]).intl;
string = intl.string;
t = binding(binding4[6]).t;
CKsXk3 = t.CKsXk3;
Reflect.apply(open, value11, [{key: 'collectible shop claim error', content: Reflect.apply(string, intl,
[CKsXk3])}]);
return undefined;
}
try {
object2.product = require;
} catch (error) {
binding = env2_1;
binding4 = env2_2;
value11 = binding(binding4[5]);
open = value11.open;
binding = env2_0;
intl = binding(binding4[6]).intl;
string = intl.string;
t = binding(binding4[6]).t;
CKsXk3 = t.CKsXk3;
Reflect.apply(open, value11, [{key: 'collectible shop claim error', content: Reflect.apply(string, intl,
[CKsXk3])}]);
return undefined;
}
try {
object2.useCategoryImage = true;
} catch (error) {
binding = env2_1;
binding4 = env2_2;
value11 = binding(binding4[5]);
open = value11.open;
binding = env2_0;
intl = binding(binding4[6]).intl;
string = intl.string;
t = binding(binding4[6]).t;
CKsXk3 = t.CKsXk3;
Reflect.apply(open, value11, [{key: 'collectible shop claim error', content: Reflect.apply(string, intl,
[CKsXk3])}]);
return undefined;
}
try {
Reflect.apply(open, value9, [object2]);
} catch (error) {
binding = env2_1;
binding4 = env2_2;
value11 = binding(binding4[5]);
open = value11.open;
binding = env2_0;
intl = binding(binding4[6]).intl;
string = intl.string;
t = binding(binding4[6]).t;
CKsXk3 = t.CKsXk3;
Reflect.apply(open, value11, [{key: 'collectible shop claim error', content: Reflect.apply(string, intl,
[CKsXk3])}]);
return undefined;
}
try {
binding = env2_0;
} catch (error) {
binding = env2_1;
binding4 = env2_2;
value11 = binding(binding4[5]);
open = value11.open;
binding = env2_0;
intl = binding(binding4[6]).intl;
string = intl.string;
t = binding(binding4[6]).t;
CKsXk3 = t.CKsXk3;
Reflect.apply(open, value11, [{key: 'collectible shop claim error', content: Reflect.apply(string, intl,
[CKsXk3])}]);
return undefined;
}
try {
property = binding3[2];
} catch (error) {
binding = env2_1;
binding4 = env2_2;
value11 = binding(binding4[5]);
open = value11.open;
binding = env2_0;
intl = binding(binding4[6]).intl;
string = intl.string;
t = binding(binding4[6]).t;
CKsXk3 = t.CKsXk3;
Reflect.apply(open, value11, [{key: 'collectible shop claim error', content: Reflect.apply(string, intl,
[CKsXk3])}]);
return undefined;
}
try {
value10 = binding(property);
} catch (error) {
binding = env2_1;
binding4 = env2_2;
value11 = binding(binding4[5]);
open = value11.open;
binding = env2_0;
intl = binding(binding4[6]).intl;
string = intl.string;
t = binding(binding4[6]).t;
CKsXk3 = t.CKsXk3;
Reflect.apply(open, value11, [{key: 'collectible shop claim error', content: Reflect.apply(string, intl,
[CKsXk3])}]);
return undefined;
}
try {
fetchCollectiblesPurchases = value10.fetchCollectiblesPurchases;
} catch (error) {
binding = env2_1;
binding4 = env2_2;
value11 = binding(binding4[5]);
open = value11.open;
binding = env2_0;
intl = binding(binding4[6]).intl;
string = intl.string;
t = binding(binding4[6]).t;
CKsXk3 = t.CKsXk3;
Reflect.apply(open, value11, [{key: 'collectible shop claim error', content: Reflect.apply(string, intl,
[CKsXk3])}]);
return undefined;
}
try {
Reflect.apply(fetchCollectiblesPurchases, value10, []);
} catch (error) {
binding = env2_1;
binding4 = env2_2;
value11 = binding(binding4[5]);
open = value11.open;
binding = env2_0;
intl = binding(binding4[6]).intl;
string = intl.string;
t = binding(binding4[6]).t;
CKsXk3 = t.CKsXk3;
Reflect.apply(open, value11, [{key: 'collectible shop claim error', content: Reflect.apply(string, intl,
[CKsXk3])}]);
}
}
}
global.__d(_fun79109, 10149, [5, 31, 5120, 4080, 7589, 3857, 1244,
2]) /* metro module 10149, dependencies: [5, 31, 5120, 4080, 7589, 3857, 1244, 2] */;
@@ -1,59 +1,63 @@
/* Metro module 7606; source: modules/collectibles/native/useHandleUseNow.tsx; dependencies: [31, 7607, 4080, 5080, 4008, 3857, 1244, 7608, 7622, 2] */
import UseOpenProfileSettings from '../../profile_customization/useOpenProfileSettings.tsx'; /* Metro dependency 7622 */
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 MainTabsConstantsModule from '../../main_tabs_v2/native/MainTabsConstants.tsx'; /* Metro dependency 7607 */
function _fun60946(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#60946, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7784:6, offset: 0x01715d75, size: 141 bytes, params: 8, frame: 18
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(7607) /* metro dependency 7607: MainTabsConstants */).MainTabsNavigatorScreens;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/useHandleUseNow.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/native/useHandleUseNow.tsx');
exports.useHandleUseNow = useHandleUseNow;
}
function useHandleUseNow({product, onSuccess, analyticsLocations}) { // fn#60947, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7784:240, offset: 0x01715e02, size: 230 bytes, params: 2, frame: 22
let useCallback = ReactModule.useCallback;
const {handleUseNow, isApplying,
canUseNow} = (require(7608) /* metro dependency 7608: useHandleUseNow */).useHandleUseNow({product: product,
onSuccess: Reflect.apply(useCallback, ReactModule, [_fun60948, [onSuccess]]),
onError: ReactModule.useCallback(function() {
var defaultImport = importDefault(dependencyMap[5]);
var object = {key: 'collectible shop apply error'};
object.content = require(dependencyMap[6]).intl.string(require(dependencyMap[6]).t.CKsXk3);
defaultImport.open(object);
}, [])});
let value = UseOpenProfileSettings;
value = value({analyticsLocations: analyticsLocations});
useCallback = ReactModule.useCallback;
return {handleUseNow: handleUseNow, isApplying: isApplying, canUseNow: canUseNow,
handleEditProfile: Reflect.apply(useCallback, ReactModule, [_fun60950, [value, onSuccess]])};
function _fun60948() { // fn#60948, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7784:310, offset: 0x01715ee8, size: 156 bytes, params: 1, frame: 15
var rootNavigationRef;
if (onSuccess == null) {
value = environment.__proto__;
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
(importDefault(5080) /* metro dependency 5080: ModalActionCreators */).popAll();
rootNavigationRef = (require(4008) /* metro dependency 4008: RootNavigationRefNative */).getRootNavigationRef();
if (rootNavigationRef != null && rootNavigationRef.isReady()) {
rootNavigationRef.navigate(MainTabsNavigatorScreens.YOU);
}
} else {
onSuccess();
}
}
function useHandleUseNow({product, onSuccess, analyticsLocations}) { // fn#60947, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7784:240, offset: 0x01715e02, size: 230 bytes, params: 2, frame: 22
const binding = env0_3;
let useCallback = binding.useCallback;
const {handleUseNow, isApplying,
canUseNow} = (require(7608) /* metro dependency 7608: useHandleUseNow */).useHandleUseNow({product: product,
onSuccess: Reflect.apply(useCallback, binding, [_fun60948, [onSuccess]]),
onError: binding.useCallback(function() {
var defaultImport = importDefault(dependencyMap[5]);
var object = {key: 'collectible shop apply error'};
object.content = require(dependencyMap[6]).intl.string(require(dependencyMap[6]).t.CKsXk3);
defaultImport.open(object);
}, [])});
let value = importDefault(7622) /* metro dependency 7622: useOpenProfileSettings */;
value = value({analyticsLocations: analyticsLocations});
useCallback = binding.useCallback;
return {handleUseNow: handleUseNow, isApplying: isApplying, canUseNow: canUseNow,
handleEditProfile: Reflect.apply(useCallback, binding, [_fun60950, [value, onSuccess]])};
}
function _fun60948() { // fn#60948, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7784:310, offset: 0x01715ee8, size: 156 bytes, params: 1, frame: 15
var rootNavigationRef;
if (onSuccess == null) {
value = environment.__proto__;
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
(importDefault(5080) /* metro dependency 5080: ModalActionCreators */).popAll();
rootNavigationRef = (require(4008) /* metro dependency 4008: RootNavigationRefNative */).getRootNavigationRef();
if (rootNavigationRef != null && rootNavigationRef.isReady()) {
rootNavigationRef.navigate(MainTabsNavigatorScreens.YOU);
function _fun60950() { // fn#60950, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7784:809, offset: 0x01715fed, size: 90 bytes, params: 1, frame: 13
var value;
env0_1();
if (onSuccess == null) {
value = environment.__proto__;
value = importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */;
value.hideActionSheet();
value = importDefault(5080) /* metro dependency 5080: ModalActionCreators */;
value.popAll();
} else {
onSuccess();
}
}
} else {
onSuccess();
}
}
function _fun60950() { // fn#60950, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7784:809, offset: 0x01715fed, size: 90 bytes, params: 1, frame: 13
var value;
env0_1();
if (onSuccess == null) {
value = environment.__proto__;
value = importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */;
value.hideActionSheet();
value = importDefault(5080) /* metro dependency 5080: ModalActionCreators */;
value.popAll();
} else {
onSuccess();
}
}
global.__d(_fun60946, 7606, [31, 7607, 4080, 5080, 4008, 3857, 1244, 7608, 7622,
2]) /* metro module 7606, dependencies: [31, 7607, 4080, 5080, 4008, 3857, 1244, 7608, 7622, 2] */;
@@ -1,28 +1,31 @@
/* Metro module 10105; source: modules/collectibles/native/useOpenNitroSubscribeActionSheet.tsx; dependencies: [31, 661, 1880, 6771, 7040, 2] */
import OpenPremiumPlanSelectionActionSheet from '../../premium/native/openPremiumPlanSelectionActionSheet.tsx'; /* Metro dependency 7040 */
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 PremiumConstantsModule from '../../premium/PremiumConstants.tsx'; /* Metro dependency 1880 */
function _fun78896(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#78896, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10291:6, offset: 0x01e3b0df, size: 171 bytes, params: 8, frame: 18
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importAll(31) /* metro dependency 31 */;
const constantsModule = require(661) /* metro dependency 661: Constants */;
const env0_3 = constantsModule.AnalyticsPages;
const env0_4 = constantsModule.AnalyticsSections;
const env0_5 = (require(1880) /* metro dependency 1880: PremiumConstants */).PremiumTypes;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/useOpenNitroSubscribeActionSheet.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/native/useOpenNitroSubscribeActionSheet.tsx');
exports.default = _default_78897;
function _default_78897() { // fn#78897, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10291:189, offset: 0x01e3b18a, size: 105 bytes, params: 1, frame: 16
const value = a0;
return ReactModule.useCallback(_fun78898,
[(importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */)().analyticsLocations,
value !== undefined ? value : AnalyticsSections.COLLECTIBLES_SHOP]);
function _fun78898() { // fn#78898, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10291:272, offset: 0x01e3b1f3, size: 92 bytes, params: 1, frame: 15
const defaultImport = OpenPremiumPlanSelectionActionSheet;
const COLLECTIBLES_SHOP = AnalyticsPages.COLLECTIBLES_SHOP;
const TIER_2 = PremiumTypes.TIER_2;
defaultImport({analyticsLocation: {page: COLLECTIBLES_SHOP, section: env0_0},
analyticsLocations: analyticsLocations, premiumType: TIER_2});
}
}
}
function _default_78897() { // fn#78897, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10291:189, offset: 0x01e3b18a, size: 105 bytes, params: 1, frame: 16
const value = a0;
return env0_2.useCallback(_fun78898,
[(importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */)().analyticsLocations,
value !== undefined ? value : AnalyticsSections.COLLECTIBLES_SHOP]);
}
function _fun78898() { // fn#78898, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10291:272, offset: 0x01e3b1f3, size: 92 bytes, params: 1, frame: 15
const defaultImport = importDefault(7040) /* metro dependency 7040: openPremiumPlanSelectionActionSheet */;
const COLLECTIBLES_SHOP = AnalyticsPages.COLLECTIBLES_SHOP;
const TIER_2 = PremiumTypes.TIER_2;
defaultImport({analyticsLocation: {page: COLLECTIBLES_SHOP, section: env0_0},
analyticsLocations: analyticsLocations, premiumType: TIER_2});
}
global.__d(_fun78896, 10105, [31, 661, 1880, 6771, 7040,
2]) /* metro module 10105, dependencies: [31, 661, 1880, 6771, 7040, 2] */;
@@ -1,43 +1,45 @@
/* Metro module 14037; source: modules/collectibles/native/useShopOrientationLock.tsx; dependencies: [31, 1581, 7717, 2] */
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 MetaQuestUtilsAndroidModule from '../../device/MetaQuestUtils.android.tsx'; /* Metro dependency 1581 */
function _fun106445(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#106445, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14234:6, offset: 0x022dc249, size: 118 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 */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/useShopOrientationLock.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/native/useShopOrientationLock.tsx');
exports.useShopOrientationLock = useShopOrientationLock;
}
function useShopOrientationLock() { // fn#106446, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14234:223, offset: 0x022dc2bf, size: 51 bytes, params: 1, frame: 13
const env0_0 = ReactModule.useRef(false);
ReactModule.useEffect(_fun106447, []);
function _fun106447() { // fn#106447, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14234:260, offset: 0x022dc2f2, size: 125 bytes, params: 1, frame: 15
if (MetaQuestUtilsAndroidModule.isMetaQuest()) {
return undefined;
}
if (env1_3 === 0) {
(require(7717) /* metro dependency 7717: DeviceOrientation */).lockOrientation('PORTRAIT', true);
}
env0_0.current = true;
const binding = env1_3;
env1_3 = typeof binding === 'bigint' ? binding + 1n : +binding + 1;
return _fun106448;
function _fun106448() { // fn#106448, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14234:361, offset: 0x022dc36f, size: 93 bytes, params: 1, frame: 13
var value2;
var binding;
if (env1_0.current) {
value2 = environment.__proto__.__proto__;
binding = env2_3;
if ((typeof binding === 'bigint' ? binding - 1n : +binding - 1) === 0) {
(require(7717) /* metro dependency 7717: DeviceOrientation */).unlockOrientation({unlockAfterRotatingToPreviousLock: false});
}
env1_0.current = false;
}
}
function useShopOrientationLock() { // fn#106446, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14234:223, offset: 0x022dc2bf, size: 51 bytes, params: 1, frame: 13
const binding = env0_2;
const env0_0 = binding.useRef(false);
binding.useEffect(_fun106447, []);
}
function _fun106447() { // fn#106447, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14234:260, offset: 0x022dc2f2, size: 125 bytes, params: 1, frame: 15
const metaQuestUtilsAndroidModule = require(1581) /* metro dependency 1581: MetaQuestUtilsAndroid */;
if (metaQuestUtilsAndroidModule.isMetaQuest()) {
return undefined;
}
if (env1_3 === 0) {
(require(7717) /* metro dependency 7717: DeviceOrientation */).lockOrientation('PORTRAIT', true);
}
env0_0.current = true;
const binding = env1_3;
env1_3 = typeof binding === 'bigint' ? binding + 1n : +binding + 1;
return _fun106448;
}
function _fun106448() { // fn#106448, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14234:361, offset: 0x022dc36f, size: 93 bytes, params: 1, frame: 13
var value2;
var binding;
if (env1_0.current) {
value2 = environment.__proto__.__proto__;
binding = env2_3;
if ((typeof binding === 'bigint' ? binding - 1n : +binding - 1) === 0) {
(require(7717) /* metro dependency 7717: DeviceOrientation */).unlockOrientation({unlockAfterRotatingToPreviousLock: false});
}
env1_0.current = false;
}
}
global.__d(_fun106445, 14037, [31, 1581, 7717, 2]) /* metro module 14037, dependencies: [31, 1581, 7717, 2] */;
@@ -1,64 +1,69 @@
/* Metro module 10027; source: modules/collectibles/native/useWishlistNUXActionSheet.tsx; dependencies: [31, 5189, 1226, 1376, 566, 3968, 1365, 1367, 4080, 10028, 1962, 2] */
import AuthenticationStore from '../../../stores/AuthenticationStore.tsx'; /* Metro dependency 1226 */
import UserProfileStore from '../../user_profile/UserProfileStore.tsx'; /* Metro dependency 5189 */
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 Dismissible_contentModule from '../../../external/discord_common/js/packages/protos/discord_protos/discord_users/v1/dismissible_content.tsx'; /* Metro dependency 1365 */
import * as DismissibleContentConstantsModule from '../../dismissible_content/DismissibleContentConstants.tsx'; /* Metro dependency 1376 */
import * as DismissibleContentUnsafeUtilsModule from '../../dismissible_content/DismissibleContentUnsafeUtils.tsx'; /* Metro dependency 3968 */
function _fun78320(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#78320, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10213:6, offset: 0x01e25684, size: 192 bytes, params: 8, frame: 20
const env0_0 = require;
const closure = useHasNeverWishlisted;
const useHasNeverWishlisted2 = useHasNeverWishlisted;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const userProfileStore = importDefault(5189) /* metro dependency 5189: UserProfileStore */;
const authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
const env0_6 = (require(1376) /* metro dependency 1376: DismissibleContentConstants */).ContentDismissActionType;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/useWishlistNUXActionSheet.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/native/useWishlistNUXActionSheet.tsx');
exports.default = useWishlistNUXActionSheet;
exports.useHasNeverWishlisted = closure;
}
exports.useHasNeverWishlisted = useHasNeverWishlisted2;
function useHasNeverWishlisted() { // fn#78321, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10213:161, offset: 0x01e25744, size: 150 bytes, params: 1, frame: 19
const env0_0 = (require(566) /* metro dependency 566: flux */).useStateFromStores([AuthenticationStore],
function() {
return AuthenticationStore.getId();
});
return (require(566) /* metro dependency 566: flux */).useStateFromStores([UserProfileStore],
_fun78324) && (require(566) /* metro dependency 566: flux */).useStateFromStores([UserProfileStore],
function() {
return UserProfileStore.getFirstWishlistId(id);
}) == null;
function _fun78324() { // fn#78324, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10213:351, offset: 0x01e257f5, size: 48 bytes, params: 1, frame: 11
let value = environment.__proto__;
value = UserProfileStore.getUserProfile(id);
return value != null && value.fetchEndedAt > 0;
}
function useHasNeverWishlisted() { // fn#78321, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10213:161, offset: 0x01e25744, size: 150 bytes, params: 1, frame: 19
const env0_0 = (require(566) /* metro dependency 566: flux */).useStateFromStores([AuthenticationStore],
function() {
return AuthenticationStore.getId();
});
return (require(566) /* metro dependency 566: flux */).useStateFromStores([UserProfileStore],
_fun78324) && (require(566) /* metro dependency 566: flux */).useStateFromStores([UserProfileStore],
function() {
return UserProfileStore.getFirstWishlistId(id);
}) == null;
}
}
function useWishlistNUXActionSheet() { // fn#78325, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10213:529, offset: 0x01e25825, size: 116 bytes, params: 1, frame: 17
const value2 = useHasNeverWishlisted();
const dismissibleContentUnsafeUtilsModule = require(3968) /* metro dependency 3968: DismissibleContentUnsafeUtils */;
const UNSAFE_useIsDismissibleContentDismissed = dismissibleContentUnsafeUtilsModule.UNSAFE_useIsDismissibleContentDismissed;
const DismissibleContent = (require(1365) /* metro dependency 1365: dismissible_content */).DismissibleContent;
const WISHLIST_MOBILE_NUX_ACTION_SHEET = DismissibleContent.WISHLIST_MOBILE_NUX_ACTION_SHEET;
const value3 = Reflect.apply(UNSAFE_useIsDismissibleContentDismissed, dismissibleContentUnsafeUtilsModule,
[WISHLIST_MOBILE_NUX_ACTION_SHEET]);
const object2 = {};
object2.shouldShowWishlistNUXActionSheet = value2 && !value3;
object2.showWishlistNUXActionSheet = env0_3.useCallback(_fun78326, []);
return object2;
}
function useWishlistNUXActionSheet() { // fn#78325, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10213:529, offset: 0x01e25825, size: 116 bytes, params: 1, frame: 17
const value2 = useHasNeverWishlisted();
const UNSAFE_useIsDismissibleContentDismissed = DismissibleContentUnsafeUtilsModule.UNSAFE_useIsDismissibleContentDismissed;
const DismissibleContent = (Dismissible_contentModule).DismissibleContent;
const WISHLIST_MOBILE_NUX_ACTION_SHEET = DismissibleContent.WISHLIST_MOBILE_NUX_ACTION_SHEET;
const value3 = Reflect.apply(UNSAFE_useIsDismissibleContentDismissed, DismissibleContentUnsafeUtilsModule,
[WISHLIST_MOBILE_NUX_ACTION_SHEET]);
const object = {};
object.shouldShowWishlistNUXActionSheet = value2 && !value3;
object.showWishlistNUXActionSheet = ReactModule.useCallback(_fun78326, []);
return object;
function _fun78326(a0) { // fn#78326, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10213:795, offset: 0x01e25899, size: 213 bytes, params: 2, frame: 22
const moduleValue = require(dependencyMap[7]);
const trackDismissibleContentShown = moduleValue.trackDismissibleContentShown;
const DismissibleContent = require(dependencyMap[6]).DismissibleContent;
let WISHLIST_MOBILE_NUX_ACTION_SHEET = DismissibleContent.WISHLIST_MOBILE_NUX_ACTION_SHEET;
Reflect.apply(trackDismissibleContentShown, moduleValue, [WISHLIST_MOBILE_NUX_ACTION_SHEET]);
const defaultImport = importDefault(dependencyMap[8]);
defaultImport.openLazy(require(dependencyMap[10])(dependencyMap[9], dependencyMap.paths),
'WishlistNUXAddedItemActionSheet', {product: a0}, 'stack');
const moduleValue3 = require(dependencyMap[5]);
const UNSAFE_markDismissibleContentAsDismissed = moduleValue3.UNSAFE_markDismissibleContentAsDismissed;
WISHLIST_MOBILE_NUX_ACTION_SHEET = DismissibleContent.WISHLIST_MOBILE_NUX_ACTION_SHEET;
const USER_DISMISS = ContentDismissActionType.USER_DISMISS;
Reflect.apply(UNSAFE_markDismissibleContentAsDismissed, moduleValue3, [WISHLIST_MOBILE_NUX_ACTION_SHEET,
{dismissAction: USER_DISMISS, forceTrack: true}]);
}
function _fun78324() { // fn#78324, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10213:351, offset: 0x01e257f5, size: 48 bytes, params: 1, frame: 11
let value = environment.__proto__;
value = UserProfileStore.getUserProfile(id);
return value != null && value.fetchEndedAt > 0;
}
}
function _fun78326(a0) { // fn#78326, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10213:795, offset: 0x01e25899, size: 213 bytes, params: 2, frame: 22
const moduleValue = require(dependencyMap[7]);
const trackDismissibleContentShown = moduleValue.trackDismissibleContentShown;
const DismissibleContent = require(dependencyMap[6]).DismissibleContent;
let WISHLIST_MOBILE_NUX_ACTION_SHEET = DismissibleContent.WISHLIST_MOBILE_NUX_ACTION_SHEET;
Reflect.apply(trackDismissibleContentShown, moduleValue, [WISHLIST_MOBILE_NUX_ACTION_SHEET]);
const defaultImport = importDefault(dependencyMap[8]);
defaultImport.openLazy(require(dependencyMap[10])(dependencyMap[9], dependencyMap.paths),
'WishlistNUXAddedItemActionSheet', {product: a0}, 'stack');
const moduleValue3 = require(dependencyMap[5]);
const UNSAFE_markDismissibleContentAsDismissed = moduleValue3.UNSAFE_markDismissibleContentAsDismissed;
WISHLIST_MOBILE_NUX_ACTION_SHEET = DismissibleContent.WISHLIST_MOBILE_NUX_ACTION_SHEET;
const USER_DISMISS = ContentDismissActionType.USER_DISMISS;
Reflect.apply(UNSAFE_markDismissibleContentAsDismissed, moduleValue3, [WISHLIST_MOBILE_NUX_ACTION_SHEET,
{dismissAction: USER_DISMISS, forceTrack: true}]);
}
global.__d(_fun78320, 10027, [31, 5189, 1226, 1376, 566, 3968, 1365, 1367, 4080, 10028, 1962,
2]) /* metro module 10027, dependencies: [31, 5189, 1226, 1376, 566, 3968, 1365, 1367, 4080, 10028, 1962, 2] */;