894 lines
38 KiB
TypeScript
894 lines
38 KiB
TypeScript
/* Metro module 4813; source: modules/age_assurance/AgeVerificationUtils.tsx; dependencies: [5, 57, 31, 3836, 1226, 4814, 1878, 5261, 5262, 661, 1229, 6263, 5074, 4861, 3835, 1909, 566, 694, 6257, 5263, 6264, 6266, 1244, 2742, 6267, 2] */
|
|
function _fun41747(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#41747, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4991:6, offset: 0x01127097, size: 940 bytes, params: 8, frame: 26
|
|
const env0_0 = require;
|
|
const isReactiveCheckEnabled = function() {
|
|
return RegionalFeatureConfigStore.isFeatureAgeGated(require(dependencyMap[13]).AgeGatedFeature.REACTIVE_CHECK);
|
|
};
|
|
const closure = function() {
|
|
return require(dependencyMap[16]).useStateFromStores([UserStore], _fun41751);
|
|
};
|
|
const closure2 = isAgeVerified;
|
|
const closure3 = useIsAgeVerified;
|
|
const closure4 = useShouldCallReactiveCheck;
|
|
const closure5 = shouldCallReactiveCheck;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
const env0_3 = importDefault(5) /* metro dependency 5 */;
|
|
const env0_4 = importDefault(57) /* metro dependency 57 */;
|
|
const env0_5 = importAll(31) /* metro dependency 31 */;
|
|
const regionalFeatureConfigStore = importDefault(3836) /* metro dependency 3836: RegionalFeatureConfigStore */;
|
|
const authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
|
|
const messageStore = importDefault(4814) /* metro dependency 4814: MessageStore */;
|
|
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
|
|
const ageVerificationStore = importDefault(5261) /* metro dependency 5261: AgeVerificationStore */;
|
|
const env0_11 = (require(5262) /* metro dependency 5262: AgeVerificationConstants */).FULLSCREEN_AGE_VERIFICATION_ENTRY_POINTS;
|
|
const env0_12 = (require(661) /* metro dependency 661: Constants */).MessageEmbedTypes;
|
|
const ageGateConstantsModule = require(1229) /* metro dependency 1229: AgeGateConstants */;
|
|
const AgeGateSource = ageGateConstantsModule.AgeGateSource;
|
|
const env0_13 = ageGateConstantsModule.REACTIVE_CHECK_AGE_GATE_SOURCES;
|
|
const env0_14 = (require(6263) /* metro dependency 6263: Constants */).SafetyToastType;
|
|
let Set = global.Set;
|
|
const {STAGE_CHANNEL_AGE_VERIFICATION_PROMPT, START_STAGE_PROMPT,
|
|
STAGE_CHANNEL_RAISE_HAND} = (require(5074) /* metro dependency 5074: AgeVerificationAnalyticsUtils */).AgeVerificationModalEntryPoint;
|
|
let set = new Set([STAGE_CHANNEL_AGE_VERIFICATION_PROMPT, START_STAGE_PROMPT, STAGE_CHANNEL_RAISE_HAND]);
|
|
Set = global.Set;
|
|
const NSFW_SERVER = AgeGateSource.NSFW_SERVER;
|
|
const NSFW_SERVER_INVITE = AgeGateSource.NSFW_SERVER_INVITE;
|
|
const NSFW_SERVER_INVITE_EMBED = AgeGateSource.NSFW_SERVER_INVITE_EMBED;
|
|
const LARGE_GUILD = AgeGateSource.LARGE_GUILD;
|
|
const JOIN_LARGE_GUILD_UNDERAGE = AgeGateSource.JOIN_LARGE_GUILD_UNDERAGE;
|
|
const ACCESS_LARGE_GUILD_UNDERAGE = AgeGateSource.ACCESS_LARGE_GUILD_UNDERAGE;
|
|
set = new Set([NSFW_SERVER, NSFW_SERVER_INVITE, NSFW_SERVER_INVITE_EMBED, LARGE_GUILD, JOIN_LARGE_GUILD_UNDERAGE,
|
|
ACCESS_LARGE_GUILD_UNDERAGE]);
|
|
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/age_assurance/AgeVerificationUtils.tsx');
|
|
exports.ageGateSourceHasLightboxBackdrop = ageGateSourceHasLightboxBackdrop;
|
|
exports.shouldShowTiggerPawtect = shouldShowTiggerPawtect;
|
|
exports.useShouldShowTiggerPawtect = useShouldShowTiggerPawtect;
|
|
exports.isVerifiedTeen = function() {
|
|
return UserStore.getCurrentUser()?.ageVerificationStatus === require(dependencyMap[15]).AgeVerificationStatusUkAndAusOnly.VERIFIED_TEEN;
|
|
};
|
|
exports.useIsVerifiedTeen = function() {
|
|
var value2 = undefined;
|
|
var value3 = require(dependencyMap[16]).useStateFromStores([UserStore], _fun41767);
|
|
return (value3 == null ? value2 : value3.ageVerificationStatus) === require(dependencyMap[15]).AgeVerificationStatusUkAndAusOnly.VERIFIED_TEEN;
|
|
};
|
|
exports.isVerifiedAdult = isVerifiedAdult;
|
|
exports.useIsVerifiedAdult = useIsVerifiedAdult;
|
|
exports.useIsExplicitlyVerifiedAdult = function() {
|
|
var value2 = undefined;
|
|
var value3 = require(dependencyMap[16]).useStateFromStores([UserStore], _fun41772);
|
|
return (value3 == null ? value2 : value3.ageVerificationStatus) === require(dependencyMap[15]).AgeVerificationStatusUkAndAusOnly.VERIFIED_ADULT;
|
|
};
|
|
exports.isAssignedByDiscord = function() {
|
|
return UserStore.getCurrentUser()?.ageVerificationStatus === require(dependencyMap[15]).AgeVerificationStatusUkAndAusOnly.INFERRED_ADULT;
|
|
};
|
|
exports.useIsAssignedByDiscord = closure;
|
|
exports.useShowAssignedAgeGroupSettings = useShowAssignedAgeGroupSettings;
|
|
exports.AgeVerificationSystemNotificationEmbedKeys = {CTAS: 'ctas', CONTENT_TYPE: 'content_type'};
|
|
exports.AgeVerificationSystemNotificationCtaTypes = {RETRY: 'retry'};
|
|
exports.AgeVerificationSystemNotificationContentType = {VERIFIED_ADULT: 'verified_adult',
|
|
VERIFIED_TEEN: 'verified_teen', ERROR: 'error'};
|
|
exports.isAgeVerificationMessageWithRetryCta = isAgeVerificationMessageWithRetryCta;
|
|
exports.isAgeVerified = closure2;
|
|
exports.useIsAgeVerified = closure3;
|
|
exports.useInitiateAgeVerification = useInitiateAgeVerification;
|
|
exports.useWatchAgeVerificationStatusChange = useWatchAgeVerificationStatusChange;
|
|
exports.isFullscreenAgeVerificationEntryPoint = isFullscreenAgeVerificationEntryPoint;
|
|
exports.getAgeVerificationGetStartedTitle = getAgeVerificationGetStartedTitle;
|
|
exports.getAgeVerificationGetStartedSubtitle = getAgeVerificationGetStartedSubtitle;
|
|
exports.useShouldCallReactiveCheck = closure4;
|
|
exports.useMaybePerformReactiveCheckForSource = useMaybePerformReactiveCheckForSource;
|
|
exports.shouldCallReactiveCheck = closure5;
|
|
exports.maybePerformReactiveCheck = function() {
|
|
return _maybePerformReactiveCheck.apply(this, arguments);
|
|
};
|
|
}
|
|
|
|
function useIsReactiveCheckEnabled() { // fn#41749, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4991:813, offset: 0x01127479, size: 62 bytes, params: 1, frame: 14
|
|
const value = require(3835) /* metro dependency 3835: RegionalFeatureConfigUtils */;
|
|
const useIsFeatureAgeGated = value.useIsFeatureAgeGated;
|
|
const AgeGatedFeature = (require(4861) /* metro dependency 4861: AgeGatedFeature */).AgeGatedFeature;
|
|
const REACTIVE_CHECK = AgeGatedFeature.REACTIVE_CHECK;
|
|
return Reflect.apply(useIsFeatureAgeGated, value, [REACTIVE_CHECK]);
|
|
}
|
|
|
|
function useIsAssignedByDiscord() { // fn#41750, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4991:928, offset: 0x011274b7, size: 57 bytes, params: 1, frame: 13
|
|
return (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() {
|
|
return UserStore.getCurrentUser()?.ageVerificationStatus === require(dependencyMap[15]).AgeVerificationStatusUkAndAusOnly.INFERRED_ADULT;
|
|
});
|
|
}
|
|
|
|
function isAgeVerified() { // fn#41752, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4991:1374, offset: 0x01127539, size: 124 bytes, params: 1, frame: 16
|
|
const currentUser = UserStore.getCurrentUser();
|
|
const value3 = undefined;
|
|
const ageVerificationStatus = currentUser == null ? value3 : currentUser.ageVerificationStatus;
|
|
const AgeVerificationStatusUkAndAusOnly = (require(1909) /* metro dependency 1909: Server */).AgeVerificationStatusUkAndAusOnly;
|
|
const UNVERIFIED = AgeVerificationStatusUkAndAusOnly.UNVERIFIED;
|
|
return ageVerificationStatus !== UNVERIFIED && (currentUser == null ? value3 : currentUser.ageVerificationStatus) !== AgeVerificationStatusUkAndAusOnly.CLIENT_ONLY_PENDING;
|
|
}
|
|
|
|
function useIsAgeVerified() { // fn#41753, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4991:1634, offset: 0x011275b5, size: 161 bytes, params: 1, frame: 17
|
|
const value2 = undefined;
|
|
const currentUser = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() {
|
|
return UserStore.getCurrentUser();
|
|
});
|
|
const ageVerificationStatus = currentUser == null ? value2 : currentUser.ageVerificationStatus;
|
|
const AgeVerificationStatusUkAndAusOnly = (require(1909) /* metro dependency 1909: Server */).AgeVerificationStatusUkAndAusOnly;
|
|
const UNVERIFIED = AgeVerificationStatusUkAndAusOnly.UNVERIFIED;
|
|
return ageVerificationStatus !== UNVERIFIED && (currentUser == null ? value2 : currentUser.ageVerificationStatus) !== AgeVerificationStatusUkAndAusOnly.CLIENT_ONLY_PENDING;
|
|
}
|
|
|
|
function useShouldCallReactiveCheck() { // fn#41755, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4991:1936, offset: 0x01127668, size: 133 bytes, params: 1, frame: 19
|
|
const value2 = useIsAgeVerified();
|
|
const regionalFeatureConfigUtilsModule = require(3835) /* metro dependency 3835: RegionalFeatureConfigUtils */;
|
|
const useIsFeatureAgeGated = regionalFeatureConfigUtilsModule.useIsFeatureAgeGated;
|
|
const AgeGatedFeature = (require(4861) /* metro dependency 4861: AgeGatedFeature */).AgeGatedFeature;
|
|
const REACTIVE_CHECK = AgeGatedFeature.REACTIVE_CHECK;
|
|
return (require(566) /* metro dependency 566: flux */).useStateFromStores([AgeVerificationStore], _fun41756,
|
|
[value2, Reflect.apply(useIsFeatureAgeGated, regionalFeatureConfigUtilsModule, [REACTIVE_CHECK])]);
|
|
}
|
|
|
|
function shouldCallReactiveCheck() { // fn#41757, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4991:2161, offset: 0x01127717, size: 49 bytes, params: 1, frame: 11
|
|
return !isAgeVerified() && (isReactiveCheckEnabled() && AgeVerificationStore.shouldCallReactiveCheck());
|
|
}
|
|
|
|
function _maybePerformReactiveCheck() { // fn#41758, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4991:2276, offset: 0x01127748, size: 48 bytes, params: 1, frame: 14
|
|
return env0_3(_fun41760).apply(this, arguments);
|
|
}
|
|
|
|
function shouldShowTiggerPawtect() { // fn#41762, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4991:2625, offset: 0x011277ce, size: 126 bytes, params: 1, frame: 15
|
|
var r0;
|
|
var isReactiveCheckEnabled2;
|
|
const ageVerificationStatus = UserStore.getCurrentUser()?.ageVerificationStatus;
|
|
const AgeVerificationStatusUkAndAusOnly = (require(1909) /* metro dependency 1909: Server */).AgeVerificationStatusUkAndAusOnly;
|
|
const VERIFIED_ADULT = AgeVerificationStatusUkAndAusOnly.VERIFIED_ADULT;
|
|
const value4 = ageVerificationStatus !== VERIFIED_ADULT;
|
|
if (value4) {
|
|
isReactiveCheckEnabled2 = isReactiveCheckEnabled();
|
|
r0 = isReactiveCheckEnabled2 ? ageVerificationStatus !== AgeVerificationStatusUkAndAusOnly.INFERRED_ADULT : !isReactiveCheckEnabled2;
|
|
} else {
|
|
r0 = value4;
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
function useShouldShowTiggerPawtect() { // fn#41763, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4991:2918, offset: 0x0112784c, size: 180 bytes, params: 1, frame: 17
|
|
const AgeVerificationStatusUkAndAusOnly = (require(1909) /* metro dependency 1909: Server */).AgeVerificationStatusUkAndAusOnly;
|
|
const value2 = undefined;
|
|
const currentUser = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() {
|
|
return UserStore.getCurrentUser();
|
|
});
|
|
const r1 = useIsReactiveCheckEnabled() && (currentUser == null ? value2 : currentUser.ageVerificationStatus) === AgeVerificationStatusUkAndAusOnly.INFERRED_ADULT;
|
|
const ageVerificationStatus = currentUser == null ? value2 : currentUser.ageVerificationStatus;
|
|
const VERIFIED_ADULT = AgeVerificationStatusUkAndAusOnly.VERIFIED_ADULT;
|
|
return ageVerificationStatus !== VERIFIED_ADULT && !r1;
|
|
}
|
|
|
|
function useIsVerifiedTeen() { // fn#41766, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4991:3461, offset: 0x01127949, size: 110 bytes, params: 1, frame: 15
|
|
const value2 = undefined;
|
|
const currentUser = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() {
|
|
return UserStore.getCurrentUser();
|
|
});
|
|
const ageVerificationStatus = currentUser == null ? value2 : currentUser.ageVerificationStatus;
|
|
const AgeVerificationStatusUkAndAusOnly = (require(1909) /* metro dependency 1909: Server */).AgeVerificationStatusUkAndAusOnly;
|
|
const VERIFIED_TEEN = AgeVerificationStatusUkAndAusOnly.VERIFIED_TEEN;
|
|
return ageVerificationStatus === VERIFIED_TEEN;
|
|
}
|
|
|
|
function isVerifiedAdult() { // fn#41768, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4991:3680, offset: 0x011279b7, size: 123 bytes, params: 1, frame: 15
|
|
const ageVerificationStatus = UserStore.getCurrentUser()?.ageVerificationStatus;
|
|
const AgeVerificationStatusUkAndAusOnly = (require(1909) /* metro dependency 1909: Server */).AgeVerificationStatusUkAndAusOnly;
|
|
const VERIFIED_ADULT = AgeVerificationStatusUkAndAusOnly.VERIFIED_ADULT;
|
|
return ageVerificationStatus === VERIFIED_ADULT || isReactiveCheckEnabled() && ageVerificationStatus === AgeVerificationStatusUkAndAusOnly.INFERRED_ADULT;
|
|
}
|
|
|
|
function useIsVerifiedAdult() { // fn#41769, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4991:3954, offset: 0x01127a32, size: 180 bytes, params: 1, frame: 17
|
|
const AgeVerificationStatusUkAndAusOnly = (require(1909) /* metro dependency 1909: Server */).AgeVerificationStatusUkAndAusOnly;
|
|
const value2 = undefined;
|
|
const currentUser = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() {
|
|
return UserStore.getCurrentUser();
|
|
});
|
|
const r1 = useIsReactiveCheckEnabled() && (currentUser == null ? value2 : currentUser.ageVerificationStatus) === AgeVerificationStatusUkAndAusOnly.INFERRED_ADULT;
|
|
const ageVerificationStatus = currentUser == null ? value2 : currentUser.ageVerificationStatus;
|
|
const VERIFIED_ADULT = AgeVerificationStatusUkAndAusOnly.VERIFIED_ADULT;
|
|
return ageVerificationStatus === VERIFIED_ADULT || r1;
|
|
}
|
|
|
|
function useIsExplicitlyVerifiedAdult() { // fn#41771, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4991:4323, offset: 0x01127ae6, size: 110 bytes, params: 1, frame: 15
|
|
const value2 = undefined;
|
|
const currentUser = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() {
|
|
return UserStore.getCurrentUser();
|
|
});
|
|
const ageVerificationStatus = currentUser == null ? value2 : currentUser.ageVerificationStatus;
|
|
const AgeVerificationStatusUkAndAusOnly = (require(1909) /* metro dependency 1909: Server */).AgeVerificationStatusUkAndAusOnly;
|
|
const VERIFIED_ADULT = AgeVerificationStatusUkAndAusOnly.VERIFIED_ADULT;
|
|
return ageVerificationStatus === VERIFIED_ADULT;
|
|
}
|
|
|
|
function useShowAssignedAgeGroupSettings() { // fn#41774, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4991:4806, offset: 0x01127b9d, size: 76 bytes, params: 1, frame: 15
|
|
var value;
|
|
const value2 = useIsAssignedByDiscord();
|
|
const useIsFeatureAgeGated = (require(3835) /* metro dependency 3835: RegionalFeatureConfigUtils */).useIsFeatureAgeGated;
|
|
const AgeGatedFeature = (require(4861) /* metro dependency 4861: AgeGatedFeature */).AgeGatedFeature;
|
|
const REACTIVE_CHECK = AgeGatedFeature.REACTIVE_CHECK;
|
|
value = Reflect.apply(useIsFeatureAgeGated, value, [REACTIVE_CHECK]);
|
|
return value && value2;
|
|
}
|
|
|
|
function isAgeVerificationMessageWithRetryCta(a0, a1) { // fn#41775, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4991:5147, offset: 0x01127be9, size: 205 bytes, params: 3, frame: 15
|
|
var r0;
|
|
var value5;
|
|
const message = MessageStore.getMessage(a0, a1);
|
|
if (message == null) {
|
|
return false;
|
|
}
|
|
if (message.embeds == null) {
|
|
return false;
|
|
}
|
|
if (message.embeds.length === 0) {
|
|
return false;
|
|
}
|
|
if (message.embeds[0].fields == null) {
|
|
return false;
|
|
}
|
|
const type = message.embeds[0].type;
|
|
const AGE_VERIFICATION_SYSTEM_NOTIFICATION = MessageEmbedTypes.AGE_VERIFICATION_SYSTEM_NOTIFICATION;
|
|
if (type !== AGE_VERIFICATION_SYSTEM_NOTIFICATION) {
|
|
return false;
|
|
}
|
|
const value3 = message.embeds[0].fields.find(_fun41776);
|
|
if (value3 == null) {
|
|
r0 = undefined;
|
|
} else {
|
|
value5 = value3.rawValue.split(',');
|
|
r0 = value5.includes(env0_18.RETRY);
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
function useInitiateAgeVerification({onComplete, entryPoint, shouldShowExpressiveModal, classificationId}) { // fn#41777, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4991:5580, offset: 0x01127cd2, size: 294 bytes, params: 2, frame: 22
|
|
let value = undefined;
|
|
shouldShowExpressiveModal = !(shouldShowExpressiveModal === value) && shouldShowExpressiveModal;
|
|
classificationId = classificationId === value ? null : classificationId;
|
|
var env0_4Binding = value;
|
|
let binding = value;
|
|
var [property, env0_4] = env0_4Binding(binding.useState(false), 2);
|
|
const currentUser = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() {
|
|
return UserStore.getCurrentUser();
|
|
});
|
|
const useRef = binding.useRef;
|
|
const current = Reflect.apply(useRef, binding,
|
|
[currentUser == null ? value : currentUser.ageVerificationStatus]).current;
|
|
binding = current;
|
|
let useCallback = binding.useCallback;
|
|
const value7 = Reflect.apply(useCallback, binding, [_fun41779, [current]]);
|
|
useCallback = binding.useCallback;
|
|
value = _fun41780();
|
|
value = Reflect.apply(useCallback, binding, [value, [onComplete, value7, shouldShowExpressiveModal,
|
|
classificationId, entryPoint]]);
|
|
return {loading: property, initiateAgeVerification: value};
|
|
}
|
|
|
|
function useWatchAgeVerificationStatusChange(a0) { // fn#41784, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4991:6634, offset: 0x01127fc4, size: 228 bytes, params: 2, frame: 23
|
|
const env0_0 = a0;
|
|
const value2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], _fun41785);
|
|
const value3 = (importDefault(6266) /* metro dependency 6266: usePrevious */)(value2);
|
|
env0_5.useEffect(_fun41788, [a0, value3 != null && value2 != null && value3 !== value2,
|
|
!(require(566) /* metro dependency 566: flux */).useStateFromStores([AuthenticationStore],
|
|
_fun41786) && !(require(566) /* metro dependency 566: flux */).useStateFromStores([AuthenticationStore],
|
|
function() {
|
|
return AuthenticationStore.isAuthenticated();
|
|
})]);
|
|
}
|
|
|
|
function isFullscreenAgeVerificationEntryPoint(a0) { // fn#41789, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4991:7068, offset: 0x01128116, size: 31 bytes, params: 2, frame: 12
|
|
return a0 != null && FULLSCREEN_AGE_VERIFICATION_ENTRY_POINTS.has(a0);
|
|
}
|
|
|
|
function getAgeVerificationGetStartedTitle(a0) { // fn#41790, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4991:7181, offset: 0x01128135, size: 99 bytes, params: 2, frame: 15
|
|
const value2 = env0_15.has(a0);
|
|
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
|
const string = intl.string;
|
|
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
|
return value2 ? Reflect.apply(string, intl, [t.lSWVTM]) : Reflect.apply(string, intl, [t.xYXsr6]);
|
|
}
|
|
|
|
function getAgeVerificationGetStartedSubtitle(a0, a1) { // fn#41791, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4991:7364, offset: 0x01128198, size: 298 bytes, params: 3, frame: 18
|
|
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
|
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
|
const value = a2;
|
|
let r0 = value !== undefined ? value : false;
|
|
const binding = env0_15;
|
|
r0 = binding.has(a0) ? intl.string(t['S/xS/w']) : r0 ? intl.string((importDefault(2742) /* metro dependency 2742: AgeAssuranceMessages */).h7qzoa) : a1 != null ? intl.format((importDefault(2742) /* metro dependency 2742: AgeAssuranceMessages */).RpMIT0,
|
|
{handleOnHelpUrlHook: a1}) : intl.string(t.HxS3oQ);
|
|
return r0;
|
|
}
|
|
|
|
function useMaybePerformReactiveCheckForSource(a0) { // fn#41792, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4991:7728, offset: 0x011282c2, size: 60 bytes, params: 2, frame: 16
|
|
const env0_0 = a0;
|
|
env0_5.useEffect(_fun41793, [useShouldCallReactiveCheck(), a0]);
|
|
}
|
|
|
|
function _fun41756() { // fn#41756, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4991:2112, offset: 0x011276ed, size: 42 bytes, params: 1, frame: 11
|
|
var r1;
|
|
var r0;
|
|
var value;
|
|
let binding = env0_0;
|
|
if (binding) {
|
|
r0 = !binding;
|
|
} else {
|
|
binding = env0_1;
|
|
if (binding) {
|
|
value = environment.__proto__;
|
|
value = AgeVerificationStore.shouldCallReactiveCheck();
|
|
r1 = value;
|
|
} else {
|
|
r1 = binding;
|
|
}
|
|
r0 = r1;
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
function* _fun41760() { // fn#41760, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4991:2351, offset: 0x01127781, size: 77 bytes, params: 1, frame: 14
|
|
if (false) {
|
|
return undefined;
|
|
}
|
|
value = environment.__proto__.__proto__;
|
|
const value3 = env2_25();
|
|
const value4 = null;
|
|
if (value3) {
|
|
value = env2_0(env2_2[24]);
|
|
yield value.fetchReactiveCheckResult();
|
|
value = undefined;
|
|
if (false) {
|
|
return value;
|
|
}
|
|
return value;
|
|
}
|
|
return value4;
|
|
}
|
|
|
|
function _fun41776({rawName}) { // fn#41776, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4991:5395, offset: 0x01127cb6, size: 28 bytes, params: 2, frame: 2
|
|
const CTAS = env1_17.CTAS;
|
|
return rawName === CTAS;
|
|
}
|
|
|
|
function _fun41779() { // fn#41779, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4991:5880, offset: 0x01127df8, size: 60 bytes, params: 1, frame: 13
|
|
const value = environment.__proto__;
|
|
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'CLOSE_AGE_VERIFICATION_MODAL',
|
|
status: current});
|
|
}
|
|
|
|
function _fun41780() { // fn#41780, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4991:5974, offset: 0x01127e34, size: 32 bytes, params: 1, frame: 12
|
|
const env0_0 = env1_3(_fun41782);
|
|
return _fun41783;
|
|
}
|
|
|
|
function _fun41785() { // fn#41785, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4991:6721, offset: 0x011280a8, size: 35 bytes, params: 1, frame: 10
|
|
const value = environment.__proto__;
|
|
return UserStore.getCurrentUser()?.ageVerificationStatus;
|
|
}
|
|
|
|
function _fun41786() { // fn#41786, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4991:6851, offset: 0x011280cb, size: 25 bytes, params: 1, frame: 9
|
|
const value = environment.__proto__;
|
|
return AuthenticationStore.getSuspendedUserToken() != null;
|
|
}
|
|
|
|
function _fun41788() { // fn#41788, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4991:6998, offset: 0x011280f7, size: 31 bytes, params: 1, frame: 10
|
|
if (env0_1 || env0_2) {
|
|
env0_0();
|
|
}
|
|
}
|
|
|
|
function _fun41793() { // fn#41793, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4991:7826, offset: 0x011282fe, size: 73 bytes, params: 1, frame: 12
|
|
var value;
|
|
if (env0_1 && REACTIVE_CHECK_AGE_GATE_SOURCES.has(env0_0)) {
|
|
value = environment.__proto__;
|
|
value = require(6267) /* metro dependency 6267: ReactiveCheckActionCreators */;
|
|
value.fetchReactiveCheckResult();
|
|
}
|
|
}
|
|
|
|
function* _fun41782(a0) { // fn#41782, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4991:5994, offset: 0x01127e5d, size: 359 bytes, params: 2, frame: 18
|
|
var r7;
|
|
var value;
|
|
var value2;
|
|
var value3;
|
|
var value4;
|
|
var binding;
|
|
var binding2;
|
|
var property;
|
|
var value5;
|
|
var dispatch;
|
|
var object2;
|
|
var value6;
|
|
var requestAgeVerification;
|
|
var value7;
|
|
var value8;
|
|
var value9;
|
|
var value10;
|
|
var binding3;
|
|
var value11;
|
|
var showAgeVerification;
|
|
var verification_webview_url;
|
|
var verification_request_id;
|
|
var verification_vendor_name;
|
|
var error;
|
|
var binding4;
|
|
var value12;
|
|
var showFailedToast;
|
|
var TIGGER_PAWTECT_ERROR;
|
|
exceptionLanding70: while (true) {
|
|
value = undefined;
|
|
value2 = false;
|
|
if (value2) {
|
|
return value;
|
|
}
|
|
value = environment.__proto__.__proto__;
|
|
value3 = undefined;
|
|
env2_4(true);
|
|
value4 = environment.__proto__.__proto__.__proto__;
|
|
reducibleJoin4: while (true) {
|
|
reduciblePort69: while (true) {
|
|
exceptionLanding56: while (true) {
|
|
try {
|
|
try {
|
|
binding = env3_1;
|
|
} catch (error) {
|
|
break exceptionLanding56;
|
|
}
|
|
} catch (error) {
|
|
break exceptionLanding70;
|
|
}
|
|
break reducibleJoin4;
|
|
}
|
|
try {
|
|
binding = env3_1;
|
|
} catch (error) {
|
|
break exceptionLanding70;
|
|
}
|
|
try {
|
|
binding4 = env3_2;
|
|
} catch (error) {
|
|
break exceptionLanding70;
|
|
}
|
|
try {
|
|
property = binding4[20];
|
|
} catch (error) {
|
|
break exceptionLanding70;
|
|
}
|
|
try {
|
|
value12 = binding(property);
|
|
} catch (error) {
|
|
break exceptionLanding70;
|
|
}
|
|
try {
|
|
showFailedToast = value12.showFailedToast;
|
|
} catch (error) {
|
|
break exceptionLanding70;
|
|
}
|
|
try {
|
|
binding = env3_14;
|
|
} catch (error) {
|
|
break exceptionLanding70;
|
|
}
|
|
try {
|
|
TIGGER_PAWTECT_ERROR = binding.TIGGER_PAWTECT_ERROR;
|
|
} catch (error) {
|
|
break exceptionLanding70;
|
|
}
|
|
try {
|
|
Reflect.apply(showFailedToast, value12, [TIGGER_PAWTECT_ERROR]);
|
|
} catch (error) {
|
|
break exceptionLanding70;
|
|
}
|
|
try {
|
|
} catch (error) {
|
|
break exceptionLanding70;
|
|
}
|
|
try {
|
|
RegionalFeatureConfigStore();
|
|
} catch (error) {
|
|
break exceptionLanding70;
|
|
}
|
|
break reduciblePort69;
|
|
}
|
|
env2_4(false);
|
|
return value3;
|
|
}
|
|
try {
|
|
try {
|
|
binding2 = env3_2;
|
|
} catch (error) {
|
|
break exceptionLanding56;
|
|
}
|
|
} catch (error) {
|
|
break exceptionLanding70;
|
|
}
|
|
try {
|
|
try {
|
|
property = binding2[17];
|
|
} catch (error) {
|
|
break exceptionLanding56;
|
|
}
|
|
} catch (error) {
|
|
break exceptionLanding70;
|
|
}
|
|
try {
|
|
try {
|
|
value5 = binding(property);
|
|
} catch (error) {
|
|
break exceptionLanding56;
|
|
}
|
|
} catch (error) {
|
|
break exceptionLanding70;
|
|
}
|
|
try {
|
|
try {
|
|
dispatch = value5.dispatch;
|
|
} catch (error) {
|
|
break exceptionLanding56;
|
|
}
|
|
} catch (error) {
|
|
break exceptionLanding70;
|
|
}
|
|
try {
|
|
try {
|
|
object2 = {};
|
|
} catch (error) {
|
|
break exceptionLanding56;
|
|
}
|
|
} catch (error) {
|
|
break exceptionLanding70;
|
|
}
|
|
try {
|
|
try {
|
|
object2.type = 'INITIATE_AGE_VERIFICATION';
|
|
} catch (error) {
|
|
break exceptionLanding56;
|
|
}
|
|
} catch (error) {
|
|
break exceptionLanding70;
|
|
}
|
|
try {
|
|
try {
|
|
Reflect.apply(dispatch, value5, [object2]);
|
|
} catch (error) {
|
|
break exceptionLanding56;
|
|
}
|
|
} catch (error) {
|
|
break exceptionLanding70;
|
|
}
|
|
try {
|
|
try {
|
|
binding = env3_0;
|
|
} catch (error) {
|
|
break exceptionLanding56;
|
|
}
|
|
} catch (error) {
|
|
break exceptionLanding70;
|
|
}
|
|
try {
|
|
try {
|
|
property = binding2[18];
|
|
} catch (error) {
|
|
break exceptionLanding56;
|
|
}
|
|
} catch (error) {
|
|
break exceptionLanding70;
|
|
}
|
|
try {
|
|
try {
|
|
value6 = binding(property);
|
|
} catch (error) {
|
|
break exceptionLanding56;
|
|
}
|
|
} catch (error) {
|
|
break exceptionLanding70;
|
|
}
|
|
try {
|
|
try {
|
|
requestAgeVerification = value6.requestAgeVerification;
|
|
} catch (error) {
|
|
break exceptionLanding56;
|
|
}
|
|
} catch (error) {
|
|
break exceptionLanding70;
|
|
}
|
|
try {
|
|
try {
|
|
object2 = {};
|
|
} catch (error) {
|
|
break exceptionLanding56;
|
|
}
|
|
} catch (error) {
|
|
break exceptionLanding70;
|
|
}
|
|
try {
|
|
try {
|
|
object2.method = a0;
|
|
} catch (error) {
|
|
break exceptionLanding56;
|
|
}
|
|
} catch (error) {
|
|
break exceptionLanding70;
|
|
}
|
|
try {
|
|
try {
|
|
binding = env2_3;
|
|
} catch (error) {
|
|
break exceptionLanding56;
|
|
}
|
|
} catch (error) {
|
|
break exceptionLanding70;
|
|
}
|
|
try {
|
|
try {
|
|
value7 = binding != null;
|
|
} catch (error) {
|
|
break exceptionLanding56;
|
|
}
|
|
} catch (error) {
|
|
break exceptionLanding70;
|
|
}
|
|
reducibleJoin25: while (true) {
|
|
if (value7) {
|
|
try {
|
|
try {
|
|
binding = env2_3;
|
|
} catch (error) {
|
|
break exceptionLanding56;
|
|
}
|
|
} catch (error) {
|
|
break exceptionLanding70;
|
|
}
|
|
r7 = binding;
|
|
break reducibleJoin25;
|
|
}
|
|
r7 = value3;
|
|
break reducibleJoin25;
|
|
}
|
|
try {
|
|
try {
|
|
object2.classificationId = r7;
|
|
} catch (error) {
|
|
break exceptionLanding56;
|
|
}
|
|
} catch (error) {
|
|
break exceptionLanding70;
|
|
}
|
|
try {
|
|
try {
|
|
value8 = Reflect.apply(requestAgeVerification, value6, [object2]);
|
|
} catch (error) {
|
|
break exceptionLanding56;
|
|
}
|
|
} catch (error) {
|
|
break exceptionLanding70;
|
|
}
|
|
yield value8;
|
|
try {
|
|
try {
|
|
value9 = undefined;
|
|
value10 = false;
|
|
} catch (error) {
|
|
break exceptionLanding56;
|
|
}
|
|
} catch (error) {
|
|
break exceptionLanding70;
|
|
}
|
|
if (value10) {
|
|
env2_4(false);
|
|
return value9;
|
|
}
|
|
try {
|
|
try {
|
|
binding = env3_1;
|
|
} catch (error) {
|
|
break exceptionLanding56;
|
|
}
|
|
} catch (error) {
|
|
break exceptionLanding70;
|
|
}
|
|
try {
|
|
try {
|
|
binding3 = env3_2;
|
|
} catch (error) {
|
|
break exceptionLanding56;
|
|
}
|
|
} catch (error) {
|
|
break exceptionLanding70;
|
|
}
|
|
try {
|
|
try {
|
|
property = binding3[19];
|
|
} catch (error) {
|
|
break exceptionLanding56;
|
|
}
|
|
} catch (error) {
|
|
break exceptionLanding70;
|
|
}
|
|
try {
|
|
try {
|
|
value11 = binding(property);
|
|
} catch (error) {
|
|
break exceptionLanding56;
|
|
}
|
|
} catch (error) {
|
|
break exceptionLanding70;
|
|
}
|
|
try {
|
|
try {
|
|
showAgeVerification = value11.showAgeVerification;
|
|
} catch (error) {
|
|
break exceptionLanding56;
|
|
}
|
|
} catch (error) {
|
|
break exceptionLanding70;
|
|
}
|
|
try {
|
|
try {
|
|
object2 = {};
|
|
} catch (error) {
|
|
break exceptionLanding56;
|
|
}
|
|
} catch (error) {
|
|
break exceptionLanding70;
|
|
}
|
|
try {
|
|
try {
|
|
verification_webview_url = value9.verification_webview_url;
|
|
} catch (error) {
|
|
break exceptionLanding56;
|
|
}
|
|
} catch (error) {
|
|
break exceptionLanding70;
|
|
}
|
|
try {
|
|
try {
|
|
object2.webviewUrl = verification_webview_url;
|
|
} catch (error) {
|
|
break exceptionLanding56;
|
|
}
|
|
} catch (error) {
|
|
break exceptionLanding70;
|
|
}
|
|
try {
|
|
try {
|
|
verification_request_id = value9.verification_request_id;
|
|
} catch (error) {
|
|
break exceptionLanding56;
|
|
}
|
|
} catch (error) {
|
|
break exceptionLanding70;
|
|
}
|
|
try {
|
|
try {
|
|
object2.verificationRequestId = verification_request_id;
|
|
} catch (error) {
|
|
break exceptionLanding56;
|
|
}
|
|
} catch (error) {
|
|
break exceptionLanding70;
|
|
}
|
|
try {
|
|
try {
|
|
verification_vendor_name = value9.verification_vendor_name;
|
|
} catch (error) {
|
|
break exceptionLanding56;
|
|
}
|
|
} catch (error) {
|
|
break exceptionLanding70;
|
|
}
|
|
try {
|
|
try {
|
|
object2.verificationVendorName = verification_vendor_name;
|
|
} catch (error) {
|
|
break exceptionLanding56;
|
|
}
|
|
} catch (error) {
|
|
break exceptionLanding70;
|
|
}
|
|
try {
|
|
try {
|
|
} catch (error) {
|
|
break exceptionLanding56;
|
|
}
|
|
} catch (error) {
|
|
break exceptionLanding70;
|
|
}
|
|
try {
|
|
try {
|
|
object2.onComplete = require;
|
|
} catch (error) {
|
|
break exceptionLanding56;
|
|
}
|
|
} catch (error) {
|
|
break exceptionLanding70;
|
|
}
|
|
try {
|
|
try {
|
|
} catch (error) {
|
|
break exceptionLanding56;
|
|
}
|
|
} catch (error) {
|
|
break exceptionLanding70;
|
|
}
|
|
try {
|
|
try {
|
|
object2.onClose = RegionalFeatureConfigStore;
|
|
} catch (error) {
|
|
break exceptionLanding56;
|
|
}
|
|
} catch (error) {
|
|
break exceptionLanding70;
|
|
}
|
|
try {
|
|
try {
|
|
} catch (error) {
|
|
break exceptionLanding56;
|
|
}
|
|
} catch (error) {
|
|
break exceptionLanding70;
|
|
}
|
|
try {
|
|
try {
|
|
object2.onCancel = RegionalFeatureConfigStore;
|
|
} catch (error) {
|
|
break exceptionLanding56;
|
|
}
|
|
} catch (error) {
|
|
break exceptionLanding70;
|
|
}
|
|
try {
|
|
try {
|
|
} catch (error) {
|
|
break exceptionLanding56;
|
|
}
|
|
} catch (error) {
|
|
break exceptionLanding70;
|
|
}
|
|
try {
|
|
try {
|
|
object2.entryPoint = importDefault;
|
|
} catch (error) {
|
|
break exceptionLanding56;
|
|
}
|
|
} catch (error) {
|
|
break exceptionLanding70;
|
|
}
|
|
try {
|
|
try {
|
|
} catch (error) {
|
|
break exceptionLanding56;
|
|
}
|
|
} catch (error) {
|
|
break exceptionLanding70;
|
|
}
|
|
try {
|
|
try {
|
|
object2.shouldShowExpressiveModal = dependencyMap;
|
|
} catch (error) {
|
|
break exceptionLanding56;
|
|
}
|
|
} catch (error) {
|
|
break exceptionLanding70;
|
|
}
|
|
try {
|
|
try {
|
|
Reflect.apply(showAgeVerification, value11, [object2]);
|
|
} catch (error) {
|
|
break exceptionLanding56;
|
|
}
|
|
} catch (error) {
|
|
break exceptionLanding70;
|
|
}
|
|
env2_4(false);
|
|
return value3;
|
|
}
|
|
env2_4(false);
|
|
throw error;
|
|
}
|
|
|