Files
discord-decomp/sources/by-id/module-00111.js
T
2026-07-28 01:06:53 +03:00

134 lines
6.4 KiB
JavaScript

/* Metro module 111; source: unknown; dependencies: [65, 79] */
import Module00065 from './module-00065.js'; /* Metro dependency 65 */
function _fun1605(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#1605, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:136:6, offset: 0x00c63260, size: 113 bytes, params: 8, frame: 17
const ifObject = function(a0) {
var value = a0;
return typeof value !== 'object' || global.Array.isArray(value) ? null : value;
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
exports.validate = validate;
exports.stringifyValidationResult = stringifyValidationResult;
function accumulateDifferences(a0, a1, a2, a3) { // fn#1606, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:136:106, offset: 0x00c632d1, size: 371 bytes, params: 5, frame: 42
var r11;
var r23;
var propertyName;
var propertyName2;
var property;
var hasOwnProperty;
var push;
var items2;
var concat;
var value2;
var property2;
var value3;
var value4;
var value5;
var moduleValue;
var enableNativeCSSParsing;
var value6;
var items3;
var value7;
var pop;
const properties = Object.keys(a2);
const properties2 = 0;
const properties3 = properties.length;
if (properties !== undefined) {
r11 = properties2;
reducibleLoop1: while (true) {
propertyName = properties[r11];
propertyName2 = r11 + 1;
if (propertyName === undefined) {
break reducibleLoop1;
}
property = a2[propertyName];
hasOwnProperty = a3.hasOwnProperty;
if (Reflect.apply(hasOwnProperty, a3, [propertyName])) {
property2 = a3[propertyName];
value3 = ifObject(property);
if (value3 != null) {
value4 = ifObject(property2);
reducibleJoin6: while (true) {
if (value4 != null) {
push = a1.push;
Reflect.apply(push, a1, [propertyName]);
accumulateDifferences(a0, a1, value3, value4);
pop = a1.pop;
Reflect.apply(pop, a1, []);
r11 = propertyName2;
continue reducibleLoop1;
}
break reducibleJoin6;
}
}
value5 = property === property2;
reducibleJoin8: while (true) {
if (value5) {
r23 = value5;
break reducibleJoin8;
}
moduleValue = importAll(79) /* metro dependency 79 */;
enableNativeCSSParsing = moduleValue.enableNativeCSSParsing;
value6 = Reflect.apply(enableNativeCSSParsing, moduleValue, []);
r23 = value6;
break reducibleJoin8;
}
if (r23) {
r11 = propertyName2;
continue reducibleLoop1;
}
push = a0.push;
items3 = [];
concat = items3.concat;
value7 = Module00065(a1);
Reflect.apply(push, a0, [{path: Reflect.apply(concat, items3, [value7, [propertyName]]),
type: 'unequal',
nativeValue: property, staticValue: property2}]);
r11 = propertyName2;
continue reducibleLoop1;
}
push = a0.push;
items2 = [];
concat = items2.concat;
value2 = Module00065(a1);
Reflect.apply(push, a0, [{path: Reflect.apply(concat, items2, [value2, [propertyName]]), type: 'missing',
nativeValue: property}]);
r11 = propertyName2;
continue reducibleLoop1;
}
}
}
function validate(a0, {bubblingEventTypes, directEventTypes, uiViewClassName, validAttributes}, {bubblingEventTypes, directEventTypes, uiViewClassName, validAttributes}) { // fn#1608, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:136:594, offset: 0x00c63470, size: 171 bytes, params: 4, frame: 17
const items2 = [];
accumulateDifferences(items2, [], {bubblingEventTypes: bubblingEventTypes, directEventTypes: directEventTypes,
uiViewClassName: uiViewClassName, validAttributes: validAttributes}, {bubblingEventTypes: bubblingEventTypes,
directEventTypes: directEventTypes, uiViewClassName: uiViewClassName, validAttributes: validAttributes});
return items2.length === 0 ? {type: 'valid'} : {type: 'invalid', differences: items2};
}
function stringifyValidationResult(a0, {differences}) { // fn#1609, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:136:1043, offset: 0x00c6351b, size: 127 bytes, params: 3, frame: 15
const HermesInternal = global.HermesInternal;
let concat = HermesInternal.concat;
const items2 = ["StaticViewConfigValidator: Invalid static view config for '" + a0 + "'.", ''];
concat = items2.concat;
value = differences.map(_fun1610);
value = Module00065(value);
value = Reflect.apply(concat, items2, [value, ['']]);
return value.join('\n');
}
}
function _fun1610({type, path}) { // fn#1610, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:136:1198, offset: 0x00c6359a, size: 130 bytes, params: 2, frame: 14
if (type === 'missing') {
return "- '" + path.join('.') + "' is missing.";
}
if (type === 'unequal') {
return "- '" + path.join('.') + "' is the wrong value.";
}
}
global.__d(_fun1605, 111, [65, 79]) /* metro module 111, dependencies: [65, 79] */;