197 lines
12 KiB
TypeScript
197 lines
12 KiB
TypeScript
/* Metro module 15298; source: modules/collectibles/native/CollectiblesMobileAnnouncementActionSheet.tsx; dependencies: [31, 27, 663, 6276, 1376, 33, 4501, 697, 1478, 6277, 1585, 4017, 15299, 4573, 1244, 15300, 5120, 6789, 6275, 15302, 15303, 5473, 4578, 2] */
|
|
function _fun116984(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#116984, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15495:6, offset: 0x0249ebb0, size: 609 bytes, params: 8, frame: 24
|
|
var object5;
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
const env0_3 = importAll(31) /* metro dependency 31 */;
|
|
let value = require(27) /* metro dependency 27 */;
|
|
const env0_4 = value.Image;
|
|
const StyleSheet = value.StyleSheet;
|
|
const env0_5 = value.View;
|
|
const env0_6 = (require(663) /* metro dependency 663: CollectiblesShopConstants */).CollectiblesMobileShopScreen;
|
|
const env0_7 = (require(6276) /* metro dependency 6276: ActionSheetConstants */).ACTION_SHEET_MAX_WIDTH;
|
|
const env0_8 = (require(1376) /* metro dependency 1376: DismissibleContentConstants */).ContentDismissActionType;
|
|
value = require(33) /* metro dependency 33 */;
|
|
const env0_9 = value.jsx;
|
|
const env0_10 = value.jsxs;
|
|
value = require(4501) /* metro dependency 4501: createStyles */;
|
|
const createStyles = value.createStyles;
|
|
object5 = {};
|
|
const object6 = {};
|
|
copyDataProperties(object6, StyleSheet.absoluteFillObject, undefined);
|
|
object6['pointerEvents'] = 'none';
|
|
object5.mascotContainer = object6;
|
|
const object7 = {};
|
|
copyDataProperties(object7, StyleSheet.absoluteFillObject, undefined);
|
|
object5.mascotLayer = object7;
|
|
object5.mascotImage = {'width': '100%', 'aspectRatio': 1.8324022346368716};
|
|
object5.framePreviewImage = {'width': '100%', 'aspectRatio': 2.75, 'resizeMode': 'contain'};
|
|
object5.eaFramePreviewImage = {'width': '100%', 'aspectRatio': 3.25, 'resizeMode': 'contain'};
|
|
const object8 = {};
|
|
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
|
object8.padding = PX_16;
|
|
const PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
|
|
object8.paddingTop = PX_24;
|
|
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
|
object8.gap = PX_16;
|
|
object5.container = object8;
|
|
object5.headerText = {textAlign: 'center'};
|
|
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
|
object5.featureRow = {'flexDirection': 'row', 'alignItems': 'center', gap: PX_16};
|
|
object5.featureText = {flex: 1};
|
|
const PX_32 = (importDefault(697) /* metro dependency 697: native */).space.PX_32;
|
|
object5.featureRows = {gap: PX_32};
|
|
const env0_11 = Reflect.apply(createStyles, value, [object5]);
|
|
object5 = {code: 'function CollectiblesMobileAnnouncementActionSheetTsx1(){const{animatedPosition,safeAreaTop,MASCOT_SAFE_AREA_NUDGE}=this.__closure;return{transform:[{translateY:animatedPosition.get()+safeAreaTop-MASCOT_SAFE_AREA_NUDGE}]};}'};
|
|
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/CollectiblesMobileAnnouncementActionSheet.tsx');
|
|
exports.default = CollectiblesMobileAnnouncementActionSheet;
|
|
}
|
|
|
|
function CatEarsBackdrop() { // fn#116985, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15495:1111, offset: 0x0249ee11, size: 443 bytes, params: 1, frame: 24
|
|
const styles = useStyles();
|
|
const width = (importDefault(1478) /* metro dependency 1478: useWindowDimensionsNative */)().width;
|
|
const moduleValue = require(6277) /* metro dependency 6277 */;
|
|
const useBottomSheet = moduleValue.useBottomSheet;
|
|
const animatedPosition = Reflect.apply(useBottomSheet, moduleValue, []).animatedPosition;
|
|
const top = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)().top;
|
|
const Math = global.Math;
|
|
const value2 = Math.min(width, ACTION_SHEET_MAX_WIDTH);
|
|
const value3 = (width - value2) / 2;
|
|
const value4 = value2 / 1200;
|
|
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
|
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
|
|
const closure = function() {
|
|
var object2 = {};
|
|
object2.translateY = animatedPosition.get() + top - 60;
|
|
return {transform: [object2]};
|
|
};
|
|
closure.__closure = {animatedPosition: animatedPosition, safeAreaTop: top, MASCOT_SAFE_AREA_NUDGE: 60};
|
|
closure.__workletHash = 6274760278164;
|
|
closure.__initData = env0_12;
|
|
const value5 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
|
|
const View2 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
|
|
const value6 = -(56 * value4);
|
|
return (
|
|
<View2 style={[styles.mascotContainer, {left: value3, right: value3}, value5]}>
|
|
<View style={[styles.mascotLayer, {top: -138 * value4, left: value6, right: value6}]}>
|
|
<Image
|
|
source={{uri: importDefault(15299) /* metro dependency 15299: announcement_sheet_framePng */}}
|
|
style={styles.mascotImage}
|
|
accessibilityElementsHidden
|
|
importantForAccessibility="no-hide-descendants"
|
|
/>
|
|
</View>
|
|
</View2>
|
|
);
|
|
}
|
|
|
|
function FeatureRow({icon, text}) { // fn#116987, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15495:1746, offset: 0x0249f002, size: 133 bytes, params: 2, frame: 20
|
|
const styles = useStyles();
|
|
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
|
return (
|
|
<View style={styles.featureRow}>
|
|
{icon}
|
|
<Text
|
|
variant="text-sm/medium"
|
|
color="text-subtle"
|
|
style={styles.featureText}
|
|
>
|
|
{text}
|
|
</Text>
|
|
</View>
|
|
);
|
|
}
|
|
|
|
function CollectiblesMobileAnnouncementActionSheet({markAsDismissed}) { // fn#116988, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15495:2052, offset: 0x0249f087, size: 1080 bytes, params: 2, frame: 36
|
|
const styles = useStyles();
|
|
const value2 = (require(15300) /* metro dependency 15300: useProfileFramesMarketing */).useProfileFramesMarketing('CollectiblesMobileAnnouncementActionSheet');
|
|
let showEaPremiumMarketing = value2.showEaPremiumMarketing;
|
|
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
|
let string = intl.string;
|
|
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
|
const r22 = showEaPremiumMarketing ? Reflect.apply(string, intl, [t['7cmcJI']]) : Reflect.apply(string, intl,
|
|
[t.MkVbBY]);
|
|
const showGiftingMarketing = value2.showGiftingMarketing;
|
|
showEaPremiumMarketing = value2.showEaPremiumMarketing;
|
|
const showEaNonPremiumMarketing = value2.showEaNonPremiumMarketing;
|
|
string = intl.string;
|
|
const r20 = showGiftingMarketing ? Reflect.apply(string, intl,
|
|
[t['/4bQuG']]) : showEaPremiumMarketing ? Reflect.apply(string, intl,
|
|
[t['5UI+bw']]) : showEaNonPremiumMarketing ? Reflect.apply(string, intl, [t['4a7pVU']]) : Reflect.apply(string,
|
|
intl, [t['+9vaAT']]);
|
|
const binding = env0_3;
|
|
const env0_1 = binding.useRef(false);
|
|
const env0_2 = binding.useRef(markAsDismissed);
|
|
binding.useEffect(_fun116989, [markAsDismissed]);
|
|
binding.useEffect(function() {
|
|
return _fun116991;
|
|
}, []);
|
|
const value9 = binding.useCallback(_fun116992, [markAsDismissed]);
|
|
const value10 = binding.useCallback(_fun116993, [markAsDismissed]);
|
|
const value11 = binding.useMemo(_fun116994, []);
|
|
const BottomSheet = (require(6275) /* metro dependency 6275: BottomSheetNative */).BottomSheet;
|
|
const object = {};
|
|
object.uri = value2.isEarlyAccess ? importDefault(15302) /* metro dependency 15302: announcement_key_1Png */ : importDefault(15303) /* metro dependency 15303: mobile_announcementPng */;
|
|
const items3 = [<Image source={object} style={value2.isEarlyAccess ? styles.eaFramePreviewImage : styles.framePreviewImage} accessibilityElementsHidden importantForAccessibility="no-hide-descendants" />];
|
|
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
|
items3[1] = <Text variant="heading-xl/bold" color="text-strong" accessibilityRole="header" style={styles.headerText}>{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.vRCvqo)}</Text>;
|
|
const PaintIllocon = (require(5473) /* metro dependency 5473: native */).PaintIllocon;
|
|
const items2 = [<FeatureRow icon={<PaintIllocon size={32} />} text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['6ZWB0C'])} />];
|
|
const HeartIllocon = (require(5473) /* metro dependency 5473: native */).HeartIllocon;
|
|
items2[1] = <FeatureRow icon={<HeartIllocon size={32} />} text={r22} />;
|
|
const ShopIllocon = (require(5473) /* metro dependency 5473: native */).ShopIllocon;
|
|
items2[2] = <FeatureRow icon={<ShopIllocon size={32} />} text={r20} />;
|
|
items3[2] = <View style={styles.featureRows}>{items2}</View>;
|
|
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
|
|
string = intl.string;
|
|
const S9hXPI = (require(1244) /* metro dependency 1244: indexNative */).t.S9hXPI;
|
|
items3[3] = <Button size="lg" text={Reflect.apply(string, intl, [S9hXPI])} onPress={value9} />;
|
|
return (
|
|
<BottomSheet onDismiss={value10} backdropChildren={value11}>
|
|
<View style={styles.container}>
|
|
{items3}
|
|
</View>
|
|
</BottomSheet>
|
|
);
|
|
}
|
|
|
|
function _fun116990() { // fn#116990, offset: 0x0249f4bf, size: 11 bytes, params: 1, frame: 1
|
|
return _fun116991;
|
|
}
|
|
|
|
function _fun116992() { // fn#116992, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15495:2816, offset: 0x0249f4f8, size: 125 bytes, params: 1, frame: 15
|
|
env0_1.current = true;
|
|
const markAsDismissedBinding = markAsDismissed;
|
|
const PRIMARY = ContentDismissActionType.PRIMARY;
|
|
markAsDismissedBinding(PRIMARY);
|
|
const collectiblesActionCreatorsModule = require(5120) /* metro dependency 5120: CollectiblesActionCreators */;
|
|
const openCollectiblesShopMobile = collectiblesActionCreatorsModule.openCollectiblesShopMobile;
|
|
const object2 = {};
|
|
const FEATURED_PAGE = CollectiblesMobileShopScreen.FEATURED_PAGE;
|
|
object2.screen = FEATURED_PAGE;
|
|
object2.analyticsLocations = [];
|
|
const ACTION_SHEET = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).ACTION_SHEET;
|
|
object2.analyticsSource = ACTION_SHEET;
|
|
Reflect.apply(openCollectiblesShopMobile, collectiblesActionCreatorsModule, [object2]);
|
|
}
|
|
|
|
function _fun116993() { // fn#116993, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15495:2993, offset: 0x0249f575, size: 41 bytes, params: 1, frame: 11
|
|
env0_1.current = true;
|
|
const markAsDismissedBinding = markAsDismissed;
|
|
const USER_DISMISS = ContentDismissActionType.USER_DISMISS;
|
|
markAsDismissedBinding(USER_DISMISS);
|
|
}
|
|
|
|
function _fun116991() { // fn#116991, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15495:2747, offset: 0x0249f4ca, size: 46 bytes, params: 1, frame: 11
|
|
var binding;
|
|
let current = env1_1.current;
|
|
if (!current) {
|
|
binding = env1_2;
|
|
current = binding.current;
|
|
value = environment.__proto__.__proto__;
|
|
Reflect.apply(current, binding, [ContentDismissActionType.AUTO_DISMISS]);
|
|
}
|
|
}
|
|
|