/* Metro module 1532; source: unknown; dependencies: [57, 65, 31, 33, 1493, 1530, 1511, 1531, 1533] */ import Module00057 from './module-00057.js'; /* Metro dependency 57 */ import Module00065 from './module-00065.js'; /* Metro dependency 65 */ import Module01511 from './module-01511.js'; /* Metro dependency 1511 */ import Module01530 from './module-01530.js'; /* Metro dependency 1530 */ import Module01533 from './module-01533.js'; /* Metro dependency 1533 */ import * as ReactModule from './module-00031-React.js'; /* Metro dependency 31 */ import * as JsxRuntimeModule from './module-00033-JsxRuntime.js'; /* Metro dependency 33 */ import * as Module01493Module from './module-01493.js'; /* Metro dependency 1493 */ function _fun17322(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#17322, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1659:6, offset: 0x00e69f5c, size: 153 bytes, params: 8, frame: 19 const env0_0 = require; const Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); exports.default = PreventRemoveProvider; function transformPreventedRoutes(a0) { // fn#17323, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1659:142, offset: 0x00e69ff5, size: 49 bytes, params: 2, frame: 13 let value = a0.values(); value = Module00065(value); return value.reduce(function(a0, {routeKey, preventRemove}) { var r3; r3 = a0[routeKey]?.preventRemove; r3 = !r3 ? preventRemove : r3; a0[routeKey] = {preventRemove: r3}; return a0; }, {}); } function PreventRemoveProvider({children}) { // fn#17325, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1659:349, offset: 0x00e6a060, size: 429 bytes, params: 2, frame: 24 const binding = setPreventRemove2; let useState = binding.useState; const value2 = Reflect.apply(useState, binding, [_fun17326]); const binding2 = env0_3; const property = binding2(value2, 1)[0]; useState = binding.useState; const Map = global.Map; const value5 = Object.create(Map.prototype, {constructor: {value: Map}}); const map = new Map(); const value8 = binding2(Reflect.apply(useState, binding, [map instanceof Object ? map : value5]), 2); const property2 = value8[0]; const env0_2 = value8[1]; var env0_3 = binding.useContext(Module01530); const value9 = binding.useContext(Module01511); const env0_4 = value9; const setPreventRemove = binding.useContext(importDefault(1531) /* metro dependency 1531 */)?.setPreventRemove; var setPreventRemove2 = setPreventRemove; const value11 = (Module01533)(_fun17327); setPreventRemove2.useEffect(_fun17331, [property, env0_4(property2.values()).some(function(a0) { return a0.preventRemove; }), value9?.key, setPreventRemove]); const value14 = setPreventRemove2.useMemo(_fun17333, [value11, property2]); const Provider = (importDefault(1531) /* metro dependency 1531 */).Provider; return ( {children} ); function _fun17326() { // fn#17326, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1659:414, offset: 0x00e6a20d, size: 37 bytes, params: 1, frame: 11 const value = environment.__proto__; return (Module01493Module).nanoid(); } function _fun17327(a0, a1, a2) { // fn#17327, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1659:628, offset: 0x00e6a232, size: 166 bytes, params: 4, frame: 14 var value; var binding; var routes; var Error; const env0_0 = a0; const env0_1 = a1; const env0_2 = a2; if (a2) { if (env0_3 == null) { Error = global.Error; value = "Couldn't find a route with the key " + a1 + '. Is your component inside NavigationContent?'; throw new Error(); } if (env0_3 == null) { env0_2(_fun17329); return undefined; } binding = env0_3; routes = binding.getState().routes; if (routes.every(function({key}) { return key !== require; })) { Error = global.Error; value = "Couldn't find a route with the key " + a1 + '. Is your component inside NavigationContent?'; throw new Error(); } } env0_2(_fun17329); function _fun17329(a0) { // fn#17329, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1659:836, offset: 0x00e6a2ed, size: 175 bytes, params: 2, frame: 17 const value2 = a0.get(env0_0); const value3 = undefined; if (require === (value2 == null ? value3 : value2.routeKey)) { var value4 = a0.get(env0_0); if (importDefault === (value4 == null ? value3 : value4.preventRemove)) { return a0; } } const Map = global.Map; const map = new Map(a0); if (importDefault) { map.set(env0_0, {routeKey: require, preventRemove: importDefault}); } else { map.delete(env0_0); } return map; } } function _fun17331() { // fn#17331, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1659:1117, offset: 0x00e6a3a7, size: 80 bytes, params: 1, frame: 15 const value2 = undefined; if (value2 !== (env0_4 == null ? value2 : env0_4.key)) { if (value2 !== setPreventRemove) { setPreventRemove(env0_0, env0_4.key, env0_7); return _fun17332; } } return value2; function _fun17332() { // fn#17332, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1659:1195, offset: 0x00e6a3f7, size: 33 bytes, params: 1, frame: 15 setPreventRemove(env1_0, env1_4.key, false); } } function _fun17333() { // fn#17333, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1659:1270, offset: 0x00e6a418, size: 39 bytes, params: 1, frame: 12 const object = {}; object.setPreventRemove = JsxRuntimeModule.jsx; object.preventedRoutes = transformPreventedRoutes(env0_1); return object; } } } global.__d(_fun17322, 1532, [57, 65, 31, 33, 1493, 1530, 1511, 1531, 1533]) /* metro module 1532, dependencies: [57, 65, 31, 33, 1493, 1530, 1511, 1531, 1533] */;