145 lines
6.4 KiB
React
145 lines
6.4 KiB
React
/* Metro module 1030; source: unknown; dependencies: [1027] */
|
|
function _fun10747(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#10747, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1157:6, offset: 0x00d94f58, size: 104 bytes, params: 8, frame: 6
|
|
let env0_0 = require;
|
|
const closure = disable_10748;
|
|
const matchWhitelist = function(a0, a1) {
|
|
var env0_0 = a0;
|
|
return a1.some(_fun10750);
|
|
};
|
|
const ReferenceError = global.ReferenceError;
|
|
const items2 = [ReferenceError];
|
|
const TypeError = global.TypeError;
|
|
items2[1] = TypeError;
|
|
const RangeError = global.RangeError;
|
|
items2[2] = RangeError;
|
|
exports.disable = closure;
|
|
exports.enable = enable_10751;
|
|
}
|
|
|
|
function disable_10748() { // fn#10748, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1157:92, offset: 0x00d94fc0, size: 55 bytes, params: 1, frame: 14
|
|
(require(1027) /* metro dependency 1027 */)._37 = null;
|
|
(require(1027) /* metro dependency 1027 */)._87 = null;
|
|
}
|
|
|
|
function matchWhitelist(a0, a1) { // fn#10749, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1157:150, offset: 0x00d94ff7, size: 30 bytes, params: 3, frame: 11
|
|
const env0_0 = a0;
|
|
return a1.some(_fun10750);
|
|
}
|
|
|
|
function enable_10751(a0) { // fn#10751, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1157:258, offset: 0x00d95025, size: 121 bytes, params: 2, frame: 15
|
|
const value = a0;
|
|
const env0_0 = value || ({});
|
|
if (env0_3) {
|
|
disable_10748();
|
|
}
|
|
var env0_3 = {};
|
|
(require(1027) /* metro dependency 1027 */)._37 = _37;
|
|
(require(1027) /* metro dependency 1027 */)._87 = _87;
|
|
}
|
|
|
|
function _fun10750(a0) { // fn#10750, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1157:194, offset: 0x00d95015, size: 16 bytes, params: 2, frame: 2
|
|
return env0_0 instanceof a0;
|
|
}
|
|
|
|
function enable_10751OnUnhandled(a0) { // fn#10752, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1157:320, owner: enable_10751.onUnhandled, offset: 0x00d9509e, size: 220 bytes, params: 2, frame: 17
|
|
var binding;
|
|
var property;
|
|
var value4;
|
|
var onUnhandled;
|
|
if (env0_0.allRejections || matchWhitelist(env0_3[a0].error, env0_0.whitelist || env1_2)) {
|
|
property = env0_3[a0];
|
|
binding = env0_2;
|
|
value4 = typeof binding === 'bigint' ? binding : +binding;
|
|
env0_2 = typeof value4 === 'bigint' ? value4 + 1n : +value4 + 1;
|
|
property.displayId = value4;
|
|
onUnhandled = env0_0.onUnhandled;
|
|
env0_3[a0].logged = true;
|
|
if (onUnhandled) {
|
|
binding = env0_0;
|
|
binding.onUnhandled(env0_3[a0].displayId, env0_3[a0].error);
|
|
} else {
|
|
((a0, a1) => {
|
|
var value = a1;
|
|
global.console.warn('Possible Unhandled Promise Rejection (id: ' + a0 + '):');
|
|
value = String(value && value.stack ? value.stack : value);
|
|
value = value.split('\n');
|
|
value.forEach(_fun10754);
|
|
})(env0_3[a0].displayId, env0_3[a0].error);
|
|
}
|
|
}
|
|
}
|
|
|
|
function _37(a0) { // fn#10755, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1157:725, owner: enable_10751._37, offset: 0x00d95204, size: 333 bytes, params: 2, frame: 17
|
|
var binding;
|
|
var _51;
|
|
var console;
|
|
var warn;
|
|
var displayId;
|
|
if (a0._65 === 2 && env0_3[a0._51]) {
|
|
binding = env0_3;
|
|
_51 = a0._51;
|
|
if (binding[_51].logged) {
|
|
_51 = a0._51;
|
|
if (env0_3[_51].logged) {
|
|
if (env0_0.onHandled) {
|
|
binding = env0_0;
|
|
binding.onHandled(env0_3[_51].displayId, env0_3[_51].error);
|
|
} else if (!env0_3[_51].onUnhandled) {
|
|
console = global.console;
|
|
warn = console.warn;
|
|
displayId = env0_3[_51].displayId;
|
|
Reflect.apply(warn, console, ['Promise Rejection Handled (id: ' + displayId + '):']);
|
|
console = global.console;
|
|
warn = console.warn;
|
|
displayId = env0_3[_51].displayId;
|
|
Reflect.apply(warn, console,
|
|
[' This means you can ignore any previous messages of the form "Possible Unhandled Promise Rejection" with id ' + displayId + '.']);
|
|
}
|
|
}
|
|
} else {
|
|
global.clearTimeout(env0_3[a0._51].timeout);
|
|
}
|
|
binding = env0_3;
|
|
_51 = a0._51;
|
|
delete binding[_51];
|
|
}
|
|
}
|
|
|
|
function _87(a0, a1) { // fn#10756, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1157:1165, owner: enable_10751._87, offset: 0x00d95351, size: 153 bytes, params: 3, frame: 18
|
|
var value;
|
|
var binding;
|
|
var value2;
|
|
var _51;
|
|
var object2;
|
|
var setTimeout;
|
|
var enable_10751OnUnhandledBinding;
|
|
var value3;
|
|
if (a0._40 === 0) {
|
|
binding = env0_1;
|
|
value2 = typeof binding === 'bigint' ? binding : +binding;
|
|
env0_1 = typeof value2 === 'bigint' ? value2 + 1n : +value2 + 1;
|
|
a0._51 = value2;
|
|
binding = env0_3;
|
|
_51 = a0._51;
|
|
object2 = {displayId: null, error: a1};
|
|
setTimeout = global.setTimeout;
|
|
enable_10751OnUnhandledBinding = enable_10751OnUnhandled;
|
|
value = enable_10751OnUnhandledBinding.bind(null, a0._51);
|
|
value3 = environment.__proto__;
|
|
object2.timeout = setTimeout(value, matchWhitelist(a1, env1_2) ? 100 : 2000);
|
|
object2.logged = false;
|
|
binding[_51] = object2;
|
|
}
|
|
}
|
|
|
|
function onUnhandledLogError(a0, a1) { // fn#10753, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1157:514, owner: enable_10751.onUnhandled.logError, offset: 0x00d9517a, size: 103 bytes, params: 3, frame: 13
|
|
let value = a1;
|
|
global.console.warn('Possible Unhandled Promise Rejection (id: ' + a0 + '):');
|
|
value = String(value && value.stack ? value.stack : value);
|
|
value = value.split('\n');
|
|
value.forEach(function(a0) {
|
|
global.console.warn(' ' + a0);
|
|
});
|
|
}
|
|
|