decord/source/modules/captcha/tooling/native/CaptchaTestModal.tsx

149 lines
6.6 KiB
TypeScript
Raw Normal View History

2026-07-27 11:26:19 +00:00
// Module ID: 14714
// Function ID: 112100
2026-07-20 16:05:17 +00:00
// Name: CaptchaTestScreen
2026-07-27 11:26:19 +00:00
// Dependencies: [5, 57, 31, 27, 33, 4131, 689, 14715, 14716, 3832, 4127, 1273, 5121, 4544, 4338, 5087, 5517, 1212, 2]
2026-07-20 16:05:17 +00:00
// Exports: default
2026-07-27 11:26:19 +00:00
// Module 14714 (CaptchaTestScreen)
2026-07-23 10:11:24 +00:00
import closure_3 from "_createForOfIteratorHelperLoose";
import _slicedToArray from "_slicedToArray";
import result from "result";
import { View } from "get ActivityIndicator";
import jsxProd from "jsxProd";
import _createForOfIteratorHelperLoose from "_createForOfIteratorHelperLoose";
import { HCAPTCHA_DIFFICULTY_OPTIONS as prop } from "found";
import { CAPTCHA_DECIDER_TYPE_OPTIONS as prop1 } from "found";
import _createForOfIteratorHelperLoose from "_createForOfIteratorHelperLoose";
import set from "result";
let closure_7;
let closure_8;
let require = arg1;
2026-07-20 16:05:17 +00:00
function CaptchaTestScreen(arg0) {
if (arg0 == null) {
HermesBuiltin.throwTypeError("Cannot destructure 'undefined' or 'null'.");
throw undefined;
} else {
2026-07-23 10:11:24 +00:00
let first;
2026-07-20 16:05:17 +00:00
let closure_1;
2026-07-23 10:11:24 +00:00
let first1;
2026-07-20 16:05:17 +00:00
let closure_3;
2026-07-23 10:11:24 +00:00
function _sendCaptchaRequest(result, arg1) {
2026-07-20 16:05:17 +00:00
// CreateGeneratorClosureLongIndex (0x67)
const obj = callback2(tmp);
return obj(...arguments);
}
2026-07-23 10:11:24 +00:00
const tmp20 = _createForOfIteratorHelperLoose();
2026-07-20 16:05:17 +00:00
const tmp23 = _sendCaptchaRequest(React.useState(null), 2);
2026-07-23 10:11:24 +00:00
first = tmp23[0];
2026-07-20 16:05:17 +00:00
closure_1 = tmp23[1];
const tmp27 = _sendCaptchaRequest(React.useState(null), 2);
2026-07-23 10:11:24 +00:00
first1 = tmp27[0];
2026-07-20 16:05:17 +00:00
closure_3 = tmp27[1];
let obj = { style: tmp20.container };
obj = { style: tmp20.content };
const obj1 = {};
2026-07-23 10:11:24 +00:00
const items = [callback(first(first1[10]).Text, { variant: "heading-lg/bold", color: "mobile-text-heading-primary", children: "Decider" }), ];
2026-07-20 16:05:17 +00:00
const obj2 = {
withSpacing: true,
value: first,
options: closure_12,
onChange(value) {
value = value.value;
if (value !== first(first1[8]).CaptchaDeciderType.HCAPTCHA_RQDATA) {
callback2(null);
}
callback(value);
}
};
2026-07-23 10:11:24 +00:00
items[1] = callback(first(first1[11]).RadioGroup, obj2);
2026-07-20 16:05:17 +00:00
obj1.children = items;
const items1 = [callback2(View, obj1), ];
2026-07-23 10:11:24 +00:00
let tmp8 = first === first(first1[8]).CaptchaDeciderType.HCAPTCHA_RQDATA;
2026-07-20 16:05:17 +00:00
if (tmp8) {
obj = {};
2026-07-23 10:11:24 +00:00
const items2 = [callback(first(first1[10]).Text, { variant: "heading-lg/bold", color: "mobile-text-heading-primary", children: "Difficulty" }), ];
2026-07-20 16:05:17 +00:00
const obj3 = {
withSpacing: true,
value: first1,
options: closure_10,
onChange(value) {
if (first === first(first1[8]).CaptchaDeciderType.HCAPTCHA_RQDATA) {
callback2(value.value);
}
}
};
2026-07-23 10:11:24 +00:00
items2[1] = callback(first(first1[11]).RadioGroup, obj3);
2026-07-20 16:05:17 +00:00
obj.children = items2;
tmp8 = callback2(View, obj);
}
items1[1] = tmp8;
obj.children = items1;
const items3 = [callback2(View, obj), ];
const obj4 = { style: tmp20.footerContainer };
const obj5 = { style: tmp20.separator };
const items4 = [callback(View, obj5), ];
const obj6 = { bottom: true, style: tmp20.footerButton };
const obj7 = {
onPress: function sendCaptchaRequest() {
return _sendCaptchaRequest(...arguments);
},
text: "Submit"
};
2026-07-23 10:11:24 +00:00
obj6.children = callback(first(first1[13]).Button, obj7);
items4[1] = callback(first(first1[12]).SafeAreaPaddingView, obj6);
2026-07-20 16:05:17 +00:00
obj4.children = items4;
items3[1] = callback2(View, obj4);
obj.children = items3;
return callback2(View, obj);
}
}
2026-07-23 10:11:24 +00:00
({ jsx: closure_7, jsxs: closure_8 } = jsxProd);
_createForOfIteratorHelperLoose = {};
_createForOfIteratorHelperLoose = { flex: 1, justifyContent: "space-between", backgroundColor: require("_createForOfIteratorHelperLoose").colors.BACKGROUND_BASE_LOW };
_createForOfIteratorHelperLoose.container = _createForOfIteratorHelperLoose;
_createForOfIteratorHelperLoose.separator = { height: 1, backgroundColor: require("_createForOfIteratorHelperLoose").colors.BORDER_SUBTLE, marginVertical: require("_createForOfIteratorHelperLoose").space.PX_24 };
let obj1 = { height: 1, backgroundColor: require("_createForOfIteratorHelperLoose").colors.BORDER_SUBTLE, marginVertical: require("_createForOfIteratorHelperLoose").space.PX_24 };
_createForOfIteratorHelperLoose.footerContainer = { marginBottom: require("_createForOfIteratorHelperLoose").space.PX_16 };
let obj2 = { marginBottom: require("_createForOfIteratorHelperLoose").space.PX_16 };
_createForOfIteratorHelperLoose.footerButton = { paddingHorizontal: require("_createForOfIteratorHelperLoose").space.PX_16 };
let obj3 = { paddingHorizontal: require("_createForOfIteratorHelperLoose").space.PX_16 };
_createForOfIteratorHelperLoose.content = { margin: require("_createForOfIteratorHelperLoose").space.PX_16, gap: require("_createForOfIteratorHelperLoose").space.PX_24 };
_createForOfIteratorHelperLoose = _createForOfIteratorHelperLoose.createStyles(_createForOfIteratorHelperLoose);
2026-07-20 16:05:17 +00:00
let closure_10 = prop.map((label) => ({ name: label.label, value: label.value }));
2026-07-23 10:11:24 +00:00
let items = [require("_testCaptcha").CaptchaDeciderType.HCAPTCHA_RQDATA, require("_testCaptcha").CaptchaDeciderType.SMITE_RQDATA];
let set = new Set(items);
2026-07-20 16:05:17 +00:00
const mapped = prop1.map((label) => ({ name: label.label, value: label.value }));
let closure_12 = mapped.filter((value) => set.has(value.value));
let closure_13 = { TEST_CAPTCHA: "TEST_CAPTCHA" };
2026-07-23 10:11:24 +00:00
let obj5 = {};
let obj4 = { margin: require("_createForOfIteratorHelperLoose").space.PX_16, gap: require("_createForOfIteratorHelperLoose").space.PX_24 };
obj5.headerStyle = { backgroundColor: require("_createForOfIteratorHelperLoose").colors.BACKGROUND_BASE_LOWER };
let closure_14 = _createForOfIteratorHelperLoose.createStyles(obj5);
const result = set.fileFinishedImporting("modules/captcha/tooling/native/CaptchaTestModal.tsx");
2026-07-20 16:05:17 +00:00
export default function CaptchaTestModal() {
2026-07-23 10:11:24 +00:00
const tmp = callback3();
const require = tmp;
2026-07-20 16:05:17 +00:00
const items = [tmp];
2026-07-23 10:11:24 +00:00
const memo = React.useMemo(() => (function getScreens(closure_0) {
2026-07-20 16:05:17 +00:00
let obj = {};
obj = {
2026-07-23 10:11:24 +00:00
headerStyle: closure_0.headerStyle,
2026-07-20 16:05:17 +00:00
headerTitle: "Captcha Test Tool",
2026-07-23 10:11:24 +00:00
headerLeft: callback(outer2_2[15]).getHeaderCloseButton(function closeModal() {
return outer3_1(outer3_2[14]).pop();
2026-07-20 16:05:17 +00:00
}),
render() {
2026-07-23 10:11:24 +00:00
return outer3_7(outer3_15, {});
2026-07-20 16:05:17 +00:00
}
};
2026-07-23 10:11:24 +00:00
obj[outer2_13.TEST_CAPTCHA] = obj;
2026-07-20 16:05:17 +00:00
return obj;
2026-07-23 10:11:24 +00:00
})(closure_0), items);
let obj = { screens: memo, initialRouteName: constants.TEST_CAPTCHA };
const intl = require(1212) /* getSystemLocale */.intl;
obj.headerBackTitle = intl.string(require(1212) /* getSystemLocale */.t["13/7kX"]);
2026-07-24 07:16:23 +00:00
return callback(require(5517) /* NavigationStack */.Navigator, obj);
2026-07-20 16:05:17 +00:00
};