decord/alpha/source/modules/routing/KeybindRouterStore.tsx

108 lines
3.1 KiB
TypeScript
Raw Permalink Normal View History

2026-10-10 08:08:14 +00:00
// Module ID: 11201
// Function ID: 11202
// Name: KeybindRouterStore
2026-10-10 08:08:14 +00:00
// Dependencies: [1085, 4944, 4957, 1267, 1272, 2]
2026-07-20 16:05:17 +00:00
2026-10-10 08:08:14 +00:00
// Module 11201 (KeybindRouterStore)
import matchPathCompat from "matchPathCompat" /* 4944 */;
2026-10-03 08:58:59 +00:00
import Constants from "Constants" /* 1085 */;
2026-10-09 10:00:15 +00:00
import module_1267 from "module_1267" /* 1267 */;
import size from "module_2" /* 2 */;
2026-07-23 10:11:24 +00:00
2026-10-03 08:58:59 +00:00
let c2;
let c3;
2026-07-20 16:05:17 +00:00
function getMatchData(pathname) {
2026-10-03 08:58:59 +00:00
let CHANNEL;
let GUILD_BOOSTING_MARKETING;
let RouteParam2;
let RouteParam3;
let channelId;
let guildId;
let guildIdResult;
2026-07-29 08:29:29 +00:00
let str = pathname;
let str2 = pathname;
2026-10-03 08:58:59 +00:00
const matchPath = matchPathCompat.matchPath;
matchPathCompat;
2026-07-29 08:29:29 +00:00
if (pathname == null) {
str2 = "";
2026-07-20 16:05:17 +00:00
}
2026-10-03 08:58:59 +00:00
const obj = { path: CHANNEL(guildIdResult, RouteParam2.channelId({ optional: true }), ":messageId?") };
CHANNEL = constants.CHANNEL;
2026-10-10 08:08:14 +00:00
const RouteParam = tmp(4957).RouteParam;
2026-10-03 08:58:59 +00:00
guildIdResult = RouteParam.guildId();
2026-10-10 08:08:14 +00:00
RouteParam2 = tmp(4957).RouteParam;
2026-10-03 08:58:59 +00:00
const matchPathResult = matchPath(str2, obj);
const tmp4 = constants;
2026-07-20 16:05:17 +00:00
if (null != matchPathResult) {
({ guildId, channelId } = matchPathResult.params);
2026-10-10 08:08:14 +00:00
let tmp10 = null;
2026-10-03 08:58:59 +00:00
if (guildId !== _false) {
2026-10-10 08:08:14 +00:00
tmp10 = guildId;
2026-07-20 16:05:17 +00:00
}
2026-10-10 08:08:14 +00:00
const obj2 = { guildId: tmp10, channelId };
2026-07-29 08:29:29 +00:00
if (channelId == null) {
channelId = null;
2026-07-20 16:05:17 +00:00
}
2026-10-03 08:58:59 +00:00
return obj2;
2026-07-20 16:05:17 +00:00
} else {
2026-10-03 08:58:59 +00:00
let obj5;
const matchPath2 = matchPathCompat.matchPath;
matchPathCompat;
2026-07-29 08:29:29 +00:00
if (str == null) {
str = "";
2026-07-20 16:05:17 +00:00
}
2026-10-03 08:58:59 +00:00
const obj3 = { path: GUILD_BOOSTING_MARKETING(RouteParam3.guildId()) };
GUILD_BOOSTING_MARKETING = tmp4.GUILD_BOOSTING_MARKETING;
2026-10-10 08:08:14 +00:00
RouteParam3 = tmp(4957).RouteParam;
2026-10-03 08:58:59 +00:00
const matchPath2Result = matchPath2(str, obj3);
if (null != matchPath2Result) {
obj5 = { guildId: matchPath2Result.params.guildId, channelId: null };
const obj4 = { guildId: matchPath2Result.params.guildId, channelId: null };
2026-07-20 16:05:17 +00:00
} else {
2026-10-03 08:58:59 +00:00
obj5 = { guildId: null, channelId: null };
2026-07-20 16:05:17 +00:00
}
2026-10-03 08:58:59 +00:00
return obj5;
2026-07-20 16:05:17 +00:00
}
}
({ Routes: c2, ME: c3 } = Constants);
2026-10-09 10:00:15 +00:00
const withEqualityFn = module_1267.createWithEqualityFn((arg0) => {
2026-10-03 08:58:59 +00:00
let closure_0 = arg0;
let obj = {
2026-07-23 10:11:24 +00:00
path: null,
basePath: "/",
guildId: null,
channelId: null,
updatePath(path) {
2026-10-03 08:58:59 +00:00
let channelId;
let closure_1;
let closure_2;
let guildId;
({ guildId: closure_1, channelId: closure_2 } = getMatchData(path));
2026-10-03 08:58:59 +00:00
getMatchData(path);
let obj = path(dependencyMap[4]);
obj.batchUpdates(() => {
const obj = { path, guildId, channelId };
return path(obj);
});
2026-07-20 16:05:17 +00:00
},
resetPath(pathname) {
2026-10-03 08:58:59 +00:00
let channelId;
let closure_1;
let closure_2;
let guildId;
const basePath = pathname;
({ guildId: closure_1, channelId: closure_2 } = getMatchData(pathname));
2026-10-03 08:58:59 +00:00
getMatchData(pathname);
let obj = basePath(dependencyMap[4]);
obj.batchUpdates(() => {
const obj = { path: null, guildId, channelId, basePath };
return basePath(obj);
});
2026-07-20 16:05:17 +00:00
}
};
2026-10-03 08:58:59 +00:00
return obj;
2026-07-20 16:05:17 +00:00
});
const result = size.fileFinishedImporting("modules/routing/KeybindRouterStore.tsx");
2026-07-20 16:05:17 +00:00
export default withEqualityFn;