Initial commit

This commit is contained in:
janisslsm committed 2026-07-27 16:20:00 +03:00
commit af3b49f756
16065 files changed
+2938410

No files matched your search

@@ -0,0 +1,641 @@
/* Metro module 11544; source: modules/forums/native/AddMediaToOriginalForumPostActionSheet.tsx; dependencies: [57, 5, 31, 27, 1379, 4645, 1867, 4814, 661, 33, 4501, 697, 7224, 4697, 4655, 4080, 7881, 7879, 21, 4651, 7880, 7153, 507, 11545, 7067, 4821, 4496, 1244, 566, 6771, 7155, 4660, 6275, 11546, 4573, 4579, 2] */
function _fun88474(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#88474, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11730:6, offset: 0x01fe49cf, size: 596 bytes, params: 8, frame: 24
var object4;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
const env0_4 = importDefault(5) /* metro dependency 5 */;
const env0_5 = importAll(31) /* metro dependency 31 */;
const env0_6 = (require(27) /* metro dependency 27 */).View;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const env0_8 = (require(4645) /* metro dependency 4645: DraftStore */).DraftType;
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
const messageStore = importDefault(4814) /* metro dependency 4814: MessageStore */;
let value = require(661) /* metro dependency 661: Constants */;
const env0_11 = value.AbortCodes;
const env0_12 = value.Endpoints;
value = require(33) /* metro dependency 33 */;
const env0_13 = value.jsx;
const env0_14 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object4 = {container: {'paddingHorizontal': 16, 'paddingTop': 24}};
const object5 = {borderWidth: 1};
const BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
object5.borderColor = BORDER_SUBTLE;
object5.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.md;
object5.marginBottom = 32;
const BLACK = (importDefault(697) /* metro dependency 697: native */).colors.BLACK;
object5.shadowColor = BLACK;
object5.shadowOffset = {'width': 0, 'height': 1};
object5.shadowOpacity = 0.25;
object5.shadowRadius = 4;
object5.elevation = 4;
object4.post = object5;
object4.postContent = {'marginBottom': 0, 'padding': 8};
object4.title = {'textAlign': 'center', 'marginBottom': 8};
object4.description = {'textAlign': 'center', 'marginBottom': 32};
const object6 = {};
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object4.button = object6;
object4.buttonMargin = {marginBottom: 10};
const env0_15 = Reflect.apply(createStyles, value, [object4]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/forums/native/AddMediaToOriginalForumPostActionSheet.tsx');
exports.default = AddMediaToOriginalForumPostActionSheet;
}
function _upload2() { // fn#88475, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11730:755, offset: 0x01fe4c23, size: 50 bytes, params: 1, frame: 14
return env0_4(_fun88477).apply(this, arguments);
}
function AddMediaToOriginalForumPostActionSheet({threadId, attachments, sendMessage}) { // fn#88483, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11730:2476, offset: 0x01fe521a, size: 1262 bytes, params: 2, frame: 33
const styles = useStyles();
const binding = env0_5;
let useState = binding.useState;
const value3 = Reflect.apply(useState, binding, [false]);
const binding2 = env0_3;
const value4 = binding2(value3, 2);
const property = value4[0];
var env0_3 = value4[1];
const value5 = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], function() {
return ChannelStore.getChannel(threadId);
}, [threadId]);
const value8 = binding.useCallback(_fun88487, [value5,
(require(566) /* metro dependency 566: flux */).useStateFromStores([GuildStore], _fun88485, [value5]),
(require(566) /* metro dependency 566: flux */).useStateFromStores([MessageStore], _fun88486, [threadId]),
threadId, attachments,
(importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */)().analyticsLocations]);
const value9 = binding.useCallback(_fun88489, [sendMessage]);
useState = binding.useState;
const value10 = binding2(Reflect.apply(useState, binding, [null]), 2);
const property2 = value10[0];
const env0_8 = value10[1];
binding.useEffect(_fun88490, [attachments]);
const item = attachments[0]?.item;
const r13 = item != null && property2 != null ? {src: property2, width: item.width, height: item.height,
spoiler: attachments[0].spoiler, alt: attachments[0].description} : undefined;
const BottomSheet = (require(6275) /* metro dependency 6275: BottomSheetNative */).BottomSheet;
const ForumPostListDisabled = (require(11546) /* metro dependency 11546: ForumPost */).ForumPostListDisabled;
const items4 = [<View pointerEvents="none" style={styles.post}><ForumPostListDisabled threadId={threadId} localDeviceMedia={r13} style={styles.postContent} /></View>];
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
items4[1] = <Text style={styles.title} accessibilityRole="header" variant="heading-xl/extrabold" color="mobile-text-heading-primary">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['+SZF6S'])}</Text>;
items4[2] = <Text style={styles.description} variant="text-md/medium" color="text-default">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['0Ycgw5'])}</Text>;
const BaseTextButton = (require(4579) /* metro dependency 4579: BaseTextButtonNative */).BaseTextButton;
items4[3] = <View style={styles.buttonMargin}><BaseTextButton grow variant="primary" text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.d611xH)} pillStyle={styles.button} onPress={value8} loading={property} disabled={property} /></View>;
items4[4] = <View style={styles.buttonMargin}><BaseTextButton grow variant="secondary" text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['8rKVHL'])} pillStyle={styles.button} onPress={value9} disabled={property} /></View>;
items4[5] = <BaseTextButton grow variant="secondary" text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['ETE/oC'])} pillStyle={styles.button} onPress={onPress_88492} disabled={property} />;
return (
<BottomSheet startExpanded>
<View style={styles.container}>
{items4}
</View>
</BottomSheet>
);
}
async function _fun88477(a0) { // fn#88477, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11730:794, offset: 0x01fe4c69, size: 1060 bytes, params: 2, frame: 33
var environment;
var r14;
var r13;
var value;
var value2;
var threadId;
var attachments;
var setIsUploading;
var guild;
var analyticsLocations;
var value3;
var binding;
var binding2;
var value4;
var prototype;
var value5;
var value6;
var value7;
var on;
var binding3;
var getMessages;
var value8;
var get;
var value9;
var castChannelIdAsMessageId;
var value10;
var object;
var attachments2;
var uploadFiles;
var value11;
var value12;
var value13;
var value14;
var map;
var closure;
var value15;
var value16;
var items2;
var binding4;
var property;
var value17;
var unarchiveThreadIfNecessary;
var value18;
var value19;
var value20;
var binding5;
var value21;
var HTTP;
var patch;
var object4;
var MESSAGE;
var binding6;
var value22;
var value23;
var value24;
var object5;
var value25;
var value26;
var value27;
var error;
var binding7;
var value28;
var hideActionSheet;
var value29;
var value30;
var value31;
var value32;
var code;
var EXPLICIT_CONTENT;
var binding8;
var value33;
var show;
var intl;
var string;
var t;
var B3vFdU;
var getAnyErrorMessage;
var message;
var binding9;
var value34;
var sendExplicitMediaClydeError;
var TrackMediaRedactionContext;
var EXPLICIT_MEDIA_ADD_MEDIA_TO_FORUM_POST_BLOCKED;
exceptionLanding76: while (true) {
exceptionLanding74: while (true) {
value = undefined;
value2 = false;
if (value2) {
return value;
}
threadId = a0.threadId;
var env0_0 = threadId;
attachments = a0.attachments;
setIsUploading = a0.setIsUploading;
var env0_1 = setIsUploading;
guild = a0.guild;
var env0_2 = guild;
analyticsLocations = a0.analyticsLocations;
var env0_3 = analyticsLocations;
var env0_4 = undefined;
await undefined;
value = undefined;
value3 = false;
if (value3) {
return value;
}
value = environment.__proto__.__proto__;
binding = env2_1;
binding2 = env2_2;
value4 = binding(binding2[12]);
prototype = value4.prototype;
value5 = Object.create(prototype, {constructor: {value: value4}});
value6 = new value4();
value7 = value6 instanceof Object ? value6 : value5;
env0_4 = value7;
on = value7.on;
Reflect.apply(on, value7, ['start', function() {
setIsUploading(true);
}]);
on = value7.on;
Reflect.apply(on, value7, ['progress', _fun88479]);
on = value7.on;
Reflect.apply(on, value7, ['error', _fun88480]);
on = value7.on;
Reflect.apply(on, value7, ['complete', _fun88481]);
binding3 = env2_10;
getMessages = binding3.getMessages;
value8 = Reflect.apply(getMessages, binding3, [threadId]);
get = value8.get;
value9 = binding(binding2[18]);
castChannelIdAsMessageId = value9.castChannelIdAsMessageId;
value10 = Reflect.apply(get, value8, [Reflect.apply(castChannelIdAsMessageId, value9, [threadId])]);
if (value10 != null) {
attachments2 = value10.attachments;
r14 = attachments2;
} else {
r14 = [];
}
try {
uploadFiles = value7.uploadFiles;
} catch (error) {
break exceptionLanding76;
}
try {
value11 = Reflect.apply(uploadFiles, value7, [attachments]);
} catch (error) {
break exceptionLanding76;
}
await value11;
try {
value12 = undefined;
value13 = false;
} catch (error) {
break exceptionLanding76;
}
if (value13) {
return value12;
}
try {
object = [];
} catch (error) {
break exceptionLanding76;
}
try {
value14 = arraySpread(object, r14, 0, 18);
} catch (error) {
break exceptionLanding76;
}
try {
map = value12.map;
} catch (error) {
break exceptionLanding76;
}
try {
closure = _fun88482;
} catch (error) {
break exceptionLanding76;
}
try {
value15 = Reflect.apply(map, value12, [closure]);
} catch (error) {
break exceptionLanding76;
}
try {
value16 = value15 != null;
} catch (error) {
break exceptionLanding76;
}
if (value16) {
r13 = value15;
} else {
try {
items2 = [];
} catch (error) {
break exceptionLanding76;
}
r13 = items2;
}
try {
arraySpread(object, r13, value14, 18);
} catch (error) {
break exceptionLanding76;
}
try {
binding = env2_1;
} catch (error) {
break exceptionLanding74;
}
try {
binding4 = env2_2;
} catch (error) {
break exceptionLanding74;
}
try {
property = binding4[21];
} catch (error) {
break exceptionLanding74;
}
try {
value17 = binding(property);
} catch (error) {
break exceptionLanding74;
}
try {
unarchiveThreadIfNecessary = value17.unarchiveThreadIfNecessary;
} catch (error) {
break exceptionLanding74;
}
try {
value18 = Reflect.apply(unarchiveThreadIfNecessary, value17, [threadId]);
} catch (error) {
break exceptionLanding74;
}
await value18;
try {
value19 = undefined;
value20 = false;
} catch (error) {
break exceptionLanding74;
}
if (value20) {
return value19;
}
reducibleJoin40: while (true) {
reduciblePort72: while (true) {
exceptionLanding67: while (true) {
try {
binding = env2_0;
} catch (error) {
break exceptionLanding67;
}
break reducibleJoin40;
}
setIsUploading(false);
binding = env2_1;
binding7 = env2_2;
value28 = binding(binding7[15]);
hideActionSheet = value28.hideActionSheet;
Reflect.apply(hideActionSheet, value28, []);
value29 = binding(binding7[23]);
prototype = value29.prototype;
value30 = Object.create(prototype, {constructor: {value: value29}});
value31 = new value29();
value32 = value31 instanceof Object ? value31 : value30;
code = value32.code;
EXPLICIT_CONTENT = env2_11.EXPLICIT_CONTENT;
if (code === EXPLICIT_CONTENT) {
binding = env2_1;
binding9 = env2_2;
value34 = binding(binding9[24]);
sendExplicitMediaClydeError = value34.sendExplicitMediaClydeError;
attachments = value32.attachments;
binding = env2_0;
TrackMediaRedactionContext = binding(binding9[25]).TrackMediaRedactionContext;
EXPLICIT_MEDIA_ADD_MEDIA_TO_FORUM_POST_BLOCKED = TrackMediaRedactionContext.EXPLICIT_MEDIA_ADD_MEDIA_TO_FORUM_POST_BLOCKED;
Reflect.apply(sendExplicitMediaClydeError, value34, [threadId, attachments,
EXPLICIT_MEDIA_ADD_MEDIA_TO_FORUM_POST_BLOCKED]);
} else {
binding = env2_1;
binding8 = env2_2;
value33 = binding(binding8[26]);
show = value33.show;
object = {};
binding = env2_0;
intl = binding(binding8[27]).intl;
string = intl.string;
t = binding(binding8[27]).t;
B3vFdU = t.B3vFdU;
object.title = Reflect.apply(string, intl, [B3vFdU]);
getAnyErrorMessage = value32.getAnyErrorMessage;
value = Reflect.apply(getAnyErrorMessage, value32, []);
reducibleJoin70: while (true) {
if (value != null) {
r14 = value;
break reducibleJoin70;
}
message = value32.message;
r14 = message;
break reducibleJoin70;
}
object.body = r14;
Reflect.apply(show, value33, [object]);
}
break reduciblePort72;
}
return undefined;
}
try {
binding5 = env2_2;
} catch (error) {
break exceptionLanding67;
}
try {
property = binding5[22];
} catch (error) {
break exceptionLanding67;
}
try {
value21 = binding(property);
} catch (error) {
break exceptionLanding67;
}
try {
HTTP = value21.HTTP;
} catch (error) {
break exceptionLanding67;
}
try {
patch = HTTP.patch;
} catch (error) {
break exceptionLanding67;
}
try {
object4 = {};
} catch (error) {
break exceptionLanding67;
}
try {
binding = env2_12;
} catch (error) {
break exceptionLanding67;
}
try {
MESSAGE = binding.MESSAGE;
} catch (error) {
break exceptionLanding67;
}
try {
binding6 = env2_1;
} catch (error) {
break exceptionLanding67;
}
try {
property = binding5[18];
} catch (error) {
break exceptionLanding67;
}
try {
value22 = binding6(property);
} catch (error) {
break exceptionLanding67;
}
try {
castChannelIdAsMessageId = value22.castChannelIdAsMessageId;
} catch (error) {
break exceptionLanding67;
}
try {
value23 = Reflect.apply(castChannelIdAsMessageId, value22, [threadId]);
} catch (error) {
break exceptionLanding67;
}
try {
value24 = Reflect.apply(MESSAGE, binding, [threadId, value23]);
} catch (error) {
break exceptionLanding67;
}
try {
object4.url = value24;
} catch (error) {
break exceptionLanding67;
}
try {
object5 = {};
} catch (error) {
break exceptionLanding67;
}
try {
object5.attachments = object;
} catch (error) {
break exceptionLanding67;
}
try {
object4.body = object5;
} catch (error) {
break exceptionLanding67;
}
try {
object4.rejectWithError = true;
} catch (error) {
break exceptionLanding67;
}
try {
value25 = Reflect.apply(patch, HTTP, [object4]);
} catch (error) {
break exceptionLanding67;
}
await value25;
try {
value26 = undefined;
value27 = false;
} catch (error) {
break exceptionLanding67;
}
return value27 ? value26 : undefined;
}
setIsUploading(false);
binding = env2_1;
value = binding(env2_2[15]);
hideActionSheet = value.hideActionSheet;
Reflect.apply(hideActionSheet, value, []);
return undefined;
}
setIsUploading(false);
binding = env2_1;
const binding10 = env2_2;
binding(binding10[15]).hideActionSheet();
env2_0(binding10[20]).handleUploadMessageAttachmentsErrors({file: error.file, guildId: guild.id,
analyticsLocations: analyticsLocations, code: error.code, reason: error.reason});
}
function _fun88485() { // fn#88485, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11730:2714, offset: 0x01fe5708, size: 52 bytes, params: 1, frame: 13
const value = environment.__proto__;
return GuildStore.getGuild(env0_4?.getGuildId());
}
function _fun88486() { // fn#88486, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11730:2801, offset: 0x01fe573c, size: 61 bytes, params: 1, frame: 15
let value = environment.__proto__;
const getMessage = MessageStore.getMessage;
const threadIdBinding = threadId;
value = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
return Reflect.apply(getMessage, MessageStore, [threadIdBinding, value.castChannelIdAsMessageId(threadIdBinding)]);
}
function _fun88487() { // fn#88487, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11730:2913, offset: 0x01fe5779, size: 175 bytes, params: 1, frame: 14
var environment;
var value2;
var value;
if (env0_4 == null) {
value = environment.__proto__;
value = importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */;
value.hideActionSheet();
} else if (env0_6 == null) {
value = environment.__proto__;
value = importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */;
value.hideActionSheet();
} else if (env0_5 != null) {
value2 = environment.__proto__;
(require(7155) /* metro dependency 7155: Tracking */).trackForumAddMediaToOriginalPostClicked({added: true});
(function() {
return _upload2.apply(this, arguments);
})({threadId: threadId, attachments: attachments, setIsUploading: env0_3, guild: env0_5,
analyticsLocations: analyticsLocations});
} else {
value = environment.__proto__;
value = importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */;
value.hideActionSheet();
}
}
function _fun88489() { // fn#88489, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11730:3200, offset: 0x01fe5846, size: 84 bytes, params: 1, frame: 15
const value = environment.__proto__;
(require(7155) /* metro dependency 7155: Tracking */).trackForumAddMediaToOriginalPostClicked({added: false});
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
sendMessage();
}
function _fun88490() { // fn#88490, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11730:3359, offset: 0x01fe589a, size: 86 bytes, params: 1, frame: 13
var environment;
var value2;
var moduleValue;
if (attachments[0] != null) {
value2 = environment.__proto__;
moduleValue = require(4660) /* metro dependency 4660: UploadUtils */;
moduleValue.getFileInfo(attachments[0]).then(_fun88491);
}
}
function AddMediaToOriginalForumPostActionSheetOnPress() { // fn#88492, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11730:4612, owner: AddMediaToOriginalForumPostActionSheet.onPress, offset: 0x01fe5908, size: 37 bytes, params: 1, frame: 11
const value = environment.__proto__;
return (importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
}
function _fun88479(a0) { // fn#88479, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11730:943, offset: 0x01fe508d, size: 212 bytes, params: 2, frame: 19
var binding3;
let value = environment.__proto__.__proto__.__proto__;
let binding = env3_0;
const binding2 = env3_2;
const kestrelConfig = binding(binding2[13]).getKestrelConfig({location: 'native.AddMediaToOriginalForumPostActionSheet'});
const value4 = binding(binding2[13]);
const getEffectiveKestrelLimit = value4.getEffectiveKestrelLimit;
const value5 = binding(binding2[14]);
const value7 = Reflect.apply(getEffectiveKestrelLimit, value4, [kestrelConfig, value5.maxFileSize(guild.id)]);
if (a0.currentSize > value7) {
binding = env0_4;
binding.cancel();
setIsUploading(false);
binding = env3_1;
binding3 = env3_2;
value = binding(binding3[15]);
value.hideActionSheet();
value = binding(binding3[16]);
value({file: a0, maxSize: value7, analyticsLocations: analyticsLocations});
}
}
function _fun88480() { // fn#88480, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11730:1235, offset: 0x01fe5161, size: 51 bytes, params: 1, frame: 12
setIsUploading(false);
const value = environment.__proto__.__proto__.__proto__;
env3_1(env3_2[15]).hideActionSheet();
}
function _fun88481() { // fn#88481, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11730:1293, offset: 0x01fe5194, size: 89 bytes, params: 1, frame: 16
setIsUploading(false);
const binding = env3_1;
const binding2 = env3_2;
const value3 = binding(binding2[17]);
const clearAll = value3.clearAll;
const threadIdBinding = threadId;
const ChannelMessage = env3_8.ChannelMessage;
Reflect.apply(clearAll, value3, [threadIdBinding, ChannelMessage]);
binding(binding2[15]).hideActionSheet();
}
function _fun88482(a0, a1) { // fn#88482, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11730:1528, offset: 0x01fe51ed, size: 45 bytes, params: 3, frame: 13
const value = environment.__proto__.__proto__.__proto__;
return env3_0(env3_2[19]).getAttachmentPayload(a0, a1);
}
function _fun88491({uri}) { // fn#88491, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11730:3409, offset: 0x01fe58f0, size: 24 bytes, params: 2, frame: 11
return env1_8(uri);
}
@@ -0,0 +1,111 @@
/* Metro module 11089; source: modules/forums/native/AppliedForumTag.tsx; dependencies: [31, 27, 6540, 1881, 33, 4501, 697, 566, 11090, 1244, 6739, 1423, 4573, 2] */
function _fun84905(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#84905, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11275:6, offset: 0x01f5b9bf, size: 405 bytes, params: 8, frame: 25
const env0_0 = require;
const closure = AppliedForumTag;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_3 = (require(27) /* metro dependency 27 */).View;
const emojiStore = importDefault(6540) /* metro dependency 6540: EmojiStore */;
const env0_5 = (require(1881) /* metro dependency 1881: EmojiConstants */).EMOJI_URL_BASE_SIZE;
let value = require(33) /* metro dependency 33 */;
const env0_6 = value.jsx;
const env0_7 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
const object = {'height': 24, 'paddingHorizontal': 8, 'borderRadius': 20, 'backgroundColor': null, 'borderWidth': 1,
'borderColor': null, 'marginRight': 4, 'flexShrink': 1};
const BACKGROUND_MOD_NORMAL = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_NORMAL;
object.backgroundColor = BACKGROUND_MOD_NORMAL;
const BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
object.borderColor = BORDER_SUBTLE;
const env0_8 = Reflect.apply(createStyles, value, [{pill: object, disableEndMargin: {marginRight: 0},
emoji: {'height': 12, 'width': 12, 'marginRight': 4, 'flexShrink': 0}, textEmoji: {'fontSize': 10,
'marginRight': 4}, tagName: {flexShrink: 1}, container: {'display': 'flex', 'flexDirection': 'row',
'alignItems': 'center'}}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/forums/native/AppliedForumTag.tsx');
exports.AppliedForumTagPill = AppliedForumTagPill;
exports.AppliedForumTag = closure;
}
function AppliedForumTag({tag, hasUnreads, containerStyle}) { // fn#84906, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11275:615, offset: 0x01f5bb54, size: 204 bytes, params: 2, frame: 18
const env0_1 = useStyles();
const env0_2 = tag.name;
const env0_3 = tag.emojiId;
const env0_4 = tag.emojiName;
const env0_5 = (require(566) /* metro dependency 566: flux */).useStateFromStores([EmojiStore], _fun84907);
const env0_6 = hasUnreads ? 'text-default' : 'text-muted';
return ((Component) => <Component tagId={tag.id}>{children_84908}</Component>)(importDefault(11090) /* metro dependency 11090: ForumTagContextMenu */);
}
function AppliedForumTagPill({tag, hasUnreads, containerStyle, disableEndMargin}) { // fn#84909, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11275:1413, offset: 0x01f5be1c, size: 106 bytes, params: 2, frame: 18
const styles = useStyles();
return (
<AppliedForumTag
tag={tag}
hasUnreads={hasUnreads}
containerStyle={[styles.pill, containerStyle, disableEndMargin ? styles.disableEndMargin : {}]}
/>
);
}
function _fun84907() { // fn#84907, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11275:758, offset: 0x01f5bc20, size: 40 bytes, params: 1, frame: 12
const emojiIdBinding = emojiId;
const value2 = null;
return value2 != emojiIdBinding ? EmojiStore.getUsableCustomEmojiById(emojiId) : value2;
}
function AppliedForumTagChildren(a0) { // fn#84908, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11275:877, owner: AppliedForumTag.children, offset: 0x01f5bc48, size: 468 bytes, params: 2, frame: 27
var r10;
var object;
var defaultImport;
var getEmojiURL;
var binding;
const ref = a0.ref;
let value = Object.create(null);
value.ref = 0;
const value2 = copyDataProperties({}, a0, value, undefined);
const viewProps = {style: [styles.container, containerStyle], accessible: true};
const value5 = undefined;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
viewProps.accessibilityLabel = intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.tXXD6v,
{tagName: name});
viewProps.ref = ref;
copyDataProperties(viewProps, value2, value);
let r6 = emojiName != null || emojiId != null;
if (r6) {
value = importDefault(6739) /* metro dependency 6739: Emoji */;
object = {};
stylesBinding = styles;
object.textEmojiStyle = stylesBinding.textEmoji;
object.fastImageStyle = stylesBinding.emoji;
if (env0_5 != null) {
defaultImport = importDefault(1423) /* metro dependency 1423: AvatarUtils */;
getEmojiURL = defaultImport.getEmojiURL;
binding = env0_5;
r10 = Reflect.apply(getEmojiURL, defaultImport, [{id: binding.id, animated: binding.animated,
size: EMOJI_URL_BASE_SIZE}]);
} else {
r10 = value5;
}
object.src = r10;
object.name = emojiName ?? '';
value = ((Component) => <Component {...object} />)(value);
r6 = value;
}
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<View {...viewProps}>
{r6}
<Text
lineClamp={1}
style={styles.tagName}
variant="text-xs/semibold"
color={env0_6}
>
{name}
</Text>
</View>
);
}
@@ -0,0 +1,121 @@
/* Metro module 11162; source: modules/forums/native/AvailableForumTag.tsx; dependencies: [31, 6540, 661, 1881, 33, 4501, 697, 6597, 566, 11090, 8554, 6739, 1423, 1305, 2] */
function _fun85233(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#85233, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11348:6, offset: 0x01f6835d, size: 474 bytes, params: 8, frame: 24
var object3;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const emojiStore = importDefault(6540) /* metro dependency 6540: EmojiStore */;
const Fonts = (require(661) /* metro dependency 661: Constants */).Fonts;
const env0_5 = (require(1881) /* metro dependency 1881: EmojiConstants */).EMOJI_URL_BASE_SIZE;
let value = require(33) /* metro dependency 33 */;
const env0_6 = value.jsx;
const env0_7 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object3 = {};
const object4 = {'display': 'flex', 'flexDirection': 'row', 'alignItems': 'center', 'paddingHorizontal': 12,
'borderRadius': 20, 'backgroundColor': null, 'margin': 6, 'borderWidth': 2, 'borderColor': null,
'overflow': 'hidden', 'height': 32};
let BACKGROUND_BASE_LOWEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWEST;
object4.backgroundColor = BACKGROUND_BASE_LOWEST;
BACKGROUND_BASE_LOWEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWEST;
object4.borderColor = BACKGROUND_BASE_LOWEST;
object3.pill = object4;
const BACKGROUND_BRAND = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BRAND;
object3.pillSelected = {borderColor: BACKGROUND_BRAND, borderWidth: 1};
object3.pillDisabled = {opacity: 0.6};
object3.emoji = {'height': 18, 'width': 18, 'marginRight': 4, 'display': 'flex', 'alignItems': 'center',
'justifyContent': 'center'};
object3.imageEmoji = {'height': 16, 'width': 16};
object3.textEmoji = {'fontSize': 14, 'lineHeight': 20};
const textStyles = importDefault(6597) /* metro dependency 6597: TextStyles */;
const PRIMARY_SEMIBOLD = Fonts.PRIMARY_SEMIBOLD;
const MOBILE_TEXT_HEADING_PRIMARY = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_TEXT_HEADING_PRIMARY;
object3.tagName = textStyles(PRIMARY_SEMIBOLD, MOBILE_TEXT_HEADING_PRIMARY, 14);
const env0_8 = Reflect.apply(createStyles, value, [object3]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/forums/native/AvailableForumTag.tsx');
exports.default = AvailableForumTag;
}
function AvailableForumTag({tag, onPress, disabled, selected}) { // fn#85234, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11348:908, offset: 0x01f68537, size: 246 bytes, params: 2, frame: 21
const env0_3 = selected;
const styles = useStyles();
const env0_5 = tag.name;
const env0_6 = tag.emojiId;
const env0_7 = tag.emojiName;
const env0_8 = (require(566) /* metro dependency 566: flux */).useStateFromStores([EmojiStore], _fun85235);
const AvailableForumTagHandlePress = function() {
if (!disabled) {
onPress(tag);
}
};
const env0_10 = env0_3.useMemo(function() {
var items = [];
items.push(styles.pill);
if (selected) {
items.push(styles.pillSelected);
}
if (disabled) {
items.push(styles.pillDisabled);
}
return items;
}, [disabled, selected, styles]);
return ((Component) => <Component tagId={tag.id}>{children_85238}</Component>)(importDefault(11090) /* metro dependency 11090: ForumTagContextMenu */);
}
function _fun85235() { // fn#85235, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11348:1055, offset: 0x01f6862d, size: 40 bytes, params: 1, frame: 12
const emojiIdBinding = emojiId;
const value2 = null;
return value2 != emojiIdBinding ? EmojiStore.getUsableCustomEmojiById(emojiId) : value2;
}
function AvailableForumTagChildren(a0) { // fn#85238, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11348:1282, owner: AvailableForumTag.children, offset: 0x01f686c5, size: 423 bytes, params: 2, frame: 27
var r10;
var object;
var stylesBinding;
var defaultImport;
var getEmojiURL;
var binding;
const ref = a0.ref;
let value = Object.create(null);
value.ref = 0;
const value2 = copyDataProperties({}, a0, value, undefined);
const value4 = undefined;
const PressableScale = (require(8554) /* metro dependency 8554: native */).PressableScale;
const pressableScaleProps2 = {style: env0_10, accessibilityRole: 'button', accessibilityState: {selected: selected},
disabled: disabled, ref: ref, ...value2};
pressableScaleProps2['onPress'] = AvailableForumTagHandlePress;
let r6 = env0_8 != null || emojiName != null;
if (r6) {
value = importDefault(6739) /* metro dependency 6739: Emoji */;
object = {};
stylesBinding = styles;
object.style = stylesBinding.emoji;
object.textEmojiStyle = stylesBinding.textEmoji;
object.fastImageStyle = stylesBinding.imageEmoji;
if (env0_8 != null) {
defaultImport = importDefault(1423) /* metro dependency 1423: AvatarUtils */;
getEmojiURL = defaultImport.getEmojiURL;
binding = env0_8;
r10 = Reflect.apply(getEmojiURL, defaultImport, [{id: binding.id, animated: binding.animated,
size: EMOJI_URL_BASE_SIZE}]);
} else {
r10 = value4;
}
object.src = r10;
object.name = emojiName ?? '';
value = ((Component) => <Component {...object} />)(value);
r6 = value;
}
const LegacyText = (require(1305) /* metro dependency 1305: native */).LegacyText;
return (
<PressableScale {...pressableScaleProps2}>
{r6}
<LegacyText style={styles.tagName}>
{name}
</LegacyText>
</PressableScale>
);
}
@@ -0,0 +1,284 @@
/* Metro module 15215; source: modules/forums/native/ChannelSettingsEditForumTag.tsx; dependencies: [57, 31, 27, 6540, 1379, 1881, 33, 4501, 697, 1484, 566, 4573, 1244, 9621, 5277, 4572, 6231, 6238, 5278, 8529, 6739, 1423, 7950, 1305, 6988, 6808, 4496, 2] */
function _fun116407(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#116407, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15412:6, offset: 0x02487c22, size: 457 bytes, params: 8, frame: 23
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
const env0_5 = (require(27) /* metro dependency 27 */).View;
const emojiStore = importDefault(6540) /* metro dependency 6540: EmojiStore */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
let value = require(1881) /* metro dependency 1881: EmojiConstants */;
const env0_8 = value.EMOJI_URL_BASE_SIZE;
const env0_9 = value.EmojiIntention;
value = require(33) /* metro dependency 33 */;
const env0_10 = value.jsx;
const env0_11 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
const BACKGROUND_BASE_LOWER = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWER;
object2.container = {'display': 'flex', 'flex': 1, backgroundColor: BACKGROUND_BASE_LOWER};
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object2.sections = {paddingHorizontal: 12, paddingTop: PX_16};
object2.hint = {marginTop: 8};
object2.emojiIconWrapper = {'display': 'flex', 'alignItems': 'center', 'justifyContent': 'center', 'height': 24,
'width': 24};
object2.imageEmoji = {'height': 20, 'width': 20};
object2.textEmoji = {'fontSize': 20, 'lineHeight': 26};
object2.nameInput = {'width': '100%', 'flexGrow': 1};
object2.saveButton = {flex: 0};
const env0_12 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/forums/native/ChannelSettingsEditForumTag.tsx');
exports.default = ChannelSettingsEditForumTag;
}
function ChannelSettingsEditForumTag({channelId, tag}) { // fn#116408, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15412:747, offset: 0x02487deb, size: 1886 bytes, params: 2, frame: 46
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
var r1;
var r2;
var r31;
var r26;
var defaultImport;
const styles = useStyles();
const value4 = tag == null;
const value5 = (require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation();
const env0_4 = value5;
let binding = env0_4;
let useState = binding.useState;
const value7 = env0_3(Reflect.apply(useState, binding, [tag != null ? {id: tag.emojiId,
name: tag.emojiName} : null]), 2);
const property = value7[0];
const env0_6 = value7[1];
binding = env0_4;
useState = binding.useState;
const name = tag?.name;
const value8 = '';
const value10 = env0_3(Reflect.apply(useState, binding, [name ?? value8]), 2);
const property2 = value10[0];
const env0_8 = value10[1];
binding = env0_4;
useState = binding.useState;
const value12 = env0_3(Reflect.apply(useState, binding, [tag?.moderated]), 2);
const property3 = value12[0];
const env0_10 = value12[1];
const env0_11 = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], function() {
return ChannelStore.getChannel(channelId);
});
const value13 = (require(566) /* metro dependency 566: flux */).useStateFromStores([EmojiStore], _fun116410);
binding = env0_4;
const env0_12 = binding.useRef({emoji: property, tagName: property2, moderated: property3});
binding.useEffect(_fun116411, [property, property2, property3]);
const value14 = value8 === property2;
const value15 = tag != null;
if (value15) {
r1 = tag.name !== property2 || tag.emojiId !== property?.id;
r1 = !r1 ? tag.emojiName !== property?.name : r1;
r1 = !r1 ? tag.moderated !== property3 : r1;
r2 = r1;
} else {
r2 = value15;
}
const r6 = value4 || value14 ? !value14 : r2;
binding = env0_4;
binding.useLayoutEffect(_fun116412, [value5, value4]);
env0_4.useEffect(_fun116415, [r6, value5, binding.useCallback(_fun116414, [value4, value5, channelId, tag?.id]),
styles.saveButton]);
const Stack = (require(4572) /* metro dependency 4572: StackNative */).Stack;
const TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
const object = {};
if (property == null) {
const ReactionIcon = (require(7950) /* metro dependency 7950: ReactionIcon */).ReactionIcon;
r26 = <ReactionIcon />;
} else if (property.name != null) {
defaultImport = importDefault(6739) /* metro dependency 6739: Emoji */;
var defaultImportProps = {textEmojiStyle: styles.textEmoji, fastImageStyle: styles.imageEmoji};
r31 = value13 != null ? (importDefault(1423) /* metro dependency 1423: AvatarUtils */).getEmojiURL({id: value13.id,
animated: value13.animated, size: EMOJI_URL_BASE_SIZE}) : undefined;
defaultImportProps.src = r31;
r31 = property?.name ?? value8;
defaultImportProps.name = r31;
r26 = ((Component) => <Component {...defaultImportProps} />)(defaultImport);
} else if (property.id == null) {
const ReactionIcon2 = (require(7950) /* metro dependency 7950: ReactionIcon */).ReactionIcon;
r26 = <ReactionIcon2 />;
} else {
defaultImport = importDefault(6739) /* metro dependency 6739: Emoji */;
var defaultImportProps = {textEmojiStyle: styles.textEmoji, fastImageStyle: styles.imageEmoji};
r31 = value13 != null ? (importDefault(1423) /* metro dependency 1423: AvatarUtils */).getEmojiURL({id: value13.id,
animated: value13.animated, size: EMOJI_URL_BASE_SIZE}) : undefined;
defaultImportProps.src = r31;
r31 = property?.name ?? value8;
defaultImportProps.name = r31;
r26 = ((Component) => <Component {...defaultImportProps} />)(defaultImport);
}
object.icon = <PressableOpacity style={styles.emojiIconWrapper} accessibilityRole="button" onPress={function() {
require(dependencyMap[19]).openEmojiPickerActionSheet({onPressEmoji: handlePressEmoji,
pickerIntention: EmojiIntention.COMMUNITY_CONTENT, channel: channel});
}}>{r26}</PressableOpacity>;
const TextInput = (require(1305) /* metro dependency 1305: native */).TextInput;
const textInputProps = {'maxLength': 20, 'style': null, 'value': null, 'autoCorrect': false,
'autoCapitalize': 'none', 'returnKeyType': 'done', style: styles.nameInput, value: property2,
onChangeText: onChangeText};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
textInputProps.placeholder = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.aMSq0a);
object.label = <TextInput {...textInputProps} />;
object.trailing = property != null ? <PressableOpacity accessibilityRole="button" onPress={onPress_116420}>{((CircleXIcon) => <CircleXIcon size="xs" />)((require(6988) /* metro dependency 6988: CircleXIcon */).CircleXIcon)}</PressableOpacity> : value8 === property2 ? null : <PressableOpacity accessibilityRole="button" onPress={onPress_116420}>{((CircleXIcon) => <CircleXIcon size="xs" />)((require(6988) /* metro dependency 6988: CircleXIcon */).CircleXIcon)}</PressableOpacity>;
const tableRowGroup = <TableRowGroup hasIcons><TableRow {...object} /></TableRowGroup>;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const items2 = [<View>{tableRowGroup}<View style={styles.hint}><Text variant="text-sm/medium" color="text-muted">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['3v8kZH'])}</Text></View></View>];
const TableSwitchRow = (require(6808) /* metro dependency 6808: TableSwitchRowNative */).TableSwitchRow;
items2[1] = <TableRowGroup hasIcons={false}><TableSwitchRow label={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['rMH+rt'])} value={property3 != null && property3} onValueChange={onValueChange_116421} /></TableRowGroup>;
items2[2] = value4 ? null : <TableRowGroup hasIcons={false}><TableRow variant="danger" label={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.huYSMr)} onPress={onPress_116422} /></TableRowGroup>;
return (
<View style={styles.container}>
<Stack spacing={24} style={styles.sections}>
{items2}
</Stack>
</View>
);
}
function _fun116410() { // fn#116410, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15412:1167, offset: 0x02488549, size: 65 bytes, params: 1, frame: 12
const value2 = null;
return value2 != (value2 == env0_5 ? undefined : env0_5.id) ? EmojiStore.getUsableCustomEmojiById(env0_5.id) : value2;
}
function _fun116411() { // fn#116411, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15412:1296, offset: 0x0248858a, size: 46 bytes, params: 1, frame: 4
env0_12.current = {emoji: env0_5, tagName: env0_7, moderated: env0_9};
}
function _fun116412() { // fn#116412, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15412:1514, offset: 0x024885b8, size: 38 bytes, params: 1, frame: 12
const binding = env0_4;
binding.setOptions({headerTitle: headerTitle_116413});
}
function _fun116414() { // fn#116414, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15412:1792, offset: 0x0248866a, size: 253 bytes, params: 1, frame: 20
var id;
var resultBinding;
var value2;
var value3;
var defaultImport;
var updateForumTag;
var object2;
const {tagName, emoji, moderated} = env0_12.current;
if (tagName !== '') {
resultBinding = result;
value2 = environment.__proto__;
value3 = undefined;
defaultImport = importDefault(9621) /* metro dependency 9621: ForumActionCreators */;
if (resultBinding) {
defaultImport.createForumTag({name: tagName, emojiId: emoji == null ? value3 : emoji.id,
emojiName: emoji == null ? value3 : emoji.name, moderated: moderated}, channelId);
} else {
updateForumTag = defaultImport.updateForumTag;
object2 = {};
id = tag == null ? value3 : tag.id;
object2.id = id;
object2.name = tagName;
id = emoji == null ? value3 : emoji.id;
object2.emojiId = id;
object2.emojiName = emoji == null ? value3 : emoji.name;
object2.moderated = moderated;
Reflect.apply(updateForumTag, defaultImport, [object2, channelId]);
}
env0_4.pop();
}
}
function _fun116415() { // fn#116415, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15412:2152, offset: 0x02488767, size: 59 bytes, params: 1, frame: 12
const binding = env0_13;
const binding2 = env0_4;
const setOptions = binding2.setOptions;
const object2 = {};
if (binding) {
object2.headerRight = headerRight_116416;
Reflect.apply(setOptions, binding2, [object2]);
} else {
object2.headerRight = undefined;
Reflect.apply(setOptions, binding2, [object2]);
}
}
function handlePressEmoji(a0) { // fn#116417, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15412:2381, owner: ChannelSettingsEditForumTag.handlePressEmoji, offset: 0x0248881b, size: 96 bytes, params: 2, frame: 14
let id = a0.id;
const r4 = id != null || a0.surrogates == null ? a0.name : a0.surrogates !== '' ? a0.surrogates : a0.name;
const binding = env0_6;
id = a0.id;
const value = undefined;
binding({id: a0.id, name: id != null ? value : r4});
return value;
}
function ChannelSettingsEditForumTagOnPress_116420() { // fn#116420, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15412:3446, owner: ChannelSettingsEditForumTag.onPress, offset: 0x024888c6, size: 31 bytes, params: 1, frame: 12
env0_6(null);
env0_8('');
}
function ChannelSettingsEditForumTagOnValueChange() { // fn#116421, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15412:3823, owner: ChannelSettingsEditForumTag.onValueChange, offset: 0x024888e5, size: 82 bytes, params: 1, frame: 13
var tagBinding;
var value2;
if (env0_9) {
tagBinding = tag;
value2 = undefined;
if ((tagBinding == null ? value2 : tag.moderated) == null) {
env0_10(value2);
} else {
env0_10(false);
}
} else {
env0_10(true);
}
}
function ChannelSettingsEditForumTagOnPress_116422() { // fn#116422, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15412:4038, owner: ChannelSettingsEditForumTag.onPress, offset: 0x02488937, size: 257 bytes, params: 1, frame: 18
const defaultImport = importDefault(4496) /* metro dependency 4496: AlertActionCreators */;
const show = defaultImport.show;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
Reflect.apply(show, defaultImport, [{title: Reflect.apply(string, intl, [t.huYSMr]), body: intl.string(t.bkAFCf),
cancelText: intl.string(t.gm1Vej), confirmText: intl.string(t.p89ACt), onConfirm: onConfirm_116423}]);
}
function headerTitle_116413() { // fn#116413, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15412:1545, offset: 0x024885de, size: 140 bytes, params: 1, frame: 19
const value = environment.__proto__.__proto__;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const resultBinding = result;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
return (
<Text
variant="redesign/heading-18/bold"
color="mobile-text-heading-primary"
accessibilityRole="header"
>
{resultBinding ? Reflect.apply(string, intl, [t['/jubeD']]) : Reflect.apply(string, intl, [t.zeVg5d])}
</Text>
);
}
function headerRight_116416() { // fn#116416, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15412:2185, offset: 0x024887a2, size: 121 bytes, params: 1, frame: 18
const HeaderActionButton = (require(5277) /* metro dependency 5277: HeaderActionButtonNative */).HeaderActionButton;
const headerActionButtonProps = {style: styles.saveButton, onPress: env1_14};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
headerActionButtonProps.text = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['R3BPH+']);
return <HeaderActionButton {...headerActionButtonProps} />;
}
function onPressOnConfirm_116423() { // fn#116423, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15412:4262, owner: ChannelSettingsEditForumTag.onPress.onConfirm, offset: 0x02488a38, size: 78 bytes, params: 1, frame: 14
var value2;
var defaultImport;
if (!result) {
value2 = environment.__proto__.__proto__;
defaultImport = importDefault(9621) /* metro dependency 9621: ForumActionCreators */;
defaultImport.deleteForumTag(channelId, tag.id);
env1_4.pop();
}
}
@@ -0,0 +1,736 @@
/* Metro module 12056; source: modules/forums/native/ForumChannel.tsx; dependencies: [31, 27, 3785, 4790, 1379, 4645, 4798, 11547, 661, 1309, 482, 33, 4501, 697, 6597, 477, 7701, 4573, 1244, 9619, 566, 12057, 14, 4080, 12059, 1962, 1357, 4578, 11689, 5278, 8708, 12060, 10078, 9623, 12061, 4805, 12062, 11546, 12063, 8416, 7155, 7704, 3857, 7548, 6860, 6771, 6789, 6664, 11319, 9621, 7165, 11007, 11024, 4081, 4082, 11022, 8919, 5463, 11317, 8561, 12066, 11809, 2] */
function _fun92602(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#92602, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12242:6, offset: 0x020912a8, size: 1242 bytes, params: 8, frame: 30
var object2;
const env0_0 = require;
const onForumViewableItemsChanged = function({changed}) {
changed.forEach(_fun92614);
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const value = undefined;
const env0_3 = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(27) /* metro dependency 27 */).View;
const lurkingStore = importDefault(3785) /* metro dependency 3785: LurkingStore */;
const activeThreadsStore = importDefault(4790) /* metro dependency 4790: ActiveThreadsStore */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const draftStore = importDefault(4645) /* metro dependency 4645: DraftStore */;
const guildVerificationStore = importDefault(4798) /* metro dependency 4798: GuildVerificationStore */;
const env0_10 = (require(11547) /* metro dependency 11547: ForumChannelStore */).useForumChannelStore;
const constantsModule = require(661) /* metro dependency 661: Constants */;
const env0_11 = constantsModule.AnalyticsObjects;
const env0_12 = constantsModule.AnalyticsPages;
const env0_13 = constantsModule.AnalyticsSections;
const env0_14 = (require(1309) /* metro dependency 1309: FormConstants */).ANDROID_FOREGROUND_RIPPLE;
const Fonts = (require(482) /* metro dependency 482: Constants */).Fonts;
const value3 = require(33) /* metro dependency 33 */;
const env0_15 = value3.jsx;
const env0_16 = value3.jsxs;
const env0_17 = value3.Fragment;
const Set = global.Set;
const set = new Set(['archived_section', 'search_section', 'missing_permission_search',
'missing_permission_archived_threads', 'loading_section']);
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
object2 = {};
const BACKGROUND_BASE_LOWER = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWER;
object2.background = {flex: 1, backgroundColor: BACKGROUND_BASE_LOWER};
object2.headerRow = {'display': 'flex', 'flexDirection': 'row', 'justifyContent': 'space-between',
'paddingHorizontal': 12, 'paddingVertical': 8};
const BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
object2.headerDivider = {'backgroundColor': null, 'width': '100%', 'height': 1, backgroundColor: BORDER_SUBTLE};
object2.container = {'flex': 1, 'alignSelf': 'stretch', 'alignItems': 'center', 'position': 'relative'};
object2.noHeight = {height: 0};
object2.list = {'flex': 1, 'paddingTop': 8, 'paddingHorizontal': 12, 'alignSelf': 'stretch', 'marginBottom': 0};
object2.section = {'alignItems': 'flex-start', 'justifyContent': 'flex-end'};
const object3 = {'marginTop': 12, 'paddingStart': 4};
const value7 = 14;
let defaultImport = importDefault(dependencyMap[value7]);
const PRIMARY_BOLD = Fonts.PRIMARY_BOLD;
let TEXT_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_MUTED;
copyDataProperties(object3, defaultImport(PRIMARY_BOLD, TEXT_MUTED, 12, {'marginBottom': 12, 'uppercase': true}),
12);
object2.divider = object3;
const object4 = {'backgroundColor': null, 'alignItems': 'center', 'justifyContent': 'center', 'height': 48};
let BACKGROUND_BASE_LOWEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWEST;
object4.backgroundColor = BACKGROUND_BASE_LOWEST;
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
object2.missingPermissionContainer = object4;
const object9 = {};
const defaultImport2 = importDefault(dependencyMap[value7]);
const PRIMARY_NORMAL = Fonts.PRIMARY_NORMAL;
TEXT_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_MUTED;
copyDataProperties(object9, defaultImport2(PRIMARY_NORMAL, TEXT_MUTED, 12), 12);
object2.missingPermissionText = object9;
const object10 = {overflow: 'hidden'};
object10.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xl;
object2.optionsContainer = object10;
BACKGROUND_BASE_LOWEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWEST;
object2.optionsPill = {'display': 'flex', 'flexDirection': 'row', 'alignItems': 'center', 'paddingHorizontal': 8,
'height': 32, backgroundColor: BACKGROUND_BASE_LOWEST};
const INTERACTIVE_TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_TEXT_DEFAULT;
object2.sortOptionsIcon = {color: INTERACTIVE_TEXT_DEFAULT, marginLeft: 4};
object2.sortOptionsText = {marginHorizontal: 4};
const BACKGROUND_BRAND = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BRAND;
object2.countContainer = {'backgroundColor': null, 'borderRadius': 20, 'marginRight': 4, 'minWidth': 20,
'height': 20, 'display': 'flex', 'alignItems': 'center', 'justifyContent': 'center',
backgroundColor: BACKGROUND_BRAND};
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
object2.countText = {lineHeight: platformUtilsModule.isAndroid() ? value7 : value};
const env0_25 = Reflect.apply(createStyles, createStylesModule, [object2]);
const env0_26 = {'waitForInteraction': false, 'viewAreaCoveragePercentThreshold': 50, 'minimumViewTime': 100};
const onCreatePostWithoutPermission = function() {
var defaultImport = importDefault(dependencyMap[42]);
var object = {key: 'FORUM_NO_POST_PERMISSION_HELP'};
object.content = require(dependencyMap[18]).intl.string(require(dependencyMap[18]).t.iyzwnD);
object.icon = importDefault(dependencyMap[43]);
defaultImport.open(object);
};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/forums/native/ForumChannel.tsx');
exports.default = ForumChannel;
return value;
}
function ArchivedSection() { // fn#92603, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12242:2076, offset: 0x02091782, size: 193 bytes, params: 1, frame: 21
const styles = useStyles();
const items2 = [styles.section,
(require(7701) /* metro dependency 7701: ClientThemesOverrides */).useClientThemesOverride()];
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
return (
<View style={items2}>
<Text
style={styles.divider}
variant="text-xs/bold"
color="text-muted"
>
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['3+LO1w'])}
</Text>
</View>
);
}
function SearchSection({numPosts, searchQuery}) { // fn#92604, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12242:2322, offset: 0x02091843, size: 260 bytes, params: 2, frame: 24
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const styles = useStyles();
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<View style={styles.section}>
<Text
style={styles.divider}
variant="text-xs/bold"
color="text-muted"
>
{numPosts === 0 ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.DbgHxi) : intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t['tBz/8b'],
{numPosts: numPosts, query: searchQuery})}
</Text>
</View>
);
}
function ArchivedMissingReadHistoryPermission({channelName}) { // fn#92605, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12242:2631, offset: 0x02091947, size: 176 bytes, params: 2, frame: 22
const styles = useStyles();
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const format = intl.format;
const TycmzM = (require(1244) /* metro dependency 1244: indexNative */).t.TycmzM;
return (
<View style={styles.missingPermissionContainer}>
<Text
style={styles.missingPermissionText}
variant="text-xs/normal"
color="text-muted"
>
{Reflect.apply(format, intl, [TycmzM, {channelName: channelName}])}
</Text>
</View>
);
}
function SearchMissingReadHistoryPermission({channelName}) { // fn#92606, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12242:2920, offset: 0x020919f7, size: 176 bytes, params: 2, frame: 22
const styles = useStyles();
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const format = intl.format;
const OWZJdS = (require(1244) /* metro dependency 1244: indexNative */).t.OWZJdS;
return (
<View style={styles.section}>
<Text
style={styles.missingPermissionText}
variant="text-xs/normal"
color="text-muted"
>
{Reflect.apply(format, intl, [OWZJdS, {channelName: channelName}])}
</Text>
</View>
);
}
function SortAndViewOptions({channel}) { // fn#92607, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12242:3188, offset: 0x02091aa7, size: 720 bytes, params: 2, frame: 31
var r0;
var PressableOpacity;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var items2;
var Text;
var Button;
const styles = useStyles();
const id = channel.id;
const binding = env0_3;
const useCallback = binding.useCallback;
let object = [id];
const value2 = Reflect.apply(useCallback, binding, [_fun92608, object]);
const isMediaChannel2 = channel.isMediaChannel();
if ((importDefault(1357) /* metro dependency 1357: MobileVisualRefreshExperiment */)('SortAndViewOptions')) {
Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
string = intl.string;
r0 = <Button variant="secondary" text={isMediaChannel2 ? Reflect.apply(string, intl,
[t.JxU0wr]) : Reflect.apply(string, intl,
[t.xyYt8A])} onPress={value2} size="sm" icon={((ArrowsUpDownIcon) => <ArrowsUpDownIcon size="xxs" />)((require(11689) /* metro dependency 11689: ArrowsUpDownIcon */).ArrowsUpDownIcon)} />;
} else {
PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
object = {accessibilityRole: 'button'};
string = intl.string;
object.accessibilityLabel = isMediaChannel2 ? Reflect.apply(string, intl, [t['kQN/bi']]) : Reflect.apply(string,
intl, [t.Iqetyr]);
object.androidRippleConfig = ANDROID_FOREGROUND_RIPPLE;
object.activeOpacity = 0.8;
object.style = styles.optionsContainer;
object.onPress = value2;
var viewBindingProps = {style: styles.optionsPill};
items2 = [((ArrowsUpDownIcon) => <ArrowsUpDownIcon size="xs" style={styles.sortOptionsIcon} />)((require(11689) /* metro dependency 11689: ArrowsUpDownIcon */).ArrowsUpDownIcon)];
Text = (require(4573) /* metro dependency 4573: Text */).Text;
string = intl.string;
items2[1] = <Text variant="text-sm/medium" color="interactive-text-default" style={styles.sortOptionsText}>{isMediaChannel2 ? Reflect.apply(string,
intl, [t.JxU0wr]) : Reflect.apply(string, intl, [t.xyYt8A])}</Text>;
items2[2] = ((ChevronSmallDownIcon) => <ChevronSmallDownIcon size="xs" />)((require(8708) /* metro dependency 8708: ChevronSmallDownIcon */).ChevronSmallDownIcon);
r0 = <PressableOpacity {...object}><View {...viewBindingProps}>{items2}</View></PressableOpacity>;
}
return r0;
}
function TagFilter({channel}) { // fn#92610, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12242:4260, offset: 0x02091e25, size: 660 bytes, params: 2, frame: 31
var r0;
var PressableOpacity;
var object;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
var items2;
const styles = useStyles();
const tagFilter = useForumChannelStore(channel.id).tagFilter;
const closure = onPress_92611;
if ((importDefault(1357) /* metro dependency 1357: MobileVisualRefreshExperiment */)('TagFilter')) {
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
r0 = <Button variant="secondary" text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['112vVE'])} onPress={closure} size="sm" icon={((TagIcon) => <TagIcon size="xxs" />)((require(10078) /* metro dependency 10078: TagIcon */).TagIcon)} />;
} else {
PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
var pressableOpacityProps = {'accessibilityRole': 'button', 'accessibilityLabel': null, 'activeOpacity': 0.8,
accessibilityLabel: intl.string(t.TdqRTh), style: styles.optionsContainer, onPress: closure};
var viewBindingProps = {style: styles.optionsPill};
items2 = [tagFilter.size > 0 && <View style={styles.countContainer}><Text variant="text-xs/bold" color="always-white" style={styles.countText}>{tagFilter.size}</Text></View>];
items2[1] = <Text variant="text-sm/medium" color="interactive-text-default" style={styles.sortOptionsText}>{intl.string(t['112vVE'])}</Text>;
items2[2] = ((ChevronSmallDownIcon) => <ChevronSmallDownIcon size="xs" />)((require(8708) /* metro dependency 8708: ChevronSmallDownIcon */).ChevronSmallDownIcon);
r0 = <PressableOpacity {...pressableOpacityProps}><View {...viewBindingProps}>{items2}</View></PressableOpacity>;
}
return r0;
}
function getForumItemType(a0) { // fn#92612, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12242:5267, offset: 0x02092116, size: 32 bytes, params: 2, frame: 11
const value = a0;
return env0_23.has(value) ? value : 'thread';
}
function onForumViewableItemsChanged({changed}) { // fn#92613, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12242:5323, offset: 0x02092136, size: 32 bytes, params: 2, frame: 11
changed.forEach(_fun92614);
}
function ForumChannelContent({channel, searchQuery, insets}) { // fn#92615, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12242:5592, offset: 0x020921f9, size: 988 bytes, params: 2, frame: 38
const styles = useStyles();
const value3 = env0_3.useRef(null);
const {sortOrder, tagFilter, tagSetting} = useForumChannelStore(channel.id);
(importDefault(12061) /* metro dependency 12061: ForumPlatformHooksNative */).useForumChannelSeenManager({guildId: channel.guild_id,
channelId: channel.id});
env0_3.useEffect(_fun92616, [channel.id]);
const value5 = useForumData(channel, sortOrder, tagFilter, tagSetting);
const activeThreadIds = value5.activeThreadIds;
var env0_3 = activeThreadIds;
const archivedThreadIds = value5.archivedThreadIds;
const canLoadMore = value5.canLoadMore;
const loadMore = value5.loadMore;
const archivedThreadsLoading = value5.archivedThreadsLoading;
const activeThreadsLoading = value5.activeThreadsLoading;
const isSearchLoading = value5.isSearchLoading;
const isEmpty = value5.isEmpty;
const searchResults = value5.searchResults;
const value6 = (importDefault(4805) /* metro dependency 4805: useChannelName */)(channel);
const value7 = (require(9619) /* metro dependency 9619: ForumHooks */).useCanViewArchivedPosts(channel);
const value8 = (require(9619) /* metro dependency 9619: ForumHooks */).useCanSearchForumPosts(channel);
const value9 = (require(7701) /* metro dependency 7701: ClientThemesOverrides */).useClientThemesOverride();
const value10 = env0_3.useCallback(_fun92620, [archivedThreadsLoading, canLoadMore, value7, loadMore,
searchResults]);
const env0_14 = env0_3.useCallback(_fun92621, [976, archivedThreadsLoading, canLoadMore, value7, loadMore,
searchResults]);
const value11 = env0_3.useMemo(_fun92622, [searchResults, value7, value8, activeThreadIds, activeThreadsLoading,
archivedThreadIds, archivedThreadsLoading, isSearchLoading]);
const value12 = env0_3.useCallback(_fun92623, [searchResults?.length, searchQuery, value6]);
if (isEmpty) {
return ((Component) => <Component topViewHeight={92} channelName={value6 ?? ''} tagFilter={tagFilter} />)(importDefault(12063) /* metro dependency 12063: ForumChannelEmptyState */);
}
const items2 = [styles.list, value9];
const FlashList = (require(8416) /* metro dependency 8416: flashList */).FlashList;
const object = {};
const PX_8 = activeThreadIds.length === 0 ? 0 : (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object.paddingTop = PX_8;
const bottom = insets.bottom;
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object.paddingBottom = bottom + PX_16;
const view = <View style={items2}><FlashList ref={value3} contentContainerStyle={object} estimatedItemSize={122} getItemType={getForumItemType} keyExtractor={forumKeyExtractor} renderItem={value12} data={value11} onScroll={onScroll_92624} onEndReached={value10} onViewableItemsChanged={onForumViewableItemsChanged} viewabilityConfig={env0_26} /></View>;
const jsxRuntimeEnv0_17Binding = jsxRuntimeEnv0_17;
let value = importDefault(7704) /* metro dependency 7704: ThemedGradient */;
value = ((Component) => <Component absolute mix />)(value);
return (
<>
{value}
{view}
</>
);
}
function forumKeyExtractor(a0, a1) { // fn#92625, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12242:545, offset: 0x02092bd3, size: 51 bytes, params: 3, frame: 16
const value = a0;
return value !== env0_22 ? value : '' + env0_22 + '-' + a1;
}
function ForumChannel({channel}) { // fn#92627, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12242:8762, offset: 0x02092c7f, size: 1174 bytes, params: 2, frame: 33
const styles = useStyles();
const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildVerificationStore],
function() {
return GuildVerificationStore.canChatInGuild(channel.guild_id);
});
const value4 = (require(6860) /* metro dependency 6860: ThreadHooks */).useCanStartThread(channel);
const r13 = channel.topic != null && channel.topic.length !== 0;
const defaultImport = importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */;
const FORUM_CHANNEL = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).FORUM_CHANNEL;
const analyticsLocations = defaultImport(FORUM_CHANNEL).analyticsLocations;
const forumHooksModule = require(9619) /* metro dependency 9619: ForumHooks */;
const useForumSearchState = forumHooksModule.useForumSearchState;
const searchQuery = Reflect.apply(useForumSearchState, forumHooksModule, [{channelId: channel.id}]).searchQuery;
const env0_3 = searchQuery;
const value8 = (require(6664) /* metro dependency 6664: useShowMemberVerificationGate */).useShowMemberVerificationGate(channel.guild_id);
const value9 = (require(566) /* metro dependency 566: flux */).useStateFromStores([DraftStore], function() {
return DraftStore.getThreadSettings(channel.id);
}, [channel.id]);
const value10 = (importDefault(11319) /* metro dependency 11319: useShowChannelOptInNotice */)(channel);
env0_3.useEffect(function() {
return _fun92631;
}, [channel.id]);
const value12 = env0_3.useCallback(_fun92633, [channel, value8, r13, env0_3.useCallback(_fun92632, [channel,
analyticsLocations, searchQuery, value9])]);
const r12 = value3 ? !value4 && !value8 : !value3;
const insets = (importDefault(5463) /* metro dependency 5463: useSafeAreaInsetsKeyboardAwareNative */)({includeKeyboardHeight: true}).insets;
const value16 = (require(7701) /* metro dependency 7701: ClientThemesOverrides */).useClientThemesOverride(styles.noHeight);
const items2 = [value10 ? ((OptInChannelBanner) => <OptInChannelBanner channel={channel} topBorder />)((require(11317) /* metro dependency 11317: ChatBanner */).OptInChannelBanner) : null];
items2[1] = <View style={styles.headerRow}><SortAndViewOptions channel={channel} />{channel.availableTags.length > 0 && <TagFilter channel={channel} />}</View>;
items2[2] = <View style={[styles.headerDivider, value16]} />;
items2[3] = <View style={styles.container}><ForumChannelContent channel={channel} insets={insets} searchQuery={searchQuery} /></View>;
const FloatingActionButton = (require(8561) /* metro dependency 8561: FloatingActionButtonNative */).FloatingActionButton;
const object = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const TyAuoT = (require(1244) /* metro dependency 1244: indexNative */).t.TyAuoT;
object.accessibilityLabel = Reflect.apply(string, intl, [TyAuoT]);
object.icon = importDefault(12066) /* metro dependency 12066 */;
object.disabled = r12;
const bottom = insets.bottom;
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object.positionBottom = bottom + PX_16;
object.onPress = value12;
object.onPressDisabled = onCreatePostWithoutPermission;
object.accessibilityHint = r12 ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.iyzwnD) : undefined;
items2[4] = <FloatingActionButton {...object} />;
items2[5] = channel.guild_id != null ? ((MemberActionChatInputBannerGuarded) => <MemberActionChatInputBannerGuarded channel={channel} />)((require(11809) /* metro dependency 11809: MemberActionChatInputBanner */).MemberActionChatInputBannerGuarded) : null;
return (
<View style={styles.background}>
{items2}
</View>
);
}
function _fun92608() { // fn#92608, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12242:3263, offset: 0x02091d77, size: 129 bytes, params: 1, frame: 19
const idBinding = id;
const value = 'ForumDisplaySettingsActionSheet-' + idBinding;
const defaultImport = importDefault(dependencyMap[23]);
defaultImport.openLazy(require(dependencyMap[25])(dependencyMap[24], dependencyMap.paths), value,
{channelId: idBinding, onClose: onClose_92609});
}
function TagFilterOnPress() { // fn#92611, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12242:4334, owner: TagFilter.onPress, offset: 0x020920b9, size: 93 bytes, params: 1, frame: 16
let value = environment.__proto__;
const defaultImport = importDefault(dependencyMap[23]);
const openLazy = defaultImport.openLazy;
value = require(dependencyMap[25]);
value = value(dependencyMap[31], dependencyMap.paths);
Reflect.apply(openLazy, defaultImport, [value, 'ForumTagFilterActionSheet', {channel: channel}]);
}
function _fun92614(a0) { // fn#92614, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12242:5382, offset: 0x02092156, size: 163 bytes, params: 2, frame: 18
var parent_id;
var isViewable;
var markForumPostItemAsUnseen;
var Date;
var markForumPostItemAsSeen;
const item = a0.item;
let value = environment.__proto__;
const binding = env1_23;
if (!binding.has(item)) {
parent_id = ChannelStore.getChannel(item)?.parent_id;
if (parent_id != null) {
isViewable = a0.isViewable;
value = require(9623) /* metro dependency 9623: ForumChannelSeenManager */;
if (isViewable) {
markForumPostItemAsSeen = value.markForumPostItemAsSeen;
Date = global.Date;
Reflect.apply(markForumPostItemAsSeen, value, [parent_id, item, Date.now()]);
} else {
markForumPostItemAsUnseen = value.markForumPostItemAsUnseen;
Date = global.Date;
Reflect.apply(markForumPostItemAsUnseen, value, [parent_id, item, Date.now()]);
}
}
}
}
function _fun92616() { // fn#92616, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12242:5824, offset: 0x020925d5, size: 43 bytes, params: 1, frame: 11
const current = env0_2.current;
if (current != null) {
current.scrollToOffset({'offset': 0, 'animated': false});
}
}
function useForumData(a0, a1, a2, a3) { // fn#92617, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12242:5913, owner: ForumChannelContent.useForumData, offset: 0x02092600, size: 482 bytes, params: 5, frame: 30
var r11;
const env0_0 = a0;
const value2 = (require(9619) /* metro dependency 9619: ForumHooks */).useForumActiveThreadIds({channel: a0,
sortOrder: a1, tagFilter: a2, tagSetting: a3, shouldAutomaticallyAck: true});
const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStores([ActiveThreadsStore,
LurkingStore], _fun92618);
const {searchResults,
isSearchLoading} = (require(9619) /* metro dependency 9619: ForumHooks */).useForumSearchState({channelId: a0.id});
(require(9619) /* metro dependency 9619: ForumHooks */).useAutomaticForumSearch(a0, a2, a3);
const value5 = (require(9619) /* metro dependency 9619: ForumHooks */).useCanViewArchivedPosts(a0);
const {threadIds, canLoadMore, loadMore,
loading} = (require(12057) /* metro dependency 12057: ThreadBrowserHooks */).useArchivedThreads(a0, a1, a2, a3);
(require(9619) /* metro dependency 9619: ForumHooks */).useLoadForumUnreadCounts(a0, a1, a2, a3);
let r2 = searchResults == null && value5;
if (r2) {
r11 = value3 || loading;
r11 = !r11 ? isSearchLoading : r11;
r2 = !r11;
}
r2 = r2 && value2.length === 0 && threadIds.length === 0;
env1_3.useEffect(_fun92619, [value2.length, threadIds.length, value3]);
return {activeThreadIds: value2, archivedThreadIds: threadIds, canLoadMore: canLoadMore, loadMore: loadMore,
activeThreadsLoading: value3, archivedThreadsLoading: loading, isSearchLoading: isSearchLoading, isEmpty: r2,
searchResults: searchResults};
}
function _fun92620() { // fn#92620, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12242:7115, offset: 0x02092866, size: 54 bytes, params: 1, frame: 10
if (searchResults == null && env0_12 && !archivedThreadsLoading && canLoadMore) {
loadMore();
}
}
function _fun92621({nativeEvent}) { // fn#92621, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12242:7175, offset: 0x0209289c, size: 117 bytes, params: 2, frame: 13
const y = nativeEvent.contentOffset.y;
const height = nativeEvent.contentSize.height;
const height2 = nativeEvent.layoutMeasurement.height;
let r1 = searchResults == null && env0_12 && !archivedThreadsLoading;
r1 = r1 && canLoadMore && y + height2 > height - 976;
if (r1) {
loadMore();
}
}
function _fun92622() { // fn#92622, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12242:7333, offset: 0x02092911, size: 320 bytes, params: 1, frame: 17
var r2;
var push;
var activeThreadIdsBinding;
var items2;
var value2;
var value3;
var archivedThreadIdsBinding;
var value4;
var length;
var value5;
var value6;
var items3;
var value7;
var binding;
var items4;
const items5 = [];
let value = environment;
let searchResultsBinding = searchResults;
if (searchResultsBinding != null) {
push = items5.push;
value7 = environment.__proto__;
Reflect.apply(push, items5, [env1_19]);
binding = env0_13;
push = items5.push;
if (binding) {
searchResultsBinding = searchResults;
items4 = [];
arraySpread(items4, searchResultsBinding, 0, undefined);
apply(push, items4, items5, undefined);
} else {
Reflect.apply(push, items5, [env1_20]);
}
} else {
reducibleJoin11: while (true) {
if (activeThreadsLoading) {
break reducibleJoin11;
}
push = items5.push;
activeThreadIdsBinding = activeThreadIds;
items2 = [];
value2 = arraySpread(items2, activeThreadIdsBinding, 0, undefined);
apply(push, items2, items5, value2);
if (env0_12) {
value4 = archivedThreadIds != null;
reducibleJoin6: while (true) {
if (value4) {
length = archivedThreadIds.length;
value5 = length > 0;
r2 = value5;
break reducibleJoin6;
}
r2 = value4;
break reducibleJoin6;
}
if (r2) {
push = items5.push;
value6 = environment.__proto__;
Reflect.apply(push, items5, [env1_18]);
push = items5.push;
archivedThreadIdsBinding = archivedThreadIds;
items3 = [];
arraySpread(items3, archivedThreadIdsBinding, 0, value2);
apply(push, items3, items5, value2);
break reducibleJoin11;
}
break reducibleJoin11;
}
push = items5.push;
value3 = environment.__proto__;
Reflect.apply(push, items5, [env1_18]);
push = items5.push;
Reflect.apply(push, items5, [env1_21]);
break reducibleJoin11;
}
}
const activeThreadsLoadingBinding = activeThreadsLoading;
const value8 = 0;
if (activeThreadsLoadingBinding) {
r2 = value8;
reducibleLoop14: while (true) {
push = items5.push;
value = environment.__proto__;
Reflect.apply(push, items5, [env1_22]);
value = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
if (value < 20) {
r2 = value;
continue reducibleLoop14;
}
break reducibleLoop14;
}
} else if (archivedThreadsLoading) {
r2 = value8;
reducibleLoop14: while (true) {
push = items5.push;
value = environment.__proto__;
Reflect.apply(push, items5, [env1_22]);
value = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
if (value < 20) {
r2 = value;
continue reducibleLoop14;
}
break reducibleLoop14;
}
} else if (isSearchLoading) {
r2 = value8;
reducibleLoop14: while (true) {
push = items5.push;
value = environment.__proto__;
Reflect.apply(push, items5, [env1_22]);
value = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
if (value < 20) {
r2 = value;
continue reducibleLoop14;
}
break reducibleLoop14;
}
}
return items5;
}
function _fun92623({item}) { // fn#92623, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12242:7569, offset: 0x02092a51, size: 309 bytes, params: 2, frame: 20
var r0;
let value = environment.__proto__;
if (item === env1_18) {
r0 = <ArchivedSection />;
} else if (item === env1_19) {
r0 = <SearchSection numPosts={searchResults?.length ?? 0} searchQuery={searchQuery ?? ''} />;
} else if (item === env1_22) {
value = importDefault(12062) /* metro dependency 12062: ForumPostPlaceholder */;
value = ((Component) => <Component />)(value);
r0 = value;
} else if (item === env1_21) {
r0 = <ArchivedMissingReadHistoryPermission channelName={env0_11} />;
} else if (item === env1_20) {
r0 = <SearchMissingReadHistoryPermission channelName={env0_11} />;
} else {
value = importDefault(11546) /* metro dependency 11546: ForumPost */;
value = ((Component) => <Component threadId={item} />)(value);
r0 = value;
}
return r0;
}
function ForumChannelContentOnScroll(a0) { // fn#92624, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12242:8296, owner: ForumChannelContent.onScroll, offset: 0x02092b86, size: 77 bytes, params: 2, frame: 15
let value = environment.__proto__;
value = require(7155) /* metro dependency 7155: Tracking */;
const trackForumScrolled = value.trackForumScrolled;
const channelBinding = channel;
Reflect.apply(trackForumScrolled, value, [{guildId: channelBinding.guild_id, channelId: channelBinding.id}]);
env0_14(a0);
}
function _fun92630() { // fn#92630, offset: 0x02093155, size: 11 bytes, params: 1, frame: 1
return _fun92631;
}
function _fun92632(a0) { // fn#92632, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12242:9302, offset: 0x020931a3, size: 329 bytes, params: 2, frame: 19
var length;
var r2;
var value5;
var defaultImport2;
let value = environment.__proto__;
const value2 = undefined;
const defaultImport = importDefault(7165) /* metro dependency 7165: DraftActionCreators */;
defaultImport.changeThreadSettings(channel.id, {isPrivate: false});
let name = env0_5 == null ? value2 : env0_5.name;
const value4 = name != null;
if (value4) {
if (env0_5 == null) {
length = value2;
} else {
name = env0_5.name;
if (name == null) {
length = value2;
} else {
value5 = name.trim();
length = value5 == null ? value2 : value5.length;
}
}
r2 = length !== 0;
} else {
r2 = value4;
}
if (!r2) {
defaultImport2 = defaultImport;
defaultImport2.changeThreadSettings(channel.id,
{name: searchQuery != null && searchQuery.trim().length > 0 ? searchQuery.trim() : value2});
}
value = require(11007) /* metro dependency 11007: ForumComposerModalActionCreators */;
const openCreateForumPostModal = value.openCreateForumPostModal;
channelBinding = channel;
Reflect.apply(openCreateForumPostModal, value, [{guildId: channelBinding.guild_id,
parentChannelId: channelBinding.id, analyticsLocationObject: a0, analyticsLocations: analyticsLocations}]);
return value2;
}
function _fun92633() { // fn#92633, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12242:9705, offset: 0x020932ec, size: 128 bytes, params: 1, frame: 18
var environment;
const closure = startCreateForumPostFlow;
let value = environment.__proto__;
const trackingModule = require(7155) /* metro dependency 7155: Tracking */;
const trackForumCreateNewPostClick = trackingModule.trackForumCreateNewPostClick;
const channelBinding = channel;
Reflect.apply(trackForumCreateNewPostClick, trackingModule, [{guildId: channelBinding.guild_id,
channelId: channelBinding.id}]);
if (env0_4) {
value = require(8919) /* metro dependency 8919: MemberVerificationModalActionCreators */;
value.openMemberVerificationModal(channel.guild_id, closure);
} else {
closure();
}
}
function onClose_92609() { // fn#92609, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12242:3371, offset: 0x02091df8, size: 45 bytes, params: 1, frame: 12
const value = environment.__proto__.__proto__;
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet(env0_0);
}
function _fun92618() { // fn#92618, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12242:6096, offset: 0x020927e2, size: 61 bytes, params: 1, frame: 13
const value = environment.__proto__.__proto__;
const hasLoaded = ActiveThreadsStore.hasLoaded;
const binding = env0_0;
return !Reflect.apply(hasLoaded, ActiveThreadsStore,
[binding.guild_id]) && !LurkingStore.isLurking(binding.guild_id);
}
function _fun92619() { // fn#92619, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12242:6556, offset: 0x0209281f, size: 71 bytes, params: 1, frame: 15
let value = environment.__proto__.__proto__;
value = importDefault(14) /* metro dependency 14: TTITracker */;
value.recordRender(env0_1.length + threadIds.length, !env0_2);
}
function _fun92631() { // fn#92631, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12242:9221, offset: 0x02093160, size: 67 bytes, params: 1, frame: 12
var value2;
var defaultImport;
if (channel.id != null) {
value2 = environment.__proto__.__proto__;
defaultImport = importDefault(9621) /* metro dependency 9621: ForumActionCreators */;
defaultImport.clearForumSearch(channel.id);
}
}
function startCreateForumPostFlow() { // fn#92634, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12242:9710, offset: 0x0209336c, size: 232 bytes, params: 1, frame: 16
var environment;
var value2;
var defaultImport;
var value3;
var moduleValue2;
if (env1_1) {
value2 = environment.__proto__.__proto__;
defaultImport = importDefault(11024) /* metro dependency 11024: ForumGuidelinesManager */;
if (defaultImport.hasSeen(channel.id)) {
value3 = environment.__proto__.__proto__;
moduleValue2 = require(4081) /* metro dependency 4081: HapticUtilsNative */;
moduleValue2.triggerHapticFeedback((importDefault(4082) /* metro dependency 4082: HapticFeedbackTypes */).IMPACT_LIGHT);
env1_6({page: AnalyticsPages.GUILD_CHANNEL, section: AnalyticsSections.FORUM_CHANNEL_FOOTER,
object: AnalyticsObjects.BUTTON_CTA});
} else {
(require(11022) /* metro dependency 11022: ForumGuidelinesActionSheet */).openForumGuidelinesActionSheet({channel: channel,
onPress: onPress_92635});
}
} else {
value3 = environment.__proto__.__proto__;
moduleValue2 = require(4081) /* metro dependency 4081: HapticUtilsNative */;
moduleValue2.triggerHapticFeedback((importDefault(4082) /* metro dependency 4082: HapticFeedbackTypes */).IMPACT_LIGHT);
env1_6({page: AnalyticsPages.GUILD_CHANNEL, section: AnalyticsSections.FORUM_CHANNEL_FOOTER,
object: AnalyticsObjects.BUTTON_CTA});
}
}
function startCreateForumPostFlowOnPress() { // fn#92635, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12242:9967, owner: startCreateForumPostFlow.onPress, offset: 0x02093454, size: 66 bytes, params: 1, frame: 12
const binding = env2_6;
const GUILD_CHANNEL = AnalyticsPages.GUILD_CHANNEL;
const FORUM_CHANNEL_GUIDELINES = AnalyticsSections.FORUM_CHANNEL_GUIDELINES;
const BUTTON_CTA = AnalyticsObjects.BUTTON_CTA;
return binding({page: GUILD_CHANNEL, section: FORUM_CHANNEL_GUIDELINES, object: BUTTON_CTA});
}
@@ -0,0 +1,48 @@
/* Metro module 12063; source: modules/forums/native/ForumChannelEmptyState.tsx; dependencies: [31, 27, 33, 4501, 4002, 1585, 12064, 12065, 4573, 1244, 2] */
function _fun92706(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#92706, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12249:6, offset: 0x02095865, size: 290 bytes, params: 8, frame: 20
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const value2 = require(27) /* metro dependency 27 */;
const env0_3 = value2.View;
const env0_4 = value2.Image;
const value3 = require(33) /* metro dependency 33 */;
const env0_5 = value3.jsx;
const env0_6 = value3.jsxs;
const env0_7 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({container: {'flex': 1,
'alignSelf': 'stretch', 'justifyContent': 'center', 'alignItems': 'center'}, image: {'width': 120,
'height': 80}, title: {'textAlign': 'center', 'marginTop': 16, 'marginHorizontal': 20},
subtext: {'textAlign': 'center', 'marginTop': 4, 'marginHorizontal': 20}});
value = value.memo(_fun92707);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/forums/native/ForumChannelEmptyState.tsx');
exports.default = value;
}
function _fun92707({topViewHeight, channelName, tagFilter}) { // fn#92707, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12249:430, offset: 0x02095987, size: 603 bytes, params: 2, frame: 30
topViewHeight = topViewHeight === undefined ? 0 : topViewHeight;
const styles = useStyles();
const sharedModule = require(4002) /* metro dependency 4002: shared */;
const useThemeContext = sharedModule.useThemeContext;
const theme = Reflect.apply(useThemeContext, sharedModule, []).theme;
const {bottom, top} = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)();
const value3 = tagFilter.size > 0;
const items3 = [styles.container];
items3[1] = {marginBottom: bottom + top + topViewHeight};
const items2 = [<Image source={sharedModule.isThemeLight(theme) ? importDefault(12064) /* metro dependency 12064 */ : importDefault(12065) /* metro dependency 12065 */} style={styles.image} />];
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
items2[1] = <Text style={styles.title} accessibilityRole="header" variant="heading-lg/semibold" color="mobile-text-heading-primary">{value3 ? intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.lvPci0,
{numTags: tagFilter.size}) : intl.string((require(1244) /* metro dependency 1244: indexNative */).t.PwTMG0)}</Text>;
const formatToPlainString = intl.formatToPlainString;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
items2[2] = <Text style={styles.subtext} variant="text-sm/medium" color="text-default">{value3 ? Reflect.apply(formatToPlainString,
intl, [t.AAeye1, {numTags: tagFilter.size}]) : Reflect.apply(formatToPlainString, intl, [t.YtsXFD,
{channelName: channelName}])}</Text>;
return (
<View style={items3}>
{items2}
</View>
);
}
@@ -0,0 +1,135 @@
/* Metro module 9698; source: modules/forums/native/ForumChannelSearch.tsx; dependencies: [31, 27, 7156, 33, 4501, 1485, 9699, 9603, 4578, 1244, 9621, 566, 6984, 7155, 2] */
function _fun76223(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#76223, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9884:6, offset: 0x01dc715c, size: 274 bytes, params: 8, frame: 21
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(27) /* metro dependency 27 */).View;
const forumSearchStore = importDefault(7156) /* metro dependency 7156: ForumSearchStore */;
const env0_6 = (require(33) /* metro dependency 33 */).jsx;
const env0_7 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({inputContainer: {'flexGrow': 1,
'marginLeft': 8}, cancelButtonContainer: {paddingLeft: 8}});
const value3 = value.memo(_fun76224);
value = value.memo(_fun76228);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/forums/native/ForumChannelSearch.tsx');
exports.ForumChannelCloseSearchButton = value3;
exports.ForumChannelSearchInput = value;
}
function _fun76224({channelId}) { // fn#76224, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9884:260, offset: 0x01dc726e, size: 288 bytes, params: 2, frame: 22
var r0;
var Button;
var intl;
const styles = useStyles();
const value2 = (require(1485) /* metro dependency 1485 */).useNavigation();
const value3 = (require(1485) /* metro dependency 1485 */).useRoute();
const value4 = (require(9699) /* metro dependency 9699: useCanSearchForumPostsByChannelId */).useCanSearchForumPostsByChannelId(channelId);
env0_3.useEffect(function() {
return _fun76226;
}, [value2, value3]);
if (value4) {
var viewBindingProps = {style: styles.cancelButtonContainer};
Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
r0 = <View {...viewBindingProps}><Button variant="tertiary" size="sm" text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['ETE/oC'])} onPress={onPress_76227} /></View>;
} else {
r0 = null;
}
return r0;
}
function _fun76228({channelId, guildId, placeholder}) { // fn#76228, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9884:720, offset: 0x01dc741c, size: 338 bytes, params: 2, frame: 25
var r9;
var r0;
var SearchField;
var object;
var intl;
const styles = useStyles();
const value2 = (require(9699) /* metro dependency 9699: useCanSearchForumPostsByChannelId */).useCanSearchForumPostsByChannelId(channelId);
const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStores([ForumSearchStore], _fun76229,
[channelId]);
if (value2) {
if (value3 != null) {
var viewBindingProps = {style: styles.inputContainer};
SearchField = (require(6984) /* metro dependency 6984: SearchFieldNative */).SearchField;
object = {size: 'sm', defaultValue: value3, onChange: onChange_76230};
if (placeholder != null) {
r9 = placeholder;
} else {
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
r9 = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.Iy2gnS);
}
object.placeholder = r9;
object.autoFocus = value3.length === 0;
object.onClear = onClear;
object.grow = false;
r0 = <View {...viewBindingProps}><SearchField {...object} /></View>;
} else {
r0 = null;
}
} else {
r0 = null;
}
return r0;
}
function _fun76225() { // fn#76225, offset: 0x01dc738e, size: 11 bytes, params: 1, frame: 1
return _fun76226;
}
function onPress_76227() { // fn#76227, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9884:643, offset: 0x01dc73e2, size: 58 bytes, params: 1, frame: 14
var value2;
var defaultImport;
if (channelId != null) {
value2 = environment.__proto__;
defaultImport = importDefault(9621) /* metro dependency 9621: ForumActionCreators */;
defaultImport.updateForumSearchQuery(channelId, null);
}
}
function _fun76229() { // fn#76229, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9884:860, offset: 0x01dc756e, size: 40 bytes, params: 1, frame: 12
const channelIdBinding = channelId;
const value2 = null;
return value2 != channelIdBinding ? ForumSearchStore.getSearchQuery(channelId) : value2;
}
function onChange_76230(a0) { // fn#76230, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9884:1016, offset: 0x01dc7596, size: 61 bytes, params: 2, frame: 13
var value2;
var defaultImport;
if (channelId != null) {
value2 = environment.__proto__;
defaultImport = importDefault(9621) /* metro dependency 9621: ForumActionCreators */;
defaultImport.updateForumSearchQuery(channelId, a0);
}
}
function onClear() { // fn#76231, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9884:1158, offset: 0x01dc75d3, size: 138 bytes, params: 1, frame: 15
var value4;
var value5;
var defaultImport;
if (guildId != null && channelId != null) {
value4 = environment.__proto__;
(require(7155) /* metro dependency 7155: Tracking */).trackForumSearchCleared({guildId: guildId,
channelId: channelId});
}
if (channelId != null) {
value5 = environment.__proto__;
defaultImport = importDefault(9621) /* metro dependency 9621: ForumActionCreators */;
defaultImport.updateForumSearchQuery(channelId, '');
}
}
function _fun76226() { // fn#76226, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9884:412, offset: 0x01dc7399, size: 73 bytes, params: 1, frame: 15
var binding;
var setOptions;
var value2;
var moduleValue;
if (env1_1 != null) {
binding = env1_1;
setOptions = binding.setOptions;
value2 = environment.__proto__.__proto__;
moduleValue = require(9603) /* metro dependency 9603: HeaderShared */;
Reflect.apply(setOptions, binding, [moduleValue.getDefaultChannelStackHeaderProps(binding, env1_2)]);
}
}
@@ -0,0 +1,213 @@
/* Metro module 12059; source: modules/forums/native/ForumDisplaySettingsActionSheet.tsx; dependencies: [57, 31, 1379, 11547, 33, 1244, 1388, 1389, 1390, 566, 4594, 7155, 6805, 6758, 9067, 6277, 4572, 697, 7988, 7987, 2] */
function _fun92675(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#92675, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12245:6, offset: 0x02094114, size: 215 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
let value = require(11547) /* metro dependency 11547: ForumChannelStore */;
const env0_6 = value.useForumChannelStoreApi;
const env0_7 = value.useForumChannelStore;
value = require(33) /* metro dependency 33 */;
const env0_8 = value.jsx;
const env0_9 = value.jsxs;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/forums/native/ForumDisplaySettingsActionSheet.tsx');
exports.default = ForumDisplaySettingsActionSheet;
}
function ForumDisplaySettingsActionSheet({channelId}) { // fn#92676, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12245:318, offset: 0x020941eb, size: 1763 bytes, params: 2, frame: 40
var object16;
var r11;
var object9;
var object3;
const ForumLayout = (require(1389) /* metro dependency 1389: ForumLayout */).ForumLayout;
var items3;
var object4;
var object12;
var object5;
const ThreadSearchTagSetting = (require(1390) /* metro dependency 1390: ThreadSearchTagSetting */).ThreadSearchTagSetting;
var items4;
var object6;
const channel = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], function() {
return ChannelStore.getChannel(channelId);
});
const value2 = useForumChannelStore(channelId);
const sortOrder = value2.sortOrder;
const layoutType = value2.layoutType;
const env0_3 = layoutType;
const tagSetting = value2.tagSetting;
const binding = useForumChannelStoreApi();
let useState = binding.useState;
const value3 = Reflect.apply(useState, binding, [sortOrder]);
const binding2 = env0_3;
const value4 = binding2(value3, 2);
const env0_5 = value4[0];
const env0_6 = value4[1];
useState = binding.useState;
const value5 = binding2(Reflect.apply(useState, binding, [layoutType]), 2);
const env0_7 = value5[0];
const env0_8 = value5[1];
useState = binding.useState;
const value6 = binding2(Reflect.apply(useState, binding, [tagSetting]), 2);
const env0_9 = value6[0];
const env0_10 = value6[1];
const value8 = binding.useRef(null);
const value9 = binding.useRef(null);
const value10 = binding.useRef(null);
(require(4594) /* metro dependency 4594: useMountEffect */).useUnmountEffect(_fun92678);
const value11 = binding.useCallback(_fun92679, [channel]);
if (channel == null) {
return null;
}
const r14 = channel.availableTags != null && channel.availableTags.length > 0;
const ActionSheet = (require(6805) /* metro dependency 6805: ActionSheetNative */).ActionSheet;
object16 = {scrollable: true};
const BottomSheetTitleHeader = (require(6758) /* metro dependency 6758: BottomSheetTitleHeaderNative */).BottomSheetTitleHeader;
const object8 = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
object8.title = Reflect.apply(string, intl, [t.xyYt8A]);
const ActionSheetHeaderPressableText = (require(9067) /* metro dependency 9067: ActionSheetHeaderPressableTextNative */).ActionSheetHeaderPressableText;
object8.leading = <ActionSheetHeaderPressableText onPress={value11} label={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.yBZMsQ)} />;
object16.header = <BottomSheetTitleHeader {...object8} />;
const BottomSheetScrollView = (require(6277) /* metro dependency 6277 */).BottomSheetScrollView;
const Stack = (require(4572) /* metro dependency 4572: StackNative */).Stack;
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
const TableRadioGroup = (require(7988) /* metro dependency 7988: TableRadioGroupNative */).TableRadioGroup;
const tableRadioGroupProps2 = {groupRef: value8, hasIcons: false, defaultValue: sortOrder, onChange: onChange_92680,
title: intl.string((require(1244) /* metro dependency 1244: indexNative */).t.f8wNDl),
accessibilityLabel: intl.string((require(1244) /* metro dependency 1244: indexNative */).t.f8wNDl)};
const object15 = {};
object15.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.jOPmcI);
const ThreadSortOrder = (require(1388) /* metro dependency 1388: ThreadSortOrder */).ThreadSortOrder;
const LATEST_ACTIVITY = ThreadSortOrder.LATEST_ACTIVITY;
object15.value = LATEST_ACTIVITY;
const items5 = [object15];
string = intl.string;
const UIltXd = (require(1244) /* metro dependency 1244: indexNative */).t.UIltXd;
const CREATION_DATE = ThreadSortOrder.CREATION_DATE;
items5[1] = {label: Reflect.apply(string, intl, [UIltXd]), value: CREATION_DATE};
const items2 = [<TableRadioGroup {...tableRadioGroupProps2}>{items5.map(_fun92681)}</TableRadioGroup>];
if (channel.isForumChannel()) {
var tableRadioGroupProps = {groupRef: value9, hasIcons: false, defaultValue: layoutType,
onChange: onChange_92682,
title: intl.string(t.mFMDSq), accessibilityLabel: intl.string(t.h850Ss)};
object3 = {};
object3.label = intl.string(t['NJFr+g']);
object3.value = ForumLayout.LIST;
items3 = [object3];
object4 = {};
object4.label = intl.string(t.wKeggb);
object4.value = ForumLayout.GRID;
items3[1] = object4;
r11 = <TableRadioGroup {...tableRadioGroupProps}>{items3.map(_fun92683)}</TableRadioGroup>;
} else {
r11 = null;
}
items2[1] = r11;
if (r14) {
var tableRadioGroupProps = {groupRef: value10, hasIcons: false, defaultValue: tagSetting,
onChange: onChange_92684,
title: intl.string(t.Paxaug), accessibilityLabel: intl.string(t.f8wNDl)};
object5 = {};
object5.label = intl.string(t.rQ0ctQ);
object5.value = ThreadSearchTagSetting.MATCH_SOME;
items4 = [object5];
object6 = {};
object6.label = intl.string(t.FCXUu0);
object6.value = ThreadSearchTagSetting.MATCH_ALL;
items4[1] = object6;
r11 = <TableRadioGroup {...tableRadioGroupProps}>{items4.map(_fun92685)}</TableRadioGroup>;
} else {
r11 = null;
}
items2[2] = r11;
return (
<ActionSheet {...object16}>
<BottomSheetScrollView>
<Stack direction="vertical" spacing={PX_16}>
{items2}
</Stack>
</BottomSheetScrollView>
</ActionSheet>
);
}
function _fun92678() { // fn#92678, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12245:686, offset: 0x020948ce, size: 268 bytes, params: 1, frame: 15
var value2;
var moduleValue;
var trackForumSortOrderUpdated;
var value3;
var moduleValue2;
var trackForumLayoutUpdated;
var binding;
var state;
var setLayoutType;
var channelIdBinding;
let channelBinding = channel;
if (channelBinding != null) {
if (sortOrder !== env0_5) {
value2 = environment.__proto__;
moduleValue = require(7155) /* metro dependency 7155: Tracking */;
trackForumSortOrderUpdated = moduleValue.trackForumSortOrderUpdated;
channelBinding = channel;
Reflect.apply(trackForumSortOrderUpdated, moduleValue, [{guildId: channelBinding.guild_id,
channelId: channelBinding.id, sortOrder: env0_5}]);
}
if (layoutType !== env0_7) {
value3 = environment.__proto__;
moduleValue2 = require(7155) /* metro dependency 7155: Tracking */;
trackForumLayoutUpdated = moduleValue2.trackForumLayoutUpdated;
channelBinding = channel;
Reflect.apply(trackForumLayoutUpdated, moduleValue2, [{guildId: channelBinding.guild_id,
channelId: channelBinding.id, forumLayout: env0_7}]);
}
binding = env0_4;
state = binding.getState();
setLayoutType = state.setLayoutType;
channelIdBinding = channelId;
Reflect.apply(setLayoutType, state, [channelIdBinding, env0_7]);
binding.getState().setSortOrder(channelIdBinding, env0_5);
binding.getState().setTagSetting(channelIdBinding, env0_9);
}
}
function _fun92679() { // fn#92679, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12245:1004, offset: 0x020949da, size: 131 bytes, params: 1, frame: 14
var current;
var setValue;
let channelBinding = channel;
if (channelBinding != null) {
current = env0_11.current;
if (current != null) {
setValue = current.setValue;
channelBinding = channel;
Reflect.apply(setValue, current, [channelBinding.getDefaultSortOrder()]);
}
current = env0_12.current;
if (current != null) {
setValue = current.setValue;
channelBinding = channel;
Reflect.apply(setValue, current, [channelBinding.getDefaultLayout()]);
}
current = env0_13.current;
if (current != null) {
setValue = current.setValue;
channelBinding = channel;
Reflect.apply(setValue, current, [channelBinding.getDefaultTagSetting()]);
}
}
}
function _fun92681({label, value}) { // fn#92681, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12245:2037, offset: 0x02094a5d, size: 67 bytes, params: 2, frame: 16
const TableRadioRow = (require(7987) /* metro dependency 7987: TableRadioRowNative */).TableRadioRow;
return (
<TableRadioRow
label={label}
value={value}
key={value}
/>
);
}
@@ -0,0 +1,63 @@
/* Metro module 8005; source: modules/forums/native/ForumExplicitMediaAlert.tsx; dependencies: [31, 27, 33, 4501, 697, 4596, 4573, 1244, 4578, 6766, 8006, 2] */
function _fun63594(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#63594, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8183:6, offset: 0x01b86def, size: 337 bytes, params: 8, frame: 22
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_3 = (require(27) /* metro dependency 27 */).View;
let value = require(33) /* metro dependency 33 */;
const env0_4 = value.jsx;
const env0_5 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object2.container = {padding: PX_16, alignItems: 'stretch'};
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object2.title = {marginBottom: PX_16};
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object2.body = {marginTop: PX_16};
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object2.buttonContainer = {marginVertical: PX_16};
object2.text = {textAlign: 'center'};
const env0_6 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/forums/native/ForumExplicitMediaAlert.tsx');
exports.default = ForumExplicitMediaAlert;
}
function ForumExplicitMediaAlert({channelId, messageId, onClose}) { // fn#63595, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8183:484, offset: 0x01b86f40, size: 584 bytes, params: 2, frame: 28
const styles = useStyles();
const Alert = importDefault(4596) /* metro dependency 4596: Alert */;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const items3 = [styles.title];
items3[1] = styles.text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const B3vFdU = (require(1244) /* metro dependency 1244: indexNative */).t.B3vFdU;
const items2 = [<Text accessibilityRole="header" variant="heading-md/extrabold" color="text-default" style={items3}>{Reflect.apply(string,
intl, [B3vFdU])}</Text>];
items2[1] = <Text style={[styles.body,
styles.text]} maxFontSizeMultiplier={1} variant="text-md/normal">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.i4AbAS)}</Text>;
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
string = intl.string;
const WAI6xu = (require(1244) /* metro dependency 1244: indexNative */).t.WAI6xu;
items2[2] = <View style={styles.buttonContainer}><Button variant="primary" size="md" text={Reflect.apply(string,
intl, [WAI6xu])} onPress={onClose} /></View>;
const TextWithIOSLinkWorkaround = (require(6766) /* metro dependency 6766: TextWithIOSLinkWorkaround */).TextWithIOSLinkWorkaround;
items2[3] = <TextWithIOSLinkWorkaround style={styles.text} variant="text-sm/medium" color="text-muted">{intl.format((require(1244) /* metro dependency 1244: indexNative */).t['APQGZ+'],
{handleFalsePositiveHook: function() {
onClose();
require(dependencyMap[10]).handleSenderFalsePositiveFlow(channelId, messageId);
}})}</TextWithIOSLinkWorkaround>;
return (
<Alert
noDefaultButtons
style={styles.container}
onClose={onClose}
>
{items2}
</Alert>
);
}
@@ -0,0 +1,182 @@
/* Metro module 11022; source: modules/forums/native/ForumGuidelinesActionSheet.tsx; dependencies: [57, 31, 27, 6900, 33, 4501, 697, 9619, 1585, 11023, 477, 11024, 4080, 6618, 4579, 1244, 3975, 4246, 8148, 6275, 6277, 5278, 4573, 9646, 8124, 6686, 6622, 11022, 1962, 2] */
function _fun84414(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#84414, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11208:6, offset: 0x01f494ac, size: 571 bytes, params: 8, frame: 24
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
const env0_5 = (require(27) /* metro dependency 27 */).View;
const env0_6 = (require(6900) /* metro dependency 6900: ForumConstants */).FORUM_GUIDELINES_ACTION_SHEET;
let value = require(33) /* metro dependency 33 */;
const env0_7 = value.jsx;
const env0_8 = value.jsxs;
const env0_9 = value.Fragment;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
object2.scrollContainer = {paddingHorizontal: 16};
object2.header = {'alignItems': 'center', 'paddingTop': 20, 'paddingBottom': 24};
object2.headerTitle = {marginTop: 8};
const object3 = {padding: 16};
const BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
object3.backgroundColor = BACKGROUND_SURFACE_HIGH;
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object2.guidelinesContainer = object3;
object2.footer = {paddingBottom: 16};
object2.buttonWrapper = {marginHorizontal: 16};
const object5 = {};
object5.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object2.buttonPill = object5;
const object6 = {'marginTop': 16, 'position': 'absolute', 'left': 16, 'right': 16, 'shadowColor': null,
'shadowOffset': null, 'shadowOpacity': 0.25, 'shadowRadius': 4};
const BLACK = (importDefault(697) /* metro dependency 697: native */).colors.BLACK;
object6.shadowColor = BLACK;
object6.shadowOffset = {'width': 0, 'height': 1};
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object2.floatingButtonContainer = object6;
object2.editButton = {'display': 'flex', 'flexDirection': 'row', 'alignItems': 'center', 'position': 'absolute',
'top': 12, 'right': 0};
object2.editText = {marginRight: 4};
const TEXT_BRAND = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_BRAND;
object2.editIcon = {color: TEXT_BRAND};
const env0_10 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/forums/native/ForumGuidelinesActionSheet.tsx');
exports.default = ForumGuidelinesActionSheet;
exports.openForumGuidelinesActionSheet = function(a0) {
var r7;
var defaultImport = importDefault(dependencyMap[12]);
var value2 = require(dependencyMap[28])(dependencyMap[27], dependencyMap.paths);
var object = {};
copyDataProperties(object, a0, r7);
defaultImport.openLazy(value2, FORUM_GUIDELINES_ACTION_SHEET, object);
};
}
function ForumGuidelinesActionSheet({channel, onPress, onClose}) { // fn#84415, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11208:1057, offset: 0x01f496e7, size: 1549 bytes, params: 2, frame: 41
var r14;
const BaseTextButton = (require(4579) /* metro dependency 4579: BaseTextButtonNative */).BaseTextButton;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var PressableOpacity;
var object;
var bt75uw;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
var object16;
const styles = useStyles();
const value3 = (require(9619) /* metro dependency 9619: ForumHooks */).useCanManageChannel(channel);
const bottom = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)().bottom;
let binding = env0_4;
var [property, env0_4] = env0_3(binding.useState(), 2);
const value7 = (importDefault(11023) /* metro dependency 11023: useActionSheetStartHeight */)();
const value8 = binding.useMemo(_fun84416, [bottom, property]);
let r5 = value8 ?? 0;
const value9 = value7 < r5;
const r21 = value9 ? undefined : value8;
binding = env0_4;
const value10 = binding.useCallback(_fun84417, [property]);
binding.useEffect(_fun84418, [channel.id]);
const closure = function() {
if (onPress != null) {
onPress();
}
importDefault(dependencyMap[12]).hideActionSheet(FORUM_GUIDELINES_ACTION_SHEET);
};
const r20 = !value9 && ((SafeAreaPaddingView) => <SafeAreaPaddingView bottom style={styles.footer}><BaseTextButton grow text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['NX+WJN'])} onPress={closure} style={styles.buttonWrapper} pillStyle={styles.buttonPill} /></SafeAreaPaddingView>)((require(6618) /* metro dependency 6618: SafeAreaView */).SafeAreaPaddingView);
binding = env0_4;
const value13 = binding.useMemo(_fun84420, [bottom, value9]);
const moduleValue2 = require(3975) /* metro dependency 3975 */;
const useLocation = moduleValue2.useLocation;
const pathname = Reflect.apply(useLocation, moduleValue2, []).pathname;
const env0_7 = binding.useRef(true);
binding.useEffect(_fun84421, [pathname, channel.id]);
const value14 = binding.useCallback(_fun84422, [channel.id]);
const jsxRuntimeEnv0_9Binding = jsxRuntimeEnv0_9;
const BottomSheet = (require(6275) /* metro dependency 6275: BottomSheetNative */).BottomSheet;
const BottomSheetScrollView = (require(6277) /* metro dependency 6277 */).BottomSheetScrollView;
const object2 = {bottom: bottom};
const object3 = {paddingBottom: value13};
if (value3) {
PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
object = {};
string = intl.string;
bt75uw = t.bt75uw;
object.accessibilityLabel = Reflect.apply(string, intl, [bt75uw]);
object.accessibilityRole = 'button';
object.style = styles.editButton;
object.onPress = value14;
string = intl.string;
bt75uw = t.bt75uw;
r14 = <PressableOpacity {...object}><Text style={styles.editText} variant="text-sm/medium" color="text-brand">{Reflect.apply(string,
intl,
[bt75uw])}</Text>{((PencilIcon) => <PencilIcon color={styles.editIcon.color} size="xs" />)((require(9646) /* metro dependency 9646: PencilIcon */).PencilIcon)}</PressableOpacity>;
} else {
r14 = value3;
}
const items2 = [r14];
const StageSparkle = importDefault(8124) /* metro dependency 8124: StageSparkle */;
const BookCheckIcon = (require(6686) /* metro dependency 6686: BookCheckIcon */).BookCheckIcon;
items2[1] = <StageSparkle IconComponent={BookCheckIcon} />;
items2[2] = <Text style={styles.headerTitle} variant="heading-xl/extrabold" color="mobile-text-heading-primary">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['4d4T4l'])}</Text>;
const view = <View style={styles.header}>{items2}</View>;
const defaultImport2 = importDefault(6622) /* metro dependency 6622: MarkupUtils */;
const bottomSheet = <BottomSheet scrollable contentHeight={r21} footer={r20} onDismiss={onClose}><BottomSheetScrollView style={styles.scrollContainer} scrollIndicatorInsets={object2} contentContainerStyle={object3} onContentSizeChange={value10}>{view}<View style={styles.guidelinesContainer}><Text variant="text-md/medium" color="text-default">{defaultImport2.parseForumPostGuidelines(channel.topic,
true, {'channelId': null, 'allowHeading': true, 'allowList': true, 'allowLinks': true,
channelId: channel.id})}</Text></View></BottomSheetScrollView></BottomSheet>;
if (value9) {
r5 = <BaseTextButton grow style={[styles.floatingButtonContainer,
{bottom: bottom + 16}]} pillStyle={styles.buttonPill} text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['NX+WJN'])} onPress={closure} />;
} else {
r5 = value9;
}
return (
<>
{bottomSheet}
{r5}
</>
);
}
function _fun84416() { // fn#84416, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11208:1251, offset: 0x01f49cf4, size: 87 bytes, params: 1, frame: 14
return env0_3 != null ? 72 + ((require(477) /* metro dependency 477: PlatformUtils */).isAndroid() ? bottom : 0) + env0_3 + bottom : undefined;
}
function _fun84417(a0, a1) { // fn#84417, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11208:1360, offset: 0x01f49d4b, size: 29 bytes, params: 3, frame: 11
if (a1 !== env0_3) {
env0_4(a1);
}
}
function _fun84418() { // fn#84418, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11208:1400, offset: 0x01f49d68, size: 50 bytes, params: 1, frame: 12
let value = environment.__proto__;
value = importDefault(11024) /* metro dependency 11024: ForumGuidelinesManager */;
value.markAsSeen(channel.id);
}
function _fun84420() { // fn#84420, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11208:1741, offset: 0x01f49ddb, size: 32 bytes, params: 1, frame: 3
return env0_5 ? bottom + 40 + 32 : 0;
}
function _fun84421() { // fn#84421, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11208:1827, offset: 0x01f49dfb, size: 130 bytes, params: 1, frame: 14
const linkUtilsModule = require(4246) /* metro dependency 4246: LinkUtils */;
const value3 = linkUtilsModule.tryParseChannelPath(pathname);
if (env0_7.current) {
env0_7.current = false;
} else if (value3 == null) {
env0_7.current = false;
} else if (value3.channelId === channel.id) {
env0_7.current = false;
} else {
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet(FORUM_GUIDELINES_ACTION_SHEET);
}
}
function _fun84422() { // fn#84422, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11208:1983, offset: 0x01f49e7d, size: 77 bytes, params: 1, frame: 14
let value = environment.__proto__;
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet(FORUM_GUIDELINES_ACTION_SHEET);
value = importDefault(8148) /* metro dependency 8148: ChannelSettingsActionCreators */;
value.open(channel.id);
}
@@ -0,0 +1,50 @@
/* Metro module 11464; source: modules/forums/native/ForumOriginalPoster.tsx; dependencies: [31, 27, 33, 4501, 697, 6235, 4573, 1244, 2] */
function _fun87777(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#87777, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11650:6, offset: 0x01fcae12, size: 304 bytes, params: 8, frame: 22
var object3;
const env0_0 = require;
const closure = ForumOriginalPoster;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_2 = (require(27) /* metro dependency 27 */).View;
let value = require(33) /* metro dependency 33 */;
const env0_3 = value.jsx;
const env0_4 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object3 = {container: {'flexDirection': 'row', 'alignItems': 'center', 'justifyContent': 'center'}};
const object4 = {'borderRadius': null, 'marginEnd': 8, 'paddingHorizontal': 4};
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object3.opIcon = object4;
const DARK_BRAND_260_LIGHT_BRAND_200 = (require(6235) /* metro dependency 6235: LegacyTokens */).DARK_BRAND_260_LIGHT_BRAND_200;
object3.opIconBackground = {backgroundColor: DARK_BRAND_260_LIGHT_BRAND_200};
const env0_5 = Reflect.apply(createStyles, value, [object3]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/forums/native/ForumOriginalPoster.tsx');
exports.default = closure;
exports.getForumOriginalPoster = getForumOriginalPoster;
}
function ForumOriginalPoster() { // fn#87778, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11650:393, offset: 0x01fcaf42, size: 288 bytes, params: 1, frame: 27
const styles = useStyles();
const items2 = [styles.opIcon];
items2[1] = styles.opIconBackground;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
return (
<View style={styles.container}>
<View style={items2}>
<Text variant="text-xs/semibold" color="text-brand">
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.fyE8sH)}
</Text>
</View>
<Text variant="text-md/semibold" color="mobile-text-heading-primary">
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.uN6Emt)}
</Text>
</View>
);
}
function getForumOriginalPoster() { // fn#87779, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11650:902, offset: 0x01fcb062, size: 23 bytes, params: 1, frame: 13
return <ForumOriginalPoster />;
}
+137
View File
@@ -0,0 +1,137 @@
/* Metro module 11546; source: modules/forums/native/ForumPost.tsx; dependencies: [31, 1379, 3793, 11547, 33, 11548, 11552, 11563, 566, 44, 6896, 9619, 11567, 11568, 9587, 1389, 2] */
function _fun88499(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#88499, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11732:6, offset: 0x01fe5b34, size: 256 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const relationshipStore = importDefault(3793) /* metro dependency 3793: RelationshipStore */;
const env0_5 = (require(11547) /* metro dependency 11547: ForumChannelStore */).useForumChannelStore;
const value2 = require(33) /* metro dependency 33 */;
const env0_6 = value2.jsx;
const env0_7 = value2.Fragment;
const env0_8 = value2.jsxs;
value = value.memo(_fun88505);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/forums/native/ForumPost.tsx');
exports.default = value;
exports.ForumPostListDisabled = ForumPostListDisabled;
}
function ForumPostGrid({firstMessage, hasUnreads, isNew, media, parentChannel, thread}) { // fn#88500, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11732:197, offset: 0x01fe5c34, size: 212 bytes, params: 2, frame: 26
return (
<>
{((Component) => <Component thread={thread} hasUnreads={hasUnreads} isNew={isNew} />)(importDefault(11548) /* metro dependency 11548: ForumPostGridHeader */)}
{((Component) => <Component thread={thread} hasUnreads={hasUnreads} media={media} />)(importDefault(11552) /* metro dependency 11552: ForumPostGridBody */)}
{((Component) => <Component thread={thread} firstMessage={firstMessage} hasUnreads={hasUnreads} parentChannel={parentChannel} />)(importDefault(11563) /* metro dependency 11563: ForumPostGridFooter */)}
</>
);
}
function ConnectedForumPost({threadId, style}) { // fn#88501, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11732:608, offset: 0x01fe5d08, size: 863 bytes, params: 2, frame: 32
var r1;
var r0;
const ForumPostPressableContainer = (require(11567) /* metro dependency 11567: ForumPostContainer */).ForumPostPressableContainer;
var value;
const channel = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], function() {
return ChannelStore.getChannel(threadId);
});
(importDefault(44) /* metro dependency 44 */)(channel != null,
'[Forum Post] The thread should not be null here. A store must have missed an update.');
const layoutType = useForumChannelStore(channel.parent_id).layoutType;
const channel2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], function() {
return ChannelStore.getChannel(parent_id);
});
const {firstMessage,
loaded} = (require(6896) /* metro dependency 6896: ForumPostDataLoader */).useFirstForumPostMessage(channel);
const {isNew, hasUnreads} = (require(9619) /* metro dependency 9619: ForumHooks */).useForumPostReadStates(channel);
const {content,
hasSpoilerEmbeds} = (require(9619) /* metro dependency 9619: ForumHooks */).useForumPostFirstMessageMarkup({firstMessage: firstMessage,
hasUnreads: hasUnreads});
const value6 = (require(9587) /* metro dependency 9587: ForumPostMediaUtils */).useForumPostMediaThumbnail(firstMessage,
channel2, hasSpoilerEmbeds);
const value7 = (require(9587) /* metro dependency 9587: ForumPostMediaUtils */).useFirstMediaIsEmbed(firstMessage,
hasSpoilerEmbeds);
const value8 = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([RelationshipStore],
_fun88504);
const isBlocked = value8.isBlocked;
if (loaded) {
if (isBlocked) {
var forumPostPressableContainerProps = {style: style, threadId: channel.id};
value = importDefault(11568) /* metro dependency 11568: ForumPostList */;
value = <ForumPostPressableContainer {...forumPostPressableContainerProps}>{((Component) => <Component thread={channel} parentChannel={channel2} firstMessage={firstMessage} messageContent={null} media={null} hasUnreads={hasUnreads} isNew={isNew} firstMessageLoaded isLocalDeviceMedia={false} senderModifier={isBlocked ? 'blocked' : 'ignored'} />)(value)}</ForumPostPressableContainer>;
r1 = value;
} else if (value8.isIgnored) {
var forumPostPressableContainerProps = {style: style, threadId: channel.id};
value = importDefault(11568) /* metro dependency 11568: ForumPostList */;
value = <ForumPostPressableContainer {...forumPostPressableContainerProps}>{((Component) => <Component thread={channel} parentChannel={channel2} firstMessage={firstMessage} messageContent={null} media={null} hasUnreads={hasUnreads} isNew={isNew} firstMessageLoaded isLocalDeviceMedia={false} senderModifier={isBlocked ? 'blocked' : 'ignored'} />)(value)}</ForumPostPressableContainer>;
r1 = value;
} else if (layoutType !== (require(1389) /* metro dependency 1389: ForumLayout */).ForumLayout.GRID) {
var forumPostPressableContainerProps = {style: style, threadId: channel.id};
value = importDefault(11568) /* metro dependency 11568: ForumPostList */;
value = <ForumPostPressableContainer {...forumPostPressableContainerProps}>{((Component) => <Component thread={channel} parentChannel={channel2} firstMessage={firstMessage} messageContent={content} media={value6[0]} isEmbed={value7} hasUnreads={hasUnreads} isNew={isNew} firstMessageLoaded={loaded} isLocalDeviceMedia={false} />)(value)}</ForumPostPressableContainer>;
r1 = value;
} else if (value6.length > 0) {
r1 = <ForumPostPressableContainer style={style} threadId={channel.id}><ForumPostGrid thread={channel} media={value6} parentChannel={channel2} firstMessage={firstMessage} hasUnreads={hasUnreads} isNew={isNew} /></ForumPostPressableContainer>;
} else {
var forumPostPressableContainerProps = {style: style, threadId: channel.id};
value = importDefault(11568) /* metro dependency 11568: ForumPostList */;
value = <ForumPostPressableContainer {...forumPostPressableContainerProps}>{((Component) => <Component thread={channel} parentChannel={channel2} firstMessage={firstMessage} messageContent={content} media={value6[0]} isEmbed={value7} hasUnreads={hasUnreads} isNew={isNew} firstMessageLoaded={loaded} isLocalDeviceMedia={false} />)(value)}</ForumPostPressableContainer>;
r1 = value;
}
r0 = r1;
} else {
r0 = null;
}
return r0;
}
function _fun88505(a0) { // fn#88505, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11732:483, offset: 0x01fe60d6, size: 101 bytes, params: 2, frame: 17
const env0_0 = a0;
const channel = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], _fun88506);
const value2 = null;
return value2 == channel ? value2 : <ConnectedForumPost {...a0} />;
}
function ForumPostListDisabled({style, localDeviceMedia, threadId}) { // fn#88507, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11732:2214, offset: 0x01fe615b, size: 361 bytes, params: 2, frame: 25
var r0;
var ForumPostDisabledContainer;
var value;
const fluxModule = require(566) /* metro dependency 566: flux */;
const useStateFromStores = fluxModule.useStateFromStores;
let object = [ChannelStore];
const channel = Reflect.apply(useStateFromStores, fluxModule, [object, function() {
return ChannelStore.getChannel(threadId);
}]);
(importDefault(44) /* metro dependency 44 */)(channel != null,
'[Forum Post] The thread should not be null here. A store must have missed an update.');
const channel2 = fluxModule.useStateFromStores([ChannelStore], function() {
return ChannelStore.getChannel(channel.parent_id);
});
const {firstMessage,
loaded} = (require(6896) /* metro dependency 6896: ForumPostDataLoader */).useFirstForumPostMessage(channel);
const forumHooksModule = require(9619) /* metro dependency 9619: ForumHooks */;
const useForumPostFirstMessageMarkup = forumHooksModule.useForumPostFirstMessageMarkup;
if (loaded) {
ForumPostDisabledContainer = (require(11567) /* metro dependency 11567: ForumPostContainer */).ForumPostDisabledContainer;
object = {style: style};
value = importDefault(11568) /* metro dependency 11568: ForumPostList */;
value = <ForumPostDisabledContainer {...object}>{((Component) => <Component thread={channel} parentChannel={channel2} firstMessage={firstMessage} messageContent={Reflect.apply(useForumPostFirstMessageMarkup,
forumHooksModule, [{firstMessage: firstMessage,
hasUnreads: false}]).content} media={localDeviceMedia} hasUnreads isNew={false} firstMessageLoaded={loaded} isLocalDeviceMedia />)(value)}</ForumPostDisabledContainer>;
r0 = value;
} else {
r0 = null;
}
return r0;
}
function _fun88504() { // fn#88504, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11732:1271, offset: 0x01fe6081, size: 85 bytes, params: 1, frame: 15
return {isBlocked: firstMessage != null && RelationshipStore.isBlockedForMessage(firstMessage),
isIgnored: firstMessage != null && RelationshipStore.isIgnoredForMessage(firstMessage)};
}
function _fun88506() { // fn#88506, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11732:540, offset: 0x01fe613b, size: 32 bytes, params: 1, frame: 11
return ChannelStore.getChannel(env0_0.threadId);
}
@@ -0,0 +1,152 @@
/* Metro module 11312; source: modules/forums/native/ForumPostActionBar.tsx; dependencies: [57, 31, 27, 3785, 3786, 1379, 661, 33, 4501, 697, 566, 6896, 1478, 9835, 7701, 11313, 5278, 1244, 4064, 4573, 9216, 4056, 2] */
function _fun86305(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#86305, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11498:6, offset: 0x01f8fae6, size: 507 bytes, params: 8, frame: 24
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
const env0_5 = (require(27) /* metro dependency 27 */).View;
const lurkingStore = importDefault(3785) /* metro dependency 3785: LurkingStore */;
const joinedThreadsStore = importDefault(3786) /* metro dependency 3786: JoinedThreadsStore */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const env0_9 = (require(661) /* metro dependency 661: Constants */).AnalyticsSections;
let value = require(33) /* metro dependency 33 */;
const env0_10 = value.jsx;
const env0_11 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
const BACKGROUND_BASE_LOWER = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWER;
object2.actionBarContainer = {'overflow': 'hidden', 'paddingHorizontal': 12, 'paddingVertical': 8,
'display': 'flex', 'flexDirection': 'row', 'justifyContent': 'space-between', 'alignItems': 'center',
'backgroundColor': null, 'marginBottom': -1, backgroundColor: BACKGROUND_BASE_LOWER};
object2.actionRow = {'display': 'flex', 'flexDirection': 'row', 'alignItems': 'center', 'flex': 1};
object2.reactionRow = {'display': 'flex', 'flexDirection': 'row', 'alignItems': 'center', 'flex': 1};
const object4 = {'display': 'flex', 'flexDirection': 'row', 'alignItems': 'center', 'paddingHorizontal': 8,
'height': 28, 'marginRight': 4, 'borderRadius': null, 'borderWidth': 1};
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
let CONTROL_SECONDARY_BACKGROUND_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.CONTROL_SECONDARY_BACKGROUND_DEFAULT;
object4.backgroundColor = CONTROL_SECONDARY_BACKGROUND_DEFAULT;
CONTROL_SECONDARY_BACKGROUND_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.CONTROL_SECONDARY_BACKGROUND_DEFAULT;
object4.borderColor = CONTROL_SECONDARY_BACKGROUND_DEFAULT;
object2.actionButton = object4;
object2.actionButtonsContainer = {justifyContent: 'flex-end'};
object2.lastActionButton = {marginRight: 0};
object2.buttonText = {marginLeft: 8};
const env0_12 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/forums/native/ForumPostActionBar.tsx');
exports.default = _default_86306;
}
function _default_86306({channel}) { // fn#86306, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11498:1034, offset: 0x01f8fce1, size: 1206 bytes, params: 2, frame: 38
var r10;
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
var object;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var items4;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
var items5;
const styles = useStyles();
const channel2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], function() {
return ChannelStore.getChannel(channel.parent_id);
});
const forumPostDataLoaderModule = require(6896) /* metro dependency 6896: ForumPostDataLoader */;
const useFirstForumPostMessage = forumPostDataLoaderModule.useFirstForumPostMessage;
const firstMessage = Reflect.apply(useFirstForumPostMessage, forumPostDataLoaderModule, [channel]).firstMessage;
const value2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([JoinedThreadsStore], function() {
return JoinedThreadsStore.hasJoined(channel.id);
});
const env0_2 = channel.getGuildId();
const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStores([LurkingStore], _fun86309);
const width = (importDefault(1478) /* metro dependency 1478: useWindowDimensionsNative */)().width;
const env0_3 = width;
const binding = env0_4;
var [property, env0_4] = env0_3(binding.useState(0), 2);
const value6 = binding.useCallback(_fun86310, [width]);
const closure = onPress_86311;
const items2 = [styles.actionBarContainer,
(require(7701) /* metro dependency 7701: ClientThemesOverrides */).useGradientTop()];
const r5 = firstMessage != null && <View style={styles.reactionRow}>{((ForumPostActionBarReactions) => <ForumPostActionBarReactions thread={channel} parentChannel={channel2} firstMessage={firstMessage} containerWidth={property} />)((require(11313) /* metro dependency 11313: ForumPostReactions */).ForumPostActionBarReactions)}</View>;
const items3 = [styles.actionRow];
items3[1] = styles.actionButtonsContainer;
if (value3) {
r10 = !value3;
} else {
object = {accessible: true};
string = intl.string;
if (value2) {
object.accessibilityLabel = Reflect.apply(string, intl, [t.G3ooHD]);
object.style = styles.actionButton;
object.onPress = closure;
items5 = [((CheckmarkLargeIcon) => <CheckmarkLargeIcon size="xs" color="text-brand" />)((require(4064) /* metro dependency 4064: CheckmarkLargeIcon */).CheckmarkLargeIcon)];
string = intl.string;
items5[1] = <Text style={[styles.buttonText]} variant="text-sm/semibold" color="text-brand">{Reflect.apply(string,
intl, [t['OtF+lC']])}</Text>;
object.children = items5;
} else {
object.accessibilityLabel = Reflect.apply(string, intl, [t['DjZ+6E']]);
object.style = styles.actionButton;
object.onPress = closure;
items4 = [((BellIcon) => <BellIcon size="xs" />)((require(9216) /* metro dependency 9216: BellIcon */).BellIcon)];
string = intl.string;
items4[1] = <Text style={styles.buttonText} variant="text-sm/semibold" color="interactive-text-default">{Reflect.apply(string,
intl, [t['0rQinA']])}</Text>;
object.children = items4;
}
r10 = <PressableOpacity {...object} />;
}
string = intl.string;
const WqhZss = (require(1244) /* metro dependency 1244: indexNative */).t.WqhZss;
const items8 = [styles.actionButton];
items8[1] = styles.lastActionButton;
const LinkIcon = (require(4056) /* metro dependency 4056: LinkIcon */).LinkIcon;
return (
<View style={items2}>
{r5}
<View style={items3} onLayout={value6}>
{r10}
<PressableOpacity
accessible
accessibilityLabel={Reflect.apply(string, intl, [WqhZss])}
style={items8}
onPress={onPress_86312}
>
<LinkIcon size="xs" />
</PressableOpacity>
</View>
</View>
);
}
function _fun86309() { // fn#86309, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11498:1290, offset: 0x01f901d7, size: 40 bytes, params: 1, frame: 12
return env0_2 != null && LurkingStore.isLurking(env0_2);
}
function _fun86310({nativeEvent}) { // fn#86310, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11498:1395, offset: 0x01f901ff, size: 51 bytes, params: 2, frame: 11
env0_4(width - nativeEvent.layout.width - 40);
}
function _default_86306OnPress() { // fn#86311, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11498:1454, owner: _default_86306.onPress, offset: 0x01f90232, size: 50 bytes, params: 1, frame: 14
let value = environment.__proto__;
value = require(9835) /* metro dependency 9835: MessagesUtils */;
value.handleToggleFollowForumPost(channel, env0_1);
}
function _default_86306OnPress_86312() { // fn#86312, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11498:2627, owner: _default_86306.onPress, offset: 0x01f90264, size: 91 bytes, params: 1, frame: 16
var value3;
var moduleValue;
const guildId = channel.getGuildId();
if (guildId != null) {
value3 = environment.__proto__;
moduleValue = require(9835) /* metro dependency 9835: MessagesUtils */;
moduleValue.handleCopyLinkForumPost(guildId, channel.id, {section: AnalyticsSections.CHANNEL_HEADER});
}
}
@@ -0,0 +1,104 @@
/* Metro module 12062; source: modules/forums/native/ForumPostPlaceholder.tsx; dependencies: [57, 31, 4502, 33, 4501, 697, 566, 4017, 4504, 6239, 2] */
function _fun92701(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#92701, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12248:6, offset: 0x02095478, size: 290 bytes, params: 8, frame: 24
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
let value = importAll(31) /* metro dependency 31 */;
const accessibilityStore = importDefault(4502) /* metro dependency 4502: AccessibilityStore */;
const env0_6 = (require(33) /* metro dependency 33 */).jsx;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
const object3 = {};
const PX_64 = (importDefault(697) /* metro dependency 697: native */).space.PX_64;
object3.height = 2 * PX_64;
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object3.marginBottom = PX_12;
const env0_7 = Reflect.apply(createStyles, createStylesModule, [{postPlaceholder: object3}]);
object = {code: 'function ForumPostPlaceholderTsx1(){const{reducedMotion,ROW_OPACITY_END,withDelay,INITIAL_DELAY_MS,withRepeat,withSequence,withTiming,timingConfig}=this.__closure;if(reducedMotion){return{opacity:ROW_OPACITY_END};}return{opacity:withDelay(INITIAL_DELAY_MS,withRepeat(withSequence(withTiming(ROW_OPACITY_END,timingConfig),withTiming(1,timingConfig)),-1,true))};}'};
value = value.memo(_fun92702);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/forums/native/ForumPostPlaceholder.tsx');
exports.default = value;
}
function _fun92702() { // fn#92702, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12248:635, offset: 0x0209559a, size: 397 bytes, params: 1, frame: 21
var object2;
const styles = useStyles();
const useReducedMotion = (require(566) /* metro dependency 566: flux */).useStateFromStores([AccessibilityStore],
function() {
return AccessibilityStore.useReducedMotion;
});
const timingConfig = env0_3(env0_4.useState(_fun92704), 1)[0].timingConfig;
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
const closure = __92705;
object2 = {reducedMotion: useReducedMotion, ROW_OPACITY_END: 0.55};
object2.withDelay = reanimatedRexportModule.withDelay;
object2.INITIAL_DELAY_MS = 1000;
object2.withRepeat = reanimatedRexportModule.withRepeat;
object2.withSequence = reanimatedRexportModule.withSequence;
object2.withTiming = (require(4504) /* metro dependency 4504: timing */).withTiming;
object2.timingConfig = timingConfig;
closure.__closure = object2;
closure.__workletHash = 9488742940898;
closure.__initData = env0_8;
const value4 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
const View = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
const Card = (require(6239) /* metro dependency 6239: CardNative */).Card;
return (
<View style={value4} pointerEvents="none">
<Card variant="secondary" style={styles.postPlaceholder} />
</View>
);
}
function _fun92704() { // fn#92704, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12248:731, offset: 0x02095727, size: 121 bytes, params: 1, frame: 16
const object = {};
const Math = global.Math;
object.duration = 1000 + 500 * Math.random();
value = environment.__proto__;
const Easing = (require(4017) /* metro dependency 4017: ReanimatedRexport */).Easing;
const inOut = Easing.inOut;
const Easing2 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).Easing;
object.easing = Reflect.apply(inOut, Easing, [Easing2.sin]);
return {timingConfig: object};
}
function __92705() { // fn#92705, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12248:891, offset: 0x020957a0, size: 197 bytes, params: 1, frame: 25
var value2;
var moduleValue;
var withDelay;
var moduleValue2;
var withRepeat;
var moduleValue3;
var withSequence;
var moduleValue4;
var withTiming;
var timingConfigBinding;
var moduleValue5;
var value;
const object2 = {};
if (useReducedMotion) {
object2.opacity = 0.55;
} else {
value2 = environment.__proto__;
moduleValue = require(4017) /* metro dependency 4017: ReanimatedRexport */;
withDelay = moduleValue.withDelay;
moduleValue2 = require(4017) /* metro dependency 4017: ReanimatedRexport */;
withRepeat = moduleValue2.withRepeat;
moduleValue3 = require(4017) /* metro dependency 4017: ReanimatedRexport */;
withSequence = moduleValue3.withSequence;
moduleValue4 = require(4504) /* metro dependency 4504: timing */;
withTiming = moduleValue4.withTiming;
timingConfigBinding = timingConfig;
value = Reflect.apply(withTiming, moduleValue4, [0.55, timingConfigBinding]);
moduleValue5 = require(4504) /* metro dependency 4504: timing */;
withTiming = moduleValue5.withTiming;
value = Reflect.apply(withSequence, moduleValue3, [value, Reflect.apply(withTiming, moduleValue5, [1,
timingConfigBinding])]);
value = Reflect.apply(withRepeat, moduleValue2, [value, -1, true]);
object2.opacity = Reflect.apply(withDelay, moduleValue, [1000, value]);
}
return object2;
}
@@ -0,0 +1,118 @@
/* Metro module 11161; source: modules/forums/native/ForumPostTagsActionSheet.tsx; dependencies: [57, 31, 27, 6900, 33, 4501, 1244, 6863, 6805, 6758, 11162, 4578, 9621, 4080, 2] */
function _fun85226(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#85226, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11347:6, offset: 0x01f67e15, size: 287 bytes, params: 8, frame: 20
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
const env0_5 = (require(27) /* metro dependency 27 */).View;
const env0_6 = (require(6900) /* metro dependency 6900: ForumConstants */).MAX_FORUM_POST_TAGS;
const value = require(33) /* metro dependency 33 */;
const env0_7 = value.jsx;
const env0_8 = value.jsxs;
const env0_9 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({tagsContainer: {'display': 'flex',
'flexDirection': 'row', 'flexWrap': 'wrap'}, saveButton: {'marginTop': 8, 'marginHorizontal': 16,
'marginBottom': 16}, subtitle: {marginTop: 4}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/forums/native/ForumPostTagsActionSheet.tsx');
exports.default = ForumPostTagsActionSheet;
}
function ForumPostTagsActionSheet({thread, parentChannel, canManageThread, onSave, title, tags, onClose}) { // fn#85227, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11347:460, offset: 0x01f67f34, size: 646 bytes, params: 2, frame: 26
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
if (canManageThread !== undefined) {
}
const r9 = title !== undefined ? title : intl.string((require(1244) /* metro dependency 1244: indexNative */).t['436ZFw']);
const styles = useStyles();
const value2 = (require(6863) /* metro dependency 6863: ForumTagHooks */).useAppliedTags(thread);
const binding = undefined;
const useState = binding.useState;
const Set = global.Set;
const r1 = tags ?? value2;
const value3 = Object.create(Set.prototype, {constructor: {value: Set}});
const set = new Set(r1);
const value6 = onClose(Reflect.apply(useState, binding, [set instanceof Object ? set : value3]), 2);
const property = value6[0];
const env0_5 = value6[1];
const env0_6 = property.size >= MAX_FORUM_POST_TAGS;
const value7 = (require(6863) /* metro dependency 6863: ForumTagHooks */).useVisibleForumTags(parentChannel);
const ActionSheet = (require(6805) /* metro dependency 6805: ActionSheetNative */).ActionSheet;
const object2 = {onDismiss: onDismiss_85229};
const BottomSheetTitleHeader = (require(6758) /* metro dependency 6758: BottomSheetTitleHeaderNative */).BottomSheetTitleHeader;
object2.header = <BottomSheetTitleHeader title={r9} subtitle={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['+HS9+m'])} subtitleStyle={styles.subtitle} />;
const view = <View style={styles.tagsContainer}>{value7.map(_fun85230)}</View>;
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
return (
<ActionSheet {...object2}>
{view}
<View style={styles.saveButton}>
<Button
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['R3BPH+'])}
onPress={onPress_85231}
/>
</View>
</ActionSheet>
);
}
function toggleTag(a0) { // fn#85228, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11347:769, owner: ForumPostTagsActionSheet.toggleTag, offset: 0x01f681ba, size: 105 bytes, params: 2, frame: 13
if (a0 != null) {
var Set = global.Set;
var set = new Set(env0_4);
if (set.has(a0)) {
set.delete(a0);
env0_5(set);
return undefined;
}
if (env0_6) {
return undefined;
}
set.add(a0);
env0_5(set);
}
}
function ForumPostTagsActionSheetOnDismiss() { // fn#85229, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11347:899, owner: ForumPostTagsActionSheet.onDismiss, offset: 0x01f68223, size: 30 bytes, params: 1, frame: 11
return onClose?.();
}
function _fun85230(a0) { // fn#85230, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11347:1101, offset: 0x01f68241, size: 109 bytes, params: 2, frame: 20
const value2 = env0_4.has(a0);
const AvailableForumTag = importDefault(11162) /* metro dependency 11162: AvailableForumTag */;
const canManageThreadBinding = canManageThread;
return (
<AvailableForumTag
tag={a0}
disabled={canManageThreadBinding ? env0_6 && !value2 : !canManageThreadBinding}
onPress={toggleTag}
selected={value2}
key={a0.id}
/>
);
}
function ForumPostTagsActionSheetOnPress() { // fn#85231, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11347:1311, owner: ForumPostTagsActionSheet.onPress, offset: 0x01f682ae, size: 175 bytes, params: 1, frame: 15
var environment;
var value4;
var defaultImport;
var binding;
var items2;
const Array = global.Array;
const value3 = Array.from(env0_4).map(function(a0) {
return a0.id;
});
let onSaveBinding = onSave;
if (onSaveBinding != null) {
onSaveBinding = onSave;
binding = env0_4;
items2 = [];
arraySpread(items2, binding, 0, value3);
onSaveBinding(items2);
} else if (thread != null) {
value4 = environment.__proto__;
defaultImport = importDefault(9621) /* metro dependency 9621: ForumActionCreators */;
defaultImport.updateForumPostTags(thread.id, value3);
}
const value = environment.__proto__;
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
}
@@ -0,0 +1,39 @@
/* Metro module 11090; source: modules/forums/native/ForumTagContextMenu.tsx; dependencies: [33, 3829, 1244, 8772, 6797, 3856, 8811, 2] */
function _fun84910(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#84910, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11276:6, offset: 0x01f5be86, size: 116 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = (require(33) /* metro dependency 33 */).jsx;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/forums/native/ForumTagContextMenu.tsx');
exports.default = ForumTagContextMenu;
}
function ForumTagContextMenu({tagId, children}) { // fn#84911, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11276:199, offset: 0x01f5befa, size: 209 bytes, params: 2, frame: 20
const DeveloperMode = (require(3829) /* metro dependency 3829: UserSettings */).DeveloperMode;
const value2 = DeveloperMode.useSetting();
const object2 = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object2.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['8VG6IY']);
const IdIcon = (require(8772) /* metro dependency 8772: IdIcon */).IdIcon;
object2.IconComponent = IdIcon;
object2.action = action_84912;
const items2 = [object2];
const ContextMenu = (require(8811) /* metro dependency 8811: ContextMenuNative */).ContextMenu;
return (
<ContextMenu
triggerOnLongPress
items={items2}
enabled={value2}
>
{children}
</ContextMenu>
);
}
function ForumTagContextMenuAction() { // fn#84912, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11276:378, owner: ForumTagContextMenu.action, offset: 0x01f5bfcb, size: 67 bytes, params: 1, frame: 14
let value = environment.__proto__;
value = require(6797) /* metro dependency 6797: ClipboardUtilsNative */;
value.copy(tagId);
(require(3856) /* metro dependency 3856: ToastUtils */).presentIdCopied();
}
@@ -0,0 +1,164 @@
/* Metro module 12060; source: modules/forums/native/ForumTagFilterActionSheet.tsx; dependencies: [57, 31, 6540, 11547, 661, 33, 4501, 7155, 4594, 6805, 6758, 1244, 9067, 6277, 6231, 8950, 566, 6739, 1423, 2] */
function _fun92686(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#92686, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12246:6, offset: 0x02094ac6, size: 344 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
const emojiStore = importDefault(6540) /* metro dependency 6540: EmojiStore */;
let value = require(11547) /* metro dependency 11547: ForumChannelStore */;
const env0_6 = value.useForumChannelStore;
const env0_7 = value.useForumChannelStoreApi;
value = require(661) /* metro dependency 661: Constants */;
const env0_8 = value.AnalyticsObjects;
const env0_9 = value.AnalyticsPages;
const env0_10 = value.AnalyticsSections;
const env0_11 = (require(33) /* metro dependency 33 */).jsx;
const env0_12 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({emoji: {'height': 18,
'width': 18, 'marginRight': 4, 'display': 'flex', 'alignItems': 'center', 'justifyContent': 'center'},
imageEmoji: {'height': 18, 'width': 18}, textEmoji: {'fontSize': 14, 'lineHeight': 20}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/forums/native/ForumTagFilterActionSheet.tsx');
exports.default = ForumPostTagsActionSheet_92689;
}
function EmojiIcon({emojiId, emojiName}) { // fn#92687, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12246:471, offset: 0x02094c1e, size: 237 bytes, params: 2, frame: 22
var r6;
var value;
const styles = useStyles();
const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStores([EmojiStore], _fun92688);
const Emoji = importDefault(6739) /* metro dependency 6739: Emoji */;
if (value3 != null) {
value = importDefault(1423) /* metro dependency 1423: AvatarUtils */;
value = value.getEmojiURL({id: value3.id, animated: value3.animated, size: 18});
r6 = value;
} else {
r6 = undefined;
}
return (
<Emoji
style={styles.emoji}
textEmojiStyle={styles.textEmoji}
fastImageStyle={styles.imageEmoji}
src={r6}
name={emojiName ?? ''}
/>
);
}
function ForumPostTagsActionSheet_92689({channel}) { // fn#92689, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12246:892, offset: 0x02094d33, size: 580 bytes, params: 2, frame: 28
const tagFilter = useForumChannelStore(channel.id).tagFilter;
const env0_1 = useForumChannelStoreApi();
const binding = env0_4;
const useState = binding.useState;
const Set = global.Set;
const value2 = Object.create(Set.prototype, {constructor: {value: Set}});
const set = new Set(tagFilter);
const value5 = env0_3(Reflect.apply(useState, binding, [set instanceof Object ? set : value2]), 2);
const property = value5[0];
var env0_3 = value5[1];
(require(4594) /* metro dependency 4594: useMountEffect */).useUnmountEffect(_fun92690);
const ActionSheet = (require(6805) /* metro dependency 6805: ActionSheetNative */).ActionSheet;
const object3 = {scrollable: true};
const BottomSheetTitleHeader = (require(6758) /* metro dependency 6758: BottomSheetTitleHeaderNative */).BottomSheetTitleHeader;
const object5 = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const TdqRTh = (require(1244) /* metro dependency 1244: indexNative */).t.TdqRTh;
object5.title = Reflect.apply(string, intl, [TdqRTh]);
object5.subtitle = property.size > 0 ? intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t['/FzHJK'],
{count: property.size}) : ' ';
const ActionSheetHeaderPressableText = (require(9067) /* metro dependency 9067: ActionSheetHeaderPressableTextNative */).ActionSheetHeaderPressableText;
const object6 = {onPress: onPress_92691};
string = intl.string;
const VkKicb = (require(1244) /* metro dependency 1244: indexNative */).t.VkKicb;
object6.label = Reflect.apply(string, intl, [VkKicb]);
object5.leading = <ActionSheetHeaderPressableText {...object6} />;
object3.header = <BottomSheetTitleHeader {...object5} />;
const BottomSheetScrollView = (require(6277) /* metro dependency 6277 */).BottomSheetScrollView;
const TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
return (
<ActionSheet {...object3}>
<BottomSheetScrollView>
<TableRowGroup hasIcons>
{channel.availableTags.map(_fun92692)}
</TableRowGroup>
</BottomSheetScrollView>
</ActionSheet>
);
}
function _fun92688() { // fn#92688, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12246:560, offset: 0x02094d0b, size: 40 bytes, params: 1, frame: 12
const emojiIdBinding = emojiId;
const value2 = null;
return value2 != emojiIdBinding ? EmojiStore.getUsableCustomEmojiById(emojiId) : value2;
}
function _fun92690() { // fn#92690, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12246:1050, offset: 0x02094f77, size: 46 bytes, params: 1, frame: 13
const state = env0_1.getState();
state.setTagFilter(channel.id, env0_2);
}
function ForumPostTagsActionSheet_92689OnPress() { // fn#92691, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12246:1369, owner: ForumPostTagsActionSheet_92689.onPress, offset: 0x02094fa5, size: 44 bytes, params: 1, frame: 11
const binding = env0_3;
const Set = global.Set;
binding(new Set());
}
function _fun92692(a0) { // fn#92692, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12246:1556, offset: 0x02094fd1, size: 213 bytes, params: 2, frame: 22
const env0_0 = a0;
const TableCheckboxRow = (require(8950) /* metro dependency 8950: TableCheckboxRowNative */).TableCheckboxRow;
const tableCheckboxRowProps = {icon: <EmojiIcon emojiId={a0.emojiId} emojiName={a0.emojiName} />, label: a0.name};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
tableCheckboxRowProps.accessibilityLabel = intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.tXXD6v,
{tagName: a0.name});
const binding = env0_2;
tableCheckboxRowProps.checked = binding.has(a0.id);
tableCheckboxRowProps.onPress = onPress_92693;
return <TableCheckboxRow {...tableCheckboxRowProps} key={a0.id} />;
}
function onPress_92693() { // fn#92693, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12246:1778, offset: 0x020950a6, size: 279 bytes, params: 1, frame: 19
var Set;
var binding2;
var set;
var has;
var id;
var value4;
var moduleValue;
var trackForumTagFilterClicked;
var object2;
var channelBinding;
const binding = env0_0;
if (binding != null) {
Set = global.Set;
value = environment.__proto__;
binding2 = env1_2;
set = new Set();
has = set.has;
id = binding.id;
if (Reflect.apply(has, set, [id])) {
set.delete(binding.id);
} else {
set.add(binding.id);
}
value4 = environment.__proto__.__proto__;
moduleValue = require(7155) /* metro dependency 7155: Tracking */;
trackForumTagFilterClicked = moduleValue.trackForumTagFilterClicked;
object2 = {};
channelBinding = channel;
object2.guildId = channelBinding.guild_id;
id = channelBinding.id;
object2.channelId = id;
id = binding.id;
object2.tagId = id;
object2.filterTagIds = global.Array.from(set);
has = set.has;
id = binding.id;
object2.added = !Reflect.apply(has, set, [id]);
object2.location = {page: AnalyticsPages.GUILD_CHANNEL, section: AnalyticsSections.FORUM_CHANNEL_HEADER,
object: AnalyticsObjects.CHANNEL_TAG};
Reflect.apply(trackForumTagFilterClicked, moduleValue, [object2]);
env1_3(set);
}
}
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,60 @@
/* Metro module 11021; source: modules/forums/native/composer/ForumComposerHeader.tsx; dependencies: [31, 27, 33, 4501, 697, 4805, 5278, 1244, 5312, 6698, 4573, 6686, 2] */
function _fun84410(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#84410, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11207:6, offset: 0x01f49033, size: 211 bytes, params: 8, frame: 18
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 env0_3 = value.StyleSheet;
const env0_4 = value.View;
value = require(33) /* metro dependency 33 */;
const env0_5 = value.jsx;
const env0_6 = value.jsxs;
const env0_7 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(_fun84411);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/forums/native/composer/ForumComposerHeader.tsx');
exports.default = ForumComposerHeader;
}
function _fun84411(a0) { // fn#84411, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11207:189, offset: 0x01f49106, size: 205 bytes, params: 2, frame: 17
const object2 = {};
object2.headerBar = {'height': null, 'flexDirection': 'row', 'alignItems': 'center', height: a0};
object2.headerBarContent = {'flexDirection': 'row', 'alignItems': 'center', 'flex': 1};
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object2.headerBarText = {marginHorizontal: PX_16};
const object3 = {};
copyDataProperties(object3, StyleSheet.absoluteFillObject, PX_16);
object3['height'] = StyleSheet.hairlineWidth;
const BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
object3['backgroundColor'] = BORDER_SUBTLE;
object3['top'] = undefined;
object2.headerBarSeparator = object3;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object2.button = {paddingHorizontal: PX_16};
return object2;
}
function ForumComposerHeader({height, title, channel, submitting, onClose, onGuidelinesPress}) { // fn#84412, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11207:555, offset: 0x01f491d3, size: 729 bytes, params: 2, frame: 34
const styles = useStyles(height);
const value3 = (importDefault(4805) /* metro dependency 4805: useChannelName */)(channel);
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const cpT0Cq = (require(1244) /* metro dependency 1244: indexNative */).t.cpT0Cq;
const XSmallIcon = (require(5312) /* metro dependency 5312: XSmallIcon */).XSmallIcon;
const items2 = [<PressableOpacity style={styles.button} accessibilityRole="button" accessibilityLabel={Reflect.apply(string,
intl, [cpT0Cq])} disabled={submitting} onPress={function() {
return onClose(false);
}}><XSmallIcon /></PressableOpacity>];
const ForumIcon = (require(6698) /* metro dependency 6698: ForumIcon */).ForumIcon;
const forumIcon = <ForumIcon size="sm" />;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
items2[1] = <View style={styles.headerBarContent}>{forumIcon}<View style={styles.headerBarText}><Text lineClamp={1} ellipsizeMode="tail" variant="text-md/semibold" color="mobile-text-heading-primary">{title !== '' ? title : intl.string((require(1244) /* metro dependency 1244: indexNative */).t['7EjFCk'])}</Text><Text variant="text-xs/medium" color="text-default">{value3}</Text></View></View>;
items2[2] = (channel == null ? undefined : channel.topic.length) > 0 ? <PressableOpacity accessibilityRole="button" accessibilityLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.yR6HwZ)} style={styles.button} onPress={onGuidelinesPress}>{((BookCheckIcon) => <BookCheckIcon />)((require(6686) /* metro dependency 6686: BookCheckIcon */).BookCheckIcon)}</PressableOpacity> : null;
items2[3] = <View style={styles.headerBarSeparator} />;
return (
<View style={styles.headerBar}>
{items2}
</View>
);
}
@@ -0,0 +1,234 @@
/* Metro module 11008; source: modules/forums/native/composer/ForumComposerModal.tsx; dependencies: [31, 27, 10738, 1379, 4645, 4644, 6865, 33, 4501, 697, 1848, 4496, 1244, 7165, 7879, 6771, 566, 9725, 11007, 1482, 1583, 21, 7155, 5286, 11009, 2] */
function _fun84274(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#84274, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11194:6, offset: 0x01f431ba, size: 338 bytes, params: 8, frame: 21
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_4 = (require(27) /* metro dependency 27 */).View;
const nativeMenuStore = importDefault(10738) /* metro dependency 10738: NativeMenuStore */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const draftStore = importDefault(4645) /* metro dependency 4645: DraftStore */;
const env0_8 = (require(4645) /* metro dependency 4645: DraftStore */).DraftType;
const uploadAttachmentStore = importDefault(4644) /* metro dependency 4644: UploadAttachmentStore */;
const forumPostMessagesStore = importDefault(6865) /* metro dependency 6865: ForumPostMessagesStore */;
const env0_11 = (require(33) /* metro dependency 33 */).jsx;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
const env0_12 = Reflect.apply(createStyles, createStylesModule, [{container: {flex: 1,
backgroundColor: BACKGROUND_BASE_LOW}}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/forums/native/composer/ForumComposerModal.tsx');
exports.default = ForumComposerModal;
}
function clearDraft_84275(a0) { // fn#84275, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11194:310, offset: 0x01f4330c, size: 109 bytes, params: 2, frame: 18
const defaultImport = importDefault(7165) /* metro dependency 7165: DraftActionCreators */;
let clearDraft = defaultImport.clearDraft;
const ThreadSettings = DraftType.ThreadSettings;
Reflect.apply(clearDraft, defaultImport, [a0, ThreadSettings]);
let value = defaultImport;
clearDraft = value.clearDraft;
let ChannelMessage = DraftType.ChannelMessage;
Reflect.apply(clearDraft, value, [a0, ChannelMessage]);
value = importDefault(7879) /* metro dependency 7879: UploadAttachmentActionCreators */;
const clearAll = value.clearAll;
ChannelMessage = DraftType.ChannelMessage;
Reflect.apply(clearAll, value, [a0, ChannelMessage]);
}
function ForumComposerModal({parentChannelId, threadId, messageId, isEdit, analyticsLocations}) { // fn#84276, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11194:531, offset: 0x01f43379, size: 556 bytes, params: 2, frame: 29
var r0;
let value = undefined;
isEdit = !(isEdit === value) && isEdit;
const styles = useStyles();
analyticsLocations = (importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */)(analyticsLocations).analyticsLocations;
const value4 = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], function() {
return ChannelStore.getChannel(parentChannelId);
}, [parentChannelId]);
const value5 = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], function() {
return ChannelStore.getChannel(threadId);
}, [threadId]);
const value6 = (importDefault(9725) /* metro dependency 9725: useGetThreadDraftSettings */)(parentChannelId);
const value7 = (require(566) /* metro dependency 566: flux */).useStateFromStores([ForumPostMessagesStore],
function() {
var threadIdBinding = threadId;
var value2 = null;
return value2 != threadIdBinding && value2 != messageId ? ForumPostMessagesStore.getMessage(threadId).firstMessage : value2;
});
const value8 = (require(566) /* metro dependency 566: flux */).useStateFromStores([NativeMenuStore], function() {
return NativeMenuStore.isOpen();
});
const closure = onClose_84281;
(require(5286) /* metro dependency 5286: useNavigatorBackPressHandlerNative */).useNavigatorBackPressHandler(function() {
onClose_84281(false);
return true;
});
if (value4 == null) {
r0 = null;
} else if (value4.isForumLikeChannel()) {
if (isEdit) {
if (isEdit) {
if (value7 == null) {
r0 = null;
} else {
const AnalyticsLocationProvider = (require(6771) /* metro dependency 6771: useAnalyticsLocations */).AnalyticsLocationProvider;
value = <AnalyticsLocationProvider value={analyticsLocations}><View style={styles.container} importantForAccessibility={value8 ? 'no-hide-descendants' : value}>{((Component) => <Component parentChannel={value4} thread={value5} message={value7} threadSettingsDraft={value6} onClose={closure} isEdit={isEdit} />)(importDefault(11009) /* metro dependency 11009: ForumComposer */)}</View></AnalyticsLocationProvider>;
r0 = value;
}
} else {
const AnalyticsLocationProvider2 = (require(6771) /* metro dependency 6771: useAnalyticsLocations */).AnalyticsLocationProvider;
value = <AnalyticsLocationProvider2 value={analyticsLocations}><View style={styles.container} importantForAccessibility={value8 ? 'no-hide-descendants' : value}>{((Component) => <Component parentChannel={value4} thread={value5} message={value7} threadSettingsDraft={value6} onClose={closure} isEdit={isEdit} />)(importDefault(11009) /* metro dependency 11009: ForumComposer */)}</View></AnalyticsLocationProvider2>;
r0 = value;
}
} else if (value6 == null) {
r0 = null;
} else if (isEdit) {
if (value7 == null) {
r0 = null;
} else {
const AnalyticsLocationProvider3 = (require(6771) /* metro dependency 6771: useAnalyticsLocations */).AnalyticsLocationProvider;
value = <AnalyticsLocationProvider3 value={analyticsLocations}><View style={styles.container} importantForAccessibility={value8 ? 'no-hide-descendants' : value}>{((Component) => <Component parentChannel={value4} thread={value5} message={value7} threadSettingsDraft={value6} onClose={closure} isEdit={isEdit} />)(importDefault(11009) /* metro dependency 11009: ForumComposer */)}</View></AnalyticsLocationProvider3>;
r0 = value;
}
} else {
const AnalyticsLocationProvider4 = (require(6771) /* metro dependency 6771: useAnalyticsLocations */).AnalyticsLocationProvider;
value = <AnalyticsLocationProvider4 value={analyticsLocations}><View style={styles.container} importantForAccessibility={value8 ? 'no-hide-descendants' : value}>{((Component) => <Component parentChannel={value4} thread={value5} message={value7} threadSettingsDraft={value6} onClose={closure} isEdit={isEdit} />)(importDefault(11009) /* metro dependency 11009: ForumComposer */)}</View></AnalyticsLocationProvider4>;
r0 = value;
}
} else {
r0 = null;
}
return r0;
}
function ForumComposerModalOnClose(a0) { // fn#84281, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11194:971, owner: ForumComposerModal.onClose, offset: 0x01f435f5, size: 704 bytes, params: 2, frame: 25
var environment;
var r9;
var value2;
var value3;
var moduleValue;
var setKeyboardType;
var object2;
var getDraft;
var parentChannelIdBinding;
var ChannelMessage;
var value4;
var threadSettings;
var getThreadDraftWithParentMessageId;
var defaultImport;
var getUploads;
var onConfirm;
var onCancel;
var show;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var value;
if (env0_4 != null) {
value2 = environment.__proto__;
if (a0) {
(require(11007) /* metro dependency 11007: ForumComposerModalActionCreators */).closeCreateForumPostModal();
clearDraft_84275(parentChannelId);
} else {
value3 = undefined;
moduleValue = require(1482) /* metro dependency 1482: KeyboardUIStoreNative */;
setKeyboardType = moduleValue.setKeyboardType;
object2 = {};
object2.type = (require(1583) /* metro dependency 1583: KeyboardTypes */).KeyboardTypes.SYSTEM;
Reflect.apply(setKeyboardType, moduleValue, [object2]);
getDraft = DraftStore.getDraft;
parentChannelIdBinding = parentChannelId;
ChannelMessage = DraftType.ChannelMessage;
value4 = Reflect.apply(getDraft, DraftStore, [parentChannelIdBinding, ChannelMessage]);
threadSettings = DraftStore.getThreadSettings(parentChannelIdBinding);
if (threadSettings != null) {
r9 = threadSettings;
} else {
getThreadDraftWithParentMessageId = DraftStore.getThreadDraftWithParentMessageId;
defaultImport = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
r9 = Reflect.apply(getThreadDraftWithParentMessageId, DraftStore,
[defaultImport.castChannelIdAsMessageId(parentChannelId)]);
}
getUploads = UploadAttachmentStore.getUploads;
parentChannelIdBinding = parentChannelId;
ChannelMessage = DraftType.ChannelMessage;
if (isEdit) {
(require(11007) /* metro dependency 11007: ForumComposerModalActionCreators */).closeCreateForumPostModal();
clearDraft_84275(parentChannelId);
} else if (value4.length > 0) {
object2 = {onConfirm: onConfirm_84282, onCancel: function() {
require(dependencyMap[18]).closeCreateForumPostModal();
clearDraft_84275(parentChannelId);
}};
onConfirm = object2.onConfirm;
onCancel = object2.onCancel;
value = importAll(1848) /* metro dependency 1848: KeyboardManagerUtils */;
value.dismissGlobalKeyboard();
value = importDefault(4496) /* metro dependency 4496: AlertActionCreators */;
show = value.show;
object2 = {};
object2.title = intl.string(t.Fz1512);
object2.body = intl.string(t.YBgepz);
object2.confirmText = intl.string(t.Rnli6C);
object2.cancelText = intl.string(t['3NnH6V']);
object2.onConfirm = onConfirm;
object2.onCancel = onCancel;
object2.hideActionSheet = true;
object2.isDismissable = true;
Reflect.apply(show, value, [object2]);
} else if (Reflect.apply(getUploads, UploadAttachmentStore, [parentChannelIdBinding,
ChannelMessage]).length > 0) {
object2 = {onConfirm: onConfirm_84282, onCancel: onCancel_84283};
onConfirm = object2.onConfirm;
onCancel = object2.onCancel;
value = importAll(1848) /* metro dependency 1848: KeyboardManagerUtils */;
value.dismissGlobalKeyboard();
value = importDefault(4496) /* metro dependency 4496: AlertActionCreators */;
show = value.show;
object2 = {};
object2.title = intl.string(t.Fz1512);
object2.body = intl.string(t.YBgepz);
object2.confirmText = intl.string(t.Rnli6C);
object2.cancelText = intl.string(t['3NnH6V']);
object2.onConfirm = onConfirm;
object2.onCancel = onCancel;
object2.hideActionSheet = true;
object2.isDismissable = true;
Reflect.apply(show, value, [object2]);
} else if (((r9 == null ? value3 : r9.name) ?? '').length > 0) {
object2 = {onConfirm: onConfirm_84282, onCancel: onCancel_84283};
onConfirm = object2.onConfirm;
onCancel = object2.onCancel;
value = importAll(1848) /* metro dependency 1848: KeyboardManagerUtils */;
value.dismissGlobalKeyboard();
value = importDefault(4496) /* metro dependency 4496: AlertActionCreators */;
show = value.show;
object2 = {};
object2.title = intl.string(t.Fz1512);
object2.body = intl.string(t.YBgepz);
object2.confirmText = intl.string(t.Rnli6C);
object2.cancelText = intl.string(t['3NnH6V']);
object2.onConfirm = onConfirm;
object2.onCancel = onCancel;
object2.hideActionSheet = true;
object2.isDismissable = true;
Reflect.apply(show, value, [object2]);
} else {
(require(11007) /* metro dependency 11007: ForumComposerModalActionCreators */).closeCreateForumPostModal();
clearDraft_84275(parentChannelId);
}
}
}
}
function onCloseOnConfirm() { // fn#84282, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11194:1728, owner: ForumComposerModal.onClose.onConfirm, offset: 0x01f438b5, size: 91 bytes, params: 1, frame: 16
const value = environment.__proto__.__proto__;
(require(7155) /* metro dependency 7155: Tracking */).maybeTrackForumNewPostDraftCreated({guildId: env1_4.guild_id,
channelId: env1_4.id});
(require(11007) /* metro dependency 11007: ForumComposerModalActionCreators */).closeCreateForumPostModal();
}
function onCloseOnCancel() { // fn#84283, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11194:1861, owner: ForumComposerModal.onClose.onCancel, offset: 0x01f43910, size: 53 bytes, params: 1, frame: 12
(require(11007) /* metro dependency 11007: ForumComposerModalActionCreators */).closeCreateForumPostModal();
clearDraft_84275(parentChannelId);
}
@@ -0,0 +1,31 @@
/* Metro module 11007; source: modules/forums/native/composer/ForumComposerModalActionCreators.tsx; dependencies: [7155, 5080, 11008, 1962, 2] */
function _fun84271(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#84271, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11193:6, offset: 0x01f43015, size: 116 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/forums/native/composer/ForumComposerModalActionCreators.tsx');
exports.openCreateForumPostModal = openCreateForumPostModal;
exports.closeCreateForumPostModal = closeCreateForumPostModal;
}
function openCreateForumPostModal(a0) { // fn#84272, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11193:246, offset: 0x01f43089, size: 217 bytes, params: 2, frame: 18
require(dependencyMap[0]).trackMobileForumComposerOpened({guildId: a0.guildId, channelId: a0.parentChannelId,
location: a0.analyticsLocationObject});
if (!(a0.isEdit != null && a0.isEdit)) {
require(dependencyMap[0]).trackForumCreateNewPostStarted({guildId: a0.guildId, channelId: a0.parentChannelId});
}
const defaultImport = importDefault(dependencyMap[1]);
const pushLazy = defaultImport.pushLazy;
let value = require(dependencyMap[3]);
value = value(dependencyMap[2], dependencyMap.paths);
Reflect.apply(pushLazy, defaultImport, [value, a0, 'create-forum-post']);
}
function closeCreateForumPostModal() { // fn#84273, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11193:560, offset: 0x01f43162, size: 88 bytes, params: 1, frame: 12
const value = a0;
if (!(value !== undefined ? value : false)) {
(require(7155) /* metro dependency 7155: Tracking */).trackMobileForumComposerDismissed();
}
(importDefault(5080) /* metro dependency 5080: ModalActionCreators */).popWithKey('create-forum-post');
}
@@ -0,0 +1,78 @@
/* Metro module 11015; source: modules/forums/native/composer/hooks/ExpressionPickerHandlers.tsx; dependencies: [31, 2] */
function _fun84385(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#84385, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11201:6, offset: 0x01f47d2a, size: 119 bytes, params: 8, frame: 17
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_0 = importAll(31) /* metro dependency 31 */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/forums/native/composer/hooks/ExpressionPickerHandlers.tsx');
exports.usePressEmojiHandler = usePressEmojiHandler;
exports.usePressGIFHandler = usePressGIFHandler;
}
function usePressEmojiHandler({selection, draftContent, handleTextChange, focusTextInput, setSelection}) { // fn#84386, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11201:228, offset: 0x01f47da1, size: 144 bytes, params: 2, frame: 18
const binding = selection;
const env0_5 = binding.useRef({selection: selection, draftContent: draftContent, handleTextChange: handleTextChange,
focusTextInput: focusTextInput, setSelection: setSelection});
binding.useEffect(_fun84387);
return binding.useCallback(_fun84388, []);
}
function usePressGIFHandler({selection, draftContent, handleTextChange, focusTextInput, setSelection}) { // fn#84389, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11201:994, offset: 0x01f47f89, size: 120 bytes, params: 2, frame: 18
return selection.useCallback(_fun84390, [draftContent, focusTextInput, handleTextChange, selection.end,
selection.start, setSelection]);
}
function _fun84387() { // fn#84387, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11201:455, offset: 0x01f47e31, size: 64 bytes, params: 1, frame: 4
env0_5.current = {selection: selection, draftContent: draftContent, handleTextChange: handleTextChange,
focusTextInput: focusTextInput, setSelection: setSelection};
}
function _fun84388(a0) { // fn#84388, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11201:568, offset: 0x01f47e71, size: 280 bytes, params: 2, frame: 21
var r9;
var length;
var surrogates;
const {selection, draftContent, handleTextChange, focusTextInput, setSelection} = env0_5.current;
const value = draftContent.substring(0, selection.start);
const value2 = draftContent.substring(selection.end ?? selection.start);
selection.start;
if (a0.id != null) {
r9 = a0.uniqueName == null ? a0.name : a0.uniqueName !== '' ? a0.uniqueName : a0.name;
handleTextChange(value + (':' + r9 + ': ') + value2);
length = (value + (':' + r9 + ': ')).length;
} else {
surrogates = a0.surrogates;
if (surrogates != null) {
surrogates = a0.surrogates;
handleTextChange(value + surrogates + value2);
surrogates = a0.surrogates;
length = (value + surrogates).length;
} else {
r9 = a0.uniqueName == null ? a0.name : a0.uniqueName !== '' ? a0.uniqueName : a0.name;
handleTextChange(value + (':' + r9 + ': ') + value2);
length = (value + (':' + r9 + ': ')).length;
}
}
setSelection({start: length, end: length});
focusTextInput();
}
function _fun84390({url}) { // fn#84390, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11201:1125, offset: 0x01f48001, size: 217 bytes, params: 2, frame: 18
var length;
const draftContentBinding = draftContent;
const substring = draftContentBinding.substring;
const selectionBinding = selection;
const value2 = Reflect.apply(substring, draftContentBinding, [0, selectionBinding.start]);
const value3 = draftContentBinding.substring(selectionBinding.end ?? selection.start);
selection.start;
const value4 = value2.endsWith(' ');
const handleTextChangeBinding = handleTextChange;
if (value4) {
handleTextChangeBinding(value2 + url + value3);
length = (value2 + url).length;
} else {
handleTextChangeBinding(value2 + (' ' + url) + value3);
length = (value2 + (' ' + url)).length;
}
setSelection({start: length, end: length});
focusTextInput();
}
@@ -0,0 +1,105 @@
/* Metro module 11019; source: modules/forums/native/composer/hooks/useBackspaceHandler.tsx; dependencies: [31, 2] */
function _fun84403(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#84403, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11205:6, offset: 0x01f48998, size: 124 bytes, params: 8, frame: 17
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_0 = importAll(31) /* metro dependency 31 */;
const env0_1 = RegExp('((\\ud83c[\\udde6-\\uddff]){2}|([#*0-9]\\u20e3)|(\\u00a9|\\u00ae|[\\u2000-\\u3300]|[\\ud83c-\\ud83e][\\ud000-\\udfff])((\\ud83c[\\udffb-\\udfff])?(\\ud83e[\\uddb0-\\uddb3])?(\\ufe0f?\\u200d([\\u2000-\\u3300]|[\\ud83c-\\ud83e][\\ud000-\\udfff])\\ufe0f?)?)*)',
'g');
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/forums/native/composer/hooks/useBackspaceHandler.tsx');
exports.useBackspaceHandler = useBackspaceHandler;
}
function useBackspaceHandler({selection, draftContent, handleTextChange}) { // fn#84404, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11205:457, offset: 0x01f48a14, size: 78 bytes, params: 2, frame: 16
return selection.useCallback(_fun84405, [selection, draftContent, handleTextChange]);
}
function _fun84405() { // fn#84405, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11205:557, offset: 0x01f48a62, size: 265 bytes, params: 1, frame: 21
var r3;
var r7;
var r0;
var value2;
var handleTextChangeBinding;
var draftContentBinding;
var substring;
var value3;
var binding;
var test;
var value4;
var value5;
let value = environment;
const {start, end} = selection;
reducibleJoin12: while (true) {
if (start === 0) {
break reducibleJoin12;
}
value2 = 1;
if (end == null) {
r3 = value2;
} else {
if (start !== end) {
handleTextChangeBinding = handleTextChange;
draftContentBinding = draftContent;
substring = draftContentBinding.substring;
value = Reflect.apply(substring, draftContentBinding, [0, start]);
substring = draftContentBinding.substring;
value += Reflect.apply(substring, draftContentBinding, [end]);
handleTextChangeBinding(value);
break reducibleJoin12;
}
r3 = value2;
}
reducibleLoop4: while (true) {
if (start >= r3) {
value3 = environment.__proto__;
binding = env1_1;
test = binding.test;
substring = draftContent.substring;
reducibleJoin6: while (true) {
if (Reflect.apply(test, binding, [Reflect.apply(substring, draftContentBinding, [start - r3,
start])])) {
if (start >= r3 + value2) {
binding = env1_1;
test = binding.test;
draftContentBinding = draftContent;
substring = draftContentBinding.substring;
if (Reflect.apply(test, binding, [Reflect.apply(substring, draftContentBinding,
[start - r3 - value2,
start])])) {
value5 = typeof r3 === 'bigint' ? r3 + 1n : +r3 + 1;
r7 = value5;
if (r7 <= 8) {
r3 = r7;
continue reducibleLoop4;
}
r0 = value2;
break reducibleLoop4;
}
r0 = r3;
break reducibleLoop4;
}
r0 = r3;
break reducibleLoop4;
}
break reducibleJoin6;
}
}
value4 = typeof r3 === 'bigint' ? r3 + 1n : +r3 + 1;
r7 = value4;
if (r7 <= 8) {
r3 = r7;
continue reducibleLoop4;
}
r0 = value2;
break reducibleLoop4;
}
handleTextChangeBinding = handleTextChange;
draftContentBinding = draftContent;
substring = draftContentBinding.substring;
value = Reflect.apply(substring, draftContentBinding, [0, start - r0]);
substring = draftContentBinding.substring;
value += Reflect.apply(substring, draftContentBinding, [start]);
handleTextChangeBinding(value);
break reducibleJoin12;
}
}
@@ -0,0 +1,59 @@
/* Metro module 11014; source: modules/forums/native/composer/hooks/useFocusHandlers.tsx; dependencies: [57, 31, 2] */
function _fun84381(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#84381, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11200:6, offset: 0x01f47b4f, size: 165 bytes, params: 8, frame: 18
var object2;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_0 = importDefault(57) /* metro dependency 57 */;
const env0_1 = importAll(31) /* metro dependency 31 */;
object2 = {TITLE: 0};
object2[0] = 'TITLE';
object2.CONTENT = 1;
object2[1] = 'CONTENT';
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/forums/native/composer/hooks/useFocusHandlers.tsx');
exports.PostComposerInputs = object2;
exports.useFocusHandlers = useFocusHandlers;
}
function useFocusHandlers({titleInput, contentInput}) { // fn#84382, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11200:323, offset: 0x01f47bf4, size: 122 bytes, params: 2, frame: 14
const binding = contentInput;
const useState = binding.useState;
const TITLE = env0_2.TITLE;
const value = titleInput(Reflect.apply(useState, binding, [TITLE]), 2);
return {setFocusedInput: value[1], focusLastInput: focusLastInput, blurLastInput: blurLastInput,
focusedInput: value[0]};
}
function focusLastInput() { // fn#84383, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11200:465, owner: useFocusHandlers.focusLastInput, offset: 0x01f47c6e, size: 94 bytes, params: 1, frame: 11
var current;
const binding = env0_2;
const TITLE = env1_2.TITLE;
if (TITLE === binding) {
current = titleInput.current;
if (current != null) {
current.focus();
}
} else if (env1_2.CONTENT === binding) {
current = contentInput.current;
if (current != null) {
current.focus();
}
}
}
function blurLastInput() { // fn#84384, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11200:600, owner: useFocusHandlers.blurLastInput, offset: 0x01f47ccc, size: 94 bytes, params: 1, frame: 11
var current;
const binding = env0_2;
const TITLE = env1_2.TITLE;
if (TITLE === binding) {
current = titleInput.current;
if (current != null) {
current.blur();
}
} else if (env1_2.CONTENT === binding) {
current = contentInput.current;
if (current != null) {
current.blur();
}
}
}
@@ -0,0 +1,37 @@
/* Metro module 11016; source: modules/forums/native/composer/hooks/usePressHorizontalAutocompleteItemHandler.tsx; dependencies: [31, 661, 11017, 2] */
function _fun84391(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#84391, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11202:6, offset: 0x01f480da, size: 209 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importAll(31) /* metro dependency 31 */;
const AutoCompleteResultTypes = (require(661) /* metro dependency 661: Constants */).AutoCompleteResultTypes;
const Set = global.Set;
const USER = AutoCompleteResultTypes.USER;
const ROLE = AutoCompleteResultTypes.ROLE;
const CHANNEL = AutoCompleteResultTypes.CHANNEL;
const EMOJI = AutoCompleteResultTypes.EMOJI;
const set = new Set([USER, ROLE, CHANNEL, EMOJI]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/forums/native/composer/hooks/usePressHorizontalAutocompleteItemHandler.tsx');
exports.usePressHorizontalAutocompleteItemHandler = usePressHorizontalAutocompleteItemHandler;
}
function usePressHorizontalAutocompleteItemHandler({draftContent, handleTextChange, setSelection, channel}) { // fn#84392, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11202:345, offset: 0x01f481ab, size: 91 bytes, params: 2, frame: 17
return setSelection.useCallback(_fun84393, [draftContent, handleTextChange, setSelection, channel]);
}
function _fun84393(a0, a1, {length}) { // fn#84393, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11202:480, offset: 0x01f48206, size: 246 bytes, params: 4, frame: 20
let value = environment.__proto__;
value = (require(11017) /* metro dependency 11017: AutocompleteUtils */).getAutocompleteResultText(a0, channel,
env1_3);
const draftContentBinding = draftContent;
const value3 = draftContentBinding.substring(0, a1);
const items = [];
arraySpread(items, value3, 0, undefined);
const value6 = items.reverse().join('').search(RegExp('\\s|\\r|\\n', ''));
let length = value3.length;
const value8 = value3.substring(0, length - value6);
handleTextChange(value8 + value + ' ' + draftContentBinding.substring(a1 + length + 1));
length = (value8 + value).length;
setSelection({start: length, end: length});
}
@@ -0,0 +1,166 @@
/* Metro module 11087; source: modules/forums/native/composer/horizontal_autocomplete/HorizontalAutocomplete.tsx; dependencies: [31, 27, 1938, 1867, 3793, 1878, 661, 33, 4501, 6597, 697, 4017, 4594, 4504, 1305, 4573, 3995, 566, 6794, 6795, 8366, 6647, 4805, 5475, 2] */
function _fun84889(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#84889, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11273:6, offset: 0x01f5ae43, size: 613 bytes, params: 8, frame: 28
var object2;
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.TouchableOpacity;
const env0_4 = value.View;
const guildRoleStore = importDefault(1938) /* metro dependency 1938: GuildRoleStore */;
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
const relationshipStore = importDefault(3793) /* metro dependency 3793: RelationshipStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
value = require(661) /* metro dependency 661: Constants */;
const env0_9 = value.ChannelTypes;
const Fonts = value.Fonts;
value = require(33) /* metro dependency 33 */;
const env0_10 = value.jsx;
const env0_11 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {emoji: {'width': 32, 'height': 32}};
object2.emojiImage = {resizeMode: 'contain'};
object2.emojiText = {'lineHeight': 32, 'fontSize': 27, 'textAlign': 'center'};
object2.emojiName = {marginLeft: 8};
const object3 = {};
const textStyles = importDefault(6597) /* metro dependency 6597: TextStyles */;
const PRIMARY_SEMIBOLD = Fonts.PRIMARY_SEMIBOLD;
const TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_DEFAULT;
copyDataProperties(object3, textStyles(PRIMARY_SEMIBOLD, TEXT_DEFAULT, 14), undefined);
object2.nickname = object3;
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object2.status = {backgroundColor: BACKGROUND_BASE_LOW};
const object5 = {'paddingHorizontal': 8, 'flex': 1, 'flexDirection': 'row', 'height': 56, 'alignItems': 'center'};
object5.borderRightWidth = StyleSheet.hairlineWidth;
const BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
object5.borderRightColor = BORDER_SUBTLE;
object2.horizontalAutocompleteOption = object5;
object2.roleIcon = {marginRight: 4};
object2.channelName = {marginLeft: 8};
const env0_12 = Reflect.apply(createStyles, value, [object2]);
object2 = {code: 'function HorizontalAutocompleteTsx1(){const{opacity}=this.__closure;return{opacity:opacity.get()};}'};
object2 = {User: User, Role: Role, Channel: Channel, Emoji: Emoji_84898};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/forums/native/composer/horizontal_autocomplete/HorizontalAutocomplete.tsx');
exports.default = object2;
}
function HorizontalAutocompleteOption({children, onPress}) { // fn#84890, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11273:918, offset: 0x01f5b0a8, size: 236 bytes, params: 2, frame: 22
const styles = useStyles();
const value2 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(0);
(importDefault(4594) /* metro dependency 4594: useMountEffect */)(_fun84891);
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
const closure = HorizontalAutocompleteOptionC;
closure.__closure = {opacity: value2};
closure.__workletHash = 14159604656069;
closure.__initData = env0_13;
const value3 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
const View = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
return (
<TouchableOpacity onPress={onPress}>
<View style={[styles.horizontalAutocompleteOption, value3]}>
{children}
</View>
</TouchableOpacity>
);
}
function User({user, nick, status, guildId, onPress}) { // fn#84893, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11273:1317, offset: 0x01f5b1cd, size: 417 bytes, params: 2, frame: 26
const styles = useStyles();
const Avatar = (require(1305) /* metro dependency 1305: native */).Avatar;
const avatarProps = {status: status, statusStyle: styles.status, user: user};
const AvatarSizes = (require(1305) /* metro dependency 1305: native */).AvatarSizes;
const SMALL = AvatarSizes.SMALL;
avatarProps.size = SMALL;
avatarProps.guildId = guildId;
avatarProps.animate = true;
const avatar = <Avatar {...avatarProps} />;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const text = <Text style={[styles.nickname]} variant="text-sm/semibold">{nick ?? (importDefault(3995) /* metro dependency 3995: UserUtils */).getName(user)}</Text>;
let value = importDefault(3995) /* metro dependency 3995: UserUtils */;
value = value.getUserTag(user, {decoration: 'never'});
return (
<HorizontalAutocompleteOption onPress={onPress}>
{avatar}
<View style={{'marginLeft': 8, 'height': 56, 'flex': 1, 'flexDirection': 'column',
'justifyContent': 'center'}}>
{text}
<Text variant="text-xs/medium" color="text-muted">
{'@'}
{value}
</Text>
</View>
</HorizontalAutocompleteOption>
);
}
function Role({onPress, guildId, name, id, colorString}) { // fn#84894, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11273:1895, offset: 0x01f5b36e, size: 417 bytes, params: 2, frame: 29
const styles = useStyles();
const role = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildRoleStore], function() {
return GuildRoleStore.getRole(guildId, id);
});
const r16 = role != null ? (require(6794) /* metro dependency 6794: RoleIconUtils */).getRoleIconData(role,
30) : null;
const r6 = r16 != null ? <View style={styles.roleIcon}>{((Component) => <Component name={name} source={r16.customIconSrc != null ? {uri: r16.customIconSrc} : undefined} unicodeEmoji={r16.unicodeEmoji} size={24} />)(importDefault(6795) /* metro dependency 6795: RoleIcon */)}</View> : null;
const LegacyText = (require(1305) /* metro dependency 1305: native */).LegacyText;
return (
<HorizontalAutocompleteOption onPress={onPress}>
{r6}
<LegacyText style={[styles.nickname, colorString != null ? {color: colorString} : undefined]}>
{'@' + name}
</LegacyText>
</HorizontalAutocompleteOption>
);
}
function Channel({channel, onPress}) { // fn#84896, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11273:2388, offset: 0x01f5b52f, size: 329 bytes, params: 2, frame: 22
const styles = useStyles();
const value2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildStore], function() {
return GuildStore.getGuild(channel.getGuildId());
}, [channel]);
const type = channel.type;
const GUILD_CATEGORY = ChannelTypes.GUILD_CATEGORY;
const r7 = type === GUILD_CATEGORY ? importDefault(8366) /* metro dependency 8366 */ : (require(6647) /* metro dependency 6647: ChannelUtils */).getChannelIconWithGuild(channel,
value2);
const Icon = (require(1305) /* metro dependency 1305: native */).Icon;
const icon = <Icon source={r7} />;
const useChannelNameModule = require(4805) /* metro dependency 4805: useChannelName */;
const channelName = useChannelNameModule.computeChannelName(channel, UserStore, RelationshipStore);
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<HorizontalAutocompleteOption onPress={onPress}>
{icon}
<Text style={styles.channelName} variant="text-sm/semibold">
{channelName}
</Text>
</HorizontalAutocompleteOption>
);
}
function Emoji_84898({name, url, surrogates, onPress}) { // fn#84898, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11273:2800, offset: 0x01f5b69d, size: 335 bytes, params: 2, frame: 21
const styles = useStyles();
const view = <View>{url !== '' ? ((Component) => <Component style={[styles.emoji,
styles.emojiImage]} source={{uri: url}} />)(importDefault(5475) /* metro dependency 5475: FastImage */) : ((LegacyText) => <LegacyText style={[styles.emoji,
styles.emojiText]} allowFontScaling={false}>{surrogates}</LegacyText>)((require(1305) /* metro dependency 1305: native */).LegacyText)}</View>;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<HorizontalAutocompleteOption onPress={onPress}>
{view}
<Text style={styles.emojiName} variant="text-sm/semibold">
{':' + name + ':'}
</Text>
</HorizontalAutocompleteOption>
);
}
function _fun84891() { // fn#84891, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11273:1029, offset: 0x01f5b194, size: 57 bytes, params: 1, frame: 14
const binding = env0_0;
const set = binding.set;
let value = environment.__proto__;
value = require(4504) /* metro dependency 4504: timing */;
Reflect.apply(set, binding, [value.withTiming(1)]);
}
@@ -0,0 +1,95 @@
/* Metro module 11083; source: modules/forums/native/composer/horizontal_autocomplete/HorizontalAutocompleteWrapper.tsx; dependencies: [31, 27, 661, 33, 11084, 11087, 4017, 4504, 2] */
function _fun84840(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#84840, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11269:6, offset: 0x01f597ba, size: 202 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(27) /* metro dependency 27 */).FlatList;
const env0_5 = (require(661) /* metro dependency 661: Constants */).AutoCompleteResultTypes;
const env0_6 = (require(33) /* metro dependency 33 */).jsx;
object = {code: 'function HorizontalAutocompleteWrapperTsx1(){const{withTiming,toValue}=this.__closure;return{opacity:withTiming(toValue)};}'};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/forums/native/composer/horizontal_autocomplete/HorizontalAutocompleteWrapper.tsx');
exports.default = HorizontalAutocompleteWrapper;
}
function HorizontalAutocompleteWrapper({style, channel, onPressAutocompleteItem, text, selection}) { // fn#84841, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11269:443, offset: 0x01f59884, size: 414 bytes, params: 2, frame: 24
const {results, autocompleteSelectionStart,
query} = (require(11084) /* metro dependency 11084: useHorizontalAutocompleteResults */).useHorizontalAutocompleteResults({channel: channel,
text: text, selection: selection});
const binding = query;
const value4 = binding.useCallback(_fun84843, [channel.guild_id, binding.useCallback(function(a0, a1) {
a0.stopPropagation();
onPressAutocompleteItem(a1, autocompleteSelectionStart ?? 0, query ?? '');
}, [onPressAutocompleteItem, autocompleteSelectionStart, query])]);
const r12 = results.length > 0 ? 1 : 0;
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
const closure = HorizontalAutocompleteWrapper_;
closure.__closure = {withTiming: (require(4504) /* metro dependency 4504: timing */).withTiming, toValue: r12};
closure.__workletHash = 7895652904738;
closure.__initData = env0_7;
const value7 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
const View = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
return (
<View style={[style, value7]}>
<FlatList
keyboardShouldPersistTaps="always"
horizontal
keyExtractor={function(a0, a1) {
return (0, global.String)(a1);
}}
data={results}
renderItem={value4}
/>
</View>
);
}
function _fun84843({item}) { // fn#84843, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11269:785, offset: 0x01f59a6a, size: 402 bytes, params: 2, frame: 18
const type = item.type;
const USER = AutoCompleteResultTypes.USER;
if (USER === type) {
const User = (importDefault(11087) /* metro dependency 11087: HorizontalAutocomplete */).User;
return (
<User
{...item}
{...{['guildId']: channel.guild_id}}
{...{['onPress']: onPress_84844}}
/>
);
}
const ROLE = AutoCompleteResultTypes.ROLE;
if (ROLE === type) {
const Role = (importDefault(11087) /* metro dependency 11087: HorizontalAutocomplete */).Role;
return (
<Role
{...item}
{...{['guildId']: channel.guild_id}}
{...{['onPress']: onPress_84845}}
/>
);
}
const CHANNEL = AutoCompleteResultTypes.CHANNEL;
if (CHANNEL === type) {
const Channel = (importDefault(11087) /* metro dependency 11087: HorizontalAutocomplete */).Channel;
return <Channel {...item} {...{['onPress']: onPress_84846}} />;
}
const EMOJI = AutoCompleteResultTypes.EMOJI;
if (EMOJI === type) {
const Emoji = (importDefault(11087) /* metro dependency 11087: HorizontalAutocomplete */).Emoji;
return <Emoji {...item} {...{['onPress']: onPress_84847}} />;
}
return null;
}
function HorizontalAutocompleteWrapper_() { // fn#84848, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11269:1186, owner: HorizontalAutocompleteWrapper._, offset: 0x01f59c17, size: 50 bytes, params: 1, frame: 12
const object2 = {};
const value = environment.__proto__;
object2.opacity = (require(4504) /* metro dependency 4504: timing */).withTiming(env0_5);
return object2;
}
function onPress_84844(a0) { // fn#84844, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11269:880, offset: 0x01f59bfc, size: 27 bytes, params: 2, frame: 13
return env1_4(a0, item);
}
@@ -0,0 +1,239 @@
/* Metro module 11084; source: modules/forums/native/composer/horizontal_autocomplete/hooks/useHorizontalAutocompleteResults.tsx; dependencies: [57, 31, 661, 11085, 676, 566, 2] */
function _fun84850(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#84850, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11270:6, offset: 0x01f59c5d, size: 165 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(57) /* metro dependency 57 */;
const env0_3 = importAll(31) /* metro dependency 31 */;
const constantsModule = require(661) /* metro dependency 661: Constants */;
const env0_4 = constantsModule.AutoCompleteResultTypes;
const env0_5 = constantsModule.ChannelTypes;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/forums/native/composer/horizontal_autocomplete/hooks/useHorizontalAutocompleteResults.tsx');
exports.useHorizontalAutocompleteResults = useHorizontalAutocompleteResults;
}
function useHorizontalAutocompleteResults({channel, selection, text}) { // fn#84851, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11270:337, offset: 0x01f59d02, size: 454 bytes, params: 2, frame: 23
const env0_2 = text;
const binding = env0_3;
let useState = binding.useState;
const value2 = Reflect.apply(useState, binding, [[]]);
const binding2 = env0_2;
let value = binding2(value2, 2);
const property = value[0];
const env0_4 = value[1];
let useMemo = binding.useMemo;
value = Reflect.apply(useMemo, binding, [_fun84852, [channel]]);
useState = binding.useState;
const value3 = binding2(Reflect.apply(useState, binding, [{text: text, selectionStart: selection.start,
selectionEnd: selection.end}]), 2);
const property2 = value3[0];
const text2 = property2.text;
const selectionStart = property2.selectionStart;
const selectionEnd = property2.selectionEnd;
const env0_9 = value3[1];
binding.useEffect(function() {
var env0_0 = global.setTimeout(_fun84854, 16);
return _fun84855;
}, [text, selection]);
const {autocompleteType, query, queryOptions, autocompleteSelectionStart} = binding.useMemo(_fun84856,
[selectionStart, selectionEnd, text2, value]);
const value5 = binding.useCallback(_fun84858, [autocompleteType, query, queryOptions, value]);
binding.useEffect(_fun84859, [autocompleteType, value5, value]);
binding.useEffect(_fun84862, [value5]);
useMemo = binding.useMemo;
return {results: Reflect.apply(useMemo, binding, [_fun84863, [property]]),
autocompleteSelectionStart: autocompleteSelectionStart, query: query};
}
function _fun84852() { // fn#84852, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11270:468, offset: 0x01f59ec8, size: 49 bytes, params: 1, frame: 14
const value = environment.__proto__;
return (require(11085) /* metro dependency 11085: AutocompleteOptions */).getAutocompleteOptions(channel, false,
false);
}
function _fun84853() { // fn#84853, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11270:664, offset: 0x01f59ef9, size: 41 bytes, params: 1, frame: 14
const env0_0 = global.setTimeout(_fun84854, 16);
return _fun84855;
}
function _fun84856() { // fn#84856, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11270:806, offset: 0x01f59f54, size: 367 bytes, params: 1, frame: 27
var environment;
var r0;
var r5;
var r12;
var r1;
var r3;
var r4;
var length;
var value2;
var value3;
var WHITESPACE_RE;
var test;
var value4;
var slice;
var value5;
var value6;
var toLowerCase;
var value7;
var Object;
var keys;
var value8;
var find;
var value9;
var value10;
var GUILD_FORUM;
var GUILD_MEDIA;
var GUILD_TEXT;
var GUILD_ANNOUNCEMENT;
const selectionStartBinding = selectionStart;
var env0_2;
let textBinding = text;
if (textBinding != null) {
textBinding = text;
length = textBinding.trim().length;
value2 = undefined;
value3 = environment.__proto__;
reducibleJoin9: while (true) {
if (length !== 0) {
r0 = value2;
r5 = value2;
r12 = selectionStartBinding;
reducibleLoop2: while (true) {
WHITESPACE_RE = (require(676) /* metro dependency 676: ConstantsIOS */).WHITESPACE_RE;
test = WHITESPACE_RE.test;
value4 = Reflect.apply(test, WHITESPACE_RE, [text[r12 - 1]]);
if (r12 !== 0) {
reducibleJoin4: while (true) {
if (value4) {
break reducibleJoin4;
}
value10 = typeof r12 === 'bigint' ? r12 - 1n : +r12 - 1;
env0_2 = value10;
if (value10 >= 0) {
r12 = value10;
continue reducibleLoop2;
}
r1 = value10;
r3 = r5;
r4 = r0;
break reducibleLoop2;
}
}
textBinding = text;
slice = textBinding.slice;
reducibleJoin6: while (true) {
if (selectionEnd == null) {
r1 = r12;
break reducibleJoin6;
}
r1 = selectionEnd;
break reducibleJoin6;
}
value5 = Reflect.apply(slice, textBinding, [r12, r1]);
var env0_0 = value5[0];
slice = value5.slice;
value6 = Reflect.apply(slice, value5, [1]);
toLowerCase = value6.toLowerCase;
value7 = Reflect.apply(toLowerCase, value6, []);
var env0_1 = value7;
Object = global.Object;
keys = Object.keys;
value8 = Reflect.apply(keys, Object, [env0_5]);
find = value8.find;
value9 = Reflect.apply(find, value8, [_fun84857]);
if (value9 != null) {
r1 = r12;
r3 = value9;
r4 = value7;
break reducibleLoop2;
}
r0 = value7;
r5 = value9;
value10 = typeof r12 === 'bigint' ? r12 - 1n : +r12 - 1;
env0_2 = value10;
if (value10 >= 0) {
r12 = value10;
continue reducibleLoop2;
}
r1 = value10;
r3 = r5;
r4 = r0;
break reducibleLoop2;
}
GUILD_FORUM = ChannelTypes.GUILD_FORUM;
GUILD_MEDIA = ChannelTypes.GUILD_MEDIA;
GUILD_TEXT = ChannelTypes.GUILD_TEXT;
GUILD_ANNOUNCEMENT = ChannelTypes.GUILD_ANNOUNCEMENT;
return {query: r4, autocompleteType: r3, autocompleteSelectionStart: r1,
queryOptions: {includeEmojiPremiumUpsell: false, channelTypes: [GUILD_FORUM, GUILD_MEDIA,
GUILD_TEXT,
GUILD_ANNOUNCEMENT]}};
}
break reducibleJoin9;
}
}
return {'query': null, 'autocompleteType': null, 'autocompleteSelectionStart': null};
}
function _fun84858(a0) { // fn#84858, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11270:1463, offset: 0x01f5a107, size: 89 bytes, params: 2, frame: 16
var binding;
var property;
if (autocompleteType == null) {
env0_4([]);
} else if (query != null) {
binding = env0_5;
property = binding[autocompleteType];
binding = env0_4;
binding(property.queryResults(query, queryOptions, a0));
} else {
env0_4([]);
}
}
function _fun84859() { // fn#84859, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11270:1568, offset: 0x01f5a160, size: 151 bytes, params: 1, frame: 15
var environment;
var value;
const autocompleteTypeBinding = autocompleteType;
const value2 = null;
const r4 = value2 != autocompleteTypeBinding ? value2 == env0_5 ? undefined : env0_5[autocompleteType].stores : value2;
if (value2 != r4) {
value = environment.__proto__;
new (require(566) /* metro dependency 566: flux */).BatchedStoreListener(r4,
_fun84860).attach('useHorizontalAutocompleteResults');
return _fun84861;
}
}
function _fun84862() { // fn#84862, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11270:1778, offset: 0x01f5a209, size: 18 bytes, params: 1, frame: 11
env0_13(true);
}
function _fun84863() { // fn#84863, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11270:1816, offset: 0x01f5a21b, size: 28 bytes, params: 1, frame: 11
return env0_3.filter(_fun84864);
}
function _fun84854() { // fn#84854, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11270:687, offset: 0x01f59f22, size: 50 bytes, params: 1, frame: 12
const binding = env1_9;
const selectionBinding = selection;
binding({text: text, selectionStart: selectionBinding.start, selectionEnd: selectionBinding.end});
}
function _fun84857(a0) { // fn#84857, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11270:1081, offset: 0x01f5a0c3, size: 68 bytes, params: 2, frame: 16
const value = environment.__proto__;
const property = env1_5[a0];
return env0_0 !== undefined && env0_1 !== undefined && property.matches(env0_0, env0_1, selectionStart);
}
function _fun84860() { // fn#84860, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11270:1674, offset: 0x01f5a1f7, size: 18 bytes, params: 1, frame: 11
return env1_13(false);
}
function _fun84864({type}) { // fn#84864, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11270:1830, offset: 0x01f5a237, size: 78 bytes, params: 2, frame: 4
const value = environment.__proto__.__proto__;
const USER = AutoCompleteResultTypes.USER;
let r0 = type === USER || type === AutoCompleteResultTypes.ROLE;
r0 = !r0 ? type === AutoCompleteResultTypes.CHANNEL : r0;
r0 = !r0 ? type === AutoCompleteResultTypes.EMOJI : r0;
return r0;
}
@@ -0,0 +1,27 @@
/* Metro module 9699; source: modules/forums/native/hooks/useCanSearchForumPostsByChannelId.tsx; dependencies: [1379, 3784, 661, 566, 2] */
function _fun76232(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#76232, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9885:6, offset: 0x01dc765d, size: 152 bytes, params: 8, frame: 19
let env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const permissionStore = importDefault(3784) /* metro dependency 3784: PermissionStore */;
const env0_4 = (require(661) /* metro dependency 661: Constants */).Permissions;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/forums/native/hooks/useCanSearchForumPostsByChannelId.tsx');
exports.useCanSearchForumPostsByChannelId = function(a0) {
var env0_0 = a0;
return require(dependencyMap[3]).useStateFromStores([ChannelStore, PermissionStore], _fun76234);
};
}
function useCanSearchForumPostsByChannelId(a0) { // fn#76233, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9885:273, offset: 0x01dc76f5, size: 74 bytes, params: 2, frame: 15
const env0_0 = a0;
return (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore, PermissionStore],
_fun76234);
}
function _fun76234() { // fn#76234, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9885:360, offset: 0x01dc773f, size: 61 bytes, params: 1, frame: 14
const value = environment.__proto__;
const channel = ChannelStore.getChannel(env0_0);
return channel != null && PermissionStore.can(Permissions.READ_MESSAGE_HISTORY, channel);
}
@@ -0,0 +1,23 @@
/* Metro module 9722; source: modules/forums/native/hooks/useIsForumChannelSearchActive.tsx; dependencies: [7156, 9699, 566, 2] */
function _fun76377(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#76377, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9908:6, offset: 0x01dcd3e6, size: 114 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const forumSearchStore = importDefault(7156) /* metro dependency 7156: ForumSearchStore */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/forums/native/hooks/useIsForumChannelSearchActive.tsx');
exports.useIsForumChannelSearchActive = useIsForumChannelSearchActive;
}
function useIsForumChannelSearchActive(a0) { // fn#76378, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9908:233, offset: 0x01dcd458, size: 107 bytes, params: 2, frame: 18
const env0_0 = a0;
const value2 = (require(9699) /* metro dependency 9699: useCanSearchForumPostsByChannelId */).useCanSearchForumPostsByChannelId(a0);
const fluxModule = require(566) /* metro dependency 566: flux */;
const useStateFromStores = fluxModule.useStateFromStores;
return value2 && Reflect.apply(useStateFromStores, fluxModule, [[ForumSearchStore], _fun76379, [a0]]) != null;
}
function _fun76379() { // fn#76379, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9908:360, offset: 0x01dcd4c3, size: 40 bytes, params: 1, frame: 12
const value2 = null;
return value2 != env0_0 ? ForumSearchStore.getSearchQuery(env0_0) : value2;
}
@@ -0,0 +1,256 @@
/* Metro module 11252; source: modules/forums/native/posts/AnimatedCounter.tsx; dependencies: [57, 31, 27, 33, 4501, 44, 4017, 4508, 4577, 4573, 4581, 11253, 2] */
function _fun86002(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#86002, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11438:6, offset: 0x01f83a51, size: 459 bytes, params: 8, frame: 23
var object2;
const env0_0 = require;
const getItemKey = function(a0) {
return '' + a0;
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
let value = importAll(31) /* metro dependency 31 */;
const value2 = require(27) /* metro dependency 27 */;
const env0_5 = value2.StyleSheet;
const env0_6 = value2.View;
const value3 = require(33) /* metro dependency 33 */;
const env0_7 = value3.jsx;
const env0_8 = value3.jsxs;
const env0_9 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({container: {'flex': 0,
'flexGrow': 0, 'flexShrink': 0, 'justifyContent': 'flex-start', 'alignItems': 'flex-start',
'overflow': 'hidden'}, hidden: {opacity: 0}});
object2 = {ABOVE: -1};
object2[-1] = 'ABOVE';
object2.NEUTRAL = 0;
object2[0] = 'NEUTRAL';
object2.BELOW = 1;
object2[1] = 'BELOW';
const ABOVE = object2.ABOVE;
const items2 = [ABOVE];
const NEUTRAL = object2.NEUTRAL;
items2[1] = NEUTRAL;
const BELOW = object2.BELOW;
items2[2] = BELOW;
const env0_12 = value.createContext(undefined);
object2 = {code: "function AnimatedCounterTsx1(){const{withSpring,interpolate,animationState,ANIMATION_INPUT,animationOutput,springConfig,state,TransitionStates,runOnJS,cleanUp}=this.__closure;return{transform:[{translateY:withSpring(interpolate(animationState.get(),ANIMATION_INPUT,animationOutput),springConfig,'respect-motion-settings',function(finished){if(finished&&state===TransitionStates.YEETED){runOnJS(cleanUp)();}})}]};}"};
object2 = {code: 'function AnimatedCounterTsx2(finished){const{state,TransitionStates,runOnJS,cleanUp}=this.__closure;if(finished&&state===TransitionStates.YEETED){runOnJS(cleanUp)();}}'};
value = value.memo(_fun86018);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/forums/native/posts/AnimatedCounter.tsx');
exports.default = value;
}
function getStartPosition({current, previous}) { // fn#86003, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11438:496, offset: 0x01f83c1c, size: 67 bytes, params: 2, frame: 3
return current > previous ? env0_10.BELOW : current < previous ? env0_10.ABOVE : env0_10.NEUTRAL;
}
function AnimatedCount({count, formatter, state, cleanUp, height, springConfig, textColor, textVariant, textStyle}) { // fn#86004, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11438:1195, offset: 0x01f83c5f, size: 605 bytes, params: 2, frame: 33
var object2;
const value2 = env0_4.useContext(env0_12);
var env0_4 = value2;
(importDefault(44) /* metro dependency 44 */)(value2 != null, '[AnimatedCount] Context should not be nullish.');
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useSharedValue = reanimatedRexportModule.useSharedValue;
const TransitionStates = (require(4508) /* metro dependency 4508: TransitionGroup */).TransitionStates;
const MOUNTED = TransitionStates.MOUNTED;
const value4 = Reflect.apply(useSharedValue, reanimatedRexportModule,
[state === MOUNTED ? env0_10.NEUTRAL : getStartPosition(value2)]);
const value5 = env0_4.useMemo(_fun86005, [height]);
const moduleValue2 = reanimatedRexportModule;
const useAnimatedStyle = moduleValue2.useAnimatedStyle;
const closure = AnimatedCountY;
object2 = {withSpring: (require(4577) /* metro dependency 4577: spring */).withSpring,
interpolate: reanimatedRexportModule.interpolate, animationState: value4, ANIMATION_INPUT: env0_11,
animationOutput: value5, springConfig: springConfig, state: state};
object2.TransitionStates = TransitionStates;
object2.runOnJS = reanimatedRexportModule.runOnJS;
object2.cleanUp = cleanUp;
closure.__closure = object2;
closure.__workletHash = 13513457118386;
closure.__initData = env0_13;
const value6 = Reflect.apply(useAnimatedStyle, moduleValue2, [closure]);
env0_4.useEffect(_fun86009, [value4, value2, state]);
const View = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
const items2 = [StyleSheet.absoluteFill, value6];
items2[2] = {height: height};
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<View style={items2}>
<Text
variant={textVariant}
color={textColor}
style={textStyle}
>
{formatter(count)}
</Text>
</View>
);
}
function AnimatedCounterTransitionGroup({count, formatter, textColor, textVariant, textStyle, springConfig}) { // fn#86011, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11438:2594, offset: 0x01f84101, size: 538 bytes, params: 2, frame: 31
const env0_3 = textVariant;
const env0_4 = textStyle;
const styles = useStyles();
let binding = env0_4;
let useState = binding.useState;
const value3 = env0_3(Reflect.apply(useState, binding, []), 2);
const property = value3[0];
const env0_7 = value3[1];
binding = env0_4;
useState = binding.useState;
const value5 = env0_3(Reflect.apply(useState, binding, [[count]]), 2);
const property2 = value5[0];
const env0_8 = value5[1];
const env0_9 = env0_4.useRef(property2);
const value6 = env0_4.useRef(count);
env0_4.useEffect(_fun86012, [count]);
const value7 = useAnimationContext(property2, value6);
const value8 = env0_4.useCallback(_fun86015, []);
const value9 = env0_4.useCallback(_fun86016, [formatter, property, springConfig, textColor, textStyle, textVariant]);
const Provider = env0_12.Provider;
const TransitionGroup = (require(4508) /* metro dependency 4508: TransitionGroup */).TransitionGroup;
const provider = <Provider value={value7}><TransitionGroup items={property2} renderItem={value9} getItemKey={getItemKey} /></Provider>;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<View style={styles.container}>
{provider}
<View style={styles.hidden} onLayout={value8}>
<Text
variant={textVariant}
color={textColor}
style={textStyle}
>
{formatter(count)}
</Text>
</View>
</View>
);
}
function BasicCounter({count, textStyle, textColor, textVariant, formatter}) { // fn#86017, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11438:3511, offset: 0x01f84449, size: 97 bytes, params: 2, frame: 18
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<Text
variant={textVariant}
color={textColor}
style={textStyle}
>
{formatter(count)}
</Text>
);
}
function _fun86018({count, springConfig, textStyle, animate, textColor, textVariant, formatter = require(dependencyMap[11]).defaultFormatter}) { // fn#86018, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11438:3673, offset: 0x01f844aa, size: 196 bytes, params: 2, frame: 21
animate = animate === undefined || animate;
textColor = textColor === undefined ? 'text-default' : textColor;
textVariant = textVariant === undefined ? 'text-sm/normal' : textVariant;
return animate ? <AnimatedCounterTransitionGroup count={count} formatter={formatter} springConfig={springConfig} textColor={textColor} textVariant={textVariant} textStyle={textStyle} /> : <BasicCounter count={count} formatter={formatter} textColor={textColor} textVariant={textVariant} textStyle={textStyle} />;
}
function _fun86005() { // fn#86005, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11438:1521, offset: 0x01f83ebc, size: 28 bytes, params: 1, frame: 11
return env1_11.map(_fun86006);
}
function AnimatedCountY() { // fn#86007, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11438:1700, owner: AnimatedCount.y, offset: 0x01f83f36, size: 226 bytes, params: 1, frame: 26
const springModule = require(4577) /* metro dependency 4577: spring */;
const withSpring = springModule.withSpring;
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const value4 = reanimatedRexportModule.interpolate(env0_5.get(), env1_11, env0_6);
const springConfigBinding = springConfig;
const closure = yT;
const object = {};
object.state = state;
const TransitionStates = (require(4508) /* metro dependency 4508: TransitionGroup */).TransitionStates;
object.TransitionStates = TransitionStates;
object.runOnJS = reanimatedRexportModule.runOnJS;
object.cleanUp = cleanUp;
closure.__closure = object;
closure.__workletHash = 10933954976568;
closure.__initData = env1_14;
return {transform: [{translateY: Reflect.apply(withSpring, springModule, [value4, springConfigBinding,
'respect-motion-settings', closure])}]};
}
function _fun86009() { // fn#86009, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11438:2345, offset: 0x01f84083, size: 99 bytes, params: 1, frame: 16
var r1;
var value;
const binding = env0_5;
const set = binding.set;
const stateBinding = state;
const TransitionStates = (require(4508) /* metro dependency 4508: TransitionGroup */).TransitionStates;
const YEETED = TransitionStates.YEETED;
if (stateBinding === YEETED) {
value = getStartPosition(env0_4);
value = -1 * value;
r1 = value;
} else {
r1 = env1_10.NEUTRAL;
}
Reflect.apply(set, binding, [r1]);
}
function _fun86012() { // fn#86012, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11438:2840, offset: 0x01f8431b, size: 67 bytes, params: 1, frame: 13
const binding = env0_10;
const binding2 = env0_9;
binding.current = binding2.current[0];
const countBinding = count;
binding2.current = [countBinding];
env0_8([countBinding]);
}
function useAnimationContext(a0, a1) { // fn#86013, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11438:2902, owner: AnimatedCounterTransitionGroup.useAnimationContext, offset: 0x01f8435e, size: 55 bytes, params: 3, frame: 15
const env0_0 = a0;
const env0_1 = a1;
return env1_4.useMemo(_fun86014, [a0, a1]);
}
function _fun86016(a0, a1, a2, a3) { // fn#86016, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11438:3083, offset: 0x01f843b8, size: 145 bytes, params: 5, frame: 17
return (
<AnimatedCount
formatter={formatter}
springConfig={springConfig ?? (require(4581) /* metro dependency 4581: springPresets */).springStandard}
count={a1}
state={a2}
cleanUp={a3}
height={env0_6}
textColor={textColor}
textVariant={textVariant}
textStyle={textStyle}
key={a0}
/>
);
}
function _fun86006(a0) { // fn#86006, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11438:1532, offset: 0x01f83ed8, size: 94 bytes, params: 2, frame: 7
const value = environment.__proto__;
const heightBinding = height;
const value2 = 0;
return heightBinding != null ? env2_10.ABOVE === a0 ? -1 * height : env2_10.BELOW === a0 ? height : env2_10.NEUTRAL !== a0 ? undefined : value2 : value2;
}
function yT(a0) { // fn#86008, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11438:1818, owner: AnimatedCount.y.t, offset: 0x01f84018, size: 107 bytes, params: 2, frame: 13
var r0;
var stateBinding;
var runOnJS;
var value2;
let value = a0;
if (value) {
value = environment.__proto__;
stateBinding = state;
value = environment.__proto__.__proto__;
value = stateBinding === (require(4508) /* metro dependency 4508: TransitionGroup */).TransitionStates.YEETED;
r0 = value;
} else {
r0 = value;
}
if (r0) {
value = environment.__proto__.__proto__;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
runOnJS = value.runOnJS;
value2 = environment.__proto__;
Reflect.apply(runOnJS, value, [cleanUp])();
}
}
function _fun86014() { // fn#86014, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11438:2954, offset: 0x01f84395, size: 35 bytes, params: 1, frame: 4
return {current: env0_0[0], previous: require.current};
}
@@ -0,0 +1,10 @@
/* Metro module 11253; source: modules/forums/native/posts/AnimatedCounterUtils.tsx; dependencies: [2] */
function _fun86019(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#86019, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11439:6, offset: 0x01f8456e, size: 87 bytes, params: 8, frame: 15
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/forums/native/posts/AnimatedCounterUtils.tsx');
exports.defaultFormatter = function(a0) {
return '' + a0;
};
}
@@ -0,0 +1,94 @@
/* Metro module 11559; source: modules/forums/native/posts/ForumPostAppliedTags.tsx; dependencies: [31, 27, 33, 4501, 697, 11089, 2] */
function _fun88580(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#88580, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11745:6, offset: 0x01fe998b, size: 333 bytes, params: 8, frame: 22
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_2 = (require(27) /* metro dependency 27 */).View;
let value = require(33) /* metro dependency 33 */;
const env0_3 = value.jsx;
const env0_4 = value.jsxs;
const env0_5 = value.Fragment;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {pillTagsContainer: {'display': 'flex', 'flexDirection': 'row', 'alignItems': 'center'}};
const BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
object2.tag = {backgroundColor: BACKGROUND_SURFACE_HIGH};
object2.tagsContainer = {'display': 'flex', 'flexDirection': 'row', 'alignItems': 'center'};
const BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
object2.dot = {'backgroundColor': null, 'height': 4, 'width': 4, 'borderRadius': 10, 'marginHorizontal': 8,
backgroundColor: BORDER_SUBTLE};
const env0_6 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/forums/native/posts/ForumPostAppliedTags.tsx');
exports.ForumPostAppliedTagPills = ForumPostAppliedTagPills;
exports.ForumPostAppliedTags = ForumPostAppliedTags;
}
function ForumPostAppliedTagPills({appliedTags, hasUnreads, additionalTagsCount, containerStyle}) { // fn#88581, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11745:608, offset: 0x01fe9ad8, size: 237 bytes, params: 2, frame: 24
additionalTagsCount = additionalTagsCount === undefined ? 0 : additionalTagsCount;
const styles = useStyles();
return (
<View style={[containerStyle, styles.pillTagsContainer]}>
{appliedTags.map(_fun88582)}
{additionalTagsCount > 0 && ((AppliedForumTagPill) => <AppliedForumTagPill tag={{id: '-1',
name: '+' + additionalTagsCount}} containerStyle={styles.tag} hasUnreads={hasUnreads} />)((require(11089) /* metro dependency 11089: AppliedForumTag */).AppliedForumTagPill)}
</View>
);
}
function ForumPostAppliedTags({appliedTags, hasUnreads, additionalTagsCount, containerStyle}) { // fn#88583, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11745:991, offset: 0x01fe9c19, size: 288 bytes, params: 2, frame: 27
var r5;
var jsxRuntimeEnv0_5Binding;
var items3;
additionalTagsCount = additionalTagsCount === undefined ? 0 : additionalTagsCount;
const styles = useStyles();
const items2 = [containerStyle];
items2[1] = styles.tagsContainer;
const value2 = appliedTags.map(_fun88584);
const value3 = additionalTagsCount > 0;
if (value3) {
jsxRuntimeEnv0_5Binding = jsxRuntimeEnv0_5;
items3 = [<View style={styles.dot} />];
items3[1] = ((AppliedForumTag) => <AppliedForumTag tag={{id: '-1',
name: '+' + additionalTagsCount}} hasUnreads={hasUnreads} />)((require(11089) /* metro dependency 11089: AppliedForumTag */).AppliedForumTag);
r5 = <>{items3}</>;
} else {
r5 = value3;
}
return (
<View style={items2}>
{value2}
{r5}
</View>
);
}
function _fun88582(a0) { // fn#88582, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11745:782, offset: 0x01fe9bc5, size: 84 bytes, params: 2, frame: 17
const AppliedForumTagPill = (require(11089) /* metro dependency 11089: AppliedForumTag */).AppliedForumTagPill;
return (
<AppliedForumTagPill
tag={a0}
containerStyle={styles.tag}
hasUnreads={hasUnreads}
key={a0.id}
/>
);
}
function _fun88584(a0, a1) { // fn#88584, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11745:1157, offset: 0x01fe9d39, size: 158 bytes, params: 3, frame: 21
const value = environment.__proto__;
const jsxRuntimeEnv1_5Binding = jsxRuntimeEnv1_5;
const AppliedForumTag = (require(11089) /* metro dependency 11089: AppliedForumTag */).AppliedForumTag;
return (
<>
<AppliedForumTag
tag={a0}
hasUnreads={hasUnreads}
key={a0.id}
/>
{a1 !== appliedTags.length - 1 && <View style={styles.dot} />}
</>
);
}
@@ -0,0 +1,71 @@
/* Metro module 11567; source: modules/forums/native/posts/ForumPostContainer.tsx; dependencies: [31, 27, 33, 4501, 697, 8142, 4017, 11231, 1357, 6239, 2] */
function _fun88605(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#88605, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11753:6, offset: 0x01feb11d, size: 361 bytes, params: 8, frame: 23
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const value = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(27) /* metro dependency 27 */).View;
const env0_5 = (require(33) /* metro dependency 33 */).jsx;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
const object = {marginBottom: 12};
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object.backgroundColor = BACKGROUND_BASE_LOW;
object.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.md;
object.overflow = 'hidden';
const env0_6 = Reflect.apply(createStyles, createStylesModule, [{childContainer: {'position': 'relative',
'minHeight': 110, 'padding': 12}, card: {marginBottom: 12}, disabledContainer: object}]);
const createContext = value.createContext;
const reanimatedHelperTypesModule = require(8142) /* metro dependency 8142: ReanimatedHelperTypes */;
const env0_7 = Reflect.apply(createContext, value, [reanimatedHelperTypesModule.createFakeSharedValue(false)]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/forums/native/posts/ForumPostContainer.tsx');
exports.useForumPostContainerPressedIn = useForumPostContainerPressedIn;
exports.ForumPostPressableContainer = ForumPostPressableContainer;
exports.ForumPostDisabledContainer = ForumPostDisabledContainer;
}
function useForumPostContainerPressedIn() { // fn#88606, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11753:552, offset: 0x01feb286, size: 24 bytes, params: 1, frame: 11
return env0_3.useContext(env0_7);
}
function ForumPostPressableContainer({threadId, children, style}) { // fn#88607, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11753:648, offset: 0x01feb29e, size: 346 bytes, params: 2, frame: 26
const styles = useStyles();
const value2 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(false);
const {onPressIn, onPressOut} = env0_3.useMemo(function() {
return {onPressIn: _fun88609, onPressOut: _fun88610};
}, [value2]);
const {onTapPost,
onLongTapPost} = (importDefault(11231) /* metro dependency 11231: useNativeForumPostHandlers */)({threadId: threadId});
const r13 = (importDefault(1357) /* metro dependency 1357: MobileVisualRefreshExperiment */)('ForumPostContainer') ? 'surface-high' : 'secondary';
const Card = (require(6239) /* metro dependency 6239: CardNative */).Card;
const view = <View style={styles.card}><Card style={[styles.childContainer,
style]} variant={r13} accessibilityRole="button" onPress={onTapPost} onPressIn={onPressIn} onPressOut={onPressOut} onLongPress={onLongTapPost} unstable_pressDelay={130}>{children}</Card></View>;
const Provider = env0_7.Provider;
return (
<Provider value={value2}>
{view}
</Provider>
);
}
function ForumPostDisabledContainer({children, style}) { // fn#88611, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11753:1246, offset: 0x01feb440, size: 79 bytes, params: 2, frame: 17
const styles = useStyles();
return (
<View style={[styles.disabledContainer, style]} pointerEvents="none">
{children}
</View>
);
}
function _fun88608() { // fn#88608, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11753:770, offset: 0x01feb3f8, size: 30 bytes, params: 1, frame: 3
return {onPressIn: onPressIn_88609, onPressOut: onPressOut_88610};
}
function onPressIn_88609() { // fn#88609, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11753:786, offset: 0x01feb416, size: 21 bytes, params: 1, frame: 11
return env1_0.set(true);
}
function onPressOut_88610() { // fn#88610, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11753:811, offset: 0x01feb42b, size: 21 bytes, params: 1, frame: 11
return env1_0.set(false);
}
@@ -0,0 +1,294 @@
/* Metro module 11555; source: modules/forums/native/posts/ForumPostMedia.tsx; dependencies: [57, 31, 27, 1310, 1309, 33, 4501, 697, 5475, 4564, 11556, 4821, 11557, 477, 4840, 5278, 5263, 5074, 11558, 4002, 3829, 11231, 1477, 2] */
function _fun88553(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#88553, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11741:6, offset: 0x01fe7e21, size: 576 bytes, params: 8, frame: 24
var object3;
const env0_0 = require;
const closure = ForumPostMediaSpoiler;
const closure2 = useSharedMediaProps;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
const env0_5 = value.View;
const env0_6 = value.StyleSheet;
const env0_7 = value.ImageBackground;
const PixelRatio = value.PixelRatio;
const themeStore = importDefault(1310) /* metro dependency 1310: ThemeStore */;
const env0_9 = (require(1309) /* metro dependency 1309: FormConstants */).ANDROID_FOREGROUND_RIPPLE;
value = require(33) /* metro dependency 33 */;
const env0_10 = value.jsx;
const env0_11 = value.Fragment;
const env0_12 = value.jsxs;
let Math = global.Math;
let min = Math.min;
let get = PixelRatio.get;
const env0_13 = Reflect.apply(min, Math, [Reflect.apply(get, PixelRatio, []), 4]);
Math = global.Math;
min = Math.min;
get = PixelRatio.get;
const env0_14 = Reflect.apply(min, Math, [Reflect.apply(get, PixelRatio, []), 4]);
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object3 = {mediaContainer: {'position': 'relative', 'overflow': 'hidden'}};
const object4 = {};
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object3.thumbnailBorder = object4;
object3.thumbnail = {'height': 80, 'width': 80};
object3.spoilerIconContainer = {'position': 'absolute', 'top': 0, 'left': 0, 'right': 0, 'bottom': 0,
'justifyContent': 'center'};
const PRIMARY_300 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.PRIMARY_300;
object3.spoilerIcon = {color: PRIMARY_300, alignSelf: 'center'};
object3.gridMediaContainer = {'borderRadius': 2, 'overflow': 'hidden'};
const env0_15 = Reflect.apply(createStyles, value, [object3]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/forums/native/posts/ForumPostMedia.tsx');
exports.ForumPostMediaSpoiler = closure;
exports.useSharedMediaProps = closure2;
exports.ForumPostMediaThumbnail = ForumPostMediaThumbnail;
exports.ForumPostGridMedia = ForumPostGridMedia;
}
function ForumPostMediaAndroid({shouldSpoiler, blurTheme, source, androidStyle}) { // fn#88554, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11741:702, offset: 0x01fe8061, size: 108 bytes, params: 2, frame: 17
return (
<ImageBackground
style={androidStyle}
source={source}
blurRadius={shouldSpoiler ? 10 : 0}
resizeMode="cover"
>
<ForumPostMediaSpoiler shouldSpoiler={shouldSpoiler} blurTheme={blurTheme} />
</ImageBackground>
);
}
function ForumPostMediaIOS({shouldSpoiler, blurTheme, source, iosStyle}) { // fn#88555, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11741:920, offset: 0x01fe80cd, size: 139 bytes, params: 2, frame: 21
return (
<>
{((Component) => <Component style={iosStyle} source={source} resizeMode="cover" />)(importDefault(5475) /* metro dependency 5475: FastImage */)}
<ForumPostMediaSpoiler shouldSpoiler={shouldSpoiler} blurTheme={blurTheme} />
</>
);
}
function ForumPostMediaSpoiler({shouldSpoiler, blurTheme}) { // fn#88556, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11741:1127, offset: 0x01fe8158, size: 199 bytes, params: 2, frame: 23
var r0;
var jsxRuntimeEnv0_11Binding;
var items2;
var value;
const styles = useStyles();
if (shouldSpoiler) {
jsxRuntimeEnv0_11Binding = jsxRuntimeEnv0_11;
items2 = [((Component) => <Component blurTheme={blurTheme} style={StyleSheet.absoluteFill} />)(importDefault(4564) /* metro dependency 4564: VisualEffectView */)];
var viewBindingProps = {style: styles.spoilerIconContainer};
value = importDefault(11556) /* metro dependency 11556: SpoilerIcon */;
items2[1] = <View {...viewBindingProps}>{((Component) => <Component style={styles.spoilerIcon} height={30} width={30} />)(value)}</View>;
value = <>{items2}</>;
r0 = value;
} else {
r0 = null;
}
return r0;
}
function ForumPostMedia(a0) { // fn#88557, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11741:1375, offset: 0x01fe821f, size: 596 bytes, params: 2, frame: 24
var r0;
var AGE_VERIFICATION_OBSCURABLE_REASONS;
const env0_0 = a0;
const styles = useStyles();
const value2 = env0_4.useRef(null);
const value3 = (require(4821) /* metro dependency 4821: ExplicitMediaRedactionUtils */).useShouldAgeVerifyForReason(a0.obscureReason);
const r8 = a0.isMediaPost ? ((Component) => <Component {...a0} />)(importDefault(11557) /* metro dependency 11557: MediaPostGridThumbnail */) : (require(477) /* metro dependency 477: PlatformUtils */).isAndroid() ? <ForumPostMediaAndroid {...a0} /> : <ForumPostMediaIOS {...a0} />;
if (a0.obscureReason == null) {
r0 = a0.onPress != null ? <View style={[styles.mediaContainer,
a0.containerStyle]} ref={value2}>{((PressableOpacity) => <PressableOpacity androidRippleConfig={ANDROID_FOREGROUND_RIPPLE} activeOpacity={0.8} onPress={onPress_88559}>{r8}</PressableOpacity>)((require(5278) /* metro dependency 5278: Pressables */).PressableOpacity)}</View> : <View style={[styles.mediaContainer,
a0.containerStyle]} ref={value2}>{r8}</View>;
} else {
AGE_VERIFICATION_OBSCURABLE_REASONS = (require(4840) /* metro dependency 4840: ObscureMediaModels */).AGE_VERIFICATION_OBSCURABLE_REASONS;
r0 = AGE_VERIFICATION_OBSCURABLE_REASONS.has(a0.obscureReason) && value3 ? <View style={[styles.mediaContainer,
a0.containerStyle]} ref={value2}>{((PressableOpacity) => <PressableOpacity androidRippleConfig={ANDROID_FOREGROUND_RIPPLE} activeOpacity={0} onPress={function() {
var defaultImport = importDefault(dependencyMap[16]);
var object = {};
object.entryPoint = require(dependencyMap[17]).AgeVerificationModalEntryPoint.FORUM_POST_MEDIA_PREVIEW;
defaultImport.showAgeVerificationGetStartedModal(object);
}}>{r8}</PressableOpacity>)((require(5278) /* metro dependency 5278: Pressables */).PressableOpacity)}</View> : a0.onPress != null ? <View style={[styles.mediaContainer,
a0.containerStyle]} ref={value2}>{((PressableOpacity) => <PressableOpacity androidRippleConfig={ANDROID_FOREGROUND_RIPPLE} activeOpacity={0.8} onPress={onPress_88559}>{r8}</PressableOpacity>)((require(5278) /* metro dependency 5278: Pressables */).PressableOpacity)}</View> : <View style={[styles.mediaContainer,
a0.containerStyle]} ref={value2}>{r8}</View>;
}
return r0;
}
function useSharedMediaProps({channel, media}) { // fn#88560, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11741:2258, offset: 0x01fe84e7, size: 199 bytes, params: 2, frame: 18
var object2;
const messageAttachmentUtilsModule = require(11558) /* metro dependency 11558: MessageAttachmentUtils */;
const useShouldObscure = messageAttachmentUtilsModule.useShouldObscure;
const value3 = env0_3(Reflect.apply(useShouldObscure, messageAttachmentUtilsModule, [{media: media,
channel: channel}]), 2);
object2 = {shouldObscure: value3[0], obscureReason: value3[1]};
const sharedModule = require(4002) /* metro dependency 4002: shared */;
object2.blurTheme = sharedModule.isThemeDark(ThemeStore.theme) ? 'dark' : 'light';
const GifAutoPlay = (require(3829) /* metro dependency 3829: UserSettings */).GifAutoPlay;
object2.format = GifAutoPlay.useSetting() ? null : 'png';
return object2;
}
function ForumPostMediaThumbnail({channel, isLocalDeviceMedia, firstMessageId, media, isEmbed, embedLeftBorderColor, containerStyle}) { // fn#88561, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11741:2718, offset: 0x01fe85ae, size: 413 bytes, params: 2, frame: 27
const styles = useStyles();
const value2 = env0_4.useCallback(function(a0) {
onTapMedia({messageId: firstMessageId, mediaItems: [media], containerRef: a0});
}, [firstMessageId, media,
(importDefault(11231) /* metro dependency 11231: useNativeForumPostHandlers */)({threadId: channel.id}).onTapMedia]);
const {shouldObscure, obscureReason, blurTheme, format} = useSharedMediaProps({channel: channel, media: media});
var env0_4 = format;
const value4 = env0_4.useMemo(_fun88563, [format, isLocalDeviceMedia, media.height, media.src, media.width,
media.srcIsAnimated]);
return (
<ForumPostMedia
iosStyle={styles.thumbnail}
androidStyle={styles.thumbnail}
containerStyle={[styles.thumbnailBorder, isEmbed && ({borderLeftWidth: 2,
borderLeftColor: embedLeftBorderColor}), containerStyle]}
obscureReason={obscureReason}
shouldSpoiler={shouldObscure != null && shouldObscure}
blurTheme={blurTheme}
source={value4}
onPress={value2}
isMediaPost={channel.isMediaPost()}
/>
);
}
function ForumPostGridMedia({channel, media, targetWidth, targetHeight}) { // fn#88564, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11741:3629, offset: 0x01fe8842, size: 298 bytes, params: 2, frame: 25
const styles = useStyles();
const {shouldObscure, obscureReason, blurTheme, format} = useSharedMediaProps({channel: channel, media: media});
const isMediaPost2 = channel.isMediaPost();
const binding = isMediaPost2;
const useMemo = binding.useMemo;
return (
<ForumPostMedia
containerStyle={styles.gridMediaContainer}
iosStyle={{height: targetHeight, width: targetWidth}}
androidStyle={{height: targetHeight, width: targetWidth}}
shouldSpoiler={shouldObscure != null && shouldObscure}
obscureReason={obscureReason}
blurTheme={blurTheme}
source={Reflect.apply(useMemo, binding, [_fun88565, [media.src, media.width, media.height, targetWidth,
targetHeight, format, isMediaPost2]])}
isPortrait={media.height >= media.width}
isMediaPost={isMediaPost2}
/>
);
}
function ForumPostMediaOnPress_88559() { // fn#88559, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11741:2137, owner: ForumPostMedia.onPress, offset: 0x01fe84bc, size: 43 bytes, params: 1, frame: 12
return env0_0.onPress?.(env0_1);
}
function _fun88563() { // fn#88563, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11741:3105, offset: 0x01fe877e, size: 196 bytes, params: 1, frame: 20
var value2;
var moduleValue;
var getSrcWithWidthAndHeight;
var object3;
var mediaBinding;
var Math;
var ceil;
var binding;
const isLocalDeviceMediaBinding = isLocalDeviceMedia;
const object4 = {};
if (isLocalDeviceMediaBinding) {
object4.uri = media.src;
} else {
value2 = environment.__proto__;
moduleValue = require(1477) /* metro dependency 1477: ImageUtils */;
getSrcWithWidthAndHeight = moduleValue.getSrcWithWidthAndHeight;
object3 = {};
mediaBinding = media;
object3.src = mediaBinding.src;
object3.sourceWidth = mediaBinding.width;
object3.sourceHeight = mediaBinding.height;
Math = global.Math;
ceil = Math.ceil;
binding = env1_13;
object3.targetWidth = Reflect.apply(ceil, Math, [80 * binding]);
Math = global.Math;
object3.targetHeight = Math.ceil(80 * binding);
object3.format = format;
object3.animated = mediaBinding.srcIsAnimated;
object4.uri = Reflect.apply(getSrcWithWidthAndHeight, moduleValue, [object3]);
}
return object4;
}
function _fun88565() { // fn#88565, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11741:3852, offset: 0x01fe896c, size: 380 bytes, params: 1, frame: 21
var object4;
var getSrcWithWidthAndHeight;
var mediaBinding;
var width;
var height;
var Math;
var ceil;
var targetWidthBinding;
var binding;
var min;
var value3;
var value4;
var value5;
var value6;
var value7;
var moduleValue2;
var object5;
if (env0_4) {
Math = global.Math;
min = Math.min;
targetWidthBinding = targetWidth;
value3 = environment.__proto__;
binding = env1_14;
value4 = targetWidthBinding * binding;
mediaBinding = media;
width = mediaBinding.width;
value5 = value4 / width;
value6 = targetHeight * binding;
height = mediaBinding.height;
value7 = Reflect.apply(min, Math, [1, value5, value6 / height]);
object4 = {};
moduleValue2 = require(1477) /* metro dependency 1477: ImageUtils */;
getSrcWithWidthAndHeight = moduleValue2.getSrcWithWidthAndHeight;
object5 = {};
object5.src = mediaBinding.src;
width = mediaBinding.width;
object5.sourceWidth = width;
height = mediaBinding.height;
object5.sourceHeight = height;
Math = global.Math;
ceil = Math.ceil;
width = mediaBinding.width;
object5.targetWidth = Reflect.apply(ceil, Math, [width * value7]);
Math = global.Math;
ceil = Math.ceil;
height = mediaBinding.height;
object5.targetHeight = Reflect.apply(ceil, Math, [height * value7]);
object5.format = format;
object4.uri = Reflect.apply(getSrcWithWidthAndHeight, moduleValue2, [object5]);
} else {
object4 = {};
var moduleValue = require(1477) /* metro dependency 1477: ImageUtils */;
getSrcWithWidthAndHeight = moduleValue.getSrcWithWidthAndHeight;
var object6 = {};
mediaBinding = media;
object6.src = mediaBinding.src;
object6.sourceWidth = mediaBinding.width;
object6.sourceHeight = mediaBinding.height;
Math = global.Math;
ceil = Math.ceil;
targetWidthBinding = targetWidth;
binding = env1_14;
object6.targetWidth = Reflect.apply(ceil, Math, [targetWidthBinding * binding]);
Math = global.Math;
object6.targetHeight = Math.ceil(targetHeight * binding);
object6.format = format;
object4.uri = Reflect.apply(getSrcWithWidthAndHeight, moduleValue, [object6]);
}
return object4;
}
@@ -0,0 +1,148 @@
/* Metro module 11570; source: modules/forums/native/posts/ForumPostMessageContent.tsx; dependencies: [57, 31, 27, 33, 4501, 11571, 4584, 8518, 4573, 2] */
function _fun88616(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#88616, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11756:6, offset: 0x01febb0d, size: 212 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
const env0_5 = (require(27) /* metro dependency 27 */).View;
const env0_6 = (require(33) /* metro dependency 33 */).jsx;
const env0_7 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(function(a0, a1) {
return {text: {alignSelf: 'flex-start'}, container: {'flexWrap': 'wrap', 'flexDirection': 'row',
'alignSelf': 'flex-start', 'rowGap': null, 'maxHeight': null, 'overflow': 'hidden', rowGap: a1,
maxHeight: a0}};
});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/forums/native/posts/ForumPostMessageContent.tsx');
exports.default = ForumPostMessageContent;
}
function ForumPostMessageContent({messageContent, message, isMessageDeleted, hasUnreads, messageLoaded, lineClamp, rowGap, senderModifier}) { // fn#88618, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11756:421, offset: 0x01febc1a, size: 557 bytes, params: 2, frame: 25
var r0;
var Text;
lineClamp = lineClamp === undefined ? 2 : lineClamp;
rowGap = rowGap === undefined ? 3 : rowGap;
var value;
const value2 = (importDefault(11571) /* metro dependency 11571: useNativeForumPostContent */)({message: message,
messageLoaded: messageLoaded, messageContent: messageContent, isMessageDeleted: isMessageDeleted,
senderModifier: senderModifier});
const content = value2.content;
const style = value2.style;
const env0_3 = style;
const variant = value2.variant;
const env0_4 = variant;
let binding = env0_4;
const [property, env0_6] = env0_3(binding.useState(), 2);
const styles = useStyles(property != null ? property * lineClamp : lineClamp * (require(8518) /* metro dependency 8518: useScaledTextLineHeightAndroid */).scaleTextLineHeight(variant,
(require(4584) /* metro dependency 4584: useFontScale */).useFontScale()), rowGap);
binding = env0_4;
if (binding.useMemo(_fun88619, [content])) {
r0 = <View style={styles.container}>{binding.useMemo(_fun88621, [content, variant, hasUnreads, style, styles,
lineClamp, property, binding.useCallback(_fun88620, [property])])}</View>;
} else {
Text = (require(4573) /* metro dependency 4573: Text */).Text;
value = 'text-muted';
value = <Text variant={variant} color={hasUnreads ? 'text-default' : value} lineClamp={lineClamp} ellipsizeMode="tail" style={[style,
styles.text]}>{content}</Text>;
r0 = value;
}
return r0;
}
function _fun88619() { // fn#88619, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11756:838, offset: 0x01febe47, size: 86 bytes, params: 1, frame: 13
return typeof content !== 'string' && content != null && (global.Array.isArray(content) || env1_4.isValidElement(content));
}
function _fun88620(a0) { // fn#88620, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11756:934, offset: 0x01febe9d, size: 71 bytes, params: 2, frame: 12
var lines;
var height;
if (env0_5 == null) {
lines = a0.nativeEvent.lines;
if (lines != null) {
if (lines.length > 0) {
height = lines[0].height;
if (height > 0) {
env0_6(height);
}
}
}
}
}
function _fun88621() { // fn#88621, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11756:1050, offset: 0x01febee4, size: 58 bytes, params: 1, frame: 12
const Array = global.Array;
const isArray2 = Array.isArray(content);
contentBinding = content;
return isArray2 ? contentBinding.map(_fun88622) : contentBinding;
}
function _fun88622(a0, a1) { // fn#88622, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11756:1078, offset: 0x01febf1e, size: 355 bytes, params: 3, frame: 19
var r0;
var object2;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
var value4;
let value = typeof a0;
if (value === 'string') {
value = environment.__proto__.__proto__;
value = undefined;
object2 = {};
value4 = environment.__proto__;
object2.variant = variant;
r0 = hasUnreads ? 'text-default' : 'text-muted';
object2.color = r0;
object2.style = [style, styles.text];
object2.lineClamp = lineClamp;
object2.ellipsizeMode = 'tail';
r0 = env1_5 == null ? env1_8 : value;
object2.onTextLayout = r0;
return (
<Text {...object2} key={'text-' + a1}>
{global.String(a0)}
</Text>
);
}
if (value === 'number') {
value = environment.__proto__.__proto__;
value = undefined;
object2 = {};
value4 = environment.__proto__;
object2.variant = variant;
r0 = hasUnreads ? 'text-default' : 'text-muted';
object2.color = r0;
object2.style = [style, styles.text];
object2.lineClamp = lineClamp;
object2.ellipsizeMode = 'tail';
r0 = env1_5 == null ? env1_8 : value;
object2.onTextLayout = r0;
return (
<Text {...object2} key={'text-' + a1}>
{global.String(a0)}
</Text>
);
}
if (value === 'boolean') {
value = environment.__proto__.__proto__;
value = undefined;
object2 = {};
value4 = environment.__proto__;
object2.variant = variant;
r0 = hasUnreads ? 'text-default' : 'text-muted';
object2.color = r0;
object2.style = [style, styles.text];
object2.lineClamp = lineClamp;
object2.ellipsizeMode = 'tail';
r0 = env1_5 == null ? env1_8 : value;
object2.onTextLayout = r0;
return (
<Text {...object2} key={'text-' + a1}>
{global.String(a0)}
</Text>
);
}
value = environment.__proto__.__proto__;
const binding = env2_4;
const r4 = binding.isValidElement(a0) && a0.key != null ? 'element-' + a0.key + '-' + a1 : 'element-' + a1;
const Fragment = env2_4.Fragment;
return <Fragment {...{children: a0}} key={r4} />;
}
@@ -0,0 +1,69 @@
/* Metro module 11564; source: modules/forums/native/posts/ForumPostMessageCount.tsx; dependencies: [31, 27, 33, 4501, 697, 477, 9619, 1244, 6682, 4573, 11252, 2] */
function _fun88593(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#88593, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11750:6, offset: 0x01fea443, size: 368 bytes, params: 8, frame: 26
var object4;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const value = 0;
importAll(dependencyMap[value]);
const env0_3 = (require(27) /* metro dependency 27 */).View;
const value2 = 2;
const value3 = require(dependencyMap[value2]);
const env0_4 = value3.jsx;
const env0_5 = value3.jsxs;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
object4 = {};
const object5 = {};
const ICON_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.ICON_MUTED;
object5.tintColor = ICON_MUTED;
object5.marginEnd = 4;
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
object5.marginTop = platformUtilsModule.isAndroid() ? value2 : value;
object4.iconRead = object5;
const object6 = {};
const INTERACTIVE_TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_TEXT_DEFAULT;
object6.tintColor = INTERACTIVE_TEXT_DEFAULT;
object6.marginEnd = 4;
const value6 = platformUtilsModule;
object6.marginTop = value6.isAndroid() ? value2 : value;
object4.iconUnread = object6;
object4.messageUnreadCount = {marginStart: 4};
object4.container = {'flexDirection': 'row', 'alignItems': 'center'};
const env0_6 = Reflect.apply(createStyles, createStylesModule, [object4]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/forums/native/posts/ForumPostMessageCount.tsx');
exports.default = ForumPostMessageCount;
}
function ForumPostMessageCount({thread, hasUnreads, containerStyle}) { // fn#88594, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11750:559, offset: 0x01fea5b3, size: 576 bytes, params: 2, frame: 29
var r5;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
var value;
const styles = useStyles();
const {messageCountText, isMaxMessageCount, messageCount,
unreadCount} = (require(9619) /* metro dependency 9619: ForumHooks */).useMessageCount(thread);
const r12 = hasUnreads ? 'text-default' : 'text-muted';
const viewBindingProps = {style: [styles.container, containerStyle]};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
viewBindingProps.accessibilityLabel = intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t['8M0DrB'],
{count: messageCountText});
const ChatIcon = (require(6682) /* metro dependency 6682: ChatIcon */).ChatIcon;
const items2 = [<ChatIcon size="xs" style={hasUnreads ? styles.iconUnread : styles.iconRead} color={hasUnreads ? 'interactive-text-default' : 'icon-muted'} />];
items2[1] = isMaxMessageCount ? <Text variant="text-sm/semibold" color={r12}>{messageCountText}</Text> : ((Component) => <Component count={messageCount} textVariant="text-sm/semibold" textColor={r12} animate={false} />)(importDefault(11252) /* metro dependency 11252: AnimatedCounter */);
const value10 = unreadCount != null;
if (value10) {
var textProps = {'variant': 'text-sm/semibold', 'color': 'text-brand', style: styles.messageUnreadCount};
value = intl.format((require(1244) /* metro dependency 1244: indexNative */).t.z3PEth, {count: unreadCount});
value = <Text {...textProps}>{'('}{value}{')'}</Text>;
r5 = value;
} else {
r5 = value10;
}
items2[2] = r5;
return (
<View {...viewBindingProps}>
{items2}
</View>
);
}
@@ -0,0 +1,28 @@
/* Metro module 11561; source: modules/forums/native/posts/ForumPostNewTag.tsx; dependencies: [31, 33, 4501, 697, 1305, 2] */
function _fun88587(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#88587, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11747:6, offset: 0x01fe9f5a, size: 200 bytes, params: 8, frame: 21
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_2 = (require(33) /* metro dependency 33 */).jsx;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
const BRAND_260 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.BRAND_260;
const env0_3 = Reflect.apply(createStyles, createStylesModule, [{container: {paddingVertical: 1,
backgroundColor: BRAND_260}}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/forums/native/posts/ForumPostNewTag.tsx');
exports.default = ForumPostNewTag;
}
function ForumPostNewTag({containerStyle}) { // fn#88588, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11747:316, offset: 0x01fea022, size: 97 bytes, params: 2, frame: 16
const styles = useStyles();
const NewTag = (require(1305) /* metro dependency 1305: native */).NewTag;
return (
<NewTag
containerStyle={[containerStyle, styles.container]}
variant="text-xs/bold"
color="button-outline-brand-border-active"
/>
);
}
@@ -0,0 +1,36 @@
/* Metro module 11549; source: modules/forums/native/posts/ForumPostPinIcon.tsx; dependencies: [31, 27, 33, 4501, 697, 1305, 11550, 2] */
function _fun88526(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#88526, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11735:6, offset: 0x01fe6aa1, size: 302 bytes, params: 8, frame: 22
var object3;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_3 = (require(27) /* metro dependency 27 */).View;
const env0_4 = (require(33) /* metro dependency 33 */).jsx;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
object3 = {};
const object4 = {'display': 'flex', 'flexDirection': 'row', 'alignItems': 'center', 'justifyContent': 'center',
'borderRadius': null, 'width': 23, 'height': 23, 'marginEnd': 4};
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
const BACKGROUND_BRAND = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BRAND;
object4.backgroundColor = BACKGROUND_BRAND;
object3.pin = object4;
const WHITE = (importDefault(697) /* metro dependency 697: native */).colors.WHITE;
object3.pinIcon = {'height': 14, 'width': 14, tintColor: WHITE};
const env0_5 = Reflect.apply(createStyles, createStylesModule, [object3]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/forums/native/posts/ForumPostPinIcon.tsx');
exports.default = ForumPostPinIcon;
}
function ForumPostPinIcon({containerStyle}) { // fn#88527, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11735:508, offset: 0x01fe6bcf, size: 129 bytes, params: 2, frame: 19
const styles = useStyles();
const items2 = [styles.pin, containerStyle];
const Icon = (require(1305) /* metro dependency 1305: native */).Icon;
return (
<View style={items2}>
<Icon source={importDefault(11550) /* metro dependency 11550 */} style={styles.pinIcon} />
</View>
);
}
@@ -0,0 +1,32 @@
/* Metro module 11560; source: modules/forums/native/posts/ForumPostTimestamp.tsx; dependencies: [31, 11547, 33, 4501, 9619, 4573, 2] */
function _fun88585(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#88585, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11746:6, offset: 0x01fe9dd7, size: 199 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_2 = (require(11547) /* metro dependency 11547: ForumChannelStore */).useForumChannelStore;
const env0_3 = (require(33) /* metro dependency 33 */).jsx;
const env0_4 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({text: {'lineHeight': 18,
'height': 18}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/forums/native/posts/ForumPostTimestamp.tsx');
exports.default = ForumPostTimestamp;
}
function ForumPostTimestamp({textStyle, thread, hasUnreads, format}) { // fn#88586, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11746:300, offset: 0x01fe9e9e, size: 188 bytes, params: 2, frame: 21
const styles = useStyles();
const value2 = (require(9619) /* metro dependency 9619: ForumHooks */).useLastActiveTimestamp(thread,
useForumChannelStore(thread.parent_id).sortOrder, format);
const r5 = hasUnreads ? 'text-default' : 'text-muted';
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<Text
lineClamp={1}
variant="text-xs/normal"
color={r5}
style={[textStyle, styles.text]}
>
{value2}
</Text>
);
}
@@ -0,0 +1,30 @@
/* Metro module 11562; source: modules/forums/native/posts/ForumPostTitle.tsx; dependencies: [31, 33, 4501, 4573, 2] */
function _fun88589(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#88589, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11748:6, offset: 0x01fea083, size: 172 bytes, params: 8, frame: 20
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_2 = (require(33) /* metro dependency 33 */).jsx;
const env0_3 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({title: {marginBottom: 6}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/forums/native/posts/ForumPostTitle.tsx');
exports.default = ForumPostTitle;
}
function ForumPostTitle({title, lineClamp, ellipsizeMode, hasUnreads, onTextLayout}) { // fn#88590, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11748:257, offset: 0x01fea12f, size: 139 bytes, params: 2, frame: 20
const styles = useStyles();
const r9 = hasUnreads ? 'mobile-text-heading-primary' : 'text-muted';
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<Text
variant="text-md/semibold"
color={r9}
lineClamp={lineClamp}
ellipsizeMode={ellipsizeMode}
style={styles.title}
onTextLayout={onTextLayout}
>
{title}
</Text>
);
}
@@ -0,0 +1,92 @@
/* Metro module 11565; source: modules/forums/native/posts/ForumPostTypingUsers.tsx; dependencies: [31, 27, 33, 4501, 697, 9619, 11566, 11567, 4017, 1305, 4573, 2] */
function _fun88595(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#88595, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11751:6, offset: 0x01fea7f3, size: 458 bytes, params: 8, frame: 23
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_3 = (require(27) /* metro dependency 27 */).View;
let value = require(33) /* metro dependency 33 */;
const env0_4 = value.jsx;
const env0_5 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {container: {'display': 'flex', 'flexDirection': 'row', 'alignItems': 'center', 'flex': 1}};
object2.lastTypingUser = {marginEnd: 0};
const object5 = {'marginEnd': -8, 'borderWidth': 2};
object5.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
object2.typingUser = object5;
const object6 = {'backgroundColor': null, 'paddingVertical': null, 'paddingLeft': 4, 'borderRadius': null,
'marginStart': -8, 'borderWidth': 4, 'marginEnd': 8, 'marginTop': -1, 'marginBottom': -1};
const BACKGROUND_BASE_LOWEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWEST;
object6.backgroundColor = BACKGROUND_BASE_LOWEST;
const PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object6.paddingVertical = PX_4;
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
object2.dots = object6;
object2.typingText = {flexShrink: 1};
const CARD_BACKGROUND_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.CARD_BACKGROUND_DEFAULT;
object2.borderColor = {color: CARD_BACKGROUND_DEFAULT};
const CARD_PRIMARY_PRESSED_BG = (importDefault(697) /* metro dependency 697: native */).colors.CARD_PRIMARY_PRESSED_BG;
object2.borderColorPressed = {color: CARD_PRIMARY_PRESSED_BG};
const env0_6 = Reflect.apply(createStyles, value, [object2]);
object2 = {code: 'function ForumPostTypingUsersTsx1(){const{forumPostPressedIn,borderColorPressed,borderColor}=this.__closure;return{borderColor:forumPostPressedIn.value?borderColorPressed:borderColor};}'};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/forums/native/posts/ForumPostTypingUsers.tsx');
exports.default = ForumPostTypingUsers;
}
function ForumPostTypingUsers({thread, typingUserIds, hasUnreads}) { // fn#88596, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11751:1003, offset: 0x01fea9bd, size: 546 bytes, params: 2, frame: 26
var r0;
var items2;
const styles = useStyles();
const value2 = (require(9619) /* metro dependency 9619: ForumHooks */).useFacepileUsers(thread, typingUserIds);
const defaultImport = importDefault(11566) /* metro dependency 11566: useTypingText */;
const object2 = {};
object2.channelId = thread.id;
object2.guildId = thread.getGuildId();
object2.typingUserIds = typingUserIds;
const value3 = defaultImport(object2);
const color = styles.borderColor.color;
const color2 = styles.borderColorPressed.color;
const value4 = (require(11567) /* metro dependency 11567: ForumPostContainer */).useForumPostContainerPressedIn();
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
const closure = ForumPostTypingUsers_;
closure.__closure = {forumPostPressedIn: value4, borderColorPressed: color2, borderColor: color};
closure.__workletHash = 6320844933544;
closure.__initData = env0_7;
if (thread.getGuildId() == null) {
r0 = null;
} else if (value2.length === 0) {
r0 = null;
} else {
var viewBindingProps = {style: styles.container};
items2 = [value2.map(_fun88598)];
items2[1] = ((View) => <View style={[styles.dots, Reflect.apply(useAnimatedStyle, reanimatedRexportModule,
[closure])]}>{((Ellipsis) => <Ellipsis />)((require(1305) /* metro dependency 1305: native */).Ellipsis)}</View>)((importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View);
items2[2] = ((Text) => <Text variant="text-sm/semibold" color={hasUnreads ? 'text-default' : 'text-muted'} style={styles.typingText} lineClamp={1}>{value3}</Text>)((require(4573) /* metro dependency 4573: Text */).Text);
r0 = <View {...viewBindingProps}>{items2}</View>;
}
return r0;
}
function ForumPostTypingUsers_() { // fn#88597, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11751:1310, owner: ForumPostTypingUsers._, offset: 0x01feabdf, size: 34 bytes, params: 1, frame: 4
return {borderColor: env0_4.value ? color : color};
}
function _fun88598(a0, a1) { // fn#88598, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11751:1583, offset: 0x01feac01, size: 212 bytes, params: 3, frame: 23
const View = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
const items2 = [styles.typingUser, env0_5];
items2[2] = a1 === env0_1.length - 1 && styles.lastTypingUser;
const Avatar = (require(1305) /* metro dependency 1305: native */).Avatar;
const avatarProps = {source: a0.getAvatarSource(env0_6)};
const AvatarSizes = (require(1305) /* metro dependency 1305: native */).AvatarSizes;
const SIZE_16 = AvatarSizes.SIZE_16;
avatarProps.size = SIZE_16;
return (
<View style={items2} key={a0.id}>
<Avatar {...avatarProps} />
</View>
);
}
@@ -0,0 +1,90 @@
/* Metro module 11551; source: modules/forums/native/posts/ForumPostUsername.tsx; dependencies: [31, 27, 4502, 11547, 33, 4501, 9619, 1389, 11335, 11552, 566, 8206, 1305, 4573, 2] */
function _fun88529(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#88529, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11737:6, offset: 0x01fe6c96, size: 317 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_3 = (require(27) /* metro dependency 27 */).View;
const accessibilityStore = importDefault(4502) /* metro dependency 4502: AccessibilityStore */;
const env0_5 = (require(11547) /* metro dependency 11547: ForumChannelStore */).useForumChannelStore;
const value = require(33) /* metro dependency 33 */;
const env0_6 = value.jsx;
const env0_7 = value.jsxs;
const env0_8 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({authorContainer: {'flexDirection': 'row',
'alignItems': 'center', 'justifyContent': 'center', 'marginEnd': 8}, roleDotContainer: {'alignItems': 'center',
'justifyContent': 'center', 'marginEnd': 2, 'marginBottom': 4}, authorName: {'overflow': 'hidden',
'flexWrap': 'nowrap'}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/forums/native/posts/ForumPostUsername.tsx');
exports.ForumPostAuthor = ForumPostAuthor;
exports.ForumPostMessageAuthor = ForumPostMessageAuthor;
}
function ForumPostUsername({thread, authorId, authorName, authorColor, authorColors, containerStyle, roleDotStyle, textStyle, suffix, hasUnreads}) { // fn#88530, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11737:446, offset: 0x01fe6dd3, size: 697 bytes, params: 2, frame: 34
var object3;
var items3;
const styles = useStyles();
let object4 = {thread: thread};
const layoutType = useForumChannelStore(object4.thread.parent_id).layoutType;
const ForumLayout = (require(1389) /* metro dependency 1389: ForumLayout */).ForumLayout;
const GRID = ForumLayout.GRID;
let r7 = layoutType !== GRID ? 158 : 72;
const value5 = (importDefault(11335) /* metro dependency 11335: useChatWidth */)();
const GRID_HORIZONTAL_PADDING = (require(11552) /* metro dependency 11552: ForumPostGridBody */).GRID_HORIZONTAL_PADDING;
const value6 = value5 - GRID_HORIZONTAL_PADDING - r7;
const roleStyle = (require(566) /* metro dependency 566: flux */).useStateFromStores([AccessibilityStore],
function() {
return AccessibilityStore.roleStyle;
});
const r14 = roleStyle !== 'username' ? {} : authorColor != null ? {color: authorColor} : {};
const r17 = hasUnreads ? {} : {opacity: 0.8};
const value7 = (require(8206) /* metro dependency 8206: EnhancedRoleColorUtils */).useProcessColorStringsArray(authorColors);
const enhancedRoleColorUtilsModule = require(8206) /* metro dependency 8206: EnhancedRoleColorUtils */;
const useIsRoleStyleAndRoleColorsEligibleForERC = enhancedRoleColorUtilsModule.useIsRoleStyleAndRoleColorsEligibleForERC;
const guild_id = thread.guild_id;
let r0 = authorId ?? undefined;
if (authorName == null) {
r0 = null;
} else {
object4 = {};
object3 = {maxWidth: value6};
copyDataProperties(object3, styles.authorContainer, roleStyle);
object4.style = [object3, r17, containerStyle];
object4.accessibilityRole = 'button';
r7 = roleStyle === 'dot' && authorColor != null;
r7 = r7 && <View style={[styles.roleDotContainer,
roleDotStyle]}>{((RoleDot) => <RoleDot size="small" color={authorColor} colors={authorColors} />)((require(1305) /* metro dependency 1305: native */).RoleDot)}</View>;
items3 = [r7];
items3[1] = ((Text) => <Text variant="text-sm/semibold" color="mobile-text-heading-primary" gradientColors={Reflect.apply(useIsRoleStyleAndRoleColorsEligibleForERC,
enhancedRoleColorUtilsModule, [guild_id, r0, roleStyle,
value7]) ? value7 : undefined} lineClamp={1} style={[r14, textStyle,
styles.authorName]}>{authorName}{suffix}</Text>)((require(4573) /* metro dependency 4573: Text */).Text);
r0 = <View {...object4}>{items3}</View>;
}
return r0;
}
function ForumPostAuthor({thread, hasUnreads, suffix, containerStyle, roleDotStyle, textStyle}) { // fn#88532, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11737:1517, offset: 0x01fe708c, size: 246 bytes, params: 2, frame: 25
const {user, author} = (require(9619) /* metro dependency 9619: ForumHooks */).useForumPostAuthor(thread);
return user == null ? null : <ForumPostUsername thread={thread} authorId={user?.id} authorName={author?.nick ?? user?.username} authorColor={author?.colorString} authorColors={author?.colorStrings} suffix={suffix} containerStyle={containerStyle} roleDotStyle={roleDotStyle} textStyle={textStyle} hasUnreads={hasUnreads} />;
}
function ForumPostMessageAuthor({thread, message, hasUnreads, suffix, containerStyle, roleDotStyle, textStyle}) { // fn#88533, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11737:2018, offset: 0x01fe7182, size: 188 bytes, params: 2, frame: 24
const {authorName, authorColor, authorColors,
user} = (require(9619) /* metro dependency 9619: ForumHooks */).useForumPostMessageAuthor(message, thread);
return (
<ForumPostUsername
thread={thread}
authorId={user?.id}
authorName={authorName}
authorColor={authorColor}
authorColors={authorColors}
suffix={suffix}
containerStyle={containerStyle}
roleDotStyle={roleDotStyle}
textStyle={textStyle}
hasUnreads={hasUnreads}
/>
);
}
@@ -0,0 +1,250 @@
/* Metro module 11552; source: modules/forums/native/posts/grid/ForumPostGridBody.tsx; dependencies: [57, 31, 27, 33, 4501, 697, 1305, 11553, 11554, 11158, 4573, 1478, 1360, 11555, 6863, 9587, 11559, 2] */
function _fun88534(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#88534, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11738:6, offset: 0x01fe723e, size: 683 bytes, params: 8, frame: 24
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
const env0_5 = (require(27) /* metro dependency 27 */).View;
let value = require(33) /* metro dependency 33 */;
const env0_6 = value.jsx;
const env0_7 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object = {};
const object3 = {'height': 20, 'width': 33, 'backgroundColor': 'black', 'borderRadius': null, 'resizeMode': 'cover'};
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
object.gifIcon = object3;
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object.container = {'position': 'relative', 'backgroundColor': null, 'height': 225,
backgroundColor: BACKGROUND_BASE_LOW};
object.wideAspectRatioContainer = {height: 192};
object.mediaIconContainer = {paddingLeft: 6};
object.headerLeftContainer = {'flexDirection': 'row', 'position': 'absolute', 'top': 4, 'left': 4};
object.footerLeftContainer = {'flexDirection': 'row', 'position': 'absolute', 'bottom': 4, 'left': 4,
'alignItems': 'center', 'justifyContent': 'flex-start'};
object.footerRightContainer = {'position': 'absolute', 'bottom': 4, 'right': 4, 'alignItems': 'center',
'justifyContent': 'flex-start'};
const BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
object.extraMediaCountContainer = {'flexDirection': 'row', 'alignItems': 'center', 'backgroundColor': null,
'height': 24, 'paddingHorizontal': 8, 'borderRadius': 20, backgroundColor: BACKGROUND_SURFACE_HIGH};
object.extraMediaCount = {marginLeft: 2};
const object4 = {'height': 225, 'flexDirection': 'row', 'borderRadius': null, 'overflow': 'hidden'};
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
object.grid = object4;
object.wideAspectRatioGrid = {height: 192};
object.column = {'flex': 1, 'flexDirection': 'column'};
object.columnSpacer = {'flex': 0, 'width': 2, 'height': '100%'};
object.rowSpacer = {'flex': 0, 'height': 2, 'width': '100%'};
const TEXT_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_SUBTLE;
object.icon = {color: TEXT_SUBTLE};
const env0_8 = Reflect.apply(createStyles, value, [object]);
object = [[0, 3], [1, 2]];
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/forums/native/posts/grid/ForumPostGridBody.tsx');
exports.default = ForumPostGridBody;
exports.GRID_HORIZONTAL_PADDING = 48;
}
function GIFIcon() { // fn#88535, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11738:1244, offset: 0x01fe74e9, size: 119 bytes, params: 1, frame: 18
const styles = useStyles();
const Icon = (require(1305) /* metro dependency 1305: native */).Icon;
const Icon2 = (require(1305) /* metro dependency 1305: native */).Icon;
const Sizes = Icon2.Sizes;
const CUSTOM = Sizes.CUSTOM;
return (
<Icon
size={CUSTOM}
source={importDefault(11553) /* metro dependency 11553 */}
disableColor
style={styles.gifIcon}
/>
);
}
function PlayIcon_88536() { // fn#88536, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11738:1376, offset: 0x01fe7560, size: 101 bytes, params: 1, frame: 17
const Icon = (require(1305) /* metro dependency 1305: native */).Icon;
const Icon2 = (require(1305) /* metro dependency 1305: native */).Icon;
const Sizes = Icon2.Sizes;
const SMALL_20 = Sizes.SMALL_20;
return (
<Icon
size={SMALL_20}
source={importDefault(11554) /* metro dependency 11554 */}
disableColor
/>
);
}
function ExtraMediaIcon({extraMediaCount}) { // fn#88537, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11738:1485, offset: 0x01fe75c5, size: 248 bytes, params: 2, frame: 24
const styles = useStyles();
const Icon = (require(1305) /* metro dependency 1305: native */).Icon;
const iconProps = {source: importDefault(11158) /* metro dependency 11158 */, color: styles.icon.color};
const Icon2 = (require(1305) /* metro dependency 1305: native */).Icon;
const Sizes = Icon2.Sizes;
const REFRESH_SMALL_16 = Sizes.REFRESH_SMALL_16;
iconProps.size = REFRESH_SMALL_16;
const icon = <Icon {...iconProps} />;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<View style={styles.extraMediaCountContainer}>
{icon}
<Text
style={styles.extraMediaCount}
lineClamp={1}
variant="text-xs/normal"
color="text-default"
>
{'+' + extraMediaCount}
</Text>
</View>
);
}
function MediaGridColumn({column, thread}) { // fn#88538, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11738:1829, offset: 0x01fe76bd, size: 123 bytes, params: 2, frame: 18
const styles = useStyles();
return (
<View style={styles.column}>
{column.filter((require(1360) /* metro dependency 1360: GlobalUtils */).isNotNullish).map(_fun88539)}
</View>
);
}
function ForumPostGridBody({thread, hasUnreads, media}) { // fn#88540, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11738:2255, offset: 0x01fe780b, size: 653 bytes, params: 2, frame: 31
var items4;
const styles = useStyles();
const value3 = env0_3((require(6863) /* metro dependency 6863: ForumTagHooks */).useSomeAppliedTags(thread, 2), 2);
const property = value3[0];
const property2 = value3[1];
const value4 = property.length > 0;
const Math = global.Math;
const value5 = Math.max(0, media.length - 4);
const isMediaPost2 = thread.isMediaPost();
const value6 = useMediaGridLayout(media, isMediaPost2);
const {containsVideo, containsGif} = env0_4.useMemo(_fun88549, [media]);
const items2 = [styles.container];
items2[1] = isMediaPost2 && styles.wideAspectRatioContainer;
const items3 = [<View style={[styles.grid,
isMediaPost2 && styles.wideAspectRatioGrid]}>{value6.map(_fun88550)}</View>];
items3[1] = value4 && <View style={styles.footerLeftContainer}>{((ForumPostAppliedTagPills) => <ForumPostAppliedTagPills appliedTags={property} additionalTagsCount={property2} hasUnreads={hasUnreads} />)((require(11559) /* metro dependency 11559: ForumPostAppliedTags */).ForumPostAppliedTagPills)}</View>;
let r6 = containsGif || containsVideo;
if (r6) {
var viewBinding4Props = {style: styles.headerLeftContainer};
items4 = [containsGif && <View style={styles.mediaIconContainer}><GIFIcon /></View>];
items4[1] = containsVideo && <View style={styles.mediaIconContainer}><PlayIcon_88536 /></View>;
r6 = <View {...viewBinding4Props}>{items4}</View>;
}
items3[2] = r6;
items3[3] = value5 !== 0 && <View style={styles.footerRightContainer}><ExtraMediaIcon extraMediaCount={value5} /></View>;
return (
<View style={items2}>
{items3}
</View>
);
}
function _fun88539(a0, a1) { // fn#88539, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11738:1962, offset: 0x01fe7738, size: 211 bytes, params: 3, frame: 22
const Fragment = env1_4.Fragment;
const r1 = a1 > 0 && <View style={styles.rowSpacer} />;
const ForumPostGridMedia = (require(11555) /* metro dependency 11555: ForumPostMedia */).ForumPostGridMedia;
const threadBinding = thread;
return (
<Fragment key={'' + threadBinding.id + '-' + a1}>
{r1}
<ForumPostGridMedia
channel={threadBinding}
media={a0.media}
targetWidth={a0.targetWidth}
targetHeight={a0.targetHeight}
/>
</Fragment>
);
}
function useMediaGridLayout(a0, a1) { // fn#88541, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11738:2441, owner: ForumPostGridBody.useMediaGridLayout, offset: 0x01fe7a98, size: 128 bytes, params: 3, frame: 17
const env0_0 = a0;
const env0_1 = a1;
return env1_4.useMemo(_fun88546,
[(importDefault(1478) /* metro dependency 1478: useWindowDimensionsNative */)().width, env1_4.useMemo(_fun88542,
[a0]), a1]);
}
function _fun88549() { // fn#88549, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11738:2927, offset: 0x01fe7ccf, size: 45 bytes, params: 1, frame: 11
let value = environment.__proto__;
value = require(9587) /* metro dependency 9587: ForumPostMediaUtils */;
return value.messageContainsGifOrVideo(media);
}
function _fun88550(a0, a1) { // fn#88550, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11738:3142, offset: 0x01fe7cfc, size: 157 bytes, params: 3, frame: 21
const Fragment = env1_4.Fragment;
return (
<Fragment key={'' + a0 + '-' + a1}>
{a1 > 0 && <View style={styles.columnSpacer} />}
<MediaGridColumn column={a0} thread={thread} />
</Fragment>
);
}
function _fun88542() { // fn#88542, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11738:2510, offset: 0x01fe7b18, size: 92 bytes, params: 1, frame: 14
const Math = global.Math;
let value = Math.min(env0_0.length, 2);
value = env2_9.slice(0, value);
value = value.map(function(a0) {
return a0.map(_fun88544).filter(require(dependencyMap[12]).isNotNullish);
});
return value.filter(function(a0) {
return a0.length > 0;
});
}
function _fun88546() { // fn#88546, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11738:2668, offset: 0x01fe7bc5, size: 45 bytes, params: 1, frame: 12
const env0_0 = require ? 192 : 225;
return env0_3.map(_fun88547);
}
function _fun88543(a0) { // fn#88543, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11738:2567, offset: 0x01fe7b74, size: 65 bytes, params: 2, frame: 13
const value = a0.map(_fun88544);
return value.filter((require(1360) /* metro dependency 1360: GlobalUtils */).isNotNullish);
}
function _fun88547(a0) { // fn#88547, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11738:2703, offset: 0x01fe7bf2, size: 90 bytes, params: 2, frame: 14
let length = a0.filter((require(1360) /* metro dependency 1360: GlobalUtils */).isNotNullish).length;
length = env1_3.length;
return a0.map(_fun88548);
}
function _fun88544(a0) { // fn#88544, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11738:2577, offset: 0x01fe7bb5, size: 16 bytes, params: 2, frame: 2
return env2_0[a0];
}
function _fun88548(a0) { // fn#88548, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11738:2777, offset: 0x01fe7c4c, size: 131 bytes, params: 2, frame: 7
var r1;
var binding;
let value = environment.__proto__.__proto__;
const value2 = width - 48;
let lengthBinding = length;
const value5 = value2 / lengthBinding - 2 * (lengthBinding - 1) / lengthBinding;
const object2 = {media: a0, targetWidth: value5};
if (require) {
lengthBinding = length;
if (lengthBinding < 2) {
r1 = value5 / 1.7777777777777777;
} else {
value = environment.__proto__;
binding = env1_0;
lengthBinding = length;
value = binding / lengthBinding;
value -= 2 * (lengthBinding - 1) / lengthBinding;
r1 = value;
}
} else {
value = environment.__proto__;
binding = env1_0;
lengthBinding = length;
value = binding / lengthBinding;
value -= 2 * (lengthBinding - 1) / lengthBinding;
r1 = value;
}
object2.targetHeight = r1;
return object2;
}
@@ -0,0 +1,36 @@
/* Metro module 11563; source: modules/forums/native/posts/grid/ForumPostGridFooter.tsx; dependencies: [31, 27, 661, 33, 4501, 697, 11531, 11564, 11565, 11313, 2] */
function _fun88591(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#88591, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11749:6, offset: 0x01fea1ba, size: 295 bytes, params: 8, frame: 21
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_3 = (require(27) /* metro dependency 27 */).View;
const env0_4 = (require(661) /* metro dependency 661: Constants */).AnalyticsObjects;
let value = require(33) /* metro dependency 33 */;
const env0_5 = value.jsx;
const env0_6 = value.Fragment;
const env0_7 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
const BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
const env0_8 = Reflect.apply(createStyles, value, [{footer: {'display': 'flex', 'alignItems': 'center',
'flexDirection': 'row', 'justifyContent': 'flex-start', 'marginTop': 12}, dot: {'height': 4, 'width': 4,
'borderRadius': 2, 'backgroundColor': null, 'marginHorizontal': 8, backgroundColor: BORDER_SUBTLE}}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/forums/native/posts/grid/ForumPostGridFooter.tsx');
exports.default = ForumPostGridFooter;
}
function ForumPostGridFooter({thread, firstMessage, hasUnreads, parentChannel}) { // fn#88592, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11749:520, offset: 0x01fea2e1, size: 354 bytes, params: 2, frame: 29
const styles = useStyles();
const value2 = (require(11531) /* metro dependency 11531: useTypingUsersIds */).useTypingUserIds(thread.id);
const value3 = value2.length > 0;
const items2 = [((Component) => <Component thread={thread} hasUnreads={hasUnreads} />)(importDefault(11564) /* metro dependency 11564: ForumPostMessageCount */)];
items2[1] = value3 && <><View style={styles.dot} />{((Component) => <Component thread={thread} typingUserIds={value2} hasUnreads={hasUnreads} />)(importDefault(11565) /* metro dependency 11565: ForumPostTypingUsers */)}</>;
items2[2] = firstMessage != null && ((MostCommonForumPostReaction) => <MostCommonForumPostReaction thread={thread} firstMessage={firstMessage} parentChannel={parentChannel} locationAnalyticsObject={AnalyticsObjects.FORUM_GRID_ITEM_FOOTER} />)((require(11313) /* metro dependency 11313: ForumPostReactions */).MostCommonForumPostReaction);
return (
<View style={styles.footer}>
{items2}
</View>
);
}
@@ -0,0 +1,41 @@
/* Metro module 11548; source: modules/forums/native/posts/grid/ForumPostGridHeader.tsx; dependencies: [31, 27, 6900, 1386, 33, 4501, 11549, 11551, 11560, 11561, 11562, 2] */
function _fun88524(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#88524, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11734:6, offset: 0x01fe67f9, size: 303 bytes, params: 8, frame: 21
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_3 = (require(27) /* metro dependency 27 */).View;
const env0_4 = (require(6900) /* metro dependency 6900: ForumConstants */).ForumTimestampFormats;
const env0_5 = (require(1386) /* metro dependency 1386: ChannelConstants */).ChannelFlags;
const value = require(33) /* metro dependency 33 */;
const env0_6 = value.jsx;
const env0_7 = value.jsxs;
const env0_8 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({pinIcon: {marginEnd: 8},
container: {'display': 'flex', 'flexDirection': 'column', 'marginBottom': 4}, details: {'flexDirection': 'row',
'alignItems': 'center', 'marginBottom': 4}, timestampText: {flex: 1}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/forums/native/posts/grid/ForumPostGridHeader.tsx');
exports.default = ForumPostGridHeader;
}
function ForumPostGridHeader({thread, hasUnreads, isNew}) { // fn#88525, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11734:503, offset: 0x01fe6928, size: 377 bytes, params: 2, frame: 25
const styles = useStyles();
const hasFlag = thread.hasFlag;
const PINNED = ChannelFlags.PINNED;
const items2 = [Reflect.apply(hasFlag, thread,
[PINNED]) && ((Component) => <Component containerStyle={styles.pinIcon} />)(importDefault(11549) /* metro dependency 11549: ForumPostPinIcon */)];
const ForumPostAuthor = (require(11551) /* metro dependency 11551: ForumPostUsername */).ForumPostAuthor;
items2[1] = <ForumPostAuthor thread={thread} hasUnreads={hasUnreads} />;
const ForumPostTimestamp = importDefault(11560) /* metro dependency 11560: ForumPostTimestamp */;
const POSTED_DURATION_AGO = ForumTimestampFormats.POSTED_DURATION_AGO;
items2[2] = <ForumPostTimestamp thread={thread} hasUnreads={hasUnreads} format={POSTED_DURATION_AGO} textStyle={styles.timestampText} />;
items2[3] = isNew && ((Component) => <Component />)(importDefault(11561) /* metro dependency 11561: ForumPostNewTag */);
return (
<View style={styles.container}>
<View style={styles.details}>
{items2}
</View>
{((Component) => <Component title={thread.name} hasUnreads={hasUnreads} />)(importDefault(11562) /* metro dependency 11562: ForumPostTitle */)}
</View>
);
}
@@ -0,0 +1,62 @@
/* Metro module 11571; source: modules/forums/native/posts/hooks/useNativeForumPostContent.tsx; dependencies: [661, 4501, 1244, 5216, 4643, 2] */
function _fun88623(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#88623, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11757:6, offset: 0x01fec081, size: 168 bytes, params: 8, frame: 20
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = (require(661) /* metro dependency 661: Constants */).MessageFlags;
const env0_4 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({italics: {fontStyle: 'italic'}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/forums/native/posts/hooks/useNativeForumPostContent.tsx');
exports.default = useNativeForumPostContent;
}
function useNativeForumPostContent({message, messageContent, messageLoaded, isMessageDeleted, senderModifier}) { // fn#88624, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11757:281, offset: 0x01fec129, size: 1062 bytes, params: 2, frame: 22
var r0;
var moduleValue;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const styles = useStyles();
if (isMessageDeleted) {
return {content: intl.string(t.U8Rr2l), style: styles.italics, variant: 'text-sm/normal'};
}
if (message != null) {
if ((importDefault(5216) /* metro dependency 5216: isSystemMessage */)(message)) {
return {content: messageContent, style: styles.italics, variant: 'text-sm/normal'};
}
}
const r5 = message != null && message.blocked;
let r8 = message != null && message.ignored;
const value6 = senderModifier === 'blocked';
if (r5) {
return {content: r5 || value6 ? intl.string(t.Lkp2fB) : intl.string(t.yWK7ZM), style: styles.italics,
variant: 'text-sm/normal'};
}
if (value6) {
return {content: r5 || value6 ? intl.string(t.Lkp2fB) : intl.string(t.yWK7ZM), style: styles.italics,
variant: 'text-sm/normal'};
}
if (r8) {
return {content: r5 || value6 ? intl.string(t.Lkp2fB) : intl.string(t.yWK7ZM), style: styles.italics,
variant: 'text-sm/normal'};
}
if (senderModifier === 'ignored') {
return {content: r5 || value6 ? intl.string(t.Lkp2fB) : intl.string(t.yWK7ZM), style: styles.italics,
variant: 'text-sm/normal'};
}
let r9 = message?.content == null || message?.content === '';
r9 = !r9 ? messageContent == null : r9;
r9 = !r9 ? messageContent === '' : r9;
r9 = !r9 ? global.Array.isArray(messageContent) && messageContent.length === 0 : r9;
if (messageLoaded) {
if (message == null) {
r0 = intl.string(t.mE3KJN);
} else {
moduleValue = require(4643) /* metro dependency 4643: StickersUtils */;
r0 = moduleValue.getMessageStickers(message).length > 0 ? intl.string(t['7K5Lma']) : message.interaction == null ? message.hasFlag(MessageFlags.IS_VOICE_MESSAGE) ? intl.string(t['6bhHrc']) : message.hasFlag(MessageFlags.IS_COMPONENTS_V2) ? intl.string(t.Xxm5i3) : message.embeds.length > 0 || message.attachments.length > 0 ? intl.string(t.JAKsM8) : null : message.content === '' ? intl.string(t['2v7kfl']) : message.hasFlag(MessageFlags.IS_VOICE_MESSAGE) ? intl.string(t['6bhHrc']) : message.hasFlag(MessageFlags.IS_COMPONENTS_V2) ? intl.string(t.Xxm5i3) : message.embeds.length > 0 || message.attachments.length > 0 ? intl.string(t.JAKsM8) : null;
}
r8 = r0;
} else {
r8 = null;
}
return {'content': null, 'style': null, 'variant': 'text-sm/medium', content: r9 ? r8 : messageContent};
}
@@ -0,0 +1,235 @@
/* Metro module 11231; source: modules/forums/native/posts/hooks/useNativeForumPostHandlers.tsx; dependencies: [31, 3849, 1379, 3793, 1878, 6865, 6901, 661, 1243, 7152, 44, 4805, 6647, 1471, 9587, 9598, 9544, 477, 4081, 4082, 7155, 4601, 4015, 11232, 9837, 9835, 2] */
function _fun85851(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#85851, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11417:6, offset: 0x01f7eae4, size: 291 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const actionSheetStore = importDefault(3849) /* metro dependency 3849: ActionSheetStore */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const relationshipStore = importDefault(3793) /* metro dependency 3793: RelationshipStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const forumPostMessagesStore = importDefault(6865) /* metro dependency 6865: ForumPostMessagesStore */;
const forumPostRecentMessageStore = importDefault(6901) /* metro dependency 6901: ForumPostRecentMessageStore */;
const constantsModule = require(661) /* metro dependency 661: Constants */;
const env0_10 = constantsModule.AnalyticsObjectTypes;
const env0_11 = constantsModule.AnalyticsPages;
const env0_12 = constantsModule.AnalyticsSections;
const env0_13 = constantsModule.EMPTY_STRING_SNOWFLAKE_ID;
const env0_14 = (require(1243) /* metro dependency 1243: ThreadConstants */).OpenThreadAnalyticsLocations;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/forums/native/posts/hooks/useNativeForumPostHandlers.tsx');
exports.default = useNativeForumPostHandlers;
}
function useNativeForumPostHandlers({threadId, reactionType}) { // fn#85852, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11417:317, offset: 0x01f7ec07, size: 343 bytes, params: 2, frame: 22
const r11 = reactionType !== undefined ? reactionType : (require(7152) /* metro dependency 7152: MessageReactionsTypes */).ReactionTypes.NORMAL;
const binding = env0_3;
let useCallback = binding.useCallback;
const value = Reflect.apply(useCallback, binding, [_fun85853, [threadId]]);
const value2 = binding.useCallback(_fun85855, [threadId]);
const value3 = binding.useCallback(_fun85856, [value2, threadId]);
const value4 = binding.useCallback(_fun85857, [threadId]);
const value5 = binding.useCallback(_fun85858, [threadId]);
const value6 = binding.useCallback(_fun85859, [threadId]);
const value7 = binding.useCallback(_fun85860, [threadId]);
useCallback = binding.useCallback;
return {onTapMedia: value, onTapPost: value2, onLongTapPost: value4, onTapReaction: value5,
onLongTapReaction: value6, onTapReactionCount: value7, onTapAddReaction: Reflect.apply(useCallback, binding,
[_fun85861, [threadId, r11]]), onTapMostRecentMessage: value3};
}
function _fun85853({messageId, mediaItems, containerRef, initialIndex}) { // fn#85853, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11417:432, offset: 0x01f7ed5e, size: 258 bytes, params: 2, frame: 24
var environment;
initialIndex = initialIndex === undefined ? 0 : initialIndex;
const value = environment.__proto__;
const channel = ChannelStore.getChannel(threadId);
(importDefault(44) /* metro dependency 44 */)(channel != null, '[Forum Post Handlers] Thread cannot be null.');
(require(9544) /* metro dependency 9544: openMediaModal */).openMediaModal({initialIndex: initialIndex,
initialSources: mediaItems.map(_fun85854), channelId: channel.id,
contextName: (require(4805) /* metro dependency 4805: useChannelName */).computeChannelName(channel, UserStore,
RelationshipStore, false),
contextIcon: (require(6647) /* metro dependency 6647: ChannelUtils */).getChannelIcon(channel),
originViewOrOriginLayout: containerRef.current});
}
function _fun85855() { // fn#85855, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11417:1608, offset: 0x01f7f0b6, size: 328 bytes, params: 1, frame: 21
var moduleValue2;
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
if (platformUtilsModule.isAndroid()) {
moduleValue2 = require(4081) /* metro dependency 4081: HapticUtilsNative */;
moduleValue2.triggerHapticFeedback((importDefault(4082) /* metro dependency 4082: HapticFeedbackTypes */).IMPACT_LIGHT);
}
const getChannel = ChannelStore.getChannel;
const threadIdBinding = threadId;
const value3 = Reflect.apply(getChannel, ChannelStore, [threadIdBinding]);
(importDefault(44) /* metro dependency 44 */)(value3 != null, '[Forum Post Handlers] Thread cannot be null.');
const channel = ChannelStore.getChannel(value3.parent_id);
(importDefault(44) /* metro dependency 44 */)(channel != null,
'[Forum Post Handlers] Parent channel cannot be null.');
const trackingModule = require(7155) /* metro dependency 7155: Tracking */;
const trackForumPostClicked = trackingModule.trackForumPostClicked;
const GUILD_CHANNEL = AnalyticsPages.GUILD_CHANNEL;
const FORUM_CHANNEL_POST = AnalyticsSections.FORUM_CHANNEL_POST;
Reflect.apply(trackForumPostClicked, trackingModule, [{guildId: channel.guild_id, channelId: channel.id,
postId: threadIdBinding, location: {page: GUILD_CHANNEL, section: FORUM_CHANNEL_POST}}]);
const transitionToChannelModule = require(4601) /* metro dependency 4601: transitionToChannel */;
const transitionToThread = transitionToChannelModule.transitionToThread;
const FORUM = OpenThreadAnalyticsLocations.FORUM;
Reflect.apply(transitionToThread, transitionToChannelModule, [value3, {source: FORUM, navigationReplace: false}]);
}
function _fun85856() { // fn#85856, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11417:2112, offset: 0x01f7f1fe, size: 302 bytes, params: 1, frame: 23
var moduleValue;
var trackForumPostClicked;
var id;
var moduleValue2;
var transitionToThreadMessage;
const getChannel = ChannelStore.getChannel;
const threadIdBinding = threadId;
const value3 = Reflect.apply(getChannel, ChannelStore, [threadIdBinding]);
(importDefault(44) /* metro dependency 44 */)(value3 != null, '[Forum Post Handlers] Thread cannot be null.');
const channel = ChannelStore.getChannel(value3.parent_id);
(importDefault(44) /* metro dependency 44 */)(channel != null,
'[Forum Post Handlers] Parent channel cannot be null.');
const messageState = ForumPostRecentMessageStore.getMessageState(threadIdBinding);
const message = messageState.message;
if (messageState.loaded) {
if (message != null) {
moduleValue = require(7155) /* metro dependency 7155: Tracking */;
trackForumPostClicked = moduleValue.trackForumPostClicked;
id = channel.id;
Reflect.apply(trackForumPostClicked, moduleValue, [{guildId: channel.guild_id, channelId: id,
postId: threadId,
location: {page: AnalyticsPages.GUILD_CHANNEL, section: AnalyticsSections.FORUM_CHANNEL_POST}}]);
moduleValue2 = require(4601) /* metro dependency 4601: transitionToChannel */;
transitionToThreadMessage = moduleValue2.transitionToThreadMessage;
id = message.id;
Reflect.apply(transitionToThreadMessage, moduleValue2, [value3, id,
{source: OpenThreadAnalyticsLocations.FORUM,
navigationReplace: false}]);
} else {
env0_2();
}
} else {
env0_2();
}
}
function _fun85857() { // fn#85857, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11417:2617, offset: 0x01f7f32c, size: 239 bytes, params: 1, frame: 20
const channel = ChannelStore.getChannel(threadId);
(importDefault(44) /* metro dependency 44 */)(channel != null, '[Forum Post Handlers] Thread cannot be null.');
const channel2 = ChannelStore.getChannel(channel.parent_id);
(importDefault(44) /* metro dependency 44 */)(channel2 != null,
'[Forum Post Handlers] Parent channel cannot be null.');
(importDefault(44) /* metro dependency 44 */)(channel2.isForumLikeChannel(), 'Forum parents must be forum channels');
const getContent = ActionSheetStore.getContent;
const value5 = Reflect.apply(getContent, ActionSheetStore, []) != null;
const getUser = UserStore.getUser;
if (!(value5 || Reflect.apply(getUser, UserStore, [channel.ownerId]) == null)) {
(require(4015) /* metro dependency 4015: ChatInputUtils */).dismissKeyboard();
(importDefault(11232) /* metro dependency 11232: showLongPressForumPostActionSheet */)(channel, channel2);
}
}
function _fun85858({reaction, disableReactionCreates, disableReactionUpdates, locationAnalyticsObject, reactionLocation}) { // fn#85858, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11417:3015, offset: 0x01f7f41b, size: 311 bytes, params: 2, frame: 29
var r8;
let value = environment.__proto__;
const getChannel = ChannelStore.getChannel;
const threadIdBinding = threadId;
const value3 = Reflect.apply(getChannel, ChannelStore, [threadIdBinding]);
(importDefault(44) /* metro dependency 44 */)(value3 != null, '[Forum Post Handlers] Thread cannot be null.');
const getMessage = ForumPostMessagesStore.getMessage;
const firstMessage = Reflect.apply(getMessage, ForumPostMessagesStore, [threadIdBinding]).firstMessage;
(importDefault(44) /* metro dependency 44 */)(firstMessage != null, '[Forum Post Handlers] Message cannot be null.');
if (disableReactionCreates) {
if (disableReactionUpdates) {
(require(9837) /* metro dependency 9837: ReactionUtils */).handleViewReactions({messageId: firstMessage.id,
channelId: threadId, reactions: firstMessage.reactions, location: {object: locationAnalyticsObject,
objectType: AnalyticsObjectTypes.CANT_ADD_OR_REMOVE}});
} else {
r8 = reaction != null && reaction.burst_count > 0;
value = require(9835) /* metro dependency 9835: MessagesUtils */;
value.handleAddOrRemoveReaction(firstMessage.id, value3, reaction, r8, reactionLocation);
}
} else {
r8 = reaction != null && reaction.burst_count > 0;
value = require(9835) /* metro dependency 9835: MessagesUtils */;
value.handleAddOrRemoveReaction(firstMessage.id, value3, reaction, r8, reactionLocation);
}
}
function _fun85859({emoji}) { // fn#85859, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11417:3566, offset: 0x01f7f552, size: 140 bytes, params: 2, frame: 17
const value = environment.__proto__;
const getMessage = ForumPostMessagesStore.getMessage;
const threadIdBinding = threadId;
const firstMessage = Reflect.apply(getMessage, ForumPostMessagesStore, [threadIdBinding]).firstMessage;
(importDefault(44) /* metro dependency 44 */)(firstMessage != null, '[Forum Post Handlers] Message cannot be null.');
(require(9837) /* metro dependency 9837: ReactionUtils */).handleViewReactions({messageId: firstMessage.id,
channelId: threadIdBinding, emoji: emoji, reactions: firstMessage.reactions});
}
function _fun85860() { // fn#85860, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11417:3790, offset: 0x01f7f5de, size: 126 bytes, params: 1, frame: 17
const value = environment.__proto__;
const getMessage = ForumPostMessagesStore.getMessage;
const threadIdBinding = threadId;
const firstMessage = Reflect.apply(getMessage, ForumPostMessagesStore, [threadIdBinding]).firstMessage;
(importDefault(44) /* metro dependency 44 */)(firstMessage != null, '[Forum Post Handlers] Message cannot be null.');
(require(9837) /* metro dependency 9837: ReactionUtils */).handleViewReactions({messageId: firstMessage.id,
channelId: threadIdBinding, reactions: firstMessage.reactions});
}
function _fun85861() { // fn#85861, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11417:4001, offset: 0x01f7f65c, size: 186 bytes, params: 1, frame: 23
let value = environment.__proto__;
const getChannel = ChannelStore.getChannel;
const threadIdBinding = threadId;
const value3 = Reflect.apply(getChannel, ChannelStore, [threadIdBinding]);
(importDefault(44) /* metro dependency 44 */)(value3 != null, '[Forum Post Handlers] Thread cannot be null.');
const getMessage = ForumPostMessagesStore.getMessage;
const firstMessage = Reflect.apply(getMessage, ForumPostMessagesStore, [threadIdBinding]).firstMessage;
(importDefault(44) /* metro dependency 44 */)(firstMessage != null, '[Forum Post Handlers] Message cannot be null.');
value = require(9835) /* metro dependency 9835: MessagesUtils */;
const handleAddOrRemoveReaction = value.handleAddOrRemoveReaction;
const id = firstMessage.id;
const binding = env0_1;
const ReactionTypes = (require(7152) /* metro dependency 7152: MessageReactionsTypes */).ReactionTypes;
const BURST = ReactionTypes.BURST;
Reflect.apply(handleAddOrRemoveReaction, value, [id, value3, null, binding === BURST]);
}
function _fun85854(a0) { // fn#85854, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11417:664, offset: 0x01f7ee60, size: 598 bytes, params: 2, frame: 22
var r7;
var r0;
var r2;
const ForumPostMediaTypes = (require(9587) /* metro dependency 9587: ForumPostMediaUtils */).ForumPostMediaTypes;
var value13;
const src = a0.src;
const srcIsAnimated = a0.srcIsAnimated;
const value2 = (importDefault(1471) /* metro dependency 1471: URLUtils */).toURLSafe(src);
const value3 = value2 != null;
if (srcIsAnimated) {
r0 = value3 && (value2.pathname.toLowerCase().endsWith('.webp') || value2.pathname.toLowerCase().endsWith('.avif'));
if (r0) {
r7 = a0.type === ForumPostMediaTypes.ATTACHMENT && (require(9598) /* metro dependency 9598: SignedAttachmentLinkUtils */).isAttachmentUrl(value2);
r7 = !r7 ? a0.type === ForumPostMediaTypes.EMBED && (require(9598) /* metro dependency 9598: SignedAttachmentLinkUtils */).isExternalProxiedAttachmentUrl(value2) : r7;
r0 = r7;
}
if (r0) {
value2.searchParams.set('animated', 'true');
value13 = value2.pathname.toLowerCase();
if (value13.endsWith('.avif')) {
value2.searchParams.set('format', 'webp');
}
r2 = value2.toString();
} else {
r2 = src;
}
} else if (value3 && value2.pathname.toLowerCase().endsWith('.avif')) {
value2.searchParams.set('format', 'webp');
r2 = value2.toString();
} else {
r2 = src;
}
return {uri: r2, guildId: env0_1.guild_id, messageId: messageId ?? EMPTY_STRING_SNOWFLAKE_ID, channelId: env0_1.id,
mediaIndex: a0.mediaIndex, width: a0.width, height: a0.height, accessoryType: a0.type,
attachmentId: a0.attachmentId};
}
@@ -0,0 +1,49 @@
/* Metro module 11568; source: modules/forums/native/posts/list/ForumPostList.tsx; dependencies: [57, 31, 27, 1386, 33, 4501, 6863, 11549, 11559, 11569, 11572, 2] */
function _fun88612(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#88612, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11754:6, offset: 0x01feb48f, size: 280 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
importAll(31) /* metro dependency 31 */;
const env0_4 = (require(27) /* metro dependency 27 */).View;
const env0_5 = (require(1386) /* metro dependency 1386: ChannelConstants */).ChannelFlags;
const value = require(33) /* metro dependency 33 */;
const env0_6 = value.jsx;
const env0_7 = value.jsxs;
const env0_8 = value.Fragment;
const env0_9 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({header: {'display': 'flex',
'flexDirection': 'row', 'alignItems': 'center', 'marginBottom': 8}, content: {'flex': 1, 'marginBottom': 12}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/forums/native/posts/list/ForumPostList.tsx');
exports.default = ForumPostList;
}
function ForumPostList({messageContent, firstMessage, firstMessageLoaded, hasUnreads, isNew, media, isEmbed, isLocalDeviceMedia, parentChannel, thread, senderModifier}) { // fn#88613, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11754:427, offset: 0x01feb5a7, size: 519 bytes, params: 2, frame: 39
var r23;
var items2;
const styles = useStyles();
const value3 = env0_3((require(6863) /* metro dependency 6863: ForumTagHooks */).useSomeAppliedTags(thread, 2), 2);
const property = value3[0];
const property2 = value3[1];
const hasFlag = thread.hasFlag;
const PINNED = ChannelFlags.PINNED;
const hasFlag2 = Reflect.apply(hasFlag, thread, [PINNED]);
const jsxRuntimeEnv0_8Binding = jsxRuntimeEnv0_8;
let r6 = hasFlag2 || property.length !== 0;
if (r6) {
var viewBinding2Props = {style: styles.header};
r23 = hasFlag2 && ((Component) => <Component />)(importDefault(11549) /* metro dependency 11549: ForumPostPinIcon */);
items2 = [r23];
r23 = property.length !== 0 && ((ForumPostAppliedTagPills) => <ForumPostAppliedTagPills appliedTags={property} additionalTagsCount={property2} hasUnreads={hasUnreads} />)((require(11559) /* metro dependency 11559: ForumPostAppliedTags */).ForumPostAppliedTagPills);
items2[1] = r23;
r6 = <View {...viewBinding2Props}>{items2}</View>;
}
let value = importDefault(11569) /* metro dependency 11569: ForumPostListBody */;
value = <View style={styles.content}>{r6}{((Component) => <Component thread={thread} firstMessage={firstMessage} hasUnreads={hasUnreads} isNew={isNew} messageContent={messageContent} media={media} isEmbed={isEmbed} isLocalDeviceMedia={isLocalDeviceMedia} firstMessageLoaded={firstMessageLoaded} senderModifier={senderModifier} />)(value)}</View>;
return (
<>
{value}
{((Component) => <Component thread={thread} firstMessage={firstMessage} hasUnreads={hasUnreads} parentChannel={parentChannel} />)(importDefault(11572) /* metro dependency 11572: ForumPostListFooter */)}
</>
);
}
@@ -0,0 +1,42 @@
/* Metro module 11569; source: modules/forums/native/posts/list/ForumPostListBody.tsx; dependencies: [31, 27, 6900, 33, 4501, 11561, 11551, 11560, 11562, 11570, 11555, 2] */
function _fun88614(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#88614, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11755:6, offset: 0x01feb7ae, size: 296 bytes, params: 8, frame: 20
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_3 = (require(27) /* metro dependency 27 */).View;
const env0_4 = (require(6900) /* metro dependency 6900: ForumConstants */).ForumTimestampFormats;
const value = require(33) /* metro dependency 33 */;
const env0_5 = value.jsx;
const env0_6 = value.jsxs;
const env0_7 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({body: {'display': 'flex',
'flexDirection': 'row', 'alignItems': 'flex-start'}, contentContainer: {flex: 1},
thumbnailContainer: {marginLeft: 12}, details: {'flexDirection': 'row', 'alignItems': 'center',
'marginBottom': 6}, newTagContainer: {marginEnd: 8}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/forums/native/posts/list/ForumPostListBody.tsx');
exports.default = ForumPostListBody;
}
function ForumPostListBody({containerStyle, thread, firstMessage, hasUnreads, isNew, firstMessageLoaded, messageContent, media, isEmbed, isLocalDeviceMedia, senderModifier}) { // fn#88615, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11755:525, offset: 0x01feb8d6, size: 567 bytes, params: 2, frame: 33
const styles = useStyles();
const items3 = [styles.body, containerStyle];
const items2 = [isNew && ((Component) => <Component containerStyle={styles.newTagContainer} />)(importDefault(11561) /* metro dependency 11561: ForumPostNewTag */)];
const ForumPostAuthor = (require(11551) /* metro dependency 11551: ForumPostUsername */).ForumPostAuthor;
items2[1] = <ForumPostAuthor thread={thread} hasUnreads={hasUnreads} />;
const ForumPostTimestamp = importDefault(11560) /* metro dependency 11560: ForumPostTimestamp */;
const POSTED_DURATION_AGO = ForumTimestampFormats.POSTED_DURATION_AGO;
items2[2] = <ForumPostTimestamp thread={thread} hasUnreads={hasUnreads} format={POSTED_DURATION_AGO} />;
return (
<View style={items3}>
<View style={styles.contentContainer}>
<View style={styles.details}>
{items2}
</View>
{((Component) => <Component title={thread.name} lineClamp={2} ellipsizeMode="tail" hasUnreads={hasUnreads} />)(importDefault(11562) /* metro dependency 11562: ForumPostTitle */)}
{((Component) => <Component messageContent={messageContent} message={firstMessage} isMessageDeleted={false} messageLoaded={firstMessageLoaded} hasUnreads={hasUnreads} senderModifier={senderModifier} />)(importDefault(11570) /* metro dependency 11570: ForumPostMessageContent */)}
</View>
{firstMessage == null ? media == null ? null : ((ForumPostMediaThumbnail) => <ForumPostMediaThumbnail channel={thread} media={media} isEmbed={isEmbed} isLocalDeviceMedia={isLocalDeviceMedia} firstMessageId={firstMessage?.id} containerStyle={styles.thumbnailContainer} />)((require(11555) /* metro dependency 11555: ForumPostMedia */).ForumPostMediaThumbnail) : firstMessage.blocked || media == null ? null : ((ForumPostMediaThumbnail) => <ForumPostMediaThumbnail channel={thread} media={media} isEmbed={isEmbed} isLocalDeviceMedia={isLocalDeviceMedia} firstMessageId={firstMessage?.id} containerStyle={styles.thumbnailContainer} />)((require(11555) /* metro dependency 11555: ForumPostMedia */).ForumPostMediaThumbnail)}
</View>
);
}
@@ -0,0 +1,36 @@
/* Metro module 11572; source: modules/forums/native/posts/list/ForumPostListFooter.tsx; dependencies: [31, 27, 661, 33, 4501, 697, 11531, 11564, 11565, 11313, 2] */
function _fun88625(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#88625, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11758:6, offset: 0x01fec54f, size: 295 bytes, params: 8, frame: 21
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_3 = (require(27) /* metro dependency 27 */).View;
const env0_4 = (require(661) /* metro dependency 661: Constants */).AnalyticsObjects;
let value = require(33) /* metro dependency 33 */;
const env0_5 = value.jsx;
const env0_6 = value.Fragment;
const env0_7 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
const BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
const env0_8 = Reflect.apply(createStyles, value, [{footer: {'display': 'flex', 'alignItems': 'center',
'flexDirection': 'row', 'justifyContent': 'flex-start'}, dot: {'height': 4, 'width': 4, 'borderRadius': 2,
'backgroundColor': null, 'marginHorizontal': 8, backgroundColor: BORDER_SUBTLE}}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/forums/native/posts/list/ForumPostListFooter.tsx');
exports.default = ForumPostListFooter;
}
function ForumPostListFooter({thread, firstMessage, hasUnreads, parentChannel}) { // fn#88626, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11758:507, offset: 0x01fec676, size: 354 bytes, params: 2, frame: 29
const styles = useStyles();
const value2 = (require(11531) /* metro dependency 11531: useTypingUsersIds */).useTypingUserIds(thread.id);
const value3 = value2.length > 0;
const items2 = [((Component) => <Component thread={thread} hasUnreads={hasUnreads} />)(importDefault(11564) /* metro dependency 11564: ForumPostMessageCount */)];
items2[1] = value3 && <><View style={styles.dot} />{((Component) => <Component thread={thread} typingUserIds={value2} hasUnreads={hasUnreads} />)(importDefault(11565) /* metro dependency 11565: ForumPostTypingUsers */)}</>;
items2[2] = firstMessage != null && ((MostCommonForumPostReaction) => <MostCommonForumPostReaction thread={thread} firstMessage={firstMessage} parentChannel={parentChannel} locationAnalyticsObject={AnalyticsObjects.FORUM_LIST_ITEM_FOOTER} />)((require(11313) /* metro dependency 11313: ForumPostReactions */).MostCommonForumPostReaction);
return (
<View style={styles.footer}>
{items2}
</View>
);
}
@@ -0,0 +1,179 @@
/* Metro module 11230; source: modules/forums/native/posts/reactions/ForumPostReactionButton.tsx; dependencies: [31, 27, 33, 4501, 697, 11231, 5278, 1244, 4573, 7152, 9837, 9830, 3829, 9841, 673, 1423, 3795, 6739, 11252, 2] */
function _fun85843(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#85843, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11416:6, offset: 0x01f7e17d, size: 474 bytes, params: 8, frame: 24
var object4;
const env0_0 = require;
const closure = BurstReactionButton;
const closure2 = ReactionButton;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(27) /* metro dependency 27 */).View;
let value = require(33) /* metro dependency 33 */;
const env0_5 = value.jsxs;
const env0_6 = value.jsx;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object4 = {};
const object5 = {'display': 'flex', 'flexDirection': 'row', 'alignItems': 'center', 'justifyContent': 'center',
'paddingHorizontal': 8, 'borderRadius': null, 'borderWidth': 1, 'borderColor': null, 'backgroundColor': null,
'minWidth': 32, 'minHeight': 26, 'maxHeight': 26};
object5.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
const REACTION_BORDER_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.REACTION_BORDER_DEFAULT;
object5.borderColor = REACTION_BORDER_DEFAULT;
const REACTION_BACKGROUND_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.REACTION_BACKGROUND_DEFAULT;
object5.backgroundColor = REACTION_BACKGROUND_DEFAULT;
object4.container = object5;
const object6 = {};
const REACTION_BORDER_REACTED_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.REACTION_BORDER_REACTED_DEFAULT;
object6.borderColor = REACTION_BORDER_REACTED_DEFAULT;
const REACTION_BACKGROUND_REACTED_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.REACTION_BACKGROUND_REACTED_DEFAULT;
object6.backgroundColor = REACTION_BACKGROUND_REACTED_DEFAULT;
object4.selected = object6;
object4.textEmoji = {fontSize: 12};
object4.imageEmoji = {'height': 16, 'width': 16};
object4.countContainer = {paddingStart: 4};
const env0_7 = Reflect.apply(createStyles, value, [object4]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/forums/native/posts/reactions/ForumPostReactionButton.tsx');
exports.DEFAULT_EMOJI_SIZE = 14;
exports.AdditionalReactionCount = AdditionalReactionCount;
exports.AddReactionButton = AddReactionButton;
exports.ForumPostReactionButton = ForumPostReactionButton;
exports.BurstReactionButton = closure;
exports.ReactionButton = closure2;
}
function BurstReactionButton({colors, emoji, onPress, onLongPress, containerStyle, count, emojiSize, selected, animate, animateCount, accessible}) { // fn#85844, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11416:702, offset: 0x01f7e357, size: 353 bytes, params: 2, frame: 32
var r12;
var moduleValue2;
const value3 = (require(9841) /* metro dependency 9841: useEmojiColorPalette */).useEmojiColorPalette(colors);
const value4 = '';
if (value3 != null) {
moduleValue2 = require(673) /* metro dependency 673: ColorUtils */;
r12 = moduleValue2.hex2rgb(value3?.backgroundColor, value3?.opacity ?? 0.15) ?? value4;
} else {
r12 = value4;
}
return (
<ReactionButton
containerStyle={[containerStyle, {backgroundColor: r12, borderColor: value3?.backgroundColor,
borderWidth: selected ? 1 : 0}]}
textStyle={{color: value3?.accentColor}}
selected={false}
emoji={emoji}
count={count}
animate={animate}
onPress={onPress}
onLongPress={onLongPress}
emojiSize={emojiSize}
animateCount={animateCount}
accessible={accessible}
/>
);
}
function ReactionButton({emoji, onPress, onLongPress, textStyle, containerStyle, count, emojiSize, selected, animate, animateCount, accessible, disabled}) { // fn#85845, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11416:1304, offset: 0x01f7e4b8, size: 471 bytes, params: 2, frame: 34
disabled = !(disabled === undefined) && disabled;
const styles = useStyles();
const r11 = emoji.id != null ? (importDefault(1423) /* metro dependency 1423: AvatarUtils */).getEmojiURL({id: emoji.id,
animated: animate && emoji.animated, size: emojiSize}) : undefined;
const selectedBinding = selected ? styles.selected : undefined;
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
return (
<PressableOpacity
style={[styles.container, containerStyle, selectedBinding]}
accessible={accessible}
accessibilityLabel={(require(3795) /* metro dependency 3795: ReactionUtils */).getAccessibleEmojiDisplayName(selectedBinding,
count, emoji, false)}
onPress={onPress}
onLongPress={onLongPress}
disabled={disabled}
>
{((Component) => <Component textEmojiStyle={styles.textEmoji} fastImageStyle={styles.imageEmoji} src={r11} name={emoji.name} />)(importDefault(6739) /* metro dependency 6739: Emoji */)}
{count != null && count > 0 && <View style={styles.countContainer}>{((Component) => <Component textStyle={textStyle} count={count} animate={animateCount} />)(importDefault(11252) /* metro dependency 11252: AnimatedCounter */)}</View>}
</PressableOpacity>
);
}
function AdditionalReactionCount({count, threadId, containerStyle}) { // fn#85846, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11416:2111, offset: 0x01f7e68f, size: 254 bytes, params: 2, frame: 23
const styles = useStyles();
const onTapReactionCount = (importDefault(11231) /* metro dependency 11231: useNativeForumPostHandlers */)({threadId: threadId}).onTapReactionCount;
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const N8hbZB = (require(1244) /* metro dependency 1244: indexNative */).t.N8hbZB;
const items2 = [styles.container, containerStyle];
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<PressableOpacity
accessible
accessibilityLabel={Reflect.apply(string, intl, [N8hbZB])}
style={items2}
onPress={onTapReactionCount}
>
<Text variant="heading-sm/medium" color="interactive-text-default">
{'+'}
{count}
</Text>
</PressableOpacity>
);
}
function AddReactionButton({threadId, containerStyle, reactionType = require(dependencyMap[9]).ReactionTypes.NORMAL}) { // fn#85847, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11416:2502, offset: 0x01f7e78d, size: 280 bytes, params: 2, frame: 21
const styles = useStyles();
const onTapAddReaction = (importDefault(11231) /* metro dependency 11231: useNativeForumPostHandlers */)({threadId: threadId,
reactionType: reactionType}).onTapAddReaction;
const ADD_REACTION_ICON_COMPONENTS = (require(9837) /* metro dependency 9837: ReactionUtils */).ADD_REACTION_ICON_COMPONENTS;
const property = ADD_REACTION_ICON_COMPONENTS[reactionType];
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
const items2 = [styles.container, containerStyle];
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
return (
<PressableOpacity
style={items2}
accessible
accessibilityLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.lfIHs4)}
onPress={onTapAddReaction}
>
{((Component) => <Component size="xs" />)(property)}
</PressableOpacity>
);
}
function ForumPostReactionButton({thread, reaction, animateCount, containerStyle, textStyle, locationAnalyticsObject, emojiSize}) { // fn#85848, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11416:2906, offset: 0x01f7e8a5, size: 501 bytes, params: 2, frame: 27
var r0;
emojiSize = emojiSize === undefined ? 14 : emojiSize;
const {disableReactionCreates,
disableReactionUpdates} = (importDefault(9830) /* metro dependency 9830: useReactionPermissions */)(thread);
const env0_3 = disableReactionUpdates;
const {onTapReaction,
onLongTapReaction} = (importDefault(11231) /* metro dependency 11231: useNativeForumPostHandlers */)({threadId: thread.id});
const AnimateEmoji = (require(3829) /* metro dependency 3829: UserSettings */).AnimateEmoji;
const value4 = AnimateEmoji.useSetting();
const binding = env0_3;
const value5 = binding.useCallback(function() {
onTapReaction({reaction: reaction, disableReactionCreates: disableReactionCreates,
disableReactionUpdates: disableReactionUpdates, locationAnalyticsObject: locationAnalyticsObject});
}, [disableReactionCreates, disableReactionUpdates, locationAnalyticsObject, onTapReaction, reaction]);
const value6 = binding.useCallback(function() {
onLongTapReaction(reaction);
}, [onLongTapReaction, reaction]);
let r13 = disableReactionCreates ? !disableReactionUpdates : !disableReactionCreates;
if (reaction.burst_count > 0) {
var burstReactionButtonBindingProps = {accessible: r13, emoji: reaction.emoji, selected: reaction.me_burst};
r13 = reaction.burst_colors ?? [];
burstReactionButtonBindingProps.colors = r13;
burstReactionButtonBindingProps.count = reaction.burst_count;
burstReactionButtonBindingProps.onPress = value5;
burstReactionButtonBindingProps.onLongPress = value6;
burstReactionButtonBindingProps.containerStyle = containerStyle;
burstReactionButtonBindingProps.textStyle = textStyle;
burstReactionButtonBindingProps.emojiSize = emojiSize;
burstReactionButtonBindingProps.animate = value4;
burstReactionButtonBindingProps.animateCount = animateCount;
r0 = <BurstReactionButton {...burstReactionButtonBindingProps} />;
} else {
r0 = <ReactionButton accessible={r13} emoji={reaction.emoji} selected={reaction.me} count={reaction.count} onPress={value5} onLongPress={value6} containerStyle={containerStyle} textStyle={textStyle} emojiSize={emojiSize} animate={value4} animateCount={animateCount} />;
}
return r0;
}
@@ -0,0 +1,149 @@
/* Metro module 11313; source: modules/forums/native/posts/reactions/ForumPostReactions.tsx; dependencies: [31, 27, 33, 4501, 9830, 9619, 11230, 2] */
function _fun86313(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#86313, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11499:6, offset: 0x01f902bf, size: 284 bytes, params: 8, frame: 20
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_3 = (require(27) /* metro dependency 27 */).View;
const value = require(33) /* metro dependency 33 */;
const env0_4 = value.jsx;
const env0_5 = value.jsxs;
const env0_6 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({reactionButtonContainer: {marginEnd: 8},
actionBarReaction: {marginEnd: 4}, container: {flexDirection: 'row'},
mostCommonContainer: {marginLeft: 'auto'}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/forums/native/posts/reactions/ForumPostReactions.tsx');
exports.MaxForumPostReactions = MaxForumPostReactions;
exports.ForumPostActionBarReactions = ForumPostActionBarReactions;
exports.MostCommonForumPostReaction = MostCommonForumPostReaction;
}
function MaxForumPostReactions({thread, parentChannel, firstMessage, containerWidth, containerStyle, reactionContainerStyle}) { // fn#86314, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11499:432, offset: 0x01f903db, size: 399 bytes, params: 2, frame: 25
var r0;
var items2;
const styles = useStyles();
const disableReactionCreates = (importDefault(9830) /* metro dependency 9830: useReactionPermissions */)(thread).disableReactionCreates;
const {reactions,
additionalReactionCount} = (require(9619) /* metro dependency 9619: ForumHooks */).useMaxPossibleForumPostReactions({'containerWidth': null,
'reactionEmojiWidth': 46, 'digitWidth': 7.5, containerWidth: containerWidth - (disableReactionCreates ? 0 : 28),
message: firstMessage, parentChannel: parentChannel});
if (reactions.length !== 0) {
var viewBindingProps = {style: [styles.container, containerStyle]};
items2 = [reactions.map(_fun86315)];
items2[1] = additionalReactionCount > 0 && ((AdditionalReactionCount) => <AdditionalReactionCount count={additionalReactionCount} containerStyle={reactionContainerStyle} threadId={thread.id} />)((require(11230) /* metro dependency 11230: ForumPostReactionButton */).AdditionalReactionCount);
items2[2] = !disableReactionCreates && ((AddReactionButton) => <AddReactionButton containerStyle={reactionContainerStyle} threadId={thread.id} />)((require(11230) /* metro dependency 11230: ForumPostReactionButton */).AddReactionButton);
r0 = <View {...viewBindingProps}>{items2}</View>;
} else if (disableReactionCreates) {
r0 = null;
} else {
var viewBindingProps = {style: [styles.container, containerStyle]};
items2 = [reactions.map(_fun86315)];
items2[1] = additionalReactionCount > 0 && ((AdditionalReactionCount) => <AdditionalReactionCount count={additionalReactionCount} containerStyle={reactionContainerStyle} threadId={thread.id} />)((require(11230) /* metro dependency 11230: ForumPostReactionButton */).AdditionalReactionCount);
items2[2] = !disableReactionCreates && ((AddReactionButton) => <AddReactionButton containerStyle={reactionContainerStyle} threadId={thread.id} />)((require(11230) /* metro dependency 11230: ForumPostReactionButton */).AddReactionButton);
r0 = <View {...viewBindingProps}>{items2}</View>;
}
return r0;
}
function ForumPostActionBarReactions({thread, parentChannel, firstMessage, containerStyle, reactionContainerStyle}) { // fn#86316, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11499:1217, offset: 0x01f905ee, size: 415 bytes, params: 2, frame: 26
var r0;
var items2;
const styles = useStyles();
const disableReactionCreates = (importDefault(9830) /* metro dependency 9830: useReactionPermissions */)(thread).disableReactionCreates;
const {reactions,
additionalNonUniqueReactionCount} = (require(9619) /* metro dependency 9619: ForumHooks */).useSomeForumPostReactions({message: firstMessage,
parentChannel: parentChannel, sorted: false, count: disableReactionCreates ? 3 : 2});
if (reactions.length !== 0) {
var viewBindingProps = {style: [styles.container, containerStyle]};
items2 = [reactions.map(_fun86317)];
items2[1] = additionalNonUniqueReactionCount > 0 && ((AdditionalReactionCount) => <AdditionalReactionCount count={additionalNonUniqueReactionCount} containerStyle={[styles.actionBarReaction,
reactionContainerStyle]} threadId={thread.id} />)((require(11230) /* metro dependency 11230: ForumPostReactionButton */).AdditionalReactionCount);
items2[2] = !disableReactionCreates && ((AddReactionButton) => <AddReactionButton containerStyle={[styles.actionBarReaction,
reactionContainerStyle]} threadId={thread.id} />)((require(11230) /* metro dependency 11230: ForumPostReactionButton */).AddReactionButton);
r0 = <View {...viewBindingProps}>{items2}</View>;
} else if (disableReactionCreates) {
r0 = null;
} else {
var viewBindingProps = {style: [styles.container, containerStyle]};
items2 = [reactions.map(_fun86317)];
items2[1] = additionalNonUniqueReactionCount > 0 && ((AdditionalReactionCount) => <AdditionalReactionCount count={additionalNonUniqueReactionCount} containerStyle={[styles.actionBarReaction,
reactionContainerStyle]} threadId={thread.id} />)((require(11230) /* metro dependency 11230: ForumPostReactionButton */).AdditionalReactionCount);
items2[2] = !disableReactionCreates && ((AddReactionButton) => <AddReactionButton containerStyle={[styles.actionBarReaction,
reactionContainerStyle]} threadId={thread.id} />)((require(11230) /* metro dependency 11230: ForumPostReactionButton */).AddReactionButton);
r0 = <View {...viewBindingProps}>{items2}</View>;
}
return r0;
}
function MostCommonForumPostReaction({thread, parentChannel, firstMessage, locationAnalyticsObject}) { // fn#86318, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11499:1988, offset: 0x01f90811, size: 234 bytes, params: 2, frame: 21
const styles = useStyles();
const {disableReactionCreates,
disableReactionUpdates} = (importDefault(9830) /* metro dependency 9830: useReactionPermissions */)(thread);
const forumHooksModule = require(9619) /* metro dependency 9619: ForumHooks */;
const useSomeForumPostReactions = forumHooksModule.useSomeForumPostReactions;
const property = Reflect.apply(useSomeForumPostReactions, forumHooksModule, [{parentChannel: parentChannel,
message: firstMessage}]).reactions[0];
if (property == null) {
return null;
}
if (disableReactionUpdates) {
return null;
}
if (disableReactionCreates) {
if (property.me || property.me_burst) {
const ForumPostReactionButton = (require(11230) /* metro dependency 11230: ForumPostReactionButton */).ForumPostReactionButton;
return (
<ForumPostReactionButton
containerStyle={styles.mostCommonContainer}
thread={thread}
reaction={property}
locationAnalyticsObject={locationAnalyticsObject}
animateCount={false}
/>
);
} else {
return null;
}
} else {
const ForumPostReactionButton2 = (require(11230) /* metro dependency 11230: ForumPostReactionButton */).ForumPostReactionButton;
return (
<ForumPostReactionButton2
containerStyle={styles.mostCommonContainer}
thread={thread}
reaction={property}
locationAnalyticsObject={locationAnalyticsObject}
animateCount={false}
/>
);
}
}
function _fun86315(a0) { // fn#86315, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11499:862, offset: 0x01f9056a, size: 132 bytes, params: 2, frame: 18
const ForumPostReactionButton = (require(11230) /* metro dependency 11230: ForumPostReactionButton */).ForumPostReactionButton;
return (
<ForumPostReactionButton
containerStyle={[styles.reactionButtonContainer, reactionContainerStyle]}
thread={thread}
reaction={a0}
animateCount={false}
key={a0.emoji.id ?? a0.emoji.name}
/>
);
}
function _fun86317(a0) { // fn#86317, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11499:1595, offset: 0x01f9078d, size: 132 bytes, params: 2, frame: 18
const ForumPostReactionButton = (require(11230) /* metro dependency 11230: ForumPostReactionButton */).ForumPostReactionButton;
return (
<ForumPostReactionButton
containerStyle={[styles.actionBarReaction, reactionContainerStyle]}
thread={thread}
reaction={a0}
animateCount={false}
key={a0.emoji.id ?? a0.emoji.name}
/>
);
}