714 lines
28 KiB
TypeScript
714 lines
28 KiB
TypeScript
/* Metro module 4833; source: modules/replies/ReferencedMessageStore.tsx; dependencies: [15, 17, 18, 57, 6, 7, 4834, 1379, 4814, 661, 1393, 4625, 4821, 566, 694, 2] */
|
|
function _fun42170(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#42170, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5011:6, offset: 0x01132644, size: 745 bytes, params: 8, frame: 27
|
|
var object2;
|
|
const env0_0 = require;
|
|
const _arrayLikeToArray_42176 = function(a0, a1) {
|
|
var r0;
|
|
var r1;
|
|
var r2;
|
|
var value3;
|
|
var length;
|
|
var value5;
|
|
var value = undefined;
|
|
var value2 = value == null;
|
|
reducibleJoin2: while (true) {
|
|
if (value2) {
|
|
r0 = value2;
|
|
break reducibleJoin2;
|
|
}
|
|
value3 = value > a0.length;
|
|
r0 = value3;
|
|
break reducibleJoin2;
|
|
}
|
|
reducibleJoin4: while (true) {
|
|
if (r0) {
|
|
length = a0.length;
|
|
r1 = length;
|
|
break reducibleJoin4;
|
|
}
|
|
r1 = value;
|
|
break reducibleJoin4;
|
|
}
|
|
value = (0, global.Array)(r1);
|
|
var value4 = 0;
|
|
if (value4 < r1) {
|
|
r2 = value4;
|
|
reducibleLoop5: while (true) {
|
|
value[r2] = a0[r2];
|
|
value5 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
|
|
if (value5 < r1) {
|
|
r2 = value5;
|
|
continue reducibleLoop5;
|
|
}
|
|
break reducibleLoop5;
|
|
}
|
|
}
|
|
return value;
|
|
};
|
|
const closure = function({messages}) {
|
|
return anyChanged(messages, _fun42180);
|
|
};
|
|
const closure2 = function({data}) {
|
|
return anyChanged(data, _fun42182);
|
|
};
|
|
const closure3 = CHANNEL_DELETE_42185;
|
|
const closure4 = CONNECTION_OPEN_42187;
|
|
const closure5 = LOAD_THREADS_SUCCESS;
|
|
let Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
const env0_3 = importDefault(15) /* metro dependency 15 */;
|
|
const env0_4 = importDefault(17) /* metro dependency 17 */;
|
|
const env0_5 = importDefault(18) /* metro dependency 18 */;
|
|
const env0_6 = importDefault(57) /* metro dependency 57 */;
|
|
const env0_7 = importDefault(6) /* metro dependency 6 */;
|
|
const env0_8 = importDefault(7) /* metro dependency 7 */;
|
|
const conversationsStore = importDefault(4834) /* metro dependency 4834: ConversationsStore */;
|
|
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
|
|
const messageStore = importDefault(4814) /* metro dependency 4814: MessageStore */;
|
|
const constantsModule = require(661) /* metro dependency 661: Constants */;
|
|
const env0_12 = constantsModule.MessageTypes;
|
|
const env0_13 = constantsModule.MessageTypesWithLazyLoadedReferences;
|
|
object2 = {LOADED: 0};
|
|
object2[0] = 'LOADED';
|
|
object2.NOT_LOADED = 1;
|
|
object2[1] = 'NOT_LOADED';
|
|
object2.DELETED = 2;
|
|
object2[2] = 'DELETED';
|
|
Object = global.Object;
|
|
const freeze = Object.freeze;
|
|
const NOT_LOADED = object2.NOT_LOADED;
|
|
const env0_15 = Reflect.apply(freeze, Object, [{state: NOT_LOADED}]);
|
|
const Set = global.Set;
|
|
let set = new Set();
|
|
const env0_17 = _fun42190();
|
|
set = _fun42198();
|
|
set = new set();
|
|
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
|
|
_fun42208(Store).displayName = 'ReferencedMessageStore';
|
|
set = new set(importDefault(694) /* metro dependency 694: Dispatcher */, {CACHE_LOADED: CACHE_LOADED_42214,
|
|
LOCAL_MESSAGES_LOADED: closure, LOAD_MESSAGES_SUCCESS: closure, LOAD_MESSAGES_AROUND_SUCCESS: closure,
|
|
SEARCH_MESSAGES_SUCCESS: closure2, MOD_VIEW_SEARCH_MESSAGES_SUCCESS: closure2,
|
|
CONVERSATION_FETCH_SUCCESS: function({messages}) {
|
|
return anyChanged(messages, _fun42218);
|
|
}, LOAD_THREADS_SUCCESS: closure5, LOAD_ARCHIVED_THREADS_SUCCESS: closure5,
|
|
MESSAGE_EXPLICIT_CONTENT_SCAN_TIMEOUT: MESSAGE_EXPLICIT_CONTENT_SCAN_TIMEOUT_42219,
|
|
LOAD_FORUM_POSTS: LOAD_FORUM_POSTS_42220, MESSAGE_CREATE: MESSAGE_CREATE_42222,
|
|
MESSAGE_UPDATE: MESSAGE_UPDATE_42223, MESSAGE_DELETE: function({id, channelId}) {
|
|
return unsetDeletedMessage(channelId, id);
|
|
}, MESSAGE_DELETE_BULK: function({ids, channelId}) {
|
|
return anyChanged(ids, _fun42226);
|
|
}, CREATE_PENDING_REPLY: CREATE_PENDING_REPLY, CHANNEL_DELETE: closure3, THREAD_DELETE: closure3,
|
|
GUILD_DELETE: GUILD_DELETE_42228, CONNECTION_OPEN: closure4, LOGOUT: closure4});
|
|
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/replies/ReferencedMessageStore.tsx');
|
|
exports.default = set;
|
|
exports.ReferencedMessageState = object2;
|
|
}
|
|
|
|
function _isNativeReflectConstruct_42171() { // fn#42171, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5011:259, offset: 0x0113292d, 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_42171_isNativeReflectConstruct = function() {
|
|
return !!result;
|
|
})();
|
|
}
|
|
|
|
function _createForOfIteratorHelperLoose_42174(a0, a1) { // fn#42174, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5011:452, offset: 0x0113298b, 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 _fun42175;
|
|
}
|
|
value = undefined;
|
|
if (a0) {
|
|
if (typeof a0 === 'string') {
|
|
value = _arrayLikeToArray_42176(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') {
|
|
value = _arrayLikeToArray_42176(a0, value);
|
|
r6 = value;
|
|
} else {
|
|
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
|
|
if (regexp.test(r9)) {
|
|
value = _arrayLikeToArray_42176(a0, value);
|
|
r6 = value;
|
|
} else {
|
|
r6 = value;
|
|
}
|
|
}
|
|
r5 = r6;
|
|
}
|
|
} else {
|
|
r5 = value;
|
|
}
|
|
if (r5) {
|
|
if (r5) {
|
|
}
|
|
return _fun42175;
|
|
}
|
|
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 processMessage(a0) { // fn#42177, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5011:3520, offset: 0x01132afd, size: 398 bytes, params: 2, frame: 23
|
|
var r10;
|
|
var r1;
|
|
var message_reference;
|
|
var message_id;
|
|
var channel_id;
|
|
var set;
|
|
var object2;
|
|
var referenced_message;
|
|
var id;
|
|
var THREAD_STARTER_MESSAGE;
|
|
var value7;
|
|
let binding = env0_18;
|
|
const r0 = binding.updateExistingMessageIfCached(a0) && true;
|
|
const has = MessageTypesWithLazyLoadedReferences.has;
|
|
let type = a0.type;
|
|
if (Reflect.apply(has, MessageTypesWithLazyLoadedReferences, [type])) {
|
|
message_reference = a0.message_reference;
|
|
if (message_reference == null) {
|
|
return r0;
|
|
}
|
|
message_id = message_reference.message_id;
|
|
if (message_id == null) {
|
|
return r0;
|
|
}
|
|
if ('referenced_message' in a0) {
|
|
referenced_message = a0.referenced_message;
|
|
if (referenced_message != null) {
|
|
binding = env0_18;
|
|
set = binding.set;
|
|
channel_id = referenced_message.channel_id;
|
|
id = referenced_message.id;
|
|
object2 = {};
|
|
object2.state = env0_14.LOADED;
|
|
object2.message = (require(4625) /* metro dependency 4625: MessageRecordUtils */).createMessageRecord(referenced_message);
|
|
Reflect.apply(set, binding, [channel_id, id, object2]);
|
|
type = a0.type;
|
|
THREAD_STARTER_MESSAGE = MessageTypes.THREAD_STARTER_MESSAGE;
|
|
value7 = true;
|
|
if (type !== THREAD_STARTER_MESSAGE) {
|
|
r1 = value7;
|
|
} else {
|
|
processMessage(referenced_message);
|
|
r1 = value7;
|
|
}
|
|
} else {
|
|
binding = env0_18;
|
|
binding.set(a0.channel_id, message_id, {state: env0_14.DELETED});
|
|
r1 = true;
|
|
}
|
|
} else {
|
|
r10 = MessageStore.getMessage(message_reference.channel_id,
|
|
message_id) ?? ConversationsStore.getMessage(message_reference.channel_id, message_id);
|
|
if (r10 != null) {
|
|
binding = env0_18;
|
|
binding.set(message_reference.channel_id, message_id, {state: env0_14.LOADED, message: r10});
|
|
r1 = true;
|
|
} else {
|
|
binding = env0_18;
|
|
binding.set(message_reference.channel_id, message_id, env0_15);
|
|
r1 = true;
|
|
}
|
|
}
|
|
return r1;
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
function anyChanged(a0, a1) { // fn#42178, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5011:4122, offset: 0x01132c8b, size: 84 bytes, params: 3, frame: 18
|
|
var r2;
|
|
var r3;
|
|
var r8;
|
|
var r0;
|
|
var value4;
|
|
var value5;
|
|
var value6;
|
|
const value = _createForOfIteratorHelperLoose_42174(a0);
|
|
const value2 = value();
|
|
let done = value2.done;
|
|
const value3 = false;
|
|
if (done) {
|
|
r0 = value3;
|
|
} else {
|
|
r2 = value3;
|
|
r3 = value2;
|
|
while (true) {
|
|
value4 = r3.value;
|
|
value5 = value3 !== a1(value4);
|
|
r8 = value5 || r2;
|
|
value6 = value();
|
|
done = value6.done;
|
|
if (done) {
|
|
r0 = r8;
|
|
break;
|
|
}
|
|
r2 = r8;
|
|
r3 = value6;
|
|
continue;
|
|
}
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
function LOAD_MESSAGES_AROUND_SUCCESS_42179({messages}) { // fn#42179, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5011:4245, offset: 0x01132cdf, size: 33 bytes, params: 2, frame: 13
|
|
return anyChanged(messages, function(a0) {
|
|
return processMessage(a0);
|
|
});
|
|
}
|
|
|
|
function MOD_VIEW_SEARCH_MESSAGES_SUCCESS_42181({data}) { // fn#42181, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5011:4331, offset: 0x01132d13, size: 32 bytes, params: 2, frame: 13
|
|
return anyChanged(data, function({messages}) {
|
|
return anyChanged(messages, _fun42183);
|
|
});
|
|
}
|
|
|
|
function CHANNEL_DELETE_42185({channel}) { // fn#42185, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5011:4473, offset: 0x01132d82, size: 33 bytes, params: 2, frame: 11
|
|
const binding = env0_18;
|
|
return binding.deleteChannelCache(channel.id);
|
|
}
|
|
|
|
function unsetDeletedMessage(a0, a1) { // fn#42186, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5011:4547, offset: 0x01132da3, size: 67 bytes, params: 3, frame: 16
|
|
const binding = env0_18;
|
|
if (binding.has(a0, a1)) {
|
|
env0_18.set(a0, a1, {state: env0_14.DELETED});
|
|
return undefined;
|
|
}
|
|
return false;
|
|
}
|
|
|
|
function LOAD_ARCHIVED_THREADS_SUCCESS_42188({firstMessages}) { // fn#42188, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5011:4666, offset: 0x01132de6, size: 42 bytes, params: 2, frame: 14
|
|
return firstMessages != null && anyChanged(firstMessages, function(a0) {
|
|
return processMessage(a0);
|
|
});
|
|
}
|
|
|
|
function _fun42190() { // fn#42190, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5011:1523, offset: 0x01132e10, size: 151 bytes, params: 1, frame: 15
|
|
return env0_8(ChannelReferencedMessageCache, [{key: 'handleCacheDisposed', value: function(a0) {
|
|
var _cachedMessageIds;
|
|
var property = this._cachedMessageIds;
|
|
if (property.has(a0)) {
|
|
property = global.Set;
|
|
_cachedMessageIds = this._cachedMessageIds;
|
|
this._cachedMessageIds = new property();
|
|
property = this._cachedMessageIds;
|
|
property.delete(a0);
|
|
}
|
|
}}, {key: 'set', value: function(a0, a1) {
|
|
var _cachedMessageIds;
|
|
var property = this._cachedMessages;
|
|
property.set(a0, a1);
|
|
property = this._cachedMessageIds;
|
|
if (!property.has(a0)) {
|
|
property = global.Set;
|
|
_cachedMessageIds = this._cachedMessageIds;
|
|
this._cachedMessageIds = new property();
|
|
property = this._cachedMessageIds;
|
|
property.add(a0);
|
|
}
|
|
}}, {key: 'has', value: function(a0) {
|
|
return this._cachedMessageIds.has(a0);
|
|
}}, {key: 'get', value: function(a0) {
|
|
return this._cachedMessages.get(a0);
|
|
}}, {key: 'getCachedMessageIds', value: function() {
|
|
return this._cachedMessageIds;
|
|
}}]);
|
|
}
|
|
|
|
function _fun42198() { // fn#42198, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5011:2318, offset: 0x01133044, size: 222 bytes, params: 1, frame: 15
|
|
return env0_8(ReferencedMessageCache, [{key: 'has', value: function(a0, a1) {
|
|
var r1;
|
|
var value = this._channelCaches.get(a0);
|
|
if (value == null) {
|
|
r1 = undefined;
|
|
} else {
|
|
value = value.has(a1);
|
|
r1 = value;
|
|
}
|
|
return r1 != null && r1;
|
|
}}, {key: 'get', value: function(a0, a1) {
|
|
var r0;
|
|
var value = this._channelCaches.get(a0);
|
|
if (value == null) {
|
|
r0 = undefined;
|
|
} else {
|
|
value = value.get(a1);
|
|
r0 = value;
|
|
}
|
|
return r0;
|
|
}}, {key: 'set', value: value_42202}, {key: 'updateExistingMessageIfCached', value: value_42203},
|
|
{key: 'deleteChannelCache', value: function(a0) {
|
|
return this._channelCaches.delete(a0);
|
|
}}, {key: 'retainWhere', value: value_42205}, {key: 'getCachedMessageIdsForChannel', value: function(a0) {
|
|
var r0;
|
|
var value = this._channelCaches.get(a0);
|
|
var value2 = null;
|
|
if (value2 == value) {
|
|
r0 = value2;
|
|
} else {
|
|
value = value.getCachedMessageIds();
|
|
r0 = value;
|
|
}
|
|
return r0;
|
|
}}, {key: 'clear', value: function() {
|
|
this._channelCaches.clear();
|
|
}}]);
|
|
}
|
|
|
|
function _fun42208(a0) { // fn#42208, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5011:4778, offset: 0x011333a3, size: 139 bytes, params: 2, frame: 16
|
|
const closure = ReferencedMessageStore;
|
|
env0_5(closure, a0);
|
|
return env0_8(closure, [{key: 'initialize', value: function() {
|
|
this.waitFor(MessageStore, ChannelStore, ConversationsStore);
|
|
}}, {key: 'getMessageByReference', value: value_42211}, {key: 'getMessage', value: value_42212},
|
|
{key: 'getReplyIdsForChannel', value: value_42213}]);
|
|
}
|
|
|
|
function CACHE_LOADED_42214({messages}) { // fn#42214, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5011:5564, offset: 0x0113354d, size: 51 bytes, params: 2, frame: 13
|
|
const anyChangedBinding = anyChanged;
|
|
const Object = global.Object;
|
|
return anyChangedBinding(Object.values(messages), _fun42215);
|
|
}
|
|
|
|
function CONVERSATION_FETCH_SUCCESS({messages}) { // fn#42217, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5011:5969, offset: 0x011335ad, size: 33 bytes, params: 2, frame: 13
|
|
return anyChanged(messages, function(a0) {
|
|
return processMessage(a0);
|
|
});
|
|
}
|
|
|
|
function MESSAGE_EXPLICIT_CONTENT_SCAN_TIMEOUT_42219({messageId, channelId}) { // fn#42219, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5011:6207, offset: 0x011335ce, size: 158 bytes, params: 2, frame: 19
|
|
var value2;
|
|
var state;
|
|
var LOADED;
|
|
var set;
|
|
var object2;
|
|
var value;
|
|
let binding = env0_18;
|
|
if (binding.has(channelId, messageId)) {
|
|
binding = env0_18;
|
|
value2 = binding.get(channelId, messageId);
|
|
if (value2 == null) {
|
|
return false;
|
|
}
|
|
state = value2.state;
|
|
LOADED = env0_14.LOADED;
|
|
if (state !== LOADED) {
|
|
return false;
|
|
}
|
|
binding = env0_18;
|
|
set = binding.set;
|
|
object2 = {};
|
|
LOADED = env0_14.LOADED;
|
|
object2.state = LOADED;
|
|
value = require(4821) /* metro dependency 4821: ExplicitMediaRedactionUtils */;
|
|
object2.message = value.handleExplicitMediaScanTimeoutForMessage(value2.message);
|
|
Reflect.apply(set, binding, [channelId, messageId, object2]);
|
|
return undefined;
|
|
}
|
|
return false;
|
|
}
|
|
|
|
function LOAD_FORUM_POSTS_42220({threads}) { // fn#42220, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5011:6480, offset: 0x0113366c, size: 51 bytes, params: 2, frame: 13
|
|
const anyChangedBinding = anyChanged;
|
|
const Object = global.Object;
|
|
return anyChangedBinding(Object.values(threads), _fun42221);
|
|
}
|
|
|
|
function MESSAGE_CREATE_42222({message}) { // fn#42222, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5011:6625, offset: 0x011336c1, size: 59 bytes, params: 2, frame: 13
|
|
const getMessages = MessageStore.getMessages;
|
|
const ready = Reflect.apply(getMessages, MessageStore, [message.channel_id]).ready;
|
|
return ready ? processMessage(message) : !!ready;
|
|
}
|
|
|
|
function MESSAGE_UPDATE_42223({message}) { // fn#42223, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5011:6744, offset: 0x011336fc, size: 164 bytes, params: 2, frame: 20
|
|
var value2;
|
|
var state;
|
|
var LOADED;
|
|
var set;
|
|
var object2;
|
|
const id = message.id;
|
|
const channel_id = message.channel_id;
|
|
var value;
|
|
let binding = env0_18;
|
|
if (binding.has(channel_id, id)) {
|
|
binding = env0_18;
|
|
value2 = binding.get(channel_id, id);
|
|
if (value2 == null) {
|
|
return false;
|
|
}
|
|
state = value2.state;
|
|
LOADED = env0_14.LOADED;
|
|
if (state !== LOADED) {
|
|
return false;
|
|
}
|
|
binding = env0_18;
|
|
set = binding.set;
|
|
object2 = {};
|
|
LOADED = env0_14.LOADED;
|
|
object2.state = LOADED;
|
|
value = require(4625) /* metro dependency 4625: MessageRecordUtils */;
|
|
object2.message = value.updateMessageRecord(value2.message, message);
|
|
Reflect.apply(set, binding, [channel_id, id, object2]);
|
|
return undefined;
|
|
}
|
|
return false;
|
|
}
|
|
|
|
function MESSAGE_DELETE_BULK_42225({ids, channelId}) { // fn#42225, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5011:7090, offset: 0x011337be, size: 42 bytes, params: 2, frame: 13
|
|
return anyChanged(ids, function(a0) {
|
|
return unsetDeletedMessage(channelId, a0);
|
|
});
|
|
}
|
|
|
|
function CREATE_PENDING_REPLY({message}) { // fn#42227, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5011:7217, offset: 0x01133803, size: 61 bytes, params: 2, frame: 17
|
|
const binding = env0_18;
|
|
const set = binding.set;
|
|
const channel_id = message.channel_id;
|
|
const id = message.id;
|
|
const LOADED = env0_14.LOADED;
|
|
Reflect.apply(set, binding, [channel_id, id, {state: LOADED, message: message}]);
|
|
}
|
|
|
|
function GUILD_DELETE_42228() { // fn#42228, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5011:7399, offset: 0x01133840, size: 41 bytes, params: 1, frame: 11
|
|
if (env0_18.retainWhere(_fun42229) === 0) {
|
|
return false;
|
|
}
|
|
}
|
|
|
|
function _fun42182({messages}) { // fn#42182, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5011:4399, offset: 0x01132d33, size: 33 bytes, params: 2, frame: 13
|
|
return anyChanged(messages, function(a0) {
|
|
return anyChanged(a0, _fun42184);
|
|
});
|
|
}
|
|
|
|
function ChannelReferencedMessageCache() { // fn#42191, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5011:1544, offset: 0x01132ea7, size: 135 bytes, params: 1, frame: 15
|
|
var environment;
|
|
let value = environment.__proto__;
|
|
env1_7(this, ChannelReferencedMessageCache);
|
|
value = importDefault(1393) /* metro dependency 1393 */;
|
|
value = new value({max: 100, dispose: dispose_42192});
|
|
this._cachedMessages = value;
|
|
const Set = global.Set;
|
|
this._cachedMessageIds = new Set();
|
|
}
|
|
|
|
function ReferencedMessageCache() { // fn#42199, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5011:2339, offset: 0x01133122, size: 61 bytes, params: 1, frame: 13
|
|
const value = environment.__proto__;
|
|
env1_7(this, ReferencedMessageCache);
|
|
const Map = global.Map;
|
|
this._channelCaches = new Map();
|
|
}
|
|
|
|
function value_42202(a0, a1, a2) { // fn#42202, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5011:2665, offset: 0x011331c9, size: 96 bytes, params: 4, frame: 14
|
|
var r3;
|
|
var env1_172;
|
|
let value = this._channelCaches.get(a0);
|
|
if (value != null) {
|
|
r3 = value;
|
|
} else {
|
|
value = environment.__proto__;
|
|
env1_172 = new env1_17();
|
|
this._channelCaches.set(a0, env1_172);
|
|
r3 = env1_172;
|
|
}
|
|
r3.set(a1, a2);
|
|
}
|
|
|
|
function value_42203(a0) { // fn#42203, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5011:2818, offset: 0x01133229, size: 139 bytes, params: 2, frame: 19
|
|
var r1;
|
|
var r0;
|
|
var has;
|
|
var id;
|
|
var value3;
|
|
var set;
|
|
var object2;
|
|
var value5;
|
|
let value = this._channelCaches.get(a0.channel_id);
|
|
const value2 = value != null;
|
|
if (value2) {
|
|
has = value.has;
|
|
id = a0.id;
|
|
value3 = Reflect.apply(has, value, [id]);
|
|
if (value3) {
|
|
set = value.set;
|
|
id = a0.id;
|
|
object2 = {};
|
|
value5 = environment.__proto__;
|
|
object2.state = env1_14.LOADED;
|
|
object2.message = (require(4625) /* metro dependency 4625: MessageRecordUtils */).createMessageRecord(a0);
|
|
Reflect.apply(set, value, [id, object2]);
|
|
value = true;
|
|
r1 = value;
|
|
} else {
|
|
r1 = !!value3;
|
|
}
|
|
r0 = r1;
|
|
} else {
|
|
r0 = value2;
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
function value_42205(a0) { // fn#42205, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5011:3092, offset: 0x011332cc, size: 147 bytes, params: 2, frame: 20
|
|
var r4;
|
|
var r2;
|
|
var value5;
|
|
var property;
|
|
var value6;
|
|
const items2 = [];
|
|
let value = environment.__proto__;
|
|
const value2 = _createForOfIteratorHelperLoose_42174(this._channelCaches);
|
|
const value3 = value2();
|
|
let done = value3.done;
|
|
const value4 = 0;
|
|
if (!done) {
|
|
r4 = value3;
|
|
while (true) {
|
|
value5 = r4.value;
|
|
property = env1_6(value5, 1)[value4];
|
|
if (!a0(property)) {
|
|
items2.push(property);
|
|
}
|
|
value6 = value2();
|
|
done = value6.done;
|
|
if (done) {
|
|
break;
|
|
}
|
|
r4 = value6;
|
|
continue;
|
|
}
|
|
}
|
|
let length = items2.length;
|
|
if (value4 < length) {
|
|
for (r2 = value4; true; r2 = value) {
|
|
property = items2[r2];
|
|
this.deleteChannelCache(property);
|
|
value = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
|
|
length = items2.length;
|
|
if (!(value < length)) {
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
return items2.length;
|
|
}
|
|
|
|
function value_42211(a0) { // fn#42211, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5011:5186, offset: 0x011334c2, size: 56 bytes, params: 2, frame: 15
|
|
var r0;
|
|
var binding;
|
|
let value = undefined;
|
|
if (a0 != null) {
|
|
value = environment.__proto__;
|
|
binding = env1_18;
|
|
value = binding.get(a0.channel_id, a0.message_id);
|
|
r0 = value;
|
|
} else {
|
|
r0 = value;
|
|
}
|
|
r0 = r0 ?? env1_15;
|
|
return r0;
|
|
}
|
|
|
|
function value_42212(a0, a1) { // fn#42212, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5011:5295, offset: 0x011334fa, size: 36 bytes, params: 3, frame: 14
|
|
return env1_18.get(a0, a1) ?? env1_15;
|
|
}
|
|
|
|
function value_42213(a0) { // fn#42213, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5011:5384, offset: 0x0113351e, size: 47 bytes, params: 2, frame: 13
|
|
var r0;
|
|
let value = undefined;
|
|
if (a0 != null) {
|
|
value = environment.__proto__;
|
|
value = env1_18.getCachedMessageIdsForChannel(a0);
|
|
r0 = value;
|
|
} else {
|
|
r0 = value;
|
|
}
|
|
r0 = r0 ?? env1_16;
|
|
return r0;
|
|
}
|
|
|
|
function _fun42215(a0) { // fn#42215, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5011:5641, offset: 0x01133580, size: 45 bytes, params: 2, frame: 13
|
|
var environment;
|
|
const value = environment.__proto__;
|
|
const anyChangedBinding = anyChanged;
|
|
const Object = global.Object;
|
|
return anyChangedBinding(Object.values(a0), function(a0) {
|
|
return processMessage(a0);
|
|
});
|
|
}
|
|
|
|
function _fun42221({first_message}) { // fn#42221, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5011:6559, offset: 0x0113369f, size: 34 bytes, params: 2, frame: 12
|
|
var r0;
|
|
let value = first_message != null;
|
|
if (value) {
|
|
value = environment.__proto__;
|
|
value = processMessage(first_message);
|
|
r0 = value;
|
|
} else {
|
|
r0 = value;
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
function _fun42229(a0) { // fn#42229, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5011:7453, offset: 0x01133869, size: 28 bytes, params: 2, frame: 11
|
|
const value = environment.__proto__;
|
|
return ChannelStore.getChannel(a0) != null;
|
|
}
|
|
|
|
function _fun42183(a0) { // fn#42183, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5011:4429, offset: 0x01132d54, size: 27 bytes, params: 2, frame: 13
|
|
return anyChanged(a0, function(a0) {
|
|
return processMessage(a0);
|
|
});
|
|
}
|
|
|
|
function ChannelReferencedMessageCacheDispose(a0, a1) { // fn#42192, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5011:1675, owner: ChannelReferencedMessageCache.dispose, offset: 0x01132f2e, size: 29 bytes, params: 3, frame: 13
|
|
return env0_0.handleCacheDisposed(a0, a1);
|
|
}
|
|
|