161 lines
10 KiB
TypeScript
161 lines
10 KiB
TypeScript
/* Metro module 8470; source: modules/collectibles/native/BundleSampleV2.tsx; dependencies: [31, 27, 8471, 33, 5475, 4501, 697, 44, 1904, 1901, 8472, 7596, 8482, 1305, 8487, 2] */
|
|
function _fun67262(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#67262, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8655:6, offset: 0x01c1bc70, size: 470 bytes, params: 8, frame: 26
|
|
var object7;
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
importAll(31) /* metro dependency 31 */;
|
|
let value = require(27) /* metro dependency 27 */;
|
|
const StyleSheet = value.StyleSheet;
|
|
const env0_3 = value.View;
|
|
const env0_4 = (require(8471) /* metro dependency 8471: CollectiblesPreviewConstants */).BUNDLE_PREVIEW_CONFIG;
|
|
value = require(33) /* metro dependency 33 */;
|
|
const env0_5 = value.jsx;
|
|
const env0_6 = value.jsxs;
|
|
const create = StyleSheet.create;
|
|
object7 = {};
|
|
const object8 = {};
|
|
copyDataProperties(object8, StyleSheet.absoluteFillObject, undefined);
|
|
object8['overflow'] = 'hidden';
|
|
object7.container = object8;
|
|
const object9 = {};
|
|
copyDataProperties(object9, StyleSheet.absoluteFillObject, undefined);
|
|
object9['overflow'] = 'hidden';
|
|
object9['justifyContent'] = 'center';
|
|
object9['alignItems'] = 'center';
|
|
object7.bgBleedClip = object9;
|
|
const object10 = {};
|
|
copyDataProperties(object10, StyleSheet.absoluteFillObject, undefined);
|
|
object10['opacity'] = 0.8;
|
|
object7.bgMutedWrap = object10;
|
|
object7.bgImage = {'width': '100%', 'height': '100%'};
|
|
const object11 = {};
|
|
copyDataProperties(object11, StyleSheet.absoluteFillObject, undefined);
|
|
object11['overflow'] = 'hidden';
|
|
object11['justifyContent'] = 'center';
|
|
object11['alignItems'] = 'center';
|
|
object7.fgClip = object11;
|
|
const object12 = {};
|
|
copyDataProperties(object12, StyleSheet.absoluteFillObject, undefined);
|
|
object7.fgImage = object12;
|
|
const env0_7 = Reflect.apply(create, StyleSheet, [object7]);
|
|
const env0_8 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(_fun67266);
|
|
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/BundleSampleV2.tsx');
|
|
exports.default = _default_67267;
|
|
}
|
|
|
|
function BundleStaticPreviewContent({previewAssets, disableBackground, mutedBackground}) { // fn#67263, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8655:197, offset: 0x01c1be46, size: 402 bytes, params: 2, frame: 26
|
|
var r4;
|
|
const bgStatic = previewAssets.bgStatic;
|
|
const fgStatic = previewAssets.fgStatic;
|
|
let value = null;
|
|
const r9 = value != bgStatic ? ((Component) => <Component source={{uri: bgStatic}} style={env0_7.bgImage} resizeMode="cover" accessibilityElementsHidden importantForAccessibility="no-hide-descendants" />)(importDefault(5475) /* metro dependency 5475: FastImage */) : value;
|
|
const container = env0_7.container;
|
|
const r5 = !disableBackground && value != r9 && <View style={env0_7.bgBleedClip} pointerEvents="none">{mutedBackground ? <View style={env0_7.bgMutedWrap} pointerEvents="none">{r9}</View> : r9}</View>;
|
|
value = value != fgStatic;
|
|
if (value) {
|
|
var viewBinding4Props = {style: env0_7.fgClip, pointerEvents: 'none'};
|
|
value = importDefault(5475) /* metro dependency 5475: FastImage */;
|
|
value = <View {...viewBinding4Props}>{((Component) => <Component source={{uri: fgStatic}} style={env0_7.fgImage} resizeMode="cover" accessibilityElementsHidden importantForAccessibility="no-hide-descendants" />)(value)}</View>;
|
|
r4 = value;
|
|
} else {
|
|
r4 = value;
|
|
}
|
|
return (
|
|
<View style={container}>
|
|
{r5}
|
|
{r4}
|
|
</View>
|
|
);
|
|
}
|
|
|
|
function BundleSampleV2Composed({deco, pfx, nameplate, size}) { // fn#67264, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8655:2307, offset: 0x01c1bfd8, size: 567 bytes, params: 2, frame: 29
|
|
var r12;
|
|
size = size === undefined ? 'small' : size;
|
|
const styles = useStyles(size);
|
|
if (nameplate != null) {
|
|
(importDefault(44) /* metro dependency 44 */)(nameplate.type === (require(1904) /* metro dependency 1904: CollectiblesItemType */).CollectiblesItemType.NAMEPLATE,
|
|
|
|
'Item must be Nameplate');
|
|
r12 = (require(1901) /* metro dependency 1901: utils */).getNameplateData(nameplate);
|
|
} else {
|
|
r12 = undefined;
|
|
}
|
|
const property = BUNDLE_PREVIEW_CONFIG[size];
|
|
const r17 = r12 != null ? property.avatarDecorationSizeTriple : property.avatarDecorationSize;
|
|
const items2 = [<View style={styles.pfx}>{((Component) => <Component item={pfx} />)(importDefault(8472) /* metro dependency 8472: ProfileEffectSampleV2 */)}</View>];
|
|
items2[1] = <View style={[r12 != null ? styles.avatarWithNameplate : styles.avatar]}>{((Component) => <Component item={deco} size={r17} threeTierBundle={r12 != null} />)(importDefault(7596) /* metro dependency 7596: AvatarDecorationSampleV2 */)}</View>;
|
|
items2[2] = r12 != null ? <View style={styles.nameplate}>{((NameplateDummyUserPreview) => <NameplateDummyUserPreview width={property.nameplatePreviewWidth} avatarSize={size === 'large' ? (require(1305) /* metro dependency 1305: native */).AvatarSizes.NORMAL : (require(1305) /* metro dependency 1305: native */).AvatarSizes.XSMALL_20} nameplate={r12} />)((require(8482) /* metro dependency 8482: NameplateDummyUserPreview */).NameplateDummyUserPreview)}</View> : null;
|
|
return (
|
|
<View style={styles.bundle}>
|
|
{items2}
|
|
</View>
|
|
);
|
|
}
|
|
|
|
function BundleSampleV2StaticPreview({previewAssets, disableStaticBackground, mutedStaticBackground, composedFallbackProps, exposureLocation}) { // fn#67265, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8655:3006, offset: 0x01c1c20f, size: 134 bytes, params: 2, frame: 18
|
|
const collectiblesMobileFlexibleBundlesExperimentModule = require(8487) /* metro dependency 8487: CollectiblesMobileFlexibleBundlesExperiment */;
|
|
const useCollectiblesMobileFlexibleBundlesExperiment = collectiblesMobileFlexibleBundlesExperimentModule.useCollectiblesMobileFlexibleBundlesExperiment;
|
|
return Reflect.apply(useCollectiblesMobileFlexibleBundlesExperiment,
|
|
collectiblesMobileFlexibleBundlesExperimentModule,
|
|
[exposureLocation]).enabled ? <BundleStaticPreviewContent previewAssets={previewAssets} disableBackground={disableStaticBackground} mutedBackground={mutedStaticBackground} /> : <BundleSampleV2Composed {...composedFallbackProps} />;
|
|
}
|
|
|
|
function _fun67266(a0) { // fn#67266, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8655:1267, offset: 0x01c1c295, size: 554 bytes, params: 2, frame: 18
|
|
const property = BUNDLE_PREVIEW_CONFIG[a0];
|
|
const object4 = {};
|
|
const object5 = {};
|
|
object5.width = property.bundleWidth;
|
|
object5.height = property.bundleHeight;
|
|
object5.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
|
|
object4.bundle = object5;
|
|
const object6 = {position: 'absolute'};
|
|
object6.top = property.pfxTop;
|
|
object6.left = property.pfxLeft;
|
|
object6.width = property.pfxWidth;
|
|
object6.height = property.pfxHeight;
|
|
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
|
|
object6.backgroundColor = BACKGROUND_BASE_LOW;
|
|
object6.transform = [{rotate: '-8deg'}];
|
|
object6.zIndex = 0;
|
|
object6.overflow = 'hidden';
|
|
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
|
|
object4.pfx = object6;
|
|
object4.avatar = {'position': 'absolute', 'top': null, 'right': null, 'transform': null, 'zIndex': 1,
|
|
'alignItems': 'center', 'justifyContent': 'center', top: property.avatarTop, right: property.avatarRight,
|
|
transform: [{rotate: '8deg'}]};
|
|
const object8 = {'position': 'absolute', 'top': null, 'right': null, 'transform': null, 'zIndex': 1,
|
|
'alignItems': 'center', 'justifyContent': 'center'};
|
|
object8.top = property.avatarWithNameplateTop;
|
|
object8.right = property.avatarWithNameplateRight;
|
|
object8.transform = [{rotate: '8deg'}];
|
|
let BLACK = (importDefault(697) /* metro dependency 697: native */).colors.BLACK;
|
|
object8.shadowColor = BLACK;
|
|
object8.shadowOffset = {'width': 0, 'height': 4};
|
|
object8.shadowOpacity = 0.5;
|
|
object8.shadowRadius = 4;
|
|
object4.avatarWithNameplate = object8;
|
|
const object10 = {'position': 'absolute', 'bottom': null, 'marginHorizontal': 10, 'width': '90%',
|
|
'backgroundColor': null, 'zIndex': 2};
|
|
object10.bottom = property.nameplateBottom;
|
|
const BACKGROUND_BASE_LOWER = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWER;
|
|
object10.backgroundColor = BACKGROUND_BASE_LOWER;
|
|
object10.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
|
|
BLACK = (importDefault(697) /* metro dependency 697: native */).colors.BLACK;
|
|
object10.shadowColor = BLACK;
|
|
object10.shadowOffset = {'width': 0, 'height': 4};
|
|
object10.shadowOpacity = 0.5;
|
|
object10.shadowRadius = 4;
|
|
object4.nameplate = object10;
|
|
return object4;
|
|
}
|
|
|
|
function _default_67267({deco, pfx, nameplate, size, previewAssets, disableStaticBackground, mutedStaticBackground, exposureLocation}) { // fn#67267, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8655:3361, offset: 0x01c1c4bf, size: 201 bytes, params: 2, frame: 19
|
|
size = size === undefined ? 'small' : size;
|
|
disableStaticBackground = !(disableStaticBackground === undefined) && disableStaticBackground;
|
|
mutedStaticBackground = !(mutedStaticBackground === undefined) && mutedStaticBackground;
|
|
exposureLocation = exposureLocation === undefined ? 'CollectiblesShopCardAssetTileV2' : exposureLocation;
|
|
return previewAssets?.fgStatic != null ? <BundleSampleV2StaticPreview previewAssets={previewAssets} disableStaticBackground={disableStaticBackground} mutedStaticBackground={mutedStaticBackground} composedFallbackProps={object} exposureLocation={exposureLocation} /> : <BundleSampleV2Composed deco={deco} pfx={pfx} nameplate={nameplate} size={size} />;
|
|
}
|
|
|