1251 lines
57 KiB
TypeScript
1251 lines
57 KiB
TypeScript
/* 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] */
|
|
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
|
|
var object2;
|
|
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 closure4 = 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 closure7 = getAvailableGuildBoostSlots;
|
|
const closure8 = 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 closure10 = isGuildBoostSlotCanceled;
|
|
const closure11 = getTheoreticalPremiumTierForSubscriberCount;
|
|
const closure12 = getNextPremiumTierForSubscriberCount;
|
|
let Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
|
|
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
|
|
const guildBoostSlotStore = importDefault(7020) /* metro dependency 7020: GuildBoostSlotStore */;
|
|
const subscriptionStore = importDefault(3808) /* metro dependency 3808: SubscriptionStore */;
|
|
let value = require(661) /* metro dependency 661: Constants */;
|
|
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;
|
|
const env0_25 = (require(3816) /* metro dependency 3816: PremiumGroupConstants */).getPremiumGroupProductName;
|
|
object2 = {LEVEL_1: 1};
|
|
object2[1] = 'LEVEL_1';
|
|
object2.LEVEL_2 = 2;
|
|
object2[2] = 'LEVEL_2';
|
|
object2.LEVEL_3 = 3;
|
|
object2[3] = 'LEVEL_3';
|
|
object2.LEVEL_4 = 4;
|
|
object2[4] = 'LEVEL_4';
|
|
object2.LEVEL_5 = 5;
|
|
object2[5] = 'LEVEL_5';
|
|
object2.LEVEL_6 = 6;
|
|
object2[6] = 'LEVEL_6';
|
|
object2.LEVEL_7 = 7;
|
|
object2[7] = 'LEVEL_7';
|
|
object2.LEVEL_8 = 8;
|
|
object2[8] = 'LEVEL_8';
|
|
object2.LEVEL_9 = 9;
|
|
object2[9] = 'LEVEL_9';
|
|
Object = global.Object;
|
|
const freeze = Object.freeze;
|
|
const LEVEL_1 = object2.LEVEL_1;
|
|
const LEVEL_2 = object2.LEVEL_2;
|
|
const LEVEL_3 = object2.LEVEL_3;
|
|
const LEVEL_4 = object2.LEVEL_4;
|
|
const LEVEL_5 = object2.LEVEL_5;
|
|
const LEVEL_6 = object2.LEVEL_6;
|
|
const LEVEL_7 = object2.LEVEL_7;
|
|
const LEVEL_8 = object2.LEVEL_8;
|
|
const LEVEL_9 = object2.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}]);
|
|
object2 = {EMOJI: 1};
|
|
object2[1] = 'EMOJI';
|
|
object2.AUDIO = 2;
|
|
object2[2] = 'AUDIO';
|
|
object2.ANIMATED = 3;
|
|
object2[3] = 'ANIMATED';
|
|
object2.CUSTOMIZATION = 4;
|
|
object2[4] = 'CUSTOMIZATION';
|
|
object2.UPLOAD = 5;
|
|
object2[5] = 'UPLOAD';
|
|
object2.VANITY = 6;
|
|
object2[6] = 'VANITY';
|
|
object2.STREAM = 7;
|
|
object2[7] = 'STREAM';
|
|
object2.STICKER = 8;
|
|
object2[8] = 'STICKER';
|
|
object2.CUSTOM_ROLE_ICON = 11;
|
|
object2[11] = 'CUSTOM_ROLE_ICON';
|
|
object2.STAGE_VIDEO = 12;
|
|
object2[12] = 'STAGE_VIDEO';
|
|
object2.SOUNDBOARD = 13;
|
|
object2[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 = (importDefault(22) /* metro dependency 22 */).memoize(_fun65933);
|
|
const object7 = {};
|
|
TIER_3 = BoostedGuildTiers.TIER_3;
|
|
object7.tier = TIER_3;
|
|
TIER_3 = BoostedGuildTiers.TIER_3;
|
|
object7.amount = AppliedGuildBoostsRequiredForBoostedGuildTier[TIER_3];
|
|
object7.nextTier = null;
|
|
const items2 = [object7];
|
|
const object8 = {};
|
|
TIER_2 = BoostedGuildTiers.TIER_2;
|
|
object8.tier = TIER_2;
|
|
TIER_2 = BoostedGuildTiers.TIER_2;
|
|
object8.amount = AppliedGuildBoostsRequiredForBoostedGuildTier[TIER_2];
|
|
TIER_3 = BoostedGuildTiers.TIER_3;
|
|
object8.nextTier = TIER_3;
|
|
items2[1] = object8;
|
|
const object9 = {};
|
|
TIER_1 = BoostedGuildTiers.TIER_1;
|
|
object9.tier = TIER_1;
|
|
TIER_1 = BoostedGuildTiers.TIER_1;
|
|
object9.amount = AppliedGuildBoostsRequiredForBoostedGuildTier[TIER_1];
|
|
TIER_2 = BoostedGuildTiers.TIER_2;
|
|
object9.nextTier = TIER_2;
|
|
items2[2] = object9;
|
|
const object10 = {};
|
|
NONE = BoostedGuildTiers.NONE;
|
|
object10[NONE] = 0;
|
|
TIER_1 = BoostedGuildTiers.TIER_1;
|
|
object10[TIER_1] = 0.3333333333333333;
|
|
TIER_2 = BoostedGuildTiers.TIER_2;
|
|
object10[TIER_2] = 0.6666666666666666;
|
|
TIER_3 = BoostedGuildTiers.TIER_3;
|
|
object10[TIER_3] = 1;
|
|
(require(2) /* metro dependency 2 */).fileFinishedImporting('utils/GuildBoostingUtils.tsx');
|
|
exports.PerkIcons = object2;
|
|
exports.OrderedTiers = items3;
|
|
exports.ReverseOrderedTiers = value;
|
|
exports.getNextTier = getNextTier;
|
|
exports.getTotalStickerCountForTier = closure;
|
|
exports.getIncrementalStickerCountForTier = closure2;
|
|
exports.getTotalSoundboardSoundCountForTier = closure3;
|
|
exports.getIncrementalSoundboardSoundCountForTier = closure4;
|
|
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 = closure7;
|
|
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 = closure8;
|
|
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 = closure10;
|
|
exports.getTheoreticalPremiumTierForSubscriberCount = closure11;
|
|
exports.getNextPremiumTierForSubscriberCount = closure12;
|
|
exports.TierMarkerPositions = object10;
|
|
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 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 = importDefault(22) /* metro dependency 22 */;
|
|
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 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 _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 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 object3;
|
|
var T8P3TH;
|
|
var object4;
|
|
let object6 = {};
|
|
let TIER_1 = BoostedGuildTiers.TIER_1;
|
|
object6.tier = TIER_1;
|
|
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
|
let string = intl.string;
|
|
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
|
object6.title = Reflect.apply(string, intl, [t['lK+WOT']]);
|
|
const object9 = {};
|
|
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;
|
|
object9.title = Reflect.apply(formatToPlainString, intl, [dnLAwl,
|
|
{adding: emoji - BoostedGuildFeatures[NONE].limits.emoji, total: BoostedGuildFeatures[TIER_1].limits.emoji}]);
|
|
object9.description = intl.string(t['/Guvxs']);
|
|
let binding = env0_27;
|
|
let EMOJI = binding.EMOJI;
|
|
object9.icon = EMOJI;
|
|
const items5 = [object9];
|
|
formatToPlainString = intl.formatToPlainString;
|
|
let property = t['/9p2/g'];
|
|
const object10 = {};
|
|
let getIncrementalStickerCountForTierBinding = getIncrementalStickerCountForTier;
|
|
TIER_1 = BoostedGuildTiers.TIER_1;
|
|
object10.adding = getIncrementalStickerCountForTierBinding(TIER_1);
|
|
let getTotalStickerCountForTierBinding = getTotalStickerCountForTier;
|
|
TIER_1 = BoostedGuildTiers.TIER_1;
|
|
object10.total = getTotalStickerCountForTierBinding(TIER_1);
|
|
string = intl.string;
|
|
const JfsnDQ = t.JfsnDQ;
|
|
let STICKER = binding.STICKER;
|
|
items5[1] = {title: Reflect.apply(formatToPlainString, intl, [property, object10]),
|
|
description: Reflect.apply(string, intl, [JfsnDQ]), icon: STICKER};
|
|
formatToPlainString = intl.formatToPlainString;
|
|
let NRuk5m = t.NRuk5m;
|
|
const object11 = {};
|
|
let getIncrementalSoundboardSoundCountForTierBinding = getIncrementalSoundboardSoundCountForTier;
|
|
TIER_1 = BoostedGuildTiers.TIER_1;
|
|
object11.soundCount = getIncrementalSoundboardSoundCountForTierBinding(TIER_1);
|
|
let getTotalSoundboardSoundCountForTierBinding = getTotalSoundboardSoundCountForTier;
|
|
TIER_1 = BoostedGuildTiers.TIER_1;
|
|
object11.totalSoundCount = getTotalSoundboardSoundCountForTierBinding(TIER_1);
|
|
string = intl.string;
|
|
const Oq7OVl = t.Oq7OVl;
|
|
let SOUNDBOARD = binding.SOUNDBOARD;
|
|
items5[2] = {title: Reflect.apply(formatToPlainString, intl, [NRuk5m, object11]), description: Reflect.apply(string,
|
|
intl, [Oq7OVl]), icon: SOUNDBOARD};
|
|
const object13 = {};
|
|
formatToPlainString = intl.formatToPlainString;
|
|
let zoT1ZE = t.zoT1ZE;
|
|
TIER_1 = BoostedGuildTiers.TIER_1;
|
|
object13.title = Reflect.apply(formatToPlainString, intl, [zoT1ZE,
|
|
{bitrate: BoostedGuildFeatures[TIER_1].limits.bitrate / 1000}]);
|
|
object13.description = intl.string(t['8a03jk']);
|
|
let AUDIO = binding.AUDIO;
|
|
object13.icon = AUDIO;
|
|
items5[3] = object13;
|
|
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 object14 = {};
|
|
object14.title = intl.string(t.cObMZD);
|
|
object14.description = intl.string(t['puH/9R']);
|
|
let STREAM = binding.STREAM;
|
|
object14.icon = STREAM;
|
|
items5[6] = object14;
|
|
const filter = items5.filter;
|
|
const isNotNullish = (require(1360) /* metro dependency 1360: GlobalUtils */).isNotNullish;
|
|
object6.perks = Reflect.apply(filter, items5, [isNotNullish]);
|
|
const items2 = [object6];
|
|
object6 = {};
|
|
let TIER_2 = BoostedGuildTiers.TIER_2;
|
|
object6.tier = TIER_2;
|
|
object6.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 object15 = {};
|
|
TIER_2 = BoostedGuildTiers.TIER_2;
|
|
object15.adding = getIncrementalStickerCountForTierBinding(TIER_2);
|
|
TIER_2 = BoostedGuildTiers.TIER_2;
|
|
object15.total = getTotalStickerCountForTierBinding(TIER_2);
|
|
STICKER = binding.STICKER;
|
|
items3[1] = {title: Reflect.apply(formatToPlainString, intl, [property, object15]),
|
|
description: intl.string(t.t4TM28), icon: STICKER};
|
|
formatToPlainString = intl.formatToPlainString;
|
|
NRuk5m = t.NRuk5m;
|
|
const object17 = {};
|
|
TIER_2 = BoostedGuildTiers.TIER_2;
|
|
object17.soundCount = getIncrementalSoundboardSoundCountForTierBinding(TIER_2);
|
|
TIER_2 = BoostedGuildTiers.TIER_2;
|
|
object17.totalSoundCount = getTotalSoundboardSoundCountForTierBinding(TIER_2);
|
|
SOUNDBOARD = binding.SOUNDBOARD;
|
|
items3[2] = {title: Reflect.apply(formatToPlainString, intl, [NRuk5m, object17]),
|
|
description: intl.string(t.pEYlPZ), icon: SOUNDBOARD};
|
|
const object20 = {};
|
|
formatToPlainString = intl.formatToPlainString;
|
|
zoT1ZE = t.zoT1ZE;
|
|
TIER_2 = BoostedGuildTiers.TIER_2;
|
|
object20.title = Reflect.apply(formatToPlainString, intl, [zoT1ZE,
|
|
{bitrate: BoostedGuildFeatures[TIER_2].limits.bitrate / 1000}]);
|
|
object20.description = intl.string(t['nzRo/I']);
|
|
AUDIO = binding.AUDIO;
|
|
object20.icon = AUDIO;
|
|
items3[3] = object20;
|
|
const object22 = {};
|
|
object22.title = intl.string(t['+KhQKM']);
|
|
string = intl.string;
|
|
const ZWf10P = t.ZWf10P;
|
|
object22.description = Reflect.apply(string, intl, [ZWf10P]);
|
|
CUSTOMIZATION = binding.CUSTOMIZATION;
|
|
object22.icon = CUSTOMIZATION;
|
|
items3[4] = object22;
|
|
formatToPlainString = intl.formatToPlainString;
|
|
let t95LnM = t.t95LnM;
|
|
const fileSizeUtilsModule = require(4136) /* metro dependency 4136: FileSizeUtils */;
|
|
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) {
|
|
object3 = {};
|
|
formatToPlainString = intl.formatToPlainString;
|
|
T8P3TH = t.T8P3TH;
|
|
object3.title = Reflect.apply(formatToPlainString, intl, [T8P3TH, {limit: MAX_STAGE_VIDEO_USER_LIMIT_TIER2}]);
|
|
formatToPlainString = intl.formatToPlainString;
|
|
T8P3TH = t.T8P3TH;
|
|
object3.description = Reflect.apply(formatToPlainString, intl, [T8P3TH,
|
|
{limit: MAX_STAGE_VIDEO_USER_LIMIT_TIER2}]);
|
|
object3.icon = env0_27.STAGE_VIDEO;
|
|
r4 = object3;
|
|
} else {
|
|
r4 = value3;
|
|
}
|
|
items3[8] = r4;
|
|
object6.perks = items3.filter(isNotNullish);
|
|
items2[1] = object6;
|
|
object6 = {};
|
|
let TIER_3 = BoostedGuildTiers.TIER_3;
|
|
object6.tier = TIER_3;
|
|
string = intl.string;
|
|
const P7LdcQ = t.P7LdcQ;
|
|
object6.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 object23 = {};
|
|
formatToPlainString = intl.formatToPlainString;
|
|
property = t['/9p2/g'];
|
|
const object24 = {};
|
|
getIncrementalStickerCountForTierBinding = getIncrementalStickerCountForTier;
|
|
TIER_3 = BoostedGuildTiers.TIER_3;
|
|
object24.adding = getIncrementalStickerCountForTierBinding(TIER_3);
|
|
getTotalStickerCountForTierBinding = getTotalStickerCountForTier;
|
|
TIER_3 = BoostedGuildTiers.TIER_3;
|
|
object24.total = getTotalStickerCountForTierBinding(TIER_3);
|
|
object23.title = Reflect.apply(formatToPlainString, intl, [property, object24]);
|
|
object23.description = intl.string(t['+ZI4QZ']);
|
|
STICKER = binding.STICKER;
|
|
object23.icon = STICKER;
|
|
items4[1] = object23;
|
|
const object25 = {};
|
|
formatToPlainString = intl.formatToPlainString;
|
|
NRuk5m = t.NRuk5m;
|
|
const object26 = {};
|
|
getIncrementalSoundboardSoundCountForTierBinding = getIncrementalSoundboardSoundCountForTier;
|
|
TIER_3 = BoostedGuildTiers.TIER_3;
|
|
object26.soundCount = getIncrementalSoundboardSoundCountForTierBinding(TIER_3);
|
|
getTotalSoundboardSoundCountForTierBinding = getTotalSoundboardSoundCountForTier;
|
|
TIER_3 = BoostedGuildTiers.TIER_3;
|
|
object26.totalSoundCount = getTotalSoundboardSoundCountForTierBinding(TIER_3);
|
|
object25.title = Reflect.apply(formatToPlainString, intl, [NRuk5m, object26]);
|
|
object25.description = intl.string(t['8omJSY']);
|
|
SOUNDBOARD = binding.SOUNDBOARD;
|
|
object25.icon = SOUNDBOARD;
|
|
items4[2] = object25;
|
|
const object28 = {};
|
|
formatToPlainString = intl.formatToPlainString;
|
|
zoT1ZE = t.zoT1ZE;
|
|
TIER_3 = BoostedGuildTiers.TIER_3;
|
|
object28.title = Reflect.apply(formatToPlainString, intl, [zoT1ZE,
|
|
{bitrate: BoostedGuildFeatures[TIER_3].limits.bitrate / 1000}]);
|
|
object28.description = intl.string(t['cOkbp/']);
|
|
AUDIO = binding.AUDIO;
|
|
object28.icon = AUDIO;
|
|
items4[3] = object28;
|
|
const object29 = {};
|
|
string = intl.string;
|
|
const C2w2cM = t.C2w2cM;
|
|
object29.title = Reflect.apply(string, intl, [C2w2cM]);
|
|
format = intl.format;
|
|
property = t['3Reosx'];
|
|
const defaultImport = importDefault(1948) /* metro dependency 1948: HelpdeskUtils */;
|
|
const getArticleURL = defaultImport.getArticleURL;
|
|
const GUILD_VANITY_URL = HelpdeskArticles.GUILD_VANITY_URL;
|
|
object29.description = Reflect.apply(format, intl, [property, {helpdeskArticle: Reflect.apply(getArticleURL,
|
|
defaultImport, [GUILD_VANITY_URL])}]);
|
|
const VANITY = binding.VANITY;
|
|
object29.icon = VANITY;
|
|
items4[4] = object29;
|
|
formatToPlainString = intl.formatToPlainString;
|
|
t95LnM = t.t95LnM;
|
|
const moduleValue2 = fileSizeUtilsModule;
|
|
formatSize = moduleValue2.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,
|
|
moduleValue2,
|
|
[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) {
|
|
object4 = {};
|
|
formatToPlainString = intl.formatToPlainString;
|
|
T8P3TH = t.T8P3TH;
|
|
object4.title = Reflect.apply(formatToPlainString, intl, [T8P3TH, {limit: MAX_STAGE_VIDEO_USER_LIMIT_TIER3}]);
|
|
formatToPlainString = intl.formatToPlainString;
|
|
T8P3TH = t.T8P3TH;
|
|
object4.description = Reflect.apply(formatToPlainString, intl, [T8P3TH,
|
|
{limit: MAX_STAGE_VIDEO_USER_LIMIT_TIER3}]);
|
|
object4.icon = env0_27.STAGE_VIDEO;
|
|
r3 = object4;
|
|
} else {
|
|
r3 = value3;
|
|
}
|
|
items4[7] = r3;
|
|
object6.perks = items4.filter(isNotNullish);
|
|
items2[2] = object6;
|
|
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 = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
|
var string;
|
|
const t = (require(1244) /* metro dependency 1244: indexNative */).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 = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
|
const t = (require(1244) /* metro dependency 1244: indexNative */).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 = (importDefault(3738) /* metro dependency 3738 */)().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 = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
|
const t = (require(1244) /* metro dependency 1244: indexNative */).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 object2;
|
|
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'];
|
|
object2 = {};
|
|
object2.premiumGroupProductName = getPremiumGroupProductName();
|
|
return Reflect.apply(formatToPlainString, intl, [property, object2]);
|
|
}
|
|
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'];
|
|
object2 = {};
|
|
object2.premiumGroupProductName = getPremiumGroupProductName();
|
|
return Reflect.apply(formatToPlainString, intl, [property, object2]);
|
|
}
|
|
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'];
|
|
object2 = {};
|
|
object2.premiumGroupProductName = getPremiumGroupProductName();
|
|
return Reflect.apply(formatToPlainString, intl, [property, object2]);
|
|
}
|
|
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 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 object;
|
|
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;
|
|
object = {};
|
|
length = a0.length;
|
|
object.subscriptionLength = length;
|
|
object.subscriptionsNeededForPremiumTier = AppliedGuildBoostsRequiredForBoostedGuildTier[getGuildTierFromGuild(a1)];
|
|
length = value5.length;
|
|
object.endingSubscriptionLength = length;
|
|
Reflect.apply(addBreadcrumb, defaultImport, [{'category': 'premium',
|
|
'message': 'Negative index while checking grace period ending date.', data: object}]);
|
|
}
|
|
Math = global.Math;
|
|
property = value5[Math.max(value6, 0)];
|
|
return property == null ? value2 : property.endsAt;
|
|
}
|
|
return null;
|
|
}
|
|
|
|
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 = (require(8265) /* metro dependency 8265: useGuildPowerupsBoostLevelProgress */).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 _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 _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 _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 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;
|
|
});
|
|
}
|
|
|