decord/source/__polyfill/01xxx/module_1582.js
github-actions f0f877e8ce chore: update source for alpha 347.1
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4824.js (118.4 MB)
2026-09-15 14:23:42 +00:00

71 lines
3.1 KiB
JavaScript

// Module ID: 1582
// Function ID: 1583
// Dependencies: [109, 19, 21, 1487, 1583, 1585]
// Exports: createStandardNavigationFactories
// Module 1582
import BaseNavigationContainer from "BaseNavigationContainer" /* 1487 */;
import _mod1583 from "module_1583" /* 1583 */;
import _mod1585 from "module_1585" /* 1585 */;
import _objectWithoutProperties from "_objectWithoutProperties" /* 109 */;
import noop from "module_19" /* 19 */;
const require = globalThis.__r;
require = fn;
let closure_2 = ["children", "id", "initialRouteName", "layout", "screenLayout", "screenListeners", "screenOptions", "UNSTABLE_routeNamesChangeBehavior", "UNSTABLE_router"];
const jsx = fn(21).jsx;
export const createStandardNavigationFactories = function createStandardNavigationFactories(arg0, arg1, arg2) {
_require = arg1;
dependencyMap = arg2;
({ type, version, NavigatorContent: closure_2 } = arg0);
if ("standard" !== type) {
let str3 = "unknown type.";
if (typeof type === "string") {
const _HermesInternal2 = HermesInternal;
str3 = "type \"" + type + "\".";
}
const error = new Error("createStandardNavigationFactories only works with standard navigator objects, but got navigator of " + str3);
throw error;
} else if (1 !== version) {
const _Error = Error;
const _HermesInternal = HermesInternal;
const error1 = new Error("createStandardNavigationFactories only works with version 1 of standard navigator objects, but got version " + version + ".");
throw error1;
} else {
let obj = {
createNavigator: require("BaseNavigationContainer").createNavigatorFactory(function StandardNavigationNavigator(UNSTABLE_routeNamesChangeBehavior) {
const navigationBuilder = BaseNavigationContainer.useNavigationBuilder(closure_0, UNSTABLE_routeNamesChangeBehavior);
closure_1 = _mod1583.useBuildHref();
let tmp2 = _mod1585;
let flag = tmp2.useMemoArray;
if (!("preloadedRoutes" in navigationBuilder.state)) {
let routes1 = navigationBuilder.state.routes;
const flagResult = flag(routes1.map((key) => {
const tmp = closure_1(key.name, key.params);
const items = [{ key: key.key, name: key.name, params: key.params, href: tmp }, ];
const items1 = [, , , ];
({ key: arr2[0], name: arr2[1], params: arr2[2] } = key);
items1[3] = tmp;
items[1] = items1;
return items;
}));
closure_2 = flagResult;
let items = [navigationBuilder.state.index, flagResult];
const routes2 = noop.useMemo(() => ({ index: navigationBuilder.state.index, routes: flagResult }), items).routes;
tmp2 = routes2[Symbol.iterator]();
flag = true;
} else {
const _Array = Array;
}
const routes = navigationBuilder.state.routes;
routes1 = routes.concat(navigationBuilder.state.preloadedRoutes);
}),
createScreen: null
};
const obj2 = require("BaseNavigationContainer");
obj.createScreen = require("BaseNavigationContainer").createScreenFactory();
return obj;
}
};