decord/source/modules/parent_tools/native/RestrictedHoursModal.tsx

253 lines
11 KiB
TypeScript
Raw Normal View History

2026-08-24 06:08:38 +00:00
// Module ID: 16602
// Function ID: 16603
2026-07-20 16:05:17 +00:00
// Name: RestrictedHoursLogoutBlockingLayer
2026-08-24 06:08:38 +00:00
// Dependencies: [32, 19, 17, 1922, 21, 4668, 712, 5451, 1629, 16603, 589, 4119, 4671, 1236, 2336, 5445, 16604, 4107, 4739, 6343, 16605, 5261, 16601, 4737, 11154, 2]
2026-07-20 16:05:17 +00:00
// Exports: default
2026-08-24 06:08:38 +00:00
// Module 16602 (RestrictedHoursLogoutBlockingLayer)
import ThemesDefault from "Themes" /* 712 */;
import useBackPressHandlerDefault from "useBackPressHandler" /* 4737 */;
import ActivityIndicator from "ActivityIndicator" /* 5451 */;
import useIsInRestrictedHoursDefault from "useIsInRestrictedHours" /* 16605 */;
import closure_3 from "_slicedToArray" /* 32 */;
import closure_4 from "noop" /* 19 */;
import get_ActivityIndicator from "get ActivityIndicator" /* 17 */;
import closure_6 from "mergeGuildAvatar" /* 1922 */;
import jsxProd from "jsxProd" /* 21 */;
import createCacheKey from "createCacheKey" /* 4668 */;
2026-07-23 10:11:24 +00:00
2026-08-24 06:08:38 +00:00
require = arg1;
2026-07-20 16:05:17 +00:00
function RestrictedHoursLogoutBlockingLayer(visible) {
let tmp2 = null;
if (visible.visible) {
2026-07-29 08:29:29 +00:00
const obj = { style: null, pointerEvents: "auto", accessibilityLiveRegion: "polite", children: null };
obj[0] = tmp.logoutBlockingLayer;
2026-08-24 06:08:38 +00:00
obj[3] = callback2(ActivityIndicator.ActivityIndicator, { size: "large" });
2026-07-20 16:05:17 +00:00
tmp2 = callback2(closure_5, obj);
}
return tmp2;
}
function RestrictedHoursScreen(visible) {
2026-07-23 10:11:24 +00:00
const onLogin = visible.onLogin;
2026-07-29 08:29:29 +00:00
let sharedValue;
let sharedValue1;
let sharedValue2;
let sharedValue3;
2026-08-24 06:08:38 +00:00
const tmp = callback4();
2026-07-23 10:11:24 +00:00
({ top, bottom } = sharedValue(sharedValue1[8])());
2026-07-29 08:29:29 +00:00
const tmp5 = sharedValue(sharedValue1[9])();
2026-07-23 10:11:24 +00:00
let obj = onLogin(sharedValue1[10]);
2026-08-24 06:08:38 +00:00
let items = [closure_6];
2026-07-20 16:05:17 +00:00
const stateFromStores = obj.useStateFromStores(items, () => {
2026-07-29 08:29:29 +00:00
currentUser = currentUser.getCurrentUser();
let str;
if (currentUser != null) {
str = currentUser.username;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
if (str == null) {
str = "";
2026-07-20 16:05:17 +00:00
}
return str;
});
2026-08-24 06:08:38 +00:00
obj1 = onLogin(sharedValue1[11]);
2026-07-23 10:11:24 +00:00
sharedValue = obj1.useSharedValue(0);
let obj2 = onLogin(sharedValue1[11]);
sharedValue1 = obj2.useSharedValue(0);
let obj3 = onLogin(sharedValue1[11]);
2026-07-29 08:29:29 +00:00
sharedValue2 = obj3.useSharedValue(0);
2026-07-23 10:11:24 +00:00
let obj4 = onLogin(sharedValue1[11]);
2026-07-29 08:29:29 +00:00
sharedValue3 = obj4.useSharedValue(0.9);
2026-07-20 16:05:17 +00:00
const items1 = [sharedValue, sharedValue1, sharedValue2, sharedValue3];
2026-07-23 10:11:24 +00:00
const effect = sharedValue3.useEffect(() => {
2026-07-20 16:05:17 +00:00
let obj = onLogin(sharedValue1[12]);
2026-07-29 08:29:29 +00:00
obj = { duration: 3000, easing: null };
2026-07-20 16:05:17 +00:00
const Easing = onLogin(sharedValue1[11]).Easing;
2026-07-29 08:29:29 +00:00
obj[1] = Easing.bezier(0.24, 0.27, 0.58, 1);
2026-07-20 16:05:17 +00:00
const result = sharedValue.set(obj.withTiming(1, obj));
let obj2 = onLogin(sharedValue1[11]);
2026-07-29 08:29:29 +00:00
obj = { duration: 1500, easing: null };
2026-07-20 16:05:17 +00:00
const Easing2 = onLogin(sharedValue1[11]).Easing;
2026-07-29 08:29:29 +00:00
obj[1] = Easing2.bezier(0, 0, 1, 1);
2026-07-20 16:05:17 +00:00
const result1 = sharedValue1.set(obj2.withDelay(1500, onLogin(sharedValue1[12]).withTiming(1, obj)));
const obj4 = onLogin(sharedValue1[12]);
const obj6 = onLogin(sharedValue1[11]);
2026-08-24 06:08:38 +00:00
obj1 = { duration: 1000, easing: null };
2026-07-20 16:05:17 +00:00
const Easing3 = onLogin(sharedValue1[11]).Easing;
2026-07-29 08:29:29 +00:00
obj1[1] = Easing3.bezier(0.1, 0.24, 0.32, 1);
2026-07-20 16:05:17 +00:00
const result2 = sharedValue2.set(obj6.withDelay(2000, onLogin(sharedValue1[12]).withTiming(1, obj1)));
const obj7 = onLogin(sharedValue1[12]);
const obj9 = onLogin(sharedValue1[11]);
2026-07-29 08:29:29 +00:00
obj2 = { duration: 1000, easing: null };
2026-07-20 16:05:17 +00:00
const Easing4 = onLogin(sharedValue1[11]).Easing;
2026-07-29 08:29:29 +00:00
obj2[1] = Easing4.bezier(0.1, 0.24, 0.32, 1);
2026-07-20 16:05:17 +00:00
const result3 = sharedValue3.set(obj9.withDelay(2000, onLogin(sharedValue1[12]).withTiming(1, obj2)));
}, items1);
2026-07-23 10:11:24 +00:00
let obj5 = onLogin(sharedValue1[11]);
2026-07-20 16:05:17 +00:00
class M {
constructor() {
2026-08-24 06:08:38 +00:00
obj = { opacity: closure_1.get() };
2026-07-20 16:05:17 +00:00
return obj;
}
}
M.__closure = { backgroundOpacity: sharedValue };
M.__workletHash = 17073775693336;
2026-07-29 08:29:29 +00:00
M.__initData = closure_13;
2026-07-20 16:05:17 +00:00
const animatedStyle = obj5.useAnimatedStyle(M);
2026-07-23 10:11:24 +00:00
let obj6 = onLogin(sharedValue1[11]);
2026-07-20 16:05:17 +00:00
class O {
constructor() {
2026-08-24 06:08:38 +00:00
obj = { opacity: closure_2.get() };
2026-07-20 16:05:17 +00:00
return obj;
}
}
O.__closure = { gradientOpacity: sharedValue1 };
O.__workletHash = 16592270370139;
2026-07-29 08:29:29 +00:00
O.__initData = closure_14;
2026-07-20 16:05:17 +00:00
const animatedStyle1 = obj6.useAnimatedStyle(O);
2026-07-23 10:11:24 +00:00
let obj7 = onLogin(sharedValue1[11]);
2026-07-20 16:05:17 +00:00
const fn = function z() {
2026-07-29 08:29:29 +00:00
let obj = { opacity: sharedValue2.get(), transform: null };
2026-07-20 16:05:17 +00:00
obj = { scale: sharedValue3.get() };
const items = [obj];
2026-07-29 08:29:29 +00:00
obj[1] = items;
2026-07-20 16:05:17 +00:00
return obj;
};
fn.__closure = { contentOpacity: sharedValue2, contentScale: sharedValue3 };
fn.__workletHash = 15616799997783;
2026-07-29 08:29:29 +00:00
fn.__initData = closure_15;
2026-07-20 16:05:17 +00:00
const animatedStyle2 = obj7.useAnimatedStyle(fn);
2026-07-29 08:29:29 +00:00
if (null != tmp5) {
const intl2 = tmp6(tmp3[13]).intl;
obj = { endTime: null };
obj[0] = tmp5;
let formatResult = intl2.format(tmp2(tmp3[14]).VfqJvY, obj);
2026-07-20 16:05:17 +00:00
} else {
2026-07-29 08:29:29 +00:00
const intl = tmp6(tmp3[13]).intl;
formatResult = intl.string(tmp2(tmp3[14]).abikhN);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
obj = { backgroundColor: c9, children: null };
obj1 = { style: items2, children: null };
2026-07-23 10:11:24 +00:00
items2 = [tmp.container, { paddingTop: top, paddingBottom: bottom }, animatedStyle];
2026-07-20 16:05:17 +00:00
obj2 = { style: tmp.backgroundFill, pointerEvents: "none" };
const items3 = [callback2(closure_5, obj2), , , ];
2026-07-29 08:29:29 +00:00
obj3 = { style: items4, pointerEvents: "none", children: null };
2026-07-23 10:11:24 +00:00
items4 = [tmp.assetLayers, animatedStyle1];
2026-08-24 06:08:38 +00:00
obj4 = { source: tmp6(tmp3[16]), resizeMode: "cover", style: tmp.sunbeamGradient };
2026-07-29 08:29:29 +00:00
obj3[2] = callback2(sharedValue(sharedValue1[11]).Image, obj4);
2026-07-23 10:11:24 +00:00
items3[1] = callback2(sharedValue(sharedValue1[11]).View, obj3);
2026-07-29 08:29:29 +00:00
obj5 = { style: items5, children: null };
2026-07-23 10:11:24 +00:00
items5 = [tmp.content, animatedStyle2];
2026-08-24 06:08:38 +00:00
obj6 = { style: tmp.riveContainer, children: callback2(tmp6(tmp3[17]).TeenScreenTimeRive, { artboard: "Teen Screen Time Illo", stateMachine: "State Machine 1" }) };
2026-07-20 16:05:17 +00:00
const items6 = [callback2(closure_5, obj6), ];
2026-07-23 10:11:24 +00:00
obj7 = { variant: "text-lg/medium", color: "text-overlay-light", style: tmp.description, children: formatResult };
items6[1] = callback2(onLogin(sharedValue1[18]).Text, obj7);
2026-07-29 08:29:29 +00:00
obj5[1] = items6;
2026-07-23 10:11:24 +00:00
items3[2] = callback3(sharedValue(sharedValue1[11]).View, obj5);
2026-07-29 08:29:29 +00:00
const obj8 = { style: tmp.footer, children: null };
let obj9 = { variant: "text-sm/medium", color: "text-subtle", style: tmp.description, children: null };
const intl3 = tmp6(tmp3[13]).intl;
obj9[3] = intl3.format(sharedValue(sharedValue1[14]).iqeKDz, {
2026-07-20 16:05:17 +00:00
username: stateFromStores,
loginHook(children) {
2026-08-24 06:08:38 +00:00
return closure_1_7(onLogin(sharedValue1[18]).Text, { variant: "text-sm/normal", color: "text-link", onPress: onLogin, children }, arg1);
2026-07-20 16:05:17 +00:00
}
});
2026-07-29 08:29:29 +00:00
obj8[1] = callback2(onLogin(sharedValue1[18]).Text, obj9);
2026-07-20 16:05:17 +00:00
items3[3] = callback2(closure_5, obj8);
2026-07-29 08:29:29 +00:00
obj1[1] = items3;
2026-07-23 10:11:24 +00:00
const items7 = [callback3(sharedValue(sharedValue1[11]).View, obj1), callback2(RestrictedHoursLogoutBlockingLayer, { visible: visible.logoutRequestInFlight })];
2026-07-29 08:29:29 +00:00
obj[1] = items7;
2026-07-23 10:11:24 +00:00
return callback3(onLogin(sharedValue1[15]).ModalScreen, obj);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
({ StyleSheet, View: c5 } = get_ActivityIndicator);
2026-08-24 06:08:38 +00:00
({ jsx: error, jsxs: closure_8 } = jsxProd);
2026-07-23 10:11:24 +00:00
let c9 = "rgb(0, 3, 40)";
2026-07-29 08:29:29 +00:00
createCacheKey = { container: null, backgroundFill: null, assetLayers: null, sunbeamGradient: null, riveContainer: null, content: null, description: null, footer: null, logoutBlockingLayer: null };
2026-08-24 06:08:38 +00:00
createCacheKey = { flex: 1, justifyContent: "center", alignItems: "center", paddingHorizontal: ThemesDefault.space.PX_24 };
2026-07-29 08:29:29 +00:00
createCacheKey[0] = createCacheKey;
2026-07-23 10:11:24 +00:00
let obj1 = {};
2026-07-20 16:05:17 +00:00
const merged = Object.assign(StyleSheet.absoluteFillObject);
2026-07-29 08:29:29 +00:00
obj1.zIndex = 0;
obj1.backgroundColor = "rgb(0, 3, 40)";
createCacheKey[1] = obj1;
2026-07-23 10:11:24 +00:00
let obj2 = {};
2026-07-20 16:05:17 +00:00
const merged1 = Object.assign(StyleSheet.absoluteFillObject);
2026-07-29 08:29:29 +00:00
obj2.zIndex = 1;
createCacheKey[2] = obj2;
2026-07-20 16:05:17 +00:00
const merged2 = Object.assign(StyleSheet.absoluteFillObject);
2026-07-29 08:29:29 +00:00
createCacheKey[3] = {};
createCacheKey[4] = { width: "100%", maxWidth: 523, height: 300 };
2026-08-24 06:08:38 +00:00
createCacheKey[5] = { alignItems: "center", width: "100%", gap: ThemesDefault.space.PX_16, zIndex: 2 };
2026-07-29 08:29:29 +00:00
createCacheKey[6] = { textAlign: "center" };
let obj3 = {};
2026-08-24 06:08:38 +00:00
let obj4 = { alignItems: "center", width: "100%", gap: ThemesDefault.space.PX_16, zIndex: 2 };
createCacheKey[7] = { position: "absolute", bottom: ThemesDefault.space.PX_32, alignSelf: "center", zIndex: 2 };
2026-07-23 10:11:24 +00:00
let obj6 = {};
2026-07-20 16:05:17 +00:00
const merged3 = Object.assign(StyleSheet.absoluteFillObject);
2026-07-29 08:29:29 +00:00
obj6.zIndex = 10;
obj6.justifyContent = "center";
obj6.alignItems = "center";
obj6.backgroundColor = "rgb(0, 3, 40)";
createCacheKey[8] = obj6;
2026-08-24 06:08:38 +00:00
let closure_10 = createCacheKey.createStyles(createCacheKey);
2026-07-20 16:05:17 +00:00
let closure_11 = { MAIN: "main" };
2026-07-29 08:29:29 +00:00
let closure_13 = { code: "function RestrictedHoursModalTsx1(){const{backgroundOpacity}=this.__closure;return{opacity:backgroundOpacity.get()};}" };
let closure_14 = { code: "function RestrictedHoursModalTsx2(){const{gradientOpacity}=this.__closure;return{opacity:gradientOpacity.get()};}" };
let closure_15 = { code: "function RestrictedHoursModalTsx3(){const{contentOpacity,contentScale}=this.__closure;return{opacity:contentOpacity.get(),transform:[{scale:contentScale.get()}]};}" };
2026-08-24 06:08:38 +00:00
let obj5 = { position: "absolute", bottom: ThemesDefault.space.PX_32, alignSelf: "center", zIndex: 2 };
let result = require("set").fileFinishedImporting("modules/parent_tools/native/RestrictedHoursModal.tsx");
2026-07-20 16:05:17 +00:00
export default function RestrictedHoursModal() {
2026-08-24 06:08:38 +00:00
const tmp = useIsInRestrictedHoursDefault();
2026-07-29 08:29:29 +00:00
let callback = tmp;
2026-07-23 10:11:24 +00:00
importDefault = React.useRef(false);
2026-08-24 06:08:38 +00:00
dependencyMap = React.useRef(true);
2026-07-20 16:05:17 +00:00
const effect = React.useEffect(() => {
closure_2.current = true;
return () => {
2026-07-29 08:29:29 +00:00
closure_2.current = false;
2026-07-20 16:05:17 +00:00
};
}, []);
2026-08-24 06:08:38 +00:00
[tmp4, closure_3] = callback(React.useState(false), 2);
2026-07-29 08:29:29 +00:00
callback = React.useCallback(() => {
if (!tmp4.current) {
tmp.current = true;
2026-07-20 16:05:17 +00:00
callback(true);
2026-08-24 06:08:38 +00:00
const obj = tmp4(5261);
tmp4(5261).logout("restricted_hours").finally(() => {
2026-07-29 08:29:29 +00:00
if (ref.current) {
closure_1.current = false;
callback(false);
2026-07-20 16:05:17 +00:00
}
});
2026-08-24 06:08:38 +00:00
const logoutResult = tmp4(5261).logout("restricted_hours");
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
}, []);
importDefault = tmp4;
2026-08-24 06:08:38 +00:00
let obj = callback(6343);
2026-07-29 08:29:29 +00:00
const items = [callback, tmp4];
const items1 = [tmp];
const navigatorScreens = obj.useNavigatorScreens(() => ({
2026-08-24 06:08:38 +00:00
[closure_1_11.MAIN]: {
2026-07-29 08:29:29 +00:00
headerShown: false,
gestureEnabled: false,
render() {
2026-08-24 06:08:38 +00:00
return closure_1_7(closure_1_16, { onLogin: closure_0, logoutRequestInFlight: closure_1 });
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
}
}), items);
const effect1 = React.useEffect(() => {
let current = callback;
if (!callback) {
current = tmp4.current;
}
if (!current) {
2026-08-24 06:08:38 +00:00
const result = callback(16601).closeRestrictedHoursModal();
const obj = callback(16601);
2026-07-29 08:29:29 +00:00
}
}, items1);
2026-08-24 06:08:38 +00:00
useBackPressHandlerDefault(() => true);
2026-07-29 08:29:29 +00:00
obj = { screens: navigatorScreens, initialRouteName: constants.MAIN };
2026-08-24 06:08:38 +00:00
return callback2(callback(11154).Modal, obj);
2026-07-20 16:05:17 +00:00
};