Files
discord-decomp/sources/modules/rpc/helpers/validateScope.tsx
T
2026-07-27 16:20:00 +03:00

41 lines
1.6 KiB
TypeScript

/* Metro module 13050; source: modules/rpc/helpers/validateScope.tsx; dependencies: [4135, 2] */
function _fun99665(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#99665, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13240:6, offset: 0x021d0aba, size: 109 bytes, params: 8, frame: 18
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_0 = (require(4135) /* metro dependency 4135: Constants */).RPC_SCOPE_CONFIG;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/rpc/helpers/validateScope.tsx');
exports.default = validateScope;
}
function validateScope(a0, a1) { // fn#99666, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13240:204, offset: 0x021d0b27, size: 192 bytes, params: 3, frame: 17
var r0;
const env0_0 = a0;
if (a1 == null) {
return true;
}
let value = typeof a1;
if (value === 'string') {
return a0.includes(a1);
}
if (value !== 'object') {
return false;
}
const ANY = RPC_SCOPE_CONFIG.ANY;
const property = a1[ANY];
const ALL = RPC_SCOPE_CONFIG.ALL;
const property2 = a1[ALL];
const Array = global.Array;
value = Array.isArray(property);
const r5 = value ? !property.some(_fun99667) : !value;
value = !r5;
if (r5) {
value = global.Array.isArray(property2);
value = !(value ? !property2.every(_fun99668) : !value);
r0 = value;
} else {
r0 = value;
}
return r0;
}