mirror of
https://github.com/pezkuwichain/pezkuwi-mobile-app.git
synced 2026-05-30 20:21:01 +00:00
1 line
17 KiB
Plaintext
1 line
17 KiB
Plaintext
{"dependencies":[{"name":"react","data":{"asyncType":null,"isESMImport":true,"locs":[{"start":{"line":3,"column":0,"index":15},"end":{"line":3,"column":31,"index":46}}],"key":"RtGiGa+/H7VrI7GDQDLhO1UbpU8=","exportNames":["*"]}},{"name":"./DeprecatedNavigationInChildContext.js","data":{"asyncType":null,"isESMImport":true,"locs":[{"start":{"line":4,"column":0,"index":47},"end":{"line":4,"column":93,"index":140}}],"key":"q52xm1L6GcwAHIDdgCYRmHsHIPQ=","exportNames":["*"]}},{"name":"./NavigationBuilderContext.js","data":{"asyncType":null,"isESMImport":true,"locs":[{"start":{"line":5,"column":0,"index":141},"end":{"line":5,"column":73,"index":214}}],"key":"vvb+tbs8cGp9hlTxgL5PZCjRz5E=","exportNames":["*"]}},{"name":"./useOnPreventRemove.js","data":{"asyncType":null,"isESMImport":true,"locs":[{"start":{"line":6,"column":0,"index":215},"end":{"line":6,"column":82,"index":297}}],"key":"PbhCaGdR39Jz0OkkS237FN1qkxU=","exportNames":["*"]}}],"output":[{"data":{"code":"__d(function (global, require, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {\n \"use strict\";\n\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n exports.useOnAction = useOnAction;\n var React = _interopRequireWildcard(require(_dependencyMap[0], \"react\"));\n var _DeprecatedNavigationInChildContext = require(_dependencyMap[1], \"./DeprecatedNavigationInChildContext.js\");\n var _NavigationBuilderContext = require(_dependencyMap[2], \"./NavigationBuilderContext.js\");\n var _useOnPreventRemove = require(_dependencyMap[3], \"./useOnPreventRemove.js\");\n function _interopRequireWildcard(e, t) { if (\"function\" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || \"object\" != typeof e && \"function\" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) \"default\" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }\n /**\n * Hook to handle actions for a navigator, including state updates and bubbling.\n *\n * Bubbling an action is achieved in 2 ways:\n * 1. To bubble action to parent, we expose the action handler in context and then access the parent context\n * 2. To bubble action to child, child adds event listeners subscribing to actions from parent\n *\n * When the action handler handles as action, it returns `true`, otherwise `false`.\n */\n function useOnAction({\n router,\n getState,\n setState,\n key,\n actionListeners,\n beforeRemoveListeners,\n routerConfigOptions,\n emitter\n }) {\n const {\n onAction: onActionParent,\n onRouteFocus: onRouteFocusParent,\n addListener: addListenerParent,\n onDispatchAction\n } = React.useContext(_NavigationBuilderContext.NavigationBuilderContext);\n const navigationInChildEnabled = React.useContext(_DeprecatedNavigationInChildContext.DeprecatedNavigationInChildContext);\n const routerConfigOptionsRef = React.useRef(routerConfigOptions);\n React.useEffect(() => {\n routerConfigOptionsRef.current = routerConfigOptions;\n });\n const onAction = React.useCallback((action, visitedNavigators = new Set()) => {\n const state = getState();\n\n // Since actions can bubble both up and down, they could come to the same navigator again\n // We keep track of navigators which have already tried to handle the action and return if it's already visited\n if (visitedNavigators.has(state.key)) {\n return false;\n }\n visitedNavigators.add(state.key);\n if (typeof action.target !== 'string' || action.target === state.key) {\n let result = router.getStateForAction(state, action, routerConfigOptionsRef.current);\n\n // If a target is specified and set to current navigator, the action shouldn't bubble\n // So instead of `null`, we use the state object for such cases to signal that action was handled\n result = result === null && action.target === state.key ? state : result;\n if (result !== null) {\n onDispatchAction(action, state === result);\n if (state !== result) {\n const isPrevented = (0, _useOnPreventRemove.shouldPreventRemove)(emitter, beforeRemoveListeners, state.routes, result.routes, action);\n if (isPrevented) {\n return true;\n }\n setState(result);\n }\n if (onRouteFocusParent !== undefined) {\n // Some actions such as `NAVIGATE` also want to bring the navigated route to focus in the whole tree\n // This means we need to focus all of the parent navigators of this navigator as well\n const shouldFocus = router.shouldActionChangeFocus(action);\n if (shouldFocus && key !== undefined) {\n onRouteFocusParent(key);\n }\n }\n return true;\n }\n }\n if (onActionParent !== undefined) {\n // Bubble action to the parent if the current navigator didn't handle it\n if (onActionParent(action, visitedNavigators)) {\n return true;\n }\n }\n if (typeof action.target === 'string' ||\n // For backward compatibility\n action.type === 'NAVIGATE_DEPRECATED' || navigationInChildEnabled) {\n // If the action wasn't handled by current navigator or a parent navigator, let children handle it\n // Handling this when target isn't specified is deprecated and will be removed in the future\n for (let i = actionListeners.length - 1; i >= 0; i--) {\n const listener = actionListeners[i];\n if (listener(action, visitedNavigators)) {\n return true;\n }\n }\n }\n return false;\n }, [actionListeners, beforeRemoveListeners, emitter, getState, navigationInChildEnabled, key, onActionParent, onDispatchAction, onRouteFocusParent, router, setState]);\n (0, _useOnPreventRemove.useOnPreventRemove)({\n getState,\n emitter,\n beforeRemoveListeners\n });\n React.useEffect(() => addListenerParent?.('action', onAction), [addListenerParent, onAction]);\n return onAction;\n }\n});","lineCount":106,"map":[[2,2,1,0],[2,14,1,12],[4,2,1,13,"Object"],[4,8,1,13],[4,9,1,13,"defineProperty"],[4,23,1,13],[4,24,1,13,"exports"],[4,31,1,13],[5,4,1,13,"value"],[5,9,1,13],[6,2,1,13],[7,2,1,13,"exports"],[7,9,1,13],[7,10,1,13,"useOnAction"],[7,21,1,13],[7,24,1,13,"useOnAction"],[7,35,1,13],[8,2,3,0],[8,6,3,0,"React"],[8,11,3,0],[8,14,3,0,"_interopRequireWildcard"],[8,37,3,0],[8,38,3,0,"require"],[8,45,3,0],[8,46,3,0,"_dependencyMap"],[8,60,3,0],[9,2,4,0],[9,6,4,0,"_DeprecatedNavigationInChildContext"],[9,41,4,0],[9,44,4,0,"require"],[9,51,4,0],[9,52,4,0,"_dependencyMap"],[9,66,4,0],[10,2,5,0],[10,6,5,0,"_NavigationBuilderContext"],[10,31,5,0],[10,34,5,0,"require"],[10,41,5,0],[10,42,5,0,"_dependencyMap"],[10,56,5,0],[11,2,6,0],[11,6,6,0,"_useOnPreventRemove"],[11,25,6,0],[11,28,6,0,"require"],[11,35,6,0],[11,36,6,0,"_dependencyMap"],[11,50,6,0],[12,2,6,82],[12,11,6,82,"_interopRequireWildcard"],[12,35,6,82,"e"],[12,36,6,82],[12,38,6,82,"t"],[12,39,6,82],[12,68,6,82,"WeakMap"],[12,75,6,82],[12,81,6,82,"r"],[12,82,6,82],[12,89,6,82,"WeakMap"],[12,96,6,82],[12,100,6,82,"n"],[12,101,6,82],[12,108,6,82,"WeakMap"],[12,115,6,82],[12,127,6,82,"_interopRequireWildcard"],[12,150,6,82],[12,162,6,82,"_interopRequireWildcard"],[12,163,6,82,"e"],[12,164,6,82],[12,166,6,82,"t"],[12,167,6,82],[12,176,6,82,"t"],[12,177,6,82],[12,181,6,82,"e"],[12,182,6,82],[12,186,6,82,"e"],[12,187,6,82],[12,188,6,82,"__esModule"],[12,198,6,82],[12,207,6,82,"e"],[12,208,6,82],[12,214,6,82,"o"],[12,215,6,82],[12,217,6,82,"i"],[12,218,6,82],[12,220,6,82,"f"],[12,221,6,82],[12,226,6,82,"__proto__"],[12,235,6,82],[12,243,6,82,"default"],[12,250,6,82],[12,252,6,82,"e"],[12,253,6,82],[12,270,6,82,"e"],[12,271,6,82],[12,294,6,82,"e"],[12,295,6,82],[12,320,6,82,"e"],[12,321,6,82],[12,330,6,82,"f"],[12,331,6,82],[12,337,6,82,"o"],[12,338,6,82],[12,341,6,82,"t"],[12,342,6,82],[12,345,6,82,"n"],[12,346,6,82],[12,349,6,82,"r"],[12,350,6,82],[12,358,6,82,"o"],[12,359,6,82],[12,360,6,82,"has"],[12,363,6,82],[12,364,6,82,"e"],[12,365,6,82],[12,375,6,82,"o"],[12,376,6,82],[12,377,6,82,"get"],[12,380,6,82],[12,381,6,82,"e"],[12,382,6,82],[12,385,6,82,"o"],[12,386,6,82],[12,387,6,82,"set"],[12,390,6,82],[12,391,6,82,"e"],[12,392,6,82],[12,394,6,82,"f"],[12,395,6,82],[12,411,6,82,"t"],[12,412,6,82],[12,416,6,82,"e"],[12,417,6,82],[12,433,6,82,"t"],[12,434,6,82],[12,441,6,82,"hasOwnProperty"],[12,455,6,82],[12,456,6,82,"call"],[12,460,6,82],[12,461,6,82,"e"],[12,462,6,82],[12,464,6,82,"t"],[12,465,6,82],[12,472,6,82,"i"],[12,473,6,82],[12,477,6,82,"o"],[12,478,6,82],[12,481,6,82,"Object"],[12,487,6,82],[12,488,6,82,"defineProperty"],[12,502,6,82],[12,507,6,82,"Object"],[12,513,6,82],[12,514,6,82,"getOwnPropertyDescriptor"],[12,538,6,82],[12,539,6,82,"e"],[12,540,6,82],[12,542,6,82,"t"],[12,543,6,82],[12,550,6,82,"i"],[12,551,6,82],[12,552,6,82,"get"],[12,555,6,82],[12,559,6,82,"i"],[12,560,6,82],[12,561,6,82,"set"],[12,564,6,82],[12,568,6,82,"o"],[12,569,6,82],[12,570,6,82,"f"],[12,571,6,82],[12,573,6,82,"t"],[12,574,6,82],[12,576,6,82,"i"],[12,577,6,82],[12,581,6,82,"f"],[12,582,6,82],[12,583,6,82,"t"],[12,584,6,82],[12,588,6,82,"e"],[12,589,6,82],[12,590,6,82,"t"],[12,591,6,82],[12,602,6,82,"f"],[12,603,6,82],[12,608,6,82,"e"],[12,609,6,82],[12,611,6,82,"t"],[12,612,6,82],[13,2,7,0],[14,0,8,0],[15,0,9,0],[16,0,10,0],[17,0,11,0],[18,0,12,0],[19,0,13,0],[20,0,14,0],[21,0,15,0],[22,2,16,7],[22,11,16,16,"useOnAction"],[22,22,16,27,"useOnAction"],[22,23,16,28],[23,4,17,2,"router"],[23,10,17,8],[24,4,18,2,"getState"],[24,12,18,10],[25,4,19,2,"setState"],[25,12,19,10],[26,4,20,2,"key"],[26,7,20,5],[27,4,21,2,"actionListeners"],[27,19,21,17],[28,4,22,2,"beforeRemoveListeners"],[28,25,22,23],[29,4,23,2,"routerConfigOptions"],[29,23,23,21],[30,4,24,2,"emitter"],[31,2,25,0],[31,3,25,1],[31,5,25,3],[32,4,26,2],[32,10,26,8],[33,6,27,4,"onAction"],[33,14,27,12],[33,16,27,14,"onActionParent"],[33,30,27,28],[34,6,28,4,"onRouteFocus"],[34,18,28,16],[34,20,28,18,"onRouteFocusParent"],[34,38,28,36],[35,6,29,4,"addListener"],[35,17,29,15],[35,19,29,17,"addListenerParent"],[35,36,29,34],[36,6,30,4,"onDispatchAction"],[37,4,31,2],[37,5,31,3],[37,8,31,6,"React"],[37,13,31,11],[37,14,31,12,"useContext"],[37,24,31,22],[37,25,31,23,"NavigationBuilderContext"],[37,75,31,47],[37,76,31,48],[38,4,32,2],[38,10,32,8,"navigationInChildEnabled"],[38,34,32,32],[38,37,32,35,"React"],[38,42,32,40],[38,43,32,41,"useContext"],[38,53,32,51],[38,54,32,52,"DeprecatedNavigationInChildContext"],[38,124,32,86],[38,125,32,87],[39,4,33,2],[39,10,33,8,"routerConfigOptionsRef"],[39,32,33,30],[39,35,33,33,"React"],[39,40,33,38],[39,41,33,39,"useRef"],[39,47,33,45],[39,48,33,46,"routerConfigOptions"],[39,67,33,65],[39,68,33,66],[40,4,34,2,"React"],[40,9,34,7],[40,10,34,8,"useEffect"],[40,19,34,17],[40,20,34,18],[40,26,34,24],[41,6,35,4,"routerConfigOptionsRef"],[41,28,35,26],[41,29,35,27,"current"],[41,36,35,34],[41,39,35,37,"routerConfigOptions"],[41,58,35,56],[42,4,36,2],[42,5,36,3],[42,6,36,4],[43,4,37,2],[43,10,37,8,"onAction"],[43,18,37,16],[43,21,37,19,"React"],[43,26,37,24],[43,27,37,25,"useCallback"],[43,38,37,36],[43,39,37,37],[43,40,37,38,"action"],[43,46,37,44],[43,48,37,46,"visitedNavigators"],[43,65,37,63],[43,68,37,66],[43,72,37,70,"Set"],[43,75,37,73],[43,76,37,74],[43,77,37,75],[43,82,37,80],[44,6,38,4],[44,12,38,10,"state"],[44,17,38,15],[44,20,38,18,"getState"],[44,28,38,26],[44,29,38,27],[44,30,38,28],[46,6,40,4],[47,6,41,4],[48,6,42,4],[48,10,42,8,"visitedNavigators"],[48,27,42,25],[48,28,42,26,"has"],[48,31,42,29],[48,32,42,30,"state"],[48,37,42,35],[48,38,42,36,"key"],[48,41,42,39],[48,42,42,40],[48,44,42,42],[49,8,43,6],[49,15,43,13],[49,20,43,18],[50,6,44,4],[51,6,45,4,"visitedNavigators"],[51,23,45,21],[51,24,45,22,"add"],[51,27,45,25],[51,28,45,26,"state"],[51,33,45,31],[51,34,45,32,"key"],[51,37,45,35],[51,38,45,36],[52,6,46,4],[52,10,46,8],[52,17,46,15,"action"],[52,23,46,21],[52,24,46,22,"target"],[52,30,46,28],[52,35,46,33],[52,43,46,41],[52,47,46,45,"action"],[52,53,46,51],[52,54,46,52,"target"],[52,60,46,58],[52,65,46,63,"state"],[52,70,46,68],[52,71,46,69,"key"],[52,74,46,72],[52,76,46,74],[53,8,47,6],[53,12,47,10,"result"],[53,18,47,16],[53,21,47,19,"router"],[53,27,47,25],[53,28,47,26,"getStateForAction"],[53,45,47,43],[53,46,47,44,"state"],[53,51,47,49],[53,53,47,51,"action"],[53,59,47,57],[53,61,47,59,"routerConfigOptionsRef"],[53,83,47,81],[53,84,47,82,"current"],[53,91,47,89],[53,92,47,90],[55,8,49,6],[56,8,50,6],[57,8,51,6,"result"],[57,14,51,12],[57,17,51,15,"result"],[57,23,51,21],[57,28,51,26],[57,32,51,30],[57,36,51,34,"action"],[57,42,51,40],[57,43,51,41,"target"],[57,49,51,47],[57,54,51,52,"state"],[57,59,51,57],[57,60,51,58,"key"],[57,63,51,61],[57,66,51,64,"state"],[57,71,51,69],[57,74,51,72,"result"],[57,80,51,78],[58,8,52,6],[58,12,52,10,"result"],[58,18,52,16],[58,23,52,21],[58,27,52,25],[58,29,52,27],[59,10,53,8,"onDispatchAction"],[59,26,53,24],[59,27,53,25,"action"],[59,33,53,31],[59,35,53,33,"state"],[59,40,53,38],[59,45,53,43,"result"],[59,51,53,49],[59,52,53,50],[60,10,54,8],[60,14,54,12,"state"],[60,19,54,17],[60,24,54,22,"result"],[60,30,54,28],[60,32,54,30],[61,12,55,10],[61,18,55,16,"isPrevented"],[61,29,55,27],[61,32,55,30],[61,36,55,30,"shouldPreventRemove"],[61,75,55,49],[61,77,55,50,"emitter"],[61,84,55,57],[61,86,55,59,"beforeRemoveListeners"],[61,107,55,80],[61,109,55,82,"state"],[61,114,55,87],[61,115,55,88,"routes"],[61,121,55,94],[61,123,55,96,"result"],[61,129,55,102],[61,130,55,103,"routes"],[61,136,55,109],[61,138,55,111,"action"],[61,144,55,117],[61,145,55,118],[62,12,56,10],[62,16,56,14,"isPrevented"],[62,27,56,25],[62,29,56,27],[63,14,57,12],[63,21,57,19],[63,25,57,23],[64,12,58,10],[65,12,59,10,"setState"],[65,20,59,18],[65,21,59,19,"result"],[65,27,59,25],[65,28,59,26],[66,10,60,8],[67,10,61,8],[67,14,61,12,"onRouteFocusParent"],[67,32,61,30],[67,37,61,35,"undefined"],[67,46,61,44],[67,48,61,46],[68,12,62,10],[69,12,63,10],[70,12,64,10],[70,18,64,16,"shouldFocus"],[70,29,64,27],[70,32,64,30,"router"],[70,38,64,36],[70,39,64,37,"shouldActionChangeFocus"],[70,62,64,60],[70,63,64,61,"action"],[70,69,64,67],[70,70,64,68],[71,12,65,10],[71,16,65,14,"shouldFocus"],[71,27,65,25],[71,31,65,29,"key"],[71,34,65,32],[71,39,65,37,"undefined"],[71,48,65,46],[71,50,65,48],[72,14,66,12,"onRouteFocusParent"],[72,32,66,30],[72,33,66,31,"key"],[72,36,66,34],[72,37,66,35],[73,12,67,10],[74,10,68,8],[75,10,69,8],[75,17,69,15],[75,21,69,19],[76,8,70,6],[77,6,71,4],[78,6,72,4],[78,10,72,8,"onActionParent"],[78,24,72,22],[78,29,72,27,"undefined"],[78,38,72,36],[78,40,72,38],[79,8,73,6],[80,8,74,6],[80,12,74,10,"onActionParent"],[80,26,74,24],[80,27,74,25,"action"],[80,33,74,31],[80,35,74,33,"visitedNavigators"],[80,52,74,50],[80,53,74,51],[80,55,74,53],[81,10,75,8],[81,17,75,15],[81,21,75,19],[82,8,76,6],[83,6,77,4],[84,6,78,4],[84,10,78,8],[84,17,78,15,"action"],[84,23,78,21],[84,24,78,22,"target"],[84,30,78,28],[84,35,78,33],[84,43,78,41],[85,6,79,4],[86,6,80,4,"action"],[86,12,80,10],[86,13,80,11,"type"],[86,17,80,15],[86,22,80,20],[86,43,80,41],[86,47,80,45,"navigationInChildEnabled"],[86,71,80,69],[86,73,80,71],[87,8,81,6],[88,8,82,6],[89,8,83,6],[89,13,83,11],[89,17,83,15,"i"],[89,18,83,16],[89,21,83,19,"actionListeners"],[89,36,83,34],[89,37,83,35,"length"],[89,43,83,41],[89,46,83,44],[89,47,83,45],[89,49,83,47,"i"],[89,50,83,48],[89,54,83,52],[89,55,83,53],[89,57,83,55,"i"],[89,58,83,56],[89,60,83,58],[89,62,83,60],[90,10,84,8],[90,16,84,14,"listener"],[90,24,84,22],[90,27,84,25,"actionListeners"],[90,42,84,40],[90,43,84,41,"i"],[90,44,84,42],[90,45,84,43],[91,10,85,8],[91,14,85,12,"listener"],[91,22,85,20],[91,23,85,21,"action"],[91,29,85,27],[91,31,85,29,"visitedNavigators"],[91,48,85,46],[91,49,85,47],[91,51,85,49],[92,12,86,10],[92,19,86,17],[92,23,86,21],[93,10,87,8],[94,8,88,6],[95,6,89,4],[96,6,90,4],[96,13,90,11],[96,18,90,16],[97,4,91,2],[97,5,91,3],[97,7,91,5],[97,8,91,6,"actionListeners"],[97,23,91,21],[97,25,91,23,"beforeRemoveListeners"],[97,46,91,44],[97,48,91,46,"emitter"],[97,55,91,53],[97,57,91,55,"getState"],[97,65,91,63],[97,67,91,65,"navigationInChildEnabled"],[97,91,91,89],[97,93,91,91,"key"],[97,96,91,94],[97,98,91,96,"onActionParent"],[97,112,91,110],[97,114,91,112,"onDispatchAction"],[97,130,91,128],[97,132,91,130,"onRouteFocusParent"],[97,150,91,148],[97,152,91,150,"router"],[97,158,91,156],[97,160,91,158,"setState"],[97,168,91,166],[97,169,91,167],[97,170,91,168],[98,4,92,2],[98,8,92,2,"useOnPreventRemove"],[98,46,92,20],[98,48,92,21],[99,6,93,4,"getState"],[99,14,93,12],[100,6,94,4,"emitter"],[100,13,94,11],[101,6,95,4,"beforeRemoveListeners"],[102,4,96,2],[102,5,96,3],[102,6,96,4],[103,4,97,2,"React"],[103,9,97,7],[103,10,97,8,"useEffect"],[103,19,97,17],[103,20,97,18],[103,26,97,24,"addListenerParent"],[103,43,97,41],[103,46,97,44],[103,54,97,52],[103,56,97,54,"onAction"],[103,64,97,62],[103,65,97,63],[103,67,97,65],[103,68,97,66,"addListenerParent"],[103,85,97,83],[103,87,97,85,"onAction"],[103,95,97,93],[103,96,97,94],[103,97,97,95],[104,4,98,2],[104,11,98,9,"onAction"],[104,19,98,17],[105,2,99,0],[106,0,99,1],[106,3]],"functionMap":{"names":["<global>","useOnAction","React.useEffect$argument_0","onAction"],"mappings":"AAA;OCe;kBCkB;GDE;qCEC;GFsD;kBCM,6CD;CDE"}},"type":"js/module"}]} |