Files
2026-07-28 01:06:53 +03:00

760 lines
42 KiB
TypeScript

/* Metro module 11066; source: modules/stickers/native/StickerDetailActionSheet.tsx; dependencies: [5, 57, 31, 27, 1867, 1878, 6583, 11028, 661, 6276, 33, 4501, 477, 697, 11049, 8633, 8635, 4080, 4573, 1244, 11050, 3857, 566, 1478, 683, 11063, 4578, 11065, 11051, 11056, 3802, 6796, 3829, 4643, 11067, 1962, 4863, 6593, 11068, 7007, 10970, 8638, 7954, 11069, 7972, 8641, 6766, 6275, 2] */
import Module00057 from '../../../by-id/module-00057.js'; /* Metro dependency 57 */
import AnalyticsUtils from '../../../utils/AnalyticsUtils.tsx'; /* Metro dependency 683 */
import UseWindowDimensionsNative from '../../screen/useWindowDimensions.native.tsx'; /* Metro dependency 1478 */
import GuildStore from '../../../stores/GuildStore.tsx'; /* Metro dependency 1867 */
import UserStore from '../../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import PremiumUtils from '../../../utils/PremiumUtils.tsx'; /* Metro dependency 3802 */
import ActionSheetActionCreators from '../../action_sheet/native/ActionSheetActionCreators.tsx'; /* Metro dependency 4080 */
import StickersStore from '../StickersStore.tsx'; /* Metro dependency 6583 */
import TidaWebformExperiment from '../../guild/TidaWebformExperiment.tsx'; /* Metro dependency 6796 */
import Sticker from './Sticker.tsx'; /* Metro dependency 10970 */
import StickerPickerListRow from './StickerPickerListRow.tsx'; /* Metro dependency 11063 */
import OpenStickersPremiumUpsellAlert from './premium/openStickersPremiumUpsellAlert.tsx'; /* Metro dependency 11069 */
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 '../../../utils/PlatformUtils.tsx'; /* Metro dependency 477 */
import * as FluxModule from '../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
import * as IndexNativeModule from '../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as UserSettingsModule from '../../user_settings/UserSettings.tsx'; /* Metro dependency 3829 */
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 StickersUtilsModule from '../StickersUtils.tsx'; /* Metro dependency 4643 */
import * as AppAnalyticsUtilsModule from '../../app_analytics/AppAnalyticsUtils.tsx'; /* Metro dependency 4863 */
import * as BottomSheetNativeModule from '../../../design/components/Sheet/native/BottomSheet.native.tsx'; /* Metro dependency 6275 */
import * as ActionSheetConstantsModule from '../../action_sheet/native/ActionSheetConstants.tsx'; /* Metro dependency 6276 */
import * as TextWithIOSLinkWorkaroundModule from '../../a11y/native/TextWithIOSLinkWorkaround.tsx'; /* Metro dependency 6766 */
import * as OpenUserSettingsModule from '../../user_settings/core/native/openUserSettings.tsx'; /* Metro dependency 7007 */
import * as StickerPickerConstantsModule from './StickerPickerConstants.tsx'; /* Metro dependency 11028 */
import * as StickersHooksModule from '../StickersHooks.tsx'; /* Metro dependency 11049 */
import * as StickersActionCreatorsModule from '../StickersActionCreators.tsx'; /* Metro dependency 11050 */
import * as OpenStickerPackDetailActionSheetModule from './openStickerPackDetailActionSheet.tsx'; /* Metro dependency 11056 */
import * as ShowStickerDetailActionSheetModule from './showStickerDetailActionSheet.tsx'; /* Metro dependency 11065 */
function _fun84711(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#84711, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11252:6, offset: 0x01f542b4, size: 833 bytes, params: 8, frame: 25
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = 0;
const env0_3 = importDefault(dependencyMap[value]);
const createStyles = CreateStylesModule.createStyles;
object = {};
const object2 = {};
const value8 = 16;
object2.padding = value8;
object2.paddingBottom = PlatformUtilsModule.isAndroid() ? value8 : value;
object.content = object2;
object.description = {'lineHeight': 18, 'marginTop': 4};
object.guildEmojiTopContainer = {'flexDirection': 'row', 'alignItems': 'center'};
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object.buttonContainer = {marginTop: PX_12};
object.guildEmojiDescription = {'paddingLeft': 16, 'flex': 1};
const object4 = {marginLeft: value};
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object4.marginTop = PX_16;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object4.marginBottom = PX_16;
const BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
object4.backgroundColor = BORDER_SUBTLE;
object.divider = object4;
object.moreMenuIcon = {'height': 32, 'width': 32, 'justifyContent': 'center', 'alignItems': 'center'};
const PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object.favoriteContainer = {paddingTop: PX_4};
object.starIcon = {'height': 32, 'width': 32};
const ICON_FEEDBACK_WARNING = (importDefault(697) /* metro dependency 697: native */).colors.ICON_FEEDBACK_WARNING;
object.starIconSelected = {tintColor: ICON_FEEDBACK_WARNING};
const INTERACTIVE_TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_TEXT_DEFAULT;
object.starIconUnselected = {tintColor: INTERACTIVE_TEXT_DEFAULT};
const env0_24 = Reflect.apply(createStyles, CreateStylesModule, [object]);
value = ReactModule.memo(StickerDetailActionSheet);
(FileImportTrackerModule).fileFinishedImporting('modules/stickers/native/StickerDetailActionSheet.tsx');
exports.default = value;
function StandardStickerDetail({sticker, channel, chatInputRef}) { // fn#84712, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11252:1205, offset: 0x01f545f5, size: 405 bytes, params: 2, frame: 22
const env0_2 = useStyles();
const pack_id = sticker.pack_id;
const env0_4 = sticker.name;
const useStateFromStores = FluxModule.useStateFromStores;
const stickersStoreBinding = StickersStore;
const stickerPack = Reflect.apply(useStateFromStores, FluxModule, [[stickersStoreBinding], function() {
return StickersStore.getStickerPack(pack_id);
}]);
const stickerPack2 = stickerPack;
const env0_6 = FluxModule.useStateFromStores([stickersStoreBinding], function() {
return StickersStore.isPremiumPack(pack_id);
});
(StickersHooksModule).useFetchStickerPack(pack_id);
const value2 = (UseWindowDimensionsNative)().width - 2 * PADDING_HORIZONTAL;
const Math = global.Math;
const floor = Math.floor;
const Math2 = global.Math;
const env0_8 = Reflect.apply(floor, Math, [Math2.min(ACTION_SHEET_MAX_WIDTH,
value2 - MIN_MARGIN) / (STICKER_SIZE + MIN_MARGIN)]);
const binding = stickerPack2;
binding.useEffect(_fun84716, [binding.useMemo(function() {
return {page: channel.guild_id != null ? AnalyticsPages.GUILD_CHANNEL : AnalyticsPages.DM_CHANNEL,
section: AnalyticsSections.STICKER_POPOUT};
}, [channel.guild_id]), stickerPack]);
return (
stickerPack == null
? (
<ActivityIndicator size="large" />
)
: _fun84717(stickerPack)
);
function _fun84716() { // fn#84716, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11252:1625, offset: 0x01f54809, size: 97 bytes, params: 1, frame: 15
var value2;
var defaultImport;
if (stickerPack != null) {
value2 = environment.__proto__;
defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
defaultImport.track(AnalyticEvents.OPEN_POPOUT, {location: env0_9, type: 'Sticker Upsell Sheet',
sticker_pack_id: stickerPack.id});
}
}
function _fun84717(a0) { // fn#84717, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11252:1769, offset: 0x01f5486a, size: 518 bytes, params: 2, frame: 26
var r7;
var object2;
const env0_0 = a0;
let binding = env0_6;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const format = intl.format;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const r13 = binding ? Reflect.apply(format, intl, [t.auckXz, {stickerPackName: a0.name}]) : Reflect.apply(format,
intl, [t.OzB6e3, {stickerPackName: a0.name}]);
const jsxRuntimeEnv1_22Binding = jsxRuntimeEnv1_22;
const Text = (TextModule).Text;
const items2 = [
<Text variant="heading-md/extrabold" color="mobile-text-heading-primary">
{name}
</Text>,
];
items2[1] = (
<Text style={styles.description} variant="text-sm/medium">
{r13}
</Text>
);
const stickers = a0.stickers;
const slice = stickers.slice;
binding = env0_8;
items2[2] = (
<StickerPickerListRow
containerWidth={ReactNativeModule.ActivityIndicator}
stickers={Reflect.apply(slice, stickers, [0, binding])}
rowSize={binding}
/>
);
if (env0_6) {
object2 = {};
object2.height = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
r7 = <View style={object2} />;
} else {
r7 = null;
}
items2[3] = r7;
items2[4] = env0_6 && ((Button) => <Button variant="secondary" text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.GPy3Ar)} onPress={onPress_84718} />)((require(4578) /* metro dependency 4578: ButtonNative */).Button);
return (
<>
{items2}
</>
);
function onPress_84718() { // fn#84718, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11252:2324, offset: 0x01f54a70, size: 188 bytes, params: 1, frame: 18
var value3;
var defaultImport;
var value4;
const AnalyticsPopoutType = (OpenStickerPackDetailActionSheetModule).AnalyticsPopoutType;
let value = environment.__proto__.__proto__;
(ShowStickerDetailActionSheetModule).hideStickerDetailActionSheet();
if (env0_0 == null) {
defaultImport = importDefault(11056) /* metro dependency 11056: openStickerPackDetailActionSheet */;
value4 = environment.__proto__;
defaultImport({analyticsLocation: env1_9, analyticsPopoutType: AnalyticsPopoutType.STICKER_PACK_UPSELL,
stickerPack: env0_0});
} else {
value3 = environment.__proto__;
if (env1_6) {
if (chatInputRef != null) {
value = require(11051) /* metro dependency 11051: StickersUtils */;
value.openStickerPickerToPackId(chatInputRef, pack_id);
} else {
defaultImport = importDefault(11056) /* metro dependency 11056: openStickerPackDetailActionSheet */;
value4 = environment.__proto__;
defaultImport({analyticsLocation: env1_9, analyticsPopoutType: AnalyticsPopoutType.STICKER_PACK_UPSELL,
stickerPack: env0_0});
}
} else {
defaultImport = importDefault(11056) /* metro dependency 11056: openStickerPackDetailActionSheet */;
value4 = environment.__proto__;
defaultImport({analyticsLocation: env1_9, analyticsPopoutType: AnalyticsPopoutType.STICKER_PACK_UPSELL,
stickerPack: env0_0});
}
}
}
}
}
function GuildStickerDetail({sticker, channel}) { // fn#84719, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11252:2575, offset: 0x01f54b2c, size: 2343 bytes, params: 2, frame: 41
var object8;
var r0;
var r10;
var r8;
var r28;
var r11;
var r17;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var value18;
var string;
var value20;
var value21;
var value23;
var value24;
var value26;
var value27;
var jsxRuntimeEnv0_22Binding;
var items8;
const Text = (TextModule).Text;
var items2;
var items3;
const Button = (ButtonNativeModule).Button;
var items4;
var object;
var items5;
var object6;
var jsxRuntimeEnv0_22Binding2;
var items6;
var ExpressionGuildDetails;
var jsxRuntimeEnv0_22Binding3;
var items7;
var object7;
var env0_5Binding = undefined;
var value;
const styles = useStyles();
let binding = env0_5Binding;
const [property, env0_3] = undefined(binding.useState(null), 2);
const guild = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildStore], function() {
return GuildStore.getGuild(sticker.guild_id);
});
const value5 = guild != null;
var [property2,
env0_5] = undefined(env0_5Binding.useState(!(guild == null || guild.features.has(GuildFeatures.DISCOVERABLE))),
2);
const canUseCustomStickersEverywhere2 = (PremiumUtils).canUseCustomStickersEverywhere(UserStore.getCurrentUser());
const defaultImport2 = TidaWebformExperiment;
const useExperiment = defaultImport2.useExperiment;
const tidaWebformEnabled = Reflect.apply(useExperiment, defaultImport2, [{location: 'StickerDetailActionSheet'},
{autoTrackExposure: false}]).tidaWebformEnabled;
const DeveloperMode = (UserSettingsModule).DeveloperMode;
const value12 = DeveloperMode.useSetting();
const {isFavorite, handleFavorite} = _fun84721(sticker.id);
let r6 = tidaWebformEnabled && value12;
const stickerAssetUrl = (StickersUtilsModule).getStickerAssetUrl(sticker);
binding = env0_5Binding;
const value15 = binding.useCallback(_fun84727, [stickerAssetUrl]);
const useMemo = binding.useMemo;
let guild_id = channel.guild_id;
const env0_7 = Reflect.apply(useMemo, binding, [function() {
return {page: channel.guild_id != null ? AnalyticsPages.GUILD_CHANNEL : AnalyticsPages.DM_CHANNEL,
section: AnalyticsSections.STICKER_POPOUT};
}, [guild_id]]);
const useRef = binding.useRef;
object8 = {};
let getGuildId = channel.getGuildId;
object8.guild_id = Reflect.apply(getGuildId, channel, []);
copyDataProperties(object8, AppAnalyticsUtilsModule.collectChannelAnalyticsMetadata(channel), sticker);
const current = Reflect.apply(useRef, binding, [object8]).current;
binding.useEffect(_fun84729, [sticker.id, property2]);
guild_id = sticker.guild_id;
getGuildId = channel.getGuildId;
const value16 = guild_id === Reflect.apply(getGuildId, channel, []);
const value17 = property != null;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
if (canUseCustomStickersEverywhere2) {
string = intl.string;
r10 = value5 ? value16 ? Reflect.apply(string, intl, [t.fZ0DiG]) : Reflect.apply(string, intl,
[t['1f6D9m']]) : value17 ? Reflect.apply(string, intl, [t.yHmoR9]) : Reflect.apply(string, intl,
[t.vZaScH]);
r0 = 'Custom Sticker Popout';
r8 = false;
r28 = r10;
} else if (value5) {
string = intl.string;
if (value16) {
value26 = Reflect.apply(string, intl, [t.jNphpt]);
value27 = true;
r0 = 'Custom Sticker Popout (Upsell)';
r8 = value27;
r28 = value26;
} else {
value23 = Reflect.apply(string, intl, [t.lyD5ZW]);
value24 = true;
r0 = 'Custom Sticker Popout (Upsell)';
r8 = value24;
r28 = value23;
}
} else if (value17) {
value20 = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.IuXYch);
value21 = true;
r0 = 'Custom Sticker Popout (Upsell)';
r8 = value21;
r28 = value20;
} else {
value18 = intl.format((require(1244) /* metro dependency 1244: indexNative */).t.hGWuxU,
{openPremiumSettings: openPremiumSettings});
r0 = 'Custom Sticker Popout (Soft Upsell)';
r8 = false;
r28 = value18;
}
let r20 = !r8 && !value5 && value17;
binding = env0_5Binding;
const env0_9 = binding.useRef({popoutAnalyticsConfig: current, popoutType: r0});
binding.useEffect(_fun84735);
binding.useEffect(_fun84736, [property2]);
if (property2) {
jsxRuntimeEnv0_22Binding = jsxRuntimeEnv0_22;
var viewBindingProps2 = {style: styles.guildEmojiTopContainer};
items8 = [
((Component) => <Component sticker={sticker} size={48} />)(importDefault(10970) /* metro dependency 10970: Sticker */),
];
var viewBindingProps3 = {style: styles.guildEmojiDescription};
items2 = [
<Text variant="heading-md/extrabold" color="mobile-text-heading-primary">
{sticker.name}
</Text>,
];
items2[1] = (
<Text style={styles.description} variant="text-sm/medium">
{r28}
</Text>
);
items8[1] = (
<View {...viewBindingProps3}>
{items2}
</View>
);
r11 = r6 && stickerAssetUrl != null;
r11 = r11 && <Pressable accessibilityLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.PdRCRg)} style={styles.moreMenuIcon} onPress={value15}>{((MoreHorizontalIcon) => <MoreHorizontalIcon color={(importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_TEXT_DEFAULT} />)((require(8638) /* metro dependency 8638: MoreHorizontalIcon */).MoreHorizontalIcon)}</Pressable>;
items8[2] = r11;
items3 = [
<View {...viewBindingProps2}>
{items8}
</View>,
];
if (r8) {
var viewBindingProps = {style: styles.buttonContainer};
items4 = [
<Button
variant="experimental_premium-primary"
icon={((NitroWheelIcon) => <NitroWheelIcon color="white" />)((require(7954) /* metro dependency 7954: NitroWheelIcon */).NitroWheelIcon)}
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['gl/XHJ'])}
onPress={onPress_84737}
/>,
];
object = {};
object.height = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
items4[1] = <View style={object} />;
r8 = (
<View {...viewBindingProps}>
{items4}
</View>
);
}
items3[1] = r8;
if (r20) {
var viewBindingProps = {style: styles.buttonContainer};
items5 = [
<Button
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.riu2R5)}
onPress={onPress_84738}
/>,
];
object6 = {};
object6.height = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
items5[1] = <View style={object6} />;
r8 = (
<View {...viewBindingProps}>
{items5}
</View>
);
} else {
r8 = r20;
}
items3[2] = r8;
r8 = guild != null || property != null;
if (r8) {
jsxRuntimeEnv0_22Binding2 = jsxRuntimeEnv0_22;
const FormDivider = (require(7972) /* metro dependency 7972: native */).FormDivider;
items6 = [
<FormDivider style={styles.divider} />,
];
ExpressionGuildDetails = importDefault(8641) /* metro dependency 8641: ExpressionGuildDetails */;
var defaultImport4Props = {guild: property ?? guild, showingJoinGuildCta: r20, hasJoinedGuild: value5};
string = intl.string;
r20 = value5 ? Reflect.apply(string, intl, [t.kx6pEG]) : Reflect.apply(string, intl, [t.pDE7Gb]);
defaultImport4Props.title = r20;
items6[1] = <ExpressionGuildDetails {...defaultImport4Props} />;
r8 = (
<>
{items6}
</>
);
}
items3[3] = r8;
r6 = r6 && value5;
if (r6) {
jsxRuntimeEnv0_22Binding3 = jsxRuntimeEnv0_22;
const FormDivider2 = (require(7972) /* metro dependency 7972: native */).FormDivider;
items7 = [
<FormDivider2 style={styles.divider} />,
];
var viewBindingProps = {style: styles.favoriteContainer};
object7 = {};
string = intl.string;
r17 = isFavorite ? Reflect.apply(string, intl, [t.XhzKyF]) : Reflect.apply(string, intl, [t.kWmiPW]);
object7.text = r17;
value = 'primary';
r17 = isFavorite ? 'tertiary' : value;
object7.variant = r17;
object7.size = 'md';
object7.onPress = handleFavorite;
items7[1] = (
<View {...viewBindingProps}>
<Button {...object7} />
</View>
);
value = (
<>
{items7}
</>
);
r6 = value;
}
items3[4] = r6;
value = (
<>
{items3}
</>
);
r0 = value;
} else {
r0 = null;
}
return r0;
function _fun84721(a0) { // fn#84721, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11252:3022, offset: 0x01f55473, size: 159 bytes, params: 2, frame: 17
var environment;
const env0_0 = a0;
let value = environment.__proto__;
const styles = useStyles();
const value3 = (StickersHooksModule).useFavoriteStickerIds().includes(a0);
const binding = env1_5;
let useCallback = binding.useCallback;
value = Reflect.apply(useCallback, binding, [_fun84722, [styles]]);
useCallback = binding.useCallback;
return {isFavorite: value3, handleFavorite: Reflect.apply(useCallback, binding, [_fun84723, [value3, a0, value]]),
renderStarIcon: value};
function _fun84722(a0) { // fn#84722, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11252:3100, offset: 0x01f55512, size: 138 bytes, params: 2, frame: 15
const object = {};
const stylesBinding = styles;
copyDataProperties(object, stylesBinding.starIcon, undefined);
if (a0) {
copyDataProperties(object, stylesBinding.starIconSelected, undefined);
} else {
copyDataProperties(object, stylesBinding.starIconUnselected, undefined);
}
return ((Component) => <Component style={object} />)(a0 ? (require(8633) /* metro dependency 8633: StarIcon */).StarIcon : (require(8635) /* metro dependency 8635: StarOutlineIcon */).StarOutlineIcon);
}
function _fun84723() { // fn#84723, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11252:3279, offset: 0x01f5559c, size: 216 bytes, params: 1, frame: 19
var environment;
let value = environment.__proto__.__proto__;
(ActionSheetActionCreators).hideActionSheet();
const content_847242 = content_84724;
const binding = env0_2;
if (binding) {
StickersActionCreatorsModule.unfavoriteSticker(env0_0);
value = importDefault(3857) /* metro dependency 3857: ToastActionCreators */;
value.open({key: 'STICKER_UNFAVORITED', icon: icon_84725, content: content_847242});
} else {
StickersActionCreatorsModule.favoriteSticker(env0_0);
value = importDefault(3857) /* metro dependency 3857: ToastActionCreators */;
value.open({key: 'STICKER_FAVORITED', icon: icon_84726, content: content_847242});
}
function content_84724() { // fn#84724, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11252:3323, offset: 0x01f55674, size: 154 bytes, params: 1, frame: 19
const value = environment.__proto__.__proto__.__proto__;
const Text = (TextModule).Text;
const binding = env1_2;
const intl = (IndexNativeModule).intl;
const string = intl.string;
const t = (IndexNativeModule).t;
return (
<Text style={{'marginLeft': 8, 'marginTop': 2}} variant="text-md/bold">
{binding ? Reflect.apply(string, intl, [t.in1rga]) : Reflect.apply(string, intl, [t.mE2e8A])}
</Text>
);
}
function icon_84725() { // fn#84725, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11252:3572, offset: 0x01ef13d1, size: 18 bytes, params: 1, frame: 11
return env1_3(false);
}
function icon_84726() { // fn#84726, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11252:3674, offset: 0x01f5570e, size: 18 bytes, params: 1, frame: 11
return env1_3(true);
}
}
}
function _fun84727() { // fn#84727, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11252:3868, offset: 0x01f55720, size: 113 bytes, params: 1, frame: 18
var value2;
var defaultImport;
if (ReactNativeModule.View != null) {
value2 = environment.__proto__;
defaultImport = importDefault(dependencyMap[17]);
defaultImport.openLazy(require(dependencyMap[35])(dependencyMap[34], dependencyMap.paths),
'StickerOptionsActionSheet', {stickerUrl: ReactNativeModule.View}, 'stack');
}
}
function _fun84729() { // fn#84729, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11252:4201, offset: 0x01f557da, size: 31 bytes, params: 1, frame: 10
if (!Module00057) {
_fun84730()();
}
function _fun84730() { // fn#84730, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11252:4212, offset: 0x01f557f9, size: 36 bytes, params: 1, frame: 12
const env0_0 = env2_3(_fun84732);
return fetchDiscoverableGuild;
function* _fun84732() { // fn#84732, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11252:4232, offset: 0x01f55828, size: 88 bytes, params: 1, frame: 13
if (true) {
value = environment.__proto__.__proto__.__proto__.__proto__;
yield env4_1(env4_2[38])(require.id);
value = undefined;
if (false) {
return value;
}
env3_3(value);
env3_5(true);
}
}
function fetchDiscoverableGuild() { // fn#84733, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11252:4292, offset: 0x00c3945f, size: 30 bytes, params: 1, frame: 13
return env0_0.apply(this, arguments);
}
}
}
function GuildStickerDetailOpenPremiumSettings() { // fn#84734, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11252:4951, owner: GuildStickerDetail.openPremiumSettings, offset: 0x01f55880, size: 165 bytes, params: 1, frame: 18
(ActionSheetActionCreators).hideActionSheet();
const defaultImport2 = AnalyticsUtils;
const track = defaultImport2.track;
const PREMIUM_PROMOTION_OPENED = AnalyticEvents.PREMIUM_PROMOTION_OPENED;
Reflect.apply(track, defaultImport2, [PREMIUM_PROMOTION_OPENED, {location_page: env0_7.page,
location_section: env0_7.section}]);
const openUserSettings = OpenUserSettingsModule.openUserSettings;
const PREMIUM = UserSettingsSections.PREMIUM;
Reflect.apply(openUserSettings, OpenUserSettingsModule, [{screen: PREMIUM, params: {analyticsLocation: env0_7}}]);
}
function _fun84735() { // fn#84735, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11252:5290, offset: 0x01f55925, size: 21 bytes, params: 1, frame: 2
env0_9.current = ReactNativeModule.Pressable;
}
function _fun84736() { // fn#84736, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11252:5325, offset: 0x01f5593a, size: 97 bytes, params: 1, frame: 15
var defaultImport;
var track;
var OPEN_POPOUT;
var object;
const {popoutAnalyticsConfig, popoutType} = env0_9.current;
if (Module00057) {
value = environment.__proto__;
defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
track = defaultImport.track;
OPEN_POPOUT = AnalyticEvents.OPEN_POPOUT;
object = {type: popoutType};
copyDataProperties(object, popoutAnalyticsConfig, popoutType);
Reflect.apply(track, defaultImport, [OPEN_POPOUT, object]);
}
}
function GuildStickerDetailOnPress() { // fn#84737, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11252:6167, owner: GuildStickerDetail.onPress, offset: 0x01f5599b, size: 39 bytes, params: 1, frame: 11
const value = environment.__proto__;
return (OpenStickersPremiumUpsellAlert)(env0_7);
}
function GuildStickerDetailOnPress_84738() { // fn#84738, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11252:6346, owner: GuildStickerDetail.onPress, offset: 0x01f559c2, size: 85 bytes, params: 1, frame: 13
var environment;
var id;
var value;
if (env0_2 != null) {
id = env0_2.id;
value = environment.__proto__;
value = importDefault(6593) /* metro dependency 6593: GuildActionCreators */;
value = value.joinGuild(id);
value.then(_fun84739);
}
function _fun84739() { // fn#84739, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11252:6402, offset: 0x01f55a17, size: 45 bytes, params: 1, frame: 12
let value = environment.__proto__.__proto__;
value = importDefault(6593) /* metro dependency 6593: GuildActionCreators */;
value.transitionToGuildSync(id);
}
}
}
function UnavailableStickerDetail({renderableSticker, channel}) { // fn#84740, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11252:7035, offset: 0x01f55a44, size: 758 bytes, params: 2, frame: 32
const styles = useStyles();
const canUseCustomStickersEverywhere2 = (PremiumUtils).canUseCustomStickersEverywhere(UserStore.getCurrentUser());
const env0_1 = env0_5.useMemo(function() {
return {page: channel.guild_id != null ? AnalyticsPages.GUILD_CHANNEL : AnalyticsPages.DM_CHANNEL,
section: AnalyticsSections.STICKER_POPOUT};
}, [channel.guild_id]);
const defaultImport2 = TidaWebformExperiment;
const useExperiment = defaultImport2.useExperiment;
const tidaWebformEnabled = Reflect.apply(useExperiment, defaultImport2, [{location: 'StickerDetailActionSheet'},
{autoTrackExposure: false}]).tidaWebformEnabled;
const DeveloperMode = (UserSettingsModule).DeveloperMode;
let r5 = tidaWebformEnabled && DeveloperMode.useSetting();
const stickerAssetUrl = (StickersUtilsModule).getStickerAssetUrl(renderableSticker);
const value5 = env0_5.useCallback(_fun84742, [stickerAssetUrl]);
const items2 = [
((Component) => <Component sticker={renderableSticker} size={48} />)(Sticker),
];
const Text = (TextModule).Text;
const text = (
<Text variant="heading-md/extrabold" color="mobile-text-heading-primary">
{renderableSticker.name}
</Text>
);
const TextWithIOSLinkWorkaround = (TextWithIOSLinkWorkaroundModule).TextWithIOSLinkWorkaround;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
items2[1] = (
<View style={styles.guildEmojiDescription}>
{text}
<TextWithIOSLinkWorkaround style={styles.description} variant="text-sm/medium">
{canUseCustomStickersEverywhere2 ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.vZaScH) : intl.format((require(1244) /* metro dependency 1244: indexNative */).t.hGWuxU,
{openPremiumSettings: openPremiumSettings})}
</TextWithIOSLinkWorkaround>
</View>
);
r5 = r5 && stickerAssetUrl != null && <Pressable accessibilityLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.PdRCRg)} style={styles.moreMenuIcon} onPress={value5}>{((MoreHorizontalIcon) => <MoreHorizontalIcon color={(importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_TEXT_DEFAULT} />)((require(8638) /* metro dependency 8638: MoreHorizontalIcon */).MoreHorizontalIcon)}</Pressable>;
items2[2] = r5;
return (
<View style={styles.guildEmojiTopContainer}>
{items2}
</View>
);
function _fun84742() { // fn#84742, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11252:7460, offset: 0x01f55d3a, size: 113 bytes, params: 1, frame: 18
var value2;
var defaultImport;
if (env0_2 != null) {
value2 = environment.__proto__;
defaultImport = importDefault(dependencyMap[17]);
defaultImport.openLazy(require(dependencyMap[35])(dependencyMap[34], dependencyMap.paths),
'StickerOptionsActionSheet', {stickerUrl: env0_2}, 'stack');
}
}
function UnavailableStickerDetailOpenPremiumSettings() { // fn#84743, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11252:8001, owner: UnavailableStickerDetail.openPremiumSettings, offset: 0x01f55dab, size: 157 bytes, params: 1, frame: 18
(ActionSheetActionCreators).hideActionSheet();
const defaultImport2 = AnalyticsUtils;
const track = defaultImport2.track;
const PREMIUM_PROMOTION_OPENED = AnalyticEvents.PREMIUM_PROMOTION_OPENED;
const binding = env0_1;
Reflect.apply(track, defaultImport2, [PREMIUM_PROMOTION_OPENED, {location_page: binding.page,
location_section: binding.section}]);
const openUserSettings = OpenUserSettingsModule.openUserSettings;
const PREMIUM = UserSettingsSections.PREMIUM;
Reflect.apply(openUserSettings, OpenUserSettingsModule, [{screen: PREMIUM, params: {analyticsLocation: binding}}]);
}
}
function StickerDetailActionSheet({renderableSticker, channel, chatInputRef}) { // fn#84744, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11252:8425, offset: 0x01f55e48, size: 365 bytes, params: 2, frame: 23
var r0;
var r6;
var moduleValue2;
var moduleValue3;
const styles = useStyles();
const value3 = Module00057((StickersHooksModule).useStickerForRenderableSticker(renderableSticker,
true), 2);
const property = value3[0];
const property2 = value3[1];
const activityIndicator = <ActivityIndicator size="large" />;
if (property != null) {
if (property == null) {
r6 = activityIndicator;
} else {
moduleValue2 = require(4643) /* metro dependency 4643: StickersUtils */;
if (moduleValue2.isStandardSticker(property)) {
r0 = (
<StandardStickerDetail
sticker={property}
channel={channel}
chatInputRef={chatInputRef}
/>
);
} else {
moduleValue3 = require(4643) /* metro dependency 4643: StickersUtils */;
r0 = (
moduleValue3.isGuildSticker(property)
? (
<GuildStickerDetail sticker={property} channel={channel} />
)
: activityIndicator
);
}
r6 = r0;
}
} else if (property2) {
r6 = <UnavailableStickerDetail renderableSticker={renderableSticker} channel={channel} />;
} else if (property == null) {
r6 = activityIndicator;
} else {
moduleValue2 = require(4643) /* metro dependency 4643: StickersUtils */;
if (moduleValue2.isStandardSticker(property)) {
r0 = (
<StandardStickerDetail
sticker={property}
channel={channel}
chatInputRef={chatInputRef}
/>
);
} else {
moduleValue3 = require(4643) /* metro dependency 4643: StickersUtils */;
r0 = (
moduleValue3.isGuildSticker(property)
? (
<GuildStickerDetail sticker={property} channel={channel} />
)
: activityIndicator
);
}
r6 = r0;
}
const BottomSheet = (BottomSheetNativeModule).BottomSheet;
return (
<BottomSheet startExpanded>
<View style={styles.content}>
{r6}
</View>
</BottomSheet>
);
}
}
global.__d(_fun84711, 11066, [5, 57, 31, 27, 1867, 1878, 6583, 11028, 661, 6276, 33, 4501, 477, 697, 11049, 8633,
8635, 4080, 4573, 1244, 11050, 3857, 566, 1478, 683, 11063, 4578, 11065, 11051, 11056, 3802, 6796, 3829, 4643,
11067, 1962, 4863, 6593, 11068, 7007, 10970, 8638, 7954, 11069, 7972, 8641, 6766, 6275,
2]) /* metro module 11066, dependencies: [5, 57, 31, 27, 1867, 1878, 6583, 11028, 661, 6276, 33, 4501, 477, 697, 11049, 8633, 8635, 4080, 4573, 1244, 11050, 3857, 566, 1478, 683, 11063, 4578, 11065, 11051, 11056, 3802, 6796, 3829, 4643, 11067, 1962, 4863, 6593, 11068, 7007, 10970, 8638, 7954, 11069, 7972, 8641, 6766, 6275, 2] */;