419 lines
14 KiB
React
419 lines
14 KiB
React
/* Metro module 878; source: unknown; dependencies: [57, 65, 839, 847, 879, 880, 866, 841, 882, 873, 852] */
|
|
function _fun9470(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#9470, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1005:6, offset: 0x00d68180, size: 179 bytes, params: 8, frame: 21
|
|
const env0_0 = require;
|
|
const closure = applyClientOptions;
|
|
const closure2 = applyDebugIds;
|
|
const closure3 = applyDebugMeta;
|
|
const env0_2 = require(57) /* metro dependency 57 */;
|
|
const env0_3 = require(65) /* metro dependency 65 */;
|
|
const Object = global.Object;
|
|
const defineProperty = Object.defineProperty;
|
|
const Symbol = global.Symbol;
|
|
Reflect.apply(defineProperty, Object, [exports, Symbol.toStringTag, {value: 'Module'}]);
|
|
const env0_4 = ['user', 'level', 'extra', 'contexts', 'tags', 'fingerprint', 'propagationContext'];
|
|
exports.applyClientOptions = closure;
|
|
exports.applyDebugIds = closure2;
|
|
exports.applyDebugMeta = closure3;
|
|
exports.parseEventHintOrCaptureContext = parseEventHintOrCaptureContext;
|
|
exports.prepareEvent = prepareEvent;
|
|
}
|
|
|
|
function applyClientOptions(a0, {environment, release, dist, maxValueLength}) { // fn#9471, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1005:55, offset: 0x00d68233, size: 266 bytes, params: 3, frame: 18
|
|
var r1;
|
|
var r2;
|
|
var exception;
|
|
var values;
|
|
let r5 = a0.environment || environment;
|
|
r5 = !r5 ? (require(866) /* metro dependency 866 */).DEFAULT_ENVIRONMENT : r5;
|
|
a0.environment = r5;
|
|
if (!a0.release && release) {
|
|
a0.release = release;
|
|
}
|
|
if (!a0.dist && dist) {
|
|
a0.dist = dist;
|
|
}
|
|
const request = a0.request;
|
|
if (request != null && request.url && maxValueLength) {
|
|
value = require(841) /* metro dependency 841 */;
|
|
request.url = value.truncate(request.url, maxValueLength);
|
|
}
|
|
if (maxValueLength) {
|
|
exception = a0.exception;
|
|
value = exception == null;
|
|
if (value) {
|
|
r1 = value;
|
|
r2 = exception;
|
|
} else {
|
|
values = exception.values;
|
|
r1 = values == null;
|
|
r2 = values;
|
|
}
|
|
if (!r1) {
|
|
r2.forEach(_fun9472);
|
|
}
|
|
}
|
|
}
|
|
|
|
function applyDebugIds({exception}, a1) { // fn#9473, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1005:454, offset: 0x00d68383, size: 98 bytes, params: 3, frame: 15
|
|
var r2;
|
|
var r3;
|
|
var values;
|
|
const env0_0 = (require(882) /* metro dependency 882 */).getFilenameToDebugIdMap(a1);
|
|
value = exception == null;
|
|
if (value) {
|
|
r2 = value;
|
|
r3 = exception;
|
|
} else {
|
|
values = exception.values;
|
|
r2 = values == null;
|
|
r3 = values;
|
|
}
|
|
if (!r2) {
|
|
r3.forEach(function({stacktrace}) {
|
|
var r0;
|
|
var r2;
|
|
var value = stacktrace == null;
|
|
if (value) {
|
|
r0 = value;
|
|
r2 = stacktrace;
|
|
} else {
|
|
stacktrace = stacktrace.frames;
|
|
r0 = stacktrace == null;
|
|
r2 = stacktrace;
|
|
}
|
|
if (!r0) {
|
|
r2.forEach(_fun9475);
|
|
}
|
|
});
|
|
}
|
|
}
|
|
|
|
function applyDebugMeta(a0) { // fn#9476, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1005:709, offset: 0x00d68446, size: 188 bytes, params: 2, frame: 16
|
|
var r1;
|
|
var r5;
|
|
var r4;
|
|
var values;
|
|
var debug_meta;
|
|
var images;
|
|
const object2 = {};
|
|
const exception = a0.exception;
|
|
let value = exception == null;
|
|
if (value) {
|
|
r1 = value;
|
|
r5 = exception;
|
|
} else {
|
|
values = exception.values;
|
|
r1 = values == null;
|
|
r5 = values;
|
|
}
|
|
if (!r1) {
|
|
r5.forEach(function({stacktrace}) {
|
|
var r0;
|
|
var r2;
|
|
var value = stacktrace == null;
|
|
if (value) {
|
|
r0 = value;
|
|
r2 = stacktrace;
|
|
} else {
|
|
stacktrace = stacktrace.frames;
|
|
r0 = stacktrace == null;
|
|
r2 = stacktrace;
|
|
}
|
|
if (!r0) {
|
|
r2.forEach(_fun9478);
|
|
}
|
|
});
|
|
}
|
|
const Object = global.Object;
|
|
if (Object.keys(object2).length !== 0) {
|
|
debug_meta = a0.debug_meta;
|
|
r4 = debug_meta || ({});
|
|
a0.debug_meta = r4;
|
|
debug_meta = a0.debug_meta;
|
|
images = a0.debug_meta.images;
|
|
r4 = images || [];
|
|
debug_meta.images = r4;
|
|
debug_meta = a0.debug_meta;
|
|
images = debug_meta.images;
|
|
global.Object.entries(object2).forEach(_fun9479);
|
|
}
|
|
}
|
|
|
|
function parseEventHintOrCaptureContext(a0) { // fn#9480, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1005:1529, offset: 0x00d685de, size: 92 bytes, params: 2, frame: 13
|
|
var r0;
|
|
const value = a0;
|
|
if (value) {
|
|
r0 = value instanceof (require(852) /* metro dependency 852 */).Scope || typeof value === 'function';
|
|
r0 = r0 || ((a0) => {
|
|
var Object = global.Object;
|
|
return Object.keys(a0).some(_fun9482);
|
|
})(value) ? {captureContext: value} : value;
|
|
return r0;
|
|
}
|
|
}
|
|
|
|
function prepareEvent(a0, a1, a2, a3, a4, a5) { // fn#9483, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1005:1816, offset: 0x00d68679, size: 730 bytes, params: 7, frame: 26
|
|
var r7;
|
|
var r1;
|
|
var r9;
|
|
var sdk;
|
|
var concat;
|
|
var binding;
|
|
let value = a3;
|
|
const normalizeDepth = a0.normalizeDepth;
|
|
const value2 = 3;
|
|
let r4 = normalizeDepth === undefined ? value2 : normalizeDepth;
|
|
const normalizeMaxBreadth = a0.normalizeMaxBreadth;
|
|
r4 = normalizeMaxBreadth === undefined ? 1000 : normalizeMaxBreadth;
|
|
const Object = global.Object;
|
|
const assign = Object.assign;
|
|
let object = {};
|
|
let event_id = a1.event_id;
|
|
event_id = !event_id ? a2.event_id : event_id;
|
|
object.event_id = event_id || (require(839) /* metro dependency 839 */).uuid4();
|
|
object.timestamp = a1.timestamp || require(dependencyMap[value2]).dateTimestampInSeconds();
|
|
const value8 = Reflect.apply(assign, Object, [{}, a1, object]);
|
|
const r14 = a2.integrations || a0.integrations.map(function(a0) {
|
|
return a0.name;
|
|
});
|
|
applyClientOptions(value8, a0);
|
|
if (r14.length > 0) {
|
|
sdk = value8.sdk;
|
|
r7 = sdk || ({});
|
|
value8.sdk = r7;
|
|
sdk = value8.sdk;
|
|
object = [];
|
|
concat = object.concat;
|
|
binding = env0_3;
|
|
r7 = value8.sdk.integrations || [];
|
|
sdk.integrations = Reflect.apply(concat, object, [binding(r7), env0_3(r14)]);
|
|
}
|
|
if (a4) {
|
|
a4.emit('applyFrameMetadata', a1);
|
|
}
|
|
if (a1.type === undefined) {
|
|
applyDebugIds(value8, a0.stackParser);
|
|
}
|
|
const captureContext = a2.captureContext;
|
|
if (captureContext) {
|
|
if (value) {
|
|
value = value.clone();
|
|
r1 = value;
|
|
} else {
|
|
r1 = new (require(852) /* metro dependency 852 */).Scope();
|
|
}
|
|
r1.update(captureContext);
|
|
r9 = r1;
|
|
} else {
|
|
r9 = value;
|
|
}
|
|
if (a2.mechanism) {
|
|
value = require(839) /* metro dependency 839 */;
|
|
value.addExceptionMechanism(value8, a2.mechanism);
|
|
}
|
|
const r3 = a4 ? a4.getEventProcessors() : [];
|
|
value = require(879) /* metro dependency 879 */;
|
|
value = value.getCombinedScopeData(a5, r9);
|
|
object = [];
|
|
const value13 = object.concat(env0_3(a2.attachments || []), env0_3(value.attachments));
|
|
if (value13.length) {
|
|
a2.attachments = value13;
|
|
}
|
|
(require(879) /* metro dependency 879 */).applyScopeDataToEvent(value8, value);
|
|
object = [];
|
|
concat = object.concat;
|
|
binding = env0_3;
|
|
value = Reflect.apply(concat, object, [binding(r3), binding(value.eventProcessors)]);
|
|
value = (require(880) /* metro dependency 880 */).notifyEventProcessors(value, value8, a2);
|
|
return value.then(_fun9485);
|
|
}
|
|
|
|
function _fun9472(a0) { // fn#9472, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1005:391, offset: 0x00d6833d, size: 70 bytes, params: 2, frame: 14
|
|
let value = a0.value;
|
|
if (value) {
|
|
value = environment.__proto__;
|
|
value = require(841) /* metro dependency 841 */;
|
|
a0.value = value.truncate(a0.value, maxValueLength);
|
|
}
|
|
}
|
|
|
|
function _fun9474({stacktrace}) { // fn#9474, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1005:579, offset: 0x00d683e5, size: 58 bytes, params: 2, frame: 13
|
|
var r0;
|
|
var r2;
|
|
var frames;
|
|
const value = stacktrace == null;
|
|
if (value) {
|
|
r0 = value;
|
|
r2 = stacktrace;
|
|
} else {
|
|
frames = stacktrace.frames;
|
|
r0 = frames == null;
|
|
r2 = frames;
|
|
}
|
|
if (!r0) {
|
|
r2.forEach(_fun9475);
|
|
}
|
|
}
|
|
|
|
function _fun9477({stacktrace}) { // fn#9477, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1005:804, offset: 0x00d68502, size: 58 bytes, params: 2, frame: 13
|
|
var r0;
|
|
var r2;
|
|
var frames;
|
|
const value = stacktrace == null;
|
|
if (value) {
|
|
r0 = value;
|
|
r2 = stacktrace;
|
|
} else {
|
|
frames = stacktrace.frames;
|
|
r0 = frames == null;
|
|
r2 = frames;
|
|
}
|
|
if (!r0) {
|
|
r2.forEach(_fun9478);
|
|
}
|
|
}
|
|
|
|
function parseEventHintOrCaptureContextHintIsScopeContext(a0) { // fn#9481, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1005:1680, owner: parseEventHintOrCaptureContext.hintIsScopeContext, offset: 0x00d6863a, size: 41 bytes, params: 2, frame: 11
|
|
const Object = global.Object;
|
|
return Object.keys(a0).some(_fun9482);
|
|
}
|
|
|
|
function _fun9485(a0) { // fn#9485, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1005:2837, offset: 0x00d6895d, size: 80 bytes, params: 2, frame: 16
|
|
var environment;
|
|
var r0;
|
|
var value2;
|
|
let value = a0;
|
|
if (value) {
|
|
value2 = environment.__proto__;
|
|
applyDebugMeta(value);
|
|
}
|
|
if (typeof env0_0 !== 'number') {
|
|
r0 = value;
|
|
} else if (env0_0 > 0) {
|
|
value = normalizeEvent(value, env0_0, env0_1);
|
|
r0 = value;
|
|
} else {
|
|
r0 = value;
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
function _fun9475(a0) { // fn#9475, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1005:652, offset: 0x00d6841f, size: 39 bytes, params: 2, frame: 3
|
|
var value;
|
|
if (a0.filename) {
|
|
value = environment.__proto__;
|
|
a0.debug_id = env1_0[a0.filename];
|
|
}
|
|
}
|
|
|
|
function normalizeEvent(a0, a1, a2) { // fn#9486, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1005:2901, offset: 0x00d689ad, size: 571 bytes, params: 4, frame: 27
|
|
var environment;
|
|
var r7;
|
|
var r5;
|
|
var r4;
|
|
var r2;
|
|
var Object;
|
|
var assign;
|
|
var breadcrumbs;
|
|
var object2;
|
|
var user;
|
|
var value;
|
|
var normalize;
|
|
var contexts;
|
|
var extra;
|
|
var trace;
|
|
var value3;
|
|
var moduleValue;
|
|
var value5;
|
|
var moduleValue2;
|
|
const env0_0 = a1;
|
|
const env0_1 = a2;
|
|
if (a0) {
|
|
Object = global.Object;
|
|
assign = Object.assign;
|
|
breadcrumbs = a0.breadcrumbs;
|
|
if (breadcrumbs) {
|
|
object2 = {};
|
|
object2.breadcrumbs = a0.breadcrumbs.map(_fun9487);
|
|
r7 = object2;
|
|
} else {
|
|
r7 = breadcrumbs;
|
|
}
|
|
user = a0.user;
|
|
if (user) {
|
|
value = environment.__proto__.__proto__;
|
|
value = require(873) /* metro dependency 873 */;
|
|
r5 = {user: value.normalize(a0.user, a1, a2)};
|
|
} else {
|
|
r5 = user;
|
|
}
|
|
contexts = a0.contexts;
|
|
if (contexts) {
|
|
value = environment.__proto__.__proto__;
|
|
value = require(873) /* metro dependency 873 */;
|
|
r4 = {contexts: value.normalize(a0.contexts, a1, a2)};
|
|
} else {
|
|
r4 = contexts;
|
|
}
|
|
extra = a0.extra;
|
|
if (extra) {
|
|
value = environment.__proto__.__proto__;
|
|
value = require(873) /* metro dependency 873 */;
|
|
r2 = {extra: value.normalize(a0.extra, a1, a2)};
|
|
} else {
|
|
r2 = extra;
|
|
}
|
|
value = Reflect.apply(assign, Object, [{}, a0, r7, r5, r4, r2]);
|
|
contexts = a0.contexts;
|
|
r4 = contexts != null && contexts.trace;
|
|
r4 = r4 && value.contexts;
|
|
if (r4) {
|
|
contexts = value.contexts;
|
|
trace = a0.contexts.trace;
|
|
contexts.trace = trace;
|
|
contexts = a0.contexts;
|
|
trace = contexts.trace;
|
|
if (trace.data) {
|
|
contexts = value.contexts;
|
|
trace = contexts.trace;
|
|
value3 = environment.__proto__.__proto__;
|
|
moduleValue = require(873) /* metro dependency 873 */;
|
|
normalize = moduleValue.normalize;
|
|
contexts = a0.contexts;
|
|
trace.data = Reflect.apply(normalize, moduleValue, [contexts.trace.data, a1, a2]);
|
|
}
|
|
}
|
|
if (a0.spans) {
|
|
value.spans = a0.spans.map(_fun9488);
|
|
}
|
|
contexts = a0.contexts;
|
|
r2 = contexts != null && contexts.flags;
|
|
r2 = r2 && value.contexts;
|
|
if (r2) {
|
|
contexts = value.contexts;
|
|
value5 = environment.__proto__.__proto__;
|
|
moduleValue2 = require(873) /* metro dependency 873 */;
|
|
contexts.flags = moduleValue2.normalize(a0.contexts.flags, 3, a2);
|
|
}
|
|
return value;
|
|
}
|
|
return null;
|
|
}
|
|
|
|
function _fun9487(a0) { // fn#9487, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1005:3030, offset: 0x00d68be8, size: 98 bytes, params: 2, frame: 20
|
|
var r1;
|
|
var value;
|
|
const Object = global.Object;
|
|
const assign = Object.assign;
|
|
const data = a0.data;
|
|
if (data) {
|
|
value = environment.__proto__.__proto__.__proto__;
|
|
value = require(873) /* metro dependency 873 */;
|
|
r1 = {data: value.normalize(a0.data, require, importDefault)};
|
|
} else {
|
|
r1 = data;
|
|
}
|
|
return Reflect.apply(assign, Object, [{}, a0, r1]);
|
|
}
|
|
|