/* Metro module 13560; source: modules/quests/native/BountyCard.tsx; dependencies: [57, 31, 27, 4502, 7092, 33, 4501, 697, 478, 566, 9495, 3860, 6239, 8011, 5475, 8707, 4573, 1244, 4578, 4073, 2] */ function _fun103013(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#103013, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13750:6, offset: 0x02253ab2, size: 370 bytes, params: 8, frame: 20 const env0_0 = require; const Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); let value = 0; const env0_3 = importDefault(dependencyMap[value]); const value2 = importAll(31) /* metro dependency 31 */; const value3 = require(27) /* metro dependency 27 */; const env0_5 = value3.AppState; const env0_6 = value3.StyleSheet; const env0_7 = value3.View; const accessibilityStore = importDefault(4502) /* metro dependency 4502: AccessibilityStore */; const bountyStore = importDefault(7092) /* metro dependency 7092: BountyStore */; const value4 = require(33) /* metro dependency 33 */; const env0_10 = value4.jsx; const env0_11 = value4.jsxs; const env0_12 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(_fun103014); const platformUtilsModule = require(478) /* metro dependency 478: PlatformUtils */; const env0_13 = platformUtilsModule.isAndroid() ? 150 : value; const env0_14 = platformUtilsModule.isAndroid(); const env0_15 = platformUtilsModule.isAndroid(); value = value2.memo(_fun103015); (require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/BountyCard.tsx'); exports.default = value; exports.CARD_WIDTH = 188; } function _fun103014() { // fn#103014, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13750:240, offset: 0x02253c24, size: 557 bytes, params: 1, frame: 17 const object2 = {}; let PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12; object2.tile = {gap: PX_12}; object2.card = {'width': 188, 'height': 313, 'overflow': 'hidden', 'padding': 0}; const object6 = {}; const value = copyDataProperties(object6, StyleSheet.absoluteFillObject, PX_12); object2.cardImage = object6; const object7 = {}; copyDataProperties(object7, StyleSheet.absoluteFillObject, value); object2.previewVideo = object7; const object9 = {position: 'absolute'}; PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12; object9.top = PX_12; PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12; object9.left = PX_12; const CONTROL_OVERLAY_PRIMARY_BACKGROUND_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.CONTROL_OVERLAY_PRIMARY_BACKGROUND_DEFAULT; object9.backgroundColor = CONTROL_OVERLAY_PRIMARY_BACKGROUND_DEFAULT; object9.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round; let PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8; object9.paddingHorizontal = PX_8; let PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4; object9.paddingVertical = PX_4; let CONTROL_OVERLAY_PRIMARY_TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.CONTROL_OVERLAY_PRIMARY_TEXT_DEFAULT; object9.color = CONTROL_OVERLAY_PRIMARY_TEXT_DEFAULT; object2.badge = object9; PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4; object2.badgeContent = {'flexDirection': 'row', 'alignItems': 'center', gap: PX_4}; CONTROL_OVERLAY_PRIMARY_TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.CONTROL_OVERLAY_PRIMARY_TEXT_DEFAULT; object2.badgeText = {textTransform: 'uppercase', color: CONTROL_OVERLAY_PRIMARY_TEXT_DEFAULT}; const object10 = {position: 'absolute'}; PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8; object10.bottom = PX_8; PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8; object10.left = PX_8; PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8; object10.right = PX_8; object2.startButton = object10; object2.cardFooter = {'flexDirection': 'column', 'alignItems': 'flex-start', 'maxWidth': 188}; PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4; object2.advertiserRow = {'flexDirection': 'row', 'gap': null, 'alignItems': 'center', gap: PX_4}; object2.advertiserName = {flexShrink: 1}; object2.advertiserIcon = {'flexShrink': 0, 'opacity': 0.7}; return object2; } function _fun103015({bounty, index, isActive, isModalVisible, onPress}) { // fn#103015, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13750:1310, offset: 0x02253e51, size: 1995 bytes, params: 2, frame: 39 const env0_3 = onPress; let env0_4 = undefined; const styles = useStyles(); const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStores([BountyStore], function() { return BountyStore.isBountyCompleted(bounty.id); }); let binding = env0_4; const value4 = binding.useCallback(function() { onPress(bounty, index); }, [onPress, bounty, index]); const videoPreview = bounty.videoPreview; let r12 = bounty.imagePreview != null ? (require(9495) /* metro dependency 9495: AssetUtils */).getScaledImageUrl({'assetUrl': null, 'width': 188, 'height': 313, assetUrl: bounty.imagePreview}) : null; r12 = r12 == null && videoPreview != null ? (require(9495) /* metro dependency 9495: AssetUtils */).getScaledFirstFrameImageUrl({'assetUrl': null, 'width': 188, 'height': 313, assetUrl: videoPreview}) : r12; binding = env0_4; let useState = binding.useState; const value10 = Reflect.apply(useState, binding, [false]); const binding2 = env0_3; const value11 = binding2(value10, 2); const property = value11[0]; env0_4 = value11[1]; const value12 = binding.useCallback(_fun103018, []); useState = binding.useState; const value13 = binding2(Reflect.apply(useState, binding, [false]), 2); const property2 = value13[0]; const property3 = value13[1]; useState = binding.useState; const value14 = binding2(Reflect.apply(useState, binding, [false]), 2); const property4 = value14[0]; const property5 = value14[1]; const useReducedMotion = (require(566) /* metro dependency 566: flux */).useStateFromStores([AccessibilityStore], function() { return AccessibilityStore.useReducedMotion; }); const useTokenModule = require(3860) /* metro dependency 3860: useToken */; const useToken = useTokenModule.useToken; const BOUNTY_TILE_BORDER_RADIUS = (importDefault(697) /* metro dependency 697: native */).modules.mobile.BOUNTY_TILE_BORDER_RADIUS; const value15 = Reflect.apply(useToken, useTokenModule, [BOUNTY_TILE_BORDER_RADIUS]); const env0_8 = binding.useRef(null); const value16 = binding.useCallback(_fun103020, []); useState = binding.useState; const value17 = binding2(Reflect.apply(useState, binding, [isActive]), 2); if (isActive !== value17[0]) { value17[1](isActive); if (isActive) { if (property2 && !property4) { property3(false); } if (property4) { property5(false); } } else if (env0_14) { property5(true); } } binding = env0_4; const env0_9 = binding.useRef(null); binding.useEffect(_fun103022, [property4]); binding.useEffect(_fun103025, [isActive]); binding.useEffect(function() { return _fun103027; }, []); useState = binding.useState; const value20 = env0_3(Reflect.apply(useState, binding, [AppState.currentState === 'active']), 2); const property8 = value20[0]; const env0_10 = value20[1]; binding.useEffect(function() { var env0_0 = AppState.addEventListener('change', _fun103029); return _fun103030; }, []); let r7 = (isActive || property4) && videoPreview != null && property; let r5 = env0_15 && isModalVisible; r5 = !r5 && !(property4 && !isActive) && r7 && property2; const value25 = env0_4.useMemo(_fun103031, [r5]); const Card = (require(6239) /* metro dependency 6239: CardNative */).Card; r7 = r7 && ((Component) => )(importDefault(8011) /* metro dependency 8011 */); const items2 = [r7]; items2[1] = ((Component) => )(importDefault(5475) /* metro dependency 5475: FastImage */); const r9 = value3 && ((CheckmarkSmallBoldIcon) => )((require(8707) /* metro dependency 8707: CheckmarkSmallBoldIcon */).CheckmarkSmallBoldIcon); const Text = (require(4573) /* metro dependency 4573: Text */).Text; const intl = (require(1244) /* metro dependency 1244: indexNative */).intl; let string = intl.string; const t = (require(1244) /* metro dependency 1244: indexNative */).t; items2[2] = {r9}{Reflect.apply(string, intl, [value3 ? t.vlGTLf : t['fFIJ/9']])}; const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button; string = intl.string; items2[3] =