This commit is contained in:
janisslsm committed 2026-07-28 01:06:53 +03:00
1 parent af3b49f756
commit 1781d25a15
22448 files changed
+2731829 -2650550

No files matched your search

@@ -1,10 +1,13 @@
/* Metro module 12627; source: modules/parent_tools/hooks/useAgeSpecificText.tsx; dependencies: [8171, 2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun96898(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#96898, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12817:6, offset: 0x0216b534, size: 99 bytes, params: 8, frame: 17
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/parent_tools/hooks/useAgeSpecificText.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/parent_tools/hooks/useAgeSpecificText.tsx');
exports.useAgeSpecificText = function(a0, a1) {
return importDefault(dependencyMap[0])() ? a1 : a0;
};
}
global.__d(_fun96898, 12627, [8171, 2]) /* metro module 12627, dependencies: [8171, 2] */;
@@ -1,66 +1,70 @@
/* Metro module 15799; source: modules/parent_tools/hooks/useConnectGuardianGate.tsx; dependencies: [57, 31, 5116, 566, 5118, 4594, 2] */
import Module00057 from '../../../by-id/module-00057.js'; /* Metro dependency 57 */
import UseMountEffect from '../../../hooks/useMountEffect.tsx'; /* Metro dependency 4594 */
import FamilyCenterStore from '../FamilyCenterStore.tsx'; /* Metro dependency 5116 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
function _fun121387(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#121387, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16007:6, offset: 0x02546e15, size: 153 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
const familyCenterStore = importDefault(5116) /* metro dependency 5116: FamilyCenterStore */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/parent_tools/hooks/useConnectGuardianGate.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/parent_tools/hooks/useConnectGuardianGate.tsx');
exports.useConnectGuardianGate = useConnectGuardianGate;
}
function useConnectGuardianGate() { // fn#121388, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16007:238, offset: 0x02546eae, size: 289 bytes, params: 1, frame: 23
const {linkCode,
expiresAt} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([FamilyCenterStore],
function() {
var object = {};
var familyCenterStoreBinding = FamilyCenterStore;
object.linkCode = familyCenterStoreBinding.getLinkCode();
object.expiresAt = familyCenterStoreBinding.getLinkCodeExpiresAt();
return object;
});
let useState = ReactModule.useState;
const value3 = Reflect.apply(useState, ReactModule, [false]);
const value4 = Module00057(value3, 2);
const property = value4[0];
const env0_0 = value4[1];
useState = ReactModule.useState;
const value5 = Module00057(Reflect.apply(useState, ReactModule, [false]), 2);
const property2 = value5[0];
const env0_1 = value5[1];
const env0_2 = ReactModule.useRef(0);
const value6 = ReactModule.useCallback(_fun121390, []);
(UseMountEffect)(value6);
return property ? {state: 'error'} : property2 ? linkCode == null ? {state: 'error'} : expiresAt != null ? {state: 'gate',
linkCode: linkCode, expiresAt: expiresAt, refresh: value6} : {state: 'error'} : {state: 'loading'};
function _fun121390() { // fn#121390, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16007:524, offset: 0x02546ffa, size: 110 bytes, params: 1, frame: 13
var environment;
const binding = env0_2;
const current = binding.current;
const value2 = typeof current === 'bigint' ? current + 1n : +current + 1;
binding.current = value2;
value2(false);
let value = environment.__proto__;
value = require(5118) /* metro dependency 5118: FamilyCenterActionCreators */;
value = value.getLinkCodeForCurrentUser();
value = value.then(_fun121391);
value.catch(_fun121392);
function _fun121391() { // fn#121391, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16007:595, offset: 0x02547068, size: 51 bytes, params: 1, frame: 12
if (env0_0 === env1_2.current) {
env1_0(false);
env1_1(true);
}
}
function useConnectGuardianGate() { // fn#121388, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16007:238, offset: 0x02546eae, size: 289 bytes, params: 1, frame: 23
const {linkCode,
expiresAt} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([FamilyCenterStore],
function() {
var object = {};
object.linkCode = FamilyCenterStore.getLinkCode();
object.expiresAt = FamilyCenterStore.getLinkCodeExpiresAt();
return object;
});
const binding = env0_4;
let useState = binding.useState;
const value3 = Reflect.apply(useState, binding, [false]);
const binding2 = env0_3;
const value4 = binding2(value3, 2);
const property = value4[0];
const env0_0 = value4[1];
useState = binding.useState;
const value5 = binding2(Reflect.apply(useState, binding, [false]), 2);
const property2 = value5[0];
const env0_1 = value5[1];
const env0_2 = binding.useRef(0);
const value6 = binding.useCallback(_fun121390, []);
(importDefault(4594) /* metro dependency 4594: useMountEffect */)(value6);
return property ? {state: 'error'} : property2 ? linkCode == null ? {state: 'error'} : expiresAt != null ? {state: 'gate',
linkCode: linkCode, expiresAt: expiresAt, refresh: value6} : {state: 'error'} : {state: 'loading'};
}
function _fun121392() { // fn#121392, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16007:639, offset: 0x0254709b, size: 40 bytes, params: 1, frame: 11
if (env0_0 === env1_2.current) {
env1_0(true);
}
}
function _fun121390() { // fn#121390, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16007:524, offset: 0x02546ffa, size: 110 bytes, params: 1, frame: 13
var environment;
const binding = env0_2;
const current = binding.current;
const value2 = typeof current === 'bigint' ? current + 1n : +current + 1;
binding.current = value2;
value2(false);
let value = environment.__proto__;
value = require(5118) /* metro dependency 5118: FamilyCenterActionCreators */;
value = value.getLinkCodeForCurrentUser();
value = value.then(_fun121391);
value.catch(_fun121392);
}
}
function _fun121391() { // fn#121391, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16007:595, offset: 0x02547068, size: 51 bytes, params: 1, frame: 12
if (env0_0 === env1_2.current) {
env1_0(false);
env1_1(true);
}
}
function _fun121392() { // fn#121392, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16007:639, offset: 0x0254709b, size: 40 bytes, params: 1, frame: 11
if (env0_0 === env1_2.current) {
env1_0(true);
}
}
global.__d(_fun121387, 15799, [57, 31, 5116, 566, 5118, 4594,
2]) /* metro module 15799, dependencies: [57, 31, 5116, 566, 5118, 4594, 2] */;
File diff suppressed because it is too large. Load diff
@@ -1,4 +1,9 @@
/* Metro module 13407; source: modules/parent_tools/hooks/useFamilyCenterActivities.tsx; dependencies: [5116, 5117, 632, 5187, 5137, 2] */
import FamilyCenterStore from '../FamilyCenterStore.tsx'; /* Metro dependency 5116 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as UseStateFromStoresModule from '../../../external/discord_common/js/packages/flux/useStateFromStores.tsx'; /* Metro dependency 632 */
import * as FamilyCenterConstantsModule from '../FamilyCenterConstants.tsx'; /* Metro dependency 5117 */
function _fun102029(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#102029, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13597:6, offset: 0x02228ae7, size: 179 bytes, params: 8, frame: 19
let env0_0 = require;
const closure = function(a0) {
@@ -7,9 +12,7 @@ function _fun102029(global, require, importDefault, importAll, module, exports,
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const familyCenterStore = importDefault(5116) /* metro dependency 5116: FamilyCenterStore */;
const env0_3 = (require(5117) /* metro dependency 5117: FamilyCenterConstants */).TeenActionDisplayType;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/parent_tools/hooks/useFamilyCenterActivities.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/parent_tools/hooks/useFamilyCenterActivities.tsx');
exports.useActionsForDisplayType = function(a0) {
var env0_0 = a0;
return require(dependencyMap[2]).useStateFromStoresArray([FamilyCenterStore], _fun102033);
@@ -19,71 +22,73 @@ function _fun102029(global, require, importDefault, importAll, module, exports,
return require(dependencyMap[2]).useStateFromStores([FamilyCenterStore], _fun102035);
};
exports.useFormattedTotalForDisplayType = useFormattedTotalForDisplayType;
}
function useActionTotalsForDisplayType(a0) { // fn#102030, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13597:138, offset: 0x02228b9a, size: 66 bytes, params: 2, frame: 14
const env0_0 = a0;
return (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([FamilyCenterStore],
_fun102031);
}
function useActionsForDisplayType(a0) { // fn#102032, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13597:370, offset: 0x02228bf7, size: 67 bytes, params: 2, frame: 14
const env0_0 = a0;
return (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStoresArray([FamilyCenterStore],
_fun102033);
}
function useHasActionForAnyDisplayType() { // fn#102034, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13597:582, offset: 0x02228c55, size: 59 bytes, params: 1, frame: 13
return (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([FamilyCenterStore],
_fun102035);
}
function useFormattedTotalForDisplayType(a0) { // fn#102037, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13597:761, offset: 0x02228cdc, size: 174 bytes, params: 2, frame: 18
var r1;
var totalSpendAmount;
var totalSpendCurrency;
var value;
const r2 = useActionTotalsForDisplayType(a0) ?? 0;
const TOTAL_VOICE_MINUTES = TeenActionDisplayType.TOTAL_VOICE_MINUTES;
if (a0 === TOTAL_VOICE_MINUTES) {
return (require(5187) /* metro dependency 5187: FamilyCenterUtils */).formatTotalTime(r2);
}
const PURCHASES = TeenActionDisplayType.PURCHASES;
if (a0 === PURCHASES) {
totalSpendAmount = FamilyCenterStore.getTotalSpendAmount();
totalSpendCurrency = FamilyCenterStore.getTotalSpendCurrency();
if (totalSpendAmount == null) {
r1 = r2;
} else if (totalSpendCurrency == null) {
r1 = r2;
} else {
value = require(5137) /* metro dependency 5137: PriceUtils */;
value = value.shortenAndFormatPrice(totalSpendAmount, totalSpendCurrency);
r1 = value;
function useActionTotalsForDisplayType(a0) { // fn#102030, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13597:138, offset: 0x02228b9a, size: 66 bytes, params: 2, frame: 14
const env0_0 = a0;
return (UseStateFromStoresModule).useStateFromStores([FamilyCenterStore],
_fun102031);
function _fun102031() { // fn#102031, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13597:219, offset: 0x02228bdc, size: 27 bytes, params: 1, frame: 11
return FamilyCenterStore.getTotalForDisplayType(env0_0);
}
return r1;
}
return r2;
}
function _fun102031() { // fn#102031, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13597:219, offset: 0x02228bdc, size: 27 bytes, params: 1, frame: 11
return FamilyCenterStore.getTotalForDisplayType(env0_0);
}
function useActionsForDisplayType(a0) { // fn#102032, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13597:370, offset: 0x02228bf7, size: 67 bytes, params: 2, frame: 14
const env0_0 = a0;
return (UseStateFromStoresModule).useStateFromStoresArray([FamilyCenterStore],
_fun102033);
function _fun102033() { // fn#102033, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13597:451, offset: 0x02228c3a, size: 27 bytes, params: 1, frame: 11
return FamilyCenterStore.getActionsForDisplayType(env0_0);
}
function _fun102033() { // fn#102033, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13597:451, offset: 0x02228c3a, size: 27 bytes, params: 1, frame: 11
return FamilyCenterStore.getActionsForDisplayType(env0_0);
}
}
function _fun102035() { // fn#102035, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13597:662, offset: 0x02228c90, size: 47 bytes, params: 1, frame: 11
var environment;
const Object = global.Object;
const values = Object.values;
const value = environment.__proto__;
return Reflect.apply(values, Object, [TeenActionDisplayType]).some(_fun102036);
}
function useHasActionForAnyDisplayType() { // fn#102034, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13597:582, offset: 0x02228c55, size: 59 bytes, params: 1, frame: 13
return (UseStateFromStoresModule).useStateFromStores([FamilyCenterStore],
_fun102035);
function _fun102035() { // fn#102035, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13597:662, offset: 0x02228c90, size: 47 bytes, params: 1, frame: 11
var environment;
const Object = global.Object;
const values = Object.values;
const value = environment.__proto__;
return Reflect.apply(values, Object, [TeenActionDisplayType]).some(_fun102036);
function _fun102036(a0) { // fn#102036, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13597:689, offset: 0x02228cbf, size: 29 bytes, params: 2, frame: 11
const value = environment.__proto__.__proto__;
return FamilyCenterStore.getTotalForDisplayType(a0) > 0;
}
}
}
function useFormattedTotalForDisplayType(a0) { // fn#102037, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13597:761, offset: 0x02228cdc, size: 174 bytes, params: 2, frame: 18
var r1;
var totalSpendAmount;
var totalSpendCurrency;
var value;
const r2 = useActionTotalsForDisplayType(a0) ?? 0;
const TOTAL_VOICE_MINUTES = TeenActionDisplayType.TOTAL_VOICE_MINUTES;
if (a0 === TOTAL_VOICE_MINUTES) {
return (require(5187) /* metro dependency 5187: FamilyCenterUtils */).formatTotalTime(r2);
}
const PURCHASES = TeenActionDisplayType.PURCHASES;
if (a0 === PURCHASES) {
totalSpendAmount = FamilyCenterStore.getTotalSpendAmount();
totalSpendCurrency = FamilyCenterStore.getTotalSpendCurrency();
if (totalSpendAmount == null) {
r1 = r2;
} else if (totalSpendCurrency == null) {
r1 = r2;
} else {
value = require(5137) /* metro dependency 5137: PriceUtils */;
value = value.shortenAndFormatPrice(totalSpendAmount, totalSpendCurrency);
r1 = value;
}
return r1;
}
return r2;
}
function _fun102036(a0) { // fn#102036, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13597:689, offset: 0x02228cbf, size: 29 bytes, params: 2, frame: 11
const value = environment.__proto__.__proto__;
return FamilyCenterStore.getTotalForDisplayType(a0) > 0;
}
global.__d(_fun102029, 13407, [5116, 5117, 632, 5187, 5137,
2]) /* metro module 13407, dependencies: [5116, 5117, 632, 5187, 5137, 2] */;
@@ -1,35 +1,39 @@
/* Metro module 15644; source: modules/parent_tools/hooks/useFormattedEndTime.tsx; dependencies: [1878, 1244, 566, 2] */
import UserStore from '../../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as FluxModule from '../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
function _fun119804(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#119804, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15852:6, offset: 0x0251a1cd, size: 114 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/parent_tools/hooks/useFormattedEndTime.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/parent_tools/hooks/useFormattedEndTime.tsx');
exports.default = function() {
return require(dependencyMap[2]).useStateFromStores([UserStore], _fun119806);
};
}
function useFormattedEndTime() { // fn#119805, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15852:200, offset: 0x0251a23f, size: 59 bytes, params: 1, frame: 13
return (FluxModule).useStateFromStores([UserStore], _fun119806);
function _fun119806() { // fn#119806, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15852:270, offset: 0x0251a27a, size: 156 bytes, params: 1, frame: 16
var r0;
var dateTimeFormat;
const value = environment.__proto__;
const currentUser = UserStore.getCurrentUser();
const value3 = null;
const r3 = value3 == currentUser || value3 == currentUser.restrictedSchedule ? undefined : currentUser.restrictedSchedule.getNextEndTime();
if (value3 == r3) {
r0 = value3;
} else {
dateTimeFormat = new global.Intl.DateTimeFormat((require(1244) /* metro dependency 1244: indexNative */).intl.currentLocale,
{'hour': 'numeric', 'minute': '2-digit', 'weekday': 'long'});
dateTimeFormat = dateTimeFormat.format(r3);
r0 = dateTimeFormat;
}
return r0;
}
function useFormattedEndTime() { // fn#119805, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15852:200, offset: 0x0251a23f, size: 59 bytes, params: 1, frame: 13
return (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], _fun119806);
}
function _fun119806() { // fn#119806, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15852:270, offset: 0x0251a27a, size: 156 bytes, params: 1, frame: 16
var r0;
var dateTimeFormat;
const value = environment.__proto__;
const currentUser = UserStore.getCurrentUser();
const value3 = null;
const r3 = value3 == currentUser || value3 == currentUser.restrictedSchedule ? undefined : currentUser.restrictedSchedule.getNextEndTime();
if (value3 == r3) {
r0 = value3;
} else {
dateTimeFormat = new global.Intl.DateTimeFormat((require(1244) /* metro dependency 1244: indexNative */).intl.currentLocale,
{'hour': 'numeric', 'minute': '2-digit', 'weekday': 'long'});
dateTimeFormat = dateTimeFormat.format(r3);
r0 = dateTimeFormat;
}
return r0;
}
global.__d(_fun119804, 15644, [1878, 1244, 566, 2]) /* metro module 15644, dependencies: [1878, 1244, 566, 2] */;
@@ -1,45 +1,50 @@
/* Metro module 9737; source: modules/parent_tools/hooks/useHelpLineVisibility.tsx; dependencies: [31, 1949, 5116, 8171, 632, 9738, 2] */
import LocaleStore from '../../user_settings/LocaleStore.tsx'; /* Metro dependency 1949 */
import FamilyCenterStore from '../FamilyCenterStore.tsx'; /* Metro dependency 5116 */
import UseIsInAdultAgeGroup from './useIsInAdultAgeGroup.tsx'; /* Metro dependency 8171 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
function _fun76505(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#76505, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9923:6, offset: 0x01dd1b0b, size: 250 bytes, params: 8, frame: 20
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const localeStore = importDefault(1949) /* metro dependency 1949: LocaleStore */;
const familyCenterStore = importDefault(5116) /* metro dependency 5116: FamilyCenterStore */;
let Set = global.Set;
let set = new Set(['US']);
Set = global.Set;
set = new Set(['en-US', 'es-ES']);
const closure = useShouldShowHelplineLink;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/parent_tools/hooks/useHelpLineVisibility.tsx');
exports.useShouldShowHelplineLink = closure;
const useShouldShowHelplineLink2 = useShouldShowHelplineLink;
(FileImportTrackerModule).fileFinishedImporting('modules/parent_tools/hooks/useHelpLineVisibility.tsx');
exports.useShouldShowHelplineLink = useShouldShowHelplineLink2;
exports.useShouldShowThroughlineLink = useShouldShowThroughlineLink;
}
function useShouldShowHelplineLink() { // fn#76506, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9923:199, offset: 0x01dd1c05, size: 204 bytes, params: 1, frame: 20
const value2 = (UseIsInAdultAgeGroup)();
const userCountry = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([FamilyCenterStore],
function() {
return FamilyCenterStore.getUserCountry();
});
const locale = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([LocaleStore],
function() {
return LocaleStore.locale;
});
ReactModule.useEffect(_fun76509, [userCountry]);
return !value2 && userCountry != null && env0_6.has(userCountry.alpha2) && env0_7.has(locale);
function _fun76509() { // fn#76509, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9923:348, offset: 0x01dd1ce4, size: 52 bytes, params: 1, frame: 11
var value;
if (userCountry == null) {
value = environment.__proto__;
value = require(9738) /* metro dependency 9738: MessageRequestActionCreators */;
value.fetchUserCountryCode();
}
}
function useShouldShowHelplineLink() { // fn#76506, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9923:199, offset: 0x01dd1c05, size: 204 bytes, params: 1, frame: 20
const value2 = (importDefault(8171) /* metro dependency 8171: useIsInAdultAgeGroup */)();
const userCountry = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([FamilyCenterStore],
function() {
return FamilyCenterStore.getUserCountry();
});
const locale = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([LocaleStore],
function() {
return LocaleStore.locale;
});
env0_3.useEffect(_fun76509, [userCountry]);
return !value2 && userCountry != null && env0_6.has(userCountry.alpha2) && env0_7.has(locale);
}
function useShouldShowThroughlineLink() { // fn#76510, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9923:611, offset: 0x01dd1d18, size: 48 bytes, params: 1, frame: 12
return !(importDefault(8171) /* metro dependency 8171: useIsInAdultAgeGroup */)() && !useShouldShowHelplineLink();
}
function _fun76509() { // fn#76509, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9923:348, offset: 0x01dd1ce4, size: 52 bytes, params: 1, frame: 11
var value;
if (userCountry == null) {
value = environment.__proto__;
value = require(9738) /* metro dependency 9738: MessageRequestActionCreators */;
value.fetchUserCountryCode();
}
function useShouldShowThroughlineLink() { // fn#76510, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9923:611, offset: 0x01dd1d18, size: 48 bytes, params: 1, frame: 12
return !(importDefault(8171) /* metro dependency 8171: useIsInAdultAgeGroup */)() && !useShouldShowHelplineLink();
}
}
global.__d(_fun76505, 9737, [31, 1949, 5116, 8171, 632, 9738,
2]) /* metro module 9737, dependencies: [31, 1949, 5116, 8171, 632, 9738, 2] */;
@@ -1,18 +1,21 @@
/* Metro module 8171; source: modules/parent_tools/hooks/useIsInAdultAgeGroup.tsx; dependencies: [5116, 566, 2] */
import FamilyCenterStore from '../FamilyCenterStore.tsx'; /* Metro dependency 5116 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as FluxModule from '../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
function _fun65588(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#65588, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8356:6, offset: 0x01bd3f8f, size: 114 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const familyCenterStore = importDefault(5116) /* metro dependency 5116: FamilyCenterStore */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/parent_tools/hooks/useIsInAdultAgeGroup.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/parent_tools/hooks/useIsInAdultAgeGroup.tsx');
exports.default = useIsInAdultAgeGroup;
function useIsInAdultAgeGroup() { // fn#65589, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8356:201, offset: 0x01bd4001, size: 67 bytes, params: 1, frame: 13
const useStateFromStores = FluxModule.useStateFromStores;
return Reflect.apply(useStateFromStores, FluxModule, [[FamilyCenterStore], function() {
return FamilyCenterStore.getAgeGroup();
}]) === 'adult';
}
}
function useIsInAdultAgeGroup() { // fn#65589, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8356:201, offset: 0x01bd4001, size: 67 bytes, params: 1, frame: 13
const fluxModule = require(566) /* metro dependency 566: flux */;
const useStateFromStores = fluxModule.useStateFromStores;
return Reflect.apply(useStateFromStores, fluxModule, [[FamilyCenterStore], function() {
return FamilyCenterStore.getAgeGroup();
}]) === 'adult';
}
global.__d(_fun65588, 8171, [5116, 566, 2]) /* metro module 8171, dependencies: [5116, 566, 2] */;
@@ -1,14 +1,18 @@
/* Metro module 15646; source: modules/parent_tools/hooks/useIsInRestrictedHours.tsx; dependencies: [1878, 5116, 566, 15647, 2] */
import UserStore from '../../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import FamilyCenterStore from '../FamilyCenterStore.tsx'; /* Metro dependency 5116 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun119808(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#119808, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15854:6, offset: 0x0251a35c, size: 130 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const familyCenterStore = importDefault(5116) /* metro dependency 5116: FamilyCenterStore */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/parent_tools/hooks/useIsInRestrictedHours.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/parent_tools/hooks/useIsInRestrictedHours.tsx');
exports.default = function() {
return require(dependencyMap[2]).useStateFromStores([UserStore, FamilyCenterStore],
require(dependencyMap[3]).getCurrentRestrictedHoursState);
};
}
global.__d(_fun119808, 15646, [1878, 5116, 566, 15647,
2]) /* metro module 15646, dependencies: [1878, 5116, 566, 15647, 2] */;
@@ -1,13 +1,22 @@
/* Metro module 13347; source: modules/parent_tools/hooks/useParentalControlSettings.tsx; dependencies: [5, 31, 5119, 6263, 8172, 13348, 13351, 1314, 4844, 7004, 8170, 566, 5118, 6264, 2] */
import Module00005 from '../../../by-id/module-00005.js'; /* Metro dependency 5 */
import FamilyCenterControlledSettingsStore from '../FamilyCenterControlledSettingsStore.tsx'; /* Metro dependency 5119 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as FluxModule from '../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as Preloaded_user_settingsModule from '../../../external/discord_common/js/packages/protos/discord_protos/discord_users/v1/preloaded_user_settings.tsx'; /* Metro dependency 1314 */
import * as ConstantsModule from '../../safety_common/Constants.tsx'; /* Metro dependency 6263 */
import * as UserSettingsUtilsModule from '../../../utils/UserSettingsUtils.tsx'; /* Metro dependency 7004 */
import * as UseUserLinksModule from './useUserLinks.tsx'; /* Metro dependency 8170 */
import * as UseSelectedTeenModule from './useSelectedTeen.tsx'; /* Metro dependency 8172 */
import * as ParentalControlledUserSettingsModule from '../../user_settings/family_center/ParentalControlledUserSettings.tsx'; /* Metro dependency 13348 */
import * as FamilyCenterControlledSettingsUtilsModule from '../FamilyCenterControlledSettingsUtils.tsx'; /* Metro dependency 13351 */
function _fun101624(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#101624, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13537:6, offset: 0x0221a9b6, size: 242 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(5) /* metro dependency 5 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
const familyCenterControlledSettingsStore = importDefault(5119) /* metro dependency 5119: FamilyCenterControlledSettingsStore */;
const env0_6 = (require(6263) /* metro dependency 6263: Constants */).SafetyToastType;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/parent_tools/hooks/useParentalControlSettings.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/parent_tools/hooks/useParentalControlSettings.tsx');
exports.useParentalControlledExplicitContentSettings = useParentalControlledExplicitContentSettings;
exports.useParentalControlledGoreContentSettings = useParentalControlledGoreContentSettings;
exports.useDefaultGuildsRestricted = useDefaultGuildsRestricted;
@@ -16,236 +25,241 @@ function _fun101624(global, require, importDefault, importAll, module, exports,
exports.useParentalControlledConsent = function(a0) {
return {hasConsented: _fun101632(a0), updateConsent: _fun101634(a0)};
};
function useParentalControlledExplicitContentSettings() { // fn#101625, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13537:291, offset: 0x0221aaa8, size: 294 bytes, params: 1, frame: 21
var r0;
var object;
var moduleValue2;
var resolveExplicitContentSettingWithDefaultsForTeen;
var moduleValue3;
const value2 = undefined;
const value3 = (UseSelectedTeenModule).useSelectedTeen();
const ParentalControlledExplicitContent = (ParentalControlledUserSettingsModule).ParentalControlledExplicitContent;
const useControlledSetting = ParentalControlledExplicitContent.useControlledSetting;
const value4 = null;
let id = value4 == value3 ? value2 : value3.id;
const value5 = Reflect.apply(useControlledSetting, ParentalControlledExplicitContent, [id]);
if (value4 == value3) {
r0 = value4;
} else {
object = {};
moduleValue2 = require(13351) /* metro dependency 13351: FamilyCenterControlledSettingsUtils */;
resolveExplicitContentSettingWithDefaultsForTeen = moduleValue2.resolveExplicitContentSettingWithDefaultsForTeen;
id = value4 == value3 ? value2 : value3.id;
object.explicitContentNonFriendDm = Reflect.apply(resolveExplicitContentSettingWithDefaultsForTeen,
moduleValue2,
[{teenId: id, setting: value4 == value5 ? value2 : value5.explicitContentNonFriendDm}]);
moduleValue3 = require(13351) /* metro dependency 13351: FamilyCenterControlledSettingsUtils */;
resolveExplicitContentSettingWithDefaultsForTeen = moduleValue3.resolveExplicitContentSettingWithDefaultsForTeen;
id = value4 == value3 ? value2 : value3.id;
object.explicitContentFriendDm = Reflect.apply(resolveExplicitContentSettingWithDefaultsForTeen, moduleValue3,
[{teenId: id, setting: value4 == value5 ? value2 : value5.explicitContentFriendDm, isFriend: true}]);
object.explicitContentGuilds = (require(1314) /* metro dependency 1314: preloaded_user_settings */).ExplicitContentRedaction.BLUR;
r0 = object;
}
return r0;
}
function useParentalControlledGoreContentSettings() { // fn#101626, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13537:878, offset: 0x0221abce, size: 308 bytes, params: 1, frame: 19
const value2 = undefined;
const value3 = (UseSelectedTeenModule).useSelectedTeen();
const ParentalControlledGoreContent = (ParentalControlledUserSettingsModule).ParentalControlledGoreContent;
const value4 = ParentalControlledGoreContent.useControlledSetting(value3 == null ? value2 : value3.id);
if (value3 == null) {
return null;
}
const {goreContentNonFriendDm, goreContentFriendDm} = value4 ?? ({});
const object = {};
object.goreContentNonFriendDm = FamilyCenterControlledSettingsUtilsModule.isSetAndNotDefault(goreContentNonFriendDm) ? goreContentNonFriendDm : (require(4844) /* metro dependency 4844: SensitiveMediaGoreRedactionSettingsUtils */).resolveGoreSettingWithDefaultsForTeen({isDm: true});
object.goreContentFriendDm = FamilyCenterControlledSettingsUtilsModule.isSetAndNotDefault(goreContentFriendDm) ? goreContentFriendDm : (require(4844) /* metro dependency 4844: SensitiveMediaGoreRedactionSettingsUtils */).resolveGoreSettingWithDefaultsForTeen({'isDm': true,
'isFriend': true});
const ExplicitContentRedaction = (Preloaded_user_settingsModule).ExplicitContentRedaction;
const BLUR = ExplicitContentRedaction.BLUR;
object.goreContentGuilds = BLUR;
return object;
}
function useDefaultGuildsRestricted() { // fn#101627, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13537:1417, offset: 0x0221ad02, size: 149 bytes, params: 1, frame: 17
const value2 = undefined;
const value3 = (UseSelectedTeenModule).useSelectedTeen();
const ParentalControlledDefaultGuildsRestricted = (ParentalControlledUserSettingsModule).ParentalControlledDefaultGuildsRestricted;
const value4 = ParentalControlledDefaultGuildsRestricted.useControlledSetting(value3 == null ? value2 : value3.id);
const ParentalControlledDefaultGuildsRestrictedV2 = (ParentalControlledUserSettingsModule).ParentalControlledDefaultGuildsRestrictedV2;
return ParentalControlledDefaultGuildsRestrictedV2.useControlledSetting(value3 == null ? value2 : value3.id) ?? (value4 && !!value4);
}
function useAllowFriendsFromMutualGuildsOnlyForTeen() { // fn#101628, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13537:1714, offset: 0x0221ad97, size: 134 bytes, params: 1, frame: 16
const value2 = undefined;
const value3 = (UseSelectedTeenModule).useSelectedTeen();
const ParentalControlledFriendSourceFlags = (ParentalControlledUserSettingsModule).ParentalControlledFriendSourceFlags;
const value = ReactModule.useMemo(_fun101629,
[ParentalControlledFriendSourceFlags.useControlledSetting(value3 == null ? value2 : value3.id)]);
return value.mutualGuilds && !value.all;
function _fun101629() { // fn#101629, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13537:1901, offset: 0x0221ae1d, size: 45 bytes, params: 1, frame: 11
const value = environment.__proto__;
return (UserSettingsUtilsModule).computeFlags(env0_0);
}
}
function useIsParentallyControlled() { // fn#101630, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13537:1994, offset: 0x0221ae4a, size: 37 bytes, params: 1, frame: 11
return (UseUserLinksModule).useHasActiveParentLinks();
}
function useParentalControlledConsent(a0) { // fn#101631, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13537:2105, offset: 0x0221ae6f, size: 47 bytes, params: 2, frame: 12
return {hasConsented: ((a0) => {
var env0_0 = a0;
var env0_1 = (require(8172) /* metro dependency 8172: useSelectedTeen */).useSelectedTeenId();
return (require(566) /* metro dependency 566: flux */).useStateFromStores([FamilyCenterControlledSettingsStore],
_fun101633);
})(a0), updateConsent: useUpdateParentalControlledConsent(a0)};
function useParentalControlledHasConsented(a0) { // fn#101632, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13537:2152, owner: useParentalControlledConsent.useParentalControlledHasConsented, offset: 0x0221ae9e, size: 92 bytes, params: 2, frame: 16
const env0_0 = a0;
const env0_1 = (UseSelectedTeenModule).useSelectedTeenId();
return (FluxModule).useStateFromStores([FamilyCenterControlledSettingsStore],
_fun101633);
function _fun101633() { // fn#101633, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13537:2272, offset: 0x0221aefa, size: 32 bytes, params: 1, frame: 13
const familyCenterControlledSettingsStoreBinding = FamilyCenterControlledSettingsStore;
return familyCenterControlledSettingsStoreBinding.hasConsented(env0_1, env0_0);
}
}
function useUpdateParentalControlledConsent(a0) { // fn#101634, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13537:2304, owner: useParentalControlledConsent.useUpdateParentalControlledConsent, offset: 0x0221af1a, size: 88 bytes, params: 2, frame: 15
var environment;
const env0_0 = a0;
const value = environment.__proto__;
return env1_4.useCallback(_fun101635(),
[(UseSelectedTeenModule).useSelectedTeenId(), a0]);
function _fun101635() { // fn#101635, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13537:2406, offset: 0x0221af72, size: 36 bytes, params: 1, frame: 12
const env0_0 = env2_3(_fun101637);
return _fun101638;
function* _fun101637(a0) { // fn#101637, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13537:2426, offset: 0x0221afa1, size: 193 bytes, params: 2, frame: 19
var items3;
var items2;
var binding;
var binding2;
var property;
var value4;
var updateTeenConsents;
var value5;
var error;
var showFailedToast;
var GENERIC_ERROR;
if (false) {
return undefined;
}
value = environment.__proto__.__proto__;
if (env2_1 == null) {
return undefined;
}
if (a0) {
binding = env2_0;
items3 = [binding];
} else {
items3 = [];
}
if (a0) {
items2 = [];
} else {
binding = env2_0;
items2 = [binding];
}
try {
binding = env4_1;
} catch (error) {
binding = env4_1;
value = binding(env4_2[13]);
showFailedToast = value.showFailedToast;
GENERIC_ERROR = env4_6.GENERIC_ERROR;
Reflect.apply(showFailedToast, value, [GENERIC_ERROR]);
return undefined;
}
try {
binding2 = env4_2;
} catch (error) {
binding = env4_1;
value = binding(env4_2[13]);
showFailedToast = value.showFailedToast;
GENERIC_ERROR = env4_6.GENERIC_ERROR;
Reflect.apply(showFailedToast, value, [GENERIC_ERROR]);
return undefined;
}
try {
property = binding2[12];
} catch (error) {
binding = env4_1;
value = binding(env4_2[13]);
showFailedToast = value.showFailedToast;
GENERIC_ERROR = env4_6.GENERIC_ERROR;
Reflect.apply(showFailedToast, value, [GENERIC_ERROR]);
return undefined;
}
try {
value4 = binding(property);
} catch (error) {
binding = env4_1;
value = binding(env4_2[13]);
showFailedToast = value.showFailedToast;
GENERIC_ERROR = env4_6.GENERIC_ERROR;
Reflect.apply(showFailedToast, value, [GENERIC_ERROR]);
return undefined;
}
try {
updateTeenConsents = value4.updateTeenConsents;
} catch (error) {
binding = env4_1;
value = binding(env4_2[13]);
showFailedToast = value.showFailedToast;
GENERIC_ERROR = env4_6.GENERIC_ERROR;
Reflect.apply(showFailedToast, value, [GENERIC_ERROR]);
return undefined;
}
try {
binding = env2_1;
} catch (error) {
binding = env4_1;
value = binding(env4_2[13]);
showFailedToast = value.showFailedToast;
GENERIC_ERROR = env4_6.GENERIC_ERROR;
Reflect.apply(showFailedToast, value, [GENERIC_ERROR]);
return undefined;
}
try {
value = Reflect.apply(updateTeenConsents, value4, [binding, items3, items2]);
} catch (error) {
binding = env4_1;
value = binding(env4_2[13]);
showFailedToast = value.showFailedToast;
GENERIC_ERROR = env4_6.GENERIC_ERROR;
Reflect.apply(showFailedToast, value, [GENERIC_ERROR]);
return undefined;
}
yield value;
try {
value = undefined;
value5 = false;
} catch (error) {
binding = env4_1;
value = binding(env4_2[13]);
showFailedToast = value.showFailedToast;
GENERIC_ERROR = env4_6.GENERIC_ERROR;
Reflect.apply(showFailedToast, value, [GENERIC_ERROR]);
return undefined;
}
return value5 ? value : undefined;
}
function _fun101638() { // fn#101638, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13537:2585, offset: 0x00c3945f, size: 30 bytes, params: 1, frame: 13
return env0_0.apply(this, arguments);
}
}
}
}
}
function useParentalControlledExplicitContentSettings() { // fn#101625, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13537:291, offset: 0x0221aaa8, size: 294 bytes, params: 1, frame: 21
var r0;
var object2;
var moduleValue2;
var resolveExplicitContentSettingWithDefaultsForTeen;
var moduleValue3;
const value2 = undefined;
const value3 = (require(8172) /* metro dependency 8172: useSelectedTeen */).useSelectedTeen();
const ParentalControlledExplicitContent = (require(13348) /* metro dependency 13348: ParentalControlledUserSettings */).ParentalControlledExplicitContent;
const useControlledSetting = ParentalControlledExplicitContent.useControlledSetting;
const value4 = null;
let id = value4 == value3 ? value2 : value3.id;
const value5 = Reflect.apply(useControlledSetting, ParentalControlledExplicitContent, [id]);
if (value4 == value3) {
r0 = value4;
} else {
object2 = {};
moduleValue2 = require(13351) /* metro dependency 13351: FamilyCenterControlledSettingsUtils */;
resolveExplicitContentSettingWithDefaultsForTeen = moduleValue2.resolveExplicitContentSettingWithDefaultsForTeen;
id = value4 == value3 ? value2 : value3.id;
object2.explicitContentNonFriendDm = Reflect.apply(resolveExplicitContentSettingWithDefaultsForTeen,
moduleValue2,
[{teenId: id, setting: value4 == value5 ? value2 : value5.explicitContentNonFriendDm}]);
moduleValue3 = require(13351) /* metro dependency 13351: FamilyCenterControlledSettingsUtils */;
resolveExplicitContentSettingWithDefaultsForTeen = moduleValue3.resolveExplicitContentSettingWithDefaultsForTeen;
id = value4 == value3 ? value2 : value3.id;
object2.explicitContentFriendDm = Reflect.apply(resolveExplicitContentSettingWithDefaultsForTeen, moduleValue3,
[{teenId: id, setting: value4 == value5 ? value2 : value5.explicitContentFriendDm, isFriend: true}]);
object2.explicitContentGuilds = (require(1314) /* metro dependency 1314: preloaded_user_settings */).ExplicitContentRedaction.BLUR;
r0 = object2;
}
return r0;
}
function useParentalControlledGoreContentSettings() { // fn#101626, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13537:878, offset: 0x0221abce, size: 308 bytes, params: 1, frame: 19
const value2 = undefined;
const value3 = (require(8172) /* metro dependency 8172: useSelectedTeen */).useSelectedTeen();
const ParentalControlledGoreContent = (require(13348) /* metro dependency 13348: ParentalControlledUserSettings */).ParentalControlledGoreContent;
const value4 = ParentalControlledGoreContent.useControlledSetting(value3 == null ? value2 : value3.id);
if (value3 == null) {
return null;
}
const {goreContentNonFriendDm, goreContentFriendDm} = value4 ?? ({});
const object2 = {};
const familyCenterControlledSettingsUtilsModule = require(13351) /* metro dependency 13351: FamilyCenterControlledSettingsUtils */;
object2.goreContentNonFriendDm = familyCenterControlledSettingsUtilsModule.isSetAndNotDefault(goreContentNonFriendDm) ? goreContentNonFriendDm : (require(4844) /* metro dependency 4844: SensitiveMediaGoreRedactionSettingsUtils */).resolveGoreSettingWithDefaultsForTeen({isDm: true});
const moduleValue4 = familyCenterControlledSettingsUtilsModule;
object2.goreContentFriendDm = moduleValue4.isSetAndNotDefault(goreContentFriendDm) ? goreContentFriendDm : (require(4844) /* metro dependency 4844: SensitiveMediaGoreRedactionSettingsUtils */).resolveGoreSettingWithDefaultsForTeen({'isDm': true,
'isFriend': true});
const ExplicitContentRedaction = (require(1314) /* metro dependency 1314: preloaded_user_settings */).ExplicitContentRedaction;
const BLUR = ExplicitContentRedaction.BLUR;
object2.goreContentGuilds = BLUR;
return object2;
}
function useDefaultGuildsRestricted() { // fn#101627, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13537:1417, offset: 0x0221ad02, size: 149 bytes, params: 1, frame: 17
const value2 = undefined;
const value3 = (require(8172) /* metro dependency 8172: useSelectedTeen */).useSelectedTeen();
const ParentalControlledDefaultGuildsRestricted = (require(13348) /* metro dependency 13348: ParentalControlledUserSettings */).ParentalControlledDefaultGuildsRestricted;
const value4 = ParentalControlledDefaultGuildsRestricted.useControlledSetting(value3 == null ? value2 : value3.id);
const ParentalControlledDefaultGuildsRestrictedV2 = (require(13348) /* metro dependency 13348: ParentalControlledUserSettings */).ParentalControlledDefaultGuildsRestrictedV2;
return ParentalControlledDefaultGuildsRestrictedV2.useControlledSetting(value3 == null ? value2 : value3.id) ?? (value4 && !!value4);
}
function useAllowFriendsFromMutualGuildsOnlyForTeen() { // fn#101628, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13537:1714, offset: 0x0221ad97, size: 134 bytes, params: 1, frame: 16
const value2 = undefined;
const value3 = (require(8172) /* metro dependency 8172: useSelectedTeen */).useSelectedTeen();
const ParentalControlledFriendSourceFlags = (require(13348) /* metro dependency 13348: ParentalControlledUserSettings */).ParentalControlledFriendSourceFlags;
const value = env0_4.useMemo(_fun101629,
[ParentalControlledFriendSourceFlags.useControlledSetting(value3 == null ? value2 : value3.id)]);
return value.mutualGuilds && !value.all;
}
function useIsParentallyControlled() { // fn#101630, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13537:1994, offset: 0x0221ae4a, size: 37 bytes, params: 1, frame: 11
return (require(8170) /* metro dependency 8170: useUserLinks */).useHasActiveParentLinks();
}
function useParentalControlledConsent(a0) { // fn#101631, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13537:2105, offset: 0x0221ae6f, size: 47 bytes, params: 2, frame: 12
return {hasConsented: ((a0) => {
var env0_0 = a0;
var env0_1 = (require(8172) /* metro dependency 8172: useSelectedTeen */).useSelectedTeenId();
return (require(566) /* metro dependency 566: flux */).useStateFromStores([FamilyCenterControlledSettingsStore],
_fun101633);
})(a0), updateConsent: useUpdateParentalControlledConsent(a0)};
}
function _fun101629() { // fn#101629, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13537:1901, offset: 0x0221ae1d, size: 45 bytes, params: 1, frame: 11
const value = environment.__proto__;
return (require(7004) /* metro dependency 7004: UserSettingsUtils */).computeFlags(env0_0);
}
function useParentalControlledHasConsented(a0) { // fn#101632, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13537:2152, owner: useParentalControlledConsent.useParentalControlledHasConsented, offset: 0x0221ae9e, size: 92 bytes, params: 2, frame: 16
const env0_0 = a0;
const env0_1 = (require(8172) /* metro dependency 8172: useSelectedTeen */).useSelectedTeenId();
return (require(566) /* metro dependency 566: flux */).useStateFromStores([FamilyCenterControlledSettingsStore],
_fun101633);
}
function useUpdateParentalControlledConsent(a0) { // fn#101634, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13537:2304, owner: useParentalControlledConsent.useUpdateParentalControlledConsent, offset: 0x0221af1a, size: 88 bytes, params: 2, frame: 15
var environment;
const env0_0 = a0;
const value = environment.__proto__;
return env1_4.useCallback(_fun101635(),
[(require(8172) /* metro dependency 8172: useSelectedTeen */).useSelectedTeenId(), a0]);
}
function _fun101633() { // fn#101633, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13537:2272, offset: 0x0221aefa, size: 32 bytes, params: 1, frame: 13
return FamilyCenterControlledSettingsStore.hasConsented(env0_1, env0_0);
}
function _fun101635() { // fn#101635, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13537:2406, offset: 0x0221af72, size: 36 bytes, params: 1, frame: 12
const env0_0 = env2_3(_fun101637);
return _fun101638;
}
function* _fun101637(a0) { // fn#101637, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13537:2426, offset: 0x0221afa1, size: 193 bytes, params: 2, frame: 19
var items;
var items2;
var binding;
var binding2;
var property;
var value4;
var updateTeenConsents;
var value5;
var error;
var showFailedToast;
var GENERIC_ERROR;
if (false) {
return undefined;
}
value = environment.__proto__.__proto__;
if (env2_1 == null) {
return undefined;
}
if (a0) {
binding = env2_0;
items = [binding];
} else {
items = [];
}
if (a0) {
items2 = [];
} else {
binding = env2_0;
items2 = [binding];
}
try {
binding = env4_1;
} catch (error) {
binding = env4_1;
value = binding(env4_2[13]);
showFailedToast = value.showFailedToast;
GENERIC_ERROR = env4_6.GENERIC_ERROR;
Reflect.apply(showFailedToast, value, [GENERIC_ERROR]);
return undefined;
}
try {
binding2 = env4_2;
} catch (error) {
binding = env4_1;
value = binding(env4_2[13]);
showFailedToast = value.showFailedToast;
GENERIC_ERROR = env4_6.GENERIC_ERROR;
Reflect.apply(showFailedToast, value, [GENERIC_ERROR]);
return undefined;
}
try {
property = binding2[12];
} catch (error) {
binding = env4_1;
value = binding(env4_2[13]);
showFailedToast = value.showFailedToast;
GENERIC_ERROR = env4_6.GENERIC_ERROR;
Reflect.apply(showFailedToast, value, [GENERIC_ERROR]);
return undefined;
}
try {
value4 = binding(property);
} catch (error) {
binding = env4_1;
value = binding(env4_2[13]);
showFailedToast = value.showFailedToast;
GENERIC_ERROR = env4_6.GENERIC_ERROR;
Reflect.apply(showFailedToast, value, [GENERIC_ERROR]);
return undefined;
}
try {
updateTeenConsents = value4.updateTeenConsents;
} catch (error) {
binding = env4_1;
value = binding(env4_2[13]);
showFailedToast = value.showFailedToast;
GENERIC_ERROR = env4_6.GENERIC_ERROR;
Reflect.apply(showFailedToast, value, [GENERIC_ERROR]);
return undefined;
}
try {
binding = env2_1;
} catch (error) {
binding = env4_1;
value = binding(env4_2[13]);
showFailedToast = value.showFailedToast;
GENERIC_ERROR = env4_6.GENERIC_ERROR;
Reflect.apply(showFailedToast, value, [GENERIC_ERROR]);
return undefined;
}
try {
value = Reflect.apply(updateTeenConsents, value4, [binding, items, items2]);
} catch (error) {
binding = env4_1;
value = binding(env4_2[13]);
showFailedToast = value.showFailedToast;
GENERIC_ERROR = env4_6.GENERIC_ERROR;
Reflect.apply(showFailedToast, value, [GENERIC_ERROR]);
return undefined;
}
yield value;
try {
value = undefined;
value5 = false;
} catch (error) {
binding = env4_1;
value = binding(env4_2[13]);
showFailedToast = value.showFailedToast;
GENERIC_ERROR = env4_6.GENERIC_ERROR;
Reflect.apply(showFailedToast, value, [GENERIC_ERROR]);
return undefined;
}
return value5 ? value : undefined;
}
global.__d(_fun101624, 13347, [5, 31, 5119, 6263, 8172, 13348, 13351, 1314, 4844, 7004, 8170, 566, 5118, 6264,
2]) /* metro module 13347, dependencies: [5, 31, 5119, 6263, 8172, 13348, 13351, 1314, 4844, 7004, 8170, 566, 5118, 6264, 2] */;
@@ -1,36 +1,50 @@
/* Metro module 13423; source: modules/parent_tools/hooks/useScheduleTimeControlsRowProps.tsx; dependencies: [33, 4573, 1244, 2224, 2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as IndexNativeModule from '../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as TextModule from '../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
function _fun102136(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#102136, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13613:6, offset: 0x0222e683, size: 123 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = (require(33) /* metro dependency 33 */).jsx;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/parent_tools/hooks/useScheduleTimeControlsRowProps.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/parent_tools/hooks/useScheduleTimeControlsRowProps.tsx');
exports.default = useScheduleTimeControlsRowProps;
}
function useScheduleTimeControlsRowProps(a0) { // fn#102137, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13613:216, offset: 0x0222e6fe, size: 358 bytes, params: 2, frame: 22
var value;
var object2;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
var string;
if (a0.length === 0) {
object2 = {};
object2.subLabel = <Text variant="text-xs/medium" color="text-muted">{intl.string((importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).fOBIZH)}</Text>;
object2.trailing = undefined;
} else {
value = a0.some(function(a0) {
return a0.enabled;
});
object2 = {};
var formatToPlainString = intl.formatToPlainString;
var XfwcpX = (importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).XfwcpX;
object2.subLabel = Reflect.apply(formatToPlainString, intl, [XfwcpX, {count: a0.length}]);
string = intl.string;
var defaultImport = importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */;
object2.trailing = <Text variant="text-sm/medium" color="text-muted">{value ? Reflect.apply(string, intl,
[defaultImport['8vDHRq']]) : Reflect.apply(string, intl, [defaultImport['4z9fN+']])}</Text>;
function useScheduleTimeControlsRowProps(a0) { // fn#102137, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13613:216, offset: 0x0222e6fe, size: 358 bytes, params: 2, frame: 22
var value;
var object;
const intl = (IndexNativeModule).intl;
const Text = (TextModule).Text;
var string;
if (a0.length === 0) {
object = {};
object.subLabel = (
<Text variant="text-xs/medium" color="text-muted">
{intl.string((importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).fOBIZH)}
</Text>
);
object.trailing = undefined;
} else {
value = a0.some(function(a0) {
return a0.enabled;
});
object = {};
var formatToPlainString = intl.formatToPlainString;
var XfwcpX = (importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).XfwcpX;
object.subLabel = Reflect.apply(formatToPlainString, intl, [XfwcpX, {count: a0.length}]);
string = intl.string;
var defaultImport = importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */;
object.trailing = (
<Text variant="text-sm/medium" color="text-muted">
{value ? Reflect.apply(string, intl, [defaultImport['8vDHRq']]) : Reflect.apply(string, intl,
[defaultImport['4z9fN+']])}
</Text>
);
}
return object;
}
return object2;
}
global.__d(_fun102136, 13423, [33, 4573, 1244, 2224,
2]) /* metro module 13423, dependencies: [33, 4573, 1244, 2224, 2] */;
@@ -1,47 +1,64 @@
/* Metro module 13390; source: modules/parent_tools/hooks/useSelectedTab.tsx; dependencies: [5116, 5117, 661, 632, 5118, 683, 2] */
import AnalyticsUtils from '../../../utils/AnalyticsUtils.tsx'; /* Metro dependency 683 */
import FamilyCenterStore from '../FamilyCenterStore.tsx'; /* Metro dependency 5116 */
import FamilyCenterActionCreators from '../FamilyCenterActionCreators.tsx'; /* Metro dependency 5118 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as UseStateFromStoresModule from '../../../external/discord_common/js/packages/flux/useStateFromStores.tsx'; /* Metro dependency 632 */
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
import * as FamilyCenterConstantsModule from '../FamilyCenterConstants.tsx'; /* Metro dependency 5117 */
function _fun101951(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#101951, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13580:6, offset: 0x02224cb5, size: 280 bytes, params: 8, frame: 19
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const familyCenterStore = importDefault(5116) /* metro dependency 5116: FamilyCenterStore */;
const familyCenterConstantsModule = require(5117) /* metro dependency 5117: FamilyCenterConstants */;
const env0_4 = familyCenterConstantsModule.FamilyCenterAction;
const FamilyCenterSubPages = familyCenterConstantsModule.FamilyCenterSubPages;
const env0_5 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
object2 = {};
const FamilyCenterSubPages = FamilyCenterConstantsModule.FamilyCenterSubPages;
object = {};
const ACTIVITY = FamilyCenterSubPages.ACTIVITY;
object2[ACTIVITY] = 'family_center_activity_tab';
object[ACTIVITY] = 'family_center_activity_tab';
const REQUESTS = FamilyCenterSubPages.REQUESTS;
object2[REQUESTS] = 'family_center_requests_tab';
object[REQUESTS] = 'family_center_requests_tab';
const SETTINGS = FamilyCenterSubPages.SETTINGS;
object2[SETTINGS] = 'family_center_settings_tab';
object[SETTINGS] = 'family_center_settings_tab';
const CONTENT_AND_SOCIAL = FamilyCenterSubPages.CONTENT_AND_SOCIAL;
object2[CONTENT_AND_SOCIAL] = 'family_center_content_and_social_panel';
object[CONTENT_AND_SOCIAL] = 'family_center_content_and_social_panel';
const DATA_AND_PRIVACY = FamilyCenterSubPages.DATA_AND_PRIVACY;
object2[DATA_AND_PRIVACY] = 'family_center_data_and_privacy_panel';
object[DATA_AND_PRIVACY] = 'family_center_data_and_privacy_panel';
const SCREEN_TIME_CONTROLS = FamilyCenterSubPages.SCREEN_TIME_CONTROLS;
object2[SCREEN_TIME_CONTROLS] = 'family_center_screen_time_controls_panel';
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/parent_tools/hooks/useSelectedTab.tsx');
object[SCREEN_TIME_CONTROLS] = 'family_center_screen_time_controls_panel';
(FileImportTrackerModule).fileFinishedImporting('modules/parent_tools/hooks/useSelectedTab.tsx');
exports.default = function() {
var object = {};
object.selectedTab = require(dependencyMap[3]).useStateFromStores([FamilyCenterStore], _fun101953);
object.handleTabChange = _fun101954;
return object;
};
exports.FAMILY_CENTER_TAB_ANALYTICS_LABELS = object2;
}
exports.FAMILY_CENTER_TAB_ANALYTICS_LABELS = object;
function _default_101952() { // fn#101952, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13580:520, offset: 0x02224dcd, size: 80 bytes, params: 1, frame: 15
const useStateFromStores = UseStateFromStoresModule.useStateFromStores;
return {selectedTab: Reflect.apply(useStateFromStores, UseStateFromStoresModule, [[FamilyCenterStore], function() {
return FamilyCenterStore.getSelectedTab();
}]), handleTabChange: function(a0) {
importDefault(dependencyMap[4]).selectTab(a0);
var defaultImport2 = importDefault(dependencyMap[5]);
var FAMILY_CENTER_ACTION = AnalyticEvents.FAMILY_CENTER_ACTION;
defaultImport2.track(FAMILY_CENTER_ACTION, {action: FamilyCenterAction.TabChange, tab: a0});
}};
function _fun101953() { // fn#101953, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13580:570, offset: 0x02224e1d, size: 19 bytes, params: 1, frame: 9
return FamilyCenterStore.getSelectedTab();
}
function handleTabChange(a0) { // fn#101954, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13580:611, owner: _default_101952.handleTabChange, offset: 0x02224e30, size: 95 bytes, params: 2, frame: 16
(FamilyCenterActionCreators).selectTab(a0);
const defaultImport2 = AnalyticsUtils;
const track = defaultImport2.track;
const FAMILY_CENTER_ACTION = AnalyticEvents.FAMILY_CENTER_ACTION;
const TabChange = FamilyCenterAction.TabChange;
Reflect.apply(track, defaultImport2, [FAMILY_CENTER_ACTION, {action: TabChange, tab: a0}]);
}
}
function _default_101952() { // fn#101952, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13580:520, offset: 0x02224dcd, size: 80 bytes, params: 1, frame: 15
const useStateFromStoresModule = require(632) /* metro dependency 632: useStateFromStores */;
const useStateFromStores = useStateFromStoresModule.useStateFromStores;
return {selectedTab: Reflect.apply(useStateFromStores, useStateFromStoresModule, [[FamilyCenterStore], function() {
return FamilyCenterStore.getSelectedTab();
}]), handleTabChange: function(a0) {
importDefault(dependencyMap[4]).selectTab(a0);
var defaultImport2 = importDefault(dependencyMap[5]);
var FAMILY_CENTER_ACTION = AnalyticEvents.FAMILY_CENTER_ACTION;
defaultImport2.track(FAMILY_CENTER_ACTION, {action: FamilyCenterAction.TabChange, tab: a0});
}};
}
global.__d(_fun101951, 13390, [5116, 5117, 661, 632, 5118, 683,
2]) /* metro module 13390, dependencies: [5116, 5117, 661, 632, 5118, 683, 2] */;
@@ -1,11 +1,13 @@
/* Metro module 8172; source: modules/parent_tools/hooks/useSelectedTeen.tsx; dependencies: [1878, 5116, 632, 2] */
import UserStore from '../../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import FamilyCenterStore from '../FamilyCenterStore.tsx'; /* Metro dependency 5116 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun65591(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#65591, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8357:6, offset: 0x01bd4057, size: 143 bytes, params: 8, frame: 19
let env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const familyCenterStore = importDefault(5116) /* metro dependency 5116: FamilyCenterStore */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/parent_tools/hooks/useSelectedTeen.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/parent_tools/hooks/useSelectedTeen.tsx');
exports.useSelectedTeen = function() {
var env0_0 = require(dependencyMap[2]).useStateFromStores([FamilyCenterStore], _fun65593);
return require(dependencyMap[2]).useStateFromStores([UserStore], _fun65594);
@@ -13,24 +15,33 @@ function _fun65591(global, require, importDefault, importAll, module, exports, d
exports.useSelectedTeenId = function() {
return require(dependencyMap[2]).useStateFromStores([FamilyCenterStore], _fun65596);
};
function useSelectedTeen() { // fn#65592, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8357:214, offset: 0x01bd40e6, size: 102 bytes, params: 1, frame: 19
const env0_0 = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([FamilyCenterStore],
function() {
return FamilyCenterStore.getSelectedTeenId();
});
return (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([UserStore], _fun65594);
function _fun65593() { // fn#65593, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8357:257, offset: 0x01bd414c, size: 19 bytes, params: 1, frame: 9
return FamilyCenterStore.getSelectedTeenId();
}
function _fun65594() { // fn#65594, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8357:324, offset: 0x01bd415f, size: 39 bytes, params: 1, frame: 12
return selectedTeenId === null ? undefined : UserStore.getUser(selectedTeenId);
}
}
function useSelectedTeenId() { // fn#65595, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8357:380, offset: 0x01bd4186, size: 59 bytes, params: 1, frame: 13
return (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([FamilyCenterStore],
function() {
return FamilyCenterStore.getSelectedTeenId();
});
function _fun65596() { // fn#65596, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8357:416, offset: 0x01bd414c, size: 19 bytes, params: 1, frame: 9
return FamilyCenterStore.getSelectedTeenId();
}
}
}
function useSelectedTeen() { // fn#65592, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8357:214, offset: 0x01bd40e6, size: 102 bytes, params: 1, frame: 19
const env0_0 = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([FamilyCenterStore],
function() {
return FamilyCenterStore.getSelectedTeenId();
});
return (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([UserStore], _fun65594);
}
function useSelectedTeenId() { // fn#65595, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8357:380, offset: 0x01bd4186, size: 59 bytes, params: 1, frame: 13
return (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([FamilyCenterStore],
function() {
return FamilyCenterStore.getSelectedTeenId();
});
}
function _fun65594() { // fn#65594, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8357:324, offset: 0x01bd415f, size: 39 bytes, params: 1, frame: 12
return selectedTeenId === null ? undefined : UserStore.getUser(selectedTeenId);
}
global.__d(_fun65591, 8172, [1878, 5116, 632, 2]) /* metro module 8172, dependencies: [1878, 5116, 632, 2] */;
@@ -1,12 +1,16 @@
/* Metro module 13406; source: modules/parent_tools/hooks/useSelectedTeenUser.tsx; dependencies: [1878, 5119, 5116, 8171, 632, 2] */
import UserStore from '../../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import FamilyCenterStore from '../FamilyCenterStore.tsx'; /* Metro dependency 5116 */
import FamilyCenterControlledSettingsStore from '../FamilyCenterControlledSettingsStore.tsx'; /* Metro dependency 5119 */
import UseIsInAdultAgeGroup from './useIsInAdultAgeGroup.tsx'; /* Metro dependency 8171 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as UseStateFromStoresModule from '../../../external/discord_common/js/packages/flux/useStateFromStores.tsx'; /* Metro dependency 632 */
function _fun102022(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#102022, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13596:6, offset: 0x0222887a, size: 176 bytes, params: 8, frame: 19
let env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const familyCenterControlledSettingsStore = importDefault(5119) /* metro dependency 5119: FamilyCenterControlledSettingsStore */;
const familyCenterStore = importDefault(5116) /* metro dependency 5116: FamilyCenterStore */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/parent_tools/hooks/useSelectedTeenUser.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/parent_tools/hooks/useSelectedTeenUser.tsx');
exports.useSelectedTeenUser = function() {
var env0_0 = importDefault(dependencyMap[3])();
return require(dependencyMap[4]).useStateFromStores([FamilyCenterStore, UserStore], _fun102024);
@@ -16,48 +20,50 @@ function _fun102022(global, require, importDefault, importAll, module, exports,
return require(dependencyMap[4]).useStateFromStores([UserStore], _fun102026);
};
exports.useShouldLoadSettingsForSelectedTeenUser = useShouldLoadSettingsForSelectedTeenUser;
}
function useSelectedTeenUser() { // fn#102023, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13596:232, offset: 0x0222892a, size: 91 bytes, params: 1, frame: 15
const env0_0 = (UseIsInAdultAgeGroup)();
return (UseStateFromStoresModule).useStateFromStores([FamilyCenterStore,
UserStore], _fun102024);
function _fun102024() { // fn#102024, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13596:294, offset: 0x02228985, size: 73 bytes, params: 1, frame: 12
var value;
if (env0_0 !== true) {
value = environment.__proto__;
return UserStore.getCurrentUser();
}
value = environment.__proto__;
const selectedTeenId = FamilyCenterStore.getSelectedTeenId();
return selectedTeenId === null ? undefined : UserStore.getUser(selectedTeenId);
}
function useSelectedTeenUser() { // fn#102023, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13596:232, offset: 0x0222892a, size: 91 bytes, params: 1, frame: 15
const env0_0 = (importDefault(8171) /* metro dependency 8171: useIsInAdultAgeGroup */)();
return (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([FamilyCenterStore,
UserStore], _fun102024);
}
function useTeenUserForId(a0) { // fn#102025, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13596:422, offset: 0x022289ce, size: 66 bytes, params: 2, frame: 14
const env0_0 = a0;
return (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([UserStore], _fun102026);
}
function useShouldLoadSettingsForSelectedTeenUser() { // fn#102027, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13596:547, offset: 0x02228a35, size: 111 bytes, params: 1, frame: 15
const selectedTeenId = FamilyCenterStore.getSelectedTeenId();
const value = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStoresObject([FamilyCenterControlledSettingsStore],
_fun102028);
return selectedTeenId !== null && (!value.hasLoadedSettings && !value.isLoading);
}
function _fun102024() { // fn#102024, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13596:294, offset: 0x02228985, size: 73 bytes, params: 1, frame: 12
var value;
if (env0_0 !== true) {
value = environment.__proto__;
return UserStore.getCurrentUser();
}
value = environment.__proto__;
const selectedTeenId = FamilyCenterStore.getSelectedTeenId();
return selectedTeenId === null ? undefined : UserStore.getUser(selectedTeenId);
}
function _fun102026() { // fn#102026, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13596:457, offset: 0x02228a10, size: 37 bytes, params: 1, frame: 11
let value = environment.__proto__;
value = UserStore.getUser(env0_0);
if (value != null) {
return value;
function useTeenUserForId(a0) { // fn#102025, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13596:422, offset: 0x022289ce, size: 66 bytes, params: 2, frame: 14
const env0_0 = a0;
return (UseStateFromStoresModule).useStateFromStores([UserStore], _fun102026);
function _fun102026() { // fn#102026, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13596:457, offset: 0x02228a10, size: 37 bytes, params: 1, frame: 11
let value = environment.__proto__;
value = UserStore.getUser(env0_0);
if (value != null) {
return value;
}
}
}
function useShouldLoadSettingsForSelectedTeenUser() { // fn#102027, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13596:547, offset: 0x02228a35, size: 111 bytes, params: 1, frame: 15
const selectedTeenId = FamilyCenterStore.getSelectedTeenId();
const value = (UseStateFromStoresModule).useStateFromStoresObject([FamilyCenterControlledSettingsStore],
_fun102028);
return selectedTeenId !== null && (!value.hasLoadedSettings && !value.isLoading);
function _fun102028() { // fn#102028, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13596:620, offset: 0x02228aa4, size: 67 bytes, params: 1, frame: 13
const r1 = env0_0 != null && FamilyCenterControlledSettingsStore.hasSettingsForUser(env0_0);
const value = environment.__proto__;
return {hasLoadedSettings: r1, isLoading: FamilyCenterControlledSettingsStore.isLoading};
}
}
}
function _fun102028() { // fn#102028, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13596:620, offset: 0x02228aa4, size: 67 bytes, params: 1, frame: 13
const r1 = env0_0 != null && FamilyCenterControlledSettingsStore.hasSettingsForUser(env0_0);
const value = environment.__proto__;
return {hasLoadedSettings: r1, isLoading: FamilyCenterControlledSettingsStore.isLoading};
}
global.__d(_fun102022, 13406, [1878, 5119, 5116, 8171, 632,
2]) /* metro module 13406, dependencies: [1878, 5119, 5116, 8171, 632, 2] */;
@@ -1,18 +1,25 @@
/* Metro module 13448; source: modules/parent_tools/hooks/useTimeValue.tsx; dependencies: [31, 2, 10909] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
function _fun102277(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#102277, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13638:6, offset: 0x022358fa, size: 130 bytes, params: 8, frame: 18
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_0 = importAll(31) /* metro dependency 31 */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/parent_tools/hooks/useTimeValue.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/parent_tools/hooks/useTimeValue.tsx');
exports.default = function({initial, defaultValue}) {
return initial.useState(_fun102279);
};
exports.timeToMinutes = (require(10909) /* metro dependency 10909: FamilyCenterRestrictedHoursUtils */).timeToMinutes;
function useTimeValue({initial, defaultValue}) { // fn#102278, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13638:193, offset: 0x0223597c, size: 51 bytes, params: 2, frame: 11
return initial.useState(function() {
return initial != null ? {hours: initial.hours, minutes: initial.minutes} : defaultValue;
});
function _fun102279() { // fn#102279, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13638:262, offset: 0x022359af, size: 52 bytes, params: 1, frame: 4
return initial != null ? {hours: initial.hours, minutes: initial.minutes} : defaultValue;
}
}
}
function useTimeValue({initial, defaultValue}) { // fn#102278, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13638:193, offset: 0x0223597c, size: 51 bytes, params: 2, frame: 11
return initial.useState(function() {
return initial != null ? {hours: initial.hours, minutes: initial.minutes} : defaultValue;
});
}
global.__d(_fun102277, 13448, [31, 2, 10909]) /* metro module 13448, dependencies: [31, 2, 10909] */;
@@ -1,18 +1,25 @@
/* Metro module 13389; source: modules/parent_tools/hooks/useUserAgeGroup.tsx; dependencies: [5116, 566, 2] */
import FamilyCenterStore from '../FamilyCenterStore.tsx'; /* Metro dependency 5116 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun101948(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#101948, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13579:6, offset: 0x02224c08, size: 114 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const familyCenterStore = importDefault(5116) /* metro dependency 5116: FamilyCenterStore */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/parent_tools/hooks/useUserAgeGroup.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/parent_tools/hooks/useUserAgeGroup.tsx');
exports.default = function() {
return require(dependencyMap[1]).useStateFromStores([FamilyCenterStore], _fun101950);
};
function useUserAgeGroup() { // fn#101949, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13579:196, offset: 0x02224c7a, size: 59 bytes, params: 1, frame: 13
return (require(566) /* metro dependency 566: flux */).useStateFromStores([FamilyCenterStore], function() {
return FamilyCenterStore.getAgeGroup();
});
function _fun101950() { // fn#101950, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13579:262, offset: 0x01bd4044, size: 19 bytes, params: 1, frame: 9
return FamilyCenterStore.getAgeGroup();
}
}
}
function useUserAgeGroup() { // fn#101949, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13579:196, offset: 0x02224c7a, size: 59 bytes, params: 1, frame: 13
return (require(566) /* metro dependency 566: flux */).useStateFromStores([FamilyCenterStore], function() {
return FamilyCenterStore.getAgeGroup();
});
}
global.__d(_fun101948, 13389, [5116, 566, 2]) /* metro module 13389, dependencies: [5116, 566, 2] */;
@@ -1,16 +1,25 @@
/* Metro module 11469; source: modules/parent_tools/hooks/useUserIsConsideredAdult.tsx; dependencies: [1878, 566, 2] */
import UserStore from '../../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as FluxModule from '../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
function _fun87809(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#87809, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11655:6, offset: 0x01fcc1f4, size: 114 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/parent_tools/hooks/useUserIsConsideredAdult.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/parent_tools/hooks/useUserIsConsideredAdult.tsx');
exports.default = function() {
return require(dependencyMap[1]).useStateFromStores([UserStore], _fun87811);
};
function useUserIsConsideredAdult() { // fn#87810, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11655:205, offset: 0x01fcc266, size: 59 bytes, params: 1, frame: 13
return (FluxModule).useStateFromStores([UserStore], _fun87811);
function _fun87811() { // fn#87811, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11655:280, offset: 0x01bd378a, size: 35 bytes, params: 1, frame: 10
const value = environment.__proto__;
return UserStore.getCurrentUser()?.nsfwAllowed;
}
}
}
function useUserIsConsideredAdult() { // fn#87810, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11655:205, offset: 0x01fcc266, size: 59 bytes, params: 1, frame: 13
return (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], _fun87811);
}
global.__d(_fun87809, 11469, [1878, 566, 2]) /* metro module 11469, dependencies: [1878, 566, 2] */;
@@ -1,18 +1,21 @@
/* Metro module 13424; source: modules/parent_tools/hooks/useUserIsTeenAgeGroup.tsx; dependencies: [5116, 566, 2] */
import FamilyCenterStore from '../FamilyCenterStore.tsx'; /* Metro dependency 5116 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as FluxModule from '../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
function _fun102139(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#102139, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13614:6, offset: 0x0222e864, size: 114 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const familyCenterStore = importDefault(5116) /* metro dependency 5116: FamilyCenterStore */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/parent_tools/hooks/useUserIsTeenAgeGroup.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/parent_tools/hooks/useUserIsTeenAgeGroup.tsx');
exports.default = useUserIsTeenAgeGroup;
function useUserIsTeenAgeGroup() { // fn#102140, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13614:202, offset: 0x0222e8d6, size: 69 bytes, params: 1, frame: 13
const useStateFromStores = FluxModule.useStateFromStores;
return Reflect.apply(useStateFromStores, FluxModule, [[FamilyCenterStore], function() {
return FamilyCenterStore.getAgeGroup();
}]) === 'teen';
}
}
function useUserIsTeenAgeGroup() { // fn#102140, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13614:202, offset: 0x0222e8d6, size: 69 bytes, params: 1, frame: 13
const fluxModule = require(566) /* metro dependency 566: flux */;
const useStateFromStores = fluxModule.useStateFromStores;
return Reflect.apply(useStateFromStores, fluxModule, [[FamilyCenterStore], function() {
return FamilyCenterStore.getAgeGroup();
}]) === 'teen';
}
global.__d(_fun102139, 13424, [5116, 566, 2]) /* metro module 13424, dependencies: [5116, 566, 2] */;
@@ -1,27 +1,24 @@
/* Metro module 8170; source: modules/parent_tools/hooks/useUserLinks.tsx; dependencies: [31, 1878, 5116, 5117, 632, 8171, 8172, 5187, 2] */
import UserStore from '../../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import FamilyCenterStore from '../FamilyCenterStore.tsx'; /* Metro dependency 5116 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as UseStateFromStoresModule from '../../../external/discord_common/js/packages/flux/useStateFromStores.tsx'; /* Metro dependency 632 */
import * as FamilyCenterConstantsModule from '../FamilyCenterConstants.tsx'; /* Metro dependency 5117 */
import * as UseSelectedTeenModule from './useSelectedTeen.tsx'; /* Metro dependency 8172 */
function _fun65555(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#65555, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8355:6, offset: 0x01bd37ad, size: 392 bytes, params: 8, frame: 21
const env0_0 = require;
const closure = useUserIdsForLinkStatus;
const useUserIdsForLinkStatus2 = useUserIdsForLinkStatus;
const closure2 = function() {
return useUserIdsForLinkStatus(UserLinkStatus.ACTIVE);
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const familyCenterStore = importDefault(5116) /* metro dependency 5116: FamilyCenterStore */;
const familyCenterConstantsModule = require(5117) /* metro dependency 5117: FamilyCenterConstants */;
const env0_6 = familyCenterConstantsModule.ACCEPTED_LINK_REQUEST_TIMESTAMP_FORMATTER;
const env0_7 = familyCenterConstantsModule.FAMILY_CENTER_REQUEST_QR_CODE_URL;
const env0_8 = familyCenterConstantsModule.MAX_PARENT_TO_TEEN_ACTIVE_CONNECTIONS;
const env0_9 = familyCenterConstantsModule.MAX_TEEN_TO_PARENT_ACTIVE_CONNECTIONS;
const env0_10 = familyCenterConstantsModule.PENDING_LINK_REQUEST_TIMESTAMP_FORMATTER;
const env0_11 = familyCenterConstantsModule.UserLinkStatus;
const env0_12 = familyCenterConstantsModule.UserLinkType;
const closure3 = useUsersForLinkStatus;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/parent_tools/hooks/useUserLinks.tsx');
exports.useUserIdsForLinkStatus = closure;
exports.useUsersForLinkStatus = closure3;
const useUsersForLinkStatus2 = useUsersForLinkStatus;
(FileImportTrackerModule).fileFinishedImporting('modules/parent_tools/hooks/useUserLinks.tsx');
exports.useUserIdsForLinkStatus = useUserIdsForLinkStatus2;
exports.useUsersForLinkStatus = useUsersForLinkStatus2;
exports.useActiveLinkUserIds = closure2;
exports.useActiveLinkUsers = function() {
return useUsersForLinkStatus(UserLinkStatus.ACTIVE);
@@ -40,213 +37,218 @@ function _fun65555(global, require, importDefault, importAll, module, exports, d
};
exports.useActivityWindowTimeStamp = useActivityWindowTimeStamp;
exports.useLinkTimestampText = useLinkTimestampText;
}
function useUserIdsForLinkStatus(a0) { // fn#65556, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8355:387, offset: 0x01bd3935, size: 104 bytes, params: 2, frame: 16
const env0_0 = a0;
return ReactModule.useMemo(_fun65558,
[(require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([FamilyCenterStore],
function() {
return FamilyCenterStore.getLinkedUsers();
}), a0]);
function _fun65558() { // fn#65558, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8355:504, offset: 0x01bd39b0, size: 98 bytes, params: 1, frame: 12
const Object = global.Object;
let value = Object.values(linkedUsers);
value = value.filter(_fun65559);
value = value.sort(function(a0, a1) {
var Date = global.Date;
var value2 = new Date(a0.updated_at);
value2 = value2.getTime();
Date = global.Date;
var updated_at2 = a1.updated_at;
var value3 = Object.create(Date.prototype, {constructor: {value: Date}});
var value4 = new Date(updated_at2);
return value2 - (value4 instanceof Object ? value4 : value3).getTime();
});
value = value.map(function(a0) {
return a0.user_id;
});
return value.filter(function(a0) {
return a0 != null;
});
function _fun65559(a0) { // fn#65559, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8355:533, offset: 0x01bd3a12, size: 31 bytes, params: 2, frame: 3
var r0;
var link_status;
let value = a0 != null;
if (value) {
link_status = a0.link_status;
value = environment.__proto__;
value = link_status === env1_0;
r0 = value;
} else {
r0 = value;
}
return r0;
}
function useUserIdsForLinkStatus(a0) { // fn#65556, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8355:387, offset: 0x01bd3935, size: 104 bytes, params: 2, frame: 16
const env0_0 = a0;
return env0_3.useMemo(_fun65558,
[(require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([FamilyCenterStore],
function() {
return FamilyCenterStore.getLinkedUsers();
}), a0]);
}
}
function useUsersForLinkStatus(a0) { // fn#65564, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8355:721, offset: 0x01bd3aad, size: 93 bytes, params: 2, frame: 15
const env0_0 = useUserIdsForLinkStatus(a0);
const useStateFromStoresModule = require(632) /* metro dependency 632: useStateFromStores */;
const useStateFromStoresArray = useStateFromStoresModule.useStateFromStoresArray;
return Reflect.apply(useStateFromStoresArray, useStateFromStoresModule, [[UserStore],
_fun65565]).filter(function(a0) {
return a0 != null;
});
}
function useHasActiveParentLinks() { // fn#65570, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8355:1318, offset: 0x01bd3b71, size: 93 bytes, params: 1, frame: 15
return env0_3.useMemo(_fun65572,
[(require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([FamilyCenterStore],
function() {
return FamilyCenterStore.getLinkedUsers();
})]);
}
function useUserQRLinkUrl() { // fn#65574, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8355:1550, offset: 0x01bd3c3c, size: 133 bytes, params: 1, frame: 19
const linkCode = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([FamilyCenterStore],
function() {
return FamilyCenterStore.getLinkCode();
});
const currentUser = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([UserStore],
function() {
return UserStore.getCurrentUser();
});
const value2 = null;
return value2 == linkCode || value2 == currentUser ? value2 : FAMILY_CENTER_REQUEST_QR_CODE_URL(currentUser.id,
linkCode);
}
function usePendingRequestCount() { // fn#65578, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8355:1886, offset: 0x01bd3d11, size: 153 bytes, params: 1, frame: 19
var length;
const currentUser = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([UserStore],
function() {
return UserStore.getCurrentUser();
});
const linkedUsers = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([FamilyCenterStore],
function() {
return FamilyCenterStore.getLinkedUsers();
});
let value = 0;
if (currentUser == null) {
length = value;
} else {
value = global.Object.values(linkedUsers);
length = value.filter(_fun65581).length;
}
return length;
}
function useActivityWindowTimeStamp(a0) { // fn#65583, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8355:2285, offset: 0x01bd3dfe, size: 182 bytes, params: 2, frame: 18
var r0;
var formatUserActivityTimestamp;
var Date;
var value4;
var date;
const env0_0 = a0;
var value;
const env0_1 = (require(8172) /* metro dependency 8172: useSelectedTeen */).useSelectedTeenId();
const value2 = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([FamilyCenterStore],
_fun65584);
const value3 = null;
if (value3 == value2) {
r0 = value3;
} else {
value = require(5187) /* metro dependency 5187: FamilyCenterUtils */;
formatUserActivityTimestamp = value.formatUserActivityTimestamp;
Date = global.Date;
value4 = Object.create(Date.prototype, {constructor: {value: Date}});
date = new Date(value2);
value = Reflect.apply(formatUserActivityTimestamp, value, [(date instanceof Object ? date : value4).getTime(),
_fun65585, 7]);
r0 = value;
function useUsersForLinkStatus(a0) { // fn#65564, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8355:721, offset: 0x01bd3aad, size: 93 bytes, params: 2, frame: 15
const env0_0 = useUserIdsForLinkStatus(a0);
const useStateFromStoresArray = UseStateFromStoresModule.useStateFromStoresArray;
return Reflect.apply(useStateFromStoresArray, UseStateFromStoresModule, [[UserStore],
_fun65565]).filter(function(a0) {
return a0 != null;
});
function _fun65565() { // fn#65565, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8355:802, offset: 0x01bd3b0a, size: 28 bytes, params: 1, frame: 11
return env0_0.map(function(a0) {
return UserStore.getUser(a0);
});
}
}
return r0;
}
function useLinkTimestampText(a0, a1) { // fn#65586, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8355:2551, offset: 0x01bd3ed9, size: 153 bytes, params: 3, frame: 16
var r0;
var moduleValue2;
const env0_0 = a0;
const linkTimestamp = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([FamilyCenterStore],
_fun65587);
const value2 = null;
if (value2 != linkTimestamp) {
moduleValue2 = require(5187) /* metro dependency 5187: FamilyCenterUtils */;
r0 = moduleValue2.formatLinkTimestamp(global.Date.parse(linkTimestamp),
a1 === UserLinkStatus.PENDING ? PENDING_LINK_REQUEST_TIMESTAMP_FORMATTER : ACCEPTED_LINK_REQUEST_TIMESTAMP_FORMATTER);
} else {
r0 = value2;
function useHasActiveParentLinks() { // fn#65570, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8355:1318, offset: 0x01bd3b71, size: 93 bytes, params: 1, frame: 15
return ReactModule.useMemo(_fun65572,
[(require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([FamilyCenterStore],
function() {
return FamilyCenterStore.getLinkedUsers();
})]);
function _fun65572() { // fn#65572, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8355:1434, offset: 0x01bd3bce, size: 47 bytes, params: 1, frame: 11
const Object = global.Object;
return Object.values(linkedUsers).some(_fun65573);
function _fun65573(a0) { // fn#65573, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8355:1461, offset: 0x01bd3bfd, size: 63 bytes, params: 2, frame: 4
var r0;
var link_status;
var link_type;
let value = a0 != null;
if (value) {
link_status = a0.link_status;
value = environment.__proto__.__proto__;
value = link_status === UserLinkStatus.ACTIVE;
r0 = value;
} else {
r0 = value;
}
if (r0) {
link_type = a0.link_type;
value = environment.__proto__.__proto__;
value = link_type === UserLinkType.PARENT;
r0 = value;
}
return r0;
}
}
}
return r0;
}
function _fun65558() { // fn#65558, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8355:504, offset: 0x01bd39b0, size: 98 bytes, params: 1, frame: 12
const Object = global.Object;
let value = Object.values(linkedUsers);
value = value.filter(_fun65559);
value = value.sort(function(a0, a1) {
var Date = global.Date;
var value2 = new Date(a0.updated_at);
value2 = value2.getTime();
Date = global.Date;
var updated_at2 = a1.updated_at;
var value3 = Object.create(Date.prototype, {constructor: {value: Date}});
var value4 = new Date(updated_at2);
return value2 - (value4 instanceof Object ? value4 : value3).getTime();
});
value = value.map(function(a0) {
return a0.user_id;
});
return value.filter(function(a0) {
return a0 != null;
});
}
function _fun65565() { // fn#65565, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8355:802, offset: 0x01bd3b0a, size: 28 bytes, params: 1, frame: 11
return env0_0.map(function(a0) {
return UserStore.getUser(a0);
});
}
function _fun65572() { // fn#65572, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8355:1434, offset: 0x01bd3bce, size: 47 bytes, params: 1, frame: 11
const Object = global.Object;
return Object.values(linkedUsers).some(_fun65573);
}
function _fun65581(a0) { // fn#65581, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8355:2084, offset: 0x01bd3daa, size: 64 bytes, params: 2, frame: 4
var r0;
var link_status;
let value = a0 != null;
if (value) {
link_status = a0.link_status;
value = environment.__proto__;
value = link_status === UserLinkStatus.PENDING;
r0 = value;
} else {
r0 = value;
function useUserQRLinkUrl() { // fn#65574, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8355:1550, offset: 0x01bd3c3c, size: 133 bytes, params: 1, frame: 19
const linkCode = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([FamilyCenterStore],
function() {
return FamilyCenterStore.getLinkCode();
});
const currentUser = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([UserStore],
function() {
return UserStore.getCurrentUser();
});
const value2 = null;
return value2 == linkCode || value2 == currentUser ? value2 : FAMILY_CENTER_REQUEST_QR_CODE_URL(currentUser.id,
linkCode);
}
r0 = r0 && currentUser.id !== a0.requestor_id;
return r0;
}
function _fun65584() { // fn#65584, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8355:2392, offset: 0x01bd3eb4, size: 37 bytes, params: 1, frame: 10
var r0;
let value = null;
if (value == env0_1) {
r0 = value;
} else {
value = environment.__proto__;
value = FamilyCenterStore.getRangeStartTimestamp();
r0 = value;
function usePendingRequestCount() { // fn#65578, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8355:1886, offset: 0x01bd3d11, size: 153 bytes, params: 1, frame: 19
var length;
const currentUser = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([UserStore],
function() {
return UserStore.getCurrentUser();
});
const linkedUsers = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([FamilyCenterStore],
function() {
return FamilyCenterStore.getLinkedUsers();
});
let value = 0;
if (currentUser == null) {
length = value;
} else {
value = global.Object.values(linkedUsers);
length = value.filter(_fun65581).length;
}
return length;
function _fun65581(a0) { // fn#65581, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8355:2084, offset: 0x01bd3daa, size: 64 bytes, params: 2, frame: 4
var r0;
var link_status;
let value = a0 != null;
if (value) {
link_status = a0.link_status;
value = environment.__proto__;
value = link_status === UserLinkStatus.PENDING;
r0 = value;
} else {
r0 = value;
}
r0 = r0 && currentUser.id !== a0.requestor_id;
return r0;
}
}
return r0;
}
function _fun65587() { // fn#65587, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8355:2624, offset: 0x01bd3f72, size: 29 bytes, params: 1, frame: 11
return FamilyCenterStore.getLinkTimestamp(env0_0);
}
function useActivityWindowTimeStamp(a0) { // fn#65583, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8355:2285, offset: 0x01bd3dfe, size: 182 bytes, params: 2, frame: 18
var r0;
var formatUserActivityTimestamp;
var Date;
var value4;
var date;
const env0_0 = a0;
var value;
const env0_1 = (UseSelectedTeenModule).useSelectedTeenId();
const value2 = (UseStateFromStoresModule).useStateFromStores([FamilyCenterStore],
_fun65584);
const value3 = null;
if (value3 == value2) {
r0 = value3;
} else {
value = require(5187) /* metro dependency 5187: FamilyCenterUtils */;
formatUserActivityTimestamp = value.formatUserActivityTimestamp;
Date = global.Date;
value4 = Object.create(Date.prototype, {constructor: {value: Date}});
date = new Date(value2);
value = Reflect.apply(formatUserActivityTimestamp, value, [(date instanceof Object ? date : value4).getTime(),
_fun65585, 7]);
r0 = value;
}
return r0;
function _fun65584() { // fn#65584, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8355:2392, offset: 0x01bd3eb4, size: 37 bytes, params: 1, frame: 10
var r0;
let value = null;
if (value == env0_1) {
r0 = value;
} else {
value = environment.__proto__;
value = FamilyCenterStore.getRangeStartTimestamp();
r0 = value;
}
return r0;
}
function _fun65585() { // fn#65585, offset: 0x00c36f09, size: 9 bytes, params: 1, frame: 1
return env0_0;
}
function _fun65559(a0) { // fn#65559, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8355:533, offset: 0x01bd3a12, size: 31 bytes, params: 2, frame: 3
var r0;
var link_status;
let value = a0 != null;
if (value) {
link_status = a0.link_status;
value = environment.__proto__;
value = link_status === env1_0;
r0 = value;
} else {
r0 = value;
}
return r0;
}
function _fun65573(a0) { // fn#65573, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8355:1461, offset: 0x01bd3bfd, size: 63 bytes, params: 2, frame: 4
var r0;
var link_status;
var link_type;
let value = a0 != null;
if (value) {
link_status = a0.link_status;
value = environment.__proto__.__proto__;
value = link_status === UserLinkStatus.ACTIVE;
r0 = value;
} else {
r0 = value;
}
if (r0) {
link_type = a0.link_type;
value = environment.__proto__.__proto__;
value = link_type === UserLinkType.PARENT;
r0 = value;
function useLinkTimestampText(a0, a1) { // fn#65586, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8355:2551, offset: 0x01bd3ed9, size: 153 bytes, params: 3, frame: 16
var r0;
var moduleValue2;
const env0_0 = a0;
const linkTimestamp = (UseStateFromStoresModule).useStateFromStores([FamilyCenterStore],
_fun65587);
const value2 = null;
if (value2 != linkTimestamp) {
moduleValue2 = require(5187) /* metro dependency 5187: FamilyCenterUtils */;
r0 = moduleValue2.formatLinkTimestamp(global.Date.parse(linkTimestamp),
a1 === UserLinkStatus.PENDING ? PENDING_LINK_REQUEST_TIMESTAMP_FORMATTER : ACCEPTED_LINK_REQUEST_TIMESTAMP_FORMATTER);
} else {
r0 = value2;
}
return r0;
function _fun65587() { // fn#65587, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8355:2624, offset: 0x01bd3f72, size: 29 bytes, params: 1, frame: 11
return FamilyCenterStore.getLinkTimestamp(env0_0);
}
}
return r0;
}
global.__d(_fun65555, 8170, [31, 1878, 5116, 5117, 632, 8171, 8172, 5187,
2]) /* metro module 8170, dependencies: [31, 1878, 5116, 5117, 632, 8171, 8172, 5187, 2] */;