Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/05xxx/module_5014.js (118.4 MB)
140 lines
5.1 KiB
TypeScript
140 lines
5.1 KiB
TypeScript
// Module ID: 17033
|
|
// Function ID: 17034
|
|
// Name: CaptchaModal
|
|
// Dependencies: [19, 17, 15543, 15544, 21, 4829, 6358, 1485, 17034, 6566, 5272, 17035, 4825, 1115, 5274, 5170, 17037, 15551, 2]
|
|
// Exports: default
|
|
|
|
// Module 17033 (CaptchaModal)
|
|
import util from "util" /* 1115 */;
|
|
import Link from "Link" /* 1485 */;
|
|
import Text_Text from "Text/Text" /* 4825 */;
|
|
import SharedCaptchaUtils from "SharedCaptchaUtils" /* 5170 */;
|
|
import Stack_Stack from "Stack/Stack" /* 5272 */;
|
|
import components_Button_Button from "components/Button/Button" /* 5274 */;
|
|
import Sheet_BottomSheet from "Sheet/BottomSheet" /* 6566 */;
|
|
import RegistrationUtils from "RegistrationUtils" /* 15551 */;
|
|
import DisguiseSpotIllustration from "DisguiseSpotIllustration" /* 17035 */;
|
|
import CaptchaUtilsDefault from "CaptchaUtils" /* 17037 */;
|
|
import noop from "module_19" /* 19 */;
|
|
|
|
require = fn;
|
|
get_ActivityIndicator = fn(17);
|
|
({ Keyboard: closure_4, View: hasOwnProperty } = get_ActivityIndicator);
|
|
let closure_6 = fn(15543).doesRegistrationHaveIdentityType;
|
|
const RegistrationConstants = fn(15544);
|
|
({ RegisterTransitionSteps: closure_7, RegistrationTransitionActionTypes: closure_8 } = RegistrationConstants);
|
|
const jsxProd = fn(21);
|
|
({ jsx: closure_9, jsxs: c10 } = jsxProd);
|
|
const createStyles = fn(4829);
|
|
let closure_11 = createStyles.createStyles((arg0) => {
|
|
let num = 8;
|
|
if (arg0) {
|
|
num = 32;
|
|
}
|
|
return { contentContainer: { alignItems: "center", paddingVertical: 8, paddingHorizontal: num }, description: { paddingBottom: 12, paddingTop: 4 } };
|
|
});
|
|
const size = fn(2);
|
|
let result = size.fileFinishedImporting("modules/captcha/native/CaptchaModal.tsx");
|
|
|
|
export default function CaptchaModal(arg0) {
|
|
({ onCaptchaVerify: require, onReject } = arg0);
|
|
({ close: dependencyMap, sitekey: noop, captchaService: closure_4, headerText, bodyText, rqdata: closure_5, rqtoken: closure_6, userflow: closure_7 } = arg0);
|
|
const tmp2 = closure_11(onReject(6358)());
|
|
const navigation = Link.useNavigation();
|
|
const items = [navigation];
|
|
const memo = noop.useMemo(() => {
|
|
const state = navigation.getState();
|
|
let name;
|
|
if (state != null) {
|
|
const first = state.routes[0];
|
|
if (first != null) {
|
|
name = first.name;
|
|
}
|
|
}
|
|
let str = "Guild Join Captcha";
|
|
if ("auth" === name) {
|
|
str = "Guild Join Captcha";
|
|
if (closure_6()) {
|
|
str = "User Registration Captcha";
|
|
}
|
|
}
|
|
return str;
|
|
}, items);
|
|
closure_9 = onReject(17034)({ onReject, analyticsType: memo });
|
|
const effect = noop.useEffect(() => {
|
|
closure_1_4.dismiss();
|
|
}, []);
|
|
let obj2 = { style: tmp2.contentContainer, spacing: 12, children: null };
|
|
const items1 = [closure_9(DisguiseSpotIllustration.DisguiseSpotIllustration, { scale: 0.5 }), , ];
|
|
if (headerText == null) {
|
|
const intl = tmp3(1115).intl;
|
|
headerText = intl.string(tmp3(1115).t.FpoiHe);
|
|
}
|
|
const items2 = [closure_9(Text_Text.Text, { variant: "heading-xl/bold", accessibilityRole: "header", children: headerText }), ];
|
|
let obj3 = { variant: "text-md/medium", color: "text-subtle", style: tmp2.description, children: null };
|
|
if (bodyText == null) {
|
|
const intl2 = tmp3(1115).intl;
|
|
bodyText = intl2.string(tmp3(1115).t["/CidxO"]);
|
|
}
|
|
let obj4 = { startHeight: 900, startExpanded: true, children: null };
|
|
let obj5 = { children: null };
|
|
obj3.children = bodyText;
|
|
items2[1] = closure_9(Text_Text.Text, obj3);
|
|
obj5.children = items2;
|
|
items1[1] = closure_10(closure_5, obj5);
|
|
const obj6 = {
|
|
grow: true,
|
|
onPress() {
|
|
closure_9();
|
|
dependencyMap();
|
|
const result = SharedCaptchaUtils.emitCaptchaDistributionMetric(constants);
|
|
const showCaptchaResult = CaptchaUtilsDefault.showCaptcha(closure_1_4, noop, closure_1_5);
|
|
CaptchaUtilsDefault.showCaptcha(closure_1_4, noop, closure_1_5).then((result) => {
|
|
state = state.getState();
|
|
let name;
|
|
if (state != null) {
|
|
const first = state.routes[0];
|
|
if (first != null) {
|
|
name = first.name;
|
|
}
|
|
}
|
|
let tmp4 = "auth" === name;
|
|
if (tmp4) {
|
|
tmp4 = closure_2_6();
|
|
}
|
|
if (tmp4) {
|
|
const obj3 = { step: constants.CAPTCHA, actionType: navigation.SUBMITTED };
|
|
RegistrationUtils.trackRegTransition(obj3);
|
|
}
|
|
closure_1_0(result, closure_1_6);
|
|
const state1 = state.getState();
|
|
let name1;
|
|
if (state1 != null) {
|
|
const first1 = state1.routes[0];
|
|
if (first1 != null) {
|
|
name1 = first1.name;
|
|
}
|
|
}
|
|
let tmp15 = "auth" === name1;
|
|
if (tmp15) {
|
|
tmp15 = closure_2_6();
|
|
}
|
|
if (tmp15) {
|
|
const obj5 = { step: constants.CAPTCHA, actionType: navigation.SUCCESS };
|
|
RegistrationUtils.trackRegTransition(obj5);
|
|
}
|
|
}).catch((error) => {
|
|
if (onReject != null) {
|
|
tmp(error);
|
|
}
|
|
});
|
|
},
|
|
text: null
|
|
};
|
|
const intl3 = tmp3(1115).intl;
|
|
obj6.text = intl3.string(util.t["cY+Oob"]);
|
|
items1[2] = closure_9(components_Button_Button.Button, obj6);
|
|
obj2.children = items1;
|
|
obj4.children = closure_10(Stack_Stack.Stack, obj2);
|
|
return closure_9(Sheet_BottomSheet.BottomSheet, obj4);
|
|
};
|