Initial commit

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

No files matched your search

+39
View File
@@ -0,0 +1,39 @@
/* Metro module 9868; source: modules/summaries/Summary.tsx; dependencies: [2] */
function _fun77440(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#77440, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10054:6, offset: 0x01dfc1cd, size: 187 bytes, params: 8, frame: 17
var object3;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
object3 = {SOURCE_0: 0};
object3[0] = 'SOURCE_0';
object3.SOURCE_1 = 1;
object3[1] = 'SOURCE_1';
const object4 = {UNSET: 0};
object4[0] = 'UNSET';
object4.SOURCE_1 = 1;
object4[1] = 'SOURCE_1';
object4.SOURCE_2 = 2;
object4[2] = 'SOURCE_2';
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/summaries/Summary.tsx');
exports.SummarySources = object3;
exports.SummaryType = object4;
exports.createSummaryFromServer = createSummaryFromServer;
}
function createSummaryFromServer({id, topic, summ_short, people, start_id, end_id, count, source, type}, a1) { // fn#77441, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10054:405, offset: 0x01dfc288, size: 153 bytes, params: 3, frame: 15
const object2 = {};
object2.id = id;
object2.topic = topic;
object2.summShort = summ_short;
const Array = global.Array;
const from = Array.from;
const Set = global.Set;
object2.people = Reflect.apply(from, Array, [new Set(people)]);
object2.startId = start_id;
object2.endId = end_id;
object2.count = count;
object2.channelId = a1;
object2.source = source;
object2.type = type;
return object2;
}
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,50 @@
/* Metro module 9866; source: modules/summaries/SummaryConstants.tsx; dependencies: [672, 1244, 2] */
function _fun77431(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#77431, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10052:6, offset: 0x01dfbb6b, size: 311 bytes, params: 8, frame: 20
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const Millis = (importDefault(672) /* metro dependency 672: Durations */).Millis;
const SECOND = Millis.SECOND;
const value = 5 * SECOND;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/summaries/SummaryConstants.tsx');
exports.SUMMARY_POLL_INTERVAL = value;
exports.SummariesSidebarToggledSource = {TOOLBAR_BUTTON: 'toolbar button', PILL: 'pill'};
exports.SummariesTopicClickedSource = {SIDEBAR: 'sidebar', PILL_DROPDOWN: 'pill dropdown',
PILL_NEXT_ARROW: 'pill next arrow', PILL_PREVIOUS_ARROW: 'pill previous arrow'};
exports.SummaryFeedbackReasons = {DUPLICATED: 'DUPLICATED', TOO_GENERIC: 'TOO_GENERIC', TOO_MANY: 'TOO_MANY',
INACCURATE: 'INACCURATE', NOT_USEFUL: 'NOT_USEFUL', OTHER: 'OTHER'};
exports.getSummaryFeedbackReasons = getSummaryFeedbackReasons;
}
function getSummaryFeedbackReasons() { // fn#77432, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10052:749, offset: 0x01dfbca2, size: 422 bytes, params: 1, frame: 18
let object2 = {};
const binding = env0_2;
const DUPLICATED = binding.DUPLICATED;
object2.value = DUPLICATED;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
object2.label = Reflect.apply(string, intl, [t.wwXl5h]);
const items2 = [object2];
object2 = {};
const TOO_GENERIC = binding.TOO_GENERIC;
object2.value = TOO_GENERIC;
object2.label = intl.string(t['t+6knu']);
items2[1] = object2;
const TOO_MANY = binding.TOO_MANY;
items2[2] = {value: TOO_MANY, label: intl.string(t.xnKDnv)};
const INACCURATE = binding.INACCURATE;
string = intl.string;
const JW5VFj = t.JW5VFj;
items2[3] = {value: INACCURATE, label: Reflect.apply(string, intl, [JW5VFj])};
const NOT_USEFUL = binding.NOT_USEFUL;
string = intl.string;
const ZtCNiY = t.ZtCNiY;
items2[4] = {value: NOT_USEFUL, label: Reflect.apply(string, intl, [ZtCNiY])};
const OTHER = binding.OTHER;
string = intl.string;
const BufsKk = t.BufsKk;
items2[5] = {value: OTHER, label: Reflect.apply(string, intl, [BufsKk])};
return items2;
}
+766
View File
@@ -0,0 +1,766 @@
/* Metro module 9865; source: modules/summaries/SummaryStore.tsx; dependencies: [57, 153, 6, 7, 15, 17, 18, 4107, 7233, 1379, 1867, 4605, 1934, 4864, 1878, 9866, 7234, 21, 672, 9867, 566, 694, 9868, 22, 2] */
function _fun77360(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#77360, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10051:6, offset: 0x01dfa2a7, size: 816 bytes, params: 8, frame: 19
const env0_0 = require;
const handleQuickSwitcherUpdate = function() {
env0_29 = QuickSwitcherStore.getProps().results.filter(_fun77365).map(_fun77366);
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
importDefault(153) /* metro dependency 153 */;
const env0_4 = importDefault(6) /* metro dependency 6 */;
const env0_5 = importDefault(7) /* metro dependency 7 */;
const env0_6 = importDefault(15) /* metro dependency 15 */;
const env0_7 = importDefault(17) /* metro dependency 17 */;
const env0_8 = importDefault(18) /* metro dependency 18 */;
const experimentStore = importDefault(4107) /* metro dependency 4107: ExperimentStore */;
const quickSwitcherStore = importDefault(7233) /* metro dependency 7233: QuickSwitcherStore */;
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 selectedChannelStore = importDefault(1934) /* metro dependency 1934: SelectedChannelStore */;
const userGuildSettingsStore = importDefault(4864) /* metro dependency 4864: UserGuildSettingsStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const env0_17 = (require(9866) /* metro dependency 9866: SummaryConstants */).SUMMARY_POLL_INTERVAL;
let env0_23 = {};
let env0_24 = {};
const env0_25 = {};
const env0_26 = [];
const env0_27 = {};
const object = {'status': null, 'lastRequest': null, 'lastResponse': null};
const OK = ({FETCHING: 'fetching', OK: 'ok', ERROR: 'error'}).OK;
object.status = OK;
let env0_29 = [];
const env0_30 = [];
const PersistedStore = (importDefault(566) /* metro dependency 566: flux */).PersistedStore;
let value = _fun77367(PersistedStore);
value.persistKey = 'SummaryStore';
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */, {CONNECTION_OPEN: function() {
return false;
}, CHANNEL_SELECT: CHANNEL_SELECT_77394, TOGGLE_TOPICS_BAR: TOGGLE_TOPICS_BAR,
RECEIVE_CHANNEL_SUMMARY: RECEIVE_CHANNEL_SUMMARY, REQUEST_CHANNEL_SUMMARY: REQUEST_CHANNEL_SUMMARY,
RECEIVE_CHANNEL_SUMMARIES: RECEIVE_CHANNEL_SUMMARIES, REQUEST_CHANNEL_SUMMARIES: REQUEST_CHANNEL_SUMMARIES,
SET_HIGHLIGHTED_SUMMARY: SET_HIGHLIGHTED_SUMMARY, UPDATE_VISIBLE_MESSAGES: UPDATE_VISIBLE_MESSAGES,
SET_SELECTED_SUMMARY: SET_SELECTED_SUMMARY, SET_SUMMARY_FEEDBACK: SET_SUMMARY_FEEDBACK,
REQUEST_CHANNEL_AFFINITIES: REQUEST_CHANNEL_AFFINITIES, RECEIVE_CHANNEL_AFFINITIES: RECEIVE_CHANNEL_AFFINITIES,
REQUEST_CHANNEL_SUMMARIES_BULK: REQUEST_CHANNEL_SUMMARIES_BULK,
RECEIVE_CHANNEL_SUMMARIES_BULK: RECEIVE_CHANNEL_SUMMARIES_BULK,
CONVERSATION_SUMMARY_UPDATE: CONVERSATION_SUMMARY_UPDATE, CLEAR_CONVERSATION_SUMMARIES: function() {
env0_23 = {};
env0_24 = {};
}, DELETE_SUMMARY: DELETE_SUMMARY});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/summaries/SummaryStore.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_77361() { // fn#77361, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10051:287, offset: 0x01dfa5d7, 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_77361_isNativeReflectConstruct = function() {
return !!result;
})();
}
function handleQuickSwitcherUpdate() { // fn#77364, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10051:657, offset: 0x01dfa639, size: 67 bytes, params: 1, frame: 13
const getProps = QuickSwitcherStore.getProps;
env0_29 = Reflect.apply(getProps, QuickSwitcherStore, []).results.filter(_fun77365).map(function(a0) {
return a0.record.id;
});
}
function _fun77367(a0) { // fn#77367, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10051:833, offset: 0x01dfa6d3, size: 513 bytes, params: 2, frame: 16
const closure = SummaryStore;
env0_8(closure, a0);
return env0_5(closure, [{key: 'getState', value: value_77369}, {key: 'initialize', value: function(a0) {
var r1;
var value = undefined;
r1 = a0 == null ? value : a0.shouldShowTopicsBar;
env1_18 = r1 == null || r1;
this.waitFor(ChannelStore, ExperimentStore, GuildStore, QuickSwitcherStore, ReadStateStore,
SelectedChannelStore,
UserGuildSettingsStore, UserStore);
this.syncWith([QuickSwitcherStore], handleQuickSwitcherUpdate);
return value;
}}, {key: 'allSummaries', value: value_77371}, {key: 'topSummaries', value: value_77372}, {key: 'summaries',
value: value_77375}, {key: 'shouldShowTopicsBar', value: value_77376}, {key: 'findSummary', value: function(a0,
a1) {
var env0_0 = a1;
var value = this.summaries(a0);
value = value.find(_fun77378);
var value2 = null;
return value2 != value ? value : value2;
}}, {key: 'selectedSummary', value: value_77379}, {key: 'summaryFeedback', value: value_77380}, {key: 'isFetching',
value: value_77381}, {key: 'status', value: value_77382}, {key: 'shouldFetch', value: value_77383},
{key: 'channelAffinities', value: value_77384}, {key: 'channelAffinitiesById', value: value_77385},
{key: 'channelAffinitiesStatus', value: value_77386}, {key: 'shouldFetchChannelAffinities', value: value_77387},
{key: 'defaultChannelIds', value: value_77388}, {key: 'visibleSummaryIndex', value: value_77392}]);
}
function CHANNEL_SELECT_77394({channelId}) { // fn#77394, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10051:3594, offset: 0x01dfaeab, size: 43 bytes, params: 2, frame: 7
const channelId = env0_21?.channelId;
if (channelId === channelId) {
}
}
function TOGGLE_TOPICS_BAR() { // fn#77395, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10051:3678, offset: 0x01dfaed6, size: 18 bytes, params: 1, frame: 2
result = !env0_18;
}
function RECEIVE_CHANNEL_SUMMARY({summary, channelId, error, receivedAt}) { // fn#77396, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10051:3704, offset: 0x01dfaee8, size: 277 bytes, params: 2, frame: 22
var r12;
var r9;
var Object;
var length;
var value;
var summaryFromServer;
var object;
var index;
if (summary != null) {
Object = global.Object;
length = Object.keys(summary).length;
value = 0;
if (length > value) {
summaryFromServer = require(dependencyMap[22]).createSummaryFromServer(summary, channelId);
r9 = env0_23[channelId] ?? [];
object = [];
arraySpread(object, r9, value, dependencyMap);
index = object.findIndex(_fun77397);
if (index > -1) {
object[index] = summaryFromServer;
} else {
object.push(summaryFromServer);
}
env0_23[channelId] = object;
r12 = value;
}
}
object = {};
copyDataProperties(object, env0_24[channelId] ?? ({fetching: false}), r12);
object['summaryId'] = undefined;
object['summaryIdLastReceivedAt'] = receivedAt;
object['summaryIdError'] = error;
env0_24[channelId] = object;
}
function REQUEST_CHANNEL_SUMMARY({channelId, summaryId, requestedAt}) { // fn#77398, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10051:4078, offset: 0x01dfb026, size: 89 bytes, params: 2, frame: 17
var r7;
var r3;
var value;
const binding = env0_24;
const object2 = {};
const property = binding[channelId];
if (property != null) {
r3 = property;
} else {
value = false;
r3 = {fetching: value};
r7 = value;
}
copyDataProperties(object2, r3, r7);
object2['summaryId'] = summaryId;
object2['summaryIdLastRequestedAt'] = requestedAt;
binding[channelId] = object2;
}
function RECEIVE_CHANNEL_SUMMARIES({summaries, channelId, error, receivedAt}) { // fn#77399, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10051:4230, offset: 0x01dfb07f, size: 285 bytes, params: 2, frame: 20
var value3;
let value = summaries.filter(function(a0) {
var property = global.Object;
property = property.keys(a0).length;
return property > 0;
});
value = value.map(_fun77401);
if (env0_21 != null) {
if (env0_21.channelId === channelId) {
if (!value.some(_fun77402)) {
value3 = (env0_23[channelId] ?? []).find(_fun77403);
if (value3 != null) {
value.push(value3);
}
}
}
}
const binding = env0_23;
const value4 = (require(22) /* metro dependency 22 */).sortBy(value, _fun77404);
binding[channelId] = value4.reverse();
const object2 = {};
copyDataProperties(object2, env0_24[channelId], value);
object2['fetching'] = false;
object2['error'] = undefined;
object2['lastReceivedAt'] = receivedAt;
if (error != null) {
object2.error = error;
}
env0_24[channelId] = object2;
}
function REQUEST_CHANNEL_SUMMARIES(a0) { // fn#77405, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10051:4774, offset: 0x01dfb244, size: 84 bytes, params: 2, frame: 15
const binding = env0_24;
const channelId = a0.channelId;
const object2 = {};
copyDataProperties(object2, env0_24[a0.channelId] ?? ({}), null);
object2['fetching'] = true;
object2['lastRequestedAt'] = a0.requestedAt;
binding[channelId] = object2;
}
function SET_HIGHLIGHTED_SUMMARY(a0) { // fn#77406, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10051:4902, offset: 0x01dfb298, size: 240 bytes, params: 2, frame: 17
var channelId;
var r4;
var channelId2;
var binding;
var value3;
var summaryId2;
var property;
var index;
const value2 = null;
if (value2 != env0_19) {
channelId2 = a0.channelId;
binding = env0_19;
value3 = undefined;
channelId = value2 == binding ? value3 : binding.channelId;
if (channelId2 !== channelId) {
r4 = value2 != a0.channelId ? {channelId: a0.channelId,
summaryId: value2 != a0.summaryId ? a0.summaryId : value2} : value2;
env0_19 = r4;
if (value2 != r4) {
if (env0_19.channelId === a0.channelId) {
if (value2 != env0_19.summaryId) {
property = env0_23[env0_19.channelId];
if (value2 != property) {
index = property.findIndex(_fun77407);
}
}
}
}
return value3;
}
summaryId2 = a0.summaryId;
binding = env0_19;
if (summaryId2 === (value2 == binding ? value3 : binding.summaryId)) {
return false;
}
channelId = a0.channelId;
r4 = value2 != channelId ? {channelId: a0.channelId,
summaryId: value2 != a0.summaryId ? a0.summaryId : value2} : value2;
} else {
if (value2 == a0.channelId) {
return false;
}
channelId2 = a0.channelId;
binding = env0_19;
value3 = undefined;
if (channelId2 !== (value2 == binding ? value3 : binding.channelId)) {
r4 = value2 != a0.channelId ? {channelId: a0.channelId,
summaryId: value2 != a0.summaryId ? a0.summaryId : value2} : value2;
env0_19 = r4;
if (value2 != r4) {
if (env0_19.channelId === a0.channelId) {
if (value2 != env0_19.summaryId) {
property = env0_23[env0_19.channelId];
if (value2 != property) {
index = property.findIndex(_fun77407);
}
}
}
}
return value3;
}
summaryId2 = a0.summaryId;
binding = env0_19;
if (summaryId2 === (value2 == binding ? value3 : binding.summaryId)) {
return false;
}
r4 = value2 != a0.channelId ? {channelId: a0.channelId,
summaryId: value2 != a0.summaryId ? a0.summaryId : value2} : value2;
}
env0_19 = r4;
if (value2 != r4) {
if (env0_19.channelId === a0.channelId) {
if (value2 != env0_19.summaryId) {
property = env0_23[env0_19.channelId];
if (value2 != property) {
index = property.findIndex(_fun77407);
}
}
}
}
return value3;
}
function UPDATE_VISIBLE_MESSAGES(a0) { // fn#77408, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10051:5344, offset: 0x01dfb3ae, size: 163 bytes, params: 2, frame: 15
var property;
var index;
var index2;
const env0_0 = a0;
const channelId = SelectedChannelStore.getChannelId();
if (channelId != null) {
if (env0_19 == null) {
property = env0_23[channelId];
if (property != null) {
index = property.findIndex(_fun77410);
}
} else if (env0_19.channelId !== channelId) {
property = env0_23[channelId];
if (property != null) {
index = property.findIndex(_fun77410);
}
} else if (env0_19.summaryId != null) {
property = env0_23[env0_19.channelId];
if (property != null) {
index2 = property.findIndex(_fun77409);
}
} else {
property = env0_23[channelId];
if (property != null) {
index = property.findIndex(_fun77410);
}
}
}
}
function SET_SELECTED_SUMMARY(a0) { // fn#77411, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10051:5760, offset: 0x01dfb493, size: 119 bytes, params: 2, frame: 10
var summaryId;
var r1;
var r0;
var binding;
var value3;
var object2;
const channelId2 = a0.channelId;
const value = null;
if (value == channelId2) {
r0 = value;
} else {
binding = env0_21;
value3 = undefined;
r1 = channelId2 !== (value == binding ? value3 : binding.channelId) || a0.summaryId !== (value == env0_21 ? value3 : env0_21.summaryId);
if (r1) {
object2 = {channelId: channelId2};
summaryId = a0.summaryId;
object2.summaryId = value != summaryId ? summaryId : value;
r1 = value3;
}
r0 = r1;
}
return r0;
}
function SET_SUMMARY_FEEDBACK({summary, rating}) { // fn#77412, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10051:5978, offset: 0x01dfb50a, size: 59 bytes, params: 2, frame: 4
if (rating != null) {
env0_25[summary.id] = rating;
} else {
delete env0_25[summary.id];
}
}
function REQUEST_CHANNEL_AFFINITIES() { // fn#77413, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10051:6055, offset: 0x01dfb545, size: 71 bytes, params: 1, frame: 13
const object2 = {};
copyDataProperties(object2, env0_28, undefined);
const FETCHING = env0_22.FETCHING;
object2['status'] = FETCHING;
const Date = global.Date;
object2['lastRequest'] = Date.now();
}
function RECEIVE_CHANNEL_AFFINITIES({affinities, error}) { // fn#77414, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10051:6135, offset: 0x01dfb58c, size: 232 bytes, params: 2, frame: 17
var object;
if (error != null) {
env0_26 = [];
env0_27 = {};
object = {};
copyDataProperties(object, env0_28, affinities);
object['status'] = env0_22.ERROR;
object['lastResponse'] = global.Date.now();
env0_28 = object;
} else {
if (affinities == null) {
object = [];
}
if (affinities?.reduce(function(a0, a1) {
a0[a1.channel_id] = a1.affinity;
return a0;
}, {}) == null) {
object = {};
}
object = {};
copyDataProperties(object, env0_28, affinities);
var OK = env0_22.OK;
object['status'] = OK;
object['lastResponse'] = global.Date.now();
}
}
function REQUEST_CHANNEL_SUMMARIES_BULK({channelIds, requestedAt}) { // fn#77416, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10051:6420, offset: 0x01dfb68b, size: 76 bytes, params: 2, frame: 13
const value = channelIds.reduce(_fun77417, {});
const object2 = {};
copyDataProperties(object2, value, copyDataProperties(object2, env0_24, channelIds));
}
function RECEIVE_CHANNEL_SUMMARIES_BULK({summaries, receivedAt, error, requestArgs}) { // fn#77418, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10051:6618, offset: 0x01dfb72a, size: 200 bytes, params: 2, frame: 17
var object2;
const channelIds = requestArgs.channelIds;
const value2 = (importDefault(22) /* metro dependency 22 */).toPairs(summaries);
const env0_2 = value2.reduce(_fun77419, {});
const value3 = channelIds.reduce(_fun77423, {summariesByChannel: {}, summaryFetchStatusByChannel: {}});
object2 = {};
copyDataProperties(object2, env0_23, value2);
copyDataProperties(object2, value3.summariesByChannel, value2);
object2 = {};
copyDataProperties(object2, env0_24, value2);
copyDataProperties(object2, value3.summaryFetchStatusByChannel, value2);
}
function CONVERSATION_SUMMARY_UPDATE(a0) { // fn#77424, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10051:7302, offset: 0x01dfb966, size: 362 bytes, params: 2, frame: 20
const channel_id = a0.channel_id;
const summaries = a0.summaries;
a0.guild_id;
const Date = global.Date;
const value = Date.now();
const value3 = undefined;
const value10 = (importDefault(22) /* metro dependency 22 */).chain(summaries).sortBy(_fun77425).filter(function(a0) {
var property = global.Object;
property = property.keys(a0).length;
return property > 0;
}).map(_fun77427).reverse().value();
let property = env0_23[channel_id];
env0_23[channel_id] = (importDefault(22) /* metro dependency 22 */).chain(value10).concat(property ?? []).sortBy(_fun77428).takeRight(75).uniqBy('id').reverse().value();
const binding = env0_24;
const object2 = {};
copyDataProperties(object2, binding[channel_id], 23);
object2['error'] = value3;
property = env0_24[channel_id];
const fetching = property == null ? value3 : property.fetching;
object2['fetching'] = fetching != null && fetching;
object2['lastReceivedAt'] = value;
binding[channel_id] = object2;
return value3;
}
function DELETE_SUMMARY(a0) { // fn#77430, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10051:7863, offset: 0x01dfbb12, size: 89 bytes, params: 2, frame: 14
const channelId = a0.summary.channelId;
const r4 = env0_23[channelId] ?? [];
const value2 = r4.indexOf(a0.summary);
if (value2 !== -1) {
env0_23[channelId].splice(value2, 1);
}
}
function _fun77365(a0) { // fn#77365, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10051:725, offset: 0x01dfa67c, size: 71 bytes, params: 2, frame: 13
const type = a0.type;
const value = environment.__proto__;
const AutocompleterResultTypes = (require(7234) /* metro dependency 7234: autocompleter */).AutocompleterResultTypes;
const TEXT_CHANNEL = AutocompleterResultTypes.TEXT_CHANNEL;
return type === TEXT_CHANNEL && a0.record.type === 0;
}
function SummaryStore() { // fn#77368, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10051:845, offset: 0x01dfa8d4, size: 113 bytes, params: 1, frame: 20
const value = environment.__proto__;
env1_4(this, SummaryStore);
const value3 = env1_7(SummaryStore);
return env1_6(this, _isNativeReflectConstruct_77361() ? global.Reflect.construct(value3, arguments,
env1_7(this).constructor) : value3.apply(this, arguments));
}
function value_77369() { // fn#77369, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10051:1121, offset: 0x01dfa945, size: 16 bytes, params: 1, frame: 2
return {shouldShowTopicsBar: env1_18};
}
function value_77372() { // fn#77372, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10051:1409, offset: 0x01dfa9ca, size: 74 bytes, params: 1, frame: 12
var environment;
const Object = global.Object;
const values = Object.values;
let value = environment.__proto__;
value = Reflect.apply(values, Object, [env1_23]);
value = value.flat();
value = value.filter(_fun77373);
return value.sort(_fun77374);
}
function value_77375(a0) { // fn#77375, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10051:1715, offset: 0x01dfaaf5, size: 26 bytes, params: 2, frame: 3
return env1_23[a0] ?? env1_30;
}
function value_77377(a0, a1) { // fn#77377, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10051:1841, offset: 0x01dfab0f, size: 58 bytes, params: 3, frame: 12
const env0_0 = a1;
let value = this.summaries(a0);
value = value.find(function({id}) {
return id === require;
});
const value2 = null;
return value2 != value ? value : value2;
}
function value_77379(a0) { // fn#77379, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10051:1954, offset: 0x01dfab49, size: 91 bytes, params: 2, frame: 16
var r0;
var findSummary;
var binding;
let value = environment.__proto__;
const value2 = null;
if (value2 != env1_21) {
if (env1_21.channelId !== a0) {
r0 = value2;
} else if (value2 != env1_21.summaryId) {
findSummary = this.findSummary;
binding = env1_21;
value = undefined;
value = Reflect.apply(findSummary, this, [a0, value2 == binding ? value : binding.summaryId]);
r0 = value;
} else {
r0 = value2;
}
} else {
r0 = value2;
}
return r0;
}
function value_77380(a0) { // fn#77380, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10051:2110, offset: 0x01dfaba4, size: 30 bytes, params: 2, frame: 3
const value = null;
return value == a0 ? value : env1_25[a0.id];
}
function value_77381(a0, a1) { // fn#77381, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10051:2176, offset: 0x01dfabc2, size: 78 bytes, params: 3, frame: 6
var r0;
var value;
var property;
if (a1 != null) {
value = environment.__proto__;
property = env1_24[a0];
value = undefined;
value = (property == null ? value : property.summaryId) === a1;
r0 = value;
} else {
value = environment.__proto__;
property = env1_24[a0];
value = undefined;
value = (property == null ? value : property.fetching) === true;
r0 = value;
}
return r0;
}
function value_77382(a0) { // fn#77382, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10051:2315, offset: 0x01dfac10, size: 16 bytes, params: 2, frame: 2
return env1_24[a0];
}
function value_77383(a0, a1) { // fn#77383, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10051:2366, offset: 0x01dfac20, size: 228 bytes, params: 3, frame: 18
var lastReceivedAt;
var r6;
var Date;
let value = environment.__proto__;
const property = env1_24[a0];
const channel = ChannelStore.getChannel(a0);
const value3 = undefined;
const channelSummariesExperimentModule = require(9867) /* metro dependency 9867: ChannelSummariesExperiment */;
if (channelSummariesExperimentModule.canSeeChannelSummaries(channel)) {
if (a1 != null) {
r6 = (property == null ? value3 : property.summaryIdLastRequestedAt) ?? 0;
Date = global.Date;
return a1 !== (property == null ? value3 : property.summaryId) || Date.now() - r6 > SUMMARY_POLL_INTERVAL;
}
lastReceivedAt = property == null ? value3 : property.lastReceivedAt;
value = 0;
r6 = lastReceivedAt ?? value;
return !global.Boolean(property == null ? value3 : property.fetching) && value === r6;
}
return false;
}
function value_77387() { // fn#77387, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10051:2909, offset: 0x01dfad04, size: 129 bytes, params: 1, frame: 14
const value = environment.__proto__;
const status = env1_28.status;
const FETCHING = env1_22.FETCHING;
return status !== FETCHING && !(env1_28.lastResponse != null && global.Date.now() - env1_28.lastResponse < 30 * (importDefault(672) /* metro dependency 672: Durations */).Millis.SECOND);
}
function value_77388({withQuickSwitcher, withChannelAffinities, withUnreads, numChannels}) { // fn#77388, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10051:3060, offset: 0x01dfad85, size: 162 bytes, params: 2, frame: 18
var environment;
var r6;
var r5;
var value;
var concat;
var binding;
numChannels = numChannels === undefined ? 25 : numChannels;
const items2 = [];
if (withQuickSwitcher) {
concat = items2.concat;
value = environment.__proto__;
value = Reflect.apply(concat, items2, [env1_29]);
r6 = value;
} else {
r6 = items2;
}
if (withChannelAffinities) {
concat = r6.concat;
value = environment.__proto__;
binding = env1_26;
value = Reflect.apply(concat, r6, [binding.map(function(a0) {
return a0.channel_id;
})]);
r5 = value;
} else {
r5 = r6;
}
return (withUnreads ? r5.filter(_fun77390) : r5).filter(_fun77391).slice(0, numChannels);
}
function _fun77397({id}) { // fn#77397, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10051:3905, offset: 0x01dfaffd, size: 41 bytes, params: 2, frame: 4
const id = env0_0?.id;
return id === id;
}
function _fun77401(a0) { // fn#77401, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10051:4354, offset: 0x01dfb1be, size: 49 bytes, params: 2, frame: 13
let value = environment.__proto__;
value = require(9868) /* metro dependency 9868: Summary */;
return value.createSummaryFromServer(a0, channelId);
}
function _fun77402({id}) { // fn#77402, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10051:4435, offset: 0x01dfb1ef, size: 38 bytes, params: 2, frame: 4
const value = environment.__proto__;
return id === env1_21?.summaryId;
}
function _fun77404({startId}) { // fn#77404, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10051:4635, offset: 0x01dfb215, size: 47 bytes, params: 2, frame: 11
const value = environment.__proto__;
return (importDefault(21) /* metro dependency 21: SnowflakeUtils */).extractTimestamp(startId);
}
function _fun77407({id}) { // fn#77407, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10051:5282, offset: 0x01dfb388, size: 38 bytes, params: 2, frame: 4
const value = environment.__proto__;
return id === env1_19?.summaryId;
}
function _fun77410({startId, endId}) { // fn#77410, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10051:5612, offset: 0x01dfb451, size: 66 bytes, params: 2, frame: 7
const {topVisibleMessage, bottomVisibleMessage} = env0_0;
let r0 = topVisibleMessage == null || topVisibleMessage > endId;
r0 = !r0 ? bottomVisibleMessage == null : r0;
r0 = !r0 ? bottomVisibleMessage < startId : r0;
return !r0;
}
function _fun77417(a0, a1) { // fn#77417, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10051:6497, offset: 0x01dfb6d7, size: 83 bytes, params: 3, frame: 14
const r3 = env1_24[a1] ?? ({});
const object2 = {};
copyDataProperties(object2, r3, undefined);
object2['fetching'] = true;
object2['lastRequestedAt'] = requestedAt;
object2['error'] = undefined;
a0[a1] = object2;
return a0;
}
function _fun77419(a0, a1) { // fn#77419, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10051:6746, offset: 0x01dfb7f2, size: 165 bytes, params: 3, frame: 17
var environment;
let value = environment.__proto__;
const value2 = env1_3(a1, 2);
let property = value2[0];
const property2 = value2[1];
value = Reflect.apply((importDefault(22) /* metro dependency 22 */).chain, value, [property2.map(_fun77420)]);
value = value.sortBy(_fun77421);
value = value.takeRight(75);
value = value.reverse();
value = value.filter(function(a0) {
var property = global.Object;
property = property.keys(a0).length;
return property > 0;
});
a0[property] = value.value();
return a0;
}
function _fun77423(a0, a1) { // fn#77423, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10051:7002, offset: 0x01dfb8f7, size: 111 bytes, params: 3, frame: 16
let property = env1_24[a1];
const r5 = property ?? ({});
property = env0_2[a1];
if (property != null) {
a0.summariesByChannel[a1] = property;
}
const summaryFetchStatusByChannel = a0.summaryFetchStatusByChannel;
const object2 = {};
copyDataProperties(object2, r5, undefined);
object2['fetching'] = false;
object2['error'] = error;
object2['lastReceivedAt'] = receivedAt;
summaryFetchStatusByChannel[a1] = object2;
return a0;
}
function _fun77425({start_id}) { // fn#77425, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10051:7420, offset: 0x01dfbad0, size: 47 bytes, params: 2, frame: 11
const value = environment.__proto__;
return (importDefault(21) /* metro dependency 21: SnowflakeUtils */).extractTimestamp(start_id);
}
function _fun77373(a0) { // fn#77373, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10051:1482, offset: 0x01dfaa14, size: 145 bytes, params: 2, frame: 15
var r0;
var Date;
var value2;
var date;
let value = a0.people.length > 1;
if (value) {
value = environment.__proto__.__proto__;
value = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
value = value.extractTimestamp(a0.endId);
Date = global.Date;
value2 = Object.create(Date.prototype, {constructor: {value: Date}});
date = new Date();
value = value > (date instanceof Object ? date : value2).getTime() - 5 * (importDefault(672) /* metro dependency 672: Durations */).Millis.HOUR;
r0 = value;
} else {
r0 = value;
}
return r0;
}
function _fun77374({endId}, {endId}) { // fn#77374, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10051:1591, offset: 0x01dfaaa5, size: 80 bytes, params: 3, frame: 15
let value = environment.__proto__.__proto__;
value = Reflect.apply((importDefault(21) /* metro dependency 21: SnowflakeUtils */).extractTimestamp, value,
[endId]);
const defaultImport = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
return value - defaultImport.extractTimestamp(endId);
}
function _fun77390(a0) { // fn#77390, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10051:3240, offset: 0x01dfae27, size: 73 bytes, params: 2, frame: 15
const value = environment.__proto__.__proto__;
const channel = ChannelStore.getChannel(a0);
return channel != null && !UserGuildSettingsStore.isChannelMuted(channel.guild_id,
a0) && ReadStateStore.hasUnread(a0);
}
function _fun77391(a0) { // fn#77391, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10051:3347, offset: 0x01dfae70, size: 59 bytes, params: 2, frame: 14
const value = environment.__proto__.__proto__;
return (require(9867) /* metro dependency 9867: ChannelSummariesExperiment */).canSeeChannelSummaries(ChannelStore.getChannel(a0),
false, false);
}
function _fun77420(a0) { // fn#77420, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10051:6805, offset: 0x01dfb897, size: 49 bytes, params: 2, frame: 13
const value = environment.__proto__.__proto__;
return (require(9868) /* metro dependency 9868: Summary */).createSummaryFromServer(a0, env0_0);
}
function _fun77421({startId}) { // fn#77421, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10051:6857, offset: 0x01dfb8c8, size: 47 bytes, params: 2, frame: 11
const value = environment.__proto__.__proto__;
return (importDefault(21) /* metro dependency 21: SnowflakeUtils */).extractTimestamp(startId);
}
@@ -0,0 +1,224 @@
/* Metro module 11399; source: modules/summaries/native/SummaryActionSheet.tsx; dependencies: [31, 27, 1379, 4814, 9865, 661, 33, 4080, 11399, 1962, 4501, 697, 6860, 9905, 3856, 1244, 4800, 9212, 7153, 7165, 4007, 21, 1230, 6275, 6618, 10236, 4573, 11400, 9173, 9694, 8194, 2] */
function _fun87332(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#87332, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11585:6, offset: 0x01fb8f99, size: 509 bytes, params: 8, frame: 24
var object2;
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 */).View;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const messageStore = importDefault(4814) /* metro dependency 4814: MessageStore */;
const summaryStore = importDefault(9865) /* metro dependency 9865: SummaryStore */;
let value = require(661) /* metro dependency 661: Constants */;
const env0_8 = value.AnalyticsSections;
const env0_9 = value.MessageFlags;
value = require(33) /* metro dependency 33 */;
const env0_10 = value.jsx;
const env0_11 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {summaryContainer: {'padding': 16, 'margin': 16, 'marginBottom': 24, 'justifyContent': 'center',
'alignItems': 'center'}};
object2.summaryContent = {textAlign: 'center'};
const object4 = {'marginBottom': 8, 'borderRadius': null, 'border': 1, 'overflow': 'hidden', 'alignItems': 'center',
'justifyContent': 'center'};
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
const BACKGROUND_BRAND = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BRAND;
object4.backgroundColor = BACKGROUND_BRAND;
object2.summaryIconContainer = object4;
const WHITE = (importDefault(697) /* metro dependency 697: native */).colors.WHITE;
object2.summaryIcon = {'margin': 8, 'width': 20, 'height': 20, tintColor: WHITE};
object2.summaryTopic = {marginBottom: 4};
const BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
object2.divider = {height: 1, backgroundColor: BORDER_SUBTLE};
object2.actionsContainer = {'flexDirection': 'row', 'justifyContent': 'space-evenly', 'marginBottom': 16};
const env0_12 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/summaries/native/SummaryActionSheet.tsx');
exports.default = SummaryActionSheet;
exports.openSummaryDividerActionSheet = openSummaryDividerActionSheet;
}
function SummaryActionSheet({summary}) { // fn#87333, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11585:932, offset: 0x01fb9196, size: 1190 bytes, params: 2, frame: 36
const styles = useStyles();
let binding = env0_3;
const value3 = binding.useRef(null);
const channel = ChannelStore.getChannel(summary.channelId);
const message = MessageStore.getMessage(summary.channelId, summary.startId);
let r12 = message != null && message.hasFlag(MessageFlags.HAS_THREAD);
let r13 = channel != null && message != null && !message.hasFlag(MessageFlags.HAS_THREAD) && (require(6860) /* metro dependency 6860: ThreadHooks */).computeCanStartPublicThread(channel,
message);
const value10 = env0_3.useCallback(_fun87334, [channel?.guild_id]);
binding = env0_3;
const value11 = binding.useCallback(_fun87335, [summary, channel]);
const value12 = binding.useCallback(_fun87336, [summary, channel, message]);
const value13 = binding.useCallback(_fun87337, [channel, message]);
const BottomSheet = (require(6275) /* metro dependency 6275: BottomSheetNative */).BottomSheet;
const SafeAreaPaddingView = (require(6618) /* metro dependency 6618: SafeAreaView */).SafeAreaPaddingView;
const TopicsIcon = (require(10236) /* metro dependency 10236: TopicsIcon */).TopicsIcon;
const items2 = [<View style={styles.summaryIconContainer}><TopicsIcon style={styles.summaryIcon} size="custom" /></View>];
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
items2[1] = <Text style={[styles.summaryContent,
styles.summaryTopic]} variant="heading-md/extrabold" color="mobile-text-heading-primary">{summary.topic}</Text>;
items2[2] = <Text style={[styles.summaryContent]} variant="heading-md/medium" color="text-default">{summary.summShort}</Text>;
const items4 = [<View style={styles.summaryContainer}>{items2}</View>];
items4[1] = <View style={styles.divider} />;
const SummaryActionSheetButton = (require(11400) /* metro dependency 11400: SummaryActionSheetButton */).SummaryActionSheetButton;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const summaryActionSheetButton = <SummaryActionSheetButton label={Reflect.apply(string, intl,
[(require(1244) /* metro dependency 1244: indexNative */).t['NY/nlb']])} iconSource={importDefault(9173) /* metro dependency 9173: Share */} onPress={value11} />;
r13 = r13 && <SummaryActionSheetButton label={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.rBIGBL)} iconSource={importDefault(9694) /* metro dependency 9694 */} onPress={value12} />;
r12 = r12 && <SummaryActionSheetButton label={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['39d0Wj'])} iconSource={importDefault(9694) /* metro dependency 9694 */} onPress={value13} />;
string = intl.string;
const QLkZ39 = (require(1244) /* metro dependency 1244: indexNative */).t.QLkZ39;
items4[2] = <View style={styles.actionsContainer}>{summaryActionSheetButton}{r13}{r12}<SummaryActionSheetButton label={Reflect.apply(string,
intl, [QLkZ39])} iconSource={importDefault(8194) /* metro dependency 8194 */} onPress={value10} /></View>;
return (
<BottomSheet ref={value3}>
<SafeAreaPaddingView bottom>
{items4}
</SafeAreaPaddingView>
</BottomSheet>
);
}
function openSummaryDividerActionSheet(a0, a1) { // fn#87338, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11585:3440, offset: 0x01fb9a29, size: 135 bytes, params: 3, frame: 18
var defaultImport;
var openLazy;
var value;
const summary = SummaryStore.findSummary(a0, a1);
if (summary != null) {
defaultImport = importDefault(dependencyMap[7]);
openLazy = defaultImport.openLazy;
value = require(dependencyMap[9]);
value = value(dependencyMap[8], dependencyMap.paths);
Reflect.apply(openLazy, defaultImport, [value, 'SummaryDivider' + a1, {summary: summary}]);
}
}
function _fun87334() { // fn#87334, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11585:1206, offset: 0x01fb963c, size: 166 bytes, params: 1, frame: 18
var defaultImport2;
var openLazy;
let value = environment.__proto__;
const value2 = undefined;
importDefault(dependencyMap[7]).hideActionSheet();
if ((env0_1 == null ? value2 : env0_1.guild_id) != null) {
defaultImport2 = importDefault(dependencyMap[7]);
openLazy = defaultImport2.openLazy;
value = require(dependencyMap[9]);
value = value(dependencyMap[13], dependencyMap.paths);
Reflect.apply(openLazy, defaultImport2, [value, 'GuildHighlightsNotifications',
{guildId: env0_1 == null ? value2 : env0_1.guild_id}]);
}
return value2;
}
function _fun87335() { // fn#87335, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11585:1428, offset: 0x01fb96e2, size: 315 bytes, params: 1, frame: 26
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var formatToPlainString;
var I3yTDn;
var object2;
var summaryBinding;
var topic;
var moduleValue;
var getChannelPermalink;
var binding;
var value3;
var moduleValue2;
var showShareActionSheet;
let value = environment.__proto__;
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
if (env0_1 != null) {
formatToPlainString = intl.formatToPlainString;
I3yTDn = t.I3yTDn;
object2 = {};
summaryBinding = summary;
topic = summaryBinding.topic;
object2.topic = topic;
moduleValue = require(4800) /* metro dependency 4800: ChannelUtils */;
getChannelPermalink = moduleValue.getChannelPermalink;
binding = env0_1;
object2.url = Reflect.apply(getChannelPermalink, moduleValue, [binding.guild_id, binding.id,
summaryBinding.startId,
summaryBinding.id]);
value3 = Reflect.apply(formatToPlainString, intl, [I3yTDn, object2]);
moduleValue2 = require(9212) /* metro dependency 9212: showShareActionSheetAndroid */;
showShareActionSheet = moduleValue2.showShareActionSheet;
topic = summaryBinding.topic;
Reflect.apply(showShareActionSheet, moduleValue2, [{message: value3, subject: topic},
AnalyticsSections.SUMMARY_ACTION_SHEET]);
} else {
value = require(3856) /* metro dependency 3856: ToastUtils */;
value.presentFailedToast(intl.string(t.gvkcQl));
}
}
function _fun87336() { // fn#87336, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11585:1793, offset: 0x01fb981d, size: 383 bytes, params: 1, frame: 21
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var defaultImport2;
var openThreadCreationForMobile;
var binding;
var summaryBinding;
var defaultImport3;
var changeThreadSettings;
var id;
var moduleValue;
var navigateToCreateThread;
var guild_id;
var defaultImport4;
var castMessageIdAsChannelId;
var moduleValue2;
var transitionToGuild;
let value = environment.__proto__;
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
if (env0_1 == null) {
value = require(3856) /* metro dependency 3856: ToastUtils */;
value.presentError(intl.string(t['/+DWeQ']));
} else if (env0_2 != null) {
defaultImport2 = importDefault(7153) /* metro dependency 7153: ThreadActionCreators */;
openThreadCreationForMobile = defaultImport2.openThreadCreationForMobile;
binding = env0_1;
summaryBinding = summary;
Reflect.apply(openThreadCreationForMobile, defaultImport2, [binding, summaryBinding.startId,
AnalyticsSections.SUMMARY_ACTION_SHEET]);
defaultImport3 = importDefault(7165) /* metro dependency 7165: DraftActionCreators */;
changeThreadSettings = defaultImport3.changeThreadSettings;
id = binding.id;
Reflect.apply(changeThreadSettings, defaultImport3, [id, {name: summaryBinding.topic}]);
moduleValue = require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */;
navigateToCreateThread = moduleValue.navigateToCreateThread;
guild_id = binding.guild_id;
defaultImport4 = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
castMessageIdAsChannelId = defaultImport4.castMessageIdAsChannelId;
id = env0_2.id;
if (!Reflect.apply(navigateToCreateThread, moduleValue, [guild_id, Reflect.apply(castMessageIdAsChannelId,
defaultImport4, [id])])) {
moduleValue2 = require(1230) /* metro dependency 1230: router_utils */;
transitionToGuild = moduleValue2.transitionToGuild;
guild_id = env0_1.guild_id;
value = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
Reflect.apply(transitionToGuild, moduleValue2, [guild_id, value.castMessageIdAsChannelId(env0_2.id)]);
}
} else {
value = require(3856) /* metro dependency 3856: ToastUtils */;
value.presentError(intl.string(t['/+DWeQ']));
}
}
function _fun87337() { // fn#87337, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11585:2225, offset: 0x01fb999c, size: 141 bytes, params: 1, frame: 17
var moduleValue;
var transitionToGuild;
var guild_id;
let value = environment.__proto__;
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
if (env0_1 != null && env0_2 != null) {
moduleValue = require(1230) /* metro dependency 1230: router_utils */;
transitionToGuild = moduleValue.transitionToGuild;
guild_id = env0_1.guild_id;
value = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
Reflect.apply(transitionToGuild, moduleValue, [guild_id, value.castMessageIdAsChannelId(env0_2.id)]);
}
}
@@ -0,0 +1,58 @@
/* Metro module 11400; source: modules/summaries/native/SummaryActionSheetButton.tsx; dependencies: [31, 27, 33, 4501, 697, 5278, 1305, 4573, 2] */
function _fun87339(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#87339, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11586:6, offset: 0x01fb9ab0, size: 366 bytes, params: 8, frame: 23
var object3;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_2 = (require(27) /* metro dependency 27 */).View;
let value = require(33) /* metro dependency 33 */;
const env0_3 = value.jsx;
const env0_4 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object3 = {container: {'flexDirection': 'column', 'justifyContent': 'center', 'alignItems': 'center',
'paddingVertical': 8, 'width': 78}};
const object4 = {'borderRadius': null, 'border': 1, 'overflow': 'hidden', 'alignItems': 'center',
'justifyContent': 'center'};
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object4.backgroundColor = BACKGROUND_BASE_LOW;
const SHADOW_LOW = (importDefault(697) /* metro dependency 697: native */).shadows.SHADOW_LOW;
copyDataProperties(object4, SHADOW_LOW, undefined);
object3.iconBox = object4;
const INTERACTIVE_TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_TEXT_DEFAULT;
object3.icon = {margin: 12, tintColor: INTERACTIVE_TEXT_DEFAULT};
object3.name = {'textAlign': 'center', 'marginTop': 8};
const env0_5 = Reflect.apply(createStyles, value, [object3]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/summaries/native/SummaryActionSheetButton.tsx');
exports.SummaryActionSheetButton = SummaryActionSheetButton;
}
function SummaryActionSheetButton({label, iconSource, onPress}) { // fn#87340, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11586:692, offset: 0x01fb9c1e, size: 241 bytes, params: 2, frame: 24
const styles = useStyles();
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
const items2 = [styles.iconBox];
const Icon = (require(1305) /* metro dependency 1305: native */).Icon;
const view = <View style={items2}><Icon style={styles.icon} source={iconSource} /></View>;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<PressableOpacity
style={styles.container}
onPress={onPress}
accessibilityRole="button"
accessibilityLabel={label}
>
{view}
<Text
style={styles.name}
variant="text-xs/medium"
color="interactive-text-default"
lineClamp={1}
>
{label}
</Text>
</PressableOpacity>
);
}