Files
2026-07-28 01:06:53 +03:00

148 lines
6.1 KiB
JavaScript

/* Metro module 7378; source: unknown; dependencies: [7376] */
function _fun59432(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#59432, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7556:6, offset: 0x016ea63c, size: 114 bytes, params: 8, frame: 17
let env0_0 = require;
const isMatchingPattern_594332 = isMatchingPattern_59433;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
exports.isMatchingPattern = isMatchingPattern_594332;
exports.safeJoin = safeJoin_59434;
exports.snipLine = snipLine_59435;
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(_fun59437);
};
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_59433(a0, a1) { // fn#59433, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7556:32, 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(7376) /* metro dependency 7376 */).isString(a0);
if (isString2) {
moduleValue2 = require(7376) /* metro dependency 7376 */;
if (moduleValue2.isRegExp(a1)) {
r1 = a1.test(a0);
} else {
value = require(7376) /* metro dependency 7376 */;
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_59434(a0, a1) { // fn#59434, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7556:335, offset: 0x016ea6ae, size: 210 bytes, params: 3, frame: 22
var r10;
var items2;
var value;
var length;
var property;
var property2;
var moduleValue;
var isVueViewModel2;
var push;
var String;
var value3;
var error;
var value4;
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) {
Reflect.apply(push, items2, ['[VueViewModel]']);
break;
}
String = global.String;
value3 = String(property);
Reflect.apply(push, items2, [value3]);
break;
} catch (error) {
items2.push('[value cannot be serialized]');
}
value4 = typeof r10 === 'bigint' ? r10 + 1n : +r10 + 1;
length = a0.length;
if (value4 < length) {
r10 = value4;
continue;
}
break;
}
}
return items2.join(a1);
}
return '';
}
function stringMatchesSomePattern_59436(a0) { // fn#59436, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7556:853, offset: 0x016ea780, 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(_fun59437);
function _fun59437(a0) { // fn#59437, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7556:1024, offset: 0x00d5d65f, size: 32 bytes, params: 2, frame: 15
return isMatchingPattern_59433(env0_0, a0, env0_1);
}
}
}
function snipLine_59435(a0, a1) { // fn#59435, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7556:584, 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(_fun59432, 7378, [7376]) /* metro module 7378, dependencies: [7376] */;