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

98 lines
5.9 KiB
TypeScript

/* Metro module 3790; source: modules/guild_automod/AutomodPermissionUtils.tsx; dependencies: [1945, 3772, 1391, 566, 2] */
import GuildMemberStore from '../../stores/GuildMemberStore.tsx'; /* Metro dependency 1945 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as FluxModule from '../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as GuildMemberConstantsModule from '../guild_member/GuildMemberConstants.tsx'; /* Metro dependency 3772 */
function _fun28823(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#28823, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3917:6, offset: 0x00f8431e, size: 232 bytes, params: 8, frame: 20
let env0_0 = require;
const getAutomodQuarantinedProfileFlags2 = getAutomodQuarantinedProfileFlags;
const hasAutomodQuarantinedProfile2 = hasAutomodQuarantinedProfile;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const GuildMemberFlags = (GuildMemberConstantsModule).GuildMemberFlags;
const AUTOMOD_QUARANTINED_BIO = GuildMemberFlags.AUTOMOD_QUARANTINED_BIO;
items2 = [AUTOMOD_QUARANTINED_BIO];
const AUTOMOD_QUARANTINED_USERNAME_OR_GUILD_NICKNAME = GuildMemberFlags.AUTOMOD_QUARANTINED_USERNAME_OR_GUILD_NICKNAME;
items2[1] = AUTOMOD_QUARANTINED_USERNAME_OR_GUILD_NICKNAME;
const AUTOMOD_QUARANTINED_SERVER_TAG = GuildMemberFlags.AUTOMOD_QUARANTINED_SERVER_TAG;
items2[2] = AUTOMOD_QUARANTINED_SERVER_TAG;
(FileImportTrackerModule).fileFinishedImporting('modules/guild_automod/AutomodPermissionUtils.tsx');
exports.AUTOMOD_QUARANTINED_PROFILE_FLAGS = items2;
exports.getAutomodQuarantinedProfileFlags = getAutomodQuarantinedProfileFlags2;
exports.getAutomodQuarantinedGuildMemberFlags = getAutomodQuarantinedGuildMemberFlags;
exports.getAutomodReason = function(a0) {
return a0.has(GuildMemberFlags.AUTOMOD_QUARANTINED_USERNAME_OR_GUILD_NICKNAME) ? GuildMemberFlags.AUTOMOD_QUARANTINED_USERNAME_OR_GUILD_NICKNAME : a0.has(GuildMemberFlags.AUTOMOD_QUARANTINED_BIO) ? GuildMemberFlags.AUTOMOD_QUARANTINED_BIO : a0.has(GuildMemberFlags.AUTOMOD_QUARANTINED_SERVER_TAG) ? GuildMemberFlags.AUTOMOD_QUARANTINED_SERVER_TAG : null;
};
exports.hasAutomodQuarantinedProfile = hasAutomodQuarantinedProfile2;
exports.useCurrentUserAutomodQuaratinedProfile = function(a0) {
var env0_0 = a0;
return require(dependencyMap[3]).useStateFromStores([GuildMemberStore], _fun28831, [a0]);
};
function getAutomodQuarantinedProfileFlags(a0) { // fn#28824, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3917:245, offset: 0x00f84406, size: 103 bytes, params: 2, frame: 14
var set;
var Set;
var value;
const env0_0 = a0;
if (a0 == null) {
set = new global.Set();
} else {
Set = global.Set;
value = env0_4.reduce(_fun28825, []);
set = new Set();
}
return set;
function _fun28825(a0, a1) { // fn#28825, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3917:332, offset: 0x00f8446d, size: 80 bytes, params: 3, frame: 16
let value = environment.__proto__;
value = require(1391) /* metro dependency 1391: FlagUtils */;
if (value.hasFlag(env0_0 ?? 0, a1)) {
a0.push(a1);
}
return a0;
}
}
function hasAutomodQuarantinedProfile(a0) { // fn#28826, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3917:391, offset: 0x00f844bd, size: 58 bytes, params: 2, frame: 13
const env0_0 = a0;
return a0 != null && (a0.flags != null && env0_4.some(_fun28827));
function _fun28827(a0) { // fn#28827, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3917:472, offset: 0x00f844f7, size: 68 bytes, params: 2, frame: 14
let value = environment.__proto__;
value = require(1391) /* metro dependency 1391: FlagUtils */;
return value.hasFlag(env0_0.flags ?? 0, a0);
}
}
function getAutomodQuarantinedGuildMemberFlags(a0) { // fn#28828, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3917:764, offset: 0x00f8453b, size: 60 bytes, params: 2, frame: 11
return a0 == null ? new global.Set() : getAutomodQuarantinedProfileFlags(a0.flags);
}
function useCurrentUserAutomodQuaratinedProfile(a0) { // fn#28830, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3917:1280, offset: 0x00f845e8, size: 73 bytes, params: 2, frame: 16
const env0_0 = a0;
return (FluxModule).useStateFromStores([GuildMemberStore], _fun28831, [a0]);
function _fun28831() { // fn#28831, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3917:1370, offset: 0x00f84631, size: 51 bytes, params: 1, frame: 13
var r0;
var value3;
var hasAutomodQuarantinedProfileBinding;
var value;
const value2 = env0_0 != null;
if (value2) {
value3 = environment.__proto__;
hasAutomodQuarantinedProfileBinding = hasAutomodQuarantinedProfile;
value = GuildMemberStore.getSelfMember(env0_0);
value = hasAutomodQuarantinedProfileBinding(value);
r0 = value;
} else {
r0 = value2;
}
return r0;
}
}
}
global.__d(_fun28823, 3790, [1945, 3772, 1391, 566,
2]) /* metro module 3790, dependencies: [1945, 3772, 1391, 566, 2] */;