/* Metro module 1422; source: records/GuildRecord.tsx; dependencies: [1419, 661, 1423, 1861, 21, 1865, 2] */ function _fun16591(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#16591, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1549:6, offset: 0x00e54685, size: 660 bytes, params: 8, frame: 28 var object2; const env0_0 = require; const closure = function(a0, a1) { var value = a1; return a0.ownerId === (typeof value === 'string' ? value : value != null ? value.id : null); }; let Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); let value = require(1419) /* metro dependency 1419: PlainRecord */; let set = value.set; value.TypeTag; value = require(661) /* metro dependency 661: Constants */; const BoostedGuildTiers = value.BoostedGuildTiers; const GuildExplicitContentFilterTypes = value.GuildExplicitContentFilterTypes; const GuildNSFWContentLevel = value.GuildNSFWContentLevel; const MFALevels = value.MFALevels; const UserNotificationSettings = value.UserNotificationSettings; const VerificationLevels = value.VerificationLevels; let Set = global.Set; const EXPLICIT = GuildNSFWContentLevel.EXPLICIT; const AGE_RESTRICTED = GuildNSFWContentLevel.AGE_RESTRICTED; set = new Set([EXPLICIT, AGE_RESTRICTED]); Object = global.Object; const freeze = Object.freeze; object2 = {'mfaLevel': null, 'preferredLocale': 'en-US', 'afkTimeout': 0}; let NONE = MFALevels.NONE; object2.mfaLevel = NONE; const ALL_MESSAGES = UserNotificationSettings.ALL_MESSAGES; object2.defaultMessageNotifications = ALL_MESSAGES; NONE = VerificationLevels.NONE; object2.verificationLevel = NONE; const DISABLED = GuildExplicitContentFilterTypes.DISABLED; object2.explicitContentFilter = DISABLED; object2.premiumProgressBarEnabled = false; object2.premiumProgressBarEnabledUserUpdatedAt = null; object2.systemChannelFlags = 0; object2.maxStageVideoChannelUsers = -1; object2.maxVideoChannelUsers = -1; object2.maxMembers = -1; NONE = BoostedGuildTiers.NONE; object2.premiumTier = NONE; const DEFAULT = GuildNSFWContentLevel.DEFAULT; object2.nsfwLevel = DEFAULT; object2.premiumSubscriberCount = 0; Set = global.Set; const value2 = Object.create(Set.prototype, {constructor: {value: Set}}); set = new Set(); object2.features = set instanceof Object ? set : value2; object2.description = null; object2.icon = null; object2.ownerId = null; object2.systemChannelId = null; object2.joinedAt = null; object2.discoverySplash = null; object2.splash = null; object2.banner = null; object2.homeHeader = null; object2.afkChannelId = null; object2.application_id = null; object2.vanityURLCode = null; object2.rulesChannelId = null; object2.safetyAlertsChannelId = null; object2.publicUpdatesChannelId = null; object2.ownerConfiguredContentLevel = null; object2.hubType = null; object2.latestOnboardingQuestionId = null; object2.profile = null; object2.guildTheme = null; object2.premiumFeatures = null; object2.moderatorReporting = null; object2.verificationRoleId = null; object2.gameApplicationIds = null; object2.officialMessageColor = null; const value4 = Reflect.apply(freeze, Object, [object2]); (require(2) /* metro dependency 2 */).fileFinishedImporting('records/GuildRecord.tsx'); exports.GuildRecordTypeTag = 'Guild'; exports.RESTRICTED_CONTENT_LEVELS = set; exports.GUILD_DEFAULT_PROPERTY_VALUES = value4; exports.getGuildIconURL = getGuildIconURL; exports.getGuildIconSource = getGuildIconSource; exports.getGuildAcronym = getGuildAcronym; exports.isGuildOwner = closure; exports.isGuildOwnerWithRequiredMfaLevel = isGuildOwnerWithRequiredMfaLevel; exports.isGuildLurker = function(a0) { return a0.joinedAt == null; }; exports.getGuildEveryoneRoleId = getGuildEveryoneRoleId; exports.updateJoinedAt = function(a0, a1) { var r3; var value = a1; var setBinding = set; if (typeof value !== 'string') { r3 = value; } else { value = new global.Date(value); r3 = value; } return setBinding(a0, 'joinedAt', r3); }; exports.updateGameApplications = function(a0, a1) { return set(a0, 'gameApplicationIds', a1); }; exports.isGuildNSFW = isGuildNSFW; } function getGuildIconURL({id, icon}, a1) { // fn#16593, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1549:1497, offset: 0x00e5494a, size: 96 bytes, params: 3, frame: 15 const value = a2; const value2 = a3; return (importDefault(1423) /* metro dependency 1423: AvatarUtils */).getGuildIconURL({id: id, size: a1, icon: icon, canAnimate: value !== undefined ? value : false, lossless: value2 !== undefined ? value2 : false}); } function getGuildIconSource(a0, a1) { // fn#16594, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1549:1644, offset: 0x00e549aa, size: 69 bytes, params: 3, frame: 15 const value = a2; const env0_0 = a0; const env0_1 = a1; return (importDefault(1423) /* metro dependency 1423: AvatarUtils */).getAnimatableSourceWithFallback(value !== undefined ? value : false, _fun16595); } function getGuildAcronym({name}) { // fn#16596, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1549:1826, offset: 0x00e54a40, size: 46 bytes, params: 2, frame: 11 return (require(1861) /* metro dependency 1861: StringUtils */).getAcronym(name); } function isGuildOwnerWithRequiredMfaLevel(a0, a1) { // fn#16597, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1549:1952, offset: 0x00e54a6e, size: 64 bytes, params: 3, frame: 14 return !(!a1.mfaEnabled && a0.mfaLevel === MFALevels.ELEVATED) && isGuildOwner(a0, a1); } function getGuildEveryoneRoleId({id}) { // fn#16599, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1549:2159, offset: 0x00e54abf, size: 46 bytes, params: 2, frame: 11 return (importDefault(21) /* metro dependency 21: SnowflakeUtils */).castGuildIdAsEveryoneGuildRoleId(id); } function isGuildNSFW(a0) { // fn#16602, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1549:2464, offset: 0x00e54b52, size: 109 bytes, params: 2, frame: 15 var r1; var r0; var isServerNSFWLevelEnabled2; var binding; var has; const value = a0 != null; if (value) { isServerNSFWLevelEnabled2 = (require(1865) /* metro dependency 1865: ServerNSFWLevelExperiment */).isServerNSFWLevelEnabled('guild_record'); binding = env0_6; has = binding.has; if (isServerNSFWLevelEnabled2) { r1 = Reflect.apply(has, binding, [a0.nsfwLevel]); } else { r1 = a0.ownerConfiguredContentLevel ?? GuildNSFWContentLevel.DEFAULT; r1 = Reflect.apply(has, binding, [r1]); } r0 = r1; } else { r0 = value; } return r0; } function _fun16595(a0) { // fn#16595, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1549:1732, offset: 0x00e549ef, size: 81 bytes, params: 2, frame: 14 let value = environment.__proto__; value = importDefault(1423) /* metro dependency 1423: AvatarUtils */; const getGuildIconSource = value.getGuildIconSource; const binding = env0_0; return Reflect.apply(getGuildIconSource, value, [{id: binding.id, size: require, icon: binding.icon, canAnimate: a0}]); }