271 lines
10 KiB
TypeScript
271 lines
10 KiB
TypeScript
/* Metro module 12; source: modules/debug/LogAggregator.tsx; dependencies: [13, 2] */
|
|
import Module00013 from '../../by-id/module-00013.js'; /* Metro dependency 13 */
|
|
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
|
|
|
|
function _fun154(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#154, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:17:6, offset: 0x00c39b4c, size: 181 bytes, params: 8, frame: 17
|
|
const _arrayLikeToArray = 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 Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
let value = Module00013;
|
|
value = new value(5000);
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/debug/LogAggregator.tsx');
|
|
exports.report = report;
|
|
exports.clear = clear_159;
|
|
exports.stringify = stringify;
|
|
exports.getAllForDebugPanel = getAllForDebugPanel;
|
|
function _createForOfIteratorHelperLoose(a0, a1) { // fn#155, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:17:46, offset: 0x00c39c01, 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 _fun156;
|
|
}
|
|
value = undefined;
|
|
if (a0) {
|
|
if (typeof a0 === 'string') {
|
|
value = _arrayLikeToArray(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(a0, value);
|
|
r6 = value;
|
|
} else {
|
|
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
|
|
if (regexp.test(r9)) {
|
|
value = _arrayLikeToArray(a0, value);
|
|
r6 = value;
|
|
} else {
|
|
r6 = value;
|
|
}
|
|
}
|
|
r5 = r6;
|
|
}
|
|
} else {
|
|
r5 = value;
|
|
}
|
|
if (r5) {
|
|
if (r5) {
|
|
}
|
|
return _fun156;
|
|
}
|
|
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 _fun156() { // fn#156, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:17:617, offset: 0x00c39d73, size: 69 bytes, params: 1, frame: 5
|
|
return env0_1 >= env0_0.length ? {done: true} : {done: false,
|
|
value: env0_0[typeof env0_1 === 'bigint' ? env0_1 : +env0_1]};
|
|
}
|
|
|
|
}
|
|
|
|
function report(a0, a1) { // fn#158, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:17:1106, offset: 0x00c39e00, size: 348 bytes, params: 3, frame: 25
|
|
var r4;
|
|
var r8;
|
|
var r14;
|
|
var r5;
|
|
var value5;
|
|
var value6;
|
|
var Error;
|
|
var JSON;
|
|
var stringify;
|
|
var value7;
|
|
var message;
|
|
var value8;
|
|
var stack;
|
|
var value9;
|
|
var value10;
|
|
var value11;
|
|
var binding;
|
|
var push;
|
|
var object;
|
|
var shift;
|
|
let value = copyRestArgs(1, undefined);
|
|
value = _createForOfIteratorHelperLoose(value);
|
|
const value3 = value();
|
|
let done = value3.done;
|
|
const value4 = '';
|
|
if (done) {
|
|
r5 = value4;
|
|
} else {
|
|
r4 = value4;
|
|
r8 = value3;
|
|
reducibleLoop1: while (true) {
|
|
value5 = r8.value;
|
|
value6 = typeof value5;
|
|
reducibleJoin8: while (true) {
|
|
reducibleJoin7: while (true) {
|
|
if (value6 === 'string') {
|
|
break reducibleJoin7;
|
|
}
|
|
if (value6 === 'number') {
|
|
break reducibleJoin7;
|
|
}
|
|
if (value6 === 'boolean') {
|
|
break reducibleJoin7;
|
|
}
|
|
Error = global.Error;
|
|
if (value5 instanceof Error) {
|
|
message = value5.message;
|
|
value8 = message + '\n';
|
|
stack = value5.stack;
|
|
value9 = r4 + (value8 + stack + ' ');
|
|
r14 = value9;
|
|
break reducibleJoin8;
|
|
}
|
|
JSON = global.JSON;
|
|
stringify = JSON.stringify;
|
|
value7 = r4 + (Reflect.apply(stringify, JSON, [value5]) + ' ');
|
|
r14 = value7;
|
|
break reducibleJoin8;
|
|
}
|
|
value10 = r4 + (value5 + ' ');
|
|
r14 = value10;
|
|
break reducibleJoin8;
|
|
}
|
|
value11 = value();
|
|
done = value11.done;
|
|
if (done) {
|
|
r5 = r14;
|
|
break reducibleLoop1;
|
|
}
|
|
r4 = r14;
|
|
r8 = value11;
|
|
continue reducibleLoop1;
|
|
}
|
|
}
|
|
if (typeof a0 === 'string') {
|
|
binding = env0_0;
|
|
push = binding.push;
|
|
object = {};
|
|
object.time = global.Date.now();
|
|
object.category = a0;
|
|
object.message = r5;
|
|
Reflect.apply(push, binding, [object]);
|
|
} else {
|
|
binding = env0_0;
|
|
push = binding.push;
|
|
object = {};
|
|
object.time = global.Date.now();
|
|
object.category = a0.name;
|
|
object.timing = a0.timing;
|
|
object.message = r5;
|
|
Reflect.apply(push, binding, [object]);
|
|
}
|
|
let length = env0_0.length;
|
|
if (length > 5000) {
|
|
reducibleLoop13: while (true) {
|
|
binding = env0_0;
|
|
shift = binding.shift;
|
|
Reflect.apply(shift, binding, []);
|
|
length = binding.length;
|
|
if (length > 5000) {
|
|
continue reducibleLoop13;
|
|
}
|
|
break reducibleLoop13;
|
|
}
|
|
}
|
|
}
|
|
|
|
function clear_159() { // fn#159, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:17:1568, offset: 0x00c389ec, size: 21 bytes, params: 1, frame: 9
|
|
env0_0.clear();
|
|
}
|
|
|
|
function stringify(a0) { // fn#160, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:17:1609, offset: 0x00c39f5c, size: 72 bytes, params: 2, frame: 12
|
|
const env0_0 = a0;
|
|
let value = env0_0.toArray();
|
|
value = value.filter(_fun161);
|
|
value = value.map(function(a0) {
|
|
var items = [];
|
|
items.push(new global.Date(a0.time).toISOString());
|
|
if (a0.timing != null) {
|
|
items.push(a0.timing);
|
|
}
|
|
items.push(a0.category, a0.message);
|
|
return items.join(' -> ');
|
|
});
|
|
return value.join('\n');
|
|
function _fun161(a0) { // fn#161, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:17:1658, offset: 0x00c39fa4, size: 40 bytes, params: 2, frame: 12
|
|
return env0_0 == null || env0_0.includes(a0.category);
|
|
}
|
|
|
|
}
|
|
|
|
function getAllForDebugPanel() { // fn#163, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:17:1874, offset: 0x00c3a04c, size: 48 bytes, params: 1, frame: 10
|
|
let value = a0;
|
|
let r0 = value !== undefined ? value : false;
|
|
value = env0_0.toArray();
|
|
if (r0) {
|
|
value = value.reverse();
|
|
r0 = value;
|
|
} else {
|
|
r0 = value;
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun154, 12, [13, 2]) /* metro module 12, dependencies: [13, 2] */;
|