/* Metro module 8249; source: utils/GuildBoostingUtils.tsx; dependencies: [1867, 1878, 7020, 3808, 661, 1881, 1880, 3816, 8250, 1244, 1360, 4136, 1948, 22, 3738, 8251, 2806, 3802, 1216, 8254, 8265, 2] */ import Module00022 from '../by-id/module-00022.js'; /* Metro dependency 22 */ import GuildStore from '../stores/GuildStore.tsx'; /* Metro dependency 1867 */ import UserStore from '../stores/UserStore.tsx'; /* Metro dependency 1878 */ import HelpdeskUtils from './HelpdeskUtils.tsx'; /* Metro dependency 1948 */ import Module03738 from '../by-id/module-03738.js'; /* Metro dependency 3738 */ import SubscriptionStore from '../stores/billing/SubscriptionStore.tsx'; /* Metro dependency 3808 */ import GuildBoostSlotStore from '../stores/billing/GuildBoostSlotStore.tsx'; /* Metro dependency 7020 */ import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */ import * as ConstantsModule from '../Constants.tsx'; /* Metro dependency 661 */ import * as IndexNativeModule from '../intl/index.native.tsx'; /* Metro dependency 1244 */ import * as GlobalUtilsModule from './GlobalUtils.tsx'; /* Metro dependency 1360 */ import * as PremiumGroupConstantsModule from '../modules/premium/premium_group/PremiumGroupConstants.tsx'; /* Metro dependency 3816 */ import * as FileSizeUtilsModule from './FileSizeUtils.tsx'; /* Metro dependency 4136 */ import * as UseGuildPowerupsBoostLevelProgressModule from '../modules/premium/powerups/hooks/useGuildPowerupsBoostLevelProgress.tsx'; /* Metro dependency 8265 */ function _fun65913(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#65913, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8434:6, offset: 0x01be5471, size: 1659 bytes, params: 8, frame: 46 const env0_0 = require; const _arrayLikeToArray_65916 = function(a0, a1) { var r0; var r1; var r2; var value3; var length; var value5; var value = undefined; var value2 = value == null; reducibleJoin2: while (true) { if (value2) { r0 = value2; break reducibleJoin2; } value3 = value > a0.length; r0 = value3; break reducibleJoin2; } reducibleJoin4: while (true) { if (r0) { length = a0.length; r1 = length; break reducibleJoin4; } r1 = value; break reducibleJoin4; } value = (0, global.Array)(r1); var value4 = 0; if (value4 < r1) { r2 = value4; reducibleLoop5: while (true) { value[r2] = a0[r2]; value5 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1; if (value5 < r1) { r2 = value5; continue reducibleLoop5; } break reducibleLoop5; } } return value; }; const closure = function(a0, a1) { return a1 == null ? TotalStickerCountsByTier[a0] : a1.features.has(GuildFeatures.MORE_STICKERS) && a0 === BoostedGuildTiers.TIER_3 ? require(dependencyMap[8]).PremiumGuildOverrides.MAX_STICKER_SLOTS : TotalStickerCountsByTier[a0]; }; const closure2 = function(a0) { return IncrementalStickerCountsByTier[a0]; }; const closure3 = function(a0, a1) { return a1 == null ? TotalSoundboardSoundCountsByTier[a0] : a1.features.has(GuildFeatures.MORE_SOUNDBOARD) ? MORE_SOUNDBOARD_SOUNDS : TotalSoundboardSoundCountsByTier[a0]; }; const getIncrementalSoundboardSoundCountForTier2 = getIncrementalSoundboardSoundCountForTier; const closure5 = function(a0) { var r0; r0 = GuildStore.getGuild(a0)?.premiumTier; r0 = r0 ?? BoostedGuildTiers.NONE; return r0; }; const closure6 = function(a0, a1) { return a1 == null || a0 != null && a0 >= a1; }; const getAvailableGuildBoostSlots2 = getAvailableGuildBoostSlots; const appliedGuildBoostsRequiredForPerks2 = appliedGuildBoostsRequiredForPerks; const closure9 = function(a0) { var property = a0.premiumFeatures; var value4 = DEFAULT_SOUND_SLOTS + (property?.additionalSoundSlots ?? 0); property = global.Math; return property.max(a0.features.has(GuildFeatures.MORE_SOUNDBOARD) ? MORE_SOUNDBOARD_SOUNDS : DEFAULT_SOUND_SLOTS, value4); }; const isGuildBoostSlotCanceled2 = isGuildBoostSlotCanceled; const getTheoreticalPremiumTierForSubscriberCount2 = getTheoreticalPremiumTierForSubscriberCount; const getNextPremiumTierForSubscriberCount2 = getNextPremiumTierForSubscriberCount; let Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); let value = ConstantsModule; const env0_8 = value.AnalyticsObjectTypes; const AppliedGuildBoostsRequiredForBoostedGuildTier = value.AppliedGuildBoostsRequiredForBoostedGuildTier; const BoostedGuildTiers = value.BoostedGuildTiers; const env0_11 = value.GuildFeatures; const env0_12 = value.HelpdeskArticles; const env0_13 = value.MAX_STAGE_VIDEO_USER_LIMIT_TIER2; const env0_14 = value.MAX_STAGE_VIDEO_USER_LIMIT_TIER3; const env0_15 = value.SubscriptionStatusTypes; value = require(1881) /* metro dependency 1881: EmojiConstants */; const env0_16 = value.DEFAULT_EMOJI_SLOTS; const env0_17 = value.EMOJI_MAX_SLOTS_MORE; value = require(1880) /* metro dependency 1880: PremiumConstants */; const env0_18 = value.BoostedGuildFeatures; const env0_19 = value.DEFAULT_SOUND_SLOTS; const env0_20 = value.MORE_SOUNDBOARD_SOUNDS; const env0_21 = value.FractionalPremiumStates; const env0_22 = value.IncrementalStickerCountsByTier; const env0_23 = value.TotalSoundboardSoundCountsByTier; const env0_24 = value.TotalStickerCountsByTier; object = {LEVEL_1: 1}; object[1] = 'LEVEL_1'; object.LEVEL_2 = 2; object[2] = 'LEVEL_2'; object.LEVEL_3 = 3; object[3] = 'LEVEL_3'; object.LEVEL_4 = 4; object[4] = 'LEVEL_4'; object.LEVEL_5 = 5; object[5] = 'LEVEL_5'; object.LEVEL_6 = 6; object[6] = 'LEVEL_6'; object.LEVEL_7 = 7; object[7] = 'LEVEL_7'; object.LEVEL_8 = 8; object[8] = 'LEVEL_8'; object.LEVEL_9 = 9; object[9] = 'LEVEL_9'; Object = global.Object; const freeze = Object.freeze; const LEVEL_1 = object.LEVEL_1; const LEVEL_2 = object.LEVEL_2; const LEVEL_3 = object.LEVEL_3; const LEVEL_4 = object.LEVEL_4; const LEVEL_5 = object.LEVEL_5; const LEVEL_6 = object.LEVEL_6; const LEVEL_7 = object.LEVEL_7; const LEVEL_8 = object.LEVEL_8; const LEVEL_9 = object.LEVEL_9; const env0_26 = Reflect.apply(freeze, Object, [{[LEVEL_1]: 1, [LEVEL_2]: 2, [LEVEL_3]: 3, [LEVEL_4]: 6, [LEVEL_5]: 9, [LEVEL_6]: 12, [LEVEL_7]: 15, [LEVEL_8]: 18, [LEVEL_9]: 24}]); object = {EMOJI: 1}; object[1] = 'EMOJI'; object.AUDIO = 2; object[2] = 'AUDIO'; object.ANIMATED = 3; object[3] = 'ANIMATED'; object.CUSTOMIZATION = 4; object[4] = 'CUSTOMIZATION'; object.UPLOAD = 5; object[5] = 'UPLOAD'; object.VANITY = 6; object[6] = 'VANITY'; object.STREAM = 7; object[7] = 'STREAM'; object.STICKER = 8; object[8] = 'STICKER'; object.CUSTOM_ROLE_ICON = 11; object[11] = 'CUSTOM_ROLE_ICON'; object.STAGE_VIDEO = 12; object[12] = 'STAGE_VIDEO'; object.SOUNDBOARD = 13; object[13] = 'SOUNDBOARD'; let NONE = BoostedGuildTiers.NONE; const items3 = [NONE]; let TIER_1 = BoostedGuildTiers.TIER_1; items3[1] = TIER_1; let TIER_2 = BoostedGuildTiers.TIER_2; items3[2] = TIER_2; let TIER_3 = BoostedGuildTiers.TIER_3; items3[3] = TIER_3; value = items3.slice(); value = value.reverse(); let value3 = (Module00022).memoize(_fun65933); const object3 = {}; TIER_3 = BoostedGuildTiers.TIER_3; object3.tier = TIER_3; TIER_3 = BoostedGuildTiers.TIER_3; object3.amount = AppliedGuildBoostsRequiredForBoostedGuildTier[TIER_3]; object3.nextTier = null; const items2 = [object3]; const object4 = {}; TIER_2 = BoostedGuildTiers.TIER_2; object4.tier = TIER_2; TIER_2 = BoostedGuildTiers.TIER_2; object4.amount = AppliedGuildBoostsRequiredForBoostedGuildTier[TIER_2]; TIER_3 = BoostedGuildTiers.TIER_3; object4.nextTier = TIER_3; items2[1] = object4; const object5 = {}; TIER_1 = BoostedGuildTiers.TIER_1; object5.tier = TIER_1; TIER_1 = BoostedGuildTiers.TIER_1; object5.amount = AppliedGuildBoostsRequiredForBoostedGuildTier[TIER_1]; TIER_2 = BoostedGuildTiers.TIER_2; object5.nextTier = TIER_2; items2[2] = object5; const object6 = {}; NONE = BoostedGuildTiers.NONE; object6[NONE] = 0; TIER_1 = BoostedGuildTiers.TIER_1; object6[TIER_1] = 0.3333333333333333; TIER_2 = BoostedGuildTiers.TIER_2; object6[TIER_2] = 0.6666666666666666; TIER_3 = BoostedGuildTiers.TIER_3; object6[TIER_3] = 1; (FileImportTrackerModule).fileFinishedImporting('utils/GuildBoostingUtils.tsx'); exports.PerkIcons = object; exports.OrderedTiers = items3; exports.ReverseOrderedTiers = value; exports.getNextTier = getNextTier; exports.getTotalStickerCountForTier = closure; exports.getIncrementalStickerCountForTier = closure2; exports.getTotalSoundboardSoundCountForTier = closure3; exports.getIncrementalSoundboardSoundCountForTier = getIncrementalSoundboardSoundCountForTier2; exports.getTiers = getTiers; exports.getTierName = getTierName; exports.getShortenedTierName = getShortenedTierName; exports.minimumRequiredTierForGuildFeature = value3; exports.boostedGuildTierToAnalyticsObjectType = function(a0) { if (BoostedGuildTiers.NONE === a0) { return AnalyticsObjectTypes.NONE; } if (BoostedGuildTiers.TIER_1 === a0) { return AnalyticsObjectTypes.TIER_1; } if (BoostedGuildTiers.TIER_2 === a0) { return AnalyticsObjectTypes.TIER_2; } if (BoostedGuildTiers.TIER_3 === a0) { return AnalyticsObjectTypes.TIER_3; } return null; }; exports.getGuildTierFromGuild = closure5; exports.getNextGuildTierFromGuild = getNextGuildTierFromGuild; exports.getAppliedGuildBoostMonths = getAppliedGuildBoostMonths; exports.getUserLevel = getUserLevel; exports.isGuildBoostedAtLeast = closure6; exports.isTierUnlocked = function(a0, a1) { return isGuildBoostedAtLeast(a0.premiumTier, a1); }; exports.getAvailableGuildBoostSlots = getAvailableGuildBoostSlots2; exports.generateBlockGuildSubscriptionPurchasesNode = generateBlockGuildSubscriptionPurchasesNode; exports.isAppliedGuildBoostActive = function(a0) { var r1; var r0; var property = a0.ended; var value = !property; if (property) { r0 = value; } else { value = a0.endsAt == null; if (value) { r1 = value; } else { property = a0.endsAt; value = property.getTime(); property = global.Date; value = value > property.now(); r1 = value; } r0 = r1; } return r0; }; exports.isInGracePeriod = isInGracePeriod; exports.appliedGuildBoostsRequiredForPerks = appliedGuildBoostsRequiredForPerks2; exports.GuildTierSubscriptionsOrdered = items2; exports.getGracePeriodEndingDate = getGracePeriodEndingDate; exports.getAvailableStickerSlotCount = getAvailableStickerSlotCount; exports.getAvailableSoundboardSoundCount = getAvailableSoundboardSoundCount; exports.getMaxSoundboardSlots = closure9; exports.getMaxEmojiSlots = function(a0) { var property = a0.premiumFeatures; var value4 = DEFAULT_EMOJI_SLOTS + (property?.additionalEmojiSlots ?? 0); property = global.Math; return property.max(a0.features.has(GuildFeatures.MORE_EMOJI) ? EMOJI_MAX_SLOTS_MORE : DEFAULT_EMOJI_SLOTS, value4); }; exports.getNumberOfAppliedBoostsNeededForTier = function(a0, a1) { var available = require(dependencyMap[19]).getGuildPowerupsBoostCount(a0.id).available; var property = AppliedGuildBoostsRequiredForBoostedGuildTier[a1]; var Math = global.Math; return Math.max(0, property - available); }; exports.isGuildBoostSlotCanceled = isGuildBoostSlotCanceled2; exports.getTheoreticalPremiumTierForSubscriberCount = getTheoreticalPremiumTierForSubscriberCount2; exports.getNextPremiumTierForSubscriberCount = getNextPremiumTierForSubscriberCount2; exports.TierMarkerPositions = object6; exports.getGuildBoostingProgressBarFillFactor = getGuildBoostingProgressBarFillFactor; function _createForOfIteratorHelperLoose_65914(a0, a1) { // fn#65914, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8434:703, offset: 0x01be5aec, size: 372 bytes, params: 3, frame: 20 var r6; var r9; var r5; var value3; var regexp; const env0_0 = a0; const Symbol = global.Symbol; let value = typeof Symbol !== 'undefined'; let r1 = value && a0[global.Symbol.iterator]; r1 = !r1 ? a0['@@iterator'] : r1; if (r1) { value = r1.call(a0); return value.next.bind(value); } const Array = global.Array; if (Array.isArray(a0)) { if (r1) { } return _fun65915; } value = undefined; if (a0) { if (typeof a0 === 'string') { value = _arrayLikeToArray_65916(a0, value); r5 = value; } else { value3 = ({}).toString.call(a0).slice(8, -1); r6 = value3 === 'Object' && a0.constructor; r9 = r6 ? a0.constructor.name : value3; if (r9 === 'Map') { r6 = global.Array.from(a0); } else if (r9 === 'Set') { r6 = global.Array.from(a0); } else if (r9 === 'Arguments') { value = _arrayLikeToArray_65916(a0, value); r6 = value; } else { regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', ''); if (regexp.test(r9)) { value = _arrayLikeToArray_65916(a0, value); r6 = value; } else { r6 = value; } } r5 = r6; } } else { r5 = value; } if (r5) { if (r5) { } return _fun65915; } const TypeError = global.TypeError; throw new TypeError('Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.'); function _fun65915() { // fn#65915, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8434:1274, offset: 0x00c39d73, size: 69 bytes, params: 1, frame: 5 return env0_1 >= env0_0.length ? {done: true} : {done: false, value: env0_0[typeof env0_1 === 'bigint' ? env0_1 : +env0_1]}; } } function getIncrementalSoundboardSoundCountForTier(a0) { // fn#65920, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8434:2743, offset: 0x01be5d1a, size: 78 bytes, params: 2, frame: 13 const NONE = BoostedGuildTiers.NONE; if (a0 === NONE) { return TotalSoundboardSoundCountsByTier[a0]; } const binding = env0_28; return TotalSoundboardSoundCountsByTier[a0] - TotalSoundboardSoundCountsByTier[binding[binding.indexOf(a0) - 1]]; } function getAvailableGuildBoostSlots(a0) { // fn#65923, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8434:3201, offset: 0x01be5dbd, size: 59 bytes, params: 2, frame: 11 let value = Module00022; value = value.values(a0); return value.filter(function(a0) { return a0.isAvailable(); }); } function appliedGuildBoostsRequiredForPerks(a0, a1) { // fn#65925, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8434:3296, offset: 0x01be5e07, size: 129 bytes, params: 3, frame: 16 const guild = GuildStore.getGuild(a1); if ((guild == null ? undefined : guild.features.has(GuildFeatures.PREMIUM_TIER_3_OVERRIDE)) === true) { return 0; } return AppliedGuildBoostsRequiredForBoostedGuildTier[getGuildTierFromGuild(a1)] - (a0.length - a0.filter(function(a0) { return a0.endsAt != null; }).length); } function isGuildBoostSlotCanceled(a0) { // fn#65928, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8434:3882, offset: 0x01be5f06, size: 53 bytes, params: 2, frame: 4 const status = a0.subscription?.status; const CANCELED = SubscriptionStatusTypes.CANCELED; return status === CANCELED || a0.canceled; } function getTheoreticalPremiumTierForSubscriberCount(a0) { // fn#65929, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8434:3999, offset: 0x01be5f3b, size: 52 bytes, params: 2, frame: 12 const env0_0 = a0; return env0_29.find(_fun65930) ?? BoostedGuildTiers.NONE; function _fun65930(a0) { // fn#65930, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8434:4085, offset: 0x01be5f6f, size: 27 bytes, params: 2, frame: 3 return env0_0 >= AppliedGuildBoostsRequiredForBoostedGuildTier[a0]; } } function getNextPremiumTierForSubscriberCount(a0) { // fn#65931, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8434:4108, offset: 0x01be5f8a, size: 52 bytes, params: 2, frame: 12 const env0_0 = a0; return env0_28.find(_fun65932) ?? BoostedGuildTiers.TIER_3; function _fun65932(a0) { // fn#65932, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8434:4187, offset: 0x01be5fbe, size: 27 bytes, params: 2, frame: 3 return env0_0 < AppliedGuildBoostsRequiredForBoostedGuildTier[a0]; } } function _fun65933(a0) { // fn#65933, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8434:2888, offset: 0x01be5fd9, size: 155 bytes, params: 2, frame: 12 var TIER_3; var r0; const TIER_1 = BoostedGuildTiers.TIER_1; let features = BoostedGuildFeatures[TIER_1].features; if (features.includes(a0)) { r0 = BoostedGuildTiers.TIER_1; } else { features = BoostedGuildFeatures[BoostedGuildTiers.TIER_2].features; if (features.includes(a0)) { r0 = BoostedGuildTiers.TIER_2; } else { TIER_3 = BoostedGuildTiers.TIER_3; TIER_3 = BoostedGuildFeatures[TIER_3].features.includes(a0) ? BoostedGuildTiers.TIER_3 : null; r0 = TIER_3; } } return r0; } function getNextTier(a0) { // fn#65934, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8434:4438, offset: 0x01be6074, size: 79 bytes, params: 2, frame: 12 const env0_0 = a0; const NONE = BoostedGuildTiers.NONE; return a0 === NONE ? BoostedGuildTiers.TIER_1 : env0_30.find(_fun65935)?.nextTier; function _fun65935({tier}) { // fn#65935, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8434:4512, offset: 0x01be60c3, size: 22 bytes, params: 2, frame: 2 return tier === env0_0; } } function getTiers(a0) { // fn#65936, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8434:4852, offset: 0x01be60d9, size: 4097 bytes, params: 2, frame: 34 var r4; var r3; var object; var T8P3TH; var object2; let object5 = {}; let TIER_1 = BoostedGuildTiers.TIER_1; object5.tier = TIER_1; const intl = (IndexNativeModule).intl; let string = intl.string; const t = (IndexNativeModule).t; object5.title = Reflect.apply(string, intl, [t['lK+WOT']]); const object7 = {}; let formatToPlainString = intl.formatToPlainString; let dnLAwl = t.dnLAwl; TIER_1 = BoostedGuildTiers.TIER_1; let emoji = BoostedGuildFeatures[TIER_1].limits.emoji; const NONE = BoostedGuildTiers.NONE; TIER_1 = BoostedGuildTiers.TIER_1; object7.title = Reflect.apply(formatToPlainString, intl, [dnLAwl, {adding: emoji - BoostedGuildFeatures[NONE].limits.emoji, total: BoostedGuildFeatures[TIER_1].limits.emoji}]); object7.description = intl.string(t['/Guvxs']); let binding = env0_27; let EMOJI = binding.EMOJI; object7.icon = EMOJI; const items5 = [object7]; formatToPlainString = intl.formatToPlainString; let property = t['/9p2/g']; const object8 = {}; let getIncrementalStickerCountForTierBinding = getIncrementalStickerCountForTier; TIER_1 = BoostedGuildTiers.TIER_1; object8.adding = getIncrementalStickerCountForTierBinding(TIER_1); let getTotalStickerCountForTierBinding = getTotalStickerCountForTier; TIER_1 = BoostedGuildTiers.TIER_1; object8.total = getTotalStickerCountForTierBinding(TIER_1); string = intl.string; const JfsnDQ = t.JfsnDQ; let STICKER = binding.STICKER; items5[1] = {title: Reflect.apply(formatToPlainString, intl, [property, object8]), description: Reflect.apply(string, intl, [JfsnDQ]), icon: STICKER}; formatToPlainString = intl.formatToPlainString; let NRuk5m = t.NRuk5m; const object12 = {}; let getIncrementalSoundboardSoundCountForTierBinding = getIncrementalSoundboardSoundCountForTier; TIER_1 = BoostedGuildTiers.TIER_1; object12.soundCount = getIncrementalSoundboardSoundCountForTierBinding(TIER_1); let getTotalSoundboardSoundCountForTierBinding = getTotalSoundboardSoundCountForTier; TIER_1 = BoostedGuildTiers.TIER_1; object12.totalSoundCount = getTotalSoundboardSoundCountForTierBinding(TIER_1); string = intl.string; const Oq7OVl = t.Oq7OVl; let SOUNDBOARD = binding.SOUNDBOARD; items5[2] = {title: Reflect.apply(formatToPlainString, intl, [NRuk5m, object12]), description: Reflect.apply(string, intl, [Oq7OVl]), icon: SOUNDBOARD}; const object16 = {}; formatToPlainString = intl.formatToPlainString; let zoT1ZE = t.zoT1ZE; TIER_1 = BoostedGuildTiers.TIER_1; object16.title = Reflect.apply(formatToPlainString, intl, [zoT1ZE, {bitrate: BoostedGuildFeatures[TIER_1].limits.bitrate / 1000}]); object16.description = intl.string(t['8a03jk']); let AUDIO = binding.AUDIO; object16.icon = AUDIO; items5[3] = object16; let format = intl.format; let ANIMATED = binding.ANIMATED; items5[4] = {title: intl.string(t.h0s84V), description: Reflect.apply(format, intl, [t['t+0cbk'], {}]), icon: ANIMATED}; let CUSTOMIZATION = binding.CUSTOMIZATION; items5[5] = {title: intl.string(t.vjPGPp), description: intl.string(t.tG4MMU), icon: CUSTOMIZATION}; const object18 = {}; object18.title = intl.string(t.cObMZD); object18.description = intl.string(t['puH/9R']); let STREAM = binding.STREAM; object18.icon = STREAM; items5[6] = object18; const filter = items5.filter; const isNotNullish = (GlobalUtilsModule).isNotNullish; object5.perks = Reflect.apply(filter, items5, [isNotNullish]); const items2 = [object5]; object5 = {}; let TIER_2 = BoostedGuildTiers.TIER_2; object5.tier = TIER_2; object5.title = intl.string(t['34GpBc']); formatToPlainString = intl.formatToPlainString; dnLAwl = t.dnLAwl; TIER_2 = BoostedGuildTiers.TIER_2; emoji = BoostedGuildFeatures[TIER_2].limits.emoji; TIER_1 = BoostedGuildTiers.TIER_1; TIER_2 = BoostedGuildTiers.TIER_2; EMOJI = binding.EMOJI; const items3 = [{title: Reflect.apply(formatToPlainString, intl, [dnLAwl, {adding: emoji - BoostedGuildFeatures[TIER_1].limits.emoji, total: BoostedGuildFeatures[TIER_2].limits.emoji}]), description: intl.string(t.fRiNhw), icon: EMOJI}]; formatToPlainString = intl.formatToPlainString; property = t['/9p2/g']; const object19 = {}; TIER_2 = BoostedGuildTiers.TIER_2; object19.adding = getIncrementalStickerCountForTierBinding(TIER_2); TIER_2 = BoostedGuildTiers.TIER_2; object19.total = getTotalStickerCountForTierBinding(TIER_2); STICKER = binding.STICKER; items3[1] = {title: Reflect.apply(formatToPlainString, intl, [property, object19]), description: intl.string(t.t4TM28), icon: STICKER}; formatToPlainString = intl.formatToPlainString; NRuk5m = t.NRuk5m; const object21 = {}; TIER_2 = BoostedGuildTiers.TIER_2; object21.soundCount = getIncrementalSoundboardSoundCountForTierBinding(TIER_2); TIER_2 = BoostedGuildTiers.TIER_2; object21.totalSoundCount = getTotalSoundboardSoundCountForTierBinding(TIER_2); SOUNDBOARD = binding.SOUNDBOARD; items3[2] = {title: Reflect.apply(formatToPlainString, intl, [NRuk5m, object21]), description: intl.string(t.pEYlPZ), icon: SOUNDBOARD}; const object27 = {}; formatToPlainString = intl.formatToPlainString; zoT1ZE = t.zoT1ZE; TIER_2 = BoostedGuildTiers.TIER_2; object27.title = Reflect.apply(formatToPlainString, intl, [zoT1ZE, {bitrate: BoostedGuildFeatures[TIER_2].limits.bitrate / 1000}]); object27.description = intl.string(t['nzRo/I']); AUDIO = binding.AUDIO; object27.icon = AUDIO; items3[3] = object27; const object30 = {}; object30.title = intl.string(t['+KhQKM']); string = intl.string; const ZWf10P = t.ZWf10P; object30.description = Reflect.apply(string, intl, [ZWf10P]); CUSTOMIZATION = binding.CUSTOMIZATION; object30.icon = CUSTOMIZATION; items3[4] = object30; formatToPlainString = intl.formatToPlainString; let t95LnM = t.t95LnM; let formatSize = FileSizeUtilsModule.formatSize; TIER_2 = BoostedGuildTiers.TIER_2; let UPLOAD = binding.UPLOAD; items3[5] = {title: Reflect.apply(formatToPlainString, intl, [t95LnM, {fileSize: Reflect.apply(formatSize, FileSizeUtilsModule, [BoostedGuildFeatures[TIER_2].limits.fileSize / 1024, {useKibibytes: true}])}]), description: intl.format(t.yvht65, {}), icon: UPLOAD}; string = intl.string; const WZW2Bj = t.WZW2Bj; STREAM = binding.STREAM; items3[6] = {title: intl.string(t.bmaoNI), description: Reflect.apply(string, intl, [WZW2Bj]), icon: STREAM}; string = intl.string; const BHtqcV = t.BHtqcV; const CUSTOM_ROLE_ICON = binding.CUSTOM_ROLE_ICON; items3[7] = {title: Reflect.apply(string, intl, [BHtqcV]), description: intl.string(t.ukVcEe), icon: CUSTOM_ROLE_ICON}; const value3 = null; if (a0) { object = {}; formatToPlainString = intl.formatToPlainString; T8P3TH = t.T8P3TH; object.title = Reflect.apply(formatToPlainString, intl, [T8P3TH, {limit: MAX_STAGE_VIDEO_USER_LIMIT_TIER2}]); formatToPlainString = intl.formatToPlainString; T8P3TH = t.T8P3TH; object.description = Reflect.apply(formatToPlainString, intl, [T8P3TH, {limit: MAX_STAGE_VIDEO_USER_LIMIT_TIER2}]); object.icon = env0_27.STAGE_VIDEO; r4 = object; } else { r4 = value3; } items3[8] = r4; object5.perks = items3.filter(isNotNullish); items2[1] = object5; object5 = {}; let TIER_3 = BoostedGuildTiers.TIER_3; object5.tier = TIER_3; string = intl.string; const P7LdcQ = t.P7LdcQ; object5.title = Reflect.apply(string, intl, [P7LdcQ]); formatToPlainString = intl.formatToPlainString; dnLAwl = t.dnLAwl; TIER_3 = BoostedGuildTiers.TIER_3; emoji = BoostedGuildFeatures[TIER_3].limits.emoji; TIER_2 = BoostedGuildTiers.TIER_2; TIER_3 = BoostedGuildTiers.TIER_3; string = intl.string; const AfJxnV = t.AfJxnV; binding = env0_27; EMOJI = binding.EMOJI; const items4 = [{title: Reflect.apply(formatToPlainString, intl, [dnLAwl, {adding: emoji - BoostedGuildFeatures[TIER_2].limits.emoji, total: BoostedGuildFeatures[TIER_3].limits.emoji}]), description: Reflect.apply(string, intl, [AfJxnV]), icon: EMOJI}]; const object31 = {}; formatToPlainString = intl.formatToPlainString; property = t['/9p2/g']; const object32 = {}; getIncrementalStickerCountForTierBinding = getIncrementalStickerCountForTier; TIER_3 = BoostedGuildTiers.TIER_3; object32.adding = getIncrementalStickerCountForTierBinding(TIER_3); getTotalStickerCountForTierBinding = getTotalStickerCountForTier; TIER_3 = BoostedGuildTiers.TIER_3; object32.total = getTotalStickerCountForTierBinding(TIER_3); object31.title = Reflect.apply(formatToPlainString, intl, [property, object32]); object31.description = intl.string(t['+ZI4QZ']); STICKER = binding.STICKER; object31.icon = STICKER; items4[1] = object31; const object33 = {}; formatToPlainString = intl.formatToPlainString; NRuk5m = t.NRuk5m; const object34 = {}; getIncrementalSoundboardSoundCountForTierBinding = getIncrementalSoundboardSoundCountForTier; TIER_3 = BoostedGuildTiers.TIER_3; object34.soundCount = getIncrementalSoundboardSoundCountForTierBinding(TIER_3); getTotalSoundboardSoundCountForTierBinding = getTotalSoundboardSoundCountForTier; TIER_3 = BoostedGuildTiers.TIER_3; object34.totalSoundCount = getTotalSoundboardSoundCountForTierBinding(TIER_3); object33.title = Reflect.apply(formatToPlainString, intl, [NRuk5m, object34]); object33.description = intl.string(t['8omJSY']); SOUNDBOARD = binding.SOUNDBOARD; object33.icon = SOUNDBOARD; items4[2] = object33; const object35 = {}; formatToPlainString = intl.formatToPlainString; zoT1ZE = t.zoT1ZE; TIER_3 = BoostedGuildTiers.TIER_3; object35.title = Reflect.apply(formatToPlainString, intl, [zoT1ZE, {bitrate: BoostedGuildFeatures[TIER_3].limits.bitrate / 1000}]); object35.description = intl.string(t['cOkbp/']); AUDIO = binding.AUDIO; object35.icon = AUDIO; items4[3] = object35; const object36 = {}; string = intl.string; const C2w2cM = t.C2w2cM; object36.title = Reflect.apply(string, intl, [C2w2cM]); format = intl.format; property = t['3Reosx']; const defaultImport = HelpdeskUtils; const getArticleURL = defaultImport.getArticleURL; const GUILD_VANITY_URL = HelpdeskArticles.GUILD_VANITY_URL; object36.description = Reflect.apply(format, intl, [property, {helpdeskArticle: Reflect.apply(getArticleURL, defaultImport, [GUILD_VANITY_URL])}]); const VANITY = binding.VANITY; object36.icon = VANITY; items4[4] = object36; formatToPlainString = intl.formatToPlainString; t95LnM = t.t95LnM; formatSize = FileSizeUtilsModule.formatSize; TIER_3 = BoostedGuildTiers.TIER_3; format = intl.format; const IwDqSL = t.IwDqSL; UPLOAD = binding.UPLOAD; items4[5] = {title: Reflect.apply(formatToPlainString, intl, [t95LnM, {fileSize: Reflect.apply(formatSize, FileSizeUtilsModule, [BoostedGuildFeatures[TIER_3].limits.fileSize / 1024, {useKibibytes: true}])}]), description: Reflect.apply(format, intl, [IwDqSL, {}]), icon: UPLOAD}; ANIMATED = binding.ANIMATED; items4[6] = {title: intl.string(t.z0GtBG), description: intl.string(t.v92GNV), icon: ANIMATED}; if (a0) { object2 = {}; formatToPlainString = intl.formatToPlainString; T8P3TH = t.T8P3TH; object2.title = Reflect.apply(formatToPlainString, intl, [T8P3TH, {limit: MAX_STAGE_VIDEO_USER_LIMIT_TIER3}]); formatToPlainString = intl.formatToPlainString; T8P3TH = t.T8P3TH; object2.description = Reflect.apply(formatToPlainString, intl, [T8P3TH, {limit: MAX_STAGE_VIDEO_USER_LIMIT_TIER3}]); object2.icon = env0_27.STAGE_VIDEO; r3 = object2; } else { r3 = value3; } items4[7] = r3; object5.perks = items4.filter(isNotNullish); items2[2] = object5; return items2; } function getTierName(a0) { // fn#65937, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8434:9592, offset: 0x01be70da, size: 377 bytes, params: 2, frame: 16 const intl = (IndexNativeModule).intl; var string; const t = (IndexNativeModule).t; const value = a1; let r0 = value !== undefined ? value : {}; const useLevels = r0.useLevels; r0 = useLevels === undefined || useLevels; const NONE = BoostedGuildTiers.NONE; if (NONE === a0) { string = intl.string; r0 = r0 ? Reflect.apply(string, intl, [t.LcKgJd]) : Reflect.apply(string, intl, [t.mx8j2m]); return r0; } const TIER_1 = BoostedGuildTiers.TIER_1; if (TIER_1 === a0) { return intl.string(t.nzXtaS); } const TIER_2 = BoostedGuildTiers.TIER_2; if (TIER_2 === a0) { return intl.string(t['h33/uW']); } const TIER_3 = BoostedGuildTiers.TIER_3; if (TIER_3 === a0) { return intl.string(t.BfF6ED); } const Error = global.Error; throw new Error('Not a valid tier type'); } function getShortenedTierName(a0) { // fn#65938, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8434:10027, offset: 0x01be7253, size: 346 bytes, params: 2, frame: 15 const intl = (IndexNativeModule).intl; const t = (IndexNativeModule).t; const NONE = BoostedGuildTiers.NONE; if (NONE === a0) { return intl.string(t.LcKgJd); } const TIER_1 = BoostedGuildTiers.TIER_1; if (TIER_1 === a0) { return intl.string(t.xRjU1V); } const TIER_2 = BoostedGuildTiers.TIER_2; if (TIER_2 === a0) { return intl.string(t.C7e2Bo); } const TIER_3 = BoostedGuildTiers.TIER_3; if (TIER_3 === a0) { return intl.string(t.avGxmk); } const Error = global.Error; throw new Error('Not a valid tier type'); } function getNextGuildTierFromGuild(a0) { // fn#65940, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8434:10718, offset: 0x01be741f, size: 97 bytes, params: 2, frame: 16 var value5; var tier; var value6; const guildTierFromGuild = getGuildTierFromGuild(a0); const value3 = _createForOfIteratorHelperLoose_65914(env0_30); const value4 = value3(); let done = value4.done; if (done) { return BoostedGuildTiers.TIER_1; } let r3 = value4; loopExit1: while (true) { value5 = r3.value; tier = value5.tier; if (guildTierFromGuild === tier) { break loopExit1; } value6 = value3(); done = value6.done; if (done) { return BoostedGuildTiers.TIER_1; } r3 = value6; continue; } return value5.nextTier; } function getAppliedGuildBoostMonths(a0) { // fn#65941, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8434:10939, offset: 0x01be7480, size: 79 bytes, params: 2, frame: 15 var value; value = Reflect.apply((importDefault(3738) /* metro dependency 3738 */)().diff, value, [(importDefault(3738) /* metro dependency 3738 */)(a0), 'months']); return value ?? 1; } function getUserLevel(a0) { // fn#65942, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8434:11060, offset: 0x01be74cf, size: 126 bytes, params: 2, frame: 17 var r2; var r3; var r0; var property; var value7; var value8; const value3 = (Module03738)().diff(a0, 'months'); const Object = global.Object; const value4 = Object.keys(env0_26); let length = value4.length; const value5 = 0; const value6 = 1; if (value5 < length) { r2 = value6; r3 = value5; while (true) { property = value4[r3]; if (!(value3 < env0_26[property])) { value7 = Number(property); r2 = value7; } value8 = typeof r3 === 'bigint' ? r3 + 1n : +r3 + 1; length = value4.length; if (value8 < length) { r3 = value8; continue; } r0 = r2; break; } } else { r0 = value6; } return r0; } function generateBlockGuildSubscriptionPurchasesNode({fractionalState}) { // fn#65944, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8434:11447, offset: 0x01be756a, size: 843 bytes, params: 2, frame: 20 var r1; const intl = (IndexNativeModule).intl; const t = (IndexNativeModule).t; var Object; var value8; var numAvailableGuildBoostSlots; var numCanceledGuildBoostSlots; var status; var renewalMutations; var moduleValue2; var getNumPremiumGuildSubscriptions; var additionalPlans; var value9; var moduleValue3; var formatToPlainString; var property; var object; const premiumTypeSubscription = SubscriptionStore.getPremiumTypeSubscription(); const currentUser = UserStore.getCurrentUser(); if (!(GuildBoostSlotStore.hasFetched || GuildBoostSlotStore.isFetching)) { (require(8251) /* metro dependency 8251: BoostingActionCreators */).fetchGuildBoostSlots(); } if (premiumTypeSubscription?.isPausedOrPausePending) { if (fractionalState !== FractionalPremiumStates.NONE) { if (currentUser == null) { Object = global.Object; value8 = Object.values(GuildBoostSlotStore.boostSlots).reduce(function(a0, a1) { var property; if (isGuildBoostSlotCanceled(a1)) { property = a0.numCanceledGuildBoostSlots; a0.numCanceledGuildBoostSlots = typeof property === 'bigint' ? property + 1n : +property + 1; } if (a1.isAvailable()) { property = a0.numAvailableGuildBoostSlots; a0.numAvailableGuildBoostSlots = typeof property === 'bigint' ? property + 1n : +property + 1; } return a0; }, {'numAvailableGuildBoostSlots': 0, 'numCanceledGuildBoostSlots': 0}); numAvailableGuildBoostSlots = value8.numAvailableGuildBoostSlots; numCanceledGuildBoostSlots = value8.numCanceledGuildBoostSlots; if (premiumTypeSubscription == null) { return null; } if (numAvailableGuildBoostSlots > 0) { return null; } status = premiumTypeSubscription.status; if (status === SubscriptionStatusTypes.PAST_DUE) { return intl.string(t.De4Vm6); } status = premiumTypeSubscription.status; if (status === SubscriptionStatusTypes.ACCOUNT_HOLD) { return intl.string(t.JakNQ8); } if (numCanceledGuildBoostSlots > 0) { return intl.string(t.x25mZR); } renewalMutations = premiumTypeSubscription.renewalMutations; if (renewalMutations == null) { return null; } moduleValue2 = importAll(3802) /* metro dependency 3802: PremiumUtils */; getNumPremiumGuildSubscriptions = moduleValue2.getNumPremiumGuildSubscriptions; renewalMutations = premiumTypeSubscription.renewalMutations; additionalPlans = renewalMutations.additionalPlans; value9 = Reflect.apply(getNumPremiumGuildSubscriptions, moduleValue2, [additionalPlans]); moduleValue3 = importAll(3802) /* metro dependency 3802: PremiumUtils */; getNumPremiumGuildSubscriptions = moduleValue3.getNumPremiumGuildSubscriptions; additionalPlans = premiumTypeSubscription.additionalPlans; return Reflect.apply(getNumPremiumGuildSubscriptions, moduleValue3, [additionalPlans]) > value9 ? intl.string(t.x25mZR) : intl.string(t['W/bb8f']); } if (currentUser.isPremiumGroupMember()) { formatToPlainString = intl.formatToPlainString; property = (importDefault(2806) /* metro dependency 2806: PremiumGroupMessages */)['5xN/C1']; object = {}; object.premiumGroupProductName = getPremiumGroupProductName(); return Reflect.apply(formatToPlainString, intl, [property, object]); } Object = global.Object; value8 = Object.values(GuildBoostSlotStore.boostSlots).reduce(_fun65945, {'numAvailableGuildBoostSlots': 0, 'numCanceledGuildBoostSlots': 0}); numAvailableGuildBoostSlots = value8.numAvailableGuildBoostSlots; numCanceledGuildBoostSlots = value8.numCanceledGuildBoostSlots; if (premiumTypeSubscription == null) { return null; } if (numAvailableGuildBoostSlots > 0) { return null; } status = premiumTypeSubscription.status; if (status === SubscriptionStatusTypes.PAST_DUE) { return intl.string(t.De4Vm6); } status = premiumTypeSubscription.status; if (status === SubscriptionStatusTypes.ACCOUNT_HOLD) { return intl.string(t.JakNQ8); } if (numCanceledGuildBoostSlots > 0) { return intl.string(t.x25mZR); } renewalMutations = premiumTypeSubscription.renewalMutations; if (renewalMutations == null) { return null; } moduleValue2 = importAll(3802) /* metro dependency 3802: PremiumUtils */; getNumPremiumGuildSubscriptions = moduleValue2.getNumPremiumGuildSubscriptions; renewalMutations = premiumTypeSubscription.renewalMutations; additionalPlans = renewalMutations.additionalPlans; value9 = Reflect.apply(getNumPremiumGuildSubscriptions, moduleValue2, [additionalPlans]); moduleValue3 = importAll(3802) /* metro dependency 3802: PremiumUtils */; getNumPremiumGuildSubscriptions = moduleValue3.getNumPremiumGuildSubscriptions; additionalPlans = premiumTypeSubscription.additionalPlans; return Reflect.apply(getNumPremiumGuildSubscriptions, moduleValue3, [additionalPlans]) > value9 ? intl.string(t.x25mZR) : intl.string(t['W/bb8f']); } if (getAvailableGuildBoostSlots(GuildBoostSlotStore.boostSlots).length > 0) { if (currentUser == null) { Object = global.Object; value8 = Object.values(GuildBoostSlotStore.boostSlots).reduce(_fun65945, {'numAvailableGuildBoostSlots': 0, 'numCanceledGuildBoostSlots': 0}); numAvailableGuildBoostSlots = value8.numAvailableGuildBoostSlots; numCanceledGuildBoostSlots = value8.numCanceledGuildBoostSlots; if (premiumTypeSubscription == null) { return null; } if (numAvailableGuildBoostSlots > 0) { return null; } status = premiumTypeSubscription.status; if (status === SubscriptionStatusTypes.PAST_DUE) { return intl.string(t.De4Vm6); } status = premiumTypeSubscription.status; if (status === SubscriptionStatusTypes.ACCOUNT_HOLD) { return intl.string(t.JakNQ8); } if (numCanceledGuildBoostSlots > 0) { return intl.string(t.x25mZR); } renewalMutations = premiumTypeSubscription.renewalMutations; if (renewalMutations == null) { return null; } moduleValue2 = importAll(3802) /* metro dependency 3802: PremiumUtils */; getNumPremiumGuildSubscriptions = moduleValue2.getNumPremiumGuildSubscriptions; renewalMutations = premiumTypeSubscription.renewalMutations; additionalPlans = renewalMutations.additionalPlans; value9 = Reflect.apply(getNumPremiumGuildSubscriptions, moduleValue2, [additionalPlans]); moduleValue3 = importAll(3802) /* metro dependency 3802: PremiumUtils */; getNumPremiumGuildSubscriptions = moduleValue3.getNumPremiumGuildSubscriptions; additionalPlans = premiumTypeSubscription.additionalPlans; return Reflect.apply(getNumPremiumGuildSubscriptions, moduleValue3, [additionalPlans]) > value9 ? intl.string(t.x25mZR) : intl.string(t['W/bb8f']); } if (currentUser.isPremiumGroupMember()) { formatToPlainString = intl.formatToPlainString; property = (importDefault(2806) /* metro dependency 2806: PremiumGroupMessages */)['5xN/C1']; object = {}; object.premiumGroupProductName = getPremiumGroupProductName(); return Reflect.apply(formatToPlainString, intl, [property, object]); } Object = global.Object; value8 = Object.values(GuildBoostSlotStore.boostSlots).reduce(_fun65945, {'numAvailableGuildBoostSlots': 0, 'numCanceledGuildBoostSlots': 0}); numAvailableGuildBoostSlots = value8.numAvailableGuildBoostSlots; numCanceledGuildBoostSlots = value8.numCanceledGuildBoostSlots; if (premiumTypeSubscription == null) { return null; } if (numAvailableGuildBoostSlots > 0) { return null; } status = premiumTypeSubscription.status; if (status === SubscriptionStatusTypes.PAST_DUE) { return intl.string(t.De4Vm6); } status = premiumTypeSubscription.status; if (status === SubscriptionStatusTypes.ACCOUNT_HOLD) { return intl.string(t.JakNQ8); } if (numCanceledGuildBoostSlots > 0) { return intl.string(t.x25mZR); } renewalMutations = premiumTypeSubscription.renewalMutations; if (renewalMutations == null) { return null; } moduleValue2 = importAll(3802) /* metro dependency 3802: PremiumUtils */; getNumPremiumGuildSubscriptions = moduleValue2.getNumPremiumGuildSubscriptions; renewalMutations = premiumTypeSubscription.renewalMutations; additionalPlans = renewalMutations.additionalPlans; value9 = Reflect.apply(getNumPremiumGuildSubscriptions, moduleValue2, [additionalPlans]); moduleValue3 = importAll(3802) /* metro dependency 3802: PremiumUtils */; getNumPremiumGuildSubscriptions = moduleValue3.getNumPremiumGuildSubscriptions; additionalPlans = premiumTypeSubscription.additionalPlans; return Reflect.apply(getNumPremiumGuildSubscriptions, moduleValue3, [additionalPlans]) > value9 ? intl.string(t.x25mZR) : intl.string(t['W/bb8f']); } return intl.string(t.mOWsF1); } if (currentUser == null) { Object = global.Object; value8 = Object.values(GuildBoostSlotStore.boostSlots).reduce(function(a0, a1) { var property; if (isGuildBoostSlotCanceled(a1)) { property = a0.numCanceledGuildBoostSlots; a0.numCanceledGuildBoostSlots = typeof property === 'bigint' ? property + 1n : +property + 1; } if (a1.isAvailable()) { property = a0.numAvailableGuildBoostSlots; a0.numAvailableGuildBoostSlots = typeof property === 'bigint' ? property + 1n : +property + 1; } return a0; }, {'numAvailableGuildBoostSlots': 0, 'numCanceledGuildBoostSlots': 0}); numAvailableGuildBoostSlots = value8.numAvailableGuildBoostSlots; numCanceledGuildBoostSlots = value8.numCanceledGuildBoostSlots; if (premiumTypeSubscription == null) { return null; } if (numAvailableGuildBoostSlots > 0) { return null; } status = premiumTypeSubscription.status; if (status === SubscriptionStatusTypes.PAST_DUE) { return intl.string(t.De4Vm6); } status = premiumTypeSubscription.status; if (status === SubscriptionStatusTypes.ACCOUNT_HOLD) { return intl.string(t.JakNQ8); } if (numCanceledGuildBoostSlots > 0) { return intl.string(t.x25mZR); } renewalMutations = premiumTypeSubscription.renewalMutations; if (renewalMutations == null) { return null; } moduleValue2 = importAll(3802) /* metro dependency 3802: PremiumUtils */; getNumPremiumGuildSubscriptions = moduleValue2.getNumPremiumGuildSubscriptions; renewalMutations = premiumTypeSubscription.renewalMutations; additionalPlans = renewalMutations.additionalPlans; value9 = Reflect.apply(getNumPremiumGuildSubscriptions, moduleValue2, [additionalPlans]); moduleValue3 = importAll(3802) /* metro dependency 3802: PremiumUtils */; getNumPremiumGuildSubscriptions = moduleValue3.getNumPremiumGuildSubscriptions; additionalPlans = premiumTypeSubscription.additionalPlans; r1 = Reflect.apply(getNumPremiumGuildSubscriptions, moduleValue3, [additionalPlans]) > value9 ? intl.string(t.x25mZR) : intl.string(t['W/bb8f']); } else { if (currentUser.isPremiumGroupMember()) { formatToPlainString = intl.formatToPlainString; property = (importDefault(2806) /* metro dependency 2806: PremiumGroupMessages */)['5xN/C1']; object = {}; object.premiumGroupProductName = getPremiumGroupProductName(); return Reflect.apply(formatToPlainString, intl, [property, object]); } Object = global.Object; value8 = Object.values(GuildBoostSlotStore.boostSlots).reduce(function(a0, a1) { var property; if (isGuildBoostSlotCanceled(a1)) { property = a0.numCanceledGuildBoostSlots; a0.numCanceledGuildBoostSlots = typeof property === 'bigint' ? property + 1n : +property + 1; } if (a1.isAvailable()) { property = a0.numAvailableGuildBoostSlots; a0.numAvailableGuildBoostSlots = typeof property === 'bigint' ? property + 1n : +property + 1; } return a0; }, {'numAvailableGuildBoostSlots': 0, 'numCanceledGuildBoostSlots': 0}); numAvailableGuildBoostSlots = value8.numAvailableGuildBoostSlots; numCanceledGuildBoostSlots = value8.numCanceledGuildBoostSlots; if (premiumTypeSubscription == null) { return null; } if (numAvailableGuildBoostSlots > 0) { return null; } status = premiumTypeSubscription.status; if (status === SubscriptionStatusTypes.PAST_DUE) { return intl.string(t.De4Vm6); } status = premiumTypeSubscription.status; if (status === SubscriptionStatusTypes.ACCOUNT_HOLD) { return intl.string(t.JakNQ8); } if (numCanceledGuildBoostSlots > 0) { return intl.string(t.x25mZR); } if (premiumTypeSubscription.renewalMutations == null) { return null; } value9 = (importAll(3802) /* metro dependency 3802: PremiumUtils */).getNumPremiumGuildSubscriptions(premiumTypeSubscription.renewalMutations.additionalPlans); moduleValue3 = importAll(3802) /* metro dependency 3802: PremiumUtils */; r1 = moduleValue3.getNumPremiumGuildSubscriptions(premiumTypeSubscription.additionalPlans) > value9 ? intl.string(t.x25mZR) : intl.string(t['W/bb8f']); } return r1; function _fun65945(a0, a1) { // fn#65945, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8434:11981, offset: 0x01be78b5, size: 68 bytes, params: 3, frame: 12 var numCanceledGuildBoostSlots; var numAvailableGuildBoostSlots; if (isGuildBoostSlotCanceled(a1)) { numCanceledGuildBoostSlots = a0.numCanceledGuildBoostSlots; a0.numCanceledGuildBoostSlots = typeof numCanceledGuildBoostSlots === 'bigint' ? numCanceledGuildBoostSlots + 1n : +numCanceledGuildBoostSlots + 1; } if (a1.isAvailable()) { numAvailableGuildBoostSlots = a0.numAvailableGuildBoostSlots; a0.numAvailableGuildBoostSlots = typeof numAvailableGuildBoostSlots === 'bigint' ? numAvailableGuildBoostSlots + 1n : +numAvailableGuildBoostSlots + 1; } return a0; } } function isInGracePeriod(a0, a1) { // fn#65947, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8434:12886, offset: 0x01be7941, size: 29 bytes, params: 3, frame: 13 return appliedGuildBoostsRequiredForPerks(a0, a1) > 0; } function getGracePeriodEndingDate(a0, a1) { // fn#65948, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8434:13102, offset: 0x01be795e, size: 216 bytes, params: 3, frame: 20 var value5; var length; var value6; var defaultImport; var addBreadcrumb; var object2; var Math; var property; const appliedGuildBoostsRequiredForPerksBinding = appliedGuildBoostsRequiredForPerks; const value2 = undefined; const value3 = appliedGuildBoostsRequiredForPerksBinding(a0, a1); if (value3 > 0) { value5 = ((a0) => a0.sort(_fun65950))(a0).filter(function(a0) { return a0.endsAt != null; }); length = value5.length; value6 = length - value3; if (value6 < 0) { defaultImport = importDefault(1216) /* metro dependency 1216: SentryUtilsNative */; addBreadcrumb = defaultImport.addBreadcrumb; object2 = {}; length = a0.length; object2.subscriptionLength = length; object2.subscriptionsNeededForPremiumTier = AppliedGuildBoostsRequiredForBoostedGuildTier[getGuildTierFromGuild(a1)]; length = value5.length; object2.endingSubscriptionLength = length; Reflect.apply(addBreadcrumb, defaultImport, [{'category': 'premium', 'message': 'Negative index while checking grace period ending date.', data: object2}]); } Math = global.Math; property = value5[Math.max(value6, 0)]; return property == null ? value2 : property.endsAt; } return null; function sortAppliedGuildBoostsByEndsAt(a0) { // fn#65949, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8434:13201, owner: getGracePeriodEndingDate.sortAppliedGuildBoostsByEndsAt, offset: 0x01be7a36, size: 25 bytes, params: 2, frame: 11 return a0.sort(function(a0, a1) { var r0; var endsAt; var value = -1; if (a0.endsAt != null) { if (a1.endsAt != null) { endsAt = a0.endsAt; value = endsAt.getTime(); endsAt = a1.endsAt; value -= endsAt.getTime(); r0 = value; } else { r0 = value; } } else { r0 = value; } return r0; }); } } function getAvailableStickerSlotCount(a0, a1) { // fn#65952, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8434:13731, offset: 0x01be7aa3, size: 136 bytes, params: 3, frame: 18 const incrementalStickerCountForTier = getIncrementalStickerCountForTier(a1); const value3 = env0_28.indexOf(a1); if (value3 === -1) { return 0; } const property = env0_28[value3 - 1]; const value4 = 0; const r6 = property != null ? getTotalStickerCountForTier(property) : value4; const totalStickerCountForTier = getTotalStickerCountForTier(a1); const Math = global.Math; return Math.max(value4, incrementalStickerCountForTier - a0.slice(r6, totalStickerCountForTier).length); } function getAvailableSoundboardSoundCount(a0, {length}, a2) { // fn#65953, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8434:14018, offset: 0x01be7b2b, size: 84 bytes, params: 4, frame: 13 if (env0_28.indexOf(a2) === -1) { return 0; } const maxSoundboardSlots = getMaxSoundboardSlots(a0); const Math = global.Math; return Math.max(0, maxSoundboardSlots - length); } function getGuildBoostingProgressBarFillFactor({id}) { // fn#65956, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8434:14864, offset: 0x01be7c44, size: 147 bytes, params: 2, frame: 17 var r2; const guildPowerupBoostLevelProgress = (UseGuildPowerupsBoostLevelProgressModule).getGuildPowerupBoostLevelProgress(id); const theoreticalPremiumTierForSubscriberCount = getTheoreticalPremiumTierForSubscriberCount(guildPowerupBoostLevelProgress); const nextPremiumTierForSubscriberCount = getNextPremiumTierForSubscriberCount(guildPowerupBoostLevelProgress); const property = AppliedGuildBoostsRequiredForBoostedGuildTier[theoreticalPremiumTierForSubscriberCount]; const property2 = AppliedGuildBoostsRequiredForBoostedGuildTier[nextPremiumTierForSubscriberCount]; const binding = env0_31; const property3 = binding[theoreticalPremiumTierForSubscriberCount]; const property4 = binding[nextPremiumTierForSubscriberCount]; const TIER_3 = BoostedGuildTiers.TIER_3; let value = 1; if (theoreticalPremiumTierForSubscriberCount === TIER_3) { r2 = value; } else { value = guildPowerupBoostLevelProgress - property; value /= property2 - property; value = value * (property4 - property3) + property3; r2 = value; } return {fillFactor: r2, totalAvailableBoostsCount: guildPowerupBoostLevelProgress}; } } function _fun65950(a0, a1) { // fn#65950, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8434:13259, offset: 0x01be7a4f, size: 84 bytes, params: 3, frame: 13 var r0; let endsAt = a0.endsAt; let value = -1; if (endsAt != null) { endsAt = a1.endsAt; if (endsAt != null) { endsAt = a0.endsAt; value = endsAt.getTime(); endsAt = a1.endsAt; value -= endsAt.getTime(); r0 = value; } else { r0 = value; } } else { r0 = value; } return r0; } global.__d(_fun65913, 8249, [1867, 1878, 7020, 3808, 661, 1881, 1880, 3816, 8250, 1244, 1360, 4136, 1948, 22, 3738, 8251, 2806, 3802, 1216, 8254, 8265, 2]) /* metro module 8249, dependencies: [1867, 1878, 7020, 3808, 661, 1881, 1880, 3816, 8250, 1244, 1360, 4136, 1948, 22, 3738, 8251, 2806, 3802, 1216, 8254, 8265, 2] */;