This commit is contained in:
janisslsm committed 2026-07-28 01:06:53 +03:00
1 parent af3b49f756
commit 1781d25a15
22448 files changed
+2731829 -2650550

No files matched your search

+51 -32
View File
@@ -1,6 +1,9 @@
/* Metro module 11011; source: modules/forums/FormError.tsx; dependencies: [1244, 7246, 2] */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as IndexNativeModule from '../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as AutomodErrorUtilsModule from '../guild_automod/AutomodErrorUtils.tsx'; /* Metro dependency 7246 */
function _fun84360(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#84360, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11197:6, offset: 0x01f47007, size: 259 bytes, params: 8, frame: 18
var object2;
const env0_0 = require;
const formSubmitError = function(a0, a1) {
var value = a1;
@@ -9,16 +12,16 @@ function _fun84360(global, require, importDefault, importAll, module, exports, d
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
object2 = {EmptyContent: 0};
object2[0] = 'EmptyContent';
object2.AutomodViolation = 1;
object2[1] = 'AutomodViolation';
object2.EmptyTags = 2;
object2[2] = 'EmptyTags';
object2.ApiValidation = 3;
object2[3] = 'ApiValidation';
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/forums/FormError.tsx');
exports.FormSubmitErrorType = object2;
object = {EmptyContent: 0};
object[0] = 'EmptyContent';
object.AutomodViolation = 1;
object[1] = 'AutomodViolation';
object.EmptyTags = 2;
object[2] = 'EmptyTags';
object.ApiValidation = 3;
object[3] = 'ApiValidation';
(FileImportTrackerModule).fileFinishedImporting('modules/forums/FormError.tsx');
exports.FormSubmitErrorType = object;
exports.makeEmptyTitleError = function() {
return makeEmptyContentError(require(dependencyMap[0]).intl.string(require(dependencyMap[0]).t['71wuR0']));
};
@@ -29,26 +32,42 @@ function _fun84360(global, require, importDefault, importAll, module, exports, d
exports.makeApiNameValidationError = makeApiNameValidationError;
exports.makeEmptyTagsError = makeEmptyTagsError;
exports.renderError = renderError;
function makeEmptyContentError(a0) { // fn#84362, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11197:336, offset: 0x01f47128, size: 30 bytes, params: 2, frame: 13
const formSubmitErrorBinding = formSubmitError;
const EmptyContent = env0_2.EmptyContent;
return formSubmitErrorBinding(EmptyContent, a0);
}
function makeAutomodViolationError(a0, a1) { // fn#84365, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11197:779, offset: 0x01f471d4, size: 81 bytes, params: 3, frame: 17
const formSubmitErrorBinding = formSubmitError;
const AutomodViolation = env0_2.AutomodViolation;
const value = undefined;
const getAutomodErrorMessageFromErrorResponse = AutomodErrorUtilsModule.getAutomodErrorMessageFromErrorResponse;
return formSubmitErrorBinding(AutomodViolation, Reflect.apply(getAutomodErrorMessageFromErrorResponse,
AutomodErrorUtilsModule, [a0, a1 == null ? value : a1.id]));
}
function makeApiNameValidationError() { // fn#84366, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11197:963, offset: 0x01f47225, size: 81 bytes, params: 1, frame: 17
const formSubmitErrorBinding = formSubmitError;
const ApiValidation = env0_2.ApiValidation;
const intl = (IndexNativeModule).intl;
return formSubmitErrorBinding(ApiValidation,
intl.string((IndexNativeModule).t['71wuR0']));
}
function makeEmptyTagsError() { // fn#84367, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11197:1104, offset: 0x01f47276, size: 83 bytes, params: 1, frame: 17
const formSubmitErrorBinding = formSubmitError;
const EmptyTags = env0_2.EmptyTags;
const intl = (IndexNativeModule).intl;
return formSubmitErrorBinding(EmptyTags,
intl.string((IndexNativeModule).t.xPfNQi));
}
function renderError(a0, a1) { // fn#84368, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11197:1223, offset: 0x01f472c9, size: 155 bytes, params: 3, frame: 14
const value = null;
return value == a0 ? value : a0.type !== env0_2.EmptyContent || value == a1.content ? a0.type !== env0_2.EmptyTags || value == a1.tags ? value != a0.message ? a0.message : value : a1.tags.length > 0 ? value : value != a0.message ? a0.message : value : a1.content.trim().length > 0 ? value : a0.type !== env0_2.EmptyTags || value == a1.tags ? value != a0.message ? a0.message : value : a1.tags.length > 0 ? value : value != a0.message ? a0.message : value;
}
}
function makeApiNameValidationError() { // fn#84366, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11197:963, offset: 0x01f47225, size: 81 bytes, params: 1, frame: 17
const formSubmitErrorBinding = formSubmitError;
const ApiValidation = env0_2.ApiValidation;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
return formSubmitErrorBinding(ApiValidation,
intl.string((require(1244) /* metro dependency 1244: indexNative */).t['71wuR0']));
}
function makeEmptyTagsError() { // fn#84367, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11197:1104, offset: 0x01f47276, size: 83 bytes, params: 1, frame: 17
const formSubmitErrorBinding = formSubmitError;
const EmptyTags = env0_2.EmptyTags;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
return formSubmitErrorBinding(EmptyTags,
intl.string((require(1244) /* metro dependency 1244: indexNative */).t.xPfNQi));
}
function renderError(a0, a1) { // fn#84368, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11197:1223, offset: 0x01f472c9, size: 155 bytes, params: 3, frame: 14
const value = null;
return value == a0 ? value : a0.type !== env0_2.EmptyContent || value == a1.content ? a0.type !== env0_2.EmptyTags || value == a1.tags ? value != a0.message ? a0.message : value : a1.tags.length > 0 ? value : value != a0.message ? a0.message : value : a1.content.trim().length > 0 ? value : a0.type !== env0_2.EmptyTags || value == a1.tags ? value != a0.message ? a0.message : value : a1.tags.length > 0 ? value : value != a0.message ? a0.message : value;
}
global.__d(_fun84360, 11011, [1244, 7246, 2]) /* metro module 11011, dependencies: [1244, 7246, 2] */;
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
+135 -111
View File
@@ -1,135 +1,159 @@
/* Metro module 11547; source: modules/forums/ForumChannelStore.tsx; dependencies: [7, 6, 1379, 1389, 1388, 1390, 690, 44, 7160, 629, 566, 2] */
import ClassCallCheck from '../../by-id/module-00006-ClassCallCheck.js'; /* Metro dependency 6 */
import CreateClass from '../../by-id/module-00007-CreateClass.js'; /* Metro dependency 7 */
import ChannelStore from '../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import ForumChannelAnalyticsManager from './tracking/ForumChannelAnalyticsManager.tsx'; /* Metro dependency 7160 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as FluxModule from '../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as Module00629Module from '../../by-id/module-00629.js'; /* Metro dependency 629 */
import * as ReactBatchUpdatesNativeModule from '../../external/discord_common/js/shared/utils/ReactBatchUpdates.native.tsx'; /* Metro dependency 690 */
import * as ThreadSortOrderModule from '../../external/discord_common/js/shared/shared-constants/ThreadSortOrder.tsx'; /* Metro dependency 1388 */
import * as ForumLayoutModule from '../../external/discord_common/js/shared/shared-constants/ForumLayout.tsx'; /* Metro dependency 1389 */
import * as ThreadSearchTagSettingModule from '../../external/discord_common/js/shared/shared-constants/ThreadSearchTagSetting.tsx'; /* Metro dependency 1390 */
function _fun88510(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#88510, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11733:6, offset: 0x01fe62e4, size: 340 bytes, params: 8, frame: 20
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const value = importDefault(7) /* metro dependency 7 */;
const env0_3 = importDefault(6) /* metro dependency 6 */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const Set = global.Set;
const set = new Set();
object2 = {};
const ForumLayout = (require(1389) /* metro dependency 1389: ForumLayout */).ForumLayout;
object = {};
const ForumLayout = (ForumLayoutModule).ForumLayout;
const LIST = ForumLayout.LIST;
object2.layoutType = LIST;
const ThreadSortOrder = (require(1388) /* metro dependency 1388: ThreadSortOrder */).ThreadSortOrder;
object.layoutType = LIST;
const ThreadSortOrder = (ThreadSortOrderModule).ThreadSortOrder;
const CREATION_DATE = ThreadSortOrder.CREATION_DATE;
object2.sortOrder = CREATION_DATE;
object2.tagFilter = set;
const ThreadSearchTagSetting = (require(1390) /* metro dependency 1390: ThreadSearchTagSetting */).ThreadSearchTagSetting;
object.sortOrder = CREATION_DATE;
object.tagFilter = set;
const ThreadSearchTagSetting = (ThreadSearchTagSettingModule).ThreadSearchTagSetting;
const MATCH_SOME = ThreadSearchTagSetting.MATCH_SOME;
object2.tagSetting = MATCH_SOME;
const env0_7 = value(ForumChannelStoreState);
const env0_8 = (require(629) /* metro dependency 629 */).create(_fun88520);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/forums/ForumChannelStore.tsx');
object.tagSetting = MATCH_SOME;
const env0_7 = CreateClass(ForumChannelStoreState);
const env0_8 = (Module00629Module).create(_fun88520);
(FileImportTrackerModule).fileFinishedImporting('modules/forums/ForumChannelStore.tsx');
exports.useForumChannelStore = useForumChannelStore;
exports.useForumChannelStoreApi = useForumChannelStoreApi;
}
function ForumChannelStoreState(a0, a1) { // fn#88511, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11733:294, offset: 0x01fe6438, size: 149 bytes, params: 3, frame: 14
ClassCallCheck(this, ForumChannelStoreState);
this.set = a0;
this.get = a1;
this.channelStates = {};
this.setChannelState = setChannelState;
this.getChannelState = getChannelState;
this.toggleTagFilter = toggleTagFilter;
this.setTagFilter = setTagFilter;
this.setSortOrder = setSortOrder_88517;
this.setLayoutType = setLayoutType;
this.setTagSetting = setTagSetting_88519;
function setChannelState(a0, a1) { // fn#88512, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11733:427, owner: ForumChannelStoreState.setChannelState, offset: 0x01fe64cd, size: 122 bytes, params: 3, frame: 14
var environment;
const binding = env0_0;
let value = binding.get();
const channelState = binding.getChannelState(a0);
const object = {};
copyDataProperties(object, value.channelStates, channelState);
const object2 = {};
copyDataProperties(object2, a1, copyDataProperties(object2, channelState, channelState));
object[a0] = object2;
value = environment.__proto__;
(ReactBatchUpdatesNativeModule).batchUpdates(_fun88513);
function _fun88513() { // fn#88513, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11733:540, offset: 0x01fe6547, size: 33 bytes, params: 1, frame: 12
return env1_0.set({channelStates: env0_0});
}
function ForumChannelStoreState(a0, a1) { // fn#88511, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11733:294, offset: 0x01fe6438, size: 149 bytes, params: 3, frame: 14
env0_3(this, ForumChannelStoreState);
this.set = a0;
this.get = a1;
this.channelStates = {};
this.setChannelState = setChannelState;
this.getChannelState = getChannelState;
this.toggleTagFilter = toggleTagFilter;
this.setTagFilter = setTagFilter;
this.setSortOrder = setSortOrder;
this.setLayoutType = setLayoutType;
this.setTagSetting = setTagSetting;
}
}
function useForumChannelStore(a0) { // fn#88521, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11733:1524, offset: 0x01fe6798, size: 97 bytes, params: 2, frame: 17
const env0_0 = a0;
const value2 = env0_8();
const fluxModule = require(566) /* metro dependency 566: flux */;
const useStateFromStores = fluxModule.useStateFromStores;
return Reflect.apply(useStateFromStores, fluxModule, [[ChannelStore],
_fun88522]) == null ? env0_6 : value2.getChannelState(a0);
}
function getChannelState(a0) { // fn#88514, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11733:596, owner: ForumChannelStoreState.getChannelState, offset: 0x01fe6568, size: 167 bytes, params: 2, frame: 16
var r0;
var value;
var channel;
var object;
if (a0 == null) {
value = environment.__proto__;
return env1_6;
}
const binding = env0_0;
const get = binding.get;
const property = Reflect.apply(get, binding, []).channelStates[a0];
if (property != null) {
r0 = property;
} else {
value = environment.__proto__;
channel = ChannelStore.getChannel(a0);
(importDefault(44) /* metro dependency 44 */)(channel != null,
'[Forum Channel Store] The channel should not be missing.');
object = {};
object.layoutType = channel.getDefaultLayout();
object.sortOrder = channel.getDefaultSortOrder();
object.tagFilter = env1_5;
object.tagSetting = channel.getDefaultTagSetting();
r0 = object;
}
return r0;
}
function setChannelState(a0, a1) { // fn#88512, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11733:427, owner: ForumChannelStoreState.setChannelState, offset: 0x01fe64cd, size: 122 bytes, params: 3, frame: 14
var environment;
const binding = env0_0;
let value = binding.get();
const channelState = binding.getChannelState(a0);
const object3 = {};
copyDataProperties(object3, value.channelStates, channelState);
const object4 = {};
copyDataProperties(object4, a1, copyDataProperties(object4, channelState, channelState));
object3[a0] = object4;
value = environment.__proto__;
(require(690) /* metro dependency 690: ReactBatchUpdatesNative */).batchUpdates(_fun88513);
}
function toggleTagFilter(a0, a1) { // fn#88515, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11733:913, owner: ForumChannelStoreState.toggleTagFilter, offset: 0x01fe660f, size: 113 bytes, params: 3, frame: 15
const channelState = env0_0.getChannelState(a0);
const Set = global.Set;
const set = new Set(channelState.tagFilter);
if (set.has(a1)) {
set.delete(a1);
} else {
set.add(a1);
}
env0_0.setTagFilter(a0, set);
}
function setTagFilter(a0, a1) { // fn#88516, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11733:1046, owner: ForumChannelStoreState.setTagFilter, offset: 0x01fe6680, size: 70 bytes, params: 3, frame: 14
env0_0.setChannelState(a0, {tagFilter: a1});
const value = environment.__proto__;
(ForumChannelAnalyticsManager).setFilterTagIds(a1);
}
function ForumChannelStoreStateSetSortOrder(a0, a1) { // fn#88517, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11733:1138, owner: ForumChannelStoreState.setSortOrder, offset: 0x01fe66c6, size: 70 bytes, params: 3, frame: 14
env0_0.setChannelState(a0, {sortOrder: a1});
const value = environment.__proto__;
(ForumChannelAnalyticsManager).setSortOrder(a1);
}
function setLayoutType(a0, a1) { // fn#88518, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11733:1228, owner: ForumChannelStoreState.setLayoutType, offset: 0x01fe670c, size: 70 bytes, params: 3, frame: 14
env0_0.setChannelState(a0, {layoutType: a1});
const value = environment.__proto__;
(ForumChannelAnalyticsManager).setLayout(a1);
}
function ForumChannelStoreStateSetTagSetting(a0, a1) { // fn#88519, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11733:1316, owner: ForumChannelStoreState.setTagSetting, offset: 0x01fe6752, size: 70 bytes, params: 3, frame: 14
env0_0.setChannelState(a0, {tagSetting: a1});
const value = environment.__proto__;
(ForumChannelAnalyticsManager).setTagSetting(a1);
}
function getChannelState(a0) { // fn#88514, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11733:596, owner: ForumChannelStoreState.getChannelState, offset: 0x01fe6568, size: 167 bytes, params: 2, frame: 16
var r0;
var value;
var channel;
var object2;
if (a0 == null) {
value = environment.__proto__;
return env1_6;
}
const binding = env0_0;
const get = binding.get;
const property = Reflect.apply(get, binding, []).channelStates[a0];
if (property != null) {
r0 = property;
} else {
value = environment.__proto__;
channel = ChannelStore.getChannel(a0);
(importDefault(44) /* metro dependency 44 */)(channel != null,
'[Forum Channel Store] The channel should not be missing.');
object2 = {};
object2.layoutType = channel.getDefaultLayout();
object2.sortOrder = channel.getDefaultSortOrder();
object2.tagFilter = env1_5;
object2.tagSetting = channel.getDefaultTagSetting();
r0 = object2;
function _fun88520(a0, a1) { // fn#88520, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11733:1410, offset: 0x01d46b6a, size: 35 bytes, params: 3, frame: 13
const binding = env0_7;
const value = Object.create(binding.prototype, {constructor: {value: binding}});
const binding2 = new binding(a0, a1);
return binding2 instanceof Object ? binding2 : value;
}
return r0;
}
function toggleTagFilter(a0, a1) { // fn#88515, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11733:913, owner: ForumChannelStoreState.toggleTagFilter, offset: 0x01fe660f, size: 113 bytes, params: 3, frame: 15
const channelState = env0_0.getChannelState(a0);
const Set = global.Set;
const set = new Set(channelState.tagFilter);
if (set.has(a1)) {
set.delete(a1);
} else {
set.add(a1);
function useForumChannelStore(a0) { // fn#88521, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11733:1524, offset: 0x01fe6798, size: 97 bytes, params: 2, frame: 17
const env0_0 = a0;
const value2 = env0_8();
const useStateFromStores = FluxModule.useStateFromStores;
return Reflect.apply(useStateFromStores, FluxModule, [[ChannelStore],
_fun88522]) == null ? env0_6 : value2.getChannelState(a0);
function _fun88522() { // fn#88522, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11733:1584, offset: 0x01dcad0c, size: 26 bytes, params: 1, frame: 11
return ChannelStore.getChannel(env0_0);
}
}
env0_0.setTagFilter(a0, set);
}
function setTagFilter(a0, a1) { // fn#88516, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11733:1046, owner: ForumChannelStoreState.setTagFilter, offset: 0x01fe6680, size: 70 bytes, params: 3, frame: 14
env0_0.setChannelState(a0, {tagFilter: a1});
const value = environment.__proto__;
(importDefault(7160) /* metro dependency 7160: ForumChannelAnalyticsManager */).setFilterTagIds(a1);
}
function useForumChannelStoreApi() { // fn#88523, offset: 0x00c539ad, size: 9 bytes, params: 1, frame: 1
return env0_8;
}
function ForumChannelStoreStateSetSortOrder(a0, a1) { // fn#88517, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11733:1138, owner: ForumChannelStoreState.setSortOrder, offset: 0x01fe66c6, size: 70 bytes, params: 3, frame: 14
env0_0.setChannelState(a0, {sortOrder: a1});
const value = environment.__proto__;
(importDefault(7160) /* metro dependency 7160: ForumChannelAnalyticsManager */).setSortOrder(a1);
}
function setLayoutType(a0, a1) { // fn#88518, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11733:1228, owner: ForumChannelStoreState.setLayoutType, offset: 0x01fe670c, size: 70 bytes, params: 3, frame: 14
env0_0.setChannelState(a0, {layoutType: a1});
const value = environment.__proto__;
(importDefault(7160) /* metro dependency 7160: ForumChannelAnalyticsManager */).setLayout(a1);
}
function ForumChannelStoreStateSetTagSetting(a0, a1) { // fn#88519, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11733:1316, owner: ForumChannelStoreState.setTagSetting, offset: 0x01fe6752, size: 70 bytes, params: 3, frame: 14
env0_0.setChannelState(a0, {tagSetting: a1});
const value = environment.__proto__;
(importDefault(7160) /* metro dependency 7160: ForumChannelAnalyticsManager */).setTagSetting(a1);
}
function _fun88513() { // fn#88513, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11733:540, offset: 0x01fe6547, size: 33 bytes, params: 1, frame: 12
return env1_0.set({channelStates: env0_0});
}
global.__d(_fun88510, 11547, [7, 6, 1379, 1389, 1388, 1390, 690, 44, 7160, 629, 566,
2]) /* metro module 11547, dependencies: [7, 6, 1379, 1389, 1388, 1390, 690, 44, 7160, 629, 566, 2] */;
+4 -1
View File
@@ -1,9 +1,12 @@
/* Metro module 6895; source: modules/forums/ForumChannelTypes.tsx; dependencies: [2] */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun54745(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#54745, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7073:6, offset: 0x0136d387, size: 92 bytes, params: 8, frame: 15
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/forums/ForumChannelTypes.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/forums/ForumChannelTypes.tsx');
exports.ReservedTagIds = {'HARASSMENT': '1000', 'SPAM': '1001', 'BAN_EVASION': '1002', 'SERVER_RULES': '1003',
'MULTIPLE_REPORTS': '1004', 'RESOLVED': '1005'};
}
global.__d(_fun54745, 6895, [2]) /* metro module 6895, dependencies: [2] */;
+9 -6
View File
@@ -1,12 +1,14 @@
/* Metro module 6900; source: modules/forums/ForumConstants.tsx; dependencies: [2] */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun54883(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#54883, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7078:6, offset: 0x013703bd, size: 241 bytes, params: 8, frame: 17
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const object = {DURATION_AGO: 0};
object[0] = 'DURATION_AGO';
object.POSTED_DURATION_AGO = 1;
object[1] = 'POSTED_DURATION_AGO';
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/forums/ForumConstants.tsx');
const object2 = {DURATION_AGO: 0};
object2[0] = 'DURATION_AGO';
object2.POSTED_DURATION_AGO = 1;
object2[1] = 'POSTED_DURATION_AGO';
(FileImportTrackerModule).fileFinishedImporting('modules/forums/ForumConstants.tsx');
exports.FORUM_GUIDELINES_ACTION_SHEET = 'forum-guidelines-action-sheet';
exports.MAX_FORUM_TAGS = 20;
exports.MAX_FORUM_POST_TAGS = 5;
@@ -14,6 +16,7 @@ function _fun54883(global, require, importDefault, importAll, module, exports, d
exports.ForumOnboardingCTAs = {PERMISSIONS: 'Permissions', GUIDELINES: 'Guidelines',
RECOMMENDED_TAGS: 'Recommended Tags', TAGS: 'Tags', DEFAULT_REACTION: 'Default Reaction',
CREATE_POST: 'Create Post'};
exports.ForumTimestampFormats = object;
exports.ForumTimestampFormats = object2;
}
global.__d(_fun54883, 6900, [2]) /* metro module 6900, dependencies: [2] */;
@@ -1,96 +1,103 @@
/* Metro module 11024; source: modules/forums/ForumGuidelinesManager.tsx; dependencies: [6, 7, 15, 17, 18, 587, 4860, 2] */
import ClassCallCheck from '../../by-id/module-00006-ClassCallCheck.js'; /* Metro dependency 6 */
import CreateClass from '../../by-id/module-00007-CreateClass.js'; /* Metro dependency 7 */
import PossibleConstructorReturn from '../../by-id/module-00015-PossibleConstructorReturn.js'; /* Metro dependency 15 */
import Module00017 from '../../by-id/module-00017.js'; /* Metro dependency 17 */
import Inherits from '../../by-id/module-00018-Inherits.js'; /* Metro dependency 18 */
import AutomaticLifecycleManager from '../../lib/AutomaticLifecycleManager.tsx'; /* Metro dependency 4860 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as StorageModule from '../../external/discord_common/js/packages/storage/Storage.tsx'; /* Metro dependency 587 */
function _fun84426(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#84426, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11210:6, offset: 0x01f49fc8, size: 226 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(6) /* metro dependency 6 */;
const env0_3 = importDefault(7) /* metro dependency 7 */;
const env0_4 = importDefault(15) /* metro dependency 15 */;
const env0_5 = importDefault(17) /* metro dependency 17 */;
const env0_6 = importDefault(18) /* metro dependency 18 */;
let value = importDefault(4860) /* metro dependency 4860: AutomaticLifecycleManager */;
let value = AutomaticLifecycleManager;
value = _fun84430(value);
value = new value();
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/forums/ForumGuidelinesManager.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/forums/ForumGuidelinesManager.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_84427() { // fn#84427, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11210:148, offset: 0x01f4a0aa, size: 98 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
function _isNativeReflectConstruct_84427() { // fn#84427, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11210:148, offset: 0x01f4a0aa, size: 98 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
}
return (_isNativeReflectConstruct_84427_isNativeReflectConstruct = function() {
return !!result;
})();
}
return (_isNativeReflectConstruct_84427_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun84430(a0) { // fn#84430, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11210:380, offset: 0x01f4a10c, size: 147 bytes, params: 2, frame: 16
const closure = ForumGuidelinesManager;
env0_6(closure, a0);
return env0_3(closure, [{key: '_initialize', value: value_84432}, {key: '_terminate', value: function() {
var Storage = require(dependencyMap[5]).Storage;
Storage.set('formGuidelinesStorageKey', this.seenForumGuidelines);
}}, {key: 'markAsSeen', value: function(a0) {
this.seenForumGuidelines.add(a0);
require(dependencyMap[5]).Storage.set('formGuidelinesStorageKey', this.seenForumGuidelines);
}}, {key: 'hasSeen', value: function(a0) {
return this.seenForumGuidelines.has(a0);
}}]);
}
function _fun84430(a0) { // fn#84430, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11210:380, offset: 0x01f4a10c, size: 147 bytes, params: 2, frame: 16
const ForumGuidelinesManager2 = ForumGuidelinesManager;
Inherits(ForumGuidelinesManager2, a0);
return CreateClass(ForumGuidelinesManager2, [{key: '_initialize', value: value_84432}, {key: '_terminate',
value: function() {
var Storage = require(dependencyMap[5]).Storage;
Storage.set('formGuidelinesStorageKey', this.seenForumGuidelines);
}}, {key: 'markAsSeen', value: function(a0) {
this.seenForumGuidelines.add(a0);
require(dependencyMap[5]).Storage.set('formGuidelinesStorageKey', this.seenForumGuidelines);
}}, {key: 'hasSeen', value: function(a0) {
return this.seenForumGuidelines.has(a0);
}}]);
function ForumGuidelinesManager(a0) { // fn#84431, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11210:392, offset: 0x01f4a19f, size: 160 bytes, params: 2, frame: 19
var r0;
var Reflect;
let value = copyRestArgs(0, undefined);
let binding = env1_2;
binding(this, ForumGuidelinesManager);
const items2 = [];
arraySpread(items2, value, 0, items2);
value = env1_5(ForumGuidelinesManager);
binding = env1_4;
if (_isNativeReflectConstruct_84427()) {
Reflect = global.Reflect;
value = Reflect.construct(value, items2, env1_5(this).constructor);
r0 = value;
} else {
value = value.apply(this, items2);
r0 = value;
}
value = binding(this, r0);
const Set = global.Set;
const value4 = Object.create(Set.prototype, {constructor: {value: Set}});
const set = new Set();
value.seenForumGuidelines = set instanceof Object ? set : value4;
return value;
}
function ForumGuidelinesManager(a0) { // fn#84431, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11210:392, offset: 0x01f4a19f, size: 160 bytes, params: 2, frame: 19
var r0;
var Reflect;
let value = copyRestArgs(0, undefined);
let binding = env1_2;
binding(this, ForumGuidelinesManager);
const items2 = [];
arraySpread(items2, value, 0, items2);
value = env1_5(ForumGuidelinesManager);
binding = env1_4;
if (_isNativeReflectConstruct_84427()) {
Reflect = global.Reflect;
value = Reflect.construct(value, items2, env1_5(this).constructor);
r0 = value;
} else {
value = value.apply(this, items2);
r0 = value;
}
value = binding(this, r0);
const Set = global.Set;
const value4 = Object.create(Set.prototype, {constructor: {value: Set}});
const set = new Set();
value.seenForumGuidelines = set instanceof Object ? set : value4;
return value;
}
function value_84432() { // fn#84432, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11210:762, offset: 0x01f4a23f, size: 95 bytes, params: 1, frame: 12
let value = environment.__proto__;
const Storage = (StorageModule).Storage;
value = Storage.get('formGuidelinesStorageKey');
if (value != null) {
this.seenForumGuidelines = new global.Set(value);
}
}
function value_84432() { // fn#84432, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11210:762, offset: 0x01f4a23f, size: 95 bytes, params: 1, frame: 12
let value = environment.__proto__;
const Storage = (require(587) /* metro dependency 587: Storage */).Storage;
value = Storage.get('formGuidelinesStorageKey');
if (value != null) {
this.seenForumGuidelines = new global.Set(value);
}
}
global.__d(_fun84426, 11024, [6, 7, 15, 17, 18, 587, 4860,
2]) /* metro module 11024, dependencies: [6, 7, 15, 17, 18, 587, 4860, 2] */;
File diff suppressed because it is too large. Load diff
+82 -77
View File
@@ -1,89 +1,94 @@
/* Metro module 15714; source: modules/forums/ForumManager.tsx; dependencies: [6, 7, 15, 17, 18, 1379, 1386, 6896, 4860, 2] */
import ClassCallCheck from '../../by-id/module-00006-ClassCallCheck.js'; /* Metro dependency 6 */
import CreateClass from '../../by-id/module-00007-CreateClass.js'; /* Metro dependency 7 */
import PossibleConstructorReturn from '../../by-id/module-00015-PossibleConstructorReturn.js'; /* Metro dependency 15 */
import Module00017 from '../../by-id/module-00017.js'; /* Metro dependency 17 */
import Inherits from '../../by-id/module-00018-Inherits.js'; /* Metro dependency 18 */
import ChannelStore from '../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import AutomaticLifecycleManager from '../../lib/AutomaticLifecycleManager.tsx'; /* Metro dependency 4860 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ChannelConstantsModule from '../channel/ChannelConstants.tsx'; /* Metro dependency 1386 */
function _fun120593(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#120593, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15922:6, offset: 0x025309c3, size: 264 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(6) /* metro dependency 6 */;
const env0_3 = importDefault(7) /* metro dependency 7 */;
const env0_4 = importDefault(15) /* metro dependency 15 */;
const env0_5 = importDefault(17) /* metro dependency 17 */;
const env0_6 = importDefault(18) /* metro dependency 18 */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const env0_8 = (require(1386) /* metro dependency 1386: ChannelConstants */).isStaticChannelRoute;
let value = importDefault(4860) /* metro dependency 4860: AutomaticLifecycleManager */;
let value = AutomaticLifecycleManager;
value = _fun120597(value);
value = new value();
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/forums/ForumManager.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/forums/ForumManager.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_120594() { // fn#120594, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15922:189, offset: 0x02530acb, size: 98 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
}
return (_isNativeReflectConstruct_120594_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun120597(a0) { // fn#120597, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15922:392, offset: 0x02530b2d, size: 74 bytes, params: 2, frame: 15
const closure = ForumManager;
env0_6(closure, a0);
return env0_3(closure, [{key: 'handleChannelPreload', value: value_120599}]);
}
function ForumManager(a0) { // fn#120598, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15922:404, offset: 0x02530b77, size: 147 bytes, params: 2, frame: 19
var r0;
var Reflect;
let value = copyRestArgs(0, undefined);
let binding = env1_2;
binding(this, ForumManager);
const items = [];
arraySpread(items, value, 0, items);
value = env1_5(ForumManager);
binding = env1_4;
if (_isNativeReflectConstruct_120594()) {
Reflect = global.Reflect;
value = Reflect.construct(value, items, env1_5(this).constructor);
r0 = value;
} else {
value = value.apply(this, items);
r0 = value;
}
value = binding(this, r0);
value.actions = {CHANNEL_PRELOAD: value.handleChannelPreload};
return value;
}
function value_120599({channelId}) { // fn#120599, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15922:754, offset: 0x02530c0a, size: 94 bytes, params: 2, frame: 13
var channel;
const value = environment.__proto__;
if (!isStaticChannelRoute(channelId)) {
channel = ChannelStore.getChannel(channelId);
if (channel != null && channel.isForumLikeChannel()) {
(require(6896) /* metro dependency 6896: ForumPostDataLoader */).preloadForumThreads(channel);
function _isNativeReflectConstruct_120594() { // fn#120594, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15922:189, offset: 0x02530acb, size: 98 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
}
return (_isNativeReflectConstruct_120594_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun120597(a0) { // fn#120597, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15922:392, offset: 0x02530b2d, size: 74 bytes, params: 2, frame: 15
const ForumManager2 = ForumManager;
Inherits(ForumManager2, a0);
return CreateClass(ForumManager2, [{key: 'handleChannelPreload', value: value_120599}]);
function ForumManager(a0) { // fn#120598, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15922:404, offset: 0x02530b77, size: 147 bytes, params: 2, frame: 19
var r0;
var Reflect;
let value = copyRestArgs(0, undefined);
let binding = env1_2;
binding(this, ForumManager);
const items2 = [];
arraySpread(items2, value, 0, items2);
value = env1_5(ForumManager);
binding = env1_4;
if (_isNativeReflectConstruct_120594()) {
Reflect = global.Reflect;
value = Reflect.construct(value, items2, env1_5(this).constructor);
r0 = value;
} else {
value = value.apply(this, items2);
r0 = value;
}
value = binding(this, r0);
value.actions = {CHANNEL_PRELOAD: value.handleChannelPreload};
return value;
}
function value_120599({channelId}) { // fn#120599, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15922:754, offset: 0x02530c0a, size: 94 bytes, params: 2, frame: 13
var channel;
const value = environment.__proto__;
if (!isStaticChannelRoute(channelId)) {
channel = ChannelStore.getChannel(channelId);
if (channel != null && channel.isForumLikeChannel()) {
(require(6896) /* metro dependency 6896: ForumPostDataLoader */).preloadForumThreads(channel);
}
}
}
}
}
global.__d(_fun120593, 15714, [6, 7, 15, 17, 18, 1379, 1386, 6896, 4860,
2]) /* metro module 15714, dependencies: [6, 7, 15, 17, 18, 1379, 1386, 6896, 4860, 2] */;
@@ -1,80 +1,84 @@
/* Metro module 12061; source: modules/forums/ForumPlatformHooks.native.tsx; dependencies: [31, 4008, 4007, 9623, 2] */
import ForumChannelSeenManager from './tracking/ForumChannelSeenManager.tsx'; /* Metro dependency 9623 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as RootNavigationRefNativeModule from '../main_tabs_v2/RootNavigationRef.native.tsx'; /* Metro dependency 4008 */
function _fun92694(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#92694, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12247:6, offset: 0x020951bd, size: 128 bytes, params: 8, frame: 18
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
object2 = {useForumChannelSeenManager: useForumChannelSeenManager};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/forums/ForumPlatformHooks.native.tsx');
exports.default = object2;
}
function useForumChannelSeenManager({guildId, channelId}) { // fn#92695, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12247:140, offset: 0x0209523d, size: 135 bytes, params: 2, frame: 17
const binding = env0_3;
const value = binding.useRef(null);
const value2 = binding.useCallback(_fun92696, [channelId]);
binding.useEffect(_fun92697);
binding.useLayoutEffect(_fun92699, [channelId, guildId, value2]);
return value.current;
}
function _fun92696() { // fn#92696, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12247:239, offset: 0x020952c4, size: 153 bytes, params: 1, frame: 14
var r3;
var currentRoute;
var current;
let value = environment.__proto__;
const rootNavigationRef = (require(4008) /* metro dependency 4008: RootNavigationRefNative */).getRootNavigationRef();
if (rootNavigationRef != null) {
if (rootNavigationRef.isReady()) {
currentRoute = rootNavigationRef.getCurrentRoute();
value = require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */;
value = value.coerceChannelRoute(currentRoute);
r3 = value != null && value.params.channelId === channelId;
current = env0_2.current;
if (current != null) {
current.handleReactNavigationFocus(r3);
object = {useForumChannelSeenManager: useForumChannelSeenManager};
(FileImportTrackerModule).fileFinishedImporting('modules/forums/ForumPlatformHooks.native.tsx');
exports.default = object;
function useForumChannelSeenManager({guildId, channelId}) { // fn#92695, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12247:140, offset: 0x0209523d, size: 135 bytes, params: 2, frame: 17
const value = ReactModule.useRef(null);
const value2 = ReactModule.useCallback(_fun92696, [channelId]);
ReactModule.useEffect(_fun92697);
ReactModule.useLayoutEffect(_fun92699, [channelId, guildId, value2]);
return value.current;
function _fun92696() { // fn#92696, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12247:239, offset: 0x020952c4, size: 153 bytes, params: 1, frame: 14
var r3;
var currentRoute;
var current;
let value = environment.__proto__;
const rootNavigationRef = (RootNavigationRefNativeModule).getRootNavigationRef();
if (rootNavigationRef != null) {
if (rootNavigationRef.isReady()) {
currentRoute = rootNavigationRef.getCurrentRoute();
value = require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */;
value = value.coerceChannelRoute(currentRoute);
r3 = value != null && value.params.channelId === channelId;
current = env0_2.current;
if (current != null) {
current.handleReactNavigationFocus(r3);
}
}
}
}
}
}
function _fun92697() { // fn#92697, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12247:481, offset: 0x0209535d, size: 94 bytes, params: 1, frame: 14
var environment;
let value = environment.__proto__;
value = require(4008) /* metro dependency 4008: RootNavigationRefNative */;
value = value.getRootNavigationRef();
if (value != null) {
if (value.isReady()) {
value.addListener('state', env0_3);
return _fun92698;
function _fun92697() { // fn#92697, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12247:481, offset: 0x0209535d, size: 94 bytes, params: 1, frame: 14
var environment;
let value = environment.__proto__;
value = require(4008) /* metro dependency 4008: RootNavigationRefNative */;
value = value.getRootNavigationRef();
if (value != null) {
if (value.isReady()) {
value.addListener('state', ReactModule);
return _fun92698;
}
}
function _fun92698() { // fn#92698, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12247:579, offset: 0x020953bb, size: 34 bytes, params: 1, frame: 13
env0_0.removeListener('state', env1_3);
}
}
function _fun92699() { // fn#92699, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12247:635, offset: 0x020953dd, size: 113 bytes, params: 1, frame: 14
const binding = env0_2;
const defaultImport = ForumChannelSeenManager;
const object = {};
object.guildId = guildId;
object.channelId = channelId;
const value3 = Object.create(defaultImport.prototype, {constructor: {value: defaultImport}});
const defaultImport2 = new defaultImport(object);
binding.current = defaultImport2 instanceof Object ? defaultImport2 : value3;
binding.current.initialize();
ReactModule();
return _fun92700;
function _fun92700() { // fn#92700, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12247:715, offset: 0x0209544e, size: 42 bytes, params: 1, frame: 11
const current = env1_2.current;
if (current != null) {
current.terminate();
}
env1_2.current = null;
}
}
}
}
function _fun92699() { // fn#92699, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12247:635, offset: 0x020953dd, size: 113 bytes, params: 1, frame: 14
const binding = env0_2;
const defaultImport = importDefault(9623) /* metro dependency 9623: ForumChannelSeenManager */;
const object2 = {};
object2.guildId = guildId;
object2.channelId = channelId;
const value3 = Object.create(defaultImport.prototype, {constructor: {value: defaultImport}});
const defaultImport2 = new defaultImport(object2);
binding.current = defaultImport2 instanceof Object ? defaultImport2 : value3;
binding.current.initialize();
env0_3();
return _fun92700;
}
function _fun92698() { // fn#92698, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12247:579, offset: 0x020953bb, size: 34 bytes, params: 1, frame: 13
env0_0.removeListener('state', env1_3);
}
function _fun92700() { // fn#92700, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12247:715, offset: 0x0209544e, size: 42 bytes, params: 1, frame: 11
const current = env1_2.current;
if (current != null) {
current.terminate();
}
env1_2.current = null;
}
global.__d(_fun92694, 12061, [31, 4008, 4007, 9623,
2]) /* metro module 12061, dependencies: [31, 4008, 4007, 9623, 2] */;
@@ -1,11 +1,14 @@
/* Metro module 8121; source: modules/forums/ForumPlatformUtils.native.tsx; dependencies: [1244, 2] */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun65084(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#65084, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8306:6, offset: 0x01bc21b0, size: 101 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/ForumPlatformUtils.native.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/forums/ForumPlatformUtils.native.tsx');
exports.default = {getForumChannelPermissionText: function() {
return require(dependencyMap[0]).intl.string(require(dependencyMap[0]).t.LG9VAi);
}};
}
global.__d(_fun65084, 8121, [1244, 2]) /* metro module 8121, dependencies: [1244, 2] */;
File diff suppressed because it is too large. Load diff
+406 -398
View File
@@ -1,11 +1,23 @@
/* Metro module 9587; source: modules/forums/ForumPostMediaUtils.tsx; dependencies: [31, 6898, 1379, 4814, 1878, 661, 4631, 3829, 1391, 1471, 1360, 4627, 1909, 4630, 21, 2] */
import SnowflakeUtils from '../../utils/SnowflakeUtils.tsx'; /* Metro dependency 21 */
import ChannelStore from '../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import UserStore from '../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import MessageStore from '../../stores/MessageStore.tsx'; /* Metro dependency 4814 */
import ThreadMessageStore from '../threads/ThreadMessageStore.tsx'; /* Metro dependency 6898 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as ConstantsModule from '../../Constants.tsx'; /* Metro dependency 661 */
import * as ServerModule from '../../flow/Server.tsx'; /* Metro dependency 1909 */
import * as UserSettingsModule from '../user_settings/UserSettings.tsx'; /* Metro dependency 3829 */
import * as MediaFormatTestersModule from '../messages/MediaFormatTesters.tsx'; /* Metro dependency 4631 */
function _fun75075(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#75075, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9773:6, offset: 0x01da1bc0, size: 463 bytes, params: 8, frame: 25
const env0_0 = require;
const closure = isValidImageAttachment_75076;
const closure2 = isValidVideoAttachment_75077;
const closure3 = isMediaAttachment;
const closure4 = getForumPostMedia;
const closure5 = useForumPostComponentsMedia;
const isValidImageAttachment_750762 = isValidImageAttachment_75076;
const isValidVideoAttachment_750772 = isValidVideoAttachment_75077;
const isMediaAttachment2 = isMediaAttachment;
const getForumPostMedia2 = getForumPostMedia;
const useForumPostComponentsMedia2 = useForumPostComponentsMedia;
const closure6 = function(a0, a1) {
var r6;
var value2 = useForumPostMedia(a0);
@@ -16,15 +28,7 @@ function _fun75075(global, require, importDefault, importAll, module, exports, d
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const threadMessageStore = importDefault(6898) /* metro dependency 6898: ThreadMessageStore */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const messageStore = importDefault(4814) /* metro dependency 4814: MessageStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const constantsModule = require(661) /* metro dependency 661: Constants */;
const env0_8 = constantsModule.MessageAttachmentFlags;
const env0_9 = constantsModule.MessageEmbedMediaFlags;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/forums/ForumPostMediaUtils.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/forums/ForumPostMediaUtils.tsx');
exports.getEmbedColor = function(a0, a1) {
var color;
if (a0 != null) {
@@ -34,12 +38,12 @@ function _fun75075(global, require, importDefault, importAll, module, exports, d
}
}
};
exports.isValidImageAttachment = closure;
exports.isValidVideoAttachment = closure2;
exports.isMediaAttachment = closure3;
exports.isValidImageAttachment = isValidImageAttachment_750762;
exports.isValidVideoAttachment = isValidVideoAttachment_750772;
exports.isMediaAttachment = isMediaAttachment2;
exports.ForumPostMediaTypes = {EMBED: 'embed', ATTACHMENT: 'attachment', COMPONENT: 'component'};
exports.getForumPostMedia = closure4;
exports.useForumPostComponentsMedia = closure5;
exports.getForumPostMedia = getForumPostMedia2;
exports.useForumPostComponentsMedia = useForumPostComponentsMedia2;
exports.useForumPostMediaThumbnail = useForumPostMediaThumbnail;
exports.useForumPostMediaProperties = closure6;
exports.useFindFirstMediaProperties = useFindFirstMediaProperties;
@@ -48,410 +52,414 @@ function _fun75075(global, require, importDefault, importAll, module, exports, d
exports.messageContainsGifOrVideo = function(a0) {
return a0.reduce(_fun75099, {'containsVideo': false, 'containsGif': false});
};
}
function isValidImageAttachment_75076(a0) { // fn#75076, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9773:210, offset: 0x01da1d8f, size: 99 bytes, params: 2, frame: 15
if (a0 == null) {
return false;
}
const filename = a0.filename;
const height = a0.height;
const width = a0.width;
let value = require(4631) /* metro dependency 4631: MediaFormatTesters */;
value = value.isImageFile(filename);
let r0 = value && height != null && height > 0;
r0 = r0 && width != null && width > 0;
return r0;
}
function isValidVideoAttachment_75077(a0) { // fn#75077, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9773:361, offset: 0x01da1df2, size: 79 bytes, params: 2, frame: 15
var r1;
var r0;
let value = a0 != null;
if (value) {
value = a0 != null;
if (value) {
value = require(4631) /* metro dependency 4631: MediaFormatTesters */;
value = value.isVideoFile(a0.filename);
r1 = value;
} else {
r1 = value;
function isValidImageAttachment_75076(a0) { // fn#75076, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9773:210, offset: 0x01da1d8f, size: 99 bytes, params: 2, frame: 15
if (a0 == null) {
return false;
}
r1 = r1 && a0.proxy_url != null;
r0 = r1;
} else {
r0 = value;
const filename = a0.filename;
const height = a0.height;
const width = a0.width;
let value = MediaFormatTestersModule;
value = value.isImageFile(filename);
let r0 = value && height != null && height > 0;
r0 = r0 && width != null && width > 0;
return r0;
}
return r0;
}
function isMediaAttachment(a0) { // fn#75078, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9773:474, offset: 0x01da1e41, size: 31 bytes, params: 2, frame: 13
return isValidImageAttachment_75076(a0) || isValidVideoAttachment_75077(a0);
}
function getForumPostMedia(a0) { // fn#75079, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9773:662, offset: 0x01da1e60, size: 251 bytes, params: 2, frame: 15
var r3;
const value = a1;
const value2 = undefined;
if (value !== value2 ? value : (require(3829) /* metro dependency 3829: UserSettings */).InlineAttachmentMedia.getSetting()) {
r3 = (a0 == null || a0.messageSnapshots[0] == null ? value2 : a0.messageSnapshots[0].moderatorReport) != null ? a0 == null || a0.messageSnapshots[0] == null ? value2 : a0.messageSnapshots[0].message.attachments : a0 == null ? value2 : a0.attachments;
return a0 == null || r3 == null ? [] : r3.filter(isMediaAttachment).map(_fun75080).filter((require(1360) /* metro dependency 1360: GlobalUtils */).isNotNullish);
function isValidVideoAttachment_75077(a0) { // fn#75077, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9773:361, offset: 0x01da1df2, size: 79 bytes, params: 2, frame: 15
var r1;
var r0;
let value = a0 != null;
if (value) {
value = a0 != null;
if (value) {
value = require(4631) /* metro dependency 4631: MediaFormatTesters */;
value = value.isVideoFile(a0.filename);
r1 = value;
} else {
r1 = value;
}
r1 = r1 && a0.proxy_url != null;
r0 = r1;
} else {
r0 = value;
}
return r0;
}
return [];
}
function useForumPostMedia(a0) { // fn#75081, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9773:1632, offset: 0x01da20ef, size: 56 bytes, params: 2, frame: 13
const getForumPostMediaBinding = getForumPostMedia;
const InlineAttachmentMedia = (require(3829) /* metro dependency 3829: UserSettings */).InlineAttachmentMedia;
return getForumPostMediaBinding(a0, InlineAttachmentMedia.useSetting());
}
function isMediaAttachment(a0) { // fn#75078, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9773:474, offset: 0x01da1e41, size: 31 bytes, params: 2, frame: 13
return isValidImageAttachment_75076(a0) || isValidVideoAttachment_75077(a0);
}
function useForumPostEmbeds(a0, a1) { // fn#75082, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9773:1733, offset: 0x01da2127, size: 236 bytes, params: 3, frame: 19
var r0;
var value5;
const env0_0 = a1;
const value2 = undefined;
const InlineEmbedMedia = (require(3829) /* metro dependency 3829: UserSettings */).InlineEmbedMedia;
const value3 = InlineEmbedMedia.useSetting();
const RenderEmbeds = (require(3829) /* metro dependency 3829: UserSettings */).RenderEmbeds;
const value4 = RenderEmbeds.useSetting();
if (a0 == null) {
function getForumPostMedia(a0) { // fn#75079, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9773:662, offset: 0x01da1e60, size: 251 bytes, params: 2, frame: 15
var r3;
const value = a1;
const value2 = undefined;
if (value !== value2 ? value : (require(3829) /* metro dependency 3829: UserSettings */).InlineAttachmentMedia.getSetting()) {
r3 = (a0 == null || a0.messageSnapshots[0] == null ? value2 : a0.messageSnapshots[0].moderatorReport) != null ? a0 == null || a0.messageSnapshots[0] == null ? value2 : a0.messageSnapshots[0].message.attachments : a0 == null ? value2 : a0.attachments;
return a0 == null || r3 == null ? [] : r3.filter(isMediaAttachment).map(_fun75080).filter((require(1360) /* metro dependency 1360: GlobalUtils */).isNotNullish);
}
return [];
function _fun75080(a0, a1) { // fn#75080, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9773:999, offset: 0x01da1f5b, size: 404 bytes, params: 3, frame: 27
var r4;
var moduleValue2;
var hasFlag;
var value3;
var object;
var moduleValue3;
const proxy_url = a0.proxy_url;
const url = a0.url;
const description = a0.description;
const spoiler = a0.spoiler;
let flags = a0.flags;
const width = a0.width;
const height = a0.height;
const filename = a0.filename;
const content_scan_version = a0.content_scan_version;
if (width == null) {
return null;
}
if (height == null) {
return null;
}
const isVideoFile2 = (MediaFormatTestersModule).isVideoFile(filename);
const value2 = a0.flags != null;
if (value2) {
moduleValue2 = require(1391) /* metro dependency 1391: FlagUtils */;
r4 = moduleValue2.hasFlag(a0.flags, MessageAttachmentFlags.IS_THUMBNAIL);
} else {
r4 = value2;
}
let r13 = proxy_url ?? url;
if (isVideoFile2) {
value3 = (importDefault(1471) /* metro dependency 1471: URLUtils */).toURLSafe(proxy_url);
if (value3 == null) {
return null;
}
value3.searchParams.append('format', 'webp');
r13 = value3.toString();
object = {};
object.type = env1_10.ATTACHMENT;
object.src = r13;
object.width = width;
object.height = height;
object.spoiler = spoiler != null && spoiler;
object.flags = flags;
object.contentScanVersion = content_scan_version;
object.alt = description;
object.isVideo = isVideoFile2;
object.isThumbnail = r4;
object.attachmentId = a0.id;
object.mediaIndex = a1;
moduleValue3 = require(1391) /* metro dependency 1391: FlagUtils */;
hasFlag = moduleValue3.hasFlag;
flags = a0.flags;
object.srcIsAnimated = Reflect.apply(hasFlag, moduleValue3, [flags ?? 0, MessageAttachmentFlags.IS_ANIMATED]);
} else {
object = {};
object.type = env1_10.ATTACHMENT;
object.src = r13;
object.width = width;
object.height = height;
object.spoiler = spoiler != null && spoiler;
object.flags = flags;
object.contentScanVersion = content_scan_version;
object.alt = description;
object.isVideo = isVideoFile2;
object.isThumbnail = r4;
object.attachmentId = a0.id;
object.mediaIndex = a1;
moduleValue3 = require(1391) /* metro dependency 1391: FlagUtils */;
hasFlag = moduleValue3.hasFlag;
flags = a0.flags;
object.srcIsAnimated = Reflect.apply(hasFlag, moduleValue3, [flags ?? 0, MessageAttachmentFlags.IS_ANIMATED]);
}
return object;
}
}
const property = a0.messageSnapshots[0];
const r4 = (property == null ? value2 : property.moderatorReport) != null ? a0.messageSnapshots[0] == null ? value2 : a0.messageSnapshots[0].message.embeds : a0.embeds;
if (value3) {
if (value4) {
if (r4 != null) {
value5 = r4.map(_fun75083);
r0 = value5.filter((require(1360) /* metro dependency 1360: GlobalUtils */).isNotNullish);
function useForumPostMedia(a0) { // fn#75081, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9773:1632, offset: 0x01da20ef, size: 56 bytes, params: 2, frame: 13
const getForumPostMediaBinding = getForumPostMedia;
const InlineAttachmentMedia = (UserSettingsModule).InlineAttachmentMedia;
return getForumPostMediaBinding(a0, InlineAttachmentMedia.useSetting());
}
function useForumPostEmbeds(a0, a1) { // fn#75082, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9773:1733, offset: 0x01da2127, size: 236 bytes, params: 3, frame: 19
var r0;
var value5;
const env0_0 = a1;
const value2 = undefined;
const InlineEmbedMedia = (UserSettingsModule).InlineEmbedMedia;
const value3 = InlineEmbedMedia.useSetting();
const RenderEmbeds = (UserSettingsModule).RenderEmbeds;
const value4 = RenderEmbeds.useSetting();
if (a0 == null) {
return [];
}
const property = a0.messageSnapshots[0];
const r4 = (property == null ? value2 : property.moderatorReport) != null ? a0.messageSnapshots[0] == null ? value2 : a0.messageSnapshots[0].message.embeds : a0.embeds;
if (value3) {
if (value4) {
if (r4 != null) {
value5 = r4.map(_fun75083);
r0 = value5.filter((require(1360) /* metro dependency 1360: GlobalUtils */).isNotNullish);
} else {
r0 = [];
}
} else {
r0 = [];
}
} else {
r0 = [];
}
} else {
r0 = [];
}
return r0;
}
return r0;
function _fun75083(a0, a1) { // fn#75083, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9773:2034, offset: 0x01da2213, size: 300 bytes, params: 3, frame: 21
var r3;
var height;
var proxyURL;
var width;
var flags;
var object;
var moduleValue;
let r0 = a0.image ?? a0.thumbnail;
let value = r0 == null;
r0 = value && a0.images != null ? a0.images[0] : r0;
if (r0 != null) {
var url = r0.url;
if (url != null) {
height = r0.height;
proxyURL = r0.proxyURL;
url = r0.url;
width = r0.width;
flags = r0.flags;
value = proxyURL != null;
if (value) {
value = environment.__proto__;
value = require(4631) /* metro dependency 4631: MediaFormatTesters */;
value = value.isVideoUrl(proxyURL);
r3 = value;
} else {
r3 = value;
}
object = {};
value = environment.__proto__;
object.type = env1_10.EMBED;
object.src = proxyURL == null || proxyURL === '' ? url : proxyURL;
object.height = height;
object.width = width;
object.spoiler = require;
object.flags = a0.flags;
object.contentScanVersion = a0.contentScanVersion;
object.isVideo = r3;
object.mediaIndex = a1;
moduleValue = require(1391) /* metro dependency 1391: FlagUtils */;
object.srcIsAnimated = moduleValue.hasFlag(flags ?? 0, MessageEmbedMediaFlags.IS_ANIMATED);
return object;
}
}
}
function useForumPostComponentsMedia(a0) { // fn#75084, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9773:2484, offset: 0x01da233f, size: 186 bytes, params: 2, frame: 17
var r0;
var Array;
var from;
var value;
const InlineEmbedMedia = (require(3829) /* metro dependency 3829: UserSettings */).InlineEmbedMedia;
const value2 = InlineEmbedMedia.useSetting();
if (a0 == null) {
return [];
}
const components = a0.components;
if (value2) {
if (components != null) {
Array = global.Array;
from = Array.from;
value = require(4627) /* metro dependency 4627: InteractionComponentUtils */;
value = value.flattenComponents(components);
value = Reflect.apply(from, Array, [value.values()]);
value = value.flatMap(_fun75085);
value = value.filter((require(1360) /* metro dependency 1360: GlobalUtils */).isNotNullish);
r0 = value;
function useForumPostComponentsMedia(a0) { // fn#75084, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9773:2484, offset: 0x01da233f, size: 186 bytes, params: 2, frame: 17
var r0;
var Array;
var from;
var value;
const InlineEmbedMedia = (UserSettingsModule).InlineEmbedMedia;
const value2 = InlineEmbedMedia.useSetting();
if (a0 == null) {
return [];
}
const components = a0.components;
if (value2) {
if (components != null) {
Array = global.Array;
from = Array.from;
value = require(4627) /* metro dependency 4627: InteractionComponentUtils */;
value = value.flattenComponents(components);
value = Reflect.apply(from, Array, [value.values()]);
value = value.flatMap(_fun75085);
value = value.filter((require(1360) /* metro dependency 1360: GlobalUtils */).isNotNullish);
r0 = value;
} else {
r0 = [];
}
} else {
r0 = [];
}
} else {
r0 = [];
}
return r0;
}
function unfurledMediaToForumPostMediaAttachment(a0, a1) { // fn#75087, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9773:3029, offset: 0x01da24ba, size: 254 bytes, params: 3, frame: 21
var r7;
var r0;
var object2;
var height;
var value5;
var width;
var contentScanMetadata;
var value;
const value2 = undefined;
const unfurledMediaItemType = (require(4630) /* metro dependency 4630: MediaTypes */).getUnfurledMediaItemType(a0);
const value4 = null;
if (unfurledMediaItemType === 'INVALID') {
r0 = value4;
} else {
object2 = {};
object2.type = env0_10.COMPONENT;
object2.src = a0.proxyUrl;
height = a0.height;
value5 = 0;
r7 = value4 != height ? height : value5;
object2.height = r7;
width = a0.width;
r7 = value4 != width ? width : value5;
object2.width = r7;
object2.spoiler = a1;
contentScanMetadata = a0.contentScanMetadata;
object2.contentScanVersion = value4 == contentScanMetadata ? value2 : contentScanMetadata.version;
object2.flags = value5;
value = require(1391) /* metro dependency 1391: FlagUtils */;
object2.srcIsAnimated = value.hasFlag(a0.flags,
(require(4630) /* metro dependency 4630: MediaTypes */).UnfurledMediaItemFlags.IS_ANIMATED);
object2.isVideo = unfurledMediaItemType === 'VIDEO';
object2.mediaIndex = value5;
object2.srcUnfurledMediaItem = a0;
r0 = object2;
}
return r0;
}
function useForumPostMediaThumbnail(a0, a1) { // fn#75090, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9773:4122, offset: 0x01da264f, size: 80 bytes, params: 3, frame: 16
const value = a2;
const env0_0 = a1;
return env0_3.useMemo(_fun75091, [a1, useForumPostMediaProperties(a0, value !== undefined ? value : false)]);
}
function useFindFirstMediaProperties(a0, a1) { // fn#75093, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9773:4434, offset: 0x01da26ff, size: 77 bytes, params: 3, frame: 15
const value2 = useForumPostMedia(a0);
const value3 = useForumPostEmbeds(a0, a1);
const value = useForumPostComponentsMedia(a0);
const property = value2[0];
const value4 = null;
let r1 = value4 != property ? property : value3[0];
r1 = value4 == r1 ? value[0] : r1;
return value4 != r1 ? r1 : value4;
}
function useFirstMediaIsEmbed(a0, a1) { // fn#75094, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9773:4655, offset: 0x01da274c, size: 75 bytes, params: 3, frame: 15
return useForumPostMedia(a0)[0] == null && useForumPostComponentsMedia(a0)[0] == null && useForumPostEmbeds(a0,
a1)[0] != null;
}
function shouldShowAddMediaToOriginalPostModal(a0, a1) { // fn#75095, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9773:4859, offset: 0x01da2797, size: 280 bytes, params: 3, frame: 21
var r1;
var r0;
var ownerId;
var currentUser;
const channel = ChannelStore.getChannel(a1);
if (channel == null) {
return false;
}
const getMessage = MessageStore.getMessage;
const id = channel.id;
const value3 = undefined;
const defaultImport = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
const value4 = Reflect.apply(getMessage, MessageStore, [id, defaultImport.castChannelIdAsMessageId(channel.id)]);
const value5 = value4 != null;
if (value5) {
r1 = a0.length > 0 && a0.find(function(a0) {
return a0.isImage || a0.isVideo;
}) != null;
r1 = r1 && channel.isForumPost();
if (r1) {
ownerId = channel.ownerId;
currentUser = UserStore.getCurrentUser();
r1 = ownerId === (currentUser == null ? value3 : currentUser.id);
}
r1 = r1 && ThreadMessageStore.getCount(channel.id) === 0;
r1 = r1 && (value4.attachments.length === 0 || value4.attachments.find(_fun75097) == null);
r0 = r1;
} else {
r0 = value5;
}
return r0;
}
function messageContainsGifOrVideo(a0) { // fn#75098, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9773:5327, offset: 0x01da28e2, size: 36 bytes, params: 2, frame: 13
return a0.reduce(_fun75099, {'containsVideo': false, 'containsGif': false});
}
function _fun75080(a0, a1) { // fn#75080, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9773:999, offset: 0x01da1f5b, size: 404 bytes, params: 3, frame: 27
var r4;
var moduleValue2;
var hasFlag;
var value3;
var object2;
var moduleValue3;
const proxy_url = a0.proxy_url;
const url = a0.url;
const description = a0.description;
const spoiler = a0.spoiler;
let flags = a0.flags;
const width = a0.width;
const height = a0.height;
const filename = a0.filename;
const content_scan_version = a0.content_scan_version;
if (width == null) {
return null;
}
if (height == null) {
return null;
}
const isVideoFile2 = (require(4631) /* metro dependency 4631: MediaFormatTesters */).isVideoFile(filename);
const value2 = a0.flags != null;
if (value2) {
moduleValue2 = require(1391) /* metro dependency 1391: FlagUtils */;
r4 = moduleValue2.hasFlag(a0.flags, MessageAttachmentFlags.IS_THUMBNAIL);
} else {
r4 = value2;
}
let r13 = proxy_url ?? url;
if (isVideoFile2) {
value3 = (importDefault(1471) /* metro dependency 1471: URLUtils */).toURLSafe(proxy_url);
if (value3 == null) {
return r0;
function _fun75085(a0) { // fn#75085, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9773:2685, offset: 0x01da23f9, size: 149 bytes, params: 2, frame: 16
var environment;
var unfurledMediaToForumPostMediaAttachmentBinding;
var media;
var spoiler;
const type = a0.type;
const value = environment.__proto__;
const ComponentType = (ServerModule).ComponentType;
const THUMBNAIL = ComponentType.THUMBNAIL;
if (THUMBNAIL === type) {
unfurledMediaToForumPostMediaAttachmentBinding = unfurledMediaToForumPostMediaAttachment;
media = a0.media;
spoiler = a0.spoiler;
return unfurledMediaToForumPostMediaAttachmentBinding(media, spoiler != null && spoiler);
}
const MEDIA_GALLERY = ComponentType.MEDIA_GALLERY;
if (MEDIA_GALLERY === type) {
return a0.items.map(_fun75086);
}
return null;
}
value3.searchParams.append('format', 'webp');
r13 = value3.toString();
object2 = {};
object2.type = env1_10.ATTACHMENT;
object2.src = r13;
object2.width = width;
object2.height = height;
object2.spoiler = spoiler != null && spoiler;
object2.flags = flags;
object2.contentScanVersion = content_scan_version;
object2.alt = description;
object2.isVideo = isVideoFile2;
object2.isThumbnail = r4;
object2.attachmentId = a0.id;
object2.mediaIndex = a1;
moduleValue3 = require(1391) /* metro dependency 1391: FlagUtils */;
hasFlag = moduleValue3.hasFlag;
flags = a0.flags;
object2.srcIsAnimated = Reflect.apply(hasFlag, moduleValue3, [flags ?? 0, MessageAttachmentFlags.IS_ANIMATED]);
} else {
object2 = {};
object2.type = env1_10.ATTACHMENT;
object2.src = r13;
object2.width = width;
object2.height = height;
object2.spoiler = spoiler != null && spoiler;
object2.flags = flags;
object2.contentScanVersion = content_scan_version;
object2.alt = description;
object2.isVideo = isVideoFile2;
object2.isThumbnail = r4;
object2.attachmentId = a0.id;
object2.mediaIndex = a1;
moduleValue3 = require(1391) /* metro dependency 1391: FlagUtils */;
hasFlag = moduleValue3.hasFlag;
flags = a0.flags;
object2.srcIsAnimated = Reflect.apply(hasFlag, moduleValue3, [flags ?? 0, MessageAttachmentFlags.IS_ANIMATED]);
}
return object2;
}
function _fun75086({media, spoiler}) { // fn#75086, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9773:2889, offset: 0x01da248e, size: 44 bytes, params: 2, frame: 14
const value = environment.__proto__.__proto__;
return unfurledMediaToForumPostMediaAttachment(media, spoiler != null && spoiler);
}
function _fun75083(a0, a1) { // fn#75083, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9773:2034, offset: 0x01da2213, size: 300 bytes, params: 3, frame: 21
var r3;
var height;
var proxyURL;
var width;
var flags;
var object2;
var moduleValue;
let r0 = a0.image ?? a0.thumbnail;
let value = r0 == null;
r0 = value && a0.images != null ? a0.images[0] : r0;
if (r0 != null) {
var url = r0.url;
if (url != null) {
height = r0.height;
proxyURL = r0.proxyURL;
url = r0.url;
width = r0.width;
flags = r0.flags;
value = proxyURL != null;
if (value) {
}
}
function unfurledMediaToForumPostMediaAttachment(a0, a1) { // fn#75087, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9773:3029, offset: 0x01da24ba, size: 254 bytes, params: 3, frame: 21
var r7;
var r0;
var object;
var height;
var value5;
var width;
var contentScanMetadata;
var value;
const value2 = undefined;
const unfurledMediaItemType = (require(4630) /* metro dependency 4630: MediaTypes */).getUnfurledMediaItemType(a0);
const value4 = null;
if (unfurledMediaItemType === 'INVALID') {
r0 = value4;
} else {
object = {};
object.type = env0_10.COMPONENT;
object.src = a0.proxyUrl;
height = a0.height;
value5 = 0;
r7 = value4 != height ? height : value5;
object.height = r7;
width = a0.width;
r7 = value4 != width ? width : value5;
object.width = r7;
object.spoiler = a1;
contentScanMetadata = a0.contentScanMetadata;
object.contentScanVersion = value4 == contentScanMetadata ? value2 : contentScanMetadata.version;
object.flags = value5;
value = require(1391) /* metro dependency 1391: FlagUtils */;
object.srcIsAnimated = value.hasFlag(a0.flags,
(require(4630) /* metro dependency 4630: MediaTypes */).UnfurledMediaItemFlags.IS_ANIMATED);
object.isVideo = unfurledMediaItemType === 'VIDEO';
object.mediaIndex = value5;
object.srcUnfurledMediaItem = a0;
r0 = object;
}
return r0;
}
function useForumPostMediaThumbnail(a0, a1) { // fn#75090, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9773:4122, offset: 0x01da264f, size: 80 bytes, params: 3, frame: 16
const value = a2;
const env0_0 = a1;
return ReactModule.useMemo(_fun75091, [a1, useForumPostMediaProperties(a0, value !== undefined ? value : false)]);
function _fun75091() { // fn#75091, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9773:4225, offset: 0x01da269f, size: 85 bytes, params: 1, frame: 13
var value2;
if (require == null) {
return [];
}
const isMediaChannel2 = require.isMediaChannel();
const binding = env0_1;
if (isMediaChannel2) {
value2 = binding.find(function(a0) {
return a0.isThumbnail;
});
return value2 != null ? [value2] : env0_1;
}
return binding;
}
}
function useFindFirstMediaProperties(a0, a1) { // fn#75093, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9773:4434, offset: 0x01da26ff, size: 77 bytes, params: 3, frame: 15
const value2 = useForumPostMedia(a0);
const value3 = useForumPostEmbeds(a0, a1);
const value = useForumPostComponentsMedia(a0);
const property = value2[0];
const value4 = null;
let r1 = value4 != property ? property : value3[0];
r1 = value4 == r1 ? value[0] : r1;
return value4 != r1 ? r1 : value4;
}
function useFirstMediaIsEmbed(a0, a1) { // fn#75094, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9773:4655, offset: 0x01da274c, size: 75 bytes, params: 3, frame: 15
return useForumPostMedia(a0)[0] == null && useForumPostComponentsMedia(a0)[0] == null && useForumPostEmbeds(a0,
a1)[0] != null;
}
function shouldShowAddMediaToOriginalPostModal(a0, a1) { // fn#75095, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9773:4859, offset: 0x01da2797, size: 280 bytes, params: 3, frame: 21
var r1;
var r0;
var ownerId;
var currentUser;
const channel = ChannelStore.getChannel(a1);
if (channel == null) {
return false;
}
const messageStoreBinding = MessageStore;
const getMessage = messageStoreBinding.getMessage;
const id = channel.id;
const value3 = undefined;
const defaultImport = SnowflakeUtils;
const value4 = Reflect.apply(getMessage, messageStoreBinding, [id,
defaultImport.castChannelIdAsMessageId(channel.id)]);
const value5 = value4 != null;
if (value5) {
r1 = a0.length > 0 && a0.find(function(a0) {
return a0.isImage || a0.isVideo;
}) != null;
r1 = r1 && channel.isForumPost();
if (r1) {
ownerId = channel.ownerId;
currentUser = UserStore.getCurrentUser();
r1 = ownerId === (currentUser == null ? value3 : currentUser.id);
}
r1 = r1 && ThreadMessageStore.getCount(channel.id) === 0;
r1 = r1 && (value4.attachments.length === 0 || value4.attachments.find(_fun75097) == null);
r0 = r1;
} else {
r0 = value5;
}
return r0;
function _fun75097(a0) { // fn#75097, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9773:5238, offset: 0x01da28c3, size: 31 bytes, params: 2, frame: 13
const value = environment.__proto__;
return isValidImageAttachment_75076(a0) || isValidVideoAttachment_75077(a0);
}
}
function messageContainsGifOrVideo(a0) { // fn#75098, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9773:5327, offset: 0x01da28e2, size: 36 bytes, params: 2, frame: 13
return a0.reduce(_fun75099, {'containsVideo': false, 'containsGif': false});
function _fun75099({containsVideo, containsGif}, a1) { // fn#75099, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9773:5382, offset: 0x01da2906, size: 86 bytes, params: 3, frame: 14
var r1;
var value;
const object = {};
object.containsVideo = containsVideo || a1.isVideo;
if (containsGif) {
r1 = containsGif;
} else {
value = environment.__proto__;
value = require(4631) /* metro dependency 4631: MediaFormatTesters */;
value = value.isVideoUrl(proxyURL);
r3 = value;
} else {
r3 = value;
value = value.isAnimatedImageUrl(a1.src);
r1 = value;
}
object2 = {};
value = environment.__proto__;
object2.type = env1_10.EMBED;
object2.src = proxyURL == null || proxyURL === '' ? url : proxyURL;
object2.height = height;
object2.width = width;
object2.spoiler = require;
object2.flags = a0.flags;
object2.contentScanVersion = a0.contentScanVersion;
object2.isVideo = r3;
object2.mediaIndex = a1;
moduleValue = require(1391) /* metro dependency 1391: FlagUtils */;
object2.srcIsAnimated = moduleValue.hasFlag(flags ?? 0, MessageEmbedMediaFlags.IS_ANIMATED);
return object2;
object.containsGif = r1;
return object;
}
}
}
function _fun75085(a0) { // fn#75085, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9773:2685, offset: 0x01da23f9, size: 149 bytes, params: 2, frame: 16
var environment;
var unfurledMediaToForumPostMediaAttachmentBinding;
var media;
var spoiler;
const type = a0.type;
const value = environment.__proto__;
const ComponentType = (require(1909) /* metro dependency 1909: Server */).ComponentType;
const THUMBNAIL = ComponentType.THUMBNAIL;
if (THUMBNAIL === type) {
unfurledMediaToForumPostMediaAttachmentBinding = unfurledMediaToForumPostMediaAttachment;
media = a0.media;
spoiler = a0.spoiler;
return unfurledMediaToForumPostMediaAttachmentBinding(media, spoiler != null && spoiler);
}
const MEDIA_GALLERY = ComponentType.MEDIA_GALLERY;
if (MEDIA_GALLERY === type) {
return a0.items.map(_fun75086);
}
return null;
}
function _fun75091() { // fn#75091, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9773:4225, offset: 0x01da269f, size: 85 bytes, params: 1, frame: 13
var value2;
if (require == null) {
return [];
}
const isMediaChannel2 = require.isMediaChannel();
const binding = env0_1;
if (isMediaChannel2) {
value2 = binding.find(function(a0) {
return a0.isThumbnail;
});
return value2 != null ? [value2] : env0_1;
}
return binding;
}
function _fun75097(a0) { // fn#75097, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9773:5238, offset: 0x01da28c3, size: 31 bytes, params: 2, frame: 13
const value = environment.__proto__;
return isValidImageAttachment_75076(a0) || isValidVideoAttachment_75077(a0);
}
function _fun75099({containsVideo, containsGif}, a1) { // fn#75099, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9773:5382, offset: 0x01da2906, size: 86 bytes, params: 3, frame: 14
var r1;
var value;
const object2 = {};
object2.containsVideo = containsVideo || a1.isVideo;
if (containsGif) {
r1 = containsGif;
} else {
value = environment.__proto__;
value = require(4631) /* metro dependency 4631: MediaFormatTesters */;
value = value.isAnimatedImageUrl(a1.src);
r1 = value;
}
object2.containsGif = r1;
return object2;
}
function _fun75086({media, spoiler}) { // fn#75086, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9773:2889, offset: 0x01da248e, size: 44 bytes, params: 2, frame: 14
const value = environment.__proto__.__proto__;
return unfurledMediaToForumPostMediaAttachment(media, spoiler != null && spoiler);
}
global.__d(_fun75075, 9587, [31, 6898, 1379, 4814, 1878, 661, 4631, 3829, 1391, 1471, 1360, 4627, 1909, 4630, 21,
2]) /* metro module 9587, dependencies: [31, 6898, 1379, 4814, 1878, 661, 4631, 3829, 1391, 1471, 1360, 4627, 1909, 4630, 21, 2] */;
+430 -408
View File
@@ -1,4 +1,15 @@
/* Metro module 6865; source: modules/forums/ForumPostMessagesStore.tsx; dependencies: [6, 7, 15, 17, 18, 6866, 1878, 21, 4625, 566, 694, 2] */
import ClassCallCheck from '../../by-id/module-00006-ClassCallCheck.js'; /* Metro dependency 6 */
import CreateClass from '../../by-id/module-00007-CreateClass.js'; /* Metro dependency 7 */
import PossibleConstructorReturn from '../../by-id/module-00015-PossibleConstructorReturn.js'; /* Metro dependency 15 */
import Module00017 from '../../by-id/module-00017.js'; /* Metro dependency 17 */
import Inherits from '../../by-id/module-00018-Inherits.js'; /* Metro dependency 18 */
import SnowflakeUtils from '../../utils/SnowflakeUtils.tsx'; /* Metro dependency 21 */
import Flux from '../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import UserStore from '../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import GuildSubscriptionsStore from '../../stores/GuildSubscriptionsStore.tsx'; /* Metro dependency 6866 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun54204(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#54204, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7043:6, offset: 0x0135f1f6, size: 456 bytes, params: 8, frame: 21
const env0_0 = require;
const _arrayLikeToArray_54210 = function(a0, a1) {
@@ -44,25 +55,19 @@ function _fun54204(global, require, importDefault, importAll, module, exports, d
}
return value;
};
const closure = LOAD_THREADS_SUCCESS;
const closure2 = MESSAGE_REACTION_ADD_54213;
const LOAD_THREADS_SUCCESS2 = LOAD_THREADS_SUCCESS;
const MESSAGE_REACTION_ADD_542132 = MESSAGE_REACTION_ADD_54213;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(6) /* metro dependency 6 */;
const env0_4 = importDefault(7) /* metro dependency 7 */;
const env0_5 = importDefault(15) /* metro dependency 15 */;
const env0_6 = importDefault(17) /* metro dependency 17 */;
const env0_7 = importDefault(18) /* metro dependency 18 */;
const guildSubscriptionsStore = importDefault(6866) /* metro dependency 6866: GuildSubscriptionsStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
let env0_10 = {};
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
const Store = (Flux).Store;
let value = _fun54214(Store);
value.displayName = 'ForumPostMessagesStore';
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */, {CONNECTION_OPEN: function() {
env0_10 = {};
}, MESSAGE_CREATE: MESSAGE_CREATE_54220, MESSAGE_UPDATE: MESSAGE_UPDATE_54221, MESSAGE_DELETE: MESSAGE_DELETE_54222,
THREAD_CREATE: THREAD_CREATE_54223, MESSAGE_REACTION_ADD: closure2, MESSAGE_REACTION_REMOVE: closure2,
THREAD_CREATE: THREAD_CREATE_54223, MESSAGE_REACTION_ADD: MESSAGE_REACTION_ADD_542132,
MESSAGE_REACTION_REMOVE: MESSAGE_REACTION_ADD_542132,
MESSAGE_REACTION_REMOVE_ALL: MESSAGE_REACTION_REMOVE_ALL_54224,
MESSAGE_REACTION_REMOVE_EMOJI: MESSAGE_REACTION_REMOVE_EMOJI_54225,
MESSAGE_REACTION_ADD_MANY: MESSAGE_REACTION_ADD_MANY_54226, LOAD_FORUM_POSTS: function({threads}) {
@@ -70,446 +75,463 @@ function _fun54204(global, require, importDefault, importAll, module, exports, d
for (propertyName in threads) {
storeFirstMessage(propertyName, threads[propertyName].first_message);
}
}, LOAD_THREADS_SUCCESS: closure, LOAD_ARCHIVED_THREADS_SUCCESS: closure,
}, LOAD_THREADS_SUCCESS: LOAD_THREADS_SUCCESS2, LOAD_ARCHIVED_THREADS_SUCCESS: LOAD_THREADS_SUCCESS2,
LOAD_MESSAGES_SUCCESS: LOAD_MESSAGES_SUCCESS_54228});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/forums/ForumPostMessagesStore.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/forums/ForumPostMessagesStore.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_54205() { // fn#54205, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7043:170, offset: 0x0135f3be, size: 94 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
}
return (_isNativeReflectConstruct_54205_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _createForOfIteratorHelperLoose_54208(a0, a1) { // fn#54208, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7043:363, offset: 0x0135f41c, size: 370 bytes, params: 3, frame: 20
var r6;
var r9;
var r5;
var value3;
var regexp;
const env0_0 = a0;
const Symbol = global.Symbol;
let value = typeof Symbol !== 'undefined';
let r1 = value && a0[global.Symbol.iterator];
r1 = !r1 ? a0['@@iterator'] : r1;
if (r1) {
value = r1.call(a0);
return value.next.bind(value);
}
const Array = global.Array;
if (Array.isArray(a0)) {
if (r1) {
function _isNativeReflectConstruct_54205() { // fn#54205, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7043:170, offset: 0x0135f3be, size: 94 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
}
return _fun54209;
return (_isNativeReflectConstruct_54205_isNativeReflectConstruct = function() {
return !!result;
})();
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_54210(a0, value);
r5 = value;
} else {
value3 = ({}).toString.call(a0).slice(8, -1);
r6 = value3 === 'Object' && a0.constructor;
r9 = r6 ? a0.constructor.name : value3;
if (r9 === 'Map') {
r6 = global.Array.from(a0);
} else if (r9 === 'Set') {
r6 = global.Array.from(a0);
} else if (r9 === 'Arguments') {
function _createForOfIteratorHelperLoose_54208(a0, a1) { // fn#54208, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7043:363, offset: 0x0135f41c, size: 370 bytes, params: 3, frame: 20
var r6;
var r9;
var r5;
var value3;
var regexp;
const env0_0 = a0;
const Symbol = global.Symbol;
let value = typeof Symbol !== 'undefined';
let r1 = value && a0[global.Symbol.iterator];
r1 = !r1 ? a0['@@iterator'] : r1;
if (r1) {
value = r1.call(a0);
return value.next.bind(value);
}
const Array = global.Array;
if (Array.isArray(a0)) {
if (r1) {
}
return _fun54209;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_54210(a0, value);
r6 = value;
r5 = value;
} else {
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value3 = ({}).toString.call(a0).slice(8, -1);
r6 = value3 === 'Object' && a0.constructor;
r9 = r6 ? a0.constructor.name : value3;
if (r9 === 'Map') {
r6 = global.Array.from(a0);
} else if (r9 === 'Set') {
r6 = global.Array.from(a0);
} else if (r9 === 'Arguments') {
value = _arrayLikeToArray_54210(a0, value);
r6 = value;
} else {
r6 = value;
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value = _arrayLikeToArray_54210(a0, value);
r6 = value;
} else {
r6 = value;
}
}
r5 = r6;
}
r5 = r6;
} else {
r5 = value;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
}
return _fun54209;
}
const TypeError = global.TypeError;
throw new TypeError('Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.');
}
function LOAD_ARCHIVED_THREADS_SUCCESS_54211({threads, firstMessages}) { // fn#54211, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7043:1282, offset: 0x0135f58e, size: 159 bytes, params: 2, frame: 17
var r3;
var r2;
var value4;
var binding;
var id;
var value5;
var value8;
var storeFirstMessageBinding;
var channel_id;
var value9;
if (firstMessages == null) {
return false;
}
const value2 = _createForOfIteratorHelperLoose_54208(threads);
const value3 = value2();
let done = value3.done;
if (!done) {
r3 = value3;
reducibleLoop2: while (true) {
value4 = r3.value;
binding = env0_10;
id = value4.id;
binding[id] = {'loaded': true, 'firstMessage': null};
value5 = value2();
done = value5.done;
if (done) {
break reducibleLoop2;
if (r5) {
}
r3 = value5;
continue reducibleLoop2;
return _fun54209;
}
const TypeError = global.TypeError;
throw new TypeError('Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.');
function _fun54209() { // fn#54209, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7043:934, offset: 0x00c39d73, size: 69 bytes, params: 1, frame: 5
return env0_1 >= env0_0.length ? {done: true} : {done: false,
value: env0_0[typeof env0_1 === 'bigint' ? env0_1 : +env0_1]};
}
}
const value6 = _createForOfIteratorHelperLoose_54208(firstMessages);
const value7 = value6();
done = value7.done;
if (!done) {
r2 = value7;
reducibleLoop4: while (true) {
value8 = r2.value;
storeFirstMessageBinding = storeFirstMessage;
channel_id = value8.channel_id;
storeFirstMessageBinding(channel_id, value8);
value9 = value6();
done = value9.done;
if (done) {
break reducibleLoop4;
function LOAD_ARCHIVED_THREADS_SUCCESS_54211({threads, firstMessages}) { // fn#54211, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7043:1282, offset: 0x0135f58e, size: 159 bytes, params: 2, frame: 17
var r3;
var r2;
var value4;
var binding;
var id;
var value5;
var value8;
var storeFirstMessageBinding;
var channel_id;
var value9;
if (firstMessages == null) {
return false;
}
const value2 = _createForOfIteratorHelperLoose_54208(threads);
const value3 = value2();
let done = value3.done;
if (!done) {
r3 = value3;
reducibleLoop2: while (true) {
value4 = r3.value;
binding = env0_10;
id = value4.id;
binding[id] = {'loaded': true, 'firstMessage': null};
value5 = value2();
done = value5.done;
if (done) {
break reducibleLoop2;
}
r3 = value5;
continue reducibleLoop2;
}
}
const value6 = _createForOfIteratorHelperLoose_54208(firstMessages);
const value7 = value6();
done = value7.done;
if (!done) {
r2 = value7;
reducibleLoop4: while (true) {
value8 = r2.value;
storeFirstMessageBinding = storeFirstMessage;
channel_id = value8.channel_id;
storeFirstMessageBinding(channel_id, value8);
value9 = value6();
done = value9.done;
if (done) {
break reducibleLoop4;
}
r2 = value9;
continue reducibleLoop4;
}
r2 = value9;
continue reducibleLoop4;
}
}
}
function storeFirstMessage(a0, a1) { // fn#54212, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7043:1592, offset: 0x0135f62d, size: 80 bytes, params: 3, frame: 13
var r0;
let value = null;
if (value == a1) {
r0 = value;
} else {
value = require(4625) /* metro dependency 4625: MessageRecordUtils */;
value = value.createMessageRecord(a1);
r0 = value;
}
env0_10[a0] = {loaded: true, firstMessage: r0};
}
function MESSAGE_REACTION_ADD_54213(a0) { // fn#54213, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7043:1707, offset: 0x0135f67d, size: 239 bytes, params: 2, frame: 23
var binding;
var object2;
const type = a0.type;
const channelId = a0.channelId;
const messageId = a0.messageId;
const userId = a0.userId;
const emoji = a0.emoji;
const optimistic = a0.optimistic;
const reactionType = a0.reactionType;
const property = env0_10[channelId];
if (property == null) {
return false;
}
if (property.firstMessage == null) {
return false;
}
if (messageId !== property.firstMessage.id) {
return false;
}
const currentUser = UserStore.getCurrentUser();
const r5 = currentUser != null && currentUser.id === userId;
if (optimistic) {
if (r5) {
binding = env0_10;
object2 = {};
copyDataProperties(object2, property, undefined);
binding[channelId] = object2;
env0_10[channelId].firstMessage = type === 'MESSAGE_REACTION_ADD' ? property.firstMessage.addReaction(emoji,
r5,
a0.colors, reactionType) : property.firstMessage.removeReaction(emoji, r5, reactionType);
return undefined;
function storeFirstMessage(a0, a1) { // fn#54212, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7043:1592, offset: 0x0135f62d, size: 80 bytes, params: 3, frame: 13
var r0;
let value = null;
if (value == a1) {
r0 = value;
} else {
value = require(4625) /* metro dependency 4625: MessageRecordUtils */;
value = value.createMessageRecord(a1);
r0 = value;
}
return false;
env0_10[a0] = {loaded: true, firstMessage: r0};
}
binding = env0_10;
object2 = {};
copyDataProperties(object2, property, undefined);
binding[channelId] = object2;
env0_10[channelId].firstMessage = type === 'MESSAGE_REACTION_ADD' ? property.firstMessage.addReaction(emoji, r5,
a0.colors, reactionType) : property.firstMessage.removeReaction(emoji, r5, reactionType);
}
function _fun54214(a0) { // fn#54214, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7043:2117, offset: 0x0135f76c, size: 114 bytes, params: 2, frame: 16
const closure = ForumPostMessagesStore;
env0_7(closure, a0);
return env0_4(closure, [{key: 'initialize', value: function() {
this.waitFor(GuildSubscriptionsStore, UserStore);
}}, {key: 'isLoading', value: value_54217}, {key: 'getMessage', value: value_54218}]);
}
function MESSAGE_REACTION_ADD_54213(a0) { // fn#54213, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7043:1707, offset: 0x0135f67d, size: 239 bytes, params: 2, frame: 23
var binding;
var object;
const type = a0.type;
const channelId = a0.channelId;
const messageId = a0.messageId;
const userId = a0.userId;
const emoji = a0.emoji;
const optimistic = a0.optimistic;
const reactionType = a0.reactionType;
const property = env0_10[channelId];
if (property == null) {
return false;
}
if (property.firstMessage == null) {
return false;
}
if (messageId !== property.firstMessage.id) {
return false;
}
const currentUser = UserStore.getCurrentUser();
const r5 = currentUser != null && currentUser.id === userId;
if (optimistic) {
if (r5) {
binding = env0_10;
object = {};
copyDataProperties(object, property, undefined);
binding[channelId] = object;
env0_10[channelId].firstMessage = type === 'MESSAGE_REACTION_ADD' ? property.firstMessage.addReaction(emoji,
r5,
a0.colors, reactionType) : property.firstMessage.removeReaction(emoji, r5, reactionType);
return undefined;
}
return false;
}
binding = env0_10;
object = {};
copyDataProperties(object, property, undefined);
binding[channelId] = object;
env0_10[channelId].firstMessage = type === 'MESSAGE_REACTION_ADD' ? property.firstMessage.addReaction(emoji, r5,
a0.colors, reactionType) : property.firstMessage.removeReaction(emoji, r5, reactionType);
}
function MESSAGE_CREATE_54220(a0) { // fn#54220, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7043:2818, offset: 0x0135f861, size: 110 bytes, params: 2, frame: 17
var r1;
var r0;
var message;
var id;
var value2;
var defaultImport;
var castChannelIdAsMessageId;
var channel_id;
var value3;
var storeFirstMessageBinding;
const isPushNotification = a0.isPushNotification;
if (isPushNotification) {
r0 = !isPushNotification;
} else {
message = a0.message;
id = message.id;
value2 = undefined;
defaultImport = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
castChannelIdAsMessageId = defaultImport.castChannelIdAsMessageId;
message = a0.message;
channel_id = message.channel_id;
value3 = id === Reflect.apply(castChannelIdAsMessageId, defaultImport, [channel_id]);
if (value3) {
storeFirstMessageBinding = storeFirstMessage;
function _fun54214(a0) { // fn#54214, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7043:2117, offset: 0x0135f76c, size: 114 bytes, params: 2, frame: 16
const ForumPostMessagesStore2 = ForumPostMessagesStore;
Inherits(ForumPostMessagesStore2, a0);
return CreateClass(ForumPostMessagesStore2, [{key: 'initialize', value: function() {
this.waitFor(GuildSubscriptionsStore, UserStore);
}}, {key: 'isLoading', value: value_54217}, {key: 'getMessage', value: value_54218}]);
function ForumPostMessagesStore() { // fn#54215, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7043:2129, offset: 0x0102b796, size: 113 bytes, params: 1, frame: 20
const value = environment.__proto__;
env1_3(this, ForumPostMessagesStore);
const value3 = env1_6(ForumPostMessagesStore);
return env1_5(this, _isNativeReflectConstruct_54205() ? global.Reflect.construct(value3, arguments,
env1_6(this).constructor) : value3.apply(this, arguments));
}
function value_54217(a0) { // fn#54217, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7043:2511, offset: 0x0135f7fc, size: 39 bytes, params: 2, frame: 3
const value = environment.__proto__;
return env1_10[a0]?.loaded !== true;
}
function value_54218(a0) { // fn#54218, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7043:2599, offset: 0x0135f823, size: 49 bytes, params: 2, frame: 4
if (!(a0 in env1_10)) {
env1_10[a0] = {'loaded': false, 'firstMessage': null};
}
return env1_10[a0];
}
}
function MESSAGE_CREATE_54220(a0) { // fn#54220, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7043:2818, offset: 0x0135f861, size: 110 bytes, params: 2, frame: 17
var r1;
var r0;
var message;
var id;
var value2;
var defaultImport;
var castChannelIdAsMessageId;
var channel_id;
var value3;
var storeFirstMessageBinding;
const isPushNotification = a0.isPushNotification;
if (isPushNotification) {
r0 = !isPushNotification;
} else {
message = a0.message;
id = message.id;
value2 = undefined;
defaultImport = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
castChannelIdAsMessageId = defaultImport.castChannelIdAsMessageId;
message = a0.message;
channel_id = message.channel_id;
message = a0.message;
storeFirstMessageBinding(channel_id, message);
r1 = value2;
} else {
r1 = value3;
value3 = id === Reflect.apply(castChannelIdAsMessageId, defaultImport, [channel_id]);
if (value3) {
storeFirstMessageBinding = storeFirstMessage;
message = a0.message;
channel_id = message.channel_id;
message = a0.message;
storeFirstMessageBinding(channel_id, message);
r1 = value2;
} else {
r1 = value3;
}
r0 = r1;
}
r0 = r1;
return r0;
}
return r0;
}
function MESSAGE_UPDATE_54221(a0) { // fn#54221, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7043:3023, offset: 0x0135f8cf, size: 226 bytes, params: 2, frame: 20
var r1;
var r0;
var firstMessage;
var value4;
var defaultImport2;
var value5;
var object2;
var updateMessageRecord;
let message = a0.message;
if (message.id !== a0.message.channel_id) {
return false;
}
var value;
let binding = env0_10;
const value2 = undefined;
const defaultImport = importDefault(dependencyMap[7]);
let castMessageIdAsChannelId = defaultImport.castMessageIdAsChannelId;
const property = binding[Reflect.apply(castMessageIdAsChannelId, defaultImport, [a0.message.id])];
const value3 = property != null;
if (value3) {
firstMessage = property.firstMessage;
value4 = firstMessage != null;
if (value4) {
binding = env0_10;
defaultImport2 = importDefault(dependencyMap[7]);
castMessageIdAsChannelId = defaultImport2.castMessageIdAsChannelId;
message = a0.message;
value5 = Reflect.apply(castMessageIdAsChannelId, defaultImport2, [message.id]);
object2 = {};
copyDataProperties(object2, property, dependencyMap);
value = require(dependencyMap[8]);
updateMessageRecord = value.updateMessageRecord;
function MESSAGE_UPDATE_54221(a0) { // fn#54221, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7043:3023, offset: 0x0135f8cf, size: 226 bytes, params: 2, frame: 20
var r1;
var r0;
var firstMessage;
var value4;
var defaultImport2;
var value5;
var object;
var updateMessageRecord;
let message = a0.message;
if (message.id !== a0.message.channel_id) {
return false;
}
var value;
let binding = env0_10;
const value2 = undefined;
const defaultImport = importDefault(dependencyMap[7]);
let castMessageIdAsChannelId = defaultImport.castMessageIdAsChannelId;
const property = binding[Reflect.apply(castMessageIdAsChannelId, defaultImport, [a0.message.id])];
const value3 = property != null;
if (value3) {
firstMessage = property.firstMessage;
message = a0.message;
value = Reflect.apply(updateMessageRecord, value, [firstMessage, message]);
object2['firstMessage'] = value;
binding[value5] = object2;
r1 = value2;
value4 = firstMessage != null;
if (value4) {
binding = env0_10;
defaultImport2 = importDefault(dependencyMap[7]);
castMessageIdAsChannelId = defaultImport2.castMessageIdAsChannelId;
message = a0.message;
value5 = Reflect.apply(castMessageIdAsChannelId, defaultImport2, [message.id]);
object = {};
copyDataProperties(object, property, dependencyMap);
value = require(dependencyMap[8]);
updateMessageRecord = value.updateMessageRecord;
firstMessage = property.firstMessage;
message = a0.message;
value = Reflect.apply(updateMessageRecord, value, [firstMessage, message]);
object['firstMessage'] = value;
binding[value5] = object;
r1 = value2;
} else {
r1 = value4;
}
r0 = r1;
} else {
r1 = value4;
r0 = value3;
}
r0 = r1;
} else {
r0 = value3;
return r0;
}
return r0;
}
function MESSAGE_DELETE_54222(a0) { // fn#54222, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7043:3346, offset: 0x0135f9b1, size: 86 bytes, params: 2, frame: 15
const id = a0.id;
const defaultImport = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
if (id !== defaultImport.castChannelIdAsMessageId(a0.channelId)) {
return false;
function MESSAGE_DELETE_54222(a0) { // fn#54222, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7043:3346, offset: 0x0135f9b1, size: 86 bytes, params: 2, frame: 15
const id = a0.id;
const defaultImport = SnowflakeUtils;
if (id !== defaultImport.castChannelIdAsMessageId(a0.channelId)) {
return false;
}
env0_10[a0.channelId] = {'loaded': true, 'firstMessage': null};
}
env0_10[a0.channelId] = {'loaded': true, 'firstMessage': null};
}
function THREAD_CREATE_54223(a0) { // fn#54223, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7043:3503, offset: 0x0135fa07, size: 106 bytes, params: 2, frame: 14
var r1;
var r0;
var isSubscribedToThreads2;
const value2 = env0_10[a0.channel.id] == null;
if (value2) {
isSubscribedToThreads2 = GuildSubscriptionsStore.isSubscribedToThreads(a0.channel.guild_id);
if (isSubscribedToThreads2) {
env0_10[a0.channel.id] = {'loaded': true, 'firstMessage': null};
r1 = undefined;
function THREAD_CREATE_54223(a0) { // fn#54223, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7043:3503, offset: 0x0135fa07, size: 106 bytes, params: 2, frame: 14
var r1;
var r0;
var guildSubscriptionsStoreBinding;
var isSubscribedToThreads2;
const value2 = env0_10[a0.channel.id] == null;
if (value2) {
guildSubscriptionsStoreBinding = GuildSubscriptionsStore;
isSubscribedToThreads2 = guildSubscriptionsStoreBinding.isSubscribedToThreads(a0.channel.guild_id);
if (isSubscribedToThreads2) {
env0_10[a0.channel.id] = {'loaded': true, 'firstMessage': null};
r1 = undefined;
} else {
r1 = !!isSubscribedToThreads2;
}
r0 = r1;
} else {
r1 = !!isSubscribedToThreads2;
r0 = value2;
}
r0 = r1;
} else {
r0 = value2;
return r0;
}
return r0;
}
function MESSAGE_REACTION_REMOVE_ALL_54224({channelId, messageId}) { // fn#54224, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7043:3769, offset: 0x0135fa71, size: 125 bytes, params: 2, frame: 18
var r1;
var value4;
var binding;
var object2;
var value;
const property = env0_10[channelId];
let r0 = property != null && property.firstMessage != null;
if (r0) {
value4 = messageId === property.firstMessage.id;
if (value4) {
function MESSAGE_REACTION_REMOVE_ALL_54224({channelId, messageId}) { // fn#54224, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7043:3769, offset: 0x0135fa71, size: 125 bytes, params: 2, frame: 18
var r1;
var value4;
var binding;
var object;
var value;
const property = env0_10[channelId];
let r0 = property != null && property.firstMessage != null;
if (r0) {
value4 = messageId === property.firstMessage.id;
if (value4) {
binding = env0_10;
object = {};
copyDataProperties(object, property, undefined);
value = property.firstMessage.set('reactions', []);
object['firstMessage'] = value;
binding[channelId] = object;
value = undefined;
r1 = value;
} else {
r1 = value4;
}
r0 = r1;
}
return r0;
}
function MESSAGE_REACTION_REMOVE_EMOJI_54225({channelId, messageId, emoji}) { // fn#54225, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7043:4001, offset: 0x0135faee, size: 123 bytes, params: 2, frame: 17
var r1;
var value4;
var binding;
var object;
var value;
const property = env0_10[channelId];
let r0 = property != null && property.firstMessage != null;
if (r0) {
value4 = messageId === property.firstMessage.id;
if (value4) {
binding = env0_10;
object = {};
copyDataProperties(object, property, emoji);
value = property.firstMessage.removeReactionsForEmoji(emoji);
object['firstMessage'] = value;
binding[channelId] = object;
value = undefined;
r1 = value;
} else {
r1 = value4;
}
r0 = r1;
}
return r0;
}
function MESSAGE_REACTION_ADD_MANY_54226({channelId, messageId, reactions}) { // fn#54226, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7043:4246, offset: 0x0135fb69, size: 147 bytes, params: 2, frame: 19
const property = env0_10[channelId];
if (property == null) {
return false;
}
let firstMessage = property.firstMessage;
if (firstMessage == null) {
return false;
}
if (messageId !== property.firstMessage.id) {
return false;
}
const currentUser = UserStore.getCurrentUser();
firstMessage = property.firstMessage;
const addReactionBatch = firstMessage.addReactionBatch;
const value3 = currentUser == null;
const value5 = Reflect.apply(addReactionBatch, firstMessage, [reactions, value3 ? undefined : currentUser.id]);
const binding = env0_10;
const object = {};
copyDataProperties(object, property, value3);
object['firstMessage'] = value5;
binding[channelId] = object;
}
function LOAD_MESSAGES_SUCCESS_54228({channelId, messages}) { // fn#54228, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7043:4755, offset: 0x0135fc39, size: 149 bytes, params: 2, frame: 15
var r0;
var id;
var binding;
var object;
const property = messages[messages.length - 1];
let value = property != null;
if (value) {
id = property.id;
value = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
value = id === value.castChannelIdAsMessageId(channelId);
r0 = value;
} else {
r0 = value;
}
if (r0) {
binding = env0_10;
object2 = {};
copyDataProperties(object2, property, undefined);
value = property.firstMessage.set('reactions', []);
object2['firstMessage'] = value;
binding[channelId] = object2;
value = undefined;
r1 = value;
} else {
r1 = value4;
object = {loaded: true};
object.firstMessage = (require(4625) /* metro dependency 4625: MessageRecordUtils */).createMessageRecord(property);
binding[channelId] = object;
}
r0 = r1;
}
return r0;
}
function MESSAGE_REACTION_REMOVE_EMOJI_54225({channelId, messageId, emoji}) { // fn#54225, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7043:4001, offset: 0x0135faee, size: 123 bytes, params: 2, frame: 17
var r1;
var value4;
var binding;
var object2;
var value;
const property = env0_10[channelId];
let r0 = property != null && property.firstMessage != null;
if (r0) {
value4 = messageId === property.firstMessage.id;
if (value4) {
binding = env0_10;
object2 = {};
copyDataProperties(object2, property, emoji);
value = property.firstMessage.removeReactionsForEmoji(emoji);
object2['firstMessage'] = value;
binding[channelId] = object2;
value = undefined;
r1 = value;
} else {
r1 = value4;
}
r0 = r1;
}
return r0;
}
function MESSAGE_REACTION_ADD_MANY_54226({channelId, messageId, reactions}) { // fn#54226, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7043:4246, offset: 0x0135fb69, size: 147 bytes, params: 2, frame: 19
const property = env0_10[channelId];
if (property == null) {
return false;
}
let firstMessage = property.firstMessage;
if (firstMessage == null) {
return false;
}
if (messageId !== property.firstMessage.id) {
return false;
}
const currentUser = UserStore.getCurrentUser();
firstMessage = property.firstMessage;
const addReactionBatch = firstMessage.addReactionBatch;
const value3 = currentUser == null;
const value5 = Reflect.apply(addReactionBatch, firstMessage, [reactions, value3 ? undefined : currentUser.id]);
const binding = env0_10;
const object2 = {};
copyDataProperties(object2, property, value3);
object2['firstMessage'] = value5;
binding[channelId] = object2;
}
function LOAD_MESSAGES_SUCCESS_54228({channelId, messages}) { // fn#54228, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7043:4755, offset: 0x0135fc39, size: 149 bytes, params: 2, frame: 15
var r0;
var id;
var binding;
var object2;
const property = messages[messages.length - 1];
let value = property != null;
if (value) {
id = property.id;
value = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
value = id === value.castChannelIdAsMessageId(channelId);
r0 = value;
} else {
r0 = value;
}
if (r0) {
binding = env0_10;
object2 = {loaded: true};
object2.firstMessage = (require(4625) /* metro dependency 4625: MessageRecordUtils */).createMessageRecord(property);
binding[channelId] = object2;
}
}
function value_54217(a0) { // fn#54217, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7043:2511, offset: 0x0135f7fc, size: 39 bytes, params: 2, frame: 3
const value = environment.__proto__;
return env1_10[a0]?.loaded !== true;
}
function value_54218(a0) { // fn#54218, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7043:2599, offset: 0x0135f823, size: 49 bytes, params: 2, frame: 4
if (!(a0 in env1_10)) {
env1_10[a0] = {'loaded': false, 'firstMessage': null};
}
return env1_10[a0];
}
global.__d(_fun54204, 6865, [6, 7, 15, 17, 18, 6866, 1878, 21, 4625, 566, 694,
2]) /* metro module 6865, dependencies: [6, 7, 15, 17, 18, 6866, 1878, 21, 4625, 566, 694, 2] */;
@@ -1,18 +1,21 @@
/* Metro module 6901; source: modules/forums/ForumPostRecentMessageStore.tsx; dependencies: [6, 7, 15, 17, 18, 1379, 1878, 21, 4625, 1360, 566, 694, 2] */
import ClassCallCheck from '../../by-id/module-00006-ClassCallCheck.js'; /* Metro dependency 6 */
import CreateClass from '../../by-id/module-00007-CreateClass.js'; /* Metro dependency 7 */
import PossibleConstructorReturn from '../../by-id/module-00015-PossibleConstructorReturn.js'; /* Metro dependency 15 */
import Module00017 from '../../by-id/module-00017.js'; /* Metro dependency 17 */
import Inherits from '../../by-id/module-00018-Inherits.js'; /* Metro dependency 18 */
import Flux from '../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import ChannelStore from '../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import UserStore from '../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun54884(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#54884, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7079:6, offset: 0x013704ae, size: 400 bytes, params: 8, frame: 20
const env0_0 = require;
const closure = LOAD_ARCHIVED_THREADS_SUCCESS_54892;
const LOAD_ARCHIVED_THREADS_SUCCESS_548922 = LOAD_ARCHIVED_THREADS_SUCCESS_54892;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(6) /* metro dependency 6 */;
const env0_4 = importDefault(7) /* metro dependency 7 */;
const env0_5 = importDefault(15) /* metro dependency 15 */;
const env0_6 = importDefault(17) /* metro dependency 17 */;
const env0_7 = importDefault(18) /* metro dependency 18 */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
let env0_10 = {};
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
const Store = (Flux).Store;
let value = _fun54895(Store);
value.displayName = 'ForumPostRecentMessageStore';
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */, {CONNECTION_OPEN: function() {
@@ -23,218 +26,230 @@ function _fun54884(global, require, importDefault, importAll, module, exports, d
for (propertyName in threads) {
set_54889(propertyName, threads[propertyName].most_recent_message);
}
}, LOAD_ARCHIVED_THREADS_SUCCESS: closure, LOAD_THREADS_SUCCESS: closure});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/forums/ForumPostRecentMessageStore.tsx');
}, LOAD_ARCHIVED_THREADS_SUCCESS: LOAD_ARCHIVED_THREADS_SUCCESS_548922,
LOAD_THREADS_SUCCESS: LOAD_ARCHIVED_THREADS_SUCCESS_548922});
(FileImportTrackerModule).fileFinishedImporting('modules/forums/ForumPostRecentMessageStore.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_54885() { // fn#54885, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7079:168, offset: 0x0137063e, size: 94 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
function _isNativeReflectConstruct_54885() { // fn#54885, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7079:168, offset: 0x0137063e, size: 94 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
}
return (_isNativeReflectConstruct_54885_isNativeReflectConstruct = function() {
return !!result;
})();
}
return (_isNativeReflectConstruct_54885_isNativeReflectConstruct = function() {
return !!result;
})();
}
function isValidMessage(a0) { // fn#54888, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7079:370, offset: 0x0137069c, size: 158 bytes, params: 2, frame: 17
var id;
var binding;
var property;
var compare;
var value;
const value2 = undefined;
const channel = ChannelStore.getChannel(a0 == null ? value2 : a0.channel_id);
if (channel != null) {
if (channel.isForumPost()) {
binding = env0_10;
id = channel.id;
property = binding[id];
value = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
compare = value.compare;
id = a0 == null ? value2 : a0.id;
value = Reflect.apply(compare, value, [id,
property == null || property.message == null ? value2 : property.message.id]);
return value > -1;
function isValidMessage(a0) { // fn#54888, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7079:370, offset: 0x0137069c, size: 158 bytes, params: 2, frame: 17
var id;
var binding;
var property;
var compare;
var value;
const channelStoreBinding = ChannelStore;
const value2 = undefined;
const channel = channelStoreBinding.getChannel(a0 == null ? value2 : a0.channel_id);
if (channel != null) {
if (channel.isForumPost()) {
binding = env0_10;
id = channel.id;
property = binding[id];
value = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
compare = value.compare;
id = a0 == null ? value2 : a0.id;
value = Reflect.apply(compare, value, [id,
property == null || property.message == null ? value2 : property.message.id]);
return value > -1;
}
}
return false;
}
function set_54889(a0, a1) { // fn#54889, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7079:587, offset: 0x0137073a, size: 77 bytes, params: 3, frame: 13
var r1;
let value = null;
if (value == a1) {
r1 = value;
} else {
value = require(4625) /* metro dependency 4625: MessageRecordUtils */;
value = value.createMessageRecord(a1);
r1 = value;
}
env0_10[a0] = {loaded: true, message: r1};
return true;
}
function getMessageState(a0) { // fn#54890, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7079:692, offset: 0x01370787, size: 16 bytes, params: 2, frame: 2
return env0_10[a0];
}
function getMessage(a0) { // fn#54891, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7079:732, offset: 0x01370797, size: 33 bytes, params: 2, frame: 11
const getMessageStateBinding = getMessageState;
const value = undefined;
const messageStateBinding = getMessageStateBinding(a0);
return messageStateBinding == null ? value : messageStateBinding.message;
}
function LOAD_ARCHIVED_THREADS_SUCCESS_54892({threads, mostRecentMessages}) { // fn#54892, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7079:814, offset: 0x013707b8, size: 98 bytes, params: 2, frame: 14
threads.forEach(function(a0) {
set_54889(a0.id, null);
return true;
});
if (mostRecentMessages != null) {
mostRecentMessages.filter((require(1360) /* metro dependency 1360: GlobalUtils */).isNotNullish).forEach(function(a0) {
set_54889(a0.channel_id, a0);
});
}
}
return false;
}
function set_54889(a0, a1) { // fn#54889, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7079:587, offset: 0x0137073a, size: 77 bytes, params: 3, frame: 13
var r1;
let value = null;
if (value == a1) {
r1 = value;
} else {
value = require(4625) /* metro dependency 4625: MessageRecordUtils */;
value = value.createMessageRecord(a1);
r1 = value;
function _fun54895(a0) { // fn#54895, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7079:995, offset: 0x01370850, size: 91 bytes, params: 2, frame: 16
const ForumPostRecentMessageStore2 = ForumPostRecentMessageStore;
Inherits(ForumPostRecentMessageStore2, a0);
return CreateClass(ForumPostRecentMessageStore2, [{key: 'initialize', value: function() {
this.waitFor(ChannelStore, UserStore);
}}, {key: 'getMessageState', value: value_54898}]);
function ForumPostRecentMessageStore() { // fn#54896, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7079:1007, offset: 0x0102b796, size: 113 bytes, params: 1, frame: 20
const value = environment.__proto__;
env1_3(this, ForumPostRecentMessageStore);
const value3 = env1_6(ForumPostRecentMessageStore);
return env1_5(this, _isNativeReflectConstruct_54885() ? global.Reflect.construct(value3, arguments,
env1_6(this).constructor) : value3.apply(this, arguments));
}
function value_54898(a0) { // fn#54898, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7079:1420, offset: 0x013708ab, size: 49 bytes, params: 2, frame: 4
if (!(a0 in env1_10)) {
env1_10[a0] = {'loaded': false, 'message': null};
}
return env1_10[a0];
}
}
env0_10[a0] = {loaded: true, message: r1};
return true;
}
function getMessageState(a0) { // fn#54890, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7079:692, offset: 0x01370787, size: 16 bytes, params: 2, frame: 2
return env0_10[a0];
}
function getMessage(a0) { // fn#54891, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7079:732, offset: 0x01370797, size: 33 bytes, params: 2, frame: 11
const getMessageStateBinding = getMessageState;
const value = undefined;
const messageStateBinding = getMessageStateBinding(a0);
return messageStateBinding == null ? value : messageStateBinding.message;
}
function LOAD_ARCHIVED_THREADS_SUCCESS_54892({threads, mostRecentMessages}) { // fn#54892, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7079:814, offset: 0x013707b8, size: 98 bytes, params: 2, frame: 14
threads.forEach(function(a0) {
set_54889(a0.id, null);
return true;
});
if (mostRecentMessages != null) {
mostRecentMessages.filter((require(1360) /* metro dependency 1360: GlobalUtils */).isNotNullish).forEach(function(a0) {
set_54889(a0.channel_id, a0);
});
function MESSAGE_CREATE_54900(a0) { // fn#54900, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7079:1640, offset: 0x013708dc, size: 159 bytes, params: 2, frame: 18
var r1;
var r0;
var isValidMessageBinding;
var message;
var value2;
var isValidMessage2;
var channel_id;
var defaultImport;
var castMessageIdAsChannelId;
var set_54889Binding;
const isPushNotification = a0.isPushNotification;
if (isPushNotification) {
r0 = !isPushNotification;
} else {
isValidMessageBinding = isValidMessage;
message = a0.message;
value2 = undefined;
isValidMessage2 = isValidMessageBinding(message);
if (isValidMessage2) {
message = a0.message;
channel_id = message.channel_id;
defaultImport = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
castMessageIdAsChannelId = defaultImport.castMessageIdAsChannelId;
message = a0.message;
if (channel_id === Reflect.apply(castMessageIdAsChannelId, defaultImport, [message.id])) {
set_54889(a0.message.channel_id, null);
r1 = value2;
} else {
set_54889Binding = set_54889;
message = a0.message;
channel_id = message.channel_id;
message = a0.message;
set_54889Binding(channel_id, message);
r1 = value2;
}
} else {
r1 = !!isValidMessage2;
}
r0 = r1;
}
return r0;
}
}
function _fun54895(a0) { // fn#54895, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7079:995, offset: 0x01370850, size: 91 bytes, params: 2, frame: 16
const closure = ForumPostRecentMessageStore;
env0_7(closure, a0);
return env0_4(closure, [{key: 'initialize', value: function() {
this.waitFor(ChannelStore, UserStore);
}}, {key: 'getMessageState', value: value_54898}]);
}
function MESSAGE_CREATE_54900(a0) { // fn#54900, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7079:1640, offset: 0x013708dc, size: 159 bytes, params: 2, frame: 18
var r1;
var r0;
var isValidMessageBinding;
var message;
var value2;
var isValidMessage2;
var channel_id;
var defaultImport;
var castMessageIdAsChannelId;
var set_54889Binding;
const isPushNotification = a0.isPushNotification;
if (isPushNotification) {
r0 = !isPushNotification;
} else {
isValidMessageBinding = isValidMessage;
message = a0.message;
value2 = undefined;
isValidMessage2 = isValidMessageBinding(message);
function MESSAGE_UPDATE_54901(a0) { // fn#54901, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7079:1891, offset: 0x0137097b, size: 180 bytes, params: 2, frame: 21
var r1;
var r0;
var channel_id;
var value4;
var messageState;
var message2;
var binding;
var object;
var value;
const isValidMessageBinding = isValidMessage;
let message = a0.message;
const value2 = undefined;
const isValidMessage2 = isValidMessageBinding(message);
if (isValidMessage2) {
message = a0.message;
channel_id = message.channel_id;
defaultImport = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
castMessageIdAsChannelId = defaultImport.castMessageIdAsChannelId;
message = a0.message;
if (channel_id === Reflect.apply(castMessageIdAsChannelId, defaultImport, [message.id])) {
set_54889(a0.message.channel_id, null);
r1 = value2;
} else {
set_54889Binding = set_54889;
value4 = channel_id !== message.id;
if (value4) {
message = a0.message;
channel_id = message.channel_id;
message = a0.message;
set_54889Binding(channel_id, message);
r1 = value2;
}
} else {
r1 = !!isValidMessage2;
}
r0 = r1;
}
return r0;
}
function MESSAGE_UPDATE_54901(a0) { // fn#54901, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7079:1891, offset: 0x0137097b, size: 180 bytes, params: 2, frame: 21
var r1;
var r0;
var channel_id;
var value4;
var messageState;
var message2;
var binding;
var object2;
var value;
const isValidMessageBinding = isValidMessage;
let message = a0.message;
const value2 = undefined;
const isValidMessage2 = isValidMessageBinding(message);
if (isValidMessage2) {
message = a0.message;
channel_id = message.channel_id;
message = a0.message;
value4 = channel_id !== message.id;
if (value4) {
message = a0.message;
channel_id = message.channel_id;
message = a0.message;
messageState = getMessageState(channel_id);
message2 = getMessage(channel_id);
if (messageState != null && message2 != null) {
binding = env0_10;
object2 = {};
copyDataProperties(object2, messageState, undefined);
value = require(4625) /* metro dependency 4625: MessageRecordUtils */;
value = value.updateMessageRecord(message2, message);
object2['message'] = value;
binding[channel_id] = object2;
r1 = value2;
messageState = getMessageState(channel_id);
message2 = getMessage(channel_id);
if (messageState != null && message2 != null) {
binding = env0_10;
object = {};
copyDataProperties(object, messageState, undefined);
value = require(4625) /* metro dependency 4625: MessageRecordUtils */;
value = value.updateMessageRecord(message2, message);
object['message'] = value;
binding[channel_id] = object;
r1 = value2;
} else {
r1 = value2;
}
} else {
r1 = value2;
r1 = value4;
}
r0 = r1;
} else {
r1 = value4;
r0 = !!isValidMessage2;
}
r0 = r1;
} else {
r0 = !!isValidMessage2;
return r0;
}
return r0;
}
function MESSAGE_DELETE_54902({channelId, id}) { // fn#54902, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7079:2196, offset: 0x01370a2f, size: 60 bytes, params: 2, frame: 14
var r0;
const id = getMessage(channelId)?.id;
const value4 = id === id;
if (value4) {
delete env0_10[channelId];
r0 = true;
} else {
r0 = value4;
function MESSAGE_DELETE_54902({channelId, id}) { // fn#54902, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7079:2196, offset: 0x01370a2f, size: 60 bytes, params: 2, frame: 14
var r0;
const id = getMessage(channelId)?.id;
const value4 = id === id;
if (value4) {
delete env0_10[channelId];
r0 = true;
} else {
r0 = value4;
}
return r0;
}
return r0;
}
function value_54898(a0) { // fn#54898, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7079:1420, offset: 0x013708ab, size: 49 bytes, params: 2, frame: 4
if (!(a0 in env1_10)) {
env1_10[a0] = {'loaded': false, 'message': null};
}
return env1_10[a0];
}
global.__d(_fun54884, 6901, [6, 7, 15, 17, 18, 1379, 1878, 21, 4625, 1360, 566, 694,
2]) /* metro module 6901, dependencies: [6, 7, 15, 17, 18, 1379, 1878, 21, 4625, 1360, 566, 694, 2] */;
@@ -1,19 +1,23 @@
/* Metro module 9620; source: modules/forums/ForumPostUnreadCountStore.tsx; dependencies: [6, 7, 15, 17, 18, 4790, 1379, 4605, 44, 566, 694, 2] */
import ClassCallCheck from '../../by-id/module-00006-ClassCallCheck.js'; /* Metro dependency 6 */
import CreateClass from '../../by-id/module-00007-CreateClass.js'; /* Metro dependency 7 */
import PossibleConstructorReturn from '../../by-id/module-00015-PossibleConstructorReturn.js'; /* Metro dependency 15 */
import Module00017 from '../../by-id/module-00017.js'; /* Metro dependency 17 */
import Inherits from '../../by-id/module-00018-Inherits.js'; /* Metro dependency 18 */
import Module00044 from '../../by-id/module-00044.js'; /* Metro dependency 44 */
import Flux from '../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import ChannelStore from '../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import ReadStateStore from '../../stores/ReadStateStore.tsx'; /* Metro dependency 4605 */
import ActiveThreadsStore from '../threads/ActiveThreadsStore.tsx'; /* Metro dependency 4790 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun75419(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#75419, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9806:6, offset: 0x01dad15c, size: 419 bytes, params: 8, frame: 19
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(6) /* metro dependency 6 */;
const env0_3 = importDefault(7) /* metro dependency 7 */;
const env0_4 = importDefault(15) /* metro dependency 15 */;
const env0_5 = importDefault(17) /* metro dependency 17 */;
const env0_6 = importDefault(18) /* metro dependency 18 */;
const activeThreadsStore = importDefault(4790) /* metro dependency 4790: ActiveThreadsStore */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const readStateStore = importDefault(4605) /* metro dependency 4605: ReadStateStore */;
let env0_10 = {};
let Set = global.Set;
let set = new Set();
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
const Store = (Flux).Store;
_fun75423(Store).displayName = 'ForumPostUnreadCountStore';
set = new set(importDefault(694) /* metro dependency 694: Dispatcher */, {CONNECTION_OPEN: function() {
env0_10 = {};
@@ -24,136 +28,159 @@ function _fun75419(global, require, importDefault, importAll, module, exports, d
}, MESSAGE_ACK: MESSAGE_ACK_75434, REQUEST_FORUM_UNREADS: function({threads}) {
threads.forEach(_fun75436);
}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/forums/ForumPostUnreadCountStore.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/forums/ForumPostUnreadCountStore.tsx');
exports.default = set;
}
function _isNativeReflectConstruct_75420() { // fn#75420, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9806:178, offset: 0x01dad2ff, size: 98 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
}
return (_isNativeReflectConstruct_75420_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun75423(a0) { // fn#75423, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9806:396, offset: 0x01dad361, size: 124 bytes, params: 2, frame: 16
const closure = ForumPostUnreadCountStore;
env0_6(closure, a0);
return env0_3(closure, [{key: 'initialize', value: function() {
this.waitFor(ActiveThreadsStore, ChannelStore, ReadStateStore);
}}, {key: 'getCount', value: value_75426}, {key: 'getThreadIdsMissingCounts', value: value_75427}]);
}
function THREAD_CREATE_75430({channel, isNewlyCreated}) { // fn#75430, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9806:1167, offset: 0x01dad480, size: 77 bytes, params: 2, frame: 14
var r1;
var r0;
var hasLoaded2;
if (isNewlyCreated) {
hasLoaded2 = ActiveThreadsStore.hasLoaded(channel.guild_id);
if (hasLoaded2) {
env0_10[channel.id] = 0;
r1 = undefined;
} else {
r1 = !!hasLoaded2;
function _isNativeReflectConstruct_75420() { // fn#75420, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9806:178, offset: 0x01dad2ff, size: 98 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
}
r0 = r1;
} else {
r0 = !!isNewlyCreated;
return (_isNativeReflectConstruct_75420_isNativeReflectConstruct = function() {
return !!result;
})();
}
return r0;
}
function MESSAGE_CREATE_75431({channelId, optimistic, isPushNotification}) { // fn#75431, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9806:1297, offset: 0x01dad4cd, size: 71 bytes, params: 2, frame: 6
var r1;
var value2;
var binding;
var property;
let value = !optimistic;
let r0 = optimistic ? value : !isPushNotification;
if (r0) {
value2 = channelId in env0_10;
if (value2) {
function _fun75423(a0) { // fn#75423, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9806:396, offset: 0x01dad361, size: 124 bytes, params: 2, frame: 16
const ForumPostUnreadCountStore2 = ForumPostUnreadCountStore;
Inherits(ForumPostUnreadCountStore2, a0);
return CreateClass(ForumPostUnreadCountStore2, [{key: 'initialize', value: function() {
this.waitFor(ActiveThreadsStore, ChannelStore, ReadStateStore);
}}, {key: 'getCount', value: value_75426}, {key: 'getThreadIdsMissingCounts', value: value_75427}]);
function ForumPostUnreadCountStore() { // fn#75424, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9806:408, offset: 0x00de700a, size: 113 bytes, params: 1, frame: 20
const value = environment.__proto__;
env1_2(this, ForumPostUnreadCountStore);
const value3 = env1_5(ForumPostUnreadCountStore);
return env1_4(this, _isNativeReflectConstruct_75420() ? global.Reflect.construct(value3, arguments,
env1_5(this).constructor) : value3.apply(this, arguments));
}
function value_75426(a0) { // fn#75426, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9806:806, offset: 0x010353e1, size: 16 bytes, params: 2, frame: 2
return env1_10[a0];
}
function value_75427(a0, a1) { // fn#75427, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9806:871, offset: 0x01dad3dd, size: 79 bytes, params: 3, frame: 15
var environment;
const value = environment.__proto__;
(Module00044)(ActiveThreadsStore.hasLoaded(a0),
'must wait for THREAD_LIST_SYNC before calling this');
return a1.filter(_fun75428);
function _fun75428(a0) { // fn#75428, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9806:979, offset: 0x01dad42c, size: 39 bytes, params: 2, frame: 12
const value = environment.__proto__.__proto__;
return !(a0 in env2_10) && !env2_11.has(a0);
}
}
}
function THREAD_CREATE_75430({channel, isNewlyCreated}) { // fn#75430, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9806:1167, offset: 0x01dad480, size: 77 bytes, params: 2, frame: 14
var r1;
var r0;
var activeThreadsStoreBinding;
var hasLoaded2;
if (isNewlyCreated) {
activeThreadsStoreBinding = ActiveThreadsStore;
hasLoaded2 = activeThreadsStoreBinding.hasLoaded(channel.guild_id);
if (hasLoaded2) {
env0_10[channel.id] = 0;
r1 = undefined;
} else {
r1 = !!hasLoaded2;
}
r0 = r1;
} else {
r0 = !!isNewlyCreated;
}
return r0;
}
function MESSAGE_CREATE_75431({channelId, optimistic, isPushNotification}) { // fn#75431, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9806:1297, offset: 0x01dad4cd, size: 71 bytes, params: 2, frame: 6
var r1;
var value2;
var binding;
var property;
let value = !optimistic;
let r0 = optimistic ? value : !isPushNotification;
if (r0) {
value2 = channelId in env0_10;
if (value2) {
binding = env0_10;
property = binding[channelId];
value = typeof property === 'bigint' ? property : +property;
binding[channelId] = typeof value === 'bigint' ? value + 1n : +value + 1;
value = undefined;
r1 = value;
} else {
r1 = value2;
}
r0 = r1;
}
return r0;
}
function FORUM_UNREADS({threads}) { // fn#75432, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9806:1426, offset: 0x01dad514, size: 32 bytes, params: 2, frame: 11
threads.forEach(_fun75433);
function _fun75433(a0) { // fn#75433, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9806:1478, offset: 0x01dad534, size: 40 bytes, params: 2, frame: 3
var value;
if (a0.count != null) {
value = environment.__proto__;
env1_10[a0.threadId] = a0.count;
}
}
}
function MESSAGE_ACK_75434({channelId}) { // fn#75434, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9806:1537, offset: 0x01dad55c, size: 111 bytes, params: 2, frame: 16
var binding;
var readStateStoreBinding;
if (channelId in env0_10) {
binding = env0_10;
property = binding[channelId];
value = typeof property === 'bigint' ? property : +property;
binding[channelId] = typeof value === 'bigint' ? value + 1n : +value + 1;
value = undefined;
r1 = value;
} else {
r1 = value2;
}
r0 = r1;
}
return r0;
}
function FORUM_UNREADS({threads}) { // fn#75432, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9806:1426, offset: 0x01dad514, size: 32 bytes, params: 2, frame: 11
threads.forEach(_fun75433);
}
function MESSAGE_ACK_75434({channelId}) { // fn#75434, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9806:1537, offset: 0x01dad55c, size: 111 bytes, params: 2, frame: 16
if (channelId in env0_10) {
env0_10[channelId] = ReadStateStore.getUnreadCount(channelId);
return undefined;
}
const channel = ChannelStore.getChannel(ChannelStore.getChannel(channelId)?.parent_id);
if (channel != null) {
if (channel.isForumLikeChannel()) {
env0_10[channelId] = ReadStateStore.getUnreadCount(channelId);
readStateStoreBinding = ReadStateStore;
binding[channelId] = readStateStoreBinding.getUnreadCount(channelId);
return undefined;
}
const channelStoreBinding = ChannelStore;
const channel = channelStoreBinding.getChannel(channelStoreBinding.getChannel(channelId)?.parent_id);
if (channel != null) {
if (channel.isForumLikeChannel()) {
binding = env0_10;
readStateStoreBinding = ReadStateStore;
binding[channelId] = readStateStoreBinding.getUnreadCount(channelId);
return undefined;
}
}
return false;
}
return false;
}
function REQUEST_FORUM_UNREADS_75435({threads}) { // fn#75435, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9806:1750, offset: 0x01dad5cb, size: 32 bytes, params: 2, frame: 11
threads.forEach(_fun75436);
}
function REQUEST_FORUM_UNREADS_75435({threads}) { // fn#75435, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9806:1750, offset: 0x01dad5cb, size: 32 bytes, params: 2, frame: 11
threads.forEach(_fun75436);
function _fun75436({threadId}) { // fn#75436, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9806:1809, offset: 0x01dad5eb, size: 28 bytes, params: 2, frame: 11
return env1_11.add(threadId);
}
function value_75427(a0, a1) { // fn#75427, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9806:871, offset: 0x01dad3dd, size: 79 bytes, params: 3, frame: 15
var environment;
const value = environment.__proto__;
(importDefault(44) /* metro dependency 44 */)(ActiveThreadsStore.hasLoaded(a0),
'must wait for THREAD_LIST_SYNC before calling this');
return a1.filter(_fun75428);
}
function _fun75433(a0) { // fn#75433, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9806:1478, offset: 0x01dad534, size: 40 bytes, params: 2, frame: 3
var value;
if (a0.count != null) {
value = environment.__proto__;
env1_10[a0.threadId] = a0.count;
}
}
function _fun75436({threadId}) { // fn#75436, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9806:1809, offset: 0x01dad5eb, size: 28 bytes, params: 2, frame: 11
return env1_11.add(threadId);
}
function _fun75428(a0) { // fn#75428, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9806:979, offset: 0x01dad42c, size: 39 bytes, params: 2, frame: 12
const value = environment.__proto__.__proto__;
return !(a0 in env2_10) && !env2_11.has(a0);
}
global.__d(_fun75419, 9620, [6, 7, 15, 17, 18, 4790, 1379, 4605, 44, 566, 694,
2]) /* metro module 9620, dependencies: [6, 7, 15, 17, 18, 4790, 1379, 4605, 44, 566, 694, 2] */;
+170 -157
View File
@@ -1,15 +1,18 @@
/* Metro module 7156; source: modules/forums/ForumSearchStore.tsx; dependencies: [6, 7, 15, 17, 18, 1379, 566, 694, 2] */
import ClassCallCheck from '../../by-id/module-00006-ClassCallCheck.js'; /* Metro dependency 6 */
import CreateClass from '../../by-id/module-00007-CreateClass.js'; /* Metro dependency 7 */
import PossibleConstructorReturn from '../../by-id/module-00015-PossibleConstructorReturn.js'; /* Metro dependency 15 */
import Module00017 from '../../by-id/module-00017.js'; /* Metro dependency 17 */
import Inherits from '../../by-id/module-00018-Inherits.js'; /* Metro dependency 18 */
import Flux from '../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import ChannelStore from '../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun57383(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#57383, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7334:6, offset: 0x013e4dcb, size: 379 bytes, params: 8, frame: 18
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_0 = importDefault(6) /* metro dependency 6 */;
const env0_1 = importDefault(7) /* metro dependency 7 */;
const env0_2 = importDefault(15) /* metro dependency 15 */;
const env0_3 = importDefault(17) /* metro dependency 17 */;
const env0_4 = importDefault(18) /* metro dependency 18 */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
let env0_6 = {};
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
const Store = (Flux).Store;
let value = _fun57389(Store);
value.displayName = 'ForumSearchStore';
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */, {CONNECTION_OPEN: function() {
@@ -18,172 +21,182 @@ function _fun57383(global, require, importDefault, importAll, module, exports, d
FORUM_SEARCH_QUERY_UPDATED: FORUM_SEARCH_QUERY_UPDATED, FORUM_SEARCH_START: FORUM_SEARCH_START,
FORUM_SEARCH_SUCCESS: FORUM_SEARCH_SUCCESS, FORUM_SEARCH_FAILURE: FORUM_SEARCH_FAILURE,
FORUM_SEARCH_CLEAR: FORUM_SEARCH_CLEAR});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/forums/ForumSearchStore.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/forums/ForumSearchStore.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_57384() { // fn#57384, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7334:158, offset: 0x013e4f46, size: 94 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
function _isNativeReflectConstruct_57384() { // fn#57384, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7334:158, offset: 0x013e4f46, size: 94 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
}
return (_isNativeReflectConstruct_57384_isNativeReflectConstruct = function() {
return !!result;
})();
}
return (_isNativeReflectConstruct_57384_isNativeReflectConstruct = function() {
return !!result;
})();
}
function isForumLikeChannel(a0) { // fn#57387, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7334:360, offset: 0x013e4fa4, size: 47 bytes, params: 2, frame: 11
const channel = ChannelStore.getChannel(a0);
return !(channel == null || !channel.isForumLikeChannel());
}
function isForumLikeChannel(a0) { // fn#57387, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7334:360, offset: 0x013e4fa4, size: 47 bytes, params: 2, frame: 11
const channel = ChannelStore.getChannel(a0);
return !(channel == null || !channel.isForumLikeChannel());
}
function getOrCreateSearchState_57388(a0) { // fn#57388, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7334:455, offset: 0x013e4fd3, size: 44 bytes, params: 2, frame: 4
const r0 = env0_6[a0] ?? ({'query': null, 'loading': false, 'results': null});
env0_6[a0] = r0;
return r0;
}
function getOrCreateSearchState_57388(a0) { // fn#57388, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7334:455, offset: 0x013e4fd3, size: 44 bytes, params: 2, frame: 4
const r0 = env0_6[a0] ?? ({'query': null, 'loading': false, 'results': null});
env0_6[a0] = r0;
return r0;
}
function _fun57389(a0) { // fn#57389, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7334:574, offset: 0x013e4fff, size: 164 bytes, params: 2, frame: 16
const closure = ForumSearchStore;
env0_4(closure, a0);
return env0_1(closure, [{key: 'initialize', value: function() {
this.waitFor(ChannelStore);
}}, {key: 'getSearchQuery', value: value_57392}, {key: 'getSearchLoading', value: value_57393},
{key: 'getSearchResults', value: value_57394}, {key: 'getHasSearchResults', value: value_57395}]);
}
function _fun57389(a0) { // fn#57389, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7334:574, offset: 0x013e4fff, size: 164 bytes, params: 2, frame: 16
const ForumSearchStore2 = ForumSearchStore;
Inherits(ForumSearchStore2, a0);
return CreateClass(ForumSearchStore2, [{key: 'initialize', value: function() {
this.waitFor(ChannelStore);
}}, {key: 'getSearchQuery', value: value_57392}, {key: 'getSearchLoading', value: value_57393},
{key: 'getSearchResults', value: value_57394}, {key: 'getHasSearchResults', value: value_57395}]);
function ForumSearchStore() { // fn#57390, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7334:586, offset: 0x00e3db8d, size: 113 bytes, params: 1, frame: 20
const value = environment.__proto__;
env1_0(this, ForumSearchStore);
const value3 = env1_3(ForumSearchStore);
return env1_2(this, _isNativeReflectConstruct_57384() ? global.Reflect.construct(value3, arguments,
env1_3(this).constructor) : value3.apply(this, arguments));
}
function THREAD_DELETE_57397({channel}) { // fn#57397, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7334:1443, offset: 0x013e5149, size: 112 bytes, params: 2, frame: 17
const parent_id = channel.parent_id;
if (parent_id == null) {
function value_57392(a0) { // fn#57392, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7334:941, offset: 0x013e50a3, size: 33 bytes, params: 2, frame: 3
const value = environment.__proto__;
return env1_6[a0]?.query;
}
function value_57393(a0) { // fn#57393, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7334:1026, offset: 0x013e50c4, size: 43 bytes, params: 2, frame: 4
const value = environment.__proto__;
const loading = env1_6[a0]?.loading;
return loading != null && loading;
}
function value_57394(a0) { // fn#57394, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7334:1128, offset: 0x013e50ef, size: 33 bytes, params: 2, frame: 3
const value = environment.__proto__;
return env1_6[a0]?.results;
}
function value_57395(a0) { // fn#57395, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7334:1218, offset: 0x013e5110, size: 57 bytes, params: 2, frame: 4
const value = environment.__proto__;
const property = env1_6[a0];
return property?.results != null && property.results.length > 0;
}
}
function THREAD_DELETE_57397({channel}) { // fn#57397, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7334:1443, offset: 0x013e5149, size: 112 bytes, params: 2, frame: 17
const parent_id = channel.parent_id;
if (parent_id == null) {
return false;
}
const property = env0_6[parent_id];
if (property == null) {
return false;
}
const binding = env0_6;
const object = {};
copyDataProperties(object, property, undefined);
object['results'] = property.results?.filter(function(a0) {
return channel.id !== a0;
});
binding[parent_id] = object;
}
function CHANNEL_DELETE_57399({channel}) { // fn#57399, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7334:1642, offset: 0x013e51ce, size: 26 bytes, params: 2, frame: 2
return delete env0_6[channel.id];
}
function FORUM_SEARCH_QUERY_UPDATED({channelId, query}) { // fn#57400, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7334:1734, offset: 0x013e51e8, size: 72 bytes, params: 2, frame: 15
var orCreateSearchState_57388;
var binding;
var object;
if (isForumLikeChannel(channelId)) {
orCreateSearchState_57388 = getOrCreateSearchState_57388(channelId);
binding = env0_6;
object = {};
copyDataProperties(object, orCreateSearchState_57388, query);
object['query'] = query;
binding[channelId] = object;
return undefined;
}
return false;
}
const property = env0_6[parent_id];
if (property == null) {
function FORUM_SEARCH_START({channelId}) { // fn#57401, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7334:1903, offset: 0x013e5230, size: 68 bytes, params: 2, frame: 15
var orCreateSearchState_57388;
var binding;
var object;
if (isForumLikeChannel(channelId)) {
orCreateSearchState_57388 = getOrCreateSearchState_57388(channelId);
binding = env0_6;
object = {};
copyDataProperties(object, orCreateSearchState_57388, undefined);
object['loading'] = true;
binding[channelId] = object;
return undefined;
}
return false;
}
const binding = env0_6;
const object2 = {};
copyDataProperties(object2, property, undefined);
object2['results'] = property.results?.filter(function(a0) {
return channel.id !== a0;
});
binding[parent_id] = object2;
}
function CHANNEL_DELETE_57399({channel}) { // fn#57399, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7334:1642, offset: 0x013e51ce, size: 26 bytes, params: 2, frame: 2
return delete env0_6[channel.id];
}
function FORUM_SEARCH_QUERY_UPDATED({channelId, query}) { // fn#57400, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7334:1734, offset: 0x013e51e8, size: 72 bytes, params: 2, frame: 15
var orCreateSearchState_57388;
var binding;
var object2;
if (isForumLikeChannel(channelId)) {
orCreateSearchState_57388 = getOrCreateSearchState_57388(channelId);
binding = env0_6;
object2 = {};
copyDataProperties(object2, orCreateSearchState_57388, query);
object2['query'] = query;
binding[channelId] = object2;
return undefined;
function FORUM_SEARCH_SUCCESS({channelId, threadIds}) { // fn#57402, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7334:2062, offset: 0x013e5274, size: 83 bytes, params: 2, frame: 16
var orCreateSearchState_57388;
var binding;
var object;
if (isForumLikeChannel(channelId)) {
orCreateSearchState_57388 = getOrCreateSearchState_57388(channelId);
binding = env0_6;
object = {};
copyDataProperties(object, orCreateSearchState_57388, undefined);
object['loading'] = false;
object['results'] = threadIds;
binding[channelId] = object;
return undefined;
}
return false;
}
return false;
}
function FORUM_SEARCH_START({channelId}) { // fn#57401, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7334:1903, offset: 0x013e5230, size: 68 bytes, params: 2, frame: 15
var orCreateSearchState_57388;
var binding;
var object2;
if (isForumLikeChannel(channelId)) {
orCreateSearchState_57388 = getOrCreateSearchState_57388(channelId);
binding = env0_6;
object2 = {};
copyDataProperties(object2, orCreateSearchState_57388, undefined);
object2['loading'] = true;
binding[channelId] = object2;
return undefined;
function FORUM_SEARCH_FAILURE({channelId}) { // fn#57403, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7334:2245, offset: 0x013e52c7, size: 81 bytes, params: 2, frame: 15
var orCreateSearchState_57388;
var binding;
var object;
if (isForumLikeChannel(channelId)) {
orCreateSearchState_57388 = getOrCreateSearchState_57388(channelId);
binding = env0_6;
object = {};
copyDataProperties(object, orCreateSearchState_57388, undefined);
object['loading'] = false;
object['results'] = [];
binding[channelId] = object;
return undefined;
}
return false;
}
return false;
}
function FORUM_SEARCH_SUCCESS({channelId, threadIds}) { // fn#57402, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7334:2062, offset: 0x013e5274, size: 83 bytes, params: 2, frame: 16
var orCreateSearchState_57388;
var binding;
var object2;
if (isForumLikeChannel(channelId)) {
orCreateSearchState_57388 = getOrCreateSearchState_57388(channelId);
binding = env0_6;
object2 = {};
copyDataProperties(object2, orCreateSearchState_57388, undefined);
object2['loading'] = false;
object2['results'] = threadIds;
binding[channelId] = object2;
return undefined;
function FORUM_SEARCH_CLEAR({channelId}) { // fn#57404, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7334:2415, offset: 0x013e5318, size: 41 bytes, params: 2, frame: 12
const isForumLikeChannel2 = isForumLikeChannel(channelId);
return isForumLikeChannel2 ? delete env0_6[channelId] : !!isForumLikeChannel2;
}
return false;
}
function FORUM_SEARCH_FAILURE({channelId}) { // fn#57403, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7334:2245, offset: 0x013e52c7, size: 81 bytes, params: 2, frame: 15
var orCreateSearchState_57388;
var binding;
var object2;
if (isForumLikeChannel(channelId)) {
orCreateSearchState_57388 = getOrCreateSearchState_57388(channelId);
binding = env0_6;
object2 = {};
copyDataProperties(object2, orCreateSearchState_57388, undefined);
object2['loading'] = false;
object2['results'] = [];
binding[channelId] = object2;
return undefined;
}
return false;
}
function FORUM_SEARCH_CLEAR({channelId}) { // fn#57404, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7334:2415, offset: 0x013e5318, size: 41 bytes, params: 2, frame: 12
const isForumLikeChannel2 = isForumLikeChannel(channelId);
return isForumLikeChannel2 ? delete env0_6[channelId] : !!isForumLikeChannel2;
}
function value_57392(a0) { // fn#57392, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7334:941, offset: 0x013e50a3, size: 33 bytes, params: 2, frame: 3
const value = environment.__proto__;
return env1_6[a0]?.query;
}
function value_57393(a0) { // fn#57393, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7334:1026, offset: 0x013e50c4, size: 43 bytes, params: 2, frame: 4
const value = environment.__proto__;
const loading = env1_6[a0]?.loading;
return loading != null && loading;
}
function value_57394(a0) { // fn#57394, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7334:1128, offset: 0x013e50ef, size: 33 bytes, params: 2, frame: 3
const value = environment.__proto__;
return env1_6[a0]?.results;
}
function value_57395(a0) { // fn#57395, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7334:1218, offset: 0x013e5110, size: 57 bytes, params: 2, frame: 4
const value = environment.__proto__;
const property = env1_6[a0];
return property?.results != null && property.results.length > 0;
}
global.__d(_fun57383, 7156, [6, 7, 15, 17, 18, 1379, 566, 694,
2]) /* metro module 7156, dependencies: [6, 7, 15, 17, 18, 1379, 566, 694, 2] */;
+142 -133
View File
@@ -1,4 +1,11 @@
/* Metro module 6863; source: modules/forums/ForumTagHooks.tsx; dependencies: [31, 1379, 3784, 482, 566, 1360, 6864, 2] */
import ChannelStore from '../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import PermissionStore from '../../stores/PermissionStore.tsx'; /* Metro dependency 3784 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as ConstantsModule from '../../external/discord_common/js/shared/Constants.tsx'; /* Metro dependency 482 */
import * as FluxModule from '../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
function _fun54170(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#54170, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7041:6, offset: 0x0135e653, size: 237 bytes, params: 8, frame: 22
let env0_0 = require;
const closure = function(a0) {
@@ -7,152 +14,154 @@ function _fun54170(global, require, importDefault, importAll, module, exports, d
var env0_0 = r5;
return require(dependencyMap[4]).useStateFromStoresObject([ChannelStore], _fun54172, [r5]);
};
const closure2 = useAppliedTags;
const closure3 = useVisibleForumTags;
const useAppliedTags2 = useAppliedTags;
const useVisibleForumTags2 = useVisibleForumTags;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importAll(31) /* metro dependency 31 */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const permissionStore = importDefault(3784) /* metro dependency 3784: PermissionStore */;
const env0_5 = (require(482) /* metro dependency 482: Constants */).Permissions;
const env0_6 = [];
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/forums/ForumTagHooks.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/forums/ForumTagHooks.tsx');
exports.useAvailableTags = closure;
exports.useAppliedTags = closure2;
exports.useAppliedTags = useAppliedTags2;
exports.useSomeAppliedTags = useSomeAppliedTags;
exports.useVisibleForumTags = closure3;
exports.useVisibleForumTags = useVisibleForumTags2;
exports.useVisibleAppliedForumTags = useVisibleAppliedForumTags;
}
function useAvailableTags(a0) { // fn#54171, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7041:148, offset: 0x0135e740, size: 91 bytes, params: 2, frame: 17
return (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([ChannelStore], _fun54172,
[a0?.parent_id]);
}
function useAppliedTags(a0) { // fn#54174, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7041:392, offset: 0x0135e7fe, size: 61 bytes, params: 2, frame: 15
const env0_0 = a0;
return env0_2.useMemo(_fun54175, [useAvailableTags(a0), a0]);
}
function useVisibleForumTags(a0) { // fn#54177, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7041:684, offset: 0x0135e8f1, size: 115 bytes, params: 2, frame: 17
const env0_0 = a0;
return env0_2.useMemo(_fun54179,
[(require(566) /* metro dependency 566: flux */).useStateFromStores([PermissionStore], _fun54178),
a0?.availableTags]);
}
function useSomeAppliedTags(a0) { // fn#54181, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7041:1105, offset: 0x0135e9e9, size: 75 bytes, params: 2, frame: 15
const value = a1;
return env0_2.useMemo(_fun54182, [useAppliedTags(a0), value !== undefined ? value : 1]);
}
function useVisibleAppliedForumTags(a0, a1) { // fn#54183, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7041:1304, offset: 0x0135ea7a, size: 129 bytes, params: 3, frame: 21
const env0_0 = a0;
const env0_1 = a1;
const fluxModule = require(566) /* metro dependency 566: flux */;
const useStateFromStores = fluxModule.useStateFromStores;
const value2 = useVisibleForumTags(Reflect.apply(useStateFromStores, fluxModule, [[ChannelStore], _fun54184, [a0]]));
return value2.useMemo(_fun54185, [a1, value2, a0]);
}
function _fun54172() { // fn#54172, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7041:255, offset: 0x0135e79b, size: 72 bytes, params: 1, frame: 13
var environment;
const value = environment.__proto__;
return (ChannelStore.getChannel(parent_id)?.availableTags ?? []).reduce(function(a0, a1) {
var object = {};
copyDataProperties(object, a0, a1);
object[a1.id] = a1;
return object;
}, {});
}
function _fun54175() { // fn#54175, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7041:463, offset: 0x0135e83b, size: 182 bytes, params: 1, frame: 17
var environment;
var r3;
var r0;
var appliedTags;
var value3;
var binding;
var value;
const value2 = undefined;
if (env0_0 == null) {
r3 = value2;
} else {
appliedTags = env0_0.appliedTags;
if (appliedTags == null) {
r3 = value2;
} else {
value3 = appliedTags.map(_fun54176);
r3 = value3 == null ? value2 : value3.filter((require(1360) /* metro dependency 1360: GlobalUtils */).isNotNullish);
function useAvailableTags(a0) { // fn#54171, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7041:148, offset: 0x0135e740, size: 91 bytes, params: 2, frame: 17
return (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([ChannelStore], _fun54172,
[a0?.parent_id]);
function _fun54172() { // fn#54172, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7041:255, offset: 0x0135e79b, size: 72 bytes, params: 1, frame: 13
var environment;
const value = environment.__proto__;
return (ChannelStore.getChannel(parent_id)?.availableTags ?? []).reduce(function(a0, a1) {
var object = {};
copyDataProperties(object, a0, a1);
object[a1.id] = a1;
return object;
}, {});
}
}
r3 = r3 ?? env1_6;
if (env0_0 == null) {
r0 = r3;
} else {
binding = env0_0;
if (binding.isModeratorReportChannel()) {
value = environment.__proto__;
value = require(6864) /* metro dependency 6864: ReportToModUtils */;
value = value.sortedModeratorReportTags(r3);
r0 = value;
} else {
r0 = r3;
function useAppliedTags(a0) { // fn#54174, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7041:392, offset: 0x0135e7fe, size: 61 bytes, params: 2, frame: 15
const env0_0 = a0;
return ReactModule.useMemo(_fun54175, [useAvailableTags(a0), a0]);
function _fun54175() { // fn#54175, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7041:463, offset: 0x0135e83b, size: 182 bytes, params: 1, frame: 17
var environment;
var r3;
var r0;
var appliedTags;
var value3;
var binding;
var value;
const value2 = undefined;
if (env0_0 == null) {
r3 = value2;
} else {
appliedTags = env0_0.appliedTags;
if (appliedTags == null) {
r3 = value2;
} else {
value3 = appliedTags.map(_fun54176);
r3 = value3 == null ? value2 : value3.filter((require(1360) /* metro dependency 1360: GlobalUtils */).isNotNullish);
}
}
r3 = r3 ?? env1_6;
if (env0_0 == null) {
r0 = r3;
} else {
binding = env0_0;
if (binding.isModeratorReportChannel()) {
value = environment.__proto__;
value = require(6864) /* metro dependency 6864: ReportToModUtils */;
value = value.sortedModeratorReportTags(r3);
r0 = value;
} else {
r0 = r3;
}
}
return r0;
function _fun54176(a0) { // fn#54176, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7041:537, offset: 0x00f7d434, size: 16 bytes, params: 2, frame: 2
return env1_1[a0];
}
}
}
return r0;
}
function _fun54178() { // fn#54178, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7041:754, offset: 0x0135e964, size: 38 bytes, params: 1, frame: 13
const can = PermissionStore.can;
const MANAGE_THREADS = Permissions.MANAGE_THREADS;
return Reflect.apply(can, PermissionStore, [MANAGE_THREADS, env0_0]);
}
function _fun54179() { // fn#54179, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7041:804, offset: 0x0135e98a, size: 81 bytes, params: 1, frame: 14
const r2 = env0_0?.availableTags ?? [];
const items2 = [];
arraySpread(items2, r2, 0, items2);
return env0_1 ? items2 : items2.filter(function(a0) {
return !a0.moderated;
});
}
function _fun54182() { // fn#54182, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7041:1182, offset: 0x0135ea34, size: 70 bytes, params: 1, frame: 15
const binding = env0_1;
const slice = binding.slice;
const binding2 = env0_0;
const Math = global.Math;
return [Reflect.apply(slice, binding, [0, binding2]), Math.max(0, env0_1.length - binding2)];
}
function _fun54184() { // fn#54184, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7041:1403, offset: 0x0135eafb, size: 47 bytes, params: 1, frame: 13
return ChannelStore.getChannel(env0_0?.parent_id);
}
function _fun54185() { // fn#54185, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7041:1473, offset: 0x0135eb2a, size: 95 bytes, params: 1, frame: 13
var environment;
var r0;
var binding;
var value;
const value2 = require.filter(_fun54186);
if (env0_0 == null) {
r0 = value2;
} else {
binding = env0_0;
if (binding.isModeratorReportChannel()) {
value = environment.__proto__;
value = require(6864) /* metro dependency 6864: ReportToModUtils */;
value = value.sortedModeratorReportTags(value2);
r0 = value;
} else {
r0 = value2;
function useVisibleForumTags(a0) { // fn#54177, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7041:684, offset: 0x0135e8f1, size: 115 bytes, params: 2, frame: 17
const env0_0 = a0;
return ReactModule.useMemo(_fun54179,
[(require(566) /* metro dependency 566: flux */).useStateFromStores([PermissionStore], _fun54178),
a0?.availableTags]);
function _fun54178() { // fn#54178, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7041:754, offset: 0x0135e964, size: 38 bytes, params: 1, frame: 13
const permissionStoreBinding = PermissionStore;
const can = permissionStoreBinding.can;
const MANAGE_THREADS = Permissions.MANAGE_THREADS;
return Reflect.apply(can, permissionStoreBinding, [MANAGE_THREADS, env0_0]);
}
function _fun54179() { // fn#54179, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7041:804, offset: 0x0135e98a, size: 81 bytes, params: 1, frame: 14
const r2 = env0_0?.availableTags ?? [];
const items2 = [];
arraySpread(items2, r2, 0, items2);
return env0_1 ? items2 : items2.filter(function(a0) {
return !a0.moderated;
});
}
}
function useSomeAppliedTags(a0) { // fn#54181, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7041:1105, offset: 0x0135e9e9, size: 75 bytes, params: 2, frame: 15
const value = a1;
return ReactModule.useMemo(_fun54182, [useAppliedTags(a0), value !== undefined ? value : 1]);
function _fun54182() { // fn#54182, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7041:1182, offset: 0x0135ea34, size: 70 bytes, params: 1, frame: 15
const binding = env0_1;
const slice = binding.slice;
const binding2 = env0_0;
const Math = global.Math;
return [Reflect.apply(slice, binding, [0, binding2]), Math.max(0, env0_1.length - binding2)];
}
}
function useVisibleAppliedForumTags(a0, a1) { // fn#54183, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7041:1304, offset: 0x0135ea7a, size: 129 bytes, params: 3, frame: 21
const env0_0 = a0;
const env0_1 = a1;
const useStateFromStores = FluxModule.useStateFromStores;
const value2 = useVisibleForumTags(Reflect.apply(useStateFromStores, FluxModule, [[ChannelStore], _fun54184, [a0]]));
return value2.useMemo(_fun54185, [a1, value2, a0]);
function _fun54184() { // fn#54184, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7041:1403, offset: 0x0135eafb, size: 47 bytes, params: 1, frame: 13
return ChannelStore.getChannel(env0_0?.parent_id);
}
function _fun54185() { // fn#54185, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7041:1473, offset: 0x0135eb2a, size: 95 bytes, params: 1, frame: 13
var environment;
var r0;
var binding;
var value;
const value2 = require.filter(_fun54186);
if (env0_0 == null) {
r0 = value2;
} else {
binding = env0_0;
if (binding.isModeratorReportChannel()) {
value = environment.__proto__;
value = require(6864) /* metro dependency 6864: ReportToModUtils */;
value = value.sortedModeratorReportTags(value2);
r0 = value;
} else {
r0 = value2;
}
}
return r0;
function _fun54186(a0) { // fn#54186, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7041:1494, offset: 0x0135eb89, size: 22 bytes, params: 2, frame: 11
return env1_2.includes(a0);
}
}
}
return r0;
}
function _fun54186(a0) { // fn#54186, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7041:1494, offset: 0x0135eb89, size: 22 bytes, params: 2, frame: 11
return env1_2.includes(a0);
}
global.__d(_fun54170, 6863, [31, 1379, 3784, 482, 566, 1360, 6864,
2]) /* metro module 6863, dependencies: [31, 1379, 3784, 482, 566, 1360, 6864, 2] */;
+100 -96
View File
@@ -1,16 +1,18 @@
/* Metro module 6899; source: modules/forums/ForumUtils.tsx; dependencies: [1379, 1867, 4605, 6900, 1386, 1244, 1388, 2] */
import ChannelStore from '../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import GuildStore from '../../stores/GuildStore.tsx'; /* Metro dependency 1867 */
import ReadStateStore from '../../stores/ReadStateStore.tsx'; /* Metro dependency 4605 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ChannelConstantsModule from '../channel/ChannelConstants.tsx'; /* Metro dependency 1386 */
import * as ForumConstantsModule from './ForumConstants.tsx'; /* Metro dependency 6900 */
function _fun54876(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#54876, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7077:6, offset: 0x0136fff4, size: 245 bytes, params: 8, frame: 20
const env0_0 = require;
const closure = getForumPostReadStates;
const getForumPostReadStates2 = getForumPostReadStates;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
const readStateStore = importDefault(4605) /* metro dependency 4605: ReadStateStore */;
const env0_5 = (require(6900) /* metro dependency 6900: ForumConstants */).ForumTimestampFormats;
const env0_6 = (require(1386) /* metro dependency 1386: ChannelConstants */).ChannelFlags;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/forums/ForumUtils.tsx');
exports.getForumPostReadStates = closure;
(FileImportTrackerModule).fileFinishedImporting('modules/forums/ForumUtils.tsx');
exports.getForumPostReadStates = getForumPostReadStates2;
exports.getForumPostReadStatesById = getForumPostReadStatesById;
exports.getForumTimestampFormatter = function(a0, a1) {
if (a1 === ForumTimestampFormats.POSTED_DURATION_AGO) {
@@ -34,107 +36,109 @@ function _fun54876(global, require, importDefault, importAll, module, exports, d
return r3.hasTrackedUnread(a0) && r3.hasOpenedThread(a0) && r3.getTrackedAckMessageId(a0) != null;
};
exports.isForumPostPinned = isForumPostPinned;
}
function getForumPostReadStates(a0, a1) { // fn#54877, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7077:181, offset: 0x013700e9, size: 150 bytes, params: 3, frame: 18
let value = a2;
const value2 = undefined;
const iterator = (value !== value2 ? value : [ReadStateStore])[Symbol.iterator]();
let item2 = iterator.next();
const item = item2.value;
item2 = item2.done ? undefined : iterator;
value = item2 === value2;
const r4 = value ? value2 : item;
if (!value) {
item2.return();
function getForumPostReadStates(a0, a1) { // fn#54877, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7077:181, offset: 0x013700e9, size: 150 bytes, params: 3, frame: 18
let value = a2;
const value2 = undefined;
const iterator = (value !== value2 ? value : [ReadStateStore])[Symbol.iterator]();
let item2 = iterator.next();
const item = item2.value;
item2 = item2.done ? undefined : iterator;
value = item2 === value2;
const r4 = value ? value2 : item;
if (!value) {
item2.return();
}
const object = {};
object.isNew = !a0.isArchivedThread() && r4.isNewForumThread(a0.id, a0.parent_id, a1);
object.hasUnreads = !a0.isArchivedThread() && r4.isForumPostUnread(a0.id);
return object;
}
const object2 = {};
object2.isNew = !a0.isArchivedThread() && r4.isNewForumThread(a0.id, a0.parent_id, a1);
object2.hasUnreads = !a0.isArchivedThread() && r4.isForumPostUnread(a0.id);
return object2;
}
function getCreationDefaultFormatter() { // fn#54878, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7077:394, offset: 0x0137017f, size: 152 bytes, params: 1, frame: 15
const object2 = {};
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
object2.minutes = t.nFt9ck;
object2.hours = t.jzCewe;
const U4I0sw = t.U4I0sw;
object2.days = U4I0sw;
object2.month = (require(1244) /* metro dependency 1244: indexNative */).intl.string(t['nBNJ/L']);
return object2;
}
function getCreationDefaultFormatter() { // fn#54878, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7077:394, offset: 0x0137017f, size: 152 bytes, params: 1, frame: 15
const object = {};
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
object.minutes = t.nFt9ck;
object.hours = t.jzCewe;
const U4I0sw = t.U4I0sw;
object.days = U4I0sw;
object.month = (require(1244) /* metro dependency 1244: indexNative */).intl.string(t['nBNJ/L']);
return object;
}
function getForumPostReadStatesById(a0) { // fn#54879, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7077:659, offset: 0x01370217, size: 204 bytes, params: 2, frame: 19
var r1;
var r0;
var r3;
var r7;
var item3;
var item4;
let value = a1;
const value2 = undefined;
const iterator = (value !== value2 ? value : [ChannelStore, GuildStore, ReadStateStore])[Symbol.iterator]();
const iterator2 = iterator.next;
let item2 = Reflect.apply(iterator2, iterator, []);
let item = item2.value;
item2 = item2.done ? undefined : iterator;
const r2 = item2 === value2 ? value2 : item;
if (value) {
r0 = item2;
r1 = value;
r3 = value2;
} else {
item3 = Reflect.apply(iterator2, item2, []);
item = item3.value;
item3 = item3.done ? undefined : item2;
value = item3 === value2;
function getForumPostReadStatesById(a0) { // fn#54879, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7077:659, offset: 0x01370217, size: 204 bytes, params: 2, frame: 19
var r1;
var r0;
var r3;
var r7;
var item3;
var item4;
let value = a1;
const value2 = undefined;
const iterator = (value !== value2 ? value : [ChannelStore, GuildStore, ReadStateStore])[Symbol.iterator]();
const iterator2 = iterator.next;
let item2 = Reflect.apply(iterator2, iterator, []);
let item = item2.value;
item2 = item2.done ? undefined : iterator;
const r2 = item2 === value2 ? value2 : item;
if (value) {
r0 = item3;
r0 = item2;
r1 = value;
r3 = value2;
} else {
r0 = item3;
r1 = value;
r3 = item;
item3 = Reflect.apply(iterator2, item2, []);
item = item3.value;
item3 = item3.done ? undefined : item2;
value = item3 === value2;
if (value) {
r0 = item3;
r1 = value;
r3 = value2;
} else {
r0 = item3;
r1 = value;
r3 = item;
}
}
}
if (r1) {
r7 = value2;
} else {
item4 = Reflect.apply(iterator2, r0, []);
item = item4.value;
item4 = item4.done ? undefined : r0;
value = item4 === value2;
if (value) {
r0 = item4;
r1 = value;
if (r1) {
r7 = value2;
} else {
r0 = item4;
r1 = value;
r7 = item;
item4 = Reflect.apply(iterator2, r0, []);
item = item4.value;
item4 = item4.done ? undefined : r0;
value = item4 === value2;
if (value) {
r0 = item4;
r1 = value;
r7 = value2;
} else {
r0 = item4;
r1 = value;
r7 = item;
}
}
if (!r1) {
r0.return();
}
value = r2.getChannel(a0);
const value3 = null;
if (value3 == value) {
return value3;
}
const guild = r3.getGuild(value.guild_id);
if (value3 == guild) {
r1 = value3;
} else {
value = getForumPostReadStates(value, guild, [r7]);
r1 = value;
}
return r1;
}
if (!r1) {
r0.return();
function isForumPostPinned(a0) { // fn#54882, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7077:1226, offset: 0x01370381, size: 60 bytes, params: 2, frame: 12
return ChannelStore.getChannel(a0)?.hasFlag(ChannelFlags.PINNED) === true;
}
value = r2.getChannel(a0);
const value3 = null;
if (value3 == value) {
return value3;
}
const guild = r3.getGuild(value.guild_id);
if (value3 == guild) {
r1 = value3;
} else {
value = getForumPostReadStates(value, guild, [r7]);
r1 = value;
}
return r1;
}
function isForumPostPinned(a0) { // fn#54882, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7077:1226, offset: 0x01370381, size: 60 bytes, params: 2, frame: 12
return ChannelStore.getChannel(a0)?.hasFlag(ChannelFlags.PINNED) === true;
}
global.__d(_fun54876, 6899, [1379, 1867, 4605, 6900, 1386, 1244, 1388,
2]) /* metro module 6899, dependencies: [1379, 1867, 4605, 6900, 1386, 1244, 1388, 2] */;
File diff suppressed because it is too large. Load diff
+104 -94
View File
@@ -1,111 +1,121 @@
/* Metro module 11089; source: modules/forums/native/AppliedForumTag.tsx; dependencies: [31, 27, 6540, 1881, 33, 4501, 697, 566, 11090, 1244, 6739, 1423, 4573, 2] */
import Native from '../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import EmojiStore from '../../emojis/EmojiStore.tsx'; /* Metro dependency 6540 */
import ForumTagContextMenu from './ForumTagContextMenu.tsx'; /* Metro dependency 11090 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as FluxModule from '../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as EmojiConstantsModule from '../../emojis/EmojiConstants.tsx'; /* Metro dependency 1881 */
import * as TextModule from '../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
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 AppliedForumTag2 = 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 */;
ReactModule;
let value = JsxRuntimeModule;
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},
const object2 = {'height': 24, 'paddingHorizontal': 8, 'borderRadius': 20, 'backgroundColor': null,
'borderWidth': 1, 'borderColor': null, 'marginRight': 4, 'flexShrink': 1};
const BACKGROUND_MOD_NORMAL = (Native).colors.BACKGROUND_MOD_NORMAL;
object2.backgroundColor = BACKGROUND_MOD_NORMAL;
const BORDER_SUBTLE = (Native).colors.BORDER_SUBTLE;
object2.borderColor = BORDER_SUBTLE;
const env0_8 = Reflect.apply(createStyles, value, [{pill: object2, 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');
(FileImportTrackerModule).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;
exports.AppliedForumTag = AppliedForumTag2;
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 = (FluxModule).useStateFromStores([EmojiStore], _fun84907);
const env0_6 = hasUnreads ? 'text-default' : 'text-muted';
return ((Component) => <Component tagId={tag.id}>{children_84908}</Component>)(ForumTagContextMenu);
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;
}
object.src = r10;
object.name = emojiName ?? '';
value = ((Component) => <Component {...object} />)(value);
r6 = value;
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 = (TextModule).Text;
return (
<View {...viewProps}>
{r6}
<Text
lineClamp={1}
style={styles.tagName}
variant="text-xs/semibold"
color={env0_6}
>
{name}
</Text>
</View>
);
}
}
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>
);
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 : {}]}
/>
);
}
}
global.__d(_fun84905, 11089, [31, 27, 6540, 1881, 33, 4501, 697, 566, 11090, 1244, 6739, 1423, 4573,
2]) /* metro module 11089, dependencies: [31, 27, 6540, 1881, 33, 4501, 697, 566, 11090, 1244, 6739, 1423, 4573, 2] */;
@@ -1,121 +1,130 @@
/* 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] */
import EmojiStore from '../../emojis/EmojiStore.tsx'; /* Metro dependency 6540 */
import TextStyles from '../../rebrand/native/TextStyles.tsx'; /* Metro dependency 6597 */
import ForumTagContextMenu from './ForumTagContextMenu.tsx'; /* Metro dependency 11090 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as FluxModule from '../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
import * as NativeModule from '../../../design/void/native.tsx'; /* Metro dependency 1305 */
import * as EmojiConstantsModule from '../../emojis/EmojiConstants.tsx'; /* Metro dependency 1881 */
import * as NativeModule2 from '../../../design/components/experimental/native.tsx'; /* Metro dependency 8554 */
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 Fonts = (ConstantsModule).Fonts;
let value = JsxRuntimeModule;
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,
object = {};
const object2 = {'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;
object2.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;
object2.borderColor = BACKGROUND_BASE_LOWEST;
object.pill = object2;
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',
object.pillSelected = {borderColor: BACKGROUND_BRAND, borderWidth: 1};
object.pillDisabled = {opacity: 0.6};
object.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 */;
object.imageEmoji = {'height': 16, 'width': 16};
object.textEmoji = {'fontSize': 14, 'lineHeight': 20};
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');
object.tagName = TextStyles(PRIMARY_SEMIBOLD, MOBILE_TEXT_HEADING_PRIMARY, 14);
const env0_8 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).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 selected2 = selected;
const styles = useStyles();
const env0_5 = tag.name;
const env0_6 = tag.emojiId;
const env0_7 = tag.emojiName;
const env0_8 = (FluxModule).useStateFromStores([EmojiStore], _fun85235);
const AvailableForumTagHandlePress = function() {
if (!disabled) {
onPress(tag);
}
};
const env0_10 = selected2.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>)(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 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);
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 object2;
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 = (NativeModule2).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 */;
object2 = {};
stylesBinding = styles;
object2.style = stylesBinding.emoji;
object2.textEmojiStyle = stylesBinding.textEmoji;
object2.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;
}
object2.src = r10;
object2.name = emojiName ?? '';
value = ((Component) => <Component {...object2} />)(value);
r6 = value;
}
const LegacyText = (NativeModule).LegacyText;
return (
<PressableScale {...pressableScaleProps2}>
{r6}
<LegacyText style={styles.tagName}>
{name}
</LegacyText>
</PressableScale>
);
}
};
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>
);
}
global.__d(_fun85233, 11162, [31, 6540, 661, 1881, 33, 4501, 697, 6597, 566, 11090, 8554, 6739, 1423, 1305,
2]) /* metro module 11162, dependencies: [31, 6540, 661, 1881, 33, 4501, 697, 6597, 566, 11090, 8554, 6739, 1423, 1305, 2] */;
@@ -1,15 +1,29 @@
/* 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] */
import Module00057 from '../../../by-id/module-00057.js'; /* Metro dependency 57 */
import Native from '../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import ChannelStore from '../../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import AlertActionCreators from '../../../actions/native/AlertActionCreators.tsx'; /* Metro dependency 4496 */
import EmojiStore from '../../emojis/EmojiStore.tsx'; /* Metro dependency 6540 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as IndexNativeModule from '../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as NativeModule from '../../../design/void/native.tsx'; /* Metro dependency 1305 */
import * as UseNavigationNativeModule from '../../../design/components/Navigator/native/useNavigation.native.tsx'; /* Metro dependency 1484 */
import * as EmojiConstantsModule from '../../emojis/EmojiConstants.tsx'; /* Metro dependency 1881 */
import * as StackNativeModule from '../../../design/components/Stack/native/Stack.native.tsx'; /* Metro dependency 4572 */
import * as TextModule from '../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as HeaderActionButtonNativeModule from '../../../design/components/Navigator/native/HeaderActionButton.native.tsx'; /* Metro dependency 5277 */
import * as PressablesModule from '../../../design/void/Pressables/native/Pressables.tsx'; /* Metro dependency 5278 */
import * as TableRowGroupNativeModule from '../../../design/components/TableRow/native/TableRowGroup.native.tsx'; /* Metro dependency 6231 */
import * as TableRowNativeModule from '../../../design/components/TableRow/native/TableRow.native.tsx'; /* Metro dependency 6238 */
import * as TableSwitchRowNativeModule from '../../../design/components/TableRow/native/TableSwitchRow.native.tsx'; /* Metro dependency 6808 */
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 */;
let value = EmojiConstantsModule;
const env0_8 = value.EMOJI_URL_BASE_SIZE;
const env0_9 = value.EmojiIntention;
value = require(33) /* metro dependency 33 */;
@@ -17,268 +31,332 @@ function _fun116407(global, require, importDefault, importAll, module, exports,
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,
object = {};
const BACKGROUND_BASE_LOWER = (Native).colors.BACKGROUND_BASE_LOWER;
object.container = {'display': 'flex', 'flex': 1, backgroundColor: BACKGROUND_BASE_LOWER};
const PX_16 = (Native).space.PX_16;
object.sections = {paddingHorizontal: 12, paddingTop: PX_16};
object.hint = {marginTop: 8};
object.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');
object.imageEmoji = {'height': 20, 'width': 20};
object.textEmoji = {'fontSize': 20, 'lineHeight': 26};
object.nameInput = {'width': '100%', 'flexGrow': 1};
object.saveButton = {flex: 0};
const env0_12 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).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);
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 = (PressablesModule).PressableOpacity;
var r1;
var r2;
var r31;
var r26;
var defaultImport;
const styles = useStyles();
const value4 = tag == null;
const value5 = (UseNavigationNativeModule).useNavigation();
const env0_4 = value5;
let binding = env0_4;
let useState = binding.useState;
const value7 = Module00057(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 = Module00057(Reflect.apply(useState, binding, [name ?? value8]), 2);
const property2 = value10[0];
const env0_8 = value10[1];
binding = env0_4;
useState = binding.useState;
const value12 = Module00057(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 {
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]);
r2 = value15;
}
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);
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 = (StackNativeModule).Stack;
const TableRowGroup = (TableRowGroupNativeModule).TableRowGroup;
const TableRow = (TableRowNativeModule).TableRow;
const object2 = {};
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 {
env0_10(false);
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 {
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();
object2.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 = (NativeModule).TextInput;
const textInputProps = {'maxLength': 20, 'style': null, 'value': null, 'autoCorrect': false,
'autoCapitalize': 'none', 'returnKeyType': 'done', style: styles.nameInput, value: property2,
onChangeText: onChangeText_116419};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
textInputProps.placeholder = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.aMSq0a);
object2.label = <TextInput {...textInputProps} />;
object2.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 {...object2} />
</TableRowGroup>
);
const Text = (TextModule).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 = (TableSwitchRowNativeModule).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 == ReactNativeModule.View ? undefined : ReactNativeModule.View.id) ? EmojiStore.getUsableCustomEmojiById(ReactNativeModule.View.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: ReactNativeModule.View, 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 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 = (TextModule).Text;
const resultBinding = result;
const intl = (IndexNativeModule).intl;
const string = intl.string;
const t = (IndexNativeModule).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 _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 object;
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;
object = {};
id = tag == null ? value3 : tag.id;
object.id = id;
object.name = tagName;
id = emoji == null ? value3 : emoji.id;
object.emojiId = id;
object.emojiName = emoji == null ? value3 : emoji.name;
object.moderated = moderated;
Reflect.apply(updateForumTag, defaultImport, [object, 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 object = {};
if (binding) {
object.headerRight = headerRight_116416;
Reflect.apply(setOptions, binding2, [object]);
} else {
object.headerRight = undefined;
Reflect.apply(setOptions, binding2, [object]);
}
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 = (HeaderActionButtonNativeModule).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 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 ChannelSettingsEditForumTagOnChangeText(a0) { // fn#116419, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15412:3293, owner: ChannelSettingsEditForumTag.onChangeText, offset: 0x02094aa0, size: 19 bytes, params: 2, frame: 11
env0_8(a0);
}
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 = AlertActionCreators;
const show = defaultImport.show;
const intl = (IndexNativeModule).intl;
const string = intl.string;
const t = (IndexNativeModule).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 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();
}
}
}
}
}
global.__d(_fun116407, 15215, [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]) /* metro module 15215, 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] */;
File diff suppressed because it is too large. Load diff
@@ -1,48 +1,74 @@
/* Metro module 12063; source: modules/forums/native/ForumChannelEmptyState.tsx; dependencies: [31, 27, 33, 4501, 4002, 1585, 12064, 12065, 4573, 1244, 2] */
import UseSafeAreaInsetsNative from '../../safe_area/useSafeAreaInsets.native.tsx'; /* Metro dependency 1585 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as SharedModule from '../../../design/shared.tsx'; /* Metro dependency 4002 */
import * as CreateStylesModule from '../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as TextModule from '../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
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,
let value = ReactModule;
const env0_7 = (CreateStylesModule).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');
(FileImportTrackerModule).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 useThemeContext = SharedModule.useThemeContext;
const theme = Reflect.apply(useThemeContext, SharedModule, []).theme;
const {bottom, top} = (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 = (TextModule).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>
);
}
}
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>
);
}
global.__d(_fun92706, 12063, [31, 27, 33, 4501, 4002, 1585, 12064, 12065, 4573, 1244,
2]) /* metro module 12063, dependencies: [31, 27, 33, 4501, 4002, 1585, 12064, 12065, 4573, 1244, 2] */;
@@ -1,135 +1,157 @@
/* 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] */
import ForumSearchStore from '../ForumSearchStore.tsx'; /* Metro dependency 7156 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as FluxModule from '../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as Module01485Module from '../../../by-id/module-01485.js'; /* Metro dependency 1485 */
import * as CreateStylesModule from '../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as UseCanSearchForumPostsByChannelIdModule from './hooks/useCanSearchForumPostsByChannelId.tsx'; /* Metro dependency 9699 */
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,
let value = ReactModule;
const env0_7 = (CreateStylesModule).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');
(FileImportTrackerModule).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>;
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 = (Module01485Module).useNavigation();
const value3 = (Module01485Module).useRoute();
const value4 = (UseCanSearchForumPostsByChannelIdModule).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;
}
} else {
r0 = null;
return r0;
function _fun76225() { // fn#76225, offset: 0x01dc738e, size: 11 bytes, params: 1, frame: 1
return _fun76226;
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)]);
}
}
}
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);
}
}
}
return r0;
}
function _fun76225() { // fn#76225, offset: 0x01dc738e, size: 11 bytes, params: 1, frame: 1
return _fun76226;
}
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 object2;
var intl;
const styles = useStyles();
const value2 = (UseCanSearchForumPostsByChannelIdModule).useCanSearchForumPostsByChannelId(channelId);
const value3 = (FluxModule).useStateFromStores([ForumSearchStore], _fun76229,
[channelId]);
if (value2) {
if (value3 != null) {
var viewBindingProps = {style: styles.inputContainer};
SearchField = (require(6984) /* metro dependency 6984: SearchFieldNative */).SearchField;
object2 = {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);
}
object2.placeholder = r9;
object2.autoFocus = value3.length === 0;
object2.onClear = onClear;
object2.grow = false;
r0 = (
<View {...viewBindingProps}>
<SearchField {...object2} />
</View>
);
} else {
r0 = null;
}
} else {
r0 = null;
}
return r0;
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 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 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 _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 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 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)]);
}
}
global.__d(_fun76223, 9698, [31, 27, 7156, 33, 4501, 1485, 9699, 9603, 4578, 1244, 9621, 566, 6984, 7155,
2]) /* metro module 9698, dependencies: [31, 27, 7156, 33, 4501, 1485, 9699, 9603, 4578, 1244, 9621, 566, 6984, 7155, 2] */;
@@ -1,213 +1,282 @@
/* 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] */
import Module00057 from '../../../by-id/module-00057.js'; /* Metro dependency 57 */
import Native from '../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import ChannelStore from '../../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as ThreadSortOrderModule from '../../../external/discord_common/js/shared/shared-constants/ThreadSortOrder.tsx'; /* Metro dependency 1388 */
import * as ForumLayoutModule from '../../../external/discord_common/js/shared/shared-constants/ForumLayout.tsx'; /* Metro dependency 1389 */
import * as ThreadSearchTagSettingModule from '../../../external/discord_common/js/shared/shared-constants/ThreadSearchTagSetting.tsx'; /* Metro dependency 1390 */
import * as StackNativeModule from '../../../design/components/Stack/native/Stack.native.tsx'; /* Metro dependency 4572 */
import * as UseMountEffectModule from '../../../hooks/useMountEffect.tsx'; /* Metro dependency 4594 */
import * as Module06277Module from '../../../by-id/module-06277.js'; /* Metro dependency 6277 */
import * as BottomSheetTitleHeaderNativeModule from '../../../design/components/Sheet/native/BottomSheetTitleHeader.native.tsx'; /* Metro dependency 6758 */
import * as ActionSheetNativeModule from '../../../design/components/Sheet/native/ActionSheet.native.tsx'; /* Metro dependency 6805 */
import * as TableRadioRowNativeModule from '../../../design/components/TableRow/native/TableRadioRow.native.tsx'; /* Metro dependency 7987 */
import * as TableRadioGroupNativeModule from '../../../design/components/TableRow/native/TableRadioGroup.native.tsx'; /* Metro dependency 7988 */
import * as ActionSheetHeaderPressableTextNativeModule from '../../../design/components/Sheet/native/ActionSheetHeaderPressableText.native.tsx'; /* Metro dependency 9067 */
import * as ForumChannelStoreModule from '../ForumChannelStore.tsx'; /* Metro dependency 11547 */
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 */;
let value = ForumChannelStoreModule;
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');
(FileImportTrackerModule).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 object11;
var r11;
var object3;
var object;
const ForumLayout = (ForumLayoutModule).ForumLayout;
var items3;
var object2;
var object8;
var object6;
const ThreadSearchTagSetting = (ThreadSearchTagSettingModule).ThreadSearchTagSetting;
var items4;
var object7;
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 layoutType2 = layoutType;
const tagSetting = value2.tagSetting;
const binding = useForumChannelStoreApi();
let useState = binding.useState;
const value3 = Reflect.apply(useState, binding, [sortOrder]);
const binding2 = layoutType2;
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);
(UseMountEffectModule).useUnmountEffect(_fun92678);
const value11 = binding.useCallback(_fun92679, [channel]);
if (channel == null) {
return null;
}
const r14 = channel.availableTags != null && channel.availableTags.length > 0;
const ActionSheet = (ActionSheetNativeModule).ActionSheet;
object11 = {scrollable: true};
const BottomSheetTitleHeader = (BottomSheetTitleHeaderNativeModule).BottomSheetTitleHeader;
const object9 = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
object9.title = Reflect.apply(string, intl, [t.xyYt8A]);
const ActionSheetHeaderPressableText = (ActionSheetHeaderPressableTextNativeModule).ActionSheetHeaderPressableText;
object9.leading = (
<ActionSheetHeaderPressableText
onPress={value11}
label={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.yBZMsQ)}
/>
);
object11.header = <BottomSheetTitleHeader {...object9} />;
const BottomSheetScrollView = (Module06277Module).BottomSheetScrollView;
const Stack = (StackNativeModule).Stack;
const PX_16 = (Native).space.PX_16;
const TableRadioGroup = (TableRadioGroupNativeModule).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 object10 = {};
object10.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.jOPmcI);
const ThreadSortOrder = (ThreadSortOrderModule).ThreadSortOrder;
const LATEST_ACTIVITY = ThreadSortOrder.LATEST_ACTIVITY;
object10.value = LATEST_ACTIVITY;
const items5 = [object10];
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)};
object = {};
object.label = intl.string(t['NJFr+g']);
object.value = ForumLayout.LIST;
items3 = [object];
object2 = {};
object2.label = intl.string(t.wKeggb);
object2.value = ForumLayout.GRID;
items3[1] = object2;
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)};
object6 = {};
object6.label = intl.string(t.rQ0ctQ);
object6.value = ThreadSearchTagSetting.MATCH_SOME;
items4 = [object6];
object7 = {};
object7.label = intl.string(t.FCXUu0);
object7.value = ThreadSearchTagSetting.MATCH_ALL;
items4[1] = object7;
r11 = (
<TableRadioGroup {...tableRadioGroupProps}>
{items4.map(_fun92685)}
</TableRadioGroup>
);
} else {
r11 = null;
}
items2[2] = r11;
return (
<ActionSheet {...object11}>
<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 = ReactModule;
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 ForumDisplaySettingsActionSheetOnChange(a0) { // fn#92680, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12245:1728, owner: ForumDisplaySettingsActionSheet.onChange, offset: 0x01fc7eff, size: 19 bytes, params: 2, frame: 11
env0_6(a0);
}
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 = (TableRadioRowNativeModule).TableRadioRow;
return (
<TableRadioRow
label={label}
value={value}
key={value}
/>
);
}
function ForumDisplaySettingsActionSheetOnChange_92682(a0) { // fn#92682, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12245:2202, owner: ForumDisplaySettingsActionSheet.onChange, offset: 0x02094aa0, size: 19 bytes, params: 2, frame: 11
env0_8(a0);
}
function _fun92683({label, value}) { // fn#92683, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12245:2486, offset: 0x02094a5d, size: 67 bytes, params: 2, frame: 16
const TableRadioRow = (TableRadioRowNativeModule).TableRadioRow;
return (
<TableRadioRow
label={label}
value={value}
key={value}
/>
);
}
function ForumDisplaySettingsActionSheetOnChange_92684(a0) { // fn#92684, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12245:2639, owner: ForumDisplaySettingsActionSheet.onChange, offset: 0x02094ab3, size: 19 bytes, params: 2, frame: 11
env0_10(a0);
}
function _fun92685({label, value}) { // fn#92685, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12245:2953, offset: 0x02094a5d, size: 67 bytes, params: 2, frame: 16
const TableRadioRow = (TableRadioRowNativeModule).TableRadioRow;
return (
<TableRadioRow
label={label}
value={value}
key={value}
/>
);
}
}
}
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}
/>
);
}
global.__d(_fun92675, 12059, [57, 31, 1379, 11547, 33, 1244, 1388, 1389, 1390, 566, 4594, 7155, 6805, 6758, 9067,
6277, 4572, 697, 7988, 7987,
2]) /* metro module 12059, dependencies: [57, 31, 1379, 11547, 33, 1244, 1388, 1389, 1390, 566, 4594, 7155, 6805, 6758, 9067, 6277, 4572, 697, 7988, 7987, 2] */;
@@ -1,63 +1,102 @@
/* Metro module 8005; source: modules/forums/native/ForumExplicitMediaAlert.tsx; dependencies: [31, 27, 33, 4501, 697, 4596, 4573, 1244, 4578, 6766, 8006, 2] */
import Alert from '../../../components_native/common/Alert.tsx'; /* Metro dependency 4596 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as TextModule from '../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as ButtonNativeModule from '../../../design/components/Button/native/Button.native.tsx'; /* Metro dependency 4578 */
import * as TextWithIOSLinkWorkaroundModule from '../../a11y/native/TextWithIOSLinkWorkaround.tsx'; /* Metro dependency 6766 */
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 */;
ReactModule;
let value = JsxRuntimeModule;
const env0_4 = value.jsx;
const env0_5 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
object = {};
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object2.container = {padding: PX_16, alignItems: 'stretch'};
object.container = {padding: PX_16, alignItems: 'stretch'};
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object2.title = {marginBottom: PX_16};
object.title = {marginBottom: PX_16};
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object2.body = {marginTop: PX_16};
object.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');
object.buttonContainer = {marginVertical: PX_16};
object.text = {textAlign: 'center'};
const env0_6 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).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 Text = (TextModule).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 = (ButtonNativeModule).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 = (TextWithIOSLinkWorkaroundModule).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>
);
}
}
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>
);
}
global.__d(_fun63594, 8005, [31, 27, 33, 4501, 697, 4596, 4573, 1244, 4578, 6766, 8006,
2]) /* metro module 8005, dependencies: [31, 27, 33, 4501, 697, 4596, 4573, 1244, 4578, 6766, 8006, 2] */;
@@ -1,47 +1,62 @@
/* 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] */
import Module00057 from '../../../by-id/module-00057.js'; /* Metro dependency 57 */
import UseSafeAreaInsetsNative from '../../safe_area/useSafeAreaInsets.native.tsx'; /* Metro dependency 1585 */
import ActionSheetActionCreators from '../../action_sheet/native/ActionSheetActionCreators.tsx'; /* Metro dependency 4080 */
import MarkupUtils from '../../markup/MarkupUtils.tsx'; /* Metro dependency 6622 */
import StageSparkle from '../../stage_channels/native/components/StageSparkle.tsx'; /* Metro dependency 8124 */
import UseActionSheetStartHeight from '../../action_sheet/native/useActionSheetStartHeight.tsx'; /* Metro dependency 11023 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as moduleValue2 from '../../../by-id/module-03975.js'; /* Metro dependency 3975 */
import * as LinkUtilsModule from '../../links/LinkUtils.tsx'; /* Metro dependency 4246 */
import * as TextModule from '../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as BaseTextButtonNativeModule from '../../../design/components/Button/native/BaseTextButton.native.tsx'; /* Metro dependency 4579 */
import * as BottomSheetNativeModule from '../../../design/components/Sheet/native/BottomSheet.native.tsx'; /* Metro dependency 6275 */
import * as Module06277Module from '../../../by-id/module-06277.js'; /* Metro dependency 6277 */
import * as BookCheckIconModule from '../../../design/components/Icon/native/redesign/generated/BookCheckIcon.tsx'; /* Metro dependency 6686 */
import * as ForumConstantsModule from '../ForumConstants.tsx'; /* Metro dependency 6900 */
import * as ForumHooksModule from '../ForumHooks.tsx'; /* Metro dependency 9619 */
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 */;
let value = JsxRuntimeModule;
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};
object = {};
object.scrollContainer = {paddingHorizontal: 16};
object.header = {'alignItems': 'center', 'paddingTop': 20, 'paddingBottom': 24};
object.headerTitle = {marginTop: 8};
const object4 = {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,
object4.backgroundColor = BACKGROUND_SURFACE_HIGH;
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object.guidelinesContainer = object4;
object.footer = {paddingBottom: 16};
object.buttonWrapper = {marginHorizontal: 16};
const object7 = {};
object7.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object.buttonPill = object7;
const object8 = {'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',
object8.shadowColor = BLACK;
object8.shadowOffset = {'width': 0, 'height': 1};
object8.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object.floatingButtonContainer = object8;
object.editButton = {'display': 'flex', 'flexDirection': 'row', 'alignItems': 'center', 'position': 'absolute',
'top': 12, 'right': 0};
object2.editText = {marginRight: 4};
object.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');
object.editIcon = {color: TEXT_BRAND};
const env0_10 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/forums/native/ForumGuidelinesActionSheet.tsx');
exports.default = ForumGuidelinesActionSheet;
exports.openForumGuidelinesActionSheet = function(a0) {
var r7;
@@ -51,132 +66,179 @@ function _fun84414(global, require, importDefault, importAll, module, exports, d
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();
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 = (BaseTextButtonNativeModule).BaseTextButton;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var PressableOpacity;
var object5;
var bt75uw;
const Text = (TextModule).Text;
var object2;
const styles = useStyles();
const value3 = (ForumHooksModule).useCanManageChannel(channel);
const bottom = (UseSafeAreaInsetsNative)().bottom;
let binding = env0_4;
var [property, env0_4] = Module00057(binding.useState(), 2);
const value7 = (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 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 = (BottomSheetNativeModule).BottomSheet;
const BottomSheetScrollView = (Module06277Module).BottomSheetScrollView;
const object6 = {bottom: bottom};
const object7 = {paddingBottom: value13};
if (value3) {
PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
object5 = {};
string = intl.string;
bt75uw = t.bt75uw;
object5.accessibilityLabel = Reflect.apply(string, intl, [bt75uw]);
object5.accessibilityRole = 'button';
object5.style = styles.editButton;
object5.onPress = value14;
string = intl.string;
bt75uw = t.bt75uw;
r14 = (
<PressableOpacity {...object5}>
<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;
}
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 BookCheckIcon = (BookCheckIconModule).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 = MarkupUtils;
const bottomSheet = (
<BottomSheet
scrollable
contentHeight={r21}
footer={r20}
onDismiss={onClose}
>
<BottomSheetScrollView
style={styles.scrollContainer}
scrollIndicatorInsets={object6}
contentContainerStyle={object7}
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 Module00057 != null ? 72 + ((require(477) /* metro dependency 477: PlatformUtils */).isAndroid() ? bottom : 0) + Module00057 + 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 !== Module00057) {
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 ReactNativeModule.View ? 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 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__;
(ActionSheetActionCreators).hideActionSheet(FORUM_GUIDELINES_ACTION_SHEET);
value = importDefault(8148) /* metro dependency 8148: ChannelSettingsActionCreators */;
value.open(channel.id);
}
}
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);
}
global.__d(_fun84414, 11022, [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]) /* metro module 11022, 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] */;
@@ -1,50 +1,58 @@
/* Metro module 11464; source: modules/forums/native/ForumOriginalPoster.tsx; dependencies: [31, 27, 33, 4501, 697, 6235, 4573, 1244, 2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as IndexNativeModule from '../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as TextModule from '../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as LegacyTokensModule from '../../../design/migrations/native/LegacyTokens.tsx'; /* Metro dependency 6235 */
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 ForumOriginalPoster2 = 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 */;
ReactModule;
let value = JsxRuntimeModule;
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;
object = {container: {'flexDirection': 'row', 'alignItems': 'center', 'justifyContent': 'center'}};
const object2 = {'borderRadius': null, 'marginEnd': 8, 'paddingHorizontal': 4};
object2.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object.opIcon = object2;
const DARK_BRAND_260_LIGHT_BRAND_200 = (LegacyTokensModule).DARK_BRAND_260_LIGHT_BRAND_200;
object.opIconBackground = {backgroundColor: DARK_BRAND_260_LIGHT_BRAND_200};
const env0_5 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/forums/native/ForumOriginalPoster.tsx');
exports.default = ForumOriginalPoster2;
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)}
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 = (TextModule).Text;
const intl = (IndexNativeModule).intl;
return (
<View style={styles.container}>
<View style={items2}>
<Text variant="text-xs/semibold" color="text-brand">
{intl.string((IndexNativeModule).t.fyE8sH)}
</Text>
</View>
<Text variant="text-md/semibold" color="mobile-text-heading-primary">
{intl.string((IndexNativeModule).t.uN6Emt)}
</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 />;
}
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 />;
}
global.__d(_fun87777, 11464, [31, 27, 33, 4501, 697, 6235, 4573, 1244,
2]) /* metro module 11464, dependencies: [31, 27, 33, 4501, 697, 6235, 4573, 1244, 2] */;
+165 -118
View File
@@ -1,137 +1,184 @@
/* 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] */
import Module00044 from '../../../by-id/module-00044.js'; /* Metro dependency 44 */
import ChannelStore from '../../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import RelationshipStore from '../../../stores/RelationshipStore.tsx'; /* Metro dependency 3793 */
import ForumPostGridHeader from './posts/grid/ForumPostGridHeader.tsx'; /* Metro dependency 11548 */
import ForumPostGridBody from './posts/grid/ForumPostGridBody.tsx'; /* Metro dependency 11552 */
import ForumPostGridFooter from './posts/grid/ForumPostGridFooter.tsx'; /* Metro dependency 11563 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as FluxModule from '../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as ForumPostDataLoaderModule from '../ForumPostDataLoader.tsx'; /* Metro dependency 6896 */
import * as ForumPostMediaUtilsModule from '../ForumPostMediaUtils.tsx'; /* Metro dependency 9587 */
import * as ForumHooksModule from '../ForumHooks.tsx'; /* Metro dependency 9619 */
import * as ForumChannelStoreModule from '../ForumChannelStore.tsx'; /* Metro dependency 11547 */
import * as ForumPostContainerModule from './posts/ForumPostContainer.tsx'; /* Metro dependency 11567 */
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;
let value = ReactModule;
value = value.memo(_fun88505);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/forums/native/ForumPost.tsx');
(FileImportTrackerModule).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} />)(ForumPostGridHeader)}
{((Component) => <Component thread={thread} hasUnreads={hasUnreads} media={media} />)(ForumPostGridBody)}
{((Component) => <Component thread={thread} firstMessage={firstMessage} hasUnreads={hasUnreads} parentChannel={parentChannel} />)(ForumPostGridFooter)}
</>
);
}
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>;
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 = (ForumPostContainerModule).ForumPostPressableContainer;
var value;
const channel = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], function() {
return ChannelStore.getChannel(threadId);
});
(Module00044)(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} = (ForumPostDataLoaderModule).useFirstForumPostMessage(channel);
const {isNew, hasUnreads} = (ForumHooksModule).useForumPostReadStates(channel);
const {content,
hasSpoilerEmbeds} = (ForumHooksModule).useForumPostFirstMessageMarkup({firstMessage: firstMessage,
hasUnreads: hasUnreads});
const value6 = (ForumPostMediaUtilsModule).useForumPostMediaThumbnail(firstMessage,
channel2, hasSpoilerEmbeds);
const value7 = (ForumPostMediaUtilsModule).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 {
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 = null;
}
r0 = r1;
} 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)};
}
}
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 _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 = (FluxModule).useStateFromStores([ChannelStore], _fun88506);
const value2 = null;
return (
value2 == channel
? value2
: (
<ConnectedForumPost {...a0} />
)
);
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);
}
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 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 useStateFromStores = FluxModule.useStateFromStores;
let object = [ChannelStore];
const channel = Reflect.apply(useStateFromStores, FluxModule, [object, function() {
return ChannelStore.getChannel(threadId);
}]);
(Module00044)(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} = (ForumPostDataLoaderModule).useFirstForumPostMessage(channel);
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 _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);
}
global.__d(_fun88499, 11546, [31, 1379, 3793, 11547, 33, 11548, 11552, 11563, 566, 44, 6896, 9619, 11567, 11568,
9587, 1389,
2]) /* metro module 11546, dependencies: [31, 1379, 3793, 11547, 33, 11548, 11552, 11563, 566, 44, 6896, 9619, 11567, 11568, 9587, 1389, 2] */;
@@ -1,152 +1,179 @@
/* 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] */
import Module00057 from '../../../by-id/module-00057.js'; /* Metro dependency 57 */
import ChannelStore from '../../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import UseWindowDimensionsNative from '../../screen/useWindowDimensions.native.tsx'; /* Metro dependency 1478 */
import LurkingStore from '../../lurker_mode/LurkingStore.tsx'; /* Metro dependency 3785 */
import JoinedThreadsStore from '../../threads/JoinedThreadsStore.tsx'; /* Metro dependency 3786 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
import * as IndexNativeModule from '../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as LinkIconModule from '../../../design/components/Icon/native/redesign/generated/LinkIcon.tsx'; /* Metro dependency 4056 */
import * as TextModule from '../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as PressablesModule from '../../../design/void/Pressables/native/Pressables.tsx'; /* Metro dependency 5278 */
import * as ForumPostDataLoaderModule from '../ForumPostDataLoader.tsx'; /* Metro dependency 6896 */
import * as ClientThemesOverridesModule from '../../client_themes/native/ClientThemesOverrides.tsx'; /* Metro dependency 7701 */
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 */;
let value = JsxRuntimeModule;
const env0_10 = value.jsx;
const env0_11 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
object = {};
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,
object.actionBarContainer = {'overflow': 'hidden', 'paddingHorizontal': 12, 'paddingVertical': 8, 'display': 'flex',
'flexDirection': 'row', 'justifyContent': 'space-between', 'alignItems': 'center', 'backgroundColor': null,
'marginBottom': -1, backgroundColor: BACKGROUND_BASE_LOWER};
object.actionRow = {'display': 'flex', 'flexDirection': 'row', 'alignItems': 'center', 'flex': 1};
object.reactionRow = {'display': 'flex', 'flexDirection': 'row', 'alignItems': 'center', 'flex': 1};
const object3 = {'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;
object3.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;
object3.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');
object3.borderColor = CONTROL_SECONDARY_BACKGROUND_DEFAULT;
object.actionButton = object3;
object.actionButtonsContainer = {justifyContent: 'flex-end'};
object.lastActionButton = {marginRight: 0};
object.buttonText = {marginLeft: 8};
const env0_12 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).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;
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 = (PressablesModule).PressableOpacity;
var object2;
const intl = (IndexNativeModule).intl;
var string;
const t = (IndexNativeModule).t;
var items4;
const Text = (TextModule).Text;
var items5;
const styles = useStyles();
const channel2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], function() {
return ChannelStore.getChannel(channel.parent_id);
});
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 = (UseWindowDimensionsNative)().width;
const width2 = width;
const binding = env0_4;
var [property, env0_4] = width2(binding.useState(0), 2);
const value6 = binding.useCallback(_fun86310, [width]);
const onPress_863112 = onPress_86311;
const items2 = [styles.actionBarContainer,
(ClientThemesOverridesModule).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.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)];
object2 = {accessible: true};
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;
if (value2) {
object2.accessibilityLabel = Reflect.apply(string, intl, [t.G3ooHD]);
object2.style = styles.actionButton;
object2.onPress = onPress_863112;
const CheckmarkLargeIcon = (require(4064) /* metro dependency 4064: CheckmarkLargeIcon */).CheckmarkLargeIcon;
items5 = [
<CheckmarkLargeIcon size="xs" color="text-brand" />,
];
string = intl.string;
items5[1] = (
<Text
style={[styles.buttonText]}
variant="text-sm/semibold"
color="text-brand"
>
{Reflect.apply(string, intl, [t['OtF+lC']])}
</Text>
);
object2.children = items5;
} else {
object2.accessibilityLabel = Reflect.apply(string, intl, [t['DjZ+6E']]);
object2.style = styles.actionButton;
object2.onPress = onPress_863112;
const BellIcon = (require(9216) /* metro dependency 9216: BellIcon */).BellIcon;
items4 = [
<BellIcon size="xs" />,
];
string = intl.string;
items4[1] = (
<Text
style={styles.buttonText}
variant="text-sm/semibold"
color="interactive-text-default"
>
{Reflect.apply(string, intl, [t['0rQinA']])}
</Text>
);
object2.children = items4;
}
r10 = <PressableOpacity {...object2} />;
}
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>
string = intl.string;
const WqhZss = (IndexNativeModule).t.WqhZss;
const items8 = [styles.actionButton];
items8[1] = styles.lastActionButton;
const LinkIcon = (LinkIconModule).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>
</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 _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 _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() { // 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});
}
}
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});
}
}
global.__d(_fun86305, 11312, [57, 31, 27, 3785, 3786, 1379, 661, 33, 4501, 697, 566, 6896, 1478, 9835, 7701, 11313,
5278, 1244, 4064, 4573, 9216, 4056,
2]) /* metro module 11312, dependencies: [57, 31, 27, 3785, 3786, 1379, 661, 33, 4501, 697, 566, 6896, 1478, 9835, 7701, 11313, 5278, 1244, 4064, 4573, 9216, 4056, 2] */;
@@ -1,104 +1,111 @@
/* Metro module 12062; source: modules/forums/native/ForumPostPlaceholder.tsx; dependencies: [57, 31, 4502, 33, 4501, 697, 566, 4017, 4504, 6239, 2] */
import Module00057 from '../../../by-id/module-00057.js'; /* Metro dependency 57 */
import Native from '../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import ReanimatedRexport from '../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import AccessibilityStore from '../../a11y/AccessibilityStore.tsx'; /* Metro dependency 4502 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as ReanimatedRexportModule from '../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import * as CreateStylesModule from '../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as CardNativeModule from '../../../design/components/Card/native/Card.native.tsx'; /* Metro dependency 6239 */
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}]);
let value = ReactModule;
const createStyles = CreateStylesModule.createStyles;
const object2 = {};
const PX_64 = (Native).space.PX_64;
object2.height = 2 * PX_64;
const PX_12 = (Native).space.PX_12;
object2.marginBottom = PX_12;
const env0_7 = Reflect.apply(createStyles, CreateStylesModule, [{postPlaceholder: object2}]);
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');
(FileImportTrackerModule).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
const styles = useStyles();
const useReducedMotion = (require(566) /* metro dependency 566: flux */).useStateFromStores([AccessibilityStore],
function() {
return AccessibilityStore.useReducedMotion;
});
const timingConfig = Module00057(env0_4.useState(_fun92704), 1)[0].timingConfig;
const useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle;
const __927052 = __92705;
object = {reducedMotion: useReducedMotion, ROW_OPACITY_END: 0.55};
object.withDelay = ReanimatedRexportModule.withDelay;
object.INITIAL_DELAY_MS = 1000;
object.withRepeat = ReanimatedRexportModule.withRepeat;
object.withSequence = ReanimatedRexportModule.withSequence;
object.withTiming = (require(4504) /* metro dependency 4504: timing */).withTiming;
object.timingConfig = timingConfig;
__927052.__closure = object;
__927052.__workletHash = 9488742940898;
__927052.__initData = env0_8;
const value4 = Reflect.apply(useAnimatedStyle, ReanimatedRexportModule, [__927052]);
const View = (ReanimatedRexport).View;
const Card = (CardNativeModule).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 object2 = {};
const Math = global.Math;
object2.duration = 1000 + 500 * Math.random();
value = environment.__proto__;
const Easing = (ReanimatedRexportModule).Easing;
const inOut = Easing.inOut;
const Easing2 = (ReanimatedRexportModule).Easing;
object2.easing = Reflect.apply(inOut, Easing, [Easing2.sin]);
return {timingConfig: object2};
}
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 __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 object = {};
if (useReducedMotion) {
object.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]);
object.opacity = Reflect.apply(withDelay, moduleValue, [1000, value]);
}
return object;
}
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;
}
global.__d(_fun92701, 12062, [57, 31, 4502, 33, 4501, 697, 566, 4017, 4504, 6239,
2]) /* metro module 12062, dependencies: [57, 31, 4502, 33, 4501, 697, 566, 4017, 4504, 6239, 2] */;
@@ -1,118 +1,136 @@
/* 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] */
import Module00057 from '../../../by-id/module-00057.js'; /* Metro dependency 57 */
import ActionSheetActionCreators from '../../action_sheet/native/ActionSheetActionCreators.tsx'; /* Metro dependency 4080 */
import AvailableForumTag from './AvailableForumTag.tsx'; /* Metro dependency 11162 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as CreateStylesModule from '../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as ButtonNativeModule from '../../../design/components/Button/native/Button.native.tsx'; /* Metro dependency 4578 */
import * as BottomSheetTitleHeaderNativeModule from '../../../design/components/Sheet/native/BottomSheetTitleHeader.native.tsx'; /* Metro dependency 6758 */
import * as ActionSheetNativeModule from '../../../design/components/Sheet/native/ActionSheet.native.tsx'; /* Metro dependency 6805 */
import * as ForumTagHooksModule from '../ForumTagHooks.tsx'; /* Metro dependency 6863 */
import * as ForumConstantsModule from '../ForumConstants.tsx'; /* Metro dependency 6900 */
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',
const env0_9 = (CreateStylesModule).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');
(FileImportTrackerModule).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}
/>
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 = (ForumTagHooksModule).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 = (ForumTagHooksModule).useVisibleForumTags(parentChannel);
const ActionSheet = (ActionSheetNativeModule).ActionSheet;
const object = {onDismiss: onDismiss_85229};
const BottomSheetTitleHeader = (BottomSheetTitleHeaderNativeModule).BottomSheetTitleHeader;
object.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>
</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;
);
const Button = (ButtonNativeModule).Button;
return (
<ActionSheet {...object}>
{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(ReactModule);
if (set.has(a0)) {
set.delete(a0);
env0_5(set);
return undefined;
}
if (env0_6) {
return undefined;
}
set.add(a0);
env0_5(set);
}
}
if (env0_6) {
return undefined;
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?.();
}
set.add(a0);
env0_5(set);
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 = ReactModule.has(a0);
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(ReactModule).map(function(a0) {
return a0.id;
});
let onSaveBinding = onSave;
if (onSaveBinding != null) {
onSaveBinding = onSave;
binding = ReactModule;
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__;
(ActionSheetActionCreators).hideActionSheet();
}
}
}
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();
}
global.__d(_fun85226, 11161, [57, 31, 27, 6900, 33, 4501, 1244, 6863, 6805, 6758, 11162, 4578, 9621, 4080,
2]) /* metro module 11161, dependencies: [57, 31, 27, 6900, 33, 4501, 1244, 6863, 6805, 6758, 11162, 4578, 9621, 4080, 2] */;
@@ -1,39 +1,47 @@
/* Metro module 11090; source: modules/forums/native/ForumTagContextMenu.tsx; dependencies: [33, 3829, 1244, 8772, 6797, 3856, 8811, 2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as UserSettingsModule from '../../user_settings/UserSettings.tsx'; /* Metro dependency 3829 */
import * as ToastUtilsModule from '../../toast/native/ToastUtils.tsx'; /* Metro dependency 3856 */
import * as IdIconModule from '../../../design/components/Icon/native/redesign/generated/IdIcon.tsx'; /* Metro dependency 8772 */
import * as ContextMenuNativeModule from '../../../design/components/ContextMenu/native/ContextMenu.native.tsx'; /* Metro dependency 8811 */
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');
(FileImportTrackerModule).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 = (UserSettingsModule).DeveloperMode;
const value2 = DeveloperMode.useSetting();
const object = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['8VG6IY']);
const IdIcon = (IdIconModule).IdIcon;
object.IconComponent = IdIcon;
object.action = action;
const items2 = [object];
const ContextMenu = (ContextMenuNativeModule).ContextMenu;
return (
<ContextMenu
triggerOnLongPress
items={items2}
enabled={value2}
>
{children}
</ContextMenu>
);
function action() { // 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);
(ToastUtilsModule).presentIdCopied();
}
}
}
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();
}
global.__d(_fun84910, 11090, [33, 3829, 1244, 8772, 6797, 3856, 8811,
2]) /* metro module 11090, dependencies: [33, 3829, 1244, 8772, 6797, 3856, 8811, 2] */;
@@ -1,164 +1,178 @@
/* 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] */
import Module00057 from '../../../by-id/module-00057.js'; /* Metro dependency 57 */
import EmojiStore from '../../emojis/EmojiStore.tsx'; /* Metro dependency 6540 */
import Emoji from '../../emojis/native/Emoji.tsx'; /* Metro dependency 6739 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as FluxModule from '../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as CreateStylesModule from '../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as UseMountEffectModule from '../../../hooks/useMountEffect.tsx'; /* Metro dependency 4594 */
import * as TableRowGroupNativeModule from '../../../design/components/TableRow/native/TableRowGroup.native.tsx'; /* Metro dependency 6231 */
import * as Module06277Module from '../../../by-id/module-06277.js'; /* Metro dependency 6277 */
import * as BottomSheetTitleHeaderNativeModule from '../../../design/components/Sheet/native/BottomSheetTitleHeader.native.tsx'; /* Metro dependency 6758 */
import * as ActionSheetNativeModule from '../../../design/components/Sheet/native/ActionSheet.native.tsx'; /* Metro dependency 6805 */
import * as TableCheckboxRowNativeModule from '../../../design/components/TableRow/native/TableCheckboxRow.native.tsx'; /* Metro dependency 8950 */
import * as ActionSheetHeaderPressableTextNativeModule from '../../../design/components/Sheet/native/ActionSheetHeaderPressableText.native.tsx'; /* Metro dependency 9067 */
import * as ForumChannelStoreModule from '../ForumChannelStore.tsx'; /* Metro dependency 11547 */
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 */;
let value = ForumChannelStoreModule;
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,
const env0_12 = (CreateStylesModule).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');
(FileImportTrackerModule).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);
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 = (FluxModule).useStateFromStores([EmojiStore], _fun92688);
if (value3 != null) {
value = importDefault(1423) /* metro dependency 1423: AvatarUtils */;
value = value.getEmojiURL({id: value3.id, animated: value3.animated, size: 18});
r6 = value;
} else {
set.add(binding.id);
r6 = undefined;
}
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);
return (
<Emoji
style={styles.emoji}
textEmojiStyle={styles.textEmoji}
fastImageStyle={styles.imageEmoji}
src={r6}
name={emojiName ?? ''}
/>
);
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 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 useState = ReactModule.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, ReactModule, [set instanceof Object ? set : value2]), 2);
const property = value5[0];
var env0_3 = value5[1];
(UseMountEffectModule).useUnmountEffect(_fun92690);
const ActionSheet = (ActionSheetNativeModule).ActionSheet;
const object = {scrollable: true};
const BottomSheetTitleHeader = (BottomSheetTitleHeaderNativeModule).BottomSheetTitleHeader;
const object2 = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const TdqRTh = (require(1244) /* metro dependency 1244: indexNative */).t.TdqRTh;
object2.title = Reflect.apply(string, intl, [TdqRTh]);
object2.subtitle = property.size > 0 ? intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t['/FzHJK'],
{count: property.size}) : ' ';
const ActionSheetHeaderPressableText = (ActionSheetHeaderPressableTextNativeModule).ActionSheetHeaderPressableText;
const object4 = {onPress: onPress_92691};
string = intl.string;
const VkKicb = (require(1244) /* metro dependency 1244: indexNative */).t.VkKicb;
object4.label = Reflect.apply(string, intl, [VkKicb]);
object2.leading = <ActionSheetHeaderPressableText {...object4} />;
object.header = <BottomSheetTitleHeader {...object2} />;
const BottomSheetScrollView = (Module06277Module).BottomSheetScrollView;
const TableRowGroup = (TableRowGroupNativeModule).TableRowGroup;
return (
<ActionSheet {...object}>
<BottomSheetScrollView>
<TableRowGroup hasIcons>
{channel.availableTags.map(_fun92692)}
</TableRowGroup>
</BottomSheetScrollView>
</ActionSheet>
);
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 = (TableCheckboxRowNativeModule).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 object;
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;
object = {};
channelBinding = channel;
object.guildId = channelBinding.guild_id;
id = channelBinding.id;
object.channelId = id;
id = binding.id;
object.tagId = id;
object.filterTagIds = global.Array.from(set);
has = set.has;
id = binding.id;
object.added = !Reflect.apply(has, set, [id]);
object.location = {page: AnalyticsPages.GUILD_CHANNEL, section: AnalyticsSections.FORUM_CHANNEL_HEADER,
object: AnalyticsObjects.CHANNEL_TAG};
Reflect.apply(trackForumTagFilterClicked, moduleValue, [object]);
env1_3(set);
}
}
}
}
}
global.__d(_fun92686, 12060, [57, 31, 6540, 11547, 661, 33, 4501, 7155, 4594, 6805, 6758, 1244, 9067, 6277, 6231,
8950, 566, 6739, 1423,
2]) /* metro module 12060, dependencies: [57, 31, 6540, 11547, 661, 33, 4501, 7155, 4594, 6805, 6758, 1244, 9067, 6277, 6231, 8950, 566, 6739, 1423, 2] */;
File diff suppressed because it is too large. Load diff
@@ -1,60 +1,111 @@
/* Metro module 11021; source: modules/forums/native/composer/ForumComposerHeader.tsx; dependencies: [31, 27, 33, 4501, 697, 4805, 5278, 1244, 5312, 6698, 4573, 6686, 2] */
import UseChannelName from '../../../channel/useChannelName.tsx'; /* Metro dependency 4805 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as TextModule from '../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as PressablesModule from '../../../../design/void/Pressables/native/Pressables.tsx'; /* Metro dependency 5278 */
import * as XSmallIconModule from '../../../../design/components/Icon/native/redesign/generated/XSmallIcon.tsx'; /* Metro dependency 5312 */
import * as ForumIconModule from '../../../../design/components/Icon/native/redesign/generated/ForumIcon.tsx'; /* Metro dependency 6698 */
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 */;
ReactModule;
let value = ReactNativeModule;
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');
const env0_7 = (CreateStylesModule).createStyles(_fun84411);
(FileImportTrackerModule).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 object = {};
object.headerBar = {'height': null, 'flexDirection': 'row', 'alignItems': 'center', height: a0};
object.headerBarContent = {'flexDirection': 'row', 'alignItems': 'center', 'flex': 1};
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object.headerBarText = {marginHorizontal: PX_16};
const object4 = {};
copyDataProperties(object4, StyleSheet.absoluteFillObject, PX_16);
object4['height'] = StyleSheet.hairlineWidth;
const BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
object4['backgroundColor'] = BORDER_SUBTLE;
object4['top'] = undefined;
object.headerBarSeparator = object4;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object.button = {paddingHorizontal: PX_16};
return object;
}
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 = (UseChannelName)(channel);
const PressableOpacity = (PressablesModule).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 = (XSmallIconModule).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 = (ForumIconModule).ForumIcon;
const forumIcon = <ForumIcon size="sm" />;
const Text = (TextModule).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>
);
}
}
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>
);
}
global.__d(_fun84410, 11021, [31, 27, 33, 4501, 697, 4805, 5278, 1244, 5312, 6698, 4573, 6686,
2]) /* metro module 11021, dependencies: [31, 27, 33, 4501, 697, 4805, 5278, 1244, 5312, 6698, 4573, 6686, 2] */;
@@ -1,234 +1,277 @@
/* 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] */
import Native from '../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import ChannelStore from '../../../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import UploadAttachmentStore from '../../../../stores/UploadAttachmentStore.tsx'; /* Metro dependency 4644 */
import DraftStore from '../../../../stores/DraftStore.tsx'; /* Metro dependency 4645 */
import ForumPostMessagesStore from '../../ForumPostMessagesStore.tsx'; /* Metro dependency 6865 */
import DraftActionCreators from '../../../../actions/DraftActionCreators.tsx'; /* Metro dependency 7165 */
import UseGetThreadDraftSettings from '../../../threads/useGetThreadDraftSettings.tsx'; /* Metro dependency 9725 */
import NativeMenuStore from '../../../native_menu/native/NativeMenuStore.tsx'; /* Metro dependency 10738 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as FluxModule from '../../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as IndexNativeModule from '../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as DraftStoreModule from '../../../../stores/DraftStore.tsx'; /* Metro dependency 4645 */
import * as TrackingModule from '../../tracking/Tracking.tsx'; /* Metro dependency 7155 */
import * as ForumComposerModalActionCreatorsModule from './ForumComposerModalActionCreators.tsx'; /* Metro dependency 11007 */
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,
ReactModule;
const createStyles = CreateStylesModule.createStyles;
const BACKGROUND_BASE_LOW = (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');
(FileImportTrackerModule).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 = 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 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) {
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 useStateFromStores = FluxModule.useStateFromStores;
const channelStoreBinding = ChannelStore;
const value4 = Reflect.apply(useStateFromStores, FluxModule, [[channelStoreBinding], function() {
return ChannelStore.getChannel(parentChannelId);
}, [parentChannelId]]);
const value5 = FluxModule.useStateFromStores([channelStoreBinding], function() {
return ChannelStore.getChannel(threadId);
}, [threadId]);
const value6 = (UseGetThreadDraftSettings)(parentChannelId);
const value7 = FluxModule.useStateFromStores([ForumPostMessagesStore], function() {
var threadIdBinding = threadId;
var value2 = null;
return value2 != threadIdBinding && value2 != messageId ? ForumPostMessagesStore.getMessage(threadId).firstMessage : value2;
});
const value8 = FluxModule.useStateFromStores([NativeMenuStore], function() {
return NativeMenuStore.isOpen();
});
const onClose_842812 = 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={onClose_842812} 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={onClose_842812} 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 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>;
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={onClose_842812} isEdit={isEdit} />)(importDefault(11009) /* metro dependency 11009: ForumComposer */)}
</View>
</AnalyticsLocationProvider3>
);
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>;
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={onClose_842812} isEdit={isEdit} />)(importDefault(11009) /* metro dependency 11009: ForumComposer */)}
</View>
</AnalyticsLocationProvider4>
);
r0 = value;
}
} else if (value6 == null) {
} else {
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();
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 object;
var draftStoreBinding;
var getDraft;
var parentChannelIdBinding;
var ChannelMessage;
var value4;
var threadSettings;
var getThreadDraftWithParentMessageId;
var defaultImport;
var uploadAttachmentStoreBinding;
var getUploads;
var onConfirm;
var onCancel;
var show;
const intl = (IndexNativeModule).intl;
const t = (IndexNativeModule).t;
var value;
if (ReactNativeModule.View != null) {
value2 = environment.__proto__;
if (a0) {
(require(11007) /* metro dependency 11007: ForumComposerModalActionCreators */).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();
} else {
value3 = undefined;
moduleValue = require(1482) /* metro dependency 1482: KeyboardUIStoreNative */;
setKeyboardType = moduleValue.setKeyboardType;
object = {};
object.type = (require(1583) /* metro dependency 1583: KeyboardTypes */).KeyboardTypes.SYSTEM;
Reflect.apply(setKeyboardType, moduleValue, [object]);
draftStoreBinding = DraftStore;
getDraft = draftStoreBinding.getDraft;
parentChannelIdBinding = parentChannelId;
ChannelMessage = DraftType.ChannelMessage;
value4 = Reflect.apply(getDraft, draftStoreBinding, [parentChannelIdBinding, ChannelMessage]);
threadSettings = draftStoreBinding.getThreadSettings(parentChannelIdBinding);
if (threadSettings != null) {
r9 = threadSettings;
} else {
draftStoreBinding = DraftStore;
getThreadDraftWithParentMessageId = draftStoreBinding.getThreadDraftWithParentMessageId;
defaultImport = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
r9 = Reflect.apply(getThreadDraftWithParentMessageId, draftStoreBinding,
[defaultImport.castChannelIdAsMessageId(parentChannelId)]);
}
uploadAttachmentStoreBinding = UploadAttachmentStore;
getUploads = uploadAttachmentStoreBinding.getUploads;
parentChannelIdBinding = parentChannelId;
ChannelMessage = DraftType.ChannelMessage;
if (isEdit) {
(require(11007) /* metro dependency 11007: ForumComposerModalActionCreators */).closeCreateForumPostModal();
clearDraft_84275(parentChannelId);
} else if (value4.length > 0) {
object = {onConfirm: onConfirm_84282, onCancel: function() {
require(dependencyMap[18]).closeCreateForumPostModal();
clearDraft_84275(parentChannelId);
}};
onConfirm = object.onConfirm;
onCancel = object.onCancel;
value = importAll(1848) /* metro dependency 1848: KeyboardManagerUtils */;
value.dismissGlobalKeyboard();
value = importDefault(4496) /* metro dependency 4496: AlertActionCreators */;
show = value.show;
object = {};
object.title = intl.string(t.Fz1512);
object.body = intl.string(t.YBgepz);
object.confirmText = intl.string(t.Rnli6C);
object.cancelText = intl.string(t['3NnH6V']);
object.onConfirm = onConfirm;
object.onCancel = onCancel;
object.hideActionSheet = true;
object.isDismissable = true;
Reflect.apply(show, value, [object]);
} else if (Reflect.apply(getUploads, uploadAttachmentStoreBinding, [parentChannelIdBinding,
ChannelMessage]).length > 0) {
object = {onConfirm: onConfirm_84282, onCancel: onCancel_84283};
onConfirm = object.onConfirm;
onCancel = object.onCancel;
value = importAll(1848) /* metro dependency 1848: KeyboardManagerUtils */;
value.dismissGlobalKeyboard();
value = importDefault(4496) /* metro dependency 4496: AlertActionCreators */;
show = value.show;
object = {};
object.title = intl.string(t.Fz1512);
object.body = intl.string(t.YBgepz);
object.confirmText = intl.string(t.Rnli6C);
object.cancelText = intl.string(t['3NnH6V']);
object.onConfirm = onConfirm;
object.onCancel = onCancel;
object.hideActionSheet = true;
object.isDismissable = true;
Reflect.apply(show, value, [object]);
} else if (((r9 == null ? value3 : r9.name) ?? '').length > 0) {
object = {onConfirm: onConfirm_84282, onCancel: onCancel_84283};
onConfirm = object.onConfirm;
onCancel = object.onCancel;
value = importAll(1848) /* metro dependency 1848: KeyboardManagerUtils */;
value.dismissGlobalKeyboard();
value = importDefault(4496) /* metro dependency 4496: AlertActionCreators */;
show = value.show;
object = {};
object.title = intl.string(t.Fz1512);
object.body = intl.string(t.YBgepz);
object.confirmText = intl.string(t.Rnli6C);
object.cancelText = intl.string(t['3NnH6V']);
object.onConfirm = onConfirm;
object.onCancel = onCancel;
object.hideActionSheet = true;
object.isDismissable = true;
Reflect.apply(show, value, [object]);
} 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__;
(TrackingModule).maybeTrackForumNewPostDraftCreated({guildId: env1_4.guild_id,
channelId: env1_4.id});
(ForumComposerModalActionCreatorsModule).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
(ForumComposerModalActionCreatorsModule).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);
}
global.__d(_fun84274, 11008, [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]) /* metro module 11008, 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] */;
@@ -1,31 +1,36 @@
/* Metro module 11007; source: modules/forums/native/composer/ForumComposerModalActionCreators.tsx; dependencies: [7155, 5080, 11008, 1962, 2] */
import ModalActionCreators from '../../../../actions/ModalActionCreators.tsx'; /* Metro dependency 5080 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 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');
(FileImportTrackerModule).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});
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']);
}
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();
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();
}
(ModalActionCreators).popWithKey('create-forum-post');
}
(importDefault(5080) /* metro dependency 5080: ModalActionCreators */).popWithKey('create-forum-post');
}
global.__d(_fun84271, 11007, [7155, 5080, 11008, 1962,
2]) /* metro module 11007, dependencies: [7155, 5080, 11008, 1962, 2] */;
@@ -1,78 +1,81 @@
/* Metro module 11015; source: modules/forums/native/composer/hooks/ExpressionPickerHandlers.tsx; dependencies: [31, 2] */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
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');
(FileImportTrackerModule).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;
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 _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();
}
}
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;
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 _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();
}
}
setSelection({start: length, end: length});
focusTextInput();
}
global.__d(_fun84385, 11015, [31, 2]) /* metro module 11015, dependencies: [31, 2] */;
@@ -1,105 +1,108 @@
/* Metro module 11019; source: modules/forums/native/composer/hooks/useBackspaceHandler.tsx; dependencies: [31, 2] */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
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');
(FileImportTrackerModule).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) {
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]);
value = Reflect.apply(substring, draftContentBinding, [0, start - r0]);
substring = draftContentBinding.substring;
value += Reflect.apply(substring, draftContentBinding, [end]);
value += Reflect.apply(substring, draftContentBinding, [start]);
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;
}
}
global.__d(_fun84403, 11019, [31, 2]) /* metro module 11019, dependencies: [31, 2] */;
@@ -1,59 +1,61 @@
/* Metro module 11014; source: modules/forums/native/composer/hooks/useFocusHandlers.tsx; dependencies: [57, 31, 2] */
import Module00057 from '../../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
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;
object = {TITLE: 0};
object[0] = 'TITLE';
object.CONTENT = 1;
object[1] = 'CONTENT';
(FileImportTrackerModule).fileFinishedImporting('modules/forums/native/composer/hooks/useFocusHandlers.tsx');
exports.PostComposerInputs = object;
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();
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();
}
}
}
} 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();
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();
}
}
}
}
}
global.__d(_fun84381, 11014, [57, 31, 2]) /* metro module 11014, dependencies: [57, 31, 2] */;
@@ -1,37 +1,41 @@
/* Metro module 11016; source: modules/forums/native/composer/hooks/usePressHorizontalAutocompleteItemHandler.tsx; dependencies: [31, 661, 11017, 2] */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as ConstantsModule from '../../../../../Constants.tsx'; /* Metro dependency 661 */
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 AutoCompleteResultTypes = (ConstantsModule).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');
(FileImportTrackerModule).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 items2 = [];
arraySpread(items2, value3, 0, undefined);
const value6 = items2.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});
}
}
}
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});
}
global.__d(_fun84391, 11016, [31, 661, 11017, 2]) /* metro module 11016, dependencies: [31, 661, 11017, 2] */;
@@ -1,18 +1,29 @@
/* 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] */
import Native from '../../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import GuildStore from '../../../../../stores/GuildStore.tsx'; /* Metro dependency 1867 */
import UserStore from '../../../../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import GuildRoleStore from '../../../../../stores/GuildRoleStore.tsx'; /* Metro dependency 1938 */
import RelationshipStore from '../../../../../stores/RelationshipStore.tsx'; /* Metro dependency 3793 */
import ReanimatedRexport from '../../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import UseMountEffect from '../../../../../hooks/useMountEffect.tsx'; /* Metro dependency 4594 */
import TextStyles from '../../../../rebrand/native/TextStyles.tsx'; /* Metro dependency 6597 */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as NativeModule from '../../../../../design/void/native.tsx'; /* Metro dependency 1305 */
import * as ReanimatedRexportModule from '../../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import * as TextModule from '../../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as UseChannelNameModule from '../../../../channel/useChannelName.tsx'; /* Metro dependency 4805 */
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 */;
ReactModule;
let value = ReactNativeModule;
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;
@@ -21,146 +32,172 @@ function _fun84889(global, require, importDefault, importAll, module, exports, d
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 */;
object = {emoji: {'width': 32, 'height': 32}};
object.emojiImage = {resizeMode: 'contain'};
object.emojiText = {'lineHeight': 32, 'fontSize': 27, 'textAlign': 'center'};
object.emojiName = {marginLeft: 8};
const object4 = {};
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;
}
const TEXT_DEFAULT = (Native).colors.TEXT_DEFAULT;
copyDataProperties(object4, TextStyles(PRIMARY_SEMIBOLD, TEXT_DEFAULT, 14), undefined);
object.nickname = object4;
const BACKGROUND_BASE_LOW = (Native).colors.BACKGROUND_BASE_LOW;
object.status = {backgroundColor: BACKGROUND_BASE_LOW};
const object6 = {'paddingHorizontal': 8, 'flex': 1, 'flexDirection': 'row', 'height': 56, 'alignItems': 'center'};
object6.borderRightWidth = StyleSheet.hairlineWidth;
const BORDER_SUBTLE = (Native).colors.BORDER_SUBTLE;
object6.borderRightColor = BORDER_SUBTLE;
object.horizontalAutocompleteOption = object6;
object.roleIcon = {marginRight: 4};
object.channelName = {marginLeft: 8};
const env0_12 = Reflect.apply(createStyles, value, [object]);
object = {code: 'function HorizontalAutocompleteTsx1(){const{opacity}=this.__closure;return{opacity:opacity.get()};}'};
object = {User: User, Role: Role, Channel: Channel, Emoji: Emoji_84898};
(FileImportTrackerModule).fileFinishedImporting('modules/forums/native/composer/horizontal_autocomplete/HorizontalAutocomplete.tsx');
exports.default = object;
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 = (ReanimatedRexportModule).useSharedValue(0);
(UseMountEffect)(_fun84891);
const useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle;
const HorizontalAutocompleteOptionC2 = HorizontalAutocompleteOptionC;
HorizontalAutocompleteOptionC2.__closure = {opacity: value2};
HorizontalAutocompleteOptionC2.__workletHash = 14159604656069;
HorizontalAutocompleteOptionC2.__initData = env0_13;
const value3 = Reflect.apply(useAnimatedStyle, ReanimatedRexportModule, [HorizontalAutocompleteOptionC2]);
const View = (ReanimatedRexport).View;
return (
<TouchableOpacity onPress={onPress}>
<View style={[styles.horizontalAutocompleteOption, value3]}>
{children}
</View>
</TouchableOpacity>
);
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)]);
}
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 HorizontalAutocompleteOptionC() { // fn#84892, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11273:1105, owner: HorizontalAutocompleteOption.c, offset: 0x01d2f35e, size: 24 bytes, params: 1, frame: 10
const object = {};
object.opacity = env0_0.get();
return object;
}
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}
}
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 = (NativeModule).Avatar;
const avatarProps = {status: status, statusStyle: styles.status, user: user};
const AvatarSizes = (NativeModule).AvatarSizes;
const SMALL = AvatarSizes.SMALL;
avatarProps.size = SMALL;
avatarProps.guildId = guildId;
avatarProps.animate = true;
const avatar = <Avatar {...avatarProps} />;
const Text = (TextModule).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 = (NativeModule).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 = (NativeModule).Icon;
const icon = <Icon source={r7} />;
const channelName = UseChannelNameModule.computeChannelName(channel, UserStore, RelationshipStore);
const Text = (TextModule).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>
</HorizontalAutocompleteOption>
);
}
);
const Text = (TextModule).Text;
return (
<HorizontalAutocompleteOption onPress={onPress}>
{view}
<Text style={styles.emojiName} variant="text-sm/semibold">
{':' + name + ':'}
</Text>
</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)]);
}
global.__d(_fun84889, 11087, [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]) /* metro module 11087, 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] */;
@@ -1,95 +1,114 @@
/* Metro module 11083; source: modules/forums/native/composer/horizontal_autocomplete/HorizontalAutocompleteWrapper.tsx; dependencies: [31, 27, 661, 33, 11084, 11087, 4017, 4504, 2] */
import ReanimatedRexport from '../../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as ConstantsModule from '../../../../../Constants.tsx'; /* Metro dependency 661 */
import * as ReanimatedRexportModule from '../../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import * as UseHorizontalAutocompleteResultsModule from './hooks/useHorizontalAutocompleteResults.tsx'; /* Metro dependency 11084 */
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');
(FileImportTrackerModule).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;
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} = (UseHorizontalAutocompleteResultsModule).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 useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle;
const HorizontalAutocompleteWrapper_2 = HorizontalAutocompleteWrapper_;
HorizontalAutocompleteWrapper_2.__closure = {withTiming: (require(4504) /* metro dependency 4504: timing */).withTiming,
toValue: r12};
HorizontalAutocompleteWrapper_2.__workletHash = 7895652904738;
HorizontalAutocompleteWrapper_2.__initData = env0_7;
const value7 = Reflect.apply(useAnimatedStyle, ReanimatedRexportModule, [HorizontalAutocompleteWrapper_2]);
const View = (ReanimatedRexport).View;
return (
<User
{...item}
{...{['guildId']: channel.guild_id}}
{...{['onPress']: onPress_84844}}
/>
<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 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);
}
function onPress_84845(a0) { // fn#84845, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11269:959, offset: 0x01f59bfc, size: 27 bytes, params: 2, frame: 13
return env1_4(a0, item);
}
function onPress_84846(a0) { // fn#84846, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11269:1025, offset: 0x01f59bfc, size: 27 bytes, params: 2, frame: 13
return env1_4(a0, item);
}
function onPress_84847(a0) { // fn#84847, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11269:1087, offset: 0x01f59bfc, size: 27 bytes, params: 2, frame: 13
return env1_4(a0, item);
}
}
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 object = {};
const value = environment.__proto__;
object.opacity = (require(4504) /* metro dependency 4504: timing */).withTiming(ConstantsModule.AutoCompleteResultTypes);
return object;
}
}
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);
}
global.__d(_fun84840, 11083, [31, 27, 661, 33, 11084, 11087, 4017, 4504,
2]) /* metro module 11083, dependencies: [31, 27, 661, 33, 11084, 11087, 4017, 4504, 2] */;
@@ -1,112 +1,160 @@
/* Metro module 11084; source: modules/forums/native/composer/horizontal_autocomplete/hooks/useHorizontalAutocompleteResults.tsx; dependencies: [57, 31, 661, 11085, 676, 566, 2] */
import Module00057 from '../../../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import * as FileImportTrackerModule from '../../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as ConstantsModule from '../../../../../../Constants.tsx'; /* Metro dependency 661 */
import * as AutocompleteOptionsModule from '../../../../../autocompleter/native/AutocompleteOptions.tsx'; /* Metro dependency 11085 */
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');
(FileImportTrackerModule).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 text3 = text;
let useState = ReactModule.useState;
const value2 = Reflect.apply(useState, ReactModule, [[]]);
const binding2 = text3;
let value = binding2(value2, 2);
const property = value[0];
const env0_4 = value[1];
let useMemo = ReactModule.useMemo;
value = Reflect.apply(useMemo, ReactModule, [_fun84852, [channel]]);
useState = ReactModule.useState;
const value3 = binding2(Reflect.apply(useState, ReactModule, [{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];
ReactModule.useEffect(function() {
var env0_0 = global.setTimeout(_fun84854, 16);
return _fun84855;
}, [text, selection]);
const {autocompleteType, query, queryOptions, autocompleteSelectionStart} = ReactModule.useMemo(_fun84856,
[selectionStart, selectionEnd, text2, value]);
const value5 = ReactModule.useCallback(_fun84858, [autocompleteType, query, queryOptions, value]);
ReactModule.useEffect(_fun84859, [autocompleteType, value5, value]);
ReactModule.useEffect(_fun84862, [value5]);
useMemo = ReactModule.useMemo;
return {results: Reflect.apply(useMemo, ReactModule, [_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 (AutocompleteOptionsModule).getAutocompleteOptions(channel, false,
false);
}
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 _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 _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 _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 _fun84855() { // fn#84855, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11270:758, offset: 0x00e59c84, size: 24 bytes, params: 1, frame: 11
global.clearTimeout(env0_0);
}
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;
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, [ConstantsModule.ChannelTypes]);
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) {
@@ -118,122 +166,84 @@ function _fun84856() { // fn#84856, source: /ci/build/discord/discord/discord_an
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]}};
}
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;
break reducibleJoin9;
}
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 _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 _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 = ConstantsModule.ChannelTypes;
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 == ConstantsModule.ChannelTypes ? undefined : ConstantsModule.ChannelTypes[autocompleteType].stores : value2;
if (value2 != r4) {
value = environment.__proto__;
new (require(566) /* metro dependency 566: flux */).BatchedStoreListener(r4,
_fun84860).attach('useHorizontalAutocompleteResults');
return _fun84861;
}
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 _fun84861() { // fn#84861, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11270:1738, offset: 0x00d0ff6d, size: 19 bytes, params: 1, frame: 9
return env0_0.detach();
}
}
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 ReactModule.filter(_fun84864);
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;
}
}
}
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;
}
global.__d(_fun84850, 11084, [57, 31, 661, 11085, 676, 566,
2]) /* metro module 11084, dependencies: [57, 31, 661, 11085, 676, 566, 2] */;
@@ -1,27 +1,32 @@
/* Metro module 9699; source: modules/forums/native/hooks/useCanSearchForumPostsByChannelId.tsx; dependencies: [1379, 3784, 661, 566, 2] */
import ChannelStore from '../../../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import PermissionStore from '../../../../stores/PermissionStore.tsx'; /* Metro dependency 3784 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as FluxModule from '../../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as ConstantsModule from '../../../../Constants.tsx'; /* Metro dependency 661 */
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');
(FileImportTrackerModule).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 (FluxModule).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);
}
}
}
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);
}
global.__d(_fun76232, 9699, [1379, 3784, 661, 566,
2]) /* metro module 9699, dependencies: [1379, 3784, 661, 566, 2] */;
@@ -1,23 +1,27 @@
/* Metro module 9722; source: modules/forums/native/hooks/useIsForumChannelSearchActive.tsx; dependencies: [7156, 9699, 566, 2] */
import ForumSearchStore from '../../ForumSearchStore.tsx'; /* Metro dependency 7156 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as FluxModule from '../../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as UseCanSearchForumPostsByChannelIdModule from './useCanSearchForumPostsByChannelId.tsx'; /* Metro dependency 9699 */
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');
(FileImportTrackerModule).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 = (UseCanSearchForumPostsByChannelIdModule).useCanSearchForumPostsByChannelId(a0);
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;
}
}
}
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;
}
global.__d(_fun76377, 9722, [7156, 9699, 566, 2]) /* metro module 9722, dependencies: [7156, 9699, 566, 2] */;
@@ -1,118 +1,79 @@
/* Metro module 11252; source: modules/forums/native/posts/AnimatedCounter.tsx; dependencies: [57, 31, 27, 33, 4501, 44, 4017, 4508, 4577, 4573, 4581, 11253, 2] */
import Module00044 from '../../../../by-id/module-00044.js'; /* Metro dependency 44 */
import Module00057 from '../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import ReanimatedRexport from '../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as ReanimatedRexportModule from '../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as TransitionGroupModule from '../../../../design/components/TransitionGroup/TransitionGroup.tsx'; /* Metro dependency 4508 */
import * as TextModule from '../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as SpringModule from '../../../../design/animation/reanimated/spring/spring.tsx'; /* Metro dependency 4577 */
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,
let value = ReactModule;
const env0_9 = (CreateStylesModule).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;
object = {ABOVE: -1};
object[-1] = 'ABOVE';
object.NEUTRAL = 0;
object[0] = 'NEUTRAL';
object.BELOW = 1;
object[1] = 'BELOW';
const ABOVE = object.ABOVE;
const items2 = [ABOVE];
const NEUTRAL = object2.NEUTRAL;
const NEUTRAL = object.NEUTRAL;
items2[1] = NEUTRAL;
const BELOW = object2.BELOW;
const BELOW = object.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)();}}'};
object = {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)();}})}]};}"};
object = {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');
(FileImportTrackerModule).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 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}>
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
const value2 = env0_4.useContext(env0_12);
var env0_4 = value2;
(Module00044)(value2 != null, '[AnimatedCount] Context should not be nullish.');
const useSharedValue = ReanimatedRexportModule.useSharedValue;
const TransitionStates = (TransitionGroupModule).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 useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle;
const AnimatedCountY2 = AnimatedCountY;
object = {withSpring: (require(4577) /* metro dependency 4577: spring */).withSpring,
interpolate: ReanimatedRexportModule.interpolate, animationState: value4, ANIMATION_INPUT: env0_11,
animationOutput: value5, springConfig: springConfig, state: state};
object.TransitionStates = TransitionStates;
object.runOnJS = ReanimatedRexportModule.runOnJS;
object.cleanUp = cleanUp;
AnimatedCountY2.__closure = object;
AnimatedCountY2.__workletHash = 13513457118386;
AnimatedCountY2.__initData = env0_13;
const value6 = Reflect.apply(useAnimatedStyle, ReanimatedRexportModule, [AnimatedCountY2]);
env0_4.useEffect(_fun86009, [value4, value2, state]);
const View = (ReanimatedRexport).View;
const items2 = [StyleSheet.absoluteFill, value6];
items2[2] = {height: height};
const Text = (TextModule).Text;
return (
<View style={items2}>
<Text
variant={textVariant}
color={textColor}
@@ -121,136 +82,210 @@ function AnimatedCounterTransitionGroup({count, formatter, textColor, textVarian
{formatter(count)}
</Text>
</View>
</View>
);
}
);
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 _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 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 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 withSpring = SpringModule.withSpring;
const value4 = ReanimatedRexportModule.interpolate(ReactNativeModule.StyleSheet.get(), env1_11, ReactNativeModule.View);
const springConfigBinding = springConfig;
const yT2 = yT;
const object2 = {};
object2.state = state;
const TransitionStates = (TransitionGroupModule).TransitionStates;
object2.TransitionStates = TransitionStates;
object2.runOnJS = ReanimatedRexportModule.runOnJS;
object2.cleanUp = cleanUp;
yT2.__closure = object2;
yT2.__workletHash = 10933954976568;
yT2.__initData = env1_14;
return {transform: [{translateY: Reflect.apply(withSpring, SpringModule, [value4, springConfigBinding,
'respect-motion-settings', yT2])}]};
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 _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 set = ReactNativeModule.StyleSheet.set;
const stateBinding = state;
const TransitionStates = (TransitionGroupModule).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, ReactNativeModule.StyleSheet, [r1]);
}
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 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 textVariant2 = textVariant;
const textStyle2 = textStyle;
const styles = useStyles();
let binding = textStyle2;
let useState = binding.useState;
const value3 = textVariant2(Reflect.apply(useState, binding, []), 2);
const property = value3[0];
const env0_7 = value3[1];
binding = textStyle2;
useState = binding.useState;
const value5 = textVariant2(Reflect.apply(useState, binding, [[count]]), 2);
const property2 = value5[0];
const env0_8 = value5[1];
const env0_9 = textStyle2.useRef(property2);
const value6 = textStyle2.useRef(count);
textStyle2.useEffect(_fun86012, [count]);
const value7 = useAnimationContext(property2, value6);
const value8 = textStyle2.useCallback(_fun86015, []);
const value9 = textStyle2.useCallback(_fun86016, [formatter, property, springConfig, textColor, textStyle,
textVariant]);
const Provider = env0_12.Provider;
const TransitionGroup = (TransitionGroupModule).TransitionGroup;
const provider = (
<Provider value={value7}>
<TransitionGroup
items={property2}
renderItem={value9}
getItemKey={getItemKey}
/>
</Provider>
);
const Text = (TextModule).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 _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 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 _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};
}
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 _fun86015({nativeEvent}) { // fn#86015, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11438:3025, offset: 0x01e4fd68, size: 36 bytes, params: 2, frame: 11
env0_7(nativeEvent.layout.height);
}
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={ReactNativeModule.View}
textColor={textColor}
textVariant={textVariant}
textStyle={textStyle}
key={a0}
/>
);
}
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 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 = (TextModule).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 _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};
}
global.__d(_fun86002, 11252, [57, 31, 27, 33, 4501, 44, 4017, 4508, 4577, 4573, 4581, 11253,
2]) /* metro module 11252, dependencies: [57, 31, 27, 33, 4501, 44, 4017, 4508, 4577, 4573, 4581, 11253, 2] */;
@@ -1,10 +1,13 @@
/* Metro module 11253; source: modules/forums/native/posts/AnimatedCounterUtils.tsx; dependencies: [2] */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 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');
(FileImportTrackerModule).fileFinishedImporting('modules/forums/native/posts/AnimatedCounterUtils.tsx');
exports.defaultFormatter = function(a0) {
return '' + a0;
};
}
global.__d(_fun86019, 11253, [2]) /* metro module 11253, dependencies: [2] */;
@@ -1,94 +1,107 @@
/* Metro module 11559; source: modules/forums/native/posts/ForumPostAppliedTags.tsx; dependencies: [31, 27, 33, 4501, 697, 11089, 2] */
import Native from '../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as AppliedForumTagModule from '../AppliedForumTag.tsx'; /* Metro dependency 11089 */
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 */;
ReactModule;
let value = JsxRuntimeModule;
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,
object = {pillTagsContainer: {'display': 'flex', 'flexDirection': 'row', 'alignItems': 'center'}};
const BACKGROUND_SURFACE_HIGH = (Native).colors.BACKGROUND_SURFACE_HIGH;
object.tag = {backgroundColor: BACKGROUND_SURFACE_HIGH};
object.tagsContainer = {'display': 'flex', 'flexDirection': 'row', 'alignItems': 'center'};
const BORDER_SUBTLE = (Native).colors.BORDER_SUBTLE;
object.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');
const env0_6 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).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 _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 = (AppliedForumTagModule).AppliedForumTagPill;
return (
<AppliedForumTagPill
tag={a0}
containerStyle={styles.tag}
hasUnreads={hasUnreads}
key={a0.id}
/>
);
}
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 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 _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 = (AppliedForumTagModule).AppliedForumTag;
return (
<>
<AppliedForumTag
tag={a0}
hasUnreads={hasUnreads}
key={a0.id}
/>
{a1 !== appliedTags.length - 1 && <View style={styles.dot} />}
</>
);
}
}
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} />}
</>
);
}
global.__d(_fun88580, 11559, [31, 27, 33, 4501, 697, 11089,
2]) /* metro module 11559, dependencies: [31, 27, 33, 4501, 697, 11089, 2] */;
@@ -1,71 +1,92 @@
/* Metro module 11567; source: modules/forums/native/posts/ForumPostContainer.tsx; dependencies: [31, 27, 33, 4501, 697, 8142, 4017, 11231, 1357, 6239, 2] */
import UseNativeForumPostHandlers from './hooks/useNativeForumPostHandlers.tsx'; /* Metro dependency 11231 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as ReanimatedRexportModule from '../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as CardNativeModule from '../../../../design/components/Card/native/Card.native.tsx'; /* Metro dependency 6239 */
import * as ReanimatedHelperTypesModule from '../../../reanimated/ReanimatedHelperTypes.tsx'; /* Metro dependency 8142 */
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 createStyles = CreateStylesModule.createStyles;
const object2 = {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');
object2.backgroundColor = BACKGROUND_BASE_LOW;
object2.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.md;
object2.overflow = 'hidden';
const env0_6 = Reflect.apply(createStyles, CreateStylesModule, [{childContainer: {'position': 'relative',
'minHeight': 110, 'padding': 12}, card: {marginBottom: 12}, disabledContainer: object2}]);
const createContext = ReactModule.createContext;
const env0_7 = Reflect.apply(createContext, ReactModule, [ReanimatedHelperTypesModule.createFakeSharedValue(false)]);
(FileImportTrackerModule).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 = (ReanimatedRexportModule).useSharedValue(false);
const {onPressIn, onPressOut} = env0_3.useMemo(function() {
return {onPressIn: _fun88609, onPressOut: _fun88610};
}, [value2]);
const {onTapPost,
onLongTapPost} = (UseNativeForumPostHandlers)({threadId: threadId});
const r13 = (importDefault(1357) /* metro dependency 1357: MobileVisualRefreshExperiment */)('ForumPostContainer') ? 'surface-high' : 'secondary';
const Card = (CardNativeModule).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 _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);
}
}
}
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 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);
}
global.__d(_fun88605, 11567, [31, 27, 33, 4501, 697, 8142, 4017, 11231, 1357, 6239,
2]) /* metro module 11567, dependencies: [31, 27, 33, 4501, 697, 8142, 4017, 11231, 1357, 6239, 2] */;
@@ -1,20 +1,27 @@
/* 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] */
import Module00057 from '../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import ThemeStore from '../../../user_settings/ThemeStore.tsx'; /* Metro dependency 1310 */
import FastImage from '../../../../components_native/common/FastImage.tsx'; /* Metro dependency 5475 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as FormConstantsModule from '../../../../design/void/Form/native/FormConstants.tsx'; /* Metro dependency 1309 */
import * as UserSettingsModule from '../../../user_settings/UserSettings.tsx'; /* Metro dependency 3829 */
import * as SharedModule from '../../../../design/shared.tsx'; /* Metro dependency 4002 */
import * as ExplicitMediaRedactionUtilsModule from '../../../explicit_media_redaction/ExplicitMediaRedactionUtils.tsx'; /* Metro dependency 4821 */
import * as MessageAttachmentUtilsModule from '../../../messages/MessageAttachmentUtils.tsx'; /* Metro dependency 11558 */
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 ForumPostMediaSpoiler2 = ForumPostMediaSpoiler;
const useSharedMediaProps2 = 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 */;
let value = ReactNativeModule;
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;
@@ -29,266 +36,314 @@ function _fun88553(global, require, importDefault, importAll, module, exports, d
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,
object = {mediaContainer: {'position': 'relative', 'overflow': 'hidden'}};
const object2 = {};
object2.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object.thumbnailBorder = object2;
object.thumbnail = {'height': 80, 'width': 80};
object.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;
object.spoilerIcon = {color: PRIMARY_300, alignSelf: 'center'};
object.gridMediaContainer = {'borderRadius': 2, 'overflow': 'hidden'};
const env0_15 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/forums/native/posts/ForumPostMedia.tsx');
exports.ForumPostMediaSpoiler = ForumPostMediaSpoiler2;
exports.useSharedMediaProps = useSharedMediaProps2;
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;
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>
);
}
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>;
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" />)(FastImage)}
<ForumPostMediaSpoiler shouldSpoiler={shouldSpoiler} blurTheme={blurTheme} />
</>
);
}
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]);
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;
}
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]);
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 = ReactModule.useRef(null);
const value3 = (ExplicitMediaRedactionUtilsModule).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 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);
}
}
return object4;
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
const useShouldObscure = MessageAttachmentUtilsModule.useShouldObscure;
const value3 = Module00057(Reflect.apply(useShouldObscure, MessageAttachmentUtilsModule, [{media: media,
channel: channel}]), 2);
object = {shouldObscure: value3[0], obscureReason: value3[1]};
object.blurTheme = SharedModule.isThemeDark(ThemeStore.theme) ? 'dark' : 'light';
const GifAutoPlay = (UserSettingsModule).GifAutoPlay;
object.format = GifAutoPlay.useSetting() ? null : 'png';
return object;
}
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 = format2.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 format2 = format;
const value4 = format2.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 _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 object;
var mediaBinding;
var Math;
var ceil;
var binding;
const isLocalDeviceMediaBinding = isLocalDeviceMedia;
const object2 = {};
if (isLocalDeviceMediaBinding) {
object2.uri = media.src;
} else {
value2 = environment.__proto__;
moduleValue = require(1477) /* metro dependency 1477: ImageUtils */;
getSrcWithWidthAndHeight = moduleValue.getSrcWithWidthAndHeight;
object = {};
mediaBinding = media;
object.src = mediaBinding.src;
object.sourceWidth = mediaBinding.width;
object.sourceHeight = mediaBinding.height;
Math = global.Math;
ceil = Math.ceil;
binding = env1_13;
object.targetWidth = Reflect.apply(ceil, Math, [80 * binding]);
Math = global.Math;
object.targetHeight = Math.ceil(80 * binding);
object.format = format;
object.animated = mediaBinding.srcIsAnimated;
object2.uri = Reflect.apply(getSrcWithWidthAndHeight, moduleValue, [object]);
}
return object2;
}
}
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 _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 object;
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 object2;
if (ReactModule) {
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]);
object = {};
moduleValue2 = require(1477) /* metro dependency 1477: ImageUtils */;
getSrcWithWidthAndHeight = moduleValue2.getSrcWithWidthAndHeight;
object2 = {};
object2.src = mediaBinding.src;
width = mediaBinding.width;
object2.sourceWidth = width;
height = mediaBinding.height;
object2.sourceHeight = height;
Math = global.Math;
ceil = Math.ceil;
width = mediaBinding.width;
object2.targetWidth = Reflect.apply(ceil, Math, [width * value7]);
Math = global.Math;
ceil = Math.ceil;
height = mediaBinding.height;
object2.targetHeight = Reflect.apply(ceil, Math, [height * value7]);
object2.format = format;
object.uri = Reflect.apply(getSrcWithWidthAndHeight, moduleValue2, [object2]);
} else {
object = {};
var moduleValue = require(1477) /* metro dependency 1477: ImageUtils */;
getSrcWithWidthAndHeight = moduleValue.getSrcWithWidthAndHeight;
var object3 = {};
mediaBinding = media;
object3.src = mediaBinding.src;
object3.sourceWidth = mediaBinding.width;
object3.sourceHeight = mediaBinding.height;
Math = global.Math;
ceil = Math.ceil;
targetWidthBinding = targetWidth;
binding = env1_14;
object3.targetWidth = Reflect.apply(ceil, Math, [targetWidthBinding * binding]);
Math = global.Math;
object3.targetHeight = Math.ceil(targetHeight * binding);
object3.format = format;
object.uri = Reflect.apply(getSrcWithWidthAndHeight, moduleValue, [object3]);
}
return object;
}
}
}
global.__d(_fun88553, 11555, [57, 31, 27, 1310, 1309, 33, 4501, 697, 5475, 4564, 11556, 4821, 11557, 477, 4840,
5278, 5263, 5074, 11558, 4002, 3829, 11231, 1477,
2]) /* metro module 11555, 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] */;
@@ -1,148 +1,166 @@
/* Metro module 11570; source: modules/forums/native/posts/ForumPostMessageContent.tsx; dependencies: [57, 31, 27, 33, 4501, 11571, 4584, 8518, 4573, 2] */
import Module00057 from '../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import UseNativeForumPostContent from './hooks/useNativeForumPostContent.tsx'; /* Metro dependency 11571 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as TextModule from '../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
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');
(FileImportTrackerModule).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 = (UseNativeForumPostContent)({message: message,
messageLoaded: messageLoaded, messageContent: messageContent, isMessageDeleted: isMessageDeleted,
senderModifier: senderModifier});
const content = value2.content;
const style = value2.style;
const style2 = style;
const variant = value2.variant;
const variant2 = variant;
let binding = variant2;
const [property, env0_6] = style2(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 = variant2;
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 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 _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 (ReactNativeModule.View == 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 object;
const Text = (TextModule).Text;
var value4;
let value = typeof a0;
if (value === 'string') {
value = environment.__proto__.__proto__;
value = undefined;
object = {};
value4 = environment.__proto__;
object.variant = variant;
r0 = hasUnreads ? 'text-default' : 'text-muted';
object.color = r0;
object.style = [style, styles.text];
object.lineClamp = lineClamp;
object.ellipsizeMode = 'tail';
r0 = env1_5 == null ? env1_8 : value;
object.onTextLayout = r0;
return (
<Text {...object} key={'text-' + a1}>
{global.String(a0)}
</Text>
);
}
if (value === 'number') {
value = environment.__proto__.__proto__;
value = undefined;
object = {};
value4 = environment.__proto__;
object.variant = variant;
r0 = hasUnreads ? 'text-default' : 'text-muted';
object.color = r0;
object.style = [style, styles.text];
object.lineClamp = lineClamp;
object.ellipsizeMode = 'tail';
r0 = env1_5 == null ? env1_8 : value;
object.onTextLayout = r0;
return (
<Text {...object} key={'text-' + a1}>
{global.String(a0)}
</Text>
);
}
if (value === 'boolean') {
value = environment.__proto__.__proto__;
value = undefined;
object = {};
value4 = environment.__proto__;
object.variant = variant;
r0 = hasUnreads ? 'text-default' : 'text-muted';
object.color = r0;
object.style = [style, styles.text];
object.lineClamp = lineClamp;
object.ellipsizeMode = 'tail';
r0 = env1_5 == null ? env1_8 : value;
object.onTextLayout = r0;
return (
<Text {...object} 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} />;
}
}
}
}
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} />;
}
global.__d(_fun88616, 11570, [57, 31, 27, 33, 4501, 11571, 4584, 8518, 4573,
2]) /* metro module 11570, dependencies: [57, 31, 27, 33, 4501, 11571, 4584, 8518, 4573, 2] */;
@@ -1,69 +1,95 @@
/* Metro module 11564; source: modules/forums/native/posts/ForumPostMessageCount.tsx; dependencies: [31, 27, 33, 4501, 697, 477, 9619, 1244, 6682, 4573, 11252, 2] */
import Native from '../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as PlatformUtilsModule from '../../../../utils/PlatformUtils.tsx'; /* Metro dependency 477 */
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as TextModule from '../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as ChatIconModule from '../../../../design/components/Icon/native/redesign/generated/ChatIcon.tsx'; /* Metro dependency 6682 */
import * as ForumHooksModule from '../../ForumHooks.tsx'; /* Metro dependency 9619 */
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');
const createStyles = CreateStylesModule.createStyles;
object = {};
const object2 = {};
const ICON_MUTED = (Native).colors.ICON_MUTED;
object2.tintColor = ICON_MUTED;
object2.marginEnd = 4;
object2.marginTop = PlatformUtilsModule.isAndroid() ? value2 : value;
object.iconRead = object2;
const object3 = {};
const INTERACTIVE_TEXT_DEFAULT = (Native).colors.INTERACTIVE_TEXT_DEFAULT;
object3.tintColor = INTERACTIVE_TEXT_DEFAULT;
object3.marginEnd = 4;
object3.marginTop = PlatformUtilsModule.isAndroid() ? value2 : value;
object.iconUnread = object3;
object.messageUnreadCount = {marginStart: 4};
object.container = {'flexDirection': 'row', 'alignItems': 'center'};
const env0_6 = Reflect.apply(createStyles, CreateStylesModule, [object]);
(FileImportTrackerModule).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;
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 = (TextModule).Text;
var value;
const styles = useStyles();
const {messageCountText, isMaxMessageCount, messageCount,
unreadCount} = (ForumHooksModule).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 = (ChatIconModule).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>
);
}
items2[2] = r5;
return (
<View {...viewBindingProps}>
{items2}
</View>
);
}
global.__d(_fun88593, 11564, [31, 27, 33, 4501, 697, 477, 9619, 1244, 6682, 4573, 11252,
2]) /* metro module 11564, dependencies: [31, 27, 33, 4501, 697, 477, 9619, 1244, 6682, 4573, 11252, 2] */;
@@ -1,28 +1,35 @@
/* Metro module 11561; source: modules/forums/native/posts/ForumPostNewTag.tsx; dependencies: [31, 33, 4501, 697, 1305, 2] */
import Native from '../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as NativeModule from '../../../../design/void/native.tsx'; /* Metro dependency 1305 */
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
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,
ReactModule;
const createStyles = CreateStylesModule.createStyles;
const BRAND_260 = (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');
(FileImportTrackerModule).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 = (NativeModule).NewTag;
return (
<NewTag
containerStyle={[containerStyle, styles.container]}
variant="text-xs/bold"
color="button-outline-brand-border-active"
/>
);
}
}
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"
/>
);
}
global.__d(_fun88587, 11561, [31, 33, 4501, 697, 1305,
2]) /* metro module 11561, dependencies: [31, 33, 4501, 697, 1305, 2] */;
@@ -1,36 +1,42 @@
/* Metro module 11549; source: modules/forums/native/posts/ForumPostPinIcon.tsx; dependencies: [31, 27, 33, 4501, 697, 1305, 11550, 2] */
import Module11550 from '../../../../by-id/module-11550.js'; /* Metro dependency 11550 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as NativeModule from '../../../../design/void/native.tsx'; /* Metro dependency 1305 */
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
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',
ReactModule;
const createStyles = CreateStylesModule.createStyles;
object = {};
const object2 = {'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;
object2.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;
object2.backgroundColor = BACKGROUND_BRAND;
object.pin = object2;
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');
object.pinIcon = {'height': 14, 'width': 14, tintColor: WHITE};
const env0_5 = Reflect.apply(createStyles, CreateStylesModule, [object]);
(FileImportTrackerModule).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 = (NativeModule).Icon;
return (
<View style={items2}>
<Icon source={Module11550} style={styles.pinIcon} />
</View>
);
}
}
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>
);
}
global.__d(_fun88526, 11549, [31, 27, 33, 4501, 697, 1305, 11550,
2]) /* metro module 11549, dependencies: [31, 27, 33, 4501, 697, 1305, 11550, 2] */;
@@ -1,32 +1,40 @@
/* Metro module 11560; source: modules/forums/native/posts/ForumPostTimestamp.tsx; dependencies: [31, 11547, 33, 4501, 9619, 4573, 2] */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as TextModule from '../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as ForumHooksModule from '../../ForumHooks.tsx'; /* Metro dependency 9619 */
import * as ForumChannelStoreModule from '../../ForumChannelStore.tsx'; /* Metro dependency 11547 */
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,
ReactModule;
const env0_4 = (CreateStylesModule).createStyles({text: {'lineHeight': 18,
'height': 18}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/forums/native/posts/ForumPostTimestamp.tsx');
(FileImportTrackerModule).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 = (ForumHooksModule).useLastActiveTimestamp(thread,
useForumChannelStore(thread.parent_id).sortOrder, format);
const r5 = hasUnreads ? 'text-default' : 'text-muted';
const Text = (TextModule).Text;
return (
<Text
lineClamp={1}
variant="text-xs/normal"
color={r5}
style={[textStyle, styles.text]}
>
{value2}
</Text>
);
}
}
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>
);
}
global.__d(_fun88585, 11560, [31, 11547, 33, 4501, 9619, 4573,
2]) /* metro module 11560, dependencies: [31, 11547, 33, 4501, 9619, 4573, 2] */;
@@ -1,30 +1,37 @@
/* Metro module 11562; source: modules/forums/native/posts/ForumPostTitle.tsx; dependencies: [31, 33, 4501, 4573, 2] */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as TextModule from '../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
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');
ReactModule;
const env0_3 = (CreateStylesModule).createStyles({title: {marginBottom: 6}});
(FileImportTrackerModule).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 = (TextModule).Text;
return (
<Text
variant="text-md/semibold"
color={r9}
lineClamp={lineClamp}
ellipsizeMode={ellipsizeMode}
style={styles.title}
onTextLayout={onTextLayout}
>
{title}
</Text>
);
}
}
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>
);
}
global.__d(_fun88589, 11562, [31, 33, 4501, 4573,
2]) /* metro module 11562, dependencies: [31, 33, 4501, 4573, 2] */;
@@ -1,92 +1,106 @@
/* Metro module 11565; source: modules/forums/native/posts/ForumPostTypingUsers.tsx; dependencies: [31, 27, 33, 4501, 697, 9619, 11566, 11567, 4017, 1305, 4573, 2] */
import ReanimatedRexport from '../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import UseTypingText from '../../../chat/useTypingText.tsx'; /* Metro dependency 11566 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as NativeModule from '../../../../design/void/native.tsx'; /* Metro dependency 1305 */
import * as ReanimatedRexportModule from '../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import * as ForumHooksModule from '../../ForumHooks.tsx'; /* Metro dependency 9619 */
import * as ForumPostContainerModule from './ForumPostContainer.tsx'; /* Metro dependency 11567 */
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 */;
ReactModule;
let value = JsxRuntimeModule;
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,
object = {container: {'display': 'flex', 'flexDirection': 'row', 'alignItems': 'center', 'flex': 1}};
object.lastTypingUser = {marginEnd: 0};
const object3 = {'marginEnd': -8, 'borderWidth': 2};
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
object.typingUser = object3;
const object4 = {'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;
object4.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};
object4.paddingVertical = PX_4;
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
object.dots = object4;
object.typingText = {flexShrink: 1};
const CARD_BACKGROUND_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.CARD_BACKGROUND_DEFAULT;
object2.borderColor = {color: CARD_BACKGROUND_DEFAULT};
object.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');
object.borderColorPressed = {color: CARD_PRIMARY_PRESSED_BG};
const env0_6 = Reflect.apply(createStyles, value, [object]);
object = {code: 'function ForumPostTypingUsersTsx1(){const{forumPostPressedIn,borderColorPressed,borderColor}=this.__closure;return{borderColor:forumPostPressedIn.value?borderColorPressed:borderColor};}'};
(FileImportTrackerModule).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 = (ForumHooksModule).useFacepileUsers(thread, typingUserIds);
const defaultImport = UseTypingText;
const object = {};
object.channelId = thread.id;
object.guildId = thread.getGuildId();
object.typingUserIds = typingUserIds;
const value3 = defaultImport(object);
const color = styles.borderColor.color;
const color2 = styles.borderColorPressed.color;
const value4 = (ForumPostContainerModule).useForumPostContainerPressedIn();
const useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle;
const ForumPostTypingUsers_2 = ForumPostTypingUsers_;
ForumPostTypingUsers_2.__closure = {forumPostPressedIn: value4, borderColorPressed: color2, borderColor: color};
ForumPostTypingUsers_2.__workletHash = 6320844933544;
ForumPostTypingUsers_2.__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,
[ForumPostTypingUsers_2])]}>{((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 = (ReanimatedRexport).View;
const items2 = [styles.typingUser, env0_5];
items2[2] = a1 === env0_1.length - 1 && styles.lastTypingUser;
const Avatar = (NativeModule).Avatar;
const avatarProps = {source: a0.getAvatarSource(env0_6)};
const AvatarSizes = (NativeModule).AvatarSizes;
const SIZE_16 = AvatarSizes.SIZE_16;
avatarProps.size = SIZE_16;
return (
<View style={items2} key={a0.id}>
<Avatar {...avatarProps} />
</View>
);
}
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>
);
}
global.__d(_fun88595, 11565, [31, 27, 33, 4501, 697, 9619, 11566, 11567, 4017, 1305, 4573,
2]) /* metro module 11565, dependencies: [31, 27, 33, 4501, 697, 9619, 11566, 11567, 4017, 1305, 4573, 2] */;
@@ -1,90 +1,119 @@
/* 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] */
import AccessibilityStore from '../../../a11y/AccessibilityStore.tsx'; /* Metro dependency 4502 */
import UseChatWidth from '../../../chat/native/useChatWidth.tsx'; /* Metro dependency 11335 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as ForumLayoutModule from '../../../../external/discord_common/js/shared/shared-constants/ForumLayout.tsx'; /* Metro dependency 1389 */
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as EnhancedRoleColorUtilsModule from '../../../premium/enhanced_role_colors/native/EnhancedRoleColorUtils.tsx'; /* Metro dependency 8206 */
import * as ForumHooksModule from '../../ForumHooks.tsx'; /* Metro dependency 9619 */
import * as ForumChannelStoreModule from '../../ForumChannelStore.tsx'; /* Metro dependency 11547 */
import * as ForumPostGridBodyModule from './grid/ForumPostGridBody.tsx'; /* Metro dependency 11552 */
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',
ReactModule;
const env0_8 = (CreateStylesModule).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');
(FileImportTrackerModule).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>;
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 object;
var items3;
const styles = useStyles();
let object2 = {thread: thread};
const layoutType = useForumChannelStore(object2.thread.parent_id).layoutType;
const ForumLayout = (ForumLayoutModule).ForumLayout;
const GRID = ForumLayout.GRID;
let r7 = layoutType !== GRID ? 158 : 72;
const value5 = (UseChatWidth)();
const GRID_HORIZONTAL_PADDING = (ForumPostGridBodyModule).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 = (EnhancedRoleColorUtilsModule).useProcessColorStringsArray(authorColors);
const useIsRoleStyleAndRoleColorsEligibleForERC = EnhancedRoleColorUtilsModule.useIsRoleStyleAndRoleColorsEligibleForERC;
const guild_id = thread.guild_id;
let r0 = authorId ?? undefined;
if (authorName == null) {
r0 = null;
} else {
object2 = {};
object = {maxWidth: value6};
copyDataProperties(object, styles.authorContainer, roleStyle);
object2.style = [object, r17, containerStyle];
object2.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 {...object2}>
{items3}
</View>
);
}
return r0;
}
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 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} = (ForumHooksModule).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} = (ForumHooksModule).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}
/>
);
}
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}
/>
);
}
global.__d(_fun88529, 11551, [31, 27, 4502, 11547, 33, 4501, 9619, 1389, 11335, 11552, 566, 8206, 1305, 4573,
2]) /* metro module 11551, dependencies: [31, 27, 4502, 11547, 33, 4501, 9619, 1389, 11335, 11552, 566, 8206, 1305, 4573, 2] */;
@@ -1,20 +1,32 @@
/* 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] */
import Module00057 from '../../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import UseWindowDimensionsNative from '../../../../screen/useWindowDimensions.native.tsx'; /* Metro dependency 1478 */
import Module11158 from '../../../../../by-id/module-11158.js'; /* Metro dependency 11158 */
import Module11553 from '../../../../../by-id/module-11553.js'; /* Metro dependency 11553 */
import Module11554 from '../../../../../by-id/module-11554.js'; /* Metro dependency 11554 */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as NativeModule from '../../../../../design/void/native.tsx'; /* Metro dependency 1305 */
import * as GlobalUtilsModule from '../../../../../utils/GlobalUtils.tsx'; /* Metro dependency 1360 */
import * as TextModule from '../../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as ForumTagHooksModule from '../../../ForumTagHooks.tsx'; /* Metro dependency 6863 */
import * as ForumPostMediaModule from '../ForumPostMedia.tsx'; /* Metro dependency 11555 */
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 */;
let value = JsxRuntimeModule;
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 object2 = {'height': 20, 'width': 33, 'backgroundColor': 'black', 'borderRadius': null, 'resizeMode': 'cover'};
object2.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
object.gifIcon = object2;
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};
@@ -29,9 +41,9 @@ function _fun88534(global, require, importDefault, importAll, module, exports, d
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;
const object5 = {'height': 225, 'flexDirection': 'row', 'borderRadius': null, 'overflow': 'hidden'};
object5.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
object.grid = object5;
object.wideAspectRatioGrid = {height: 192};
object.column = {'flex': 1, 'flexDirection': 'column'};
object.columnSpacer = {'flex': 0, 'width': 2, 'height': '100%'};
@@ -40,211 +52,223 @@ function _fun88534(global, require, importDefault, importAll, module, exports, d
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');
(FileImportTrackerModule).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}
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 = (NativeModule).Icon;
const Icon2 = (NativeModule).Icon;
const Sizes = Icon2.Sizes;
const CUSTOM = Sizes.CUSTOM;
return (
<Icon
size={CUSTOM}
source={Module11553}
disableColor
style={styles.gifIcon}
/>
</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;
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 = (NativeModule).Icon;
const Icon2 = (NativeModule).Icon;
const Sizes = Icon2.Sizes;
const SMALL_20 = Sizes.SMALL_20;
return (
<Icon
size={SMALL_20}
source={Module11554}
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 = (NativeModule).Icon;
const iconProps = {source: Module11158, color: styles.icon.color};
const Icon2 = (NativeModule).Icon;
const Sizes = Icon2.Sizes;
const REFRESH_SMALL_16 = Sizes.REFRESH_SMALL_16;
iconProps.size = REFRESH_SMALL_16;
const icon = <Icon {...iconProps} />;
const Text = (TextModule).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((GlobalUtilsModule).isNotNullish).map(_fun88539)}
</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 = (ForumPostMediaModule).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 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 = Module00057((ForumTagHooksModule).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} = ReactModule.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 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,
[(UseWindowDimensionsNative)().width, env1_4.useMemo(_fun88542,
[a0]), a1]);
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 _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((GlobalUtilsModule).isNotNullish);
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 _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 Module00057.map(_fun88547);
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((GlobalUtilsModule).isNotNullish).length;
length = env1_3.length;
return a0.map(_fun88548);
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 object = {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;
}
object.targetHeight = r1;
return object;
}
}
}
}
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>
);
}
}
}
global.__d(_fun88534, 11552, [57, 31, 27, 33, 4501, 697, 1305, 11553, 11554, 11158, 4573, 1478, 1360, 11555, 6863,
9587, 11559,
2]) /* metro module 11552, dependencies: [57, 31, 27, 33, 4501, 697, 1305, 11553, 11554, 11158, 4573, 1478, 1360, 11555, 6863, 9587, 11559, 2] */;
@@ -1,36 +1,48 @@
/* Metro module 11563; source: modules/forums/native/posts/grid/ForumPostGridFooter.tsx; dependencies: [31, 27, 661, 33, 4501, 697, 11531, 11564, 11565, 11313, 2] */
import Native from '../../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import ForumPostMessageCount from '../ForumPostMessageCount.tsx'; /* Metro dependency 11564 */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as ConstantsModule from '../../../../../Constants.tsx'; /* Metro dependency 661 */
import * as UseTypingUsersIdsModule from '../../../../chat/useTypingUsersIds.tsx'; /* Metro dependency 11531 */
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 */;
ReactModule;
let value = JsxRuntimeModule;
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 BORDER_SUBTLE = (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');
(FileImportTrackerModule).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 = (UseTypingUsersIdsModule).useTypingUserIds(thread.id);
const value3 = value2.length > 0;
const items2 = [
((Component) => <Component thread={thread} hasUnreads={hasUnreads} />)(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>
);
}
}
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>
);
}
global.__d(_fun88591, 11563, [31, 27, 661, 33, 4501, 697, 11531, 11564, 11565, 11313,
2]) /* metro module 11563, dependencies: [31, 27, 661, 33, 4501, 697, 11531, 11564, 11565, 11313, 2] */;
@@ -1,41 +1,57 @@
/* Metro module 11548; source: modules/forums/native/posts/grid/ForumPostGridHeader.tsx; dependencies: [31, 27, 6900, 1386, 33, 4501, 11549, 11551, 11560, 11561, 11562, 2] */
import ForumPostTimestamp from '../ForumPostTimestamp.tsx'; /* Metro dependency 11560 */
import ForumPostTitle from '../ForumPostTitle.tsx'; /* Metro dependency 11562 */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as ChannelConstantsModule from '../../../../channel/ChannelConstants.tsx'; /* Metro dependency 1386 */
import * as CreateStylesModule from '../../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as ForumConstantsModule from '../../../ForumConstants.tsx'; /* Metro dependency 6900 */
import * as ForumPostUsernameModule from '../ForumPostUsername.tsx'; /* Metro dependency 11551 */
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},
ReactModule;
const env0_8 = (CreateStylesModule).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');
(FileImportTrackerModule).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}
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 = (ForumPostUsernameModule).ForumPostAuthor;
items2[1] = <ForumPostAuthor thread={thread} hasUnreads={hasUnreads} />;
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} />)(ForumPostTitle)}
</View>
{((Component) => <Component title={thread.name} hasUnreads={hasUnreads} />)(importDefault(11562) /* metro dependency 11562: ForumPostTitle */)}
</View>
);
);
}
}
global.__d(_fun88524, 11548, [31, 27, 6900, 1386, 33, 4501, 11549, 11551, 11560, 11561, 11562,
2]) /* metro module 11548, dependencies: [31, 27, 6900, 1386, 33, 4501, 11549, 11551, 11560, 11561, 11562, 2] */;
@@ -1,62 +1,68 @@
/* Metro module 11571; source: modules/forums/native/posts/hooks/useNativeForumPostContent.tsx; dependencies: [661, 4501, 1244, 5216, 4643, 2] */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../../../../../Constants.tsx'; /* Metro dependency 661 */
import * as IndexNativeModule from '../../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as CreateStylesModule from '../../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
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');
const env0_4 = (CreateStylesModule).createStyles({italics: {fontStyle: 'italic'}});
(FileImportTrackerModule).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'};
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 = (IndexNativeModule).intl;
const t = (IndexNativeModule).t;
const styles = useStyles();
if (isMessageDeleted) {
return {content: intl.string(t.U8Rr2l), 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);
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 {
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 = null;
}
r8 = r0;
} else {
r8 = null;
return {'content': null, 'style': null, 'variant': 'text-sm/medium', content: r9 ? r8 : messageContent};
}
return {'content': null, 'style': null, 'variant': 'text-sm/medium', content: r9 ? r8 : messageContent};
}
global.__d(_fun88623, 11571, [661, 4501, 1244, 5216, 4643,
2]) /* metro module 11571, dependencies: [661, 4501, 1244, 5216, 4643, 2] */;
@@ -1,235 +1,253 @@
/* 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] */
import Module00044 from '../../../../../by-id/module-00044.js'; /* Metro dependency 44 */
import ChannelStore from '../../../../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import URLUtils from '../../../../../utils/URLUtils.tsx'; /* Metro dependency 1471 */
import UserStore from '../../../../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import RelationshipStore from '../../../../../stores/RelationshipStore.tsx'; /* Metro dependency 3793 */
import ActionSheetStore from '../../../../action_sheet/native/ActionSheetStore.tsx'; /* Metro dependency 3849 */
import ForumPostMessagesStore from '../../../ForumPostMessagesStore.tsx'; /* Metro dependency 6865 */
import ForumPostRecentMessageStore from '../../../ForumPostRecentMessageStore.tsx'; /* Metro dependency 6901 */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as PlatformUtilsModule from '../../../../../utils/PlatformUtils.tsx'; /* Metro dependency 477 */
import * as ConstantsModule from '../../../../../Constants.tsx'; /* Metro dependency 661 */
import * as ThreadConstantsModule from '../../../../threads/ThreadConstants.tsx'; /* Metro dependency 1243 */
import * as TransitionToChannelModule from '../../../../routing/transitionToChannel.tsx'; /* Metro dependency 4601 */
import * as UseChannelNameModule from '../../../../channel/useChannelName.tsx'; /* Metro dependency 4805 */
import * as ChannelUtilsModule from '../../../../../utils/native/ChannelUtils.tsx'; /* Metro dependency 6647 */
import * as MessageReactionsTypesModule from '../../../../messages/MessageReactionsTypes.tsx'; /* Metro dependency 7152 */
import * as TrackingModule from '../../../tracking/Tracking.tsx'; /* Metro dependency 7155 */
import * as OpenMediaModalModule from '../../../../media_viewer/native/components/openMediaModal.tsx'; /* Metro dependency 9544 */
import * as ForumPostMediaUtilsModule from '../../../ForumPostMediaUtils.tsx'; /* Metro dependency 9587 */
import * as ReactionUtilsModule from '../../../../reactions/native/ReactionUtils.tsx'; /* Metro dependency 9837 */
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');
(FileImportTrackerModule).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');
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;
let useCallback = ReactModule.useCallback;
const value = Reflect.apply(useCallback, ReactModule, [_fun85853, [threadId]]);
const value2 = ReactModule.useCallback(_fun85855, [threadId]);
const value3 = ReactModule.useCallback(_fun85856, [value2, threadId]);
const value4 = ReactModule.useCallback(_fun85857, [threadId]);
const value5 = ReactModule.useCallback(_fun85858, [threadId]);
const value6 = ReactModule.useCallback(_fun85859, [threadId]);
const value7 = ReactModule.useCallback(_fun85860, [threadId]);
useCallback = ReactModule.useCallback;
return {onTapMedia: value, onTapPost: value2, onLongTapPost: value4, onTapReaction: value5,
onLongTapReaction: value6, onTapReactionCount: value7, onTapAddReaction: Reflect.apply(useCallback, ReactModule,
[_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);
(Module00044)(channel != null, '[Forum Post Handlers] Thread cannot be null.');
(OpenMediaModalModule).openMediaModal({initialIndex: initialIndex,
initialSources: mediaItems.map(_fun85854), channelId: channel.id,
contextName: UseChannelNameModule.computeChannelName(channel, UserStore, RelationshipStore, false),
contextIcon: (ChannelUtilsModule).getChannelIcon(channel),
originViewOrOriginLayout: containerRef.current});
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 = (ForumPostMediaUtilsModule).ForumPostMediaTypes;
var value13;
const src = a0.src;
const srcIsAnimated = a0.srcIsAnimated;
const value2 = (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};
}
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;
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;
if (PlatformUtilsModule.isAndroid()) {
moduleValue2 = require(4081) /* metro dependency 4081: HapticUtilsNative */;
moduleValue2.triggerHapticFeedback((importDefault(4082) /* metro dependency 4082: HapticFeedbackTypes */).IMPACT_LIGHT);
}
const channelStoreBinding = ChannelStore;
const getChannel = channelStoreBinding.getChannel;
const threadIdBinding = threadId;
const value3 = Reflect.apply(getChannel, channelStoreBinding, [threadIdBinding]);
(Module00044)(value3 != null, '[Forum Post Handlers] Thread cannot be null.');
const channel = channelStoreBinding.getChannel(value3.parent_id);
(Module00044)(channel != null,
'[Forum Post Handlers] Parent channel cannot be null.');
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 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 channelStoreBinding = ChannelStore;
const getChannel = channelStoreBinding.getChannel;
const threadIdBinding = threadId;
const value3 = Reflect.apply(getChannel, channelStoreBinding, [threadIdBinding]);
(Module00044)(value3 != null, '[Forum Post Handlers] Thread cannot be null.');
const channel = channelStoreBinding.getChannel(value3.parent_id);
(Module00044)(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 channelStoreBinding = ChannelStore;
const channel = channelStoreBinding.getChannel(threadId);
(Module00044)(channel != null, '[Forum Post Handlers] Thread cannot be null.');
const channel2 = channelStoreBinding.getChannel(channel.parent_id);
(Module00044)(channel2 != null,
'[Forum Post Handlers] Parent channel cannot be null.');
(Module00044)(channel2.isForumLikeChannel(), 'Forum parents must be forum channels');
const actionSheetStoreBinding = ActionSheetStore;
const getContent = actionSheetStoreBinding.getContent;
const value5 = Reflect.apply(getContent, actionSheetStoreBinding, []) != null;
const userStoreBinding = UserStore;
const getUser = userStoreBinding.getUser;
if (!(value5 || Reflect.apply(getUser, userStoreBinding, [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 channelStoreBinding = ChannelStore;
const getChannel = channelStoreBinding.getChannel;
const threadIdBinding = threadId;
const value3 = Reflect.apply(getChannel, channelStoreBinding, [threadIdBinding]);
(Module00044)(value3 != null, '[Forum Post Handlers] Thread cannot be null.');
const forumPostMessagesStoreBinding = ForumPostMessagesStore;
const getMessage = forumPostMessagesStoreBinding.getMessage;
const firstMessage = Reflect.apply(getMessage, forumPostMessagesStoreBinding, [threadIdBinding]).firstMessage;
(Module00044)(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 forumPostMessagesStoreBinding = ForumPostMessagesStore;
const getMessage = forumPostMessagesStoreBinding.getMessage;
const threadIdBinding = threadId;
const firstMessage = Reflect.apply(getMessage, forumPostMessagesStoreBinding, [threadIdBinding]).firstMessage;
(Module00044)(firstMessage != null, '[Forum Post Handlers] Message cannot be null.');
(ReactionUtilsModule).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 forumPostMessagesStoreBinding = ForumPostMessagesStore;
const getMessage = forumPostMessagesStoreBinding.getMessage;
const threadIdBinding = threadId;
const firstMessage = Reflect.apply(getMessage, forumPostMessagesStoreBinding, [threadIdBinding]).firstMessage;
(Module00044)(firstMessage != null, '[Forum Post Handlers] Message cannot be null.');
(ReactionUtilsModule).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 channelStoreBinding = ChannelStore;
const getChannel = channelStoreBinding.getChannel;
const threadIdBinding = threadId;
const value3 = Reflect.apply(getChannel, channelStoreBinding, [threadIdBinding]);
(Module00044)(value3 != null, '[Forum Post Handlers] Thread cannot be null.');
const forumPostMessagesStoreBinding = ForumPostMessagesStore;
const getMessage = forumPostMessagesStoreBinding.getMessage;
const firstMessage = Reflect.apply(getMessage, forumPostMessagesStoreBinding, [threadIdBinding]).firstMessage;
(Module00044)(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 = (MessageReactionsTypesModule).ReactionTypes;
const BURST = ReactionTypes.BURST;
Reflect.apply(handleAddOrRemoveReaction, value, [id, value3, null, binding === BURST]);
}
}
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};
}
global.__d(_fun85851, 11231, [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]) /* metro module 11231, 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] */;
@@ -1,49 +1,64 @@
/* Metro module 11568; source: modules/forums/native/posts/list/ForumPostList.tsx; dependencies: [57, 31, 27, 1386, 33, 4501, 6863, 11549, 11559, 11569, 11572, 2] */
import Module00057 from '../../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import ForumPostListBody from './ForumPostListBody.tsx'; /* Metro dependency 11569 */
import ForumPostListFooter from './ForumPostListFooter.tsx'; /* Metro dependency 11572 */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as ChannelConstantsModule from '../../../../channel/ChannelConstants.tsx'; /* Metro dependency 1386 */
import * as CreateStylesModule from '../../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as ForumTagHooksModule from '../../../ForumTagHooks.tsx'; /* Metro dependency 6863 */
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',
ReactModule;
const env0_9 = (CreateStylesModule).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');
(FileImportTrackerModule).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>;
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 = Module00057((ForumTagHooksModule).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 = 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} />)(ForumPostListFooter)}
</>
);
}
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 */)}
</>
);
}
global.__d(_fun88612, 11568, [57, 31, 27, 1386, 33, 4501, 6863, 11549, 11559, 11569, 11572,
2]) /* metro module 11568, dependencies: [57, 31, 27, 1386, 33, 4501, 6863, 11549, 11559, 11569, 11572, 2] */;
@@ -1,42 +1,68 @@
/* Metro module 11569; source: modules/forums/native/posts/list/ForumPostListBody.tsx; dependencies: [31, 27, 6900, 33, 4501, 11561, 11551, 11560, 11562, 11570, 11555, 2] */
import ForumPostTimestamp from '../ForumPostTimestamp.tsx'; /* Metro dependency 11560 */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as CreateStylesModule from '../../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as ForumConstantsModule from '../../../ForumConstants.tsx'; /* Metro dependency 6900 */
import * as ForumPostUsernameModule from '../ForumPostUsername.tsx'; /* Metro dependency 11551 */
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',
ReactModule;
const env0_7 = (CreateStylesModule).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');
(FileImportTrackerModule).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}
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 = (ForumPostUsernameModule).ForumPostAuthor;
items2[1] = <ForumPostAuthor thread={thread} hasUnreads={hasUnreads} />;
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>
{((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 */)}
{
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>
{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>
);
);
}
}
global.__d(_fun88614, 11569, [31, 27, 6900, 33, 4501, 11561, 11551, 11560, 11562, 11570, 11555,
2]) /* metro module 11569, dependencies: [31, 27, 6900, 33, 4501, 11561, 11551, 11560, 11562, 11570, 11555, 2] */;
@@ -1,36 +1,48 @@
/* Metro module 11572; source: modules/forums/native/posts/list/ForumPostListFooter.tsx; dependencies: [31, 27, 661, 33, 4501, 697, 11531, 11564, 11565, 11313, 2] */
import Native from '../../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import ForumPostMessageCount from '../ForumPostMessageCount.tsx'; /* Metro dependency 11564 */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as ConstantsModule from '../../../../../Constants.tsx'; /* Metro dependency 661 */
import * as UseTypingUsersIdsModule from '../../../../chat/useTypingUsersIds.tsx'; /* Metro dependency 11531 */
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 */;
ReactModule;
let value = JsxRuntimeModule;
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 BORDER_SUBTLE = (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');
(FileImportTrackerModule).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 = (UseTypingUsersIdsModule).useTypingUserIds(thread.id);
const value3 = value2.length > 0;
const items2 = [
((Component) => <Component thread={thread} hasUnreads={hasUnreads} />)(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>
);
}
}
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>
);
}
global.__d(_fun88625, 11572, [31, 27, 661, 33, 4501, 697, 11531, 11564, 11565, 11313,
2]) /* metro module 11572, dependencies: [31, 27, 661, 33, 4501, 697, 11531, 11564, 11565, 11313, 2] */;
@@ -1,179 +1,206 @@
/* 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] */
import UseReactionPermissions from '../../../../messages/useReactionPermissions.tsx'; /* Metro dependency 9830 */
import UseNativeForumPostHandlers from '../hooks/useNativeForumPostHandlers.tsx'; /* Metro dependency 11231 */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as IndexNativeModule from '../../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as UserSettingsModule from '../../../../user_settings/UserSettings.tsx'; /* Metro dependency 3829 */
import * as TextModule from '../../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as PressablesModule from '../../../../../design/void/Pressables/native/Pressables.tsx'; /* Metro dependency 5278 */
import * as ReactionUtilsModule from '../../../../reactions/native/ReactionUtils.tsx'; /* Metro dependency 9837 */
import * as UseEmojiColorPaletteModule from '../../../../emojis/hooks/useEmojiColorPalette.tsx'; /* Metro dependency 9841 */
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 BurstReactionButton2 = BurstReactionButton;
const ReactionButton2 = 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 */;
let value = JsxRuntimeModule;
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',
object = {};
const object2 = {'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;
object2.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;
object2.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 = {};
object2.backgroundColor = REACTION_BACKGROUND_DEFAULT;
object.container = object2;
const object3 = {};
const REACTION_BORDER_REACTED_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.REACTION_BORDER_REACTED_DEFAULT;
object6.borderColor = REACTION_BORDER_REACTED_DEFAULT;
object3.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');
object3.backgroundColor = REACTION_BACKGROUND_REACTED_DEFAULT;
object.selected = object3;
object.textEmoji = {fontSize: 12};
object.imageEmoji = {'height': 16, 'width': 16};
object.countContainer = {paddingStart: 4};
const env0_7 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).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;
exports.BurstReactionButton = BurstReactionButton2;
exports.ReactionButton = ReactionButton2;
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 = (UseEmojiColorPaletteModule).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}
/>
);
}
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} />;
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 = (PressablesModule).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>
);
}
return r0;
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 = (UseNativeForumPostHandlers)({threadId: threadId}).onTapReactionCount;
const PressableOpacity = (PressablesModule).PressableOpacity;
const intl = (IndexNativeModule).intl;
const string = intl.string;
const N8hbZB = (IndexNativeModule).t.N8hbZB;
const items2 = [styles.container, containerStyle];
const Text = (TextModule).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 = (UseNativeForumPostHandlers)({threadId: threadId,
reactionType: reactionType}).onTapAddReaction;
const ADD_REACTION_ICON_COMPONENTS = (ReactionUtilsModule).ADD_REACTION_ICON_COMPONENTS;
const property = ADD_REACTION_ICON_COMPONENTS[reactionType];
const PressableOpacity = (PressablesModule).PressableOpacity;
const items2 = [styles.container, containerStyle];
const intl = (IndexNativeModule).intl;
return (
<PressableOpacity
style={items2}
accessible
accessibilityLabel={intl.string((IndexNativeModule).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} = (UseReactionPermissions)(thread);
const disableReactionUpdates2 = disableReactionUpdates;
const {onTapReaction,
onLongTapReaction} = (UseNativeForumPostHandlers)({threadId: thread.id});
const AnimateEmoji = (UserSettingsModule).AnimateEmoji;
const value4 = AnimateEmoji.useSetting();
const binding = disableReactionUpdates2;
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;
}
}
global.__d(_fun85843, 11230, [31, 27, 33, 4501, 697, 11231, 5278, 1244, 4573, 7152, 9837, 9830, 3829, 9841, 673,
1423, 3795, 6739, 11252,
2]) /* metro module 11230, dependencies: [31, 27, 33, 4501, 697, 11231, 5278, 1244, 4573, 7152, 9837, 9830, 3829, 9841, 673, 1423, 3795, 6739, 11252, 2] */;
@@ -1,102 +1,160 @@
/* Metro module 11313; source: modules/forums/native/posts/reactions/ForumPostReactions.tsx; dependencies: [31, 27, 33, 4501, 9830, 9619, 11230, 2] */
import UseReactionPermissions from '../../../../messages/useReactionPermissions.tsx'; /* Metro dependency 9830 */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as CreateStylesModule from '../../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as ForumHooksModule from '../../../ForumHooks.tsx'; /* Metro dependency 9619 */
import * as ForumPostReactionButtonModule from './ForumPostReactionButton.tsx'; /* Metro dependency 11230 */
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},
ReactModule;
const env0_6 = (CreateStylesModule).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');
(FileImportTrackerModule).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;
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 = (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 _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 = (ForumPostReactionButtonModule).ForumPostReactionButton;
return (
<ForumPostReactionButton
containerStyle={[styles.reactionButtonContainer, reactionContainerStyle]}
thread={thread}
reaction={a0}
animateCount={false}
key={a0.emoji.id ?? a0.emoji.name}
/>
);
}
}
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 = (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 _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 = (ForumPostReactionButtonModule).ForumPostReactionButton;
return (
<ForumPostReactionButton
containerStyle={[styles.actionBarReaction, reactionContainerStyle]}
thread={thread}
reaction={a0}
animateCount={false}
key={a0.emoji.id ?? a0.emoji.name}
/>
);
}
}
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} = (UseReactionPermissions)(thread);
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}
@@ -104,46 +162,10 @@ function MostCommonForumPostReaction({thread, parentChannel, firstMessage, locat
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}
/>
);
}
global.__d(_fun86313, 11313, [31, 27, 33, 4501, 9830, 9619, 11230,
2]) /* metro module 11313, dependencies: [31, 27, 33, 4501, 9830, 9619, 11230, 2] */;
@@ -1,35 +1,39 @@
/* Metro module 8004; source: modules/forums/openForumExplicitMediaWarning.native.tsx; dependencies: [33, 4496, 8005, 1962, 2] */
import AlertActionCreators from '../../actions/native/AlertActionCreators.tsx'; /* Metro dependency 4496 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as JsxRuntimeModule from '../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
function _fun63589(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#63589, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8182:6, offset: 0x01b86ca0, size: 121 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = (require(33) /* metro dependency 33 */).jsx;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/forums/openForumExplicitMediaWarning.native.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/forums/openForumExplicitMediaWarning.native.tsx');
exports.default = openForumExplicitMediaWarning;
function openForumExplicitMediaWarning(a0, a1) { // fn#63590, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8182:209, offset: 0x01b86d19, size: 66 bytes, params: 3, frame: 13
const env0_0 = a0;
const env0_1 = a1;
AlertActionCreators.openLazy({importer: importer_63591});
function openForumExplicitMediaWarningImporter() { // fn#63591, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8182:280, owner: openForumExplicitMediaWarning.importer, offset: 0x01b86d5b, size: 62 bytes, params: 1, frame: 13
var environment;
let value = environment.__proto__;
value = require(dependencyMap[3]);
value = value(dependencyMap[2], dependencyMap.paths);
return value.then(function({default: env0_0}) {
return _fun63593;
});
function _fun63592({default: env0_0}) { // fn#63592, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8182:312, offset: 0x01b86d99, size: 21 bytes, params: 2, frame: 2
return _fun63593;
function _fun63593(a0) { // fn#63593, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8182:327, offset: 0x01b86dae, size: 65 bytes, params: 2, frame: 15
return ((Component) => <Component {...a0} {...{['channelId']: env2_0}} {...{['messageId']: require}} />)(env0_0);
}
}
}
}
}
function openForumExplicitMediaWarning(a0, a1) { // fn#63590, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8182:209, offset: 0x01b86d19, size: 66 bytes, params: 3, frame: 13
const env0_0 = a0;
const env0_1 = a1;
const value = importDefault(4496) /* metro dependency 4496: AlertActionCreators */;
value.openLazy({importer: importer_63591});
}
function openForumExplicitMediaWarningImporter() { // fn#63591, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8182:280, owner: openForumExplicitMediaWarning.importer, offset: 0x01b86d5b, size: 62 bytes, params: 1, frame: 13
var environment;
let value = environment.__proto__;
value = require(dependencyMap[3]);
value = value(dependencyMap[2], dependencyMap.paths);
return value.then(function({default: env0_0}) {
return _fun63593;
});
}
function _fun63592({default: env0_0}) { // fn#63592, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8182:312, offset: 0x01b86d99, size: 21 bytes, params: 2, frame: 2
return _fun63593;
}
function _fun63593(a0) { // fn#63593, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8182:327, offset: 0x01b86dae, size: 65 bytes, params: 2, frame: 15
return ((Component) => <Component {...a0} {...{['channelId']: env2_0}} {...{['messageId']: require}} />)(env0_0);
}
global.__d(_fun63589, 8004, [33, 4496, 8005, 1962,
2]) /* metro module 8004, dependencies: [33, 4496, 8005, 1962, 2] */;
@@ -1,10 +1,13 @@
/* Metro module 7160; source: modules/forums/tracking/ForumChannelAnalyticsManager.tsx; dependencies: [7, 6, 1379, 2] */
import ClassCallCheck from '../../../by-id/module-00006-ClassCallCheck.js'; /* Metro dependency 6 */
import CreateClass from '../../../by-id/module-00007-CreateClass.js'; /* Metro dependency 7 */
import ChannelStore from '../../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun57466(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#57466, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7338:6, offset: 0x013e6739, size: 161 bytes, params: 8, frame: 18
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importDefault(7) /* metro dependency 7 */;
const env0_0 = importDefault(6) /* metro dependency 6 */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
let value = CreateClass;
value = value(function() {
this(this, ForumChannelAnalyticsManager);
this.setFilterTagIds = _fun57468;
@@ -17,102 +20,103 @@ function _fun57466(global, require, importDefault, importAll, module, exports, d
this.getTagSettingAnalytics = _fun57475;
});
value = new value();
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/forums/tracking/ForumChannelAnalyticsManager.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/forums/tracking/ForumChannelAnalyticsManager.tsx');
exports.default = value;
}
function ForumChannelAnalyticsManager() { // fn#57467, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7338:135, offset: 0x013e67da, size: 118 bytes, params: 1, frame: 14
this(this, ForumChannelAnalyticsManager);
this.setFilterTagIds = setFilterTagIds;
this.setSortOrder = setSortOrder;
this.setLayout = setLayout_57470;
this.setTagSetting = setTagSetting;
this.getFilterTagIdsAnalytics = getFilterTagIdsAnalytics;
this.getSortOrderAnalytics = getSortOrderAnalytics;
this.getLayoutAnalytics = getLayoutAnalytics;
this.getTagSettingAnalytics = getTagSettingAnalytics;
}
function setFilterTagIds(a0) { // fn#57468, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7338:233, owner: ForumChannelAnalyticsManager.setFilterTagIds, offset: 0x013e6850, size: 20 bytes, params: 2, frame: 2
env0_0.filterTagIds = a0;
}
function ForumChannelAnalyticsManagerSetSortOrder(a0) { // fn#57469, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7338:276, owner: ForumChannelAnalyticsManager.setSortOrder, offset: 0x013e6864, size: 20 bytes, params: 2, frame: 2
env0_0.sortOrder = a0;
}
function ForumChannelAnalyticsManagerSetLayout(a0) { // fn#57470, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7338:313, owner: ForumChannelAnalyticsManager.setLayout, offset: 0x013e6878, size: 20 bytes, params: 2, frame: 2
env0_0.layout = a0;
}
function ForumChannelAnalyticsManagerSetTagSetting(a0) { // fn#57471, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7338:351, owner: ForumChannelAnalyticsManager.setTagSetting, offset: 0x013e688c, size: 20 bytes, params: 2, frame: 2
env0_0.tagSetting = a0;
}
function getFilterTagIdsAnalytics() { // fn#57472, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7338:404, owner: ForumChannelAnalyticsManager.getFilterTagIdsAnalytics, offset: 0x013e68a0, size: 55 bytes, params: 1, frame: 12
return env0_0.filterTagIds != null ? global.Array.from(env0_0.filterTagIds) : [];
}
function getSortOrderAnalytics(a0) { // fn#57473, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7338:492, owner: ForumChannelAnalyticsManager.getSortOrderAnalytics, offset: 0x013e68d7, size: 63 bytes, params: 2, frame: 13
var r1;
var r0;
var value;
const sortOrder = env0_0.sortOrder;
if (sortOrder != null) {
r0 = sortOrder;
} else {
value = environment.__proto__;
value = ChannelStore.getChannel(a0);
if (value == null) {
r1 = undefined;
} else {
value = value.getDefaultSortOrder();
r1 = value;
function ForumChannelAnalyticsManager() { // fn#57467, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7338:135, offset: 0x013e67da, size: 118 bytes, params: 1, frame: 14
this(this, ForumChannelAnalyticsManager);
this.setFilterTagIds = setFilterTagIds;
this.setSortOrder = setSortOrder;
this.setLayout = setLayout_57470;
this.setTagSetting = setTagSetting;
this.getFilterTagIdsAnalytics = getFilterTagIdsAnalytics;
this.getSortOrderAnalytics = getSortOrderAnalytics;
this.getLayoutAnalytics = getLayoutAnalytics;
this.getTagSettingAnalytics = getTagSettingAnalytics;
function setFilterTagIds(a0) { // fn#57468, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7338:233, owner: ForumChannelAnalyticsManager.setFilterTagIds, offset: 0x013e6850, size: 20 bytes, params: 2, frame: 2
ClassCallCheck.filterTagIds = a0;
}
r0 = r1;
}
return r0;
}
function getLayoutAnalytics(a0) { // fn#57474, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7338:620, owner: ForumChannelAnalyticsManager.getLayoutAnalytics, offset: 0x013e6916, size: 63 bytes, params: 2, frame: 13
var r1;
var r0;
var value;
const layout = env0_0.layout;
if (layout != null) {
r0 = layout;
} else {
value = environment.__proto__;
value = ChannelStore.getChannel(a0);
if (value == null) {
r1 = undefined;
} else {
value = value.getDefaultLayout();
r1 = value;
function setSortOrder(a0) { // fn#57469, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7338:276, owner: ForumChannelAnalyticsManager.setSortOrder, offset: 0x013e6864, size: 20 bytes, params: 2, frame: 2
ClassCallCheck.sortOrder = a0;
}
r0 = r1;
}
return r0;
}
function getTagSettingAnalytics(a0) { // fn#57475, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7338:746, owner: ForumChannelAnalyticsManager.getTagSettingAnalytics, offset: 0x013e6955, size: 63 bytes, params: 2, frame: 13
var r1;
var r0;
var value;
const tagSetting = env0_0.tagSetting;
if (tagSetting != null) {
r0 = tagSetting;
} else {
value = environment.__proto__;
value = ChannelStore.getChannel(a0);
if (value == null) {
r1 = undefined;
} else {
value = value.getDefaultTagSetting();
r1 = value;
function ForumChannelAnalyticsManagerSetLayout(a0) { // fn#57470, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7338:313, owner: ForumChannelAnalyticsManager.setLayout, offset: 0x013e6878, size: 20 bytes, params: 2, frame: 2
ClassCallCheck.layout = a0;
}
r0 = r1;
function setTagSetting(a0) { // fn#57471, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7338:351, owner: ForumChannelAnalyticsManager.setTagSetting, offset: 0x013e688c, size: 20 bytes, params: 2, frame: 2
ClassCallCheck.tagSetting = a0;
}
function getFilterTagIdsAnalytics() { // fn#57472, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7338:404, owner: ForumChannelAnalyticsManager.getFilterTagIdsAnalytics, offset: 0x013e68a0, size: 55 bytes, params: 1, frame: 12
return ClassCallCheck.filterTagIds != null ? global.Array.from(ClassCallCheck.filterTagIds) : [];
}
function getSortOrderAnalytics(a0) { // fn#57473, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7338:492, owner: ForumChannelAnalyticsManager.getSortOrderAnalytics, offset: 0x013e68d7, size: 63 bytes, params: 2, frame: 13
var r1;
var r0;
var value;
const sortOrder = ClassCallCheck.sortOrder;
if (sortOrder != null) {
r0 = sortOrder;
} else {
value = environment.__proto__;
value = ChannelStore.getChannel(a0);
if (value == null) {
r1 = undefined;
} else {
value = value.getDefaultSortOrder();
r1 = value;
}
r0 = r1;
}
return r0;
}
function getLayoutAnalytics(a0) { // fn#57474, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7338:620, owner: ForumChannelAnalyticsManager.getLayoutAnalytics, offset: 0x013e6916, size: 63 bytes, params: 2, frame: 13
var r1;
var r0;
var value;
const layout = ClassCallCheck.layout;
if (layout != null) {
r0 = layout;
} else {
value = environment.__proto__;
value = ChannelStore.getChannel(a0);
if (value == null) {
r1 = undefined;
} else {
value = value.getDefaultLayout();
r1 = value;
}
r0 = r1;
}
return r0;
}
function getTagSettingAnalytics(a0) { // fn#57475, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7338:746, owner: ForumChannelAnalyticsManager.getTagSettingAnalytics, offset: 0x013e6955, size: 63 bytes, params: 2, frame: 13
var r1;
var r0;
var value;
const tagSetting = ClassCallCheck.tagSetting;
if (tagSetting != null) {
r0 = tagSetting;
} else {
value = environment.__proto__;
value = ChannelStore.getChannel(a0);
if (value == null) {
r1 = undefined;
} else {
value = value.getDefaultTagSetting();
r1 = value;
}
r0 = r1;
}
return r0;
}
}
return r0;
}
global.__d(_fun57466, 7160, [7, 6, 1379, 2]) /* metro module 7160, dependencies: [7, 6, 1379, 2] */;
@@ -1,4 +1,13 @@
/* Metro module 9623; source: modules/forums/tracking/ForumChannelSeenManager.tsx; dependencies: [7, 6, 15, 17, 18, 9624, 9622, 7155, 7157, 2] */
import ClassCallCheck from '../../../by-id/module-00006-ClassCallCheck.js'; /* Metro dependency 6 */
import CreateClass from '../../../by-id/module-00007-CreateClass.js'; /* Metro dependency 7 */
import PossibleConstructorReturn from '../../../by-id/module-00015-PossibleConstructorReturn.js'; /* Metro dependency 15 */
import Module00017 from '../../../by-id/module-00017.js'; /* Metro dependency 17 */
import Inherits from '../../../by-id/module-00018-Inherits.js'; /* Metro dependency 18 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as AnalyticsFeedItemSeenActionCreatorsModule from '../../../utils/AnalyticsFeedItemSeenActionCreators.tsx'; /* Metro dependency 9622 */
import * as AnalyticsFeedItemSeenManagerModule from '../../../utils/AnalyticsFeedItemSeenManager.tsx'; /* Metro dependency 9624 */
function _fun75464(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#75464, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9809:6, offset: 0x01dae0bb, size: 255 bytes, params: 8, frame: 20
const env0_0 = require;
const closure = function(a0) {
@@ -7,133 +16,128 @@ function _fun75464(global, require, importDefault, importAll, module, exports, d
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(7) /* metro dependency 7 */;
const env0_3 = importDefault(6) /* metro dependency 6 */;
const env0_4 = importDefault(15) /* metro dependency 15 */;
const env0_5 = importDefault(17) /* metro dependency 17 */;
const env0_6 = importDefault(18) /* metro dependency 18 */;
const AnalyticsFeedItemSeenManager = (require(9624) /* metro dependency 9624: AnalyticsFeedItemSeenManager */).AnalyticsFeedItemSeenManager;
const AnalyticsFeedItemSeenManager = (AnalyticsFeedItemSeenManagerModule).AnalyticsFeedItemSeenManager;
const value = _fun75469(AnalyticsFeedItemSeenManager);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/forums/tracking/ForumChannelSeenManager.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/forums/tracking/ForumChannelSeenManager.tsx');
exports.default = value;
exports.getForumPostSeenManagerId = closure;
exports.markForumPostItemAsSeen = markForumPostItemAsSeen;
exports.markForumPostItemAsUnseen = markForumPostItemAsUnseen;
}
function _isNativeReflectConstruct_75465() { // fn#75465, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9809:148, offset: 0x01dae1ba, size: 98 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
}
return (_isNativeReflectConstruct_75465_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun75469(a0) { // fn#75469, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9809:442, offset: 0x01dae262, size: 42 bytes, params: 2, frame: 14
const closure = ForumChannelSeenManager;
env0_6(closure, a0);
return env0_2(closure);
}
function markForumPostItemAsSeen(a0, a1, a2) { // fn#75473, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9809:1685, offset: 0x01dae490, size: 58 bytes, params: 4, frame: 16
const analyticsFeedItemSeenActionCreatorsModule = require(9622) /* metro dependency 9622: AnalyticsFeedItemSeenActionCreators */;
analyticsFeedItemSeenActionCreatorsModule.markAnalyticsFeedItemSeen(getForumPostSeenManagerId(a0), a1, a2);
}
function markForumPostItemAsUnseen(a0, a1, a2) { // fn#75474, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9809:1823, offset: 0x01dae4ca, size: 58 bytes, params: 4, frame: 16
const analyticsFeedItemSeenActionCreatorsModule = require(9622) /* metro dependency 9622: AnalyticsFeedItemSeenActionCreators */;
analyticsFeedItemSeenActionCreatorsModule.markAnalyticsFeedItemUnseen(getForumPostSeenManagerId(a0), a1, a2);
}
function ForumChannelSeenManager({guildId, channelId, windowId, isPaused}) { // fn#75470, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9809:454, offset: 0x01dae28c, size: 230 bytes, params: 2, frame: 23
var environment;
const value = environment.__proto__;
env1_3(this, ForumChannelSeenManager);
const object2 = {windowId: windowId, isPaused: isPaused};
object2.id = getForumPostSeenManagerId(channelId);
const items2 = [object2];
const value3 = env1_5(ForumChannelSeenManager);
const value6 = env1_4(this, _isNativeReflectConstruct_75465() ? global.Reflect.construct(value3, items2,
env1_5(this).constructor) : value3.apply(this, items2));
value6.createFlushSeenItemsFunction = createFlushSeenItemsFunction;
value6.guildId = guildId;
value6.channelId = channelId;
value6.sessionId = (require(7157) /* metro dependency 7157: TrackingUtils */).getForumChannelSessionId(channelId);
return value6;
}
function createFlushSeenItemsFunction(a0) { // fn#75471, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9809:832, owner: ForumChannelSeenManager.createFlushSeenItemsFunction, offset: 0x01dae372, size: 78 bytes, params: 2, frame: 6
const binding = env0_0;
const trackedFeedItems = binding.trackedFeedItems;
const channelId = binding.channelId;
const object2 = {};
object2.guildId = binding.guildId;
object2.channelId = channelId;
object2.sessionId = binding.sessionId;
object2.trackedFeedItems = trackedFeedItems;
object2.isForcedFlush = a0 != null;
return _fun75472;
}
function _fun75472() { // fn#75472, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9809:978, offset: 0x01dae3c0, size: 208 bytes, params: 1, frame: 21
var r2;
var property;
var property2;
var seenTimeDestructive;
var value3;
const {guildId, channelId, sessionId, trackedFeedItems, isForcedFlush} = env0_0;
const items3 = [];
const items2 = [];
const Object = global.Object;
let value = Object.keys(trackedFeedItems);
let length = value.length;
const value2 = 0;
if (value2 < length) {
r2 = value2;
while (true) {
property = value[r2];
property2 = trackedFeedItems[property];
seenTimeDestructive = property2.computeSeenTimeDestructive(isForcedFlush);
if (seenTimeDestructive > value2) {
items3.push(property);
items2.push(seenTimeDestructive);
}
value3 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
length = value.length;
if (value3 < length) {
r2 = value3;
continue;
}
break;
function _isNativeReflectConstruct_75465() { // fn#75465, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9809:148, offset: 0x01dae1ba, size: 98 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
}
return (_isNativeReflectConstruct_75465_isNativeReflectConstruct = function() {
return !!result;
})();
}
if (value2 !== items3.length) {
value = environment.__proto__.__proto__.__proto__;
value = require(7155) /* metro dependency 7155: Tracking */;
value.trackForumChannelSeenBatch({guildId: guildId, channelId: channelId, sessionId: sessionId, postIds: items3,
additionalTimes: items2});
function _fun75469(a0) { // fn#75469, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9809:442, offset: 0x01dae262, size: 42 bytes, params: 2, frame: 14
const ForumChannelSeenManager2 = ForumChannelSeenManager;
Inherits(ForumChannelSeenManager2, a0);
return CreateClass(ForumChannelSeenManager2);
function ForumChannelSeenManager({guildId, channelId, windowId, isPaused}) { // fn#75470, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9809:454, offset: 0x01dae28c, size: 230 bytes, params: 2, frame: 23
var environment;
const value = environment.__proto__;
env1_3(this, ForumChannelSeenManager);
const object = {windowId: windowId, isPaused: isPaused};
object.id = getForumPostSeenManagerId(channelId);
const items2 = [object];
const value3 = env1_5(ForumChannelSeenManager);
const value6 = env1_4(this, _isNativeReflectConstruct_75465() ? global.Reflect.construct(value3, items2,
env1_5(this).constructor) : value3.apply(this, items2));
value6.createFlushSeenItemsFunction = createFlushSeenItemsFunction;
value6.guildId = guildId;
value6.channelId = channelId;
value6.sessionId = (require(7157) /* metro dependency 7157: TrackingUtils */).getForumChannelSessionId(channelId);
return value6;
function createFlushSeenItemsFunction(a0) { // fn#75471, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9809:832, owner: ForumChannelSeenManager.createFlushSeenItemsFunction, offset: 0x01dae372, size: 78 bytes, params: 2, frame: 6
const binding = env0_0;
const trackedFeedItems = binding.trackedFeedItems;
const channelId = binding.channelId;
const object = {};
object.guildId = binding.guildId;
object.channelId = channelId;
object.sessionId = binding.sessionId;
object.trackedFeedItems = trackedFeedItems;
object.isForcedFlush = a0 != null;
return _fun75472;
function _fun75472() { // fn#75472, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9809:978, offset: 0x01dae3c0, size: 208 bytes, params: 1, frame: 21
var r2;
var property;
var property2;
var seenTimeDestructive;
var value3;
const {guildId, channelId, sessionId, trackedFeedItems, isForcedFlush} = env0_0;
const items3 = [];
const items2 = [];
const Object = global.Object;
let value = Object.keys(trackedFeedItems);
let length = value.length;
const value2 = 0;
if (value2 < length) {
r2 = value2;
while (true) {
property = value[r2];
property2 = trackedFeedItems[property];
seenTimeDestructive = property2.computeSeenTimeDestructive(isForcedFlush);
if (seenTimeDestructive > value2) {
items3.push(property);
items2.push(seenTimeDestructive);
}
value3 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
length = value.length;
if (value3 < length) {
r2 = value3;
continue;
}
break;
}
}
if (value2 !== items3.length) {
value = environment.__proto__.__proto__.__proto__;
value = require(7155) /* metro dependency 7155: Tracking */;
value.trackForumChannelSeenBatch({guildId: guildId, channelId: channelId, sessionId: sessionId, postIds: items3,
additionalTimes: items2});
}
}
}
}
}
function markForumPostItemAsSeen(a0, a1, a2) { // fn#75473, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9809:1685, offset: 0x01dae490, size: 58 bytes, params: 4, frame: 16
AnalyticsFeedItemSeenActionCreatorsModule.markAnalyticsFeedItemSeen(getForumPostSeenManagerId(a0), a1, a2);
}
function markForumPostItemAsUnseen(a0, a1, a2) { // fn#75474, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9809:1823, offset: 0x01dae4ca, size: 58 bytes, params: 4, frame: 16
AnalyticsFeedItemSeenActionCreatorsModule.markAnalyticsFeedItemUnseen(getForumPostSeenManagerId(a0), a1, a2);
}
}
global.__d(_fun75464, 9623, [7, 6, 15, 17, 18, 9624, 9622, 7155, 7157,
2]) /* metro module 9623, dependencies: [7, 6, 15, 17, 18, 9624, 9622, 7155, 7157, 2] */;
@@ -1,137 +1,150 @@
/* Metro module 7161; source: modules/forums/tracking/ForumPostAnalyticsManager.tsx; dependencies: [6, 7, 15, 17, 18, 4790, 1226, 1379, 21, 6899, 4860, 2] */
import ClassCallCheck from '../../../by-id/module-00006-ClassCallCheck.js'; /* Metro dependency 6 */
import CreateClass from '../../../by-id/module-00007-CreateClass.js'; /* Metro dependency 7 */
import PossibleConstructorReturn from '../../../by-id/module-00015-PossibleConstructorReturn.js'; /* Metro dependency 15 */
import Module00017 from '../../../by-id/module-00017.js'; /* Metro dependency 17 */
import Inherits from '../../../by-id/module-00018-Inherits.js'; /* Metro dependency 18 */
import AuthenticationStore from '../../../stores/AuthenticationStore.tsx'; /* Metro dependency 1226 */
import ChannelStore from '../../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import ActiveThreadsStore from '../../threads/ActiveThreadsStore.tsx'; /* Metro dependency 4790 */
import AutomaticLifecycleManager from '../../../lib/AutomaticLifecycleManager.tsx'; /* Metro dependency 4860 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun57476(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#57476, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7339:6, offset: 0x013e6994, size: 274 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(6) /* metro dependency 6 */;
const env0_4 = importDefault(7) /* metro dependency 7 */;
const env0_5 = importDefault(15) /* metro dependency 15 */;
const env0_6 = importDefault(17) /* metro dependency 17 */;
const env0_7 = importDefault(18) /* metro dependency 18 */;
const activeThreadsStore = importDefault(4790) /* metro dependency 4790: ActiveThreadsStore */;
const authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
let value = importDefault(4860) /* metro dependency 4860: AutomaticLifecycleManager */;
let value = AutomaticLifecycleManager;
value = _fun57480(value);
value = new value();
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/forums/tracking/ForumPostAnalyticsManager.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/forums/tracking/ForumPostAnalyticsManager.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_57477() { // fn#57477, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7339:178, offset: 0x013e6aa6, size: 94 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
}
return (_isNativeReflectConstruct_57477_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun57480(a0) { // fn#57480, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7339:381, offset: 0x013e6b04, size: 68 bytes, params: 2, frame: 15
const closure = ForumPostAnalyticsManager;
env0_7(closure, a0);
return env0_4(closure, [{key: 'handleThreadCreate', value: value_57488}]);
}
function ForumPostAnalyticsManager(a0) { // fn#57481, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7339:393, offset: 0x013e6b48, size: 201 bytes, params: 2, frame: 20
var r0;
var Reflect;
let value = copyRestArgs(0, undefined);
let binding = env1_3;
binding(this, ForumPostAnalyticsManager);
const items = [];
arraySpread(items, value, 0, items);
value = env1_6(ForumPostAnalyticsManager);
binding = env1_5;
if (_isNativeReflectConstruct_57477()) {
Reflect = global.Reflect;
value = Reflect.construct(value, items, env1_6(this).constructor);
r0 = value;
} else {
value = value.apply(this, items);
r0 = value;
}
value = binding(this, r0);
value.readStateSnapshots = {};
value.actions = {CHANNEL_SELECT: CHANNEL_SELECT_57482, THREAD_CREATE: THREAD_CREATE_57483};
value.handleChannelSelect = handleChannelSelect_57484;
value.processForumChannel = processForumChannel;
value.getReadStateSnapshotAnalytics = getReadStateSnapshotAnalytics;
return value;
}
function value_57488({channel}) { // fn#57488, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7339:1282, offset: 0x013e6d38, size: 85 bytes, params: 2, frame: 12
var ownerId;
var value;
var readStateSnapshots;
var id;
if (channel.isForumPost()) {
ownerId = channel.ownerId;
value = environment.__proto__;
value = AuthenticationStore.getId();
readStateSnapshots = this.readStateSnapshots;
id = channel.id;
value = !(ownerId === value);
readStateSnapshots[id] = {isNew: value, hasUnreads: value};
}
}
function ForumPostAnalyticsManagerHandleChannelSelect({channelId}) { // fn#57484, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7339:796, owner: ForumPostAnalyticsManager.handleChannelSelect, offset: 0x013e6c3f, size: 87 bytes, params: 2, frame: 13
var value;
var binding;
if (channelId != null) {
value = environment.__proto__.__proto__;
value = ChannelStore.getChannel(channelId);
if (value != null && value.isForumLikeChannel()) {
binding = env0_0;
binding.readStateSnapshots = {};
binding.processForumChannel(value.guild_id, channelId);
function _isNativeReflectConstruct_57477() { // fn#57477, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7339:178, offset: 0x013e6aa6, size: 94 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
}
return (_isNativeReflectConstruct_57477_isNativeReflectConstruct = function() {
return !!result;
})();
}
}
function processForumChannel(a0, a1) { // fn#57485, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7339:967, owner: ForumPostAnalyticsManager.processForumChannel, offset: 0x013e6c96, size: 76 bytes, params: 3, frame: 14
var environment;
let value = environment.__proto__.__proto__;
const threadsForParent = ActiveThreadsStore.getThreadsForParent(a0, a1);
value = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
value = value.keys(threadsForParent);
value.forEach(_fun57486);
}
function _fun57480(a0) { // fn#57480, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7339:381, offset: 0x013e6b04, size: 68 bytes, params: 2, frame: 15
const ForumPostAnalyticsManager2 = ForumPostAnalyticsManager;
Inherits(ForumPostAnalyticsManager2, a0);
return CreateClass(ForumPostAnalyticsManager2, [{key: 'handleThreadCreate', value: value_57488}]);
function ForumPostAnalyticsManager(a0) { // fn#57481, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7339:393, offset: 0x013e6b48, size: 201 bytes, params: 2, frame: 20
var r0;
var Reflect;
let value = copyRestArgs(0, undefined);
let binding = env1_3;
binding(this, ForumPostAnalyticsManager);
const items2 = [];
arraySpread(items2, value, 0, items2);
value = env1_6(ForumPostAnalyticsManager);
binding = env1_5;
if (_isNativeReflectConstruct_57477()) {
Reflect = global.Reflect;
value = Reflect.construct(value, items2, env1_6(this).constructor);
r0 = value;
} else {
value = value.apply(this, items2);
r0 = value;
}
value = binding(this, r0);
value.readStateSnapshots = {};
value.actions = {CHANNEL_SELECT: CHANNEL_SELECT_57482, THREAD_CREATE: THREAD_CREATE_57483};
value.handleChannelSelect = handleChannelSelect_57484;
value.processForumChannel = processForumChannel;
value.getReadStateSnapshotAnalytics = getReadStateSnapshotAnalytics;
return value;
function ForumPostAnalyticsManagerCHANNEL_SELECT(a0) { // fn#57482, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7339:704, owner: ForumPostAnalyticsManager.CHANNEL_SELECT, offset: 0x013e6c11, size: 23 bytes, params: 2, frame: 11
return env0_0.handleChannelSelect(a0);
}
function getReadStateSnapshotAnalytics(a0) { // fn#57487, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7339:1154, owner: ForumPostAnalyticsManager.getReadStateSnapshotAnalytics, offset: 0x013e6d22, size: 22 bytes, params: 2, frame: 2
return env0_0.readStateSnapshots[a0];
}
function ForumPostAnalyticsManagerTHREAD_CREATE(a0) { // fn#57483, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7339:746, owner: ForumPostAnalyticsManager.THREAD_CREATE, offset: 0x013e6c28, size: 23 bytes, params: 2, frame: 11
return env0_0.handleThreadCreate(a0);
}
function ForumPostAnalyticsManagerHandleChannelSelect({channelId}) { // fn#57484, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7339:796, owner: ForumPostAnalyticsManager.handleChannelSelect, offset: 0x013e6c3f, size: 87 bytes, params: 2, frame: 13
var value;
var binding;
if (channelId != null) {
value = environment.__proto__.__proto__;
value = ChannelStore.getChannel(channelId);
if (value != null && value.isForumLikeChannel()) {
binding = env0_0;
binding.readStateSnapshots = {};
binding.processForumChannel(value.guild_id, channelId);
}
}
}
function processForumChannel(a0, a1) { // fn#57485, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7339:967, owner: ForumPostAnalyticsManager.processForumChannel, offset: 0x013e6c96, size: 76 bytes, params: 3, frame: 14
var environment;
let value = environment.__proto__.__proto__;
const threadsForParent = ActiveThreadsStore.getThreadsForParent(a0, a1);
value = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
value = value.keys(threadsForParent);
value.forEach(_fun57486);
function _fun57486(a0) { // fn#57486, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7339:1033, offset: 0x013e6ce2, size: 64 bytes, params: 2, frame: 12
var value2;
let value = environment.__proto__.__proto__.__proto__;
value = require(6899) /* metro dependency 6899: ForumUtils */;
value = value.getForumPostReadStatesById(a0);
if (value != null) {
value2 = environment.__proto__;
env1_0.readStateSnapshots[a0] = value;
}
}
}
function getReadStateSnapshotAnalytics(a0) { // fn#57487, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7339:1154, owner: ForumPostAnalyticsManager.getReadStateSnapshotAnalytics, offset: 0x013e6d22, size: 22 bytes, params: 2, frame: 2
return env0_0.readStateSnapshots[a0];
}
}
function value_57488({channel}) { // fn#57488, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7339:1282, offset: 0x013e6d38, size: 85 bytes, params: 2, frame: 12
var ownerId;
var value;
var readStateSnapshots;
var id;
if (channel.isForumPost()) {
ownerId = channel.ownerId;
value = environment.__proto__;
value = AuthenticationStore.getId();
readStateSnapshots = this.readStateSnapshots;
id = channel.id;
value = !(ownerId === value);
readStateSnapshots[id] = {isNew: value, hasUnreads: value};
}
}
function _fun57486(a0) { // fn#57486, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7339:1033, offset: 0x013e6ce2, size: 64 bytes, params: 2, frame: 12
var value2;
let value = environment.__proto__.__proto__.__proto__;
value = require(6899) /* metro dependency 6899: ForumUtils */;
value = value.getForumPostReadStatesById(a0);
if (value != null) {
value2 = environment.__proto__;
env1_0.readStateSnapshots[a0] = value;
}
}
global.__d(_fun57476, 7161, [6, 7, 15, 17, 18, 4790, 1226, 1379, 21, 6899, 4860,
2]) /* metro module 7161, dependencies: [6, 7, 15, 17, 18, 4790, 1226, 1379, 21, 6899, 4860, 2] */;
@@ -1,36 +1,43 @@
/* Metro module 7159; source: modules/forums/tracking/ForumSessionAnalyticsManager.tsx; dependencies: [6, 7, 491, 2] */
import ClassCallCheck from '../../../by-id/module-00006-ClassCallCheck.js'; /* Metro dependency 6 */
import CreateClass from '../../../by-id/module-00007-CreateClass.js'; /* Metro dependency 7 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun57461(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#57461, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7337:6, offset: 0x013e65d7, size: 161 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(6) /* metro dependency 6 */;
const env0_3 = importDefault(7) /* metro dependency 7 */;
let value = _fun57463();
value = new value();
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/forums/tracking/ForumSessionAnalyticsManager.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/forums/tracking/ForumSessionAnalyticsManager.tsx');
exports.default = value;
}
function createSessionData(a0) { // fn#57462, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7337:116, offset: 0x013e6678, size: 51 bytes, params: 2, frame: 12
const object2 = {channelId: a0};
object2.sessionId = (require(491) /* metro dependency 491 */).v4();
return object2;
}
function _fun57463() { // fn#57463, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7337:199, offset: 0x013e66ab, size: 55 bytes, params: 1, frame: 14
return env0_3(ForumSessionAnalyticsManager, [{key: 'getForumChannelSessionId', value: value_57465}]);
}
function value_57465(a0) { // fn#57465, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7337:338, offset: 0x013e66e2, size: 87 bytes, params: 2, frame: 12
var value;
if (this.session == null) {
value = environment.__proto__;
this.session = createSessionData(a0);
function createSessionData(a0) { // fn#57462, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7337:116, offset: 0x013e6678, size: 51 bytes, params: 2, frame: 12
const object = {channelId: a0};
object.sessionId = (require(491) /* metro dependency 491 */).v4();
return object;
}
if (this.session.channelId !== a0) {
value = environment.__proto__;
this.session = createSessionData(a0);
function _fun57463() { // fn#57463, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7337:199, offset: 0x013e66ab, size: 55 bytes, params: 1, frame: 14
return CreateClass(ForumSessionAnalyticsManager, [{key: 'getForumChannelSessionId', value: value_57465}]);
function ForumSessionAnalyticsManager() { // fn#57464, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7337:220, offset: 0x00c618a4, size: 27 bytes, params: 1, frame: 13
env1_2(this, ForumSessionAnalyticsManager);
}
function value_57465(a0) { // fn#57465, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7337:338, offset: 0x013e66e2, size: 87 bytes, params: 2, frame: 12
var value;
if (this.session == null) {
value = environment.__proto__;
this.session = createSessionData(a0);
}
if (this.session.channelId !== a0) {
value = environment.__proto__;
this.session = createSessionData(a0);
}
return this.session.sessionId;
}
}
return this.session.sessionId;
}
global.__d(_fun57461, 7159, [6, 7, 491, 2]) /* metro module 7159, dependencies: [6, 7, 491, 2] */;
+308 -307
View File
@@ -1,17 +1,24 @@
/* Metro module 7155; source: modules/forums/tracking/Tracking.tsx; dependencies: [1379, 4645, 6865, 7156, 661, 4863, 7157, 683, 7162, 477, 7163, 2] */
import AnalyticsUtils from '../../../utils/AnalyticsUtils.tsx'; /* Metro dependency 683 */
import ChannelStore from '../../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import DraftStore from '../../../stores/DraftStore.tsx'; /* Metro dependency 4645 */
import AppAnalyticsUtils from '../../app_analytics/AppAnalyticsUtils.tsx'; /* Metro dependency 4863 */
import ForumPostMessagesStore from '../ForumPostMessagesStore.tsx'; /* Metro dependency 6865 */
import ForumSearchStore from '../ForumSearchStore.tsx'; /* Metro dependency 7156 */
import TrackChannelOpenedClickstream from '../../app_analytics/track/channel_opened/trackChannelOpenedClickstream.tsx'; /* Metro dependency 7163 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
import * as DraftStoreModule from '../../../stores/DraftStore.tsx'; /* Metro dependency 4645 */
import * as AppAnalyticsUtilsModule from '../../app_analytics/AppAnalyticsUtils.tsx'; /* Metro dependency 4863 */
import * as TrackingUtilsModule from './TrackingUtils.tsx'; /* Metro dependency 7157 */
import * as ThreadAnalyticsUtilsModule from '../../app_analytics/ThreadAnalyticsUtils.tsx'; /* Metro dependency 7162 */
function _fun57354(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#57354, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7333:6, offset: 0x013e3d48, size: 504 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 draftStore = importDefault(4645) /* metro dependency 4645: DraftStore */;
let env0_5 = (require(4645) /* metro dependency 4645: DraftStore */).DraftType;
const forumPostMessagesStore = importDefault(6865) /* metro dependency 6865: ForumPostMessagesStore */;
const forumSearchStore = importDefault(7156) /* metro dependency 7156: ForumSearchStore */;
const constantsModule = require(661) /* metro dependency 661: Constants */;
const env0_8 = constantsModule.AnalyticEvents;
const env0_9 = constantsModule.AnalyticsSections;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/forums/tracking/Tracking.tsx');
let env0_5 = (DraftStoreModule).DraftType;
(FileImportTrackerModule).fileFinishedImporting('modules/forums/tracking/Tracking.tsx');
exports.trackForumChannelSeenBatch = trackForumChannelSeenBatch;
exports.trackForumSearched = trackForumSearched;
exports.trackForumSearchCleared = trackForumSearchCleared;
@@ -90,322 +97,316 @@ function _fun57354(global, require, importDefault, importAll, module, exports, d
location: {section: AnalyticsSections.CHANNEL_WELCOME_CTA}});
};
exports.trackForumCreateNewPostStarted = trackForumCreateNewPostStarted;
}
function trackForumChannelSeenBatch({guildId, channelId, sessionId, postIds, additionalTimes}) { // fn#57355, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7333:307, offset: 0x013e3f40, size: 167 bytes, params: 2, frame: 23
const defaultImport = AppAnalyticsUtils;
const trackWithMetadata = defaultImport.trackWithMetadata;
const FORUM_CHANNEL_SEEN_BATCH = AnalyticEvents.FORUM_CHANNEL_SEEN_BATCH;
const object = {};
copyDataProperties(object, TrackingUtilsModule.collectForumAnalyticsMetadata({channelId: channelId,
sessionId: sessionId}), undefined);
object['guild_id'] = guildId;
object['channel_id'] = channelId;
object['post_ids'] = postIds;
object['additional_seen_time_millis'] = additionalTimes;
Reflect.apply(trackWithMetadata, defaultImport, [FORUM_CHANNEL_SEEN_BATCH, object]);
}
function trackForumChannelSeenBatch({guildId, channelId, sessionId, postIds, additionalTimes}) { // fn#57355, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7333:307, offset: 0x013e3f40, size: 167 bytes, params: 2, frame: 23
const defaultImport = importDefault(4863) /* metro dependency 4863: AppAnalyticsUtils */;
const trackWithMetadata = defaultImport.trackWithMetadata;
const FORUM_CHANNEL_SEEN_BATCH = AnalyticEvents.FORUM_CHANNEL_SEEN_BATCH;
const object2 = {};
const trackingUtilsModule = require(7157) /* metro dependency 7157: TrackingUtils */;
copyDataProperties(object2, trackingUtilsModule.collectForumAnalyticsMetadata({channelId: channelId,
sessionId: sessionId}), undefined);
object2['guild_id'] = guildId;
object2['channel_id'] = channelId;
object2['post_ids'] = postIds;
object2['additional_seen_time_millis'] = additionalTimes;
Reflect.apply(trackWithMetadata, defaultImport, [FORUM_CHANNEL_SEEN_BATCH, object2]);
}
function trackForumSearched({guildId, channelId, numSearchResults}) { // fn#57356, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7333:619, offset: 0x013e3fe7, size: 139 bytes, params: 2, frame: 21
const defaultImport = AppAnalyticsUtils;
const trackWithMetadata = defaultImport.trackWithMetadata;
const FORUM_CHANNEL_SEARCHED = AnalyticEvents.FORUM_CHANNEL_SEARCHED;
const object = {};
copyDataProperties(object, TrackingUtilsModule.collectForumAnalyticsMetadata({channelId: channelId}), undefined);
object['guild_id'] = guildId;
object['channel_id'] = channelId;
object['num_search_results'] = numSearchResults;
Reflect.apply(trackWithMetadata, defaultImport, [FORUM_CHANNEL_SEARCHED, object]);
}
function trackForumSearched({guildId, channelId, numSearchResults}) { // fn#57356, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7333:619, offset: 0x013e3fe7, size: 139 bytes, params: 2, frame: 21
const defaultImport = importDefault(4863) /* metro dependency 4863: AppAnalyticsUtils */;
const trackWithMetadata = defaultImport.trackWithMetadata;
const FORUM_CHANNEL_SEARCHED = AnalyticEvents.FORUM_CHANNEL_SEARCHED;
const object2 = {};
const trackingUtilsModule = require(7157) /* metro dependency 7157: TrackingUtils */;
copyDataProperties(object2, trackingUtilsModule.collectForumAnalyticsMetadata({channelId: channelId}), undefined);
object2['guild_id'] = guildId;
object2['channel_id'] = channelId;
object2['num_search_results'] = numSearchResults;
Reflect.apply(trackWithMetadata, defaultImport, [FORUM_CHANNEL_SEARCHED, object2]);
}
function trackForumSearchCleared({guildId, channelId}) { // fn#57357, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7333:873, offset: 0x013e4072, size: 122 bytes, params: 2, frame: 20
const defaultImport = AppAnalyticsUtils;
const trackWithMetadata = defaultImport.trackWithMetadata;
const FORUM_CHANNEL_SEARCH_CLEARED = AnalyticEvents.FORUM_CHANNEL_SEARCH_CLEARED;
const object = {};
copyDataProperties(object, TrackingUtilsModule.collectForumAnalyticsMetadata({channelId: channelId}), undefined);
object['guild_id'] = guildId;
object['channel_id'] = channelId;
Reflect.apply(trackWithMetadata, defaultImport, [FORUM_CHANNEL_SEARCH_CLEARED, object]);
}
function trackForumSearchCleared({guildId, channelId}) { // fn#57357, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7333:873, offset: 0x013e4072, size: 122 bytes, params: 2, frame: 20
const defaultImport = importDefault(4863) /* metro dependency 4863: AppAnalyticsUtils */;
const trackWithMetadata = defaultImport.trackWithMetadata;
const FORUM_CHANNEL_SEARCH_CLEARED = AnalyticEvents.FORUM_CHANNEL_SEARCH_CLEARED;
const object2 = {};
const trackingUtilsModule = require(7157) /* metro dependency 7157: TrackingUtils */;
copyDataProperties(object2, trackingUtilsModule.collectForumAnalyticsMetadata({channelId: channelId}), undefined);
object2['guild_id'] = guildId;
object2['channel_id'] = channelId;
Reflect.apply(trackWithMetadata, defaultImport, [FORUM_CHANNEL_SEARCH_CLEARED, object2]);
}
function trackForumTagFilterClicked({guildId, channelId, tagId, filterTagIds, added, location}) { // fn#57358, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7333:1101, offset: 0x013e40ec, size: 185 bytes, params: 2, frame: 24
const defaultImport = AppAnalyticsUtils;
const trackWithMetadata = defaultImport.trackWithMetadata;
const FORUM_CHANNEL_TAG_FILTER_CLICKED = AnalyticEvents.FORUM_CHANNEL_TAG_FILTER_CLICKED;
const object = {};
copyDataProperties(object, TrackingUtilsModule.collectForumAnalyticsMetadata({channelId: channelId}), undefined);
object['guild_id'] = guildId;
object['channel_id'] = channelId;
object['tag_id'] = tagId;
object['filter_tag_ids'] = filterTagIds;
object['added'] = added;
object['location'] = location;
Reflect.apply(trackWithMetadata, defaultImport, [FORUM_CHANNEL_TAG_FILTER_CLICKED, object]);
}
function trackForumTagFilterClicked({guildId, channelId, tagId, filterTagIds, added, location}) { // fn#57358, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7333:1101, offset: 0x013e40ec, size: 185 bytes, params: 2, frame: 24
const defaultImport = importDefault(4863) /* metro dependency 4863: AppAnalyticsUtils */;
const trackWithMetadata = defaultImport.trackWithMetadata;
const FORUM_CHANNEL_TAG_FILTER_CLICKED = AnalyticEvents.FORUM_CHANNEL_TAG_FILTER_CLICKED;
const object2 = {};
const trackingUtilsModule = require(7157) /* metro dependency 7157: TrackingUtils */;
copyDataProperties(object2, trackingUtilsModule.collectForumAnalyticsMetadata({channelId: channelId}), undefined);
object2['guild_id'] = guildId;
object2['channel_id'] = channelId;
object2['tag_id'] = tagId;
object2['filter_tag_ids'] = filterTagIds;
object2['added'] = added;
object2['location'] = location;
Reflect.apply(trackWithMetadata, defaultImport, [FORUM_CHANNEL_TAG_FILTER_CLICKED, object2]);
}
function trackForumCreateNewPostClick({guildId, channelId}) { // fn#57359, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7333:1425, offset: 0x013e41a5, size: 122 bytes, params: 2, frame: 20
const defaultImport = AppAnalyticsUtils;
const trackWithMetadata = defaultImport.trackWithMetadata;
const FORUM_CHANNEL_CREATE_NEW_POST_CLICKED = AnalyticEvents.FORUM_CHANNEL_CREATE_NEW_POST_CLICKED;
const object = {};
copyDataProperties(object, TrackingUtilsModule.collectForumAnalyticsMetadata({channelId: channelId}), undefined);
object['guild_id'] = guildId;
object['channel_id'] = channelId;
Reflect.apply(trackWithMetadata, defaultImport, [FORUM_CHANNEL_CREATE_NEW_POST_CLICKED, object]);
}
function trackForumCreateNewPostClick({guildId, channelId}) { // fn#57359, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7333:1425, offset: 0x013e41a5, size: 122 bytes, params: 2, frame: 20
const defaultImport = importDefault(4863) /* metro dependency 4863: AppAnalyticsUtils */;
const trackWithMetadata = defaultImport.trackWithMetadata;
const FORUM_CHANNEL_CREATE_NEW_POST_CLICKED = AnalyticEvents.FORUM_CHANNEL_CREATE_NEW_POST_CLICKED;
const object2 = {};
const trackingUtilsModule = require(7157) /* metro dependency 7157: TrackingUtils */;
copyDataProperties(object2, trackingUtilsModule.collectForumAnalyticsMetadata({channelId: channelId}), undefined);
object2['guild_id'] = guildId;
object2['channel_id'] = channelId;
Reflect.apply(trackWithMetadata, defaultImport, [FORUM_CHANNEL_CREATE_NEW_POST_CLICKED, object2]);
}
function trackForumCreateNewPostKeybindUsed({guildId, channelId}) { // fn#57360, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7333:1675, offset: 0x013e421f, size: 122 bytes, params: 2, frame: 20
const defaultImport = AppAnalyticsUtils;
const trackWithMetadata = defaultImport.trackWithMetadata;
const FORUM_CHANNEL_CREATE_NEW_POST_KEYBIND_USED = AnalyticEvents.FORUM_CHANNEL_CREATE_NEW_POST_KEYBIND_USED;
const object = {};
copyDataProperties(object, TrackingUtilsModule.collectForumAnalyticsMetadata({channelId: channelId}), undefined);
object['guild_id'] = guildId;
object['channel_id'] = channelId;
Reflect.apply(trackWithMetadata, defaultImport, [FORUM_CHANNEL_CREATE_NEW_POST_KEYBIND_USED, object]);
}
function trackForumCreateNewPostKeybindUsed({guildId, channelId}) { // fn#57360, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7333:1675, offset: 0x013e421f, size: 122 bytes, params: 2, frame: 20
const defaultImport = importDefault(4863) /* metro dependency 4863: AppAnalyticsUtils */;
const trackWithMetadata = defaultImport.trackWithMetadata;
const FORUM_CHANNEL_CREATE_NEW_POST_KEYBIND_USED = AnalyticEvents.FORUM_CHANNEL_CREATE_NEW_POST_KEYBIND_USED;
const object2 = {};
const trackingUtilsModule = require(7157) /* metro dependency 7157: TrackingUtils */;
copyDataProperties(object2, trackingUtilsModule.collectForumAnalyticsMetadata({channelId: channelId}), undefined);
object2['guild_id'] = guildId;
object2['channel_id'] = channelId;
Reflect.apply(trackWithMetadata, defaultImport, [FORUM_CHANNEL_CREATE_NEW_POST_KEYBIND_USED, object2]);
}
function maybeTrackForumNewPostDraftCreated({guildId, channelId}) { // fn#57361, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7333:1936, offset: 0x013e4299, size: 466 bytes, params: 2, frame: 23
var r2;
var r0;
var r1;
var name;
var length;
var threadSettings;
var template;
var value4;
var value6;
var value13;
var value14;
var defaultImport;
var trackWithMetadata;
var FORUM_CHANNEL_NEW_POST_DRAFT_CREATED;
var object2;
var value;
const channel = ChannelStore.getChannel(channelId);
if (channel != null) {
threadSettings = DraftStore.getThreadSettings(channelId);
template = channel.template;
value4 = undefined;
r2 = template == null ? value4 : template.trim();
value6 = DraftStore.getDraft(channelId, DraftType.FirstThreadMessage);
r0 = value6 == null || value6.length === 0;
r0 = !r0 ? (value6 == null ? value4 : value6.trim()) === r2 : r0;
r2 = (threadSettings == null ? value4 : threadSettings.appliedTags) == null || (threadSettings == null || threadSettings.appliedTags == null ? value4 : threadSettings.appliedTags.size) === 0;
name = threadSettings == null ? value4 : threadSettings.name;
value13 = name == null;
if (value13) {
r1 = value13;
} else {
if (threadSettings == null) {
length = value4;
function maybeTrackForumNewPostDraftCreated({guildId, channelId}) { // fn#57361, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7333:1936, offset: 0x013e4299, size: 466 bytes, params: 2, frame: 23
var r2;
var r0;
var r1;
var name;
var length;
var draftStoreBinding;
var threadSettings;
var template;
var value4;
var value6;
var value13;
var value14;
var defaultImport;
var trackWithMetadata;
var FORUM_CHANNEL_NEW_POST_DRAFT_CREATED;
var object;
var value;
const channel = ChannelStore.getChannel(channelId);
if (channel != null) {
threadSettings = DraftStore.getThreadSettings(channelId);
template = channel.template;
value4 = undefined;
r2 = template == null ? value4 : template.trim();
draftStoreBinding = DraftStore;
value6 = draftStoreBinding.getDraft(channelId, DraftType.FirstThreadMessage);
r0 = value6 == null || value6.length === 0;
r0 = !r0 ? (value6 == null ? value4 : value6.trim()) === r2 : r0;
r2 = (threadSettings == null ? value4 : threadSettings.appliedTags) == null || (threadSettings == null || threadSettings.appliedTags == null ? value4 : threadSettings.appliedTags.size) === 0;
name = threadSettings == null ? value4 : threadSettings.name;
value13 = name == null;
if (value13) {
r1 = value13;
} else {
name = threadSettings.name;
if (name == null) {
if (threadSettings == null) {
length = value4;
} else {
value14 = name.trim();
length = value14 == null ? value4 : value14.length;
name = threadSettings.name;
if (name == null) {
length = value4;
} else {
value14 = name.trim();
length = value14 == null ? value4 : value14.length;
}
}
r1 = length === 0;
}
r0 = r0 && r2;
r0 = r0 && r1;
if (!r0) {
defaultImport = importDefault(4863) /* metro dependency 4863: AppAnalyticsUtils */;
trackWithMetadata = defaultImport.trackWithMetadata;
FORUM_CHANNEL_NEW_POST_DRAFT_CREATED = AnalyticEvents.FORUM_CHANNEL_NEW_POST_DRAFT_CREATED;
object = {};
value = require(7157) /* metro dependency 7157: TrackingUtils */;
copyDataProperties(object, value.collectForumAnalyticsMetadata({channelId: channelId}), undefined);
object['guild_id'] = guildId;
object['channel_id'] = channelId;
value = require(7157) /* metro dependency 7157: TrackingUtils */;
value = value.getForumPostDraftAppliedTagIds(channelId);
object['applied_tag_ids'] = value;
value = require(7157) /* metro dependency 7157: TrackingUtils */;
value = value.getForumPostDraftNumAttachments(channelId);
object['num_attachments'] = value;
Reflect.apply(trackWithMetadata, defaultImport, [FORUM_CHANNEL_NEW_POST_DRAFT_CREATED, object]);
}
r1 = length === 0;
}
r0 = r0 && r2;
r0 = r0 && r1;
if (!r0) {
defaultImport = importDefault(4863) /* metro dependency 4863: AppAnalyticsUtils */;
trackWithMetadata = defaultImport.trackWithMetadata;
FORUM_CHANNEL_NEW_POST_DRAFT_CREATED = AnalyticEvents.FORUM_CHANNEL_NEW_POST_DRAFT_CREATED;
object2 = {};
value = require(7157) /* metro dependency 7157: TrackingUtils */;
copyDataProperties(object2, value.collectForumAnalyticsMetadata({channelId: channelId}), undefined);
object2['guild_id'] = guildId;
object2['channel_id'] = channelId;
value = require(7157) /* metro dependency 7157: TrackingUtils */;
value = value.getForumPostDraftAppliedTagIds(channelId);
object2['applied_tag_ids'] = value;
value = require(7157) /* metro dependency 7157: TrackingUtils */;
value = value.getForumPostDraftNumAttachments(channelId);
object2['num_attachments'] = value;
Reflect.apply(trackWithMetadata, defaultImport, [FORUM_CHANNEL_NEW_POST_DRAFT_CREATED, object2]);
}
}
}
function trackForumNewPostCleared({guildId, channelId}) { // fn#57362, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7333:2702, offset: 0x013e446b, size: 122 bytes, params: 2, frame: 20
const defaultImport = importDefault(4863) /* metro dependency 4863: AppAnalyticsUtils */;
const trackWithMetadata = defaultImport.trackWithMetadata;
const FORUM_CHANNEL_NEW_POST_DRAFT_CLEARED = AnalyticEvents.FORUM_CHANNEL_NEW_POST_DRAFT_CLEARED;
const object2 = {};
const trackingUtilsModule = require(7157) /* metro dependency 7157: TrackingUtils */;
copyDataProperties(object2, trackingUtilsModule.collectForumAnalyticsMetadata({channelId: channelId}), undefined);
object2['guild_id'] = guildId;
object2['channel_id'] = channelId;
Reflect.apply(trackWithMetadata, defaultImport, [FORUM_CHANNEL_NEW_POST_DRAFT_CLEARED, object2]);
}
function trackForumPostCreated({guildId, channelId, postId, applicationId, voiceChatEnabled}) { // fn#57363, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7333:2934, offset: 0x013e44e5, size: 114 bytes, params: 2, frame: 14
if (ForumPostMessagesStore.isLoading(postId)) {
ForumPostMessagesStore.addConditionalChangeListener(_fun57365);
} else {
_trackForumPostCreated();
function trackForumNewPostCleared({guildId, channelId}) { // fn#57362, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7333:2702, offset: 0x013e446b, size: 122 bytes, params: 2, frame: 20
const defaultImport = AppAnalyticsUtils;
const trackWithMetadata = defaultImport.trackWithMetadata;
const FORUM_CHANNEL_NEW_POST_DRAFT_CLEARED = AnalyticEvents.FORUM_CHANNEL_NEW_POST_DRAFT_CLEARED;
const object = {};
copyDataProperties(object, TrackingUtilsModule.collectForumAnalyticsMetadata({channelId: channelId}), undefined);
object['guild_id'] = guildId;
object['channel_id'] = channelId;
Reflect.apply(trackWithMetadata, defaultImport, [FORUM_CHANNEL_NEW_POST_DRAFT_CLEARED, object]);
}
}
function trackForumScrolled({guildId, channelId}) { // fn#57366, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7333:3396, offset: 0x013e461f, size: 122 bytes, params: 2, frame: 20
const defaultImport = importDefault(4863) /* metro dependency 4863: AppAnalyticsUtils */;
const trackWithMetadata = defaultImport.trackWithMetadata;
const FORUM_CHANNEL_SCROLLED = AnalyticEvents.FORUM_CHANNEL_SCROLLED;
const object2 = {};
const trackingUtilsModule = require(7157) /* metro dependency 7157: TrackingUtils */;
copyDataProperties(object2, trackingUtilsModule.collectForumAnalyticsMetadata({channelId: channelId}), undefined);
object2['guild_id'] = guildId;
object2['channel_id'] = channelId;
Reflect.apply(trackWithMetadata, defaultImport, [FORUM_CHANNEL_SCROLLED, object2]);
}
function trackForumPostCreated({guildId, channelId, postId, applicationId, voiceChatEnabled}) { // fn#57363, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7333:2934, offset: 0x013e44e5, size: 114 bytes, params: 2, frame: 14
const _trackForumPostCreated2 = _trackForumPostCreated;
const forumPostMessagesStoreBinding = ForumPostMessagesStore;
if (forumPostMessagesStoreBinding.isLoading(postId)) {
ForumPostMessagesStore.addConditionalChangeListener(_fun57365);
} else {
_trackForumPostCreated2();
}
function _trackForumPostCreated() { // fn#57364, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7333:3034, owner: trackForumPostCreated._trackForumPostCreated, offset: 0x013e4557, size: 152 bytes, params: 1, frame: 19
let value = environment.__proto__;
const defaultImport = AppAnalyticsUtils;
const trackWithMetadata = defaultImport.trackWithMetadata;
const FORUM_CHANNEL_POST_CREATED = AnalyticEvents.FORUM_CHANNEL_POST_CREATED;
const object = {};
value = require(7157) /* metro dependency 7157: TrackingUtils */;
const collectForumPostAnalyticsMetadata = value.collectForumPostAnalyticsMetadata;
const postIdBinding = postId;
copyDataProperties(object, Reflect.apply(collectForumPostAnalyticsMetadata, value, [{channelId: postIdBinding}]),
postIdBinding);
object['guild_id'] = guildId;
object['channel_id'] = channelId;
object['application_id'] = applicationId;
object['voice_chat_enabled'] = voiceChatEnabled;
Reflect.apply(trackWithMetadata, defaultImport, [FORUM_CHANNEL_POST_CREATED, object]);
}
function trackForumMorePostsLoaded({guildId, channelId, numArchivedThreads, hasMoreThreads, filterTagIds, sortOrder}) { // fn#57367, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7333:3612, offset: 0x013e4699, size: 290 bytes, params: 2, frame: 27
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
const track = defaultImport.track;
const FORUM_CHANNEL_MORE_POSTS_LOADED = AnalyticEvents.FORUM_CHANNEL_MORE_POSTS_LOADED;
const object2 = {};
const appAnalyticsUtilsModule = require(4863) /* metro dependency 4863: AppAnalyticsUtils */;
copyDataProperties(object2, appAnalyticsUtilsModule.collectGuildAnalyticsMetadata(guildId), undefined);
const moduleValue2 = appAnalyticsUtilsModule;
const collectChannelAnalyticsMetadata = moduleValue2.collectChannelAnalyticsMetadata;
const getChannel = ChannelStore.getChannel;
copyDataProperties(object2, Reflect.apply(collectChannelAnalyticsMetadata, moduleValue2, [Reflect.apply(getChannel,
ChannelStore, [channelId])]), undefined);
let value = require(7157) /* metro dependency 7157: TrackingUtils */;
copyDataProperties(object2, value.collectForumAnalyticsMetadata({channelId: channelId}), undefined);
object2['guild_id'] = guildId;
object2['channel_id'] = channelId;
object2['num_archived_threads'] = numArchivedThreads;
value = require(7157) /* metro dependency 7157: TrackingUtils */;
value = value.getNumActiveThreads(guildId, channelId);
object2['num_active_threads'] = value;
object2['has_more_threads'] = hasMoreThreads;
object2['filter_tag_ids'] = filterTagIds;
object2['sort_order'] = sortOrder;
Reflect.apply(track, defaultImport, [FORUM_CHANNEL_MORE_POSTS_LOADED, object2]);
}
function _fun57365() { // fn#57365, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7333:3295, offset: 0x013e45ef, size: 48 bytes, params: 1, frame: 12
var r0;
const value = environment.__proto__;
const forumPostMessagesStoreBinding = ForumPostMessagesStore;
const isLoading2 = forumPostMessagesStoreBinding.isLoading(postId);
if (isLoading2) {
r0 = !!isLoading2;
} else {
_trackForumPostCreated();
r0 = false;
}
return r0;
}
function trackForumPostClicked({guildId, channelId, postId, location}) { // fn#57368, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7333:4121, offset: 0x013e47bb, size: 174 bytes, params: 2, frame: 22
const defaultImport = importDefault(4863) /* metro dependency 4863: AppAnalyticsUtils */;
const trackWithMetadata = defaultImport.trackWithMetadata;
const FORUM_CHANNEL_POST_CLICKED = AnalyticEvents.FORUM_CHANNEL_POST_CLICKED;
const object2 = {};
const trackingUtilsModule = require(7157) /* metro dependency 7157: TrackingUtils */;
copyDataProperties(object2, trackingUtilsModule.collectForumPostAnalyticsMetadata({channelId: postId}), postId);
object2['guild_id'] = guildId;
object2['channel_id'] = channelId;
object2['is_search_result'] = ForumSearchStore.getSearchResults(channelId) != null;
object2['location'] = location;
Reflect.apply(trackWithMetadata, defaultImport, [FORUM_CHANNEL_POST_CLICKED, object2]);
}
function trackForumSortOrderUpdated({guildId, channelId, sortOrder}) { // fn#57369, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7333:4425, offset: 0x013e4869, size: 179 bytes, params: 2, frame: 24
const defaultImport = importDefault(4863) /* metro dependency 4863: AppAnalyticsUtils */;
const trackWithMetadata = defaultImport.trackWithMetadata;
const FORUM_CHANNEL_POSTS_SORTED = AnalyticEvents.FORUM_CHANNEL_POSTS_SORTED;
const object2 = {};
let value = require(7157) /* metro dependency 7157: TrackingUtils */;
copyDataProperties(object2, value.collectForumAnalyticsMetadata({channelId: channelId}), undefined);
object2['guild_id'] = guildId;
object2['channel_id'] = channelId;
value = require(7157) /* metro dependency 7157: TrackingUtils */;
value = value.convertSortOrderToReadableString(sortOrder);
object2['sort_type'] = value;
object2['sort_order'] = sortOrder;
object2['forum_channel_sort_order'] = sortOrder;
Reflect.apply(trackWithMetadata, defaultImport, [FORUM_CHANNEL_POSTS_SORTED, object2]);
}
function trackForumLayoutUpdated({guildId, channelId, forumLayout}) { // fn#57370, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7333:4757, offset: 0x013e491c, size: 139 bytes, params: 2, frame: 21
const defaultImport = importDefault(4863) /* metro dependency 4863: AppAnalyticsUtils */;
const trackWithMetadata = defaultImport.trackWithMetadata;
const FORUM_CHANNEL_LAYOUT_UPDATED = AnalyticEvents.FORUM_CHANNEL_LAYOUT_UPDATED;
const object2 = {};
const trackingUtilsModule = require(7157) /* metro dependency 7157: TrackingUtils */;
copyDataProperties(object2, trackingUtilsModule.collectForumAnalyticsMetadata({channelId: channelId}), undefined);
object2['guild_id'] = guildId;
object2['channel_id'] = channelId;
object2['forum_channel_layout'] = forumLayout;
Reflect.apply(trackWithMetadata, defaultImport, [FORUM_CHANNEL_LAYOUT_UPDATED, object2]);
}
function trackForumPostSidebarViewed(a0) { // fn#57378, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7333:6168, offset: 0x013e4b61, size: 256 bytes, params: 2, frame: 22
const defaultImport = importDefault(4863) /* metro dependency 4863: AppAnalyticsUtils */;
const trackWithMetadata = defaultImport.trackWithMetadata;
const CHANNEL_OPENED = AnalyticEvents.CHANNEL_OPENED;
const object2 = {};
let value = require(4863) /* metro dependency 4863: AppAnalyticsUtils */;
copyDataProperties(object2, value.collectGuildAnalyticsMetadata(a0.guild_id), value);
const appAnalyticsUtilsModule = require(4863) /* metro dependency 4863: AppAnalyticsUtils */;
copyDataProperties(object2, appAnalyticsUtilsModule.collectChannelAnalyticsMetadata(a0), value);
value = require(7162) /* metro dependency 7162: ThreadAnalyticsUtils */;
copyDataProperties(object2, value.collectThreadMetadata(a0, true), value);
const moduleValue2 = appAnalyticsUtilsModule;
const getChannelOpenedMetadata = moduleValue2.getChannelOpenedMetadata;
copyDataProperties(object2, Reflect.apply(getChannelOpenedMetadata, moduleValue2, [a0.id]), value);
object2['channel_view'] = 'Split View';
value = require(477) /* metro dependency 477: PlatformUtils */;
value = value.getPlatform();
object2['platform'] = value;
Reflect.apply(trackWithMetadata, defaultImport, [CHANNEL_OPENED, object2]);
(importDefault(7163) /* metro dependency 7163: trackChannelOpenedClickstream */)({channelId: a0.id});
}
function trackForumCreateNewPostStarted({guildId, channelId}) { // fn#57382, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7333:7081, offset: 0x013e4d49, size: 130 bytes, params: 2, frame: 20
const defaultImport = importDefault(4863) /* metro dependency 4863: AppAnalyticsUtils */;
const trackWithMetadata = defaultImport.trackWithMetadata;
const THREAD_CREATION_STARTED = AnalyticEvents.THREAD_CREATION_STARTED;
const object2 = {};
const threadAnalyticsUtilsModule = require(7162) /* metro dependency 7162: ThreadAnalyticsUtils */;
const collectThreadMetadata = threadAnalyticsUtilsModule.collectThreadMetadata;
const getChannel = ChannelStore.getChannel;
copyDataProperties(object2, Reflect.apply(collectThreadMetadata, threadAnalyticsUtilsModule,
[Reflect.apply(getChannel, ChannelStore, [channelId])]), ChannelStore);
object2['channel_id'] = channelId;
object2['guild_id'] = guildId;
Reflect.apply(trackWithMetadata, defaultImport, [THREAD_CREATION_STARTED, object2]);
}
function _trackForumPostCreated() { // fn#57364, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7333:3034, owner: trackForumPostCreated._trackForumPostCreated, offset: 0x013e4557, size: 152 bytes, params: 1, frame: 19
let value = environment.__proto__;
const defaultImport = importDefault(4863) /* metro dependency 4863: AppAnalyticsUtils */;
const trackWithMetadata = defaultImport.trackWithMetadata;
const FORUM_CHANNEL_POST_CREATED = AnalyticEvents.FORUM_CHANNEL_POST_CREATED;
const object2 = {};
value = require(7157) /* metro dependency 7157: TrackingUtils */;
const collectForumPostAnalyticsMetadata = value.collectForumPostAnalyticsMetadata;
const postIdBinding = postId;
copyDataProperties(object2, Reflect.apply(collectForumPostAnalyticsMetadata, value, [{channelId: postIdBinding}]),
postIdBinding);
object2['guild_id'] = guildId;
object2['channel_id'] = channelId;
object2['application_id'] = applicationId;
object2['voice_chat_enabled'] = voiceChatEnabled;
Reflect.apply(trackWithMetadata, defaultImport, [FORUM_CHANNEL_POST_CREATED, object2]);
}
function _fun57365() { // fn#57365, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7333:3295, offset: 0x013e45ef, size: 48 bytes, params: 1, frame: 12
var r0;
const value = environment.__proto__;
const isLoading2 = ForumPostMessagesStore.isLoading(postId);
if (isLoading2) {
r0 = !!isLoading2;
} else {
_trackForumPostCreated();
r0 = false;
}
return r0;
function trackForumScrolled({guildId, channelId}) { // fn#57366, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7333:3396, offset: 0x013e461f, size: 122 bytes, params: 2, frame: 20
const defaultImport = AppAnalyticsUtils;
const trackWithMetadata = defaultImport.trackWithMetadata;
const FORUM_CHANNEL_SCROLLED = AnalyticEvents.FORUM_CHANNEL_SCROLLED;
const object = {};
copyDataProperties(object, TrackingUtilsModule.collectForumAnalyticsMetadata({channelId: channelId}), undefined);
object['guild_id'] = guildId;
object['channel_id'] = channelId;
Reflect.apply(trackWithMetadata, defaultImport, [FORUM_CHANNEL_SCROLLED, object]);
}
function trackForumMorePostsLoaded({guildId, channelId, numArchivedThreads, hasMoreThreads, filterTagIds, sortOrder}) { // fn#57367, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7333:3612, offset: 0x013e4699, size: 290 bytes, params: 2, frame: 27
const defaultImport = AnalyticsUtils;
const track = defaultImport.track;
const FORUM_CHANNEL_MORE_POSTS_LOADED = AnalyticEvents.FORUM_CHANNEL_MORE_POSTS_LOADED;
const object = {};
copyDataProperties(object, AppAnalyticsUtilsModule.collectGuildAnalyticsMetadata(guildId), undefined);
const collectChannelAnalyticsMetadata = AppAnalyticsUtilsModule.collectChannelAnalyticsMetadata;
const channelStoreBinding = ChannelStore;
const getChannel = channelStoreBinding.getChannel;
copyDataProperties(object, Reflect.apply(collectChannelAnalyticsMetadata, AppAnalyticsUtilsModule, [Reflect.apply(getChannel,
channelStoreBinding, [channelId])]), undefined);
let value = require(7157) /* metro dependency 7157: TrackingUtils */;
copyDataProperties(object, value.collectForumAnalyticsMetadata({channelId: channelId}), undefined);
object['guild_id'] = guildId;
object['channel_id'] = channelId;
object['num_archived_threads'] = numArchivedThreads;
value = require(7157) /* metro dependency 7157: TrackingUtils */;
value = value.getNumActiveThreads(guildId, channelId);
object['num_active_threads'] = value;
object['has_more_threads'] = hasMoreThreads;
object['filter_tag_ids'] = filterTagIds;
object['sort_order'] = sortOrder;
Reflect.apply(track, defaultImport, [FORUM_CHANNEL_MORE_POSTS_LOADED, object]);
}
function trackForumPostClicked({guildId, channelId, postId, location}) { // fn#57368, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7333:4121, offset: 0x013e47bb, size: 174 bytes, params: 2, frame: 22
const defaultImport = AppAnalyticsUtils;
const trackWithMetadata = defaultImport.trackWithMetadata;
const FORUM_CHANNEL_POST_CLICKED = AnalyticEvents.FORUM_CHANNEL_POST_CLICKED;
const object = {};
copyDataProperties(object, TrackingUtilsModule.collectForumPostAnalyticsMetadata({channelId: postId}), postId);
object['guild_id'] = guildId;
object['channel_id'] = channelId;
object['is_search_result'] = ForumSearchStore.getSearchResults(channelId) != null;
object['location'] = location;
Reflect.apply(trackWithMetadata, defaultImport, [FORUM_CHANNEL_POST_CLICKED, object]);
}
function trackForumSortOrderUpdated({guildId, channelId, sortOrder}) { // fn#57369, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7333:4425, offset: 0x013e4869, size: 179 bytes, params: 2, frame: 24
const defaultImport = AppAnalyticsUtils;
const trackWithMetadata = defaultImport.trackWithMetadata;
const FORUM_CHANNEL_POSTS_SORTED = AnalyticEvents.FORUM_CHANNEL_POSTS_SORTED;
const object = {};
let value = require(7157) /* metro dependency 7157: TrackingUtils */;
copyDataProperties(object, value.collectForumAnalyticsMetadata({channelId: channelId}), undefined);
object['guild_id'] = guildId;
object['channel_id'] = channelId;
value = require(7157) /* metro dependency 7157: TrackingUtils */;
value = value.convertSortOrderToReadableString(sortOrder);
object['sort_type'] = value;
object['sort_order'] = sortOrder;
object['forum_channel_sort_order'] = sortOrder;
Reflect.apply(trackWithMetadata, defaultImport, [FORUM_CHANNEL_POSTS_SORTED, object]);
}
function trackForumLayoutUpdated({guildId, channelId, forumLayout}) { // fn#57370, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7333:4757, offset: 0x013e491c, size: 139 bytes, params: 2, frame: 21
const defaultImport = AppAnalyticsUtils;
const trackWithMetadata = defaultImport.trackWithMetadata;
const FORUM_CHANNEL_LAYOUT_UPDATED = AnalyticEvents.FORUM_CHANNEL_LAYOUT_UPDATED;
const object = {};
copyDataProperties(object, TrackingUtilsModule.collectForumAnalyticsMetadata({channelId: channelId}), undefined);
object['guild_id'] = guildId;
object['channel_id'] = channelId;
object['forum_channel_layout'] = forumLayout;
Reflect.apply(trackWithMetadata, defaultImport, [FORUM_CHANNEL_LAYOUT_UPDATED, object]);
}
function trackForumPostSidebarViewed(a0) { // fn#57378, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7333:6168, offset: 0x013e4b61, size: 256 bytes, params: 2, frame: 22
const defaultImport = AppAnalyticsUtils;
const trackWithMetadata = defaultImport.trackWithMetadata;
const CHANNEL_OPENED = AnalyticEvents.CHANNEL_OPENED;
const object = {};
let value = AppAnalyticsUtilsModule;
copyDataProperties(object, value.collectGuildAnalyticsMetadata(a0.guild_id), value);
copyDataProperties(object, AppAnalyticsUtilsModule.collectChannelAnalyticsMetadata(a0), value);
value = require(7162) /* metro dependency 7162: ThreadAnalyticsUtils */;
copyDataProperties(object, value.collectThreadMetadata(a0, true), value);
const getChannelOpenedMetadata = AppAnalyticsUtilsModule.getChannelOpenedMetadata;
copyDataProperties(object, Reflect.apply(getChannelOpenedMetadata, AppAnalyticsUtilsModule, [a0.id]), value);
object['channel_view'] = 'Split View';
value = require(477) /* metro dependency 477: PlatformUtils */;
value = value.getPlatform();
object['platform'] = value;
Reflect.apply(trackWithMetadata, defaultImport, [CHANNEL_OPENED, object]);
(TrackChannelOpenedClickstream)({channelId: a0.id});
}
function trackForumCreateNewPostStarted({guildId, channelId}) { // fn#57382, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7333:7081, offset: 0x013e4d49, size: 130 bytes, params: 2, frame: 20
const defaultImport = AppAnalyticsUtils;
const trackWithMetadata = defaultImport.trackWithMetadata;
const THREAD_CREATION_STARTED = AnalyticEvents.THREAD_CREATION_STARTED;
const object = {};
const collectThreadMetadata = ThreadAnalyticsUtilsModule.collectThreadMetadata;
const channelStoreBinding = ChannelStore;
const getChannel = channelStoreBinding.getChannel;
copyDataProperties(object, Reflect.apply(collectThreadMetadata, ThreadAnalyticsUtilsModule,
[Reflect.apply(getChannel, channelStoreBinding, [channelId])]), channelStoreBinding);
object['channel_id'] = channelId;
object['guild_id'] = guildId;
Reflect.apply(trackWithMetadata, defaultImport, [THREAD_CREATION_STARTED, object]);
}
}
global.__d(_fun57354, 7155, [1379, 4645, 6865, 7156, 661, 4863, 7157, 683, 7162, 477, 7163,
2]) /* metro module 7155, dependencies: [1379, 4645, 6865, 7156, 661, 4863, 7157, 683, 7162, 477, 7163, 2] */;
+280 -260
View File
@@ -1,26 +1,30 @@
/* Metro module 7157; source: modules/forums/tracking/TrackingUtils.tsx; dependencies: [4790, 3786, 7158, 6898, 1379, 4645, 3784, 4644, 6865, 661, 1386, 1243, 7159, 1388, 7160, 21, 7161, 2] */
import ChannelStore from '../../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import PermissionStore from '../../../stores/PermissionStore.tsx'; /* Metro dependency 3784 */
import JoinedThreadsStore from '../../threads/JoinedThreadsStore.tsx'; /* Metro dependency 3786 */
import UploadAttachmentStore from '../../../stores/UploadAttachmentStore.tsx'; /* Metro dependency 4644 */
import DraftStore from '../../../stores/DraftStore.tsx'; /* Metro dependency 4645 */
import ActiveThreadsStore from '../../threads/ActiveThreadsStore.tsx'; /* Metro dependency 4790 */
import ForumPostMessagesStore from '../ForumPostMessagesStore.tsx'; /* Metro dependency 6865 */
import ThreadMessageStore from '../../threads/ThreadMessageStore.tsx'; /* Metro dependency 6898 */
import ThreadMembersStore from '../../threads/ThreadMembersStore.tsx'; /* Metro dependency 7158 */
import ForumSessionAnalyticsManager from './ForumSessionAnalyticsManager.tsx'; /* Metro dependency 7159 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
import * as ThreadConstantsModule from '../../threads/ThreadConstants.tsx'; /* Metro dependency 1243 */
import * as ChannelConstantsModule from '../../channel/ChannelConstants.tsx'; /* Metro dependency 1386 */
import * as ThreadSortOrderModule from '../../../external/discord_common/js/shared/shared-constants/ThreadSortOrder.tsx'; /* Metro dependency 1388 */
import * as DraftStoreModule from '../../../stores/DraftStore.tsx'; /* Metro dependency 4645 */
function _fun57405(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#57405, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7335:6, offset: 0x013e5341, size: 456 bytes, params: 8, frame: 22
const env0_0 = require;
const closure = getForumChannelSessionId;
const closure2 = getForumPostAttachmentMimetypes;
const closure3 = collectForumAnalyticsMetadata;
const getForumChannelSessionId2 = getForumChannelSessionId;
const getForumPostAttachmentMimetypes2 = getForumPostAttachmentMimetypes;
const collectForumAnalyticsMetadata2 = collectForumAnalyticsMetadata;
let Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const activeThreadsStore = importDefault(4790) /* metro dependency 4790: ActiveThreadsStore */;
const joinedThreadsStore = importDefault(3786) /* metro dependency 3786: JoinedThreadsStore */;
const threadMembersStore = importDefault(7158) /* metro dependency 7158: ThreadMembersStore */;
const threadMessageStore = importDefault(6898) /* metro dependency 6898: ThreadMessageStore */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const draftStore = importDefault(4645) /* metro dependency 4645: DraftStore */;
const env0_9 = (require(4645) /* metro dependency 4645: DraftStore */).DraftType;
const permissionStore = importDefault(3784) /* metro dependency 3784: PermissionStore */;
const uploadAttachmentStore = importDefault(4644) /* metro dependency 4644: UploadAttachmentStore */;
const forumPostMessagesStore = importDefault(6865) /* metro dependency 6865: ForumPostMessagesStore */;
const env0_13 = (require(661) /* metro dependency 661: Constants */).Permissions;
const env0_14 = (require(1386) /* metro dependency 1386: ChannelConstants */).ChannelFlags;
const env0_15 = (require(1243) /* metro dependency 1243: ThreadConstants */).ThreadSortOrderReadableForAnalytics;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/forums/tracking/TrackingUtils.tsx');
exports.getForumChannelSessionId = closure;
(FileImportTrackerModule).fileFinishedImporting('modules/forums/tracking/TrackingUtils.tsx');
exports.getForumChannelSessionId = getForumChannelSessionId2;
exports.convertSortOrderToReadableString = convertSortOrderToReadableString;
exports.getForumPostDraftNumAttachments = function(a0) {
return UploadAttachmentStore.getUploads(a0, DraftType.FirstThreadMessage).length;
@@ -30,269 +34,285 @@ function _fun57405(global, require, importDefault, importAll, module, exports, d
var Object = global.Object;
return Object.keys(ActiveThreadsStore.getThreadsForParent(a0, a1)).length;
};
exports.getForumPostAttachmentMimetypes = closure2;
exports.collectForumAnalyticsMetadata = closure3;
exports.getForumPostAttachmentMimetypes = getForumPostAttachmentMimetypes2;
exports.collectForumAnalyticsMetadata = collectForumAnalyticsMetadata2;
exports.collectForumPostAnalyticsMetadata = collectForumPostAnalyticsMetadata;
}
function getForumChannelSessionId(a0) { // fn#57406, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7335:299, offset: 0x013e5509, size: 41 bytes, params: 2, frame: 11
return (importDefault(7159) /* metro dependency 7159: ForumSessionAnalyticsManager */).getForumChannelSessionId(a0);
}
function getForumPostFirstMessage(a0) { // fn#57407, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7335:380, offset: 0x013e5532, size: 43 bytes, params: 2, frame: 11
const message = ForumPostMessagesStore.getMessage(a0);
return message.loaded ? message.firstMessage : null;
}
function getForumPostUniqueReactionCount(a0) { // fn#57408, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7335:483, offset: 0x013e555d, size: 41 bytes, params: 2, frame: 11
const forumPostFirstMessage = getForumPostFirstMessage(a0);
return forumPostFirstMessage == null ? 0 : forumPostFirstMessage.reactions.length;
}
function getForumPostReactionCount(a0) { // fn#57409, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7335:597, offset: 0x013e5586, size: 57 bytes, params: 2, frame: 14
var r0;
let value = getForumPostFirstMessage(a0);
const value2 = 0;
if (value == null) {
r0 = value2;
} else {
value = value.reactions.reduce(function(a0, a1) {
return a0 + a1.count;
}, value2);
r0 = value;
function getForumChannelSessionId(a0) { // fn#57406, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7335:299, offset: 0x013e5509, size: 41 bytes, params: 2, frame: 11
return (ForumSessionAnalyticsManager).getForumChannelSessionId(a0);
}
return r0;
}
function getForumPostAppliedTagIds(a0) { // fn#57411, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7335:727, offset: 0x013e55bf, size: 173 bytes, params: 2, frame: 16
const channel = ChannelStore.getChannel(a0);
if (channel == null) {
return [];
function getForumPostFirstMessage(a0) { // fn#57407, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7335:380, offset: 0x013e5532, size: 43 bytes, params: 2, frame: 11
const message = ForumPostMessagesStore.getMessage(a0);
return message.loaded ? message.firstMessage : null;
}
let value = ChannelStore.getChannel(channel.parent_id);
const value3 = undefined;
const availableTags = value == null ? value3 : value.availableTags;
if (value == null) {
return [];
}
if (availableTags == null) {
return [];
}
const Set = global.Set;
value = availableTags.map(function(a0) {
return a0.id;
});
const set = new Set();
const appliedTags = channel.appliedTags;
let r0 = appliedTags == null ? value3 : appliedTags.filter(_fun57413);
r0 = r0 ?? [];
return r0;
}
function getForumPostAttachmentMimetypes(a0) { // fn#57414, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7335:1014, offset: 0x013e566c, size: 54 bytes, params: 2, frame: 11
var r0;
let value = getForumPostFirstMessage(a0);
if (value == null) {
r0 = [];
} else {
value = value.attachments.map(function({content_type}) {
return content_type ?? 'unknown';
function getForumPostUniqueReactionCount(a0) { // fn#57408, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7335:483, offset: 0x013e555d, size: 41 bytes, params: 2, frame: 11
const forumPostFirstMessage = getForumPostFirstMessage(a0);
return forumPostFirstMessage == null ? 0 : forumPostFirstMessage.reactions.length;
}
function getForumPostReactionCount(a0) { // fn#57409, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7335:597, offset: 0x013e5586, size: 57 bytes, params: 2, frame: 14
var r0;
let value = getForumPostFirstMessage(a0);
const value2 = 0;
if (value == null) {
r0 = value2;
} else {
value = value.reactions.reduce(function(a0, a1) {
return a0 + a1.count;
}, value2);
r0 = value;
}
return r0;
}
function getForumPostAppliedTagIds(a0) { // fn#57411, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7335:727, offset: 0x013e55bf, size: 173 bytes, params: 2, frame: 16
const channel = ChannelStore.getChannel(a0);
if (channel == null) {
return [];
}
let value = ChannelStore.getChannel(channel.parent_id);
const value3 = undefined;
const availableTags = value == null ? value3 : value.availableTags;
if (value == null) {
return [];
}
if (availableTags == null) {
return [];
}
const Set = global.Set;
value = availableTags.map(function(a0) {
return a0.id;
});
r0 = value;
}
return r0;
}
const set = new Set();
const appliedTags = channel.appliedTags;
let r0 = appliedTags == null ? value3 : appliedTags.filter(_fun57413);
r0 = r0 ?? [];
return r0;
function _fun57413(a0) { // fn#57413, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7335:994, offset: 0x00e4010b, size: 22 bytes, params: 2, frame: 11
return env0_0.has(a0);
}
function collectForumAnalyticsMetadata({channelId, sessionId}) { // fn#57416, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7335:1186, offset: 0x013e56bd, size: 492 bytes, params: 2, frame: 21
var r6;
var r0;
var object2;
var defaultReactionEmoji;
var value6;
var availableTags;
var defaultImport2;
var getSortOrderAnalytics;
var id;
var getLayoutAnalytics;
var getTagSettingAnalytics;
var value;
const channel = ChannelStore.getChannel(channelId);
if (channel != null) {
if (channel.isForumLikeChannel()) {
object2 = {};
object2.forum_channel_has_guidelines = channel.topic != null && channel.topic.trim().length > 0;
defaultReactionEmoji = channel.defaultReactionEmoji;
value6 = undefined;
object2.forum_channel_default_emoji_reaction_id = defaultReactionEmoji == null ? value6 : defaultReactionEmoji.emojiId;
defaultReactionEmoji = channel.defaultReactionEmoji;
object2.forum_channel_default_emoji_reaction_name = defaultReactionEmoji == null ? value6 : defaultReactionEmoji.emojiName;
availableTags = channel.availableTags;
r6 = availableTags == null ? value6 : availableTags.map(function(a0) {
return a0.id;
}
function getForumPostAttachmentMimetypes(a0) { // fn#57414, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7335:1014, offset: 0x013e566c, size: 54 bytes, params: 2, frame: 11
var r0;
let value = getForumPostFirstMessage(a0);
if (value == null) {
r0 = [];
} else {
value = value.attachments.map(function({content_type}) {
return content_type ?? 'unknown';
});
r6 = r6 ?? [];
object2.forum_channel_available_tag_ids = r6;
object2.forum_channel_tag_required = channel.hasFlag(ChannelFlags.REQUIRE_TAG);
object2.forum_channel_can_create_post = PermissionStore.can(Permissions.SEND_MESSAGES, channel);
object2.forum_channel_filter_tag_ids = (importDefault(7160) /* metro dependency 7160: ForumChannelAnalyticsManager */).getFilterTagIdsAnalytics();
defaultImport2 = importDefault(7160) /* metro dependency 7160: ForumChannelAnalyticsManager */;
getSortOrderAnalytics = defaultImport2.getSortOrderAnalytics;
id = channel.id;
object2.forum_channel_sort_order = Reflect.apply(getSortOrderAnalytics, defaultImport2, [id]);
object2.forum_channel_session_id = sessionId ?? getForumChannelSessionId(channel.id);
value = importDefault(7160) /* metro dependency 7160: ForumChannelAnalyticsManager */;
getLayoutAnalytics = value.getLayoutAnalytics;
id = channel.id;
object2.forum_channel_layout = Reflect.apply(getLayoutAnalytics, value, [id]);
object2.forum_channel_default_sort_order = channel.defaultSortOrder;
value = importDefault(7160) /* metro dependency 7160: ForumChannelAnalyticsManager */;
getTagSettingAnalytics = value.getTagSettingAnalytics;
id = channel.id;
object2.forum_channel_tag_setting = Reflect.apply(getTagSettingAnalytics, value, [id]);
object2.forum_channel_default_layout = channel.defaultForumLayout;
object2.forum_channel_is_moderator_report_channel = channel.isModeratorReportChannel();
r0 = object2;
r0 = value;
}
return r0;
}
function collectForumAnalyticsMetadata({channelId, sessionId}) { // fn#57416, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7335:1186, offset: 0x013e56bd, size: 492 bytes, params: 2, frame: 21
var r6;
var r0;
var object;
var defaultReactionEmoji;
var value6;
var availableTags;
var permissionStoreBinding;
var defaultImport2;
var getSortOrderAnalytics;
var id;
var getLayoutAnalytics;
var getTagSettingAnalytics;
var value;
const channel = ChannelStore.getChannel(channelId);
if (channel != null) {
if (channel.isForumLikeChannel()) {
object = {};
object.forum_channel_has_guidelines = channel.topic != null && channel.topic.trim().length > 0;
defaultReactionEmoji = channel.defaultReactionEmoji;
value6 = undefined;
object.forum_channel_default_emoji_reaction_id = defaultReactionEmoji == null ? value6 : defaultReactionEmoji.emojiId;
defaultReactionEmoji = channel.defaultReactionEmoji;
object.forum_channel_default_emoji_reaction_name = defaultReactionEmoji == null ? value6 : defaultReactionEmoji.emojiName;
availableTags = channel.availableTags;
r6 = availableTags == null ? value6 : availableTags.map(function(a0) {
return a0.id;
});
r6 = r6 ?? [];
object.forum_channel_available_tag_ids = r6;
object.forum_channel_tag_required = channel.hasFlag(ChannelFlags.REQUIRE_TAG);
permissionStoreBinding = PermissionStore;
object.forum_channel_can_create_post = permissionStoreBinding.can(Permissions.SEND_MESSAGES, channel);
object.forum_channel_filter_tag_ids = (importDefault(7160) /* metro dependency 7160: ForumChannelAnalyticsManager */).getFilterTagIdsAnalytics();
defaultImport2 = importDefault(7160) /* metro dependency 7160: ForumChannelAnalyticsManager */;
getSortOrderAnalytics = defaultImport2.getSortOrderAnalytics;
id = channel.id;
object.forum_channel_sort_order = Reflect.apply(getSortOrderAnalytics, defaultImport2, [id]);
object.forum_channel_session_id = sessionId ?? getForumChannelSessionId(channel.id);
value = importDefault(7160) /* metro dependency 7160: ForumChannelAnalyticsManager */;
getLayoutAnalytics = value.getLayoutAnalytics;
id = channel.id;
object.forum_channel_layout = Reflect.apply(getLayoutAnalytics, value, [id]);
object.forum_channel_default_sort_order = channel.defaultSortOrder;
value = importDefault(7160) /* metro dependency 7160: ForumChannelAnalyticsManager */;
getTagSettingAnalytics = value.getTagSettingAnalytics;
id = channel.id;
object.forum_channel_tag_setting = Reflect.apply(getTagSettingAnalytics, value, [id]);
object.forum_channel_default_layout = channel.defaultForumLayout;
object.forum_channel_is_moderator_report_channel = channel.isModeratorReportChannel();
r0 = object;
} else {
r0 = null;
}
} else {
r0 = null;
}
} else {
r0 = null;
return r0;
}
return r0;
}
function convertSortOrderToReadableString(a0) { // fn#57418, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7335:2432, offset: 0x013e58a9, size: 153 bytes, params: 2, frame: 14
const ThreadSortOrder = (require(1388) /* metro dependency 1388: ThreadSortOrder */).ThreadSortOrder;
const CREATION_DATE = ThreadSortOrder.CREATION_DATE;
if (CREATION_DATE === a0) {
return ThreadSortOrderReadableForAnalytics.CREATION_DATE;
function convertSortOrderToReadableString(a0) { // fn#57418, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7335:2432, offset: 0x013e58a9, size: 153 bytes, params: 2, frame: 14
const ThreadSortOrder = (ThreadSortOrderModule).ThreadSortOrder;
const CREATION_DATE = ThreadSortOrder.CREATION_DATE;
if (CREATION_DATE === a0) {
return ThreadSortOrderReadableForAnalytics.CREATION_DATE;
}
const LATEST_ACTIVITY = ThreadSortOrder.LATEST_ACTIVITY;
if (LATEST_ACTIVITY === a0) {
return ThreadSortOrderReadableForAnalytics.LATEST_ACTIVITY;
}
const Error = global.Error;
const value = 'Unexpected sort order ' + a0;
const value2 = Object.create(Error.prototype, {constructor: {value: Error}});
const error = new Error();
throw error instanceof Object ? error : value2;
}
const LATEST_ACTIVITY = ThreadSortOrder.LATEST_ACTIVITY;
if (LATEST_ACTIVITY === a0) {
return ThreadSortOrderReadableForAnalytics.LATEST_ACTIVITY;
}
const Error = global.Error;
const value = 'Unexpected sort order ' + a0;
const value2 = Object.create(Error.prototype, {constructor: {value: Error}});
const error = new Error();
throw error instanceof Object ? error : value2;
}
function getForumPostDraftAppliedTagIds(a0) { // fn#57420, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7335:2844, offset: 0x013e5969, size: 234 bytes, params: 2, frame: 16
const channel = ChannelStore.getChannel(a0);
if (channel == null) {
return [];
}
const channel2 = ChannelStore.getChannel(channel.parent_id);
const value4 = undefined;
const availableTags = channel2 == null ? value4 : channel2.availableTags;
if (channel2 == null) {
return [];
}
if (availableTags == null) {
return [];
}
let value = DraftStore.getThreadSettings(a0);
const r3 = (value == null ? value4 : value.appliedTags) ?? new global.Set();
const Set = global.Set;
value = availableTags.map(function(a0) {
return a0.id;
});
const set = new Set();
const Array = global.Array;
return Array.from(r3).filter(_fun57422);
}
function getForumPostDraftAppliedTagIds(a0) { // fn#57420, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7335:2844, offset: 0x013e5969, size: 234 bytes, params: 2, frame: 16
const channel = ChannelStore.getChannel(a0);
if (channel == null) {
return [];
}
const channel2 = ChannelStore.getChannel(channel.parent_id);
const value4 = undefined;
const availableTags = channel2 == null ? value4 : channel2.availableTags;
if (channel2 == null) {
return [];
}
if (availableTags == null) {
return [];
}
let value = DraftStore.getThreadSettings(a0);
const r3 = (value == null ? value4 : value.appliedTags) ?? new global.Set();
const Set = global.Set;
value = availableTags.map(function(a0) {
return a0.id;
});
const set = new Set();
const Array = global.Array;
return Array.from(r3).filter(_fun57422);
function _fun57422(a0) { // fn#57422, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7335:3164, offset: 0x00e4010b, size: 22 bytes, params: 2, frame: 11
return env0_0.has(a0);
}
function collectForumPostAnalyticsMetadata({channelId, sessionId}) { // fn#57424, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7335:3454, offset: 0x013e5a85, size: 695 bytes, params: 2, frame: 21
var locked;
var r7;
var r1;
var value4;
var object2;
var collectForumAnalyticsMetadataBinding;
var id;
var value5;
var threadMetadata;
var defaultImport2;
var castChannelIdAsMessageId;
var getForumPostReactionCountBinding;
var getForumPostUniqueReactionCountBinding;
var getForumPostAppliedTagIdsBinding;
var defaultImport3;
var getReadStateSnapshotAnalytics;
var value15;
var defaultImport4;
var value16;
var hasJoined;
var getForumPostAttachmentMimetypesBinding;
const channel = ChannelStore.getChannel(channelId);
if (channel != null) {
if (channel.isForumPost()) {
value4 = ChannelStore.getChannel(channel.parent_id);
if (value4 != null) {
if (value4.isForumLikeChannel()) {
object2 = {};
collectForumAnalyticsMetadataBinding = collectForumAnalyticsMetadata;
id = value4.id;
value5 = undefined;
copyDataProperties(object2, collectForumAnalyticsMetadataBinding({channelId: id,
sessionId: sessionId}),
channelId);
object2['thread_approximate_member_count'] = ThreadMembersStore.getMemberCount(channelId);
object2['thread_approximate_message_count'] = ThreadMessageStore.getCount(channelId);
threadMetadata = channel.threadMetadata;
object2['thread_archived'] = (threadMetadata == null ? value5 : threadMetadata.archived) === true;
threadMetadata = channel.threadMetadata;
locked = threadMetadata == null ? value5 : threadMetadata.locked;
r7 = locked != null && locked;
object2['thread_locked'] = r7;
threadMetadata = channel.threadMetadata;
r7 = (threadMetadata == null ? value5 : threadMetadata.autoArchiveDuration) ?? 0;
object2['thread_auto_archive_duration_minutes'] = r7;
object2['thread_approximate_creation_date'] = (importDefault(21) /* metro dependency 21: SnowflakeUtils */).extractTimestamp(channelId);
id = channel.id;
object2['forum_post_id'] = id;
defaultImport2 = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
castChannelIdAsMessageId = defaultImport2.castChannelIdAsMessageId;
id = channel.id;
object2['forum_post_first_message_id'] = Reflect.apply(castChannelIdAsMessageId, defaultImport2,
[id]);
getForumPostReactionCountBinding = getForumPostReactionCount;
id = channel.id;
object2['forum_post_num_reactions'] = getForumPostReactionCountBinding(id);
getForumPostUniqueReactionCountBinding = getForumPostUniqueReactionCount;
id = channel.id;
object2['forum_post_num_unique_reactions'] = getForumPostUniqueReactionCountBinding(id);
getForumPostAppliedTagIdsBinding = getForumPostAppliedTagIds;
id = channel.id;
object2['forum_post_applied_tag_ids'] = getForumPostAppliedTagIdsBinding(id);
object2['forum_post_is_pinned'] = channel.hasFlag(ChannelFlags.PINNED);
defaultImport3 = importDefault(7161) /* metro dependency 7161: ForumPostAnalyticsManager */;
getReadStateSnapshotAnalytics = defaultImport3.getReadStateSnapshotAnalytics;
id = channel.id;
value15 = Reflect.apply(getReadStateSnapshotAnalytics, defaultImport3, [id]);
object2['forum_post_is_new'] = value15 == null ? value5 : value15.isNew;
defaultImport4 = importDefault(7161) /* metro dependency 7161: ForumPostAnalyticsManager */;
getReadStateSnapshotAnalytics = defaultImport4.getReadStateSnapshotAnalytics;
id = channel.id;
value16 = Reflect.apply(getReadStateSnapshotAnalytics, defaultImport4, [id]);
object2['forum_post_is_unread'] = value16 == null ? value5 : value16.hasUnreads;
hasJoined = JoinedThreadsStore.hasJoined;
id = channel.id;
object2['forum_post_is_following'] = Reflect.apply(hasJoined, JoinedThreadsStore, [id]);
getForumPostAttachmentMimetypesBinding = getForumPostAttachmentMimetypes;
id = channel.id;
object2['forum_post_attachment_mimetypes'] = getForumPostAttachmentMimetypesBinding(id);
r1 = object2;
}
function collectForumPostAnalyticsMetadata({channelId, sessionId}) { // fn#57424, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7335:3454, offset: 0x013e5a85, size: 695 bytes, params: 2, frame: 21
var locked;
var r7;
var r1;
var value4;
var object;
var collectForumAnalyticsMetadataBinding;
var id;
var value5;
var threadMetadata;
var defaultImport2;
var castChannelIdAsMessageId;
var getForumPostReactionCountBinding;
var getForumPostUniqueReactionCountBinding;
var getForumPostAppliedTagIdsBinding;
var defaultImport3;
var getReadStateSnapshotAnalytics;
var value15;
var defaultImport4;
var value16;
var joinedThreadsStoreBinding;
var hasJoined;
var getForumPostAttachmentMimetypesBinding;
const channel = ChannelStore.getChannel(channelId);
if (channel != null) {
if (channel.isForumPost()) {
channelStoreBinding = ChannelStore;
value4 = channelStoreBinding.getChannel(channel.parent_id);
if (value4 != null) {
if (value4.isForumLikeChannel()) {
object = {};
collectForumAnalyticsMetadataBinding = collectForumAnalyticsMetadata;
id = value4.id;
value5 = undefined;
copyDataProperties(object, collectForumAnalyticsMetadataBinding({channelId: id,
sessionId: sessionId}),
channelId);
object['thread_approximate_member_count'] = ThreadMembersStore.getMemberCount(channelId);
object['thread_approximate_message_count'] = ThreadMessageStore.getCount(channelId);
threadMetadata = channel.threadMetadata;
object['thread_archived'] = (threadMetadata == null ? value5 : threadMetadata.archived) === true;
threadMetadata = channel.threadMetadata;
locked = threadMetadata == null ? value5 : threadMetadata.locked;
r7 = locked != null && locked;
object['thread_locked'] = r7;
threadMetadata = channel.threadMetadata;
r7 = (threadMetadata == null ? value5 : threadMetadata.autoArchiveDuration) ?? 0;
object['thread_auto_archive_duration_minutes'] = r7;
object['thread_approximate_creation_date'] = (importDefault(21) /* metro dependency 21: SnowflakeUtils */).extractTimestamp(channelId);
id = channel.id;
object['forum_post_id'] = id;
defaultImport2 = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
castChannelIdAsMessageId = defaultImport2.castChannelIdAsMessageId;
id = channel.id;
object['forum_post_first_message_id'] = Reflect.apply(castChannelIdAsMessageId, defaultImport2,
[id]);
getForumPostReactionCountBinding = getForumPostReactionCount;
id = channel.id;
object['forum_post_num_reactions'] = getForumPostReactionCountBinding(id);
getForumPostUniqueReactionCountBinding = getForumPostUniqueReactionCount;
id = channel.id;
object['forum_post_num_unique_reactions'] = getForumPostUniqueReactionCountBinding(id);
getForumPostAppliedTagIdsBinding = getForumPostAppliedTagIds;
id = channel.id;
object['forum_post_applied_tag_ids'] = getForumPostAppliedTagIdsBinding(id);
object['forum_post_is_pinned'] = channel.hasFlag(ChannelFlags.PINNED);
defaultImport3 = importDefault(7161) /* metro dependency 7161: ForumPostAnalyticsManager */;
getReadStateSnapshotAnalytics = defaultImport3.getReadStateSnapshotAnalytics;
id = channel.id;
value15 = Reflect.apply(getReadStateSnapshotAnalytics, defaultImport3, [id]);
object['forum_post_is_new'] = value15 == null ? value5 : value15.isNew;
defaultImport4 = importDefault(7161) /* metro dependency 7161: ForumPostAnalyticsManager */;
getReadStateSnapshotAnalytics = defaultImport4.getReadStateSnapshotAnalytics;
id = channel.id;
value16 = Reflect.apply(getReadStateSnapshotAnalytics, defaultImport4, [id]);
object['forum_post_is_unread'] = value16 == null ? value5 : value16.hasUnreads;
joinedThreadsStoreBinding = JoinedThreadsStore;
hasJoined = joinedThreadsStoreBinding.hasJoined;
id = channel.id;
object['forum_post_is_following'] = Reflect.apply(hasJoined, joinedThreadsStoreBinding, [id]);
getForumPostAttachmentMimetypesBinding = getForumPostAttachmentMimetypes;
id = channel.id;
object['forum_post_attachment_mimetypes'] = getForumPostAttachmentMimetypesBinding(id);
r1 = object;
} else {
r1 = null;
}
} else {
r1 = null;
}
} else {
r1 = null;
return r1;
}
return r1;
}
return null;
}
return null;
}
global.__d(_fun57405, 7157, [4790, 3786, 7158, 6898, 1379, 4645, 3784, 4644, 6865, 661, 1386, 1243, 7159, 1388,
7160, 21, 7161,
2]) /* metro module 7157, dependencies: [4790, 3786, 7158, 6898, 1379, 4645, 3784, 4644, 6865, 661, 1386, 1243, 7159, 1388, 7160, 21, 7161, 2] */;