2026-08-15 05:55:55 +00:00
// Module ID: 1516
// Function ID: 1517
2026-08-06 08:05:19 +00:00
// Name: getPartialState
2026-08-15 05:55:55 +00:00
// Dependencies: [109, 19, 21, 1517, 1518, 1520, 1523, 1524, 1525, 1522, 1526, 1505, 1527, 1528, 1529, 1519, 1531, 1530, 1532, 1533, 1534, 1535, 1536]
2026-08-06 08:05:19 +00:00
2026-08-15 05:55:55 +00:00
// Module 1516 (getPartialState)
2026-08-24 06:08:38 +00:00
import closure _4 from "_objectWithoutProperties" /* 109 */ ;
import importAllResult from "noop" /* 19 */ ;
import { jsx } from "jsxProd" /* 21 */ ;
2026-08-06 08:05:19 +00:00
const require = arg1 ;
let closure _3 = [ "key" , "routeNames" ] ;
let c5 = importAllResult ;
function getPartialState ( arg0 ) {
}
export const BaseNavigationContainer = importAllResult . forwardRef ( function BaseNavigationContainer ( onReady , ref ) {
( { initialState : require , onStateChange } = onReady ) ;
onReady = onReady . onReady ;
( { onUnhandledAction , navigationInChildEnabled } = onReady ) ;
if ( navigationInChildEnabled === undefined ) {
navigationInChildEnabled = false ;
}
let state ;
let getState ;
let setState ;
let scheduleUpdate ;
let flushUpdates ;
2026-08-24 06:08:38 +00:00
closure _8 = undefined ;
closure _9 = undefined ;
2026-08-06 08:05:19 +00:00
let callback ;
let callback1 ;
c12 = undefined ;
addListener = undefined ;
c14 = undefined ;
addKeyedListener = undefined ;
2026-08-24 06:08:38 +00:00
closure _16 = undefined ;
closure _17 = undefined ;
closure _18 = undefined ;
closure _19 = undefined ;
closure _20 = undefined ;
closure _21 = undefined ;
2026-08-06 08:05:19 +00:00
let eventEmitter ;
let addOptionsGetter ;
let getCurrentOptions ;
let memo ;
2026-08-24 06:08:38 +00:00
closure _26 = undefined ;
closure _27 = undefined ;
closure _28 = undefined ;
closure _29 = undefined ;
closure _30 = undefined ;
closure _31 = undefined ;
closure _32 = undefined ;
closure _33 = undefined ;
2026-08-06 08:05:19 +00:00
let callback2 ;
2026-08-24 06:08:38 +00:00
closure _35 = undefined ;
closure _36 = undefined ;
closure _37 = undefined ;
2026-08-06 08:05:19 +00:00
let obj = setState ;
( { theme , children } = onReady ) ;
const context = setState . useContext ( require ( onReady [ 3 ] ) . NavigationStateContext ) ;
2026-08-24 06:08:38 +00:00
obj1 = require ( onReady [ 4 ] ) ;
2026-08-06 08:05:19 +00:00
if ( ! context . isDefault ) {
if ( ! obj1 . useNavigationIndependentTree ( ) ) {
const _Error = Error ;
2026-08-24 06:08:38 +00:00
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, wrap the container in 'NavigationIndependentTree' explicitly. Note that this will make the child navigators disconnected from the parent and you won't be able to navigate between them." ) ;
2026-08-06 08:05:19 +00:00
throw error ;
}
}
let tmpResult = tmp ( tmp2 [ 5 ] ) ;
const syncState = tmpResult . useSyncState ( ( ) => {
let tmp2 ;
if ( null != closure _0 ) {
tmp2 = closure _0 ;
}
if ( typeof flushUpdates !== "function" ) {
HermesBuiltin . throwTypeError ( ) ;
}
let tmp3 ;
if ( undefined !== tmp2 ) {
( { key , routeNames } = tmp2 ) ;
let obj = { } ;
let merged = Object . assign ( getState ( tmp2 , state ) ) ;
obj . stale = true ;
let routes = tmp2 . routes ;
obj . routes = routes . map ( ( state ) => {
let tmp = state ;
if ( undefined !== state . state ) {
let obj = { } ;
const merged = Object . assign ( state ) ;
state = state . state ;
if ( typeof closure _7 !== "function" ) {
HermesBuiltin . throwTypeError ( ) ;
}
let tmp2 ;
if ( undefined !== state ) {
( { key , routeNames } = state ) ;
obj = { } ;
const merged1 = Object . assign ( callback ( state , closure _3 ) ) ;
obj . stale = true ;
const routes = state . routes ;
obj . routes = routes . map ( ( state ) => {
let tmp = state ;
if ( undefined !== state . state ) {
let obj = { } ;
const merged = Object . assign ( state ) ;
state = state . state ;
if ( typeof closure _7 !== "function" ) {
HermesBuiltin . throwTypeError ( ) ;
}
let tmp2 ;
if ( undefined !== state ) {
( { key , routeNames } = state ) ;
obj = { } ;
const merged1 = Object . assign ( callback ( state , closure _3 ) ) ;
obj . stale = true ;
const routes = state . routes ;
obj . routes = routes . map ( ( state ) => {
let tmp = state ;
if ( undefined !== state . state ) {
let obj = { } ;
const merged = Object . assign ( state ) ;
state = state . state ;
if ( typeof closure _7 !== "function" ) {
HermesBuiltin . throwTypeError ( ) ;
}
let tmp2 ;
if ( undefined !== state ) {
( { key , routeNames } = state ) ;
obj = { } ;
const merged1 = Object . assign ( callback ( state , closure _3 ) ) ;
obj . stale = true ;
const routes = state . routes ;
obj . routes = routes . map ( ( ) => { ... } ) ;
tmp2 = obj ;
}
obj . state = tmp2 ;
tmp = obj ;
}
return tmp ;
} ) ;
tmp2 = obj ;
}
obj . state = tmp2 ;
tmp = obj ;
}
return tmp ;
} ) ;
tmp2 = obj ;
}
obj . state = tmp2 ;
tmp = obj ;
}
return tmp ;
} ) ;
tmp3 = obj ;
}
return tmp3 ;
} ) ;
state = syncState . state ;
getState = syncState . getState ;
setState = syncState . setState ;
scheduleUpdate = syncState . scheduleUpdate ;
flushUpdates = syncState . flushUpdates ;
tmpResult = tmp ( tmp2 [ 6 ] ) ;
const lazyValue = tmpResult . useLazyValue ( ( ) => {
const weakMap = new WeakMap ( ) ;
return weakMap ;
} ) ;
closure _8 = obj . useRef ( true ) ;
closure _9 = obj . useRef ( undefined ) ;
callback = obj . useCallback ( ( ) => ref2 . current , [ ] ) ;
callback1 = obj . useCallback ( ( current ) => {
closure _9 . current = current ;
} , [ ] ) ;
const childListeners = require ( onReady [ 7 ] ) . useChildListeners ( ) ;
( { listeners : c12 , addListener } = childListeners ) ;
const tmpResult1 = require ( onReady [ 7 ] ) ;
const keyedChildListeners = require ( onReady [ 8 ] ) . useKeyedChildListeners ( ) ;
( { keyedListeners : c14 , addKeyedListener } = keyedChildListeners ) ;
const tmp15 = onStateChange ( onReady [ 9 ] ) ( ( arg0 ) => {
2026-08-24 06:08:38 +00:00
closure _0 = arg0 ;
2026-08-06 08:05:19 +00:00
if ( null == _undefined . focus [ 0 ] ) {
const _console = console ;
2026-08-24 06:08:38 +00:00
console . error ( closure _1 _0 ( onReady [ 10 ] ) . NOT _INITIALIZED _ERROR ) ;
2026-08-06 08:05:19 +00:00
} else {
const focus = tmp . focus ;
focus [ 0 ] ( ( dispatch ) => dispatch . dispatch ( closure _0 ) ) ;
}
} ) ;
2026-08-24 06:08:38 +00:00
closure _16 = tmp15 ;
2026-08-06 08:05:19 +00:00
const tmp16 = onStateChange ( onReady [ 9 ] ) ( ( ) => {
if ( null == _undefined . focus [ 0 ] ) {
return false ;
} else {
const focus = tmp . focus ;
const tmp2 = focus [ 0 ] ( ( canGoBack ) => canGoBack . canGoBack ( ) ) ;
return tmp2 . handled && tmp2 . result ;
}
} ) ;
2026-08-24 06:08:38 +00:00
closure _17 = tmp16 ;
2026-08-06 08:05:19 +00:00
const tmp17 = onStateChange ( onReady [ 9 ] ) ( ( key ) => {
2026-08-24 06:08:38 +00:00
closure _0 = key ;
2026-08-06 08:05:19 +00:00
key = undefined ;
if ( key != null ) {
key = key . key ;
}
if ( key == null ) {
2026-08-24 06:08:38 +00:00
getState = _undefined2 . getState ;
2026-08-06 08:05:19 +00:00
const root = getState . root ;
let key1 ;
if ( root != null ) {
key1 = root ( ) . key ;
}
key = key1 ;
}
if ( null == key ) {
const _console = console ;
2026-08-24 06:08:38 +00:00
console . error ( closure _1 _0 ( onReady [ 10 ] ) . NOT _INITIALIZED _ERROR ) ;
2026-08-06 08:05:19 +00:00
} else {
const focus = _undefined . focus ;
focus [ 0 ] ( ( dispatch ) => {
const obj = { } ;
2026-08-24 06:08:38 +00:00
const CommonActions = key ( closure _1 _2 [ 11 ] ) . CommonActions ;
2026-08-06 08:05:19 +00:00
const merged = Object . assign ( CommonActions . reset ( key ) ) ;
obj . target = key ;
return dispatch . dispatch ( obj ) ;
} ) ;
}
} ) ;
2026-08-24 06:08:38 +00:00
closure _18 = tmp17 ;
2026-08-06 08:05:19 +00:00
const tmp18 = onStateChange ( onReady [ 9 ] ) ( ( ) => {
2026-08-24 06:08:38 +00:00
getState = _undefined2 . getState ;
2026-08-06 08:05:19 +00:00
const root = getState . root ;
let rootResult ;
if ( root != null ) {
rootResult = root ( ) ;
}
return rootResult ;
} ) ;
2026-08-24 06:08:38 +00:00
closure _19 = tmp18 ;
2026-08-06 08:05:19 +00:00
const tmp19 = onStateChange ( onReady [ 9 ] ) ( ( ) => {
2026-08-24 06:08:38 +00:00
const tmp = callback ( ) ;
2026-08-06 08:05:19 +00:00
if ( null != tmp ) {
2026-08-24 06:08:38 +00:00
return closure _1 _0 ( onReady [ 12 ] ) . findFocusedRoute ( tmp ) ;
2026-08-06 08:05:19 +00:00
}
} ) ;
2026-08-24 06:08:38 +00:00
closure _20 = tmp19 ;
2026-08-06 08:05:19 +00:00
const tmp20 = onStateChange ( onReady [ 9 ] ) ( ( ) => null != _undefined . focus [ 0 ] ) ;
2026-08-24 06:08:38 +00:00
closure _21 = tmp20 ;
2026-08-06 08:05:19 +00:00
const tmpResult2 = require ( onReady [ 8 ] ) ;
eventEmitter = require ( onReady [ 13 ] ) . useEventEmitter ( ) ;
const tmpResult3 = require ( onReady [ 13 ] ) ;
const optionsGetters = require ( onReady [ 14 ] ) . useOptionsGetters ( { } ) ;
addOptionsGetter = optionsGetters . addOptionsGetter ;
getCurrentOptions = optionsGetters . getCurrentOptions ;
let items = [ tmp16 , tmp15 , eventEmitter , getCurrentOptions , tmp19 , tmp18 , getState , tmp20 , tmp17 ] ;
memo = obj . useMemo ( ( ) => {
const obj = { } ;
2026-08-24 06:08:38 +00:00
const keys = Object . keys ( closure _1 _0 ( onReady [ 11 ] ) . CommonActions ) ;
2026-08-06 08:05:19 +00:00
const merged = Object . assign ( keys . reduce ( ( arg0 , arg1 ) => {
2026-08-24 06:08:38 +00:00
closure _0 = arg1 ;
2026-08-06 08:05:19 +00:00
arg0 [ arg1 ] = ( ) => {
const items = [ ... arguments ] ;
2026-08-24 06:08:38 +00:00
const CommonActions = closure _2 _0 ( closure _2 _2 [ 11 ] ) . CommonActions ;
2026-08-06 08:05:19 +00:00
const items1 = [ ... items ] ;
2026-08-24 06:08:38 +00:00
return closure _1 _16 ( CommonActions [ closure _0 ] . apply ( items1 ) ) ;
2026-08-06 08:05:19 +00:00
} ;
return arg0 ;
} , { } ) ) ;
const merged1 = Object . assign ( eventEmitter . create ( "root" ) ) ;
2026-08-24 06:08:38 +00:00
obj . dispatch = closure _16 ;
obj . resetRoot = closure _18 ;
2026-08-06 08:05:19 +00:00
obj . isFocused = function isFocused ( ) {
return true ;
} ;
2026-08-24 06:08:38 +00:00
obj . canGoBack = closure _17 ;
2026-08-06 08:05:19 +00:00
obj . getParent = function getParent ( ) {
} ;
obj . getState = getState ;
2026-08-24 06:08:38 +00:00
obj . getRootState = closure _19 ;
obj . getCurrentRoute = closure _20 ;
2026-08-06 08:05:19 +00:00
obj . getCurrentOptions = getCurrentOptions ;
2026-08-24 06:08:38 +00:00
obj . isReady = closure _21 ;
2026-08-06 08:05:19 +00:00
obj . setOptions = function setOptions ( ) {
2026-08-24 06:08:38 +00:00
error = new Error ( "Cannot call setOptions outside a screen" ) ;
2026-08-06 08:05:19 +00:00
throw error ;
} ;
return obj ;
} , items ) ;
let items1 = [ memo ] ;
const imperativeHandle = obj . useImperativeHandle ( ref , ( ) => memo , items1 ) ;
const tmp25 = onStateChange ( onReady [ 9 ] ) ( ( action , noop ) => {
eventEmitter . emit ( { type : "__unsafe_action__" , data : { action , noop , stack : ref4 . current } } ) ;
} ) ;
2026-08-24 06:08:38 +00:00
closure _26 = tmp25 ;
2026-08-06 08:05:19 +00:00
const tmp26 = onStateChange ( onReady [ 9 ] ) ( ( data ) => {
eventEmitter . emit ( { type : "__unsafe_event__" , data } ) ;
} ) ;
2026-08-24 06:08:38 +00:00
closure _27 = tmp26 ;
2026-08-06 08:05:19 +00:00
closure _28 = obj . useRef ( undefined ) ;
const tmp27 = onStateChange ( onReady [ 9 ] ) ( ( current ) => {
if ( ref3 . current !== current ) {
ref3 . current = current ;
let obj = { type : "options" , data : null } ;
obj = { options : null } ;
obj [ 0 ] = current ;
obj [ 1 ] = obj ;
eventEmitter . emit ( obj ) ;
}
} ) ;
2026-08-24 06:08:38 +00:00
closure _29 = tmp27 ;
2026-08-06 08:05:19 +00:00
closure _30 = obj . useRef ( undefined ) ;
closure _31 = obj . useRef ( undefined ) ;
const tmp28 = onStateChange ( onReady [ 9 ] ) ( ( ) => {
const current = ref . current ;
let tmp = ! current ;
if ( ! current ) {
tmp = ref5 . current === getState ( ) ;
}
return tmp ;
} ) ;
2026-08-24 06:08:38 +00:00
closure _32 = tmp28 ;
2026-08-06 08:05:19 +00:00
const items2 = [ addListener , addKeyedListener , tmp25 , tmp26 , tmp27 , tmp28 , scheduleUpdate , flushUpdates ] ;
2026-08-24 06:08:38 +00:00
const memo1 = obj . useMemo ( ( ) => ( { addListener , addKeyedListener , onDispatchAction : closure _26 , onEmitEvent : closure _27 , onOptionsChange : closure _29 , getIsStateEmitted : closure _32 , scheduleUpdate , flushUpdates , stackRef : closure _30 } ) , items2 ) ;
2026-08-06 08:05:19 +00:00
closure _33 = obj . useRef ( true ) ;
callback2 = obj . useCallback ( ( ) => ref6 . current , [ ] ) ;
const items3 = [ state , getState , setState , callback , callback1 , callback2 , addOptionsGetter ] ;
const memo2 = obj . useMemo ( ( ) => ( { state , getState , setState , getKey : callback , setKey : callback1 , getIsInitial : callback2 , addOptionsGetter } ) , items3 ) ;
closure _35 = obj . useRef ( onReady ) ;
closure _36 = obj . useRef ( onStateChange ) ;
const effect = obj . useEffect ( ( ) => {
closure _33 . current = false ;
closure _36 . current = onStateChange ;
closure _35 . current = onReady ;
} ) ;
closure _37 = obj . useRef ( false ) ;
const items4 = [ state , tmp20 , eventEmitter ] ;
const effect1 = obj . useEffect ( ( ) => {
const current = ref9 . current ;
let tmp2 = ! current ;
if ( ! current ) {
2026-08-24 06:08:38 +00:00
tmp2 = callback2 ( ) ;
2026-08-06 08:05:19 +00:00
}
if ( tmp2 ) {
ref9 . current = true ;
const current2 = ref7 . current ;
if ( current2 != null ) {
current2 ( ) ;
}
eventEmitter . emit ( { type : "ready" } ) ;
}
} , items4 ) ;
const items5 = [ tmp18 , eventEmitter , state ] ;
const effect2 = obj . useEffect ( ( ) => {
closure _31 . current = state ;
eventEmitter . emit ( { type : "state" , data : { state } } ) ;
const current = ref . current ;
let current2 = ! current ;
if ( ! current ) {
current2 = ref8 . current ;
}
if ( current2 ) {
ref8 . current ( tmp ) ;
}
ref . current = false ;
} , items5 ) ;
const tmpResult4 = require ( onReady [ 14 ] ) ;
obj = { value : memo , children : null } ;
obj = { value : memo1 , children : null } ;
obj1 = { value : memo2 , children : null } ;
const obj2 = { value : lazyValue , children : null } ;
if ( onUnhandledAction == null ) {
onUnhandledAction = tmp35 ;
}
const obj3 = { value : false , children : null } ;
const obj4 = { value : onUnhandledAction , children : null } ;
const obj5 = { value : navigationInChildEnabled , children : null } ;
2026-08-24 06:08:38 +00:00
tmp35 = onStateChange ( onReady [ 9 ] ) ( ( arg0 ) => {
} ) ;
obj5 [ 1 ] = scheduleUpdate ( require ( onReady [ 21 ] ) . EnsureSingleNavigator , { children : scheduleUpdate ( require ( onReady [ 22 ] ) . ThemeProvider , { value : theme , children } ) } ) ;
2026-08-06 08:05:19 +00:00
obj4 [ 1 ] = scheduleUpdate ( require ( onReady [ 20 ] ) . DeprecatedNavigationInChildContext . Provider , obj5 ) ;
obj2 [ 1 ] = scheduleUpdate ( require ( onReady [ 19 ] ) . UnhandledActionContext . Provider , obj4 ) ;
obj1 [ 1 ] = scheduleUpdate ( require ( onReady [ 18 ] ) . ConsumedParamsContext . Provider , obj2 ) ;
obj [ 1 ] = scheduleUpdate ( require ( onReady [ 3 ] ) . NavigationStateContext . Provider , obj1 ) ;
obj [ 1 ] = scheduleUpdate ( require ( onReady [ 17 ] ) . NavigationBuilderContext . Provider , obj ) ;
obj3 [ 1 ] = scheduleUpdate ( require ( onReady [ 16 ] ) . NavigationContainerRefContext . Provider , obj ) ;
return scheduleUpdate ( require ( onReady [ 15 ] ) . NavigationIndependentTreeContext . Provider , obj3 ) ;
} ) ;