This commit is contained in:
janisslsm committed 2026-11-01 12:12:55 +02:00
1 parent 1781d25a15
commit 732c0ad767
33051 files changed
+2591613 -3019689

No files matched your search

@@ -0,0 +1,132 @@
// Metro module 2645 (f2646).
import { loadJsonAsset } from "../../asset_json/native/AssetJsonUtils";
import * as _Module2646 from "../../../_bundle/Module2646";
import * as _Module2647 from "../../../_bundle/Module2647";
import * as _Module2648 from "../../../_bundle/Module2648";
import * as _Module2649 from "../../../_bundle/Module2649";
import * as _Module2650 from "../../../_bundle/Module2650";
import * as _Module2651 from "../../../_bundle/Module2651";
import * as _Module2652 from "../../../_bundle/Module2652";
import * as _Module2653 from "../../../_bundle/Module2653";
import * as _Module2654 from "../../../_bundle/Module2654";
import * as _Module2655 from "../../../_bundle/Module2655";
import * as _Module2656 from "../../../_bundle/Module2656";
import * as _Module2657 from "../../../_bundle/Module2657";
import * as _Module2658 from "../../../_bundle/Module2658";
import * as _Module2659 from "../../../_bundle/Module2659";
import * as _Module2660 from "../../../_bundle/Module2660";
import * as _Module2661 from "../../../_bundle/Module2661";
import * as _Module2662 from "../../../_bundle/Module2662";
import * as _Module2663 from "../../../_bundle/Module2663";
import * as _Module2664 from "../../../_bundle/Module2664";
import * as _Module2665 from "../../../_bundle/Module2665";
import * as _Module2666 from "../../../_bundle/Module2666";
import * as _Module2667 from "../../../_bundle/Module2667";
import * as _Module2668 from "../../../_bundle/Module2668";
import * as _Module2669 from "../../../_bundle/Module2669";
import * as _Module2670 from "../../../_bundle/Module2670";
import * as _Module2671 from "../../../_bundle/Module2671";
import * as _Module2672 from "../../../_bundle/Module2672";
import * as _Module2673 from "../../../_bundle/Module2673";
import * as _Module2674 from "../../../_bundle/Module2674";
import * as _Module2675 from "../../../_bundle/Module2675";
import * as _Module2676 from "../../../_bundle/Module2676";
import { createLoader, makeMessagesProxy } from "../../../_bundle/Module1274";
const loader = createLoader({
bg: () => loadJsonAsset(_Module2646).then((result) => ({
default: result
})),
cs: () => loadJsonAsset(_Module2647).then((result) => ({
default: result
})),
da: () => loadJsonAsset(_Module2648).then((result) => ({
default: result
})),
de: () => loadJsonAsset(_Module2649).then((result) => ({
default: result
})),
el: () => loadJsonAsset(_Module2650).then((result) => ({
default: result
})),
"en-GB": () => loadJsonAsset(_Module2651).then((result) => ({
default: result
})),
"es-419": () => loadJsonAsset(_Module2652).then((result) => ({
default: result
})),
"es-ES": () => loadJsonAsset(_Module2653).then((result) => ({
default: result
})),
fi: () => loadJsonAsset(_Module2654).then((result) => ({
default: result
})),
fr: () => loadJsonAsset(_Module2655).then((result) => ({
default: result
})),
hi: () => loadJsonAsset(_Module2656).then((result) => ({
default: result
})),
hr: () => loadJsonAsset(_Module2657).then((result) => ({
default: result
})),
hu: () => loadJsonAsset(_Module2658).then((result) => ({
default: result
})),
it: () => loadJsonAsset(_Module2659).then((result) => ({
default: result
})),
ja: () => loadJsonAsset(_Module2660).then((result) => ({
default: result
})),
ko: () => loadJsonAsset(_Module2661).then((result) => ({
default: result
})),
lt: () => loadJsonAsset(_Module2662).then((result) => ({
default: result
})),
nl: () => loadJsonAsset(_Module2663).then((result) => ({
default: result
})),
no: () => loadJsonAsset(_Module2664).then((result) => ({
default: result
})),
pl: () => loadJsonAsset(_Module2665).then((result) => ({
default: result
})),
"pt-BR": () => loadJsonAsset(_Module2666).then((result) => ({
default: result
})),
ro: () => loadJsonAsset(_Module2667).then((result) => ({
default: result
})),
ru: () => loadJsonAsset(_Module2668).then((result) => ({
default: result
})),
"sv-SE": () => loadJsonAsset(_Module2669).then((result) => ({
default: result
})),
th: () => loadJsonAsset(_Module2670).then((result) => ({
default: result
})),
tr: () => loadJsonAsset(_Module2671).then((result) => ({
default: result
})),
uk: () => loadJsonAsset(_Module2672).then((result) => ({
default: result
})),
vi: () => loadJsonAsset(_Module2673).then((result) => ({
default: result
})),
"zh-CN": () => loadJsonAsset(_Module2674).then((result) => ({
default: result
})),
"zh-TW": () => loadJsonAsset(_Module2675).then((result) => ({
default: result
})),
"en-US": () => loadJsonAsset(_Module2676).then((result) => ({
default: result
}))
}, "en-US");
const r51 = makeMessagesProxy(loader);
export default r51;
export { loader as messagesLoader };
@@ -0,0 +1,329 @@
// Metro module 11574 (f11575).
import LocaleStore from "../../user_settings/LocaleStore";
import UserStore from "../../../stores/UserStore";
import OwnedGameServersStore from "./OwnedGameServersStore";
import { GAME_SERVER_COLLECTION_ID } from "./GameServerConstants";
import { AnalyticEvents, Endpoints } from "../../../Constants";
import Dispatcher from "../../../Dispatcher";
import { GAME_SERVER_GAME_MOCKS, GAME_SERVER_INSTANCE_MOCKS } from "./mocks/GameServerMocks";
import { httpGetWithCountryCodeQuery } from "../../../utils/StoreUtils";
import { rejectWithMigratedError, HTTP } from "../../../_bundle/sendRequest";
import { productToGameServerGame } from "./utils/productToGameServerGame";
import gameServerResponseToInstance from "./utils/gameServerResponseToInstance";
import AnalyticsUtils from "../../../utils/AnalyticsUtils";
import regionResponseToRegion from "./utils/regionResponseToRegion";
import { GameServerStatus } from "../../../_bundle/Module11577";
let $mk87645 = function() {
return (a0) => {
let game_servers = a0.body.game_servers;
if (game_servers == null) {
game_servers = [];
}
Dispatcher.dispatch({
type: "GAME_SERVER_FETCH_MY_SERVERS_SUCCESS",
gameServers: game_servers
});
};
};
export function fetchGameServerCatalog(a0) {
const guildId = a0;
let r5 = arguments[1];
if (r5 === void 0) {
r5 = false;
}
if (r5) {
setTimeout(() => {
Dispatcher.dispatch({
type: "GAME_SERVER_FETCH_CATALOG_SUCCESS",
guildId,
catalog: GAME_SERVER_GAME_MOCKS.reduce((acc, item) => {
acc[item.id] = item;
return acc;
}, {})
});
}, 5000);
return void 0;
}
const currentUser = UserStore.getCurrentUser();
let include_unpublished_products = currentUser == null ? void 0 : currentUser.isStaff();
if (include_unpublished_products == null) {
include_unpublished_products = false;
}
return httpGetWithCountryCodeQuery({
url: Endpoints.STOREFRONT_COLLECTION_WITH_PRODUCTS(GAME_SERVER_COLLECTION_ID),
query: {
locale: LocaleStore.locale,
guild_id: a0,
include_unpublished_products,
include_unpublished_collection: include_unpublished_products
},
oldFormErrors: true,
rejectWithError: rejectWithMigratedError(),
retries: 2
}).then((result) => {
Dispatcher.dispatch({
type: "GAME_SERVER_FETCH_CATALOG_SUCCESS",
guildId,
catalog: result.body.products.reduce((acc, product) => {
const r9 = productToGameServerGame(product);
acc[r9.id] = r9;
return acc;
}, {})
});
});
}
export function fetchGameServerGlobalCatalog() {
const currentUser = UserStore.getCurrentUser();
let include_unpublished_products = currentUser == null ? void 0 : currentUser.isStaff();
if (include_unpublished_products == null) {
include_unpublished_products = false;
}
return httpGetWithCountryCodeQuery({
url: Endpoints.STOREFRONT_COLLECTION_WITH_PRODUCTS(GAME_SERVER_COLLECTION_ID),
query: {
locale: LocaleStore.locale,
include_unpublished_products,
include_unpublished_collection: include_unpublished_products
},
oldFormErrors: true,
rejectWithError: rejectWithMigratedError(),
retries: 2
}).then((result) => {
Dispatcher.dispatch({
type: "GAME_SERVER_FETCH_GLOBAL_CATALOG_SUCCESS",
catalog: result.body.products.reduce((acc, product) => {
const r9 = productToGameServerGame(product);
acc[r9.id] = r9;
return acc;
}, {})
});
});
}
export function fetchGameServerInstances(a0) {
let r21;
const guildId2 = a0;
let r3 = arguments[1];
if (r3 === void 0) {
r3 = false;
}
if (r3) {
setTimeout(() => {
Dispatcher.dispatch({
type: "GAME_SERVER_FETCH_INSTANCES_SUCCESS",
guildId: guildId2,
instances: GAME_SERVER_INSTANCE_MOCKS.reduce((acc, item) => {
acc[item.id] = item;
return acc;
}, {})
});
}, 5000);
r21 = Promise.resolve();
} else {
const signal = arguments[2];
r21 = HTTP.get({
url: Endpoints.GAME_SERVERS(a0),
rejectWithError: true,
retries: 2,
signal
}).then((result) => {
if (result.body != null) {
Dispatcher.dispatch({
type: "GAME_SERVER_FETCH_INSTANCES_SUCCESS",
guildId: guildId2,
instances: result.body.reduce((acc, item) => {
acc[item.id] = gameServerResponseToInstance(item);
return acc;
}, {})
});
}
});
}
return r21;
}
export function fetchGameServerInstructions(guildId3, a1) {
const skuId = a1;
return httpGetWithCountryCodeQuery({
url: Endpoints.STOREFRONT_PRODUCT_BY_SKU_ID(a1),
query: {
locale: LocaleStore.locale
},
rejectWithError: true,
retries: 3
}).then((result) => {
if (result.body != null) {
const tenant_metadata = result.body.tenant_metadata;
const r2 = tenant_metadata == null;
let instructions = void 0;
if (!r2) {
const guild_monetization = tenant_metadata.guild_monetization;
const r12 = guild_monetization == null;
instructions = void 0;
if (!r12) {
const game_server = guild_monetization.game_server;
instructions = game_server == null ? void 0 : game_server.instructions.pc;
}
}
if (instructions == null) {
instructions = [];
}
Dispatcher.dispatch({
type: "GAME_SERVER_FETCH_GAME_INSTRUCTIONS_SUCCESS",
guildId: guildId3,
skuId,
instructions
});
}
});
}
export function acceptGameServerToS(a0, a1) {
if (a0) {
AnalyticsUtils.track(AnalyticEvents.GAME_SERVER_HOSTING_THIRD_PARTY_CONSENT_ACCEPTED, {
user_id: UserStore.getCurrentUser()?.id,
provider: a1
});
}
}
export function resetGameServerRegionState() {
Dispatcher.dispatch({
type: "GAME_SERVER_REGION_PING_STATE_RESET"
});
}
export function updateGameServerRegionPingState(a0, a1) {
Dispatcher.dispatch({
type: "GAME_SERVER_REGION_PING_STATE_UPDATE",
pingUrl: a0,
state: a1
});
}
export function enableGameServerForGuild(a0, a1, a2, a3) {
return HTTP.post({
url: Endpoints.GUILD_POWERUP_TOGGLE(a0, a1),
body: {
game_server_name: a2,
game_server_region: a3
},
rejectWithError: true,
oldFormErrors: true
});
}
export function updateGameServerForGuild(a0, a1, a2, a3) {
return HTTP.patch({
url: Endpoints.GUILD_POWERUP_UPDATE(a0, a1),
body: {
game_server_name: a3,
sku_id: a2
},
rejectWithError: true,
oldFormErrors: true
});
}
export function disableGameServerForGuild(a0, a1, a2) {
return HTTP.del({
url: Endpoints.GUILD_POWERUP_TOGGLE(a0, a1),
query: {
entitlement_id: a2
},
rejectWithError: true,
oldFormErrors: true
});
}
export function fetchGameServerRegions(a0) {
return HTTP.get({
url: Endpoints.GAME_SERVER_REGIONS(a0),
rejectWithError: true,
oldFormErrors: true,
retries: 3
}).then((result) => {
Dispatcher.dispatch({
type: "GAME_SERVER_FETCH_REGIONS_SUCCESS",
regions: result.body.map(regionResponseToRegion).sort((a, b) => a.name.localeCompare(b.name))
});
});
}
export function fetchMyGameServerRegions() {
return HTTP.get({
url: Endpoints.GAME_SERVER_MY_REGIONS,
rejectWithError: true,
oldFormErrors: true,
retries: 3
}).then((result) => {
Dispatcher.dispatch({
type: "GAME_SERVER_FETCH_REGIONS_SUCCESS",
regions: result.body.regions.map(regionResponseToRegion).sort((a, b) => a.name.localeCompare(b.name)),
creationDisabled: result.body.creation_disabled === true
});
});
}
export function fetchMyGameServers() {
return HTTP.get({
url: Endpoints.GAME_SERVERS_ME,
rejectWithError: true,
oldFormErrors: true,
retries: 3
}).then($mk87645());
}
export function optimisticallyMarkGameServerResizing(c18995_0) {
const r7 = OwnedGameServersStore.getGameServers().find((item) => item.subscription_id === c18995_0);
if (r7 != null) {
Dispatcher.dispatch({
type: "GAME_SERVER_UPDATE",
guildId: void 0,
gameServer: {
...r7,
status: GameServerStatus.STARTING
}
});
}
}
export function updateMyGameServerName(c18996_0, a1) {
let r40;
const r5 = OwnedGameServersStore.getGameServers().find((item) => item.subscription_id === c18996_0);
if (r5 == null) {
r40 = Promise.resolve();
} else {
Dispatcher.dispatch({
type: "GAME_SERVER_UPDATE",
guildId: void 0,
gameServer: {
...r5,
name: a1
}
});
r40 = HTTP.patch({
url: Endpoints.GAME_SERVER_ME(r5.id),
body: {
name: a1
},
rejectWithError: true
}).then(() => {
HTTP.get({
url: Endpoints.GAME_SERVERS_ME,
rejectWithError: true,
oldFormErrors: true,
retries: 3
}).then($mk87645()).catch(() => {});
}).catch((error) => {
HTTP.get({
url: Endpoints.GAME_SERVERS_ME,
rejectWithError: true,
oldFormErrors: true,
retries: 3
}).then($mk87645()).catch(() => {});
throw error;
});
}
return r40;
}
export function wakeGameServer(a0, a1) {
const guildId4 = a0;
return HTTP.post({
url: Endpoints.GAME_SERVER_WAKE(a0, a1),
rejectWithError: true
}).then((result) => {
Dispatcher.dispatch({
type: "GAME_SERVER_UPDATE_INSTANCE_SUCCESS",
guildId: guildId4,
instance: gameServerResponseToInstance(result.body)
});
});
}
@@ -0,0 +1,74 @@
// Metro module 4078 (f4079).
import { Environments } from "../../user/UserStoreConstants";
import { GameServerProviderType } from "../../../_bundle/Module4079";
const r12 = {
SELECT_GAME: "select-game",
SERVER_SETTINGS: "server-settings"
};
const steps = {};
steps[r12.SELECT_GAME] = {
onBack: {
type: "close"
},
onNext: {
type: "go-to-step",
step: r12.SERVER_SETTINGS
}
};
steps[r12.SERVER_SETTINGS] = {
onBack: {
type: "go-to-step",
step: r12.SELECT_GAME
},
onNext: {
type: "save"
}
};
const r11 = {
steps
};
const r10 = window.GLOBAL_ENV.PROJECT_ENV !== "production" ? window.GLOBAL_ENV.PROJECT_ENV === "staging" ? "1415044199572832256" : "1415025086791942144" : "1425215263548117002";
const r43 = window.GLOBAL_ENV.PROJECT_ENV === "production" ? "1361763069696675961" : "1486428380437020672";
const r47 = window.GLOBAL_ENV.PROJECT_ENV !== "production" ? window.GLOBAL_ENV.PROJECT_ENV === "staging" ? "356875570916753438" : "1" : "1402418491272986635";
const r56 = window.GLOBAL_ENV.PROJECT_ENV !== "production" ? window.GLOBAL_ENV.PROJECT_ENV === "staging" ? "1458563423670501376" : "2" : "1458530944955973852";
export class NewGamesCoachmarkContent {
constructor() {
return {
__proto__: new.target.prototype
};
}
}
NewGamesCoachmarkContent.prototype;
NewGamesCoachmarkContent.FEATURED_PRODUCT_ID = window.GLOBAL_ENV.PROJECT_ENV === "production" ? "1497100850261131334" : "1497097140001046528";
NewGamesCoachmarkContent.FEATURED_GAME_ID = window.GLOBAL_ENV.PROJECT_ENV === "production" ? "1440133627899023452" : "1497095960202051584";
NewGamesCoachmarkContent.FEATURED_GAME_NAME = "Windrose";
NewGamesCoachmarkContent.SECOND_GAME_NAME = "Factorio";
NewGamesCoachmarkContent.THIRD_GAME_NAME = "V Rising";
const r74 = {
SHOCKBYTE: 0,
0: "SHOCKBYTE"
};
const SHOCKBYTE = GameServerProviderType.SHOCKBYTE;
const r84 = window.GLOBAL_ENV.RELEASE_CHANNEL === Environments.STAGING ? "https://purple-prod.shockbyte.dev/support" : "https://discord.shockbyte.com/support";
const r85 = {};
r85[SHOCKBYTE] = r84;
const r86 = {};
r86[GameServerProviderType.SHOCKBYTE] = "https://shockbyte.com/legal/acceptable-use-policy";
export { r12 as GameServerSetupStep };
export { r11 as GAME_SERVER_DEFAULT_STEP_CONFIG };
export const GAME_SERVER_SLIDE_PADDING = 24;
export const GAME_SERVER_SLIDE_WIDTH = 680;
export const GAME_SERVER_SLIDE_CONTENT_WIDTH = 632;
export const GAME_SERVER_MAX_INSTANCES = 10;
export const GAME_SERVER_MAX_SERVERS_PER_USER = 5;
export const GAME_SERVER_MAX_NAME_LENGTH = 32;
export const GAME_SERVER_MIN_DELAY_TIME_MS = 1000;
export { r10 as GAME_SERVER_COLLECTION_ID };
export { r43 as RUNESCAPE_GAME_ID };
export { r47 as MINECRAFT_GAME_ID };
export { r56 as HYTALE_GAME_ID };
export { r74 as GameServerGameProvider };
export { r85 as GAME_SERVER_SUPPORT_URLS };
export { r86 as GAME_SERVER_TOS };
export const GAME_SERVER_SURVEY_URL = (a0, a1) => `https://discord.sjc1.qualtrics.com/jfe/form/SV_2h34PnQLPTCjTTM?user_id=${a0}&guild_id=${a1}`;
export const GAME_SERVER_POWERUP_SKU_ID = "0";
@@ -0,0 +1,34 @@
// Metro module 4100 (f4101).
import { createExperiment } from "../../experiments/index";
const experiment = createExperiment({
kind: "guild",
id: "2025-08_portkey_enabled",
label: "GameServer Enabled",
defaultConfig: {
enabled: false
},
treatments: [{
id: 1,
label: "Enable GameServer",
config: {
enabled: true
}
}]
});
export { experiment as GameServerExperiment };
export function getGameServerEnabled(a0, a1) {
return experiment.getCurrentConfig({
guildId: a0,
location: a1
}, {
autoTrackExposure: false
}).enabled;
}
export function useGameServerEnabled(a0, a1) {
return experiment.useExperiment({
guildId: a0,
location: a1
}, {
autoTrackExposure: false
}).enabled;
}
@@ -0,0 +1,314 @@
// Metro module 4097 (f4098).
import getPowerupEntitlementPrice from "../powerups/utils/getPowerupEntitlementPrice";
import gameServerResponseToInstance from "./utils/gameServerResponseToInstance";
import Module589 from "../../../_bundle/Module589";
import Dispatcher from "../../../Dispatcher";
let c2360_2, c2360_3, c2360_4, $mk73585 = function() {
return (a0, a1) => {
let r8 = getPowerupEntitlementPrice(a1);
if (r8 == null) {
r8 = 0;
}
return a0 + r8;
};
};
const handleGameServerInstanceCreated = function handleGameServerInstanceCreated({ guildId, gameServer }) {
if (guildId != null) {
if (c2360_3[guildId] == null) {
c2360_3[guildId] = {
catalog: {},
instances: {},
instructions: {},
entitlements: {}
};
}
const r6 = c2360_3[guildId];
const r19 = {
...c2360_3
};
const instances = {
...r6.instances
};
instances[gameServer.id] = gameServerResponseToInstance(gameServer);
r19[guildId] = {
...r6,
instances
};
c2360_3 = r19;
}
};
c2360_2 = 86400000;
c2360_3 = {};
c2360_4 = {
catalog: {},
hasFetchedCatalog: false,
catalogLastFetchedAt: void 0
};
class GameServerStore extends Module589.PersistedStore {
static displayName = "GameServerStore";
static persistKey = "GameServerStore";
initialize(a0) {
if (a0 != null) {
c2360_3 = a0;
}
}
getState() {
return c2360_3;
}
getStateForGuild(a0) {
return a0 != null ? c2360_3[a0] : void 0;
}
getGlobalCatalogState() {
return c2360_4;
}
getGlobalCatalogGame(c13847_0) {
return Object.values(c2360_4.catalog).find((item) => item.gameId === c13847_0);
}
getLowestGameCostForGuild(a0) {
if (a0 == null) {
return null;
}
const r8 = c2360_3[a0];
const r7 = Object;
let r15 = r8?.catalog;
if (r15 == null) {
r15 = {};
}
const r9 = r7.values(r15);
const length = r9.length;
let r17 = null;
if (length !== 0) {
const r18 = Math;
r17 = r18.min.apply(r18, [...r9.map((item) => item.baseCost)]);
}
return r17;
}
hasFetchedCatalog(a0) {
return a0 != null && c2360_3[a0]?.hasFetchedCatalog === true;
}
hasFetchedInstances(a0) {
return a0 != null && c2360_3[a0]?.hasFetchedInstances === true;
}
shouldFetchCatalogForGuild(a0) {
const catalogLastFetchedAt = c2360_3[a0]?.catalogLastFetchedAt;
return catalogLastFetchedAt == null || catalogLastFetchedAt + c2360_2 < Date.now();
}
shouldFetchInstancesForGuild(a0) {
const instancesLastFetchedAt = c2360_3[a0]?.instancesLastFetchedAt;
return instancesLastFetchedAt == null || instancesLastFetchedAt + 300000 < Date.now();
}
shouldFetchGlobalCatalog() {
const catalogLastFetchedAt = c2360_4.catalogLastFetchedAt;
return catalogLastFetchedAt == null || catalogLastFetchedAt + c2360_2 < Date.now();
}
}
const gameServerStore = new GameServerStore(Dispatcher, {
LOGOUT: function handleReset() {
c2360_3 = {};
c2360_4 = {
catalog: {},
hasFetchedCatalog: false,
catalogLastFetchedAt: void 0
};
},
GAME_SERVER_FETCH_CATALOG_SUCCESS: function handleFetchCatalogSuccess({ guildId, catalog }) {
const r10 = {
...c2360_3
};
if (c2360_3[guildId] == null) {
c2360_3[guildId] = {
catalog: {},
instances: {},
instructions: {},
entitlements: {}
};
}
r10[guildId] = {
...c2360_3[guildId],
catalog,
hasFetchedCatalog: true,
catalogLastFetchedAt: Date.now()
};
c2360_3 = r10;
},
GAME_SERVER_FETCH_GLOBAL_CATALOG_SUCCESS: function handleFetchGlobalCatalogSuccess(a0) {
c2360_4 = {
catalog: a0.catalog,
hasFetchedCatalog: true,
catalogLastFetchedAt: Date.now()
};
},
GAME_SERVER_FETCH_INSTANCES_SUCCESS: function handleFetchInstancesSuccess({ guildId, instances }) {
const r10 = {
...c2360_3
};
if (c2360_3[guildId] == null) {
c2360_3[guildId] = {
catalog: {},
instances: {},
instructions: {},
entitlements: {}
};
}
r10[guildId] = {
...c2360_3[guildId],
instances,
hasFetchedInstances: true,
instancesLastFetchedAt: Date.now()
};
c2360_3 = r10;
},
GAME_SERVER_FETCH_GAME_INSTRUCTIONS_SUCCESS: function handleFetchProductSuccess({ guildId, skuId, instructions }) {
const r12 = {
...c2360_3
};
if (c2360_3[guildId] == null) {
c2360_3[guildId] = {
catalog: {},
instances: {},
instructions: {},
entitlements: {}
};
}
if (c2360_3[guildId] == null) {
c2360_3[guildId] = {
catalog: {},
instances: {},
instructions: {},
entitlements: {}
};
}
const instructions2 = {
...c2360_3[guildId].instructions
};
instructions2[skuId] = instructions;
r12[guildId] = {
...c2360_3[guildId],
instructions: instructions2
};
c2360_3 = r12;
},
GAME_SERVER_UPDATE_INSTANCE_SUCCESS: function handleUpdateInstanceSuccess({ guildId, instance }) {
if (c2360_3[guildId] == null) {
c2360_3[guildId] = {
catalog: {},
instances: {},
instructions: {},
entitlements: {}
};
}
const r6 = c2360_3[guildId];
const r17 = {
...c2360_3
};
const instances = {
...r6.instances
};
instances[instance.id] = instance;
r17[guildId] = {
...r6,
instances
};
c2360_3 = r17;
},
GUILD_BOOST_ENTITLEMENTS_FETCH_SUCCESS: function handleFetchBoostEntitlementsSuccess({ guildId, unlockedGameServers }) {
const appliedBoosts = Object.values(unlockedGameServers).reduce($mk73585(), 0);
const r17 = {
...c2360_3
};
if (c2360_3[guildId] == null) {
c2360_3[guildId] = {
catalog: {},
instances: {},
instructions: {},
entitlements: {}
};
}
r17[guildId] = {
...c2360_3[guildId],
entitlements: unlockedGameServers,
appliedBoosts
};
c2360_3 = r17;
},
GAME_SERVER_CREATE: handleGameServerInstanceCreated,
GAME_SERVER_UPDATE: handleGameServerInstanceCreated,
GAME_SERVER_DELETE: function handleGameServerInstanceDeleted({ guildId, gameServerId }) {
if (guildId != null) {
if (c2360_3[guildId] == null) {
c2360_3[guildId] = {
catalog: {},
instances: {},
instructions: {},
entitlements: {}
};
}
const r16 = c2360_3[guildId];
delete r16.instances[gameServerId];
const r19 = {
...c2360_3
};
r19[guildId] = {
...r16
};
c2360_3 = r19;
}
},
GUILD_POWERUP_ENTITLEMENTS_CREATE: function handleGameServerEntitlementCreated({ guildId, entitlements }) {
if (c2360_3[guildId] == null) {
c2360_3[guildId] = {
catalog: {},
instances: {},
instructions: {},
entitlements: {}
};
}
const r19 = c2360_3[guildId];
let c13848_0 = r19;
entitlements.filter(({ sku }) => {
const r2 = sku == null;
let r5 = void 0;
if (!r2) {
const tenant_metadata = sku.tenant_metadata;
r5 = tenant_metadata == null ? void 0 : tenant_metadata.guild_monetization?.game_server;
}
return r5 != null;
}).forEach((item) => {
c13848_0.entitlements[item.id] = item;
});
const appliedBoosts = Object.values(r19.entitlements).reduce($mk73585(), 0);
const r34 = {
...c2360_3
};
r34[guildId] = {
...r19,
appliedBoosts
};
c2360_3 = r34;
},
GUILD_POWERUP_ENTITLEMENTS_DELETE: function handleGameServerEntitlementDeleted({ guildId, entitlements }) {
if (c2360_3[guildId] == null) {
c2360_3[guildId] = {
catalog: {},
instances: {},
instructions: {},
entitlements: {}
};
}
const r19 = c2360_3[guildId];
let c13849_0 = r19;
entitlements.forEach((entitlement) => {
delete c13849_0.entitlements[entitlement.id];
});
const appliedBoosts = Object.values(r19.entitlements).reduce($mk73585(), 0);
const r31 = {
...c2360_3
};
r31[guildId] = {
...r19,
appliedBoosts
};
c2360_3 = r31;
}
});
export default gameServerStore;
@@ -0,0 +1,35 @@
// Metro module 11575 (f11576).
import Module589 from "../../../_bundle/Module589";
import Dispatcher from "../../../Dispatcher";
let gameServers;
const handleGameServerUpsert = function handleGameServerUpsert({ guildId, gameServer: gameServer2 }) {
let gameServer;
gameServer = void 0;
if (guildId == null) {
gameServer = gameServer2;
gameServers = gameServers.findIndex((a0) => a0.id === gameServer.id) === -1 ? [...gameServers, gameServer] : gameServers.map((a0) => a0.id === gameServer.id ? gameServer : a0);
}
};
gameServers = [];
class OwnedGameServersStore extends Module589.Store {
static displayName = "OwnedGameServersStore";
getGameServers() {
return gameServers;
}
}
const ownedGameServersStore = new OwnedGameServersStore(Dispatcher, {
LOGOUT: function handleReset() {
gameServers = [];
},
GAME_SERVER_FETCH_MY_SERVERS_SUCCESS: function handleFetchMyServersSuccess(a0) {
gameServers = a0.gameServers;
},
GAME_SERVER_CREATE: handleGameServerUpsert,
GAME_SERVER_UPDATE: handleGameServerUpsert,
GAME_SERVER_DELETE: function handleGameServerDeleted({ guildId, gameServerId }) {
if (guildId == null) {
gameServers = gameServers.filter((gameServer) => gameServer.id !== gameServerId);
}
}
});
export default ownedGameServersStore;
@@ -0,0 +1,32 @@
// Metro module 11601 (f11602).
import { createExperiment } from "../../../experiments/index";
import { useGameServerEnabled } from "../GameServerExperiment";
const experiment = createExperiment({
kind: "guild",
id: "2026-03_game_server_pricing",
label: "Game Server Pricing",
defaultConfig: {
enabled: false
},
treatments: [{
id: 1,
label: "Enable Game Server Pricing",
config: {
enabled: true
}
}]
});
export { experiment as GameServerPricingExperiment };
export function useIsGameServerPricingEnabled(a0, a1) {
let r10 = useGameServerEnabled(a0, a1);
const enabled = experiment.useExperiment({
guildId: a0,
location: a1
}, {
autoTrackExposure: false
}).enabled;
if (r10) {
r10 = enabled;
}
return r10;
}
@@ -0,0 +1,19 @@
// Metro module 15225 (f15226).
import { createApexExperiment } from "../../../experiments/apex/index";
const apexExperiment = createApexExperiment({
name: "2026-02-game-server-tab-always-on",
kind: "user",
defaultConfig: {
enabled: false
},
variations: {
1: {
enabled: true
}
}
});
export function useIsGameServerTabAlwaysOnEnabled(a0) {
return apexExperiment.useConfig({
location: a0
}).enabled;
}
@@ -0,0 +1,19 @@
// Metro module 11600 (f11601).
import { createApexExperiment } from "../../../experiments/apex/index";
const apexExperiment = createApexExperiment({
name: "2026-04-new-games-coachmark",
kind: "user",
defaultConfig: {
enabled: false
},
variations: {
1: {
enabled: true
}
}
});
export function useIsNewGamesCoachmarkEnabled(a0) {
return apexExperiment.useConfig({
location: a0
}).enabled;
}
@@ -0,0 +1,19 @@
// Metro module 11668 (f11669).
import { HYTALE_GAME_ID, MINECRAFT_GAME_ID } from "../GameServerConstants";
import { useGame } from "../../../games/hooks/useGame";
export default function useGameServerFeaturedGameNames() {
const data = useGame(MINECRAFT_GAME_ID).data;
const data2 = useGame(HYTALE_GAME_ID).data;
let gameName = data?.name;
if (gameName == null) {
gameName = "Minecraft";
}
let gameName2 = data2?.name;
if (gameName2 == null) {
gameName2 = "Hytale";
}
return {
gameName,
gameName2
};
};
@@ -0,0 +1,17 @@
// Metro module 11650 (f11651).
import { useMemo } from "react";
import GameServerStore from "../GameServerStore";
import { useStateFromStores } from "../../../../_bundle/Module589";
import { getExpiringGuildEntitlements } from "../../powerups/utils/getExpiringGuildEntitlements";
export default function useGameServerGetExpiringEntitlements(c19052_0) {
const stateFromStores = useStateFromStores([GameServerStore], () => GameServerStore.getStateForGuild(c19052_0));
return useMemo(() => {
const r6 = Object;
let r9 = stateFromStores?.entitlements;
if (r9 == null) {
r9 = {};
}
const r10 = r6.values(r9);
return r10.length === 0 ? [] : getExpiringGuildEntitlements(r10);
}, [stateFromStores?.entitlements]);
};
@@ -0,0 +1,32 @@
// Metro module 11667 (f11668).
import { useMemo } from "react";
import GameServerStore from "../GameServerStore";
import { GuildPowerupType } from "../../powerups/constants/GuildPowerupsConstants";
import { GAME_SERVER_POWERUP_SKU_ID } from "../GameServerConstants";
import { useGameServerEnabled } from "../GameServerExperiment";
import { useStateFromStores } from "../../../../_bundle/Module589";
import useGameServerFeaturedGameNames from "./useGameServerFeaturedGameNames";
import { intl } from "../../../../intl/index.native";
import GameServer_messages from "../GameServer.messages";
import Module11669 from "../../../../_bundle/Module11669";
export default function useGameServerPerk(a0) {
let gameName, gameName2;
const gameServerEnabled = useGameServerEnabled(a0, "useGameServerPerk");
const stateFromStores = useStateFromStores([GameServerStore], () => GameServerStore.getLowestGameCostForGuild(a0));
const gameServerFeaturedGameNames = useGameServerFeaturedGameNames();
gameName = gameServerFeaturedGameNames.gameName;
gameName2 = gameServerFeaturedGameNames.gameName2;
return useMemo(() => gameServerEnabled ? stateFromStores != null ? {
skuId: GAME_SERVER_POWERUP_SKU_ID,
title: intl.string(GameServer_messages["B3OfL/"]),
description: intl.format(GameServer_messages["+UqyGU"], {
gameName,
gameName2
}),
cost: stateFromStores,
dependencies: [],
type: GuildPowerupType.PERK,
animatedImageUrl: Module11669,
staticImageUrl: Module11669
} : null : null, [gameServerEnabled, stateFromStores, gameName, gameName2]);
};
@@ -0,0 +1,29 @@
// Metro module 11666 (f11667).
import { useMemo } from "react";
import GameServerStore from "../GameServerStore";
import { useStateFromStores } from "../../../../_bundle/Module589";
import useGameServerGetExpiringEntitlements from "./useGameServerGetExpiringEntitlements";
import { intl } from "../../../../intl/index.native";
import GuildPowerups_messages from "../../powerups/GuildPowerups.messages";
export default function useGameServerPowerupStatus(a0) {
let c19066_2;
const stateFromStores = useStateFromStores([GameServerStore], () => GameServerStore.getStateForGuild(a0)?.entitlements, [a0]);
const gameServerGetExpiringEntitlements = useGameServerGetExpiringEntitlements(a0);
c19066_2 = gameServerGetExpiringEntitlements;
return useMemo(() => {
const r5 = Object;
let r8 = stateFromStores;
if (stateFromStores == null) {
r8 = {};
}
if (r5.values(r8).length !== 0) {
return c19066_2.length > 0 ? {
type: "expiring",
expiringAt: c19066_2[0].ends_at
} : {
type: "active",
statusText: intl.string(GuildPowerups_messages.FFLkmx)
};
}
}, [gameServerGetExpiringEntitlements, stateFromStores]);
};
@@ -0,0 +1,250 @@
// Metro module 11576 (f11577).
import { GameServerProviderType } from "../../../../_bundle/Module4079";
import { GameServerStatus } from "../../../../_bundle/Module11577";
function $mk87662() {
return (a0) => a0.cost;
}
const plans = [{
id: "1",
name: "GameServer #1",
cost: 3,
specifications: [{
title: "2",
description: "GB"
}, {
title: "1",
description: "vCPU"
}, {
title: "25",
description: "GB"
}]
}, {
id: "2",
name: "GameServer #2",
cost: 6,
specifications: [{
title: "2",
description: "GB"
}, {
title: "1",
description: "vCPU"
}, {
title: "25",
description: "GB"
}]
}, {
id: "3",
name: "GameServer #3",
cost: 12,
specifications: [{
title: "2",
description: "GB"
}, {
title: "1",
description: "vCPU"
}, {
title: "25",
description: "GB"
}]
}];
const r11 = Math;
const r38 = {
id: "1",
name: "GameServer Test #1",
provider: GameServerProviderType.SHOCKBYTE,
plans,
baseCost: r11.min.apply(r11, [...plans.map($mk87662())]),
gameId: "1"
};
const r52 = Math;
const r51 = {
id: "2",
name: "GameServer Test #2",
provider: GameServerProviderType.SHOCKBYTE,
plans,
baseCost: r52.min.apply(r52, [...plans.map($mk87662())]),
gameId: "1"
};
const r69 = Math;
const r68 = {
id: "3",
name: "GameServer Test #3",
provider: GameServerProviderType.SHOCKBYTE,
plans,
baseCost: r69.min.apply(r69, [...plans.map($mk87662())]),
gameId: "1"
};
const r87 = Math;
const r86 = {
id: "4",
name: "GameServer Test #4",
provider: GameServerProviderType.SHOCKBYTE,
plans,
baseCost: r87.min.apply(r87, [...plans.map($mk87662())]),
gameId: "1"
};
const r105 = Math;
const r104 = {
id: "5",
name: "GameServer Test #5",
provider: GameServerProviderType.SHOCKBYTE,
plans,
baseCost: r105.min.apply(r105, [...plans.map($mk87662())]),
gameId: "1"
};
const r123 = Math;
const r122 = {
id: "6",
name: "GameServer Test #6",
provider: GameServerProviderType.SHOCKBYTE,
plans,
baseCost: r123.min.apply(r123, [...plans.map($mk87662())]),
gameId: "1"
};
const r141 = Math;
const r140 = {
id: "7",
name: "GameServer Test #7",
provider: GameServerProviderType.SHOCKBYTE,
plans,
baseCost: r141.min.apply(r141, [...plans.map($mk87662())]),
gameId: "1"
};
const r159 = Math;
const r158 = {
id: "8",
name: "GameServer Test #8",
provider: GameServerProviderType.SHOCKBYTE,
plans,
baseCost: r159.min.apply(r159, [...plans.map($mk87662())]),
gameId: "1"
};
const r177 = Math;
const r176 = {
id: "9",
name: "GameServer Test #9",
provider: GameServerProviderType.SHOCKBYTE,
plans,
baseCost: r177.min.apply(r177, [...plans.map($mk87662())]),
gameId: "1"
};
const r195 = Math;
const r194 = {
id: "10",
name: "GameServer Test #10",
provider: GameServerProviderType.SHOCKBYTE,
plans,
baseCost: r195.min.apply(r195, [...plans.map($mk87662())]),
gameId: "1"
};
const r213 = Math;
const r212 = {
id: "11",
name: "GameServer Test #11",
provider: GameServerProviderType.SHOCKBYTE,
plans,
baseCost: r213.min.apply(r213, [...plans.map($mk87662())]),
gameId: "1"
};
const r231 = Math;
const r46 = [r38, r51, r68, r86, r104, r122, r140, r158, r176, r194, r212, {
id: "12",
name: "GameServer Test #12",
provider: GameServerProviderType.SHOCKBYTE,
plans,
baseCost: r231.min.apply(r231, [...plans.map($mk87662())]),
gameId: "1"
}];
const r252 = [{
id: "1",
gameId: "1",
name: "GameServer Test #1",
port: "25565",
regionId: "us-east",
regionName: "US East",
planId: plans[1].id,
planName: plans[1].name,
onlineConnectionsCount: 0,
maxConnectionsCount: 10,
status: GameServerStatus.ONLINE,
serverIP: "127.0.0.1",
gameServerPanelUrl: "https://google.com",
entitlementId: "1"
}, {
id: "2",
gameId: "2",
name: "GameServer Test #2",
port: "25565",
regionId: "us-east",
regionName: "US East",
planId: plans[1].id,
planName: plans[1].name,
onlineConnectionsCount: 0,
maxConnectionsCount: 10,
status: GameServerStatus.ONLINE,
serverIP: "127.0.0.1",
gameServerPanelUrl: "https://google.com",
entitlementId: "2"
}, {
id: "3",
gameId: "3",
name: "GameServer Test #3",
port: "25565",
regionId: "us-east",
regionName: "US East",
planId: plans[1].id,
planName: plans[1].name,
onlineConnectionsCount: 0,
maxConnectionsCount: 10,
status: GameServerStatus.ONLINE,
serverIP: "127.0.0.1",
gameServerPanelUrl: "https://google.com",
entitlementId: "3"
}, {
id: "4",
gameId: "4",
name: "GameServer Test #4",
port: "25565",
regionId: "us-east",
regionName: "US East",
planId: plans[1].id,
planName: plans[1].name,
onlineConnectionsCount: 0,
maxConnectionsCount: 10,
status: GameServerStatus.ONLINE,
serverIP: "127.0.0.1",
gameServerPanelUrl: "https://google.com",
entitlementId: "4"
}, {
id: "5",
gameId: "5",
name: "GameServer Test #5",
port: "25565",
regionId: "us-east",
regionName: "US East",
planId: plans[1].id,
planName: plans[1].name,
onlineConnectionsCount: 0,
maxConnectionsCount: 10,
status: GameServerStatus.ONLINE,
serverIP: "127.0.0.1",
gameServerPanelUrl: "https://google.com",
entitlementId: "5"
}, {
id: "6",
gameId: "6",
name: "GameServer Test #6",
port: "25565",
regionId: "us-east",
regionName: "US East",
planId: plans[1].id,
planName: plans[1].name,
onlineConnectionsCount: 0,
maxConnectionsCount: 10,
status: GameServerStatus.ONLINE,
serverIP: "127.0.0.1",
gameServerPanelUrl: "https://google.com",
entitlementId: "6"
}];
export { r46 as GAME_SERVER_GAME_MOCKS };
export { r252 as GAME_SERVER_INSTANCE_MOCKS };
@@ -0,0 +1,26 @@
// Metro module 4099 (f4100).
export default function gameServerResponseToInstance(a0) {
let players_count = a0.players_count;
if (players_count == null) {
players_count = 0;
}
return {
id: a0.id,
name: a0.name,
regionId: a0.region_id,
regionName: a0.region_name,
planId: a0.sku_id,
planName: a0.plan_name,
onlineConnectionsCount: players_count,
maxConnectionsCount: a0.max_players_count,
serverIP: a0.ip,
port: a0.port,
entitlementId: a0.entitlement_id,
subscriptionId: a0.subscription_id,
providerType: a0.provider_type,
gameServerPanelUrl: a0.provider_url,
status: a0.status,
gameId: a0.game_id,
gameConfig: a0.game_config
};
};
@@ -0,0 +1,67 @@
// Metro module 11578 (f11579).
export function productToGameServerGame(a0) {
const plans = a0.skus.map((sku) => ({
id: sku.id,
name: sku.name,
cost: sku.tenant_metadata.boost_price,
specifications: sku.tenant_metadata.plan_features.map((plan_feature) => ({
title: plan_feature.title,
description: plan_feature.description
}))
})).sort((a, b) => b.cost - a.cost);
const r2 = plans.length > 0;
let baseCost = 0;
if (r2) {
const r9 = Math;
baseCost = r9.min.apply(r9, [...plans.map((plan) => plan.cost)]);
}
const tenant_metadata = a0.tenant_metadata;
const r3 = tenant_metadata == null;
let gameId = void 0;
if (!r3) {
const guild_monetization = tenant_metadata.guild_monetization;
gameId = guild_monetization == null ? void 0 : guild_monetization.game_server?.game_application_id;
}
if (gameId == null) {
gameId = "";
}
const tenant_metadata2 = a0.tenant_metadata;
const r38 = tenant_metadata2 == null;
let provider = void 0;
if (!r38) {
const guild_monetization2 = tenant_metadata2.guild_monetization;
provider = guild_monetization2 == null ? void 0 : guild_monetization2.game_server?.provider;
}
const tenant_metadata3 = a0.tenant_metadata;
const r45 = tenant_metadata3 == null;
let disabled = void 0;
if (!r45) {
const guild_monetization3 = tenant_metadata3.guild_monetization;
disabled = guild_monetization3 == null ? void 0 : guild_monetization3.game_server?.disabled;
}
const tenant_metadata4 = a0.tenant_metadata;
const r52 = tenant_metadata4 == null;
let early_access = void 0;
if (!r52) {
const guild_monetization4 = tenant_metadata4.guild_monetization;
early_access = guild_monetization4 == null ? void 0 : guild_monetization4.game_server?.early_access;
}
const tenant_metadata5 = a0.tenant_metadata;
const r59 = tenant_metadata5 == null;
let can_market = void 0;
if (!r59) {
const guild_monetization5 = tenant_metadata5.guild_monetization;
can_market = guild_monetization5 == null ? void 0 : guild_monetization5.game_server?.can_market;
}
return {
id: a0.id,
name: a0.name,
gameId,
provider,
plans,
baseCost,
disabled,
early_access,
can_market
};
}
@@ -0,0 +1,10 @@
// Metro module 11579 (f11580).
export default function regionResponseToRegion(a0) {
return {
id: a0.id,
name: a0.name,
countryCode: a0.country_code,
pingUrl: a0.ping_url,
enabled: a0.enabled
};
};