329 lines
14 KiB
JavaScript
329 lines
14 KiB
JavaScript
/* Metro module 7380; source: unknown; dependencies: [7370, 7378, 7375] */
|
|
import * as Module07370Module from './module-07370.js'; /* Metro dependency 7370 */
|
|
import * as Module07378Module from './module-07378.js'; /* Metro dependency 7378 */
|
|
|
|
function _fun59443(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#59443, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7558:6, offset: 0x016ea85e, size: 179 bytes, params: 8, frame: 16
|
|
const env0_0 = require;
|
|
const getFirstException_59444 = function(a0) {
|
|
return a0.exception && a0.exception.values ? a0.exception.values[0] : undefined;
|
|
};
|
|
const _parseInt_59445 = function(a0) {
|
|
return (0, global.parseInt)(a0 || '', 10);
|
|
};
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
const env0_2 = 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_59446;
|
|
exports.addExceptionMechanism = addExceptionMechanism_59449;
|
|
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.arrayify = function(a0) {
|
|
var value = a0;
|
|
var Array = global.Array;
|
|
return Array.isArray(value) ? value : [value];
|
|
};
|
|
exports.checkOrSetAlreadyCaught = checkOrSetAlreadyCaught_59452;
|
|
exports.getEventDescription = getEventDescription_59453;
|
|
exports.parseSemver = parseSemver_59454;
|
|
exports.uuid4 = uuid4_59455;
|
|
function addContextToFrame_59446(a0, a1) { // fn#59446, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7558:436, offset: 0x016ea942, 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, [_fun59447]);
|
|
Math = global.Math;
|
|
value4 = Math.min(length - 1, value);
|
|
moduleValue = require(7378) /* metro dependency 7378 */;
|
|
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, [_fun59448]);
|
|
}
|
|
function _fun59447(a0) { // fn#59447, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7558:653, offset: 0x016eaa77, size: 44 bytes, params: 2, frame: 13
|
|
const value = environment.__proto__;
|
|
return (Module07378Module).snipLine(a0, 0);
|
|
}
|
|
|
|
function _fun59448(a0) { // fn#59448, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7558:819, offset: 0x016eaa77, size: 44 bytes, params: 2, frame: 13
|
|
const value = environment.__proto__;
|
|
return (Module07378Module).snipLine(a0, 0);
|
|
}
|
|
|
|
}
|
|
|
|
function addExceptionMechanism_59449(a0, a1) { // fn#59449, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7558:890, offset: 0x016eaaa3, size: 137 bytes, params: 3, frame: 20
|
|
var mechanism;
|
|
var Object;
|
|
var value2;
|
|
const firstException_59444 = getFirstException_59444(a0);
|
|
if (firstException_59444) {
|
|
mechanism = firstException_59444.mechanism;
|
|
Object = global.Object;
|
|
firstException_59444.mechanism = Object.assign({}, {'type': 'generic', 'handled': true}, mechanism, a1);
|
|
if (a1) {
|
|
if ('data' in a1) {
|
|
Object = global.Object;
|
|
value2 = Object.assign({}, mechanism && mechanism.data, a1.data);
|
|
mechanism = firstException_59444.mechanism;
|
|
mechanism.data = value2;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
function checkOrSetAlreadyCaught_59452(a0) { // fn#59452, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7558:1402, offset: 0x016eab2c, 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[2];
|
|
value = require(property);
|
|
value.addNonEnumerableProperty(a0, '__sentry_captured__', true);
|
|
} catch (error) {
|
|
}
|
|
return false;
|
|
}
|
|
|
|
function getEventDescription_59453(a0) { // fn#59453, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7558:1636, offset: 0x016eab7f, 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_59444(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_59454(a0) { // fn#59454, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7558:1850, offset: 0x016eac0f, size: 172 bytes, params: 2, frame: 17
|
|
const r2 = a0.match(env0_2) || [];
|
|
const _parseInt_59445Binding = _parseInt_59445;
|
|
const value = undefined;
|
|
const value3 = _parseInt_59445Binding(r2[1]);
|
|
const value4 = _parseInt_59445Binding(r2[2]);
|
|
const value5 = _parseInt_59445Binding(r2[3]);
|
|
const object = {buildmetadata: r2[5]};
|
|
object.major = global.isNaN(value3) ? value : value3;
|
|
object.minor = global.isNaN(value4) ? value : value4;
|
|
object.patch = global.isNaN(value5) ? value : value5;
|
|
object.prerelease = r2[4];
|
|
return object;
|
|
}
|
|
|
|
function uuid4_59455() { // fn#59455, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7558:2074, offset: 0x016eacbb, size: 202 bytes, params: 1, frame: 15
|
|
var environment;
|
|
var randomUUID;
|
|
var getRandomValues;
|
|
var uuid4_59455GetRandomByte_594572;
|
|
var replace;
|
|
var regexp;
|
|
var error;
|
|
let value = environment;
|
|
const GLOBAL_OBJ = (Module07370Module).GLOBAL_OBJ;
|
|
let r2 = GLOBAL_OBJ.crypto || GLOBAL_OBJ.msCrypto;
|
|
let env0_1 = function() {
|
|
var Math = global.Math;
|
|
return 16 * Math.random();
|
|
};
|
|
if (r2) {
|
|
try {
|
|
randomUUID = r2.randomUUID;
|
|
} catch (error) {
|
|
replace = '10000000100040008000100000000000'.replace;
|
|
regexp = RegExp('[018]', 'g');
|
|
return Reflect.apply(replace, '10000000100040008000100000000000', [regexp, _fun59458]);
|
|
}
|
|
if (randomUUID) {
|
|
try {
|
|
value = r2.randomUUID();
|
|
replace = value.replace;
|
|
regexp = RegExp('-', 'g');
|
|
value = Reflect.apply(replace, value, [regexp, '']);
|
|
} catch (error) {
|
|
replace = '10000000100040008000100000000000'.replace;
|
|
regexp = RegExp('[018]', 'g');
|
|
return Reflect.apply(replace, '10000000100040008000100000000000', [regexp, _fun59458]);
|
|
}
|
|
return value;
|
|
}
|
|
if (r2) {
|
|
try {
|
|
getRandomValues = r2.getRandomValues;
|
|
r2 = getRandomValues;
|
|
} catch (error) {
|
|
replace = '10000000100040008000100000000000'.replace;
|
|
regexp = RegExp('[018]', 'g');
|
|
return Reflect.apply(replace, '10000000100040008000100000000000', [regexp, _fun59458]);
|
|
}
|
|
if (r2) {
|
|
try {
|
|
uuid4_59455GetRandomByte_594572 = uuid4_59455GetRandomByte_59457;
|
|
} catch (error) {
|
|
replace = '10000000100040008000100000000000'.replace;
|
|
regexp = RegExp('[018]', 'g');
|
|
return Reflect.apply(replace, '10000000100040008000100000000000', [regexp, _fun59458]);
|
|
}
|
|
try {
|
|
env0_1 = uuid4_59455GetRandomByte_594572;
|
|
} catch (error) {
|
|
}
|
|
}
|
|
} else if (r2) {
|
|
try {
|
|
uuid4_59455GetRandomByte_594572 = uuid4_59455GetRandomByte_59457;
|
|
} catch (error) {
|
|
replace = '10000000100040008000100000000000'.replace;
|
|
regexp = RegExp('[018]', 'g');
|
|
return Reflect.apply(replace, '10000000100040008000100000000000', [regexp, _fun59458]);
|
|
}
|
|
try {
|
|
env0_1 = uuid4_59455GetRandomByte_594572;
|
|
} catch (error) {
|
|
}
|
|
}
|
|
replace = '10000000100040008000100000000000'.replace;
|
|
regexp = RegExp('[018]', 'g');
|
|
return Reflect.apply(replace, '10000000100040008000100000000000', [regexp, _fun59458]);
|
|
}
|
|
if (r2) {
|
|
try {
|
|
getRandomValues = r2.getRandomValues;
|
|
r2 = getRandomValues;
|
|
} catch (error) {
|
|
replace = '10000000100040008000100000000000'.replace;
|
|
regexp = RegExp('[018]', 'g');
|
|
return Reflect.apply(replace, '10000000100040008000100000000000', [regexp, _fun59458]);
|
|
}
|
|
if (r2) {
|
|
try {
|
|
uuid4_59455GetRandomByte_594572 = uuid4_59455GetRandomByte_59457;
|
|
} catch (error) {
|
|
replace = '10000000100040008000100000000000'.replace;
|
|
regexp = RegExp('[018]', 'g');
|
|
return Reflect.apply(replace, '10000000100040008000100000000000', [regexp, _fun59458]);
|
|
}
|
|
try {
|
|
env0_1 = uuid4_59455GetRandomByte_594572;
|
|
} catch (error) {
|
|
}
|
|
}
|
|
} else if (r2) {
|
|
try {
|
|
uuid4_59455GetRandomByte_594572 = uuid4_59455GetRandomByte_59457;
|
|
} catch (error) {
|
|
replace = '10000000100040008000100000000000'.replace;
|
|
regexp = RegExp('[018]', 'g');
|
|
return Reflect.apply(replace, '10000000100040008000100000000000', [regexp, _fun59458]);
|
|
}
|
|
try {
|
|
env0_1 = uuid4_59455GetRandomByte_594572;
|
|
} catch (error) {
|
|
}
|
|
}
|
|
return '10000000100040008000100000000000'.replace(RegExp('[018]', 'g'), _fun59458);
|
|
function uuid4_59455GetRandomByte_59457() { // fn#59457, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7558:2278, owner: uuid4_59455.getRandomByte, offset: 0x016eada0, size: 57 bytes, params: 1, frame: 11
|
|
const Uint8Array = global.Uint8Array;
|
|
const uint8Array = new Uint8Array(1);
|
|
env0_0.getRandomValues(uint8Array);
|
|
return uint8Array[0];
|
|
}
|
|
|
|
function _fun59458(a0) { // fn#59458, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7558:2431, offset: 0x016eadd9, size: 53 bytes, params: 2, frame: 11
|
|
let value = env0_1();
|
|
value = 15 & value;
|
|
value = a0 ^ value >> a0 / 4;
|
|
return value.toString(16);
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun59443, 7380, [7370, 7378, 7375]) /* metro module 7380, dependencies: [7370, 7378, 7375] */;
|