decord/source/1488_nanoid.js

94 lines
2.7 KiB
JavaScript
Raw Normal View History

2026-07-29 08:29:29 +00:00
// Module ID: 1488
// Function ID: 1489
2026-07-23 10:11:24 +00:00
// Name: nanoid
2026-07-29 08:29:29 +00:00
// Dependencies: [1489]
2026-07-20 16:05:17 +00:00
2026-07-29 08:29:29 +00:00
// Module 1488 (nanoid)
2026-07-23 10:11:24 +00:00
const require = arg1;
const dependencyMap = arg6;
2026-07-20 16:05:17 +00:00
arg5.default = {
getStateForAction(routes, type) {
2026-07-23 10:11:24 +00:00
let closure_0 = routes;
let closure_1 = type;
2026-07-20 16:05:17 +00:00
type = type.type;
if ("SET_PARAMS" === type) {
if (type.source) {
routes = routes.routes;
2026-07-23 10:11:24 +00:00
let index = routes.findIndex((key) => key.key === type.source);
2026-07-20 16:05:17 +00:00
} else {
index = routes.index;
}
2026-07-29 08:29:29 +00:00
let tmp8 = null;
2026-07-20 16:05:17 +00:00
if (-1 !== index) {
let obj = {};
2026-07-29 08:29:29 +00:00
let merged = Object.assign(routes);
2026-07-20 16:05:17 +00:00
routes = routes.routes;
obj.routes = routes.map((params) => {
2026-07-29 08:29:29 +00:00
let tmp = params;
2026-07-20 16:05:17 +00:00
if (arg1 === index) {
2026-07-29 08:29:29 +00:00
let obj = {};
const merged = Object.assign(params);
obj = {};
const merged1 = Object.assign(params.params);
const merged2 = Object.assign(type.payload.params);
obj.params = obj;
tmp = obj;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
return tmp;
2026-07-20 16:05:17 +00:00
});
2026-07-29 08:29:29 +00:00
tmp8 = obj;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
return tmp8;
2026-07-20 16:05:17 +00:00
} else if ("RESET" === type) {
const payload = type.payload;
let tmp2 = null;
if (0 !== payload.routes.length) {
const routes2 = payload.routes;
tmp2 = null;
if (!routes2.some((name) => {
2026-07-23 10:11:24 +00:00
const routeNames = lib.routeNames;
2026-07-20 16:05:17 +00:00
return !routeNames.includes(name.name);
})) {
let tmp3 = payload;
if (false === payload.stale) {
2026-07-29 08:29:29 +00:00
let tmp4 = null;
2026-07-20 16:05:17 +00:00
if (routes.routeNames.length === payload.routeNames.length) {
2026-07-23 10:11:24 +00:00
let routeNames = payload.routeNames;
2026-07-29 08:29:29 +00:00
tmp4 = null;
2026-07-20 16:05:17 +00:00
if (!routeNames.some((arg0) => {
2026-07-23 10:11:24 +00:00
const routeNames = lib.routeNames;
2026-07-20 16:05:17 +00:00
return !routeNames.includes(arg0);
})) {
obj = {};
2026-07-29 08:29:29 +00:00
let merged1 = Object.assign(payload);
2026-07-20 16:05:17 +00:00
const routes1 = payload.routes;
obj.routes = routes1.map((key) => {
2026-07-29 08:29:29 +00:00
let tmp = key;
2026-07-20 16:05:17 +00:00
if (!key.key) {
const obj = {};
2026-07-29 08:29:29 +00:00
const merged = Object.assign(key);
2026-07-20 16:05:17 +00:00
const _HermesInternal = HermesInternal;
2026-07-23 10:11:24 +00:00
obj.key = "" + key.name + "-" + lib(type[0]).nanoid();
2026-07-29 08:29:29 +00:00
tmp = obj;
2026-07-23 10:11:24 +00:00
const obj2 = lib(type[0]);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
return tmp;
2026-07-20 16:05:17 +00:00
});
2026-07-29 08:29:29 +00:00
tmp4 = obj;
2026-07-20 16:05:17 +00:00
}
}
2026-07-29 08:29:29 +00:00
tmp3 = tmp4;
2026-07-20 16:05:17 +00:00
}
tmp2 = tmp3;
}
}
return tmp2;
} else {
return null;
}
},
shouldActionChangeFocus(type) {
return "NAVIGATE" === type.type;
}
};