133 lines
5.3 KiB
TypeScript
133 lines
5.3 KiB
TypeScript
// Module ID: 15315
|
|
// Function ID: 15316
|
|
// Name: TinyBroncoNoticeVisibility
|
|
// Dependencies: [1390, 1998, 5921, 5920, 558, 576, 504, 2]
|
|
// Exports: shouldShowAgeNotice
|
|
|
|
// Module 15315 (TinyBroncoNoticeVisibility)
|
|
import react from "react" /* 576 */;
|
|
import Server from "Server" /* 1998 */;
|
|
import AgeGatedFeature from "AgeGatedFeature" /* 5920 */;
|
|
import RegionalFeatureConfigUtils from "RegionalFeatureConfigUtils" /* 5921 */;
|
|
import UserStore from "UserStore" /* 1390 */;
|
|
import ReactCompilerGating_mod from "ReactCompilerGating" /* 558 */;
|
|
import size from "module_2" /* 2 */;
|
|
|
|
let tmp;
|
|
const get_initialized = tmp(504);
|
|
let ReactCompilerGating = ReactCompilerGating_mod;
|
|
const tmp2 = ReactCompilerGating.isReactCompilerEnabled() ? (function useShouldShowAgeNotice() {
|
|
let tmp5;
|
|
let tmp6;
|
|
const obj = react;
|
|
const cResult = obj.c(2);
|
|
const obj2 = RegionalFeatureConfigUtils;
|
|
let isFeatureAgeGated = obj2.useIsFeatureAgeGated(AgeGatedFeature.AgeGatedFeature.NOTICE);
|
|
if (cResult[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
const items = [UserStore];
|
|
const fn = function o() {
|
|
currentUser = currentUser.getCurrentUser();
|
|
let prop;
|
|
if (currentUser != null) {
|
|
prop = currentUser.ageVerificationStatus;
|
|
}
|
|
const tmp3 = null != prop && prop !== Server.AgeVerificationStatusUkAndAusOnly.VERIFIED_ADULT && prop !== Server.AgeVerificationStatusUkAndAusOnly.VERIFIED_TEEN;
|
|
return tmp3;
|
|
};
|
|
cResult[0] = items;
|
|
cResult[1] = fn;
|
|
tmp5 = items;
|
|
tmp6 = fn;
|
|
} else {
|
|
[tmp5, tmp6] = cResult;
|
|
}
|
|
const tmpResult = get_initialized;
|
|
if (isFeatureAgeGated) {
|
|
isFeatureAgeGated = tmpResult.useStateFromStores(tmp5, tmp6);
|
|
}
|
|
return isFeatureAgeGated;
|
|
}) : (function useShouldShowAgeNotice() {
|
|
const obj = RegionalFeatureConfigUtils;
|
|
let isFeatureAgeGated = obj.useIsFeatureAgeGated(AgeGatedFeature.AgeGatedFeature.NOTICE);
|
|
const items = [UserStore];
|
|
const obj2 = get_initialized;
|
|
if (isFeatureAgeGated) {
|
|
isFeatureAgeGated = obj2.useStateFromStores(items, () => {
|
|
currentUser = currentUser.getCurrentUser();
|
|
let prop;
|
|
if (currentUser != null) {
|
|
prop = currentUser.ageVerificationStatus;
|
|
}
|
|
const tmp3 = null != prop && prop !== Server.AgeVerificationStatusUkAndAusOnly.VERIFIED_ADULT && prop !== Server.AgeVerificationStatusUkAndAusOnly.VERIFIED_TEEN;
|
|
return tmp3;
|
|
});
|
|
}
|
|
return isFeatureAgeGated;
|
|
});
|
|
ReactCompilerGating = ReactCompilerGating_mod;
|
|
let tmp3 = ReactCompilerGating.isReactCompilerEnabled() ? (function useShouldShowAgeNoticePromo() {
|
|
let tmp5;
|
|
let tmp6;
|
|
const obj = react;
|
|
const cResult = obj.c(2);
|
|
const obj2 = RegionalFeatureConfigUtils;
|
|
let isFeatureAgeGated = obj2.useIsFeatureAgeGated(AgeGatedFeature.AgeGatedFeature.NOTICE);
|
|
if (cResult[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
const items = [UserStore];
|
|
const fn = function o() {
|
|
currentUser = currentUser.getCurrentUser();
|
|
let prop;
|
|
if (currentUser != null) {
|
|
prop = currentUser.ageVerificationStatus;
|
|
}
|
|
const tmp3 = null != prop && prop !== Server.AgeVerificationStatusUkAndAusOnly.VERIFIED_ADULT && prop !== Server.AgeVerificationStatusUkAndAusOnly.VERIFIED_TEEN && prop !== Server.AgeVerificationStatusUkAndAusOnly.INFERRED_ADULT;
|
|
return tmp3;
|
|
};
|
|
cResult[0] = items;
|
|
cResult[1] = fn;
|
|
tmp5 = items;
|
|
tmp6 = fn;
|
|
} else {
|
|
[tmp5, tmp6] = cResult;
|
|
}
|
|
const tmpResult = get_initialized;
|
|
if (isFeatureAgeGated) {
|
|
isFeatureAgeGated = tmpResult.useStateFromStores(tmp5, tmp6);
|
|
}
|
|
return isFeatureAgeGated;
|
|
}) : (function useShouldShowAgeNoticePromo() {
|
|
const obj = RegionalFeatureConfigUtils;
|
|
let isFeatureAgeGated = obj.useIsFeatureAgeGated(AgeGatedFeature.AgeGatedFeature.NOTICE);
|
|
const items = [UserStore];
|
|
const obj2 = get_initialized;
|
|
if (isFeatureAgeGated) {
|
|
isFeatureAgeGated = obj2.useStateFromStores(items, () => {
|
|
currentUser = currentUser.getCurrentUser();
|
|
let prop;
|
|
if (currentUser != null) {
|
|
prop = currentUser.ageVerificationStatus;
|
|
}
|
|
const tmp3 = null != prop && prop !== Server.AgeVerificationStatusUkAndAusOnly.VERIFIED_ADULT && prop !== Server.AgeVerificationStatusUkAndAusOnly.VERIFIED_TEEN && prop !== Server.AgeVerificationStatusUkAndAusOnly.INFERRED_ADULT;
|
|
return tmp3;
|
|
});
|
|
}
|
|
return isFeatureAgeGated;
|
|
});
|
|
const result = size.fileFinishedImporting("modules/tiny_bronco/TinyBroncoNoticeVisibility.tsx");
|
|
|
|
export const shouldShowAgeNotice = function shouldShowAgeNotice() {
|
|
const obj = RegionalFeatureConfigUtils;
|
|
let isFeatureAgeGatedResult = obj.isFeatureAgeGated(AgeGatedFeature.AgeGatedFeature.NOTICE);
|
|
if (isFeatureAgeGatedResult) {
|
|
const currentUser = UserStore.getCurrentUser();
|
|
let prop;
|
|
if (currentUser != null) {
|
|
prop = currentUser.ageVerificationStatus;
|
|
}
|
|
isFeatureAgeGatedResult = null != prop && prop !== Server.AgeVerificationStatusUkAndAusOnly.VERIFIED_ADULT && prop !== Server.AgeVerificationStatusUkAndAusOnly.VERIFIED_TEEN;
|
|
null != prop && prop !== Server.AgeVerificationStatusUkAndAusOnly.VERIFIED_ADULT && prop !== Server.AgeVerificationStatusUkAndAusOnly.VERIFIED_TEEN;
|
|
}
|
|
return isFeatureAgeGatedResult;
|
|
};
|
|
export const useShouldShowAgeNotice = tmp2;
|
|
export const useShouldShowAgeNoticePromo = tmp3;
|