2026-10-09 10:00:15 +00:00
|
|
|
// Module ID: 4918
|
|
|
|
|
// Function ID: 4919
|
2026-09-10 05:38:07 +00:00
|
|
|
// Name: RouteUtils
|
2026-10-09 10:00:15 +00:00
|
|
|
// Dependencies: [1086, 2071, 2, 4919]
|
2026-07-29 08:29:29 +00:00
|
|
|
// Exports: isPseudoGuildId, isValidChannelId, isValidGuildId
|
2026-07-20 16:05:17 +00:00
|
|
|
|
2026-10-09 10:00:15 +00:00
|
|
|
// Module 4918 (RouteUtils)
|
2026-10-03 08:58:59 +00:00
|
|
|
import RouteConstants from "RouteConstants" /* 1086 */;
|
2026-10-09 10:00:15 +00:00
|
|
|
import ChannelConstants from "ChannelConstants" /* 2071 */;
|
|
|
|
|
import RouteParam from "RouteParam" /* 4919 */;
|
2026-09-10 05:38:07 +00:00
|
|
|
import size from "module_2" /* 2 */;
|
2026-07-23 10:11:24 +00:00
|
|
|
|
2026-09-10 05:38:07 +00:00
|
|
|
const PSEUDO_GUILD_IDS = RouteConstants.PSEUDO_GUILD_IDS;
|
|
|
|
|
const isStaticChannelRoute = ChannelConstants.isStaticChannelRoute;
|
2026-07-23 10:11:24 +00:00
|
|
|
const re2 = /^\d+$/;
|
2026-09-10 05:38:07 +00:00
|
|
|
const result = size.fileFinishedImporting("modules/routing/RouteUtils.tsx");
|
2026-10-03 08:58:59 +00:00
|
|
|
const RouteParam_export = RouteParam.RouteParam;
|
2026-07-20 16:05:17 +00:00
|
|
|
|
2026-10-03 08:58:59 +00:00
|
|
|
export { RouteParam_export as RouteParam };
|
2026-09-05 10:56:28 +00:00
|
|
|
export const isPseudoGuildId = function isPseudoGuildId(guildId) {
|
|
|
|
|
return PSEUDO_GUILD_IDS.includes(guildId);
|
2026-07-29 08:29:29 +00:00
|
|
|
};
|
2026-07-20 16:05:17 +00:00
|
|
|
export const isValidGuildId = function isValidGuildId(guildId) {
|
|
|
|
|
let tmp = null != guildId;
|
|
|
|
|
if (tmp) {
|
2026-10-03 08:58:59 +00:00
|
|
|
const hasItem = PSEUDO_GUILD_IDS.includes(guildId) || re2.test(guildId);
|
2026-07-29 08:29:29 +00:00
|
|
|
tmp = hasItem;
|
2026-07-20 16:05:17 +00:00
|
|
|
}
|
|
|
|
|
return tmp;
|
|
|
|
|
};
|
|
|
|
|
export const isValidChannelId = function isValidChannelId(channelId) {
|
|
|
|
|
let tmp = null == channelId;
|
|
|
|
|
if (!tmp) {
|
2026-10-03 08:58:59 +00:00
|
|
|
const isMatch = re2.test(channelId) || isStaticChannelRoute(channelId);
|
2026-07-29 08:29:29 +00:00
|
|
|
tmp = isMatch;
|
2026-07-20 16:05:17 +00:00
|
|
|
}
|
|
|
|
|
return tmp;
|
|
|
|
|
};
|