156 lines
6.4 KiB
JavaScript
156 lines
6.4 KiB
JavaScript
/* Metro module 841; source: unknown; dependencies: [836, 842] */
|
|
function _fun9105(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#9105, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:968:6, offset: 0x00d5d31a, size: 126 bytes, params: 8, frame: 18
|
|
let env0_0 = require;
|
|
const isMatchingPattern2 = isMatchingPattern;
|
|
const Object = global.Object;
|
|
const defineProperty = Object.defineProperty;
|
|
const Symbol = global.Symbol;
|
|
Reflect.apply(defineProperty, Object, [exports, Symbol.toStringTag, {value: 'Module'}]);
|
|
exports.isMatchingPattern = isMatchingPattern2;
|
|
exports.safeJoin = safeJoin;
|
|
exports.snipLine = snipLine;
|
|
exports.stringMatchesSomePattern = function(a0) {
|
|
var env0_0 = a0;
|
|
var env0_1 = arguments.length > 2 && arguments[2] !== undefined && arguments[2];
|
|
return (arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : []).some(_fun9110);
|
|
};
|
|
exports.truncate = function(a0) {
|
|
var r2;
|
|
var r0;
|
|
var value = a0;
|
|
var value2 = 0;
|
|
r2 = arguments.length > 1 ? arguments[1] === undefined ? value2 : arguments[1] : value2;
|
|
if (typeof value !== 'string') {
|
|
r0 = value;
|
|
} else if (value2 === r2) {
|
|
r0 = value;
|
|
} else if (value.length <= r2) {
|
|
r0 = value;
|
|
} else {
|
|
value = value.slice(value2, r2);
|
|
value = '' + value + '...';
|
|
r0 = value;
|
|
}
|
|
return r0;
|
|
};
|
|
function isMatchingPattern(a0, a1) { // fn#9106, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:968:31, offset: 0x00d5d398, size: 187 bytes, params: 3, frame: 17
|
|
var r1;
|
|
var r0;
|
|
var moduleValue2;
|
|
let value = arguments.length > 2;
|
|
let r2 = value && arguments[2] !== undefined && arguments[2];
|
|
const isString2 = (require(836) /* metro dependency 836 */).isString(a0);
|
|
if (isString2) {
|
|
moduleValue2 = require(836) /* metro dependency 836 */;
|
|
if (moduleValue2.isRegExp(a1)) {
|
|
r1 = a1.test(a0);
|
|
} else {
|
|
value = require(836) /* metro dependency 836 */;
|
|
value = value.isString(a1);
|
|
if (value) {
|
|
r2 = r2 ? a0 === a1 : a0.includes(a1);
|
|
r1 = r2;
|
|
} else {
|
|
r1 = !!value;
|
|
}
|
|
}
|
|
r0 = r1;
|
|
} else {
|
|
r0 = !!isString2;
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
function safeJoin(a0, a1) { // fn#9107, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:968:343, offset: 0x00d5d453, size: 244 bytes, params: 3, frame: 23
|
|
var r10;
|
|
var items2;
|
|
var value;
|
|
var length;
|
|
var property;
|
|
var property2;
|
|
var moduleValue;
|
|
var isVueViewModel2;
|
|
var push;
|
|
var String;
|
|
var value3;
|
|
var property3;
|
|
var moduleValue2;
|
|
var vueInternalName;
|
|
var error;
|
|
var value5;
|
|
const Array = global.Array;
|
|
if (Array.isArray(a0)) {
|
|
items2 = [];
|
|
value = 0;
|
|
length = a0.length;
|
|
if (value < length) {
|
|
r10 = value;
|
|
while (true) {
|
|
property = a0[r10];
|
|
try {
|
|
property2 = dependencyMap[value];
|
|
moduleValue = require(property2);
|
|
isVueViewModel2 = moduleValue.isVueViewModel(property);
|
|
push = items2.push;
|
|
if (isVueViewModel2) {
|
|
property3 = dependencyMap[1];
|
|
moduleValue2 = require(property3);
|
|
vueInternalName = moduleValue2.getVueInternalName(property);
|
|
Reflect.apply(push, items2, [vueInternalName]);
|
|
break;
|
|
}
|
|
String = global.String;
|
|
value3 = String(property);
|
|
Reflect.apply(push, items2, [value3]);
|
|
break;
|
|
} catch (error) {
|
|
items2.push('[value cannot be serialized]');
|
|
}
|
|
value5 = typeof r10 === 'bigint' ? r10 + 1n : +r10 + 1;
|
|
length = a0.length;
|
|
if (value5 < length) {
|
|
r10 = value5;
|
|
continue;
|
|
}
|
|
break;
|
|
}
|
|
}
|
|
return items2.join(a1);
|
|
}
|
|
return '';
|
|
}
|
|
|
|
function stringMatchesSomePattern(a0) { // fn#9109, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:968:872, offset: 0x00d5d604, size: 91 bytes, params: 2, frame: 14
|
|
const env0_0 = a0;
|
|
const r1 = arguments.length > 2 && arguments[2] !== undefined && arguments[2];
|
|
return (arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : []).some(_fun9110);
|
|
function _fun9110(a0) { // fn#9110, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:968:1043, offset: 0x00d5d65f, size: 32 bytes, params: 2, frame: 15
|
|
return isMatchingPattern(env0_0, a0, env0_1);
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
function snipLine(a0, a1) { // fn#9108, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:968:604, offset: 0x00d5d547, size: 189 bytes, params: 3, frame: 19
|
|
let value = a1;
|
|
const length = a0.length;
|
|
if (length <= 150) {
|
|
return a0;
|
|
}
|
|
const r6 = value > length ? length : value;
|
|
let Math = global.Math;
|
|
value = 0;
|
|
const value2 = Math.max(r6 - 60, value);
|
|
let r3 = value2 < 5 ? value : value2;
|
|
Math = global.Math;
|
|
const value3 = Math.min(r3 + 140, length);
|
|
const r2 = value3 > length - 5 ? length : value3;
|
|
r3 = r2 === length ? global.Math.max(r2 - 140, value) : r3;
|
|
const value5 = a0.slice(r3, r2);
|
|
r3 = r3 > value ? "'{snip} " + value5 : value5;
|
|
return r2 < length ? r3 + ' {snip}' : r3;
|
|
}
|
|
|
|
global.__d(_fun9105, 841, [836, 842]) /* metro module 841, dependencies: [836, 842] */;
|