1249 lines
40 KiB
TypeScript
1249 lines
40 KiB
TypeScript
/* Metro module 16142; source: modules/notifications/native/NativeNotificationsManager.tsx; dependencies: [7, 6, 15, 17, 18, 5, 27, 5214, 4605, 661, 3, 16143, 10741, 21, 477, 11218, 683, 4860, 2] */
|
|
function _fun124691(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#124691, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16350:6, offset: 0x025c0d19, size: 438 bytes, params: 8, frame: 19
|
|
const env0_0 = require;
|
|
const _arrayLikeToArray_124694 = 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 getDeliveredNotifications_124698 = function() {
|
|
return _getDeliveredNotifications.apply(this, arguments);
|
|
};
|
|
const updateAndClearStaleNotifications = function() {
|
|
return _updateAndClearStaleNotifications.apply(this, arguments);
|
|
};
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
const env0_3 = importDefault(7) /* metro dependency 7 */;
|
|
const env0_4 = importDefault(6) /* metro dependency 6 */;
|
|
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 env0_8 = importDefault(5) /* metro dependency 5 */;
|
|
const env0_9 = (require(27) /* metro dependency 27 */).NativeModules;
|
|
const guildReadStateStore = importDefault(5214) /* metro dependency 5214: GuildReadStateStore */;
|
|
const readStateStore = importDefault(4605) /* metro dependency 4605: ReadStateStore */;
|
|
const env0_12 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
|
|
let value = importDefault(3) /* metro dependency 3: Logger */;
|
|
value = new value('NativeNotificationsManager');
|
|
const env0_14 = [];
|
|
value = importDefault(4860) /* metro dependency 4860: AutomaticLifecycleManager */;
|
|
value = _fun124709(value);
|
|
value = new value();
|
|
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/notifications/native/NativeNotificationsManager.tsx');
|
|
exports.default = value;
|
|
}
|
|
|
|
function _createForOfIteratorHelperLoose_124692(a0, a1) { // fn#124692, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16350:231, offset: 0x025c0ecf, size: 372 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 _fun124693;
|
|
}
|
|
value = undefined;
|
|
if (a0) {
|
|
if (typeof a0 === 'string') {
|
|
value = _arrayLikeToArray_124694(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_124694(a0, value);
|
|
r6 = value;
|
|
} else {
|
|
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
|
|
if (regexp.test(r9)) {
|
|
value = _arrayLikeToArray_124694(a0, value);
|
|
r6 = value;
|
|
} else {
|
|
r6 = value;
|
|
}
|
|
}
|
|
r5 = r6;
|
|
}
|
|
} else {
|
|
r5 = value;
|
|
}
|
|
if (r5) {
|
|
if (r5) {
|
|
}
|
|
return _fun124693;
|
|
}
|
|
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 _isNativeReflectConstruct_124695() { // fn#124695, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16350:1141, offset: 0x025c1043, 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_124695_isNativeReflectConstruct = function() {
|
|
return !!result;
|
|
})();
|
|
}
|
|
|
|
function _getDeliveredNotifications() { // fn#124699, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16350:1482, offset: 0x025c10a5, size: 50 bytes, params: 1, frame: 14
|
|
return env0_8(_fun124701).apply(this, arguments);
|
|
}
|
|
|
|
function _updateAndClearStaleNotifications() { // fn#124703, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16350:1847, offset: 0x025c114f, size: 50 bytes, params: 1, frame: 14
|
|
return env0_8(_fun124705).apply(this, arguments);
|
|
}
|
|
|
|
function _fun124709(a0) { // fn#124709, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16350:2866, offset: 0x025c1390, size: 42 bytes, params: 2, frame: 14
|
|
const closure = NativeNotificationsManager;
|
|
env0_7(closure, a0);
|
|
return env0_3(closure);
|
|
}
|
|
|
|
function* _fun124701() { // fn#124701, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16350:1557, offset: 0x025c10e2, size: 109 bytes, params: 1, frame: 15
|
|
var value4;
|
|
if (true) {
|
|
value = environment.__proto__.__proto__;
|
|
var value3 = env2_0(env2_2[11]);
|
|
if (value3.shouldClearChannelNotificationsOnAppForeground({location: 'getDeliveredNotifications'})) {
|
|
value4 = env2_1(env2_2[12]);
|
|
yield value4.getDeliveredNotifications();
|
|
if (false) {
|
|
return undefined;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
function* _fun124705() { // fn#124705, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16350:1936, offset: 0x025c118c, size: 52 bytes, params: 1, frame: 11
|
|
var environment;
|
|
if (true) {
|
|
value = environment.__proto__.__proto__;
|
|
yield env2_18();
|
|
if (false) {
|
|
return undefined;
|
|
}
|
|
clearStaleNotifications();
|
|
}
|
|
}
|
|
|
|
function NativeNotificationsManager(a0) { // fn#124710, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16350:2878, offset: 0x025c13ba, size: 267 bytes, params: 2, frame: 21
|
|
var r0;
|
|
var Reflect;
|
|
let value = copyRestArgs(0, undefined);
|
|
let binding = env1_4;
|
|
binding(this, NativeNotificationsManager);
|
|
const items = [];
|
|
arraySpread(items, value, 0, items);
|
|
value = env1_6(NativeNotificationsManager);
|
|
binding = env1_5;
|
|
if (_isNativeReflectConstruct_124695()) {
|
|
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.handleAck = function({channelId}) {
|
|
var DCDNotificationManager;
|
|
if (require(dependencyMap[14]).isIOS()) {
|
|
importDefault(dependencyMap[12]).setApplicationIconBadgeNumber(GuildReadStateStore.getTotalMentionCount());
|
|
}
|
|
if (channelId != null) {
|
|
DCDNotificationManager = NativeModules.DCDNotificationManager;
|
|
if (DCDNotificationManager != null) {
|
|
DCDNotificationManager.clearNotificationsForChannel(channelId);
|
|
}
|
|
}
|
|
};
|
|
value.handlePostConnectionOpen = env1_8(_fun124713);
|
|
value.handleSetCallNotificationExperiment = function() {
|
|
if (!require(dependencyMap[14]).isIOS()) {
|
|
if (NativeModules.DCDNotificationManager.setShowMissedCallNotifications != null) {
|
|
NativeModules.DCDNotificationManager.setShowMissedCallNotifications(true);
|
|
}
|
|
if (NativeModules.DCDNotificationManager.setShowFullscreenCallUI != null) {
|
|
NativeModules.DCDNotificationManager.setShowFullscreenCallUI(true);
|
|
}
|
|
}
|
|
};
|
|
value.updateAndClearStaleNotifications = function() {
|
|
updateAndClearStaleNotifications();
|
|
};
|
|
value.actions = {MESSAGE_ACK: value.handleAck, CHANNEL_SELECT: value.handleAck,
|
|
POST_CONNECTION_OPEN: value.handlePostConnectionOpen,
|
|
EXPERIMENT_OVERRIDE_BUCKET: value.handleSetCallNotificationExperiment,
|
|
EXPERIMENTS_FETCH_SUCCESS: value.handleSetCallNotificationExperiment,
|
|
APP_STATE_UPDATE: value.updateAndClearStaleNotifications};
|
|
return value;
|
|
}
|
|
|
|
function clearStaleNotifications() { // fn#124706, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16350:1982, offset: 0x025c11c0, size: 143 bytes, params: 1, frame: 15
|
|
var value4;
|
|
const value2 = env3_0(env3_2[11]);
|
|
if (value2.shouldClearChannelNotificationsOnAppForeground({location: 'clearStaleNotifications'})) {
|
|
value4 = env3_14.filter(_fun124707).map(function(a0) {
|
|
return a0.identifier;
|
|
});
|
|
if (value4.length > 0) {
|
|
env3_1(env3_2[12]).removeDeliveredNotifications(value4);
|
|
env3_18();
|
|
}
|
|
}
|
|
}
|
|
|
|
function* _fun124713() { // fn#124713, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16350:3374, offset: 0x025c154e, size: 985 bytes, params: 1, frame: 36
|
|
var environment;
|
|
var r3;
|
|
var r15;
|
|
var r8;
|
|
var r24;
|
|
var value5;
|
|
var binding2;
|
|
var property;
|
|
var value6;
|
|
var isIOS2;
|
|
var value8;
|
|
var closure;
|
|
var value9;
|
|
var value10;
|
|
var value11;
|
|
var value12;
|
|
var value13;
|
|
var Map;
|
|
var prototype;
|
|
var map;
|
|
var value15;
|
|
var binding3;
|
|
var value16;
|
|
var isIOS3;
|
|
var value17;
|
|
var value18;
|
|
var value19;
|
|
var value20;
|
|
var trim;
|
|
var value21;
|
|
var split;
|
|
var value22;
|
|
var forEach;
|
|
var value23;
|
|
var value24;
|
|
var value25;
|
|
var value26;
|
|
var done;
|
|
var value28;
|
|
var JSON;
|
|
var parse;
|
|
var value29;
|
|
var binding4;
|
|
var value30;
|
|
var isIOS4;
|
|
var _local_uuid;
|
|
var value31;
|
|
var get;
|
|
var value32;
|
|
var value33;
|
|
var binding5;
|
|
var value34;
|
|
var track;
|
|
var PUSH_NOTIFICATION_RECEIVED;
|
|
var object2;
|
|
var timestamp;
|
|
var value35;
|
|
var push_action_type;
|
|
var notif_instance_id;
|
|
var notif_type_id;
|
|
var join_id;
|
|
var notif_user_id;
|
|
var receiving_user_id;
|
|
var message_id;
|
|
var message_type;
|
|
var guild_id;
|
|
var channel_id;
|
|
var channel_type;
|
|
var value36;
|
|
var toString;
|
|
var value37;
|
|
var rel_type;
|
|
var mention_type;
|
|
var app_state;
|
|
var os_enabled;
|
|
var value38;
|
|
var binding6;
|
|
var value39;
|
|
var removeFile;
|
|
var value40;
|
|
var value41;
|
|
var value42;
|
|
var binding7;
|
|
var value43;
|
|
var isIOS5;
|
|
var binding8;
|
|
var value44;
|
|
var value45;
|
|
var value46;
|
|
var value47;
|
|
var error;
|
|
var error2;
|
|
if (false) {
|
|
return undefined;
|
|
}
|
|
value = undefined;
|
|
var env0_0;
|
|
var env0_1;
|
|
let binding = env3_0;
|
|
const value4 = binding(env3_2[14]);
|
|
let isIOS = value4.isIOS;
|
|
if (Reflect.apply(isIOS, value4, [])) {
|
|
env3_20();
|
|
} else {
|
|
value5 = environment.__proto__;
|
|
NativeNotificationsManager.handleSetCallNotificationExperiment();
|
|
}
|
|
reducibleJoin5: while (true) {
|
|
reduciblePort182: while (true) {
|
|
exceptionLanding181: while (true) {
|
|
try {
|
|
binding = env3_0;
|
|
} catch (error) {
|
|
break exceptionLanding181;
|
|
}
|
|
break reducibleJoin5;
|
|
}
|
|
binding = env3_13;
|
|
error2 = binding.error;
|
|
Reflect.apply(error2, binding, ['Error tracking push notifications', error]);
|
|
break reduciblePort182;
|
|
}
|
|
return value;
|
|
}
|
|
try {
|
|
binding2 = env3_2;
|
|
} catch (error) {
|
|
break exceptionLanding181;
|
|
}
|
|
try {
|
|
property = binding2[14];
|
|
} catch (error) {
|
|
break exceptionLanding181;
|
|
}
|
|
try {
|
|
value6 = binding(property);
|
|
} catch (error) {
|
|
break exceptionLanding181;
|
|
}
|
|
try {
|
|
isIOS = value6.isIOS;
|
|
} catch (error) {
|
|
break exceptionLanding181;
|
|
}
|
|
try {
|
|
isIOS2 = Reflect.apply(isIOS, value6, []);
|
|
} catch (error) {
|
|
break exceptionLanding181;
|
|
}
|
|
reducibleJoin12: while (true) {
|
|
if (isIOS2) {
|
|
value8 = 'shared';
|
|
r3 = value8;
|
|
break reducibleJoin12;
|
|
}
|
|
r3 = 'cache';
|
|
break reducibleJoin12;
|
|
}
|
|
try {
|
|
env0_0 = r3;
|
|
} catch (error) {
|
|
break exceptionLanding181;
|
|
}
|
|
try {
|
|
closure = _fun124714;
|
|
} catch (error) {
|
|
break exceptionLanding181;
|
|
}
|
|
try {
|
|
value9 = closure();
|
|
} catch (error) {
|
|
break exceptionLanding181;
|
|
}
|
|
try {
|
|
value10 = value9('notifications_to_track', 'processing_notifications');
|
|
} catch (error) {
|
|
break exceptionLanding181;
|
|
}
|
|
yield value10;
|
|
try {
|
|
value11 = undefined;
|
|
value12 = false;
|
|
} catch (error) {
|
|
break exceptionLanding181;
|
|
}
|
|
if (value12) {
|
|
return value11;
|
|
}
|
|
try {
|
|
value13 = value11 == null;
|
|
} catch (error) {
|
|
break exceptionLanding181;
|
|
}
|
|
if (!value13) {
|
|
try {
|
|
Map = global.Map;
|
|
} catch (error) {
|
|
break exceptionLanding181;
|
|
}
|
|
try {
|
|
prototype = Map.prototype;
|
|
} catch (error) {
|
|
break exceptionLanding181;
|
|
}
|
|
try {
|
|
} catch (error) {
|
|
break exceptionLanding181;
|
|
}
|
|
try {
|
|
map = new Map();
|
|
} catch (error) {
|
|
break exceptionLanding181;
|
|
}
|
|
try {
|
|
value15 = map instanceof Object ? map : undefined;
|
|
} catch (error) {
|
|
break exceptionLanding181;
|
|
}
|
|
try {
|
|
env0_1 = value15;
|
|
} catch (error) {
|
|
break exceptionLanding181;
|
|
}
|
|
try {
|
|
binding = env3_0;
|
|
} catch (error) {
|
|
break exceptionLanding181;
|
|
}
|
|
try {
|
|
binding3 = env3_2;
|
|
} catch (error) {
|
|
break exceptionLanding181;
|
|
}
|
|
try {
|
|
property = binding3[14];
|
|
} catch (error) {
|
|
break exceptionLanding181;
|
|
}
|
|
try {
|
|
value16 = binding(property);
|
|
} catch (error) {
|
|
break exceptionLanding181;
|
|
}
|
|
try {
|
|
isIOS = value16.isIOS;
|
|
} catch (error) {
|
|
break exceptionLanding181;
|
|
}
|
|
try {
|
|
isIOS3 = Reflect.apply(isIOS, value16, []);
|
|
} catch (error) {
|
|
break exceptionLanding181;
|
|
}
|
|
if (isIOS3) {
|
|
try {
|
|
value17 = value9('notification_states_to_track', 'processing_notification_states');
|
|
} catch (error) {
|
|
break exceptionLanding181;
|
|
}
|
|
yield value17;
|
|
try {
|
|
value18 = undefined;
|
|
value19 = false;
|
|
} catch (error) {
|
|
break exceptionLanding181;
|
|
}
|
|
if (value19) {
|
|
return value18;
|
|
}
|
|
try {
|
|
value20 = value18 === null;
|
|
} catch (error) {
|
|
break exceptionLanding181;
|
|
}
|
|
reducibleJoin56: while (true) {
|
|
if (value20) {
|
|
break reducibleJoin56;
|
|
}
|
|
try {
|
|
trim = value18.trim;
|
|
} catch (error) {
|
|
break exceptionLanding181;
|
|
}
|
|
try {
|
|
value21 = Reflect.apply(trim, value18, []);
|
|
} catch (error) {
|
|
break exceptionLanding181;
|
|
}
|
|
try {
|
|
split = value21.split;
|
|
} catch (error) {
|
|
break exceptionLanding181;
|
|
}
|
|
try {
|
|
value22 = Reflect.apply(split, value21, ['\n']);
|
|
} catch (error) {
|
|
break exceptionLanding181;
|
|
}
|
|
try {
|
|
forEach = value22.forEach;
|
|
} catch (error) {
|
|
break exceptionLanding181;
|
|
}
|
|
try {
|
|
closure = _fun124718;
|
|
} catch (error) {
|
|
break exceptionLanding181;
|
|
}
|
|
try {
|
|
Reflect.apply(forEach, value22, [closure]);
|
|
} catch (error) {
|
|
break exceptionLanding181;
|
|
}
|
|
break reducibleJoin56;
|
|
}
|
|
}
|
|
try {
|
|
closure = function(a0) {
|
|
var value;
|
|
if (a0 != null) {
|
|
value = typeof a0;
|
|
return value === 'number' ? global.Math.round(1000 * a0) : value !== 'string' ? undefined : (0,
|
|
global.parseInt)(a0,
|
|
10);
|
|
}
|
|
};
|
|
} catch (error) {
|
|
break exceptionLanding181;
|
|
}
|
|
try {
|
|
binding = env3_15;
|
|
} catch (error) {
|
|
break exceptionLanding181;
|
|
}
|
|
try {
|
|
trim = value11.trim;
|
|
} catch (error) {
|
|
break exceptionLanding181;
|
|
}
|
|
try {
|
|
value23 = Reflect.apply(trim, value11, []);
|
|
} catch (error) {
|
|
break exceptionLanding181;
|
|
}
|
|
try {
|
|
split = value23.split;
|
|
} catch (error) {
|
|
break exceptionLanding181;
|
|
}
|
|
try {
|
|
value24 = Reflect.apply(split, value23, ['\n']);
|
|
} catch (error) {
|
|
break exceptionLanding181;
|
|
}
|
|
try {
|
|
value25 = binding(value24);
|
|
} catch (error) {
|
|
break exceptionLanding181;
|
|
}
|
|
try {
|
|
value26 = value25();
|
|
} catch (error) {
|
|
break exceptionLanding181;
|
|
}
|
|
try {
|
|
done = value26.done;
|
|
} catch (error) {
|
|
break exceptionLanding181;
|
|
}
|
|
if (!done) {
|
|
r15 = value26;
|
|
reducibleLoop70: while (true) {
|
|
try {
|
|
value28 = r15.value;
|
|
} catch (error) {
|
|
break exceptionLanding181;
|
|
}
|
|
try {
|
|
JSON = global.JSON;
|
|
} catch (error) {
|
|
break exceptionLanding181;
|
|
}
|
|
try {
|
|
parse = JSON.parse;
|
|
} catch (error) {
|
|
break exceptionLanding181;
|
|
}
|
|
try {
|
|
value29 = Reflect.apply(parse, JSON, [value28]);
|
|
} catch (error) {
|
|
break exceptionLanding181;
|
|
}
|
|
try {
|
|
binding = env3_0;
|
|
} catch (error) {
|
|
break exceptionLanding181;
|
|
}
|
|
try {
|
|
binding4 = env3_2;
|
|
} catch (error) {
|
|
break exceptionLanding181;
|
|
}
|
|
try {
|
|
property = binding4[14];
|
|
} catch (error) {
|
|
break exceptionLanding181;
|
|
}
|
|
try {
|
|
value30 = binding(property);
|
|
} catch (error) {
|
|
break exceptionLanding181;
|
|
}
|
|
try {
|
|
isIOS = value30.isIOS;
|
|
} catch (error) {
|
|
break exceptionLanding181;
|
|
}
|
|
try {
|
|
isIOS4 = Reflect.apply(isIOS, value30, []);
|
|
} catch (error) {
|
|
break exceptionLanding181;
|
|
}
|
|
reducibleJoin94: while (true) {
|
|
if (isIOS4) {
|
|
try {
|
|
_local_uuid = value29._local_uuid;
|
|
} catch (error) {
|
|
break exceptionLanding181;
|
|
}
|
|
try {
|
|
value31 = value === _local_uuid;
|
|
} catch (error) {
|
|
break exceptionLanding181;
|
|
}
|
|
if (value31) {
|
|
break reducibleJoin94;
|
|
}
|
|
try {
|
|
get = value15.get;
|
|
} catch (error) {
|
|
break exceptionLanding181;
|
|
}
|
|
try {
|
|
_local_uuid = value29._local_uuid;
|
|
} catch (error) {
|
|
break exceptionLanding181;
|
|
}
|
|
try {
|
|
value32 = Reflect.apply(get, value15, [_local_uuid]);
|
|
} catch (error) {
|
|
break exceptionLanding181;
|
|
}
|
|
try {
|
|
value33 = value32 != null;
|
|
} catch (error) {
|
|
break exceptionLanding181;
|
|
}
|
|
reducibleJoin93: while (true) {
|
|
if (value33) {
|
|
r8 = value32;
|
|
break reducibleJoin93;
|
|
}
|
|
r8 = 'background';
|
|
break reducibleJoin93;
|
|
}
|
|
try {
|
|
value29.app_state = r8;
|
|
} catch (error) {
|
|
break exceptionLanding181;
|
|
}
|
|
break reducibleJoin94;
|
|
}
|
|
break reducibleJoin94;
|
|
}
|
|
try {
|
|
binding = env3_1;
|
|
} catch (error) {
|
|
break exceptionLanding181;
|
|
}
|
|
try {
|
|
binding5 = env3_2;
|
|
} catch (error) {
|
|
break exceptionLanding181;
|
|
}
|
|
try {
|
|
property = binding5[16];
|
|
} catch (error) {
|
|
break exceptionLanding181;
|
|
}
|
|
try {
|
|
value34 = binding(property);
|
|
} catch (error) {
|
|
break exceptionLanding181;
|
|
}
|
|
try {
|
|
track = value34.track;
|
|
} catch (error) {
|
|
break exceptionLanding181;
|
|
}
|
|
try {
|
|
binding = env3_12;
|
|
} catch (error) {
|
|
break exceptionLanding181;
|
|
}
|
|
try {
|
|
PUSH_NOTIFICATION_RECEIVED = binding.PUSH_NOTIFICATION_RECEIVED;
|
|
} catch (error) {
|
|
break exceptionLanding181;
|
|
}
|
|
try {
|
|
object2 = {};
|
|
} catch (error) {
|
|
break exceptionLanding181;
|
|
}
|
|
try {
|
|
timestamp = value29.timestamp;
|
|
} catch (error) {
|
|
break exceptionLanding181;
|
|
}
|
|
try {
|
|
value35 = closure(timestamp);
|
|
} catch (error) {
|
|
break exceptionLanding181;
|
|
}
|
|
try {
|
|
object2.notification_received_timestamp = value35;
|
|
} catch (error) {
|
|
break exceptionLanding181;
|
|
}
|
|
try {
|
|
push_action_type = value29.push_action_type;
|
|
} catch (error) {
|
|
break exceptionLanding181;
|
|
}
|
|
try {
|
|
object2.push_action_type = push_action_type;
|
|
} catch (error) {
|
|
break exceptionLanding181;
|
|
}
|
|
try {
|
|
notif_instance_id = value29.notif_instance_id;
|
|
} catch (error) {
|
|
break exceptionLanding181;
|
|
}
|
|
try {
|
|
object2.notif_instance_id = notif_instance_id;
|
|
} catch (error) {
|
|
break exceptionLanding181;
|
|
}
|
|
try {
|
|
notif_type_id = value29.notif_type_id;
|
|
} catch (error) {
|
|
break exceptionLanding181;
|
|
}
|
|
try {
|
|
object2.notif_type_id = notif_type_id;
|
|
} catch (error) {
|
|
break exceptionLanding181;
|
|
}
|
|
try {
|
|
join_id = value29.join_id;
|
|
} catch (error) {
|
|
break exceptionLanding181;
|
|
}
|
|
try {
|
|
object2.join_id = join_id;
|
|
} catch (error) {
|
|
break exceptionLanding181;
|
|
}
|
|
try {
|
|
notif_user_id = value29.notif_user_id;
|
|
} catch (error) {
|
|
break exceptionLanding181;
|
|
}
|
|
try {
|
|
object2.notif_user_id = notif_user_id;
|
|
} catch (error) {
|
|
break exceptionLanding181;
|
|
}
|
|
try {
|
|
receiving_user_id = value29.receiving_user_id;
|
|
} catch (error) {
|
|
break exceptionLanding181;
|
|
}
|
|
try {
|
|
object2.receiving_user_id = receiving_user_id;
|
|
} catch (error) {
|
|
break exceptionLanding181;
|
|
}
|
|
try {
|
|
message_id = value29.message_id;
|
|
} catch (error) {
|
|
break exceptionLanding181;
|
|
}
|
|
try {
|
|
object2.message_id = message_id;
|
|
} catch (error) {
|
|
break exceptionLanding181;
|
|
}
|
|
try {
|
|
message_type = value29.message_type;
|
|
} catch (error) {
|
|
break exceptionLanding181;
|
|
}
|
|
try {
|
|
object2.message_type = message_type;
|
|
} catch (error) {
|
|
break exceptionLanding181;
|
|
}
|
|
try {
|
|
guild_id = value29.guild_id;
|
|
} catch (error) {
|
|
break exceptionLanding181;
|
|
}
|
|
try {
|
|
object2.guild_id = guild_id;
|
|
} catch (error) {
|
|
break exceptionLanding181;
|
|
}
|
|
try {
|
|
channel_id = value29.channel_id;
|
|
} catch (error) {
|
|
break exceptionLanding181;
|
|
}
|
|
try {
|
|
object2.channel_id = channel_id;
|
|
} catch (error) {
|
|
break exceptionLanding181;
|
|
}
|
|
try {
|
|
channel_type = value29.channel_type;
|
|
} catch (error) {
|
|
break exceptionLanding181;
|
|
}
|
|
try {
|
|
value36 = channel_type == null;
|
|
} catch (error) {
|
|
break exceptionLanding181;
|
|
}
|
|
reducibleJoin133: while (true) {
|
|
if (value36) {
|
|
r24 = value;
|
|
break reducibleJoin133;
|
|
}
|
|
try {
|
|
toString = channel_type.toString;
|
|
} catch (error) {
|
|
break exceptionLanding181;
|
|
}
|
|
try {
|
|
value37 = Reflect.apply(toString, channel_type, []);
|
|
} catch (error) {
|
|
break exceptionLanding181;
|
|
}
|
|
r24 = value37;
|
|
break reducibleJoin133;
|
|
}
|
|
try {
|
|
object2.channel_type = r24;
|
|
} catch (error) {
|
|
break exceptionLanding181;
|
|
}
|
|
try {
|
|
rel_type = value29.rel_type;
|
|
} catch (error) {
|
|
break exceptionLanding181;
|
|
}
|
|
try {
|
|
object2.rel_type = rel_type;
|
|
} catch (error) {
|
|
break exceptionLanding181;
|
|
}
|
|
try {
|
|
mention_type = value29.mention_type;
|
|
} catch (error) {
|
|
break exceptionLanding181;
|
|
}
|
|
try {
|
|
object2.mention_type = mention_type;
|
|
} catch (error) {
|
|
break exceptionLanding181;
|
|
}
|
|
try {
|
|
app_state = value29.app_state;
|
|
} catch (error) {
|
|
break exceptionLanding181;
|
|
}
|
|
try {
|
|
object2.app_state = app_state;
|
|
} catch (error) {
|
|
break exceptionLanding181;
|
|
}
|
|
try {
|
|
os_enabled = value29.os_enabled;
|
|
} catch (error) {
|
|
break exceptionLanding181;
|
|
}
|
|
try {
|
|
object2.os_enabled = os_enabled;
|
|
} catch (error) {
|
|
break exceptionLanding181;
|
|
}
|
|
try {
|
|
Reflect.apply(track, value34, [PUSH_NOTIFICATION_RECEIVED, object2]);
|
|
} catch (error) {
|
|
break exceptionLanding181;
|
|
}
|
|
try {
|
|
value38 = value25();
|
|
} catch (error) {
|
|
break exceptionLanding181;
|
|
}
|
|
try {
|
|
done = value38.done;
|
|
} catch (error) {
|
|
break exceptionLanding181;
|
|
}
|
|
if (done) {
|
|
break reducibleLoop70;
|
|
}
|
|
r15 = value38;
|
|
continue reducibleLoop70;
|
|
}
|
|
}
|
|
try {
|
|
binding = env3_0;
|
|
} catch (error) {
|
|
break exceptionLanding181;
|
|
}
|
|
try {
|
|
binding6 = env3_2;
|
|
} catch (error) {
|
|
break exceptionLanding181;
|
|
}
|
|
try {
|
|
property = binding6[15];
|
|
} catch (error) {
|
|
break exceptionLanding181;
|
|
}
|
|
try {
|
|
value39 = binding(property);
|
|
} catch (error) {
|
|
break exceptionLanding181;
|
|
}
|
|
try {
|
|
removeFile = value39.removeFile;
|
|
} catch (error) {
|
|
break exceptionLanding181;
|
|
}
|
|
try {
|
|
value40 = Reflect.apply(removeFile, value39, [r3, 'processing_notifications']);
|
|
} catch (error) {
|
|
break exceptionLanding181;
|
|
}
|
|
yield value40;
|
|
try {
|
|
value41 = undefined;
|
|
value42 = false;
|
|
} catch (error) {
|
|
break exceptionLanding181;
|
|
}
|
|
if (value42) {
|
|
return value41;
|
|
}
|
|
try {
|
|
binding = env3_0;
|
|
} catch (error) {
|
|
break exceptionLanding181;
|
|
}
|
|
try {
|
|
binding7 = env3_2;
|
|
} catch (error) {
|
|
break exceptionLanding181;
|
|
}
|
|
try {
|
|
property = binding7[14];
|
|
} catch (error) {
|
|
break exceptionLanding181;
|
|
}
|
|
try {
|
|
value43 = binding(property);
|
|
} catch (error) {
|
|
break exceptionLanding181;
|
|
}
|
|
try {
|
|
isIOS = value43.isIOS;
|
|
} catch (error) {
|
|
break exceptionLanding181;
|
|
}
|
|
try {
|
|
isIOS5 = Reflect.apply(isIOS, value43, []);
|
|
} catch (error) {
|
|
break exceptionLanding181;
|
|
}
|
|
if (isIOS5) {
|
|
try {
|
|
binding = env3_0;
|
|
} catch (error) {
|
|
break exceptionLanding181;
|
|
}
|
|
try {
|
|
binding8 = env3_2;
|
|
} catch (error) {
|
|
break exceptionLanding181;
|
|
}
|
|
try {
|
|
property = binding8[15];
|
|
} catch (error) {
|
|
break exceptionLanding181;
|
|
}
|
|
try {
|
|
value44 = binding(property);
|
|
} catch (error) {
|
|
break exceptionLanding181;
|
|
}
|
|
try {
|
|
removeFile = value44.removeFile;
|
|
} catch (error) {
|
|
break exceptionLanding181;
|
|
}
|
|
try {
|
|
value45 = Reflect.apply(removeFile, value44, [r3, 'processing_notification_states']);
|
|
} catch (error) {
|
|
break exceptionLanding181;
|
|
}
|
|
yield value45;
|
|
try {
|
|
value46 = undefined;
|
|
value47 = false;
|
|
} catch (error) {
|
|
break exceptionLanding181;
|
|
}
|
|
reducibleJoin182: while (true) {
|
|
if (value47) {
|
|
return value46;
|
|
}
|
|
break reducibleJoin182;
|
|
}
|
|
}
|
|
}
|
|
return value;
|
|
}
|
|
|
|
function _fun124707(a0) { // fn#124707, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16350:2132, offset: 0x025c124f, size: 310 bytes, params: 2, frame: 15
|
|
var r4;
|
|
var r0;
|
|
var message_id;
|
|
var value;
|
|
var binding;
|
|
var ackMessageId;
|
|
var value2;
|
|
var value3;
|
|
let userInfo = a0.userInfo;
|
|
if (userInfo != null) {
|
|
userInfo = a0.userInfo;
|
|
if (typeof userInfo !== 'object') {
|
|
return false;
|
|
}
|
|
userInfo = a0.userInfo;
|
|
if (typeof userInfo.channel_id !== 'string') {
|
|
return false;
|
|
}
|
|
userInfo = a0.userInfo;
|
|
var notif_instance_id = userInfo.notif_instance_id;
|
|
if (typeof notif_instance_id !== 'string') {
|
|
return false;
|
|
}
|
|
userInfo = a0.userInfo;
|
|
notif_instance_id = userInfo.notif_instance_id;
|
|
userInfo = a0.userInfo;
|
|
var type = userInfo.type;
|
|
if (type === 'MESSAGE_CREATE') {
|
|
userInfo = a0.userInfo;
|
|
message_id = userInfo.message_id;
|
|
if (typeof message_id !== 'string') {
|
|
return false;
|
|
}
|
|
userInfo = a0.userInfo;
|
|
message_id = userInfo.message_id;
|
|
r4 = message_id;
|
|
if (r4 == null) {
|
|
return false;
|
|
}
|
|
if (typeof r4 !== 'string') {
|
|
return false;
|
|
}
|
|
value = environment.__proto__.__proto__.__proto__.__proto__;
|
|
binding = env4_11;
|
|
ackMessageId = binding.ackMessageId;
|
|
userInfo = a0.userInfo;
|
|
value2 = Reflect.apply(ackMessageId, binding, [userInfo.channel_id]);
|
|
value3 = value2 != null;
|
|
if (value3) {
|
|
value = env4_1(env4_2[13]);
|
|
value = value.compare(value2, r4);
|
|
value = !(value <= 0);
|
|
r0 = value;
|
|
} else {
|
|
r0 = value3;
|
|
}
|
|
return r0;
|
|
}
|
|
userInfo = a0.userInfo;
|
|
type = userInfo.type;
|
|
if (type !== 'GENERIC_PUSH_NOTIFICATION_SENT') {
|
|
return false;
|
|
}
|
|
userInfo = a0.userInfo;
|
|
if (userInfo.notification_type === 'REACTIONS_PUSH_NOTIFICATION') {
|
|
r4 = notif_instance_id;
|
|
if (r4 == null) {
|
|
return false;
|
|
}
|
|
if (typeof r4 !== 'string') {
|
|
return false;
|
|
}
|
|
value = environment.__proto__.__proto__.__proto__.__proto__;
|
|
binding = env4_11;
|
|
value2 = binding.ackMessageId(a0.userInfo.channel_id);
|
|
value3 = value2 != null;
|
|
if (value3) {
|
|
value = env4_1(env4_2[13]);
|
|
value = value.compare(value2, r4);
|
|
value = !(value <= 0);
|
|
r0 = value;
|
|
} else {
|
|
r0 = value3;
|
|
}
|
|
return r0;
|
|
}
|
|
}
|
|
return false;
|
|
}
|
|
|
|
function _fun124714() { // fn#124714, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16350:3590, offset: 0x025c1927, size: 36 bytes, params: 1, frame: 12
|
|
const env0_0 = env4_8(_fun124716);
|
|
return _fun124717;
|
|
}
|
|
|
|
function _fun124718(a0) { // fn#124718, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16350:3978, offset: 0x025c1a11, size: 56 bytes, params: 2, frame: 13
|
|
const JSON = global.JSON;
|
|
const value = JSON.parse(a0);
|
|
const binding = env0_1;
|
|
binding.set(value._local_uuid, value.app_state);
|
|
}
|
|
|
|
function* _fun124716(a0, a1) { // fn#124716, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16350:3610, offset: 0x025c1956, size: 187 bytes, params: 3, frame: 21
|
|
if (false) {
|
|
return undefined;
|
|
}
|
|
value = environment.__proto__.__proto__.__proto__.__proto__.__proto__.__proto__;
|
|
const value3 = env6_0(env6_2[15]);
|
|
yield value3.removeFile(env2_0, a1);
|
|
if (false) {
|
|
return undefined;
|
|
}
|
|
const value7 = env6_0(env6_2[15]);
|
|
yield value7.moveFile(env2_0, a0, a1);
|
|
const value8 = undefined;
|
|
if (false) {
|
|
return value8;
|
|
}
|
|
const value10 = null;
|
|
if (value8) {
|
|
value = env6_0(env6_2[15]);
|
|
yield value.readFile(env2_0, a1, 'utf8');
|
|
value = undefined;
|
|
if (false) {
|
|
return value;
|
|
}
|
|
return value;
|
|
}
|
|
return value10;
|
|
}
|
|
|