Initial commit
This commit is contained in:
commit
af3b49f756
16065 files changed
+2938410
No files matched your search
@@ -0,0 +1,87 @@
|
||||
/* Metro module 12234; source: modules/premium/native/BoostedGuildTierProgressCircle.tsx; dependencies: [31, 27, 661, 33, 4501, 697, 12235, 12239, 12240, 12241, 8254, 8249, 11939, 4573, 2] */
|
||||
function _fun93661(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#93661, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12420:6, offset: 0x020be08e, size: 397 bytes, params: 8, frame: 22
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
importAll(31) /* metro dependency 31 */;
|
||||
let value = require(27) /* metro dependency 27 */;
|
||||
const env0_3 = value.View;
|
||||
const env0_4 = value.Image;
|
||||
value = require(661) /* metro dependency 661: Constants */;
|
||||
const env0_5 = value.AppliedGuildBoostsRequiredForBoostedGuildTier;
|
||||
const env0_6 = value.BoostedGuildTiers;
|
||||
value = require(33) /* metro dependency 33 */;
|
||||
const env0_7 = value.jsx;
|
||||
const env0_8 = value.jsxs;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
const object = {'backgroundColor': null, 'width': 64, 'height': 64, 'alignItems': 'center',
|
||||
'justifyContent': 'center'};
|
||||
const BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
|
||||
object.backgroundColor = BACKGROUND_SURFACE_HIGH;
|
||||
object.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xxl;
|
||||
const env0_9 = Reflect.apply(createStyles, value, [{guildTierProgressCircle: {'position': 'relative', 'width': 70,
|
||||
'height': 70}, guildTierBackground: object, guildTierNoneIcon: {'width': 18, 'height': 30},
|
||||
guildTierIcon: {'width': 24, 'height': 24}, guildTierName: {'lineHeight': 16, 'marginTop': 2}}]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/premium/native/BoostedGuildTierProgressCircle.tsx');
|
||||
exports.default = _default_93663;
|
||||
}
|
||||
|
||||
function getTierIcon(a0, a1) { // fn#93662, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12420:632, offset: 0x020be21b, size: 203 bytes, params: 3, frame: 12
|
||||
if (a1 == null) {
|
||||
return (require(12235) /* metro dependency 12235: Tier048Px */).getTier048PxSource(a0);
|
||||
}
|
||||
let premiumTier = a1.premiumTier;
|
||||
const NONE = BoostedGuildTiers.NONE;
|
||||
if (premiumTier === NONE) {
|
||||
return (require(12235) /* metro dependency 12235: Tier048Px */).getTier048PxSource(a0);
|
||||
}
|
||||
premiumTier = a1.premiumTier;
|
||||
const TIER_1 = BoostedGuildTiers.TIER_1;
|
||||
if (TIER_1 === premiumTier) {
|
||||
return importDefault(12239) /* metro dependency 12239 */;
|
||||
}
|
||||
const TIER_2 = BoostedGuildTiers.TIER_2;
|
||||
if (TIER_2 === premiumTier) {
|
||||
return importDefault(12240) /* metro dependency 12240 */;
|
||||
}
|
||||
const TIER_3 = BoostedGuildTiers.TIER_3;
|
||||
if (TIER_3 === premiumTier) {
|
||||
return importDefault(12241) /* metro dependency 12241 */;
|
||||
}
|
||||
}
|
||||
|
||||
function _default_93663({guild, theme}) { // fn#93663, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12420:832, offset: 0x020be2e6, size: 448 bytes, params: 2, frame: 27
|
||||
const styles = useStyles();
|
||||
const available = (importDefault(8254) /* metro dependency 8254: useGuildPowerupsBoostCount */)(guild?.id).available;
|
||||
if (guild == null) {
|
||||
return (
|
||||
<View style={styles.guildTierBackground}>
|
||||
<Image source={getTierIcon(theme)} style={styles.guildTierNoneIcon} />
|
||||
</View>
|
||||
);
|
||||
}
|
||||
const nextGuildTierFromGuild = (require(8249) /* metro dependency 8249: GuildBoostingUtils */).getNextGuildTierFromGuild(guild.id);
|
||||
const r0 = nextGuildTierFromGuild != null ? AppliedGuildBoostsRequiredForBoostedGuildTier[nextGuildTierFromGuild] : null;
|
||||
const r4 = r0 != null && r0 > 0 ? available / r0 * 100 : 100;
|
||||
const ProgressCircle = importDefault(11939) /* metro dependency 11939: ProgressCircle */;
|
||||
const image = <Image source={getTierIcon(theme, guild)} style={styles.guildTierIcon} />;
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
const guildBoostingUtilsModule = require(8249) /* metro dependency 8249: GuildBoostingUtils */;
|
||||
const getTierName = guildBoostingUtilsModule.getTierName;
|
||||
return (
|
||||
<ProgressCircle style={styles.guildTierProgressCircle} percent={r4}>
|
||||
<View style={styles.guildTierBackground}>
|
||||
{image}
|
||||
<Text
|
||||
style={styles.guildTierName}
|
||||
variant="text-xs/semibold"
|
||||
color="interactive-text-active"
|
||||
>
|
||||
{Reflect.apply(getTierName, guildBoostingUtilsModule, [guild.premiumTier])}
|
||||
</Text>
|
||||
</View>
|
||||
</ProgressCircle>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,59 @@
|
||||
/* Metro module 8465; source: modules/premium/native/GiftModalEmojis.tsx; dependencies: [57, 31, 27, 33, 4501, 3801, 6739, 2] */
|
||||
function _fun67239(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#67239, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8650:6, offset: 0x01c1a94a, size: 400 bytes, params: 8, frame: 19
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_2 = importDefault(57) /* metro dependency 57 */;
|
||||
importAll(31) /* metro dependency 31 */;
|
||||
const env0_3 = (require(27) /* metro dependency 27 */).View;
|
||||
const env0_4 = (require(33) /* metro dependency 33 */).jsx;
|
||||
const items2 = [[100, 0, -40]];
|
||||
items2[1] = [120, 40, -10];
|
||||
items2[2] = [100, 80, 10];
|
||||
items2[3] = [180, 20, 20];
|
||||
items2[4] = [140, 95, 15];
|
||||
items2[5] = [250, 0, 0];
|
||||
items2[6] = [250, 80, -20];
|
||||
items2[7] = [400, 90, 10];
|
||||
items2[8] = [400, 20, -20];
|
||||
items2[9] = [410, 0, 40];
|
||||
const env0_6 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({emojisContainer: {'alignItems': 'center',
|
||||
'justifyContent': 'center', 'height': 250, 'width': '100%', 'position': 'absolute', 'zIndex': 1,
|
||||
'paddingBottom': 210}});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/premium/native/GiftModalEmojis.tsx');
|
||||
exports.default = _default_67240;
|
||||
}
|
||||
|
||||
function _default_67240({emojiName, randomizeSizing}) { // fn#67240, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8650:437, offset: 0x01c1aada, size: 136 bytes, params: 2, frame: 17
|
||||
if (randomizeSizing !== undefined) {
|
||||
}
|
||||
const styles = useStyles();
|
||||
const env0_2 = (importDefault(3801) /* metro dependency 3801: EmojiUtils */).getURL(emojiName);
|
||||
return (
|
||||
<View style={styles.emojisContainer}>
|
||||
{env0_5.map(_fun67241)}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun67241(a0, a1) { // fn#67241, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8650:515, offset: 0x01c1ab62, size: 302 bytes, params: 3, frame: 24
|
||||
let value = environment.__proto__;
|
||||
const value2 = env1_2(a0, 3);
|
||||
const property = value2[0];
|
||||
const value3 = 1;
|
||||
const property2 = value2[value3];
|
||||
const property3 = value2[2];
|
||||
value = importDefault(6739) /* metro dependency 6739: Emoji */;
|
||||
const valueProps2 = {src: env0_2, name: emojiName};
|
||||
const object = {position: 'absolute'};
|
||||
object.top = '' + property + '%';
|
||||
object.left = '' + property2 + '%';
|
||||
const items2 = [{rotate: '' + property3 + 'deg'}];
|
||||
const object3 = {};
|
||||
object3.scale = randomizeSizing ? 1.5 * global.Math.random() + 0.5 : value3;
|
||||
items2[1] = object3;
|
||||
object.transform = items2;
|
||||
valueProps2.style = object;
|
||||
valueProps2.forceTextEmoji = true;
|
||||
return ((Component) => <Component {...valueProps2} key={'' + a1 + '-' + emojiName} />)(value);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,407 @@
|
||||
/* Metro module 12228; source: modules/premium/native/GuildBoostSlotsInventory.tsx; dependencies: [31, 27, 1310, 1867, 7020, 3808, 661, 33, 4501, 697, 6597, 7054, 4573, 1244, 21, 5278, 6522, 1305, 6819, 12229, 566, 1423, 12230, 12234, 4223, 8251, 22, 2] */
|
||||
function _fun93627(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#93627, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12414:6, offset: 0x020bcc27, size: 995 bytes, params: 8, frame: 29
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_4 = importAll(31) /* metro dependency 31 */;
|
||||
let value = require(27) /* metro dependency 27 */;
|
||||
const env0_5 = value.View;
|
||||
const env0_6 = value.Image;
|
||||
const themeStore = importDefault(1310) /* metro dependency 1310: ThemeStore */;
|
||||
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
|
||||
const guildBoostSlotStore = importDefault(7020) /* metro dependency 7020: GuildBoostSlotStore */;
|
||||
const subscriptionStore = importDefault(3808) /* metro dependency 3808: SubscriptionStore */;
|
||||
const Fonts = (require(661) /* metro dependency 661: Constants */).Fonts;
|
||||
value = require(33) /* metro dependency 33 */;
|
||||
const env0_11 = value.jsx;
|
||||
const env0_12 = value.jsxs;
|
||||
const env0_13 = value.Fragment;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
object2 = {};
|
||||
object2.inventory = {marginBottom: 32};
|
||||
object2.header = {'marginHorizontal': 16, 'marginBottom': 16};
|
||||
const object4 = {};
|
||||
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
|
||||
object4.marginBottom = 16;
|
||||
object2.boostedGuild = object4;
|
||||
const BACKGROUND_BASE_LOWEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWEST;
|
||||
object2.subscriptionBody = {backgroundColor: BACKGROUND_BASE_LOWEST};
|
||||
const BACKGROUND_MOD_NORMAL = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_NORMAL;
|
||||
object2.subscriptionImageView = {'backgroundColor': null, 'width': '100%', 'height': 112, 'overflow': 'hidden',
|
||||
'alignItems': 'center', 'justifyContent': 'center', backgroundColor: BACKGROUND_MOD_NORMAL};
|
||||
object2.subscriptionImage = {'position': 'absolute', 'width': '100%', 'height': '100%'};
|
||||
object2.subscriptionImageFallback = {opacity: 0.4};
|
||||
const BLACK = (importDefault(697) /* metro dependency 697: native */).colors.BLACK;
|
||||
object2.subscriptionImageOverlay = {'position': 'absolute', 'width': '100%', 'height': '100%',
|
||||
'backgroundColor': null, 'opacity': 0.4, backgroundColor: BLACK};
|
||||
object2.guildInfo = {'flexDirection': 'row', 'padding': 16};
|
||||
object2.guildInfoIcon = {marginRight: 8};
|
||||
const object5 = {};
|
||||
const textStyles = importDefault(6597) /* metro dependency 6597: TextStyles */;
|
||||
const DISPLAY_EXTRABOLD = Fonts.DISPLAY_EXTRABOLD;
|
||||
const INTERACTIVE_TEXT_ACTIVE = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_TEXT_ACTIVE;
|
||||
copyDataProperties(object5, textStyles(DISPLAY_EXTRABOLD, INTERACTIVE_TEXT_ACTIVE, 20), undefined);
|
||||
object5['marginBottom'] = 4;
|
||||
object2.guildInfoName = object5;
|
||||
object2.guildInfoRowBottom = {'flexDirection': 'row', 'alignItems': 'center'};
|
||||
object2.guildInfoRowIcon = {'height': 12, 'width': 8, 'marginLeft': 2, 'marginRight': 8};
|
||||
object2.guildInfoSubscriptionCount = {lineHeight: 16};
|
||||
const BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
|
||||
object2.subscriptionSlot = {backgroundColor: BACKGROUND_SURFACE_HIGH, paddingLeft: 16};
|
||||
object2.subscriptionSlotInner = {'alignItems': 'center', 'flexDirection': 'row', 'paddingRight': 16,
|
||||
'paddingVertical': 12};
|
||||
const BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
|
||||
object2.subscriptionSlotBorder = {backgroundColor: BORDER_SUBTLE, height: 1};
|
||||
object2.subscriptionSlotInfo = {'flexShrink': 1, 'flexGrow': 1};
|
||||
object2.subscriptionSlotInfoTitle = {lineHeight: 24};
|
||||
object2.subscriptionSlotInfoCooldown = {lineHeight: 16};
|
||||
const CONTROL_BRAND_FOREGROUND = (importDefault(697) /* metro dependency 697: native */).colors.CONTROL_BRAND_FOREGROUND;
|
||||
object2.subscriptionSlotInfoTransferText = {'color': null, 'fontSize': 16, 'fontWeight': '500', 'lineHeight': 20,
|
||||
color: CONTROL_BRAND_FOREGROUND};
|
||||
object2.unusedSlots = {marginBottom: 32};
|
||||
const TEXT_LINK = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_LINK;
|
||||
object2.subscribeButtonText = {'color': null, 'fontSize': 16, 'fontWeight': '500', 'lineHeight': 20,
|
||||
color: TEXT_LINK};
|
||||
const env0_14 = Reflect.apply(createStyles, value, [object2]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/premium/native/GuildBoostSlotsInventory.tsx');
|
||||
exports.default = GuildBoostSlotsInventory;
|
||||
}
|
||||
|
||||
function GuildBoostSlotCooldown({cooldownEndsAt}) { // fn#93628, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12414:1868, offset: 0x020bd00a, size: 280 bytes, params: 2, frame: 22
|
||||
var r0;
|
||||
var Text;
|
||||
var intl;
|
||||
const styles = useStyles();
|
||||
const value2 = env0_4.useMemo(_fun93629, [cooldownEndsAt]);
|
||||
const {days, hours, minutes} = (importDefault(7054) /* metro dependency 7054: useCountdown */)(value2, 15000);
|
||||
const value4 = value2.valueOf();
|
||||
const Date = global.Date;
|
||||
if (value4 <= Date.now()) {
|
||||
r0 = null;
|
||||
} else {
|
||||
Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
var textProps = {'style': null, 'variant': 'text-xs/medium', 'color': 'text-muted',
|
||||
style: styles.subscriptionSlotInfoCooldown};
|
||||
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
r0 = <Text {...textProps}>{intl.format((require(1244) /* metro dependency 1244: indexNative */).t.NffSH8,
|
||||
{days: days, hours: hours, minutes: minutes})}</Text>;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function GuildBoostSlotsInventoryRow({title, subtitle, action, isLast}) { // fn#93630, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12414:2228, offset: 0x020bd147, size: 262 bytes, params: 2, frame: 29
|
||||
const styles = useStyles();
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
return (
|
||||
<View style={styles.subscriptionSlot}>
|
||||
<View style={styles.subscriptionSlotInner}>
|
||||
<View style={styles.subscriptionSlotInfo}>
|
||||
<Text
|
||||
style={styles.subscriptionSlotInfoTitle}
|
||||
lineClamp={1}
|
||||
variant="text-md/semibold"
|
||||
color="interactive-text-active"
|
||||
>
|
||||
{title}
|
||||
</Text>
|
||||
{subtitle}
|
||||
</View>
|
||||
{action}
|
||||
</View>
|
||||
{isLast ? null : <View style={styles.subscriptionSlotBorder} />}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function GuildBoostSlot({guild, guildBoostSlot, isLast}) { // fn#93631, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12414:2644, offset: 0x020bd24d, size: 469 bytes, params: 2, frame: 27
|
||||
var r6;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
var formatToPlainString;
|
||||
var property;
|
||||
var Date;
|
||||
var value4;
|
||||
var date;
|
||||
const styles = useStyles();
|
||||
if (guild == null) {
|
||||
return null;
|
||||
}
|
||||
const id = guildBoostSlot.premiumGuildSubscription != null ? guildBoostSlot.premiumGuildSubscription.id : null;
|
||||
const r17 = id != null ? (importDefault(21) /* metro dependency 21: SnowflakeUtils */).extractTimestamp(id) : null;
|
||||
if (r17 != null) {
|
||||
formatToPlainString = intl.formatToPlainString;
|
||||
property = (require(1244) /* metro dependency 1244: indexNative */).t['ePe+Xh'];
|
||||
Date = global.Date;
|
||||
value4 = Object.create(Date.prototype, {constructor: {value: Date}});
|
||||
date = new Date(r17);
|
||||
r6 = Reflect.apply(formatToPlainString, intl, [property, {date: date instanceof Object ? date : value4}]);
|
||||
} else {
|
||||
r6 = null;
|
||||
}
|
||||
return (
|
||||
<GuildBoostSlotsInventoryRow
|
||||
title={r6}
|
||||
subtitle={guildBoostSlot.cooldownEndsAt != null ? <GuildBoostSlotCooldown cooldownEndsAt={guildBoostSlot.cooldownEndsAt} /> : null}
|
||||
action={guildBoostSlot.isOnCooldown() ? null : ((PressableOpacity) => <PressableOpacity accessibilityRole="button" onPress={onPress_93632}>{((LegacyText) => <LegacyText style={styles.subscriptionSlotInfoTransferText}>{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.jqqLb6)}</LegacyText>)((require(1305) /* metro dependency 1305: native */).LegacyText)}</PressableOpacity>)((require(5278) /* metro dependency 5278: Pressables */).PressableOpacity)}
|
||||
isLast={isLast}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
function UnusedGuildBoostSlots({unusedSlots}) { // fn#93633, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12414:3370, offset: 0x020bd45e, size: 393 bytes, params: 2, frame: 31
|
||||
var r6;
|
||||
var object;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
var formatToPlainString;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
var ewI23O;
|
||||
const styles = useStyles();
|
||||
let value2 = unusedSlots.filter(function({cooldownEndsAt}) {
|
||||
var r0;
|
||||
var value2;
|
||||
var value = cooldownEndsAt != null;
|
||||
if (value) {
|
||||
value2 = new global.Date(cooldownEndsAt);
|
||||
value2 = value2.valueOf();
|
||||
cooldownEndsAt = global.Date;
|
||||
value2 = value2 > cooldownEndsAt.now();
|
||||
r0 = value2;
|
||||
} else {
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
});
|
||||
const value3 = unusedSlots.filter(function({cooldownEndsAt}) {
|
||||
var r0;
|
||||
var value2;
|
||||
var value = cooldownEndsAt == null;
|
||||
if (value) {
|
||||
r0 = value;
|
||||
} else {
|
||||
value2 = new global.Date(cooldownEndsAt);
|
||||
value2 = value2.valueOf();
|
||||
cooldownEndsAt = global.Date;
|
||||
value2 = value2 <= cooldownEndsAt.now();
|
||||
r0 = value2;
|
||||
}
|
||||
return r0;
|
||||
});
|
||||
unusedSlots = styles.unusedSlots;
|
||||
let length = value3.length;
|
||||
if (length > 0) {
|
||||
object = {};
|
||||
formatToPlainString = intl.formatToPlainString;
|
||||
ewI23O = t.ewI23O;
|
||||
length = value3.length;
|
||||
object.title = Reflect.apply(formatToPlainString, intl, [ewI23O, {numSubscriptions: length}]);
|
||||
object.action = ((PressableOpacity) => <PressableOpacity accessibilityRole="button" onPress={onPress_93636}>{((LegacyText) => <LegacyText style={styles.subscribeButtonText}>{intl.string(t['7KyPor'])}</LegacyText>)((require(1305) /* metro dependency 1305: native */).LegacyText)}</PressableOpacity>)((require(5278) /* metro dependency 5278: Pressables */).PressableOpacity);
|
||||
length = value2.length;
|
||||
object.isLast = length === 0;
|
||||
r6 = <GuildBoostSlotsInventoryRow {...object} />;
|
||||
} else {
|
||||
r6 = null;
|
||||
}
|
||||
return (
|
||||
<View style={unusedSlots}>
|
||||
{[r6, value2.map(_fun93637)]}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function BoostedGuildInfo({guild, numGuildBoostSlots}) { // fn#93638, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12414:4261, offset: 0x020bd75b, size: 474 bytes, params: 2, frame: 33
|
||||
var r0;
|
||||
var items4;
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
var items2;
|
||||
var items3;
|
||||
var intl;
|
||||
const styles = useStyles();
|
||||
if (guild == null) {
|
||||
r0 = null;
|
||||
} else {
|
||||
var viewBindingProps = {style: styles.guildInfo};
|
||||
items4 = [<View style={styles.guildInfoIcon}>{((Component) => <Component guild={guild} size={(require(6819) /* metro dependency 6819: GuildIcon */).GuildIconSizes.NORMAL} selected={false} />)(importDefault(6819) /* metro dependency 6819: GuildIcon */)}</View>];
|
||||
items2 = [<Text style={styles.guildInfoName} variant="heading-lg/extrabold" color="interactive-text-active">{guild.name}</Text>];
|
||||
var viewBinding4Props = {style: styles.guildInfoRowBottom};
|
||||
items3 = [<Image source={importDefault(12229) /* metro dependency 12229 */} style={styles.guildInfoRowIcon} />];
|
||||
var textProps = {'style': null, 'variant': 'text-xs/semibold', 'color': 'interactive-text-active',
|
||||
style: styles.guildInfoSubscriptionCount};
|
||||
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
items3[1] = <Text {...textProps}>{intl.format((require(1244) /* metro dependency 1244: indexNative */).t.bexfNy,
|
||||
{numSubscriptions: numGuildBoostSlots})}</Text>;
|
||||
items2[1] = <View {...viewBinding4Props}>{items3}</View>;
|
||||
items4[1] = <View>{items2}</View>;
|
||||
r0 = <View {...viewBindingProps}>{items4}</View>;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function BoostedGuild({guildId, guildBoostSlots}) { // fn#93639, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12414:4909, offset: 0x020bd935, size: 556 bytes, params: 2, frame: 33
|
||||
const styles = useStyles();
|
||||
const guild = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildStore], function() {
|
||||
return GuildStore.getGuild(guildId);
|
||||
});
|
||||
const theme = (require(566) /* metro dependency 566: flux */).useStateFromStores([ThemeStore], function() {
|
||||
return ThemeStore.theme;
|
||||
});
|
||||
const r16 = guild != null && guild.banner != null ? (importDefault(1423) /* metro dependency 1423: AvatarUtils */).getGuildBannerSource(guild) : null;
|
||||
return (
|
||||
<View style={styles.boostedGuild}>
|
||||
<View style={styles.subscriptionBody}>
|
||||
<View style={styles.subscriptionImageView}>
|
||||
<Image
|
||||
source={r16 ?? (require(12230) /* metro dependency 12230: SubscriptionPlaceholderPattern */).useSubscriptionPlaceholderPatternSource()}
|
||||
style={[styles.subscriptionImage, r16 == null ? styles.subscriptionImageFallback : null]}
|
||||
/>
|
||||
{r16 != null ? <View style={styles.subscriptionImageOverlay} /> : null}
|
||||
{((Component) => <Component guild={guild} theme={theme} />)(importDefault(12234) /* metro dependency 12234: BoostedGuildTierProgressCircle */)}
|
||||
</View>
|
||||
<BoostedGuildInfo guild={guild} numGuildBoostSlots={guildBoostSlots.length} />
|
||||
</View>
|
||||
<View>
|
||||
{guildBoostSlots.map(_fun93642)}
|
||||
</View>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function GuildBoostSlotsInventory() { // fn#93643, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12414:5772, offset: 0x020bdbad, size: 525 bytes, params: 1, frame: 29
|
||||
var r6;
|
||||
var r0;
|
||||
var value8;
|
||||
var value9;
|
||||
var items2;
|
||||
var jsxRuntimeEnv0_13Binding;
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
var value;
|
||||
const styles = useStyles();
|
||||
env0_4.useEffect(_fun93644, []);
|
||||
const fluxModule = require(566) /* metro dependency 566: flux */;
|
||||
let useStateFromStores = fluxModule.useStateFromStores;
|
||||
const premiumTypeSubscription = Reflect.apply(useStateFromStores, fluxModule, [[SubscriptionStore], function() {
|
||||
return SubscriptionStore.getPremiumTypeSubscription();
|
||||
}]);
|
||||
const moduleValue2 = fluxModule;
|
||||
useStateFromStores = moduleValue2.useStateFromStores;
|
||||
const value5 = (importDefault(22) /* metro dependency 22 */)(Reflect.apply(useStateFromStores, moduleValue2,
|
||||
[[GuildBoostSlotStore], function() {
|
||||
return GuildBoostSlotStore.boostSlots;
|
||||
}])).groupBy(function({premiumGuildSubscription}) {
|
||||
return premiumGuildSubscription != null ? premiumGuildSubscription.guildId : '0';
|
||||
}).value();
|
||||
const property = value5[0];
|
||||
const Object = global.Object;
|
||||
const value7 = Object.keys(value5).filter(function(a0) {
|
||||
return a0 !== '0';
|
||||
});
|
||||
if (value7.length !== 0) {
|
||||
value9 = null;
|
||||
if (value9 == premiumTypeSubscription) {
|
||||
r0 = value9;
|
||||
} else {
|
||||
var viewBindingProps = {style: styles.inventory};
|
||||
items2 = [value9 != property && property.length > 0 ? <UnusedGuildBoostSlots unusedSlots={property} /> : value9];
|
||||
if (value7.length > 0) {
|
||||
jsxRuntimeEnv0_13Binding = jsxRuntimeEnv0_13;
|
||||
value = <Text style={styles.header} variant="eyebrow" color="text-default">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.gB9oQ7)}</Text>;
|
||||
value = <>{[value, value7.map(_fun93649)]}</>;
|
||||
r6 = value;
|
||||
} else {
|
||||
r6 = value9;
|
||||
}
|
||||
items2[1] = r6;
|
||||
value = <View {...viewBindingProps}>{items2}</View>;
|
||||
r0 = value;
|
||||
}
|
||||
} else {
|
||||
value8 = null;
|
||||
if (value8 == property) {
|
||||
r0 = value8;
|
||||
} else {
|
||||
value9 = null;
|
||||
if (value9 == premiumTypeSubscription) {
|
||||
r0 = value9;
|
||||
} else {
|
||||
var viewBindingProps = {style: styles.inventory};
|
||||
items2 = [value9 != property && property.length > 0 ? <UnusedGuildBoostSlots unusedSlots={property} /> : value9];
|
||||
if (value7.length > 0) {
|
||||
jsxRuntimeEnv0_13Binding = jsxRuntimeEnv0_13;
|
||||
value = <Text style={styles.header} variant="eyebrow" color="text-default">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.gB9oQ7)}</Text>;
|
||||
value = <>{[value, value7.map(_fun93649)]}</>;
|
||||
r6 = value;
|
||||
} else {
|
||||
r6 = value9;
|
||||
}
|
||||
items2[1] = r6;
|
||||
value = <View {...viewBindingProps}>{items2}</View>;
|
||||
r0 = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function _fun93629() { // fn#93629, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12414:1943, offset: 0x020bd122, size: 37 bytes, params: 1, frame: 11
|
||||
const Date = global.Date;
|
||||
const cooldownEndsAtBinding = cooldownEndsAt;
|
||||
const value = Object.create(Date.prototype, {constructor: {value: Date}});
|
||||
const date = new Date(cooldownEndsAtBinding);
|
||||
return date instanceof Object ? date : value;
|
||||
}
|
||||
|
||||
function GuildBoostSlotOnPress() { // fn#93632, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12414:3179, owner: GuildBoostSlot.onPress, offset: 0x020bd422, size: 60 bytes, params: 1, frame: 13
|
||||
const value = environment.__proto__;
|
||||
return (require(6522) /* metro dependency 6522: BoostingActionCreators */).openTransferModal({guildBoostSlots: [guildBoostSlot]});
|
||||
}
|
||||
|
||||
function UnusedGuildBoostSlotsOnPress() { // fn#93636, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12414:3827, owner: UnusedGuildBoostSlots.onPress, offset: 0x020bd685, size: 37 bytes, params: 1, frame: 11
|
||||
const value = environment.__proto__;
|
||||
return (require(6522) /* metro dependency 6522: BoostingActionCreators */).openApplyBoostModal();
|
||||
}
|
||||
|
||||
function _fun93637(a0, a1) { // fn#93637, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12414:4012, offset: 0x020bd6aa, size: 177 bytes, params: 3, frame: 22
|
||||
const value = environment.__proto__;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const formatToPlainString = intl.formatToPlainString;
|
||||
const gDsyB9 = (require(1244) /* metro dependency 1244: indexNative */).t.gDsyB9;
|
||||
const cooldownEndsAt = a0.cooldownEndsAt;
|
||||
const value2 = null;
|
||||
return (
|
||||
<GuildBoostSlotsInventoryRow
|
||||
title={Reflect.apply(formatToPlainString, intl, [gDsyB9, {numSubscriptions: 1}])}
|
||||
subtitle={value2 != cooldownEndsAt ? <GuildBoostSlotCooldown cooldownEndsAt={a0.cooldownEndsAt} /> : value2}
|
||||
isLast={a1 === env0_0.length - 1}
|
||||
key={a0.id}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun93642(a0, a1) { // fn#93642, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12414:5590, offset: 0x020bdb61, size: 76 bytes, params: 3, frame: 16
|
||||
return (
|
||||
<GuildBoostSlot
|
||||
guild={guild}
|
||||
guildBoostSlot={a0}
|
||||
isLast={a1 === guildBoostSlots.length - 1}
|
||||
key={a0.id}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun93644() { // fn#93644, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12414:5831, offset: 0x020bddba, size: 63 bytes, params: 1, frame: 13
|
||||
const value = environment.__proto__;
|
||||
(importAll(4223) /* metro dependency 4223: BillingActionCreators */).fetchSubscriptions();
|
||||
(require(8251) /* metro dependency 8251: BoostingActionCreators */).fetchGuildBoostSlots();
|
||||
}
|
||||
|
||||
function _fun93649(a0) { // fn#93649, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12414:6464, offset: 0x020bde36, size: 47 bytes, params: 2, frame: 15
|
||||
return (
|
||||
<BoostedGuild
|
||||
guildId={a0}
|
||||
guildBoostSlots={env0_0[a0]}
|
||||
key={a0}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,77 @@
|
||||
/* Metro module 15733; source: modules/premium/native/IAPManager.android.tsx; dependencies: [7, 6, 15, 17, 18, 4860, 2] */
|
||||
function _fun120798(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#120798, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15941:6, offset: 0x02535e51, size: 218 bytes, params: 8, frame: 18
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_0 = importDefault(7) /* metro dependency 7 */;
|
||||
const env0_1 = importDefault(6) /* metro dependency 6 */;
|
||||
const env0_2 = importDefault(15) /* metro dependency 15 */;
|
||||
const env0_3 = importDefault(17) /* metro dependency 17 */;
|
||||
const env0_4 = importDefault(18) /* metro dependency 18 */;
|
||||
let value = importDefault(4860) /* metro dependency 4860: AutomaticLifecycleManager */;
|
||||
value = _fun120802(value);
|
||||
value = new value();
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/premium/native/IAPManager.android.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
function _isNativeReflectConstruct_120799() { // fn#120799, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15941:148, offset: 0x02535f2b, size: 98 bytes, params: 1, frame: 18
|
||||
var Boolean;
|
||||
var prototype;
|
||||
var valueOf;
|
||||
var call;
|
||||
var Reflect;
|
||||
var construct;
|
||||
var closure;
|
||||
var value;
|
||||
var error;
|
||||
try {
|
||||
Boolean = global.Boolean;
|
||||
prototype = Boolean.prototype;
|
||||
valueOf = prototype.valueOf;
|
||||
call = valueOf.call;
|
||||
Reflect = global.Reflect;
|
||||
construct = Reflect.construct;
|
||||
Boolean = global.Boolean;
|
||||
closure = function() {
|
||||
};
|
||||
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
|
||||
value = Reflect.apply(call, valueOf, [value]);
|
||||
var result = !value;
|
||||
} catch (error) {
|
||||
}
|
||||
return (_isNativeReflectConstruct_120799_isNativeReflectConstruct = function() {
|
||||
return !!result;
|
||||
})();
|
||||
}
|
||||
|
||||
function _fun120802(a0) { // fn#120802, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15941:351, offset: 0x02535f8d, size: 42 bytes, params: 2, frame: 14
|
||||
const closure = IAPManager;
|
||||
env0_4(closure, a0);
|
||||
return env0_0(closure);
|
||||
}
|
||||
|
||||
function IAPManager(a0) { // fn#120803, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15941:363, offset: 0x02535fb7, size: 160 bytes, params: 2, frame: 20
|
||||
var r0;
|
||||
var Reflect;
|
||||
let value = copyRestArgs(0, undefined);
|
||||
let binding = env1_1;
|
||||
binding(this, IAPManager);
|
||||
const items = [];
|
||||
arraySpread(items, value, 0, items);
|
||||
value = env1_3(IAPManager);
|
||||
binding = env1_2;
|
||||
if (_isNativeReflectConstruct_120799()) {
|
||||
Reflect = global.Reflect;
|
||||
value = Reflect.construct(value, items, env1_3(this).constructor);
|
||||
r0 = value;
|
||||
} else {
|
||||
value = value.apply(this, items);
|
||||
r0 = value;
|
||||
}
|
||||
value = binding(this, r0);
|
||||
value.actions = {POST_CONNECTION_OPEN: function() {
|
||||
}, APP_STATE_UPDATE: function() {
|
||||
}};
|
||||
return value;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,84 @@
|
||||
/* Metro module 14943; source: modules/premium/native/MobileTrialUserSettingsAvatarBadge.tsx; dependencies: [31, 27, 1878, 1880, 33, 4501, 697, 7062, 7061, 566, 14944, 14945, 14946, 14947, 10357, 1365, 1305, 10843, 2] */
|
||||
function _fun113050(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#113050, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15140:6, offset: 0x023e74bd, size: 518 bytes, params: 8, frame: 21
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
importAll(31) /* metro dependency 31 */;
|
||||
const env0_3 = (require(27) /* metro dependency 27 */).View;
|
||||
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
|
||||
const env0_5 = (require(1880) /* metro dependency 1880: PremiumConstants */).PremiumSubscriptionSKUs;
|
||||
let value = require(33) /* metro dependency 33 */;
|
||||
const env0_6 = value.jsx;
|
||||
const env0_7 = value.Fragment;
|
||||
const env0_8 = value.jsxs;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
const MOBILE_TEXT_HEADING_PRIMARY = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_TEXT_HEADING_PRIMARY;
|
||||
const env0_9 = Reflect.apply(createStyles, value, [{sparkleContainer: {position: 'absolute'}, sparkle: {'width': 12,
|
||||
'height': 12}, sparkle2: {'width': 4, 'height': 4, tintColor: MOBILE_TEXT_HEADING_PRIMARY}, star: {'width': 8,
|
||||
'height': 8}, defaultSparklePosition: {'bottom': -6, 'left': -8}, defaultSparkle2Position: {'bottom': 16,
|
||||
'left': -2}, defaultStarPosition: {'top': -4, 'right': -8}, avatarSparklePosition: {'bottom': -8, 'left': -10},
|
||||
avatarSparkle2Position: {'bottom': 16, 'left': -2}, avatarStarPosition: {'top': -4, 'right': -10},
|
||||
sparkle2Transform: {transform: [{rotate: '20deg'}]}, starTransform: {transform: [{rotate: '-165deg'}]}}]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/premium/native/MobileTrialUserSettingsAvatarBadge.tsx');
|
||||
exports.MobileTrialUserSettingsAvatarBadge = MobileTrialUserSettingsAvatarBadge;
|
||||
}
|
||||
|
||||
function MobileTrialUserSettingsAvatarBadge() { // fn#113051, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15140:880, offset: 0x023e76c3, size: 461 bytes, params: 1, frame: 20
|
||||
var r7;
|
||||
var r2;
|
||||
var sku_id;
|
||||
var value5;
|
||||
var TIER_0;
|
||||
const value2 = undefined;
|
||||
const styles = useStyles();
|
||||
const value3 = (require(7062) /* metro dependency 7062: usePremiumTrialOfferNative */).usePremiumTrialOffer();
|
||||
const subscription_trial = value3 == null ? value2 : value3.subscription_trial;
|
||||
const value4 = (require(7061) /* metro dependency 7061: MobileTrialUtils */).useShouldShowPremiumTrialUserSettingsAvatarBadge();
|
||||
const currentUser = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() {
|
||||
return UserStore.getCurrentUser();
|
||||
});
|
||||
if (value4) {
|
||||
value5 = (currentUser == null ? value2 : currentUser.avatar) != null;
|
||||
r7 = value5 ? styles.avatarSparklePosition : styles.defaultSparklePosition;
|
||||
r7 = value5 ? styles.avatarSparkle2Position : styles.defaultSparkle2Position;
|
||||
r2 = value5 ? styles.avatarStarPosition : styles.defaultStarPosition;
|
||||
sku_id = subscription_trial == null ? value2 : subscription_trial.sku_id;
|
||||
TIER_0 = PremiumSubscriptionSKUs.TIER_0;
|
||||
r2 = sku_id === TIER_0 ? importDefault(14944) /* metro dependency 14944 */ : importDefault(14945) /* metro dependency 14945 */;
|
||||
sku_id = subscription_trial == null ? value2 : subscription_trial.sku_id;
|
||||
TIER_0 = PremiumSubscriptionSKUs.TIER_0;
|
||||
var env0_5 = sku_id === TIER_0 ? importDefault(14946) /* metro dependency 14946 */ : importDefault(14947) /* metro dependency 14947 */;
|
||||
return ((Component) => <Component contentTypes={[(require(1365) /* metro dependency 1365: dismissible_content */).DismissibleContent.PREMIUM_MOBILE_TRIAL_USER_SETTINGS_AVATAR_BADGE]}>{children_113053}</Component>)(importDefault(10357) /* metro dependency 10357: SelectedDismissibleContent */);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
function MobileTrialUserSettingsAvatarBadgeChildren({visibleContent}) { // fn#113053, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15140:1571, owner: MobileTrialUserSettingsAvatarBadge.children, offset: 0x023e7890, size: 399 bytes, params: 2, frame: 27
|
||||
var jsxRuntimeEnv1_7Binding;
|
||||
var stylesBinding;
|
||||
var sparkleContainer;
|
||||
const Icon = (require(1305) /* metro dependency 1305: native */).Icon;
|
||||
var items2;
|
||||
const DismissibleContent = (require(1365) /* metro dependency 1365: dismissible_content */).DismissibleContent;
|
||||
const PREMIUM_MOBILE_TRIAL_USER_SETTINGS_AVATAR_BADGE = DismissibleContent.PREMIUM_MOBILE_TRIAL_USER_SETTINGS_AVATAR_BADGE;
|
||||
if (visibleContent === PREMIUM_MOBILE_TRIAL_USER_SETTINGS_AVATAR_BADGE) {
|
||||
jsxRuntimeEnv1_7Binding = jsxRuntimeEnv1_7;
|
||||
stylesBinding = styles;
|
||||
sparkleContainer = stylesBinding.sparkleContainer;
|
||||
items2 = [<View style={[sparkleContainer,
|
||||
env0_1]}><Icon source={env0_4} style={stylesBinding.sparkle} disableColor /></View>];
|
||||
sparkleContainer = stylesBinding.sparkleContainer;
|
||||
items2[1] = <View style={[sparkleContainer, stylesBinding.starTransform,
|
||||
env0_3]}><Icon source={env0_5} style={stylesBinding.star} disableColor /></View>;
|
||||
sparkleContainer = stylesBinding.sparkleContainer;
|
||||
items2[2] = <View style={[sparkleContainer, stylesBinding.sparkle2Transform,
|
||||
env0_2]}><Icon source={importDefault(10843) /* metro dependency 10843 */} style={stylesBinding.sparkle2} disableColor /></View>;
|
||||
return (
|
||||
<>
|
||||
{items2}
|
||||
</>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,49 @@
|
||||
/* Metro module 7061; source: modules/premium/native/MobileTrialUtils.tsx; dependencies: [1880, 7062, 3968, 1365, 7249, 3802, 1244, 2] */
|
||||
function _fun55984(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#55984, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7239:6, offset: 0x013ba5c1, size: 137 bytes, params: 8, frame: 18
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_2 = (require(1880) /* metro dependency 1880: PremiumConstants */).PremiumSubscriptionSKUToPremiumType;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/premium/native/MobileTrialUtils.tsx');
|
||||
exports.useShouldShowPremiumTrialUserSettingsAvatarBadge = useShouldShowPremiumTrialUserSettingsAvatarBadge;
|
||||
exports.usePremiumTrialOfferPremiumType = function() {
|
||||
var value2 = undefined;
|
||||
var value3 = require(dependencyMap[1]).usePremiumTrialOffer();
|
||||
return PremiumSubscriptionSKUToPremiumType[value3 == null || value3.subscription_trial == null ? value2 : value3.subscription_trial.sku_id];
|
||||
};
|
||||
exports.useNitroTrialCtaOverride = useNitroTrialCtaOverride;
|
||||
}
|
||||
|
||||
function useShouldShowPremiumTrialUserSettingsAvatarBadge() { // fn#55985, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7239:270, offset: 0x013ba64a, size: 119 bytes, params: 1, frame: 15
|
||||
let value = undefined;
|
||||
const value2 = (require(7062) /* metro dependency 7062: usePremiumTrialOfferNative */).usePremiumTrialOffer();
|
||||
const dismissibleContentUnsafeUtilsModule = require(3968) /* metro dependency 3968: DismissibleContentUnsafeUtils */;
|
||||
const UNSAFE_useIsDismissibleContentDismissed = dismissibleContentUnsafeUtilsModule.UNSAFE_useIsDismissibleContentDismissed;
|
||||
const DismissibleContent = (require(1365) /* metro dependency 1365: dismissible_content */).DismissibleContent;
|
||||
const PREMIUM_MOBILE_TRIAL_USER_SETTINGS_AVATAR_BADGE = DismissibleContent.PREMIUM_MOBILE_TRIAL_USER_SETTINGS_AVATAR_BADGE;
|
||||
const value3 = Reflect.apply(UNSAFE_useIsDismissibleContentDismissed, dismissibleContentUnsafeUtilsModule,
|
||||
[PREMIUM_MOBILE_TRIAL_USER_SETTINGS_AVATAR_BADGE]);
|
||||
value = (value2 == null ? value : value2.expires_at) != null;
|
||||
return value2 != null && !value && !value3;
|
||||
}
|
||||
|
||||
function useNitroTrialCtaOverride(a0) { // fn#55987, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7239:769, offset: 0x013ba70e, size: 219 bytes, params: 2, frame: 18
|
||||
var intl;
|
||||
var value;
|
||||
const value2 = undefined;
|
||||
const value3 = (require(7062) /* metro dependency 7062: usePremiumTrialOfferNative */).usePremiumTrialOffer();
|
||||
const subscription_trial = value3 == null ? value2 : value3.subscription_trial;
|
||||
if (subscription_trial != null) {
|
||||
var moduleValue2 = require(7249) /* metro dependency 7249: AndroidTwoWeekTrialsExperiment */;
|
||||
if (moduleValue2.isAndroidTwoWeekTrialsTrialCTAEnabled({location: a0})) {
|
||||
value = require(3802) /* metro dependency 3802: PremiumUtils */;
|
||||
value = value.formatIntervalDuration({intervalType: subscription_trial.interval,
|
||||
intervalCount: subscription_trial.interval_count});
|
||||
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
return intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t['6xpY54'],
|
||||
{duration: value});
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,331 @@
|
||||
/* Metro module 12566; source: modules/premium/native/NoticeStore.tsx; dependencies: [6, 7, 15, 17, 18, 7064, 1880, 661, 587, 3738, 566, 694, 2] */
|
||||
function _fun96239(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#96239, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12756:6, offset: 0x021588d9, size: 532 bytes, params: 8, frame: 21
|
||||
const env0_0 = require;
|
||||
const _arrayLikeToArray_96245 = 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 clearDismissUntil = function(a0) {
|
||||
var Storage = require(dependencyMap[8]).Storage;
|
||||
Storage.remove(dismissUntilStorageKey(a0));
|
||||
};
|
||||
const closure = CONNECTION_OPEN_96250;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(6) /* metro dependency 6 */;
|
||||
const env0_4 = importDefault(7) /* metro dependency 7 */;
|
||||
const env0_5 = importDefault(15) /* metro dependency 15 */;
|
||||
const env0_6 = importDefault(17) /* metro dependency 17 */;
|
||||
const env0_7 = importDefault(18) /* metro dependency 18 */;
|
||||
const userOfferStore = importDefault(7064) /* metro dependency 7064: UserOfferStore */;
|
||||
const env0_9 = (require(1880) /* metro dependency 1880: PremiumConstants */).PremiumSubscriptionSKUs;
|
||||
const NoticeTypes = (require(661) /* metro dependency 661: Constants */).NoticeTypes;
|
||||
let PREMIUM_TIER_2_TRIAL_ENDING = NoticeTypes.PREMIUM_TIER_2_TRIAL_ENDING;
|
||||
object = [PREMIUM_TIER_2_TRIAL_ENDING];
|
||||
let PREMIUM_TIER_0_TRIAL_ENDING = NoticeTypes.PREMIUM_TIER_0_TRIAL_ENDING;
|
||||
object[1] = PREMIUM_TIER_0_TRIAL_ENDING;
|
||||
object = {};
|
||||
PREMIUM_TIER_0_TRIAL_ENDING = NoticeTypes.PREMIUM_TIER_0_TRIAL_ENDING;
|
||||
object[PREMIUM_TIER_0_TRIAL_ENDING] = 'hidePremiumTier0TrialEndingReminder';
|
||||
PREMIUM_TIER_2_TRIAL_ENDING = NoticeTypes.PREMIUM_TIER_2_TRIAL_ENDING;
|
||||
object[PREMIUM_TIER_2_TRIAL_ENDING] = 'hidePremiumTier2TrialEndingReminder';
|
||||
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
|
||||
let value = _fun96251(Store);
|
||||
value.displayName = 'NoticeStore';
|
||||
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */, {CONNECTION_OPEN: closure,
|
||||
CURRENT_USER_UPDATE: closure, PREMIUM_PAYMENT_SUBSCRIBE_SUCCESS: closure,
|
||||
BILLING_SUBSCRIPTION_UPDATE_SUCCESS: closure, BILLING_MOST_RECENT_SUBSCRIPTION_FETCH_SUCCESS: closure,
|
||||
BILLING_SUBSCRIPTION_FETCH_SUCCESS: closure, LOGOUT: LOGOUT_96255, NOTICE_DISMISS: NOTICE_DISMISS});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/premium/native/NoticeStore.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
function _isNativeReflectConstruct_96240() { // fn#96240, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12756:218, offset: 0x02158aed, size: 98 bytes, params: 1, frame: 18
|
||||
var Boolean;
|
||||
var prototype;
|
||||
var valueOf;
|
||||
var call;
|
||||
var Reflect;
|
||||
var construct;
|
||||
var closure;
|
||||
var value;
|
||||
var error;
|
||||
try {
|
||||
Boolean = global.Boolean;
|
||||
prototype = Boolean.prototype;
|
||||
valueOf = prototype.valueOf;
|
||||
call = valueOf.call;
|
||||
Reflect = global.Reflect;
|
||||
construct = Reflect.construct;
|
||||
Boolean = global.Boolean;
|
||||
closure = function() {
|
||||
};
|
||||
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
|
||||
value = Reflect.apply(call, valueOf, [value]);
|
||||
var result = !value;
|
||||
} catch (error) {
|
||||
}
|
||||
return (_isNativeReflectConstruct_96240_isNativeReflectConstruct = function() {
|
||||
return !!result;
|
||||
})();
|
||||
}
|
||||
|
||||
function _createForOfIteratorHelperLoose_96243(a0, a1) { // fn#96243, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12756:411, offset: 0x02158b4f, 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 _fun96244;
|
||||
}
|
||||
value = undefined;
|
||||
if (a0) {
|
||||
if (typeof a0 === 'string') {
|
||||
value = _arrayLikeToArray_96245(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_96245(a0, value);
|
||||
r6 = value;
|
||||
} else {
|
||||
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
|
||||
if (regexp.test(r9)) {
|
||||
value = _arrayLikeToArray_96245(a0, value);
|
||||
r6 = value;
|
||||
} else {
|
||||
r6 = value;
|
||||
}
|
||||
}
|
||||
r5 = r6;
|
||||
}
|
||||
} else {
|
||||
r5 = value;
|
||||
}
|
||||
if (r5) {
|
||||
if (r5) {
|
||||
}
|
||||
return _fun96244;
|
||||
}
|
||||
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 dismissUntilStorageKey(a0) { // fn#96246, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12756:1540, offset: 0x02158cc3, size: 26 bytes, params: 2, frame: 2
|
||||
return env0_13[a0] + '-untilAtLeast';
|
||||
}
|
||||
|
||||
function dismissNotice(a0, a1) { // fn#96248, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12756:1684, offset: 0x02158d15, size: 160 bytes, params: 3, frame: 17
|
||||
var property;
|
||||
const Storage = (require(587) /* metro dependency 587: Storage */).Storage;
|
||||
if (a0 != null) {
|
||||
property = env0_13[a0];
|
||||
if (property != null) {
|
||||
Storage.set(property, true);
|
||||
}
|
||||
if (a1 == null) {
|
||||
clearDismissUntil(a0);
|
||||
} else if (property != null) {
|
||||
Storage.set(dismissUntilStorageKey(a0), a1.format('YYYY-MM-DDTHH:mm:ss.SSSZ'));
|
||||
} else {
|
||||
clearDismissUntil(a0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function isNoticeDismissed(a0) { // fn#96249, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12756:1931, offset: 0x02158db5, size: 224 bytes, params: 2, frame: 17
|
||||
var r2;
|
||||
const Storage = (require(587) /* metro dependency 587: Storage */).Storage;
|
||||
var value7;
|
||||
let value = null;
|
||||
if (value == a0) {
|
||||
return false;
|
||||
}
|
||||
const property = env0_13[a0];
|
||||
if (value != property) {
|
||||
var value3 = Storage.get(dismissUntilStorageKey(a0));
|
||||
r2 = value != value3 ? (importDefault(3738) /* metro dependency 3738 */)(value3) : value;
|
||||
if (value != r2) {
|
||||
return r2.isAfter((importDefault(3738) /* metro dependency 3738 */)());
|
||||
}
|
||||
}
|
||||
let r1 = value != property && property !== '';
|
||||
if (r1) {
|
||||
value7 = Storage.get(property);
|
||||
value = value != value7;
|
||||
r1 = value && value7;
|
||||
}
|
||||
return r1;
|
||||
}
|
||||
|
||||
function BILLING_MOST_RECENT_SUBSCRIPTION_FETCH_SUCCESS_96250() { // fn#96250, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12756:2231, offset: 0x02158e95, size: 237 bytes, params: 1, frame: 18
|
||||
var r2;
|
||||
var value4;
|
||||
var PREMIUM_TIER_2_TRIAL_ENDING;
|
||||
var PREMIUM_TIER_0_TRIAL_ENDING;
|
||||
var getAlmostExpiringTrialOffersForReminder;
|
||||
var TIER_0;
|
||||
var length;
|
||||
var isNoticeDismissedBinding;
|
||||
var TIER_2;
|
||||
var value5;
|
||||
const value2 = _createForOfIteratorHelperLoose_96243(env0_12);
|
||||
const value3 = value2();
|
||||
let done = value3.done;
|
||||
if (!done) {
|
||||
r2 = value3;
|
||||
reducibleLoop1: while (true) {
|
||||
value4 = r2.value;
|
||||
PREMIUM_TIER_2_TRIAL_ENDING = NoticeTypes.PREMIUM_TIER_2_TRIAL_ENDING;
|
||||
if (value4 === PREMIUM_TIER_2_TRIAL_ENDING) {
|
||||
getAlmostExpiringTrialOffersForReminder = UserOfferStore.getAlmostExpiringTrialOffersForReminder;
|
||||
TIER_2 = PremiumSubscriptionSKUs.TIER_2;
|
||||
length = Reflect.apply(getAlmostExpiringTrialOffersForReminder, UserOfferStore, [[TIER_2]]).length;
|
||||
reducibleJoin9: while (true) {
|
||||
if (length > 0) {
|
||||
isNoticeDismissedBinding = isNoticeDismissed;
|
||||
PREMIUM_TIER_2_TRIAL_ENDING = NoticeTypes.PREMIUM_TIER_2_TRIAL_ENDING;
|
||||
if (isNoticeDismissedBinding(PREMIUM_TIER_2_TRIAL_ENDING)) {
|
||||
break reducibleJoin9;
|
||||
}
|
||||
env0_11 = value4;
|
||||
break reducibleLoop1;
|
||||
}
|
||||
break reducibleJoin9;
|
||||
}
|
||||
} else {
|
||||
PREMIUM_TIER_0_TRIAL_ENDING = NoticeTypes.PREMIUM_TIER_0_TRIAL_ENDING;
|
||||
reducibleJoin9: while (true) {
|
||||
if (value4 !== PREMIUM_TIER_0_TRIAL_ENDING) {
|
||||
break reducibleJoin9;
|
||||
}
|
||||
getAlmostExpiringTrialOffersForReminder = UserOfferStore.getAlmostExpiringTrialOffersForReminder;
|
||||
TIER_0 = PremiumSubscriptionSKUs.TIER_0;
|
||||
length = Reflect.apply(getAlmostExpiringTrialOffersForReminder, UserOfferStore, [[TIER_0]]).length;
|
||||
if (length > 0) {
|
||||
isNoticeDismissedBinding = isNoticeDismissed;
|
||||
PREMIUM_TIER_0_TRIAL_ENDING = NoticeTypes.PREMIUM_TIER_0_TRIAL_ENDING;
|
||||
if (isNoticeDismissedBinding(PREMIUM_TIER_0_TRIAL_ENDING)) {
|
||||
break reducibleJoin9;
|
||||
}
|
||||
env0_11 = value4;
|
||||
break reducibleLoop1;
|
||||
}
|
||||
break reducibleJoin9;
|
||||
}
|
||||
}
|
||||
value5 = value2();
|
||||
done = value5.done;
|
||||
if (done) {
|
||||
break reducibleLoop1;
|
||||
}
|
||||
r2 = value5;
|
||||
continue reducibleLoop1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function _fun96251(a0) { // fn#96251, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12756:2686, offset: 0x02158f82, size: 97 bytes, params: 2, frame: 16
|
||||
const closure = NoticeStore;
|
||||
env0_7(closure, a0);
|
||||
return env0_4(closure, [{key: 'initialize', value: function() {
|
||||
this.syncWith([UserOfferStore], CONNECTION_OPEN_96250);
|
||||
this.waitFor(UserOfferStore);
|
||||
}}, {key: 'getNoticeType', value: value_96254}]);
|
||||
}
|
||||
|
||||
function LOGOUT_96255() { // fn#96255, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12756:3423, offset: 0x02159018, size: 116 bytes, params: 1, frame: 18
|
||||
var r4;
|
||||
var value4;
|
||||
var property;
|
||||
var Storage;
|
||||
var value5;
|
||||
const value2 = _createForOfIteratorHelperLoose_96243(env0_12);
|
||||
const value3 = value2();
|
||||
let done = value3.done;
|
||||
if (!done) {
|
||||
r4 = value3;
|
||||
while (true) {
|
||||
value4 = r4.value;
|
||||
property = env0_13[value4];
|
||||
if (property != null) {
|
||||
Storage = (require(587) /* metro dependency 587: Storage */).Storage;
|
||||
Storage.remove(property);
|
||||
}
|
||||
clearDismissUntil(value4);
|
||||
value5 = value2();
|
||||
done = value5.done;
|
||||
if (done) {
|
||||
break;
|
||||
}
|
||||
r4 = value5;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function NOTICE_DISMISS(a0) { // fn#96256, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12756:3640, offset: 0x0215908c, size: 50 bytes, params: 2, frame: 14
|
||||
if (env0_11 != null) {
|
||||
dismissNotice(env0_11, a0.untilAtLeast);
|
||||
CONNECTION_OPEN_96250();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,170 @@
|
||||
/* Metro module 7550; source: modules/premium/native/PremiumAccountCredit.tsx; dependencies: [31, 27, 5181, 661, 33, 4501, 697, 3802, 1244, 2806, 6780, 4573, 566, 22, 2] */
|
||||
function _fun60693(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#60693, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7728:6, offset: 0x0170aab0, size: 450 bytes, params: 8, frame: 24
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
importAll(31) /* metro dependency 31 */;
|
||||
const env0_3 = (require(27) /* metro dependency 27 */).View;
|
||||
const entitlementStore = importDefault(5181) /* metro dependency 5181: EntitlementStore */;
|
||||
const env0_5 = (require(661) /* metro dependency 661: Constants */).SubscriptionStatusTypes;
|
||||
let value = require(33) /* metro dependency 33 */;
|
||||
const env0_6 = value.jsx;
|
||||
const env0_7 = value.jsxs;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
object2 = {};
|
||||
object2.title = {marginBottom: 12};
|
||||
const object4 = {};
|
||||
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
|
||||
const BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
|
||||
object4.backgroundColor = BACKGROUND_SURFACE_HIGH;
|
||||
object2.creditList = object4;
|
||||
object2.creditItem = {'flexDirection': 'row', 'alignItems': 'center', 'padding': 16};
|
||||
object2.textContainer = {'marginLeft': 16, 'marginRight': 16, 'flexDirection': 'column', 'flex': 1};
|
||||
object2.headerText = {lineHeight: 20};
|
||||
object2.subText = {lineHeight: 16};
|
||||
object2.timeText = {'lineHeight': 20, 'alignSelf': 'flex-start'};
|
||||
const BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
|
||||
object2.divider = {borderBottomWidth: 1, borderBottomColor: BORDER_SUBTLE};
|
||||
object2.creditDescription = {marginTop: 8};
|
||||
const env0_8 = Reflect.apply(createStyles, value, [object2]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/premium/native/PremiumAccountCredit.tsx');
|
||||
exports.default = _default_60695;
|
||||
}
|
||||
|
||||
function AccountCreditTier({planId, months, currentSubscription, shouldAddDivider, unconsumedFractionalPremiumUnits, hasPremiumGroup}) { // fn#60694, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7728:685, offset: 0x0170ac72, size: 967 bytes, params: 2, frame: 32
|
||||
var r18;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
var pauseEndsAt;
|
||||
var Date;
|
||||
var currentPeriodEnd;
|
||||
var date;
|
||||
const styles = useStyles();
|
||||
const premiumUtilsModule = require(3802) /* metro dependency 3802: PremiumUtils */;
|
||||
const castPremiumSubscriptionAsSkuId = premiumUtilsModule.castPremiumSubscriptionAsSkuId;
|
||||
const defaultImport = importDefault(3802) /* metro dependency 3802: PremiumUtils */;
|
||||
const getSkuIdForPlan = defaultImport.getSkuIdForPlan;
|
||||
const value2 = Reflect.apply(castPremiumSubscriptionAsSkuId, premiumUtilsModule, [Reflect.apply(getSkuIdForPlan,
|
||||
defaultImport, [planId])]);
|
||||
const tierDisplayNameByPlanId = defaultImport.getTierDisplayNameByPlanId(planId);
|
||||
if (hasPremiumGroup) {
|
||||
r18 = intl.string((importDefault(2806) /* metro dependency 2806: PremiumGroupMessages */)['5asczk']);
|
||||
} else if (currentSubscription == null) {
|
||||
r18 = intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.eNXZ5O,
|
||||
{planName: tierDisplayNameByPlanId});
|
||||
} else if (currentSubscription.planId === planId) {
|
||||
if (currentSubscription.status !== SubscriptionStatusTypes.PAUSED) {
|
||||
Date = global.Date;
|
||||
currentPeriodEnd = currentSubscription.currentPeriodEnd;
|
||||
date = new Date();
|
||||
} else {
|
||||
pauseEndsAt = currentSubscription.pauseEndsAt;
|
||||
if (pauseEndsAt != null) {
|
||||
Date = global.Date;
|
||||
pauseEndsAt = currentSubscription.pauseEndsAt;
|
||||
date = new Date();
|
||||
} else {
|
||||
Date = global.Date;
|
||||
currentPeriodEnd = currentSubscription.currentPeriodEnd;
|
||||
date = new Date();
|
||||
}
|
||||
}
|
||||
r18 = intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t['5CNRRA'],
|
||||
{date: premiumUtilsModule.extendDateWithUnconsumedFractionalPremium(undefined,
|
||||
unconsumedFractionalPremiumUnits) ?? 0});
|
||||
} else {
|
||||
r18 = intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.eNXZ5O,
|
||||
{planName: tierDisplayNameByPlanId});
|
||||
}
|
||||
let r14 = currentSubscription != null && currentSubscription.isPurchasedExternally;
|
||||
const items3 = [styles.creditItem];
|
||||
items3[1] = shouldAddDivider ? styles.divider : null;
|
||||
const GameIcon = importDefault(6780) /* metro dependency 6780: GameIcon */;
|
||||
const GameIconSizes = (require(6780) /* metro dependency 6780: GameIcon */).GameIconSizes;
|
||||
const SMALL = GameIconSizes.SMALL;
|
||||
const items2 = [<GameIcon size={SMALL} skuId={value2} />];
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
const format = intl.format;
|
||||
const LzobT9 = (require(1244) /* metro dependency 1244: indexNative */).t.LzobT9;
|
||||
const text = <Text style={styles.headerText} variant="text-md/semibold" color="mobile-text-heading-primary">{Reflect.apply(format,
|
||||
intl, [LzobT9, {planName: tierDisplayNameByPlanId}])}</Text>;
|
||||
r14 = !r14 && <Text style={styles.subText} variant="text-xs/medium" color="text-default">{r18}</Text>;
|
||||
items2[1] = <View style={styles.textContainer}>{text}{r14}</View>;
|
||||
items2[2] = <Text style={styles.timeText} variant="text-md/medium" color="text-default">{intl.format((require(1244) /* metro dependency 1244: indexNative */).t['ess/xl'],
|
||||
{count: months})}</Text>;
|
||||
return (
|
||||
<View style={items3}>
|
||||
{items2}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function _default_60695({currentSubscription, entitlements, style, creditListContainerStyle, hasPremiumGroup}) { // fn#60695, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7728:1944, offset: 0x0170b039, size: 689 bytes, params: 2, frame: 31
|
||||
var defaultImport2;
|
||||
var Array;
|
||||
var value7;
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
var string;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
var items2;
|
||||
const styles = useStyles();
|
||||
const fluxModule = require(566) /* metro dependency 566: flux */;
|
||||
const useStateFromStoresArray = fluxModule.useStateFromStoresArray;
|
||||
let object = [EntitlementStore];
|
||||
const env0_2 = Reflect.apply(useStateFromStoresArray, fluxModule, [object, function() {
|
||||
return EntitlementStore.getUnactivatedFractionalPremiumUnits();
|
||||
}]);
|
||||
if (entitlements != null) {
|
||||
var defaultImport = importDefault(3802) /* metro dependency 3802: PremiumUtils */;
|
||||
if (defaultImport.hasAccountCredit(entitlements)) {
|
||||
defaultImport2 = importDefault(22) /* metro dependency 22 */;
|
||||
Array = global.Array;
|
||||
value7 = defaultImport2(Array.from(entitlements)).filter(function({subscriptionPlanId, parentId,
|
||||
consumed}) {
|
||||
return subscriptionPlanId != null && parentId != null && !consumed;
|
||||
}).groupBy(_fun60698).value();
|
||||
object = {style: style};
|
||||
string = intl.string;
|
||||
items2 = [<Text style={styles.title} accessibilityRole="header" variant="eyebrow" color="text-default">{Reflect.apply(string,
|
||||
|
||||
|
||||
intl, [t.YugZY0])}</Text>];
|
||||
items2[1] = <View style={[styles.creditList,
|
||||
creditListContainerStyle]}>{global.Object.keys(value7).map(_fun60699)}</View>;
|
||||
string = intl.string;
|
||||
items2[2] = <Text style={styles.creditDescription} variant="text-sm/medium">{Reflect.apply(string, intl,
|
||||
[t.kNEjGm])}</Text>;
|
||||
items2[3] = currentSubscription != null && currentSubscription.isPurchasedExternally ? <Text style={styles.creditDescription} variant="text-sm/medium">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.azRP0E)}</Text> : null;
|
||||
return (
|
||||
<View {...object}>
|
||||
{items2}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
function _fun60698(a0) { // fn#60698, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7728:2308, offset: 0x0170b2fd, size: 11 bytes, params: 2, frame: 1
|
||||
return a0.subscriptionPlanId;
|
||||
}
|
||||
|
||||
function _fun60699(a0) { // fn#60699, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7728:2575, offset: 0x0170b308, size: 150 bytes, params: 2, frame: 17
|
||||
let Object = global.Object;
|
||||
const value2 = Object.keys(env0_3);
|
||||
Object = global.Object;
|
||||
return (
|
||||
<AccountCreditTier
|
||||
planId={a0}
|
||||
months={env0_3[a0].length}
|
||||
currentSubscription={currentSubscription}
|
||||
shouldAddDivider={!(a0 === value2[Object.keys(env0_3).length - 1])}
|
||||
unconsumedFractionalPremiumUnits={env0_2}
|
||||
hasPremiumGroup={hasPremiumGroup}
|
||||
key={a0}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,104 @@
|
||||
/* Metro module 7294; source: modules/premium/native/PremiumAnalyticsUtils.tsx; dependencies: [661, 491, 3802, 683, 2] */
|
||||
function _fun58840(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#58840, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7472:6, offset: 0x016d7f30, size: 513 bytes, params: 8, frame: 21
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const constantsModule = require(661) /* metro dependency 661: Constants */;
|
||||
const env0_3 = constantsModule.SubscriptionTypes;
|
||||
const env0_4 = constantsModule.PurchaseTypeToAnalyticsPaymentType;
|
||||
const env0_5 = constantsModule.PurchaseTypes;
|
||||
const env0_6 = constantsModule.AnalyticEvents;
|
||||
let object = {WHAT_YOU_LOSE: 1};
|
||||
object[1] = 'WHAT_YOU_LOSE';
|
||||
object.CONFIRM = 2;
|
||||
object[2] = 'CONFIRM';
|
||||
object.PREVIEW = 3;
|
||||
object[3] = 'PREVIEW';
|
||||
object.DOWNGRADE_TO_TIER_0 = 4;
|
||||
object[4] = 'DOWNGRADE_TO_TIER_0';
|
||||
object.MOBILE_SUBSCRIPTION_MANAGE = 5;
|
||||
object[5] = 'MOBILE_SUBSCRIPTION_MANAGE';
|
||||
const object4 = {};
|
||||
const WHAT_YOU_LOSE = object.WHAT_YOU_LOSE;
|
||||
object4[WHAT_YOU_LOSE] = "What You're Losing";
|
||||
const DOWNGRADE_TO_TIER_0 = object.DOWNGRADE_TO_TIER_0;
|
||||
object4[DOWNGRADE_TO_TIER_0] = 'Downgrade To Tier 0';
|
||||
const CONFIRM = object.CONFIRM;
|
||||
object4[CONFIRM] = 'Confirm Cancellation';
|
||||
const PREVIEW = object.PREVIEW;
|
||||
object4[PREVIEW] = 'Preview Updated Subscription';
|
||||
const MOBILE_SUBSCRIPTION_MANAGE = object.MOBILE_SUBSCRIPTION_MANAGE;
|
||||
object4[MOBILE_SUBSCRIPTION_MANAGE] = 'Mobile Subscription Manage';
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/premium/native/PremiumAnalyticsUtils.tsx');
|
||||
exports.PaymentFlowStep = {SKU_SELECT: 'sku_select', PLAN_SELECT: 'plan_select', REVIEW: 'review',
|
||||
CONFIRM: 'confirm', MOBILE_WEB_REDIRECT_CHECKOUT: 'mobile_web_redirect_checkout',
|
||||
YEARLY_UPSELL: 'yearly_upsell', PREMIUM_UPSELL: 'premium_upsell', EXTERNAL_PAYMENT: 'external_payment',
|
||||
REWARD_SKU_SELECT: 'reward_sku_select'};
|
||||
exports.getBasePurchaseFlowAnalyticsFields = function(a0) {
|
||||
var r4;
|
||||
var property = a0.analyticsLoadId;
|
||||
var isGift = a0.isGift;
|
||||
var value = undefined;
|
||||
r4 = isGift !== value ? isGift : false;
|
||||
var analyticsLocation = a0.analyticsLocation;
|
||||
return {load_id: property, payment_type: PurchaseTypeToAnalyticsPaymentType[PurchaseTypes.SUBSCRIPTION],
|
||||
subscription_type: SubscriptionTypes.PREMIUM, is_gift: r4, location: analyticsLocation,
|
||||
location_stack: a0.analyticsLocations,
|
||||
location_section: analyticsLocation == null ? value : analyticsLocation.section};
|
||||
};
|
||||
exports.getPaymentFlowCompletedAnalyticsFields = function(a0, a1) {
|
||||
var r1;
|
||||
var object = {};
|
||||
copyDataProperties(object, a1, copyDataProperties(object, a0, r1));
|
||||
return object;
|
||||
};
|
||||
exports.getPaymentFlowStepAnalyticsFields = function(a0, a1) {
|
||||
var r1;
|
||||
var object = {};
|
||||
copyDataProperties(object, a1, copyDataProperties(object, a0, r1));
|
||||
return object;
|
||||
};
|
||||
exports.getNewAnalyticsLoadId = getNewAnalyticsLoadId_58845;
|
||||
exports.CancellationFlowSteps = object;
|
||||
exports.STEP_ANALYTICS_NAMES = object4;
|
||||
exports.trackPremiumSubscriptionCancellationStarted = function(a0, a1) {
|
||||
var defaultImport = importDefault(dependencyMap[3]);
|
||||
var CANCELLATION_FLOW_STARTED = AnalyticEvents.CANCELLATION_FLOW_STARTED;
|
||||
var object = {location_stack: a1};
|
||||
var getBaseAnalyticsFieldsBinding = getBaseAnalyticsFields;
|
||||
copyDataProperties(object, getBaseAnalyticsFieldsBinding(a0), getBaseAnalyticsFieldsBinding);
|
||||
defaultImport.track(CANCELLATION_FLOW_STARTED, object);
|
||||
};
|
||||
exports.trackPremiumSubscriptionCancellationFlowStep = function({fromStep, toStep, subscription,
|
||||
analyticsLocations}) {
|
||||
var defaultImport = importDefault(dependencyMap[3]);
|
||||
var CANCELLATION_FLOW_STEP = AnalyticEvents.CANCELLATION_FLOW_STEP;
|
||||
var object = {from_step: fromStep, to_step: toStep, location_stack: analyticsLocations};
|
||||
copyDataProperties(object, getBaseAnalyticsFields(subscription), fromStep);
|
||||
defaultImport.track(CANCELLATION_FLOW_STEP, object);
|
||||
};
|
||||
}
|
||||
|
||||
function getBaseAnalyticsFields(a0) { // fn#58841, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7472:988, offset: 0x016d8131, size: 153 bytes, params: 2, frame: 16
|
||||
var r4;
|
||||
var premiumPlanItem;
|
||||
const object2 = {};
|
||||
const value = undefined;
|
||||
object2.subscription_id = a0 == null ? value : a0.id;
|
||||
object2.subscription_type = a0 == null ? value : a0.type;
|
||||
if (a0 != null) {
|
||||
premiumPlanItem = (require(3802) /* metro dependency 3802: PremiumUtils */).getPremiumPlanItem(a0);
|
||||
r4 = premiumPlanItem == null ? value : premiumPlanItem.id;
|
||||
} else {
|
||||
r4 = value;
|
||||
}
|
||||
object2.subscription_plan_id = r4;
|
||||
object2.subscription_plan_gateway_plan_id = a0 == null ? value : a0.paymentGatewayPlanId;
|
||||
object2.subscription_status = a0 == null ? value : a0.status;
|
||||
return object2;
|
||||
}
|
||||
|
||||
function getNewAnalyticsLoadId_58845() { // fn#58845, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7472:1972, offset: 0x016d825b, size: 37 bytes, params: 1, frame: 11
|
||||
return (require(491) /* metro dependency 491 */).v4();
|
||||
}
|
||||
|
||||
@@ -0,0 +1,427 @@
|
||||
/* Metro module 7027; source: modules/premium/native/PremiumBundledPlansUtils.tsx; dependencies: [57, 1880, 5143, 2] */
|
||||
function _fun55675(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#55675, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7205:6, offset: 0x013adcbf, size: 343 bytes, params: 8, frame: 25
|
||||
const env0_0 = require;
|
||||
const _arrayLikeToArray_55678 = 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 closure = getPremiumBundleWithPredicate;
|
||||
const closure2 = getPremiumBundledItemsFromProductId;
|
||||
const closure3 = getToggledIntervalProduct;
|
||||
const closure4 = isValidBundleProductId;
|
||||
const closure5 = getSubscriptionItemsForProduct;
|
||||
const closure6 = makeExternalPaymentGatewayPlanIdOrThrow;
|
||||
const closure7 = getProductIdFromSubscriptionItems;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_2 = importDefault(57) /* metro dependency 57 */;
|
||||
const premiumConstantsModule = require(1880) /* metro dependency 1880: PremiumConstants */;
|
||||
const env0_3 = premiumConstantsModule.PremiumTypes;
|
||||
const env0_4 = premiumConstantsModule.SubscriptionIntervalTypes;
|
||||
const env0_5 = premiumConstantsModule.SubscriptionPlans;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/premium/native/PremiumBundledPlansUtils.tsx');
|
||||
exports.getPremiumBundlesWithPredicate = getPremiumBundlesWithPredicate;
|
||||
exports.getPremiumBundleWithPredicate = closure;
|
||||
exports.getPremiumBundledItemsFromProductId = closure2;
|
||||
exports.getToggledIntervalProduct = closure3;
|
||||
exports.getProductIdsForBothIntervals = function(a0) {
|
||||
var r0;
|
||||
var object;
|
||||
var interval;
|
||||
var value = a0;
|
||||
var value3 = getPremiumBundledItemsFromProductId(value);
|
||||
var value4 = getToggledIntervalProduct(value);
|
||||
if (value4 == null) {
|
||||
r0 = {monthly: value, yearly: null};
|
||||
} else {
|
||||
object = {};
|
||||
interval = value3.interval;
|
||||
object.monthly = interval !== SubscriptionIntervalTypes.MONTH ? value4 : value;
|
||||
interval = value3.interval;
|
||||
object.yearly = interval !== SubscriptionIntervalTypes.YEAR ? value4 : value;
|
||||
r0 = object;
|
||||
}
|
||||
return r0;
|
||||
};
|
||||
exports.productsHaveSamePerks = productsHaveSamePerks;
|
||||
exports.isValidBundleProductId = closure4;
|
||||
exports.shouldAlwaysExcludeFromPlanSelect = shouldAlwaysExcludeFromPlanSelect;
|
||||
exports.getSubscriptionItemsForProduct = closure5;
|
||||
exports.makeExternalPaymentGatewayPlanIdOrThrow = closure6;
|
||||
exports.getProductIdFromSubscriptionItems = closure7;
|
||||
exports.getProductIdFromSubscription = getProductIdFromSubscription;
|
||||
}
|
||||
|
||||
function _createForOfIteratorHelperLoose_55676(a0, a1) { // fn#55676, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7205:190, offset: 0x013ade16, size: 370 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 _fun55677;
|
||||
}
|
||||
value = undefined;
|
||||
if (a0) {
|
||||
if (typeof a0 === 'string') {
|
||||
value = _arrayLikeToArray_55678(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_55678(a0, value);
|
||||
r6 = value;
|
||||
} else {
|
||||
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
|
||||
if (regexp.test(r9)) {
|
||||
value = _arrayLikeToArray_55678(a0, value);
|
||||
r6 = value;
|
||||
} else {
|
||||
r6 = value;
|
||||
}
|
||||
}
|
||||
r5 = r6;
|
||||
}
|
||||
} else {
|
||||
r5 = value;
|
||||
}
|
||||
if (r5) {
|
||||
if (r5) {
|
||||
}
|
||||
return _fun55677;
|
||||
}
|
||||
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 getPremiumBundleWithPredicate(a0) { // fn#55679, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7205:1100, offset: 0x013adf88, size: 65 bytes, params: 2, frame: 13
|
||||
const Object = global.Object;
|
||||
const values = Object.values;
|
||||
const AppStorePremiumProductIdsToPremiumBundledItems = (require(5143) /* metro dependency 5143: ProductIdsAndroid */).AppStorePremiumProductIdsToPremiumBundledItems;
|
||||
return Reflect.apply(values, Object, [AppStorePremiumProductIdsToPremiumBundledItems]).find(a0);
|
||||
}
|
||||
|
||||
function getPremiumBundledItemsFromProductId(a0) { // fn#55680, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7205:1228, offset: 0x013adfc9, size: 122 bytes, params: 2, frame: 15
|
||||
const AppStorePremiumProductIdsToPremiumBundledItems = (require(5143) /* metro dependency 5143: ProductIdsAndroid */).AppStorePremiumProductIdsToPremiumBundledItems;
|
||||
if (a0 in AppStorePremiumProductIdsToPremiumBundledItems) {
|
||||
return AppStorePremiumProductIdsToPremiumBundledItems[a0];
|
||||
}
|
||||
const Error = global.Error;
|
||||
const value = 'Invalid bundled product ID ' + a0;
|
||||
const value2 = Object.create(Error.prototype, {constructor: {value: Error}});
|
||||
const error = new Error();
|
||||
throw error instanceof Object ? error : value2;
|
||||
}
|
||||
|
||||
function getToggledIntervalProduct(a0) { // fn#55681, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7205:1460, offset: 0x013ae043, size: 81 bytes, params: 2, frame: 15
|
||||
var r0;
|
||||
var premiumBundleWithPredicate;
|
||||
const getPremiumBundledItemsFromProductIdBinding = getPremiumBundledItemsFromProductId;
|
||||
const value2 = undefined;
|
||||
const premiumTier = getPremiumBundledItemsFromProductIdBinding(a0).premiumTier;
|
||||
const TIER_1 = PremiumTypes.TIER_1;
|
||||
const value4 = null;
|
||||
if (premiumTier === TIER_1) {
|
||||
r0 = value4;
|
||||
} else {
|
||||
premiumBundleWithPredicate = getPremiumBundleWithPredicate(_fun55682);
|
||||
r0 = value4 == premiumBundleWithPredicate ? value2 : premiumBundleWithPredicate.productId;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function isValidBundleProductId(a0) { // fn#55683, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7205:1758, offset: 0x013ae0ea, size: 49 bytes, params: 2, frame: 13
|
||||
return a0 != null && a0 in (require(5143) /* metro dependency 5143: ProductIdsAndroid */).AppStorePremiumProductIdsToPremiumBundledItems;
|
||||
}
|
||||
|
||||
function getSubscriptionItemsForProduct(a0) { // fn#55684, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7205:1870, offset: 0x013ae11b, size: 219 bytes, params: 2, frame: 16
|
||||
var r2;
|
||||
var premiumBundledItemsFromProductId;
|
||||
var items2;
|
||||
var basePlanId;
|
||||
var push;
|
||||
var value4;
|
||||
var done;
|
||||
var value5;
|
||||
var planId;
|
||||
var quantity;
|
||||
var value6;
|
||||
var value;
|
||||
if (isValidBundleProductId(a0)) {
|
||||
premiumBundledItemsFromProductId = getPremiumBundledItemsFromProductId(a0);
|
||||
items2 = [];
|
||||
basePlanId = premiumBundledItemsFromProductId.basePlanId;
|
||||
reducibleJoin4: while (true) {
|
||||
if (basePlanId === SubscriptionPlans.NONE_MONTH) {
|
||||
break reducibleJoin4;
|
||||
}
|
||||
push = items2.push;
|
||||
basePlanId = premiumBundledItemsFromProductId.basePlanId;
|
||||
Reflect.apply(push, items2, [{planId: basePlanId, quantity: 1}]);
|
||||
break reducibleJoin4;
|
||||
}
|
||||
value = _createForOfIteratorHelperLoose_55676(premiumBundledItemsFromProductId.additionalPlans);
|
||||
value4 = value();
|
||||
done = value4.done;
|
||||
if (!done) {
|
||||
r2 = value4;
|
||||
reducibleLoop5: while (true) {
|
||||
value5 = r2.value;
|
||||
push = items2.push;
|
||||
planId = value5.planId;
|
||||
quantity = value5.quantity;
|
||||
Reflect.apply(push, items2, [{planId: planId, quantity: quantity}]);
|
||||
value6 = value();
|
||||
done = value6.done;
|
||||
if (done) {
|
||||
break reducibleLoop5;
|
||||
}
|
||||
r2 = value6;
|
||||
continue reducibleLoop5;
|
||||
}
|
||||
}
|
||||
return items2;
|
||||
}
|
||||
const Error = global.Error;
|
||||
value = 'Invalid product ' + a0;
|
||||
const value2 = Object.create(Error.prototype, {constructor: {value: Error}});
|
||||
const error = new Error();
|
||||
throw error instanceof Object ? error : value2;
|
||||
}
|
||||
|
||||
function makeExternalPaymentGatewayPlanIdOrThrow(a0) { // fn#55685, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7205:2251, offset: 0x013ae1f6, size: 140 bytes, params: 2, frame: 13
|
||||
if (a0 == null) {
|
||||
throw new global.Error('Invalid null plan ID');
|
||||
}
|
||||
if (isValidBundleProductId(a0)) {
|
||||
return a0;
|
||||
}
|
||||
const value2 = a0 + '.1';
|
||||
if (isValidBundleProductId(value2)) {
|
||||
return value2;
|
||||
}
|
||||
const Error = global.Error;
|
||||
const value = 'Invalid plan ID ' + a0;
|
||||
const value3 = Object.create(Error.prototype, {constructor: {value: Error}});
|
||||
const error = new Error();
|
||||
throw error instanceof Object ? error : value3;
|
||||
}
|
||||
|
||||
function aggregateQuantitiesByPlanId(a0) { // fn#55686, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7205:2483, offset: 0x013ae282, size: 130 bytes, params: 2, frame: 21
|
||||
var r2;
|
||||
var r1;
|
||||
var value5;
|
||||
var planId;
|
||||
var quantity;
|
||||
var set;
|
||||
var value6;
|
||||
var value7;
|
||||
var value8;
|
||||
const Map = global.Map;
|
||||
const map = new Map();
|
||||
const value3 = _createForOfIteratorHelperLoose_55676(a0);
|
||||
const value4 = value3();
|
||||
let done = value4.done;
|
||||
if (!done) {
|
||||
r2 = value4;
|
||||
while (true) {
|
||||
value5 = r2.value;
|
||||
planId = value5.planId;
|
||||
quantity = value5.quantity;
|
||||
set = map.set;
|
||||
value6 = map.get(planId);
|
||||
value7 = 0;
|
||||
r1 = value6 ?? value7;
|
||||
Reflect.apply(set, map, [planId, r1 + quantity]);
|
||||
value8 = value3();
|
||||
done = value8.done;
|
||||
if (done) {
|
||||
break;
|
||||
}
|
||||
r2 = value8;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
function planQuantityMapsEqual(a0, a1) { // fn#55687, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7205:2681, offset: 0x013ae304, size: 120 bytes, params: 3, frame: 20
|
||||
var value4;
|
||||
var value5;
|
||||
var property;
|
||||
var property2;
|
||||
var get;
|
||||
var value6;
|
||||
if (a0.size === a1.size) {
|
||||
var value2 = _createForOfIteratorHelperLoose_55676(a0);
|
||||
var value3 = value2();
|
||||
var done = value3.done;
|
||||
if (done) {
|
||||
return true;
|
||||
}
|
||||
var r1 = value3;
|
||||
loopExit2: while (true) {
|
||||
value4 = r1.value;
|
||||
value5 = env0_2(value4, 2);
|
||||
property = value5[0];
|
||||
property2 = value5[1];
|
||||
get = a1.get;
|
||||
if (Reflect.apply(get, a1, [property]) !== property2) {
|
||||
break loopExit2;
|
||||
}
|
||||
value6 = value2();
|
||||
done = value6.done;
|
||||
if (done) {
|
||||
return true;
|
||||
}
|
||||
r1 = value6;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function getProductIdFromSubscriptionItems(a0) { // fn#55688, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7205:2879, offset: 0x013ae37c, size: 158 bytes, params: 2, frame: 19
|
||||
var r3;
|
||||
var property;
|
||||
var value5;
|
||||
const value2 = aggregateQuantitiesByPlanId(a0);
|
||||
const Object = global.Object;
|
||||
const keys = Object.keys;
|
||||
const AppStorePremiumProductIdsToPremiumBundledItems = (require(5143) /* metro dependency 5143: ProductIdsAndroid */).AppStorePremiumProductIdsToPremiumBundledItems;
|
||||
const value3 = Reflect.apply(keys, Object, [AppStorePremiumProductIdsToPremiumBundledItems]);
|
||||
let length = value3.length;
|
||||
const value4 = 0;
|
||||
if (value4 < length) {
|
||||
r3 = value4;
|
||||
loopExit1: while (true) {
|
||||
property = value3[r3];
|
||||
if (planQuantityMapsEqual(value2, aggregateQuantitiesByPlanId(getSubscriptionItemsForProduct(property)))) {
|
||||
return property;
|
||||
}
|
||||
value5 = typeof r3 === 'bigint' ? r3 + 1n : +r3 + 1;
|
||||
length = value3.length;
|
||||
if (value5 < length) {
|
||||
r3 = value5;
|
||||
continue;
|
||||
}
|
||||
break loopExit1;
|
||||
}
|
||||
}
|
||||
const Error = global.Error;
|
||||
throw new Error('No App Store bundled product matches the subscription items');
|
||||
}
|
||||
|
||||
function getPremiumBundlesWithPredicate(a0) { // fn#55689, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7205:3367, offset: 0x013ae41a, size: 64 bytes, params: 2, frame: 13
|
||||
const Object = global.Object;
|
||||
const values = Object.values;
|
||||
const AppStorePremiumProductIdsToPremiumBundledItems = (require(5143) /* metro dependency 5143: ProductIdsAndroid */).AppStorePremiumProductIdsToPremiumBundledItems;
|
||||
return Reflect.apply(values, Object, [AppStorePremiumProductIdsToPremiumBundledItems]).filter(a0);
|
||||
}
|
||||
|
||||
function productsHaveSamePerks(a0, a1) { // fn#55691, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7205:3974, offset: 0x013ae4ca, size: 116 bytes, params: 3, frame: 14
|
||||
var getPremiumBundledItemsFromProductIdBinding;
|
||||
var premiumBundledItemsFromProductIdBinding;
|
||||
var premiumBundledItemsFromProductIdBinding2;
|
||||
if (isValidBundleProductId(a0)) {
|
||||
if (isValidBundleProductId(a1)) {
|
||||
if (a0 == null) {
|
||||
return a0 === a1;
|
||||
}
|
||||
if (a1 == null) {
|
||||
return a0 === a1;
|
||||
}
|
||||
if (a0 === a1) {
|
||||
return true;
|
||||
}
|
||||
getPremiumBundledItemsFromProductIdBinding = getPremiumBundledItemsFromProductId;
|
||||
premiumBundledItemsFromProductIdBinding2 = getPremiumBundledItemsFromProductIdBinding(a0);
|
||||
premiumBundledItemsFromProductIdBinding = getPremiumBundledItemsFromProductIdBinding(a1);
|
||||
return premiumBundledItemsFromProductIdBinding2.numPremiumGuild === premiumBundledItemsFromProductIdBinding.numPremiumGuild && premiumBundledItemsFromProductIdBinding2.premiumTier === premiumBundledItemsFromProductIdBinding.premiumTier;
|
||||
}
|
||||
}
|
||||
return a0 === a1;
|
||||
}
|
||||
|
||||
function shouldAlwaysExcludeFromPlanSelect(a0) { // fn#55692, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7205:4381, offset: 0x013ae53e, size: 37 bytes, params: 2, frame: 3
|
||||
return a0.isDeprecated || a0.interval === SubscriptionIntervalTypes.YEAR;
|
||||
}
|
||||
|
||||
function getProductIdFromSubscription(a0, a1) { // fn#55693, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7205:4722, offset: 0x013ae563, size: 127 bytes, params: 3, frame: 15
|
||||
var r2;
|
||||
var getProductIdFromSubscriptionItemsBinding;
|
||||
const isACOM = a0.isACOM;
|
||||
const value = null;
|
||||
if (isACOM) {
|
||||
r2 = a1 ? value == a0.renewalMutations ? undefined : a0.renewalMutations.items : value;
|
||||
getProductIdFromSubscriptionItemsBinding = getProductIdFromSubscriptionItems;
|
||||
r2 = value == r2 ? a0.items : r2;
|
||||
return getProductIdFromSubscriptionItemsBinding(r2);
|
||||
}
|
||||
let r5 = a1 ? value == a0.renewalMutations ? undefined : a0.renewalMutations.paymentGatewayPlanId : value;
|
||||
const makeExternalPaymentGatewayPlanIdOrThrowBinding = makeExternalPaymentGatewayPlanIdOrThrow;
|
||||
r5 = value == r5 ? a0.paymentGatewayPlanId : r5;
|
||||
return makeExternalPaymentGatewayPlanIdOrThrowBinding(r5);
|
||||
}
|
||||
|
||||
function _fun55682(a0) { // fn#55682, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7205:1622, offset: 0x013ae094, size: 86 bytes, params: 2, frame: 5
|
||||
return a0.numPremiumGuild === env0_0.numPremiumGuild && a0.premiumTier === env0_0.premiumTier && a0.interval !== env0_0.interval && !a0.isDeprecated;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,266 @@
|
||||
/* Metro module 7562; source: modules/premium/native/PremiumPerkCard.tsx; dependencies: [31, 27, 1880, 661, 33, 4584, 7563, 4136, 7007, 6789, 1244, 7564, 7565, 7566, 7567, 7568, 7569, 7570, 7571, 7572, 7573, 7574, 7575, 7576, 7577, 7578, 7579, 4501, 697, 5475, 4573, 7580, 4578, 2] */
|
||||
function _fun60795(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#60795, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7740:6, offset: 0x0170f178, size: 590 bytes, params: 8, frame: 23
|
||||
const env0_0 = require;
|
||||
const closure = usePerkCardHeight;
|
||||
let 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.View;
|
||||
const env0_5 = value.ScrollView;
|
||||
const env0_6 = (require(1880) /* metro dependency 1880: PremiumConstants */).MAX_PREMIUM_TIER_2_ATTACHMENT_SIZE;
|
||||
const env0_7 = (require(661) /* metro dependency 661: Constants */).UserSettingsSections;
|
||||
value = require(33) /* metro dependency 33 */;
|
||||
const env0_8 = value.jsx;
|
||||
const env0_9 = value.jsxs;
|
||||
const object = {NARROW: 0};
|
||||
object[0] = 'NARROW';
|
||||
object.WIDE = 1;
|
||||
object[1] = 'WIDE';
|
||||
Object = global.Object;
|
||||
const freeze = Object.freeze;
|
||||
const NARROW = object.NARROW;
|
||||
const WIDE = object.WIDE;
|
||||
value = Reflect.apply(freeze, Object, [{[NARROW]: {'width': 300, 'height': 364, 'scaledFontHeight': 440},
|
||||
[WIDE]: {'width': 320, 'height': 364, 'scaledFontHeight': 440}}]);
|
||||
const env0_12 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(_fun60797);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/premium/native/PremiumPerkCard.tsx');
|
||||
exports.default = PremiumPerkCard;
|
||||
exports.PerkCardTypes = {CUSTOM_PROFILE: 'customProfile', CLIENT_THEMES: 'clientThemes',
|
||||
SERVER_BOOSTS: 'serverBoosts', GREYED_SERVER_BOOSTS: 'greyServerBoosts', CUSTOM_APP_ICONS: 'customAppIcons',
|
||||
EMOJI: 'emoji', CUSTOM_SOUNDS: 'customSounds', STICKER: 'sticker', EARLY_ACCESS: 'earlyAccess',
|
||||
MEMBER_PRICING: 'memberPricing', LARGE_UPLOADS: 'largeUploads', HD_VIDEO: 'hdVideo',
|
||||
SUPER_REACTIONS: 'superReactions', ENTRACE_SOUNDS: 'entranceSounds', BADGE: 'badge', GREYED_BADGE: 'greyBadge'};
|
||||
exports.PerkCardVariant = object;
|
||||
exports.PERK_CARD_SIZES = value;
|
||||
exports.usePerkCardHeight = closure;
|
||||
exports.usePremiumPerkCard = usePremiumPerkCard;
|
||||
}
|
||||
|
||||
function usePerkCardHeight(a0) { // fn#60796, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7740:934, offset: 0x0170f3c6, size: 68 bytes, params: 2, frame: 12
|
||||
const value2 = (require(4584) /* metro dependency 4584: useFontScale */).useFontScale();
|
||||
const property = env0_11[a0];
|
||||
return value2 > 1 ? property.scaledFontHeight : property.height;
|
||||
}
|
||||
|
||||
function _fun60797(a0) { // fn#60797, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7740:1068, offset: 0x0170f40a, size: 529 bytes, params: 2, frame: 19
|
||||
const object6 = {};
|
||||
const object7 = {};
|
||||
const BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
|
||||
object7.backgroundColor = BACKGROUND_SURFACE_HIGH;
|
||||
let sm = (importDefault(697) /* metro dependency 697: native */).radii.sm;
|
||||
object7.borderRadius = sm;
|
||||
object7.width = env0_11[a0].width;
|
||||
const SHADOW_LOW = (importDefault(697) /* metro dependency 697: native */).shadows.SHADOW_LOW;
|
||||
copyDataProperties(object7, SHADOW_LOW, undefined);
|
||||
object6.container = object7;
|
||||
const object9 = {width: '100%'};
|
||||
object9.borderTopLeftRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
|
||||
object9.borderTopRightRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
|
||||
object9.overflow = 'hidden';
|
||||
object6.headerComponent = object9;
|
||||
const object10 = {width: '100%'};
|
||||
sm = (importDefault(697) /* metro dependency 697: native */).radii.sm;
|
||||
object10.borderTopLeftRadius = sm;
|
||||
object10.borderTopRightRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
|
||||
object6.image = object10;
|
||||
object6.title = {'marginTop': 16, 'marginHorizontal': 16};
|
||||
const object11 = {'marginTop': 8, 'marginHorizontal': 16};
|
||||
const value2 = 8;
|
||||
const WIDE = env0_10.WIDE;
|
||||
object11.marginBottom = a0 !== WIDE ? value2 : 24;
|
||||
const NARROW = env0_10.NARROW;
|
||||
copyDataProperties(object11, a0 === NARROW && ({height: '100%'}), sm);
|
||||
object6.description = object11;
|
||||
object6.button = {'marginTop': 'auto', 'marginHorizontal': 16, 'marginBottom': 16};
|
||||
object6.imageContainer = {'position': 'relative', 'alignItems': 'center', 'justifyContent': 'center'};
|
||||
const WHITE = (importDefault(697) /* metro dependency 697: native */).colors.WHITE;
|
||||
object6.imageOverlayText = {color: WHITE, fontSize: 14};
|
||||
const object12 = {'position': 'absolute', 'bottom': '10%', 'borderRadius': null, 'backgroundColor': null,
|
||||
'paddingHorizontal': 12, 'paddingVertical': 4, 'justifyContent': 'center', 'alignItems': 'center'};
|
||||
object12.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
|
||||
const BACKGROUND_MOD_STRONG = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_STRONG;
|
||||
object12.backgroundColor = BACKGROUND_MOD_STRONG;
|
||||
object6.imageOverlayTextContainer = object12;
|
||||
object6.pillTextContainer = {'position': 'absolute', 'width': 'auto', 'top': -8, 'left': 10};
|
||||
return object6;
|
||||
}
|
||||
|
||||
function PremiumPerkCard({style, title, titleStyle, description, bodyComponent, headerComponent, imageSrc, buttonOnPress, cta, variant = env0_10.WIDE, imageOverlayText, pillText}) { // fn#60798, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7740:2186, offset: 0x0170f61b, size: 881 bytes, params: 2, frame: 35
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
var r12;
|
||||
var intl;
|
||||
if (cta !== undefined) {
|
||||
r12 = cta;
|
||||
} else {
|
||||
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
r12 = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.jVcuVY);
|
||||
}
|
||||
const styles = useStyles(variant);
|
||||
let NARROW = env0_10.NARROW;
|
||||
const value2 = usePerkCardHeight(NARROW);
|
||||
const r6 = imageSrc != null ? imageOverlayText != null ? <View style={styles.imageContainer}>{((Component) => <Component style={styles.image} source={imageSrc} />)(importDefault(5475) /* metro dependency 5475: FastImage */)}<View style={styles.imageOverlayTextContainer}><Text style={styles.imageOverlayText} variant="text-md/bold">{imageOverlayText.toUpperCase()}</Text></View></View> : ((Component) => <Component style={styles.image} source={imageSrc} />)(importDefault(5475) /* metro dependency 5475: FastImage */) : headerComponent != null ? <View style={styles.headerComponent}>{headerComponent}</View> : null;
|
||||
const r13 = description != null ? <Text variant="text-sm/normal">{description}</Text> : bodyComponent ?? null;
|
||||
const items2 = [styles.container];
|
||||
NARROW = env0_10.NARROW;
|
||||
items2[1] = variant === NARROW && ({height: value2});
|
||||
items2[2] = style;
|
||||
const items3 = [pillText != null && ((Component) => <Component pillText={pillText} style={styles.pillTextContainer} />)(importDefault(7580) /* metro dependency 7580: PillText */),
|
||||
r6];
|
||||
items3[2] = <Text style={[styles.title,
|
||||
titleStyle]} variant="heading-lg/extrabold" accessibilityRole="header">{title}</Text>;
|
||||
items3[3] = <ScrollView style={styles.description}>{r13}</ScrollView>;
|
||||
items3[4] = buttonOnPress != null && <View style={styles.button}>{((Button) => <Button size="sm" variant="secondary" text={r12} onPress={buttonOnPress} />)((require(4578) /* metro dependency 4578: ButtonNative */).Button)}</View>;
|
||||
return (
|
||||
<View style={items2}>
|
||||
{items3}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function usePremiumPerkCard() { // fn#60799, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7740:3384, offset: 0x0170f98c, size: 2312 bytes, params: 1, frame: 25
|
||||
var object13;
|
||||
const value2 = (require(7563) /* metro dependency 7563: useSubscriptionPlansLoaded */).useSubscriptionPlansLoaded();
|
||||
const fileSizeUtilsModule = require(4136) /* metro dependency 4136: FileSizeUtils */;
|
||||
const value4 = fileSizeUtilsModule.formatSize(MAX_PREMIUM_TIER_2_ATTACHMENT_SIZE / 1024, {useKibibytes: true});
|
||||
const binding = env0_3;
|
||||
const value5 = binding.useCallback(function() {
|
||||
var moduleValue = require(dependencyMap[8]);
|
||||
var object = {};
|
||||
object.screen = UserSettingsSections.COLLECTIBLES_SHOP;
|
||||
var object2 = {};
|
||||
object2.analyticsSource = importDefault(dependencyMap[9]).PREMIUM_MARKETING_PERK_CARD;
|
||||
object.params = object2;
|
||||
moduleValue.openUserSettings(object);
|
||||
}, []);
|
||||
const value6 = binding.useCallback(function() {
|
||||
require(dependencyMap[8]).openUserSettings({screen: UserSettingsSections.PROFILE_CUSTOMIZATION});
|
||||
}, []);
|
||||
const value7 = binding.useCallback(function() {
|
||||
require(dependencyMap[8]).openUserSettings({screen: UserSettingsSections.APPEARANCE_THEME_PICKER});
|
||||
}, []);
|
||||
const value8 = binding.useCallback(_fun60803, [value2]);
|
||||
const value9 = binding.useCallback(function() {
|
||||
require(dependencyMap[8]).openUserSettings({screen: UserSettingsSections.APP_ICONS});
|
||||
}, []);
|
||||
object13 = {};
|
||||
const object14 = {};
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
let string = intl.string;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
const KcyDwF = t.KcyDwF;
|
||||
object14.title = Reflect.apply(string, intl, [KcyDwF]);
|
||||
string = intl.string;
|
||||
const Mt3U1W = t.Mt3U1W;
|
||||
object14.description = Reflect.apply(string, intl, [Mt3U1W]);
|
||||
object14.imageSrc = importDefault(7564) /* metro dependency 7564 */;
|
||||
object14.buttonOnPress = value6;
|
||||
object13.customProfile = object14;
|
||||
const object20 = {};
|
||||
object20.title = intl.string(t.kWM48G);
|
||||
string = intl.string;
|
||||
const CjRASJ = t.CjRASJ;
|
||||
object20.description = Reflect.apply(string, intl, [CjRASJ]);
|
||||
object20.imageSrc = importDefault(7565) /* metro dependency 7565 */;
|
||||
object20.buttonOnPress = value7;
|
||||
object13.clientThemes = object20;
|
||||
const object21 = {};
|
||||
object21.title = intl.string(t['NyDu/6']);
|
||||
object21.description = intl.string(t['4pEwXL']);
|
||||
object21.imageSrc = importDefault(7566) /* metro dependency 7566 */;
|
||||
object21.buttonOnPress = value8;
|
||||
object13.serverBoosts = object21;
|
||||
const object22 = {};
|
||||
object22.title = intl.string(t['NyDu/6']);
|
||||
object22.description = intl.string(t['4pEwXL']);
|
||||
object22.imageSrc = importDefault(7567) /* metro dependency 7567 */;
|
||||
object22.imageOverlayText = intl.string(t['/VzCKE']);
|
||||
object13.greyServerBoosts = object22;
|
||||
const object23 = {};
|
||||
string = intl.string;
|
||||
const OuItFi = t.OuItFi;
|
||||
object23.title = Reflect.apply(string, intl, [OuItFi]);
|
||||
object23.description = intl.string(t.mPyrE6);
|
||||
object23.imageSrc = importDefault(7568) /* metro dependency 7568 */;
|
||||
object23.buttonOnPress = value9;
|
||||
object13.customAppIcons = object23;
|
||||
const object24 = {};
|
||||
object24.title = intl.string(t['R2IV/Q']);
|
||||
string = intl.string;
|
||||
const R5Xag2 = t.R5Xag2;
|
||||
object24.description = Reflect.apply(string, intl, [R5Xag2]);
|
||||
object24.imageSrc = importDefault(7569) /* metro dependency 7569 */;
|
||||
object13.emoji = object24;
|
||||
const object25 = {};
|
||||
string = intl.string;
|
||||
const LWsArT = t.LWsArT;
|
||||
object25.title = Reflect.apply(string, intl, [LWsArT]);
|
||||
object25.description = intl.string(t['4lSyCY']);
|
||||
object25.imageSrc = importDefault(7570) /* metro dependency 7570 */;
|
||||
object13.customSounds = object25;
|
||||
const object26 = {};
|
||||
object26.title = intl.string(t.tzdIwI);
|
||||
object26.description = intl.string(t.hJG8ZN);
|
||||
object26.imageSrc = importDefault(7571) /* metro dependency 7571 */;
|
||||
object13.sticker = object26;
|
||||
const object27 = {};
|
||||
string = intl.string;
|
||||
const EYxi0o = t.EYxi0o;
|
||||
object27.title = Reflect.apply(string, intl, [EYxi0o]);
|
||||
string = intl.string;
|
||||
const M9AIt1 = t.M9AIt1;
|
||||
object27.description = Reflect.apply(string, intl, [M9AIt1]);
|
||||
object27.imageSrc = importDefault(7572) /* metro dependency 7572 */;
|
||||
object13.earlyAccess = object27;
|
||||
const object28 = {};
|
||||
object28.title = intl.string(t['H4/NBN']);
|
||||
object28.description = intl.string(t.wo3D3T);
|
||||
object28.imageSrc = importDefault(7573) /* metro dependency 7573 */;
|
||||
object28.buttonOnPress = value5;
|
||||
object13.memberPricing = object28;
|
||||
const object29 = {};
|
||||
object29.title = intl.formatToPlainString(t.jqhAdL, {premiumMaxSize: value4});
|
||||
object29.description = intl.formatToPlainString(t['HI+cfm'], {premiumMaxSize: value4});
|
||||
object29.imageSrc = importDefault(7574) /* metro dependency 7574 */;
|
||||
object13.largeUploads = object29;
|
||||
const object30 = {};
|
||||
string = intl.string;
|
||||
const RSXQYO = t.RSXQYO;
|
||||
object30.title = Reflect.apply(string, intl, [RSXQYO]);
|
||||
object30.description = intl.string(t.ymCPxp);
|
||||
object30.imageSrc = importDefault(7575) /* metro dependency 7575 */;
|
||||
object13.hdVideo = object30;
|
||||
const object31 = {};
|
||||
object31.title = intl.string(t['6S7kO7']);
|
||||
string = intl.string;
|
||||
const A0U9fk = t.A0U9fk;
|
||||
object31.description = Reflect.apply(string, intl, [A0U9fk]);
|
||||
object31.imageSrc = importDefault(7576) /* metro dependency 7576 */;
|
||||
object13.superReactions = object31;
|
||||
const object32 = {};
|
||||
object32.title = intl.string(t['f4M+H9']);
|
||||
object32.description = intl.string(t['7ZCYvC']);
|
||||
object32.imageSrc = importDefault(7577) /* metro dependency 7577 */;
|
||||
object13.entranceSounds = object32;
|
||||
const object33 = {};
|
||||
object33.title = intl.string(t.dcFfSJ);
|
||||
object33.description = intl.string(t['37MFFq']);
|
||||
object33.imageSrc = importDefault(7578) /* metro dependency 7578 */;
|
||||
object13.badge = object33;
|
||||
const object34 = {};
|
||||
object34.title = intl.string(t.dcFfSJ);
|
||||
object34.description = intl.string(t['37MFFq']);
|
||||
object34.imageSrc = importDefault(7579) /* metro dependency 7579 */;
|
||||
object34.imageOverlayText = intl.string(t['/VzCKE']);
|
||||
object13.greyBadge = object34;
|
||||
return object13;
|
||||
}
|
||||
|
||||
function _fun60803() { // fn#60803, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7740:3841, offset: 0x0171035b, size: 77 bytes, params: 1, frame: 14
|
||||
const openUserSettingsModule = require(7007) /* metro dependency 7007: openUserSettings */;
|
||||
const openUserSettings = openUserSettingsModule.openUserSettings;
|
||||
const GUILD_BOOSTING = UserSettingsSections.GUILD_BOOSTING;
|
||||
Reflect.apply(openUserSettings, openUserSettingsModule, [{screen: GUILD_BOOSTING,
|
||||
params: {shouldFetchSubscriptionPlans: !env0_0}}]);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,68 @@
|
||||
/* Metro module 12186; source: modules/premium/native/PremiumPerkCarousel.tsx; dependencies: [57, 31, 27, 33, 4501, 7562, 4573, 7939, 1305, 2] */
|
||||
function _fun93367(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#93367, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12372:6, offset: 0x020b13bd, size: 288 bytes, params: 8, frame: 21
|
||||
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 value = require(33) /* metro dependency 33 */;
|
||||
const env0_6 = value.jsx;
|
||||
const env0_7 = value.jsxs;
|
||||
const env0_8 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({title: {marginLeft: 24},
|
||||
indicators: {marginBottom: -36}, carousel: {marginTop: 16}, carouselCard: {marginLeft: 8},
|
||||
lastCarouselCard: {marginRight: 8}});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/premium/native/PremiumPerkCarousel.tsx');
|
||||
exports.default = PremiumPerkCarousel;
|
||||
}
|
||||
|
||||
function PremiumPerkCarousel({title, perks, style, onItemChange}) { // fn#93368, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12372:411, offset: 0x020b14dd, size: 518 bytes, params: 2, frame: 29
|
||||
const styles = useStyles();
|
||||
const premiumPerkCardModule = require(7562) /* metro dependency 7562: PremiumPerkCard */;
|
||||
const usePerkCardHeight = premiumPerkCardModule.usePerkCardHeight;
|
||||
const PerkCardVariant = premiumPerkCardModule.PerkCardVariant;
|
||||
let NARROW = PerkCardVariant.NARROW;
|
||||
const value2 = Reflect.apply(usePerkCardHeight, premiumPerkCardModule, [NARROW]);
|
||||
const binding = env0_4;
|
||||
const [property, env0_3] = env0_3Binding(binding.useState(0), 2);
|
||||
const value5 = binding.useCallback(_fun93369, [property, onItemChange]);
|
||||
const PERK_CARD_SIZES = premiumPerkCardModule.PERK_CARD_SIZES;
|
||||
NARROW = PerkCardVariant.NARROW;
|
||||
const width = PERK_CARD_SIZES[NARROW].width;
|
||||
var env0_4 = perks.length;
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
const items2 = [<Text style={styles.title} variant="heading-xl/extrabold" color="mobile-text-heading-primary">{title}</Text>];
|
||||
items2[1] = ((Component) => <Component style={[styles.carousel,
|
||||
{height: value2 + 8}]} width={width} onPageChange={value5} pageIndictor={false} scrollViewProps={{'overScrollMode': 'always',
|
||||
'snapToInterval': null, 'snapToStart': true, 'snapToAlignment': 'start', 'decelerationRate': 'normal',
|
||||
snapToInterval: width + 8 + 0.2}}>{perks.map(_fun93370)}</Component>)(importDefault(7939) /* metro dependency 7939: Carousel */);
|
||||
const CarouselPagination = (require(1305) /* metro dependency 1305: native */).CarouselPagination;
|
||||
items2[2] = <CarouselPagination containerStyle={styles.indicators} numberOfItems={perks.length} currentIndex={property} />;
|
||||
return (
|
||||
<View style={style}>
|
||||
{items2}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun93369(a0) { // fn#93369, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12372:608, offset: 0x020b16e3, size: 48 bytes, params: 2, frame: 13
|
||||
if (a0 !== env0_2) {
|
||||
env0_3(a0);
|
||||
if (onItemChange != null) {
|
||||
onItemChange(a0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function _fun93370(a0, a1) { // fn#93370, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12372:1091, offset: 0x020b1713, size: 148 bytes, params: 3, frame: 20
|
||||
const items2 = [styles.carouselCard];
|
||||
items2[1] = length - 1 !== a1 ? null : styles.lastCarouselCard;
|
||||
const PremiumPerkCard = importDefault(7562) /* metro dependency 7562: PremiumPerkCard */;
|
||||
const defaultImportProps = {...a0};
|
||||
const PerkCardVariant = (require(7562) /* metro dependency 7562: PremiumPerkCard */).PerkCardVariant;
|
||||
const NARROW = PerkCardVariant.NARROW;
|
||||
defaultImportProps['variant'] = NARROW;
|
||||
defaultImportProps['style'] = items2;
|
||||
return <PremiumPerkCard {...defaultImportProps} key={a1} />;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,75 @@
|
||||
/* Metro module 7046; source: modules/premium/native/PremiumPlanActionSheetHeader.tsx; dependencies: [31, 27, 1880, 7047, 33, 4501, 7048, 7049, 3802, 4589, 676, 5475, 7050, 7051, 7052, 7053, 7250, 7251, 7252, 2] */
|
||||
function _fun55950(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#55950, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7224:6, offset: 0x013b90db, size: 361 bytes, params: 8, frame: 22
|
||||
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(1880) /* metro dependency 1880: PremiumConstants */;
|
||||
const env0_4 = value.PremiumTypes;
|
||||
const env0_5 = value.SubscriptionIntervalTypes;
|
||||
const env0_6 = (require(7047) /* metro dependency 7047: ColorConstants */).getPremiumGradientColor;
|
||||
value = require(33) /* metro dependency 33 */;
|
||||
const env0_7 = value.jsx;
|
||||
const env0_8 = value.jsxs;
|
||||
const env0_9 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({header: {'height': 112,
|
||||
'justifyContent': 'center', 'alignItems': 'center'}, logoContainer: {'position': 'absolute', 'top': 16,
|
||||
'left': 16}, imgWumpus: {'position': 'absolute', 'height': 90}, imgWumpusRight: {transform: [{scaleX: -1}]},
|
||||
imgWumpusBottom: {bottom: 0}, discountPill: {marginTop: 10}});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/premium/native/PremiumPlanActionSheetHeader.tsx');
|
||||
exports.default = _default_55951;
|
||||
}
|
||||
|
||||
function _default_55951({premiumType, trialOffer, discountOffer}) { // fn#55951, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7224:525, offset: 0x013b9244, size: 980 bytes, params: 2, frame: 34
|
||||
var sku_id;
|
||||
var r17;
|
||||
var defaultImport;
|
||||
const styles = useStyles();
|
||||
const closure = function() {
|
||||
var premiumTypeBinding = premiumType;
|
||||
if (PremiumTypes.TIER_0 === premiumTypeBinding) {
|
||||
return importDefault(dependencyMap[6]);
|
||||
}
|
||||
if (PremiumTypes.TIER_1 === premiumTypeBinding) {
|
||||
return null;
|
||||
}
|
||||
if (PremiumTypes.TIER_2 === premiumTypeBinding) {
|
||||
return importDefault(dependencyMap[7]);
|
||||
}
|
||||
};
|
||||
const value4 = trialOffer != null;
|
||||
if (value4) {
|
||||
sku_id = trialOffer.subscription_trial?.sku_id;
|
||||
defaultImport = importDefault(3802) /* metro dependency 3802: PremiumUtils */;
|
||||
r17 = sku_id === defaultImport.getSkuIdForPremiumType(premiumType);
|
||||
} else {
|
||||
r17 = value4;
|
||||
}
|
||||
const premiumUtilsModule = require(3802) /* metro dependency 3802: PremiumUtils */;
|
||||
const getPlanIdForPremiumType = premiumUtilsModule.getPlanIdForPremiumType;
|
||||
const MONTH = SubscriptionIntervalTypes.MONTH;
|
||||
const r15 = discountOffer != null && (discountOffer.discount == null ? undefined : discountOffer.discount.planIds.includes(Reflect.apply(getPlanIdForPremiumType,
|
||||
premiumUtilsModule, [premiumType, MONTH])));
|
||||
const defaultImport2 = importDefault(4589) /* metro dependency 4589 */;
|
||||
const defaultImport2Props = {style: styles.header, colors: getPremiumGradientColor(premiumType)};
|
||||
const HorizontalGradient = (require(676) /* metro dependency 676: ConstantsIOS */).HorizontalGradient;
|
||||
const START = HorizontalGradient.START;
|
||||
defaultImport2Props.start = START;
|
||||
const END = HorizontalGradient.END;
|
||||
defaultImport2Props.end = END;
|
||||
defaultImport2Props.accessible = true;
|
||||
defaultImport2Props.accessibilityRole = 'header';
|
||||
defaultImport2Props.accessibilityLabel = premiumUtilsModule.getPremiumTypeDisplayName(premiumType);
|
||||
const items2 = [closure() && ((Component) => <Component source={closure()} />)(importDefault(5475) /* metro dependency 5475: FastImage */)];
|
||||
const FastImage = importDefault(5475) /* metro dependency 5475: FastImage */;
|
||||
let TIER_0 = PremiumTypes.TIER_0;
|
||||
items2[1] = <View style={styles.logoContainer}><FastImage source={TIER_0 === premiumType ? importDefault(7050) /* metro dependency 7050 */ : PremiumTypes.TIER_1 === premiumType ? importDefault(7051) /* metro dependency 7051 */ : PremiumTypes.TIER_2 !== premiumType ? undefined : importDefault(7052) /* metro dependency 7052 */} resizeMode="contain" />{r17 ? ((PremiumPill) => <PremiumPill style={styles.discountPill} trialOffer={trialOffer} premiumType={premiumType} useWhiteBackground hideTrialCountdown />)((require(7053) /* metro dependency 7053: PremiumPill */).PremiumPill) : null}{r15 ? ((PremiumPill) => <PremiumPill style={styles.discountPill} discountOffer={discountOffer} premiumType={premiumType} shouldShowDiscountUpsell useWhiteBackground />)((require(7053) /* metro dependency 7053: PremiumPill */).PremiumPill) : null}</View>;
|
||||
const defaultImport8 = FastImage;
|
||||
TIER_0 = PremiumTypes.TIER_0;
|
||||
const r9 = TIER_0 === premiumType ? importDefault(7250) /* metro dependency 7250 */ : PremiumTypes.TIER_1 === premiumType ? importDefault(7251) /* metro dependency 7251 */ : PremiumTypes.TIER_2 !== premiumType ? undefined : importDefault(7252) /* metro dependency 7252 */;
|
||||
TIER_0 = PremiumTypes.TIER_0;
|
||||
items2[2] = ((Component) => <Component source={r9} style={[styles.imgWumpus,
|
||||
TIER_0 === premiumType || PremiumTypes.TIER_1 === premiumType ? styles.imgWumpusBottom : PremiumTypes.TIER_2 !== premiumType ? undefined : styles.imgWumpusRight]} resizeMode="contain" />)(defaultImport8);
|
||||
return ((Component) => <Component {...defaultImport2Props}>{items2}</Component>)(defaultImport2);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,129 @@
|
||||
/* Metro module 7039; source: modules/premium/native/PremiumPlanPurchasedStore.tsx; dependencies: [3849, 1880, 629, 690, 7040, 6789, 2] */
|
||||
function _fun55852(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#55852, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7217:6, offset: 0x013b4efa, size: 230 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const actionSheetStore = importDefault(3849) /* metro dependency 3849: ActionSheetStore */;
|
||||
const env0_4 = (require(1880) /* metro dependency 1880: PremiumConstants */).PremiumTypes;
|
||||
let value = require(629) /* metro dependency 629 */;
|
||||
value = value.create(function() {
|
||||
return {'productId': '', 'initiatedPurchaseFromNewFlow': false, 'isPaymentSuccess': false,
|
||||
'mobileWebRedirectCheckoutStatus': null};
|
||||
});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/premium/native/PremiumPlanPurchasedStore.tsx');
|
||||
exports.usePremiumPlanPurchasedStore = value;
|
||||
exports.setInitiatedPurchaseFromNewFlow = setInitiatedPurchaseFromNewFlow;
|
||||
exports.setPaymentSuccess = setPaymentSuccess;
|
||||
exports.setMobileWebRedirectCheckoutStatus = setMobileWebRedirectCheckoutStatus;
|
||||
exports.handleMobileWebCheckoutStatus = handleMobileWebCheckoutStatus;
|
||||
exports.showOldPaymentFlowSuccess = showOldPaymentFlowSuccess;
|
||||
exports.reset = reset_55864;
|
||||
}
|
||||
|
||||
function setInitiatedPurchaseFromNewFlow({productId, onPaymentSuccess, onPaymentDismiss}) { // fn#55854, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7217:416, offset: 0x013b4ff0, size: 78 bytes, params: 2, frame: 12
|
||||
(require(690) /* metro dependency 690: ReactBatchUpdatesNative */).batchUpdates(_fun55855);
|
||||
}
|
||||
|
||||
function setPaymentSuccess() { // fn#55856, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7217:657, offset: 0x013b507b, size: 107 bytes, params: 1, frame: 14
|
||||
var state;
|
||||
var productId;
|
||||
var onPaymentSuccess;
|
||||
const binding = env0_5;
|
||||
const getState = binding.getState;
|
||||
if (Reflect.apply(getState, binding, []).initiatedPurchaseFromNewFlow) {
|
||||
state = env0_5.getState();
|
||||
productId = state.productId;
|
||||
onPaymentSuccess = state.onPaymentSuccess;
|
||||
(require(690) /* metro dependency 690: ReactBatchUpdatesNative */).batchUpdates(_fun55857);
|
||||
if (onPaymentSuccess != null) {
|
||||
onPaymentSuccess(productId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function setMobileWebRedirectCheckoutStatus(a0) { // fn#55858, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7217:901, offset: 0x013b5103, size: 52 bytes, params: 2, frame: 12
|
||||
const env0_0 = a0;
|
||||
(require(690) /* metro dependency 690: ReactBatchUpdatesNative */).batchUpdates(_fun55859);
|
||||
}
|
||||
|
||||
function handleMobileWebCheckoutStatus(a0) { // fn#55860, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7217:1057, offset: 0x013b5159, size: 244 bytes, params: 2, frame: 18
|
||||
var defaultImport;
|
||||
var object2;
|
||||
const env0_0 = a0;
|
||||
if (a0 === 'succeeded') {
|
||||
var value;
|
||||
var state = env0_5.getState();
|
||||
var productId = state.productId;
|
||||
var onPaymentSuccess = state.onPaymentSuccess;
|
||||
if (state.mobileWebRedirectCheckoutStatus === 'dismissed') {
|
||||
return undefined;
|
||||
}
|
||||
var key = ActionSheetStore.getKey();
|
||||
var PREMIUM_PLAN_SELECTION_ACTION_SHEET_KEY = (require(7040) /* metro dependency 7040: openPremiumPlanSelectionActionSheet */).PREMIUM_PLAN_SELECTION_ACTION_SHEET_KEY;
|
||||
if (key !== PREMIUM_PLAN_SELECTION_ACTION_SHEET_KEY) {
|
||||
defaultImport = importDefault(7040) /* metro dependency 7040: openPremiumPlanSelectionActionSheet */;
|
||||
object2 = {};
|
||||
object2.premiumType = PremiumTypes.TIER_2;
|
||||
object2.analyticsLocations = [(importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).DEEPLINK];
|
||||
object2.analyticsLocation = {};
|
||||
defaultImport(object2);
|
||||
}
|
||||
value = require(690) /* metro dependency 690: ReactBatchUpdatesNative */;
|
||||
value.batchUpdates(_fun55861);
|
||||
if (onPaymentSuccess != null) {
|
||||
onPaymentSuccess(productId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function showOldPaymentFlowSuccess(a0) { // fn#55862, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7217:1524, offset: 0x013b5276, size: 81 bytes, params: 2, frame: 11
|
||||
const binding = env0_5;
|
||||
const getState = binding.getState;
|
||||
if (Reflect.apply(getState, binding, []).initiatedPurchaseFromNewFlow) {
|
||||
(require(690) /* metro dependency 690: ReactBatchUpdatesNative */).batchUpdates(_fun55863);
|
||||
} else {
|
||||
a0();
|
||||
}
|
||||
}
|
||||
|
||||
function reset_55864() { // fn#55864, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7217:1679, offset: 0x013b52c7, size: 112 bytes, params: 1, frame: 14
|
||||
const state = env0_5.getState();
|
||||
const productId = state.productId;
|
||||
const isPaymentSuccess = state.isPaymentSuccess;
|
||||
const onPaymentDismiss = state.onPaymentDismiss;
|
||||
const env0_0 = state.mobileWebRedirectCheckoutStatus;
|
||||
if (onPaymentDismiss != null) {
|
||||
onPaymentDismiss({productId: productId, isSuccess: isPaymentSuccess});
|
||||
}
|
||||
(require(690) /* metro dependency 690: ReactBatchUpdatesNative */).batchUpdates(_fun55865);
|
||||
}
|
||||
|
||||
function _fun55855() { // fn#55855, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7217:532, offset: 0x013b503e, size: 61 bytes, params: 1, frame: 13
|
||||
env1_5.setState({productId: productId, initiatedPurchaseFromNewFlow: true, onPaymentSuccess: onPaymentSuccess,
|
||||
onPaymentDismiss: onPaymentDismiss});
|
||||
}
|
||||
|
||||
function _fun55857() { // fn#55857, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7217:808, offset: 0x013b50e6, size: 29 bytes, params: 1, frame: 12
|
||||
return env1_5.setState({isPaymentSuccess: true});
|
||||
}
|
||||
|
||||
function _fun55859() { // fn#55859, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7217:970, offset: 0x013b5137, size: 34 bytes, params: 1, frame: 12
|
||||
return env1_5.setState({mobileWebRedirectCheckoutStatus: env0_0});
|
||||
}
|
||||
|
||||
function _fun55861() { // fn#55861, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7217:1406, offset: 0x013b524d, size: 41 bytes, params: 1, frame: 12
|
||||
return env1_5.setState({isPaymentSuccess: true, mobileWebRedirectCheckoutStatus: env0_0});
|
||||
}
|
||||
|
||||
function _fun55865() { // fn#55865, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7217:1867, offset: 0x013b5337, size: 89 bytes, params: 1, frame: 15
|
||||
const value = environment.__proto__;
|
||||
const binding = env1_5;
|
||||
const setState = binding.setState;
|
||||
const mobileWebRedirectCheckoutStatusBinding = mobileWebRedirectCheckoutStatus;
|
||||
const value2 = null;
|
||||
Reflect.apply(setState, binding, [{'productId': '', 'initiatedPurchaseFromNewFlow': false,
|
||||
'isPaymentSuccess': false,
|
||||
mobileWebRedirectCheckoutStatus: value2 != mobileWebRedirectCheckoutStatusBinding ? mobileWebRedirectCheckoutStatus === 'in_mobile_web' ? value2 : 'dismissed' : value2,
|
||||
onPaymentSuccess: undefined, onPaymentDismiss: undefined}]);
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,23 @@
|
||||
/* Metro module 12270; source: modules/premium/native/PremiumPlanSelectStore.tsx; dependencies: [629, 690, 2] */
|
||||
function _fun93799(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#93799, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12456:6, offset: 0x020c4401, size: 134 bytes, params: 8, frame: 18
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
let value = require(629) /* metro dependency 629 */;
|
||||
value = value.create(function() {
|
||||
return {isPurchasing: false};
|
||||
});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/premium/native/PremiumPlanSelectStore.tsx');
|
||||
exports.usePremiumPlanSelectStore = value;
|
||||
exports.setIsPurchasing = setIsPurchasing;
|
||||
}
|
||||
|
||||
function setIsPurchasing(a0) { // fn#93801, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12456:275, offset: 0x020c4492, size: 54 bytes, params: 2, frame: 12
|
||||
const env0_0 = a0;
|
||||
(require(690) /* metro dependency 690: ReactBatchUpdatesNative */).batchUpdates(_fun93802);
|
||||
}
|
||||
|
||||
function _fun93802() { // fn#93802, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12456:325, offset: 0x020c44c8, size: 34 bytes, params: 1, frame: 12
|
||||
return env1_2.setState({isPurchasing: env0_0});
|
||||
}
|
||||
|
||||
@@ -0,0 +1,97 @@
|
||||
/* Metro module 12277; source: modules/premium/native/PremiumPlanSelectYearlyUpsellModal.tsx; dependencies: [57, 31, 27, 1949, 5140, 12270, 1880, 482, 33, 4501, 6597, 6235, 7027, 566, 1856, 4596, 12278, 1305, 1244, 3802, 4578, 2] */
|
||||
function _fun93809(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#93809, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12463:6, offset: 0x020c468e, size: 533 bytes, params: 8, frame: 25
|
||||
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.Image;
|
||||
const env0_6 = value.View;
|
||||
const localeStore = importDefault(1949) /* metro dependency 1949: LocaleStore */;
|
||||
const iapStoreAndroid = importDefault(5140) /* metro dependency 5140: IAPStoreAndroid */;
|
||||
const env0_9 = (require(12270) /* metro dependency 12270: PremiumPlanSelectStore */).usePremiumPlanSelectStore;
|
||||
const env0_10 = (require(1880) /* metro dependency 1880: PremiumConstants */).PREMIUM_YEARLY_DISCOUNT_PERCENT;
|
||||
const Fonts = (require(482) /* metro dependency 482: Constants */).Fonts;
|
||||
value = require(33) /* metro dependency 33 */;
|
||||
const env0_11 = value.jsx;
|
||||
const env0_12 = value.jsxs;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
const object = {};
|
||||
const textStyles = importDefault(6597) /* metro dependency 6597: TextStyles */;
|
||||
const DISPLAY_EXTRABOLD = Fonts.DISPLAY_EXTRABOLD;
|
||||
copyDataProperties(object, textStyles(DISPLAY_EXTRABOLD, undefined, 24), undefined);
|
||||
object['alignSelf'] = 'center';
|
||||
object['textAlign'] = 'center';
|
||||
object['paddingBottom'] = 8;
|
||||
const DARK_WHITE_500_LIGHT_BLACK_500 = (require(6235) /* metro dependency 6235: LegacyTokens */).DARK_WHITE_500_LIGHT_BLACK_500;
|
||||
object['color'] = DARK_WHITE_500_LIGHT_BLACK_500;
|
||||
const env0_13 = Reflect.apply(createStyles, value, [{container: {marginHorizontal: 26},
|
||||
image: {'alignSelf': 'center', 'marginVertical': 32}, header: object, description: {'alignSelf': 'center',
|
||||
'textAlign': 'center', 'paddingBottom': 32, color: DARK_WHITE_500_LIGHT_BLACK_500},
|
||||
upsellButton: {marginBottom: 16}, continueButton: {marginBottom: 4}, cancelButton: {'marginTop': 8,
|
||||
'marginBottom': 4}}]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/premium/native/PremiumPlanSelectYearlyUpsellModal.tsx');
|
||||
exports.default = PremiumPlanSelectYearlyUpsellModal;
|
||||
}
|
||||
|
||||
function PremiumPlanSelectYearlyUpsellModal({onClose, productId, orderPriceString, continueWithUpsell, continueWithDefault}) { // fn#93810, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12463:867, offset: 0x020c48a3, size: 1034 bytes, params: 2, frame: 38
|
||||
const styles = useStyles();
|
||||
const value3 = usePremiumPlanSelectStore(function(a0) {
|
||||
return a0.isPurchasing;
|
||||
});
|
||||
const premiumBundledItemsFromProductId = (require(7027) /* metro dependency 7027: PremiumBundledPlansUtils */).getPremiumBundledItemsFromProductId(productId);
|
||||
const locale = (require(566) /* metro dependency 566: flux */).useStateFromStores([LocaleStore], function() {
|
||||
return LocaleStore.locale;
|
||||
});
|
||||
const fluxModule = require(566) /* metro dependency 566: flux */;
|
||||
const useStateFromStoresArray = fluxModule.useStateFromStoresArray;
|
||||
const value6 = env0_3(Reflect.apply(useStateFromStoresArray, fluxModule, [[IAPStoreAndroid], _fun93813]), 2);
|
||||
const property = value6[0];
|
||||
const r18 = value3 || value6[1];
|
||||
const premiumTier = premiumBundledItemsFromProductId.premiumTier;
|
||||
const r25 = orderPriceString ?? property?.priceString;
|
||||
const r1 = premiumTier == null || r25 == null;
|
||||
env0_4.useEffect(_fun93814);
|
||||
if (r1) {
|
||||
return null;
|
||||
}
|
||||
const numberUtilsModule = require(1856) /* metro dependency 1856: NumberUtils */;
|
||||
const value9 = numberUtilsModule.formatPercent(locale, PREMIUM_YEARLY_DISCOUNT_PERCENT / 100);
|
||||
const Alert = importDefault(4596) /* metro dependency 4596: Alert */;
|
||||
const items2 = [<Image style={styles.image} source={importDefault(12278) /* metro dependency 12278 */} />];
|
||||
const LegacyText = (require(1305) /* metro dependency 1305: native */).LegacyText;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const format = intl.format;
|
||||
const LQCVfK = (require(1244) /* metro dependency 1244: indexNative */).t.LQCVfK;
|
||||
const object = {discountPercentage: value9};
|
||||
object.planName = (require(3802) /* metro dependency 3802: PremiumUtils */).getPremiumTypeDisplayName(premiumTier);
|
||||
items2[1] = <LegacyText style={styles.header}>{Reflect.apply(format, intl, [LQCVfK, object])}</LegacyText>;
|
||||
items2[2] = <LegacyText style={styles.description}>{intl.format((require(1244) /* metro dependency 1244: indexNative */).t['7chOVL'],
|
||||
{discountPercentage: value9})}</LegacyText>;
|
||||
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
|
||||
const formatToPlainString = intl.formatToPlainString;
|
||||
const Qvq6GE = (require(1244) /* metro dependency 1244: indexNative */).t.Qvq6GE;
|
||||
items2[3] = <View style={styles.upsellButton}><Button variant="active" text={Reflect.apply(formatToPlainString,
|
||||
intl, [Qvq6GE, {price: r25}])} onPress={continueWithUpsell} disabled={r18} /></View>;
|
||||
const string = intl.string;
|
||||
const YwEyQM = (require(1244) /* metro dependency 1244: indexNative */).t.YwEyQM;
|
||||
items2[4] = <View style={styles.continueButton}><Button variant="secondary" text={Reflect.apply(string, intl,
|
||||
[YwEyQM])} onPress={continueWithDefault} disabled={r18} /></View>;
|
||||
items2[5] = <View style={styles.cancelButton}><Button variant="tertiary" text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.cpT0Cq)} onPress={onClose} /></View>;
|
||||
return (
|
||||
<Alert onClose={onClose} noDefaultButtons>
|
||||
<View style={styles.container}>
|
||||
{items2}
|
||||
</View>
|
||||
</Alert>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun93813() { // fn#93813, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12463:1173, offset: 0x020c4cad, size: 49 bytes, params: 1, frame: 11
|
||||
const value = environment.__proto__;
|
||||
const getProduct = IAPStoreAndroid.getProduct;
|
||||
return [Reflect.apply(getProduct, IAPStoreAndroid, [productId]), IAPStoreAndroid.isBusy()];
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,182 @@
|
||||
/* Metro module 7534; source: modules/premium/native/PremiumPlanWhatYouLoseActionSheet.tsx; dependencies: [31, 27, 1880, 33, 4501, 697, 5475, 4573, 3802, 6771, 7535, 44, 7540, 1244, 7541, 7542, 7543, 7544, 4080, 6275, 7046, 4578, 7294, 2] */
|
||||
function _fun60614(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#60614, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7712:6, offset: 0x01708183, size: 511 bytes, params: 8, frame: 26
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importAll(31) /* metro dependency 31 */;
|
||||
const env0_4 = (require(27) /* metro dependency 27 */).View;
|
||||
const env0_5 = (require(1880) /* metro dependency 1880: PremiumConstants */).PremiumTypes;
|
||||
let value = require(33) /* metro dependency 33 */;
|
||||
const env0_6 = value.jsx;
|
||||
const env0_7 = value.jsxs;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
object2 = {body: {'paddingTop': 24, 'paddingHorizontal': 24}};
|
||||
let MOBILE_TEXT_HEADING_PRIMARY = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_TEXT_HEADING_PRIMARY;
|
||||
object2.title = {marginBottom: 8, color: MOBILE_TEXT_HEADING_PRIMARY};
|
||||
MOBILE_TEXT_HEADING_PRIMARY = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_TEXT_HEADING_PRIMARY;
|
||||
object2.subtitle = {marginBottom: 16, color: MOBILE_TEXT_HEADING_PRIMARY};
|
||||
const object3 = {'marginBottom': 16, 'borderRadius': null, 'display': 'flex', 'flexDirection': 'column',
|
||||
'justifyContent': 'center', 'alignItems': 'center', 'backgroundColor': null, 'padding': 16};
|
||||
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
|
||||
const BACKGROUND_BASE_LOWEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWEST;
|
||||
object3.backgroundColor = BACKGROUND_BASE_LOWEST;
|
||||
object2.item = object3;
|
||||
object2.itemLabel = {marginTop: 8};
|
||||
object2.footer = {paddingHorizontal: 16};
|
||||
object2.button = {marginBottom: 8};
|
||||
const TEXT_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_SUBTLE;
|
||||
object2.keepText = {'textAlign': 'center', 'paddingVertical': 8, color: TEXT_SUBTLE};
|
||||
const env0_8 = Reflect.apply(createStyles, value, [object2]);
|
||||
object2 = {DOWNGRADE: 0};
|
||||
object2[0] = 'DOWNGRADE';
|
||||
object2.CANCEL = 1;
|
||||
object2[1] = 'CANCEL';
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/premium/native/PremiumPlanWhatYouLoseActionSheet.tsx');
|
||||
exports.default = _default_60616;
|
||||
exports.WhatYouLoseMode = object2;
|
||||
}
|
||||
|
||||
function WhatYouLoseItem({imageSource, text}) { // fn#60615, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7712:762, offset: 0x01708382, size: 157 bytes, params: 2, frame: 21
|
||||
const styles = useStyles();
|
||||
const value2 = ((Component) => <Component source={imageSource} />)(importDefault(5475) /* metro dependency 5475: FastImage */);
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
return (
|
||||
<View style={styles.item}>
|
||||
{value2}
|
||||
<Text variant="text-md/medium" style={styles.itemLabel}>
|
||||
{text}
|
||||
</Text>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function _default_60616({mode, onContinue, subscription}) { // fn#60616, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7712:1021, offset: 0x0170841f, size: 1037 bytes, params: 2, frame: 34
|
||||
var r16;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
var format;
|
||||
var Qk34Ik;
|
||||
var object;
|
||||
var jh5mUz;
|
||||
var object2;
|
||||
const styles = useStyles();
|
||||
const premiumTypeFromSubscription = (require(3802) /* metro dependency 3802: PremiumUtils */).getPremiumTypeFromSubscription(subscription);
|
||||
const env0_3 = (importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */)().analyticsLocations;
|
||||
const value3 = (require(7535) /* metro dependency 7535: WhatYouLoseProfileTier1 */).useWhatYouLoseProfileTier1Source();
|
||||
(importDefault(44) /* metro dependency 44 */)(premiumTypeFromSubscription != null, 'Expected premium type');
|
||||
const value4 = env0_3.useMemo(_fun60618, [premiumTypeFromSubscription, value3]);
|
||||
const BottomSheet = (require(6275) /* metro dependency 6275: BottomSheetNative */).BottomSheet;
|
||||
const items3 = [((Component) => <Component premiumType={premiumTypeFromSubscription} />)(importDefault(7046) /* metro dependency 7046: PremiumPlanActionSheetHeader */)];
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
let CANCEL = env0_10.CANCEL;
|
||||
const items2 = [<Text variant="heading-xl/extrabold" style={styles.title}>{mode === CANCEL ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.PWq8TL) : intl.string((require(1244) /* metro dependency 1244: indexNative */).t['7VcWW0'])}</Text>];
|
||||
CANCEL = env0_10.CANCEL;
|
||||
if (mode === CANCEL) {
|
||||
format = intl.format;
|
||||
jh5mUz = (require(1244) /* metro dependency 1244: indexNative */).t.jh5mUz;
|
||||
object2 = {};
|
||||
object2.subscriptionName = (require(3802) /* metro dependency 3802: PremiumUtils */).getPremiumTypeDisplayName(premiumTypeFromSubscription,
|
||||
|
||||
true);
|
||||
r16 = Reflect.apply(format, intl, [jh5mUz, object2]);
|
||||
} else {
|
||||
format = intl.format;
|
||||
Qk34Ik = (require(1244) /* metro dependency 1244: indexNative */).t.Qk34Ik;
|
||||
object = {};
|
||||
object.subscriptionName = (require(3802) /* metro dependency 3802: PremiumUtils */).getPremiumTypeDisplayName(premiumTypeFromSubscription,
|
||||
|
||||
true);
|
||||
r16 = Reflect.apply(format, intl, [Qk34Ik, object]);
|
||||
}
|
||||
items2[1] = <Text variant="text-md/medium" style={styles.subtitle}>{r16}</Text>;
|
||||
items2[2] = value4.map(_fun60619);
|
||||
items3[1] = <View style={styles.body}>{items2}</View>;
|
||||
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
|
||||
items3[2] = <View style={styles.footer}><View style={styles.button}><Button text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['3PatSz'])} grow onPress={function() {
|
||||
var property = require(dependencyMap[22]).STEP_ANALYTICS_NAMES;
|
||||
property = property[require(dependencyMap[22]).CancellationFlowSteps.WHAT_YOU_LOSE];
|
||||
onContinue(property);
|
||||
_default_60616OnClose();
|
||||
}} /></View><Text variant="text-sm/medium" style={styles.keepText} onPress={onPress_60621}>{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.rzVN6j)}</Text></View>;
|
||||
return (
|
||||
<BottomSheet>
|
||||
{items3}
|
||||
</BottomSheet>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun60618() { // fn#60618, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7712:1252, offset: 0x01708851, size: 733 bytes, params: 1, frame: 22
|
||||
var object2;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
var format;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
var property;
|
||||
var items4;
|
||||
var items2;
|
||||
var items3;
|
||||
const binding = env0_2;
|
||||
const TIER_0 = PremiumTypes.TIER_0;
|
||||
if (TIER_0 === binding) {
|
||||
object2 = {};
|
||||
object2.imageSource = importDefault(7540) /* metro dependency 7540 */;
|
||||
object2.text = intl.format(t['0hUHi6'], {});
|
||||
items3 = [object2];
|
||||
object2 = {imageSource: importDefault(7541) /* metro dependency 7541 */};
|
||||
object2.text = intl.format(t.wFWO6D, {});
|
||||
items3[1] = object2;
|
||||
return items3;
|
||||
}
|
||||
const TIER_1 = PremiumTypes.TIER_1;
|
||||
if (TIER_1 === binding) {
|
||||
items2 = [{imageSource: env0_4, text: intl.format(t.xCaYwE, {})}];
|
||||
object2 = {};
|
||||
object2.imageSource = importDefault(7542) /* metro dependency 7542 */;
|
||||
object2.text = intl.format(t.wK04T1, {});
|
||||
items2[1] = object2;
|
||||
object2 = {imageSource: importDefault(7543) /* metro dependency 7543 */};
|
||||
object2.text = intl.format(t.K4Hv69, {});
|
||||
items2[2] = object2;
|
||||
return items2;
|
||||
}
|
||||
const TIER_2 = PremiumTypes.TIER_2;
|
||||
if (TIER_2 === binding) {
|
||||
object2 = {};
|
||||
object2.imageSource = importDefault(7544) /* metro dependency 7544 */;
|
||||
format = intl.format;
|
||||
property = t['gpqr+n'];
|
||||
object2.text = Reflect.apply(format, intl, [property, {}]);
|
||||
items4 = [object2];
|
||||
object2 = {imageSource: importDefault(7543) /* metro dependency 7543 */};
|
||||
object2.text = intl.format(t.wRxEDW, {});
|
||||
items4[1] = object2;
|
||||
object2 = {imageSource: importDefault(7542) /* metro dependency 7542 */};
|
||||
format = intl.format;
|
||||
property = t['4WZ7T2'];
|
||||
object2.text = Reflect.apply(format, intl, [property, {}]);
|
||||
items4[2] = object2;
|
||||
return items4;
|
||||
}
|
||||
return [];
|
||||
}
|
||||
|
||||
function _fun60619(a0, a1) { // fn#60619, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7712:2528, offset: 0x01708b2e, size: 37 bytes, params: 3, frame: 15
|
||||
return <WhatYouLoseItem {...a0} key={a1} />;
|
||||
}
|
||||
|
||||
function _default_60616OnPress_60621() { // fn#60621, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7712:2926, owner: _default_60616.onPress, offset: 0x01708ba1, size: 121 bytes, params: 1, frame: 17
|
||||
let value = environment.__proto__;
|
||||
value = require(7294) /* metro dependency 7294: PremiumAnalyticsUtils */;
|
||||
const trackPremiumSubscriptionCancellationFlowStep = value.trackPremiumSubscriptionCancellationFlowStep;
|
||||
const object2 = {};
|
||||
object2.subscription = subscription;
|
||||
object2.analyticsLocations = analyticsLocations;
|
||||
const STEP_ANALYTICS_NAMES = (require(7294) /* metro dependency 7294: PremiumAnalyticsUtils */).STEP_ANALYTICS_NAMES;
|
||||
const CancellationFlowSteps = (require(7294) /* metro dependency 7294: PremiumAnalyticsUtils */).CancellationFlowSteps;
|
||||
const WHAT_YOU_LOSE = CancellationFlowSteps.WHAT_YOU_LOSE;
|
||||
object2.fromStep = STEP_ANALYTICS_NAMES[WHAT_YOU_LOSE];
|
||||
object2.toStep = null;
|
||||
Reflect.apply(trackPremiumSubscriptionCancellationFlowStep, value, [object2]);
|
||||
_default_60616OnClose();
|
||||
}
|
||||
|
||||
@@ -0,0 +1,300 @@
|
||||
/* Metro module 13494; source: modules/premium/native/PremiumTabBadge.tsx; dependencies: [57, 31, 27, 3808, 1880, 7047, 33, 4501, 697, 4002, 4048, 4573, 8742, 480, 7583, 1305, 13495, 7062, 7258, 3802, 3968, 1365, 566, 7013, 7559, 8314, 7582, 1244, 4589, 676, 477, 2] */
|
||||
function _fun102544(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#102544, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13684:6, offset: 0x0223fcda, size: 633 bytes, params: 8, frame: 23
|
||||
var object4;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(57) /* metro dependency 57 */;
|
||||
importAll(31) /* metro dependency 31 */;
|
||||
const env0_4 = (require(27) /* metro dependency 27 */).View;
|
||||
const subscriptionStore = importDefault(3808) /* metro dependency 3808: SubscriptionStore */;
|
||||
const env0_6 = (require(1880) /* metro dependency 1880: PremiumConstants */).PREMIUM_TIER_2_REFERRAL_TRIAL_ID;
|
||||
const env0_7 = (require(7047) /* metro dependency 7047: ColorConstants */).Gradients;
|
||||
let value = require(33) /* metro dependency 33 */;
|
||||
const env0_8 = value.jsx;
|
||||
const env0_9 = value.jsxs;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
object4 = {};
|
||||
const object5 = {'paddingVertical': 4, 'paddingHorizontal': 8};
|
||||
object5.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
|
||||
object4.tag = object5;
|
||||
const object7 = {'display': 'flex', 'minWidth': 16, 'minHeight': 16, 'paddingHorizontal': 8,
|
||||
'justifyContent': 'center', 'alignItems': 'center', 'gap': 4};
|
||||
object7.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
|
||||
object4.badge = object7;
|
||||
const BACKGROUND_BRAND = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BRAND;
|
||||
object4.badgeBackgroundLightTheme = {backgroundColor: BACKGROUND_BRAND};
|
||||
const WHITE = (importDefault(697) /* metro dependency 697: native */).colors.WHITE;
|
||||
object4.badgeBackgroundDarkTheme = {backgroundColor: WHITE};
|
||||
const object8 = {'paddingVertical': 2, 'paddingHorizontal': 12, 'borderRadius': null, 'backgroundColor': null,
|
||||
'display': 'flex', 'flexDirection': 'row', 'alignItems': 'center', 'textAlignVertical': 'center'};
|
||||
object8.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
|
||||
let BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
|
||||
object8.backgroundColor = BORDER_SUBTLE;
|
||||
object4.acked = object8;
|
||||
BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
|
||||
object4.ackedBadge = {backgroundColor: BORDER_SUBTLE};
|
||||
const INTERACTIVE_TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_TEXT_DEFAULT;
|
||||
object4.icon = {color: INTERACTIVE_TEXT_DEFAULT, marginRight: 2};
|
||||
object4.text = {paddingBottom: 2};
|
||||
const object9 = {'paddingVertical': 2, 'paddingHorizontal': 12, 'borderRadius': null, 'display': 'flex',
|
||||
'flexDirection': 'row', 'alignItems': 'center', 'textAlignVertical': 'center'};
|
||||
object9.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
|
||||
object4.premiumDiscountBadge = object9;
|
||||
const env0_10 = Reflect.apply(createStyles, value, [object4]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/premium/native/PremiumTabBadge.tsx');
|
||||
exports.default = PremiumTabBadge;
|
||||
}
|
||||
|
||||
function ThemedTabBadge({label}) { // fn#102545, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13684:1157, offset: 0x0223ff53, size: 210 bytes, params: 2, frame: 20
|
||||
const styles = useStyles();
|
||||
const sharedModule = require(4002) /* metro dependency 4002: shared */;
|
||||
const isThemeDark2 = sharedModule.isThemeDark((importDefault(4048) /* metro dependency 4048: useTheme */)());
|
||||
const items2 = [styles.badge];
|
||||
items2[1] = isThemeDark2 ? styles.badgeBackgroundDarkTheme : styles.badgeBackgroundLightTheme;
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
return (
|
||||
<View style={items2}>
|
||||
<Text
|
||||
variant="eyebrow"
|
||||
color={isThemeDark2 ? 'black' : 'always-white'}
|
||||
style={styles.text}
|
||||
>
|
||||
{label}
|
||||
</Text>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function OfferBadge({acked, badgeCopy, ackedBadgeCopy, componentId}) { // fn#102546, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13684:1424, offset: 0x02240025, size: 415 bytes, params: 2, frame: 25
|
||||
var r0;
|
||||
var Icon;
|
||||
var icon;
|
||||
const styles = useStyles();
|
||||
const defaultImport = importDefault(8742) /* metro dependency 8742: useTrackImpression */;
|
||||
const object2 = {};
|
||||
const ImpressionTypes = (require(480) /* metro dependency 480: AnalyticsUtils */).ImpressionTypes;
|
||||
const VIEW = ImpressionTypes.VIEW;
|
||||
object2.type = VIEW;
|
||||
const ImpressionNames = (require(480) /* metro dependency 480: AnalyticsUtils */).ImpressionNames;
|
||||
const PREMIUM_MARKETING_COMPONENT = ImpressionNames.PREMIUM_MARKETING_COMPONENT;
|
||||
object2.name = PREMIUM_MARKETING_COMPONENT;
|
||||
const MarketingComponentType = (require(7583) /* metro dependency 7583: MarketingComponentType */).MarketingComponentType;
|
||||
const PREMIUM_TAB = MarketingComponentType.PREMIUM_TAB;
|
||||
object2.properties = {component_type: PREMIUM_TAB, component_id: componentId};
|
||||
defaultImport(object2, {disableTrack: componentId == null});
|
||||
if (acked) {
|
||||
var viewBindingProps = {style: styles.acked};
|
||||
Icon = (require(1305) /* metro dependency 1305: native */).Icon;
|
||||
var iconProps = {source: importDefault(13495) /* metro dependency 13495 */,
|
||||
size: (require(1305) /* metro dependency 1305: native */).Icon.Sizes.EXTRA_SMALL};
|
||||
icon = styles.icon;
|
||||
iconProps.color = icon.color;
|
||||
icon = styles.icon;
|
||||
iconProps.style = icon;
|
||||
r0 = <View {...viewBindingProps}><Icon {...iconProps} />{((Text) => <Text variant="eyebrow" color="interactive-text-default" style={styles.text}>{ackedBadgeCopy}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)}</View>;
|
||||
} else {
|
||||
r0 = <ThemedTabBadge label={badgeCopy} />;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function PremiumTabBadge() { // fn#102547, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13684:1996, offset: 0x022401c4, size: 2256 bytes, params: 1, frame: 34
|
||||
var r2;
|
||||
var r0;
|
||||
var PREMIUM_TAB_MARKETING_MOMENT_OFFER_BADGE;
|
||||
var properties;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
var string;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
var defaultImport;
|
||||
const HorizontalGradient = (require(676) /* metro dependency 676: ConstantsIOS */).HorizontalGradient;
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
const Icon = (require(1305) /* metro dependency 1305: native */).Icon;
|
||||
var icon;
|
||||
var items2;
|
||||
var OS9KPu;
|
||||
var defaultImport3;
|
||||
var moduleValue12;
|
||||
var premiumTab;
|
||||
var badgeLabel;
|
||||
var value;
|
||||
const value2 = undefined;
|
||||
const styles = useStyles();
|
||||
const value3 = (require(7062) /* metro dependency 7062: usePremiumTrialOfferNative */).usePremiumTrialOffer();
|
||||
const value4 = (require(7258) /* metro dependency 7258: usePremiumDiscountOfferAndroid */).usePremiumDiscountOffer();
|
||||
const value5 = (require(3802) /* metro dependency 3802: PremiumUtils */).useHasTier2Premium();
|
||||
const dismissibleContentUnsafeUtilsModule = require(3968) /* metro dependency 3968: DismissibleContentUnsafeUtils */;
|
||||
const UNSAFE_useIsDismissibleContentDismissed = dismissibleContentUnsafeUtilsModule.UNSAFE_useIsDismissibleContentDismissed;
|
||||
const DismissibleContent = (require(1365) /* metro dependency 1365: dismissible_content */).DismissibleContent;
|
||||
const MOBILE_NITRO_HOME_SETTINGS_BADGE = DismissibleContent.MOBILE_NITRO_HOME_SETTINGS_BADGE;
|
||||
let r1 = !Reflect.apply(UNSAFE_useIsDismissibleContentDismissed, dismissibleContentUnsafeUtilsModule,
|
||||
[MOBILE_NITRO_HOME_SETTINGS_BADGE]) && value5;
|
||||
const fluxModule = require(566) /* metro dependency 566: flux */;
|
||||
const useStateFromStores = fluxModule.useStateFromStores;
|
||||
const items = [SubscriptionStore];
|
||||
const premiumTypeSubscription = Reflect.apply(useStateFromStores, fluxModule, [items, function() {
|
||||
return SubscriptionStore.getPremiumTypeSubscription();
|
||||
}]);
|
||||
const value8 = null;
|
||||
const trialId = value8 == premiumTypeSubscription ? value2 : premiumTypeSubscription.trialId;
|
||||
const useSelectedDismissibleContentModule = require(7013) /* metro dependency 7013: useSelectedDismissibleContent */;
|
||||
let useSelectedDismissibleContent = useSelectedDismissibleContentModule.useSelectedDismissibleContent;
|
||||
const value10 = env0_3(Reflect.apply(useSelectedDismissibleContent, useSelectedDismissibleContentModule,
|
||||
[trialId !== PREMIUM_TIER_2_REFERRAL_TRIAL_ID || r1 ? [] : [(require(1365) /* metro dependency 1365: dismissible_content */).DismissibleContent.REFERRAL_TRIAL_MOBILE_NITRO_HOME_BADGE],
|
||||
value2, true]), 2);
|
||||
const property = value10[0];
|
||||
value10[1];
|
||||
const moduleValue7 = useSelectedDismissibleContentModule;
|
||||
useSelectedDismissibleContent = moduleValue7.useSelectedDismissibleContent;
|
||||
const value12 = env0_3(Reflect.apply(useSelectedDismissibleContent, moduleValue7,
|
||||
[r1 ? [] : value5 ? [(require(1365) /* metro dependency 1365: dismissible_content */).DismissibleContent.WHATS_NEW_TENURE_BADGE_REWARD] : [],
|
||||
value2, true]), 2);
|
||||
const property2 = value12[0];
|
||||
value12[1];
|
||||
const value13 = (require(7559) /* metro dependency 7559: useIsEligibleSenderForReferralProgram */).useIsEligibleSenderForReferralProgram();
|
||||
const value14 = (require(8314) /* metro dependency 8314: ReferralProgramUtils */).useIsReferralProgramEntrypointBadgeAcknowledged();
|
||||
const usePromotionMarketingComponentModule = require(7582) /* metro dependency 7582: usePromotionMarketingComponent */;
|
||||
const usePromotionMarketingComponent = usePromotionMarketingComponentModule.usePromotionMarketingComponent;
|
||||
const MarketingComponentType = (require(7583) /* metro dependency 7583: MarketingComponentType */).MarketingComponentType;
|
||||
const PREMIUM_TAB = MarketingComponentType.PREMIUM_TAB;
|
||||
const value15 = Reflect.apply(usePromotionMarketingComponent, usePromotionMarketingComponentModule, [PREMIUM_TAB]);
|
||||
const moduleValue11 = useSelectedDismissibleContentModule;
|
||||
const useSelectedSnowflakeBoundDismissibleContent = moduleValue11.useSelectedSnowflakeBoundDismissibleContent;
|
||||
if (value8 != value15) {
|
||||
properties = value15.properties;
|
||||
properties = properties.properties;
|
||||
PREMIUM_TAB_MARKETING_MOMENT_OFFER_BADGE = properties.oneofKind !== 'premiumTab' ? value8 : (require(1365) /* metro dependency 1365: dismissible_content */).DismissibleContent.PREMIUM_TAB_MARKETING_MOMENT_OFFER_BADGE;
|
||||
} else {
|
||||
PREMIUM_TAB_MARKETING_MOMENT_OFFER_BADGE = value8;
|
||||
}
|
||||
const promotionId = value8 == value15 ? value2 : value15.promotionId;
|
||||
const value18 = env0_3(Reflect.apply(useSelectedSnowflakeBoundDismissibleContent, moduleValue11,
|
||||
[PREMIUM_TAB_MARKETING_MOMENT_OFFER_BADGE, value8 != promotionId ? promotionId : '', value2, true]), 2);
|
||||
const property3 = value18[0];
|
||||
value18[1];
|
||||
if (value8 != value15) {
|
||||
properties = value15.properties;
|
||||
properties = properties.properties;
|
||||
if (properties.oneofKind === 'premiumTab') {
|
||||
PREMIUM_TAB_MARKETING_MOMENT_OFFER_BADGE = (require(1365) /* metro dependency 1365: dismissible_content */).DismissibleContent.PREMIUM_TAB_MARKETING_MOMENT_OFFER_BADGE;
|
||||
properties = value15.properties;
|
||||
properties = properties.properties;
|
||||
premiumTab = properties.premiumTab;
|
||||
badgeLabel = premiumTab.badgeLabel;
|
||||
properties = value15.properties;
|
||||
properties = properties.properties;
|
||||
premiumTab = properties.premiumTab;
|
||||
return (
|
||||
<OfferBadge
|
||||
acked={property3 !== PREMIUM_TAB_MARKETING_MOMENT_OFFER_BADGE}
|
||||
badgeCopy={badgeLabel}
|
||||
ackedBadgeCopy={premiumTab.acknowledgedBadgeLabel}
|
||||
componentId={value15.id}
|
||||
/>
|
||||
);
|
||||
}
|
||||
}
|
||||
const REFERRAL_TRIAL_MOBILE_NITRO_HOME_BADGE = DismissibleContent.REFERRAL_TRIAL_MOBILE_NITRO_HOME_BADGE;
|
||||
const r17 = property === REFERRAL_TRIAL_MOBILE_NITRO_HOME_BADGE ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.uO4bXn) : property2 !== (require(1365) /* metro dependency 1365: dismissible_content */).DismissibleContent.WHATS_NEW_TENURE_BADGE_REWARD ? value8 : intl.string((require(1244) /* metro dependency 1244: indexNative */).t['jyYgZ+']);
|
||||
if (value13) {
|
||||
if (value14) {
|
||||
if (r1) {
|
||||
defaultImport3 = importDefault(4589) /* metro dependency 4589 */;
|
||||
var defaultImport3Props2 = {style: styles.tag, colors: Gradients.PREMIUM_TIER_2,
|
||||
start: HorizontalGradient.START,
|
||||
end: HorizontalGradient.END};
|
||||
moduleValue12 = require(477) /* metro dependency 477: PlatformUtils */;
|
||||
r1 = ((Component) => <Component {...defaultImport3Props2}><Text variant="eyebrow" color="always-white" style={moduleValue12.isAndroid() ? styles.text : value2}>{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.y2b7CA)}</Text></Component>)(defaultImport3);
|
||||
} else if (value8 != value3) {
|
||||
var offerBadgeBindingProps = {acked: value8 != (value8 == value3 ? value2 : value3.expires_at)};
|
||||
string = intl.string;
|
||||
OS9KPu = t.OS9KPu;
|
||||
offerBadgeBindingProps.badgeCopy = Reflect.apply(string, intl, [OS9KPu]);
|
||||
string = intl.string;
|
||||
OS9KPu = t.OS9KPu;
|
||||
offerBadgeBindingProps.ackedBadgeCopy = Reflect.apply(string, intl, [OS9KPu]);
|
||||
r1 = <OfferBadge {...offerBadgeBindingProps} />;
|
||||
} else if (value8 != value4) {
|
||||
if (value4.hasAcknowledged()) {
|
||||
var viewProps = {style: [styles.premiumDiscountBadge, styles.ackedBadge]};
|
||||
var iconProps = {source: importDefault(13495) /* metro dependency 13495 */,
|
||||
size: (require(1305) /* metro dependency 1305: native */).Icon.Sizes.EXTRA_SMALL};
|
||||
icon = styles.icon;
|
||||
iconProps.color = icon.color;
|
||||
icon = styles.icon;
|
||||
iconProps.style = icon;
|
||||
items2 = [<Icon {...iconProps} />];
|
||||
items2[1] = <Text variant="eyebrow" color="interactive-text-default" style={styles.text}>{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['/DTtr6'])}</Text>;
|
||||
r2 = <View {...viewProps}>{items2}</View>;
|
||||
} else {
|
||||
r2 = ((Component) => <Component style={styles.premiumDiscountBadge} colors={['#db00a4',
|
||||
'#5968f0']} start={HorizontalGradient.START} end={HorizontalGradient.END}><Text variant="eyebrow" color="always-white" style={styles.text}>{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['/DTtr6'])}</Text></Component>)(importDefault(4589) /* metro dependency 4589 */);
|
||||
}
|
||||
r1 = r2;
|
||||
} else if (value8 != r17) {
|
||||
defaultImport = importDefault(4589) /* metro dependency 4589 */;
|
||||
var defaultImportProps2 = {style: styles.tag, colors: Gradients.PREMIUM_TIER_2,
|
||||
start: HorizontalGradient.START,
|
||||
end: HorizontalGradient.END};
|
||||
value = require(477) /* metro dependency 477: PlatformUtils */;
|
||||
value = ((Component) => <Component {...defaultImportProps2}><Text variant="eyebrow" color="always-white" style={value.isAndroid() ? styles.text : value2}>{r17}</Text></Component>)(defaultImport);
|
||||
r1 = value;
|
||||
} else {
|
||||
r1 = value8;
|
||||
}
|
||||
r0 = r1;
|
||||
} else {
|
||||
r0 = <ThemedTabBadge label={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.RDE0Sc)} />;
|
||||
}
|
||||
} else {
|
||||
if (r1) {
|
||||
defaultImport3 = importDefault(4589) /* metro dependency 4589 */;
|
||||
var defaultImport3Props2 = {style: styles.tag, colors: Gradients.PREMIUM_TIER_2,
|
||||
start: HorizontalGradient.START,
|
||||
end: HorizontalGradient.END};
|
||||
moduleValue12 = require(477) /* metro dependency 477: PlatformUtils */;
|
||||
r1 = ((Component) => <Component {...defaultImport3Props2}><Text variant="eyebrow" color="always-white" style={moduleValue12.isAndroid() ? styles.text : value2}>{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.y2b7CA)}</Text></Component>)(defaultImport3);
|
||||
} else if (value8 != value3) {
|
||||
var offerBadgeBindingProps = {acked: value8 != (value8 == value3 ? value2 : value3.expires_at)};
|
||||
string = intl.string;
|
||||
OS9KPu = t.OS9KPu;
|
||||
offerBadgeBindingProps.badgeCopy = Reflect.apply(string, intl, [OS9KPu]);
|
||||
string = intl.string;
|
||||
OS9KPu = t.OS9KPu;
|
||||
offerBadgeBindingProps.ackedBadgeCopy = Reflect.apply(string, intl, [OS9KPu]);
|
||||
r1 = <OfferBadge {...offerBadgeBindingProps} />;
|
||||
} else if (value8 != value4) {
|
||||
if (value4.hasAcknowledged()) {
|
||||
var viewProps = {style: [styles.premiumDiscountBadge, styles.ackedBadge]};
|
||||
var iconProps = {source: importDefault(13495) /* metro dependency 13495 */,
|
||||
size: (require(1305) /* metro dependency 1305: native */).Icon.Sizes.EXTRA_SMALL};
|
||||
icon = styles.icon;
|
||||
iconProps.color = icon.color;
|
||||
icon = styles.icon;
|
||||
iconProps.style = icon;
|
||||
items2 = [<Icon {...iconProps} />];
|
||||
items2[1] = <Text variant="eyebrow" color="interactive-text-default" style={styles.text}>{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['/DTtr6'])}</Text>;
|
||||
r2 = <View {...viewProps}>{items2}</View>;
|
||||
} else {
|
||||
r2 = ((Component) => <Component style={styles.premiumDiscountBadge} colors={['#db00a4',
|
||||
'#5968f0']} start={HorizontalGradient.START} end={HorizontalGradient.END}><Text variant="eyebrow" color="always-white" style={styles.text}>{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['/DTtr6'])}</Text></Component>)(importDefault(4589) /* metro dependency 4589 */);
|
||||
}
|
||||
r1 = r2;
|
||||
} else if (value8 != r17) {
|
||||
defaultImport = importDefault(4589) /* metro dependency 4589 */;
|
||||
var defaultImportProps2 = {style: styles.tag, colors: Gradients.PREMIUM_TIER_2,
|
||||
start: HorizontalGradient.START,
|
||||
end: HorizontalGradient.END};
|
||||
value = require(477) /* metro dependency 477: PlatformUtils */;
|
||||
value = ((Component) => <Component {...defaultImportProps2}><Text variant="eyebrow" color="always-white" style={value.isAndroid() ? styles.text : value2}>{r17}</Text></Component>)(defaultImport);
|
||||
r1 = value;
|
||||
} else {
|
||||
r1 = value8;
|
||||
}
|
||||
r0 = r1;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,302 @@
|
||||
/* Metro module 5143; source: modules/premium/native/ProductIds.android.tsx; dependencies: [1880, 1581, 2] */
|
||||
function _fun45384(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#45384, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5321:6, offset: 0x0118cee6, size: 2890 bytes, params: 8, frame: 38
|
||||
let Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
let value = require(1880) /* metro dependency 1880: PremiumConstants */;
|
||||
const PremiumTypes = value.PremiumTypes;
|
||||
const SubscriptionIntervalTypes = value.SubscriptionIntervalTypes;
|
||||
const SubscriptionPlans = value.SubscriptionPlans;
|
||||
const PREMIUM_TIER_2_LIKELIHOOD_TRIAL_ID = value.PREMIUM_TIER_2_LIKELIHOOD_TRIAL_ID;
|
||||
const PREMIUM_TIER_2_REACTIVATION_TRIAL_ID = value.PREMIUM_TIER_2_REACTIVATION_TRIAL_ID;
|
||||
const PREMIUM_TIER_0_LIKELIHOOD_TRIAL_ID = value.PREMIUM_TIER_0_LIKELIHOOD_TRIAL_ID;
|
||||
const PREMIUM_TIER_2_TRIAL_FOR_EVERYONE_TRIAL_ID = value.PREMIUM_TIER_2_TRIAL_FOR_EVERYONE_TRIAL_ID;
|
||||
const PREMIUM_TIER_2_REFERRAL_TRIAL_ID = value.PREMIUM_TIER_2_REFERRAL_TRIAL_ID;
|
||||
const PREMIUM_TIER_2_HFU_TWO_WEEK_TRIAL_ID = value.PREMIUM_TIER_2_HFU_TWO_WEEK_TRIAL_ID;
|
||||
const PREMIUM_TIER_2_LIKELIHOOD_1_MONTH_40_PERCENT_DISCOUNT_ID = value.PREMIUM_TIER_2_LIKELIHOOD_1_MONTH_40_PERCENT_DISCOUNT_ID;
|
||||
const PREMIUM_TIER_2_REENGAGEMENT_1_MONTH_40_PERCENT_DISCOUNT_ID = value.PREMIUM_TIER_2_REENGAGEMENT_1_MONTH_40_PERCENT_DISCOUNT_ID;
|
||||
Object = global.Object;
|
||||
let freeze = Object.freeze;
|
||||
value = Reflect.apply(freeze, Object, [{'PREMIUM_GIFT_MONTH_TIER_0': 'premium_month_tier_0.2',
|
||||
'PREMIUM_GIFT_YEAR_TIER_0': 'premium_year_tier_0', 'PREMIUM_GIFT_MONTH_TIER_1': 'premium_month_tier_1',
|
||||
'PREMIUM_GIFT_YEAR_TIER_1': 'premium_year_tier_1', 'PREMIUM_GIFT_MONTH_TIER_2': 'premium_month_tier_2',
|
||||
'PREMIUM_GIFT_YEAR_TIER_2': 'premium_year_tier_2', 'PREMIUM_TIER_2_MONTHLY': 'premium_tier_2_monthly',
|
||||
'PREMIUM_TIER_2_YEARLY': 'premium_tier_2_yearly', 'PREMIUM_TIER_1_MONTHLY': 'premium_tier_1_monthly',
|
||||
'PREMIUM_TIER_1_YEARLY': 'premium_tier_1_yearly', 'PREMIUM_TIER_0_MONTHLY': 'premium_tier_0_month',
|
||||
'PREMIUM_TIER_0_YEARLY': 'premium_tier_0_yearly',
|
||||
'PREMIUM_TIER_2_PREMIUM_GUILD_1_MONTHLY': 'premium_tier_2_premium_guild_1_monthly',
|
||||
'PREMIUM_TIER_2_PREMIUM_GUILD_1_YEARLY': 'premium_tier_2_premium_guild_1_yearly',
|
||||
'PREMIUM_TIER_2_PREMIUM_GUILD_2_MONTHLY': 'premium_tier_2_premium_guild_2_monthly',
|
||||
'PREMIUM_TIER_2_PREMIUM_GUILD_2_YEARLY': 'premium_tier_2_premium_guild_2_yearly',
|
||||
'PREMIUM_TIER_2_PREMIUM_GUILD_3_MONTHLY': 'premium_tier_2_premium_guild_3_monthly',
|
||||
'PREMIUM_TIER_2_PREMIUM_GUILD_3_YEARLY': 'premium_tier_2_premium_guild_3_yearly',
|
||||
'PREMIUM_TIER_2_PREMIUM_GUILD_5_MONTHLY': 'premium_tier_2_premium_guild_5_monthly',
|
||||
'PREMIUM_TIER_2_PREMIUM_GUILD_5_YEARLY': 'premium_tier_2_premium_guild_5_yearly',
|
||||
'PREMIUM_TIER_2_PREMIUM_GUILD_10_MONTHLY': 'premium_tier_2_premium_guild_10_monthly',
|
||||
'PREMIUM_TIER_2_PREMIUM_GUILD_13_MONTHLY': 'premium_tier_2_premium_guild_13_monthly',
|
||||
'PREMIUM_TIER_2_PREMIUM_GUILD_28_MONTHLY': 'premium_tier_2_premium_guild_28_monthly',
|
||||
'PREMIUM_TIER_1_PREMIUM_GUILD_1_MONTHLY': 'premium_tier_1_premium_guild_1_monthly',
|
||||
'PREMIUM_TIER_1_PREMIUM_GUILD_1_YEARLY': 'premium_tier_1_premium_guild_1_yearly',
|
||||
'PREMIUM_GUILD_1_MONTHLY': 'premium_guild_1_monthly', 'PREMIUM_GUILD_2_MONTHLY': 'premium_guild_2_monthly'}]);
|
||||
const PREMIUM_GIFT_MONTH_TIER_0 = value.PREMIUM_GIFT_MONTH_TIER_0;
|
||||
items = [PREMIUM_GIFT_MONTH_TIER_0];
|
||||
const PREMIUM_GIFT_YEAR_TIER_0 = value.PREMIUM_GIFT_YEAR_TIER_0;
|
||||
items[1] = PREMIUM_GIFT_YEAR_TIER_0;
|
||||
const PREMIUM_GIFT_MONTH_TIER_1 = value.PREMIUM_GIFT_MONTH_TIER_1;
|
||||
items[2] = PREMIUM_GIFT_MONTH_TIER_1;
|
||||
const PREMIUM_GIFT_YEAR_TIER_1 = value.PREMIUM_GIFT_YEAR_TIER_1;
|
||||
items[3] = PREMIUM_GIFT_YEAR_TIER_1;
|
||||
const PREMIUM_GIFT_MONTH_TIER_2 = value.PREMIUM_GIFT_MONTH_TIER_2;
|
||||
items[4] = PREMIUM_GIFT_MONTH_TIER_2;
|
||||
const PREMIUM_GIFT_YEAR_TIER_2 = value.PREMIUM_GIFT_YEAR_TIER_2;
|
||||
items[5] = PREMIUM_GIFT_YEAR_TIER_2;
|
||||
const isMetaQuest2 = (require(1581) /* metro dependency 1581: MetaQuestUtilsAndroid */).isMetaQuest();
|
||||
let PREMIUM_TIER_2_MONTHLY = value.PREMIUM_TIER_2_MONTHLY;
|
||||
const r7 = isMetaQuest2 ? [PREMIUM_TIER_2_MONTHLY, value.PREMIUM_TIER_2_YEARLY, value.PREMIUM_TIER_0_MONTHLY,
|
||||
value.PREMIUM_TIER_0_YEARLY] : [PREMIUM_TIER_2_MONTHLY, value.PREMIUM_TIER_2_YEARLY,
|
||||
value.PREMIUM_TIER_1_MONTHLY, value.PREMIUM_TIER_1_YEARLY, value.PREMIUM_TIER_0_MONTHLY,
|
||||
value.PREMIUM_TIER_0_YEARLY, value.PREMIUM_TIER_2_PREMIUM_GUILD_1_MONTHLY,
|
||||
value.PREMIUM_TIER_2_PREMIUM_GUILD_1_YEARLY, value.PREMIUM_TIER_2_PREMIUM_GUILD_2_MONTHLY,
|
||||
value.PREMIUM_TIER_2_PREMIUM_GUILD_2_YEARLY, value.PREMIUM_TIER_2_PREMIUM_GUILD_3_MONTHLY,
|
||||
value.PREMIUM_TIER_2_PREMIUM_GUILD_3_YEARLY, value.PREMIUM_TIER_2_PREMIUM_GUILD_5_MONTHLY,
|
||||
value.PREMIUM_TIER_2_PREMIUM_GUILD_5_YEARLY, value.PREMIUM_TIER_2_PREMIUM_GUILD_10_MONTHLY,
|
||||
value.PREMIUM_TIER_2_PREMIUM_GUILD_13_MONTHLY, value.PREMIUM_TIER_2_PREMIUM_GUILD_28_MONTHLY,
|
||||
value.PREMIUM_TIER_1_PREMIUM_GUILD_1_MONTHLY, value.PREMIUM_TIER_1_PREMIUM_GUILD_1_YEARLY,
|
||||
value.PREMIUM_GUILD_1_MONTHLY, value.PREMIUM_GUILD_2_MONTHLY];
|
||||
Object = global.Object;
|
||||
freeze = Object.freeze;
|
||||
let PREMIUM_MONTH_TIER_0 = SubscriptionPlans.PREMIUM_MONTH_TIER_0;
|
||||
let PREMIUM_TIER_0_MONTHLY = value.PREMIUM_TIER_0_MONTHLY;
|
||||
let PREMIUM_MONTH_TIER_1 = SubscriptionPlans.PREMIUM_MONTH_TIER_1;
|
||||
let PREMIUM_TIER_1_MONTHLY = value.PREMIUM_TIER_1_MONTHLY;
|
||||
let PREMIUM_MONTH_TIER_2 = SubscriptionPlans.PREMIUM_MONTH_TIER_2;
|
||||
PREMIUM_TIER_2_MONTHLY = value.PREMIUM_TIER_2_MONTHLY;
|
||||
let PREMIUM_MONTH_GUILD = SubscriptionPlans.PREMIUM_MONTH_GUILD;
|
||||
let PREMIUM_GUILD_1_MONTHLY = value.PREMIUM_GUILD_1_MONTHLY;
|
||||
let PREMIUM_YEAR_TIER_0 = SubscriptionPlans.PREMIUM_YEAR_TIER_0;
|
||||
let PREMIUM_TIER_0_YEARLY = value.PREMIUM_TIER_0_YEARLY;
|
||||
let PREMIUM_YEAR_TIER_1 = SubscriptionPlans.PREMIUM_YEAR_TIER_1;
|
||||
let PREMIUM_TIER_1_YEARLY = value.PREMIUM_TIER_1_YEARLY;
|
||||
let PREMIUM_YEAR_TIER_2 = SubscriptionPlans.PREMIUM_YEAR_TIER_2;
|
||||
let PREMIUM_TIER_2_YEARLY = value.PREMIUM_TIER_2_YEARLY;
|
||||
const value3 = Reflect.apply(freeze, Object, [{[PREMIUM_MONTH_TIER_0]: PREMIUM_TIER_0_MONTHLY,
|
||||
[PREMIUM_MONTH_TIER_1]: PREMIUM_TIER_1_MONTHLY, [PREMIUM_MONTH_TIER_2]: PREMIUM_TIER_2_MONTHLY,
|
||||
[PREMIUM_MONTH_GUILD]: PREMIUM_GUILD_1_MONTHLY, [PREMIUM_YEAR_TIER_0]: PREMIUM_TIER_0_YEARLY,
|
||||
[PREMIUM_YEAR_TIER_1]: PREMIUM_TIER_1_YEARLY, [PREMIUM_YEAR_TIER_2]: PREMIUM_TIER_2_YEARLY}]);
|
||||
const object2 = {};
|
||||
PREMIUM_TIER_2_MONTHLY = value.PREMIUM_TIER_2_MONTHLY;
|
||||
const PREMIUM_TIER_2_MONTHLY2 = value.PREMIUM_TIER_2_MONTHLY;
|
||||
let MONTH = SubscriptionIntervalTypes.MONTH;
|
||||
let TIER_2 = PremiumTypes.TIER_2;
|
||||
PREMIUM_MONTH_TIER_2 = SubscriptionPlans.PREMIUM_MONTH_TIER_2;
|
||||
object2[PREMIUM_TIER_2_MONTHLY] = {productId: PREMIUM_TIER_2_MONTHLY2, interval: MONTH, numPremiumGuild: 0,
|
||||
premiumTier: TIER_2, basePlanId: PREMIUM_MONTH_TIER_2, additionalPlans: []};
|
||||
PREMIUM_TIER_2_YEARLY = value.PREMIUM_TIER_2_YEARLY;
|
||||
const PREMIUM_TIER_2_YEARLY2 = value.PREMIUM_TIER_2_YEARLY;
|
||||
let YEAR = SubscriptionIntervalTypes.YEAR;
|
||||
TIER_2 = PremiumTypes.TIER_2;
|
||||
PREMIUM_YEAR_TIER_2 = SubscriptionPlans.PREMIUM_YEAR_TIER_2;
|
||||
object2[PREMIUM_TIER_2_YEARLY] = {productId: PREMIUM_TIER_2_YEARLY2, interval: YEAR, numPremiumGuild: 0,
|
||||
premiumTier: TIER_2, basePlanId: PREMIUM_YEAR_TIER_2, additionalPlans: []};
|
||||
PREMIUM_TIER_1_MONTHLY = value.PREMIUM_TIER_1_MONTHLY;
|
||||
const PREMIUM_TIER_1_MONTHLY2 = value.PREMIUM_TIER_1_MONTHLY;
|
||||
MONTH = SubscriptionIntervalTypes.MONTH;
|
||||
let TIER_1 = PremiumTypes.TIER_1;
|
||||
PREMIUM_MONTH_TIER_1 = SubscriptionPlans.PREMIUM_MONTH_TIER_1;
|
||||
object2[PREMIUM_TIER_1_MONTHLY] = {productId: PREMIUM_TIER_1_MONTHLY2, interval: MONTH, numPremiumGuild: 0,
|
||||
premiumTier: TIER_1, basePlanId: PREMIUM_MONTH_TIER_1, additionalPlans: []};
|
||||
PREMIUM_TIER_1_YEARLY = value.PREMIUM_TIER_1_YEARLY;
|
||||
const PREMIUM_TIER_1_YEARLY2 = value.PREMIUM_TIER_1_YEARLY;
|
||||
YEAR = SubscriptionIntervalTypes.YEAR;
|
||||
TIER_1 = PremiumTypes.TIER_1;
|
||||
PREMIUM_YEAR_TIER_1 = SubscriptionPlans.PREMIUM_YEAR_TIER_1;
|
||||
object2[PREMIUM_TIER_1_YEARLY] = {productId: PREMIUM_TIER_1_YEARLY2, interval: YEAR, numPremiumGuild: 0,
|
||||
premiumTier: TIER_1, basePlanId: PREMIUM_YEAR_TIER_1, additionalPlans: []};
|
||||
PREMIUM_TIER_0_MONTHLY = value.PREMIUM_TIER_0_MONTHLY;
|
||||
const PREMIUM_TIER_0_MONTHLY2 = value.PREMIUM_TIER_0_MONTHLY;
|
||||
MONTH = SubscriptionIntervalTypes.MONTH;
|
||||
let TIER_0 = PremiumTypes.TIER_0;
|
||||
PREMIUM_MONTH_TIER_0 = SubscriptionPlans.PREMIUM_MONTH_TIER_0;
|
||||
object2[PREMIUM_TIER_0_MONTHLY] = {productId: PREMIUM_TIER_0_MONTHLY2, interval: MONTH, numPremiumGuild: 0,
|
||||
premiumTier: TIER_0, basePlanId: PREMIUM_MONTH_TIER_0, additionalPlans: []};
|
||||
PREMIUM_TIER_0_YEARLY = value.PREMIUM_TIER_0_YEARLY;
|
||||
const PREMIUM_TIER_0_YEARLY2 = value.PREMIUM_TIER_0_YEARLY;
|
||||
YEAR = SubscriptionIntervalTypes.YEAR;
|
||||
TIER_0 = PremiumTypes.TIER_0;
|
||||
PREMIUM_YEAR_TIER_0 = SubscriptionPlans.PREMIUM_YEAR_TIER_0;
|
||||
object2[PREMIUM_TIER_0_YEARLY] = {productId: PREMIUM_TIER_0_YEARLY2, interval: YEAR, numPremiumGuild: 0,
|
||||
premiumTier: TIER_0, basePlanId: PREMIUM_YEAR_TIER_0, additionalPlans: []};
|
||||
const PREMIUM_TIER_2_PREMIUM_GUILD_1_MONTHLY = value.PREMIUM_TIER_2_PREMIUM_GUILD_1_MONTHLY;
|
||||
const PREMIUM_TIER_2_PREMIUM_GUILD_1_MONTHLY2 = value.PREMIUM_TIER_2_PREMIUM_GUILD_1_MONTHLY;
|
||||
MONTH = SubscriptionIntervalTypes.MONTH;
|
||||
TIER_2 = PremiumTypes.TIER_2;
|
||||
PREMIUM_MONTH_TIER_2 = SubscriptionPlans.PREMIUM_MONTH_TIER_2;
|
||||
PREMIUM_MONTH_GUILD = SubscriptionPlans.PREMIUM_MONTH_GUILD;
|
||||
object2[PREMIUM_TIER_2_PREMIUM_GUILD_1_MONTHLY] = {productId: PREMIUM_TIER_2_PREMIUM_GUILD_1_MONTHLY2,
|
||||
interval: MONTH, numPremiumGuild: 1, premiumTier: TIER_2, basePlanId: PREMIUM_MONTH_TIER_2,
|
||||
additionalPlans: [{quantity: 1, planId: PREMIUM_MONTH_GUILD}]};
|
||||
const PREMIUM_TIER_2_PREMIUM_GUILD_1_YEARLY = value.PREMIUM_TIER_2_PREMIUM_GUILD_1_YEARLY;
|
||||
const PREMIUM_TIER_2_PREMIUM_GUILD_1_YEARLY2 = value.PREMIUM_TIER_2_PREMIUM_GUILD_1_YEARLY;
|
||||
YEAR = SubscriptionIntervalTypes.YEAR;
|
||||
TIER_2 = PremiumTypes.TIER_2;
|
||||
PREMIUM_YEAR_TIER_2 = SubscriptionPlans.PREMIUM_YEAR_TIER_2;
|
||||
let PREMIUM_YEAR_GUILD = SubscriptionPlans.PREMIUM_YEAR_GUILD;
|
||||
object2[PREMIUM_TIER_2_PREMIUM_GUILD_1_YEARLY] = {productId: PREMIUM_TIER_2_PREMIUM_GUILD_1_YEARLY2, interval: YEAR,
|
||||
numPremiumGuild: 1, premiumTier: TIER_2, basePlanId: PREMIUM_YEAR_TIER_2, additionalPlans: [{quantity: 1,
|
||||
planId: PREMIUM_YEAR_GUILD}]};
|
||||
const PREMIUM_TIER_2_PREMIUM_GUILD_2_MONTHLY = value.PREMIUM_TIER_2_PREMIUM_GUILD_2_MONTHLY;
|
||||
const PREMIUM_TIER_2_PREMIUM_GUILD_2_MONTHLY2 = value.PREMIUM_TIER_2_PREMIUM_GUILD_2_MONTHLY;
|
||||
MONTH = SubscriptionIntervalTypes.MONTH;
|
||||
TIER_2 = PremiumTypes.TIER_2;
|
||||
PREMIUM_MONTH_TIER_2 = SubscriptionPlans.PREMIUM_MONTH_TIER_2;
|
||||
PREMIUM_MONTH_GUILD = SubscriptionPlans.PREMIUM_MONTH_GUILD;
|
||||
object2[PREMIUM_TIER_2_PREMIUM_GUILD_2_MONTHLY] = {productId: PREMIUM_TIER_2_PREMIUM_GUILD_2_MONTHLY2,
|
||||
interval: MONTH, numPremiumGuild: 2, premiumTier: TIER_2, basePlanId: PREMIUM_MONTH_TIER_2,
|
||||
additionalPlans: [{quantity: 2, planId: PREMIUM_MONTH_GUILD}]};
|
||||
const PREMIUM_TIER_2_PREMIUM_GUILD_2_YEARLY = value.PREMIUM_TIER_2_PREMIUM_GUILD_2_YEARLY;
|
||||
const PREMIUM_TIER_2_PREMIUM_GUILD_2_YEARLY2 = value.PREMIUM_TIER_2_PREMIUM_GUILD_2_YEARLY;
|
||||
YEAR = SubscriptionIntervalTypes.YEAR;
|
||||
TIER_2 = PremiumTypes.TIER_2;
|
||||
PREMIUM_YEAR_TIER_2 = SubscriptionPlans.PREMIUM_YEAR_TIER_2;
|
||||
PREMIUM_YEAR_GUILD = SubscriptionPlans.PREMIUM_YEAR_GUILD;
|
||||
object2[PREMIUM_TIER_2_PREMIUM_GUILD_2_YEARLY] = {productId: PREMIUM_TIER_2_PREMIUM_GUILD_2_YEARLY2, interval: YEAR,
|
||||
numPremiumGuild: 2, premiumTier: TIER_2, basePlanId: PREMIUM_YEAR_TIER_2, additionalPlans: [{quantity: 2,
|
||||
planId: PREMIUM_YEAR_GUILD}]};
|
||||
const PREMIUM_TIER_2_PREMIUM_GUILD_3_MONTHLY = value.PREMIUM_TIER_2_PREMIUM_GUILD_3_MONTHLY;
|
||||
const PREMIUM_TIER_2_PREMIUM_GUILD_3_MONTHLY2 = value.PREMIUM_TIER_2_PREMIUM_GUILD_3_MONTHLY;
|
||||
MONTH = SubscriptionIntervalTypes.MONTH;
|
||||
TIER_2 = PremiumTypes.TIER_2;
|
||||
PREMIUM_MONTH_TIER_2 = SubscriptionPlans.PREMIUM_MONTH_TIER_2;
|
||||
PREMIUM_MONTH_GUILD = SubscriptionPlans.PREMIUM_MONTH_GUILD;
|
||||
object2[PREMIUM_TIER_2_PREMIUM_GUILD_3_MONTHLY] = {productId: PREMIUM_TIER_2_PREMIUM_GUILD_3_MONTHLY2,
|
||||
interval: MONTH, numPremiumGuild: 3, premiumTier: TIER_2, basePlanId: PREMIUM_MONTH_TIER_2,
|
||||
additionalPlans: [{quantity: 3, planId: PREMIUM_MONTH_GUILD}]};
|
||||
const PREMIUM_TIER_2_PREMIUM_GUILD_3_YEARLY = value.PREMIUM_TIER_2_PREMIUM_GUILD_3_YEARLY;
|
||||
const PREMIUM_TIER_2_PREMIUM_GUILD_3_YEARLY2 = value.PREMIUM_TIER_2_PREMIUM_GUILD_3_YEARLY;
|
||||
YEAR = SubscriptionIntervalTypes.YEAR;
|
||||
TIER_2 = PremiumTypes.TIER_2;
|
||||
PREMIUM_YEAR_TIER_2 = SubscriptionPlans.PREMIUM_YEAR_TIER_2;
|
||||
PREMIUM_YEAR_GUILD = SubscriptionPlans.PREMIUM_YEAR_GUILD;
|
||||
object2[PREMIUM_TIER_2_PREMIUM_GUILD_3_YEARLY] = {productId: PREMIUM_TIER_2_PREMIUM_GUILD_3_YEARLY2, interval: YEAR,
|
||||
numPremiumGuild: 3, premiumTier: TIER_2, basePlanId: PREMIUM_YEAR_TIER_2, additionalPlans: [{quantity: 3,
|
||||
planId: PREMIUM_YEAR_GUILD}]};
|
||||
const PREMIUM_TIER_2_PREMIUM_GUILD_5_MONTHLY = value.PREMIUM_TIER_2_PREMIUM_GUILD_5_MONTHLY;
|
||||
const PREMIUM_TIER_2_PREMIUM_GUILD_5_MONTHLY2 = value.PREMIUM_TIER_2_PREMIUM_GUILD_5_MONTHLY;
|
||||
MONTH = SubscriptionIntervalTypes.MONTH;
|
||||
TIER_2 = PremiumTypes.TIER_2;
|
||||
PREMIUM_MONTH_TIER_2 = SubscriptionPlans.PREMIUM_MONTH_TIER_2;
|
||||
PREMIUM_MONTH_GUILD = SubscriptionPlans.PREMIUM_MONTH_GUILD;
|
||||
object2[PREMIUM_TIER_2_PREMIUM_GUILD_5_MONTHLY] = {productId: PREMIUM_TIER_2_PREMIUM_GUILD_5_MONTHLY2,
|
||||
interval: MONTH, numPremiumGuild: 5, premiumTier: TIER_2, basePlanId: PREMIUM_MONTH_TIER_2,
|
||||
additionalPlans: [{quantity: 5, planId: PREMIUM_MONTH_GUILD}]};
|
||||
const PREMIUM_TIER_2_PREMIUM_GUILD_5_YEARLY = value.PREMIUM_TIER_2_PREMIUM_GUILD_5_YEARLY;
|
||||
const PREMIUM_TIER_2_PREMIUM_GUILD_5_YEARLY2 = value.PREMIUM_TIER_2_PREMIUM_GUILD_5_YEARLY;
|
||||
YEAR = SubscriptionIntervalTypes.YEAR;
|
||||
TIER_2 = PremiumTypes.TIER_2;
|
||||
PREMIUM_YEAR_TIER_2 = SubscriptionPlans.PREMIUM_YEAR_TIER_2;
|
||||
PREMIUM_YEAR_GUILD = SubscriptionPlans.PREMIUM_YEAR_GUILD;
|
||||
object2[PREMIUM_TIER_2_PREMIUM_GUILD_5_YEARLY] = {productId: PREMIUM_TIER_2_PREMIUM_GUILD_5_YEARLY2, interval: YEAR,
|
||||
numPremiumGuild: 5, premiumTier: TIER_2, basePlanId: PREMIUM_YEAR_TIER_2, additionalPlans: [{quantity: 5,
|
||||
planId: PREMIUM_YEAR_GUILD}]};
|
||||
const PREMIUM_TIER_2_PREMIUM_GUILD_10_MONTHLY = value.PREMIUM_TIER_2_PREMIUM_GUILD_10_MONTHLY;
|
||||
const PREMIUM_TIER_2_PREMIUM_GUILD_10_MONTHLY2 = value.PREMIUM_TIER_2_PREMIUM_GUILD_10_MONTHLY;
|
||||
MONTH = SubscriptionIntervalTypes.MONTH;
|
||||
TIER_2 = PremiumTypes.TIER_2;
|
||||
PREMIUM_MONTH_TIER_2 = SubscriptionPlans.PREMIUM_MONTH_TIER_2;
|
||||
PREMIUM_MONTH_GUILD = SubscriptionPlans.PREMIUM_MONTH_GUILD;
|
||||
object2[PREMIUM_TIER_2_PREMIUM_GUILD_10_MONTHLY] = {productId: PREMIUM_TIER_2_PREMIUM_GUILD_10_MONTHLY2,
|
||||
interval: MONTH, numPremiumGuild: 10, premiumTier: TIER_2, basePlanId: PREMIUM_MONTH_TIER_2,
|
||||
additionalPlans: [{quantity: 10, planId: PREMIUM_MONTH_GUILD}]};
|
||||
const PREMIUM_TIER_2_PREMIUM_GUILD_13_MONTHLY = value.PREMIUM_TIER_2_PREMIUM_GUILD_13_MONTHLY;
|
||||
const PREMIUM_TIER_2_PREMIUM_GUILD_13_MONTHLY2 = value.PREMIUM_TIER_2_PREMIUM_GUILD_13_MONTHLY;
|
||||
MONTH = SubscriptionIntervalTypes.MONTH;
|
||||
TIER_2 = PremiumTypes.TIER_2;
|
||||
PREMIUM_MONTH_TIER_2 = SubscriptionPlans.PREMIUM_MONTH_TIER_2;
|
||||
PREMIUM_MONTH_GUILD = SubscriptionPlans.PREMIUM_MONTH_GUILD;
|
||||
object2[PREMIUM_TIER_2_PREMIUM_GUILD_13_MONTHLY] = {productId: PREMIUM_TIER_2_PREMIUM_GUILD_13_MONTHLY2,
|
||||
interval: MONTH, numPremiumGuild: 13, premiumTier: TIER_2, basePlanId: PREMIUM_MONTH_TIER_2,
|
||||
additionalPlans: [{quantity: 13, planId: PREMIUM_MONTH_GUILD}]};
|
||||
const PREMIUM_TIER_2_PREMIUM_GUILD_28_MONTHLY = value.PREMIUM_TIER_2_PREMIUM_GUILD_28_MONTHLY;
|
||||
const PREMIUM_TIER_2_PREMIUM_GUILD_28_MONTHLY2 = value.PREMIUM_TIER_2_PREMIUM_GUILD_28_MONTHLY;
|
||||
MONTH = SubscriptionIntervalTypes.MONTH;
|
||||
TIER_2 = PremiumTypes.TIER_2;
|
||||
PREMIUM_MONTH_TIER_2 = SubscriptionPlans.PREMIUM_MONTH_TIER_2;
|
||||
PREMIUM_MONTH_GUILD = SubscriptionPlans.PREMIUM_MONTH_GUILD;
|
||||
object2[PREMIUM_TIER_2_PREMIUM_GUILD_28_MONTHLY] = {productId: PREMIUM_TIER_2_PREMIUM_GUILD_28_MONTHLY2,
|
||||
interval: MONTH, numPremiumGuild: 28, premiumTier: TIER_2, basePlanId: PREMIUM_MONTH_TIER_2,
|
||||
additionalPlans: [{quantity: 28, planId: PREMIUM_MONTH_GUILD}]};
|
||||
const PREMIUM_TIER_1_PREMIUM_GUILD_1_MONTHLY = value.PREMIUM_TIER_1_PREMIUM_GUILD_1_MONTHLY;
|
||||
const PREMIUM_TIER_1_PREMIUM_GUILD_1_MONTHLY2 = value.PREMIUM_TIER_1_PREMIUM_GUILD_1_MONTHLY;
|
||||
MONTH = SubscriptionIntervalTypes.MONTH;
|
||||
TIER_1 = PremiumTypes.TIER_1;
|
||||
PREMIUM_MONTH_TIER_1 = SubscriptionPlans.PREMIUM_MONTH_TIER_1;
|
||||
PREMIUM_MONTH_GUILD = SubscriptionPlans.PREMIUM_MONTH_GUILD;
|
||||
object2[PREMIUM_TIER_1_PREMIUM_GUILD_1_MONTHLY] = {productId: PREMIUM_TIER_1_PREMIUM_GUILD_1_MONTHLY2,
|
||||
interval: MONTH, numPremiumGuild: 1, premiumTier: TIER_1, basePlanId: PREMIUM_MONTH_TIER_1,
|
||||
additionalPlans: [{quantity: 1, planId: PREMIUM_MONTH_GUILD}]};
|
||||
const PREMIUM_TIER_1_PREMIUM_GUILD_1_YEARLY = value.PREMIUM_TIER_1_PREMIUM_GUILD_1_YEARLY;
|
||||
const PREMIUM_TIER_1_PREMIUM_GUILD_1_YEARLY2 = value.PREMIUM_TIER_1_PREMIUM_GUILD_1_YEARLY;
|
||||
YEAR = SubscriptionIntervalTypes.YEAR;
|
||||
TIER_1 = PremiumTypes.TIER_1;
|
||||
PREMIUM_YEAR_TIER_1 = SubscriptionPlans.PREMIUM_YEAR_TIER_1;
|
||||
PREMIUM_YEAR_GUILD = SubscriptionPlans.PREMIUM_YEAR_GUILD;
|
||||
object2[PREMIUM_TIER_1_PREMIUM_GUILD_1_YEARLY] = {productId: PREMIUM_TIER_1_PREMIUM_GUILD_1_YEARLY2, interval: YEAR,
|
||||
numPremiumGuild: 1, premiumTier: TIER_1, basePlanId: PREMIUM_YEAR_TIER_1, additionalPlans: [{quantity: 1,
|
||||
planId: PREMIUM_YEAR_GUILD}]};
|
||||
PREMIUM_GUILD_1_MONTHLY = value.PREMIUM_GUILD_1_MONTHLY;
|
||||
const PREMIUM_GUILD_1_MONTHLY2 = value.PREMIUM_GUILD_1_MONTHLY;
|
||||
MONTH = SubscriptionIntervalTypes.MONTH;
|
||||
let NONE_MONTH = SubscriptionPlans.NONE_MONTH;
|
||||
PREMIUM_MONTH_GUILD = SubscriptionPlans.PREMIUM_MONTH_GUILD;
|
||||
object2[PREMIUM_GUILD_1_MONTHLY] = {productId: PREMIUM_GUILD_1_MONTHLY2, interval: MONTH, numPremiumGuild: 1,
|
||||
premiumTier: null, basePlanId: NONE_MONTH, additionalPlans: [{quantity: 1, planId: PREMIUM_MONTH_GUILD}]};
|
||||
const PREMIUM_GUILD_2_MONTHLY = value.PREMIUM_GUILD_2_MONTHLY;
|
||||
const PREMIUM_GUILD_2_MONTHLY2 = value.PREMIUM_GUILD_2_MONTHLY;
|
||||
MONTH = SubscriptionIntervalTypes.MONTH;
|
||||
NONE_MONTH = SubscriptionPlans.NONE_MONTH;
|
||||
PREMIUM_MONTH_GUILD = SubscriptionPlans.PREMIUM_MONTH_GUILD;
|
||||
object2[PREMIUM_GUILD_2_MONTHLY] = {productId: PREMIUM_GUILD_2_MONTHLY2, interval: MONTH, numPremiumGuild: 2,
|
||||
premiumTier: null, basePlanId: NONE_MONTH, additionalPlans: [{quantity: 2, planId: PREMIUM_MONTH_GUILD}]};
|
||||
const object4 = {};
|
||||
PREMIUM_TIER_2_MONTHLY = value.PREMIUM_TIER_2_MONTHLY;
|
||||
PREMIUM_TIER_2_YEARLY = value.PREMIUM_TIER_2_YEARLY;
|
||||
object4[PREMIUM_TIER_2_LIKELIHOOD_TRIAL_ID] = {[PREMIUM_TIER_2_MONTHLY]: 'premium-tier-2-monthly-likelihood',
|
||||
[PREMIUM_TIER_2_YEARLY]: 'premium-tier-2-yearly-likelihood'};
|
||||
PREMIUM_TIER_2_MONTHLY = value.PREMIUM_TIER_2_MONTHLY;
|
||||
PREMIUM_TIER_2_YEARLY = value.PREMIUM_TIER_2_YEARLY;
|
||||
object4[PREMIUM_TIER_2_REACTIVATION_TRIAL_ID] = {[PREMIUM_TIER_2_MONTHLY]: 'premium-tier-2-monthly-reactivation',
|
||||
[PREMIUM_TIER_2_YEARLY]: 'premium-tier-2-yearly-reactivation'};
|
||||
PREMIUM_TIER_0_MONTHLY = value.PREMIUM_TIER_0_MONTHLY;
|
||||
PREMIUM_TIER_0_YEARLY = value.PREMIUM_TIER_0_YEARLY;
|
||||
object4[PREMIUM_TIER_0_LIKELIHOOD_TRIAL_ID] = {[PREMIUM_TIER_0_MONTHLY]: 'premium-tier-0-monthly-likelihood',
|
||||
[PREMIUM_TIER_0_YEARLY]: 'premium-tier-0-yearly-likelihood'};
|
||||
PREMIUM_TIER_2_MONTHLY = value.PREMIUM_TIER_2_MONTHLY;
|
||||
PREMIUM_TIER_2_YEARLY = value.PREMIUM_TIER_2_YEARLY;
|
||||
object4[PREMIUM_TIER_2_TRIAL_FOR_EVERYONE_TRIAL_ID] = {[PREMIUM_TIER_2_MONTHLY]: 'premium-tier-2-monthly-q4-drop',
|
||||
[PREMIUM_TIER_2_YEARLY]: 'premium-tier-2-yearly-q4-drop'};
|
||||
PREMIUM_TIER_2_MONTHLY = value.PREMIUM_TIER_2_MONTHLY;
|
||||
PREMIUM_TIER_2_YEARLY = value.PREMIUM_TIER_2_YEARLY;
|
||||
object4[PREMIUM_TIER_2_REFERRAL_TRIAL_ID] = {[PREMIUM_TIER_2_MONTHLY]: 'premium-tier-2-monthly-referral-trial',
|
||||
[PREMIUM_TIER_2_YEARLY]: 'premium-tier-2-yearly-referral-trial'};
|
||||
PREMIUM_TIER_2_MONTHLY = value.PREMIUM_TIER_2_MONTHLY;
|
||||
PREMIUM_TIER_2_YEARLY = value.PREMIUM_TIER_2_YEARLY;
|
||||
object4[PREMIUM_TIER_2_HFU_TWO_WEEK_TRIAL_ID] = {[PREMIUM_TIER_2_MONTHLY]: 'premium-tier-2-monthly-hfu-two-week-trial',
|
||||
[PREMIUM_TIER_2_YEARLY]: 'premium-tier-2-yearly-hfu-two-week-trial'};
|
||||
const object5 = {};
|
||||
PREMIUM_TIER_2_MONTHLY = value.PREMIUM_TIER_2_MONTHLY;
|
||||
object5[PREMIUM_TIER_2_LIKELIHOOD_1_MONTH_40_PERCENT_DISCOUNT_ID] = {[PREMIUM_TIER_2_MONTHLY]: 'premium-tier-2-monthly-likelihood-discount'};
|
||||
PREMIUM_TIER_2_MONTHLY = value.PREMIUM_TIER_2_MONTHLY;
|
||||
object5[PREMIUM_TIER_2_REENGAGEMENT_1_MONTH_40_PERCENT_DISCOUNT_ID] = {[PREMIUM_TIER_2_MONTHLY]: 'premium-tier-2-monthly-reengagement-discount'};
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/premium/native/ProductIds.android.tsx');
|
||||
exports.ProductIds = value;
|
||||
exports.GenericProductIds = [];
|
||||
exports.IAPProductIds = items;
|
||||
exports.SubscriptionProductIds = r7;
|
||||
exports.BasePlanIdToProductId = value3;
|
||||
exports.AppStorePremiumProductIdsToPremiumBundledItems = object2;
|
||||
exports.TrialIdToProductOfferId = object4;
|
||||
exports.DiscountIdToProductOfferId = object5;
|
||||
exports.BOGO_OFFER_ID = 'premium-tier-2-monthly-bogo';
|
||||
exports.getProductIdForGift = getProductIdForGift;
|
||||
exports.getPlanIdForGift = getPlanIdForGift;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,346 @@
|
||||
/* Metro module 7033; source: modules/premium/native/ProductIds.ios.tsx; dependencies: [1880, 7034, 2] */
|
||||
function _fun55737(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#55737, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7211:6, offset: 0x013afcb3, size: 3237 bytes, params: 8, frame: 37
|
||||
let Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
let value = require(1880) /* metro dependency 1880: PremiumConstants */;
|
||||
const PremiumTypes = value.PremiumTypes;
|
||||
const SubscriptionIntervalTypes = value.SubscriptionIntervalTypes;
|
||||
const SubscriptionPlans = value.SubscriptionPlans;
|
||||
const PREMIUM_TIER_2_LIKELIHOOD_TRIAL_ID = value.PREMIUM_TIER_2_LIKELIHOOD_TRIAL_ID;
|
||||
const PREMIUM_TIER_2_REACTIVATION_TRIAL_ID = value.PREMIUM_TIER_2_REACTIVATION_TRIAL_ID;
|
||||
const PREMIUM_TIER_0_LIKELIHOOD_TRIAL_ID = value.PREMIUM_TIER_0_LIKELIHOOD_TRIAL_ID;
|
||||
const PREMIUM_TIER_2_TRIAL_FOR_EVERYONE_TRIAL_ID = value.PREMIUM_TIER_2_TRIAL_FOR_EVERYONE_TRIAL_ID;
|
||||
const PREMIUM_TIER_2_REFERRAL_TRIAL_ID = value.PREMIUM_TIER_2_REFERRAL_TRIAL_ID;
|
||||
const PREMIUM_TIER_2_LIKELIHOOD_1_MONTH_40_PERCENT_DISCOUNT_ID = value.PREMIUM_TIER_2_LIKELIHOOD_1_MONTH_40_PERCENT_DISCOUNT_ID;
|
||||
const PREMIUM_TIER_2_REENGAGEMENT_1_MONTH_40_PERCENT_DISCOUNT_ID = value.PREMIUM_TIER_2_REENGAGEMENT_1_MONTH_40_PERCENT_DISCOUNT_ID;
|
||||
const PREMIUM_TIER_2_HFU_TWO_WEEK_TRIAL_ID = value.PREMIUM_TIER_2_HFU_TWO_WEEK_TRIAL_ID;
|
||||
Object = global.Object;
|
||||
let freeze = Object.freeze;
|
||||
const AppleProductIds = (require(7034) /* metro dependency 7034: AppleProductIds */).AppleProductIds;
|
||||
let GENERIC_SUBSCRIPTION = AppleProductIds.GENERIC_SUBSCRIPTION;
|
||||
let GENERIC_CONSUMABLE = AppleProductIds.GENERIC_CONSUMABLE;
|
||||
value = Reflect.apply(freeze, Object, [{'PREMIUM_MONTH_TIER_1': 'premium_month_tier_1.1',
|
||||
'PREMIUM_YEAR_TIER_1': 'premium_year_tier_1.1', 'PREMIUM_MONTH_TIER_2': 'premium_month_tier_2.1',
|
||||
'PREMIUM_YEAR_TIER_2': 'premium_year_tier_2.1', 'PREMIUM_GIFT_MONTH_TIER_0': 'premium_month_tier_0',
|
||||
'PREMIUM_GIFT_YEAR_TIER_0': 'premium_year_tier_0', 'PREMIUM_GIFT_MONTH_TIER_1': 'premium_month_tier_1.2',
|
||||
'PREMIUM_GIFT_YEAR_TIER_1': 'premium_year_tier_1.2', 'PREMIUM_GIFT_MONTH_TIER_2': 'premium_month_tier_2.2',
|
||||
'PREMIUM_GIFT_YEAR_TIER_2': 'premium_year_tier_2.2', 'PREMIUM_TIER_2_MONTHLY': 'premium_tier_2_monthly',
|
||||
'PREMIUM_TIER_2_YEARLY': 'premium_tier_2_yearly', 'PREMIUM_TIER_1_MONTHLY': 'premium_tier_1_monthly',
|
||||
'PREMIUM_TIER_1_YEARLY': 'premium_tier_1_yearly', 'PREMIUM_TIER_0_MONTHLY': 'premium_tier_0_monthly',
|
||||
'PREMIUM_TIER_0_YEARLY': 'premium_tier_0_yearly',
|
||||
'PREMIUM_TIER_2_PREMIUM_GUILD_1_MONTHLY': 'premium_tier_2_premium_guild_1_monthly',
|
||||
'PREMIUM_TIER_2_PREMIUM_GUILD_1_YEARLY': 'premium_tier_2_premium_guild_1_yearly',
|
||||
'PREMIUM_TIER_2_PREMIUM_GUILD_2_MONTHLY': 'premium_tier_2_premium_guild_2_monthly',
|
||||
'PREMIUM_TIER_2_PREMIUM_GUILD_2_YEARLY': 'premium_tier_2_premium_guild_2_yearly',
|
||||
'PREMIUM_TIER_2_PREMIUM_GUILD_3_MONTHLY': 'premium_tier_2_premium_guild_3_monthly',
|
||||
'PREMIUM_TIER_2_PREMIUM_GUILD_3_YEARLY': 'premium_tier_2_premium_guild_3_yearly',
|
||||
'PREMIUM_TIER_2_PREMIUM_GUILD_5_MONTHLY': 'premium_tier_2_premium_guild_5_monthly',
|
||||
'PREMIUM_TIER_2_PREMIUM_GUILD_5_YEARLY': 'premium_tier_2_premium_guild_5_yearly',
|
||||
'PREMIUM_TIER_2_PREMIUM_GUILD_10_MONTHLY': 'premium_tier_2_premium_guild_10_monthly',
|
||||
'PREMIUM_TIER_2_PREMIUM_GUILD_10_YEARLY': 'premium_tier_2_premium_guild_10_yearly',
|
||||
'PREMIUM_TIER_2_PREMIUM_GUILD_13_MONTHLY': 'premium_tier_2_premium_guild_13_monthly',
|
||||
'PREMIUM_TIER_2_PREMIUM_GUILD_13_YEARLY': 'premium_tier_2_premium_guild_13_yearly',
|
||||
'PREMIUM_TIER_2_PREMIUM_GUILD_28_MONTHLY': 'premium_tier_2_premium_guild_28_monthly',
|
||||
'PREMIUM_TIER_2_PREMIUM_GUILD_28_YEARLY': 'premium_tier_2_premium_guild_28_yearly',
|
||||
'PREMIUM_TIER_1_PREMIUM_GUILD_1_MONTHLY': 'premium_tier_1_premium_guild_1_monthly',
|
||||
'PREMIUM_TIER_1_PREMIUM_GUILD_1_YEARLY': 'premium_tier_1_premium_guild_1_yearly',
|
||||
'PREMIUM_GUILD_1_MONTHLY': 'premium_guild_1_monthly', 'PREMIUM_GUILD_2_MONTHLY': 'premium_guild_2_monthly',
|
||||
'STICKER_PACK_199': 'sticker_pack_199', 'STICKER_PACK_299': 'sticker_pack_299',
|
||||
GENERIC_SUBSCRIPTION: GENERIC_SUBSCRIPTION, GENERIC_CONSUMABLE: GENERIC_CONSUMABLE}]);
|
||||
GENERIC_SUBSCRIPTION = AppleProductIds.GENERIC_SUBSCRIPTION;
|
||||
items = [GENERIC_SUBSCRIPTION];
|
||||
GENERIC_CONSUMABLE = AppleProductIds.GENERIC_CONSUMABLE;
|
||||
items[1] = GENERIC_CONSUMABLE;
|
||||
Object = global.Object;
|
||||
freeze = Object.freeze;
|
||||
let PREMIUM_MONTH_TIER_0 = SubscriptionPlans.PREMIUM_MONTH_TIER_0;
|
||||
let PREMIUM_TIER_0_MONTHLY = value.PREMIUM_TIER_0_MONTHLY;
|
||||
let PREMIUM_MONTH_TIER_1 = SubscriptionPlans.PREMIUM_MONTH_TIER_1;
|
||||
let PREMIUM_TIER_1_MONTHLY = value.PREMIUM_TIER_1_MONTHLY;
|
||||
let PREMIUM_MONTH_TIER_2 = SubscriptionPlans.PREMIUM_MONTH_TIER_2;
|
||||
let PREMIUM_TIER_2_MONTHLY = value.PREMIUM_TIER_2_MONTHLY;
|
||||
let PREMIUM_MONTH_GUILD = SubscriptionPlans.PREMIUM_MONTH_GUILD;
|
||||
let PREMIUM_GUILD_1_MONTHLY = value.PREMIUM_GUILD_1_MONTHLY;
|
||||
let PREMIUM_YEAR_TIER_0 = SubscriptionPlans.PREMIUM_YEAR_TIER_0;
|
||||
let PREMIUM_TIER_0_YEARLY = value.PREMIUM_TIER_0_YEARLY;
|
||||
let PREMIUM_YEAR_TIER_1 = SubscriptionPlans.PREMIUM_YEAR_TIER_1;
|
||||
let PREMIUM_TIER_1_YEARLY = value.PREMIUM_TIER_1_YEARLY;
|
||||
let PREMIUM_YEAR_TIER_2 = SubscriptionPlans.PREMIUM_YEAR_TIER_2;
|
||||
let PREMIUM_TIER_2_YEARLY = value.PREMIUM_TIER_2_YEARLY;
|
||||
const value2 = Reflect.apply(freeze, Object, [{[PREMIUM_MONTH_TIER_0]: PREMIUM_TIER_0_MONTHLY,
|
||||
[PREMIUM_MONTH_TIER_1]: PREMIUM_TIER_1_MONTHLY, [PREMIUM_MONTH_TIER_2]: PREMIUM_TIER_2_MONTHLY,
|
||||
[PREMIUM_MONTH_GUILD]: PREMIUM_GUILD_1_MONTHLY, [PREMIUM_YEAR_TIER_0]: PREMIUM_TIER_0_YEARLY,
|
||||
[PREMIUM_YEAR_TIER_1]: PREMIUM_TIER_1_YEARLY, [PREMIUM_YEAR_TIER_2]: PREMIUM_TIER_2_YEARLY}]);
|
||||
const object2 = {};
|
||||
PREMIUM_MONTH_TIER_1 = value.PREMIUM_MONTH_TIER_1;
|
||||
const PREMIUM_MONTH_TIER_12 = value.PREMIUM_MONTH_TIER_1;
|
||||
let MONTH = SubscriptionIntervalTypes.MONTH;
|
||||
let TIER_1 = PremiumTypes.TIER_1;
|
||||
const PREMIUM_MONTH_TIER_13 = SubscriptionPlans.PREMIUM_MONTH_TIER_1;
|
||||
object2[PREMIUM_MONTH_TIER_1] = {productId: PREMIUM_MONTH_TIER_12, interval: MONTH, numPremiumGuild: 0,
|
||||
premiumTier: TIER_1, basePlanId: PREMIUM_MONTH_TIER_13, additionalPlans: [], isDeprecated: true};
|
||||
PREMIUM_YEAR_TIER_1 = value.PREMIUM_YEAR_TIER_1;
|
||||
const PREMIUM_YEAR_TIER_12 = value.PREMIUM_YEAR_TIER_1;
|
||||
let YEAR = SubscriptionIntervalTypes.YEAR;
|
||||
TIER_1 = PremiumTypes.TIER_1;
|
||||
const PREMIUM_YEAR_TIER_13 = SubscriptionPlans.PREMIUM_YEAR_TIER_1;
|
||||
object2[PREMIUM_YEAR_TIER_1] = {productId: PREMIUM_YEAR_TIER_12, interval: YEAR, numPremiumGuild: 0,
|
||||
premiumTier: TIER_1, basePlanId: PREMIUM_YEAR_TIER_13, additionalPlans: [], isDeprecated: true};
|
||||
PREMIUM_MONTH_TIER_2 = value.PREMIUM_MONTH_TIER_2;
|
||||
const PREMIUM_MONTH_TIER_22 = value.PREMIUM_MONTH_TIER_2;
|
||||
MONTH = SubscriptionIntervalTypes.MONTH;
|
||||
let TIER_2 = PremiumTypes.TIER_2;
|
||||
const PREMIUM_MONTH_TIER_23 = SubscriptionPlans.PREMIUM_MONTH_TIER_2;
|
||||
object2[PREMIUM_MONTH_TIER_2] = {productId: PREMIUM_MONTH_TIER_22, interval: MONTH, numPremiumGuild: 0,
|
||||
premiumTier: TIER_2, basePlanId: PREMIUM_MONTH_TIER_23, additionalPlans: [], isDeprecated: true};
|
||||
PREMIUM_YEAR_TIER_2 = value.PREMIUM_YEAR_TIER_2;
|
||||
const PREMIUM_YEAR_TIER_22 = value.PREMIUM_YEAR_TIER_2;
|
||||
YEAR = SubscriptionIntervalTypes.YEAR;
|
||||
TIER_2 = PremiumTypes.TIER_2;
|
||||
const PREMIUM_YEAR_TIER_23 = SubscriptionPlans.PREMIUM_YEAR_TIER_2;
|
||||
object2[PREMIUM_YEAR_TIER_2] = {productId: PREMIUM_YEAR_TIER_22, interval: YEAR, numPremiumGuild: 0,
|
||||
premiumTier: TIER_2, basePlanId: PREMIUM_YEAR_TIER_23, additionalPlans: [], isDeprecated: true};
|
||||
PREMIUM_TIER_2_MONTHLY = value.PREMIUM_TIER_2_MONTHLY;
|
||||
const PREMIUM_TIER_2_MONTHLY2 = value.PREMIUM_TIER_2_MONTHLY;
|
||||
MONTH = SubscriptionIntervalTypes.MONTH;
|
||||
TIER_2 = PremiumTypes.TIER_2;
|
||||
PREMIUM_MONTH_TIER_2 = SubscriptionPlans.PREMIUM_MONTH_TIER_2;
|
||||
object2[PREMIUM_TIER_2_MONTHLY] = {productId: PREMIUM_TIER_2_MONTHLY2, interval: MONTH, numPremiumGuild: 0,
|
||||
premiumTier: TIER_2, basePlanId: PREMIUM_MONTH_TIER_2, additionalPlans: []};
|
||||
PREMIUM_TIER_2_YEARLY = value.PREMIUM_TIER_2_YEARLY;
|
||||
const PREMIUM_TIER_2_YEARLY2 = value.PREMIUM_TIER_2_YEARLY;
|
||||
YEAR = SubscriptionIntervalTypes.YEAR;
|
||||
TIER_2 = PremiumTypes.TIER_2;
|
||||
PREMIUM_YEAR_TIER_2 = SubscriptionPlans.PREMIUM_YEAR_TIER_2;
|
||||
object2[PREMIUM_TIER_2_YEARLY] = {productId: PREMIUM_TIER_2_YEARLY2, interval: YEAR, numPremiumGuild: 0,
|
||||
premiumTier: TIER_2, basePlanId: PREMIUM_YEAR_TIER_2, additionalPlans: []};
|
||||
PREMIUM_TIER_1_MONTHLY = value.PREMIUM_TIER_1_MONTHLY;
|
||||
const PREMIUM_TIER_1_MONTHLY2 = value.PREMIUM_TIER_1_MONTHLY;
|
||||
MONTH = SubscriptionIntervalTypes.MONTH;
|
||||
TIER_1 = PremiumTypes.TIER_1;
|
||||
PREMIUM_MONTH_TIER_1 = SubscriptionPlans.PREMIUM_MONTH_TIER_1;
|
||||
object2[PREMIUM_TIER_1_MONTHLY] = {productId: PREMIUM_TIER_1_MONTHLY2, interval: MONTH, numPremiumGuild: 0,
|
||||
premiumTier: TIER_1, basePlanId: PREMIUM_MONTH_TIER_1, additionalPlans: []};
|
||||
PREMIUM_TIER_1_YEARLY = value.PREMIUM_TIER_1_YEARLY;
|
||||
const PREMIUM_TIER_1_YEARLY2 = value.PREMIUM_TIER_1_YEARLY;
|
||||
YEAR = SubscriptionIntervalTypes.YEAR;
|
||||
TIER_1 = PremiumTypes.TIER_1;
|
||||
PREMIUM_YEAR_TIER_1 = SubscriptionPlans.PREMIUM_YEAR_TIER_1;
|
||||
object2[PREMIUM_TIER_1_YEARLY] = {productId: PREMIUM_TIER_1_YEARLY2, interval: YEAR, numPremiumGuild: 0,
|
||||
premiumTier: TIER_1, basePlanId: PREMIUM_YEAR_TIER_1, additionalPlans: []};
|
||||
PREMIUM_TIER_0_MONTHLY = value.PREMIUM_TIER_0_MONTHLY;
|
||||
const PREMIUM_TIER_0_MONTHLY2 = value.PREMIUM_TIER_0_MONTHLY;
|
||||
MONTH = SubscriptionIntervalTypes.MONTH;
|
||||
let TIER_0 = PremiumTypes.TIER_0;
|
||||
PREMIUM_MONTH_TIER_0 = SubscriptionPlans.PREMIUM_MONTH_TIER_0;
|
||||
object2[PREMIUM_TIER_0_MONTHLY] = {productId: PREMIUM_TIER_0_MONTHLY2, interval: MONTH, numPremiumGuild: 0,
|
||||
premiumTier: TIER_0, basePlanId: PREMIUM_MONTH_TIER_0, additionalPlans: []};
|
||||
PREMIUM_TIER_0_YEARLY = value.PREMIUM_TIER_0_YEARLY;
|
||||
const PREMIUM_TIER_0_YEARLY2 = value.PREMIUM_TIER_0_YEARLY;
|
||||
YEAR = SubscriptionIntervalTypes.YEAR;
|
||||
TIER_0 = PremiumTypes.TIER_0;
|
||||
PREMIUM_YEAR_TIER_0 = SubscriptionPlans.PREMIUM_YEAR_TIER_0;
|
||||
object2[PREMIUM_TIER_0_YEARLY] = {productId: PREMIUM_TIER_0_YEARLY2, interval: YEAR, numPremiumGuild: 0,
|
||||
premiumTier: TIER_0, basePlanId: PREMIUM_YEAR_TIER_0, additionalPlans: []};
|
||||
const PREMIUM_TIER_2_PREMIUM_GUILD_1_MONTHLY = value.PREMIUM_TIER_2_PREMIUM_GUILD_1_MONTHLY;
|
||||
const PREMIUM_TIER_2_PREMIUM_GUILD_1_MONTHLY2 = value.PREMIUM_TIER_2_PREMIUM_GUILD_1_MONTHLY;
|
||||
MONTH = SubscriptionIntervalTypes.MONTH;
|
||||
TIER_2 = PremiumTypes.TIER_2;
|
||||
PREMIUM_MONTH_TIER_2 = SubscriptionPlans.PREMIUM_MONTH_TIER_2;
|
||||
PREMIUM_MONTH_GUILD = SubscriptionPlans.PREMIUM_MONTH_GUILD;
|
||||
object2[PREMIUM_TIER_2_PREMIUM_GUILD_1_MONTHLY] = {productId: PREMIUM_TIER_2_PREMIUM_GUILD_1_MONTHLY2,
|
||||
interval: MONTH, numPremiumGuild: 1, premiumTier: TIER_2, basePlanId: PREMIUM_MONTH_TIER_2,
|
||||
additionalPlans: [{quantity: 1, planId: PREMIUM_MONTH_GUILD}]};
|
||||
const PREMIUM_TIER_2_PREMIUM_GUILD_1_YEARLY = value.PREMIUM_TIER_2_PREMIUM_GUILD_1_YEARLY;
|
||||
const PREMIUM_TIER_2_PREMIUM_GUILD_1_YEARLY2 = value.PREMIUM_TIER_2_PREMIUM_GUILD_1_YEARLY;
|
||||
YEAR = SubscriptionIntervalTypes.YEAR;
|
||||
TIER_2 = PremiumTypes.TIER_2;
|
||||
PREMIUM_YEAR_TIER_2 = SubscriptionPlans.PREMIUM_YEAR_TIER_2;
|
||||
let PREMIUM_YEAR_GUILD = SubscriptionPlans.PREMIUM_YEAR_GUILD;
|
||||
object2[PREMIUM_TIER_2_PREMIUM_GUILD_1_YEARLY] = {productId: PREMIUM_TIER_2_PREMIUM_GUILD_1_YEARLY2, interval: YEAR,
|
||||
numPremiumGuild: 1, premiumTier: TIER_2, basePlanId: PREMIUM_YEAR_TIER_2, additionalPlans: [{quantity: 1,
|
||||
planId: PREMIUM_YEAR_GUILD}]};
|
||||
const PREMIUM_TIER_2_PREMIUM_GUILD_2_MONTHLY = value.PREMIUM_TIER_2_PREMIUM_GUILD_2_MONTHLY;
|
||||
const PREMIUM_TIER_2_PREMIUM_GUILD_2_MONTHLY2 = value.PREMIUM_TIER_2_PREMIUM_GUILD_2_MONTHLY;
|
||||
MONTH = SubscriptionIntervalTypes.MONTH;
|
||||
TIER_2 = PremiumTypes.TIER_2;
|
||||
PREMIUM_MONTH_TIER_2 = SubscriptionPlans.PREMIUM_MONTH_TIER_2;
|
||||
PREMIUM_MONTH_GUILD = SubscriptionPlans.PREMIUM_MONTH_GUILD;
|
||||
object2[PREMIUM_TIER_2_PREMIUM_GUILD_2_MONTHLY] = {productId: PREMIUM_TIER_2_PREMIUM_GUILD_2_MONTHLY2,
|
||||
interval: MONTH, numPremiumGuild: 2, premiumTier: TIER_2, basePlanId: PREMIUM_MONTH_TIER_2,
|
||||
additionalPlans: [{quantity: 2, planId: PREMIUM_MONTH_GUILD}]};
|
||||
const PREMIUM_TIER_2_PREMIUM_GUILD_2_YEARLY = value.PREMIUM_TIER_2_PREMIUM_GUILD_2_YEARLY;
|
||||
const PREMIUM_TIER_2_PREMIUM_GUILD_2_YEARLY2 = value.PREMIUM_TIER_2_PREMIUM_GUILD_2_YEARLY;
|
||||
YEAR = SubscriptionIntervalTypes.YEAR;
|
||||
TIER_2 = PremiumTypes.TIER_2;
|
||||
PREMIUM_YEAR_TIER_2 = SubscriptionPlans.PREMIUM_YEAR_TIER_2;
|
||||
PREMIUM_YEAR_GUILD = SubscriptionPlans.PREMIUM_YEAR_GUILD;
|
||||
object2[PREMIUM_TIER_2_PREMIUM_GUILD_2_YEARLY] = {productId: PREMIUM_TIER_2_PREMIUM_GUILD_2_YEARLY2, interval: YEAR,
|
||||
numPremiumGuild: 2, premiumTier: TIER_2, basePlanId: PREMIUM_YEAR_TIER_2, additionalPlans: [{quantity: 2,
|
||||
planId: PREMIUM_YEAR_GUILD}]};
|
||||
const PREMIUM_TIER_2_PREMIUM_GUILD_3_MONTHLY = value.PREMIUM_TIER_2_PREMIUM_GUILD_3_MONTHLY;
|
||||
const PREMIUM_TIER_2_PREMIUM_GUILD_3_MONTHLY2 = value.PREMIUM_TIER_2_PREMIUM_GUILD_3_MONTHLY;
|
||||
MONTH = SubscriptionIntervalTypes.MONTH;
|
||||
TIER_2 = PremiumTypes.TIER_2;
|
||||
PREMIUM_MONTH_TIER_2 = SubscriptionPlans.PREMIUM_MONTH_TIER_2;
|
||||
PREMIUM_MONTH_GUILD = SubscriptionPlans.PREMIUM_MONTH_GUILD;
|
||||
object2[PREMIUM_TIER_2_PREMIUM_GUILD_3_MONTHLY] = {productId: PREMIUM_TIER_2_PREMIUM_GUILD_3_MONTHLY2,
|
||||
interval: MONTH, numPremiumGuild: 3, premiumTier: TIER_2, basePlanId: PREMIUM_MONTH_TIER_2,
|
||||
additionalPlans: [{quantity: 3, planId: PREMIUM_MONTH_GUILD}]};
|
||||
const PREMIUM_TIER_2_PREMIUM_GUILD_3_YEARLY = value.PREMIUM_TIER_2_PREMIUM_GUILD_3_YEARLY;
|
||||
const PREMIUM_TIER_2_PREMIUM_GUILD_3_YEARLY2 = value.PREMIUM_TIER_2_PREMIUM_GUILD_3_YEARLY;
|
||||
YEAR = SubscriptionIntervalTypes.YEAR;
|
||||
TIER_2 = PremiumTypes.TIER_2;
|
||||
PREMIUM_YEAR_TIER_2 = SubscriptionPlans.PREMIUM_YEAR_TIER_2;
|
||||
PREMIUM_YEAR_GUILD = SubscriptionPlans.PREMIUM_YEAR_GUILD;
|
||||
object2[PREMIUM_TIER_2_PREMIUM_GUILD_3_YEARLY] = {productId: PREMIUM_TIER_2_PREMIUM_GUILD_3_YEARLY2, interval: YEAR,
|
||||
numPremiumGuild: 3, premiumTier: TIER_2, basePlanId: PREMIUM_YEAR_TIER_2, additionalPlans: [{quantity: 3,
|
||||
planId: PREMIUM_YEAR_GUILD}]};
|
||||
const PREMIUM_TIER_2_PREMIUM_GUILD_5_MONTHLY = value.PREMIUM_TIER_2_PREMIUM_GUILD_5_MONTHLY;
|
||||
const PREMIUM_TIER_2_PREMIUM_GUILD_5_MONTHLY2 = value.PREMIUM_TIER_2_PREMIUM_GUILD_5_MONTHLY;
|
||||
MONTH = SubscriptionIntervalTypes.MONTH;
|
||||
TIER_2 = PremiumTypes.TIER_2;
|
||||
PREMIUM_MONTH_TIER_2 = SubscriptionPlans.PREMIUM_MONTH_TIER_2;
|
||||
PREMIUM_MONTH_GUILD = SubscriptionPlans.PREMIUM_MONTH_GUILD;
|
||||
object2[PREMIUM_TIER_2_PREMIUM_GUILD_5_MONTHLY] = {productId: PREMIUM_TIER_2_PREMIUM_GUILD_5_MONTHLY2,
|
||||
interval: MONTH, numPremiumGuild: 5, premiumTier: TIER_2, basePlanId: PREMIUM_MONTH_TIER_2,
|
||||
additionalPlans: [{quantity: 5, planId: PREMIUM_MONTH_GUILD}]};
|
||||
const PREMIUM_TIER_2_PREMIUM_GUILD_5_YEARLY = value.PREMIUM_TIER_2_PREMIUM_GUILD_5_YEARLY;
|
||||
const PREMIUM_TIER_2_PREMIUM_GUILD_5_YEARLY2 = value.PREMIUM_TIER_2_PREMIUM_GUILD_5_YEARLY;
|
||||
YEAR = SubscriptionIntervalTypes.YEAR;
|
||||
TIER_2 = PremiumTypes.TIER_2;
|
||||
PREMIUM_YEAR_TIER_2 = SubscriptionPlans.PREMIUM_YEAR_TIER_2;
|
||||
PREMIUM_YEAR_GUILD = SubscriptionPlans.PREMIUM_YEAR_GUILD;
|
||||
object2[PREMIUM_TIER_2_PREMIUM_GUILD_5_YEARLY] = {productId: PREMIUM_TIER_2_PREMIUM_GUILD_5_YEARLY2, interval: YEAR,
|
||||
numPremiumGuild: 5, premiumTier: TIER_2, basePlanId: PREMIUM_YEAR_TIER_2, additionalPlans: [{quantity: 5,
|
||||
planId: PREMIUM_YEAR_GUILD}]};
|
||||
const PREMIUM_TIER_2_PREMIUM_GUILD_10_MONTHLY = value.PREMIUM_TIER_2_PREMIUM_GUILD_10_MONTHLY;
|
||||
const PREMIUM_TIER_2_PREMIUM_GUILD_10_MONTHLY2 = value.PREMIUM_TIER_2_PREMIUM_GUILD_10_MONTHLY;
|
||||
MONTH = SubscriptionIntervalTypes.MONTH;
|
||||
TIER_2 = PremiumTypes.TIER_2;
|
||||
PREMIUM_MONTH_TIER_2 = SubscriptionPlans.PREMIUM_MONTH_TIER_2;
|
||||
PREMIUM_MONTH_GUILD = SubscriptionPlans.PREMIUM_MONTH_GUILD;
|
||||
object2[PREMIUM_TIER_2_PREMIUM_GUILD_10_MONTHLY] = {productId: PREMIUM_TIER_2_PREMIUM_GUILD_10_MONTHLY2,
|
||||
interval: MONTH, numPremiumGuild: 10, premiumTier: TIER_2, basePlanId: PREMIUM_MONTH_TIER_2,
|
||||
additionalPlans: [{quantity: 10, planId: PREMIUM_MONTH_GUILD}]};
|
||||
const PREMIUM_TIER_2_PREMIUM_GUILD_10_YEARLY = value.PREMIUM_TIER_2_PREMIUM_GUILD_10_YEARLY;
|
||||
const PREMIUM_TIER_2_PREMIUM_GUILD_10_YEARLY2 = value.PREMIUM_TIER_2_PREMIUM_GUILD_10_YEARLY;
|
||||
YEAR = SubscriptionIntervalTypes.YEAR;
|
||||
TIER_2 = PremiumTypes.TIER_2;
|
||||
PREMIUM_YEAR_TIER_2 = SubscriptionPlans.PREMIUM_YEAR_TIER_2;
|
||||
PREMIUM_YEAR_GUILD = SubscriptionPlans.PREMIUM_YEAR_GUILD;
|
||||
object2[PREMIUM_TIER_2_PREMIUM_GUILD_10_YEARLY] = {productId: PREMIUM_TIER_2_PREMIUM_GUILD_10_YEARLY2,
|
||||
interval: YEAR, numPremiumGuild: 10, premiumTier: TIER_2, basePlanId: PREMIUM_YEAR_TIER_2,
|
||||
additionalPlans: [{quantity: 10, planId: PREMIUM_YEAR_GUILD}]};
|
||||
const PREMIUM_TIER_2_PREMIUM_GUILD_13_MONTHLY = value.PREMIUM_TIER_2_PREMIUM_GUILD_13_MONTHLY;
|
||||
const PREMIUM_TIER_2_PREMIUM_GUILD_13_MONTHLY2 = value.PREMIUM_TIER_2_PREMIUM_GUILD_13_MONTHLY;
|
||||
MONTH = SubscriptionIntervalTypes.MONTH;
|
||||
TIER_2 = PremiumTypes.TIER_2;
|
||||
PREMIUM_MONTH_TIER_2 = SubscriptionPlans.PREMIUM_MONTH_TIER_2;
|
||||
PREMIUM_MONTH_GUILD = SubscriptionPlans.PREMIUM_MONTH_GUILD;
|
||||
object2[PREMIUM_TIER_2_PREMIUM_GUILD_13_MONTHLY] = {productId: PREMIUM_TIER_2_PREMIUM_GUILD_13_MONTHLY2,
|
||||
interval: MONTH, numPremiumGuild: 13, premiumTier: TIER_2, basePlanId: PREMIUM_MONTH_TIER_2,
|
||||
additionalPlans: [{quantity: 13, planId: PREMIUM_MONTH_GUILD}]};
|
||||
const PREMIUM_TIER_2_PREMIUM_GUILD_13_YEARLY = value.PREMIUM_TIER_2_PREMIUM_GUILD_13_YEARLY;
|
||||
const PREMIUM_TIER_2_PREMIUM_GUILD_13_YEARLY2 = value.PREMIUM_TIER_2_PREMIUM_GUILD_13_YEARLY;
|
||||
YEAR = SubscriptionIntervalTypes.YEAR;
|
||||
TIER_2 = PremiumTypes.TIER_2;
|
||||
PREMIUM_YEAR_TIER_2 = SubscriptionPlans.PREMIUM_YEAR_TIER_2;
|
||||
PREMIUM_YEAR_GUILD = SubscriptionPlans.PREMIUM_YEAR_GUILD;
|
||||
object2[PREMIUM_TIER_2_PREMIUM_GUILD_13_YEARLY] = {productId: PREMIUM_TIER_2_PREMIUM_GUILD_13_YEARLY2,
|
||||
interval: YEAR, numPremiumGuild: 13, premiumTier: TIER_2, basePlanId: PREMIUM_YEAR_TIER_2,
|
||||
additionalPlans: [{quantity: 13, planId: PREMIUM_YEAR_GUILD}]};
|
||||
const PREMIUM_TIER_2_PREMIUM_GUILD_28_MONTHLY = value.PREMIUM_TIER_2_PREMIUM_GUILD_28_MONTHLY;
|
||||
const PREMIUM_TIER_2_PREMIUM_GUILD_28_MONTHLY2 = value.PREMIUM_TIER_2_PREMIUM_GUILD_28_MONTHLY;
|
||||
MONTH = SubscriptionIntervalTypes.MONTH;
|
||||
TIER_2 = PremiumTypes.TIER_2;
|
||||
PREMIUM_MONTH_TIER_2 = SubscriptionPlans.PREMIUM_MONTH_TIER_2;
|
||||
PREMIUM_MONTH_GUILD = SubscriptionPlans.PREMIUM_MONTH_GUILD;
|
||||
object2[PREMIUM_TIER_2_PREMIUM_GUILD_28_MONTHLY] = {productId: PREMIUM_TIER_2_PREMIUM_GUILD_28_MONTHLY2,
|
||||
interval: MONTH, numPremiumGuild: 28, premiumTier: TIER_2, basePlanId: PREMIUM_MONTH_TIER_2,
|
||||
additionalPlans: [{quantity: 28, planId: PREMIUM_MONTH_GUILD}]};
|
||||
const PREMIUM_TIER_2_PREMIUM_GUILD_28_YEARLY = value.PREMIUM_TIER_2_PREMIUM_GUILD_28_YEARLY;
|
||||
const PREMIUM_TIER_2_PREMIUM_GUILD_28_YEARLY2 = value.PREMIUM_TIER_2_PREMIUM_GUILD_28_YEARLY;
|
||||
YEAR = SubscriptionIntervalTypes.YEAR;
|
||||
TIER_2 = PremiumTypes.TIER_2;
|
||||
PREMIUM_YEAR_TIER_2 = SubscriptionPlans.PREMIUM_YEAR_TIER_2;
|
||||
PREMIUM_YEAR_GUILD = SubscriptionPlans.PREMIUM_YEAR_GUILD;
|
||||
object2[PREMIUM_TIER_2_PREMIUM_GUILD_28_YEARLY] = {productId: PREMIUM_TIER_2_PREMIUM_GUILD_28_YEARLY2,
|
||||
interval: YEAR, numPremiumGuild: 28, premiumTier: TIER_2, basePlanId: PREMIUM_YEAR_TIER_2,
|
||||
additionalPlans: [{quantity: 28, planId: PREMIUM_YEAR_GUILD}]};
|
||||
const PREMIUM_TIER_1_PREMIUM_GUILD_1_MONTHLY = value.PREMIUM_TIER_1_PREMIUM_GUILD_1_MONTHLY;
|
||||
const PREMIUM_TIER_1_PREMIUM_GUILD_1_MONTHLY2 = value.PREMIUM_TIER_1_PREMIUM_GUILD_1_MONTHLY;
|
||||
MONTH = SubscriptionIntervalTypes.MONTH;
|
||||
TIER_1 = PremiumTypes.TIER_1;
|
||||
PREMIUM_MONTH_TIER_1 = SubscriptionPlans.PREMIUM_MONTH_TIER_1;
|
||||
PREMIUM_MONTH_GUILD = SubscriptionPlans.PREMIUM_MONTH_GUILD;
|
||||
object2[PREMIUM_TIER_1_PREMIUM_GUILD_1_MONTHLY] = {productId: PREMIUM_TIER_1_PREMIUM_GUILD_1_MONTHLY2,
|
||||
interval: MONTH, numPremiumGuild: 1, premiumTier: TIER_1, basePlanId: PREMIUM_MONTH_TIER_1,
|
||||
additionalPlans: [{quantity: 1, planId: PREMIUM_MONTH_GUILD}]};
|
||||
const PREMIUM_TIER_1_PREMIUM_GUILD_1_YEARLY = value.PREMIUM_TIER_1_PREMIUM_GUILD_1_YEARLY;
|
||||
const PREMIUM_TIER_1_PREMIUM_GUILD_1_YEARLY2 = value.PREMIUM_TIER_1_PREMIUM_GUILD_1_YEARLY;
|
||||
YEAR = SubscriptionIntervalTypes.YEAR;
|
||||
TIER_1 = PremiumTypes.TIER_1;
|
||||
PREMIUM_YEAR_TIER_1 = SubscriptionPlans.PREMIUM_YEAR_TIER_1;
|
||||
PREMIUM_YEAR_GUILD = SubscriptionPlans.PREMIUM_YEAR_GUILD;
|
||||
object2[PREMIUM_TIER_1_PREMIUM_GUILD_1_YEARLY] = {productId: PREMIUM_TIER_1_PREMIUM_GUILD_1_YEARLY2, interval: YEAR,
|
||||
numPremiumGuild: 1, premiumTier: TIER_1, basePlanId: PREMIUM_YEAR_TIER_1, additionalPlans: [{quantity: 1,
|
||||
planId: PREMIUM_YEAR_GUILD}]};
|
||||
PREMIUM_GUILD_1_MONTHLY = value.PREMIUM_GUILD_1_MONTHLY;
|
||||
const PREMIUM_GUILD_1_MONTHLY2 = value.PREMIUM_GUILD_1_MONTHLY;
|
||||
MONTH = SubscriptionIntervalTypes.MONTH;
|
||||
let NONE_MONTH = SubscriptionPlans.NONE_MONTH;
|
||||
PREMIUM_MONTH_GUILD = SubscriptionPlans.PREMIUM_MONTH_GUILD;
|
||||
object2[PREMIUM_GUILD_1_MONTHLY] = {productId: PREMIUM_GUILD_1_MONTHLY2, interval: MONTH, numPremiumGuild: 1,
|
||||
premiumTier: null, basePlanId: NONE_MONTH, additionalPlans: [{quantity: 1, planId: PREMIUM_MONTH_GUILD}]};
|
||||
const PREMIUM_GUILD_2_MONTHLY = value.PREMIUM_GUILD_2_MONTHLY;
|
||||
const PREMIUM_GUILD_2_MONTHLY2 = value.PREMIUM_GUILD_2_MONTHLY;
|
||||
MONTH = SubscriptionIntervalTypes.MONTH;
|
||||
NONE_MONTH = SubscriptionPlans.NONE_MONTH;
|
||||
PREMIUM_MONTH_GUILD = SubscriptionPlans.PREMIUM_MONTH_GUILD;
|
||||
object2[PREMIUM_GUILD_2_MONTHLY] = {productId: PREMIUM_GUILD_2_MONTHLY2, interval: MONTH, numPremiumGuild: 2,
|
||||
premiumTier: null, basePlanId: NONE_MONTH, additionalPlans: [{quantity: 2, planId: PREMIUM_MONTH_GUILD}]};
|
||||
const object4 = {};
|
||||
PREMIUM_TIER_2_MONTHLY = value.PREMIUM_TIER_2_MONTHLY;
|
||||
PREMIUM_TIER_2_YEARLY = value.PREMIUM_TIER_2_YEARLY;
|
||||
object4[PREMIUM_TIER_2_LIKELIHOOD_TRIAL_ID] = {[PREMIUM_TIER_2_MONTHLY]: 'premium_tier_2_monthly_likelihood',
|
||||
[PREMIUM_TIER_2_YEARLY]: 'premium_tier_2_yearly_likelihood'};
|
||||
PREMIUM_TIER_2_MONTHLY = value.PREMIUM_TIER_2_MONTHLY;
|
||||
PREMIUM_TIER_2_YEARLY = value.PREMIUM_TIER_2_YEARLY;
|
||||
object4[PREMIUM_TIER_2_REACTIVATION_TRIAL_ID] = {[PREMIUM_TIER_2_MONTHLY]: 'premium_tier_2_monthly_reactivation',
|
||||
[PREMIUM_TIER_2_YEARLY]: 'premium_tier_2_yearly_reactivation'};
|
||||
PREMIUM_TIER_0_MONTHLY = value.PREMIUM_TIER_0_MONTHLY;
|
||||
PREMIUM_TIER_0_YEARLY = value.PREMIUM_TIER_0_YEARLY;
|
||||
object4[PREMIUM_TIER_0_LIKELIHOOD_TRIAL_ID] = {[PREMIUM_TIER_0_MONTHLY]: 'premium_tier_0_monthly_likelihood',
|
||||
[PREMIUM_TIER_0_YEARLY]: 'premium_tier_0_yearly_likelihood'};
|
||||
PREMIUM_TIER_2_MONTHLY = value.PREMIUM_TIER_2_MONTHLY;
|
||||
PREMIUM_TIER_2_YEARLY = value.PREMIUM_TIER_2_YEARLY;
|
||||
object4[PREMIUM_TIER_2_TRIAL_FOR_EVERYONE_TRIAL_ID] = {[PREMIUM_TIER_2_MONTHLY]: 'premium_tier_2_monthly_q4_drop',
|
||||
[PREMIUM_TIER_2_YEARLY]: 'premium_tier_2_yearly_q4_drop'};
|
||||
PREMIUM_TIER_2_MONTHLY = value.PREMIUM_TIER_2_MONTHLY;
|
||||
PREMIUM_TIER_2_YEARLY = value.PREMIUM_TIER_2_YEARLY;
|
||||
object4[PREMIUM_TIER_2_REFERRAL_TRIAL_ID] = {[PREMIUM_TIER_2_MONTHLY]: 'premium_tier_2_monthly_referral_trial',
|
||||
[PREMIUM_TIER_2_YEARLY]: 'premium_tier_2_yearly_referral_trial'};
|
||||
PREMIUM_TIER_2_MONTHLY = value.PREMIUM_TIER_2_MONTHLY;
|
||||
PREMIUM_TIER_2_YEARLY = value.PREMIUM_TIER_2_YEARLY;
|
||||
object4[PREMIUM_TIER_2_HFU_TWO_WEEK_TRIAL_ID] = {[PREMIUM_TIER_2_MONTHLY]: 'premium_tier_2_monthly_hfu_two_week_trial',
|
||||
[PREMIUM_TIER_2_YEARLY]: 'premium_tier_2_yearly_hfu_two_week_trial'};
|
||||
const object5 = {};
|
||||
PREMIUM_TIER_2_MONTHLY = value.PREMIUM_TIER_2_MONTHLY;
|
||||
object5[PREMIUM_TIER_2_LIKELIHOOD_1_MONTH_40_PERCENT_DISCOUNT_ID] = {[PREMIUM_TIER_2_MONTHLY]: 'premium-tier-2-monthly-likelihood-discount'};
|
||||
PREMIUM_TIER_2_MONTHLY = value.PREMIUM_TIER_2_MONTHLY;
|
||||
object5[PREMIUM_TIER_2_REENGAGEMENT_1_MONTH_40_PERCENT_DISCOUNT_ID] = {[PREMIUM_TIER_2_MONTHLY]: 'premium-tier-2-monthly-reengagement-discount'};
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/premium/native/ProductIds.ios.tsx');
|
||||
exports.ProductIds = value;
|
||||
exports.GenericProductIds = items;
|
||||
exports.BasePlanIdToProductId = value2;
|
||||
exports.IAPProductIds = [];
|
||||
exports.SubscriptionProductIds = [];
|
||||
exports.AppStorePremiumProductIdsToPremiumBundledItems = object2;
|
||||
exports.TrialIdToProductOfferId = object4;
|
||||
exports.DiscountIdToProductOfferId = object5;
|
||||
exports.BOGO_OFFER_ID = 'premium-tier-2-monthly-bogo';
|
||||
exports.getProductIdForGift = getProductIdForGift_55738;
|
||||
exports.getPlanIdForGift = getPlanIdForGift_55739;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,72 @@
|
||||
/* Metro module 7547; source: modules/premium/native/SubscriptionAccountHoldNotice.tsx; dependencies: [31, 27, 661, 33, 4501, 697, 1305, 7548, 4573, 1244, 3802, 4578, 2] */
|
||||
function _fun60686(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#60686, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7725:6, offset: 0x0170a21a, size: 315 bytes, params: 8, frame: 22
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
importAll(31) /* metro dependency 31 */;
|
||||
let value = require(27) /* metro dependency 27 */;
|
||||
const env0_3 = value.Linking;
|
||||
const env0_4 = value.View;
|
||||
const env0_5 = (require(661) /* metro dependency 661: Constants */).SubscriptionStatusTypes;
|
||||
value = require(33) /* metro dependency 33 */;
|
||||
const env0_6 = value.jsx;
|
||||
const env0_7 = value.jsxs;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
const BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
|
||||
const env0_8 = Reflect.apply(createStyles, value, [{container: {'padding': 8, 'margin': 8,
|
||||
backgroundColor: BACKGROUND_SURFACE_HIGH}, textContainer: {flexDirection: 'row'}, icon: {marginRight: 4},
|
||||
text: {'marginBottom': 8, 'flex': 1}}]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/premium/native/SubscriptionAccountHoldNotice.tsx');
|
||||
exports.default = _default_60687;
|
||||
}
|
||||
|
||||
function _default_60687({subscription}) { // fn#60687, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7725:403, offset: 0x0170a355, size: 459 bytes, params: 2, frame: 30
|
||||
var r0;
|
||||
var items3;
|
||||
var Text;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
var format;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
var property;
|
||||
var object;
|
||||
var items2;
|
||||
var value;
|
||||
const styles = useStyles();
|
||||
const status = subscription.status;
|
||||
const ACCOUNT_HOLD = SubscriptionStatusTypes.ACCOUNT_HOLD;
|
||||
if (status !== ACCOUNT_HOLD) {
|
||||
r0 = null;
|
||||
} else {
|
||||
var viewBindingProps = {style: styles.container};
|
||||
var viewBindingProps2 = {style: styles.textContainer};
|
||||
const Icon = (require(1305) /* metro dependency 1305: native */).Icon;
|
||||
value = <Icon size={(require(1305) /* metro dependency 1305: native */).IconSizes.MEDIUM} style={styles.icon} source={importDefault(7548) /* metro dependency 7548 */} />;
|
||||
items3 = [value];
|
||||
Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
var textProps = {style: styles.text, variant: 'text-sm/medium'};
|
||||
format = intl.format;
|
||||
property = t['7I21Iz'];
|
||||
object = {};
|
||||
object.endDate = subscription.currentPeriodEnd;
|
||||
value = require(3802) /* metro dependency 3802: PremiumUtils */;
|
||||
object.planDescription = value.getDisplayName(subscription.planId);
|
||||
items3[1] = <Text {...textProps}>{Reflect.apply(format, intl, [property, object])}</Text>;
|
||||
value = <View {...viewBindingProps2}>{items3}</View>;
|
||||
items2 = [value];
|
||||
items2[1] = ((Button) => <Button size="sm" text={intl.string(t.VJmUNy)} onPress={onPress_60688} />)((require(4578) /* metro dependency 4578: ButtonNative */).Button);
|
||||
value = <View {...viewBindingProps}>{items2}</View>;
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function _default_60687OnPress() { // fn#60688, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7725:886, owner: _default_60687.onPress, offset: 0x0170a520, size: 71 bytes, params: 1, frame: 15
|
||||
let value = environment.__proto__;
|
||||
const openURL = Linking.openURL;
|
||||
value = require(3802) /* metro dependency 3802: PremiumUtils */;
|
||||
const getExternalSubscriptionMethodUrl = value.getExternalSubscriptionMethodUrl;
|
||||
return Reflect.apply(openURL, Linking, [Reflect.apply(getExternalSubscriptionMethodUrl, value,
|
||||
[subscription.paymentGateway, 'PAYMENT_SOURCE_MANAGEMENT'])]);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,57 @@
|
||||
/* Metro module 7546; source: modules/premium/native/SubscriptionRenewalMutationsNotice.tsx; dependencies: [31, 27, 33, 4501, 697, 6235, 1305, 1244, 3802, 2] */
|
||||
function _fun60684(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#60684, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7724:6, offset: 0x01709f9e, size: 337 bytes, params: 8, frame: 22
|
||||
var object3;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
importAll(31) /* metro dependency 31 */;
|
||||
const env0_3 = (require(27) /* metro dependency 27 */).View;
|
||||
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;
|
||||
object3 = {};
|
||||
const object4 = {'padding': 10, 'marginVertical': 5, 'marginHorizontal': 15, 'borderRadius': null,
|
||||
'display': 'flex', 'flexDirection': 'row', 'justifyContent': 'center'};
|
||||
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
|
||||
const DARK_PRIMARY_630_LIGHT_PRIMARY_230 = (require(6235) /* metro dependency 6235: LegacyTokens */).DARK_PRIMARY_630_LIGHT_PRIMARY_230;
|
||||
object4.backgroundColor = DARK_PRIMARY_630_LIGHT_PRIMARY_230;
|
||||
object3.container = object4;
|
||||
const DARK_PRIMARY_300_LIGHT_PRIMARY_500 = (require(6235) /* metro dependency 6235: LegacyTokens */).DARK_PRIMARY_300_LIGHT_PRIMARY_500;
|
||||
object3.icon = {'alignSelf': 'center', 'marginLeft': 15, color: DARK_PRIMARY_300_LIGHT_PRIMARY_500};
|
||||
object3.text = {'paddingLeft': 10, 'marginRight': 15, color: DARK_PRIMARY_300_LIGHT_PRIMARY_500};
|
||||
const env0_6 = Reflect.apply(createStyles, value, [object3]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/premium/native/SubscriptionRenewalMutationsNotice.tsx');
|
||||
exports.default = SubscriptionRenewalMutationsNotice;
|
||||
}
|
||||
|
||||
function SubscriptionRenewalMutationsNotice({subscription, renewalMutations}) { // fn#60685, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7724:660, offset: 0x0170a0ef, size: 299 bytes, params: 2, frame: 27
|
||||
var r13;
|
||||
var value;
|
||||
const styles = useStyles();
|
||||
const WarningCircle = (require(1305) /* metro dependency 1305: native */).WarningCircle;
|
||||
const warningCircle = <WarningCircle style={styles.icon} />;
|
||||
const LegacyText = (require(1305) /* metro dependency 1305: native */).LegacyText;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const format = intl.format;
|
||||
const ar1cPl = (require(1244) /* metro dependency 1244: indexNative */).t.ar1cPl;
|
||||
if (subscription.hasExternalPlanChange) {
|
||||
value = require(3802) /* metro dependency 3802: PremiumUtils */;
|
||||
value = value.getExternalPlanDisplayName(renewalMutations);
|
||||
r13 = value;
|
||||
} else {
|
||||
value = importDefault(3802) /* metro dependency 3802: PremiumUtils */;
|
||||
value = value.getDisplayName(renewalMutations.planId);
|
||||
r13 = value;
|
||||
}
|
||||
return (
|
||||
<View style={styles.container}>
|
||||
{warningCircle}
|
||||
<LegacyText style={styles.text}>
|
||||
{Reflect.apply(format, intl, [ar1cPl, {planName: r13, date: subscription.currentPeriodEnd}])}
|
||||
</LegacyText>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,90 @@
|
||||
/* Metro module 15841; source: modules/premium/native/UserOfferManager.tsx; dependencies: [7, 6, 15, 17, 18, 1878, 7064, 1900, 7507, 4860, 2] */
|
||||
function _fun121789(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#121789, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16049:6, offset: 0x0255145d, size: 258 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_2 = importDefault(7) /* metro dependency 7 */;
|
||||
const env0_3 = importDefault(6) /* metro dependency 6 */;
|
||||
const env0_4 = importDefault(15) /* metro dependency 15 */;
|
||||
const env0_5 = importDefault(17) /* metro dependency 17 */;
|
||||
const env0_6 = importDefault(18) /* metro dependency 18 */;
|
||||
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
|
||||
const userOfferStore = importDefault(7064) /* metro dependency 7064: UserOfferStore */;
|
||||
let value = importDefault(4860) /* metro dependency 4860: AutomaticLifecycleManager */;
|
||||
value = _fun121793(value);
|
||||
value = new value();
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/premium/native/UserOfferManager.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
function _isNativeReflectConstruct_121790() { // fn#121790, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16049:168, offset: 0x0255155f, size: 98 bytes, params: 1, frame: 18
|
||||
var Boolean;
|
||||
var prototype;
|
||||
var valueOf;
|
||||
var call;
|
||||
var Reflect;
|
||||
var construct;
|
||||
var closure;
|
||||
var value;
|
||||
var error;
|
||||
try {
|
||||
Boolean = global.Boolean;
|
||||
prototype = Boolean.prototype;
|
||||
valueOf = prototype.valueOf;
|
||||
call = valueOf.call;
|
||||
Reflect = global.Reflect;
|
||||
construct = Reflect.construct;
|
||||
Boolean = global.Boolean;
|
||||
closure = function() {
|
||||
};
|
||||
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
|
||||
value = Reflect.apply(call, valueOf, [value]);
|
||||
var result = !value;
|
||||
} catch (error) {
|
||||
}
|
||||
return (_isNativeReflectConstruct_121790_isNativeReflectConstruct = function() {
|
||||
return !!result;
|
||||
})();
|
||||
}
|
||||
|
||||
function _fun121793(a0) { // fn#121793, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16049:371, offset: 0x025515c1, size: 42 bytes, params: 2, frame: 14
|
||||
const closure = UserOfferManager;
|
||||
env0_6(closure, a0);
|
||||
return env0_2(closure);
|
||||
}
|
||||
|
||||
function UserOfferManager(a0) { // fn#121794, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16049:383, offset: 0x025515eb, size: 165 bytes, params: 2, frame: 20
|
||||
var r0;
|
||||
var Reflect;
|
||||
let value = copyRestArgs(0, undefined);
|
||||
let binding = env1_3;
|
||||
binding(this, UserOfferManager);
|
||||
const items = [];
|
||||
arraySpread(items, value, 0, items);
|
||||
value = env1_5(UserOfferManager);
|
||||
binding = env1_4;
|
||||
if (_isNativeReflectConstruct_121790()) {
|
||||
Reflect = global.Reflect;
|
||||
value = Reflect.construct(value, items, env1_5(this).constructor);
|
||||
r0 = value;
|
||||
} else {
|
||||
value = value.apply(this, items);
|
||||
r0 = value;
|
||||
}
|
||||
value = binding(this, r0);
|
||||
value.actions = {POST_CONNECTION_OPEN: POST_CONNECTION_OPEN_121795};
|
||||
value.handlePostConnectionOpen = handlePostConnectionOpen_121796;
|
||||
return value;
|
||||
}
|
||||
|
||||
function UserOfferManagerHandlePostConnectionOpen() { // fn#121796, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16049:710, owner: UserOfferManager.handlePostConnectionOpen, offset: 0x02551690, size: 133 bytes, params: 1, frame: 14
|
||||
const value = environment.__proto__.__proto__;
|
||||
const currentUser = UserStore.getCurrentUser();
|
||||
let r1 = currentUser == null || !currentUser.verified;
|
||||
r1 = !r1 ? (require(1900) /* metro dependency 1900: PremiumTypeUtils */).isPremium(currentUser) : r1;
|
||||
r1 = !r1 ? UserOfferStore.isFetchingOffer() : r1;
|
||||
if (!r1) {
|
||||
(require(7507) /* metro dependency 7507: UserOfferActionCreators */).fetchUserOffer('MobilePremiumOfferManager');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
/* Metro module 7025; source: modules/premium/native/components/LinkButton.tsx; dependencies: [31, 33, 4501, 5278, 4573, 2] */
|
||||
function _fun55670(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#55670, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7203:6, offset: 0x013ad8be, size: 206 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 value = require(33) /* metro dependency 33 */;
|
||||
const env0_2 = value.jsx;
|
||||
const env0_3 = value.jsxs;
|
||||
const env0_4 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({defaultContainerStyle: {'display': 'flex',
|
||||
'flexDirection': 'row', 'alignItems': 'center', 'justifyContent': 'center'},
|
||||
disabledContainerStyle: {opacity: 0.5}});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/premium/native/components/LinkButton.tsx');
|
||||
exports.LinkButton = LinkButton;
|
||||
}
|
||||
|
||||
function LinkButton({onPress, text, containerStyle, disabled, textStyle, variant, textColor, iconRight}) { // fn#55671, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7203:391, offset: 0x013ad98c, size: 277 bytes, params: 2, frame: 26
|
||||
variant = variant === undefined ? 'text-xs/medium' : variant;
|
||||
textColor = textColor === undefined ? 'text-link' : textColor;
|
||||
const styles = useStyles();
|
||||
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
|
||||
const items2 = [styles.defaultContainerStyle];
|
||||
items2[1] = disabled && styles.disabledContainerStyle;
|
||||
items2[2] = containerStyle;
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
return (
|
||||
<PressableOpacity
|
||||
style={items2}
|
||||
hitSlop={{'top': 8, 'right': 8, 'bottom': 8}}
|
||||
accessibilityRole="button"
|
||||
activeOpacity={0.2}
|
||||
disabled={disabled}
|
||||
onPress={onPress}
|
||||
>
|
||||
<Text
|
||||
style={textStyle}
|
||||
variant={variant}
|
||||
color={textColor}
|
||||
>
|
||||
{text}
|
||||
</Text>
|
||||
{iconRight}
|
||||
</PressableOpacity>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
/* Metro module 7580; source: modules/premium/native/components/PillText.tsx; dependencies: [661, 33, 4501, 697, 7581, 4589, 4573, 2] */
|
||||
function _fun60828(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#60828, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7758:6, offset: 0x01710c86, size: 235 bytes, params: 8, frame: 21
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = (require(661) /* metro dependency 661: Constants */).HorizontalGradient;
|
||||
const env0_4 = (require(33) /* metro dependency 33 */).jsx;
|
||||
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = createStylesModule.createStyles;
|
||||
const object = {'paddingHorizontal': 8, 'borderRadius': null, 'justifyContent': 'center'};
|
||||
object.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
|
||||
const env0_5 = Reflect.apply(createStyles, createStylesModule, [{pillTextContainer: object,
|
||||
pillText: {textTransform: 'uppercase'}}]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/premium/native/components/PillText.tsx');
|
||||
exports.default = PillText;
|
||||
}
|
||||
|
||||
function PillText({pillText, style}) { // fn#60829, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7758:386, offset: 0x01710d71, size: 186 bytes, params: 2, frame: 21
|
||||
const styles = useStyles();
|
||||
const value2 = (importDefault(7581) /* metro dependency 7581: usePremiumPrimaryGradientColors */)();
|
||||
const defaultImport = importDefault(4589) /* metro dependency 4589 */;
|
||||
const items2 = [styles.pillTextContainer, style];
|
||||
const {START, END} = HorizontalGradient;
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
return ((Component) => <Component style={items2} start={START} end={END} colors={value2}><Text variant="text-xs/semibold" color="always-white" style={styles.pillText}>{pillText}</Text></Component>)(defaultImport);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,98 @@
|
||||
/* Metro module 11939; source: modules/premium/native/components/ProgressCircle.tsx; dependencies: [6, 7, 15, 17, 18, 31, 27, 33, 4501, 7744, 3868, 697, 2] */
|
||||
function _fun91635(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#91635, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12125:6, offset: 0x0206c5c6, size: 423 bytes, params: 8, frame: 21
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(6) /* metro dependency 6 */;
|
||||
const env0_4 = importDefault(7) /* metro dependency 7 */;
|
||||
const env0_5 = importDefault(15) /* metro dependency 15 */;
|
||||
const env0_6 = importDefault(17) /* metro dependency 17 */;
|
||||
const env0_7 = importDefault(18) /* metro dependency 18 */;
|
||||
let value = importAll(31) /* metro dependency 31 */;
|
||||
const env0_8 = (require(27) /* metro dependency 27 */).View;
|
||||
const value2 = require(33) /* metro dependency 33 */;
|
||||
const env0_9 = value2.jsx;
|
||||
const env0_10 = value2.jsxs;
|
||||
const env0_11 = (require(4501) /* metro dependency 4501: createStyles */).createLegacyClassComponentStyles({progressCircle: {'alignItems': 'center',
|
||||
'justifyContent': 'center'}, circle: {'position': 'absolute', 'width': '100%', 'height': '100%'},
|
||||
circleOverlay: {'position': 'relative', 'display': 'flex', 'justifyContent': 'center', 'alignItems': 'center'}});
|
||||
const Component = value.Component;
|
||||
value = _fun91639(Component);
|
||||
const ThemeContext = (require(3868) /* metro dependency 3868: native */).ThemeContext;
|
||||
value.contextType = ThemeContext;
|
||||
const GUILD_BOOSTING_PINK = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.GUILD_BOOSTING_PINK;
|
||||
value.defaultProps = {'size': 20, 'strokeWidth': 0.9, color: GUILD_BOOSTING_PINK};
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/premium/native/components/ProgressCircle.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
function _isNativeReflectConstruct_91636() { // fn#91636, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12125:200, offset: 0x0206c76d, size: 98 bytes, params: 1, frame: 18
|
||||
var Boolean;
|
||||
var prototype;
|
||||
var valueOf;
|
||||
var call;
|
||||
var Reflect;
|
||||
var construct;
|
||||
var closure;
|
||||
var value;
|
||||
var error;
|
||||
try {
|
||||
Boolean = global.Boolean;
|
||||
prototype = Boolean.prototype;
|
||||
valueOf = prototype.valueOf;
|
||||
call = valueOf.call;
|
||||
Reflect = global.Reflect;
|
||||
construct = Reflect.construct;
|
||||
Boolean = global.Boolean;
|
||||
closure = function() {
|
||||
};
|
||||
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
|
||||
value = Reflect.apply(call, valueOf, [value]);
|
||||
var result = !value;
|
||||
} catch (error) {
|
||||
}
|
||||
return (_isNativeReflectConstruct_91636_isNativeReflectConstruct = function() {
|
||||
return !!result;
|
||||
})();
|
||||
}
|
||||
|
||||
function _fun91639(a0) { // fn#91639, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12125:657, offset: 0x0206c7cf, size: 99 bytes, params: 2, frame: 16
|
||||
const closure = ProgressCircle;
|
||||
env0_7(closure, a0);
|
||||
return env0_4(closure, [{key: 'renderCircle', value: value_91641}, {key: 'render', value: value_91642}]);
|
||||
}
|
||||
|
||||
function value_91641() { // fn#91641, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12125:959, offset: 0x0206c832, size: 354 bytes, params: 1, frame: 31
|
||||
const value = environment.__proto__;
|
||||
const value2 = env1_11(this.context);
|
||||
const {percent, color, size, strokeWidth} = this.props;
|
||||
let Math = global.Math;
|
||||
const min = Math.min;
|
||||
const Math2 = global.Math;
|
||||
const value4 = Reflect.apply(min, Math, [Math2.max(percent, 0), 100]);
|
||||
const value5 = (size - strokeWidth) / 2;
|
||||
Math = global.Math;
|
||||
const PI = Math.PI;
|
||||
const value6 = value5 * PI * 2;
|
||||
const defaultImport = importDefault(7744) /* metro dependency 7744 */;
|
||||
const circle = value2.circle;
|
||||
const Circle = (require(7744) /* metro dependency 7744 */).Circle;
|
||||
return ((Component) => <Component viewBox={'0 0 ' + size + ' ' + size} style={circle}><Circle fill="none" cx={size / 2} cy={size / 2} r={value5} strokeWidth={strokeWidth} strokeLinecap="round" transform={'rotate(-90 ' + size / 2 + ' ' + size / 2 + ')'} stroke={color} style={{strokeDasharray: value6,
|
||||
strokeDashoffset: (1 - value4 / 100) * value6}} /></Component>)(defaultImport);
|
||||
}
|
||||
|
||||
function value_91642() { // fn#91642, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12125:1384, offset: 0x0206c994, size: 144 bytes, params: 1, frame: 20
|
||||
const value = environment.__proto__;
|
||||
const value2 = env1_11(this.context);
|
||||
const {style, children} = this.props;
|
||||
const items2 = [value2.progressCircle, style];
|
||||
const value3 = this.renderCircle();
|
||||
const value4 = null;
|
||||
return (
|
||||
<View style={items2}>
|
||||
{value3}
|
||||
{value4 != children ? <View style={value2.circleOverlay}>{children}</View> : value4}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,92 @@
|
||||
/* Metro module 15286; source: modules/premium/native/discounts/PremiumDiscountOfferActionSheet.tsx; dependencies: [31, 1880, 661, 1376, 33, 6771, 6789, 683, 7507, 5080, 7028, 1962, 7040, 6275, 15287, 2] */
|
||||
function _fun116926(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#116926, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15483:6, offset: 0x0249bedf, size: 275 bytes, params: 8, frame: 19
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importAll(31) /* metro dependency 31 */;
|
||||
let value = require(1880) /* metro dependency 1880: PremiumConstants */;
|
||||
const env0_4 = value.PremiumTypes;
|
||||
const env0_5 = value.SubscriptionPlanInfo;
|
||||
value = require(661) /* metro dependency 661: Constants */;
|
||||
const env0_6 = value.AnalyticEvents;
|
||||
const AnalyticsObjectTypes = value.AnalyticsObjectTypes;
|
||||
const AnalyticsPages = value.AnalyticsPages;
|
||||
const AnalyticsSections = value.AnalyticsSections;
|
||||
const env0_7 = (require(1376) /* metro dependency 1376: DismissibleContentConstants */).ContentDismissActionType;
|
||||
const env0_8 = (require(33) /* metro dependency 33 */).jsx;
|
||||
object2 = {};
|
||||
const USER_SETTINGS = AnalyticsPages.USER_SETTINGS;
|
||||
object2.page = USER_SETTINGS;
|
||||
const SETTINGS_PREMIUM = AnalyticsSections.SETTINGS_PREMIUM;
|
||||
object2.section = SETTINGS_PREMIUM;
|
||||
const BUY = AnalyticsObjectTypes.BUY;
|
||||
object2.objectType = BUY;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/premium/native/discounts/PremiumDiscountOfferActionSheet.tsx');
|
||||
exports.default = _default_116927;
|
||||
}
|
||||
|
||||
function _default_116927({markAsDismissed, userDiscountOffer}) { // fn#116927, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15483:380, offset: 0x0249bff2, size: 310 bytes, params: 2, frame: 23
|
||||
let defaultImport = importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */;
|
||||
const PREMIUM_DISCOUNT_OFFER_ACTION_SHEET = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).PREMIUM_DISCOUNT_OFFER_ACTION_SHEET;
|
||||
const analyticsLocations = defaultImport(PREMIUM_DISCOUNT_OFFER_ACTION_SHEET).analyticsLocations;
|
||||
const binding = env0_3;
|
||||
const value3 = binding.useMemo(_fun116928, [userDiscountOffer]);
|
||||
binding.useEffect(_fun116929, []);
|
||||
const value4 = binding.useCallback(function() {
|
||||
var defaultImport = importDefault(dependencyMap[7]);
|
||||
var PREMIUM_DISCOUNT_OFFER_ACTION_SHEET_DISMISSED = AnalyticEvents.PREMIUM_DISCOUNT_OFFER_ACTION_SHEET_DISMISSED;
|
||||
defaultImport.track(PREMIUM_DISCOUNT_OFFER_ACTION_SHEET_DISMISSED, {location: analyticsLocations,
|
||||
discount_offer_id: userDiscountOffer.id});
|
||||
markAsDismissed(ContentDismissActionType.USER_DISMISS);
|
||||
}, [analyticsLocations, markAsDismissed, userDiscountOffer]);
|
||||
const value5 = binding.useCallback(_fun116931, [analyticsLocations, markAsDismissed, userDiscountOffer, value3]);
|
||||
const BottomSheet = (require(6275) /* metro dependency 6275: BottomSheetNative */).BottomSheet;
|
||||
return (
|
||||
<BottomSheet
|
||||
startExpanded
|
||||
onDismiss={value4}
|
||||
key={userDiscountOffer?.id}
|
||||
>
|
||||
{((Component) => <Component discountOffer={userDiscountOffer} onConfirm={value5} />)(importDefault(15287) /* metro dependency 15287: PremiumDiscountOfferActionSheetContent */)}
|
||||
</BottomSheet>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun116928() { // fn#116928, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15483:515, offset: 0x0249c128, size: 81 bytes, params: 1, frame: 4
|
||||
const property = userDiscountOffer.discount.planIds[0];
|
||||
const value = null;
|
||||
const r2 = value != property ? SubscriptionPlanInfo[property] : value;
|
||||
const premiumType = value == r2 ? undefined : r2.premiumType;
|
||||
return value != premiumType ? premiumType : PremiumTypes.TIER_2;
|
||||
}
|
||||
|
||||
function _fun116929() { // fn#116929, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15483:647, offset: 0x0249c179, size: 103 bytes, params: 1, frame: 18
|
||||
const value = environment.__proto__;
|
||||
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
|
||||
const track = defaultImport.track;
|
||||
const PREMIUM_DISCOUNT_OFFER_ACTION_SHEET_VIEWED = AnalyticEvents.PREMIUM_DISCOUNT_OFFER_ACTION_SHEET_VIEWED;
|
||||
const userDiscountOfferBinding = userDiscountOffer;
|
||||
Reflect.apply(track, defaultImport, [PREMIUM_DISCOUNT_OFFER_ACTION_SHEET_VIEWED, {location: analyticsLocations,
|
||||
discount_offer_id: userDiscountOfferBinding.id}]);
|
||||
(require(7507) /* metro dependency 7507: UserOfferActionCreators */).acknowledgeUserOffer(undefined,
|
||||
userDiscountOfferBinding);
|
||||
}
|
||||
|
||||
function _fun116931() { // fn#116931, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15483:964, offset: 0x0249c23e, size: 201 bytes, params: 1, frame: 20
|
||||
const defaultImport = importDefault(dependencyMap[7]);
|
||||
const track = defaultImport.track;
|
||||
const PREMIUM_DISCOUNT_OFFER_ACTION_SHEET_CTA_CLICKED = AnalyticEvents.PREMIUM_DISCOUNT_OFFER_ACTION_SHEET_CTA_CLICKED;
|
||||
const analyticsLocationsBinding = analyticsLocations;
|
||||
Reflect.apply(track, defaultImport, [PREMIUM_DISCOUNT_OFFER_ACTION_SHEET_CTA_CLICKED,
|
||||
{location: analyticsLocationsBinding, discount_offer_id: userDiscountOffer.id}]);
|
||||
const markAsDismissedBinding = markAsDismissed;
|
||||
const TAKE_ACTION = ContentDismissActionType.TAKE_ACTION;
|
||||
markAsDismissedBinding(TAKE_ACTION);
|
||||
const defaultImport2 = importDefault(dependencyMap[9]);
|
||||
defaultImport2.pushLazy(require(dependencyMap[11])(dependencyMap[10], dependencyMap.paths),
|
||||
{analyticsLocations: analyticsLocationsBinding});
|
||||
importDefault(dependencyMap[12])({analyticsLocation: env1_9, analyticsLocations: analyticsLocationsBinding,
|
||||
premiumType: env0_3});
|
||||
}
|
||||
|
||||
@@ -0,0 +1,68 @@
|
||||
/* Metro module 15287; source: modules/premium/native/discounts/PremiumDiscountOfferActionSheetContent.tsx; dependencies: [31, 27, 33, 4501, 697, 11441, 1244, 9395, 6685, 5473, 4573, 14233, 4578, 7954, 2] */
|
||||
function _fun116932(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#116932, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15484:6, offset: 0x0249c307, size: 310 bytes, params: 8, frame: 22
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
let value = importAll(31) /* metro dependency 31 */;
|
||||
const env0_3 = (require(27) /* metro dependency 27 */).View;
|
||||
const value2 = require(33) /* metro dependency 33 */;
|
||||
const env0_4 = value2.jsx;
|
||||
const env0_5 = value2.jsxs;
|
||||
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = createStylesModule.createStyles;
|
||||
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
|
||||
const env0_6 = Reflect.apply(createStyles, createStylesModule, [{contentContainer: {'paddingHorizontal': 36,
|
||||
'paddingTop': 18, 'paddingBottom': 36, 'width': '100%', 'backgroundColor': null, 'alignItems': 'flex-start',
|
||||
'display': 'flex', 'flexDirection': 'column', 'gap': 0, backgroundColor: BACKGROUND_BASE_LOW},
|
||||
buttonContainer: {'marginVertical': 6, 'width': '100%', 'height': 48}, title: {'width': '100%',
|
||||
'textAlign': 'center'}, heroIllustrationContainer: {'alignItems': 'center', 'justifyContent': 'center',
|
||||
'height': 188, 'width': '100%'}}]);
|
||||
value = value.memo(PremiumDiscountOfferActionSheetContent);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/premium/native/discounts/PremiumDiscountOfferActionSheetContent.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
function PremiumDiscountOfferActionSheetContent({discountOffer, onConfirm}) { // fn#116933, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15484:585, offset: 0x0249c43d, size: 863 bytes, params: 2, frame: 30
|
||||
const styles = useStyles();
|
||||
let object2 = {};
|
||||
const UserIcon = (require(11441) /* metro dependency 11441: UserIcon */).UserIcon;
|
||||
object2.IconComponent = UserIcon;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
object2.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.kpMomJ);
|
||||
object2.description = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.uVUtPw);
|
||||
const items3 = [object2];
|
||||
object2 = {};
|
||||
const ChatSmileIcon = (require(9395) /* metro dependency 9395: ChatSmileIcon */).ChatSmileIcon;
|
||||
object2.IconComponent = ChatSmileIcon;
|
||||
object2.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['R2IV/Q']);
|
||||
object2.description = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['3SUJLd']);
|
||||
items3[1] = object2;
|
||||
object2 = {};
|
||||
const FolderIcon = (require(6685) /* metro dependency 6685: FolderIcon */).FolderIcon;
|
||||
object2.IconComponent = FolderIcon;
|
||||
object2.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['u/NJKc']);
|
||||
object2.description = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.i1UuMk);
|
||||
items3[2] = object2;
|
||||
const amount = discountOffer.discount.amount;
|
||||
const NitroWumpusFlightRight3dIllustration = (require(5473) /* metro dependency 5473: native */).NitroWumpusFlightRight3dIllustration;
|
||||
const items2 = [<View style={styles.heroIllustrationContainer}><NitroWumpusFlightRight3dIllustration width={180} height={180} /></View>];
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
let formatToPlainString = intl.formatToPlainString;
|
||||
items2[1] = <Text variant="heading-xl/bold" color="mobile-text-heading-primary" style={styles.title}>{Reflect.apply(formatToPlainString,
|
||||
intl, [(require(1244) /* metro dependency 1244: indexNative */).t.qowbUk, {percent: amount}])}</Text>;
|
||||
items2[2] = ((Component) => <Component perks={items3} />)(importDefault(14233) /* metro dependency 14233: PremiumPerksList */);
|
||||
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
|
||||
formatToPlainString = intl.formatToPlainString;
|
||||
const bkQ4bH = (require(1244) /* metro dependency 1244: indexNative */).t.bkQ4bH;
|
||||
const object3 = {percent: amount};
|
||||
const NitroWheelIcon = (require(7954) /* metro dependency 7954: NitroWheelIcon */).NitroWheelIcon;
|
||||
const WHITE = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.WHITE;
|
||||
items2[3] = <View style={styles.buttonContainer}><Button size="lg" text={Reflect.apply(formatToPlainString, intl,
|
||||
[bkQ4bH, object3])} onPress={onConfirm} grow icon={<NitroWheelIcon size="md" color={WHITE} />} /></View>;
|
||||
return (
|
||||
<View style={styles.contentContainer}>
|
||||
{items2}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,71 @@
|
||||
/* Metro module 10508; source: modules/premium/native/gift_code_modal/GiftBoxAnimation.tsx; dependencies: [31, 4502, 1880, 33, 566, 4242, 10509, 10510, 10511, 7647, 7656, 7653, 7650, 7659, 7662, 7665, 7668, 6760, 2] */
|
||||
function _fun81236(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#81236, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10694:6, offset: 0x01e9fb67, 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 accessibilityStore = importDefault(4502) /* metro dependency 4502: AccessibilityStore */;
|
||||
const env0_4 = (require(1880) /* metro dependency 1880: PremiumConstants */).PremiumGiftStyles;
|
||||
const env0_5 = (require(33) /* metro dependency 33 */).jsx;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/premium/native/gift_code_modal/GiftBoxAnimation.tsx');
|
||||
exports.default = GiftBoxAnimation;
|
||||
}
|
||||
|
||||
function GiftBoxAnimation({giftStyle}) { // fn#81237, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10694:260, offset: 0x01e9fc17, size: 465 bytes, params: 2, frame: 20
|
||||
const useReducedMotion = (require(566) /* metro dependency 566: flux */).useStateFromStores([AccessibilityStore],
|
||||
function() {
|
||||
return AccessibilityStore.useReducedMotion;
|
||||
});
|
||||
if (giftStyle == null) {
|
||||
return null;
|
||||
}
|
||||
const value2 = (require(4242) /* metro dependency 4242 */).match(giftStyle);
|
||||
const SNOWGLOBE = PremiumGiftStyles.SNOWGLOBE;
|
||||
const value3 = value2.with(SNOWGLOBE, function() {
|
||||
return require(dependencyMap[6]);
|
||||
});
|
||||
const BOX = PremiumGiftStyles.BOX;
|
||||
const value4 = value3.with(BOX, function() {
|
||||
return require(dependencyMap[7]);
|
||||
});
|
||||
const CUP = PremiumGiftStyles.CUP;
|
||||
const value5 = value4.with(CUP, function() {
|
||||
return require(dependencyMap[8]);
|
||||
});
|
||||
const STANDARD_BOX = PremiumGiftStyles.STANDARD_BOX;
|
||||
const value6 = value5.with(STANDARD_BOX, function() {
|
||||
return require(dependencyMap[9]);
|
||||
});
|
||||
const COFFEE = PremiumGiftStyles.COFFEE;
|
||||
const value7 = value6.with(COFFEE, function() {
|
||||
return require(dependencyMap[10]);
|
||||
});
|
||||
const CHEST = PremiumGiftStyles.CHEST;
|
||||
const value8 = value7.with(CHEST, function() {
|
||||
return require(dependencyMap[11]);
|
||||
});
|
||||
const CAKE = PremiumGiftStyles.CAKE;
|
||||
const value9 = value8.with(CAKE, function() {
|
||||
return require(dependencyMap[12]);
|
||||
});
|
||||
const SEASONAL_STANDARD_BOX = PremiumGiftStyles.SEASONAL_STANDARD_BOX;
|
||||
const value10 = value9.with(SEASONAL_STANDARD_BOX, function() {
|
||||
return require(dependencyMap[13]);
|
||||
});
|
||||
const SEASONAL_CAKE = PremiumGiftStyles.SEASONAL_CAKE;
|
||||
const value11 = value10.with(SEASONAL_CAKE, function() {
|
||||
return require(dependencyMap[14]);
|
||||
});
|
||||
const SEASONAL_CHEST = PremiumGiftStyles.SEASONAL_CHEST;
|
||||
const value12 = value11.with(SEASONAL_CHEST, function() {
|
||||
return require(dependencyMap[15]);
|
||||
});
|
||||
const SEASONAL_COFFEE = PremiumGiftStyles.SEASONAL_COFFEE;
|
||||
return ((Component) => <Component source={value12.with(SEASONAL_COFFEE, function() {
|
||||
return require(dependencyMap[16]);
|
||||
}).otherwise(function() {
|
||||
return require(dependencyMap[9]);
|
||||
})} autoPlay={!useReducedMotion} style={{'width': 320,
|
||||
'height': 212}} />)(importDefault(6760) /* metro dependency 6760: LottieAnimationView */);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,57 @@
|
||||
/* Metro module 10513; source: modules/premium/native/gift_code_modal/GiftCodeRedeemError.tsx; dependencies: [31, 27, 33, 4501, 697, 1485, 6618, 10514, 10515, 4573, 1244, 4578, 5080, 2] */
|
||||
function _fun81262(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#81262, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10699:6, offset: 0x01ec63c3, size: 325 bytes, params: 8, frame: 21
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
importAll(31) /* metro dependency 31 */;
|
||||
let value = require(27) /* metro dependency 27 */;
|
||||
const env0_3 = value.Image;
|
||||
const env0_4 = value.View;
|
||||
const env0_5 = value.ScrollView;
|
||||
value = require(33) /* metro dependency 33 */;
|
||||
const env0_6 = value.jsx;
|
||||
const env0_7 = value.jsxs;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
|
||||
const env0_8 = Reflect.apply(createStyles, value, [{container: {'flex': 1, 'justifyContent': 'space-between',
|
||||
backgroundColor: BACKGROUND_BASE_LOW}, body: {'flex': 1, 'alignItems': 'center', 'justifyContent': 'center',
|
||||
'paddingTop': 28, 'paddingBottom': 12, 'paddingHorizontal': 32}, header: {'marginTop': 32,
|
||||
'textAlign': 'center'}, message: {'marginTop': 8, 'textAlign': 'center'}, footer: {paddingHorizontal: 24}}]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/premium/native/gift_code_modal/GiftCodeRedeemError.tsx');
|
||||
exports.default = GiftCodeRedeemError;
|
||||
}
|
||||
|
||||
function GiftCodeRedeemError({message}) { // fn#81263, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10699:631, offset: 0x01ec6508, size: 502 bytes, params: 2, frame: 30
|
||||
const styles = useStyles();
|
||||
const value2 = (require(1485) /* metro dependency 1485 */).useTheme();
|
||||
const SafeAreaPaddingView = (require(6618) /* metro dependency 6618: SafeAreaView */).SafeAreaPaddingView;
|
||||
const items2 = [<Image source={value2.dark ? importDefault(10514) /* metro dependency 10514 */ : importDefault(10515) /* metro dependency 10515 */} />];
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const formatToMarkdownString = intl.formatToMarkdownString;
|
||||
const JUvC0s = (require(1244) /* metro dependency 1244: indexNative */).t.JUvC0s;
|
||||
items2[1] = <Text variant="heading-xl/bold" style={styles.header}>{Reflect.apply(formatToMarkdownString, intl,
|
||||
[JUvC0s, {}])}</Text>;
|
||||
items2[2] = <Text variant="text-lg/medium" style={styles.message}>{message}</Text>;
|
||||
const scrollView = <ScrollView contentContainerStyle={styles.body} alwaysBounceVertical={false}>{items2}</ScrollView>;
|
||||
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
|
||||
return (
|
||||
<SafeAreaPaddingView bottom style={styles.container}>
|
||||
{scrollView}
|
||||
<View style={styles.footer}>
|
||||
<Button
|
||||
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.cpT0Cq)}
|
||||
size="md"
|
||||
onPress={onPress_81264}
|
||||
/>
|
||||
</View>
|
||||
</SafeAreaPaddingView>
|
||||
);
|
||||
}
|
||||
|
||||
function GiftCodeRedeemErrorOnPress() { // fn#81264, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10699:1196, owner: GiftCodeRedeemError.onPress, offset: 0x01ec66fe, size: 37 bytes, params: 1, frame: 11
|
||||
const value = environment.__proto__;
|
||||
return (importDefault(5080) /* metro dependency 5080: ModalActionCreators */).pop();
|
||||
}
|
||||
|
||||
@@ -0,0 +1,114 @@
|
||||
/* Metro module 8454; source: modules/premium/native/gift_code_modal/GiftCodeRedeemModal.tsx; dependencies: [31, 8450, 1878, 33, 5282, 5080, 8455, 10512, 10513, 566, 8456, 5280, 2] */
|
||||
function _fun67119(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#67119, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8639:6, offset: 0x01c162a4, size: 244 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 giftCodeStore = importDefault(8450) /* metro dependency 8450: GiftCodeStore */;
|
||||
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
|
||||
const env0_5 = (require(33) /* metro dependency 33 */).jsx;
|
||||
const env0_7 = (require(5282) /* metro dependency 5282: NavigatorHeaderNative */).getHeaderNoTitle();
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/premium/native/gift_code_modal/GiftCodeRedeemModal.tsx');
|
||||
exports.default = GiftCodeRedeemModal;
|
||||
exports.GiftCodeModalScreens = {START: 'giftcode-start', SUCCESS: 'giftcode-success', ERROR: 'giftcode-error'};
|
||||
}
|
||||
|
||||
function GiftCodeRedeemModal(a0) { // fn#67120, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8639:381, offset: 0x01c16398, size: 336 bytes, params: 2, frame: 23
|
||||
var items;
|
||||
var r1;
|
||||
var Navigator;
|
||||
var object6;
|
||||
var object7;
|
||||
var object8;
|
||||
var object9;
|
||||
const code = a0.code;
|
||||
let value = null;
|
||||
const value2 = Object.create(value);
|
||||
value2.code = 0;
|
||||
const value3 = copyDataProperties({}, a0, value2, undefined);
|
||||
const fluxModule = require(566) /* metro dependency 566: flux */;
|
||||
const useStateFromStores = fluxModule.useStateFromStores;
|
||||
let object = [GiftCodeStore];
|
||||
const value5 = Reflect.apply(useStateFromStores, fluxModule, [object, function() {
|
||||
return GiftCodeStore.get(code);
|
||||
}]);
|
||||
const currentUser = fluxModule.useStateFromStores([UserStore], function() {
|
||||
return UserStore.getCurrentUser();
|
||||
});
|
||||
const value6 = (importDefault(8456) /* metro dependency 8456: useGiftCodeErrorMessage */)(code, currentUser);
|
||||
if (value == currentUser) {
|
||||
return value;
|
||||
}
|
||||
if (value == value5) {
|
||||
r1 = value;
|
||||
} else {
|
||||
Navigator = (require(5280) /* metro dependency 5280: NavigatorNative */).Navigator;
|
||||
object = {screens: GiftCodeRedeemModalGetScreens(currentUser)};
|
||||
if (value != value6) {
|
||||
object8 = {};
|
||||
object8.name = env0_6.ERROR;
|
||||
object9 = {message: value6};
|
||||
copyDataProperties(object9, value3, value2);
|
||||
object8.params = object9;
|
||||
items = [object8];
|
||||
} else {
|
||||
object6 = {};
|
||||
object6.name = env0_6.START;
|
||||
object7 = {giftCode: value5};
|
||||
copyDataProperties(object7, value3, value2);
|
||||
object6.params = object7;
|
||||
items = [object6];
|
||||
}
|
||||
object.initialRouteStack = items;
|
||||
value = <Navigator {...object} />;
|
||||
r1 = value;
|
||||
}
|
||||
return r1;
|
||||
}
|
||||
|
||||
function GiftCodeRedeemModalGetScreens(a0) { // fn#67123, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8639:582, owner: GiftCodeRedeemModal.getScreens, offset: 0x01c16502, size: 223 bytes, params: 2, frame: 21
|
||||
var environment;
|
||||
const env0_0 = a0;
|
||||
const object5 = {};
|
||||
const value = environment.__proto__;
|
||||
const binding = env1_6;
|
||||
const START = binding.START;
|
||||
const object6 = {};
|
||||
const binding2 = env1_7;
|
||||
object6.headerTitle = binding2;
|
||||
object6.headerLeft = (require(5282) /* metro dependency 5282: NavigatorHeaderNative */).getHeaderCloseButton(_fun67124);
|
||||
object6.render = render_67125;
|
||||
object5[START] = object6;
|
||||
const SUCCESS = binding.SUCCESS;
|
||||
const object7 = {headerTitle: binding2};
|
||||
object7.headerLeft = (require(5282) /* metro dependency 5282: NavigatorHeaderNative */).getHeaderCloseButton(_fun67126);
|
||||
object7.render = render_67127;
|
||||
object5[SUCCESS] = object7;
|
||||
const ERROR = binding.ERROR;
|
||||
const object8 = {headerTitle: binding2};
|
||||
object8.headerLeft = (require(5282) /* metro dependency 5282: NavigatorHeaderNative */).getHeaderCloseButton(_fun67128);
|
||||
object8.render = render_67129;
|
||||
object5[ERROR] = object8;
|
||||
return object5;
|
||||
}
|
||||
|
||||
function _fun67124() { // fn#67124, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8639:678, offset: 0x01c165e1, size: 37 bytes, params: 1, frame: 11
|
||||
const value = environment.__proto__.__proto__;
|
||||
return (importDefault(5080) /* metro dependency 5080: ModalActionCreators */).pop();
|
||||
}
|
||||
|
||||
function getScreensRender_67125(a0) { // fn#67125, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8639:705, owner: GiftCodeRedeemModal.getScreens.render, offset: 0x01c16606, size: 65 bytes, params: 2, frame: 15
|
||||
const value = environment.__proto__.__proto__;
|
||||
return ((Component) => <Component {...a0} {...{['user']: env0_0}} />)(importDefault(8455) /* metro dependency 8455: GiftCodeRedeemStart */);
|
||||
}
|
||||
|
||||
function getScreensRender_67127(a0) { // fn#67127, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8639:829, owner: GiftCodeRedeemModal.getScreens.render, offset: 0x01c16647, size: 65 bytes, params: 2, frame: 15
|
||||
const value = environment.__proto__.__proto__;
|
||||
return ((Component) => <Component {...a0} {...{['user']: env0_0}} />)(importDefault(10512) /* metro dependency 10512: GiftCodeRedeemSuccess */);
|
||||
}
|
||||
|
||||
function getScreensRender_67129(a0) { // fn#67129, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8639:951, owner: GiftCodeRedeemModal.getScreens.render, offset: 0x01c16688, size: 49 bytes, params: 2, frame: 14
|
||||
const value = environment.__proto__.__proto__;
|
||||
return ((Component) => <Component {...a0} />)(importDefault(10513) /* metro dependency 10513: GiftCodeRedeemError */);
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,221 @@
|
||||
/* Metro module 10512; source: modules/premium/native/gift_code_modal/GiftCodeRedeemSuccess.tsx; dependencies: [31, 27, 4279, 33, 4501, 697, 566, 8457, 6777, 8461, 5134, 1904, 7609, 7606, 6618, 6829, 8467, 6780, 8470, 4242, 1305, 8488, 10094, 10507, 10508, 4573, 1244, 4129, 4578, 5080, 2] */
|
||||
function _fun81254(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#81254, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10698:6, offset: 0x01ec56b8, size: 427 bytes, params: 8, frame: 22
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
importAll(31) /* metro dependency 31 */;
|
||||
let value = require(27) /* metro dependency 27 */;
|
||||
const env0_3 = value.View;
|
||||
const env0_4 = value.ScrollView;
|
||||
const skuStore = importDefault(4279) /* metro dependency 4279: SKUStore */;
|
||||
value = require(33) /* metro dependency 33 */;
|
||||
const env0_6 = value.jsx;
|
||||
const env0_7 = value.jsxs;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
object2 = {};
|
||||
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
|
||||
object2.container = {'flex': 1, 'justifyContent': 'space-between', backgroundColor: BACKGROUND_BASE_LOW};
|
||||
object2.body = {'flex': 1, 'alignItems': 'center', 'justifyContent': 'center', 'paddingTop': 28,
|
||||
'paddingBottom': 12, 'paddingHorizontal': 32};
|
||||
let PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
|
||||
object2.nameplateContainer = {width: '100%', paddingTop: PX_24};
|
||||
PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
|
||||
object2.bundleContainer = {'width': '100%', 'alignItems': 'center', paddingTop: PX_24};
|
||||
object2.header = {'marginTop': 32, 'textAlign': 'center'};
|
||||
object2.message = {'marginTop': 8, 'textAlign': 'center'};
|
||||
object2.footer = {paddingHorizontal: 24};
|
||||
object2.gameItemCard = {marginTop: 20};
|
||||
const env0_8 = Reflect.apply(createStyles, value, [object2]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/premium/native/gift_code_modal/GiftCodeRedeemSuccess.tsx');
|
||||
exports.default = GiftCodeRedeemSuccess;
|
||||
}
|
||||
|
||||
function GiftCodeRedeemSuccess({giftCode, user}) { // fn#81255, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10698:808, offset: 0x01ec5863, size: 2432 bytes, params: 2, frame: 39
|
||||
var r5;
|
||||
var r9;
|
||||
var name;
|
||||
var r7;
|
||||
var r14;
|
||||
var r13;
|
||||
var r8;
|
||||
var object;
|
||||
var moduleValue10;
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
var formatToPlainString;
|
||||
var W2znvX;
|
||||
var object3;
|
||||
var object4;
|
||||
var object5;
|
||||
var value;
|
||||
const styles = useStyles();
|
||||
const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStores([SKUStore], function() {
|
||||
return SKUStore.get(giftCode.skuId);
|
||||
});
|
||||
const value4 = (require(8457) /* metro dependency 8457: SubscriptionUtils */).useGetOrFetchSubscriptionPlan(giftCode.subscriptionPlanId);
|
||||
const value5 = (require(6777) /* metro dependency 6777: useGetOrFetchApplications */).useGetOrFetchApplication(giftCode.applicationId);
|
||||
const useFetchCollectiblesProductModule = require(8461) /* metro dependency 8461: useFetchCollectiblesProduct */;
|
||||
const useFetchCollectiblesProduct = useFetchCollectiblesProductModule.useFetchCollectiblesProduct;
|
||||
const product = Reflect.apply(useFetchCollectiblesProduct, useFetchCollectiblesProductModule,
|
||||
[(require(5134) /* metro dependency 5134: CollectiblesUtils */).isCollectiblesGiftCode(giftCode) ? giftCode.skuId : null,
|
||||
true]).product;
|
||||
let r12 = product == null ? undefined : product.items[0];
|
||||
const type = product?.type;
|
||||
const CollectiblesItemType = (require(1904) /* metro dependency 1904: CollectiblesItemType */).CollectiblesItemType;
|
||||
const BUNDLE = CollectiblesItemType.BUNDLE;
|
||||
const value7 = type === BUNDLE;
|
||||
const {firstAvatarDecoration, firstProfileEffect,
|
||||
firstNameplate} = (require(7609) /* metro dependency 7609: useShopProductItems */).useShopProductItems(product ?? ({items: []}));
|
||||
const useHandleUseNowModule = require(7606) /* metro dependency 7606: useHandleUseNow */;
|
||||
const useHandleUseNow = useHandleUseNowModule.useHandleUseNow;
|
||||
if (product != null) {
|
||||
r5 = product;
|
||||
} else {
|
||||
object = {skuId: ''};
|
||||
object.type = (require(1904) /* metro dependency 1904: CollectiblesItemType */).CollectiblesItemType.BUNDLE;
|
||||
object.items = [];
|
||||
r5 = object;
|
||||
}
|
||||
const {handleUseNow, isApplying} = Reflect.apply(useHandleUseNow, useHandleUseNowModule, [{product: r5}]);
|
||||
const SafeAreaPaddingView = (require(6618) /* metro dependency 6618: SafeAreaView */).SafeAreaPaddingView;
|
||||
const items2 = [r12 != null ? value7 ? product == null || firstAvatarDecoration == null ? (require(4242) /* metro dependency 4242 */).match(r12).with({type: CollectiblesItemType.AVATAR_DECORATION},
|
||||
_fun81257).with({type: CollectiblesItemType.PROFILE_EFFECT},
|
||||
_fun81258).with({type: CollectiblesItemType.PROFILE_FRAME},
|
||||
_fun81259).with({type: CollectiblesItemType.NAMEPLATE},
|
||||
_fun81260).otherwise(_fun81261) : firstProfileEffect != null ? <View style={styles.bundleContainer}>{((Component) => <Component deco={firstAvatarDecoration} pfx={firstProfileEffect} nameplate={firstNameplate} size="large" />)(importDefault(8470) /* metro dependency 8470: BundleSampleV2 */)}</View> : (require(4242) /* metro dependency 4242 */).match(r12).with({type: CollectiblesItemType.AVATAR_DECORATION},
|
||||
_fun81257).with({type: CollectiblesItemType.PROFILE_EFFECT},
|
||||
_fun81258).with({type: CollectiblesItemType.PROFILE_FRAME},
|
||||
_fun81259).with({type: CollectiblesItemType.NAMEPLATE},
|
||||
_fun81260).otherwise(_fun81261) : (require(4242) /* metro dependency 4242 */).match(r12).with({type: CollectiblesItemType.AVATAR_DECORATION},
|
||||
_fun81257).with({type: CollectiblesItemType.PROFILE_EFFECT},
|
||||
_fun81258).with({type: CollectiblesItemType.PROFILE_FRAME},
|
||||
_fun81259).with({type: CollectiblesItemType.NAMEPLATE},
|
||||
_fun81260).otherwise(_fun81261) : value5 != null ? (require(6829) /* metro dependency 6829: SlayerStorefrontUtils */).isGameItemSKU(value3) ? <View style={styles.gameItemCard}>{((Component) => <Component sku={value3} />)(importDefault(8467) /* metro dependency 8467: SlayerStorefrontItemCard */)}</View> : ((Component) => <Component game={value5} size={(require(6780) /* metro dependency 6780: GameIcon */).GameIconSizes.LARGE} skuId={giftCode.skuId} />)(importDefault(6780) /* metro dependency 6780: GameIcon */) : value7 ? product == null || firstAvatarDecoration == null ? (require(4242) /* metro dependency 4242 */).match(r12).with({type: CollectiblesItemType.AVATAR_DECORATION},
|
||||
_fun81257).with({type: CollectiblesItemType.PROFILE_EFFECT},
|
||||
_fun81258).with({type: CollectiblesItemType.PROFILE_FRAME},
|
||||
_fun81259).with({type: CollectiblesItemType.NAMEPLATE},
|
||||
_fun81260).otherwise(_fun81261) : firstProfileEffect != null ? <View style={styles.bundleContainer}>{((Component) => <Component deco={firstAvatarDecoration} pfx={firstProfileEffect} nameplate={firstNameplate} size="large" />)(importDefault(8470) /* metro dependency 8470: BundleSampleV2 */)}</View> : (require(4242) /* metro dependency 4242 */).match(r12).with({type: CollectiblesItemType.AVATAR_DECORATION},
|
||||
_fun81257).with({type: CollectiblesItemType.PROFILE_EFFECT},
|
||||
_fun81258).with({type: CollectiblesItemType.PROFILE_FRAME},
|
||||
_fun81259).with({type: CollectiblesItemType.NAMEPLATE},
|
||||
_fun81260).otherwise(_fun81261) : (require(4242) /* metro dependency 4242 */).match(r12).with({type: CollectiblesItemType.AVATAR_DECORATION},
|
||||
_fun81257).with({type: CollectiblesItemType.PROFILE_EFFECT},
|
||||
_fun81258).with({type: CollectiblesItemType.PROFILE_FRAME},
|
||||
_fun81259).with({type: CollectiblesItemType.NAMEPLATE}, _fun81260).otherwise(_fun81261)];
|
||||
if (value3 == null) {
|
||||
r9 = <Text variant="heading-xl/bold" style={styles.header} accessibilityRole="header">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['+BNMcF'])}</Text>;
|
||||
} else {
|
||||
moduleValue10 = require(6829) /* metro dependency 6829: SlayerStorefrontUtils */;
|
||||
r9 = moduleValue10.isGameItemSKU(value3) ? <Text variant="heading-xl/bold" style={styles.header} accessibilityRole="header">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['5glWta'])}</Text> : giftCode.isSubscription && value4 != null ? <Text variant="heading-xl/bold" style={styles.header} accessibilityRole="header">{intl.format((require(1244) /* metro dependency 1244: indexNative */).t['1C2BG/'],
|
||||
|
||||
{skuName: value3.name})}</Text> : r12 != null ? <Text variant="heading-xl/bold" color="mobile-text-heading-primary" style={styles.header} accessibilityRole="header">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.IMffmm)}</Text> : undefined;
|
||||
}
|
||||
items2[1] = r9;
|
||||
const slayerStorefrontUtilsModule = require(6829) /* metro dependency 6829: SlayerStorefrontUtils */;
|
||||
if (slayerStorefrontUtilsModule.isGameItemSKU(value3)) {
|
||||
if (value5 != null) {
|
||||
var textProps = {variant: 'text-md/medium', style: styles.message};
|
||||
formatToPlainString = intl.formatToPlainString;
|
||||
W2znvX = (require(1244) /* metro dependency 1244: indexNative */).t.W2znvX;
|
||||
object3 = {};
|
||||
name = value3?.name;
|
||||
object3.skuName = name ?? '';
|
||||
name = value5.name;
|
||||
object3.applicationName = name;
|
||||
r7 = <Text {...textProps}>{Reflect.apply(formatToPlainString, intl, [W2znvX, object3])}</Text>;
|
||||
} else {
|
||||
r7 = giftCode.isSubscription && value4 != null ? <Text variant="text-md/medium" style={styles.message}>{(require(4129) /* metro dependency 4129: GiftCodeUtils */).getSubscriptionGiftSuccessText(value4)}</Text> : <Text variant="text-md/medium" style={styles.message}>{r12 == null ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t['5ayf7w']) : value3?.name != null ? intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t['4kp0AB'],
|
||||
|
||||
|
||||
{itemName: value3.name}) : intl.string((require(1244) /* metro dependency 1244: indexNative */).t['5ayf7w'])}</Text>;
|
||||
}
|
||||
} else {
|
||||
r7 = giftCode.isSubscription && value4 != null ? <Text variant="text-md/medium" style={styles.message}>{(require(4129) /* metro dependency 4129: GiftCodeUtils */).getSubscriptionGiftSuccessText(value4)}</Text> : <Text variant="text-md/medium" style={styles.message}>{r12 == null ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t['5ayf7w']) : value3?.name != null ? intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t['4kp0AB'],
|
||||
|
||||
{itemName: value3.name}) : intl.string((require(1244) /* metro dependency 1244: indexNative */).t['5ayf7w'])}</Text>;
|
||||
}
|
||||
items2[2] = r7;
|
||||
const scrollView = <ScrollView contentContainerStyle={styles.body} alwaysBounceVertical={false}>{items2}</ScrollView>;
|
||||
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
|
||||
if (r12 == null) {
|
||||
object5 = {};
|
||||
object5.text = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['NX+WJN']);
|
||||
object5.size = 'md';
|
||||
object5.onPress = (importDefault(5080) /* metro dependency 5080: ModalActionCreators */).pop;
|
||||
r8 = object5;
|
||||
} else {
|
||||
object4 = {};
|
||||
object4.text = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.MAS7uK);
|
||||
object4.size = 'md';
|
||||
object4.loading = isApplying;
|
||||
value = r12 != null;
|
||||
if (value) {
|
||||
if (value7) {
|
||||
r14 = value7 && product != null;
|
||||
r14 = r14 && firstAvatarDecoration != null;
|
||||
r14 = r14 && firstProfileEffect != null;
|
||||
r13 = r14;
|
||||
} else {
|
||||
r13 = !value7;
|
||||
}
|
||||
r12 = r13;
|
||||
} else {
|
||||
r12 = value;
|
||||
}
|
||||
object4.disabled = !r12;
|
||||
object4.onPress = handleUseNow;
|
||||
r8 = object4;
|
||||
}
|
||||
return (
|
||||
<SafeAreaPaddingView bottom style={styles.container}>
|
||||
{scrollView}
|
||||
<View style={styles.footer}>
|
||||
<Button {...r8} />
|
||||
</View>
|
||||
</SafeAreaPaddingView>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun81257(a0) { // fn#81257, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10698:2009, offset: 0x01ec6202, size: 182 bytes, params: 2, frame: 23
|
||||
const value2 = undefined;
|
||||
const Avatar = (require(1305) /* metro dependency 1305: native */).Avatar;
|
||||
const r5 = user == null ? value2 : user.getAvatarSource(null, true,
|
||||
(require(1305) /* metro dependency 1305: native */).AVATAR_SIZE_MAP[(require(1305) /* metro dependency 1305: native */).AvatarSizes.GIFT_SUCCESS]);
|
||||
const AvatarSizes = (require(1305) /* metro dependency 1305: native */).AvatarSizes;
|
||||
const GIFT_SUCCESS = AvatarSizes.GIFT_SUCCESS;
|
||||
return (
|
||||
<Avatar
|
||||
source={r5}
|
||||
avatarDecoration={a0}
|
||||
size={GIFT_SUCCESS}
|
||||
animate
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun81258(a0) { // fn#81258, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10698:2271, offset: 0x01ec62b8, size: 58 bytes, params: 2, frame: 14
|
||||
const value = environment.__proto__;
|
||||
return ((Component) => <Component user={user} profileEffect={a0} />)(importDefault(8488) /* metro dependency 8488: ProfileEffectUserPreview */);
|
||||
}
|
||||
|
||||
function _fun81259(a0) { // fn#81259, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10698:2370, offset: 0x01ec62f2, size: 58 bytes, params: 2, frame: 14
|
||||
const value = environment.__proto__;
|
||||
return ((Component) => <Component user={user} profileFrame={a0} />)(importDefault(10094) /* metro dependency 10094: ProfileFrameUserPreview */);
|
||||
}
|
||||
|
||||
function _fun81260(a0) { // fn#81260, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10698:2464, offset: 0x01ec632c, size: 94 bytes, params: 2, frame: 16
|
||||
const NameplatePreview = (require(10507) /* metro dependency 10507: NameplatePreview */).NameplatePreview;
|
||||
return (
|
||||
<View style={styles.nameplateContainer}>
|
||||
<NameplatePreview user={user} nameplate={a0} />
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun81261() { // fn#81261, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10698:2573, offset: 0x01ec638a, size: 57 bytes, params: 1, frame: 14
|
||||
const value = environment.__proto__;
|
||||
return ((Component) => <Component giftStyle={giftCode.giftStyle} />)(importDefault(10508) /* metro dependency 10508: GiftBoxAnimation */);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,65 @@
|
||||
/* Metro module 8456; source: modules/premium/native/gift_code_modal/useGiftCodeErrorMessage.tsx; dependencies: [57, 5145, 8450, 566, 1244, 4129, 2] */
|
||||
function _fun67164(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#67164, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8641:6, offset: 0x01c18298, size: 146 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_2 = importDefault(57) /* metro dependency 57 */;
|
||||
const collectiblesPurchaseStore = importDefault(5145) /* metro dependency 5145: CollectiblesPurchaseStore */;
|
||||
const giftCodeStore = importDefault(8450) /* metro dependency 8450: GiftCodeStore */;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/premium/native/gift_code_modal/useGiftCodeErrorMessage.tsx');
|
||||
exports.default = useGiftCodeErrorMessage;
|
||||
}
|
||||
|
||||
function useGiftCodeErrorMessage(a0, a1) { // fn#67165, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8641:236, offset: 0x01c1832a, size: 408 bytes, params: 3, frame: 20
|
||||
var r0;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
const env0_0 = a0;
|
||||
var value;
|
||||
const value2 = undefined;
|
||||
const fluxModule = require(566) /* metro dependency 566: flux */;
|
||||
const useStateFromStoresArray = fluxModule.useStateFromStoresArray;
|
||||
const value4 = env0_2(Reflect.apply(useStateFromStoresArray, fluxModule, [[GiftCodeStore], _fun67166]), 2);
|
||||
const property = value4[0];
|
||||
const property2 = value4[1];
|
||||
const purchase = fluxModule.useStateFromStores([CollectiblesPurchaseStore], _fun67167);
|
||||
const value5 = null;
|
||||
const userId = value5 == property ? value2 : property.userId;
|
||||
if (userId === (value5 == a1 ? value2 : a1.id)) {
|
||||
r0 = intl.string(t.JZxgJX);
|
||||
} else if (value5 == property) {
|
||||
if (value5 != purchase) {
|
||||
r0 = intl.string(t.mdLtb5);
|
||||
} else if (value5 == property2) {
|
||||
r0 = value5;
|
||||
} else {
|
||||
value = require(4129) /* metro dependency 4129: GiftCodeUtils */;
|
||||
value = value.getGiftCodeRedeemError(property2);
|
||||
r0 = value;
|
||||
}
|
||||
} else if (property.isClaimed) {
|
||||
r0 = intl.string(t.ilcBeX);
|
||||
} else if (value5 != purchase) {
|
||||
r0 = intl.string(t.mdLtb5);
|
||||
} else if (value5 == property2) {
|
||||
r0 = value5;
|
||||
} else {
|
||||
value = require(4129) /* metro dependency 4129: GiftCodeUtils */;
|
||||
value = value.getGiftCodeRedeemError(property2);
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function _fun67166() { // fn#67166, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8641:317, offset: 0x01c184c2, size: 49 bytes, params: 1, frame: 12
|
||||
const value = environment.__proto__;
|
||||
const get = GiftCodeStore.get;
|
||||
const binding = env0_0;
|
||||
const getError = GiftCodeStore.getError;
|
||||
return [Reflect.apply(get, GiftCodeStore, [binding]), Reflect.apply(getError, GiftCodeStore, [binding])];
|
||||
}
|
||||
|
||||
function _fun67167() { // fn#67167, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8641:405, offset: 0x01c184f3, size: 47 bytes, params: 1, frame: 13
|
||||
return CollectiblesPurchaseStore.getPurchase(env0_1?.skuId);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,266 @@
|
||||
/* Metro module 10468; source: modules/premium/native/gifting/GiftBadgePostPurchase.tsx; dependencies: [31, 27, 7670, 10469, 1376, 33, 4501, 697, 1585, 5080, 4008, 4578, 10112, 1244, 2320, 10470, 4573, 4081, 4082, 10388, 10471, 3968, 1365, 566, 7635, 2] */
|
||||
function _fun81003(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#81003, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10654:6, offset: 0x01e9497e, size: 318 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importAll(31) /* metro dependency 31 */;
|
||||
const env0_4 = (require(27) /* metro dependency 27 */).View;
|
||||
const badgeDirectoryStore = importDefault(7670) /* metro dependency 7670: BadgeDirectoryStore */;
|
||||
let value = require(10469) /* metro dependency 10469: GiftingBadgeConstants */;
|
||||
const env0_6 = value.getRemainingGiftsToNextTier;
|
||||
const env0_7 = value.getTierForProgress;
|
||||
const env0_8 = value.getNextTierForProgress;
|
||||
const env0_9 = (require(1376) /* metro dependency 1376: DismissibleContentConstants */).ContentDismissActionType;
|
||||
value = require(33) /* metro dependency 33 */;
|
||||
const env0_10 = value.jsx;
|
||||
const env0_11 = value.jsxs;
|
||||
const env0_12 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(_fun81010);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/premium/native/gifting/GiftBadgePostPurchase.tsx');
|
||||
exports.default = GiftBadgePostPurchase;
|
||||
}
|
||||
|
||||
function PostPurchaseFooter({onSendGift}) { // fn#81004, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10654:984, offset: 0x01e94abc, size: 414 bytes, params: 2, frame: 28
|
||||
const styles = useStyles((importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)().bottom);
|
||||
const value2 = env0_3.useCallback(_fun81005, [onSendGift]);
|
||||
const value3 = env0_3.useCallback(_fun81006, []);
|
||||
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
|
||||
const object = {'grow': true, 'variant': 'primary'};
|
||||
const GiftIcon = (require(10112) /* metro dependency 10112: GiftIcon */).GiftIcon;
|
||||
const CONTROL_PRIMARY_TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.CONTROL_PRIMARY_TEXT_DEFAULT;
|
||||
object.icon = <GiftIcon size="sm" color={CONTROL_PRIMARY_TEXT_DEFAULT} />;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
object.text = intl.string((importDefault(2320) /* metro dependency 2320: GiftingBadgeMessages */).g86YiI);
|
||||
object.onPress = value2;
|
||||
return (
|
||||
<View style={styles.footer}>
|
||||
<Button {...object} />
|
||||
<Button
|
||||
grow
|
||||
variant="secondary"
|
||||
text={(require(1244) /* metro dependency 1244: indexNative */).intl.string((importDefault(2320) /* metro dependency 2320: GiftingBadgeMessages */)['sa/cfM'])}
|
||||
onPress={value3}
|
||||
/>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function InProgressScreen({progress, title, progressBarTitle, description, currentTier, nextTier, onSendGift}) { // fn#81007, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10654:1547, offset: 0x01e94cde, size: 424 bytes, params: 2, frame: 32
|
||||
const styles = useStyles((importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)().bottom);
|
||||
const view = <View style={styles.progressWrapper}>{((Component) => <Component progress={progress} currentTier={currentTier} nextTier={nextTier} iconSize={48} title={progressBarTitle} />)(importDefault(10470) /* metro dependency 10470: GiftingBadgeProgress */)}</View>;
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
return (
|
||||
<View style={styles.screenContainer}>
|
||||
<View style={styles.content}>
|
||||
{view}
|
||||
<View style={styles.messageSection}>
|
||||
<Text variant="heading-xxl/bold" style={styles.centerText}>
|
||||
{title}
|
||||
</Text>
|
||||
<Text
|
||||
variant="text-md/medium"
|
||||
color="text-subtle"
|
||||
style={styles.centerText}
|
||||
>
|
||||
{description}
|
||||
</Text>
|
||||
</View>
|
||||
</View>
|
||||
<PostPurchaseFooter onSendGift={onSendGift} />
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function LevelUpScreen({simulatedProgress, currentTier, newTier, nextTier, giftsToNextTier, onSendGift}) { // fn#81008, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10654:2151, offset: 0x01e94e86, size: 743 bytes, params: 2, frame: 44
|
||||
const styles = useStyles((importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)().bottom);
|
||||
env0_3.useEffect(function() {
|
||||
require(dependencyMap[17]).triggerHapticFeedback(importDefault(dependencyMap[18]).IMPACT_HEAVY);
|
||||
}, []);
|
||||
const view = <View style={styles.levelUpIconWrapper}>{newTier.simple_icon_url != null && ((Component) => <Component icon={newTier.simple_icon_url} size={140} />)(importDefault(10388) /* metro dependency 10388: GiftingBadgeIcon */)}</View>;
|
||||
const value5 = ((Component) => <Component progress={simulatedProgress} currentTier={currentTier} newTier={newTier} style={styles.levelUpProgress} />)(importDefault(10471) /* metro dependency 10471: GiftingBadgeLevelUpProgress */);
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const format = intl.format;
|
||||
const k8MmO8 = (importDefault(2320) /* metro dependency 2320: GiftingBadgeMessages */).k8MmO8;
|
||||
const name = newTier.name;
|
||||
const value6 = '';
|
||||
return (
|
||||
<View style={styles.screenContainer}>
|
||||
<View style={styles.content}>
|
||||
{view}
|
||||
<View style={styles.levelUpBody}>
|
||||
{value5}
|
||||
<View style={styles.messageSection}>
|
||||
<Text variant="heading-xxl/bold" style={styles.centerText}>
|
||||
{Reflect.apply(format, intl, [k8MmO8, {tierName: name ?? value6}])}
|
||||
</Text>
|
||||
{nextTier != null && giftsToNextTier != null && giftsToNextTier > 0 && <Text variant="text-md/normal" color="text-subtle" style={styles.centerText}>{intl.format((importDefault(2320) /* metro dependency 2320: GiftingBadgeMessages */)['6QVlxw'],
|
||||
{count: giftsToNextTier, nextTierName: nextTier.name ?? value6})}</Text>}
|
||||
</View>
|
||||
</View>
|
||||
</View>
|
||||
<PostPurchaseFooter onSendGift={onSendGift} />
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun81010(a0) { // fn#81010, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10654:309, offset: 0x01e951a9, size: 417 bytes, params: 2, frame: 17
|
||||
const object2 = {};
|
||||
object2.screenContainer = {flex: 1};
|
||||
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object2.content = {'flex': 1, 'alignItems': 'center', 'justifyContent': 'center', padding: PX_16};
|
||||
const object3 = {};
|
||||
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object3.padding = PX_16;
|
||||
object3.width = '100%';
|
||||
const PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
|
||||
object3.marginBottom = PX_24;
|
||||
object2.progressWrapper = object3;
|
||||
const object6 = {'gap': null, 'alignItems': 'center', 'width': '100%'};
|
||||
let PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
|
||||
object6.gap = PX_12;
|
||||
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object6.paddingHorizontal = PX_16;
|
||||
object2.messageSection = object6;
|
||||
object2.centerText = {textAlign: 'center'};
|
||||
const PX_48 = (importDefault(697) /* metro dependency 697: native */).space.PX_48;
|
||||
object2.levelUpIconWrapper = {'paddingVertical': 26, 'paddingHorizontal': 74, marginBottom: PX_48};
|
||||
PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
|
||||
object2.levelUpBody = {'gap': null, 'alignItems': 'center', 'width': '100%', gap: PX_12};
|
||||
object2.levelUpProgress = {maxWidth: 260};
|
||||
const object7 = {width: '100%'};
|
||||
PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
|
||||
object7.gap = PX_12;
|
||||
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object7.paddingHorizontal = PX_16;
|
||||
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object7.paddingBottom = PX_16 + a0;
|
||||
object2.footer = object7;
|
||||
return object2;
|
||||
}
|
||||
|
||||
function GiftBadgePostPurchase({currentProgress, onSendGift}) { // fn#81011, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10654:3208, offset: 0x01e9534a, size: 777 bytes, params: 2, frame: 31
|
||||
var r12;
|
||||
var r13;
|
||||
var r1;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
env0_3.useEffect(function() {
|
||||
var moduleValue = require(dependencyMap[21]);
|
||||
var NEW_GIFTING_BADGES_COACHMARK = require(dependencyMap[22]).DismissibleContent.NEW_GIFTING_BADGES_COACHMARK;
|
||||
moduleValue.UNSAFE_markDismissibleContentAsDismissed(NEW_GIFTING_BADGES_COACHMARK,
|
||||
{dismissAction: ContentDismissActionType.INDIRECT_ACTION});
|
||||
}, []);
|
||||
const fluxModule = require(566) /* metro dependency 566: flux */;
|
||||
const useStateFromStores = fluxModule.useStateFromStores;
|
||||
let object = [BadgeDirectoryStore];
|
||||
const value3 = Reflect.apply(useStateFromStores, fluxModule, [object, _fun81013]);
|
||||
if (value3 == null) {
|
||||
return null;
|
||||
}
|
||||
const getTierForProgressBinding = getTierForProgress;
|
||||
const tierForProgressBinding = getTierForProgressBinding(value3, currentProgress);
|
||||
const value5 = currentProgress + 1;
|
||||
const tierForProgressBinding2 = getTierForProgressBinding(value3, value5);
|
||||
const key = tierForProgressBinding2?.key;
|
||||
const key2 = tierForProgressBinding?.key;
|
||||
const nextTierForProgress = getNextTierForProgress(value3, value5);
|
||||
const remainingGiftsToNextTier = getRemainingGiftsToNextTier(value3, value5);
|
||||
if (key === key2) {
|
||||
if (remainingGiftsToNextTier === 1) {
|
||||
object = {};
|
||||
object.title = intl.formatToPlainString((importDefault(2320) /* metro dependency 2320: GiftingBadgeMessages */).KjdBPz,
|
||||
|
||||
|
||||
{nextTier: nextTierForProgress?.name ?? ''});
|
||||
object.description = intl.string((importDefault(2320) /* metro dependency 2320: GiftingBadgeMessages */).oqDrEM);
|
||||
object.progressBarTitle = intl.string((importDefault(2320) /* metro dependency 2320: GiftingBadgeMessages */)['Ka5s+Q']);
|
||||
object.progress = value5;
|
||||
r13 = tierForProgressBinding2 ?? undefined;
|
||||
object.currentTier = r13;
|
||||
r13 = nextTierForProgress ?? undefined;
|
||||
object.nextTier = r13;
|
||||
object.onSendGift = onSendGift;
|
||||
r1 = object;
|
||||
} else {
|
||||
object = {};
|
||||
object.title = intl.string((importDefault(2320) /* metro dependency 2320: GiftingBadgeMessages */)['/rBQud']);
|
||||
object.description = intl.string((importDefault(2320) /* metro dependency 2320: GiftingBadgeMessages */).DDQMlx);
|
||||
r12 = tierForProgressBinding?.name != null ? intl.formatToPlainString((importDefault(2320) /* metro dependency 2320: GiftingBadgeMessages */).bwyQt8,
|
||||
|
||||
|
||||
{tierName: tierForProgressBinding?.name}) : '';
|
||||
object.progressBarTitle = r12;
|
||||
object.progress = value5;
|
||||
r12 = tierForProgressBinding2 ?? undefined;
|
||||
object.currentTier = r12;
|
||||
r12 = nextTierForProgress ?? undefined;
|
||||
object.nextTier = r12;
|
||||
object.onSendGift = onSendGift;
|
||||
r1 = object;
|
||||
}
|
||||
r1 = <InProgressScreen {...r1} />;
|
||||
} else if (tierForProgressBinding2 != null) {
|
||||
r1 = <LevelUpScreen simulatedProgress={value5} currentTier={tierForProgressBinding} newTier={tierForProgressBinding2} nextTier={nextTierForProgress} giftsToNextTier={remainingGiftsToNextTier} onSendGift={onSendGift} />;
|
||||
} else {
|
||||
if (remainingGiftsToNextTier === 1) {
|
||||
object = {};
|
||||
object.title = intl.formatToPlainString((importDefault(2320) /* metro dependency 2320: GiftingBadgeMessages */).KjdBPz,
|
||||
|
||||
|
||||
{nextTier: nextTierForProgress?.name ?? ''});
|
||||
object.description = intl.string((importDefault(2320) /* metro dependency 2320: GiftingBadgeMessages */).oqDrEM);
|
||||
object.progressBarTitle = intl.string((importDefault(2320) /* metro dependency 2320: GiftingBadgeMessages */)['Ka5s+Q']);
|
||||
object.progress = value5;
|
||||
r13 = tierForProgressBinding2 ?? undefined;
|
||||
object.currentTier = r13;
|
||||
r13 = nextTierForProgress ?? undefined;
|
||||
object.nextTier = r13;
|
||||
object.onSendGift = onSendGift;
|
||||
r1 = object;
|
||||
} else {
|
||||
object = {};
|
||||
object.title = intl.string((importDefault(2320) /* metro dependency 2320: GiftingBadgeMessages */)['/rBQud']);
|
||||
object.description = intl.string((importDefault(2320) /* metro dependency 2320: GiftingBadgeMessages */).DDQMlx);
|
||||
r12 = tierForProgressBinding?.name != null ? intl.formatToPlainString((importDefault(2320) /* metro dependency 2320: GiftingBadgeMessages */).bwyQt8,
|
||||
|
||||
|
||||
{tierName: tierForProgressBinding?.name}) : '';
|
||||
object.progressBarTitle = r12;
|
||||
object.progress = value5;
|
||||
r12 = tierForProgressBinding2 ?? undefined;
|
||||
object.currentTier = r12;
|
||||
r12 = nextTierForProgress ?? undefined;
|
||||
object.nextTier = r12;
|
||||
object.onSendGift = onSendGift;
|
||||
r1 = object;
|
||||
}
|
||||
r1 = <InProgressScreen {...r1} />;
|
||||
}
|
||||
return r1;
|
||||
}
|
||||
|
||||
function _fun81005() { // fn#81005, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10654:1075, offset: 0x01e94c5a, size: 48 bytes, params: 1, frame: 11
|
||||
const value = environment.__proto__;
|
||||
(importDefault(5080) /* metro dependency 5080: ModalActionCreators */).pop();
|
||||
onSendGift();
|
||||
}
|
||||
|
||||
function _fun81006() { // fn#81006, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10654:1122, offset: 0x01e94c8a, size: 84 bytes, params: 1, frame: 13
|
||||
let value = environment.__proto__;
|
||||
(importDefault(5080) /* metro dependency 5080: ModalActionCreators */).pop();
|
||||
value = require(4008) /* metro dependency 4008: RootNavigationRefNative */;
|
||||
value = value.getRootNavigationRef();
|
||||
if (value != null) {
|
||||
value.navigate('you');
|
||||
}
|
||||
}
|
||||
|
||||
function _fun81013() { // fn#81013, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10654:3478, offset: 0x01e956a3, size: 69 bytes, params: 1, frame: 13
|
||||
let value = environment.__proto__;
|
||||
const getBadgeById = BadgeDirectoryStore.getBadgeById;
|
||||
value = undefined;
|
||||
const BadgeId = (require(7635) /* metro dependency 7635: BadgeId */).BadgeId;
|
||||
const GIFTING = BadgeId.GIFTING;
|
||||
const value2 = Reflect.apply(getBadgeById, BadgeDirectoryStore, [GIFTING]);
|
||||
return value2 == null ? value : value2.tiers;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,141 @@
|
||||
/* Metro module 11771; source: modules/premium/native/gifting/PremiumAnimatedGiftButton.tsx; dependencies: [31, 4502, 33, 4501, 697, 1357, 3860, 566, 477, 4017, 5278, 6760, 2] */
|
||||
function _fun90148(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#90148, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11957:6, offset: 0x0202dada, size: 209 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importAll(31) /* metro dependency 31 */;
|
||||
const env0_4 = (require(31) /* metro dependency 31 */).useRef;
|
||||
const accessibilityStore = importDefault(4502) /* metro dependency 4502: AccessibilityStore */;
|
||||
const env0_6 = (require(33) /* metro dependency 33 */).jsx;
|
||||
const env0_7 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(_fun90149);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/premium/native/gifting/PremiumAnimatedGiftButton.tsx');
|
||||
exports.PremiumAnimatedGiftButton = PremiumAnimatedGiftButton;
|
||||
}
|
||||
|
||||
function _fun90149(a0, a1) { // fn#90149, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11957:171, offset: 0x0202dbab, size: 204 bytes, params: 3, frame: 19
|
||||
const object4 = {};
|
||||
const object5 = {};
|
||||
const REDESIGN_BUTTON_TERTIARY_BACKGROUND = (importDefault(697) /* metro dependency 697: native */).colors.REDESIGN_BUTTON_TERTIARY_BACKGROUND;
|
||||
object5.backgroundColor = REDESIGN_BUTTON_TERTIARY_BACKGROUND;
|
||||
object5.width = a0;
|
||||
object5.height = a0;
|
||||
object5.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
|
||||
object5.marginHorizontal = a1;
|
||||
object5.display = 'flex';
|
||||
object5.alignItems = 'center';
|
||||
object5.justifyContent = 'center';
|
||||
object4.container = object5;
|
||||
const object6 = {width: a0, height: a0};
|
||||
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
|
||||
object6.marginHorizontal = a1;
|
||||
object6.display = 'flex';
|
||||
object6.alignItems = 'center';
|
||||
object6.justifyContent = 'center';
|
||||
object4.containerRefresh = object6;
|
||||
object4.animation = {'width': 30, 'height': 30};
|
||||
object4.animationRefresh = {'width': 24, 'height': 24};
|
||||
return object4;
|
||||
}
|
||||
|
||||
function PremiumAnimatedGiftButton(a0) { // fn#90150, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11957:727, offset: 0x0202dc77, size: 698 bytes, params: 2, frame: 33
|
||||
const active = a0.active;
|
||||
const style = a0.style;
|
||||
const activeStyle = a0.activeStyle;
|
||||
const disabled = a0.disabled;
|
||||
const accessibilityState = a0.accessibilityState;
|
||||
const channelId = a0.channelId;
|
||||
const animationDataUrl = a0.animationDataUrl;
|
||||
const onAnimationFinished = a0.onAnimationFinished;
|
||||
const loop = a0.loop;
|
||||
const value2 = undefined;
|
||||
const mobileVisualRefreshExperimentModule = require(1357) /* metro dependency 1357: MobileVisualRefreshExperiment */;
|
||||
const useMobileVisualRefreshConfig = mobileVisualRefreshExperimentModule.useMobileVisualRefreshConfig;
|
||||
const enabled = Reflect.apply(useMobileVisualRefreshConfig, mobileVisualRefreshExperimentModule,
|
||||
[{location: 'PremiumAnimatedGiftButton'}]).enabled;
|
||||
const useTokenModule = require(3860) /* metro dependency 3860: useToken */;
|
||||
let useToken = useTokenModule.useToken;
|
||||
const CHAT_INPUT_ACTION_BUTTON_SIZE = (importDefault(697) /* metro dependency 697: native */).modules.mobile.CHAT_INPUT_ACTION_BUTTON_SIZE;
|
||||
const value3 = Reflect.apply(useToken, useTokenModule, [CHAT_INPUT_ACTION_BUTTON_SIZE]);
|
||||
const moduleValue3 = useTokenModule;
|
||||
useToken = moduleValue3.useToken;
|
||||
const CHAT_INPUT_ACTION_BUTTON_MARGIN = (importDefault(697) /* metro dependency 697: native */).modules.mobile.CHAT_INPUT_ACTION_BUTTON_MARGIN;
|
||||
const value4 = Reflect.apply(useToken, moduleValue3, [CHAT_INPUT_ACTION_BUTTON_MARGIN]);
|
||||
const moduleValue4 = useTokenModule;
|
||||
useToken = moduleValue4.useToken;
|
||||
const CHAT_INPUT_ACTION_BUTTON_MIN_TOUCH_TARGET_SIZE = (importDefault(697) /* metro dependency 697: native */).modules.mobile.CHAT_INPUT_ACTION_BUTTON_MIN_TOUCH_TARGET_SIZE;
|
||||
const value5 = Reflect.apply(useToken, moduleValue4, [CHAT_INPUT_ACTION_BUTTON_MIN_TOUCH_TARGET_SIZE]);
|
||||
const styles = useStyles(value3, value4);
|
||||
const Math = global.Math;
|
||||
const value6 = Math.max(0, (value5 - value3) / 2);
|
||||
const value7 = useRef(null);
|
||||
const useReducedMotion = (require(566) /* metro dependency 566: flux */).useStateFromStores([AccessibilityStore],
|
||||
function() {
|
||||
return AccessibilityStore.useReducedMotion;
|
||||
});
|
||||
env0_3.useEffect(_fun90152, [channelId, useReducedMotion]);
|
||||
const View = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
|
||||
const FadeOut = useReducedMotion ? value2 : (require(4017) /* metro dependency 4017: ReanimatedRexport */).FadeOut;
|
||||
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
|
||||
const object = {};
|
||||
const r23 = enabled ? styles.containerRefresh : styles.container;
|
||||
object.style = [r23, style, active && !disabled && activeStyle];
|
||||
object.hitSlop = value6 > 0 ? value6 : value2;
|
||||
object.accessibilityRole = 'button';
|
||||
const object4 = {disabled: disabled};
|
||||
copyDataProperties(object4, accessibilityState, r23);
|
||||
object.accessibilityState = object4;
|
||||
copyDataProperties(object, a0, r23);
|
||||
let value = importDefault(6760) /* metro dependency 6760: LottieAnimationView */;
|
||||
value = ((Component) => <Component ref={value7} style={enabled ? styles.animationRefresh : styles.animation} source={{uri: animationDataUrl}} loop={loop} autoPlay={false} onAnimationFinish={onAnimationFinished} />)(value);
|
||||
return (
|
||||
<View exiting={FadeOut}>
|
||||
<PressableOpacity {...object}>
|
||||
{value}
|
||||
</PressableOpacity>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun90152() { // fn#90152, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11957:1355, offset: 0x0202df31, size: 143 bytes, params: 1, frame: 14
|
||||
var r0;
|
||||
var r3;
|
||||
var r1;
|
||||
var value2;
|
||||
var value3;
|
||||
var moduleValue;
|
||||
var value4;
|
||||
var current;
|
||||
var value6;
|
||||
if (!useReducedMotion) {
|
||||
value2 = environment.__proto__;
|
||||
value3 = undefined;
|
||||
moduleValue = require(477) /* metro dependency 477: PlatformUtils */;
|
||||
if (moduleValue.isIOS()) {
|
||||
value4 = env0_0 == null;
|
||||
if (value4) {
|
||||
r0 = value4;
|
||||
r3 = value3;
|
||||
} else {
|
||||
current = env0_0.current;
|
||||
r0 = current == null;
|
||||
r3 = current;
|
||||
}
|
||||
if (!r0) {
|
||||
r3.reset();
|
||||
}
|
||||
}
|
||||
value6 = env0_0 == null;
|
||||
if (value6) {
|
||||
r0 = value6;
|
||||
r1 = value3;
|
||||
} else {
|
||||
current = env0_0.current;
|
||||
r0 = current == null;
|
||||
r1 = current;
|
||||
}
|
||||
if (!r0) {
|
||||
r1.play();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,67 @@
|
||||
/* Metro module 10394; source: modules/premium/native/gifting/PremiumFeaturesPromotionalLogo.tsx; dependencies: [57, 31, 4502, 33, 566, 7897, 477, 10395, 5475, 2] */
|
||||
function _fun80492(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#80492, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10580:6, offset: 0x01e7decf, size: 174 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 accessibilityStore = importDefault(4502) /* metro dependency 4502: AccessibilityStore */;
|
||||
const env0_6 = (require(33) /* metro dependency 33 */).jsx;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/premium/native/gifting/PremiumFeaturesPromotionalLogo.tsx');
|
||||
exports.default = PremiumFeaturesPromotionalLogo;
|
||||
}
|
||||
|
||||
function PremiumFeaturesPromotionalLogo({rotatingAvatarImageUrl, promoRotatingStyle, shouldAnimate}) { // fn#80493, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10580:249, offset: 0x01e7df7d, size: 412 bytes, params: 2, frame: 26
|
||||
var r0;
|
||||
shouldAnimate = shouldAnimate === undefined || shouldAnimate;
|
||||
var env0_4 = undefined;
|
||||
var value;
|
||||
const useReducedMotion = (require(566) /* metro dependency 566: flux */).useStateFromStores([AccessibilityStore],
|
||||
function() {
|
||||
return AccessibilityStore.useReducedMotion;
|
||||
});
|
||||
const binding = env0_4;
|
||||
const value3 = binding.useRef(null);
|
||||
const value4 = (require(7897) /* metro dependency 7897: APNGPlayerAndroid */).useAPNGPlayerControls(value3);
|
||||
var [property, env0_4] = undefined(binding.useState(false), 2);
|
||||
binding.useEffect(_fun80495, [shouldAnimate, value4, useReducedMotion]);
|
||||
(importDefault(10395) /* metro dependency 10395: useTimeout */)(_fun80496, property ? 100 : null);
|
||||
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
|
||||
if (platformUtilsModule.isAndroid()) {
|
||||
if (useReducedMotion) {
|
||||
value = importDefault(5475) /* metro dependency 5475: FastImage */;
|
||||
value = ((Component) => <Component style={promoRotatingStyle} resizeMode="contain" source={{uri: rotatingAvatarImageUrl}} />)(value);
|
||||
r0 = value;
|
||||
} else {
|
||||
const APNGPlayer = (require(7897) /* metro dependency 7897: APNGPlayerAndroid */).APNGPlayer;
|
||||
r0 = <APNGPlayer ref={value3} url={rotatingAvatarImageUrl} autoplay={false} style={promoRotatingStyle} />;
|
||||
}
|
||||
} else {
|
||||
value = importDefault(5475) /* metro dependency 5475: FastImage */;
|
||||
value = ((Component) => <Component style={promoRotatingStyle} resizeMode="contain" source={{uri: rotatingAvatarImageUrl}} />)(value);
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function _fun80495() { // fn#80495, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10580:532, offset: 0x01e7e119, size: 118 bytes, params: 1, frame: 13
|
||||
let value = environment.__proto__;
|
||||
value = require(477) /* metro dependency 477: PlatformUtils */;
|
||||
value = value.isAndroid();
|
||||
if (value && !useReducedMotion) {
|
||||
if (shouldAnimate) {
|
||||
env0_2.seek(0);
|
||||
env0_4(true);
|
||||
} else {
|
||||
env0_4(false);
|
||||
env0_2.stop();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function _fun80496() { // fn#80496, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10580:621, offset: 0x01e7e18f, size: 28 bytes, params: 1, frame: 9
|
||||
if (env0_3) {
|
||||
env0_2.play();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,132 @@
|
||||
/* Metro module 10472; source: modules/premium/native/gifting/PremiumGiftAnalytics.tsx; dependencies: [31, 661, 7669, 7294, 683, 1244, 7295, 2] */
|
||||
function _fun81025(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#81025, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10658:6, offset: 0x01e96141, 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 */).AnalyticEvents;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/premium/native/gifting/PremiumGiftAnalytics.tsx');
|
||||
exports.default = PremiumGiftAnalytics;
|
||||
}
|
||||
|
||||
function PremiumGiftAnalytics({currentStep, children}) { // fn#81026, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10658:230, offset: 0x01e961d0, size: 224 bytes, params: 2, frame: 20
|
||||
const {customGiftMessage, productId,
|
||||
basePurchaseAnalytics} = (require(7669) /* metro dependency 7669: NativeGiftContext */).useNativeGiftContext();
|
||||
const binding = basePurchaseAnalytics;
|
||||
const value = binding.useRef(null);
|
||||
const Date = global.Date;
|
||||
const value3 = Date.now();
|
||||
const env0_5 = binding.useRef(value3);
|
||||
const env0_6 = binding.useRef(value3);
|
||||
binding.useEffect(_fun81027, [basePurchaseAnalytics, currentStep, value, customGiftMessage, productId]);
|
||||
binding.useEffect(function() {
|
||||
return _fun81029;
|
||||
}, [basePurchaseAnalytics, value]);
|
||||
return children;
|
||||
}
|
||||
|
||||
function _fun81027() { // fn#81027, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10658:465, offset: 0x01e962b0, size: 584 bytes, params: 1, frame: 25
|
||||
var r15;
|
||||
var value2;
|
||||
var value3;
|
||||
var moduleValue;
|
||||
var trackPaymentFlowStartedAnalyticsAndCTP;
|
||||
var basePurchaseAnalyticsBinding;
|
||||
var defaultImport;
|
||||
var track;
|
||||
var PAYMENT_FLOW_LOADED;
|
||||
var object2;
|
||||
var moduleValue2;
|
||||
var getPaymentFlowStepAnalyticsFields;
|
||||
var value4;
|
||||
var defaultImport2;
|
||||
var PAYMENT_FLOW_SUCCEEDED;
|
||||
var moduleValue3;
|
||||
var productIdBinding;
|
||||
var customGiftMessageBinding;
|
||||
var intl;
|
||||
var defaultImport3;
|
||||
var PAYMENT_FLOW_STEP;
|
||||
var moduleValue4;
|
||||
var object3;
|
||||
let currentStepBinding = currentStep;
|
||||
let current = env0_4.current;
|
||||
if (currentStepBinding !== current) {
|
||||
value2 = global.Date.now();
|
||||
current = env0_4.current;
|
||||
if (current != null) {
|
||||
currentStepBinding = currentStep;
|
||||
value4 = environment.__proto__;
|
||||
if (currentStepBinding === (require(7294) /* metro dependency 7294: PremiumAnalyticsUtils */).PaymentFlowStep.CONFIRM) {
|
||||
defaultImport2 = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
|
||||
track = defaultImport2.track;
|
||||
PAYMENT_FLOW_SUCCEEDED = AnalyticEvents.PAYMENT_FLOW_SUCCEEDED;
|
||||
object2 = {};
|
||||
moduleValue3 = require(7294) /* metro dependency 7294: PremiumAnalyticsUtils */;
|
||||
getPaymentFlowStepAnalyticsFields = moduleValue3.getPaymentFlowStepAnalyticsFields;
|
||||
basePurchaseAnalyticsBinding = basePurchaseAnalytics;
|
||||
productIdBinding = productId;
|
||||
copyDataProperties(object2, Reflect.apply(getPaymentFlowStepAnalyticsFields, moduleValue3,
|
||||
[basePurchaseAnalyticsBinding, {subscription_plan_gateway_plan_id: productIdBinding}]),
|
||||
productIdBinding);
|
||||
customGiftMessageBinding = customGiftMessage;
|
||||
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
object2['is_custom_message_edited'] = customGiftMessageBinding !== intl.string((require(1244) /* metro dependency 1244: indexNative */).t.ZkOo1U);
|
||||
object2['is_custom_emoji_sound_available'] = false;
|
||||
Reflect.apply(track, defaultImport2, [PAYMENT_FLOW_SUCCEEDED, object2]);
|
||||
r15 = productIdBinding;
|
||||
}
|
||||
defaultImport3 = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
|
||||
track = defaultImport3.track;
|
||||
PAYMENT_FLOW_STEP = AnalyticEvents.PAYMENT_FLOW_STEP;
|
||||
object2 = {};
|
||||
moduleValue4 = require(7294) /* metro dependency 7294: PremiumAnalyticsUtils */;
|
||||
getPaymentFlowStepAnalyticsFields = moduleValue4.getPaymentFlowStepAnalyticsFields;
|
||||
basePurchaseAnalyticsBinding = basePurchaseAnalytics;
|
||||
object3 = {};
|
||||
current = env0_4.current;
|
||||
object3.from_step = current;
|
||||
object3.to_step = currentStep;
|
||||
current = env0_6.current;
|
||||
object3.step_duration_ms = value2 - current;
|
||||
current = env0_5.current;
|
||||
object3.flow_duration_ms = value2 - current;
|
||||
object3.subscription_plan_gateway_plan_id = productId;
|
||||
copyDataProperties(object2, Reflect.apply(getPaymentFlowStepAnalyticsFields, moduleValue4,
|
||||
[basePurchaseAnalyticsBinding, object3]), r15);
|
||||
Reflect.apply(track, defaultImport3, [PAYMENT_FLOW_STEP, object2]);
|
||||
} else {
|
||||
value3 = environment.__proto__;
|
||||
moduleValue = require(7295) /* metro dependency 7295: PaymentFlowStartedTriggerPoint */;
|
||||
trackPaymentFlowStartedAnalyticsAndCTP = moduleValue.trackPaymentFlowStartedAnalyticsAndCTP;
|
||||
basePurchaseAnalyticsBinding = basePurchaseAnalytics;
|
||||
Reflect.apply(trackPaymentFlowStartedAnalyticsAndCTP, moduleValue, [basePurchaseAnalyticsBinding]);
|
||||
defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
|
||||
track = defaultImport.track;
|
||||
PAYMENT_FLOW_LOADED = AnalyticEvents.PAYMENT_FLOW_LOADED;
|
||||
object2 = {};
|
||||
moduleValue2 = require(7294) /* metro dependency 7294: PremiumAnalyticsUtils */;
|
||||
copyDataProperties(object2, moduleValue2.getPaymentFlowStepAnalyticsFields(basePurchaseAnalyticsBinding,
|
||||
{initial_step: currentStep}), r15);
|
||||
Reflect.apply(track, defaultImport, [PAYMENT_FLOW_LOADED, object2]);
|
||||
}
|
||||
env0_4.current = currentStep;
|
||||
env0_6.current = value2;
|
||||
}
|
||||
}
|
||||
|
||||
function _fun81028() { // fn#81028, offset: 0x01e964f8, size: 11 bytes, params: 1, frame: 1
|
||||
return _fun81029;
|
||||
}
|
||||
|
||||
function _fun81029() { // fn#81029, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10658:1214, offset: 0x01e96503, size: 100 bytes, params: 1, frame: 15
|
||||
var defaultImport;
|
||||
const current = env1_4.current;
|
||||
const PaymentFlowStep = (require(7294) /* metro dependency 7294: PremiumAnalyticsUtils */).PaymentFlowStep;
|
||||
const CONFIRM = PaymentFlowStep.CONFIRM;
|
||||
if (current !== CONFIRM) {
|
||||
defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
|
||||
defaultImport.track(AnalyticEvents.PAYMENT_FLOW_CANCELED, basePurchaseAnalytics);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,171 @@
|
||||
/* Metro module 7642; source: modules/premium/native/gifting/PremiumGiftBackgroundAnimation.android.tsx; dependencies: [57, 31, 27, 4502, 33, 4501, 566, 7643, 7644, 6760, 2] */
|
||||
function _fun61186(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#61186, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7820:6, offset: 0x0171d404, size: 320 bytes, params: 8, frame: 20
|
||||
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 accessibilityStore = importDefault(4502) /* metro dependency 4502: AccessibilityStore */;
|
||||
const value = require(33) /* metro dependency 33 */;
|
||||
const env0_7 = value.jsx;
|
||||
const env0_8 = value.jsxs;
|
||||
const env0_9 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({container: {'display': 'flex',
|
||||
'alignItems': 'flex-end', 'justifyContent': 'center', 'flexDirection': 'row'}, consistentHeight: {height: 300},
|
||||
animation: {'maxWidth': 375, 'width': '100%', 'height': 'auto'}, baseAnimation: {'position': 'absolute',
|
||||
'bottom': 0}, lottie: {height: 275}});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/premium/native/gifting/PremiumGiftBackgroundAnimation.android.tsx');
|
||||
exports.default = PremiumGiftBackgroundAnimation;
|
||||
}
|
||||
|
||||
function PremiumGiftBackgroundAnimation({giftStyle, withConsistentHeight}) { // fn#61187, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7820:552, offset: 0x0171d544, size: 987 bytes, params: 2, frame: 38
|
||||
const styles = useStyles();
|
||||
const useReducedMotion = (require(566) /* metro dependency 566: flux */).useStateFromStores([AccessibilityStore],
|
||||
function() {
|
||||
return AccessibilityStore.useReducedMotion;
|
||||
});
|
||||
const binding = env0_4;
|
||||
const value2 = binding.useRef(null);
|
||||
const value3 = binding.useRef(null);
|
||||
const env0_3 = value3;
|
||||
let useState = binding.useState;
|
||||
const AnimationState = (require(7643) /* metro dependency 7643: PremiumGiftingUtils */).AnimationState;
|
||||
const ACTION = AnimationState.ACTION;
|
||||
const value4 = Reflect.apply(useState, binding, [ACTION]);
|
||||
const binding2 = env0_3;
|
||||
const value5 = binding2(value4, 2);
|
||||
const property = value5[0];
|
||||
const env0_5 = value5[1];
|
||||
useState = binding.useState;
|
||||
const value8 = binding2(Reflect.apply(useState, binding, [undefined]), 2);
|
||||
const property2 = value8[0];
|
||||
const env0_7 = value8[1];
|
||||
useState = binding.useState;
|
||||
const value9 = binding2(Reflect.apply(useState, binding, [undefined]), 2);
|
||||
const property3 = value9[0];
|
||||
const env0_9 = value9[1];
|
||||
useState = binding.useState;
|
||||
const value10 = binding2(Reflect.apply(useState, binding, [false]), 2);
|
||||
const property4 = value10[0];
|
||||
const env0_11 = value10[1];
|
||||
const value11 = binding.useMemo(_fun61189, [giftStyle]);
|
||||
const value12 = binding.useMemo(_fun61190, [giftStyle]);
|
||||
const lottieType = (require(7644) /* metro dependency 7644: GiftAnimationData */).getLottieType(giftStyle);
|
||||
binding.useMemo(_fun61191, [property3, property2, giftStyle, property]);
|
||||
const value14 = binding.useCallback(_fun61192, [property, property4]);
|
||||
binding.useEffect(_fun61193, [property]);
|
||||
binding.useEffect(_fun61194, [useReducedMotion]);
|
||||
const items3 = [styles.container];
|
||||
items3[1] = withConsistentHeight && styles.consistentHeight;
|
||||
const LottieAnimationView = importDefault(6760) /* metro dependency 6760: LottieAnimationView */;
|
||||
const items2 = [styles.baseAnimation];
|
||||
items2[1] = styles.animation;
|
||||
const LottieType = (require(7644) /* metro dependency 7644: GiftAnimationData */).LottieType;
|
||||
let LOTTIE = LottieType.LOTTIE;
|
||||
items2[2] = lottieType === LOTTIE && styles.lottie;
|
||||
const object = {};
|
||||
const value16 = property2 === giftStyle;
|
||||
object.opacity = value16 ? property === (require(7643) /* metro dependency 7643: PremiumGiftingUtils */).AnimationState.LOOP ? 0 : 1 : 0;
|
||||
items2[3] = object;
|
||||
LOTTIE = LottieType.LOTTIE;
|
||||
const value17 = !useReducedMotion;
|
||||
const lottieAnimationView = <LottieAnimationView style={items2} hardwareAccelerationAndroid={lottieType === LOTTIE} ref={value2} source={value11} autoPlay={value17} onAnimationFinish={value14} loop={false} />;
|
||||
const defaultImport2 = LottieAnimationView;
|
||||
const items4 = [styles.animation];
|
||||
LOTTIE = LottieType.LOTTIE;
|
||||
items4[1] = lottieType === LOTTIE && styles.lottie;
|
||||
const object2 = {};
|
||||
object2.opacity = value16 ? property !== (require(7643) /* metro dependency 7643: PremiumGiftingUtils */).AnimationState.LOOP ? 0 : 1 : 0;
|
||||
items4[2] = object2;
|
||||
LOTTIE = LottieType.LOTTIE;
|
||||
return (
|
||||
<View style={items3}>
|
||||
{lottieAnimationView}
|
||||
{((Component) => <Component style={items4} hardwareAccelerationAndroid={lottieType === LOTTIE} ref={value3} source={value12} autoPlay={useReducedMotion ? value17 : property === (require(7643) /* metro dependency 7643: PremiumGiftingUtils */).AnimationState.LOOP} loop />)(defaultImport2)}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun61189() { // fn#61189, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7820:941, offset: 0x0171d91f, size: 70 bytes, params: 1, frame: 16
|
||||
let value = environment.__proto__;
|
||||
value = require(7644) /* metro dependency 7644: GiftAnimationData */;
|
||||
const getGiftAnimationData = value.getGiftAnimationData;
|
||||
const giftStyleBinding = giftStyle;
|
||||
const AnimationState = (require(7643) /* metro dependency 7643: PremiumGiftingUtils */).AnimationState;
|
||||
const ACTION = AnimationState.ACTION;
|
||||
return Reflect.apply(getGiftAnimationData, value, [giftStyleBinding, ACTION]);
|
||||
}
|
||||
|
||||
function _fun61190() { // fn#61190, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7820:1026, offset: 0x0171d965, size: 70 bytes, params: 1, frame: 16
|
||||
let value = environment.__proto__;
|
||||
value = require(7644) /* metro dependency 7644: GiftAnimationData */;
|
||||
const getGiftAnimationData = value.getGiftAnimationData;
|
||||
const giftStyleBinding = giftStyle;
|
||||
const AnimationState = (require(7643) /* metro dependency 7643: PremiumGiftingUtils */).AnimationState;
|
||||
const LOOP = AnimationState.LOOP;
|
||||
return Reflect.apply(getGiftAnimationData, value, [giftStyleBinding, LOOP]);
|
||||
}
|
||||
|
||||
function _fun61191() { // fn#61191, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7820:1134, offset: 0x0171d9ab, size: 137 bytes, params: 1, frame: 16
|
||||
var binding2;
|
||||
var value2;
|
||||
const AnimationState = (require(7643) /* metro dependency 7643: PremiumGiftingUtils */).AnimationState;
|
||||
let binding = env0_6;
|
||||
if (binding !== giftStyle) {
|
||||
binding = env0_7;
|
||||
binding(giftStyle);
|
||||
binding = env0_11;
|
||||
binding2 = env0_4;
|
||||
value2 = environment.__proto__;
|
||||
binding(binding2 !== AnimationState.LOOP && env0_8 != null);
|
||||
binding = env0_5;
|
||||
binding(AnimationState.ACTION);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun61192(a0) { // fn#61192, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7820:1264, offset: 0x0171da34, size: 157 bytes, params: 2, frame: 16
|
||||
var binding;
|
||||
var value3;
|
||||
const AnimationState = (require(7643) /* metro dependency 7643: PremiumGiftingUtils */).AnimationState;
|
||||
if (env0_10) {
|
||||
env0_11(false);
|
||||
} else {
|
||||
binding = env0_4;
|
||||
value3 = environment.__proto__;
|
||||
if (!(binding === AnimationState.LOOP || a0)) {
|
||||
binding = env0_9;
|
||||
binding(AnimationState.ACTION);
|
||||
binding = env0_5;
|
||||
binding(AnimationState.LOOP);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function _fun61193() { // fn#61193, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7820:1407, offset: 0x0171dad1, size: 102 bytes, params: 1, frame: 13
|
||||
var current;
|
||||
const binding = env0_4;
|
||||
const AnimationState = (require(7643) /* metro dependency 7643: PremiumGiftingUtils */).AnimationState;
|
||||
const LOOP = AnimationState.LOOP;
|
||||
if (binding === LOOP) {
|
||||
current = env0_2.current;
|
||||
if (current != null) {
|
||||
current.reset();
|
||||
}
|
||||
} else {
|
||||
current = env0_3.current;
|
||||
if (current != null) {
|
||||
current.reset();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function _fun61194() { // fn#61194, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7820:1534, offset: 0x0171db37, size: 39 bytes, params: 1, frame: 9
|
||||
var current;
|
||||
if (useReducedMotion) {
|
||||
current = env0_2.current;
|
||||
if (current != null) {
|
||||
current.reset();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,79 @@
|
||||
/* Metro module 7641; source: modules/premium/native/gifting/PremiumGiftBackgroundSelect.tsx; dependencies: [57, 31, 27, 33, 4017, 4501, 697, 1478, 4504, 1305, 7642, 7669, 2] */
|
||||
function _fun61180(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#61180, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7819:6, offset: 0x0171cfea, size: 332 bytes, params: 8, frame: 22
|
||||
const env0_0 = require;
|
||||
const closure = GiftBackgroundSelect;
|
||||
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 ScrollView = (require(27) /* metro dependency 27 */).ScrollView;
|
||||
let value = require(33) /* metro dependency 33 */;
|
||||
const env0_5 = value.jsx;
|
||||
const env0_6 = value.Fragment;
|
||||
const env0_7 = value.jsxs;
|
||||
const env0_8 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).createAnimatedComponent(ScrollView);
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
const PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
|
||||
const env0_9 = Reflect.apply(createStyles, value, [{scrollView: {flex: 1, marginTop: PX_24},
|
||||
contentContainer: {justifyContent: 'center'}}]);
|
||||
object = {code: 'function PremiumGiftBackgroundSelectTsx1(){const{STANDARD_EASING,withTiming,visibility}=this.__closure;const animationSettings={easing:STANDARD_EASING,duration:100};return{opacity:withTiming(visibility.get()?1:0,animationSettings)};}'};
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/premium/native/gifting/PremiumGiftBackgroundSelect.tsx');
|
||||
exports.default = PremiumGiftBackgroundSelect;
|
||||
exports.GiftBackgroundSelect = closure;
|
||||
}
|
||||
|
||||
function GiftBackgroundSelect({giftStyle, withConsistentHeight}) { // fn#61181, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7819:578, offset: 0x0171d136, size: 473 bytes, params: 2, frame: 28
|
||||
var object2;
|
||||
withConsistentHeight = withConsistentHeight === undefined || withConsistentHeight;
|
||||
const styles = useStyles();
|
||||
const width = (importDefault(1478) /* metro dependency 1478: useWindowDimensionsNative */)().width;
|
||||
const [property, env0_1] = env0_3(env0_4.useState(), 2);
|
||||
const value4 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(false);
|
||||
env0_4.useEffect(_fun61182, [property, value4]);
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
|
||||
const closure = GiftBackgroundSelectN;
|
||||
object2 = {};
|
||||
const STANDARD_EASING = (require(1305) /* metro dependency 1305: native */).STANDARD_EASING;
|
||||
object2.STANDARD_EASING = STANDARD_EASING;
|
||||
object2.withTiming = (require(4504) /* metro dependency 4504: timing */).withTiming;
|
||||
object2.visibility = value4;
|
||||
closure.__closure = object2;
|
||||
closure.__workletHash = 5743780040676;
|
||||
closure.__initData = env0_10;
|
||||
return (
|
||||
<>
|
||||
{((Component) => <Component giftStyle={giftStyle} withConsistentHeight={withConsistentHeight} />)(importDefault(7642) /* metro dependency 7642: PremiumGiftBackgroundAnimationAndroid */)}
|
||||
{((Component) => <Component onContentSizeChange={onContentSizeChange} contentContainerStyle={[styles.contentContainer,
|
||||
property != null && property < width && ({flex: 1})]} style={[styles.scrollView,
|
||||
Reflect.apply(useAnimatedStyle, reanimatedRexportModule,
|
||||
[closure])]} horizontal showsHorizontalScrollIndicator={false} />)(env0_8)}
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
function PremiumGiftBackgroundSelect() { // fn#61185, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7819:1438, offset: 0x0171d3b9, size: 75 bytes, params: 1, frame: 15
|
||||
const {giftStyle,
|
||||
setGiftStyle} = (require(7669) /* metro dependency 7669: NativeGiftContext */).useNativeGiftContext();
|
||||
return <GiftBackgroundSelect giftStyle={giftStyle} setGiftStyle={setGiftStyle} />;
|
||||
}
|
||||
|
||||
function _fun61182() { // fn#61182, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7819:757, offset: 0x0171d30f, size: 31 bytes, params: 1, frame: 12
|
||||
env0_2.set(env0_0 != null);
|
||||
}
|
||||
|
||||
function GiftBackgroundSelectN() { // fn#61183, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7819:823, owner: GiftBackgroundSelect.N, offset: 0x0171d32e, size: 108 bytes, params: 1, frame: 18
|
||||
const timingModule = require(4504) /* metro dependency 4504: timing */;
|
||||
const withTiming = timingModule.withTiming;
|
||||
const r2 = env0_2.get() ? 1 : 0;
|
||||
const STANDARD_EASING = (require(1305) /* metro dependency 1305: native */).STANDARD_EASING;
|
||||
return {opacity: Reflect.apply(withTiming, timingModule, [r2, {easing: STANDARD_EASING, duration: 100}])};
|
||||
}
|
||||
|
||||
function GiftBackgroundSelectOnContentSizeChange(a0) { // fn#61184, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7819:1170, owner: GiftBackgroundSelect.onContentSizeChange, offset: 0x0171d39a, size: 31 bytes, params: 2, frame: 11
|
||||
if (env0_0 == null) {
|
||||
env0_1(a0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,95 @@
|
||||
/* Metro module 12158; source: modules/premium/native/gifting/PremiumGiftBackgroundSelectTile.tsx; dependencies: [31, 27, 1880, 12159, 33, 12160, 12161, 12162, 12163, 10527, 12164, 12165, 12166, 12167, 4501, 697, 1244, 2288, 5475, 2] */
|
||||
function _fun93249(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#93249, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12344:6, offset: 0x020ac448, size: 535 bytes, params: 8, frame: 21
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
importAll(31) /* metro dependency 31 */;
|
||||
let value = require(27) /* metro dependency 27 */;
|
||||
const env0_3 = value.View;
|
||||
const env0_4 = value.Pressable;
|
||||
const PremiumGiftStyles = (require(1880) /* metro dependency 1880: PremiumConstants */).PremiumGiftStyles;
|
||||
const env0_5 = (require(12159) /* metro dependency 12159: PremiumGiftingConstants */).GIFT_STYLE_DESCRIPTIONS;
|
||||
value = require(33) /* metro dependency 33 */;
|
||||
const env0_6 = value.jsx;
|
||||
const env0_7 = value.jsxs;
|
||||
object2 = {};
|
||||
const STANDARD_BOX = PremiumGiftStyles.STANDARD_BOX;
|
||||
object2[STANDARD_BOX] = importDefault(12160) /* metro dependency 12160 */;
|
||||
const CAKE = PremiumGiftStyles.CAKE;
|
||||
object2[CAKE] = importDefault(12161) /* metro dependency 12161 */;
|
||||
const CHEST = PremiumGiftStyles.CHEST;
|
||||
object2[CHEST] = importDefault(12162) /* metro dependency 12162 */;
|
||||
const COFFEE = PremiumGiftStyles.COFFEE;
|
||||
object2[COFFEE] = importDefault(12163) /* metro dependency 12163 */;
|
||||
const NITROWEEN_STANDARD = PremiumGiftStyles.NITROWEEN_STANDARD;
|
||||
object2[NITROWEEN_STANDARD] = {uri: importDefault(10527) /* metro dependency 10527: halloweenCardSmallPng */};
|
||||
const SNOWGLOBE = PremiumGiftStyles.SNOWGLOBE;
|
||||
object2[SNOWGLOBE] = null;
|
||||
const BOX = PremiumGiftStyles.BOX;
|
||||
object2[BOX] = null;
|
||||
const CUP = PremiumGiftStyles.CUP;
|
||||
object2[CUP] = null;
|
||||
const SEASONAL_CAKE = PremiumGiftStyles.SEASONAL_CAKE;
|
||||
object2[SEASONAL_CAKE] = {uri: importDefault(12164) /* metro dependency 12164: gift_cakePng */};
|
||||
const SEASONAL_CHEST = PremiumGiftStyles.SEASONAL_CHEST;
|
||||
object2[SEASONAL_CHEST] = {uri: importDefault(12165) /* metro dependency 12165: gift_chestPng */};
|
||||
const SEASONAL_COFFEE = PremiumGiftStyles.SEASONAL_COFFEE;
|
||||
object2[SEASONAL_COFFEE] = {uri: importDefault(12166) /* metro dependency 12166: gift_coffeePng */};
|
||||
const SEASONAL_STANDARD_BOX = PremiumGiftStyles.SEASONAL_STANDARD_BOX;
|
||||
object2[SEASONAL_STANDARD_BOX] = {uri: importDefault(12167) /* metro dependency 12167: gift_boxPng */};
|
||||
const env0_9 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(_fun93250);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/premium/native/gifting/PremiumGiftBackgroundSelectTile.tsx');
|
||||
exports.default = GiftBackgroundSelectTile;
|
||||
exports.GIFT_STYLE_IMG = object2;
|
||||
}
|
||||
|
||||
function _fun93250(a0) { // fn#93250, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12344:559, offset: 0x020ac65f, size: 177 bytes, params: 2, frame: 15
|
||||
const object2 = {};
|
||||
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
const value2 = 0;
|
||||
object2.container = {'width': 78, 'height': 44, 'justifyContent': 'center', marginEnd: PX_8,
|
||||
marginStart: value2 !== a0 ? value2 : 20};
|
||||
const object4 = {'position': 'absolute', 'borderColor': null, 'borderRadius': null, 'borderWidth': 2, 'flex': 1,
|
||||
'width': 78, 'height': 44};
|
||||
const TEXT_BRAND = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_BRAND;
|
||||
object4.borderColor = TEXT_BRAND;
|
||||
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
|
||||
object2.selected = object4;
|
||||
object2.image = {'width': 72, 'height': 38, 'alignSelf': 'center'};
|
||||
return object2;
|
||||
}
|
||||
|
||||
function GiftBackgroundSelectTile({index, selected, giftStyle, onPress}) { // fn#93251, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12344:974, offset: 0x020ac710, size: 298 bytes, params: 2, frame: 27
|
||||
var r0;
|
||||
var object2;
|
||||
var intl;
|
||||
var formatToPlainString;
|
||||
var property2;
|
||||
var intl2;
|
||||
var items2;
|
||||
var value;
|
||||
const styles = useStyles(index);
|
||||
const property = env0_8[giftStyle];
|
||||
if (property == null) {
|
||||
r0 = null;
|
||||
} else {
|
||||
object2 = {};
|
||||
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
formatToPlainString = intl.formatToPlainString;
|
||||
property2 = (importDefault(2288) /* metro dependency 2288: PremiumGiftingMessages */)['+utqaz'];
|
||||
intl2 = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
object2['aria-label'] = Reflect.apply(formatToPlainString, intl, [property2,
|
||||
{giftStyle: intl2.string(GIFT_STYLE_DESCRIPTIONS[giftStyle])}]);
|
||||
object2['aria-selected'] = selected;
|
||||
object2.style = styles.container;
|
||||
object2.onPress = onPress;
|
||||
items2 = [selected && <View style={styles.selected} />];
|
||||
value = importDefault(5475) /* metro dependency 5475: FastImage */;
|
||||
items2[1] = ((Component) => <Component resizeMode="contain" style={styles.image} source={property} />)(value);
|
||||
value = <Pressable {...object2}>{items2}</Pressable>;
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,65 @@
|
||||
/* Metro module 7680; source: modules/premium/native/gifting/PremiumGiftCustomMessage.tsx; dependencies: [31, 27, 1880, 33, 4501, 697, 1244, 7681, 7669, 2] */
|
||||
function _fun61352(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#61352, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7858:6, offset: 0x01b3c6a0, size: 289 bytes, params: 8, frame: 24
|
||||
const env0_0 = require;
|
||||
const closure = GiftCustomMessage;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
let value = importAll(31) /* metro dependency 31 */;
|
||||
const env0_3 = (require(27) /* metro dependency 27 */).View;
|
||||
const env0_4 = (require(1880) /* metro dependency 1880: PremiumConstants */).CUSTOM_GIFT_MESSAGE_MAX_LENGTH;
|
||||
const env0_5 = (require(33) /* metro dependency 33 */).jsx;
|
||||
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = createStylesModule.createStyles;
|
||||
const object = {};
|
||||
const PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
|
||||
object.marginTop = PX_24;
|
||||
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object.marginHorizontal = PX_16;
|
||||
const env0_6 = Reflect.apply(createStyles, createStylesModule, [{container: object}]);
|
||||
value = value.memo(_fun61356);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/premium/native/gifting/PremiumGiftCustomMessage.tsx');
|
||||
exports.default = value;
|
||||
exports.GiftCustomMessage = closure;
|
||||
}
|
||||
|
||||
function GiftCustomMessage({onFocusMessage, setMessagePosition, customGiftMessage, setCustomGiftMessage}) { // fn#61353, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7858:283, offset: 0x01b3c7c1, size: 282 bytes, params: 2, frame: 26
|
||||
const styles = useStyles();
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
let string = intl.string;
|
||||
const ZkOo1U = (require(1244) /* metro dependency 1244: indexNative */).t.ZkOo1U;
|
||||
const value2 = Reflect.apply(string, intl, [ZkOo1U]);
|
||||
const value3 = env0_2.useCallback(function(a0) {
|
||||
setCustomGiftMessage(a0);
|
||||
}, [setCustomGiftMessage]);
|
||||
const TextArea = (require(7681) /* metro dependency 7681: TextAreaNative */).TextArea;
|
||||
string = intl.string;
|
||||
const B3miE8 = (require(1244) /* metro dependency 1244: indexNative */).t.B3miE8;
|
||||
return (
|
||||
<View style={styles.container} onLayout={function(a0) {
|
||||
return setMessagePosition(a0.nativeEvent.layout.y);
|
||||
}}>
|
||||
<TextArea
|
||||
label={Reflect.apply(string, intl, [B3miE8])}
|
||||
placeholder={value2}
|
||||
value={customGiftMessage}
|
||||
onChange={value3}
|
||||
maxLength={CUSTOM_GIFT_MESSAGE_MAX_LENGTH}
|
||||
onFocus={onFocusMessage}
|
||||
/>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun61356({onFocusMessage, setMessagePosition}) { // fn#61356, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7858:691, offset: 0x01b3c8ff, size: 100 bytes, params: 2, frame: 17
|
||||
const {customGiftMessage,
|
||||
setCustomGiftMessage} = (require(7669) /* metro dependency 7669: NativeGiftContext */).useNativeGiftContext();
|
||||
return (
|
||||
<GiftCustomMessage
|
||||
onFocusMessage={onFocusMessage}
|
||||
setMessagePosition={setMessagePosition}
|
||||
customGiftMessage={customGiftMessage}
|
||||
setCustomGiftMessage={setCustomGiftMessage}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,93 @@
|
||||
/* Metro module 10458; source: modules/premium/native/gifting/PremiumGiftCustomization.tsx; dependencies: [57, 31, 27, 1880, 33, 4501, 697, 1484, 7669, 10459, 1244, 7641, 10460, 4573, 7678, 7680, 10461, 2] */
|
||||
function _fun80951(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#80951, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10644:6, offset: 0x01e9112d, size: 413 bytes, params: 8, frame: 22
|
||||
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.View;
|
||||
const env0_6 = value.ScrollView;
|
||||
const env0_7 = (require(1880) /* metro dependency 1880: PremiumConstants */).PremiumTypes;
|
||||
value = require(33) /* metro dependency 33 */;
|
||||
const env0_8 = value.jsx;
|
||||
const env0_9 = value.Fragment;
|
||||
const env0_10 = value.jsxs;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
object2 = {};
|
||||
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
|
||||
object2.container = {flex: 1, backgroundColor: BACKGROUND_BASE_LOW};
|
||||
let PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
|
||||
object2.scrollViewContainer = {paddingBottom: PX_24};
|
||||
const object3 = {};
|
||||
PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
|
||||
object3.marginTop = PX_24;
|
||||
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object3.marginLeft = PX_16;
|
||||
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
object3.marginBottom = PX_8;
|
||||
object3.fontSize = 14;
|
||||
object2.senderHeaderTitle = object3;
|
||||
const env0_11 = Reflect.apply(createStyles, value, [object2]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/premium/native/gifting/PremiumGiftCustomization.tsx');
|
||||
exports.default = PremiumGiftCustomization;
|
||||
}
|
||||
|
||||
function PremiumGiftCustomization() { // fn#80952, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10644:594, offset: 0x01e912ca, size: 779 bytes, params: 1, frame: 35
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const value2 = (require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation();
|
||||
const styles = useStyles();
|
||||
const value3 = (require(7669) /* metro dependency 7669: NativeGiftContext */).useNativeGiftContext();
|
||||
const recipientUser = value3.recipientUser;
|
||||
const premiumType = value3.premiumType;
|
||||
const value4 = (require(10459) /* metro dependency 10459: useGiftingPromotionDefaultSelection */).useGiftingPromotionDefaultSelectionV2(value3.claimableRewards,
|
||||
value3.selectedGiftingPromotionReward);
|
||||
const binding = env0_4;
|
||||
const [property, property2] = env0_3(binding.useState(0), 2);
|
||||
const value7 = binding.useRef(null);
|
||||
const value8 = binding.useCallback(function() {
|
||||
global.setTimeout(_fun80954, 100);
|
||||
}, [property]);
|
||||
const TIER_2 = PremiumTypes.TIER_2;
|
||||
env0_4.useEffect(_fun80955, [value2,
|
||||
premiumType === TIER_2 ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.lG6a5x) : intl.string((require(1244) /* metro dependency 1244: indexNative */).t['t9uG/o'])]);
|
||||
const items2 = [((Component) => <Component />)(importDefault(7641) /* metro dependency 7641: PremiumGiftBackgroundSelect */)];
|
||||
items2[1] = ((Component) => <Component />)(importDefault(10460) /* metro dependency 10460: PremiumGiftDuration */);
|
||||
items2[2] = recipientUser != null && <>{((Text) => <Text style={styles.senderHeaderTitle} variant="text-md/semibold">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.NlkxGS)}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)}{((Component) => <Component user={recipientUser} />)(importDefault(7678) /* metro dependency 7678: LockedRecipientField */)}{((Component) => <Component onFocusMessage={value8} setMessagePosition={property2} />)(importDefault(7680) /* metro dependency 7680: PremiumGiftCustomMessage */)}</>;
|
||||
return (
|
||||
<View style={styles.container}>
|
||||
<ScrollView
|
||||
ref={value7}
|
||||
contentContainerStyle={styles.scrollViewContainer}
|
||||
showsVerticalScrollIndicator={false}
|
||||
>
|
||||
<View>
|
||||
{items2}
|
||||
</View>
|
||||
</ScrollView>
|
||||
{((Component) => <Component defaultSelection={value4} />)(importDefault(10461) /* metro dependency 10461: PremiumGiftPurchaseButton */)}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun80953() { // fn#80953, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10644:915, offset: 0x01e915d5, size: 30 bytes, params: 1, frame: 13
|
||||
global.setTimeout(_fun80954, 100);
|
||||
}
|
||||
|
||||
function _fun80955() { // fn#80955, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10644:1139, offset: 0x01e91628, size: 100 bytes, params: 1, frame: 19
|
||||
const binding = env0_0;
|
||||
const setOptions = binding.setOptions;
|
||||
const object2 = {};
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
object2.title = intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t['RMu0/q'],
|
||||
{nitroTierName: env0_3});
|
||||
Reflect.apply(setOptions, binding, [object2]);
|
||||
}
|
||||
|
||||
function _fun80954() { // fn#80954, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10644:932, offset: 0x01e915f3, size: 53 bytes, params: 1, frame: 13
|
||||
const value = environment.__proto__;
|
||||
return env1_2.current?.scrollTo({y: env1_1, animated: true});
|
||||
}
|
||||
|
||||
@@ -0,0 +1,89 @@
|
||||
/* Metro module 10466; source: modules/premium/native/gifting/PremiumGiftDMPurchaseSuccess.tsx; dependencies: [31, 27, 33, 4501, 697, 7669, 1484, 7633, 10382, 4578, 1244, 2288, 7642, 4573, 2] */
|
||||
function _fun80994(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#80994, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10652:6, offset: 0x01e93fd0, size: 297 bytes, params: 8, frame: 23
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importAll(31) /* metro dependency 31 */;
|
||||
const env0_4 = (require(27) /* metro dependency 27 */).View;
|
||||
let value = require(33) /* metro dependency 33 */;
|
||||
const env0_5 = value.jsx;
|
||||
const env0_6 = value.Fragment;
|
||||
const env0_7 = value.jsxs;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
object2 = {};
|
||||
const PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
|
||||
object2.title = {marginTop: PX_24, textAlign: 'center'};
|
||||
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
object2.description = {marginTop: PX_8, textAlign: 'center'};
|
||||
const env0_8 = Reflect.apply(createStyles, value, [object2]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/premium/native/gifting/PremiumGiftDMPurchaseSuccess.tsx');
|
||||
exports.default = PremiumGiftDMSuccessBody;
|
||||
exports.PremiumGiftDMSuccessActions = PremiumGiftDMSuccessActions;
|
||||
}
|
||||
|
||||
function PremiumGiftDMSuccessBody() { // fn#80995, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10652:414, offset: 0x01e940f9, size: 320 bytes, params: 1, frame: 25
|
||||
const styles = useStyles();
|
||||
const nativeGiftContextModule = require(7669) /* metro dependency 7669: NativeGiftContext */;
|
||||
const useNativeGiftContext = nativeGiftContextModule.useNativeGiftContext;
|
||||
const giftStyle = Reflect.apply(useNativeGiftContext, nativeGiftContextModule, []).giftStyle;
|
||||
const jsxRuntimeEnv0_6Binding = jsxRuntimeEnv0_6;
|
||||
let value = importDefault(7642) /* metro dependency 7642: PremiumGiftBackgroundAnimationAndroid */;
|
||||
value = <View>{((Component) => <Component giftStyle={giftStyle} />)(value)}</View>;
|
||||
const items2 = [value];
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
let string = intl.string;
|
||||
const MqZXbv = (require(1244) /* metro dependency 1244: indexNative */).t.MqZXbv;
|
||||
items2[1] = <Text style={styles.title} variant="heading-lg/bold">{Reflect.apply(string, intl, [MqZXbv])}</Text>;
|
||||
string = intl.string;
|
||||
const Y1keV0 = (require(1244) /* metro dependency 1244: indexNative */).t.Y1keV0;
|
||||
items2[2] = <Text style={styles.description} variant="text-md/medium">{Reflect.apply(string, intl, [Y1keV0])}</Text>;
|
||||
return (
|
||||
<>
|
||||
{items2}
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
function PremiumGiftDMSuccessActions() { // fn#80996, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10652:822, offset: 0x01e94239, size: 271 bytes, params: 1, frame: 21
|
||||
const {onClose,
|
||||
prePurchaseGiftingBadgeProgress} = (require(7669) /* metro dependency 7669: NativeGiftContext */).useNativeGiftContext();
|
||||
const value3 = (require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation();
|
||||
const GiftingBadgeExperiment = (require(7633) /* metro dependency 7633: GiftingBadgeExperiment */).GiftingBadgeExperiment;
|
||||
const useConfig = GiftingBadgeExperiment.useConfig;
|
||||
const enabled = Reflect.apply(useConfig, GiftingBadgeExperiment,
|
||||
[{location: 'PremiumGiftDMSuccessActions'}]).enabled;
|
||||
const value4 = enabled.useCallback(_fun80997, [enabled, prePurchaseGiftingBadgeProgress, value3, onClose]);
|
||||
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
return (
|
||||
<Button
|
||||
text={intl.string((importDefault(2288) /* metro dependency 2288: PremiumGiftingMessages */).bGKjmg)}
|
||||
variant="primary"
|
||||
onPress={value4}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun80997() { // fn#80997, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10652:1082, offset: 0x01e94348, size: 100 bytes, params: 1, frame: 15
|
||||
var binding;
|
||||
var navigate;
|
||||
var value2;
|
||||
if (enabled) {
|
||||
if (prePurchaseGiftingBadgeProgress != null) {
|
||||
binding = env0_2;
|
||||
navigate = binding.navigate;
|
||||
value2 = environment.__proto__;
|
||||
Reflect.apply(navigate, binding,
|
||||
[(require(10382) /* metro dependency 10382: PremiumGiftModal */).PremiumGiftScreens.GIFTING_BADGE,
|
||||
{currentProgress: prePurchaseGiftingBadgeProgress}]);
|
||||
} else {
|
||||
onClose();
|
||||
}
|
||||
} else {
|
||||
onClose();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,125 @@
|
||||
/* Metro module 10460; source: modules/premium/native/gifting/PremiumGiftDuration.tsx; dependencies: [31, 27, 1880, 33, 4501, 697, 7669, 6238, 7975, 10391, 3874, 4573, 1244, 7672, 6518, 2] */
|
||||
function _fun80958(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#80958, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10646:6, offset: 0x01e91715, size: 567 bytes, params: 8, frame: 24
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importAll(31) /* metro dependency 31 */;
|
||||
const env0_4 = (require(27) /* metro dependency 27 */).View;
|
||||
let value = require(1880) /* metro dependency 1880: PremiumConstants */;
|
||||
const env0_5 = value.PREMIUM_YEARLY_DISCOUNT_PERCENT;
|
||||
const SubscriptionIntervalTypes = value.SubscriptionIntervalTypes;
|
||||
value = require(33) /* metro dependency 33 */;
|
||||
const env0_7 = value.jsx;
|
||||
const env0_8 = value.jsxs;
|
||||
const YEAR = SubscriptionIntervalTypes.YEAR;
|
||||
object = [YEAR];
|
||||
const MONTH = SubscriptionIntervalTypes.MONTH;
|
||||
object[1] = MONTH;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
let createStyles = value.createStyles;
|
||||
object = {};
|
||||
let PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
object.container = {marginTop: PX_8};
|
||||
const object2 = {};
|
||||
const BACKGROUND_BRAND = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BRAND;
|
||||
object2.borderColor = BACKGROUND_BRAND;
|
||||
object2.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
|
||||
object2.borderWidth = 2;
|
||||
object.containerSelected = object2;
|
||||
object.labelContainer = {flexDirection: 'row'};
|
||||
const object4 = {};
|
||||
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
object4.marginStart = PX_8;
|
||||
const STATUS_POSITIVE_BACKGROUND = (importDefault(697) /* metro dependency 697: native */).colors.STATUS_POSITIVE_BACKGROUND;
|
||||
object4.backgroundColor = STATUS_POSITIVE_BACKGROUND;
|
||||
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
object4.paddingHorizontal = PX_8;
|
||||
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
|
||||
object.labelPromo = object4;
|
||||
const env0_10 = Reflect.apply(createStyles, value, [object]);
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
createStyles = value.createStyles;
|
||||
object = {};
|
||||
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object.durationContainer = {marginHorizontal: PX_16};
|
||||
const PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
|
||||
object.durationTitle = {marginTop: PX_24};
|
||||
const env0_11 = Reflect.apply(createStyles, value, [object]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/premium/native/gifting/PremiumGiftDuration.tsx');
|
||||
exports.default = PremiumGiftDuration;
|
||||
}
|
||||
|
||||
function PremiumGiftDurationButton({selected, planInterval}) { // fn#80959, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10646:627, offset: 0x01e9194c, size: 773 bytes, params: 2, frame: 40
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const value2 = (require(7669) /* metro dependency 7669: NativeGiftContext */).useNativeGiftContext();
|
||||
const premiumType = value2.premiumType;
|
||||
const env0_1 = value2.setPlanInterval;
|
||||
const styles = useStyles();
|
||||
const r6 = selected ? (require(6238) /* metro dependency 6238: TableRowNative */).TableRow : (require(7975) /* metro dependency 7975: RowButtonNative */).RowButton;
|
||||
const YEAR = SubscriptionIntervalTypes.YEAR;
|
||||
const r29 = planInterval !== YEAR ? null : '' + PREMIUM_YEARLY_DISCOUNT_PERCENT + '%';
|
||||
const value5 = (importDefault(10391) /* metro dependency 10391: usePremiumProductPricingString */)(premiumType,
|
||||
planInterval);
|
||||
const {accessibilityRole,
|
||||
accessibilityState} = (require(3874) /* metro dependency 3874: useA11yRolesNative */).useRadioA11yNative({selected: selected});
|
||||
const items2 = [styles.container];
|
||||
items2[1] = selected && styles.containerSelected;
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
const MONTH = SubscriptionIntervalTypes.MONTH;
|
||||
return (
|
||||
<View style={items2}>
|
||||
{((Component) => <Component label={<View style={styles.labelContainer}><Text variant="text-md/semibold">{planInterval === MONTH ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.Mh9bTt) : intl.string((require(1244) /* metro dependency 1244: indexNative */).t.DRgqMo)}</Text>{r29 != null && <View style={styles.labelPromo}><Text variant="text-md/bold" color="always-white">{intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.IAybsG,
|
||||
{discount: r29}).toUpperCase()}</Text></View>}</View>} trailing={<Text variant="text-md/semibold">{value5}</Text>} onPress={function() {
|
||||
setPlanInterval(planInterval);
|
||||
}} arrow={false} accessibilityRole={accessibilityRole} accessibilityState={accessibilityState} start end />)(r6)}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function PremiumGiftDuration() { // fn#80961, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10646:1785, offset: 0x01e91c51, size: 314 bytes, params: 1, frame: 23
|
||||
const styles = useStyles();
|
||||
const nativeGiftContextModule = require(7669) /* metro dependency 7669: NativeGiftContext */;
|
||||
const useNativeGiftContext = nativeGiftContextModule.useNativeGiftContext;
|
||||
const env0_0 = Reflect.apply(useNativeGiftContext, nativeGiftContextModule, []).planInterval;
|
||||
const defaultImport = importDefault(7672) /* metro dependency 7672: NitroGiftPriceCopyExperiment */;
|
||||
const useConfig = defaultImport.useConfig;
|
||||
const value3 = env0_3.useMemo(_fun80962,
|
||||
[(importDefault(6518) /* metro dependency 6518: useInitialValue */)(Reflect.apply(useConfig, defaultImport,
|
||||
[{location: 'PremiumGiftDuration'}]).monthlyDefaultSelected)]);
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const items2 = [<Text style={styles.durationTitle} variant="text-sm/semibold">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['8XT6Nf'])}</Text>];
|
||||
items2[1] = value3.map(_fun80963);
|
||||
return (
|
||||
<View style={styles.durationContainer}>
|
||||
{items2}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun80962() { // fn#80962, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10646:1977, offset: 0x01e91d8b, size: 50 bytes, params: 1, frame: 14
|
||||
var r0;
|
||||
var items2;
|
||||
const binding = env0_1;
|
||||
const value = environment.__proto__;
|
||||
const binding2 = env1_9;
|
||||
if (binding) {
|
||||
items2 = [];
|
||||
arraySpread(items2, binding2, 0, binding2);
|
||||
r0 = items2.reverse();
|
||||
} else {
|
||||
r0 = binding2;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function _fun80963(a0, a1) { // fn#80963, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10646:2183, offset: 0x01e91dbd, size: 51 bytes, params: 3, frame: 15
|
||||
return (
|
||||
<PremiumGiftDurationButton
|
||||
selected={planInterval === a0}
|
||||
planInterval={a0}
|
||||
key={a1}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,235 @@
|
||||
/* Metro module 10389; source: modules/premium/native/gifting/PremiumGiftFeaturesCard.tsx; dependencies: [57, 31, 27, 7261, 1880, 482, 33, 697, 4501, 6597, 566, 7583, 10390, 7947, 10391, 7672, 10392, 5475, 7962, 10393, 7966, 7964, 4573, 1244, 7971, 4578, 2] */
|
||||
function _fun80476(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#80476, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10575:6, offset: 0x01e7c9a3, size: 684 bytes, params: 8, frame: 22
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(57) /* metro dependency 57 */;
|
||||
let value = importAll(31) /* metro dependency 31 */;
|
||||
const env0_5 = (require(27) /* metro dependency 27 */).View;
|
||||
const promotionsStore = importDefault(7261) /* metro dependency 7261: PromotionsStore */;
|
||||
const premiumConstantsModule = require(1880) /* metro dependency 1880: PremiumConstants */;
|
||||
const env0_7 = premiumConstantsModule.PremiumTypes;
|
||||
const env0_8 = premiumConstantsModule.SubscriptionIntervalTypes;
|
||||
const env0_9 = (require(482) /* metro dependency 482: Constants */).Fonts;
|
||||
const value3 = require(33) /* metro dependency 33 */;
|
||||
const env0_10 = value3.jsx;
|
||||
const env0_11 = value3.Fragment;
|
||||
const env0_12 = value3.jsxs;
|
||||
object2 = {};
|
||||
let PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
object2.default = {paddingVertical: PX_8};
|
||||
const PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
|
||||
object2.compact = {paddingVertical: PX_4};
|
||||
object2.smallCompact = {paddingVertical: 2};
|
||||
object2 = {};
|
||||
let PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
|
||||
object2.default = {marginTop: PX_24};
|
||||
let PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
|
||||
object2.compact = {marginTop: PX_12};
|
||||
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
object2.smallCompact = {marginTop: PX_8};
|
||||
object2 = {};
|
||||
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
object2.default = {marginTop: PX_8};
|
||||
PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
|
||||
object2.compact = {marginTop: PX_12};
|
||||
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
object2.smallCompact = {marginTop: PX_8};
|
||||
object2 = {};
|
||||
PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
|
||||
object2.default = {marginTop: PX_24};
|
||||
PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
|
||||
object2.compact = {marginTop: PX_12};
|
||||
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
object2.smallCompact = {marginTop: PX_8};
|
||||
const env0_17 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(_fun80477);
|
||||
value = value.memo(PremiumGiftFeaturesCard);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/premium/native/gifting/PremiumGiftFeaturesCard.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
function _fun80477() { // fn#80477, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10575:788, offset: 0x01e7cc4f, size: 652 bytes, params: 1, frame: 18
|
||||
const object5 = {};
|
||||
const object6 = {overflow: 'hidden'};
|
||||
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
|
||||
object5.promotional = object6;
|
||||
const object7 = {justifyContent: 'flex-start'};
|
||||
object7.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
|
||||
const BG_SURFACE_RAISED = (importDefault(697) /* metro dependency 697: native */).colors.BG_SURFACE_RAISED;
|
||||
object7.backgroundColor = BG_SURFACE_RAISED;
|
||||
const SHADOW_LOW = (importDefault(697) /* metro dependency 697: native */).shadows.SHADOW_LOW;
|
||||
copyDataProperties(object7, SHADOW_LOW, undefined);
|
||||
object5.card = object7;
|
||||
const object8 = {};
|
||||
const PX_40 = (importDefault(697) /* metro dependency 697: native */).space.PX_40;
|
||||
object8.marginTop = PX_40;
|
||||
let PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
|
||||
object8.marginStart = PX_24;
|
||||
object5.logo = object8;
|
||||
PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
|
||||
object5.promotionalLogo = {marginTop: PX_24};
|
||||
const PX_32 = (importDefault(697) /* metro dependency 697: native */).space.PX_32;
|
||||
object5.promotionalLogoSingleLine = {marginTop: PX_32};
|
||||
object5.promotionalLogoSmallCompact = {marginTop: 18};
|
||||
PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
|
||||
object5.pricing = {maxWidth: 140, marginStart: PX_24};
|
||||
PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
|
||||
object5.featureTitle = {marginStart: PX_24};
|
||||
const object9 = {};
|
||||
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
object9.marginTop = PX_8;
|
||||
PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
|
||||
object9.marginHorizontal = PX_24;
|
||||
object5.features = object9;
|
||||
const object12 = {};
|
||||
PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
|
||||
object12.marginHorizontal = PX_24;
|
||||
PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
|
||||
object12.marginBottom = PX_24;
|
||||
object5.button = object12;
|
||||
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
|
||||
object5.promotionalButton = {marginTop: PX_12};
|
||||
object5.featureIcon = {'width': 24, 'height': 24};
|
||||
const object14 = {};
|
||||
const defaultImport = importDefault(6597) /* metro dependency 6597: TextStyles */;
|
||||
const PRIMARY_NORMAL = Fonts.PRIMARY_NORMAL;
|
||||
const WHITE = (importDefault(697) /* metro dependency 697: native */).colors.WHITE;
|
||||
copyDataProperties(object14, defaultImport(PRIMARY_NORMAL, WHITE, 16), undefined);
|
||||
object14['marginStart'] = -8;
|
||||
object5.featureText = object14;
|
||||
object5.wumpusNoPrice = {'height': 75, 'right': 8};
|
||||
object5.promotionalCardImage = {'position': 'absolute', 'top': 0, 'left': 0, 'right': 0, 'bottom': 0};
|
||||
object5.promotionalBackground = {'position': 'absolute', 'height': 300, 'width': 150, 'right': 0};
|
||||
return object5;
|
||||
}
|
||||
|
||||
function PremiumGiftFeaturesCard(a0) { // fn#80478, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10575:1839, offset: 0x01e7cedb, size: 1919 bytes, params: 2, frame: 46
|
||||
var r11;
|
||||
var text;
|
||||
var r8;
|
||||
var jsxRuntimeEnv0_11Binding;
|
||||
var items5;
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
var items10;
|
||||
const premiumType = a0.premiumType;
|
||||
const onPress = a0.onPress;
|
||||
const style = a0.style;
|
||||
const claimableRewards = a0.claimableRewards;
|
||||
let isSelected = a0.isSelected;
|
||||
const value = undefined;
|
||||
isSelected = isSelected === value || isSelected;
|
||||
let variant = a0.variant;
|
||||
variant = variant === value ? 'default' : variant;
|
||||
let object = {'premiumType': 0, 'onPress': 0, 'style': 0, 'claimableRewards': 0, 'isSelected': 0, 'variant': 0};
|
||||
silentSetPrototypeOf(object, null, undefined);
|
||||
const value4 = copyDataProperties({}, a0, object, undefined);
|
||||
const value6 = (require(566) /* metro dependency 566: flux */).useStateFromStores([PromotionsStore], _fun80479);
|
||||
const value7 = (require(10390) /* metro dependency 10390: MarketingComponentHooks */).useThemeAndReducedMotionAwareAssetUrl(value6 == null ? value : value6.cardAsset);
|
||||
const value8 = (require(10390) /* metro dependency 10390: MarketingComponentHooks */).useThemeAndReducedMotionAwareAssetUrl(value6 == null ? value : value6.backgroundAsset);
|
||||
const styles = useStyles(claimableRewards != null && claimableRewards.length === 1);
|
||||
const value11 = (importDefault(7947) /* metro dependency 7947: usePremiumFeatures */)(premiumType);
|
||||
const defaultImport = importDefault(10391) /* metro dependency 10391: usePremiumProductPricingString */;
|
||||
const MONTH = SubscriptionIntervalTypes.MONTH;
|
||||
const value12 = defaultImport(premiumType, MONTH);
|
||||
const defaultImport2 = defaultImport;
|
||||
const YEAR = SubscriptionIntervalTypes.YEAR;
|
||||
const value13 = defaultImport2(premiumType, YEAR);
|
||||
const {showGiftPrice,
|
||||
useNewCopy} = (importDefault(7672) /* metro dependency 7672: NitroGiftPriceCopyExperiment */).useConfig({location: 'PremiumGiftFeaturesCard'});
|
||||
let r13 = (importDefault(10392) /* metro dependency 10392: useShouldShowGiftingPromotionDeco */)(premiumType) && claimableRewards != null && claimableRewards.length > 0;
|
||||
const r21 = r13 && value7 != null;
|
||||
const binding = env0_4;
|
||||
const value20 = env0_3(binding.useState(0), 2);
|
||||
const property = value20[0];
|
||||
const value21 = 1;
|
||||
const env0_0 = value20[value21];
|
||||
const value22 = binding.useCallback(_fun80480, []);
|
||||
const items2 = [styles.card, style];
|
||||
items2[2] = r13 && styles.promotional;
|
||||
const r5 = r21 && ((Component) => <Component style={styles.promotionalCardImage} resizeMode="cover" source={{uri: value7}} />)(importDefault(5475) /* metro dependency 5475: FastImage */);
|
||||
const PremiumFeaturesBackground = importDefault(7962) /* metro dependency 7962: PremiumFeaturesBackground */;
|
||||
const premiumFeaturesBackgroundProps = {premiumType: premiumType, opacity: r21 ? 0.82 : value21,
|
||||
style: [styles.card, style, r13 && styles.promotional], ...value4};
|
||||
if (r13) {
|
||||
jsxRuntimeEnv0_11Binding = jsxRuntimeEnv0_11;
|
||||
items5 = [value6 != null && ((Component) => <Component giftPlanSelectionCardBannerComponent={value6} claimableRewards={claimableRewards} isSelected={isSelected} onLayout={value22} />)(importDefault(10393) /* metro dependency 10393: PremiumGiftPlanSelectPromotionalBanner */)];
|
||||
items5[1] = value8 != null && ((Component) => <Component style={[styles.promotionalBackground,
|
||||
{top: property}]} resizeMode="cover" source={{uri: value8}} />)(importDefault(5475) /* metro dependency 5475: FastImage */);
|
||||
r11 = <>{items5}</>;
|
||||
} else {
|
||||
r11 = ((Component) => <Component premiumType={premiumType} style={!showGiftPrice && styles.wumpusNoPrice} />)(importDefault(7966) /* metro dependency 7966: PremiumFeaturesWumpus */);
|
||||
}
|
||||
object = [r11];
|
||||
object[1] = ((Component) => <Component style={[styles.logo,
|
||||
r13 && (value21 === claimableRewards.length ? styles.promotionalLogoSingleLine : styles.promotionalLogo),
|
||||
r13 && variant === 'smallCompact' && styles.promotionalLogoSmallCompact]} premiumType={premiumType} />)(importDefault(7964) /* metro dependency 7964: PremiumFeaturesLogo */);
|
||||
if (showGiftPrice) {
|
||||
if (useNewCopy) {
|
||||
var textProps = {'style': null, 'variant': 'text-sm/medium', 'color': 'always-white',
|
||||
style: [styles.pricing,
|
||||
env0_15[variant]]};
|
||||
items10 = [value12, ' '];
|
||||
items10[2] = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.lVQycU);
|
||||
text = <Text {...textProps}>{items10}</Text>;
|
||||
} else {
|
||||
text = <Text style={[styles.pricing,
|
||||
env0_15[variant]]} variant="text-sm/medium" color="always-white">{intl.format((require(1244) /* metro dependency 1244: indexNative */).t.Ob6fwp,
|
||||
|
||||
|
||||
{monthlyPrice: value12, yearlyPrice: value13})}</Text>;
|
||||
}
|
||||
r8 = text;
|
||||
} else {
|
||||
r8 = showGiftPrice;
|
||||
}
|
||||
object[2] = r8;
|
||||
const items11 = [styles.featureTitle, env0_14[variant]];
|
||||
const string = intl.string;
|
||||
const JgsVht = (require(1244) /* metro dependency 1244: indexNative */).t.JgsVht;
|
||||
object[3] = <Text style={items11} variant="heading-sm/bold" color="always-white">{Reflect.apply(string, intl,
|
||||
[JgsVht])}</Text>;
|
||||
object[4] = ((Component) => <Component style={styles.features} features={value11} iconStyle={styles.featureIcon} labelStyle={styles.featureText} rowStyle={env0_13[variant]} />)(importDefault(7971) /* metro dependency 7971: PremiumFeatureList */);
|
||||
object[5] = <View style={{flexGrow: value21}} />;
|
||||
const items12 = [styles.button, env0_16[variant]];
|
||||
r13 = r13 && styles.promotionalButton;
|
||||
items12[2] = r13;
|
||||
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
|
||||
const TIER_0 = PremiumTypes.TIER_0;
|
||||
object[6] = <View style={items12}><Button variant="experimental_premium-secondary" text={premiumType === TIER_0 ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.rk4Uu8) : intl.string((require(1244) /* metro dependency 1244: indexNative */).t.Ve9Ge6)} onPress={onPress} /></View>;
|
||||
return (
|
||||
<View style={items2}>
|
||||
{r5}
|
||||
<PremiumFeaturesBackground {...premiumFeaturesBackgroundProps}>
|
||||
{object}
|
||||
</PremiumFeaturesBackground>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun80479() { // fn#80479, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10575:2006, offset: 0x01e7d65a, size: 111 bytes, params: 1, frame: 13
|
||||
var giftPlanSelectionCardBanner;
|
||||
var properties;
|
||||
let value = environment.__proto__;
|
||||
const getMarketingComponentByType = PromotionsStore.getMarketingComponentByType;
|
||||
const MarketingComponentType = (require(7583) /* metro dependency 7583: MarketingComponentType */).MarketingComponentType;
|
||||
const GIFT_PLAN_SELECTION_CARD_BANNER = MarketingComponentType.GIFT_PLAN_SELECTION_CARD_BANNER;
|
||||
value = Reflect.apply(getMarketingComponentByType, PromotionsStore, [GIFT_PLAN_SELECTION_CARD_BANNER]);
|
||||
const value2 = null;
|
||||
if (value2 == value) {
|
||||
giftPlanSelectionCardBanner = value2;
|
||||
} else {
|
||||
properties = value.properties;
|
||||
properties = properties.properties;
|
||||
if (properties.oneofKind !== 'giftPlanSelectionCardBanner') {
|
||||
giftPlanSelectionCardBanner = value2;
|
||||
} else {
|
||||
properties = value.properties;
|
||||
properties = properties.properties;
|
||||
giftPlanSelectionCardBanner = properties.giftPlanSelectionCardBanner;
|
||||
}
|
||||
}
|
||||
return giftPlanSelectionCardBanner;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,204 @@
|
||||
/* Metro module 10382; source: modules/premium/native/gifting/PremiumGiftModal.tsx; dependencies: [57, 31, 1878, 33, 7294, 4501, 697, 566, 10034, 1244, 5282, 10383, 10456, 10458, 10463, 2320, 10468, 10381, 6789, 6771, 6518, 491, 5080, 3815, 7636, 7669, 10472, 5280, 2] */
|
||||
function _fun80412(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#80412, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10568:6, offset: 0x01e79964, size: 485 bytes, params: 8, frame: 22
|
||||
var object3;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(57) /* metro dependency 57 */;
|
||||
const env0_4 = importAll(31) /* metro dependency 31 */;
|
||||
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
|
||||
const env0_6 = (require(33) /* metro dependency 33 */).jsx;
|
||||
object3 = {PLAN_SELECT: 'PremiumGiftPlanSelect', REWARD_SELECT: 'GiftingSKUSelect',
|
||||
CUSTOMIZATION: 'PremiumGiftCustomization', SUCCESS: 'PremiumGiftSuccess',
|
||||
GIFTING_BADGE: 'GiftingBadgePostPurchase'};
|
||||
const object4 = {};
|
||||
let PLAN_SELECT = object3.PLAN_SELECT;
|
||||
const PaymentFlowStep = (require(7294) /* metro dependency 7294: PremiumAnalyticsUtils */).PaymentFlowStep;
|
||||
const SKU_SELECT = PaymentFlowStep.SKU_SELECT;
|
||||
object4[PLAN_SELECT] = SKU_SELECT;
|
||||
const REWARD_SELECT = object3.REWARD_SELECT;
|
||||
const REWARD_SKU_SELECT = PaymentFlowStep.REWARD_SKU_SELECT;
|
||||
object4[REWARD_SELECT] = REWARD_SKU_SELECT;
|
||||
const CUSTOMIZATION = object3.CUSTOMIZATION;
|
||||
PLAN_SELECT = PaymentFlowStep.PLAN_SELECT;
|
||||
object4[CUSTOMIZATION] = PLAN_SELECT;
|
||||
const SUCCESS = object3.SUCCESS;
|
||||
let CONFIRM = PaymentFlowStep.CONFIRM;
|
||||
object4[SUCCESS] = CONFIRM;
|
||||
const GIFTING_BADGE = object3.GIFTING_BADGE;
|
||||
CONFIRM = PaymentFlowStep.CONFIRM;
|
||||
object4[GIFTING_BADGE] = CONFIRM;
|
||||
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = createStylesModule.createStyles;
|
||||
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
|
||||
const env0_9 = Reflect.apply(createStyles, createStylesModule, [{header: {backgroundColor: BACKGROUND_BASE_LOW,
|
||||
shadowColor: 'transparent'}}]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/premium/native/gifting/PremiumGiftModal.tsx');
|
||||
exports.default = PremiumGiftModal;
|
||||
exports.PremiumGiftScreens = object3;
|
||||
}
|
||||
|
||||
function PremiumGiftModal({recipientUserId, premiumType, planInterval, analyticsLocation, analyticsLocations, initialRoute, order, onDismiss}) { // fn#80413, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10568:829, offset: 0x01e79b49, size: 613 bytes, params: 2, frame: 33
|
||||
var r0;
|
||||
var UnsupportedFeatureModal;
|
||||
var intl;
|
||||
var AnalyticsLocationProvider;
|
||||
var NativeGiftContextProvider;
|
||||
var object3;
|
||||
var value;
|
||||
const analyticsLocations2 = (importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */)(analyticsLocations).analyticsLocations;
|
||||
const value2 = (importDefault(6518) /* metro dependency 6518: useInitialValue */)(_fun80414);
|
||||
const env0_3 = value2;
|
||||
let binding = undefined;
|
||||
const useMemo = binding.useMemo;
|
||||
let object = [value2, analyticsLocation, analyticsLocations];
|
||||
const value3 = Reflect.apply(useMemo, binding, [_fun80415, object]);
|
||||
const r2 = initialRoute ?? (premiumType != null ? env0_7.CUSTOMIZATION : env0_7.PLAN_SELECT);
|
||||
binding = undefined;
|
||||
const value4 = binding.useCallback(_fun80416, [onDismiss]);
|
||||
const value5 = useGetScreens(r2, value4, recipientUserId);
|
||||
const value7 = env0_3(binding.useState(env0_8[r2]), 2);
|
||||
if ((require(3815) /* metro dependency 3815: BillingPlatformUtils */).isPremiumGiftingSupported()) {
|
||||
AnalyticsLocationProvider = (require(6771) /* metro dependency 6771: useAnalyticsLocations */).AnalyticsLocationProvider;
|
||||
object = {value: analyticsLocations2};
|
||||
NativeGiftContextProvider = (require(7669) /* metro dependency 7669: NativeGiftContext */).NativeGiftContextProvider;
|
||||
object3 = {basePurchaseAnalytics: value3, recipientUserId: recipientUserId, onClose: value4,
|
||||
setCurrentAnalyticsStep: value7[1], premiumType: premiumType, planInterval: planInterval,
|
||||
initialOrder: order};
|
||||
value = importDefault(10472) /* metro dependency 10472: PremiumGiftAnalytics */;
|
||||
value = <AnalyticsLocationProvider {...object}><NativeGiftContextProvider {...object3}>{((Component) => <Component currentStep={value7[0]}>{((Navigator) => <Navigator initialRouteName={r2} screens={value5} onStateChange={onStateChange} />)((require(5280) /* metro dependency 5280: NavigatorNative */).Navigator)}</Component>)(value)}</NativeGiftContextProvider></AnalyticsLocationProvider>;
|
||||
r0 = value;
|
||||
} else {
|
||||
UnsupportedFeatureModal = importDefault(7636) /* metro dependency 7636: UnsupportedFeatureModal */;
|
||||
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
r0 = <UnsupportedFeatureModal title={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['JCFN/y'])} />;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function _fun80415() { // fn#80415, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10568:1063, offset: 0x01e79dd3, size: 77 bytes, params: 1, frame: 13
|
||||
const value = environment.__proto__;
|
||||
return (require(7294) /* metro dependency 7294: PremiumAnalyticsUtils */).getBasePurchaseFlowAnalyticsFields({isGift: true,
|
||||
analyticsLoadId: env0_3, analyticsLocation: analyticsLocation, analyticsLocations: analyticsLocations});
|
||||
}
|
||||
|
||||
function _fun80416() { // fn#80416, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10568:1259, offset: 0x01e79e20, size: 58 bytes, params: 1, frame: 12
|
||||
const value = environment.__proto__;
|
||||
(importDefault(5080) /* metro dependency 5080: ModalActionCreators */).pop();
|
||||
if (onDismiss != null) {
|
||||
onDismiss();
|
||||
}
|
||||
}
|
||||
|
||||
function useGetScreens(a0, a1, a2) { // fn#80417, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10568:1301, owner: PremiumGiftModal.useGetScreens, offset: 0x01e79e5a, size: 802 bytes, params: 4, frame: 25
|
||||
var object4;
|
||||
var environment;
|
||||
var r1;
|
||||
var object2;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const env0_0 = a2;
|
||||
const value = environment.__proto__;
|
||||
const styles = useStyles();
|
||||
const value2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], _fun80418);
|
||||
const value3 = (require(10034) /* metro dependency 10034: useWishlistHooks */).useFetchWishlistAndProfileInfoForUser(a2);
|
||||
const env0_1 = value3.wishlist;
|
||||
const env0_2 = value3.userProfile;
|
||||
const env0_3 = value3.wishlistId;
|
||||
const env0_4 = value3.error;
|
||||
const value4 = (require(10034) /* metro dependency 10034: useWishlistHooks */).useShouldShowWishlistInDMGifting({'isGift': true,
|
||||
'giftRecipient': null, 'isSocialLayerStorefrontEnabled': false, giftRecipient: value2});
|
||||
object4 = {};
|
||||
const PLAN_SELECT = env1_7.PLAN_SELECT;
|
||||
if (value4) {
|
||||
object2 = {};
|
||||
object2.title = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['JCFN/y']);
|
||||
object2.headerLeft = (require(5282) /* metro dependency 5282: NavigatorHeaderNative */).getHeaderCloseButton(a1);
|
||||
object2.headerStyle = styles.header;
|
||||
object2.render = render_80419;
|
||||
r1 = object2;
|
||||
} else {
|
||||
r1 = {'title': '', 'headerShown': false, render: render_80420};
|
||||
}
|
||||
object4[PLAN_SELECT] = r1;
|
||||
let binding = env1_7;
|
||||
const REWARD_SELECT = binding.REWARD_SELECT;
|
||||
const REWARD_SELECT2 = binding.REWARD_SELECT;
|
||||
object4[REWARD_SELECT] = {title: '',
|
||||
headerLeft: a0 === REWARD_SELECT2 ? (require(5282) /* metro dependency 5282: NavigatorHeaderNative */).getHeaderCloseButton(a1) : (require(5282) /* metro dependency 5282: NavigatorHeaderNative */).getHeaderBackButton(),
|
||||
headerStyle: styles.header, render: render_80421};
|
||||
binding = env1_7;
|
||||
const CUSTOMIZATION = binding.CUSTOMIZATION;
|
||||
const CUSTOMIZATION2 = binding.CUSTOMIZATION;
|
||||
object4[CUSTOMIZATION] = {title: '',
|
||||
headerLeft: a0 === CUSTOMIZATION2 ? (require(5282) /* metro dependency 5282: NavigatorHeaderNative */).getHeaderCloseButton(a1) : (require(5282) /* metro dependency 5282: NavigatorHeaderNative */).getHeaderBackButton(),
|
||||
headerStyle: styles.header, render: render_80422};
|
||||
binding = env1_7;
|
||||
const SUCCESS = binding.SUCCESS;
|
||||
const object5 = {title: ''};
|
||||
object5.headerLeft = (require(5282) /* metro dependency 5282: NavigatorHeaderNative */).getHeaderCloseButton(a1);
|
||||
object5.headerStyle = styles.header;
|
||||
object5.render = render_80423;
|
||||
object4[SUCCESS] = object5;
|
||||
const GIFTING_BADGE = binding.GIFTING_BADGE;
|
||||
const object8 = {};
|
||||
object8.title = intl.string((importDefault(2320) /* metro dependency 2320: GiftingBadgeMessages */).roVAey);
|
||||
object8.headerLeft = (require(5282) /* metro dependency 5282: NavigatorHeaderNative */).getHeaderCloseButton(a1);
|
||||
object8.headerTransparent = true;
|
||||
object8.headerStyle = {'backgroundColor': 'transparent', 'shadowColor': 'transparent'};
|
||||
object8.render = render_80424;
|
||||
object4[GIFTING_BADGE] = object8;
|
||||
return object4;
|
||||
}
|
||||
|
||||
function PremiumGiftModalOnStateChange(a0) { // fn#80426, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10568:3384, owner: PremiumGiftModal.onStateChange, offset: 0x01e7a385, size: 58 bytes, params: 2, frame: 11
|
||||
var name;
|
||||
var value;
|
||||
var binding;
|
||||
if (a0 != null) {
|
||||
name = a0.routes[a0.index].name;
|
||||
binding = env0_4;
|
||||
value = environment.__proto__;
|
||||
binding(env1_8[name]);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun80418() { // fn#80418, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10568:1375, offset: 0x01e7a17c, size: 40 bytes, params: 1, frame: 12
|
||||
const value2 = null;
|
||||
return value2 != importDefault ? UserStore.getUser(importDefault) : value2;
|
||||
}
|
||||
|
||||
function useGetScreensRender() { // fn#80419, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10568:1763, owner: PremiumGiftModal.useGetScreens.render, offset: 0x01e7a1a4, size: 51 bytes, params: 1, frame: 13
|
||||
const value = environment.__proto__.__proto__;
|
||||
return ((Component) => <Component shouldUseDMWishlistGiftingDesign isLoadingWishlist={false} />)(importDefault(10383) /* metro dependency 10383: PremiumGiftPlanSelect */);
|
||||
}
|
||||
|
||||
function useGetScreensRender_80420() { // fn#80420, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10568:1871, owner: PremiumGiftModal.useGetScreens.render, offset: 0x01e7a1d7, size: 124 bytes, params: 1, frame: 19
|
||||
const value = environment.__proto__.__proto__;
|
||||
return ((Component) => <Component shouldUseDMWishlistGiftingDesign={false} isLoadingWishlist={importDefault != null && !env0_5 && error == null && (userProfile == null || wishlistId != null && wishlist == null)} />)(importDefault(10383) /* metro dependency 10383: PremiumGiftPlanSelect */);
|
||||
}
|
||||
|
||||
function useGetScreensRender_80421({defaultHighlightedReward, allRewards, claimableRewards, onSelect}) { // fn#80421, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10568:2138, owner: PremiumGiftModal.useGetScreens.render, offset: 0x01e7a253, size: 86 bytes, params: 2, frame: 17
|
||||
const value = environment.__proto__.__proto__;
|
||||
return ((Component) => <Component defaultHighlightedReward={defaultHighlightedReward} allRewards={allRewards} claimableRewards={claimableRewards} onSelect={onSelect} />)(importDefault(10456) /* metro dependency 10456: GiftingSKUSelectScreen */);
|
||||
}
|
||||
|
||||
function useGetScreensRender_80422() { // fn#80422, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10568:2474, owner: PremiumGiftModal.useGetScreens.render, offset: 0x01e7a2a9, size: 39 bytes, params: 1, frame: 13
|
||||
const value = environment.__proto__.__proto__;
|
||||
return ((Component) => <Component />)(importDefault(10458) /* metro dependency 10458: PremiumGiftCustomization */);
|
||||
}
|
||||
|
||||
function useGetScreensRender_80423() { // fn#80423, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10568:2588, owner: PremiumGiftModal.useGetScreens.render, offset: 0x01e7a2d0, size: 39 bytes, params: 1, frame: 13
|
||||
const value = environment.__proto__.__proto__;
|
||||
return ((Component) => <Component />)(importDefault(10463) /* metro dependency 10463: PremiumGiftSuccess */);
|
||||
}
|
||||
|
||||
function useGetScreensRender_80424(a0) { // fn#80424, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10568:2812, owner: PremiumGiftModal.useGetScreens.render, offset: 0x01e7a2f7, size: 67 bytes, params: 2, frame: 14
|
||||
var environment;
|
||||
const value = environment.__proto__.__proto__;
|
||||
return ((Component) => <Component currentProgress={a0.currentProgress} onSendGift={function() {
|
||||
var moduleValue = require(dependencyMap[17]);
|
||||
var GIFTING_BADGE_POST_PURCHASE = importDefault(dependencyMap[18]).GIFTING_BADGE_POST_PURCHASE;
|
||||
moduleValue.openGiftModal({analyticsLocations: [GIFTING_BADGE_POST_PURCHASE]});
|
||||
}} />)(importDefault(10468) /* metro dependency 10468: GiftBadgePostPurchase */);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,493 @@
|
||||
/* Metro module 10383; source: modules/premium/native/gifting/PremiumGiftPlanSelect.tsx; dependencies: [57, 31, 27, 7670, 7261, 1880, 661, 33, 4501, 697, 674, 1484, 1585, 1478, 7669, 4559, 5286, 566, 10384, 7633, 7635, 10382, 10386, 10389, 9625, 4017, 1305, 4504, 10396, 6789, 10397, 10431, 7725, 1244, 5312, 5475, 10455, 4589, 5314, 4573, 2] */
|
||||
function _fun80427(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#80427, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10569:6, offset: 0x01e7a3bf, size: 393 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 */;
|
||||
let value = require(27) /* metro dependency 27 */;
|
||||
const env0_5 = value.ActivityIndicator;
|
||||
const env0_6 = value.Pressable;
|
||||
const env0_7 = value.View;
|
||||
const env0_8 = value.ScrollView;
|
||||
const badgeDirectoryStore = importDefault(7670) /* metro dependency 7670: BadgeDirectoryStore */;
|
||||
const promotionsStore = importDefault(7261) /* metro dependency 7261: PromotionsStore */;
|
||||
const PremiumTypes = (require(1880) /* metro dependency 1880: PremiumConstants */).PremiumTypes;
|
||||
const env0_11 = (require(661) /* metro dependency 661: Constants */).VerticalGradient;
|
||||
value = require(33) /* metro dependency 33 */;
|
||||
const env0_12 = value.jsx;
|
||||
const env0_13 = value.jsxs;
|
||||
const env0_14 = value.Fragment;
|
||||
const TIER_2 = PremiumTypes.TIER_2;
|
||||
object = [TIER_2];
|
||||
const TIER_0 = PremiumTypes.TIER_0;
|
||||
object[1] = TIER_0;
|
||||
const env0_16 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(_fun80428);
|
||||
object = {code: 'function PremiumGiftPlanSelectTsx1(){const{STANDARD_EASING,withTiming,carouselVisibility}=this.__closure;const animationSettings={easing:STANDARD_EASING,duration:500};return{opacity:withTiming(carouselVisibility.get()?1:0,animationSettings),transform:[{translateY:withTiming(carouselVisibility.get()?0:100,animationSettings)}]};}'};
|
||||
object = {code: 'function PremiumGiftPlanSelectTsx2(value,index){const{lastItemIndex,leftOffset,centerOffset,rightOffset,carouselStep}=this.__closure;const activeIndex=index-value;const leftT=Math.max(0,Math.min(1,activeIndex));const rightT=Math.max(0,Math.min(1,activeIndex-(lastItemIndex-1)));const offset=leftOffset+leftT*(centerOffset-leftOffset)+rightT*(rightOffset-centerOffset);return{transform:[{translateX:value*carouselStep+offset}]};}'};
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/premium/native/gifting/PremiumGiftPlanSelect.tsx');
|
||||
exports.default = PremiumGiftPlanSelect;
|
||||
}
|
||||
|
||||
function _fun80428(a0, a1, a2) { // fn#80428, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10569:349, offset: 0x01e7a548, size: 701 bytes, params: 4, frame: 22
|
||||
const object2 = {};
|
||||
let BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
|
||||
object2.container = {flex: 1, backgroundColor: BACKGROUND_BASE_LOW};
|
||||
object2.headerBackground = {position: 'absolute', width: a0, height: 0.1 * a1, top: a1 / 1.75 - 0.1 * a1};
|
||||
BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
|
||||
object2.headerBackgroundColor = {color: BACKGROUND_BASE_LOW};
|
||||
object2.headerImageContainer = {position: 'absolute', width: a0, height: a1 / 1.75};
|
||||
object2.headerImage = {width: a0};
|
||||
const object3 = {width: a0};
|
||||
object3.backgroundColor = (importDefault(674) /* metro dependency 674 */)('#000000').alpha(0.8).hex();
|
||||
object2.headerOverlay = object3;
|
||||
object2.avatar = {alignSelf: 'center'};
|
||||
const object4 = {textAlign: 'center'};
|
||||
let space = (importDefault(697) /* metro dependency 697: native */).space;
|
||||
object4.marginTop = a2 ? space.PX_16 : space.PX_12;
|
||||
let PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
|
||||
object4.marginHorizontal = PX_24;
|
||||
object2.title = object4;
|
||||
const object5 = {textAlign: 'center'};
|
||||
space = (importDefault(697) /* metro dependency 697: native */).space;
|
||||
object5.marginTop = a2 ? space.PX_16 : space.PX_12;
|
||||
PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
|
||||
object5.marginHorizontal = PX_24;
|
||||
object2.description = object5;
|
||||
space = (importDefault(697) /* metro dependency 697: native */).space;
|
||||
object2.carousel = {marginTop: a2 ? space.PX_16 : space.PX_32};
|
||||
const object6 = {};
|
||||
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object6.paddingTop = PX_16;
|
||||
const PX_48 = (importDefault(697) /* metro dependency 697: native */).space.PX_48;
|
||||
object6.paddingBottom = PX_48;
|
||||
object2.dmGiftingContent = object6;
|
||||
object2.loadingContainer = {'flex': 1, 'alignItems': 'center', 'justifyContent': 'center'};
|
||||
object2.closeButtonContainer = {'position': 'absolute', 'top': 0, 'left': 0, 'zIndex': 1};
|
||||
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object2.closeButton = {padding: PX_16};
|
||||
object2.closeButtonIcon = {'width': 24, 'height': 24, 'tintColor': 'white'};
|
||||
const object8 = {};
|
||||
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object8.marginTop = PX_16;
|
||||
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object8.marginHorizontal = PX_16;
|
||||
object2.badgeBanner = object8;
|
||||
return object2;
|
||||
}
|
||||
|
||||
function PremiumGiftPlanSelect({shouldUseDMWishlistGiftingDesign, isLoadingWishlist}) { // fn#80429, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10569:2346, offset: 0x01e7a805, size: 3448 bytes, params: 2, frame: 61
|
||||
var object5;
|
||||
var r33;
|
||||
var r40;
|
||||
var r42;
|
||||
var r36;
|
||||
var r17;
|
||||
var r16;
|
||||
var r0;
|
||||
var jsxRuntimeEnv0_14Binding;
|
||||
var items2;
|
||||
var object2;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
var FastImage;
|
||||
var headerImageContainer;
|
||||
var object3;
|
||||
var object4;
|
||||
var value39;
|
||||
var Avatar;
|
||||
var AvatarSizes;
|
||||
var items6;
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
var jsxRuntimeEnv0_14Binding2;
|
||||
var defaultImport6;
|
||||
var items9;
|
||||
var defaultImport8;
|
||||
let value = undefined;
|
||||
const env0_17 = value;
|
||||
const value3 = (require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation();
|
||||
const {top, bottom} = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)();
|
||||
const {width, height} = (importDefault(1478) /* metro dependency 1478: useWindowDimensionsNative */)();
|
||||
const {recipientUser, claimableRewards,
|
||||
onClose} = (require(7669) /* metro dependency 7669: NativeGiftContext */).useNativeGiftContext();
|
||||
const value7 = (require(4559) /* metro dependency 4559: useIsScreenReaderEnabledNative */).useIsScreenReaderEnabled();
|
||||
(require(5286) /* metro dependency 5286: useNavigatorBackPressHandlerNative */).useNavigatorBackPressHandler(function() {
|
||||
onClose();
|
||||
return true;
|
||||
});
|
||||
const value8 = (require(566) /* metro dependency 566: flux */).useStateFromStoresArray([PromotionsStore],
|
||||
function() {
|
||||
return PromotionsStore.getGiftPromotionRewardSkuIds();
|
||||
});
|
||||
const value9 = (require(10384) /* metro dependency 10384: useSelectPremiumGift */).useSelectPremiumGift('PremiumGiftPlanSelect');
|
||||
const env0_3 = value9;
|
||||
const defaultImport = importDefault(7633) /* metro dependency 7633: GiftingBadgeExperiment */;
|
||||
const useConfig = defaultImport.useConfig;
|
||||
const enabled = Reflect.apply(useConfig, defaultImport, [{location: 'PremiumGiftPlanSelect'}]).enabled;
|
||||
const {nextTier,
|
||||
giftsToNextTier} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([BadgeDirectoryStore],
|
||||
function() {
|
||||
var object = {};
|
||||
object.nextTier = BadgeDirectoryStore.getNextTier(require(dependencyMap[20]).BadgeId.GIFTING);
|
||||
object.giftsToNextTier = BadgeDirectoryStore.getRemainingToNextTier(require(dependencyMap[20]).BadgeId.GIFTING);
|
||||
return object;
|
||||
});
|
||||
const r10 = enabled && nextTier != null;
|
||||
const env0_4 = r10;
|
||||
const styles = useStyles(width, height, r10);
|
||||
let binding = env0_4;
|
||||
let useState = binding.useState;
|
||||
const value12 = Reflect.apply(useState, binding, [0]);
|
||||
const binding2 = env0_3;
|
||||
const value13 = binding2(value12, 2);
|
||||
const property = value13[0];
|
||||
const property2 = value13[1];
|
||||
useState = binding.useState;
|
||||
const value15 = binding2(Reflect.apply(useState, binding, [false]), 2);
|
||||
const property3 = value15[0];
|
||||
const env0_7 = value15[1];
|
||||
binding.useEffect(_fun80433, [value3]);
|
||||
useState = binding.useState;
|
||||
const value17 = binding2(Reflect.apply(useState, binding, [null]), 2);
|
||||
const property4 = value17[0];
|
||||
const property5 = value17[1];
|
||||
const value18 = binding.useRef([]);
|
||||
binding.useEffect(_fun80436, [shouldUseDMWishlistGiftingDesign]);
|
||||
let useCallback = binding.useCallback;
|
||||
const value19 = Reflect.apply(useCallback, binding, [_fun80437, [property5]]);
|
||||
let closure = function() {
|
||||
importDefault(dependencyMap[22])();
|
||||
};
|
||||
const value20 = binding.useCallback(closure, []);
|
||||
const value21 = 0.86 * width;
|
||||
const value22 = binding.useCallback(function(a0) {
|
||||
var value = a1;
|
||||
var env0_0 = a0;
|
||||
var env0_1 = (value !== undefined ? value : {forScreenReader: false}).forScreenReader;
|
||||
return _fun80440;
|
||||
}, [value9, value21, value18, value19, property4, property, claimableRewards]);
|
||||
const r8 = (require(9625) /* metro dependency 9625: useIsWindowSmall */).useIsWindowSmall() || claimableRewards != null && claimableRewards.length > 0 ? 'smallCompact' : 'compact';
|
||||
binding = env0_4;
|
||||
const value28 = binding.useMemo(_fun80444, [value22, r8]);
|
||||
const value29 = binding.useMemo(_fun80445, [value22]);
|
||||
const value30 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(false);
|
||||
const env0_15 = value30;
|
||||
binding.useEffect(_fun80446, [value30, property4]);
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
|
||||
closure = PremiumGiftPlanSelectPe;
|
||||
object5 = {};
|
||||
const STANDARD_EASING = (require(1305) /* metro dependency 1305: native */).STANDARD_EASING;
|
||||
object5.STANDARD_EASING = STANDARD_EASING;
|
||||
object5.withTiming = (require(4504) /* metro dependency 4504: timing */).withTiming;
|
||||
object5.carouselVisibility = value30;
|
||||
closure.__closure = object5;
|
||||
closure.__workletHash = 2946262965957;
|
||||
closure.__initData = env0_17;
|
||||
const value31 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
|
||||
const value32 = binding.useMemo(_fun80448, [styles]);
|
||||
const value33 = value21 + 16;
|
||||
const value34 = env0_15.length - 1;
|
||||
const value35 = (width - value21) / 2;
|
||||
const env0_18 = value35;
|
||||
const value36 = width - value21 - 16;
|
||||
useCallback = binding.useCallback;
|
||||
closure = PremiumGiftPlanSelectSe;
|
||||
closure.__closure = {lastItemIndex: value34, leftOffset: 16, centerOffset: value35, rightOffset: value36,
|
||||
carouselStep: value33};
|
||||
closure.__workletHash = 8954351954675;
|
||||
closure.__initData = env0_18;
|
||||
const value37 = Reflect.apply(useCallback, binding, [closure, [value33, value34, 16, value35, value36]]);
|
||||
if (isLoadingWishlist) {
|
||||
r0 = <View style={[styles.container, styles.loadingContainer]}><ActivityIndicator size="large" /></View>;
|
||||
} else if (shouldUseDMWishlistGiftingDesign) {
|
||||
var viewBindingProps = {style: styles.container};
|
||||
var scrollViewBindingProps = {contentContainerStyle: {paddingBottom: bottom}};
|
||||
items9 = [r10 && <View style={styles.badgeBanner}><Pressable onPress={value20} accessibilityRole="button">{((Component) => <Component giftsToNextTier={giftsToNextTier} nextTierName={nextTier.name ?? ''} nextTierIcon={nextTier.simple_icon_url} analyticsLocation={(importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).PREMIUM_GIFT_PLAN_SELECTION} />)(importDefault(10396) /* metro dependency 10396: GiftingBadgeProgressBanner */)}</Pressable></View>];
|
||||
var viewBinding3Props = {style: styles.dmGiftingContent};
|
||||
if (value8.length === 0) {
|
||||
if (value7) {
|
||||
r17 = <ScrollView horizontal showsHorizontalScrollIndicator={false} contentContainerStyle={{'gap': 16,
|
||||
'paddingHorizontal': 16}}>{env0_15.map(_fun80450)}</ScrollView>;
|
||||
} else {
|
||||
defaultImport8 = importDefault(10397) /* metro dependency 10397 */;
|
||||
binding = env0_15;
|
||||
r17 = ((Component) => <Component style={value31} data={binding} renderItem={value28} width={width} windowSize={binding.length} height={(property4 ?? 1) + 2 * (importDefault(697) /* metro dependency 697: native */).space.PX_8} onConfigurePanGesture={function(a0) {
|
||||
a0.activeOffsetX([-10, 10]);
|
||||
}} loop={false} scrollAnimationDuration={200} customAnimation={value37} onSnapToItem={property2} />)(defaultImport8);
|
||||
}
|
||||
r16 = r17;
|
||||
} else if (value === claimableRewards) {
|
||||
r16 = null;
|
||||
} else {
|
||||
if (value7) {
|
||||
r17 = <ScrollView horizontal showsHorizontalScrollIndicator={false} contentContainerStyle={{'gap': 16,
|
||||
'paddingHorizontal': 16}}>{env0_15.map(_fun80450)}</ScrollView>;
|
||||
} else {
|
||||
defaultImport8 = importDefault(10397) /* metro dependency 10397 */;
|
||||
binding = env0_15;
|
||||
r17 = ((Component) => <Component style={value31} data={binding} renderItem={value28} width={width} windowSize={binding.length} height={(property4 ?? 1) + 2 * (importDefault(697) /* metro dependency 697: native */).space.PX_8} onConfigurePanGesture={onConfigurePanGesture_80451} loop={false} scrollAnimationDuration={200} customAnimation={value37} onSnapToItem={property2} />)(defaultImport8);
|
||||
}
|
||||
r16 = r17;
|
||||
}
|
||||
items9[1] = <View {...viewBinding3Props}>{r16}</View>;
|
||||
items9[2] = recipientUser != null && ((PremiumGiftWishlistBanner) => <PremiumGiftWishlistBanner giftRecipient={recipientUser} />)((require(10431) /* metro dependency 10431: PremiumGiftWishlistBanner */).PremiumGiftWishlistBanner);
|
||||
value = <View {...viewBindingProps}><ScrollView {...scrollViewBindingProps}>{items9}</ScrollView></View>;
|
||||
r0 = value;
|
||||
} else {
|
||||
jsxRuntimeEnv0_14Binding = jsxRuntimeEnv0_14;
|
||||
items2 = [property3 && ((Component) => <Component animated barStyle="light-content" />)(importDefault(7725) /* metro dependency 7725: StatusBarAndroid */)];
|
||||
items2[1] = <Pressable style={[styles.closeButtonContainer,
|
||||
{paddingTop: top}]} onPress={onClose} accessibilityRole="button" accessibilityLabel={intl.string(t.cpT0Cq)}><View style={styles.closeButton}>{((XSmallIcon) => <XSmallIcon size="md" style={styles.closeButtonIcon} />)((require(5312) /* metro dependency 5312: XSmallIcon */).XSmallIcon)}</View></Pressable>;
|
||||
FastImage = importDefault(5475) /* metro dependency 5475: FastImage */;
|
||||
headerImageContainer = styles.headerImageContainer;
|
||||
items2[2] = <FastImage resizeMode="cover" style={[headerImageContainer,
|
||||
styles.headerImage]} source={importDefault(10455) /* metro dependency 10455 */} />;
|
||||
headerImageContainer = styles.headerImageContainer;
|
||||
items2[3] = <View style={[headerImageContainer, styles.headerOverlay]} />;
|
||||
items2[4] = ((Component) => <Component style={styles.headerBackground} start={VerticalGradient.START} end={VerticalGradient.END} colors={value32} />)(importDefault(4589) /* metro dependency 4589 */);
|
||||
var scrollViewBindingProps = {contentContainerStyle: {paddingBottom: bottom}};
|
||||
object3 = {};
|
||||
object4 = {};
|
||||
object4.paddingTop = top + (require(5314) /* metro dependency 5314: NavigatorConstantsNative */).NAV_BAR_HEIGHT;
|
||||
object3.style = [object4];
|
||||
value39 = recipientUser != null;
|
||||
if (value39) {
|
||||
Avatar = (require(1305) /* metro dependency 1305: native */).Avatar;
|
||||
var avatarProps = {style: styles.avatar, guildId: value};
|
||||
AvatarSizes = (require(1305) /* metro dependency 1305: native */).AvatarSizes;
|
||||
avatarProps.size = r10 ? AvatarSizes.LARGE_48 : AvatarSizes.XLARGE;
|
||||
avatarProps.user = recipientUser;
|
||||
r33 = <Avatar {...avatarProps} />;
|
||||
} else {
|
||||
r33 = value39;
|
||||
}
|
||||
items6 = [r33];
|
||||
var textProps = {style: styles.title};
|
||||
r40 = recipientUser != null ? 'heading-xl/extrabold' : 'heading-xxl/extrabold';
|
||||
textProps.variant = r40;
|
||||
textProps.color = 'always-white';
|
||||
r40 = recipientUser != null ? intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.m5ggvH,
|
||||
|
||||
{username: recipientUser.globalName ?? recipientUser.username}) : intl.string((require(1244) /* metro dependency 1244: indexNative */).t.dqQgZv);
|
||||
items6[1] = <Text {...textProps}>{r40}</Text>;
|
||||
items6[2] = <Text style={styles.description} variant="heading-sm/medium" color="always-white">{intl.string(t['30qzrd'])}</Text>;
|
||||
r33 = r10 && <Pressable style={styles.badgeBanner} onPress={value20} accessibilityRole="button">{((Component) => <Component giftsToNextTier={giftsToNextTier} nextTierName={nextTier.name ?? ''} nextTierIcon={nextTier.simple_icon_url} analyticsLocation={(importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).PREMIUM_GIFT_PLAN_SELECTION} />)(importDefault(10396) /* metro dependency 10396: GiftingBadgeProgressBanner */)}</Pressable>;
|
||||
items6[3] = r33;
|
||||
if (value8.length === 0) {
|
||||
if (value7) {
|
||||
r36 = <ScrollView horizontal showsHorizontalScrollIndicator={false} style={styles.carousel} contentContainerStyle={{'gap': 16,
|
||||
|
||||
|
||||
|
||||
'paddingHorizontal': 16}}>{env0_15.map(_fun80452)}</ScrollView>;
|
||||
} else {
|
||||
jsxRuntimeEnv0_14Binding2 = jsxRuntimeEnv0_14;
|
||||
defaultImport6 = importDefault(10397) /* metro dependency 10397 */;
|
||||
var defaultImport6Props = {style: [styles.carousel, value31], data: env0_15};
|
||||
r42 = r10 ? value28 : value29;
|
||||
defaultImport6Props.renderItem = r42;
|
||||
defaultImport6Props.width = width;
|
||||
r42 = property4 != null ? property4 + 2 * (importDefault(697) /* metro dependency 697: native */).space.PX_8 : value;
|
||||
defaultImport6Props.height = r42;
|
||||
defaultImport6Props.onConfigurePanGesture = onConfigurePanGesture;
|
||||
defaultImport6Props.loop = false;
|
||||
defaultImport6Props.scrollAnimationDuration = 200;
|
||||
r42 = r10 ? value37 : value;
|
||||
defaultImport6Props.customAnimation = r42;
|
||||
defaultImport6Props.mode = 'parallax';
|
||||
defaultImport6Props.modeConfig = {'parallaxScrollingScale': 1, 'parallaxScrollingOffset': 40};
|
||||
defaultImport6Props.onSnapToItem = property2;
|
||||
r36 = <>{((Component) => <Component {...defaultImport6Props} />)(defaultImport6)}{((CarouselPagination) => <CarouselPagination numberOfItems={env0_15.length} currentIndex={property} />)((require(1305) /* metro dependency 1305: native */).CarouselPagination)}</>;
|
||||
}
|
||||
r33 = r36;
|
||||
} else if (value === claimableRewards) {
|
||||
r33 = null;
|
||||
} else {
|
||||
if (value7) {
|
||||
r36 = <ScrollView horizontal showsHorizontalScrollIndicator={false} style={styles.carousel} contentContainerStyle={{'gap': 16,
|
||||
|
||||
|
||||
|
||||
'paddingHorizontal': 16}}>{env0_15.map(_fun80452)}</ScrollView>;
|
||||
} else {
|
||||
jsxRuntimeEnv0_14Binding2 = jsxRuntimeEnv0_14;
|
||||
defaultImport6 = importDefault(10397) /* metro dependency 10397 */;
|
||||
var defaultImport6Props = {style: [styles.carousel, value31], data: env0_15};
|
||||
r42 = r10 ? value28 : value29;
|
||||
defaultImport6Props.renderItem = r42;
|
||||
defaultImport6Props.width = width;
|
||||
r42 = property4 != null ? property4 + 2 * (importDefault(697) /* metro dependency 697: native */).space.PX_8 : value;
|
||||
defaultImport6Props.height = r42;
|
||||
defaultImport6Props.onConfigurePanGesture = onConfigurePanGesture;
|
||||
defaultImport6Props.loop = false;
|
||||
defaultImport6Props.scrollAnimationDuration = 200;
|
||||
r42 = r10 ? value37 : value;
|
||||
defaultImport6Props.customAnimation = r42;
|
||||
defaultImport6Props.mode = 'parallax';
|
||||
defaultImport6Props.modeConfig = {'parallaxScrollingScale': 1, 'parallaxScrollingOffset': 40};
|
||||
defaultImport6Props.onSnapToItem = property2;
|
||||
r36 = <>{((Component) => <Component {...defaultImport6Props} />)(defaultImport6)}{((CarouselPagination) => <CarouselPagination numberOfItems={env0_15.length} currentIndex={property} />)((require(1305) /* metro dependency 1305: native */).CarouselPagination)}</>;
|
||||
}
|
||||
r33 = r36;
|
||||
}
|
||||
items6[4] = r33;
|
||||
items2[5] = <ScrollView {...scrollViewBindingProps}><View {...object3}>{items6}</View></ScrollView>;
|
||||
value = <>{items2}</>;
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function _fun80433() { // fn#80433, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10569:3235, offset: 0x01e7b5f2, size: 45 bytes, params: 1, frame: 14
|
||||
const env0_0Binding = env0_0.addListener('state', _fun80434);
|
||||
return _fun80435;
|
||||
}
|
||||
|
||||
function _fun80436() { // fn#80436, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10569:3498, offset: 0x01e7b69a, size: 32 bytes, params: 1, frame: 11
|
||||
env0_10.current = [];
|
||||
env0_9(null);
|
||||
}
|
||||
|
||||
function _fun80437() { // fn#80437, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10569:3555, offset: 0x01e7b6ba, size: 116 bytes, params: 1, frame: 17
|
||||
var Math;
|
||||
var max;
|
||||
var items2;
|
||||
var value3;
|
||||
var Number;
|
||||
let current = env0_10.current;
|
||||
if (current.length >= env1_15.length) {
|
||||
Math = global.Math;
|
||||
max = Math.max;
|
||||
current = env0_10.current;
|
||||
items2 = [];
|
||||
arraySpread(items2, current, 0, undefined);
|
||||
value3 = apply(max, items2, Math, undefined);
|
||||
Number = global.Number;
|
||||
if (!Number.isNaN(value3)) {
|
||||
env0_9(value3);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function _fun80439(a0) { // fn#80439, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10569:3721, offset: 0x01e7b74d, size: 49 bytes, params: 2, frame: 4
|
||||
const value = a1;
|
||||
const env0_0 = a0;
|
||||
const env0_1 = (value !== undefined ? value : {forScreenReader: false}).forScreenReader;
|
||||
return _fun80440;
|
||||
}
|
||||
|
||||
function _fun80444() { // fn#80444, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10569:4365, offset: 0x01e7b931, size: 20 bytes, params: 1, frame: 11
|
||||
return env0_13(env0_14);
|
||||
}
|
||||
|
||||
function _fun80445() { // fn#80445, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10569:4400, offset: 0x01e7b945, size: 20 bytes, params: 1, frame: 11
|
||||
return env0_13('default');
|
||||
}
|
||||
|
||||
function _fun80446() { // fn#80446, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10569:4469, offset: 0x01e7b959, size: 31 bytes, params: 1, frame: 12
|
||||
env0_15.set(env0_8 != null);
|
||||
}
|
||||
|
||||
function PremiumGiftPlanSelectPe() { // fn#80447, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10569:4549, owner: PremiumGiftPlanSelect.pe, offset: 0x01e7b978, size: 171 bytes, params: 1, frame: 20
|
||||
const object4 = {};
|
||||
let value = environment.__proto__;
|
||||
const STANDARD_EASING = (require(1305) /* metro dependency 1305: native */).STANDARD_EASING;
|
||||
object4.easing = STANDARD_EASING;
|
||||
object4.duration = 500;
|
||||
const object5 = {};
|
||||
const timingModule = require(4504) /* metro dependency 4504: timing */;
|
||||
const withTiming = timingModule.withTiming;
|
||||
const value3 = env0_15.get();
|
||||
const value4 = 0;
|
||||
object5.opacity = Reflect.apply(withTiming, timingModule, [value3 ? 1 : value4, object4]);
|
||||
const object6 = {};
|
||||
value = timingModule;
|
||||
object6.translateY = value.withTiming(env0_15.get() ? value4 : 100, object4);
|
||||
object5.transform = [object6];
|
||||
return object5;
|
||||
}
|
||||
|
||||
function _fun80448() { // fn#80448, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10569:4902, offset: 0x01e7ba23, size: 138 bytes, params: 1, frame: 16
|
||||
let value = environment.__proto__;
|
||||
value = importDefault(674) /* metro dependency 674 */;
|
||||
value = value(styles.headerBackgroundColor.color);
|
||||
value = value.alpha(0);
|
||||
value = value.hex();
|
||||
const items2 = [value];
|
||||
value = importDefault(674) /* metro dependency 674 */;
|
||||
value = value(styles.headerBackgroundColor.color);
|
||||
value = value.alpha(1);
|
||||
items2[1] = value.hex();
|
||||
return items2;
|
||||
}
|
||||
|
||||
function PremiumGiftPlanSelectSe(a0, a1) { // fn#80449, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10569:5090, owner: PremiumGiftPlanSelect.Se, offset: 0x01e7baad, size: 174 bytes, params: 3, frame: 20
|
||||
let value = a1 - a0;
|
||||
let Math = global.Math;
|
||||
let max = Math.max;
|
||||
const Math2 = global.Math;
|
||||
const value3 = Reflect.apply(max, Math, [0, Math2.min(1, value)]);
|
||||
Math = global.Math;
|
||||
max = Math.max;
|
||||
const Math3 = global.Math;
|
||||
value = Reflect.apply(max, Math, [0, Math3.min(1, value - (env0_17 - 1))]);
|
||||
const value5 = a0 * env0_16;
|
||||
const value6 = value3 * (env0_18 - 16);
|
||||
value *= env0_19 - env0_18;
|
||||
return {transform: [{translateX: value5 + (16 + value6 + value)}]};
|
||||
}
|
||||
|
||||
function _fun80450(a0, a1) { // fn#80450, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10569:6007, offset: 0x01e7bb5b, size: 51 bytes, params: 3, frame: 13
|
||||
return env0_13(env0_14, {forScreenReader: true})({item: a0, index: a1});
|
||||
}
|
||||
|
||||
function _fun80452(a0, a1) { // fn#80452, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10569:7978, offset: 0x01e7bbb5, size: 62 bytes, params: 3, frame: 13
|
||||
return env0_13(env0_4 ? env0_14 : 'default', {forScreenReader: true})({item: a0, index: a1});
|
||||
}
|
||||
|
||||
function _fun80434() { // fn#80434, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10569:3269, offset: 0x01e7b61f, size: 89 bytes, params: 1, frame: 13
|
||||
let binding = env1_0;
|
||||
const state = binding.getState();
|
||||
const property = state.routes[state.index];
|
||||
binding = env1_7;
|
||||
const name = property.name;
|
||||
const PremiumGiftScreens = (require(10382) /* metro dependency 10382: PremiumGiftModal */).PremiumGiftScreens;
|
||||
const PLAN_SELECT = PremiumGiftScreens.PLAN_SELECT;
|
||||
binding(name === PLAN_SELECT);
|
||||
}
|
||||
|
||||
function _fun80440({item, index}) { // fn#80440, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10569:3767, offset: 0x01e7b77e, size: 303 bytes, params: 2, frame: 24
|
||||
var environment;
|
||||
const env0_0 = item;
|
||||
const value = environment.__proto__.__proto__;
|
||||
const r2 = forScreenReader ? Pressable : View;
|
||||
const r2Props = {accessible: forScreenReader || undefined,
|
||||
accessibilityRole: forScreenReader ? 'button' : undefined, onPress: forScreenReader ? _fun80441 : undefined};
|
||||
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
r2Props.style = {paddingVertical: PX_8};
|
||||
return ((Component) => <Component {...r2Props}>{((Component) => <Component premiumType={item} variant={env0_0} onPress={onPress_80442} style={{height: env1_8 ?? undefined,
|
||||
width: env1_12,
|
||||
alignSelf: env0_0 !== 'default' ? undefined : 'center'}} onLayout={onLayout_80443} claimableRewards={claimableRewards} isSelected={env1_6 === index} key={index} />)(importDefault(10389) /* metro dependency 10389: PremiumGiftFeaturesCard */)}</Component>)(r2);
|
||||
}
|
||||
|
||||
function _fun80441() { // fn#80441, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10569:3877, offset: 0x01e7b8ad, size: 23 bytes, params: 1, frame: 11
|
||||
return env2_3(item);
|
||||
}
|
||||
|
||||
function onLayout_80443({nativeEvent}) { // fn#80443, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10569:4090, offset: 0x01e7b8c4, size: 109 bytes, params: 2, frame: 18
|
||||
var value2;
|
||||
var current;
|
||||
var indexBinding;
|
||||
var Math;
|
||||
const height = nativeEvent.layout.height;
|
||||
if (height > 0) {
|
||||
value2 = environment.__proto__.__proto__;
|
||||
current = env2_10.current;
|
||||
indexBinding = index;
|
||||
Math = global.Math;
|
||||
current[indexBinding] = Math.max(height, env2_10.current[indexBinding] ?? 0);
|
||||
env2_11();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,72 @@
|
||||
/* Metro module 10393; source: modules/premium/native/gifting/PremiumGiftPlanSelectPromotionalBanner.tsx; dependencies: [31, 27, 33, 4501, 697, 7277, 10390, 4589, 5475, 4573, 1244, 10394, 2] */
|
||||
function _fun80489(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#80489, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10579:6, offset: 0x01e7d9f1, size: 211 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
let value = importAll(31) /* metro dependency 31 */;
|
||||
const env0_3 = (require(27) /* metro dependency 27 */).View;
|
||||
const value2 = require(33) /* metro dependency 33 */;
|
||||
const env0_4 = value2.jsx;
|
||||
const env0_5 = value2.jsxs;
|
||||
const env0_6 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(_fun80490);
|
||||
value = value.memo(PremiumGiftPlanSelectPromotionalBanner);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/premium/native/gifting/PremiumGiftPlanSelectPromotionalBanner.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
function _fun80490() { // fn#80490, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10579:172, offset: 0x01e7dac4, size: 272 bytes, params: 1, frame: 15
|
||||
const object = {'minHeight': 60, 'justifyContent': 'center', 'gap': 2};
|
||||
let PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
|
||||
object.paddingTop = PX_12;
|
||||
PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
|
||||
object.paddingBottom = PX_12;
|
||||
const PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
|
||||
object.paddingStart = PX_24;
|
||||
object.paddingEnd = 120;
|
||||
return {gradient: {minHeight: 60}, bannerImage: {'position': 'absolute', 'top': 0, 'left': 0, 'right': 0,
|
||||
'width': '100%', 'aspectRatio': 5}, content: object, heading: {}, subheading: {},
|
||||
logoContainer: {'position': 'absolute', 'top': 0, 'bottom': 0, 'right': 10, 'justifyContent': 'center',
|
||||
'alignItems': 'center'}, logoContainerLargeTilted: {transform: [{rotate: '-7deg'}, {translateY: 8}]},
|
||||
logo: {'width': 95, 'height': 95}, logoLargeTilted: {'width': 120, 'height': 120}};
|
||||
}
|
||||
|
||||
function PremiumGiftPlanSelectPromotionalBanner({giftPlanSelectionCardBannerComponent, claimableRewards, isSelected, onLayout}) { // fn#80491, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10579:733, offset: 0x01e7dbd4, size: 763 bytes, params: 2, frame: 34
|
||||
var r5;
|
||||
var object8;
|
||||
var value;
|
||||
const styles = useStyles();
|
||||
const gradient = giftPlanSelectionCardBannerComponent.gradient;
|
||||
const assetVariant = giftPlanSelectionCardBannerComponent.assetVariant;
|
||||
const GiftPlanSelectionCardBanner_AssetVariant = (require(7277) /* metro dependency 7277: gift_plan_selection_card_banner */).GiftPlanSelectionCardBanner_AssetVariant;
|
||||
const LARGE_TILTED = GiftPlanSelectionCardBanner_AssetVariant.LARGE_TILTED;
|
||||
const value3 = assetVariant === LARGE_TILTED;
|
||||
const value4 = (require(10390) /* metro dependency 10390: MarketingComponentHooks */).useThemeAndReducedMotionAwareAssetUrl(giftPlanSelectionCardBannerComponent.mobileBannerAsset);
|
||||
const value5 = (require(10390) /* metro dependency 10390: MarketingComponentHooks */).useThemeAndReducedMotionAwareAssetUrl(giftPlanSelectionCardBannerComponent.avatarAsset,
|
||||
true);
|
||||
const defaultImport = importDefault(4589) /* metro dependency 4589 */;
|
||||
const defaultImportProps2 = {style: styles.gradient, useAngle: true, angle: gradient?.angle ?? 90,
|
||||
angleCenter: {'x': 0.5, 'y': 0.5}, colors: gradient?.colors ?? [], onLayout: onLayout};
|
||||
const items2 = [value4 != null && ((Component) => <Component style={styles.bannerImage} resizeMode="cover" source={{uri: value4}} />)(importDefault(5475) /* metro dependency 5475: FastImage */)];
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const string = intl.string;
|
||||
const OEtqpm = (require(1244) /* metro dependency 1244: indexNative */).t.OEtqpm;
|
||||
items2[1] = <View style={styles.content}><Text style={styles.heading} variant="text-md/bold" color="white">{Reflect.apply(string,
|
||||
intl,
|
||||
[OEtqpm])}</Text><Text style={styles.subheading} variant="text-md/medium" color="white">{intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t['2h5M+X'],
|
||||
{availableCount: claimableRewards.length})}</Text></View>;
|
||||
const value10 = value5 != null;
|
||||
if (value10) {
|
||||
var viewProps = {style: [styles.logoContainer, value3 && styles.logoContainerLargeTilted]};
|
||||
value = importDefault(10394) /* metro dependency 10394: PremiumFeaturesPromotionalLogo */;
|
||||
value = <View {...viewProps}>{((Component) => <Component shouldAnimate={isSelected} promoRotatingStyle={[styles.logo,
|
||||
|
||||
value3 && styles.logoLargeTilted]} rotatingAvatarImageUrl={value5} />)(value)}</View>;
|
||||
r5 = value;
|
||||
} else {
|
||||
r5 = value10;
|
||||
}
|
||||
items2[2] = r5;
|
||||
return ((Component) => <Component {...defaultImportProps2}>{items2}</Component>)(defaultImport);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,372 @@
|
||||
/* Metro module 10461; source: modules/premium/native/gifting/PremiumGiftPurchaseButton.tsx; dependencies: [31, 27, 7670, 5126, 1902, 1878, 7261, 661, 33, 4501, 697, 5463, 8483, 1901, 1305, 4573, 1244, 4589, 10462, 1484, 7669, 566, 7355, 7583, 7278, 10392, 7633, 7635, 7294, 10382, 8461, 10390, 5475, 8341, 9646, 10396, 6789, 6766, 1948, 4578, 4015, 2] */
|
||||
function _fun80964(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#80964, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10647:6, offset: 0x01e91df0, size: 350 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importAll(31) /* metro dependency 31 */;
|
||||
let value = require(27) /* metro dependency 27 */;
|
||||
const env0_4 = value.StyleSheet;
|
||||
const env0_5 = value.View;
|
||||
const badgeDirectoryStore = importDefault(7670) /* metro dependency 7670: BadgeDirectoryStore */;
|
||||
const env0_7 = (require(5126) /* metro dependency 5126: AvatarDecorationRecord */).isAvatarDecorationRecord;
|
||||
const env0_8 = (require(1902) /* metro dependency 1902: NameplateRecord */).isNameplateRecord;
|
||||
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
|
||||
const promotionsStore = importDefault(7261) /* metro dependency 7261: PromotionsStore */;
|
||||
const env0_11 = (require(661) /* metro dependency 661: Constants */).HelpdeskArticles;
|
||||
value = require(33) /* metro dependency 33 */;
|
||||
const env0_12 = value.jsx;
|
||||
const env0_13 = value.Fragment;
|
||||
const env0_14 = value.jsxs;
|
||||
const env0_15 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(_fun80966);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/premium/native/gifting/PremiumGiftPurchaseButton.tsx');
|
||||
exports.default = PremiumGiftPurchaseButton;
|
||||
}
|
||||
|
||||
function RewardPreview({collectiblesItem, currentUser, gradientColors, gradientAngle}) { // fn#80965, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10647:1685, offset: 0x01e91f4e, size: 791 bytes, params: 2, frame: 28
|
||||
var r0;
|
||||
var isAvatarDecorationRecord2;
|
||||
var value2;
|
||||
var jsxRuntimeEnv0_13Binding;
|
||||
var items3;
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
var items2;
|
||||
var Avatar;
|
||||
const styles = useStyles((importDefault(5463) /* metro dependency 5463: useSafeAreaInsetsKeyboardAwareNative */)().insets.bottom);
|
||||
if (isNameplateRecord(collectiblesItem)) {
|
||||
jsxRuntimeEnv0_13Binding = jsxRuntimeEnv0_13;
|
||||
items2 = [<View style={styles.nameplateWrapper}>{((Component) => <Component nameplate={(require(1901) /* metro dependency 1901: utils */).getNameplateData(collectiblesItem)} fullOpacity animate />)(importDefault(8483) /* metro dependency 8483: Nameplate */)}</View>];
|
||||
var viewBindingProps2 = {style: styles.singleAvatarContainer};
|
||||
Avatar = (require(1305) /* metro dependency 1305: native */).Avatar;
|
||||
var avatarProps = {user: currentUser, guildId: undefined,
|
||||
size: (require(1305) /* metro dependency 1305: native */).AvatarSizes.SMALL};
|
||||
avatarProps['aria-hidden'] = true;
|
||||
items2[1] = <View {...viewBindingProps2}><Avatar {...avatarProps} /></View>;
|
||||
items2[2] = <Text style={styles.selectedRewardText} variant="text-xs/medium">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.Rh4oem)}</Text>;
|
||||
r0 = <>{items2}</>;
|
||||
} else {
|
||||
isAvatarDecorationRecord2 = isAvatarDecorationRecord(collectiblesItem);
|
||||
value2 = null;
|
||||
if (isAvatarDecorationRecord2) {
|
||||
jsxRuntimeEnv0_13Binding = jsxRuntimeEnv0_13;
|
||||
items3 = [((Component) => <Component style={styles.selectedRewardBannerGradient} useAngle angle={value2 != gradientAngle ? gradientAngle : 90} angleCenter={{'x': 0.5,
|
||||
|
||||
|
||||
'y': 0.5}} colors={gradientColors} />)(importDefault(4589) /* metro dependency 4589 */)];
|
||||
items3[1] = <View style={styles.singleAvatarContainer}>{((Component) => <Component size={(require(1305) /* metro dependency 1305: native */).AvatarSizes.NORMAL} asset={collectiblesItem.asset} />)(importDefault(10462) /* metro dependency 10462: GiftingRewardPreviewAvatar */)}</View>;
|
||||
items3[2] = <Text style={styles.selectedRewardText} variant="text-xs/medium" color="white">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.Rh4oem)}</Text>;
|
||||
r0 = <>{items3}</>;
|
||||
} else {
|
||||
r0 = value2;
|
||||
}
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function _fun80966(a0) { // fn#80966, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10647:324, offset: 0x01e92265, size: 753 bytes, params: 2, frame: 21
|
||||
const object4 = {};
|
||||
const object5 = {};
|
||||
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
|
||||
object5.backgroundColor = BACKGROUND_BASE_LOW;
|
||||
let PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
|
||||
object5.paddingTop = PX_12;
|
||||
PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
|
||||
object5.paddingBottom = PX_12 + a0;
|
||||
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object5.paddingHorizontal = PX_16;
|
||||
let PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
object5.gap = PX_8;
|
||||
const SHADOW_TOP_HIGH = (importDefault(697) /* metro dependency 697: native */).shadows.SHADOW_TOP_HIGH;
|
||||
copyDataProperties(object5, SHADOW_TOP_HIGH, undefined);
|
||||
object4.container = object5;
|
||||
object4.chooseRewardContainer = {'flexDirection': 'row', 'alignItems': 'center', 'height': 52};
|
||||
const object6 = {};
|
||||
copyDataProperties(object6, StyleSheet.absoluteFillObject, undefined);
|
||||
object6['borderRadius'] = (importDefault(697) /* metro dependency 697: native */).radii.sm;
|
||||
object6['overflow'] = 'hidden';
|
||||
object4.gradientBackdrop = object6;
|
||||
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
object4.chooseRewardText = {flex: 1, marginStart: PX_8};
|
||||
object4.backgroundImage = {'position': 'absolute', 'top': 0, 'left': 0, 'right': 0, 'bottom': 0, 'opacity': 1};
|
||||
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
object4.inAppFlowImage = {'width': 58, 'height': 58, marginStart: PX_8};
|
||||
object4.inAppFlowImageLargeTilted = {'width': 86, 'height': 86, transform: [{rotate: '-4deg'}, {translateY: -11}]};
|
||||
object4.singleAvatarContainer = {'flexDirection': 'row', 'paddingRight': 15, 'justifyContent': 'center',
|
||||
'alignItems': 'center', 'marginLeft': 5};
|
||||
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object4.selectedRewardRow = {'flexDirection': 'row', 'alignItems': 'center', gap: PX_16};
|
||||
object4.selectedRewardBannerContainer = {'flex': 1, 'flexDirection': 'row', 'alignItems': 'center', 'height': 52};
|
||||
const object7 = {};
|
||||
copyDataProperties(object7, StyleSheet.absoluteFillObject, -11);
|
||||
object7['borderRadius'] = (importDefault(697) /* metro dependency 697: native */).radii.sm;
|
||||
let PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
|
||||
object7['top'] = PX_4;
|
||||
PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
|
||||
object7['bottom'] = PX_4;
|
||||
PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
|
||||
object7['start'] = PX_4;
|
||||
PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
|
||||
object7['end'] = PX_4;
|
||||
PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
|
||||
object7['marginStart'] = PX_12;
|
||||
object4.selectedRewardBannerGradient = object7;
|
||||
object4.selectedRewardText = {flex: 1};
|
||||
const object8 = {'position': 'absolute', 'left': 0, 'right': 0, 'top': 0, 'bottom': 0, 'borderRadius': null,
|
||||
'overflow': 'hidden'};
|
||||
object8.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
|
||||
object4.nameplateWrapper = object8;
|
||||
return object4;
|
||||
}
|
||||
|
||||
function PremiumGiftPurchaseButton({defaultSelection}) { // fn#80967, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10647:2712, offset: 0x01e92556, size: 2182 bytes, params: 2, frame: 43
|
||||
var r30;
|
||||
var r18;
|
||||
var r7;
|
||||
var String;
|
||||
var BACKGROUND_BRAND;
|
||||
var items2;
|
||||
const IconButton = (require(8341) /* metro dependency 8341: IconButtonNative */).IconButton;
|
||||
var items3;
|
||||
var items4;
|
||||
var TextWithIOSLinkWorkaround;
|
||||
var format;
|
||||
var hYoGUM;
|
||||
var defaultImport5;
|
||||
const styles = useStyles((importDefault(5463) /* metro dependency 5463: useSafeAreaInsetsKeyboardAwareNative */)().insets.bottom);
|
||||
const env0_1 = (require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation();
|
||||
const value3 = (require(7669) /* metro dependency 7669: NativeGiftContext */).useNativeGiftContext();
|
||||
const env0_2 = value3.onPurchase;
|
||||
const isPurchasing = value3.isPurchasing;
|
||||
const productId = value3.productId;
|
||||
const env0_3 = value3.allRewards;
|
||||
const claimableRewards = value3.claimableRewards;
|
||||
const selectedGiftingPromotionReward = value3.selectedGiftingPromotionReward;
|
||||
const setSelectedGiftingPromotionReward = value3.setSelectedGiftingPromotionReward;
|
||||
const env0_7 = value3.setCurrentAnalyticsStep;
|
||||
const fluxModule = require(566) /* metro dependency 566: flux */;
|
||||
const useStateFromStores = fluxModule.useStateFromStores;
|
||||
let items = [UserStore];
|
||||
const currentUser = Reflect.apply(useStateFromStores, fluxModule, [items, function() {
|
||||
return UserStore.getCurrentUser();
|
||||
}]);
|
||||
const value4 = (require(7355) /* metro dependency 7355: IAPUtils */).useCanPurchaseIAP(productId);
|
||||
const value5 = fluxModule.useStateFromStores([PromotionsStore], _fun80969);
|
||||
const assetVariant = value5?.assetVariant;
|
||||
const GiftCustomizationBanner_AssetVariant = (require(7278) /* metro dependency 7278: gift_customization_banner */).GiftCustomizationBanner_AssetVariant;
|
||||
const LARGE_TILTED = GiftCustomizationBanner_AssetVariant.LARGE_TILTED;
|
||||
const value7 = assetVariant === LARGE_TILTED;
|
||||
const r14 = claimableRewards != null && claimableRewards.length > 0;
|
||||
const r19 = claimableRewards != null && claimableRewards.length === 1;
|
||||
const value12 = (importDefault(10392) /* metro dependency 10392: useShouldShowGiftingPromotionDeco */)();
|
||||
let r6 = value12 && selectedGiftingPromotionReward == null;
|
||||
const GiftingBadgeExperiment = (require(7633) /* metro dependency 7633: GiftingBadgeExperiment */).GiftingBadgeExperiment;
|
||||
const useConfig = GiftingBadgeExperiment.useConfig;
|
||||
const enabled = Reflect.apply(useConfig, GiftingBadgeExperiment, [{location: 'PremiumGiftPurchaseButton'}]).enabled;
|
||||
const {nextTier, giftsToNextTier} = fluxModule.useStateFromStoresObject([BadgeDirectoryStore], function() {
|
||||
var object = {};
|
||||
object.nextTier = BadgeDirectoryStore.getNextTier(require(dependencyMap[27]).BadgeId.GIFTING);
|
||||
object.giftsToNextTier = BadgeDirectoryStore.getRemainingToNextTier(require(dependencyMap[27]).BadgeId.GIFTING);
|
||||
return object;
|
||||
});
|
||||
env0_3.useEffect(_fun80973, [r19, claimableRewards, setSelectedGiftingPromotionReward]);
|
||||
let colors = value5 == null || value5.gradient == null ? undefined : value5.gradient.colors;
|
||||
const r26 = colors ?? [];
|
||||
if (r26.length > 0) {
|
||||
r30 = r26;
|
||||
} else {
|
||||
String = global.String;
|
||||
colors = (importDefault(697) /* metro dependency 697: native */).colors;
|
||||
BACKGROUND_BRAND = colors.BACKGROUND_BRAND;
|
||||
items = [String(BACKGROUND_BRAND)];
|
||||
String = global.String;
|
||||
colors = (importDefault(697) /* metro dependency 697: native */).colors;
|
||||
BACKGROUND_BRAND = colors.BACKGROUND_BRAND;
|
||||
items[1] = String(BACKGROUND_BRAND);
|
||||
r30 = items;
|
||||
}
|
||||
const useFetchCollectiblesProductModule = require(8461) /* metro dependency 8461: useFetchCollectiblesProduct */;
|
||||
const useFetchCollectiblesProduct = useFetchCollectiblesProductModule.useFetchCollectiblesProduct;
|
||||
const product = Reflect.apply(useFetchCollectiblesProduct, useFetchCollectiblesProductModule,
|
||||
[selectedGiftingPromotionReward]).product;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const string = intl.string;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
const r11 = r6 ? Reflect.apply(string, intl, [t['gNZY/B']]) : Reflect.apply(string, intl, [t.ouo4FK]);
|
||||
const r12 = r6 ? 'primary' : 'active';
|
||||
const value20 = (require(10390) /* metro dependency 10390: MarketingComponentHooks */).useThemeAndReducedMotionAwareAssetUrl(value5?.mobileBackgroundAsset);
|
||||
const value21 = (require(10390) /* metro dependency 10390: MarketingComponentHooks */).useThemeAndReducedMotionAwareAssetUrl(value5?.asset);
|
||||
const r32 = product == null ? undefined : product.items[0];
|
||||
if (r6) {
|
||||
if (r14) {
|
||||
var viewBinding4Props = {style: styles.chooseRewardContainer};
|
||||
var viewBinding5Props = {style: styles.gradientBackdrop, pointerEvents: 'none'};
|
||||
items3 = [((Component) => <Component style={StyleSheet.absoluteFillObject} useAngle angle={(value5 == null || value5.gradient == null ? undefined : value5.gradient.angle) ?? 90} angleCenter={{'x': 0.5,
|
||||
|
||||
|
||||
'y': 0.5}} colors={r26} />)(importDefault(4589) /* metro dependency 4589 */)];
|
||||
items3[1] = value20 != null && ((Component) => <Component style={styles.backgroundImage} resizeMode="cover" source={{uri: value20}} />)(importDefault(5475) /* metro dependency 5475: FastImage */);
|
||||
items4 = [<View {...viewBinding5Props}>{items3}</View>];
|
||||
items4[1] = value21 != null && ((Component) => <Component style={[styles.inAppFlowImage,
|
||||
value7 && styles.inAppFlowImageLargeTilted]} resizeMode="contain" source={{uri: value21}} />)(importDefault(5475) /* metro dependency 5475: FastImage */);
|
||||
items4[2] = ((Text) => <Text style={styles.chooseRewardText} variant="text-xs/semibold" color="white">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.cMiNit)}</Text>)((require(4573) /* metro dependency 4573: Text */).Text);
|
||||
r7 = <View {...viewBinding4Props}>{items4}</View>;
|
||||
} else if (r32 == null) {
|
||||
r7 = enabled && nextTier != null ? ((Component) => <Component giftsToNextTier={giftsToNextTier} nextTierName={nextTier.name ?? ''} nextTierIcon={nextTier.simple_icon_url} analyticsLocation={(importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).PREMIUM_GIFT_CUSTOMIZATION} />)(importDefault(10396) /* metro dependency 10396: GiftingBadgeProgressBanner */) : null;
|
||||
} else if (value12) {
|
||||
if (selectedGiftingPromotionReward != null) {
|
||||
var viewBinding2Props = {style: styles.selectedRewardRow};
|
||||
items2 = [<View style={styles.selectedRewardBannerContainer}><RewardPreview collectiblesItem={r32} currentUser={currentUser} gradientColors={r30} gradientAngle={value5 == null || value5.gradient == null ? undefined : value5.gradient.angle} /></View>];
|
||||
if (r19) {
|
||||
r18 = !r19;
|
||||
} else {
|
||||
r18 = <IconButton variant="tertiary" size="sm" icon={((PencilIcon) => <PencilIcon size="sm" />)((require(9646) /* metro dependency 9646: PencilIcon */).PencilIcon)} accessibilityLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.bt75uw)} onPress={function() {
|
||||
navigateToRewardSelection(selectedGiftingPromotionReward);
|
||||
}} />;
|
||||
}
|
||||
items2[1] = r18;
|
||||
r7 = <View {...viewBinding2Props}>{items2}</View>;
|
||||
} else {
|
||||
r7 = enabled && nextTier != null ? ((Component) => <Component giftsToNextTier={giftsToNextTier} nextTierName={nextTier.name ?? ''} nextTierIcon={nextTier.simple_icon_url} analyticsLocation={(importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).PREMIUM_GIFT_CUSTOMIZATION} />)(importDefault(10396) /* metro dependency 10396: GiftingBadgeProgressBanner */) : null;
|
||||
}
|
||||
} else {
|
||||
r7 = enabled && nextTier != null ? ((Component) => <Component giftsToNextTier={giftsToNextTier} nextTierName={nextTier.name ?? ''} nextTierIcon={nextTier.simple_icon_url} analyticsLocation={(importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).PREMIUM_GIFT_CUSTOMIZATION} />)(importDefault(10396) /* metro dependency 10396: GiftingBadgeProgressBanner */) : null;
|
||||
}
|
||||
} else if (r32 == null) {
|
||||
r7 = enabled && nextTier != null ? ((Component) => <Component giftsToNextTier={giftsToNextTier} nextTierName={nextTier.name ?? ''} nextTierIcon={nextTier.simple_icon_url} analyticsLocation={(importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).PREMIUM_GIFT_CUSTOMIZATION} />)(importDefault(10396) /* metro dependency 10396: GiftingBadgeProgressBanner */) : null;
|
||||
} else if (value12) {
|
||||
if (selectedGiftingPromotionReward != null) {
|
||||
var viewBinding2Props = {style: styles.selectedRewardRow};
|
||||
items2 = [<View style={styles.selectedRewardBannerContainer}><RewardPreview collectiblesItem={r32} currentUser={currentUser} gradientColors={r30} gradientAngle={value5 == null || value5.gradient == null ? undefined : value5.gradient.angle} /></View>];
|
||||
if (r19) {
|
||||
r18 = !r19;
|
||||
} else {
|
||||
r18 = <IconButton variant="tertiary" size="sm" icon={((PencilIcon) => <PencilIcon size="sm" />)((require(9646) /* metro dependency 9646: PencilIcon */).PencilIcon)} accessibilityLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.bt75uw)} onPress={onPress_80974} />;
|
||||
}
|
||||
items2[1] = r18;
|
||||
r7 = <View {...viewBinding2Props}>{items2}</View>;
|
||||
} else {
|
||||
r7 = enabled && nextTier != null ? ((Component) => <Component giftsToNextTier={giftsToNextTier} nextTierName={nextTier.name ?? ''} nextTierIcon={nextTier.simple_icon_url} analyticsLocation={(importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).PREMIUM_GIFT_CUSTOMIZATION} />)(importDefault(10396) /* metro dependency 10396: GiftingBadgeProgressBanner */) : null;
|
||||
}
|
||||
} else {
|
||||
r7 = enabled && nextTier != null ? ((Component) => <Component giftsToNextTier={giftsToNextTier} nextTierName={nextTier.name ?? ''} nextTierIcon={nextTier.simple_icon_url} analyticsLocation={(importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).PREMIUM_GIFT_CUSTOMIZATION} />)(importDefault(10396) /* metro dependency 10396: GiftingBadgeProgressBanner */) : null;
|
||||
}
|
||||
if (r6) {
|
||||
r6 = !r6;
|
||||
} else {
|
||||
TextWithIOSLinkWorkaround = (require(6766) /* metro dependency 6766: TextWithIOSLinkWorkaround */).TextWithIOSLinkWorkaround;
|
||||
format = intl.format;
|
||||
hYoGUM = (require(1244) /* metro dependency 1244: indexNative */).t.hYoGUM;
|
||||
defaultImport5 = importDefault(1948) /* metro dependency 1948: HelpdeskUtils */;
|
||||
r6 = <TextWithIOSLinkWorkaround variant="text-sm/normal">{Reflect.apply(format, intl, [hYoGUM,
|
||||
{paidURL: defaultImport5.getArticleURL(HelpdeskArticles.PAID_TERMS)}])}</TextWithIOSLinkWorkaround>;
|
||||
}
|
||||
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
|
||||
return (
|
||||
<View style={styles.container}>
|
||||
{r7}
|
||||
{r6}
|
||||
<Button
|
||||
loading={isPurchasing}
|
||||
variant={r12}
|
||||
text={r11}
|
||||
disabled={value4 ? isPurchasing : !value4}
|
||||
onPress={isPurchasing ? undefined : _fun80975}
|
||||
/>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun80969() { // fn#80969, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10647:3190, offset: 0x01e92ddc, size: 111 bytes, params: 1, frame: 13
|
||||
var giftCustomizationBanner;
|
||||
var properties;
|
||||
let value = environment.__proto__;
|
||||
const getMarketingComponentByType = PromotionsStore.getMarketingComponentByType;
|
||||
const MarketingComponentType = (require(7583) /* metro dependency 7583: MarketingComponentType */).MarketingComponentType;
|
||||
const GIFT_CUSTOMIZATION_BANNER = MarketingComponentType.GIFT_CUSTOMIZATION_BANNER;
|
||||
value = Reflect.apply(getMarketingComponentByType, PromotionsStore, [GIFT_CUSTOMIZATION_BANNER]);
|
||||
const value2 = null;
|
||||
if (value2 == value) {
|
||||
giftCustomizationBanner = value2;
|
||||
} else {
|
||||
properties = value.properties;
|
||||
properties = properties.properties;
|
||||
if (properties.oneofKind !== 'giftCustomizationBanner') {
|
||||
giftCustomizationBanner = value2;
|
||||
} else {
|
||||
properties = value.properties;
|
||||
properties = properties.properties;
|
||||
giftCustomizationBanner = properties.giftCustomizationBanner;
|
||||
}
|
||||
}
|
||||
return giftCustomizationBanner;
|
||||
}
|
||||
|
||||
function navigateToRewardSelection(a0) { // fn#80971, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10647:3909, owner: PremiumGiftPurchaseButton.navigateToRewardSelection, offset: 0x01e92ead, size: 191 bytes, params: 2, frame: 18
|
||||
var environment;
|
||||
var r4;
|
||||
var setCurrentAnalyticsStepBinding;
|
||||
var value3;
|
||||
var binding;
|
||||
var navigate;
|
||||
var REWARD_SELECT;
|
||||
var object2;
|
||||
if (env0_8) {
|
||||
setCurrentAnalyticsStepBinding = setCurrentAnalyticsStep;
|
||||
value3 = environment.__proto__;
|
||||
setCurrentAnalyticsStepBinding((require(7294) /* metro dependency 7294: PremiumAnalyticsUtils */).PaymentFlowStep.REWARD_SKU_SELECT);
|
||||
r4 = a0 ?? defaultSelection;
|
||||
binding = env0_1;
|
||||
navigate = binding.navigate;
|
||||
REWARD_SELECT = (require(10382) /* metro dependency 10382: PremiumGiftModal */).PremiumGiftScreens.REWARD_SELECT;
|
||||
object2 = {defaultHighlightedReward: r4};
|
||||
r4 = allRewards ?? [];
|
||||
object2.allRewards = r4;
|
||||
r4 = claimableRewards ?? [];
|
||||
object2.claimableRewards = r4;
|
||||
object2.onSelect = onSelect_80972;
|
||||
Reflect.apply(navigate, binding, [REWARD_SELECT, object2]);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun80973() { // fn#80973, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10647:4208, offset: 0x01e92fb1, size: 35 bytes, params: 1, frame: 11
|
||||
if (env0_9) {
|
||||
setSelectedGiftingPromotionReward(claimableRewards[0]);
|
||||
}
|
||||
}
|
||||
|
||||
function PremiumGiftPurchaseButtonOnPress() { // fn#80974, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10647:5802, owner: PremiumGiftPurchaseButton.onPress, offset: 0x01e92fd4, size: 20 bytes, params: 1, frame: 11
|
||||
navigateToRewardSelection(selectedGiftingPromotionReward);
|
||||
}
|
||||
|
||||
function _fun80975() { // fn#80975, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10647:6253, offset: 0x01e92fe8, size: 82 bytes, params: 1, frame: 12
|
||||
var environment;
|
||||
const value = environment.__proto__;
|
||||
(require(4015) /* metro dependency 4015: ChatInputUtils */).dismissKeyboard();
|
||||
if (env0_10) {
|
||||
if (env0_8) {
|
||||
navigateToRewardSelection();
|
||||
} else {
|
||||
onPurchase(_fun80976);
|
||||
}
|
||||
} else {
|
||||
onPurchase(_fun80976);
|
||||
}
|
||||
}
|
||||
|
||||
function navigateToRewardSelectionOnSelect(a0) { // fn#80972, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10647:4127, owner: PremiumGiftPurchaseButton.navigateToRewardSelection.onSelect, offset: 0x01e92f6c, size: 69 bytes, params: 2, frame: 14
|
||||
setSelectedGiftingPromotionReward(a0);
|
||||
const binding = env1_1;
|
||||
const navigate = binding.navigate;
|
||||
const PremiumGiftScreens = (require(10382) /* metro dependency 10382: PremiumGiftModal */).PremiumGiftScreens;
|
||||
const CUSTOMIZATION = PremiumGiftScreens.CUSTOMIZATION;
|
||||
Reflect.apply(navigate, binding, [CUSTOMIZATION]);
|
||||
}
|
||||
|
||||
function _fun80976() { // fn#80976, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10647:6321, offset: 0x01e9303a, size: 57 bytes, params: 1, frame: 13
|
||||
const binding = env1_1;
|
||||
const navigate = binding.navigate;
|
||||
const PremiumGiftScreens = (require(10382) /* metro dependency 10382: PremiumGiftModal */).PremiumGiftScreens;
|
||||
const SUCCESS = PremiumGiftScreens.SUCCESS;
|
||||
Reflect.apply(navigate, binding, [SUCCESS]);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,153 @@
|
||||
/* Metro module 10465; source: modules/premium/native/gifting/PremiumGiftPurchaseSuccess.tsx; dependencies: [31, 27, 4279, 1880, 661, 33, 4501, 697, 7669, 1484, 7633, 4129, 10382, 9212, 4578, 1244, 3802, 6797, 3856, 7642, 4573, 8554, 4061, 2] */
|
||||
function _fun80988(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#80988, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10651:6, offset: 0x01e93720, size: 473 bytes, params: 8, frame: 23
|
||||
var object3;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importAll(31) /* metro dependency 31 */;
|
||||
const env0_4 = (require(27) /* metro dependency 27 */).View;
|
||||
const skuStore = importDefault(4279) /* metro dependency 4279: SKUStore */;
|
||||
const env0_6 = (require(1880) /* metro dependency 1880: PremiumConstants */).SubscriptionIntervalTypes;
|
||||
const env0_7 = (require(661) /* metro dependency 661: Constants */).AnalyticsSections;
|
||||
let value = require(33) /* metro dependency 33 */;
|
||||
const env0_8 = value.jsx;
|
||||
const env0_9 = value.Fragment;
|
||||
const env0_10 = value.jsxs;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
object3 = {};
|
||||
const object4 = {};
|
||||
let PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
|
||||
object4.marginTop = PX_4;
|
||||
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object4.marginBottom = PX_16;
|
||||
object3.disclaimer = object4;
|
||||
let PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
|
||||
object3.title = {marginTop: PX_24, textAlign: 'center'};
|
||||
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
object3.description = {marginTop: PX_8, textAlign: 'center'};
|
||||
PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
|
||||
object3.input = {marginTop: PX_24};
|
||||
PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
|
||||
object3.inputLabel = {marginBottom: PX_4};
|
||||
const env0_11 = Reflect.apply(createStyles, value, [object3]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/premium/native/gifting/PremiumGiftPurchaseSuccess.tsx');
|
||||
exports.default = PremiumGiftSuccessBody;
|
||||
exports.PremiumGiftSuccessActions = PremiumGiftSuccessActions;
|
||||
}
|
||||
|
||||
function PremiumGiftSuccessBody({giftCodeRecord}) { // fn#80989, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10651:644, offset: 0x01e938f9, size: 916 bytes, params: 2, frame: 31
|
||||
const styles = useStyles();
|
||||
let {premiumType, planInterval,
|
||||
giftStyle} = (require(7669) /* metro dependency 7669: NativeGiftContext */).useNativeGiftContext();
|
||||
const giftCodeURL = (require(4129) /* metro dependency 4129: GiftCodeUtils */).getGiftCodeURL(giftCodeRecord.code);
|
||||
giftStyle = giftCodeRecord.giftStyle ?? giftStyle;
|
||||
const r4 = giftCodeRecord.subscriptionPlanId ?? (require(3802) /* metro dependency 3802: PremiumUtils */).getPlanIdForPremiumType(premiumType,
|
||||
planInterval);
|
||||
const tierDisplayNameByPlanId = (importDefault(3802) /* metro dependency 3802: PremiumUtils */).getTierDisplayNameByPlanId(r4);
|
||||
const defaultImport2 = importDefault(3802) /* metro dependency 3802: PremiumUtils */;
|
||||
const getInterval = defaultImport2.getInterval;
|
||||
const intervalType = Reflect.apply(getInterval, defaultImport2, [r4]).intervalType;
|
||||
const YEAR = SubscriptionIntervalTypes.YEAR;
|
||||
const value6 = env0_3.useCallback(_fun80990, [giftCodeRecord, giftCodeURL]);
|
||||
const jsxRuntimeEnv0_9Binding = jsxRuntimeEnv0_9;
|
||||
const items2 = [<View>{((Component) => <Component giftStyle={giftStyle} />)(importDefault(7642) /* metro dependency 7642: PremiumGiftBackgroundAnimationAndroid */)}</View>];
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
let string = intl.string;
|
||||
items2[1] = <Text style={styles.title} variant="heading-lg/bold">{Reflect.apply(string, intl,
|
||||
[(require(1244) /* metro dependency 1244: indexNative */).t['/s1xR7']])}</Text>;
|
||||
items2[2] = <Text style={styles.description} variant="text-md/medium">{intl.format(intervalType === YEAR ? (require(1244) /* metro dependency 1244: indexNative */).t.rli5ey : (require(1244) /* metro dependency 1244: indexNative */).t.bUdTqI,
|
||||
{intervalCount: 1, name: tierDisplayNameByPlanId})}</Text>;
|
||||
const text = <Text style={styles.inputLabel} variant="heading-md/bold">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['qS+yMo'])}</Text>;
|
||||
const InputButton = (require(8554) /* metro dependency 8554: native */).InputButton;
|
||||
items2[3] = <View style={styles.input}>{text}<InputButton text={giftCodeURL} icon={importDefault(4061) /* metro dependency 4061 */} iconPosition="end" onPress={value6} /></View>;
|
||||
string = intl.string;
|
||||
const As9eLl = (require(1244) /* metro dependency 1244: indexNative */).t.As9eLl;
|
||||
items2[4] = <Text style={styles.disclaimer} variant="text-xs/normal">{Reflect.apply(string, intl, [As9eLl])}</Text>;
|
||||
return (
|
||||
<>
|
||||
{items2}
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
function PremiumGiftSuccessActions({giftCodeRecord}) { // fn#80991, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10651:1878, offset: 0x01e93d13, size: 460 bytes, params: 2, frame: 25
|
||||
const {onClose,
|
||||
prePurchaseGiftingBadgeProgress} = (require(7669) /* metro dependency 7669: NativeGiftContext */).useNativeGiftContext();
|
||||
const value3 = (require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation();
|
||||
const GiftingBadgeExperiment = (require(7633) /* metro dependency 7633: GiftingBadgeExperiment */).GiftingBadgeExperiment;
|
||||
const useConfig = GiftingBadgeExperiment.useConfig;
|
||||
const enabled = Reflect.apply(useConfig, GiftingBadgeExperiment, [{location: 'PremiumGiftSuccessActions'}]).enabled;
|
||||
const env0_3 = enabled;
|
||||
const giftCodeURL = (require(4129) /* metro dependency 4129: GiftCodeUtils */).getGiftCodeURL(giftCodeRecord.code);
|
||||
const binding = env0_3;
|
||||
const value5 = binding.useCallback(_fun80992, [enabled, prePurchaseGiftingBadgeProgress, value3, onClose]);
|
||||
const value6 = binding.useCallback(_fun80993, [giftCodeURL, enabled, prePurchaseGiftingBadgeProgress, value3]);
|
||||
const jsxRuntimeEnv0_9Binding = jsxRuntimeEnv0_9;
|
||||
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const string = intl.string;
|
||||
const RDE0Sc = (require(1244) /* metro dependency 1244: indexNative */).t.RDE0Sc;
|
||||
return (
|
||||
<>
|
||||
<Button
|
||||
variant="primary"
|
||||
text={Reflect.apply(string, intl, [RDE0Sc])}
|
||||
onPress={value6}
|
||||
/>
|
||||
<Button
|
||||
variant="secondary"
|
||||
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.cpT0Cq)}
|
||||
onPress={value5}
|
||||
/>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun80990() { // fn#80990, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10651:1048, offset: 0x01e93c8d, size: 134 bytes, params: 1, frame: 15
|
||||
var moduleValue;
|
||||
const value = environment.__proto__;
|
||||
const value3 = SKUStore.get(giftCodeRecord.skuId);
|
||||
if (value3 != null) {
|
||||
moduleValue = require(4129) /* metro dependency 4129: GiftCodeUtils */;
|
||||
moduleValue.trackGiftCodeCopy(giftCodeRecord, value3);
|
||||
}
|
||||
(require(6797) /* metro dependency 6797: ClipboardUtilsNative */).copy(env0_1);
|
||||
(require(3856) /* metro dependency 3856: ToastUtils */).presentCopiedToClipboard();
|
||||
}
|
||||
|
||||
function _fun80992() { // fn#80992, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10651:2187, offset: 0x01e93edf, size: 100 bytes, params: 1, frame: 15
|
||||
var binding;
|
||||
var navigate;
|
||||
var value2;
|
||||
if (enabled) {
|
||||
if (prePurchaseGiftingBadgeProgress != null) {
|
||||
binding = env0_2;
|
||||
navigate = binding.navigate;
|
||||
value2 = environment.__proto__;
|
||||
Reflect.apply(navigate, binding,
|
||||
[(require(10382) /* metro dependency 10382: PremiumGiftModal */).PremiumGiftScreens.GIFTING_BADGE,
|
||||
{currentProgress: prePurchaseGiftingBadgeProgress}]);
|
||||
} else {
|
||||
onClose();
|
||||
}
|
||||
} else {
|
||||
onClose();
|
||||
}
|
||||
}
|
||||
|
||||
function _fun80993() { // fn#80993, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10651:2311, offset: 0x01e93f43, size: 141 bytes, params: 1, frame: 16
|
||||
var binding;
|
||||
const showShareActionSheetAndroidModule = require(9212) /* metro dependency 9212: showShareActionSheetAndroid */;
|
||||
const showShareActionSheet = showShareActionSheetAndroidModule.showShareActionSheet;
|
||||
const PREMIUM_GIFT_SUCCESS_MODAL = AnalyticsSections.PREMIUM_GIFT_SUCCESS_MODAL;
|
||||
Reflect.apply(showShareActionSheet, showShareActionSheetAndroidModule, [{url: env0_4}, PREMIUM_GIFT_SUCCESS_MODAL]);
|
||||
if (enabled && prePurchaseGiftingBadgeProgress != null) {
|
||||
binding = env0_2;
|
||||
binding.navigate((require(10382) /* metro dependency 10382: PremiumGiftModal */).PremiumGiftScreens.GIFTING_BADGE,
|
||||
|
||||
{currentProgress: prePurchaseGiftingBadgeProgress});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,85 @@
|
||||
/* Metro module 10463; source: modules/premium/native/gifting/PremiumGiftSuccess.tsx; dependencies: [31, 27, 7261, 1376, 33, 4501, 697, 1585, 7669, 44, 10464, 10392, 7675, 566, 1367, 1365, 10465, 10466, 10467, 2] */
|
||||
function _fun80981(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#80981, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10649:6, offset: 0x01e931f3, size: 253 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importAll(31) /* metro dependency 31 */;
|
||||
const env0_4 = (require(27) /* metro dependency 27 */).View;
|
||||
const promotionsStore = importDefault(7261) /* metro dependency 7261: PromotionsStore */;
|
||||
const env0_6 = (require(1376) /* metro dependency 1376: DismissibleContentConstants */).ContentDismissActionType;
|
||||
const value = require(33) /* metro dependency 33 */;
|
||||
const env0_7 = value.jsx;
|
||||
const env0_8 = value.Fragment;
|
||||
const env0_9 = value.jsxs;
|
||||
const env0_10 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(_fun80982);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/premium/native/gifting/PremiumGiftSuccess.tsx');
|
||||
exports.default = PremiumGiftSuccess;
|
||||
}
|
||||
|
||||
function _fun80982(a0) { // fn#80982, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10649:230, offset: 0x01e932f0, size: 250 bytes, params: 2, frame: 17
|
||||
const object4 = {};
|
||||
const object5 = {'backgroundColor': null, 'paddingHorizontal': null, 'flex': 1, 'alignContent': 'center',
|
||||
'justifyContent': 'center', 'flexGrow': 1};
|
||||
let BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
|
||||
object5.backgroundColor = BACKGROUND_BASE_LOW;
|
||||
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object5.paddingHorizontal = PX_16;
|
||||
object4.bodyContainer = object5;
|
||||
const object6 = {};
|
||||
BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
|
||||
object6.backgroundColor = BACKGROUND_BASE_LOW;
|
||||
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object6.paddingTop = PX_16;
|
||||
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object6.paddingBottom = a0 + PX_16;
|
||||
const PX_162 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object6.paddingHorizontal = PX_162;
|
||||
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
object6.gap = PX_8;
|
||||
const SHADOW_TOP_LOW = (importDefault(697) /* metro dependency 697: native */).shadows.SHADOW_TOP_LOW;
|
||||
copyDataProperties(object6, SHADOW_TOP_LOW, PX_16);
|
||||
object4.actionContainer = object6;
|
||||
return object4;
|
||||
}
|
||||
|
||||
function PremiumGiftSuccess() { // fn#80983, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10649:737, offset: 0x01e933ea, size: 560 bytes, params: 1, frame: 24
|
||||
const styles = useStyles((importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)().bottom);
|
||||
const {recipientUser, giftCodeRecord,
|
||||
selectedGiftingPromotionReward} = (require(7669) /* metro dependency 7669: NativeGiftContext */).useNativeGiftContext();
|
||||
(importDefault(44) /* metro dependency 44 */)(giftCodeRecord != null,
|
||||
'Gift code record cannot be null on success screen');
|
||||
const value3 = (importDefault(10464) /* metro dependency 10464: useGiftingPromotionConfig */)();
|
||||
const value4 = (importDefault(10392) /* metro dependency 10392: useShouldShowGiftingPromotionDeco */)();
|
||||
const value5 = (require(7675) /* metro dependency 7675: useFetchCollectiblesCategoriesAndPurchases */).useGetOrFetchPurchase(selectedGiftingPromotionReward,
|
||||
false);
|
||||
env0_3.useEffect(_fun80985, [value4, value3,
|
||||
(require(566) /* metro dependency 566: flux */).useStateFromStores([PromotionsStore], _fun80984)]);
|
||||
return (
|
||||
<>
|
||||
<View style={styles.bodyContainer}>
|
||||
{recipientUser == null ? ((Component) => <Component giftCodeRecord={giftCodeRecord} />)(importDefault(10465) /* metro dependency 10465: PremiumGiftPurchaseSuccess */) : ((Component) => <Component />)(importDefault(10466) /* metro dependency 10466: PremiumGiftDMPurchaseSuccess */)}
|
||||
</View>
|
||||
<View style={styles.actionContainer}>
|
||||
{value5 != null ? ((Component) => <Component purchase={value5} />)(importDefault(10467) /* metro dependency 10467: PremiumGiftingPromotionSuccessActions */) : recipientUser == null ? ((PremiumGiftSuccessActions) => <PremiumGiftSuccessActions giftCodeRecord={giftCodeRecord} />)((require(10465) /* metro dependency 10465: PremiumGiftPurchaseSuccess */).PremiumGiftSuccessActions) : ((PremiumGiftDMSuccessActions) => <PremiumGiftDMSuccessActions />)((require(10466) /* metro dependency 10466: PremiumGiftDMPurchaseSuccess */).PremiumGiftDMSuccessActions)}
|
||||
</View>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun80984() { // fn#80984, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10649:1075, offset: 0x01e9361a, size: 35 bytes, params: 1, frame: 10
|
||||
const value = environment.__proto__;
|
||||
return PromotionsStore.getGiftPromotion()?.id;
|
||||
}
|
||||
|
||||
function _fun80985() { // fn#80985, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10649:1152, offset: 0x01e9363d, size: 140 bytes, params: 1, frame: 18
|
||||
var value5;
|
||||
var moduleValue;
|
||||
if (env0_0 != null && env0_0.reminderNotice != null && env0_1 && env0_2 != null) {
|
||||
value5 = environment.__proto__;
|
||||
moduleValue = require(1367) /* metro dependency 1367: DismissibleContentUtils */;
|
||||
moduleValue.markSnowflakeBoundDismissibleContentAsDismissed((require(1365) /* metro dependency 1365: dismissible_content */).DismissibleContent.GIFTING_PROMOTION_REMINDER,
|
||||
|
||||
env0_2, {dismissAction: ContentDismissActionType.INDIRECT_ACTION});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,351 @@
|
||||
/* Metro module 10431; source: modules/premium/native/gifting/PremiumGiftWishlistBanner.tsx; dependencies: [5, 31, 27, 6830, 1880, 661, 663, 8516, 33, 697, 4501, 10020, 10034, 10432, 10344, 10436, 6771, 6789, 683, 8743, 10384, 10437, 4008, 3857, 1244, 5120, 7631, 3995, 4573, 10450, 10454, 2] */
|
||||
function _fun80690(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#80690, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10617:6, offset: 0x01e86586, size: 410 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(5) /* metro dependency 5 */;
|
||||
const env0_4 = importAll(31) /* metro dependency 31 */;
|
||||
let value = require(27) /* metro dependency 27 */;
|
||||
const env0_5 = value.ScrollView;
|
||||
const env0_6 = value.View;
|
||||
const env0_7 = (require(6830) /* metro dependency 6830: WishlistRecommendationRecord */).WishlistRecommendationReason;
|
||||
value = require(1880) /* metro dependency 1880: PremiumConstants */;
|
||||
const env0_8 = value.GiftingOrigin;
|
||||
const env0_9 = value.PremiumSubscriptionSKUToPremiumType;
|
||||
value = require(661) /* metro dependency 661: Constants */;
|
||||
const env0_10 = value.AnalyticEvents;
|
||||
const env0_11 = value.SKUProductLines;
|
||||
const env0_12 = (require(663) /* metro dependency 663: CollectiblesShopConstants */).CollectiblesMobileShopScreen;
|
||||
const env0_13 = (require(8516) /* metro dependency 8516: Constants */).UserProfileSections;
|
||||
value = require(33) /* metro dependency 33 */;
|
||||
const env0_14 = value.jsx;
|
||||
const env0_15 = value.jsxs;
|
||||
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
const env0_18 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(_fun80691);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/premium/native/gifting/PremiumGiftWishlistBanner.tsx');
|
||||
exports.PremiumGiftWishlistBanner = PremiumGiftWishlistBanner;
|
||||
}
|
||||
|
||||
function _fun80691(a0, a1) { // fn#80691, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10617:475, offset: 0x01e86720, size: 280 bytes, params: 3, frame: 20
|
||||
const object2 = {};
|
||||
const PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
|
||||
object2.title = {marginBottom: PX_4, paddingHorizontal: PX_16};
|
||||
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
|
||||
object2.subtitle = {marginBottom: PX_12, paddingHorizontal: PX_16};
|
||||
object2.placeholderRow = {flexDirection: 'row', gap: PX_16, paddingHorizontal: PX_16};
|
||||
const object3 = {width: a0, height: a1};
|
||||
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
|
||||
const BACKGROUND_SECONDARY_ALT = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SECONDARY_ALT;
|
||||
object3.backgroundColor = BACKGROUND_SECONDARY_ALT;
|
||||
object2.placeholder = object3;
|
||||
const object4 = {width: a0, height: a1};
|
||||
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
|
||||
const BG_SURFACE_RAISED = (importDefault(697) /* metro dependency 697: native */).colors.BG_SURFACE_RAISED;
|
||||
object4.backgroundColor = BG_SURFACE_RAISED;
|
||||
const SHADOW_LOW = (importDefault(697) /* metro dependency 697: native */).shadows.SHADOW_LOW;
|
||||
copyDataProperties(object4, SHADOW_LOW, 'row');
|
||||
object2.wishlistItemShadow = object4;
|
||||
return object2;
|
||||
}
|
||||
|
||||
function PremiumGiftWishlistBanner({giftRecipient}) { // fn#80692, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10617:1069, offset: 0x01e86838, size: 1233 bytes, params: 2, frame: 37
|
||||
var r12;
|
||||
var object6;
|
||||
var object2;
|
||||
var items7;
|
||||
var value17;
|
||||
var Array;
|
||||
const object3 = {};
|
||||
const COLLECTIBLES_SHOP_CARD_WIDTH = (require(10020) /* metro dependency 10020: CollectiblesShopCardV2 */).COLLECTIBLES_SHOP_CARD_WIDTH;
|
||||
object3.width = COLLECTIBLES_SHOP_CARD_WIDTH;
|
||||
const COLLECTIBLES_SHOP_CARD_HEIGHT = (require(10020) /* metro dependency 10020: CollectiblesShopCardV2 */).COLLECTIBLES_SHOP_CARD_HEIGHT;
|
||||
object3.height = COLLECTIBLES_SHOP_CARD_HEIGHT;
|
||||
const WISHLIST_IN_DM_LENGTH_MOBILE = (require(10034) /* metro dependency 10034: useWishlistHooks */).WISHLIST_IN_DM_LENGTH_MOBILE;
|
||||
const value2 = (require(10432) /* metro dependency 10432: useWishlistRecommendations */).useWishlistRecommendationsForSingleUser({userId: giftRecipient.id,
|
||||
numItems: WISHLIST_IN_DM_LENGTH_MOBILE});
|
||||
const wishlistAndRecommendations = value2.wishlistAndRecommendations;
|
||||
const skusToUserAndReason = value2.skusToUserAndReason;
|
||||
const env0_4 = skusToUserAndReason;
|
||||
const status = value2.status;
|
||||
const totalUnownedWishlistItemCount = value2.totalUnownedWishlistItemCount;
|
||||
const defaultWishlistId = value2.defaultWishlistId;
|
||||
const binding = env0_4;
|
||||
const value3 = binding.useMemo(_fun80693, [wishlistAndRecommendations, giftRecipient.id, skusToUserAndReason]);
|
||||
const value4 = binding.useMemo(_fun80696, [totalUnownedWishlistItemCount, WISHLIST_IN_DM_LENGTH_MOBILE, value3]);
|
||||
const defaultImport = importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */;
|
||||
const WISHLIST_BANNER = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).WISHLIST_BANNER;
|
||||
const analyticsLocations = defaultImport(WISHLIST_BANNER).analyticsLocations;
|
||||
const env0_10 = binding.useRef(false);
|
||||
binding.useEffect(_fun80697, [status, value3, giftRecipient.id, analyticsLocations]);
|
||||
const value5 = binding.useCallback(function() {
|
||||
importDefault(dependencyMap[19])({userId: giftRecipient.id, initialSection: UserProfileSections.WISHLIST,
|
||||
sourceAnalyticsLocations: analyticsLocations});
|
||||
}, [giftRecipient.id, analyticsLocations]);
|
||||
const env0_12 = binding.useCallback(_fun80701(), [giftRecipient, defaultWishlistId,
|
||||
(require(10384) /* metro dependency 10384: useSelectPremiumGift */).useSelectPremiumGift('PremiumGiftWishlistBanner')]);
|
||||
const name = (importDefault(3995) /* metro dependency 3995: UserUtils */).getName(giftRecipient);
|
||||
const BANNER_CONFIG_MOBILE = (require(10436) /* metro dependency 10436: WishlistBannerUtils */).BANNER_CONFIG_MOBILE;
|
||||
const property = BANNER_CONFIG_MOBILE[value4];
|
||||
const title = property.title;
|
||||
const subtitle = property.getSubtitle(name);
|
||||
const styles = useStyles(COLLECTIBLES_SHOP_CARD_WIDTH, COLLECTIBLES_SHOP_CARD_HEIGHT);
|
||||
if (status === 'error') {
|
||||
return null;
|
||||
}
|
||||
let r5 = status === 'loading' || value3.length === 0;
|
||||
const value12 = totalUnownedWishlistItemCount > WISHLIST_IN_DM_LENGTH_MOBILE;
|
||||
const r16 = value12 ? value3.slice(0, WISHLIST_IN_DM_LENGTH_MOBILE - 1) : value3;
|
||||
const r25 = value12 ? value3[WISHLIST_IN_DM_LENGTH_MOBILE - 1] : null;
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
const items6 = [<Text style={styles.title} variant="text-lg/semibold">{title}</Text>];
|
||||
items6[1] = <Text style={styles.subtitle} variant="text-sm/medium" color="text-muted">{subtitle}</Text>;
|
||||
if (r5) {
|
||||
Array = global.Array;
|
||||
r5 = <View style={styles.placeholderRow}>{Array.from({length: WISHLIST_IN_DM_LENGTH_MOBILE}, _fun80705)}</View>;
|
||||
} else {
|
||||
var scrollViewProps = {'horizontal': true, 'showsHorizontalScrollIndicator': false, 'snapToInterval': null,
|
||||
'snapToAlignment': 'start', 'decelerationRate': 'fast', 'nestedScrollEnabled': true,
|
||||
snapToInterval: COLLECTIBLES_SHOP_CARD_WIDTH + PX_16};
|
||||
object2 = {gap: PX_16};
|
||||
object2.paddingHorizontal = PX_16;
|
||||
object2.paddingVertical = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
scrollViewProps.contentContainerStyle = object2;
|
||||
items7 = [r16.map(_fun80706)];
|
||||
value17 = r25 != null;
|
||||
if (value17) {
|
||||
var viewBinding2Props = {style: styles.wishlistItemShadow};
|
||||
if (value12) {
|
||||
viewBinding2Props.children = ((Component) => <Component item={r25.item} size={object3} recipientName={name} overflowCount={totalUnownedWishlistItemCount - WISHLIST_IN_DM_LENGTH_MOBILE + 1} onPress={value5} />)(importDefault(10454) /* metro dependency 10454: WishlistViewMoreCard */);
|
||||
} else {
|
||||
viewBinding2Props.children = ((Component) => <Component item={r25.item} size={object3} source={r25.source} recipientName={name} onPress={onPress_80708} />)(importDefault(10450) /* metro dependency 10450: WishlistItemCard */);
|
||||
}
|
||||
r12 = <View {...viewBinding2Props} />;
|
||||
} else {
|
||||
r12 = value17;
|
||||
}
|
||||
items7[1] = r12;
|
||||
r5 = <ScrollView {...scrollViewProps}>{items7}</ScrollView>;
|
||||
}
|
||||
items6[2] = r5;
|
||||
return (
|
||||
<View>
|
||||
{items6}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun80693() { // fn#80693, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10617:1473, offset: 0x01e86d09, size: 45 bytes, params: 1, frame: 12
|
||||
return wishlistAndRecommendations.map(_fun80694).filter(function(a0) {
|
||||
return a0.item != null;
|
||||
});
|
||||
}
|
||||
|
||||
function _fun80696() { // fn#80696, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10617:1704, offset: 0x01e86df9, size: 70 bytes, params: 1, frame: 13
|
||||
const value = environment.__proto__;
|
||||
return (require(10436) /* metro dependency 10436: WishlistBannerUtils */).getBannerModeFromDisplayItems({totalUnownedWishlistItemCount: totalUnownedWishlistItemCount,
|
||||
wishlistInDmLength: WISHLIST_IN_DM_LENGTH_MOBILE, displayItems: env0_8});
|
||||
}
|
||||
|
||||
function _fun80697() { // fn#80697, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10617:1914, offset: 0x01e86e3f, size: 239 bytes, params: 1, frame: 20
|
||||
var environment;
|
||||
var value5;
|
||||
var defaultImport;
|
||||
var track;
|
||||
var IMPRESSION_GIFT_OPTION_WISHLIST_BANNER_VIEWED;
|
||||
var object2;
|
||||
var binding;
|
||||
var Array;
|
||||
var from;
|
||||
var Set;
|
||||
var value6;
|
||||
var value7;
|
||||
var set;
|
||||
if (!env0_10.current && status === 'success' && env0_8.length > 0) {
|
||||
value5 = environment.__proto__;
|
||||
defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
|
||||
track = defaultImport.track;
|
||||
IMPRESSION_GIFT_OPTION_WISHLIST_BANNER_VIEWED = AnalyticEvents.IMPRESSION_GIFT_OPTION_WISHLIST_BANNER_VIEWED;
|
||||
object2 = {};
|
||||
object2.gift_recipient_id = giftRecipient.id;
|
||||
binding = env0_8;
|
||||
object2.sku_ids = binding.map(function(a0) {
|
||||
return a0.item.skuId;
|
||||
});
|
||||
object2.location_stack = analyticsLocations;
|
||||
Array = global.Array;
|
||||
from = Array.from;
|
||||
Set = global.Set;
|
||||
value6 = binding.map(_fun80699);
|
||||
value7 = Object.create(Set.prototype, {constructor: {value: Set}});
|
||||
set = new Set();
|
||||
object2.product_lines = Reflect.apply(from, Array, [set instanceof Object ? set : value7]);
|
||||
Reflect.apply(track, defaultImport, [IMPRESSION_GIFT_OPTION_WISHLIST_BANNER_VIEWED, object2]);
|
||||
env0_10.current = true;
|
||||
}
|
||||
}
|
||||
|
||||
function _fun80701() { // fn#80701, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10617:2399, offset: 0x01e86f97, size: 36 bytes, params: 1, frame: 12
|
||||
const env0_0 = env1_3(_fun80703);
|
||||
return _fun80704;
|
||||
}
|
||||
|
||||
function _fun80705(a0, a1) { // fn#80705, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10617:4039, offset: 0x01e87295, size: 44 bytes, params: 3, frame: 15
|
||||
return <View style={styles.placeholder} key={a1} />;
|
||||
}
|
||||
|
||||
function _fun80706({item, source}) { // fn#80706, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10617:4361, offset: 0x01e872c1, size: 137 bytes, params: 2, frame: 21
|
||||
var environment;
|
||||
const env0_1 = source;
|
||||
const value = environment.__proto__;
|
||||
return (
|
||||
<View style={styles.wishlistItemShadow} key={item.skuId}>
|
||||
{((Component) => <Component item={item} size={env0_1} source={source} recipientName={env0_13} onPress={onPress_80707} />)(importDefault(10450) /* metro dependency 10450: WishlistItemCard */)}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function PremiumGiftWishlistBannerOnPress() { // fn#80708, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10617:4750, owner: PremiumGiftWishlistBanner.onPress, offset: 0x01e87366, size: 35 bytes, params: 1, frame: 13
|
||||
return env0_12(env0_15.item, env0_15.source);
|
||||
}
|
||||
|
||||
function _fun80694(a0) { // fn#80694, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10617:1484, offset: 0x01e86d36, size: 179 bytes, params: 2, frame: 15
|
||||
var r1;
|
||||
var property;
|
||||
const WishlistItemSource = (require(10034) /* metro dependency 10034: useWishlistHooks */).WishlistItemSource;
|
||||
const object2 = {};
|
||||
object2.item = (require(10344) /* metro dependency 10344: WishlistUtils */).wishlistItemFromSKU(a0);
|
||||
let skusToUserAndReasonBinding = skusToUserAndReason;
|
||||
let id = a0.id;
|
||||
if (skusToUserAndReasonBinding[id] == null) {
|
||||
r1 = WishlistItemSource.POPULAR;
|
||||
} else {
|
||||
skusToUserAndReasonBinding = skusToUserAndReason;
|
||||
id = a0.id;
|
||||
property = skusToUserAndReasonBinding[id];
|
||||
id = giftRecipient.id;
|
||||
property = property[id];
|
||||
r1 = property === WishlistRecommendationReason.WISHLIST ? WishlistItemSource.WISHLIST : WishlistItemSource.POPULAR;
|
||||
}
|
||||
object2.source = r1;
|
||||
return object2;
|
||||
}
|
||||
|
||||
function _fun80699({item}) { // fn#80699, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10617:2141, offset: 0x01e86f3d, size: 16 bytes, params: 2, frame: 1
|
||||
return item.skuProductLine;
|
||||
}
|
||||
|
||||
function* _fun80703(a0, a1) { // fn#80703, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10617:2419, offset: 0x01e86fc6, size: 719 bytes, params: 3, frame: 22
|
||||
var binding3;
|
||||
var value9;
|
||||
var openSocialLayerStorefrontGiftModal;
|
||||
var GIFT_SELECTION_MODAL_WISHLIST;
|
||||
var value10;
|
||||
var rootNavigationRef;
|
||||
var binding4;
|
||||
var value13;
|
||||
var open;
|
||||
var intl;
|
||||
var binding5;
|
||||
var value14;
|
||||
var openCollectiblesShopMobile;
|
||||
var binding6;
|
||||
var value15;
|
||||
var openShopGiftModal;
|
||||
var value16;
|
||||
if (true) {
|
||||
value = environment.__proto__.__proto__.__proto__;
|
||||
var binding = env3_1;
|
||||
var binding2 = env3_2;
|
||||
var value3 = binding(binding2[18]);
|
||||
var track = value3.track;
|
||||
var GIFTING_ITEM_CLICKED = env3_10.GIFTING_ITEM_CLICKED;
|
||||
var object2 = {};
|
||||
object2.sku_id = a0.skuId;
|
||||
var WishlistItemSource = env3_0(binding2[12]).WishlistItemSource;
|
||||
var WISHLIST = WishlistItemSource.WISHLIST;
|
||||
object2.item_source = a1 !== WISHLIST ? 'shop' : 'wishlist';
|
||||
WishlistItemSource = env3_0(env3_2[12]).WishlistItemSource;
|
||||
WISHLIST = WishlistItemSource.WISHLIST;
|
||||
var value6 = null;
|
||||
var WishlistRecommendationReason2 = a1 !== WISHLIST ? value6 : WishlistRecommendationReason;
|
||||
object2.wishlist_id = WishlistRecommendationReason2;
|
||||
var skuProductLine = a0.skuProductLine;
|
||||
object2.product_line = skuProductLine;
|
||||
Reflect.apply(track, value3, [GIFTING_ITEM_CLICKED, object2]);
|
||||
skuProductLine = a0.skuProductLine;
|
||||
var PREMIUM = env3_11.PREMIUM;
|
||||
if (skuProductLine !== PREMIUM) {
|
||||
if (a0.skuProductLine !== env3_11.SOCIAL_LAYER_GAME_ITEM) {
|
||||
binding = env3_0;
|
||||
rootNavigationRef = binding(env3_2[22]).getRootNavigationRef();
|
||||
if (value6 == rootNavigationRef) {
|
||||
binding = env3_1;
|
||||
binding4 = env3_2;
|
||||
value13 = binding(binding4[23]);
|
||||
open = value13.open;
|
||||
object2 = {key: 'WISHLIST_ITEM_PRESS_ERROR'};
|
||||
binding = env3_0;
|
||||
intl = binding(binding4[24]).intl;
|
||||
object2.content = intl.string(binding(binding4[24]).t['rTU7/z']);
|
||||
Reflect.apply(open, value13, [object2]);
|
||||
} else if (rootNavigationRef.isReady()) {
|
||||
binding = env3_0;
|
||||
binding5 = env3_2;
|
||||
value14 = binding(binding5[25]);
|
||||
openCollectiblesShopMobile = value14.openCollectiblesShopMobile;
|
||||
object2 = {};
|
||||
binding6 = env3_1;
|
||||
GIFT_SELECTION_MODAL_WISHLIST = binding6(binding5[17]).GIFT_SELECTION_MODAL_WISHLIST;
|
||||
object2.analyticsLocations = [GIFT_SELECTION_MODAL_WISHLIST];
|
||||
GIFT_SELECTION_MODAL_WISHLIST = binding6(binding5[17]).GIFT_SELECTION_MODAL_WISHLIST;
|
||||
object2.analyticsSource = GIFT_SELECTION_MODAL_WISHLIST;
|
||||
object2.screen = env3_12.FEATURED_PAGE;
|
||||
Reflect.apply(openCollectiblesShopMobile, value14, [object2]);
|
||||
value15 = binding(binding5[26]);
|
||||
openShopGiftModal = value15.openShopGiftModal;
|
||||
object2 = {};
|
||||
object2.skuId = a0.skuId;
|
||||
GIFT_SELECTION_MODAL_WISHLIST = binding6(binding5[17]).GIFT_SELECTION_MODAL_WISHLIST;
|
||||
object2.analyticsLocations = [GIFT_SELECTION_MODAL_WISHLIST];
|
||||
value16 = environment.__proto__.__proto__;
|
||||
object2.lockedRecipientUser = require;
|
||||
object2.giftingOrigin = env3_8.DM_CHANNEL_WISHLIST;
|
||||
Reflect.apply(openShopGiftModal, value15, [object2]);
|
||||
} else {
|
||||
binding = env3_1;
|
||||
binding4 = env3_2;
|
||||
value13 = binding(binding4[23]);
|
||||
open = value13.open;
|
||||
object2 = {key: 'WISHLIST_ITEM_PRESS_ERROR'};
|
||||
binding = env3_0;
|
||||
intl = binding(binding4[24]).intl;
|
||||
object2.content = intl.string(binding(binding4[24]).t['rTU7/z']);
|
||||
Reflect.apply(open, value13, [object2]);
|
||||
}
|
||||
} else {
|
||||
binding = env3_0;
|
||||
binding3 = env3_2;
|
||||
value9 = binding(binding3[21]);
|
||||
openSocialLayerStorefrontGiftModal = value9.openSocialLayerStorefrontGiftModal;
|
||||
object2 = {};
|
||||
object2.skuId = a0.skuId;
|
||||
binding = env3_1;
|
||||
object2.analyticsLocations = [binding(binding3[17]).GIFT_SELECTION_MODAL_WISHLIST];
|
||||
value10 = environment.__proto__.__proto__;
|
||||
object2.lockedRecipientUser = require;
|
||||
object2.giftingOrigin = env3_8.DM_CHANNEL_WISHLIST;
|
||||
Reflect.apply(openSocialLayerStorefrontGiftModal, value9, [object2]);
|
||||
}
|
||||
return undefined;
|
||||
}
|
||||
var property = env3_9[a0.skuId];
|
||||
value = environment.__proto__.__proto__;
|
||||
yield SKUProductLines(property);
|
||||
}
|
||||
}
|
||||
|
||||
function onPress_80707() { // fn#80707, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10617:4483, offset: 0x01e8734a, size: 28 bytes, params: 1, frame: 13
|
||||
return env1_12(item, source);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,123 @@
|
||||
/* Metro module 10467; source: modules/premium/native/gifting/PremiumGiftingPromotionSuccessActions.tsx; dependencies: [31, 27, 5126, 1902, 1878, 33, 4501, 697, 566, 7669, 1484, 7633, 8461, 10382, 7589, 8483, 1901, 1305, 10462, 4578, 1244, 2] */
|
||||
function _fun80998(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#80998, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10653:6, offset: 0x01e943ac, size: 413 bytes, params: 8, frame: 22
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importAll(31) /* metro dependency 31 */;
|
||||
const env0_4 = (require(27) /* metro dependency 27 */).View;
|
||||
const env0_5 = (require(5126) /* metro dependency 5126: AvatarDecorationRecord */).isAvatarDecorationRecord;
|
||||
const env0_6 = (require(1902) /* metro dependency 1902: NameplateRecord */).isNameplateRecord;
|
||||
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
|
||||
let value = require(33) /* metro dependency 33 */;
|
||||
const env0_8 = value.jsx;
|
||||
const env0_9 = value.jsxs;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
object2 = {};
|
||||
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object2.container = {'flexDirection': 'column', 'alignItems': 'center', gap: PX_16};
|
||||
const object5 = {'width': 234, 'height': 40, 'flexDirection': 'row', 'alignItems': 'center', 'position': 'relative',
|
||||
'borderRadius': null, 'overflow': 'hidden'};
|
||||
object5.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
|
||||
object2.nameplateContainer = object5;
|
||||
const object6 = {'position': 'absolute', 'left': 0, 'right': 0, 'top': 0, 'bottom': 0, 'borderRadius': null,
|
||||
'overflow': 'hidden'};
|
||||
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
|
||||
object2.nameplateWrapper = object6;
|
||||
object2.singleAvatarContainer = {'flexDirection': 'row', 'paddingRight': 15, 'justifyContent': 'center',
|
||||
'alignItems': 'center', 'marginLeft': 5};
|
||||
const env0_10 = Reflect.apply(createStyles, value, [object2]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/premium/native/gifting/PremiumGiftingPromotionSuccessActions.tsx');
|
||||
exports.default = PremiumGiftingPromotionSuccessActions;
|
||||
}
|
||||
|
||||
function PremiumGiftingPromotionSuccessActions({purchase}) { // fn#80999, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10653:826, offset: 0x01e94549, size: 820 bytes, params: 2, frame: 31
|
||||
var r6;
|
||||
var items2;
|
||||
var Avatar;
|
||||
const styles = useStyles();
|
||||
const currentUser = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() {
|
||||
return UserStore.getCurrentUser();
|
||||
});
|
||||
const {onClose,
|
||||
prePurchaseGiftingBadgeProgress} = (require(7669) /* metro dependency 7669: NativeGiftContext */).useNativeGiftContext();
|
||||
const value4 = (require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation();
|
||||
const GiftingBadgeExperiment = (require(7633) /* metro dependency 7633: GiftingBadgeExperiment */).GiftingBadgeExperiment;
|
||||
const useConfig = GiftingBadgeExperiment.useConfig;
|
||||
const enabled = Reflect.apply(useConfig, GiftingBadgeExperiment,
|
||||
[{location: 'PremiumGiftingPromotionSuccessActions'}]).enabled;
|
||||
const env0_3 = enabled;
|
||||
const {product,
|
||||
isFetching} = (require(8461) /* metro dependency 8461: useFetchCollectiblesProduct */).useFetchCollectiblesProduct(purchase.skuId);
|
||||
const binding = env0_3;
|
||||
const value7 = binding.useCallback(_fun81002, [product, onClose, binding.useCallback(_fun81001, [enabled,
|
||||
prePurchaseGiftingBadgeProgress, value4]), enabled, prePurchaseGiftingBadgeProgress, value4]);
|
||||
const property = purchase.items[0];
|
||||
if (isNameplateRecord(property)) {
|
||||
var viewBinding2Props = {style: styles.nameplateContainer};
|
||||
items2 = [<View style={styles.nameplateWrapper}>{((Component) => <Component nameplate={(require(1901) /* metro dependency 1901: utils */).getNameplateData(property)} fullOpacity animate />)(importDefault(8483) /* metro dependency 8483: Nameplate */)}</View>];
|
||||
var viewBinding2Props3 = {style: styles.singleAvatarContainer};
|
||||
Avatar = (require(1305) /* metro dependency 1305: native */).Avatar;
|
||||
var avatarProps = {user: currentUser, guildId: undefined,
|
||||
size: (require(1305) /* metro dependency 1305: native */).AvatarSizes.SMALL};
|
||||
avatarProps['aria-hidden'] = true;
|
||||
items2[1] = <View {...viewBinding2Props3}><Avatar {...avatarProps} /></View>;
|
||||
r6 = <View {...viewBinding2Props}>{items2}</View>;
|
||||
} else {
|
||||
r6 = isAvatarDecorationRecord(property) ? ((Component) => <Component size={(require(1305) /* metro dependency 1305: native */).AvatarSizes.LARGE} asset={property.asset} />)(importDefault(10462) /* metro dependency 10462: GiftingRewardPreviewAvatar */) : undefined;
|
||||
}
|
||||
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
return (
|
||||
<View style={styles.container}>
|
||||
{r6}
|
||||
<Button
|
||||
grow
|
||||
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.kMYVwv)}
|
||||
loading={isFetching}
|
||||
onPress={value7}
|
||||
/>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun81001() { // fn#81001, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10653:1260, offset: 0x01e9487d, size: 91 bytes, params: 1, frame: 15
|
||||
var binding;
|
||||
var navigate;
|
||||
var value3;
|
||||
if (enabled && prePurchaseGiftingBadgeProgress != null) {
|
||||
binding = env0_2;
|
||||
navigate = binding.navigate;
|
||||
value3 = environment.__proto__;
|
||||
Reflect.apply(navigate, binding,
|
||||
[(require(10382) /* metro dependency 10382: PremiumGiftModal */).PremiumGiftScreens.GIFTING_BADGE,
|
||||
{currentProgress: prePurchaseGiftingBadgeProgress}]);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun81002() { // fn#81002, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10653:1379, offset: 0x01e948d8, size: 166 bytes, params: 1, frame: 15
|
||||
var binding;
|
||||
var navigate;
|
||||
var value2;
|
||||
var value3;
|
||||
if (product != null) {
|
||||
value3 = environment.__proto__;
|
||||
(importDefault(7589) /* metro dependency 7589: ProductPurchaseSuccessActionCreators */).open({product: product,
|
||||
onCancel: env0_5});
|
||||
} else if (enabled) {
|
||||
if (prePurchaseGiftingBadgeProgress != null) {
|
||||
binding = env0_2;
|
||||
navigate = binding.navigate;
|
||||
value2 = environment.__proto__;
|
||||
Reflect.apply(navigate, binding,
|
||||
[(require(10382) /* metro dependency 10382: PremiumGiftModal */).PremiumGiftScreens.GIFTING_BADGE,
|
||||
{currentProgress: prePurchaseGiftingBadgeProgress}]);
|
||||
} else {
|
||||
onClose();
|
||||
}
|
||||
} else {
|
||||
onClose();
|
||||
}
|
||||
}
|
||||
|
||||
+95
@@ -0,0 +1,95 @@
|
||||
/* Metro module 15283; source: modules/premium/native/google_play_price_changes/GooglePlayPriceChangeActionSheet.tsx; dependencies: [31, 27, 3808, 15284, 661, 1376, 33, 4501, 697, 566, 3802, 5137, 6275, 4573, 1244, 1948, 4578, 2] */
|
||||
function _fun116905(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#116905, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15480:6, offset: 0x0249af37, size: 418 bytes, params: 8, frame: 22
|
||||
var object3;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
importAll(31) /* metro dependency 31 */;
|
||||
const env0_3 = (require(27) /* metro dependency 27 */).View;
|
||||
const subscriptionStore = importDefault(3808) /* metro dependency 3808: SubscriptionStore */;
|
||||
const googlePlayPriceChangeStore = importDefault(15284) /* metro dependency 15284: GooglePlayPriceChangeStore */;
|
||||
const env0_6 = (require(661) /* metro dependency 661: Constants */).HelpdeskArticles;
|
||||
const env0_7 = (require(1376) /* metro dependency 1376: DismissibleContentConstants */).ContentDismissActionType;
|
||||
let value = require(33) /* metro dependency 33 */;
|
||||
const env0_8 = value.jsx;
|
||||
const env0_9 = value.jsxs;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
object3 = {};
|
||||
const object4 = {};
|
||||
const PX_32 = (importDefault(697) /* metro dependency 697: native */).space.PX_32;
|
||||
object4.padding = PX_32;
|
||||
let PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
|
||||
object4.paddingTop = PX_24;
|
||||
object3.container = object4;
|
||||
PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
|
||||
object3.textContainer = {marginBottom: PX_24};
|
||||
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object3.header = {'marginBottom': null, 'alignItems': 'center', 'textAlign': 'center', marginBottom: PX_16};
|
||||
object3.body = {textAlign: 'center'};
|
||||
const env0_10 = Reflect.apply(createStyles, value, [object3]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/premium/native/google_play_price_changes/GooglePlayPriceChangeActionSheet.tsx');
|
||||
exports.default = GooglePlayPriceChangeActionSheet;
|
||||
}
|
||||
|
||||
function GooglePlayPriceChangeActionSheet({markAsDismissed}) { // fn#116906, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15480:611, offset: 0x0249b0d9, size: 801 bytes, params: 2, frame: 36
|
||||
const styles = useStyles();
|
||||
const priceChangeRecord = (require(566) /* metro dependency 566: flux */).useStateFromStores([GooglePlayPriceChangeStore],
|
||||
function() {
|
||||
return GooglePlayPriceChangeStore.priceChangeRecord;
|
||||
});
|
||||
const r4 = (require(566) /* metro dependency 566: flux */).useStateFromStores([SubscriptionStore], function() {
|
||||
return SubscriptionStore.getPremiumSubscription(true);
|
||||
})?.premiumPlanIdFromItems ?? '';
|
||||
const tierDisplayNameByPlanId = (require(3802) /* metro dependency 3802: PremiumUtils */).getTierDisplayNameByPlanId(r4);
|
||||
const premiumUtilsModule = require(3802) /* metro dependency 3802: PremiumUtils */;
|
||||
const getInterval = premiumUtilsModule.getInterval;
|
||||
const intervalStringAsNoun = premiumUtilsModule.getIntervalStringAsNoun(Reflect.apply(getInterval,
|
||||
premiumUtilsModule, [r4]).intervalType);
|
||||
const priceUtilsModule = require(5137) /* metro dependency 5137: PriceUtils */;
|
||||
const value6 = priceUtilsModule.formatPrice(priceChangeRecord.oldPrice, priceChangeRecord.oldCurrency);
|
||||
const moduleValue7 = priceUtilsModule;
|
||||
const value7 = moduleValue7.formatPrice(priceChangeRecord.newPrice, priceChangeRecord.newCurrency);
|
||||
const BottomSheet = (require(6275) /* metro dependency 6275: BottomSheetNative */).BottomSheet;
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
let format = intl.format;
|
||||
const text = <Text variant="heading-xl/bold" style={styles.header}>{Reflect.apply(format, intl,
|
||||
[(require(1244) /* metro dependency 1244: indexNative */).t.x0bFvn,
|
||||
{subscriptionName: tierDisplayNameByPlanId}])}</Text>;
|
||||
format = intl.format;
|
||||
const property = (require(1244) /* metro dependency 1244: indexNative */).t['n+Hrjb'];
|
||||
const object = {subscriptionName: tierDisplayNameByPlanId};
|
||||
const Date = global.Date;
|
||||
const expectedChargeTime = priceChangeRecord.expectedChargeTime;
|
||||
const value9 = Object.create(Date.prototype, {constructor: {value: Date}});
|
||||
const date = new Date(expectedChargeTime);
|
||||
object.changeDate = date instanceof Object ? date : value9;
|
||||
object.interval = intervalStringAsNoun;
|
||||
object.newPrice = value7;
|
||||
object.oldPrice = value6;
|
||||
const defaultImport = importDefault(1948) /* metro dependency 1948: HelpdeskUtils */;
|
||||
const getArticleURL = defaultImport.getArticleURL;
|
||||
const SUBSCRIPTION_CANCEL = HelpdeskArticles.SUBSCRIPTION_CANCEL;
|
||||
object.hc_article_url = Reflect.apply(getArticleURL, defaultImport, [SUBSCRIPTION_CANCEL]);
|
||||
const view = <View style={styles.textContainer}>{text}<Text variant="text-md/medium" style={styles.body}>{Reflect.apply(format,
|
||||
intl, [property, object])}</Text></View>;
|
||||
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
|
||||
const string = intl.string;
|
||||
const BddRzS = (require(1244) /* metro dependency 1244: indexNative */).t.BddRzS;
|
||||
return (
|
||||
<BottomSheet>
|
||||
<View style={styles.container}>
|
||||
{view}
|
||||
<Button
|
||||
variant="primary"
|
||||
text={Reflect.apply(string, intl, [BddRzS])}
|
||||
onPress={function() {
|
||||
markAsDismissed(ContentDismissActionType.USER_DISMISS);
|
||||
}}
|
||||
/>
|
||||
</View>
|
||||
</BottomSheet>
|
||||
);
|
||||
}
|
||||
|
||||
+114
@@ -0,0 +1,114 @@
|
||||
/* Metro module 3810; source: modules/premium/native/google_play_price_changes/GooglePlayPriceChangeRecord.tsx; dependencies: [6, 7, 15, 17, 18, 1886, 2] */
|
||||
function _fun29464(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#29464, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3937:6, offset: 0x00fc2a44, size: 260 bytes, params: 8, frame: 18
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_0 = importDefault(6) /* metro dependency 6 */;
|
||||
const env0_1 = importDefault(7) /* metro dependency 7 */;
|
||||
const env0_2 = importDefault(15) /* metro dependency 15 */;
|
||||
const env0_3 = importDefault(17) /* metro dependency 17 */;
|
||||
const env0_4 = importDefault(18) /* metro dependency 18 */;
|
||||
let value = importDefault(1886) /* metro dependency 1886: Record */;
|
||||
value = _fun29468(value);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/premium/native/google_play_price_changes/GooglePlayPriceChangeRecord.tsx');
|
||||
exports.default = value;
|
||||
exports.GooglePlayPriceChangeMode = {PRICE_CHANGE_MODE_UNSPECIFIED: 'PRICE_CHANGE_MODE_UNSPECIFIED',
|
||||
PRICE_DECREASE: 'PRICE_DECREASE', PRICE_INCREASE: 'PRICE_INCREASE',
|
||||
OPT_OUT_PRICE_INCREASE: 'OPT_OUT_PRICE_INCREASE'};
|
||||
exports.GooglePlayPriceChangeRecord = value;
|
||||
}
|
||||
|
||||
function _isNativeReflectConstruct_29465() { // fn#29465, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3937:158, offset: 0x00fc2b48, size: 94 bytes, params: 1, frame: 18
|
||||
var Boolean;
|
||||
var prototype;
|
||||
var valueOf;
|
||||
var call;
|
||||
var Reflect;
|
||||
var construct;
|
||||
var closure;
|
||||
var value;
|
||||
var error;
|
||||
try {
|
||||
Boolean = global.Boolean;
|
||||
prototype = Boolean.prototype;
|
||||
valueOf = prototype.valueOf;
|
||||
call = valueOf.call;
|
||||
Reflect = global.Reflect;
|
||||
construct = Reflect.construct;
|
||||
Boolean = global.Boolean;
|
||||
closure = function() {
|
||||
};
|
||||
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
|
||||
value = Reflect.apply(call, valueOf, [value]);
|
||||
var result = !value;
|
||||
} catch (error) {
|
||||
}
|
||||
return (_isNativeReflectConstruct_29465_isNativeReflectConstruct = function() {
|
||||
return !!result;
|
||||
})();
|
||||
}
|
||||
|
||||
function _fun29468(a0) { // fn#29468, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3937:567, offset: 0x00fc2ba6, size: 173 bytes, params: 2, frame: 17
|
||||
const closure = GooglePlayPriceChangeRecord;
|
||||
env0_4(closure, a0);
|
||||
return env0_1(closure, [{key: 'isPriceIncrease', get: get_29470}, {key: 'isOptOutPriceIncrease', get: get_29471},
|
||||
{key: 'isPriceDecrease', get: get_29472}, {key: 'isInFuture', get: function() {
|
||||
var expectedChargeTime = this.expectedChargeTime;
|
||||
var Date = global.Date;
|
||||
return expectedChargeTime > new Date().toISOString();
|
||||
}}], [{key: 'createFromServer', value: value_29474}]);
|
||||
}
|
||||
|
||||
function GooglePlayPriceChangeRecord({userId, subscriptionId, oldCurrency, oldPrice, newCurrency, newPrice, priceChangeMode, expectedChargeTime, priceChangeId}) { // fn#29469, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3937:579, offset: 0x00fc2c53, size: 218 bytes, params: 2, frame: 20
|
||||
let value = environment.__proto__;
|
||||
env1_0(this, GooglePlayPriceChangeRecord);
|
||||
const value3 = env1_3(GooglePlayPriceChangeRecord);
|
||||
value = env1_2(this, _isNativeReflectConstruct_29465() ? global.Reflect.construct(value3, [],
|
||||
env1_3(this).constructor) : value3.apply(this, undefined));
|
||||
value.userId = userId;
|
||||
value.subscriptionId = subscriptionId;
|
||||
value.oldCurrency = oldCurrency;
|
||||
value.oldPrice = oldPrice;
|
||||
value.newCurrency = newCurrency;
|
||||
value.newPrice = newPrice;
|
||||
value.priceChangeMode = priceChangeMode;
|
||||
value.expectedChargeTime = expectedChargeTime;
|
||||
value.priceChangeId = priceChangeId;
|
||||
return value;
|
||||
}
|
||||
|
||||
function get_29470() { // fn#29470, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3937:1198, offset: 0x00fc2d2d, size: 51 bytes, params: 1, frame: 4
|
||||
const priceChangeMode = this.priceChangeMode;
|
||||
const value = environment.__proto__;
|
||||
const PRICE_INCREASE = env1_5.PRICE_INCREASE;
|
||||
return priceChangeMode === PRICE_INCREASE || this.priceChangeMode === env1_5.OPT_OUT_PRICE_INCREASE;
|
||||
}
|
||||
|
||||
function get_29471() { // fn#29471, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3937:1340, offset: 0x00fc2d60, size: 28 bytes, params: 1, frame: 2
|
||||
const priceChangeMode = this.priceChangeMode;
|
||||
const OPT_OUT_PRICE_INCREASE = env1_5.OPT_OUT_PRICE_INCREASE;
|
||||
return priceChangeMode === OPT_OUT_PRICE_INCREASE;
|
||||
}
|
||||
|
||||
function get_29472() { // fn#29472, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3937:1435, offset: 0x00fc2d7c, size: 28 bytes, params: 1, frame: 2
|
||||
const priceChangeMode = this.priceChangeMode;
|
||||
const PRICE_DECREASE = env1_5.PRICE_DECREASE;
|
||||
return priceChangeMode === PRICE_DECREASE;
|
||||
}
|
||||
|
||||
function value_29474({user_id, subscription_id, old_currency, old_price, new_currency, new_price, price_change_mode, expected_charge_time, price_change_id}) { // fn#29474, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3937:1618, offset: 0x00fc2dcd, size: 149 bytes, params: 2, frame: 12
|
||||
const object2 = {};
|
||||
object2.userId = user_id;
|
||||
object2.subscriptionId = subscription_id;
|
||||
object2.oldCurrency = old_currency;
|
||||
object2.oldPrice = old_price;
|
||||
object2.newCurrency = new_currency;
|
||||
object2.newPrice = new_price;
|
||||
object2.priceChangeMode = price_change_mode;
|
||||
object2.expectedChargeTime = expected_charge_time;
|
||||
object2.priceChangeId = price_change_id;
|
||||
const value = Object.create(GooglePlayPriceChangeRecord.prototype,
|
||||
{constructor: {value: GooglePlayPriceChangeRecord}});
|
||||
const googlePlayPriceChangeRecord = new GooglePlayPriceChangeRecord(object2);
|
||||
return googlePlayPriceChangeRecord instanceof Object ? googlePlayPriceChangeRecord : value;
|
||||
}
|
||||
|
||||
+82
@@ -0,0 +1,82 @@
|
||||
/* Metro module 15284; source: modules/premium/native/google_play_price_changes/GooglePlayPriceChangeStore.tsx; dependencies: [6, 7, 15, 17, 18, 3808, 661, 477, 566, 694, 2] */
|
||||
function _fun116910(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#116910, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15481:6, offset: 0x0249b43c, size: 382 bytes, params: 8, frame: 20
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_2 = importDefault(6) /* metro dependency 6 */;
|
||||
const env0_3 = importDefault(7) /* metro dependency 7 */;
|
||||
const env0_4 = importDefault(15) /* metro dependency 15 */;
|
||||
const env0_5 = importDefault(17) /* metro dependency 17 */;
|
||||
const env0_6 = importDefault(18) /* metro dependency 18 */;
|
||||
const subscriptionStore = importDefault(3808) /* metro dependency 3808: SubscriptionStore */;
|
||||
const SubscriptionStatusTypes = (require(661) /* metro dependency 661: Constants */).SubscriptionStatusTypes;
|
||||
const Set = global.Set;
|
||||
const ACTIVE = SubscriptionStatusTypes.ACTIVE;
|
||||
const PAST_DUE = SubscriptionStatusTypes.PAST_DUE;
|
||||
const UNPAID = SubscriptionStatusTypes.UNPAID;
|
||||
let set = new Set([ACTIVE, PAST_DUE, UNPAID]);
|
||||
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
|
||||
_fun116915(Store).displayName = 'GooglePlayPriceChangeStore';
|
||||
set = new set(importDefault(694) /* metro dependency 694: Dispatcher */, {});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/premium/native/google_play_price_changes/GooglePlayPriceChangeStore.tsx');
|
||||
exports.default = set;
|
||||
}
|
||||
|
||||
function _isNativeReflectConstruct_116911() { // fn#116911, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15481:192, offset: 0x0249b5ba, size: 98 bytes, params: 1, frame: 18
|
||||
var Boolean;
|
||||
var prototype;
|
||||
var valueOf;
|
||||
var call;
|
||||
var Reflect;
|
||||
var construct;
|
||||
var closure;
|
||||
var value;
|
||||
var error;
|
||||
try {
|
||||
Boolean = global.Boolean;
|
||||
prototype = Boolean.prototype;
|
||||
valueOf = prototype.valueOf;
|
||||
call = valueOf.call;
|
||||
Reflect = global.Reflect;
|
||||
construct = Reflect.construct;
|
||||
Boolean = global.Boolean;
|
||||
closure = function() {
|
||||
};
|
||||
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
|
||||
value = Reflect.apply(call, valueOf, [value]);
|
||||
var result = !value;
|
||||
} catch (error) {
|
||||
}
|
||||
return (_isNativeReflectConstruct_116911_isNativeReflectConstruct = function() {
|
||||
return !!result;
|
||||
})();
|
||||
}
|
||||
|
||||
function onInitializeSync() { // fn#116914, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15481:460, offset: 0x0249b61c, size: 149 bytes, params: 1, frame: 16
|
||||
var priceChange;
|
||||
var r3;
|
||||
var premiumSubscription;
|
||||
const value2 = undefined;
|
||||
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
|
||||
if (platformUtilsModule.isAndroid()) {
|
||||
premiumSubscription = SubscriptionStore.getPremiumSubscription();
|
||||
priceChange = premiumSubscription == null ? value2 : premiumSubscription.priceChange;
|
||||
r3 = premiumSubscription != null && env0_8.has(premiumSubscription.status);
|
||||
r3 = r3 && priceChange != null;
|
||||
r3 = r3 && priceChange.isInFuture;
|
||||
r3 = r3 && priceChange.isPriceIncrease;
|
||||
if (r3) {
|
||||
}
|
||||
}
|
||||
return value2;
|
||||
}
|
||||
|
||||
function _fun116915(a0) { // fn#116915, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15481:648, offset: 0x0249b6b1, size: 124 bytes, params: 2, frame: 16
|
||||
const closure = GooglePlayPriceChangeStore;
|
||||
env0_6(closure, a0);
|
||||
return env0_3(closure, [{key: 'initialize', value: function() {
|
||||
this.syncWith([SubscriptionStore], onInitializeSync);
|
||||
this.waitFor(SubscriptionStore);
|
||||
}}, {key: 'shouldShowGooglePlayPriceChange', get: get_116918}, {key: 'priceChangeRecord', get: get_116919}]);
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,35 @@
|
||||
/* Metro module 7253; source: modules/premium/native/hooks/useCheckoutPlanPriceString.tsx; dependencies: [7042, 477, 7027, 2] */
|
||||
function _fun58275(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#58275, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7431:6, offset: 0x016c3793, size: 115 bytes, params: 8, frame: 18
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_2 = (require(7042) /* metro dependency 7042: NativeCheckoutStore */).useNativeCheckoutStore;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/premium/native/hooks/useCheckoutPlanPriceString.tsx');
|
||||
exports.useCheckoutPlanPriceString = useCheckoutPlanPriceString;
|
||||
}
|
||||
|
||||
function useCheckoutPlanPriceString(a0, a1) { // fn#58276, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7431:251, offset: 0x016c3806, size: 168 bytes, params: 3, frame: 16
|
||||
var r2;
|
||||
var getAvailablePlanForItems;
|
||||
var moduleValue2;
|
||||
var value5;
|
||||
const value = null;
|
||||
const priceString = value == a1 ? undefined : a1.priceString;
|
||||
const r0 = value != priceString ? priceString : value;
|
||||
const value4 = useNativeCheckoutStore(function(a0) {
|
||||
return a0.getCheckoutContextRecord();
|
||||
});
|
||||
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
|
||||
if (platformUtilsModule.isIOS()) {
|
||||
if (value == value4) {
|
||||
return r0;
|
||||
}
|
||||
getAvailablePlanForItems = value4.getAvailablePlanForItems;
|
||||
moduleValue2 = require(7027) /* metro dependency 7027: PremiumBundledPlansUtils */;
|
||||
value5 = Reflect.apply(getAvailablePlanForItems, value4, [moduleValue2.getSubscriptionItemsForProduct(a0)]);
|
||||
r2 = value != value5 ? value5.getPriceString() : value;
|
||||
return value == r2 ? r0 : r2;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,83 @@
|
||||
/* Metro module 7325; source: modules/premium/native/hooks/useDiscountedPremiumProductInfo.tsx; dependencies: [31, 5140, 482, 566, 5143, 5137, 2] */
|
||||
function _fun59014(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#59014, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7503:6, offset: 0x016de455, size: 153 bytes, params: 8, frame: 18
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_2 = importAll(31) /* metro dependency 31 */;
|
||||
const iapStoreAndroid = importDefault(5140) /* metro dependency 5140: IAPStoreAndroid */;
|
||||
const env0_4 = (require(482) /* metro dependency 482: Constants */).CurrencyCodes;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/premium/native/hooks/useDiscountedPremiumProductInfo.tsx');
|
||||
exports.useDiscountedPremiumProductInfo = useDiscountedPremiumProductInfo;
|
||||
}
|
||||
|
||||
function useDiscountedPremiumProductInfo(a0, a1) { // fn#59015, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7503:272, offset: 0x016de4ee, size: 160 bytes, params: 3, frame: 18
|
||||
const env0_0 = a0;
|
||||
const env0_1 = a1;
|
||||
const binding = env0_2;
|
||||
let useMemo = binding.useMemo;
|
||||
const value = (require(566) /* metro dependency 566: flux */).useStateFromStores([IAPStoreAndroid], _fun59018,
|
||||
[Reflect.apply(useMemo, binding, [_fun59016, [a0, a1]])]);
|
||||
useMemo = binding.useMemo;
|
||||
return {discountedProduct: value, discountedPriceString: Reflect.apply(useMemo, binding, [_fun59019, [a0, value]])};
|
||||
}
|
||||
|
||||
function _fun59016() { // fn#59016, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7503:335, offset: 0x016de58e, size: 76 bytes, params: 1, frame: 14
|
||||
if (env0_0Binding == null) {
|
||||
return null;
|
||||
}
|
||||
var env0_0Binding = env0_0.discount?.planIds ?? [];
|
||||
return require.find(_fun59017);
|
||||
}
|
||||
|
||||
function _fun59018() { // fn#59018, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7503:518, offset: 0x016de5f6, size: 46 bytes, params: 1, frame: 12
|
||||
const value2 = null;
|
||||
return value2 != env0_2 ? IAPStoreAndroid.getProduct(env0_2.productId) : value2;
|
||||
}
|
||||
|
||||
function _fun59019() { // fn#59019, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7503:580, offset: 0x016de624, size: 311 bytes, params: 1, frame: 18
|
||||
var r5;
|
||||
var value;
|
||||
if (env0_0 != null) {
|
||||
if (env0_3 == null) {
|
||||
return null;
|
||||
}
|
||||
var value3 = undefined;
|
||||
var DiscountIdToProductOfferId = (require(5143) /* metro dependency 5143: ProductIdsAndroid */).DiscountIdToProductOfferId;
|
||||
var property = DiscountIdToProductOfferId[env0_0.discountId];
|
||||
r5 = property == null ? value3 : property[env0_3.identifier];
|
||||
if (r5 == null) {
|
||||
return null;
|
||||
}
|
||||
r5 = env0_3.currencyCode.toUpperCase() in CurrencyCodes ? env0_3.currencyCode.toLowerCase() : CurrencyCodes.USD;
|
||||
var binding = env0_3;
|
||||
var subscriptionOffers = binding.subscriptionOffers;
|
||||
if (subscriptionOffers == null) {
|
||||
return null;
|
||||
}
|
||||
subscriptionOffers = binding.subscriptionOffers;
|
||||
value = subscriptionOffers.find(_fun59020);
|
||||
if (value == null) {
|
||||
return null;
|
||||
}
|
||||
var pricingPhases = value.pricingPhases;
|
||||
if (pricingPhases == null) {
|
||||
return null;
|
||||
}
|
||||
pricingPhases = value.pricingPhases;
|
||||
if (pricingPhases.length > 0) {
|
||||
value = value.pricingPhases[0].price / 100;
|
||||
return (require(5137) /* metro dependency 5137: PriceUtils */).formatPrice(value, r5,
|
||||
{convertToMajorUnits: false});
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
function _fun59017({basePlanId}) { // fn#59017, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7503:445, offset: 0x016de5da, size: 28 bytes, params: 2, frame: 11
|
||||
return env0_0.includes(basePlanId);
|
||||
}
|
||||
|
||||
function _fun59020({offerId}) { // fn#59020, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7503:876, offset: 0x016de75b, size: 22 bytes, params: 2, frame: 2
|
||||
return offerId === env0_0;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,122 @@
|
||||
/* Metro module 7942; source: modules/premium/native/hooks/usePremiumPlanPrice.tsx; dependencies: [3807, 3808, 5140, 566, 7334, 7943, 7944, 5143, 477, 5137, 2] */
|
||||
function _fun63377(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#63377, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8120:6, offset: 0x01b7d848, size: 148 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const subscriptionPlanStore = importDefault(3807) /* metro dependency 3807: SubscriptionPlanStore */;
|
||||
const subscriptionStore = importDefault(3808) /* metro dependency 3808: SubscriptionStore */;
|
||||
const iapStoreAndroid = importDefault(5140) /* metro dependency 5140: IAPStoreAndroid */;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/premium/native/hooks/usePremiumPlanPrice.tsx');
|
||||
exports.default = usePremiumPlanPrice;
|
||||
}
|
||||
|
||||
function usePremiumPlanPrice(a0) { // fn#63378, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8120:223, offset: 0x01b7d8dc, size: 632 bytes, params: 2, frame: 26
|
||||
var r1;
|
||||
var r2;
|
||||
var r0;
|
||||
var moduleValue4;
|
||||
const PriceStates = (require(7944) /* metro dependency 7944: useStoreFrontPrice */).PriceStates;
|
||||
var amount;
|
||||
var currency;
|
||||
var formatPrice;
|
||||
const env0_0 = a0;
|
||||
var value;
|
||||
const value2 = undefined;
|
||||
const fluxModule = require(566) /* metro dependency 566: flux */;
|
||||
let useStateFromStores = fluxModule.useStateFromStores;
|
||||
let object = [SubscriptionStore];
|
||||
const premiumSubscription = Reflect.apply(useStateFromStores, fluxModule, [object, function() {
|
||||
return SubscriptionStore.getPremiumSubscription();
|
||||
}]);
|
||||
const NitroACOMSubscriptionExperiment = (require(7334) /* metro dependency 7334: ACOMExperiments */).NitroACOMSubscriptionExperiment;
|
||||
const useConfig = NitroACOMSubscriptionExperiment.useConfig;
|
||||
const enabled = Reflect.apply(useConfig, NitroACOMSubscriptionExperiment,
|
||||
[{location: 'usePremiumPlanPrice'}]).enabled;
|
||||
const defaultImport = importDefault(7943) /* metro dependency 7943: NativePaymentHooksAndroid */;
|
||||
const useNativeIAPPayments = defaultImport.useNativeIAPPayments;
|
||||
const storeFront = Reflect.apply(useNativeIAPPayments, defaultImport, []).storeFront;
|
||||
const moduleValue2 = fluxModule;
|
||||
useStateFromStores = moduleValue2.useStateFromStores;
|
||||
const {price,
|
||||
priceState} = (importDefault(7944) /* metro dependency 7944: useStoreFrontPrice */)(Reflect.apply(useStateFromStores,
|
||||
moduleValue2, [[SubscriptionPlanStore], _fun63380, [a0]]), storeFront);
|
||||
const value5 = null;
|
||||
const value6 = fluxModule.useStateFromStores([IAPStoreAndroid], _fun63381,
|
||||
[value5 != a0 ? (require(5143) /* metro dependency 5143: ProductIdsAndroid */).BasePlanIdToProductId[a0] : value5]);
|
||||
if (value5 == a0) {
|
||||
r0 = value5;
|
||||
} else {
|
||||
moduleValue4 = require(477) /* metro dependency 477: PlatformUtils */;
|
||||
if (moduleValue4.isIOS()) {
|
||||
if (enabled) {
|
||||
if (priceState !== PriceStates.PRICE_AVAILABLE) {
|
||||
r2 = value5;
|
||||
} else if (value5 != price) {
|
||||
object = {};
|
||||
amount = price.amount;
|
||||
object.price = amount;
|
||||
currency = price.currency;
|
||||
object.currency = currency;
|
||||
object.countryCode = value5 == storeFront ? value2 : storeFront.country;
|
||||
value = require(5137) /* metro dependency 5137: PriceUtils */;
|
||||
formatPrice = value.formatPrice;
|
||||
amount = price.amount;
|
||||
currency = price.currency;
|
||||
object.priceString = Reflect.apply(formatPrice, value, [amount, currency]);
|
||||
object.source = 'API';
|
||||
r2 = object;
|
||||
} else {
|
||||
r2 = value5;
|
||||
}
|
||||
r1 = r2;
|
||||
} else if ((value5 == premiumSubscription ? value2 : premiumSubscription.isACOM) === true) {
|
||||
if (priceState !== PriceStates.PRICE_AVAILABLE) {
|
||||
r2 = value5;
|
||||
} else if (value5 != price) {
|
||||
object = {};
|
||||
amount = price.amount;
|
||||
object.price = amount;
|
||||
currency = price.currency;
|
||||
object.currency = currency;
|
||||
object.countryCode = value5 == storeFront ? value2 : storeFront.country;
|
||||
value = require(5137) /* metro dependency 5137: PriceUtils */;
|
||||
formatPrice = value.formatPrice;
|
||||
amount = price.amount;
|
||||
currency = price.currency;
|
||||
object.priceString = Reflect.apply(formatPrice, value, [amount, currency]);
|
||||
object.source = 'API';
|
||||
r2 = object;
|
||||
} else {
|
||||
r2 = value5;
|
||||
}
|
||||
r1 = r2;
|
||||
} else {
|
||||
r1 = value5 != value6 ? {price: value6.price, currency: value6.currencyCode,
|
||||
countryCode: value5 != (value5 == storeFront ? value2 : storeFront.country) ? value5 == storeFront ? value2 : storeFront.country : value6.countryCode,
|
||||
|
||||
|
||||
|
||||
priceString: value6.priceString, source: 'IAP'} : value5;
|
||||
}
|
||||
} else {
|
||||
r1 = value5 != value6 ? {price: value6.price, currency: value6.currencyCode,
|
||||
countryCode: value5 != (value5 == storeFront ? value2 : storeFront.country) ? value5 == storeFront ? value2 : storeFront.country : value6.countryCode,
|
||||
|
||||
|
||||
priceString: value6.priceString, source: 'IAP'} : value5;
|
||||
}
|
||||
r0 = r1;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function _fun63380() { // fn#63380, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8120:500, offset: 0x01b7db67, size: 39 bytes, params: 1, frame: 12
|
||||
const value2 = null;
|
||||
return value2 != env0_0 ? SubscriptionPlanStore.get(env0_0) : value2;
|
||||
}
|
||||
|
||||
function _fun63381() { // fn#63381, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8120:654, offset: 0x01b7db8e, size: 40 bytes, params: 1, frame: 12
|
||||
const value2 = null;
|
||||
return value2 != env0_1 ? IAPStoreAndroid.getProduct(env0_1) : value2;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
/* Metro module 10391; source: modules/premium/native/hooks/usePremiumProductPricingString.tsx; dependencies: [5140, 3802, 5143, 566, 2] */
|
||||
function _fun80484(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#80484, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10577:6, offset: 0x01e7d7ec, size: 114 bytes, params: 8, frame: 18
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const iapStoreAndroid = importDefault(5140) /* metro dependency 5140: IAPStoreAndroid */;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/premium/native/hooks/usePremiumProductPricingString.tsx');
|
||||
exports.default = usePremiumProductPricingString;
|
||||
}
|
||||
|
||||
function usePremiumProductPricingString(a0, a1) { // fn#80485, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10577:213, offset: 0x01e7d85e, size: 147 bytes, params: 3, frame: 18
|
||||
const value2 = undefined;
|
||||
const env0_0 = (require(5143) /* metro dependency 5143: ProductIdsAndroid */).getProductIdForGift((require(3802) /* metro dependency 3802: PremiumUtils */).getPlanIdForPremiumType(a0,
|
||||
a1));
|
||||
const product = (require(566) /* metro dependency 566: flux */).useStateFromStores([IAPStoreAndroid], _fun80486);
|
||||
return (product == null ? value2 : product.priceString) ?? '$...';
|
||||
}
|
||||
|
||||
function _fun80486() { // fn#80486, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10577:370, offset: 0x01e7d8f1, size: 27 bytes, params: 1, frame: 11
|
||||
return IAPStoreAndroid.getProduct(env0_0);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,210 @@
|
||||
/* Metro module 10384; source: modules/premium/native/hooks/useSelectPremiumGift.tsx; dependencies: [5, 31, 1484, 7669, 10385, 3802, 4496, 1244, 10382, 2] */
|
||||
function _fun80454(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#80454, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10570:6, offset: 0x01e7bbf3, size: 137 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(5) /* metro dependency 5 */;
|
||||
const env0_4 = importAll(31) /* metro dependency 31 */;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/premium/native/hooks/useSelectPremiumGift.tsx');
|
||||
exports.useSelectPremiumGift = useSelectPremiumGift;
|
||||
}
|
||||
|
||||
function useSelectPremiumGift(a0) { // fn#80455, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10570:226, offset: 0x01e7bc7c, size: 189 bytes, params: 2, frame: 20
|
||||
const value2 = (require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation();
|
||||
const {setPremiumType, recipientUserId, planInterval,
|
||||
setOrder} = (require(7669) /* metro dependency 7669: NativeGiftContext */).useNativeGiftContext();
|
||||
return setOrder.useCallback(_fun80456(), [setPremiumType, planInterval,
|
||||
(require(10385) /* metro dependency 10385: createOrReuseGiftOrder */).useCreateOrReuseGiftOrder(a0),
|
||||
recipientUserId, setOrder, value2]);
|
||||
}
|
||||
|
||||
function _fun80456() { // fn#80456, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10570:451, offset: 0x01e7bd39, size: 36 bytes, params: 1, frame: 12
|
||||
const env0_0 = env1_3(_fun80458);
|
||||
return _fun80459;
|
||||
}
|
||||
|
||||
function* _fun80458(a0) { // fn#80458, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10570:471, offset: 0x01e7bd68, size: 325 bytes, params: 2, frame: 20
|
||||
var object2;
|
||||
var value6;
|
||||
var value7;
|
||||
var value8;
|
||||
var error;
|
||||
var binding2;
|
||||
var show;
|
||||
var intl;
|
||||
var string;
|
||||
var t;
|
||||
var R0RpRX;
|
||||
var CKsXk3;
|
||||
if (true) {
|
||||
value = environment.__proto__.__proto__;
|
||||
env2_4(undefined);
|
||||
importDefault(a0);
|
||||
var binding = env3_0;
|
||||
var planIdForPremiumType = binding(env3_2[5]).getPlanIdForPremiumType(a0, env2_3);
|
||||
try {
|
||||
binding = env2_5;
|
||||
} catch (error) {
|
||||
binding = env3_1;
|
||||
binding2 = env3_2;
|
||||
value = binding(binding2[6]);
|
||||
show = value.show;
|
||||
object2 = {};
|
||||
binding = env3_0;
|
||||
intl = binding(binding2[7]).intl;
|
||||
string = intl.string;
|
||||
t = binding(binding2[7]).t;
|
||||
R0RpRX = t.R0RpRX;
|
||||
object2.title = Reflect.apply(string, intl, [R0RpRX]);
|
||||
intl = binding(binding2[7]).intl;
|
||||
string = intl.string;
|
||||
t = binding(binding2[7]).t;
|
||||
CKsXk3 = t.CKsXk3;
|
||||
object2.body = Reflect.apply(string, intl, [CKsXk3]);
|
||||
Reflect.apply(show, value, [object2]);
|
||||
return undefined;
|
||||
}
|
||||
try {
|
||||
object2 = {};
|
||||
} catch (error) {
|
||||
binding = env3_1;
|
||||
binding2 = env3_2;
|
||||
value = binding(binding2[6]);
|
||||
show = value.show;
|
||||
object2 = {};
|
||||
binding = env3_0;
|
||||
intl = binding(binding2[7]).intl;
|
||||
string = intl.string;
|
||||
t = binding(binding2[7]).t;
|
||||
R0RpRX = t.R0RpRX;
|
||||
object2.title = Reflect.apply(string, intl, [R0RpRX]);
|
||||
intl = binding(binding2[7]).intl;
|
||||
string = intl.string;
|
||||
t = binding(binding2[7]).t;
|
||||
CKsXk3 = t.CKsXk3;
|
||||
object2.body = Reflect.apply(string, intl, [CKsXk3]);
|
||||
Reflect.apply(show, value, [object2]);
|
||||
return undefined;
|
||||
}
|
||||
try {
|
||||
object2.planId = planIdForPremiumType;
|
||||
} catch (error) {
|
||||
binding = env3_1;
|
||||
binding2 = env3_2;
|
||||
value = binding(binding2[6]);
|
||||
show = value.show;
|
||||
object2 = {};
|
||||
binding = env3_0;
|
||||
intl = binding(binding2[7]).intl;
|
||||
string = intl.string;
|
||||
t = binding(binding2[7]).t;
|
||||
R0RpRX = t.R0RpRX;
|
||||
object2.title = Reflect.apply(string, intl, [R0RpRX]);
|
||||
intl = binding(binding2[7]).intl;
|
||||
string = intl.string;
|
||||
t = binding(binding2[7]).t;
|
||||
CKsXk3 = t.CKsXk3;
|
||||
object2.body = Reflect.apply(string, intl, [CKsXk3]);
|
||||
Reflect.apply(show, value, [object2]);
|
||||
return undefined;
|
||||
}
|
||||
try {
|
||||
} catch (error) {
|
||||
binding = env3_1;
|
||||
binding2 = env3_2;
|
||||
value = binding(binding2[6]);
|
||||
show = value.show;
|
||||
object2 = {};
|
||||
binding = env3_0;
|
||||
intl = binding(binding2[7]).intl;
|
||||
string = intl.string;
|
||||
t = binding(binding2[7]).t;
|
||||
R0RpRX = t.R0RpRX;
|
||||
object2.title = Reflect.apply(string, intl, [R0RpRX]);
|
||||
intl = binding(binding2[7]).intl;
|
||||
string = intl.string;
|
||||
t = binding(binding2[7]).t;
|
||||
CKsXk3 = t.CKsXk3;
|
||||
object2.body = Reflect.apply(string, intl, [CKsXk3]);
|
||||
Reflect.apply(show, value, [object2]);
|
||||
return undefined;
|
||||
}
|
||||
try {
|
||||
object2.recipientUserId = dependencyMap;
|
||||
} catch (error) {
|
||||
binding = env3_1;
|
||||
binding2 = env3_2;
|
||||
value = binding(binding2[6]);
|
||||
show = value.show;
|
||||
object2 = {};
|
||||
binding = env3_0;
|
||||
intl = binding(binding2[7]).intl;
|
||||
string = intl.string;
|
||||
t = binding(binding2[7]).t;
|
||||
R0RpRX = t.R0RpRX;
|
||||
object2.title = Reflect.apply(string, intl, [R0RpRX]);
|
||||
intl = binding(binding2[7]).intl;
|
||||
string = intl.string;
|
||||
t = binding(binding2[7]).t;
|
||||
CKsXk3 = t.CKsXk3;
|
||||
object2.body = Reflect.apply(string, intl, [CKsXk3]);
|
||||
Reflect.apply(show, value, [object2]);
|
||||
return undefined;
|
||||
}
|
||||
try {
|
||||
value6 = binding(object2);
|
||||
} catch (error) {
|
||||
binding = env3_1;
|
||||
binding2 = env3_2;
|
||||
value = binding(binding2[6]);
|
||||
show = value.show;
|
||||
object2 = {};
|
||||
binding = env3_0;
|
||||
intl = binding(binding2[7]).intl;
|
||||
string = intl.string;
|
||||
t = binding(binding2[7]).t;
|
||||
R0RpRX = t.R0RpRX;
|
||||
object2.title = Reflect.apply(string, intl, [R0RpRX]);
|
||||
intl = binding(binding2[7]).intl;
|
||||
string = intl.string;
|
||||
t = binding(binding2[7]).t;
|
||||
CKsXk3 = t.CKsXk3;
|
||||
object2.body = Reflect.apply(string, intl, [CKsXk3]);
|
||||
Reflect.apply(show, value, [object2]);
|
||||
return undefined;
|
||||
}
|
||||
yield value6;
|
||||
try {
|
||||
value7 = undefined;
|
||||
value8 = false;
|
||||
} catch (error) {
|
||||
binding = env3_1;
|
||||
binding2 = env3_2;
|
||||
value = binding(binding2[6]);
|
||||
show = value.show;
|
||||
object2 = {};
|
||||
binding = env3_0;
|
||||
intl = binding(binding2[7]).intl;
|
||||
string = intl.string;
|
||||
t = binding(binding2[7]).t;
|
||||
R0RpRX = t.R0RpRX;
|
||||
object2.title = Reflect.apply(string, intl, [R0RpRX]);
|
||||
intl = binding(binding2[7]).intl;
|
||||
string = intl.string;
|
||||
t = binding(binding2[7]).t;
|
||||
CKsXk3 = t.CKsXk3;
|
||||
object2.body = Reflect.apply(string, intl, [CKsXk3]);
|
||||
Reflect.apply(show, value, [object2]);
|
||||
return undefined;
|
||||
}
|
||||
if (value8) {
|
||||
return value7;
|
||||
}
|
||||
env2_4(value7);
|
||||
var navigate = require.navigate;
|
||||
var PremiumGiftScreens = env3_0(env3_2[8]).PremiumGiftScreens;
|
||||
var CUSTOMIZATION = PremiumGiftScreens.CUSTOMIZATION;
|
||||
Reflect.apply(navigate, require, [CUSTOMIZATION]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,48 @@
|
||||
/* Metro module 7026; source: modules/premium/native/launchPremiumPlanSelect.tsx; dependencies: [661, 7027, 5080, 7028, 1962, 7028, 7004, 2] */
|
||||
function _fun55672(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#55672, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7204:6, offset: 0x013adaa1, size: 122 bytes, params: 8, frame: 18
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = (require(661) /* metro dependency 661: Constants */).UserSettingsSections;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/premium/native/launchPremiumPlanSelect.tsx');
|
||||
exports.launchPremiumPlanSelect = launchPremiumPlanSelect;
|
||||
}
|
||||
|
||||
function launchPremiumPlanSelect({predicate, navigation, showCurrentPlan, analyticsLocation, analyticsLocations, planId, applicationId, onBack, onPaymentSuccess, onPaymentDismiss}) { // fn#55673, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7204:237, offset: 0x013adb1b, size: 333 bytes, params: 2, frame: 30
|
||||
var defaultImport;
|
||||
showCurrentPlan = showCurrentPlan === undefined || showCurrentPlan;
|
||||
const closure = predicate_55674;
|
||||
const PREMIUM_PLAN_SELECT = UserSettingsSections.PREMIUM_PLAN_SELECT;
|
||||
if (navigation != null) {
|
||||
navigation.push(PREMIUM_PLAN_SELECT, {predicate: closure, analyticsLocation: analyticsLocation,
|
||||
analyticsLocations: analyticsLocations, showCurrentPlan: showCurrentPlan, planId: planId,
|
||||
applicationId: applicationId, onPaymentSuccess: onPaymentSuccess, onPaymentDismiss: onPaymentDismiss});
|
||||
} else {
|
||||
defaultImport = importDefault(dependencyMap[2]);
|
||||
defaultImport.pushLazy(require(dependencyMap[4])(dependencyMap[3], dependencyMap.paths),
|
||||
{initialRoute: PREMIUM_PLAN_SELECT, analyticsLocation: analyticsLocation,
|
||||
analyticsLocations: analyticsLocations, predicate: closure, showCurrentPlan: showCurrentPlan,
|
||||
planId: planId,
|
||||
applicationId: applicationId, onBack: onBack, onPaymentSuccess: onPaymentSuccess,
|
||||
onPaymentDismiss: onPaymentDismiss}, require(dependencyMap[5]).PREMIUM_KEY);
|
||||
}
|
||||
const moduleValue = require(dependencyMap[6]);
|
||||
moduleValue.trackUserSettingsPaneViewed({destinationPane: PREMIUM_PLAN_SELECT});
|
||||
}
|
||||
|
||||
function launchPremiumPlanSelectPredicate(a0) { // fn#55674, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7204:453, owner: launchPremiumPlanSelect.predicate, offset: 0x013adc68, size: 87 bytes, params: 2, frame: 15
|
||||
var r2;
|
||||
var r0;
|
||||
let value = environment.__proto__;
|
||||
value = undefined;
|
||||
const shouldAlwaysExcludeFromPlanSelect2 = (require(7027) /* metro dependency 7027: PremiumBundledPlansUtils */).shouldAlwaysExcludeFromPlanSelect(a0);
|
||||
if (shouldAlwaysExcludeFromPlanSelect2) {
|
||||
r0 = !shouldAlwaysExcludeFromPlanSelect2;
|
||||
} else {
|
||||
r2 = predicate == null ? value : predicate(a0);
|
||||
value = r2 == null;
|
||||
r0 = value || r2;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
/* Metro module 7040; source: modules/premium/native/openPremiumPlanSelectionActionSheet.tsx; dependencies: [4080, 7041, 1962, 2] */
|
||||
function _fun55866(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#55866, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7218:6, offset: 0x013b5390, size: 113 bytes, params: 8, frame: 18
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/premium/native/openPremiumPlanSelectionActionSheet.tsx');
|
||||
exports.default = _default_55867;
|
||||
exports.PREMIUM_PLAN_SELECTION_ACTION_SHEET_KEY = 'PremiumPlanSelectionActionSheetWithOrderCTX';
|
||||
}
|
||||
|
||||
function _default_55867(a0, a1) { // fn#55867, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7218:153, offset: 0x013b5401, size: 128 bytes, params: 3, frame: 18
|
||||
if (a1 == null) {
|
||||
importDefault(dependencyMap[0]).hideActionSheet();
|
||||
}
|
||||
const defaultImport = importDefault(dependencyMap[0]);
|
||||
const openLazy = defaultImport.openLazy;
|
||||
let value = require(dependencyMap[2]);
|
||||
value = value(dependencyMap[1], dependencyMap.paths);
|
||||
Reflect.apply(openLazy, defaultImport, [value, 'PremiumPlanSelectionActionSheetWithOrderCTX', a0, a1]);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
/* Metro module 7533; source: modules/premium/native/openPremiumPlanWhatYouLoseActionSheet.tsx; dependencies: [4080, 7534, 1962, 2] */
|
||||
function _fun60612(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#60612, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7711:6, offset: 0x017080b9, size: 101 bytes, params: 8, frame: 18
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/premium/native/openPremiumPlanWhatYouLoseActionSheet.tsx');
|
||||
exports.default = _default_60613;
|
||||
}
|
||||
|
||||
function _default_60613(a0) { // fn#60613, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7711:105, offset: 0x0170811e, size: 101 bytes, params: 2, frame: 17
|
||||
importDefault(dependencyMap[0]).hideActionSheet();
|
||||
const defaultImport2 = importDefault(dependencyMap[0]);
|
||||
const openLazy = defaultImport2.openLazy;
|
||||
let value = require(dependencyMap[2]);
|
||||
value = value(dependencyMap[1], dependencyMap.paths);
|
||||
Reflect.apply(openLazy, defaultImport2, [value, 'PremiumPlanWhatYouLoseActionSheet', a0]);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,86 @@
|
||||
/* Metro module 16166; source: modules/premium/native/referrals/ReferralMessageManager.tsx; dependencies: [7, 6, 15, 17, 18, 3808, 7064, 671, 21, 7507, 15767, 4860, 2] */
|
||||
function _fun124969(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#124969, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16374:6, offset: 0x025c9049, size: 273 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(7) /* metro dependency 7 */;
|
||||
const env0_4 = importDefault(6) /* metro dependency 6 */;
|
||||
const env0_5 = importDefault(15) /* metro dependency 15 */;
|
||||
const env0_6 = importDefault(17) /* metro dependency 17 */;
|
||||
const env0_7 = importDefault(18) /* metro dependency 18 */;
|
||||
const subscriptionStore = importDefault(3808) /* metro dependency 3808: SubscriptionStore */;
|
||||
const userOfferStore = importDefault(7064) /* metro dependency 7064: UserOfferStore */;
|
||||
let value = importDefault(4860) /* metro dependency 4860: AutomaticLifecycleManager */;
|
||||
value = _fun124974(value);
|
||||
value = new value();
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/premium/native/referrals/ReferralMessageManager.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
function _isNativeReflectConstruct_124970() { // fn#124970, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16374:168, offset: 0x025c915a, size: 98 bytes, params: 1, frame: 18
|
||||
var Boolean;
|
||||
var prototype;
|
||||
var valueOf;
|
||||
var call;
|
||||
var Reflect;
|
||||
var construct;
|
||||
var closure;
|
||||
var value;
|
||||
var error;
|
||||
try {
|
||||
Boolean = global.Boolean;
|
||||
prototype = Boolean.prototype;
|
||||
valueOf = prototype.valueOf;
|
||||
call = valueOf.call;
|
||||
Reflect = global.Reflect;
|
||||
construct = Reflect.construct;
|
||||
Boolean = global.Boolean;
|
||||
closure = function() {
|
||||
};
|
||||
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
|
||||
value = Reflect.apply(call, valueOf, [value]);
|
||||
var result = !value;
|
||||
} catch (error) {
|
||||
}
|
||||
return (_isNativeReflectConstruct_124970_isNativeReflectConstruct = function() {
|
||||
return !!result;
|
||||
})();
|
||||
}
|
||||
|
||||
function handleReferralMessages(a0) { // fn#124973, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16374:361, offset: 0x025c91bc, size: 221 bytes, params: 2, frame: 16
|
||||
var defaultImport;
|
||||
var premiumTypeSubscription;
|
||||
var defaultImport2;
|
||||
const type = a0.type;
|
||||
const MessageTypes = (require(671) /* metro dependency 671: MessageTypes */).MessageTypes;
|
||||
const PREMIUM_REFERRAL = MessageTypes.PREMIUM_REFERRAL;
|
||||
if (type === PREMIUM_REFERRAL) {
|
||||
if (a0.content != null) {
|
||||
defaultImport = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
|
||||
if (defaultImport.isProbablyAValidSnowflake(a0.content)) {
|
||||
premiumTypeSubscription = SubscriptionStore.getPremiumTypeSubscription();
|
||||
defaultImport2 = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
|
||||
if (premiumTypeSubscription == null && UserOfferStore.shouldFetchReferralOffer(defaultImport2.extractTimestamp(a0.content))) {
|
||||
(require(7507) /* metro dependency 7507: UserOfferActionCreators */).fetchUserOffer('ReferralMessageManager');
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function _fun124974(a0) { // fn#124974, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16374:689, offset: 0x025c9299, size: 42 bytes, params: 2, frame: 14
|
||||
const closure = ReferralMessageManager;
|
||||
env0_7(closure, a0);
|
||||
return env0_3(closure);
|
||||
}
|
||||
|
||||
function ReferralMessageManager() { // fn#124975, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16374:701, offset: 0x025c92c3, size: 138 bytes, params: 1, frame: 20
|
||||
env1_4(this, ReferralMessageManager);
|
||||
const value3 = env1_6(ReferralMessageManager);
|
||||
const value6 = env1_5(this, _isNativeReflectConstruct_124970() ? global.Reflect.construct(value3, [],
|
||||
env1_6(this).constructor) : value3.apply(this, undefined));
|
||||
(importDefault(15767) /* metro dependency 15767: setupLoadFromMessageManagerHandlers */)(value6,
|
||||
handleReferralMessages);
|
||||
return value6;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
/* Metro module 11431; source: modules/premium/native/referrals/ReferralMessageUtils.tsx; dependencies: [3808, 7064, 2] */
|
||||
function _fun87494(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#87494, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11617:6, offset: 0x01fc0cf4, size: 122 bytes, params: 8, frame: 18
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const subscriptionStore = importDefault(3808) /* metro dependency 3808: SubscriptionStore */;
|
||||
const userOfferStore = importDefault(7064) /* metro dependency 7064: UserOfferStore */;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/premium/native/referrals/ReferralMessageUtils.tsx');
|
||||
exports.canOpenPremiumPlanDirectlyForReferralTrial = canOpenPremiumPlanDirectlyForReferralTrial;
|
||||
}
|
||||
|
||||
function canOpenPremiumPlanDirectlyForReferralTrial() { // fn#87495, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11617:252, offset: 0x01fc0d6e, size: 61 bytes, params: 1, frame: 12
|
||||
return SubscriptionStore.hasFetchedSubscriptions() && SubscriptionStore.getPremiumTypeSubscription(false) == null && !UserOfferStore.isFetchingOffer();
|
||||
}
|
||||
|
||||
@@ -0,0 +1,57 @@
|
||||
/* Metro module 12295; source: modules/premium/native/renderPremiumButtonText.tsx; dependencies: [31, 27, 1880, 33, 4501, 4000, 697, 3802, 1244, 1305, 2] */
|
||||
function _fun93906(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#93906, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12481:6, offset: 0x020c9d33, size: 336 bytes, params: 8, frame: 23
|
||||
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(1880) /* metro dependency 1880: PremiumConstants */;
|
||||
const env0_4 = value.PREMIUM_YEARLY_DISCOUNT_PERCENT;
|
||||
const env0_5 = value.SubscriptionIntervalTypes;
|
||||
value = require(33) /* metro dependency 33 */;
|
||||
const env0_6 = value.jsx;
|
||||
const env0_7 = value.jsxs;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
const colorUtilsModule = require(4000) /* metro dependency 4000: ColorUtils */;
|
||||
const hexWithOpacity = colorUtilsModule.hexWithOpacity;
|
||||
const WHITE = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.WHITE;
|
||||
const env0_8 = Reflect.apply(createStyles, value, [{discount: {'borderWidth': 1, 'borderColor': null,
|
||||
'borderRadius': 2, 'marginLeft': 4, 'paddingHorizontal': 2, borderColor: Reflect.apply(hexWithOpacity,
|
||||
colorUtilsModule, [WHITE, 0.3])}, premiumText: {flexDirection: 'row'}}]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/premium/native/renderPremiumButtonText.tsx');
|
||||
exports.default = renderPremiumText;
|
||||
}
|
||||
|
||||
function PremiumText({style, isCurrentPlan, isGift, basePlanId, product, text}) { // fn#93907, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12481:425, offset: 0x020c9e83, size: 719 bytes, params: 2, frame: 31
|
||||
const LegacyText = (require(1305) /* metro dependency 1305: native */).LegacyText;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
const styles = useStyles();
|
||||
const defaultImport = importDefault(3802) /* metro dependency 3802: PremiumUtils */;
|
||||
const getInterval = defaultImport.getInterval;
|
||||
const intervalType = Reflect.apply(getInterval, defaultImport, [basePlanId]).intervalType;
|
||||
const YEAR = SubscriptionIntervalTypes.YEAR;
|
||||
const r12 = intervalType !== YEAR || isCurrentPlan ? null : '-' + PREMIUM_YEARLY_DISCOUNT_PERCENT + '%';
|
||||
const r8 = text ?? (intervalType === SubscriptionIntervalTypes.MONTH ? isGift ? intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.FIjgMp,
|
||||
{price: product?.priceString ?? '$...'}) : intl.formatToPlainString(isCurrentPlan ? t.V6iX43 : t.AbOLNu,
|
||||
{price: product?.priceString ?? '$...'}) : isGift ? intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.rm53bV,
|
||||
{price: product?.priceString ?? '$...'}) : intl.formatToPlainString(isCurrentPlan ? t.dFbQCa : t['rS8FA+'],
|
||||
{price: product?.priceString ?? '$...'}));
|
||||
const formatToPlainString = intl.formatToPlainString;
|
||||
const E0lS2r = (require(1244) /* metro dependency 1244: indexNative */).t.E0lS2r;
|
||||
return (
|
||||
<View style={styles.premiumText}>
|
||||
<LegacyText
|
||||
style={style}
|
||||
numberOfLines={1}
|
||||
accessibilityLabel={Reflect.apply(formatToPlainString, intl, [E0lS2r, {product: product?.title,
|
||||
description: r8}])}
|
||||
>
|
||||
{r8}
|
||||
</LegacyText>
|
||||
{r12 != null ? <View style={styles.discount}><LegacyText style={style} numberOfLines={1}>{r12}</LegacyText></View> : null}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,71 @@
|
||||
/* Metro module 14231; source: modules/premium/native/trials/PremiumTrialOfferActionSheet.tsx; dependencies: [31, 1880, 661, 1376, 33, 6771, 6789, 683, 7506, 5080, 7028, 1962, 3802, 6275, 14232, 2] */
|
||||
function _fun107639(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#107639, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14428:6, offset: 0x02303581, size: 208 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(1880) /* metro dependency 1880: PremiumConstants */).PremiumTypes;
|
||||
const env0_5 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
|
||||
const env0_6 = (require(1376) /* metro dependency 1376: DismissibleContentConstants */).ContentDismissActionType;
|
||||
const env0_7 = (require(33) /* metro dependency 33 */).jsx;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/premium/native/trials/PremiumTrialOfferActionSheet.tsx');
|
||||
exports.default = _default_107640;
|
||||
}
|
||||
|
||||
function _default_107640({markAsDismissed, userTrialOffer, fallbackPremiumType = PremiumTypes.TIER_2}) { // fn#107640, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14428:212, offset: 0x02303651, size: 393 bytes, params: 2, frame: 23
|
||||
let defaultImport = importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */;
|
||||
const PREMIUM_TRIAL_OFFER_ACTION_SHEET = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).PREMIUM_TRIAL_OFFER_ACTION_SHEET;
|
||||
const analyticsLocations = defaultImport(PREMIUM_TRIAL_OFFER_ACTION_SHEET).analyticsLocations;
|
||||
const binding = env0_3;
|
||||
binding.useEffect(_fun107641, []);
|
||||
const value4 = binding.useCallback(function() {
|
||||
var defaultImport = importDefault(dependencyMap[7]);
|
||||
var PREMIUM_TRIAL_OFFER_ACTION_SHEET_DISMISSED = AnalyticEvents.PREMIUM_TRIAL_OFFER_ACTION_SHEET_DISMISSED;
|
||||
defaultImport.track(PREMIUM_TRIAL_OFFER_ACTION_SHEET_DISMISSED, {location: analyticsLocations,
|
||||
trial_id: userTrialOffer.trial_id});
|
||||
markAsDismissed(ContentDismissActionType.USER_DISMISS);
|
||||
}, [analyticsLocations, markAsDismissed, userTrialOffer]);
|
||||
const value5 = binding.useCallback(_fun107643, [analyticsLocations, markAsDismissed, userTrialOffer]);
|
||||
const premiumUtilsModule = require(3802) /* metro dependency 3802: PremiumUtils */;
|
||||
const value6 = premiumUtilsModule.formatIntervalDuration({intervalType: userTrialOffer.subscription_trial?.interval,
|
||||
intervalCount: userTrialOffer.subscription_trial?.interval_count});
|
||||
const BottomSheet = (require(6275) /* metro dependency 6275: BottomSheetNative */).BottomSheet;
|
||||
return (
|
||||
<BottomSheet
|
||||
startExpanded
|
||||
onDismiss={value4}
|
||||
key={userTrialOffer.id}
|
||||
>
|
||||
{((Component) => <Component intervalDuration={value6} trialOffer={userTrialOffer} onConfirm={value5} fallbackPremiumType={fallbackPremiumType} />)(importDefault(14232) /* metro dependency 14232: PremiumTrialOfferActionSheetContent */)}
|
||||
</BottomSheet>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun107641() { // fn#107641, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14428:376, offset: 0x023037da, size: 99 bytes, params: 1, frame: 18
|
||||
const value = environment.__proto__;
|
||||
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
|
||||
const track = defaultImport.track;
|
||||
const PREMIUM_TRIAL_OFFER_ACTION_SHEET_VIEWED = AnalyticEvents.PREMIUM_TRIAL_OFFER_ACTION_SHEET_VIEWED;
|
||||
const userTrialOfferBinding = userTrialOffer;
|
||||
Reflect.apply(track, defaultImport, [PREMIUM_TRIAL_OFFER_ACTION_SHEET_VIEWED, {location: analyticsLocations,
|
||||
trial_id: userTrialOfferBinding.trial_id}]);
|
||||
(importDefault(7506) /* metro dependency 7506: UserTrialActionCreatorsAndroid */).acknowledgeUserTrialOffer(userTrialOfferBinding);
|
||||
}
|
||||
|
||||
function _fun107643() { // fn#107643, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14428:679, offset: 0x0230389c, size: 164 bytes, params: 1, frame: 19
|
||||
let value = environment.__proto__;
|
||||
const defaultImport = importDefault(dependencyMap[7]);
|
||||
const track = defaultImport.track;
|
||||
const PREMIUM_TRIAL_OFFER_ACTION_SHEET_CTA_CLICKED = AnalyticEvents.PREMIUM_TRIAL_OFFER_ACTION_SHEET_CTA_CLICKED;
|
||||
Reflect.apply(track, defaultImport, [PREMIUM_TRIAL_OFFER_ACTION_SHEET_CTA_CLICKED, {location: analyticsLocations,
|
||||
trial_id: userTrialOffer.trial_id}]);
|
||||
const markAsDismissedBinding = markAsDismissed;
|
||||
const TAKE_ACTION = ContentDismissActionType.TAKE_ACTION;
|
||||
markAsDismissedBinding(TAKE_ACTION);
|
||||
const defaultImport2 = importDefault(dependencyMap[9]);
|
||||
const pushLazy = defaultImport2.pushLazy;
|
||||
value = require(dependencyMap[11]);
|
||||
value = value(dependencyMap[10], dependencyMap.paths);
|
||||
Reflect.apply(pushLazy, defaultImport2, [value, {analyticsLocations: analyticsLocations}]);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,77 @@
|
||||
/* Metro module 14232; source: modules/premium/native/trials/PremiumTrialOfferActionSheetContent.tsx; dependencies: [31, 27, 33, 4501, 697, 11441, 1244, 9395, 6685, 5473, 4573, 3802, 14233, 4578, 7954, 2] */
|
||||
function _fun107644(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#107644, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14429:6, offset: 0x02303940, size: 310 bytes, params: 8, frame: 22
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
let value = importAll(31) /* metro dependency 31 */;
|
||||
const env0_3 = (require(27) /* metro dependency 27 */).View;
|
||||
const value2 = require(33) /* metro dependency 33 */;
|
||||
const env0_4 = value2.jsx;
|
||||
const env0_5 = value2.jsxs;
|
||||
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = createStylesModule.createStyles;
|
||||
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
|
||||
const env0_6 = Reflect.apply(createStyles, createStylesModule, [{contentContainer: {'paddingHorizontal': 36,
|
||||
'paddingTop': 18, 'paddingBottom': 36, 'width': '100%', 'backgroundColor': null, 'alignItems': 'flex-start',
|
||||
'display': 'flex', 'flexDirection': 'column', 'gap': 0, backgroundColor: BACKGROUND_BASE_LOW},
|
||||
buttonContainer: {'marginVertical': 6, 'width': '100%', 'height': 48}, title: {'width': '100%',
|
||||
'textAlign': 'center'}, heroIllustrationContainer: {'alignItems': 'center', 'justifyContent': 'center',
|
||||
'height': 188, 'width': '100%'}}]);
|
||||
value = value.memo(PremiumTrialOfferActionSheetContent);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/premium/native/trials/PremiumTrialOfferActionSheetContent.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
function PremiumTrialOfferActionSheetContent({trialOffer, intervalDuration, onConfirm}) { // fn#107645, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14429:585, offset: 0x02303a76, size: 964 bytes, params: 2, frame: 33
|
||||
var r17;
|
||||
var moduleValue;
|
||||
const styles = useStyles();
|
||||
const subscription_trial = trialOffer?.subscription_trial;
|
||||
let object2 = {};
|
||||
const UserIcon = (require(11441) /* metro dependency 11441: UserIcon */).UserIcon;
|
||||
object2.IconComponent = UserIcon;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
object2.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.kpMomJ);
|
||||
object2.description = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.uVUtPw);
|
||||
const items3 = [object2];
|
||||
object2 = {};
|
||||
const ChatSmileIcon = (require(9395) /* metro dependency 9395: ChatSmileIcon */).ChatSmileIcon;
|
||||
object2.IconComponent = ChatSmileIcon;
|
||||
object2.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['R2IV/Q']);
|
||||
object2.description = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['3SUJLd']);
|
||||
items3[1] = object2;
|
||||
object2 = {};
|
||||
const FolderIcon = (require(6685) /* metro dependency 6685: FolderIcon */).FolderIcon;
|
||||
object2.IconComponent = FolderIcon;
|
||||
object2.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['u/NJKc']);
|
||||
object2.description = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.i1UuMk);
|
||||
items3[2] = object2;
|
||||
const NitroWumpusFlightRight3dIllustration = (require(5473) /* metro dependency 5473: native */).NitroWumpusFlightRight3dIllustration;
|
||||
const items2 = [<View style={styles.heroIllustrationContainer}><NitroWumpusFlightRight3dIllustration width={180} height={180} /></View>];
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
let formatToPlainString = intl.formatToPlainString;
|
||||
const q8eMc0 = (require(1244) /* metro dependency 1244: indexNative */).t.q8eMc0;
|
||||
if (subscription_trial?.sku_id != null) {
|
||||
moduleValue = require(3802) /* metro dependency 3802: PremiumUtils */;
|
||||
r17 = moduleValue.getDisplayNameFromSku(subscription_trial?.sku_id);
|
||||
} else {
|
||||
r17 = null;
|
||||
}
|
||||
items2[1] = <Text variant="heading-xl/bold" color="mobile-text-heading-primary" style={styles.title}>{Reflect.apply(formatToPlainString,
|
||||
intl, [q8eMc0, {displayName: r17, duration: intervalDuration}])}</Text>;
|
||||
items2[2] = ((Component) => <Component perks={items3} />)(importDefault(14233) /* metro dependency 14233: PremiumPerksList */);
|
||||
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
|
||||
formatToPlainString = intl.formatToPlainString;
|
||||
const xASjq5 = (require(1244) /* metro dependency 1244: indexNative */).t.xASjq5;
|
||||
const object3 = {duration: intervalDuration};
|
||||
const NitroWheelIcon = (require(7954) /* metro dependency 7954: NitroWheelIcon */).NitroWheelIcon;
|
||||
const WHITE = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.WHITE;
|
||||
items2[3] = <View style={styles.buttonContainer}><Button size="lg" text={Reflect.apply(formatToPlainString, intl,
|
||||
[xASjq5, object3])} onPress={onConfirm} grow icon={<NitroWheelIcon size="md" color={WHITE} />} /></View>;
|
||||
return (
|
||||
<View style={styles.contentContainer}>
|
||||
{items2}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
/* Metro module 7581; source: modules/premium/native/usePremiumPrimaryGradientColors.tsx; dependencies: [3860, 697, 2] */
|
||||
function _fun60830(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#60830, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7759:6, offset: 0x01710e2b, size: 101 bytes, params: 8, frame: 18
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/premium/native/usePremiumPrimaryGradientColors.tsx');
|
||||
exports.default = usePremiumPrimaryGradientColors;
|
||||
}
|
||||
|
||||
function usePremiumPrimaryGradientColors() { // fn#60831, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7759:194, offset: 0x01710e90, size: 160 bytes, params: 1, frame: 18
|
||||
const useTokenModule = require(3860) /* metro dependency 3860: useToken */;
|
||||
let useToken = useTokenModule.useToken;
|
||||
const REDESIGN_BUTTON_PREMIUM_PRIMARY_PURPLE_FOR_GRADIENT = (importDefault(697) /* metro dependency 697: native */).colors.REDESIGN_BUTTON_PREMIUM_PRIMARY_PURPLE_FOR_GRADIENT;
|
||||
const items2 = [Reflect.apply(useToken, useTokenModule, [REDESIGN_BUTTON_PREMIUM_PRIMARY_PURPLE_FOR_GRADIENT])];
|
||||
let value = useTokenModule;
|
||||
useToken = value.useToken;
|
||||
const REDESIGN_BUTTON_PREMIUM_PRIMARY_PURPLE_FOR_GRADIENT_2 = (importDefault(697) /* metro dependency 697: native */).colors.REDESIGN_BUTTON_PREMIUM_PRIMARY_PURPLE_FOR_GRADIENT_2;
|
||||
items2[1] = Reflect.apply(useToken, value, [REDESIGN_BUTTON_PREMIUM_PRIMARY_PURPLE_FOR_GRADIENT_2]);
|
||||
value = useTokenModule;
|
||||
useToken = value.useToken;
|
||||
const REDESIGN_BUTTON_PREMIUM_PRIMARY_PINK_FOR_GRADIENT = (importDefault(697) /* metro dependency 697: native */).colors.REDESIGN_BUTTON_PREMIUM_PRIMARY_PINK_FOR_GRADIENT;
|
||||
items2[2] = Reflect.apply(useToken, value, [REDESIGN_BUTTON_PREMIUM_PRIMARY_PINK_FOR_GRADIENT]);
|
||||
return items2;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
/* Metro module 7031; source: modules/premium/native/useStoreConnectionErrorAlert.tsx; dependencies: [31, 5140, 566, 4647, 1244, 2] */
|
||||
function _fun55731(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#55731, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7209:6, offset: 0x013afa9c, size: 135 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importAll(31) /* metro dependency 31 */;
|
||||
const iapStoreAndroid = importDefault(5140) /* metro dependency 5140: IAPStoreAndroid */;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/premium/native/useStoreConnectionErrorAlert.tsx');
|
||||
exports.default = useStoreConnectionErrorAlert;
|
||||
}
|
||||
|
||||
function useStoreConnectionErrorAlert() { // fn#55732, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7209:215, offset: 0x013afb23, size: 89 bytes, params: 1, frame: 16
|
||||
env0_3.useEffect(_fun55734, [(require(566) /* metro dependency 566: flux */).useStateFromStores([IAPStoreAndroid],
|
||||
function() {
|
||||
return IAPStoreAndroid.hasConnectionError();
|
||||
})]);
|
||||
}
|
||||
|
||||
function _fun55734() { // fn#55734, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7209:335, offset: 0x013afb91, size: 160 bytes, params: 1, frame: 18
|
||||
var defaultImport;
|
||||
var show;
|
||||
var object2;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
if (env0_0) {
|
||||
value = environment.__proto__;
|
||||
defaultImport = importDefault(4647) /* metro dependency 4647: AlertActionCreators */;
|
||||
show = defaultImport.show;
|
||||
object2 = {};
|
||||
object2.title = intl.string(t['U+H+kd']);
|
||||
object2.body = intl.string(t.Q9OYlM);
|
||||
Reflect.apply(show, defaultImport, [object2]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,114 @@
|
||||
/* Metro module 7644; source: modules/premium/native/utils/GiftAnimationData.tsx; dependencies: [1880, 7643, 7645, 7646, 7647, 7648, 7649, 7650, 7651, 7652, 7653, 7654, 7655, 7656, 7657, 7658, 7659, 7660, 7661, 7662, 7663, 7664, 7665, 7666, 7667, 7668, 2] */
|
||||
function _fun61202(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#61202, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7822:6, offset: 0x0171ddf5, size: 169 bytes, params: 8, frame: 18
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_2 = (require(1880) /* metro dependency 1880: PremiumConstants */).PremiumGiftStyles;
|
||||
object2 = {JSON: 0};
|
||||
object2[0] = 'JSON';
|
||||
object2.LOTTIE = 1;
|
||||
object2[1] = 'LOTTIE';
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/premium/native/utils/GiftAnimationData.tsx');
|
||||
exports.LottieType = object2;
|
||||
exports.getLottieType = getLottieType;
|
||||
exports.getGiftAnimationData = getGiftAnimationData;
|
||||
}
|
||||
|
||||
function getLottieType(a0) { // fn#61203, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7822:310, offset: 0x0171de9e, size: 44 bytes, params: 2, frame: 3
|
||||
const NITROWEEN_STANDARD = PremiumGiftStyles.NITROWEEN_STANDARD;
|
||||
return a0 === NITROWEEN_STANDARD ? env0_3.LOTTIE : env0_3.JSON;
|
||||
}
|
||||
|
||||
function getGiftAnimationData(a0, a1) { // fn#61204, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7822:408, offset: 0x0171deca, size: 1292 bytes, params: 3, frame: 14
|
||||
const AnimationState = (require(7643) /* metro dependency 7643: PremiumGiftingUtils */).AnimationState;
|
||||
const STANDARD_BOX = PremiumGiftStyles.STANDARD_BOX;
|
||||
if (STANDARD_BOX === a0) {
|
||||
if (AnimationState.IDLE === a1) {
|
||||
return require(7645) /* metro dependency 7645 */;
|
||||
}
|
||||
if (AnimationState.LOOP === a1) {
|
||||
return require(7646) /* metro dependency 7646 */;
|
||||
}
|
||||
return require(7647) /* metro dependency 7647 */;
|
||||
}
|
||||
const CAKE = PremiumGiftStyles.CAKE;
|
||||
if (CAKE === a0) {
|
||||
if (AnimationState.IDLE === a1) {
|
||||
return require(7648) /* metro dependency 7648 */;
|
||||
}
|
||||
if (AnimationState.LOOP === a1) {
|
||||
return require(7649) /* metro dependency 7649 */;
|
||||
}
|
||||
return require(7650) /* metro dependency 7650 */;
|
||||
}
|
||||
const CHEST = PremiumGiftStyles.CHEST;
|
||||
if (CHEST === a0) {
|
||||
if (AnimationState.IDLE === a1) {
|
||||
return require(7651) /* metro dependency 7651 */;
|
||||
}
|
||||
if (AnimationState.LOOP === a1) {
|
||||
return require(7652) /* metro dependency 7652 */;
|
||||
}
|
||||
return require(7653) /* metro dependency 7653 */;
|
||||
}
|
||||
const COFFEE = PremiumGiftStyles.COFFEE;
|
||||
if (COFFEE === a0) {
|
||||
if (AnimationState.IDLE === a1) {
|
||||
return require(7654) /* metro dependency 7654 */;
|
||||
}
|
||||
if (AnimationState.LOOP === a1) {
|
||||
return require(7655) /* metro dependency 7655 */;
|
||||
}
|
||||
return require(7656) /* metro dependency 7656 */;
|
||||
}
|
||||
const SEASONAL_STANDARD_BOX = PremiumGiftStyles.SEASONAL_STANDARD_BOX;
|
||||
if (SEASONAL_STANDARD_BOX === a0) {
|
||||
if (AnimationState.IDLE === a1) {
|
||||
return require(7657) /* metro dependency 7657 */;
|
||||
}
|
||||
if (AnimationState.LOOP === a1) {
|
||||
return require(7658) /* metro dependency 7658 */;
|
||||
}
|
||||
return require(7659) /* metro dependency 7659 */;
|
||||
}
|
||||
const SEASONAL_CAKE = PremiumGiftStyles.SEASONAL_CAKE;
|
||||
if (SEASONAL_CAKE === a0) {
|
||||
if (AnimationState.IDLE === a1) {
|
||||
return require(7660) /* metro dependency 7660 */;
|
||||
}
|
||||
if (AnimationState.LOOP === a1) {
|
||||
return require(7661) /* metro dependency 7661 */;
|
||||
}
|
||||
return require(7662) /* metro dependency 7662 */;
|
||||
}
|
||||
const SEASONAL_CHEST = PremiumGiftStyles.SEASONAL_CHEST;
|
||||
if (SEASONAL_CHEST === a0) {
|
||||
if (AnimationState.IDLE === a1) {
|
||||
return require(7663) /* metro dependency 7663 */;
|
||||
}
|
||||
if (AnimationState.LOOP === a1) {
|
||||
return require(7664) /* metro dependency 7664 */;
|
||||
}
|
||||
return require(7665) /* metro dependency 7665 */;
|
||||
}
|
||||
const SEASONAL_COFFEE = PremiumGiftStyles.SEASONAL_COFFEE;
|
||||
if (SEASONAL_COFFEE === a0) {
|
||||
if (AnimationState.IDLE === a1) {
|
||||
return require(7666) /* metro dependency 7666 */;
|
||||
}
|
||||
if (AnimationState.LOOP === a1) {
|
||||
return require(7667) /* metro dependency 7667 */;
|
||||
}
|
||||
return require(7668) /* metro dependency 7668 */;
|
||||
}
|
||||
const SNOWGLOBE = PremiumGiftStyles.SNOWGLOBE;
|
||||
if (SNOWGLOBE !== a0) {
|
||||
if (PremiumGiftStyles.BOX !== a0) {
|
||||
PremiumGiftStyles.CUP;
|
||||
}
|
||||
}
|
||||
const Error = global.Error;
|
||||
throw Error();
|
||||
}
|
||||
|
||||
@@ -0,0 +1,211 @@
|
||||
/* Metro module 7022; source: modules/premium/native/utils/PremiumManagementUtils.tsx; dependencies: [661, 482, 33, 3, 4496, 1244, 477, 1581, 7023, 7025, 2] */
|
||||
function _fun55645(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#55645, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7200:6, offset: 0x013acb19, size: 316 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = (require(661) /* metro dependency 661: Constants */).SubscriptionStatusTypes;
|
||||
const env0_4 = (require(482) /* metro dependency 482: Constants */).PaymentGatewayToFriendlyName;
|
||||
const env0_5 = (require(33) /* metro dependency 33 */).jsx;
|
||||
let value = importDefault(3) /* metro dependency 3: Logger */;
|
||||
value = new value('PremiumManagementUtils');
|
||||
const closure = getPremiumManagementMethod;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/premium/native/utils/PremiumManagementUtils.tsx');
|
||||
exports.MobileWebDestinationTypes = {PREMIUM_MANAGEMENT: 'premium_management'};
|
||||
exports.PremiumManagementMethod = {IN_APP: 'manage_in_app',
|
||||
IN_EXTERNAL_MOBILE_PAYMENT_GATEWAY: 'manage_in_external_mobile_payment_gateway', IN_WEB: 'manage_in_web'};
|
||||
exports.getPremiumManagementMethod = closure;
|
||||
exports.getExternalManagementMessage = getExternalManagementMessage;
|
||||
}
|
||||
|
||||
function getPremiumManagementMethod(a0) { // fn#55646, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7200:480, offset: 0x013acc55, size: 90 bytes, params: 2, frame: 4
|
||||
const value = null;
|
||||
return value == a0 ? value : a0.isOnPlatformMatchingExternalPaymentGateway ? env0_7.IN_APP : a0.isPurchasedExternally && value != a0.paymentGateway ? env0_7.IN_EXTERNAL_MOBILE_PAYMENT_GATEWAY : env0_7.IN_WEB;
|
||||
}
|
||||
|
||||
function defaultMobileWebNitroManagementSuccessCallback() { // fn#55647, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7200:691, offset: 0x013accaf, size: 26 bytes, params: 1, frame: 11
|
||||
return env0_6.log('Successfully opened mobile web Nitro Management page');
|
||||
}
|
||||
|
||||
function defaultMobileWebNitroManagementFailureCallback(a0) { // fn#55648, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7200:804, offset: 0x013accc9, size: 174 bytes, params: 2, frame: 19
|
||||
env0_6.error('Failed to open mobile web Nitro Management page, error response: ', a0);
|
||||
const defaultImport = importDefault(4496) /* metro dependency 4496: AlertActionCreators */;
|
||||
const show = defaultImport.show;
|
||||
const object2 = {};
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const string = intl.string;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
const NrBVjw = t.NrBVjw;
|
||||
object2.title = Reflect.apply(string, intl, [NrBVjw]);
|
||||
object2.body = intl.string(t['gD+grx']);
|
||||
object2.hideActionSheet = true;
|
||||
Reflect.apply(show, defaultImport, [object2]);
|
||||
}
|
||||
|
||||
function getExternalManagementMessage(a0) { // fn#55649, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7200:1248, offset: 0x013acd77, size: 708 bytes, params: 2, frame: 24
|
||||
var r1;
|
||||
var r7;
|
||||
var status;
|
||||
var r9;
|
||||
var moduleValue3;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
var closure;
|
||||
const LinkButton = (require(7025) /* metro dependency 7025: LinkButton */).LinkButton;
|
||||
const value = a1;
|
||||
const value2 = undefined;
|
||||
const env0_0 = value !== value2 ? value : null;
|
||||
const premiumManagementMethod = getPremiumManagementMethod(a0);
|
||||
if (premiumManagementMethod != null) {
|
||||
var IN_APP = env0_7.IN_APP;
|
||||
if (premiumManagementMethod === IN_APP) {
|
||||
return null;
|
||||
}
|
||||
var isIOS2 = (require(477) /* metro dependency 477: PlatformUtils */).isIOS();
|
||||
var value4 = 'iOS';
|
||||
r7 = isIOS2 ? value4 : (require(1581) /* metro dependency 1581: MetaQuestUtilsAndroid */).isMetaQuest() ? 'Meta Quest' : 'Android';
|
||||
var IN_EXTERNAL_MOBILE_PAYMENT_GATEWAY = env0_7.IN_EXTERNAL_MOBILE_PAYMENT_GATEWAY;
|
||||
if (premiumManagementMethod !== IN_EXTERNAL_MOBILE_PAYMENT_GATEWAY) {
|
||||
if (premiumManagementMethod === env0_7.IN_WEB) {
|
||||
if (r1 == null) {
|
||||
return intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.CnoyAN,
|
||||
{mobilePlatform: r7});
|
||||
}
|
||||
if (r1.shouldAllowExternalManagement) {
|
||||
if (value4 === r7) {
|
||||
closure = manageExternalNitroSubscription;
|
||||
status = a0 == null ? value2 : a0.status;
|
||||
r9 = status === SubscriptionStatusTypes.CANCELED || status === SubscriptionStatusTypes.PAUSE_PENDING;
|
||||
r9 = !r9 ? status === SubscriptionStatusTypes.PAST_DUE : r9;
|
||||
r1 = r1.returnCtaAsComponent ? <LinkButton containerStyle={{justifyContent: 'flex-start'}} onPress={function() {
|
||||
return manageExternalNitroSubscription();
|
||||
}} text={intl.string(r9 ? t.tqSSSA : t['olSp/D'])} variant="text-sm/semibold" /> : intl.format((require(1244) /* metro dependency 1244: indexNative */).t.IERwUb,
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
{manageExternalNitroSubscription: closure});
|
||||
return r1;
|
||||
}
|
||||
moduleValue3 = require(1581) /* metro dependency 1581: MetaQuestUtilsAndroid */;
|
||||
if (moduleValue3.isMetaQuest()) {
|
||||
closure = manageExternalNitroSubscription;
|
||||
status = a0 == null ? value2 : a0.status;
|
||||
r9 = status === SubscriptionStatusTypes.CANCELED || status === SubscriptionStatusTypes.PAUSE_PENDING;
|
||||
r9 = !r9 ? status === SubscriptionStatusTypes.PAST_DUE : r9;
|
||||
r1 = r1.returnCtaAsComponent ? <LinkButton containerStyle={{justifyContent: 'flex-start'}} onPress={onPress_55651} text={intl.string(r9 ? t.tqSSSA : t['olSp/D'])} variant="text-sm/semibold" /> : intl.format((require(1244) /* metro dependency 1244: indexNative */).t.IERwUb,
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
{manageExternalNitroSubscription: closure});
|
||||
return r1;
|
||||
}
|
||||
return intl.formatToPlainString(t.CnoyAN, {mobilePlatform: r7});
|
||||
}
|
||||
return intl.formatToPlainString(t.CnoyAN, {mobilePlatform: r7});
|
||||
}
|
||||
return null;
|
||||
}
|
||||
if (a0 == null) {
|
||||
if (premiumManagementMethod === env0_7.IN_WEB) {
|
||||
if (r1 == null) {
|
||||
return intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.CnoyAN,
|
||||
{mobilePlatform: r7});
|
||||
}
|
||||
if (r1.shouldAllowExternalManagement) {
|
||||
if (value4 === r7) {
|
||||
closure = manageExternalNitroSubscription;
|
||||
status = a0 == null ? value2 : a0.status;
|
||||
r9 = status === SubscriptionStatusTypes.CANCELED || status === SubscriptionStatusTypes.PAUSE_PENDING;
|
||||
r9 = !r9 ? status === SubscriptionStatusTypes.PAST_DUE : r9;
|
||||
r1 = r1.returnCtaAsComponent ? <LinkButton containerStyle={{justifyContent: 'flex-start'}} onPress={function() {
|
||||
return manageExternalNitroSubscription();
|
||||
}} text={intl.string(r9 ? t.tqSSSA : t['olSp/D'])} variant="text-sm/semibold" /> : intl.format((require(1244) /* metro dependency 1244: indexNative */).t.IERwUb,
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
{manageExternalNitroSubscription: closure});
|
||||
return r1;
|
||||
}
|
||||
moduleValue3 = require(1581) /* metro dependency 1581: MetaQuestUtilsAndroid */;
|
||||
if (moduleValue3.isMetaQuest()) {
|
||||
closure = manageExternalNitroSubscription;
|
||||
status = a0 == null ? value2 : a0.status;
|
||||
r9 = status === SubscriptionStatusTypes.CANCELED || status === SubscriptionStatusTypes.PAUSE_PENDING;
|
||||
r9 = !r9 ? status === SubscriptionStatusTypes.PAST_DUE : r9;
|
||||
r1 = r1.returnCtaAsComponent ? <LinkButton containerStyle={{justifyContent: 'flex-start'}} onPress={onPress_55651} text={intl.string(r9 ? t.tqSSSA : t['olSp/D'])} variant="text-sm/semibold" /> : intl.format((require(1244) /* metro dependency 1244: indexNative */).t.IERwUb,
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
{manageExternalNitroSubscription: closure});
|
||||
return r1;
|
||||
}
|
||||
return intl.formatToPlainString(t.CnoyAN, {mobilePlatform: r7});
|
||||
}
|
||||
return intl.formatToPlainString(t.CnoyAN, {mobilePlatform: r7});
|
||||
}
|
||||
return null;
|
||||
}
|
||||
if (a0.paymentGateway != null) {
|
||||
return intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.cFZnqX,
|
||||
{mobilePlatform: r7, externalPaymentGateway: PaymentGatewayToFriendlyName[a0.paymentGateway]});
|
||||
}
|
||||
if (premiumManagementMethod === env0_7.IN_WEB) {
|
||||
if (r1 == null) {
|
||||
return intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.CnoyAN,
|
||||
{mobilePlatform: r7});
|
||||
}
|
||||
if (r1.shouldAllowExternalManagement) {
|
||||
if (value4 === r7) {
|
||||
closure = manageExternalNitroSubscription;
|
||||
status = a0 == null ? value2 : a0.status;
|
||||
r9 = status === SubscriptionStatusTypes.CANCELED || status === SubscriptionStatusTypes.PAUSE_PENDING;
|
||||
r9 = !r9 ? status === SubscriptionStatusTypes.PAST_DUE : r9;
|
||||
r1 = r1.returnCtaAsComponent ? <LinkButton containerStyle={{justifyContent: 'flex-start'}} onPress={function() {
|
||||
return manageExternalNitroSubscription();
|
||||
}} text={intl.string(r9 ? t.tqSSSA : t['olSp/D'])} variant="text-sm/semibold" /> : intl.format((require(1244) /* metro dependency 1244: indexNative */).t.IERwUb,
|
||||
|
||||
|
||||
|
||||
|
||||
{manageExternalNitroSubscription: closure});
|
||||
return r1;
|
||||
}
|
||||
moduleValue3 = require(1581) /* metro dependency 1581: MetaQuestUtilsAndroid */;
|
||||
if (moduleValue3.isMetaQuest()) {
|
||||
closure = manageExternalNitroSubscription;
|
||||
status = a0 == null ? value2 : a0.status;
|
||||
r9 = status === SubscriptionStatusTypes.CANCELED || status === SubscriptionStatusTypes.PAUSE_PENDING;
|
||||
r9 = !r9 ? status === SubscriptionStatusTypes.PAST_DUE : r9;
|
||||
r1 = r1.returnCtaAsComponent ? <LinkButton containerStyle={{justifyContent: 'flex-start'}} onPress={onPress_55651} text={intl.string(r9 ? t.tqSSSA : t['olSp/D'])} variant="text-sm/semibold" /> : intl.format((require(1244) /* metro dependency 1244: indexNative */).t.IERwUb,
|
||||
|
||||
|
||||
|
||||
|
||||
{manageExternalNitroSubscription: closure});
|
||||
return r1;
|
||||
}
|
||||
return intl.formatToPlainString(t.CnoyAN, {mobilePlatform: r7});
|
||||
}
|
||||
return intl.formatToPlainString(t.CnoyAN, {mobilePlatform: r7});
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
function manageExternalNitroSubscription() { // fn#55650, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7200:1773, owner: getExternalManagementMessage.manageExternalNitroSubscription, offset: 0x013ad03b, size: 133 bytes, params: 1, frame: 19
|
||||
const billingStandaloneNativeUtilsModule = require(7023) /* metro dependency 7023: BillingStandaloneNativeUtils */;
|
||||
const goToStandaloneNitroManagementFromMobileApp = billingStandaloneNativeUtilsModule.goToStandaloneNitroManagementFromMobileApp;
|
||||
const binding = env0_0;
|
||||
return Reflect.apply(goToStandaloneNitroManagementFromMobileApp, billingStandaloneNativeUtilsModule,
|
||||
['premium_external_management', {loadId: binding.loadId},
|
||||
binding.onSuccessCallback != null ? env0_0.onSuccessCallback : defaultMobileWebNitroManagementSuccessCallback,
|
||||
env0_0.onFailureCallback ?? defaultMobileWebNitroManagementFailureCallback]);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
/* Metro module 10381; source: modules/premium/native/utils/openGiftModal.tsx; dependencies: [5080, 10382, 1962, 2] */
|
||||
function _fun80410(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#80410, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10567:6, offset: 0x01e7988c, size: 103 bytes, params: 8, frame: 18
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/premium/native/utils/openGiftModal.tsx');
|
||||
exports.openGiftModal = function(a0) {
|
||||
var navigationParams = a0.navigationParams;
|
||||
var value = Object.create(null);
|
||||
value.navigationParams = 0;
|
||||
value = copyDataProperties({}, a0, value, navigationParams);
|
||||
importDefault(dependencyMap[0]).pushLazy(require(dependencyMap[2])(dependencyMap[1], dependencyMap.paths),
|
||||
value,
|
||||
'gift_modal_key', navigationParams);
|
||||
};
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user