337 lines
12 KiB
React
337 lines
12 KiB
React
/* Metro module 839; source: unknown; dependencies: [830, 840, 841, 831] */
|
|
function _fun9085(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#9085, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:966:6, offset: 0x00d5cbbc, size: 180 bytes, params: 8, frame: 17
|
|
const env0_0 = require;
|
|
const getFirstException = function({exception}) {
|
|
return exception == null || exception.values == null ? undefined : exception.values[0];
|
|
};
|
|
const _parseInt = function(a0) {
|
|
return (0, global.parseInt)(a0 || '', 10);
|
|
};
|
|
const Object = global.Object;
|
|
const defineProperty = Object.defineProperty;
|
|
const Symbol = global.Symbol;
|
|
Reflect.apply(defineProperty, Object, [exports, Symbol.toStringTag, {value: 'Module'}]);
|
|
const env0_3 = RegExp('^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$',
|
|
'');
|
|
exports.addContextToFrame = addContextToFrame;
|
|
exports.addExceptionMechanism = addExceptionMechanism;
|
|
exports.addExceptionTypeValue = function(a0, a1, a2) {
|
|
var r0;
|
|
var r4;
|
|
var value = a1;
|
|
var value2 = a2;
|
|
r0 = a0.exception || ({});
|
|
a0.exception = r0;
|
|
r4 = r0.values || [];
|
|
r0.values = r4;
|
|
r0 = r4[0] || ({});
|
|
r4[0] = r0;
|
|
if (!r0.value) {
|
|
r0.value = value || '';
|
|
}
|
|
if (!r0.type) {
|
|
r0.type = value2 || 'Error';
|
|
}
|
|
};
|
|
exports.checkOrSetAlreadyCaught = checkOrSetAlreadyCaught;
|
|
exports.getEventDescription = getEventDescription;
|
|
exports.parseSemver = parseSemver;
|
|
exports.uuid4 = uuid4;
|
|
}
|
|
|
|
function addContextToFrame(a0, a1) { // fn#9088, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:966:450, offset: 0x00d5ccb9, size: 309 bytes, params: 3, frame: 24
|
|
var colno;
|
|
var length;
|
|
var Math;
|
|
var max;
|
|
var Math2;
|
|
var min;
|
|
var value2;
|
|
var slice;
|
|
var value3;
|
|
var map;
|
|
var value4;
|
|
var moduleValue;
|
|
var snipLine;
|
|
var property;
|
|
let value = 5;
|
|
const r7 = arguments.length > 2 ? arguments[2] === undefined ? value : arguments[2] : value;
|
|
if (a1.lineno !== undefined) {
|
|
length = a0.length;
|
|
Math = global.Math;
|
|
max = Math.max;
|
|
Math2 = global.Math;
|
|
min = Math2.min;
|
|
value = length - 1;
|
|
value = Reflect.apply(min, Math2, [value, a1.lineno - 1]);
|
|
value2 = 0;
|
|
value = Reflect.apply(max, Math, [value, value2]);
|
|
slice = a0.slice;
|
|
Math = global.Math;
|
|
max = Math.max;
|
|
value3 = Reflect.apply(slice, a0, [Reflect.apply(max, Math, [value2, value - r7]), value]);
|
|
map = value3.map;
|
|
a1.pre_context = Reflect.apply(map, value3, [_fun9089]);
|
|
Math = global.Math;
|
|
value4 = Math.min(length - 1, value);
|
|
moduleValue = require(841) /* metro dependency 841 */;
|
|
snipLine = moduleValue.snipLine;
|
|
property = a0[value4];
|
|
colno = a1.colno;
|
|
colno = !colno ? value2 : colno;
|
|
a1.context_line = Reflect.apply(snipLine, moduleValue, [property, colno]);
|
|
slice = a0.slice;
|
|
Math = global.Math;
|
|
value = Reflect.apply(slice, a0, [Math.min(value + 1, length), value + 1 + r7]);
|
|
map = value.map;
|
|
a1.post_context = Reflect.apply(map, value, [_fun9090]);
|
|
}
|
|
}
|
|
|
|
function addExceptionMechanism(a0, a1) { // fn#9091, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:966:903, offset: 0x00d5ce1a, size: 142 bytes, params: 3, frame: 20
|
|
var mechanism;
|
|
var Object;
|
|
var value3;
|
|
const getFirstExceptionBinding = getFirstException;
|
|
const value = undefined;
|
|
const firstExceptionBinding = getFirstExceptionBinding(a0);
|
|
if (firstExceptionBinding) {
|
|
mechanism = firstExceptionBinding.mechanism;
|
|
Object = global.Object;
|
|
firstExceptionBinding.mechanism = Object.assign({}, {'type': 'generic', 'handled': true}, mechanism, a1);
|
|
if (a1) {
|
|
if ('data' in a1) {
|
|
Object = global.Object;
|
|
value3 = Object.assign({}, mechanism == null ? value : mechanism.data, a1.data);
|
|
mechanism = firstExceptionBinding.mechanism;
|
|
mechanism.data = value3;
|
|
}
|
|
}
|
|
}
|
|
return value;
|
|
}
|
|
|
|
function checkOrSetAlreadyCaught(a0) { // fn#9093, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:966:1361, offset: 0x00d5cf11, size: 83 bytes, params: 2, frame: 15
|
|
var __sentry_captured__;
|
|
var error;
|
|
var value;
|
|
var property;
|
|
try {
|
|
__sentry_captured__ = a0.__sentry_captured__;
|
|
} catch (error) {
|
|
value = undefined;
|
|
__sentry_captured__ = value;
|
|
}
|
|
if (__sentry_captured__) {
|
|
return true;
|
|
}
|
|
try {
|
|
value = environment;
|
|
property = dependencyMap[3];
|
|
value = require(property);
|
|
value.addNonEnumerableProperty(a0, '__sentry_captured__', true);
|
|
} catch (error) {
|
|
}
|
|
return false;
|
|
}
|
|
|
|
function getEventDescription(a0) { // fn#9094, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:966:1594, offset: 0x00d5cf64, size: 144 bytes, params: 2, frame: 18
|
|
var r1;
|
|
var r2;
|
|
var type;
|
|
const message = a0.message;
|
|
const event_id = a0.event_id;
|
|
if (message) {
|
|
return message;
|
|
}
|
|
let value = getFirstException(a0);
|
|
if (value) {
|
|
type = value.type;
|
|
if (type) {
|
|
if (value.value) {
|
|
type = value.type;
|
|
value = value.value;
|
|
value = '' + type + ': ' + value;
|
|
r2 = value;
|
|
} else {
|
|
r2 = value.type || value.value;
|
|
r2 = !r2 ? event_id : r2;
|
|
r2 = !r2 ? '<unknown>' : r2;
|
|
}
|
|
} else {
|
|
r2 = value.type || value.value;
|
|
r2 = !r2 ? event_id : r2;
|
|
r2 = !r2 ? '<unknown>' : r2;
|
|
}
|
|
r1 = r2;
|
|
} else {
|
|
r1 = event_id || '<unknown>';
|
|
}
|
|
return r1;
|
|
}
|
|
|
|
function parseSemver(a0) { // fn#9095, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:966:1807, offset: 0x00d5cff4, size: 172 bytes, params: 2, frame: 17
|
|
const r2 = a0.match(env0_3) || [];
|
|
const _parseIntBinding = _parseInt;
|
|
const value = undefined;
|
|
const value3 = _parseIntBinding(r2[1]);
|
|
const value4 = _parseIntBinding(r2[2]);
|
|
const value5 = _parseIntBinding(r2[3]);
|
|
const object2 = {buildmetadata: r2[5]};
|
|
object2.major = global.isNaN(value3) ? value : value3;
|
|
object2.minor = global.isNaN(value4) ? value : value4;
|
|
object2.patch = global.isNaN(value5) ? value : value5;
|
|
object2.prerelease = r2[4];
|
|
return object2;
|
|
}
|
|
|
|
function uuid4() { // fn#9096, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:966:2030, offset: 0x00d5d0a0, size: 227 bytes, params: 1, frame: 17
|
|
var environment;
|
|
var r2;
|
|
var value;
|
|
const GLOBAL_OBJ = require(dependencyMap[0]).GLOBAL_OBJ;
|
|
var crypto;
|
|
var msCrypto;
|
|
var randomUUID;
|
|
var property;
|
|
var withRandomSafeContext;
|
|
var closure;
|
|
var replace;
|
|
var regexp;
|
|
var error;
|
|
var binding;
|
|
reducibleJoin6: while (true) {
|
|
reducibleJoin4: while (true) {
|
|
if (arguments.length > 0) {
|
|
if (arguments[0] !== undefined) {
|
|
r2 = arguments[0];
|
|
break reducibleJoin6;
|
|
}
|
|
value = environment;
|
|
crypto = GLOBAL_OBJ.crypto;
|
|
if (crypto) {
|
|
r2 = crypto;
|
|
break reducibleJoin4;
|
|
}
|
|
r2 = GLOBAL_OBJ.msCrypto;
|
|
break reducibleJoin4;
|
|
}
|
|
value = environment;
|
|
crypto = GLOBAL_OBJ.crypto;
|
|
if (crypto) {
|
|
r2 = crypto;
|
|
break reducibleJoin4;
|
|
}
|
|
msCrypto = GLOBAL_OBJ.msCrypto;
|
|
r2 = msCrypto;
|
|
break reducibleJoin4;
|
|
}
|
|
break reducibleJoin6;
|
|
}
|
|
reducibleJoin27: while (true) {
|
|
reduciblePort26: while (true) {
|
|
exceptionLanding25: while (true) {
|
|
try {
|
|
value = r2 == null;
|
|
} catch (error) {
|
|
break exceptionLanding25;
|
|
}
|
|
if (value) {
|
|
break reduciblePort26;
|
|
}
|
|
try {
|
|
randomUUID = r2.randomUUID;
|
|
} catch (error) {
|
|
break exceptionLanding25;
|
|
}
|
|
if (randomUUID) {
|
|
value = environment;
|
|
try {
|
|
} catch (error) {
|
|
break exceptionLanding25;
|
|
}
|
|
try {
|
|
} catch (error) {
|
|
break exceptionLanding25;
|
|
}
|
|
try {
|
|
property = dependencyMap[1];
|
|
} catch (error) {
|
|
break exceptionLanding25;
|
|
}
|
|
try {
|
|
value = require(property);
|
|
} catch (error) {
|
|
break exceptionLanding25;
|
|
}
|
|
try {
|
|
withRandomSafeContext = value.withRandomSafeContext;
|
|
} catch (error) {
|
|
break exceptionLanding25;
|
|
}
|
|
try {
|
|
closure = _fun9097;
|
|
} catch (error) {
|
|
break exceptionLanding25;
|
|
}
|
|
try {
|
|
value = Reflect.apply(withRandomSafeContext, value, [closure]);
|
|
} catch (error) {
|
|
break exceptionLanding25;
|
|
}
|
|
try {
|
|
replace = value.replace;
|
|
} catch (error) {
|
|
break exceptionLanding25;
|
|
}
|
|
try {
|
|
regexp = RegExp('-', 'g');
|
|
} catch (error) {
|
|
break exceptionLanding25;
|
|
}
|
|
try {
|
|
value = Reflect.apply(replace, value, [regexp, '']);
|
|
} catch (error) {
|
|
break exceptionLanding25;
|
|
}
|
|
return value;
|
|
}
|
|
break reduciblePort26;
|
|
}
|
|
break reduciblePort26;
|
|
}
|
|
value = environment;
|
|
reducibleJoin28: while (true) {
|
|
if (env0_2) {
|
|
break reducibleJoin28;
|
|
}
|
|
break reducibleJoin27;
|
|
}
|
|
binding = env0_2;
|
|
replace = binding.replace;
|
|
regexp = RegExp('[018]', 'g');
|
|
return Reflect.apply(replace, binding, [regexp, _fun9098]);
|
|
}
|
|
binding = '10000000100040008000100000000000';
|
|
return binding.replace(RegExp('[018]', 'g'), _fun9098);
|
|
}
|
|
|
|
function _fun9089(a0) { // fn#9089, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:966:667, offset: 0x00d5cdee, size: 44 bytes, params: 2, frame: 13
|
|
const value = environment.__proto__;
|
|
return (require(841) /* metro dependency 841 */).snipLine(a0, 0);
|
|
}
|
|
|
|
function _fun9097() { // fn#9097, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:966:2252, offset: 0x00d5d183, size: 19 bytes, params: 1, frame: 9
|
|
return env0_0.randomUUID();
|
|
}
|
|
|
|
function _fun9098(a0) { // fn#9098, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:966:2384, offset: 0x00d5d196, size: 79 bytes, params: 2, frame: 13
|
|
let value = environment.__proto__;
|
|
value = require(840) /* metro dependency 840 */;
|
|
value = value.safeMathRandom();
|
|
value = 16 * value;
|
|
value = a0 ^ (15 & value) >> a0 / 4;
|
|
return value.toString(16);
|
|
}
|
|
|