Initial commit

This commit is contained in:
janisslsm committed 2026-07-27 16:20:00 +03:00
commit af3b49f756
16065 files changed
+2938410

No files matched your search

@@ -0,0 +1,92 @@
/* Metro module 8466; source: modules/slayer_storefront/native/SlayerStorefrontGiftPreview.tsx; dependencies: [31, 27, 33, 4501, 8467, 4573, 1244, 8469, 3130, 2] */
function _fun67242(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#67242, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8651:6, offset: 0x01c1ac90, size: 258 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 */).View;
const value = require(33) /* metro dependency 33 */;
const env0_4 = value.jsx;
const env0_5 = value.jsxs;
const env0_6 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({container: {'alignItems': 'center',
'justifyContent': 'center', 'gap': 16, 'marginTop': 20}, text: {'textAlign': 'center', 'paddingHorizontal': 32},
warningBox: {marginHorizontal: 16}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/slayer_storefront/native/SlayerStorefrontGiftPreview.tsx');
exports.default = SlayerStorefrontGiftPreview;
}
function WarningBox({canStartAuthorization, hasAccountLinked, mobileAccountLinkingDisabled, sku, application}) { // fn#67243, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8651:343, offset: 0x01c1ad92, size: 334 bytes, params: 2, frame: 25
var name;
var r0;
var InfoBox;
var object;
var intl;
var property;
var formatToPlainString;
var object3;
const styles = useStyles();
if (hasAccountLinked) {
r0 = null;
} else {
InfoBox = importDefault(8469) /* metro dependency 8469: InfoBox */;
var infoBoxProps = {look: (require(8469) /* metro dependency 8469: InfoBox */).InfoBoxLooks.WARNING,
style: styles.warningBox};
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
if (mobileAccountLinkingDisabled) {
infoBoxProps.children = intl.formatToPlainString((importDefault(3130) /* metro dependency 3130: SlayerStorefrontMessages */).BMMo2K,
{applicationName: application?.name});
} else if (canStartAuthorization) {
formatToPlainString = intl.formatToPlainString;
property = (require(1244) /* metro dependency 1244: indexNative */).t['EgCl+Q'];
object3 = {};
name = sku.name;
object3.skuName = name;
name = application?.name;
object3.applicationName = name;
infoBoxProps.children = Reflect.apply(formatToPlainString, intl, [property, object3]);
} else {
infoBoxProps.children = intl.format((require(1244) /* metro dependency 1244: indexNative */).t['3T0cpx'],
{});
}
r0 = <InfoBox {...infoBoxProps} />;
}
return r0;
}
function SlayerStorefrontGiftPreview({sku, application, sender, hasAccountLinked, canStartAuthorization, mobileAccountLinkingDisabled}) { // fn#67244, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8651:1025, offset: 0x01c1aee0, size: 335 bytes, params: 2, frame: 31
var name;
var r0;
var items2;
var Text;
var intl;
var formatToPlainString;
var property;
var object;
let value = undefined;
mobileAccountLinkingDisabled = !(mobileAccountLinkingDisabled === value) && mobileAccountLinkingDisabled;
const styles = useStyles();
if (sku == null) {
r0 = null;
} else {
var viewBindingProps = {style: styles.container};
items2 = [((Component) => <Component sku={sku} />)(importDefault(8467) /* metro dependency 8467: SlayerStorefrontItemCard */)];
Text = (require(4573) /* metro dependency 4573: Text */).Text;
var textProps = {'variant': 'heading-md/normal', 'color': 'mobile-text-heading-primary', style: styles.text};
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
formatToPlainString = intl.formatToPlainString;
property = (require(1244) /* metro dependency 1244: indexNative */).t['2tBYtA'];
object = {sender: sender};
name = sku.name;
object.skuName = name;
name = application == null ? value : application.name;
object.applicationName = name;
items2[1] = <Text {...textProps}>{Reflect.apply(formatToPlainString, intl, [property, object])}</Text>;
items2[2] = <WarningBox canStartAuthorization={canStartAuthorization} hasAccountLinked={hasAccountLinked} mobileAccountLinkingDisabled={mobileAccountLinkingDisabled} sku={sku} application={application} />;
value = <View {...viewBindingProps}>{items2}</View>;
r0 = value;
}
return r0;
}
@@ -0,0 +1,112 @@
/* Metro module 8467; source: modules/slayer_storefront/native/SlayerStorefrontItemCard.tsx; dependencies: [31, 27, 33, 4501, 697, 6829, 8468, 5132, 5475, 4589, 2] */
function _fun67245(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#67245, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8652:6, offset: 0x01c1b02f, size: 303 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 */;
let value = require(27) /* metro dependency 27 */;
const env0_4 = value.ImageBackground;
const env0_5 = value.View;
const env0_6 = (require(33) /* metro dependency 33 */).jsx;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
const object = {'borderRadius': null, 'overflow': 'hidden', 'shadowColor': '#000', 'shadowOffset': null,
'shadowOpacity': 0.3, 'shadowRadius': 8, 'elevation': 8};
object.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.md;
object.shadowOffset = {'width': 0, 'height': 4};
const env0_7 = Reflect.apply(createStyles, value, [{cardContainer: object, cardImageBackground: {'width': '100%',
'height': '100%', 'alignItems': 'center', 'justifyContent': 'center'}, cardImage: {'width': '100%',
'height': '100%', 'resizeMode': 'cover'}}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/slayer_storefront/native/SlayerStorefrontItemCard.tsx');
exports.default = SlayerStorefrontItemCard;
}
function SlayerStorefrontItemCard({sku, size, containerStyle}) { // fn#67246, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8652:601, offset: 0x01c1b15e, size: 577 bytes, params: 2, frame: 25
var r5;
var r0;
var defaultImport;
var FastImage;
var object;
var object2;
var object3;
var FastImage2;
var object7;
size = size === undefined ? 220 : size;
const styles = useStyles();
const r10 = typeof size === 'object' ? size : {width: size, height: size};
const Math = global.Math;
const value4 = Math.max(r10.width, r10.height);
let binding = env0_3;
let useMemo = binding.useMemo;
const value5 = Reflect.apply(useMemo, binding, [_fun67247, [sku, value4]]);
const value6 = binding.useMemo(_fun67248, [sku, value4]);
const value9 = (require(8468) /* metro dependency 8468: DominantColorUtils */).useDominantColorFromImage(value5?.toString());
binding = env0_3;
useMemo = binding.useMemo;
if (sku == null) {
r0 = null;
} else if (value5 == null) {
r0 = null;
} else {
var viewBindingProps = {style: [styles.cardContainer, r10, containerStyle]};
if (value6 != null) {
object2 = {};
object3 = {};
object3.uri = value6.toString();
object2.source = object3;
object2.style = styles.cardImageBackground;
FastImage2 = importDefault(5475) /* metro dependency 5475: FastImage */;
object7 = {};
object7.uri = value5.toString();
r5 = <ImageBackground {...object2}><FastImage2 source={object7} style={styles.cardImage} /></ImageBackground>;
} else {
defaultImport = importDefault(4589) /* metro dependency 4589 */;
var defaultImportProps = {colors: Reflect.apply(useMemo, binding, [_fun67249, [value9]]), start: {'x': 0,
'y': 0},
end: {'x': 1, 'y': 1}, style: styles.cardImageBackground};
FastImage = importDefault(5475) /* metro dependency 5475: FastImage */;
object = {};
object.uri = value5.toString();
r5 = ((Component) => <Component {...defaultImportProps}><FastImage source={object} style={styles.cardImage} /></Component>)(defaultImport);
}
r0 = <View {...viewBindingProps}>{r5}</View>;
}
return r0;
}
function _fun67247() { // fn#67247, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8652:766, offset: 0x01c1b39f, size: 56 bytes, params: 1, frame: 14
const value = environment.__proto__;
return (require(6829) /* metro dependency 6829: SlayerStorefrontUtils */).getCardImageURL(sku, {size: env0_1});
}
function _fun67248() { // fn#67248, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8652:827, offset: 0x01c1b3d7, size: 56 bytes, params: 1, frame: 14
const value = environment.__proto__;
return (require(6829) /* metro dependency 6829: SlayerStorefrontUtils */).getCardBackgroundImageURL(sku,
{size: env0_1});
}
function _fun67249() { // fn#67249, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8652:963, offset: 0x01c1b40f, size: 259 bytes, params: 1, frame: 16
var r0;
var value2;
var items2;
var colors;
var value;
if (env0_2 == null) {
value = environment.__proto__;
colors = (importDefault(697) /* metro dependency 697: native */).colors;
items2 = [colors.BACKGROUND_SURFACE_HIGH];
colors = (importDefault(697) /* metro dependency 697: native */).colors;
items2[1] = colors.BACKGROUND_BASE_LOWEST;
r0 = items2;
} else {
value2 = environment.__proto__;
items2 = [(importDefault(5132) /* metro dependency 5132 */)(env0_2).brighten(20).saturate(30).setAlpha(0.8).toRgbString()];
value = (importDefault(5132) /* metro dependency 5132 */)(env0_2);
value = value.saturate(50);
value = value.setAlpha(0.9);
items2[1] = value.toRgbString();
r0 = items2;
}
return r0;
}
@@ -0,0 +1,60 @@
/* Metro module 10443; source: modules/slayer_storefront/native/SocialLayerStorefrontBadges.tsx; dependencies: [31, 27, 33, 4501, 697, 477, 8765, 4573, 1244, 2] */
function _fun80851(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#80851, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10629:6, offset: 0x01e8c3df, size: 410 bytes, params: 8, frame: 23
var object4;
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 */;
const env0_4 = value.jsx;
const env0_5 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object4 = {};
const object5 = {'flexDirection': 'row', 'alignItems': 'center', 'textAlignVertical': 'center',
'alignSelf': 'flex-start'};
let space = (importDefault(697) /* metro dependency 697: native */).space;
const PX_4 = space.PX_4;
object5.gap = PX_4;
object5.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object5.paddingHorizontal = PX_8;
const BACKGROUND_BRAND = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BRAND;
object5.backgroundColor = BACKGROUND_BRAND;
object4.exclusiveBadge = object5;
const object6 = {textTransform: 'uppercase'};
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object6.fontSize = PX_12;
const isAndroid2 = (require(477) /* metro dependency 477: PlatformUtils */).isAndroid();
space = (importDefault(697) /* metro dependency 697: native */).space;
object6.lineHeight = isAndroid2 ? space.PX_12 : space.PX_16;
object4.exclusiveBadgeText = object6;
const env0_6 = Reflect.apply(createStyles, value, [object4]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/slayer_storefront/native/SocialLayerStorefrontBadges.tsx');
exports.ExclusiveBadge = ExclusiveBadge;
}
function ExclusiveBadge() { // fn#80852, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10629:682, offset: 0x01e8c579, size: 234 bytes, params: 1, frame: 22
const styles = useStyles();
const ClydeIcon = (require(8765) /* metro dependency 8765: ClydeIcon */).ClydeIcon;
const WHITE = (importDefault(697) /* metro dependency 697: native */).colors.WHITE;
const clydeIcon = <ClydeIcon size="xs" color={WHITE} />;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const RiDMFz = (require(1244) /* metro dependency 1244: indexNative */).t.RiDMFz;
return (
<View style={styles.exclusiveBadge}>
{clydeIcon}
<Text
variant="text-xs/bold"
color="white"
style={styles.exclusiveBadgeText}
>
{Reflect.apply(string, intl, [RiDMFz])}
</Text>
</View>
);
}
@@ -0,0 +1,79 @@
/* Metro module 10446; source: modules/slayer_storefront/native/SocialLayerStorefrontGiftModal.tsx; dependencies: [31, 4279, 661, 33, 566, 6771, 6789, 4594, 683, 10437, 3815, 7636, 1244, 10109, 7637, 10447, 10448, 2] */
function _fun80862(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#80862, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10632:6, offset: 0x01e8cbd7, size: 176 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 skuStore = importDefault(4279) /* metro dependency 4279: SKUStore */;
const env0_4 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
const env0_5 = (require(33) /* metro dependency 33 */).jsx;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/slayer_storefront/native/SocialLayerStorefrontGiftModal.tsx');
exports.default = SocialLayerStorefrontGiftModal;
}
function SocialLayerStorefrontGiftModal({skuId, analyticsLocations, lockedRecipientUser, onGiftModalDismiss, giftingOrigin}) { // fn#80863, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10632:265, offset: 0x01e8cc87, size: 505 bytes, params: 2, frame: 29
var r1;
var r0;
var UnsupportedFeatureModal;
var intl;
var NativePaymentContextProvider;
var value;
const value2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([SKUStore], function() {
return SKUStore.get(skuId);
}, [skuId]);
const defaultImport = importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */;
object = [];
const value3 = arraySpread(object, analyticsLocations, 0, undefined);
const SLAYER_STOREFRONT_NATIVE_GIFT_MODAL = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).SLAYER_STOREFRONT_NATIVE_GIFT_MODAL;
object[value3] = SLAYER_STOREFRONT_NATIVE_GIFT_MODAL;
value3 + 1;
analyticsLocations = defaultImport(object).analyticsLocations;
(importDefault(4594) /* metro dependency 4594: useMountEffect */)(_fun80865);
if (value2 == null) {
r0 = null;
} else {
if ((require(3815) /* metro dependency 3815: BillingPlatformUtils */).isSocialLayerStorefrontGiftingSupported()) {
NativePaymentContextProvider = (require(10109) /* metro dependency 10109: NativePaymentContext */).NativePaymentContextProvider;
value = importDefault(7637) /* metro dependency 7637: UnifiedGiftModal */;
value = <NativePaymentContextProvider skuIDs={[]} activeSubscription={null}>{((Component) => <Component skuId={skuId} applicationId={value2.applicationId} analyticsLocations={analyticsLocations} lockedRecipientUser={lockedRecipientUser} onGiftModalDismiss={onGiftModalDismiss} giftingOrigin={giftingOrigin} validateRecipient={function() {
var Promise = global.Promise;
return Promise.resolve(true);
}} renderProductDetails={renderProductDetails} renderPurchaseSection={renderPurchaseSection} />)(value)}</NativePaymentContextProvider>;
r1 = value;
} 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;
}
return r0;
}
function _fun80865() { // fn#80865, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10632:550, offset: 0x01e8ce80, size: 126 bytes, params: 1, frame: 18
const value2 = undefined;
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
const track = defaultImport.track;
const OPEN_MODAL = AnalyticEvents.OPEN_MODAL;
const object2 = {};
object2.location_stack = analyticsLocations;
const SOCIAL_LAYER_STOREFRONT_GIFT_MODAL_KEY = (require(10437) /* metro dependency 10437: SocialLayerStorefrontNativeActionCreators */).SOCIAL_LAYER_STOREFRONT_GIFT_MODAL_KEY;
object2.type = SOCIAL_LAYER_STOREFRONT_GIFT_MODAL_KEY;
object2.sku_id = skuId;
object2.application_id = env0_2 == null ? value2 : env0_2.applicationId;
Reflect.apply(track, defaultImport, [OPEN_MODAL, object2]);
return value2;
}
function SocialLayerStorefrontGiftModalRenderProductDetails() { // fn#80867, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10632:1053, owner: SocialLayerStorefrontGiftModal.renderProductDetails, offset: 0x01e8cefe, size: 51 bytes, params: 1, frame: 14
const value = environment.__proto__;
return ((Component) => <Component sku={env0_2} />)(importDefault(10447) /* metro dependency 10447: SocialLayerStorefrontGiftProductDetails */);
}
function SocialLayerStorefrontGiftModalRenderPurchaseSection({isPurchaseDisabled, giftOptions}) { // fn#80868, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10632:1099, owner: SocialLayerStorefrontGiftModal.renderPurchaseSection, offset: 0x01e8cf31, size: 102 bytes, params: 2, frame: 17
const value = environment.__proto__;
return ((Component) => <Component skuId={skuId} sku={env0_2} isPurchaseDisabled={isPurchaseDisabled} giftOptions={giftOptions} giftingOrigin={giftingOrigin} analyticsLocations={analyticsLocations} />)(importDefault(10448) /* metro dependency 10448: SocialLayerStorefrontGiftPurchaseSection */);
}
@@ -0,0 +1,93 @@
/* Metro module 10447; source: modules/slayer_storefront/native/SocialLayerStorefrontGiftProductDetails.tsx; dependencies: [31, 27, 661, 33, 4501, 697, 6777, 10441, 1423, 8467, 4573, 2] */
function _fun80869(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#80869, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10633:6, offset: 0x01e8cf97, size: 518 bytes, params: 8, frame: 24
var object3;
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 */;
const env0_4 = value.Image;
const env0_5 = value.View;
const env0_6 = (require(661) /* metro dependency 661: Constants */).PriceSetAssignmentPurchaseTypes;
value = require(33) /* metro dependency 33 */;
const env0_7 = value.jsx;
const env0_8 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object3 = {};
const object4 = {'flexDirection': 'row', 'alignItems': 'center'};
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object4.gap = PX_12;
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object4.paddingHorizontal = PX_16;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object4.paddingVertical = PX_16;
object4.borderWidth = 2;
const BACKGROUND_BRAND = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BRAND;
object4.borderColor = BACKGROUND_BRAND;
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object4.marginHorizontal = PX_16;
object3.container = object4;
let PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object3.text = {flex: 1, gap: PX_4};
PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object3.appInfo = {'flexDirection': 'row', 'alignItems': 'center', gap: PX_4};
const object6 = {'width': 20, 'height': 20};
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
object3.appIcon = object6;
const env0_9 = Reflect.apply(createStyles, value, [object3]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/slayer_storefront/native/SocialLayerStorefrontGiftProductDetails.tsx');
exports.default = SocialLayerStorefrontGiftProductDetails;
}
function SocialLayerStorefrontGiftProductDetails({sku}) { // fn#80870, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10633:795, offset: 0x01e8d19d, size: 523 bytes, params: 2, frame: 31
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
var r10;
var items2;
const styles = useStyles();
const value2 = (require(6777) /* metro dependency 6777: useGetOrFetchApplications */).useGetOrFetchApplication(sku.applicationId);
const storefrontNativeUtilsAndroidModule = require(10441) /* metro dependency 10441: StorefrontNativeUtilsAndroid */;
const useFormattedSKUPrice = storefrontNativeUtilsAndroidModule.useFormattedSKUPrice;
const GIFT = PriceSetAssignmentPurchaseTypes.GIFT;
const userPrice = Reflect.apply(useFormattedSKUPrice, storefrontNativeUtilsAndroidModule, [{sku: sku,
priceSetAssignmentPurchaseType: GIFT}]).userPrice;
const value3 = env0_3.useMemo(_fun80871, [value2]);
const items3 = [((Component) => <Component sku={sku} size={55} />)(importDefault(8467) /* metro dependency 8467: SlayerStorefrontItemCard */)];
const value5 = value2 != null;
if (value5) {
var viewBinding2Props = {style: styles.appInfo};
items2 = [value3 != null && <Image source={{uri: value3}} style={styles.appIcon} />];
items2[1] = <Text variant="text-sm/medium" color="text-muted">{value2.name}</Text>;
r10 = <View {...viewBinding2Props}>{items2}</View>;
} else {
r10 = value5;
}
items3[1] = <View style={styles.text}>{r10}<Text variant="text-md/semibold">{sku.name}</Text></View>;
items3[2] = userPrice != null && <Text variant="text-md/semibold">{userPrice}</Text>;
return (
<View style={styles.container}>
{items3}
</View>
);
}
function _fun80871() { // fn#80871, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10633:1016, offset: 0x01e8d3a8, size: 85 bytes, params: 1, frame: 14
var r0;
var value3;
var defaultImport;
var getApplicationIconURL;
var binding;
const value2 = null;
if (value2 == env0_0) {
r0 = value2;
} else {
value3 = environment.__proto__;
defaultImport = importDefault(1423) /* metro dependency 1423: AvatarUtils */;
getApplicationIconURL = defaultImport.getApplicationIconURL;
binding = env0_0;
r0 = Reflect.apply(getApplicationIconURL, defaultImport, [{id: binding.id, icon: binding.icon, size: 20}]);
}
return r0;
}
@@ -0,0 +1,165 @@
/* Metro module 10448; source: modules/slayer_storefront/native/SocialLayerStorefrontGiftPurchaseSection.tsx; dependencies: [57, 31, 27, 1878, 661, 1880, 33, 4501, 697, 5463, 6777, 566, 6518, 491, 4594, 683, 10442, 694, 10437, 1244, 10444, 6766, 4578, 2] */
function _fun80872(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#80872, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10634:6, offset: 0x01e8d3fd, size: 281 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 userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const env0_7 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
const env0_8 = (require(1880) /* metro dependency 1880: PremiumConstants */).GiftingOrigin;
const value = require(33) /* metro dependency 33 */;
const env0_9 = value.jsx;
const env0_10 = value.jsxs;
const env0_11 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(_fun80873);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/slayer_storefront/native/SocialLayerStorefrontGiftPurchaseSection.tsx');
exports.default = SocialLayerStorefrontGiftPurchaseSection;
}
function _fun80873(a0) { // fn#80873, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10634:244, offset: 0x01e8d516, size: 224 bytes, params: 2, frame: 17
const object3 = {};
const object4 = {};
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object4.paddingBottom = PX_12 + a0;
const PX_122 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object4.paddingTop = PX_122;
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object4.paddingHorizontal = PX_16;
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object4.gap = PX_8;
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object4.backgroundColor = BACKGROUND_BASE_LOW;
const SHADOW_TOP_HIGH = (importDefault(697) /* metro dependency 697: native */).shadows.SHADOW_TOP_HIGH;
copyDataProperties(object4, SHADOW_TOP_HIGH, PX_12);
object3.container = object4;
const PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object3.legalCopy = {'display': 'flex', 'flexDirection': 'column', gap: PX_4};
return object3;
}
function SocialLayerStorefrontGiftPurchaseSection({skuId, sku, isPurchaseDisabled, giftOptions, giftingOrigin, analyticsLocations}) { // fn#80874, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10634:681, offset: 0x01e8d5f6, size: 851 bytes, params: 2, frame: 30
const env0_4 = analyticsLocations;
const styles = useStyles((importDefault(5463) /* metro dependency 5463: useSafeAreaInsetsKeyboardAwareNative */)().insets.bottom);
const value3 = (require(6777) /* metro dependency 6777: useGetOrFetchApplications */).useGetOrFetchApplication(sku?.applicationId);
const env0_5 = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() {
return UserStore.getUser(giftOptions.recipient_id);
});
const value4 = (importDefault(6518) /* metro dependency 6518: useInitialValue */)(_fun80876);
let binding = env0_4;
let useMemo = binding.useMemo;
const value5 = Reflect.apply(useMemo, binding, [_fun80877, [analyticsLocations, skuId, sku?.type, sku?.productLine,
sku?.applicationId, value4]]);
binding = env0_4;
const [property, env0_8] = giftingOrigin(binding.useState(false), 2);
const env0_9 = binding.useRef('not_started');
(require(4594) /* metro dependency 4594: useMountEffect */).useUnmountEffect(_fun80878);
const value8 = binding.useCallback(_fun80879, [value5]);
useMemo = binding.useMemo;
const env0_11 = (importDefault(10442) /* metro dependency 10442: useMobileSocialLayerPurchaseSKUAndroid */)({skuId: skuId,
sku: sku, giftParams: Reflect.apply(useMemo, binding, [function() {
return {isGift: true, options: giftOptions};
}, [giftOptions]]), analyticsLoadId: value4, analyticsLocations: analyticsLocations,
onPurchaseComplete: onPurchaseComplete, onPurchaseError: value8, onPurchasePending: function() {
}});
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const value10 = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.ouo4FK);
const slayerStorefrontDisclaimerUtilsModule = require(10444) /* metro dependency 10444: SlayerStorefrontDisclaimerUtils */;
const getMobileFinePrintMessageForApplication = slayerStorefrontDisclaimerUtilsModule.getMobileFinePrintMessageForApplication;
const view = <View style={styles.legalCopy}>{Reflect.apply(getMobileFinePrintMessageForApplication,
slayerStorefrontDisclaimerUtilsModule, [value3 ?? undefined, value10,
{shouldAppendDisclaimer: true}]).map(_fun80883)}</View>;
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
return (
<View style={styles.container}>
{view}
<Button
variant="active"
disabled={isPurchaseDisabled}
loading={property}
text={value10}
onPress={onPress_80884}
/>
</View>
);
}
function _fun80876() { // fn#80876, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10634:1006, offset: 0x01e8d96a, size: 37 bytes, params: 1, frame: 11
const value = environment.__proto__;
return (require(491) /* metro dependency 491 */).v4();
}
function _fun80877() { // fn#80877, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10634:1039, offset: 0x01e8d98f, size: 131 bytes, params: 1, frame: 6
const skuBinding = sku;
const value2 = undefined;
return {'is_gift': true, 'location_stack': null, 'payment_type': 'sku', location_stack: analyticsLocations,
sku_id: skuId, sku_type: skuBinding == null ? value2 : sku.type,
sku_product_line: sku == null ? value2 : sku.productLine,
application_id: sku == null ? value2 : sku.applicationId, load_id: env0_6};
}
function _fun80878() { // fn#80878, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10634:1421, offset: 0x01e8da12, size: 74 bytes, params: 1, frame: 14
var value2;
var defaultImport;
if (env0_9.current === 'pending') {
value2 = environment.__proto__;
defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
defaultImport.track(AnalyticEvents.PAYMENT_FLOW_CANCELED, env0_7);
}
}
function _fun80879() { // fn#80879, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10634:1516, offset: 0x01e8da5c, size: 101 bytes, params: 1, frame: 14
var value2;
var defaultImport;
if (env0_9.current === 'pending') {
env0_9.current = 'failed';
value2 = environment.__proto__;
defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
defaultImport.track(AnalyticEvents.PAYMENT_FLOW_FAILED, env0_7);
}
env0_8(false);
}
function SocialLayerStorefrontGiftPurchaseSectionOnPurchaseComplete() { // fn#80881, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10634:1764, owner: SocialLayerStorefrontGiftPurchaseSection.onPurchaseComplete, offset: 0x01e8dad7, size: 341 bytes, params: 1, frame: 19
env0_9.current = 'succeeded';
const value3 = undefined;
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
const track = defaultImport.track;
const PAYMENT_FLOW_SUCCEEDED = AnalyticEvents.PAYMENT_FLOW_SUCCEEDED;
Reflect.apply(track, defaultImport, [PAYMENT_FLOW_SUCCEEDED, env0_7]);
env0_8(false);
if (!(giftOptions.recipient_id == null || giftingOrigin !== GiftingOrigin.USER_PROFILE_WISHLIST && giftingOrigin !== GiftingOrigin.DM_CHANNEL_WISHLIST)) {
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'WISHLIST_GIFT_SENT', skuId: skuId,
recipientId: giftOptions.recipient_id});
}
const socialLayerStorefrontNativeActionCreatorsModule = require(10437) /* metro dependency 10437: SocialLayerStorefrontNativeActionCreators */;
const value = socialLayerStorefrontNativeActionCreatorsModule.openSocialLayerStorefrontProductGiftPurchaseSuccessModal({skuId: skuId,
orbsReward: (sku == null ? value3 : sku.orbsReward) ?? value3, recipient: user,
analyticsLocations: analyticsLocations});
value.then(socialLayerStorefrontNativeActionCreatorsModule.closeSocialLayerStorefrontGiftModal);
return value3;
}
function _fun80883(a0, a1) { // fn#80883, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10634:2489, offset: 0x01e8dc2c, size: 68 bytes, params: 3, frame: 15
const TextWithIOSLinkWorkaround = (require(6766) /* metro dependency 6766: TextWithIOSLinkWorkaround */).TextWithIOSLinkWorkaround;
return (
<TextWithIOSLinkWorkaround
variant="text-xs/normal"
color="text-muted"
key={a1}
>
{a0}
</TextWithIOSLinkWorkaround>
);
}
function SocialLayerStorefrontGiftPurchaseSectionOnPress() { // fn#80884, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10634:2669, owner: SocialLayerStorefrontGiftPurchaseSection.onPress, offset: 0x01e8dc70, size: 103 bytes, params: 1, frame: 15
env0_9.current = 'pending';
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
const track = defaultImport.track;
const PAYMENT_FLOW_STARTED = AnalyticEvents.PAYMENT_FLOW_STARTED;
Reflect.apply(track, defaultImport, [PAYMENT_FLOW_STARTED, env0_7]);
env0_8(true);
env0_11().catch(env0_10);
}
@@ -0,0 +1,100 @@
/* Metro module 10437; source: modules/slayer_storefront/native/SocialLayerStorefrontNativeActionCreators.tsx; dependencies: [33, 8354, 8463, 5080, 10438, 1962, 10446, 4496, 10449, 2] */
function _fun80790(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#80790, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10623:6, offset: 0x01e893c3, size: 236 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = (require(33) /* metro dependency 33 */).jsx;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/slayer_storefront/native/SocialLayerStorefrontNativeActionCreators.tsx');
exports.SOCIAL_LAYER_STOREFRONT_PRODUCT_DETAILS_MODAL_KEY = 'social-layer-storefront-product-details-native-modal';
exports.SOCIAL_LAYER_STOREFRONT_GIFT_MODAL_KEY = 'social-layer-storefront-native-gift-modal';
exports.SOCIAL_LAYER_STOREFRONT_SELF_PURCHASE_SUCCESS_MODAL_KEY = 'social-layer-storefront-self-purchase-success-native-modal';
exports.SOCIAL_LAYER_STOREFRONT_GIFT_PURCHASE_SUCCESS_MODAL_KEY = 'social-layer-storefront-gift-purchase-success-native-modal';
exports.openSocialLayerStorefrontProductDetailsModal = openSocialLayerStorefrontProductDetailsModal;
exports.closeSocialLayerStorefrontProductDetailsModal = closeSocialLayerStorefrontProductDetailsModal;
exports.openSocialLayerStorefrontGiftModal = openSocialLayerStorefrontGiftModal;
exports.closeSocialLayerStorefrontGiftModal = closeSocialLayerStorefrontGiftModal;
exports.openSocialLayerStorefrontProductSelfPurchaseSuccessModal = openSocialLayerStorefrontProductSelfPurchaseSuccessModal;
exports.openSocialLayerStorefrontProductGiftPurchaseSuccessModal = openSocialLayerStorefrontProductGiftPurchaseSuccessModal;
}
function openSocialLayerStorefrontProductDetailsModal(a0) { // fn#80791, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10623:707, offset: 0x01e894af, size: 165 bytes, params: 2, frame: 18
var defaultImport;
const moduleValue = require(dependencyMap[1]);
const getIsEligibleForSocialLayerStorefrontMobilePurchasing = moduleValue.getIsEligibleForSocialLayerStorefrontMobilePurchasing;
if (Reflect.apply(getIsEligibleForSocialLayerStorefrontMobilePurchasing, moduleValue,
[{location: 'social_layer_storefront_product_details_modal'}])) {
require(dependencyMap[2]).fetchSocialLayerStorefrontConfig();
defaultImport = importDefault(dependencyMap[3]);
defaultImport.pushLazy(require(dependencyMap[5])(dependencyMap[4], dependencyMap.paths), a0,
'social-layer-storefront-product-details-native-modal', {presentation: 'modal'});
}
}
function closeSocialLayerStorefrontProductDetailsModal() { // fn#80792, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10623:1048, offset: 0x01e89554, size: 44 bytes, params: 1, frame: 12
(importDefault(5080) /* metro dependency 5080: ModalActionCreators */).popWithKey('social-layer-storefront-product-details-native-modal');
}
function openSocialLayerStorefrontGiftModal(a0) { // fn#80793, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10623:1165, offset: 0x01e89580, size: 129 bytes, params: 2, frame: 16
var defaultImport;
var pushLazy;
var value;
const moduleValue = require(dependencyMap[1]);
const getIsEligibleForSocialLayerStorefrontMobilePurchasing = moduleValue.getIsEligibleForSocialLayerStorefrontMobilePurchasing;
if (Reflect.apply(getIsEligibleForSocialLayerStorefrontMobilePurchasing, moduleValue,
[{location: 'social_layer_storefront_gift_modal'}])) {
defaultImport = importDefault(dependencyMap[3]);
pushLazy = defaultImport.pushLazy;
value = require(dependencyMap[5]);
value = value(dependencyMap[6], dependencyMap.paths);
Reflect.apply(pushLazy, defaultImport, [value, a0, 'social-layer-storefront-native-gift-modal']);
}
}
function closeSocialLayerStorefrontGiftModal() { // fn#80794, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10623:1407, offset: 0x01e89601, size: 44 bytes, params: 1, frame: 12
(importDefault(5080) /* metro dependency 5080: ModalActionCreators */).popWithKey('social-layer-storefront-native-gift-modal');
}
function openSocialLayerStorefrontProductSelfPurchaseSuccessModal(a0) { // fn#80795, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10623:1536, offset: 0x01e8962d, size: 61 bytes, params: 2, frame: 12
const env0_0 = a0;
const value = importDefault(4496) /* metro dependency 4496: AlertActionCreators */;
return value.openLazy({importer: importer_80796});
}
function openSocialLayerStorefrontProductGiftPurchaseSuccessModal(a0) { // fn#80799, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10623:1815, offset: 0x01e896f4, size: 61 bytes, params: 2, frame: 12
const env0_0 = a0;
const value = importDefault(4496) /* metro dependency 4496: AlertActionCreators */;
return value.openLazy({importer: importer_80800});
}
function openSocialLayerStorefrontProductSelfPurchaseSuccessModalImporter() { // fn#80796, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10623:1639, owner: openSocialLayerStorefrontProductSelfPurchaseSuccessModal.importer, offset: 0x01e8966a, size: 64 bytes, params: 1, frame: 13
var environment;
let value = environment.__proto__;
value = require(dependencyMap[5]);
value = value(dependencyMap[8], dependencyMap.paths);
return value.then(function({SocialLayerStorefrontProductSelfPurchaseSuccessModal}) {
return _fun80798;
});
}
function openSocialLayerStorefrontProductGiftPurchaseSuccessModalImporter() { // fn#80800, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10623:1918, owner: openSocialLayerStorefrontProductGiftPurchaseSuccessModal.importer, offset: 0x01e89731, size: 64 bytes, params: 1, frame: 13
var environment;
let value = environment.__proto__;
value = require(dependencyMap[5]);
value = value(dependencyMap[8], dependencyMap.paths);
return value.then(function({SocialLayerStorefrontProductGiftPurchaseSuccessModal}) {
return _fun80802;
});
}
function _fun80797({SocialLayerStorefrontProductSelfPurchaseSuccessModal}) { // fn#80797, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10623:1671, offset: 0x01e896aa, size: 24 bytes, params: 2, frame: 2
return _fun80798;
}
function _fun80801({SocialLayerStorefrontProductGiftPurchaseSuccessModal}) { // fn#80801, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10623:1950, offset: 0x01e89771, size: 24 bytes, params: 2, frame: 2
return _fun80802;
}
function _fun80798(a0) { // fn#80798, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10623:1731, offset: 0x01e896c2, size: 50 bytes, params: 2, frame: 13
return <SocialLayerStorefrontProductSelfPurchaseSuccessModal {...env2_0} {...a0} />;
}
@@ -0,0 +1,528 @@
/* Metro module 10449; source: modules/slayer_storefront/native/SocialLayerStorefrontPoductPurchaseSuccessModal.tsx; dependencies: [862, 31, 27, 4502, 4279, 6832, 661, 33, 4501, 697, 4017, 4577, 4504, 4081, 1478, 566, 6829, 7717, 4589, 6618, 5287, 5312, 1244, 8467, 4573, 4578, 6777, 6774, 8462, 6789, 683, 4594, 10437, 3130, 10007, 3995, 2] */
function _fun80885(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#80885, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10635:6, offset: 0x01e8dcd7, size: 979 bytes, params: 8, frame: 24
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(862) /* metro dependency 862 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
const env0_5 = value.Image;
const env0_6 = value.ScrollView;
const env0_7 = value.View;
const accessibilityStore = importDefault(4502) /* metro dependency 4502: AccessibilityStore */;
const skuStore = importDefault(4279) /* metro dependency 4279: SKUStore */;
const env0_10 = (require(6832) /* metro dependency 6832: SocialLayerStorefrontConstants */).SOCIAL_LAYER_DAYS_TO_CLAIM_ITEM;
value = require(661) /* metro dependency 661: Constants */;
const env0_11 = value.AnalyticEvents;
const env0_12 = value.Orientation;
const env0_13 = value.VerticalGradient;
value = require(33) /* metro dependency 33 */;
const env0_14 = value.jsx;
const env0_15 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
let createStyles = value.createStyles;
object2 = {};
let BLACK = (importDefault(697) /* metro dependency 697: native */).colors.BLACK;
object2.root = {flex: 1, backgroundColor: BLACK};
object2.backdropImage = {'position': 'absolute', 'inset': 0, 'opacity': 0.45};
object2.backdropGradient = {'position': 'absolute', 'inset': 0};
BLACK = (importDefault(697) /* metro dependency 697: native */).colors.BLACK;
object2.curtain = {'position': 'absolute', 'inset': 0, backgroundColor: BLACK};
object2.main = {flex: 1};
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object2.header = {'flexDirection': 'row', 'justifyContent': 'flex-start', 'alignItems': 'center',
paddingHorizontal: PX_16};
const WHITE = (importDefault(697) /* metro dependency 697: native */).colors.WHITE;
object2.closeButtonIcon = {tintColor: WHITE};
object2.body = {'flexGrow': 1, 'flexDirection': 'column', 'justifyContent': 'center'};
object2.preview = {'flexDirection': 'row', 'justifyContent': 'center', 'alignItems': 'center'};
const object3 = {'paddingTop': null, 'flexDirection': 'column', 'alignItems': 'center',
'justifyContent': 'flex-start'};
let PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
object3.paddingTop = PX_24;
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object3.gap = PX_8;
object2.messages = object3;
let PX_32 = (importDefault(697) /* metro dependency 697: native */).space.PX_32;
object2.title = {textAlign: 'center', marginHorizontal: PX_32};
PX_32 = (importDefault(697) /* metro dependency 697: native */).space.PX_32;
object2.description = {textAlign: 'center', marginHorizontal: PX_32};
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object2.footer = {marginBottom: PX_16};
PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
object2.cta = {marginHorizontal: PX_24};
const object4 = {textAlign: 'center'};
PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
object4.marginHorizontal = PX_24;
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object4.marginBottom = PX_12;
object2.finePrint = object4;
const env0_16 = Reflect.apply(createStyles, value, [object2]);
value = require(4501) /* metro dependency 4501: createStyles */;
createStyles = value.createStyles;
const PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
const env0_17 = Reflect.apply(createStyles, value, [{linkAccountIcon: {marginRight: PX_4}}]);
object2 = {code: 'function SocialLayerStorefrontPoductPurchaseSuccessModalTsx1(){const{interpolate,springInput}=this.__closure;return{opacity:interpolate(springInput.get(),[0,1],[0.1,1]),transform:[{scale:interpolate(springInput.get(),[0,1],[0,1])}]};}'};
object2 = {code: 'function SocialLayerStorefrontPoductPurchaseSuccessModalTsx2(){const{interpolate,springInput}=this.__closure;return{opacity:interpolate(springInput.get(),[0,1],[0,1]),transform:[{scale:interpolate(springInput.get(),[0,1],[0.75,1])}]};}'};
object2 = {code: 'function SocialLayerStorefrontPoductPurchaseSuccessModalTsx3(){const{interpolate,linearInput}=this.__closure;return{opacity:interpolate(linearInput.get(),[0,1],[0.5,0])};}'};
const env0_21 = [80, 79, 78, 75, 72, 50, 45, 35, 70];
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/slayer_storefront/native/SocialLayerStorefrontPoductPurchaseSuccessModal.tsx');
exports.SocialLayerStorefrontProductSelfPurchaseSuccessModal = SocialLayerStorefrontProductSelfPurchaseSuccessModal;
exports.SocialLayerStorefrontProductGiftPurchaseSuccessModal = SocialLayerStorefrontProductGiftPurchaseSuccessModal;
}
function PurchaseSuccessModalBase({sku, title, body, finePrint, ctaLabel, ctaIcon, ctaLoading, onCtaPress, onClose}) { // fn#80886, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10635:2150, offset: 0x01e8e0aa, size: 1382 bytes, params: 2, frame: 47
const styles = useStyles();
const width = (importDefault(1478) /* metro dependency 1478: useWindowDimensionsNative */)().width;
const env0_4 = width;
const useReducedMotion = (require(566) /* metro dependency 566: flux */).useStateFromStores([AccessibilityStore],
function() {
return AccessibilityStore.useReducedMotion;
});
const {previewViewStyle, textViewStyle, curtainViewStyle} = _fun80887(useReducedMotion);
const binding = env0_4;
const value3 = binding.useMemo(_fun80893, [sku]);
const value4 = binding.useMemo(function() {
return {width: width};
}, [width]);
const env0_1 = binding.useRef(env0_21);
binding.useEffect(_fun80896, [binding.useCallback(_fun80895, [])]);
binding.useEffect(function() {
require(dependencyMap[17]).lockOrientation(Orientation.PORTRAIT);
return _fun80899;
}, []);
const items4 = [styles.root, value4];
const items2 = [value3 != null && <Image source={{uri: value3}} style={styles.backdropImage} blurRadius={4} resizeMode="cover" />];
const defaultImport = importDefault(4589) /* metro dependency 4589 */;
const {START, END} = VerticalGradient;
items2[1] = ((Component) => <Component style={styles.backdropGradient} start={START} end={END} locations={[0.4,
0.75, 1]} colors={['rgba(0,0,0,0)', 'rgba(0,0,0,0.6)', '#000000']} />)(defaultImport);
const SafeAreaPaddingView = (require(6618) /* metro dependency 6618: SafeAreaView */).SafeAreaPaddingView;
const HeaderBackButton = (require(5287) /* metro dependency 5287 */).HeaderBackButton;
const object = {onPress: onClose, backImage: backImage};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object.accessibilityLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.cpT0Cq);
object.labelVisible = false;
const items3 = [<View style={styles.header}><HeaderBackButton {...object} /></View>];
const View2 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
const view = <View2 style={[styles.preview,
previewViewStyle]}>{((Component) => <Component sku={sku} size={250} />)(importDefault(8467) /* metro dependency 8467: SlayerStorefrontItemCard */)}</View2>;
const View3 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
const items6 = [styles.messages, textViewStyle];
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
items3[1] = <ScrollView style={{flex: 1}} contentContainerStyle={styles.body} alwaysBounceVertical={false}>{view}<View3 style={items6}><Text variant="heading-xl/semibold" color="white" style={styles.title}>{title}</Text><Text variant="text-md/medium" color="white" style={styles.description}>{body}</Text></View3></ScrollView>;
const r16 = finePrint != null && <Text variant="text-xs/normal" color="text-muted" style={styles.finePrint}>{finePrint}</Text>;
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
items3[2] = <View style={styles.footer}>{r16}<View style={styles.cta}><Button onPress={onCtaPress ?? onClose} text={ctaLabel ?? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.cpT0Cq)} icon={ctaIcon} loading={ctaLoading} size="lg" grow /></View></View>;
items2[2] = <SafeAreaPaddingView style={styles.main} top bottom left right>{items3}</SafeAreaPaddingView>;
const View4 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
items2[3] = <View4 style={[styles.curtain, curtainViewStyle]} pointerEvents="none" />;
return (
<View style={items4}>
{items2}
</View>
);
}
function SocialLayerStorefrontProductSelfPurchaseSuccessModal(a0) { // fn#80901, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10635:5656, offset: 0x01e8ec2c, size: 996 bytes, params: 2, frame: 29
const skuId = a0.skuId;
a0.orbsReward;
const analyticsLocations = a0.analyticsLocations;
const onClose = a0.onClose;
const value = undefined;
const styles = useStyles();
const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStores([SKUStore], function() {
return SKUStore.get(skuId);
});
const useGetOrFetchApplicationsModule = require(6777) /* metro dependency 6777: useGetOrFetchApplications */;
const value4 = null;
const value5 = useGetOrFetchApplicationsModule.useGetOrFetchApplication(value4 == value3 ? value : value3.applicationId);
const value6 = (importDefault(6774) /* metro dependency 6774: useStartAuthorize */)(value4 != value5 ? value5 : value4);
const fetched = value6.fetched;
const env0_4 = fetched;
const hasAlreadyLinked = value6.hasAlreadyLinked;
const canStartAuthorization = value6.canStartAuthorization;
const startAuthorization = value6.startAuthorization;
const value7 = (require(8462) /* metro dependency 8462: useSocialLayerStorefrontMobileAccountLinkingDisabled */).useSocialLayerStorefrontMobileAccountLinkingDisabled(value4 == value3 ? value : value3.applicationId);
let binding = env0_4;
const value8 = binding.useMemo(_fun80903, [analyticsLocations]);
const env0_9 = binding.useRef({analyticsLocations: value8, skuId: skuId,
applicationId: value4 == value3 ? value : value3.applicationId, canStartAuthorization: canStartAuthorization});
binding = env0_4;
binding.useEffect(_fun80904, [canStartAuthorization]);
binding.useEffect(_fun80905, [fetched, hasAlreadyLinked]);
const value9 = binding.useCallback(_fun80906, [startAuthorization, value8, skuId,
value4 == value3 ? value : value3.applicationId]);
(importDefault(4594) /* metro dependency 4594: useMountEffect */)(_fun80907);
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const r10 = hasAlreadyLinked ? Reflect.apply(string, intl,
[(require(1244) /* metro dependency 1244: indexNative */).t['5glWta']]) : Reflect.apply(string, intl,
[(importDefault(3130) /* metro dependency 3130: SlayerStorefrontMessages */).bRPsNX]);
const r7 = !hasAlreadyLinked && canStartAuthorization && !value7;
return (
<PurchaseSuccessModalBase
sku={value3}
title={r10}
body={env0_4.useMemo(_fun80908, [hasAlreadyLinked, r7, value4 == value5 ? value : value5.name,
value4 == value3 ? value : value3.name])}
finePrint={hasAlreadyLinked ? value : intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.TTj7ME,
{numDays: SOCIAL_LAYER_DAYS_TO_CLAIM_ITEM})}
ctaLabel={r7 ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t['VDAhr+']) : value}
ctaIcon={r7 ? ((ExperimentalGameControllerLinkIcon) => <ExperimentalGameControllerLinkIcon size="xs" color={(importDefault(697) /* metro dependency 697: native */).colors.WHITE} style={styles.linkAccountIcon} />)((require(10007) /* metro dependency 10007: ExperimentalGameControllerLinkIcon */).ExperimentalGameControllerLinkIcon) : value}
ctaLoading={!fetched}
onCtaPress={r7 ? value9 : value}
onClose={onClose}
/>
);
}
function SocialLayerStorefrontProductGiftPurchaseSuccessModal(a0) { // fn#80909, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10635:8075, offset: 0x01e8f39f, size: 296 bytes, params: 2, frame: 21
const env0_0 = a0.skuId;
a0.orbsReward;
const recipient = a0.recipient;
const analyticsLocations = a0.analyticsLocations;
const onClose = a0.onClose;
const value2 = undefined;
const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStores([SKUStore], function() {
return SKUStore.get(skuId);
});
const binding = env0_4;
var env0_4 = binding.useMemo(_fun80911, [analyticsLocations]);
(importDefault(4594) /* metro dependency 4594: useMountEffect */)(_fun80912);
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
return (
<PurchaseSuccessModalBase
sku={value3}
title={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['5glWta'])}
body={binding.useMemo(_fun80913, [value3 == null ? value2 : value3.name, recipient])}
onClose={onClose}
/>
);
}
function _fun80887(a0) { // fn#80887, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10635:2282, offset: 0x01e8e610, size: 390 bytes, params: 2, frame: 23
var object2;
const env0_0 = a0;
const value2 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(0);
const value3 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(0);
env1_4.useEffect(_fun80888, [value2, a0, value3]);
object2 = {};
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
let useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
let closure = o_80889;
const interpolate = reanimatedRexportModule.interpolate;
closure.__closure = {interpolate: interpolate, springInput: value2};
closure.__workletHash = 7750024112371;
closure.__initData = env1_18;
object2.previewViewStyle = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
const moduleValue4 = reanimatedRexportModule;
useAnimatedStyle = moduleValue4.useAnimatedStyle;
closure = l_80890;
closure.__closure = {interpolate: interpolate, springInput: value2};
closure.__workletHash = 3400602564931;
closure.__initData = env1_19;
object2.textViewStyle = Reflect.apply(useAnimatedStyle, moduleValue4, [closure]);
const moduleValue5 = reanimatedRexportModule;
useAnimatedStyle = moduleValue5.useAnimatedStyle;
closure = c_80891;
closure.__closure = {interpolate: interpolate, linearInput: value3};
closure.__workletHash = 4092396015860;
closure.__initData = env1_20;
object2.curtainViewStyle = Reflect.apply(useAnimatedStyle, moduleValue5, [closure]);
return object2;
}
function _fun80893() { // fn#80893, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10635:3455, offset: 0x01e8e9e2, size: 101 bytes, params: 1, frame: 15
var r2;
let value = environment.__proto__;
const value2 = undefined;
const cardBackgroundImageURL = (require(6829) /* metro dependency 6829: SlayerStorefrontUtils */).getCardBackgroundImageURL(sku);
if (cardBackgroundImageURL != null) {
r2 = cardBackgroundImageURL;
} else {
value = require(6829) /* metro dependency 6829: SlayerStorefrontUtils */;
value = value.getCardImageURL(sku);
r2 = value;
}
return r2 == null ? value2 : r2.toString();
}
function _fun80895() { // fn#80895, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10635:3663, offset: 0x01e8ea56, size: 282 bytes, params: 1, frame: 20
const HapticFeedbackTypes = (require(4081) /* metro dependency 4081: HapticUtilsNative */).HapticFeedbackTypes;
let value = environment.__proto__;
const value3 = env1_3(env0_1.current);
const property = value3[0];
const value4 = value3.slice(1);
if (property == null) {
if (value4.length >= env1_21.length / 2) {
value = require(4081) /* metro dependency 4081: HapticUtilsNative */;
value.triggerHapticFeedback(HapticFeedbackTypes.IMPACT_LIGHT);
} else {
value = require(4081) /* metro dependency 4081: HapticUtilsNative */;
value.triggerHapticFeedback(HapticFeedbackTypes.IMPACT_MEDIUM);
}
} else if (value4.length === 0) {
value = require(4081) /* metro dependency 4081: HapticUtilsNative */;
value.triggerHapticFeedback(HapticFeedbackTypes.IMPACT_HEAVY);
} else if (value4.length >= env1_21.length / 2) {
value = require(4081) /* metro dependency 4081: HapticUtilsNative */;
value.triggerHapticFeedback(HapticFeedbackTypes.IMPACT_LIGHT);
} else {
value = require(4081) /* metro dependency 4081: HapticUtilsNative */;
value.triggerHapticFeedback(HapticFeedbackTypes.IMPACT_MEDIUM);
}
if (property != null) {
global.setTimeout(env0_2, property);
}
env0_1.current = value4;
}
function _fun80896() { // fn#80896, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10635:4029, offset: 0x01e8eb70, size: 24 bytes, params: 1, frame: 9
env0_2();
return _fun80897;
}
function _fun80898() { // fn#80898, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10635:4077, offset: 0x01e8eb88, size: 57 bytes, params: 1, frame: 12
const deviceOrientationModule = require(7717) /* metro dependency 7717: DeviceOrientation */;
const lockOrientation = deviceOrientationModule.lockOrientation;
const PORTRAIT = Orientation.PORTRAIT;
Reflect.apply(lockOrientation, deviceOrientationModule, [PORTRAIT]);
return _fun80899;
}
function PurchaseSuccessModalBaseBackImage() { // fn#80900, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10635:4589, owner: PurchaseSuccessModalBase.backImage, offset: 0x01e8ebe6, size: 70 bytes, params: 1, frame: 14
const XSmallIcon = (require(5312) /* metro dependency 5312: XSmallIcon */).XSmallIcon;
return <XSmallIcon size="lg" style={styles.closeButtonIcon} />;
}
function _fun80903() { // fn#80903, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10635:6060, offset: 0x01e8f02a, size: 84 bytes, params: 1, frame: 15
const r2 = analyticsLocations ?? [];
const items2 = [];
const value = arraySpread(items2, r2, 0, undefined);
const SLAYER_STOREFRONT_NATIVE_PURCHASE_SUCCESS = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).SLAYER_STOREFRONT_NATIVE_PURCHASE_SUCCESS;
items2[value] = SLAYER_STOREFRONT_NATIVE_PURCHASE_SUCCESS;
value + 1;
return items2;
}
function _fun80904() { // fn#80904, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10635:6264, offset: 0x01e8f07e, size: 26 bytes, params: 1, frame: 2
env0_9.current.canStartAuthorization = canStartAuthorization;
}
function _fun80905() { // fn#80905, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10635:6323, offset: 0x01e8f098, size: 129 bytes, params: 1, frame: 18
var current;
var analyticsLocations;
var skuId;
var applicationId;
var canStartAuthorization;
var value2;
var defaultImport;
if (fetched) {
current = env0_9.current;
analyticsLocations = current.analyticsLocations;
skuId = current.skuId;
applicationId = current.applicationId;
canStartAuthorization = current.canStartAuthorization;
value2 = environment.__proto__;
defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
defaultImport.track(AnalyticEvents.SLAYER_STOREFRONT_LINK_ACCOUNT_STEP_VIEWED,
{location_stack: analyticsLocations,
sku_id: skuId, application_id: applicationId, is_gift: false, is_account_linked: hasAlreadyLinked,
can_start_authorization: canStartAuthorization});
}
}
function _fun80906() { // fn#80906, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10635:6621, offset: 0x01e8f119, size: 127 bytes, params: 1, frame: 17
const value2 = undefined;
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
const track = defaultImport.track;
const SLAYER_STOREFRONT_ACCOUNT_LINK_CLICKED = AnalyticEvents.SLAYER_STOREFRONT_ACCOUNT_LINK_CLICKED;
Reflect.apply(track, defaultImport, [SLAYER_STOREFRONT_ACCOUNT_LINK_CLICKED, {location_stack: env0_8, sku_id: skuId,
application_id: env0_2 == null ? value2 : env0_2.applicationId, is_gift: false}]);
startAuthorization({analyticsLocations: env0_8});
return value2;
}
function _fun80907() { // fn#80907, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10635:6846, offset: 0x01e8f198, size: 126 bytes, params: 1, frame: 18
const value2 = undefined;
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
const track = defaultImport.track;
const OPEN_MODAL = AnalyticEvents.OPEN_MODAL;
const object2 = {};
object2.location_stack = env0_8;
const SOCIAL_LAYER_STOREFRONT_SELF_PURCHASE_SUCCESS_MODAL_KEY = (require(10437) /* metro dependency 10437: SocialLayerStorefrontNativeActionCreators */).SOCIAL_LAYER_STOREFRONT_SELF_PURCHASE_SUCCESS_MODAL_KEY;
object2.type = SOCIAL_LAYER_STOREFRONT_SELF_PURCHASE_SUCCESS_MODAL_KEY;
object2.sku_id = skuId;
object2.application_id = env0_2 == null ? value2 : env0_2.applicationId;
Reflect.apply(track, defaultImport, [OPEN_MODAL, object2]);
return value2;
}
function _fun80908() { // fn#80908, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10635:7141, offset: 0x01e8f216, size: 393 bytes, params: 1, frame: 22
var name;
var r0;
var binding;
var value3;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var formatToPlainString;
var eNNnIG;
var object2;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var property;
var value4;
var value5;
var W2znvX;
var value6;
var value;
if (hasAlreadyLinked) {
value5 = undefined;
formatToPlainString = intl.formatToPlainString;
W2znvX = t.W2znvX;
object2 = {};
name = env0_2 == null ? value5 : env0_2.name;
value6 = '';
object2.skuName = name ?? value6;
name = env0_3 == null ? value5 : env0_3.name;
object2.applicationName = name ?? value6;
r0 = Reflect.apply(formatToPlainString, intl, [W2znvX, object2]);
} else {
binding = env0_10;
value3 = undefined;
formatToPlainString = intl.formatToPlainString;
if (binding) {
property = t['EgCl+Q'];
object2 = {};
name = env0_2 == null ? value3 : env0_2.name;
value4 = '';
object2.skuName = name ?? value4;
name = env0_3 == null ? value3 : env0_3.name;
object2.applicationName = name ?? value4;
r0 = Reflect.apply(formatToPlainString, intl, [property, object2]);
} else {
eNNnIG = (importDefault(3130) /* metro dependency 3130: SlayerStorefrontMessages */).eNNnIG;
name = env0_3 == null ? value3 : env0_3.name;
value = '';
value = Reflect.apply(formatToPlainString, intl, [eNNnIG, {applicationName: name ?? value}]);
r0 = value;
}
}
return r0;
}
function _fun80911() { // fn#80911, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10635:8212, offset: 0x01e8f4c7, size: 84 bytes, params: 1, frame: 15
const r2 = analyticsLocations ?? [];
const items2 = [];
const value = arraySpread(items2, r2, 0, undefined);
const SLAYER_STOREFRONT_NATIVE_PURCHASE_SUCCESS = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).SLAYER_STOREFRONT_NATIVE_PURCHASE_SUCCESS;
items2[value] = SLAYER_STOREFRONT_NATIVE_PURCHASE_SUCCESS;
value + 1;
return items2;
}
function _fun80912() { // fn#80912, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10635:8301, offset: 0x01e8f51b, size: 126 bytes, params: 1, frame: 18
const value2 = undefined;
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
const track = defaultImport.track;
const OPEN_MODAL = AnalyticEvents.OPEN_MODAL;
const object2 = {};
object2.location_stack = env0_4;
const SOCIAL_LAYER_STOREFRONT_GIFT_PURCHASE_SUCCESS_MODAL_KEY = (require(10437) /* metro dependency 10437: SocialLayerStorefrontNativeActionCreators */).SOCIAL_LAYER_STOREFRONT_GIFT_PURCHASE_SUCCESS_MODAL_KEY;
object2.type = SOCIAL_LAYER_STOREFRONT_GIFT_PURCHASE_SUCCESS_MODAL_KEY;
object2.sku_id = skuId;
object2.application_id = env0_3 == null ? value2 : env0_3.applicationId;
Reflect.apply(track, defaultImport, [OPEN_MODAL, object2]);
return value2;
}
function _fun80913() { // fn#80913, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10635:8544, offset: 0x01e8f599, size: 155 bytes, params: 1, frame: 19
let value = environment.__proto__;
const value2 = undefined;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const formatToPlainString = intl.formatToPlainString;
const property = (require(1244) /* metro dependency 1244: indexNative */).t['2VjPTw'];
const object2 = {};
object2.itemName = env0_3 == null ? value2 : env0_3.name;
const getName = (importDefault(3995) /* metro dependency 3995: UserUtils */).getName;
value = Reflect.apply(getName, value, [recipient]);
object2.giftRecipient = value ?? 'your recipient';
return Reflect.apply(formatToPlainString, intl, [property, object2]);
}
function _fun80888() { // fn#80888, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10635:2374, offset: 0x01e8e796, size: 204 bytes, params: 1, frame: 20
var r1;
var r0;
var value3;
var moduleValue;
var withDelay;
var moduleValue3;
var value;
let binding = env0_1;
let set = binding.set;
const value2 = 1;
if (env0_0) {
r1 = value2;
} else {
value3 = environment.__proto__.__proto__;
moduleValue = require(4017) /* metro dependency 4017: ReanimatedRexport */;
r1 = moduleValue.withDelay(200, (require(4577) /* metro dependency 4577: spring */).withSpring(value2,
{'duration': 500, 'dampingRatio': 0.7}));
}
Reflect.apply(set, binding, [r1]);
binding = env0_2;
set = binding.set;
if (env0_0) {
r0 = value2;
} else {
value = environment.__proto__.__proto__;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
withDelay = value.withDelay;
moduleValue3 = require(4504) /* metro dependency 4504: timing */;
value = Reflect.apply(withDelay, value, [200, moduleValue3.withTiming(value2, {duration: 200})]);
r0 = value;
}
Reflect.apply(set, binding, [r0]);
}
function o_80889() { // fn#80889, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10635:2600, offset: 0x01e8e862, size: 150 bytes, params: 1, frame: 21
const object3 = {};
let value = environment.__proto__.__proto__;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const interpolate = value.interpolate;
const binding = env0_1;
object3.opacity = Reflect.apply(interpolate, value, [binding.get(), [0, 1], [0.1, 1]]);
const object4 = {};
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
object4.scale = value.interpolate(binding.get(), [0, 1], [0, 1]);
object3.transform = [object4];
return object3;
}
function l_80890() { // fn#80890, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10635:2874, offset: 0x01e8e8f8, size: 152 bytes, params: 1, frame: 21
const object3 = {};
let value = environment.__proto__.__proto__;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const interpolate = value.interpolate;
const binding = env0_1;
object3.opacity = Reflect.apply(interpolate, value, [binding.get(), [0, 1], [0, 1]]);
const object4 = {};
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
object4.scale = value.interpolate(binding.get(), [0, 1], [0.75, 1]);
object3.transform = [object4];
return object3;
}
function c_80891() { // fn#80891, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10635:3152, offset: 0x01e8e990, size: 82 bytes, params: 1, frame: 16
const object2 = {};
let value = environment.__proto__.__proto__;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
object2.opacity = value.interpolate(env0_2.get(), [0, 1], [0.5, 0]);
return object2;
}
function _fun80899() { // fn#80899, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10635:4119, offset: 0x01e8ebc1, size: 37 bytes, params: 1, frame: 11
const value = environment.__proto__.__proto__;
(require(7717) /* metro dependency 7717: DeviceOrientation */).restoreDefaultOrientation();
}
@@ -0,0 +1,656 @@
/* Metro module 10438; source: modules/slayer_storefront/native/SocialLayerStorefrontProductDetailsModal.tsx; dependencies: [57, 31, 27, 4279, 6831, 10439, 661, 33, 674, 697, 4501, 5314, 10440, 9543, 5475, 4573, 1244, 10441, 1305, 1861, 4141, 1585, 7943, 566, 6777, 6774, 6829, 6789, 6518, 491, 4594, 683, 10437, 8463, 477, 10442, 6833, 5287, 5312, 4589, 8467, 10443, 3130, 4578, 8341, 8329, 10444, 6766, 10109, 2] */
function _fun80803(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#80803, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10624:6, offset: 0x01e89789, size: 1650 bytes, params: 8, frame: 27
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 */;
const env0_5 = value.ScrollView;
const env0_6 = value.StyleSheet;
const env0_7 = value.View;
const skuStore = importDefault(4279) /* metro dependency 4279: SKUStore */;
const socialLayerStorefrontStore = importDefault(6831) /* metro dependency 6831: SocialLayerStorefrontStore */;
const env0_10 = (require(10439) /* metro dependency 10439: SocialLayerStorefrontAnalyticsConstants */).SlayerShopPDPCTAType;
value = require(661) /* metro dependency 661: Constants */;
const env0_11 = value.AnalyticEvents;
const env0_12 = value.PaymentGateways;
const env0_13 = value.PriceSetAssignmentPurchaseTypes;
value = require(33) /* metro dependency 33 */;
const env0_14 = value.jsx;
const env0_15 = value.jsxs;
const env0_16 = value.Fragment;
value = importDefault(674) /* metro dependency 674 */;
let BRAND_500 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.BRAND_500;
value = value(BRAND_500);
value = value.alpha(0.25);
const env0_17 = value.hex();
value = importDefault(674) /* metro dependency 674 */;
BRAND_500 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.BRAND_500;
value = value(BRAND_500);
value = value.alpha(0);
const env0_18 = value.hex();
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
object2.container = {flex: 1};
const object4 = {'height': null, 'flexDirection': 'row', 'alignItems': 'center', 'paddingHorizontal': null,
'gap': null, 'borderBottomWidth': 1};
const NAV_BAR_HEIGHT = (require(5314) /* metro dependency 5314: NavigatorConstantsNative */).NAV_BAR_HEIGHT;
object4.height = NAV_BAR_HEIGHT;
let PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object4.paddingHorizontal = PX_8;
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object4.gap = PX_8;
let BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
object4.borderBottomColor = BORDER_SUBTLE;
object2.header = object4;
object2.headerTitle = {flexShrink: 1};
const INTERACTIVE_ICON_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_ICON_DEFAULT;
object2.closeButtonIcon = {tintColor: INTERACTIVE_ICON_DEFAULT};
const object5 = {alignItems: 'stretch'};
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object5.gap = PX_16;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object5.paddingVertical = PX_16;
object2.scrollContent = object5;
object2.scrollContainer = {flex: 1};
const object7 = {width: '100%'};
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object7.paddingHorizontal = PX_16;
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object7.gap = PX_8;
object2.section = object7;
const object11 = {flexDirection: 'row'};
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object11.gap = PX_8;
let PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object11.paddingVertical = PX_4;
object2.bundleThumbnailRow = object11;
const object14 = {'width': 64, 'height': 64, 'borderRadius': null, 'borderWidth': 2, 'borderColor': 'transparent'};
object14.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.md;
object2.thumbnail = object14;
const BORDER_STRONG = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_STRONG;
object2.thumbnailSelected = {borderColor: BORDER_STRONG};
const object16 = {'flex': 1, 'borderRadius': null, 'overflow': 'hidden'};
object16.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object2.thumbnailInner = object16;
const object18 = {margin: 2};
object18.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object2.thumbnailInnerSelected = object18;
object2.thumbnailImage = {'width': '100%', 'height': '100%'};
PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object2.labelRow = {'flexDirection': 'row', 'alignItems': 'center', gap: PX_4};
const object19 = {};
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object19.width = PX_16;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object19.height = PX_16;
object2.labelIcon = object19;
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object2.priceRow = {'flexDirection': 'row', 'alignItems': 'center', 'flexWrap': 'wrap', gap: PX_8};
const object20 = {};
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object20.paddingHorizontal = PX_16;
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object20.paddingTop = PX_12;
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object20.gap = PX_8;
object20.borderTopWidth = 1;
BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
object20.borderTopColor = BORDER_SUBTLE;
object2.footer = object20;
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object2.footerButtonRow = {'flexDirection': 'row', 'alignItems': 'center', gap: PX_8};
object2.buyButton = {flex: 1};
object2.availabilityCopy = {textAlign: 'center'};
PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object2.legalCopy = {'display': 'flex', 'flexDirection': 'column', gap: PX_4};
const object21 = {};
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object21.marginHorizontal = PX_16;
const MOBILE_HERO_HEIGHT_PX = (require(10440) /* metro dependency 10440: carouselMediaItems */).MOBILE_HERO_HEIGHT_PX;
object21.height = MOBILE_HERO_HEIGHT_PX;
object21.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.md;
object21.overflow = 'hidden';
const BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
object21.backgroundColor = BACKGROUND_SURFACE_HIGH;
object2.hero = object21;
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object2.priceSection = {width: '100%', gap: PX_8};
object2.heroImage = {'width': '100%', 'height': '100%'};
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object2.exclusiveBadgeContainer = {paddingHorizontal: PX_16};
const env0_19 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/slayer_storefront/native/SocialLayerStorefrontProductDetailsModal.tsx');
exports.default = WrappedSocialLayerStorefrontProductDetailsModal;
}
function HeroMedia({mediaItem}) { // fn#80804, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10624:2440, offset: 0x01e89dfb, size: 438 bytes, params: 2, frame: 25
var r0;
var items2;
var value;
const styles = useStyles();
if (mediaItem.type === 'video') {
r0 = <View style={styles.hero}>{((VideoComponent) => <VideoComponent source={{uri: mediaItem.src}} poster={mediaItem.videoThumbnailSrc} muted resizeMode="cover" style={styles.heroImage} />)((require(9543) /* metro dependency 9543: Video */).VideoComponent)}</View>;
} else if (mediaItem.backgroundSrc != null) {
var viewBindingProps = {style: styles.hero};
items2 = [((Component) => <Component source={{uri: mediaItem.backgroundSrc}} style={StyleSheet.absoluteFill} resizeMode="cover" />)(importDefault(5475) /* metro dependency 5475: FastImage */)];
value = importDefault(5475) /* metro dependency 5475: FastImage */;
items2[1] = ((Component) => <Component source={{uri: mediaItem.src}} style={styles.heroImage} resizeMode="cover" />)(value);
value = <View {...viewBindingProps}>{items2}</View>;
r0 = value;
} else {
var viewBindingProps = {style: styles.hero};
value = importDefault(5475) /* metro dependency 5475: FastImage */;
value = <View {...viewBindingProps}>{((Component) => <Component source={{uri: mediaItem.src}} style={styles.heroImage} resizeMode="cover" />)(value)}</View>;
r0 = value;
}
return r0;
}
function InGameItemTag() { // fn#80805, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10624:2965, offset: 0x01e89fb1, size: 107 bytes, params: 1, frame: 18
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const V91tvy = (require(1244) /* metro dependency 1244: indexNative */).t.V91tvy;
return (
<Text variant="text-sm/medium" color="text-muted">
{Reflect.apply(string, intl, [V91tvy])}
</Text>
);
}
function ProductPriceSection({sku}) { // fn#80806, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10624:3109, offset: 0x01e8a01c, size: 236 bytes, params: 2, frame: 23
const styles = useStyles();
const storefrontNativeUtilsAndroidModule = require(10441) /* metro dependency 10441: StorefrontNativeUtilsAndroid */;
const useFormattedSKUPrice = storefrontNativeUtilsAndroidModule.useFormattedSKUPrice;
const DEFAULT = PriceSetAssignmentPurchaseTypes.DEFAULT;
const userPrice = Reflect.apply(useFormattedSKUPrice, storefrontNativeUtilsAndroidModule, [{sku: sku,
priceSetAssignmentPurchaseType: DEFAULT}]).userPrice;
return userPrice == null ? null : <View style={styles.priceSection}><InGameItemTag /><View style={styles.priceRow}>{((Text) => <Text variant="text-md/bold" color="mobile-text-heading-primary">{userPrice}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)}</View></View>;
}
function BundleThumbnailRow({items, mediaItems, selectedIndex, onSelectIndex, trackPDPClick}) { // fn#80807, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10624:3450, offset: 0x01e8a108, size: 312 bytes, params: 2, frame: 25
const styles = useStyles();
const env0_5 = styles.useCallback(function(a0) {
trackPDPClick(SlayerShopPDPCTAType.CAROUSEL_ITEM);
onSelectIndex(a0);
}, [onSelectIndex, trackPDPClick]);
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const U7DAV9 = (require(1244) /* metro dependency 1244: indexNative */).t.U7DAV9;
return (
<View style={styles.section}>
<Text variant="text-xs/semibold" color="text-muted">
{Reflect.apply(string, intl, [U7DAV9])}
</Text>
<ScrollView
horizontal
showsHorizontalScrollIndicator={false}
contentContainerStyle={styles.bundleThumbnailRow}
>
{mediaItems.map(_fun80809)}
</ScrollView>
</View>
);
}
function SKUNameAndDescriptionSection({sku}) { // fn#80811, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10624:4327, offset: 0x01e8a3c2, size: 255 bytes, params: 2, frame: 24
var r0;
var items2;
var moduleValue2;
const styles = useStyles();
const stringUtilsModule = require(1861) /* metro dependency 1861: StringUtils */;
if (stringUtilsModule.isNullOrEmpty(sku.name)) {
r0 = null;
} else {
var viewBindingProps = {style: styles.section};
items2 = [((Heading) => <Heading variant="heading-xl/bold" color="mobile-text-heading-primary">{sku.name}</Heading>)((require(4573) /* metro dependency 4573: Text */).Heading)];
moduleValue2 = stringUtilsModule;
items2[1] = !moduleValue2.isNullOrEmpty(sku.description) && ((Text) => <Text variant="text-md/medium" color="text-muted">{sku.description}</Text>)((require(4573) /* metro dependency 4573: Text */).Text);
r0 = <View {...viewBindingProps}>{items2}</View>;
}
return r0;
}
function ItemDetailsSection({selectedItem, applicationId}) { // fn#80812, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10624:4687, offset: 0x01e8a4c1, size: 669 bytes, params: 2, frame: 30
var r20;
var r6;
var r0;
var moduleValue;
var moduleValue3;
var moduleValue4;
var items3;
var isNullOrEmpty3;
var items2;
const styles = useStyles();
if (selectedItem.labelIconAssetId != null) {
moduleValue = require(4141) /* metro dependency 4141: StoreUtils */;
r20 = moduleValue.getAssetURL(applicationId, selectedItem.labelIconAssetId);
} else {
r20 = null;
}
const r12 = selectedItem.title?.trim();
const r17 = selectedItem.label?.trim();
const r10 = selectedItem.description?.trim();
const stringUtilsModule = require(1861) /* metro dependency 1861: StringUtils */;
if (stringUtilsModule.isNullOrEmpty(r12)) {
moduleValue3 = stringUtilsModule;
if (moduleValue3.isNullOrEmpty(r17)) {
moduleValue4 = require(1861) /* metro dependency 1861: StringUtils */;
if (moduleValue4.isNullOrEmpty(r10)) {
r0 = null;
} else {
var viewBindingProps = {style: styles.section};
r6 = !(require(1861) /* metro dependency 1861: StringUtils */).isNullOrEmpty(r12) && ((Heading) => <Heading variant="heading-lg/bold" color="mobile-text-heading-primary">{r12}</Heading>)((require(4573) /* metro dependency 4573: Text */).Heading);
items3 = [r6];
isNullOrEmpty3 = (require(1861) /* metro dependency 1861: StringUtils */).isNullOrEmpty(r17);
if (isNullOrEmpty3) {
r6 = !isNullOrEmpty3;
} else {
var viewBinding2Props = {style: styles.labelRow};
items2 = [r20 != null && ((Component) => <Component source={{uri: r20}} style={styles.labelIcon} />)(importDefault(5475) /* metro dependency 5475: FastImage */)];
items2[1] = ((Text) => <Text variant="text-sm/medium" color="text-muted">{r17}</Text>)((require(4573) /* metro dependency 4573: Text */).Text);
r6 = <View {...viewBinding2Props}>{items2}</View>;
}
items3[1] = r6;
r6 = !(require(1861) /* metro dependency 1861: StringUtils */).isNullOrEmpty(r10) && ((Text) => <Text variant="text-md/medium" color="text-default">{r10}</Text>)((require(4573) /* metro dependency 4573: Text */).Text);
items3[2] = r6;
r0 = <View {...viewBindingProps}>{items3}</View>;
}
} else {
var viewBindingProps = {style: styles.section};
r6 = !(require(1861) /* metro dependency 1861: StringUtils */).isNullOrEmpty(r12) && ((Heading) => <Heading variant="heading-lg/bold" color="mobile-text-heading-primary">{r12}</Heading>)((require(4573) /* metro dependency 4573: Text */).Heading);
items3 = [r6];
isNullOrEmpty3 = (require(1861) /* metro dependency 1861: StringUtils */).isNullOrEmpty(r17);
if (isNullOrEmpty3) {
r6 = !isNullOrEmpty3;
} else {
var viewBinding2Props = {style: styles.labelRow};
items2 = [r20 != null && ((Component) => <Component source={{uri: r20}} style={styles.labelIcon} />)(importDefault(5475) /* metro dependency 5475: FastImage */)];
items2[1] = ((Text) => <Text variant="text-sm/medium" color="text-muted">{r17}</Text>)((require(4573) /* metro dependency 4573: Text */).Text);
r6 = <View {...viewBinding2Props}>{items2}</View>;
}
items3[1] = r6;
r6 = !(require(1861) /* metro dependency 1861: StringUtils */).isNullOrEmpty(r10) && ((Text) => <Text variant="text-md/medium" color="text-default">{r10}</Text>)((require(4573) /* metro dependency 4573: Text */).Text);
items3[2] = r6;
r0 = <View {...viewBindingProps}>{items3}</View>;
}
} else {
var viewBindingProps = {style: styles.section};
r6 = !(require(1861) /* metro dependency 1861: StringUtils */).isNullOrEmpty(r12) && ((Heading) => <Heading variant="heading-lg/bold" color="mobile-text-heading-primary">{r12}</Heading>)((require(4573) /* metro dependency 4573: Text */).Heading);
items3 = [r6];
isNullOrEmpty3 = (require(1861) /* metro dependency 1861: StringUtils */).isNullOrEmpty(r17);
if (isNullOrEmpty3) {
r6 = !isNullOrEmpty3;
} else {
var viewBinding2Props = {style: styles.labelRow};
items2 = [r20 != null && ((Component) => <Component source={{uri: r20}} style={styles.labelIcon} />)(importDefault(5475) /* metro dependency 5475: FastImage */)];
items2[1] = ((Text) => <Text variant="text-sm/medium" color="text-muted">{r17}</Text>)((require(4573) /* metro dependency 4573: Text */).Text);
r6 = <View {...viewBinding2Props}>{items2}</View>;
}
items3[1] = r6;
r6 = !(require(1861) /* metro dependency 1861: StringUtils */).isNullOrEmpty(r10) && ((Text) => <Text variant="text-md/medium" color="text-default">{r10}</Text>)((require(4573) /* metro dependency 4573: Text */).Text);
items3[2] = r6;
r0 = <View {...viewBindingProps}>{items3}</View>;
}
return r0;
}
function SocialLayerStorefrontProductDetailsModal({skuId, analyticsLocations}) { // fn#80813, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10624:5501, offset: 0x01e8a75e, size: 2816 bytes, params: 2, frame: 54
var r34;
var r27;
var jsxRuntimeEnv0_16Binding;
var items7;
var moduleValue8;
const styles = useStyles();
const value3 = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)();
const defaultImport = importDefault(7943) /* metro dependency 7943: NativePaymentHooksAndroid */;
const useNativeIAPPayments = defaultImport.useNativeIAPPayments;
const storeFront = Reflect.apply(useNativeIAPPayments, defaultImport, []).storeFront;
const env0_3 = storeFront;
const value4 = (require(566) /* metro dependency 566: flux */).useStateFromStores([SKUStore], function() {
return SKUStore.get(skuId);
});
const env0_4 = value4;
const value5 = (require(566) /* metro dependency 566: flux */).useStateFromStores([SKUStore], _fun80815);
const value7 = (require(6777) /* metro dependency 6777: useGetOrFetchApplications */).useGetOrFetchApplication(value4?.applicationId);
const hasAlreadyLinked = (importDefault(6774) /* metro dependency 6774: useStartAuthorize */)(value7 ?? null).hasAlreadyLinked;
const skuAssets = (require(566) /* metro dependency 566: flux */).useStateFromStores([SocialLayerStorefrontStore],
function() {
return SocialLayerStorefrontStore.getSkuAssets();
});
let binding = env0_4;
let useMemo = binding.useMemo;
const value8 = Reflect.apply(useMemo, binding, [_fun80817, [value4]]);
var [property, property2] = env0_3(env0_4.useState(0), 2);
const value12 = env0_4.useMemo(_fun80818, [analyticsLocations]);
const value13 = (importDefault(6518) /* metro dependency 6518: useInitialValue */)(_fun80819);
const value14 = env0_4.useMemo(_fun80820, [value12, skuId, value4?.type, value4?.productLine, value4?.applicationId,
value13]);
(importDefault(4594) /* metro dependency 4594: useMountEffect */)(_fun80821);
const env0_10 = env0_4.useRef('not_started');
(require(4594) /* metro dependency 4594: useMountEffect */).useUnmountEffect(_fun80822);
const value15 = env0_4.useCallback(_fun80823, [skuId, value4?.applicationId, value12]);
binding = env0_4;
useMemo = binding.useMemo;
const value17 = env0_3(Reflect.apply(useMemo, binding, [_fun80824, [value4, skuAssets]]), 2);
const property3 = value17[0];
const property4 = value17[1];
const value18 = property4.length > 1;
const r40 = property < property4.length ? property : 0;
const r38 = property3[r40] ?? null;
const r33 = property4[r40] ?? null;
let r10 = (value4 == null || value4.tenantMetadata == null || (value4.tenantMetadata.socialLayer == null || value4.tenantMetadata.socialLayer.carouselItems == null) ? undefined : value4.tenantMetadata.socialLayer.carouselItems.length) ?? 0;
const value19 = r10 === property3.length;
var [property, env0_13] = env0_3(env0_4.useState(false), 2);
const env0_14 = env0_4.useRef(false);
env0_4.useEffect(_fun80825, [value4, skuAssets, value19, value5, storeFront?.country]);
const value24 = env0_4.useCallback(_fun80830,
[(importDefault(10442) /* metro dependency 10442: useMobileSocialLayerPurchaseSKUAndroid */)({skuId: skuId,
sku: value4, analyticsLoadId: value13, analyticsLocations: value12, onPurchaseComplete: onPurchaseComplete,
onPurchaseError: onPurchaseError, onPurchasePending: function() {
}}), value15, value14, env0_4.useCallback(_fun80826, [value14])]);
const value25 = env0_4.useCallback(_fun80832, [skuId, value12, value15]);
if (value4 == null) {
return null;
}
const isSlayerSkuAvailableOnThisPlatform2 = (require(6833) /* metro dependency 6833: StorefrontUtils */).isSlayerSkuAvailableOnThisPlatform(value4);
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const value26 = Reflect.apply(string, intl, [(require(1244) /* metro dependency 1244: indexNative */).t.boqtTA]);
const items2 = [styles.container];
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
items2[1] = {paddingTop: platformUtilsModule.isIOS() ? 0 : value3.top};
const HeaderBackButton = (require(5287) /* metro dependency 5287 */).HeaderBackButton;
const headerBackButton = <HeaderBackButton onPress={(require(10437) /* metro dependency 10437: SocialLayerStorefrontNativeActionCreators */).closeSocialLayerStorefrontProductDetailsModal} backImage={backImage} accessibilityLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.cpT0Cq)} labelVisible={false} />;
const Heading = (require(4573) /* metro dependency 4573: Text */).Heading;
const items3 = [<View style={styles.header}>{headerBackButton}<Heading variant="heading-lg/bold" color="mobile-text-heading-primary" style={styles.headerTitle}>{value7?.name}</Heading></View>];
const r11 = value4.exclusive && ((Component) => <Component style={StyleSheet.absoluteFill} colors={[env0_17,
env0_18]} pointerEvents="none" />)(importDefault(4589) /* metro dependency 4589 */);
const items6 = [r33 != null ? <HeroMedia mediaItem={r33} /> : value8 != null && ((Component) => <Component sku={value4} />)(importDefault(8467) /* metro dependency 8467: SlayerStorefrontItemCard */)];
items6[1] = value4.exclusive && <View style={styles.exclusiveBadgeContainer}>{((ExclusiveBadge) => <ExclusiveBadge />)((require(10443) /* metro dependency 10443: SocialLayerStorefrontBadges */).ExclusiveBadge)}</View>;
if (value18) {
jsxRuntimeEnv0_16Binding = jsxRuntimeEnv0_16;
items7 = [<SKUNameAndDescriptionSection sku={value4} />];
items7[1] = <BundleThumbnailRow items={property3} mediaItems={property4} selectedIndex={r40} onSelectIndex={property2} trackPDPClick={value15} />;
r34 = value4.applicationId != null && r38 != null;
r34 = r34 && <ItemDetailsSection selectedItem={r38} applicationId={value4.applicationId} />;
items7[2] = r34;
r27 = <>{items7}</>;
} else {
r27 = <SKUNameAndDescriptionSection sku={value4} />;
}
items6[2] = r27;
items3[1] = <View style={styles.scrollContainer}>{r11}<ScrollView contentContainerStyle={styles.scrollContent}>{items6}</ScrollView></View>;
const items8 = [styles.footer];
const bottom = value3.bottom;
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
items8[1] = {paddingBottom: bottom + PX_16};
const items9 = [<ProductPriceSection sku={value4} />];
const value41 = !isSlayerSkuAvailableOnThisPlatform2;
items9[1] = isSlayerSkuAvailableOnThisPlatform2 ? value41 : ((Text) => <Text variant="text-xs/normal" color="text-muted" style={styles.availabilityCopy}>{intl.string((importDefault(3130) /* metro dependency 3130: SlayerStorefrontMessages */).gndWN7)}</Text>)((require(4573) /* metro dependency 4573: Text */).Text);
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
const view = <View style={styles.buyButton}><Button variant="primary" size="lg" text={value26} loading={property} disabled={property || value41} onPress={value24} /></View>;
const IconButton = (require(8341) /* metro dependency 8341: IconButtonNative */).IconButton;
const iconButtonProps = {'icon': null, 'variant': 'primary', 'size': 'lg',
icon: importDefault(8329) /* metro dependency 8329 */, disabled: property || value41};
string = intl.string;
const QAZA5f = (require(1244) /* metro dependency 1244: indexNative */).t.QAZA5f;
iconButtonProps.accessibilityLabel = Reflect.apply(string, intl, [QAZA5f]);
iconButtonProps.onPress = value25;
items9[2] = <View style={styles.footerButtonRow}>{view}<IconButton {...iconButtonProps} /></View>;
if (isSlayerSkuAvailableOnThisPlatform2) {
var viewBinding8Props = {style: styles.legalCopy};
moduleValue8 = require(10444) /* metro dependency 10444: SlayerStorefrontDisclaimerUtils */;
r10 = <View {...viewBinding8Props}>{moduleValue8.getMobileFinePrintMessageForApplication(value7 ?? undefined,
value26, {shouldAppendDisclaimer: hasAlreadyLinked === false}).map(_fun80834)}</View>;
} else {
r10 = isSlayerSkuAvailableOnThisPlatform2;
}
items9[3] = r10;
items3[2] = <View style={items8}>{items9}</View>;
return (
<View style={items2}>
{items3}
</View>
);
}
function WrappedSocialLayerStorefrontProductDetailsModal(a0) { // fn#80835, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10624:10993, offset: 0x01e8b95c, size: 91 bytes, params: 2, frame: 17
const NativePaymentContextProvider = (require(10109) /* metro dependency 10109: NativePaymentContext */).NativePaymentContextProvider;
return (
<NativePaymentContextProvider skuIDs={[]} activeSubscription={null}>
<SocialLayerStorefrontProductDetailsModal {...a0} />
</NativePaymentContextProvider>
);
}
function _fun80809(a0, a1) { // fn#80809, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10624:3878, offset: 0x01e8a269, size: 345 bytes, params: 3, frame: 26
const env0_0 = a1;
const property = items[a1];
const value2 = a1 === selectedIndex;
const value4 = undefined;
const PressableOpacity = (require(1305) /* metro dependency 1305: native */).PressableOpacity;
const pressableOpacityProps = {accessibilityRole: 'button',
accessibilityLabel: (property == null ? value4 : property.label) ?? (property == null ? value4 : property.title),
accessibilityState: {selected: value2}, onPress: onPress_80810, style: [styles.thumbnail,
value2 && styles.thumbnailSelected]};
const items3 = [styles.thumbnailInner];
items3[1] = value2 && styles.thumbnailInnerSelected;
const FastImage = importDefault(5475) /* metro dependency 5475: FastImage */;
const object = {};
object.uri = (require(10440) /* metro dependency 10440: carouselMediaItems */).getThumbnailSrc(a0);
return (
<PressableOpacity {...pressableOpacityProps} key={a1}>
<View style={items3}>
<FastImage
source={object}
style={styles.thumbnailImage}
resizeMode="cover"
/>
</View>
</PressableOpacity>
);
}
function _fun80815() { // fn#80815, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10624:5746, offset: 0x01e8b278, size: 49 bytes, params: 1, frame: 13
const value = environment.__proto__;
return SKUStore.isFetching(skuId) || SKUStore.didFetchingSkuFail(skuId);
}
function _fun80817() { // fn#80817, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10624:5977, offset: 0x01e8b2be, size: 45 bytes, params: 1, frame: 11
const value = environment.__proto__;
return (require(6829) /* metro dependency 6829: SlayerStorefrontUtils */).getCardImageURL(env0_4);
}
function _fun80818() { // fn#80818, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10624:6067, offset: 0x01e8b2eb, size: 84 bytes, params: 1, frame: 15
const r2 = analyticsLocations ?? [];
const items2 = [];
const value = arraySpread(items2, r2, 0, undefined);
const SLAYER_STOREFRONT_NATIVE_PDP = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).SLAYER_STOREFRONT_NATIVE_PDP;
items2[value] = SLAYER_STOREFRONT_NATIVE_PDP;
value + 1;
return items2;
}
function _fun80819() { // fn#80819, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10624:6147, offset: 0x01e8b33f, size: 37 bytes, params: 1, frame: 11
const value = environment.__proto__;
return (require(491) /* metro dependency 491 */).v4();
}
function _fun80820() { // fn#80820, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10624:6180, offset: 0x01e8b364, size: 131 bytes, params: 1, frame: 6
const value2 = undefined;
return {'is_gift': false, 'location_stack': null, 'payment_type': 'sku', location_stack: env0_7, sku_id: skuId,
sku_type: env0_4 == null ? value2 : env0_4.type, sku_product_line: env0_4 == null ? value2 : env0_4.productLine,
application_id: env0_4 == null ? value2 : env0_4.applicationId, load_id: env0_8};
}
function _fun80821() { // fn#80821, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10624:6480, offset: 0x01e8b3e7, size: 126 bytes, params: 1, frame: 18
const value2 = undefined;
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
const track = defaultImport.track;
const OPEN_MODAL = AnalyticEvents.OPEN_MODAL;
const object2 = {};
object2.location_stack = env0_7;
const SOCIAL_LAYER_STOREFRONT_PRODUCT_DETAILS_MODAL_KEY = (require(10437) /* metro dependency 10437: SocialLayerStorefrontNativeActionCreators */).SOCIAL_LAYER_STOREFRONT_PRODUCT_DETAILS_MODAL_KEY;
object2.type = SOCIAL_LAYER_STOREFRONT_PRODUCT_DETAILS_MODAL_KEY;
object2.sku_id = skuId;
object2.application_id = env0_4 == null ? value2 : env0_4.applicationId;
Reflect.apply(track, defaultImport, [OPEN_MODAL, object2]);
return value2;
}
function _fun80822() { // fn#80822, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10624:6713, offset: 0x01e8b465, size: 74 bytes, params: 1, frame: 14
var value2;
var defaultImport;
if (env0_10.current === 'pending') {
value2 = environment.__proto__;
defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
defaultImport.track(AnalyticEvents.PAYMENT_FLOW_CANCELED, env0_9);
}
}
function _fun80823(a0) { // fn#80823, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10624:6808, offset: 0x01e8b4af, size: 119 bytes, params: 2, frame: 17
const value2 = undefined;
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
const track = defaultImport.track;
const SLAYER_STOREFRONT_PDP_ELEMENT_CLICKED = AnalyticEvents.SLAYER_STOREFRONT_PDP_ELEMENT_CLICKED;
Reflect.apply(track, defaultImport, [SLAYER_STOREFRONT_PDP_ELEMENT_CLICKED, {slayer_storefront_session_id: value2,
sku_id: skuId, guild_id: value2, application_id: env0_4 == null ? value2 : env0_4.applicationId, cta_type: a0,
location_stack: env0_7}]);
return value2;
}
function _fun80824() { // fn#80824, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10624:7059, offset: 0x01e8b526, size: 196 bytes, params: 1, frame: 21
var r3;
var r0;
var value3;
var moduleValue;
var convertCarouselItemsToMediaItems;
var tenantMetadata;
var object2;
var skuAssetsBinding;
const value2 = undefined;
let applicationId = env0_4 == null ? value2 : env0_4.applicationId;
if (applicationId == null) {
r0 = [[], []];
} else {
value3 = environment.__proto__;
moduleValue = require(10440) /* metro dependency 10440: carouselMediaItems */;
convertCarouselItemsToMediaItems = moduleValue.convertCarouselItemsToMediaItems;
tenantMetadata = env0_4.tenantMetadata;
r3 = (tenantMetadata == null || tenantMetadata.socialLayer == null ? value2 : tenantMetadata.socialLayer.carouselItems) ?? [];
applicationId = env0_4.applicationId;
skuAssetsBinding = skuAssets;
object2 = {};
object2.heroWidth = (require(10440) /* metro dependency 10440: carouselMediaItems */).MOBILE_HERO_WIDTH_PX;
r0 = Reflect.apply(convertCarouselItemsToMediaItems, moduleValue, [r3, applicationId, skuAssetsBinding,
object2]);
}
return r0;
}
function _fun80825() { // fn#80825, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10624:7638, offset: 0x01e8b5ea, size: 236 bytes, params: 1, frame: 22
var applicationId;
var binding;
var value4;
var value5;
var moduleValue;
var fetchSocialLayerStorefrontSkuForApplication;
var id;
var object2;
var value;
let r0 = env0_4 != null && env0_4.applicationId != null;
if (r0) {
binding = env0_12;
r0 = binding || env0_5;
r0 = !r0 ? env0_14.current : r0;
if (!r0) {
env0_14.current = true;
value4 = environment.__proto__;
value5 = undefined;
moduleValue = require(8463) /* metro dependency 8463: SocialLayerStorefrontActionCreators */;
fetchSocialLayerStorefrontSkuForApplication = moduleValue.fetchSocialLayerStorefrontSkuForApplication;
binding = env0_4;
applicationId = binding.applicationId;
id = binding.id;
object2 = {};
object2.withGoogleSkuIds = (require(477) /* metro dependency 477: PlatformUtils */).isAndroid();
object2.countryCode = storeFront == null ? value5 : storeFront.country;
value = require(477) /* metro dependency 477: PlatformUtils */;
object2.paymentGateway = value.isIOS() ? PaymentGateways.APPLE : value5;
Reflect.apply(fetchSocialLayerStorefrontSkuForApplication, moduleValue, [applicationId, id, object2]);
}
}
}
function _fun80826() { // fn#80826, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10624:7970, offset: 0x01e8b6d6, size: 101 bytes, params: 1, frame: 14
var value2;
var defaultImport;
if (env0_10.current === 'pending') {
env0_10.current = 'failed';
value2 = environment.__proto__;
defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
defaultImport.track(AnalyticEvents.PAYMENT_FLOW_FAILED, env0_9);
}
env0_13(false);
}
function SocialLayerStorefrontProductDetailsModalOnPurchaseComplete() { // fn#80827, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10624:8160, owner: SocialLayerStorefrontProductDetailsModal.onPurchaseComplete, offset: 0x01e8b73b, size: 201 bytes, params: 1, frame: 19
env0_10.current = 'succeeded';
const value3 = undefined;
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
const track = defaultImport.track;
const PAYMENT_FLOW_SUCCEEDED = AnalyticEvents.PAYMENT_FLOW_SUCCEEDED;
Reflect.apply(track, defaultImport, [PAYMENT_FLOW_SUCCEEDED, env0_9]);
env0_13(false);
const socialLayerStorefrontNativeActionCreatorsModule = require(10437) /* metro dependency 10437: SocialLayerStorefrontNativeActionCreators */;
const value = socialLayerStorefrontNativeActionCreatorsModule.openSocialLayerStorefrontProductSelfPurchaseSuccessModal({skuId: skuId,
orbsReward: (env0_4 == null ? value3 : env0_4.orbsReward) ?? value3, analyticsLocations: env0_7});
value.then(socialLayerStorefrontNativeActionCreatorsModule.closeSocialLayerStorefrontProductDetailsModal);
return value3;
}
function _fun80830() { // fn#80830, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10624:8538, offset: 0x01e8b804, size: 127 bytes, params: 1, frame: 15
const binding = env0_11;
const BUY_BUTTON = SlayerShopPDPCTAType.BUY_BUTTON;
binding(BUY_BUTTON);
env0_10.current = 'pending';
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
const track = defaultImport.track;
const PAYMENT_FLOW_STARTED = AnalyticEvents.PAYMENT_FLOW_STARTED;
Reflect.apply(track, defaultImport, [PAYMENT_FLOW_STARTED, env0_9]);
env0_13(true);
env0_16().catch(_fun80831);
}
function _fun80832() { // fn#80832, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10624:8686, offset: 0x01e8b883, size: 79 bytes, params: 1, frame: 14
const binding = env0_11;
const GIFT_BUTTON = SlayerShopPDPCTAType.GIFT_BUTTON;
binding(GIFT_BUTTON);
(require(10437) /* metro dependency 10437: SocialLayerStorefrontNativeActionCreators */).openSocialLayerStorefrontGiftModal({skuId: skuId,
analyticsLocations: env0_7});
}
function SocialLayerStorefrontProductDetailsModalBackImage() { // fn#80833, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10624:9127, owner: SocialLayerStorefrontProductDetailsModal.backImage, offset: 0x01e8b8d2, size: 70 bytes, params: 1, frame: 14
const XSmallIcon = (require(5312) /* metro dependency 5312: XSmallIcon */).XSmallIcon;
return <XSmallIcon size="md" style={styles.closeButtonIcon} />;
}
function _fun80834(a0, a1) { // fn#80834, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10624:10756, offset: 0x01e8b918, size: 68 bytes, params: 3, frame: 15
const TextWithIOSLinkWorkaround = (require(6766) /* metro dependency 6766: TextWithIOSLinkWorkaround */).TextWithIOSLinkWorkaround;
return (
<TextWithIOSLinkWorkaround
variant="text-xs/normal"
color="text-muted"
key={a1}
>
{a0}
</TextWithIOSLinkWorkaround>
);
}
@@ -0,0 +1,788 @@
/* Metro module 10572; source: modules/slayer_storefront/native/createSocialLayerStorefrontProductDetailsEmbed.tsx; dependencies: [57, 31, 4234, 4279, 661, 4118, 8189, 1244, 10573, 6833, 6829, 3130, 8354, 7943, 4101, 8463, 478, 566, 1360, 6777, 2] */
function _fun81561(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#81561, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10758:6, offset: 0x01ed4017, size: 248 bytes, params: 8, frame: 19
const env0_0 = require;
const _arrayLikeToArray_81564 = function(a0, a1) {
var r0;
var r1;
var r2;
var value3;
var length;
var value5;
var value = undefined;
var value2 = value == null;
reducibleJoin2: while (true) {
if (value2) {
r0 = value2;
break reducibleJoin2;
}
value3 = value > a0.length;
r0 = value3;
break reducibleJoin2;
}
reducibleJoin4: while (true) {
if (r0) {
length = a0.length;
r1 = length;
break reducibleJoin4;
}
r1 = value;
break reducibleJoin4;
}
value = (0, global.Array)(r1);
var value4 = 0;
if (value4 < r1) {
r2 = value4;
reducibleLoop5: while (true) {
value[r2] = a0[r2];
value5 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
if (value5 < r1) {
r2 = value5;
continue reducibleLoop5;
}
break reducibleLoop5;
}
}
return value;
};
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 applicationStore = importDefault(4234) /* metro dependency 4234: ApplicationStore */;
const skuStore = importDefault(4279) /* metro dependency 4279: SKUStore */;
const env0_7 = (require(661) /* metro dependency 661: Constants */).PaymentGateways;
const env0_8 = (require(4118) /* metro dependency 4118: Constants */).InviteTypes;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/slayer_storefront/native/createSocialLayerStorefrontProductDetailsEmbed.tsx');
exports.createSocialLayerStorefrontProductDetailsEmbed = createSocialLayerStorefrontProductDetailsEmbed;
exports.useFetchSocialLayerStorefrontProductDetailsEmbedData = useFetchSocialLayerStorefrontProductDetailsEmbedData;
}
function _createForOfIteratorHelperLoose_81562(a0, a1) { // fn#81562, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10758:191, offset: 0x01ed410f, 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)) {
if (r1) {
}
return _fun81563;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_81564(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') {
value = _arrayLikeToArray_81564(a0, value);
r6 = value;
} else {
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value = _arrayLikeToArray_81564(a0, value);
r6 = value;
} else {
r6 = value;
}
}
r5 = r6;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
}
return _fun81563;
}
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 createSocialLayerStorefrontProductDetailsEmbed({skuId, guildOrApplication, theme}) { // fn#81565, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10758:1270, offset: 0x01ed4283, size: 949 bytes, params: 2, frame: 28
var r18;
var applicationId;
var r9;
var r6;
var name;
var r4;
var r5;
var acceptLabelGreenColor;
var r7;
var isFetchingApplication;
var isFetchingApplication2;
var didFetchingApplicationFail;
var value9;
const intl = require(dependencyMap[7]).intl;
var string;
const t = require(dependencyMap[7]).t;
var vyaWs7;
var value10;
var toUpperCase;
var value11;
var type;
var guildId;
var guildId2;
var id;
var moduleValue;
var isSlayerSkuAvailableOnThisPlatform;
var isSlayerSkuAvailableOnThisPlatform2;
var moduleValue2;
var getCardImageURL;
var value12;
var toString;
var value13;
var getIconURL;
var value14;
var object2;
var headerColor;
var titleColor;
var V91tvy;
var value15;
var subtitleColor;
var thumbnailBackgroundColor;
var BKf0MM;
var value16;
var boqtTA;
var value17;
var acceptBlurpleLabelBackgroundColor;
var acceptLabelGreenBackgroundColor;
var GUILD;
const {colors, baseColors} = importDefault(dependencyMap[6])(theme);
const value4 = SKUStore.get(skuId);
reducibleJoin2: while (true) {
if (value4 == null) {
applicationId = undefined;
break reducibleJoin2;
}
applicationId = value4.applicationId;
break reducibleJoin2;
}
const application = ApplicationStore.getApplication(applicationId);
const isFetching2 = SKUStore.isFetching(skuId);
const value6 = SKUStore.didFetchingSkuFail(skuId);
const value7 = applicationId != null;
reducibleJoin4: while (true) {
if (value7) {
isFetchingApplication = ApplicationStore.isFetchingApplication;
isFetchingApplication2 = Reflect.apply(isFetchingApplication, ApplicationStore, [applicationId]);
r9 = isFetchingApplication2;
break reducibleJoin4;
}
r9 = value7;
break reducibleJoin4;
}
const value8 = applicationId != null;
reducibleJoin6: while (true) {
if (value8) {
didFetchingApplicationFail = ApplicationStore.didFetchingApplicationFail;
value9 = Reflect.apply(didFetchingApplicationFail, ApplicationStore, [applicationId]);
r6 = value9;
break reducibleJoin6;
}
r6 = value8;
break reducibleJoin6;
}
reducibleJoin8: while (true) {
if (application == null) {
name = undefined;
break reducibleJoin8;
}
name = application.name;
break reducibleJoin8;
}
reducibleJoin10: while (true) {
if (name != null) {
r4 = name;
break reducibleJoin10;
}
string = intl.string;
vyaWs7 = t.vyaWs7;
value10 = Reflect.apply(string, intl, [vyaWs7]);
toUpperCase = value10.toUpperCase;
value11 = Reflect.apply(toUpperCase, value10, []);
r4 = value11;
r18 = dependencyMap;
break reducibleJoin10;
}
if (!isFetching2) {
reducibleJoin19: while (true) {
reducibleJoin14: while (true) {
if (value4 != null) {
break reducibleJoin14;
}
if (isFetching2) {
break reducibleJoin14;
}
if (value6) {
break reducibleJoin14;
}
break reducibleJoin19;
}
if (!r9) {
if (applicationId != null) {
reducibleJoin21: while (true) {
if (application != null) {
break reducibleJoin21;
}
if (r9) {
break reducibleJoin21;
}
if (r6) {
break reducibleJoin21;
}
break reducibleJoin19;
}
}
if (value4 == null) {
return null;
}
if (application != null) {
reducibleJoin42: while (true) {
if (importDefault(dependencyMap[8])(application)) {
type = guildOrApplication.type;
if (type === 'guild') {
guildId = application.guildId;
guildId2 = guildOrApplication.guildId;
reducibleJoin26: while (true) {
if (guildId !== guildId2) {
break reducibleJoin42;
}
break reducibleJoin26;
}
}
type = guildOrApplication.type;
if (type === 'application') {
id = application.id;
applicationId = guildOrApplication.applicationId;
reducibleJoin28: while (true) {
if (id !== applicationId) {
break reducibleJoin42;
}
break reducibleJoin28;
}
}
moduleValue = require(dependencyMap[9]);
isSlayerSkuAvailableOnThisPlatform = moduleValue.isSlayerSkuAvailableOnThisPlatform;
isSlayerSkuAvailableOnThisPlatform2 = Reflect.apply(isSlayerSkuAvailableOnThisPlatform,
moduleValue,
[value4]);
moduleValue2 = require(dependencyMap[10]);
getCardImageURL = moduleValue2.getCardImageURL;
value12 = Reflect.apply(getCardImageURL, moduleValue2, [value4]);
reducibleJoin30: while (true) {
if (value12 == null) {
r5 = undefined;
break reducibleJoin30;
}
toString = value12.toString;
value13 = Reflect.apply(toString, value12, []);
r5 = value13;
break reducibleJoin30;
}
reducibleJoin32: while (true) {
if (r5 != null) {
break reducibleJoin32;
}
getIconURL = application.getIconURL;
value14 = Reflect.apply(getIconURL, application, [64]);
r5 = value14;
break reducibleJoin32;
}
r9 = r5 ?? undefined;
object2 = {};
copyDataProperties(object2, baseColors, r18);
object2['headerText'] = r4;
headerColor = colors.headerColor;
object2['headerColor'] = headerColor;
name = value4.name;
object2['titleText'] = name;
titleColor = colors.titleColor;
object2['titleColor'] = titleColor;
string = intl.string;
V91tvy = t.V91tvy;
value15 = Reflect.apply(string, intl, [V91tvy]);
object2['subtitle'] = value15;
subtitleColor = colors.subtitleColor;
object2['subtitleColor'] = subtitleColor;
object2['thumbnailUrl'] = r9;
thumbnailBackgroundColor = colors.thumbnailBackgroundColor;
object2['thumbnailBackgroundColor'] = thumbnailBackgroundColor;
string = intl.string;
if (isSlayerSkuAvailableOnThisPlatform2) {
boqtTA = t.boqtTA;
value17 = Reflect.apply(string, intl, [boqtTA]);
r9 = value17;
} else {
BKf0MM = importDefault(dependencyMap[11]).BKf0MM;
value16 = Reflect.apply(string, intl, [BKf0MM]);
r9 = value16;
}
object2['acceptLabelText'] = r9;
reducibleJoin38: while (true) {
if (isSlayerSkuAvailableOnThisPlatform2) {
acceptLabelGreenColor = colors.acceptLabelGreenColor;
break reducibleJoin38;
}
acceptLabelGreenColor = undefined;
break reducibleJoin38;
}
object2['acceptLabelColor'] = acceptLabelGreenColor;
if (isSlayerSkuAvailableOnThisPlatform2) {
acceptLabelGreenBackgroundColor = colors.acceptLabelGreenBackgroundColor;
r7 = acceptLabelGreenBackgroundColor;
} else {
acceptBlurpleLabelBackgroundColor = colors.acceptBlurpleLabelBackgroundColor;
r7 = acceptBlurpleLabelBackgroundColor;
}
object2['acceptLabelBackgroundColor'] = r7;
object2['embedCanBeTapped'] = true;
object2['canBeAccepted'] = true;
GUILD = InviteTypes.GUILD;
object2['type'] = GUILD;
return object2;
}
break reducibleJoin42;
}
}
return null;
}
break reducibleJoin19;
}
}
if (value4 != null) {
reducibleJoin44: while (true) {
if (application != null) {
if (value4 == null) {
return null;
}
if (application != null) {
reducibleJoin42: while (true) {
if (importDefault(dependencyMap[8])(application)) {
type = guildOrApplication.type;
if (type === 'guild') {
guildId = application.guildId;
guildId2 = guildOrApplication.guildId;
reducibleJoin26: while (true) {
if (guildId !== guildId2) {
break reducibleJoin42;
}
break reducibleJoin26;
}
}
type = guildOrApplication.type;
if (type === 'application') {
id = application.id;
applicationId = guildOrApplication.applicationId;
reducibleJoin28: while (true) {
if (id !== applicationId) {
break reducibleJoin42;
}
break reducibleJoin28;
}
}
moduleValue = require(dependencyMap[9]);
isSlayerSkuAvailableOnThisPlatform = moduleValue.isSlayerSkuAvailableOnThisPlatform;
isSlayerSkuAvailableOnThisPlatform2 = Reflect.apply(isSlayerSkuAvailableOnThisPlatform,
moduleValue,
[value4]);
moduleValue2 = require(dependencyMap[10]);
getCardImageURL = moduleValue2.getCardImageURL;
value12 = Reflect.apply(getCardImageURL, moduleValue2, [value4]);
reducibleJoin30: while (true) {
if (value12 == null) {
r5 = undefined;
break reducibleJoin30;
}
toString = value12.toString;
value13 = Reflect.apply(toString, value12, []);
r5 = value13;
break reducibleJoin30;
}
reducibleJoin32: while (true) {
if (r5 != null) {
break reducibleJoin32;
}
getIconURL = application.getIconURL;
value14 = Reflect.apply(getIconURL, application, [64]);
r5 = value14;
break reducibleJoin32;
}
r9 = r5 ?? undefined;
object2 = {};
copyDataProperties(object2, baseColors, r18);
object2['headerText'] = r4;
headerColor = colors.headerColor;
object2['headerColor'] = headerColor;
name = value4.name;
object2['titleText'] = name;
titleColor = colors.titleColor;
object2['titleColor'] = titleColor;
string = intl.string;
V91tvy = t.V91tvy;
value15 = Reflect.apply(string, intl, [V91tvy]);
object2['subtitle'] = value15;
subtitleColor = colors.subtitleColor;
object2['subtitleColor'] = subtitleColor;
object2['thumbnailUrl'] = r9;
thumbnailBackgroundColor = colors.thumbnailBackgroundColor;
object2['thumbnailBackgroundColor'] = thumbnailBackgroundColor;
string = intl.string;
if (isSlayerSkuAvailableOnThisPlatform2) {
boqtTA = t.boqtTA;
value17 = Reflect.apply(string, intl, [boqtTA]);
r9 = value17;
} else {
BKf0MM = importDefault(dependencyMap[11]).BKf0MM;
value16 = Reflect.apply(string, intl, [BKf0MM]);
r9 = value16;
}
object2['acceptLabelText'] = r9;
reducibleJoin38: while (true) {
if (isSlayerSkuAvailableOnThisPlatform2) {
acceptLabelGreenColor = colors.acceptLabelGreenColor;
break reducibleJoin38;
}
acceptLabelGreenColor = undefined;
break reducibleJoin38;
}
object2['acceptLabelColor'] = acceptLabelGreenColor;
if (isSlayerSkuAvailableOnThisPlatform2) {
acceptLabelGreenBackgroundColor = colors.acceptLabelGreenBackgroundColor;
r7 = acceptLabelGreenBackgroundColor;
} else {
acceptBlurpleLabelBackgroundColor = colors.acceptBlurpleLabelBackgroundColor;
r7 = acceptBlurpleLabelBackgroundColor;
}
object2['acceptLabelBackgroundColor'] = r7;
object2['embedCanBeTapped'] = true;
object2['canBeAccepted'] = true;
GUILD = InviteTypes.GUILD;
object2['type'] = GUILD;
return object2;
}
break reducibleJoin42;
}
}
return null;
}
break reducibleJoin44;
}
}
object2 = {};
copyDataProperties(object2, baseColors, r18);
object2['headerText'] = r4;
object2['resolvingGradientEnd'] = colors.resolvingGradientEnd;
object2['resolvingGradientStart'] = colors.resolvingGradientStart;
GUILD = InviteTypes.GUILD;
object2['type'] = GUILD;
return object2;
}
function useFetchSocialLayerStorefrontProductDetailsEmbedData(a0) { // fn#81566, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10758:2803, offset: 0x01ed4638, size: 303 bytes, params: 2, frame: 20
const env0_0 = a0;
const value2 = undefined;
const value3 = (require(8354) /* metro dependency 8354: SocialLayerStorefrontMobilePurchasingExperiment */).useIsEligibleForSocialLayerStorefrontMobilePurchasing({location: 'use_fetch_social_layer_storefront_product_details_embed_data'});
const defaultImport = importDefault(7943) /* metro dependency 7943: NativePaymentHooksAndroid */;
const useNativeIAPPayments = defaultImport.useNativeIAPPayments;
const storeFront = Reflect.apply(useNativeIAPPayments, defaultImport, []).storeFront;
const country = storeFront == null ? value2 : storeFront.country;
const binding = env0_4;
const useMemo = binding.useMemo;
const value5 = env0_3(Reflect.apply(useMemo, binding, [_fun81567, [value3, a0]]), 2);
const property = value5[0];
const property2 = value5[1];
binding.useEffect(_fun81569, [property, property2, country]);
const fluxModule = require(566) /* metro dependency 566: flux */;
const useStateFromStoresArray = fluxModule.useStateFromStoresArray;
(importDefault(6777) /* metro dependency 6777: useGetOrFetchApplications */)(Reflect.apply(useStateFromStoresArray,
fluxModule, [[SKUStore], _fun81570, [property2, property]]));
return value2;
}
function _fun81567() { // fn#81567, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10758:3098, offset: 0x01ed4767, size: 74 bytes, params: 1, frame: 14
var r0;
var reduce;
let binding = env0_1;
const items3 = [];
const items2 = [];
if (binding) {
binding = env0_0;
reduce = binding.reduce;
items2[0] = items3;
items2[1] = [];
r0 = Reflect.apply(reduce, binding, [_fun81568, items2]);
} else {
items2[0] = items3;
items2[1] = [];
r0 = items2;
}
return r0;
}
function _fun81569() { // fn#81569, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10758:3458, offset: 0x01ed48b6, size: 486 bytes, params: 1, frame: 30
var r2;
var r1;
var APPLE;
var value6;
var value7;
var property;
var property2;
var get;
var value8;
var isFetching2;
var value9;
var moduleValue;
var fetchSocialLayerStorefrontSku;
var object2;
var moduleValue2;
var moduleValue3;
var isIOS;
var value10;
var value13;
var value14;
var property3;
var value15;
var isFetching3;
var value16;
var moduleValue4;
var fetchSocialLayerStorefrontSkuForApplication;
var moduleValue5;
var moduleValue6;
var value17;
const _createForOfIteratorHelperLoose_81562Binding = _createForOfIteratorHelperLoose_81562;
const value3 = undefined;
const value4 = _createForOfIteratorHelperLoose_81562Binding(env0_3);
const value5 = value4();
let done = value5.done;
if (!done) {
r2 = value5;
while (true) {
value6 = r2.value;
value7 = env1_3(value6, 2);
property = value7[0];
property2 = value7[1];
get = SKUStore.get;
value8 = Reflect.apply(get, SKUStore, [property]) != null;
if (value8) {
r1 = value8;
} else {
isFetching2 = SKUStore.isFetching(property);
r1 = isFetching2;
}
if (r1) {
continue;
}
value9 = SKUStore.didFetchingSkuFail(property);
r1 = value9;
if (r1) {
continue;
}
moduleValue = require(8463) /* metro dependency 8463: SocialLayerStorefrontActionCreators */;
fetchSocialLayerStorefrontSku = moduleValue.fetchSocialLayerStorefrontSku;
object2 = {};
moduleValue2 = require(478) /* metro dependency 478: PlatformUtils */;
object2.withGoogleSkuIds = moduleValue2.isAndroid();
object2.countryCode = country;
moduleValue3 = require(478) /* metro dependency 478: PlatformUtils */;
isIOS = moduleValue3.isIOS;
if (!Reflect.apply(isIOS, moduleValue3, [])) {
APPLE = value3;
continue;
}
APPLE = PaymentGateways.APPLE;
object2.paymentGateway = APPLE;
Reflect.apply(fetchSocialLayerStorefrontSku, moduleValue, [property2, property, object2]);
value10 = value4();
done = value10.done;
if (done) {
break;
}
r2 = value10;
continue;
}
}
const value11 = _createForOfIteratorHelperLoose_81562(env0_4);
const value12 = value11();
done = value12.done;
if (!done) {
r2 = value12;
while (true) {
value13 = r2.value;
value14 = env1_3(value13, 2);
property = value14[0];
property3 = value14[1];
get = SKUStore.get;
value15 = Reflect.apply(get, SKUStore, [property]) != null;
if (value15) {
r1 = value15;
} else {
isFetching3 = SKUStore.isFetching(property);
r1 = isFetching3;
}
if (r1) {
continue;
}
value16 = SKUStore.didFetchingSkuFail(property);
r1 = value16;
if (r1) {
continue;
}
moduleValue4 = require(8463) /* metro dependency 8463: SocialLayerStorefrontActionCreators */;
fetchSocialLayerStorefrontSkuForApplication = moduleValue4.fetchSocialLayerStorefrontSkuForApplication;
object2 = {};
moduleValue5 = require(478) /* metro dependency 478: PlatformUtils */;
object2.withGoogleSkuIds = moduleValue5.isAndroid();
object2.countryCode = country;
moduleValue6 = require(478) /* metro dependency 478: PlatformUtils */;
isIOS = moduleValue6.isIOS;
if (!Reflect.apply(isIOS, moduleValue6, [])) {
APPLE = value3;
continue;
}
APPLE = PaymentGateways.APPLE;
object2.paymentGateway = APPLE;
Reflect.apply(fetchSocialLayerStorefrontSkuForApplication, moduleValue4, [property3, property, object2]);
value17 = value11();
done = value17.done;
if (done) {
break;
}
r2 = value17;
continue;
}
}
return value3;
}
function _fun81570() { // fn#81570, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10758:4146, offset: 0x01ed4a9c, size: 168 bytes, params: 1, frame: 17
var environment;
let binding = env0_3;
const value2 = binding.map(_fun81571);
let items2 = [];
const value3 = arraySpread(items2, value2, 0, undefined);
binding = env0_4;
arraySpread(items2, binding.map(_fun81572), value3, binding);
const filter = items2.filter;
let value = environment.__proto__;
value = Reflect.apply(filter, items2, [(require(1360) /* metro dependency 1360: GlobalUtils */).isNotNullish]);
const Set = global.Set;
value = value.map(function(a0) {
return a0.applicationId;
});
const set = new Set();
items2 = [];
arraySpread(items2, set, 0, require);
return items2;
}
function _fun81568(a0, {codedLinks}) { // fn#81568, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10758:3114, offset: 0x01ed47b1, size: 261 bytes, params: 3, frame: 20
var r0;
var r1;
var r3;
var item3;
var value3;
var value7;
var type;
var code;
const CodedLinkType = (require(4101) /* metro dependency 4101: CodedLink */).CodedLinkType;
var SOCIAL_LAYER_STOREFRONT;
var SOCIAL_LAYER_STOREFRONT_APP;
var push;
var split;
var value8;
const iterator = a0[Symbol.iterator]();
const iterator2 = iterator.next;
let item2 = Reflect.apply(iterator2, iterator, []);
let item = item2.value;
item2 = item2.done ? undefined : iterator;
const value2 = item2 === undefined;
const r2 = value2 ? undefined : item;
if (value2) {
r0 = item2;
r1 = undefined;
r3 = value2;
} else {
item3 = Reflect.apply(iterator2, item2, []);
item = item3.value;
item3 = item3.done ? undefined : item2;
value3 = item3 === undefined;
if (value3) {
r0 = item3;
r1 = undefined;
r3 = value3;
} else {
r0 = item3;
r1 = item;
r3 = value3;
}
}
if (!r3) {
r0.return();
}
const value5 = _createForOfIteratorHelperLoose_81562(codedLinks);
const value6 = value5();
let done = value6.done;
if (!done) {
r3 = value6;
while (true) {
value7 = r3.value;
type = value7.type;
code = value7.code;
SOCIAL_LAYER_STOREFRONT = CodedLinkType.SOCIAL_LAYER_STOREFRONT;
if (type !== SOCIAL_LAYER_STOREFRONT) {
SOCIAL_LAYER_STOREFRONT_APP = CodedLinkType.SOCIAL_LAYER_STOREFRONT_APP;
if (type !== SOCIAL_LAYER_STOREFRONT_APP) {
break;
}
r1.push(code.split('-'));
break;
}
push = r2.push;
split = code.split;
Reflect.apply(push, r2, [Reflect.apply(split, code, ['-'])]);
value8 = value5();
done = value8.done;
if (done) {
break;
}
r3 = value8;
continue;
}
}
return [r2, r1];
}
function _fun81571(a0) { // fn#81571, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10758:4168, offset: 0x01ed4b44, size: 50 bytes, params: 2, frame: 13
const iterator = a0[Symbol.iterator]();
let item2 = iterator.next();
const item = item2.value;
item2 = item2.done ? undefined : iterator;
let value = undefined;
const value2 = item2 === value;
const r2 = value2 ? value : item;
if (!value2) {
item2.return();
}
value = environment.__proto__.__proto__;
return SKUStore.get(r2);
}
@@ -0,0 +1,44 @@
/* Metro module 10442; source: modules/slayer_storefront/native/hooks/useMobileSocialLayerPurchaseSKU.android.tsx; dependencies: [31, 661, 7298, 10148, 2] */
function _fun80848(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#80848, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10628:6, offset: 0x01e8c227, size: 143 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(661) /* metro dependency 661: Constants */).PriceSetAssignmentPurchaseTypes;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/slayer_storefront/native/hooks/useMobileSocialLayerPurchaseSKU.android.tsx');
exports.default = _default_80849;
}
function _default_80849(a0) { // fn#80849, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10628:157, offset: 0x01e8c2b6, size: 232 bytes, params: 2, frame: 19
var object2;
const sku = a0.sku;
let value = null;
const value2 = Object.create(value);
value2.sku = 0;
const value3 = copyDataProperties({}, a0, value2, undefined);
const value4 = undefined;
const giftParams = value3.giftParams;
const isGift = value == giftParams ? value4 : giftParams.isGift;
const r5 = value == isGift ? PriceSetAssignmentPurchaseTypes.DEFAULT : isGift ? PriceSetAssignmentPurchaseTypes.GIFT : PriceSetAssignmentPurchaseTypes.DEFAULT;
const googleSkuIds = value == sku ? value4 : sku.googleSkuIds;
const property = (value != googleSkuIds ? googleSkuIds : {})[r5];
const r4 = value != property ? property : value;
env0_3.useEffect(_fun80850, [r4]);
value = importDefault(10148) /* metro dependency 10148: useMobilePurchaseSKUAndroid */;
object2 = {};
copyDataProperties(object2, value3, value2);
object2['platformSkuId'] = r4;
object2['isFreeForStaffSelfPurchase'] = false;
return value(object2);
}
function _fun80850() { // fn#80850, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10628:346, offset: 0x01e8c39e, size: 65 bytes, params: 1, frame: 12
var value2;
var moduleValue;
if (env0_0 != null) {
value2 = environment.__proto__;
moduleValue = require(7298) /* metro dependency 7298: GPlayActionCreators */;
moduleValue.loadInAppSkus([env0_0]);
}
}
@@ -0,0 +1,35 @@
/* Metro module 8462; source: modules/slayer_storefront/native/hooks/useSocialLayerStorefrontMobileAccountLinkingDisabled.tsx; dependencies: [6831, 566, 2] */
function _fun67203(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#67203, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8647:6, offset: 0x01c19564, size: 114 bytes, params: 8, frame: 18
let env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const socialLayerStorefrontStore = importDefault(6831) /* metro dependency 6831: SocialLayerStorefrontStore */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/slayer_storefront/native/hooks/useSocialLayerStorefrontMobileAccountLinkingDisabled.tsx');
exports.useSocialLayerStorefrontMobileAccountLinkingDisabled = function(a0) {
var env0_0 = a0;
return require(dependencyMap[1]).useStateFromStores([SocialLayerStorefrontStore], _fun67205, [a0]);
};
}
function useSocialLayerStorefrontMobileAccountLinkingDisabled(a0) { // fn#67204, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8647:290, offset: 0x01c195d6, size: 75 bytes, params: 2, frame: 16
const env0_0 = a0;
return (require(566) /* metro dependency 566: flux */).useStateFromStores([SocialLayerStorefrontStore], _fun67205,
[a0]);
}
function _fun67205() { // fn#67205, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8647:394, offset: 0x01c19621, size: 61 bytes, params: 1, frame: 13
var r0;
var value3;
var value;
const value2 = env0_0 != null;
if (value2) {
value3 = environment.__proto__;
value = SocialLayerStorefrontStore.getConfigForApplicationId(env0_0);
value = value?.disableMobileAccountLinking === true;
r0 = value;
} else {
r0 = value2;
}
return r0;
}