mirror of
https://github.com/pezkuwichain/pezkuwi-mobile-app.git
synced 2026-05-30 15:41:01 +00:00
1 line
14 KiB
Plaintext
1 line
14 KiB
Plaintext
{"dependencies":[{"name":"@react-navigation/core","data":{"asyncType":null,"isESMImport":true,"locs":[{"start":{"line":3,"column":0,"index":15},"end":{"line":3,"column":196,"index":211}}],"key":"Wm75LgE4xYscVWo0KoLFlflJQCo=","exportNames":["*"],"imports":1}},{"name":"react","data":{"asyncType":null,"isESMImport":true,"locs":[{"start":{"line":4,"column":0,"index":212},"end":{"line":4,"column":31,"index":243}}],"key":"RtGiGa+/H7VrI7GDQDLhO1UbpU8=","exportNames":["*"],"imports":1}},{"name":"./LinkingContext.js","data":{"asyncType":null,"isESMImport":true,"locs":[{"start":{"line":5,"column":0,"index":244},"end":{"line":5,"column":53,"index":297}}],"key":"r/0Yvi+HouDAqn4vN4m4I6AMfEI=","exportNames":["*"],"imports":1}}],"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 function _interopNamespace(e) {\n if (e && e.__esModule) return e;\n var n = {};\n if (e) Object.keys(e).forEach(function (k) {\n var d = Object.getOwnPropertyDescriptor(e, k);\n Object.defineProperty(n, k, d.get ? d : {\n enumerable: true,\n get: function () {\n return e[k];\n }\n });\n });\n n.default = e;\n return n;\n }\n exports.useLinkBuilder = useLinkBuilder;\n var _reactNavigationCore = require(_dependencyMap[0], \"@react-navigation/core\");\n var _react = require(_dependencyMap[1], \"react\");\n var React = _interopNamespace(_react);\n var _LinkingContextJs = require(_dependencyMap[2], \"./LinkingContext.js\");\n /**\n * Helpers to build href or action based on the linking options.\n *\n * @returns `buildHref` to build an `href` for screen and `buildAction` to build an action from an `href`.\n */\n function useLinkBuilder() {\n const navigation = React.useContext(_reactNavigationCore.NavigationHelpersContext);\n const route = React.useContext(_reactNavigationCore.NavigationRouteContext);\n const {\n options\n } = React.useContext(_LinkingContextJs.LinkingContext);\n const focusedRouteState = (0, _reactNavigationCore.useStateForPath)();\n const getPathFromStateHelper = options?.getPathFromState ?? _reactNavigationCore.getPathFromState;\n const getStateFromPathHelper = options?.getStateFromPath ?? _reactNavigationCore.getStateFromPath;\n const getActionFromStateHelper = options?.getActionFromState ?? _reactNavigationCore.getActionFromState;\n const buildHref = React.useCallback((name, params) => {\n if (options?.enabled === false) {\n return undefined;\n }\n\n // Check that we're inside:\n // - navigator's context\n // - route context of the navigator (could be a screen, tab, etc.)\n // - route matches the state for path (from the screen's context)\n // This ensures that we're inside a screen\n const isScreen = navigation && route?.key && focusedRouteState ? route.key === (0, _reactNavigationCore.findFocusedRoute)(focusedRouteState)?.key && navigation.getState().routes.some(r => r.key === route.key) : false;\n const stateForRoute = {\n routes: [{\n name,\n params\n }]\n };\n const constructState = state => {\n if (state) {\n const route = state.routes[0];\n\n // If we're inside a screen and at the innermost route\n // We need to replace the state with the provided one\n // This assumes that we're navigating to a sibling route\n if (isScreen && !route.state) {\n return stateForRoute;\n }\n\n // Otherwise, dive into the nested state of the route\n return {\n routes: [Object.assign({}, route, {\n state: constructState(route.state)\n })]\n };\n }\n\n // Once there is no more nested state, we're at the innermost route\n // We can add a state based on provided parameters\n // This assumes that we're navigating to a child of this route\n // In this case, the helper is used in a navigator for its routes\n return stateForRoute;\n };\n const state = constructState(focusedRouteState);\n const path = getPathFromStateHelper(state, options?.config);\n return path;\n }, [options?.enabled, options?.config, route?.key, navigation, focusedRouteState, getPathFromStateHelper]);\n const buildAction = React.useCallback(href => {\n if (!href.startsWith('/')) {\n throw new Error(`The href must start with '/' (${href}).`);\n }\n const state = getStateFromPathHelper(href, options?.config);\n if (state) {\n const action = getActionFromStateHelper(state, options?.config);\n return action ?? _reactNavigationCore.CommonActions.reset(state);\n } else {\n throw new Error('Failed to parse the href to a navigation state.');\n }\n }, [options?.config, getStateFromPathHelper, getActionFromStateHelper]);\n return {\n buildHref,\n buildAction\n };\n }\n});","lineCount":105,"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],[7,11,1,13,"_interopNamespace"],[7,29,1,13,"e"],[7,30,1,13],[8,4,1,13],[8,8,1,13,"e"],[8,9,1,13],[8,13,1,13,"e"],[8,14,1,13],[8,15,1,13,"__esModule"],[8,25,1,13],[8,34,1,13,"e"],[8,35,1,13],[9,4,1,13],[9,8,1,13,"n"],[9,9,1,13],[10,4,1,13],[10,8,1,13,"e"],[10,9,1,13],[10,11,1,13,"Object"],[10,17,1,13],[10,18,1,13,"keys"],[10,22,1,13],[10,23,1,13,"e"],[10,24,1,13],[10,26,1,13,"forEach"],[10,33,1,13],[10,44,1,13,"k"],[10,45,1,13],[11,6,1,13],[11,10,1,13,"d"],[11,11,1,13],[11,14,1,13,"Object"],[11,20,1,13],[11,21,1,13,"getOwnPropertyDescriptor"],[11,45,1,13],[11,46,1,13,"e"],[11,47,1,13],[11,49,1,13,"k"],[11,50,1,13],[12,6,1,13,"Object"],[12,12,1,13],[12,13,1,13,"defineProperty"],[12,27,1,13],[12,28,1,13,"n"],[12,29,1,13],[12,31,1,13,"k"],[12,32,1,13],[12,34,1,13,"d"],[12,35,1,13],[12,36,1,13,"get"],[12,39,1,13],[12,42,1,13,"d"],[12,43,1,13],[13,8,1,13,"enumerable"],[13,18,1,13],[14,8,1,13,"get"],[14,11,1,13],[14,22,1,13,"get"],[14,23,1,13],[15,10,1,13],[15,17,1,13,"e"],[15,18,1,13],[15,19,1,13,"k"],[15,20,1,13],[16,8,1,13],[17,6,1,13],[18,4,1,13],[19,4,1,13,"n"],[19,5,1,13],[19,6,1,13,"default"],[19,13,1,13],[19,16,1,13,"e"],[19,17,1,13],[20,4,1,13],[20,11,1,13,"n"],[20,12,1,13],[21,2,1,13],[22,2,11,0,"exports"],[22,9,11,0],[22,10,11,0,"useLinkBuilder"],[22,24,11,0],[22,27,11,0,"useLinkBuilder"],[22,41,11,0],[23,2,3,0],[23,6,3,0,"_reactNavigationCore"],[23,26,3,0],[23,29,3,0,"require"],[23,36,3,0],[23,37,3,0,"_dependencyMap"],[23,51,3,0],[24,2,4,0],[24,6,4,0,"_react"],[24,12,4,0],[24,15,4,0,"require"],[24,22,4,0],[24,23,4,0,"_dependencyMap"],[24,37,4,0],[25,2,4,0],[25,6,4,0,"React"],[25,11,4,0],[25,14,4,0,"_interopNamespace"],[25,31,4,0],[25,32,4,0,"_react"],[25,38,4,0],[26,2,5,0],[26,6,5,0,"_LinkingContextJs"],[26,23,5,0],[26,26,5,0,"require"],[26,33,5,0],[26,34,5,0,"_dependencyMap"],[26,48,5,0],[27,2,6,0],[28,0,7,0],[29,0,8,0],[30,0,9,0],[31,0,10,0],[32,2,11,7],[32,11,11,16,"useLinkBuilder"],[32,25,11,30,"useLinkBuilder"],[32,26,11,30],[32,28,11,33],[33,4,12,2],[33,10,12,8,"navigation"],[33,20,12,18],[33,23,12,21,"React"],[33,28,12,26],[33,29,12,27,"useContext"],[33,39,12,37],[33,40,12,38,"NavigationHelpersContext"],[33,60,12,62],[33,61,12,62,"NavigationHelpersContext"],[33,85,12,62],[33,86,12,63],[34,4,13,2],[34,10,13,8,"route"],[34,15,13,13],[34,18,13,16,"React"],[34,23,13,21],[34,24,13,22,"useContext"],[34,34,13,32],[34,35,13,33,"NavigationRouteContext"],[34,55,13,55],[34,56,13,55,"NavigationRouteContext"],[34,78,13,55],[34,79,13,56],[35,4,14,2],[35,10,14,8],[36,6,15,4,"options"],[37,4,16,2],[37,5,16,3],[37,8,16,6,"React"],[37,13,16,11],[37,14,16,12,"useContext"],[37,24,16,22],[37,25,16,23,"LinkingContext"],[37,42,16,37],[37,43,16,37,"LinkingContext"],[37,57,16,37],[37,58,16,38],[38,4,17,2],[38,10,17,8,"focusedRouteState"],[38,27,17,25],[38,30,17,28],[38,34,17,28,"useStateForPath"],[38,54,17,43],[38,55,17,43,"useStateForPath"],[38,70,17,43],[38,72,17,44],[38,73,17,45],[39,4,18,2],[39,10,18,8,"getPathFromStateHelper"],[39,32,18,30],[39,35,18,33,"options"],[39,42,18,40],[39,44,18,42,"getPathFromState"],[39,60,18,58],[39,64,18,62,"getPathFromState"],[39,84,18,78],[39,85,18,78,"getPathFromState"],[39,101,18,78],[40,4,19,2],[40,10,19,8,"getStateFromPathHelper"],[40,32,19,30],[40,35,19,33,"options"],[40,42,19,40],[40,44,19,42,"getStateFromPath"],[40,60,19,58],[40,64,19,62,"getStateFromPath"],[40,84,19,78],[40,85,19,78,"getStateFromPath"],[40,101,19,78],[41,4,20,2],[41,10,20,8,"getActionFromStateHelper"],[41,34,20,32],[41,37,20,35,"options"],[41,44,20,42],[41,46,20,44,"getActionFromState"],[41,64,20,62],[41,68,20,66,"getActionFromState"],[41,88,20,84],[41,89,20,84,"getActionFromState"],[41,107,20,84],[42,4,21,2],[42,10,21,8,"buildHref"],[42,19,21,17],[42,22,21,20,"React"],[42,27,21,25],[42,28,21,26,"useCallback"],[42,39,21,37],[42,40,21,38],[42,41,21,39,"name"],[42,45,21,43],[42,47,21,45,"params"],[42,53,21,51],[42,58,21,56],[43,6,22,4],[43,10,22,8,"options"],[43,17,22,15],[43,19,22,17,"enabled"],[43,26,22,24],[43,31,22,29],[43,36,22,34],[43,38,22,36],[44,8,23,6],[44,15,23,13,"undefined"],[44,24,23,22],[45,6,24,4],[47,6,26,4],[48,6,27,4],[49,6,28,4],[50,6,29,4],[51,6,30,4],[52,6,31,4],[52,12,31,10,"isScreen"],[52,20,31,18],[52,23,31,21,"navigation"],[52,33,31,31],[52,37,31,35,"route"],[52,42,31,40],[52,44,31,42,"key"],[52,47,31,45],[52,51,31,49,"focusedRouteState"],[52,68,31,66],[52,71,31,69,"route"],[52,76,31,74],[52,77,31,75,"key"],[52,80,31,78],[52,85,31,83],[52,89,31,83,"findFocusedRoute"],[52,109,31,99],[52,110,31,99,"findFocusedRoute"],[52,126,31,99],[52,128,31,100,"focusedRouteState"],[52,145,31,117],[52,146,31,118],[52,148,31,120,"key"],[52,151,31,123],[52,155,31,127,"navigation"],[52,165,31,137],[52,166,31,138,"getState"],[52,174,31,146],[52,175,31,147],[52,176,31,148],[52,177,31,149,"routes"],[52,183,31,155],[52,184,31,156,"some"],[52,188,31,160],[52,189,31,161,"r"],[52,190,31,162],[52,194,31,166,"r"],[52,195,31,167],[52,196,31,168,"key"],[52,199,31,171],[52,204,31,176,"route"],[52,209,31,181],[52,210,31,182,"key"],[52,213,31,185],[52,214,31,186],[52,217,31,189],[52,222,31,194],[53,6,32,4],[53,12,32,10,"stateForRoute"],[53,25,32,23],[53,28,32,26],[54,8,33,6,"routes"],[54,14,33,12],[54,16,33,14],[54,17,33,15],[55,10,34,8,"name"],[55,14,34,12],[56,10,35,8,"params"],[57,8,36,6],[57,9,36,7],[58,6,37,4],[58,7,37,5],[59,6,38,4],[59,12,38,10,"constructState"],[59,26,38,24],[59,29,38,27,"state"],[59,34,38,32],[59,38,38,36],[60,8,39,6],[60,12,39,10,"state"],[60,17,39,15],[60,19,39,17],[61,10,40,8],[61,16,40,14,"route"],[61,21,40,19],[61,24,40,22,"state"],[61,29,40,27],[61,30,40,28,"routes"],[61,36,40,34],[61,37,40,35],[61,38,40,36],[61,39,40,37],[63,10,42,8],[64,10,43,8],[65,10,44,8],[66,10,45,8],[66,14,45,12,"isScreen"],[66,22,45,20],[66,26,45,24],[66,27,45,25,"route"],[66,32,45,30],[66,33,45,31,"state"],[66,38,45,36],[66,40,45,38],[67,12,46,10],[67,19,46,17,"stateForRoute"],[67,32,46,30],[68,10,47,8],[70,10,49,8],[71,10,50,8],[71,17,50,15],[72,12,51,10,"routes"],[72,18,51,16],[72,20,51,18],[72,21,51,18,"Object"],[72,27,51,18],[72,28,51,18,"assign"],[72,34,51,18],[72,39,52,15,"route"],[72,44,52,20],[73,14,53,12,"state"],[73,19,53,17],[73,21,53,19,"constructState"],[73,35,53,33],[73,36,53,34,"route"],[73,41,53,39],[73,42,53,40,"state"],[73,47,53,45],[74,12,53,46],[75,10,55,8],[75,11,55,9],[76,8,56,6],[78,8,58,6],[79,8,59,6],[80,8,60,6],[81,8,61,6],[82,8,62,6],[82,15,62,13,"stateForRoute"],[82,28,62,26],[83,6,63,4],[83,7,63,5],[84,6,64,4],[84,12,64,10,"state"],[84,17,64,15],[84,20,64,18,"constructState"],[84,34,64,32],[84,35,64,33,"focusedRouteState"],[84,52,64,50],[84,53,64,51],[85,6,65,4],[85,12,65,10,"path"],[85,16,65,14],[85,19,65,17,"getPathFromStateHelper"],[85,41,65,39],[85,42,65,40,"state"],[85,47,65,45],[85,49,65,47,"options"],[85,56,65,54],[85,58,65,56,"config"],[85,64,65,62],[85,65,65,63],[86,6,66,4],[86,13,66,11,"path"],[86,17,66,15],[87,4,67,2],[87,5,67,3],[87,7,67,5],[87,8,67,6,"options"],[87,15,67,13],[87,17,67,15,"enabled"],[87,24,67,22],[87,26,67,24,"options"],[87,33,67,31],[87,35,67,33,"config"],[87,41,67,39],[87,43,67,41,"route"],[87,48,67,46],[87,50,67,48,"key"],[87,53,67,51],[87,55,67,53,"navigation"],[87,65,67,63],[87,67,67,65,"focusedRouteState"],[87,84,67,82],[87,86,67,84,"getPathFromStateHelper"],[87,108,67,106],[87,109,67,107],[87,110,67,108],[88,4,68,2],[88,10,68,8,"buildAction"],[88,21,68,19],[88,24,68,22,"React"],[88,29,68,27],[88,30,68,28,"useCallback"],[88,41,68,39],[88,42,68,40,"href"],[88,46,68,44],[88,50,68,48],[89,6,69,4],[89,10,69,8],[89,11,69,9,"href"],[89,15,69,13],[89,16,69,14,"startsWith"],[89,26,69,24],[89,27,69,25],[89,30,69,28],[89,31,69,29],[89,33,69,31],[90,8,70,6],[90,14,70,12],[90,18,70,16,"Error"],[90,23,70,21],[90,24,70,22],[90,57,70,55,"href"],[90,61,70,59],[90,65,70,63],[90,66,70,64],[91,6,71,4],[92,6,72,4],[92,12,72,10,"state"],[92,17,72,15],[92,20,72,18,"getStateFromPathHelper"],[92,42,72,40],[92,43,72,41,"href"],[92,47,72,45],[92,49,72,47,"options"],[92,56,72,54],[92,58,72,56,"config"],[92,64,72,62],[92,65,72,63],[93,6,73,4],[93,10,73,8,"state"],[93,15,73,13],[93,17,73,15],[94,8,74,6],[94,14,74,12,"action"],[94,20,74,18],[94,23,74,21,"getActionFromStateHelper"],[94,47,74,45],[94,48,74,46,"state"],[94,53,74,51],[94,55,74,53,"options"],[94,62,74,60],[94,64,74,62,"config"],[94,70,74,68],[94,71,74,69],[95,8,75,6],[95,15,75,13,"action"],[95,21,75,19],[95,25,75,23,"CommonActions"],[95,45,75,36],[95,46,75,36,"CommonActions"],[95,59,75,36],[95,60,75,37,"reset"],[95,65,75,42],[95,66,75,43,"state"],[95,71,75,48],[95,72,75,49],[96,6,76,4],[96,7,76,5],[96,13,76,11],[97,8,77,6],[97,14,77,12],[97,18,77,16,"Error"],[97,23,77,21],[97,24,77,22],[97,73,77,71],[97,74,77,72],[98,6,78,4],[99,4,79,2],[99,5,79,3],[99,7,79,5],[99,8,79,6,"options"],[99,15,79,13],[99,17,79,15,"config"],[99,23,79,21],[99,25,79,23,"getStateFromPathHelper"],[99,47,79,45],[99,49,79,47,"getActionFromStateHelper"],[99,73,79,71],[99,74,79,72],[99,75,79,73],[100,4,80,2],[100,11,80,9],[101,6,81,4,"buildHref"],[101,15,81,13],[102,6,82,4,"buildAction"],[103,4,83,2],[103,5,83,3],[104,2,84,0],[105,0,84,1],[105,3]],"functionMap":{"names":["<global>","useLinkBuilder","buildHref","navigation.getState.routes.some$argument_0","constructState","buildAction"],"mappings":"AAA;OCU;sCCU;iKCU,wBD;2BEO;KFyB;GDI;wCIC;GJW;CDK"},"hasCjsExports":false},"type":"js/module"}]} |