131 lines
6.4 KiB
JavaScript
131 lines
6.4 KiB
JavaScript
/* Metro module 1505; source: unknown; dependencies: [31, 1506, 1498] */
|
|
import Module01498 from './module-01498.js'; /* Metro dependency 1498 */
|
|
import Module01506 from './module-01506.js'; /* Metro dependency 1506 */
|
|
import * as ReactModule from './module-00031-React.js'; /* Metro dependency 31 */
|
|
|
|
function _fun17166(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#17166, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1632:6, offset: 0x00e65919, size: 84 bytes, params: 8, frame: 17
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
exports.default = useOptionsGetters;
|
|
function useOptionsGetters({key, options, navigation}) { // fn#17167, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1632:116, offset: 0x00e6596d, size: 336 bytes, params: 2, frame: 20
|
|
const binding = navigation;
|
|
const env0_3 = binding.useRef(options);
|
|
const env0_4 = binding.useRef({});
|
|
let useContext = binding.useContext;
|
|
const onOptionsChange = Reflect.apply(useContext, binding,
|
|
[Module01506]).onOptionsChange;
|
|
useContext = binding.useContext;
|
|
const addOptionsGetter = Reflect.apply(useContext, binding,
|
|
[Module01498]).addOptionsGetter;
|
|
let useCallback = binding.useCallback;
|
|
const value = Reflect.apply(useCallback, binding, [_fun17168, [navigation, onOptionsChange]]);
|
|
binding.useEffect(_fun17169, [navigation, options, value]);
|
|
const value3 = binding.useCallback(_fun17171, [navigation, binding.useCallback(_fun17170, [])]);
|
|
binding.useEffect(_fun17172, [value3, addOptionsGetter, key]);
|
|
useCallback = binding.useCallback;
|
|
return {addOptionsGetter: Reflect.apply(useCallback, binding, [_fun17173, [value]]), getCurrentOptions: value3};
|
|
function _fun17168() { // fn#17168, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1632:312, offset: 0x00e65abd, size: 111 bytes, params: 1, frame: 15
|
|
const navigationBinding = navigation;
|
|
const value2 = undefined;
|
|
const r4 = navigationBinding == null ? value2 : navigation.isFocused();
|
|
let r2 = r4 == null || r4;
|
|
const Object = global.Object;
|
|
r2 = r2 && !Object.keys(env0_4.current).length;
|
|
if (r2) {
|
|
onOptionsChange(env0_3.current ?? ({}));
|
|
}
|
|
return value2;
|
|
}
|
|
|
|
function _fun17169() { // fn#17169, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1632:464, offset: 0x00e65b2c, size: 66 bytes, params: 1, frame: 14
|
|
env0_3.current = options;
|
|
const value2 = undefined;
|
|
env0_7();
|
|
return navigation == null ? value2 : navigation.addListener('focus', env0_7);
|
|
}
|
|
|
|
function _fun17170() { // fn#17170, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1632:570, offset: 0x00e65b6e, size: 112 bytes, params: 1, frame: 23
|
|
var r1;
|
|
var propertyName;
|
|
var propertyName2;
|
|
var current2;
|
|
var hasOwnProperty;
|
|
var current3;
|
|
var property;
|
|
var call;
|
|
var value3;
|
|
const current = env0_4.current;
|
|
const value2 = undefined;
|
|
const properties = Object.keys(current);
|
|
const properties2 = 0;
|
|
const properties3 = properties.length;
|
|
if (properties === value2) {
|
|
return null;
|
|
}
|
|
let r9 = properties2;
|
|
loopExit1: while (true) {
|
|
propertyName = properties[r9];
|
|
propertyName2 = r9 + 1;
|
|
if (propertyName === value2) {
|
|
return null;
|
|
}
|
|
current2 = env0_4.current;
|
|
hasOwnProperty = current2.hasOwnProperty;
|
|
if (Reflect.apply(hasOwnProperty, current2, [propertyName])) {
|
|
current3 = env0_4.current;
|
|
property = current3[propertyName];
|
|
if (property == null) {
|
|
r1 = value2;
|
|
continue;
|
|
}
|
|
call = property.call;
|
|
value3 = Reflect.apply(call, property, [current3]);
|
|
r1 = value3;
|
|
if (r1 === null) {
|
|
r9 = propertyName2;
|
|
continue;
|
|
}
|
|
break loopExit1;
|
|
}
|
|
r9 = propertyName2;
|
|
continue;
|
|
}
|
|
return r1;
|
|
}
|
|
|
|
function _fun17171() { // fn#17171, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1632:746, offset: 0x00e65bde, size: 66 bytes, params: 1, frame: 13
|
|
var value3;
|
|
const isFocused = navigation?.isFocused();
|
|
if (isFocused == null) {
|
|
value3 = env0_8();
|
|
return value3 !== null ? value3 : env0_3.current;
|
|
}
|
|
if (isFocused) {
|
|
value3 = env0_8();
|
|
return value3 !== null ? value3 : env0_3.current;
|
|
}
|
|
return null;
|
|
}
|
|
|
|
function _fun17172() { // fn#17172, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1632:890, offset: 0x00e65c20, size: 40 bytes, params: 1, frame: 14
|
|
return addOptionsGetter?.(key, env0_9);
|
|
}
|
|
|
|
function _fun17173(a0, a1) { // fn#17173, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1632:974, offset: 0x00e65c48, size: 45 bytes, params: 3, frame: 12
|
|
const env0_0 = a0;
|
|
env0_4.current[a0] = a1;
|
|
env0_7();
|
|
return _fun17174;
|
|
function _fun17174() { // fn#17174, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1632:1014, offset: 0x00e65c75, size: 35 bytes, params: 1, frame: 10
|
|
delete env1_4.current[env0_0];
|
|
env1_7();
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun17166, 1505, [31, 1506, 1498]) /* metro module 1505, dependencies: [31, 1506, 1498] */;
|