decord/beta/source/modules/routing/KeybindRouterStore.tsx
github-actions 30c0bb2ec3 chore: update source for beta 347.10
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4975.js (118.4 MB)
2026-09-24 16:03:38 +00:00

78 lines
2.5 KiB
TypeScript

// Module ID: 13078
// Function ID: 13079
// Name: KeybindRouterStore
// Dependencies: [1078, 4617, 4630, 1247, 1252, 2]
// Module 13078 (KeybindRouterStore)
import matchPathCompat from "matchPathCompat" /* 4617 */;
import Constants from "Constants" /* 1078 */;
import identity from "module_1247" /* 1247 */;
import size from "module_2" /* 2 */;
function getMatchData(pathname) {
let str = pathname;
let str2 = pathname;
if (pathname == null) {
str2 = "";
}
const obj2 = { path: null };
const RouteParam = tmp(4630).RouteParam;
const obj = matchPathCompat;
const obj3 = React2;
const RouteParam2 = tmp(4630).RouteParam;
obj2.path = React2.CHANNEL(RouteParam.guildId(), RouteParam2.channelId({ optional: true }), ":messageId?");
const matchPathResult = obj.matchPath(str2, obj2);
if (null != matchPathResult) {
({ guildId, channelId } = matchPathResult.params);
let tmp7 = null;
if (guildId !== React3) {
tmp7 = guildId;
}
const obj4 = { guildId: tmp7, channelId: null };
if (channelId == null) {
channelId = null;
}
obj4.channelId = channelId;
return obj4;
} else {
if (str == null) {
str = "";
}
const obj5 = { path: null };
const RouteParam3 = tmp(4630).RouteParam;
obj5.path = obj3.GUILD_BOOSTING_MARKETING(RouteParam3.guildId());
const matchPathResult1 = tmp(4617).matchPath(str, obj5);
if (null != matchPathResult1) {
const obj6 = { guildId: matchPathResult1.params.guildId, channelId: null };
let obj7 = obj6;
} else {
obj7 = { guildId: null, channelId: null };
}
return obj7;
}
const guildIdResult = RouteParam.guildId();
}
({ Routes: c2, ME: c3 } = Constants);
const withEqualityFn = identity.createWithEqualityFn((arg0) => {
closure_0 = arg0;
return {
path: null,
basePath: "/",
guildId: null,
channelId: null,
updatePath(path) {
({ guildId: closure_1, channelId: closure_2 } = getMatchData(path));
const tmp = getMatchData(path);
path(1252).batchUpdates(() => path({ path, guildId, channelId }));
},
resetPath(pathname) {
const basePath = pathname;
({ guildId: closure_1, channelId: closure_2 } = getMatchData(pathname));
const tmp = getMatchData(pathname);
basePath(1252).batchUpdates(() => basePath({ path: null, guildId, channelId, basePath }));
}
};
});
const result = size.fileFinishedImporting("modules/routing/KeybindRouterStore.tsx");
export default withEqualityFn;