569 lines
32 KiB
TypeScript
569 lines
32 KiB
TypeScript
/* Metro module 10184; source: modules/quests/native/QuestOrbsRewardModal.native.tsx; dependencies: [57, 5, 31, 27, 4502, 1878, 7030, 6528, 661, 663, 33, 5080, 10184, 1962, 4501, 697, 5287, 5312, 1244, 5475, 7897, 478, 10142, 9543, 10143, 10185, 10186, 10187, 566, 10069, 676, 9500, 7717, 5120, 6789, 9480, 6531, 9511, 6618, 4573, 10076, 4578, 2] */
|
|
import Module00005 from '../../../by-id/module-00005.js'; /* Metro dependency 5 */
|
|
import Module00057 from '../../../by-id/module-00057.js'; /* Metro dependency 57 */
|
|
import Native from '../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
|
|
import UserStore from '../../../stores/UserStore.tsx'; /* Metro dependency 1878 */
|
|
import AccessibilityStore from '../../a11y/AccessibilityStore.tsx'; /* Metro dependency 4502 */
|
|
import ModalActionCreators from '../../../actions/ModalActionCreators.tsx'; /* Metro dependency 5080 */
|
|
import FastImage from '../../../components_native/common/FastImage.tsx'; /* Metro dependency 5475 */
|
|
import AppStateStore from '../../../stores/native/AppStateStore.tsx'; /* Metro dependency 7030 */
|
|
import Quest_reward_mobile_bg_staticPng from '../../../external/discord_assets/assets/orbs/quest_reward_mobile_bg_static.png.js'; /* Metro dependency 10142 */
|
|
import Static_idle_orbPng from '../../../external/discord_assets/assets/orbs/static_idle_orb.png.js'; /* Metro dependency 10185 */
|
|
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
|
|
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
|
|
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
|
|
import * as JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
|
|
import * as PlatformUtilsModule from '../../../external/discord_common/js/shared/utils/PlatformUtils.tsx'; /* Metro dependency 478 */
|
|
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
|
|
import * as CollectiblesShopConstantsModule from '../../collectibles/CollectiblesShopConstants.tsx'; /* Metro dependency 663 */
|
|
import * as ConstantsIOSModule from '../../../ConstantsIOS.tsx'; /* Metro dependency 676 */
|
|
import * as IndexNativeModule from '../../../intl/index.native.tsx'; /* Metro dependency 1244 */
|
|
import * as CreateStylesModule from '../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
|
|
import * as TextModule from '../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
|
|
import * as ButtonNativeModule from '../../../design/components/Button/native/Button.native.tsx'; /* Metro dependency 4578 */
|
|
import * as CollectiblesActionCreatorsModule from '../../collectibles/CollectiblesActionCreators.tsx'; /* Metro dependency 5120 */
|
|
import * as Module05287Module from '../../../by-id/module-05287.js'; /* Metro dependency 5287 */
|
|
import * as XSmallIconModule from '../../../design/components/Icon/native/redesign/generated/XSmallIcon.tsx'; /* Metro dependency 5312 */
|
|
import * as QuestConstantsModule from '../QuestConstants.tsx'; /* Metro dependency 6528 */
|
|
import * as DeviceOrientationModule from '../../device/native/DeviceOrientation.tsx'; /* Metro dependency 7717 */
|
|
import * as APNGPlayerAndroidModule from '../../image/native/APNGPlayer.android.tsx'; /* Metro dependency 7897 */
|
|
import * as ExperimentsModule from '../experiments/index.tsx'; /* Metro dependency 9511 */
|
|
import * as HooksModule from '../../virtual_currency/hooks/index.tsx'; /* Metro dependency 10069 */
|
|
import * as OrbsIconModule from '../../../design/components/Icon/native/redesign/generated/OrbsIcon.tsx'; /* Metro dependency 10076 */
|
|
|
|
function _fun79254(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#79254, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10370:6, offset: 0x01e4acdd, size: 649 bytes, params: 8, frame: 24
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
const value = ReactModule;
|
|
const createStyles = CreateStylesModule.createStyles;
|
|
object = {};
|
|
const PX_16 = (Native).space.PX_16;
|
|
object.closeButton = {'alignSelf': 'flex-start', 'marginHorizontal': null, 'zIndex': 999, marginHorizontal: PX_16};
|
|
const WHITE = (Native).colors.WHITE;
|
|
object.closeButtonIcon = {tintColor: WHITE};
|
|
const env0_17 = Reflect.apply(createStyles, CreateStylesModule, [object]);
|
|
const env0_18 = CreateStylesModule.createStyles(_fun79262);
|
|
const env0_20 = value.memo(_fun79266);
|
|
const env0_21 = value.memo(_fun79268);
|
|
const env0_22 = value.memo(_fun79270);
|
|
const env0_23 = value.memo(_fun79271);
|
|
const env0_24 = CreateStylesModule.createStyles({animatedOrb: {'position': 'absolute', 'height': '130%',
|
|
'width': '130%', 'left': '-15%', 'top': '-15%', 'pointerEvents': 'none'}});
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/quests/native/QuestOrbsRewardModal.native.tsx');
|
|
exports.default = _default_79272;
|
|
exports.openQuestOrbsRewardModal = openQuestOrbsRewardModal;
|
|
function StaticOrb() { // fn#79255, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10370:2726, offset: 0x01e4af66, size: 124 bytes, params: 1, frame: 21
|
|
const styles = useStyles();
|
|
return (
|
|
<View style={{'width': '100%', 'height': '100%'}}>
|
|
{((Component) => <Component source={{uri: Static_idle_orbPng}} style={styles.animatedOrb} fade={false} />)(FastImage)}
|
|
</View>
|
|
);
|
|
}
|
|
|
|
function AnimatedOrbContainer({isAppActive}) { // fn#79256, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10370:2879, offset: 0x01e4afe2, size: 511 bytes, params: 2, frame: 28
|
|
const styles = useStyles();
|
|
let binding = env0_5;
|
|
const [property, env0_1] = env0_3Binding(binding.useState(false), 2);
|
|
var [property2, env0_3] = env0_3Binding(env0_5.useState(false), 2);
|
|
const [property3, env0_4] = env0_3Binding(env0_5.useState(true), 2);
|
|
const value8 = env0_5.useCallback(_fun79257, []);
|
|
const value9 = env0_5.useCallback(_fun79258, []);
|
|
env0_5.useEffect(_fun79259, [property, property2]);
|
|
const items2 = [
|
|
!property && !property2 && <View style={{height: '100%'}} />,
|
|
];
|
|
binding = env0_22;
|
|
items2[1] = ((Component) => <Component uri={importDefault(10186) /* metro dependency 10186: quest_reward_mobile_idle_darkPng */} style={[styles.animatedOrb,
|
|
(property3 || !property2) && ({opacity: 0})]} onLoad={value9} animate={!property3 && isAppActive} />)(binding);
|
|
items2[2] = property3 && ((Component) => <Component uri={importDefault(10187) /* metro dependency 10187: quest_reward_mobile_entry_darkPng */} style={[styles.animatedOrb]} onLoad={value8} animate={isAppActive} />)(env0_22);
|
|
return (
|
|
<View style={{'width': '100%', 'height': '100%'}}>
|
|
{items2}
|
|
</View>
|
|
);
|
|
function _fun79257() { // fn#79257, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10370:3073, offset: 0x01d4f9cc, size: 18 bytes, params: 1, frame: 11
|
|
env0_1(true);
|
|
}
|
|
|
|
function _fun79258() { // fn#79258, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10370:3107, offset: 0x01e4b1e1, size: 18 bytes, params: 1, frame: 11
|
|
env0_3(true);
|
|
}
|
|
|
|
function _fun79259() { // fn#79259, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10370:3144, offset: 0x01e4b1f3, size: 65 bytes, params: 1, frame: 14
|
|
if (env0_0) {
|
|
if (env0_2) {
|
|
var env0_0 = global.setTimeout(_fun79260, 1450);
|
|
return _fun79261;
|
|
}
|
|
}
|
|
function _fun79260() { // fn#79260, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10370:3176, offset: 0x0101b7c8, size: 18 bytes, params: 1, frame: 11
|
|
env1_4(false);
|
|
}
|
|
|
|
function _fun79261() { // fn#79261, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10370:3201, offset: 0x016d7e7e, size: 24 bytes, params: 1, frame: 11
|
|
return global.clearTimeout(env0_0);
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
function _fun79262() { // fn#79262, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10370:542, offset: 0x01e4b234, size: 350 bytes, params: 1, frame: 18
|
|
const object = {};
|
|
let BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
|
|
object.root = {flex: 1, backgroundColor: BACKGROUND_BASE_LOW};
|
|
object.background = StyleSheet.absoluteFillObject;
|
|
const object3 = {'justifyContent': 'center', 'alignItems': 'center'};
|
|
BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
|
|
object3.backgroundColor = BACKGROUND_BASE_LOW;
|
|
copyDataProperties(object3, StyleSheet.absoluteFillObject, BACKGROUND_BASE_LOW);
|
|
object.loading = object3;
|
|
object.header = {'flexDirection': 'row', 'alignItems': 'flex-end', 'justifyContent': 'flex-end'};
|
|
object.main = {flex: 2};
|
|
object.animation = {flex: 3};
|
|
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
|
object.body = {'flex': 2, 'flexDirection': 'column', 'justifyContent': 'center', gap: PX_16};
|
|
const PX_32 = (importDefault(697) /* metro dependency 697: native */).space.PX_32;
|
|
object.title = {textAlign: 'center', marginHorizontal: PX_32};
|
|
const object6 = {};
|
|
const PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
|
|
object6.padding = PX_24;
|
|
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
|
object6.gap = PX_16;
|
|
object.buttonsContainer = object6;
|
|
object.orbsIconAndroid = {transform: [{translateY: 3}]};
|
|
object.orbsIconIOS = {'marginTop': 0, 'marginRight': 3};
|
|
return object;
|
|
}
|
|
|
|
function CancelButton_79263() { // fn#79263, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10370:1212, offset: 0x01e4b392, size: 150 bytes, params: 1, frame: 19
|
|
const styles = useStyles();
|
|
const HeaderBackButton = (Module05287Module).HeaderBackButton;
|
|
const object = {onPress: onPress_79264, backImage: backImage_79265};
|
|
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
|
object.accessibilityLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.cpT0Cq);
|
|
object.labelVisible = false;
|
|
object.style = styles.closeButton;
|
|
return <HeaderBackButton {...object} />;
|
|
function CancelButton_79263OnPress() { // fn#79264, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10370:1271, owner: CancelButton_79263.onPress, offset: 0x01e4b428, size: 44 bytes, params: 1, frame: 12
|
|
const value = environment.__proto__;
|
|
(ModalActionCreators).popWithKey('QuestOrbsRewardModal');
|
|
}
|
|
|
|
function CancelButton_79263BackImage() { // fn#79265, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10370:1310, owner: CancelButton_79263.backImage, offset: 0x01e4b454, size: 78 bytes, params: 1, frame: 15
|
|
const XSmallIcon = (XSmallIconModule).XSmallIcon;
|
|
return <XSmallIcon size="lg" style={[styles.closeButtonIcon]} />;
|
|
}
|
|
|
|
}
|
|
|
|
function _fun79266({uri, onLoad, animate}) { // fn#79266, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10370:1483, offset: 0x01e4b4a2, size: 184 bytes, params: 2, frame: 20
|
|
animate = animate === undefined || animate;
|
|
env0_5.useEffect(_fun79267, [uri]);
|
|
return ((Component) => <Component source={{uri: uri}} style={{'width': '100%',
|
|
'height': '100%'}} resizeMode="cover" enableAnimation={animate} onLoad={onLoad} usesSmallCache={false} fade={false} key={'orb-animate-' + animate} />)(FastImage);
|
|
function _fun79267() { // fn#79267, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10370:1543, offset: 0x01e4b55a, size: 45 bytes, params: 1, frame: 12
|
|
let value = environment.__proto__;
|
|
value = importDefault(5475) /* metro dependency 5475: FastImage */;
|
|
value.preload(uri);
|
|
}
|
|
|
|
}
|
|
|
|
function _fun79268({uri, onLoad, animate}) { // fn#79268, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10370:1743, offset: 0x01e4b587, size: 193 bytes, params: 2, frame: 23
|
|
animate = animate === undefined || animate;
|
|
const value2 = env0_5.useRef(null);
|
|
env0_5.useEffect(_fun79269, [animate,
|
|
(APNGPlayerAndroidModule).useAPNGPlayerControls(value2)]);
|
|
const APNGPlayer = (APNGPlayerAndroidModule).APNGPlayer;
|
|
return (
|
|
<APNGPlayer
|
|
ref={value2}
|
|
url={uri}
|
|
autoplay={false}
|
|
style={{'width': '100%', 'height': '100%'}}
|
|
onLoad={onLoad}
|
|
/>
|
|
);
|
|
function _fun79269() { // fn#79269, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10370:1860, offset: 0x01e4b648, size: 40 bytes, params: 1, frame: 9
|
|
const animateBinding = animate;
|
|
const binding = env0_1;
|
|
if (animateBinding) {
|
|
binding.play();
|
|
} else {
|
|
binding.stop();
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
function _fun79270({uri, style, onLoad, animate}) { // fn#79270, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10370:2000, offset: 0x01e4b670, size: 141 bytes, params: 2, frame: 19
|
|
animate = animate === undefined || animate;
|
|
return (
|
|
<View
|
|
style={style}
|
|
renderToHardwareTextureAndroid
|
|
needsOffscreenAlphaCompositing
|
|
>
|
|
{((Component) => <Component uri={uri} onLoad={onLoad} animate={animate} />)(PlatformUtilsModule.isAndroid() ? env0_21 : env0_20)}
|
|
</View>
|
|
);
|
|
}
|
|
|
|
function _fun79271({useReducedMotion, style, onStaticBgLoad, onAnimatedBgLoad, isAppActive}) { // fn#79271, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10370:2223, offset: 0x01e4b6fd, size: 250 bytes, params: 2, frame: 26
|
|
var VideoComponent;
|
|
var object2;
|
|
const Fragment = env0_5.Fragment;
|
|
const value2 = ((Component) => <Component source={{uri: Quest_reward_mobile_bg_staticPng}} style={style} resizeMode="cover" onLoad={onStaticBgLoad} />)(FastImage);
|
|
let r5 = !useReducedMotion && isAppActive;
|
|
if (r5) {
|
|
VideoComponent = (require(9543) /* metro dependency 9543: Video */).VideoComponent;
|
|
object2 = {};
|
|
object2.uri = importDefault(10143) /* metro dependency 10143: quest_reward_mobile_bgMp4 */;
|
|
r5 = (
|
|
<VideoComponent
|
|
source={object2}
|
|
style={style}
|
|
resizeMode="cover"
|
|
onLoad={onAnimatedBgLoad}
|
|
disableFocus
|
|
playInBackground
|
|
preventsDisplaySleepDuringVideoPlayback={false}
|
|
/>
|
|
);
|
|
}
|
|
return (
|
|
<Fragment>
|
|
{value2}
|
|
{r5}
|
|
</Fragment>
|
|
);
|
|
}
|
|
|
|
function _default_79272({quest}) { // fn#79272, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10370:3484, offset: 0x01e4b7f7, size: 1752 bytes, params: 2, frame: 40
|
|
var r29;
|
|
var r14;
|
|
var moduleValue5;
|
|
var SafeAreaPaddingView;
|
|
var items3;
|
|
var Heading;
|
|
var title;
|
|
const intl = (IndexNativeModule).intl;
|
|
var format;
|
|
const t = (IndexNativeModule).t;
|
|
var items4;
|
|
var Text;
|
|
const Button = (ButtonNativeModule).Button;
|
|
var object3;
|
|
var primary;
|
|
var string;
|
|
var items5;
|
|
var secondary;
|
|
var value28;
|
|
var object4;
|
|
const env0_3 = undefined;
|
|
let env0_5 = undefined;
|
|
const styles = useStyles();
|
|
const useReducedMotion = (require(566) /* metro dependency 566: flux */).useStateFromStores([AccessibilityStore],
|
|
function() {
|
|
return AccessibilityStore.useReducedMotion;
|
|
});
|
|
const useFetchVirtualCurrencyBalance = HooksModule.useFetchVirtualCurrencyBalance;
|
|
const balance = Reflect.apply(useFetchVirtualCurrencyBalance, HooksModule, []).balance;
|
|
const [property, env0_1] = env0_3(env0_5.useState(false), 2);
|
|
const [property2, env0_2] = env0_3(env0_5.useState(false), 2);
|
|
const state = (require(566) /* metro dependency 566: flux */).useStateFromStores([AppStateStore], function() {
|
|
return AppStateStore.getState();
|
|
});
|
|
const AppStates = (ConstantsIOSModule).AppStates;
|
|
const ACTIVE = AppStates.ACTIVE;
|
|
const value8 = state === ACTIVE;
|
|
const currentUser = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() {
|
|
return UserStore.getCurrentUser();
|
|
});
|
|
const userStatus = quest.userStatus;
|
|
const orbQuantityClaimed = userStatus?.orbQuantityClaimed;
|
|
if (orbQuantityClaimed != null) {
|
|
r29 = orbQuantityClaimed;
|
|
} else {
|
|
moduleValue5 = require(9500) /* metro dependency 9500: QuestRewardUtils */;
|
|
r29 = moduleValue5.getQuestOrbRewardQuantityForUser(quest.config, currentUser);
|
|
}
|
|
env0_5.useEffect(function() {
|
|
require(dependencyMap[32]).lockOrientation(Orientation.PORTRAIT);
|
|
return _fun79277;
|
|
}, []);
|
|
const value10 = env0_5.useCallback(_fun79278, []);
|
|
const value11 = env0_5.useCallback(_fun79279, []);
|
|
const value12 = env0_5.useCallback(_fun79280, []);
|
|
const value13 = env0_5.useCallback(function() {
|
|
importDefault(dependencyMap[11]).popWithKey('QuestOrbsRewardModal');
|
|
var moduleValue = require(dependencyMap[35]);
|
|
var object = {};
|
|
object.filter = RewardFilterTypes.VIRTUAL_CURRENCY;
|
|
object.fromContent = require(dependencyMap[36]).QuestContent.REWARD_MODAL;
|
|
moduleValue.openQuestHome(object);
|
|
}, []);
|
|
const useMobileQuestOrbRewardModalCtaPriorityExperiment = ExperimentsModule.useMobileQuestOrbRewardModalCtaPriorityExperiment;
|
|
const variant = Reflect.apply(useMobileQuestOrbRewardModalCtaPriorityExperiment, ExperimentsModule, []).variant;
|
|
env0_5 = variant;
|
|
const value14 = (balance ?? 0) >= 4100;
|
|
const value15 = env0_5.useMemo(_fun79282, [variant, value14, value13, value12]);
|
|
const env0_8 = (require(478) /* metro dependency 478: PlatformUtils */).isAndroid() ? styles.orbsIconAndroid : styles.orbsIconIOS;
|
|
const items2 = [
|
|
<View
|
|
style={StyleSheet.absoluteFill}
|
|
accessible={false}
|
|
accessibilityElementsHidden
|
|
importantForAccessibility="no-hide-descendants"
|
|
>
|
|
{((Component) => <Component useReducedMotion={useReducedMotion} style={styles.background} onStaticBgLoad={value10} onAnimatedBgLoad={value11} isAppActive={value8} />)(env0_23)}
|
|
</View>,
|
|
];
|
|
items2[1] = !property && (useReducedMotion || !property2) && <View style={styles.loading}><ActivityIndicator animating /></View>;
|
|
let r5 = property || !useReducedMotion && property2;
|
|
if (r5) {
|
|
SafeAreaPaddingView = (require(6618) /* metro dependency 6618: SafeAreaView */).SafeAreaPaddingView;
|
|
var safeAreaPaddingViewProps = {'style': null, 'top': true, 'bottom': true, 'left': true, 'right': true,
|
|
style: [styles.main]};
|
|
items3 = [
|
|
<View style={styles.header}>
|
|
<CancelButton_79263 />
|
|
</View>,
|
|
];
|
|
var viewBinding5Props = {'style': null, 'accessible': false, 'accessibilityElementsHidden': true,
|
|
'importantForAccessibility': 'no-hide-descendants', style: styles.animation};
|
|
r14 = (
|
|
useReducedMotion
|
|
? (
|
|
<StaticOrb />
|
|
)
|
|
: (
|
|
<AnimatedOrbContainer isAppActive={value8} />
|
|
)
|
|
);
|
|
items3[1] = (
|
|
<View {...viewBinding5Props}>
|
|
{r14}
|
|
</View>
|
|
);
|
|
var viewBinding6Props = {style: styles.body};
|
|
Heading = (require(4573) /* metro dependency 4573: Text */).Heading;
|
|
title = styles.title;
|
|
format = intl.format;
|
|
items4 = [
|
|
<Heading
|
|
variant="heading-xl/bold"
|
|
color="white"
|
|
style={title}
|
|
>
|
|
{Reflect.apply(format, intl, [t.FIilK5, {count: r29 ?? 0}])}
|
|
</Heading>,
|
|
];
|
|
Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
|
title = styles.title;
|
|
format = intl.format;
|
|
items4[1] = (
|
|
<Text
|
|
variant="text-md/normal"
|
|
color="white"
|
|
style={title}
|
|
>
|
|
{value14 ? Reflect.apply(format, intl, [t['2dz2AL'], {balanceHook: balanceHook_79283,
|
|
profileDecoHook: profileDecoHook}]) : Reflect.apply(format, intl, [t.rKHvlX,
|
|
{balanceHook: balanceHook}])}
|
|
</Text>
|
|
);
|
|
items3[2] = (
|
|
<View {...viewBinding6Props}>
|
|
{items4}
|
|
</View>
|
|
);
|
|
var viewBinding7Props = {style: styles.buttonsContainer};
|
|
object3 = {'onPress': null, 'variant': 'primary', 'size': 'lg'};
|
|
primary = value15.primary;
|
|
object3.onPress = primary.handler;
|
|
string = intl.string;
|
|
primary = value15.primary;
|
|
object3.text = Reflect.apply(string, intl, [primary.text]);
|
|
items5 = [
|
|
<Button {...object3} />,
|
|
];
|
|
secondary = value15.secondary;
|
|
value28 = secondary != null;
|
|
if (value28) {
|
|
object4 = {'onPress': null, 'variant': 'secondary', 'size': 'lg'};
|
|
secondary = value15.secondary;
|
|
object4.onPress = secondary.handler;
|
|
string = intl.string;
|
|
secondary = value15.secondary;
|
|
object4.text = Reflect.apply(string, intl, [secondary.text]);
|
|
r14 = <Button {...object4} />;
|
|
} else {
|
|
r14 = value28;
|
|
}
|
|
items5[1] = r14;
|
|
items3[3] = (
|
|
<View {...viewBinding7Props}>
|
|
{items5}
|
|
</View>
|
|
);
|
|
r5 = (
|
|
<SafeAreaPaddingView {...safeAreaPaddingViewProps}>
|
|
{items3}
|
|
</SafeAreaPaddingView>
|
|
);
|
|
}
|
|
items2[2] = r5;
|
|
return (
|
|
<View style={styles.root}>
|
|
{items2}
|
|
</View>
|
|
);
|
|
function _fun79276() { // fn#79276, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10370:3978, offset: 0x01e4bee2, size: 57 bytes, params: 1, frame: 12
|
|
const lockOrientation = DeviceOrientationModule.lockOrientation;
|
|
const PORTRAIT = Orientation.PORTRAIT;
|
|
Reflect.apply(lockOrientation, DeviceOrientationModule, [PORTRAIT]);
|
|
return _fun79277;
|
|
function _fun79277() { // fn#79277, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10370:4020, offset: 0x01e4bf1b, size: 37 bytes, params: 1, frame: 11
|
|
const value = environment.__proto__.__proto__;
|
|
(DeviceOrientationModule).restoreDefaultOrientation();
|
|
}
|
|
|
|
}
|
|
|
|
function _fun79278() { // fn#79278, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10370:4090, offset: 0x01d4f9cc, size: 18 bytes, params: 1, frame: 11
|
|
env0_1(true);
|
|
}
|
|
|
|
function _fun79279() { // fn#79279, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10370:4124, offset: 0x01e4bf40, size: 18 bytes, params: 1, frame: 11
|
|
env0_2(true);
|
|
}
|
|
|
|
function _fun79280() { // fn#79280, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10370:4158, offset: 0x01e4bf52, size: 139 bytes, params: 1, frame: 18
|
|
(ModalActionCreators).popWithKey('QuestOrbsRewardModal');
|
|
const openCollectiblesShopMobile = CollectiblesActionCreatorsModule.openCollectiblesShopMobile;
|
|
const object = {};
|
|
let MOBILE_ORBS_REWARD_CLAIM_MODAL = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).MOBILE_ORBS_REWARD_CLAIM_MODAL;
|
|
object.analyticsLocations = [MOBILE_ORBS_REWARD_CLAIM_MODAL];
|
|
MOBILE_ORBS_REWARD_CLAIM_MODAL = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).MOBILE_ORBS_REWARD_CLAIM_MODAL;
|
|
object.analyticsSource = MOBILE_ORBS_REWARD_CLAIM_MODAL;
|
|
const ORBS = CollectiblesMobileShopScreen.ORBS;
|
|
object.screen = ORBS;
|
|
Reflect.apply(openCollectiblesShopMobile, CollectiblesActionCreatorsModule, [object]);
|
|
}
|
|
|
|
function _fun79282() { // fn#79282, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10370:4618, offset: 0x01e4c051, size: 418 bytes, params: 1, frame: 19
|
|
var object;
|
|
const t = (IndexNativeModule).t;
|
|
const variantBinding = variant;
|
|
const MobileQuestOrbRewardModalCtaPriorityVariant = (ExperimentsModule).MobileQuestOrbRewardModalCtaPriorityVariant;
|
|
const EARN_ORBS_PRIMARY = MobileQuestOrbRewardModalCtaPriorityVariant.EARN_ORBS_PRIMARY;
|
|
if (EARN_ORBS_PRIMARY === variantBinding) {
|
|
object = {};
|
|
object.primary = {text: t.uJAMFX, handler: Module00005};
|
|
object.secondary = {text: t.GPdvqY, handler: env0_3};
|
|
} else {
|
|
var EARN_ORBS_ONLY = MobileQuestOrbRewardModalCtaPriorityVariant.EARN_ORBS_ONLY;
|
|
if (EARN_ORBS_ONLY === variantBinding) {
|
|
return {primary: {text: t.uJAMFX, handler: Module00005}, secondary: null};
|
|
}
|
|
var binding = ReactNativeModule.ActivityIndicator;
|
|
object = {};
|
|
var object2 = {};
|
|
if (binding) {
|
|
object2.text = t.GPdvqY;
|
|
object2.handler = env0_3;
|
|
object.primary = object2;
|
|
object.secondary = {text: t.uJAMFX, handler: Module00005};
|
|
} else {
|
|
object2.text = t.uJAMFX;
|
|
object2.handler = Module00005;
|
|
object.primary = object2;
|
|
object.secondary = {text: t.GPdvqY, handler: env0_3};
|
|
}
|
|
}
|
|
return object;
|
|
}
|
|
|
|
function _default_79272BalanceHook() { // fn#79283, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10370:6186, owner: _default_79272.balanceHook, offset: 0x01e4c1f3, size: 182 bytes, params: 1, frame: 22
|
|
const value = environment.__proto__;
|
|
const Fragment = env1_5.Fragment;
|
|
const OrbsIcon = (OrbsIconModule).OrbsIcon;
|
|
const WHITE = (Native).colors.WHITE;
|
|
return (
|
|
<Fragment key="balance">
|
|
<OrbsIcon
|
|
size="xs"
|
|
color={WHITE}
|
|
style={env0_8}
|
|
/>
|
|
{ReactNativeModule.StyleSheet && <View style={{width: 2}} />}
|
|
{balance}
|
|
</Fragment>
|
|
);
|
|
}
|
|
|
|
function profileDecoHook() { // fn#79284, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10370:6340, owner: _default_79272.profileDecoHook, offset: 0x01e4c2a9, size: 116 bytes, params: 1, frame: 19
|
|
const Text = (TextModule).Text;
|
|
const intl = (IndexNativeModule).intl;
|
|
return (
|
|
<Text
|
|
variant="text-md/semibold"
|
|
color="white"
|
|
key="profileDeco"
|
|
>
|
|
{intl.string((IndexNativeModule).t.pGDUH9)}
|
|
</Text>
|
|
);
|
|
}
|
|
|
|
function _default_79272BalanceHook_79285() { // fn#79285, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10370:6521, owner: _default_79272.balanceHook, offset: 0x01e4c1f3, size: 182 bytes, params: 1, frame: 22
|
|
const value = environment.__proto__;
|
|
const Fragment = env1_5.Fragment;
|
|
const OrbsIcon = (OrbsIconModule).OrbsIcon;
|
|
const WHITE = (Native).colors.WHITE;
|
|
return (
|
|
<Fragment key="balance">
|
|
<OrbsIcon
|
|
size="xs"
|
|
color={WHITE}
|
|
style={env0_8}
|
|
/>
|
|
{ReactNativeModule.StyleSheet && <View style={{width: 2}} />}
|
|
{balance}
|
|
</Fragment>
|
|
);
|
|
}
|
|
|
|
}
|
|
|
|
function openQuestOrbsRewardModal({quest}) { // fn#79286, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10370:7109, offset: 0x01e4c31d, size: 80 bytes, params: 2, frame: 16
|
|
const defaultImport = ModalActionCreators;
|
|
defaultImport.pushLazy(Module00005(_fun79288), {quest: quest}, 'QuestOrbsRewardModal');
|
|
function* _fun79288() { // fn#79288, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10370:7144, offset: 0x01e4c378, size: 74 bytes, params: 1, frame: 14
|
|
if (false) {
|
|
return undefined;
|
|
}
|
|
value = environment.__proto__.__proto__;
|
|
const binding = env2_0;
|
|
const binding2 = env2_2;
|
|
yield binding(binding2[13])(binding2[12], binding2.paths);
|
|
value = undefined;
|
|
if (false) {
|
|
return value;
|
|
}
|
|
return value.default;
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun79254, 10184, [57, 5, 31, 27, 4502, 1878, 7030, 6528, 661, 663, 33, 5080, 10184, 1962, 4501, 697,
|
|
5287, 5312, 1244, 5475, 7897, 478, 10142, 9543, 10143, 10185, 10186, 10187, 566, 10069, 676, 9500, 7717, 5120,
|
|
6789, 9480, 6531, 9511, 6618, 4573, 10076, 4578,
|
|
2]) /* metro module 10184, dependencies: [57, 5, 31, 27, 4502, 1878, 7030, 6528, 661, 663, 33, 5080, 10184, 1962, 4501, 697, 5287, 5312, 1244, 5475, 7897, 478, 10142, 9543, 10143, 10185, 10186, 10187, 566, 10069, 676, 9500, 7717, 5120, 6789, 9480, 6531, 9511, 6618, 4573, 10076, 4578, 2] */;
|