2026-07-20 16:05:17 +00:00
// Module ID: 1469
2026-07-25 08:10:48 +00:00
// Function ID: 17085
2026-07-20 16:05:17 +00:00
// Name: getPartialState
2026-07-23 10:11:24 +00:00
// Dependencies: [57, 29, 31, 33, 1470, 1471, 1472, 1473, 1474, 1461, 1475, 1476, 1477, 1479, 1480, 1478, 1481, 1482, 1483, 1484]
2026-07-20 16:05:17 +00:00
// Module 1469 (getPartialState)
2026-07-23 10:11:24 +00:00
import _slicedToArray from "_slicedToArray" ;
import _objectWithoutProperties from "_objectWithoutProperties" ;
import importAllResult from "result" ;
import { jsx } from "jsxProd" ;
const require = arg1 ;
let closure _3 = [ "key" , "routeNames" ] ;
2026-07-20 16:05:17 +00:00
function getPartialState ( routes ) {
let key ;
let routeNames ;
if ( undefined !== routes ) {
( { key , routeNames } = routes ) ;
2026-07-23 10:11:24 +00:00
let _Object = Object ;
let obj = { stale : true } ;
2026-07-20 16:05:17 +00:00
routes = routes . routes ;
obj . routes = routes . map ( ( state ) => {
let merged = state ;
if ( undefined !== state . state ) {
const _Object = Object ;
2026-07-23 10:11:24 +00:00
const obj = { state : outer1 _8 ( state . state ) } ;
2026-07-20 16:05:17 +00:00
merged = Object . assign ( { } , state , obj ) ;
}
return merged ;
} ) ;
return Object . assign ( { } , callback2 ( routes , closure _3 ) , obj ) ;
}
}
export default importAllResult . forwardRef ( function BaseNavigationContainer ( children ) {
let independent ;
let onStateChange ;
let onUnhandledAction ;
2026-07-23 10:11:24 +00:00
let require ;
( { initialState : require , onStateChange } = children ) ;
2026-07-20 16:05:17 +00:00
( { onUnhandledAction , independent } = children ) ;
2026-07-23 10:11:24 +00:00
if ( ! importAllResult . useContext ( onStateChange ( first [ 4 ] ) ) . isDefault ) {
2026-07-20 16:05:17 +00:00
if ( ! independent ) {
const _Error = Error ;
const error = new Error ( "Looks like you have nested a 'NavigationContainer' inside another. Normally you need only one container at the root of the app, so this was probably an error. If this was intentional, pass 'independent={true}' explicitly. Note that this will make the child navigators disconnected from the parent and you won't be able to navigate between them." ) ;
throw error ;
}
}
2026-07-23 10:11:24 +00:00
const tmp6 = callback ( onStateChange ( first [ 5 ] ) ( ( ) => {
2026-07-20 16:05:17 +00:00
let tmp2 ;
if ( null != closure _0 ) {
tmp2 = closure _0 ;
}
return closure _8 ( tmp2 ) ;
} ) , 5 ) ;
2026-07-23 10:11:24 +00:00
first = tmp6 [ 0 ] ;
2026-07-20 16:05:17 +00:00
let closure _3 = tmp8 ;
2026-07-23 10:11:24 +00:00
callback = tmp9 ;
let _objectWithoutProperties = tmp10 ;
2026-07-20 16:05:17 +00:00
const jsx = importAllResult . useRef ( true ) ;
let closure _8 = importAllResult . useRef ( ) ;
callback = importAllResult . useCallback ( ( ) => ref2 . current , [ ] ) ;
const callback1 = importAllResult . useCallback ( ( current ) => {
closure _8 . current = current ;
} , [ ] ) ;
2026-07-23 10:11:24 +00:00
const tmp14 = onStateChange ( first [ 6 ] ) ( ) ;
2026-07-20 16:05:17 +00:00
const listeners = tmp14 . listeners ;
const addListener = tmp14 . addListener ;
2026-07-23 10:11:24 +00:00
const tmp15 = onStateChange ( first [ 7 ] ) ( ) ;
2026-07-20 16:05:17 +00:00
const keyedListeners = tmp15 . keyedListeners ;
const addKeyedListener = tmp15 . addKeyedListener ;
const items = [ listeners . focus ] ;
const callback2 = importAllResult . useCallback ( ( arg0 ) => {
2026-07-23 10:11:24 +00:00
let closure _0 = arg0 ;
2026-07-20 16:05:17 +00:00
if ( null == listeners . focus [ 0 ] ) {
const _console = console ;
2026-07-23 10:11:24 +00:00
console . error ( outer1 _0 ( first [ 8 ] ) . NOT _INITIALIZED _ERROR ) ;
2026-07-20 16:05:17 +00:00
} else {
const focus = listeners . focus ;
2026-07-23 10:11:24 +00:00
focus [ 0 ] ( ( dispatch ) => dispatch . dispatch ( closure _0 ) ) ;
2026-07-20 16:05:17 +00:00
}
} , items ) ;
const items1 = [ listeners . focus ] ;
const callback3 = importAllResult . useCallback ( ( ) => {
if ( null == listeners . focus [ 0 ] ) {
return false ;
} else {
const focus = listeners . focus ;
const tmp2 = focus [ 0 ] ( ( canGoBack ) => canGoBack . canGoBack ( ) ) ;
let result = ! tmp3 ;
if ( ! ! tmp2 . handled ) {
result = tmp2 . result ;
}
return result ;
}
} , items1 ) ;
const items2 = [ keyedListeners . getState , listeners . focus ] ;
const callback4 = importAllResult . useCallback ( ( key ) => {
2026-07-23 10:11:24 +00:00
let closure _0 = key ;
2026-07-20 16:05:17 +00:00
key = undefined ;
if ( null != key ) {
key = key . key ;
}
if ( null == key ) {
let key1 ;
if ( null != keyedListeners . getState . root ) {
const getState = keyedListeners . getState ;
key1 = getState . root ( ) . key ;
}
key = key1 ;
}
if ( null == key ) {
const _console = console ;
2026-07-23 10:11:24 +00:00
console . error ( outer1 _0 ( first [ 8 ] ) . NOT _INITIALIZED _ERROR ) ;
2026-07-20 16:05:17 +00:00
} else {
const focus = listeners . focus ;
focus [ 0 ] ( ( dispatch ) => {
2026-07-23 10:11:24 +00:00
const CommonActions = outer2 _0 ( first [ 9 ] ) . CommonActions ;
return dispatch . dispatch ( Object . assign ( { } , CommonActions . reset ( closure _0 ) , { target : key } ) ) ;
2026-07-20 16:05:17 +00:00
} ) ;
}
} , items2 ) ;
const items3 = [ keyedListeners . getState ] ;
const callback5 = importAllResult . useCallback ( ( ) => {
let rootResult ;
if ( null != keyedListeners . getState . root ) {
const getState = keyedListeners . getState ;
rootResult = getState . root ( ) ;
}
return rootResult ;
} , items3 ) ;
const items4 = [ callback5 ] ;
const callback6 = importAllResult . useCallback ( ( ) => {
const tmp = callback5 ( ) ;
if ( null != tmp ) {
return onStateChange ( first [ 10 ] ) ( tmp ) ;
}
} , items4 ) ;
2026-07-23 10:11:24 +00:00
const tmp21 = onStateChange ( first [ 11 ] ) ( ) ;
let closure _20 = tmp21 ;
const tmp22 = onStateChange ( first [ 12 ] ) ( { } ) ;
2026-07-20 16:05:17 +00:00
const addOptionsGetter = tmp22 . addOptionsGetter ;
const getCurrentOptions = tmp22 . getCurrentOptions ;
const items5 = [ callback3 , callback2 , tmp21 , getCurrentOptions , callback6 , callback5 , listeners . focus , callback4 ] ;
const memo = importAllResult . useMemo ( ( ) => {
2026-07-23 10:11:24 +00:00
const keys = Object . keys ( outer1 _0 ( first [ 9 ] ) . CommonActions ) ;
2026-07-20 16:05:17 +00:00
const reduced = keys . reduce ( ( arg0 , arg1 ) => {
2026-07-23 10:11:24 +00:00
let closure _0 = arg1 ;
arg0 [ arg1 ] = ( ) => outer2 _15 ( outer3 _0 ( first [ 9 ] ) . CommonActions [ closure _0 ] ( ... arguments ) ) ;
2026-07-20 16:05:17 +00:00
return arg0 ;
} , { } ) ;
return Object . assign ( { } , reduced , tmp21 . create ( "root" ) , {
dispatch : callback2 ,
resetRoot : callback4 ,
isFocused ( ) {
return true ;
} ,
canGoBack : callback3 ,
getParent ( ) {
} ,
getState ( ) {
2026-07-23 10:11:24 +00:00
return outer1 _31 . current ;
2026-07-20 16:05:17 +00:00
} ,
getRootState : callback5 ,
getCurrentRoute : callback6 ,
getCurrentOptions ,
isReady ( ) {
2026-07-23 10:11:24 +00:00
return null != outer1 _11 . focus [ 0 ] ;
2026-07-20 16:05:17 +00:00
}
} ) ;
} , items5 ) ;
const items6 = [ memo ] ;
const imperativeHandle = importAllResult . useImperativeHandle ( arg1 , ( ) => memo , items6 ) ;
const items7 = [ tmp21 ] ;
const callback7 = importAllResult . useCallback ( ( action , noop ) => {
tmp21 . emit ( { type : "__unsafe_action__" , data : { action , noop , stack : ref4 . current } } ) ;
} , items7 ) ;
let closure _25 = importAllResult . useRef ( ) ;
const items8 = [ tmp21 ] ;
const callback8 = importAllResult . useCallback ( ( current ) => {
if ( ref3 . current !== current ) {
ref3 . current = current ;
let obj = { type : "options" } ;
obj = { options : current } ;
obj . data = obj ;
tmp21 . emit ( obj ) ;
}
} , items8 ) ;
let closure _27 = importAllResult . useRef ( ) ;
const items9 = [ addListener , addKeyedListener , callback7 , callback8 ] ;
const items10 = [ tmp6 [ 3 ] , tmp6 [ 4 ] ] ;
const memo1 = importAllResult . useMemo ( ( ) => ( { addListener , addKeyedListener , onDispatchAction : callback7 , onOptionsChange : callback8 , stackRef : closure _27 } ) , items9 ) ;
2026-07-23 10:11:24 +00:00
const memo2 = importAllResult . useMemo ( ( ) => ( { scheduleUpdate : _objectWithoutProperties , flushUpdates : closure _6 } ) , items10 ) ;
2026-07-20 16:05:17 +00:00
let closure _28 = importAllResult . useRef ( true ) ;
const callback9 = importAllResult . useCallback ( ( ) => ref5 . current , [ ] ) ;
const items11 = [ first , tmp6 [ 1 ] , tmp6 [ 2 ] , callback , callback1 , callback9 , addOptionsGetter ] ;
2026-07-23 10:11:24 +00:00
const memo3 = importAllResult . useMemo ( ( ) => ( { state : first , getState : closure _3 , setState : _slicedToArray , getKey : callback , setKey : callback1 , getIsInitial : callback9 , addOptionsGetter } ) , items11 ) ;
2026-07-20 16:05:17 +00:00
let closure _30 = importAllResult . useRef ( onStateChange ) ;
let closure _31 = importAllResult . useRef ( first ) ;
const effect = importAllResult . useEffect ( ( ) => {
closure _28 . current = false ;
closure _30 . current = onStateChange ;
closure _31 . current = first ;
} ) ;
const items12 = [ callback5 , tmp21 , first ] ;
const effect1 = importAllResult . useEffect ( ( ) => {
tmp21 . emit ( { type : "state" , data : { state : first } } ) ;
let current = ! ref . current ;
if ( current ) {
current = ref6 . current ;
}
if ( current ) {
ref6 . current ( tmp ) ;
}
ref . current = false ;
} , items12 ) ;
let callback10 = importAllResult . useCallback ( ( arg0 ) => {
} , [ ] ) ;
let obj = { value : memo } ;
obj = { value : memo2 } ;
obj = { value : memo1 } ;
const obj1 = { value : memo3 } ;
const obj2 = { } ;
if ( null != onUnhandledAction ) {
callback10 = onUnhandledAction ;
}
obj2 . value = callback10 ;
2026-07-23 10:11:24 +00:00
obj2 . children = jsx ( onStateChange ( first [ 17 ] ) , { children : children . children } ) ;
obj1 . children = jsx ( onStateChange ( first [ 16 ] ) . Provider , { } ) ;
obj . children = jsx ( onStateChange ( first [ 4 ] ) . Provider , { value : memo3 } ) ;
obj . children = jsx ( onStateChange ( first [ 15 ] ) . Provider , { value : memo1 } ) ;
obj . children = jsx ( require ( first [ 14 ] ) . ScheduleUpdateContext . Provider , { value : memo1 } ) ;
const tmp34Result = jsx ( onStateChange ( first [ 13 ] ) . Provider , { value : memo1 } ) ;
2026-07-20 16:05:17 +00:00
let tmp36 = tmp34Result ;
if ( independent ) {
const obj3 = { value : undefined } ;
const obj4 = { value : undefined , children : tmp34Result } ;
2026-07-23 10:11:24 +00:00
obj3 . children = jsx ( onStateChange ( first [ 19 ] ) . Provider , { value : undefined , children : tmp34Result } ) ;
tmp36 = jsx ( onStateChange ( first [ 18 ] ) . Provider , { value : undefined } ) ;
2026-07-20 16:05:17 +00:00
}
return tmp36 ;
} ) ;