Initial commit
This commit is contained in:
commit
af3b49f756
16065 files changed
+2938410
No files matched your search
@@ -0,0 +1,101 @@
|
||||
/* Metro module 8254; source: modules/premium/powerups/hooks/useGuildPowerupsBoostCount.tsx; dependencies: [31, 1867, 8255, 8258, 6857, 566, 2] */
|
||||
function _fun66010(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#66010, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8439:6, offset: 0x01be8f48, size: 178 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_2 = importAll(31) /* metro dependency 31 */;
|
||||
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
|
||||
const gameServerStore = importDefault(8255) /* metro dependency 8255: GameServerStore */;
|
||||
const guildPowerupsStore = importDefault(8258) /* metro dependency 8258: GuildPowerupsStore */;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/premium/powerups/hooks/useGuildPowerupsBoostCount.tsx');
|
||||
exports.default = useGuildAppliedBoostCount;
|
||||
exports.getGuildPowerupsBoostCount = getGuildPowerupsBoostCount;
|
||||
}
|
||||
|
||||
function useGuildAppliedBoostCount(a0) { // fn#66011, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8439:241, offset: 0x01be8ffa, size: 254 bytes, params: 2, frame: 21
|
||||
const env0_0 = a0;
|
||||
const r7 = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildStore], _fun66012) ?? 0;
|
||||
const value4 = (require(6857) /* metro dependency 6857: GameServerExperiment */).useGameServerEnabled(a0,
|
||||
'GuildPowerupsBoostCount');
|
||||
return value4.useMemo(_fun66015, [r7,
|
||||
(require(566) /* metro dependency 566: flux */).useStateFromStores([GuildPowerupsStore], _fun66013),
|
||||
(require(566) /* metro dependency 566: flux */).useStateFromStores([GameServerStore], _fun66014), value4]);
|
||||
}
|
||||
|
||||
function getGuildPowerupsBoostCount(a0) { // fn#66016, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8439:887, offset: 0x01be91fe, size: 242 bytes, params: 2, frame: 19
|
||||
var object2;
|
||||
const guild = GuildStore.getGuild(a0);
|
||||
const value3 = undefined;
|
||||
const premiumSubscriberCount = guild == null ? value3 : guild.premiumSubscriberCount;
|
||||
const value4 = 0;
|
||||
const r1 = premiumSubscriberCount ?? value4;
|
||||
const gameServerEnabled = (require(6857) /* metro dependency 6857: GameServerExperiment */).getGameServerEnabled(a0,
|
||||
'GuildPowerupsBoostCount');
|
||||
const stateForGuild = GuildPowerupsStore.getStateForGuild(a0);
|
||||
const appliedBoosts = stateForGuild == null ? value3 : stateForGuild.appliedBoosts;
|
||||
let value = GameServerStore.getStateForGuild(a0);
|
||||
const appliedBoosts2 = value == null ? value3 : value.appliedBoosts;
|
||||
if (appliedBoosts == null) {
|
||||
return {'available': 0, 'spent': 0, total: r1};
|
||||
}
|
||||
if (gameServerEnabled) {
|
||||
if (appliedBoosts2 == null) {
|
||||
return {'available': 0, 'spent': 0, total: r1};
|
||||
}
|
||||
value = appliedBoosts + (appliedBoosts2 ?? value4);
|
||||
object2 = {};
|
||||
object2.available = global.Math.max(value4, r1 - value);
|
||||
} else {
|
||||
value = appliedBoosts + (appliedBoosts2 ?? value4);
|
||||
object2 = {};
|
||||
object2.available = global.Math.max(value4, r1 - value);
|
||||
}
|
||||
object2.spent = value;
|
||||
object2.total = r1;
|
||||
return object2;
|
||||
}
|
||||
|
||||
function _fun66012() { // fn#66012, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8439:328, offset: 0x01be90f8, size: 44 bytes, params: 1, frame: 11
|
||||
const value = environment.__proto__;
|
||||
return GuildStore.getGuild(env0_0)?.premiumSubscriberCount;
|
||||
}
|
||||
|
||||
function _fun66013() { // fn#66013, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8439:504, offset: 0x01be9124, size: 44 bytes, params: 1, frame: 11
|
||||
const value = environment.__proto__;
|
||||
return GuildPowerupsStore.getStateForGuild(env0_0)?.appliedBoosts;
|
||||
}
|
||||
|
||||
function _fun66014() { // fn#66014, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8439:614, offset: 0x01be9150, size: 44 bytes, params: 1, frame: 11
|
||||
const value = environment.__proto__;
|
||||
return GameServerStore.getStateForGuild(env0_0)?.appliedBoosts;
|
||||
}
|
||||
|
||||
function _fun66015() { // fn#66015, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8439:708, offset: 0x01be917c, size: 130 bytes, params: 1, frame: 16
|
||||
var binding;
|
||||
var value2;
|
||||
var value3;
|
||||
var object2;
|
||||
if (env0_3 == null) {
|
||||
return {'available': 0, 'spent': 0, total: env0_1};
|
||||
}
|
||||
if (env0_2) {
|
||||
if (env0_4 == null) {
|
||||
return {'available': 0, 'spent': 0, total: env0_1};
|
||||
}
|
||||
binding = env0_3;
|
||||
value2 = 0;
|
||||
value3 = binding + (env0_4 ?? value2);
|
||||
object2 = {};
|
||||
object2.available = global.Math.max(value2, env0_1 - value3);
|
||||
} else {
|
||||
binding = env0_3;
|
||||
value2 = 0;
|
||||
value3 = binding + (env0_4 ?? value2);
|
||||
object2 = {};
|
||||
object2.available = global.Math.max(value2, env0_1 - value3);
|
||||
}
|
||||
object2.spent = value3;
|
||||
object2.total = env0_1;
|
||||
return object2;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user